From 266651b5170df4bdeff93aef1e77fe219516cf66 Mon Sep 17 00:00:00 2001 From: Alexander Melnyk Date: Wed, 13 Sep 2023 13:41:37 +0200 Subject: [PATCH 01/60] init parser package --- package-lock.json | 22 ++++++++++++++++ package.json | 1 + packages/parser/package.json | 51 ++++++++++++++++++++++++++++++++++++ 3 files changed, 74 insertions(+) create mode 100644 packages/parser/package.json diff --git a/package-lock.json b/package-lock.json index 8f7aff0cb3..6e63bdff9b 100644 --- a/package-lock.json +++ b/package-lock.json @@ -17,6 +17,7 @@ "packages/idempotency", "packages/batch", "packages/testing", + "packages/parser", "docs/snippets", "layers", "examples/cdk", @@ -956,6 +957,10 @@ "resolved": "packages/parameters", "link": true }, + "node_modules/@aws-lambda-powertools/parser": { + "resolved": "packages/parser", + "link": true + }, "node_modules/@aws-lambda-powertools/testing-utils": { "resolved": "packages/testing", "link": true @@ -17734,6 +17739,15 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/zod": { + "version": "3.22.2", + "resolved": "https://registry.npmjs.org/zod/-/zod-3.22.2.tgz", + "integrity": "sha512-wvWkphh5WQsJbVk1tbx1l1Ly4yg+XecD+Mq280uBGt9wa5BKSWf4Mhp6GmrkPixhMxmabYY7RbzlwVP32pbGCg==", + "dev": true, + "funding": { + "url": "https://github.com/sponsors/colinhacks" + } + }, "packages/batch": { "name": "@aws-lambda-powertools/batch", "version": "1.12.1", @@ -18221,6 +18235,14 @@ "node": "^12.13.0 || ^14.15.0 || ^16.10.0 || >=17.0.0" } }, + "packages/parser": { + "name": "@aws-lambda-powertools/parser", + "version": "0.0.0", + "license": "MIT-0", + "devDependencies": { + "zod": "^3.22.2" + } + }, "packages/testing": { "name": "@aws-lambda-powertools/testing-utils", "version": "1.12.1", diff --git a/package.json b/package.json index c8867af64c..b73ed7ad67 100644 --- a/package.json +++ b/package.json @@ -11,6 +11,7 @@ "packages/idempotency", "packages/batch", "packages/testing", + "packages/parser", "docs/snippets", "layers", "examples/cdk", diff --git a/packages/parser/package.json b/packages/parser/package.json new file mode 100644 index 0000000000..c40d714f80 --- /dev/null +++ b/packages/parser/package.json @@ -0,0 +1,51 @@ +{ + "name": "@aws-lambda-powertools/parser", + "version": "0.0.0", + "description": "The parser package for the Powertools for AWS Lambda (TypeScript) library.", + "scripts": { + "test": "npm run test:unit", + "test:unit": "jest --group=unit --detectOpenHandles --coverage --verbose", + "watch": "jest --watch", + "build": "tsc --build --force", + "lint": "eslint --ext .ts,.js --no-error-on-unmatched-pattern .", + "lint-fix": "eslint --fix --ext .ts,.js --no-error-on-unmatched-pattern .", + "prebuild": "rimraf ./lib", + "prepack": "node ../../.github/scripts/release_patch_package_json.js ." + }, + "author": { + "name": "Amazon Web Services", + "url": "https://aws.amazon.com" + }, + "lint-staged": { + "*.{js,ts}": "npm run lint-fix" + }, + "homepage": "https://github.com/aws-powertools/powertools-lambda-typescript/tree/main/packages/batch#readme", + "license": "MIT-0", + "main": "./lib/index.js", + "types": "./lib/index.d.ts", + "files": [ + "lib" + ], + "repository": { + "type": "git", + "url": "git+https://github.com/aws-powertools/powertools-lambda-typescript.git" + }, + "bugs": { + "url": "https://github.com/aws-powertools/powertools-lambda-typescript/issues" + }, + "keywords": [ + "aws", + "lambda", + "powertools", + "batch", + "batch-processing", + "serverless", + "nodejs" + ], + "publishConfig": { + "access": "restricted" + }, + "devDependencies": { + "zod": "^3.22.2" + } +} From e94d6c86c9cf628d83c359a0a5414a5d694f4b19 Mon Sep 17 00:00:00 2001 From: Alexander Melnyk Date: Wed, 13 Sep 2023 13:52:47 +0200 Subject: [PATCH 02/60] add init config --- packages/parser/README.md | 73 ++++++++++++++++++++++++++++++++++ packages/parser/jest.config.js | 28 +++++++++++++ packages/parser/src/intex.ts | 0 packages/parser/tsconfig.json | 10 +++++ packages/parser/typedoc.json | 9 +++++ 5 files changed, 120 insertions(+) create mode 100644 packages/parser/README.md create mode 100644 packages/parser/jest.config.js create mode 100644 packages/parser/src/intex.ts create mode 100644 packages/parser/tsconfig.json create mode 100644 packages/parser/typedoc.json diff --git a/packages/parser/README.md b/packages/parser/README.md new file mode 100644 index 0000000000..efc076dcc7 --- /dev/null +++ b/packages/parser/README.md @@ -0,0 +1,73 @@ +# Powertools for AWS Lambda (TypeScript) - Parser Utility + + +| ⚠️ **WARNING: Do not use this utility in production just yet!** ⚠️ | +| :--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| **This utility is currently released as beta developer preview** and is intended strictly for feedback and testing purposes **and not for production workloads**.. The version and all future versions tagged with the `-beta` suffix should be treated as not stable. Up until before the [General Availability release](https://github.com/aws-powertools/powertools-lambda-typescript/milestone/14) we might introduce significant breaking changes and improvements in response to customers feedback. | _ | + +- [Intro](#intro) +- [Key features](#key-features) +- [Usage](#usage) +- [Contribute](#contribute) +- [Roadmap](#roadmap) +- [Connect](#connect) +- [How to support Powertools for AWS Lambda (TypeScript)?](#how-to-support-powertools-for-aws-lambda-typescript) + - [Becoming a reference customer](#becoming-a-reference-customer) + - [Sharing your work](#sharing-your-work) + - [Using Lambda Layer](#using-lambda-layer) +- [Credits](#credits) +- [License](#license) + +## Intro + +## Key features + +## Usage + +## Contribute + +If you are interested in contributing to this project, please refer to our [Contributing Guidelines](https://github.com/aws-powertools/powertools-lambda-typescript/blob/main/CONTRIBUTING.md). + +## Roadmap + +The roadmap of Powertools for AWS Lambda (TypeScript) is driven by customers’ demand. +Help us prioritize upcoming functionalities or utilities by [upvoting existing RFCs and feature requests](https://github.com/aws-powertools/powertools-lambda-typescript/issues), or [creating new ones](https://github.com/aws-powertools/powertools-lambda-typescript/issues/new/choose), in this GitHub repository. + +## Connect + +* **Powertools for AWS Lambda on Discord**: `#typescript` - **[Invite link](https://discord.gg/B8zZKbbyET)** +* **Email**: aws-lambda-powertools-feedback@amazon.com + +## How to support Powertools for AWS Lambda (TypeScript)? + +### Becoming a reference customer + +Knowing which companies are using this library is important to help prioritize the project internally. If your company is using Powertools for AWS Lambda (TypeScript), you can request to have your name and logo added to the README file by raising a [Support Powertools for AWS Lambda (TypeScript) (become a reference)](https://github.com/aws-powertools/powertools-lambda-typescript/issues/new?assignees=&labels=customer-reference&template=support_powertools.yml&title=%5BSupport+Lambda+Powertools%5D%3A+%3Cyour+organization+name%3E) issue. + +The following companies, among others, use Powertools: + +* [Hashnode](https://hashnode.com/) +* [Trek10](https://www.trek10.com/) +* [Elva](https://elva-group.com) +* [globaldatanet](https://globaldatanet.com/) +* [Bailey Nelson](https://www.baileynelson.com.au) +* [Perfect Post](https://www.perfectpost.fr) +* [Sennder](https://sennder.com/) +* [Certible](https://www.certible.com/) +* [tecRacer GmbH & Co. KG](https://www.tecracer.com/) + +### Sharing your work + +Share what you did with Powertools for AWS Lambda (TypeScript) 💞💞. Blog post, workshops, presentation, sample apps and others. Check out what the community has already shared about Powertools for AWS Lambda (TypeScript) [here](https://docs.powertools.aws.dev/lambda-typescript/latest/we_made_this). + +### Using Lambda Layer + +This helps us understand who uses Powertools for AWS Lambda (TypeScript) in a non-intrusive way, and helps us gain future investments for other Powertools for AWS Lambda languages. When [using Layers](#lambda-layers), you can add Powertools as a dev dependency (or as part of your virtual env) to not impact the development process. + +## Credits + +Credits for the Lambda Powertools for AWS Lambda (TypeScript) idea go to [DAZN](https://github.com/getndazn) and their [DAZN Lambda Powertools](https://github.com/getndazn/dazn-lambda-powertools/). + +## License + +This library is licensed under the MIT-0 License. See the LICENSE file. \ No newline at end of file diff --git a/packages/parser/jest.config.js b/packages/parser/jest.config.js new file mode 100644 index 0000000000..a4f984ae47 --- /dev/null +++ b/packages/parser/jest.config.js @@ -0,0 +1,28 @@ +module.exports = { + displayName: { + name: 'Powertools for AWS Lambda (TypeScript) utility: PARSER', + color: 'blue', + }, + runner: 'groups', + preset: 'ts-jest', + transform: { + '^.+\\.ts?$': 'ts-jest', + }, + moduleFileExtensions: ['js', 'ts'], + collectCoverageFrom: ['**/src/**/*.ts', '!**/node_modules/**'], + testMatch: ['**/?(*.)+(spec|test).ts'], + roots: ['/src', '/tests'], + testPathIgnorePatterns: ['/node_modules/'], + testEnvironment: 'node', + coveragePathIgnorePatterns: ['/node_modules/', '/types/'], + coverageThreshold: { + global: { + statements: 100, + branches: 100, + functions: 100, + lines: 100, + }, + }, + coverageReporters: ['json-summary', 'text', 'lcov'], + setupFiles: ['/tests/helpers/populateEnvironmentVariables.ts'], +}; diff --git a/packages/parser/src/intex.ts b/packages/parser/src/intex.ts new file mode 100644 index 0000000000..e69de29bb2 diff --git a/packages/parser/tsconfig.json b/packages/parser/tsconfig.json new file mode 100644 index 0000000000..a62acd2a00 --- /dev/null +++ b/packages/parser/tsconfig.json @@ -0,0 +1,10 @@ +{ + "extends": "../../tsconfig.json", + "compilerOptions": { + "outDir": "./lib", + "rootDir": "./src", + }, + "include": [ + "./src/**/*" + ], +} \ No newline at end of file diff --git a/packages/parser/typedoc.json b/packages/parser/typedoc.json new file mode 100644 index 0000000000..ed0ca6fc47 --- /dev/null +++ b/packages/parser/typedoc.json @@ -0,0 +1,9 @@ +{ + "extends": [ + "../../typedoc.base.json" + ], + "entryPoints": [ + "./src/index.ts" + ], + "readme": "README.md" +} \ No newline at end of file From 8bcd2fc56cc58edb3d67081c86d10cc86d390574 Mon Sep 17 00:00:00 2001 From: Erika Yao <71943596+erikayao93@users.noreply.github.com> Date: Fri, 30 Jun 2023 11:54:33 -0500 Subject: [PATCH 03/60] feat(logger): Support for external observability providers (#1511) * Updated formatAttributes for additional parameters and LogItem return type * Updated the unit tests to pass with new formatter * Updated Powertool named objects to Powertools * Updated tests to match new naming consistency * Updated for tests for new naming consistency * Updated formatter for new design decisions * Update Logger for ephemeral attributes * Update bringYourOwnFormatter documentation to match new formatter --------- Co-authored-by: erikayao93 --- .../logger/bringYourOwnFormatterClass.ts | 13 +++- packages/logger/src/Logger.ts | 26 ++++--- packages/logger/src/formatter/LogFormatter.ts | 9 ++- .../src/formatter/LogFormatterInterface.ts | 9 ++- ...Formatter.ts => PowertoolsLogFormatter.ts} | 25 ++++-- packages/logger/src/formatter/index.ts | 2 +- packages/logger/src/log/LogItem.ts | 10 +-- .../{PowertoolLog.ts => PowertoolsLog.ts} | 4 +- packages/logger/src/types/formats/index.ts | 2 +- packages/logger/tests/unit/Logger.test.ts | 34 ++++----- ...test.ts => PowertoolsLogFormatter.test.ts} | 76 ++++++++++--------- packages/logger/tests/unit/helpers.test.ts | 16 ++-- .../tests/unit/middleware/middy.test.ts | 6 +- 13 files changed, 133 insertions(+), 99 deletions(-) rename packages/logger/src/formatter/{PowertoolLogFormatter.ts => PowertoolsLogFormatter.ts} (58%) rename packages/logger/src/types/formats/{PowertoolLog.ts => PowertoolsLog.ts} (96%) rename packages/logger/tests/unit/formatter/{PowertoolLogFormatter.test.ts => PowertoolsLogFormatter.test.ts} (85%) diff --git a/docs/snippets/logger/bringYourOwnFormatterClass.ts b/docs/snippets/logger/bringYourOwnFormatterClass.ts index ab7e207cb9..9d189b2b8b 100644 --- a/docs/snippets/logger/bringYourOwnFormatterClass.ts +++ b/docs/snippets/logger/bringYourOwnFormatterClass.ts @@ -3,13 +3,17 @@ import { LogAttributes, UnformattedAttributes, } from '@aws-lambda-powertools/logger/lib/types'; +import { LogItem } from '@aws-lambda-powertools/logger/lib/log'; // Replace this line with your own type type MyCompanyLog = LogAttributes; class MyCompanyLogFormatter extends LogFormatter { - public formatAttributes(attributes: UnformattedAttributes): MyCompanyLog { - return { + public formatAttributes( + attributes: UnformattedAttributes, + additionalLogAttributes: LogAttributes + ): LogItem { + const baseAttributes: MyCompanyLog = { message: attributes.message, service: attributes.serviceName, environment: attributes.environment, @@ -31,6 +35,11 @@ class MyCompanyLogFormatter extends LogFormatter { sampleRateValue: attributes.sampleRateValue, }, }; + + const logItem = new LogItem({ attributes: baseAttributes }); + logItem.addAttributes(additionalLogAttributes); // add any attributes not explicitly defined + + return logItem; } } diff --git a/packages/logger/src/Logger.ts b/packages/logger/src/Logger.ts index e9432121cf..f2973119a0 100644 --- a/packages/logger/src/Logger.ts +++ b/packages/logger/src/Logger.ts @@ -2,7 +2,7 @@ import { randomInt } from 'node:crypto'; import { Console } from 'node:console'; import type { Context, Handler } from 'aws-lambda'; import { Utility } from '@aws-lambda-powertools/commons'; -import { LogFormatterInterface, PowertoolLogFormatter } from './formatter'; +import { LogFormatterInterface, PowertoolsLogFormatter } from './formatter'; import { LogItem } from './log'; import merge from 'lodash.merge'; import { ConfigServiceInterface, EnvironmentVariablesService } from './config'; @@ -627,16 +627,13 @@ class Logger extends Utility implements ClassThatLogs { this.getPowertoolLogData() ); - const logItem = new LogItem({ - baseAttributes: this.getLogFormatter().formatAttributes( - unformattedBaseAttributes - ), - persistentAttributes: this.getPersistentLogAttributes(), - }); - - // Add ephemeral attributes + let additionalLogAttributes: LogAttributes = {}; + additionalLogAttributes = merge( + additionalLogAttributes, + this.getPersistentLogAttributes() + ); if (typeof input !== 'string') { - logItem.addAttributes(input); + additionalLogAttributes = merge(additionalLogAttributes, input); } extraInput.forEach((item: Error | LogAttributes | string) => { const attributes: LogAttributes = @@ -646,9 +643,14 @@ class Logger extends Utility implements ClassThatLogs { ? { extra: item } : item; - logItem.addAttributes(attributes); + additionalLogAttributes = merge(additionalLogAttributes, attributes); }); + const logItem = this.getLogFormatter().formatAttributes( + unformattedBaseAttributes, + additionalLogAttributes + ); + return logItem; } @@ -925,7 +927,7 @@ class Logger extends Utility implements ClassThatLogs { * @returns {void} */ private setLogFormatter(logFormatter?: LogFormatterInterface): void { - this.logFormatter = logFormatter || new PowertoolLogFormatter(); + this.logFormatter = logFormatter || new PowertoolsLogFormatter(); } /** diff --git a/packages/logger/src/formatter/LogFormatter.ts b/packages/logger/src/formatter/LogFormatter.ts index 539d0b814d..2106d6bc73 100644 --- a/packages/logger/src/formatter/LogFormatter.ts +++ b/packages/logger/src/formatter/LogFormatter.ts @@ -1,5 +1,6 @@ import { LogFormatterInterface } from '.'; import { LogAttributes, UnformattedAttributes } from '../types'; +import { LogItem } from '../log'; /** * Typeguard to monkey patch Error to add a cause property. @@ -30,11 +31,13 @@ abstract class LogFormatter implements LogFormatterInterface { * It formats key-value pairs of log attributes. * * @param {UnformattedAttributes} attributes - * @returns {LogAttributes} + * @param {LogAttributes} additionalLogAttributes + * @returns {LogItem} */ public abstract formatAttributes( - attributes: UnformattedAttributes - ): LogAttributes; + attributes: UnformattedAttributes, + additionalLogAttributes: LogAttributes + ): LogItem; /** * It formats a given Error parameter. diff --git a/packages/logger/src/formatter/LogFormatterInterface.ts b/packages/logger/src/formatter/LogFormatterInterface.ts index b6a771b84e..0fe1dd9909 100644 --- a/packages/logger/src/formatter/LogFormatterInterface.ts +++ b/packages/logger/src/formatter/LogFormatterInterface.ts @@ -1,4 +1,5 @@ import { LogAttributes, UnformattedAttributes } from '../types'; +import { LogItem } from '../log'; /** * @interface @@ -8,9 +9,13 @@ interface LogFormatterInterface { * It formats key-value pairs of log attributes. * * @param {UnformattedAttributes} attributes - * @returns {PowertoolLog} + * @param {LogAttributes} additionalLogAttributes + * @returns {LogItem} */ - formatAttributes(attributes: UnformattedAttributes): LogAttributes; + formatAttributes( + attributes: UnformattedAttributes, + additionalLogAttributes: LogAttributes + ): LogItem; /** * It formats a given Error parameter. diff --git a/packages/logger/src/formatter/PowertoolLogFormatter.ts b/packages/logger/src/formatter/PowertoolsLogFormatter.ts similarity index 58% rename from packages/logger/src/formatter/PowertoolLogFormatter.ts rename to packages/logger/src/formatter/PowertoolsLogFormatter.ts index 0fa77928e2..6a599d6eb8 100644 --- a/packages/logger/src/formatter/PowertoolLogFormatter.ts +++ b/packages/logger/src/formatter/PowertoolsLogFormatter.ts @@ -1,6 +1,7 @@ import { LogFormatter } from '.'; -import { UnformattedAttributes } from '../types'; -import { PowertoolLog } from '../types/formats'; +import { LogAttributes, UnformattedAttributes } from '../types'; +import { PowertoolsLog } from '../types/formats'; +import { LogItem } from '../log'; /** * This class is used to transform a set of log key-value pairs @@ -9,15 +10,19 @@ import { PowertoolLog } from '../types/formats'; * @class * @extends {LogFormatter} */ -class PowertoolLogFormatter extends LogFormatter { +class PowertoolsLogFormatter extends LogFormatter { /** * It formats key-value pairs of log attributes. * * @param {UnformattedAttributes} attributes - * @returns {PowertoolLog} + * @param {LogAttributes} additionalLogAttributes + * @returns {PowertoolsLog} */ - public formatAttributes(attributes: UnformattedAttributes): PowertoolLog { - return { + public formatAttributes( + attributes: UnformattedAttributes, + additionalLogAttributes: LogAttributes + ): LogItem { + const baseAttributes: PowertoolsLog = { cold_start: attributes.lambdaContext?.coldStart, function_arn: attributes.lambdaContext?.invokedFunctionArn, function_memory_size: attributes.lambdaContext?.memoryLimitInMB, @@ -30,7 +35,13 @@ class PowertoolLogFormatter extends LogFormatter { timestamp: this.formatTimestamp(attributes.timestamp), xray_trace_id: attributes.xRayTraceId, }; + + const powertoolLogItem = new LogItem({ attributes: baseAttributes }); + + powertoolLogItem.addAttributes(additionalLogAttributes); + + return powertoolLogItem; } } -export { PowertoolLogFormatter }; +export { PowertoolsLogFormatter }; diff --git a/packages/logger/src/formatter/index.ts b/packages/logger/src/formatter/index.ts index 1f7f14d2ab..ef5d7b16d8 100644 --- a/packages/logger/src/formatter/index.ts +++ b/packages/logger/src/formatter/index.ts @@ -1,3 +1,3 @@ export * from './LogFormatter'; export * from './LogFormatterInterface'; -export * from './PowertoolLogFormatter'; +export * from './PowertoolsLogFormatter'; diff --git a/packages/logger/src/log/LogItem.ts b/packages/logger/src/log/LogItem.ts index 1c562ec171..00a66ec786 100644 --- a/packages/logger/src/log/LogItem.ts +++ b/packages/logger/src/log/LogItem.ts @@ -5,16 +5,12 @@ import { LogAttributes } from '../types'; class LogItem implements LogItemInterface { private attributes: LogAttributes = {}; - public constructor(params: { - baseAttributes: LogAttributes; - persistentAttributes: LogAttributes; - }) { + public constructor(params: { attributes: LogAttributes }) { // Add attributes in the log item in this order: // - Base attributes supported by the Powertool by default - // - Persistent attributes provided by developer, not formatted + // - Persistent attributes provided by developer, not formatted (done later) // - Ephemeral attributes provided as parameters for a single log item (done later) - this.addAttributes(params.baseAttributes); - this.addAttributes(params.persistentAttributes); + this.addAttributes(params.attributes); } public addAttributes(attributes: LogAttributes): LogItem { diff --git a/packages/logger/src/types/formats/PowertoolLog.ts b/packages/logger/src/types/formats/PowertoolsLog.ts similarity index 96% rename from packages/logger/src/types/formats/PowertoolLog.ts rename to packages/logger/src/types/formats/PowertoolsLog.ts index add42d298c..fa360fef59 100644 --- a/packages/logger/src/types/formats/PowertoolLog.ts +++ b/packages/logger/src/types/formats/PowertoolsLog.ts @@ -1,6 +1,6 @@ import type { LogAttributes, LogLevel } from '..'; -type PowertoolLog = LogAttributes & { +type PowertoolsLog = LogAttributes & { /** * timestamp * @@ -90,4 +90,4 @@ type PowertoolLog = LogAttributes & { lambda_request_id?: string; }; -export type { PowertoolLog }; +export type { PowertoolsLog }; diff --git a/packages/logger/src/types/formats/index.ts b/packages/logger/src/types/formats/index.ts index 5462610cd6..5a828a385f 100644 --- a/packages/logger/src/types/formats/index.ts +++ b/packages/logger/src/types/formats/index.ts @@ -1 +1 @@ -export * from './PowertoolLog'; +export * from './PowertoolsLog'; diff --git a/packages/logger/tests/unit/Logger.test.ts b/packages/logger/tests/unit/Logger.test.ts index 5e56ae83c6..33b5a5b026 100644 --- a/packages/logger/tests/unit/Logger.test.ts +++ b/packages/logger/tests/unit/Logger.test.ts @@ -10,7 +10,7 @@ import { } from '@aws-lambda-powertools/commons'; import { createLogger, Logger } from '../../src'; import { EnvironmentVariablesService } from '../../src/config'; -import { PowertoolLogFormatter } from '../../src/formatter'; +import { PowertoolsLogFormatter } from '../../src/formatter'; import { ClassThatLogs, LogJsonIndent, @@ -798,7 +798,7 @@ describe('Class: Logger', () => { envVarsService: expect.any(EnvironmentVariablesService), logEvent: false, logIndentation: 0, - logFormatter: expect.any(PowertoolLogFormatter), + logFormatter: expect.any(PowertoolsLogFormatter), logLevel: 8, logLevelThresholds: { ...logLevelThresholds, @@ -1601,7 +1601,7 @@ describe('Class: Logger', () => { envVarsService: expect.any(EnvironmentVariablesService), logEvent: false, logIndentation: INDENTATION, - logFormatter: expect.any(PowertoolLogFormatter), + logFormatter: expect.any(PowertoolsLogFormatter), logLevel: 8, logLevelThresholds: { ...logLevelThresholds, @@ -1624,7 +1624,7 @@ describe('Class: Logger', () => { envVarsService: expect.any(EnvironmentVariablesService), logEvent: false, logIndentation: INDENTATION, - logFormatter: expect.any(PowertoolLogFormatter), + logFormatter: expect.any(PowertoolsLogFormatter), logLevel: 8, logLevelThresholds: { ...logLevelThresholds, @@ -1647,7 +1647,7 @@ describe('Class: Logger', () => { envVarsService: expect.any(EnvironmentVariablesService), logEvent: false, logIndentation: INDENTATION, - logFormatter: expect.any(PowertoolLogFormatter), + logFormatter: expect.any(PowertoolsLogFormatter), logLevel: 8, logLevelThresholds: { ...logLevelThresholds, @@ -1713,7 +1713,7 @@ describe('Class: Logger', () => { envVarsService: expect.any(EnvironmentVariablesService), logEvent: false, logIndentation: INDENTATION, - logFormatter: expect.any(PowertoolLogFormatter), + logFormatter: expect.any(PowertoolsLogFormatter), logLevel: 8, logLevelThresholds: { ...logLevelThresholds, @@ -1736,7 +1736,7 @@ describe('Class: Logger', () => { envVarsService: expect.any(EnvironmentVariablesService), logEvent: false, logIndentation: INDENTATION, - logFormatter: expect.any(PowertoolLogFormatter), + logFormatter: expect.any(PowertoolsLogFormatter), logLevel: 8, logLevelThresholds: { ...logLevelThresholds, @@ -1762,7 +1762,7 @@ describe('Class: Logger', () => { envVarsService: expect.any(EnvironmentVariablesService), logEvent: false, logIndentation: INDENTATION, - logFormatter: expect.any(PowertoolLogFormatter), + logFormatter: expect.any(PowertoolsLogFormatter), logLevel: 8, logLevelThresholds: { ...logLevelThresholds, @@ -1785,7 +1785,7 @@ describe('Class: Logger', () => { envVarsService: expect.any(EnvironmentVariablesService), logEvent: false, logIndentation: INDENTATION, - logFormatter: expect.any(PowertoolLogFormatter), + logFormatter: expect.any(PowertoolsLogFormatter), logLevel: 20, logLevelThresholds: { ...logLevelThresholds, @@ -1829,7 +1829,7 @@ describe('Class: Logger', () => { envVarsService: expect.any(EnvironmentVariablesService), logEvent: false, logIndentation: INDENTATION, - logFormatter: expect.any(PowertoolLogFormatter), + logFormatter: expect.any(PowertoolsLogFormatter), logLevel: 8, logLevelThresholds: { ...logLevelThresholds, @@ -1852,7 +1852,7 @@ describe('Class: Logger', () => { envVarsService: expect.any(EnvironmentVariablesService), logEvent: false, logIndentation: INDENTATION, - logFormatter: expect.any(PowertoolLogFormatter), + logFormatter: expect.any(PowertoolsLogFormatter), logLevel: 8, logLevelThresholds: { ...logLevelThresholds, @@ -1882,7 +1882,7 @@ describe('Class: Logger', () => { envVarsService: expect.any(EnvironmentVariablesService), logEvent: false, logIndentation: INDENTATION, - logFormatter: expect.any(PowertoolLogFormatter), + logFormatter: expect.any(PowertoolsLogFormatter), logLevel: 8, logLevelThresholds: { ...logLevelThresholds, @@ -1923,7 +1923,7 @@ describe('Class: Logger', () => { envVarsService: expect.any(EnvironmentVariablesService), logEvent: false, logIndentation: 0, - logFormatter: expect.any(PowertoolLogFormatter), + logFormatter: expect.any(PowertoolsLogFormatter), logLevel: 8, logLevelThresholds: { ...logLevelThresholds, @@ -1950,7 +1950,7 @@ describe('Class: Logger', () => { test('child logger should have the same logFormatter as its parent', () => { // Prepare - class MyCustomLogFormatter extends PowertoolLogFormatter {} + class MyCustomLogFormatter extends PowertoolsLogFormatter {} const parentLogger = new Logger({ logFormatter: new MyCustomLogFormatter(), }); @@ -1968,7 +1968,7 @@ describe('Class: Logger', () => { test('child logger with custom logFormatter in options should have provided logFormatter', () => { // Prepare - class MyCustomLogFormatter extends PowertoolLogFormatter {} + class MyCustomLogFormatter extends PowertoolsLogFormatter {} const parentLogger = new Logger(); // Act @@ -1979,7 +1979,7 @@ describe('Class: Logger', () => { // Assess expect(parentLogger).toEqual( expect.objectContaining({ - logFormatter: expect.any(PowertoolLogFormatter), + logFormatter: expect.any(PowertoolsLogFormatter), }) ); @@ -1992,7 +1992,7 @@ describe('Class: Logger', () => { test('child logger should have exact same attributes as the parent logger created with all non-default options', () => { // Prepare - class MyCustomLogFormatter extends PowertoolLogFormatter {} + class MyCustomLogFormatter extends PowertoolsLogFormatter {} class MyCustomEnvironmentVariablesService extends EnvironmentVariablesService {} const options: ConstructorOptions = { diff --git a/packages/logger/tests/unit/formatter/PowertoolLogFormatter.test.ts b/packages/logger/tests/unit/formatter/PowertoolsLogFormatter.test.ts similarity index 85% rename from packages/logger/tests/unit/formatter/PowertoolLogFormatter.test.ts rename to packages/logger/tests/unit/formatter/PowertoolsLogFormatter.test.ts index 02e1e2a303..1210b8ffc7 100644 --- a/packages/logger/tests/unit/formatter/PowertoolLogFormatter.test.ts +++ b/packages/logger/tests/unit/formatter/PowertoolsLogFormatter.test.ts @@ -4,10 +4,10 @@ * @group unit/logger/all */ import { AssertionError, strictEqual } from 'assert'; -import { PowertoolLogFormatter } from '../../../src/formatter'; -import { UnformattedAttributes } from '../../../src/types'; +import { PowertoolsLogFormatter } from '../../../src/formatter'; +import { LogAttributes, UnformattedAttributes } from '../../../src/types'; -describe('Class: PowertoolLogFormatter', () => { +describe('Class: PowertoolsLogFormatter', () => { const mockDate = new Date(1466424490000); const dateSpy = jest.spyOn(global, 'Date').mockImplementation(() => mockDate); @@ -18,7 +18,7 @@ describe('Class: PowertoolLogFormatter', () => { describe('Method: formatAttributes', () => { test('when optional parameters DO NOT have a value set, it returns an object with expected structure and values', () => { // Prepare - const formatter = new PowertoolLogFormatter(); + const formatter = new PowertoolsLogFormatter(); const unformattedAttributes: UnformattedAttributes = { sampleRateValue: undefined, awsRegion: 'eu-west-1', @@ -29,12 +29,16 @@ describe('Class: PowertoolLogFormatter', () => { timestamp: new Date(), message: 'This is a WARN log', }; + const additionalLogAttributes: LogAttributes = {}; // Act - const value = formatter.formatAttributes(unformattedAttributes); + const value = formatter.formatAttributes( + unformattedAttributes, + additionalLogAttributes + ); // Assess - expect(value).toEqual({ + expect(value.getAttributes()).toEqual({ cold_start: undefined, function_arn: undefined, function_memory_size: undefined, @@ -51,7 +55,7 @@ describe('Class: PowertoolLogFormatter', () => { test('when optional parameters DO have a value set, it returns an object with expected structure and values', () => { // Prepare - const formatter = new PowertoolLogFormatter(); + const formatter = new PowertoolsLogFormatter(); const unformattedAttributes: UnformattedAttributes = { sampleRateValue: 0.25, awsRegion: 'eu-west-1', @@ -72,12 +76,16 @@ describe('Class: PowertoolLogFormatter', () => { awsRequestId: 'abcdefg123456789', }, }; + const additionalLogAttributes: LogAttributes = {}; // Act - const value = formatter.formatAttributes(unformattedAttributes); + const value = formatter.formatAttributes( + unformattedAttributes, + additionalLogAttributes + ); // Assess - expect(value).toEqual({ + expect(value.getAttributes()).toEqual({ cold_start: true, function_arn: 'arn:aws:lambda:eu-west-1:123456789012:function:Example', function_memory_size: 123, @@ -96,7 +104,7 @@ describe('Class: PowertoolLogFormatter', () => { describe('Method: formatError', () => { test('when an error of type Error is passed, it returns an object with expected structure and values', () => { // Prepare - const formatter = new PowertoolLogFormatter(); + const formatter = new PowertoolsLogFormatter(); const shouldThrow = (): void => { throw new Error('Ouch!'); }; @@ -110,12 +118,12 @@ describe('Class: PowertoolLogFormatter', () => { const formattedError = formatter.formatError(error); expect(formattedError).toEqual({ location: expect.stringMatching( - /PowertoolLogFormatter.test.ts:[0-9]+$/ + /PowertoolsLogFormatter.test.ts:[0-9]+$/ ), message: 'Ouch!', name: 'Error', stack: expect.stringMatching( - /PowertoolLogFormatter.test.ts:[0-9]+:[0-9]+/ + /PowertoolsLogFormatter.test.ts:[0-9]+:[0-9]+/ ), }); } @@ -125,7 +133,7 @@ describe('Class: PowertoolLogFormatter', () => { test('when an error of type ReferenceError is passed, it returns an object with expected structure and values', () => { // Prepare - const formatter = new PowertoolLogFormatter(); + const formatter = new PowertoolsLogFormatter(); const shouldThrow = (): void => { // This is a reference error purposely to test the formatter // eslint-disable-next-line @typescript-eslint/ban-ts-comment @@ -142,12 +150,12 @@ describe('Class: PowertoolLogFormatter', () => { const formattedReferenceError = formatter.formatError(error); expect(formattedReferenceError).toEqual({ location: expect.stringMatching( - /PowertoolLogFormatter.test.ts:[0-9]+$/ + /PowertoolsLogFormatter.test.ts:[0-9]+$/ ), message: 'doesNotExist is not defined', name: 'ReferenceError', stack: expect.stringMatching( - /PowertoolLogFormatter.test.ts:[0-9]+:[0-9]+/ + /PowertoolsLogFormatter.test.ts:[0-9]+:[0-9]+/ ), }); } @@ -157,7 +165,7 @@ describe('Class: PowertoolLogFormatter', () => { test('when an error of type AssertionError is passed, it returns an object with expected structure and values', () => { // Prepare - const formatter = new PowertoolLogFormatter(); + const formatter = new PowertoolsLogFormatter(); const shouldThrow = (): void => { strictEqual(1, 2); }; @@ -173,14 +181,14 @@ describe('Class: PowertoolLogFormatter', () => { ); expect(formattedAssertionError).toEqual({ location: expect.stringMatching( - /PowertoolLogFormatter.test.ts:[0-9]+/ + /PowertoolsLogFormatter.test.ts:[0-9]+/ ), message: expect.stringMatching( /Expected values to be strictly equal/ ), name: 'AssertionError', stack: expect.stringMatching( - /PowertoolLogFormatter.test.ts:[0-9]+:[0-9]+/ + /PowertoolsLogFormatter.test.ts:[0-9]+:[0-9]+/ ), }); } @@ -190,7 +198,7 @@ describe('Class: PowertoolLogFormatter', () => { test('when an error of type RangeError is passed, it returns an object with expected structure and values', () => { // Prepare - const formatter = new PowertoolLogFormatter(); + const formatter = new PowertoolsLogFormatter(); const shouldThrow = (): void => { throw new RangeError('The argument must be between 10 and 20'); }; @@ -204,12 +212,12 @@ describe('Class: PowertoolLogFormatter', () => { const formattedRangeError = formatter.formatError(error); expect(formattedRangeError).toEqual({ location: expect.stringMatching( - /PowertoolLogFormatter.test.ts:[0-9]+/ + /PowertoolsLogFormatter.test.ts:[0-9]+/ ), message: 'The argument must be between 10 and 20', name: 'RangeError', stack: expect.stringMatching( - /PowertoolLogFormatter.test.ts:[0-9]+:[0-9]+/ + /PowertoolsLogFormatter.test.ts:[0-9]+:[0-9]+/ ), }); } @@ -219,7 +227,7 @@ describe('Class: PowertoolLogFormatter', () => { test('when an error of type SyntaxError is passed, it returns an object with expected structure and values', () => { // Prepare - const formatter = new PowertoolLogFormatter(); + const formatter = new PowertoolsLogFormatter(); const shouldThrow = (): void => { eval('foo bar'); }; @@ -233,12 +241,12 @@ describe('Class: PowertoolLogFormatter', () => { const formattedSyntaxError = formatter.formatError(error); expect(formattedSyntaxError).toEqual({ location: expect.stringMatching( - /PowertoolLogFormatter.test.ts:[0-9]+/ + /PowertoolsLogFormatter.test.ts:[0-9]+/ ), message: 'Unexpected identifier', name: 'SyntaxError', stack: expect.stringMatching( - /PowertoolLogFormatter.test.ts:[0-9]+:[0-9]+/ + /PowertoolsLogFormatter.test.ts:[0-9]+:[0-9]+/ ), }); } @@ -248,7 +256,7 @@ describe('Class: PowertoolLogFormatter', () => { test('when an error of type TypeError is passed, it returns an object with expected structure and values', () => { // Prepare - const formatter = new PowertoolLogFormatter(); + const formatter = new PowertoolsLogFormatter(); const shouldThrow = (): void => { // This is a reference error purposely to test the formatter // eslint-disable-next-line @typescript-eslint/ban-ts-comment @@ -266,12 +274,12 @@ describe('Class: PowertoolLogFormatter', () => { const formattedTypeError = formatter.formatError(error); expect(formattedTypeError).toEqual({ location: expect.stringMatching( - /PowertoolLogFormatter.test.ts:[0-9]+/ + /PowertoolsLogFormatter.test.ts:[0-9]+/ ), message: expect.stringMatching(/Cannot read propert/), name: 'TypeError', stack: expect.stringMatching( - /PowertoolLogFormatter.test.ts:[0-9]+:[0-9]+/ + /PowertoolsLogFormatter.test.ts:[0-9]+:[0-9]+/ ), }); } @@ -281,7 +289,7 @@ describe('Class: PowertoolLogFormatter', () => { test('when an error of type URIError is passed, it returns an object with expected structure and values', () => { // Prepare - const formatter = new PowertoolLogFormatter(); + const formatter = new PowertoolsLogFormatter(); const shouldThrow = (): void => { decodeURIComponent('%'); }; @@ -295,12 +303,12 @@ describe('Class: PowertoolLogFormatter', () => { const formattedURIError = formatter.formatError(error); expect(formattedURIError).toEqual({ location: expect.stringMatching( - /PowertoolLogFormatter.test.ts:[0-9]+/ + /PowertoolsLogFormatter.test.ts:[0-9]+/ ), message: 'URI malformed', name: 'URIError', stack: expect.stringMatching( - /PowertoolLogFormatter.test.ts:[0-9]+:[0-9]+/ + /PowertoolsLogFormatter.test.ts:[0-9]+:[0-9]+/ ), }); } @@ -377,7 +385,7 @@ describe('Class: PowertoolLogFormatter', () => { describe('Method: formatTimestamp', () => { test('it returns a datetime value ISO 8601 compliant', () => { // Prepare - const formatter = new PowertoolLogFormatter(); + const formatter = new PowertoolsLogFormatter(); // Act const timestamp = formatter.formatTimestamp(new Date()); @@ -390,7 +398,7 @@ describe('Class: PowertoolLogFormatter', () => { describe('Method: getCodeLocation', () => { test('when the stack IS present, it returns a datetime value ISO 8601 compliant', () => { // Prepare - const formatter = new PowertoolLogFormatter(); + const formatter = new PowertoolsLogFormatter(); const stack = 'Error: Things keep happening!\n' + ' at /home/foo/bar/file-that-threw-the-error.ts:22:5\n' + @@ -405,7 +413,7 @@ describe('Class: PowertoolLogFormatter', () => { test('when the stack IS NOT present, it returns a datetime value ISO 8601 compliant', () => { // Prepare - const formatter = new PowertoolLogFormatter(); + const formatter = new PowertoolsLogFormatter(); const stack = undefined; // Act @@ -417,7 +425,7 @@ describe('Class: PowertoolLogFormatter', () => { test('when the stack IS NOT present, it returns a datetime value ISO 8601 compliant', () => { // Prepare - const formatter = new PowertoolLogFormatter(); + const formatter = new PowertoolsLogFormatter(); const stack = 'A weird stack trace...'; // Act diff --git a/packages/logger/tests/unit/helpers.test.ts b/packages/logger/tests/unit/helpers.test.ts index ba16e38c31..8ddda59475 100644 --- a/packages/logger/tests/unit/helpers.test.ts +++ b/packages/logger/tests/unit/helpers.test.ts @@ -8,7 +8,7 @@ import { ConfigServiceInterface, EnvironmentVariablesService, } from '../../src/config'; -import { LogFormatter, PowertoolLogFormatter } from '../../src/formatter'; +import { LogFormatter, PowertoolsLogFormatter } from '../../src/formatter'; import { ConstructorOptions, LogLevelThresholds } from '../../src/types'; import { createLogger, Logger } from './../../src'; @@ -56,7 +56,7 @@ describe('Helper: createLogger function', () => { customConfigService: undefined, defaultServiceName: 'service_undefined', logLevel: 8, - logFormatter: expect.any(PowertoolLogFormatter), + logFormatter: expect.any(PowertoolsLogFormatter), }) ); }); @@ -67,7 +67,7 @@ describe('Helper: createLogger function', () => { logLevel: 'WARN', serviceName: 'my-lambda-service', sampleRateValue: 1, - logFormatter: new PowertoolLogFormatter(), + logFormatter: new PowertoolsLogFormatter(), customConfigService: new EnvironmentVariablesService(), persistentLogAttributes: { awsAccountId: '123456789', @@ -87,7 +87,7 @@ describe('Helper: createLogger function', () => { envVarsService: expect.any(EnvironmentVariablesService), logEvent: false, logIndentation: 0, - logFormatter: expect.any(PowertoolLogFormatter), + logFormatter: expect.any(PowertoolsLogFormatter), logLevel: 16, console: expect.any(Console), logLevelThresholds: { @@ -124,7 +124,7 @@ describe('Helper: createLogger function', () => { envVarsService: expect.any(EnvironmentVariablesService), logEvent: false, logIndentation: 0, - logFormatter: expect.any(PowertoolLogFormatter), + logFormatter: expect.any(PowertoolsLogFormatter), logLevel: 12, console: expect.any(Console), logLevelThresholds: { @@ -223,7 +223,7 @@ describe('Helper: createLogger function', () => { envVarsService: expect.any(EnvironmentVariablesService), customConfigService: undefined, logLevel: 20, - logFormatter: expect.any(PowertoolLogFormatter), + logFormatter: expect.any(PowertoolsLogFormatter), }) ); }); @@ -252,7 +252,7 @@ describe('Helper: createLogger function', () => { envVarsService: expect.any(EnvironmentVariablesService), customConfigService: undefined, logLevel: 16, - logFormatter: expect.any(PowertoolLogFormatter), + logFormatter: expect.any(PowertoolsLogFormatter), }) ); }); @@ -274,7 +274,7 @@ describe('Helper: createLogger function', () => { envVarsService: expect.any(EnvironmentVariablesService), logEvent: false, logIndentation: 0, - logFormatter: expect.any(PowertoolLogFormatter), + logFormatter: expect.any(PowertoolsLogFormatter), logLevel: 12, console: expect.any(Console), logLevelThresholds: { diff --git a/packages/logger/tests/unit/middleware/middy.test.ts b/packages/logger/tests/unit/middleware/middy.test.ts index f2815b01cd..39df13ea72 100644 --- a/packages/logger/tests/unit/middleware/middy.test.ts +++ b/packages/logger/tests/unit/middleware/middy.test.ts @@ -15,7 +15,7 @@ import { import { injectLambdaContext } from '../../../src/middleware/middy'; import { Logger } from './../../../src'; import middy from '@middy/core'; -import { PowertoolLogFormatter } from '../../../src/formatter'; +import { PowertoolsLogFormatter } from '../../../src/formatter'; import { Console } from 'console'; import { Context } from 'aws-lambda'; @@ -75,7 +75,7 @@ describe('Middy middleware', () => { envVarsService: expect.any(EnvironmentVariablesService), customConfigService: undefined, logLevel: 8, - logFormatter: expect.any(PowertoolLogFormatter), + logFormatter: expect.any(PowertoolsLogFormatter), }) ); }); @@ -114,7 +114,7 @@ describe('Middy middleware', () => { envVarsService: expect.any(EnvironmentVariablesService), customConfigService: undefined, logLevel: 8, - logFormatter: expect.any(PowertoolLogFormatter), + logFormatter: expect.any(PowertoolsLogFormatter), console: expect.any(Console), }); expect(logger).toEqual(expectation); From a25b7e0b4f3baabacd5e935432219ffbd7ba0dac Mon Sep 17 00:00:00 2001 From: Erika Yao <71943596+erikayao93@users.noreply.github.com> Date: Fri, 7 Jul 2023 08:58:21 -0500 Subject: [PATCH 04/60] chore(logger): PowertoolsLogFormatter docstring and variable naming update (#1585) * Updated formatAttributes for additional parameters and LogItem return type * Updated the unit tests to pass with new formatter * Updated Powertool named objects to Powertools * Updated tests to match new naming consistency * Updated for tests for new naming consistency * Updated formatter for new design decisions * Update Logger for ephemeral attributes * Update bringYourOwnFormatter documentation to match new formatter * Fixed incorrect return type, renamed variable for consistency --- packages/logger/src/formatter/PowertoolsLogFormatter.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/packages/logger/src/formatter/PowertoolsLogFormatter.ts b/packages/logger/src/formatter/PowertoolsLogFormatter.ts index 6a599d6eb8..0460ed48a4 100644 --- a/packages/logger/src/formatter/PowertoolsLogFormatter.ts +++ b/packages/logger/src/formatter/PowertoolsLogFormatter.ts @@ -16,7 +16,7 @@ class PowertoolsLogFormatter extends LogFormatter { * * @param {UnformattedAttributes} attributes * @param {LogAttributes} additionalLogAttributes - * @returns {PowertoolsLog} + * @returns {LogItem} */ public formatAttributes( attributes: UnformattedAttributes, @@ -36,11 +36,11 @@ class PowertoolsLogFormatter extends LogFormatter { xray_trace_id: attributes.xRayTraceId, }; - const powertoolLogItem = new LogItem({ attributes: baseAttributes }); + const powertoolsLogItem = new LogItem({ attributes: baseAttributes }); - powertoolLogItem.addAttributes(additionalLogAttributes); + powertoolsLogItem.addAttributes(additionalLogAttributes); - return powertoolLogItem; + return powertoolsLogItem; } } From 5c1234f2854f9935b3d4425631cf1891405af2cc Mon Sep 17 00:00:00 2001 From: Erika Yao <71943596+erikayao93@users.noreply.github.com> Date: Fri, 30 Jun 2023 11:54:33 -0500 Subject: [PATCH 05/60] feat(logger): Support for external observability providers (#1511) * Updated formatAttributes for additional parameters and LogItem return type * Updated the unit tests to pass with new formatter * Updated Powertool named objects to Powertools * Updated tests to match new naming consistency * Updated for tests for new naming consistency * Updated formatter for new design decisions * Update Logger for ephemeral attributes * Update bringYourOwnFormatter documentation to match new formatter --------- Co-authored-by: erikayao93 --- packages/logger/src/formatter/PowertoolsLogFormatter.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/logger/src/formatter/PowertoolsLogFormatter.ts b/packages/logger/src/formatter/PowertoolsLogFormatter.ts index 0460ed48a4..96cdf500d8 100644 --- a/packages/logger/src/formatter/PowertoolsLogFormatter.ts +++ b/packages/logger/src/formatter/PowertoolsLogFormatter.ts @@ -16,7 +16,7 @@ class PowertoolsLogFormatter extends LogFormatter { * * @param {UnformattedAttributes} attributes * @param {LogAttributes} additionalLogAttributes - * @returns {LogItem} + * @returns {PowertoolsLog} */ public formatAttributes( attributes: UnformattedAttributes, From 241e967cfe1d76bc0d267a2fd8b79bb5603a0231 Mon Sep 17 00:00:00 2001 From: Erika Yao <71943596+erikayao93@users.noreply.github.com> Date: Fri, 7 Jul 2023 08:58:21 -0500 Subject: [PATCH 06/60] chore(logger): PowertoolsLogFormatter docstring and variable naming update (#1585) * Updated formatAttributes for additional parameters and LogItem return type * Updated the unit tests to pass with new formatter * Updated Powertool named objects to Powertools * Updated tests to match new naming consistency * Updated for tests for new naming consistency * Updated formatter for new design decisions * Update Logger for ephemeral attributes * Update bringYourOwnFormatter documentation to match new formatter * Fixed incorrect return type, renamed variable for consistency --- packages/logger/src/formatter/PowertoolsLogFormatter.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/logger/src/formatter/PowertoolsLogFormatter.ts b/packages/logger/src/formatter/PowertoolsLogFormatter.ts index 96cdf500d8..0460ed48a4 100644 --- a/packages/logger/src/formatter/PowertoolsLogFormatter.ts +++ b/packages/logger/src/formatter/PowertoolsLogFormatter.ts @@ -16,7 +16,7 @@ class PowertoolsLogFormatter extends LogFormatter { * * @param {UnformattedAttributes} attributes * @param {LogAttributes} additionalLogAttributes - * @returns {PowertoolsLog} + * @returns {LogItem} */ public formatAttributes( attributes: UnformattedAttributes, From f113ef18dcf8328c933e0cf83d80e7bc96f1a50e Mon Sep 17 00:00:00 2001 From: Andrea Amorosi Date: Sat, 16 Sep 2023 07:06:22 +0200 Subject: [PATCH 07/60] chore(maintenance): bump dependencies & drop nodejs14x (#1687) --- .github/ISSUE_TEMPLATE/bug_report.yml | 14 +- ...sable-run-linting-check-and-unit-tests.yml | 20 +- .github/workflows/run-e2e-tests.yml | 4 + docs/snippets/package.json | 2 +- examples/cdk/package.json | 2 +- examples/sam/package.json | 2 +- layers/package.json | 2 +- layers/src/canary-stack.ts | 2 +- layers/src/layer-publisher-stack.ts | 6 +- layers/tests/unit/layer-publisher.test.ts | 2 +- lerna.json | 5 +- package-lock.json | 4268 ++++++----------- package.json | 24 +- packages/batch/package.json | 3 +- packages/commons/package.json | 2 +- packages/commons/src/types/middy.ts | 6 +- packages/idempotency/package.json | 3 +- packages/logger/package.json | 3 +- .../formatter/PowertoolsLogFormatter.test.ts | 20 +- packages/metrics/package.json | 3 +- packages/parameters/package.json | 3 +- .../src/appconfig/AppConfigProvider.ts | 2 +- .../parameters/src/appconfig/getAppConfig.ts | 2 +- .../src/dynamodb/DynamoDBProvider.ts | 4 +- .../parameters/src/secrets/SecretsProvider.ts | 2 +- packages/parameters/src/secrets/getSecret.ts | 2 +- packages/parameters/src/ssm/SSMProvider.ts | 9 +- packages/parameters/src/ssm/getParameter.ts | 2 +- packages/parameters/src/ssm/getParameters.ts | 2 +- .../parameters/src/types/AppConfigProvider.ts | 2 +- .../parameters/src/types/DynamoDBProvider.ts | 4 +- packages/parameters/src/types/SSMProvider.ts | 4 +- .../parameters/src/types/SecretsProvider.ts | 2 +- .../helpers/sdkMiddlewareRequestCounter.ts | 6 +- .../parameters/tests/unit/SSMProvider.test.ts | 5 +- .../tests/unit/getParameters.test.ts | 10 +- packages/testing/package.json | 2 +- packages/testing/src/constants.ts | 1 - packages/tracer/package.json | 3 +- packages/tracer/tests/unit/Tracer.test.ts | 2 +- tsconfig.json | 2 +- 41 files changed, 1679 insertions(+), 2785 deletions(-) diff --git a/.github/ISSUE_TEMPLATE/bug_report.yml b/.github/ISSUE_TEMPLATE/bug_report.yml index c9fbf5216c..3b9c913987 100644 --- a/.github/ISSUE_TEMPLATE/bug_report.yml +++ b/.github/ISSUE_TEMPLATE/bug_report.yml @@ -1,14 +1,14 @@ name: Bug report description: Report a reproducible bug to help us improve -title: "Bug: TITLE" -labels: ["type/bug", "triage"] -projects: ["aws-powertools/7"] +title: 'Bug: TITLE' +labels: ['type/bug', 'triage'] +projects: ['aws-powertools/7'] body: - type: markdown attributes: value: | Thank you for submitting a bug report. Before you start, make sure that [the bug hasn't been reported already](https://github.com/aws-powertools/powertools-lambda-typescript/issues). - + Please add as much information as possible to help us reproduce, and remove any potential sensitive data. - type: textarea id: expected_behaviour @@ -58,7 +58,7 @@ body: id: version attributes: label: Powertools for AWS Lambda (TypeScript) version - placeholder: "latest, 1.3.0" + placeholder: 'latest, 2.0.0' value: latest validations: required: true @@ -67,9 +67,9 @@ body: attributes: label: AWS Lambda function runtime options: + - 20.x - 18.x - 16.x - - 14.x validations: required: true - type: dropdown @@ -95,4 +95,4 @@ body: value: | --- - **Disclaimer**: After creating an issue, please wait until it is triaged and confirmed by a maintainer before implementing it. This will reduce amount of rework and the chance that a pull request gets rejected. \ No newline at end of file + **Disclaimer**: After creating an issue, please wait until it is triaged and confirmed by a maintainer before implementing it. This will reduce amount of rework and the chance that a pull request gets rejected. diff --git a/.github/workflows/reusable-run-linting-check-and-unit-tests.yml b/.github/workflows/reusable-run-linting-check-and-unit-tests.yml index dfd274e6bd..6b845abe20 100644 --- a/.github/workflows/reusable-run-linting-check-and-unit-tests.yml +++ b/.github/workflows/reusable-run-linting-check-and-unit-tests.yml @@ -10,16 +10,16 @@ jobs: NODE_ENV: dev strategy: matrix: - version: [14, 16, 18] + version: [16, 18] fail-fast: false steps: - name: Checkout code - uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3.5.2 + uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3.5.2 - name: Setup NodeJS uses: actions/setup-node@64ed1c7eab4cce3362f8c340dee64e5eaeef8f7c # v3.6.0 with: node-version: ${{ matrix.version }} - cache: "npm" + cache: 'npm' - name: Setup dependencies uses: ./.github/actions/cached-node-modules with: @@ -34,19 +34,19 @@ jobs: NODE_ENV: dev strategy: matrix: - example: ["sam", "cdk"] + example: ['sam', 'cdk'] fail-fast: false defaults: run: working-directory: examples/${{ matrix.example }} steps: - name: Checkout code - uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3.5.2 + uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3.5.2 - name: Setup NodeJS uses: actions/setup-node@64ed1c7eab4cce3362f8c340dee64e5eaeef8f7c # v3.6.0 with: node-version: 18 - cache: "npm" + cache: 'npm' - name: Setup dependencies uses: ./.github/actions/cached-node-modules - name: Run linting @@ -59,12 +59,12 @@ jobs: NODE_ENV: dev steps: - name: Checkout code - uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3.5.2 + uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3.5.2 - name: Setup NodeJS uses: actions/setup-node@64ed1c7eab4cce3362f8c340dee64e5eaeef8f7c # v3.6.0 with: node-version: 18 - cache: "npm" + cache: 'npm' - name: Setup dependencies uses: ./.github/actions/cached-node-modules - name: Run linting @@ -77,12 +77,12 @@ jobs: NODE_ENV: dev steps: - name: Checkout code - uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3.5.2 + uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3.5.2 - name: Setup NodeJS uses: actions/setup-node@64ed1c7eab4cce3362f8c340dee64e5eaeef8f7c # v3.6.0 with: node-version: 18 - cache: "npm" + cache: 'npm' - name: Setup dependencies uses: ./.github/actions/cached-node-modules - name: Run linting diff --git a/.github/workflows/run-e2e-tests.yml b/.github/workflows/run-e2e-tests.yml index 38c85edcf7..1051d65576 100644 --- a/.github/workflows/run-e2e-tests.yml +++ b/.github/workflows/run-e2e-tests.yml @@ -28,8 +28,12 @@ jobs: packages/parameters, packages/idempotency, ] +<<<<<<< HEAD version: [14, 16, 18] arch: [x86_64, arm64] +======= + version: [16, 18] +>>>>>>> 878dccda (chore(maintenance): bump dependencies & drop nodejs14x (#1687)) fail-fast: false steps: - name: Checkout Repo diff --git a/docs/snippets/package.json b/docs/snippets/package.json index 8a44267483..d4cf688037 100644 --- a/docs/snippets/package.json +++ b/docs/snippets/package.json @@ -1,6 +1,6 @@ { "name": "docs", - "version": "1.9.0", + "version": "2.0.0", "description": "A collection code snippets for the Powertools for AWS Lambda (TypeScript) docs", "author": { "name": "Amazon Web Services", diff --git a/examples/cdk/package.json b/examples/cdk/package.json index 41010cf813..0f8daae847 100644 --- a/examples/cdk/package.json +++ b/examples/cdk/package.json @@ -49,4 +49,4 @@ "phin": "^3.7.0", "source-map-support": "^0.5.21" } -} +} \ No newline at end of file diff --git a/examples/sam/package.json b/examples/sam/package.json index 24bf6c20e4..c8dc2a244a 100644 --- a/examples/sam/package.json +++ b/examples/sam/package.json @@ -41,4 +41,4 @@ "esbuild": "^0.19.3", "phin": "^3.7.0" } -} +} \ No newline at end of file diff --git a/layers/package.json b/layers/package.json index 5722be285c..b118451c9b 100644 --- a/layers/package.json +++ b/layers/package.json @@ -42,4 +42,4 @@ "aws-cdk-lib": "^2.96.1", "esbuild": "^0.19.3" } -} +} \ No newline at end of file diff --git a/layers/src/canary-stack.ts b/layers/src/canary-stack.ts index ca3fec76b8..342d5edb26 100644 --- a/layers/src/canary-stack.ts +++ b/layers/src/canary-stack.ts @@ -41,7 +41,7 @@ export class CanaryStack extends Stack { '../tests/e2e/layerPublisher.class.test.functionCode.ts' ), handler: 'handler', - runtime: Runtime.NODEJS_14_X, + runtime: Runtime.NODEJS_16_X, functionName: `canary-${suffix}`, timeout: Duration.seconds(30), bundling: { diff --git a/layers/src/layer-publisher-stack.ts b/layers/src/layer-publisher-stack.ts index 6ef6c19fda..01148546db 100644 --- a/layers/src/layer-publisher-stack.ts +++ b/layers/src/layer-publisher-stack.ts @@ -36,11 +36,7 @@ export class LayerPublisherStack extends Stack { this.lambdaLayerVersion = new LayerVersion(this, 'LambdaPowertoolsLayer', { layerVersionName: props?.layerName, description: `Powertools for AWS Lambda (TypeScript) version ${powertoolsPackageVersion}`, - compatibleRuntimes: [ - Runtime.NODEJS_14_X, - Runtime.NODEJS_16_X, - Runtime.NODEJS_18_X, - ], + compatibleRuntimes: [Runtime.NODEJS_16_X, Runtime.NODEJS_18_X], license: 'MIT-0', // This is needed because the following regions do not support the compatibleArchitectures property #1400 // ...(![ 'eu-south-2', 'eu-central-2', 'ap-southeast-4' ].includes(Stack.of(this).region) ? { compatibleArchitectures: [Architecture.X86_64] } : {}), diff --git a/layers/tests/unit/layer-publisher.test.ts b/layers/tests/unit/layer-publisher.test.ts index a365c34f3d..98b90788bd 100644 --- a/layers/tests/unit/layer-publisher.test.ts +++ b/layers/tests/unit/layer-publisher.test.ts @@ -25,7 +25,7 @@ describe('Class: LayerPublisherStack', () => { // Assess template.resourceCountIs('AWS::Lambda::LayerVersion', 1); template.hasResourceProperties('AWS::Lambda::LayerVersion', { - CompatibleRuntimes: ['nodejs14.x', 'nodejs16.x', 'nodejs18.x'], + CompatibleRuntimes: ['nodejs16.x', 'nodejs18.x'], LicenseInfo: 'MIT-0', /* CompatibleArchitectures: [ 'x86_64', diff --git a/lerna.json b/lerna.json index c6244a89ca..ae57c9b49a 100644 --- a/lerna.json +++ b/lerna.json @@ -10,9 +10,10 @@ "packages/testing", "examples/cdk", "examples/sam", - "layers" + "layers", + "docs/snippets" ], "version": "1.14.0", "npmClient": "npm", "message": "chore(release): %s [skip ci]" -} +} \ No newline at end of file diff --git a/package-lock.json b/package-lock.json index 61661771ec..86f049261d 100644 --- a/package-lock.json +++ b/package-lock.json @@ -24,24 +24,24 @@ ], "devDependencies": { "@middy/core": "^3.6.2", - "@types/aws-lambda": "^8.10.109", + "@types/aws-lambda": "^8.10.121", "@types/jest": "^29.5.4", - "@types/node": "^18.16.18", - "@types/uuid": "^9.0.2", - "@typescript-eslint/eslint-plugin": "^5.62.0", - "@typescript-eslint/parser": "^5.62.0", + "@types/node": "^20.6.1", + "@types/uuid": "^9.0.4", + "@typescript-eslint/eslint-plugin": "^6.7.0", + "@typescript-eslint/parser": "^6.7.0", "eslint": "^8.49.0", "eslint-config-prettier": "^9.0.0", "eslint-import-resolver-node": "^0.3.9", "eslint-import-resolver-typescript": "^3.6.0", "eslint-plugin-import": "^2.28.1", - "eslint-plugin-prettier": "^4.2.1", - "husky": "^8.0.2", - "jest": "^29.6.4", + "eslint-plugin-prettier": "^5.0.0", + "husky": "^8.0.3", + "jest": "^29.7.0", "jest-runner-groups": "^2.2.0", - "lerna": "^6.6.2", - "lint-staged": "^13.1.2", - "prettier": "^2.8.8", + "lerna": "^7.3.0", + "lint-staged": "^14.0.1", + "prettier": "^3.0.3", "rimraf": "^5.0.1", "ts-jest": "^29.1.1", "ts-node": "^10.9.1", @@ -50,12 +50,12 @@ "typescript": "^5.2.2" }, "engines": { - "node": ">=14" + "node": ">=16" } }, "docs/snippets": { "name": "docs", - "version": "1.9.0", + "version": "2.0.0", "license": "MIT-0", "devDependencies": { "@aws-sdk/client-appconfigdata": "^3.413.0", @@ -103,12 +103,51 @@ "typescript": "^5.2.2" } }, - "examples/cdk/node_modules/@types/node": { - "version": "20.6.1", - "resolved": "https://registry.npmjs.org/@types/node/-/node-20.6.1.tgz", - "integrity": "sha512-4LcJvuXQlv4lTHnxwyHQZ3uR9Zw2j7m1C9DfuwoTFQQP4Pmu04O6IfLYgMmHoOCt0nosItLLZAH+sOrRE0Bo8g==", + "examples/cdk/node_modules/@aws-lambda-powertools/commons": { + "version": "1.12.1", + "resolved": "https://registry.npmjs.org/@aws-lambda-powertools/commons/-/commons-1.12.1.tgz", + "integrity": "sha512-VChNfDUxxcB5KTfQPkJgxYihEZkrmeOzU9/A9FRBc+3v33EEM59T2pIgBkFy0VoINvGi3MoBEln/wyu2jV0ivA==", "dev": true }, + "examples/cdk/node_modules/@aws-lambda-powertools/logger": { + "version": "1.12.1", + "resolved": "https://registry.npmjs.org/@aws-lambda-powertools/logger/-/logger-1.12.1.tgz", + "integrity": "sha512-QMBkd6/rN2MniiNcWeCigT4AKqH+NG1X6xN8S+YLszd4qJvXvRqx2EBO01WVrtyctOE8IpLqxicevmw1cJqDIA==", + "dev": true, + "dependencies": { + "@aws-lambda-powertools/commons": "^1.12.1", + "lodash.merge": "^4.6.2" + } + }, + "examples/cdk/node_modules/@aws-lambda-powertools/metrics": { + "version": "1.12.1", + "resolved": "https://registry.npmjs.org/@aws-lambda-powertools/metrics/-/metrics-1.12.1.tgz", + "integrity": "sha512-tdwZBrpm7ouzWe1fWP8dzzuyGI7S1j3kAyXGvIOTQMbQEhN/kkSLohZJyfbpnTT10jLv3ozkgff6ZnWw6mX7fA==", + "dev": true, + "dependencies": { + "@aws-lambda-powertools/commons": "^1.12.1" + } + }, + "examples/cdk/node_modules/@aws-lambda-powertools/parameters": { + "version": "1.12.1", + "resolved": "https://registry.npmjs.org/@aws-lambda-powertools/parameters/-/parameters-1.12.1.tgz", + "integrity": "sha512-+TmZ27DkkLkRTxGqflM1u2f9eiylCuuPajfSOZwxDuBgFbEsP6iIDmrCIUOrM7phR0zpq/JBHx+vSeiFQWpzjg==", + "dev": true, + "dependencies": { + "@aws-lambda-powertools/commons": "^1.12.1", + "@aws-sdk/util-base64-node": "^3.209.0" + } + }, + "examples/cdk/node_modules/@aws-lambda-powertools/tracer": { + "version": "1.12.1", + "resolved": "https://registry.npmjs.org/@aws-lambda-powertools/tracer/-/tracer-1.12.1.tgz", + "integrity": "sha512-ehaa9JzAfNvoHTbqv/bbu+cJD9RZXPEh22g47vMyQ2qg5e3Xe8wyzecFU35rHLlys9CV3SGLuazlyaTc5K3zmA==", + "dev": true, + "dependencies": { + "@aws-lambda-powertools/commons": "^1.12.1", + "aws-xray-sdk-core": "^3.4.1" + } + }, "examples/sam": { "name": "sam-example", "version": "1.14.0", @@ -135,11 +174,45 @@ "typescript": "^5.2.2" } }, - "examples/sam/node_modules/@types/node": { - "version": "20.6.1", - "resolved": "https://registry.npmjs.org/@types/node/-/node-20.6.1.tgz", - "integrity": "sha512-4LcJvuXQlv4lTHnxwyHQZ3uR9Zw2j7m1C9DfuwoTFQQP4Pmu04O6IfLYgMmHoOCt0nosItLLZAH+sOrRE0Bo8g==", - "dev": true + "examples/sam/node_modules/@aws-lambda-powertools/commons": { + "version": "1.12.1", + "resolved": "https://registry.npmjs.org/@aws-lambda-powertools/commons/-/commons-1.12.1.tgz", + "integrity": "sha512-VChNfDUxxcB5KTfQPkJgxYihEZkrmeOzU9/A9FRBc+3v33EEM59T2pIgBkFy0VoINvGi3MoBEln/wyu2jV0ivA==" + }, + "examples/sam/node_modules/@aws-lambda-powertools/logger": { + "version": "1.12.1", + "resolved": "https://registry.npmjs.org/@aws-lambda-powertools/logger/-/logger-1.12.1.tgz", + "integrity": "sha512-QMBkd6/rN2MniiNcWeCigT4AKqH+NG1X6xN8S+YLszd4qJvXvRqx2EBO01WVrtyctOE8IpLqxicevmw1cJqDIA==", + "dependencies": { + "@aws-lambda-powertools/commons": "^1.12.1", + "lodash.merge": "^4.6.2" + } + }, + "examples/sam/node_modules/@aws-lambda-powertools/metrics": { + "version": "1.12.1", + "resolved": "https://registry.npmjs.org/@aws-lambda-powertools/metrics/-/metrics-1.12.1.tgz", + "integrity": "sha512-tdwZBrpm7ouzWe1fWP8dzzuyGI7S1j3kAyXGvIOTQMbQEhN/kkSLohZJyfbpnTT10jLv3ozkgff6ZnWw6mX7fA==", + "dependencies": { + "@aws-lambda-powertools/commons": "^1.12.1" + } + }, + "examples/sam/node_modules/@aws-lambda-powertools/parameters": { + "version": "1.12.1", + "resolved": "https://registry.npmjs.org/@aws-lambda-powertools/parameters/-/parameters-1.12.1.tgz", + "integrity": "sha512-+TmZ27DkkLkRTxGqflM1u2f9eiylCuuPajfSOZwxDuBgFbEsP6iIDmrCIUOrM7phR0zpq/JBHx+vSeiFQWpzjg==", + "dependencies": { + "@aws-lambda-powertools/commons": "^1.12.1", + "@aws-sdk/util-base64-node": "^3.209.0" + } + }, + "examples/sam/node_modules/@aws-lambda-powertools/tracer": { + "version": "1.12.1", + "resolved": "https://registry.npmjs.org/@aws-lambda-powertools/tracer/-/tracer-1.12.1.tgz", + "integrity": "sha512-ehaa9JzAfNvoHTbqv/bbu+cJD9RZXPEh22g47vMyQ2qg5e3Xe8wyzecFU35rHLlys9CV3SGLuazlyaTc5K3zmA==", + "dependencies": { + "@aws-lambda-powertools/commons": "^1.12.1", + "aws-xray-sdk-core": "^3.4.1" + } }, "layers": { "version": "1.14.0", @@ -2634,12 +2707,6 @@ "node": "^12.22.0 || ^14.17.0 || >=16.0.0" } }, - "node_modules/@gar/promisify": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/@gar/promisify/-/promisify-1.1.3.tgz", - "integrity": "sha512-k2Ty1JcVojjJFwrg/ThKi2ujJ7XNLYaFGNB/bWT9wGR+oSMJHMa5w+CUq6p/pVrKeNNgA7pCqEcjSnHVoqJQFw==", - "dev": true - }, "node_modules/@humanwhocodes/config-array": { "version": "0.11.11", "resolved": "https://registry.npmjs.org/@humanwhocodes/config-array/-/config-array-0.11.11.tgz", @@ -2778,12 +2845,6 @@ "url": "https://github.com/chalk/wrap-ansi?sponsor=1" } }, - "node_modules/@isaacs/string-locale-compare": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/@isaacs/string-locale-compare/-/string-locale-compare-1.1.0.tgz", - "integrity": "sha512-SQ7Kzhh9+D+ZW9MA0zkYv3VXhIDNx+LzM6EJ+/65I3QY+enU6Itte7E5XX7EWrqLW2FN4n06GWzBnPoC3th2aQ==", - "dev": true - }, "node_modules/@istanbuljs/load-nyc-config": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/@istanbuljs/load-nyc-config/-/load-nyc-config-1.1.0.tgz", @@ -3219,9 +3280,9 @@ } }, "node_modules/@lerna/child-process": { - "version": "6.6.2", - "resolved": "https://registry.npmjs.org/@lerna/child-process/-/child-process-6.6.2.tgz", - "integrity": "sha512-QyKIWEnKQFnYu2ey+SAAm1A5xjzJLJJj3bhIZd3QKyXKKjaJ0hlxam/OsWSltxTNbcyH1jRJjC6Cxv31usv0Ag==", + "version": "7.3.0", + "resolved": "https://registry.npmjs.org/@lerna/child-process/-/child-process-7.3.0.tgz", + "integrity": "sha512-rA+fGUo2j/LEq6w1w8s6oVikLbJTWoIDVpYMc7bUCtwDOUuZKMQiRtjmpavY3fTm7ltu42f4AKflc2A70K4wvA==", "dev": true, "dependencies": { "chalk": "^4.1.0", @@ -3233,109 +3294,82 @@ } }, "node_modules/@lerna/create": { - "version": "6.6.2", - "resolved": "https://registry.npmjs.org/@lerna/create/-/create-6.6.2.tgz", - "integrity": "sha512-xQ+1Y7D+9etvUlE+unhG/TwmM6XBzGIdFBaNoW8D8kyOa9M2Jf3vdEtAxVa7mhRz66CENfhL/+I/QkVaa7pwbQ==", - "dev": true, - "dependencies": { - "@lerna/child-process": "6.6.2", - "dedent": "^0.7.0", - "fs-extra": "^9.1.0", - "init-package-json": "^3.0.2", - "npm-package-arg": "8.1.1", - "p-reduce": "^2.1.0", - "pacote": "15.1.1", - "pify": "^5.0.0", - "semver": "^7.3.4", - "slash": "^3.0.0", - "validate-npm-package-license": "^3.0.4", - "validate-npm-package-name": "^4.0.0", - "yargs-parser": "20.2.4" - }, - "engines": { - "node": "^14.17.0 || >=16.0.0" - } - }, - "node_modules/@lerna/create/node_modules/dedent": { - "version": "0.7.0", - "resolved": "https://registry.npmjs.org/dedent/-/dedent-0.7.0.tgz", - "integrity": "sha512-Q6fKUPqnAHAyhiUgFU7BUzLiv0kd8saH9al7tnu5Q/okj6dnupxyTgFIBjVzJATdfIAm9NAsvXNzjaKa+bxVyA==", - "dev": true - }, - "node_modules/@lerna/legacy-package-management": { - "version": "6.6.2", - "resolved": "https://registry.npmjs.org/@lerna/legacy-package-management/-/legacy-package-management-6.6.2.tgz", - "integrity": "sha512-0hZxUPKnHwehUO2xC4ldtdX9bW0W1UosxebDIQlZL2STnZnA2IFmIk2lJVUyFW+cmTPQzV93jfS0i69T9Z+teg==", + "version": "7.3.0", + "resolved": "https://registry.npmjs.org/@lerna/create/-/create-7.3.0.tgz", + "integrity": "sha512-fjgiKjg9VXwQ4ZKKsrXICEKRiC3yo6+FprR0mc55uz0s5e9xupoSGLobUTTBdE7ncNB3ibqml8dfaAn/+ESajQ==", "dev": true, "dependencies": { - "@npmcli/arborist": "6.2.3", - "@npmcli/run-script": "4.1.7", - "@nrwl/devkit": ">=15.5.2 < 16", - "@octokit/rest": "19.0.3", - "byte-size": "7.0.0", + "@lerna/child-process": "7.3.0", + "@npmcli/run-script": "6.0.2", + "@nx/devkit": ">=16.5.1 < 17", + "@octokit/plugin-enterprise-rest": "6.0.1", + "@octokit/rest": "19.0.11", + "byte-size": "8.1.1", "chalk": "4.1.0", "clone-deep": "4.0.1", - "cmd-shim": "5.0.0", + "cmd-shim": "6.0.1", "columnify": "1.6.0", - "config-chain": "1.1.12", - "conventional-changelog-core": "4.2.4", - "conventional-recommended-bump": "6.1.0", - "cosmiconfig": "7.0.0", + "conventional-changelog-core": "5.0.1", + "conventional-recommended-bump": "7.0.1", + "cosmiconfig": "^8.2.0", "dedent": "0.7.0", - "dot-prop": "6.0.1", "execa": "5.0.0", - "file-url": "3.0.0", - "find-up": "5.0.0", - "fs-extra": "9.1.0", - "get-port": "5.1.1", + "fs-extra": "^11.1.1", "get-stream": "6.0.0", "git-url-parse": "13.1.0", "glob-parent": "5.1.2", "globby": "11.1.0", - "graceful-fs": "4.2.10", + "graceful-fs": "4.2.11", "has-unicode": "2.0.1", - "inquirer": "8.2.4", - "is-ci": "2.0.0", + "ini": "^1.3.8", + "init-package-json": "5.0.0", + "inquirer": "^8.2.4", + "is-ci": "3.0.1", "is-stream": "2.0.0", - "libnpmpublish": "7.1.4", + "js-yaml": "4.1.0", + "libnpmpublish": "7.3.0", "load-json-file": "6.2.0", - "make-dir": "3.1.0", + "lodash": "^4.17.21", + "make-dir": "4.0.0", "minimatch": "3.0.5", "multimatch": "5.0.0", "node-fetch": "2.6.7", "npm-package-arg": "8.1.1", "npm-packlist": "5.1.1", - "npm-registry-fetch": "14.0.3", - "npmlog": "6.0.2", + "npm-registry-fetch": "^14.0.5", + "npmlog": "^6.0.2", + "nx": ">=16.5.1 < 17", "p-map": "4.0.0", "p-map-series": "2.1.0", "p-queue": "6.6.2", - "p-waterfall": "2.1.1", - "pacote": "15.1.1", + "p-reduce": "^2.1.0", + "pacote": "^15.2.0", "pify": "5.0.0", - "pretty-format": "29.4.3", - "read-cmd-shim": "3.0.0", - "read-package-json": "5.0.1", + "read-cmd-shim": "4.0.0", + "read-package-json": "6.0.4", "resolve-from": "5.0.0", - "semver": "7.3.8", + "rimraf": "^4.4.1", + "semver": "^7.3.4", "signal-exit": "3.0.7", - "slash": "3.0.0", - "ssri": "9.0.1", + "slash": "^3.0.0", + "ssri": "^9.0.1", "strong-log-transformer": "2.1.0", "tar": "6.1.11", "temp-dir": "1.0.0", - "tempy": "1.0.0", "upath": "2.0.1", - "uuid": "8.3.2", - "write-file-atomic": "4.0.1", + "uuid": "^9.0.0", + "validate-npm-package-license": "^3.0.4", + "validate-npm-package-name": "5.0.0", + "write-file-atomic": "5.0.1", "write-pkg": "4.0.0", - "yargs": "16.2.0" + "yargs": "16.2.0", + "yargs-parser": "20.2.4" }, "engines": { "node": "^14.17.0 || >=16.0.0" } }, - "node_modules/@lerna/legacy-package-management/node_modules/chalk": { + "node_modules/@lerna/create/node_modules/chalk": { "version": "4.1.0", "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.0.tgz", "integrity": "sha512-qwx12AxXe2Q5xQ43Ac//I6v5aXTipYrSESdOgzrN+9XjgEpyjpKuvSGaN4qE93f7TQTlerQQ8S+EQ0EyDoVL1A==", @@ -3351,13 +3385,13 @@ "url": "https://github.com/chalk/chalk?sponsor=1" } }, - "node_modules/@lerna/legacy-package-management/node_modules/dedent": { + "node_modules/@lerna/create/node_modules/dedent": { "version": "0.7.0", "resolved": "https://registry.npmjs.org/dedent/-/dedent-0.7.0.tgz", "integrity": "sha512-Q6fKUPqnAHAyhiUgFU7BUzLiv0kd8saH9al7tnu5Q/okj6dnupxyTgFIBjVzJATdfIAm9NAsvXNzjaKa+bxVyA==", "dev": true }, - "node_modules/@lerna/legacy-package-management/node_modules/execa": { + "node_modules/@lerna/create/node_modules/execa": { "version": "5.0.0", "resolved": "https://registry.npmjs.org/execa/-/execa-5.0.0.tgz", "integrity": "sha512-ov6w/2LCiuyO4RLYGdpFGjkcs0wMTgGE8PrkTHikeUy5iJekXyPIKUjifk5CsE0pt7sMCrMZ3YNqoCj6idQOnQ==", @@ -3380,7 +3414,7 @@ "url": "https://github.com/sindresorhus/execa?sponsor=1" } }, - "node_modules/@lerna/legacy-package-management/node_modules/get-stream": { + "node_modules/@lerna/create/node_modules/get-stream": { "version": "6.0.0", "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-6.0.0.tgz", "integrity": "sha512-A1B3Bh1UmL0bidM/YX2NsCOTnGJePL9rO/M+Mw3m9f2gUpfokS0hi5Eah0WSUEWZdZhIZtMjkIYS7mDfOqNHbg==", @@ -3392,7 +3426,25 @@ "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/@lerna/legacy-package-management/node_modules/glob-parent": { + "node_modules/@lerna/create/node_modules/glob": { + "version": "9.3.5", + "resolved": "https://registry.npmjs.org/glob/-/glob-9.3.5.tgz", + "integrity": "sha512-e1LleDykUz2Iu+MTYdkSsuWX8lvAjAcs0Xef0lNIu0S2wOAzuTxCJtcd9S3cijlwYF18EsU3rzb8jPVobxDh9Q==", + "dev": true, + "dependencies": { + "fs.realpath": "^1.0.0", + "minimatch": "^8.0.2", + "minipass": "^4.2.4", + "path-scurry": "^1.6.1" + }, + "engines": { + "node": ">=16 || 14 >=14.17" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/@lerna/create/node_modules/glob-parent": { "version": "5.1.2", "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz", "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==", @@ -3404,55 +3456,31 @@ "node": ">= 6" } }, - "node_modules/@lerna/legacy-package-management/node_modules/graceful-fs": { - "version": "4.2.10", - "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.10.tgz", - "integrity": "sha512-9ByhssR2fPVsNZj478qUUbKfmL0+t5BDVyjShtyZZLiK7ZDAArFFfopyOTj0M05wE2tJPisA4iTnnXl2YoPvOA==", - "dev": true - }, - "node_modules/@lerna/legacy-package-management/node_modules/inquirer": { - "version": "8.2.4", - "resolved": "https://registry.npmjs.org/inquirer/-/inquirer-8.2.4.tgz", - "integrity": "sha512-nn4F01dxU8VeKfq192IjLsxu0/OmMZ4Lg3xKAns148rCaXP6ntAoEkVYZThWjwON8AlzdZZi6oqnhNbxUG9hVg==", + "node_modules/@lerna/create/node_modules/glob/node_modules/brace-expansion": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz", + "integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==", "dev": true, "dependencies": { - "ansi-escapes": "^4.2.1", - "chalk": "^4.1.1", - "cli-cursor": "^3.1.0", - "cli-width": "^3.0.0", - "external-editor": "^3.0.3", - "figures": "^3.0.0", - "lodash": "^4.17.21", - "mute-stream": "0.0.8", - "ora": "^5.4.1", - "run-async": "^2.4.0", - "rxjs": "^7.5.5", - "string-width": "^4.1.0", - "strip-ansi": "^6.0.0", - "through": "^2.3.6", - "wrap-ansi": "^7.0.0" - }, - "engines": { - "node": ">=12.0.0" + "balanced-match": "^1.0.0" } }, - "node_modules/@lerna/legacy-package-management/node_modules/inquirer/node_modules/chalk": { - "version": "4.1.2", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", - "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", + "node_modules/@lerna/create/node_modules/glob/node_modules/minimatch": { + "version": "8.0.4", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-8.0.4.tgz", + "integrity": "sha512-W0Wvr9HyFXZRGIDgCicunpQ299OKXs9RgZfaukz4qAW/pJhcpUfupc9c+OObPOFueNy8VSrZgEmDtk6Kh4WzDA==", "dev": true, "dependencies": { - "ansi-styles": "^4.1.0", - "supports-color": "^7.1.0" + "brace-expansion": "^2.0.1" }, "engines": { - "node": ">=10" + "node": ">=16 || 14 >=14.17" }, "funding": { - "url": "https://github.com/chalk/chalk?sponsor=1" + "url": "https://github.com/sponsors/isaacs" } }, - "node_modules/@lerna/legacy-package-management/node_modules/is-stream": { + "node_modules/@lerna/create/node_modules/is-stream": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-2.0.0.tgz", "integrity": "sha512-XCoy+WlUr7d1+Z8GgSuXmpuUFC9fOhRXglJMx+dwLKTkL44Cjd4W1Z5P+BQZpr+cR93aGP4S/s7Ftw6Nd/kiEw==", @@ -3461,43 +3489,7 @@ "node": ">=8" } }, - "node_modules/@lerna/legacy-package-management/node_modules/lru-cache": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz", - "integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==", - "dev": true, - "dependencies": { - "yallist": "^4.0.0" - }, - "engines": { - "node": ">=10" - } - }, - "node_modules/@lerna/legacy-package-management/node_modules/make-dir": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/make-dir/-/make-dir-3.1.0.tgz", - "integrity": "sha512-g3FeP20LNwhALb/6Cz6Dd4F2ngze0jz7tbzrD2wAV+o9FeNHe4rL+yK2md0J/fiSf1sa1ADhXqi5+oVwOM/eGw==", - "dev": true, - "dependencies": { - "semver": "^6.0.0" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/@lerna/legacy-package-management/node_modules/make-dir/node_modules/semver": { - "version": "6.3.1", - "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.1.tgz", - "integrity": "sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==", - "dev": true, - "bin": { - "semver": "bin/semver.js" - } - }, - "node_modules/@lerna/legacy-package-management/node_modules/minimatch": { + "node_modules/@lerna/create/node_modules/minimatch": { "version": "3.0.5", "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.5.tgz", "integrity": "sha512-tUpxzX0VAzJHjLu0xUfFv1gwVp9ba3IOuRAVH2EGuRW8a5emA2FlACLqiT/lDVtS1W+TGNwqz3sWaNyLgDJWuw==", @@ -3509,7 +3501,7 @@ "node": "*" } }, - "node_modules/@lerna/legacy-package-management/node_modules/minipass": { + "node_modules/@lerna/create/node_modules/minipass": { "version": "4.2.8", "resolved": "https://registry.npmjs.org/minipass/-/minipass-4.2.8.tgz", "integrity": "sha512-fNzuVyifolSLFL4NzpF+wEF4qrgqaaKX0haXPQEdQ7NKAN+WecoKMHV09YcuL/DHxrUsYQOK3MiuDf7Ip2OXfQ==", @@ -3518,150 +3510,84 @@ "node": ">=8" } }, - "node_modules/@lerna/legacy-package-management/node_modules/npm-registry-fetch": { - "version": "14.0.3", - "resolved": "https://registry.npmjs.org/npm-registry-fetch/-/npm-registry-fetch-14.0.3.tgz", - "integrity": "sha512-YaeRbVNpnWvsGOjX2wk5s85XJ7l1qQBGAp724h8e2CZFFhMSuw9enom7K1mWVUtvXO1uUSFIAPofQK0pPN0ZcA==", + "node_modules/@lerna/create/node_modules/resolve-from": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-5.0.0.tgz", + "integrity": "sha512-qYg9KP24dD5qka9J47d0aVky0N+b4fTU89LN9iDnjB5waksiC49rvMB0PrUJQGoTmH50XPiqOvAjDfaijGxYZw==", "dev": true, - "dependencies": { - "make-fetch-happen": "^11.0.0", - "minipass": "^4.0.0", - "minipass-fetch": "^3.0.0", - "minipass-json-stream": "^1.0.1", - "minizlib": "^2.1.2", - "npm-package-arg": "^10.0.0", - "proc-log": "^3.0.0" - }, "engines": { - "node": "^14.17.0 || ^16.13.0 || >=18.0.0" + "node": ">=8" } }, - "node_modules/@lerna/legacy-package-management/node_modules/npm-registry-fetch/node_modules/npm-package-arg": { - "version": "10.1.0", - "resolved": "https://registry.npmjs.org/npm-package-arg/-/npm-package-arg-10.1.0.tgz", - "integrity": "sha512-uFyyCEmgBfZTtrKk/5xDfHp6+MdrqGotX/VoOyEEl3mBwiEE5FlBaePanazJSVMPT7vKepcjYBY2ztg9A3yPIA==", + "node_modules/@lerna/create/node_modules/rimraf": { + "version": "4.4.1", + "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-4.4.1.tgz", + "integrity": "sha512-Gk8NlF062+T9CqNGn6h4tls3k6T1+/nXdOcSZVikNVtlRdYpA7wRJJMoXmuvOnLW844rPjdQ7JgXCYM6PPC/og==", "dev": true, "dependencies": { - "hosted-git-info": "^6.0.0", - "proc-log": "^3.0.0", - "semver": "^7.3.5", - "validate-npm-package-name": "^5.0.0" + "glob": "^9.2.0" + }, + "bin": { + "rimraf": "dist/cjs/src/bin.js" }, "engines": { - "node": "^14.17.0 || ^16.13.0 || >=18.0.0" + "node": ">=14" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/@lerna/create/node_modules/uuid": { + "version": "9.0.1", + "resolved": "https://registry.npmjs.org/uuid/-/uuid-9.0.1.tgz", + "integrity": "sha512-b+1eJOlsR9K8HJpow9Ok3fiWOWSIcIzXodvv0rQjVoOVNpWMpxf1wZNpt4y9h10odCNrqnYp1OBzRktckBe3sA==", + "dev": true, + "funding": [ + "https://github.com/sponsors/broofa", + "https://github.com/sponsors/ctavan" + ], + "bin": { + "uuid": "dist/bin/uuid" } }, - "node_modules/@lerna/legacy-package-management/node_modules/pretty-format": { - "version": "29.4.3", - "resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-29.4.3.tgz", - "integrity": "sha512-cvpcHTc42lcsvOOAzd3XuNWTcvk1Jmnzqeu+WsOuiPmxUJTnkbAcFNsRKvEpBEUFVUgy/GTZLulZDcDEi+CIlA==", + "node_modules/@lerna/create/node_modules/write-file-atomic": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/write-file-atomic/-/write-file-atomic-5.0.1.tgz", + "integrity": "sha512-+QU2zd6OTD8XWIJCbffaiQeH9U73qIqafo1x6V1snCWYGJf6cVE0cDR4D8xRzcEnfI21IFrUPzPGtcPf8AC+Rw==", "dev": true, "dependencies": { - "@jest/schemas": "^29.4.3", - "ansi-styles": "^5.0.0", - "react-is": "^18.0.0" + "imurmurhash": "^0.1.4", + "signal-exit": "^4.0.1" }, "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + "node": "^14.17.0 || ^16.13.0 || >=18.0.0" } }, - "node_modules/@lerna/legacy-package-management/node_modules/pretty-format/node_modules/ansi-styles": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-5.2.0.tgz", - "integrity": "sha512-Cxwpt2SfTzTtXcfOlzGEee8O+c+MmUgGrNiBcXnuWxuFJHe6a5Hz7qwhwe5OgaSYI0IJvkLqWX1ASG+cJOkEiA==", + "node_modules/@lerna/create/node_modules/write-file-atomic/node_modules/signal-exit": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-4.1.0.tgz", + "integrity": "sha512-bzyZ1e88w9O1iNJbKnOlvYTrWPDl46O1bG0D3XInv+9tkPrxrN8jUUTiFlDkkmKWgn1M6CfIA13SuGqOa9Korw==", "dev": true, "engines": { - "node": ">=10" + "node": ">=14" }, "funding": { - "url": "https://github.com/chalk/ansi-styles?sponsor=1" - } - }, - "node_modules/@lerna/legacy-package-management/node_modules/resolve-from": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-5.0.0.tgz", - "integrity": "sha512-qYg9KP24dD5qka9J47d0aVky0N+b4fTU89LN9iDnjB5waksiC49rvMB0PrUJQGoTmH50XPiqOvAjDfaijGxYZw==", - "dev": true, - "engines": { - "node": ">=8" + "url": "https://github.com/sponsors/isaacs" } }, - "node_modules/@lerna/legacy-package-management/node_modules/semver": { - "version": "7.3.8", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.8.tgz", - "integrity": "sha512-NB1ctGL5rlHrPJtFDVIVzTyQylMLu9N9VICA6HSFJo8MCGVTMW6gfpicwKmmK/dAjTOrqu5l63JJOpDSrAis3A==", + "node_modules/@lerna/create/node_modules/yargs": { + "version": "16.2.0", + "resolved": "https://registry.npmjs.org/yargs/-/yargs-16.2.0.tgz", + "integrity": "sha512-D1mvvtDG0L5ft/jGWkLpG1+m0eQxOfaBvTNELraWj22wSVUMWxZUvYgJYcKh6jGGIkJFhH4IZPQhR4TKpc8mBw==", "dev": true, "dependencies": { - "lru-cache": "^6.0.0" - }, - "bin": { - "semver": "bin/semver.js" - }, - "engines": { - "node": ">=10" - } - }, - "node_modules/@lerna/legacy-package-management/node_modules/validate-npm-package-name": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/validate-npm-package-name/-/validate-npm-package-name-5.0.0.tgz", - "integrity": "sha512-YuKoXDAhBYxY7SfOKxHBDoSyENFeW5VvIIQp2TGQuit8gpK6MnWaQelBKxso72DoxTZfZdcP3W90LqpSkgPzLQ==", - "dev": true, - "dependencies": { - "builtins": "^5.0.0" - }, - "engines": { - "node": "^14.17.0 || ^16.13.0 || >=18.0.0" - } - }, - "node_modules/@lerna/legacy-package-management/node_modules/wrap-ansi": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz", - "integrity": "sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==", - "dev": true, - "dependencies": { - "ansi-styles": "^4.0.0", - "string-width": "^4.1.0", - "strip-ansi": "^6.0.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/chalk/wrap-ansi?sponsor=1" - } - }, - "node_modules/@lerna/legacy-package-management/node_modules/write-file-atomic": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/write-file-atomic/-/write-file-atomic-4.0.1.tgz", - "integrity": "sha512-nSKUxgAbyioruk6hU87QzVbY279oYT6uiwgDoujth2ju4mJ+TZau7SQBhtbTmUyuNYTuXnSyRn66FV0+eCgcrQ==", - "dev": true, - "dependencies": { - "imurmurhash": "^0.1.4", - "signal-exit": "^3.0.7" - }, - "engines": { - "node": "^12.13.0 || ^14.15.0 || >=16" - } - }, - "node_modules/@lerna/legacy-package-management/node_modules/yallist": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", - "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==", - "dev": true - }, - "node_modules/@lerna/legacy-package-management/node_modules/yargs": { - "version": "16.2.0", - "resolved": "https://registry.npmjs.org/yargs/-/yargs-16.2.0.tgz", - "integrity": "sha512-D1mvvtDG0L5ft/jGWkLpG1+m0eQxOfaBvTNELraWj22wSVUMWxZUvYgJYcKh6jGGIkJFhH4IZPQhR4TKpc8mBw==", - "dev": true, - "dependencies": { - "cliui": "^7.0.2", - "escalade": "^3.1.1", - "get-caller-file": "^2.0.5", - "require-directory": "^2.1.1", - "string-width": "^4.2.0", - "y18n": "^5.0.5", - "yargs-parser": "^20.2.2" + "cliui": "^7.0.2", + "escalade": "^3.1.1", + "get-caller-file": "^2.0.5", + "require-directory": "^2.1.1", + "string-width": "^4.2.0", + "y18n": "^5.0.5", + "yargs-parser": "^20.2.2" }, "engines": { "node": ">=10" @@ -3710,259 +3636,151 @@ "node": ">= 8" } }, - "node_modules/@npmcli/arborist": { - "version": "6.2.3", - "resolved": "https://registry.npmjs.org/@npmcli/arborist/-/arborist-6.2.3.tgz", - "integrity": "sha512-lpGOC2ilSJXcc2zfW9QtukcCTcMbl3fVI0z4wvFB2AFIl0C+Q6Wv7ccrpdrQa8rvJ1ZVuc6qkX7HVTyKlzGqKA==", + "node_modules/@npmcli/fs": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/@npmcli/fs/-/fs-3.1.0.tgz", + "integrity": "sha512-7kZUAaLscfgbwBQRbvdMYaZOWyMEcPTH/tJjnyAWJ/dvvs9Ef+CERx/qJb9GExJpl1qipaDGn7KqHnFGGixd0w==", "dev": true, "dependencies": { - "@isaacs/string-locale-compare": "^1.1.0", - "@npmcli/fs": "^3.1.0", - "@npmcli/installed-package-contents": "^2.0.0", - "@npmcli/map-workspaces": "^3.0.2", - "@npmcli/metavuln-calculator": "^5.0.0", - "@npmcli/name-from-folder": "^2.0.0", - "@npmcli/node-gyp": "^3.0.0", - "@npmcli/package-json": "^3.0.0", - "@npmcli/query": "^3.0.0", - "@npmcli/run-script": "^6.0.0", - "bin-links": "^4.0.1", - "cacache": "^17.0.4", - "common-ancestor-path": "^1.0.1", - "hosted-git-info": "^6.1.1", - "json-parse-even-better-errors": "^3.0.0", - "json-stringify-nice": "^1.1.4", - "minimatch": "^6.1.6", - "nopt": "^7.0.0", - "npm-install-checks": "^6.0.0", - "npm-package-arg": "^10.1.0", - "npm-pick-manifest": "^8.0.1", - "npm-registry-fetch": "^14.0.3", - "npmlog": "^7.0.1", - "pacote": "^15.0.8", - "parse-conflict-json": "^3.0.0", - "proc-log": "^3.0.0", - "promise-all-reject-late": "^1.0.0", - "promise-call-limit": "^1.0.1", - "read-package-json-fast": "^3.0.2", - "semver": "^7.3.7", - "ssri": "^10.0.1", - "treeverse": "^3.0.0", - "walk-up-path": "^1.0.0" - }, - "bin": { - "arborist": "bin/index.js" + "semver": "^7.3.5" }, "engines": { "node": "^14.17.0 || ^16.13.0 || >=18.0.0" } }, - "node_modules/@npmcli/arborist/node_modules/@npmcli/run-script": { - "version": "6.0.2", - "resolved": "https://registry.npmjs.org/@npmcli/run-script/-/run-script-6.0.2.tgz", - "integrity": "sha512-NCcr1uQo1k5U+SYlnIrbAh3cxy+OQT1VtqiAbxdymSlptbzBb62AjH2xXgjNCoP073hoa1CfCAcwoZ8k96C4nA==", + "node_modules/@npmcli/git": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/@npmcli/git/-/git-4.1.0.tgz", + "integrity": "sha512-9hwoB3gStVfa0N31ymBmrX+GuDGdVA/QWShZVqE0HK2Af+7QGGrCTbZia/SW0ImUTjTne7SP91qxDmtXvDHRPQ==", "dev": true, "dependencies": { - "@npmcli/node-gyp": "^3.0.0", "@npmcli/promise-spawn": "^6.0.0", - "node-gyp": "^9.0.0", - "read-package-json-fast": "^3.0.0", + "lru-cache": "^7.4.4", + "npm-pick-manifest": "^8.0.0", + "proc-log": "^3.0.0", + "promise-inflight": "^1.0.1", + "promise-retry": "^2.0.1", + "semver": "^7.3.5", "which": "^3.0.0" }, "engines": { "node": "^14.17.0 || ^16.13.0 || >=18.0.0" } }, - "node_modules/@npmcli/arborist/node_modules/are-we-there-yet": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/are-we-there-yet/-/are-we-there-yet-4.0.1.tgz", - "integrity": "sha512-2zuA+jpOYBRgoBCfa+fB87Rk0oGJjDX6pxGzqH6f33NzUhG25Xur6R0u0Z9VVAq8Z5JvQpQI6j6rtonuivC8QA==", + "node_modules/@npmcli/git/node_modules/lru-cache": { + "version": "7.18.3", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-7.18.3.tgz", + "integrity": "sha512-jumlc0BIUrS3qJGgIkWZsyfAM7NCWiBcCDhnd+3NNM5KbBmLTgHVfWBcg6W+rLUsIpzpERPsvwUP7CckAQSOoA==", "dev": true, - "dependencies": { - "delegates": "^1.0.0", - "readable-stream": "^4.1.0" - }, "engines": { - "node": "^14.17.0 || ^16.13.0 || >=18.0.0" - } - }, - "node_modules/@npmcli/arborist/node_modules/brace-expansion": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz", - "integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==", - "dev": true, - "dependencies": { - "balanced-match": "^1.0.0" + "node": ">=12" } }, - "node_modules/@npmcli/arborist/node_modules/buffer": { - "version": "6.0.3", - "resolved": "https://registry.npmjs.org/buffer/-/buffer-6.0.3.tgz", - "integrity": "sha512-FTiCpNxtwiZZHEZbcbTIcZjERVICn9yq/pDFkTl95/AxzD1naBctN7YO68riM/gLSDY7sdrMby8hofADYuuqOA==", + "node_modules/@npmcli/git/node_modules/which": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/which/-/which-3.0.1.tgz", + "integrity": "sha512-XA1b62dzQzLfaEOSQFTCOd5KFf/1VSzZo7/7TUjnya6u0vGGKzU96UQBZTAThCb2j4/xjBAyii1OhRLJEivHvg==", "dev": true, - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/feross" - }, - { - "type": "patreon", - "url": "https://www.patreon.com/feross" - }, - { - "type": "consulting", - "url": "https://feross.org/support" - } - ], "dependencies": { - "base64-js": "^1.3.1", - "ieee754": "^1.2.1" - } - }, - "node_modules/@npmcli/arborist/node_modules/events": { - "version": "3.3.0", - "resolved": "https://registry.npmjs.org/events/-/events-3.3.0.tgz", - "integrity": "sha512-mQw+2fkQbALzQ7V0MY0IqdnXNOeTtP4r0lN9z7AAawCXgqea7bDii20AYrIBrFd/Hx0M2Ocz6S111CaFkUcb0Q==", - "dev": true, + "isexe": "^2.0.0" + }, + "bin": { + "node-which": "bin/which.js" + }, "engines": { - "node": ">=0.8.x" + "node": "^14.17.0 || ^16.13.0 || >=18.0.0" } }, - "node_modules/@npmcli/arborist/node_modules/gauge": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/gauge/-/gauge-5.0.1.tgz", - "integrity": "sha512-CmykPMJGuNan/3S4kZOpvvPYSNqSHANiWnh9XcMU2pSjtBfF0XzZ2p1bFAxTbnFxyBuPxQYHhzwaoOmUdqzvxQ==", + "node_modules/@npmcli/installed-package-contents": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/@npmcli/installed-package-contents/-/installed-package-contents-2.0.2.tgz", + "integrity": "sha512-xACzLPhnfD51GKvTOOuNX2/V4G4mz9/1I2MfDoye9kBM3RYe5g2YbscsaGoTlaWqkxeiapBWyseULVKpSVHtKQ==", "dev": true, "dependencies": { - "aproba": "^1.0.3 || ^2.0.0", - "color-support": "^1.1.3", - "console-control-strings": "^1.1.0", - "has-unicode": "^2.0.1", - "signal-exit": "^4.0.1", - "string-width": "^4.2.3", - "strip-ansi": "^6.0.1", - "wide-align": "^1.1.5" + "npm-bundled": "^3.0.0", + "npm-normalize-package-bin": "^3.0.0" + }, + "bin": { + "installed-package-contents": "lib/index.js" }, "engines": { "node": "^14.17.0 || ^16.13.0 || >=18.0.0" } }, - "node_modules/@npmcli/arborist/node_modules/json-parse-even-better-errors": { + "node_modules/@npmcli/installed-package-contents/node_modules/npm-bundled": { "version": "3.0.0", - "resolved": "https://registry.npmjs.org/json-parse-even-better-errors/-/json-parse-even-better-errors-3.0.0.tgz", - "integrity": "sha512-iZbGHafX/59r39gPwVPRBGw0QQKnA7tte5pSMrhWOW7swGsVvVTjmfyAV9pNqk8YGT7tRCdxRu8uzcgZwoDooA==", - "dev": true, - "engines": { - "node": "^14.17.0 || ^16.13.0 || >=18.0.0" - } - }, - "node_modules/@npmcli/arborist/node_modules/minimatch": { - "version": "6.2.0", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-6.2.0.tgz", - "integrity": "sha512-sauLxniAmvnhhRjFwPNnJKaPFYyddAgbYdeUpHULtCT/GhzdCx/MDNy+Y40lBxTQUrMzDE8e0S43Z5uqfO0REg==", + "resolved": "https://registry.npmjs.org/npm-bundled/-/npm-bundled-3.0.0.tgz", + "integrity": "sha512-Vq0eyEQy+elFpzsKjMss9kxqb9tG3YHg4dsyWuUENuzvSUWe1TCnW/vV9FkhvBk/brEDoDiVd+M1Btosa6ImdQ==", "dev": true, "dependencies": { - "brace-expansion": "^2.0.1" + "npm-normalize-package-bin": "^3.0.0" }, "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" + "node": "^14.17.0 || ^16.13.0 || >=18.0.0" } }, - "node_modules/@npmcli/arborist/node_modules/minipass": { - "version": "7.0.3", - "resolved": "https://registry.npmjs.org/minipass/-/minipass-7.0.3.tgz", - "integrity": "sha512-LhbbwCfz3vsb12j/WkWQPZfKTsgqIe1Nf/ti1pKjYESGLHIVjWU96G9/ljLH4F9mWNVhlQOm0VySdAWzf05dpg==", + "node_modules/@npmcli/installed-package-contents/node_modules/npm-normalize-package-bin": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/npm-normalize-package-bin/-/npm-normalize-package-bin-3.0.1.tgz", + "integrity": "sha512-dMxCf+zZ+3zeQZXKxmyuCKlIDPGuv8EF940xbkC4kQVDTtqoh6rJFO+JTKSA6/Rwi0getWmtuy4Itup0AMcaDQ==", "dev": true, "engines": { - "node": ">=16 || 14 >=14.17" + "node": "^14.17.0 || ^16.13.0 || >=18.0.0" } }, - "node_modules/@npmcli/arborist/node_modules/npm-package-arg": { - "version": "10.1.0", - "resolved": "https://registry.npmjs.org/npm-package-arg/-/npm-package-arg-10.1.0.tgz", - "integrity": "sha512-uFyyCEmgBfZTtrKk/5xDfHp6+MdrqGotX/VoOyEEl3mBwiEE5FlBaePanazJSVMPT7vKepcjYBY2ztg9A3yPIA==", + "node_modules/@npmcli/node-gyp": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/@npmcli/node-gyp/-/node-gyp-3.0.0.tgz", + "integrity": "sha512-gp8pRXC2oOxu0DUE1/M3bYtb1b3/DbJ5aM113+XJBgfXdussRAsX0YOrOhdd8WvnAR6auDBvJomGAkLKA5ydxA==", "dev": true, - "dependencies": { - "hosted-git-info": "^6.0.0", - "proc-log": "^3.0.0", - "semver": "^7.3.5", - "validate-npm-package-name": "^5.0.0" - }, "engines": { "node": "^14.17.0 || ^16.13.0 || >=18.0.0" } }, - "node_modules/@npmcli/arborist/node_modules/npmlog": { - "version": "7.0.1", - "resolved": "https://registry.npmjs.org/npmlog/-/npmlog-7.0.1.tgz", - "integrity": "sha512-uJ0YFk/mCQpLBt+bxN88AKd+gyqZvZDbtiNxk6Waqcj2aPRyfVx8ITawkyQynxUagInjdYT1+qj4NfA5KJJUxg==", + "node_modules/@npmcli/promise-spawn": { + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/@npmcli/promise-spawn/-/promise-spawn-6.0.2.tgz", + "integrity": "sha512-gGq0NJkIGSwdbUt4yhdF8ZrmkGKVz9vAdVzpOfnom+V8PLSmSOVhZwbNvZZS1EYcJN5hzzKBxmmVVAInM6HQLg==", "dev": true, "dependencies": { - "are-we-there-yet": "^4.0.0", - "console-control-strings": "^1.1.0", - "gauge": "^5.0.0", - "set-blocking": "^2.0.0" + "which": "^3.0.0" }, "engines": { "node": "^14.17.0 || ^16.13.0 || >=18.0.0" } }, - "node_modules/@npmcli/arborist/node_modules/readable-stream": { - "version": "4.4.2", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-4.4.2.tgz", - "integrity": "sha512-Lk/fICSyIhodxy1IDK2HazkeGjSmezAWX2egdtJnYhtzKEsBPJowlI6F6LPb5tqIQILrMbx22S5o3GuJavPusA==", + "node_modules/@npmcli/promise-spawn/node_modules/which": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/which/-/which-3.0.1.tgz", + "integrity": "sha512-XA1b62dzQzLfaEOSQFTCOd5KFf/1VSzZo7/7TUjnya6u0vGGKzU96UQBZTAThCb2j4/xjBAyii1OhRLJEivHvg==", "dev": true, "dependencies": { - "abort-controller": "^3.0.0", - "buffer": "^6.0.3", - "events": "^3.3.0", - "process": "^0.11.10", - "string_decoder": "^1.3.0" - }, - "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" - } - }, - "node_modules/@npmcli/arborist/node_modules/signal-exit": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-4.1.0.tgz", - "integrity": "sha512-bzyZ1e88w9O1iNJbKnOlvYTrWPDl46O1bG0D3XInv+9tkPrxrN8jUUTiFlDkkmKWgn1M6CfIA13SuGqOa9Korw==", - "dev": true, - "engines": { - "node": ">=14" + "isexe": "^2.0.0" }, - "funding": { - "url": "https://github.com/sponsors/isaacs" - } - }, - "node_modules/@npmcli/arborist/node_modules/ssri": { - "version": "10.0.5", - "resolved": "https://registry.npmjs.org/ssri/-/ssri-10.0.5.tgz", - "integrity": "sha512-bSf16tAFkGeRlUNDjXu8FzaMQt6g2HZJrun7mtMbIPOddxt3GLMSz5VWUWcqTJUPfLEaDIepGxv+bYQW49596A==", - "dev": true, - "dependencies": { - "minipass": "^7.0.3" + "bin": { + "node-which": "bin/which.js" }, "engines": { "node": "^14.17.0 || ^16.13.0 || >=18.0.0" } }, - "node_modules/@npmcli/arborist/node_modules/validate-npm-package-name": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/validate-npm-package-name/-/validate-npm-package-name-5.0.0.tgz", - "integrity": "sha512-YuKoXDAhBYxY7SfOKxHBDoSyENFeW5VvIIQp2TGQuit8gpK6MnWaQelBKxso72DoxTZfZdcP3W90LqpSkgPzLQ==", + "node_modules/@npmcli/run-script": { + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/@npmcli/run-script/-/run-script-6.0.2.tgz", + "integrity": "sha512-NCcr1uQo1k5U+SYlnIrbAh3cxy+OQT1VtqiAbxdymSlptbzBb62AjH2xXgjNCoP073hoa1CfCAcwoZ8k96C4nA==", "dev": true, "dependencies": { - "builtins": "^5.0.0" + "@npmcli/node-gyp": "^3.0.0", + "@npmcli/promise-spawn": "^6.0.0", + "node-gyp": "^9.0.0", + "read-package-json-fast": "^3.0.0", + "which": "^3.0.0" }, "engines": { "node": "^14.17.0 || ^16.13.0 || >=18.0.0" } }, - "node_modules/@npmcli/arborist/node_modules/which": { + "node_modules/@npmcli/run-script/node_modules/which": { "version": "3.0.1", "resolved": "https://registry.npmjs.org/which/-/which-3.0.1.tgz", "integrity": "sha512-XA1b62dzQzLfaEOSQFTCOd5KFf/1VSzZo7/7TUjnya6u0vGGKzU96UQBZTAThCb2j4/xjBAyii1OhRLJEivHvg==", @@ -3977,407 +3795,101 @@ "node": "^14.17.0 || ^16.13.0 || >=18.0.0" } }, - "node_modules/@npmcli/fs": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/@npmcli/fs/-/fs-3.1.0.tgz", - "integrity": "sha512-7kZUAaLscfgbwBQRbvdMYaZOWyMEcPTH/tJjnyAWJ/dvvs9Ef+CERx/qJb9GExJpl1qipaDGn7KqHnFGGixd0w==", + "node_modules/@nrwl/devkit": { + "version": "16.8.1", + "resolved": "https://registry.npmjs.org/@nrwl/devkit/-/devkit-16.8.1.tgz", + "integrity": "sha512-Y7yYDh62Hi4q99Q4+ipIQ3K9iLuAld3WcwjLv6vtl6Livu+TU3eqbraBEno7DQL8JuIuwgBT4lX7Bp3w3N9RDg==", "dev": true, "dependencies": { - "semver": "^7.3.5" - }, - "engines": { - "node": "^14.17.0 || ^16.13.0 || >=18.0.0" + "@nx/devkit": "16.8.1" } }, - "node_modules/@npmcli/git": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/@npmcli/git/-/git-4.1.0.tgz", - "integrity": "sha512-9hwoB3gStVfa0N31ymBmrX+GuDGdVA/QWShZVqE0HK2Af+7QGGrCTbZia/SW0ImUTjTne7SP91qxDmtXvDHRPQ==", + "node_modules/@nrwl/tao": { + "version": "16.8.1", + "resolved": "https://registry.npmjs.org/@nrwl/tao/-/tao-16.8.1.tgz", + "integrity": "sha512-hgGFLyEgONSofxnJsXN9NlUx4J8/YSLUkfZKdR8Qa97+JGZT8FEuk7NLFJOWdYYqROoCzXLHK0d+twFFNPS5BQ==", "dev": true, "dependencies": { - "@npmcli/promise-spawn": "^6.0.0", - "lru-cache": "^7.4.4", - "npm-pick-manifest": "^8.0.0", - "proc-log": "^3.0.0", - "promise-inflight": "^1.0.1", - "promise-retry": "^2.0.1", - "semver": "^7.3.5", - "which": "^3.0.0" - }, - "engines": { - "node": "^14.17.0 || ^16.13.0 || >=18.0.0" - } - }, - "node_modules/@npmcli/git/node_modules/lru-cache": { - "version": "7.18.3", - "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-7.18.3.tgz", - "integrity": "sha512-jumlc0BIUrS3qJGgIkWZsyfAM7NCWiBcCDhnd+3NNM5KbBmLTgHVfWBcg6W+rLUsIpzpERPsvwUP7CckAQSOoA==", - "dev": true, - "engines": { - "node": ">=12" - } - }, - "node_modules/@npmcli/git/node_modules/which": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/which/-/which-3.0.1.tgz", - "integrity": "sha512-XA1b62dzQzLfaEOSQFTCOd5KFf/1VSzZo7/7TUjnya6u0vGGKzU96UQBZTAThCb2j4/xjBAyii1OhRLJEivHvg==", - "dev": true, - "dependencies": { - "isexe": "^2.0.0" - }, - "bin": { - "node-which": "bin/which.js" - }, - "engines": { - "node": "^14.17.0 || ^16.13.0 || >=18.0.0" - } - }, - "node_modules/@npmcli/installed-package-contents": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/@npmcli/installed-package-contents/-/installed-package-contents-2.0.2.tgz", - "integrity": "sha512-xACzLPhnfD51GKvTOOuNX2/V4G4mz9/1I2MfDoye9kBM3RYe5g2YbscsaGoTlaWqkxeiapBWyseULVKpSVHtKQ==", - "dev": true, - "dependencies": { - "npm-bundled": "^3.0.0", - "npm-normalize-package-bin": "^3.0.0" - }, - "bin": { - "installed-package-contents": "lib/index.js" - }, - "engines": { - "node": "^14.17.0 || ^16.13.0 || >=18.0.0" - } - }, - "node_modules/@npmcli/map-workspaces": { - "version": "3.0.4", - "resolved": "https://registry.npmjs.org/@npmcli/map-workspaces/-/map-workspaces-3.0.4.tgz", - "integrity": "sha512-Z0TbvXkRbacjFFLpVpV0e2mheCh+WzQpcqL+4xp49uNJOxOnIAPZyXtUxZ5Qn3QBTGKA11Exjd9a5411rBrhDg==", - "dev": true, - "dependencies": { - "@npmcli/name-from-folder": "^2.0.0", - "glob": "^10.2.2", - "minimatch": "^9.0.0", - "read-package-json-fast": "^3.0.0" - }, - "engines": { - "node": "^14.17.0 || ^16.13.0 || >=18.0.0" - } - }, - "node_modules/@npmcli/map-workspaces/node_modules/brace-expansion": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz", - "integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==", - "dev": true, - "dependencies": { - "balanced-match": "^1.0.0" - } - }, - "node_modules/@npmcli/map-workspaces/node_modules/glob": { - "version": "10.3.4", - "resolved": "https://registry.npmjs.org/glob/-/glob-10.3.4.tgz", - "integrity": "sha512-6LFElP3A+i/Q8XQKEvZjkEWEOTgAIALR9AO2rwT8bgPhDd1anmqDJDZ6lLddI4ehxxxR1S5RIqKe1uapMQfYaQ==", - "dev": true, - "dependencies": { - "foreground-child": "^3.1.0", - "jackspeak": "^2.0.3", - "minimatch": "^9.0.1", - "minipass": "^5.0.0 || ^6.0.2 || ^7.0.0", - "path-scurry": "^1.10.1" - }, - "bin": { - "glob": "dist/cjs/src/bin.js" - }, - "engines": { - "node": ">=16 || 14 >=14.17" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" - } - }, - "node_modules/@npmcli/map-workspaces/node_modules/minimatch": { - "version": "9.0.3", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-9.0.3.tgz", - "integrity": "sha512-RHiac9mvaRw0x3AYRgDC1CxAP7HTcNrrECeA8YYJeWnpo+2Q5CegtZjaotWTWxDG3UeGA1coE05iH1mPjT/2mg==", - "dev": true, - "dependencies": { - "brace-expansion": "^2.0.1" - }, - "engines": { - "node": ">=16 || 14 >=14.17" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" - } - }, - "node_modules/@npmcli/metavuln-calculator": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/@npmcli/metavuln-calculator/-/metavuln-calculator-5.0.1.tgz", - "integrity": "sha512-qb8Q9wIIlEPj3WeA1Lba91R4ZboPL0uspzV0F9uwP+9AYMVB2zOoa7Pbk12g6D2NHAinSbHh6QYmGuRyHZ874Q==", - "dev": true, - "dependencies": { - "cacache": "^17.0.0", - "json-parse-even-better-errors": "^3.0.0", - "pacote": "^15.0.0", - "semver": "^7.3.5" - }, - "engines": { - "node": "^14.17.0 || ^16.13.0 || >=18.0.0" - } - }, - "node_modules/@npmcli/metavuln-calculator/node_modules/json-parse-even-better-errors": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/json-parse-even-better-errors/-/json-parse-even-better-errors-3.0.0.tgz", - "integrity": "sha512-iZbGHafX/59r39gPwVPRBGw0QQKnA7tte5pSMrhWOW7swGsVvVTjmfyAV9pNqk8YGT7tRCdxRu8uzcgZwoDooA==", - "dev": true, - "engines": { - "node": "^14.17.0 || ^16.13.0 || >=18.0.0" - } - }, - "node_modules/@npmcli/move-file": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/@npmcli/move-file/-/move-file-2.0.1.tgz", - "integrity": "sha512-mJd2Z5TjYWq/ttPLLGqArdtnC74J6bOzg4rMDnN+p1xTacZ2yPRCk2y0oSWQtygLR9YVQXgOcONrwtnk3JupxQ==", - "deprecated": "This functionality has been moved to @npmcli/fs", - "dev": true, - "dependencies": { - "mkdirp": "^1.0.4", - "rimraf": "^3.0.2" - }, - "engines": { - "node": "^12.13.0 || ^14.15.0 || >=16.0.0" - } - }, - "node_modules/@npmcli/move-file/node_modules/rimraf": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-3.0.2.tgz", - "integrity": "sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA==", - "dev": true, - "dependencies": { - "glob": "^7.1.3" - }, - "bin": { - "rimraf": "bin.js" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" - } - }, - "node_modules/@npmcli/name-from-folder": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/@npmcli/name-from-folder/-/name-from-folder-2.0.0.tgz", - "integrity": "sha512-pwK+BfEBZJbKdNYpHHRTNBwBoqrN/iIMO0AiGvYsp3Hoaq0WbgGSWQR6SCldZovoDpY3yje5lkFUe6gsDgJ2vg==", - "dev": true, - "engines": { - "node": "^14.17.0 || ^16.13.0 || >=18.0.0" - } - }, - "node_modules/@npmcli/node-gyp": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/@npmcli/node-gyp/-/node-gyp-3.0.0.tgz", - "integrity": "sha512-gp8pRXC2oOxu0DUE1/M3bYtb1b3/DbJ5aM113+XJBgfXdussRAsX0YOrOhdd8WvnAR6auDBvJomGAkLKA5ydxA==", - "dev": true, - "engines": { - "node": "^14.17.0 || ^16.13.0 || >=18.0.0" - } - }, - "node_modules/@npmcli/package-json": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/@npmcli/package-json/-/package-json-3.1.1.tgz", - "integrity": "sha512-+UW0UWOYFKCkvszLoTwrYGrjNrT8tI5Ckeb/h+Z1y1fsNJEctl7HmerA5j2FgmoqFaLI2gsA1X9KgMFqx/bRmA==", - "dev": true, - "dependencies": { - "@npmcli/git": "^4.1.0", - "glob": "^10.2.2", - "json-parse-even-better-errors": "^3.0.0", - "normalize-package-data": "^5.0.0", - "npm-normalize-package-bin": "^3.0.1", - "proc-log": "^3.0.0" - }, - "engines": { - "node": "^14.17.0 || ^16.13.0 || >=18.0.0" - } - }, - "node_modules/@npmcli/package-json/node_modules/brace-expansion": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz", - "integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==", - "dev": true, - "dependencies": { - "balanced-match": "^1.0.0" - } - }, - "node_modules/@npmcli/package-json/node_modules/glob": { - "version": "10.3.4", - "resolved": "https://registry.npmjs.org/glob/-/glob-10.3.4.tgz", - "integrity": "sha512-6LFElP3A+i/Q8XQKEvZjkEWEOTgAIALR9AO2rwT8bgPhDd1anmqDJDZ6lLddI4ehxxxR1S5RIqKe1uapMQfYaQ==", - "dev": true, - "dependencies": { - "foreground-child": "^3.1.0", - "jackspeak": "^2.0.3", - "minimatch": "^9.0.1", - "minipass": "^5.0.0 || ^6.0.2 || ^7.0.0", - "path-scurry": "^1.10.1" + "nx": "16.8.1", + "tslib": "^2.3.0" }, "bin": { - "glob": "dist/cjs/src/bin.js" - }, - "engines": { - "node": ">=16 || 14 >=14.17" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" - } - }, - "node_modules/@npmcli/package-json/node_modules/json-parse-even-better-errors": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/json-parse-even-better-errors/-/json-parse-even-better-errors-3.0.0.tgz", - "integrity": "sha512-iZbGHafX/59r39gPwVPRBGw0QQKnA7tte5pSMrhWOW7swGsVvVTjmfyAV9pNqk8YGT7tRCdxRu8uzcgZwoDooA==", - "dev": true, - "engines": { - "node": "^14.17.0 || ^16.13.0 || >=18.0.0" + "tao": "index.js" } }, - "node_modules/@npmcli/package-json/node_modules/minimatch": { - "version": "9.0.3", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-9.0.3.tgz", - "integrity": "sha512-RHiac9mvaRw0x3AYRgDC1CxAP7HTcNrrECeA8YYJeWnpo+2Q5CegtZjaotWTWxDG3UeGA1coE05iH1mPjT/2mg==", + "node_modules/@nx/devkit": { + "version": "16.8.1", + "resolved": "https://registry.npmjs.org/@nx/devkit/-/devkit-16.8.1.tgz", + "integrity": "sha512-I+Cg+lXk0wRz6KC9FZbWFuJWQTXAt5O3bNl9ksISmzqmEyuy72Cv+/MBHvF7o54Sq80DNw+RKWB1re5HFOsqCA==", "dev": true, "dependencies": { - "brace-expansion": "^2.0.1" - }, - "engines": { - "node": ">=16 || 14 >=14.17" + "@nrwl/devkit": "16.8.1", + "ejs": "^3.1.7", + "enquirer": "~2.3.6", + "ignore": "^5.0.4", + "semver": "7.5.3", + "tmp": "~0.2.1", + "tslib": "^2.3.0" }, - "funding": { - "url": "https://github.com/sponsors/isaacs" + "peerDependencies": { + "nx": ">= 15 <= 17" } }, - "node_modules/@npmcli/promise-spawn": { - "version": "6.0.2", - "resolved": "https://registry.npmjs.org/@npmcli/promise-spawn/-/promise-spawn-6.0.2.tgz", - "integrity": "sha512-gGq0NJkIGSwdbUt4yhdF8ZrmkGKVz9vAdVzpOfnom+V8PLSmSOVhZwbNvZZS1EYcJN5hzzKBxmmVVAInM6HQLg==", + "node_modules/@nx/devkit/node_modules/lru-cache": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz", + "integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==", "dev": true, "dependencies": { - "which": "^3.0.0" + "yallist": "^4.0.0" }, "engines": { - "node": "^14.17.0 || ^16.13.0 || >=18.0.0" + "node": ">=10" } }, - "node_modules/@npmcli/promise-spawn/node_modules/which": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/which/-/which-3.0.1.tgz", - "integrity": "sha512-XA1b62dzQzLfaEOSQFTCOd5KFf/1VSzZo7/7TUjnya6u0vGGKzU96UQBZTAThCb2j4/xjBAyii1OhRLJEivHvg==", + "node_modules/@nx/devkit/node_modules/semver": { + "version": "7.5.3", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.5.3.tgz", + "integrity": "sha512-QBlUtyVk/5EeHbi7X0fw6liDZc7BBmEaSYn01fMU1OUYbf6GPsbTtd8WmnqbI20SeycoHSeiybkE/q1Q+qlThQ==", "dev": true, "dependencies": { - "isexe": "^2.0.0" + "lru-cache": "^6.0.0" }, "bin": { - "node-which": "bin/which.js" - }, - "engines": { - "node": "^14.17.0 || ^16.13.0 || >=18.0.0" - } - }, - "node_modules/@npmcli/query": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/@npmcli/query/-/query-3.0.1.tgz", - "integrity": "sha512-0jE8iHBogf/+bFDj+ju6/UMLbJ39c8h6nSe6qile+dB7PJ0iV3gNqcb2vtt6WWCBrxv9uAjzUT/8vroluulidA==", - "dev": true, - "dependencies": { - "postcss-selector-parser": "^6.0.10" - }, - "engines": { - "node": "^14.17.0 || ^16.13.0 || >=18.0.0" - } - }, - "node_modules/@npmcli/run-script": { - "version": "4.1.7", - "resolved": "https://registry.npmjs.org/@npmcli/run-script/-/run-script-4.1.7.tgz", - "integrity": "sha512-WXr/MyM4tpKA4BotB81NccGAv8B48lNH0gRoILucbcAhTQXLCoi6HflMV3KdXubIqvP9SuLsFn68Z7r4jl+ppw==", - "dev": true, - "dependencies": { - "@npmcli/node-gyp": "^2.0.0", - "@npmcli/promise-spawn": "^3.0.0", - "node-gyp": "^9.0.0", - "read-package-json-fast": "^2.0.3", - "which": "^2.0.2" - }, - "engines": { - "node": "^12.13.0 || ^14.15.0 || >=16.0.0" - } - }, - "node_modules/@npmcli/run-script/node_modules/@npmcli/node-gyp": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/@npmcli/node-gyp/-/node-gyp-2.0.0.tgz", - "integrity": "sha512-doNI35wIe3bBaEgrlPfdJPaCpUR89pJWep4Hq3aRdh6gKazIVWfs0jHttvSSoq47ZXgC7h73kDsUl8AoIQUB+A==", - "dev": true, - "engines": { - "node": "^12.13.0 || ^14.15.0 || >=16.0.0" - } - }, - "node_modules/@npmcli/run-script/node_modules/@npmcli/promise-spawn": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/@npmcli/promise-spawn/-/promise-spawn-3.0.0.tgz", - "integrity": "sha512-s9SgS+p3a9Eohe68cSI3fi+hpcZUmXq5P7w0kMlAsWVtR7XbK3ptkZqKT2cK1zLDObJ3sR+8P59sJE0w/KTL1g==", - "dev": true, - "dependencies": { - "infer-owner": "^1.0.4" + "semver": "bin/semver.js" }, "engines": { - "node": "^12.13.0 || ^14.15.0 || >=16.0.0" + "node": ">=10" } }, - "node_modules/@npmcli/run-script/node_modules/npm-normalize-package-bin": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/npm-normalize-package-bin/-/npm-normalize-package-bin-1.0.1.tgz", - "integrity": "sha512-EPfafl6JL5/rU+ot6P3gRSCpPDW5VmIzX959Ob1+ySFUuuYHWHekXpwdUZcKP5C+DS4GEtdJluwBjnsNDl+fSA==", + "node_modules/@nx/devkit/node_modules/yallist": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", + "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==", "dev": true }, - "node_modules/@npmcli/run-script/node_modules/read-package-json-fast": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/read-package-json-fast/-/read-package-json-fast-2.0.3.tgz", - "integrity": "sha512-W/BKtbL+dUjTuRL2vziuYhp76s5HZ9qQhd/dKfWIZveD0O40453QNyZhC0e63lqZrAQ4jiOapVoeJ7JrszenQQ==", + "node_modules/@nx/nx-darwin-arm64": { + "version": "16.8.1", + "resolved": "https://registry.npmjs.org/@nx/nx-darwin-arm64/-/nx-darwin-arm64-16.8.1.tgz", + "integrity": "sha512-xOflqyIVcyLPzdJOZcucI+5ClwnTgK8zIvpjbxHokrO9McJJglhfUyP0bbTHpEpWqzA+GaPA/6/Qdu0ATzqQBQ==", + "cpu": [ + "arm64" + ], "dev": true, - "dependencies": { - "json-parse-even-better-errors": "^2.3.0", - "npm-normalize-package-bin": "^1.0.1" - }, + "optional": true, + "os": [ + "darwin" + ], "engines": { - "node": ">=10" - } - }, - "node_modules/@nrwl/cli": { - "version": "15.9.7", - "resolved": "https://registry.npmjs.org/@nrwl/cli/-/cli-15.9.7.tgz", - "integrity": "sha512-1jtHBDuJzA57My5nLzYiM372mJW0NY6rFKxlWt5a0RLsAZdPTHsd8lE3Gs9XinGC1jhXbruWmhhnKyYtZvX/zA==", - "dev": true, - "dependencies": { - "nx": "15.9.7" - } - }, - "node_modules/@nrwl/devkit": { - "version": "15.9.7", - "resolved": "https://registry.npmjs.org/@nrwl/devkit/-/devkit-15.9.7.tgz", - "integrity": "sha512-Sb7Am2TMT8AVq8e+vxOlk3AtOA2M0qCmhBzoM1OJbdHaPKc0g0UgSnWRml1kPGg5qfPk72tWclLoZJ5/ut0vTg==", - "dev": true, - "dependencies": { - "ejs": "^3.1.7", - "ignore": "^5.0.4", - "semver": "7.5.4", - "tmp": "~0.2.1", - "tslib": "^2.3.0" - }, - "peerDependencies": { - "nx": ">= 14.1 <= 16" + "node": ">= 10" } }, - "node_modules/@nrwl/nx-darwin-arm64": { - "version": "15.9.7", - "resolved": "https://registry.npmjs.org/@nrwl/nx-darwin-arm64/-/nx-darwin-arm64-15.9.7.tgz", - "integrity": "sha512-aBUgnhlkrgC0vu0fK6eb9Vob7eFnkuknrK+YzTjmLrrZwj7FGNAeyGXSlyo1dVokIzjVKjJg2saZZ0WQbfuCJw==", + "node_modules/@nx/nx-darwin-x64": { + "version": "16.8.1", + "resolved": "https://registry.npmjs.org/@nx/nx-darwin-x64/-/nx-darwin-x64-16.8.1.tgz", + "integrity": "sha512-JJGrlOvEpDMWnM6YKaA1WOnzHgiw5vRKEowX9ba+jxhmCvtdjbLSxi228kv92JtQPPQ91zvtsNM+BFY0EbPOlA==", "cpu": [ - "arm64" + "x64" ], "dev": true, "optional": true, @@ -4388,26 +3900,26 @@ "node": ">= 10" } }, - "node_modules/@nrwl/nx-darwin-x64": { - "version": "15.9.7", - "resolved": "https://registry.npmjs.org/@nrwl/nx-darwin-x64/-/nx-darwin-x64-15.9.7.tgz", - "integrity": "sha512-L+elVa34jhGf1cmn38Z0sotQatmLovxoASCIw5r1CBZZeJ5Tg7Y9nOwjRiDixZxNN56hPKXm6xl9EKlVHVeKlg==", + "node_modules/@nx/nx-freebsd-x64": { + "version": "16.8.1", + "resolved": "https://registry.npmjs.org/@nx/nx-freebsd-x64/-/nx-freebsd-x64-16.8.1.tgz", + "integrity": "sha512-aZdJQ7cIQfXOmfk4vRXvVYxuV68xz8YyhNZ0IvBfJ16uZQ+YNl4BpklRLEIdaloSbwz9M1NNewmL+AgklEBxlA==", "cpu": [ "x64" ], "dev": true, "optional": true, "os": [ - "darwin" + "freebsd" ], "engines": { "node": ">= 10" } }, - "node_modules/@nrwl/nx-linux-arm-gnueabihf": { - "version": "15.9.7", - "resolved": "https://registry.npmjs.org/@nrwl/nx-linux-arm-gnueabihf/-/nx-linux-arm-gnueabihf-15.9.7.tgz", - "integrity": "sha512-pqmfqqEUGFu6PmmHKyXyUw1Al0Ki8PSaR0+ndgCAb1qrekVDGDfznJfaqxN0JSLeolPD6+PFtLyXNr9ZyPFlFg==", + "node_modules/@nx/nx-linux-arm-gnueabihf": { + "version": "16.8.1", + "resolved": "https://registry.npmjs.org/@nx/nx-linux-arm-gnueabihf/-/nx-linux-arm-gnueabihf-16.8.1.tgz", + "integrity": "sha512-JzjrTf7FFgikoVUbRs0hKvwHRR6SyqT4yIdk/YyiCt2mWY9w4m5DWtHM/9kJzhckkH9MY66m+X/zG6+NKsEMvg==", "cpu": [ "arm" ], @@ -4420,10 +3932,10 @@ "node": ">= 10" } }, - "node_modules/@nrwl/nx-linux-arm64-gnu": { - "version": "15.9.7", - "resolved": "https://registry.npmjs.org/@nrwl/nx-linux-arm64-gnu/-/nx-linux-arm64-gnu-15.9.7.tgz", - "integrity": "sha512-NYOa/eRrqmM+In5g3M0rrPVIS9Z+q6fvwXJYf/KrjOHqqan/KL+2TOfroA30UhcBrwghZvib7O++7gZ2hzwOnA==", + "node_modules/@nx/nx-linux-arm64-gnu": { + "version": "16.8.1", + "resolved": "https://registry.npmjs.org/@nx/nx-linux-arm64-gnu/-/nx-linux-arm64-gnu-16.8.1.tgz", + "integrity": "sha512-CF0s981myBWusW7iW2+fKPa7ceYYe+NO5EdKe9l27fpHDkcA71KZU3q7U823QpO/7tYvVdBevJp3CCn2/GBURQ==", "cpu": [ "arm64" ], @@ -4436,10 +3948,10 @@ "node": ">= 10" } }, - "node_modules/@nrwl/nx-linux-arm64-musl": { - "version": "15.9.7", - "resolved": "https://registry.npmjs.org/@nrwl/nx-linux-arm64-musl/-/nx-linux-arm64-musl-15.9.7.tgz", - "integrity": "sha512-zyStqjEcmbvLbejdTOrLUSEdhnxNtdQXlmOuymznCzYUEGRv+4f7OAepD3yRoR0a/57SSORZmmGQB7XHZoYZJA==", + "node_modules/@nx/nx-linux-arm64-musl": { + "version": "16.8.1", + "resolved": "https://registry.npmjs.org/@nx/nx-linux-arm64-musl/-/nx-linux-arm64-musl-16.8.1.tgz", + "integrity": "sha512-X4TobxRt1dALvoeKC3/t1CqZCMUqtEhGG+KQLT/51sG54HdxmTAWRFlvj8PvLH0QSBk4e+uRZAo45qpt3iSnBg==", "cpu": [ "arm64" ], @@ -4452,10 +3964,10 @@ "node": ">= 10" } }, - "node_modules/@nrwl/nx-linux-x64-gnu": { - "version": "15.9.7", - "resolved": "https://registry.npmjs.org/@nrwl/nx-linux-x64-gnu/-/nx-linux-x64-gnu-15.9.7.tgz", - "integrity": "sha512-saNK5i2A8pKO3Il+Ejk/KStTApUpWgCxjeUz9G+T8A+QHeDloZYH2c7pU/P3jA9QoNeKwjVO9wYQllPL9loeVg==", + "node_modules/@nx/nx-linux-x64-gnu": { + "version": "16.8.1", + "resolved": "https://registry.npmjs.org/@nx/nx-linux-x64-gnu/-/nx-linux-x64-gnu-16.8.1.tgz", + "integrity": "sha512-lHvv2FD14Lpxh7muMLStH2tC1opQOaepO4nXwb1LaaoIpMym7kBgCK8AQuI98/oNQiMDXMNDKWQZCjxnJGDIPw==", "cpu": [ "x64" ], @@ -4468,10 +3980,10 @@ "node": ">= 10" } }, - "node_modules/@nrwl/nx-linux-x64-musl": { - "version": "15.9.7", - "resolved": "https://registry.npmjs.org/@nrwl/nx-linux-x64-musl/-/nx-linux-x64-musl-15.9.7.tgz", - "integrity": "sha512-extIUThYN94m4Vj4iZggt6hhMZWQSukBCo8pp91JHnDcryBg7SnYmnikwtY1ZAFyyRiNFBLCKNIDFGkKkSrZ9Q==", + "node_modules/@nx/nx-linux-x64-musl": { + "version": "16.8.1", + "resolved": "https://registry.npmjs.org/@nx/nx-linux-x64-musl/-/nx-linux-x64-musl-16.8.1.tgz", + "integrity": "sha512-c4gQvNgIjggD1A5sYhftQEC1PtAhV3sEnv60X00v9wmjl57Wj4Ty0TgyzpYglLysVRiko/B58S8NYS0jKvMmeA==", "cpu": [ "x64" ], @@ -4484,10 +3996,10 @@ "node": ">= 10" } }, - "node_modules/@nrwl/nx-win32-arm64-msvc": { - "version": "15.9.7", - "resolved": "https://registry.npmjs.org/@nrwl/nx-win32-arm64-msvc/-/nx-win32-arm64-msvc-15.9.7.tgz", - "integrity": "sha512-GSQ54hJ5AAnKZb4KP4cmBnJ1oC4ILxnrG1mekxeM65c1RtWg9NpBwZ8E0gU3xNrTv8ZNsBeKi/9UhXBxhsIh8A==", + "node_modules/@nx/nx-win32-arm64-msvc": { + "version": "16.8.1", + "resolved": "https://registry.npmjs.org/@nx/nx-win32-arm64-msvc/-/nx-win32-arm64-msvc-16.8.1.tgz", + "integrity": "sha512-GKHPy/MyGFoV9cdKgcWLZZK2vDdxt5bQ53ss0k+BDKRP+YwLKm7tJl23eeM7JdB4GLCBntEQPC+dBqxOA8Ze/w==", "cpu": [ "arm64" ], @@ -4500,10 +4012,10 @@ "node": ">= 10" } }, - "node_modules/@nrwl/nx-win32-x64-msvc": { - "version": "15.9.7", - "resolved": "https://registry.npmjs.org/@nrwl/nx-win32-x64-msvc/-/nx-win32-x64-msvc-15.9.7.tgz", - "integrity": "sha512-x6URof79RPd8AlapVbPefUD3ynJZpmah3tYaYZ9xZRMXojVtEHV8Qh5vysKXQ1rNYJiiB8Ah6evSKWLbAH60tw==", + "node_modules/@nx/nx-win32-x64-msvc": { + "version": "16.8.1", + "resolved": "https://registry.npmjs.org/@nx/nx-win32-x64-msvc/-/nx-win32-x64-msvc-16.8.1.tgz", + "integrity": "sha512-yHZ5FAcx54rVc31R0yIpniepkHMPwaxG23l8E/ZYbL1iPwE/Wc1HeUzUvxUuSXtguRp7ihcRhaUEPkcSl2EAVw==", "cpu": [ "x64" ], @@ -4516,18 +4028,6 @@ "node": ">= 10" } }, - "node_modules/@nrwl/tao": { - "version": "15.9.7", - "resolved": "https://registry.npmjs.org/@nrwl/tao/-/tao-15.9.7.tgz", - "integrity": "sha512-OBnHNvQf3vBH0qh9YnvBQQWyyFZ+PWguF6dJ8+1vyQYlrLVk/XZ8nJ4ukWFb+QfPv/O8VBmqaofaOI9aFC4yTw==", - "dev": true, - "dependencies": { - "nx": "15.9.7" - }, - "bin": { - "tao": "index.js" - } - }, "node_modules/@octokit/auth-token": { "version": "3.0.4", "resolved": "https://registry.npmjs.org/@octokit/auth-token/-/auth-token-3.0.4.tgz", @@ -4596,12 +4096,13 @@ "dev": true }, "node_modules/@octokit/plugin-paginate-rest": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/@octokit/plugin-paginate-rest/-/plugin-paginate-rest-3.1.0.tgz", - "integrity": "sha512-+cfc40pMzWcLkoDcLb1KXqjX0jTGYXjKuQdFQDc6UAknISJHnZTiBqld6HDwRJvD4DsouDKrWXNbNV0lE/3AXA==", + "version": "6.1.2", + "resolved": "https://registry.npmjs.org/@octokit/plugin-paginate-rest/-/plugin-paginate-rest-6.1.2.tgz", + "integrity": "sha512-qhrmtQeHU/IivxucOV1bbI/xZyC/iOBhclokv7Sut5vnejAIAEXVcGQeRpQlU39E0WwK9lNvJHphHri/DB6lbQ==", "dev": true, "dependencies": { - "@octokit/types": "^6.41.0" + "@octokit/tsconfig": "^1.0.2", + "@octokit/types": "^9.2.3" }, "engines": { "node": ">= 14" @@ -4610,21 +4111,6 @@ "@octokit/core": ">=4" } }, - "node_modules/@octokit/plugin-paginate-rest/node_modules/@octokit/openapi-types": { - "version": "12.11.0", - "resolved": "https://registry.npmjs.org/@octokit/openapi-types/-/openapi-types-12.11.0.tgz", - "integrity": "sha512-VsXyi8peyRq9PqIz/tpqiL2w3w80OgVMwBHltTml3LmVvXiphgeqmY9mvBw9Wu7e0QWk/fqD37ux8yP5uVekyQ==", - "dev": true - }, - "node_modules/@octokit/plugin-paginate-rest/node_modules/@octokit/types": { - "version": "6.41.0", - "resolved": "https://registry.npmjs.org/@octokit/types/-/types-6.41.0.tgz", - "integrity": "sha512-eJ2jbzjdijiL3B4PrSQaSjuF2sPEQPVCPzBvTHJD9Nz+9dw2SGH4K4xeQJ77YfTq5bRQ+bD8wT11JbeDPmxmGg==", - "dev": true, - "dependencies": { - "@octokit/openapi-types": "^12.11.0" - } - }, "node_modules/@octokit/plugin-request-log": { "version": "1.0.4", "resolved": "https://registry.npmjs.org/@octokit/plugin-request-log/-/plugin-request-log-1.0.4.tgz", @@ -4635,13 +4121,12 @@ } }, "node_modules/@octokit/plugin-rest-endpoint-methods": { - "version": "6.8.1", - "resolved": "https://registry.npmjs.org/@octokit/plugin-rest-endpoint-methods/-/plugin-rest-endpoint-methods-6.8.1.tgz", - "integrity": "sha512-QrlaTm8Lyc/TbU7BL/8bO49vp+RZ6W3McxxmmQTgYxf2sWkO8ZKuj4dLhPNJD6VCUW1hetCmeIM0m6FTVpDiEg==", + "version": "7.2.3", + "resolved": "https://registry.npmjs.org/@octokit/plugin-rest-endpoint-methods/-/plugin-rest-endpoint-methods-7.2.3.tgz", + "integrity": "sha512-I5Gml6kTAkzVlN7KCtjOM+Ruwe/rQppp0QU372K1GP7kNOYEKe8Xn5BW4sE62JAHdwpq95OQK/qGNyKQMUzVgA==", "dev": true, "dependencies": { - "@octokit/types": "^8.1.1", - "deprecation": "^2.3.1" + "@octokit/types": "^10.0.0" }, "engines": { "node": ">= 14" @@ -4650,19 +4135,13 @@ "@octokit/core": ">=3" } }, - "node_modules/@octokit/plugin-rest-endpoint-methods/node_modules/@octokit/openapi-types": { - "version": "14.0.0", - "resolved": "https://registry.npmjs.org/@octokit/openapi-types/-/openapi-types-14.0.0.tgz", - "integrity": "sha512-HNWisMYlR8VCnNurDU6os2ikx0s0VyEjDYHNS/h4cgb8DeOxQ0n72HyinUtdDVxJhFy3FWLGl0DJhfEWk3P5Iw==", - "dev": true - }, "node_modules/@octokit/plugin-rest-endpoint-methods/node_modules/@octokit/types": { - "version": "8.2.1", - "resolved": "https://registry.npmjs.org/@octokit/types/-/types-8.2.1.tgz", - "integrity": "sha512-8oWMUji8be66q2B9PmEIUyQm00VPDPun07umUWSaCwxmeaquFBro4Hcc3ruVoDo3zkQyZBlRvhIMEYS3pBhanw==", + "version": "10.0.0", + "resolved": "https://registry.npmjs.org/@octokit/types/-/types-10.0.0.tgz", + "integrity": "sha512-Vm8IddVmhCgU1fxC1eyinpwqzXPEYu0NrYzD3YZjlGjyftdLBTeqNblRC0jmJmgxbJIsQlyogVeGnrNaaMVzIg==", "dev": true, "dependencies": { - "@octokit/openapi-types": "^14.0.0" + "@octokit/openapi-types": "^18.0.0" } }, "node_modules/@octokit/request": { @@ -4697,20 +4176,26 @@ } }, "node_modules/@octokit/rest": { - "version": "19.0.3", - "resolved": "https://registry.npmjs.org/@octokit/rest/-/rest-19.0.3.tgz", - "integrity": "sha512-5arkTsnnRT7/sbI4fqgSJ35KiFaN7zQm0uQiQtivNQLI8RQx8EHwJCajcTUwmaCMNDg7tdCvqAnc7uvHHPxrtQ==", + "version": "19.0.11", + "resolved": "https://registry.npmjs.org/@octokit/rest/-/rest-19.0.11.tgz", + "integrity": "sha512-m2a9VhaP5/tUw8FwfnW2ICXlXpLPIqxtg3XcAiGMLj/Xhw3RSBfZ8le/466ktO1Gcjr8oXudGnHhxV1TXJgFxw==", "dev": true, "dependencies": { - "@octokit/core": "^4.0.0", - "@octokit/plugin-paginate-rest": "^3.0.0", + "@octokit/core": "^4.2.1", + "@octokit/plugin-paginate-rest": "^6.1.2", "@octokit/plugin-request-log": "^1.0.4", - "@octokit/plugin-rest-endpoint-methods": "^6.0.0" + "@octokit/plugin-rest-endpoint-methods": "^7.1.2" }, "engines": { "node": ">= 14" } }, + "node_modules/@octokit/tsconfig": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/@octokit/tsconfig/-/tsconfig-1.0.2.tgz", + "integrity": "sha512-I0vDR0rdtP8p2lGMzvsJzbhdOWy405HcGovrspJ8RRibHnyRgggUSNO5AIox5LmqiwmatHKYsvj6VGFHkqS7lA==", + "dev": true + }, "node_modules/@octokit/types": { "version": "9.3.2", "resolved": "https://registry.npmjs.org/@octokit/types/-/types-9.3.2.tgz", @@ -4748,6 +4233,56 @@ "node": ">=14" } }, + "node_modules/@pkgr/utils": { + "version": "2.4.2", + "resolved": "https://registry.npmjs.org/@pkgr/utils/-/utils-2.4.2.tgz", + "integrity": "sha512-POgTXhjrTfbTV63DiFXav4lBHiICLKKwDeaKn9Nphwj7WH6m0hMMCaJkMyRWjgtPFyRKRVoMXXjczsTQRDEhYw==", + "dev": true, + "dependencies": { + "cross-spawn": "^7.0.3", + "fast-glob": "^3.3.0", + "is-glob": "^4.0.3", + "open": "^9.1.0", + "picocolors": "^1.0.0", + "tslib": "^2.6.0" + }, + "engines": { + "node": "^12.20.0 || ^14.18.0 || >=16.0.0" + }, + "funding": { + "url": "https://opencollective.com/unts" + } + }, + "node_modules/@pkgr/utils/node_modules/define-lazy-prop": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/define-lazy-prop/-/define-lazy-prop-3.0.0.tgz", + "integrity": "sha512-N+MeXYoqr3pOgn8xfyRPREN7gHakLYjhsHhWGT3fWAiL4IkAt0iDw14QiiEm2bE30c5XX5q0FtAA3CK5f9/BUg==", + "dev": true, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/@pkgr/utils/node_modules/open": { + "version": "9.1.0", + "resolved": "https://registry.npmjs.org/open/-/open-9.1.0.tgz", + "integrity": "sha512-OS+QTnw1/4vrf+9hh1jc1jnYjzSG4ttTBB8UxOwAnInG3Uo4ssetzC1ihqaIHjLJnA5GGlRl6QlZXOTQhRBUvg==", + "dev": true, + "dependencies": { + "default-browser": "^4.0.0", + "define-lazy-prop": "^3.0.0", + "is-inside-container": "^1.0.0", + "is-wsl": "^2.2.0" + }, + "engines": { + "node": ">=14.16" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/@sigstore/bundle": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/@sigstore/bundle/-/bundle-1.1.0.tgz", @@ -5168,15 +4703,15 @@ } }, "node_modules/@smithy/signature-v4": { - "version": "2.0.7", - "resolved": "https://registry.npmjs.org/@smithy/signature-v4/-/signature-v4-2.0.7.tgz", - "integrity": "sha512-qNCJpyhRWxT5RWmeSo/Zv+miQ60Y/D2JmPdFw7v2WpPVxVK7JDpqUbvq0QYE+dBGPX/uagAkE3NvJUcn0fTE3A==", + "version": "2.0.8", + "resolved": "https://registry.npmjs.org/@smithy/signature-v4/-/signature-v4-2.0.8.tgz", + "integrity": "sha512-qrtiYMzaLlQ5HSJOaFwnyTQ3JLjmPY+3+pr9IBDpCVM6YtVj22cBLVB9bPOiZMIpkdI7ZRdxLBFlIjh5CO1Bhw==", "dependencies": { - "@smithy/eventstream-codec": "^2.0.7", + "@smithy/eventstream-codec": "^2.0.8", "@smithy/is-array-buffer": "^2.0.0", - "@smithy/types": "^2.3.1", + "@smithy/types": "^2.3.2", "@smithy/util-hex-encoding": "^2.0.0", - "@smithy/util-middleware": "^2.0.0", + "@smithy/util-middleware": "^2.0.1", "@smithy/util-uri-escape": "^2.0.0", "@smithy/util-utf8": "^2.0.0", "tslib": "^2.5.0" @@ -5482,9 +5017,9 @@ "dev": true }, "node_modules/@types/babel__core": { - "version": "7.20.1", - "resolved": "https://registry.npmjs.org/@types/babel__core/-/babel__core-7.20.1.tgz", - "integrity": "sha512-aACu/U/omhdk15O4Nfb+fHgH/z3QsfQzpnvRZhYhThms83ZnAOZz7zZAWO7mn2yyNQaA4xTO8GLK3uqFU4bYYw==", + "version": "7.20.2", + "resolved": "https://registry.npmjs.org/@types/babel__core/-/babel__core-7.20.2.tgz", + "integrity": "sha512-pNpr1T1xLUc2l3xJKuPtsEky3ybxN3m4fJkknfIpTCTfIZCDW57oAg+EfCgIIp2rvCe0Wn++/FfodDS4YXxBwA==", "dev": true, "dependencies": { "@babel/parser": "^7.20.7", @@ -5495,18 +5030,18 @@ } }, "node_modules/@types/babel__generator": { - "version": "7.6.4", - "resolved": "https://registry.npmjs.org/@types/babel__generator/-/babel__generator-7.6.4.tgz", - "integrity": "sha512-tFkciB9j2K755yrTALxD44McOrk+gfpIpvC3sxHjRawj6PfnQxrse4Clq5y/Rq+G3mrBurMax/lG8Qn2t9mSsg==", + "version": "7.6.5", + "resolved": "https://registry.npmjs.org/@types/babel__generator/-/babel__generator-7.6.5.tgz", + "integrity": "sha512-h9yIuWbJKdOPLJTbmSpPzkF67e659PbQDba7ifWm5BJ8xTv+sDmS7rFmywkWOvXedGTivCdeGSIIX8WLcRTz8w==", "dev": true, "dependencies": { "@babel/types": "^7.0.0" } }, "node_modules/@types/babel__template": { - "version": "7.4.1", - "resolved": "https://registry.npmjs.org/@types/babel__template/-/babel__template-7.4.1.tgz", - "integrity": "sha512-azBFKemX6kMg5Io+/rdGT0dkGreboUVR0Cdm3fz9QJWpaQGJRQXl7C+6hOTCZcMll7KFyEQpgbYI2lHdsS4U7g==", + "version": "7.4.2", + "resolved": "https://registry.npmjs.org/@types/babel__template/-/babel__template-7.4.2.tgz", + "integrity": "sha512-/AVzPICMhMOMYoSx9MoKpGDKdBRsIXMNByh1PXSZoa+v6ZoLa8xxtsT/uLQ/NJm0XVAWl/BvId4MlDeXJaeIZQ==", "dev": true, "dependencies": { "@babel/parser": "^7.1.0", @@ -5514,9 +5049,9 @@ } }, "node_modules/@types/babel__traverse": { - "version": "7.20.1", - "resolved": "https://registry.npmjs.org/@types/babel__traverse/-/babel__traverse-7.20.1.tgz", - "integrity": "sha512-MitHFXnhtgwsGZWtT68URpOvLN4EREih1u3QtQiN4VdAxWKRVvGCSvw/Qth0M0Qq3pJpnGOu5JaM/ydK7OGbqg==", + "version": "7.20.2", + "resolved": "https://registry.npmjs.org/@types/babel__traverse/-/babel__traverse-7.20.2.tgz", + "integrity": "sha512-ojlGK1Hsfce93J0+kn3H5R73elidKUaZonirN33GSmgTUMpzI/MIFfSpF3haANe3G1bEBS9/9/QEqwTzwqFsKw==", "dev": true, "dependencies": { "@babel/types": "^7.20.7" @@ -5619,9 +5154,9 @@ "dev": true }, "node_modules/@types/node": { - "version": "18.17.16", - "resolved": "https://registry.npmjs.org/@types/node/-/node-18.17.16.tgz", - "integrity": "sha512-e0zgs7qe1XH/X3KEPnldfkD07LH9O1B9T31U8qoO7lqGSjj3/IrBuvqMeJ1aYejXRK3KOphIUDw6pLIplEW17A==" + "version": "20.6.1", + "resolved": "https://registry.npmjs.org/@types/node/-/node-20.6.1.tgz", + "integrity": "sha512-4LcJvuXQlv4lTHnxwyHQZ3uR9Zw2j7m1C9DfuwoTFQQP4Pmu04O6IfLYgMmHoOCt0nosItLLZAH+sOrRE0Bo8g==" }, "node_modules/@types/normalize-package-data": { "version": "2.4.1", @@ -5629,12 +5164,6 @@ "integrity": "sha512-Gj7cI7z+98M282Tqmp2K5EIsoouUEzbBJhQQzDE3jSIRk6r9gsz0oUokqIUR4u1R3dMHo0pDHM7sNOHyhulypw==", "dev": true }, - "node_modules/@types/parse-json": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/@types/parse-json/-/parse-json-4.0.0.tgz", - "integrity": "sha512-//oorEZjL6sbPcKUaCdIGlIUeH26mgzimjBB77G6XRgnDl/L5wOnpyBGRe/Mmf5CVW3PwEBE1NjiMZ/ssFh4wA==", - "dev": true - }, "node_modules/@types/promise-retry": { "version": "1.1.3", "resolved": "https://registry.npmjs.org/@types/promise-retry/-/promise-retry-1.1.3.tgz", @@ -5699,32 +5228,33 @@ "dev": true }, "node_modules/@typescript-eslint/eslint-plugin": { - "version": "5.62.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-5.62.0.tgz", - "integrity": "sha512-TiZzBSJja/LbhNPvk6yc0JrX9XqhQ0hdh6M2svYfsHGejaKFIAGd9MQ+ERIMzLGlN/kZoYIgdxFV0PuljTKXag==", + "version": "6.7.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-6.7.0.tgz", + "integrity": "sha512-gUqtknHm0TDs1LhY12K2NA3Rmlmp88jK9Tx8vGZMfHeNMLE3GH2e9TRub+y+SOjuYgtOmok+wt1AyDPZqxbNag==", "dev": true, "dependencies": { - "@eslint-community/regexpp": "^4.4.0", - "@typescript-eslint/scope-manager": "5.62.0", - "@typescript-eslint/type-utils": "5.62.0", - "@typescript-eslint/utils": "5.62.0", + "@eslint-community/regexpp": "^4.5.1", + "@typescript-eslint/scope-manager": "6.7.0", + "@typescript-eslint/type-utils": "6.7.0", + "@typescript-eslint/utils": "6.7.0", + "@typescript-eslint/visitor-keys": "6.7.0", "debug": "^4.3.4", "graphemer": "^1.4.0", - "ignore": "^5.2.0", - "natural-compare-lite": "^1.4.0", - "semver": "^7.3.7", - "tsutils": "^3.21.0" + "ignore": "^5.2.4", + "natural-compare": "^1.4.0", + "semver": "^7.5.4", + "ts-api-utils": "^1.0.1" }, "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + "node": "^16.0.0 || >=18.0.0" }, "funding": { "type": "opencollective", "url": "https://opencollective.com/typescript-eslint" }, "peerDependencies": { - "@typescript-eslint/parser": "^5.0.0", - "eslint": "^6.0.0 || ^7.0.0 || ^8.0.0" + "@typescript-eslint/parser": "^6.0.0 || ^6.0.0-alpha", + "eslint": "^7.0.0 || ^8.0.0" }, "peerDependenciesMeta": { "typescript": { @@ -5733,25 +5263,26 @@ } }, "node_modules/@typescript-eslint/parser": { - "version": "5.62.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-5.62.0.tgz", - "integrity": "sha512-VlJEV0fOQ7BExOsHYAGrgbEiZoi8D+Bl2+f6V2RrXerRSylnp+ZBHmPvaIa8cz0Ajx7WO7Z5RqfgYg7ED1nRhA==", + "version": "6.7.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-6.7.0.tgz", + "integrity": "sha512-jZKYwqNpNm5kzPVP5z1JXAuxjtl2uG+5NpaMocFPTNC2EdYIgbXIPImObOkhbONxtFTTdoZstLZefbaK+wXZng==", "dev": true, "dependencies": { - "@typescript-eslint/scope-manager": "5.62.0", - "@typescript-eslint/types": "5.62.0", - "@typescript-eslint/typescript-estree": "5.62.0", + "@typescript-eslint/scope-manager": "6.7.0", + "@typescript-eslint/types": "6.7.0", + "@typescript-eslint/typescript-estree": "6.7.0", + "@typescript-eslint/visitor-keys": "6.7.0", "debug": "^4.3.4" }, "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + "node": "^16.0.0 || >=18.0.0" }, "funding": { "type": "opencollective", "url": "https://opencollective.com/typescript-eslint" }, "peerDependencies": { - "eslint": "^6.0.0 || ^7.0.0 || ^8.0.0" + "eslint": "^7.0.0 || ^8.0.0" }, "peerDependenciesMeta": { "typescript": { @@ -5760,16 +5291,16 @@ } }, "node_modules/@typescript-eslint/scope-manager": { - "version": "5.62.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-5.62.0.tgz", - "integrity": "sha512-VXuvVvZeQCQb5Zgf4HAxc04q5j+WrNAtNh9OwCsCgpKqESMTu3tF/jhZ3xG6T4NZwWl65Bg8KuS2uEvhSfLl0w==", + "version": "6.7.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-6.7.0.tgz", + "integrity": "sha512-lAT1Uau20lQyjoLUQ5FUMSX/dS07qux9rYd5FGzKz/Kf8W8ccuvMyldb8hadHdK/qOI7aikvQWqulnEq2nCEYA==", "dev": true, "dependencies": { - "@typescript-eslint/types": "5.62.0", - "@typescript-eslint/visitor-keys": "5.62.0" + "@typescript-eslint/types": "6.7.0", + "@typescript-eslint/visitor-keys": "6.7.0" }, "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + "node": "^16.0.0 || >=18.0.0" }, "funding": { "type": "opencollective", @@ -5777,25 +5308,25 @@ } }, "node_modules/@typescript-eslint/type-utils": { - "version": "5.62.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-5.62.0.tgz", - "integrity": "sha512-xsSQreu+VnfbqQpW5vnCJdq1Z3Q0U31qiWmRhr98ONQmcp/yhiPJFPq8MXiJVLiksmOKSjIldZzkebzHuCGzew==", + "version": "6.7.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-6.7.0.tgz", + "integrity": "sha512-f/QabJgDAlpSz3qduCyQT0Fw7hHpmhOzY/Rv6zO3yO+HVIdPfIWhrQoAyG+uZVtWAIS85zAyzgAFfyEr+MgBpg==", "dev": true, "dependencies": { - "@typescript-eslint/typescript-estree": "5.62.0", - "@typescript-eslint/utils": "5.62.0", + "@typescript-eslint/typescript-estree": "6.7.0", + "@typescript-eslint/utils": "6.7.0", "debug": "^4.3.4", - "tsutils": "^3.21.0" + "ts-api-utils": "^1.0.1" }, "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + "node": "^16.0.0 || >=18.0.0" }, "funding": { "type": "opencollective", "url": "https://opencollective.com/typescript-eslint" }, "peerDependencies": { - "eslint": "*" + "eslint": "^7.0.0 || ^8.0.0" }, "peerDependenciesMeta": { "typescript": { @@ -5804,12 +5335,12 @@ } }, "node_modules/@typescript-eslint/types": { - "version": "5.62.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-5.62.0.tgz", - "integrity": "sha512-87NVngcbVXUahrRTqIK27gD2t5Cu1yuCXxbLcFtCzZGlfyVWWh8mLHkoxzjsB6DDNnvdL+fW8MiwPEJyGJQDgQ==", + "version": "6.7.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-6.7.0.tgz", + "integrity": "sha512-ihPfvOp7pOcN/ysoj0RpBPOx3HQTJTrIN8UZK+WFd3/iDeFHHqeyYxa4hQk4rMhsz9H9mXpR61IzwlBVGXtl9Q==", "dev": true, "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + "node": "^16.0.0 || >=18.0.0" }, "funding": { "type": "opencollective", @@ -5817,21 +5348,21 @@ } }, "node_modules/@typescript-eslint/typescript-estree": { - "version": "5.62.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-5.62.0.tgz", - "integrity": "sha512-CmcQ6uY7b9y694lKdRB8FEel7JbU/40iSAPomu++SjLMntB+2Leay2LO6i8VnJk58MtE9/nQSFIH6jpyRWyYzA==", + "version": "6.7.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-6.7.0.tgz", + "integrity": "sha512-dPvkXj3n6e9yd/0LfojNU8VMUGHWiLuBZvbM6V6QYD+2qxqInE7J+J/ieY2iGwR9ivf/R/haWGkIj04WVUeiSQ==", "dev": true, "dependencies": { - "@typescript-eslint/types": "5.62.0", - "@typescript-eslint/visitor-keys": "5.62.0", + "@typescript-eslint/types": "6.7.0", + "@typescript-eslint/visitor-keys": "6.7.0", "debug": "^4.3.4", "globby": "^11.1.0", "is-glob": "^4.0.3", - "semver": "^7.3.7", - "tsutils": "^3.21.0" + "semver": "^7.5.4", + "ts-api-utils": "^1.0.1" }, "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + "node": "^16.0.0 || >=18.0.0" }, "funding": { "type": "opencollective", @@ -5844,42 +5375,41 @@ } }, "node_modules/@typescript-eslint/utils": { - "version": "5.62.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-5.62.0.tgz", - "integrity": "sha512-n8oxjeb5aIbPFEtmQxQYOLI0i9n5ySBEY/ZEHHZqKQSFnxio1rv6dthascc9dLuwrL0RC5mPCxB7vnAVGAYWAQ==", + "version": "6.7.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-6.7.0.tgz", + "integrity": "sha512-MfCq3cM0vh2slSikQYqK2Gq52gvOhe57vD2RM3V4gQRZYX4rDPnKLu5p6cm89+LJiGlwEXU8hkYxhqqEC/V3qA==", "dev": true, "dependencies": { - "@eslint-community/eslint-utils": "^4.2.0", - "@types/json-schema": "^7.0.9", - "@types/semver": "^7.3.12", - "@typescript-eslint/scope-manager": "5.62.0", - "@typescript-eslint/types": "5.62.0", - "@typescript-eslint/typescript-estree": "5.62.0", - "eslint-scope": "^5.1.1", - "semver": "^7.3.7" + "@eslint-community/eslint-utils": "^4.4.0", + "@types/json-schema": "^7.0.12", + "@types/semver": "^7.5.0", + "@typescript-eslint/scope-manager": "6.7.0", + "@typescript-eslint/types": "6.7.0", + "@typescript-eslint/typescript-estree": "6.7.0", + "semver": "^7.5.4" }, "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + "node": "^16.0.0 || >=18.0.0" }, "funding": { "type": "opencollective", "url": "https://opencollective.com/typescript-eslint" }, "peerDependencies": { - "eslint": "^6.0.0 || ^7.0.0 || ^8.0.0" + "eslint": "^7.0.0 || ^8.0.0" } }, "node_modules/@typescript-eslint/visitor-keys": { - "version": "5.62.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-5.62.0.tgz", - "integrity": "sha512-07ny+LHRzQXepkGg6w0mFY41fVUNBrL2Roj/++7V1txKugfjm/Ci/qSND03r2RhlJhJYMcTn9AhhSSqQp0Ysyw==", + "version": "6.7.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-6.7.0.tgz", + "integrity": "sha512-/C1RVgKFDmGMcVGeD8HjKv2bd72oI1KxQDeY8uc66gw9R0OK0eMq48cA+jv9/2Ag6cdrsUGySm1yzYmfz0hxwQ==", "dev": true, "dependencies": { - "@typescript-eslint/types": "5.62.0", - "eslint-visitor-keys": "^3.3.0" + "@typescript-eslint/types": "6.7.0", + "eslint-visitor-keys": "^3.4.1" }, "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + "node": "^16.0.0 || >=18.0.0" }, "funding": { "type": "opencollective", @@ -5940,25 +5470,10 @@ } }, "node_modules/abbrev": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/abbrev/-/abbrev-2.0.0.tgz", - "integrity": "sha512-6/mh1E2u2YgEsCHdY0Yx5oW+61gZU+1vXaoiHHrpKeuRNNgFvS+/jrwHiQhB5apAf5oB7UB7E19ol2R2LKH8hQ==", - "dev": true, - "engines": { - "node": "^14.17.0 || ^16.13.0 || >=18.0.0" - } - }, - "node_modules/abort-controller": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/abort-controller/-/abort-controller-3.0.0.tgz", - "integrity": "sha512-h8lQ8tacZYnR3vNQTgibj+tODHI5/+l06Au2Pcriv/Gmet0eaj4TwWH41sO9wnHDiQsEj19q0drzdWdeAHtweg==", - "dev": true, - "dependencies": { - "event-target-shim": "^5.0.0" - }, - "engines": { - "node": ">=6.5" - } + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/abbrev/-/abbrev-1.1.1.tgz", + "integrity": "sha512-nne9/IiQ/hzIhY6pdDnbBtz7DjPTKrY00P/zvPSm5pOFkl6xuGrGnXn/VtTNNfNtAfZ9/1RtehkszU9qcTii0Q==", + "dev": true }, "node_modules/acorn": { "version": "8.10.0", @@ -6323,15 +5838,6 @@ "integrity": "sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q==", "dev": true }, - "node_modules/at-least-node": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/at-least-node/-/at-least-node-1.0.0.tgz", - "integrity": "sha512-+q/t7Ekv1EDY2l6Gda6LLiX14rU9TV20Wa3ofeQmwPFZbOMo9DXrLbOjFaaclkXKWidIaopwAObQDqwWtGUjqg==", - "dev": true, - "engines": { - "node": ">= 4.0.0" - } - }, "node_modules/atomic-batcher": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/atomic-batcher/-/atomic-batcher-1.0.2.tgz", @@ -6350,9 +5856,9 @@ } }, "node_modules/aws-cdk": { - "version": "2.96.1", - "resolved": "https://registry.npmjs.org/aws-cdk/-/aws-cdk-2.96.1.tgz", - "integrity": "sha512-dCMriGZj2w6/B5+bu45knQM9QmPpDoUMiGCzsxALsOJVu/Fr5QwvmHxRBTc48uaVAOlYN2qQsAcG5H6TXtBJhg==", + "version": "2.96.2", + "resolved": "https://registry.npmjs.org/aws-cdk/-/aws-cdk-2.96.2.tgz", + "integrity": "sha512-13ERpPV99OFAD75PLOtl0rRMXTWn6bCrmUPwYKkLwIMkj2xWCBiwo2Y9Qg+UzEszm5NMHA1N4ichSvuZ0mt2IQ==", "bin": { "cdk": "bin/cdk" }, @@ -6364,9 +5870,9 @@ } }, "node_modules/aws-cdk-lib": { - "version": "2.96.1", - "resolved": "https://registry.npmjs.org/aws-cdk-lib/-/aws-cdk-lib-2.96.1.tgz", - "integrity": "sha512-7jo7btYghU0OCx9BUi/CmEL967Udc3PNm45uBxn6P2ipvhuYSLkJj0toNiln8uPmMKdTzZPH2r22kX+7N9NzQw==", + "version": "2.96.2", + "resolved": "https://registry.npmjs.org/aws-cdk-lib/-/aws-cdk-lib-2.96.2.tgz", + "integrity": "sha512-wDAdPUfNlteLQKrapd5c7hNYHWPzHmFfuMSrddFCajjoscsnd0LeUxM2yAzwJV7vLNp00q2SgUZqRQHcN98dmg==", "bundleDependencies": [ "@balena/dockerignore", "case", @@ -6704,9 +6210,9 @@ } }, "node_modules/aws-sdk": { - "version": "2.1458.0", - "resolved": "https://registry.npmjs.org/aws-sdk/-/aws-sdk-2.1458.0.tgz", - "integrity": "sha512-FpUjBpPzRm7l0kQeMAWD8VRySpAOO8WVY3pfOd74w7wKO/CZ7RVsiqM1aiw8ybiVZ3lFnCw84VtRvssYk865TA==", + "version": "2.1459.0", + "resolved": "https://registry.npmjs.org/aws-sdk/-/aws-sdk-2.1459.0.tgz", + "integrity": "sha512-My45PgQYhRTh6fOeZ94ELUoXzza/6gTy0J22aK4iy0DEA+uE5gjr1VthnIwbLYNMeEqn8xwJZuNJqvi/WaUUcQ==", "dev": true, "dependencies": { "buffer": "4.9.2", @@ -6933,29 +6439,6 @@ "node": "^12.13.0 || ^14.15.0 || ^16.10.0 || >=17.0.0" } }, - "node_modules/aws-sdk/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==", - "dev": true, - "dependencies": { - "base64-js": "^1.0.2", - "ieee754": "^1.1.4", - "isarray": "^1.0.0" - } - }, - "node_modules/aws-sdk/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==", - "dev": true - }, - "node_modules/aws-sdk/node_modules/isarray": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", - "integrity": "sha512-VLghIWNM6ELQzo7zwmcg0NmTVyWKYjvIeM83yjp0wRDTmUnrM678fQbcKBo6n2CJEF0szoG//ytg+TKla89ALQ==", - "dev": true - }, "node_modules/aws-sdk/node_modules/uuid": { "version": "8.0.0", "resolved": "https://registry.npmjs.org/uuid/-/uuid-8.0.0.tgz", @@ -7108,94 +6591,44 @@ "@babel/core": "^7.0.0" } }, - "node_modules/balanced-match": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz", - "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==", - "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==", - "dev": true, - "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/before-after-hook": { - "version": "2.2.3", - "resolved": "https://registry.npmjs.org/before-after-hook/-/before-after-hook-2.2.3.tgz", - "integrity": "sha512-NzUnlZexiaH/46WDhANlyR2bXRopNg4F/zuSA3OpZnllCUgRaOF2znDioDWrmbNVsuZk6l9pMquQB38cfBZwkQ==", - "dev": true - }, - "node_modules/bin-links": { - "version": "4.0.2", - "resolved": "https://registry.npmjs.org/bin-links/-/bin-links-4.0.2.tgz", - "integrity": "sha512-jxJ0PbXR8eQyPlExCvCs3JFnikvs1Yp4gUJt6nmgathdOwvur+q22KWC3h20gvWl4T/14DXKj2IlkJwwZkZPOw==", - "dev": true, - "dependencies": { - "cmd-shim": "^6.0.0", - "npm-normalize-package-bin": "^3.0.0", - "read-cmd-shim": "^4.0.0", - "write-file-atomic": "^5.0.0" - }, - "engines": { - "node": "^14.17.0 || ^16.13.0 || >=18.0.0" - } - }, - "node_modules/bin-links/node_modules/cmd-shim": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/cmd-shim/-/cmd-shim-6.0.1.tgz", - "integrity": "sha512-S9iI9y0nKR4hwEQsVWpyxld/6kRfGepGfzff83FcaiEBpmvlbA2nnGe7Cylgrx2f/p1P5S5wpRm9oL8z1PbS3Q==", - "dev": true, - "engines": { - "node": "^14.17.0 || ^16.13.0 || >=18.0.0" - } - }, - "node_modules/bin-links/node_modules/read-cmd-shim": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/read-cmd-shim/-/read-cmd-shim-4.0.0.tgz", - "integrity": "sha512-yILWifhaSEEytfXI76kB9xEEiG1AiozaCJZ83A87ytjRiN+jVibXjedjCRNjoZviinhG+4UkalO3mWTd8u5O0Q==", - "dev": true, - "engines": { - "node": "^14.17.0 || ^16.13.0 || >=18.0.0" - } - }, - "node_modules/bin-links/node_modules/signal-exit": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-4.1.0.tgz", - "integrity": "sha512-bzyZ1e88w9O1iNJbKnOlvYTrWPDl46O1bG0D3XInv+9tkPrxrN8jUUTiFlDkkmKWgn1M6CfIA13SuGqOa9Korw==", - "dev": true, - "engines": { - "node": ">=14" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" - } - }, - "node_modules/bin-links/node_modules/write-file-atomic": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/write-file-atomic/-/write-file-atomic-5.0.1.tgz", - "integrity": "sha512-+QU2zd6OTD8XWIJCbffaiQeH9U73qIqafo1x6V1snCWYGJf6cVE0cDR4D8xRzcEnfI21IFrUPzPGtcPf8AC+Rw==", + "node_modules/balanced-match": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz", + "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==" + }, + "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==", + "dev": true, + "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/before-after-hook": { + "version": "2.2.3", + "resolved": "https://registry.npmjs.org/before-after-hook/-/before-after-hook-2.2.3.tgz", + "integrity": "sha512-NzUnlZexiaH/46WDhANlyR2bXRopNg4F/zuSA3OpZnllCUgRaOF2znDioDWrmbNVsuZk6l9pMquQB38cfBZwkQ==", + "dev": true + }, + "node_modules/big-integer": { + "version": "1.6.51", + "resolved": "https://registry.npmjs.org/big-integer/-/big-integer-1.6.51.tgz", + "integrity": "sha512-GPEid2Y9QU1Exl1rpO9B2IPJGHPSupF5GnVIP0blYvNOMer2bTvSWs1jGOUg04hTmu67nmLsQ9TBo1puaotBHg==", "dev": true, - "dependencies": { - "imurmurhash": "^0.1.4", - "signal-exit": "^4.0.1" - }, "engines": { - "node": "^14.17.0 || ^16.13.0 || >=18.0.0" + "node": ">=0.6" } }, "node_modules/bl": { @@ -7209,16 +6642,51 @@ "readable-stream": "^3.4.0" } }, + "node_modules/bl/node_modules/buffer": { + "version": "5.7.1", + "resolved": "https://registry.npmjs.org/buffer/-/buffer-5.7.1.tgz", + "integrity": "sha512-EHcyIPBQ4BSGlvjB16k5KgAJ27CIsHY/2JBmCRReo48y9rQ3MaUzWX3KVlBa4U7MyX02HdVj0K7C3WaB3ju7FQ==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ], + "dependencies": { + "base64-js": "^1.3.1", + "ieee754": "^1.1.13" + } + }, "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/bplist-parser": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/bplist-parser/-/bplist-parser-0.2.0.tgz", + "integrity": "sha512-z0M+byMThzQmD9NILRniCUXYsYpjwnlO8N5uCFaCqIOpqRsJCrQL9NK3JsD67CN5a08nF5oIL2bD6loTdHOuKw==", + "dev": true, + "dependencies": { + "big-integer": "^1.6.44" + }, + "engines": { + "node": ">= 5.10.0" + } + }, "node_modules/brace-expansion": { "version": "1.1.11", "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", - "dev": true, "dependencies": { "balanced-match": "^1.0.0", "concat-map": "0.0.1" @@ -7290,27 +6758,14 @@ } }, "node_modules/buffer": { - "version": "5.7.1", - "resolved": "https://registry.npmjs.org/buffer/-/buffer-5.7.1.tgz", - "integrity": "sha512-EHcyIPBQ4BSGlvjB16k5KgAJ27CIsHY/2JBmCRReo48y9rQ3MaUzWX3KVlBa4U7MyX02HdVj0K7C3WaB3ju7FQ==", + "version": "4.9.2", + "resolved": "https://registry.npmjs.org/buffer/-/buffer-4.9.2.tgz", + "integrity": "sha512-xq+q3SRMOxGivLhBNaUdC64hDTQwejJ+H0T/NB1XMtTVEwNTrfFF3gAxiyW0Bu/xWEGhjVKgUcMhCrUy2+uCWg==", "dev": true, - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/feross" - }, - { - "type": "patreon", - "url": "https://www.patreon.com/feross" - }, - { - "type": "consulting", - "url": "https://feross.org/support" - } - ], "dependencies": { - "base64-js": "^1.3.1", - "ieee754": "^1.1.13" + "base64-js": "^1.0.2", + "ieee754": "^1.1.4", + "isarray": "^1.0.0" } }, "node_modules/buffer-from": { @@ -7327,13 +6782,28 @@ "semver": "^7.0.0" } }, + "node_modules/bundle-name": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/bundle-name/-/bundle-name-3.0.0.tgz", + "integrity": "sha512-PKA4BeSvBpQKQ8iPOGCSiell+N8P+Tf1DlwqmYhpe2gAhKPHn8EYOxVT+ShuGmhg8lN8XiSlS80yiExKXrURlw==", + "dev": true, + "dependencies": { + "run-applescript": "^5.0.0" + }, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/byte-size": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/byte-size/-/byte-size-7.0.0.tgz", - "integrity": "sha512-NNiBxKgxybMBtWdmvx7ZITJi4ZG+CYUgwOSZTfqB1qogkRHrhbQE/R2r5Fh94X+InN5MCYz6SvB/ejHMj/HbsQ==", + "version": "8.1.1", + "resolved": "https://registry.npmjs.org/byte-size/-/byte-size-8.1.1.tgz", + "integrity": "sha512-tUkzZWK0M/qdoLEqikxBWe4kumyuwjl3HO6zHTr4yEI23EojPtLYXdG1+AQY7MN0cGyNDvEaJ8wiYQm6P2bPxg==", "dev": true, "engines": { - "node": ">=10" + "node": ">=12.17" } }, "node_modules/cacache": { @@ -7766,15 +7236,12 @@ } }, "node_modules/cmd-shim": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/cmd-shim/-/cmd-shim-5.0.0.tgz", - "integrity": "sha512-qkCtZ59BidfEwHltnJwkyVZn+XQojdAySM1D1gSeh11Z4pW1Kpolkyo53L5noc0nrxmIvyFwTmJRo4xs7FFLPw==", + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/cmd-shim/-/cmd-shim-6.0.1.tgz", + "integrity": "sha512-S9iI9y0nKR4hwEQsVWpyxld/6kRfGepGfzff83FcaiEBpmvlbA2nnGe7Cylgrx2f/p1P5S5wpRm9oL8z1PbS3Q==", "dev": true, - "dependencies": { - "mkdirp-infer-owner": "^2.0.0" - }, "engines": { - "node": "^12.13.0 || ^14.15.0 || >=16.0.0" + "node": "^14.17.0 || ^16.13.0 || >=18.0.0" } }, "node_modules/co": { @@ -7860,12 +7327,6 @@ "node": ">=16" } }, - "node_modules/common-ancestor-path": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/common-ancestor-path/-/common-ancestor-path-1.0.1.tgz", - "integrity": "sha512-L3sHRo1pXXEqX8VU28kfgUY+YGsk09hPqZiZmLacNib6XNTCM8ubYeT7ryXQw8asB1sKgcU5lkB7ONug08aB8w==", - "dev": true - }, "node_modules/compare-func": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/compare-func/-/compare-func-2.0.0.tgz", @@ -7876,23 +7337,10 @@ "dot-prop": "^5.1.0" } }, - "node_modules/compare-func/node_modules/dot-prop": { - "version": "5.3.0", - "resolved": "https://registry.npmjs.org/dot-prop/-/dot-prop-5.3.0.tgz", - "integrity": "sha512-QM8q3zDe58hqUqjraQOmzZ1LIH9SWQJTlEKCH4kJ2oQvLZk7RbQXvtDM2XEq3fwkV9CCvvH4LA0AV+ogFsBM2Q==", - "dev": true, - "dependencies": { - "is-obj": "^2.0.0" - }, - "engines": { - "node": ">=8" - } - }, "node_modules/concat-map": { "version": "0.0.1", "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", - "integrity": "sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==", - "dev": true + "integrity": "sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==" }, "node_modules/concat-stream": { "version": "2.0.0", @@ -7909,16 +7357,6 @@ "typedarray": "^0.0.6" } }, - "node_modules/config-chain": { - "version": "1.1.12", - "resolved": "https://registry.npmjs.org/config-chain/-/config-chain-1.1.12.tgz", - "integrity": "sha512-a1eOIcu8+7lUInge4Rpf/n4Krkf3Dd9lqhljRzII1/Zno/kRtUWnznPO3jOKBmTEktkt3fkxisUcivoj0ebzoA==", - "dev": true, - "dependencies": { - "ini": "^1.3.4", - "proto-list": "~1.2.1" - } - }, "node_modules/console-control-strings": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/console-control-strings/-/console-control-strings-1.1.0.tgz", @@ -7934,182 +7372,119 @@ } }, "node_modules/conventional-changelog-angular": { - "version": "5.0.12", - "resolved": "https://registry.npmjs.org/conventional-changelog-angular/-/conventional-changelog-angular-5.0.12.tgz", - "integrity": "sha512-5GLsbnkR/7A89RyHLvvoExbiGbd9xKdKqDTrArnPbOqBqG/2wIosu0fHwpeIRI8Tl94MhVNBXcLJZl92ZQ5USw==", + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/conventional-changelog-angular/-/conventional-changelog-angular-6.0.0.tgz", + "integrity": "sha512-6qLgrBF4gueoC7AFVHu51nHL9pF9FRjXrH+ceVf7WmAfH3gs+gEYOkvxhjMPjZu57I4AGUGoNTY8V7Hrgf1uqg==", "dev": true, "dependencies": { - "compare-func": "^2.0.0", - "q": "^1.5.1" + "compare-func": "^2.0.0" }, "engines": { - "node": ">=10" + "node": ">=14" } }, "node_modules/conventional-changelog-core": { - "version": "4.2.4", - "resolved": "https://registry.npmjs.org/conventional-changelog-core/-/conventional-changelog-core-4.2.4.tgz", - "integrity": "sha512-gDVS+zVJHE2v4SLc6B0sLsPiloR0ygU7HaDW14aNJE1v4SlqJPILPl/aJC7YdtRE4CybBf8gDwObBvKha8Xlyg==", + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/conventional-changelog-core/-/conventional-changelog-core-5.0.1.tgz", + "integrity": "sha512-Rvi5pH+LvgsqGwZPZ3Cq/tz4ty7mjijhr3qR4m9IBXNbxGGYgTVVO+duXzz9aArmHxFtwZ+LRkrNIMDQzgoY4A==", "dev": true, "dependencies": { "add-stream": "^1.0.0", - "conventional-changelog-writer": "^5.0.0", - "conventional-commits-parser": "^3.2.0", - "dateformat": "^3.0.0", - "get-pkg-repo": "^4.0.0", - "git-raw-commits": "^2.0.8", + "conventional-changelog-writer": "^6.0.0", + "conventional-commits-parser": "^4.0.0", + "dateformat": "^3.0.3", + "get-pkg-repo": "^4.2.1", + "git-raw-commits": "^3.0.0", "git-remote-origin-url": "^2.0.0", - "git-semver-tags": "^4.1.1", - "lodash": "^4.17.15", - "normalize-package-data": "^3.0.0", - "q": "^1.5.1", + "git-semver-tags": "^5.0.0", + "normalize-package-data": "^3.0.3", "read-pkg": "^3.0.0", - "read-pkg-up": "^3.0.0", - "through2": "^4.0.0" - }, - "engines": { - "node": ">=10" - } - }, - "node_modules/conventional-changelog-core/node_modules/hosted-git-info": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-4.1.0.tgz", - "integrity": "sha512-kyCuEOWjJqZuDbRHzL8V93NzQhwIB71oFWSyzVo+KPZI+pnQPPxucdkrOZvkLRnrf5URsQM+IJ09Dw29cRALIA==", - "dev": true, - "dependencies": { - "lru-cache": "^6.0.0" - }, - "engines": { - "node": ">=10" - } - }, - "node_modules/conventional-changelog-core/node_modules/lru-cache": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz", - "integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==", - "dev": true, - "dependencies": { - "yallist": "^4.0.0" - }, - "engines": { - "node": ">=10" - } - }, - "node_modules/conventional-changelog-core/node_modules/normalize-package-data": { - "version": "3.0.3", - "resolved": "https://registry.npmjs.org/normalize-package-data/-/normalize-package-data-3.0.3.tgz", - "integrity": "sha512-p2W1sgqij3zMMyRC067Dg16bfzVH+w7hyegmpIvZ4JNjqtGOVAIvLmjBx3yP7YTe9vKJgkoNOPjwQGogDoMXFA==", - "dev": true, - "dependencies": { - "hosted-git-info": "^4.0.1", - "is-core-module": "^2.5.0", - "semver": "^7.3.4", - "validate-npm-package-license": "^3.0.1" + "read-pkg-up": "^3.0.0" }, "engines": { - "node": ">=10" + "node": ">=14" } }, - "node_modules/conventional-changelog-core/node_modules/yallist": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", - "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==", - "dev": true - }, "node_modules/conventional-changelog-preset-loader": { - "version": "2.3.4", - "resolved": "https://registry.npmjs.org/conventional-changelog-preset-loader/-/conventional-changelog-preset-loader-2.3.4.tgz", - "integrity": "sha512-GEKRWkrSAZeTq5+YjUZOYxdHq+ci4dNwHvpaBC3+ENalzFWuCWa9EZXSuZBpkr72sMdKB+1fyDV4takK1Lf58g==", + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/conventional-changelog-preset-loader/-/conventional-changelog-preset-loader-3.0.0.tgz", + "integrity": "sha512-qy9XbdSLmVnwnvzEisjxdDiLA4OmV3o8db+Zdg4WiFw14fP3B6XNz98X0swPPpkTd/pc1K7+adKgEDM1JCUMiA==", "dev": true, "engines": { - "node": ">=10" + "node": ">=14" } }, "node_modules/conventional-changelog-writer": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/conventional-changelog-writer/-/conventional-changelog-writer-5.0.1.tgz", - "integrity": "sha512-5WsuKUfxW7suLblAbFnxAcrvf6r+0b7GvNaWUwUIk0bXMnENP/PEieGKVUQrjPqwPT4o3EPAASBXiY6iHooLOQ==", + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/conventional-changelog-writer/-/conventional-changelog-writer-6.0.1.tgz", + "integrity": "sha512-359t9aHorPw+U+nHzUXHS5ZnPBOizRxfQsWT5ZDHBfvfxQOAik+yfuhKXG66CN5LEWPpMNnIMHUTCKeYNprvHQ==", "dev": true, "dependencies": { - "conventional-commits-filter": "^2.0.7", - "dateformat": "^3.0.0", + "conventional-commits-filter": "^3.0.0", + "dateformat": "^3.0.3", "handlebars": "^4.7.7", "json-stringify-safe": "^5.0.1", - "lodash": "^4.17.15", - "meow": "^8.0.0", - "semver": "^6.0.0", - "split": "^1.0.0", - "through2": "^4.0.0" + "meow": "^8.1.2", + "semver": "^7.0.0", + "split": "^1.0.1" }, "bin": { "conventional-changelog-writer": "cli.js" }, "engines": { - "node": ">=10" - } - }, - "node_modules/conventional-changelog-writer/node_modules/semver": { - "version": "6.3.1", - "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.1.tgz", - "integrity": "sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==", - "dev": true, - "bin": { - "semver": "bin/semver.js" + "node": ">=14" } }, "node_modules/conventional-commits-filter": { - "version": "2.0.7", - "resolved": "https://registry.npmjs.org/conventional-commits-filter/-/conventional-commits-filter-2.0.7.tgz", - "integrity": "sha512-ASS9SamOP4TbCClsRHxIHXRfcGCnIoQqkvAzCSbZzTFLfcTqJVugB0agRgsEELsqaeWgsXv513eS116wnlSSPA==", + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/conventional-commits-filter/-/conventional-commits-filter-3.0.0.tgz", + "integrity": "sha512-1ymej8b5LouPx9Ox0Dw/qAO2dVdfpRFq28e5Y0jJEU8ZrLdy0vOSkkIInwmxErFGhg6SALro60ZrwYFVTUDo4Q==", "dev": true, "dependencies": { "lodash.ismatch": "^4.4.0", - "modify-values": "^1.0.0" + "modify-values": "^1.0.1" }, "engines": { - "node": ">=10" + "node": ">=14" } }, "node_modules/conventional-commits-parser": { - "version": "3.2.4", - "resolved": "https://registry.npmjs.org/conventional-commits-parser/-/conventional-commits-parser-3.2.4.tgz", - "integrity": "sha512-nK7sAtfi+QXbxHCYfhpZsfRtaitZLIA6889kFIouLvz6repszQDgxBu7wf2WbU+Dco7sAnNCJYERCwt54WPC2Q==", + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/conventional-commits-parser/-/conventional-commits-parser-4.0.0.tgz", + "integrity": "sha512-WRv5j1FsVM5FISJkoYMR6tPk07fkKT0UodruX4je86V4owk451yjXAKzKAPOs9l7y59E2viHUS9eQ+dfUA9NSg==", "dev": true, "dependencies": { "is-text-path": "^1.0.1", - "JSONStream": "^1.0.4", - "lodash": "^4.17.15", - "meow": "^8.0.0", - "split2": "^3.0.0", - "through2": "^4.0.0" + "JSONStream": "^1.3.5", + "meow": "^8.1.2", + "split2": "^3.2.2" }, "bin": { "conventional-commits-parser": "cli.js" }, "engines": { - "node": ">=10" + "node": ">=14" } }, "node_modules/conventional-recommended-bump": { - "version": "6.1.0", - "resolved": "https://registry.npmjs.org/conventional-recommended-bump/-/conventional-recommended-bump-6.1.0.tgz", - "integrity": "sha512-uiApbSiNGM/kkdL9GTOLAqC4hbptObFo4wW2QRyHsKciGAfQuLU1ShZ1BIVI/+K2BE/W1AWYQMCXAsv4dyKPaw==", + "version": "7.0.1", + "resolved": "https://registry.npmjs.org/conventional-recommended-bump/-/conventional-recommended-bump-7.0.1.tgz", + "integrity": "sha512-Ft79FF4SlOFvX4PkwFDRnaNiIVX7YbmqGU0RwccUaiGvgp3S0a8ipR2/Qxk31vclDNM+GSdJOVs2KrsUCjblVA==", "dev": true, "dependencies": { "concat-stream": "^2.0.0", - "conventional-changelog-preset-loader": "^2.3.4", - "conventional-commits-filter": "^2.0.7", - "conventional-commits-parser": "^3.2.0", - "git-raw-commits": "^2.0.8", - "git-semver-tags": "^4.1.1", - "meow": "^8.0.0", - "q": "^1.5.1" + "conventional-changelog-preset-loader": "^3.0.0", + "conventional-commits-filter": "^3.0.0", + "conventional-commits-parser": "^4.0.0", + "git-raw-commits": "^3.0.0", + "git-semver-tags": "^5.0.0", + "meow": "^8.1.2" }, "bin": { "conventional-recommended-bump": "cli.js" }, "engines": { - "node": ">=10" + "node": ">=14" } }, "node_modules/convert-source-map": { @@ -8125,28 +7500,29 @@ "dev": true }, "node_modules/cosmiconfig": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/cosmiconfig/-/cosmiconfig-7.0.0.tgz", - "integrity": "sha512-pondGvTuVYDk++upghXJabWzL6Kxu6f26ljFw64Swq9v6sQPUL3EUlVDV56diOjpCayKihL6hVe8exIACU4XcA==", + "version": "8.3.6", + "resolved": "https://registry.npmjs.org/cosmiconfig/-/cosmiconfig-8.3.6.tgz", + "integrity": "sha512-kcZ6+W5QzcJ3P1Mt+83OUv/oHFqZHIx8DuxG6eZ5RGMERoLqp4BuGjhHLYGK+Kf5XVkQvqBSmAy/nGWN3qDgEA==", "dev": true, "dependencies": { - "@types/parse-json": "^4.0.0", - "import-fresh": "^3.2.1", - "parse-json": "^5.0.0", - "path-type": "^4.0.0", - "yaml": "^1.10.0" + "import-fresh": "^3.3.0", + "js-yaml": "^4.1.0", + "parse-json": "^5.2.0", + "path-type": "^4.0.0" }, "engines": { - "node": ">=10" - } - }, - "node_modules/cosmiconfig/node_modules/yaml": { - "version": "1.10.2", - "resolved": "https://registry.npmjs.org/yaml/-/yaml-1.10.2.tgz", - "integrity": "sha512-r3vXyErRCYJ7wg28yvBY5VSoAF8ZvlcW9/BwUzEtUsjvX/DKs24dIkuwjtuprwJJHsbyUbLApepYTR1BN4uHrg==", - "dev": true, - "engines": { - "node": ">= 6" + "node": ">=14" + }, + "funding": { + "url": "https://github.com/sponsors/d-fischer" + }, + "peerDependencies": { + "typescript": ">=4.9.5" + }, + "peerDependenciesMeta": { + "typescript": { + "optional": true + } } }, "node_modules/create-jest": { @@ -8177,38 +7553,17 @@ "dev": true }, "node_modules/cross-spawn": { - "version": "7.0.3", - "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.3.tgz", - "integrity": "sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w==", - "dev": true, - "dependencies": { - "path-key": "^3.1.0", - "shebang-command": "^2.0.0", - "which": "^2.0.1" - }, - "engines": { - "node": ">= 8" - } - }, - "node_modules/crypto-random-string": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/crypto-random-string/-/crypto-random-string-2.0.0.tgz", - "integrity": "sha512-v1plID3y9r/lPhviJ1wrXpLeyUIGAZ2SHNYTEapm7/8A9nLPoyvVp3RK/EPFqn5kEznyWgYZNsRtYYIWbuG8KA==", - "dev": true, - "engines": { - "node": ">=8" - } - }, - "node_modules/cssesc": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/cssesc/-/cssesc-3.0.0.tgz", - "integrity": "sha512-/Tb/JcjK111nNScGob5MNtsntNM1aCNUDipB/TkwZFhyDrrE47SOx/18wF2bbjgc3ZzCSKW1T5nt5EbFoAz/Vg==", + "version": "7.0.3", + "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.3.tgz", + "integrity": "sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w==", "dev": true, - "bin": { - "cssesc": "bin/cssesc" + "dependencies": { + "path-key": "^3.1.0", + "shebang-command": "^2.0.0", + "which": "^2.0.1" }, "engines": { - "node": ">=4" + "node": ">= 8" } }, "node_modules/dargs": { @@ -8309,6 +7664,150 @@ "node": ">=0.10.0" } }, + "node_modules/default-browser": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/default-browser/-/default-browser-4.0.0.tgz", + "integrity": "sha512-wX5pXO1+BrhMkSbROFsyxUm0i/cJEScyNhA4PPxc41ICuv05ZZB/MX28s8aZx6xjmatvebIapF6hLEKEcpneUA==", + "dev": true, + "dependencies": { + "bundle-name": "^3.0.0", + "default-browser-id": "^3.0.0", + "execa": "^7.1.1", + "titleize": "^3.0.0" + }, + "engines": { + "node": ">=14.16" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/default-browser-id": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/default-browser-id/-/default-browser-id-3.0.0.tgz", + "integrity": "sha512-OZ1y3y0SqSICtE8DE4S8YOE9UZOJ8wO16fKWVP5J1Qz42kV9jcnMVFrEE/noXb/ss3Q4pZIH79kxofzyNNtUNA==", + "dev": true, + "dependencies": { + "bplist-parser": "^0.2.0", + "untildify": "^4.0.0" + }, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/default-browser/node_modules/execa": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/execa/-/execa-7.2.0.tgz", + "integrity": "sha512-UduyVP7TLB5IcAQl+OzLyLcS/l32W/GLg+AhHJ+ow40FOk2U3SAllPwR44v4vmdFwIWqpdwxxpQbF1n5ta9seA==", + "dev": true, + "dependencies": { + "cross-spawn": "^7.0.3", + "get-stream": "^6.0.1", + "human-signals": "^4.3.0", + "is-stream": "^3.0.0", + "merge-stream": "^2.0.0", + "npm-run-path": "^5.1.0", + "onetime": "^6.0.0", + "signal-exit": "^3.0.7", + "strip-final-newline": "^3.0.0" + }, + "engines": { + "node": "^14.18.0 || ^16.14.0 || >=18.0.0" + }, + "funding": { + "url": "https://github.com/sindresorhus/execa?sponsor=1" + } + }, + "node_modules/default-browser/node_modules/human-signals": { + "version": "4.3.1", + "resolved": "https://registry.npmjs.org/human-signals/-/human-signals-4.3.1.tgz", + "integrity": "sha512-nZXjEF2nbo7lIw3mgYjItAfgQXog3OjJogSbKa2CQIIvSGWcKgeJnQlNXip6NglNzYH45nSRiEVimMvYL8DDqQ==", + "dev": true, + "engines": { + "node": ">=14.18.0" + } + }, + "node_modules/default-browser/node_modules/is-stream": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-3.0.0.tgz", + "integrity": "sha512-LnQR4bZ9IADDRSkvpqMGvt/tEJWclzklNgSw48V5EAaAeDd6qGvN8ei6k5p0tvxSR171VmGyHuTiAOfxAbr8kA==", + "dev": true, + "engines": { + "node": "^12.20.0 || ^14.13.1 || >=16.0.0" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/default-browser/node_modules/mimic-fn": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/mimic-fn/-/mimic-fn-4.0.0.tgz", + "integrity": "sha512-vqiC06CuhBTUdZH+RYl8sFrL096vA45Ok5ISO6sE/Mr1jRbGH4Csnhi8f3wKVl7x8mO4Au7Ir9D3Oyv1VYMFJw==", + "dev": true, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/default-browser/node_modules/npm-run-path": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/npm-run-path/-/npm-run-path-5.1.0.tgz", + "integrity": "sha512-sJOdmRGrY2sjNTRMbSvluQqg+8X7ZK61yvzBEIDhz4f8z1TZFYABsqjjCBd/0PUNE9M6QDgHJXQkGUEm7Q+l9Q==", + "dev": true, + "dependencies": { + "path-key": "^4.0.0" + }, + "engines": { + "node": "^12.20.0 || ^14.13.1 || >=16.0.0" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/default-browser/node_modules/onetime": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/onetime/-/onetime-6.0.0.tgz", + "integrity": "sha512-1FlR+gjXK7X+AsAHso35MnyN5KqGwJRi/31ft6x0M194ht7S+rWAvd7PHss9xSKMzE0asv1pyIHaJYq+BbacAQ==", + "dev": true, + "dependencies": { + "mimic-fn": "^4.0.0" + }, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/default-browser/node_modules/path-key": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/path-key/-/path-key-4.0.0.tgz", + "integrity": "sha512-haREypq7xkM7ErfgIyA0z+Bj4AGKlMSdlQE2jvJo6huWD1EdkKYV+G/T4nq0YEF2vgTT8kqMFKo1uHn950r4SQ==", + "dev": true, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/default-browser/node_modules/strip-final-newline": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/strip-final-newline/-/strip-final-newline-3.0.0.tgz", + "integrity": "sha512-dOESqjYr96iWYylGObzd39EuNTa5VJxyvVAEm5Jnh7KGo75V43Hk1odPQkNDyXNmUR6k+gEiDVXnjB8HJ3crXw==", + "dev": true, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/defaults": { "version": "1.0.4", "resolved": "https://registry.npmjs.org/defaults/-/defaults-1.0.4.tgz", @@ -8361,43 +7860,6 @@ "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/del": { - "version": "6.1.1", - "resolved": "https://registry.npmjs.org/del/-/del-6.1.1.tgz", - "integrity": "sha512-ua8BhapfP0JUJKC/zV9yHHDW/rDoDxP4Zhn3AkA6/xT6gY7jYXJiaeyBZznYVujhZZET+UgcbZiQ7sN3WqcImg==", - "dev": true, - "dependencies": { - "globby": "^11.0.1", - "graceful-fs": "^4.2.4", - "is-glob": "^4.0.1", - "is-path-cwd": "^2.2.0", - "is-path-inside": "^3.0.2", - "p-map": "^4.0.0", - "rimraf": "^3.0.2", - "slash": "^3.0.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/del/node_modules/rimraf": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-3.0.2.tgz", - "integrity": "sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA==", - "dev": true, - "dependencies": { - "glob": "^7.1.3" - }, - "bin": { - "rimraf": "bin.js" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" - } - }, "node_modules/delayed-stream": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz", @@ -8438,9 +7900,9 @@ } }, "node_modules/diff": { - "version": "4.0.2", - "resolved": "https://registry.npmjs.org/diff/-/diff-4.0.2.tgz", - "integrity": "sha512-58lmxKSA4BNyLz+HHMUzlOEpg09FV+ev6ZMe3vJihgdxzgcwZ8VoEEPmALCZG9LmqfVoNMMKpttIYTVG6uDY7A==", + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/diff/-/diff-5.1.0.tgz", + "integrity": "sha512-D+mk+qE8VC/PAUrlAU34N+VfXev0ghe5ywmpqrawphmVZc1bEfn56uo9qpyGp1p4xpzOHkSW4ztBd6L7Xx4ACw==", "dev": true, "engines": { "node": ">=0.3.1" @@ -8484,27 +7946,36 @@ } }, "node_modules/dot-prop": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/dot-prop/-/dot-prop-6.0.1.tgz", - "integrity": "sha512-tE7ztYzXHIeyvc7N+hR3oi7FIbf/NIjVP9hmAt3yMXzrQ072/fpjGLx2GxNxGxUl5V73MEqYzioOMoVhGMJ5cA==", + "version": "5.3.0", + "resolved": "https://registry.npmjs.org/dot-prop/-/dot-prop-5.3.0.tgz", + "integrity": "sha512-QM8q3zDe58hqUqjraQOmzZ1LIH9SWQJTlEKCH4kJ2oQvLZk7RbQXvtDM2XEq3fwkV9CCvvH4LA0AV+ogFsBM2Q==", "dev": true, "dependencies": { "is-obj": "^2.0.0" }, "engines": { - "node": ">=10" + "node": ">=8" + } + }, + "node_modules/dotenv": { + "version": "16.3.1", + "resolved": "https://registry.npmjs.org/dotenv/-/dotenv-16.3.1.tgz", + "integrity": "sha512-IPzF4w4/Rd94bA9imS68tZBaYyBWSCE47V1RGuMrB94iyTOIEwRmVL2x/4An+6mETpLrKJ5hQkB8W4kFAadeIQ==", + "dev": true, + "engines": { + "node": ">=12" }, "funding": { - "url": "https://github.com/sponsors/sindresorhus" + "url": "https://github.com/motdotla/dotenv?sponsor=1" } }, - "node_modules/dotenv": { + "node_modules/dotenv-expand": { "version": "10.0.0", - "resolved": "https://registry.npmjs.org/dotenv/-/dotenv-10.0.0.tgz", - "integrity": "sha512-rlBi9d8jpv9Sf1klPjNfFAuWDjKLwTIJJ/VxtoTwIR6hnZxcEOQCZg2oIL3MWBYw5GpUDKOEnND7LXTbIpQ03Q==", + "resolved": "https://registry.npmjs.org/dotenv-expand/-/dotenv-expand-10.0.0.tgz", + "integrity": "sha512-GopVGCpVS1UKH75VKHGuQFqS1Gusej0z4FyQkPdwjil2gNIv+LNsqBlboOzpJFZKVT95GkCyWJbBSdFEFUWI2A==", "dev": true, "engines": { - "node": ">=10" + "node": ">=12" } }, "node_modules/duplexer": { @@ -8535,9 +8006,9 @@ } }, "node_modules/electron-to-chromium": { - "version": "1.4.522", - "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.4.522.tgz", - "integrity": "sha512-KGKjcafTpOxda0kqwQ72M0tDmX6RsGhUJTy0Hr7slt0+CgHh9Oex8JdjY9Og68dUkTLUlBOJC0A5W5Mw3QSGCg==", + "version": "1.4.523", + "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.4.523.tgz", + "integrity": "sha512-9AreocSUWnzNtvLcbpng6N+GkXnCcBR80IQkxRC9Dfdyg4gaWNUPBujAHUpKkiUkoSoR9UlhA4zD/IgBklmhzg==", "dev": true }, "node_modules/emitter-listener": { @@ -9008,52 +8479,35 @@ } }, "node_modules/eslint-plugin-prettier": { - "version": "4.2.1", - "resolved": "https://registry.npmjs.org/eslint-plugin-prettier/-/eslint-plugin-prettier-4.2.1.tgz", - "integrity": "sha512-f/0rXLXUt0oFYs8ra4w49wYZBG5GKZpAYsJSm6rnYL5uVDjd+zowwMwVZHnAjf4edNrKpCDYfXDgmRE/Ak7QyQ==", + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/eslint-plugin-prettier/-/eslint-plugin-prettier-5.0.0.tgz", + "integrity": "sha512-AgaZCVuYDXHUGxj/ZGu1u8H8CYgDY3iG6w5kUFw4AzMVXzB7VvbKgYR4nATIN+OvUrghMbiDLeimVjVY5ilq3w==", "dev": true, "dependencies": { - "prettier-linter-helpers": "^1.0.0" + "prettier-linter-helpers": "^1.0.0", + "synckit": "^0.8.5" }, "engines": { - "node": ">=12.0.0" + "node": "^14.18.0 || >=16.0.0" + }, + "funding": { + "url": "https://opencollective.com/prettier" }, "peerDependencies": { - "eslint": ">=7.28.0", - "prettier": ">=2.0.0" + "@types/eslint": ">=8.0.0", + "eslint": ">=8.0.0", + "prettier": ">=3.0.0" }, "peerDependenciesMeta": { + "@types/eslint": { + "optional": true + }, "eslint-config-prettier": { "optional": true } } }, "node_modules/eslint-scope": { - "version": "5.1.1", - "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-5.1.1.tgz", - "integrity": "sha512-2NxwbF/hZ0KpepYN0cNbo+FN6XoK7GaHlQhgx/hIZl6Va0bF45RQOOwhLIy8lQDbuCiadSLCBnH2CFYquit5bw==", - "dev": true, - "dependencies": { - "esrecurse": "^4.3.0", - "estraverse": "^4.1.1" - }, - "engines": { - "node": ">=8.0.0" - } - }, - "node_modules/eslint-visitor-keys": { - "version": "3.4.3", - "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-3.4.3.tgz", - "integrity": "sha512-wpc+LXeiyiisxPlEkUzU6svyS1frIO3Mgxj1fdy7Pm8Ygzguax2N3Fa/D/ag1WqbOprdI+uY6wMUl8/a2G+iag==", - "dev": true, - "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" - }, - "funding": { - "url": "https://opencollective.com/eslint" - } - }, - "node_modules/eslint/node_modules/eslint-scope": { "version": "7.2.2", "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-7.2.2.tgz", "integrity": "sha512-dOt21O7lTMhDM+X9mB4GX+DZrZtCUJPL/wlcTqxyrx5IvO0IYtILdtrQGQp+8n5S0gwSVmOf9NQrjMOgfQZlIg==", @@ -9069,13 +8523,16 @@ "url": "https://opencollective.com/eslint" } }, - "node_modules/eslint/node_modules/estraverse": { - "version": "5.3.0", - "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.3.0.tgz", - "integrity": "sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA==", + "node_modules/eslint-visitor-keys": { + "version": "3.4.3", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-3.4.3.tgz", + "integrity": "sha512-wpc+LXeiyiisxPlEkUzU6svyS1frIO3Mgxj1fdy7Pm8Ygzguax2N3Fa/D/ag1WqbOprdI+uY6wMUl8/a2G+iag==", "dev": true, "engines": { - "node": ">=4.0" + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "url": "https://opencollective.com/eslint" } }, "node_modules/espree": { @@ -9120,15 +8577,6 @@ "node": ">=0.10" } }, - "node_modules/esquery/node_modules/estraverse": { - "version": "5.3.0", - "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.3.0.tgz", - "integrity": "sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA==", - "dev": true, - "engines": { - "node": ">=4.0" - } - }, "node_modules/esrecurse": { "version": "4.3.0", "resolved": "https://registry.npmjs.org/esrecurse/-/esrecurse-4.3.0.tgz", @@ -9141,7 +8589,7 @@ "node": ">=4.0" } }, - "node_modules/esrecurse/node_modules/estraverse": { + "node_modules/estraverse": { "version": "5.3.0", "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.3.0.tgz", "integrity": "sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA==", @@ -9150,15 +8598,6 @@ "node": ">=4.0" } }, - "node_modules/estraverse": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-4.3.0.tgz", - "integrity": "sha512-39nnKffWz8xN1BU/2c79n9nB9HDzo0niYUqx6xyqUnyoAnQyyWpOTdZEeiCch8BBu515t4wp9ZmgVfVhn9EBpw==", - "dev": true, - "engines": { - "node": ">=4.0" - } - }, "node_modules/esutils": { "version": "2.0.3", "resolved": "https://registry.npmjs.org/esutils/-/esutils-2.0.3.tgz", @@ -9168,15 +8607,6 @@ "node": ">=0.10.0" } }, - "node_modules/event-target-shim": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/event-target-shim/-/event-target-shim-5.0.1.tgz", - "integrity": "sha512-i/2XbnSz/uxRCU6+NdVJgKWDTM427+MqYbkQzD321DuCQJUqOuJKIA0IM2+W2xtYHdKOmZ4dR6fExsd4SXL+WQ==", - "dev": true, - "engines": { - "node": ">=6" - } - }, "node_modules/eventemitter3": { "version": "5.0.1", "resolved": "https://registry.npmjs.org/eventemitter3/-/eventemitter3-5.0.1.tgz", @@ -9399,15 +8829,6 @@ "node": "^10.12.0 || >=12.0.0" } }, - "node_modules/file-url": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/file-url/-/file-url-3.0.0.tgz", - "integrity": "sha512-g872QGsHexznxkIAdK8UiZRe7SkE6kvylShU4Nsj8NvfvZag7S0QuQ4IgvPDkk75HxgjIVDwycFTDAgIiO4nDA==", - "dev": true, - "engines": { - "node": ">=8" - } - }, "node_modules/filelist": { "version": "1.0.4", "resolved": "https://registry.npmjs.org/filelist/-/filelist-1.0.4.tgz", @@ -9587,19 +9008,17 @@ "integrity": "sha512-y6OAwoSIf7FyjMIv94u+b5rdheZEjzR63GTyZJm5qh4Bi+2YgwLCcI/fPFZkL5PSixOt6ZNKm+w+Hfp/Bciwow==", "dev": true }, - "node_modules/fs-extra": { - "version": "9.1.0", - "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-9.1.0.tgz", - "integrity": "sha512-hcg3ZmepS30/7BSFqRvoo3DOMQu7IjqxO5nCDt+zM9XWjb33Wg7ziNT+Qvqbuc3+gWpzO02JubVyk2G4Zvo1OQ==", - "dev": true, + "node_modules/fs-extra": { + "version": "11.1.1", + "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-11.1.1.tgz", + "integrity": "sha512-MGIE4HOvQCeUCzmlHs0vXpih4ysz4wg9qiSAu6cd42lVwPbTM1TjV7RusoyQqMmk/95gdQZX72u+YW+c3eEpFQ==", "dependencies": { - "at-least-node": "^1.0.0", "graceful-fs": "^4.2.0", "jsonfile": "^6.0.1", "universalify": "^2.0.0" }, "engines": { - "node": ">=10" + "node": ">=14.14" } }, "node_modules/fs-minipass": { @@ -9754,82 +9173,6 @@ "node": ">=6.9.0" } }, - "node_modules/get-pkg-repo/node_modules/hosted-git-info": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-4.1.0.tgz", - "integrity": "sha512-kyCuEOWjJqZuDbRHzL8V93NzQhwIB71oFWSyzVo+KPZI+pnQPPxucdkrOZvkLRnrf5URsQM+IJ09Dw29cRALIA==", - "dev": true, - "dependencies": { - "lru-cache": "^6.0.0" - }, - "engines": { - "node": ">=10" - } - }, - "node_modules/get-pkg-repo/node_modules/isarray": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", - "integrity": "sha512-VLghIWNM6ELQzo7zwmcg0NmTVyWKYjvIeM83yjp0wRDTmUnrM678fQbcKBo6n2CJEF0szoG//ytg+TKla89ALQ==", - "dev": true - }, - "node_modules/get-pkg-repo/node_modules/lru-cache": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz", - "integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==", - "dev": true, - "dependencies": { - "yallist": "^4.0.0" - }, - "engines": { - "node": ">=10" - } - }, - "node_modules/get-pkg-repo/node_modules/readable-stream": { - "version": "2.3.8", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.8.tgz", - "integrity": "sha512-8p0AUk4XODgIewSi0l8Epjs+EVnWiK7NoDIEGU0HhE7+ZyY8D1IMY7odu5lRrFXGg71L15KG8QrPmum45RTtdA==", - "dev": true, - "dependencies": { - "core-util-is": "~1.0.0", - "inherits": "~2.0.3", - "isarray": "~1.0.0", - "process-nextick-args": "~2.0.0", - "safe-buffer": "~5.1.1", - "string_decoder": "~1.1.1", - "util-deprecate": "~1.0.1" - } - }, - "node_modules/get-pkg-repo/node_modules/safe-buffer": { - "version": "5.1.2", - "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", - "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==", - "dev": true - }, - "node_modules/get-pkg-repo/node_modules/string_decoder": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", - "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", - "dev": true, - "dependencies": { - "safe-buffer": "~5.1.0" - } - }, - "node_modules/get-pkg-repo/node_modules/through2": { - "version": "2.0.5", - "resolved": "https://registry.npmjs.org/through2/-/through2-2.0.5.tgz", - "integrity": "sha512-/mrRod8xqpA+IHSLyGCQ2s8SPHiCDEeQJSep1jqLYeEUClOFG2Qsh+4FU6G9VeqpZnGW/Su8LQGc4YKni5rYSQ==", - "dev": true, - "dependencies": { - "readable-stream": "~2.3.6", - "xtend": "~4.0.1" - } - }, - "node_modules/get-pkg-repo/node_modules/yallist": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", - "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==", - "dev": true - }, "node_modules/get-pkg-repo/node_modules/yargs": { "version": "16.2.0", "resolved": "https://registry.npmjs.org/yargs/-/yargs-16.2.0.tgz", @@ -9901,22 +9244,20 @@ } }, "node_modules/git-raw-commits": { - "version": "2.0.11", - "resolved": "https://registry.npmjs.org/git-raw-commits/-/git-raw-commits-2.0.11.tgz", - "integrity": "sha512-VnctFhw+xfj8Va1xtfEqCUD2XDrbAPSJx+hSrE5K7fGdjZruW7XV+QOrN7LF/RJyvspRiD2I0asWsxFp0ya26A==", + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/git-raw-commits/-/git-raw-commits-3.0.0.tgz", + "integrity": "sha512-b5OHmZ3vAgGrDn/X0kS+9qCfNKWe4K/jFnhwzVWWg0/k5eLa3060tZShrRg8Dja5kPc+YjS0Gc6y7cRr44Lpjw==", "dev": true, "dependencies": { "dargs": "^7.0.0", - "lodash": "^4.17.15", - "meow": "^8.0.0", - "split2": "^3.0.0", - "through2": "^4.0.0" + "meow": "^8.1.2", + "split2": "^3.2.2" }, "bin": { "git-raw-commits": "cli.js" }, "engines": { - "node": ">=10" + "node": ">=14" } }, "node_modules/git-remote-origin-url": { @@ -9942,28 +9283,19 @@ } }, "node_modules/git-semver-tags": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/git-semver-tags/-/git-semver-tags-4.1.1.tgz", - "integrity": "sha512-OWyMt5zBe7xFs8vglMmhM9lRQzCWL3WjHtxNNfJTMngGym7pC1kh8sP6jevfydJ6LP3ZvGxfb6ABYgPUM0mtsA==", + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/git-semver-tags/-/git-semver-tags-5.0.1.tgz", + "integrity": "sha512-hIvOeZwRbQ+7YEUmCkHqo8FOLQZCEn18yevLHADlFPZY02KJGsu5FZt9YW/lybfK2uhWFI7Qg/07LekJiTv7iA==", "dev": true, "dependencies": { - "meow": "^8.0.0", - "semver": "^6.0.0" + "meow": "^8.1.2", + "semver": "^7.0.0" }, "bin": { "git-semver-tags": "cli.js" }, "engines": { - "node": ">=10" - } - }, - "node_modules/git-semver-tags/node_modules/semver": { - "version": "6.3.1", - "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.1.tgz", - "integrity": "sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==", - "dev": true, - "bin": { - "semver": "bin/semver.js" + "node": ">=14" } }, "node_modules/git-up": { @@ -10091,8 +9423,7 @@ "node_modules/graceful-fs": { "version": "4.2.11", "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.11.tgz", - "integrity": "sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ==", - "dev": true + "integrity": "sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ==" }, "node_modules/graphemer": { "version": "1.4.0", @@ -10230,26 +9561,35 @@ } }, "node_modules/hosted-git-info": { - "version": "6.1.1", - "resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-6.1.1.tgz", - "integrity": "sha512-r0EI+HBMcXadMrugk0GCQ+6BQV39PiWAZVfq7oIckeGiN7sjRGyQxPdft3nQekFTCQbYxLBH+/axZMeH8UX6+w==", + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-4.1.0.tgz", + "integrity": "sha512-kyCuEOWjJqZuDbRHzL8V93NzQhwIB71oFWSyzVo+KPZI+pnQPPxucdkrOZvkLRnrf5URsQM+IJ09Dw29cRALIA==", "dev": true, "dependencies": { - "lru-cache": "^7.5.1" + "lru-cache": "^6.0.0" }, "engines": { - "node": "^14.17.0 || ^16.13.0 || >=18.0.0" + "node": ">=10" } }, "node_modules/hosted-git-info/node_modules/lru-cache": { - "version": "7.18.3", - "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-7.18.3.tgz", - "integrity": "sha512-jumlc0BIUrS3qJGgIkWZsyfAM7NCWiBcCDhnd+3NNM5KbBmLTgHVfWBcg6W+rLUsIpzpERPsvwUP7CckAQSOoA==", + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz", + "integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==", "dev": true, + "dependencies": { + "yallist": "^4.0.0" + }, "engines": { - "node": ">=12" + "node": ">=10" } }, + "node_modules/hosted-git-info/node_modules/yallist": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", + "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==", + "dev": true + }, "node_modules/html-escaper": { "version": "2.0.2", "resolved": "https://registry.npmjs.org/html-escaper/-/html-escaper-2.0.2.tgz", @@ -10335,30 +9675,15 @@ } }, "node_modules/ieee754": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/ieee754/-/ieee754-1.2.1.tgz", - "integrity": "sha512-dcyqhDvX1C46lXZcVqCpK+FtMRQVdIMN6/Df5js2zouUsqG7I6sFxitIC+7KYK29KdXOLHdu9zL4sFnoVQnqaA==", - "dev": true, - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/feross" - }, - { - "type": "patreon", - "url": "https://www.patreon.com/feross" - }, - { - "type": "consulting", - "url": "https://feross.org/support" - } - ] + "version": "1.1.13", + "resolved": "https://registry.npmjs.org/ieee754/-/ieee754-1.1.13.tgz", + "integrity": "sha512-4vf7I2LYV/HaWerSo3XmlMkp5eZ83i+/CDluXi/IGTs/O1sejBNhTtnxzmRZfvOUqj7lZjqHkeTvpgSFDlWZTg==", + "dev": true }, "node_modules/ignore": { "version": "5.2.4", "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.2.4.tgz", "integrity": "sha512-MAb38BcSbH0eHNBxn7ql2NH/kX33OkB3lZ1BNdh7ENeRChHTYsTvWrMubiIAMNS2llXEEgZ1MUOBtXChP3kaFQ==", - "dev": true, "engines": { "node": ">= 4" } @@ -10449,12 +9774,6 @@ "node": ">=8" } }, - "node_modules/infer-owner": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/infer-owner/-/infer-owner-1.0.4.tgz", - "integrity": "sha512-IClj+Xz94+d7irH5qRyfJonOdfTzuDaifE6ZPWfx0N0+/ATZCbuTPq2prFl526urkQd90WyUKIh1DfBQ2hMz9A==", - "dev": true - }, "node_modules/inflight": { "version": "1.0.6", "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", @@ -10478,33 +9797,33 @@ "dev": true }, "node_modules/init-package-json": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/init-package-json/-/init-package-json-3.0.2.tgz", - "integrity": "sha512-YhlQPEjNFqlGdzrBfDNRLhvoSgX7iQRgSxgsNknRQ9ITXFT7UMfVMWhBTOh2Y+25lRnGrv5Xz8yZwQ3ACR6T3A==", + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/init-package-json/-/init-package-json-5.0.0.tgz", + "integrity": "sha512-kBhlSheBfYmq3e0L1ii+VKe3zBTLL5lDCDWR+f9dLmEGSB3MqLlMlsolubSsyI88Bg6EA+BIMlomAnQ1SwgQBw==", "dev": true, "dependencies": { - "npm-package-arg": "^9.0.1", - "promzard": "^0.3.0", - "read": "^1.0.7", - "read-package-json": "^5.0.0", + "npm-package-arg": "^10.0.0", + "promzard": "^1.0.0", + "read": "^2.0.0", + "read-package-json": "^6.0.0", "semver": "^7.3.5", "validate-npm-package-license": "^3.0.4", - "validate-npm-package-name": "^4.0.0" + "validate-npm-package-name": "^5.0.0" }, "engines": { - "node": "^12.13.0 || ^14.15.0 || >=16.0.0" + "node": "^14.17.0 || ^16.13.0 || >=18.0.0" } }, "node_modules/init-package-json/node_modules/hosted-git-info": { - "version": "5.2.1", - "resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-5.2.1.tgz", - "integrity": "sha512-xIcQYMnhcx2Nr4JTjsFmwwnr9vldugPy9uVm0o87bjqqWMv9GaqsTeT+i99wTl0mk1uLxJtHxLb8kymqTENQsw==", + "version": "6.1.1", + "resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-6.1.1.tgz", + "integrity": "sha512-r0EI+HBMcXadMrugk0GCQ+6BQV39PiWAZVfq7oIckeGiN7sjRGyQxPdft3nQekFTCQbYxLBH+/axZMeH8UX6+w==", "dev": true, "dependencies": { "lru-cache": "^7.5.1" }, "engines": { - "node": "^12.13.0 || ^14.15.0 || >=16.0.0" + "node": "^14.17.0 || ^16.13.0 || >=18.0.0" } }, "node_modules/init-package-json/node_modules/lru-cache": { @@ -10517,27 +9836,18 @@ } }, "node_modules/init-package-json/node_modules/npm-package-arg": { - "version": "9.1.2", - "resolved": "https://registry.npmjs.org/npm-package-arg/-/npm-package-arg-9.1.2.tgz", - "integrity": "sha512-pzd9rLEx4TfNJkovvlBSLGhq31gGu2QDexFPWT19yCDh0JgnRhlBLNo5759N0AJmBk+kQ9Y/hXoLnlgFD+ukmg==", + "version": "10.1.0", + "resolved": "https://registry.npmjs.org/npm-package-arg/-/npm-package-arg-10.1.0.tgz", + "integrity": "sha512-uFyyCEmgBfZTtrKk/5xDfHp6+MdrqGotX/VoOyEEl3mBwiEE5FlBaePanazJSVMPT7vKepcjYBY2ztg9A3yPIA==", "dev": true, "dependencies": { - "hosted-git-info": "^5.0.0", - "proc-log": "^2.0.1", + "hosted-git-info": "^6.0.0", + "proc-log": "^3.0.0", "semver": "^7.3.5", - "validate-npm-package-name": "^4.0.0" + "validate-npm-package-name": "^5.0.0" }, "engines": { - "node": "^12.13.0 || ^14.15.0 || >=16.0.0" - } - }, - "node_modules/init-package-json/node_modules/proc-log": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/proc-log/-/proc-log-2.0.1.tgz", - "integrity": "sha512-Kcmo2FhfDTXdcbfDH76N7uBYHINxc/8GW7UAVuVP9I+Va3uHSerrnKV6dLooga/gh7GlgzuCCr/eoldnL1muGw==", - "dev": true, - "engines": { - "node": "^12.13.0 || ^14.15.0 || >=16.0.0" + "node": "^14.17.0 || ^16.13.0 || >=18.0.0" } }, "node_modules/inquirer": { @@ -10663,23 +9973,17 @@ } }, "node_modules/is-ci": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/is-ci/-/is-ci-2.0.0.tgz", - "integrity": "sha512-YfJT7rkpQB0updsdHLGWrvhBJfcfzNNawYDNIyQXJz0IViGf75O8EBPKSdvw2rF+LGCsX4FZ8tcr3b19LcZq4w==", + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/is-ci/-/is-ci-3.0.1.tgz", + "integrity": "sha512-ZYvCgrefwqoQ6yTyYUbQu64HsITZ3NfKX1lzaEYdkTDcfKzzCI/wthRRYKkdjHKFVgNiXKAKm65Zo1pk2as/QQ==", "dev": true, "dependencies": { - "ci-info": "^2.0.0" + "ci-info": "^3.2.0" }, "bin": { "is-ci": "bin.js" } }, - "node_modules/is-ci/node_modules/ci-info": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/ci-info/-/ci-info-2.0.0.tgz", - "integrity": "sha512-5tK7EtrZ0N+OLFMthtqOj4fI2Jeb88C4CAZPu25LDVUgXJ0A3Js4PMGqrn0JU1W0Mh1/Z8wZzYPxqUrXeBboCQ==", - "dev": true - }, "node_modules/is-core-module": { "version": "2.13.0", "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.13.0.tgz", @@ -10779,6 +10083,39 @@ "node": ">=0.10.0" } }, + "node_modules/is-inside-container": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-inside-container/-/is-inside-container-1.0.0.tgz", + "integrity": "sha512-KIYLCCJghfHZxqjYBE7rEy0OBuTd5xCHS7tHVgvCLkx7StIoaxwNW3hCALgEUjFfeRk+MG/Qxmp/vtETEF3tRA==", + "dev": true, + "dependencies": { + "is-docker": "^3.0.0" + }, + "bin": { + "is-inside-container": "cli.js" + }, + "engines": { + "node": ">=14.16" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/is-inside-container/node_modules/is-docker": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/is-docker/-/is-docker-3.0.0.tgz", + "integrity": "sha512-eljcgEDlEns/7AXFosB5K/2nCM4P7FQPkGc/DWLy5rmFEWvZayGrik1d9/QIY5nJ4f9YsVvBkA6kJpHn9rISdQ==", + "dev": true, + "bin": { + "is-docker": "cli.js" + }, + "engines": { + "node": "^12.20.0 || ^14.13.1 || >=16.0.0" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/is-interactive": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/is-interactive/-/is-interactive-1.0.0.tgz", @@ -10839,15 +10176,6 @@ "node": ">=8" } }, - "node_modules/is-path-cwd": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/is-path-cwd/-/is-path-cwd-2.2.0.tgz", - "integrity": "sha512-w942bTcih8fdJPJmQHFzkS76NEP8Kzzvmw92cXsazb8intwLqPibPPdXf4ANdKV3rYMuuQYGIWtvz9JilB3NFQ==", - "dev": true, - "engines": { - "node": ">=6" - } - }, "node_modules/is-path-inside": { "version": "3.0.3", "resolved": "https://registry.npmjs.org/is-path-inside/-/is-path-inside-3.0.3.tgz", @@ -11018,9 +10346,9 @@ } }, "node_modules/isarray": { - "version": "2.0.5", - "resolved": "https://registry.npmjs.org/isarray/-/isarray-2.0.5.tgz", - "integrity": "sha512-xHjhDr3cNBK0BzdUJSPXZntQUx/mwMS5Rw4A7lPJ90XGAO6ISP/ePDNuo0vhqOZU+UD5JoodwCAAoZQd3FeAKw==", + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", + "integrity": "sha512-VLghIWNM6ELQzo7zwmcg0NmTVyWKYjvIeM83yjp0wRDTmUnrM678fQbcKBo6n2CJEF0szoG//ytg+TKla89ALQ==", "dev": true }, "node_modules/isexe": { @@ -11786,15 +11114,6 @@ "integrity": "sha512-Bdboy+l7tA3OGW6FjyFHWkP5LuByj1Tk33Ljyq0axyzdk9//JSi2u3fP1QSmd1KNwq6VOKYGlAu87CisVir6Pw==", "dev": true }, - "node_modules/json-stringify-nice": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/json-stringify-nice/-/json-stringify-nice-1.1.4.tgz", - "integrity": "sha512-5Z5RFW63yxReJ7vANgW6eZFGWaQvnPE3WNmZoOJrSkGju2etKA2L5rrOa1sm877TVTFt57A80BH1bArcmlLfPw==", - "dev": true, - "funding": { - "url": "https://github.com/sponsors/isaacs" - } - }, "node_modules/json-stringify-safe": { "version": "5.0.1", "resolved": "https://registry.npmjs.org/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz", @@ -11823,7 +11142,6 @@ "version": "6.1.0", "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-6.1.0.tgz", "integrity": "sha512-5dgndWOriYSm5cnYaJNhalLNDKOqFwyDB/rr1E9ZsGciGvKPs8R2xYGCacuf3z6K1YKDz182fd+fY3cn3pMqXQ==", - "dev": true, "dependencies": { "universalify": "^2.0.0" }, @@ -11856,18 +11174,6 @@ "node": "*" } }, - "node_modules/just-diff": { - "version": "6.0.2", - "resolved": "https://registry.npmjs.org/just-diff/-/just-diff-6.0.2.tgz", - "integrity": "sha512-S59eriX5u3/QhMNq3v/gm8Kd0w8OS6Tz2FS1NG4blv+z0MuQcBRJyFWjdovM0Rad4/P4aUPFtnkNjMjyMlMSYA==", - "dev": true - }, - "node_modules/just-diff-apply": { - "version": "5.5.0", - "resolved": "https://registry.npmjs.org/just-diff-apply/-/just-diff-apply-5.5.0.tgz", - "integrity": "sha512-OYTthRfSh55WOItVqwpefPtNt2VdKsq5AnAK6apdtR6yCH8pr0CmSr710J0Mf+WdQy7K/OzMy7K2MgAfdQURDw==", - "dev": true - }, "node_modules/just-extend": { "version": "4.2.1", "resolved": "https://registry.npmjs.org/just-extend/-/just-extend-4.2.1.tgz", @@ -11906,84 +11212,83 @@ "link": true }, "node_modules/lerna": { - "version": "6.6.2", - "resolved": "https://registry.npmjs.org/lerna/-/lerna-6.6.2.tgz", - "integrity": "sha512-W4qrGhcdutkRdHEaDf9eqp7u4JvI+1TwFy5woX6OI8WPe4PYBdxuILAsvhp614fUG41rKSGDKlOh+AWzdSidTg==", + "version": "7.3.0", + "resolved": "https://registry.npmjs.org/lerna/-/lerna-7.3.0.tgz", + "integrity": "sha512-Dt8TH+J+c9+3MhTYcm5OxnNzXb87WG7GPNj3kidjYJjJY7KxIMDNU37qBTYRWA1h3wAeNKBplXVQYUPkGcYgkQ==", "dev": true, "dependencies": { - "@lerna/child-process": "6.6.2", - "@lerna/create": "6.6.2", - "@lerna/legacy-package-management": "6.6.2", - "@npmcli/arborist": "6.2.3", - "@npmcli/run-script": "4.1.7", - "@nrwl/devkit": ">=15.5.2 < 16", + "@lerna/child-process": "7.3.0", + "@lerna/create": "7.3.0", + "@npmcli/run-script": "6.0.2", + "@nx/devkit": ">=16.5.1 < 17", "@octokit/plugin-enterprise-rest": "6.0.1", - "@octokit/rest": "19.0.3", - "byte-size": "7.0.0", + "@octokit/rest": "19.0.11", + "byte-size": "8.1.1", "chalk": "4.1.0", "clone-deep": "4.0.1", - "cmd-shim": "5.0.0", + "cmd-shim": "6.0.1", "columnify": "1.6.0", - "config-chain": "1.1.12", - "conventional-changelog-angular": "5.0.12", - "conventional-changelog-core": "4.2.4", - "conventional-recommended-bump": "6.1.0", - "cosmiconfig": "7.0.0", + "conventional-changelog-angular": "6.0.0", + "conventional-changelog-core": "5.0.1", + "conventional-recommended-bump": "7.0.1", + "cosmiconfig": "^8.2.0", "dedent": "0.7.0", - "dot-prop": "6.0.1", - "envinfo": "^7.7.4", + "envinfo": "7.8.1", "execa": "5.0.0", - "fs-extra": "9.1.0", + "fs-extra": "^11.1.1", "get-port": "5.1.1", "get-stream": "6.0.0", "git-url-parse": "13.1.0", "glob-parent": "5.1.2", "globby": "11.1.0", - "graceful-fs": "4.2.10", + "graceful-fs": "4.2.11", "has-unicode": "2.0.1", - "import-local": "^3.0.2", - "init-package-json": "3.0.2", + "import-local": "3.1.0", + "ini": "^1.3.8", + "init-package-json": "5.0.0", "inquirer": "^8.2.4", - "is-ci": "2.0.0", + "is-ci": "3.0.1", "is-stream": "2.0.0", - "js-yaml": "^4.1.0", - "libnpmaccess": "^6.0.3", - "libnpmpublish": "7.1.4", + "jest-diff": ">=29.4.3 < 30", + "js-yaml": "4.1.0", + "libnpmaccess": "7.0.2", + "libnpmpublish": "7.3.0", "load-json-file": "6.2.0", - "make-dir": "3.1.0", + "lodash": "^4.17.21", + "make-dir": "4.0.0", "minimatch": "3.0.5", "multimatch": "5.0.0", "node-fetch": "2.6.7", "npm-package-arg": "8.1.1", "npm-packlist": "5.1.1", - "npm-registry-fetch": "^14.0.3", + "npm-registry-fetch": "^14.0.5", "npmlog": "^6.0.2", - "nx": ">=15.5.2 < 16", + "nx": ">=16.5.1 < 17", "p-map": "4.0.0", "p-map-series": "2.1.0", "p-pipe": "3.1.0", "p-queue": "6.6.2", "p-reduce": "2.1.0", "p-waterfall": "2.1.1", - "pacote": "15.1.1", + "pacote": "^15.2.0", "pify": "5.0.0", - "read-cmd-shim": "3.0.0", - "read-package-json": "5.0.1", + "read-cmd-shim": "4.0.0", + "read-package-json": "6.0.4", "resolve-from": "5.0.0", "rimraf": "^4.4.1", "semver": "^7.3.8", "signal-exit": "3.0.7", "slash": "3.0.0", - "ssri": "9.0.1", + "ssri": "^9.0.1", "strong-log-transformer": "2.1.0", "tar": "6.1.11", "temp-dir": "1.0.0", - "typescript": "^3 || ^4", - "upath": "^2.0.1", - "uuid": "8.3.2", + "typescript": ">=3 < 6", + "upath": "2.0.1", + "uuid": "^9.0.0", "validate-npm-package-license": "3.0.4", - "validate-npm-package-name": "4.0.0", - "write-file-atomic": "4.0.1", + "validate-npm-package-name": "5.0.0", + "write-file-atomic": "5.0.1", "write-pkg": "4.0.0", "yargs": "16.2.0", "yargs-parser": "20.2.4" @@ -12094,55 +11399,25 @@ "node_modules/lerna/node_modules/glob/node_modules/minimatch": { "version": "8.0.4", "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-8.0.4.tgz", - "integrity": "sha512-W0Wvr9HyFXZRGIDgCicunpQ299OKXs9RgZfaukz4qAW/pJhcpUfupc9c+OObPOFueNy8VSrZgEmDtk6Kh4WzDA==", - "dev": true, - "dependencies": { - "brace-expansion": "^2.0.1" - }, - "engines": { - "node": ">=16 || 14 >=14.17" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" - } - }, - "node_modules/lerna/node_modules/graceful-fs": { - "version": "4.2.10", - "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.10.tgz", - "integrity": "sha512-9ByhssR2fPVsNZj478qUUbKfmL0+t5BDVyjShtyZZLiK7ZDAArFFfopyOTj0M05wE2tJPisA4iTnnXl2YoPvOA==", - "dev": true - }, - "node_modules/lerna/node_modules/is-stream": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-2.0.0.tgz", - "integrity": "sha512-XCoy+WlUr7d1+Z8GgSuXmpuUFC9fOhRXglJMx+dwLKTkL44Cjd4W1Z5P+BQZpr+cR93aGP4S/s7Ftw6Nd/kiEw==", - "dev": true, - "engines": { - "node": ">=8" - } - }, - "node_modules/lerna/node_modules/make-dir": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/make-dir/-/make-dir-3.1.0.tgz", - "integrity": "sha512-g3FeP20LNwhALb/6Cz6Dd4F2ngze0jz7tbzrD2wAV+o9FeNHe4rL+yK2md0J/fiSf1sa1ADhXqi5+oVwOM/eGw==", + "integrity": "sha512-W0Wvr9HyFXZRGIDgCicunpQ299OKXs9RgZfaukz4qAW/pJhcpUfupc9c+OObPOFueNy8VSrZgEmDtk6Kh4WzDA==", "dev": true, "dependencies": { - "semver": "^6.0.0" + "brace-expansion": "^2.0.1" }, "engines": { - "node": ">=8" + "node": ">=16 || 14 >=14.17" }, "funding": { - "url": "https://github.com/sponsors/sindresorhus" + "url": "https://github.com/sponsors/isaacs" } }, - "node_modules/lerna/node_modules/make-dir/node_modules/semver": { - "version": "6.3.1", - "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.1.tgz", - "integrity": "sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==", + "node_modules/lerna/node_modules/is-stream": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-2.0.0.tgz", + "integrity": "sha512-XCoy+WlUr7d1+Z8GgSuXmpuUFC9fOhRXglJMx+dwLKTkL44Cjd4W1Z5P+BQZpr+cR93aGP4S/s7Ftw6Nd/kiEw==", "dev": true, - "bin": { - "semver": "bin/semver.js" + "engines": { + "node": ">=8" } }, "node_modules/lerna/node_modules/minimatch": { @@ -12193,30 +11468,42 @@ "url": "https://github.com/sponsors/isaacs" } }, - "node_modules/lerna/node_modules/typescript": { - "version": "4.9.5", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.9.5.tgz", - "integrity": "sha512-1FXk9E2Hm+QzZQ7z+McJiHL4NW1F2EzMu9Nq9i3zAaGqibafqYwCVU6WyWAuyQRRzOlxou8xZSyXLEN8oKj24g==", + "node_modules/lerna/node_modules/uuid": { + "version": "9.0.1", + "resolved": "https://registry.npmjs.org/uuid/-/uuid-9.0.1.tgz", + "integrity": "sha512-b+1eJOlsR9K8HJpow9Ok3fiWOWSIcIzXodvv0rQjVoOVNpWMpxf1wZNpt4y9h10odCNrqnYp1OBzRktckBe3sA==", "dev": true, + "funding": [ + "https://github.com/sponsors/broofa", + "https://github.com/sponsors/ctavan" + ], "bin": { - "tsc": "bin/tsc", - "tsserver": "bin/tsserver" - }, - "engines": { - "node": ">=4.2.0" + "uuid": "dist/bin/uuid" } }, "node_modules/lerna/node_modules/write-file-atomic": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/write-file-atomic/-/write-file-atomic-4.0.1.tgz", - "integrity": "sha512-nSKUxgAbyioruk6hU87QzVbY279oYT6uiwgDoujth2ju4mJ+TZau7SQBhtbTmUyuNYTuXnSyRn66FV0+eCgcrQ==", + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/write-file-atomic/-/write-file-atomic-5.0.1.tgz", + "integrity": "sha512-+QU2zd6OTD8XWIJCbffaiQeH9U73qIqafo1x6V1snCWYGJf6cVE0cDR4D8xRzcEnfI21IFrUPzPGtcPf8AC+Rw==", "dev": true, "dependencies": { "imurmurhash": "^0.1.4", - "signal-exit": "^3.0.7" + "signal-exit": "^4.0.1" }, "engines": { - "node": "^12.13.0 || ^14.15.0 || >=16" + "node": "^14.17.0 || ^16.13.0 || >=18.0.0" + } + }, + "node_modules/lerna/node_modules/write-file-atomic/node_modules/signal-exit": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-4.1.0.tgz", + "integrity": "sha512-bzyZ1e88w9O1iNJbKnOlvYTrWPDl46O1bG0D3XInv+9tkPrxrN8jUUTiFlDkkmKWgn1M6CfIA13SuGqOa9Korw==", + "dev": true, + "engines": { + "node": ">=14" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" } }, "node_modules/lerna/node_modules/yargs": { @@ -12260,324 +11547,58 @@ } }, "node_modules/libnpmaccess": { - "version": "6.0.4", - "resolved": "https://registry.npmjs.org/libnpmaccess/-/libnpmaccess-6.0.4.tgz", - "integrity": "sha512-qZ3wcfIyUoW0+qSFkMBovcTrSGJ3ZeyvpR7d5N9pEYv/kXs8sHP2wiqEIXBKLFrZlmM0kR0RJD7mtfLngtlLag==", - "dev": true, - "dependencies": { - "aproba": "^2.0.0", - "minipass": "^3.1.1", - "npm-package-arg": "^9.0.1", - "npm-registry-fetch": "^13.0.0" - }, - "engines": { - "node": "^12.13.0 || ^14.15.0 || >=16.0.0" - } - }, - "node_modules/libnpmaccess/node_modules/@npmcli/fs": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/@npmcli/fs/-/fs-2.1.2.tgz", - "integrity": "sha512-yOJKRvohFOaLqipNtwYB9WugyZKhC/DZC4VYPmpaCzDBrA8YpK3qHZ8/HGscMnE4GqbkLNuVcCnxkeQEdGt6LQ==", - "dev": true, - "dependencies": { - "@gar/promisify": "^1.1.3", - "semver": "^7.3.5" - }, - "engines": { - "node": "^12.13.0 || ^14.15.0 || >=16.0.0" - } - }, - "node_modules/libnpmaccess/node_modules/brace-expansion": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz", - "integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==", - "dev": true, - "dependencies": { - "balanced-match": "^1.0.0" - } - }, - "node_modules/libnpmaccess/node_modules/cacache": { - "version": "16.1.3", - "resolved": "https://registry.npmjs.org/cacache/-/cacache-16.1.3.tgz", - "integrity": "sha512-/+Emcj9DAXxX4cwlLmRI9c166RuL3w30zp4R7Joiv2cQTtTtA+jeuCAjH3ZlGnYS3tKENSrKhAzVVP9GVyzeYQ==", - "dev": true, - "dependencies": { - "@npmcli/fs": "^2.1.0", - "@npmcli/move-file": "^2.0.0", - "chownr": "^2.0.0", - "fs-minipass": "^2.1.0", - "glob": "^8.0.1", - "infer-owner": "^1.0.4", - "lru-cache": "^7.7.1", - "minipass": "^3.1.6", - "minipass-collect": "^1.0.2", - "minipass-flush": "^1.0.5", - "minipass-pipeline": "^1.2.4", - "mkdirp": "^1.0.4", - "p-map": "^4.0.0", - "promise-inflight": "^1.0.1", - "rimraf": "^3.0.2", - "ssri": "^9.0.0", - "tar": "^6.1.11", - "unique-filename": "^2.0.0" - }, - "engines": { - "node": "^12.13.0 || ^14.15.0 || >=16.0.0" - } - }, - "node_modules/libnpmaccess/node_modules/fs-minipass": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/fs-minipass/-/fs-minipass-2.1.0.tgz", - "integrity": "sha512-V/JgOLFCS+R6Vcq0slCuaeWEdNC3ouDlJMNIsacH2VtALiu9mV4LPrHc5cDl8k5aw6J8jwgWWpiTo5RYhmIzvg==", - "dev": true, - "dependencies": { - "minipass": "^3.0.0" - }, - "engines": { - "node": ">= 8" - } - }, - "node_modules/libnpmaccess/node_modules/glob": { - "version": "8.1.0", - "resolved": "https://registry.npmjs.org/glob/-/glob-8.1.0.tgz", - "integrity": "sha512-r8hpEjiQEYlF2QU0df3dS+nxxSIreXQS1qRhMJM0Q5NDdR386C7jb7Hwwod8Fgiuex+k0GFjgft18yvxm5XoCQ==", + "version": "7.0.2", + "resolved": "https://registry.npmjs.org/libnpmaccess/-/libnpmaccess-7.0.2.tgz", + "integrity": "sha512-vHBVMw1JFMTgEk15zRsJuSAg7QtGGHpUSEfnbcRL1/gTBag9iEfJbyjpDmdJmwMhvpoLoNBtdAUCdGnaP32hhw==", "dev": true, "dependencies": { - "fs.realpath": "^1.0.0", - "inflight": "^1.0.4", - "inherits": "2", - "minimatch": "^5.0.1", - "once": "^1.3.0" + "npm-package-arg": "^10.1.0", + "npm-registry-fetch": "^14.0.3" }, "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" + "node": "^14.17.0 || ^16.13.0 || >=18.0.0" } }, "node_modules/libnpmaccess/node_modules/hosted-git-info": { - "version": "5.2.1", - "resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-5.2.1.tgz", - "integrity": "sha512-xIcQYMnhcx2Nr4JTjsFmwwnr9vldugPy9uVm0o87bjqqWMv9GaqsTeT+i99wTl0mk1uLxJtHxLb8kymqTENQsw==", + "version": "6.1.1", + "resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-6.1.1.tgz", + "integrity": "sha512-r0EI+HBMcXadMrugk0GCQ+6BQV39PiWAZVfq7oIckeGiN7sjRGyQxPdft3nQekFTCQbYxLBH+/axZMeH8UX6+w==", "dev": true, "dependencies": { "lru-cache": "^7.5.1" }, "engines": { - "node": "^12.13.0 || ^14.15.0 || >=16.0.0" + "node": "^14.17.0 || ^16.13.0 || >=18.0.0" } }, "node_modules/libnpmaccess/node_modules/lru-cache": { - "version": "7.18.3", - "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-7.18.3.tgz", - "integrity": "sha512-jumlc0BIUrS3qJGgIkWZsyfAM7NCWiBcCDhnd+3NNM5KbBmLTgHVfWBcg6W+rLUsIpzpERPsvwUP7CckAQSOoA==", - "dev": true, - "engines": { - "node": ">=12" - } - }, - "node_modules/libnpmaccess/node_modules/make-fetch-happen": { - "version": "10.2.1", - "resolved": "https://registry.npmjs.org/make-fetch-happen/-/make-fetch-happen-10.2.1.tgz", - "integrity": "sha512-NgOPbRiaQM10DYXvN3/hhGVI2M5MtITFryzBGxHM5p4wnFxsVCbxkrBrDsk+EZ5OB4jEOT7AjDxtdF+KVEFT7w==", - "dev": true, - "dependencies": { - "agentkeepalive": "^4.2.1", - "cacache": "^16.1.0", - "http-cache-semantics": "^4.1.0", - "http-proxy-agent": "^5.0.0", - "https-proxy-agent": "^5.0.0", - "is-lambda": "^1.0.1", - "lru-cache": "^7.7.1", - "minipass": "^3.1.6", - "minipass-collect": "^1.0.2", - "minipass-fetch": "^2.0.3", - "minipass-flush": "^1.0.5", - "minipass-pipeline": "^1.2.4", - "negotiator": "^0.6.3", - "promise-retry": "^2.0.1", - "socks-proxy-agent": "^7.0.0", - "ssri": "^9.0.0" - }, - "engines": { - "node": "^12.13.0 || ^14.15.0 || >=16.0.0" - } - }, - "node_modules/libnpmaccess/node_modules/minimatch": { - "version": "5.1.6", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-5.1.6.tgz", - "integrity": "sha512-lKwV/1brpG6mBUFHtb7NUmtABCb2WZZmm2wNiOA5hAb8VdCS4B3dtMWyvcoViccwAW/COERjXLt0zP1zXUN26g==", - "dev": true, - "dependencies": { - "brace-expansion": "^2.0.1" - }, - "engines": { - "node": ">=10" - } - }, - "node_modules/libnpmaccess/node_modules/minipass": { - "version": "3.3.6", - "resolved": "https://registry.npmjs.org/minipass/-/minipass-3.3.6.tgz", - "integrity": "sha512-DxiNidxSEK+tHG6zOIklvNOwm3hvCrbUrdtzY74U6HKTJxvIDfOUL5W5P2Ghd3DTkhhKPYGqeNUIh5qcM4YBfw==", - "dev": true, - "dependencies": { - "yallist": "^4.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/libnpmaccess/node_modules/minipass-fetch": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/minipass-fetch/-/minipass-fetch-2.1.2.tgz", - "integrity": "sha512-LT49Zi2/WMROHYoqGgdlQIZh8mLPZmOrN2NdJjMXxYe4nkN6FUyuPuOAOedNJDrx0IRGg9+4guZewtp8hE6TxA==", - "dev": true, - "dependencies": { - "minipass": "^3.1.6", - "minipass-sized": "^1.0.3", - "minizlib": "^2.1.2" - }, - "engines": { - "node": "^12.13.0 || ^14.15.0 || >=16.0.0" - }, - "optionalDependencies": { - "encoding": "^0.1.13" - } - }, - "node_modules/libnpmaccess/node_modules/npm-package-arg": { - "version": "9.1.2", - "resolved": "https://registry.npmjs.org/npm-package-arg/-/npm-package-arg-9.1.2.tgz", - "integrity": "sha512-pzd9rLEx4TfNJkovvlBSLGhq31gGu2QDexFPWT19yCDh0JgnRhlBLNo5759N0AJmBk+kQ9Y/hXoLnlgFD+ukmg==", - "dev": true, - "dependencies": { - "hosted-git-info": "^5.0.0", - "proc-log": "^2.0.1", - "semver": "^7.3.5", - "validate-npm-package-name": "^4.0.0" - }, - "engines": { - "node": "^12.13.0 || ^14.15.0 || >=16.0.0" - } - }, - "node_modules/libnpmaccess/node_modules/npm-registry-fetch": { - "version": "13.3.1", - "resolved": "https://registry.npmjs.org/npm-registry-fetch/-/npm-registry-fetch-13.3.1.tgz", - "integrity": "sha512-eukJPi++DKRTjSBRcDZSDDsGqRK3ehbxfFUcgaRd0Yp6kRwOwh2WVn0r+8rMB4nnuzvAk6rQVzl6K5CkYOmnvw==", - "dev": true, - "dependencies": { - "make-fetch-happen": "^10.0.6", - "minipass": "^3.1.6", - "minipass-fetch": "^2.0.3", - "minipass-json-stream": "^1.0.1", - "minizlib": "^2.1.2", - "npm-package-arg": "^9.0.1", - "proc-log": "^2.0.0" - }, - "engines": { - "node": "^12.13.0 || ^14.15.0 || >=16.0.0" - } - }, - "node_modules/libnpmaccess/node_modules/proc-log": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/proc-log/-/proc-log-2.0.1.tgz", - "integrity": "sha512-Kcmo2FhfDTXdcbfDH76N7uBYHINxc/8GW7UAVuVP9I+Va3uHSerrnKV6dLooga/gh7GlgzuCCr/eoldnL1muGw==", - "dev": true, - "engines": { - "node": "^12.13.0 || ^14.15.0 || >=16.0.0" - } - }, - "node_modules/libnpmaccess/node_modules/rimraf": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-3.0.2.tgz", - "integrity": "sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA==", - "dev": true, - "dependencies": { - "glob": "^7.1.3" - }, - "bin": { - "rimraf": "bin.js" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" - } - }, - "node_modules/libnpmaccess/node_modules/rimraf/node_modules/brace-expansion": { - "version": "1.1.11", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", - "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", - "dev": true, - "dependencies": { - "balanced-match": "^1.0.0", - "concat-map": "0.0.1" - } - }, - "node_modules/libnpmaccess/node_modules/rimraf/node_modules/glob": { - "version": "7.2.3", - "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.3.tgz", - "integrity": "sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==", - "dev": true, - "dependencies": { - "fs.realpath": "^1.0.0", - "inflight": "^1.0.4", - "inherits": "2", - "minimatch": "^3.1.1", - "once": "^1.3.0", - "path-is-absolute": "^1.0.0" - }, - "engines": { - "node": "*" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" - } - }, - "node_modules/libnpmaccess/node_modules/rimraf/node_modules/minimatch": { - "version": "3.1.2", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", - "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", - "dev": true, - "dependencies": { - "brace-expansion": "^1.1.7" - }, - "engines": { - "node": "*" - } - }, - "node_modules/libnpmaccess/node_modules/unique-filename": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/unique-filename/-/unique-filename-2.0.1.tgz", - "integrity": "sha512-ODWHtkkdx3IAR+veKxFV+VBkUMcN+FaqzUUd7IZzt+0zhDZFPFxhlqwPF3YQvMHx1TD0tdgYl+kuPnJ8E6ql7A==", + "version": "7.18.3", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-7.18.3.tgz", + "integrity": "sha512-jumlc0BIUrS3qJGgIkWZsyfAM7NCWiBcCDhnd+3NNM5KbBmLTgHVfWBcg6W+rLUsIpzpERPsvwUP7CckAQSOoA==", "dev": true, - "dependencies": { - "unique-slug": "^3.0.0" - }, "engines": { - "node": "^12.13.0 || ^14.15.0 || >=16.0.0" + "node": ">=12" } }, - "node_modules/libnpmaccess/node_modules/unique-slug": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/unique-slug/-/unique-slug-3.0.0.tgz", - "integrity": "sha512-8EyMynh679x/0gqE9fT9oilG+qEt+ibFyqjuVTsZn1+CMxH+XLlpvr2UZx4nVcCwTpx81nICr2JQFkM+HPLq4w==", + "node_modules/libnpmaccess/node_modules/npm-package-arg": { + "version": "10.1.0", + "resolved": "https://registry.npmjs.org/npm-package-arg/-/npm-package-arg-10.1.0.tgz", + "integrity": "sha512-uFyyCEmgBfZTtrKk/5xDfHp6+MdrqGotX/VoOyEEl3mBwiEE5FlBaePanazJSVMPT7vKepcjYBY2ztg9A3yPIA==", "dev": true, "dependencies": { - "imurmurhash": "^0.1.4" + "hosted-git-info": "^6.0.0", + "proc-log": "^3.0.0", + "semver": "^7.3.5", + "validate-npm-package-name": "^5.0.0" }, "engines": { - "node": "^12.13.0 || ^14.15.0 || >=16.0.0" + "node": "^14.17.0 || ^16.13.0 || >=18.0.0" } }, - "node_modules/libnpmaccess/node_modules/yallist": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", - "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==", - "dev": true - }, "node_modules/libnpmpublish": { - "version": "7.1.4", - "resolved": "https://registry.npmjs.org/libnpmpublish/-/libnpmpublish-7.1.4.tgz", - "integrity": "sha512-mMntrhVwut5prP4rJ228eEbEyvIzLWhqFuY90j5QeXBCTT2pWSMno7Yo2S2qplPUr02zPurGH4heGLZ+wORczg==", + "version": "7.3.0", + "resolved": "https://registry.npmjs.org/libnpmpublish/-/libnpmpublish-7.3.0.tgz", + "integrity": "sha512-fHUxw5VJhZCNSls0KLNEG0mCD2PN1i14gH5elGOgiVnU3VgTcRahagYP2LKI1m0tFCJ+XrAm0zVYyF5RCbXzcg==", "dev": true, "dependencies": { "ci-info": "^3.6.1", @@ -12593,6 +11614,27 @@ "node": "^14.17.0 || ^16.13.0 || >=18.0.0" } }, + "node_modules/libnpmpublish/node_modules/hosted-git-info": { + "version": "6.1.1", + "resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-6.1.1.tgz", + "integrity": "sha512-r0EI+HBMcXadMrugk0GCQ+6BQV39PiWAZVfq7oIckeGiN7sjRGyQxPdft3nQekFTCQbYxLBH+/axZMeH8UX6+w==", + "dev": true, + "dependencies": { + "lru-cache": "^7.5.1" + }, + "engines": { + "node": "^14.17.0 || ^16.13.0 || >=18.0.0" + } + }, + "node_modules/libnpmpublish/node_modules/lru-cache": { + "version": "7.18.3", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-7.18.3.tgz", + "integrity": "sha512-jumlc0BIUrS3qJGgIkWZsyfAM7NCWiBcCDhnd+3NNM5KbBmLTgHVfWBcg6W+rLUsIpzpERPsvwUP7CckAQSOoA==", + "dev": true, + "engines": { + "node": ">=12" + } + }, "node_modules/libnpmpublish/node_modules/minipass": { "version": "7.0.3", "resolved": "https://registry.npmjs.org/minipass/-/minipass-7.0.3.tgz", @@ -12602,6 +11644,21 @@ "node": ">=16 || 14 >=14.17" } }, + "node_modules/libnpmpublish/node_modules/normalize-package-data": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/normalize-package-data/-/normalize-package-data-5.0.0.tgz", + "integrity": "sha512-h9iPVIfrVZ9wVYQnxFgtw1ugSvGEMOlyPWWtm8BMJhnwyEL/FLbYbTY3V3PpjI/BUK67n9PEWDu6eHzu1fB15Q==", + "dev": true, + "dependencies": { + "hosted-git-info": "^6.0.0", + "is-core-module": "^2.8.1", + "semver": "^7.3.5", + "validate-npm-package-license": "^3.0.4" + }, + "engines": { + "node": "^14.17.0 || ^16.13.0 || >=18.0.0" + } + }, "node_modules/libnpmpublish/node_modules/npm-package-arg": { "version": "10.1.0", "resolved": "https://registry.npmjs.org/npm-package-arg/-/npm-package-arg-10.1.0.tgz", @@ -12629,18 +11686,6 @@ "node": "^14.17.0 || ^16.13.0 || >=18.0.0" } }, - "node_modules/libnpmpublish/node_modules/validate-npm-package-name": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/validate-npm-package-name/-/validate-npm-package-name-5.0.0.tgz", - "integrity": "sha512-YuKoXDAhBYxY7SfOKxHBDoSyENFeW5VvIIQp2TGQuit8gpK6MnWaQelBKxso72DoxTZfZdcP3W90LqpSkgPzLQ==", - "dev": true, - "dependencies": { - "builtins": "^5.0.0" - }, - "engines": { - "node": "^14.17.0 || ^16.13.0 || >=18.0.0" - } - }, "node_modules/lilconfig": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/lilconfig/-/lilconfig-2.1.0.tgz", @@ -12660,9 +11705,9 @@ } }, "node_modules/lint-staged": { - "version": "13.3.0", - "resolved": "https://registry.npmjs.org/lint-staged/-/lint-staged-13.3.0.tgz", - "integrity": "sha512-mPRtrYnipYYv1FEE134ufbWpeggNTo+O/UPzngoaKzbzHAthvR55am+8GfHTnqNRQVRRrYQLGW9ZyUoD7DsBHQ==", + "version": "14.0.1", + "resolved": "https://registry.npmjs.org/lint-staged/-/lint-staged-14.0.1.tgz", + "integrity": "sha512-Mw0cL6HXnHN1ag0mN/Dg4g6sr8uf8sn98w2Oc1ECtFto9tvRF7nkXGJRbx8gPlHyoR0pLyBr2lQHbWwmUHe1Sw==", "dev": true, "dependencies": { "chalk": "5.3.0", @@ -13316,16 +12361,10 @@ } }, "node_modules/meow/node_modules/hosted-git-info": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-4.1.0.tgz", - "integrity": "sha512-kyCuEOWjJqZuDbRHzL8V93NzQhwIB71oFWSyzVo+KPZI+pnQPPxucdkrOZvkLRnrf5URsQM+IJ09Dw29cRALIA==", - "dev": true, - "dependencies": { - "lru-cache": "^6.0.0" - }, - "engines": { - "node": ">=10" - } + "version": "2.8.9", + "resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-2.8.9.tgz", + "integrity": "sha512-mxIDAb9Lsm6DoOJ7xH+5+X4y1LU/4Hi50L9C5sIswK3JzULS4bwk1FvjdBgvYR4bzT4tuUQiC15FE2f5HbLvYw==", + "dev": true }, "node_modules/meow/node_modules/locate-path": { "version": "5.0.0", @@ -13339,33 +12378,6 @@ "node": ">=8" } }, - "node_modules/meow/node_modules/lru-cache": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz", - "integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==", - "dev": true, - "dependencies": { - "yallist": "^4.0.0" - }, - "engines": { - "node": ">=10" - } - }, - "node_modules/meow/node_modules/normalize-package-data": { - "version": "3.0.3", - "resolved": "https://registry.npmjs.org/normalize-package-data/-/normalize-package-data-3.0.3.tgz", - "integrity": "sha512-p2W1sgqij3zMMyRC067Dg16bfzVH+w7hyegmpIvZ4JNjqtGOVAIvLmjBx3yP7YTe9vKJgkoNOPjwQGogDoMXFA==", - "dev": true, - "dependencies": { - "hosted-git-info": "^4.0.1", - "is-core-module": "^2.5.0", - "semver": "^7.3.4", - "validate-npm-package-license": "^3.0.1" - }, - "engines": { - "node": ">=10" - } - }, "node_modules/meow/node_modules/p-limit": { "version": "2.3.0", "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.3.0.tgz", @@ -13434,12 +12446,6 @@ "node": ">=8" } }, - "node_modules/meow/node_modules/read-pkg/node_modules/hosted-git-info": { - "version": "2.8.9", - "resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-2.8.9.tgz", - "integrity": "sha512-mxIDAb9Lsm6DoOJ7xH+5+X4y1LU/4Hi50L9C5sIswK3JzULS4bwk1FvjdBgvYR4bzT4tuUQiC15FE2f5HbLvYw==", - "dev": true - }, "node_modules/meow/node_modules/read-pkg/node_modules/normalize-package-data": { "version": "2.5.0", "resolved": "https://registry.npmjs.org/normalize-package-data/-/normalize-package-data-2.5.0.tgz", @@ -13452,15 +12458,6 @@ "validate-npm-package-license": "^3.0.1" } }, - "node_modules/meow/node_modules/read-pkg/node_modules/semver": { - "version": "5.7.2", - "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.2.tgz", - "integrity": "sha512-cBznnQ9KjJqU67B52RMC65CMarK2600WFnbkcaiwWq3xy/5haFJlshgnpjovMVJ+Hff49d8GEn0b87C5pDQ10g==", - "dev": true, - "bin": { - "semver": "bin/semver" - } - }, "node_modules/meow/node_modules/read-pkg/node_modules/type-fest": { "version": "0.6.0", "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.6.0.tgz", @@ -13470,6 +12467,15 @@ "node": ">=8" } }, + "node_modules/meow/node_modules/semver": { + "version": "5.7.2", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.2.tgz", + "integrity": "sha512-cBznnQ9KjJqU67B52RMC65CMarK2600WFnbkcaiwWq3xy/5haFJlshgnpjovMVJ+Hff49d8GEn0b87C5pDQ10g==", + "dev": true, + "bin": { + "semver": "bin/semver" + } + }, "node_modules/meow/node_modules/type-fest": { "version": "0.18.1", "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.18.1.tgz", @@ -13482,12 +12488,6 @@ "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/meow/node_modules/yallist": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", - "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==", - "dev": true - }, "node_modules/merge-stream": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/merge-stream/-/merge-stream-2.0.0.tgz", @@ -13559,7 +12559,6 @@ "version": "3.1.2", "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", - "dev": true, "dependencies": { "brace-expansion": "^1.1.7" }, @@ -13816,20 +12815,6 @@ "node": ">=10" } }, - "node_modules/mkdirp-infer-owner": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/mkdirp-infer-owner/-/mkdirp-infer-owner-2.0.0.tgz", - "integrity": "sha512-sdqtiFt3lkOaYvTXSRIUjkIdPTcxgv5+fgqYE/5qgwdw12cOrAuzzgzvVExIkH/ul1oeHN3bCLOWSG3XOqbKKw==", - "dev": true, - "dependencies": { - "chownr": "^2.0.0", - "infer-owner": "^1.0.4", - "mkdirp": "^1.0.3" - }, - "engines": { - "node": ">=10" - } - }, "node_modules/mnemonist": { "version": "0.38.3", "resolved": "https://registry.npmjs.org/mnemonist/-/mnemonist-0.38.3.tgz", @@ -13893,12 +12878,6 @@ "integrity": "sha512-OWND8ei3VtNC9h7V60qff3SVobHr996CTwgxubgyQYEpg290h9J0buyECNNJexkFm5sOajh5G116RYA1c8ZMSw==", "dev": true }, - "node_modules/natural-compare-lite": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/natural-compare-lite/-/natural-compare-lite-1.4.0.tgz", - "integrity": "sha512-Tj+HTDSJJKaZnfiuw+iaF9skdPpTo2GtEly5JHnWV/hfv2Qj/9RKsGISQtLh2ox3l5EAGw487hnBee0sIJ6v2g==", - "dev": true - }, "node_modules/negotiator": { "version": "0.6.3", "resolved": "https://registry.npmjs.org/negotiator/-/negotiator-0.6.3.tgz", @@ -13998,27 +12977,6 @@ "node-gyp-build-test": "build-test.js" } }, - "node_modules/node-gyp/node_modules/abbrev": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/abbrev/-/abbrev-1.1.1.tgz", - "integrity": "sha512-nne9/IiQ/hzIhY6pdDnbBtz7DjPTKrY00P/zvPSm5pOFkl6xuGrGnXn/VtTNNfNtAfZ9/1RtehkszU9qcTii0Q==", - "dev": true - }, - "node_modules/node-gyp/node_modules/nopt": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/nopt/-/nopt-6.0.0.tgz", - "integrity": "sha512-ZwLpbTgdhuZUnZzjd7nb1ZV+4DoiC6/sfiVKok72ym/4Tlf+DFdlHYmT2JPmcNNWV6Pi3SDf1kT+A4r9RTuT9g==", - "dev": true, - "dependencies": { - "abbrev": "^1.0.0" - }, - "bin": { - "nopt": "bin/nopt.js" - }, - "engines": { - "node": "^12.13.0 || ^14.15.0 || >=16.0.0" - } - }, "node_modules/node-gyp/node_modules/rimraf": { "version": "3.0.2", "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-3.0.2.tgz", @@ -14040,6 +12998,12 @@ "integrity": "sha512-O5lz91xSOeoXP6DulyHfllpq+Eg00MWitZIbtPfoSEvqIHdl5gfcY6hYzDWnj0qD5tz52PI08u9qUvSVeUBeHw==", "dev": true }, + "node_modules/node-machine-id": { + "version": "1.1.12", + "resolved": "https://registry.npmjs.org/node-machine-id/-/node-machine-id-1.1.12.tgz", + "integrity": "sha512-QNABxbrPa3qEIfrE6GOJ7BYIuignnJw7iQ2YPbc3Nla1HzRJjXzZOiikfF8m7eAMfichLt3M4VgLOetqgDmgGQ==", + "dev": true + }, "node_modules/node-releases": { "version": "2.0.13", "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-2.0.13.tgz", @@ -14047,33 +13011,33 @@ "dev": true }, "node_modules/nopt": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/nopt/-/nopt-7.2.0.tgz", - "integrity": "sha512-CVDtwCdhYIvnAzFoJ6NJ6dX3oga9/HyciQDnG1vQDjSLMeKLJ4A93ZqYKDrgYSr1FBY5/hMYC+2VCi24pgpkGA==", + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/nopt/-/nopt-6.0.0.tgz", + "integrity": "sha512-ZwLpbTgdhuZUnZzjd7nb1ZV+4DoiC6/sfiVKok72ym/4Tlf+DFdlHYmT2JPmcNNWV6Pi3SDf1kT+A4r9RTuT9g==", "dev": true, "dependencies": { - "abbrev": "^2.0.0" + "abbrev": "^1.0.0" }, "bin": { "nopt": "bin/nopt.js" }, "engines": { - "node": "^14.17.0 || ^16.13.0 || >=18.0.0" + "node": "^12.13.0 || ^14.15.0 || >=16.0.0" } }, "node_modules/normalize-package-data": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/normalize-package-data/-/normalize-package-data-5.0.0.tgz", - "integrity": "sha512-h9iPVIfrVZ9wVYQnxFgtw1ugSvGEMOlyPWWtm8BMJhnwyEL/FLbYbTY3V3PpjI/BUK67n9PEWDu6eHzu1fB15Q==", + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/normalize-package-data/-/normalize-package-data-3.0.3.tgz", + "integrity": "sha512-p2W1sgqij3zMMyRC067Dg16bfzVH+w7hyegmpIvZ4JNjqtGOVAIvLmjBx3yP7YTe9vKJgkoNOPjwQGogDoMXFA==", "dev": true, "dependencies": { - "hosted-git-info": "^6.0.0", - "is-core-module": "^2.8.1", - "semver": "^7.3.5", - "validate-npm-package-license": "^3.0.4" + "hosted-git-info": "^4.0.1", + "is-core-module": "^2.5.0", + "semver": "^7.3.4", + "validate-npm-package-license": "^3.0.1" }, "engines": { - "node": "^14.17.0 || ^16.13.0 || >=18.0.0" + "node": ">=10" } }, "node_modules/normalize-path": { @@ -14086,15 +13050,12 @@ } }, "node_modules/npm-bundled": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/npm-bundled/-/npm-bundled-3.0.0.tgz", - "integrity": "sha512-Vq0eyEQy+elFpzsKjMss9kxqb9tG3YHg4dsyWuUENuzvSUWe1TCnW/vV9FkhvBk/brEDoDiVd+M1Btosa6ImdQ==", + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/npm-bundled/-/npm-bundled-1.1.2.tgz", + "integrity": "sha512-x5DHup0SuyQcmL3s7Rx/YQ8sbw/Hzg0rj48eN0dV7hf5cmQq5PXIeioroH3raV1QC1yh3uTYuMThvEQF3iKgGQ==", "dev": true, "dependencies": { - "npm-normalize-package-bin": "^3.0.0" - }, - "engines": { - "node": "^14.17.0 || ^16.13.0 || >=18.0.0" + "npm-normalize-package-bin": "^1.0.1" } }, "node_modules/npm-install-checks": { @@ -14110,13 +13071,10 @@ } }, "node_modules/npm-normalize-package-bin": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/npm-normalize-package-bin/-/npm-normalize-package-bin-3.0.1.tgz", - "integrity": "sha512-dMxCf+zZ+3zeQZXKxmyuCKlIDPGuv8EF940xbkC4kQVDTtqoh6rJFO+JTKSA6/Rwi0getWmtuy4Itup0AMcaDQ==", - "dev": true, - "engines": { - "node": "^14.17.0 || ^16.13.0 || >=18.0.0" - } + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/npm-normalize-package-bin/-/npm-normalize-package-bin-1.0.1.tgz", + "integrity": "sha512-EPfafl6JL5/rU+ot6P3gRSCpPDW5VmIzX959Ob1+ySFUuuYHWHekXpwdUZcKP5C+DS4GEtdJluwBjnsNDl+fSA==", + "dev": true }, "node_modules/npm-package-arg": { "version": "8.1.1", @@ -14235,32 +13193,47 @@ "node": ">=10" } }, - "node_modules/npm-packlist/node_modules/npm-bundled": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/npm-bundled/-/npm-bundled-1.1.2.tgz", - "integrity": "sha512-x5DHup0SuyQcmL3s7Rx/YQ8sbw/Hzg0rj48eN0dV7hf5cmQq5PXIeioroH3raV1QC1yh3uTYuMThvEQF3iKgGQ==", + "node_modules/npm-pick-manifest": { + "version": "8.0.2", + "resolved": "https://registry.npmjs.org/npm-pick-manifest/-/npm-pick-manifest-8.0.2.tgz", + "integrity": "sha512-1dKY+86/AIiq1tkKVD3l0WI+Gd3vkknVGAggsFeBkTvbhMQ1OND/LKkYv4JtXPKUJ8bOTCyLiqEg2P6QNdK+Gg==", "dev": true, "dependencies": { - "npm-normalize-package-bin": "^1.0.1" + "npm-install-checks": "^6.0.0", + "npm-normalize-package-bin": "^3.0.0", + "npm-package-arg": "^10.0.0", + "semver": "^7.3.5" + }, + "engines": { + "node": "^14.17.0 || ^16.13.0 || >=18.0.0" } }, - "node_modules/npm-packlist/node_modules/npm-normalize-package-bin": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/npm-normalize-package-bin/-/npm-normalize-package-bin-1.0.1.tgz", - "integrity": "sha512-EPfafl6JL5/rU+ot6P3gRSCpPDW5VmIzX959Ob1+ySFUuuYHWHekXpwdUZcKP5C+DS4GEtdJluwBjnsNDl+fSA==", - "dev": true + "node_modules/npm-pick-manifest/node_modules/hosted-git-info": { + "version": "6.1.1", + "resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-6.1.1.tgz", + "integrity": "sha512-r0EI+HBMcXadMrugk0GCQ+6BQV39PiWAZVfq7oIckeGiN7sjRGyQxPdft3nQekFTCQbYxLBH+/axZMeH8UX6+w==", + "dev": true, + "dependencies": { + "lru-cache": "^7.5.1" + }, + "engines": { + "node": "^14.17.0 || ^16.13.0 || >=18.0.0" + } }, - "node_modules/npm-pick-manifest": { - "version": "8.0.2", - "resolved": "https://registry.npmjs.org/npm-pick-manifest/-/npm-pick-manifest-8.0.2.tgz", - "integrity": "sha512-1dKY+86/AIiq1tkKVD3l0WI+Gd3vkknVGAggsFeBkTvbhMQ1OND/LKkYv4JtXPKUJ8bOTCyLiqEg2P6QNdK+Gg==", + "node_modules/npm-pick-manifest/node_modules/lru-cache": { + "version": "7.18.3", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-7.18.3.tgz", + "integrity": "sha512-jumlc0BIUrS3qJGgIkWZsyfAM7NCWiBcCDhnd+3NNM5KbBmLTgHVfWBcg6W+rLUsIpzpERPsvwUP7CckAQSOoA==", + "dev": true, + "engines": { + "node": ">=12" + } + }, + "node_modules/npm-pick-manifest/node_modules/npm-normalize-package-bin": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/npm-normalize-package-bin/-/npm-normalize-package-bin-3.0.1.tgz", + "integrity": "sha512-dMxCf+zZ+3zeQZXKxmyuCKlIDPGuv8EF940xbkC4kQVDTtqoh6rJFO+JTKSA6/Rwi0getWmtuy4Itup0AMcaDQ==", "dev": true, - "dependencies": { - "npm-install-checks": "^6.0.0", - "npm-normalize-package-bin": "^3.0.0", - "npm-package-arg": "^10.0.0", - "semver": "^7.3.5" - }, "engines": { "node": "^14.17.0 || ^16.13.0 || >=18.0.0" } @@ -14280,18 +13253,6 @@ "node": "^14.17.0 || ^16.13.0 || >=18.0.0" } }, - "node_modules/npm-pick-manifest/node_modules/validate-npm-package-name": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/validate-npm-package-name/-/validate-npm-package-name-5.0.0.tgz", - "integrity": "sha512-YuKoXDAhBYxY7SfOKxHBDoSyENFeW5VvIIQp2TGQuit8gpK6MnWaQelBKxso72DoxTZfZdcP3W90LqpSkgPzLQ==", - "dev": true, - "dependencies": { - "builtins": "^5.0.0" - }, - "engines": { - "node": "^14.17.0 || ^16.13.0 || >=18.0.0" - } - }, "node_modules/npm-registry-fetch": { "version": "14.0.5", "resolved": "https://registry.npmjs.org/npm-registry-fetch/-/npm-registry-fetch-14.0.5.tgz", @@ -14310,6 +13271,27 @@ "node": "^14.17.0 || ^16.13.0 || >=18.0.0" } }, + "node_modules/npm-registry-fetch/node_modules/hosted-git-info": { + "version": "6.1.1", + "resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-6.1.1.tgz", + "integrity": "sha512-r0EI+HBMcXadMrugk0GCQ+6BQV39PiWAZVfq7oIckeGiN7sjRGyQxPdft3nQekFTCQbYxLBH+/axZMeH8UX6+w==", + "dev": true, + "dependencies": { + "lru-cache": "^7.5.1" + }, + "engines": { + "node": "^14.17.0 || ^16.13.0 || >=18.0.0" + } + }, + "node_modules/npm-registry-fetch/node_modules/lru-cache": { + "version": "7.18.3", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-7.18.3.tgz", + "integrity": "sha512-jumlc0BIUrS3qJGgIkWZsyfAM7NCWiBcCDhnd+3NNM5KbBmLTgHVfWBcg6W+rLUsIpzpERPsvwUP7CckAQSOoA==", + "dev": true, + "engines": { + "node": ">=12" + } + }, "node_modules/npm-registry-fetch/node_modules/npm-package-arg": { "version": "10.1.0", "resolved": "https://registry.npmjs.org/npm-package-arg/-/npm-package-arg-10.1.0.tgz", @@ -14325,18 +13307,6 @@ "node": "^14.17.0 || ^16.13.0 || >=18.0.0" } }, - "node_modules/npm-registry-fetch/node_modules/validate-npm-package-name": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/validate-npm-package-name/-/validate-npm-package-name-5.0.0.tgz", - "integrity": "sha512-YuKoXDAhBYxY7SfOKxHBDoSyENFeW5VvIIQp2TGQuit8gpK6MnWaQelBKxso72DoxTZfZdcP3W90LqpSkgPzLQ==", - "dev": true, - "dependencies": { - "builtins": "^5.0.0" - }, - "engines": { - "node": "^14.17.0 || ^16.13.0 || >=18.0.0" - } - }, "node_modules/npm-run-path": { "version": "4.0.1", "resolved": "https://registry.npmjs.org/npm-run-path/-/npm-run-path-4.0.1.tgz", @@ -14365,14 +13335,13 @@ } }, "node_modules/nx": { - "version": "15.9.7", - "resolved": "https://registry.npmjs.org/nx/-/nx-15.9.7.tgz", - "integrity": "sha512-1qlEeDjX9OKZEryC8i4bA+twNg+lB5RKrozlNwWx/lLJHqWPUfvUTvxh+uxlPYL9KzVReQjUuxMLFMsHNqWUrA==", + "version": "16.8.1", + "resolved": "https://registry.npmjs.org/nx/-/nx-16.8.1.tgz", + "integrity": "sha512-K5KrwNdPz0eEe6SY5wrnhZcigjfIJkttPrIJRXNBQTE50NGcOfz1TjMXPdTWBxBCCua5PAealO3OrE8jpv+QnQ==", "dev": true, "hasInstallScript": true, "dependencies": { - "@nrwl/cli": "15.9.7", - "@nrwl/tao": "15.9.7", + "@nrwl/tao": "16.8.1", "@parcel/watcher": "2.0.4", "@yarnpkg/lockfile": "^1.1.0", "@yarnpkg/parsers": "3.0.0-rc.46", @@ -14382,7 +13351,8 @@ "cli-cursor": "3.1.0", "cli-spinners": "2.6.1", "cliui": "^7.0.2", - "dotenv": "~10.0.0", + "dotenv": "~16.3.1", + "dotenv-expand": "~10.0.0", "enquirer": "~2.3.6", "fast-glob": "3.2.7", "figures": "3.2.0", @@ -14394,9 +13364,10 @@ "jsonc-parser": "3.2.0", "lines-and-columns": "~2.0.3", "minimatch": "3.0.5", + "node-machine-id": "1.1.12", "npm-run-path": "^4.0.1", "open": "^8.4.0", - "semver": "7.5.4", + "semver": "7.5.3", "string-width": "^4.2.3", "strong-log-transformer": "^2.1.0", "tar-stream": "~2.2.0", @@ -14411,15 +13382,16 @@ "nx": "bin/nx.js" }, "optionalDependencies": { - "@nrwl/nx-darwin-arm64": "15.9.7", - "@nrwl/nx-darwin-x64": "15.9.7", - "@nrwl/nx-linux-arm-gnueabihf": "15.9.7", - "@nrwl/nx-linux-arm64-gnu": "15.9.7", - "@nrwl/nx-linux-arm64-musl": "15.9.7", - "@nrwl/nx-linux-x64-gnu": "15.9.7", - "@nrwl/nx-linux-x64-musl": "15.9.7", - "@nrwl/nx-win32-arm64-msvc": "15.9.7", - "@nrwl/nx-win32-x64-msvc": "15.9.7" + "@nx/nx-darwin-arm64": "16.8.1", + "@nx/nx-darwin-x64": "16.8.1", + "@nx/nx-freebsd-x64": "16.8.1", + "@nx/nx-linux-arm-gnueabihf": "16.8.1", + "@nx/nx-linux-arm64-gnu": "16.8.1", + "@nx/nx-linux-arm64-musl": "16.8.1", + "@nx/nx-linux-x64-gnu": "16.8.1", + "@nx/nx-linux-x64-musl": "16.8.1", + "@nx/nx-win32-arm64-msvc": "16.8.1", + "@nx/nx-win32-x64-msvc": "16.8.1" }, "peerDependencies": { "@swc-node/register": "^1.4.2", @@ -14450,20 +13422,6 @@ "node": ">=8" } }, - "node_modules/nx/node_modules/fs-extra": { - "version": "11.1.1", - "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-11.1.1.tgz", - "integrity": "sha512-MGIE4HOvQCeUCzmlHs0vXpih4ysz4wg9qiSAu6cd42lVwPbTM1TjV7RusoyQqMmk/95gdQZX72u+YW+c3eEpFQ==", - "dev": true, - "dependencies": { - "graceful-fs": "^4.2.0", - "jsonfile": "^6.0.1", - "universalify": "^2.0.0" - }, - "engines": { - "node": ">=14.14" - } - }, "node_modules/nx/node_modules/glob": { "version": "7.1.4", "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.4.tgz", @@ -14493,6 +13451,18 @@ "node": ">= 6" } }, + "node_modules/nx/node_modules/lru-cache": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz", + "integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==", + "dev": true, + "dependencies": { + "yallist": "^4.0.0" + }, + "engines": { + "node": ">=10" + } + }, "node_modules/nx/node_modules/minimatch": { "version": "3.0.5", "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.5.tgz", @@ -14505,6 +13475,21 @@ "node": "*" } }, + "node_modules/nx/node_modules/semver": { + "version": "7.5.3", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.5.3.tgz", + "integrity": "sha512-QBlUtyVk/5EeHbi7X0fw6liDZc7BBmEaSYn01fMU1OUYbf6GPsbTtd8WmnqbI20SeycoHSeiybkE/q1Q+qlThQ==", + "dev": true, + "dependencies": { + "lru-cache": "^6.0.0" + }, + "bin": { + "semver": "bin/semver.js" + }, + "engines": { + "node": ">=10" + } + }, "node_modules/nx/node_modules/strip-bom": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-3.0.0.tgz", @@ -14528,6 +13513,12 @@ "node": ">=6" } }, + "node_modules/nx/node_modules/yallist": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", + "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==", + "dev": true + }, "node_modules/nx/node_modules/yargs-parser": { "version": "21.1.1", "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-21.1.1.tgz", @@ -14857,9 +13848,9 @@ } }, "node_modules/pacote": { - "version": "15.1.1", - "resolved": "https://registry.npmjs.org/pacote/-/pacote-15.1.1.tgz", - "integrity": "sha512-eeqEe77QrA6auZxNHIp+1TzHQ0HBKf5V6c8zcaYZ134EJe1lCi+fjXATkNiEEfbG+e50nu02GLvUtmZcGOYabQ==", + "version": "15.2.0", + "resolved": "https://registry.npmjs.org/pacote/-/pacote-15.2.0.tgz", + "integrity": "sha512-rJVZeIwHTUta23sIZgEIM62WYwbmGbThdbnkt81ravBplQv+HjyroqnLRNH2+sLJHcGZmLRmhPwACqhfTcOmnA==", "dev": true, "dependencies": { "@npmcli/git": "^4.0.0", @@ -14868,7 +13859,7 @@ "@npmcli/run-script": "^6.0.0", "cacache": "^17.0.0", "fs-minipass": "^3.0.0", - "minipass": "^4.0.0", + "minipass": "^5.0.0", "npm-package-arg": "^10.0.0", "npm-packlist": "^7.0.0", "npm-pick-manifest": "^8.0.0", @@ -14877,7 +13868,7 @@ "promise-retry": "^2.0.1", "read-package-json": "^6.0.0", "read-package-json-fast": "^3.0.0", - "sigstore": "^1.0.0", + "sigstore": "^1.3.0", "ssri": "^10.0.0", "tar": "^6.1.11" }, @@ -14888,22 +13879,6 @@ "node": "^14.17.0 || ^16.13.0 || >=18.0.0" } }, - "node_modules/pacote/node_modules/@npmcli/run-script": { - "version": "6.0.2", - "resolved": "https://registry.npmjs.org/@npmcli/run-script/-/run-script-6.0.2.tgz", - "integrity": "sha512-NCcr1uQo1k5U+SYlnIrbAh3cxy+OQT1VtqiAbxdymSlptbzBb62AjH2xXgjNCoP073hoa1CfCAcwoZ8k96C4nA==", - "dev": true, - "dependencies": { - "@npmcli/node-gyp": "^3.0.0", - "@npmcli/promise-spawn": "^6.0.0", - "node-gyp": "^9.0.0", - "read-package-json-fast": "^3.0.0", - "which": "^3.0.0" - }, - "engines": { - "node": "^14.17.0 || ^16.13.0 || >=18.0.0" - } - }, "node_modules/pacote/node_modules/brace-expansion": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz", @@ -14913,35 +13888,16 @@ "balanced-match": "^1.0.0" } }, - "node_modules/pacote/node_modules/glob": { - "version": "10.3.4", - "resolved": "https://registry.npmjs.org/glob/-/glob-10.3.4.tgz", - "integrity": "sha512-6LFElP3A+i/Q8XQKEvZjkEWEOTgAIALR9AO2rwT8bgPhDd1anmqDJDZ6lLddI4ehxxxR1S5RIqKe1uapMQfYaQ==", + "node_modules/pacote/node_modules/hosted-git-info": { + "version": "6.1.1", + "resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-6.1.1.tgz", + "integrity": "sha512-r0EI+HBMcXadMrugk0GCQ+6BQV39PiWAZVfq7oIckeGiN7sjRGyQxPdft3nQekFTCQbYxLBH+/axZMeH8UX6+w==", "dev": true, "dependencies": { - "foreground-child": "^3.1.0", - "jackspeak": "^2.0.3", - "minimatch": "^9.0.1", - "minipass": "^5.0.0 || ^6.0.2 || ^7.0.0", - "path-scurry": "^1.10.1" - }, - "bin": { - "glob": "dist/cjs/src/bin.js" - }, - "engines": { - "node": ">=16 || 14 >=14.17" + "lru-cache": "^7.5.1" }, - "funding": { - "url": "https://github.com/sponsors/isaacs" - } - }, - "node_modules/pacote/node_modules/glob/node_modules/minipass": { - "version": "7.0.3", - "resolved": "https://registry.npmjs.org/minipass/-/minipass-7.0.3.tgz", - "integrity": "sha512-LhbbwCfz3vsb12j/WkWQPZfKTsgqIe1Nf/ti1pKjYESGLHIVjWU96G9/ljLH4F9mWNVhlQOm0VySdAWzf05dpg==", - "dev": true, "engines": { - "node": ">=16 || 14 >=14.17" + "node": "^14.17.0 || ^16.13.0 || >=18.0.0" } }, "node_modules/pacote/node_modules/ignore-walk": { @@ -14956,13 +13912,13 @@ "node": "^14.17.0 || ^16.13.0 || >=18.0.0" } }, - "node_modules/pacote/node_modules/json-parse-even-better-errors": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/json-parse-even-better-errors/-/json-parse-even-better-errors-3.0.0.tgz", - "integrity": "sha512-iZbGHafX/59r39gPwVPRBGw0QQKnA7tte5pSMrhWOW7swGsVvVTjmfyAV9pNqk8YGT7tRCdxRu8uzcgZwoDooA==", + "node_modules/pacote/node_modules/lru-cache": { + "version": "7.18.3", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-7.18.3.tgz", + "integrity": "sha512-jumlc0BIUrS3qJGgIkWZsyfAM7NCWiBcCDhnd+3NNM5KbBmLTgHVfWBcg6W+rLUsIpzpERPsvwUP7CckAQSOoA==", "dev": true, "engines": { - "node": "^14.17.0 || ^16.13.0 || >=18.0.0" + "node": ">=12" } }, "node_modules/pacote/node_modules/minimatch": { @@ -14980,15 +13936,6 @@ "url": "https://github.com/sponsors/isaacs" } }, - "node_modules/pacote/node_modules/minipass": { - "version": "4.2.8", - "resolved": "https://registry.npmjs.org/minipass/-/minipass-4.2.8.tgz", - "integrity": "sha512-fNzuVyifolSLFL4NzpF+wEF4qrgqaaKX0haXPQEdQ7NKAN+WecoKMHV09YcuL/DHxrUsYQOK3MiuDf7Ip2OXfQ==", - "dev": true, - "engines": { - "node": ">=8" - } - }, "node_modules/pacote/node_modules/npm-package-arg": { "version": "10.1.0", "resolved": "https://registry.npmjs.org/npm-package-arg/-/npm-package-arg-10.1.0.tgz", @@ -15016,21 +13963,6 @@ "node": "^14.17.0 || ^16.13.0 || >=18.0.0" } }, - "node_modules/pacote/node_modules/read-package-json": { - "version": "6.0.4", - "resolved": "https://registry.npmjs.org/read-package-json/-/read-package-json-6.0.4.tgz", - "integrity": "sha512-AEtWXYfopBj2z5N5PbkAOeNHRPUg5q+Nen7QLxV8M2zJq1ym6/lCz3fYNTCXe19puu2d06jfHhrP7v/S2PtMMw==", - "dev": true, - "dependencies": { - "glob": "^10.2.2", - "json-parse-even-better-errors": "^3.0.0", - "normalize-package-data": "^5.0.0", - "npm-normalize-package-bin": "^3.0.0" - }, - "engines": { - "node": "^14.17.0 || ^16.13.0 || >=18.0.0" - } - }, "node_modules/pacote/node_modules/ssri": { "version": "10.0.5", "resolved": "https://registry.npmjs.org/ssri/-/ssri-10.0.5.tgz", @@ -15052,33 +13984,6 @@ "node": ">=16 || 14 >=14.17" } }, - "node_modules/pacote/node_modules/validate-npm-package-name": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/validate-npm-package-name/-/validate-npm-package-name-5.0.0.tgz", - "integrity": "sha512-YuKoXDAhBYxY7SfOKxHBDoSyENFeW5VvIIQp2TGQuit8gpK6MnWaQelBKxso72DoxTZfZdcP3W90LqpSkgPzLQ==", - "dev": true, - "dependencies": { - "builtins": "^5.0.0" - }, - "engines": { - "node": "^14.17.0 || ^16.13.0 || >=18.0.0" - } - }, - "node_modules/pacote/node_modules/which": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/which/-/which-3.0.1.tgz", - "integrity": "sha512-XA1b62dzQzLfaEOSQFTCOd5KFf/1VSzZo7/7TUjnya6u0vGGKzU96UQBZTAThCb2j4/xjBAyii1OhRLJEivHvg==", - "dev": true, - "dependencies": { - "isexe": "^2.0.0" - }, - "bin": { - "node-which": "bin/which.js" - }, - "engines": { - "node": "^14.17.0 || ^16.13.0 || >=18.0.0" - } - }, "node_modules/parent-module": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/parent-module/-/parent-module-1.0.1.tgz", @@ -15091,29 +13996,6 @@ "node": ">=6" } }, - "node_modules/parse-conflict-json": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/parse-conflict-json/-/parse-conflict-json-3.0.1.tgz", - "integrity": "sha512-01TvEktc68vwbJOtWZluyWeVGWjP+bZwXtPDMQVbBKzbJ/vZBif0L69KH1+cHv1SZ6e0FKLvjyHe8mqsIqYOmw==", - "dev": true, - "dependencies": { - "json-parse-even-better-errors": "^3.0.0", - "just-diff": "^6.0.0", - "just-diff-apply": "^5.2.0" - }, - "engines": { - "node": "^14.17.0 || ^16.13.0 || >=18.0.0" - } - }, - "node_modules/parse-conflict-json/node_modules/json-parse-even-better-errors": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/json-parse-even-better-errors/-/json-parse-even-better-errors-3.0.0.tgz", - "integrity": "sha512-iZbGHafX/59r39gPwVPRBGw0QQKnA7tte5pSMrhWOW7swGsVvVTjmfyAV9pNqk8YGT7tRCdxRu8uzcgZwoDooA==", - "dev": true, - "engines": { - "node": "^14.17.0 || ^16.13.0 || >=18.0.0" - } - }, "node_modules/parse-json": { "version": "5.2.0", "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-5.2.0.tgz", @@ -15364,19 +14246,6 @@ "node": ">=8" } }, - "node_modules/postcss-selector-parser": { - "version": "6.0.13", - "resolved": "https://registry.npmjs.org/postcss-selector-parser/-/postcss-selector-parser-6.0.13.tgz", - "integrity": "sha512-EaV1Gl4mUEV4ddhDnv/xtj7sxwrwxdetHdWUGnT4VJQf+4d05v6lHYZr8N573k5Z0BViss7BDhfWtKS3+sfAqQ==", - "dev": true, - "dependencies": { - "cssesc": "^3.0.0", - "util-deprecate": "^1.0.2" - }, - "engines": { - "node": ">=4" - } - }, "node_modules/prelude-ls": { "version": "1.2.1", "resolved": "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.2.1.tgz", @@ -15387,15 +14256,15 @@ } }, "node_modules/prettier": { - "version": "2.8.8", - "resolved": "https://registry.npmjs.org/prettier/-/prettier-2.8.8.tgz", - "integrity": "sha512-tdN8qQGvNjw4CHbY+XXk0JgCXn9QiF21a55rBe5LJAU+kDyC4WQn4+awm2Xfk2lQMk5fKup9XgzTZtGkjBdP9Q==", + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/prettier/-/prettier-3.0.3.tgz", + "integrity": "sha512-L/4pUDMxcNa8R/EthV08Zt42WBO4h1rarVtK0K+QJG0X187OLo7l699jWw0GKuwzkPQ//jMFA/8Xm6Fh3J/DAg==", "dev": true, "bin": { - "prettier": "bin-prettier.js" + "prettier": "bin/prettier.cjs" }, "engines": { - "node": ">=10.13.0" + "node": ">=14" }, "funding": { "url": "https://github.com/prettier/prettier?sponsor=1" @@ -15448,39 +14317,12 @@ "node": "^14.17.0 || ^16.13.0 || >=18.0.0" } }, - "node_modules/process": { - "version": "0.11.10", - "resolved": "https://registry.npmjs.org/process/-/process-0.11.10.tgz", - "integrity": "sha512-cdGef/drWFoydD1JsMzuFf8100nZl+GT+yacc2bEced5f9Rjk4z+WtFUTBu9PhOi9j/jfmBPu0mMEY4wIdAF8A==", - "dev": true, - "engines": { - "node": ">= 0.6.0" - } - }, "node_modules/process-nextick-args": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-2.0.1.tgz", "integrity": "sha512-3ouUOpQhtgrbOa17J7+uxOTpITYWaGP7/AhoR3+A+/1e9skrzelGi/dXzEYyvbxubEF6Wn2ypscTKiKJFFn1ag==", "dev": true }, - "node_modules/promise-all-reject-late": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/promise-all-reject-late/-/promise-all-reject-late-1.0.1.tgz", - "integrity": "sha512-vuf0Lf0lOxyQREH7GDIOUMLS7kz+gs8i6B+Yi8dC68a2sychGrHTJYghMBD6k7eUcH0H5P73EckCA48xijWqXw==", - "dev": true, - "funding": { - "url": "https://github.com/sponsors/isaacs" - } - }, - "node_modules/promise-call-limit": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/promise-call-limit/-/promise-call-limit-1.0.2.tgz", - "integrity": "sha512-1vTUnfI2hzui8AEIixbdAJlFY4LFDXqQswy/2eOlThAscXCY4It8FdVuI0fMJGAB2aWGbdQf/gv0skKYXmdrHA==", - "dev": true, - "funding": { - "url": "https://github.com/sponsors/isaacs" - } - }, "node_modules/promise-inflight": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/promise-inflight/-/promise-inflight-1.0.1.tgz", @@ -15514,20 +14356,17 @@ } }, "node_modules/promzard": { - "version": "0.3.0", - "resolved": "https://registry.npmjs.org/promzard/-/promzard-0.3.0.tgz", - "integrity": "sha512-JZeYqd7UAcHCwI+sTOeUDYkvEU+1bQ7iE0UT1MgB/tERkAPkesW46MrpIySzODi+owTjZtiF8Ay5j9m60KmMBw==", + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/promzard/-/promzard-1.0.0.tgz", + "integrity": "sha512-KQVDEubSUHGSt5xLakaToDFrSoZhStB8dXLzk2xvwR67gJktrHFvpR63oZgHyK19WKbHFLXJqCPXdVR3aBP8Ig==", "dev": true, "dependencies": { - "read": "1" + "read": "^2.0.0" + }, + "engines": { + "node": "^14.17.0 || ^16.13.0 || >=18.0.0" } }, - "node_modules/proto-list": { - "version": "1.2.4", - "resolved": "https://registry.npmjs.org/proto-list/-/proto-list-1.2.4.tgz", - "integrity": "sha512-vtK/94akxsTMhe0/cbfpR+syPuszcuwhqVjJq26CuNDgFGj682oRBXOP5MJpv2r7JtE8MsiepGIqvvOTBwn2vA==", - "dev": true - }, "node_modules/protocols": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/protocols/-/protocols-2.0.1.tgz", @@ -15544,7 +14383,6 @@ "version": "2.3.0", "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.3.0.tgz", "integrity": "sha512-rRV+zQD8tVFys26lAGR9WUuS4iUAngJScM+ZRSKtvl5tKeZ2t5bvdNFdNHBW9FWR4guGHlgmsZ1G7BSm2wTbuA==", - "dev": true, "engines": { "node": ">=6" } @@ -15565,16 +14403,6 @@ } ] }, - "node_modules/q": { - "version": "1.5.1", - "resolved": "https://registry.npmjs.org/q/-/q-1.5.1.tgz", - "integrity": "sha512-kV/CThkXo6xyFEZUugw/+pIOywXcDbFYgSct5cT3gqlbkBE1SJdwy6UQoZvodiWF/ckQLZyDE/Bu1M6gVu5lVw==", - "dev": true, - "engines": { - "node": ">=0.6.0", - "teleport": ">=0.2.0" - } - }, "node_modules/querystring": { "version": "0.2.0", "resolved": "https://registry.npmjs.org/querystring/-/querystring-0.2.0.tgz", @@ -15621,39 +14449,39 @@ "dev": true }, "node_modules/read": { - "version": "1.0.7", - "resolved": "https://registry.npmjs.org/read/-/read-1.0.7.tgz", - "integrity": "sha512-rSOKNYUmaxy0om1BNjMN4ezNT6VKK+2xF4GBhc81mkH7L60i6dp8qPYrkndNLT3QPphoII3maL9PVC9XmhHwVQ==", + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/read/-/read-2.1.0.tgz", + "integrity": "sha512-bvxi1QLJHcaywCAEsAk4DG3nVoqiY2Csps3qzWalhj5hFqRn1d/OixkFXtLO1PrgHUcAP0FNaSY/5GYNfENFFQ==", "dev": true, "dependencies": { - "mute-stream": "~0.0.4" + "mute-stream": "~1.0.0" }, "engines": { - "node": ">=0.8" + "node": "^14.17.0 || ^16.13.0 || >=18.0.0" } }, "node_modules/read-cmd-shim": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/read-cmd-shim/-/read-cmd-shim-3.0.0.tgz", - "integrity": "sha512-KQDVjGqhZk92PPNRj9ZEXEuqg8bUobSKRw+q0YQ3TKI5xkce7bUJobL4Z/OtiEbAAv70yEpYIXp4iQ9L8oPVog==", + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/read-cmd-shim/-/read-cmd-shim-4.0.0.tgz", + "integrity": "sha512-yILWifhaSEEytfXI76kB9xEEiG1AiozaCJZ83A87ytjRiN+jVibXjedjCRNjoZviinhG+4UkalO3mWTd8u5O0Q==", "dev": true, "engines": { - "node": "^12.13.0 || ^14.15.0 || >=16.0.0" + "node": "^14.17.0 || ^16.13.0 || >=18.0.0" } }, "node_modules/read-package-json": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/read-package-json/-/read-package-json-5.0.1.tgz", - "integrity": "sha512-MALHuNgYWdGW3gKzuNMuYtcSSZbGQm94fAp16xt8VsYTLBjUSc55bLMKe6gzpWue0Tfi6CBgwCSdDAqutGDhMg==", + "version": "6.0.4", + "resolved": "https://registry.npmjs.org/read-package-json/-/read-package-json-6.0.4.tgz", + "integrity": "sha512-AEtWXYfopBj2z5N5PbkAOeNHRPUg5q+Nen7QLxV8M2zJq1ym6/lCz3fYNTCXe19puu2d06jfHhrP7v/S2PtMMw==", "dev": true, "dependencies": { - "glob": "^8.0.1", - "json-parse-even-better-errors": "^2.3.1", - "normalize-package-data": "^4.0.0", - "npm-normalize-package-bin": "^1.0.1" + "glob": "^10.2.2", + "json-parse-even-better-errors": "^3.0.0", + "normalize-package-data": "^5.0.0", + "npm-normalize-package-bin": "^3.0.0" }, "engines": { - "node": "^12.13.0 || ^14.15.0 || >=16.0.0" + "node": "^14.17.0 || ^16.13.0 || >=18.0.0" } }, "node_modules/read-package-json-fast": { @@ -15678,6 +14506,15 @@ "node": "^14.17.0 || ^16.13.0 || >=18.0.0" } }, + "node_modules/read-package-json-fast/node_modules/npm-normalize-package-bin": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/npm-normalize-package-bin/-/npm-normalize-package-bin-3.0.1.tgz", + "integrity": "sha512-dMxCf+zZ+3zeQZXKxmyuCKlIDPGuv8EF940xbkC4kQVDTtqoh6rJFO+JTKSA6/Rwi0getWmtuy4Itup0AMcaDQ==", + "dev": true, + "engines": { + "node": "^14.17.0 || ^16.13.0 || >=18.0.0" + } + }, "node_modules/read-package-json/node_modules/brace-expansion": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz", @@ -15688,34 +14525,46 @@ } }, "node_modules/read-package-json/node_modules/glob": { - "version": "8.1.0", - "resolved": "https://registry.npmjs.org/glob/-/glob-8.1.0.tgz", - "integrity": "sha512-r8hpEjiQEYlF2QU0df3dS+nxxSIreXQS1qRhMJM0Q5NDdR386C7jb7Hwwod8Fgiuex+k0GFjgft18yvxm5XoCQ==", + "version": "10.3.4", + "resolved": "https://registry.npmjs.org/glob/-/glob-10.3.4.tgz", + "integrity": "sha512-6LFElP3A+i/Q8XQKEvZjkEWEOTgAIALR9AO2rwT8bgPhDd1anmqDJDZ6lLddI4ehxxxR1S5RIqKe1uapMQfYaQ==", "dev": true, "dependencies": { - "fs.realpath": "^1.0.0", - "inflight": "^1.0.4", - "inherits": "2", - "minimatch": "^5.0.1", - "once": "^1.3.0" + "foreground-child": "^3.1.0", + "jackspeak": "^2.0.3", + "minimatch": "^9.0.1", + "minipass": "^5.0.0 || ^6.0.2 || ^7.0.0", + "path-scurry": "^1.10.1" + }, + "bin": { + "glob": "dist/cjs/src/bin.js" }, "engines": { - "node": ">=12" + "node": ">=16 || 14 >=14.17" }, "funding": { "url": "https://github.com/sponsors/isaacs" } }, "node_modules/read-package-json/node_modules/hosted-git-info": { - "version": "5.2.1", - "resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-5.2.1.tgz", - "integrity": "sha512-xIcQYMnhcx2Nr4JTjsFmwwnr9vldugPy9uVm0o87bjqqWMv9GaqsTeT+i99wTl0mk1uLxJtHxLb8kymqTENQsw==", + "version": "6.1.1", + "resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-6.1.1.tgz", + "integrity": "sha512-r0EI+HBMcXadMrugk0GCQ+6BQV39PiWAZVfq7oIckeGiN7sjRGyQxPdft3nQekFTCQbYxLBH+/axZMeH8UX6+w==", "dev": true, "dependencies": { "lru-cache": "^7.5.1" }, "engines": { - "node": "^12.13.0 || ^14.15.0 || >=16.0.0" + "node": "^14.17.0 || ^16.13.0 || >=18.0.0" + } + }, + "node_modules/read-package-json/node_modules/json-parse-even-better-errors": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/json-parse-even-better-errors/-/json-parse-even-better-errors-3.0.0.tgz", + "integrity": "sha512-iZbGHafX/59r39gPwVPRBGw0QQKnA7tte5pSMrhWOW7swGsVvVTjmfyAV9pNqk8YGT7tRCdxRu8uzcgZwoDooA==", + "dev": true, + "engines": { + "node": "^14.17.0 || ^16.13.0 || >=18.0.0" } }, "node_modules/read-package-json/node_modules/lru-cache": { @@ -15728,37 +14577,43 @@ } }, "node_modules/read-package-json/node_modules/minimatch": { - "version": "5.1.6", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-5.1.6.tgz", - "integrity": "sha512-lKwV/1brpG6mBUFHtb7NUmtABCb2WZZmm2wNiOA5hAb8VdCS4B3dtMWyvcoViccwAW/COERjXLt0zP1zXUN26g==", + "version": "9.0.3", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-9.0.3.tgz", + "integrity": "sha512-RHiac9mvaRw0x3AYRgDC1CxAP7HTcNrrECeA8YYJeWnpo+2Q5CegtZjaotWTWxDG3UeGA1coE05iH1mPjT/2mg==", "dev": true, "dependencies": { "brace-expansion": "^2.0.1" }, "engines": { - "node": ">=10" + "node": ">=16 || 14 >=14.17" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" } }, "node_modules/read-package-json/node_modules/normalize-package-data": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/normalize-package-data/-/normalize-package-data-4.0.1.tgz", - "integrity": "sha512-EBk5QKKuocMJhB3BILuKhmaPjI8vNRSpIfO9woLC6NyHVkKKdVEdAO1mrT0ZfxNR1lKwCcTkuZfmGIFdizZ8Pg==", + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/normalize-package-data/-/normalize-package-data-5.0.0.tgz", + "integrity": "sha512-h9iPVIfrVZ9wVYQnxFgtw1ugSvGEMOlyPWWtm8BMJhnwyEL/FLbYbTY3V3PpjI/BUK67n9PEWDu6eHzu1fB15Q==", "dev": true, "dependencies": { - "hosted-git-info": "^5.0.0", + "hosted-git-info": "^6.0.0", "is-core-module": "^2.8.1", "semver": "^7.3.5", "validate-npm-package-license": "^3.0.4" }, "engines": { - "node": "^12.13.0 || ^14.15.0 || >=16.0.0" + "node": "^14.17.0 || ^16.13.0 || >=18.0.0" } }, "node_modules/read-package-json/node_modules/npm-normalize-package-bin": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/npm-normalize-package-bin/-/npm-normalize-package-bin-1.0.1.tgz", - "integrity": "sha512-EPfafl6JL5/rU+ot6P3gRSCpPDW5VmIzX959Ob1+ySFUuuYHWHekXpwdUZcKP5C+DS4GEtdJluwBjnsNDl+fSA==", - "dev": true + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/npm-normalize-package-bin/-/npm-normalize-package-bin-3.0.1.tgz", + "integrity": "sha512-dMxCf+zZ+3zeQZXKxmyuCKlIDPGuv8EF940xbkC4kQVDTtqoh6rJFO+JTKSA6/Rwi0getWmtuy4Itup0AMcaDQ==", + "dev": true, + "engines": { + "node": "^14.17.0 || ^16.13.0 || >=18.0.0" + } }, "node_modules/read-pkg": { "version": "3.0.0", @@ -15939,6 +14794,15 @@ "node": ">=4" } }, + "node_modules/read/node_modules/mute-stream": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/mute-stream/-/mute-stream-1.0.0.tgz", + "integrity": "sha512-avsJQhyd+680gKXyG/sQc0nXaC6rBkPOfyHYcFb9+hdkqQkR9bdnkJ0AMZhke0oesPqIO+mFFJ+IdBc7mst4IA==", + "dev": true, + "engines": { + "node": "^14.17.0 || ^16.13.0 || >=18.0.0" + } + }, "node_modules/readable-stream": { "version": "3.6.2", "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.2.tgz", @@ -16159,6 +15023,21 @@ "url": "https://github.com/sponsors/isaacs" } }, + "node_modules/run-applescript": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/run-applescript/-/run-applescript-5.0.0.tgz", + "integrity": "sha512-XcT5rBksx1QdIhlFOCtgZkB99ZEouFZ1E2Kc2LHqNW13U3/74YGdkQRmThTwxy4QIyookibDKYZOPqX//6BlAg==", + "dev": true, + "dependencies": { + "execa": "^5.0.0" + }, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/run-async": { "version": "2.4.1", "resolved": "https://registry.npmjs.org/run-async/-/run-async-2.4.1.tgz", @@ -16218,6 +15097,12 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/safe-array-concat/node_modules/isarray": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-2.0.5.tgz", + "integrity": "sha512-xHjhDr3cNBK0BzdUJSPXZntQUx/mwMS5Rw4A7lPJ90XGAO6ISP/ePDNuo0vhqOZU+UD5JoodwCAAoZQd3FeAKw==", + "dev": true + }, "node_modules/safe-buffer": { "version": "5.2.1", "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz", @@ -16452,15 +15337,6 @@ "type-detect": "4.0.8" } }, - "node_modules/sinon/node_modules/diff": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/diff/-/diff-5.1.0.tgz", - "integrity": "sha512-D+mk+qE8VC/PAUrlAU34N+VfXev0ghe5ywmpqrawphmVZc1bEfn56uo9qpyGp1p4xpzOHkSW4ztBd6L7Xx4ACw==", - "dev": true, - "engines": { - "node": ">=0.3.1" - } - }, "node_modules/sisteransi": { "version": "1.0.5", "resolved": "https://registry.npmjs.org/sisteransi/-/sisteransi-1.0.5.tgz", @@ -16922,6 +15798,22 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/synckit": { + "version": "0.8.5", + "resolved": "https://registry.npmjs.org/synckit/-/synckit-0.8.5.tgz", + "integrity": "sha512-L1dapNV6vu2s/4Sputv8xGsCdAVlb5nRDMFU/E27D44l5U6cw1g0dGd45uLc+OXjNMmF4ntiMdCimzcjFKQI8Q==", + "dev": true, + "dependencies": { + "@pkgr/utils": "^2.3.1", + "tslib": "^2.5.0" + }, + "engines": { + "node": "^14.18.0 || >=16.0.0" + }, + "funding": { + "url": "https://opencollective.com/unts" + } + }, "node_modules/tapable": { "version": "2.2.1", "resolved": "https://registry.npmjs.org/tapable/-/tapable-2.2.1.tgz", @@ -17003,46 +15895,6 @@ "node": ">=4" } }, - "node_modules/tempy": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/tempy/-/tempy-1.0.0.tgz", - "integrity": "sha512-eLXG5B1G0mRPHmgH2WydPl5v4jH35qEn3y/rA/aahKhIa91Pn119SsU7n7v/433gtT9ONzC8ISvNHIh2JSTm0w==", - "dev": true, - "dependencies": { - "del": "^6.0.0", - "is-stream": "^2.0.0", - "temp-dir": "^2.0.0", - "type-fest": "^0.16.0", - "unique-string": "^2.0.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/tempy/node_modules/temp-dir": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/temp-dir/-/temp-dir-2.0.0.tgz", - "integrity": "sha512-aoBAniQmmwtcKp/7BzsH8Cxzv8OL736p7v1ihGb5e9DJ9kTwGWHrQrVB5+lfVDzfGrdRzXch+ig7LHaY1JTOrg==", - "dev": true, - "engines": { - "node": ">=8" - } - }, - "node_modules/tempy/node_modules/type-fest": { - "version": "0.16.0", - "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.16.0.tgz", - "integrity": "sha512-eaBzG6MxNzEn9kiwvtre90cXaNLkmadMWa1zQMs3XORCXNbsH/OewwbxC5ia9dCxIxnTAsSxXJaa/p5y8DlvJg==", - "dev": true, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, "node_modules/test-exclude": { "version": "6.0.0", "resolved": "https://registry.npmjs.org/test-exclude/-/test-exclude-6.0.0.tgz", @@ -17079,12 +15931,55 @@ "dev": true }, "node_modules/through2": { - "version": "4.0.2", - "resolved": "https://registry.npmjs.org/through2/-/through2-4.0.2.tgz", - "integrity": "sha512-iOqSav00cVxEEICeD7TjLB1sueEL+81Wpzp2bY17uZjZN0pWZPuo4suZ/61VujxmqSGFfgOcNuTZ85QJwNZQpw==", + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/through2/-/through2-2.0.5.tgz", + "integrity": "sha512-/mrRod8xqpA+IHSLyGCQ2s8SPHiCDEeQJSep1jqLYeEUClOFG2Qsh+4FU6G9VeqpZnGW/Su8LQGc4YKni5rYSQ==", + "dev": true, + "dependencies": { + "readable-stream": "~2.3.6", + "xtend": "~4.0.1" + } + }, + "node_modules/through2/node_modules/readable-stream": { + "version": "2.3.8", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.8.tgz", + "integrity": "sha512-8p0AUk4XODgIewSi0l8Epjs+EVnWiK7NoDIEGU0HhE7+ZyY8D1IMY7odu5lRrFXGg71L15KG8QrPmum45RTtdA==", + "dev": true, + "dependencies": { + "core-util-is": "~1.0.0", + "inherits": "~2.0.3", + "isarray": "~1.0.0", + "process-nextick-args": "~2.0.0", + "safe-buffer": "~5.1.1", + "string_decoder": "~1.1.1", + "util-deprecate": "~1.0.1" + } + }, + "node_modules/through2/node_modules/safe-buffer": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", + "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==", + "dev": true + }, + "node_modules/through2/node_modules/string_decoder": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", + "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", "dev": true, "dependencies": { - "readable-stream": "3" + "safe-buffer": "~5.1.0" + } + }, + "node_modules/titleize": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/titleize/-/titleize-3.0.0.tgz", + "integrity": "sha512-KxVu8EYHDPBdUYdKZdKtU2aj2XfEx9AfjXxE/Aj0vT06w2icA09Vus1rh6eSu1y01akYg6BjIK/hxyLJINoMLQ==", + "dev": true, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" } }, "node_modules/tmp": { @@ -17147,15 +16042,6 @@ "integrity": "sha512-N3WMsuqV66lT30CrXNbEjx4GEwlow3v6rr4mCcv6prnfwhS01rkgyFdjPNBYd9br7LpXV1+Emh01fHnq2Gdgrw==", "dev": true }, - "node_modules/treeverse": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/treeverse/-/treeverse-3.0.0.tgz", - "integrity": "sha512-gcANaAnd2QDZFmHFEOF4k7uc1J/6a6z3DJMd/QwEyxLoKGiptJRwid582r7QIsFlFMIZ3SnxfS52S4hm2DHkuQ==", - "dev": true, - "engines": { - "node": "^14.17.0 || ^16.13.0 || >=18.0.0" - } - }, "node_modules/trim-newlines": { "version": "3.0.1", "resolved": "https://registry.npmjs.org/trim-newlines/-/trim-newlines-3.0.1.tgz", @@ -17165,6 +16051,18 @@ "node": ">=8" } }, + "node_modules/ts-api-utils": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/ts-api-utils/-/ts-api-utils-1.0.3.tgz", + "integrity": "sha512-wNMeqtMz5NtwpT/UZGY5alT+VoKdSsOOP/kqHFcUW1P/VRhH2wJ48+DN2WwUliNbQ976ETwDL0Ifd2VVvgonvg==", + "dev": true, + "engines": { + "node": ">=16.13.0" + }, + "peerDependencies": { + "typescript": ">=4.2.0" + } + }, "node_modules/ts-jest": { "version": "29.1.1", "resolved": "https://registry.npmjs.org/ts-jest/-/ts-jest-29.1.1.tgz", @@ -17260,6 +16158,15 @@ } } }, + "node_modules/ts-node/node_modules/diff": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/diff/-/diff-4.0.2.tgz", + "integrity": "sha512-58lmxKSA4BNyLz+HHMUzlOEpg09FV+ev6ZMe3vJihgdxzgcwZ8VoEEPmALCZG9LmqfVoNMMKpttIYTVG6uDY7A==", + "dev": true, + "engines": { + "node": ">=0.3.1" + } + }, "node_modules/tsconfig-paths": { "version": "3.14.2", "resolved": "https://registry.npmjs.org/tsconfig-paths/-/tsconfig-paths-3.14.2.tgz", @@ -17298,27 +16205,6 @@ "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.6.2.tgz", "integrity": "sha512-AEYxH93jGFPn/a2iVAwW87VuUIkR1FVUKB77NwMF7nBTDkDrrT/Hpt/IrCJ0QXhW27jTBDcf5ZY7w6RiqTMw2Q==" }, - "node_modules/tsutils": { - "version": "3.21.0", - "resolved": "https://registry.npmjs.org/tsutils/-/tsutils-3.21.0.tgz", - "integrity": "sha512-mHKK3iUXL+3UF6xL5k0PEhKRUBKPBCv/+RkEOpjRWxxx27KKRBmmA60A9pgOUvMi8GKhRMPEmjBRPzs2W7O1OA==", - "dev": true, - "dependencies": { - "tslib": "^1.8.1" - }, - "engines": { - "node": ">= 6" - }, - "peerDependencies": { - "typescript": ">=2.8.0 || >= 3.2.0-dev || >= 3.3.0-dev || >= 3.4.0-dev || >= 3.5.0-dev || >= 3.6.0-dev || >= 3.6.0-beta || >= 3.7.0-dev || >= 3.7.0-beta" - } - }, - "node_modules/tsutils/node_modules/tslib": { - "version": "1.14.1", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.14.1.tgz", - "integrity": "sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==", - "dev": true - }, "node_modules/tuf-js": { "version": "1.1.7", "resolved": "https://registry.npmjs.org/tuf-js/-/tuf-js-1.1.7.tgz", @@ -17556,18 +16442,6 @@ "node": "^14.17.0 || ^16.13.0 || >=18.0.0" } }, - "node_modules/unique-string": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/unique-string/-/unique-string-2.0.0.tgz", - "integrity": "sha512-uNaeirEPvpZWSgzwsPGtU2zVSTrn/8L5q/IexZmH0eH6SA73CmAA5U4GwORTxQAZs95TAXLNqeLoPPNO5gZfWg==", - "dev": true, - "dependencies": { - "crypto-random-string": "^2.0.0" - }, - "engines": { - "node": ">=8" - } - }, "node_modules/universal-user-agent": { "version": "6.0.0", "resolved": "https://registry.npmjs.org/universal-user-agent/-/universal-user-agent-6.0.0.tgz", @@ -17578,11 +16452,19 @@ "version": "2.0.0", "resolved": "https://registry.npmjs.org/universalify/-/universalify-2.0.0.tgz", "integrity": "sha512-hAZsKq7Yy11Zu1DE0OzWjw7nnLZmJZYTDZZyEFHZdUhV8FkH5MCfoU1XMaxXovpyW5nq5scPqq0ZDP9Zyl04oQ==", - "dev": true, "engines": { "node": ">= 10.0.0" } }, + "node_modules/untildify": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/untildify/-/untildify-4.0.0.tgz", + "integrity": "sha512-KK8xQ1mkzZeg9inewmFVDNkg3l5LUhoq9kN6iWYB/CC9YMG8HA+c1Q8HwDe6dEX7kErrEVNVBO3fWsVq5iDgtw==", + "dev": true, + "engines": { + "node": ">=8" + } + }, "node_modules/upath": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/upath/-/upath-2.0.1.tgz", @@ -17718,15 +16600,15 @@ } }, "node_modules/validate-npm-package-name": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/validate-npm-package-name/-/validate-npm-package-name-4.0.0.tgz", - "integrity": "sha512-mzR0L8ZDktZjpX4OB46KT+56MAhl4EIazWP/+G/HPGuvfdaqg4YsCdtOm6U9+LOFyYDoh4dpnpxZRB9MQQns5Q==", + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/validate-npm-package-name/-/validate-npm-package-name-5.0.0.tgz", + "integrity": "sha512-YuKoXDAhBYxY7SfOKxHBDoSyENFeW5VvIIQp2TGQuit8gpK6MnWaQelBKxso72DoxTZfZdcP3W90LqpSkgPzLQ==", "dev": true, "dependencies": { "builtins": "^5.0.0" }, "engines": { - "node": "^12.13.0 || ^14.15.0 || >=16.0.0" + "node": "^14.17.0 || ^16.13.0 || >=18.0.0" } }, "node_modules/vscode-oniguruma": { @@ -17741,12 +16623,6 @@ "integrity": "sha512-AFbieoL7a5LMqcnOF04ji+rpXadgOXnZsxQr//r83kLPr7biP7am3g9zbaZIaBGwBRWeSvoMD4mgPdX3e4NWBg==", "dev": true }, - "node_modules/walk-up-path": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/walk-up-path/-/walk-up-path-1.0.0.tgz", - "integrity": "sha512-hwj/qMDUEjCU5h0xr90KGCf0tg0/LgJbmOWgrWKYlcJZM7XvquvUJZ0G/HMGr7F7OQMOUuPHWP9JpriinkAlkg==", - "dev": true - }, "node_modules/walker": { "version": "1.0.8", "resolved": "https://registry.npmjs.org/walker/-/walker-1.0.8.tgz", @@ -18029,7 +16905,6 @@ "version": "2.3.1", "resolved": "https://registry.npmjs.org/yaml/-/yaml-2.3.1.tgz", "integrity": "sha512-2eHWfjaoXgTBC2jNM1LRef62VQa0umtvRiDSk6HSzW7RvS5YtkabJrwYLLEKWBc8a5U2PTSCs+dJjUTJdlHsWQ==", - "dev": true, "engines": { "node": ">= 14" } @@ -18166,6 +17041,11 @@ } } }, + "packages/idempotency/node_modules/@aws-lambda-powertools/commons": { + "version": "1.12.1", + "resolved": "https://registry.npmjs.org/@aws-lambda-powertools/commons/-/commons-1.12.1.tgz", + "integrity": "sha512-VChNfDUxxcB5KTfQPkJgxYihEZkrmeOzU9/A9FRBc+3v33EEM59T2pIgBkFy0VoINvGi3MoBEln/wyu2jV0ivA==" + }, "packages/logger": { "name": "@aws-lambda-powertools/logger", "version": "1.14.0", @@ -18187,6 +17067,11 @@ } } }, + "packages/logger/node_modules/@aws-lambda-powertools/commons": { + "version": "1.12.1", + "resolved": "https://registry.npmjs.org/@aws-lambda-powertools/commons/-/commons-1.12.1.tgz", + "integrity": "sha512-VChNfDUxxcB5KTfQPkJgxYihEZkrmeOzU9/A9FRBc+3v33EEM59T2pIgBkFy0VoINvGi3MoBEln/wyu2jV0ivA==" + }, "packages/metrics": { "name": "@aws-lambda-powertools/metrics", "version": "1.14.0", @@ -18209,6 +17094,11 @@ } } }, + "packages/metrics/node_modules/@aws-lambda-powertools/commons": { + "version": "1.12.1", + "resolved": "https://registry.npmjs.org/@aws-lambda-powertools/commons/-/commons-1.12.1.tgz", + "integrity": "sha512-VChNfDUxxcB5KTfQPkJgxYihEZkrmeOzU9/A9FRBc+3v33EEM59T2pIgBkFy0VoINvGi3MoBEln/wyu2jV0ivA==" + }, "packages/parameters": { "name": "@aws-lambda-powertools/parameters", "version": "1.14.0", @@ -18255,6 +17145,11 @@ } } }, + "packages/parameters/node_modules/@aws-lambda-powertools/commons": { + "version": "1.12.1", + "resolved": "https://registry.npmjs.org/@aws-lambda-powertools/commons/-/commons-1.12.1.tgz", + "integrity": "sha512-VChNfDUxxcB5KTfQPkJgxYihEZkrmeOzU9/A9FRBc+3v33EEM59T2pIgBkFy0VoINvGi3MoBEln/wyu2jV0ivA==" + }, "packages/testing": { "name": "@aws-lambda-powertools/testing-utils", "version": "1.14.0", @@ -18292,6 +17187,11 @@ "optional": true } } + }, + "packages/tracer/node_modules/@aws-lambda-powertools/commons": { + "version": "1.12.1", + "resolved": "https://registry.npmjs.org/@aws-lambda-powertools/commons/-/commons-1.12.1.tgz", + "integrity": "sha512-VChNfDUxxcB5KTfQPkJgxYihEZkrmeOzU9/A9FRBc+3v33EEM59T2pIgBkFy0VoINvGi3MoBEln/wyu2jV0ivA==" } } -} +} \ No newline at end of file diff --git a/package.json b/package.json index 195223fb8a..1292f6eb10 100644 --- a/package.json +++ b/package.json @@ -47,24 +47,24 @@ "homepage": "https://github.com/aws-powertools/powertools-lambda-typescript#readme", "devDependencies": { "@middy/core": "^3.6.2", - "@types/aws-lambda": "^8.10.109", + "@types/aws-lambda": "^8.10.121", "@types/jest": "^29.5.4", - "@types/node": "^18.16.18", - "@types/uuid": "^9.0.2", - "@typescript-eslint/eslint-plugin": "^5.62.0", - "@typescript-eslint/parser": "^5.62.0", + "@types/node": "^20.6.1", + "@types/uuid": "^9.0.4", + "@typescript-eslint/eslint-plugin": "^6.7.0", + "@typescript-eslint/parser": "^6.7.0", "eslint": "^8.49.0", "eslint-config-prettier": "^9.0.0", "eslint-import-resolver-node": "^0.3.9", "eslint-import-resolver-typescript": "^3.6.0", "eslint-plugin-import": "^2.28.1", - "eslint-plugin-prettier": "^4.2.1", - "husky": "^8.0.2", - "jest": "^29.6.4", + "eslint-plugin-prettier": "^5.0.0", + "husky": "^8.0.3", + "jest": "^29.7.0", "jest-runner-groups": "^2.2.0", - "lerna": "^6.6.2", - "lint-staged": "^13.1.2", - "prettier": "^2.8.8", + "lerna": "^7.3.0", + "lint-staged": "^14.0.1", + "prettier": "^3.0.3", "rimraf": "^5.0.1", "ts-jest": "^29.1.1", "ts-node": "^10.9.1", @@ -73,6 +73,6 @@ "typescript": "^5.2.2" }, "engines": { - "node": ">=14" + "node": ">=16" } } diff --git a/packages/batch/package.json b/packages/batch/package.json index b4eb74db4f..2b73a507a6 100644 --- a/packages/batch/package.json +++ b/packages/batch/package.json @@ -12,7 +12,6 @@ "scripts": { "test": "npm run test:unit", "test:unit": "jest --group=unit --detectOpenHandles --coverage --verbose", - "test:e2e:nodejs14x": "echo 'Not Implemented'", "test:e2e:nodejs16x": "echo 'Not Implemented'", "test:e2e:nodejs18x": "echo 'Not Implemented'", "test:e2e": "echo 'Not Implemented'", @@ -49,4 +48,4 @@ "serverless", "nodejs" ] -} +} \ No newline at end of file diff --git a/packages/commons/package.json b/packages/commons/package.json index 0cb0fe50fc..850cf00255 100644 --- a/packages/commons/package.json +++ b/packages/commons/package.json @@ -45,4 +45,4 @@ "serverless", "nodejs" ] -} +} \ No newline at end of file diff --git a/packages/commons/src/types/middy.ts b/packages/commons/src/types/middy.ts index 2b1c9a333f..0399408d8c 100644 --- a/packages/commons/src/types/middy.ts +++ b/packages/commons/src/types/middy.ts @@ -11,7 +11,7 @@ type Request< TEvent = unknown, TResult = unknown, TErr = Error, - TContext extends Context = Context + TContext extends Context = Context, > = { event: TEvent; context: TContext; @@ -26,14 +26,14 @@ type MiddlewareFn< TEvent = unknown, TResult = unknown, TErr = Error, - TContext extends Context = Context + TContext extends Context = Context, > = (request: Request) => unknown; type MiddlewareLikeObj< TEvent = unknown, TResult = unknown, TErr = Error, - TContext extends Context = Context + TContext extends Context = Context, > = { before?: MiddlewareFn; after?: MiddlewareFn; diff --git a/packages/idempotency/package.json b/packages/idempotency/package.json index e98359e798..e0d6024160 100644 --- a/packages/idempotency/package.json +++ b/packages/idempotency/package.json @@ -12,7 +12,6 @@ "scripts": { "test": "npm run test:unit", "test:unit": "jest --group=unit --detectOpenHandles --coverage --verbose", - "test:e2e:nodejs14x": "RUNTIME=nodejs14x jest --group=e2e", "test:e2e:nodejs16x": "RUNTIME=nodejs16x jest --group=e2e", "test:e2e:nodejs18x": "RUNTIME=nodejs18x jest --group=e2e", "test:e2e": "jest --group=e2e", @@ -115,4 +114,4 @@ "aws-sdk-client-mock": "^3.0.0", "aws-sdk-client-mock-jest": "^3.0.0" } -} +} \ No newline at end of file diff --git a/packages/logger/package.json b/packages/logger/package.json index 6983f38196..787115f387 100644 --- a/packages/logger/package.json +++ b/packages/logger/package.json @@ -12,7 +12,6 @@ "scripts": { "test": "npm run test:unit", "test:unit": "jest --group=unit --detectOpenHandles --coverage --verbose", - "test:e2e:nodejs14x": "RUNTIME=nodejs14x jest --group=e2e", "test:e2e:nodejs16x": "RUNTIME=nodejs16x jest --group=e2e", "test:e2e:nodejs18x": "RUNTIME=nodejs18x jest --group=e2e", "test:e2e": "jest --group=e2e", @@ -65,4 +64,4 @@ "serverless", "nodejs" ] -} +} \ No newline at end of file diff --git a/packages/logger/tests/unit/formatter/PowertoolsLogFormatter.test.ts b/packages/logger/tests/unit/formatter/PowertoolsLogFormatter.test.ts index 1210b8ffc7..6ffd54024b 100644 --- a/packages/logger/tests/unit/formatter/PowertoolsLogFormatter.test.ts +++ b/packages/logger/tests/unit/formatter/PowertoolsLogFormatter.test.ts @@ -318,7 +318,7 @@ describe('Class: PowertoolsLogFormatter', () => { test('when an error with cause of type Error is formatted, the cause key is included and formatted', () => { // Prepare - const formatter = new PowertoolLogFormatter(); + const formatter = new PowertoolsLogFormatter(); class ErrorWithCause extends Error { public cause?: Error; public constructor(message: string, options?: { cause: Error }) { @@ -334,20 +334,22 @@ describe('Class: PowertoolsLogFormatter', () => { // Assess expect(formattedURIError).toEqual({ - location: expect.stringMatching(/PowertoolLogFormatter.test.ts:[0-9]+/), + location: expect.stringMatching( + /PowertoolsLogFormatter.test.ts:[0-9]+/ + ), message: 'foo', name: 'Error', stack: expect.stringMatching( - /PowertoolLogFormatter.test.ts:[0-9]+:[0-9]+/ + /PowertoolsLogFormatter.test.ts:[0-9]+:[0-9]+/ ), cause: { location: expect.stringMatching( - /PowertoolLogFormatter.test.ts:[0-9]+/ + /PowertoolsLogFormatter.test.ts:[0-9]+/ ), message: 'bar', name: 'Error', stack: expect.stringMatching( - /PowertoolLogFormatter.test.ts:[0-9]+:[0-9]+/ + /PowertoolsLogFormatter.test.ts:[0-9]+:[0-9]+/ ), }, }); @@ -355,7 +357,7 @@ describe('Class: PowertoolsLogFormatter', () => { test('when an error with cause of type other than Error is formatted, the cause key is included as-is', () => { // Prepare - const formatter = new PowertoolLogFormatter(); + const formatter = new PowertoolsLogFormatter(); class ErrorWithCause extends Error { public cause?: unknown; public constructor(message: string, options?: { cause: unknown }) { @@ -371,11 +373,13 @@ describe('Class: PowertoolsLogFormatter', () => { // Assess expect(formattedURIError).toEqual({ - location: expect.stringMatching(/PowertoolLogFormatter.test.ts:[0-9]+/), + location: expect.stringMatching( + /PowertoolsLogFormatter.test.ts:[0-9]+/ + ), message: 'foo', name: 'Error', stack: expect.stringMatching( - /PowertoolLogFormatter.test.ts:[0-9]+:[0-9]+/ + /PowertoolsLogFormatter.test.ts:[0-9]+:[0-9]+/ ), cause: 'bar', }); diff --git a/packages/metrics/package.json b/packages/metrics/package.json index 74b09d3107..c363d98587 100644 --- a/packages/metrics/package.json +++ b/packages/metrics/package.json @@ -12,7 +12,6 @@ "scripts": { "test": "npm run test:unit", "test:unit": "jest --group=unit --detectOpenHandles --coverage --verbose", - "test:e2e:nodejs14x": "RUNTIME=nodejs14x jest --group=e2e", "test:e2e:nodejs16x": "RUNTIME=nodejs16x jest --group=e2e", "test:e2e:nodejs18x": "RUNTIME=nodejs18x jest --group=e2e", "test:e2e": "jest --group=e2e", @@ -65,4 +64,4 @@ "serverless", "nodejs" ] -} +} \ No newline at end of file diff --git a/packages/parameters/package.json b/packages/parameters/package.json index 9f62512185..134d7e3afb 100644 --- a/packages/parameters/package.json +++ b/packages/parameters/package.json @@ -12,7 +12,6 @@ "scripts": { "test": "npm run test:unit", "test:unit": "jest --group=unit --detectOpenHandles --coverage --verbose", - "test:e2e:nodejs14x": "RUNTIME=nodejs14x jest --group=e2e", "test:e2e:nodejs16x": "RUNTIME=nodejs16x jest --group=e2e", "test:e2e:nodejs18x": "RUNTIME=nodejs18x jest --group=e2e", "test:e2e": "jest --group=e2e", @@ -177,4 +176,4 @@ "optional": true } } -} +} \ No newline at end of file diff --git a/packages/parameters/src/appconfig/AppConfigProvider.ts b/packages/parameters/src/appconfig/AppConfigProvider.ts index ec7502697f..bc102b3f32 100644 --- a/packages/parameters/src/appconfig/AppConfigProvider.ts +++ b/packages/parameters/src/appconfig/AppConfigProvider.ts @@ -255,7 +255,7 @@ class AppConfigProvider extends BaseProvider { ExplicitUserProvidedType = undefined, InferredFromOptionsType extends | AppConfigGetOptions - | undefined = AppConfigGetOptions + | undefined = AppConfigGetOptions, >( name: string, options?: InferredFromOptionsType & AppConfigGetOptions diff --git a/packages/parameters/src/appconfig/getAppConfig.ts b/packages/parameters/src/appconfig/getAppConfig.ts index 41ab0f2d18..7e7139f794 100644 --- a/packages/parameters/src/appconfig/getAppConfig.ts +++ b/packages/parameters/src/appconfig/getAppConfig.ts @@ -144,7 +144,7 @@ const getAppConfig = < ExplicitUserProvidedType = undefined, InferredFromOptionsType extends | GetAppConfigOptions - | undefined = GetAppConfigOptions + | undefined = GetAppConfigOptions, >( name: string, options: InferredFromOptionsType & GetAppConfigOptions diff --git a/packages/parameters/src/dynamodb/DynamoDBProvider.ts b/packages/parameters/src/dynamodb/DynamoDBProvider.ts index 2a9dbe98a3..40e5338b9b 100644 --- a/packages/parameters/src/dynamodb/DynamoDBProvider.ts +++ b/packages/parameters/src/dynamodb/DynamoDBProvider.ts @@ -304,7 +304,7 @@ class DynamoDBProvider extends BaseProvider { ExplicitUserProvidedType = undefined, InferredFromOptionsType extends | DynamoDBGetOptions - | undefined = DynamoDBGetOptions + | undefined = DynamoDBGetOptions, >( name: string, options?: InferredFromOptionsType & DynamoDBGetOptions @@ -352,7 +352,7 @@ class DynamoDBProvider extends BaseProvider { ExplicitUserProvidedType = undefined, InferredFromOptionsType extends | DynamoDBGetMultipleOptions - | undefined = DynamoDBGetMultipleOptions + | undefined = DynamoDBGetMultipleOptions, >( path: string, options?: InferredFromOptionsType & DynamoDBGetMultipleOptions diff --git a/packages/parameters/src/secrets/SecretsProvider.ts b/packages/parameters/src/secrets/SecretsProvider.ts index 594ab13fa4..7b4f795fd8 100644 --- a/packages/parameters/src/secrets/SecretsProvider.ts +++ b/packages/parameters/src/secrets/SecretsProvider.ts @@ -203,7 +203,7 @@ class SecretsProvider extends BaseProvider { ExplicitUserProvidedType = undefined, InferredFromOptionsType extends | SecretsGetOptions - | undefined = SecretsGetOptions + | undefined = SecretsGetOptions, >( name: string, options?: InferredFromOptionsType & SecretsGetOptions diff --git a/packages/parameters/src/secrets/getSecret.ts b/packages/parameters/src/secrets/getSecret.ts index c4a304008e..b0f2e4bfeb 100644 --- a/packages/parameters/src/secrets/getSecret.ts +++ b/packages/parameters/src/secrets/getSecret.ts @@ -110,7 +110,7 @@ const getSecret = async < ExplicitUserProvidedType = undefined, InferredFromOptionsType extends | SecretsGetOptions - | undefined = SecretsGetOptions + | undefined = SecretsGetOptions, >( name: string, options?: InferredFromOptionsType & SecretsGetOptions diff --git a/packages/parameters/src/ssm/SSMProvider.ts b/packages/parameters/src/ssm/SSMProvider.ts index bd713f7bf2..799d954a69 100644 --- a/packages/parameters/src/ssm/SSMProvider.ts +++ b/packages/parameters/src/ssm/SSMProvider.ts @@ -321,7 +321,7 @@ class SSMProvider extends BaseProvider { */ public async get< ExplicitUserProvidedType = undefined, - InferredFromOptionsType extends SSMGetOptions | undefined = SSMGetOptions + InferredFromOptionsType extends SSMGetOptions | undefined = SSMGetOptions, >( name: string, options?: InferredFromOptionsType & SSMGetOptions @@ -368,7 +368,7 @@ class SSMProvider extends BaseProvider { ExplicitUserProvidedType = undefined, InferredFromOptionsType extends | SSMGetMultipleOptions - | undefined = undefined + | undefined = undefined, >( path: string, options?: InferredFromOptionsType & SSMGetMultipleOptions @@ -630,9 +630,8 @@ class SSMProvider extends BaseProvider { let errors: string[] = []; // Fetch each possible batch param from cache and return if entire batch is cached - const { cached, toFetch } = await this.getParametersByNameFromCache( - parameters - ); + const { cached, toFetch } = + await this.getParametersByNameFromCache(parameters); if (Object.keys(cached).length >= Object.keys(parameters).length) { response = cached; diff --git a/packages/parameters/src/ssm/getParameter.ts b/packages/parameters/src/ssm/getParameter.ts index adb3916730..12eeb153c0 100644 --- a/packages/parameters/src/ssm/getParameter.ts +++ b/packages/parameters/src/ssm/getParameter.ts @@ -138,7 +138,7 @@ import type { SSMGetOptions, SSMGetOutput } from '../types/SSMProvider'; */ const getParameter = async < ExplicitUserProvidedType = undefined, - InferredFromOptionsType extends SSMGetOptions | undefined = SSMGetOptions + InferredFromOptionsType extends SSMGetOptions | undefined = SSMGetOptions, >( name: string, options?: InferredFromOptionsType & SSMGetOptions diff --git a/packages/parameters/src/ssm/getParameters.ts b/packages/parameters/src/ssm/getParameters.ts index ac6c3c3824..d604a034d5 100644 --- a/packages/parameters/src/ssm/getParameters.ts +++ b/packages/parameters/src/ssm/getParameters.ts @@ -144,7 +144,7 @@ const getParameters = async < ExplicitUserProvidedType = undefined, InferredFromOptionsType extends | SSMGetMultipleOptions - | undefined = SSMGetMultipleOptions + | undefined = SSMGetMultipleOptions, >( path: string, options?: InferredFromOptionsType & SSMGetMultipleOptions diff --git a/packages/parameters/src/types/AppConfigProvider.ts b/packages/parameters/src/types/AppConfigProvider.ts index 95a362af2d..d0d6f5a6cb 100644 --- a/packages/parameters/src/types/AppConfigProvider.ts +++ b/packages/parameters/src/types/AppConfigProvider.ts @@ -110,7 +110,7 @@ type AppConfigGetOptions = */ type AppConfigGetOutput< ExplicitUserProvidedType = undefined, - InferredFromOptionsType = undefined + InferredFromOptionsType = undefined, > = undefined extends ExplicitUserProvidedType ? undefined extends InferredFromOptionsType | AppConfigGetOptionsTransformNone ? Uint8Array diff --git a/packages/parameters/src/types/DynamoDBProvider.ts b/packages/parameters/src/types/DynamoDBProvider.ts index 420f31343a..d6bf2d17ab 100644 --- a/packages/parameters/src/types/DynamoDBProvider.ts +++ b/packages/parameters/src/types/DynamoDBProvider.ts @@ -115,7 +115,7 @@ type DynamoDBGetOptions = */ type DynamoDBGetOutput< ExplicitUserProvidedType = undefined, - InferredFromOptionsType = undefined + InferredFromOptionsType = undefined, > = undefined extends ExplicitUserProvidedType ? undefined extends InferredFromOptionsType ? JSONValue @@ -174,7 +174,7 @@ type DynamoDBGetMultipleOptions = */ type DynamoDBGetMultipleOutput< ExplicitUserProvidedType = undefined, - InferredFromOptionsType = undefined + InferredFromOptionsType = undefined, > = undefined extends ExplicitUserProvidedType ? undefined extends InferredFromOptionsType ? JSONValue diff --git a/packages/parameters/src/types/SSMProvider.ts b/packages/parameters/src/types/SSMProvider.ts index 501dc6de15..25c3756491 100644 --- a/packages/parameters/src/types/SSMProvider.ts +++ b/packages/parameters/src/types/SSMProvider.ts @@ -99,7 +99,7 @@ type SSMGetOptions = */ type SSMGetOutput< ExplicitUserProvidedType = undefined, - InferredFromOptionsType = undefined + InferredFromOptionsType = undefined, > = undefined extends ExplicitUserProvidedType ? undefined extends InferredFromOptionsType ? string @@ -173,7 +173,7 @@ type SSMGetMultipleOptions = */ type SSMGetMultipleOutput< ExplicitUserProvidedType = undefined, - InferredFromOptionsType = undefined + InferredFromOptionsType = undefined, > = undefined extends ExplicitUserProvidedType ? undefined extends InferredFromOptionsType ? Record diff --git a/packages/parameters/src/types/SecretsProvider.ts b/packages/parameters/src/types/SecretsProvider.ts index 34129dbb6c..f33aad811b 100644 --- a/packages/parameters/src/types/SecretsProvider.ts +++ b/packages/parameters/src/types/SecretsProvider.ts @@ -89,7 +89,7 @@ type SecretsGetOptions = */ type SecretsGetOutput< ExplicitUserProvidedType = undefined, - InferredFromOptionsType = undefined + InferredFromOptionsType = undefined, > = undefined extends ExplicitUserProvidedType ? undefined extends InferredFromOptionsType ? string | Uint8Array diff --git a/packages/parameters/tests/helpers/sdkMiddlewareRequestCounter.ts b/packages/parameters/tests/helpers/sdkMiddlewareRequestCounter.ts index e8addbf68a..be8885876f 100644 --- a/packages/parameters/tests/helpers/sdkMiddlewareRequestCounter.ts +++ b/packages/parameters/tests/helpers/sdkMiddlewareRequestCounter.ts @@ -27,9 +27,9 @@ export const middleware = { // Middleware added to mark start and end of an complete API call. stack.add( ( - next: InitializeHandler, - context: HandlerExecutionContext - ) => + next: InitializeHandler, + context: HandlerExecutionContext + ) => async (args: InitializeHandlerArguments) => { // We only want to count API calls to retrieve data, // not the StartConfigurationSessionCommand diff --git a/packages/parameters/tests/unit/SSMProvider.test.ts b/packages/parameters/tests/unit/SSMProvider.test.ts index 4615907750..c11d2410b5 100644 --- a/packages/parameters/tests/unit/SSMProvider.test.ts +++ b/packages/parameters/tests/unit/SSMProvider.test.ts @@ -828,9 +828,8 @@ describe('Class: SSMProvider', () => { ); // Act - const { cached, toFetch } = await provider.getParametersByNameFromCache( - parameters - ); + const { cached, toFetch } = + await provider.getParametersByNameFromCache(parameters); // Assess expect(cached).toEqual({ diff --git a/packages/parameters/tests/unit/getParameters.test.ts b/packages/parameters/tests/unit/getParameters.test.ts index b8afe00bc6..f1270b5a08 100644 --- a/packages/parameters/tests/unit/getParameters.test.ts +++ b/packages/parameters/tests/unit/getParameters.test.ts @@ -34,9 +34,8 @@ describe('Function: getParameters', () => { }); // Act - const parameters: Record | undefined = await getParameters( - parameterPath - ); + const parameters: Record | undefined = + await getParameters(parameterPath); // Assess expect(client).toReceiveCommandWith(GetParametersByPathCommand, { @@ -65,9 +64,8 @@ describe('Function: getParameters', () => { }); // Act - const parameters: Record | undefined = await getParameters( - parameterPath - ); + const parameters: Record | undefined = + await getParameters(parameterPath); // Assess expect(client).toReceiveCommandWith(GetParametersByPathCommand, { diff --git a/packages/testing/package.json b/packages/testing/package.json index 5bc1a4da44..d73426de50 100644 --- a/packages/testing/package.json +++ b/packages/testing/package.json @@ -49,4 +49,4 @@ "aws-cdk-lib": "^2.96.1", "esbuild": "^0.19.3" } -} +} \ No newline at end of file diff --git a/packages/testing/src/constants.ts b/packages/testing/src/constants.ts index e29fbe0132..4c4f8cb511 100644 --- a/packages/testing/src/constants.ts +++ b/packages/testing/src/constants.ts @@ -9,7 +9,6 @@ const defaultRuntime = 'nodejs18x'; * The AWS Lambda runtimes that are supported by the project. */ const TEST_RUNTIMES = { - nodejs14x: Runtime.NODEJS_14_X, nodejs16x: Runtime.NODEJS_16_X, [defaultRuntime]: Runtime.NODEJS_18_X, } as const; diff --git a/packages/tracer/package.json b/packages/tracer/package.json index c48d3f8292..d1647e7914 100644 --- a/packages/tracer/package.json +++ b/packages/tracer/package.json @@ -12,7 +12,6 @@ "scripts": { "test": "npm run test:unit", "test:unit": "jest --group=unit --detectOpenHandles --coverage --verbose", - "test:e2e:nodejs14x": "RUNTIME=nodejs14x jest --group=e2e", "test:e2e:nodejs16x": "RUNTIME=nodejs16x jest --group=e2e", "test:e2e:nodejs18x": "RUNTIME=nodejs18x jest --group=e2e", "test:e2e": "jest --group=e2e", @@ -70,4 +69,4 @@ "serverless", "nodejs" ] -} +} \ No newline at end of file diff --git a/packages/tracer/tests/unit/Tracer.test.ts b/packages/tracer/tests/unit/Tracer.test.ts index df6838ad13..e4a9db93af 100644 --- a/packages/tracer/tests/unit/Tracer.test.ts +++ b/packages/tracer/tests/unit/Tracer.test.ts @@ -22,7 +22,7 @@ type CaptureAsyncFuncMock = jest.SpyInstance< [ name: string, fcn: (subsegment?: Subsegment) => unknown, - parent?: Segment | Subsegment + parent?: Segment | Subsegment, ] >; const createCaptureAsyncFuncMock = function ( diff --git a/tsconfig.json b/tsconfig.json index 1a375d128b..d2cc3e1c71 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -2,7 +2,7 @@ "compilerOptions": { "incremental": true, "composite": true, - "target": "ES2020", // Node.js 14 + "target": "ES2021", // Node.js 16 "experimentalDecorators": true, "module": "commonjs", "moduleResolution": "node", // TODO: experiment with bundler & esnext From 68d6500b974b65d608b3008c54c9fa78027a7ab0 Mon Sep 17 00:00:00 2001 From: Andrea Amorosi Date: Tue, 19 Sep 2023 00:41:40 +0200 Subject: [PATCH 08/60] chore: update release script to mark all utilities as alpha --- .github/scripts/release_patch_package_json.js | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/.github/scripts/release_patch_package_json.js b/.github/scripts/release_patch_package_json.js index 626d4cc7d1..31c091aeb8 100644 --- a/.github/scripts/release_patch_package_json.js +++ b/.github/scripts/release_patch_package_json.js @@ -17,7 +17,15 @@ if (process.argv.length < 3) { } const basePath = resolve(process.argv[2]); const packageJsonPath = join(basePath, 'package.json'); -const alphaPackages = []; +const alphaPackages = [ + '@aws-lambda-powertools/batch', + '@aws-lambda-powertools/commons', + '@aws-lambda-powertools/idempotency', + '@aws-lambda-powertools/logger', + '@aws-lambda-powertools/metrics', + '@aws-lambda-powertools/parameters', + '@aws-lambda-powertools/tracer', +]; const betaPackages = []; (() => { @@ -44,6 +52,7 @@ const betaPackages = []; types, files, private, + type, } = pkgJson; let version = originalVersion; @@ -71,6 +80,7 @@ const betaPackages = []; main, types, files, + type, }; // Not all utilities have these fields, so only add them if they exist to avoid From 94c55b0945fd5e4d68d505bdfb9199e47b258e8c Mon Sep 17 00:00:00 2001 From: Andrea Amorosi Date: Wed, 27 Sep 2023 19:12:07 +0200 Subject: [PATCH 09/60] chore: restore version to ease conflicts --- .github/workflows/run-e2e-tests.yml | 6 +----- docs/snippets/package.json | 2 +- package-lock.json | 2 +- 3 files changed, 3 insertions(+), 7 deletions(-) diff --git a/.github/workflows/run-e2e-tests.yml b/.github/workflows/run-e2e-tests.yml index 1051d65576..3db702a2df 100644 --- a/.github/workflows/run-e2e-tests.yml +++ b/.github/workflows/run-e2e-tests.yml @@ -28,12 +28,8 @@ jobs: packages/parameters, packages/idempotency, ] -<<<<<<< HEAD - version: [14, 16, 18] - arch: [x86_64, arm64] -======= version: [16, 18] ->>>>>>> 878dccda (chore(maintenance): bump dependencies & drop nodejs14x (#1687)) + arch: [x86_64, arm64] fail-fast: false steps: - name: Checkout Repo diff --git a/docs/snippets/package.json b/docs/snippets/package.json index d4cf688037..67e5d906e5 100644 --- a/docs/snippets/package.json +++ b/docs/snippets/package.json @@ -1,6 +1,6 @@ { "name": "docs", - "version": "2.0.0", + "version": "1.13.1", "description": "A collection code snippets for the Powertools for AWS Lambda (TypeScript) docs", "author": { "name": "Amazon Web Services", diff --git a/package-lock.json b/package-lock.json index 86f049261d..038d3e1c1d 100644 --- a/package-lock.json +++ b/package-lock.json @@ -55,7 +55,7 @@ }, "docs/snippets": { "name": "docs", - "version": "2.0.0", + "version": "1.13.1", "license": "MIT-0", "devDependencies": { "@aws-sdk/client-appconfigdata": "^3.413.0", From 0d96e66bf1cf5eecf20c15e1acd28680dbf389a5 Mon Sep 17 00:00:00 2001 From: Andrea Amorosi Date: Wed, 27 Sep 2023 19:13:25 +0200 Subject: [PATCH 10/60] chore: release version change --- .github/scripts/release_patch_package_json.js | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/.github/scripts/release_patch_package_json.js b/.github/scripts/release_patch_package_json.js index 31c091aeb8..761c0680a1 100644 --- a/.github/scripts/release_patch_package_json.js +++ b/.github/scripts/release_patch_package_json.js @@ -17,15 +17,7 @@ if (process.argv.length < 3) { } const basePath = resolve(process.argv[2]); const packageJsonPath = join(basePath, 'package.json'); -const alphaPackages = [ - '@aws-lambda-powertools/batch', - '@aws-lambda-powertools/commons', - '@aws-lambda-powertools/idempotency', - '@aws-lambda-powertools/logger', - '@aws-lambda-powertools/metrics', - '@aws-lambda-powertools/parameters', - '@aws-lambda-powertools/tracer', -]; +const alphaPackages = []; const betaPackages = []; (() => { From 701e8770ede46e6d90f6c5282ad10d53a03d0d82 Mon Sep 17 00:00:00 2001 From: Andrea Amorosi Date: Wed, 27 Sep 2023 19:19:08 +0200 Subject: [PATCH 11/60] chore: release version change --- .github/scripts/release_patch_package_json.js | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/.github/scripts/release_patch_package_json.js b/.github/scripts/release_patch_package_json.js index 761c0680a1..31c091aeb8 100644 --- a/.github/scripts/release_patch_package_json.js +++ b/.github/scripts/release_patch_package_json.js @@ -17,7 +17,15 @@ if (process.argv.length < 3) { } const basePath = resolve(process.argv[2]); const packageJsonPath = join(basePath, 'package.json'); -const alphaPackages = []; +const alphaPackages = [ + '@aws-lambda-powertools/batch', + '@aws-lambda-powertools/commons', + '@aws-lambda-powertools/idempotency', + '@aws-lambda-powertools/logger', + '@aws-lambda-powertools/metrics', + '@aws-lambda-powertools/parameters', + '@aws-lambda-powertools/tracer', +]; const betaPackages = []; (() => { From 50aa3e7d59ddc907b19e65b5cbea4657db5faed0 Mon Sep 17 00:00:00 2001 From: Andrea Amorosi Date: Tue, 3 Oct 2023 00:34:58 +0200 Subject: [PATCH 12/60] chore(maintenance): remove `createLogger` and `createTracer` helpers (#1722) * chore(maintenance): bump dependencies & drop nodejs14x (#1687) * chore: add pre-release script * chore: restore deps * chore: added v2 shim * chore(maintenance): remove logger and tracer helper function * chore: remove imports * chore: fix deps & versions * tests: moved unit tests * tests: move logger tests * chore: added v2 shim * chore: added v2 shim --- .github/scripts/release_patch_package_json.js | 8 +- docs/snippets/package.json | 4 +- package-lock.json | 2070 +++++++---------- packages/logger/src/helpers.ts | 12 - packages/logger/src/index.ts | 1 - packages/logger/tests/unit/Logger.test.ts | 458 +++- packages/logger/tests/unit/helpers.test.ts | 450 ---- packages/tracer/src/helpers.ts | 12 - packages/tracer/src/index.ts | 1 - packages/tracer/tests/unit/Tracer.test.ts | 301 +++ packages/tracer/tests/unit/helpers.test.ts | 386 --- v2.json | 3 + 12 files changed, 1572 insertions(+), 2134 deletions(-) delete mode 100644 packages/logger/src/helpers.ts delete mode 100644 packages/logger/tests/unit/helpers.test.ts delete mode 100644 packages/tracer/src/helpers.ts delete mode 100644 packages/tracer/tests/unit/helpers.test.ts create mode 100644 v2.json diff --git a/.github/scripts/release_patch_package_json.js b/.github/scripts/release_patch_package_json.js index 31c091aeb8..c11ec86864 100644 --- a/.github/scripts/release_patch_package_json.js +++ b/.github/scripts/release_patch_package_json.js @@ -58,7 +58,10 @@ const betaPackages = []; let version = originalVersion; // If the package is an alpha or beta package, update the version number to include a suffix if (alphaPackages.includes(name)) { - version = `${version}-alpha`; + const iteration = JSON.parse( + readFileSync(resolve('..', '..', 'v2.json'), 'utf8') + ).iteration; + version = `${version}-alpha.${iteration}`; } else if (betaPackages.includes(name)) { version = `${version}-beta`; } @@ -81,6 +84,9 @@ const betaPackages = []; types, files, type, + scripts: { + postinstall: `echo 'WARNING: This is a pre-release version of Powertools for AWS (TypeScript) provided for evaluation only. Do not use in production.'`, + }, }; // Not all utilities have these fields, so only add them if they exist to avoid diff --git a/docs/snippets/package.json b/docs/snippets/package.json index 67e5d906e5..e90be8e875 100644 --- a/docs/snippets/package.json +++ b/docs/snippets/package.json @@ -1,6 +1,6 @@ { "name": "docs", - "version": "1.13.1", + "version": "1.14.0", "description": "A collection code snippets for the Powertools for AWS Lambda (TypeScript) docs", "author": { "name": "Amazon Web Services", @@ -39,4 +39,4 @@ "axios": "^1.5.0", "hashi-vault-js": "^0.4.14" } -} +} \ No newline at end of file diff --git a/package-lock.json b/package-lock.json index 038d3e1c1d..4a4220e5d3 100644 --- a/package-lock.json +++ b/package-lock.json @@ -55,7 +55,11 @@ }, "docs/snippets": { "name": "docs", +<<<<<<< HEAD + "version": "1.14.0", +======= "version": "1.13.1", +>>>>>>> 5838770e (chore: restore deps) "license": "MIT-0", "devDependencies": { "@aws-sdk/client-appconfigdata": "^3.413.0", @@ -72,7 +76,11 @@ }, "examples/cdk": { "name": "cdk-sample", +<<<<<<< HEAD "version": "1.14.0", +======= + "version": "1.13.1", +>>>>>>> 5838770e (chore: restore deps) "license": "MIT-0", "dependencies": { "@middy/core": "^3.6.2", @@ -103,54 +111,19 @@ "typescript": "^5.2.2" } }, - "examples/cdk/node_modules/@aws-lambda-powertools/commons": { - "version": "1.12.1", - "resolved": "https://registry.npmjs.org/@aws-lambda-powertools/commons/-/commons-1.12.1.tgz", - "integrity": "sha512-VChNfDUxxcB5KTfQPkJgxYihEZkrmeOzU9/A9FRBc+3v33EEM59T2pIgBkFy0VoINvGi3MoBEln/wyu2jV0ivA==", + "examples/cdk/node_modules/@types/node": { + "version": "20.6.1", + "resolved": "https://registry.npmjs.org/@types/node/-/node-20.6.1.tgz", + "integrity": "sha512-4LcJvuXQlv4lTHnxwyHQZ3uR9Zw2j7m1C9DfuwoTFQQP4Pmu04O6IfLYgMmHoOCt0nosItLLZAH+sOrRE0Bo8g==", "dev": true }, - "examples/cdk/node_modules/@aws-lambda-powertools/logger": { - "version": "1.12.1", - "resolved": "https://registry.npmjs.org/@aws-lambda-powertools/logger/-/logger-1.12.1.tgz", - "integrity": "sha512-QMBkd6/rN2MniiNcWeCigT4AKqH+NG1X6xN8S+YLszd4qJvXvRqx2EBO01WVrtyctOE8IpLqxicevmw1cJqDIA==", - "dev": true, - "dependencies": { - "@aws-lambda-powertools/commons": "^1.12.1", - "lodash.merge": "^4.6.2" - } - }, - "examples/cdk/node_modules/@aws-lambda-powertools/metrics": { - "version": "1.12.1", - "resolved": "https://registry.npmjs.org/@aws-lambda-powertools/metrics/-/metrics-1.12.1.tgz", - "integrity": "sha512-tdwZBrpm7ouzWe1fWP8dzzuyGI7S1j3kAyXGvIOTQMbQEhN/kkSLohZJyfbpnTT10jLv3ozkgff6ZnWw6mX7fA==", - "dev": true, - "dependencies": { - "@aws-lambda-powertools/commons": "^1.12.1" - } - }, - "examples/cdk/node_modules/@aws-lambda-powertools/parameters": { - "version": "1.12.1", - "resolved": "https://registry.npmjs.org/@aws-lambda-powertools/parameters/-/parameters-1.12.1.tgz", - "integrity": "sha512-+TmZ27DkkLkRTxGqflM1u2f9eiylCuuPajfSOZwxDuBgFbEsP6iIDmrCIUOrM7phR0zpq/JBHx+vSeiFQWpzjg==", - "dev": true, - "dependencies": { - "@aws-lambda-powertools/commons": "^1.12.1", - "@aws-sdk/util-base64-node": "^3.209.0" - } - }, - "examples/cdk/node_modules/@aws-lambda-powertools/tracer": { - "version": "1.12.1", - "resolved": "https://registry.npmjs.org/@aws-lambda-powertools/tracer/-/tracer-1.12.1.tgz", - "integrity": "sha512-ehaa9JzAfNvoHTbqv/bbu+cJD9RZXPEh22g47vMyQ2qg5e3Xe8wyzecFU35rHLlys9CV3SGLuazlyaTc5K3zmA==", - "dev": true, - "dependencies": { - "@aws-lambda-powertools/commons": "^1.12.1", - "aws-xray-sdk-core": "^3.4.1" - } - }, "examples/sam": { "name": "sam-example", +<<<<<<< HEAD "version": "1.14.0", +======= + "version": "1.13.1", +>>>>>>> 5838770e (chore: restore deps) "license": "MIT-0", "dependencies": { "@aws-lambda-powertools/logger": "^1.14.0", @@ -174,48 +147,18 @@ "typescript": "^5.2.2" } }, - "examples/sam/node_modules/@aws-lambda-powertools/commons": { - "version": "1.12.1", - "resolved": "https://registry.npmjs.org/@aws-lambda-powertools/commons/-/commons-1.12.1.tgz", - "integrity": "sha512-VChNfDUxxcB5KTfQPkJgxYihEZkrmeOzU9/A9FRBc+3v33EEM59T2pIgBkFy0VoINvGi3MoBEln/wyu2jV0ivA==" - }, - "examples/sam/node_modules/@aws-lambda-powertools/logger": { - "version": "1.12.1", - "resolved": "https://registry.npmjs.org/@aws-lambda-powertools/logger/-/logger-1.12.1.tgz", - "integrity": "sha512-QMBkd6/rN2MniiNcWeCigT4AKqH+NG1X6xN8S+YLszd4qJvXvRqx2EBO01WVrtyctOE8IpLqxicevmw1cJqDIA==", - "dependencies": { - "@aws-lambda-powertools/commons": "^1.12.1", - "lodash.merge": "^4.6.2" - } - }, - "examples/sam/node_modules/@aws-lambda-powertools/metrics": { - "version": "1.12.1", - "resolved": "https://registry.npmjs.org/@aws-lambda-powertools/metrics/-/metrics-1.12.1.tgz", - "integrity": "sha512-tdwZBrpm7ouzWe1fWP8dzzuyGI7S1j3kAyXGvIOTQMbQEhN/kkSLohZJyfbpnTT10jLv3ozkgff6ZnWw6mX7fA==", - "dependencies": { - "@aws-lambda-powertools/commons": "^1.12.1" - } - }, - "examples/sam/node_modules/@aws-lambda-powertools/parameters": { - "version": "1.12.1", - "resolved": "https://registry.npmjs.org/@aws-lambda-powertools/parameters/-/parameters-1.12.1.tgz", - "integrity": "sha512-+TmZ27DkkLkRTxGqflM1u2f9eiylCuuPajfSOZwxDuBgFbEsP6iIDmrCIUOrM7phR0zpq/JBHx+vSeiFQWpzjg==", - "dependencies": { - "@aws-lambda-powertools/commons": "^1.12.1", - "@aws-sdk/util-base64-node": "^3.209.0" - } - }, - "examples/sam/node_modules/@aws-lambda-powertools/tracer": { - "version": "1.12.1", - "resolved": "https://registry.npmjs.org/@aws-lambda-powertools/tracer/-/tracer-1.12.1.tgz", - "integrity": "sha512-ehaa9JzAfNvoHTbqv/bbu+cJD9RZXPEh22g47vMyQ2qg5e3Xe8wyzecFU35rHLlys9CV3SGLuazlyaTc5K3zmA==", - "dependencies": { - "@aws-lambda-powertools/commons": "^1.12.1", - "aws-xray-sdk-core": "^3.4.1" - } + "examples/sam/node_modules/@types/node": { + "version": "20.6.1", + "resolved": "https://registry.npmjs.org/@types/node/-/node-20.6.1.tgz", + "integrity": "sha512-4LcJvuXQlv4lTHnxwyHQZ3uR9Zw2j7m1C9DfuwoTFQQP4Pmu04O6IfLYgMmHoOCt0nosItLLZAH+sOrRE0Bo8g==", + "dev": true }, "layers": { +<<<<<<< HEAD "version": "1.14.0", +======= + "version": "1.13.1", +>>>>>>> 5838770e (chore: restore deps) "license": "MIT-0", "dependencies": { "aws-cdk": "^2.96.1", @@ -399,46 +342,47 @@ "link": true }, "node_modules/@aws-sdk/client-appconfigdata": { - "version": "3.413.0", - "resolved": "https://registry.npmjs.org/@aws-sdk/client-appconfigdata/-/client-appconfigdata-3.413.0.tgz", - "integrity": "sha512-Fb7No9yKoiN4YUmDfvdqW0UYAtso4cXdpzwBOhqclEK5kOhhK0Hbx6iJBJMF5Gp6M2ZhuMVMJKz6uyiD9eL/kQ==", + "version": "3.421.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/client-appconfigdata/-/client-appconfigdata-3.421.0.tgz", + "integrity": "sha512-QTu+RsBMcyyiU6zLr5D8n4dsBChs3fmoa6Gz/GEvqxBVAhopN2a8su8iC88zYViw7T4/J8IXM8Uh8fLulCBQ0w==", "dev": true, "dependencies": { "@aws-crypto/sha256-browser": "3.0.0", "@aws-crypto/sha256-js": "3.0.0", - "@aws-sdk/client-sts": "3.413.0", - "@aws-sdk/credential-provider-node": "3.413.0", - "@aws-sdk/middleware-host-header": "3.413.0", - "@aws-sdk/middleware-logger": "3.413.0", - "@aws-sdk/middleware-recursion-detection": "3.413.0", - "@aws-sdk/middleware-signing": "3.413.0", - "@aws-sdk/middleware-user-agent": "3.413.0", - "@aws-sdk/types": "3.413.0", - "@aws-sdk/util-endpoints": "3.413.0", - "@aws-sdk/util-user-agent-browser": "3.413.0", - "@aws-sdk/util-user-agent-node": "3.413.0", - "@smithy/config-resolver": "^2.0.8", - "@smithy/fetch-http-handler": "^2.1.3", - "@smithy/hash-node": "^2.0.7", - "@smithy/invalid-dependency": "^2.0.7", - "@smithy/middleware-content-length": "^2.0.9", - "@smithy/middleware-endpoint": "^2.0.7", - "@smithy/middleware-retry": "^2.0.10", - "@smithy/middleware-serde": "^2.0.7", - "@smithy/middleware-stack": "^2.0.0", - "@smithy/node-config-provider": "^2.0.10", - "@smithy/node-http-handler": "^2.1.3", - "@smithy/protocol-http": "^3.0.3", - "@smithy/smithy-client": "^2.1.4", - "@smithy/types": "^2.3.1", - "@smithy/url-parser": "^2.0.7", + "@aws-sdk/client-sts": "3.421.0", + "@aws-sdk/credential-provider-node": "3.421.0", + "@aws-sdk/middleware-host-header": "3.418.0", + "@aws-sdk/middleware-logger": "3.418.0", + "@aws-sdk/middleware-recursion-detection": "3.418.0", + "@aws-sdk/middleware-signing": "3.418.0", + "@aws-sdk/middleware-user-agent": "3.418.0", + "@aws-sdk/region-config-resolver": "3.418.0", + "@aws-sdk/types": "3.418.0", + "@aws-sdk/util-endpoints": "3.418.0", + "@aws-sdk/util-user-agent-browser": "3.418.0", + "@aws-sdk/util-user-agent-node": "3.418.0", + "@smithy/config-resolver": "^2.0.10", + "@smithy/fetch-http-handler": "^2.1.5", + "@smithy/hash-node": "^2.0.9", + "@smithy/invalid-dependency": "^2.0.9", + "@smithy/middleware-content-length": "^2.0.11", + "@smithy/middleware-endpoint": "^2.0.9", + "@smithy/middleware-retry": "^2.0.12", + "@smithy/middleware-serde": "^2.0.9", + "@smithy/middleware-stack": "^2.0.2", + "@smithy/node-config-provider": "^2.0.12", + "@smithy/node-http-handler": "^2.1.5", + "@smithy/protocol-http": "^3.0.5", + "@smithy/smithy-client": "^2.1.6", + "@smithy/types": "^2.3.3", + "@smithy/url-parser": "^2.0.9", "@smithy/util-base64": "^2.0.0", "@smithy/util-body-length-browser": "^2.0.0", "@smithy/util-body-length-node": "^2.1.0", - "@smithy/util-defaults-mode-browser": "^2.0.8", - "@smithy/util-defaults-mode-node": "^2.0.10", - "@smithy/util-retry": "^2.0.0", - "@smithy/util-stream": "^2.0.10", + "@smithy/util-defaults-mode-browser": "^2.0.10", + "@smithy/util-defaults-mode-node": "^2.0.12", + "@smithy/util-retry": "^2.0.2", + "@smithy/util-stream": "^2.0.12", "@smithy/util-utf8": "^2.0.0", "tslib": "^2.5.0" }, @@ -447,47 +391,48 @@ } }, "node_modules/@aws-sdk/client-cloudwatch": { - "version": "3.413.0", - "resolved": "https://registry.npmjs.org/@aws-sdk/client-cloudwatch/-/client-cloudwatch-3.413.0.tgz", - "integrity": "sha512-3LwR4J8GyQo1B9oeoqmLsPPIzoxu4HEqiw8nrEquvKv+cq6nPYVM8cjLbcSJD261iwoUp9Y2U6FBldaFEHUn4g==", + "version": "3.421.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/client-cloudwatch/-/client-cloudwatch-3.421.0.tgz", + "integrity": "sha512-EBegld7Ks/g1tyNL+0AgTS0ZdgF0njz/AgyQwDIHXgsJVDn9tNga8wL3V2l2aj37gASJAC6PEXwK1rb0pVz4lw==", "dev": true, "dependencies": { "@aws-crypto/sha256-browser": "3.0.0", "@aws-crypto/sha256-js": "3.0.0", - "@aws-sdk/client-sts": "3.413.0", - "@aws-sdk/credential-provider-node": "3.413.0", - "@aws-sdk/middleware-host-header": "3.413.0", - "@aws-sdk/middleware-logger": "3.413.0", - "@aws-sdk/middleware-recursion-detection": "3.413.0", - "@aws-sdk/middleware-signing": "3.413.0", - "@aws-sdk/middleware-user-agent": "3.413.0", - "@aws-sdk/types": "3.413.0", - "@aws-sdk/util-endpoints": "3.413.0", - "@aws-sdk/util-user-agent-browser": "3.413.0", - "@aws-sdk/util-user-agent-node": "3.413.0", - "@smithy/config-resolver": "^2.0.8", - "@smithy/fetch-http-handler": "^2.1.3", - "@smithy/hash-node": "^2.0.7", - "@smithy/invalid-dependency": "^2.0.7", - "@smithy/middleware-content-length": "^2.0.9", - "@smithy/middleware-endpoint": "^2.0.7", - "@smithy/middleware-retry": "^2.0.10", - "@smithy/middleware-serde": "^2.0.7", - "@smithy/middleware-stack": "^2.0.0", - "@smithy/node-config-provider": "^2.0.10", - "@smithy/node-http-handler": "^2.1.3", - "@smithy/protocol-http": "^3.0.3", - "@smithy/smithy-client": "^2.1.4", - "@smithy/types": "^2.3.1", - "@smithy/url-parser": "^2.0.7", + "@aws-sdk/client-sts": "3.421.0", + "@aws-sdk/credential-provider-node": "3.421.0", + "@aws-sdk/middleware-host-header": "3.418.0", + "@aws-sdk/middleware-logger": "3.418.0", + "@aws-sdk/middleware-recursion-detection": "3.418.0", + "@aws-sdk/middleware-signing": "3.418.0", + "@aws-sdk/middleware-user-agent": "3.418.0", + "@aws-sdk/region-config-resolver": "3.418.0", + "@aws-sdk/types": "3.418.0", + "@aws-sdk/util-endpoints": "3.418.0", + "@aws-sdk/util-user-agent-browser": "3.418.0", + "@aws-sdk/util-user-agent-node": "3.418.0", + "@smithy/config-resolver": "^2.0.10", + "@smithy/fetch-http-handler": "^2.1.5", + "@smithy/hash-node": "^2.0.9", + "@smithy/invalid-dependency": "^2.0.9", + "@smithy/middleware-content-length": "^2.0.11", + "@smithy/middleware-endpoint": "^2.0.9", + "@smithy/middleware-retry": "^2.0.12", + "@smithy/middleware-serde": "^2.0.9", + "@smithy/middleware-stack": "^2.0.2", + "@smithy/node-config-provider": "^2.0.12", + "@smithy/node-http-handler": "^2.1.5", + "@smithy/protocol-http": "^3.0.5", + "@smithy/smithy-client": "^2.1.6", + "@smithy/types": "^2.3.3", + "@smithy/url-parser": "^2.0.9", "@smithy/util-base64": "^2.0.0", "@smithy/util-body-length-browser": "^2.0.0", "@smithy/util-body-length-node": "^2.1.0", - "@smithy/util-defaults-mode-browser": "^2.0.8", - "@smithy/util-defaults-mode-node": "^2.0.10", - "@smithy/util-retry": "^2.0.0", + "@smithy/util-defaults-mode-browser": "^2.0.10", + "@smithy/util-defaults-mode-node": "^2.0.12", + "@smithy/util-retry": "^2.0.2", "@smithy/util-utf8": "^2.0.0", - "@smithy/util-waiter": "^2.0.7", + "@smithy/util-waiter": "^2.0.9", "fast-xml-parser": "4.2.5", "tslib": "^2.5.0" }, @@ -496,47 +441,48 @@ } }, "node_modules/@aws-sdk/client-dynamodb": { - "version": "3.413.0", - "resolved": "https://registry.npmjs.org/@aws-sdk/client-dynamodb/-/client-dynamodb-3.413.0.tgz", - "integrity": "sha512-NtJdNE/m0yARJIG0HeMFrkQYdKxffnKMPvaRTlBy+bG6SOp1W5iwLj4jvjxa7eYMRMhcfQzS6LOkh+o6QaWuOQ==", + "version": "3.421.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/client-dynamodb/-/client-dynamodb-3.421.0.tgz", + "integrity": "sha512-TXyKvEYAxoz3LNpXSvPaLp139X06yzz35SNzKKNt/z7lfbmZ/jY7jVK4nur/Y5GSSlL+duW5yeS4iqq67kdl9Q==", "dependencies": { "@aws-crypto/sha256-browser": "3.0.0", "@aws-crypto/sha256-js": "3.0.0", - "@aws-sdk/client-sts": "3.413.0", - "@aws-sdk/credential-provider-node": "3.413.0", - "@aws-sdk/middleware-endpoint-discovery": "3.413.0", - "@aws-sdk/middleware-host-header": "3.413.0", - "@aws-sdk/middleware-logger": "3.413.0", - "@aws-sdk/middleware-recursion-detection": "3.413.0", - "@aws-sdk/middleware-signing": "3.413.0", - "@aws-sdk/middleware-user-agent": "3.413.0", - "@aws-sdk/types": "3.413.0", - "@aws-sdk/util-endpoints": "3.413.0", - "@aws-sdk/util-user-agent-browser": "3.413.0", - "@aws-sdk/util-user-agent-node": "3.413.0", - "@smithy/config-resolver": "^2.0.8", - "@smithy/fetch-http-handler": "^2.1.3", - "@smithy/hash-node": "^2.0.7", - "@smithy/invalid-dependency": "^2.0.7", - "@smithy/middleware-content-length": "^2.0.9", - "@smithy/middleware-endpoint": "^2.0.7", - "@smithy/middleware-retry": "^2.0.10", - "@smithy/middleware-serde": "^2.0.7", - "@smithy/middleware-stack": "^2.0.0", - "@smithy/node-config-provider": "^2.0.10", - "@smithy/node-http-handler": "^2.1.3", - "@smithy/protocol-http": "^3.0.3", - "@smithy/smithy-client": "^2.1.4", - "@smithy/types": "^2.3.1", - "@smithy/url-parser": "^2.0.7", + "@aws-sdk/client-sts": "3.421.0", + "@aws-sdk/credential-provider-node": "3.421.0", + "@aws-sdk/middleware-endpoint-discovery": "3.418.0", + "@aws-sdk/middleware-host-header": "3.418.0", + "@aws-sdk/middleware-logger": "3.418.0", + "@aws-sdk/middleware-recursion-detection": "3.418.0", + "@aws-sdk/middleware-signing": "3.418.0", + "@aws-sdk/middleware-user-agent": "3.418.0", + "@aws-sdk/region-config-resolver": "3.418.0", + "@aws-sdk/types": "3.418.0", + "@aws-sdk/util-endpoints": "3.418.0", + "@aws-sdk/util-user-agent-browser": "3.418.0", + "@aws-sdk/util-user-agent-node": "3.418.0", + "@smithy/config-resolver": "^2.0.10", + "@smithy/fetch-http-handler": "^2.1.5", + "@smithy/hash-node": "^2.0.9", + "@smithy/invalid-dependency": "^2.0.9", + "@smithy/middleware-content-length": "^2.0.11", + "@smithy/middleware-endpoint": "^2.0.9", + "@smithy/middleware-retry": "^2.0.12", + "@smithy/middleware-serde": "^2.0.9", + "@smithy/middleware-stack": "^2.0.2", + "@smithy/node-config-provider": "^2.0.12", + "@smithy/node-http-handler": "^2.1.5", + "@smithy/protocol-http": "^3.0.5", + "@smithy/smithy-client": "^2.1.6", + "@smithy/types": "^2.3.3", + "@smithy/url-parser": "^2.0.9", "@smithy/util-base64": "^2.0.0", "@smithy/util-body-length-browser": "^2.0.0", "@smithy/util-body-length-node": "^2.1.0", - "@smithy/util-defaults-mode-browser": "^2.0.8", - "@smithy/util-defaults-mode-node": "^2.0.10", - "@smithy/util-retry": "^2.0.0", + "@smithy/util-defaults-mode-browser": "^2.0.10", + "@smithy/util-defaults-mode-node": "^2.0.12", + "@smithy/util-retry": "^2.0.2", "@smithy/util-utf8": "^2.0.0", - "@smithy/util-waiter": "^2.0.7", + "@smithy/util-waiter": "^2.0.9", "tslib": "^2.5.0", "uuid": "^8.3.2" }, @@ -545,14 +491,14 @@ } }, "node_modules/@aws-sdk/client-lambda": { - "version": "3.418.0", - "resolved": "https://registry.npmjs.org/@aws-sdk/client-lambda/-/client-lambda-3.418.0.tgz", - "integrity": "sha512-9EB4QNsd95/4va1JTekPqtM3K+cDSULCiGgM1KJ9NOqAaA3vVOM2/9NVzVjG2ohFw36skTmyu62+LmKLbpB4ng==", + "version": "3.421.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/client-lambda/-/client-lambda-3.421.0.tgz", + "integrity": "sha512-cMk7JeQlyoeIxabVsZXr3rwIfgxSL4kJpoDgFu8q+hnifOdgD8gP6AhMfYu+NMroXjUntXu+ZJbo5eBTn80OtQ==", "dependencies": { "@aws-crypto/sha256-browser": "3.0.0", "@aws-crypto/sha256-js": "3.0.0", - "@aws-sdk/client-sts": "3.418.0", - "@aws-sdk/credential-provider-node": "3.418.0", + "@aws-sdk/client-sts": "3.421.0", + "@aws-sdk/credential-provider-node": "3.421.0", "@aws-sdk/middleware-host-header": "3.418.0", "@aws-sdk/middleware-logger": "3.418.0", "@aws-sdk/middleware-recursion-detection": "3.418.0", @@ -596,16 +542,20 @@ "node": ">=14.0.0" } }, - "node_modules/@aws-sdk/client-lambda/node_modules/@aws-sdk/client-sso": { - "version": "3.418.0", - "resolved": "https://registry.npmjs.org/@aws-sdk/client-sso/-/client-sso-3.418.0.tgz", - "integrity": "sha512-fakz3YeSW/kCAOJ5w4ObrrQBxsYO8sU8i6WHLv6iWAsYZKAws2Mqa8g89P61+GitSH4z9waksdLouS6ep78/5A==", + "node_modules/@aws-sdk/client-secrets-manager": { + "version": "3.421.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/client-secrets-manager/-/client-secrets-manager-3.421.0.tgz", + "integrity": "sha512-uwoSstFm+A60f2/CuIDHqTJdYm4hPMNCzkI3J/pKoD4A6suLIoJ9lEKGV3fdeL456vir4RTwiJG6Llzo+zI+nA==", + "dev": true, "dependencies": { "@aws-crypto/sha256-browser": "3.0.0", "@aws-crypto/sha256-js": "3.0.0", + "@aws-sdk/client-sts": "3.421.0", + "@aws-sdk/credential-provider-node": "3.421.0", "@aws-sdk/middleware-host-header": "3.418.0", "@aws-sdk/middleware-logger": "3.418.0", "@aws-sdk/middleware-recursion-detection": "3.418.0", + "@aws-sdk/middleware-signing": "3.418.0", "@aws-sdk/middleware-user-agent": "3.418.0", "@aws-sdk/region-config-resolver": "3.418.0", "@aws-sdk/types": "3.418.0", @@ -634,24 +584,25 @@ "@smithy/util-defaults-mode-node": "^2.0.12", "@smithy/util-retry": "^2.0.2", "@smithy/util-utf8": "^2.0.0", - "tslib": "^2.5.0" + "tslib": "^2.5.0", + "uuid": "^8.3.2" }, "engines": { "node": ">=14.0.0" } }, - "node_modules/@aws-sdk/client-lambda/node_modules/@aws-sdk/client-sts": { - "version": "3.418.0", - "resolved": "https://registry.npmjs.org/@aws-sdk/client-sts/-/client-sts-3.418.0.tgz", - "integrity": "sha512-L0n0Hw+Pm+BhXTN1bYZ0y4JAMArYgazdHf1nUSlEHndgZicCCuQtlMLxfo3i/IbtWi0dzfZcZ9d/MdAM8p4Jyw==", + "node_modules/@aws-sdk/client-ssm": { + "version": "3.421.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/client-ssm/-/client-ssm-3.421.0.tgz", + "integrity": "sha512-xdysVX+b0kmt8uEAIlkWNqyvYKVHFQepDlERHa9sXxPB8KEdzgm/To+WlAHE0Ujg6ju0Vf4FZdKA5k/+1Pbydw==", "dependencies": { "@aws-crypto/sha256-browser": "3.0.0", "@aws-crypto/sha256-js": "3.0.0", - "@aws-sdk/credential-provider-node": "3.418.0", + "@aws-sdk/client-sts": "3.421.0", + "@aws-sdk/credential-provider-node": "3.421.0", "@aws-sdk/middleware-host-header": "3.418.0", "@aws-sdk/middleware-logger": "3.418.0", "@aws-sdk/middleware-recursion-detection": "3.418.0", - "@aws-sdk/middleware-sdk-sts": "3.418.0", "@aws-sdk/middleware-signing": "3.418.0", "@aws-sdk/middleware-user-agent": "3.418.0", "@aws-sdk/region-config-resolver": "3.418.0", @@ -681,231 +632,139 @@ "@smithy/util-defaults-mode-node": "^2.0.12", "@smithy/util-retry": "^2.0.2", "@smithy/util-utf8": "^2.0.0", - "fast-xml-parser": "4.2.5", - "tslib": "^2.5.0" + "@smithy/util-waiter": "^2.0.9", + "tslib": "^2.5.0", + "uuid": "^8.3.2" }, "engines": { "node": ">=14.0.0" } }, - "node_modules/@aws-sdk/client-lambda/node_modules/@aws-sdk/credential-provider-env": { - "version": "3.418.0", - "resolved": "https://registry.npmjs.org/@aws-sdk/credential-provider-env/-/credential-provider-env-3.418.0.tgz", - "integrity": "sha512-e74sS+x63EZUBO+HaI8zor886YdtmULzwKdctsZp5/37Xho1CVUNtEC+fYa69nigBD9afoiH33I4JggaHgrekQ==", + "node_modules/@aws-sdk/client-sso": { + "version": "3.421.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/client-sso/-/client-sso-3.421.0.tgz", + "integrity": "sha512-40CmW7K2/FZEn3CbOjbpRYeVjKu6aJQlpRHcAgEJGNoVEAnRA3YNH4H0BN2iWWITfYg3B7sIjMm5VE9fCIK1Ng==", "dependencies": { + "@aws-crypto/sha256-browser": "3.0.0", + "@aws-crypto/sha256-js": "3.0.0", + "@aws-sdk/middleware-host-header": "3.418.0", + "@aws-sdk/middleware-logger": "3.418.0", + "@aws-sdk/middleware-recursion-detection": "3.418.0", + "@aws-sdk/middleware-user-agent": "3.418.0", + "@aws-sdk/region-config-resolver": "3.418.0", "@aws-sdk/types": "3.418.0", - "@smithy/property-provider": "^2.0.0", + "@aws-sdk/util-endpoints": "3.418.0", + "@aws-sdk/util-user-agent-browser": "3.418.0", + "@aws-sdk/util-user-agent-node": "3.418.0", + "@smithy/config-resolver": "^2.0.10", + "@smithy/fetch-http-handler": "^2.1.5", + "@smithy/hash-node": "^2.0.9", + "@smithy/invalid-dependency": "^2.0.9", + "@smithy/middleware-content-length": "^2.0.11", + "@smithy/middleware-endpoint": "^2.0.9", + "@smithy/middleware-retry": "^2.0.12", + "@smithy/middleware-serde": "^2.0.9", + "@smithy/middleware-stack": "^2.0.2", + "@smithy/node-config-provider": "^2.0.12", + "@smithy/node-http-handler": "^2.1.5", + "@smithy/protocol-http": "^3.0.5", + "@smithy/smithy-client": "^2.1.6", "@smithy/types": "^2.3.3", + "@smithy/url-parser": "^2.0.9", + "@smithy/util-base64": "^2.0.0", + "@smithy/util-body-length-browser": "^2.0.0", + "@smithy/util-body-length-node": "^2.1.0", + "@smithy/util-defaults-mode-browser": "^2.0.10", + "@smithy/util-defaults-mode-node": "^2.0.12", + "@smithy/util-retry": "^2.0.2", + "@smithy/util-utf8": "^2.0.0", "tslib": "^2.5.0" }, "engines": { "node": ">=14.0.0" } }, - "node_modules/@aws-sdk/client-lambda/node_modules/@aws-sdk/credential-provider-ini": { - "version": "3.418.0", - "resolved": "https://registry.npmjs.org/@aws-sdk/credential-provider-ini/-/credential-provider-ini-3.418.0.tgz", - "integrity": "sha512-LTAeKKV85unlSqGNIeqEZ4N9gufaSoH+670n5YTUEk564zHCkUQW0PJomzLF5jKBco6Yfzv6rPBTukd+x9XWqw==", + "node_modules/@aws-sdk/client-sts": { + "version": "3.421.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/client-sts/-/client-sts-3.421.0.tgz", + "integrity": "sha512-/92NOZMcdkBcvGrINk5B/l+6DGcVzYE4Ab3ME4vcY9y//u2gd0yNn5YYRSzzjVBLvhDP3u6CbTfLX2Bm4qihPw==", "dependencies": { - "@aws-sdk/credential-provider-env": "3.418.0", - "@aws-sdk/credential-provider-process": "3.418.0", - "@aws-sdk/credential-provider-sso": "3.418.0", - "@aws-sdk/credential-provider-web-identity": "3.418.0", + "@aws-crypto/sha256-browser": "3.0.0", + "@aws-crypto/sha256-js": "3.0.0", + "@aws-sdk/credential-provider-node": "3.421.0", + "@aws-sdk/middleware-host-header": "3.418.0", + "@aws-sdk/middleware-logger": "3.418.0", + "@aws-sdk/middleware-recursion-detection": "3.418.0", + "@aws-sdk/middleware-sdk-sts": "3.418.0", + "@aws-sdk/middleware-signing": "3.418.0", + "@aws-sdk/middleware-user-agent": "3.418.0", + "@aws-sdk/region-config-resolver": "3.418.0", "@aws-sdk/types": "3.418.0", - "@smithy/credential-provider-imds": "^2.0.0", - "@smithy/property-provider": "^2.0.0", - "@smithy/shared-ini-file-loader": "^2.0.6", + "@aws-sdk/util-endpoints": "3.418.0", + "@aws-sdk/util-user-agent-browser": "3.418.0", + "@aws-sdk/util-user-agent-node": "3.418.0", + "@smithy/config-resolver": "^2.0.10", + "@smithy/fetch-http-handler": "^2.1.5", + "@smithy/hash-node": "^2.0.9", + "@smithy/invalid-dependency": "^2.0.9", + "@smithy/middleware-content-length": "^2.0.11", + "@smithy/middleware-endpoint": "^2.0.9", + "@smithy/middleware-retry": "^2.0.12", + "@smithy/middleware-serde": "^2.0.9", + "@smithy/middleware-stack": "^2.0.2", + "@smithy/node-config-provider": "^2.0.12", + "@smithy/node-http-handler": "^2.1.5", + "@smithy/protocol-http": "^3.0.5", + "@smithy/smithy-client": "^2.1.6", "@smithy/types": "^2.3.3", + "@smithy/url-parser": "^2.0.9", + "@smithy/util-base64": "^2.0.0", + "@smithy/util-body-length-browser": "^2.0.0", + "@smithy/util-body-length-node": "^2.1.0", + "@smithy/util-defaults-mode-browser": "^2.0.10", + "@smithy/util-defaults-mode-node": "^2.0.12", + "@smithy/util-retry": "^2.0.2", + "@smithy/util-utf8": "^2.0.0", + "fast-xml-parser": "4.2.5", "tslib": "^2.5.0" }, "engines": { "node": ">=14.0.0" } }, - "node_modules/@aws-sdk/client-lambda/node_modules/@aws-sdk/credential-provider-node": { - "version": "3.418.0", - "resolved": "https://registry.npmjs.org/@aws-sdk/credential-provider-node/-/credential-provider-node-3.418.0.tgz", - "integrity": "sha512-VveTjtSC6m8YXj3fQDkMKEZuHv+CR2Z4u/NAN51Fi4xOtIWUtOBj5rfZ8HmBYoBjRF0DtRlPXuMiNnXAzTctfQ==", + "node_modules/@aws-sdk/client-xray": { + "version": "3.421.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/client-xray/-/client-xray-3.421.0.tgz", + "integrity": "sha512-/OrFKLGphV96e3SDM0tZ+xKPBAKw6DznwY9i+I2iwC75B8BJdLnDA6qWuwiDboEKYilVI6JAklpp59i5vmnDUA==", + "dev": true, "dependencies": { - "@aws-sdk/credential-provider-env": "3.418.0", - "@aws-sdk/credential-provider-ini": "3.418.0", - "@aws-sdk/credential-provider-process": "3.418.0", - "@aws-sdk/credential-provider-sso": "3.418.0", - "@aws-sdk/credential-provider-web-identity": "3.418.0", + "@aws-crypto/sha256-browser": "3.0.0", + "@aws-crypto/sha256-js": "3.0.0", + "@aws-sdk/client-sts": "3.421.0", + "@aws-sdk/credential-provider-node": "3.421.0", + "@aws-sdk/middleware-host-header": "3.418.0", + "@aws-sdk/middleware-logger": "3.418.0", + "@aws-sdk/middleware-recursion-detection": "3.418.0", + "@aws-sdk/middleware-signing": "3.418.0", + "@aws-sdk/middleware-user-agent": "3.418.0", + "@aws-sdk/region-config-resolver": "3.418.0", "@aws-sdk/types": "3.418.0", - "@smithy/credential-provider-imds": "^2.0.0", - "@smithy/property-provider": "^2.0.0", - "@smithy/shared-ini-file-loader": "^2.0.6", - "@smithy/types": "^2.3.3", - "tslib": "^2.5.0" - }, - "engines": { - "node": ">=14.0.0" - } - }, - "node_modules/@aws-sdk/client-lambda/node_modules/@aws-sdk/credential-provider-process": { - "version": "3.418.0", - "resolved": "https://registry.npmjs.org/@aws-sdk/credential-provider-process/-/credential-provider-process-3.418.0.tgz", - "integrity": "sha512-xPbdm2WKz1oH6pTkrJoUmr3OLuqvvcPYTQX0IIlc31tmDwDWPQjXGGFD/vwZGIZIkKaFpFxVMgAzfFScxox7dw==", - "dependencies": { - "@aws-sdk/types": "3.418.0", - "@smithy/property-provider": "^2.0.0", - "@smithy/shared-ini-file-loader": "^2.0.6", - "@smithy/types": "^2.3.3", - "tslib": "^2.5.0" - }, - "engines": { - "node": ">=14.0.0" - } - }, - "node_modules/@aws-sdk/client-lambda/node_modules/@aws-sdk/credential-provider-sso": { - "version": "3.418.0", - "resolved": "https://registry.npmjs.org/@aws-sdk/credential-provider-sso/-/credential-provider-sso-3.418.0.tgz", - "integrity": "sha512-tUF5Hg/HfaU5t+E7IuvohYlodSIlBXa28xAJPPFxhKrUnvP6AIoW6JLazOtCIQjQgJYEUILV29XX+ojUuITcaw==", - "dependencies": { - "@aws-sdk/client-sso": "3.418.0", - "@aws-sdk/token-providers": "3.418.0", - "@aws-sdk/types": "3.418.0", - "@smithy/property-provider": "^2.0.0", - "@smithy/shared-ini-file-loader": "^2.0.6", - "@smithy/types": "^2.3.3", - "tslib": "^2.5.0" - }, - "engines": { - "node": ">=14.0.0" - } - }, - "node_modules/@aws-sdk/client-lambda/node_modules/@aws-sdk/credential-provider-web-identity": { - "version": "3.418.0", - "resolved": "https://registry.npmjs.org/@aws-sdk/credential-provider-web-identity/-/credential-provider-web-identity-3.418.0.tgz", - "integrity": "sha512-do7ang565n9p3dS1JdsQY01rUfRx8vkxQqz5M8OlcEHBNiCdi2PvSjNwcBdrv/FKkyIxZb0TImOfBSt40hVdxQ==", - "dependencies": { - "@aws-sdk/types": "3.418.0", - "@smithy/property-provider": "^2.0.0", - "@smithy/types": "^2.3.3", - "tslib": "^2.5.0" - }, - "engines": { - "node": ">=14.0.0" - } - }, - "node_modules/@aws-sdk/client-lambda/node_modules/@aws-sdk/middleware-host-header": { - "version": "3.418.0", - "resolved": "https://registry.npmjs.org/@aws-sdk/middleware-host-header/-/middleware-host-header-3.418.0.tgz", - "integrity": "sha512-LrMTdzalkPw/1ujLCKPLwCGvPMCmT4P+vOZQRbSEVZPnlZk+Aj++aL/RaHou0jL4kJH3zl8iQepriBt4a7UvXQ==", - "dependencies": { - "@aws-sdk/types": "3.418.0", - "@smithy/protocol-http": "^3.0.5", - "@smithy/types": "^2.3.3", - "tslib": "^2.5.0" - }, - "engines": { - "node": ">=14.0.0" - } - }, - "node_modules/@aws-sdk/client-lambda/node_modules/@aws-sdk/middleware-logger": { - "version": "3.418.0", - "resolved": "https://registry.npmjs.org/@aws-sdk/middleware-logger/-/middleware-logger-3.418.0.tgz", - "integrity": "sha512-StKGmyPVfoO/wdNTtKemYwoJsqIl4l7oqarQY7VSf2Mp3mqaa+njLViHsQbirYpyqpgUEusOnuTlH5utxJ1NsQ==", - "dependencies": { - "@aws-sdk/types": "3.418.0", - "@smithy/types": "^2.3.3", - "tslib": "^2.5.0" - }, - "engines": { - "node": ">=14.0.0" - } - }, - "node_modules/@aws-sdk/client-lambda/node_modules/@aws-sdk/middleware-recursion-detection": { - "version": "3.418.0", - "resolved": "https://registry.npmjs.org/@aws-sdk/middleware-recursion-detection/-/middleware-recursion-detection-3.418.0.tgz", - "integrity": "sha512-kKFrIQglBLUFPbHSDy1+bbe3Na2Kd70JSUC3QLMbUHmqipXN8KeXRfAj7vTv97zXl0WzG0buV++WcNwOm1rFjg==", - "dependencies": { - "@aws-sdk/types": "3.418.0", - "@smithy/protocol-http": "^3.0.5", - "@smithy/types": "^2.3.3", - "tslib": "^2.5.0" - }, - "engines": { - "node": ">=14.0.0" - } - }, - "node_modules/@aws-sdk/client-lambda/node_modules/@aws-sdk/middleware-sdk-sts": { - "version": "3.418.0", - "resolved": "https://registry.npmjs.org/@aws-sdk/middleware-sdk-sts/-/middleware-sdk-sts-3.418.0.tgz", - "integrity": "sha512-cW8ijrCTP+mgihvcq4+TbhAcE/we5lFl4ydRqvTdtcSnYQAVQADg47rnTScQiFsPFEB3NKq7BGeyTJF9MKolPA==", - "dependencies": { - "@aws-sdk/middleware-signing": "3.418.0", - "@aws-sdk/types": "3.418.0", - "@smithy/types": "^2.3.3", - "tslib": "^2.5.0" - }, - "engines": { - "node": ">=14.0.0" - } - }, - "node_modules/@aws-sdk/client-lambda/node_modules/@aws-sdk/middleware-signing": { - "version": "3.418.0", - "resolved": "https://registry.npmjs.org/@aws-sdk/middleware-signing/-/middleware-signing-3.418.0.tgz", - "integrity": "sha512-onvs5KoYQE8OlOE740RxWBGtsUyVIgAo0CzRKOQO63ZEYqpL1Os+MS1CGzdNhvQnJgJruE1WW+Ix8fjN30zKPA==", - "dependencies": { - "@aws-sdk/types": "3.418.0", - "@smithy/property-provider": "^2.0.0", - "@smithy/protocol-http": "^3.0.5", - "@smithy/signature-v4": "^2.0.0", - "@smithy/types": "^2.3.3", - "@smithy/util-middleware": "^2.0.2", - "tslib": "^2.5.0" - }, - "engines": { - "node": ">=14.0.0" - } - }, - "node_modules/@aws-sdk/client-lambda/node_modules/@aws-sdk/middleware-user-agent": { - "version": "3.418.0", - "resolved": "https://registry.npmjs.org/@aws-sdk/middleware-user-agent/-/middleware-user-agent-3.418.0.tgz", - "integrity": "sha512-Jdcztg9Tal9SEAL0dKRrnpKrm6LFlWmAhvuwv0dQ7bNTJxIxyEFbpqdgy7mpQHsLVZgq1Aad/7gT/72c9igyZw==", - "dependencies": { - "@aws-sdk/types": "3.418.0", - "@aws-sdk/util-endpoints": "3.418.0", - "@smithy/protocol-http": "^3.0.5", - "@smithy/types": "^2.3.3", - "tslib": "^2.5.0" - }, - "engines": { - "node": ">=14.0.0" - } - }, - "node_modules/@aws-sdk/client-lambda/node_modules/@aws-sdk/token-providers": { - "version": "3.418.0", - "resolved": "https://registry.npmjs.org/@aws-sdk/token-providers/-/token-providers-3.418.0.tgz", - "integrity": "sha512-9P7Q0VN0hEzTngy3Sz5eya2qEOEf0Q8qf1vB3um0gE6ID6EVAdz/nc/DztfN32MFxk8FeVBrCP5vWdoOzmd72g==", - "dependencies": { - "@aws-crypto/sha256-browser": "3.0.0", - "@aws-crypto/sha256-js": "3.0.0", - "@aws-sdk/middleware-host-header": "3.418.0", - "@aws-sdk/middleware-logger": "3.418.0", - "@aws-sdk/middleware-recursion-detection": "3.418.0", - "@aws-sdk/middleware-user-agent": "3.418.0", - "@aws-sdk/types": "3.418.0", - "@aws-sdk/util-endpoints": "3.418.0", - "@aws-sdk/util-user-agent-browser": "3.418.0", - "@aws-sdk/util-user-agent-node": "3.418.0", - "@smithy/config-resolver": "^2.0.10", - "@smithy/fetch-http-handler": "^2.1.5", - "@smithy/hash-node": "^2.0.9", - "@smithy/invalid-dependency": "^2.0.9", - "@smithy/middleware-content-length": "^2.0.11", - "@smithy/middleware-endpoint": "^2.0.9", - "@smithy/middleware-retry": "^2.0.12", - "@smithy/middleware-serde": "^2.0.9", - "@smithy/middleware-stack": "^2.0.2", - "@smithy/node-config-provider": "^2.0.12", - "@smithy/node-http-handler": "^2.1.5", - "@smithy/property-provider": "^2.0.0", - "@smithy/protocol-http": "^3.0.5", - "@smithy/shared-ini-file-loader": "^2.0.6", - "@smithy/smithy-client": "^2.1.6", + "@aws-sdk/util-endpoints": "3.418.0", + "@aws-sdk/util-user-agent-browser": "3.418.0", + "@aws-sdk/util-user-agent-node": "3.418.0", + "@smithy/config-resolver": "^2.0.10", + "@smithy/fetch-http-handler": "^2.1.5", + "@smithy/hash-node": "^2.0.9", + "@smithy/invalid-dependency": "^2.0.9", + "@smithy/middleware-content-length": "^2.0.11", + "@smithy/middleware-endpoint": "^2.0.9", + "@smithy/middleware-retry": "^2.0.12", + "@smithy/middleware-serde": "^2.0.9", + "@smithy/middleware-stack": "^2.0.2", + "@smithy/node-config-provider": "^2.0.12", + "@smithy/node-http-handler": "^2.1.5", + "@smithy/protocol-http": "^3.0.5", + "@smithy/smithy-client": "^2.1.6", "@smithy/types": "^2.3.3", "@smithy/url-parser": "^2.0.9", "@smithy/util-base64": "^2.0.0", @@ -921,304 +780,14 @@ "node": ">=14.0.0" } }, - "node_modules/@aws-sdk/client-lambda/node_modules/@aws-sdk/types": { - "version": "3.418.0", - "resolved": "https://registry.npmjs.org/@aws-sdk/types/-/types-3.418.0.tgz", - "integrity": "sha512-y4PQSH+ulfFLY0+FYkaK4qbIaQI9IJNMO2xsxukW6/aNoApNymN1D2FSi2la8Qbp/iPjNDKsG8suNPm9NtsWXQ==", - "dependencies": { - "@smithy/types": "^2.3.3", - "tslib": "^2.5.0" - }, - "engines": { - "node": ">=14.0.0" - } - }, - "node_modules/@aws-sdk/client-lambda/node_modules/@aws-sdk/util-endpoints": { - "version": "3.418.0", - "resolved": "https://registry.npmjs.org/@aws-sdk/util-endpoints/-/util-endpoints-3.418.0.tgz", - "integrity": "sha512-sYSDwRTl7yE7LhHkPzemGzmIXFVHSsi3AQ1KeNEk84eBqxMHHcCc2kqklaBk2roXWe50QDgRMy1ikZUxvtzNHQ==", - "dependencies": { - "@aws-sdk/types": "3.418.0", - "tslib": "^2.5.0" - }, - "engines": { - "node": ">=14.0.0" - } - }, - "node_modules/@aws-sdk/client-lambda/node_modules/@aws-sdk/util-user-agent-browser": { - "version": "3.418.0", - "resolved": "https://registry.npmjs.org/@aws-sdk/util-user-agent-browser/-/util-user-agent-browser-3.418.0.tgz", - "integrity": "sha512-c4p4mc0VV/jIeNH0lsXzhJ1MpWRLuboGtNEpqE4s1Vl9ck2amv9VdUUZUmHbg+bVxlMgRQ4nmiovA4qIrqGuyg==", - "dependencies": { - "@aws-sdk/types": "3.418.0", - "@smithy/types": "^2.3.3", - "bowser": "^2.11.0", - "tslib": "^2.5.0" - } - }, - "node_modules/@aws-sdk/client-lambda/node_modules/@aws-sdk/util-user-agent-node": { + "node_modules/@aws-sdk/credential-provider-env": { "version": "3.418.0", - "resolved": "https://registry.npmjs.org/@aws-sdk/util-user-agent-node/-/util-user-agent-node-3.418.0.tgz", - "integrity": "sha512-BXMskXFtg+dmzSCgmnWOffokxIbPr1lFqa1D9kvM3l3IFRiFGx2IyDg+8MAhq11aPDLvoa/BDuQ0Yqma5izOhg==", + "resolved": "https://registry.npmjs.org/@aws-sdk/credential-provider-env/-/credential-provider-env-3.418.0.tgz", + "integrity": "sha512-e74sS+x63EZUBO+HaI8zor886YdtmULzwKdctsZp5/37Xho1CVUNtEC+fYa69nigBD9afoiH33I4JggaHgrekQ==", "dependencies": { "@aws-sdk/types": "3.418.0", - "@smithy/node-config-provider": "^2.0.12", - "@smithy/types": "^2.3.3", - "tslib": "^2.5.0" - }, - "engines": { - "node": ">=14.0.0" - }, - "peerDependencies": { - "aws-crt": ">=1.0.0" - }, - "peerDependenciesMeta": { - "aws-crt": { - "optional": true - } - } - }, - "node_modules/@aws-sdk/client-secrets-manager": { - "version": "3.413.0", - "resolved": "https://registry.npmjs.org/@aws-sdk/client-secrets-manager/-/client-secrets-manager-3.413.0.tgz", - "integrity": "sha512-nD0q6yUYmcR7LfAW91iNNpaUQCmXJ+3tqO+RdJKmRJxZ4iZPuy+EAwjNUXwIv58tyhmooYVZqNC5dCG6KTEhmw==", - "dev": true, - "dependencies": { - "@aws-crypto/sha256-browser": "3.0.0", - "@aws-crypto/sha256-js": "3.0.0", - "@aws-sdk/client-sts": "3.413.0", - "@aws-sdk/credential-provider-node": "3.413.0", - "@aws-sdk/middleware-host-header": "3.413.0", - "@aws-sdk/middleware-logger": "3.413.0", - "@aws-sdk/middleware-recursion-detection": "3.413.0", - "@aws-sdk/middleware-signing": "3.413.0", - "@aws-sdk/middleware-user-agent": "3.413.0", - "@aws-sdk/types": "3.413.0", - "@aws-sdk/util-endpoints": "3.413.0", - "@aws-sdk/util-user-agent-browser": "3.413.0", - "@aws-sdk/util-user-agent-node": "3.413.0", - "@smithy/config-resolver": "^2.0.8", - "@smithy/fetch-http-handler": "^2.1.3", - "@smithy/hash-node": "^2.0.7", - "@smithy/invalid-dependency": "^2.0.7", - "@smithy/middleware-content-length": "^2.0.9", - "@smithy/middleware-endpoint": "^2.0.7", - "@smithy/middleware-retry": "^2.0.10", - "@smithy/middleware-serde": "^2.0.7", - "@smithy/middleware-stack": "^2.0.0", - "@smithy/node-config-provider": "^2.0.10", - "@smithy/node-http-handler": "^2.1.3", - "@smithy/protocol-http": "^3.0.3", - "@smithy/smithy-client": "^2.1.4", - "@smithy/types": "^2.3.1", - "@smithy/url-parser": "^2.0.7", - "@smithy/util-base64": "^2.0.0", - "@smithy/util-body-length-browser": "^2.0.0", - "@smithy/util-body-length-node": "^2.1.0", - "@smithy/util-defaults-mode-browser": "^2.0.8", - "@smithy/util-defaults-mode-node": "^2.0.10", - "@smithy/util-retry": "^2.0.0", - "@smithy/util-utf8": "^2.0.0", - "tslib": "^2.5.0", - "uuid": "^8.3.2" - }, - "engines": { - "node": ">=14.0.0" - } - }, - "node_modules/@aws-sdk/client-ssm": { - "version": "3.413.0", - "resolved": "https://registry.npmjs.org/@aws-sdk/client-ssm/-/client-ssm-3.413.0.tgz", - "integrity": "sha512-nXiyWFg65+0uJjYuSggBRqOkEfXhwnRsQeLaBice7Fydu6XIOh3ftHASuUiYYfj48ux6Mxfa9HOEyPuWmvdlaA==", - "dependencies": { - "@aws-crypto/sha256-browser": "3.0.0", - "@aws-crypto/sha256-js": "3.0.0", - "@aws-sdk/client-sts": "3.413.0", - "@aws-sdk/credential-provider-node": "3.413.0", - "@aws-sdk/middleware-host-header": "3.413.0", - "@aws-sdk/middleware-logger": "3.413.0", - "@aws-sdk/middleware-recursion-detection": "3.413.0", - "@aws-sdk/middleware-signing": "3.413.0", - "@aws-sdk/middleware-user-agent": "3.413.0", - "@aws-sdk/types": "3.413.0", - "@aws-sdk/util-endpoints": "3.413.0", - "@aws-sdk/util-user-agent-browser": "3.413.0", - "@aws-sdk/util-user-agent-node": "3.413.0", - "@smithy/config-resolver": "^2.0.8", - "@smithy/fetch-http-handler": "^2.1.3", - "@smithy/hash-node": "^2.0.7", - "@smithy/invalid-dependency": "^2.0.7", - "@smithy/middleware-content-length": "^2.0.9", - "@smithy/middleware-endpoint": "^2.0.7", - "@smithy/middleware-retry": "^2.0.10", - "@smithy/middleware-serde": "^2.0.7", - "@smithy/middleware-stack": "^2.0.0", - "@smithy/node-config-provider": "^2.0.10", - "@smithy/node-http-handler": "^2.1.3", - "@smithy/protocol-http": "^3.0.3", - "@smithy/smithy-client": "^2.1.4", - "@smithy/types": "^2.3.1", - "@smithy/url-parser": "^2.0.7", - "@smithy/util-base64": "^2.0.0", - "@smithy/util-body-length-browser": "^2.0.0", - "@smithy/util-body-length-node": "^2.1.0", - "@smithy/util-defaults-mode-browser": "^2.0.8", - "@smithy/util-defaults-mode-node": "^2.0.10", - "@smithy/util-retry": "^2.0.0", - "@smithy/util-utf8": "^2.0.0", - "@smithy/util-waiter": "^2.0.7", - "tslib": "^2.5.0", - "uuid": "^8.3.2" - }, - "engines": { - "node": ">=14.0.0" - } - }, - "node_modules/@aws-sdk/client-sso": { - "version": "3.413.0", - "resolved": "https://registry.npmjs.org/@aws-sdk/client-sso/-/client-sso-3.413.0.tgz", - "integrity": "sha512-mK+lygF85FzPAO+h9C0GZiFHxb9FguGVfpmovOTczjDE7LMp20D8kAk0hZGf/oshD+R/wdkmcmYugl/aBlvVZg==", - "dependencies": { - "@aws-crypto/sha256-browser": "3.0.0", - "@aws-crypto/sha256-js": "3.0.0", - "@aws-sdk/middleware-host-header": "3.413.0", - "@aws-sdk/middleware-logger": "3.413.0", - "@aws-sdk/middleware-recursion-detection": "3.413.0", - "@aws-sdk/middleware-user-agent": "3.413.0", - "@aws-sdk/types": "3.413.0", - "@aws-sdk/util-endpoints": "3.413.0", - "@aws-sdk/util-user-agent-browser": "3.413.0", - "@aws-sdk/util-user-agent-node": "3.413.0", - "@smithy/config-resolver": "^2.0.8", - "@smithy/fetch-http-handler": "^2.1.3", - "@smithy/hash-node": "^2.0.7", - "@smithy/invalid-dependency": "^2.0.7", - "@smithy/middleware-content-length": "^2.0.9", - "@smithy/middleware-endpoint": "^2.0.7", - "@smithy/middleware-retry": "^2.0.10", - "@smithy/middleware-serde": "^2.0.7", - "@smithy/middleware-stack": "^2.0.0", - "@smithy/node-config-provider": "^2.0.10", - "@smithy/node-http-handler": "^2.1.3", - "@smithy/protocol-http": "^3.0.3", - "@smithy/smithy-client": "^2.1.4", - "@smithy/types": "^2.3.1", - "@smithy/url-parser": "^2.0.7", - "@smithy/util-base64": "^2.0.0", - "@smithy/util-body-length-browser": "^2.0.0", - "@smithy/util-body-length-node": "^2.1.0", - "@smithy/util-defaults-mode-browser": "^2.0.8", - "@smithy/util-defaults-mode-node": "^2.0.10", - "@smithy/util-retry": "^2.0.0", - "@smithy/util-utf8": "^2.0.0", - "tslib": "^2.5.0" - }, - "engines": { - "node": ">=14.0.0" - } - }, - "node_modules/@aws-sdk/client-sts": { - "version": "3.413.0", - "resolved": "https://registry.npmjs.org/@aws-sdk/client-sts/-/client-sts-3.413.0.tgz", - "integrity": "sha512-tNRK3qso5RQfbmMyr9dG79UDHyVKyNaJgytlhGcUkhcRGMlTFqoTW02C6poA5Hj9BEUQyKUJueOnWz4rVNQnEg==", - "dependencies": { - "@aws-crypto/sha256-browser": "3.0.0", - "@aws-crypto/sha256-js": "3.0.0", - "@aws-sdk/credential-provider-node": "3.413.0", - "@aws-sdk/middleware-host-header": "3.413.0", - "@aws-sdk/middleware-logger": "3.413.0", - "@aws-sdk/middleware-recursion-detection": "3.413.0", - "@aws-sdk/middleware-sdk-sts": "3.413.0", - "@aws-sdk/middleware-signing": "3.413.0", - "@aws-sdk/middleware-user-agent": "3.413.0", - "@aws-sdk/types": "3.413.0", - "@aws-sdk/util-endpoints": "3.413.0", - "@aws-sdk/util-user-agent-browser": "3.413.0", - "@aws-sdk/util-user-agent-node": "3.413.0", - "@smithy/config-resolver": "^2.0.8", - "@smithy/fetch-http-handler": "^2.1.3", - "@smithy/hash-node": "^2.0.7", - "@smithy/invalid-dependency": "^2.0.7", - "@smithy/middleware-content-length": "^2.0.9", - "@smithy/middleware-endpoint": "^2.0.7", - "@smithy/middleware-retry": "^2.0.10", - "@smithy/middleware-serde": "^2.0.7", - "@smithy/middleware-stack": "^2.0.0", - "@smithy/node-config-provider": "^2.0.10", - "@smithy/node-http-handler": "^2.1.3", - "@smithy/protocol-http": "^3.0.3", - "@smithy/smithy-client": "^2.1.4", - "@smithy/types": "^2.3.1", - "@smithy/url-parser": "^2.0.7", - "@smithy/util-base64": "^2.0.0", - "@smithy/util-body-length-browser": "^2.0.0", - "@smithy/util-body-length-node": "^2.1.0", - "@smithy/util-defaults-mode-browser": "^2.0.8", - "@smithy/util-defaults-mode-node": "^2.0.10", - "@smithy/util-retry": "^2.0.0", - "@smithy/util-utf8": "^2.0.0", - "fast-xml-parser": "4.2.5", - "tslib": "^2.5.0" - }, - "engines": { - "node": ">=14.0.0" - } - }, - "node_modules/@aws-sdk/client-xray": { - "version": "3.413.0", - "resolved": "https://registry.npmjs.org/@aws-sdk/client-xray/-/client-xray-3.413.0.tgz", - "integrity": "sha512-BQA2JgaQ341BwZJqsRk7WQ4pEHBS5TaLxEQ3tzjJAedw9gcnCcfWkFeD7hRcu3aAPzh+QGfCpsimgcCpjRhKMw==", - "dev": true, - "dependencies": { - "@aws-crypto/sha256-browser": "3.0.0", - "@aws-crypto/sha256-js": "3.0.0", - "@aws-sdk/client-sts": "3.413.0", - "@aws-sdk/credential-provider-node": "3.413.0", - "@aws-sdk/middleware-host-header": "3.413.0", - "@aws-sdk/middleware-logger": "3.413.0", - "@aws-sdk/middleware-recursion-detection": "3.413.0", - "@aws-sdk/middleware-signing": "3.413.0", - "@aws-sdk/middleware-user-agent": "3.413.0", - "@aws-sdk/types": "3.413.0", - "@aws-sdk/util-endpoints": "3.413.0", - "@aws-sdk/util-user-agent-browser": "3.413.0", - "@aws-sdk/util-user-agent-node": "3.413.0", - "@smithy/config-resolver": "^2.0.8", - "@smithy/fetch-http-handler": "^2.1.3", - "@smithy/hash-node": "^2.0.7", - "@smithy/invalid-dependency": "^2.0.7", - "@smithy/middleware-content-length": "^2.0.9", - "@smithy/middleware-endpoint": "^2.0.7", - "@smithy/middleware-retry": "^2.0.10", - "@smithy/middleware-serde": "^2.0.7", - "@smithy/middleware-stack": "^2.0.0", - "@smithy/node-config-provider": "^2.0.10", - "@smithy/node-http-handler": "^2.1.3", - "@smithy/protocol-http": "^3.0.3", - "@smithy/smithy-client": "^2.1.4", - "@smithy/types": "^2.3.1", - "@smithy/url-parser": "^2.0.7", - "@smithy/util-base64": "^2.0.0", - "@smithy/util-body-length-browser": "^2.0.0", - "@smithy/util-body-length-node": "^2.1.0", - "@smithy/util-defaults-mode-browser": "^2.0.8", - "@smithy/util-defaults-mode-node": "^2.0.10", - "@smithy/util-retry": "^2.0.0", - "@smithy/util-utf8": "^2.0.0", - "tslib": "^2.5.0" - }, - "engines": { - "node": ">=14.0.0" - } - }, - "node_modules/@aws-sdk/credential-provider-env": { - "version": "3.413.0", - "resolved": "https://registry.npmjs.org/@aws-sdk/credential-provider-env/-/credential-provider-env-3.413.0.tgz", - "integrity": "sha512-yeMOkfG20/RlzfPMtQuDB647AcPEvFEVYOWZzAWVJfldYQ5ybKr0d7sBkgG9sdAzGkK3Aw9dE4rigYI8EIqc1Q==", - "dependencies": { - "@aws-sdk/types": "3.413.0", "@smithy/property-provider": "^2.0.0", - "@smithy/types": "^2.3.1", + "@smithy/types": "^2.3.3", "tslib": "^2.5.0" }, "engines": { @@ -1226,19 +795,19 @@ } }, "node_modules/@aws-sdk/credential-provider-ini": { - "version": "3.413.0", - "resolved": "https://registry.npmjs.org/@aws-sdk/credential-provider-ini/-/credential-provider-ini-3.413.0.tgz", - "integrity": "sha512-h5UUGBvDfBg9F1U6XbWquFMqbe8uqY/FNv4ngfxYaj8zSk2iTfJ9s918vmRlduiKFB0Z1GaaxNv20z6d/usVrA==", - "dependencies": { - "@aws-sdk/credential-provider-env": "3.413.0", - "@aws-sdk/credential-provider-process": "3.413.0", - "@aws-sdk/credential-provider-sso": "3.413.0", - "@aws-sdk/credential-provider-web-identity": "3.413.0", - "@aws-sdk/types": "3.413.0", + "version": "3.421.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/credential-provider-ini/-/credential-provider-ini-3.421.0.tgz", + "integrity": "sha512-J5yH/gkpAk6FMeH5F9u5Nr6oG+97tj1kkn5q49g3XMbtWw7GiynadxdtoRBCeIg1C7o2LOQx4B1AnhNhIw1z/g==", + "dependencies": { + "@aws-sdk/credential-provider-env": "3.418.0", + "@aws-sdk/credential-provider-process": "3.418.0", + "@aws-sdk/credential-provider-sso": "3.421.0", + "@aws-sdk/credential-provider-web-identity": "3.418.0", + "@aws-sdk/types": "3.418.0", "@smithy/credential-provider-imds": "^2.0.0", "@smithy/property-provider": "^2.0.0", "@smithy/shared-ini-file-loader": "^2.0.6", - "@smithy/types": "^2.3.1", + "@smithy/types": "^2.3.3", "tslib": "^2.5.0" }, "engines": { @@ -1246,20 +815,20 @@ } }, "node_modules/@aws-sdk/credential-provider-node": { - "version": "3.413.0", - "resolved": "https://registry.npmjs.org/@aws-sdk/credential-provider-node/-/credential-provider-node-3.413.0.tgz", - "integrity": "sha512-kXfdZrOKN8KN9pjvppLhSHXVBDRCzhDQtTyJudx6UwENgp5x1ARBKFTTg4I7B1+SgMsmIH3GMA0K6woLVAIXoA==", - "dependencies": { - "@aws-sdk/credential-provider-env": "3.413.0", - "@aws-sdk/credential-provider-ini": "3.413.0", - "@aws-sdk/credential-provider-process": "3.413.0", - "@aws-sdk/credential-provider-sso": "3.413.0", - "@aws-sdk/credential-provider-web-identity": "3.413.0", - "@aws-sdk/types": "3.413.0", + "version": "3.421.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/credential-provider-node/-/credential-provider-node-3.421.0.tgz", + "integrity": "sha512-g1dvdvfDj0u8B/gOsHR3o1arP4O4QE/dFm2IJBYr/eUdKISMUgbQULWtg4zdtAf0Oz4xN0723i7fpXAF1gTnRA==", + "dependencies": { + "@aws-sdk/credential-provider-env": "3.418.0", + "@aws-sdk/credential-provider-ini": "3.421.0", + "@aws-sdk/credential-provider-process": "3.418.0", + "@aws-sdk/credential-provider-sso": "3.421.0", + "@aws-sdk/credential-provider-web-identity": "3.418.0", + "@aws-sdk/types": "3.418.0", "@smithy/credential-provider-imds": "^2.0.0", "@smithy/property-provider": "^2.0.0", "@smithy/shared-ini-file-loader": "^2.0.6", - "@smithy/types": "^2.3.1", + "@smithy/types": "^2.3.3", "tslib": "^2.5.0" }, "engines": { @@ -1267,14 +836,14 @@ } }, "node_modules/@aws-sdk/credential-provider-process": { - "version": "3.413.0", - "resolved": "https://registry.npmjs.org/@aws-sdk/credential-provider-process/-/credential-provider-process-3.413.0.tgz", - "integrity": "sha512-GFJdgS14GzJ1wc2DEnS44Z/34iBZ05CAkvDsLN2CMwcDgH4eZuif9/x0lwzIJBK3xVFHzYUeVvEzsqRPbCHRsw==", + "version": "3.418.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/credential-provider-process/-/credential-provider-process-3.418.0.tgz", + "integrity": "sha512-xPbdm2WKz1oH6pTkrJoUmr3OLuqvvcPYTQX0IIlc31tmDwDWPQjXGGFD/vwZGIZIkKaFpFxVMgAzfFScxox7dw==", "dependencies": { - "@aws-sdk/types": "3.413.0", + "@aws-sdk/types": "3.418.0", "@smithy/property-provider": "^2.0.0", "@smithy/shared-ini-file-loader": "^2.0.6", - "@smithy/types": "^2.3.1", + "@smithy/types": "^2.3.3", "tslib": "^2.5.0" }, "engines": { @@ -1282,16 +851,16 @@ } }, "node_modules/@aws-sdk/credential-provider-sso": { - "version": "3.413.0", - "resolved": "https://registry.npmjs.org/@aws-sdk/credential-provider-sso/-/credential-provider-sso-3.413.0.tgz", - "integrity": "sha512-wLQYJ916imwUr+MdvAE1PGC4fQ6MBhnJeBxCjHjCYBFVYs69U3u6sYL4TT6BPsKtSo3k9gnjSkUvBa4OCerQ0w==", + "version": "3.421.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/credential-provider-sso/-/credential-provider-sso-3.421.0.tgz", + "integrity": "sha512-f8T3L5rhImL6T6RTSvbOxaWw9k2fDOT2DZbNjcPz9ITWmwXj2NNbdHGWuRi3dv2HoY/nW2IJdNxnhdhbn6Fc1A==", "dependencies": { - "@aws-sdk/client-sso": "3.413.0", - "@aws-sdk/token-providers": "3.413.0", - "@aws-sdk/types": "3.413.0", + "@aws-sdk/client-sso": "3.421.0", + "@aws-sdk/token-providers": "3.418.0", + "@aws-sdk/types": "3.418.0", "@smithy/property-provider": "^2.0.0", "@smithy/shared-ini-file-loader": "^2.0.6", - "@smithy/types": "^2.3.1", + "@smithy/types": "^2.3.3", "tslib": "^2.5.0" }, "engines": { @@ -1299,13 +868,13 @@ } }, "node_modules/@aws-sdk/credential-provider-web-identity": { - "version": "3.413.0", - "resolved": "https://registry.npmjs.org/@aws-sdk/credential-provider-web-identity/-/credential-provider-web-identity-3.413.0.tgz", - "integrity": "sha512-5cdA1Iq9JeEHtg59ERV9fdMQ7cS0JF6gH/BWA7HYEUGdSVPXCuwyEggPtG64QgpNU7SmxH+QdDG+Ldxz09ycIA==", + "version": "3.418.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/credential-provider-web-identity/-/credential-provider-web-identity-3.418.0.tgz", + "integrity": "sha512-do7ang565n9p3dS1JdsQY01rUfRx8vkxQqz5M8OlcEHBNiCdi2PvSjNwcBdrv/FKkyIxZb0TImOfBSt40hVdxQ==", "dependencies": { - "@aws-sdk/types": "3.413.0", + "@aws-sdk/types": "3.418.0", "@smithy/property-provider": "^2.0.0", - "@smithy/types": "^2.3.1", + "@smithy/types": "^2.3.3", "tslib": "^2.5.0" }, "engines": { @@ -1336,11 +905,11 @@ } }, "node_modules/@aws-sdk/lib-dynamodb": { - "version": "3.413.0", - "resolved": "https://registry.npmjs.org/@aws-sdk/lib-dynamodb/-/lib-dynamodb-3.413.0.tgz", - "integrity": "sha512-6E04ZpdUNv1Q8DGVFWZxK8eny7cYhy/wZWoAU4jaA1Ui7Haqpv1ujVdkSK5JHaO6KTYNt7RFaF25NzI6eitnmA==", + "version": "3.421.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/lib-dynamodb/-/lib-dynamodb-3.421.0.tgz", + "integrity": "sha512-S76WsVMoYyUu4LRcEhC+GD8sEqJqrpgAhb06SMqZ1pfLGzezpESUg0xytXHMgHOaR2A38LNR+ARFeTCf9vNmoA==", "dependencies": { - "@aws-sdk/util-dynamodb": "3.413.0", + "@aws-sdk/util-dynamodb": "3.421.0", "tslib": "^2.5.0" }, "engines": { @@ -1351,14 +920,15 @@ } }, "node_modules/@aws-sdk/middleware-endpoint-discovery": { - "version": "3.413.0", - "resolved": "https://registry.npmjs.org/@aws-sdk/middleware-endpoint-discovery/-/middleware-endpoint-discovery-3.413.0.tgz", - "integrity": "sha512-guQwWLjeveLtLuoPRoX61mE00WI9VyOSiY8d2ofVWsywn92Xiq6zZG/sKhC6OzsAZXLpBY6aItVWvtQE4cr6gA==", + "version": "3.418.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/middleware-endpoint-discovery/-/middleware-endpoint-discovery-3.418.0.tgz", + "integrity": "sha512-KRhvFQDzTrayXzswx6KhS+oBDH0NoDT+vERCqvFsGvus+/HhVGACVxINuOJ+b6mqdUPfipSD4Bje3XYunqxbSw==", "dependencies": { "@aws-sdk/endpoint-cache": "3.310.0", - "@aws-sdk/types": "3.413.0", - "@smithy/protocol-http": "^3.0.3", - "@smithy/types": "^2.3.1", + "@aws-sdk/types": "3.418.0", + "@smithy/node-config-provider": "^2.0.12", + "@smithy/protocol-http": "^3.0.5", + "@smithy/types": "^2.3.3", "tslib": "^2.5.0" }, "engines": { @@ -1366,13 +936,13 @@ } }, "node_modules/@aws-sdk/middleware-host-header": { - "version": "3.413.0", - "resolved": "https://registry.npmjs.org/@aws-sdk/middleware-host-header/-/middleware-host-header-3.413.0.tgz", - "integrity": "sha512-r9PQx468EzPHo9wRzZLfgROpKtVdbkteMrdhsuM12bifVHjU1OHr7yfhc1OdWv39X8Xiv6F8n5r+RBQEM0S6+g==", + "version": "3.418.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/middleware-host-header/-/middleware-host-header-3.418.0.tgz", + "integrity": "sha512-LrMTdzalkPw/1ujLCKPLwCGvPMCmT4P+vOZQRbSEVZPnlZk+Aj++aL/RaHou0jL4kJH3zl8iQepriBt4a7UvXQ==", "dependencies": { - "@aws-sdk/types": "3.413.0", - "@smithy/protocol-http": "^3.0.3", - "@smithy/types": "^2.3.1", + "@aws-sdk/types": "3.418.0", + "@smithy/protocol-http": "^3.0.5", + "@smithy/types": "^2.3.3", "tslib": "^2.5.0" }, "engines": { @@ -1380,12 +950,12 @@ } }, "node_modules/@aws-sdk/middleware-logger": { - "version": "3.413.0", - "resolved": "https://registry.npmjs.org/@aws-sdk/middleware-logger/-/middleware-logger-3.413.0.tgz", - "integrity": "sha512-jqcXDubcKvoqBy+kkEa0WoNjG6SveDeyNy+gdGnTV+DEtYjkcHrHJei4q0W5zFl0mzc+dP+z8tJF44rv95ZY3Q==", + "version": "3.418.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/middleware-logger/-/middleware-logger-3.418.0.tgz", + "integrity": "sha512-StKGmyPVfoO/wdNTtKemYwoJsqIl4l7oqarQY7VSf2Mp3mqaa+njLViHsQbirYpyqpgUEusOnuTlH5utxJ1NsQ==", "dependencies": { - "@aws-sdk/types": "3.413.0", - "@smithy/types": "^2.3.1", + "@aws-sdk/types": "3.418.0", + "@smithy/types": "^2.3.3", "tslib": "^2.5.0" }, "engines": { @@ -1393,13 +963,13 @@ } }, "node_modules/@aws-sdk/middleware-recursion-detection": { - "version": "3.413.0", - "resolved": "https://registry.npmjs.org/@aws-sdk/middleware-recursion-detection/-/middleware-recursion-detection-3.413.0.tgz", - "integrity": "sha512-C6k0IKJk/A4/VBGwUjxEPG+WOjjnmWAZVRBUzaeM7PqRh+g5rLcuIV356ntV3pREVxyiSTePTYVYIHU9YXkLKQ==", + "version": "3.418.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/middleware-recursion-detection/-/middleware-recursion-detection-3.418.0.tgz", + "integrity": "sha512-kKFrIQglBLUFPbHSDy1+bbe3Na2Kd70JSUC3QLMbUHmqipXN8KeXRfAj7vTv97zXl0WzG0buV++WcNwOm1rFjg==", "dependencies": { - "@aws-sdk/types": "3.413.0", - "@smithy/protocol-http": "^3.0.3", - "@smithy/types": "^2.3.1", + "@aws-sdk/types": "3.418.0", + "@smithy/protocol-http": "^3.0.5", + "@smithy/types": "^2.3.3", "tslib": "^2.5.0" }, "engines": { @@ -1407,13 +977,13 @@ } }, "node_modules/@aws-sdk/middleware-sdk-sts": { - "version": "3.413.0", - "resolved": "https://registry.npmjs.org/@aws-sdk/middleware-sdk-sts/-/middleware-sdk-sts-3.413.0.tgz", - "integrity": "sha512-t0u//JUyaEZRVnH5q+Ur3tWnuyIsTdwA0XOdDCZXcSlLYzGp2MI/tScLjn9IydRrceIFpFfmbjk4Nf/Q6TeBTQ==", + "version": "3.418.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/middleware-sdk-sts/-/middleware-sdk-sts-3.418.0.tgz", + "integrity": "sha512-cW8ijrCTP+mgihvcq4+TbhAcE/we5lFl4ydRqvTdtcSnYQAVQADg47rnTScQiFsPFEB3NKq7BGeyTJF9MKolPA==", "dependencies": { - "@aws-sdk/middleware-signing": "3.413.0", - "@aws-sdk/types": "3.413.0", - "@smithy/types": "^2.3.1", + "@aws-sdk/middleware-signing": "3.418.0", + "@aws-sdk/types": "3.418.0", + "@smithy/types": "^2.3.3", "tslib": "^2.5.0" }, "engines": { @@ -1421,16 +991,16 @@ } }, "node_modules/@aws-sdk/middleware-signing": { - "version": "3.413.0", - "resolved": "https://registry.npmjs.org/@aws-sdk/middleware-signing/-/middleware-signing-3.413.0.tgz", - "integrity": "sha512-QFEnVvIKYPCermM+ESxEztgUgXzGSKpnPnohMYNvSZySqmOLu/4VvxiZbRO/BX9J3ZHcUgaw4vKm5VBZRrycxw==", + "version": "3.418.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/middleware-signing/-/middleware-signing-3.418.0.tgz", + "integrity": "sha512-onvs5KoYQE8OlOE740RxWBGtsUyVIgAo0CzRKOQO63ZEYqpL1Os+MS1CGzdNhvQnJgJruE1WW+Ix8fjN30zKPA==", "dependencies": { - "@aws-sdk/types": "3.413.0", + "@aws-sdk/types": "3.418.0", "@smithy/property-provider": "^2.0.0", - "@smithy/protocol-http": "^3.0.3", + "@smithy/protocol-http": "^3.0.5", "@smithy/signature-v4": "^2.0.0", - "@smithy/types": "^2.3.1", - "@smithy/util-middleware": "^2.0.0", + "@smithy/types": "^2.3.3", + "@smithy/util-middleware": "^2.0.2", "tslib": "^2.5.0" }, "engines": { @@ -1438,14 +1008,14 @@ } }, "node_modules/@aws-sdk/middleware-user-agent": { - "version": "3.413.0", - "resolved": "https://registry.npmjs.org/@aws-sdk/middleware-user-agent/-/middleware-user-agent-3.413.0.tgz", - "integrity": "sha512-eVMJyeWxNBqerhfD+sE9sTjDtwQiECrfU6wpUQP5fGPhJD2cVVZPxuTuJGDZCu/4k/V61dF85IYlsPUNLdVQ6w==", - "dependencies": { - "@aws-sdk/types": "3.413.0", - "@aws-sdk/util-endpoints": "3.413.0", - "@smithy/protocol-http": "^3.0.3", - "@smithy/types": "^2.3.1", + "version": "3.418.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/middleware-user-agent/-/middleware-user-agent-3.418.0.tgz", + "integrity": "sha512-Jdcztg9Tal9SEAL0dKRrnpKrm6LFlWmAhvuwv0dQ7bNTJxIxyEFbpqdgy7mpQHsLVZgq1Aad/7gT/72c9igyZw==", + "dependencies": { + "@aws-sdk/types": "3.418.0", + "@aws-sdk/util-endpoints": "3.418.0", + "@smithy/protocol-http": "^3.0.5", + "@smithy/types": "^2.3.3", "tslib": "^2.5.0" }, "engines": { @@ -1488,43 +1058,43 @@ } }, "node_modules/@aws-sdk/token-providers": { - "version": "3.413.0", - "resolved": "https://registry.npmjs.org/@aws-sdk/token-providers/-/token-providers-3.413.0.tgz", - "integrity": "sha512-NfP1Ib9LAWVLMTOa/1aJwt4TRrlRrNyukCpVZGfNaMnNNEoP5Rakdbcs8KFVHe/MJzU+GdKVzxQ4TgRkLOGTrA==", + "version": "3.418.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/token-providers/-/token-providers-3.418.0.tgz", + "integrity": "sha512-9P7Q0VN0hEzTngy3Sz5eya2qEOEf0Q8qf1vB3um0gE6ID6EVAdz/nc/DztfN32MFxk8FeVBrCP5vWdoOzmd72g==", "dependencies": { "@aws-crypto/sha256-browser": "3.0.0", "@aws-crypto/sha256-js": "3.0.0", - "@aws-sdk/middleware-host-header": "3.413.0", - "@aws-sdk/middleware-logger": "3.413.0", - "@aws-sdk/middleware-recursion-detection": "3.413.0", - "@aws-sdk/middleware-user-agent": "3.413.0", - "@aws-sdk/types": "3.413.0", - "@aws-sdk/util-endpoints": "3.413.0", - "@aws-sdk/util-user-agent-browser": "3.413.0", - "@aws-sdk/util-user-agent-node": "3.413.0", - "@smithy/config-resolver": "^2.0.8", - "@smithy/fetch-http-handler": "^2.1.3", - "@smithy/hash-node": "^2.0.7", - "@smithy/invalid-dependency": "^2.0.7", - "@smithy/middleware-content-length": "^2.0.9", - "@smithy/middleware-endpoint": "^2.0.7", - "@smithy/middleware-retry": "^2.0.10", - "@smithy/middleware-serde": "^2.0.7", - "@smithy/middleware-stack": "^2.0.0", - "@smithy/node-config-provider": "^2.0.10", - "@smithy/node-http-handler": "^2.1.3", + "@aws-sdk/middleware-host-header": "3.418.0", + "@aws-sdk/middleware-logger": "3.418.0", + "@aws-sdk/middleware-recursion-detection": "3.418.0", + "@aws-sdk/middleware-user-agent": "3.418.0", + "@aws-sdk/types": "3.418.0", + "@aws-sdk/util-endpoints": "3.418.0", + "@aws-sdk/util-user-agent-browser": "3.418.0", + "@aws-sdk/util-user-agent-node": "3.418.0", + "@smithy/config-resolver": "^2.0.10", + "@smithy/fetch-http-handler": "^2.1.5", + "@smithy/hash-node": "^2.0.9", + "@smithy/invalid-dependency": "^2.0.9", + "@smithy/middleware-content-length": "^2.0.11", + "@smithy/middleware-endpoint": "^2.0.9", + "@smithy/middleware-retry": "^2.0.12", + "@smithy/middleware-serde": "^2.0.9", + "@smithy/middleware-stack": "^2.0.2", + "@smithy/node-config-provider": "^2.0.12", + "@smithy/node-http-handler": "^2.1.5", "@smithy/property-provider": "^2.0.0", - "@smithy/protocol-http": "^3.0.3", + "@smithy/protocol-http": "^3.0.5", "@smithy/shared-ini-file-loader": "^2.0.6", - "@smithy/smithy-client": "^2.1.4", - "@smithy/types": "^2.3.1", - "@smithy/url-parser": "^2.0.7", + "@smithy/smithy-client": "^2.1.6", + "@smithy/types": "^2.3.3", + "@smithy/url-parser": "^2.0.9", "@smithy/util-base64": "^2.0.0", "@smithy/util-body-length-browser": "^2.0.0", "@smithy/util-body-length-node": "^2.1.0", - "@smithy/util-defaults-mode-browser": "^2.0.8", - "@smithy/util-defaults-mode-node": "^2.0.10", - "@smithy/util-retry": "^2.0.0", + "@smithy/util-defaults-mode-browser": "^2.0.10", + "@smithy/util-defaults-mode-node": "^2.0.12", + "@smithy/util-retry": "^2.0.2", "@smithy/util-utf8": "^2.0.0", "tslib": "^2.5.0" }, @@ -1533,11 +1103,11 @@ } }, "node_modules/@aws-sdk/types": { - "version": "3.413.0", - "resolved": "https://registry.npmjs.org/@aws-sdk/types/-/types-3.413.0.tgz", - "integrity": "sha512-j1xib0f/TazIFc5ySIKOlT1ujntRbaoG4LJFeEezz4ji03/wSJMI8Vi4KjzpBp8J1tTu0oRDnsxRIGixsUBeYQ==", + "version": "3.418.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/types/-/types-3.418.0.tgz", + "integrity": "sha512-y4PQSH+ulfFLY0+FYkaK4qbIaQI9IJNMO2xsxukW6/aNoApNymN1D2FSi2la8Qbp/iPjNDKsG8suNPm9NtsWXQ==", "dependencies": { - "@smithy/types": "^2.3.1", + "@smithy/types": "^2.3.3", "tslib": "^2.5.0" }, "engines": { @@ -1570,22 +1140,25 @@ } }, "node_modules/@aws-sdk/util-dynamodb": { - "version": "3.413.0", - "resolved": "https://registry.npmjs.org/@aws-sdk/util-dynamodb/-/util-dynamodb-3.413.0.tgz", - "integrity": "sha512-kL0nxI5tus1D6O6aUpx2MA3rW+5dT/XtLr5V6jdDTaOWnzbQsMqa3M3Wh9qb8JtuoRgbx4uAhWovrN4JzYR1Rg==", + "version": "3.421.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/util-dynamodb/-/util-dynamodb-3.421.0.tgz", + "integrity": "sha512-fCoBv8bX9ruvbxQMH0Flws3cqCjpgUQp8So0J2wwPaLEu6JoXlP1enppYEbjas4nuav9vCocORr+s+kdePw5Kg==", "dependencies": { "tslib": "^2.5.0" }, "engines": { "node": ">=14.0.0" + }, + "peerDependencies": { + "@aws-sdk/client-dynamodb": "^3.0.0" } }, "node_modules/@aws-sdk/util-endpoints": { - "version": "3.413.0", - "resolved": "https://registry.npmjs.org/@aws-sdk/util-endpoints/-/util-endpoints-3.413.0.tgz", - "integrity": "sha512-VAwr7cITNb1L6/2XUPIbCOuhKGm0VtKCRblurrfUF2bxqG/wtuw/2Fm4ahYJPyxklOSXAMSq+RHdFWcir0YB/g==", + "version": "3.418.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/util-endpoints/-/util-endpoints-3.418.0.tgz", + "integrity": "sha512-sYSDwRTl7yE7LhHkPzemGzmIXFVHSsi3AQ1KeNEk84eBqxMHHcCc2kqklaBk2roXWe50QDgRMy1ikZUxvtzNHQ==", "dependencies": { - "@aws-sdk/types": "3.413.0", + "@aws-sdk/types": "3.418.0", "tslib": "^2.5.0" }, "engines": { @@ -1604,24 +1177,24 @@ } }, "node_modules/@aws-sdk/util-user-agent-browser": { - "version": "3.413.0", - "resolved": "https://registry.npmjs.org/@aws-sdk/util-user-agent-browser/-/util-user-agent-browser-3.413.0.tgz", - "integrity": "sha512-7j/qWcRO2OBZBre2fC6V6M0PAS9n7k6i+VtofPkkhxC2DZszLJElqnooF9hGmVGYK3zR47Np4WjURXKIEZclWg==", + "version": "3.418.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/util-user-agent-browser/-/util-user-agent-browser-3.418.0.tgz", + "integrity": "sha512-c4p4mc0VV/jIeNH0lsXzhJ1MpWRLuboGtNEpqE4s1Vl9ck2amv9VdUUZUmHbg+bVxlMgRQ4nmiovA4qIrqGuyg==", "dependencies": { - "@aws-sdk/types": "3.413.0", - "@smithy/types": "^2.3.1", + "@aws-sdk/types": "3.418.0", + "@smithy/types": "^2.3.3", "bowser": "^2.11.0", "tslib": "^2.5.0" } }, "node_modules/@aws-sdk/util-user-agent-node": { - "version": "3.413.0", - "resolved": "https://registry.npmjs.org/@aws-sdk/util-user-agent-node/-/util-user-agent-node-3.413.0.tgz", - "integrity": "sha512-vHm9TVZIzfWMeDvdmoOky6VarqOt8Pr68CESHN0jyuO6XbhCDnr9rpaXiBhbSR+N1Qm7R/AfJgAhQyTMu2G1OA==", + "version": "3.418.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/util-user-agent-node/-/util-user-agent-node-3.418.0.tgz", + "integrity": "sha512-BXMskXFtg+dmzSCgmnWOffokxIbPr1lFqa1D9kvM3l3IFRiFGx2IyDg+8MAhq11aPDLvoa/BDuQ0Yqma5izOhg==", "dependencies": { - "@aws-sdk/types": "3.413.0", - "@smithy/node-config-provider": "^2.0.10", - "@smithy/types": "^2.3.1", + "@aws-sdk/types": "3.418.0", + "@smithy/node-config-provider": "^2.0.12", + "@smithy/types": "^2.3.3", "tslib": "^2.5.0" }, "engines": { @@ -1729,31 +1302,31 @@ } }, "node_modules/@babel/compat-data": { - "version": "7.22.9", - "resolved": "https://registry.npmjs.org/@babel/compat-data/-/compat-data-7.22.9.tgz", - "integrity": "sha512-5UamI7xkUcJ3i9qVDS+KFDEK8/7oJ55/sJMB1Ge7IEapr7KfdfV/HErR+koZwOfd+SgtFKOKRhRakdg++DcJpQ==", + "version": "7.22.20", + "resolved": "https://registry.npmjs.org/@babel/compat-data/-/compat-data-7.22.20.tgz", + "integrity": "sha512-BQYjKbpXjoXwFW5jGqiizJQQT/aC7pFm9Ok1OWssonuguICi264lbgMzRp2ZMmRSlfkX6DsWDDcsrctK8Rwfiw==", "dev": true, "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/core": { - "version": "7.22.19", - "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.22.19.tgz", - "integrity": "sha512-Q8Yj5X4LHVYTbLCKVz0//2D2aDmHF4xzCdEttYvKOnWvErGsa6geHXD6w46x64n5tP69VfeH+IfSrdyH3MLhwA==", + "version": "7.23.0", + "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.23.0.tgz", + "integrity": "sha512-97z/ju/Jy1rZmDxybphrBuI+jtJjFVoz7Mr9yUQVVVi+DNZE333uFQeMOqcCIy1x3WYBIbWftUSLmbNXNT7qFQ==", "dev": true, "dependencies": { "@ampproject/remapping": "^2.2.0", "@babel/code-frame": "^7.22.13", - "@babel/generator": "^7.22.15", + "@babel/generator": "^7.23.0", "@babel/helper-compilation-targets": "^7.22.15", - "@babel/helper-module-transforms": "^7.22.19", - "@babel/helpers": "^7.22.15", - "@babel/parser": "^7.22.16", + "@babel/helper-module-transforms": "^7.23.0", + "@babel/helpers": "^7.23.0", + "@babel/parser": "^7.23.0", "@babel/template": "^7.22.15", - "@babel/traverse": "^7.22.19", - "@babel/types": "^7.22.19", - "convert-source-map": "^1.7.0", + "@babel/traverse": "^7.23.0", + "@babel/types": "^7.23.0", + "convert-source-map": "^2.0.0", "debug": "^4.1.0", "gensync": "^1.0.0-beta.2", "json5": "^2.2.3", @@ -1767,12 +1340,6 @@ "url": "https://opencollective.com/babel" } }, - "node_modules/@babel/core/node_modules/convert-source-map": { - "version": "1.9.0", - "resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-1.9.0.tgz", - "integrity": "sha512-ASFBup0Mz1uyiIjANan1jzLQami9z1PoYSZCiiYW2FczPbenXc45FZdBZLzOT+r6+iciuEModtmCti+hjaAk0A==", - "dev": true - }, "node_modules/@babel/core/node_modules/semver": { "version": "6.3.1", "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.1.tgz", @@ -1783,12 +1350,12 @@ } }, "node_modules/@babel/generator": { - "version": "7.22.15", - "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.22.15.tgz", - "integrity": "sha512-Zu9oWARBqeVOW0dZOjXc3JObrzuqothQ3y/n1kUtrjCoCPLkXUwMvOo/F/TCfoHMbWIFlWwpZtkZVb9ga4U2pA==", + "version": "7.23.0", + "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.23.0.tgz", + "integrity": "sha512-lN85QRR+5IbYrMWM6Y4pE/noaQtg4pNiqeNGX60eqOfo6gtEj6uw/JagelB8vVztSd7R6M5n1+PQkDbHbBRU4g==", "dev": true, "dependencies": { - "@babel/types": "^7.22.15", + "@babel/types": "^7.23.0", "@jridgewell/gen-mapping": "^0.3.2", "@jridgewell/trace-mapping": "^0.3.17", "jsesc": "^2.5.1" @@ -1823,22 +1390,22 @@ } }, "node_modules/@babel/helper-environment-visitor": { - "version": "7.22.5", - "resolved": "https://registry.npmjs.org/@babel/helper-environment-visitor/-/helper-environment-visitor-7.22.5.tgz", - "integrity": "sha512-XGmhECfVA/5sAt+H+xpSg0mfrHq6FzNr9Oxh7PSEBBRUb/mL7Kz3NICXb194rCqAEdxkhPT1a88teizAFyvk8Q==", + "version": "7.22.20", + "resolved": "https://registry.npmjs.org/@babel/helper-environment-visitor/-/helper-environment-visitor-7.22.20.tgz", + "integrity": "sha512-zfedSIzFhat/gFhWfHtgWvlec0nqB9YEIVrpuwjruLlXfUSnA8cJB0miHKwqDnQ7d32aKo2xt88/xZptwxbfhA==", "dev": true, "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/helper-function-name": { - "version": "7.22.5", - "resolved": "https://registry.npmjs.org/@babel/helper-function-name/-/helper-function-name-7.22.5.tgz", - "integrity": "sha512-wtHSq6jMRE3uF2otvfuD3DIvVhOsSNshQl0Qrd7qC9oQJzHvOL4qQXlQn2916+CXGywIjpGuIkoyZRRxHPiNQQ==", + "version": "7.23.0", + "resolved": "https://registry.npmjs.org/@babel/helper-function-name/-/helper-function-name-7.23.0.tgz", + "integrity": "sha512-OErEqsrxjZTJciZ4Oo+eoZqeW9UIiOcuYKRJA4ZAgV9myA+pOXhhmpfNCKjEH/auVfEYVFJ6y1Tc4r0eIApqiw==", "dev": true, "dependencies": { - "@babel/template": "^7.22.5", - "@babel/types": "^7.22.5" + "@babel/template": "^7.22.15", + "@babel/types": "^7.23.0" }, "engines": { "node": ">=6.9.0" @@ -1869,16 +1436,16 @@ } }, "node_modules/@babel/helper-module-transforms": { - "version": "7.22.19", - "resolved": "https://registry.npmjs.org/@babel/helper-module-transforms/-/helper-module-transforms-7.22.19.tgz", - "integrity": "sha512-m6h1cJvn+OJ+R3jOHp30faq5xKJ7VbjwDj5RGgHuRlU9hrMeKsGC+JpihkR5w1g7IfseCPPtZ0r7/hB4UKaYlA==", + "version": "7.23.0", + "resolved": "https://registry.npmjs.org/@babel/helper-module-transforms/-/helper-module-transforms-7.23.0.tgz", + "integrity": "sha512-WhDWw1tdrlT0gMgUJSlX0IQvoO1eN279zrAUbVB+KpV2c3Tylz8+GnKOLllCS6Z/iZQEyVYxhZVUdPTqs2YYPw==", "dev": true, "dependencies": { - "@babel/helper-environment-visitor": "^7.22.5", + "@babel/helper-environment-visitor": "^7.22.20", "@babel/helper-module-imports": "^7.22.15", "@babel/helper-simple-access": "^7.22.5", "@babel/helper-split-export-declaration": "^7.22.6", - "@babel/helper-validator-identifier": "^7.22.19" + "@babel/helper-validator-identifier": "^7.22.20" }, "engines": { "node": ">=6.9.0" @@ -1930,9 +1497,9 @@ } }, "node_modules/@babel/helper-validator-identifier": { - "version": "7.22.19", - "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.22.19.tgz", - "integrity": "sha512-Tinq7ybnEPFFXhlYOYFiSjespWQk0dq2dRNAiMdRTOYQzEGqnnNyrTxPYHP5r6wGjlF1rFgABdDV0g8EwD6Qbg==", + "version": "7.22.20", + "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.22.20.tgz", + "integrity": "sha512-Y4OZ+ytlatR8AI+8KZfKuL5urKp7qey08ha31L8b3BwewJAoJamTzyvxPR/5D+KkdJCGPq/+8TukHBlY10FX9A==", "dev": true, "engines": { "node": ">=6.9.0" @@ -1948,26 +1515,26 @@ } }, "node_modules/@babel/helpers": { - "version": "7.22.15", - "resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.22.15.tgz", - "integrity": "sha512-7pAjK0aSdxOwR+CcYAqgWOGy5dcfvzsTIfFTb2odQqW47MDfv14UaJDY6eng8ylM2EaeKXdxaSWESbkmaQHTmw==", + "version": "7.23.1", + "resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.23.1.tgz", + "integrity": "sha512-chNpneuK18yW5Oxsr+t553UZzzAs3aZnFm4bxhebsNTeshrC95yA7l5yl7GBAG+JG1rF0F7zzD2EixK9mWSDoA==", "dev": true, "dependencies": { "@babel/template": "^7.22.15", - "@babel/traverse": "^7.22.15", - "@babel/types": "^7.22.15" + "@babel/traverse": "^7.23.0", + "@babel/types": "^7.23.0" }, "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/highlight": { - "version": "7.22.13", - "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.22.13.tgz", - "integrity": "sha512-C/BaXcnnvBCmHTpz/VGZ8jgtE2aYlW4hxDhseJAWZb7gqGM/qtCK6iZUb0TyKFf7BOUsBH7Q7fkRsDRhg1XklQ==", + "version": "7.22.20", + "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.22.20.tgz", + "integrity": "sha512-dkdMCN3py0+ksCgYmGG8jKeGA/8Tk+gJwSYYlFGxG5lmhfKNoAy004YpLxpS1W2J8m/EK2Ew+yOs9pVRwO89mg==", "dev": true, "dependencies": { - "@babel/helper-validator-identifier": "^7.22.5", + "@babel/helper-validator-identifier": "^7.22.20", "chalk": "^2.4.2", "js-tokens": "^4.0.0" }, @@ -2047,9 +1614,9 @@ } }, "node_modules/@babel/parser": { - "version": "7.22.16", - "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.22.16.tgz", - "integrity": "sha512-+gPfKv8UWeKKeJTUxe59+OobVcrYHETCsORl61EmSkmgymguYk/X5bp7GuUIXaFsc6y++v8ZxPsLSSuujqDphA==", + "version": "7.23.0", + "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.23.0.tgz", + "integrity": "sha512-vvPKKdMemU85V9WE/l5wZEmImpCtLqbnTvqDS2U1fJ96KrxoW7KrXhNsNCblQlg8Ck4b85yxdTyelsMUgFUXiw==", "dev": true, "bin": { "parser": "bin/babel-parser.js" @@ -2250,19 +1817,19 @@ } }, "node_modules/@babel/traverse": { - "version": "7.22.19", - "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.22.19.tgz", - "integrity": "sha512-ZCcpVPK64krfdScRbpxF6xA5fz7IOsfMwx1tcACvCzt6JY+0aHkBk7eIU8FRDSZRU5Zei6Z4JfgAxN1bqXGECg==", + "version": "7.23.0", + "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.23.0.tgz", + "integrity": "sha512-t/QaEvyIoIkwzpiZ7aoSKK8kObQYeF7T2v+dazAYCb8SXtp58zEVkWW7zAnju8FNKNdr4ScAOEDmMItbyOmEYw==", "dev": true, "dependencies": { "@babel/code-frame": "^7.22.13", - "@babel/generator": "^7.22.15", - "@babel/helper-environment-visitor": "^7.22.5", - "@babel/helper-function-name": "^7.22.5", + "@babel/generator": "^7.23.0", + "@babel/helper-environment-visitor": "^7.22.20", + "@babel/helper-function-name": "^7.23.0", "@babel/helper-hoist-variables": "^7.22.5", "@babel/helper-split-export-declaration": "^7.22.6", - "@babel/parser": "^7.22.16", - "@babel/types": "^7.22.19", + "@babel/parser": "^7.23.0", + "@babel/types": "^7.23.0", "debug": "^4.1.0", "globals": "^11.1.0" }, @@ -2280,13 +1847,13 @@ } }, "node_modules/@babel/types": { - "version": "7.22.19", - "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.22.19.tgz", - "integrity": "sha512-P7LAw/LbojPzkgp5oznjE6tQEIWbp4PkkfrZDINTro9zgBRtI324/EYsiSI7lhPbpIQ+DCeR2NNmMWANGGfZsg==", + "version": "7.23.0", + "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.23.0.tgz", + "integrity": "sha512-0oIyUfKoI3mSqMvsxBdclDwxXKXAUA8v/apZbc+iSyARYou1o8ZGDxbUYyLFoW2arqS2jDGqJuZvv1d/io1axg==", "dev": true, "dependencies": { "@babel/helper-string-parser": "^7.22.5", - "@babel/helper-validator-identifier": "^7.22.19", + "@babel/helper-validator-identifier": "^7.22.20", "to-fast-properties": "^2.0.0" }, "engines": { @@ -2667,9 +2234,9 @@ } }, "node_modules/@eslint-community/regexpp": { - "version": "4.8.1", - "resolved": "https://registry.npmjs.org/@eslint-community/regexpp/-/regexpp-4.8.1.tgz", - "integrity": "sha512-PWiOzLIUAjN/w5K17PoF4n6sKBw0gqLHPhywmYHP4t1VFQQVYeb1yWsJwnMVEMl3tUHME7X/SJPZLmtG7XBDxQ==", + "version": "4.9.0", + "resolved": "https://registry.npmjs.org/@eslint-community/regexpp/-/regexpp-4.9.0.tgz", + "integrity": "sha512-zJmuCWj2VLBt4c25CfBIbMZLGLyhkvs7LznyVX5HfpzeocThgIj5XQK4L+g3U36mMcx8bPMhGyPpwCATamC4jQ==", "dev": true, "engines": { "node": "^12.0.0 || ^14.0.0 || >=16.0.0" @@ -2699,9 +2266,9 @@ } }, "node_modules/@eslint/js": { - "version": "8.49.0", - "resolved": "https://registry.npmjs.org/@eslint/js/-/js-8.49.0.tgz", - "integrity": "sha512-1S8uAY/MTJqVx0SC4epBq+N2yhuwtNwLbJYNZyhL2pO1ZVKn5HFXav5T41Ryzy9K9V7ZId2JB2oy/W4aCd9/2w==", + "version": "8.50.0", + "resolved": "https://registry.npmjs.org/@eslint/js/-/js-8.50.0.tgz", + "integrity": "sha512-NCC3zz2+nvYd+Ckfh87rA47zfu2QsQpvc6k1yzTk+b9KzRj0wkGa8LSoGOXN6Zv4lRf/EIoZ80biDh9HOI+RNQ==", "dev": true, "engines": { "node": "^12.22.0 || ^14.17.0 || >=16.0.0" @@ -3796,21 +3363,21 @@ } }, "node_modules/@nrwl/devkit": { - "version": "16.8.1", - "resolved": "https://registry.npmjs.org/@nrwl/devkit/-/devkit-16.8.1.tgz", - "integrity": "sha512-Y7yYDh62Hi4q99Q4+ipIQ3K9iLuAld3WcwjLv6vtl6Livu+TU3eqbraBEno7DQL8JuIuwgBT4lX7Bp3w3N9RDg==", + "version": "16.9.1", + "resolved": "https://registry.npmjs.org/@nrwl/devkit/-/devkit-16.9.1.tgz", + "integrity": "sha512-+iR7tg+LOrGWAGmGv0hr45hYUOeKjK/Jm6WV3Ldmx6I7LaaYM5Fu6Ev2KXL669QMzLJpg3kqgKQsneWbFT3MAw==", "dev": true, "dependencies": { - "@nx/devkit": "16.8.1" + "@nx/devkit": "16.9.1" } }, "node_modules/@nrwl/tao": { - "version": "16.8.1", - "resolved": "https://registry.npmjs.org/@nrwl/tao/-/tao-16.8.1.tgz", - "integrity": "sha512-hgGFLyEgONSofxnJsXN9NlUx4J8/YSLUkfZKdR8Qa97+JGZT8FEuk7NLFJOWdYYqROoCzXLHK0d+twFFNPS5BQ==", + "version": "16.9.1", + "resolved": "https://registry.npmjs.org/@nrwl/tao/-/tao-16.9.1.tgz", + "integrity": "sha512-KsRBRAE5mSP83ZjO9cPW6ZQZWOtkMfCBih/WE9qpaiHn+hCydtYStyAO2QSic4tHVV+8VpPUQWYnpf5rhkNzWg==", "dev": true, "dependencies": { - "nx": "16.8.1", + "nx": "16.9.1", "tslib": "^2.3.0" }, "bin": { @@ -3818,12 +3385,12 @@ } }, "node_modules/@nx/devkit": { - "version": "16.8.1", - "resolved": "https://registry.npmjs.org/@nx/devkit/-/devkit-16.8.1.tgz", - "integrity": "sha512-I+Cg+lXk0wRz6KC9FZbWFuJWQTXAt5O3bNl9ksISmzqmEyuy72Cv+/MBHvF7o54Sq80DNw+RKWB1re5HFOsqCA==", + "version": "16.9.1", + "resolved": "https://registry.npmjs.org/@nx/devkit/-/devkit-16.9.1.tgz", + "integrity": "sha512-jQMLX8pUKsOIk0tLFzJms5awPxKfJEi0uxY7+IUfRNHcnDkOFiv6gf1QqJ3pobmgwBdbC6Nv/dhDP3JT2wA1gA==", "dev": true, "dependencies": { - "@nrwl/devkit": "16.8.1", + "@nrwl/devkit": "16.9.1", "ejs": "^3.1.7", "enquirer": "~2.3.6", "ignore": "^5.0.4", @@ -3869,9 +3436,9 @@ "dev": true }, "node_modules/@nx/nx-darwin-arm64": { - "version": "16.8.1", - "resolved": "https://registry.npmjs.org/@nx/nx-darwin-arm64/-/nx-darwin-arm64-16.8.1.tgz", - "integrity": "sha512-xOflqyIVcyLPzdJOZcucI+5ClwnTgK8zIvpjbxHokrO9McJJglhfUyP0bbTHpEpWqzA+GaPA/6/Qdu0ATzqQBQ==", + "version": "16.9.1", + "resolved": "https://registry.npmjs.org/@nx/nx-darwin-arm64/-/nx-darwin-arm64-16.9.1.tgz", + "integrity": "sha512-JWGrPxxt3XjgIYzvnaNAeNmK24wyF6yEE1bV+wnnKzd7yavVps3c2TOVE/AT4sgvdVj3xFzztyixYGV58tCYrg==", "cpu": [ "arm64" ], @@ -3885,9 +3452,9 @@ } }, "node_modules/@nx/nx-darwin-x64": { - "version": "16.8.1", - "resolved": "https://registry.npmjs.org/@nx/nx-darwin-x64/-/nx-darwin-x64-16.8.1.tgz", - "integrity": "sha512-JJGrlOvEpDMWnM6YKaA1WOnzHgiw5vRKEowX9ba+jxhmCvtdjbLSxi228kv92JtQPPQ91zvtsNM+BFY0EbPOlA==", + "version": "16.9.1", + "resolved": "https://registry.npmjs.org/@nx/nx-darwin-x64/-/nx-darwin-x64-16.9.1.tgz", + "integrity": "sha512-b1Hw1AmKrR+Kp361WTiKC1RFoQwERyW9R/9XJGNIdgtr+V2wa775eCEdxB9r9mwCqyEmM9iVadpRHPaFSAfQfQ==", "cpu": [ "x64" ], @@ -3901,9 +3468,9 @@ } }, "node_modules/@nx/nx-freebsd-x64": { - "version": "16.8.1", - "resolved": "https://registry.npmjs.org/@nx/nx-freebsd-x64/-/nx-freebsd-x64-16.8.1.tgz", - "integrity": "sha512-aZdJQ7cIQfXOmfk4vRXvVYxuV68xz8YyhNZ0IvBfJ16uZQ+YNl4BpklRLEIdaloSbwz9M1NNewmL+AgklEBxlA==", + "version": "16.9.1", + "resolved": "https://registry.npmjs.org/@nx/nx-freebsd-x64/-/nx-freebsd-x64-16.9.1.tgz", + "integrity": "sha512-jscl/Xu86tLQYbC8b1wy9FjEgGyuLpYnvP9d+34AHDi6CbCNSodbv93xFDlfYcLOeOD/mJXqR1Ru/1MF86OB5A==", "cpu": [ "x64" ], @@ -3917,9 +3484,9 @@ } }, "node_modules/@nx/nx-linux-arm-gnueabihf": { - "version": "16.8.1", - "resolved": "https://registry.npmjs.org/@nx/nx-linux-arm-gnueabihf/-/nx-linux-arm-gnueabihf-16.8.1.tgz", - "integrity": "sha512-JzjrTf7FFgikoVUbRs0hKvwHRR6SyqT4yIdk/YyiCt2mWY9w4m5DWtHM/9kJzhckkH9MY66m+X/zG6+NKsEMvg==", + "version": "16.9.1", + "resolved": "https://registry.npmjs.org/@nx/nx-linux-arm-gnueabihf/-/nx-linux-arm-gnueabihf-16.9.1.tgz", + "integrity": "sha512-NMAyxjYv9y4LwzU76htcPWfdmRoN/ZziTNKT3jaMbn38x4e7DoXYs9GGh267z45yWHscQWoV0v+X39LmB819aQ==", "cpu": [ "arm" ], @@ -3933,9 +3500,9 @@ } }, "node_modules/@nx/nx-linux-arm64-gnu": { - "version": "16.8.1", - "resolved": "https://registry.npmjs.org/@nx/nx-linux-arm64-gnu/-/nx-linux-arm64-gnu-16.8.1.tgz", - "integrity": "sha512-CF0s981myBWusW7iW2+fKPa7ceYYe+NO5EdKe9l27fpHDkcA71KZU3q7U823QpO/7tYvVdBevJp3CCn2/GBURQ==", + "version": "16.9.1", + "resolved": "https://registry.npmjs.org/@nx/nx-linux-arm64-gnu/-/nx-linux-arm64-gnu-16.9.1.tgz", + "integrity": "sha512-A5UbK5rFhqzs3kMiEKA+xr3LAJsQBA97VDyMH6WPraSl+XRIt4EePx0MyEqo1pnEgeuoOCvR1tjDot5E7ldInw==", "cpu": [ "arm64" ], @@ -3949,9 +3516,9 @@ } }, "node_modules/@nx/nx-linux-arm64-musl": { - "version": "16.8.1", - "resolved": "https://registry.npmjs.org/@nx/nx-linux-arm64-musl/-/nx-linux-arm64-musl-16.8.1.tgz", - "integrity": "sha512-X4TobxRt1dALvoeKC3/t1CqZCMUqtEhGG+KQLT/51sG54HdxmTAWRFlvj8PvLH0QSBk4e+uRZAo45qpt3iSnBg==", + "version": "16.9.1", + "resolved": "https://registry.npmjs.org/@nx/nx-linux-arm64-musl/-/nx-linux-arm64-musl-16.9.1.tgz", + "integrity": "sha512-eIn5PnKH7Y/u1LuanAM0wPNdcb9Z7seDjQzQ0hFMCCvV75Z8A02ztbiueLGaEsDLx35MPBdBmuyo4hsmvmLgpg==", "cpu": [ "arm64" ], @@ -3965,9 +3532,9 @@ } }, "node_modules/@nx/nx-linux-x64-gnu": { - "version": "16.8.1", - "resolved": "https://registry.npmjs.org/@nx/nx-linux-x64-gnu/-/nx-linux-x64-gnu-16.8.1.tgz", - "integrity": "sha512-lHvv2FD14Lpxh7muMLStH2tC1opQOaepO4nXwb1LaaoIpMym7kBgCK8AQuI98/oNQiMDXMNDKWQZCjxnJGDIPw==", + "version": "16.9.1", + "resolved": "https://registry.npmjs.org/@nx/nx-linux-x64-gnu/-/nx-linux-x64-gnu-16.9.1.tgz", + "integrity": "sha512-MMvhoS1pZjyIjwfeZNH2dDZuVF2xxURLTXC4UmmpY/wOWCuXhvD7QUv5A5QShxfaVXmXceo/fGLK+/Qm5e2+7g==", "cpu": [ "x64" ], @@ -3981,9 +3548,9 @@ } }, "node_modules/@nx/nx-linux-x64-musl": { - "version": "16.8.1", - "resolved": "https://registry.npmjs.org/@nx/nx-linux-x64-musl/-/nx-linux-x64-musl-16.8.1.tgz", - "integrity": "sha512-c4gQvNgIjggD1A5sYhftQEC1PtAhV3sEnv60X00v9wmjl57Wj4Ty0TgyzpYglLysVRiko/B58S8NYS0jKvMmeA==", + "version": "16.9.1", + "resolved": "https://registry.npmjs.org/@nx/nx-linux-x64-musl/-/nx-linux-x64-musl-16.9.1.tgz", + "integrity": "sha512-ca0d00YCHo0+OIT80MZdtseJj9wTlWMucmdm0OCXLf/l+Dma4MO4LR09WMH2VIpjoz4Gj7+xP0QtKtH4fWFD8Q==", "cpu": [ "x64" ], @@ -3997,9 +3564,9 @@ } }, "node_modules/@nx/nx-win32-arm64-msvc": { - "version": "16.8.1", - "resolved": "https://registry.npmjs.org/@nx/nx-win32-arm64-msvc/-/nx-win32-arm64-msvc-16.8.1.tgz", - "integrity": "sha512-GKHPy/MyGFoV9cdKgcWLZZK2vDdxt5bQ53ss0k+BDKRP+YwLKm7tJl23eeM7JdB4GLCBntEQPC+dBqxOA8Ze/w==", + "version": "16.9.1", + "resolved": "https://registry.npmjs.org/@nx/nx-win32-arm64-msvc/-/nx-win32-arm64-msvc-16.9.1.tgz", + "integrity": "sha512-UIDAWH6/LfouFaXLJWyZKggzH/698lSrLkEE1fa9VrrGEOhumk7MPAVQc/XxgkWgPDDR1TJl0ij+J1bOREn73Q==", "cpu": [ "arm64" ], @@ -4013,9 +3580,9 @@ } }, "node_modules/@nx/nx-win32-x64-msvc": { - "version": "16.8.1", - "resolved": "https://registry.npmjs.org/@nx/nx-win32-x64-msvc/-/nx-win32-x64-msvc-16.8.1.tgz", - "integrity": "sha512-yHZ5FAcx54rVc31R0yIpniepkHMPwaxG23l8E/ZYbL1iPwE/Wc1HeUzUvxUuSXtguRp7ihcRhaUEPkcSl2EAVw==", + "version": "16.9.1", + "resolved": "https://registry.npmjs.org/@nx/nx-win32-x64-msvc/-/nx-win32-x64-msvc-16.9.1.tgz", + "integrity": "sha512-isnElU5RaQEGPAJhx6VNY0P/avD79s146kmZOn1Ff5fAjReqR7kRxSWXQOdIqc6nPH9Y0c9wNwEAuhBJoor+Mw==", "cpu": [ "x64" ], @@ -4084,9 +3651,9 @@ } }, "node_modules/@octokit/openapi-types": { - "version": "18.0.0", - "resolved": "https://registry.npmjs.org/@octokit/openapi-types/-/openapi-types-18.0.0.tgz", - "integrity": "sha512-V8GImKs3TeQRxRtXFpG2wl19V7444NIOTDF24AWuIbmNaNYOQMWRbjcGDXV5B+0n887fgDcuMNOmlul+k+oJtw==", + "version": "18.1.1", + "resolved": "https://registry.npmjs.org/@octokit/openapi-types/-/openapi-types-18.1.1.tgz", + "integrity": "sha512-VRaeH8nCDtF5aXWnjPuEMIYf1itK/s3JYyJcWFJT8X9pSNnBtriDf7wlEWsGuhPLl4QIH4xM8fqTXDwJ3Mu6sw==", "dev": true }, "node_modules/@octokit/plugin-enterprise-rest": { @@ -4703,15 +4270,15 @@ } }, "node_modules/@smithy/signature-v4": { - "version": "2.0.8", - "resolved": "https://registry.npmjs.org/@smithy/signature-v4/-/signature-v4-2.0.8.tgz", - "integrity": "sha512-qrtiYMzaLlQ5HSJOaFwnyTQ3JLjmPY+3+pr9IBDpCVM6YtVj22cBLVB9bPOiZMIpkdI7ZRdxLBFlIjh5CO1Bhw==", + "version": "2.0.9", + "resolved": "https://registry.npmjs.org/@smithy/signature-v4/-/signature-v4-2.0.9.tgz", + "integrity": "sha512-RkHP0joSI1j2EI+mU55sOi33/aMMkKdL9ZY+SWrPxsiCe1oyzzuy79Tpn8X7uT+t0ilNmQlwPpkP/jUy940pEA==", "dependencies": { - "@smithy/eventstream-codec": "^2.0.8", + "@smithy/eventstream-codec": "^2.0.9", "@smithy/is-array-buffer": "^2.0.0", - "@smithy/types": "^2.3.2", + "@smithy/types": "^2.3.3", "@smithy/util-hex-encoding": "^2.0.0", - "@smithy/util-middleware": "^2.0.1", + "@smithy/util-middleware": "^2.0.2", "@smithy/util-uri-escape": "^2.0.0", "@smithy/util-utf8": "^2.0.0", "tslib": "^2.5.0" @@ -5011,9 +4578,9 @@ } }, "node_modules/@types/aws-lambda": { - "version": "8.10.121", - "resolved": "https://registry.npmjs.org/@types/aws-lambda/-/aws-lambda-8.10.121.tgz", - "integrity": "sha512-Y/jsUwO18HuC0a39BuMQkSOd/kMGATh/h5LNksw8FlTafbQ3Ge3578ZoT8w8gSOsWl2qH1p/SS/R61vc0X5jIQ==", + "version": "8.10.122", + "resolved": "https://registry.npmjs.org/@types/aws-lambda/-/aws-lambda-8.10.122.tgz", + "integrity": "sha512-vBkIh9AY22kVOCEKo5CJlyCgmSWvasC+SWUxL/x/vOwRobMpI/HG1xp/Ae3AqmSiZeLUbOhW0FCD3ZjqqUxmXw==", "dev": true }, "node_modules/@types/babel__core": { @@ -5066,9 +4633,9 @@ } }, "node_modules/@types/graceful-fs": { - "version": "4.1.6", - "resolved": "https://registry.npmjs.org/@types/graceful-fs/-/graceful-fs-4.1.6.tgz", - "integrity": "sha512-Sig0SNORX9fdW+bQuTEovKj3uHcUL6LQKbCrrqb1X7J6/ReAbhCXRAhc+SMejhLELFj2QcyuxmUooZ4bt5ReSw==", + "version": "4.1.7", + "resolved": "https://registry.npmjs.org/@types/graceful-fs/-/graceful-fs-4.1.7.tgz", + "integrity": "sha512-MhzcwU8aUygZroVwL2jeYk6JisJrPl/oov/gsgGCue9mkgl9wjGbzReYQClxiUgFDnib9FuHqTndccKeZKxTRw==", "dev": true, "dependencies": { "@types/node": "*" @@ -5081,27 +4648,27 @@ "dev": true }, "node_modules/@types/istanbul-lib-report": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/@types/istanbul-lib-report/-/istanbul-lib-report-3.0.0.tgz", - "integrity": "sha512-plGgXAPfVKFoYfa9NpYDAkseG+g6Jr294RqeqcqDixSbU34MZVJRi/P+7Y8GDpzkEwLaGZZOpKIEmeVZNtKsrg==", + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/@types/istanbul-lib-report/-/istanbul-lib-report-3.0.1.tgz", + "integrity": "sha512-gPQuzaPR5h/djlAv2apEG1HVOyj1IUs7GpfMZixU0/0KXT3pm64ylHuMUI1/Akh+sq/iikxg6Z2j+fcMDXaaTQ==", "dev": true, "dependencies": { "@types/istanbul-lib-coverage": "*" } }, "node_modules/@types/istanbul-reports": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/@types/istanbul-reports/-/istanbul-reports-3.0.1.tgz", - "integrity": "sha512-c3mAZEuK0lvBp8tmuL74XRKn1+y2dcwOUpH7x4WrF6gk1GIgiluDRgMYQtw2OFcBvAJWlt6ASU3tSqxp0Uu0Aw==", + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/@types/istanbul-reports/-/istanbul-reports-3.0.2.tgz", + "integrity": "sha512-kv43F9eb3Lhj+lr/Hn6OcLCs/sSM8bt+fIaP11rCYngfV6NVjzWXJ17owQtDQTL9tQ8WSLUrGsSJ6rJz0F1w1A==", "dev": true, "dependencies": { "@types/istanbul-lib-report": "*" } }, "node_modules/@types/jest": { - "version": "29.5.4", - "resolved": "https://registry.npmjs.org/@types/jest/-/jest-29.5.4.tgz", - "integrity": "sha512-PhglGmhWeD46FYOVLt3X7TiWjzwuVGW9wG/4qocPevXMjCmrIc5b6db9WjeGE4QYVpUAWMDv3v0IiBwObY289A==", + "version": "29.5.5", + "resolved": "https://registry.npmjs.org/@types/jest/-/jest-29.5.5.tgz", + "integrity": "sha512-ebylz2hnsWR9mYvmBFbXJXr+33UPc4+ZdxyDXh5w0FlPBTfCVN3wPL+kuOiQt3xvrK419v7XWeAs+AeOksafXg==", "dev": true, "dependencies": { "expect": "^29.0.0", @@ -5115,9 +4682,9 @@ "dev": true }, "node_modules/@types/json-schema": { - "version": "7.0.12", - "resolved": "https://registry.npmjs.org/@types/json-schema/-/json-schema-7.0.12.tgz", - "integrity": "sha512-Hr5Jfhc9eYOQNPYO5WLDq/n4jqijdHNlDXjuAQkkt+mWdQR+XJToOHrsD4cPaMXpn6KO7y2+wM8AZEs8VpBLVA==", + "version": "7.0.13", + "resolved": "https://registry.npmjs.org/@types/json-schema/-/json-schema-7.0.13.tgz", + "integrity": "sha512-RbSSoHliUbnXj3ny0CNFOoxrIDV6SUGyStHsvDqosw6CkdPV8TtWGlfecuK4ToyMEAql6pzNxgCFKanovUzlgQ==", "dev": true }, "node_modules/@types/json5": { @@ -5127,9 +4694,9 @@ "dev": true }, "node_modules/@types/lodash": { - "version": "4.14.198", - "resolved": "https://registry.npmjs.org/@types/lodash/-/lodash-4.14.198.tgz", - "integrity": "sha512-trNJ/vtMZYMLhfN45uLq4ShQSw0/S7xCTLLVM+WM1rmFpba/VS42jVUgaO3w/NOLiWR/09lnYk0yMaA/atdIsg==", + "version": "4.14.199", + "resolved": "https://registry.npmjs.org/@types/lodash/-/lodash-4.14.199.tgz", + "integrity": "sha512-Vrjz5N5Ia4SEzWWgIVwnHNEnb1UE1XMkvY5DGXrAeOGE9imk0hgTHh5GyDjLDJi9OTCn9oo9dXH1uToK1VRfrg==", "dev": true }, "node_modules/@types/lodash.merge": { @@ -5148,56 +4715,56 @@ "dev": true }, "node_modules/@types/minimist": { - "version": "1.2.2", - "resolved": "https://registry.npmjs.org/@types/minimist/-/minimist-1.2.2.tgz", - "integrity": "sha512-jhuKLIRrhvCPLqwPcx6INqmKeiA5EWrsCOPhrlFSrbrmU4ZMPjj5Ul/oLCMDO98XRUIwVm78xICz4EPCektzeQ==", + "version": "1.2.3", + "resolved": "https://registry.npmjs.org/@types/minimist/-/minimist-1.2.3.tgz", + "integrity": "sha512-ZYFzrvyWUNhaPomn80dsMNgMeXxNWZBdkuG/hWlUvXvbdUH8ZERNBGXnU87McuGcWDsyzX2aChCv/SVN348k3A==", "dev": true }, "node_modules/@types/node": { - "version": "20.6.1", - "resolved": "https://registry.npmjs.org/@types/node/-/node-20.6.1.tgz", - "integrity": "sha512-4LcJvuXQlv4lTHnxwyHQZ3uR9Zw2j7m1C9DfuwoTFQQP4Pmu04O6IfLYgMmHoOCt0nosItLLZAH+sOrRE0Bo8g==" + "version": "20.7.1", + "resolved": "https://registry.npmjs.org/@types/node/-/node-20.7.1.tgz", + "integrity": "sha512-LT+OIXpp2kj4E2S/p91BMe+VgGX2+lfO+XTpfXhh+bCk2LkQtHZSub8ewFBMGP5ClysPjTDFa4sMI8Q3n4T0wg==" }, "node_modules/@types/normalize-package-data": { - "version": "2.4.1", - "resolved": "https://registry.npmjs.org/@types/normalize-package-data/-/normalize-package-data-2.4.1.tgz", - "integrity": "sha512-Gj7cI7z+98M282Tqmp2K5EIsoouUEzbBJhQQzDE3jSIRk6r9gsz0oUokqIUR4u1R3dMHo0pDHM7sNOHyhulypw==", + "version": "2.4.2", + "resolved": "https://registry.npmjs.org/@types/normalize-package-data/-/normalize-package-data-2.4.2.tgz", + "integrity": "sha512-lqa4UEhhv/2sjjIQgjX8B+RBjj47eo0mzGasklVJ78UKGQY1r0VpB9XHDaZZO9qzEFDdy4MrXLuEaSmPrPSe/A==", "dev": true }, "node_modules/@types/promise-retry": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/@types/promise-retry/-/promise-retry-1.1.3.tgz", - "integrity": "sha512-LxIlEpEX6frE3co3vCO2EUJfHIta1IOmhDlcAsR4GMMv9hev1iTI9VwberVGkePJAuLZs5rMucrV8CziCfuJMw==", + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/@types/promise-retry/-/promise-retry-1.1.4.tgz", + "integrity": "sha512-DmJeCIhfpAE0XonyVUa0BRLbkE/97L9KUO8iM2br8Bzl8GLuru842K1A8VgKJwNjtLvIbUnSqElhNKdM9mGl9w==", "dev": true, "dependencies": { "@types/retry": "*" } }, "node_modules/@types/retry": { - "version": "0.12.2", - "resolved": "https://registry.npmjs.org/@types/retry/-/retry-0.12.2.tgz", - "integrity": "sha512-XISRgDJ2Tc5q4TRqvgJtzsRkFYNJzZrhTdtMoGVBttwzzQJkPnS3WWTFc7kuDRoPtPakl+T+OfdEUjYJj7Jbow==", + "version": "0.12.3", + "resolved": "https://registry.npmjs.org/@types/retry/-/retry-0.12.3.tgz", + "integrity": "sha512-rkxEZUFIyDEZhC6EfHz6Hwos2zXewCOLBzhdgv7D55qu4OAySNwDZzxbaMpFI6XthdBa5oHhR5s6/9MSuTfw4g==", "dev": true }, "node_modules/@types/semver": { - "version": "7.5.2", - "resolved": "https://registry.npmjs.org/@types/semver/-/semver-7.5.2.tgz", - "integrity": "sha512-7aqorHYgdNO4DM36stTiGO3DvKoex9TQRwsJU6vMaFGyqpBA1MNZkz+PG3gaNUPpTAOYhT1WR7M1JyA3fbS9Cw==", + "version": "7.5.3", + "resolved": "https://registry.npmjs.org/@types/semver/-/semver-7.5.3.tgz", + "integrity": "sha512-OxepLK9EuNEIPxWNME+C6WwbRAOOI2o2BaQEGzz5Lu2e4Z5eDnEo+/aVEDMIXywoJitJ7xWd641wrGLZdtwRyw==", "dev": true }, "node_modules/@types/sinon": { - "version": "10.0.16", - "resolved": "https://registry.npmjs.org/@types/sinon/-/sinon-10.0.16.tgz", - "integrity": "sha512-j2Du5SYpXZjJVJtXBokASpPRj+e2z+VUhCPHmM6WMfe3dpHu6iVKJMU6AiBcMp/XTAYnEj6Wc1trJUWwZ0QaAQ==", + "version": "10.0.17", + "resolved": "https://registry.npmjs.org/@types/sinon/-/sinon-10.0.17.tgz", + "integrity": "sha512-+6ILpcixQ0Ma3dHMTLv4rSycbDXkDljgKL+E0nI2RUxxhYTFyPSjt6RVMxh7jUshvyVcBvicb0Ktj+lAJcjgeA==", "dev": true, "dependencies": { "@types/sinonjs__fake-timers": "*" } }, "node_modules/@types/sinonjs__fake-timers": { - "version": "8.1.2", - "resolved": "https://registry.npmjs.org/@types/sinonjs__fake-timers/-/sinonjs__fake-timers-8.1.2.tgz", - "integrity": "sha512-9GcLXF0/v3t80caGs5p2rRfkB+a8VBGLJZVih6CNFkx8IZ994wiKKLSRs9nuFwk1HevWs/1mnUmkApGrSGsShA==", + "version": "8.1.3", + "resolved": "https://registry.npmjs.org/@types/sinonjs__fake-timers/-/sinonjs__fake-timers-8.1.3.tgz", + "integrity": "sha512-4g+2YyWe0Ve+LBh+WUm1697PD0Kdi6coG1eU0YjQbwx61AZ8XbEpL1zIT6WjuUKrCMCROpEaYQPDjBnDouBVAQ==", "dev": true }, "node_modules/@types/stack-utils": { @@ -5213,31 +4780,31 @@ "dev": true }, "node_modules/@types/yargs": { - "version": "17.0.24", - "resolved": "https://registry.npmjs.org/@types/yargs/-/yargs-17.0.24.tgz", - "integrity": "sha512-6i0aC7jV6QzQB8ne1joVZ0eSFIstHsCrobmOtghM11yGlH0j43FKL2UhWdELkyps0zuf7qVTUVCCR+tgSlyLLw==", + "version": "17.0.25", + "resolved": "https://registry.npmjs.org/@types/yargs/-/yargs-17.0.25.tgz", + "integrity": "sha512-gy7iPgwnzNvxgAEi2bXOHWCVOG6f7xsprVJH4MjlAWeBmJ7vh/Y1kwMtUrs64ztf24zVIRCpr3n/z6gm9QIkgg==", "dev": true, "dependencies": { "@types/yargs-parser": "*" } }, "node_modules/@types/yargs-parser": { - "version": "21.0.0", - "resolved": "https://registry.npmjs.org/@types/yargs-parser/-/yargs-parser-21.0.0.tgz", - "integrity": "sha512-iO9ZQHkZxHn4mSakYV0vFHAVDyEOIJQrV2uZ06HxEPcx+mt8swXoZHIbaaJ2crJYFfErySgktuTZ3BeLz+XmFA==", + "version": "21.0.1", + "resolved": "https://registry.npmjs.org/@types/yargs-parser/-/yargs-parser-21.0.1.tgz", + "integrity": "sha512-axdPBuLuEJt0c4yI5OZssC19K2Mq1uKdrfZBzuxLvaztgqUtFYZUNw7lETExPYJR9jdEoIg4mb7RQKRQzOkeGQ==", "dev": true }, "node_modules/@typescript-eslint/eslint-plugin": { - "version": "6.7.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-6.7.0.tgz", - "integrity": "sha512-gUqtknHm0TDs1LhY12K2NA3Rmlmp88jK9Tx8vGZMfHeNMLE3GH2e9TRub+y+SOjuYgtOmok+wt1AyDPZqxbNag==", + "version": "6.7.3", + "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-6.7.3.tgz", + "integrity": "sha512-vntq452UHNltxsaaN+L9WyuMch8bMd9CqJ3zhzTPXXidwbf5mqqKCVXEuvRZUqLJSTLeWE65lQwyXsRGnXkCTA==", "dev": true, "dependencies": { "@eslint-community/regexpp": "^4.5.1", - "@typescript-eslint/scope-manager": "6.7.0", - "@typescript-eslint/type-utils": "6.7.0", - "@typescript-eslint/utils": "6.7.0", - "@typescript-eslint/visitor-keys": "6.7.0", + "@typescript-eslint/scope-manager": "6.7.3", + "@typescript-eslint/type-utils": "6.7.3", + "@typescript-eslint/utils": "6.7.3", + "@typescript-eslint/visitor-keys": "6.7.3", "debug": "^4.3.4", "graphemer": "^1.4.0", "ignore": "^5.2.4", @@ -5263,15 +4830,15 @@ } }, "node_modules/@typescript-eslint/parser": { - "version": "6.7.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-6.7.0.tgz", - "integrity": "sha512-jZKYwqNpNm5kzPVP5z1JXAuxjtl2uG+5NpaMocFPTNC2EdYIgbXIPImObOkhbONxtFTTdoZstLZefbaK+wXZng==", + "version": "6.7.3", + "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-6.7.3.tgz", + "integrity": "sha512-TlutE+iep2o7R8Lf+yoer3zU6/0EAUc8QIBB3GYBc1KGz4c4TRm83xwXUZVPlZ6YCLss4r77jbu6j3sendJoiQ==", "dev": true, "dependencies": { - "@typescript-eslint/scope-manager": "6.7.0", - "@typescript-eslint/types": "6.7.0", - "@typescript-eslint/typescript-estree": "6.7.0", - "@typescript-eslint/visitor-keys": "6.7.0", + "@typescript-eslint/scope-manager": "6.7.3", + "@typescript-eslint/types": "6.7.3", + "@typescript-eslint/typescript-estree": "6.7.3", + "@typescript-eslint/visitor-keys": "6.7.3", "debug": "^4.3.4" }, "engines": { @@ -5291,13 +4858,13 @@ } }, "node_modules/@typescript-eslint/scope-manager": { - "version": "6.7.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-6.7.0.tgz", - "integrity": "sha512-lAT1Uau20lQyjoLUQ5FUMSX/dS07qux9rYd5FGzKz/Kf8W8ccuvMyldb8hadHdK/qOI7aikvQWqulnEq2nCEYA==", + "version": "6.7.3", + "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-6.7.3.tgz", + "integrity": "sha512-wOlo0QnEou9cHO2TdkJmzF7DFGvAKEnB82PuPNHpT8ZKKaZu6Bm63ugOTn9fXNJtvuDPanBc78lGUGGytJoVzQ==", "dev": true, "dependencies": { - "@typescript-eslint/types": "6.7.0", - "@typescript-eslint/visitor-keys": "6.7.0" + "@typescript-eslint/types": "6.7.3", + "@typescript-eslint/visitor-keys": "6.7.3" }, "engines": { "node": "^16.0.0 || >=18.0.0" @@ -5308,13 +4875,13 @@ } }, "node_modules/@typescript-eslint/type-utils": { - "version": "6.7.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-6.7.0.tgz", - "integrity": "sha512-f/QabJgDAlpSz3qduCyQT0Fw7hHpmhOzY/Rv6zO3yO+HVIdPfIWhrQoAyG+uZVtWAIS85zAyzgAFfyEr+MgBpg==", + "version": "6.7.3", + "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-6.7.3.tgz", + "integrity": "sha512-Fc68K0aTDrKIBvLnKTZ5Pf3MXK495YErrbHb1R6aTpfK5OdSFj0rVN7ib6Tx6ePrZ2gsjLqr0s98NG7l96KSQw==", "dev": true, "dependencies": { - "@typescript-eslint/typescript-estree": "6.7.0", - "@typescript-eslint/utils": "6.7.0", + "@typescript-eslint/typescript-estree": "6.7.3", + "@typescript-eslint/utils": "6.7.3", "debug": "^4.3.4", "ts-api-utils": "^1.0.1" }, @@ -5335,9 +4902,9 @@ } }, "node_modules/@typescript-eslint/types": { - "version": "6.7.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-6.7.0.tgz", - "integrity": "sha512-ihPfvOp7pOcN/ysoj0RpBPOx3HQTJTrIN8UZK+WFd3/iDeFHHqeyYxa4hQk4rMhsz9H9mXpR61IzwlBVGXtl9Q==", + "version": "6.7.3", + "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-6.7.3.tgz", + "integrity": "sha512-4g+de6roB2NFcfkZb439tigpAMnvEIg3rIjWQ+EM7IBaYt/CdJt6em9BJ4h4UpdgaBWdmx2iWsafHTrqmgIPNw==", "dev": true, "engines": { "node": "^16.0.0 || >=18.0.0" @@ -5348,13 +4915,13 @@ } }, "node_modules/@typescript-eslint/typescript-estree": { - "version": "6.7.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-6.7.0.tgz", - "integrity": "sha512-dPvkXj3n6e9yd/0LfojNU8VMUGHWiLuBZvbM6V6QYD+2qxqInE7J+J/ieY2iGwR9ivf/R/haWGkIj04WVUeiSQ==", + "version": "6.7.3", + "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-6.7.3.tgz", + "integrity": "sha512-YLQ3tJoS4VxLFYHTw21oe1/vIZPRqAO91z6Uv0Ss2BKm/Ag7/RVQBcXTGcXhgJMdA4U+HrKuY5gWlJlvoaKZ5g==", "dev": true, "dependencies": { - "@typescript-eslint/types": "6.7.0", - "@typescript-eslint/visitor-keys": "6.7.0", + "@typescript-eslint/types": "6.7.3", + "@typescript-eslint/visitor-keys": "6.7.3", "debug": "^4.3.4", "globby": "^11.1.0", "is-glob": "^4.0.3", @@ -5375,17 +4942,17 @@ } }, "node_modules/@typescript-eslint/utils": { - "version": "6.7.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-6.7.0.tgz", - "integrity": "sha512-MfCq3cM0vh2slSikQYqK2Gq52gvOhe57vD2RM3V4gQRZYX4rDPnKLu5p6cm89+LJiGlwEXU8hkYxhqqEC/V3qA==", + "version": "6.7.3", + "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-6.7.3.tgz", + "integrity": "sha512-vzLkVder21GpWRrmSR9JxGZ5+ibIUSudXlW52qeKpzUEQhRSmyZiVDDj3crAth7+5tmN1ulvgKaCU2f/bPRCzg==", "dev": true, "dependencies": { "@eslint-community/eslint-utils": "^4.4.0", "@types/json-schema": "^7.0.12", "@types/semver": "^7.5.0", - "@typescript-eslint/scope-manager": "6.7.0", - "@typescript-eslint/types": "6.7.0", - "@typescript-eslint/typescript-estree": "6.7.0", + "@typescript-eslint/scope-manager": "6.7.3", + "@typescript-eslint/types": "6.7.3", + "@typescript-eslint/typescript-estree": "6.7.3", "semver": "^7.5.4" }, "engines": { @@ -5400,12 +4967,12 @@ } }, "node_modules/@typescript-eslint/visitor-keys": { - "version": "6.7.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-6.7.0.tgz", - "integrity": "sha512-/C1RVgKFDmGMcVGeD8HjKv2bd72oI1KxQDeY8uc66gw9R0OK0eMq48cA+jv9/2Ag6cdrsUGySm1yzYmfz0hxwQ==", + "version": "6.7.3", + "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-6.7.3.tgz", + "integrity": "sha512-HEVXkU9IB+nk9o63CeICMHxFWbHWr3E1mpilIQBe9+7L/lH97rleFLVtYsfnWB+JVMaiFnEaxvknvmIzX+CqVg==", "dev": true, "dependencies": { - "@typescript-eslint/types": "6.7.0", + "@typescript-eslint/types": "6.7.3", "eslint-visitor-keys": "^3.4.1" }, "engines": { @@ -5856,9 +5423,9 @@ } }, "node_modules/aws-cdk": { - "version": "2.96.2", - "resolved": "https://registry.npmjs.org/aws-cdk/-/aws-cdk-2.96.2.tgz", - "integrity": "sha512-13ERpPV99OFAD75PLOtl0rRMXTWn6bCrmUPwYKkLwIMkj2xWCBiwo2Y9Qg+UzEszm5NMHA1N4ichSvuZ0mt2IQ==", + "version": "2.98.0", + "resolved": "https://registry.npmjs.org/aws-cdk/-/aws-cdk-2.98.0.tgz", + "integrity": "sha512-K8WCstCTmJo7dOwzAfUxhWmRYs9FmtFMpKh0OkEOs7iJ1HsNvAOz2LUURkVMqINXgfhmqqjgK6PQxI4AfgOdGA==", "bin": { "cdk": "bin/cdk" }, @@ -5870,9 +5437,9 @@ } }, "node_modules/aws-cdk-lib": { - "version": "2.96.2", - "resolved": "https://registry.npmjs.org/aws-cdk-lib/-/aws-cdk-lib-2.96.2.tgz", - "integrity": "sha512-wDAdPUfNlteLQKrapd5c7hNYHWPzHmFfuMSrddFCajjoscsnd0LeUxM2yAzwJV7vLNp00q2SgUZqRQHcN98dmg==", + "version": "2.98.0", + "resolved": "https://registry.npmjs.org/aws-cdk-lib/-/aws-cdk-lib-2.98.0.tgz", + "integrity": "sha512-6APM6zVTCi59L/8lPX47DINlCD9ZG7OEQ28pD/ftmHZ8qC7AlBWwWqOfuSL+DyEbJBLcw3AZ2MLM1AMJPO+sVg==", "bundleDependencies": [ "@balena/dockerignore", "case", @@ -6210,9 +5777,9 @@ } }, "node_modules/aws-sdk": { - "version": "2.1459.0", - "resolved": "https://registry.npmjs.org/aws-sdk/-/aws-sdk-2.1459.0.tgz", - "integrity": "sha512-My45PgQYhRTh6fOeZ94ELUoXzza/6gTy0J22aK4iy0DEA+uE5gjr1VthnIwbLYNMeEqn8xwJZuNJqvi/WaUUcQ==", + "version": "2.1466.0", + "resolved": "https://registry.npmjs.org/aws-sdk/-/aws-sdk-2.1466.0.tgz", + "integrity": "sha512-wkpWe0TBNziEI5wNw2twRofCaNQAgQ+v91HoPylmcuD5qqgRm6hoV7M5NSOMKO8ALlglZdR66EmGusaZ2dMJwA==", "dev": true, "dependencies": { "buffer": "4.9.2", @@ -6439,6 +6006,29 @@ "node": "^12.13.0 || ^14.15.0 || ^16.10.0 || >=17.0.0" } }, + "node_modules/aws-sdk/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==", + "dev": true, + "dependencies": { + "base64-js": "^1.0.2", + "ieee754": "^1.1.4", + "isarray": "^1.0.0" + } + }, + "node_modules/aws-sdk/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==", + "dev": true + }, + "node_modules/aws-sdk/node_modules/isarray": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", + "integrity": "sha512-VLghIWNM6ELQzo7zwmcg0NmTVyWKYjvIeM83yjp0wRDTmUnrM678fQbcKBo6n2CJEF0szoG//ytg+TKla89ALQ==", + "dev": true + }, "node_modules/aws-sdk/node_modules/uuid": { "version": "8.0.0", "resolved": "https://registry.npmjs.org/uuid/-/uuid-8.0.0.tgz", @@ -6449,9 +6039,9 @@ } }, "node_modules/aws-xray-sdk-core": { - "version": "3.5.1", - "resolved": "https://registry.npmjs.org/aws-xray-sdk-core/-/aws-xray-sdk-core-3.5.1.tgz", - "integrity": "sha512-Q3S+K/UkDw/M9NnRZbyXNXsjB3amsv+6XhPdomtfzAdyNkf6q+GOQVuWpaLGHunBz91VzpGBzP9Qg0/elm6Cwg==", + "version": "3.5.2", + "resolved": "https://registry.npmjs.org/aws-xray-sdk-core/-/aws-xray-sdk-core-3.5.2.tgz", + "integrity": "sha512-sboSTXIS0tOKYqQ5zrWX6p6k4Mrec84BNeJPHnRakcjzgsU5j8xBB5kim3BVVv+pINGLVpOD568cJzH0GI/HqQ==", "dependencies": { "@aws-sdk/service-error-classification": "^3.4.1", "@aws-sdk/types": "^3.4.1", @@ -6465,9 +6055,9 @@ } }, "node_modules/axios": { - "version": "1.5.0", - "resolved": "https://registry.npmjs.org/axios/-/axios-1.5.0.tgz", - "integrity": "sha512-D4DdjDo5CY50Qms0qGQTTw6Q44jl7zRwY7bthds06pUGfChBCTcQs+N743eFWGEd6pRTMd6A+I87aWyFV5wiZQ==", + "version": "1.5.1", + "resolved": "https://registry.npmjs.org/axios/-/axios-1.5.1.tgz", + "integrity": "sha512-Q28iYCWzNHjAm+yEAot5QaAMxhMghWLFVf7rRdwhUI+c2jix2DUXjAHXVi+s1ibs3mjPO/cCgbA++3BjD0vP/A==", "dev": true, "dependencies": { "follow-redirects": "^1.15.0", @@ -6642,30 +6232,6 @@ "readable-stream": "^3.4.0" } }, - "node_modules/bl/node_modules/buffer": { - "version": "5.7.1", - "resolved": "https://registry.npmjs.org/buffer/-/buffer-5.7.1.tgz", - "integrity": "sha512-EHcyIPBQ4BSGlvjB16k5KgAJ27CIsHY/2JBmCRReo48y9rQ3MaUzWX3KVlBa4U7MyX02HdVj0K7C3WaB3ju7FQ==", - "dev": true, - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/feross" - }, - { - "type": "patreon", - "url": "https://www.patreon.com/feross" - }, - { - "type": "consulting", - "url": "https://feross.org/support" - } - ], - "dependencies": { - "base64-js": "^1.3.1", - "ieee754": "^1.1.13" - } - }, "node_modules/bowser": { "version": "2.11.0", "resolved": "https://registry.npmjs.org/bowser/-/bowser-2.11.0.tgz", @@ -6705,9 +6271,9 @@ } }, "node_modules/browserslist": { - "version": "4.21.10", - "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.21.10.tgz", - "integrity": "sha512-bipEBdZfVH5/pwrvqc+Ub0kUPVfGUhlKxbvfD+z1BDnPEO/X98ruXGA1WP5ASpAFKan7Qr6j736IacbZQuAlKQ==", + "version": "4.22.0", + "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.22.0.tgz", + "integrity": "sha512-v+Jcv64L2LbfTC6OnRcaxtqJNJuQAVhZKSJfR/6hn7lhnChUXl4amwVviqN1k411BB+3rRoKMitELRn1CojeRA==", "dev": true, "funding": [ { @@ -6724,10 +6290,10 @@ } ], "dependencies": { - "caniuse-lite": "^1.0.30001517", - "electron-to-chromium": "^1.4.477", + "caniuse-lite": "^1.0.30001539", + "electron-to-chromium": "^1.4.530", "node-releases": "^2.0.13", - "update-browserslist-db": "^1.0.11" + "update-browserslist-db": "^1.0.13" }, "bin": { "browserslist": "cli.js" @@ -6758,14 +6324,27 @@ } }, "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==", + "version": "5.7.1", + "resolved": "https://registry.npmjs.org/buffer/-/buffer-5.7.1.tgz", + "integrity": "sha512-EHcyIPBQ4BSGlvjB16k5KgAJ27CIsHY/2JBmCRReo48y9rQ3MaUzWX3KVlBa4U7MyX02HdVj0K7C3WaB3ju7FQ==", "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ], "dependencies": { - "base64-js": "^1.0.2", - "ieee754": "^1.1.4", - "isarray": "^1.0.0" + "base64-js": "^1.3.1", + "ieee754": "^1.1.13" } }, "node_modules/buffer-from": { @@ -6839,19 +6418,19 @@ } }, "node_modules/cacache/node_modules/glob": { - "version": "10.3.4", - "resolved": "https://registry.npmjs.org/glob/-/glob-10.3.4.tgz", - "integrity": "sha512-6LFElP3A+i/Q8XQKEvZjkEWEOTgAIALR9AO2rwT8bgPhDd1anmqDJDZ6lLddI4ehxxxR1S5RIqKe1uapMQfYaQ==", + "version": "10.3.10", + "resolved": "https://registry.npmjs.org/glob/-/glob-10.3.10.tgz", + "integrity": "sha512-fa46+tv1Ak0UPK1TOy/pZrIybNNt4HCv7SDzwyfiOZkvZLEbjsZkJBPtDHVshZjbecAoAGSC20MjLDG/qr679g==", "dev": true, "dependencies": { "foreground-child": "^3.1.0", - "jackspeak": "^2.0.3", + "jackspeak": "^2.3.5", "minimatch": "^9.0.1", "minipass": "^5.0.0 || ^6.0.2 || ^7.0.0", "path-scurry": "^1.10.1" }, "bin": { - "glob": "dist/cjs/src/bin.js" + "glob": "dist/esm/bin.mjs" }, "engines": { "node": ">=16 || 14 >=14.17" @@ -6954,9 +6533,9 @@ } }, "node_modules/caniuse-lite": { - "version": "1.0.30001534", - "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001534.tgz", - "integrity": "sha512-vlPVrhsCS7XaSh2VvWluIQEzVhefrUQcEsQWSS5A5V+dM07uv1qHeQzAOTGIMy9i3e9bH15+muvI/UHojVgS/Q==", + "version": "1.0.30001540", + "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001540.tgz", + "integrity": "sha512-9JL38jscuTJBTcuETxm8QLsFr/F6v0CYYTEU6r5+qSM98P2Q0Hmu0eG1dTG5GBUmywU3UlcVOUSIJYY47rdFSw==", "dev": true, "funding": [ { @@ -7900,9 +7479,9 @@ } }, "node_modules/diff": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/diff/-/diff-5.1.0.tgz", - "integrity": "sha512-D+mk+qE8VC/PAUrlAU34N+VfXev0ghe5ywmpqrawphmVZc1bEfn56uo9qpyGp1p4xpzOHkSW4ztBd6L7Xx4ACw==", + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/diff/-/diff-4.0.2.tgz", + "integrity": "sha512-58lmxKSA4BNyLz+HHMUzlOEpg09FV+ev6ZMe3vJihgdxzgcwZ8VoEEPmALCZG9LmqfVoNMMKpttIYTVG6uDY7A==", "dev": true, "engines": { "node": ">=0.3.1" @@ -8006,9 +7585,9 @@ } }, "node_modules/electron-to-chromium": { - "version": "1.4.523", - "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.4.523.tgz", - "integrity": "sha512-9AreocSUWnzNtvLcbpng6N+GkXnCcBR80IQkxRC9Dfdyg4gaWNUPBujAHUpKkiUkoSoR9UlhA4zD/IgBklmhzg==", + "version": "1.4.532", + "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.4.532.tgz", + "integrity": "sha512-piIR0QFdIGKmOJTSNg5AwxZRNWQSXlRYycqDB9Srstx4lip8KpcmRxVP6zuFWExWziHYZpJ0acX7TxqX95KBpg==", "dev": true }, "node_modules/emitter-listener": { @@ -8281,15 +7860,15 @@ } }, "node_modules/eslint": { - "version": "8.49.0", - "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.49.0.tgz", - "integrity": "sha512-jw03ENfm6VJI0jA9U+8H5zfl5b+FvuU3YYvZRdZHOlU2ggJkxrlkJH4HcDrZpj6YwD8kuYqvQM8LyesoazrSOQ==", + "version": "8.50.0", + "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.50.0.tgz", + "integrity": "sha512-FOnOGSuFuFLv/Sa+FDVRZl4GGVAAFFi8LecRsI5a1tMO5HIE8nCm4ivAlzt4dT3ol/PaaGC0rJEEXQmHJBGoOg==", "dev": true, "dependencies": { "@eslint-community/eslint-utils": "^4.2.0", "@eslint-community/regexpp": "^4.6.1", "@eslint/eslintrc": "^2.1.2", - "@eslint/js": "8.49.0", + "@eslint/js": "8.50.0", "@humanwhocodes/config-array": "^0.11.11", "@humanwhocodes/module-importer": "^1.0.1", "@nodelib/fs.walk": "^1.2.8", @@ -8367,9 +7946,9 @@ } }, "node_modules/eslint-import-resolver-typescript": { - "version": "3.6.0", - "resolved": "https://registry.npmjs.org/eslint-import-resolver-typescript/-/eslint-import-resolver-typescript-3.6.0.tgz", - "integrity": "sha512-QTHR9ddNnn35RTxlaEnx2gCxqFlF2SEN0SE2d17SqwyM7YOSI2GHWRYp5BiRkObTUNYPupC/3Fq2a0PpT+EKpg==", + "version": "3.6.1", + "resolved": "https://registry.npmjs.org/eslint-import-resolver-typescript/-/eslint-import-resolver-typescript-3.6.1.tgz", + "integrity": "sha512-xgdptdoi5W3niYeuQxKmzVDTATvLYqhpwmykwsh7f6HIOStGWEIL9iqZgQDF9u9OEzrRwR8no5q2VT+bjAujTg==", "dev": true, "dependencies": { "debug": "^4.3.4", @@ -8926,15 +8505,15 @@ } }, "node_modules/flatted": { - "version": "3.2.7", - "resolved": "https://registry.npmjs.org/flatted/-/flatted-3.2.7.tgz", - "integrity": "sha512-5nqDSxl8nn5BSNxyR3n4I6eDmbolI6WT+QqR547RwxQapgjQBmtktdP+HTBb/a/zLsbzERTONyUB5pefh5TtjQ==", + "version": "3.2.9", + "resolved": "https://registry.npmjs.org/flatted/-/flatted-3.2.9.tgz", + "integrity": "sha512-36yxDn5H7OFZQla0/jFJmbIKTdZAQHngCedGxiMmpNfEZM0sdEeT+WczLQrjK6D7o2aiyLYDnkw0R3JK0Qv1RQ==", "dev": true }, "node_modules/follow-redirects": { - "version": "1.15.2", - "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.15.2.tgz", - "integrity": "sha512-VQLG33o04KaQ8uYi2tVNbdrWp1QWxNNea+nmIB4EVM28v0hmP17z7aG1+wAkNzVq4KeXTq3221ye5qTJP91JwA==", + "version": "1.15.3", + "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.15.3.tgz", + "integrity": "sha512-1VzOtuEM8pC9SFU1E+8KfTjZyMztRsgEfwQl44z8A25uy13jSzTj6dyK2Df52iV0vgHCfBwLhDWevLn95w5v6Q==", "dev": true, "funding": [ { @@ -9232,9 +8811,9 @@ } }, "node_modules/get-tsconfig": { - "version": "4.7.0", - "resolved": "https://registry.npmjs.org/get-tsconfig/-/get-tsconfig-4.7.0.tgz", - "integrity": "sha512-pmjiZ7xtB8URYm74PlGJozDNyhvsVLUcpBa8DZBG3bWHwaHa9bPiRpiSfovw+fjhwONSCWKRyk+JQHEGZmMrzw==", + "version": "4.7.2", + "resolved": "https://registry.npmjs.org/get-tsconfig/-/get-tsconfig-4.7.2.tgz", + "integrity": "sha512-wuMsz4leaj5hbGgg4IvDU0bqJagpftG5l5cXIAvo8uZrqn0NJqwtfupTN00VnkQJPcIRrxYrm1Ue24btpCha2A==", "dev": true, "dependencies": { "resolve-pkg-maps": "^1.0.0" @@ -9359,9 +8938,9 @@ } }, "node_modules/globals": { - "version": "13.21.0", - "resolved": "https://registry.npmjs.org/globals/-/globals-13.21.0.tgz", - "integrity": "sha512-ybyme3s4yy/t/3s35bewwXKOf7cvzfreG2lH0lZl0JB7I4GxRP2ghxOK/Nb9EkRXdbBXZLfq/p/0W2JUONB/Gg==", + "version": "13.22.0", + "resolved": "https://registry.npmjs.org/globals/-/globals-13.22.0.tgz", + "integrity": "sha512-H1Ddc/PbZHTDVJSnj8kWptIRSD6AM3pK+mKytuIVF4uoBV7rshFlhhvA58ceJ5wp3Er58w6zj7bykMpYXt3ETw==", "dev": true, "dependencies": { "type-fest": "^0.20.2" @@ -9675,10 +9254,24 @@ } }, "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==", - "dev": true + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/ieee754/-/ieee754-1.2.1.tgz", + "integrity": "sha512-dcyqhDvX1C46lXZcVqCpK+FtMRQVdIMN6/Df5js2zouUsqG7I6sFxitIC+7KYK29KdXOLHdu9zL4sFnoVQnqaA==", + "dev": true, + "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/ignore": { "version": "5.2.4", @@ -10346,9 +9939,9 @@ } }, "node_modules/isarray": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", - "integrity": "sha512-VLghIWNM6ELQzo7zwmcg0NmTVyWKYjvIeM83yjp0wRDTmUnrM678fQbcKBo6n2CJEF0szoG//ytg+TKla89ALQ==", + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-2.0.5.tgz", + "integrity": "sha512-xHjhDr3cNBK0BzdUJSPXZntQUx/mwMS5Rw4A7lPJ90XGAO6ISP/ePDNuo0vhqOZU+UD5JoodwCAAoZQd3FeAKw==", "dev": true }, "node_modules/isexe": { @@ -10433,9 +10026,9 @@ } }, "node_modules/jackspeak": { - "version": "2.3.3", - "resolved": "https://registry.npmjs.org/jackspeak/-/jackspeak-2.3.3.tgz", - "integrity": "sha512-R2bUw+kVZFS/h1AZqBKrSgDmdmjApzgY0AlCPumopFiAlbUxE2gf+SCuBzQ0cP5hHmUmFYF5yw55T97Th5Kstg==", + "version": "2.3.6", + "resolved": "https://registry.npmjs.org/jackspeak/-/jackspeak-2.3.6.tgz", + "integrity": "sha512-N3yCS/NegsOBokc8GAdM8UcmfsKiSS8cipheD/nivzr700H+nsMOxJjQnvwOcRYVuFkdH0wGUvW2WbXGmrZGbQ==", "dev": true, "dependencies": { "@isaacs/cliui": "^8.0.2" @@ -13335,13 +12928,13 @@ } }, "node_modules/nx": { - "version": "16.8.1", - "resolved": "https://registry.npmjs.org/nx/-/nx-16.8.1.tgz", - "integrity": "sha512-K5KrwNdPz0eEe6SY5wrnhZcigjfIJkttPrIJRXNBQTE50NGcOfz1TjMXPdTWBxBCCua5PAealO3OrE8jpv+QnQ==", + "version": "16.9.1", + "resolved": "https://registry.npmjs.org/nx/-/nx-16.9.1.tgz", + "integrity": "sha512-h6jp0fXzEsBO3pwCNS2JbfzJZRgE2DnIo7Sj1/1oBo82o44jNqsPo3nMTj95qhcveJ0qBiKIh+Xw/fghXiRiSQ==", "dev": true, "hasInstallScript": true, "dependencies": { - "@nrwl/tao": "16.8.1", + "@nrwl/tao": "16.9.1", "@parcel/watcher": "2.0.4", "@yarnpkg/lockfile": "^1.1.0", "@yarnpkg/parsers": "3.0.0-rc.46", @@ -13354,12 +12947,12 @@ "dotenv": "~16.3.1", "dotenv-expand": "~10.0.0", "enquirer": "~2.3.6", - "fast-glob": "3.2.7", "figures": "3.2.0", "flat": "^5.0.2", "fs-extra": "^11.1.0", "glob": "7.1.4", "ignore": "^5.0.4", + "jest-diff": "^29.4.1", "js-yaml": "4.1.0", "jsonc-parser": "3.2.0", "lines-and-columns": "~2.0.3", @@ -13382,20 +12975,20 @@ "nx": "bin/nx.js" }, "optionalDependencies": { - "@nx/nx-darwin-arm64": "16.8.1", - "@nx/nx-darwin-x64": "16.8.1", - "@nx/nx-freebsd-x64": "16.8.1", - "@nx/nx-linux-arm-gnueabihf": "16.8.1", - "@nx/nx-linux-arm64-gnu": "16.8.1", - "@nx/nx-linux-arm64-musl": "16.8.1", - "@nx/nx-linux-x64-gnu": "16.8.1", - "@nx/nx-linux-x64-musl": "16.8.1", - "@nx/nx-win32-arm64-msvc": "16.8.1", - "@nx/nx-win32-x64-msvc": "16.8.1" + "@nx/nx-darwin-arm64": "16.9.1", + "@nx/nx-darwin-x64": "16.9.1", + "@nx/nx-freebsd-x64": "16.9.1", + "@nx/nx-linux-arm-gnueabihf": "16.9.1", + "@nx/nx-linux-arm64-gnu": "16.9.1", + "@nx/nx-linux-arm64-musl": "16.9.1", + "@nx/nx-linux-x64-gnu": "16.9.1", + "@nx/nx-linux-x64-musl": "16.9.1", + "@nx/nx-win32-arm64-msvc": "16.9.1", + "@nx/nx-win32-x64-msvc": "16.9.1" }, "peerDependencies": { - "@swc-node/register": "^1.4.2", - "@swc/core": "^1.2.173" + "@swc-node/register": "^1.6.7", + "@swc/core": "^1.3.85" }, "peerDependenciesMeta": { "@swc-node/register": { @@ -13406,22 +12999,6 @@ } } }, - "node_modules/nx/node_modules/fast-glob": { - "version": "3.2.7", - "resolved": "https://registry.npmjs.org/fast-glob/-/fast-glob-3.2.7.tgz", - "integrity": "sha512-rYGMRwip6lUMvYD3BTScMwT1HtAs2d71SMv66Vrxs0IekGZEjhM0pcMfjQPnknBt2zeCwQMEupiN02ZP4DiT1Q==", - "dev": true, - "dependencies": { - "@nodelib/fs.stat": "^2.0.2", - "@nodelib/fs.walk": "^1.2.3", - "glob-parent": "^5.1.2", - "merge2": "^1.3.0", - "micromatch": "^4.0.4" - }, - "engines": { - "node": ">=8" - } - }, "node_modules/nx/node_modules/glob": { "version": "7.1.4", "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.4.tgz", @@ -13439,18 +13016,6 @@ "node": "*" } }, - "node_modules/nx/node_modules/glob-parent": { - "version": "5.1.2", - "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz", - "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==", - "dev": true, - "dependencies": { - "is-glob": "^4.0.1" - }, - "engines": { - "node": ">= 6" - } - }, "node_modules/nx/node_modules/lru-cache": { "version": "6.0.0", "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz", @@ -14388,9 +13953,9 @@ } }, "node_modules/pure-rand": { - "version": "6.0.3", - "resolved": "https://registry.npmjs.org/pure-rand/-/pure-rand-6.0.3.tgz", - "integrity": "sha512-KddyFewCsO0j3+np81IQ+SweXLDnDQTs5s67BOnrYmYe/yNmUhttQyGsYzy8yUnoljGAQ9sl38YB4vH8ur7Y+w==", + "version": "6.0.4", + "resolved": "https://registry.npmjs.org/pure-rand/-/pure-rand-6.0.4.tgz", + "integrity": "sha512-LA0Y9kxMYv47GIPJy6MI84fqTd2HmYZI83W/kM/SkKfDlajnZYfmXFTxkbY+xSBPkLJxltMa9hIkmdc29eguMA==", "dev": true, "funding": [ { @@ -14525,19 +14090,19 @@ } }, "node_modules/read-package-json/node_modules/glob": { - "version": "10.3.4", - "resolved": "https://registry.npmjs.org/glob/-/glob-10.3.4.tgz", - "integrity": "sha512-6LFElP3A+i/Q8XQKEvZjkEWEOTgAIALR9AO2rwT8bgPhDd1anmqDJDZ6lLddI4ehxxxR1S5RIqKe1uapMQfYaQ==", + "version": "10.3.10", + "resolved": "https://registry.npmjs.org/glob/-/glob-10.3.10.tgz", + "integrity": "sha512-fa46+tv1Ak0UPK1TOy/pZrIybNNt4HCv7SDzwyfiOZkvZLEbjsZkJBPtDHVshZjbecAoAGSC20MjLDG/qr679g==", "dev": true, "dependencies": { "foreground-child": "^3.1.0", - "jackspeak": "^2.0.3", + "jackspeak": "^2.3.5", "minimatch": "^9.0.1", "minipass": "^5.0.0 || ^6.0.2 || ^7.0.0", "path-scurry": "^1.10.1" }, "bin": { - "glob": "dist/cjs/src/bin.js" + "glob": "dist/esm/bin.mjs" }, "engines": { "node": ">=16 || 14 >=14.17" @@ -14857,9 +14422,9 @@ } }, "node_modules/resolve": { - "version": "1.22.5", - "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.22.5.tgz", - "integrity": "sha512-qWhv7PF1V95QPvRoUGHxOtnAlEvlXBylMZcjUR9pAumMmveFtcHJRXGIr+TkjfNJVQypqv2qcDiiars2y1PsSg==", + "version": "1.22.6", + "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.22.6.tgz", + "integrity": "sha512-njhxM7mV12JfufShqGy3Rz8j11RPdLy4xi15UurGJeoHLfJpVXKdh3ueuOqbYUcDZnffr6X739JBo5LzyahEsw==", "dev": true, "dependencies": { "is-core-module": "^2.13.0", @@ -14960,15 +14525,15 @@ "dev": true }, "node_modules/rimraf": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-5.0.1.tgz", - "integrity": "sha512-OfFZdwtd3lZ+XZzYP/6gTACubwFcHdLRqS9UX3UwpU2dnGQYkPFISRwvM3w9IiB2w7bW5qGo/uAwE4SmXXSKvg==", + "version": "5.0.5", + "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-5.0.5.tgz", + "integrity": "sha512-CqDakW+hMe/Bz202FPEymy68P+G50RfMQK+Qo5YUqc9SPipvbGjCGKd0RSKEelbsfQuw3g5NZDSrlZZAJurH1A==", "dev": true, "dependencies": { - "glob": "^10.2.5" + "glob": "^10.3.7" }, "bin": { - "rimraf": "dist/cjs/src/bin.js" + "rimraf": "dist/esm/bin.mjs" }, "engines": { "node": ">=14" @@ -14987,19 +14552,19 @@ } }, "node_modules/rimraf/node_modules/glob": { - "version": "10.3.4", - "resolved": "https://registry.npmjs.org/glob/-/glob-10.3.4.tgz", - "integrity": "sha512-6LFElP3A+i/Q8XQKEvZjkEWEOTgAIALR9AO2rwT8bgPhDd1anmqDJDZ6lLddI4ehxxxR1S5RIqKe1uapMQfYaQ==", + "version": "10.3.10", + "resolved": "https://registry.npmjs.org/glob/-/glob-10.3.10.tgz", + "integrity": "sha512-fa46+tv1Ak0UPK1TOy/pZrIybNNt4HCv7SDzwyfiOZkvZLEbjsZkJBPtDHVshZjbecAoAGSC20MjLDG/qr679g==", "dev": true, "dependencies": { "foreground-child": "^3.1.0", - "jackspeak": "^2.0.3", + "jackspeak": "^2.3.5", "minimatch": "^9.0.1", "minipass": "^5.0.0 || ^6.0.2 || ^7.0.0", "path-scurry": "^1.10.1" }, "bin": { - "glob": "dist/cjs/src/bin.js" + "glob": "dist/esm/bin.mjs" }, "engines": { "node": ">=16 || 14 >=14.17" @@ -15097,12 +14662,6 @@ "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/safe-array-concat/node_modules/isarray": { - "version": "2.0.5", - "resolved": "https://registry.npmjs.org/isarray/-/isarray-2.0.5.tgz", - "integrity": "sha512-xHjhDr3cNBK0BzdUJSPXZntQUx/mwMS5Rw4A7lPJ90XGAO6ISP/ePDNuo0vhqOZU+UD5JoodwCAAoZQd3FeAKw==", - "dev": true - }, "node_modules/safe-buffer": { "version": "5.2.1", "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz", @@ -15337,6 +14896,15 @@ "type-detect": "4.0.8" } }, + "node_modules/sinon/node_modules/diff": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/diff/-/diff-5.1.0.tgz", + "integrity": "sha512-D+mk+qE8VC/PAUrlAU34N+VfXev0ghe5ywmpqrawphmVZc1bEfn56uo9qpyGp1p4xpzOHkSW4ztBd6L7Xx4ACw==", + "dev": true, + "engines": { + "node": ">=0.3.1" + } + }, "node_modules/sisteransi": { "version": "1.0.5", "resolved": "https://registry.npmjs.org/sisteransi/-/sisteransi-1.0.5.tgz", @@ -15474,9 +15042,9 @@ } }, "node_modules/spdx-license-ids": { - "version": "3.0.13", - "resolved": "https://registry.npmjs.org/spdx-license-ids/-/spdx-license-ids-3.0.13.tgz", - "integrity": "sha512-XkD+zwiqXHikFZm4AX/7JSCXA98U5Db4AFd5XUg/+9UNtnH75+Z9KxtpYiJZx36mUDVOwH83pl7yvCer6ewM3w==", + "version": "3.0.15", + "resolved": "https://registry.npmjs.org/spdx-license-ids/-/spdx-license-ids-3.0.15.tgz", + "integrity": "sha512-lpT8hSQp9jAKp9mhtBU4Xjon8LPGBvLIuBiSVhMEtmLecTh2mO0tlqrAMp47tBXzMr13NJMQ2lf7RpQGLJ3HsQ==", "dev": true }, "node_modules/split": { @@ -15940,6 +15508,12 @@ "xtend": "~4.0.1" } }, + "node_modules/through2/node_modules/isarray": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", + "integrity": "sha512-VLghIWNM6ELQzo7zwmcg0NmTVyWKYjvIeM83yjp0wRDTmUnrM678fQbcKBo6n2CJEF0szoG//ytg+TKla89ALQ==", + "dev": true + }, "node_modules/through2/node_modules/readable-stream": { "version": "2.3.8", "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.8.tgz", @@ -16158,15 +15732,6 @@ } } }, - "node_modules/ts-node/node_modules/diff": { - "version": "4.0.2", - "resolved": "https://registry.npmjs.org/diff/-/diff-4.0.2.tgz", - "integrity": "sha512-58lmxKSA4BNyLz+HHMUzlOEpg09FV+ev6ZMe3vJihgdxzgcwZ8VoEEPmALCZG9LmqfVoNMMKpttIYTVG6uDY7A==", - "dev": true, - "engines": { - "node": ">=0.3.1" - } - }, "node_modules/tsconfig-paths": { "version": "3.14.2", "resolved": "https://registry.npmjs.org/tsconfig-paths/-/tsconfig-paths-3.14.2.tgz", @@ -16476,9 +16041,9 @@ } }, "node_modules/update-browserslist-db": { - "version": "1.0.11", - "resolved": "https://registry.npmjs.org/update-browserslist-db/-/update-browserslist-db-1.0.11.tgz", - "integrity": "sha512-dCwEFf0/oT85M1fHBg4F0jtLwJrutGoHSQXCh7u4o2t1drG+c0a9Flnqww6XUKSfQMPpJBRjU8d4RXB09qtvaA==", + "version": "1.0.13", + "resolved": "https://registry.npmjs.org/update-browserslist-db/-/update-browserslist-db-1.0.13.tgz", + "integrity": "sha512-xebP81SNcPuNpPP3uzeW1NYXxI3rxyJzF3pD6sH4jE7o/IX+WtSpwnVU+qIsDPyk0d3hmFQ7mjqc6AtV604hbg==", "dev": true, "funding": [ { @@ -16999,17 +16564,29 @@ }, "packages/batch": { "name": "@aws-lambda-powertools/batch", +<<<<<<< HEAD "version": "1.14.0", +======= + "version": "1.13.1", +>>>>>>> 5838770e (chore: restore deps) "license": "MIT-0" }, "packages/commons": { "name": "@aws-lambda-powertools/commons", +<<<<<<< HEAD "version": "1.14.0", +======= + "version": "1.13.1", +>>>>>>> 5838770e (chore: restore deps) "license": "MIT-0" }, "packages/idempotency": { "name": "@aws-lambda-powertools/idempotency", +<<<<<<< HEAD "version": "1.14.0", +======= + "version": "1.13.1", +>>>>>>> 5838770e (chore: restore deps) "license": "MIT-0", "dependencies": { "@aws-lambda-powertools/commons": "^1.14.0", @@ -17041,14 +16618,13 @@ } } }, - "packages/idempotency/node_modules/@aws-lambda-powertools/commons": { - "version": "1.12.1", - "resolved": "https://registry.npmjs.org/@aws-lambda-powertools/commons/-/commons-1.12.1.tgz", - "integrity": "sha512-VChNfDUxxcB5KTfQPkJgxYihEZkrmeOzU9/A9FRBc+3v33EEM59T2pIgBkFy0VoINvGi3MoBEln/wyu2jV0ivA==" - }, "packages/logger": { "name": "@aws-lambda-powertools/logger", +<<<<<<< HEAD "version": "1.14.0", +======= + "version": "1.13.1", +>>>>>>> 5838770e (chore: restore deps) "license": "MIT-0", "dependencies": { "@aws-lambda-powertools/commons": "^1.14.0", @@ -17067,14 +16643,13 @@ } } }, - "packages/logger/node_modules/@aws-lambda-powertools/commons": { - "version": "1.12.1", - "resolved": "https://registry.npmjs.org/@aws-lambda-powertools/commons/-/commons-1.12.1.tgz", - "integrity": "sha512-VChNfDUxxcB5KTfQPkJgxYihEZkrmeOzU9/A9FRBc+3v33EEM59T2pIgBkFy0VoINvGi3MoBEln/wyu2jV0ivA==" - }, "packages/metrics": { "name": "@aws-lambda-powertools/metrics", +<<<<<<< HEAD "version": "1.14.0", +======= + "version": "1.13.1", +>>>>>>> 5838770e (chore: restore deps) "license": "MIT-0", "dependencies": { "@aws-lambda-powertools/commons": "^1.14.0" @@ -17094,14 +16669,13 @@ } } }, - "packages/metrics/node_modules/@aws-lambda-powertools/commons": { - "version": "1.12.1", - "resolved": "https://registry.npmjs.org/@aws-lambda-powertools/commons/-/commons-1.12.1.tgz", - "integrity": "sha512-VChNfDUxxcB5KTfQPkJgxYihEZkrmeOzU9/A9FRBc+3v33EEM59T2pIgBkFy0VoINvGi3MoBEln/wyu2jV0ivA==" - }, "packages/parameters": { "name": "@aws-lambda-powertools/parameters", +<<<<<<< HEAD "version": "1.14.0", +======= + "version": "1.13.1", +>>>>>>> 5838770e (chore: restore deps) "license": "MIT-0", "dependencies": { "@aws-lambda-powertools/commons": "^1.14.0", @@ -17145,14 +16719,13 @@ } } }, - "packages/parameters/node_modules/@aws-lambda-powertools/commons": { - "version": "1.12.1", - "resolved": "https://registry.npmjs.org/@aws-lambda-powertools/commons/-/commons-1.12.1.tgz", - "integrity": "sha512-VChNfDUxxcB5KTfQPkJgxYihEZkrmeOzU9/A9FRBc+3v33EEM59T2pIgBkFy0VoINvGi3MoBEln/wyu2jV0ivA==" - }, "packages/testing": { "name": "@aws-lambda-powertools/testing-utils", +<<<<<<< HEAD "version": "1.14.0", +======= + "version": "1.13.1", +>>>>>>> 5838770e (chore: restore deps) "license": "MIT-0", "dependencies": { "@aws-cdk/cli-lib-alpha": "^2.96.1-alpha.0", @@ -17164,7 +16737,11 @@ }, "packages/tracer": { "name": "@aws-lambda-powertools/tracer", +<<<<<<< HEAD "version": "1.14.0", +======= + "version": "1.13.1", +>>>>>>> 5838770e (chore: restore deps) "license": "MIT-0", "dependencies": { "@aws-lambda-powertools/commons": "^1.14.0", @@ -17187,11 +16764,6 @@ "optional": true } } - }, - "packages/tracer/node_modules/@aws-lambda-powertools/commons": { - "version": "1.12.1", - "resolved": "https://registry.npmjs.org/@aws-lambda-powertools/commons/-/commons-1.12.1.tgz", - "integrity": "sha512-VChNfDUxxcB5KTfQPkJgxYihEZkrmeOzU9/A9FRBc+3v33EEM59T2pIgBkFy0VoINvGi3MoBEln/wyu2jV0ivA==" } } -} \ No newline at end of file +} diff --git a/packages/logger/src/helpers.ts b/packages/logger/src/helpers.ts deleted file mode 100644 index dc1e94d45a..0000000000 --- a/packages/logger/src/helpers.ts +++ /dev/null @@ -1,12 +0,0 @@ -import { Logger } from '.'; -import { ConstructorOptions } from './types'; - -/** - * Create a new logger instance with the given options. - * - * @deprecated - This function will be removed in the next major release. Use the Logger class directly instead. - */ -const createLogger = (options: ConstructorOptions = {}): Logger => - new Logger(options); - -export { createLogger }; diff --git a/packages/logger/src/index.ts b/packages/logger/src/index.ts index caa720368d..43bcdb04e0 100644 --- a/packages/logger/src/index.ts +++ b/packages/logger/src/index.ts @@ -1,4 +1,3 @@ -export * from './helpers'; export * from './Logger'; export * from './middleware'; export * from './formatter'; diff --git a/packages/logger/tests/unit/Logger.test.ts b/packages/logger/tests/unit/Logger.test.ts index 33b5a5b026..b1b04f289d 100644 --- a/packages/logger/tests/unit/Logger.test.ts +++ b/packages/logger/tests/unit/Logger.test.ts @@ -8,9 +8,12 @@ import { Events as dummyEvent, LambdaInterface, } from '@aws-lambda-powertools/commons'; -import { createLogger, Logger } from '../../src'; -import { EnvironmentVariablesService } from '../../src/config'; -import { PowertoolsLogFormatter } from '../../src/formatter'; +import { Logger } from '../../src'; +import { + ConfigServiceInterface, + EnvironmentVariablesService, +} from '../../src/config'; +import { PowertoolsLogFormatter, LogFormatter } from '../../src/formatter'; import { ClassThatLogs, LogJsonIndent, @@ -48,6 +51,422 @@ describe('Class: Logger', () => { process.env = { ...ENVIRONMENT_VARIABLES }; }); + describe('Method: constructor', () => { + test('when no constructor parameters are set, returns a Logger instance with the options set in the environment variables', () => { + // Prepare + const loggerOptions = undefined; + + // Act + const logger = new Logger(loggerOptions); + + // Assess + expect(logger).toBeInstanceOf(Logger); + expect(logger).toEqual( + expect.objectContaining({ + logsSampled: false, + persistentLogAttributes: {}, + powertoolLogData: { + sampleRateValue: undefined, + awsRegion: 'eu-west-1', + environment: '', + serviceName: 'hello-world', + }, + envVarsService: expect.any(EnvironmentVariablesService), + customConfigService: undefined, + defaultServiceName: 'service_undefined', + logLevel: 8, + logFormatter: expect.any(PowertoolsLogFormatter), + }) + ); + }); + + test('when no parameters are set, returns a Logger instance with the correct properties', () => { + // Prepare + const loggerOptions: ConstructorOptions = { + logLevel: 'WARN', + serviceName: 'my-lambda-service', + sampleRateValue: 1, + logFormatter: new PowertoolsLogFormatter(), + customConfigService: new EnvironmentVariablesService(), + persistentLogAttributes: { + awsAccountId: '123456789', + }, + environment: 'prod', + }; + + // Act + const logger = new Logger(loggerOptions); + + // Assess + expect(logger).toBeInstanceOf(Logger); + expect(logger).toEqual({ + coldStart: true, + defaultServiceName: 'service_undefined', + customConfigService: expect.any(EnvironmentVariablesService), + envVarsService: expect.any(EnvironmentVariablesService), + logEvent: false, + logIndentation: 0, + logFormatter: expect.any(PowertoolsLogFormatter), + logLevel: 16, + console: expect.any(Console), + logLevelThresholds: { + ...logLevelThresholds, + }, + logsSampled: true, + persistentLogAttributes: { + awsAccountId: '123456789', + }, + powertoolLogData: { + awsRegion: 'eu-west-1', + environment: 'prod', + sampleRateValue: 1, + serviceName: 'my-lambda-service', + }, + }); + }); + + test('when no constructor parameters and no environment variables are set, returns a Logger instance with the default properties', () => { + // Prepare + const loggerOptions = undefined; + delete process.env.POWERTOOLS_SERVICE_NAME; + delete process.env.LOG_LEVEL; + + // Act + const logger = new Logger(loggerOptions); + + // Assess + expect(logger).toBeInstanceOf(Logger); + expect(logger).toEqual({ + coldStart: true, + customConfigService: undefined, + defaultServiceName: 'service_undefined', + envVarsService: expect.any(EnvironmentVariablesService), + logEvent: false, + logIndentation: 0, + logFormatter: expect.any(PowertoolsLogFormatter), + logLevel: 12, + console: expect.any(Console), + logLevelThresholds: { + ...logLevelThresholds, + }, + logsSampled: false, + persistentLogAttributes: {}, + powertoolLogData: { + awsRegion: 'eu-west-1', + environment: '', + sampleRateValue: undefined, + serviceName: 'service_undefined', + }, + }); + }); + + test('when a custom logFormatter is passed, returns a Logger instance with the correct properties', () => { + // Prepare + const loggerOptions: ConstructorOptions = { + logFormatter: expect.any(LogFormatter), + }; + + // Act + const logger = new Logger(loggerOptions); + + // Assess + expect(logger).toBeInstanceOf(Logger); + expect(logger).toEqual( + expect.objectContaining({ + logsSampled: false, + persistentLogAttributes: {}, + powertoolLogData: { + sampleRateValue: undefined, + awsRegion: 'eu-west-1', + environment: '', + serviceName: 'hello-world', + }, + envVarsService: expect.any(EnvironmentVariablesService), + customConfigService: undefined, + logLevel: 8, + logFormatter: expect.any(LogFormatter), + }) + ); + }); + + test('when a custom serviceName is passed, returns a Logger instance with the correct properties', () => { + // Prepare + const loggerOptions: ConstructorOptions = { + serviceName: 'my-backend-service', + }; + + // Act + const logger = new Logger(loggerOptions); + + // Assess + expect(logger).toBeInstanceOf(Logger); + expect(logger).toEqual( + expect.objectContaining({ + logsSampled: false, + persistentLogAttributes: {}, + powertoolLogData: { + sampleRateValue: undefined, + awsRegion: 'eu-west-1', + environment: '', + serviceName: 'my-backend-service', + }, + envVarsService: expect.any(EnvironmentVariablesService), + customConfigService: undefined, + logLevel: 8, + logFormatter: {}, + }) + ); + }); + + test('when a custom uppercase logLevel is passed, returns a Logger instance with the correct properties', () => { + // Prepare + const loggerOptions: ConstructorOptions = { + logLevel: 'ERROR', + }; + + // Act + const logger = new Logger(loggerOptions); + + // Assess + expect(logger).toBeInstanceOf(Logger); + expect(logger).toEqual( + expect.objectContaining({ + logsSampled: false, + persistentLogAttributes: {}, + powertoolLogData: { + sampleRateValue: undefined, + awsRegion: 'eu-west-1', + environment: '', + serviceName: 'hello-world', + }, + envVarsService: expect.any(EnvironmentVariablesService), + customConfigService: undefined, + logLevel: 20, + logFormatter: expect.any(PowertoolsLogFormatter), + }) + ); + }); + + test('when a custom lowercase logLevel is passed, returns a Logger instance with the correct properties', () => { + // Prepare + const loggerOptions: ConstructorOptions = { + logLevel: 'warn', + }; + + // Act + const logger = new Logger(loggerOptions); + + // Assess + expect(logger).toBeInstanceOf(Logger); + expect(logger).toEqual( + expect.objectContaining({ + logsSampled: false, + persistentLogAttributes: {}, + powertoolLogData: { + sampleRateValue: undefined, + awsRegion: 'eu-west-1', + environment: '', + serviceName: 'hello-world', + }, + envVarsService: expect.any(EnvironmentVariablesService), + customConfigService: undefined, + logLevel: 16, + logFormatter: expect.any(PowertoolsLogFormatter), + }) + ); + }); + + test('when no log level is set, returns a Logger instance with INFO level', () => { + // Prepare + const loggerOptions: ConstructorOptions = {}; + delete process.env.LOG_LEVEL; + + // Act + const logger = new Logger(loggerOptions); + + // Assess + expect(logger).toBeInstanceOf(Logger); + expect(logger).toEqual({ + coldStart: true, + customConfigService: undefined, + defaultServiceName: 'service_undefined', + envVarsService: expect.any(EnvironmentVariablesService), + logEvent: false, + logIndentation: 0, + logFormatter: expect.any(PowertoolsLogFormatter), + logLevel: 12, + console: expect.any(Console), + logLevelThresholds: { + ...logLevelThresholds, + }, + logsSampled: false, + persistentLogAttributes: {}, + powertoolLogData: { + awsRegion: 'eu-west-1', + environment: '', + sampleRateValue: undefined, + serviceName: 'hello-world', + }, + }); + }); + + test('when a custom sampleRateValue is passed, returns a Logger instance with the correct properties', () => { + // Prepare + const loggerOptions: ConstructorOptions = { + sampleRateValue: 1, + }; + + // Act + const logger = new Logger(loggerOptions); + + // Assess + expect(logger).toBeInstanceOf(Logger); + expect(logger).toEqual( + expect.objectContaining({ + logsSampled: true, + persistentLogAttributes: {}, + powertoolLogData: { + sampleRateValue: 1, + awsRegion: 'eu-west-1', + environment: '', + serviceName: 'hello-world', + }, + envVarsService: expect.any(EnvironmentVariablesService), + customConfigService: undefined, + logLevel: 8, + logFormatter: {}, + }) + ); + }); + + test('when a custom customConfigService is passed, returns a Logger instance with the correct properties', () => { + const configService: ConfigServiceInterface = { + get(name: string): string { + return `a-string-from-${name}`; + }, + getCurrentEnvironment(): string { + return 'dev'; + }, + getLogEvent(): boolean { + return true; + }, + getLogLevel(): string { + return 'INFO'; + }, + getSampleRateValue(): number | undefined { + return undefined; + }, + getServiceName(): string { + return 'my-backend-service'; + }, + isDevMode(): boolean { + return false; + }, + isValueTrue(): boolean { + return true; + }, + }; + // Prepare + const loggerOptions: ConstructorOptions = { + customConfigService: configService, + }; + + // Act + const logger = new Logger(loggerOptions); + + // Assess + expect(logger).toBeInstanceOf(Logger); + expect(logger).toEqual( + expect.objectContaining({ + logsSampled: false, + persistentLogAttributes: {}, + powertoolLogData: { + sampleRateValue: undefined, + awsRegion: 'eu-west-1', + environment: 'dev', + serviceName: 'my-backend-service', + }, + envVarsService: expect.any(EnvironmentVariablesService), + customConfigService: configService, + logLevel: 12, + logFormatter: {}, + }) + ); + }); + + test('when custom persistentLogAttributes is passed, returns a Logger instance with the correct properties', () => { + // Prepare + const loggerOptions: ConstructorOptions = { + persistentLogAttributes: { + aws_account_id: '123456789012', + aws_region: 'eu-west-1', + logger: { + name: 'aws-lambda-powertool-typescript', + version: '0.2.4', + }, + }, + }; + + // Act + const logger = new Logger(loggerOptions); + + // Assess + expect(logger).toBeInstanceOf(Logger); + expect(logger).toEqual( + expect.objectContaining({ + logsSampled: false, + persistentLogAttributes: { + aws_account_id: '123456789012', + aws_region: 'eu-west-1', + logger: { + name: 'aws-lambda-powertool-typescript', + version: '0.2.4', + }, + }, + powertoolLogData: { + sampleRateValue: undefined, + awsRegion: 'eu-west-1', + environment: '', + serviceName: 'hello-world', + }, + envVarsService: expect.any(EnvironmentVariablesService), + customConfigService: undefined, + logLevel: 8, + logFormatter: {}, + }) + ); + }); + + test('when a custom environment is passed, returns a Logger instance with the correct properties', () => { + // Prepare + const loggerOptions: ConstructorOptions = { + environment: 'dev', + }; + + // Act + const logger = new Logger(loggerOptions); + + // Assess + expect(logger).toBeInstanceOf(Logger); + expect(logger).toEqual( + expect.objectContaining({ + logsSampled: false, + persistentLogAttributes: {}, + powertoolLogData: { + sampleRateValue: undefined, + awsRegion: 'eu-west-1', + environment: 'dev', + serviceName: 'hello-world', + }, + envVarsService: expect.any(EnvironmentVariablesService), + customConfigService: undefined, + logLevel: 8, + logFormatter: {}, + }) + ); + }); + }); + describe.each([ [ 'debug', @@ -82,7 +501,7 @@ describe('Class: Logger', () => { describe('Feature: log level', () => { test(`when the level is DEBUG, it ${debugAction} print to stdout`, () => { // Prepare - const logger: Logger = createLogger({ + const logger = new Logger({ logLevel: 'DEBUG', }); const consoleSpy = jest @@ -110,7 +529,7 @@ describe('Class: Logger', () => { test(`when the log level is INFO, it ${infoAction} print to stdout`, () => { // Prepare - const logger: Logger = createLogger({ + const logger = new Logger({ logLevel: 'INFO', }); const consoleSpy = jest @@ -138,7 +557,7 @@ describe('Class: Logger', () => { test(`when the log level is WARN, it ${warnAction} print to stdout`, () => { // Prepare - const logger: Logger = createLogger({ + const logger = new Logger({ logLevel: 'WARN', }); const consoleSpy = jest @@ -166,7 +585,7 @@ describe('Class: Logger', () => { test(`when the log level is ERROR, it ${errorAction} print to stdout`, () => { // Prepare - const logger: Logger = createLogger({ + const logger = new Logger({ logLevel: 'ERROR', }); const consoleSpy = jest @@ -194,7 +613,7 @@ describe('Class: Logger', () => { test('when the log level is SILENT, it DOES NOT print to stdout', () => { // Prepare - const logger: Logger = createLogger({ + const logger = new Logger({ logLevel: 'SILENT', }); const consoleSpy = jest @@ -237,7 +656,7 @@ describe('Class: Logger', () => { describe('Feature: sample rate', () => { test('when the log level is higher and the current Lambda invocation IS NOT sampled for logging, it DOES NOT print to stdout', () => { // Prepare - const logger: Logger = createLogger({ + const logger = new Logger({ logLevel: 'SILENT', sampleRateValue: 0, }); @@ -256,7 +675,7 @@ describe('Class: Logger', () => { test('when the log level is higher and the current Lambda invocation IS sampled for logging, it DOES print to stdout', () => { // Prepare - const logger: Logger = createLogger({ + const logger = new Logger({ logLevel: 'SILENT', sampleRateValue: 1, }); @@ -292,7 +711,7 @@ describe('Class: Logger', () => { ' log', () => { // Prepare - const logger: Logger = createLogger(); + const logger = new Logger(); const consoleSpy = jest .spyOn(logger['console'], getConsoleMethod(methodOfLogger)) .mockImplementation(); @@ -323,10 +742,9 @@ describe('Class: Logger', () => { ' log', () => { // Prepare - const logger: Logger & { addContext: (context: Context) => void } = - createLogger({ - logLevel: 'DEBUG', - }); + const logger = new Logger({ + logLevel: 'DEBUG', + }); logger.addContext(context); const consoleSpy = jest .spyOn(logger['console'], getConsoleMethod(methodOfLogger)) @@ -362,7 +780,7 @@ describe('Class: Logger', () => { describe('Feature: ephemeral log attributes', () => { test('when added, they should appear in that log item only', () => { // Prepare - const logger: Logger = createLogger({ + const logger = new Logger({ logLevel: 'DEBUG', }); const consoleSpy = jest @@ -568,7 +986,7 @@ describe('Class: Logger', () => { describe('Feature: persistent log attributes', () => { test('when persistent log attributes are added to the Logger instance, they should appear in all logs printed by the instance', () => { // Prepare - const logger: Logger = createLogger({ + const logger = new Logger({ logLevel: 'DEBUG', persistentLogAttributes: { aws_account_id: '123456789012', @@ -604,7 +1022,7 @@ describe('Class: Logger', () => { describe('Feature: X-Ray Trace ID injection', () => { test('when the `_X_AMZN_TRACE_ID` environment variable is set it parses it correctly and adds the Trace ID to the log', () => { // Prepare - const logger: Logger = createLogger({ + const logger = new Logger({ logLevel: 'DEBUG', }); const consoleSpy = jest @@ -633,7 +1051,7 @@ describe('Class: Logger', () => { test('when the `_X_AMZN_TRACE_ID` environment variable is NOT set it parses it correctly and adds the Trace ID to the log', () => { // Prepare delete process.env._X_AMZN_TRACE_ID; - const logger: Logger = createLogger({ + const logger = new Logger({ logLevel: 'DEBUG', }); const consoleSpy = jest @@ -662,7 +1080,7 @@ describe('Class: Logger', () => { describe('Feature: handle safely unexpected errors', () => { test('when a logged item references itself, the logger ignores the keys that cause a circular reference', () => { // Prepare - const logger: Logger = createLogger({ + const logger = new Logger({ logLevel: 'DEBUG', }); const consoleSpy = jest diff --git a/packages/logger/tests/unit/helpers.test.ts b/packages/logger/tests/unit/helpers.test.ts deleted file mode 100644 index 8ddda59475..0000000000 --- a/packages/logger/tests/unit/helpers.test.ts +++ /dev/null @@ -1,450 +0,0 @@ -/** - * Test Logger helpers - * - * @group unit/logger/all - */ -import { Console } from 'console'; -import { - ConfigServiceInterface, - EnvironmentVariablesService, -} from '../../src/config'; -import { LogFormatter, PowertoolsLogFormatter } from '../../src/formatter'; -import { ConstructorOptions, LogLevelThresholds } from '../../src/types'; -import { createLogger, Logger } from './../../src'; - -describe('Helper: createLogger function', () => { - const ENVIRONMENT_VARIABLES = process.env; - const logLevelThresholds: LogLevelThresholds = { - DEBUG: 8, - INFO: 12, - WARN: 16, - ERROR: 20, - CRITICAL: 24, - SILENT: 28, - }; - - beforeEach(() => { - jest.resetModules(); - process.env = { ...ENVIRONMENT_VARIABLES }; - }); - - afterAll(() => { - process.env = ENVIRONMENT_VARIABLES; - }); - - describe('LoggerOptions constructor parameters', () => { - test('when no constructor parameters are set, returns a Logger instance with the options set in the environment variables', () => { - // Prepare - const loggerOptions = undefined; - - // Act - const logger = createLogger(loggerOptions); - - // Assess - expect(logger).toBeInstanceOf(Logger); - expect(logger).toEqual( - expect.objectContaining({ - logsSampled: false, - persistentLogAttributes: {}, - powertoolLogData: { - sampleRateValue: undefined, - awsRegion: 'eu-west-1', - environment: '', - serviceName: 'hello-world', - }, - envVarsService: expect.any(EnvironmentVariablesService), - customConfigService: undefined, - defaultServiceName: 'service_undefined', - logLevel: 8, - logFormatter: expect.any(PowertoolsLogFormatter), - }) - ); - }); - - test('when no parameters are set, returns a Logger instance with the correct properties', () => { - // Prepare - const loggerOptions: ConstructorOptions = { - logLevel: 'WARN', - serviceName: 'my-lambda-service', - sampleRateValue: 1, - logFormatter: new PowertoolsLogFormatter(), - customConfigService: new EnvironmentVariablesService(), - persistentLogAttributes: { - awsAccountId: '123456789', - }, - environment: 'prod', - }; - - // Act - const logger = createLogger(loggerOptions); - - // Assess - expect(logger).toBeInstanceOf(Logger); - expect(logger).toEqual({ - coldStart: true, - defaultServiceName: 'service_undefined', - customConfigService: expect.any(EnvironmentVariablesService), - envVarsService: expect.any(EnvironmentVariablesService), - logEvent: false, - logIndentation: 0, - logFormatter: expect.any(PowertoolsLogFormatter), - logLevel: 16, - console: expect.any(Console), - logLevelThresholds: { - ...logLevelThresholds, - }, - logsSampled: true, - persistentLogAttributes: { - awsAccountId: '123456789', - }, - powertoolLogData: { - awsRegion: 'eu-west-1', - environment: 'prod', - sampleRateValue: 1, - serviceName: 'my-lambda-service', - }, - }); - }); - - test('when no constructor parameters and no environment variables are set, returns a Logger instance with the default properties', () => { - // Prepare - const loggerOptions = undefined; - delete process.env.POWERTOOLS_SERVICE_NAME; - delete process.env.LOG_LEVEL; - - // Act - const logger = createLogger(loggerOptions); - - // Assess - expect(logger).toBeInstanceOf(Logger); - expect(logger).toEqual({ - coldStart: true, - customConfigService: undefined, - defaultServiceName: 'service_undefined', - envVarsService: expect.any(EnvironmentVariablesService), - logEvent: false, - logIndentation: 0, - logFormatter: expect.any(PowertoolsLogFormatter), - logLevel: 12, - console: expect.any(Console), - logLevelThresholds: { - ...logLevelThresholds, - }, - logsSampled: false, - persistentLogAttributes: {}, - powertoolLogData: { - awsRegion: 'eu-west-1', - environment: '', - sampleRateValue: undefined, - serviceName: 'service_undefined', - }, - }); - }); - - test('when a custom logFormatter is passed, returns a Logger instance with the correct properties', () => { - // Prepare - const loggerOptions: ConstructorOptions = { - logFormatter: expect.any(LogFormatter), - }; - - // Act - const logger = createLogger(loggerOptions); - - // Assess - expect(logger).toBeInstanceOf(Logger); - expect(logger).toEqual( - expect.objectContaining({ - logsSampled: false, - persistentLogAttributes: {}, - powertoolLogData: { - sampleRateValue: undefined, - awsRegion: 'eu-west-1', - environment: '', - serviceName: 'hello-world', - }, - envVarsService: expect.any(EnvironmentVariablesService), - customConfigService: undefined, - logLevel: 8, - logFormatter: expect.any(LogFormatter), - }) - ); - }); - - test('when a custom serviceName is passed, returns a Logger instance with the correct properties', () => { - // Prepare - const loggerOptions: ConstructorOptions = { - serviceName: 'my-backend-service', - }; - - // Act - const logger = createLogger(loggerOptions); - - // Assess - expect(logger).toBeInstanceOf(Logger); - expect(logger).toEqual( - expect.objectContaining({ - logsSampled: false, - persistentLogAttributes: {}, - powertoolLogData: { - sampleRateValue: undefined, - awsRegion: 'eu-west-1', - environment: '', - serviceName: 'my-backend-service', - }, - envVarsService: expect.any(EnvironmentVariablesService), - customConfigService: undefined, - logLevel: 8, - logFormatter: {}, - }) - ); - }); - - test('when a custom uppercase logLevel is passed, returns a Logger instance with the correct properties', () => { - // Prepare - const loggerOptions: ConstructorOptions = { - logLevel: 'ERROR', - }; - - // Act - const logger = createLogger(loggerOptions); - - // Assess - expect(logger).toBeInstanceOf(Logger); - expect(logger).toEqual( - expect.objectContaining({ - logsSampled: false, - persistentLogAttributes: {}, - powertoolLogData: { - sampleRateValue: undefined, - awsRegion: 'eu-west-1', - environment: '', - serviceName: 'hello-world', - }, - envVarsService: expect.any(EnvironmentVariablesService), - customConfigService: undefined, - logLevel: 20, - logFormatter: expect.any(PowertoolsLogFormatter), - }) - ); - }); - - test('when a custom lowercase logLevel is passed, returns a Logger instance with the correct properties', () => { - // Prepare - const loggerOptions: ConstructorOptions = { - logLevel: 'warn', - }; - - // Act - const logger = createLogger(loggerOptions); - - // Assess - expect(logger).toBeInstanceOf(Logger); - expect(logger).toEqual( - expect.objectContaining({ - logsSampled: false, - persistentLogAttributes: {}, - powertoolLogData: { - sampleRateValue: undefined, - awsRegion: 'eu-west-1', - environment: '', - serviceName: 'hello-world', - }, - envVarsService: expect.any(EnvironmentVariablesService), - customConfigService: undefined, - logLevel: 16, - logFormatter: expect.any(PowertoolsLogFormatter), - }) - ); - }); - - test('when no log level is set, returns a Logger instance with INFO level', () => { - // Prepare - const loggerOptions: ConstructorOptions = {}; - delete process.env.LOG_LEVEL; - - // Act - const logger = createLogger(loggerOptions); - - // Assess - expect(logger).toBeInstanceOf(Logger); - expect(logger).toEqual({ - coldStart: true, - customConfigService: undefined, - defaultServiceName: 'service_undefined', - envVarsService: expect.any(EnvironmentVariablesService), - logEvent: false, - logIndentation: 0, - logFormatter: expect.any(PowertoolsLogFormatter), - logLevel: 12, - console: expect.any(Console), - logLevelThresholds: { - ...logLevelThresholds, - }, - logsSampled: false, - persistentLogAttributes: {}, - powertoolLogData: { - awsRegion: 'eu-west-1', - environment: '', - sampleRateValue: undefined, - serviceName: 'hello-world', - }, - }); - }); - - test('when a custom sampleRateValue is passed, returns a Logger instance with the correct properties', () => { - // Prepare - const loggerOptions: ConstructorOptions = { - sampleRateValue: 1, - }; - - // Act - const logger = createLogger(loggerOptions); - - // Assess - expect(logger).toBeInstanceOf(Logger); - expect(logger).toEqual( - expect.objectContaining({ - logsSampled: true, - persistentLogAttributes: {}, - powertoolLogData: { - sampleRateValue: 1, - awsRegion: 'eu-west-1', - environment: '', - serviceName: 'hello-world', - }, - envVarsService: expect.any(EnvironmentVariablesService), - customConfigService: undefined, - logLevel: 8, - logFormatter: {}, - }) - ); - }); - - test('when a custom customConfigService is passed, returns a Logger instance with the correct properties', () => { - const configService: ConfigServiceInterface = { - get(name: string): string { - return `a-string-from-${name}`; - }, - getCurrentEnvironment(): string { - return 'dev'; - }, - getLogEvent(): boolean { - return true; - }, - getLogLevel(): string { - return 'INFO'; - }, - getSampleRateValue(): number | undefined { - return undefined; - }, - getServiceName(): string { - return 'my-backend-service'; - }, - isDevMode(): boolean { - return false; - }, - isValueTrue(): boolean { - return true; - }, - }; - // Prepare - const loggerOptions: ConstructorOptions = { - customConfigService: configService, - }; - - // Act - const logger = createLogger(loggerOptions); - - // Assess - expect(logger).toBeInstanceOf(Logger); - expect(logger).toEqual( - expect.objectContaining({ - logsSampled: false, - persistentLogAttributes: {}, - powertoolLogData: { - sampleRateValue: undefined, - awsRegion: 'eu-west-1', - environment: 'dev', - serviceName: 'my-backend-service', - }, - envVarsService: expect.any(EnvironmentVariablesService), - customConfigService: configService, - logLevel: 12, - logFormatter: {}, - }) - ); - }); - - test('when custom persistentLogAttributes is passed, returns a Logger instance with the correct properties', () => { - // Prepare - const loggerOptions: ConstructorOptions = { - persistentLogAttributes: { - aws_account_id: '123456789012', - aws_region: 'eu-west-1', - logger: { - name: 'aws-lambda-powertool-typescript', - version: '0.2.4', - }, - }, - }; - - // Act - const logger = createLogger(loggerOptions); - - // Assess - expect(logger).toBeInstanceOf(Logger); - expect(logger).toEqual( - expect.objectContaining({ - logsSampled: false, - persistentLogAttributes: { - aws_account_id: '123456789012', - aws_region: 'eu-west-1', - logger: { - name: 'aws-lambda-powertool-typescript', - version: '0.2.4', - }, - }, - powertoolLogData: { - sampleRateValue: undefined, - awsRegion: 'eu-west-1', - environment: '', - serviceName: 'hello-world', - }, - envVarsService: expect.any(EnvironmentVariablesService), - customConfigService: undefined, - logLevel: 8, - logFormatter: {}, - }) - ); - }); - - test('when a custom environment is passed, returns a Logger instance with the correct properties', () => { - // Prepare - const loggerOptions: ConstructorOptions = { - environment: 'dev', - }; - - // Act - const logger = createLogger(loggerOptions); - - // Assess - expect(logger).toBeInstanceOf(Logger); - expect(logger).toEqual( - expect.objectContaining({ - logsSampled: false, - persistentLogAttributes: {}, - powertoolLogData: { - sampleRateValue: undefined, - awsRegion: 'eu-west-1', - environment: 'dev', - serviceName: 'hello-world', - }, - envVarsService: expect.any(EnvironmentVariablesService), - customConfigService: undefined, - logLevel: 8, - logFormatter: {}, - }) - ); - }); - }); -}); diff --git a/packages/tracer/src/helpers.ts b/packages/tracer/src/helpers.ts deleted file mode 100644 index 48fc9eda68..0000000000 --- a/packages/tracer/src/helpers.ts +++ /dev/null @@ -1,12 +0,0 @@ -import { Tracer } from '.'; -import type { TracerOptions } from './types'; - -/** - * Create a new tracer instance with the given options. - * - * @deprecated - This function will be removed in the next major release. Use the Tracer class directly instead. - */ -const createTracer = (options: TracerOptions = {}): Tracer => - new Tracer(options); - -export { createTracer }; diff --git a/packages/tracer/src/index.ts b/packages/tracer/src/index.ts index 1303ff1fb2..4d7f09185e 100644 --- a/packages/tracer/src/index.ts +++ b/packages/tracer/src/index.ts @@ -1,4 +1,3 @@ -export * from './helpers'; export * from './Tracer'; export * from './TracerInterface'; export * from './middleware/middy'; diff --git a/packages/tracer/tests/unit/Tracer.test.ts b/packages/tracer/tests/unit/Tracer.test.ts index e4a9db93af..e08a888457 100644 --- a/packages/tracer/tests/unit/Tracer.test.ts +++ b/packages/tracer/tests/unit/Tracer.test.ts @@ -16,6 +16,7 @@ import { Subsegment, } from 'aws-xray-sdk-core'; import { ProviderServiceInterface } from '../../src/provider'; +import { ConfigServiceInterface } from 'packages/tracer/src/config'; type CaptureAsyncFuncMock = jest.SpyInstance< unknown, @@ -60,6 +61,306 @@ describe('Class: Tracer', () => { process.env = ENVIRONMENT_VARIABLES; }); + describe('Method: constructor', () => { + it('instantiates with default settings when no option is passed', () => { + // Prepare & Act + const tracer = new Tracer(undefined); + + // Assess + expect(tracer).toBeInstanceOf(Tracer); + expect(tracer).toEqual( + expect.objectContaining({ + tracingEnabled: true, + serviceName: 'hello-world', + captureHTTPsRequests: true, + }) + ); + }); + + it('uses the provided options when passed ', () => { + // Prepare + const tracerOptions = { + enabled: false, + serviceName: 'my-lambda-service', + captureHTTPsRequests: false, + }; + + // Act + const tracer = new Tracer(tracerOptions); + + // Assess + expect(tracer).toBeInstanceOf(Tracer); + expect(tracer).toEqual( + expect.objectContaining({ + tracingEnabled: false, + serviceName: 'my-lambda-service', + captureHTTPsRequests: false, + }) + ); + }); + + it('uses the default service name when an invalid one is passed', () => { + // Prepare + const tracerOptions = { + serviceName: '', + }; + + // Act + const tracer = new Tracer(tracerOptions); + + // Assess + expect(tracer).toBeInstanceOf(Tracer); + expect(tracer).toEqual( + expect.objectContaining({ + tracingEnabled: true, + serviceName: 'hello-world', + captureHTTPsRequests: true, + }) + ); + }); + + it('uses the custom config service when one is passed', () => { + // Prepare + const configService: ConfigServiceInterface = { + get(name: string): string { + return `a-string-from-${name}`; + }, + getCaptureHTTPsRequests(): string { + return 'false'; + }, + getTracingEnabled(): string { + return 'false'; + }, + getTracingCaptureResponse(): string { + return 'false'; + }, + getTracingCaptureError(): string { + return 'false'; + }, + getServiceName(): string { + return 'my-backend-service'; + }, + }; + + // Act + const tracer = new Tracer({ + customConfigService: configService, + }); + + // Assess + expect(tracer).toBeInstanceOf(Tracer); + expect(tracer).toEqual( + expect.objectContaining({ + customConfigService: configService, + tracingEnabled: false, + serviceName: 'my-backend-service', + captureHTTPsRequests: false, + }) + ); + }); + + it('sets captureHTTPsGlobal to true by default when tracing is enabled', () => { + // Prepare + const tracerOptions = { + enabled: true, + }; + + // Act + const tracer = new Tracer(tracerOptions); + + // Assess + expect(tracer).toBeInstanceOf(Tracer); + expect(tracer).toEqual( + expect.objectContaining({ + tracingEnabled: true, + captureHTTPsRequests: true, + }) + ); + }); + }); + + describe('Environment Variables configs', () => { + test('when AWS_EXECUTION_ENV environment variable is equal to AWS_Lambda_amplify-mock, tracing is disabled', () => { + // Prepare + process.env.AWS_EXECUTION_ENV = 'AWS_Lambda_amplify-mock'; + + // Act + const tracer = new Tracer(); + + // Assess + expect(tracer).toEqual( + expect.objectContaining({ + tracingEnabled: false, + }) + ); + }); + + test('when AWS_SAM_LOCAL environment variable is set, tracing is disabled', () => { + // Prepare + process.env.AWS_SAM_LOCAL = 'true'; + + // Act + const tracer = new Tracer(); + + // Assess + expect(tracer).toEqual( + expect.objectContaining({ + tracingEnabled: false, + }) + ); + }); + + test('when AWS_EXECUTION_ENV environment variable is set, tracing is enabled', () => { + // Prepare + process.env.AWS_EXECUTION_ENV = 'nodejs16.x'; + + // Act + const tracer = new Tracer(); + + // Assess + expect(tracer).toEqual( + expect.objectContaining({ + tracingEnabled: true, + }) + ); + }); + + test('when AWS_EXECUTION_ENV environment variable is NOT set, tracing is disabled', () => { + // Prepare + delete process.env.AWS_EXECUTION_ENV; + + // Act + const tracer = new Tracer(); + + // Assess + expect(tracer).toEqual( + expect.objectContaining({ + tracingEnabled: false, + }) + ); + }); + + test('when POWERTOOLS_TRACE_ENABLED environment variable is set, a tracer with tracing disabled is returned', () => { + // Prepare + process.env.POWERTOOLS_TRACE_ENABLED = 'false'; + + // Act + const tracer = new Tracer(); + + // Assess + expect(tracer).toEqual( + expect.objectContaining({ + tracingEnabled: false, + }) + ); + }); + + test('when POWERTOOLS_SERVICE_NAME environment variable is set, a tracer with the correct serviceName is returned', () => { + // Prepare + process.env.POWERTOOLS_SERVICE_NAME = 'my-backend-service'; + + // Act + const tracer = new Tracer(); + + // Assess + expect(tracer).toEqual( + expect.objectContaining({ + serviceName: 'my-backend-service', + }) + ); + }); + + test('when POWERTOOLS_TRACER_CAPTURE_RESPONSE environment variable is set, a tracer with captureResponse disabled is returned', () => { + // Prepare + process.env.POWERTOOLS_TRACER_CAPTURE_RESPONSE = 'false'; + + // Act + const tracer = new Tracer(); + + // Assess + expect(tracer).toEqual( + expect.objectContaining({ + captureResponse: false, + }) + ); + }); + + test('when POWERTOOLS_TRACER_CAPTURE_RESPONSE environment variable is set to invalid value, a tracer with captureResponse enabled is returned', () => { + // Prepare + process.env.POWERTOOLS_TRACER_CAPTURE_RESPONSE = ''; + + // Act + const tracer = new Tracer(); + + // Assess + expect(tracer).toEqual( + expect.objectContaining({ + captureResponse: true, + }) + ); + }); + + test('when POWERTOOLS_TRACER_CAPTURE_ERROR environment variable is set, a tracer with captureError disabled is returned', () => { + // Prepare + process.env.POWERTOOLS_TRACER_CAPTURE_ERROR = 'false'; + + // Act + const tracer = new Tracer(); + + // Assess + expect(tracer).toEqual( + expect.objectContaining({ + captureError: false, + }) + ); + }); + + test('when POWERTOOLS_TRACER_CAPTURE_ERROR environment variable is set to invalid value, a tracer with captureError enabled is returned', () => { + // Prepare + process.env.POWERTOOLS_TRACER_CAPTURE_ERROR = ''; + + // Act + const tracer = new Tracer(); + + // Assess + expect(tracer).toEqual( + expect.objectContaining({ + captureError: true, + }) + ); + }); + + test('when POWERTOOLS_TRACER_CAPTURE_HTTPS_REQUESTS environment variable is set, captureHTTPsGlobal is called', () => { + // Prepare + process.env.POWERTOOLS_TRACER_CAPTURE_HTTPS_REQUESTS = 'false'; + + // Act + const tracer = new Tracer(); + + // Assess + expect(tracer).toEqual( + expect.objectContaining({ + captureHTTPsRequests: false, + }) + ); + }); + + test('when POWERTOOLS_TRACER_CAPTURE_HTTPS_REQUESTS environment variable is set to invalid value, captureHTTPsGlobal is called', () => { + // Prepare + process.env.POWERTOOLS_TRACER_CAPTURE_HTTPS_REQUESTS = ''; + + // Act + const tracer = new Tracer(); + + // Assess + expect(tracer).toEqual( + expect.objectContaining({ + captureHTTPsRequests: true, + }) + ); + }); + }); + describe('Method: annotateColdStart', () => { test('when called while tracing is disabled, it does nothing', () => { // Prepare diff --git a/packages/tracer/tests/unit/helpers.test.ts b/packages/tracer/tests/unit/helpers.test.ts deleted file mode 100644 index cb2394a875..0000000000 --- a/packages/tracer/tests/unit/helpers.test.ts +++ /dev/null @@ -1,386 +0,0 @@ -/** - * Test Tracer helpers - * - * @group unit/tracer/all - */ - -import { ConfigServiceInterface } from '../../src/config'; -import { TracerOptions } from '../../src/types'; -import { createTracer, Tracer } from './../../src'; - -describe('Helper: createTracer function', () => { - const ENVIRONMENT_VARIABLES = process.env; - - beforeEach(() => { - jest.resetModules(); - process.env = { ...ENVIRONMENT_VARIABLES }; - }); - - afterAll(() => { - process.env = ENVIRONMENT_VARIABLES; - }); - - describe('TracerOptions parameters', () => { - test('when no tracer options are passed, returns a Tracer instance with the correct proprieties', () => { - // Prepare - const tracerOptions = undefined; - - // Act - const tracer = createTracer(tracerOptions); - - // Assess - expect(tracer).toBeInstanceOf(Tracer); - expect(tracer).toEqual( - expect.objectContaining({ - tracingEnabled: true, - serviceName: 'hello-world', - captureHTTPsRequests: true, - }) - ); - }); - - test('when all tracer options are passed, returns a Tracer instance with the correct properties', () => { - // Prepare - const tracerOptions = { - enabled: false, - serviceName: 'my-lambda-service', - captureHTTPsRequests: false, - }; - - // Act - const tracer = createTracer(tracerOptions); - - // Assess - expect(tracer).toBeInstanceOf(Tracer); - expect(tracer).toEqual( - expect.objectContaining({ - tracingEnabled: false, - serviceName: 'my-lambda-service', - captureHTTPsRequests: false, - }) - ); - }); - - test('when a custom serviceName is passed, returns a Tracer instance with the correct properties', () => { - // Prepare - const tracerOptions = { - serviceName: 'my-lambda-service', - }; - - // Act - const tracer = createTracer(tracerOptions); - - // Assess - expect(tracer).toBeInstanceOf(Tracer); - expect(tracer).toEqual( - expect.objectContaining({ - tracingEnabled: true, - serviceName: 'my-lambda-service', - captureHTTPsRequests: true, - }) - ); - }); - - test('when a custom, but invalid, serviceName is passed, returns a Tracer instance with the correct properties', () => { - // Prepare - const tracerOptions = { - serviceName: '', - }; - - // Act - const tracer = createTracer(tracerOptions); - - // Assess - expect(tracer).toBeInstanceOf(Tracer); - expect(tracer).toEqual( - expect.objectContaining({ - tracingEnabled: true, - serviceName: 'hello-world', - captureHTTPsRequests: true, - }) - ); - }); - - test('when (tracing) disabled is passed, returns a Tracer instance with the correct properties', () => { - // Prepare - const tracerOptions = { - enabled: false, - }; - - // Act - const tracer = createTracer(tracerOptions); - - // Assess - expect(tracer).toBeInstanceOf(Tracer); - expect(tracer).toEqual( - expect.objectContaining({ - tracingEnabled: false, - serviceName: 'hello-world', - captureHTTPsRequests: true, - }) - ); - }); - - test('when a custom customConfigService is passed, returns a Logger instance with the correct proprieties', () => { - const configService: ConfigServiceInterface = { - get(name: string): string { - return `a-string-from-${name}`; - }, - getCaptureHTTPsRequests(): string { - return 'false'; - }, - getTracingEnabled(): string { - return 'false'; - }, - getTracingCaptureResponse(): string { - return 'false'; - }, - getTracingCaptureError(): string { - return 'false'; - }, - getServiceName(): string { - return 'my-backend-service'; - }, - }; - // Prepare - const tracerOptions: TracerOptions = { - customConfigService: configService, - }; - - // Act - const tracer = createTracer(tracerOptions); - - // Assess - expect(tracer).toBeInstanceOf(Tracer); - expect(tracer).toEqual( - expect.objectContaining({ - customConfigService: configService, - tracingEnabled: false, - serviceName: 'my-backend-service', - captureHTTPsRequests: false, - }) - ); - }); - - test('when tracing is enabled and patching of http requests is opted-out, captureHTTPsRequests is false', () => { - // Prepare - const tracerOptions = { - enabled: true, - captureHTTPsRequests: false, - }; - - // Act - const tracer = createTracer(tracerOptions); - - // Assess - expect(tracer).toBeInstanceOf(Tracer); - expect(tracer).toEqual( - expect.objectContaining({ - tracingEnabled: true, - captureHTTPsRequests: false, - }) - ); - }); - - test('when tracing is enabled captureHTTPsGlobal is true', () => { - // Prepare - const tracerOptions = { - enabled: true, - }; - - // Act - const tracer = createTracer(tracerOptions); - - // Assess - expect(tracer).toBeInstanceOf(Tracer); - expect(tracer).toEqual( - expect.objectContaining({ - tracingEnabled: true, - captureHTTPsRequests: true, - }) - ); - }); - }); - - describe('Environment Variables configs', () => { - test('when AWS_EXECUTION_ENV environment variable is equal to AWS_Lambda_amplify-mock, tracing is disabled', () => { - // Prepare - process.env.AWS_EXECUTION_ENV = 'AWS_Lambda_amplify-mock'; - - // Act - const tracer = createTracer(); - - // Assess - expect(tracer).toEqual( - expect.objectContaining({ - tracingEnabled: false, - }) - ); - }); - - test('when AWS_SAM_LOCAL environment variable is set, tracing is disabled', () => { - // Prepare - process.env.AWS_SAM_LOCAL = 'true'; - - // Act - const tracer = createTracer(); - - // Assess - expect(tracer).toEqual( - expect.objectContaining({ - tracingEnabled: false, - }) - ); - }); - - test('when AWS_EXECUTION_ENV environment variable is set, tracing is enabled', () => { - // Prepare - process.env.AWS_EXECUTION_ENV = 'nodejs16.x'; - - // Act - const tracer = createTracer(); - - // Assess - expect(tracer).toEqual( - expect.objectContaining({ - tracingEnabled: true, - }) - ); - }); - - test('when AWS_EXECUTION_ENV environment variable is NOT set, tracing is disabled', () => { - // Prepare - delete process.env.AWS_EXECUTION_ENV; - - // Act - const tracer = createTracer(); - - // Assess - expect(tracer).toEqual( - expect.objectContaining({ - tracingEnabled: false, - }) - ); - }); - - test('when POWERTOOLS_TRACE_ENABLED environment variable is set, a tracer with tracing disabled is returned', () => { - // Prepare - process.env.POWERTOOLS_TRACE_ENABLED = 'false'; - - // Act - const tracer = createTracer(); - - // Assess - expect(tracer).toEqual( - expect.objectContaining({ - tracingEnabled: false, - }) - ); - }); - - test('when POWERTOOLS_SERVICE_NAME environment variable is set, a tracer with the correct serviceName is returned', () => { - // Prepare - process.env.POWERTOOLS_SERVICE_NAME = 'my-backend-service'; - - // Act - const tracer = createTracer(); - - // Assess - expect(tracer).toEqual( - expect.objectContaining({ - serviceName: 'my-backend-service', - }) - ); - }); - - test('when POWERTOOLS_TRACER_CAPTURE_RESPONSE environment variable is set, a tracer with captureResponse disabled is returned', () => { - // Prepare - process.env.POWERTOOLS_TRACER_CAPTURE_RESPONSE = 'false'; - - // Act - const tracer = createTracer(); - - // Assess - expect(tracer).toEqual( - expect.objectContaining({ - captureResponse: false, - }) - ); - }); - - test('when POWERTOOLS_TRACER_CAPTURE_RESPONSE environment variable is set to invalid value, a tracer with captureResponse enabled is returned', () => { - // Prepare - process.env.POWERTOOLS_TRACER_CAPTURE_RESPONSE = ''; - - // Act - const tracer = createTracer(); - - // Assess - expect(tracer).toEqual( - expect.objectContaining({ - captureResponse: true, - }) - ); - }); - - test('when POWERTOOLS_TRACER_CAPTURE_ERROR environment variable is set, a tracer with captureError disabled is returned', () => { - // Prepare - process.env.POWERTOOLS_TRACER_CAPTURE_ERROR = 'false'; - - // Act - const tracer = createTracer(); - - // Assess - expect(tracer).toEqual( - expect.objectContaining({ - captureError: false, - }) - ); - }); - - test('when POWERTOOLS_TRACER_CAPTURE_ERROR environment variable is set to invalid value, a tracer with captureError enabled is returned', () => { - // Prepare - process.env.POWERTOOLS_TRACER_CAPTURE_ERROR = ''; - - // Act - const tracer = createTracer(); - - // Assess - expect(tracer).toEqual( - expect.objectContaining({ - captureError: true, - }) - ); - }); - - test('when POWERTOOLS_TRACER_CAPTURE_HTTPS_REQUESTS environment variable is set, captureHTTPsGlobal is called', () => { - // Prepare - process.env.POWERTOOLS_TRACER_CAPTURE_HTTPS_REQUESTS = 'false'; - - // Act - const tracer = createTracer(); - - // Assess - expect(tracer).toEqual( - expect.objectContaining({ - captureHTTPsRequests: false, - }) - ); - }); - - test('when POWERTOOLS_TRACER_CAPTURE_HTTPS_REQUESTS environment variable is set to invalid value, captureHTTPsGlobal is called', () => { - // Prepare - process.env.POWERTOOLS_TRACER_CAPTURE_HTTPS_REQUESTS = ''; - - // Act - const tracer = createTracer(); - - // Assess - expect(tracer).toEqual( - expect.objectContaining({ - captureHTTPsRequests: true, - }) - ); - }); - }); -}); diff --git a/v2.json b/v2.json new file mode 100644 index 0000000000..f732091fe5 --- /dev/null +++ b/v2.json @@ -0,0 +1,3 @@ +{ + "iteration": 0 +} \ No newline at end of file From 0bc7960cd906380f303403d591420f8f78306a48 Mon Sep 17 00:00:00 2001 From: Ant Stanley Date: Thu, 12 Oct 2023 00:18:04 +0200 Subject: [PATCH 13/60] feat(logger): add esmodule support (#1734) * feat(logger): add esm build output * fix(Logger): Remove barrel files update references * test(Logger): update jest/ts-jest to use ESM * chore(Logger): remove unused lodash.merge * fix(logger): reinstate lodash.merge * chore(logger): revert TS assertion * chore(logger): revert format changes * chore(logger): update postbuild to remove incremental tsbuildinfo files * fix(logger): correct reference to types output * feat(logging): add middleware export * chore(logger): replace postbuild script with echo statement * feat(logger): add typesVersions property and barrel files to /types * chore(logger): file not used, can be added back if needed * chore(logger): add space back to README * chore(logger): revert space in README --- .gitignore | 3 +- package-lock.json | 65 ++++--------------- packages/logger/README.md | 2 +- .../{jest.config.js => jest.config.cjs} | 12 +++- packages/logger/package.json | 44 +++++++++++-- packages/logger/src/Logger.ts | 23 ++++--- .../src/config/EnvironmentVariablesService.ts | 2 +- packages/logger/src/config/index.ts | 2 - packages/logger/src/formatter/LogFormatter.ts | 7 +- .../src/formatter/LogFormatterInterface.ts | 5 +- .../src/formatter/PowertoolsLogFormatter.ts | 9 +-- packages/logger/src/formatter/index.ts | 3 - packages/logger/src/index.ts | 8 ++- packages/logger/src/log/LogItem.ts | 4 +- packages/logger/src/log/LogItemInterface.ts | 2 +- packages/logger/src/log/index.ts | 2 - packages/logger/src/middleware/index.ts | 1 - packages/logger/src/middleware/middy.ts | 5 +- packages/logger/src/types/Logger.ts | 6 +- .../logger/src/types/formats/PowertoolsLog.ts | 2 +- packages/logger/src/types/formats/index.ts | 2 +- packages/logger/src/types/index.ts | 22 ++++++- packages/logger/tests/tsconfig.json | 17 ++--- packages/logger/tests/unit/Logger.test.ts | 16 ++--- .../EnvironmentVariablesService.test.ts | 2 +- .../formatter/PowertoolsLogFormatter.test.ts | 5 +- .../tests/unit/middleware/middy.test.ts | 14 ++-- packages/logger/tsconfig.esm.json | 9 +++ packages/logger/tsconfig.json | 16 ++--- packages/logger/typedoc.json | 7 +- tsconfig.esm.json | 8 +++ 31 files changed, 179 insertions(+), 146 deletions(-) rename packages/logger/{jest.config.js => jest.config.cjs} (80%) delete mode 100644 packages/logger/src/config/index.ts delete mode 100644 packages/logger/src/formatter/index.ts delete mode 100644 packages/logger/src/log/index.ts delete mode 100644 packages/logger/src/middleware/index.ts create mode 100644 packages/logger/tsconfig.esm.json create mode 100644 tsconfig.esm.json diff --git a/.gitignore b/.gitignore index 3f1196546a..82e57f76bd 100644 --- a/.gitignore +++ b/.gitignore @@ -49,4 +49,5 @@ site tmp # TS build files -tsconfig.tsbuildinfo \ No newline at end of file +tsconfig.tsbuildinfo +tsconfig.esm.tsbuildinfo \ No newline at end of file diff --git a/package-lock.json b/package-lock.json index 4a4220e5d3..7a50e591d9 100644 --- a/package-lock.json +++ b/package-lock.json @@ -55,11 +55,7 @@ }, "docs/snippets": { "name": "docs", -<<<<<<< HEAD "version": "1.14.0", -======= - "version": "1.13.1", ->>>>>>> 5838770e (chore: restore deps) "license": "MIT-0", "devDependencies": { "@aws-sdk/client-appconfigdata": "^3.413.0", @@ -76,11 +72,7 @@ }, "examples/cdk": { "name": "cdk-sample", -<<<<<<< HEAD "version": "1.14.0", -======= - "version": "1.13.1", ->>>>>>> 5838770e (chore: restore deps) "license": "MIT-0", "dependencies": { "@middy/core": "^3.6.2", @@ -119,11 +111,7 @@ }, "examples/sam": { "name": "sam-example", -<<<<<<< HEAD "version": "1.14.0", -======= - "version": "1.13.1", ->>>>>>> 5838770e (chore: restore deps) "license": "MIT-0", "dependencies": { "@aws-lambda-powertools/logger": "^1.14.0", @@ -154,11 +142,7 @@ "dev": true }, "layers": { -<<<<<<< HEAD "version": "1.14.0", -======= - "version": "1.13.1", ->>>>>>> 5838770e (chore: restore deps) "license": "MIT-0", "dependencies": { "aws-cdk": "^2.96.1", @@ -6184,7 +6168,8 @@ "node_modules/balanced-match": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz", - "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==" + "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==", + "dev": true }, "node_modules/base64-js": { "version": "1.5.1", @@ -6253,6 +6238,7 @@ "version": "1.1.11", "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", + "dev": true, "dependencies": { "balanced-match": "^1.0.0", "concat-map": "0.0.1" @@ -6919,7 +6905,8 @@ "node_modules/concat-map": { "version": "0.0.1", "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", - "integrity": "sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==" + "integrity": "sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==", + "dev": true }, "node_modules/concat-stream": { "version": "2.0.0", @@ -8591,6 +8578,7 @@ "version": "11.1.1", "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-11.1.1.tgz", "integrity": "sha512-MGIE4HOvQCeUCzmlHs0vXpih4ysz4wg9qiSAu6cd42lVwPbTM1TjV7RusoyQqMmk/95gdQZX72u+YW+c3eEpFQ==", + "dev": true, "dependencies": { "graceful-fs": "^4.2.0", "jsonfile": "^6.0.1", @@ -9002,7 +8990,8 @@ "node_modules/graceful-fs": { "version": "4.2.11", "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.11.tgz", - "integrity": "sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ==" + "integrity": "sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ==", + "dev": true }, "node_modules/graphemer": { "version": "1.4.0", @@ -9277,6 +9266,7 @@ "version": "5.2.4", "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.2.4.tgz", "integrity": "sha512-MAb38BcSbH0eHNBxn7ql2NH/kX33OkB3lZ1BNdh7ENeRChHTYsTvWrMubiIAMNS2llXEEgZ1MUOBtXChP3kaFQ==", + "dev": true, "engines": { "node": ">= 4" } @@ -10735,6 +10725,7 @@ "version": "6.1.0", "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-6.1.0.tgz", "integrity": "sha512-5dgndWOriYSm5cnYaJNhalLNDKOqFwyDB/rr1E9ZsGciGvKPs8R2xYGCacuf3z6K1YKDz182fd+fY3cn3pMqXQ==", + "dev": true, "dependencies": { "universalify": "^2.0.0" }, @@ -12152,6 +12143,7 @@ "version": "3.1.2", "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", + "dev": true, "dependencies": { "brace-expansion": "^1.1.7" }, @@ -13948,6 +13940,7 @@ "version": "2.3.0", "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.3.0.tgz", "integrity": "sha512-rRV+zQD8tVFys26lAGR9WUuS4iUAngJScM+ZRSKtvl5tKeZ2t5bvdNFdNHBW9FWR4guGHlgmsZ1G7BSm2wTbuA==", + "dev": true, "engines": { "node": ">=6" } @@ -16017,6 +16010,7 @@ "version": "2.0.0", "resolved": "https://registry.npmjs.org/universalify/-/universalify-2.0.0.tgz", "integrity": "sha512-hAZsKq7Yy11Zu1DE0OzWjw7nnLZmJZYTDZZyEFHZdUhV8FkH5MCfoU1XMaxXovpyW5nq5scPqq0ZDP9Zyl04oQ==", + "dev": true, "engines": { "node": ">= 10.0.0" } @@ -16470,6 +16464,7 @@ "version": "2.3.1", "resolved": "https://registry.npmjs.org/yaml/-/yaml-2.3.1.tgz", "integrity": "sha512-2eHWfjaoXgTBC2jNM1LRef62VQa0umtvRiDSk6HSzW7RvS5YtkabJrwYLLEKWBc8a5U2PTSCs+dJjUTJdlHsWQ==", + "dev": true, "engines": { "node": ">= 14" } @@ -16564,29 +16559,17 @@ }, "packages/batch": { "name": "@aws-lambda-powertools/batch", -<<<<<<< HEAD "version": "1.14.0", -======= - "version": "1.13.1", ->>>>>>> 5838770e (chore: restore deps) "license": "MIT-0" }, "packages/commons": { "name": "@aws-lambda-powertools/commons", -<<<<<<< HEAD "version": "1.14.0", -======= - "version": "1.13.1", ->>>>>>> 5838770e (chore: restore deps) "license": "MIT-0" }, "packages/idempotency": { "name": "@aws-lambda-powertools/idempotency", -<<<<<<< HEAD "version": "1.14.0", -======= - "version": "1.13.1", ->>>>>>> 5838770e (chore: restore deps) "license": "MIT-0", "dependencies": { "@aws-lambda-powertools/commons": "^1.14.0", @@ -16620,11 +16603,7 @@ }, "packages/logger": { "name": "@aws-lambda-powertools/logger", -<<<<<<< HEAD "version": "1.14.0", -======= - "version": "1.13.1", ->>>>>>> 5838770e (chore: restore deps) "license": "MIT-0", "dependencies": { "@aws-lambda-powertools/commons": "^1.14.0", @@ -16645,11 +16624,7 @@ }, "packages/metrics": { "name": "@aws-lambda-powertools/metrics", -<<<<<<< HEAD "version": "1.14.0", -======= - "version": "1.13.1", ->>>>>>> 5838770e (chore: restore deps) "license": "MIT-0", "dependencies": { "@aws-lambda-powertools/commons": "^1.14.0" @@ -16671,11 +16646,7 @@ }, "packages/parameters": { "name": "@aws-lambda-powertools/parameters", -<<<<<<< HEAD "version": "1.14.0", -======= - "version": "1.13.1", ->>>>>>> 5838770e (chore: restore deps) "license": "MIT-0", "dependencies": { "@aws-lambda-powertools/commons": "^1.14.0", @@ -16721,11 +16692,7 @@ }, "packages/testing": { "name": "@aws-lambda-powertools/testing-utils", -<<<<<<< HEAD "version": "1.14.0", -======= - "version": "1.13.1", ->>>>>>> 5838770e (chore: restore deps) "license": "MIT-0", "dependencies": { "@aws-cdk/cli-lib-alpha": "^2.96.1-alpha.0", @@ -16737,11 +16704,7 @@ }, "packages/tracer": { "name": "@aws-lambda-powertools/tracer", -<<<<<<< HEAD "version": "1.14.0", -======= - "version": "1.13.1", ->>>>>>> 5838770e (chore: restore deps) "license": "MIT-0", "dependencies": { "@aws-lambda-powertools/commons": "^1.14.0", diff --git a/packages/logger/README.md b/packages/logger/README.md index d895f34c94..aa79f78d3b 100644 --- a/packages/logger/README.md +++ b/packages/logger/README.md @@ -114,4 +114,4 @@ Credits for the Powertools for AWS Lambda (TypeScript) idea go to [DAZN](https:/ ## License -This library is licensed under the MIT-0 License. See the LICENSE file. +This library is licensed under the MIT-0 License. See the LICENSE file. \ No newline at end of file diff --git a/packages/logger/jest.config.js b/packages/logger/jest.config.cjs similarity index 80% rename from packages/logger/jest.config.js rename to packages/logger/jest.config.cjs index 31c2a6a370..272f582c6c 100644 --- a/packages/logger/jest.config.js +++ b/packages/logger/jest.config.cjs @@ -4,9 +4,17 @@ module.exports = { color: 'cyan', }, runner: 'groups', - preset: 'ts-jest', + extensionsToTreatAsEsm: ['.ts'], + moduleNameMapper: { + '^(\\.{1,2}/.*)\\.js$': '$1', + }, transform: { - '^.+\\.ts?$': 'ts-jest', + '^.+\\.[tj]sx?$': [ + 'ts-jest', + { + useESM: true, + }, + ], }, moduleFileExtensions: ['js', 'ts'], collectCoverageFrom: ['**/src/**/*.ts', '!**/node_modules/**'], diff --git a/packages/logger/package.json b/packages/logger/package.json index 787115f387..563ffa7e48 100644 --- a/packages/logger/package.json +++ b/packages/logger/package.json @@ -16,10 +16,13 @@ "test:e2e:nodejs18x": "RUNTIME=nodejs18x jest --group=e2e", "test:e2e": "jest --group=e2e", "watch": "jest --watch --group=unit", - "build": "tsc --build --force", + "build:cjs": "tsc --build --force && echo '{ \"type\": \"commonjs\" }' > lib/cjs/package.json", + "build:esm": "tsc --project tsconfig.esm.json && echo '{ \"type\": \"module\" }' > lib/esm/package.json", + "build": "npm run build:esm & npm run build:cjs", "lint": "eslint --ext .ts,.js --no-error-on-unmatched-pattern .", "lint-fix": "eslint --fix --ext .ts,.js --no-error-on-unmatched-pattern .", "prebuild": "rimraf ./lib", + "postbuild": "rimraf ./lib/*.tsbuildinfo", "prepack": "node ../../.github/scripts/release_patch_package_json.js ." }, "lint-staged": { @@ -27,8 +30,41 @@ }, "homepage": "https://github.com/aws-powertools/powertools-lambda-typescript/tree/main/packages/logger#readme", "license": "MIT-0", - "main": "./lib/index.js", - "types": "./lib/index.d.ts", + "type": "module", + "exports": { + ".": { + "require": { + "types": "./lib/cjs/index.d.ts", + "default": "./lib/cjs/index.js" + }, + "import": { + "types": "./lib/esm/index.d.ts", + "default": "./lib/esm/index.js" + } + }, + "./middleware": { + "import": "./lib/esm/middleware/middy.js", + "require": "./lib/cjs/middleware/middy.js" + }, + "./types": { + "import": "./lib/esm/types/index.js", + "require": "./lib/cjs/types/index.js" + } + }, + "typesVersions": { + "*": { + "middleware": [ + "lib/cjs/middleware/middy.d.ts", + "lib/esm/middleware/middy.d.ts" + ], + "types": [ + "lib/cjs/types/index.d.ts", + "lib/esm/types/index.d.ts" + ] + } + }, + "types": "./lib/cjs/index.d.ts", + "main": "./lib/cjs/index.js", "devDependencies": { "@aws-lambda-powertools/testing-utils": "file:../testing", "@types/lodash.merge": "^4.6.7" @@ -64,4 +100,4 @@ "serverless", "nodejs" ] -} \ No newline at end of file +} diff --git a/packages/logger/src/Logger.ts b/packages/logger/src/Logger.ts index f2973119a0..b864c997b6 100644 --- a/packages/logger/src/Logger.ts +++ b/packages/logger/src/Logger.ts @@ -2,26 +2,29 @@ import { randomInt } from 'node:crypto'; import { Console } from 'node:console'; import type { Context, Handler } from 'aws-lambda'; import { Utility } from '@aws-lambda-powertools/commons'; -import { LogFormatterInterface, PowertoolsLogFormatter } from './formatter'; -import { LogItem } from './log'; +import { PowertoolsLogFormatter } from './formatter/PowertoolsLogFormatter.js'; +import { LogFormatterInterface } from './formatter/LogFormatterInterface.js'; +import { LogItem } from './log/LogItem.js'; import merge from 'lodash.merge'; -import { ConfigServiceInterface, EnvironmentVariablesService } from './config'; -import { LogJsonIndent } from './types'; +import { ConfigServiceInterface } from './config/ConfigServiceInterface.js'; +import { EnvironmentVariablesService } from './config/EnvironmentVariablesService.js'; +import { LogJsonIndent } from './types/Logger.js'; import type { - ClassThatLogs, Environment, + LogAttributes, + LogLevel, + LogLevelThresholds, +} from './types/Log.js'; +import type { + ClassThatLogs, HandlerMethodDecorator, LambdaFunctionContext, - LogAttributes, ConstructorOptions, LogItemExtraInput, LogItemMessage, - LogLevel, - LogLevelThresholds, PowertoolLogData, HandlerOptions, -} from './types'; - +} from './types/Logger.js'; /** * ## Intro * The Logger utility provides an opinionated logger with output structured as JSON. diff --git a/packages/logger/src/config/EnvironmentVariablesService.ts b/packages/logger/src/config/EnvironmentVariablesService.ts index 7b62cabaa4..71b0dabab9 100644 --- a/packages/logger/src/config/EnvironmentVariablesService.ts +++ b/packages/logger/src/config/EnvironmentVariablesService.ts @@ -1,4 +1,4 @@ -import { ConfigServiceInterface } from './ConfigServiceInterface'; +import { ConfigServiceInterface } from './ConfigServiceInterface.js'; import { EnvironmentVariablesService as CommonEnvironmentVariablesService } from '@aws-lambda-powertools/commons'; /** diff --git a/packages/logger/src/config/index.ts b/packages/logger/src/config/index.ts deleted file mode 100644 index 11fd37677e..0000000000 --- a/packages/logger/src/config/index.ts +++ /dev/null @@ -1,2 +0,0 @@ -export * from './ConfigServiceInterface'; -export * from './EnvironmentVariablesService'; diff --git a/packages/logger/src/formatter/LogFormatter.ts b/packages/logger/src/formatter/LogFormatter.ts index 2106d6bc73..ccdf8b67b3 100644 --- a/packages/logger/src/formatter/LogFormatter.ts +++ b/packages/logger/src/formatter/LogFormatter.ts @@ -1,6 +1,7 @@ -import { LogFormatterInterface } from '.'; -import { LogAttributes, UnformattedAttributes } from '../types'; -import { LogItem } from '../log'; +import { LogFormatterInterface } from './LogFormatterInterface.js'; +import { LogAttributes } from '../types/Log.js'; +import { UnformattedAttributes } from '../types/Logger.js'; +import { LogItem } from '../log/LogItem.js'; /** * Typeguard to monkey patch Error to add a cause property. diff --git a/packages/logger/src/formatter/LogFormatterInterface.ts b/packages/logger/src/formatter/LogFormatterInterface.ts index 0fe1dd9909..49d35154c3 100644 --- a/packages/logger/src/formatter/LogFormatterInterface.ts +++ b/packages/logger/src/formatter/LogFormatterInterface.ts @@ -1,5 +1,6 @@ -import { LogAttributes, UnformattedAttributes } from '../types'; -import { LogItem } from '../log'; +import { LogAttributes } from '../types/Log.js'; +import { UnformattedAttributes } from '../types/Logger.js'; +import { LogItem } from '../log/LogItem.js'; /** * @interface diff --git a/packages/logger/src/formatter/PowertoolsLogFormatter.ts b/packages/logger/src/formatter/PowertoolsLogFormatter.ts index 0460ed48a4..f88630bf2a 100644 --- a/packages/logger/src/formatter/PowertoolsLogFormatter.ts +++ b/packages/logger/src/formatter/PowertoolsLogFormatter.ts @@ -1,7 +1,8 @@ -import { LogFormatter } from '.'; -import { LogAttributes, UnformattedAttributes } from '../types'; -import { PowertoolsLog } from '../types/formats'; -import { LogItem } from '../log'; +import { LogFormatter } from './LogFormatter.js'; +import { LogAttributes } from '../types/Log.js'; +import { UnformattedAttributes } from '../types/Logger.js'; +import { PowertoolsLog } from '../types/formats/PowertoolsLog.js'; +import { LogItem } from '../log/LogItem.js'; /** * This class is used to transform a set of log key-value pairs diff --git a/packages/logger/src/formatter/index.ts b/packages/logger/src/formatter/index.ts deleted file mode 100644 index ef5d7b16d8..0000000000 --- a/packages/logger/src/formatter/index.ts +++ /dev/null @@ -1,3 +0,0 @@ -export * from './LogFormatter'; -export * from './LogFormatterInterface'; -export * from './PowertoolsLogFormatter'; diff --git a/packages/logger/src/index.ts b/packages/logger/src/index.ts index 43bcdb04e0..dfedabfdff 100644 --- a/packages/logger/src/index.ts +++ b/packages/logger/src/index.ts @@ -1,3 +1,5 @@ -export * from './Logger'; -export * from './middleware'; -export * from './formatter'; +export { Logger } from './Logger.js'; +export { injectLambdaContext } from './middleware/middy.js'; +export { PowertoolsLogFormatter } from './formatter/PowertoolsLogFormatter.js'; +export { LogFormatter } from './formatter/LogFormatter.js'; +export { LogFormatterInterface } from './formatter/LogFormatterInterface.js'; diff --git a/packages/logger/src/log/LogItem.ts b/packages/logger/src/log/LogItem.ts index 00a66ec786..4183017b4f 100644 --- a/packages/logger/src/log/LogItem.ts +++ b/packages/logger/src/log/LogItem.ts @@ -1,6 +1,6 @@ import merge from 'lodash.merge'; -import { LogItemInterface } from '.'; -import { LogAttributes } from '../types'; +import { LogItemInterface } from './LogItemInterface.js'; +import { LogAttributes } from '../types/Log.js'; class LogItem implements LogItemInterface { private attributes: LogAttributes = {}; diff --git a/packages/logger/src/log/LogItemInterface.ts b/packages/logger/src/log/LogItemInterface.ts index cb6113b9d5..ed0c89bb0b 100644 --- a/packages/logger/src/log/LogItemInterface.ts +++ b/packages/logger/src/log/LogItemInterface.ts @@ -1,4 +1,4 @@ -import { LogAttributes } from '../types'; +import { LogAttributes } from '../types/Log.js'; interface LogItemInterface { addAttributes(attributes: LogAttributes): void; diff --git a/packages/logger/src/log/index.ts b/packages/logger/src/log/index.ts deleted file mode 100644 index 6a3bee0c47..0000000000 --- a/packages/logger/src/log/index.ts +++ /dev/null @@ -1,2 +0,0 @@ -export * from './LogItem'; -export * from './LogItemInterface'; diff --git a/packages/logger/src/middleware/index.ts b/packages/logger/src/middleware/index.ts deleted file mode 100644 index cfe9900b37..0000000000 --- a/packages/logger/src/middleware/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './middy'; diff --git a/packages/logger/src/middleware/middy.ts b/packages/logger/src/middleware/middy.ts index f68ea4a8e6..9e49dcbf63 100644 --- a/packages/logger/src/middleware/middy.ts +++ b/packages/logger/src/middleware/middy.ts @@ -1,5 +1,6 @@ -import { Logger } from '../Logger'; -import { HandlerOptions, LogAttributes } from '../types'; +import { Logger } from '../Logger.js'; +import { LogAttributes } from '../types/Log.js'; +import { HandlerOptions } from '../types/Logger.js'; import { LOGGER_KEY } from '@aws-lambda-powertools/commons/lib/middleware'; import type { MiddlewareLikeObj, diff --git a/packages/logger/src/types/Logger.ts b/packages/logger/src/types/Logger.ts index d5d464fe17..60f681dc60 100644 --- a/packages/logger/src/types/Logger.ts +++ b/packages/logger/src/types/Logger.ts @@ -4,14 +4,14 @@ import { SyncHandler, } from '@aws-lambda-powertools/commons'; import { Handler } from 'aws-lambda'; -import { ConfigServiceInterface } from '../config'; -import { LogFormatterInterface } from '../formatter'; +import { ConfigServiceInterface } from '../config/ConfigServiceInterface.js'; +import { LogFormatterInterface } from '../formatter/LogFormatterInterface.js'; import { Environment, LogAttributes, LogAttributesWithMessage, LogLevel, -} from './Log'; +} from './Log.js'; type ClassThatLogs = { [key in Exclude, 'silent'>]: ( diff --git a/packages/logger/src/types/formats/PowertoolsLog.ts b/packages/logger/src/types/formats/PowertoolsLog.ts index fa360fef59..9406a2a5fe 100644 --- a/packages/logger/src/types/formats/PowertoolsLog.ts +++ b/packages/logger/src/types/formats/PowertoolsLog.ts @@ -1,4 +1,4 @@ -import type { LogAttributes, LogLevel } from '..'; +import type { LogAttributes, LogLevel } from '../Log.js'; type PowertoolsLog = LogAttributes & { /** diff --git a/packages/logger/src/types/formats/index.ts b/packages/logger/src/types/formats/index.ts index 5a828a385f..03dabd2013 100644 --- a/packages/logger/src/types/formats/index.ts +++ b/packages/logger/src/types/formats/index.ts @@ -1 +1 @@ -export * from './PowertoolsLog'; +export type { PowertoolsLog } from './PowertoolsLog.js'; diff --git a/packages/logger/src/types/index.ts b/packages/logger/src/types/index.ts index dc74795384..9c01595ede 100644 --- a/packages/logger/src/types/index.ts +++ b/packages/logger/src/types/index.ts @@ -1,2 +1,20 @@ -export * from './Log'; -export * from './Logger'; +export type { + LogAttributesWithMessage, + LogAttributeValue, + Environment, + LogLevelThresholds, + LogAttributes, + LogLevel, +} from './Log.js'; + +export type { + ClassThatLogs, + LogItemMessage, + LogItemExtraInput, + HandlerMethodDecorator, + LambdaFunctionContext, + UnformattedAttributes, + PowertoolLogData, + ConstructorOptions, + HandlerOptions, +} from './Logger.js'; diff --git a/packages/logger/tests/tsconfig.json b/packages/logger/tests/tsconfig.json index 5654b3e15f..45ba862a85 100644 --- a/packages/logger/tests/tsconfig.json +++ b/packages/logger/tests/tsconfig.json @@ -1,11 +1,8 @@ { - "extends": "../tsconfig.json", - "compilerOptions": { - "rootDir": "../", - "noEmit": true - }, - "include": [ - "../src/**/*", - "./**/*", - ] -} \ No newline at end of file + "extends": "../tsconfig.json", + "compilerOptions": { + "rootDir": "../", + "noEmit": true + }, + "include": ["../src/**/*", "./**/*"] +} diff --git a/packages/logger/tests/unit/Logger.test.ts b/packages/logger/tests/unit/Logger.test.ts index b1b04f289d..531215667a 100644 --- a/packages/logger/tests/unit/Logger.test.ts +++ b/packages/logger/tests/unit/Logger.test.ts @@ -8,19 +8,17 @@ import { Events as dummyEvent, LambdaInterface, } from '@aws-lambda-powertools/commons'; -import { Logger } from '../../src'; -import { - ConfigServiceInterface, - EnvironmentVariablesService, -} from '../../src/config'; -import { PowertoolsLogFormatter, LogFormatter } from '../../src/formatter'; +import { Logger } from '../../src/Logger.js'; +import { ConfigServiceInterface } from '../../src/config/ConfigServiceInterface.js'; +import { EnvironmentVariablesService } from '../../src/config/EnvironmentVariablesService.js'; +import { PowertoolsLogFormatter } from '../../src/formatter/PowertoolsLogFormatter.js'; +import { LogFormatter } from '../../src/formatter/LogFormatter.js'; +import { LogLevelThresholds, LogLevel } from '../../src/types/Log.js'; import { ClassThatLogs, LogJsonIndent, ConstructorOptions, - LogLevelThresholds, - LogLevel, -} from '../../src/types'; +} from '../../src/types/Logger.js'; import type { Context } from 'aws-lambda'; import { Console } from 'console'; diff --git a/packages/logger/tests/unit/config/EnvironmentVariablesService.test.ts b/packages/logger/tests/unit/config/EnvironmentVariablesService.test.ts index fb6b7ed232..760f50cac9 100644 --- a/packages/logger/tests/unit/config/EnvironmentVariablesService.test.ts +++ b/packages/logger/tests/unit/config/EnvironmentVariablesService.test.ts @@ -3,7 +3,7 @@ * * @group unit/logger/all */ -import { EnvironmentVariablesService } from '../../../src/config'; +import { EnvironmentVariablesService } from '../../../src/config/EnvironmentVariablesService.js'; describe('Class: EnvironmentVariablesService', () => { const ENVIRONMENT_VARIABLES = process.env; diff --git a/packages/logger/tests/unit/formatter/PowertoolsLogFormatter.test.ts b/packages/logger/tests/unit/formatter/PowertoolsLogFormatter.test.ts index 6ffd54024b..d361a9439f 100644 --- a/packages/logger/tests/unit/formatter/PowertoolsLogFormatter.test.ts +++ b/packages/logger/tests/unit/formatter/PowertoolsLogFormatter.test.ts @@ -4,8 +4,9 @@ * @group unit/logger/all */ import { AssertionError, strictEqual } from 'assert'; -import { PowertoolsLogFormatter } from '../../../src/formatter'; -import { LogAttributes, UnformattedAttributes } from '../../../src/types'; +import { PowertoolsLogFormatter } from '../../../src/formatter/PowertoolsLogFormatter.js'; +import { UnformattedAttributes } from '../../../src/types/Logger.js'; +import { LogAttributes } from '../../../src/types/Log.js'; describe('Class: PowertoolsLogFormatter', () => { const mockDate = new Date(1466424490000); diff --git a/packages/logger/tests/unit/middleware/middy.test.ts b/packages/logger/tests/unit/middleware/middy.test.ts index 39df13ea72..9d4aaa604b 100644 --- a/packages/logger/tests/unit/middleware/middy.test.ts +++ b/packages/logger/tests/unit/middleware/middy.test.ts @@ -8,15 +8,13 @@ import { Events as dummyEvent, } from '@aws-lambda-powertools/commons'; import { cleanupMiddlewares } from '@aws-lambda-powertools/commons/lib/middleware'; -import { - ConfigServiceInterface, - EnvironmentVariablesService, -} from '../../../src/config'; -import { injectLambdaContext } from '../../../src/middleware/middy'; -import { Logger } from './../../../src'; +import { ConfigServiceInterface } from '../../../src/config/ConfigServiceInterface.js'; +import { EnvironmentVariablesService } from '../../../src/config/EnvironmentVariablesService.js'; +import { injectLambdaContext } from '../../../src/middleware/middy.js'; +import { Logger } from './../../../src/Logger.js'; import middy from '@middy/core'; -import { PowertoolsLogFormatter } from '../../../src/formatter'; -import { Console } from 'console'; +import { PowertoolsLogFormatter } from '../../../src/formatter/PowertoolsLogFormatter.js'; +import { Console } from 'node:console'; import { Context } from 'aws-lambda'; const mockDate = new Date(1466424490000); diff --git a/packages/logger/tsconfig.esm.json b/packages/logger/tsconfig.esm.json new file mode 100644 index 0000000000..a78be21539 --- /dev/null +++ b/packages/logger/tsconfig.esm.json @@ -0,0 +1,9 @@ +{ + "extends": "../../tsconfig.esm.json", + "compilerOptions": { + "baseUrl": ".", + "outDir": "./lib/esm", + "rootDir": "./src" + }, + "include": ["./src/**/*"] +} diff --git a/packages/logger/tsconfig.json b/packages/logger/tsconfig.json index 1cb9d72773..6b64decffb 100644 --- a/packages/logger/tsconfig.json +++ b/packages/logger/tsconfig.json @@ -1,10 +1,8 @@ { - "extends": "../../tsconfig.json", - "compilerOptions": { - "outDir": "./lib", - "rootDir": "./src", - }, - "include": [ - "./src/**/*" - ], -} \ No newline at end of file + "extends": "../../tsconfig.json", + "compilerOptions": { + "outDir": "./lib/cjs/", + "rootDir": "./src" + }, + "include": ["./src/**/*"] +} diff --git a/packages/logger/typedoc.json b/packages/logger/typedoc.json index 3a1fad0dcf..bf0eba2a17 100644 --- a/packages/logger/typedoc.json +++ b/packages/logger/typedoc.json @@ -1,8 +1,5 @@ { "extends": ["../../typedoc.base.json"], - "entryPoints": [ - "./src/index.ts", - "./src/types" - ], + "entryPoints": ["./src/index.ts", "./src/types"], "readme": "README.md" -} \ No newline at end of file +} diff --git a/tsconfig.esm.json b/tsconfig.esm.json new file mode 100644 index 0000000000..4c11bfc0ab --- /dev/null +++ b/tsconfig.esm.json @@ -0,0 +1,8 @@ +{ + "extends": "./tsconfig.json", + "compilerOptions": { + "module": "NodeNext", + "moduleResolution": "NodeNext", // TODO: experiment with bundler & esnext + "noEmitHelpers": true /* Disable generating custom helper functions like '__extends' in compiled output. */ + } +} From c7a8511d26495bff04afd5f60e6333bb4cca36de Mon Sep 17 00:00:00 2001 From: Andrea Amorosi Date: Thu, 12 Oct 2023 01:46:25 +0200 Subject: [PATCH 14/60] feat(commons): add esmodule support (#1735) * chore(logger): adapt logger to commons exports * feat(commons): add esmodule support * chore: address sonar findings * chore(commons): exported version * chore: fixed imports in examples * chore(parameters): fixed imports * chore(metrics): fixed imports * chore(tracer): fixed imports * chore(idempotency): fixed imports * chore(commons): test coverage * chore(batch): fix imports --- examples/cdk/functions/common/powertools.ts | 2 +- examples/cdk/functions/get-all-items.ts | 2 +- examples/cdk/functions/get-by-id.ts | 2 +- examples/cdk/functions/uuid.ts | 2 +- examples/sam/src/common/powertools.ts | 2 +- examples/sam/src/get-all-items.ts | 2 +- examples/sam/src/get-by-id.ts | 2 +- examples/sam/src/get-uuid.ts | 2 +- .../batch/tests/unit/BatchProcessor.test.ts | 6 +- .../tests/unit/BatchProcessorSync.test.ts | 6 +- .../tests/unit/processPartialResponse.test.ts | 22 ++++--- .../unit/processPartialResponseSync.test.ts | 24 ++++--- .../{jest.config.js => jest.config.cjs} | 5 +- packages/commons/package.json | 36 +++++++++-- packages/commons/src/awsSdk/index.ts | 2 - packages/commons/src/awsSdk/utils.ts | 25 -------- .../userAgentMiddleware.ts => awsSdkUtils.ts} | 29 +++++++-- .../src/config/EnvironmentVariablesService.ts | 2 +- packages/commons/src/config/index.ts | 2 - .../commons/src/{types/utils.ts => guards.ts} | 7 --- packages/commons/src/index.ts | 22 ++++--- .../src/middleware/cleanupMiddlewares.ts | 4 +- packages/commons/src/middleware/index.ts | 2 - .../src/samples/resources/contexts/index.ts | 2 +- .../src/samples/resources/events/index.ts | 2 +- .../lambda => types}/LambdaInterface.ts | 0 packages/commons/src/types/index.ts | 4 ++ packages/commons/src/types/json.ts | 6 ++ packages/commons/src/utils/lambda/index.ts | 1 - .../EnvironmentVariablesService.test.ts | 4 +- .../tests/unit/LambdaInterface.test.ts | 31 ++++------ packages/commons/tests/unit/Utility.test.ts | 2 +- .../{awsSdk.test.ts => awsSdkUtils.test.ts} | 9 ++- .../tests/unit/cleanupMiddlewares.test.ts | 12 +++- .../unit/{utils.test.ts => guards.test.ts} | 8 +-- packages/commons/tsconfig.esm.json | 11 ++++ packages/commons/tsconfig.json | 2 +- .../idempotency/src/IdempotencyHandler.ts | 2 +- .../src/middleware/makeHandlerIdempotent.ts | 4 +- .../src/persistence/BasePersistenceLayer.ts | 2 +- .../src/persistence/IdempotencyRecord.ts | 2 +- .../src/types/IdempotencyOptions.ts | 2 +- .../src/types/IdempotencyRecord.ts | 2 +- .../idempotentDecorator.test.FunctionCode.ts | 2 +- .../tests/unit/idempotencyDecorator.test.ts | 4 +- .../tests/unit/makeHandlerIdempotent.test.ts | 10 +-- .../tests/unit/makeIdempotent.test.ts | 10 +-- packages/logger/jest.config.cjs | 10 +-- packages/logger/package.json | 3 +- packages/logger/src/Logger.ts | 2 +- packages/logger/src/index.ts | 4 +- packages/logger/src/middleware/middy.ts | 4 +- packages/logger/src/types/Logger.ts | 4 +- .../sampleRate.decorator.test.FunctionCode.ts | 2 +- packages/logger/tests/unit/Logger.test.ts | 7 +-- .../formatter/PowertoolsLogFormatter.test.ts | 62 +++++++------------ .../tests/unit/middleware/middy.test.ts | 2 +- packages/metrics/src/middleware/middy.ts | 4 +- packages/metrics/src/types/Metrics.ts | 2 +- .../metrics/tests/helpers/metricsUtils.ts | 2 +- packages/metrics/tests/unit/Metrics.test.ts | 2 +- .../tests/unit/middleware/middy.test.ts | 42 +++++++------ .../parameters/src/base/transformValue.ts | 2 +- .../src/dynamodb/DynamoDBProvider.ts | 2 +- .../parameters/src/types/AppConfigProvider.ts | 2 +- .../parameters/src/types/DynamoDBProvider.ts | 2 +- packages/parameters/src/types/SSMProvider.ts | 2 +- .../parameters/src/types/SecretsProvider.ts | 2 +- .../tests/unit/getAppConfig.test.ts | 2 +- packages/tracer/src/Tracer.ts | 10 +-- packages/tracer/src/middleware/middy.ts | 4 +- packages/tracer/src/types/Tracer.ts | 2 +- packages/tracer/tests/unit/Tracer.test.ts | 2 +- packages/tracer/tests/unit/middy.test.ts | 2 +- 74 files changed, 284 insertions(+), 246 deletions(-) rename packages/commons/{jest.config.js => jest.config.cjs} (83%) delete mode 100644 packages/commons/src/awsSdk/index.ts delete mode 100644 packages/commons/src/awsSdk/utils.ts rename packages/commons/src/{awsSdk/userAgentMiddleware.ts => awsSdkUtils.ts} (59%) delete mode 100644 packages/commons/src/config/index.ts rename packages/commons/src/{types/utils.ts => guards.ts} (81%) delete mode 100644 packages/commons/src/middleware/index.ts rename packages/commons/src/{utils/lambda => types}/LambdaInterface.ts (100%) create mode 100644 packages/commons/src/types/index.ts create mode 100644 packages/commons/src/types/json.ts delete mode 100644 packages/commons/src/utils/lambda/index.ts rename packages/commons/tests/unit/{config => }/EnvironmentVariablesService.test.ts (97%) rename packages/commons/tests/unit/{awsSdk.test.ts => awsSdkUtils.test.ts} (94%) rename packages/commons/tests/unit/{utils.test.ts => guards.test.ts} (95%) create mode 100644 packages/commons/tsconfig.esm.json diff --git a/examples/cdk/functions/common/powertools.ts b/examples/cdk/functions/common/powertools.ts index 01949a91ac..fa0b798afa 100644 --- a/examples/cdk/functions/common/powertools.ts +++ b/examples/cdk/functions/common/powertools.ts @@ -1,7 +1,7 @@ import { Logger } from '@aws-lambda-powertools/logger'; import { Metrics } from '@aws-lambda-powertools/metrics'; import { Tracer } from '@aws-lambda-powertools/tracer'; -import { PT_VERSION } from '@aws-lambda-powertools/commons/lib/version'; +import { PT_VERSION } from '@aws-lambda-powertools/commons'; const defaultValues = { region: process.env.AWS_REGION || 'N/A', diff --git a/examples/cdk/functions/get-all-items.ts b/examples/cdk/functions/get-all-items.ts index d0b1acb4b8..a31269d7a2 100644 --- a/examples/cdk/functions/get-all-items.ts +++ b/examples/cdk/functions/get-all-items.ts @@ -1,4 +1,4 @@ -import { injectLambdaContext } from '@aws-lambda-powertools/logger'; +import { injectLambdaContext } from '@aws-lambda-powertools/logger/middleware'; import { logMetrics } from '@aws-lambda-powertools/metrics'; import { captureLambdaHandler } from '@aws-lambda-powertools/tracer'; import { ScanCommand } from '@aws-sdk/lib-dynamodb'; diff --git a/examples/cdk/functions/get-by-id.ts b/examples/cdk/functions/get-by-id.ts index 9ad13fcb2f..d2f043a991 100644 --- a/examples/cdk/functions/get-by-id.ts +++ b/examples/cdk/functions/get-by-id.ts @@ -1,4 +1,4 @@ -import { LambdaInterface } from '@aws-lambda-powertools/commons'; +import type { LambdaInterface } from '@aws-lambda-powertools/commons/types'; import { GetCommand } from '@aws-sdk/lib-dynamodb'; import { APIGatewayProxyEvent, diff --git a/examples/cdk/functions/uuid.ts b/examples/cdk/functions/uuid.ts index 58e017dbea..04ab559e1f 100644 --- a/examples/cdk/functions/uuid.ts +++ b/examples/cdk/functions/uuid.ts @@ -1,6 +1,6 @@ import { randomUUID } from 'node:crypto'; -exports.handler = async (_event) => { +exports.handler = async () => { return { statusCode: 200, body: JSON.stringify(randomUUID()), diff --git a/examples/sam/src/common/powertools.ts b/examples/sam/src/common/powertools.ts index 01949a91ac..fa0b798afa 100644 --- a/examples/sam/src/common/powertools.ts +++ b/examples/sam/src/common/powertools.ts @@ -1,7 +1,7 @@ import { Logger } from '@aws-lambda-powertools/logger'; import { Metrics } from '@aws-lambda-powertools/metrics'; import { Tracer } from '@aws-lambda-powertools/tracer'; -import { PT_VERSION } from '@aws-lambda-powertools/commons/lib/version'; +import { PT_VERSION } from '@aws-lambda-powertools/commons'; const defaultValues = { region: process.env.AWS_REGION || 'N/A', diff --git a/examples/sam/src/get-all-items.ts b/examples/sam/src/get-all-items.ts index b0e3ec9ae6..6984c2d54d 100644 --- a/examples/sam/src/get-all-items.ts +++ b/examples/sam/src/get-all-items.ts @@ -7,7 +7,7 @@ import middy from '@middy/core'; import { tableName } from './common/constants'; import { logger, tracer, metrics } from './common/powertools'; import { logMetrics } from '@aws-lambda-powertools/metrics'; -import { injectLambdaContext } from '@aws-lambda-powertools/logger'; +import { injectLambdaContext } from '@aws-lambda-powertools/logger/middleware'; import { captureLambdaHandler } from '@aws-lambda-powertools/tracer'; import { docClient } from './common/dynamodb-client'; import { ScanCommand } from '@aws-sdk/lib-dynamodb'; diff --git a/examples/sam/src/get-by-id.ts b/examples/sam/src/get-by-id.ts index 9ad13fcb2f..d2f043a991 100644 --- a/examples/sam/src/get-by-id.ts +++ b/examples/sam/src/get-by-id.ts @@ -1,4 +1,4 @@ -import { LambdaInterface } from '@aws-lambda-powertools/commons'; +import type { LambdaInterface } from '@aws-lambda-powertools/commons/types'; import { GetCommand } from '@aws-sdk/lib-dynamodb'; import { APIGatewayProxyEvent, diff --git a/examples/sam/src/get-uuid.ts b/examples/sam/src/get-uuid.ts index 58e017dbea..04ab559e1f 100644 --- a/examples/sam/src/get-uuid.ts +++ b/examples/sam/src/get-uuid.ts @@ -1,6 +1,6 @@ import { randomUUID } from 'node:crypto'; -exports.handler = async (_event) => { +exports.handler = async () => { return { statusCode: 200, body: JSON.stringify(randomUUID()), diff --git a/packages/batch/tests/unit/BatchProcessor.test.ts b/packages/batch/tests/unit/BatchProcessor.test.ts index 99cb2245e5..3243c1a4a0 100644 --- a/packages/batch/tests/unit/BatchProcessor.test.ts +++ b/packages/batch/tests/unit/BatchProcessor.test.ts @@ -4,7 +4,7 @@ * @group unit/batch/class/asyncBatchProcessor */ import type { Context } from 'aws-lambda'; -import { helloworldContext as dummyContext } from '@aws-lambda-powertools/commons/lib/samples/resources/contexts'; +import { ContextExamples as dummyContext } from '@aws-lambda-powertools/commons'; import { BatchProcessor } from '../../src/BatchProcessor'; import { EventType } from '../../src/constants'; import { BatchProcessingError, FullBatchFailureError } from '../../src/errors'; @@ -23,7 +23,9 @@ import { describe('Class: AsyncBatchProcessor', () => { const ENVIRONMENT_VARIABLES = process.env; - const options: BatchProcessingOptions = { context: dummyContext }; + const options: BatchProcessingOptions = { + context: dummyContext.helloworldContext, + }; beforeEach(() => { jest.clearAllMocks(); diff --git a/packages/batch/tests/unit/BatchProcessorSync.test.ts b/packages/batch/tests/unit/BatchProcessorSync.test.ts index 4f77d299cc..506e192d02 100644 --- a/packages/batch/tests/unit/BatchProcessorSync.test.ts +++ b/packages/batch/tests/unit/BatchProcessorSync.test.ts @@ -4,7 +4,7 @@ * @group unit/batch/class/batchprocessor */ import type { Context } from 'aws-lambda'; -import { helloworldContext as dummyContext } from '@aws-lambda-powertools/commons/lib/samples/resources/contexts'; +import { ContextExamples as dummyContext } from '@aws-lambda-powertools/commons'; import { BatchProcessorSync } from '../../src/BatchProcessorSync'; import { EventType } from '../../src/constants'; import { BatchProcessingError, FullBatchFailureError } from '../../src/errors'; @@ -23,7 +23,9 @@ import { describe('Class: BatchProcessor', () => { const ENVIRONMENT_VARIABLES = process.env; - const options: BatchProcessingOptions = { context: dummyContext }; + const options: BatchProcessingOptions = { + context: dummyContext.helloworldContext, + }; beforeEach(() => { jest.clearAllMocks(); diff --git a/packages/batch/tests/unit/processPartialResponse.test.ts b/packages/batch/tests/unit/processPartialResponse.test.ts index 2dbe585b45..d344eb7883 100644 --- a/packages/batch/tests/unit/processPartialResponse.test.ts +++ b/packages/batch/tests/unit/processPartialResponse.test.ts @@ -9,8 +9,10 @@ import type { KinesisStreamEvent, SQSEvent, } from 'aws-lambda'; -import { helloworldContext as dummyContext } from '@aws-lambda-powertools/commons/lib/samples/resources/contexts'; -import { Custom as dummyEvent } from '@aws-lambda-powertools/commons/lib/samples/resources/events'; +import { + ContextExamples as dummyContext, + Events as dummyEvent, +} from '@aws-lambda-powertools/commons'; import { BatchProcessor } from '../../src/BatchProcessor'; import { processPartialResponse } from '../../src/processPartialResponse'; import { EventType } from '../../src/constants'; @@ -33,7 +35,9 @@ import { describe('Function: processPartialResponse()', () => { const ENVIRONMENT_VARIABLES = process.env; const context = dummyContext; - const options: BatchProcessingOptions = { context: dummyContext }; + const options: BatchProcessingOptions = { + context: dummyContext.helloworldContext, + }; beforeEach(() => { jest.clearAllMocks(); @@ -106,7 +110,7 @@ describe('Function: processPartialResponse()', () => { }; // Act - const result = await handler(event, context); + const result = await handler(event, context.helloworldContext); // Assess expect(result).toStrictEqual({ batchItemFailures: [] }); @@ -133,7 +137,7 @@ describe('Function: processPartialResponse()', () => { }; // Act - const result = await handler(event, context); + const result = await handler(event, context.helloworldContext); // Assess expect(result).toStrictEqual({ batchItemFailures: [] }); @@ -160,7 +164,7 @@ describe('Function: processPartialResponse()', () => { }; // Act - const result = await handler(event, context); + const result = await handler(event, context.helloworldContext); // Assess expect(result).toStrictEqual({ batchItemFailures: [] }); @@ -169,7 +173,7 @@ describe('Function: processPartialResponse()', () => { test('Process partial response through handler for SQS records with incorrect event type', async () => { // Prepare const processor = new BatchProcessor(EventType.SQS); - const event = dummyEvent; + const event = dummyEvent.Custom; const handler = async ( event: SQSEvent, @@ -184,7 +188,7 @@ describe('Function: processPartialResponse()', () => { // Act & Assess await expect(() => - handler(event as unknown as SQSEvent, context) + handler(event as unknown as SQSEvent, context.helloworldContext) ).rejects.toThrowError( `Unexpected batch type. Possible values are: ${Object.keys( EventType @@ -216,7 +220,7 @@ describe('Function: processPartialResponse()', () => { }; // Act - const result = await handler(event, context); + const result = await handler(event, context.helloworldContext); // Assess expect(result).toStrictEqual({ batchItemFailures: [] }); diff --git a/packages/batch/tests/unit/processPartialResponseSync.test.ts b/packages/batch/tests/unit/processPartialResponseSync.test.ts index 4c3e9a47a5..426428f5d4 100644 --- a/packages/batch/tests/unit/processPartialResponseSync.test.ts +++ b/packages/batch/tests/unit/processPartialResponseSync.test.ts @@ -9,8 +9,10 @@ import type { KinesisStreamEvent, SQSEvent, } from 'aws-lambda'; -import { helloworldContext as dummyContext } from '@aws-lambda-powertools/commons/lib/samples/resources/contexts'; -import { Custom as dummyEvent } from '@aws-lambda-powertools/commons/lib/samples/resources/events'; +import { + ContextExamples as dummyContext, + Events as dummyEvent, +} from '@aws-lambda-powertools/commons'; import { BatchProcessorSync } from '../../src/BatchProcessorSync'; import { processPartialResponseSync } from '../../src/processPartialResponseSync'; import { EventType } from '../../src/constants'; @@ -33,7 +35,9 @@ import { describe('Function: processPartialResponse()', () => { const ENVIRONMENT_VARIABLES = process.env; const context = dummyContext; - const options: BatchProcessingOptions = { context: dummyContext }; + const options: BatchProcessingOptions = { + context: dummyContext.helloworldContext, + }; beforeEach(() => { jest.clearAllMocks(); @@ -106,7 +110,7 @@ describe('Function: processPartialResponse()', () => { }; // Act - const result = handler(event, context); + const result = handler(event, context.helloworldContext); // Assess expect(result).toStrictEqual({ batchItemFailures: [] }); @@ -133,7 +137,7 @@ describe('Function: processPartialResponse()', () => { }; // Act - const result = handler(event, context); + const result = handler(event, context.helloworldContext); // Assess expect(result).toStrictEqual({ batchItemFailures: [] }); @@ -160,7 +164,7 @@ describe('Function: processPartialResponse()', () => { }; // Act - const result = handler(event, context); + const result = handler(event, context.helloworldContext); // Assess expect(result).toStrictEqual({ batchItemFailures: [] }); @@ -169,7 +173,7 @@ describe('Function: processPartialResponse()', () => { test('Process partial response through handler for SQS records with incorrect event type', () => { // Prepare const processor = new BatchProcessorSync(EventType.SQS); - const event = dummyEvent; + const event = dummyEvent.Custom; const handler = ( event: SQSEvent, @@ -179,7 +183,9 @@ describe('Function: processPartialResponse()', () => { }; // Act & Assess - expect(() => handler(event as unknown as SQSEvent, context)).toThrowError( + expect(() => + handler(event as unknown as SQSEvent, context.helloworldContext) + ).toThrowError( `Unexpected batch type. Possible values are: ${Object.keys( EventType ).join(', ')}` @@ -210,7 +216,7 @@ describe('Function: processPartialResponse()', () => { }; // Act - const result = handler(event, context); + const result = handler(event, context.helloworldContext); // Assess expect(result).toStrictEqual({ batchItemFailures: [] }); diff --git a/packages/commons/jest.config.js b/packages/commons/jest.config.cjs similarity index 83% rename from packages/commons/jest.config.js rename to packages/commons/jest.config.cjs index 512b4ab601..957bbe96d7 100644 --- a/packages/commons/jest.config.js +++ b/packages/commons/jest.config.cjs @@ -4,6 +4,9 @@ module.exports = { color: 'red', }, preset: 'ts-jest', + moduleNameMapper: { + '^(\\.{1,2}/.*)\\.js$': '$1', + }, transform: { '^.+\\.ts?$': 'ts-jest', }, @@ -13,7 +16,7 @@ module.exports = { roots: ['/src', '/tests'], testPathIgnorePatterns: ['/node_modules/'], testEnvironment: 'node', - coveragePathIgnorePatterns: ['/node_modules/'], + coveragePathIgnorePatterns: ['/node_modules/', 'src/types/index.ts'], coverageThreshold: { global: { statements: 100, diff --git a/packages/commons/package.json b/packages/commons/package.json index 850cf00255..d7a3bab71c 100644 --- a/packages/commons/package.json +++ b/packages/commons/package.json @@ -15,19 +15,45 @@ "test:e2e": "echo 'Not Applicable'", "watch": "jest --watch", "generateVersionFile": "echo \"// this file is auto generated, do not modify\nexport const PT_VERSION = '$(jq -r '.version' package.json)';\" > src/version.ts", - "build": "tsc --build --force", + "build:cjs": "tsc --build --force && echo '{ \"type\": \"commonjs\" }' > lib/cjs/package.json", + "build:esm": "tsc --project tsconfig.esm.json && echo '{ \"type\": \"module\" }' > lib/esm/package.json", + "build": "npm run build:esm & npm run build:cjs", "lint": "eslint --ext .ts,.js --no-error-on-unmatched-pattern .", "lint-fix": "eslint --fix --ext .ts,.js --no-error-on-unmatched-pattern .", - "prebuild": "rimraf ./lib", - "prepack": "node ../../.github/scripts/release_patch_package_json.js ." + "prepack": "rimraf ./lib/*.tsbuildinfo && node ../../.github/scripts/release_patch_package_json.js ." }, "lint-staged": { "*.{js,ts}": "npm run lint-fix" }, "homepage": "https://github.com/aws-powertools/powertools-lambda-typescript/tree/main/packages/metrics#readme", "license": "MIT-0", - "main": "./lib/index.js", - "types": "./lib/index.d.ts", + "type": "module", + "exports": { + ".": { + "require": { + "types": "./lib/cjs/index.d.ts", + "default": "./lib/cjs/index.js" + }, + "import": { + "types": "./lib/esm/index.d.ts", + "default": "./lib/esm/index.js" + } + }, + "./types": { + "import": "./lib/esm/types/index.js", + "require": "./lib/cjs/types/index.js" + } + }, + "typesVersions": { + "*": { + "types": [ + "lib/cjs/types/index.d.ts", + "lib/esm/types/index.d.ts" + ] + } + }, + "types": "./lib/cjs/index.d.ts", + "main": "./lib/cjs/index.js", "files": [ "lib" ], diff --git a/packages/commons/src/awsSdk/index.ts b/packages/commons/src/awsSdk/index.ts deleted file mode 100644 index 6a771c2265..0000000000 --- a/packages/commons/src/awsSdk/index.ts +++ /dev/null @@ -1,2 +0,0 @@ -export { addUserAgentMiddleware } from './userAgentMiddleware'; -export { isSdkClient } from './utils'; diff --git a/packages/commons/src/awsSdk/utils.ts b/packages/commons/src/awsSdk/utils.ts deleted file mode 100644 index 611525abe1..0000000000 --- a/packages/commons/src/awsSdk/utils.ts +++ /dev/null @@ -1,25 +0,0 @@ -import { SdkClient } from '../types/awsSdk'; - -/** - * @internal - * Type guard to check if the client provided is a valid AWS SDK v3 client - */ -const isSdkClient = (client: unknown): client is SdkClient => - typeof client === 'object' && - client !== null && - 'send' in client && - typeof client.send === 'function' && - 'config' in client && - client.config !== undefined && - typeof client.config === 'object' && - client.config !== null && - 'middlewareStack' in client && - client.middlewareStack !== undefined && - typeof client.middlewareStack === 'object' && - client.middlewareStack !== null && - 'identify' in client.middlewareStack && - typeof client.middlewareStack.identify === 'function' && - 'addRelativeTo' in client.middlewareStack && - typeof client.middlewareStack.addRelativeTo === 'function'; - -export { isSdkClient }; diff --git a/packages/commons/src/awsSdk/userAgentMiddleware.ts b/packages/commons/src/awsSdkUtils.ts similarity index 59% rename from packages/commons/src/awsSdk/userAgentMiddleware.ts rename to packages/commons/src/awsSdkUtils.ts index 5ed76d1f1e..ce50c5de33 100644 --- a/packages/commons/src/awsSdk/userAgentMiddleware.ts +++ b/packages/commons/src/awsSdkUtils.ts @@ -1,6 +1,5 @@ -import { PT_VERSION } from '../version'; -import { isSdkClient } from './utils'; -import type { MiddlewareArgsLike } from '../types/awsSdk'; +import { PT_VERSION } from './version.js'; +import type { MiddlewareArgsLike, SdkClient } from './types/awsSdk.js'; /** * @internal @@ -13,6 +12,28 @@ const middlewareOptions = { tags: ['POWERTOOLS', 'USER_AGENT'], }; +/** + * @internal + * Type guard to check if the client provided is a valid AWS SDK v3 client + */ +const isSdkClient = (client: unknown): client is SdkClient => + typeof client === 'object' && + client !== null && + 'send' in client && + typeof client.send === 'function' && + 'config' in client && + client.config !== undefined && + typeof client.config === 'object' && + client.config !== null && + 'middlewareStack' in client && + client.middlewareStack !== undefined && + typeof client.middlewareStack === 'object' && + client.middlewareStack !== null && + 'identify' in client.middlewareStack && + typeof client.middlewareStack.identify === 'function' && + 'addRelativeTo' in client.middlewareStack && + typeof client.middlewareStack.addRelativeTo === 'function'; + /** * @internal * returns a middleware function for the MiddlewareStack, that can be used for the SDK clients @@ -54,4 +75,4 @@ const addUserAgentMiddleware = (client: unknown, feature: string): void => { } }; -export { customUserAgentMiddleware, addUserAgentMiddleware }; +export { customUserAgentMiddleware, addUserAgentMiddleware, isSdkClient }; diff --git a/packages/commons/src/config/EnvironmentVariablesService.ts b/packages/commons/src/config/EnvironmentVariablesService.ts index 3e1be7af6c..c422163ad3 100644 --- a/packages/commons/src/config/EnvironmentVariablesService.ts +++ b/packages/commons/src/config/EnvironmentVariablesService.ts @@ -1,4 +1,4 @@ -import { ConfigService } from './ConfigService'; +import { ConfigService } from './ConfigService.js'; /** * Class EnvironmentVariablesService diff --git a/packages/commons/src/config/index.ts b/packages/commons/src/config/index.ts deleted file mode 100644 index 1530e49ebf..0000000000 --- a/packages/commons/src/config/index.ts +++ /dev/null @@ -1,2 +0,0 @@ -export * from './ConfigService'; -export * from './EnvironmentVariablesService'; diff --git a/packages/commons/src/types/utils.ts b/packages/commons/src/guards.ts similarity index 81% rename from packages/commons/src/types/utils.ts rename to packages/commons/src/guards.ts index 7da5fd17ab..7776280e8b 100644 --- a/packages/commons/src/types/utils.ts +++ b/packages/commons/src/guards.ts @@ -50,10 +50,3 @@ const isString = (value: unknown): value is string => { }; export { isRecord, isString, isTruthy, isNullOrUndefined }; - -type JSONPrimitive = string | number | boolean | null | undefined; -type JSONValue = JSONPrimitive | JSONObject | JSONArray; -type JSONObject = { [key: number | string]: JSONValue }; -type JSONArray = Array; - -export type { JSONPrimitive, JSONValue, JSONObject, JSONArray }; diff --git a/packages/commons/src/index.ts b/packages/commons/src/index.ts index 0549592bf2..f6ff7df34e 100644 --- a/packages/commons/src/index.ts +++ b/packages/commons/src/index.ts @@ -1,8 +1,14 @@ -export * from './utils/lambda'; -export * from './Utility'; -export * from './config'; -export * as ContextExamples from './samples/resources/contexts'; -export * as Events from './samples/resources/events'; -export * from './types/middy'; -export * from './types/utils'; -export * from './awsSdk'; +export { isRecord, isString, isTruthy, isNullOrUndefined } from './guards.js'; +export { Utility } from './Utility.js'; +export { EnvironmentVariablesService } from './config/EnvironmentVariablesService.js'; +export * as ContextExamples from './samples/resources/contexts/index.js'; +export * as Events from './samples/resources/events/index.js'; +export { addUserAgentMiddleware, isSdkClient } from './awsSdkUtils.js'; +export { cleanupMiddlewares } from './middleware/cleanupMiddlewares.js'; +export { + TRACER_KEY, + LOGGER_KEY, + METRICS_KEY, + IDEMPOTENCY_KEY, +} from './middleware/constants.js'; +export { PT_VERSION } from './version.js'; diff --git a/packages/commons/src/middleware/cleanupMiddlewares.ts b/packages/commons/src/middleware/cleanupMiddlewares.ts index e35719b9d7..4f1046e6f1 100644 --- a/packages/commons/src/middleware/cleanupMiddlewares.ts +++ b/packages/commons/src/middleware/cleanupMiddlewares.ts @@ -3,8 +3,8 @@ import { METRICS_KEY, LOGGER_KEY, IDEMPOTENCY_KEY, -} from './constants'; -import type { MiddyLikeRequest, CleanupFunction } from '../types/middy'; +} from './constants.js'; +import type { MiddyLikeRequest, CleanupFunction } from '../types/middy.js'; // Typeguard to assert that an object is of Function type const isFunction = (obj: unknown): obj is CleanupFunction => { diff --git a/packages/commons/src/middleware/index.ts b/packages/commons/src/middleware/index.ts deleted file mode 100644 index 85f7388af3..0000000000 --- a/packages/commons/src/middleware/index.ts +++ /dev/null @@ -1,2 +0,0 @@ -export * from './cleanupMiddlewares'; -export * from './constants'; diff --git a/packages/commons/src/samples/resources/contexts/index.ts b/packages/commons/src/samples/resources/contexts/index.ts index 436927eee2..910f356d2c 100644 --- a/packages/commons/src/samples/resources/contexts/index.ts +++ b/packages/commons/src/samples/resources/contexts/index.ts @@ -1 +1 @@ -export * from './hello-world'; +export * from './hello-world.js'; diff --git a/packages/commons/src/samples/resources/events/index.ts b/packages/commons/src/samples/resources/events/index.ts index 45582e4428..94b087e514 100644 --- a/packages/commons/src/samples/resources/events/index.ts +++ b/packages/commons/src/samples/resources/events/index.ts @@ -1 +1 @@ -export * as Custom from './custom'; +export * as Custom from './custom/index.js'; diff --git a/packages/commons/src/utils/lambda/LambdaInterface.ts b/packages/commons/src/types/LambdaInterface.ts similarity index 100% rename from packages/commons/src/utils/lambda/LambdaInterface.ts rename to packages/commons/src/types/LambdaInterface.ts diff --git a/packages/commons/src/types/index.ts b/packages/commons/src/types/index.ts new file mode 100644 index 0000000000..a3f660eeda --- /dev/null +++ b/packages/commons/src/types/index.ts @@ -0,0 +1,4 @@ +export * from './middy.js'; +export * from './awsSdk.js'; +export * from './json.js'; +export * from './LambdaInterface.js'; diff --git a/packages/commons/src/types/json.ts b/packages/commons/src/types/json.ts new file mode 100644 index 0000000000..765491c699 --- /dev/null +++ b/packages/commons/src/types/json.ts @@ -0,0 +1,6 @@ +type JSONPrimitive = string | number | boolean | null | undefined; +type JSONValue = JSONPrimitive | JSONObject | JSONArray; +type JSONObject = { [key: number | string]: JSONValue }; +type JSONArray = Array; + +export type { JSONPrimitive, JSONValue, JSONObject, JSONArray }; diff --git a/packages/commons/src/utils/lambda/index.ts b/packages/commons/src/utils/lambda/index.ts deleted file mode 100644 index f57f966d0c..0000000000 --- a/packages/commons/src/utils/lambda/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './LambdaInterface'; diff --git a/packages/commons/tests/unit/config/EnvironmentVariablesService.test.ts b/packages/commons/tests/unit/EnvironmentVariablesService.test.ts similarity index 97% rename from packages/commons/tests/unit/config/EnvironmentVariablesService.test.ts rename to packages/commons/tests/unit/EnvironmentVariablesService.test.ts index 055a57ac61..c9592374d1 100644 --- a/packages/commons/tests/unit/config/EnvironmentVariablesService.test.ts +++ b/packages/commons/tests/unit/EnvironmentVariablesService.test.ts @@ -1,10 +1,10 @@ /** * Test EnvironmentVariablesService class * - * @group unit/commons/all + * @group unit/commons/environmentService */ -import { EnvironmentVariablesService } from '../../../src/config'; +import { EnvironmentVariablesService } from '../../src/index.js'; describe('Class: EnvironmentVariablesService', () => { const ENVIRONMENT_VARIABLES = process.env; diff --git a/packages/commons/tests/unit/LambdaInterface.test.ts b/packages/commons/tests/unit/LambdaInterface.test.ts index 52049aadc0..376d35bf52 100644 --- a/packages/commons/tests/unit/LambdaInterface.test.ts +++ b/packages/commons/tests/unit/LambdaInterface.test.ts @@ -5,14 +5,15 @@ */ import { Handler } from 'aws-lambda'; import { Callback, Context } from 'aws-lambda'; -import { - ContextExamples, +import { helloworldContext as context } from '../../src/samples/resources/contexts/hello-world'; +import type { SyncHandler, AsyncHandler, LambdaInterface, -} from '../../src'; +} from '../../src/types/index.js'; describe('LambdaInterface with arrow function', () => { + jest.spyOn(console, 'log').mockImplementation(); test('it compiles when given a callback', async () => { class LambdaFunction implements LambdaInterface { public handler: SyncHandler = async ( @@ -28,10 +29,8 @@ describe('LambdaInterface with arrow function', () => { }; } - await new LambdaFunction().handler( - {}, - ContextExamples.helloworldContext, - () => console.log('Lambda invoked!') + new LambdaFunction().handler({}, context, () => + console.log('Lambda invoked!') ); }); @@ -45,7 +44,7 @@ describe('LambdaInterface with arrow function', () => { }; } - await new LambdaFunction().handler({}, ContextExamples.helloworldContext); + await new LambdaFunction().handler({}, context); }); }); @@ -62,10 +61,8 @@ describe('LambdaInterface with standard function', () => { } } - await new LambdaFunction().handler( - {}, - ContextExamples.helloworldContext, - () => console.log('Lambda invoked!') + new LambdaFunction().handler({}, context, () => + console.log('Lambda invoked!') ); }); @@ -80,7 +77,7 @@ describe('LambdaInterface with standard function', () => { } } - await new LambdaFunction().handler({}, ContextExamples.helloworldContext); + await new LambdaFunction().handler({}, context); }); }); @@ -138,7 +135,7 @@ describe('LambdaInterface with decorator', () => { } } - await new LambdaFunction().handler({}, ContextExamples.helloworldContext); + await new LambdaFunction().handler({}, context); }); test('decorator with callback compile', async () => { @@ -154,10 +151,8 @@ describe('LambdaInterface with decorator', () => { } } - await new LambdaFunction().handler( - {}, - ContextExamples.helloworldContext, - () => console.log('Lambda invoked!') + new LambdaFunction().handler({}, context, () => + console.log('Lambda invoked!') ); }); }); diff --git a/packages/commons/tests/unit/Utility.test.ts b/packages/commons/tests/unit/Utility.test.ts index f289d15d85..9e9d18194e 100644 --- a/packages/commons/tests/unit/Utility.test.ts +++ b/packages/commons/tests/unit/Utility.test.ts @@ -3,7 +3,7 @@ * * @group unit/commons/utility */ -import { Utility } from '../../src'; +import { Utility } from '../../src/index.js'; describe('Class: Utility', () => { beforeEach(() => { diff --git a/packages/commons/tests/unit/awsSdk.test.ts b/packages/commons/tests/unit/awsSdkUtils.test.ts similarity index 94% rename from packages/commons/tests/unit/awsSdk.test.ts rename to packages/commons/tests/unit/awsSdkUtils.test.ts index fd02efd9ab..ca9dfbd401 100644 --- a/packages/commons/tests/unit/awsSdk.test.ts +++ b/packages/commons/tests/unit/awsSdkUtils.test.ts @@ -1,6 +1,9 @@ -import { addUserAgentMiddleware, isSdkClient } from '../../src/awsSdk'; -import { PT_VERSION as version } from '../../src/version'; -import { customUserAgentMiddleware } from '../../src/awsSdk/userAgentMiddleware'; +import { + addUserAgentMiddleware, + isSdkClient, + PT_VERSION as version, +} from '../../src/index.js'; +import { customUserAgentMiddleware } from '../../src/awsSdkUtils.js'; describe('Helpers: awsSdk', () => { describe('Function: userAgentMiddleware', () => { diff --git a/packages/commons/tests/unit/cleanupMiddlewares.test.ts b/packages/commons/tests/unit/cleanupMiddlewares.test.ts index 12583d9107..c3f92f965f 100644 --- a/packages/commons/tests/unit/cleanupMiddlewares.test.ts +++ b/packages/commons/tests/unit/cleanupMiddlewares.test.ts @@ -7,7 +7,9 @@ import { cleanupMiddlewares, TRACER_KEY, METRICS_KEY, -} from '../../src/middleware'; + LOGGER_KEY, + IDEMPOTENCY_KEY, +} from '../../src/index.js'; import { helloworldContext as context } from '../../src/samples/resources/contexts/hello-world'; describe('Function: cleanupMiddlewares', () => { @@ -15,6 +17,8 @@ describe('Function: cleanupMiddlewares', () => { // Prepare const mockCleanupFunction1 = jest.fn(); const mockCleanupFunction2 = jest.fn(); + const mockCleanupFunction3 = jest.fn(); + const mockCleanupFunction4 = jest.fn(); const mockRequest = { event: {}, context: context, @@ -23,6 +27,8 @@ describe('Function: cleanupMiddlewares', () => { internal: { [TRACER_KEY]: mockCleanupFunction1, [METRICS_KEY]: mockCleanupFunction2, + [LOGGER_KEY]: mockCleanupFunction3, + [IDEMPOTENCY_KEY]: mockCleanupFunction4, }, }; @@ -34,6 +40,10 @@ describe('Function: cleanupMiddlewares', () => { expect(mockCleanupFunction1).toHaveBeenCalledWith(mockRequest); expect(mockCleanupFunction2).toHaveBeenCalledTimes(1); expect(mockCleanupFunction2).toHaveBeenCalledWith(mockRequest); + expect(mockCleanupFunction3).toHaveBeenCalledTimes(1); + expect(mockCleanupFunction3).toHaveBeenCalledWith(mockRequest); + expect(mockCleanupFunction4).toHaveBeenCalledTimes(1); + expect(mockCleanupFunction4).toHaveBeenCalledWith(mockRequest); }); it('resolves successfully if no cleanup function is present', async () => { // Prepare diff --git a/packages/commons/tests/unit/utils.test.ts b/packages/commons/tests/unit/guards.test.ts similarity index 95% rename from packages/commons/tests/unit/utils.test.ts rename to packages/commons/tests/unit/guards.test.ts index 464b05958f..53e248e643 100644 --- a/packages/commons/tests/unit/utils.test.ts +++ b/packages/commons/tests/unit/guards.test.ts @@ -1,16 +1,16 @@ /** - * Test utils functions + * Test guards functions * - * @group unit/commons/utils + * @group unit/commons/guards */ import { isRecord, isTruthy, isNullOrUndefined, isString, -} from '../../src/types/utils'; +} from '../../src/index.js'; -describe('Functions: utils', () => { +describe('Functions: guards', () => { beforeEach(() => { jest.clearAllMocks(); jest.resetModules(); diff --git a/packages/commons/tsconfig.esm.json b/packages/commons/tsconfig.esm.json new file mode 100644 index 0000000000..9bed8e4da4 --- /dev/null +++ b/packages/commons/tsconfig.esm.json @@ -0,0 +1,11 @@ +{ + "extends": "../../tsconfig.esm.json", + "compilerOptions": { + "baseUrl": ".", + "outDir": "./lib/esm", + "rootDir": "./src" + }, + "include": [ + "./src/**/*" + ] +} \ No newline at end of file diff --git a/packages/commons/tsconfig.json b/packages/commons/tsconfig.json index 1cb9d72773..5be842b9f8 100644 --- a/packages/commons/tsconfig.json +++ b/packages/commons/tsconfig.json @@ -1,7 +1,7 @@ { "extends": "../../tsconfig.json", "compilerOptions": { - "outDir": "./lib", + "outDir": "./lib/cjs/", "rootDir": "./src", }, "include": [ diff --git a/packages/idempotency/src/IdempotencyHandler.ts b/packages/idempotency/src/IdempotencyHandler.ts index 7deb2c53f7..c2e85dfeb0 100644 --- a/packages/idempotency/src/IdempotencyHandler.ts +++ b/packages/idempotency/src/IdempotencyHandler.ts @@ -1,7 +1,7 @@ import type { JSONValue, MiddyLikeRequest, -} from '@aws-lambda-powertools/commons'; +} from '@aws-lambda-powertools/commons/types'; import type { AnyFunction, IdempotencyHandlerOptions } from './types'; import { IdempotencyAlreadyInProgressError, diff --git a/packages/idempotency/src/middleware/makeHandlerIdempotent.ts b/packages/idempotency/src/middleware/makeHandlerIdempotent.ts index 25c4525f58..55edb314dc 100644 --- a/packages/idempotency/src/middleware/makeHandlerIdempotent.ts +++ b/packages/idempotency/src/middleware/makeHandlerIdempotent.ts @@ -3,13 +3,13 @@ import { IdempotencyConfig } from '../IdempotencyConfig'; import { cleanupMiddlewares, IDEMPOTENCY_KEY, -} from '@aws-lambda-powertools/commons/lib/middleware'; +} from '@aws-lambda-powertools/commons'; import type { AnyFunction, IdempotencyLambdaHandlerOptions } from '../types'; import type { MiddlewareLikeObj, MiddyLikeRequest, JSONValue, -} from '@aws-lambda-powertools/commons'; +} from '@aws-lambda-powertools/commons/types'; /** * @internal diff --git a/packages/idempotency/src/persistence/BasePersistenceLayer.ts b/packages/idempotency/src/persistence/BasePersistenceLayer.ts index e90118d042..1f1ff33e84 100644 --- a/packages/idempotency/src/persistence/BasePersistenceLayer.ts +++ b/packages/idempotency/src/persistence/BasePersistenceLayer.ts @@ -10,7 +10,7 @@ import { IdempotencyValidationError, } from '../errors'; import { LRUCache } from './LRUCache'; -import type { JSONValue } from '@aws-lambda-powertools/commons'; +import type { JSONValue } from '@aws-lambda-powertools/commons/types'; /** * Base class for all persistence layers. This class provides the basic functionality for diff --git a/packages/idempotency/src/persistence/IdempotencyRecord.ts b/packages/idempotency/src/persistence/IdempotencyRecord.ts index 7811bc7413..feb618ddf5 100644 --- a/packages/idempotency/src/persistence/IdempotencyRecord.ts +++ b/packages/idempotency/src/persistence/IdempotencyRecord.ts @@ -1,4 +1,4 @@ -import type { JSONValue } from '@aws-lambda-powertools/commons'; +import type { JSONValue } from '@aws-lambda-powertools/commons/types'; import type { IdempotencyRecordOptions, IdempotencyRecordStatusValue, diff --git a/packages/idempotency/src/types/IdempotencyOptions.ts b/packages/idempotency/src/types/IdempotencyOptions.ts index 959d014321..ea929f765b 100644 --- a/packages/idempotency/src/types/IdempotencyOptions.ts +++ b/packages/idempotency/src/types/IdempotencyOptions.ts @@ -1,7 +1,7 @@ import type { Context } from 'aws-lambda'; import { BasePersistenceLayer } from '../persistence/BasePersistenceLayer'; import { IdempotencyConfig } from '../IdempotencyConfig'; -import type { JSONValue } from '@aws-lambda-powertools/commons'; +import type { JSONValue } from '@aws-lambda-powertools/commons/types'; /** * Configuration options for the idempotency utility. diff --git a/packages/idempotency/src/types/IdempotencyRecord.ts b/packages/idempotency/src/types/IdempotencyRecord.ts index 251d9c3c45..b7fc48b0dc 100644 --- a/packages/idempotency/src/types/IdempotencyRecord.ts +++ b/packages/idempotency/src/types/IdempotencyRecord.ts @@ -1,4 +1,4 @@ -import type { JSONValue } from '@aws-lambda-powertools/commons'; +import type { JSONValue } from '@aws-lambda-powertools/commons/types'; import { IdempotencyRecordStatus } from '../constants'; type IdempotencyRecordStatusValue = diff --git a/packages/idempotency/tests/e2e/idempotentDecorator.test.FunctionCode.ts b/packages/idempotency/tests/e2e/idempotentDecorator.test.FunctionCode.ts index 8dd29c0b29..4a6a64f1a9 100644 --- a/packages/idempotency/tests/e2e/idempotentDecorator.test.FunctionCode.ts +++ b/packages/idempotency/tests/e2e/idempotentDecorator.test.FunctionCode.ts @@ -1,5 +1,5 @@ import type { Context } from 'aws-lambda'; -import { LambdaInterface } from '@aws-lambda-powertools/commons'; +import type { LambdaInterface } from '@aws-lambda-powertools/commons/types'; import { idempotent } from '../../src'; import { Logger } from '../../../logger'; import { DynamoDBPersistenceLayer } from '../../src/persistence/DynamoDBPersistenceLayer'; diff --git a/packages/idempotency/tests/unit/idempotencyDecorator.test.ts b/packages/idempotency/tests/unit/idempotencyDecorator.test.ts index 1a293d8569..f12b9ae6d3 100644 --- a/packages/idempotency/tests/unit/idempotencyDecorator.test.ts +++ b/packages/idempotency/tests/unit/idempotencyDecorator.test.ts @@ -15,7 +15,7 @@ import { } from '../../src/errors'; import { IdempotencyConfig } from '../../src'; import { Context } from 'aws-lambda'; -import { helloworldContext } from '@aws-lambda-powertools/commons/lib/samples/resources/contexts'; +import { ContextExamples as context } from '@aws-lambda-powertools/commons'; import { IdempotencyRecordStatus } from '../../src/constants'; const mockSaveInProgress = jest @@ -28,7 +28,7 @@ const mockGetRecord = jest .spyOn(BasePersistenceLayer.prototype, 'getRecord') .mockImplementation(); -const dummyContext = helloworldContext; +const dummyContext = context.helloworldContext; const mockConfig: IdempotencyConfig = new IdempotencyConfig({}); diff --git a/packages/idempotency/tests/unit/makeHandlerIdempotent.test.ts b/packages/idempotency/tests/unit/makeHandlerIdempotent.test.ts index db064e6f38..ae628dd121 100644 --- a/packages/idempotency/tests/unit/makeHandlerIdempotent.test.ts +++ b/packages/idempotency/tests/unit/makeHandlerIdempotent.test.ts @@ -4,8 +4,10 @@ * @group unit/idempotency/makeHandlerIdempotent */ import { makeHandlerIdempotent } from '../../src/middleware'; -import { helloworldContext as dummyContext } from '@aws-lambda-powertools/commons/lib/samples/resources/contexts'; -import { Custom as dummyEvent } from '@aws-lambda-powertools/commons/lib/samples/resources/events'; +import { + ContextExamples as dummyContext, + Events as dummyEvent, +} from '@aws-lambda-powertools/commons'; import { IdempotencyRecord } from '../../src/persistence'; import { IdempotencyInconsistentStateError, @@ -25,8 +27,8 @@ const remainingTImeInMillis = 1234; describe('Middleware: makeHandlerIdempotent', () => { const ENVIRONMENT_VARIABLES = process.env; - const context = dummyContext; - const event = dummyEvent.CustomEvent; + const context = dummyContext.helloworldContext; + const event = dummyEvent.Custom; beforeEach(() => { jest.clearAllMocks(); diff --git a/packages/idempotency/tests/unit/makeIdempotent.test.ts b/packages/idempotency/tests/unit/makeIdempotent.test.ts index d46bc7ad6b..da7b3ef194 100644 --- a/packages/idempotency/tests/unit/makeIdempotent.test.ts +++ b/packages/idempotency/tests/unit/makeIdempotent.test.ts @@ -11,8 +11,10 @@ import { IdempotencyPersistenceLayerError, } from '../../src/errors'; import { IdempotencyConfig } from '../../src'; -import { helloworldContext as dummyContext } from '@aws-lambda-powertools/commons/lib/samples/resources/contexts'; -import { Custom as dummyEvent } from '@aws-lambda-powertools/commons/lib/samples/resources/events'; +import { + ContextExamples as dummyContext, + Events as dummyEvent, +} from '@aws-lambda-powertools/commons'; import { MAX_RETRIES, IdempotencyRecordStatus } from '../../src/constants'; import { PersistenceLayerTestClass } from '../helpers/idempotencyUtils'; import type { Context } from 'aws-lambda'; @@ -24,8 +26,8 @@ const remainingTImeInMillis = 1234; describe('Function: makeIdempotent', () => { const ENVIRONMENT_VARIABLES = process.env; - const context = dummyContext; - const event = dummyEvent.CustomEvent; + const context = dummyContext.helloworldContext; + const event = dummyEvent.Custom; beforeEach(() => { jest.clearAllMocks(); diff --git a/packages/logger/jest.config.cjs b/packages/logger/jest.config.cjs index 272f582c6c..deb2a416a5 100644 --- a/packages/logger/jest.config.cjs +++ b/packages/logger/jest.config.cjs @@ -4,17 +4,11 @@ module.exports = { color: 'cyan', }, runner: 'groups', - extensionsToTreatAsEsm: ['.ts'], moduleNameMapper: { '^(\\.{1,2}/.*)\\.js$': '$1', }, transform: { - '^.+\\.[tj]sx?$': [ - 'ts-jest', - { - useESM: true, - }, - ], + '^.+\\.ts?$': 'ts-jest', }, moduleFileExtensions: ['js', 'ts'], collectCoverageFrom: ['**/src/**/*.ts', '!**/node_modules/**'], @@ -22,7 +16,7 @@ module.exports = { roots: ['/src', '/tests'], testPathIgnorePatterns: ['/node_modules/'], testEnvironment: 'node', - coveragePathIgnorePatterns: ['/node_modules/', '/types/'], + coveragePathIgnorePatterns: ['/node_modules/', 'src/types/index.ts'], coverageThreshold: { global: { statements: 100, diff --git a/packages/logger/package.json b/packages/logger/package.json index 563ffa7e48..62c72dae32 100644 --- a/packages/logger/package.json +++ b/packages/logger/package.json @@ -22,8 +22,7 @@ "lint": "eslint --ext .ts,.js --no-error-on-unmatched-pattern .", "lint-fix": "eslint --fix --ext .ts,.js --no-error-on-unmatched-pattern .", "prebuild": "rimraf ./lib", - "postbuild": "rimraf ./lib/*.tsbuildinfo", - "prepack": "node ../../.github/scripts/release_patch_package_json.js ." + "prepack": "rimraf ./lib/*.tsbuildinfo && node ../../.github/scripts/release_patch_package_json.js ." }, "lint-staged": { "*.{js,ts}": "npm run lint-fix" diff --git a/packages/logger/src/Logger.ts b/packages/logger/src/Logger.ts index b864c997b6..3bf7b3caf9 100644 --- a/packages/logger/src/Logger.ts +++ b/packages/logger/src/Logger.ts @@ -930,7 +930,7 @@ class Logger extends Utility implements ClassThatLogs { * @returns {void} */ private setLogFormatter(logFormatter?: LogFormatterInterface): void { - this.logFormatter = logFormatter || new PowertoolsLogFormatter(); + this.logFormatter = logFormatter ?? new PowertoolsLogFormatter(); } /** diff --git a/packages/logger/src/index.ts b/packages/logger/src/index.ts index dfedabfdff..096d26bb30 100644 --- a/packages/logger/src/index.ts +++ b/packages/logger/src/index.ts @@ -1,5 +1,3 @@ export { Logger } from './Logger.js'; -export { injectLambdaContext } from './middleware/middy.js'; -export { PowertoolsLogFormatter } from './formatter/PowertoolsLogFormatter.js'; export { LogFormatter } from './formatter/LogFormatter.js'; -export { LogFormatterInterface } from './formatter/LogFormatterInterface.js'; +export { LogItem } from './log/LogItem.js'; diff --git a/packages/logger/src/middleware/middy.ts b/packages/logger/src/middleware/middy.ts index 9e49dcbf63..7d8b3099da 100644 --- a/packages/logger/src/middleware/middy.ts +++ b/packages/logger/src/middleware/middy.ts @@ -1,11 +1,11 @@ import { Logger } from '../Logger.js'; import { LogAttributes } from '../types/Log.js'; import { HandlerOptions } from '../types/Logger.js'; -import { LOGGER_KEY } from '@aws-lambda-powertools/commons/lib/middleware'; +import { LOGGER_KEY } from '@aws-lambda-powertools/commons'; import type { MiddlewareLikeObj, MiddyLikeRequest, -} from '@aws-lambda-powertools/commons'; +} from '@aws-lambda-powertools/commons/types'; /** * A middy middleware that helps emitting CloudWatch EMF metrics in your logs. diff --git a/packages/logger/src/types/Logger.ts b/packages/logger/src/types/Logger.ts index 60f681dc60..193d72daef 100644 --- a/packages/logger/src/types/Logger.ts +++ b/packages/logger/src/types/Logger.ts @@ -1,8 +1,8 @@ -import { +import type { AsyncHandler, LambdaInterface, SyncHandler, -} from '@aws-lambda-powertools/commons'; +} from '@aws-lambda-powertools/commons/types'; import { Handler } from 'aws-lambda'; import { ConfigServiceInterface } from '../config/ConfigServiceInterface.js'; import { LogFormatterInterface } from '../formatter/LogFormatterInterface.js'; diff --git a/packages/logger/tests/e2e/sampleRate.decorator.test.FunctionCode.ts b/packages/logger/tests/e2e/sampleRate.decorator.test.FunctionCode.ts index 810e739bdf..32256a17ae 100644 --- a/packages/logger/tests/e2e/sampleRate.decorator.test.FunctionCode.ts +++ b/packages/logger/tests/e2e/sampleRate.decorator.test.FunctionCode.ts @@ -1,7 +1,7 @@ import { Logger } from '../../src'; import { TestEvent, TestOutput } from '../helpers/types'; import { Context } from 'aws-lambda'; -import { LambdaInterface } from '@aws-lambda-powertools/commons'; +import type { LambdaInterface } from '@aws-lambda-powertools/commons/types'; const SAMPLE_RATE = parseFloat(process.env.SAMPLE_RATE || '0.1'); const LOG_MSG = process.env.LOG_MSG || 'Hello World'; diff --git a/packages/logger/tests/unit/Logger.test.ts b/packages/logger/tests/unit/Logger.test.ts index 531215667a..1bcbc0fe4b 100644 --- a/packages/logger/tests/unit/Logger.test.ts +++ b/packages/logger/tests/unit/Logger.test.ts @@ -6,13 +6,12 @@ import { ContextExamples as dummyContext, Events as dummyEvent, - LambdaInterface, } from '@aws-lambda-powertools/commons'; -import { Logger } from '../../src/Logger.js'; +import type { LambdaInterface } from '@aws-lambda-powertools/commons/types'; +import { Logger, LogFormatter } from '../../src/index.js'; import { ConfigServiceInterface } from '../../src/config/ConfigServiceInterface.js'; import { EnvironmentVariablesService } from '../../src/config/EnvironmentVariablesService.js'; import { PowertoolsLogFormatter } from '../../src/formatter/PowertoolsLogFormatter.js'; -import { LogFormatter } from '../../src/formatter/LogFormatter.js'; import { LogLevelThresholds, LogLevel } from '../../src/types/Log.js'; import { ClassThatLogs, @@ -20,7 +19,7 @@ import { ConstructorOptions, } from '../../src/types/Logger.js'; import type { Context } from 'aws-lambda'; -import { Console } from 'console'; +import { Console } from 'node:console'; const mockDate = new Date(1466424490000); const dateSpy = jest.spyOn(global, 'Date').mockImplementation(() => mockDate); diff --git a/packages/logger/tests/unit/formatter/PowertoolsLogFormatter.test.ts b/packages/logger/tests/unit/formatter/PowertoolsLogFormatter.test.ts index d361a9439f..1d66414797 100644 --- a/packages/logger/tests/unit/formatter/PowertoolsLogFormatter.test.ts +++ b/packages/logger/tests/unit/formatter/PowertoolsLogFormatter.test.ts @@ -5,6 +5,7 @@ */ import { AssertionError, strictEqual } from 'assert'; import { PowertoolsLogFormatter } from '../../../src/formatter/PowertoolsLogFormatter.js'; +import { LogItem } from '../../../src/index.js'; import { UnformattedAttributes } from '../../../src/types/Logger.js'; import { LogAttributes } from '../../../src/types/Log.js'; @@ -52,6 +53,7 @@ describe('Class: PowertoolsLogFormatter', () => { timestamp: '2016-06-20T12:08:10.000Z', xray_trace_id: '1-5759e988-bd862e3fe1be46a994272793', }); + expect(value).toBeInstanceOf(LogItem); }); test('when optional parameters DO have a value set, it returns an object with expected structure and values', () => { @@ -119,12 +121,12 @@ describe('Class: PowertoolsLogFormatter', () => { const formattedError = formatter.formatError(error); expect(formattedError).toEqual({ location: expect.stringMatching( - /PowertoolsLogFormatter.test.ts:[0-9]+$/ + /PowertoolsLogFormatter.test.ts:\d+$/ ), message: 'Ouch!', name: 'Error', stack: expect.stringMatching( - /PowertoolsLogFormatter.test.ts:[0-9]+:[0-9]+/ + /PowertoolsLogFormatter.test.ts:\d+:\d+/ ), }); } @@ -151,12 +153,12 @@ describe('Class: PowertoolsLogFormatter', () => { const formattedReferenceError = formatter.formatError(error); expect(formattedReferenceError).toEqual({ location: expect.stringMatching( - /PowertoolsLogFormatter.test.ts:[0-9]+$/ + /PowertoolsLogFormatter.test.ts:\d+$/ ), message: 'doesNotExist is not defined', name: 'ReferenceError', stack: expect.stringMatching( - /PowertoolsLogFormatter.test.ts:[0-9]+:[0-9]+/ + /PowertoolsLogFormatter.test.ts:\d+:\d+/ ), }); } @@ -181,15 +183,13 @@ describe('Class: PowertoolsLogFormatter', () => { error ); expect(formattedAssertionError).toEqual({ - location: expect.stringMatching( - /PowertoolsLogFormatter.test.ts:[0-9]+/ - ), + location: expect.stringMatching(/PowertoolsLogFormatter.test.ts:\d+/), message: expect.stringMatching( /Expected values to be strictly equal/ ), name: 'AssertionError', stack: expect.stringMatching( - /PowertoolsLogFormatter.test.ts:[0-9]+:[0-9]+/ + /PowertoolsLogFormatter.test.ts:\d+:\d+/ ), }); } @@ -212,13 +212,11 @@ describe('Class: PowertoolsLogFormatter', () => { expect(error).toBeInstanceOf(RangeError); const formattedRangeError = formatter.formatError(error); expect(formattedRangeError).toEqual({ - location: expect.stringMatching( - /PowertoolsLogFormatter.test.ts:[0-9]+/ - ), + location: expect.stringMatching(/PowertoolsLogFormatter.test.ts:\d+/), message: 'The argument must be between 10 and 20', name: 'RangeError', stack: expect.stringMatching( - /PowertoolsLogFormatter.test.ts:[0-9]+:[0-9]+/ + /PowertoolsLogFormatter.test.ts:\d+:\d+/ ), }); } @@ -241,13 +239,11 @@ describe('Class: PowertoolsLogFormatter', () => { expect(error).toBeInstanceOf(SyntaxError); const formattedSyntaxError = formatter.formatError(error); expect(formattedSyntaxError).toEqual({ - location: expect.stringMatching( - /PowertoolsLogFormatter.test.ts:[0-9]+/ - ), + location: expect.stringMatching(/PowertoolsLogFormatter.test.ts:\d+/), message: 'Unexpected identifier', name: 'SyntaxError', stack: expect.stringMatching( - /PowertoolsLogFormatter.test.ts:[0-9]+:[0-9]+/ + /PowertoolsLogFormatter.test.ts:\d+:\d+/ ), }); } @@ -274,13 +270,11 @@ describe('Class: PowertoolsLogFormatter', () => { expect(error).toBeInstanceOf(Error); const formattedTypeError = formatter.formatError(error); expect(formattedTypeError).toEqual({ - location: expect.stringMatching( - /PowertoolsLogFormatter.test.ts:[0-9]+/ - ), + location: expect.stringMatching(/PowertoolsLogFormatter.test.ts:\d+/), message: expect.stringMatching(/Cannot read propert/), name: 'TypeError', stack: expect.stringMatching( - /PowertoolsLogFormatter.test.ts:[0-9]+:[0-9]+/ + /PowertoolsLogFormatter.test.ts:\d+:\d+/ ), }); } @@ -303,13 +297,11 @@ describe('Class: PowertoolsLogFormatter', () => { expect(error).toBeInstanceOf(URIError); const formattedURIError = formatter.formatError(error); expect(formattedURIError).toEqual({ - location: expect.stringMatching( - /PowertoolsLogFormatter.test.ts:[0-9]+/ - ), + location: expect.stringMatching(/PowertoolsLogFormatter.test.ts:\d+/), message: 'URI malformed', name: 'URIError', stack: expect.stringMatching( - /PowertoolsLogFormatter.test.ts:[0-9]+:[0-9]+/ + /PowertoolsLogFormatter.test.ts:\d+:\d+/ ), }); } @@ -335,22 +327,16 @@ describe('Class: PowertoolsLogFormatter', () => { // Assess expect(formattedURIError).toEqual({ - location: expect.stringMatching( - /PowertoolsLogFormatter.test.ts:[0-9]+/ - ), + location: expect.stringMatching(/PowertoolsLogFormatter.test.ts:\d+/), message: 'foo', name: 'Error', - stack: expect.stringMatching( - /PowertoolsLogFormatter.test.ts:[0-9]+:[0-9]+/ - ), + stack: expect.stringMatching(/PowertoolsLogFormatter.test.ts:\d+:\d+/), cause: { - location: expect.stringMatching( - /PowertoolsLogFormatter.test.ts:[0-9]+/ - ), + location: expect.stringMatching(/PowertoolsLogFormatter.test.ts:\d+/), message: 'bar', name: 'Error', stack: expect.stringMatching( - /PowertoolsLogFormatter.test.ts:[0-9]+:[0-9]+/ + /PowertoolsLogFormatter.test.ts:\d+:\d+/ ), }, }); @@ -374,14 +360,10 @@ describe('Class: PowertoolsLogFormatter', () => { // Assess expect(formattedURIError).toEqual({ - location: expect.stringMatching( - /PowertoolsLogFormatter.test.ts:[0-9]+/ - ), + location: expect.stringMatching(/PowertoolsLogFormatter.test.ts:\d+/), message: 'foo', name: 'Error', - stack: expect.stringMatching( - /PowertoolsLogFormatter.test.ts:[0-9]+:[0-9]+/ - ), + stack: expect.stringMatching(/PowertoolsLogFormatter.test.ts:\d+:\d+/), cause: 'bar', }); }); diff --git a/packages/logger/tests/unit/middleware/middy.test.ts b/packages/logger/tests/unit/middleware/middy.test.ts index 9d4aaa604b..c5c32eab4a 100644 --- a/packages/logger/tests/unit/middleware/middy.test.ts +++ b/packages/logger/tests/unit/middleware/middy.test.ts @@ -6,8 +6,8 @@ import { ContextExamples as dummyContext, Events as dummyEvent, + cleanupMiddlewares, } from '@aws-lambda-powertools/commons'; -import { cleanupMiddlewares } from '@aws-lambda-powertools/commons/lib/middleware'; import { ConfigServiceInterface } from '../../../src/config/ConfigServiceInterface.js'; import { EnvironmentVariablesService } from '../../../src/config/EnvironmentVariablesService.js'; import { injectLambdaContext } from '../../../src/middleware/middy.js'; diff --git a/packages/metrics/src/middleware/middy.ts b/packages/metrics/src/middleware/middy.ts index 0da5c04828..5a2bbbaec4 100644 --- a/packages/metrics/src/middleware/middy.ts +++ b/packages/metrics/src/middleware/middy.ts @@ -1,10 +1,10 @@ -import { METRICS_KEY } from '@aws-lambda-powertools/commons/lib/middleware'; +import { METRICS_KEY } from '@aws-lambda-powertools/commons'; import type { Metrics } from '../Metrics'; import type { ExtraOptions } from '../types'; import type { MiddlewareLikeObj, MiddyLikeRequest, -} from '@aws-lambda-powertools/commons'; +} from '@aws-lambda-powertools/commons/types'; /** * A middy middleware automating capture of metadata and annotations on segments or subsegments for a Lambda Handler. diff --git a/packages/metrics/src/types/Metrics.ts b/packages/metrics/src/types/Metrics.ts index ef5e7d5454..73d8b60d10 100644 --- a/packages/metrics/src/types/Metrics.ts +++ b/packages/metrics/src/types/Metrics.ts @@ -3,7 +3,7 @@ import type { LambdaInterface, AsyncHandler, SyncHandler, -} from '@aws-lambda-powertools/commons'; +} from '@aws-lambda-powertools/commons/types'; import { ConfigServiceInterface } from '../config'; import { MetricUnit } from './MetricUnit'; import { MetricResolution } from './MetricResolution'; diff --git a/packages/metrics/tests/helpers/metricsUtils.ts b/packages/metrics/tests/helpers/metricsUtils.ts index 5254b474cb..8172fb3451 100644 --- a/packages/metrics/tests/helpers/metricsUtils.ts +++ b/packages/metrics/tests/helpers/metricsUtils.ts @@ -7,7 +7,7 @@ import { } from '@aws-sdk/client-cloudwatch'; import type { ListMetricsCommandOutput } from '@aws-sdk/client-cloudwatch'; import type { Context, Handler } from 'aws-lambda'; -import type { LambdaInterface } from '@aws-lambda-powertools/commons'; +import type { LambdaInterface } from '@aws-lambda-powertools/commons/types'; const getMetrics = async ( cloudWatchClient: CloudWatchClient, diff --git a/packages/metrics/tests/unit/Metrics.test.ts b/packages/metrics/tests/unit/Metrics.test.ts index 81808a0f5c..286f618d65 100644 --- a/packages/metrics/tests/unit/Metrics.test.ts +++ b/packages/metrics/tests/unit/Metrics.test.ts @@ -4,10 +4,10 @@ * @group unit/metrics/class */ import { - LambdaInterface, ContextExamples as dummyContext, Events as dummyEvent, } from '@aws-lambda-powertools/commons'; +import type { LambdaInterface } from '@aws-lambda-powertools/commons/types'; import { MetricResolution, MetricUnits, Metrics } from '../../src/'; import { Context, Handler } from 'aws-lambda'; import { Dimensions, EmfOutput, MetricsOptions } from '../../src/types'; diff --git a/packages/metrics/tests/unit/middleware/middy.test.ts b/packages/metrics/tests/unit/middleware/middy.test.ts index 5713bcbe9c..1c5b83e6f5 100644 --- a/packages/metrics/tests/unit/middleware/middy.test.ts +++ b/packages/metrics/tests/unit/middleware/middy.test.ts @@ -11,9 +11,11 @@ import { } from '../../../../metrics/src'; import middy from '@middy/core'; import { ExtraOptions } from '../../../src/types'; -import { cleanupMiddlewares } from '@aws-lambda-powertools/commons/lib/middleware'; -import { helloworldContext as dummyContext } from '@aws-lambda-powertools/commons/lib/samples/resources/contexts/hello-world'; -import { CustomEvent as dummyEvent } from '@aws-lambda-powertools/commons/lib/samples/resources/events/custom/index'; +import { + cleanupMiddlewares, + ContextExamples as dummyContext, + Events as dummyEvent, +} from '@aws-lambda-powertools/commons'; const consoleSpy = jest.spyOn(console, 'log').mockImplementation(); const consoleWarnSpy = jest.spyOn(console, 'warn').mockImplementation(); @@ -43,7 +45,7 @@ describe('Middy middleware', () => { ); try { - await handler(dummyEvent, dummyContext, () => + await handler(dummyEvent, dummyContext.helloworldContext, () => console.log('Lambda invoked!') ); } catch (e) { @@ -69,7 +71,7 @@ describe('Middy middleware', () => { ); try { - await handler(dummyEvent, dummyContext, () => + await handler(dummyEvent, dummyContext.helloworldContext, () => console.log('Lambda invoked!') ); } catch (e) { @@ -90,7 +92,7 @@ describe('Middy middleware', () => { // Act & Assess await expect( - handler(dummyEvent, dummyContext) + handler(dummyEvent, dummyContext.helloworldContext) ).resolves.not.toThrowError(); expect(consoleWarnSpy).toBeCalledTimes(1); expect(consoleWarnSpy).toBeCalledWith( @@ -115,10 +117,10 @@ describe('Middy middleware', () => { logMetrics(metrics, { captureColdStartMetric: true }) ); - await handler(dummyEvent, dummyContext, () => + await handler(dummyEvent, dummyContext.helloworldContext, () => console.log('Lambda invoked!') ); - await handler(dummyEvent, dummyContext, () => + await handler(dummyEvent, dummyContext.helloworldContext, () => console.log('Lambda invoked! again') ); const loggedData = [ @@ -152,10 +154,10 @@ describe('Middy middleware', () => { logMetrics(metrics, { captureColdStartMetric: false }) ); - await handler(dummyEvent, dummyContext, () => + await handler(dummyEvent, dummyContext.helloworldContext, () => console.log('Lambda invoked!') ); - await handler(dummyEvent, dummyContext, () => + await handler(dummyEvent, dummyContext.helloworldContext, () => console.log('Lambda invoked! again') ); const loggedData = [ @@ -179,10 +181,10 @@ describe('Middy middleware', () => { const handler = middy(lambdaHandler).use(logMetrics(metrics)); - await handler(dummyEvent, dummyContext, () => + await handler(dummyEvent, dummyContext.helloworldContext, () => console.log('Lambda invoked!') ); - await handler(dummyEvent, dummyContext, () => + await handler(dummyEvent, dummyContext.helloworldContext, () => console.log('Lambda invoked! again') ); const loggedData = [ @@ -210,7 +212,7 @@ describe('Middy middleware', () => { const handler = middy(lambdaHandler).use(logMetrics(metrics)); // Act - await handler(dummyEvent, dummyContext, () => + await handler(dummyEvent, dummyContext.helloworldContext, () => console.log('Lambda invoked!') ); @@ -254,7 +256,7 @@ describe('Middy middleware', () => { ); // Act - await handler(dummyEvent, dummyContext, () => + await handler(dummyEvent, dummyContext.helloworldContext, () => console.log('Lambda invoked!') ); @@ -316,7 +318,7 @@ describe('Middy middleware', () => { const handler = middy(lambdaHandler).use(logMetrics(metrics)); // Act - await handler(dummyEvent, dummyContext, () => + await handler(dummyEvent, dummyContext.helloworldContext, () => console.log('Lambda invoked!') ); @@ -358,7 +360,7 @@ describe('Middy middleware', () => { ); // Act - await handler(dummyEvent, dummyContext, () => + await handler(dummyEvent, dummyContext.helloworldContext, () => console.log('Lambda invoked!') ); @@ -419,8 +421,8 @@ describe('Middy middleware', () => { .use(myCustomMiddleware()); // Act - await handler({ ...dummyEvent, idx: 0 }, dummyContext); - await handler({ ...dummyEvent, idx: 1 }, dummyContext); + await handler({ ...dummyEvent, idx: 0 }, dummyContext.helloworldContext); + await handler({ ...dummyEvent, idx: 1 }, dummyContext.helloworldContext); // Assess expect(publishStoredMetricsSpy).toBeCalledTimes(2); @@ -446,7 +448,7 @@ describe('Middy middleware', () => { const handler = middy(lambdaHandler).use(logMetrics(metrics)); // Act - await handler(dummyEvent, dummyContext, () => + await handler(dummyEvent, dummyContext.helloworldContext, () => console.log('Lambda invoked!') ); @@ -493,7 +495,7 @@ describe('Middy middleware', () => { const handler = middy(lambdaHandler).use(logMetrics(metrics)); // Act - await handler(dummyEvent, dummyContext, () => + await handler(dummyEvent, dummyContext.helloworldContext, () => console.log('Lambda invoked!') ); diff --git a/packages/parameters/src/base/transformValue.ts b/packages/parameters/src/base/transformValue.ts index a3b767ddbd..0d5a175106 100644 --- a/packages/parameters/src/base/transformValue.ts +++ b/packages/parameters/src/base/transformValue.ts @@ -1,4 +1,4 @@ -import type { JSONValue } from '@aws-lambda-powertools/commons'; +import type { JSONValue } from '@aws-lambda-powertools/commons/types'; import { isString } from '@aws-lambda-powertools/commons'; import { fromBase64 } from '@aws-sdk/util-base64-node'; import { TRANSFORM_METHOD_BINARY, TRANSFORM_METHOD_JSON } from '../constants'; diff --git a/packages/parameters/src/dynamodb/DynamoDBProvider.ts b/packages/parameters/src/dynamodb/DynamoDBProvider.ts index 40e5338b9b..500ba64398 100644 --- a/packages/parameters/src/dynamodb/DynamoDBProvider.ts +++ b/packages/parameters/src/dynamodb/DynamoDBProvider.ts @@ -17,7 +17,7 @@ import type { QueryCommandInput, } from '@aws-sdk/client-dynamodb'; import type { PaginationConfiguration } from '@aws-sdk/types'; -import type { JSONValue } from '@aws-lambda-powertools/commons'; +import type { JSONValue } from '@aws-lambda-powertools/commons/types'; import { addUserAgentMiddleware, isSdkClient, diff --git a/packages/parameters/src/types/AppConfigProvider.ts b/packages/parameters/src/types/AppConfigProvider.ts index d0d6f5a6cb..08979b7407 100644 --- a/packages/parameters/src/types/AppConfigProvider.ts +++ b/packages/parameters/src/types/AppConfigProvider.ts @@ -1,4 +1,4 @@ -import type { JSONValue } from '@aws-lambda-powertools/commons'; +import type { JSONValue } from '@aws-lambda-powertools/commons/types'; import type { AppConfigDataClient, AppConfigDataClientConfig, diff --git a/packages/parameters/src/types/DynamoDBProvider.ts b/packages/parameters/src/types/DynamoDBProvider.ts index d6bf2d17ab..1115acafa0 100644 --- a/packages/parameters/src/types/DynamoDBProvider.ts +++ b/packages/parameters/src/types/DynamoDBProvider.ts @@ -1,4 +1,4 @@ -import type { JSONValue } from '@aws-lambda-powertools/commons'; +import type { JSONValue } from '@aws-lambda-powertools/commons/types'; import type { DynamoDBClient, DynamoDBClientConfig, diff --git a/packages/parameters/src/types/SSMProvider.ts b/packages/parameters/src/types/SSMProvider.ts index 25c3756491..8b0169dc27 100644 --- a/packages/parameters/src/types/SSMProvider.ts +++ b/packages/parameters/src/types/SSMProvider.ts @@ -1,4 +1,4 @@ -import type { JSONValue } from '@aws-lambda-powertools/commons'; +import type { JSONValue } from '@aws-lambda-powertools/commons/types'; import type { GetParameterCommandInput, GetParametersByPathCommandInput, diff --git a/packages/parameters/src/types/SecretsProvider.ts b/packages/parameters/src/types/SecretsProvider.ts index f33aad811b..cd06bb88e3 100644 --- a/packages/parameters/src/types/SecretsProvider.ts +++ b/packages/parameters/src/types/SecretsProvider.ts @@ -1,4 +1,4 @@ -import type { JSONValue } from '@aws-lambda-powertools/commons'; +import type { JSONValue } from '@aws-lambda-powertools/commons/types'; import type { GetSecretValueCommandInput, SecretsManagerClient, diff --git a/packages/parameters/tests/unit/getAppConfig.test.ts b/packages/parameters/tests/unit/getAppConfig.test.ts index 5884a9e30e..3243f38f0b 100644 --- a/packages/parameters/tests/unit/getAppConfig.test.ts +++ b/packages/parameters/tests/unit/getAppConfig.test.ts @@ -18,7 +18,7 @@ import { mockClient } from 'aws-sdk-client-mock'; import 'aws-sdk-client-mock-jest'; import { toBase64 } from '@aws-sdk/util-base64-node'; import { Uint8ArrayBlobAdapter } from '@smithy/util-stream'; -import { JSONValue } from '@aws-lambda-powertools/commons'; +import type { JSONValue } from '@aws-lambda-powertools/commons/types'; describe('Function: getAppConfig', () => { const client = mockClient(AppConfigDataClient); diff --git a/packages/tracer/src/Tracer.ts b/packages/tracer/src/Tracer.ts index 41415facfa..71de957ca5 100644 --- a/packages/tracer/src/Tracer.ts +++ b/packages/tracer/src/Tracer.ts @@ -1,9 +1,9 @@ import type { Handler } from 'aws-lambda'; -import { - type AsyncHandler, - type SyncHandler, - Utility, -} from '@aws-lambda-powertools/commons'; +import { Utility } from '@aws-lambda-powertools/commons'; +import type { + AsyncHandler, + SyncHandler, +} from '@aws-lambda-powertools/commons/types'; import type { TracerInterface } from '.'; import { type ConfigServiceInterface, diff --git a/packages/tracer/src/middleware/middy.ts b/packages/tracer/src/middleware/middy.ts index cc0477f01f..6bf9c22cfa 100644 --- a/packages/tracer/src/middleware/middy.ts +++ b/packages/tracer/src/middleware/middy.ts @@ -1,11 +1,11 @@ -import { TRACER_KEY } from '@aws-lambda-powertools/commons/lib/middleware'; +import { TRACER_KEY } from '@aws-lambda-powertools/commons'; import type { Tracer } from '../Tracer'; import type { Segment, Subsegment } from 'aws-xray-sdk-core'; import type { CaptureLambdaHandlerOptions } from '../types'; import type { MiddlewareLikeObj, MiddyLikeRequest, -} from '@aws-lambda-powertools/commons'; +} from '@aws-lambda-powertools/commons/types'; /** * A middy middleware automating capture of metadata and annotations on segments or subsegments for a Lambda Handler. diff --git a/packages/tracer/src/types/Tracer.ts b/packages/tracer/src/types/Tracer.ts index e31c06c4e7..9f15b927ad 100644 --- a/packages/tracer/src/types/Tracer.ts +++ b/packages/tracer/src/types/Tracer.ts @@ -4,7 +4,7 @@ import type { AsyncHandler, LambdaInterface, SyncHandler, -} from '@aws-lambda-powertools/commons'; +} from '@aws-lambda-powertools/commons/types'; /** * Options for the tracer class to be used during initialization. diff --git a/packages/tracer/tests/unit/Tracer.test.ts b/packages/tracer/tests/unit/Tracer.test.ts index e08a888457..f83aaf9240 100644 --- a/packages/tracer/tests/unit/Tracer.test.ts +++ b/packages/tracer/tests/unit/Tracer.test.ts @@ -6,8 +6,8 @@ import { ContextExamples as dummyContext, Events as dummyEvent, - LambdaInterface, } from '@aws-lambda-powertools/commons'; +import type { LambdaInterface } from '@aws-lambda-powertools/commons/types'; import { Tracer } from './../../src'; import type { Callback, Context } from 'aws-lambda/handler'; import { diff --git a/packages/tracer/tests/unit/middy.test.ts b/packages/tracer/tests/unit/middy.test.ts index dc7af9d553..fe717e656b 100644 --- a/packages/tracer/tests/unit/middy.test.ts +++ b/packages/tracer/tests/unit/middy.test.ts @@ -12,7 +12,7 @@ import { setContextMissingStrategy, Subsegment, } from 'aws-xray-sdk-core'; -import { cleanupMiddlewares } from '@aws-lambda-powertools/commons/lib/middleware'; +import { cleanupMiddlewares } from '@aws-lambda-powertools/commons'; jest.spyOn(console, 'debug').mockImplementation(() => null); jest.spyOn(console, 'warn').mockImplementation(() => null); From d9a62eaeb2fabae10d9f1da57a9323bf7a18962e Mon Sep 17 00:00:00 2001 From: Andrea Amorosi Date: Thu, 12 Oct 2023 02:45:36 +0200 Subject: [PATCH 15/60] feat(parameters): add esmodule support (#1736) --- .../{jest.config.js => jest.config.cjs} | 3 + packages/parameters/package.json | 97 +++++++++++-------- .../src/appconfig/AppConfigProvider.ts | 6 +- .../parameters/src/appconfig/getAppConfig.ts | 5 +- packages/parameters/src/appconfig/index.ts | 4 +- packages/parameters/src/base/BaseProvider.ts | 14 +-- .../parameters/src/base/DefaultProviders.ts | 2 +- .../parameters/src/base/ExpirableValue.ts | 2 +- .../parameters/src/base/GetMultipleOptions.ts | 6 +- packages/parameters/src/base/GetOptions.ts | 6 +- packages/parameters/src/base/index.ts | 8 +- .../parameters/src/base/transformValue.ts | 9 +- .../src/config/EnvironmentVariablesService.ts | 4 +- .../src/dynamodb/DynamoDBProvider.ts | 4 +- packages/parameters/src/dynamodb/index.ts | 2 +- packages/parameters/src/index.ts | 4 +- .../parameters/src/secrets/SecretsProvider.ts | 4 +- packages/parameters/src/secrets/getSecret.ts | 6 +- packages/parameters/src/secrets/index.ts | 4 +- packages/parameters/src/ssm/SSMProvider.ts | 12 +-- packages/parameters/src/ssm/getParameter.ts | 5 +- packages/parameters/src/ssm/getParameters.ts | 5 +- .../parameters/src/ssm/getParametersByName.ts | 5 +- packages/parameters/src/ssm/index.ts | 8 +- .../parameters/src/types/AppConfigProvider.ts | 2 +- packages/parameters/src/types/BaseProvider.ts | 2 +- .../ConfigServiceInterface.ts | 0 .../parameters/src/types/DynamoDBProvider.ts | 2 +- packages/parameters/src/types/SSMProvider.ts | 2 +- .../parameters/src/types/SecretsProvider.ts | 2 +- ...pConfigProvider.class.test.functionCode.ts | 10 +- .../tests/e2e/appConfigProvider.class.test.ts | 4 +- ...ynamoDBProvider.class.test.functionCode.ts | 10 +- .../tests/e2e/dynamoDBProvider.class.test.ts | 4 +- ...secretsProvider.class.test.functionCode.ts | 10 +- .../tests/e2e/secretsProvider.class.test.ts | 4 +- .../ssmProvider.class.test.functionCode.ts | 10 +- .../tests/e2e/ssmProvider.class.test.ts | 4 +- .../parameters/tests/helpers/tinyLogger.ts | 2 +- .../tests/unit/AppConfigProvider.test.ts | 6 +- .../tests/unit/BaseProvider.test.ts | 54 ++++++++++- .../tests/unit/DynamoDBProvider.test.ts | 4 +- .../EnvironmentVariablesService.test.ts | 2 +- .../parameters/tests/unit/SSMProvider.test.ts | 6 +- .../tests/unit/SecretsProvider.test.ts | 4 +- .../tests/unit/getAppConfig.test.ts | 9 +- .../tests/unit/getParameter.test.ts | 4 +- .../tests/unit/getParameters.test.ts | 4 +- .../tests/unit/getParametersByName.test.ts | 6 +- .../parameters/tests/unit/getSecret.test.ts | 4 +- packages/parameters/tsconfig.esm.json | 11 +++ packages/parameters/tsconfig.json | 2 +- 52 files changed, 245 insertions(+), 164 deletions(-) rename packages/parameters/{jest.config.js => jest.config.cjs} (93%) rename packages/parameters/src/{config => types}/ConfigServiceInterface.ts (100%) rename packages/parameters/tests/unit/{config => }/EnvironmentVariablesService.test.ts (95%) create mode 100644 packages/parameters/tsconfig.esm.json diff --git a/packages/parameters/jest.config.js b/packages/parameters/jest.config.cjs similarity index 93% rename from packages/parameters/jest.config.js rename to packages/parameters/jest.config.cjs index 64f709a02d..d06944c4d3 100644 --- a/packages/parameters/jest.config.js +++ b/packages/parameters/jest.config.cjs @@ -5,6 +5,9 @@ module.exports = { }, runner: 'groups', preset: 'ts-jest', + moduleNameMapper: { + '^(\\.{1,2}/.*)\\.js$': '$1', + }, transform: { '^.+\\.ts?$': 'ts-jest', }, diff --git a/packages/parameters/package.json b/packages/parameters/package.json index 134d7e3afb..94fc4e5cba 100644 --- a/packages/parameters/package.json +++ b/packages/parameters/package.json @@ -16,11 +16,13 @@ "test:e2e:nodejs18x": "RUNTIME=nodejs18x jest --group=e2e", "test:e2e": "jest --group=e2e", "watch": "jest --watch", - "build": "tsc --build --force", + "build:cjs": "tsc --build --force && echo '{ \"type\": \"commonjs\" }' > lib/cjs/package.json", + "build:esm": "tsc --project tsconfig.esm.json && echo '{ \"type\": \"module\" }' > lib/esm/package.json", + "build": "npm run build:esm & npm run build:cjs", "lint": "eslint --ext .ts,.js --no-error-on-unmatched-pattern .", "lint-fix": "eslint --fix --ext .ts,.js --no-error-on-unmatched-pattern .", "prebuild": "rimraf ./lib", - "prepack": "node ../../.github/scripts/release_patch_package_json.js ." + "prepack": "rimraf ./lib/*.tsbuildinfo && node ../../.github/scripts/release_patch_package_json.js ." }, "lint-staged": { "*.{js,ts}": "npm run lint-fix" @@ -29,93 +31,110 @@ "license": "MIT-0", "exports": { ".": { - "import": "./lib/index.js", - "require": "./lib/index.js" + "require": { + "types": "./lib/cjs/index.d.ts", + "default": "./lib/cjs/index.js" + }, + "import": { + "types": "./lib/esm/index.d.ts", + "default": "./lib/esm/index.js" + } }, "./base/types": { - "import": "./lib/types/BaseProvider.d.ts", - "require": "./lib/types/BaseProvider.d.ts" + "import": "./lib/esm/types/BaseProvider.d.ts", + "require": "./lib/cjs/types/BaseProvider.d.ts" }, "./base": { - "import": "./lib/base/index.js", - "require": "./lib/base/index.js" + "import": "./lib/esm/base/index.js", + "require": "./lib/cjs/base/index.js" }, "./ssm/types": { - "import": "./lib/types/SSMProvider.d.ts", - "require": "./lib/types/SSMProvider.d.ts" + "import": "./lib/esm/types/SSMProvider.d.ts", + "require": "./lib/cjs/types/SSMProvider.d.ts" }, "./ssm": { - "import": "./lib/ssm/index.js", - "require": "./lib/ssm/index.js" + "import": "./lib/esm/ssm/index.js", + "require": "./lib/cjs/ssm/index.js" }, "./secrets/types": { - "import": "./lib/types/SecretsProvider.d.ts", - "require": "./lib/types/SecretsProvider.d.ts" + "import": "./lib/esm/types/SecretsProvider.d.ts", + "require": "./lib/cjs/types/SecretsProvider.d.ts" }, "./secrets": { - "import": "./lib/secrets/index.js", - "require": "./lib/secrets/index.js" + "import": "./lib/esm/secrets/index.js", + "require": "./lib/cjs/secrets/index.js" }, "./dynamodb/types": { - "import": "./lib/types/AppConfigProvider.d.ts", - "require": "./lib/types/AppConfigProvider.d.ts" + "import": "./lib/esm/types/AppConfigProvider.d.ts", + "require": "./lib/cjs/types/AppConfigProvider.d.ts" }, "./dynamodb": { - "import": "./lib/dynamodb/index.js", - "require": "./lib/dynamodb/index.js" + "import": "./lib/esm/dynamodb/index.js", + "require": "./lib/cjs/dynamodb/index.js" }, "./appconfig/types": { - "import": "./lib/appconfig/index.js", - "require": "./lib/appconfig/index.js" + "import": "./lib/esm/appconfig/index.js", + "require": "./lib/cjs/appconfig/index.js" }, "./appconfig": { - "import": "./lib/appconfig/index.js", - "require": "./lib/appconfig/index.js" + "import": "./lib/esm/appconfig/index.js", + "require": "./lib/cjs/appconfig/index.js" }, "./errors": { - "import": "./lib/errors.js", - "require": "./lib/errors.js" + "import": "./lib/esm/errors.js", + "require": "./lib/cjs/errors.js" } }, "typesVersions": { "*": { "base/types": [ - "lib/types/BaseProvider.d.ts" + "lib/cjs/types/BaseProvider.d.ts", + "lib/esm/types/BaseProvider.d.ts" ], "base": [ - "lib/base/index.d.ts" + "lib/cjs/base/index.d.ts", + "lib/esm/base/index.d.ts" ], "ssm/types": [ - "lib/types/SSMProvider.d.ts" + "lib/cjs/types/SSMProvider.d.ts", + "lib/esm/types/SSMProvider.d.ts" ], "ssm": [ - "lib/ssm/index.d.ts" + "lib/cjs/ssm/index.d.ts", + "lib/esm/ssm/index.d.ts" ], "secrets/types": [ - "lib/types/SecretsProvider.d.ts" + "lib/cjs/types/SecretsProvider.d.ts", + "lib/esm/types/SecretsProvider.d.ts" ], "secrets": [ - "lib/secrets/index.d.ts" + "lib/cjs/secrets/index.d.ts", + "lib/esm/secrets/index.d.ts" ], "dynamodb/types": [ - "./lib/types/DynamoDBProvider.d.ts" + "./lib/cjs/types/DynamoDBProvider.d.ts", + "./lib/esm/types/DynamoDBProvider.d.ts" ], "dynamodb": [ - "lib/dynamodb/index.d.ts" + "lib/cjs/dynamodb/index.d.ts", + "lib/esm/dynamodb/index.d.ts" ], "appconfig/types": [ - "./lib/types/AppConfigProvider.d.ts" + "./lib/cjs/types/AppConfigProvider.d.ts", + "./lib/esm/types/AppConfigProvider.d.ts" ], "appconfig": [ - "lib/appconfig/index.d.ts" + "lib/cjs/appconfig/index.d.ts", + "lib/esm/appconfig/index.d.ts" ], "errors": [ - "lib/errors.d.ts" + "lib/cjs/errors.d.ts", + "lib/esm/errors.d.ts" ] } }, - "main": "./lib/index.js", - "types": "./lib/index.d.ts", + "types": "./lib/cjs/index.d.ts", + "main": "./lib/cjs/index.js", "files": [ "lib" ], diff --git a/packages/parameters/src/appconfig/AppConfigProvider.ts b/packages/parameters/src/appconfig/AppConfigProvider.ts index bc102b3f32..f385bd368b 100644 --- a/packages/parameters/src/appconfig/AppConfigProvider.ts +++ b/packages/parameters/src/appconfig/AppConfigProvider.ts @@ -1,4 +1,4 @@ -import { BaseProvider, DEFAULT_PROVIDERS } from '../base'; +import { BaseProvider } from '../base/BaseProvider.js'; import { AppConfigDataClient, StartConfigurationSessionCommand, @@ -9,7 +9,7 @@ import type { AppConfigProviderOptions, AppConfigGetOptions, AppConfigGetOutput, -} from '../types/AppConfigProvider'; +} from '../types/AppConfigProvider.js'; import { addUserAgentMiddleware, isSdkClient, @@ -360,4 +360,4 @@ class AppConfigProvider extends BaseProvider { } } -export { AppConfigProvider, DEFAULT_PROVIDERS }; +export { AppConfigProvider }; diff --git a/packages/parameters/src/appconfig/getAppConfig.ts b/packages/parameters/src/appconfig/getAppConfig.ts index 7e7139f794..a1e29912fd 100644 --- a/packages/parameters/src/appconfig/getAppConfig.ts +++ b/packages/parameters/src/appconfig/getAppConfig.ts @@ -1,8 +1,9 @@ -import { AppConfigProvider, DEFAULT_PROVIDERS } from './AppConfigProvider'; +import { AppConfigProvider } from './AppConfigProvider.js'; +import { DEFAULT_PROVIDERS } from '../base/index.js'; import type { AppConfigGetOutput, GetAppConfigOptions, -} from '../types/AppConfigProvider'; +} from '../types/AppConfigProvider.js'; /** * ## Intro diff --git a/packages/parameters/src/appconfig/index.ts b/packages/parameters/src/appconfig/index.ts index 9b8a24a5a4..39d7f59dd9 100644 --- a/packages/parameters/src/appconfig/index.ts +++ b/packages/parameters/src/appconfig/index.ts @@ -1,2 +1,2 @@ -export * from './AppConfigProvider'; -export * from './getAppConfig'; +export { AppConfigProvider } from './AppConfigProvider.js'; +export { getAppConfig } from './getAppConfig.js'; diff --git a/packages/parameters/src/base/BaseProvider.ts b/packages/parameters/src/base/BaseProvider.ts index a7ada6d5a6..66eb053488 100644 --- a/packages/parameters/src/base/BaseProvider.ts +++ b/packages/parameters/src/base/BaseProvider.ts @@ -3,17 +3,17 @@ import { isRecord, isString, } from '@aws-lambda-powertools/commons'; -import { GetOptions } from './GetOptions'; -import { GetMultipleOptions } from './GetMultipleOptions'; -import { ExpirableValue } from './ExpirableValue'; -import { GetParameterError, TransformParameterError } from '../errors'; -import { EnvironmentVariablesService } from '../config/EnvironmentVariablesService'; -import { transformValue } from './transformValue'; +import { GetOptions } from './GetOptions.js'; +import { GetMultipleOptions } from './GetMultipleOptions.js'; +import { ExpirableValue } from './ExpirableValue.js'; +import { GetParameterError, TransformParameterError } from '../errors.js'; +import { EnvironmentVariablesService } from '../config/EnvironmentVariablesService.js'; +import { transformValue } from './transformValue.js'; import type { BaseProviderInterface, GetMultipleOptionsInterface, GetOptionsInterface, -} from '../types/BaseProvider'; +} from '../types/BaseProvider.js'; /** * Base class for all providers. diff --git a/packages/parameters/src/base/DefaultProviders.ts b/packages/parameters/src/base/DefaultProviders.ts index 692dacdcc3..03832b4e85 100644 --- a/packages/parameters/src/base/DefaultProviders.ts +++ b/packages/parameters/src/base/DefaultProviders.ts @@ -1,4 +1,4 @@ -import type { BaseProviderInterface } from '../types/BaseProvider'; +import type { BaseProviderInterface } from '../types/BaseProvider.js'; // These providers are dinamycally intialized on first use of the helper functions const DEFAULT_PROVIDERS: Record = {}; diff --git a/packages/parameters/src/base/ExpirableValue.ts b/packages/parameters/src/base/ExpirableValue.ts index 7793319e59..d9d213c715 100644 --- a/packages/parameters/src/base/ExpirableValue.ts +++ b/packages/parameters/src/base/ExpirableValue.ts @@ -1,4 +1,4 @@ -import type { ExpirableValueInterface } from '../types/BaseProvider'; +import type { ExpirableValueInterface } from '../types/BaseProvider.js'; /** * Class to represent a value that can expire. diff --git a/packages/parameters/src/base/GetMultipleOptions.ts b/packages/parameters/src/base/GetMultipleOptions.ts index d452062e43..1bf2ca5514 100644 --- a/packages/parameters/src/base/GetMultipleOptions.ts +++ b/packages/parameters/src/base/GetMultipleOptions.ts @@ -1,6 +1,6 @@ -import { GetOptions } from './GetOptions'; -import { EnvironmentVariablesService } from '../config/EnvironmentVariablesService'; -import type { GetMultipleOptionsInterface } from '../types/BaseProvider'; +import { GetOptions } from './GetOptions.js'; +import { EnvironmentVariablesService } from '../config/EnvironmentVariablesService.js'; +import type { GetMultipleOptionsInterface } from '../types/BaseProvider.js'; /** * Options for the `getMultiple` method. diff --git a/packages/parameters/src/base/GetOptions.ts b/packages/parameters/src/base/GetOptions.ts index e83d0a622f..1128f47faa 100644 --- a/packages/parameters/src/base/GetOptions.ts +++ b/packages/parameters/src/base/GetOptions.ts @@ -1,9 +1,9 @@ -import { EnvironmentVariablesService } from '../config/EnvironmentVariablesService'; -import { DEFAULT_MAX_AGE_SECS } from '../constants'; +import { EnvironmentVariablesService } from '../config/EnvironmentVariablesService.js'; +import { DEFAULT_MAX_AGE_SECS } from '../constants.js'; import type { GetOptionsInterface, TransformOptions, -} from '../types/BaseProvider'; +} from '../types/BaseProvider.js'; /** * Options for the `get` method. diff --git a/packages/parameters/src/base/index.ts b/packages/parameters/src/base/index.ts index 2833869ad7..9705d1348d 100644 --- a/packages/parameters/src/base/index.ts +++ b/packages/parameters/src/base/index.ts @@ -1,4 +1,4 @@ -export * from './DefaultProviders'; -export * from './BaseProvider'; -export * from './GetOptions'; -export * from './GetMultipleOptions'; +export { BaseProvider } from './BaseProvider.js'; +export { DEFAULT_PROVIDERS, clearCaches } from './DefaultProviders.js'; +export { GetOptions } from './GetOptions.js'; +export { GetMultipleOptions } from './GetMultipleOptions.js'; diff --git a/packages/parameters/src/base/transformValue.ts b/packages/parameters/src/base/transformValue.ts index 0d5a175106..3dc1c3fcea 100644 --- a/packages/parameters/src/base/transformValue.ts +++ b/packages/parameters/src/base/transformValue.ts @@ -1,9 +1,12 @@ import type { JSONValue } from '@aws-lambda-powertools/commons/types'; import { isString } from '@aws-lambda-powertools/commons'; import { fromBase64 } from '@aws-sdk/util-base64-node'; -import { TRANSFORM_METHOD_BINARY, TRANSFORM_METHOD_JSON } from '../constants'; -import { TransformParameterError } from '../errors'; -import type { TransformOptions } from '../types/BaseProvider'; +import { + TRANSFORM_METHOD_BINARY, + TRANSFORM_METHOD_JSON, +} from '../constants.js'; +import { TransformParameterError } from '../errors.js'; +import type { TransformOptions } from '../types/BaseProvider.js'; /** * Utility function to transform a value. diff --git a/packages/parameters/src/config/EnvironmentVariablesService.ts b/packages/parameters/src/config/EnvironmentVariablesService.ts index 3ae96c5d56..23744e7483 100644 --- a/packages/parameters/src/config/EnvironmentVariablesService.ts +++ b/packages/parameters/src/config/EnvironmentVariablesService.ts @@ -1,5 +1,5 @@ -import { ConfigServiceInterface } from './ConfigServiceInterface'; -import { DEFAULT_MAX_AGE_SECS } from '../constants'; +import { ConfigServiceInterface } from '../types/ConfigServiceInterface.js'; +import { DEFAULT_MAX_AGE_SECS } from '../constants.js'; import { EnvironmentVariablesService as CommonEnvironmentVariablesService } from '@aws-lambda-powertools/commons'; class EnvironmentVariablesService diff --git a/packages/parameters/src/dynamodb/DynamoDBProvider.ts b/packages/parameters/src/dynamodb/DynamoDBProvider.ts index 500ba64398..282406c092 100644 --- a/packages/parameters/src/dynamodb/DynamoDBProvider.ts +++ b/packages/parameters/src/dynamodb/DynamoDBProvider.ts @@ -1,4 +1,4 @@ -import { BaseProvider } from '../base'; +import { BaseProvider } from '../base/BaseProvider.js'; import { DynamoDBClient, GetItemCommand, @@ -11,7 +11,7 @@ import type { DynamoDBGetMultipleOptions, DynamoDBGetOutput, DynamoDBGetMultipleOutput, -} from '../types/DynamoDBProvider'; +} from '../types/DynamoDBProvider.js'; import type { GetItemCommandInput, QueryCommandInput, diff --git a/packages/parameters/src/dynamodb/index.ts b/packages/parameters/src/dynamodb/index.ts index 65bb792929..2165ec9606 100644 --- a/packages/parameters/src/dynamodb/index.ts +++ b/packages/parameters/src/dynamodb/index.ts @@ -1 +1 @@ -export * from './DynamoDBProvider'; +export { DynamoDBProvider } from './DynamoDBProvider.js'; diff --git a/packages/parameters/src/index.ts b/packages/parameters/src/index.ts index 13cad811c8..3142feda2a 100644 --- a/packages/parameters/src/index.ts +++ b/packages/parameters/src/index.ts @@ -1,2 +1,2 @@ -export * from './errors'; -export * from './constants'; +export * from './errors.js'; +export * from './constants.js'; diff --git a/packages/parameters/src/secrets/SecretsProvider.ts b/packages/parameters/src/secrets/SecretsProvider.ts index 7b4f795fd8..0fe5019355 100644 --- a/packages/parameters/src/secrets/SecretsProvider.ts +++ b/packages/parameters/src/secrets/SecretsProvider.ts @@ -1,4 +1,4 @@ -import { BaseProvider } from '../base'; +import { BaseProvider } from '../base/BaseProvider.js'; import { SecretsManagerClient, GetSecretValueCommand, @@ -8,7 +8,7 @@ import type { SecretsProviderOptions, SecretsGetOptions, SecretsGetOutput, -} from '../types/SecretsProvider'; +} from '../types/SecretsProvider.js'; import { addUserAgentMiddleware, isSdkClient, diff --git a/packages/parameters/src/secrets/getSecret.ts b/packages/parameters/src/secrets/getSecret.ts index b0f2e4bfeb..fb05b7e1d3 100644 --- a/packages/parameters/src/secrets/getSecret.ts +++ b/packages/parameters/src/secrets/getSecret.ts @@ -1,9 +1,9 @@ -import { DEFAULT_PROVIDERS } from '../base'; -import { SecretsProvider } from './SecretsProvider'; +import { DEFAULT_PROVIDERS } from '../base/DefaultProviders.js'; +import { SecretsProvider } from './SecretsProvider.js'; import type { SecretsGetOptions, SecretsGetOutput, -} from '../types/SecretsProvider'; +} from '../types/SecretsProvider.js'; /** * ## Intro diff --git a/packages/parameters/src/secrets/index.ts b/packages/parameters/src/secrets/index.ts index 5e54bcec5b..6bb75d813f 100644 --- a/packages/parameters/src/secrets/index.ts +++ b/packages/parameters/src/secrets/index.ts @@ -1,2 +1,2 @@ -export * from './SecretsProvider'; -export * from './getSecret'; +export { SecretsProvider } from './SecretsProvider.js'; +export { getSecret } from './getSecret.js'; diff --git a/packages/parameters/src/ssm/SSMProvider.ts b/packages/parameters/src/ssm/SSMProvider.ts index 799d954a69..1ca934b518 100644 --- a/packages/parameters/src/ssm/SSMProvider.ts +++ b/packages/parameters/src/ssm/SSMProvider.ts @@ -1,7 +1,7 @@ -import { BaseProvider, DEFAULT_PROVIDERS } from '../base'; -import { transformValue } from '../base/transformValue'; -import { GetParameterError } from '../errors'; -import { DEFAULT_MAX_AGE_SECS } from '../constants'; +import { BaseProvider } from '../base/BaseProvider.js'; +import { transformValue } from '../base/transformValue.js'; +import { GetParameterError } from '../errors.js'; +import { DEFAULT_MAX_AGE_SECS } from '../constants.js'; import { SSMClient, GetParameterCommand, @@ -25,7 +25,7 @@ import type { SSMGetParametersByNameOptions, SSMSplitBatchAndDecryptParametersOutputType, SSMGetParametersByNameFromCacheOutputType, -} from '../types/SSMProvider'; +} from '../types/SSMProvider.js'; import type { PaginationConfiguration } from '@aws-sdk/types'; import { addUserAgentMiddleware, @@ -915,4 +915,4 @@ class SSMProvider extends BaseProvider { } } -export { SSMProvider, DEFAULT_PROVIDERS }; +export { SSMProvider }; diff --git a/packages/parameters/src/ssm/getParameter.ts b/packages/parameters/src/ssm/getParameter.ts index 12eeb153c0..27695c68a3 100644 --- a/packages/parameters/src/ssm/getParameter.ts +++ b/packages/parameters/src/ssm/getParameter.ts @@ -1,5 +1,6 @@ -import { SSMProvider, DEFAULT_PROVIDERS } from './SSMProvider'; -import type { SSMGetOptions, SSMGetOutput } from '../types/SSMProvider'; +import { DEFAULT_PROVIDERS } from '../base/DefaultProviders.js'; +import { SSMProvider } from './SSMProvider.js'; +import type { SSMGetOptions, SSMGetOutput } from '../types/SSMProvider.js'; /** * ## Intro diff --git a/packages/parameters/src/ssm/getParameters.ts b/packages/parameters/src/ssm/getParameters.ts index d604a034d5..d149d94dd3 100644 --- a/packages/parameters/src/ssm/getParameters.ts +++ b/packages/parameters/src/ssm/getParameters.ts @@ -1,8 +1,9 @@ -import { SSMProvider, DEFAULT_PROVIDERS } from './SSMProvider'; +import { DEFAULT_PROVIDERS } from '../base/DefaultProviders.js'; +import { SSMProvider } from './SSMProvider.js'; import type { SSMGetMultipleOptions, SSMGetMultipleOutput, -} from '../types/SSMProvider'; +} from '../types/SSMProvider.js'; /** * ## Intro diff --git a/packages/parameters/src/ssm/getParametersByName.ts b/packages/parameters/src/ssm/getParametersByName.ts index 5d88c5ff53..91d90d5489 100644 --- a/packages/parameters/src/ssm/getParametersByName.ts +++ b/packages/parameters/src/ssm/getParametersByName.ts @@ -1,8 +1,9 @@ -import { SSMProvider, DEFAULT_PROVIDERS } from './SSMProvider'; +import { DEFAULT_PROVIDERS } from '../base/DefaultProviders.js'; +import { SSMProvider } from './SSMProvider.js'; import type { SSMGetParametersByNameOptions, SSMGetParametersByNameOutput, -} from '../types/SSMProvider'; +} from '../types/SSMProvider.js'; /** * ## Intro diff --git a/packages/parameters/src/ssm/index.ts b/packages/parameters/src/ssm/index.ts index 2efdcd6952..ffa9aba3a9 100644 --- a/packages/parameters/src/ssm/index.ts +++ b/packages/parameters/src/ssm/index.ts @@ -1,4 +1,4 @@ -export * from './SSMProvider'; -export * from './getParameter'; -export * from './getParameters'; -export * from './getParametersByName'; +export { SSMProvider } from './SSMProvider.js'; +export { getParameter } from './getParameter.js'; +export { getParameters } from './getParameters.js'; +export { getParametersByName } from './getParametersByName.js'; diff --git a/packages/parameters/src/types/AppConfigProvider.ts b/packages/parameters/src/types/AppConfigProvider.ts index 08979b7407..b5ebd576c7 100644 --- a/packages/parameters/src/types/AppConfigProvider.ts +++ b/packages/parameters/src/types/AppConfigProvider.ts @@ -4,7 +4,7 @@ import type { AppConfigDataClientConfig, StartConfigurationSessionCommandInput, } from '@aws-sdk/client-appconfigdata'; -import type { GetOptionsInterface } from './BaseProvider'; +import type { GetOptionsInterface } from './BaseProvider.js'; /** * Base interface for AppConfigProviderOptions. diff --git a/packages/parameters/src/types/BaseProvider.ts b/packages/parameters/src/types/BaseProvider.ts index 5a82970460..f773a7267a 100644 --- a/packages/parameters/src/types/BaseProvider.ts +++ b/packages/parameters/src/types/BaseProvider.ts @@ -1,4 +1,4 @@ -import { Transform } from '../constants'; +import { Transform } from '../constants.js'; /** * Type for the transform option. diff --git a/packages/parameters/src/config/ConfigServiceInterface.ts b/packages/parameters/src/types/ConfigServiceInterface.ts similarity index 100% rename from packages/parameters/src/config/ConfigServiceInterface.ts rename to packages/parameters/src/types/ConfigServiceInterface.ts diff --git a/packages/parameters/src/types/DynamoDBProvider.ts b/packages/parameters/src/types/DynamoDBProvider.ts index 1115acafa0..198dd508b9 100644 --- a/packages/parameters/src/types/DynamoDBProvider.ts +++ b/packages/parameters/src/types/DynamoDBProvider.ts @@ -8,7 +8,7 @@ import type { import type { GetMultipleOptionsInterface, GetOptionsInterface, -} from './BaseProvider'; +} from './BaseProvider.js'; /** * Base interface for DynamoDBProviderOptions. diff --git a/packages/parameters/src/types/SSMProvider.ts b/packages/parameters/src/types/SSMProvider.ts index 8b0169dc27..45ae2de225 100644 --- a/packages/parameters/src/types/SSMProvider.ts +++ b/packages/parameters/src/types/SSMProvider.ts @@ -9,7 +9,7 @@ import type { GetMultipleOptionsInterface, GetOptionsInterface, TransformOptions, -} from './BaseProvider'; +} from './BaseProvider.js'; /** * Interface for SSMProvider with clientConfig property. diff --git a/packages/parameters/src/types/SecretsProvider.ts b/packages/parameters/src/types/SecretsProvider.ts index cd06bb88e3..223756503a 100644 --- a/packages/parameters/src/types/SecretsProvider.ts +++ b/packages/parameters/src/types/SecretsProvider.ts @@ -4,7 +4,7 @@ import type { SecretsManagerClient, SecretsManagerClientConfig, } from '@aws-sdk/client-secrets-manager'; -import type { GetOptionsInterface, TransformOptions } from './BaseProvider'; +import type { GetOptionsInterface, TransformOptions } from './BaseProvider.js'; /** * Base interface for SecretsProviderOptions. diff --git a/packages/parameters/tests/e2e/appConfigProvider.class.test.functionCode.ts b/packages/parameters/tests/e2e/appConfigProvider.class.test.functionCode.ts index 48735b703b..c55193326f 100644 --- a/packages/parameters/tests/e2e/appConfigProvider.class.test.functionCode.ts +++ b/packages/parameters/tests/e2e/appConfigProvider.class.test.functionCode.ts @@ -1,9 +1,9 @@ import type { Context } from 'aws-lambda'; -import { Transform } from '../../src'; -import { AppConfigProvider } from '../../src/appconfig'; -import { AppConfigGetOptions } from '../../src/types/AppConfigProvider'; -import { TinyLogger } from '../helpers/tinyLogger'; -import { middleware } from '../helpers/sdkMiddlewareRequestCounter'; +import { Transform } from '../../src/constants.js'; +import { AppConfigProvider } from '../../src/appconfig/AppConfigProvider.js'; +import { AppConfigGetOptions } from '../../src/types/AppConfigProvider.js'; +import { TinyLogger } from '../helpers/tinyLogger.js'; +import { middleware } from '../helpers/sdkMiddlewareRequestCounter.js'; import { AppConfigDataClient } from '@aws-sdk/client-appconfigdata'; // We use a custom logger to log pure JSON objects to stdout diff --git a/packages/parameters/tests/e2e/appConfigProvider.class.test.ts b/packages/parameters/tests/e2e/appConfigProvider.class.test.ts index 6d28b3ef04..35c150840c 100644 --- a/packages/parameters/tests/e2e/appConfigProvider.class.test.ts +++ b/packages/parameters/tests/e2e/appConfigProvider.class.test.ts @@ -11,13 +11,13 @@ import { } from '@aws-lambda-powertools/testing-utils'; import { toBase64 } from '@aws-sdk/util-base64-node'; import { join } from 'node:path'; -import { TestAppConfigWithProfiles } from '../helpers/resources'; +import { TestAppConfigWithProfiles } from '../helpers/resources.js'; import { RESOURCE_NAME_PREFIX, SETUP_TIMEOUT, TEARDOWN_TIMEOUT, TEST_CASE_TIMEOUT, -} from './constants'; +} from './constants.js'; /** * This test suite deploys a CDK stack with a Lambda function and a number of AppConfig parameters. diff --git a/packages/parameters/tests/e2e/dynamoDBProvider.class.test.functionCode.ts b/packages/parameters/tests/e2e/dynamoDBProvider.class.test.functionCode.ts index 88f1eccd20..808bb188e9 100644 --- a/packages/parameters/tests/e2e/dynamoDBProvider.class.test.functionCode.ts +++ b/packages/parameters/tests/e2e/dynamoDBProvider.class.test.functionCode.ts @@ -1,12 +1,12 @@ import type { Context } from 'aws-lambda'; -import { Transform } from '../../src'; -import { DynamoDBProvider } from '../../src/dynamodb'; +import { Transform } from '../../src/constants.js'; +import { DynamoDBProvider } from '../../src/dynamodb/DynamoDBProvider.js'; import { DynamoDBGetOptions, DynamoDBGetMultipleOptions, -} from '../../src/types/DynamoDBProvider'; -import { TinyLogger } from '../helpers/tinyLogger'; -import { middleware } from '../helpers/sdkMiddlewareRequestCounter'; +} from '../../src/types/DynamoDBProvider.js'; +import { TinyLogger } from '../helpers/tinyLogger.js'; +import { middleware } from '../helpers/sdkMiddlewareRequestCounter.js'; import { DynamoDBClient } from '@aws-sdk/client-dynamodb'; // We use a custom logger to log pure JSON objects to stdout diff --git a/packages/parameters/tests/e2e/dynamoDBProvider.class.test.ts b/packages/parameters/tests/e2e/dynamoDBProvider.class.test.ts index dfc730d469..391d215f76 100644 --- a/packages/parameters/tests/e2e/dynamoDBProvider.class.test.ts +++ b/packages/parameters/tests/e2e/dynamoDBProvider.class.test.ts @@ -11,13 +11,13 @@ import { } from '@aws-lambda-powertools/testing-utils'; import { AttributeType } from 'aws-cdk-lib/aws-dynamodb'; import { join } from 'node:path'; -import { TestDynamodbTableWithItems } from '../helpers/resources'; +import { TestDynamodbTableWithItems } from '../helpers/resources.js'; import { RESOURCE_NAME_PREFIX, SETUP_TIMEOUT, TEARDOWN_TIMEOUT, TEST_CASE_TIMEOUT, -} from './constants'; +} from './constants.js'; /** * This test suite deploys a CDK stack with a Lambda function and a number of DynamoDB tables. diff --git a/packages/parameters/tests/e2e/secretsProvider.class.test.functionCode.ts b/packages/parameters/tests/e2e/secretsProvider.class.test.functionCode.ts index e7526fdefc..4c04484897 100644 --- a/packages/parameters/tests/e2e/secretsProvider.class.test.functionCode.ts +++ b/packages/parameters/tests/e2e/secretsProvider.class.test.functionCode.ts @@ -1,10 +1,10 @@ import { Context } from 'aws-lambda'; -import { TinyLogger } from '../helpers/tinyLogger'; +import { TinyLogger } from '../helpers/tinyLogger.js'; import { SecretsManagerClient } from '@aws-sdk/client-secrets-manager'; -import { middleware } from '../helpers/sdkMiddlewareRequestCounter'; -import { Transform } from '../../src'; -import { SecretsProvider } from '../../src/secrets'; -import { SecretsGetOptions } from '../../src/types/SecretsProvider'; +import { middleware } from '../helpers/sdkMiddlewareRequestCounter.js'; +import { Transform } from '../../src/constants.js'; +import { SecretsProvider } from '../../src/secrets/SecretsProvider.js'; +import { SecretsGetOptions } from '../../src/types/SecretsProvider.js'; const logger = new TinyLogger(); const defaultProvider = new SecretsProvider(); diff --git a/packages/parameters/tests/e2e/secretsProvider.class.test.ts b/packages/parameters/tests/e2e/secretsProvider.class.test.ts index 3b700cdd3f..a5f0c539b3 100644 --- a/packages/parameters/tests/e2e/secretsProvider.class.test.ts +++ b/packages/parameters/tests/e2e/secretsProvider.class.test.ts @@ -11,13 +11,13 @@ import { } from '@aws-lambda-powertools/testing-utils'; import { SecretValue } from 'aws-cdk-lib'; import { join } from 'node:path'; -import { TestSecret } from '../helpers/resources'; +import { TestSecret } from '../helpers/resources.js'; import { RESOURCE_NAME_PREFIX, SETUP_TIMEOUT, TEARDOWN_TIMEOUT, TEST_CASE_TIMEOUT, -} from './constants'; +} from './constants.js'; /** * Collection of e2e tests for SecretsProvider utility. diff --git a/packages/parameters/tests/e2e/ssmProvider.class.test.functionCode.ts b/packages/parameters/tests/e2e/ssmProvider.class.test.functionCode.ts index a8915c2779..f1b6171e0a 100644 --- a/packages/parameters/tests/e2e/ssmProvider.class.test.functionCode.ts +++ b/packages/parameters/tests/e2e/ssmProvider.class.test.functionCode.ts @@ -1,12 +1,12 @@ -import { Context } from 'aws-lambda'; -import { SSMProvider } from '../../src/ssm'; +import type { Context } from 'aws-lambda'; +import { SSMProvider } from '../../src/ssm/SSMProvider.js'; import { SSMGetOptions, SSMGetMultipleOptions, SSMGetParametersByNameOptions, -} from '../../src/types/SSMProvider'; -import { TinyLogger } from '../helpers/tinyLogger'; -import { middleware } from '../helpers/sdkMiddlewareRequestCounter'; +} from '../../src/types/SSMProvider.js'; +import { TinyLogger } from '../helpers/tinyLogger.js'; +import { middleware } from '../helpers/sdkMiddlewareRequestCounter.js'; import { SSMClient } from '@aws-sdk/client-ssm'; // We use a custom logger to log pure JSON objects to stdout diff --git a/packages/parameters/tests/e2e/ssmProvider.class.test.ts b/packages/parameters/tests/e2e/ssmProvider.class.test.ts index 771aafd7c8..9af29e8315 100644 --- a/packages/parameters/tests/e2e/ssmProvider.class.test.ts +++ b/packages/parameters/tests/e2e/ssmProvider.class.test.ts @@ -13,13 +13,13 @@ import { join } from 'node:path'; import { TestSecureStringParameter, TestStringParameter, -} from '../helpers/resources'; +} from '../helpers/resources.js'; import { RESOURCE_NAME_PREFIX, SETUP_TIMEOUT, TEARDOWN_TIMEOUT, TEST_CASE_TIMEOUT, -} from './constants'; +} from './constants.js'; /** * This test suite deploys a CDK stack with a Lambda function and a number of SSM parameters. diff --git a/packages/parameters/tests/helpers/tinyLogger.ts b/packages/parameters/tests/helpers/tinyLogger.ts index 4fd4603d53..c49ec87ed6 100644 --- a/packages/parameters/tests/helpers/tinyLogger.ts +++ b/packages/parameters/tests/helpers/tinyLogger.ts @@ -1,4 +1,4 @@ -import { Console } from 'console'; +import { Console } from 'node:console'; /** * A tiny logger that logs to stdout and stderr. diff --git a/packages/parameters/tests/unit/AppConfigProvider.test.ts b/packages/parameters/tests/unit/AppConfigProvider.test.ts index cb6b5ad237..b2f5844402 100644 --- a/packages/parameters/tests/unit/AppConfigProvider.test.ts +++ b/packages/parameters/tests/unit/AppConfigProvider.test.ts @@ -3,9 +3,9 @@ * * @group unit/parameters/AppConfigProvider/class */ -import { AppConfigProvider } from '../../src/appconfig/index'; -import { ExpirableValue } from '../../src/base/ExpirableValue'; -import { AppConfigProviderOptions } from '../../src/types/AppConfigProvider'; +import { AppConfigProvider } from '../../src/appconfig/index.js'; +import { ExpirableValue } from '../../src/base/ExpirableValue.js'; +import { AppConfigProviderOptions } from '../../src/types/AppConfigProvider.js'; import { AppConfigDataClient, GetLatestConfigurationCommand, diff --git a/packages/parameters/tests/unit/BaseProvider.test.ts b/packages/parameters/tests/unit/BaseProvider.test.ts index 773c31b23d..9e7d8e8876 100644 --- a/packages/parameters/tests/unit/BaseProvider.test.ts +++ b/packages/parameters/tests/unit/BaseProvider.test.ts @@ -3,9 +3,20 @@ * * @group unit/parameters/baseProvider/class */ -import { BaseProvider, clearCaches, DEFAULT_PROVIDERS } from '../../src/base'; -import { ExpirableValue } from '../../src/base/ExpirableValue'; -import { GetParameterError, TransformParameterError } from '../../src/errors'; +import { + BaseProvider, + clearCaches, + DEFAULT_PROVIDERS, + GetOptions, + GetMultipleOptions, +} from '../../src/base/index.js'; +import { DEFAULT_MAX_AGE_SECS } from '../../src/index.js'; +import type { EnvironmentVariablesService } from '../../src/config/EnvironmentVariablesService.js'; +import { ExpirableValue } from '../../src/base/ExpirableValue.js'; +import { + GetParameterError, + TransformParameterError, +} from '../../src/errors.js'; import { toBase64 } from '@aws-sdk/util-base64-node'; const encoder = new TextEncoder(); @@ -20,7 +31,7 @@ describe('Class: BaseProvider', () => { this.store.set(key, value); } - public _get(_name: string): Promise { + public _get(_name: string, _options: GetOptions): Promise { throw Error('Not implemented.'); } @@ -29,7 +40,8 @@ describe('Class: BaseProvider', () => { } public _getMultiple( - _path: string + _path: string, + _options?: GetMultipleOptions ): Promise> { throw Error('Not implemented.'); } @@ -610,3 +622,35 @@ describe('Function: clearCaches', () => { expect(provider2Spy).toBeCalledTimes(1); }); }); + +describe('Class: GetOptions', () => { + it('should set the default maxAge when not provided', () => { + // Prepare + const envVarsService = { + getParametersMaxAge: jest.fn(), + }; + const options = new GetOptions( + undefined, + envVarsService as unknown as EnvironmentVariablesService + ); + + // Assess + expect(options.maxAge).toBe(DEFAULT_MAX_AGE_SECS); + }); +}); + +describe('Class: GetMultipleOptions', () => { + it('should set throwOnTransformError to false when not provided', () => { + // Prepare + const envVarsService = { + getParametersMaxAge: jest.fn(), + }; + const options = new GetMultipleOptions( + undefined, + envVarsService as unknown as EnvironmentVariablesService + ); + + // Assess + expect(options.throwOnTransformError).toBe(false); + }); +}); diff --git a/packages/parameters/tests/unit/DynamoDBProvider.test.ts b/packages/parameters/tests/unit/DynamoDBProvider.test.ts index b8112b8908..12ccd80d09 100644 --- a/packages/parameters/tests/unit/DynamoDBProvider.test.ts +++ b/packages/parameters/tests/unit/DynamoDBProvider.test.ts @@ -3,7 +3,7 @@ * * @group unit/parameters/DynamoDBProvider/class */ -import { DynamoDBProvider } from '../../src/dynamodb'; +import { DynamoDBProvider } from '../../src/dynamodb/index.js'; import { DynamoDBClient, GetItemCommand, @@ -13,7 +13,7 @@ import type { GetItemCommandInput, QueryCommandInput, } from '@aws-sdk/client-dynamodb'; -import type { DynamoDBProviderOptions } from '../../src/types/DynamoDBProvider'; +import type { DynamoDBProviderOptions } from '../../src/types/DynamoDBProvider.js'; import { marshall } from '@aws-sdk/util-dynamodb'; import { addUserAgentMiddleware } from '@aws-lambda-powertools/commons'; import { mockClient } from 'aws-sdk-client-mock'; diff --git a/packages/parameters/tests/unit/config/EnvironmentVariablesService.test.ts b/packages/parameters/tests/unit/EnvironmentVariablesService.test.ts similarity index 95% rename from packages/parameters/tests/unit/config/EnvironmentVariablesService.test.ts rename to packages/parameters/tests/unit/EnvironmentVariablesService.test.ts index 80e60086c5..c8bca2a8e0 100644 --- a/packages/parameters/tests/unit/config/EnvironmentVariablesService.test.ts +++ b/packages/parameters/tests/unit/EnvironmentVariablesService.test.ts @@ -3,7 +3,7 @@ * * @group unit/parameters/config */ -import { EnvironmentVariablesService } from '../../../src/config/EnvironmentVariablesService'; +import { EnvironmentVariablesService } from '../../src/config/EnvironmentVariablesService.js'; describe('Class: EnvironmentVariablesService', () => { const ENVIRONMENT_VARIABLES = process.env; diff --git a/packages/parameters/tests/unit/SSMProvider.test.ts b/packages/parameters/tests/unit/SSMProvider.test.ts index c11d2410b5..04da68117c 100644 --- a/packages/parameters/tests/unit/SSMProvider.test.ts +++ b/packages/parameters/tests/unit/SSMProvider.test.ts @@ -3,7 +3,7 @@ * * @group unit/parameters/ssm/class */ -import { SSMProvider } from '../../src/ssm'; +import { SSMProvider } from '../../src/ssm/index.js'; import { SSMClient, GetParameterCommand, @@ -19,8 +19,8 @@ import type { SSMGetParametersByNameOptions, SSMSplitBatchAndDecryptParametersOutputType, SSMGetParametersByNameOutputInterface, -} from '../../src/types/SSMProvider'; -import { ExpirableValue } from '../../src/base/ExpirableValue'; +} from '../../src/types/SSMProvider.js'; +import { ExpirableValue } from '../../src/base/ExpirableValue.js'; import { toBase64 } from '@aws-sdk/util-base64-node'; import { addUserAgentMiddleware } from '@aws-lambda-powertools/commons'; diff --git a/packages/parameters/tests/unit/SecretsProvider.test.ts b/packages/parameters/tests/unit/SecretsProvider.test.ts index 9bfd254537..04f54adc26 100644 --- a/packages/parameters/tests/unit/SecretsProvider.test.ts +++ b/packages/parameters/tests/unit/SecretsProvider.test.ts @@ -3,13 +3,13 @@ * * @group unit/parameters/SecretsProvider/class */ -import { SecretsProvider } from '../../src/secrets'; +import { SecretsProvider } from '../../src/secrets/index.js'; import { SecretsManagerClient, GetSecretValueCommand, } from '@aws-sdk/client-secrets-manager'; import type { GetSecretValueCommandInput } from '@aws-sdk/client-secrets-manager'; -import type { SecretsProviderOptions } from '../../src/types/SecretsProvider'; +import type { SecretsProviderOptions } from '../../src/types/SecretsProvider.js'; import { mockClient } from 'aws-sdk-client-mock'; import 'aws-sdk-client-mock-jest'; import { addUserAgentMiddleware } from '@aws-lambda-powertools/commons'; diff --git a/packages/parameters/tests/unit/getAppConfig.test.ts b/packages/parameters/tests/unit/getAppConfig.test.ts index 3243f38f0b..adbc2f6a6c 100644 --- a/packages/parameters/tests/unit/getAppConfig.test.ts +++ b/packages/parameters/tests/unit/getAppConfig.test.ts @@ -3,12 +3,9 @@ * * @group unit/parameters/AppConfigProvider/getAppConfig/function */ -import { - AppConfigProvider, - getAppConfig, - DEFAULT_PROVIDERS, -} from '../../src/appconfig'; -import { Transform } from '../../src'; +import { AppConfigProvider, getAppConfig } from '../../src/appconfig/index.js'; +import { DEFAULT_PROVIDERS } from '../../src/base/DefaultProviders.js'; +import { Transform } from '../../src/index.js'; import { AppConfigDataClient, StartConfigurationSessionCommand, diff --git a/packages/parameters/tests/unit/getParameter.test.ts b/packages/parameters/tests/unit/getParameter.test.ts index 175f5e5f4a..e02b2b887e 100644 --- a/packages/parameters/tests/unit/getParameter.test.ts +++ b/packages/parameters/tests/unit/getParameter.test.ts @@ -3,8 +3,8 @@ * * @group unit/parameters/ssm/getParameter/function */ -import { DEFAULT_PROVIDERS } from '../../src/base'; -import { SSMProvider, getParameter } from '../../src/ssm'; +import { DEFAULT_PROVIDERS } from '../../src/base/index.js'; +import { SSMProvider, getParameter } from '../../src/ssm/index.js'; import { SSMClient, GetParameterCommand } from '@aws-sdk/client-ssm'; import { mockClient } from 'aws-sdk-client-mock'; import 'aws-sdk-client-mock-jest'; diff --git a/packages/parameters/tests/unit/getParameters.test.ts b/packages/parameters/tests/unit/getParameters.test.ts index f1270b5a08..e8b0d7b430 100644 --- a/packages/parameters/tests/unit/getParameters.test.ts +++ b/packages/parameters/tests/unit/getParameters.test.ts @@ -3,8 +3,8 @@ * * @group unit/parameters/ssm/getParameters/function */ -import { DEFAULT_PROVIDERS } from '../../src/base'; -import { SSMProvider, getParameters } from '../../src/ssm'; +import { DEFAULT_PROVIDERS } from '../../src/base/index.js'; +import { SSMProvider, getParameters } from '../../src/ssm/index.js'; import { SSMClient, GetParametersByPathCommand } from '@aws-sdk/client-ssm'; import { mockClient } from 'aws-sdk-client-mock'; import 'aws-sdk-client-mock-jest'; diff --git a/packages/parameters/tests/unit/getParametersByName.test.ts b/packages/parameters/tests/unit/getParametersByName.test.ts index e0c6201d22..e423dc3502 100644 --- a/packages/parameters/tests/unit/getParametersByName.test.ts +++ b/packages/parameters/tests/unit/getParametersByName.test.ts @@ -3,9 +3,9 @@ * * @group unit/parameters/ssm/getParametersByName/function */ -import { DEFAULT_PROVIDERS } from '../../src/base'; -import { SSMProvider, getParametersByName } from '../../src/ssm'; -import type { SSMGetParametersByNameOptions } from '../../src/types/SSMProvider'; +import { DEFAULT_PROVIDERS } from '../../src/base/index.js'; +import { SSMProvider, getParametersByName } from '../../src/ssm/index.js'; +import type { SSMGetParametersByNameOptions } from '../../src/types/SSMProvider.js'; describe('Function: getParametersByName', () => { beforeEach(() => { diff --git a/packages/parameters/tests/unit/getSecret.test.ts b/packages/parameters/tests/unit/getSecret.test.ts index e1cf3b82ee..da72fab483 100644 --- a/packages/parameters/tests/unit/getSecret.test.ts +++ b/packages/parameters/tests/unit/getSecret.test.ts @@ -3,8 +3,8 @@ * * @group unit/parameters/SecretsProvider/getSecret/function */ -import { DEFAULT_PROVIDERS } from '../../src/base'; -import { SecretsProvider, getSecret } from '../../src/secrets'; +import { DEFAULT_PROVIDERS } from '../../src/base/index.js'; +import { SecretsProvider, getSecret } from '../../src/secrets/index.js'; import { SecretsManagerClient, GetSecretValueCommand, diff --git a/packages/parameters/tsconfig.esm.json b/packages/parameters/tsconfig.esm.json new file mode 100644 index 0000000000..9bed8e4da4 --- /dev/null +++ b/packages/parameters/tsconfig.esm.json @@ -0,0 +1,11 @@ +{ + "extends": "../../tsconfig.esm.json", + "compilerOptions": { + "baseUrl": ".", + "outDir": "./lib/esm", + "rootDir": "./src" + }, + "include": [ + "./src/**/*" + ] +} \ No newline at end of file diff --git a/packages/parameters/tsconfig.json b/packages/parameters/tsconfig.json index 1cb9d72773..5be842b9f8 100644 --- a/packages/parameters/tsconfig.json +++ b/packages/parameters/tsconfig.json @@ -1,7 +1,7 @@ { "extends": "../../tsconfig.json", "compilerOptions": { - "outDir": "./lib", + "outDir": "./lib/cjs/", "rootDir": "./src", }, "include": [ From aec327bbba5f735eb8f30f471b5c1119133939cc Mon Sep 17 00:00:00 2001 From: Andrea Amorosi Date: Thu, 12 Oct 2023 11:59:21 +0200 Subject: [PATCH 16/60] feat(batch): add esmodule support (#1737) --- .../batch/{jest.config.js => jest.config.cjs} | 3 + packages/batch/package.json | 35 ++++++++- .../batch/src/BasePartialBatchProcessor.ts | 12 ++- packages/batch/src/BasePartialProcessor.ts | 2 +- packages/batch/src/BatchProcessor.ts | 6 +- packages/batch/src/BatchProcessorSync.ts | 6 +- packages/batch/src/SqsFifoPartialProcessor.ts | 8 +- packages/batch/src/constants.ts | 2 +- packages/batch/src/errors.ts | 2 +- packages/batch/src/index.ts | 23 +++--- packages/batch/src/processPartialResponse.ts | 6 +- .../batch/src/processPartialResponseSync.ts | 6 +- packages/batch/tests/helpers/handlers.ts | 2 +- .../tests/unit/BasePartialProcessor.test.ts | 74 +++++++++++++++++++ .../batch/tests/unit/BatchProcessor.test.ts | 19 +++-- .../tests/unit/BatchProcessorSync.test.ts | 19 +++-- .../unit/SqsFifoPartialProcessor.test.ts | 6 +- .../tests/unit/processPartialResponse.test.ts | 36 +++++---- .../unit/processPartialResponseSync.test.ts | 36 +++++---- packages/batch/tsconfig.esm.json | 11 +++ packages/batch/tsconfig.json | 2 +- 21 files changed, 230 insertions(+), 86 deletions(-) rename packages/batch/{jest.config.js => jest.config.cjs} (93%) create mode 100644 packages/batch/tests/unit/BasePartialProcessor.test.ts create mode 100644 packages/batch/tsconfig.esm.json diff --git a/packages/batch/jest.config.js b/packages/batch/jest.config.cjs similarity index 93% rename from packages/batch/jest.config.js rename to packages/batch/jest.config.cjs index 3db7c7a6da..9eaa88fbf4 100644 --- a/packages/batch/jest.config.js +++ b/packages/batch/jest.config.cjs @@ -5,6 +5,9 @@ module.exports = { }, runner: 'groups', preset: 'ts-jest', + moduleNameMapper: { + '^(\\.{1,2}/.*)\\.js$': '$1', + }, transform: { '^.+\\.ts?$': 'ts-jest', }, diff --git a/packages/batch/package.json b/packages/batch/package.json index 2b73a507a6..e47578e9f1 100644 --- a/packages/batch/package.json +++ b/packages/batch/package.json @@ -16,19 +16,46 @@ "test:e2e:nodejs18x": "echo 'Not Implemented'", "test:e2e": "echo 'Not Implemented'", "watch": "jest --watch", - "build": "tsc --build --force", + "build:cjs": "tsc --build --force && echo '{ \"type\": \"commonjs\" }' > lib/cjs/package.json", + "build:esm": "tsc --project tsconfig.esm.json && echo '{ \"type\": \"module\" }' > lib/esm/package.json", + "build": "npm run build:esm & npm run build:cjs", "lint": "eslint --ext .ts,.js --no-error-on-unmatched-pattern .", "lint-fix": "eslint --fix --ext .ts,.js --no-error-on-unmatched-pattern .", "prebuild": "rimraf ./lib", - "prepack": "node ../../.github/scripts/release_patch_package_json.js ." + "prepack": "rimraf ./lib/*.tsbuildinfo && node ../../.github/scripts/release_patch_package_json.js ." }, "lint-staged": { "*.{js,ts}": "npm run lint-fix" }, "homepage": "https://github.com/aws-powertools/powertools-lambda-typescript/tree/main/packages/batch#readme", "license": "MIT-0", - "main": "./lib/index.js", - "types": "./lib/index.d.ts", + "type": "module", + "exports": { + ".": { + "require": { + "types": "./lib/cjs/index.d.ts", + "default": "./lib/cjs/index.js" + }, + "import": { + "types": "./lib/esm/index.d.ts", + "default": "./lib/esm/index.js" + } + }, + "./types": { + "import": "./lib/esm/types.js", + "require": "./lib/cjs/types.js" + } + }, + "typesVersions": { + "*": { + "types": [ + "lib/cjs/types.d.ts", + "lib/esm/types.d.ts" + ] + } + }, + "types": "./lib/cjs/index.d.ts", + "main": "./lib/cjs/index.js", "files": [ "lib" ], diff --git a/packages/batch/src/BasePartialBatchProcessor.ts b/packages/batch/src/BasePartialBatchProcessor.ts index 3cf4b30309..10b04b3e4e 100644 --- a/packages/batch/src/BasePartialBatchProcessor.ts +++ b/packages/batch/src/BasePartialBatchProcessor.ts @@ -3,14 +3,18 @@ import type { KinesisStreamRecord, SQSRecord, } from 'aws-lambda'; -import { BasePartialProcessor } from './BasePartialProcessor'; -import { DATA_CLASS_MAPPING, DEFAULT_RESPONSE, EventType } from './constants'; -import { FullBatchFailureError } from './errors'; +import { BasePartialProcessor } from './BasePartialProcessor.js'; +import { + DATA_CLASS_MAPPING, + DEFAULT_RESPONSE, + EventType, +} from './constants.js'; +import { FullBatchFailureError } from './errors.js'; import type { EventSourceDataClassTypes, PartialItemFailureResponse, PartialItemFailures, -} from './types'; +} from './types.js'; /** * Process batch and partially report failed items diff --git a/packages/batch/src/BasePartialProcessor.ts b/packages/batch/src/BasePartialProcessor.ts index 9de6901394..f4ec911446 100644 --- a/packages/batch/src/BasePartialProcessor.ts +++ b/packages/batch/src/BasePartialProcessor.ts @@ -5,7 +5,7 @@ import type { FailureResponse, ResultType, SuccessResponse, -} from './types'; +} from './types.js'; /** * Abstract class for batch processors. diff --git a/packages/batch/src/BatchProcessor.ts b/packages/batch/src/BatchProcessor.ts index bbe9856f07..960bcd4dde 100644 --- a/packages/batch/src/BatchProcessor.ts +++ b/packages/batch/src/BatchProcessor.ts @@ -1,6 +1,6 @@ -import { BasePartialBatchProcessor } from './BasePartialBatchProcessor'; -import { BatchProcessingError } from './errors'; -import type { BaseRecord, FailureResponse, SuccessResponse } from './types'; +import { BasePartialBatchProcessor } from './BasePartialBatchProcessor.js'; +import { BatchProcessingError } from './errors.js'; +import type { BaseRecord, FailureResponse, SuccessResponse } from './types.js'; /** * Process native partial responses from SQS, Kinesis Data Streams, and DynamoDB diff --git a/packages/batch/src/BatchProcessorSync.ts b/packages/batch/src/BatchProcessorSync.ts index 5bb8ce1f12..87a1566f4c 100644 --- a/packages/batch/src/BatchProcessorSync.ts +++ b/packages/batch/src/BatchProcessorSync.ts @@ -1,6 +1,6 @@ -import { BasePartialBatchProcessor } from './BasePartialBatchProcessor'; -import { BatchProcessingError } from './errors'; -import type { BaseRecord, FailureResponse, SuccessResponse } from './types'; +import { BasePartialBatchProcessor } from './BasePartialBatchProcessor.js'; +import { BatchProcessingError } from './errors.js'; +import type { BaseRecord, FailureResponse, SuccessResponse } from './types.js'; /** * Process native partial responses from SQS, Kinesis Data Streams, and DynamoDB diff --git a/packages/batch/src/SqsFifoPartialProcessor.ts b/packages/batch/src/SqsFifoPartialProcessor.ts index 2aca4ed814..3189c00fd5 100644 --- a/packages/batch/src/SqsFifoPartialProcessor.ts +++ b/packages/batch/src/SqsFifoPartialProcessor.ts @@ -1,7 +1,7 @@ -import { BatchProcessorSync } from './BatchProcessorSync'; -import { EventType } from './constants'; -import { SqsFifoShortCircuitError } from './errors'; -import type { FailureResponse, SuccessResponse } from './types'; +import { BatchProcessorSync } from './BatchProcessorSync.js'; +import { EventType } from './constants.js'; +import { SqsFifoShortCircuitError } from './errors.js'; +import type { FailureResponse, SuccessResponse } from './types.js'; /** * Process native partial responses from SQS FIFO queues diff --git a/packages/batch/src/constants.ts b/packages/batch/src/constants.ts index d06d5a8872..5f55e1e347 100644 --- a/packages/batch/src/constants.ts +++ b/packages/batch/src/constants.ts @@ -6,7 +6,7 @@ import type { import type { PartialItemFailureResponse, EventSourceDataClassTypes, -} from './types'; +} from './types.js'; const EventType = { SQS: 'SQS', diff --git a/packages/batch/src/errors.ts b/packages/batch/src/errors.ts index 8d2b0327b0..4ce6b27de9 100644 --- a/packages/batch/src/errors.ts +++ b/packages/batch/src/errors.ts @@ -1,4 +1,4 @@ -import { EventType } from './constants'; +import { EventType } from './constants.js'; /** * Base error thrown by the Batch Processing utility diff --git a/packages/batch/src/index.ts b/packages/batch/src/index.ts index b1b1069b26..6613712b7e 100644 --- a/packages/batch/src/index.ts +++ b/packages/batch/src/index.ts @@ -1,10 +1,13 @@ -export * from './constants'; -export * from './errors'; -export * from './types'; -export * from './BasePartialProcessor'; -export * from './BasePartialBatchProcessor'; -export * from './BatchProcessorSync'; -export * from './BatchProcessor'; -export * from './processPartialResponseSync'; -export * from './processPartialResponse'; -export * from './SqsFifoPartialProcessor'; +export { EventType } from './constants.js'; +export { + BatchProcessingError, + FullBatchFailureError, + SqsFifoShortCircuitError, + UnexpectedBatchTypeError, +} from './errors.js'; +export { BasePartialBatchProcessor } from './BasePartialBatchProcessor.js'; +export { BatchProcessorSync } from './BatchProcessorSync.js'; +export { BatchProcessor } from './BatchProcessor.js'; +export { processPartialResponseSync } from './processPartialResponseSync.js'; +export { processPartialResponse } from './processPartialResponse.js'; +export { SqsFifoPartialProcessor } from './SqsFifoPartialProcessor.js'; diff --git a/packages/batch/src/processPartialResponse.ts b/packages/batch/src/processPartialResponse.ts index 947b4268b6..8c5d7d79c9 100644 --- a/packages/batch/src/processPartialResponse.ts +++ b/packages/batch/src/processPartialResponse.ts @@ -1,10 +1,10 @@ -import { BasePartialBatchProcessor } from './BasePartialBatchProcessor'; -import { UnexpectedBatchTypeError } from './errors'; +import { BasePartialBatchProcessor } from './BasePartialBatchProcessor.js'; +import { UnexpectedBatchTypeError } from './errors.js'; import type { BaseRecord, BatchProcessingOptions, PartialItemFailureResponse, -} from './types'; +} from './types.js'; /** * Higher level function to handle batch event processing diff --git a/packages/batch/src/processPartialResponseSync.ts b/packages/batch/src/processPartialResponseSync.ts index 474713e7d5..7fb7056385 100644 --- a/packages/batch/src/processPartialResponseSync.ts +++ b/packages/batch/src/processPartialResponseSync.ts @@ -1,10 +1,10 @@ -import { BasePartialBatchProcessor } from './BasePartialBatchProcessor'; -import { UnexpectedBatchTypeError } from './errors'; +import { BasePartialBatchProcessor } from './BasePartialBatchProcessor.js'; +import { UnexpectedBatchTypeError } from './errors.js'; import type { BaseRecord, BatchProcessingOptions, PartialItemFailureResponse, -} from './types'; +} from './types.js'; /** * Higher level function to handle batch event processing diff --git a/packages/batch/tests/helpers/handlers.ts b/packages/batch/tests/helpers/handlers.ts index 0256129f9b..d8f9a638a0 100644 --- a/packages/batch/tests/helpers/handlers.ts +++ b/packages/batch/tests/helpers/handlers.ts @@ -2,8 +2,8 @@ import type { DynamoDBRecord, KinesisStreamRecord, SQSRecord, + Context, } from 'aws-lambda'; -import type { Context } from 'aws-lambda'; const sqsRecordHandler = (record: SQSRecord): string => { const body = record.body; diff --git a/packages/batch/tests/unit/BasePartialProcessor.test.ts b/packages/batch/tests/unit/BasePartialProcessor.test.ts new file mode 100644 index 0000000000..aa3bdb3d4b --- /dev/null +++ b/packages/batch/tests/unit/BasePartialProcessor.test.ts @@ -0,0 +1,74 @@ +/** + * Test BasePartialBatchProcessor class + * + * @group unit/batch/class/basepartialbatchprocessor + */ +import { BasePartialBatchProcessor, EventType } from '../../src/index.js'; +import type { + BaseRecord, + FailureResponse, + SuccessResponse, +} from '../../src/types.js'; +import { sqsRecordFactory } from '../helpers/factories.js'; +import { sqsRecordHandler } from '../helpers/handlers.js'; + +describe('Class: BasePartialBatchProcessor', () => { + const ENVIRONMENT_VARIABLES = process.env; + + beforeEach(() => { + jest.clearAllMocks(); + jest.resetModules(); + process.env = { ...ENVIRONMENT_VARIABLES }; + }); + + afterAll(() => { + process.env = ENVIRONMENT_VARIABLES; + }); + + class MyPartialProcessor extends BasePartialBatchProcessor { + public constructor() { + super(EventType.SQS); + } + + public async processRecord( + _record: BaseRecord + ): Promise { + throw new Error('Not implemented'); + } + + public processRecordSync( + record: BaseRecord + ): SuccessResponse | FailureResponse { + console.log('Processing record'); + + return this.successHandler(record, 'success'); + } + } + + describe('create custom batch partial processor', () => { + it('should create a custom batch partial processor', () => { + // Act + const processor = new MyPartialProcessor(); + + // Assess + expect(processor).toBeInstanceOf(BasePartialBatchProcessor); + }); + + it('should process a batch of records', () => { + // Prepare + const processor = new MyPartialProcessor(); + const records = [sqsRecordFactory('success')]; + const consoleSpy = jest.spyOn(console, 'log'); + + // Act + processor.register(records, sqsRecordHandler); + const processedMessages = processor.processSync(); + + // Assess + expect(processedMessages).toStrictEqual([ + ['success', records[0].body, records[0]], + ]); + expect(consoleSpy).toHaveBeenCalledTimes(1); + }); + }); +}); diff --git a/packages/batch/tests/unit/BatchProcessor.test.ts b/packages/batch/tests/unit/BatchProcessor.test.ts index 3243c1a4a0..4588e62099 100644 --- a/packages/batch/tests/unit/BatchProcessor.test.ts +++ b/packages/batch/tests/unit/BatchProcessor.test.ts @@ -1,25 +1,28 @@ /** - * Test AsyncBatchProcessor class + * Test BatchProcessor class * - * @group unit/batch/class/asyncBatchProcessor + * @group unit/batch/class/batchprocessor */ import type { Context } from 'aws-lambda'; import { ContextExamples as dummyContext } from '@aws-lambda-powertools/commons'; -import { BatchProcessor } from '../../src/BatchProcessor'; -import { EventType } from '../../src/constants'; -import { BatchProcessingError, FullBatchFailureError } from '../../src/errors'; -import type { BatchProcessingOptions } from '../../src/types'; +import { + BatchProcessor, + EventType, + BatchProcessingError, + FullBatchFailureError, +} from '../../src/index.js'; +import type { BatchProcessingOptions } from '../../src/types.js'; import { dynamodbRecordFactory, kinesisRecordFactory, sqsRecordFactory, -} from '../helpers/factories'; +} from '../helpers/factories.js'; import { asyncDynamodbRecordHandler, asyncKinesisRecordHandler, asyncSqsRecordHandler, asyncHandlerWithContext, -} from '../helpers/handlers'; +} from '../helpers/handlers.js'; describe('Class: AsyncBatchProcessor', () => { const ENVIRONMENT_VARIABLES = process.env; diff --git a/packages/batch/tests/unit/BatchProcessorSync.test.ts b/packages/batch/tests/unit/BatchProcessorSync.test.ts index 506e192d02..31a5315431 100644 --- a/packages/batch/tests/unit/BatchProcessorSync.test.ts +++ b/packages/batch/tests/unit/BatchProcessorSync.test.ts @@ -1,25 +1,28 @@ /** - * Test BatchProcessor class + * Test BatchProcessorSync class * - * @group unit/batch/class/batchprocessor + * @group unit/batch/class/batchprocessorsync */ import type { Context } from 'aws-lambda'; import { ContextExamples as dummyContext } from '@aws-lambda-powertools/commons'; -import { BatchProcessorSync } from '../../src/BatchProcessorSync'; -import { EventType } from '../../src/constants'; -import { BatchProcessingError, FullBatchFailureError } from '../../src/errors'; -import type { BatchProcessingOptions } from '../../src/types'; +import { + BatchProcessorSync, + EventType, + BatchProcessingError, + FullBatchFailureError, +} from '../../src/index.js'; +import type { BatchProcessingOptions } from '../../src/types.js'; import { dynamodbRecordFactory, kinesisRecordFactory, sqsRecordFactory, -} from '../helpers/factories'; +} from '../helpers/factories.js'; import { dynamodbRecordHandler, handlerWithContext, kinesisRecordHandler, sqsRecordHandler, -} from '../helpers/handlers'; +} from '../helpers/handlers.js'; describe('Class: BatchProcessor', () => { const ENVIRONMENT_VARIABLES = process.env; diff --git a/packages/batch/tests/unit/SqsFifoPartialProcessor.test.ts b/packages/batch/tests/unit/SqsFifoPartialProcessor.test.ts index 5c7f6c5796..61d12183fc 100644 --- a/packages/batch/tests/unit/SqsFifoPartialProcessor.test.ts +++ b/packages/batch/tests/unit/SqsFifoPartialProcessor.test.ts @@ -7,9 +7,9 @@ import { SqsFifoPartialProcessor, processPartialResponseSync, SqsFifoShortCircuitError, -} from '../../src'; -import { sqsRecordFactory } from '../helpers/factories'; -import { sqsRecordHandler } from '../helpers/handlers'; +} from '../../src/index.js'; +import { sqsRecordFactory } from '../helpers/factories.js'; +import { sqsRecordHandler } from '../helpers/handlers.js'; describe('Class: SqsFifoBatchProcessor', () => { const ENVIRONMENT_VARIABLES = process.env; diff --git a/packages/batch/tests/unit/processPartialResponse.test.ts b/packages/batch/tests/unit/processPartialResponse.test.ts index d344eb7883..66d97177a5 100644 --- a/packages/batch/tests/unit/processPartialResponse.test.ts +++ b/packages/batch/tests/unit/processPartialResponse.test.ts @@ -13,24 +13,28 @@ import { ContextExamples as dummyContext, Events as dummyEvent, } from '@aws-lambda-powertools/commons'; -import { BatchProcessor } from '../../src/BatchProcessor'; -import { processPartialResponse } from '../../src/processPartialResponse'; -import { EventType } from '../../src/constants'; +import { + BatchProcessor, + processPartialResponse, + EventType, + UnexpectedBatchTypeError, +} from '../../src/index.js'; import type { BatchProcessingOptions, PartialItemFailureResponse, -} from '../../src/types'; +} from '../../src/types.js'; import { dynamodbRecordFactory, kinesisRecordFactory, sqsRecordFactory, -} from '../helpers/factories'; +} from '../helpers/factories.js'; import { asyncDynamodbRecordHandler, asyncHandlerWithContext, asyncKinesisRecordHandler, asyncSqsRecordHandler, -} from '../helpers/handlers'; +} from '../helpers/handlers.js'; +import assert from 'node:assert'; describe('Function: processPartialResponse()', () => { const ENVIRONMENT_VARIABLES = process.env; @@ -186,14 +190,18 @@ describe('Function: processPartialResponse()', () => { ); }; - // Act & Assess - await expect(() => - handler(event as unknown as SQSEvent, context.helloworldContext) - ).rejects.toThrowError( - `Unexpected batch type. Possible values are: ${Object.keys( - EventType - ).join(', ')}` - ); + try { + // Act + await handler(event as unknown as SQSEvent, context.helloworldContext); + } catch (error) { + // Assess + assert(error instanceof UnexpectedBatchTypeError); + expect(error.message).toBe( + `Unexpected batch type. Possible values are: ${Object.keys( + EventType + ).join(', ')}` + ); + } }); test('Process partial response through handler with context provided', async () => { diff --git a/packages/batch/tests/unit/processPartialResponseSync.test.ts b/packages/batch/tests/unit/processPartialResponseSync.test.ts index 426428f5d4..e6700d8959 100644 --- a/packages/batch/tests/unit/processPartialResponseSync.test.ts +++ b/packages/batch/tests/unit/processPartialResponseSync.test.ts @@ -13,24 +13,28 @@ import { ContextExamples as dummyContext, Events as dummyEvent, } from '@aws-lambda-powertools/commons'; -import { BatchProcessorSync } from '../../src/BatchProcessorSync'; -import { processPartialResponseSync } from '../../src/processPartialResponseSync'; -import { EventType } from '../../src/constants'; +import { + BatchProcessorSync, + processPartialResponseSync, + EventType, + UnexpectedBatchTypeError, +} from '../../src/index.js'; import type { BatchProcessingOptions, PartialItemFailureResponse, -} from '../../src/types'; +} from '../../src/types.js'; import { dynamodbRecordFactory, kinesisRecordFactory, sqsRecordFactory, -} from '../helpers/factories'; +} from '../helpers/factories.js'; import { dynamodbRecordHandler, handlerWithContext, kinesisRecordHandler, sqsRecordHandler, -} from '../helpers/handlers'; +} from '../helpers/handlers.js'; +import assert from 'node:assert'; describe('Function: processPartialResponse()', () => { const ENVIRONMENT_VARIABLES = process.env; @@ -182,14 +186,18 @@ describe('Function: processPartialResponse()', () => { return processPartialResponseSync(event, sqsRecordHandler, processor); }; - // Act & Assess - expect(() => - handler(event as unknown as SQSEvent, context.helloworldContext) - ).toThrowError( - `Unexpected batch type. Possible values are: ${Object.keys( - EventType - ).join(', ')}` - ); + try { + // Act + handler(event as unknown as SQSEvent, context.helloworldContext); + } catch (error) { + // Assess + assert(error instanceof UnexpectedBatchTypeError); + expect(error.message).toBe( + `Unexpected batch type. Possible values are: ${Object.keys( + EventType + ).join(', ')}` + ); + } }); test('Process partial response through handler with context provided', () => { diff --git a/packages/batch/tsconfig.esm.json b/packages/batch/tsconfig.esm.json new file mode 100644 index 0000000000..9bed8e4da4 --- /dev/null +++ b/packages/batch/tsconfig.esm.json @@ -0,0 +1,11 @@ +{ + "extends": "../../tsconfig.esm.json", + "compilerOptions": { + "baseUrl": ".", + "outDir": "./lib/esm", + "rootDir": "./src" + }, + "include": [ + "./src/**/*" + ] +} \ No newline at end of file diff --git a/packages/batch/tsconfig.json b/packages/batch/tsconfig.json index 1cb9d72773..5be842b9f8 100644 --- a/packages/batch/tsconfig.json +++ b/packages/batch/tsconfig.json @@ -1,7 +1,7 @@ { "extends": "../../tsconfig.json", "compilerOptions": { - "outDir": "./lib", + "outDir": "./lib/cjs/", "rootDir": "./src", }, "include": [ From 90a75238fb5b8b7d025082151d407b8de0d31bd1 Mon Sep 17 00:00:00 2001 From: Andrea Amorosi Date: Thu, 12 Oct 2023 12:56:40 +0200 Subject: [PATCH 17/60] feat(internal): add esmodule support (#1738) * feat(testing): add esmodule support * chore(all): update imports --- package-lock.json | 11 +- packages/batch/package.json | 7 +- .../batch/tests/unit/BatchProcessor.test.ts | 4 +- .../tests/unit/BatchProcessorSync.test.ts | 4 +- .../tests/unit/processPartialResponse.test.ts | 19 +-- .../unit/processPartialResponseSync.test.ts | 19 +-- packages/commons/package.json | 9 +- packages/commons/src/index.ts | 2 - .../src/samples/resources/contexts/index.ts | 1 - .../events/aws/apigateway-authorizer.json | 5 - .../events/aws/apigateway-aws-proxy.json | 123 ------------------ .../events/aws/appsync-resolver.json | 74 ----------- .../resources/events/aws/batch-get-job.json | 5 - .../events/aws/batch-submit-job.json | 5 - .../aws/cloudformation-create-request.json | 16 --- .../events/aws/cloudfront-ab-test.json | 36 ----- ...cloudfront-access-request-in-response.json | 42 ------ .../events/aws/cloudfront-http-direct.json | 30 ----- .../aws/cloudfront-modify-querystring.json | 37 ------ .../cloudfront-modify-response-header.json | 35 ----- ...tiple-remote-calls-aggregate-response.json | 30 ----- ...lize-querystring-to-improve-cache-hit.json | 37 ------ ...cloudfront-redirect-on-viewer-country.json | 30 ----- ...dfront-redirect-unauthenticated-users.json | 24 ---- .../aws/cloudfront-response-generation.json | 24 ---- ...udfront-serve-object-on-viewer-device.json | 48 ------- .../aws/cloudfront-simple-remote-call.json | 36 ----- .../resources/events/aws/cloudwatch-logs.json | 5 - .../aws/cloudwatch-scheduled-event.json | 12 -- .../events/aws/codecommit-repository.json | 27 ---- .../events/aws/codepipeline-job.json | 45 ------- .../events/aws/cognito-sync-trigger.json | 20 --- ...ig-oversized-item-change-notification.json | 12 -- .../events/aws/config-periodic-rule.json | 12 -- .../aws/confit-item-change-notification.json | 12 -- .../aws/connect-contact-flow-event.json | 33 ----- .../events/aws/dynamodb-update-2.json | 90 ------------- .../resources/events/aws/dynamodb-update.json | 93 ------------- .../aws/kinesis-analytics-compressed.json | 11 -- .../aws/kinesis-analytics-dynamodb.json | 11 -- .../events/aws/kinesis-analytics-kpl.json | 27 ---- .../events/aws/kinesis-analytics.json | 11 -- .../events/aws/kinesis-apachelog.json | 11 -- .../kinesis-cloudwatch-logs-processor.json | 27 ---- .../events/aws/kinesis-get-records.json | 20 --- .../events/aws/kinesis-kinesis-firehose.json | 12 -- .../events/aws/kinesis-streams-source.json | 19 --- .../resources/events/aws/kinesis-syslog.json | 16 --- .../events/aws/rekognition-s3-request.json | 38 ------ .../resources/events/aws/s3-delete.json | 36 ----- .../samples/resources/events/aws/s3-put.json | 38 ------ ...ground-truth-annotation-consolidation.json | 9 -- .../aws/sagemaker-ground-truth-pre-human.json | 7 - .../events/aws/ses-email-receiving.json | 97 -------------- .../events/aws/sns-notification.json | 31 ----- .../events/aws/sqs-receive-message.json | 20 --- .../events/aws/stepfunctions-error.json | 1 - .../samples/resources/events/custom/index.ts | 5 - .../src/samples/resources/events/index.ts | 1 - .../unit/EnvironmentVariablesService.test.ts | 1 - .../tests/unit/LambdaInterface.test.ts | 2 +- .../tests/unit/cleanupMiddlewares.test.ts | 2 +- .../idempotency/tests/helpers/resources.ts | 14 +- .../tests/unit/IdempotencyConfig.test.ts | 3 +- .../tests/unit/idempotencyDecorator.test.ts | 32 +++-- .../tests/unit/makeHandlerIdempotent.test.ts | 11 +- .../tests/unit/makeIdempotent.test.ts | 11 +- .../persistence/BasePersistenceLayer.test.ts | 3 +- .../basicFeatures.middy.test.FunctionCode.ts | 7 +- .../tests/e2e/basicFeatures.middy.test.ts | 4 +- .../childLogger.manual.test.FunctionCode.ts | 8 +- .../tests/e2e/childLogger.manual.test.ts | 4 +- ...ntEnvVarSetting.middy.test.FunctionCode.ts | 7 +- .../e2e/logEventEnvVarSetting.middy.test.ts | 4 +- .../sampleRate.decorator.test.FunctionCode.ts | 6 +- .../tests/e2e/sampleRate.decorator.test.ts | 4 +- packages/logger/tests/helpers/resources.ts | 6 +- packages/logger/tests/unit/Logger.test.ts | 21 ++- .../formatter/PowertoolsLogFormatter.test.ts | 2 +- .../tests/unit/middleware/middy.test.ts | 34 ++--- ...sicFeatures.decorator.test.functionCode.ts | 4 +- .../e2e/basicFeatures.decorators.test.ts | 6 +- .../basicFeatures.manual.test.functionCode.ts | 2 +- .../tests/e2e/basicFeatures.manual.test.ts | 6 +- packages/metrics/tests/e2e/constants.ts | 2 +- packages/metrics/tests/helpers/resources.ts | 6 +- packages/metrics/tests/unit/Metrics.test.ts | 15 +-- .../tests/unit/middleware/middy.test.ts | 78 ++++------- packages/parameters/package.json | 3 +- .../tests/e2e/appConfigProvider.class.test.ts | 2 +- .../tests/e2e/dynamoDBProvider.class.test.ts | 2 +- .../tests/e2e/secretsProvider.class.test.ts | 2 +- .../tests/e2e/ssmProvider.class.test.ts | 2 +- .../parameters/tests/helpers/resources.ts | 8 +- .../{jest.config.js => jest.config.cjs} | 3 + packages/testing/package.json | 59 ++++++++- packages/testing/src/TestInvocationLogs.ts | 34 ++--- packages/testing/src/TestStack.ts | 31 +---- packages/testing/src/constants.ts | 11 ++ .../hello-world.ts => testing/src/context.ts} | 6 +- packages/testing/src/helpers.ts | 2 +- packages/testing/src/index.ts | 24 +++- packages/testing/src/invokeTestFunction.ts | 10 +- .../src/resources/TestDynamodbTable.ts | 8 +- .../src/resources/TestNodejsFunction.ts | 10 +- packages/testing/src/resources/index.ts | 2 - packages/testing/src/resources/types.ts | 31 ----- packages/testing/src/types.ts | 88 +++++++++++++ .../tests/unit/TestInvocationLogs.test.ts | 2 +- packages/testing/tsconfig.esm.json | 11 ++ packages/testing/tsconfig.json | 2 +- .../tests/e2e/allFeatures.decorator.test.ts | 6 +- .../tests/e2e/allFeatures.manual.test.ts | 6 +- .../tests/e2e/allFeatures.middy.test.ts | 6 +- .../tests/e2e/asyncHandler.decorator.test.ts | 6 +- packages/tracer/tests/helpers/resources.ts | 6 +- packages/tracer/tests/unit/Tracer.test.ts | 11 +- packages/tracer/tests/unit/middy.test.ts | 16 +-- 118 files changed, 409 insertions(+), 1828 deletions(-) delete mode 100644 packages/commons/src/samples/resources/contexts/index.ts delete mode 100644 packages/commons/src/samples/resources/events/aws/apigateway-authorizer.json delete mode 100644 packages/commons/src/samples/resources/events/aws/apigateway-aws-proxy.json delete mode 100644 packages/commons/src/samples/resources/events/aws/appsync-resolver.json delete mode 100644 packages/commons/src/samples/resources/events/aws/batch-get-job.json delete mode 100644 packages/commons/src/samples/resources/events/aws/batch-submit-job.json delete mode 100644 packages/commons/src/samples/resources/events/aws/cloudformation-create-request.json delete mode 100644 packages/commons/src/samples/resources/events/aws/cloudfront-ab-test.json delete mode 100644 packages/commons/src/samples/resources/events/aws/cloudfront-access-request-in-response.json delete mode 100644 packages/commons/src/samples/resources/events/aws/cloudfront-http-direct.json delete mode 100644 packages/commons/src/samples/resources/events/aws/cloudfront-modify-querystring.json delete mode 100644 packages/commons/src/samples/resources/events/aws/cloudfront-modify-response-header.json delete mode 100644 packages/commons/src/samples/resources/events/aws/cloudfront-multiple-remote-calls-aggregate-response.json delete mode 100644 packages/commons/src/samples/resources/events/aws/cloudfront-normalize-querystring-to-improve-cache-hit.json delete mode 100644 packages/commons/src/samples/resources/events/aws/cloudfront-redirect-on-viewer-country.json delete mode 100644 packages/commons/src/samples/resources/events/aws/cloudfront-redirect-unauthenticated-users.json delete mode 100644 packages/commons/src/samples/resources/events/aws/cloudfront-response-generation.json delete mode 100644 packages/commons/src/samples/resources/events/aws/cloudfront-serve-object-on-viewer-device.json delete mode 100644 packages/commons/src/samples/resources/events/aws/cloudfront-simple-remote-call.json delete mode 100644 packages/commons/src/samples/resources/events/aws/cloudwatch-logs.json delete mode 100644 packages/commons/src/samples/resources/events/aws/cloudwatch-scheduled-event.json delete mode 100644 packages/commons/src/samples/resources/events/aws/codecommit-repository.json delete mode 100644 packages/commons/src/samples/resources/events/aws/codepipeline-job.json delete mode 100644 packages/commons/src/samples/resources/events/aws/cognito-sync-trigger.json delete mode 100644 packages/commons/src/samples/resources/events/aws/config-oversized-item-change-notification.json delete mode 100644 packages/commons/src/samples/resources/events/aws/config-periodic-rule.json delete mode 100644 packages/commons/src/samples/resources/events/aws/confit-item-change-notification.json delete mode 100644 packages/commons/src/samples/resources/events/aws/connect-contact-flow-event.json delete mode 100644 packages/commons/src/samples/resources/events/aws/dynamodb-update-2.json delete mode 100644 packages/commons/src/samples/resources/events/aws/dynamodb-update.json delete mode 100644 packages/commons/src/samples/resources/events/aws/kinesis-analytics-compressed.json delete mode 100644 packages/commons/src/samples/resources/events/aws/kinesis-analytics-dynamodb.json delete mode 100644 packages/commons/src/samples/resources/events/aws/kinesis-analytics-kpl.json delete mode 100644 packages/commons/src/samples/resources/events/aws/kinesis-analytics.json delete mode 100644 packages/commons/src/samples/resources/events/aws/kinesis-apachelog.json delete mode 100644 packages/commons/src/samples/resources/events/aws/kinesis-cloudwatch-logs-processor.json delete mode 100644 packages/commons/src/samples/resources/events/aws/kinesis-get-records.json delete mode 100644 packages/commons/src/samples/resources/events/aws/kinesis-kinesis-firehose.json delete mode 100644 packages/commons/src/samples/resources/events/aws/kinesis-streams-source.json delete mode 100644 packages/commons/src/samples/resources/events/aws/kinesis-syslog.json delete mode 100644 packages/commons/src/samples/resources/events/aws/rekognition-s3-request.json delete mode 100644 packages/commons/src/samples/resources/events/aws/s3-delete.json delete mode 100644 packages/commons/src/samples/resources/events/aws/s3-put.json delete mode 100644 packages/commons/src/samples/resources/events/aws/sagemaker-ground-truth-annotation-consolidation.json delete mode 100644 packages/commons/src/samples/resources/events/aws/sagemaker-ground-truth-pre-human.json delete mode 100644 packages/commons/src/samples/resources/events/aws/ses-email-receiving.json delete mode 100644 packages/commons/src/samples/resources/events/aws/sns-notification.json delete mode 100644 packages/commons/src/samples/resources/events/aws/sqs-receive-message.json delete mode 100644 packages/commons/src/samples/resources/events/aws/stepfunctions-error.json delete mode 100644 packages/commons/src/samples/resources/events/custom/index.ts delete mode 100644 packages/commons/src/samples/resources/events/index.ts rename packages/testing/{jest.config.js => jest.config.cjs} (93%) rename packages/{commons/src/samples/resources/contexts/hello-world.ts => testing/src/context.ts} (89%) delete mode 100644 packages/testing/src/resources/index.ts delete mode 100644 packages/testing/src/resources/types.ts create mode 100644 packages/testing/src/types.ts create mode 100644 packages/testing/tsconfig.esm.json diff --git a/package-lock.json b/package-lock.json index 7a50e591d9..eefa6cdd40 100644 --- a/package-lock.json +++ b/package-lock.json @@ -16560,12 +16560,18 @@ "packages/batch": { "name": "@aws-lambda-powertools/batch", "version": "1.14.0", - "license": "MIT-0" + "license": "MIT-0", + "devDependencies": { + "@aws-lambda-powertools/testing-utils": "file:../testing" + } }, "packages/commons": { "name": "@aws-lambda-powertools/commons", "version": "1.14.0", - "license": "MIT-0" + "license": "MIT-0", + "devDependencies": { + "@aws-lambda-powertools/testing-utils": "file:../testing" + } }, "packages/idempotency": { "name": "@aws-lambda-powertools/idempotency", @@ -16653,6 +16659,7 @@ "@aws-sdk/util-base64-node": "^3.209.0" }, "devDependencies": { + "@aws-lambda-powertools/testing-utils": "file:../testing", "@aws-sdk/client-appconfigdata": "^3.413.0", "@aws-sdk/client-dynamodb": "^3.413.0", "@aws-sdk/client-secrets-manager": "^3.413.0", diff --git a/packages/batch/package.json b/packages/batch/package.json index e47578e9f1..1ff802cdf4 100644 --- a/packages/batch/package.json +++ b/packages/batch/package.json @@ -74,5 +74,8 @@ "batch-processing", "serverless", "nodejs" - ] -} \ No newline at end of file + ], + "devDependencies": { + "@aws-lambda-powertools/testing-utils": "file:../testing" + } +} diff --git a/packages/batch/tests/unit/BatchProcessor.test.ts b/packages/batch/tests/unit/BatchProcessor.test.ts index 4588e62099..1b1114ca86 100644 --- a/packages/batch/tests/unit/BatchProcessor.test.ts +++ b/packages/batch/tests/unit/BatchProcessor.test.ts @@ -4,7 +4,7 @@ * @group unit/batch/class/batchprocessor */ import type { Context } from 'aws-lambda'; -import { ContextExamples as dummyContext } from '@aws-lambda-powertools/commons'; +import context from '@aws-lambda-powertools/testing-utils/context'; import { BatchProcessor, EventType, @@ -27,7 +27,7 @@ import { describe('Class: AsyncBatchProcessor', () => { const ENVIRONMENT_VARIABLES = process.env; const options: BatchProcessingOptions = { - context: dummyContext.helloworldContext, + context, }; beforeEach(() => { diff --git a/packages/batch/tests/unit/BatchProcessorSync.test.ts b/packages/batch/tests/unit/BatchProcessorSync.test.ts index 31a5315431..bf93f590a0 100644 --- a/packages/batch/tests/unit/BatchProcessorSync.test.ts +++ b/packages/batch/tests/unit/BatchProcessorSync.test.ts @@ -4,7 +4,7 @@ * @group unit/batch/class/batchprocessorsync */ import type { Context } from 'aws-lambda'; -import { ContextExamples as dummyContext } from '@aws-lambda-powertools/commons'; +import context from '@aws-lambda-powertools/testing-utils/context'; import { BatchProcessorSync, EventType, @@ -27,7 +27,7 @@ import { describe('Class: BatchProcessor', () => { const ENVIRONMENT_VARIABLES = process.env; const options: BatchProcessingOptions = { - context: dummyContext.helloworldContext, + context, }; beforeEach(() => { diff --git a/packages/batch/tests/unit/processPartialResponse.test.ts b/packages/batch/tests/unit/processPartialResponse.test.ts index 66d97177a5..732d40ee3b 100644 --- a/packages/batch/tests/unit/processPartialResponse.test.ts +++ b/packages/batch/tests/unit/processPartialResponse.test.ts @@ -9,10 +9,7 @@ import type { KinesisStreamEvent, SQSEvent, } from 'aws-lambda'; -import { - ContextExamples as dummyContext, - Events as dummyEvent, -} from '@aws-lambda-powertools/commons'; +import context from '@aws-lambda-powertools/testing-utils/context'; import { BatchProcessor, processPartialResponse, @@ -38,9 +35,8 @@ import assert from 'node:assert'; describe('Function: processPartialResponse()', () => { const ENVIRONMENT_VARIABLES = process.env; - const context = dummyContext; const options: BatchProcessingOptions = { - context: dummyContext.helloworldContext, + context, }; beforeEach(() => { @@ -114,7 +110,7 @@ describe('Function: processPartialResponse()', () => { }; // Act - const result = await handler(event, context.helloworldContext); + const result = await handler(event, context); // Assess expect(result).toStrictEqual({ batchItemFailures: [] }); @@ -141,7 +137,7 @@ describe('Function: processPartialResponse()', () => { }; // Act - const result = await handler(event, context.helloworldContext); + const result = await handler(event, context); // Assess expect(result).toStrictEqual({ batchItemFailures: [] }); @@ -168,7 +164,7 @@ describe('Function: processPartialResponse()', () => { }; // Act - const result = await handler(event, context.helloworldContext); + const result = await handler(event, context); // Assess expect(result).toStrictEqual({ batchItemFailures: [] }); @@ -177,7 +173,6 @@ describe('Function: processPartialResponse()', () => { test('Process partial response through handler for SQS records with incorrect event type', async () => { // Prepare const processor = new BatchProcessor(EventType.SQS); - const event = dummyEvent.Custom; const handler = async ( event: SQSEvent, @@ -192,7 +187,7 @@ describe('Function: processPartialResponse()', () => { try { // Act - await handler(event as unknown as SQSEvent, context.helloworldContext); + await handler({} as unknown as SQSEvent, context); } catch (error) { // Assess assert(error instanceof UnexpectedBatchTypeError); @@ -228,7 +223,7 @@ describe('Function: processPartialResponse()', () => { }; // Act - const result = await handler(event, context.helloworldContext); + const result = await handler(event, context); // Assess expect(result).toStrictEqual({ batchItemFailures: [] }); diff --git a/packages/batch/tests/unit/processPartialResponseSync.test.ts b/packages/batch/tests/unit/processPartialResponseSync.test.ts index e6700d8959..4fe7da8609 100644 --- a/packages/batch/tests/unit/processPartialResponseSync.test.ts +++ b/packages/batch/tests/unit/processPartialResponseSync.test.ts @@ -9,10 +9,7 @@ import type { KinesisStreamEvent, SQSEvent, } from 'aws-lambda'; -import { - ContextExamples as dummyContext, - Events as dummyEvent, -} from '@aws-lambda-powertools/commons'; +import context from '@aws-lambda-powertools/testing-utils/context'; import { BatchProcessorSync, processPartialResponseSync, @@ -38,9 +35,8 @@ import assert from 'node:assert'; describe('Function: processPartialResponse()', () => { const ENVIRONMENT_VARIABLES = process.env; - const context = dummyContext; const options: BatchProcessingOptions = { - context: dummyContext.helloworldContext, + context, }; beforeEach(() => { @@ -114,7 +110,7 @@ describe('Function: processPartialResponse()', () => { }; // Act - const result = handler(event, context.helloworldContext); + const result = handler(event, context); // Assess expect(result).toStrictEqual({ batchItemFailures: [] }); @@ -141,7 +137,7 @@ describe('Function: processPartialResponse()', () => { }; // Act - const result = handler(event, context.helloworldContext); + const result = handler(event, context); // Assess expect(result).toStrictEqual({ batchItemFailures: [] }); @@ -168,7 +164,7 @@ describe('Function: processPartialResponse()', () => { }; // Act - const result = handler(event, context.helloworldContext); + const result = handler(event, context); // Assess expect(result).toStrictEqual({ batchItemFailures: [] }); @@ -177,7 +173,6 @@ describe('Function: processPartialResponse()', () => { test('Process partial response through handler for SQS records with incorrect event type', () => { // Prepare const processor = new BatchProcessorSync(EventType.SQS); - const event = dummyEvent.Custom; const handler = ( event: SQSEvent, @@ -188,7 +183,7 @@ describe('Function: processPartialResponse()', () => { try { // Act - handler(event as unknown as SQSEvent, context.helloworldContext); + handler({} as unknown as SQSEvent, context); } catch (error) { // Assess assert(error instanceof UnexpectedBatchTypeError); @@ -224,7 +219,7 @@ describe('Function: processPartialResponse()', () => { }; // Act - const result = handler(event, context.helloworldContext); + const result = handler(event, context); // Assess expect(result).toStrictEqual({ batchItemFailures: [] }); diff --git a/packages/commons/package.json b/packages/commons/package.json index d7a3bab71c..a3e0e47296 100644 --- a/packages/commons/package.json +++ b/packages/commons/package.json @@ -25,7 +25,7 @@ "lint-staged": { "*.{js,ts}": "npm run lint-fix" }, - "homepage": "https://github.com/aws-powertools/powertools-lambda-typescript/tree/main/packages/metrics#readme", + "homepage": "https://github.com/aws-powertools/powertools-lambda-typescript/tree/main/packages/commons#readme", "license": "MIT-0", "type": "module", "exports": { @@ -70,5 +70,8 @@ "powertools", "serverless", "nodejs" - ] -} \ No newline at end of file + ], + "devDependencies": { + "@aws-lambda-powertools/testing-utils": "file:../testing" + } +} diff --git a/packages/commons/src/index.ts b/packages/commons/src/index.ts index f6ff7df34e..cdf0815bad 100644 --- a/packages/commons/src/index.ts +++ b/packages/commons/src/index.ts @@ -1,8 +1,6 @@ export { isRecord, isString, isTruthy, isNullOrUndefined } from './guards.js'; export { Utility } from './Utility.js'; export { EnvironmentVariablesService } from './config/EnvironmentVariablesService.js'; -export * as ContextExamples from './samples/resources/contexts/index.js'; -export * as Events from './samples/resources/events/index.js'; export { addUserAgentMiddleware, isSdkClient } from './awsSdkUtils.js'; export { cleanupMiddlewares } from './middleware/cleanupMiddlewares.js'; export { diff --git a/packages/commons/src/samples/resources/contexts/index.ts b/packages/commons/src/samples/resources/contexts/index.ts deleted file mode 100644 index 910f356d2c..0000000000 --- a/packages/commons/src/samples/resources/contexts/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './hello-world.js'; diff --git a/packages/commons/src/samples/resources/events/aws/apigateway-authorizer.json b/packages/commons/src/samples/resources/events/aws/apigateway-authorizer.json deleted file mode 100644 index 2bbf060353..0000000000 --- a/packages/commons/src/samples/resources/events/aws/apigateway-authorizer.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "type": "TOKEN", - "authorizationToken": "incoming-client-token", - "methodArn": "arn:aws:execute-api:eu-central-1:123456789012:example/prod/POST/{proxy+}" -} \ No newline at end of file diff --git a/packages/commons/src/samples/resources/events/aws/apigateway-aws-proxy.json b/packages/commons/src/samples/resources/events/aws/apigateway-aws-proxy.json deleted file mode 100644 index fb46b342eb..0000000000 --- a/packages/commons/src/samples/resources/events/aws/apigateway-aws-proxy.json +++ /dev/null @@ -1,123 +0,0 @@ -{ - "body": "eyJ0ZXN0IjoiYm9keSJ9", - "resource": "/{proxy+}", - "path": "/path/to/resource", - "httpMethod": "POST", - "isBase64Encoded": true, - "queryStringParameters": { - "foo": "bar" - }, - "multiValueQueryStringParameters": { - "foo": [ - "bar" - ] - }, - "pathParameters": { - "proxy": "/path/to/resource" - }, - "stageVariables": { - "baz": "qux" - }, - "headers": { - "Accept": "text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8", - "Accept-Encoding": "gzip, deflate, sdch", - "Accept-Language": "en-US,en;q=0.8", - "Cache-Control": "max-age=0", - "CloudFront-Forwarded-Proto": "https", - "CloudFront-Is-Desktop-Viewer": "true", - "CloudFront-Is-Mobile-Viewer": "false", - "CloudFront-Is-SmartTV-Viewer": "false", - "CloudFront-Is-Tablet-Viewer": "false", - "CloudFront-Viewer-Country": "US", - "Host": "1234567890.execute-api.eu-central-1.amazonaws.com", - "Upgrade-Insecure-Requests": "1", - "User-Agent": "Custom User Agent String", - "Via": "1.1 08f323deadbeefa7af34d5feb414ce27.cloudfront.net (CloudFront)", - "X-Amz-Cf-Id": "cDehVQoZnx43VYQb9j2-nvCh-9z396Uhbp027Y2JvkCPNLmGJHqlaA==", - "X-Forwarded-For": "127.0.0.1, 127.0.0.2", - "X-Forwarded-Port": "443", - "X-Forwarded-Proto": "https" - }, - "multiValueHeaders": { - "Accept": [ - "text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8" - ], - "Accept-Encoding": [ - "gzip, deflate, sdch" - ], - "Accept-Language": [ - "en-US,en;q=0.8" - ], - "Cache-Control": [ - "max-age=0" - ], - "CloudFront-Forwarded-Proto": [ - "https" - ], - "CloudFront-Is-Desktop-Viewer": [ - "true" - ], - "CloudFront-Is-Mobile-Viewer": [ - "false" - ], - "CloudFront-Is-SmartTV-Viewer": [ - "false" - ], - "CloudFront-Is-Tablet-Viewer": [ - "false" - ], - "CloudFront-Viewer-Country": [ - "US" - ], - "Host": [ - "0123456789.execute-api.eu-central-1.amazonaws.com" - ], - "Upgrade-Insecure-Requests": [ - "1" - ], - "User-Agent": [ - "Custom User Agent String" - ], - "Via": [ - "1.1 08f323deadbeefa7af34d5feb414ce27.cloudfront.net (CloudFront)" - ], - "X-Amz-Cf-Id": [ - "cDehVQoZnx43VYQb9j2-nvCh-9z396Uhbp027Y2JvkCPNLmGJHqlaA==" - ], - "X-Forwarded-For": [ - "127.0.0.1, 127.0.0.2" - ], - "X-Forwarded-Port": [ - "443" - ], - "X-Forwarded-Proto": [ - "https" - ] - }, - "requestContext": { - "accountId": "123456789012", - "resourceId": "123456", - "stage": "prod", - "requestId": "c6af9ac6-7b61-11e6-9a41-93e8deadbeef", - "requestTime": "09/Apr/2015:12:34:56 +0000", - "requestTimeEpoch": 1428582896000, - "identity": { - "cognitoIdentityPoolId": null, - "accountId": null, - "cognitoIdentityId": null, - "caller": null, - "accessKey": null, - "sourceIp": "127.0.0.1", - "cognitoAuthenticationType": null, - "cognitoAuthenticationProvider": null, - "userArn": null, - "userAgent": "Custom User Agent String", - "user": null - }, - "path": "/prod/path/to/resource", - "resourcePath": "/{proxy+}", - "httpMethod": "POST", - "apiId": "1234567890", - "protocol": "HTTP/1.1" - } -} \ No newline at end of file diff --git a/packages/commons/src/samples/resources/events/aws/appsync-resolver.json b/packages/commons/src/samples/resources/events/aws/appsync-resolver.json deleted file mode 100644 index 94960dd1ed..0000000000 --- a/packages/commons/src/samples/resources/events/aws/appsync-resolver.json +++ /dev/null @@ -1,74 +0,0 @@ -{ - "arguments": { - "id": "my identifier" - }, - "identity": { - "claims": { - "sub": "192879fc-a240-4bf1-ab5a-d6a00f3063f9", - "email_verified": true, - "iss": "https://cognito-idp.us-west-2.amazonaws.com/us-west-xxxxxxxxxxx", - "phone_number_verified": false, - "cognito:username": "jdoe", - "aud": "7471s60os7h0uu77i1tk27sp9n", - "event_id": "bc334ed8-a938-4474-b644-9547e304e606", - "token_use": "id", - "auth_time": 1599154213, - "phone_number": "+19999999999", - "exp": 1599157813, - "iat": 1599154213, - "email": "jdoe@email.com" - }, - "defaultAuthStrategy": "ALLOW", - "groups": null, - "issuer": "https://cognito-idp.us-west-2.amazonaws.com/us-west-xxxxxxxxxxx", - "sourceIp": [ - "1.1.1.1" - ], - "sub": "192879fc-a240-4bf1-ab5a-d6a00f3063f9", - "username": "jdoe" - }, - "source": null, - "request": { - "headers": { - "x-forwarded-for": "1.1.1.1, 2.2.2.2", - "cloudfront-viewer-country": "US", - "cloudfront-is-tablet-viewer": "false", - "via": "2.0 xxxxxxxxxxxxxxxx.cloudfront.net (CloudFront)", - "cloudfront-forwarded-proto": "https", - "origin": "https://us-west-1.console.aws.amazon.com", - "content-length": "217", - "accept-language": "en-US,en;q=0.9", - "host": "xxxxxxxxxxxxxxxx.appsync-api.us-west-1.amazonaws.com", - "x-forwarded-proto": "https", - "user-agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/85.0.4183.83 Safari/537.36", - "accept": "*/*", - "cloudfront-is-mobile-viewer": "false", - "cloudfront-is-smarttv-viewer": "false", - "accept-encoding": "gzip, deflate, br", - "referer": "https://us-west-1.console.aws.amazon.com/appsync/home?region=us-west-1", - "content-type": "application/json", - "sec-fetch-mode": "cors", - "x-amz-cf-id": "3aykhqlUwQeANU-HGY7E_guV5EkNeMMtwyOgiA==", - "x-amzn-trace-id": "Root=1-5f512f51-fac632066c5e848ae714", - "authorization": "eyJraWQiOiJScWFCSlJqYVJlM0hrSnBTUFpIcVRXazNOW...", - "sec-fetch-dest": "empty", - "x-amz-user-agent": "AWS-Console-AppSync/", - "cloudfront-is-desktop-viewer": "true", - "sec-fetch-site": "cross-site", - "x-forwarded-port": "443" - } - }, - "prev": null, - "info": { - "selectionSetList": [ - "id", - "field1", - "field2" - ], - "selectionSetGraphQL": "{\n id\n field1\n field2\n}", - "parentTypeName": "Mutation", - "fieldName": "createSomething", - "variables": {} - }, - "stash": {} -} \ No newline at end of file diff --git a/packages/commons/src/samples/resources/events/aws/batch-get-job.json b/packages/commons/src/samples/resources/events/aws/batch-get-job.json deleted file mode 100644 index cf95238fc4..0000000000 --- a/packages/commons/src/samples/resources/events/aws/batch-get-job.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "jobName": "hello_world", - "jobQueue": "default", - "jobDefinition": "hello_world" -} \ No newline at end of file diff --git a/packages/commons/src/samples/resources/events/aws/batch-submit-job.json b/packages/commons/src/samples/resources/events/aws/batch-submit-job.json deleted file mode 100644 index cf95238fc4..0000000000 --- a/packages/commons/src/samples/resources/events/aws/batch-submit-job.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "jobName": "hello_world", - "jobQueue": "default", - "jobDefinition": "hello_world" -} \ No newline at end of file diff --git a/packages/commons/src/samples/resources/events/aws/cloudformation-create-request.json b/packages/commons/src/samples/resources/events/aws/cloudformation-create-request.json deleted file mode 100644 index 461752bb16..0000000000 --- a/packages/commons/src/samples/resources/events/aws/cloudformation-create-request.json +++ /dev/null @@ -1,16 +0,0 @@ -{ - "RequestType": "Create", - "ResponseURL": "http://pre-signed-S3-url-for-response", - "StackId": "arn:aws:cloudformation:eu-central-1:123456789012:stack/MyStack/guid", - "RequestId": "unique id for this create request", - "ResourceType": "Custom::TestResource", - "LogicalResourceId": "MyTestResource", - "ResourceProperties": { - "StackName": "MyStack", - "List": [ - "1", - "2", - "3" - ] - } -} \ No newline at end of file diff --git a/packages/commons/src/samples/resources/events/aws/cloudfront-ab-test.json b/packages/commons/src/samples/resources/events/aws/cloudfront-ab-test.json deleted file mode 100644 index bdc6b76e2d..0000000000 --- a/packages/commons/src/samples/resources/events/aws/cloudfront-ab-test.json +++ /dev/null @@ -1,36 +0,0 @@ -{ - "Records": [ - { - "cf": { - "config": { - "distributionId": "EXAMPLE" - }, - "request": { - "uri": "/test", - "method": "GET", - "clientIp": "2001:cdba::3257:9652", - "headers": { - "user-agent": [ - { - "key": "User-Agent", - "value": "Test Agent" - } - ], - "host": [ - { - "key": "Host", - "value": "d123.cf.net" - } - ], - "cookie": [ - { - "key": "Cookie", - "value": "SomeCookie=1; AnotherOne=A; X-Experiment-Name=B" - } - ] - } - } - } - } - ] -} \ No newline at end of file diff --git a/packages/commons/src/samples/resources/events/aws/cloudfront-access-request-in-response.json b/packages/commons/src/samples/resources/events/aws/cloudfront-access-request-in-response.json deleted file mode 100644 index ecb1240549..0000000000 --- a/packages/commons/src/samples/resources/events/aws/cloudfront-access-request-in-response.json +++ /dev/null @@ -1,42 +0,0 @@ -{ - "Records": [ - { - "cf": { - "config": { - "distributionId": "EXAMPLE" - }, - "request": { - "headers": { - "host": [ - { - "key": "Host", - "value": "d123.cf.net" - } - ], - "user-name": [ - { - "key": "User-Name", - "value": "CloudFront" - } - ] - }, - "clientIp": "2001:cdba::3257:9652", - "uri": "/test", - "method": "GET" - }, - "response": { - "status": "200", - "statusDescription": "OK", - "headers": { - "x-cache": [ - { - "key": "X-Cache", - "value": "Hello from Cloudfront" - } - ] - } - } - } - } - ] -} \ No newline at end of file diff --git a/packages/commons/src/samples/resources/events/aws/cloudfront-http-direct.json b/packages/commons/src/samples/resources/events/aws/cloudfront-http-direct.json deleted file mode 100644 index 1f13e53dd1..0000000000 --- a/packages/commons/src/samples/resources/events/aws/cloudfront-http-direct.json +++ /dev/null @@ -1,30 +0,0 @@ -{ - "Records": [ - { - "cf": { - "config": { - "distributionId": "EXAMPLE" - }, - "request": { - "uri": "/test", - "method": "GET", - "clientIp": "2001:cdba::3257:9652", - "headers": { - "user-agent": [ - { - "key": "User-Agent", - "value": "test-agent" - } - ], - "host": [ - { - "key": "Host", - "value": "d123.cf.net" - } - ] - } - } - } - } - ] -} \ No newline at end of file diff --git a/packages/commons/src/samples/resources/events/aws/cloudfront-modify-querystring.json b/packages/commons/src/samples/resources/events/aws/cloudfront-modify-querystring.json deleted file mode 100644 index 7485310e94..0000000000 --- a/packages/commons/src/samples/resources/events/aws/cloudfront-modify-querystring.json +++ /dev/null @@ -1,37 +0,0 @@ -{ - "Records": [ - { - "cf": { - "config": { - "distributionId": "EXAMPLE" - }, - "request": { - "uri": "/test", - "querystring": "auth=test&foo=bar", - "method": "GET", - "clientIp": "2001:cdba::3257:9652", - "headers": { - "host": [ - { - "key": "Host", - "value": "d123.cf.net" - } - ], - "user-agent": [ - { - "key": "User-Agent", - "value": "Test Agent" - } - ], - "user-name": [ - { - "key": "User-Name", - "value": "aws-cloudfront" - } - ] - } - } - } - } - ] -} \ No newline at end of file diff --git a/packages/commons/src/samples/resources/events/aws/cloudfront-modify-response-header.json b/packages/commons/src/samples/resources/events/aws/cloudfront-modify-response-header.json deleted file mode 100644 index 8ac2b4bc0f..0000000000 --- a/packages/commons/src/samples/resources/events/aws/cloudfront-modify-response-header.json +++ /dev/null @@ -1,35 +0,0 @@ -{ - "Records": [ - { - "cf": { - "config": { - "distributionId": "EXAMPLE" - }, - "response": { - "status": "200", - "statusDescription": "OK", - "headers": { - "vary": [ - { - "key": "Vary", - "value": "*" - } - ], - "last-modified": [ - { - "key": "Last-Modified", - "value": "2016-11-25" - } - ], - "x-amz-meta-last-modified": [ - { - "key": "X-Amz-Meta-Last-Modified", - "value": "2016-01-01" - } - ] - } - } - } - } - ] -} \ No newline at end of file diff --git a/packages/commons/src/samples/resources/events/aws/cloudfront-multiple-remote-calls-aggregate-response.json b/packages/commons/src/samples/resources/events/aws/cloudfront-multiple-remote-calls-aggregate-response.json deleted file mode 100644 index 1360629d73..0000000000 --- a/packages/commons/src/samples/resources/events/aws/cloudfront-multiple-remote-calls-aggregate-response.json +++ /dev/null @@ -1,30 +0,0 @@ -{ - "Records": [ - { - "cf": { - "config": { - "distributionId": "EXAMPLE" - }, - "request": { - "uri": "/forecast/Seattle:NewYork:Chicago:SanFrancisco", - "method": "GET", - "clientIp": "2001:cdba::3257:9652", - "headers": { - "host": [ - { - "key": "Host", - "value": "d123.cf.net" - } - ], - "user-agent": [ - { - "key": "User-Agent", - "value": "Test Agent" - } - ] - } - } - } - } - ] -} \ No newline at end of file diff --git a/packages/commons/src/samples/resources/events/aws/cloudfront-normalize-querystring-to-improve-cache-hit.json b/packages/commons/src/samples/resources/events/aws/cloudfront-normalize-querystring-to-improve-cache-hit.json deleted file mode 100644 index 21100c997a..0000000000 --- a/packages/commons/src/samples/resources/events/aws/cloudfront-normalize-querystring-to-improve-cache-hit.json +++ /dev/null @@ -1,37 +0,0 @@ -{ - "Records": [ - { - "cf": { - "config": { - "distributionId": "EXAMPLE" - }, - "request": { - "uri": "/test", - "querystring": "size=LARGE&color=RED", - "method": "GET", - "clientIp": "2001:cdba::3257:9652", - "headers": { - "host": [ - { - "key": "Host", - "value": "d123.cf.net" - } - ], - "user-agent": [ - { - "key": "User-Agent", - "value": "Test Agent" - } - ], - "user-name": [ - { - "key": "User-Name", - "value": "aws-cloudfront" - } - ] - } - } - } - } - ] -} \ No newline at end of file diff --git a/packages/commons/src/samples/resources/events/aws/cloudfront-redirect-on-viewer-country.json b/packages/commons/src/samples/resources/events/aws/cloudfront-redirect-on-viewer-country.json deleted file mode 100644 index 2d24b0cb43..0000000000 --- a/packages/commons/src/samples/resources/events/aws/cloudfront-redirect-on-viewer-country.json +++ /dev/null @@ -1,30 +0,0 @@ -{ - "Records": [ - { - "cf": { - "config": { - "distributionId": "EXAMPLE" - }, - "request": { - "uri": "/test", - "method": "GET", - "clientIp": "2001:cdba::3257:9652", - "headers": { - "host": [ - { - "key": "Host", - "value": "d123.cf.net" - } - ], - "cloudfront-viewer-country": [ - { - "key": "CloudFront-Viewer-Country", - "value": "TW" - } - ] - } - } - } - } - ] -} \ No newline at end of file diff --git a/packages/commons/src/samples/resources/events/aws/cloudfront-redirect-unauthenticated-users.json b/packages/commons/src/samples/resources/events/aws/cloudfront-redirect-unauthenticated-users.json deleted file mode 100644 index 4d064cfd0c..0000000000 --- a/packages/commons/src/samples/resources/events/aws/cloudfront-redirect-unauthenticated-users.json +++ /dev/null @@ -1,24 +0,0 @@ -{ - "Records": [ - { - "cf": { - "config": { - "distributionId": "EXAMPLE" - }, - "request": { - "uri": "/test", - "method": "GET", - "querystring": "foo=bar", - "headers": { - "host": [ - { - "key": "Host", - "value": "d123.cf.net" - } - ] - } - } - } - } - ] -} \ No newline at end of file diff --git a/packages/commons/src/samples/resources/events/aws/cloudfront-response-generation.json b/packages/commons/src/samples/resources/events/aws/cloudfront-response-generation.json deleted file mode 100644 index 2bfde0f0d6..0000000000 --- a/packages/commons/src/samples/resources/events/aws/cloudfront-response-generation.json +++ /dev/null @@ -1,24 +0,0 @@ -{ - "Records": [ - { - "cf": { - "config": { - "distributionId": "EXAMPLE" - }, - "request": { - "uri": "/test", - "method": "GET", - "clientIp": "2001:cdba::3257:9652", - "headers": { - "host": [ - { - "key": "Host", - "value": "d123.cf.net" - } - ] - } - } - } - } - ] -} \ No newline at end of file diff --git a/packages/commons/src/samples/resources/events/aws/cloudfront-serve-object-on-viewer-device.json b/packages/commons/src/samples/resources/events/aws/cloudfront-serve-object-on-viewer-device.json deleted file mode 100644 index f1f50a8980..0000000000 --- a/packages/commons/src/samples/resources/events/aws/cloudfront-serve-object-on-viewer-device.json +++ /dev/null @@ -1,48 +0,0 @@ -{ - "Records": [ - { - "cf": { - "config": { - "distributionId": "EXAMPLE" - }, - "request": { - "uri": "/test", - "method": "GET", - "clientIp": "2001:cdba::3257:9652", - "headers": { - "host": [ - { - "key": "Host", - "value": "d123.cf.net" - } - ], - "cloudfront-is-desktop-viewer": [ - { - "key": "CloudFront-Is-Desktop-Viewer", - "value": "true" - } - ], - "cloudfront-is-mobile-viewer": [ - { - "key": "CloudFront-Is-Mobile-Viewer", - "value": "false" - } - ], - "cloudfront-is-smarttv-viewer": [ - { - "key": "CloudFront-Is-SmartTV-Viewer", - "value": "false" - } - ], - "cloudfront-is-tablet-viewer": [ - { - "key": "CloudFront-Is-Tablet-Viewer", - "value": "false" - } - ] - } - } - } - } - ] -} \ No newline at end of file diff --git a/packages/commons/src/samples/resources/events/aws/cloudfront-simple-remote-call.json b/packages/commons/src/samples/resources/events/aws/cloudfront-simple-remote-call.json deleted file mode 100644 index bf4625d06d..0000000000 --- a/packages/commons/src/samples/resources/events/aws/cloudfront-simple-remote-call.json +++ /dev/null @@ -1,36 +0,0 @@ -{ - "Records": [ - { - "cf": { - "config": { - "distributionId": "EXAMPLE" - }, - "request": { - "uri": "/test", - "method": "GET", - "clientIp": "2001:cdba::3257:9652", - "headers": { - "host": [ - { - "key": "Host", - "value": "d123.cf.net" - } - ], - "user-agent": [ - { - "key": "User-Agent", - "value": "Test Agent" - } - ], - "user-name": [ - { - "key": "User-Name", - "value": "aws-cloudfront" - } - ] - } - } - } - } - ] -} \ No newline at end of file diff --git a/packages/commons/src/samples/resources/events/aws/cloudwatch-logs.json b/packages/commons/src/samples/resources/events/aws/cloudwatch-logs.json deleted file mode 100644 index 2b455b9bc4..0000000000 --- a/packages/commons/src/samples/resources/events/aws/cloudwatch-logs.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "awslogs": { - "data": "H4sIAAAAAAAAAHWPwQqCQBCGX0Xm7EFtK+smZBEUgXoLCdMhFtKV3akI8d0bLYmibvPPN3wz00CJxmQnTO41whwWQRIctmEcB6sQbFC3CjW3XW8kxpOpP+OC22d1Wml1qZkQGtoMsScxaczKN3plG8zlaHIta5KqWsozoTYw3/djzwhpLwivWFGHGpAFe7DL68JlBUk+l7KSN7tCOEJ4M3/qOI49vMHj+zCKdlFqLaU2ZHV2a4Ct/an0/ivdX8oYc1UVX860fQDQiMdxRQEAAA==" - } -} \ No newline at end of file diff --git a/packages/commons/src/samples/resources/events/aws/cloudwatch-scheduled-event.json b/packages/commons/src/samples/resources/events/aws/cloudwatch-scheduled-event.json deleted file mode 100644 index dfa0a04b5a..0000000000 --- a/packages/commons/src/samples/resources/events/aws/cloudwatch-scheduled-event.json +++ /dev/null @@ -1,12 +0,0 @@ -{ - "id": "cdc73f9d-aea9-11e3-9d5a-835b769c0d9c", - "detail-type": "Scheduled Event", - "source": "aws.events", - "account": "123456789012", - "time": "1970-01-01T00:00:00Z", - "region": "eu-central-1", - "resources": [ - "arn:aws:events:eu-central-1:123456789012:rule/ExampleRule" - ], - "detail": {} -} \ No newline at end of file diff --git a/packages/commons/src/samples/resources/events/aws/codecommit-repository.json b/packages/commons/src/samples/resources/events/aws/codecommit-repository.json deleted file mode 100644 index 227cac73bf..0000000000 --- a/packages/commons/src/samples/resources/events/aws/codecommit-repository.json +++ /dev/null @@ -1,27 +0,0 @@ -{ - "Records": [ - { - "awsRegion": "eu-central-1", - "codecommit": { - "references": [ - { - "commit": "5c4ef1049f1d27deadbeeff313e0730018be182b", - "ref": "refs/heads/master" - } - ] - }, - "customData": "this is custom data", - "eventId": "5a824061-17ca-46a9-bbf9-114edeadbeef", - "eventName": "TriggerEventTest", - "eventPartNumber": 1, - "eventSource": "aws:codecommit", - "eventSourceARN": "arn:aws:codecommit:eu-central-1:123456789012:my-repo", - "eventTime": "2016-01-01T23:59:59.000+0000", - "eventTotalParts": 1, - "eventTriggerConfigId": "5a824061-17ca-46a9-bbf9-114edeadbeef", - "eventTriggerName": "my-trigger", - "eventVersion": "1.0", - "userIdentityARN": "arn:aws:iam::123456789012:root" - } - ] -} \ No newline at end of file diff --git a/packages/commons/src/samples/resources/events/aws/codepipeline-job.json b/packages/commons/src/samples/resources/events/aws/codepipeline-job.json deleted file mode 100644 index 1ebc6ccb9e..0000000000 --- a/packages/commons/src/samples/resources/events/aws/codepipeline-job.json +++ /dev/null @@ -1,45 +0,0 @@ -{ - "CodePipeline.job": { - "data": { - "artifactCredentials": { - "secretAccessKey": "wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY", - "sessionToken": "token", - "accessKeyId": "AKIAIOSFODNN7EXAMPLE" - }, - "actionConfiguration": { - "configuration": { - "FunctionName": "my-function", - "UserParameters": "user-parameter-string" - } - }, - "inputArtifacts": [ - { - "revision": "ca2bdeadbeef7d1932acb4977e08c803295d9896", - "name": "input-artifact", - "location": { - "type": "S3", - "s3Location": { - "objectKey": "test/key", - "bucketName": "example-bucket" - } - } - } - ], - "outputArtifacts": [ - { - "revision": null, - "name": "output-artifact", - "location": { - "type": "S3", - "s3Location": { - "objectKey": "test/key2", - "bucketName": "example-bucket2" - } - } - } - ] - }, - "id": "c968ef10-6415-4127-80b1-42502218a8c7", - "accountId": "123456789012" - } -} \ No newline at end of file diff --git a/packages/commons/src/samples/resources/events/aws/cognito-sync-trigger.json b/packages/commons/src/samples/resources/events/aws/cognito-sync-trigger.json deleted file mode 100644 index e9c7a0ddd0..0000000000 --- a/packages/commons/src/samples/resources/events/aws/cognito-sync-trigger.json +++ /dev/null @@ -1,20 +0,0 @@ -{ - "version": 2, - "eventType": "SyncTrigger", - "region": "eu-central-1", - "identityPoolId": "identityPoolId", - "identityId": "identityId", - "datasetName": "datasetName", - "datasetRecords": { - "SampleKey1": { - "oldValue": "oldValue1", - "newValue": "newValue1", - "op": "replace" - }, - "SampleKey2": { - "oldValue": "oldValue2", - "newValue": "newValue2", - "op": "replace" - } - } -} \ No newline at end of file diff --git a/packages/commons/src/samples/resources/events/aws/config-oversized-item-change-notification.json b/packages/commons/src/samples/resources/events/aws/config-oversized-item-change-notification.json deleted file mode 100644 index fb20d98bb7..0000000000 --- a/packages/commons/src/samples/resources/events/aws/config-oversized-item-change-notification.json +++ /dev/null @@ -1,12 +0,0 @@ -{ - "invokingEvent": "{\"configurationItemSummary\": {\"changeType\": \"UPDATE\",\"configurationItemVersion\": \"1.2\",\"configurationItemCaptureTime\":\"2016-10-06T16:46:16.261Z\",\"configurationStateId\": 0,\"awsAccountId\":\"123456789012\",\"configurationItemStatus\": \"OK\",\"resourceType\": \"AWS::EC2::Instance\",\"resourceId\":\"i-00000000\",\"resourceName\":null,\"ARN\":\"arn:aws:ec2:eu-central-1:123456789012:instance/i-00000000\",\"awsRegion\": \"eu-central-1\",\"availabilityZone\":\"eu-central-1\",\"configurationStateMd5Hash\":\"8f1ee69b287895a0f8bc5753eca68e96\",\"resourceCreationTime\":\"2016-10-06T16:46:10.489Z\"},\"messageType\":\"OversizedConfigurationItemChangeNotification\"}", - "ruleParameters": "{\"\":\"\"}", - "resultToken": "myResultToken", - "eventLeftScope": false, - "executionRoleArn": "arn:aws:iam::123456789012:role/config-role", - "configRuleArn": "arn:aws:config:eu-central-1:123456789012:config-rule/config-rule-0123456", - "configRuleName": "change-triggered-config-rule", - "configRuleId": "config-rule-0123456", - "accountId": "123456789012", - "version": "1.0" -} \ No newline at end of file diff --git a/packages/commons/src/samples/resources/events/aws/config-periodic-rule.json b/packages/commons/src/samples/resources/events/aws/config-periodic-rule.json deleted file mode 100644 index 03322a8b12..0000000000 --- a/packages/commons/src/samples/resources/events/aws/config-periodic-rule.json +++ /dev/null @@ -1,12 +0,0 @@ -{ - "invokingEvent": "{\"awsAccountId\":\"123456789012\",\"notificationCreationTime\":\"1970-01-01T00:00:00.0Z\",\"messageType\":\"ScheduledNotification\",\"recordVersion\":\"1.0\"}", - "ruleParameters": "{\"myParameterKey\":\"myParameterValue\"}", - "resultToken": "myResultToken", - "eventLeftScope": false, - "executionRoleArn": "arn:aws:iam::123456789012:role/config-role", - "configRuleArn": "arn:aws:config:eu-central-1:123456789012:config-rule/config-rule-0123456", - "configRuleName": "periodic-config-rule", - "configRuleId": "config-rule-0123456", - "accountId": "123456789012", - "version": "1.0" -} \ No newline at end of file diff --git a/packages/commons/src/samples/resources/events/aws/confit-item-change-notification.json b/packages/commons/src/samples/resources/events/aws/confit-item-change-notification.json deleted file mode 100644 index cf79568736..0000000000 --- a/packages/commons/src/samples/resources/events/aws/confit-item-change-notification.json +++ /dev/null @@ -1,12 +0,0 @@ -{ - "invokingEvent": "{\"configurationItem\":{\"configurationItemCaptureTime\":\"2016-10-06T16:46:16.261Z\",\"awsAccountId\":\"123456789012\",\"configurationItemStatus\":\"OK\",\"resourceId\":\"i-00000000\",\"resourceName\":\"foo\",\"configurationStateMd5Hash\":\"8f1ee69b297895a0f8bc5753eca68e96\",\"resourceCreationTime\":\"2016-10-06T16:46:10.489Z\",\"configurationStateId\":0,\"configurationItemVersion\":\"1.2\",\"ARN\":\"arn:aws:ec2:eu-central-1:123456789012:instance/i-00000000\",\"awsRegion\":\"eu-central-1\",\"availabilityZone\":\"eu-central-1\",\"resourceType\":\"AWS::EC2::Instance\",\"tags\":{\"\":\"\"},\"relationships\":[{\"resourceId\":\"eipalloc-00000000\",\"resourceType\":\"AWS::EC2::EIP\",\"name\":\"Is attached to ElasticIp\"}],\"configuration\":{\"\":\"\"}},\"messageType\":\"ConfigurationItemChangeNotification\"}", - "ruleParameters": "{\"\":\"\"}", - "resultToken": "myResultToken", - "eventLeftScope": false, - "executionRoleArn": "arn:aws:iam::123456789012:role/config-role", - "configRuleArn": "arn:aws:config:eu-central-1:123456789012:config-rule/config-rule-0123456", - "configRuleName": "change-triggered-config-rule", - "configRuleId": "config-rule-0123456", - "accountId": "123456789012", - "version": "1.0" -} \ No newline at end of file diff --git a/packages/commons/src/samples/resources/events/aws/connect-contact-flow-event.json b/packages/commons/src/samples/resources/events/aws/connect-contact-flow-event.json deleted file mode 100644 index b192be3150..0000000000 --- a/packages/commons/src/samples/resources/events/aws/connect-contact-flow-event.json +++ /dev/null @@ -1,33 +0,0 @@ -{ - "Name": "ContactFlowEvent", - "Details": { - "ContactData": { - "Attributes": {}, - "Channel": "VOICE", - "ContactId": "5ca32fbd-8f92-46af-92a5-6b0f970f0efe", - "CustomerEndpoint": { - "Address": "+11234567890", - "Type": "TELEPHONE_NUMBER" - }, - "InitialContactId": "5ca32fbd-8f92-46af-92a5-6b0f970f0efe", - "InitiationMethod": "API", - "InstanceARN": "arn:aws:connect:eu-central-1:123456789012:instance/9308c2a1-9bc6-4cea-8290-6c0b4a6d38fa", - "MediaStreams": { - "Customer": { - "Audio": { - "StartFragmentNumber": "91343852333181432392682062622220590765191907586", - "StartTimestamp": "1565781909613", - "StreamARN": "arn:aws:kinesisvideo:eu-central-1:123456789012:stream/connect-contact-a3d73b84-ce0e-479a-a9dc-5637c9d30ac9/1565272947806" - } - } - }, - "PreviousContactId": "5ca32fbd-8f92-46af-92a5-6b0f970f0efe", - "Queue": null, - "SystemEndpoint": { - "Address": "+11234567890", - "Type": "TELEPHONE_NUMBER" - } - }, - "Parameters": {} - } -} \ No newline at end of file diff --git a/packages/commons/src/samples/resources/events/aws/dynamodb-update-2.json b/packages/commons/src/samples/resources/events/aws/dynamodb-update-2.json deleted file mode 100644 index c7f8ca2795..0000000000 --- a/packages/commons/src/samples/resources/events/aws/dynamodb-update-2.json +++ /dev/null @@ -1,90 +0,0 @@ -{ - "Records": [ - { - "eventID": "1", - "eventVersion": "1.0", - "dynamodb": { - "Keys": { - "Id": { - "N": "101" - } - }, - "NewImage": { - "Message": { - "S": "New item!" - }, - "Id": { - "N": "101" - } - }, - "StreamViewType": "NEW_AND_OLD_IMAGES", - "SequenceNumber": "111", - "SizeBytes": 26 - }, - "awsRegion": "eu-central-1", - "eventName": "INSERT", - "eventSourceARN": "arn:aws:dynamodb:eu-central-1:account-id:table/ExampleTableWithStream/stream/2015-06-27T00:48:05.899", - "eventSource": "aws:dynamodb" - }, - { - "eventID": "2", - "eventVersion": "1.0", - "dynamodb": { - "OldImage": { - "Message": { - "S": "New item!" - }, - "Id": { - "N": "101" - } - }, - "SequenceNumber": "222", - "Keys": { - "Id": { - "N": "101" - } - }, - "SizeBytes": 59, - "NewImage": { - "Message": { - "S": "This item has changed" - }, - "Id": { - "N": "101" - } - }, - "StreamViewType": "NEW_AND_OLD_IMAGES" - }, - "awsRegion": "eu-central-1", - "eventName": "MODIFY", - "eventSourceARN": "arn:aws:dynamodb:eu-central-1:account-id:table/ExampleTableWithStream/stream/2015-06-27T00:48:05.899", - "eventSource": "aws:dynamodb" - }, - { - "eventID": "3", - "eventVersion": "1.0", - "dynamodb": { - "Keys": { - "Id": { - "N": "101" - } - }, - "SizeBytes": 38, - "SequenceNumber": "333", - "OldImage": { - "Message": { - "S": "This item has changed" - }, - "Id": { - "N": "101" - } - }, - "StreamViewType": "NEW_AND_OLD_IMAGES" - }, - "awsRegion": "eu-central-1", - "eventName": "REMOVE", - "eventSourceARN": "arn:aws:dynamodb:eu-central-1:account-id:table/ExampleTableWithStream/stream/2015-06-27T00:48:05.899", - "eventSource": "aws:dynamodb" - } - ] -} \ No newline at end of file diff --git a/packages/commons/src/samples/resources/events/aws/dynamodb-update.json b/packages/commons/src/samples/resources/events/aws/dynamodb-update.json deleted file mode 100644 index f59d46c645..0000000000 --- a/packages/commons/src/samples/resources/events/aws/dynamodb-update.json +++ /dev/null @@ -1,93 +0,0 @@ -{ - "Records": [ - { - "eventID": "c4ca4238a0b923820dcc509a6f75849b", - "eventName": "INSERT", - "eventVersion": "1.1", - "eventSource": "aws:dynamodb", - "awsRegion": "eu-central-1", - "dynamodb": { - "Keys": { - "Id": { - "N": "101" - } - }, - "NewImage": { - "Message": { - "S": "New item!" - }, - "Id": { - "N": "101" - } - }, - "ApproximateCreationDateTime": 1428537600, - "SequenceNumber": "4421584500000000017450439091", - "SizeBytes": 26, - "StreamViewType": "NEW_AND_OLD_IMAGES" - }, - "eventSourceARN": "arn:aws:dynamodb:eu-central-1:123456789012:table/ExampleTableWithStream/stream/2015-06-27T00:48:05.899" - }, - { - "eventID": "c81e728d9d4c2f636f067f89cc14862c", - "eventName": "MODIFY", - "eventVersion": "1.1", - "eventSource": "aws:dynamodb", - "awsRegion": "eu-central-1", - "dynamodb": { - "Keys": { - "Id": { - "N": "101" - } - }, - "NewImage": { - "Message": { - "S": "This item has changed" - }, - "Id": { - "N": "101" - } - }, - "OldImage": { - "Message": { - "S": "New item!" - }, - "Id": { - "N": "101" - } - }, - "ApproximateCreationDateTime": 1428537600, - "SequenceNumber": "4421584500000000017450439092", - "SizeBytes": 59, - "StreamViewType": "NEW_AND_OLD_IMAGES" - }, - "eventSourceARN": "arn:aws:dynamodb:eu-central-1:123456789012:table/ExampleTableWithStream/stream/2015-06-27T00:48:05.899" - }, - { - "eventID": "eccbc87e4b5ce2fe28308fd9f2a7baf3", - "eventName": "REMOVE", - "eventVersion": "1.1", - "eventSource": "aws:dynamodb", - "awsRegion": "eu-central-1", - "dynamodb": { - "Keys": { - "Id": { - "N": "101" - } - }, - "OldImage": { - "Message": { - "S": "This item has changed" - }, - "Id": { - "N": "101" - } - }, - "ApproximateCreationDateTime": 1428537600, - "SequenceNumber": "4421584500000000017450439093", - "SizeBytes": 38, - "StreamViewType": "NEW_AND_OLD_IMAGES" - }, - "eventSourceARN": "arn:aws:dynamodb:eu-central-1:123456789012:table/ExampleTableWithStream/stream/2015-06-27T00:48:05.899" - } - ] -} \ No newline at end of file diff --git a/packages/commons/src/samples/resources/events/aws/kinesis-analytics-compressed.json b/packages/commons/src/samples/resources/events/aws/kinesis-analytics-compressed.json deleted file mode 100644 index b6c3a539d5..0000000000 --- a/packages/commons/src/samples/resources/events/aws/kinesis-analytics-compressed.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "invocationId": "invocationIdExample", - "applicationArn": "arn:aws:kinesisanalytics:eu-central-1:123456789012:application/example-application", - "streamArn": "arn:aws:kinesis:eu-central-1:123456789012:stream/example-stream", - "records": [ - { - "recordId": "49571347871967966406409637155186850213682522142927749122", - "data": "H4sIAAAAAAAA/6vmUspLzE1VslLKTsxNzFHS4VJKTEkpSi0uBgol5SRmKHHVAgDd1tysJAAAAA==" - } - ] -} \ No newline at end of file diff --git a/packages/commons/src/samples/resources/events/aws/kinesis-analytics-dynamodb.json b/packages/commons/src/samples/resources/events/aws/kinesis-analytics-dynamodb.json deleted file mode 100644 index 8d45307cac..0000000000 --- a/packages/commons/src/samples/resources/events/aws/kinesis-analytics-dynamodb.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "invocationId": "invocationIdExample", - "applicationArn": "arn:aws:kinesisanalytics:eu-central-1:123456789012:application/example-application", - "streamArn": "arn:aws:kinesis:eu-central-1:123456789012:stream/example-stream", - "records": [ - { - "recordId": "49571347871967966406409637155186850213682522142927749122", - "data": "eyJST1dUSU1FX1RJTUVTVEFNUCI6IjIwMTctMTItMTUgMDE6MDk6NTAuMDAwIiwiVkVISUNMRUlEIjoiNSIsIlZFSElDTEVDT1VOVCI6MTh9" - } - ] -} \ No newline at end of file diff --git a/packages/commons/src/samples/resources/events/aws/kinesis-analytics-kpl.json b/packages/commons/src/samples/resources/events/aws/kinesis-analytics-kpl.json deleted file mode 100644 index 807467ead1..0000000000 --- a/packages/commons/src/samples/resources/events/aws/kinesis-analytics-kpl.json +++ /dev/null @@ -1,27 +0,0 @@ -{ - "invocationId": "invocationIdExample", - "applicationArn": "arn:aws:kinesisanalytics:eu-central-1:123456789012:application/example-application", - "streamArn": "arn:aws:kinesis:eu-central-1:123456789012:stream/example-stream", - "records": [ - { - "recordId": "49571347871967966406409637155186850213682522142927749122", - "kinesisStreamRecordMetadata": { - "shardId": "shardId-000000000001", - "partitionKey": "partitionKey-01", - "approximateArrivalTimestamp": 1505169657117, - "sequenceNumber": "49571347871967966406409637155186850213682522142927749122" - }, - "data": "84mawgoNMTUwNTE2OTY0NTI1MBIlODYwOTcwOTY1NTE0NjQwMzU1MjIwNTI5MjgyNDk2MzU3MTUzNxImNzk1MTM3MTQxMzM4MTE5NTU1OTExMzA1ODMxNDEyOTg2NTM2OTgaiAEIABAAGoEBNDAsYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWEKGogBCAAQARqBATQxLGFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhCkU/elbPye5g1wGkAmxGCNg=" - }, - { - "recordId": "49571347871967966406409637141563465152445265354688561154", - "kinesisStreamRecordMetadata": { - "shardId": "shardId-000000000002", - "partitionKey": "partitionKey-02", - "approximateArrivalTimestamp": 1505169647777, - "sequenceNumber": "49571347871967966406409637141563465152445265354688561154" - }, - "data": "NCxhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWEK" - } - ] -} \ No newline at end of file diff --git a/packages/commons/src/samples/resources/events/aws/kinesis-analytics.json b/packages/commons/src/samples/resources/events/aws/kinesis-analytics.json deleted file mode 100644 index 7f1db565b1..0000000000 --- a/packages/commons/src/samples/resources/events/aws/kinesis-analytics.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "invocationId": "invocationIdExample", - "applicationArn": "arn:aws:kinesisanalytics:eu-central-1:123456789012:application/example-application", - "streamArn": "arn:aws:kinesis:eu-central-1:123456789012:stream/example-stream", - "records": [ - { - "recordId": "49571347871967966406409637155186850213682522142927749122", - "data": "VGhpcyBpcyBhIHRlc3QgZnJvbSBLaW5lc2lzIEFuYWx5dGljcw==" - } - ] -} \ No newline at end of file diff --git a/packages/commons/src/samples/resources/events/aws/kinesis-apachelog.json b/packages/commons/src/samples/resources/events/aws/kinesis-apachelog.json deleted file mode 100644 index 3f917a1613..0000000000 --- a/packages/commons/src/samples/resources/events/aws/kinesis-apachelog.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "invocationId": "invocationIdExample", - "region": "eu-central-1", - "records": [ - { - "recordId": "49546986683135544286507457936321625675700192471156785154", - "approximateArrivalTimestamp": 1495072949453, - "data": "NjQuMjQyLjg4LjEwIC0gLSBbMDcvTWFyLzIwMDQ6MTY6MTA6MDIgLTA4MDBdICJHRVQgL21haWxtYW4vbGlzdGluZm8vaHNkaXZpc2lvbiBIVFRQLzEuMSIgMjAwIDYyOTE==" - } - ] -} \ No newline at end of file diff --git a/packages/commons/src/samples/resources/events/aws/kinesis-cloudwatch-logs-processor.json b/packages/commons/src/samples/resources/events/aws/kinesis-cloudwatch-logs-processor.json deleted file mode 100644 index c7978af868..0000000000 --- a/packages/commons/src/samples/resources/events/aws/kinesis-cloudwatch-logs-processor.json +++ /dev/null @@ -1,27 +0,0 @@ -{ - "records": [ - { - "recordId": "49578734086442259037497492980620233840400173390482112514000000", - "data": "H4sIAAAAAAAAADWO0QqCMBiFX2XsWiJFi7wLUW8sIYUuQmLpnxvpJttMQnz3Ztrlxzmc8424BaVIDfmnA+zjID3nlzS5n8IsO8YhtrAYOMg5aURfDUSXNBG1MkEj6liKvjPZQpmWQNoFVf9QpWSdZoJHrNEgFfZvxa8XvoHrGUfMqqWumdHQpDVjtmdvHc91dwdn71p/vVngmqBVD616PgoolC/Ga0SBNJoi8USVWWKczM8oYhKoULDBUzF9Aeua5yHsAAAA", - "approximateArrivalTimestamp": 1510254469499 - }, - { - "recordId": "49578734086442259037497492980621442766219788363254202370000000", - "data": "H4sIAAAAAAAAAJWRTWsbMRCG/8ueLZjRjL5yc9NNLnZDapemlFAkrTYstb3Lep0Qgv97x00KgTSHnAQzmkeP3nmqtmW/j3dl/TiU6qz6PF/Pfy3r1Wp+WVezqn/YlVHK2pK3Hr0Jxkt5099djv1hkE7uh0eVHzZqE7epiarb3fe/ixzDYVJoELRhssYQqsXLlEJ3jd8//biy4QYWz7jVNJa4/TDveQwV+qsada0v/HnthLg/pH0eu2Hq+t1Ft5nKuK/Ofn4EvnpDUAu7Xi6/LL9en3/z1e1f7fq+7KYT+qnqGrEnsi54AGS2wbHWxjCjoWAYGawmzawByIG3Dp0JzjOxsaI8dbKJKW4l1BcTdgg+zP5tSPCeQ/Bso/I+o+I2kUptjgrRlQyasslUHWdvZRwGJ4+HYJGCtiKgQTYKSJ4gODLgAkpFk3f0rkyA1zLGSsvoVsVCRTFakUkNqKxt1IyFc8T/y0gEmoHZo5a/W9HhU0TeWHMyIJaoQC6zDvC+DL6WSW3MqZSkiolJcWoalWybJSNIJTXcRgjV8fb4BwwLrNzwAgAA", - "approximateArrivalTimestamp": 1510254473773 - }, - { - "recordId": "49578734086442259037497492980622651692039402992428908546000000", - "data": "H4sIAAAAAAAAAJWRbWsbMQyA/8t9jkGSJdnut2zLCiXZyJKyZaMM352vHEty4e7SUkr++9yXwUbXD8Vgg2w9eizdF7s0DPE6re8OqTgrPkzX05+L2Wo1PZ8Vk6K73ac+h0mtV49egvgc3nbX5313POSbqjvcmep2a7ZxV9bRtPub7lfKx+E4GhQEErYqYtHMn7MMuiV+fbf5rOEbzJ9wq7FPcfdm3lOaNReXyws/3cw2fvk9A4djOVR9exjbbv+x3Y6pH4qzH29hr14QzFzXi8WnxZfl+0tfXD1az27SfnxA3xdtneWtVRc8ADJrcEwkwoxigzAyiBNxzkJuIxGrei+g3gbgrDy2eRBj3OWePpuwQ/Bh8mdAGR+J69pJMFXKihwTGJ+aYJArpkjYQB2K0+SljMPgyFIIijaQgs2BAMEyexbns1NeoqpsCV+VCfCPTOVLLgUMU4h5S5UpE4BRm6ROqCEF/r8MExBDro3ED0XBMigFVM0iQlkRvZLml9a/LoN/yzSYKoIKTOmVTf6VNTHZxkjTIElkqlCL09XpN5PgkxrvAgAA", - "approximateArrivalTimestamp": 1510254474027 - }, - { - "recordId": "49578734086442259037497492980623860617859017621603614722000000", - "data": "H4sIAAAAAAAAAJWRW28aQQyF/8s+M9J47LHHeaMtzUOhEQXSVlVUDctstCqwCJZEUcR/r3OpFCnNQ17mcjw+8+n4vtqUwyFfl/ndrlRn1afhfPh7MprNhuejalB1t9uyNzkwJk6QosZk8rq7Pt93x51V6m535+rbtVvnzXKVXbu96f4U23bH3kEEHyIhx4jgxs9dDmQK3z/8vGD94cdPdrN+X/Lm3X5PbcHp5QLkYrqYLC6/mOHhuDzU+3bXt932c7vuy/5Qnf16j/fslYMb83wy+Tr5Nv24SNXVI/Xopmz7B+v7ql0ZPCKLJu+BiFUohBiJIKJGAvIkSTgpsU8aVBNangymsCH3rQ2izxvL9JmEBOzh4N+AzL6gX3JD7CLn4kg8OiVduahNkIa0BtbqNHgNI6AS0P5kQA3sUcA4IDCElCBKwgdgiCoI+CaM+pcwbAVfN8F5r2owGV0OdpWkS8kp52a1/D8MBR8sDUoQKDIbDnqlhAgQLTMWz8YbRQT92zDwEkbIQ10YHUZbKGfvUmrAIWodih2btKpOV6e/zXGIX+8CAAA=", - "approximateArrivalTimestamp": 1510254474388 - } - ], - "region": "eu-central-1", - "deliveryStreamArn": "arn:aws:firehose:eu-central-1:123456789012:deliverystream/copy-cwl-lambda-invoke-input-151025436553-Firehose-8KILJ01Q5OBN", - "invocationId": "a7234216-12b6-4bc0-96d7-82606c0e80cf" -} \ No newline at end of file diff --git a/packages/commons/src/samples/resources/events/aws/kinesis-get-records.json b/packages/commons/src/samples/resources/events/aws/kinesis-get-records.json deleted file mode 100644 index 12abdabd3c..0000000000 --- a/packages/commons/src/samples/resources/events/aws/kinesis-get-records.json +++ /dev/null @@ -1,20 +0,0 @@ -{ - "Records": [ - { - "kinesis": { - "partitionKey": "partitionKey-03", - "kinesisSchemaVersion": "1.0", - "data": "SGVsbG8sIHRoaXMgaXMgYSB0ZXN0IDEyMy4=", - "sequenceNumber": "49545115243490985018280067714973144582180062593244200961", - "approximateArrivalTimestamp": 1428537600 - }, - "eventSource": "aws:kinesis", - "eventID": "shardId-000000000000:49545115243490985018280067714973144582180062593244200961", - "invokeIdentityArn": "arn:aws:iam::EXAMPLE", - "eventVersion": "1.0", - "eventName": "aws:kinesis:record", - "eventSourceARN": "arn:aws:kinesis:EXAMPLE", - "awsRegion": "eu-central-1" - } - ] -} \ No newline at end of file diff --git a/packages/commons/src/samples/resources/events/aws/kinesis-kinesis-firehose.json b/packages/commons/src/samples/resources/events/aws/kinesis-kinesis-firehose.json deleted file mode 100644 index df23583934..0000000000 --- a/packages/commons/src/samples/resources/events/aws/kinesis-kinesis-firehose.json +++ /dev/null @@ -1,12 +0,0 @@ -{ - "invocationId": "invocationIdExample", - "deliveryStreamArn": "arn:aws:kinesis:EXAMPLE", - "region": "eu-central-1", - "records": [ - { - "recordId": "49546986683135544286507457936321625675700192471156785154", - "approximateArrivalTimestamp": 1495072949453, - "data": "SGVsbG8sIHRoaXMgaXMgYSB0ZXN0IDEyMy4=" - } - ] -} \ No newline at end of file diff --git a/packages/commons/src/samples/resources/events/aws/kinesis-streams-source.json b/packages/commons/src/samples/resources/events/aws/kinesis-streams-source.json deleted file mode 100644 index a462dc7e07..0000000000 --- a/packages/commons/src/samples/resources/events/aws/kinesis-streams-source.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "invocationId": "invocationIdExample", - "deliverySteamArn": "arn:aws:kinesis:EXAMPLE", - "region": "eu-central-1", - "records": [ - { - "recordId": "49546986683135544286507457936321625675700192471156785154", - "approximateArrivalTimestamp": 1495072949453, - "kinesisRecordMetadata": { - "sequenceNumber": "49545115243490985018280067714973144582180062593244200961", - "subsequenceNumber": "123456", - "partitionKey": "partitionKey-03", - "shardId": "shardId-000000000000", - "approximateArrivalTimestamp": 1495072949453 - }, - "data": "SGVsbG8sIHRoaXMgaXMgYSB0ZXN0IDEyMy4=" - } - ] -} \ No newline at end of file diff --git a/packages/commons/src/samples/resources/events/aws/kinesis-syslog.json b/packages/commons/src/samples/resources/events/aws/kinesis-syslog.json deleted file mode 100644 index bac8ff5567..0000000000 --- a/packages/commons/src/samples/resources/events/aws/kinesis-syslog.json +++ /dev/null @@ -1,16 +0,0 @@ -{ - "invocationId": "fir", - "region": "eu-central-1", - "records": [ - { - "recordId": "49546986683135544286507457936321625675700192471156785154", - "approximateArrivalTimestamp": 1495072949453, - "data": "SGVsbG8sIHRoaXMgaXMgYSB0ZXN0IDEyMy4=" - }, - { - "recordId": "49546986683135544286507457936321625675700192471156785154", - "approximateArrivalTimestamp": "2012-04-23T18:25:43.511Z", - "data": "SGVsbG8sIHRoaXMgaXMgYSB0ZXN0IDEyMy4=" - } - ] -} \ No newline at end of file diff --git a/packages/commons/src/samples/resources/events/aws/rekognition-s3-request.json b/packages/commons/src/samples/resources/events/aws/rekognition-s3-request.json deleted file mode 100644 index 89e0bd312c..0000000000 --- a/packages/commons/src/samples/resources/events/aws/rekognition-s3-request.json +++ /dev/null @@ -1,38 +0,0 @@ -{ - "Records": [ - { - "eventVersion": "2.0", - "eventSource": "aws:s3", - "awsRegion": "eu-central-1", - "eventTime": "1970-01-01T00:00:00.000Z", - "eventName": "ObjectCreated:Put", - "userIdentity": { - "principalId": "EXAMPLE" - }, - "requestParameters": { - "sourceIPAddress": "127.0.0.1" - }, - "responseElements": { - "x-amz-request-id": "EXAMPLE123456789", - "x-amz-id-2": "EXAMPLE123/5678abcdefghijklambdaisawesome/mnopqrstuvwxyzABCDEFGH" - }, - "s3": { - "s3SchemaVersion": "1.0", - "configurationId": "testConfigRule", - "bucket": { - "name": "example-bucket", - "ownerIdentity": { - "principalId": "EXAMPLE" - }, - "arn": "arn:aws:s3:::example-bucket" - }, - "object": { - "key": "test/key", - "size": 1024, - "eTag": "0123456789abcdef0123456789abcdef", - "sequencer": "0A1B2C3D4E5F678901" - } - } - } - ] -} \ No newline at end of file diff --git a/packages/commons/src/samples/resources/events/aws/s3-delete.json b/packages/commons/src/samples/resources/events/aws/s3-delete.json deleted file mode 100644 index fd30611694..0000000000 --- a/packages/commons/src/samples/resources/events/aws/s3-delete.json +++ /dev/null @@ -1,36 +0,0 @@ -{ - "Records": [ - { - "eventVersion": "2.0", - "eventSource": "aws:s3", - "awsRegion": "eu-central-1", - "eventTime": "1970-01-01T00:00:00.000Z", - "eventName": "ObjectRemoved:Delete", - "userIdentity": { - "principalId": "EXAMPLE" - }, - "requestParameters": { - "sourceIPAddress": "127.0.0.1" - }, - "responseElements": { - "x-amz-request-id": "EXAMPLE123456789", - "x-amz-id-2": "EXAMPLE123/5678abcdefghijklambdaisawesome/mnopqrstuvwxyzABCDEFGH" - }, - "s3": { - "s3SchemaVersion": "1.0", - "configurationId": "testConfigRule", - "bucket": { - "name": "example-bucket", - "ownerIdentity": { - "principalId": "EXAMPLE" - }, - "arn": "arn:aws:s3:::example-bucket" - }, - "object": { - "key": "test/key", - "sequencer": "0A1B2C3D4E5F678901" - } - } - } - ] -} \ No newline at end of file diff --git a/packages/commons/src/samples/resources/events/aws/s3-put.json b/packages/commons/src/samples/resources/events/aws/s3-put.json deleted file mode 100644 index 89e0bd312c..0000000000 --- a/packages/commons/src/samples/resources/events/aws/s3-put.json +++ /dev/null @@ -1,38 +0,0 @@ -{ - "Records": [ - { - "eventVersion": "2.0", - "eventSource": "aws:s3", - "awsRegion": "eu-central-1", - "eventTime": "1970-01-01T00:00:00.000Z", - "eventName": "ObjectCreated:Put", - "userIdentity": { - "principalId": "EXAMPLE" - }, - "requestParameters": { - "sourceIPAddress": "127.0.0.1" - }, - "responseElements": { - "x-amz-request-id": "EXAMPLE123456789", - "x-amz-id-2": "EXAMPLE123/5678abcdefghijklambdaisawesome/mnopqrstuvwxyzABCDEFGH" - }, - "s3": { - "s3SchemaVersion": "1.0", - "configurationId": "testConfigRule", - "bucket": { - "name": "example-bucket", - "ownerIdentity": { - "principalId": "EXAMPLE" - }, - "arn": "arn:aws:s3:::example-bucket" - }, - "object": { - "key": "test/key", - "size": 1024, - "eTag": "0123456789abcdef0123456789abcdef", - "sequencer": "0A1B2C3D4E5F678901" - } - } - } - ] -} \ No newline at end of file diff --git a/packages/commons/src/samples/resources/events/aws/sagemaker-ground-truth-annotation-consolidation.json b/packages/commons/src/samples/resources/events/aws/sagemaker-ground-truth-annotation-consolidation.json deleted file mode 100644 index 2aeb4fbbce..0000000000 --- a/packages/commons/src/samples/resources/events/aws/sagemaker-ground-truth-annotation-consolidation.json +++ /dev/null @@ -1,9 +0,0 @@ -{ - "version": "2018-10-16", - "labelingJobArn": "arn:aws:sagemaker:eu-central-1:123456789012:labeling-job/example-job", - "labelAttributeName": "example-attribute", - "roleArn": "aws:aws:iam::{{account_id}}:role/sagemaker-role", - "payload": { - "s3Uri": "s3://sagemakerexample/output/example-job/annotations/worker_response/iteration-1/0/2019-09-06_18:35:03.json" - } -} \ No newline at end of file diff --git a/packages/commons/src/samples/resources/events/aws/sagemaker-ground-truth-pre-human.json b/packages/commons/src/samples/resources/events/aws/sagemaker-ground-truth-pre-human.json deleted file mode 100644 index 26c9755d2c..0000000000 --- a/packages/commons/src/samples/resources/events/aws/sagemaker-ground-truth-pre-human.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "version": "2018-10-16", - "labelingJobArn": "arn:aws:sagemaker:eu-central-1:123456789012:labeling-job/example-job", - "dataObject": { - "source-ref": "s3://sagemakerexample/object_to_annotate.jpg" - } -} \ No newline at end of file diff --git a/packages/commons/src/samples/resources/events/aws/ses-email-receiving.json b/packages/commons/src/samples/resources/events/aws/ses-email-receiving.json deleted file mode 100644 index 3a80dfe175..0000000000 --- a/packages/commons/src/samples/resources/events/aws/ses-email-receiving.json +++ /dev/null @@ -1,97 +0,0 @@ -{ - "Records": [ - { - "eventSource": "aws:ses", - "eventVersion": "1.0", - "ses": { - "mail": { - "commonHeaders": { - "date": "Wed, 7 Oct 2015 12:34:56 -0700", - "from": [ - "Jane Doe " - ], - "messageId": "<0123456789example.com>", - "returnPath": "janedoe@example.com", - "subject": "Test Subject", - "to": [ - "johndoe@example.com" - ] - }, - "destination": [ - "johndoe@example.com" - ], - "headers": [ - { - "name": "Return-Path", - "value": "" - }, - { - "name": "Received", - "value": "from mailer.example.com (mailer.example.com [203.0.113.1]) by inbound-smtp.eu-central-1.amazonaws.com with SMTP id o3vrnil0e2ic28trm7dfhrc2v0cnbeccl4nbp0g1 for johndoe@example.com; Wed, 07 Oct 2015 12:34:56 +0000 (UTC)" - }, - { - "name": "DKIM-Signature", - "value": "v=1; a=rsa-sha256; c=relaxed/relaxed; d=example.com; s=example; h=mime-version:from:date:message-id:subject:to:content-type; bh=jX3F0bCAI7sIbkHyy3mLYO28ieDQz2R0P8HwQkklFj4=; b=sQwJ+LMe9RjkesGu+vqU56asvMhrLRRYrWCbVt6WJulueecwfEwRf9JVWgkBTKiL6m2hr70xDbPWDhtLdLO+jB3hzjVnXwK3pYIOHw3vxG6NtJ6o61XSUwjEsp9tdyxQjZf2HNYee873832l3K1EeSXKzxYk9Pwqcpi3dMC74ct9GukjIevf1H46hm1L2d9VYTL0LGZGHOAyMnHmEGB8ZExWbI+k6khpurTQQ4sp4PZPRlgHtnj3Zzv7nmpTo7dtPG5z5S9J+L+Ba7dixT0jn3HuhaJ9b+VThboo4YfsX9PMNhWWxGjVksSFOcGluPO7QutCPyoY4gbxtwkN9W69HA==" - }, - { - "name": "MIME-Version", - "value": "1.0" - }, - { - "name": "From", - "value": "Jane Doe " - }, - { - "name": "Date", - "value": "Wed, 7 Oct 2015 12:34:56 -0700" - }, - { - "name": "Message-ID", - "value": "<0123456789example.com>" - }, - { - "name": "Subject", - "value": "Test Subject" - }, - { - "name": "To", - "value": "johndoe@example.com" - }, - { - "name": "Content-Type", - "value": "text/plain; charset=UTF-8" - } - ], - "headersTruncated": false, - "messageId": "o3vrnil0e2ic28trm7dfhrc2v0clambda4nbp0g1", - "source": "janedoe@example.com", - "timestamp": "1970-01-01T00:00:00.000Z" - }, - "receipt": { - "action": { - "functionArn": "arn:aws:lambda:eu-central-1:123456789012:function:Example", - "invocationType": "Event", - "type": "Lambda" - }, - "dkimVerdict": { - "status": "PASS" - }, - "processingTimeMillis": 574, - "recipients": [ - "johndoe@example.com" - ], - "spamVerdict": { - "status": "PASS" - }, - "spfVerdict": { - "status": "PASS" - }, - "timestamp": "1970-01-01T00:00:00.000Z", - "virusVerdict": { - "status": "PASS" - } - } - } - } - ] -} \ No newline at end of file diff --git a/packages/commons/src/samples/resources/events/aws/sns-notification.json b/packages/commons/src/samples/resources/events/aws/sns-notification.json deleted file mode 100644 index 4bb79dee1e..0000000000 --- a/packages/commons/src/samples/resources/events/aws/sns-notification.json +++ /dev/null @@ -1,31 +0,0 @@ -{ - "Records": [ - { - "EventSource": "aws:sns", - "EventVersion": "1.0", - "EventSubscriptionArn": "arn:aws:sns:eu-central-1:{{{accountId}}}:ExampleTopic", - "Sns": { - "Type": "Notification", - "MessageId": "95df01b4-ee98-5cb9-9903-4c221d41eb5e", - "TopicArn": "arn:aws:sns:eu-central-1:123456789012:ExampleTopic", - "Subject": "example subject", - "Message": "example message", - "Timestamp": "1970-01-01T00:00:00.000Z", - "SignatureVersion": "1", - "Signature": "EXAMPLE", - "SigningCertUrl": "EXAMPLE", - "UnsubscribeUrl": "EXAMPLE", - "MessageAttributes": { - "Test": { - "Type": "String", - "Value": "TestString" - }, - "TestBinary": { - "Type": "Binary", - "Value": "TestBinary" - } - } - } - } - ] -} \ No newline at end of file diff --git a/packages/commons/src/samples/resources/events/aws/sqs-receive-message.json b/packages/commons/src/samples/resources/events/aws/sqs-receive-message.json deleted file mode 100644 index a24697a237..0000000000 --- a/packages/commons/src/samples/resources/events/aws/sqs-receive-message.json +++ /dev/null @@ -1,20 +0,0 @@ -{ - "Records": [ - { - "messageId": "19dd0b57-b21e-4ac1-bd88-01bbb068cb78", - "receiptHandle": "MessageReceiptHandle", - "body": "Hello from SQS!", - "attributes": { - "ApproximateReceiveCount": "1", - "SentTimestamp": "1523232000000", - "SenderId": "123456789012", - "ApproximateFirstReceiveTimestamp": "1523232000001" - }, - "messageAttributes": {}, - "md5OfBody": "{{{md5_of_body}}}", - "eventSource": "aws:sqs", - "eventSourceARN": "arn:aws:sqs:eu-central-1:123456789012:MyQueue", - "awsRegion": "eu-central-1" - } - ] -} \ No newline at end of file diff --git a/packages/commons/src/samples/resources/events/aws/stepfunctions-error.json b/packages/commons/src/samples/resources/events/aws/stepfunctions-error.json deleted file mode 100644 index 9e26dfeeb6..0000000000 --- a/packages/commons/src/samples/resources/events/aws/stepfunctions-error.json +++ /dev/null @@ -1 +0,0 @@ -{} \ No newline at end of file diff --git a/packages/commons/src/samples/resources/events/custom/index.ts b/packages/commons/src/samples/resources/events/custom/index.ts deleted file mode 100644 index bf173e958f..0000000000 --- a/packages/commons/src/samples/resources/events/custom/index.ts +++ /dev/null @@ -1,5 +0,0 @@ -export const CustomEvent = { - key1: 'value1', - key2: 'value2', - key3: 'value3', -}; diff --git a/packages/commons/src/samples/resources/events/index.ts b/packages/commons/src/samples/resources/events/index.ts deleted file mode 100644 index 94b087e514..0000000000 --- a/packages/commons/src/samples/resources/events/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * as Custom from './custom/index.js'; diff --git a/packages/commons/tests/unit/EnvironmentVariablesService.test.ts b/packages/commons/tests/unit/EnvironmentVariablesService.test.ts index c9592374d1..c7b4c75d19 100644 --- a/packages/commons/tests/unit/EnvironmentVariablesService.test.ts +++ b/packages/commons/tests/unit/EnvironmentVariablesService.test.ts @@ -3,7 +3,6 @@ * * @group unit/commons/environmentService */ - import { EnvironmentVariablesService } from '../../src/index.js'; describe('Class: EnvironmentVariablesService', () => { diff --git a/packages/commons/tests/unit/LambdaInterface.test.ts b/packages/commons/tests/unit/LambdaInterface.test.ts index 376d35bf52..7d7decc5a0 100644 --- a/packages/commons/tests/unit/LambdaInterface.test.ts +++ b/packages/commons/tests/unit/LambdaInterface.test.ts @@ -5,7 +5,7 @@ */ import { Handler } from 'aws-lambda'; import { Callback, Context } from 'aws-lambda'; -import { helloworldContext as context } from '../../src/samples/resources/contexts/hello-world'; +import context from '@aws-lambda-powertools/testing-utils/context'; import type { SyncHandler, AsyncHandler, diff --git a/packages/commons/tests/unit/cleanupMiddlewares.test.ts b/packages/commons/tests/unit/cleanupMiddlewares.test.ts index c3f92f965f..15295a0396 100644 --- a/packages/commons/tests/unit/cleanupMiddlewares.test.ts +++ b/packages/commons/tests/unit/cleanupMiddlewares.test.ts @@ -10,7 +10,7 @@ import { LOGGER_KEY, IDEMPOTENCY_KEY, } from '../../src/index.js'; -import { helloworldContext as context } from '../../src/samples/resources/contexts/hello-world'; +import context from '@aws-lambda-powertools/testing-utils/context'; describe('Function: cleanupMiddlewares', () => { it('calls the cleanup function that are present', async () => { diff --git a/packages/idempotency/tests/helpers/resources.ts b/packages/idempotency/tests/helpers/resources.ts index 75bc4276ed..3a732f5ba0 100644 --- a/packages/idempotency/tests/helpers/resources.ts +++ b/packages/idempotency/tests/helpers/resources.ts @@ -1,14 +1,14 @@ +import { + type TestStack, + concatenateResourceName, +} from '@aws-lambda-powertools/testing-utils'; +import { TestNodejsFunction } from '@aws-lambda-powertools/testing-utils/resources/lambda'; +import { TestDynamodbTable } from '@aws-lambda-powertools/testing-utils/resources/dynamodb'; import type { ExtraTestProps, TestDynamodbTableProps, TestNodejsFunctionProps, - TestStack, -} from '@aws-lambda-powertools/testing-utils'; -import { - concatenateResourceName, - TestDynamodbTable, - TestNodejsFunction, -} from '@aws-lambda-powertools/testing-utils'; +} from '@aws-lambda-powertools/testing-utils/types'; import { Construct } from 'constructs'; import { randomUUID } from 'node:crypto'; diff --git a/packages/idempotency/tests/unit/IdempotencyConfig.test.ts b/packages/idempotency/tests/unit/IdempotencyConfig.test.ts index 17b6252947..f531972135 100644 --- a/packages/idempotency/tests/unit/IdempotencyConfig.test.ts +++ b/packages/idempotency/tests/unit/IdempotencyConfig.test.ts @@ -3,13 +3,12 @@ * * @group unit/idempotency/config */ -import { ContextExamples as dummyContext } from '@aws-lambda-powertools/commons'; +import context from '@aws-lambda-powertools/testing-utils/context'; import { IdempotencyConfig } from '../../src'; import type { IdempotencyConfigOptions } from '../../src/types'; describe('Class: IdempotencyConfig', () => { const ENVIRONMENT_VARIABLES = process.env; - const context = dummyContext.helloworldContext; beforeEach(() => { jest.clearAllMocks(); diff --git a/packages/idempotency/tests/unit/idempotencyDecorator.test.ts b/packages/idempotency/tests/unit/idempotencyDecorator.test.ts index f12b9ae6d3..acbee6e3bc 100644 --- a/packages/idempotency/tests/unit/idempotencyDecorator.test.ts +++ b/packages/idempotency/tests/unit/idempotencyDecorator.test.ts @@ -15,7 +15,7 @@ import { } from '../../src/errors'; import { IdempotencyConfig } from '../../src'; import { Context } from 'aws-lambda'; -import { ContextExamples as context } from '@aws-lambda-powertools/commons'; +import context from '@aws-lambda-powertools/testing-utils/context'; import { IdempotencyRecordStatus } from '../../src/constants'; const mockSaveInProgress = jest @@ -28,8 +28,6 @@ const mockGetRecord = jest .spyOn(BasePersistenceLayer.prototype, 'getRecord') .mockImplementation(); -const dummyContext = context.helloworldContext; - const mockConfig: IdempotencyConfig = new IdempotencyConfig({}); class PersistenceLayerTestClass extends BasePersistenceLayer { @@ -81,13 +79,13 @@ describe('Given a class with a function to decorate', (classWithLambdaHandler = describe('When wrapping a function with no previous executions', () => { beforeEach(async () => { - await classWithFunctionDecorator.handler(inputRecord, dummyContext); + await classWithFunctionDecorator.handler(inputRecord, context); }); test('Then it will save the record to INPROGRESS', () => { expect(mockSaveInProgress).toBeCalledWith( inputRecord, - dummyContext.getRemainingTimeInMillis() + context.getRemainingTimeInMillis() ); }); @@ -101,13 +99,13 @@ describe('Given a class with a function to decorate', (classWithLambdaHandler = }); describe('When wrapping a handler function with no previous executions', () => { beforeEach(async () => { - await classWithLambdaHandler.testing(inputRecord, dummyContext); + await classWithLambdaHandler.testing(inputRecord, context); }); test('Then it will save the record to INPROGRESS', () => { expect(mockSaveInProgress).toBeCalledWith( inputRecord, - dummyContext.getRemainingTimeInMillis() + context.getRemainingTimeInMillis() ); }); @@ -134,7 +132,7 @@ describe('Given a class with a function to decorate', (classWithLambdaHandler = new IdempotencyRecord(idempotencyOptions) ); try { - await classWithLambdaHandler.testing(inputRecord, dummyContext); + await classWithLambdaHandler.testing(inputRecord, context); } catch (e) { resultingError = e as Error; } @@ -143,7 +141,7 @@ describe('Given a class with a function to decorate', (classWithLambdaHandler = test('Then it will attempt to save the record to INPROGRESS', () => { expect(mockSaveInProgress).toBeCalledWith( inputRecord, - dummyContext.getRemainingTimeInMillis() + context.getRemainingTimeInMillis() ); }); @@ -174,7 +172,7 @@ describe('Given a class with a function to decorate', (classWithLambdaHandler = new IdempotencyRecord(idempotencyOptions) ); try { - await classWithLambdaHandler.testing(inputRecord, dummyContext); + await classWithLambdaHandler.testing(inputRecord, context); } catch (e) { resultingError = e as Error; } @@ -183,7 +181,7 @@ describe('Given a class with a function to decorate', (classWithLambdaHandler = test('Then it will attempt to save the record to INPROGRESS', () => { expect(mockSaveInProgress).toBeCalledWith( inputRecord, - dummyContext.getRemainingTimeInMillis() + context.getRemainingTimeInMillis() ); }); @@ -214,13 +212,13 @@ describe('Given a class with a function to decorate', (classWithLambdaHandler = mockGetRecord.mockResolvedValue( new IdempotencyRecord(idempotencyOptions) ); - await classWithLambdaHandler.testing(inputRecord, dummyContext); + await classWithLambdaHandler.testing(inputRecord, context); }); test('Then it will attempt to save the record to INPROGRESS', () => { expect(mockSaveInProgress).toBeCalledWith( inputRecord, - dummyContext.getRemainingTimeInMillis() + context.getRemainingTimeInMillis() ); }); @@ -237,7 +235,7 @@ describe('Given a class with a function to decorate', (classWithLambdaHandler = class TestinClassWithLambdaHandlerWithConfig { @idempotent({ persistenceStore: new PersistenceLayerTestClass(), - config: new IdempotencyConfig({ lambdaContext: dummyContext }), + config: new IdempotencyConfig({ lambdaContext: context }), }) public testing(record: Record): string { functionalityToDecorate(record); @@ -261,7 +259,7 @@ describe('Given a class with a function to decorate', (classWithLambdaHandler = test('Then it will attempt to save the record to INPROGRESS', () => { expect(mockSaveInProgress).toBeCalledWith( inputRecord, - dummyContext.getRemainingTimeInMillis() + context.getRemainingTimeInMillis() ); }); @@ -276,7 +274,7 @@ describe('Given a class with a function to decorate', (classWithLambdaHandler = class TestingClassWithIdempotencyDisabled { @idempotent({ persistenceStore: new PersistenceLayerTestClass(), - config: new IdempotencyConfig({ lambdaContext: dummyContext }), + config: new IdempotencyConfig({ lambdaContext: context }), }) public testing( record: Record, @@ -289,7 +287,7 @@ describe('Given a class with a function to decorate', (classWithLambdaHandler = } const classWithoutIdempotencyDisabled = new TestingClassWithIdempotencyDisabled(); - await classWithoutIdempotencyDisabled.testing(inputRecord, dummyContext); + await classWithoutIdempotencyDisabled.testing(inputRecord, context); }); test('Then it will skip ipdemotency', async () => { diff --git a/packages/idempotency/tests/unit/makeHandlerIdempotent.test.ts b/packages/idempotency/tests/unit/makeHandlerIdempotent.test.ts index ae628dd121..a761a0f527 100644 --- a/packages/idempotency/tests/unit/makeHandlerIdempotent.test.ts +++ b/packages/idempotency/tests/unit/makeHandlerIdempotent.test.ts @@ -4,10 +4,7 @@ * @group unit/idempotency/makeHandlerIdempotent */ import { makeHandlerIdempotent } from '../../src/middleware'; -import { - ContextExamples as dummyContext, - Events as dummyEvent, -} from '@aws-lambda-powertools/commons'; +import context from '@aws-lambda-powertools/testing-utils/context'; import { IdempotencyRecord } from '../../src/persistence'; import { IdempotencyInconsistentStateError, @@ -27,8 +24,10 @@ const remainingTImeInMillis = 1234; describe('Middleware: makeHandlerIdempotent', () => { const ENVIRONMENT_VARIABLES = process.env; - const context = dummyContext.helloworldContext; - const event = dummyEvent.Custom; + const event = { + foo: 'bar', + bar: 'baz', + }; beforeEach(() => { jest.clearAllMocks(); diff --git a/packages/idempotency/tests/unit/makeIdempotent.test.ts b/packages/idempotency/tests/unit/makeIdempotent.test.ts index da7b3ef194..d7737e16fd 100644 --- a/packages/idempotency/tests/unit/makeIdempotent.test.ts +++ b/packages/idempotency/tests/unit/makeIdempotent.test.ts @@ -11,10 +11,7 @@ import { IdempotencyPersistenceLayerError, } from '../../src/errors'; import { IdempotencyConfig } from '../../src'; -import { - ContextExamples as dummyContext, - Events as dummyEvent, -} from '@aws-lambda-powertools/commons'; +import context from '@aws-lambda-powertools/testing-utils/context'; import { MAX_RETRIES, IdempotencyRecordStatus } from '../../src/constants'; import { PersistenceLayerTestClass } from '../helpers/idempotencyUtils'; import type { Context } from 'aws-lambda'; @@ -26,8 +23,10 @@ const remainingTImeInMillis = 1234; describe('Function: makeIdempotent', () => { const ENVIRONMENT_VARIABLES = process.env; - const context = dummyContext.helloworldContext; - const event = dummyEvent.Custom; + const event = { + foo: 'bar', + bar: 'baz', + }; beforeEach(() => { jest.clearAllMocks(); diff --git a/packages/idempotency/tests/unit/persistence/BasePersistenceLayer.test.ts b/packages/idempotency/tests/unit/persistence/BasePersistenceLayer.test.ts index 3224c0661b..6f78207d85 100644 --- a/packages/idempotency/tests/unit/persistence/BasePersistenceLayer.test.ts +++ b/packages/idempotency/tests/unit/persistence/BasePersistenceLayer.test.ts @@ -3,7 +3,7 @@ * * @group unit/idempotency/persistence/base */ -import { ContextExamples as dummyContext } from '@aws-lambda-powertools/commons'; +import context from '@aws-lambda-powertools/testing-utils/context'; import { IdempotencyConfig, IdempotencyRecordStatus } from '../../../src'; import { BasePersistenceLayer, @@ -24,7 +24,6 @@ jest.mock('node:crypto', () => ({ describe('Class: BasePersistenceLayer', () => { const ENVIRONMENT_VARIABLES = process.env; - const context = dummyContext.helloworldContext; class PersistenceLayerTestClass extends BasePersistenceLayer { public _deleteRecord = jest.fn(); diff --git a/packages/logger/tests/e2e/basicFeatures.middy.test.FunctionCode.ts b/packages/logger/tests/e2e/basicFeatures.middy.test.FunctionCode.ts index 9107bf5453..01c3b11804 100644 --- a/packages/logger/tests/e2e/basicFeatures.middy.test.FunctionCode.ts +++ b/packages/logger/tests/e2e/basicFeatures.middy.test.FunctionCode.ts @@ -1,6 +1,7 @@ -import { injectLambdaContext, Logger } from '../../src'; -import { Context, APIGatewayAuthorizerResult } from 'aws-lambda'; -import { TestEvent, TestOutput } from '../helpers/types'; +import { Logger } from '../../src/index.js'; +import { injectLambdaContext } from '../../src/middleware/middy.js'; +import type { Context, APIGatewayAuthorizerResult } from 'aws-lambda'; +import type { TestEvent, TestOutput } from '../helpers/types.js'; import middy from '@middy/core'; const PERSISTENT_KEY = process.env.PERSISTENT_KEY || 'persistentKey'; diff --git a/packages/logger/tests/e2e/basicFeatures.middy.test.ts b/packages/logger/tests/e2e/basicFeatures.middy.test.ts index 8a66abaac9..6ec5719206 100644 --- a/packages/logger/tests/e2e/basicFeatures.middy.test.ts +++ b/packages/logger/tests/e2e/basicFeatures.middy.test.ts @@ -10,7 +10,7 @@ import { } from '@aws-lambda-powertools/testing-utils'; import type { APIGatewayAuthorizerResult } from 'aws-lambda'; import { join } from 'node:path'; -import { LoggerTestNodejsFunction } from '../helpers/resources'; +import { LoggerTestNodejsFunction } from '../helpers/resources.js'; import { RESOURCE_NAME_PREFIX, SETUP_TIMEOUT, @@ -19,7 +19,7 @@ import { TEST_CASE_TIMEOUT, XRAY_TRACE_ID_REGEX, commonEnvironmentVars, -} from './constants'; +} from './constants.js'; describe(`Logger E2E tests, basic functionalities middy usage`, () => { const testStack = new TestStack({ diff --git a/packages/logger/tests/e2e/childLogger.manual.test.FunctionCode.ts b/packages/logger/tests/e2e/childLogger.manual.test.FunctionCode.ts index f2d32e36f0..82c2b3f0c2 100644 --- a/packages/logger/tests/e2e/childLogger.manual.test.FunctionCode.ts +++ b/packages/logger/tests/e2e/childLogger.manual.test.FunctionCode.ts @@ -1,7 +1,7 @@ -import { Logger } from '../../src'; -import { Context } from 'aws-lambda'; -import { LogLevel } from '../../src/types'; -import { TestEvent, TestOutput } from '../helpers/types'; +import { Logger } from '../../src/index.js'; +import type { Context } from 'aws-lambda'; +import type { LogLevel } from '../../src/types/index.js'; +import { TestEvent, TestOutput } from '../helpers/types.js'; const PERSISTENT_KEY = process.env.PERSISTENT_KEY || 'persistentKey'; const PERSISTENT_VALUE = process.env.ERSISTENT_VALUE || 'persistentValue'; diff --git a/packages/logger/tests/e2e/childLogger.manual.test.ts b/packages/logger/tests/e2e/childLogger.manual.test.ts index 454eab8a81..037b3ac81d 100644 --- a/packages/logger/tests/e2e/childLogger.manual.test.ts +++ b/packages/logger/tests/e2e/childLogger.manual.test.ts @@ -9,7 +9,7 @@ import { TestStack, } from '@aws-lambda-powertools/testing-utils'; import { join } from 'node:path'; -import { LoggerTestNodejsFunction } from '../helpers/resources'; +import { LoggerTestNodejsFunction } from '../helpers/resources.js'; import { commonEnvironmentVars, RESOURCE_NAME_PREFIX, @@ -17,7 +17,7 @@ import { STACK_OUTPUT_LOG_GROUP, TEARDOWN_TIMEOUT, TEST_CASE_TIMEOUT, -} from './constants'; +} from './constants.js'; describe(`Logger E2E tests, child logger`, () => { const testStack = new TestStack({ diff --git a/packages/logger/tests/e2e/logEventEnvVarSetting.middy.test.FunctionCode.ts b/packages/logger/tests/e2e/logEventEnvVarSetting.middy.test.FunctionCode.ts index 3f816ff4e1..2d10943d61 100644 --- a/packages/logger/tests/e2e/logEventEnvVarSetting.middy.test.FunctionCode.ts +++ b/packages/logger/tests/e2e/logEventEnvVarSetting.middy.test.FunctionCode.ts @@ -1,6 +1,7 @@ -import { injectLambdaContext, Logger } from '../../src'; -import { TestEvent, TestOutput } from '../helpers/types'; -import { Context } from 'aws-lambda'; +import { Logger } from '../../src/index.js'; +import { injectLambdaContext } from '../../src/middleware/middy.js'; +import type { TestEvent, TestOutput } from '../helpers/types.js'; +import type { Context } from 'aws-lambda'; import middy from '@middy/core'; const logger = new Logger(); diff --git a/packages/logger/tests/e2e/logEventEnvVarSetting.middy.test.ts b/packages/logger/tests/e2e/logEventEnvVarSetting.middy.test.ts index 5b87f0675f..902c41c09e 100644 --- a/packages/logger/tests/e2e/logEventEnvVarSetting.middy.test.ts +++ b/packages/logger/tests/e2e/logEventEnvVarSetting.middy.test.ts @@ -9,14 +9,14 @@ import { TestStack, } from '@aws-lambda-powertools/testing-utils'; import { join } from 'node:path'; -import { LoggerTestNodejsFunction } from '../helpers/resources'; +import { LoggerTestNodejsFunction } from '../helpers/resources.js'; import { RESOURCE_NAME_PREFIX, SETUP_TIMEOUT, STACK_OUTPUT_LOG_GROUP, TEARDOWN_TIMEOUT, TEST_CASE_TIMEOUT, -} from './constants'; +} from './constants.js'; describe(`Logger E2E tests, log event via env var setting with middy`, () => { const testStack = new TestStack({ diff --git a/packages/logger/tests/e2e/sampleRate.decorator.test.FunctionCode.ts b/packages/logger/tests/e2e/sampleRate.decorator.test.FunctionCode.ts index 32256a17ae..89c7e4833f 100644 --- a/packages/logger/tests/e2e/sampleRate.decorator.test.FunctionCode.ts +++ b/packages/logger/tests/e2e/sampleRate.decorator.test.FunctionCode.ts @@ -1,6 +1,6 @@ -import { Logger } from '../../src'; -import { TestEvent, TestOutput } from '../helpers/types'; -import { Context } from 'aws-lambda'; +import { Logger } from '../../src/index.js'; +import type { TestEvent, TestOutput } from '../helpers/types'; +import type { Context } from 'aws-lambda'; import type { LambdaInterface } from '@aws-lambda-powertools/commons/types'; const SAMPLE_RATE = parseFloat(process.env.SAMPLE_RATE || '0.1'); diff --git a/packages/logger/tests/e2e/sampleRate.decorator.test.ts b/packages/logger/tests/e2e/sampleRate.decorator.test.ts index 67c803dd58..e87f661a56 100644 --- a/packages/logger/tests/e2e/sampleRate.decorator.test.ts +++ b/packages/logger/tests/e2e/sampleRate.decorator.test.ts @@ -10,14 +10,14 @@ import { } from '@aws-lambda-powertools/testing-utils'; import { randomUUID } from 'node:crypto'; import { join } from 'node:path'; -import { LoggerTestNodejsFunction } from '../helpers/resources'; +import { LoggerTestNodejsFunction } from '../helpers/resources.js'; import { RESOURCE_NAME_PREFIX, SETUP_TIMEOUT, STACK_OUTPUT_LOG_GROUP, TEARDOWN_TIMEOUT, TEST_CASE_TIMEOUT, -} from './constants'; +} from './constants.js'; describe(`Logger E2E tests, sample rate and injectLambdaContext()`, () => { const testStack = new TestStack({ diff --git a/packages/logger/tests/helpers/resources.ts b/packages/logger/tests/helpers/resources.ts index 95e7a34074..deef695c0a 100644 --- a/packages/logger/tests/helpers/resources.ts +++ b/packages/logger/tests/helpers/resources.ts @@ -1,10 +1,10 @@ -import { TestNodejsFunction } from '@aws-lambda-powertools/testing-utils'; +import { TestNodejsFunction } from '@aws-lambda-powertools/testing-utils/resources/lambda'; import type { TestStack } from '@aws-lambda-powertools/testing-utils'; import { CfnOutput } from 'aws-cdk-lib'; import type { - TestNodejsFunctionProps, ExtraTestProps, -} from '@aws-lambda-powertools/testing-utils'; + TestNodejsFunctionProps, +} from '@aws-lambda-powertools/testing-utils/types'; import { commonEnvironmentVars } from '../e2e/constants'; interface LoggerExtraTestProps extends ExtraTestProps { diff --git a/packages/logger/tests/unit/Logger.test.ts b/packages/logger/tests/unit/Logger.test.ts index 1bcbc0fe4b..f1a5474de0 100644 --- a/packages/logger/tests/unit/Logger.test.ts +++ b/packages/logger/tests/unit/Logger.test.ts @@ -3,10 +3,7 @@ * * @group unit/logger/all */ -import { - ContextExamples as dummyContext, - Events as dummyEvent, -} from '@aws-lambda-powertools/commons'; +import context from '@aws-lambda-powertools/testing-utils/context'; import type { LambdaInterface } from '@aws-lambda-powertools/commons/types'; import { Logger, LogFormatter } from '../../src/index.js'; import { ConfigServiceInterface } from '../../src/config/ConfigServiceInterface.js'; @@ -32,8 +29,10 @@ const getConsoleMethod = ( describe('Class: Logger', () => { const ENVIRONMENT_VARIABLES = process.env; - const context = dummyContext.helloworldContext; - const event = dummyEvent.Custom.CustomEvent; + const event = { + foo: 'bar', + bar: 'baz', + }; const logLevelThresholds: LogLevelThresholds = { DEBUG: 8, INFO: 12, @@ -1744,9 +1743,8 @@ describe('Class: Logger', () => { timestamp: '2016-06-20T12:08:10.000Z', xray_trace_id: '1-5759e988-bd862e3fe1be46a994272793', event: { - key1: 'value1', - key2: 'value2', - key3: 'value3', + foo: 'bar', + bar: 'baz', }, }) ); @@ -1794,9 +1792,8 @@ describe('Class: Logger', () => { timestamp: '2016-06-20T12:08:10.000Z', xray_trace_id: '1-5759e988-bd862e3fe1be46a994272793', event: { - key1: 'value1', - key2: 'value2', - key3: 'value3', + foo: 'bar', + bar: 'baz', }, }) ); diff --git a/packages/logger/tests/unit/formatter/PowertoolsLogFormatter.test.ts b/packages/logger/tests/unit/formatter/PowertoolsLogFormatter.test.ts index 1d66414797..b7d5e3334a 100644 --- a/packages/logger/tests/unit/formatter/PowertoolsLogFormatter.test.ts +++ b/packages/logger/tests/unit/formatter/PowertoolsLogFormatter.test.ts @@ -3,7 +3,7 @@ * * @group unit/logger/all */ -import { AssertionError, strictEqual } from 'assert'; +import { AssertionError, strictEqual } from 'node:assert'; import { PowertoolsLogFormatter } from '../../../src/formatter/PowertoolsLogFormatter.js'; import { LogItem } from '../../../src/index.js'; import { UnformattedAttributes } from '../../../src/types/Logger.js'; diff --git a/packages/logger/tests/unit/middleware/middy.test.ts b/packages/logger/tests/unit/middleware/middy.test.ts index c5c32eab4a..cea1597f8e 100644 --- a/packages/logger/tests/unit/middleware/middy.test.ts +++ b/packages/logger/tests/unit/middleware/middy.test.ts @@ -3,11 +3,8 @@ * * @group unit/logger/all */ -import { - ContextExamples as dummyContext, - Events as dummyEvent, - cleanupMiddlewares, -} from '@aws-lambda-powertools/commons'; +import context from '@aws-lambda-powertools/testing-utils/context'; +import { cleanupMiddlewares } from '@aws-lambda-powertools/commons'; import { ConfigServiceInterface } from '../../../src/config/ConfigServiceInterface.js'; import { EnvironmentVariablesService } from '../../../src/config/EnvironmentVariablesService.js'; import { injectLambdaContext } from '../../../src/middleware/middy.js'; @@ -15,15 +12,17 @@ import { Logger } from './../../../src/Logger.js'; import middy from '@middy/core'; import { PowertoolsLogFormatter } from '../../../src/formatter/PowertoolsLogFormatter.js'; import { Console } from 'node:console'; -import { Context } from 'aws-lambda'; +import type { Context } from 'aws-lambda'; const mockDate = new Date(1466424490000); const dateSpy = jest.spyOn(global, 'Date').mockImplementation(() => mockDate); describe('Middy middleware', () => { const ENVIRONMENT_VARIABLES = process.env; - const context = dummyContext.helloworldContext; - const event = dummyEvent.Custom.CustomEvent; + const event = { + foo: 'bar', + bar: 'baz', + }; beforeEach(() => { jest.resetModules(); @@ -222,9 +221,7 @@ describe('Middy middleware', () => { }; }; const handler = middy( - ( - event: typeof dummyEvent.Custom.CustomEvent & { idx: number } - ): void => { + (event: { foo: string; bar: string } & { idx: number }): void => { // Add a key only at the first invocation, so we can check that it's cleared if (event.idx === 0) { logger.appendKeys({ @@ -287,9 +284,8 @@ describe('Middy middleware', () => { timestamp: '2016-06-20T12:08:10.000Z', xray_trace_id: '1-5759e988-bd862e3fe1be46a994272793', event: { - key1: 'value1', - key2: 'value2', - key3: 'value3', + foo: 'bar', + bar: 'baz', }, }) ); @@ -354,9 +350,8 @@ describe('Middy middleware', () => { timestamp: '2016-06-20T12:08:10.000Z', xray_trace_id: '1-5759e988-bd862e3fe1be46a994272793', event: { - key1: 'value1', - key2: 'value2', - key3: 'value3', + foo: 'bar', + bar: 'baz', }, }) ); @@ -393,9 +388,8 @@ describe('Middy middleware', () => { timestamp: '2016-06-20T12:08:10.000Z', xray_trace_id: '1-5759e988-bd862e3fe1be46a994272793', event: { - key1: 'value1', - key2: 'value2', - key3: 'value3', + foo: 'bar', + bar: 'baz', }, }) ); diff --git a/packages/metrics/tests/e2e/basicFeatures.decorator.test.functionCode.ts b/packages/metrics/tests/e2e/basicFeatures.decorator.test.functionCode.ts index 9016a01cbe..db74836afd 100644 --- a/packages/metrics/tests/e2e/basicFeatures.decorator.test.functionCode.ts +++ b/packages/metrics/tests/e2e/basicFeatures.decorator.test.functionCode.ts @@ -1,6 +1,6 @@ -import { Metrics, MetricUnits } from '../../src'; +import { Metrics, MetricUnits } from '../../src/index.js'; import type { Context } from 'aws-lambda'; -import type { LambdaInterface } from '@aws-lambda-powertools/commons'; +import type { LambdaInterface } from '@aws-lambda-powertools/commons/types'; const namespace = process.env.EXPECTED_NAMESPACE ?? 'CdkExample'; const serviceName = diff --git a/packages/metrics/tests/e2e/basicFeatures.decorators.test.ts b/packages/metrics/tests/e2e/basicFeatures.decorators.test.ts index 332636210e..bdaa6b750d 100644 --- a/packages/metrics/tests/e2e/basicFeatures.decorators.test.ts +++ b/packages/metrics/tests/e2e/basicFeatures.decorators.test.ts @@ -12,8 +12,8 @@ import { GetMetricStatisticsCommand, } from '@aws-sdk/client-cloudwatch'; import { join } from 'node:path'; -import { getMetrics } from '../helpers/metricsUtils'; -import { MetricsTestNodejsFunction } from '../helpers/resources'; +import { getMetrics } from '../helpers/metricsUtils.js'; +import { MetricsTestNodejsFunction } from '../helpers/resources.js'; import { commonEnvironmentVars, ONE_MINUTE, @@ -21,7 +21,7 @@ import { SETUP_TIMEOUT, TEARDOWN_TIMEOUT, TEST_CASE_TIMEOUT, -} from './constants'; +} from './constants.js'; describe(`Metrics E2E tests, basic features decorator usage`, () => { const testStack = new TestStack({ diff --git a/packages/metrics/tests/e2e/basicFeatures.manual.test.functionCode.ts b/packages/metrics/tests/e2e/basicFeatures.manual.test.functionCode.ts index 67ea224083..b4996dcf32 100644 --- a/packages/metrics/tests/e2e/basicFeatures.manual.test.functionCode.ts +++ b/packages/metrics/tests/e2e/basicFeatures.manual.test.functionCode.ts @@ -1,4 +1,4 @@ -import { Metrics, MetricUnits } from '../../src'; +import { Metrics, MetricUnits } from '../../src/index.js'; import type { Context } from 'aws-lambda'; const namespace = process.env.EXPECTED_NAMESPACE ?? 'CdkExample'; diff --git a/packages/metrics/tests/e2e/basicFeatures.manual.test.ts b/packages/metrics/tests/e2e/basicFeatures.manual.test.ts index b22861ab16..6cb286c708 100644 --- a/packages/metrics/tests/e2e/basicFeatures.manual.test.ts +++ b/packages/metrics/tests/e2e/basicFeatures.manual.test.ts @@ -12,8 +12,8 @@ import { GetMetricStatisticsCommand, } from '@aws-sdk/client-cloudwatch'; import { join } from 'node:path'; -import { getMetrics } from '../helpers/metricsUtils'; -import { MetricsTestNodejsFunction } from '../helpers/resources'; +import { getMetrics } from '../helpers/metricsUtils.js'; +import { MetricsTestNodejsFunction } from '../helpers/resources.js'; import { commonEnvironmentVars, ONE_MINUTE, @@ -21,7 +21,7 @@ import { SETUP_TIMEOUT, TEARDOWN_TIMEOUT, TEST_CASE_TIMEOUT, -} from './constants'; +} from './constants.js'; describe(`Metrics E2E tests, manual usage`, () => { const testStack = new TestStack({ diff --git a/packages/metrics/tests/e2e/constants.ts b/packages/metrics/tests/e2e/constants.ts index bb6068f56d..0f05997a51 100644 --- a/packages/metrics/tests/e2e/constants.ts +++ b/packages/metrics/tests/e2e/constants.ts @@ -1,5 +1,5 @@ import { randomUUID } from 'node:crypto'; -import { MetricUnits } from '../../src'; +import { MetricUnits } from '../../src/index.js'; const RESOURCE_NAME_PREFIX = 'Metrics'; const ONE_MINUTE = 60 * 1000; diff --git a/packages/metrics/tests/helpers/resources.ts b/packages/metrics/tests/helpers/resources.ts index ebb111984b..f071d2c8b2 100644 --- a/packages/metrics/tests/helpers/resources.ts +++ b/packages/metrics/tests/helpers/resources.ts @@ -1,9 +1,9 @@ +import type { TestStack } from '@aws-lambda-powertools/testing-utils'; import type { ExtraTestProps, TestNodejsFunctionProps, - TestStack, -} from '@aws-lambda-powertools/testing-utils'; -import { TestNodejsFunction } from '@aws-lambda-powertools/testing-utils'; +} from '@aws-lambda-powertools/testing-utils/types'; +import { TestNodejsFunction } from '@aws-lambda-powertools/testing-utils/resources/lambda'; import { commonEnvironmentVars } from '../e2e/constants'; class MetricsTestNodejsFunction extends TestNodejsFunction { diff --git a/packages/metrics/tests/unit/Metrics.test.ts b/packages/metrics/tests/unit/Metrics.test.ts index 286f618d65..e8077f78e7 100644 --- a/packages/metrics/tests/unit/Metrics.test.ts +++ b/packages/metrics/tests/unit/Metrics.test.ts @@ -3,13 +3,10 @@ * * @group unit/metrics/class */ -import { - ContextExamples as dummyContext, - Events as dummyEvent, -} from '@aws-lambda-powertools/commons'; +import context from '@aws-lambda-powertools/testing-utils/context'; import type { LambdaInterface } from '@aws-lambda-powertools/commons/types'; -import { MetricResolution, MetricUnits, Metrics } from '../../src/'; -import { Context, Handler } from 'aws-lambda'; +import { MetricResolution, MetricUnits, Metrics } from '../../src'; +import type { Context, Handler } from 'aws-lambda'; import { Dimensions, EmfOutput, MetricsOptions } from '../../src/types'; import { COLD_START_METRIC, @@ -36,8 +33,10 @@ interface LooseObject { describe('Class: Metrics', () => { const ENVIRONMENT_VARIABLES = process.env; const TEST_NAMESPACE = 'test'; - const context = dummyContext.helloworldContext; - const event = dummyEvent.Custom.CustomEvent; + const event = { + foo: 'bar', + bar: 'baz', + }; beforeEach(() => { jest.clearAllMocks(); diff --git a/packages/metrics/tests/unit/middleware/middy.test.ts b/packages/metrics/tests/unit/middleware/middy.test.ts index 1c5b83e6f5..5363566dfd 100644 --- a/packages/metrics/tests/unit/middleware/middy.test.ts +++ b/packages/metrics/tests/unit/middleware/middy.test.ts @@ -11,11 +11,8 @@ import { } from '../../../../metrics/src'; import middy from '@middy/core'; import { ExtraOptions } from '../../../src/types'; -import { - cleanupMiddlewares, - ContextExamples as dummyContext, - Events as dummyEvent, -} from '@aws-lambda-powertools/commons'; +import { cleanupMiddlewares } from '@aws-lambda-powertools/commons'; +import context from '@aws-lambda-powertools/testing-utils/context'; const consoleSpy = jest.spyOn(console, 'log').mockImplementation(); const consoleWarnSpy = jest.spyOn(console, 'warn').mockImplementation(); @@ -28,6 +25,11 @@ describe('Middy middleware', () => { jest.clearAllMocks(); }); + const event = { + foo: 'bar', + bar: 'baz', + }; + describe('throwOnEmptyMetrics', () => { test('should throw on empty metrics if set to true', async () => { // Prepare @@ -45,9 +47,7 @@ describe('Middy middleware', () => { ); try { - await handler(dummyEvent, dummyContext.helloworldContext, () => - console.log('Lambda invoked!') - ); + await handler(event, context, () => console.log('Lambda invoked!')); } catch (e) { expect((e).message).toBe( 'The number of metrics recorded must be higher than zero' @@ -71,9 +71,7 @@ describe('Middy middleware', () => { ); try { - await handler(dummyEvent, dummyContext.helloworldContext, () => - console.log('Lambda invoked!') - ); + await handler(event, context, () => console.log('Lambda invoked!')); } catch (e) { fail(`Should not throw but got the following Error: ${e}`); } @@ -91,9 +89,7 @@ describe('Middy middleware', () => { const handler = middy(lambdaHandler).use(logMetrics(metrics)); // Act & Assess - await expect( - handler(dummyEvent, dummyContext.helloworldContext) - ).resolves.not.toThrowError(); + await expect(handler(event, context)).resolves.not.toThrowError(); expect(consoleWarnSpy).toBeCalledTimes(1); expect(consoleWarnSpy).toBeCalledWith( 'No application metrics to publish. The cold-start metric may be published if enabled. If application metrics should never be empty, consider using `throwOnEmptyMetrics`' @@ -117,12 +113,8 @@ describe('Middy middleware', () => { logMetrics(metrics, { captureColdStartMetric: true }) ); - await handler(dummyEvent, dummyContext.helloworldContext, () => - console.log('Lambda invoked!') - ); - await handler(dummyEvent, dummyContext.helloworldContext, () => - console.log('Lambda invoked! again') - ); + await handler(event, context, () => console.log('Lambda invoked!')); + await handler(event, context, () => console.log('Lambda invoked! again')); const loggedData = [ JSON.parse(consoleSpy.mock.calls[0][0]), JSON.parse(consoleSpy.mock.calls[1][0]), @@ -154,12 +146,8 @@ describe('Middy middleware', () => { logMetrics(metrics, { captureColdStartMetric: false }) ); - await handler(dummyEvent, dummyContext.helloworldContext, () => - console.log('Lambda invoked!') - ); - await handler(dummyEvent, dummyContext.helloworldContext, () => - console.log('Lambda invoked! again') - ); + await handler(event, context, () => console.log('Lambda invoked!')); + await handler(event, context, () => console.log('Lambda invoked! again')); const loggedData = [ JSON.parse(consoleSpy.mock.calls[0][0]), JSON.parse(consoleSpy.mock.calls[1][0]), @@ -181,12 +169,8 @@ describe('Middy middleware', () => { const handler = middy(lambdaHandler).use(logMetrics(metrics)); - await handler(dummyEvent, dummyContext.helloworldContext, () => - console.log('Lambda invoked!') - ); - await handler(dummyEvent, dummyContext.helloworldContext, () => - console.log('Lambda invoked! again') - ); + await handler(event, context, () => console.log('Lambda invoked!')); + await handler(event, context, () => console.log('Lambda invoked! again')); const loggedData = [ JSON.parse(consoleSpy.mock.calls[0][0]), JSON.parse(consoleSpy.mock.calls[1][0]), @@ -212,9 +196,7 @@ describe('Middy middleware', () => { const handler = middy(lambdaHandler).use(logMetrics(metrics)); // Act - await handler(dummyEvent, dummyContext.helloworldContext, () => - console.log('Lambda invoked!') - ); + await handler(event, context, () => console.log('Lambda invoked!')); // Assess expect(console.log).toHaveBeenNthCalledWith( @@ -256,9 +238,7 @@ describe('Middy middleware', () => { ); // Act - await handler(dummyEvent, dummyContext.helloworldContext, () => - console.log('Lambda invoked!') - ); + await handler(event, context, () => console.log('Lambda invoked!')); // Assess expect(console.log).toHaveBeenNthCalledWith( @@ -318,9 +298,7 @@ describe('Middy middleware', () => { const handler = middy(lambdaHandler).use(logMetrics(metrics)); // Act - await handler(dummyEvent, dummyContext.helloworldContext, () => - console.log('Lambda invoked!') - ); + await handler(event, context, () => console.log('Lambda invoked!')); // Assess expect(console.log).toHaveBeenNthCalledWith( @@ -360,9 +338,7 @@ describe('Middy middleware', () => { ); // Act - await handler(dummyEvent, dummyContext.helloworldContext, () => - console.log('Lambda invoked!') - ); + await handler(event, context, () => console.log('Lambda invoked!')); // Assess expect(console.log).toHaveBeenNthCalledWith( @@ -413,7 +389,7 @@ describe('Middy middleware', () => { }; }; const handler = middy( - (_event: typeof dummyEvent & { idx: number }): void => { + (_event: { foo: string; bar: string } & { idx: number }): void => { metrics.addMetric('successfulBooking', MetricUnits.Count, 1); } ) @@ -421,8 +397,8 @@ describe('Middy middleware', () => { .use(myCustomMiddleware()); // Act - await handler({ ...dummyEvent, idx: 0 }, dummyContext.helloworldContext); - await handler({ ...dummyEvent, idx: 1 }, dummyContext.helloworldContext); + await handler({ ...event, idx: 0 }, context); + await handler({ ...event, idx: 1 }, context); // Assess expect(publishStoredMetricsSpy).toBeCalledTimes(2); @@ -448,9 +424,7 @@ describe('Middy middleware', () => { const handler = middy(lambdaHandler).use(logMetrics(metrics)); // Act - await handler(dummyEvent, dummyContext.helloworldContext, () => - console.log('Lambda invoked!') - ); + await handler(event, context, () => console.log('Lambda invoked!')); // Assess expect(console.log).toHaveBeenCalledWith( @@ -495,9 +469,7 @@ describe('Middy middleware', () => { const handler = middy(lambdaHandler).use(logMetrics(metrics)); // Act - await handler(dummyEvent, dummyContext.helloworldContext, () => - console.log('Lambda invoked!') - ); + await handler(event, context, () => console.log('Lambda invoked!')); // Assess expect(console.log).toHaveBeenCalledWith( diff --git a/packages/parameters/package.json b/packages/parameters/package.json index 94fc4e5cba..9089020fca 100644 --- a/packages/parameters/package.json +++ b/packages/parameters/package.json @@ -155,6 +155,7 @@ "nodejs" ], "devDependencies": { + "@aws-lambda-powertools/testing-utils": "file:../testing", "@aws-sdk/client-appconfigdata": "^3.413.0", "@aws-sdk/client-dynamodb": "^3.413.0", "@aws-sdk/client-secrets-manager": "^3.413.0", @@ -195,4 +196,4 @@ "optional": true } } -} \ No newline at end of file +} diff --git a/packages/parameters/tests/e2e/appConfigProvider.class.test.ts b/packages/parameters/tests/e2e/appConfigProvider.class.test.ts index 35c150840c..69bb52ae17 100644 --- a/packages/parameters/tests/e2e/appConfigProvider.class.test.ts +++ b/packages/parameters/tests/e2e/appConfigProvider.class.test.ts @@ -6,9 +6,9 @@ import { invokeFunctionOnce, TestInvocationLogs, - TestNodejsFunction, TestStack, } from '@aws-lambda-powertools/testing-utils'; +import { TestNodejsFunction } from '@aws-lambda-powertools/testing-utils/resources/lambda'; import { toBase64 } from '@aws-sdk/util-base64-node'; import { join } from 'node:path'; import { TestAppConfigWithProfiles } from '../helpers/resources.js'; diff --git a/packages/parameters/tests/e2e/dynamoDBProvider.class.test.ts b/packages/parameters/tests/e2e/dynamoDBProvider.class.test.ts index 391d215f76..8f1748246a 100644 --- a/packages/parameters/tests/e2e/dynamoDBProvider.class.test.ts +++ b/packages/parameters/tests/e2e/dynamoDBProvider.class.test.ts @@ -6,9 +6,9 @@ import { invokeFunctionOnce, TestInvocationLogs, - TestNodejsFunction, TestStack, } from '@aws-lambda-powertools/testing-utils'; +import { TestNodejsFunction } from '@aws-lambda-powertools/testing-utils/resources/lambda'; import { AttributeType } from 'aws-cdk-lib/aws-dynamodb'; import { join } from 'node:path'; import { TestDynamodbTableWithItems } from '../helpers/resources.js'; diff --git a/packages/parameters/tests/e2e/secretsProvider.class.test.ts b/packages/parameters/tests/e2e/secretsProvider.class.test.ts index a5f0c539b3..9a8bffa9b7 100644 --- a/packages/parameters/tests/e2e/secretsProvider.class.test.ts +++ b/packages/parameters/tests/e2e/secretsProvider.class.test.ts @@ -6,9 +6,9 @@ import { invokeFunctionOnce, TestInvocationLogs, - TestNodejsFunction, TestStack, } from '@aws-lambda-powertools/testing-utils'; +import { TestNodejsFunction } from '@aws-lambda-powertools/testing-utils/resources/lambda'; import { SecretValue } from 'aws-cdk-lib'; import { join } from 'node:path'; import { TestSecret } from '../helpers/resources.js'; diff --git a/packages/parameters/tests/e2e/ssmProvider.class.test.ts b/packages/parameters/tests/e2e/ssmProvider.class.test.ts index 9af29e8315..f6fb8ed858 100644 --- a/packages/parameters/tests/e2e/ssmProvider.class.test.ts +++ b/packages/parameters/tests/e2e/ssmProvider.class.test.ts @@ -6,9 +6,9 @@ import { invokeFunctionOnce, TestInvocationLogs, - TestNodejsFunction, TestStack, } from '@aws-lambda-powertools/testing-utils'; +import { TestNodejsFunction } from '@aws-lambda-powertools/testing-utils/resources/lambda'; import { join } from 'node:path'; import { TestSecureStringParameter, diff --git a/packages/parameters/tests/helpers/resources.ts b/packages/parameters/tests/helpers/resources.ts index 0be54d8db4..424065961c 100644 --- a/packages/parameters/tests/helpers/resources.ts +++ b/packages/parameters/tests/helpers/resources.ts @@ -1,15 +1,15 @@ import type { ExtraTestProps, TestDynamodbTableProps, - TestStack, -} from '@aws-lambda-powertools/testing-utils'; +} from '@aws-lambda-powertools/testing-utils/types'; import { concatenateResourceName, getRuntimeKey, getArchitectureKey, - TestDynamodbTable, - TestNodejsFunction, + type TestStack, } from '@aws-lambda-powertools/testing-utils'; +import { TestNodejsFunction } from '@aws-lambda-powertools/testing-utils/resources/lambda'; +import { TestDynamodbTable } from '@aws-lambda-powertools/testing-utils/resources/dynamodb'; import { marshall } from '@aws-sdk/util-dynamodb'; import { CfnOutput, Stack } from 'aws-cdk-lib'; import { diff --git a/packages/testing/jest.config.js b/packages/testing/jest.config.cjs similarity index 93% rename from packages/testing/jest.config.js rename to packages/testing/jest.config.cjs index 6d6c2fecf2..f13ab92dfd 100644 --- a/packages/testing/jest.config.js +++ b/packages/testing/jest.config.cjs @@ -5,6 +5,9 @@ module.exports = { }, runner: 'groups', preset: 'ts-jest', + moduleNameMapper: { + '^(\\.{1,2}/.*)\\.js$': '$1', + }, transform: { '^.+\\.ts?$': 'ts-jest', }, diff --git a/packages/testing/package.json b/packages/testing/package.json index d73426de50..7c28586b3a 100644 --- a/packages/testing/package.json +++ b/packages/testing/package.json @@ -12,11 +12,13 @@ "test:unit": "jest --group=unit --detectOpenHandles --verbose", "test:e2e": "echo 'Not implemented'", "watch": "jest --watch", - "build": "tsc --build --force", + "build:cjs": "tsc --build --force && echo '{ \"type\": \"commonjs\" }' > lib/cjs/package.json", + "build:esm": "tsc --project tsconfig.esm.json && echo '{ \"type\": \"module\" }' > lib/esm/package.json", + "build": "npm run build:esm & npm run build:cjs", "lint": "eslint --ext .ts,.js --no-error-on-unmatched-pattern .", "lint-fix": "eslint --fix --ext .ts,.js --no-error-on-unmatched-pattern .", "prebuild": "rimraf ./lib", - "prepack": "node ../../.github/scripts/release_patch_package_json.js ." + "prepack": "rimraf ./lib/*.tsbuildinfo && node ../../.github/scripts/release_patch_package_json.js ." }, "lint-staged": { "*.{js,ts}": "npm run lint-fix" @@ -28,8 +30,57 @@ "files": [ "lib" ], - "main": "./lib/index.js", - "types": "./lib/index.d.ts", + "type": "module", + "exports": { + ".": { + "require": { + "types": "./lib/cjs/index.d.ts", + "default": "./lib/cjs/index.js" + }, + "import": { + "types": "./lib/esm/index.d.ts", + "default": "./lib/esm/index.js" + } + }, + "./resources/lambda": { + "import": "./lib/esm/resources/TestNodejsFunction.js", + "require": "./lib/cjs/resources/TestNodejsFunction.js" + }, + "./resources/dynamodb": { + "import": "./lib/esm/resources/TestDynamodbTable.js", + "require": "./lib/cjs/resources/TestDynamodbTable.js" + }, + "./context": { + "import": "./lib/esm/context.js", + "require": "./lib/cjs/context.js" + }, + "./types": { + "import": "./lib/esm/types.js", + "require": "./lib/cjs/types.js" + } + }, + "typesVersions": { + "*": { + "resources/lambda": [ + "lib/cjs/resources/TestNodejsFunction.d.ts", + "lib/esm/resources/TestNodejsFunction.d.ts" + ], + "resources/dynamodb": [ + "lib/cjs/resources/TestDynamodbTable.d.ts", + "lib/esm/resources/TestDynamodbTable.d.ts" + ], + "types": [ + "lib/cjs/types.d.ts", + "lib/esm/types.d.ts" + ], + "context": [ + "lib/cjs/context.d.ts", + "lib/esm/context.d.ts" + ] + } + }, + "types": "./lib/cjs/index.d.ts", + "main": "./lib/cjs/index.js", "keywords": [ "aws", "lambda", diff --git a/packages/testing/src/TestInvocationLogs.ts b/packages/testing/src/TestInvocationLogs.ts index fa396c98eb..8c37d73a56 100644 --- a/packages/testing/src/TestInvocationLogs.ts +++ b/packages/testing/src/TestInvocationLogs.ts @@ -1,26 +1,8 @@ -/** - * Log level. used for filtering the log - */ -const Level = { - DEBUG: 'DEBUG', - INFO: 'INFO', - WARN: 'WARN', - ERROR: 'ERROR', -} as const; - -type ErrorField = { - name: string; - message: string; - stack: string; -}; - -type FunctionLog = { - level: keyof typeof Level; - error: ErrorField; -} & { [key: string]: unknown }; +import { LogLevel } from './constants.js'; +import type { FunctionLog } from './types.js'; class TestInvocationLogs { - public static LEVEL = Level; + public static LEVEL = LogLevel; /** * Array of logs from invocation. @@ -51,7 +33,7 @@ class TestInvocationLogs { */ public doesAnyFunctionLogsContains( text: string, - levelToFilter?: keyof typeof Level + levelToFilter?: keyof typeof LogLevel ): boolean { const filteredLogs = this.getFunctionLogs(levelToFilter).filter((log) => log.includes(text) @@ -81,10 +63,10 @@ class TestInvocationLogs { * Return only logs from function, exclude START, END, REPORT, * and X-Ray log generated by the Lambda service. * - * @param {typeof Level} [levelToFilter] - Level to filter the logs + * @param {typeof LogLevel} [levelToFilter] - Level to filter the logs * @returns Array of function logs, filtered by level if provided */ - public getFunctionLogs(levelToFilter?: keyof typeof Level): string[] { + public getFunctionLogs(levelToFilter?: keyof typeof LogLevel): string[] { const startLogIndex = TestInvocationLogs.getStartLogIndex(this.logs); const endLogIndex = TestInvocationLogs.getEndLogIndex(this.logs); let filteredLogs = this.logs.slice(startLogIndex + 1, endLogIndex); @@ -97,7 +79,9 @@ class TestInvocationLogs { return parsedLog.level == levelToFilter; } catch (error) { // If log is not from structured logging : such as metrics one. - return (log.split('\t')[2] as keyof typeof Level) === levelToFilter; + return ( + (log.split('\t')[2] as keyof typeof LogLevel) === levelToFilter + ); } }); } diff --git a/packages/testing/src/TestStack.ts b/packages/testing/src/TestStack.ts index 952f00a5a4..3e5d32da20 100644 --- a/packages/testing/src/TestStack.ts +++ b/packages/testing/src/TestStack.ts @@ -4,35 +4,8 @@ import { readFile } from 'node:fs/promises'; import { App, Stack } from 'aws-cdk-lib'; import { AwsCdkCli, RequireApproval } from '@aws-cdk/cli-lib-alpha'; import type { ICloudAssemblyDirectoryProducer } from '@aws-cdk/cli-lib-alpha'; -import { generateTestUniqueName } from './helpers'; - -type StackNameProps = { - /** - * Prefix for the stack name. - */ - stackNamePrefix: string; - /** - * Name of the test. - */ - testName: string; -}; - -interface TestStackProps { - /** - * Name of the test stack. - */ - stackNameProps: StackNameProps; - /** - * Reference to the AWS CDK App object. - * @default new App() - */ - app?: App; - /** - * Reference to the AWS CDK Stack object. - * @default new Stack(this.app, stackName) - */ - stack?: Stack; -} +import { generateTestUniqueName } from './helpers.js'; +import type { TestStackProps } from './types.js'; /** * Test stack that can be deployed to the selected environment. diff --git a/packages/testing/src/constants.ts b/packages/testing/src/constants.ts index 4c4f8cb511..66b7bb2466 100644 --- a/packages/testing/src/constants.ts +++ b/packages/testing/src/constants.ts @@ -26,9 +26,20 @@ const TEST_ARCHITECTURES = { arm64: Architecture.ARM_64, } as const; +/** + * Log level. used for filtering the log + */ +const LogLevel = { + DEBUG: 'DEBUG', + INFO: 'INFO', + WARN: 'WARN', + ERROR: 'ERROR', +} as const; + export { TEST_RUNTIMES, defaultRuntime, TEST_ARCHITECTURES, defaultArchitecture, + LogLevel, }; diff --git a/packages/commons/src/samples/resources/contexts/hello-world.ts b/packages/testing/src/context.ts similarity index 89% rename from packages/commons/src/samples/resources/contexts/hello-world.ts rename to packages/testing/src/context.ts index 2dccd0cc8b..59ebe833d8 100644 --- a/packages/commons/src/samples/resources/contexts/hello-world.ts +++ b/packages/testing/src/context.ts @@ -1,6 +1,6 @@ import type { Context } from 'aws-lambda'; -const helloworldContext: Context = { +export default { callbackWaitsForEmptyEventLoop: true, functionVersion: '$LATEST', functionName: 'foo-bar-function', @@ -14,6 +14,4 @@ const helloworldContext: Context = { done: () => console.log('Done!'), fail: () => console.log('Failed!'), succeed: () => console.log('Succeeded!'), -}; - -export { helloworldContext }; +} as const as Context; diff --git a/packages/testing/src/helpers.ts b/packages/testing/src/helpers.ts index ab1a0222e5..10d584d242 100644 --- a/packages/testing/src/helpers.ts +++ b/packages/testing/src/helpers.ts @@ -4,7 +4,7 @@ import { defaultRuntime, TEST_ARCHITECTURES, defaultArchitecture, -} from './constants'; +} from './constants.js'; const isValidRuntimeKey = ( runtime: string diff --git a/packages/testing/src/index.ts b/packages/testing/src/index.ts index 7c8276c774..89341279d2 100644 --- a/packages/testing/src/index.ts +++ b/packages/testing/src/index.ts @@ -1,6 +1,18 @@ -export * from './TestStack'; -export * from './constants'; -export * from './helpers'; -export * from './resources'; -export * from './invokeTestFunction'; -export * from './TestInvocationLogs'; +export { TestStack } from './TestStack.js'; +export { + TEST_RUNTIMES, + defaultRuntime, + TEST_ARCHITECTURES, + defaultArchitecture, + LogLevel, +} from './constants.js'; +export { + isValidRuntimeKey, + getRuntimeKey, + generateTestUniqueName, + concatenateResourceName, + findAndGetStackOutputValue, + getArchitectureKey, +} from './helpers.js'; +export { invokeFunction, invokeFunctionOnce } from './invokeTestFunction.js'; +export { TestInvocationLogs } from './TestInvocationLogs.js'; diff --git a/packages/testing/src/invokeTestFunction.ts b/packages/testing/src/invokeTestFunction.ts index 4b333d756d..8ff4099109 100644 --- a/packages/testing/src/invokeTestFunction.ts +++ b/packages/testing/src/invokeTestFunction.ts @@ -1,13 +1,7 @@ import { InvokeCommand, LambdaClient } from '@aws-sdk/client-lambda'; import { fromUtf8 } from '@smithy/util-utf8'; -import { TestInvocationLogs } from './TestInvocationLogs'; - -type InvokeTestFunctionOptions = { - functionName: string; - times?: number; - invocationMode?: 'PARALLEL' | 'SEQUENTIAL'; - payload?: Record | Array>; -}; +import { TestInvocationLogs } from './TestInvocationLogs.js'; +import type { InvokeTestFunctionOptions } from './types.js'; const lambdaClient = new LambdaClient({}); diff --git a/packages/testing/src/resources/TestDynamodbTable.ts b/packages/testing/src/resources/TestDynamodbTable.ts index 2aa663639a..3717f54ad1 100644 --- a/packages/testing/src/resources/TestDynamodbTable.ts +++ b/packages/testing/src/resources/TestDynamodbTable.ts @@ -1,9 +1,9 @@ import { CfnOutput, RemovalPolicy } from 'aws-cdk-lib'; import { AttributeType, BillingMode, Table } from 'aws-cdk-lib/aws-dynamodb'; import { randomUUID } from 'node:crypto'; -import { concatenateResourceName } from '../helpers'; -import type { TestStack } from '../TestStack'; -import type { TestDynamodbTableProps, ExtraTestProps } from './types'; +import { concatenateResourceName } from '../helpers.js'; +import type { TestStack } from '../TestStack.js'; +import type { TestDynamodbTableProps, ExtraTestProps } from '../types.js'; /** * A DynamoDB Table that can be used in tests. @@ -36,4 +36,4 @@ class TestDynamodbTable extends Table { } } -export { TestDynamodbTable, TestDynamodbTableProps }; +export { TestDynamodbTable }; diff --git a/packages/testing/src/resources/TestNodejsFunction.ts b/packages/testing/src/resources/TestNodejsFunction.ts index 8ee0ed2f6b..5be3597caa 100644 --- a/packages/testing/src/resources/TestNodejsFunction.ts +++ b/packages/testing/src/resources/TestNodejsFunction.ts @@ -3,14 +3,14 @@ import { Tracing } from 'aws-cdk-lib/aws-lambda'; import { NodejsFunction } from 'aws-cdk-lib/aws-lambda-nodejs'; import { RetentionDays } from 'aws-cdk-lib/aws-logs'; import { randomUUID } from 'node:crypto'; -import { TEST_RUNTIMES, TEST_ARCHITECTURES } from '../constants'; +import { TEST_RUNTIMES, TEST_ARCHITECTURES } from '../constants.js'; import { concatenateResourceName, getRuntimeKey, getArchitectureKey, -} from '../helpers'; -import type { TestStack } from '../TestStack'; -import type { ExtraTestProps, TestNodejsFunctionProps } from './types'; +} from '../helpers.js'; +import type { TestStack } from '../TestStack.js'; +import type { ExtraTestProps, TestNodejsFunctionProps } from '../types.js'; /** * A NodejsFunction that can be used in tests. @@ -43,4 +43,4 @@ class TestNodejsFunction extends NodejsFunction { } } -export { ExtraTestProps, TestNodejsFunction, TestNodejsFunctionProps }; +export { TestNodejsFunction }; diff --git a/packages/testing/src/resources/index.ts b/packages/testing/src/resources/index.ts deleted file mode 100644 index ce4b5bbc26..0000000000 --- a/packages/testing/src/resources/index.ts +++ /dev/null @@ -1,2 +0,0 @@ -export * from './TestNodejsFunction'; -export * from './TestDynamodbTable'; diff --git a/packages/testing/src/resources/types.ts b/packages/testing/src/resources/types.ts deleted file mode 100644 index 5596a08f31..0000000000 --- a/packages/testing/src/resources/types.ts +++ /dev/null @@ -1,31 +0,0 @@ -import type { TableProps, AttributeType } from 'aws-cdk-lib/aws-dynamodb'; -import type { NodejsFunctionProps } from 'aws-cdk-lib/aws-lambda-nodejs'; - -interface ExtraTestProps { - /** - * The suffix to be added to the resource name. - * - * For example, if the resource name is `fn-12345` and the suffix is `BasicFeatures`, - * the output will be `fn-12345-BasicFeatures`. - * - * Note that the maximum length of the name is 64 characters, so the suffix might be truncated. - */ - nameSuffix: string; -} - -type TestDynamodbTableProps = Omit< - TableProps, - 'removalPolicy' | 'tableName' | 'billingMode' | 'partitionKey' -> & { - partitionKey?: { - name: string; - type: AttributeType; - }; -}; - -type TestNodejsFunctionProps = Omit< - NodejsFunctionProps, - 'logRetention' | 'runtime' | 'functionName' ->; - -export { ExtraTestProps, TestDynamodbTableProps, TestNodejsFunctionProps }; diff --git a/packages/testing/src/types.ts b/packages/testing/src/types.ts new file mode 100644 index 0000000000..ef38cb5347 --- /dev/null +++ b/packages/testing/src/types.ts @@ -0,0 +1,88 @@ +import type { TableProps, AttributeType } from 'aws-cdk-lib/aws-dynamodb'; +import type { NodejsFunctionProps } from 'aws-cdk-lib/aws-lambda-nodejs'; +import type { App, Stack } from 'aws-cdk-lib'; +import { LogLevel } from './constants.js'; + +interface ExtraTestProps { + /** + * The suffix to be added to the resource name. + * + * For example, if the resource name is `fn-12345` and the suffix is `BasicFeatures`, + * the output will be `fn-12345-BasicFeatures`. + * + * Note that the maximum length of the name is 64 characters, so the suffix might be truncated. + */ + nameSuffix: string; +} + +type TestDynamodbTableProps = Omit< + TableProps, + 'removalPolicy' | 'tableName' | 'billingMode' | 'partitionKey' +> & { + partitionKey?: { + name: string; + type: AttributeType; + }; +}; + +type TestNodejsFunctionProps = Omit< + NodejsFunctionProps, + 'logRetention' | 'runtime' | 'functionName' +>; + +type InvokeTestFunctionOptions = { + functionName: string; + times?: number; + invocationMode?: 'PARALLEL' | 'SEQUENTIAL'; + payload?: Record | Array>; +}; + +type ErrorField = { + name: string; + message: string; + stack: string; +}; + +type FunctionLog = { + level: keyof typeof LogLevel; + error: ErrorField; +} & { [key: string]: unknown }; + +type StackNameProps = { + /** + * Prefix for the stack name. + */ + stackNamePrefix: string; + /** + * Name of the test. + */ + testName: string; +}; + +interface TestStackProps { + /** + * Name of the test stack. + */ + stackNameProps: StackNameProps; + /** + * Reference to the AWS CDK App object. + * @default new App() + */ + app?: App; + /** + * Reference to the AWS CDK Stack object. + * @default new Stack(this.app, stackName) + */ + stack?: Stack; +} + +export { + ExtraTestProps, + TestDynamodbTableProps, + TestNodejsFunctionProps, + InvokeTestFunctionOptions, + ErrorField, + FunctionLog, + StackNameProps, + TestStackProps, +}; diff --git a/packages/testing/tests/unit/TestInvocationLogs.test.ts b/packages/testing/tests/unit/TestInvocationLogs.test.ts index c81a05b0b0..33c4e46968 100644 --- a/packages/testing/tests/unit/TestInvocationLogs.test.ts +++ b/packages/testing/tests/unit/TestInvocationLogs.test.ts @@ -5,7 +5,7 @@ * */ -import { TestInvocationLogs } from '../../src/TestInvocationLogs'; +import { TestInvocationLogs } from '../../src/TestInvocationLogs.js'; const exampleLogs = `START RequestId: c6af9ac6-7b61-11e6-9a41-93e812345678 Version: $LATEST {"cold_start":true,"function_arn":"arn:aws:lambda:eu-west-1:561912387782:function:loggerMiddyStandardFeatures-c555a2ec-1121-4586-9c04-185ab36ea34c","function_memory_size":128,"function_name":"loggerMiddyStandardFeatures-c555a2ec-1121-4586-9c04-185ab36ea34c","function_request_id":"7f586697-238a-4c3b-9250-a5f057c1119c","level":"DEBUG","message":"This is a DEBUG log but contains the word INFO some context and persistent key","service":"logger-e2e-testing","timestamp":"2022-01-27T16:04:39.323Z","persistentKey":"works"} diff --git a/packages/testing/tsconfig.esm.json b/packages/testing/tsconfig.esm.json new file mode 100644 index 0000000000..9bed8e4da4 --- /dev/null +++ b/packages/testing/tsconfig.esm.json @@ -0,0 +1,11 @@ +{ + "extends": "../../tsconfig.esm.json", + "compilerOptions": { + "baseUrl": ".", + "outDir": "./lib/esm", + "rootDir": "./src" + }, + "include": [ + "./src/**/*" + ] +} \ No newline at end of file diff --git a/packages/testing/tsconfig.json b/packages/testing/tsconfig.json index 1cb9d72773..a30fdead42 100644 --- a/packages/testing/tsconfig.json +++ b/packages/testing/tsconfig.json @@ -1,7 +1,7 @@ { "extends": "../../tsconfig.json", "compilerOptions": { - "outDir": "./lib", + "outDir": "./lib/cjs", "rootDir": "./src", }, "include": [ diff --git a/packages/tracer/tests/e2e/allFeatures.decorator.test.ts b/packages/tracer/tests/e2e/allFeatures.decorator.test.ts index 2ec65d83b3..7c9d3fb251 100644 --- a/packages/tracer/tests/e2e/allFeatures.decorator.test.ts +++ b/packages/tracer/tests/e2e/allFeatures.decorator.test.ts @@ -3,10 +3,8 @@ * * @group e2e/tracer/decorator */ -import { - TestStack, - TestDynamodbTable, -} from '@aws-lambda-powertools/testing-utils'; +import { TestStack } from '@aws-lambda-powertools/testing-utils'; +import { TestDynamodbTable } from '@aws-lambda-powertools/testing-utils/resources/dynamodb'; import { join } from 'node:path'; import { TracerTestNodejsFunction } from '../helpers/resources'; import { diff --git a/packages/tracer/tests/e2e/allFeatures.manual.test.ts b/packages/tracer/tests/e2e/allFeatures.manual.test.ts index 3374205e67..98f4767501 100644 --- a/packages/tracer/tests/e2e/allFeatures.manual.test.ts +++ b/packages/tracer/tests/e2e/allFeatures.manual.test.ts @@ -3,10 +3,8 @@ * * @group e2e/tracer/manual */ -import { - TestDynamodbTable, - TestStack, -} from '@aws-lambda-powertools/testing-utils'; +import { TestStack } from '@aws-lambda-powertools/testing-utils'; +import { TestDynamodbTable } from '@aws-lambda-powertools/testing-utils/resources/dynamodb'; import { join } from 'path'; import { TracerTestNodejsFunction } from '../helpers/resources'; import { diff --git a/packages/tracer/tests/e2e/allFeatures.middy.test.ts b/packages/tracer/tests/e2e/allFeatures.middy.test.ts index 5f8f965d8c..cb7603928e 100644 --- a/packages/tracer/tests/e2e/allFeatures.middy.test.ts +++ b/packages/tracer/tests/e2e/allFeatures.middy.test.ts @@ -3,10 +3,8 @@ * * @group e2e/tracer/middy */ -import { - TestStack, - TestDynamodbTable, -} from '@aws-lambda-powertools/testing-utils'; +import { TestStack } from '@aws-lambda-powertools/testing-utils'; +import { TestDynamodbTable } from '@aws-lambda-powertools/testing-utils/resources/dynamodb'; import { join } from 'node:path'; import { TracerTestNodejsFunction } from '../helpers/resources'; import { diff --git a/packages/tracer/tests/e2e/asyncHandler.decorator.test.ts b/packages/tracer/tests/e2e/asyncHandler.decorator.test.ts index f97f9d2f77..dcd4982616 100644 --- a/packages/tracer/tests/e2e/asyncHandler.decorator.test.ts +++ b/packages/tracer/tests/e2e/asyncHandler.decorator.test.ts @@ -3,10 +3,8 @@ * * @group e2e/tracer/decorator-async-handler */ -import { - TestStack, - TestDynamodbTable, -} from '@aws-lambda-powertools/testing-utils'; +import { TestStack } from '@aws-lambda-powertools/testing-utils'; +import { TestDynamodbTable } from '@aws-lambda-powertools/testing-utils/resources/dynamodb'; import { join } from 'node:path'; import { TracerTestNodejsFunction } from '../helpers/resources'; import { diff --git a/packages/tracer/tests/helpers/resources.ts b/packages/tracer/tests/helpers/resources.ts index 6f46cb98d6..4dc61ead4b 100644 --- a/packages/tracer/tests/helpers/resources.ts +++ b/packages/tracer/tests/helpers/resources.ts @@ -1,9 +1,9 @@ +import type { TestStack } from '@aws-lambda-powertools/testing-utils'; import type { ExtraTestProps, TestNodejsFunctionProps, - TestStack, -} from '@aws-lambda-powertools/testing-utils'; -import { TestNodejsFunction } from '@aws-lambda-powertools/testing-utils'; +} from '@aws-lambda-powertools/testing-utils/types'; +import { TestNodejsFunction } from '@aws-lambda-powertools/testing-utils/resources/lambda'; import { commonEnvironmentVars } from '../e2e/constants'; class TracerTestNodejsFunction extends TestNodejsFunction { diff --git a/packages/tracer/tests/unit/Tracer.test.ts b/packages/tracer/tests/unit/Tracer.test.ts index f83aaf9240..a6381d4fac 100644 --- a/packages/tracer/tests/unit/Tracer.test.ts +++ b/packages/tracer/tests/unit/Tracer.test.ts @@ -3,10 +3,7 @@ * * @group unit/tracer/all */ -import { - ContextExamples as dummyContext, - Events as dummyEvent, -} from '@aws-lambda-powertools/commons'; +import context from '@aws-lambda-powertools/testing-utils/context'; import type { LambdaInterface } from '@aws-lambda-powertools/commons/types'; import { Tracer } from './../../src'; import type { Callback, Context } from 'aws-lambda/handler'; @@ -48,8 +45,10 @@ jest.spyOn(console, 'error').mockImplementation(() => null); describe('Class: Tracer', () => { const ENVIRONMENT_VARIABLES = process.env; - const context = dummyContext.helloworldContext; - const event = dummyEvent.Custom.CustomEvent; + const event = { + foo: 'bar', + bar: 'baz', + }; beforeEach(() => { jest.clearAllMocks(); diff --git a/packages/tracer/tests/unit/middy.test.ts b/packages/tracer/tests/unit/middy.test.ts index fe717e656b..8195d89392 100644 --- a/packages/tracer/tests/unit/middy.test.ts +++ b/packages/tracer/tests/unit/middy.test.ts @@ -13,6 +13,7 @@ import { Subsegment, } from 'aws-xray-sdk-core'; import { cleanupMiddlewares } from '@aws-lambda-powertools/commons'; +import context from '@aws-lambda-powertools/testing-utils/context'; jest.spyOn(console, 'debug').mockImplementation(() => null); jest.spyOn(console, 'warn').mockImplementation(() => null); @@ -20,21 +21,6 @@ jest.spyOn(console, 'error').mockImplementation(() => null); describe('Middy middleware', () => { const ENVIRONMENT_VARIABLES = process.env; - const context = { - callbackWaitsForEmptyEventLoop: true, - functionVersion: '$LATEST', - functionName: 'foo-bar-function', - memoryLimitInMB: '128', - logGroupName: '/aws/lambda/foo-bar-function-123456abcdef', - logStreamName: '2021/03/09/[$LATEST]abcdef123456abcdef123456abcdef123456', - invokedFunctionArn: - 'arn:aws:lambda:eu-west-1:123456789012:function:Example', - awsRequestId: 'c6af9ac6-7b61-11e6-9a41-93e8deadbeef', - getRemainingTimeInMillis: () => 1234, - done: () => console.log('Done!'), - fail: () => console.log('Failed!'), - succeed: () => console.log('Succeeded!'), - }; beforeEach(() => { jest.clearAllMocks(); From e5e42d0e0b6f340b2928539d053b2ce8e9297aaf Mon Sep 17 00:00:00 2001 From: Andrea Amorosi Date: Thu, 12 Oct 2023 15:54:46 +0200 Subject: [PATCH 18/60] feat(metrics): add esmodule support (#1739) --- examples/cdk/functions/get-all-items.ts | 2 +- examples/sam/src/get-all-items.ts | 2 +- layers/tests/e2e/layerPublisher.test.ts | 2 +- packages/commons/src/types/LambdaInterface.ts | 10 +- packages/commons/src/types/index.ts | 17 +- .../{jest.config.js => jest.config.cjs} | 5 +- packages/metrics/package.json | 43 ++++- packages/metrics/src/Metrics.ts | 61 +++--- .../src/config/EnvironmentVariablesService.ts | 2 +- packages/metrics/src/config/index.ts | 2 - packages/metrics/src/constants.ts | 36 ++++ packages/metrics/src/index.ts | 5 +- packages/metrics/src/middleware/index.ts | 1 - packages/metrics/src/middleware/middy.ts | 4 +- .../ConfigServiceInterface.ts | 0 .../metrics/src/types/MetricResolution.ts | 9 - packages/metrics/src/types/MetricUnit.ts | 85 -------- packages/metrics/src/types/Metrics.ts | 27 +-- .../src/{ => types}/MetricsInterface.ts | 12 +- packages/metrics/src/types/index.ts | 16 +- ...sicFeatures.decorator.test.functionCode.ts | 9 +- .../basicFeatures.manual.test.functionCode.ts | 9 +- .../metrics/tests/helpers/metricsUtils.ts | 8 +- packages/metrics/tests/helpers/resources.ts | 2 +- packages/metrics/tests/unit/Metrics.test.ts | 181 +++++++++--------- .../tests/unit/middleware/middy.test.ts | 26 ++- packages/metrics/tsconfig.esm.json | 11 ++ packages/metrics/tsconfig.json | 2 +- 28 files changed, 293 insertions(+), 296 deletions(-) rename packages/metrics/{jest.config.js => jest.config.cjs} (86%) delete mode 100644 packages/metrics/src/config/index.ts delete mode 100644 packages/metrics/src/middleware/index.ts rename packages/metrics/src/{config => types}/ConfigServiceInterface.ts (100%) delete mode 100644 packages/metrics/src/types/MetricResolution.ts delete mode 100644 packages/metrics/src/types/MetricUnit.ts rename packages/metrics/src/{ => types}/MetricsInterface.ts (81%) create mode 100644 packages/metrics/tsconfig.esm.json diff --git a/examples/cdk/functions/get-all-items.ts b/examples/cdk/functions/get-all-items.ts index a31269d7a2..f4479b6806 100644 --- a/examples/cdk/functions/get-all-items.ts +++ b/examples/cdk/functions/get-all-items.ts @@ -1,5 +1,5 @@ import { injectLambdaContext } from '@aws-lambda-powertools/logger/middleware'; -import { logMetrics } from '@aws-lambda-powertools/metrics'; +import { logMetrics } from '@aws-lambda-powertools/metrics/middleware'; import { captureLambdaHandler } from '@aws-lambda-powertools/tracer'; import { ScanCommand } from '@aws-sdk/lib-dynamodb'; import middy from '@middy/core'; diff --git a/examples/sam/src/get-all-items.ts b/examples/sam/src/get-all-items.ts index 6984c2d54d..125da137c9 100644 --- a/examples/sam/src/get-all-items.ts +++ b/examples/sam/src/get-all-items.ts @@ -6,7 +6,7 @@ import { import middy from '@middy/core'; import { tableName } from './common/constants'; import { logger, tracer, metrics } from './common/powertools'; -import { logMetrics } from '@aws-lambda-powertools/metrics'; +import { logMetrics } from '@aws-lambda-powertools/metrics/middleware'; import { injectLambdaContext } from '@aws-lambda-powertools/logger/middleware'; import { captureLambdaHandler } from '@aws-lambda-powertools/tracer'; import { docClient } from './common/dynamodb-client'; diff --git a/layers/tests/e2e/layerPublisher.test.ts b/layers/tests/e2e/layerPublisher.test.ts index 09aebc671d..560015eee5 100644 --- a/layers/tests/e2e/layerPublisher.test.ts +++ b/layers/tests/e2e/layerPublisher.test.ts @@ -7,12 +7,12 @@ import { App } from 'aws-cdk-lib'; import { LayerVersion } from 'aws-cdk-lib/aws-lambda'; import { LayerPublisherStack } from '../../src/layer-publisher-stack'; import { - TestNodejsFunction, TestStack, TestInvocationLogs, invokeFunctionOnce, generateTestUniqueName, } from '@aws-lambda-powertools/testing-utils'; +import { TestNodejsFunction } from '@aws-lambda-powertools/testing-utils/resources/lambda'; import { RESOURCE_NAME_PREFIX, SETUP_TIMEOUT, diff --git a/packages/commons/src/types/LambdaInterface.ts b/packages/commons/src/types/LambdaInterface.ts index 0871d433f9..38a55cdb48 100644 --- a/packages/commons/src/types/LambdaInterface.ts +++ b/packages/commons/src/types/LambdaInterface.ts @@ -15,4 +15,12 @@ interface LambdaInterface { handler: SyncHandler | AsyncHandler; } -export { LambdaInterface }; +type HandlerMethodDecorator = ( + target: LambdaInterface, + propertyKey: string | symbol, + descriptor: + | TypedPropertyDescriptor> + | TypedPropertyDescriptor> +) => void; + +export { LambdaInterface, HandlerMethodDecorator }; diff --git a/packages/commons/src/types/index.ts b/packages/commons/src/types/index.ts index a3f660eeda..115abe81fb 100644 --- a/packages/commons/src/types/index.ts +++ b/packages/commons/src/types/index.ts @@ -1,4 +1,13 @@ -export * from './middy.js'; -export * from './awsSdk.js'; -export * from './json.js'; -export * from './LambdaInterface.js'; +export { + MiddlewareLikeObj, + MiddyLikeRequest, + CleanupFunction, +} from './middy.js'; +export { SdkClient, MiddlewareArgsLike } from './awsSdk.js'; +export { JSONPrimitive, JSONValue, JSONObject, JSONArray } from './json.js'; +export { + SyncHandler, + AsyncHandler, + LambdaInterface, + HandlerMethodDecorator, +} from './LambdaInterface.js'; diff --git a/packages/metrics/jest.config.js b/packages/metrics/jest.config.cjs similarity index 86% rename from packages/metrics/jest.config.js rename to packages/metrics/jest.config.cjs index 3c1879fc3b..073bb4ee90 100644 --- a/packages/metrics/jest.config.js +++ b/packages/metrics/jest.config.cjs @@ -5,6 +5,9 @@ module.exports = { }, runner: 'groups', preset: 'ts-jest', + moduleNameMapper: { + '^(\\.{1,2}/.*)\\.js$': '$1', + }, transform: { '^.+\\.ts?$': 'ts-jest', }, @@ -14,7 +17,7 @@ module.exports = { roots: ['/src', '/tests'], testPathIgnorePatterns: ['/node_modules/'], testEnvironment: 'node', - coveragePathIgnorePatterns: ['/node_modules/'], + coveragePathIgnorePatterns: ['/node_modules/', '/types/'], coverageThreshold: { global: { statements: 100, diff --git a/packages/metrics/package.json b/packages/metrics/package.json index c363d98587..25fe12facc 100644 --- a/packages/metrics/package.json +++ b/packages/metrics/package.json @@ -16,19 +16,54 @@ "test:e2e:nodejs18x": "RUNTIME=nodejs18x jest --group=e2e", "test:e2e": "jest --group=e2e", "watch": "jest --group=unit --watch ", - "build": "tsc --build --force", + "build:cjs": "tsc --build --force && echo '{ \"type\": \"commonjs\" }' > lib/cjs/package.json", + "build:esm": "tsc --project tsconfig.esm.json && echo '{ \"type\": \"module\" }' > lib/esm/package.json", + "build": "npm run build:esm & npm run build:cjs", "lint": "eslint --ext .ts,.js --no-error-on-unmatched-pattern .", "lint-fix": "eslint --fix --ext .ts,.js --no-error-on-unmatched-pattern .", "prebuild": "rimraf ./lib", - "prepack": "node ../../.github/scripts/release_patch_package_json.js ." + "prepack": "rimraf ./lib/*.tsbuildinfo && node ../../.github/scripts/release_patch_package_json.js ." }, "lint-staged": { "*.{js,ts}": "npm run lint-fix" }, "homepage": "https://github.com/aws-powertools/powertools-lambda-typescript/tree/main/packages/metrics#readme", "license": "MIT-0", - "main": "./lib/index.js", - "types": "./lib/index.d.ts", + "type": "module", + "exports": { + ".": { + "require": { + "types": "./lib/cjs/index.d.ts", + "default": "./lib/cjs/index.js" + }, + "import": { + "types": "./lib/esm/index.d.ts", + "default": "./lib/esm/index.js" + } + }, + "./middleware": { + "import": "./lib/esm/middleware/middy.js", + "require": "./lib/cjs/middleware/middy.js" + }, + "./types": { + "import": "./lib/esm/types/index.js", + "require": "./lib/cjs/types/index.js" + } + }, + "typesVersions": { + "*": { + "middleware": [ + "lib/cjs/middleware/middy.d.ts", + "lib/esm/middleware/middy.d.ts" + ], + "types": [ + "lib/cjs/types/index.d.ts", + "lib/esm/types/index.d.ts" + ] + } + }, + "types": "./lib/cjs/index.d.ts", + "main": "./lib/cjs/index.js", "devDependencies": { "@aws-lambda-powertools/testing-utils": "file:../testing", "@aws-sdk/client-cloudwatch": "^3.413.0", diff --git a/packages/metrics/src/Metrics.ts b/packages/metrics/src/Metrics.ts index b2a1c1e34e..a7a735097e 100644 --- a/packages/metrics/src/Metrics.ts +++ b/packages/metrics/src/Metrics.ts @@ -1,29 +1,28 @@ import type { Callback, Context, Handler } from 'aws-lambda'; import { Utility } from '@aws-lambda-powertools/commons'; -import type { MetricsInterface } from './MetricsInterface'; -import { - type ConfigServiceInterface, - EnvironmentVariablesService, -} from './config'; +import type { HandlerMethodDecorator } from '@aws-lambda-powertools/commons/types'; +import { EnvironmentVariablesService } from './config/EnvironmentVariablesService.js'; import { MAX_DIMENSION_COUNT, MAX_METRICS_SIZE, DEFAULT_NAMESPACE, COLD_START_METRIC, MAX_METRIC_VALUES_SIZE, -} from './constants'; + MetricUnit as MetricUnits, + MetricResolution as MetricResolutions, +} from './constants.js'; import { - MetricsOptions, - Dimensions, - EmfOutput, - HandlerMethodDecorator, - StoredMetrics, - ExtraOptions, - MetricUnit, - MetricUnits, - MetricResolution, - MetricDefinition, -} from './types'; + type MetricsOptions, + type Dimensions, + type EmfOutput, + type StoredMetrics, + type ExtraOptions, + type MetricDefinition, + type ConfigServiceInterface, + type MetricsInterface, + type MetricUnit, + type MetricResolution, +} from './types/index.js'; /** * ## Intro @@ -83,7 +82,7 @@ import { * @metrics.logMetrics({ captureColdStartMetric: true, throwOnEmptyMetrics: true }) * public handler(_event: any, _context: any): Promise { * // ... - * metrics.addMetric('test-metric', MetricUnits.Count, 10); + * metrics.addMetric('test-metric', MetricUnit.Count, 10); * // ... * } * } @@ -99,13 +98,13 @@ import { * @example * * ```typescript - * import { Metrics, MetricUnits } from '@aws-lambda-powertools/metrics'; + * import { Metrics, MetricUnit } from '@aws-lambda-powertools/metrics'; * * const metrics = new Metrics({ namespace: 'serverlessAirline', serviceName: 'orders' }); * * export const handler = async (_event: any, _context: any): Promise => { * metrics.captureColdStartMetric(); - * metrics.addMetric('test-metric', MetricUnits.Count, 10); + * metrics.addMetric('test-metric', MetricUnit.Count, 10); * metrics.publishStoredMetrics(); * }; * ``` @@ -188,15 +187,15 @@ class Metrics extends Utility implements MetricsInterface { * or when calling {@link Metrics.publishStoredMetrics}. * * You can add a metric by specifying the metric name, unit, and value. For convenience, - * we provide a set of constants for the most common units in {@link MetricUnits}. + * we provide a set of constants for the most common units in {@link MetricUnit}. * * @example * ```typescript - * import { Metrics, MetricUnits } from '@aws-lambda-powertools/metrics'; + * import { Metrics, MetricUnit } from '@aws-lambda-powertools/metrics'; * * const metrics = new Metrics({ namespace: 'serverlessAirline', serviceName: 'orders' }); * - * metrics.addMetric('successfulBooking', MetricUnits.Count, 1); + * metrics.addMetric('successfulBooking', MetricUnit.Count, 1); * ``` * * Optionally, you can specify the metric resolution, which can be either `High` or `Standard`. @@ -205,11 +204,11 @@ class Metrics extends Utility implements MetricsInterface { * * @example * ```typescript - * import { Metrics, MetricUnits, MetricResolution } from '@aws-lambda-powertools/metrics'; + * import { Metrics, MetricUnit, MetricResolution } from '@aws-lambda-powertools/metrics'; * * const metrics = new Metrics({ namespace: 'serverlessAirline', serviceName: 'orders' }); * - * metrics.addMetric('successfulBooking', MetricUnits.Count, 1, MetricResolution.High); + * metrics.addMetric('successfulBooking', MetricUnit.Count, 1, MetricResolution.High); * ``` * * @param name - The metric name @@ -221,7 +220,7 @@ class Metrics extends Utility implements MetricsInterface { name: string, unit: MetricUnit, value: number, - resolution: MetricResolution = MetricResolution.Standard + resolution: MetricResolution = MetricResolutions.Standard ): void { this.storeMetric(name, unit, value, resolution); if (this.isSingleMetric) this.publishStoredMetrics(); @@ -369,12 +368,12 @@ class Metrics extends Utility implements MetricsInterface { * @example * * ```typescript - * import { Metrics, MetricUnits } from '@aws-lambda-powertools/metrics'; + * import { Metrics, MetricUnit } from '@aws-lambda-powertools/metrics'; * * const metrics = new Metrics({ namespace: 'serverlessAirline', serviceName: 'orders' }); // Sets metric namespace, and service as a metric dimension * * export const handler = async (_event: any, _context: any): Promise => { - * metrics.addMetric('test-metric', MetricUnits.Count, 10); + * metrics.addMetric('test-metric', MetricUnit.Count, 10); * metrics.publishStoredMetrics(); * }; * ``` @@ -413,7 +412,7 @@ class Metrics extends Utility implements MetricsInterface { ).map((metricDefinition) => ({ Name: metricDefinition.name, Unit: metricDefinition.unit, - ...(metricDefinition.resolution === MetricResolution.High + ...(metricDefinition.resolution === MetricResolutions.High ? { StorageResolution: metricDefinition.resolution } : {}), })); @@ -499,7 +498,7 @@ class Metrics extends Utility implements MetricsInterface { * ```typescript * const singleMetric = metrics.singleMetric(); * singleMetric.addDimension('InnerDimension', 'true'); - * singleMetric.addMetric('single-metric', MetricUnits.Percent, 50); + * singleMetric.addMetric('single-metric', MetricUnit.Percent, 50); * ``` * * @returns the Metrics @@ -706,4 +705,4 @@ class Metrics extends Utility implements MetricsInterface { } } -export { Metrics, MetricUnits, MetricResolution }; +export { Metrics }; diff --git a/packages/metrics/src/config/EnvironmentVariablesService.ts b/packages/metrics/src/config/EnvironmentVariablesService.ts index 907036092d..290b70a571 100644 --- a/packages/metrics/src/config/EnvironmentVariablesService.ts +++ b/packages/metrics/src/config/EnvironmentVariablesService.ts @@ -1,4 +1,4 @@ -import type { ConfigServiceInterface } from './ConfigServiceInterface'; +import type { ConfigServiceInterface } from '../types/ConfigServiceInterface.js'; import { EnvironmentVariablesService as CommonEnvironmentVariablesService } from '@aws-lambda-powertools/commons'; class EnvironmentVariablesService diff --git a/packages/metrics/src/config/index.ts b/packages/metrics/src/config/index.ts deleted file mode 100644 index 11fd37677e..0000000000 --- a/packages/metrics/src/config/index.ts +++ /dev/null @@ -1,2 +0,0 @@ -export * from './ConfigServiceInterface'; -export * from './EnvironmentVariablesService'; diff --git a/packages/metrics/src/constants.ts b/packages/metrics/src/constants.ts index 5cdbf6a955..5dd25e2aee 100644 --- a/packages/metrics/src/constants.ts +++ b/packages/metrics/src/constants.ts @@ -4,10 +4,46 @@ const MAX_METRICS_SIZE = 100; const MAX_METRIC_VALUES_SIZE = 100; const MAX_DIMENSION_COUNT = 29; +const MetricUnit = { + Seconds: 'Seconds', + Microseconds: 'Microseconds', + Milliseconds: 'Milliseconds', + Bytes: 'Bytes', + Kilobytes: 'Kilobytes', + Megabytes: 'Megabytes', + Gigabytes: 'Gigabytes', + Terabytes: 'Terabytes', + Bits: 'Bits', + Kilobits: 'Kilobits', + Megabits: 'Megabits', + Gigabits: 'Gigabits', + Terabits: 'Terabits', + Percent: 'Percent', + Count: 'Count', + BytesPerSecond: 'Bytes/Second', + KilobytesPerSecond: 'Kilobytes/Second', + MegabytesPerSecond: 'Megabytes/Second', + GigabytesPerSecond: 'Gigabytes/Second', + TerabytesPerSecond: 'Terabytes/Second', + BitsPerSecond: 'Bits/Second', + KilobitsPerSecond: 'Kilobits/Second', + MegabitsPerSecond: 'Megabits/Second', + GigabitsPerSecond: 'Gigabits/Second', + TerabitsPerSecond: 'Terabits/Second', + CountPerSecond: 'Count/Second', +} as const; + +const MetricResolution = { + Standard: 60, + High: 1, +} as const; + export { COLD_START_METRIC, DEFAULT_NAMESPACE, MAX_METRICS_SIZE, MAX_METRIC_VALUES_SIZE, MAX_DIMENSION_COUNT, + MetricUnit, + MetricResolution, }; diff --git a/packages/metrics/src/index.ts b/packages/metrics/src/index.ts index 7af054bdae..3db8841fd4 100644 --- a/packages/metrics/src/index.ts +++ b/packages/metrics/src/index.ts @@ -1,3 +1,2 @@ -export * from './Metrics'; -export * from './MetricsInterface'; -export * from './middleware'; +export { Metrics } from './Metrics.js'; +export { MetricUnit, MetricResolution } from './constants.js'; diff --git a/packages/metrics/src/middleware/index.ts b/packages/metrics/src/middleware/index.ts deleted file mode 100644 index cfe9900b37..0000000000 --- a/packages/metrics/src/middleware/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './middy'; diff --git a/packages/metrics/src/middleware/middy.ts b/packages/metrics/src/middleware/middy.ts index 5a2bbbaec4..b5c2fa196c 100644 --- a/packages/metrics/src/middleware/middy.ts +++ b/packages/metrics/src/middleware/middy.ts @@ -1,6 +1,6 @@ import { METRICS_KEY } from '@aws-lambda-powertools/commons'; -import type { Metrics } from '../Metrics'; -import type { ExtraOptions } from '../types'; +import type { Metrics } from '../Metrics.js'; +import type { ExtraOptions } from '../types/Metrics.js'; import type { MiddlewareLikeObj, MiddyLikeRequest, diff --git a/packages/metrics/src/config/ConfigServiceInterface.ts b/packages/metrics/src/types/ConfigServiceInterface.ts similarity index 100% rename from packages/metrics/src/config/ConfigServiceInterface.ts rename to packages/metrics/src/types/ConfigServiceInterface.ts diff --git a/packages/metrics/src/types/MetricResolution.ts b/packages/metrics/src/types/MetricResolution.ts deleted file mode 100644 index 297025f3c2..0000000000 --- a/packages/metrics/src/types/MetricResolution.ts +++ /dev/null @@ -1,9 +0,0 @@ -const MetricResolution = { - Standard: 60, - High: 1, -} as const; - -type MetricResolution = - (typeof MetricResolution)[keyof typeof MetricResolution]; - -export { MetricResolution }; diff --git a/packages/metrics/src/types/MetricUnit.ts b/packages/metrics/src/types/MetricUnit.ts deleted file mode 100644 index ccbffac645..0000000000 --- a/packages/metrics/src/types/MetricUnit.ts +++ /dev/null @@ -1,85 +0,0 @@ -enum MetricUnits { - Seconds = 'Seconds', - Microseconds = 'Microseconds', - Milliseconds = 'Milliseconds', - Bytes = 'Bytes', - Kilobytes = 'Kilobytes', - Megabytes = 'Megabytes', - Gigabytes = 'Gigabytes', - Terabytes = 'Terabytes', - Bits = 'Bits', - Kilobits = 'Kilobits', - Megabits = 'Megabits', - Gigabits = 'Gigabits', - Terabits = 'Terabits', - Percent = 'Percent', - Count = 'Count', - BytesPerSecond = 'Bytes/Second', - KilobytesPerSecond = 'Kilobytes/Second', - MegabytesPerSecond = 'Megabytes/Second', - GigabytesPerSecond = 'Gigabytes/Second', - TerabytesPerSecond = 'Terabytes/Second', - BitsPerSecond = 'Bits/Second', - KilobitsPerSecond = 'Kilobits/Second', - MegabitsPerSecond = 'Megabits/Second', - GigabitsPerSecond = 'Gigabits/Second', - TerabitsPerSecond = 'Terabits/Second', - CountPerSecond = 'Count/Second', -} - -type MetricUnitSeconds = MetricUnits.Seconds; -type MetricUnitMicroseconds = MetricUnits.Microseconds; -type MetricUnitMilliseconds = MetricUnits.Milliseconds; -type MetricUnitBytes = MetricUnits.Bytes; -type MetricUnitKilobytes = MetricUnits.Kilobytes; -type MetricUnitMegabytes = MetricUnits.Megabytes; -type MetricUnitGigabytes = MetricUnits.Gigabytes; -type MetricUnitTerabytes = MetricUnits.Terabytes; -type MetricUnitBits = MetricUnits.Bits; -type MetricUnitKilobits = MetricUnits.Kilobits; -type MetricUnitMegabits = MetricUnits.Megabits; -type MetricUnitGigabits = MetricUnits.Gigabits; -type MetricUnitTerabits = MetricUnits.Terabits; -type MetricUnitPercent = MetricUnits.Percent; -type MetricUnitCount = MetricUnits.Count; -type MetricUnitBytesPerSecond = MetricUnits.BytesPerSecond; -type MetricUnitKilobytesPerSecond = MetricUnits.KilobytesPerSecond; -type MetricUnitMegabytesPerSecond = MetricUnits.MegabytesPerSecond; -type MetricUnitGigabytesPerSecond = MetricUnits.GigabytesPerSecond; -type MetricUnitTerabytesPerSecond = MetricUnits.TerabytesPerSecond; -type MetricUnitBitsPerSecond = MetricUnits.BitsPerSecond; -type MetricUnitKilobitsPerSecond = MetricUnits.KilobitsPerSecond; -type MetricUnitMegabitsPerSecond = MetricUnits.MegabitsPerSecond; -type MetricUnitGigabitsPerSecond = MetricUnits.GigabitsPerSecond; -type MetricUnitTerabitsPerSecond = MetricUnits.TerabitsPerSecond; -type MetricUnitCountPerSecond = MetricUnits.CountPerSecond; - -type MetricUnit = - | MetricUnitSeconds - | MetricUnitMicroseconds - | MetricUnitMilliseconds - | MetricUnitBytes - | MetricUnitKilobytes - | MetricUnitMegabytes - | MetricUnitGigabytes - | MetricUnitTerabytes - | MetricUnitBits - | MetricUnitKilobits - | MetricUnitMegabits - | MetricUnitGigabits - | MetricUnitTerabits - | MetricUnitPercent - | MetricUnitCount - | MetricUnitBitsPerSecond - | MetricUnitBytesPerSecond - | MetricUnitKilobytesPerSecond - | MetricUnitMegabytesPerSecond - | MetricUnitGigabytesPerSecond - | MetricUnitTerabytesPerSecond - | MetricUnitKilobitsPerSecond - | MetricUnitMegabitsPerSecond - | MetricUnitGigabitsPerSecond - | MetricUnitTerabitsPerSecond - | MetricUnitCountPerSecond; - -export { MetricUnit, MetricUnits }; diff --git a/packages/metrics/src/types/Metrics.ts b/packages/metrics/src/types/Metrics.ts index 73d8b60d10..f925ed2e9b 100644 --- a/packages/metrics/src/types/Metrics.ts +++ b/packages/metrics/src/types/Metrics.ts @@ -1,12 +1,5 @@ -import type { Handler } from 'aws-lambda'; -import type { - LambdaInterface, - AsyncHandler, - SyncHandler, -} from '@aws-lambda-powertools/commons/types'; -import { ConfigServiceInterface } from '../config'; -import { MetricUnit } from './MetricUnit'; -import { MetricResolution } from './MetricResolution'; +import type { ConfigServiceInterface } from './ConfigServiceInterface.js'; +import { MetricResolution, MetricUnit } from '../constants.js'; type Dimensions = Record; @@ -30,14 +23,6 @@ type EmfOutput = Readonly<{ }; }>; -type HandlerMethodDecorator = ( - target: LambdaInterface, - propertyKey: string | symbol, - descriptor: - | TypedPropertyDescriptor> - | TypedPropertyDescriptor> -) => void; - /** * Options for the metrics decorator * @@ -63,6 +48,11 @@ type ExtraOptions = { captureColdStartMetric?: boolean; }; +type MetricResolution = + (typeof MetricResolution)[keyof typeof MetricResolution]; + +type MetricUnit = (typeof MetricUnit)[keyof typeof MetricUnit]; + type StoredMetric = { name: string; unit: MetricUnit; @@ -82,9 +72,10 @@ export { MetricsOptions, Dimensions, EmfOutput, - HandlerMethodDecorator, ExtraOptions, StoredMetrics, StoredMetric, MetricDefinition, + MetricResolution, + MetricUnit, }; diff --git a/packages/metrics/src/MetricsInterface.ts b/packages/metrics/src/types/MetricsInterface.ts similarity index 81% rename from packages/metrics/src/MetricsInterface.ts rename to packages/metrics/src/types/MetricsInterface.ts index ce11fd7aa1..99650937ba 100644 --- a/packages/metrics/src/MetricsInterface.ts +++ b/packages/metrics/src/types/MetricsInterface.ts @@ -1,12 +1,12 @@ -import { Metrics } from './Metrics'; -import { - MetricUnit, - MetricResolution, +import type { Metrics } from '../Metrics.js'; +import type { HandlerMethodDecorator } from '@aws-lambda-powertools/commons/types'; +import type { EmfOutput, - HandlerMethodDecorator, Dimensions, MetricsOptions, -} from './types'; + MetricResolution, + MetricUnit, +} from './Metrics.js'; interface MetricsInterface { addDimension(name: string, value: string): void; diff --git a/packages/metrics/src/types/index.ts b/packages/metrics/src/types/index.ts index 344dac9821..115b00059e 100644 --- a/packages/metrics/src/types/index.ts +++ b/packages/metrics/src/types/index.ts @@ -1,3 +1,13 @@ -export * from './Metrics'; -export * from './MetricUnit'; -export * from './MetricResolution'; +export { + MetricsOptions, + Dimensions, + EmfOutput, + ExtraOptions, + StoredMetrics, + StoredMetric, + MetricDefinition, + MetricResolution, + MetricUnit, +} from './Metrics.js'; +export { ConfigServiceInterface } from './ConfigServiceInterface.js'; +export { MetricsInterface } from './MetricsInterface.js'; diff --git a/packages/metrics/tests/e2e/basicFeatures.decorator.test.functionCode.ts b/packages/metrics/tests/e2e/basicFeatures.decorator.test.functionCode.ts index db74836afd..15e8da2a3d 100644 --- a/packages/metrics/tests/e2e/basicFeatures.decorator.test.functionCode.ts +++ b/packages/metrics/tests/e2e/basicFeatures.decorator.test.functionCode.ts @@ -1,4 +1,5 @@ -import { Metrics, MetricUnits } from '../../src/index.js'; +import { Metrics, MetricUnit } from '../../src/index.js'; +import type { MetricUnit as MetricUnitType } from '../../src/types/index.js'; import type { Context } from 'aws-lambda'; import type { LambdaInterface } from '@aws-lambda-powertools/commons/types'; @@ -7,7 +8,7 @@ const serviceName = process.env.EXPECTED_SERVICE_NAME ?? 'MyFunctionWithStandardHandler'; const metricName = process.env.EXPECTED_METRIC_NAME ?? 'MyMetric'; const metricUnit = - (process.env.EXPECTED_METRIC_UNIT as MetricUnits) ?? MetricUnits.Count; + (process.env.EXPECTED_METRIC_UNIT as MetricUnitType) ?? MetricUnit.Count; const metricValue = process.env.EXPECTED_METRIC_VALUE ?? '1'; const defaultDimensions = process.env.EXPECTED_DEFAULT_DIMENSIONS ?? '{"MyDimension":"MyValue"}'; @@ -19,8 +20,8 @@ const singleMetricDimension = const singleMetricName = process.env.EXPECTED_SINGLE_METRIC_NAME ?? 'MySingleMetric'; const singleMetricUnit = - (process.env.EXPECTED_SINGLE_METRIC_UNIT as MetricUnits) ?? - MetricUnits.Percent; + (process.env.EXPECTED_SINGLE_METRIC_UNIT as MetricUnitType) ?? + MetricUnit.Percent; const singleMetricValue = process.env.EXPECTED_SINGLE_METRIC_VALUE ?? '2'; const metrics = new Metrics({ namespace: namespace, serviceName: serviceName }); diff --git a/packages/metrics/tests/e2e/basicFeatures.manual.test.functionCode.ts b/packages/metrics/tests/e2e/basicFeatures.manual.test.functionCode.ts index b4996dcf32..8c06579e34 100644 --- a/packages/metrics/tests/e2e/basicFeatures.manual.test.functionCode.ts +++ b/packages/metrics/tests/e2e/basicFeatures.manual.test.functionCode.ts @@ -1,4 +1,5 @@ -import { Metrics, MetricUnits } from '../../src/index.js'; +import { Metrics, MetricUnit } from '../../src/index.js'; +import type { MetricUnit as MetricUnitType } from '../../src/types/index.js'; import type { Context } from 'aws-lambda'; const namespace = process.env.EXPECTED_NAMESPACE ?? 'CdkExample'; @@ -6,7 +7,7 @@ const serviceName = process.env.EXPECTED_SERVICE_NAME ?? 'MyFunctionWithStandardHandler'; const metricName = process.env.EXPECTED_METRIC_NAME ?? 'MyMetric'; const metricUnit = - (process.env.EXPECTED_METRIC_UNIT as MetricUnits) ?? MetricUnits.Count; + (process.env.EXPECTED_METRIC_UNIT as MetricUnitType) ?? MetricUnit.Count; const metricValue = process.env.EXPECTED_METRIC_VALUE ?? '1'; const defaultDimensions = process.env.EXPECTED_DEFAULT_DIMENSIONS ?? '{"MyDimension":"MyValue"}'; @@ -18,8 +19,8 @@ const singleMetricDimension = const singleMetricName = process.env.EXPECTED_SINGLE_METRIC_NAME ?? 'MySingleMetric'; const singleMetricUnit = - (process.env.EXPECTED_SINGLE_METRIC_UNIT as MetricUnits) ?? - MetricUnits.Percent; + (process.env.EXPECTED_SINGLE_METRIC_UNIT as MetricUnitType) ?? + MetricUnit.Percent; const singleMetricValue = process.env.EXPECTED_SINGLE_METRIC_VALUE ?? '2'; const metrics = new Metrics({ namespace: namespace, serviceName: serviceName }); diff --git a/packages/metrics/tests/helpers/metricsUtils.ts b/packages/metrics/tests/helpers/metricsUtils.ts index 8172fb3451..0984c8a6bc 100644 --- a/packages/metrics/tests/helpers/metricsUtils.ts +++ b/packages/metrics/tests/helpers/metricsUtils.ts @@ -1,6 +1,6 @@ import promiseRetry from 'promise-retry'; -import { Metrics } from '../../src'; -import { ExtraOptions, MetricUnits } from '../../src/types'; +import { Metrics, MetricUnit } from '../../src/index.js'; +import { ExtraOptions } from '../../src/types/index.js'; import { CloudWatchClient, ListMetricsCommand, @@ -48,13 +48,11 @@ const setupDecoratorLambdaHandler = ( ): Handler => { class LambdaFunction implements LambdaInterface { @metrics.logMetrics(options) - // eslint-disable-next-line @typescript-eslint/ban-ts-comment - // @ts-ignore public async handler( _event: TEvent, _context: Context ): Promise { - metrics.addMetric('decorator-lambda-test-metric', MetricUnits.Count, 1); + metrics.addMetric('decorator-lambda-test-metric', MetricUnit.Count, 1); return 'Lambda invoked!'; } diff --git a/packages/metrics/tests/helpers/resources.ts b/packages/metrics/tests/helpers/resources.ts index f071d2c8b2..128332eb88 100644 --- a/packages/metrics/tests/helpers/resources.ts +++ b/packages/metrics/tests/helpers/resources.ts @@ -4,7 +4,7 @@ import type { TestNodejsFunctionProps, } from '@aws-lambda-powertools/testing-utils/types'; import { TestNodejsFunction } from '@aws-lambda-powertools/testing-utils/resources/lambda'; -import { commonEnvironmentVars } from '../e2e/constants'; +import { commonEnvironmentVars } from '../e2e/constants.js'; class MetricsTestNodejsFunction extends TestNodejsFunction { public constructor( diff --git a/packages/metrics/tests/unit/Metrics.test.ts b/packages/metrics/tests/unit/Metrics.test.ts index e8077f78e7..b161aab738 100644 --- a/packages/metrics/tests/unit/Metrics.test.ts +++ b/packages/metrics/tests/unit/Metrics.test.ts @@ -5,21 +5,23 @@ */ import context from '@aws-lambda-powertools/testing-utils/context'; import type { LambdaInterface } from '@aws-lambda-powertools/commons/types'; -import { MetricResolution, MetricUnits, Metrics } from '../../src'; +import { MetricResolution, MetricUnit, Metrics } from '../../src/index.js'; import type { Context, Handler } from 'aws-lambda'; -import { Dimensions, EmfOutput, MetricsOptions } from '../../src/types'; +import type { + Dimensions, + EmfOutput, + MetricsOptions, + ConfigServiceInterface, +} from '../../src/types/index.js'; import { COLD_START_METRIC, DEFAULT_NAMESPACE, MAX_DIMENSION_COUNT, MAX_METRICS_SIZE, MAX_METRIC_VALUES_SIZE, -} from '../../src/constants'; -import { setupDecoratorLambdaHandler } from '../helpers/metricsUtils'; -import { - ConfigServiceInterface, - EnvironmentVariablesService, -} from '../../src/config'; +} from '../../src/constants.js'; +import { setupDecoratorLambdaHandler } from '../helpers/metricsUtils.js'; +import { EnvironmentVariablesService } from '../../src/config/EnvironmentVariablesService.js'; const mockDate = new Date(1466424490000); const dateSpy = jest.spyOn(global, 'Date').mockImplementation(() => mockDate); @@ -521,12 +523,7 @@ describe('Class: Metrics', () => { const metricName = 'test-metric'; // Act - metrics.addMetric( - metricName, - MetricUnits.Count, - 1, - MetricResolution.High - ); + metrics.addMetric(metricName, MetricUnit.Count, 1, MetricResolution.High); // Assess expect(metrics).toEqual( @@ -535,7 +532,7 @@ describe('Class: Metrics', () => { [metricName]: { name: metricName, resolution: MetricResolution.High, - unit: MetricUnits.Count, + unit: MetricUnit.Count, value: 1, }, }, @@ -550,19 +547,19 @@ describe('Class: Metrics', () => { // Act metrics.addMetric( 'test-metric-1', - MetricUnits.Count, + MetricUnit.Count, 1, MetricResolution.High ); metrics.addMetric( 'test-metric-2', - MetricUnits.Count, + MetricUnit.Count, 3, MetricResolution.High ); metrics.addMetric( 'test-metric-3', - MetricUnits.Count, + MetricUnit.Count, 6, MetricResolution.High ); @@ -574,19 +571,19 @@ describe('Class: Metrics', () => { 'test-metric-1': { name: 'test-metric-1', resolution: MetricResolution.High, - unit: MetricUnits.Count, + unit: MetricUnit.Count, value: 1, }, 'test-metric-2': { name: 'test-metric-2', resolution: MetricResolution.High, - unit: MetricUnits.Count, + unit: MetricUnit.Count, value: 3, }, 'test-metric-3': { name: 'test-metric-3', resolution: MetricResolution.High, - unit: MetricUnits.Count, + unit: MetricUnit.Count, value: 6, }, }, @@ -599,8 +596,8 @@ describe('Class: Metrics', () => { const metrics: Metrics = new Metrics({ namespace: TEST_NAMESPACE }); // Act - metrics.addMetric('test-metric-1', MetricUnits.Count, 1); - metrics.addMetric('test-metric-2', MetricUnits.Seconds, 3); + metrics.addMetric('test-metric-1', MetricUnit.Count, 1); + metrics.addMetric('test-metric-2', MetricUnit.Seconds, 3); // Assess expect(metrics).toEqual( @@ -609,13 +606,13 @@ describe('Class: Metrics', () => { 'test-metric-1': { name: 'test-metric-1', resolution: MetricResolution.Standard, - unit: MetricUnits.Count, + unit: MetricUnit.Count, value: 1, }, 'test-metric-2': { name: 'test-metric-2', resolution: MetricResolution.Standard, - unit: MetricUnits.Seconds, + unit: MetricUnit.Seconds, value: 3, }, }, @@ -629,10 +626,10 @@ describe('Class: Metrics', () => { const metricName = 'test-metric'; // Act - metrics.addMetric(metricName, MetricUnits.Count, 1); - metrics.addMetric(metricName, MetricUnits.Count, 5); - metrics.addMetric(metricName, MetricUnits.Count, 1); - metrics.addMetric(metricName, MetricUnits.Count, 4); + metrics.addMetric(metricName, MetricUnit.Count, 1); + metrics.addMetric(metricName, MetricUnit.Count, 5); + metrics.addMetric(metricName, MetricUnit.Count, 1); + metrics.addMetric(metricName, MetricUnit.Count, 4); // Assess expect(metrics).toEqual( @@ -641,7 +638,7 @@ describe('Class: Metrics', () => { [metricName]: { name: metricName, resolution: MetricResolution.Standard, - unit: MetricUnits.Count, + unit: MetricUnit.Count, value: [1, 5, 1, 4], }, }, @@ -656,10 +653,10 @@ describe('Class: Metrics', () => { // Act & Assess expect(() => { - metrics.addMetric(metricName, MetricUnits.Count, 1); - metrics.addMetric(metricName, MetricUnits.Kilobits, 5); + metrics.addMetric(metricName, MetricUnit.Count, 1); + metrics.addMetric(metricName, MetricUnit.Kilobits, 5); }).toThrowError( - `Metric "${metricName}" has already been added with unit "${MetricUnits.Count}", but we received unit "${MetricUnits.Kilobits}". Did you mean to use metric unit "${MetricUnits.Count}"?` + `Metric "${metricName}" has already been added with unit "${MetricUnit.Count}", but we received unit "${MetricUnit.Kilobits}". Did you mean to use metric unit "${MetricUnit.Count}"?` ); }); @@ -675,7 +672,7 @@ describe('Class: Metrics', () => { // Act & Assess expect(() => { for (let i = 0; i < MAX_METRICS_SIZE; i++) { - metrics.addMetric(`${metricName}-${i}`, MetricUnits.Count, i); + metrics.addMetric(`${metricName}-${i}`, MetricUnit.Count, i); } }).not.toThrowError(); expect(Object.keys(metrics['storedMetrics']).length).toEqual( @@ -683,7 +680,7 @@ describe('Class: Metrics', () => { ); metrics.addMetric( 'another-metric', - MetricUnits.Count, + MetricUnit.Count, MAX_METRICS_SIZE + 1 ); expect(publishStoredMetricsSpy).toHaveBeenCalledTimes(1); @@ -693,7 +690,7 @@ describe('Class: Metrics', () => { 'another-metric': { name: 'another-metric', resolution: MetricResolution.Standard, - unit: MetricUnits.Count, + unit: MetricUnit.Count, value: MAX_METRICS_SIZE + 1, }, }, @@ -709,7 +706,7 @@ describe('Class: Metrics', () => { // Act for (let i = 0; i <= MAX_METRIC_VALUES_SIZE; i++) { - metrics.addMetric(`${metricName}`, MetricUnits.Count, i); + metrics.addMetric(`${metricName}`, MetricUnit.Count, i); } metrics.publishStoredMetrics(); @@ -741,13 +738,13 @@ describe('Class: Metrics', () => { // Act & Assess expect(() => { for (let i = 0; i < MAX_METRICS_SIZE - 1; i++) { - metrics.addMetric(`${metricName}-${i}`, MetricUnits.Count, i); + metrics.addMetric(`${metricName}-${i}`, MetricUnit.Count, i); } }).not.toThrowError(); expect(Object.keys(metrics['storedMetrics']).length).toEqual( MAX_METRICS_SIZE - 1 ); - metrics.addMetric('another-metric', MetricUnits.Count, MAX_METRICS_SIZE); + metrics.addMetric('another-metric', MetricUnit.Count, MAX_METRICS_SIZE); expect(publishStoredMetricsSpy).toHaveBeenCalledTimes(0); expect(Object.keys(metrics['storedMetrics']).length).toEqual( MAX_METRICS_SIZE @@ -766,8 +763,8 @@ describe('Class: Metrics', () => { ); // Act - metrics.addMetric('test-metric-1', MetricUnits.Count, 1); - metrics.addMetric('test-metric-2', MetricUnits.Bits, 100); + metrics.addMetric('test-metric-1', MetricUnit.Count, 1); + metrics.addMetric('test-metric-2', MetricUnit.Bits, 100); // Assess expect(publishStoredMetricsSpy).toHaveBeenCalledTimes(2); @@ -785,8 +782,8 @@ describe('Class: Metrics', () => { ); // Act - metrics.addMetric('test-metric-1', MetricUnits.Count, 1); - metrics.addMetric('test-metric-2', MetricUnits.Bits, 100); + metrics.addMetric('test-metric-1', MetricUnit.Count, 1); + metrics.addMetric('test-metric-2', MetricUnit.Bits, 100); // Assess expect(publishStoredMetricsSpy).toHaveBeenCalledTimes(0); @@ -801,8 +798,8 @@ describe('Class: Metrics', () => { ); // Act - metrics.addMetric('test-metric-1', MetricUnits.Count, 1); - metrics.addMetric('test-metric-2', MetricUnits.Bits, 100); + metrics.addMetric('test-metric-1', MetricUnit.Count, 1); + metrics.addMetric('test-metric-2', MetricUnit.Bits, 100); // Assess expect(publishStoredMetricsSpy).toHaveBeenCalledTimes(0); @@ -830,7 +827,7 @@ describe('Class: Metrics', () => { expect(addMetricSpy).toBeCalledTimes(1); expect(addMetricSpy).toBeCalledWith( COLD_START_METRIC, - MetricUnits.Count, + MetricUnit.Count, 1 ); }); @@ -1071,7 +1068,7 @@ describe('Class: Metrics', () => { const metricName = 'test-metric'; // Act - metrics.addMetric(metricName, MetricUnits.Count, 1); + metrics.addMetric(metricName, MetricUnit.Count, 1); metrics.clearMetrics(); // Assess @@ -1116,7 +1113,7 @@ describe('Class: Metrics', () => { expect(addMetricSpy).toHaveBeenNthCalledWith( 1, decoratorLambdaMetric, - MetricUnits.Count, + MetricUnit.Count, 1 ); expect(publishStoredMetricsSpy).toBeCalledTimes(1); @@ -1141,7 +1138,7 @@ describe('Class: Metrics', () => { expect(addMetricSpy).toHaveBeenNthCalledWith( 1, decoratorLambdaMetric, - MetricUnits.Count, + MetricUnit.Count, 1 ); expect(captureColdStartMetricSpy).toBeCalledTimes(1); @@ -1166,7 +1163,7 @@ describe('Class: Metrics', () => { expect(addMetricSpy).toHaveBeenNthCalledWith( 1, decoratorLambdaMetric, - MetricUnits.Count, + MetricUnit.Count, 1 ); expect(throwOnEmptyMetricsSpy).toBeCalledTimes(1); @@ -1195,7 +1192,7 @@ describe('Class: Metrics', () => { expect(addMetricSpy).toHaveBeenNthCalledWith( 1, decoratorLambdaMetric, - MetricUnits.Count, + MetricUnit.Count, 1 ); expect(setDefaultDimensionsSpy).toHaveBeenNthCalledWith( @@ -1246,7 +1243,7 @@ describe('Class: Metrics', () => { test('it should call serializeMetrics && log the stringified return value of serializeMetrics', () => { // Prepare const metrics: Metrics = new Metrics({ namespace: TEST_NAMESPACE }); - metrics.addMetric('test-metric', MetricUnits.Count, 10); + metrics.addMetric('test-metric', MetricUnit.Count, 10); const consoleLogSpy = jest.spyOn(console, 'log').mockImplementation(); const mockData: EmfOutput = { _aws: { @@ -1258,7 +1255,7 @@ describe('Class: Metrics', () => { Metrics: [ { Name: 'test-metric', - Unit: MetricUnits.Count, + Unit: MetricUnit.Count, }, ], }, @@ -1283,7 +1280,7 @@ describe('Class: Metrics', () => { test('it should call clearMetrics function', () => { // Prepare const metrics: Metrics = new Metrics({ namespace: TEST_NAMESPACE }); - metrics.addMetric('test-metric', MetricUnits.Count, 10); + metrics.addMetric('test-metric', MetricUnit.Count, 10); const clearMetricsSpy = jest.spyOn(metrics, 'clearMetrics'); // Act @@ -1296,7 +1293,7 @@ describe('Class: Metrics', () => { test('it should call clearDimensions function', () => { // Prepare const metrics: Metrics = new Metrics({ namespace: TEST_NAMESPACE }); - metrics.addMetric('test-metric', MetricUnits.Count, 10); + metrics.addMetric('test-metric', MetricUnit.Count, 10); const clearDimensionsSpy = jest.spyOn(metrics, 'clearDimensions'); // Act @@ -1309,7 +1306,7 @@ describe('Class: Metrics', () => { test('it should call clearMetadata function', () => { // Prepare const metrics: Metrics = new Metrics({ namespace: TEST_NAMESPACE }); - metrics.addMetric('test-metric', MetricUnits.Count, 10); + metrics.addMetric('test-metric', MetricUnit.Count, 10); const clearMetadataSpy = jest.spyOn(metrics, 'clearMetadata'); // Act @@ -1349,11 +1346,11 @@ describe('Class: Metrics', () => { }); // Act - metrics.addMetric('successfulBooking', MetricUnits.Count, 1); - metrics.addMetric('successfulBooking', MetricUnits.Count, 3); + metrics.addMetric('successfulBooking', MetricUnit.Count, 1); + metrics.addMetric('successfulBooking', MetricUnit.Count, 3); metrics.addMetric( 'failedBooking', - MetricUnits.Count, + MetricUnit.Count, 1, MetricResolution.High ); @@ -1370,11 +1367,11 @@ describe('Class: Metrics', () => { Metrics: [ { Name: 'successfulBooking', - Unit: MetricUnits.Count, + Unit: MetricUnit.Count, }, { Name: 'failedBooking', - Unit: MetricUnits.Count, + Unit: MetricUnit.Count, StorageResolution: 1, }, ], @@ -1398,7 +1395,7 @@ describe('Class: Metrics', () => { }); // Act - metrics.addMetric(testMetric, MetricUnits.Count, 10); + metrics.addMetric(testMetric, MetricUnit.Count, 10); const loggedData = metrics.serializeMetrics(); // Assess @@ -1411,7 +1408,7 @@ describe('Class: Metrics', () => { Metrics: [ { Name: testMetric, - Unit: MetricUnits.Count, + Unit: MetricUnit.Count, }, ], Namespace: TEST_NAMESPACE, @@ -1432,7 +1429,7 @@ describe('Class: Metrics', () => { const metrics: Metrics = new Metrics({ namespace: TEST_NAMESPACE }); // Act - metrics.addMetric(testMetric, MetricUnits.Count, 10); + metrics.addMetric(testMetric, MetricUnit.Count, 10); const loggedData = metrics.serializeMetrics(); // Assess @@ -1445,7 +1442,7 @@ describe('Class: Metrics', () => { Metrics: [ { Name: testMetric, - Unit: MetricUnits.Count, + Unit: MetricUnit.Count, }, ], Namespace: TEST_NAMESPACE, @@ -1471,7 +1468,7 @@ describe('Class: Metrics', () => { }); // Act - metrics.addMetric(testMetric, MetricUnits.Count, 10); + metrics.addMetric(testMetric, MetricUnit.Count, 10); const loggedData = metrics.serializeMetrics(); // Assess @@ -1489,7 +1486,7 @@ describe('Class: Metrics', () => { Metrics: [ { Name: testMetric, - Unit: MetricUnits.Count, + Unit: MetricUnit.Count, }, ], Namespace: TEST_NAMESPACE, @@ -1513,7 +1510,7 @@ describe('Class: Metrics', () => { // Act metrics.addMetric( 'test-metric', - MetricUnits.Count, + MetricUnit.Count, 10, MetricResolution.High ); @@ -1537,7 +1534,7 @@ describe('Class: Metrics', () => { { Name: testMetric, StorageResolution: 1, - Unit: MetricUnits.Count, + Unit: MetricUnit.Count, }, ], Namespace: TEST_NAMESPACE, @@ -1563,7 +1560,7 @@ describe('Class: Metrics', () => { // Act metrics.addMetric( testMetric, - MetricUnits.Count, + MetricUnit.Count, 10, MetricResolution.High ); @@ -1587,7 +1584,7 @@ describe('Class: Metrics', () => { { Name: testMetric, StorageResolution: 1, - Unit: MetricUnits.Count, + Unit: MetricUnit.Count, }, ], Namespace: TEST_NAMESPACE, @@ -1608,7 +1605,7 @@ describe('Class: Metrics', () => { const metrics: Metrics = new Metrics({ namespace: TEST_NAMESPACE }); // Act - metrics.addMetric(testMetric, MetricUnits.Count, 10); + metrics.addMetric(testMetric, MetricUnit.Count, 10); metrics.addMetadata('foo', 'bar'); const loggedData = metrics.serializeMetrics(); @@ -1622,7 +1619,7 @@ describe('Class: Metrics', () => { Metrics: [ { Name: testMetric, - Unit: MetricUnits.Count, + Unit: MetricUnit.Count, }, ], Namespace: TEST_NAMESPACE, @@ -1656,7 +1653,7 @@ describe('Class: Metrics', () => { const metrics: Metrics = new Metrics(); // Act - metrics.addMetric(testMetric, MetricUnits.Count, 10); + metrics.addMetric(testMetric, MetricUnit.Count, 10); const loggedData = metrics.serializeMetrics(); // Assess @@ -1671,7 +1668,7 @@ describe('Class: Metrics', () => { Metrics: [ { Name: testMetric, - Unit: MetricUnits.Count, + Unit: MetricUnit.Count, }, ], Namespace: DEFAULT_NAMESPACE, @@ -1690,7 +1687,7 @@ describe('Class: Metrics', () => { const metrics: Metrics = new Metrics({ namespace: TEST_NAMESPACE }); // Act - metrics.addMetric(testMetric, MetricUnits.Count, 10); + metrics.addMetric(testMetric, MetricUnit.Count, 10); const loggedData = metrics.serializeMetrics(); // Assess @@ -1705,7 +1702,7 @@ describe('Class: Metrics', () => { Metrics: [ { Name: testMetric, - Unit: MetricUnits.Count, + Unit: MetricUnit.Count, }, ], Namespace: TEST_NAMESPACE, @@ -1724,7 +1721,7 @@ describe('Class: Metrics', () => { const metrics: Metrics = new Metrics({ namespace: TEST_NAMESPACE }); // Act - metrics.addMetric(metricName, MetricUnits.Count, 10); + metrics.addMetric(metricName, MetricUnit.Count, 10); const loggedData = metrics.serializeMetrics(); // Assess @@ -1738,7 +1735,7 @@ describe('Class: Metrics', () => { Metrics: [ { Name: metricName, - Unit: MetricUnits.Count, + Unit: MetricUnit.Count, }, ], Namespace: TEST_NAMESPACE, @@ -1757,8 +1754,8 @@ describe('Class: Metrics', () => { const metrics: Metrics = new Metrics({ namespace: TEST_NAMESPACE }); // Act - metrics.addMetric(metricName, MetricUnits.Count, 10); - metrics.addMetric(metricName, MetricUnits.Count, 20); + metrics.addMetric(metricName, MetricUnit.Count, 10); + metrics.addMetric(metricName, MetricUnit.Count, 20); const loggedData = metrics.serializeMetrics(); // Assess @@ -1772,7 +1769,7 @@ describe('Class: Metrics', () => { Metrics: [ { Name: metricName, - Unit: MetricUnits.Count, + Unit: MetricUnit.Count, }, ], Namespace: TEST_NAMESPACE, @@ -1792,8 +1789,8 @@ describe('Class: Metrics', () => { const metrics: Metrics = new Metrics({ namespace: TEST_NAMESPACE }); // Act - metrics.addMetric(metricName1, MetricUnits.Count, 10); - metrics.addMetric(metricName2, MetricUnits.Seconds, 20); + metrics.addMetric(metricName1, MetricUnit.Count, 10); + metrics.addMetric(metricName2, MetricUnit.Seconds, 20); const loggedData = metrics.serializeMetrics(); // Assess @@ -1808,11 +1805,11 @@ describe('Class: Metrics', () => { Metrics: [ { Name: metricName1, - Unit: MetricUnits.Count, + Unit: MetricUnit.Count, }, { Name: metricName2, - Unit: MetricUnits.Seconds, + Unit: MetricUnit.Seconds, }, ], Namespace: TEST_NAMESPACE, @@ -1832,7 +1829,7 @@ describe('Class: Metrics', () => { const metrics: Metrics = new Metrics({ namespace: TEST_NAMESPACE }); // Act - metrics.addMetric(metricName, MetricUnits.Count, 10); + metrics.addMetric(metricName, MetricUnit.Count, 10); const loggedData = metrics.serializeMetrics(); // Assess @@ -1848,7 +1845,7 @@ describe('Class: Metrics', () => { Metrics: [ { Name: metricName, - Unit: MetricUnits.Count, + Unit: MetricUnit.Count, }, ], Namespace: TEST_NAMESPACE, @@ -1868,10 +1865,10 @@ describe('Class: Metrics', () => { const metrics: Metrics = new Metrics({ namespace: TEST_NAMESPACE }); // Act - metrics.addMetric(metricName1, MetricUnits.Count, 10); + metrics.addMetric(metricName1, MetricUnit.Count, 10); metrics.addMetric( metricName2, - MetricUnits.Seconds, + MetricUnit.Seconds, 10, MetricResolution.High ); @@ -1893,12 +1890,12 @@ describe('Class: Metrics', () => { Metrics: [ { Name: metricName1, - Unit: MetricUnits.Count, + Unit: MetricUnit.Count, }, { Name: metricName2, StorageResolution: 1, - Unit: MetricUnits.Seconds, + Unit: MetricUnit.Seconds, }, ], Namespace: TEST_NAMESPACE, diff --git a/packages/metrics/tests/unit/middleware/middy.test.ts b/packages/metrics/tests/unit/middleware/middy.test.ts index 5363566dfd..57109fd30d 100644 --- a/packages/metrics/tests/unit/middleware/middy.test.ts +++ b/packages/metrics/tests/unit/middleware/middy.test.ts @@ -3,14 +3,10 @@ * * @group unit/metrics/middleware */ -import { - Metrics, - MetricUnits, - logMetrics, - MetricResolution, -} from '../../../../metrics/src'; +import { Metrics, MetricUnit, MetricResolution } from '../../../src/index.js'; +import { logMetrics } from '../../../src/middleware/middy.js'; import middy from '@middy/core'; -import { ExtraOptions } from '../../../src/types'; +import { ExtraOptions } from '../../../src/types/index.js'; import { cleanupMiddlewares } from '@aws-lambda-powertools/commons'; import context from '@aws-lambda-powertools/testing-utils/context'; @@ -189,8 +185,8 @@ describe('Middy middleware', () => { }); const lambdaHandler = (): void => { - metrics.addMetric('successfulBooking', MetricUnits.Count, 2); - metrics.addMetric('successfulBooking', MetricUnits.Count, 1); + metrics.addMetric('successfulBooking', MetricUnit.Count, 2); + metrics.addMetric('successfulBooking', MetricUnit.Count, 1); }; const handler = middy(lambdaHandler).use(logMetrics(metrics)); @@ -226,7 +222,7 @@ describe('Middy middleware', () => { }); const lambdaHandler = (): void => { - metrics.addMetric('successfulBooking', MetricUnits.Count, 1); + metrics.addMetric('successfulBooking', MetricUnit.Count, 1); }; const metricsOptions: ExtraOptions = { throwOnEmptyMetrics: true, @@ -292,7 +288,7 @@ describe('Middy middleware', () => { }); const lambdaHandler = (): void => { - metrics.addMetric('successfulBooking', MetricUnits.Count, 1); + metrics.addMetric('successfulBooking', MetricUnit.Count, 1); }; const handler = middy(lambdaHandler).use(logMetrics(metrics)); @@ -328,7 +324,7 @@ describe('Middy middleware', () => { }); const lambdaHandler = (): void => { - metrics.addMetric('successfulBooking', MetricUnits.Count, 1); + metrics.addMetric('successfulBooking', MetricUnit.Count, 1); }; const metricsOptions: ExtraOptions = { throwOnEmptyMetrics: true, @@ -390,7 +386,7 @@ describe('Middy middleware', () => { }; const handler = middy( (_event: { foo: string; bar: string } & { idx: number }): void => { - metrics.addMetric('successfulBooking', MetricUnits.Count, 1); + metrics.addMetric('successfulBooking', MetricUnit.Count, 1); } ) .use(logMetrics(metrics)) @@ -415,7 +411,7 @@ describe('Middy middleware', () => { const lambdaHandler = (): void => { metrics.addMetric( 'successfulBooking', - MetricUnits.Count, + MetricUnit.Count, 1, MetricResolution.Standard ); @@ -460,7 +456,7 @@ describe('Middy middleware', () => { const lambdaHandler = (): void => { metrics.addMetric( 'successfulBooking', - MetricUnits.Count, + MetricUnit.Count, 1, MetricResolution.High ); diff --git a/packages/metrics/tsconfig.esm.json b/packages/metrics/tsconfig.esm.json new file mode 100644 index 0000000000..9bed8e4da4 --- /dev/null +++ b/packages/metrics/tsconfig.esm.json @@ -0,0 +1,11 @@ +{ + "extends": "../../tsconfig.esm.json", + "compilerOptions": { + "baseUrl": ".", + "outDir": "./lib/esm", + "rootDir": "./src" + }, + "include": [ + "./src/**/*" + ] +} \ No newline at end of file diff --git a/packages/metrics/tsconfig.json b/packages/metrics/tsconfig.json index 1cb9d72773..a30fdead42 100644 --- a/packages/metrics/tsconfig.json +++ b/packages/metrics/tsconfig.json @@ -1,7 +1,7 @@ { "extends": "../../tsconfig.json", "compilerOptions": { - "outDir": "./lib", + "outDir": "./lib/cjs", "rootDir": "./src", }, "include": [ From 0de2ffdb7629e1230869fe1d4c4864b3f50cb2e1 Mon Sep 17 00:00:00 2001 From: Andrea Amorosi Date: Thu, 12 Oct 2023 17:35:35 +0200 Subject: [PATCH 19/60] feat(tracer): add esmodule support (#1741) * feat(tracer): add esmodule support * chore(docs): update imports --- examples/cdk/functions/get-all-items.ts | 2 +- examples/sam/src/get-all-items.ts | 2 +- .../{jest.config.js => jest.config.cjs} | 3 + packages/tracer/package.json | 43 +++++++++- packages/tracer/src/Tracer.ts | 20 ++--- packages/tracer/src/TracerInterface.ts | 34 -------- .../src/config/EnvironmentVariablesService.ts | 2 +- packages/tracer/src/config/index.ts | 2 - packages/tracer/src/index.ts | 4 +- packages/tracer/src/middleware/middy.ts | 4 +- .../tracer/src/provider/ProviderService.ts | 10 ++- packages/tracer/src/provider/index.ts | 2 - .../ConfigServiceInterface.ts | 0 .../ProviderServiceInterface.ts | 14 +++- packages/tracer/src/types/Tracer.ts | 61 +++++++++----- packages/tracer/src/types/index.ts | 11 ++- ...allFeatures.decorator.test.functionCode.ts | 10 +-- .../tests/e2e/allFeatures.decorator.test.ts | 8 +- .../allFeatures.manual.test.functionCode.ts | 2 +- .../tests/e2e/allFeatures.manual.test.ts | 12 +-- .../allFeatures.middy.test.functionCode.ts | 3 +- .../tests/e2e/allFeatures.middy.test.ts | 8 +- ...syncHandler.decorator.test.functionCode.ts | 2 +- .../tests/e2e/asyncHandler.decorator.test.ts | 8 +- packages/tracer/tests/helpers/resources.ts | 2 +- .../tracer/tests/helpers/traceAssertions.ts | 10 +-- .../tracer/tests/helpers/traceUtils.types.ts | 70 ---------------- packages/tracer/tests/helpers/tracesUtils.ts | 80 +++++++++++++++++-- .../EnvironmentVariablesService.test.ts | 2 +- .../tracer/tests/unit/ProviderService.test.ts | 7 +- packages/tracer/tests/unit/Tracer.test.ts | 8 +- packages/tracer/tests/unit/middy.test.ts | 6 +- packages/tracer/tsconfig.esm.json | 11 +++ packages/tracer/tsconfig.json | 2 +- 34 files changed, 251 insertions(+), 214 deletions(-) rename packages/tracer/{jest.config.js => jest.config.cjs} (93%) delete mode 100644 packages/tracer/src/TracerInterface.ts delete mode 100644 packages/tracer/src/config/index.ts delete mode 100644 packages/tracer/src/provider/index.ts rename packages/tracer/src/{config => types}/ConfigServiceInterface.ts (100%) rename packages/tracer/src/{provider => types}/ProviderServiceInterface.ts (69%) delete mode 100644 packages/tracer/tests/helpers/traceUtils.types.ts rename packages/tracer/tests/unit/{config => }/EnvironmentVariablesService.test.ts (96%) create mode 100644 packages/tracer/tsconfig.esm.json diff --git a/examples/cdk/functions/get-all-items.ts b/examples/cdk/functions/get-all-items.ts index f4479b6806..cf74cfd2fc 100644 --- a/examples/cdk/functions/get-all-items.ts +++ b/examples/cdk/functions/get-all-items.ts @@ -1,6 +1,6 @@ import { injectLambdaContext } from '@aws-lambda-powertools/logger/middleware'; import { logMetrics } from '@aws-lambda-powertools/metrics/middleware'; -import { captureLambdaHandler } from '@aws-lambda-powertools/tracer'; +import { captureLambdaHandler } from '@aws-lambda-powertools/tracer/middleware'; import { ScanCommand } from '@aws-sdk/lib-dynamodb'; import middy from '@middy/core'; import { diff --git a/examples/sam/src/get-all-items.ts b/examples/sam/src/get-all-items.ts index 125da137c9..79160eddfa 100644 --- a/examples/sam/src/get-all-items.ts +++ b/examples/sam/src/get-all-items.ts @@ -8,7 +8,7 @@ import { tableName } from './common/constants'; import { logger, tracer, metrics } from './common/powertools'; import { logMetrics } from '@aws-lambda-powertools/metrics/middleware'; import { injectLambdaContext } from '@aws-lambda-powertools/logger/middleware'; -import { captureLambdaHandler } from '@aws-lambda-powertools/tracer'; +import { captureLambdaHandler } from '@aws-lambda-powertools/tracer/middleware'; import { docClient } from './common/dynamodb-client'; import { ScanCommand } from '@aws-sdk/lib-dynamodb'; import { getUuid } from './common/getUuid'; diff --git a/packages/tracer/jest.config.js b/packages/tracer/jest.config.cjs similarity index 93% rename from packages/tracer/jest.config.js rename to packages/tracer/jest.config.cjs index f6b014a746..4932f36338 100644 --- a/packages/tracer/jest.config.js +++ b/packages/tracer/jest.config.cjs @@ -5,6 +5,9 @@ module.exports = { }, runner: 'groups', preset: 'ts-jest', + moduleNameMapper: { + '^(\\.{1,2}/.*)\\.js$': '$1', + }, transform: { '^.+\\.ts?$': 'ts-jest', }, diff --git a/packages/tracer/package.json b/packages/tracer/package.json index d1647e7914..db37da1d73 100644 --- a/packages/tracer/package.json +++ b/packages/tracer/package.json @@ -16,19 +16,19 @@ "test:e2e:nodejs18x": "RUNTIME=nodejs18x jest --group=e2e", "test:e2e": "jest --group=e2e", "watch": "jest --watch", - "build": "tsc --build --force", + "build:cjs": "tsc --build --force && echo '{ \"type\": \"commonjs\" }' > lib/cjs/package.json", + "build:esm": "tsc --project tsconfig.esm.json && echo '{ \"type\": \"module\" }' > lib/esm/package.json", + "build": "npm run build:esm & npm run build:cjs", "lint": "eslint --ext .ts,.js --no-error-on-unmatched-pattern .", "lint-fix": "eslint --fix --ext .ts,.js --no-error-on-unmatched-pattern .", "prebuild": "rimraf ./lib", - "prepack": "node ../../.github/scripts/release_patch_package_json.js ." + "prepack": "rimraf ./lib/*.tsbuildinfo && node ../../.github/scripts/release_patch_package_json.js ." }, "lint-staged": { "*.{js,ts}": "npm run lint-fix" }, "homepage": "https://github.com/aws-powertools/powertools-lambda-typescript/tree/main/packages/tracer#readme", "license": "MIT-0", - "main": "./lib/index.js", - "types": "./lib/index.d.ts", "devDependencies": { "@aws-lambda-powertools/testing-utils": "file:../testing", "@aws-sdk/client-dynamodb": "^3.413.0", @@ -46,6 +46,41 @@ "optional": true } }, + "type": "module", + "exports": { + ".": { + "require": { + "types": "./lib/cjs/index.d.ts", + "default": "./lib/cjs/index.js" + }, + "import": { + "types": "./lib/esm/index.d.ts", + "default": "./lib/esm/index.js" + } + }, + "./middleware": { + "import": "./lib/esm/middleware/middy.js", + "require": "./lib/cjs/middleware/middy.js" + }, + "./types": { + "import": "./lib/esm/types/index.js", + "require": "./lib/cjs/types/index.js" + } + }, + "typesVersions": { + "*": { + "middleware": [ + "lib/cjs/middleware/middy.d.ts", + "lib/esm/middleware/middy.d.ts" + ], + "types": [ + "lib/cjs/types/index.d.ts", + "lib/esm/types/index.d.ts" + ] + } + }, + "types": "./lib/cjs/index.d.ts", + "main": "./lib/cjs/index.js", "files": [ "lib" ], diff --git a/packages/tracer/src/Tracer.ts b/packages/tracer/src/Tracer.ts index 71de957ca5..411f5c5fd3 100644 --- a/packages/tracer/src/Tracer.ts +++ b/packages/tracer/src/Tracer.ts @@ -3,20 +3,20 @@ import { Utility } from '@aws-lambda-powertools/commons'; import type { AsyncHandler, SyncHandler, + HandlerMethodDecorator, } from '@aws-lambda-powertools/commons/types'; -import type { TracerInterface } from '.'; -import { - type ConfigServiceInterface, - EnvironmentVariablesService, -} from './config'; +import { EnvironmentVariablesService } from './config/EnvironmentVariablesService.js'; +import type { ConfigServiceInterface } from './types/ConfigServiceInterface.js'; import type { - HandlerMethodDecorator, + TracerInterface, TracerOptions, + AnyClass, MethodDecorator, CaptureLambdaHandlerOptions, CaptureMethodOptions, -} from './types'; -import { ProviderService, type ProviderServiceInterface } from './provider'; +} from './types/Tracer.js'; +import { ProviderService } from './provider/ProviderService.js'; +import type { ProviderServiceInterface } from './types/ProviderServiceInterface.js'; import { type Segment, Subsegment } from 'aws-xray-sdk-core'; /** @@ -461,7 +461,9 @@ class Tracer extends Utility implements TracerInterface { * @decorator Class * @param options - (_optional_) Options for the decorator */ - public captureMethod(options?: CaptureMethodOptions): MethodDecorator { + public captureMethod( + options?: CaptureMethodOptions + ): MethodDecorator { return (_target, propertyKey, descriptor) => { // The descriptor.value is the method this decorator decorates, it cannot be undefined. // eslint-disable-next-line @typescript-eslint/no-non-null-assertion diff --git a/packages/tracer/src/TracerInterface.ts b/packages/tracer/src/TracerInterface.ts deleted file mode 100644 index b346af0f73..0000000000 --- a/packages/tracer/src/TracerInterface.ts +++ /dev/null @@ -1,34 +0,0 @@ -import type { - CaptureLambdaHandlerOptions, - CaptureMethodOptions, - HandlerMethodDecorator, - MethodDecorator, -} from './types'; -import type { Segment, Subsegment } from 'aws-xray-sdk-core'; - -interface TracerInterface { - addErrorAsMetadata(error: Error, remote?: boolean): void; - addResponseAsMetadata(data?: unknown, methodName?: string): void; - addServiceNameAnnotation(): void; - annotateColdStart(): void; - captureAWS(aws: T): void | T; - captureAWSv3Client(service: T): void | T; - captureAWSClient(service: T): void | T; - captureLambdaHandler( - options?: CaptureLambdaHandlerOptions - ): HandlerMethodDecorator; - captureMethod(options?: CaptureMethodOptions): MethodDecorator; - getSegment(): Segment | Subsegment | undefined; - getRootXrayTraceId(): string | undefined; - isTraceSampled(): boolean; - isTracingEnabled(): boolean; - putAnnotation: (key: string, value: string | number | boolean) => void; - putMetadata: ( - key: string, - value: unknown, - namespace?: string | undefined - ) => void; - setSegment(segment: Segment | Subsegment): void; -} - -export { TracerInterface }; diff --git a/packages/tracer/src/config/EnvironmentVariablesService.ts b/packages/tracer/src/config/EnvironmentVariablesService.ts index ecb46b3e23..5b21241352 100644 --- a/packages/tracer/src/config/EnvironmentVariablesService.ts +++ b/packages/tracer/src/config/EnvironmentVariablesService.ts @@ -1,4 +1,4 @@ -import { ConfigServiceInterface } from './ConfigServiceInterface'; +import { ConfigServiceInterface } from '../types/ConfigServiceInterface.js'; import { EnvironmentVariablesService as CommonEnvironmentVariablesService } from '@aws-lambda-powertools/commons'; class EnvironmentVariablesService diff --git a/packages/tracer/src/config/index.ts b/packages/tracer/src/config/index.ts deleted file mode 100644 index 11fd37677e..0000000000 --- a/packages/tracer/src/config/index.ts +++ /dev/null @@ -1,2 +0,0 @@ -export * from './ConfigServiceInterface'; -export * from './EnvironmentVariablesService'; diff --git a/packages/tracer/src/index.ts b/packages/tracer/src/index.ts index 4d7f09185e..56c5e72163 100644 --- a/packages/tracer/src/index.ts +++ b/packages/tracer/src/index.ts @@ -1,3 +1 @@ -export * from './Tracer'; -export * from './TracerInterface'; -export * from './middleware/middy'; +export { Tracer } from './Tracer.js'; diff --git a/packages/tracer/src/middleware/middy.ts b/packages/tracer/src/middleware/middy.ts index 6bf9c22cfa..5d1fd11433 100644 --- a/packages/tracer/src/middleware/middy.ts +++ b/packages/tracer/src/middleware/middy.ts @@ -1,7 +1,7 @@ import { TRACER_KEY } from '@aws-lambda-powertools/commons'; -import type { Tracer } from '../Tracer'; +import type { Tracer } from '../Tracer.js'; import type { Segment, Subsegment } from 'aws-xray-sdk-core'; -import type { CaptureLambdaHandlerOptions } from '../types'; +import type { CaptureLambdaHandlerOptions } from '../types/Tracer.js'; import type { MiddlewareLikeObj, MiddyLikeRequest, diff --git a/packages/tracer/src/provider/ProviderService.ts b/packages/tracer/src/provider/ProviderService.ts index 271a820310..40130067b3 100644 --- a/packages/tracer/src/provider/ProviderService.ts +++ b/packages/tracer/src/provider/ProviderService.ts @@ -1,6 +1,8 @@ -import { ContextMissingStrategy } from 'aws-xray-sdk-core/dist/lib/context_utils'; import { Namespace } from 'cls-hooked'; -import { ProviderServiceInterface } from '.'; +import type { + ProviderServiceInterface, + ContextMissingStrategy, +} from '../types/ProviderServiceInterface.js'; import { captureAWS, captureAWSClient, @@ -107,8 +109,8 @@ class ProviderService implements ProviderServiceInterface { segment.addMetadata(key, value, namespace); } - public setContextMissingStrategy(strategy: unknown): void { - setContextMissingStrategy(strategy as ContextMissingStrategy); + public setContextMissingStrategy(strategy: ContextMissingStrategy): void { + setContextMissingStrategy(strategy); } public setDaemonAddress(address: string): void { diff --git a/packages/tracer/src/provider/index.ts b/packages/tracer/src/provider/index.ts deleted file mode 100644 index ef648fd32d..0000000000 --- a/packages/tracer/src/provider/index.ts +++ /dev/null @@ -1,2 +0,0 @@ -export * from './ProviderService'; -export * from './ProviderServiceInterface'; diff --git a/packages/tracer/src/config/ConfigServiceInterface.ts b/packages/tracer/src/types/ConfigServiceInterface.ts similarity index 100% rename from packages/tracer/src/config/ConfigServiceInterface.ts rename to packages/tracer/src/types/ConfigServiceInterface.ts diff --git a/packages/tracer/src/provider/ProviderServiceInterface.ts b/packages/tracer/src/types/ProviderServiceInterface.ts similarity index 69% rename from packages/tracer/src/provider/ProviderServiceInterface.ts rename to packages/tracer/src/types/ProviderServiceInterface.ts index a8cd4a4f91..5439b3a27d 100644 --- a/packages/tracer/src/provider/ProviderServiceInterface.ts +++ b/packages/tracer/src/types/ProviderServiceInterface.ts @@ -1,5 +1,11 @@ -import { Namespace } from 'cls-hooked'; -import { Segment, Subsegment } from 'aws-xray-sdk-core'; +import type { Namespace } from 'cls-hooked'; +import type { Segment, Subsegment } from 'aws-xray-sdk-core'; + +type ContextMissingStrategy = + | 'LOG_ERROR' + | 'RUNTIME_ERROR' + | 'IGNORE_ERROR' + | ((msg: string) => void); interface ProviderServiceInterface { getNamespace(): Namespace; @@ -12,7 +18,7 @@ interface ProviderServiceInterface { setDaemonAddress(address: string): void; - setContextMissingStrategy(strategy: unknown): void; + setContextMissingStrategy(strategy: ContextMissingStrategy): void; captureAWS(awsservice: T): T; @@ -39,4 +45,4 @@ interface ProviderServiceInterface { putMetadata(key: string, value: unknown, namespace?: string): void; } -export { ProviderServiceInterface }; +export { ProviderServiceInterface, ContextMissingStrategy }; diff --git a/packages/tracer/src/types/Tracer.ts b/packages/tracer/src/types/Tracer.ts index 9f15b927ad..abac332cf9 100644 --- a/packages/tracer/src/types/Tracer.ts +++ b/packages/tracer/src/types/Tracer.ts @@ -1,10 +1,6 @@ -import type { ConfigServiceInterface } from '../config'; -import type { Handler } from 'aws-lambda'; -import type { - AsyncHandler, - LambdaInterface, - SyncHandler, -} from '@aws-lambda-powertools/commons/types'; +import type { ConfigServiceInterface } from './ConfigServiceInterface.js'; +import type { HandlerMethodDecorator } from '@aws-lambda-powertools/commons/types'; +import type { Segment, Subsegment } from 'aws-xray-sdk-core'; /** * Options for the tracer class to be used during initialization. @@ -100,28 +96,51 @@ type CaptureMethodOptions = { captureResponse?: boolean; }; -type HandlerMethodDecorator = ( - target: LambdaInterface, +// eslint-disable-next-line @typescript-eslint/no-explicit-any +type AnyClassMethod = (...args: any[]) => any; +// eslint-disable-next-line @typescript-eslint/no-explicit-any +type AnyClass = new (...args: any[]) => any; + +type MethodDecorator = ( + target: InstanceType, propertyKey: string | symbol, - descriptor: - | TypedPropertyDescriptor> - | TypedPropertyDescriptor> + descriptor: TypedPropertyDescriptor ) => void; -// TODO: Revisit type below & make it more specific -type MethodDecorator = ( - // eslint-disable-next-line @typescript-eslint/no-explicit-any - target: any, - propertyKey: string | symbol, - // eslint-disable-next-line @typescript-eslint/no-explicit-any - descriptor: TypedPropertyDescriptor - // eslint-disable-next-line @typescript-eslint/no-explicit-any -) => any; +interface TracerInterface { + addErrorAsMetadata(error: Error, remote?: boolean): void; + addResponseAsMetadata(data?: unknown, methodName?: string): void; + addServiceNameAnnotation(): void; + annotateColdStart(): void; + captureAWS(aws: T): void | T; + captureAWSv3Client(service: T): void | T; + captureAWSClient(service: T): void | T; + captureLambdaHandler( + options?: CaptureLambdaHandlerOptions + ): HandlerMethodDecorator; + captureMethod( + options?: CaptureMethodOptions + ): MethodDecorator; + getSegment(): Segment | Subsegment | undefined; + getRootXrayTraceId(): string | undefined; + isTraceSampled(): boolean; + isTracingEnabled(): boolean; + putAnnotation: (key: string, value: string | number | boolean) => void; + putMetadata: ( + key: string, + value: unknown, + namespace?: string | undefined + ) => void; + setSegment(segment: Segment | Subsegment): void; +} export { TracerOptions, CaptureLambdaHandlerOptions, CaptureMethodOptions, HandlerMethodDecorator, + AnyClass, + AnyClassMethod, MethodDecorator, + TracerInterface, }; diff --git a/packages/tracer/src/types/index.ts b/packages/tracer/src/types/index.ts index 8f8f55c173..9c5074d83a 100644 --- a/packages/tracer/src/types/index.ts +++ b/packages/tracer/src/types/index.ts @@ -1 +1,10 @@ -export * from './Tracer'; +export { + TracerOptions, + CaptureLambdaHandlerOptions, + CaptureMethodOptions, + HandlerMethodDecorator, + AnyClass, + AnyClassMethod, + MethodDecorator, + TracerInterface, +} from './Tracer.js'; diff --git a/packages/tracer/tests/e2e/allFeatures.decorator.test.functionCode.ts b/packages/tracer/tests/e2e/allFeatures.decorator.test.functionCode.ts index 90480bc3cd..ca2f6ace93 100644 --- a/packages/tracer/tests/e2e/allFeatures.decorator.test.functionCode.ts +++ b/packages/tracer/tests/e2e/allFeatures.decorator.test.functionCode.ts @@ -1,4 +1,4 @@ -import { Tracer } from '../../src'; +import { Tracer } from '../../src/Tracer.js'; import type { Callback, Context } from 'aws-lambda'; import AWS from 'aws-sdk'; import axios from 'axios'; @@ -79,8 +79,6 @@ export class MyFunctionBase { class MyFunctionWithDecorator extends MyFunctionBase { @tracer.captureLambdaHandler() - // eslint-disable-next-line @typescript-eslint/ban-ts-comment - // @ts-ignore public handler( event: CustomEvent, _context: Context, @@ -90,8 +88,6 @@ class MyFunctionWithDecorator extends MyFunctionBase { } @tracer.captureMethod() - // eslint-disable-next-line @typescript-eslint/ban-ts-comment - // @ts-ignore public myMethod(): string { return super.myMethod(); } @@ -102,8 +98,6 @@ export const handler = handlerClass.handler.bind(handlerClass); class MyFunctionWithDecoratorCaptureResponseFalse extends MyFunctionBase { @tracer.captureLambdaHandler({ captureResponse: false }) - // eslint-disable-next-line @typescript-eslint/ban-ts-comment - // @ts-ignore public handler( event: CustomEvent, _context: Context, @@ -113,8 +107,6 @@ class MyFunctionWithDecoratorCaptureResponseFalse extends MyFunctionBase { } @tracer.captureMethod({ captureResponse: false }) - // eslint-disable-next-line @typescript-eslint/ban-ts-comment - // @ts-ignore public myMethod(): string { return super.myMethod(); } diff --git a/packages/tracer/tests/e2e/allFeatures.decorator.test.ts b/packages/tracer/tests/e2e/allFeatures.decorator.test.ts index 7c9d3fb251..0dfeb15b79 100644 --- a/packages/tracer/tests/e2e/allFeatures.decorator.test.ts +++ b/packages/tracer/tests/e2e/allFeatures.decorator.test.ts @@ -6,25 +6,25 @@ import { TestStack } from '@aws-lambda-powertools/testing-utils'; import { TestDynamodbTable } from '@aws-lambda-powertools/testing-utils/resources/dynamodb'; import { join } from 'node:path'; -import { TracerTestNodejsFunction } from '../helpers/resources'; +import { TracerTestNodejsFunction } from '../helpers/resources.js'; import { assertAnnotation, assertErrorAndFault, -} from '../helpers/traceAssertions'; +} from '../helpers/traceAssertions.js'; import { getFirstSubsegment, getInvocationSubsegment, getTraces, invokeAllTestCases, splitSegmentsByName, -} from '../helpers/tracesUtils'; +} from '../helpers/tracesUtils.js'; import { commonEnvironmentVars, RESOURCE_NAME_PREFIX, SETUP_TIMEOUT, TEARDOWN_TIMEOUT, TEST_CASE_TIMEOUT, -} from './constants'; +} from './constants.js'; /** * The test includes one stack with 4 Lambda functions that correspond to the following test cases: diff --git a/packages/tracer/tests/e2e/allFeatures.manual.test.functionCode.ts b/packages/tracer/tests/e2e/allFeatures.manual.test.functionCode.ts index f7bd2cda64..95cdc3fd33 100644 --- a/packages/tracer/tests/e2e/allFeatures.manual.test.functionCode.ts +++ b/packages/tracer/tests/e2e/allFeatures.manual.test.functionCode.ts @@ -1,4 +1,4 @@ -import { Tracer } from '../../src'; +import { Tracer } from '../../src/index.js'; import type { Context } from 'aws-lambda'; import axios from 'axios'; import AWS from 'aws-sdk'; diff --git a/packages/tracer/tests/e2e/allFeatures.manual.test.ts b/packages/tracer/tests/e2e/allFeatures.manual.test.ts index 98f4767501..280a1c3efd 100644 --- a/packages/tracer/tests/e2e/allFeatures.manual.test.ts +++ b/packages/tracer/tests/e2e/allFeatures.manual.test.ts @@ -5,27 +5,27 @@ */ import { TestStack } from '@aws-lambda-powertools/testing-utils'; import { TestDynamodbTable } from '@aws-lambda-powertools/testing-utils/resources/dynamodb'; -import { join } from 'path'; -import { TracerTestNodejsFunction } from '../helpers/resources'; +import { join } from 'node:path'; +import { TracerTestNodejsFunction } from '../helpers/resources.js'; import { assertAnnotation, assertErrorAndFault, -} from '../helpers/traceAssertions'; +} from '../helpers/traceAssertions.js'; import { getFirstSubsegment, getInvocationSubsegment, getTraces, invokeAllTestCases, splitSegmentsByName, -} from '../helpers/tracesUtils'; -import type { ParsedTrace } from '../helpers/traceUtils.types'; + type ParsedTrace, +} from '../helpers/tracesUtils.js'; import { commonEnvironmentVars, RESOURCE_NAME_PREFIX, SETUP_TIMEOUT, TEARDOWN_TIMEOUT, TEST_CASE_TIMEOUT, -} from './constants'; +} from './constants.js'; describe(`Tracer E2E tests, all features with manual instantiation`, () => { const testStack = new TestStack({ diff --git a/packages/tracer/tests/e2e/allFeatures.middy.test.functionCode.ts b/packages/tracer/tests/e2e/allFeatures.middy.test.functionCode.ts index 2dd55050da..f55af0bdd4 100644 --- a/packages/tracer/tests/e2e/allFeatures.middy.test.functionCode.ts +++ b/packages/tracer/tests/e2e/allFeatures.middy.test.functionCode.ts @@ -1,5 +1,6 @@ import middy from '@middy/core'; -import { captureLambdaHandler, Tracer } from '../../src'; +import { Tracer } from '../../src/index.js'; +import { captureLambdaHandler } from '../../src/middleware/middy.js'; import type { Context } from 'aws-lambda'; import { DynamoDBClient, PutItemCommand } from '@aws-sdk/client-dynamodb'; import axios from 'axios'; diff --git a/packages/tracer/tests/e2e/allFeatures.middy.test.ts b/packages/tracer/tests/e2e/allFeatures.middy.test.ts index cb7603928e..23d2fdfc23 100644 --- a/packages/tracer/tests/e2e/allFeatures.middy.test.ts +++ b/packages/tracer/tests/e2e/allFeatures.middy.test.ts @@ -6,25 +6,25 @@ import { TestStack } from '@aws-lambda-powertools/testing-utils'; import { TestDynamodbTable } from '@aws-lambda-powertools/testing-utils/resources/dynamodb'; import { join } from 'node:path'; -import { TracerTestNodejsFunction } from '../helpers/resources'; +import { TracerTestNodejsFunction } from '../helpers/resources.js'; import { assertAnnotation, assertErrorAndFault, -} from '../helpers/traceAssertions'; +} from '../helpers/traceAssertions.js'; import { getFirstSubsegment, getInvocationSubsegment, getTraces, invokeAllTestCases, splitSegmentsByName, -} from '../helpers/tracesUtils'; +} from '../helpers/tracesUtils.js'; import { commonEnvironmentVars, RESOURCE_NAME_PREFIX, SETUP_TIMEOUT, TEARDOWN_TIMEOUT, TEST_CASE_TIMEOUT, -} from './constants'; +} from './constants.js'; /** * The test includes one stack with 4 Lambda functions that correspond to the following test cases: diff --git a/packages/tracer/tests/e2e/asyncHandler.decorator.test.functionCode.ts b/packages/tracer/tests/e2e/asyncHandler.decorator.test.functionCode.ts index 98ee23cbf1..6d60a7b53e 100644 --- a/packages/tracer/tests/e2e/asyncHandler.decorator.test.functionCode.ts +++ b/packages/tracer/tests/e2e/asyncHandler.decorator.test.functionCode.ts @@ -1,4 +1,4 @@ -import { Tracer } from '../../src'; +import { Tracer } from '../../src/index.js'; import type { Context } from 'aws-lambda'; import { DynamoDBClient } from '@aws-sdk/client-dynamodb'; import { DynamoDBDocumentClient, PutCommand } from '@aws-sdk/lib-dynamodb'; diff --git a/packages/tracer/tests/e2e/asyncHandler.decorator.test.ts b/packages/tracer/tests/e2e/asyncHandler.decorator.test.ts index dcd4982616..557031143a 100644 --- a/packages/tracer/tests/e2e/asyncHandler.decorator.test.ts +++ b/packages/tracer/tests/e2e/asyncHandler.decorator.test.ts @@ -6,25 +6,25 @@ import { TestStack } from '@aws-lambda-powertools/testing-utils'; import { TestDynamodbTable } from '@aws-lambda-powertools/testing-utils/resources/dynamodb'; import { join } from 'node:path'; -import { TracerTestNodejsFunction } from '../helpers/resources'; +import { TracerTestNodejsFunction } from '../helpers/resources.js'; import { assertAnnotation, assertErrorAndFault, -} from '../helpers/traceAssertions'; +} from '../helpers/traceAssertions.js'; import { getFirstSubsegment, getInvocationSubsegment, getTraces, invokeAllTestCases, splitSegmentsByName, -} from '../helpers/tracesUtils'; +} from '../helpers/tracesUtils.js'; import { commonEnvironmentVars, RESOURCE_NAME_PREFIX, SETUP_TIMEOUT, TEARDOWN_TIMEOUT, TEST_CASE_TIMEOUT, -} from './constants'; +} from './constants.js'; describe(`Tracer E2E tests, async handler with decorator instantiation`, () => { const testStack = new TestStack({ diff --git a/packages/tracer/tests/helpers/resources.ts b/packages/tracer/tests/helpers/resources.ts index 4dc61ead4b..edd4faa769 100644 --- a/packages/tracer/tests/helpers/resources.ts +++ b/packages/tracer/tests/helpers/resources.ts @@ -4,7 +4,7 @@ import type { TestNodejsFunctionProps, } from '@aws-lambda-powertools/testing-utils/types'; import { TestNodejsFunction } from '@aws-lambda-powertools/testing-utils/resources/lambda'; -import { commonEnvironmentVars } from '../e2e/constants'; +import { commonEnvironmentVars } from '../e2e/constants.js'; class TracerTestNodejsFunction extends TestNodejsFunction { public constructor( diff --git a/packages/tracer/tests/helpers/traceAssertions.ts b/packages/tracer/tests/helpers/traceAssertions.ts index 8ad7b31ee8..559be2dfa1 100644 --- a/packages/tracer/tests/helpers/traceAssertions.ts +++ b/packages/tracer/tests/helpers/traceAssertions.ts @@ -1,8 +1,8 @@ -import { getFirstSubsegment } from './tracesUtils'; -import type { - AssertAnnotationParams, - ParsedDocument, -} from './traceUtils.types'; +import { + getFirstSubsegment, + type AssertAnnotationParams, + type ParsedDocument, +} from './tracesUtils.js'; export const assertAnnotation = (params: AssertAnnotationParams): void => { const { diff --git a/packages/tracer/tests/helpers/traceUtils.types.ts b/packages/tracer/tests/helpers/traceUtils.types.ts deleted file mode 100644 index fc2c8cac05..0000000000 --- a/packages/tracer/tests/helpers/traceUtils.types.ts +++ /dev/null @@ -1,70 +0,0 @@ -interface ParsedDocument { - name: string; - id: string; - start_time: number; - end_time?: number; - // This flag may be set if the segment hasn't been fully processed - // The trace may have already appeared in the `getTraceSummaries` response - // but a segment may still be in_progress - in_progress?: boolean; - aws?: { - request_id: string; - }; - http?: { - response: { - status: number; - }; - }; - origin?: string; - resource_arn?: string; - trace_id?: string; - subsegments?: ParsedDocument[]; - annotations?: { - [key: string]: string | boolean | number; - }; - metadata?: { - [key: string]: { - [key: string]: unknown; - }; - }; - fault?: boolean; - cause?: { - working_directory: string; - exceptions: { - message: string; - type: string; - remote: boolean; - stack: { - path: string; - line: number; - label: string; - }[]; - }[]; - }; - exception: { - message: string; - }; - error?: boolean; -} - -interface ParsedSegment { - Document: ParsedDocument; - Id: string; -} - -interface ParsedTrace { - Duration: number; - Id: string; - LimitExceeded: boolean; - Segments: ParsedSegment[]; -} - -interface AssertAnnotationParams { - annotations: ParsedDocument['annotations']; - isColdStart: boolean; - expectedServiceName: string; - expectedCustomAnnotationKey: string; - expectedCustomAnnotationValue: string | number | boolean; -} - -export { ParsedDocument, ParsedSegment, ParsedTrace, AssertAnnotationParams }; diff --git a/packages/tracer/tests/helpers/tracesUtils.ts b/packages/tracer/tests/helpers/tracesUtils.ts index 7995474a3b..b12b234175 100644 --- a/packages/tracer/tests/helpers/tracesUtils.ts +++ b/packages/tracer/tests/helpers/tracesUtils.ts @@ -5,12 +5,76 @@ import { GetTraceSummariesCommand, } from '@aws-sdk/client-xray'; import { invokeFunction } from '@aws-lambda-powertools/testing-utils'; -import { FunctionSegmentNotDefinedError } from './FunctionSegmentNotDefinedError'; -import type { - ParsedDocument, - ParsedSegment, - ParsedTrace, -} from './traceUtils.types'; +import { FunctionSegmentNotDefinedError } from './FunctionSegmentNotDefinedError.js'; + +interface ParsedDocument { + name: string; + id: string; + start_time: number; + end_time?: number; + // This flag may be set if the segment hasn't been fully processed + // The trace may have already appeared in the `getTraceSummaries` response + // but a segment may still be in_progress + in_progress?: boolean; + aws?: { + request_id: string; + }; + http?: { + response: { + status: number; + }; + }; + origin?: string; + resource_arn?: string; + trace_id?: string; + subsegments?: ParsedDocument[]; + annotations?: { + [key: string]: string | boolean | number; + }; + metadata?: { + [key: string]: { + [key: string]: unknown; + }; + }; + fault?: boolean; + cause?: { + working_directory: string; + exceptions: { + message: string; + type: string; + remote: boolean; + stack: { + path: string; + line: number; + label: string; + }[]; + }[]; + }; + exception: { + message: string; + }; + error?: boolean; +} + +interface ParsedSegment { + Document: ParsedDocument; + Id: string; +} + +interface ParsedTrace { + Duration: number; + Id: string; + LimitExceeded: boolean; + Segments: ParsedSegment[]; +} + +interface AssertAnnotationParams { + annotations: ParsedDocument['annotations']; + isColdStart: boolean; + expectedServiceName: string; + expectedCustomAnnotationKey: string; + expectedCustomAnnotationValue: string | number | boolean; +} type GetTracesOptions = { startTime: Date; @@ -250,4 +314,8 @@ export { getInvocationSubsegment, splitSegmentsByName, invokeAllTestCases, + ParsedDocument, + ParsedSegment, + ParsedTrace, + AssertAnnotationParams, }; diff --git a/packages/tracer/tests/unit/config/EnvironmentVariablesService.test.ts b/packages/tracer/tests/unit/EnvironmentVariablesService.test.ts similarity index 96% rename from packages/tracer/tests/unit/config/EnvironmentVariablesService.test.ts rename to packages/tracer/tests/unit/EnvironmentVariablesService.test.ts index 9e2adf9eb2..d20692b6dd 100644 --- a/packages/tracer/tests/unit/config/EnvironmentVariablesService.test.ts +++ b/packages/tracer/tests/unit/EnvironmentVariablesService.test.ts @@ -4,7 +4,7 @@ * @group unit/tracer/all */ -import { EnvironmentVariablesService } from '../../../src/config'; +import { EnvironmentVariablesService } from '../../src/config/EnvironmentVariablesService.js'; describe('Class: EnvironmentVariablesService', () => { const ENVIRONMENT_VARIABLES = process.env; diff --git a/packages/tracer/tests/unit/ProviderService.test.ts b/packages/tracer/tests/unit/ProviderService.test.ts index 1b74701b26..f7fe81ab62 100644 --- a/packages/tracer/tests/unit/ProviderService.test.ts +++ b/packages/tracer/tests/unit/ProviderService.test.ts @@ -3,8 +3,7 @@ * * @group unit/tracer/providerservice */ - -import { ProviderService } from '../../src/provider'; +import { ProviderService } from '../../src/provider/ProviderService.js'; import { captureAsyncFunc, captureAWS, @@ -21,8 +20,8 @@ import { setSegment, Subsegment, } from 'aws-xray-sdk-core'; -import http from 'http'; -import https from 'https'; +import http from 'node:http'; +import https from 'node:https'; import { DynamoDBClient } from '@aws-sdk/client-dynamodb'; import { addUserAgentMiddleware } from '@aws-lambda-powertools/commons'; diff --git a/packages/tracer/tests/unit/Tracer.test.ts b/packages/tracer/tests/unit/Tracer.test.ts index a6381d4fac..784403daa5 100644 --- a/packages/tracer/tests/unit/Tracer.test.ts +++ b/packages/tracer/tests/unit/Tracer.test.ts @@ -5,15 +5,15 @@ */ import context from '@aws-lambda-powertools/testing-utils/context'; import type { LambdaInterface } from '@aws-lambda-powertools/commons/types'; -import { Tracer } from './../../src'; -import type { Callback, Context } from 'aws-lambda/handler'; +import { Tracer } from './../../src/index.js'; +import type { Callback, Context } from 'aws-lambda'; import { Segment, setContextMissingStrategy, Subsegment, } from 'aws-xray-sdk-core'; -import { ProviderServiceInterface } from '../../src/provider'; -import { ConfigServiceInterface } from 'packages/tracer/src/config'; +import type { ProviderServiceInterface } from '../../src/types/ProviderServiceInterface.js'; +import type { ConfigServiceInterface } from '../../src/types/ConfigServiceInterface.js'; type CaptureAsyncFuncMock = jest.SpyInstance< unknown, diff --git a/packages/tracer/tests/unit/middy.test.ts b/packages/tracer/tests/unit/middy.test.ts index 8195d89392..572843c284 100644 --- a/packages/tracer/tests/unit/middy.test.ts +++ b/packages/tracer/tests/unit/middy.test.ts @@ -3,10 +3,10 @@ * * @group unit/tracer/all */ -import { captureLambdaHandler } from '../../src/middleware/middy'; +import { captureLambdaHandler } from '../../src/middleware/middy.js'; import middy from '@middy/core'; -import { Tracer } from './../../src'; -import type { Context, Handler } from 'aws-lambda/handler'; +import { Tracer } from './../../src/index.js'; +import type { Context, Handler } from 'aws-lambda'; import { Segment, setContextMissingStrategy, diff --git a/packages/tracer/tsconfig.esm.json b/packages/tracer/tsconfig.esm.json new file mode 100644 index 0000000000..9bed8e4da4 --- /dev/null +++ b/packages/tracer/tsconfig.esm.json @@ -0,0 +1,11 @@ +{ + "extends": "../../tsconfig.esm.json", + "compilerOptions": { + "baseUrl": ".", + "outDir": "./lib/esm", + "rootDir": "./src" + }, + "include": [ + "./src/**/*" + ] +} \ No newline at end of file diff --git a/packages/tracer/tsconfig.json b/packages/tracer/tsconfig.json index 1cb9d72773..a30fdead42 100644 --- a/packages/tracer/tsconfig.json +++ b/packages/tracer/tsconfig.json @@ -1,7 +1,7 @@ { "extends": "../../tsconfig.json", "compilerOptions": { - "outDir": "./lib", + "outDir": "./lib/cjs", "rootDir": "./src", }, "include": [ From 79c43c8d3a27071a8017fc4dfd46a97ca053b7aa Mon Sep 17 00:00:00 2001 From: Andrea Amorosi Date: Thu, 12 Oct 2023 18:38:12 +0200 Subject: [PATCH 20/60] feat(idempotency): add esmodule support (#1743) * feat(idempotency): add esmodule support --- .../{jest.config.js => jest.config.cjs} | 3 + packages/idempotency/package.json | 57 +++++++++++++------ packages/idempotency/src/IdempotencyConfig.ts | 4 +- .../idempotency/src/IdempotencyHandler.ts | 14 +++-- .../src/config/EnvironmentVariablesService.ts | 2 +- packages/idempotency/src/config/index.ts | 1 - .../idempotency/src/idempotencyDecorator.ts | 7 ++- packages/idempotency/src/index.ts | 19 +++++-- packages/idempotency/src/makeIdempotent.ts | 6 +- packages/idempotency/src/middleware/index.ts | 1 - .../src/middleware/makeHandlerIdempotent.ts | 9 ++- .../src/persistence/BasePersistenceLayer.ts | 21 ++++--- .../BasePersistenceLayerInterface.ts | 14 ----- .../persistence/DynamoDBPersistenceLayer.ts | 10 ++-- .../src/persistence/IdempotencyRecord.ts | 6 +- .../idempotency/src/persistence/LRUCache.ts | 2 +- packages/idempotency/src/persistence/index.ts | 5 +- .../src/types/BasePersistenceLayer.ts | 14 ++++- .../ConfigServiceInterface.ts | 0 .../src/types/IdempotencyOptions.ts | 4 +- .../src/types/IdempotencyRecord.ts | 2 +- packages/idempotency/src/types/index.ts | 18 ++++-- .../idempotentDecorator.test.FunctionCode.ts | 8 +-- .../tests/e2e/idempotentDecorator.test.ts | 13 +---- ...makeHandlerIdempotent.test.FunctionCode.ts | 6 +- .../tests/e2e/makeHandlerIdempotent.test.ts | 4 +- .../e2e/makeIdempotent.test.FunctionCode.ts | 6 +- .../tests/e2e/makeIdempotent.test.ts | 2 +- .../tests/helpers/idempotencyUtils.ts | 2 +- .../EnvironmentVariableService.test.ts | 2 +- .../tests/unit/IdempotencyConfig.test.ts | 4 +- .../tests/unit/IdempotencyHandler.test.ts | 12 ++-- .../tests/unit/idempotencyDecorator.test.ts | 15 +++-- .../tests/unit/makeHandlerIdempotent.test.ts | 13 +++-- .../tests/unit/makeIdempotent.test.ts | 13 +++-- .../persistence/BasePersistenceLayer.test.ts | 20 ++++--- .../DynamoDbPersistenceLayer.test.ts | 10 ++-- .../persistence/IdempotencyRecord.test.ts | 10 ++-- .../tests/unit/persistence/LRUCache.test.ts | 2 +- packages/idempotency/tsconfig.esm.json | 11 ++++ packages/idempotency/tsconfig.json | 2 +- 41 files changed, 219 insertions(+), 155 deletions(-) rename packages/idempotency/{jest.config.js => jest.config.cjs} (93%) delete mode 100644 packages/idempotency/src/config/index.ts delete mode 100644 packages/idempotency/src/middleware/index.ts delete mode 100644 packages/idempotency/src/persistence/BasePersistenceLayerInterface.ts rename packages/idempotency/src/{config => types}/ConfigServiceInterface.ts (100%) rename packages/idempotency/tests/unit/{config => }/EnvironmentVariableService.test.ts (92%) create mode 100644 packages/idempotency/tsconfig.esm.json diff --git a/packages/idempotency/jest.config.js b/packages/idempotency/jest.config.cjs similarity index 93% rename from packages/idempotency/jest.config.js rename to packages/idempotency/jest.config.cjs index 7a512f0d83..758a5e9f23 100644 --- a/packages/idempotency/jest.config.js +++ b/packages/idempotency/jest.config.cjs @@ -5,6 +5,9 @@ module.exports = { }, runner: 'groups', preset: 'ts-jest', + moduleNameMapper: { + '^(\\.{1,2}/.*)\\.js$': '$1', + }, transform: { '^.+\\.ts?$': 'ts-jest', }, diff --git a/packages/idempotency/package.json b/packages/idempotency/package.json index e0d6024160..2f107526e7 100644 --- a/packages/idempotency/package.json +++ b/packages/idempotency/package.json @@ -16,57 +16,78 @@ "test:e2e:nodejs18x": "RUNTIME=nodejs18x jest --group=e2e", "test:e2e": "jest --group=e2e", "watch": "jest --watch", - "build": "tsc --build --force", + "build:cjs": "tsc --build --force && echo '{ \"type\": \"commonjs\" }' > lib/cjs/package.json", + "build:esm": "tsc --project tsconfig.esm.json && echo '{ \"type\": \"module\" }' > lib/esm/package.json", + "build": "npm run build:esm & npm run build:cjs", "lint": "eslint --ext .ts,.js --no-error-on-unmatched-pattern .", "lint-fix": "eslint --fix --ext .ts,.js --no-error-on-unmatched-pattern .", "prebuild": "rimraf ./lib", - "prepack": "node ../../.github/scripts/release_patch_package_json.js ." + "prepack": "rimraf ./lib/*.tsbuildinfo && node ../../.github/scripts/release_patch_package_json.js ." }, "lint-staged": { "*.{js,ts}": "npm run lint-fix" }, "homepage": "https://github.com/aws-powertools/powertools-lambda-typescript/tree/main/packages/idempotency#readme", "license": "MIT-0", + "type": "module", "exports": { ".": { - "import": "./lib/index.js", - "require": "./lib/index.js" + "require": { + "types": "./lib/cjs/index.d.ts", + "default": "./lib/cjs/index.js" + }, + "import": { + "types": "./lib/esm/index.d.ts", + "default": "./lib/esm/index.js" + } }, "./persistence": { - "import": "./lib/persistence/index.js", - "require": "./lib/persistence/index.js" + "import": "./lib/esm/persistence/index.js", + "require": "./lib/cjs/persistence/index.js" }, "./dynamodb": { - "import": "./lib/persistence/DynamoDBPersistenceLayer.js", - "require": "./lib/persistence/DynamoDBPersistenceLayer.js" + "import": "./lib/esm/persistence/DynamoDBPersistenceLayer.js", + "require": "./lib/cjs/persistence/DynamoDBPersistenceLayer.js" + }, + "./dynamodb/types": { + "import": "./lib/esm/types/DynamoDBPersistence.js", + "require": "./lib/cjs/types/DynamoDBPersistence.js" }, "./middleware": { - "import": "./lib/middleware/index.js", - "require": "./lib/middleware/index.js" + "import": "./lib/esm/middleware/makeHandlerIdempotent.js", + "require": "./lib/cjs/middleware/makeHandlerIdempotent.js" }, "./types": { - "import": "./lib/types/index.d.ts", - "require": "./lib/types/index.d.ts" + "import": "./lib/esm/types/index.d.ts", + "require": "./lib/esm/types/index.d.ts" } }, "typesVersions": { "*": { "persistence": [ - "lib/persistence/index.d.ts" + "lib/esm/persistence/index.d.ts", + "lib/cjs/persistence/index.d.ts" ], "dynamodb": [ - "lib/persistence/DynamoDBPersistenceLayer.d.ts" + "lib/esm/persistence/DynamoDBPersistenceLayer.d.ts", + "lib/cjs/persistence/DynamoDBPersistenceLayer.d.ts" + ], + "dynamodb/types": [ + "lib/esm/types/DynamoDBPersistence.d.ts", + "lib/cjs/types/DynamoDBPersistence.d.ts" ], "middleware": [ - "lib/middleware/index.d.ts" + "lib/esm/middleware/makeHandlerIdempotent.d.ts", + "lib/cjs/middleware/makeHandlerIdempotent.d.ts" ], "types": [ - "lib/types/index.d.ts" + "lib/esm/types/index.d.ts", + "lib/cjs/types/index.d.ts" ] } }, - "main": "./lib/index.js", - "types": "./lib/index.d.ts", + "types": "./lib/cjs/index.d.ts", + "main": "./lib/cjs/index.js", "files": [ "lib" ], diff --git a/packages/idempotency/src/IdempotencyConfig.ts b/packages/idempotency/src/IdempotencyConfig.ts index 95b8a96a99..0f5afc6f09 100644 --- a/packages/idempotency/src/IdempotencyConfig.ts +++ b/packages/idempotency/src/IdempotencyConfig.ts @@ -1,6 +1,6 @@ -import { EnvironmentVariablesService } from './config'; +import { EnvironmentVariablesService } from './config/EnvironmentVariablesService.js'; import type { Context } from 'aws-lambda'; -import type { IdempotencyConfigOptions } from './types'; +import type { IdempotencyConfigOptions } from './types/IdempotencyOptions.js'; /** * Configuration for the idempotency feature. diff --git a/packages/idempotency/src/IdempotencyHandler.ts b/packages/idempotency/src/IdempotencyHandler.ts index c2e85dfeb0..bc52c5d904 100644 --- a/packages/idempotency/src/IdempotencyHandler.ts +++ b/packages/idempotency/src/IdempotencyHandler.ts @@ -2,16 +2,20 @@ import type { JSONValue, MiddyLikeRequest, } from '@aws-lambda-powertools/commons/types'; -import type { AnyFunction, IdempotencyHandlerOptions } from './types'; +import type { + AnyFunction, + IdempotencyHandlerOptions, +} from './types/IdempotencyOptions.js'; import { IdempotencyAlreadyInProgressError, IdempotencyInconsistentStateError, IdempotencyItemAlreadyExistsError, IdempotencyPersistenceLayerError, -} from './errors'; -import { BasePersistenceLayer, IdempotencyRecord } from './persistence'; -import { IdempotencyConfig } from './IdempotencyConfig'; -import { MAX_RETRIES, IdempotencyRecordStatus } from './constants'; +} from './errors.js'; +import { BasePersistenceLayer } from './persistence/BasePersistenceLayer.js'; +import { IdempotencyRecord } from './persistence/IdempotencyRecord.js'; +import { IdempotencyConfig } from './IdempotencyConfig.js'; +import { MAX_RETRIES, IdempotencyRecordStatus } from './constants.js'; import { search } from 'jmespath'; /** diff --git a/packages/idempotency/src/config/EnvironmentVariablesService.ts b/packages/idempotency/src/config/EnvironmentVariablesService.ts index 2eef2a1b4f..99a7452e43 100644 --- a/packages/idempotency/src/config/EnvironmentVariablesService.ts +++ b/packages/idempotency/src/config/EnvironmentVariablesService.ts @@ -1,4 +1,4 @@ -import { ConfigServiceInterface } from './ConfigServiceInterface'; +import type { ConfigServiceInterface } from '../types/ConfigServiceInterface.js'; import { EnvironmentVariablesService as CommonEnvironmentVariablesService } from '@aws-lambda-powertools/commons'; /** diff --git a/packages/idempotency/src/config/index.ts b/packages/idempotency/src/config/index.ts deleted file mode 100644 index 3dfae2b192..0000000000 --- a/packages/idempotency/src/config/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './EnvironmentVariablesService'; diff --git a/packages/idempotency/src/idempotencyDecorator.ts b/packages/idempotency/src/idempotencyDecorator.ts index 6b20a38e21..f66da1ea8d 100644 --- a/packages/idempotency/src/idempotencyDecorator.ts +++ b/packages/idempotency/src/idempotencyDecorator.ts @@ -1,5 +1,8 @@ -import { AnyFunction, ItempotentFunctionOptions } from './types'; -import { makeIdempotent } from './makeIdempotent'; +import { + AnyFunction, + ItempotentFunctionOptions, +} from './types/IdempotencyOptions.js'; +import { makeIdempotent } from './makeIdempotent.js'; /** * Use this decorator to make your lambda handler itempotent. diff --git a/packages/idempotency/src/index.ts b/packages/idempotency/src/index.ts index 0b86f82a69..ced4539b1d 100644 --- a/packages/idempotency/src/index.ts +++ b/packages/idempotency/src/index.ts @@ -1,5 +1,14 @@ -export * from './errors'; -export * from './IdempotencyConfig'; -export * from './makeIdempotent'; -export * from './idempotencyDecorator'; -export { IdempotencyRecordStatus } from './constants'; +export { + IdempotencyItemAlreadyExistsError, + IdempotencyItemNotFoundError, + IdempotencyAlreadyInProgressError, + IdempotencyInvalidStatusError, + IdempotencyValidationError, + IdempotencyInconsistentStateError, + IdempotencyPersistenceLayerError, + IdempotencyKeyError, +} from './errors.js'; +export { IdempotencyConfig } from './IdempotencyConfig.js'; +export { makeIdempotent } from './makeIdempotent.js'; +export { idempotent } from './idempotencyDecorator.js'; +export { IdempotencyRecordStatus } from './constants.js'; diff --git a/packages/idempotency/src/makeIdempotent.ts b/packages/idempotency/src/makeIdempotent.ts index 8bae3cdf6d..dafb807e53 100644 --- a/packages/idempotency/src/makeIdempotent.ts +++ b/packages/idempotency/src/makeIdempotent.ts @@ -3,9 +3,9 @@ import type { AnyFunction, ItempotentFunctionOptions, IdempotencyLambdaHandlerOptions, -} from './types'; -import { IdempotencyHandler } from './IdempotencyHandler'; -import { IdempotencyConfig } from './IdempotencyConfig'; +} from './types/IdempotencyOptions.js'; +import { IdempotencyHandler } from './IdempotencyHandler.js'; +import { IdempotencyConfig } from './IdempotencyConfig.js'; const isContext = (arg: unknown): arg is Context => { return ( diff --git a/packages/idempotency/src/middleware/index.ts b/packages/idempotency/src/middleware/index.ts deleted file mode 100644 index c95b47d06a..0000000000 --- a/packages/idempotency/src/middleware/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './makeHandlerIdempotent'; diff --git a/packages/idempotency/src/middleware/makeHandlerIdempotent.ts b/packages/idempotency/src/middleware/makeHandlerIdempotent.ts index 55edb314dc..3ce92a73a2 100644 --- a/packages/idempotency/src/middleware/makeHandlerIdempotent.ts +++ b/packages/idempotency/src/middleware/makeHandlerIdempotent.ts @@ -1,10 +1,13 @@ -import { IdempotencyHandler } from '../IdempotencyHandler'; -import { IdempotencyConfig } from '../IdempotencyConfig'; +import { IdempotencyHandler } from '../IdempotencyHandler.js'; +import { IdempotencyConfig } from '../IdempotencyConfig.js'; import { cleanupMiddlewares, IDEMPOTENCY_KEY, } from '@aws-lambda-powertools/commons'; -import type { AnyFunction, IdempotencyLambdaHandlerOptions } from '../types'; +import type { + AnyFunction, + IdempotencyLambdaHandlerOptions, +} from '../types/IdempotencyOptions.js'; import type { MiddlewareLikeObj, MiddyLikeRequest, diff --git a/packages/idempotency/src/persistence/BasePersistenceLayer.ts b/packages/idempotency/src/persistence/BasePersistenceLayer.ts index 1f1ff33e84..afd448d6d1 100644 --- a/packages/idempotency/src/persistence/BasePersistenceLayer.ts +++ b/packages/idempotency/src/persistence/BasePersistenceLayer.ts @@ -1,15 +1,18 @@ import { createHash, Hash } from 'node:crypto'; import { search } from 'jmespath'; -import type { BasePersistenceLayerOptions } from '../types'; -import { IdempotencyRecordStatus } from '../constants'; -import { EnvironmentVariablesService } from '../config'; -import { IdempotencyRecord } from './IdempotencyRecord'; -import { BasePersistenceLayerInterface } from './BasePersistenceLayerInterface'; +import type { + BasePersistenceLayerOptions, + BasePersistenceLayerInterface, +} from '../types/BasePersistenceLayer.js'; +import { IdempotencyRecordStatus } from '../constants.js'; +import { EnvironmentVariablesService } from '../config/EnvironmentVariablesService.js'; +import { IdempotencyRecord } from './IdempotencyRecord.js'; import { IdempotencyItemAlreadyExistsError, + IdempotencyKeyError, IdempotencyValidationError, -} from '../errors'; -import { LRUCache } from './LRUCache'; +} from '../errors.js'; +import { LRUCache } from './LRUCache.js'; import type { JSONValue } from '@aws-lambda-powertools/commons/types'; /** @@ -255,7 +258,9 @@ abstract class BasePersistenceLayer implements BasePersistenceLayerInterface { if (BasePersistenceLayer.isMissingIdempotencyKey(data)) { if (this.throwOnNoIdempotencyKey) { - throw new Error('No data found to create a hashed idempotency_key'); + throw new IdempotencyKeyError( + 'No data found to create a hashed idempotency_key' + ); } console.warn( `No value found for idempotency_key. jmespath: ${this.eventKeyJmesPath}` diff --git a/packages/idempotency/src/persistence/BasePersistenceLayerInterface.ts b/packages/idempotency/src/persistence/BasePersistenceLayerInterface.ts deleted file mode 100644 index f4e792082a..0000000000 --- a/packages/idempotency/src/persistence/BasePersistenceLayerInterface.ts +++ /dev/null @@ -1,14 +0,0 @@ -import { IdempotencyRecord } from './IdempotencyRecord'; -import type { BasePersistenceLayerOptions } from '../types/BasePersistenceLayer'; - -// TODO: move this to types folder -interface BasePersistenceLayerInterface { - configure(options?: BasePersistenceLayerOptions): void; - isPayloadValidationEnabled(): boolean; - saveInProgress(data: unknown, remainingTimeInMillis?: number): Promise; - saveSuccess(data: unknown, result: unknown): Promise; - deleteRecord(data: unknown): Promise; - getRecord(data: unknown): Promise; -} - -export { BasePersistenceLayerInterface }; diff --git a/packages/idempotency/src/persistence/DynamoDBPersistenceLayer.ts b/packages/idempotency/src/persistence/DynamoDBPersistenceLayer.ts index b4bd68e07f..5d1a651f00 100644 --- a/packages/idempotency/src/persistence/DynamoDBPersistenceLayer.ts +++ b/packages/idempotency/src/persistence/DynamoDBPersistenceLayer.ts @@ -1,9 +1,9 @@ import { IdempotencyItemAlreadyExistsError, IdempotencyItemNotFoundError, -} from '../errors'; -import { IdempotencyRecordStatus } from '../constants'; -import type { DynamoDBPersistenceOptions } from '../types'; +} from '../errors.js'; +import { IdempotencyRecordStatus } from '../constants.js'; +import type { DynamoDBPersistenceOptions } from '../types/DynamoDBPersistence.js'; import { AttributeValue, DeleteItemCommand, @@ -15,8 +15,8 @@ import { UpdateItemCommand, } from '@aws-sdk/client-dynamodb'; import { marshall, unmarshall } from '@aws-sdk/util-dynamodb'; -import { IdempotencyRecord } from './IdempotencyRecord'; -import { BasePersistenceLayer } from './BasePersistenceLayer'; +import { IdempotencyRecord } from './IdempotencyRecord.js'; +import { BasePersistenceLayer } from './BasePersistenceLayer.js'; import { addUserAgentMiddleware, isSdkClient, diff --git a/packages/idempotency/src/persistence/IdempotencyRecord.ts b/packages/idempotency/src/persistence/IdempotencyRecord.ts index feb618ddf5..3dba4af73c 100644 --- a/packages/idempotency/src/persistence/IdempotencyRecord.ts +++ b/packages/idempotency/src/persistence/IdempotencyRecord.ts @@ -2,9 +2,9 @@ import type { JSONValue } from '@aws-lambda-powertools/commons/types'; import type { IdempotencyRecordOptions, IdempotencyRecordStatusValue, -} from '../types'; -import { IdempotencyRecordStatus } from '../constants'; -import { IdempotencyInvalidStatusError } from '../errors'; +} from '../types/IdempotencyRecord.js'; +import { IdempotencyRecordStatus } from '../constants.js'; +import { IdempotencyInvalidStatusError } from '../errors.js'; /** * Class representing an idempotency record. diff --git a/packages/idempotency/src/persistence/LRUCache.ts b/packages/idempotency/src/persistence/LRUCache.ts index 583456d4aa..45b8630d4a 100644 --- a/packages/idempotency/src/persistence/LRUCache.ts +++ b/packages/idempotency/src/persistence/LRUCache.ts @@ -1,4 +1,4 @@ -import type { LRUCacheOptions } from '../types'; +import type { LRUCacheOptions } from '../types/LRUCache.js'; const DEFAULT_MAX_SIZE = 100; const NEWER = Symbol('newer'); diff --git a/packages/idempotency/src/persistence/index.ts b/packages/idempotency/src/persistence/index.ts index 72ea36e01f..73d7815170 100644 --- a/packages/idempotency/src/persistence/index.ts +++ b/packages/idempotency/src/persistence/index.ts @@ -1,3 +1,2 @@ -export * from './BasePersistenceLayer'; -export * from './BasePersistenceLayerInterface'; -export * from './IdempotencyRecord'; +export { BasePersistenceLayer } from './BasePersistenceLayer.js'; +export { IdempotencyRecord } from './IdempotencyRecord.js'; diff --git a/packages/idempotency/src/types/BasePersistenceLayer.ts b/packages/idempotency/src/types/BasePersistenceLayer.ts index b11db6f6b7..7bd61689f8 100644 --- a/packages/idempotency/src/types/BasePersistenceLayer.ts +++ b/packages/idempotency/src/types/BasePersistenceLayer.ts @@ -1,8 +1,18 @@ -import { IdempotencyConfig } from '../IdempotencyConfig'; +import { IdempotencyRecord } from '../persistence/IdempotencyRecord.js'; +import { IdempotencyConfig } from '../IdempotencyConfig.js'; type BasePersistenceLayerOptions = { config: IdempotencyConfig; functionName?: string; }; -export { BasePersistenceLayerOptions }; +interface BasePersistenceLayerInterface { + configure(options?: BasePersistenceLayerOptions): void; + isPayloadValidationEnabled(): boolean; + saveInProgress(data: unknown, remainingTimeInMillis?: number): Promise; + saveSuccess(data: unknown, result: unknown): Promise; + deleteRecord(data: unknown): Promise; + getRecord(data: unknown): Promise; +} + +export { BasePersistenceLayerOptions, BasePersistenceLayerInterface }; diff --git a/packages/idempotency/src/config/ConfigServiceInterface.ts b/packages/idempotency/src/types/ConfigServiceInterface.ts similarity index 100% rename from packages/idempotency/src/config/ConfigServiceInterface.ts rename to packages/idempotency/src/types/ConfigServiceInterface.ts diff --git a/packages/idempotency/src/types/IdempotencyOptions.ts b/packages/idempotency/src/types/IdempotencyOptions.ts index ea929f765b..54487d3396 100644 --- a/packages/idempotency/src/types/IdempotencyOptions.ts +++ b/packages/idempotency/src/types/IdempotencyOptions.ts @@ -1,6 +1,6 @@ import type { Context } from 'aws-lambda'; -import { BasePersistenceLayer } from '../persistence/BasePersistenceLayer'; -import { IdempotencyConfig } from '../IdempotencyConfig'; +import { BasePersistenceLayer } from '../persistence/BasePersistenceLayer.js'; +import { IdempotencyConfig } from '../IdempotencyConfig.js'; import type { JSONValue } from '@aws-lambda-powertools/commons/types'; /** diff --git a/packages/idempotency/src/types/IdempotencyRecord.ts b/packages/idempotency/src/types/IdempotencyRecord.ts index b7fc48b0dc..af62b2ac22 100644 --- a/packages/idempotency/src/types/IdempotencyRecord.ts +++ b/packages/idempotency/src/types/IdempotencyRecord.ts @@ -1,5 +1,5 @@ import type { JSONValue } from '@aws-lambda-powertools/commons/types'; -import { IdempotencyRecordStatus } from '../constants'; +import { IdempotencyRecordStatus } from '../constants.js'; type IdempotencyRecordStatusValue = (typeof IdempotencyRecordStatus)[keyof typeof IdempotencyRecordStatus]; diff --git a/packages/idempotency/src/types/index.ts b/packages/idempotency/src/types/index.ts index 741a6fa409..c67b3e6fe6 100644 --- a/packages/idempotency/src/types/index.ts +++ b/packages/idempotency/src/types/index.ts @@ -1,5 +1,13 @@ -export * from './IdempotencyRecord'; -export * from './BasePersistenceLayer'; -export * from './IdempotencyOptions'; -export * from './DynamoDBPersistence'; -export * from './LRUCache'; +export { + IdempotencyRecordOptions, + IdempotencyRecordStatusValue, +} from './IdempotencyRecord.js'; +export { + BasePersistenceLayerInterface, + BasePersistenceLayerOptions, +} from './BasePersistenceLayer.js'; +export { + IdempotencyConfigOptions, + IdempotencyLambdaHandlerOptions, + IdempotencyHandlerOptions, +} from './IdempotencyOptions.js'; diff --git a/packages/idempotency/tests/e2e/idempotentDecorator.test.FunctionCode.ts b/packages/idempotency/tests/e2e/idempotentDecorator.test.FunctionCode.ts index 4a6a64f1a9..f55b445f8b 100644 --- a/packages/idempotency/tests/e2e/idempotentDecorator.test.FunctionCode.ts +++ b/packages/idempotency/tests/e2e/idempotentDecorator.test.FunctionCode.ts @@ -1,9 +1,9 @@ import type { Context } from 'aws-lambda'; import type { LambdaInterface } from '@aws-lambda-powertools/commons/types'; -import { idempotent } from '../../src'; -import { Logger } from '../../../logger'; -import { DynamoDBPersistenceLayer } from '../../src/persistence/DynamoDBPersistenceLayer'; -import { IdempotencyConfig } from '../../src/'; +import { idempotent } from '../../src/idempotencyDecorator'; +import { Logger } from '@aws-lambda-powertools/logger'; +import { DynamoDBPersistenceLayer } from '../../src/persistence/DynamoDBPersistenceLayer.js'; +import { IdempotencyConfig } from '../../src/IdempotencyConfig.js'; const IDEMPOTENCY_TABLE_NAME = process.env.IDEMPOTENCY_TABLE_NAME || 'table_name'; diff --git a/packages/idempotency/tests/e2e/idempotentDecorator.test.ts b/packages/idempotency/tests/e2e/idempotentDecorator.test.ts index 87293d0eb3..83a863afaa 100644 --- a/packages/idempotency/tests/e2e/idempotentDecorator.test.ts +++ b/packages/idempotency/tests/e2e/idempotentDecorator.test.ts @@ -1,7 +1,7 @@ /** * Test idempotency decorator * - * @group e2e/idempotency + * @group e2e/idempotency/decorator */ import { DynamoDBClient } from '@aws-sdk/client-dynamodb'; import { @@ -9,26 +9,19 @@ import { SETUP_TIMEOUT, TEARDOWN_TIMEOUT, TEST_CASE_TIMEOUT, -} from './constants'; +} from './constants.js'; import { ScanCommand } from '@aws-sdk/lib-dynamodb'; import { createHash } from 'node:crypto'; import { invokeFunction, - isValidRuntimeKey, TestInvocationLogs, TestStack, } from '@aws-lambda-powertools/testing-utils'; -import { IdempotencyTestNodejsFunctionAndDynamoTable } from '../helpers/resources'; +import { IdempotencyTestNodejsFunctionAndDynamoTable } from '../helpers/resources.js'; import { join } from 'node:path'; import { Duration } from 'aws-cdk-lib'; import { AttributeType } from 'aws-cdk-lib/aws-dynamodb'; -const runtime: string = process.env.RUNTIME || 'nodejs18x'; - -if (!isValidRuntimeKey(runtime)) { - throw new Error(`Invalid runtime key value: ${runtime}`); -} - const dynamoDBClient = new DynamoDBClient({}); describe('Idempotency e2e test decorator, default settings', () => { diff --git a/packages/idempotency/tests/e2e/makeHandlerIdempotent.test.FunctionCode.ts b/packages/idempotency/tests/e2e/makeHandlerIdempotent.test.FunctionCode.ts index 499eda7cca..b4aa178d56 100644 --- a/packages/idempotency/tests/e2e/makeHandlerIdempotent.test.FunctionCode.ts +++ b/packages/idempotency/tests/e2e/makeHandlerIdempotent.test.FunctionCode.ts @@ -1,7 +1,7 @@ import type { Context } from 'aws-lambda'; -import { DynamoDBPersistenceLayer } from '../../src/persistence/DynamoDBPersistenceLayer'; -import { makeHandlerIdempotent } from '../../src/middleware'; -import { IdempotencyConfig } from '../../src'; +import { DynamoDBPersistenceLayer } from '../../src/persistence/DynamoDBPersistenceLayer.js'; +import { makeHandlerIdempotent } from '../../src/middleware/makeHandlerIdempotent.js'; +import { IdempotencyConfig } from '../../src/IdempotencyConfig.js'; import { Logger } from '@aws-lambda-powertools/logger'; import middy from '@middy/core'; diff --git a/packages/idempotency/tests/e2e/makeHandlerIdempotent.test.ts b/packages/idempotency/tests/e2e/makeHandlerIdempotent.test.ts index 1af54e589d..bf67669ab6 100644 --- a/packages/idempotency/tests/e2e/makeHandlerIdempotent.test.ts +++ b/packages/idempotency/tests/e2e/makeHandlerIdempotent.test.ts @@ -13,13 +13,13 @@ import { ScanCommand } from '@aws-sdk/lib-dynamodb'; import { Duration } from 'aws-cdk-lib'; import { createHash } from 'node:crypto'; import { join } from 'node:path'; -import { IdempotencyTestNodejsFunctionAndDynamoTable } from '../helpers/resources'; +import { IdempotencyTestNodejsFunctionAndDynamoTable } from '../helpers/resources.js'; import { RESOURCE_NAME_PREFIX, SETUP_TIMEOUT, TEARDOWN_TIMEOUT, TEST_CASE_TIMEOUT, -} from './constants'; +} from './constants.js'; const ddb = new DynamoDBClient({}); diff --git a/packages/idempotency/tests/e2e/makeIdempotent.test.FunctionCode.ts b/packages/idempotency/tests/e2e/makeIdempotent.test.FunctionCode.ts index 9786ddea0e..c627184721 100644 --- a/packages/idempotency/tests/e2e/makeIdempotent.test.FunctionCode.ts +++ b/packages/idempotency/tests/e2e/makeIdempotent.test.FunctionCode.ts @@ -1,8 +1,8 @@ import type { Context } from 'aws-lambda'; -import { DynamoDBPersistenceLayer } from '../../src/persistence/DynamoDBPersistenceLayer'; -import { makeIdempotent } from '../../src'; +import { DynamoDBPersistenceLayer } from '../../src/persistence/DynamoDBPersistenceLayer.js'; +import { makeIdempotent } from '../../src/makeIdempotent.js'; import { Logger } from '@aws-lambda-powertools/logger'; -import { IdempotencyConfig } from '../../src'; +import { IdempotencyConfig } from '../../src/IdempotencyConfig.js'; const IDEMPOTENCY_TABLE_NAME = process.env.IDEMPOTENCY_TABLE_NAME || 'table_name'; diff --git a/packages/idempotency/tests/e2e/makeIdempotent.test.ts b/packages/idempotency/tests/e2e/makeIdempotent.test.ts index ff7c890f59..63da32a705 100644 --- a/packages/idempotency/tests/e2e/makeIdempotent.test.ts +++ b/packages/idempotency/tests/e2e/makeIdempotent.test.ts @@ -13,7 +13,7 @@ import { ScanCommand } from '@aws-sdk/lib-dynamodb'; import { AttributeType } from 'aws-cdk-lib/aws-dynamodb'; import { createHash } from 'node:crypto'; import { join } from 'node:path'; -import { IdempotencyTestNodejsFunctionAndDynamoTable } from '../helpers/resources'; +import { IdempotencyTestNodejsFunctionAndDynamoTable } from '../helpers/resources.js'; import { RESOURCE_NAME_PREFIX, SETUP_TIMEOUT, diff --git a/packages/idempotency/tests/helpers/idempotencyUtils.ts b/packages/idempotency/tests/helpers/idempotencyUtils.ts index efda071436..8b8eb04f09 100644 --- a/packages/idempotency/tests/helpers/idempotencyUtils.ts +++ b/packages/idempotency/tests/helpers/idempotencyUtils.ts @@ -1,4 +1,4 @@ -import { BasePersistenceLayer } from '../../src/persistence'; +import { BasePersistenceLayer } from '../../src/persistence/BasePersistenceLayer.js'; /** * Dummy class to test the abstract class BasePersistenceLayer. diff --git a/packages/idempotency/tests/unit/config/EnvironmentVariableService.test.ts b/packages/idempotency/tests/unit/EnvironmentVariableService.test.ts similarity index 92% rename from packages/idempotency/tests/unit/config/EnvironmentVariableService.test.ts rename to packages/idempotency/tests/unit/EnvironmentVariableService.test.ts index 85f44eb60a..a7176e7897 100644 --- a/packages/idempotency/tests/unit/config/EnvironmentVariableService.test.ts +++ b/packages/idempotency/tests/unit/EnvironmentVariableService.test.ts @@ -3,7 +3,7 @@ * * @group unit/idempotency/environment-variables-service */ -import { EnvironmentVariablesService } from '../../../src/config'; +import { EnvironmentVariablesService } from '../../src/config/EnvironmentVariablesService.js'; describe('Class: EnvironmentVariableService', () => { const ENVIRONMENT_VARIABLES = process.env; diff --git a/packages/idempotency/tests/unit/IdempotencyConfig.test.ts b/packages/idempotency/tests/unit/IdempotencyConfig.test.ts index f531972135..35551bc6d8 100644 --- a/packages/idempotency/tests/unit/IdempotencyConfig.test.ts +++ b/packages/idempotency/tests/unit/IdempotencyConfig.test.ts @@ -4,8 +4,8 @@ * @group unit/idempotency/config */ import context from '@aws-lambda-powertools/testing-utils/context'; -import { IdempotencyConfig } from '../../src'; -import type { IdempotencyConfigOptions } from '../../src/types'; +import { IdempotencyConfig } from '../../src/index.js'; +import type { IdempotencyConfigOptions } from '../../src/types/index.js'; describe('Class: IdempotencyConfig', () => { const ENVIRONMENT_VARIABLES = process.env; diff --git a/packages/idempotency/tests/unit/IdempotencyHandler.test.ts b/packages/idempotency/tests/unit/IdempotencyHandler.test.ts index deeccee875..174b63acaa 100644 --- a/packages/idempotency/tests/unit/IdempotencyHandler.test.ts +++ b/packages/idempotency/tests/unit/IdempotencyHandler.test.ts @@ -3,17 +3,17 @@ * * @group unit/idempotency/IdempotencyHandler */ +import { IdempotencyRecord } from '../../src/persistence/index.js'; +import { IdempotencyHandler } from '../../src/IdempotencyHandler.js'; import { + IdempotencyConfig, IdempotencyAlreadyInProgressError, IdempotencyInconsistentStateError, IdempotencyItemAlreadyExistsError, IdempotencyPersistenceLayerError, -} from '../../src/errors'; -import { IdempotencyRecord } from '../../src/persistence'; -import { IdempotencyHandler } from '../../src/IdempotencyHandler'; -import { IdempotencyConfig } from '../../src/'; -import { MAX_RETRIES, IdempotencyRecordStatus } from '../../src/constants'; -import { PersistenceLayerTestClass } from '../helpers/idempotencyUtils'; +} from '../../src/index.js'; +import { MAX_RETRIES, IdempotencyRecordStatus } from '../../src/constants.js'; +import { PersistenceLayerTestClass } from '../helpers/idempotencyUtils.js'; const mockFunctionToMakeIdempotent = jest.fn(); const mockFunctionPayloadToBeHashed = {}; diff --git a/packages/idempotency/tests/unit/idempotencyDecorator.test.ts b/packages/idempotency/tests/unit/idempotencyDecorator.test.ts index acbee6e3bc..0ff10d1894 100644 --- a/packages/idempotency/tests/unit/idempotencyDecorator.test.ts +++ b/packages/idempotency/tests/unit/idempotencyDecorator.test.ts @@ -4,19 +4,22 @@ * @group unit/idempotency/decorator */ -import { BasePersistenceLayer, IdempotencyRecord } from '../../src/persistence'; -import { idempotent } from '../../src/'; -import type { IdempotencyRecordOptions } from '../../src/types'; import { + BasePersistenceLayer, + IdempotencyRecord, +} from '../../src/persistence/index.js'; +import { + idempotent, + IdempotencyConfig, IdempotencyAlreadyInProgressError, IdempotencyInconsistentStateError, IdempotencyItemAlreadyExistsError, IdempotencyPersistenceLayerError, -} from '../../src/errors'; -import { IdempotencyConfig } from '../../src'; +} from '../../src/index.js'; +import type { IdempotencyRecordOptions } from '../../src/types/index.js'; import { Context } from 'aws-lambda'; import context from '@aws-lambda-powertools/testing-utils/context'; -import { IdempotencyRecordStatus } from '../../src/constants'; +import { IdempotencyRecordStatus } from '../../src/constants.js'; const mockSaveInProgress = jest .spyOn(BasePersistenceLayer.prototype, 'saveInProgress') diff --git a/packages/idempotency/tests/unit/makeHandlerIdempotent.test.ts b/packages/idempotency/tests/unit/makeHandlerIdempotent.test.ts index a761a0f527..32854e1bb4 100644 --- a/packages/idempotency/tests/unit/makeHandlerIdempotent.test.ts +++ b/packages/idempotency/tests/unit/makeHandlerIdempotent.test.ts @@ -3,18 +3,19 @@ * * @group unit/idempotency/makeHandlerIdempotent */ -import { makeHandlerIdempotent } from '../../src/middleware'; +import { makeHandlerIdempotent } from '../../src/middleware/makeHandlerIdempotent.js'; import context from '@aws-lambda-powertools/testing-utils/context'; -import { IdempotencyRecord } from '../../src/persistence'; +import { IdempotencyRecord } from '../../src/persistence/index.js'; import { IdempotencyInconsistentStateError, IdempotencyItemAlreadyExistsError, IdempotencyPersistenceLayerError, -} from '../../src/errors'; -import { IdempotencyConfig } from '../../src/'; + IdempotencyConfig, + IdempotencyRecordStatus, +} from '../../src/index.js'; import middy from '@middy/core'; -import { MAX_RETRIES, IdempotencyRecordStatus } from '../../src/constants'; -import { PersistenceLayerTestClass } from '../helpers/idempotencyUtils'; +import { MAX_RETRIES } from '../../src/constants.js'; +import { PersistenceLayerTestClass } from '../helpers/idempotencyUtils.js'; import type { Context } from 'aws-lambda'; const mockIdempotencyOptions = { diff --git a/packages/idempotency/tests/unit/makeIdempotent.test.ts b/packages/idempotency/tests/unit/makeIdempotent.test.ts index d7737e16fd..40e5a3605b 100644 --- a/packages/idempotency/tests/unit/makeIdempotent.test.ts +++ b/packages/idempotency/tests/unit/makeIdempotent.test.ts @@ -3,17 +3,18 @@ * * @group unit/idempotency/makeIdempotent */ -import { IdempotencyRecord } from '../../src/persistence'; -import { makeIdempotent } from '../../src'; +import { IdempotencyRecord } from '../../src/persistence/index.js'; import { + makeIdempotent, IdempotencyInconsistentStateError, IdempotencyItemAlreadyExistsError, IdempotencyPersistenceLayerError, -} from '../../src/errors'; -import { IdempotencyConfig } from '../../src'; + IdempotencyConfig, + IdempotencyRecordStatus, +} from '../../src/index.js'; import context from '@aws-lambda-powertools/testing-utils/context'; -import { MAX_RETRIES, IdempotencyRecordStatus } from '../../src/constants'; -import { PersistenceLayerTestClass } from '../helpers/idempotencyUtils'; +import { MAX_RETRIES } from '../../src/constants.js'; +import { PersistenceLayerTestClass } from '../helpers/idempotencyUtils.js'; import type { Context } from 'aws-lambda'; const mockIdempotencyOptions = { diff --git a/packages/idempotency/tests/unit/persistence/BasePersistenceLayer.test.ts b/packages/idempotency/tests/unit/persistence/BasePersistenceLayer.test.ts index 6f78207d85..5417e9de02 100644 --- a/packages/idempotency/tests/unit/persistence/BasePersistenceLayer.test.ts +++ b/packages/idempotency/tests/unit/persistence/BasePersistenceLayer.test.ts @@ -4,16 +4,18 @@ * @group unit/idempotency/persistence/base */ import context from '@aws-lambda-powertools/testing-utils/context'; -import { IdempotencyConfig, IdempotencyRecordStatus } from '../../../src'; -import { - BasePersistenceLayer, - IdempotencyRecord, -} from '../../../src/persistence'; import { + IdempotencyConfig, + IdempotencyRecordStatus, IdempotencyItemAlreadyExistsError, IdempotencyValidationError, -} from '../../../src/errors'; -import type { IdempotencyConfigOptions } from '../../../src/types'; + IdempotencyKeyError, +} from '../../../src/index.js'; +import { + BasePersistenceLayer, + IdempotencyRecord, +} from '../../../src/persistence/index.js'; +import type { IdempotencyConfigOptions } from '../../../src/types/index.js'; jest.mock('node:crypto', () => ({ createHash: jest.fn().mockReturnValue({ @@ -293,7 +295,9 @@ describe('Class: BasePersistenceLayer', () => { await expect( persistenceLayer.getRecord({ foo: { bar: [] } }) ).rejects.toThrow( - new Error('No data found to create a hashed idempotency_key') + new IdempotencyKeyError( + 'No data found to create a hashed idempotency_key' + ) ); }); diff --git a/packages/idempotency/tests/unit/persistence/DynamoDbPersistenceLayer.test.ts b/packages/idempotency/tests/unit/persistence/DynamoDbPersistenceLayer.test.ts index aa817e7b77..3d75862728 100644 --- a/packages/idempotency/tests/unit/persistence/DynamoDbPersistenceLayer.test.ts +++ b/packages/idempotency/tests/unit/persistence/DynamoDbPersistenceLayer.test.ts @@ -3,14 +3,14 @@ * * @group unit/idempotency/persistence/dynamodb */ -import { DynamoDBPersistenceLayer } from '../../../src/persistence/DynamoDBPersistenceLayer'; +import { DynamoDBPersistenceLayer } from '../../../src/persistence/DynamoDBPersistenceLayer.js'; +import { IdempotencyRecord } from '../../../src/persistence/index.js'; +import type { DynamoDBPersistenceOptions } from '../../../src/types/DynamoDBPersistence.js'; import { + IdempotencyRecordStatus, IdempotencyItemAlreadyExistsError, IdempotencyItemNotFoundError, -} from '../../../src/errors'; -import { IdempotencyRecord } from '../../../src/persistence'; -import type { DynamoDBPersistenceOptions } from '../../../src/types'; -import { IdempotencyRecordStatus } from '../../../src'; +} from '../../../src/index.js'; import { DynamoDBClient, DynamoDBServiceException, diff --git a/packages/idempotency/tests/unit/persistence/IdempotencyRecord.test.ts b/packages/idempotency/tests/unit/persistence/IdempotencyRecord.test.ts index 00776ec246..38728bcef9 100644 --- a/packages/idempotency/tests/unit/persistence/IdempotencyRecord.test.ts +++ b/packages/idempotency/tests/unit/persistence/IdempotencyRecord.test.ts @@ -3,10 +3,12 @@ * * @group unit/idempotency/persistence/idempotencyRecord */ -import { IdempotencyInvalidStatusError } from '../../../src/errors'; -import { IdempotencyRecord } from '../../../src/persistence'; -import { IdempotencyRecordStatus } from '../../../src'; -import type { IdempotencyRecordStatusValue } from '../../../src/types'; +import { IdempotencyRecord } from '../../../src/persistence/IdempotencyRecord.js'; +import { + IdempotencyRecordStatus, + IdempotencyInvalidStatusError, +} from '../../../src/index.js'; +import type { IdempotencyRecordStatusValue } from '../../../src/types/index.js'; const mockIdempotencyKey = '123'; const mockData = undefined; diff --git a/packages/idempotency/tests/unit/persistence/LRUCache.test.ts b/packages/idempotency/tests/unit/persistence/LRUCache.test.ts index 83a4e445ff..5732c31a45 100644 --- a/packages/idempotency/tests/unit/persistence/LRUCache.test.ts +++ b/packages/idempotency/tests/unit/persistence/LRUCache.test.ts @@ -3,7 +3,7 @@ * * @group unit/idempotency/persistence/lru-cache */ -import { LRUCache } from '../../../src/persistence/LRUCache'; +import { LRUCache } from '../../../src/persistence/LRUCache.js'; describe('Class: LRUMap', () => { describe('Method: add', () => { diff --git a/packages/idempotency/tsconfig.esm.json b/packages/idempotency/tsconfig.esm.json new file mode 100644 index 0000000000..9bed8e4da4 --- /dev/null +++ b/packages/idempotency/tsconfig.esm.json @@ -0,0 +1,11 @@ +{ + "extends": "../../tsconfig.esm.json", + "compilerOptions": { + "baseUrl": ".", + "outDir": "./lib/esm", + "rootDir": "./src" + }, + "include": [ + "./src/**/*" + ] +} \ No newline at end of file diff --git a/packages/idempotency/tsconfig.json b/packages/idempotency/tsconfig.json index 1cb9d72773..a30fdead42 100644 --- a/packages/idempotency/tsconfig.json +++ b/packages/idempotency/tsconfig.json @@ -1,7 +1,7 @@ { "extends": "../../tsconfig.json", "compilerOptions": { - "outDir": "./lib", + "outDir": "./lib/cjs", "rootDir": "./src", }, "include": [ From db08c2267a8a8868fb5cdc19094ad027955d16bd Mon Sep 17 00:00:00 2001 From: Andrea Amorosi Date: Sat, 14 Oct 2023 02:10:38 +0200 Subject: [PATCH 21/60] chore(metrics): fix import --- packages/metrics/tests/e2e/constants.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/metrics/tests/e2e/constants.ts b/packages/metrics/tests/e2e/constants.ts index 0f05997a51..6cc13e546c 100644 --- a/packages/metrics/tests/e2e/constants.ts +++ b/packages/metrics/tests/e2e/constants.ts @@ -1,5 +1,5 @@ import { randomUUID } from 'node:crypto'; -import { MetricUnits } from '../../src/index.js'; +import { MetricUnit } from '../../src/index.js'; const RESOURCE_NAME_PREFIX = 'Metrics'; const ONE_MINUTE = 60 * 1000; @@ -9,14 +9,14 @@ const TEARDOWN_TIMEOUT = 5 * ONE_MINUTE; const commonEnvironmentVars = { EXPECTED_METRIC_NAME: 'MyMetric', - EXPECTED_METRIC_UNIT: MetricUnits.Count, + EXPECTED_METRIC_UNIT: MetricUnit.Count, EXPECTED_METRIC_VALUE: '1', EXPECTED_NAMESPACE: randomUUID(), EXPECTED_DEFAULT_DIMENSIONS: { MyDimension: 'MyValue' }, EXPECTED_EXTRA_DIMENSION: { MyExtraDimension: 'MyExtraValue' }, EXPECTED_SINGLE_METRIC_DIMENSION: { MySingleMetricDim: 'MySingleValue' }, EXPECTED_SINGLE_METRIC_NAME: 'MySingleMetric', - EXPECTED_SINGLE_METRIC_UNIT: MetricUnits.Percent, + EXPECTED_SINGLE_METRIC_UNIT: MetricUnit.Percent, EXPECTED_SINGLE_METRIC_VALUE: '2', POWERTOOLS_SERVICE_NAME: 'metrics-e2e-testing', }; From 0ac3500b1ec50c679c1b5b0c9e6c86be4c41c820 Mon Sep 17 00:00:00 2001 From: Andrea Amorosi Date: Sat, 14 Oct 2023 02:54:39 +0200 Subject: [PATCH 22/60] chore(ci): v2 release line --- .github/scripts/release_patch_package_json.js | 9 ++++++--- .github/workflows/make-v2-release.yml | 2 +- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/.github/scripts/release_patch_package_json.js b/.github/scripts/release_patch_package_json.js index c11ec86864..932bc7b109 100644 --- a/.github/scripts/release_patch_package_json.js +++ b/.github/scripts/release_patch_package_json.js @@ -62,6 +62,12 @@ const betaPackages = []; readFileSync(resolve('..', '..', 'v2.json'), 'utf8') ).iteration; version = `${version}-alpha.${iteration}`; + dependencies && + Object.entries(dependencies).forEach(([dependencyName, version]) => { + if (alphaPackages.includes(dependencyName)) { + dependencies[dependencyName] = `${version}-alpha.${iteration}`; + } + }); } else if (betaPackages.includes(name)) { version = `${version}-beta`; } @@ -84,9 +90,6 @@ const betaPackages = []; types, files, type, - scripts: { - postinstall: `echo 'WARNING: This is a pre-release version of Powertools for AWS (TypeScript) provided for evaluation only. Do not use in production.'`, - }, }; // Not all utilities have these fields, so only add them if they exist to avoid diff --git a/.github/workflows/make-v2-release.yml b/.github/workflows/make-v2-release.yml index 800fd8e8cc..f590a624b1 100644 --- a/.github/workflows/make-v2-release.yml +++ b/.github/workflows/make-v2-release.yml @@ -45,7 +45,7 @@ jobs: echo "// this file is auto generated, do not modify\nexport const PT_VERSION = '2.0.0-alpha.$(jq -r '.iteration' v2.json)';" > packages/commons/src/version.ts - name: Build run: | - npm run build:prod -w packages/batch \ + npm run build -w packages/batch \ -w packages/commons \ -w packages/idempotency \ -w packages/logger \ From d1a31373120f6c54d692bcd1fef6f0ebffba8ac7 Mon Sep 17 00:00:00 2001 From: Andrea Amorosi Date: Sun, 15 Oct 2023 19:31:26 +0200 Subject: [PATCH 23/60] chore(ci): fix alpha versioning pre-release --- .github/actions/cached-node-modules/action.yml | 7 +++++-- .github/workflows/make-v2-release.yml | 9 ++++++--- 2 files changed, 11 insertions(+), 5 deletions(-) diff --git a/.github/actions/cached-node-modules/action.yml b/.github/actions/cached-node-modules/action.yml index d86c8d7b10..008c852792 100644 --- a/.github/actions/cached-node-modules/action.yml +++ b/.github/actions/cached-node-modules/action.yml @@ -4,6 +4,9 @@ inputs: nodeVersion: # id of input description: 'Node.js version to use in the cache key' default: '18' + build: + description: 'Whether to build the packages or not' + default: 'true' outputs: cache-hit: description: "Whether the cache was hit or not" @@ -28,8 +31,8 @@ runs: run: npm ci shell: bash - name: Build packages - # Regardless of whether the cache was hit or not, we need to build the packages. - # + # Regardless of whether the cache was hit or not, we need to build the packages, unless the caller says otherwise + if: inputs.build == 'true' # We build the shared package first, then the others in parallel to speed up the process # even though we could just run `npm run build` in the root folder and build them in # sequence, but still in the correct order. diff --git a/.github/workflows/make-v2-release.yml b/.github/workflows/make-v2-release.yml index f590a624b1..7571608960 100644 --- a/.github/workflows/make-v2-release.yml +++ b/.github/workflows/make-v2-release.yml @@ -28,6 +28,9 @@ jobs: npm set "//registry.npmjs.org/:_authToken=${{ secrets.NPM_TOKEN }}" - name: Setup dependencies uses: ./.github/actions/cached-node-modules + with: + # We don't build the packages here as we want to version them first + build: false - name: Version run: | # Version all packages to next major version (2.0.0) without pushing to git, generating changelog or running commit hooks @@ -36,17 +39,17 @@ jobs: - name: Set alpha iteration run: | # Get the current alpha version from npm i.e 2.0.0-alpha.0 -> 0, 2.0.0-alpha.1 -> 1 (default to -1 if no alpha versions exist = first pre-release) - ITERATION=$(npm show @aws-lambda-powertools/commons time --json | jq -r 'to_entries | map(select(.key | startswith("2.0.0-alpha"))) | sort_by(.key) | last | .key // "-1"') + ITERATION=$(npm show @aws-lambda-powertools/commons time --json | jq -r 'to_entries | map(select(.key | startswith("2.0.0-alpha"))) | sort_by(.key) | last | .key // "-1"' | cut -d '.' -f 4) # Write the new version to the file echo "{ \"iteration\": $((ITERATION + 1)) }" > v2.json - name: Increment version in UA run: | # Increment the version in the UA - echo "// this file is auto generated, do not modify\nexport const PT_VERSION = '2.0.0-alpha.$(jq -r '.iteration' v2.json)';" > packages/commons/src/version.ts + echo -e "// this file is auto generated, do not modify\nexport const PT_VERSION = '2.0.0-alpha.$(jq -r '.iteration' v2.json)';" > packages/commons/src/version.ts - name: Build run: | + npm run build -w packages/commons & npm run build -w packages/batch \ - -w packages/commons \ -w packages/idempotency \ -w packages/logger \ -w packages/metrics \ From d20269dde31118047bf3f681cfb02b5e31a2c63c Mon Sep 17 00:00:00 2001 From: Andrea Amorosi Date: Wed, 18 Oct 2023 13:43:32 +0200 Subject: [PATCH 24/60] docs(maintenance): add processes tab (#1747) * docs(maintenance): update mkdocs to support tabs * chore(ci): add parallel test npm script * chore(ci): add jest command * docs(maintenance): add testing page to navbar * docs(maintenance): add contributing info * chore: update roadmap * chore: update release drafter workflow to allow for manual trigger * fix formatting * docs: maintainers handbook * chore: link to new location * fix links * Update docs/maintainers.md Co-authored-by: Alexander Schueren --------- Co-authored-by: Alexander Schueren --- .github/workflows/release-drafter.yml | 32 +++ CONTRIBUTING.md | 386 +++++++------------------- MAINTAINERS.md | 304 +------------------- docs/contributing/conventions.md | 45 +++ docs/contributing/getting_started.md | 86 ++++++ docs/contributing/setup.md | 72 +++++ docs/contributing/testing.md | 103 +++++++ docs/maintainers.md | 338 ++++++++++++++++++++++ docs/roadmap.md | 66 ++--- docs/upgrade.md | 7 + layers/package.json | 1 + mkdocs.yml | 23 +- package.json | 4 +- packages/batch/package.json | 1 + packages/commons/package.json | 1 + packages/idempotency/package.json | 1 + packages/logger/package.json | 1 + packages/metrics/package.json | 1 + packages/parameters/package.json | 1 + packages/testing/package.json | 1 + packages/tracer/package.json | 1 + 21 files changed, 854 insertions(+), 621 deletions(-) create mode 100644 .github/workflows/release-drafter.yml create mode 100644 docs/contributing/conventions.md create mode 100644 docs/contributing/getting_started.md create mode 100644 docs/contributing/setup.md create mode 100644 docs/contributing/testing.md create mode 100644 docs/maintainers.md create mode 100644 docs/upgrade.md diff --git a/.github/workflows/release-drafter.yml b/.github/workflows/release-drafter.yml new file mode 100644 index 0000000000..ba50a693ae --- /dev/null +++ b/.github/workflows/release-drafter.yml @@ -0,0 +1,32 @@ +name: Release Drafter + +# PROCESS +# +# 1. Enumerate all PRs in merged state +# 2. Filter out any PR labeled `skip-changelog` +# 3. Updates or creates a new release in Draft mode + +# USAGE +# +# Always run on merged PRs or manually via GitHub UI for debugging purposes. +# +# see .github/release-drafter.yml for configuration + +on: + push: + branches: + - main + workflow_dispatch: + +permissions: + contents: read + +jobs: + update_release_draft: + runs-on: ubuntu-latest + permissions: + contents: write # create release in draft mode + steps: + - uses: release-drafter/release-drafter@65c5fb495d1e69aa8c08a3317bc44ff8aabe9772 # v5.20.1 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} \ No newline at end of file diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 906af7ff70..cedafa950d 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -1,335 +1,159 @@ -# Contributing Guidelines - -Thank you for your interest in contributing to our project. Whether it's a bug report, new feature, correction, or additional -documentation, we greatly value feedback and contributions from our community. - -Please read through this document before submitting any issues or pull requests to ensure we have all the necessary -information to effectively respond to your bug report or contribution. - ## Table of contents -- [Security issue notifications](#security-issue-notifications) -- [Code of Conduct](#code-of-conduct) - [Reporting Bugs/Feature Requests](#reporting-bugsfeature-requests) - [Contributing via Pull Requests](#contributing-via-pull-requests) - - [Summary](#summary) - - [Step 1: Find something to work on](#step-1-find-something-to-work-on) - - [Step 2: Design](#step-2-design) - - [Step 3: Work your Magic](#step-3-work-your-magic) - - [Step 4: Pull Request](#step-4-pull-request) - - [Step 5: Merge](#step-5-merge) -- [Setup Development Environment](#setup-development-environment) - - [Prerequisites](#prerequisites) - - [Repo Layout](#repo-layout) - - [Tests](#tests) - - [Unit tests](#unit-tests) - - [Integration tests](#integration-tests) - - [Run e2e tests on your forked project](#run-e2e-tests-on-your-forked-project) - - [Documentation](#documentation) - - [API reference](#api-reference) - - [Docs website](#docs-website) - - [Build \& Package](#build--package) - - [Conventions](#conventions) + - [Dev setup](#dev-setup) + - [Gitpod](#gitpod) + - [GitHub Codespaces](#github-codespaces) + - [Local environment](#local-environment) + - [Sending a pull request](#sending-a-pull-request) + - [Local documentation](#local-documentation) +- [Conventions](#conventions) + - [General terminology and practices](#general-terminology-and-practices) + - [Testing definition](#testing-definition) +- [Finding contributions to work on](#finding-contributions-to-work-on) +- [Code of Conduct](#code-of-conduct) +- [Security issue notifications](#security-issue-notifications) - [Licensing](#licensing) -## Security issue notifications +# Contributing Guidelines -If you discover a potential security issue in this project, we ask that you notify AWS/Amazon Security via our [vulnerability reporting page](http://aws.amazon.com/security/vulnerability-reporting/). Please do **not** create a public GitHub issue. +Thank you for your interest in contributing to our project. Whether it's a [bug report](https://github.com/aws-powertools/powertools-lambda-typescript/issues/new?assignees=&labels=type%2Fbug%2Ctriage&projects=aws-powertools%2F7&template=bug_report.yml&title=Bug%3A+TITLE), [new feature](https://github.com/aws-powertools/powertools-lambda-typescript/issues/new?assignees=&labels=type%2Ffeature-request%2Ctriage&projects=aws-powertools%2F7&template=feature_request.yml&title=Feature+request%3A+TITLE), [correction](https://github.com/aws-powertools/powertools-lambda-typescript/issues/new/choose), or [additional documentation](https://github.com/aws-powertools/powertools-lambda-typescript/issues/new?assignees=&labels=area%2Fdocumentation%2Ctriage&projects=aws-powertools%2F7&template=documentation_improvements.yml&title=Docs%3A+TITLE), we greatly value feedback and contributions from our community. -## Code of Conduct - -This project has adopted the [Amazon Open Source Code of Conduct](https://aws.github.io/code-of-conduct). -For more information, see the [Code of Conduct FAQ](https://aws.github.io/code-of-conduct-faq) or contact opensource-codeofconduct@amazon.com with any additional questions or comments. +Please read through this document before submitting any issues or pull requests to ensure we have all the necessary information to effectively respond to your bug report or contribution. ## Reporting Bugs/Feature Requests -We welcome you to use the GitHub issue tracker to report bugs or suggest features. - -When filing an issue, please check existing open, or recently closed, issues to make sure somebody else hasn't already -reported the issue. Please try to include as much information as you can. Details like these are incredibly useful: +We welcome you to use the GitHub issue tracker to report bugs, suggest features, or documentation improvements. -* A reproducible test case or series of steps -* The version of our code being used -* Any modifications you've made relevant to the bug -* Anything unusual about your environment or deployment +[When filing an issue](https://github.com/aws-powertools/powertools-lambda-typescript/issues/new/choose), please check [existing open](https://github.com/aws-powertools/powertools-lambda-typescript/issues?q=is%3Aissue+is%3Aopen+sort%3Aupdated-desc), or [recently closed](https://github.com/aws-powertools/powertools-lambda-typescript/issues?q=is%3Aissue+sort%3Aupdated-desc+is%3Aclosed), issues to make sure somebody else hasn't already reported the issue. Please try to include as much information as you can. ## Contributing via Pull Requests -Contributions via pull requests are much appreciated. - -### Summary - -* This project uses `node@18.x` and `npm@9.x` for development (see [Setup](#setup)). -* Before opening a Pull Request, please find the existing related issue or open a new one to discuss the proposed changes. A PR without a related issue or discussion has a high risk of being rejected. We are very appreciative and thankful for your time and efforts, and we want to make sure they are not wasted. -* After your proposal has been reviewed and accepted by at least one of the project's maintainers, you can submit a pull request. -* When opening a PR, make sure to follow the checklist inside the pull request template. - -### Step 1: Find something to work on - -If you want to contribute a specific feature or fix you have in mind, look at active [pull -requests](https://github.com/aws-powertools/powertools-lambda-typescript/pulls) to see if someone else is already working on it. If not, you can start designing your changes. - -On the other hand, if you are here looking for an issue to work on, check out our [backlog of -issues](https://github.com/aws-powertools/powertools-lambda-typescript/issues) and find something that piques your interest. Our project, by default, uses the default GitHub issue labels (enhancement/bug/help wanted/invalid/question/documentation), looking at any issue labeled as 'help wanted' or 'good-first-issue' is a great place to start. - -It's a good idea to keep the priority of issues in mind when deciding what to -work on. If we have labelled an issue as `priority:medium` or `priority:low`, it means it's something we won't -get to soon while `priority:high` issues have a bigger impact, so we are much more likely to give a PR for those issues prompt attention. - -### Step 2: Design - -You can start by checking the project's tenets [here](https://docs.powertools.aws.dev/lambda-typescript/latest/#tenets). - -We ask you to seek feedback and consensus on your proposed change by iterating on a design document. This is especially useful when you plan a big change or feature, or you want advice on what would be the best path forward. - -If you're picking up an existing issue, you can simply post your comment and discuss your proposed changes. If instead you're proposing a new feature, you can start by creating a new [RFC issue](https://github.com/aws-powertools/powertools-lambda-typescript/issues/new?assignees=&labels=RFC%2C+triage&template=rfc.md&title=RFC%3A+) and discuss your proposed change with the maintainers. - -This is a great way to get feedback on your proposed change and make sure that it is in line with the project's direction and community needs. You can start working on the change when you've gotten approved by at least one maintainer - we would hate for your time to be wasted. - -### Step 3: Work your Magic - -Work your magic. Before starting, make sure to check the [Getting Started](#Getting-Started) section to setup your dev environment and familiarize yourself with the project's structure and design. Here are some additional guidelines: - -* Working against the latest source on the **main** branch. -* Try to maintain a single feature/bugfix per pull request. It's okay to introduce a little bit of housekeeping - changes along the way, but try to avoid conflating multiple features. Eventually, all these are going to go into a - single commit, so you can use that to frame your scope. -* Try to add [unit tests](#Tests) that test your changes when applicable. This is especially important for new features and bug fixes, as it helps you to make sure that your changes are working as intended. -* Lint and test the code. When you've setup the repository with `npm run init-environment`, pre-commit and push-hooks will automatically lint and test the code. Pull request builds will run the same checks as well. - -### Step 4: Pull Request - -Once you're done with your changes, you can open a pull request. Make sure to follow the checklist inside the pull request template: - -* Create a commit with your changes and push them to a - [fork](https://docs.github.com/en/get-started/quickstart/fork-a-repo). - > Note: Core members can push directly to a branch on the Powertools for AWS Lambda (TypeScript) repo (following the same conventions detailed below). -* Create a [pull request on GitHub](https://docs.github.com/en/github/collaborating-with-pull-requests/proposing-changes-to-your-work-with-pull-requests/creating-a-pull-request-from-a-fork). - -Pull request title and message (and PR title and description) must adhere to [conventionalcommits](https://www.conventionalcommits.org), this is enforced by the CI. This is a summary of the rules: -* The title must begin with `feat(module): title`, `fix(module): title`, `refactor(module): title` or `chore(module): title`, etc. -* Title should be lowercase. -* No period at the end of the title. - -The pull request body should describe _motivation_ and follow the template provided as closely as possible. Think about your code reviewers and what information they need in order to understand what you did. If it's a big commit (hopefully not), try to provide some good entry points so it will be easier to follow. - -The body should also include a reference to the issue or RFC that this PR is related to in the appropriate section. - -Once the pull request is submitted, a reviewer will be assigned by the maintainers. - -Discuss review comments and iterate until you get at least one "Approve". When iterating, push new commits to the same branch. Usually, all these are going to be squashed when the maintainers merge to `main`. The commit messages should be hints for you when you finalize your merge commit message. - -> **Note** -> Please do not remove the legal notice at the end of the PR message. This is a requirement for any pull request to be reviewed & accepted into the project. - -### Step 5: Merge - -Once approved and tested, one of the maintainers will squash-merge to `main` and will use your PR title/description will be used as the commit message. Your name will be also added to the Release Notes of the next release. - -## Setup Development Environment - -The following sections describe how to set up the Powertools for AWS Lambda (TypeScript) repository on your local machine and perform common development tasks. - -The alternative is to use a Cloud IDE like [Gitpod](https://www.gitpod.io/) or [GitHub CodeSpaces](https://github.com/features/codespaces) for your development. To quickly get up and running you can click one of these button to open a cloned version of this repo with all of the prerequisites and dependencies installed: +Contributions via pull requests are much appreciated. Before sending us a pull request, please ensure that: -[![Open in Gitpod](https://gitpod.io/button/open-in-gitpod.svg)](https://gitpod.io/#https://github.com/aws-powertools/powertools-lambda-typescript) -[![Open in GitHub Codespaces](https://github.com/codespaces/badge.svg)](https://github.com/codespaces/new?hide_repo_select=true&ref=main&repo=305501331) +1. You are working against the latest source on the **main** branch, unless instructed otherwise. +2. You check existing open, and recently merged pull requests to make sure someone else hasn't addressed the problem already. +3. You discuss and agree your proposed changes under [an existing issue](https://github.com/aws-powertools/powertools-lambda-typescript/issues?q=is%3Aopen+is%3Aupdated-desc) or a [new issue](https://github.com/aws-powertools/powertools-lambda-typescript/issues/new/choose){target="_blank" rel="nofollow"} before you begin any implementation. We value your time and bandwidth. As such, any pull requests created on non-triaged issues might not be successful. -### Prerequisites +At a high level, these are the steps to get code merged in the repository - don't worry, nearly all of them are automated. -#### Required - -- [Node.js 18.x](https://nodejs.org/download/release/latest-v18.x/) - - If you use [nvm](https://github.com/nvm-sh/nvm#nvmrc) or [fnm](https://github.com/Schniz/fnm) you can install the version used in the project with `nvm use` or `fnm use` respectively. Both will use the `.nvmrc` file in the project's root. -- [npm 9.x](https://www.npmjs.com/) - - After installing the Node.js version above, your npm version should be already 9.x as it comes bundled with Node.js. - -#### Optional - -- [AWS SAM CLI >= 1.65.0](https://docs.aws.amazon.com/serverless-application-model/latest/developerguide/serverless-sam-cli-install.html) - - AWS SAM CLI is a command line interface for AWS Serverless Application Model (SAM), it's used in one of the examples, and it's part of the pre-push hook. -- [Docker](https://docs.docker.com/get-docker/) - - Docker is used to build documentation and Layer. - -First, [fork](https://docs.github.com/en/get-started/quickstart/fork-a-repo) the repository, and then run the following commands to clone and initialize the repository locally. - -> **Note** -> In order for the commands below to work you need Node.js `18.x` and npm `9.x` - -```console -git clone https://github.com/{your-account}/powertools-lambda-typescript.git -cd aws-lambda-powertools-typescript -npm run setup-local -``` - -We recommend that you use [Visual Studio Code](https://code.visualstudio.com/) to work on the repo. We use `eslint` and `prettier` to keep our code consistent in terms of style and reducing defects, installing [eslint](https://marketplace.visualstudio.com/items?itemName=dbaeumer.vscode-eslint) and [prettier](https://marketplace.visualstudio.com/items?itemName=esbenp.prettier-vscode) extensions will help you to keep the code consistent by highlighting any issues in your code and automatically fixing them. - -### Repo Layout - -The Powertools for AWS Lambda (TypeScript) is fully written in [TypeScript](https://www.typescriptlang.org/) and uses a monorepo structure [managed using npm workspaces](https://docs.npmjs.com/cli/v8/using-npm/workspaces). -If you're unfamiliar with any of these topics, it is useful to learn about them and will make understanding the codebase easier but strictly not necessary for simple contributions. - -The repo contains `packages/` directory that contains the Powertools for AWS Lambda (TypeScript) utilities modules. For instance, the source code for the Logger utility can be found at the location `packages/logger` and so on. -The repo also contains a `packages/commons` directory that holds code and logic shared between one or more utilities and that is published as a separate npm package. - -There are also other workspaces that are not part of the Powertools for AWS Lambda (TypeScript) utilities modules, but are used for examples (`examples/*`), documentation (`docs/snippets`), and Lambda Layers (`layers`). - -### Tests - -Unit and integration (e2e) tests can be found under the `tests` folder of each module. - -You can run each group separately or all together thanks to [jest-runner-groups](https://www.npmjs.com/package/jest-runner-groups). - -Unit tests, under `tests/unit` folder, are standard [Jest](https://jestjs.io) unit tests that aim to test the module features in isolation. - -Integration tests, under `tests/e2e` folder, will test the module features by deploying AWS Lambda functions into your AWS Account. We use [AWS CDK](https://docs.aws.amazon.com/cdk/v2/guide/getting_started.html) for creating the infrastructure, and the AWS SDK for invoking the functions. - -#### Unit tests - -##### Write - -As mentioned before, tests are split into groups thanks to [jest-runner-groups](https://www.npmjs.com/package/jest-runner-groups), and therefore, each test needs to be tagged properly by adding the following comments in the header of your unit test file: - -```typescript -/** - * Tests metrics - * - * @group unit// - */ -``` - -##### Run - -To run unit tests, you can either use: - -* `npm test -ws` while in the root folder to run them all -* `npm test -w packages/metrics` while in the root folder to run all the unit tests that belong to an utility - -#### Integration tests - -> **Note** -> Running teh end-to-end tests will deploy AWS resources in your AWS account, which might incur costs. The cost from **some services** are covered by the [AWS Free Tier](https://aws.amazon.com/free/?all-free-tier.sort-by=item.additionalFields.SortRank&all-free-tier.sort-order=asc&awsf.Free%20Tier%20Types=*all&awsf.Free%20Tier%20Categories=*all) but not all of them. If you don't have an AWS Account, follow [these instructions to create one](https://aws.amazon.com/premiumsupport/knowledge-center/create-and-activate-aws-account/). Alternatively, you can we will run the tests for you in CI when you submit a pull request. - -##### Set up - -As mentioned, the integration tests use AWS CDK to create the infrastructure needed for the tests. If this is the first time you use CDK, you need to run [`cdk bootstrap`](https://docs.aws.amazon.com/cdk/v2/guide/bootstrapping.html) in the account and region you are going to run e2e tests in. - -##### Write - -Similar to unit tests, e2e tests are split into groups thanks to [jest-runner-groups](https://www.npmjs.com/package/jest-runner-groups), and therefore, each test needs to be tagged properly by adding the following comments in the header of your unit test file: - -```typescript -/** - * Tests data lake catalog - * - * @group e2e// - */ +```mermaid +timeline + title Code integration journey (CI) + Project setup
(make dev) : Code checkout + : Dependencies + : Git pre-commit hooks + : Local branch + : Local changes + : Local tests + + Pre-commit checks
(git commit) : Code linting (standards) + + Pre-Pull Request
(git push) : Tests (unit) + + Pull Request
(CI checks) : Semantic PR title check + : Related issue check + : Acknowledgment check + : Code coverage diff + : Contribution size check + : Contribution category check + : GitHub Actions security check + : Quality checks (SonarCloud) + : End-to-end tests (manual by maintainer) + : +pre-commit & pre-pull request checks + + After merge
(CI checks) : GitHub Actions security check + : Rebuild Changelog + : Deploy staging docs + : Update draft release ``` -Follow this convention for the test filename: `..test.ts`. (e.g. `sampleRate.decorator.test.ts`, `childLogger.manual.test.ts`) +### Dev setup -See `metrics/tests/e2e/basicFeatures.decorator.test.ts` as an example. +Firstly, [fork the repository](https://github.com/aws-powertools/powertools-lambda-typescript/fork). -##### Run +To setup your development environment, we recommend using our pre-configured Cloud environment like Gitpod or GitHub Codespaces. -To run e2e tests, you can either use: +#### Gitpod -* `npm test:e2e -ws` while in the root folder to run them all -* `npm test:e2e -w packages/metrics` while in the root folder to run the module specific ones +To start using Gitpod, copy the following URL and replace `YOUR_USERNAME` with your GitHub username or organization: -Four important environment variables can be used: - -* `RUNTIME` to select the runtime to use for the Lambda functions (default: `nodejs18x`) -* `AWS_PROFILE` to use the right AWS credentials -* `AWS_REGION` to select the region to deploy e2e tests infrastructure to -* `DISABLE_TEARDOWN` if you don't want your stack to be destroyed at the end of the test (useful in dev mode when iterating over your code). - -Example: `DISABLE_TEARDOWN=true RUNTIME=nodejs18 AWS_PROFILE=dev-account AWS_REGION=eu-west-1 npm test:e2e -w packages/metrics` - -Below is a diagram that shows the flow of the integration tests: - -```mermaid -sequenceDiagram - Dev Environment / CI->>+Jest: npm run test:e2e - Jest-->Jest: Synthetize CloudFormation Stack - Jest->>+AWS: Deploy Stack - Jest->>+AWS: Invoke Lambda function - AWS->>Jest: Report logs / results - Jest-->Jest: Assert logs/result - Jest->>+AWS: Destroy Stack - Jest->>+Dev Environment / CI: show test results +```text +https://gitpod.io/#https://github.com/YOUR_USERNAME/aws-lambda-powertools-typescript ``` -##### Run e2e tests on your forked project +This will allow the Cloud environment to target your fork correctly. -You can run the end-to-end tests automatically on your forked project by following these steps: +#### GitHub Codespaces -1. Create an IAM role in your target AWS account, with the least amount of privilege. +To start using GitHub Codespaces, navigate to your fork of the repository, then click on the green `Code` button, and select `Create codespace on ` under the `Codespaces` tab (where `` is the branch you want to work on). - As mentioned above in this page, we are leveraging CDK to deploy and consequently clean-up resources on AWS. Therefore, to run those tests through GitHub actions, you will need to grant specific permissions to your workflow. +#### Local environment - We recommend following [Amazon IAM best practices](https://docs.aws.amazon.com/IAM/latest/UserGuide/best-practices.html) for the AWS credentials used in GitHub Actions workflows, including: - * Do not store credentials in your repository's code. - * [Grant least privilege](https://docs.aws.amazon.com/IAM/latest/UserGuide/best-practices.html#grant-least-privilege) to the credentials used in GitHub Actions workflows. Grant only the permissions required to perform the actions in your GitHub Actions workflows. - * [Monitor the activity](https://docs.aws.amazon.com/IAM/latest/UserGuide/best-practices.html#keep-a-log) of the credentials used in GitHub Actions workflows. +Alternatively, you can use `npm run setup-local` on your local machine. - For an example of how to create a role in CDK, you can look at [@pahud/cdk-github-oidc](https://constructs.dev/packages/@pahud/cdk-github-oidc) construct. +### Sending a pull request - More information about: +To send us a pull request, please follow these steps: - * [GitHub OpenID Connect](https://github.blog/changelog/2021-10-27-github-actions-secure-cloud-deployments-with-openid-connect/) - * ["Configure AWS Credentials" Action For GitHub Actions](https://github.com/aws-actions/configure-aws-credentials/) +1. Create a new branch to focus on the specific change you are contributing e.g. `improv/logger-debug-sampling` +2. Make sure that all formatting, linting, and tests tasks run as git pre-commit & pre-push hooks are passing. +3. Commit to your fork using clear commit messages. +4. Send us a pull request with a [conventional semantic title](https://github.com/aws-powertools/powertools-lambda-typescript/pull/1744), and answer any default question in the pull request interface. +5. Pay attention to any automated CI failures reported in the pull request, and stay involved in the conversation. -2. Add your new role into your [GitHub fork secrets](https://docs.github.com/en/actions/security-guides/encrypted-secrets#creating-encrypted-secrets-for-a-repository) with name `AWS_ROLE_ARN_TO_ASSUME`. -3. In your forked repository, go to the "Actions" tab and select the `run-e2e-tests` workflow. -4. On the `run-e2e-tests` workflow page, select "Run workflow" and run it on the desired branch. +GitHub provides additional document on [forking a repository](https://help.github.com/articles/fork-a-repo/) and +[creating a pull request](https://help.github.com/articles/creating-a-pull-request/). -> :warning: **Don't automatically run end-to-end tests on branch push or PRs**. A malicious attacker can submit a pull request to attack your AWS account. Ideally, use a blank account without any important workload/data, and limit `AWS_ROLE_ARN_TO_ASSUME` permission to least minimum privilege. +### Local documentation -### Documentation +You might find useful to run both the documentation website and the API reference locally while contributing: -You might find useful to run both the documentation website and the API reference locally while contributing. +- **Docs website**: `npm run docs-runLocalDocker` + * If this is your first time running the docs, you need to build the image: `npm run docs-buildDockerImage` +- **API reference**: `npm run docs-api-build-run` -#### API reference +## Conventions -You can build and start the API reference website by running these two commands in the project's root: +### General terminology and practices -* `npm run docs-generateApiDoc` OR `typedoc .` -* `npm run docs-runLocalApiDoc` OR `npx live-server api` +| Category | Convention | +| --------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| **Docstring** | We use [TypeDoc](https://typedoc.org) annotations to help generate more readable API references. For public APIs, we always include at least one **Example** to ease everyone's experience when using an IDE. | +| **Style guide** | We use [Eslint](https://eslint.org) and [Prettier](https://prettier.io) to enforce beyond good practices. We use TypeScript types, function return types, and access modifiers to convey intent. | +| **Core utilities** | Core utilities always accept `serviceName` as a constructor parameter, can work in isolation, and are also available in other languages implementation. | +| **Utilities** | Utilities are not as strict as core and focus on community needs: development productivity, industry leading practices, etc. Both core and general utilities follow our [Tenets](https://docs.powertools.aws.dev/lambda/typescript/#tenets). | +| **Errors** | Specific errors thrown by Powertools live within utilities themselves and use `Error` suffix e.g. `IdempotencyKeyError`. | +| **Git commits** | We follow [conventional commits](https://www.conventionalcommits.org/en/v1.0.0/). We do not enforce conventional commits on contributors to lower the entry bar. Instead, we enforce a conventional PR title so our label automation and changelog are generated correctly. | +| **API documentation** | API reference docs are generated from docstrings which should have Examples section to allow developers to have what they need within their own IDE. Documentation website covers the wider usage, tips, and strive to be concise. | +| **Documentation** | We treat it like a product. We sub-divide content aimed at getting started (80% of customers) vs advanced usage (20%). We also ensure customers know how to unit test their code when using our features. | -#### Docs website +### Testing definition -You can build and start a local docs website by running: +We group tests in different categories -`npm run docs-website-build-run` +| Test | When to write | Notes | Speed | +| ----------------- | ----------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------- | +| Unit tests | Verify the smallest possible unit works. | Networking access is prohibited. Keep mocks and spies at minimum. | Fast (ms to few seconds at worst) | +| End-to-end tests | Gain confidence that a Lambda function with our code operates as expected. Also referred to as integration tests. | It simulates how customers configure, deploy, and run their Lambda function - Event Source configuration, IAM permissions, etc. | Slow (minutes) | +| Performance tests | Ensure critical operations won't increase latency and costs to customers. | CI arbitrary hardware can make it flaky. We'll resume writing perf test after we revamp our unit/functional tests with internal utilities. | Fast to moderate (a few seconds to a few minutes) | -Alternatively you can run these two commands: +**NOTE**: Unit tests are mandatory. We have plans to create a guide on how to create these different tests. Maintainers will help indicate whether additional tests are necessary and provide assistance as required. -* `npm run docs-buildDockerImage` OR `docker build -t squidfunk/mkdocs-material ./docs/` -* `npm run docs-runLocalDocker` OR `docker run --rm -it -p 8000:8000 -v ${PWD}:/docs squidfunk/mkdocs-material` +## Finding contributions to work on -### Build & Package +Looking at the existing issues is a great way to find something to contribute on. As our projects, by default, use GitHub issue labels, [looking at any 'help-wanted' issues is a great place to start](https://github.com/orgs/aws-powertools/projects/7/views/3?query=is%3Aopen+sort%3Aupdated-desc). -In some cases, you might want to build and package the utilities to test them in a separate project or to make sure that the bundling is working as expected. - -Before running the following commands, make sure that you have installed the dependencies for the current branch by running `npm ci` in the root folder: -- `npm run build` to build the project, this will generate a `lib` folder in each one of the packages folders. -- `npm pack -w packages/metrics` to package a specific utility, this will generate a `.tgz` file in the root folder. -- `git restore .` to restore the changes made by the build and package commands. - -If you want to package more than one utility, you can append one or more flags to the same command, for example: `npm pack -w packages/metrics -w packages/logger`. +## Code of Conduct -You can then install the package in your project by running `npm install `. +This project has adopted the [Amazon Open Source Code of Conduct](https://aws.github.io/code-of-conduct). +For more information see the [Code of Conduct FAQ](https://aws.github.io/code-of-conduct-faq) or contact + with any additional questions or comments. -### Conventions +## Security issue notifications -| Category | Convention | -| ----------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| **Docstring** | We use [TypeDoc](https://typedoc.org) annotations to provide type information and create API references. | -| **Style guide** | We use `eslint` & `prettier` to keep our code consistent in terms of style and reducing defects. | -| **Test coverage** | We use [Jest](https://jestjs.io/) to test our code and [Codecov](https://codecov.io/) to report test coverage. We aim to have 100% test coverage in our unit tests. | -| **Git commits** | We follow [conventional commits](https://www.conventionalcommits.org/en/v1.0.0/). These are not enforced as we squash and merge PRs, but PR titles are enforced during CI. | -| **Documentation** | API reference docs are generated from docstrings which should have an Examples section to allow developers to have what they need within their own IDE. Documentation website covers the wider usage, tips, and strives to be concise. | +If you discover a potential security issue in this project we ask that you notify AWS/Amazon Security via our [vulnerability reporting page](http://aws.amazon.com/security/vulnerability-reporting/). Please do **not** create a public github issue. ## Licensing diff --git a/MAINTAINERS.md b/MAINTAINERS.md index 7e684dad07..e9e6d1e941 100644 --- a/MAINTAINERS.md +++ b/MAINTAINERS.md @@ -1,302 +1,2 @@ -## Table of contents - -- [Overview](#overview) -- [Current Maintainers](#current-maintainers) -- [Emeritus](#emeritus) -- [Labels](#labels) -- [Maintainer Responsibilities](#maintainer-responsibilities) - - [Uphold Code of Conduct](#uphold-code-of-conduct) - - [Prioritize Security](#prioritize-security) - - [Review Pull Requests](#review-pull-requests) - - [Merging Pull Requests](#merging-pull-requests) - - [Triage New Issues](#triage-new-issues) - - [Triage Bug Reports](#triage-bug-reports) - - [Triage RFCs](#triage-rfcs) - - [Run end to end tests](#run-end-to-end-tests) - - [Releasing a new version](#releasing-a-new-version) - - [Drafting release notes](#drafting-release-notes) - - [Releasing a documentation hotfix](#releasing-a-documentation-hotfix) - - [Maintain Overall Health of the Repo](#maintain-overall-health-of-the-repo) - - [Manage Roadmap](#manage-roadmap) - - [Add Continuous Integration Checks](#add-continuous-integration-checks) - - [Negative Impact on the Project](#negative-impact-on-the-project) - - [Becoming a maintainer](#becoming-a-maintainer) -- [Common scenarios](#common-scenarios) - - [Contribution is stuck](#contribution-is-stuck) - - [Insufficient feedback or information](#insufficient-feedback-or-information) - - [Crediting contributions](#crediting-contributions) - - [Is that a bug?](#is-that-a-bug) - - [Mentoring contributions](#mentoring-contributions) - - [Long running issues or PRs](#long-running-issues-or-prs) -- [Automation](#automation) - -## Overview - -> **Please treat this content as a living document.** - -This is document explains who the maintainers are (see below), what they do in this repo, and how they should be doing it. If you're interested in contributing, see [CONTRIBUTING](CONTRIBUTING.md). - -## Current Maintainers - -| Maintainer | GitHub ID | Affiliation | -| ------------------ | ------------------------------------------- | ----------- | -| Andrea Amorosi | [dreamorosi](https://github.com/dreamorosi) | Amazon | -| Alexander Schueren | [am29d](https://github.com/am29d) | Amazon | - -## Emeritus - -Previous active maintainers who contributed to this project. - -| Maintainer | GitHub ID | Affiliation | -| -------------------------- | --------------------------------------------- | ----------- | -| Sara Gerion | [saragerion](https://github.com/saragerion) | Amazon | -| Florian Chazal | [flochaz](https://github.com/flochaz) | Amazon | -| Chadchapol Vittavutkarnvej | [ijemmy](https://github.com/ijemmy) | Booking.com | -| Alan Churley | [alan-churley](alan-churley) | CloudCall | -| Bahr Michael | [bahrmichael](https://github.com/bahrmichael) | Stedi | - -## Labels - -These are the most common labels used by maintainers to triage issues, pull requests (PR), and for project management: - -| Label | Usage | Notes | -| -------------------------------------- | ---------------------------------------------------------------------------------------------- | -------------------------------------------------- | -| triage | New issues that require maintainers review | Issue template | -| area/documentation | Improvements or additions to documentation | Examples/Readme files; Doc additions, fixes, etc.; | -| area/logger | Items related to the Logger Utility | PR automation | -| area/metrics | Items related to the Metrics Utility | PR automation | -| area/tracer | Items related to the Tracer Utility | PR automation | -| area/idempotency | Items related to the Idempotency Utility | PR automation | -| area/parameters | Items related to the Parameters Utility | PR automation | -| area/commons | Items related to the Commons Utility | PR automation | -| area/jmespath | Items related to the JMESPath Utility | PR automation | -| area/validation | Items related to the Validation Utility | PR automation | -| area/batch | Items related to the Batch Processing Utility | PR automation | -| area/parser | Items related to the Parser Utility | PR automation | -| area/automation | Items related to automation like GitHub workflows or CI/CD | PR automation | -| area/layers | Items related to the Lambda Layers pipeline | PR automation | -| size/XS | PRs between 0-9 LOC | PR automation | -| size/S | PRs between 10-29 LOC | PR automation | -| size/M | PRs between 30-99 LOC | PR automation | -| size/L | PRs between 100-499 LOC | PR automation | -| size/XL | PRs between 500-999 LOC, often PRs that grown with feedback | PR automation | -| size/XXL | PRs with 1K+ LOC, largely documentation related | PR automation | -| customer-reference | Authorization to use company name in our documentation | Public Relations | -| community-content | Suggested content to feature in our documentation | Public Relations | -| do-not-merge | PRs that are blocked for varying reasons | Timeline is uncertain | -| type/bug | Unexpected, reproducible and unintended software behavior | PR/Release automation; Doc snippets are excluded; | -| type/bug-upstream | Bug caused by upstream dependency | | -| type/not-a-bug | New and existing bug reports incorrectly submitted as bug | Analytics | -| type/deprecation | This item contains code deprecation | | -| type/duplicate | This issue is a duplicate of an existing one | Analytics | -| type/feature-request | Issue requesting new or enhancements to existing features | Issue template | -| type/feature | PRs that introduce new features | PR automation | -| type/enhancement | PRs that introduce minor changes, usually to existing features | PR automation | -| type/RFC | Technical design documents related to a feature request | | -| type/internal | PRs that introduce changes in governance, tech debt and chores (linting setup, baseline, etc.) | PR automation | -| type/tests | PRs that add or change tests | PR automation | -| type/dependencies | Changes that touch dependencies, e.g. Dependabot, etc. | Issues/PR automation | -| type/breaking-change | Changes that will cause customer impact and need careful triage | | -| status/blocked | Items which progress is blocked by external dependency or reason | | -| status/confirmed | Items with clear scope and that are ready for implementation | | -| status/discussing | Items that need to be discussed, elaborated, or refined | | -| status/on-hold | Items that are on hold and will be revisited in the future | | -| status/pending-release | Merged changes that will be available soon | Release automation auto-closes/notifies it | -| status/completed | Items that are complete and have been merged and/or shipped | | -| status/rejected | This is something we will not be working on. At least, not in the measurable future | | -| status/pending-close-response-required | This issue will be closed soon unless the discussion moves forward | Stale Automation | -| good-first-issue | Something that is suitable for those who want to start contributing | | -| help-wanted | Tasks you want help from anyone to move forward | Bandwidth, complex topics, etc. | -| need-customer-feedback | Tasks that need more feedback before proceeding | 80/20% rule, uncertain, etc. | -| need-more-information | Missing information before making any calls | Signal that investigation or answers are needed | -| need-response | Requires a response from a customer and might be automatically closed if none is received | Marked as stale after 2 weeks, and closed after 3 | -| need-issue | PR is missing a related issue for tracking change | | - -## Maintainer Responsibilities - -Maintainers are active and visible members of the community, and have [maintain-level permissions on a repository](https://docs.github.com/en/organizations/managing-access-to-your-organizations-repositories/repository-permission-levels-for-an-organization). Use those privileges to serve the community and evolve code as follows. - -Be aware of recurring ambiguous situations and [document them](#common-scenarios) to help your fellow maintainers. - -### Uphold Code of Conduct - -Model the behavior set forward by the [Code of Conduct](CODE_OF_CONDUCT.md) and raise any violations to other maintainers and admins. There could be unusual circumstances where inappropriate behavior does not immediately fall within the [Code of Conduct](CODE_OF_CONDUCT.md). - -These might be nuanced and should be handled with extra care - when in doubt, do not engage and reach out to other maintainers and admins. - -### Prioritize Security - -Security is your number one priority. Maintainer's Github keys must be password protected securely and any reported security vulnerabilities are addressed before features or bugs. - -Note that this repository is monitored and supported 24/7 by Amazon Security, see [Reporting a Vulnerability](SECURITY.md) for details. - -### Review Pull Requests - -Review pull requests regularly, comment, suggest, reject, merge and close. Accept only high quality pull-requests. Provide code reviews and guidance on incoming pull requests. - -PRs are [labeled](#labels) based on file changes and semantic title. Pay attention to whether labels reflect the current state of the PR and correct accordingly. - -Use and enforce [semantic versioning](https://semver.org/) pull request titles, as these will be used for [CHANGELOG](CHANGELOG.md) and [Release notes](https://github.com/aws-powertools/powertools-lambda-typescript/releases) - make sure they communicate their intent at the human level. - -For issues linked to a PR, our automation should apply the `status/pending-release` label. Make sure the label is always applied when merging. [Upon release](#releasing-a-new-version), these issues will be notified which release version contains their change. - -See [Common scenarios](#common-scenarios) section for additional guidance. - -### Merging Pull Requests - -Before merging a PR make sure that the title reflects the changes being introduced. - -This project uses the [squash and merge](https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/incorporating-changes-from-a-pull-request/about-pull-request-merges#squash-and-merge-your-commits) strategy which means commits are squashed into a single commit. Instead of seeing all of a contributor's individual commits from a topic branch, the commits are combined into one commit and merged into the default branch. - -This allows you to have control over the commit message although it should match the PR title most of the time. Use and enforce [semantic versioning](https://semver.org/), as these will be used for versioning the next release. - -### Triage New Issues - -Manage [labels](#labels), review issues regularly, and create new labels as needed by the project. Remove `triage` label when you're able to confirm the validity of a request, a bug can be reproduced, etc. Give priority to the original author for implementation, unless it is a sensitive task that is best handled by maintainers. - -Make sure issues are assigned to our [board of activities](https://github.com/orgs/aws-powertools/projects/7) and have the right [status](https://docs.powertools.aws.dev/lambda-typescript/latest/roadmap/#roadmap-status-definition). - -Use our [labels](#labels) to signal good first issues to new community members, and to set expectation that this might need additional feedback from the author, other customers, experienced community members and/or maintainers. - -Be aware of [casual contributors](https://opensource.com/article/17/10/managing-casual-contributors) and recurring contributors. Provide the experience and attention you wish you had if you were starting in open source. - -See [Common scenarios](#common-scenarios) section for additional guidance. - -### Triage Bug Reports - -Be familiar with [our definition of bug](#is-that-a-bug). If it's not a bug, you can close it or adjust its title and labels - always communicate the reason accordingly. - -For bugs caused by upstream dependencies, replace `type/bug` with `type/bug-upstream` label. Ask the author whether they'd like to raise the issue upstream or if they prefer us to do so. - -Assess the impact and make the call on whether we need an emergency release. Contact other [maintainers](#current-maintainers) when in doubt. - -See [Common scenarios](#common-scenarios) section for additional guidance. - -### Triage RFCs - -RFC is a collaborative process to help us get to the most optimal solution given the context. Their purpose is to ensure everyone understands what this context is, their trade-offs, and alternative solutions that were part of the research before implementation begins. - -Make sure you ask these questions in mind when reviewing: - -- Does it use our [RFC template](https://github.com/aws-powertools/powertools-lambda-typescript/issues/new?assignees=&labels=RFC%2Ctriage&template=rfc.yml&title=RFC%3A+TITLE)? -- Does the match our [Tenets](https://docs.powertools.aws.dev/lambda-typescript/latest/#tenets)? -- Does the proposal address the use case? If so, is the recommended usage explicit? -- Does it focus on the mechanics to solve the use case over fine-grained implementation details? -- Can anyone familiar with the code base implement it? -- If approved, are they interested in contributing? Do they need any guidance? -- Does this significantly increase the overall project maintenance? Do we have the skills to maintain it? -- If we can't take this use case, are there alternative projects we could recommend? Or does it call for a new project altogether? - -When necessary, be upfront that the time to review, approve, and implement a RFC can vary - see [Contribution is stuck](#contribution-is-stuck). Some RFCs may be further updated after implementation, as certain areas become clearer. - -An example of a successful RFC: [#447](https://github.com/aws-powertools/powertools-lambda-typescript/issues/447) - -### Run end to end tests - -E2E tests should be ran before every merge to `main` or manually via [run-e2e-tests workflow](https://github.com/aws-powertools/powertools-lambda-typescript/actions/workflows/run-e2e-tests.yml) before making a release. - -To run locally, you need [AWS CDK CLI](https://docs.aws.amazon.com/cdk/v2/guide/getting_started.html#getting_started_prerequisites) and an [account bootstrapped](https://docs.aws.amazon.com/cdk/v2/guide/bootstrapping.html) (`cdk bootstrap`). With a default AWS CLI profile configured, or `AWS_PROFILE` environment variable set, run `npm run test:e2e -ws`. For more information on how the tests are structured, see [Integration Tests](https://github.com/aws-powertools/powertools-lambda-typescript/blob/main/CONTRIBUTING.md#integration-tests). - -### Releasing a new version - -🚧 WIP 🚧 - -#### Drafting release notes - -Visit the [Releases page](https://github.com/aws-powertools/powertools-lambda-typescript/releases) and choose the edit pencil button. - -Make sure the `tag` field reflects the new version you're releasing, the target branch field is set to `main`, and `release title` matches your tag e.g., `v1.4.1`. - -You'll notice we group all changes based on their [labels](#labels) like `type/feature`, `type/bug`, `type/documentation`, etc. - -**All looking good, what's next?** - -The best part comes now. Replace the placeholder `[Human readable summary of changes]` with what you'd like to communicate to customers what this release is all about. Rule of thumb: always put yourself in the customers shoes. - -These are some questions to keep in mind when drafting your first or future release notes: - -- Can customers understand at a high level what changed in this release? -- Is there a link to the documentation where they can read more about each main change? -- Are there any graphics or [code snippets](carbon.now.sh/) that can enhance readability? -- Are we calling out any key contributor(s) to this release? - - All contributors are automatically credited, use this as an exceptional case to feature them - -Once you're happy, hit `Publish release` 🎉🎉🎉. - -This will kick off the [Publish docs on release](https://github.com/aws-powertools/powertools-lambda-typescript/blob/main/.github/workflows/publish-docs-on-release.yml) workflow that will will notify all the issues labeled as `status/pending-release` of the new release. - -### Releasing a documentation hotfix - -You can rebuild the latest documentation without a full release via this [GitHub Actions Workflow](https://github.com/aws-powertools/powertools-lambda-typescript/blob/main/.github/workflows/rebuild-latest-docs.yml). - -Choose `Run workflow`, keep `main` as the branch, and input the latest Powertools for AWS Lambda (TypeScript) version available i.e. `v1.4.1`. - -This workflow will update both user guide and API documentation. - -### Maintain Overall Health of the Repo - -Keep the `main` branch at production quality at all times. If a PR introduces code changes you should make sure that linting and tests are passing before merging. - -### Manage Roadmap - -See [Roadmap section](https://docs.powertools.aws.dev/lambda-typescript/latest/roadmap/) - -Ensure the repo highlights features that should be elevated to the project roadmap. Be clear about the feature’s status, priority, target version, and whether or not it should be elevated to the roadmap. - -### Add Continuous Integration Checks - -Add integration checks that validate pull requests and pushes to ease the burden on Pull Request reviewers. Continuously revisit areas of improvement to reduce operational burden in all parties involved. - -### Negative Impact on the Project - -Actions that negatively impact the project will be handled by the admins, in coordination with other maintainers, in balance with the urgency of the issue. Examples would be [Code of Conduct](CODE_OF_CONDUCT.md) violations, deliberate harmful or malicious actions, spam, monopolization, and security risks. - -### Becoming a maintainer - -In late 2023, we will revisit this. We need to improve our understanding of how other projects are doing, their mechanisms to promote key contributors, and how they interact daily. - -We suspect this process might look similar to the [OpenSearch project](https://github.com/opensearch-project/.github/blob/main/MAINTAINERS.md#becoming-a-maintainer). - -## Common scenarios - -These are recurring ambiguous situations that new and existing maintainers may encounter. They serve as guidance. It is up to each maintainer to follow, adjust, or handle in a different manner as long as [our conduct is consistent](#uphold-code-of-conduct) - -### Contribution is stuck - -A contribution can get stuck often due to lack of bandwidth and language barrier. For bandwidth issues, check whether the author needs help. Make sure you get their permission before pushing code into their existing PR - do not create a new PR unless strictly necessary. - -For language barrier and others, offer a 1:1 chat to get them unblocked. Often times, English might not be their primary language, and writing in public might put them off, or come across not the way they intended to be. - -In other cases, you may have constrained capacity. Use `help-wanted` label when you want to signal other maintainers and external contributors that you could use a hand to move it forward. - -### Insufficient feedback or information - -When in doubt, use `need-more-information` or `need-customer-feedback` labels to signal more context and feedback are necessary before proceeding. You can also use `status/on-hold` label when you expect it might take a while to gather enough information before you can decide. - -Note that issues marked as `need-response` will be automatically closed after 3 weeks of inactivity. - -### Crediting contributions - -We credit all contributions as part of each [release note](https://github.com/aws-powertools/powertools-lambda-typescript/releases) as an automated process. If you find contributors are missing from the release note you're producing, please add them manually. - -### Is that a bug? - -A bug produces incorrect or unexpected results at runtime that differ from its intended behavior. Bugs must be reproducible. They directly affect customers experience at runtime despite following its recommended usage. - -Documentation snippets, examples, use of internal components, or unadvertised functionalities are not considered bugs. - -### Mentoring contributions - -Always favor mentoring issue authors to contribute, unless they're not interested or the implementation is sensitive (_e.g., complexity, time to release, etc._). - -Make use of `help-wanted` and `good-first-issue` to signal additional contributions the community can help. - -### Long running issues or PRs - -Try offering a 1:1 call in the attempt to get to a mutual understanding and clarify areas that maintainers could help. - -In the rare cases where both parties don't have the bandwidth or expertise to continue, it's best to use the `status/on-hold` label. By then, see if it's possible to break the PR or issue in smaller chunks, and eventually close if there is no progress. - -## Automation - -🚧 WIP 🚧 +> [!IMPORTANT] +> Maintainers' playbook moved: https://docs.powertools.aws.dev/lambda/typescript/latest/maintainers/ diff --git a/docs/contributing/conventions.md b/docs/contributing/conventions.md new file mode 100644 index 0000000000..517c556fff --- /dev/null +++ b/docs/contributing/conventions.md @@ -0,0 +1,45 @@ +--- +title: Conventions +description: General conventions and practices that are applicable throughout to Powertools for AWS Lambda (TypeScript) +--- + +## General terminology and practices + +These are common conventions we keep on building as the project gains new contributors and grows in complexity. + +As we gather more concrete examples, this page will have one section for each category to demonstrate a before and after. + +| Category | Convention | +| --------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| **Docstring** | We use [TypeDoc](https://typedoc.org){target="_blank"} annotations to help generate more readable API references. For public APIs, we always include at least one **Example** to ease everyone's experience when using an IDE. | +| **Style guide** | We use [Eslint](https://eslint.org){target="_blank"} and [Prettier](https://prettier.io){target="_blank"} to enforce beyond good practices. We use TypeScript types, function return types, and access modifiers to convey intent. | +| **Core utilities** | Core utilities always accept `serviceName` as a constructor parameter, can work in isolation, and are also available in other languages implementation. | +| **Utilities** | Utilities are not as strict as core and focus on community needs: development productivity, industry leading practices, etc. Both core and general utilities follow our [Tenets](https://docs.powertools.aws.dev/lambda/typescript/#tenets){target="_blank"}. | +| **Errors** | Specific errors thrown by Powertools live within utilities themselves and use `Error` suffix e.g. `IdempotencyKeyError`. | +| **Git commits** | We follow [conventional commits](https://www.conventionalcommits.org/en/v1.0.0/){target="_blank"}. We do not enforce conventional commits on contributors to lower the entry bar. Instead, we enforce a conventional PR title so our label automation and changelog are generated correctly. | +| **API documentation** | API reference docs are generated from docstrings which should have Examples section to allow developers to have what they need within their own IDE. Documentation website covers the wider usage, tips, and strive to be concise. | +| **Documentation** | We treat it like a product. We sub-divide content aimed at getting started (80% of customers) vs advanced usage (20%). We also ensure customers know how to unit test their code when using our features. | + +## Repository structure + +The repository uses a monorepo structure managed using [npm workspaces](https://docs.npmjs.com/cli/v8/using-npm/workspaces). This allows us to keep all code in one place and share common dependencies. + +The Powertools for AWS Lambda (TypeScript) repository utilities live under the `packages/` directory. Each utility is a separate package and has its own `package.json` file. For example, the `@aws-lambda-powertools/logger` source code can be found under the `packages/logger/src` directory. + +Whenever possible, we use the same directory structure for all utilities. This makes it easier for contributors to navigate the repository and find what they need. Additionally, we try to share common runtime code between utilities to reduce maintenance overhead and runtime footprint. The shared runtime code lives under the `packages/commons/src` directory and is published to npm as the `@aws-lambda-powertools/commons` package. + +There are also a few other workspaces that are not utilities published to npm, but that still share dependencies and/or runtime code with the utilities. These workspaces are: + +* `docs/snippets`: contains the documentation code snippets +* `examples/*`: contains the example projects deployed via AWS CDK or AWS SAM +* `layers`: contains the code used to build and publish the [Lambda layers](../index.md#lambda-layer) + +## Testing definition + +We group tests in different categories + +| Test | When to write | Notes | Speed | +| ----------------- | ----------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------- | +| Unit tests | Verify the smallest possible unit works. | Networking access is prohibited. Keep mocks and spies at minimum. | Fast (ms to few seconds at worst) | +| End-to-end tests | Gain confidence that a Lambda function with our code operates as expected. Also referred to as integration tests. | It simulates how customers configure, deploy, and run their Lambda function - Event Source configuration, IAM permissions, etc. | Slow (minutes) | +| Performance tests | Ensure critical operations won't increase latency and costs to customers. | CI arbitrary hardware can make it flaky. We'll resume writing perf test after we revamp our unit/functional tests with internal utilities. | Fast to moderate (a few seconds to a few minutes) | \ No newline at end of file diff --git a/docs/contributing/getting_started.md b/docs/contributing/getting_started.md new file mode 100644 index 0000000000..d2166b4af7 --- /dev/null +++ b/docs/contributing/getting_started.md @@ -0,0 +1,86 @@ +--- +title: Your first contribution +description: All you need to know for your first contribution to Powertools for AWS Lambda (TypeScript) +--- + +Thank you for your interest in contributing to our project - we couldn't be more excited! + +
+```mermaid +graph LR + Learn["Learn about contributions"] --> Find["Find areas to work / get mentoring"] --> Work["Prepare pull request"] --> Closing["Take learnings with you"] +``` +End-to-end process +
+ +## Types of contributions + +We consider any contribution that help this project improve everyone's experience to be valid, as long as you agree with our [tenets](../index.md#tenets){target="_blank"}, [licensing](https://github.com/aws-powertools/powertools-lambda-typescript/blob/main/LICENSE){target="_blank"}, and [Code of Conduct](#code-of-conduct). + +Whether you're new contributor or a pro, we compiled a list of the common contributions to help you choose your first: + +!!! info "Please check [existing open](https://github.com/aws-powertools/powertools-lambda-typescript/issues?q=is%3Aissue+is%3Aopen+sort%3Aupdated-desc){target='_blank'}, or [recently closed](https://github.com/aws-powertools/powertools-lambda-typescript/issues?q=is%3Aissue+sort%3Aupdated-desc+is%3Aclosed){target='_blank'} issues before creating a new one." + Each type link goes to their respective template, or Discord invite. + +| Type | Description | +| ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| [Documentation](https://github.com/aws-powertools/powertools-lambda-typescript/issues/new?assignees=&labels=area%2Fdocumentation%2Ctriage&projects=aws-powertools%2F7&template=documentation_improvements.yml&title=Docs%3A+TITLE){target="_blank" rel="nofollow"} | Ideas to make user guide or API guide clearer. This includes typos, diagrams, tutorials, the lack of documentation, etc. | +| [Feature request](https://github.com/aws-powertools/powertools-lambda-typescript/issues/new?assignees=&labels=type%2Ffeature-request%2Ctriage&projects=aws-powertools%2F7&template=feature_request.yml&title=Feature+request%3A+TITLE){target="_blank" rel="nofollow"} | New functionalities or enhancements that could help you, your team, or existing and future customers. Check out our [process to understand how we prioritize it](../roadmap.md#process){target="_blank"}. | +| [Design proposals](https://github.com/aws-powertools/powertools-lambda-typescript/issues/new?assignees=&labels=type%2FRFC%2Ctriage&projects=aws-powertools%2F7&template=rfc.yml&title=RFC%3A+TITLE){target="_blank" rel="nofollow"} | Request for Comments (RFC) including user experience (UX) based on a feature request to gather the community feedback, and demonstrate the art of the possible. | +| [Bug report](https://github.com/aws-powertools/powertools-lambda-typescript/issues/new?assignees=&labels=type%2Fbug%2Ctriage&projects=aws-powertools%2F7&template=bug_report.yml&title=Bug%3A+TITLE){target="_blank" rel="nofollow"} | A runtime error that is reproducible whether you have an idea how to solve it or not. | +| [Advocacy](https://github.com/aws-powertools/powertools-lambda-typescript/issues/new?assignees=&labels=community-content&projects=aws-powertools%2F7&template=share_your_work.yml&title=%5BI+Made+This%5D%3A+%3CTITLE%3E){target="_blank" rel="nofollow"} | Share what you did with Powertools for AWS Lambda. Blog posts, workshops, presentation, sample applications, podcasts, etc. | +| [Public reference](https://github.com/aws-powertools/powertools-lambda-typescript/issues/new?assignees=&labels=customer-reference&projects=aws-powertools%2F7&template=support_powertools.yml&title=%5BSupport+Powertools+for+AWS+Lambda+%28TypeScript%29%5D%3A+%3Cyour+organization+name%3E){target="_blank" rel="nofollow"} | Become a public reference to share how you're using Powertools for AWS Lambda at your organization. | +| [Discussions](https://discord.gg/B8zZKbbyET){target="_blank" rel="nofollow"} | Kick off a discussion on Discord, introduce yourself, and help respond to existing questions from the community. | +| [Maintenance](https://github.com/aws-powertools/powertools-lambda-typescript/issues/new?assignees=&labels=type%2Finternal%2Ctriage&projects=aws-powertools%2F7&template=maintenance.yml&title=Maintenance%3A+TITLE){target="_blank" rel="nofollow"} | Suggest areas to address technical debt, governance, and anything internal. Generally used by maintainers and contributors. | + +## Finding contributions to work on + +[Besides suggesting ideas](#types-of-contributions) you think it'll improve everyone's experience, these are the most common places to find work: + +| Area | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| [Help wanted issues](https://github.com/aws-powertools/powertools-lambda-typescript/issues?q=is%3Aopen+is%3Aissue+label%3Ahelp-wanted+sort%3Aupdated-desc){target="_blank" rel="nofollow"} | These are triaged areas that we'd appreciate any level of contribution - from opinions to actual implementation. | +| [Missing customer feedback issues](https://github.com/aws-powertools/powertools-lambda-typescript/issues?q=is%3Aopen+is%3Aissue+label%3Aneed-customer-feedback+sort%3Aupdated-desc+){target="_blank" rel="nofollow"} | These are items we'd like to hear from more customers before making any decision. Sharing your thoughts, use case, or asking additional questions are great help. | +| [Pending design proposals](https://github.com/aws-powertools/powertools-lambda-typescript/issues/new?assignees=&labels=type%2FRFC%2Ctriage&projects=aws-powertools%2F7&template=rfc.yml&title=RFC%3A+TITLE){target="_blank" rel="nofollow"} | These are feature requests that initially look good but need a RFC to enrich the discussion by validating user-experience, tradeoffs, and highlight use cases. | +| [Backlog items](https://github.com/orgs/aws-powertools/projects/7/views/3?query=is%3Aopen+sort%3Aupdated-desc){target="_blank" rel="nofollow"} | We use GitHub projects to surface what we're working on, needs triage, etc. This view shows items we already triaged but don't have the bandwidth to tackle them just yet. | +| [Documentation](https://docs.powertools.aws.dev/lambda/typescript/latest/){target="_blank"} | Documentation can always be improved. Look for areas that a better example, or a diagram, or more context helps everyone - keep in mind a diverse audience and English as a second language folks. | +| [Participate in discussions](https://discord.gg/B8zZKbbyET){target="_blank" rel="nofollow"} | There's always a discussion that could benefit others in the form of documentation, blog post, etc. | +| [Roadmap](../roadmap.md){target="_blank"} | Some roadmap items need a RFC to discuss design options, or gather customers use case before we can prioritize it. | +| Build a sample application | Using Powertools for AWS Lambda in different contexts will give you insights on what could be made easier, which documentation could be enriched, and more. | + +!!! question "Still couldn't find anything that match your skill set?" + Please reach out on [Discord](https://discord.gg/B8zZKbbyET){target="_blank" rel="nofollow"}, specially if you'd like to get mentoring for a task you'd like to take but you don't feel ready yet :blush: + + Contributions are meant to be bi-directional. There's always something we can learn from each other. + +## Sending a pull request + +!!! note "First time creating a Pull Request? Keep [this document handy.](https://help.github.com/articles/creating-a-pull-request/){target='blank' rel='nofollow'}" + +Before sending us a pull request, please ensure that: + +* You are working against the latest source on the **main** branch, unless instructed otherwise. +* You check existing [open, and recently merged](https://github.com/aws-powertools/powertools-lambda-typescript/pulls?q=is%3Apr+is%3Aopen%2Cmerged+sort%3Aupdated-desc){target="_blank" rel="nofollow"} pull requests to make sure someone else hasn't addressed the problem already. +* You discuss and agree your proposed changes under [an existing issue](https://github.com/aws-powertools/powertools-lambda-typescript/issues?q=is%3Aopen+is%3Aupdated-desc) or a [new issue](https://github.com/aws-powertools/powertools-lambda-typescript/issues/new/choose){target="_blank" rel="nofollow"} before you begin any implementation. We value your time and bandwidth. As such, any pull requests created on non-triaged issues might not be successful. +* Create a new branch named after the change you are contributing _e.g._ `feat/logger-debug-sampling` + +**Ready?** + +These are the steps to send a pull request: + +1. Make sure that all formatting, linting, and tests tasks run as git pre-commit & pre-push hooks are passing. +2. Commit to your fork using clear commit messages. Don't worry about typos or format, we squash all commits during merge. +3. Send us a pull request with a [conventional semantic title](https://github.com/aws-powertools/powertools-lambda-typescript/pull/1744) - see full list of scopes and actions [here](https://github.com/aws-powertools/powertools-lambda-typescript/blob/main/.github/semantic.yml#L2). +4. Fill in the areas pre-defined in the pull request body to help expedite reviewing your work. +5. Pay attention to any automated CI failures reported in the pull request, and stay involved in the conversation. + +## Code of Conduct + +!!! info "This project has adopted the [Amazon Open Source Code of Conduct](https://aws.github.io/code-of-conduct){target='_blank'}" + +For more information see the [Code of Conduct FAQ](https://aws.github.io/code-of-conduct-faq) or contact + with any additional questions or comments. + +## Security issue notifications + +If you discover a potential security issue in this project, we kindly ask you to notify AWS/Amazon Security via our [vulnerability reporting page](http://aws.amazon.com/security/vulnerability-reporting/). Please do **not** create a public github issue. \ No newline at end of file diff --git a/docs/contributing/setup.md b/docs/contributing/setup.md new file mode 100644 index 0000000000..6960bfcf88 --- /dev/null +++ b/docs/contributing/setup.md @@ -0,0 +1,72 @@ +--- +title: Development environment +description: Setting up your development environment for contribution +--- + +[![Join our Discord](https://dcbadge.vercel.app/api/server/B8zZKbbyET)](https://discord.gg/B8zZKbbyET){target="_blank" rel="nofollow"} + +This page describes how to setup your development environment (Cloud or locally) to contribute to Powertools for AWS Lambda (TypeScript). + +
+```mermaid +graph LR + Dev["Development environment"] --> Quality["Run quality checks locally"] --> PR["Prepare pull request"] --> Collaborate +``` +End-to-end process +
+ +## Requirements + +!!! question "First time contributing to an open-source project ever?" + Read this [introduction on how to fork and clone a project on GitHub](https://docs.github.com/en/get-started/quickstart/contributing-to-projects){target="_blank" rel="nofollow"}. + +Unless you're using the pre-configured Cloud environment, you'll need the following installed: + +* [GitHub account](https://github.com/join){target="_blank" rel="nofollow"}. You'll need to be able to fork, clone, and contribute via pull request. +* [Node.js 18.x](https://nodejs.org/download/release/latest-v18.x/){target="_blank" rel="nofollow"}. The repository contains an `.nvmrc` file, so if you use tools like [nvm](https://github.com/nvm-sh/nvm#nvmrc), [fnm](https://github.com/Schniz/fnm) you can switch version quickly. +* [npm 9.x](https://www.npmjs.com/). We use it to install dependencies and manage the workspaces. +* [Docker](https://docs.docker.com/engine/install/){target="_blank" rel="nofollow"}. We use it to run documentation, and non-JavaScript tooling. +* [Fork the repository](https://github.com/aws-powertools/powertools-lambda-typescript/fork). You'll work against your fork of this repository. + +??? note "Additional requirements if running end-to-end tests" + + * [AWS Account bootstrapped with CDK](https://docs.aws.amazon.com/cdk/v2/guide/bootstrapping.html){target="_blank"} + * [AWS CLI installed and configured](https://docs.aws.amazon.com/cli/latest/userguide/getting-started-install.html) + +## Cloud environment + +!!! warning "A word of caution" + Before using a Cloud environment, be mindful of the pricing structure. You can find more information about each service pricing respectively on [Gitpod](https://www.gitpod.io/pricing){target="_blank" rel="nofollow"} and [GitHub Codespaces](https://docs.github.com/en/billing/managing-billing-for-github-codespaces/about-billing-for-github-codespaces){target="_blank" rel="nofollow"} pages. When in doubt, use the local environment below. + +Once provisioned, each Cloud environment will come with all development dependencies and tools you'll need to contribute already installed. + +### Gitpod + +To use a pre-configured Gitpod environment, create or login to a Gitpod account, then replace `YOUR_USERNAME` with your GitHub username or organization. + +```bash +https://gitpod.io/#https://github.com/YOUR_USERNAME/powertools-lambda-typescript #(1)! +``` + +1. For example, if your username is `octocat`, then the final URL should be `https://gitpod.io/#https://github.com/octocat/powertools-lambda-typescript` + +### GitHub Codespaces + +To use a pre-configured GitHub Codespaces environment, navigate to your fork of the repository, then click on the green `Code` button, and select `Create codespace on ` under the `Codespaces` tab (where `` is the branch you want to work on). + +## Local environment + +> Assuming you've got all [requirements](#requirements). + +You can use `npm run setup-local` to install all dependencies locally and setup pre-commit hooks. + +!!! note "Curious about what `setup-local` does under the hood?" + We use npm scripts to [automate common tasks](https://github.com/aws-powertools/powertools-lambda-typescript/blob/main/package.json#L24){target="_blank" rel="nofollow"} locally and in Continuous Integration environments. + +## Local documentation + +You might find useful to run both the documentation website and the API reference locally while contributing: + +* **Docs website**: `npm run docs-runLocalDocker` + * If this is your first time running the docs, you need to build the image: `npm run docs-buildDockerImage` +* **API reference**: `npm run docs-api-build-run` \ No newline at end of file diff --git a/docs/contributing/testing.md b/docs/contributing/testing.md new file mode 100644 index 0000000000..6412297499 --- /dev/null +++ b/docs/contributing/testing.md @@ -0,0 +1,103 @@ +--- +title: Testing +description: How to write tests for Powertools for AWS Lambda (TypeScript) +--- + +## General practices + +As discussed in the [conventions](./conventions.md) page, we have different types of tests that aim to verify different aspects of the code. + +Tests are defined alongside the code they test, and can be found under the `tests` folder of each module. For example, the tests for the `@aws-lambda-powertools/logger` module can be found under `packages/logger/tests`. + +Each test type has its own folder, and each test file is named after the feature it tests. For example, the tests for the `@aws-lambda-powertools/logger` module can be found under `packages/logger/tests/unit` and `packages/logger/tests/e2e`. + +Tests are written using [Jest](https://jestjs.io) and are grouped into categories. You can run each group separately or all together thanks to [jest-runner-groups](https://www.npmjs.com/package/jest-runner-groups). + +Each test file needs to be tagged with the proper group, otherwise, it won't be executed. The group is defined in the header of the file, and it follows this convention: + +```typescript +/** + * Tests metrics + * + * @group unit// + */ +``` + +The test file should contain one or more tests organized using the `describe` and `it` functions. Each test should be named after the feature it tests, and should be as descriptive as possible. For example, the test for the `Logger` class `info` method is named `should log info message`. + +```typescript +describe('Class: Logger', () => { + describe('Method: info', () => { + it('should log info message', () => { + // ... + }) + }) +}) +``` + +Single tests should be as simple as possible, and should follow the Prepare, Act, Assess pattern. For example, the test from the previous example should look like this: + +```typescript +describe('Class: Logger', () => { + describe('Method: info', () => { + it('should log info message', () => { + // Prepare + const logger = new Logger() + + // Act + logger.info('test') + + // Assess + expect(logger.info).toHaveBeenCalledWith('test') + }) + }) +}) +``` + +## Unit tests + +Unit tests are used to verify the smallest possible unit of code works as expected. They are fast to run and should be used to test the core logic of the code. They should not test external dependencies, such as network calls, and should use mocks and spies as needed to verify the code behaves as expected. + +When writing unit tests, you should follow the same conventions we use for the code. For example, each test file should correspond to a single discrete feature such as a single high-level function, class, or middleware. For example, the `Logger` class for the `@aws-lambda-powertools/logger` module has a single test file named `logger.test.ts`. + +To run unit tests, you can use of the following commands from the root folder: + +* `npm test -ws` to run all the unit tests for all the modules sequentially +* `npm run test:parallel` to run all the unit tests for all the modules in parallel +* `npm test -w packages/metrics` to run all the unit tests for the `metrics` module +* `npm run jest -w packages/metrics -- --group=unit/metrics/middleware` to run all the unit tests for the `metrics` module that are tagged with the `unit/metrics/middleware` group + + +We enforce 100% code coverage for unit tests. The test command will fail if the coverage is not 100% both on your local machine and in CI. + +## Integration tests + +Integration tests are used to verify that the code works as expected when deployed to AWS. They are slower than unit tests, and should be used to test the code in a real environment. They should test the code as a whole, including external dependencies such as network calls, and should not use mocks and spies. + +When writing integration tests, you should follow the same conventions used for existing tests. For example, each test file should correspond to an utility and a specific usage type. For example, the test for the middleware usage for the `@aws-lambda-powertools/logger` module has a single test file named `basicFeatures.middy.test.ts`. + +!!! warning "A word of caution" + Running integration tests will deploy AWS resources in your AWS account, which might incur costs. The cost from **some services** are covered by the [AWS Free Tier](https://aws.amazon.com/free/?all-free-tier.sort-by=item.additionalFields.SortRank&all-free-tier.sort-order=asc&awsf.Free%20Tier%20Types=*all&awsf.Free%20Tier%20Categories=*all) but not all of them. We recommend you to use a dedicated AWS account for testing purposes, and when in doubt, let the CI on our repository run the tests for you. + +To run integration tests you'll need to set up an AWS account and obtain credentials as described in the [prerequisites](./setup.md#requirements). Once ready, you can use of the following commands from the root folder: + +* `npm test:e2e -ws` to run all the integration tests for all the modules sequentially +* `test:e2e:parallel` to run all the integration tests for all the modules in parallel +* `npm test:e2e -w packages/metrics` to run all the integration tests for the `metrics` module +* `npm run test:e2e:nodejs18x -w packages/metrics` to run all the integration tests for the `metrics` module using the `nodejs18x` runtime + +The tests will deploy the necessary AWS resources using AWS CDK, and will run the Lambda functions using the AWS SDK. After that, the tests will verify the Lambda functions behave as expected by checking logs, metrics, traces, and other resources as needed. Finally, the tests will destroy all the AWS resources created at the beginning. + +Below is a diagram that shows the flow of the integration tests: + +```mermaid +sequenceDiagram + Dev Environment / CI->>+Jest: npm run test:e2e + Jest-->Jest: Synthetize CloudFormation Stack + Jest->>+AWS: Deploy Stack + Jest->>+AWS: Invoke Lambda function + AWS->>Jest: Report logs / results + Jest-->Jest: Assert logs/result + Jest->>+AWS: Destroy Stack + Jest->>+Dev Environment / CI: show test results +``` \ No newline at end of file diff --git a/docs/maintainers.md b/docs/maintainers.md new file mode 100644 index 0000000000..d5608f1ac8 --- /dev/null +++ b/docs/maintainers.md @@ -0,0 +1,338 @@ +--- +title: Maintainers playbook +description: Playbook for active maintainers in Powertools for AWS Lambda (TypeScript) +--- + +## Overview + +!!! note "Please treat this content as a living document." + +This is document explains who the maintainers are, their responsibilities, and how they should be doing it. If you're interested in contributing, see [Contributing](./contributing/getting_started.md) document. + +## Current Maintainers + +| Maintainer | GitHub ID | Affiliation | +| ------------------ | --------------------------------------------------------------------------- | ----------- | +| Andrea Amorosi | [dreamorosi](https://github.com/dreamorosi){target="_blank" rel="nofollow"} | Amazon | +| Alexander Schueren | [am29d](https://github.com/am29d){target="_blank" rel="nofollow"} | Amazon | +| Simon Thulbourn | [sthulb](https://github.com/sthulb){target="_blank" rel="nofollow"} | Amazon | + +## Emeritus + +Previous active maintainers who contributed to this project. + +| Maintainer | GitHub ID | Affiliation | +| -------------------------- | ------------------------------------------------------------------------------- | ----------- | +| Sara Gerion | [saragerion](https://github.com/saragerion){target="_blank" rel="nofollow"} | Amazon | +| Florian Chazal | [flochaz](https://github.com/flochaz){target="_blank" rel="nofollow"} | Amazon | +| Chadchapol Vittavutkarnvej | [ijemmy](https://github.com/ijemmy){target="_blank" rel="nofollow"} | Booking.com | +| Alan Churley | [alan-churley](https://github.com/alan-churley){target="_blank" rel="nofollow"} | CloudCall | +| Michael Bahr | [bahrmichael](https://github.com/bahrmichael){target="_blank" rel="nofollow"} | Stedi | + +## Labels + +These are the most common labels used by maintainers to triage issues, pull requests (PR), and for project management: + +| Label | Usage | Notes | +| -------------------------------------- | ---------------------------------------------------------------------------------------------- | ---------------------------------------------------------------- | +| triage | New issues that require maintainers review | Issue template | +| area/documentation | Improvements or additions to documentation | Examples/Readme files; Doc additions, fixes, etc.; | +| area/logger | Items related to the Logger Utility | PR automation | +| area/metrics | Items related to the Metrics Utility | PR automation | +| area/tracer | Items related to the Tracer Utility | PR automation | +| area/idempotency | Items related to the Idempotency Utility | PR automation | +| area/parameters | Items related to the Parameters Utility | PR automation | +| area/commons | Items related to the Commons Utility | PR automation | +| area/jmespath | Items related to the JMESPath Utility | PR automation | +| area/validation | Items related to the Validation Utility | PR automation | +| area/batch | Items related to the Batch Processing Utility | PR automation | +| area/parser | Items related to the Parser Utility | PR automation | +| area/automation | Items related to automation like GitHub workflows or CI/CD | PR automation | +| area/layers | Items related to the Lambda Layers pipeline | PR automation | +| size/XS | PRs between 0-9 LOC | PR automation | +| size/S | PRs between 10-29 LOC | PR automation | +| size/M | PRs between 30-99 LOC | PR automation | +| size/L | PRs between 100-499 LOC | PR automation | +| size/XL | PRs between 500-999 LOC, often PRs that grown with feedback | PR automation | +| size/XXL | PRs with 1K+ LOC, largely documentation related | PR automation | +| customer-reference | Authorization to use company name in our documentation | Public Relations | +| community-content | Suggested content to feature in our documentation | Public Relations | +| do-not-merge | PRs that are blocked for varying reasons | Timeline is uncertain | +| type/bug | Unexpected, reproducible and unintended software behavior | PR/Release automation; Doc snippets are excluded; | +| type/bug-upstream | Bug caused by upstream dependency | | +| type/not-a-bug | New and existing bug reports incorrectly submitted as bug | Analytics | +| type/deprecation | This item contains code deprecation | | +| type/duplicate | This issue is a duplicate of an existing one | Analytics | +| type/feature-request | Issue requesting new or enhancements to existing features | Issue template | +| type/feature | PRs that introduce new features | PR automation | +| type/enhancement | PRs that introduce minor changes, usually to existing features | PR automation | +| type/RFC | Technical design documents related to a feature request | | +| type/internal | PRs that introduce changes in governance, tech debt and chores (linting setup, baseline, etc.) | PR automation | +| type/tests | PRs that add or change tests | PR automation | +| type/dependencies | Changes that touch dependencies, e.g. Dependabot, etc. | Issues/PR automation | +| type/breaking-change | Changes that will cause customer impact and need careful triage | | +| status/blocked | Items which progress is blocked by external dependency or reason | | +| status/confirmed | Items with clear scope and that are ready for implementation | | +| status/discussing | Items that need to be discussed, elaborated, or refined | | +| status/on-hold | Items that are on hold and will be revisited in the future | | +| status/pending-release | Merged changes that will be available soon | Release automation auto-closes/notifies it | +| status/completed | Items that are complete and have been merged and/or shipped | | +| status/rejected | This is something we will not be working on. At least, not in the measurable future | | +| status/pending-close-response-required | This issue will be closed soon unless the discussion moves forward | Stale Automation | +| revisit-in-3-months | Blocked issues/PRs that need to be revisited | Often releated to `need-customer-feedback`, prioritization, etc. | +| good-first-issue | Something that is suitable for those who want to start contributing | | +| help-wanted | Tasks you want help from anyone to move forward | Bandwidth, complex topics, etc. | +| need-customer-feedback | Tasks that need more feedback before proceeding | 80/20% rule, uncertain, etc. | +| need-more-information | Missing information before making any calls | Signal that investigation or answers are needed | +| need-response | Requires a response from a customer and might be automatically closed if none is received | Marked as stale after 2 weeks, and closed after 3 | +| need-issue | PR is missing a related issue for tracking change | | + +## Maintainer Responsibilities + +Maintainers are active and visible members of the community, and have [maintain-level permissions on a repository](https://docs.github.com/en/organizations/managing-access-to-your-organizations-repositories/repository-permission-levels-for-an-organization){target="_blank" rel="nofollow"}. Use those privileges to serve the community and evolve code as follows. + +Be aware of recurring ambiguous situations and [document them](#common-scenarios) to help your fellow maintainers. + +### Uphold Code of Conduct + +Model the behavior set forward by the [Code of Conduct](https://github.com/aws-powertools/powertools-lambda-typescript/blob/develop/CODE_OF_CONDUCT.md){target="_blank"} and raise any violations to other maintainers and admins. There could be unusual circumstances where inappropriate behavior does not immediately fall within the [Code of Conduct](https://github.com/aws-powertools/powertools-lambda-typescript/blob/develop/CODE_OF_CONDUCT.md){target="_blank"}. + +These might be nuanced and should be handled with extra care - when in doubt, do not engage and reach out to other maintainers and admins. + +### Prioritize Security + +Security is your number one priority. Maintainer's Github keys must be password protected securely and any reported security vulnerabilities are addressed before features or bugs. + +Note that this repository is monitored and supported 24/7 by Amazon Security, see [Reporting a Vulnerability](https://github.com/aws-powertools/powertools-lambda-typescript/blob/develop/SECURITY.md){target="_blank"} for details. + +### Review Pull Requests + +Review pull requests regularly, comment, suggest, reject, merge and close. Accept only high quality pull-requests. Provide code reviews and guidance on incoming pull requests. + +PRs are [labeled](#labels) based on file changes and semantic title. Pay attention to whether labels reflect the current state of the PR and correct accordingly. + +Use and enforce [semantic versioning](https://semver.org/) pull request titles, as these will be used for [CHANGELOG](./changelog.md) and [Release notes](https://github.com/aws-powertools/powertools-lambda-typescript/releases) - make sure they communicate their intent at the human level. + +For issues linked to a PR, make sure `status/pending-release` label is applied to them when merging. [Upon release](#releasing-a-new-version), these issues will be notified which release version contains their change. + +See [Common scenarios](#common-scenarios) section for additional guidance. + +### Triage New Issues + +Manage [labels](#labels), review issues regularly, and create new labels as needed by the project. Remove `triage` label when you're able to confirm the validity of a request, a bug can be reproduced, etc. Give priority to the original author for implementation, unless it is a sensitive task that is best handled by maintainers. + +Make sure issues are assigned to our [board of activities](https://github.com/orgs/awslabs/projects/7/) and have the right [status](https://docs.powertools.aws.dev/lambda/typescript/latest/roadmap/#roadmap-status-definition). + +Use our [labels](#labels) to signal good first issues to new community members, and to set expectation that this might need additional feedback from the author, other customers, experienced community members and/or maintainers. + +Be aware of [casual contributors](https://opensource.com/article/17/10/managing-casual-contributors) and recurring contributors. Provide the experience and attention you wish you had if you were starting in open source. + +See [Common scenarios](#common-scenarios) section for additional guidance. + +### Triage Bug Reports + +Be familiar with [our definition of bug](#is-that-a-bug). If it's not a bug, you can close it or adjust its title and labels - always communicate the reason accordingly. + +For bugs caused by upstream dependencies, replace `type/bug` with `type/bug-upstream` label. Ask the author whether they'd like to raise the issue upstream or if they prefer us to do so. + +Assess the impact and make the call on whether we need an emergency release. Contact other [maintainers](#current-maintainers) when in doubt. + +See [Common scenarios](#common-scenarios) section for additional guidance. + +### Triage RFCs + +RFC is a collaborative process to help us get to the most optimal solution given the context. Their purpose is to ensure everyone understands what this context is, their trade-offs, and alternative solutions that were part of the research before implementation begins. + +Make sure you ask these questions in mind when reviewing: + +- Does it use our [RFC template](https://github.com/aws-powertools/powertools-lambda-typescript/issues/new?assignees=&labels=RFC%2Ctriage&template=rfc.yml&title=RFC%3A+TITLE)? +- Does the match our [Tenets](https://docs.powertools.aws.dev/lambda/typescript/latest/#tenets)? +- Does the proposal address the use case? If so, is the recommended usage explicit? +- Does it focus on the mechanics to solve the use case over fine-grained implementation details? +- Can anyone familiar with the code base implement it? +- If approved, are they interested in contributing? Do they need any guidance? +- Does this significantly increase the overall project maintenance? Do we have the skills to maintain it? +- If we can't take this use case, are there alternative projects we could recommend? Or does it call for a new project altogether? + +When necessary, be upfront that the time to review, approve, and implement a RFC can vary - see [Contribution is stuck](#contribution-is-stuck). Some RFCs may be further updated after implementation, as certain areas become clearer. + +Some examples using our initial and new RFC templates: [#447](https://github.com/aws-powertools/powertools-lambda-typescript/issues/447) + +### Releasing a new version + +Firstly, make sure all the PRs that you want to include in the release are merged into the `main` banch. + +Next, run the integration tests one last time to make sure everything is working as expected. See [Run end to end tests](#run-end-to-end-tests) for more details. + +**Looks good, what's next?** + +Kickoff the `Make Release` workflow with the intended version - this might take around 20m-25m to complete. + +Once complete, you can start drafting the release notes to let customers know **what changed and what's in it for them (a.k.a why they should care)**. We have guidelines in the release notes section so you know what good looks like. + +> **NOTE**: Documentation might take a few minutes to reflect the latest version due to caching and CDN invalidations. + +#### Release process visualized + +Every release makes dozens of checks, linting, canaries and deployments - all of these are automated. + +This is a close visual representation of the main steps (GitHub Actions UI should be the source of truth), along with the approximate time it takes for each key step to complete. + + + +```mermaid +gantt + +title Release process +dateFormat HH:mm +axisFormat %H:%M + +Release start : milestone, m1, 10:00,2m + +section QA + Quality checks : active, 2.4m + +section Build + Bundle release artifact (CJS) : active, 39s + +section Git release + Bump package version : active, 8s + Package release : active, 8s + Git Tag : active, 8s + Push Tag : active, 8s + +section Release + Attest build : active, 8s + Sign attestation : active, attestation, 10:06, 8s + Publish npm.js : active, npm, after attestation, 29s + +npmjs.com release : milestone, m2, 10:06,1s + +section Layer release + Build : active, layer_build, 10:08, 6m + Deploy Beta : active, layer_beta, after layer_build, 4.3m + Run Canary Test : active, layer_canary, after layer_beta, 1.4m + Deploy Prod : active, layer_prod, after layer_canary, 4.3m + +Layer release : milestone, m3, 10:24,1s + +section Docs + Create commit (Layer ARN) : active, 10:24, 8s + Release versioned docs : active, 2.4m + +Documentation release : milestone, m4, 10:26,1m + +Release complete : milestone, m5, 10:26, 2m +``` + +#### Drafting release notes + +Visit the [Releases page](https://github.com/aws-powertools/powertools-lambda-typescript/releases) and choose the edit pencil button. + +Make sure the `tag` field reflects the new version you're releasing, the target branch field is set to `main`, and `release title` matches your tag e.g., `v1.14.1`. + +You'll notice we group all changes based on their [labels](#labels) like `type/feature`, `type/bug`, `area/documentation`, etc. + +**I spotted a typo or incorrect grouping - how do I fix it?** + +Edit the respective PR title and update their [labels](#labels). Then run the [Release Drafter workflow](https://github.com/aws-powertools/powertools-lambda-typescript/**actions**/workflows/release-drafter.yml) to update the Draft release. + +!!! note + This won't change the CHANGELOG as the merge commit is immutable. Don't worry about it. We'd only rewrite git history only if this can lead to confusion and we'd pair with another maintainer. + +**All looking good, what's next?** + +The best part comes now. Replace the placeholder `[Human readable summary of changes]` with what you'd like to communicate to customers what this release is all about. Rule of thumb: always put yourself in the customers shoes. + +These are some questions to keep in mind when drafting your first or future release notes: + +- Can customers understand at a high level what changed in this release? +- Is there a link to the documentation where they can read more about each main change? +- Are there any graphics or [code snippets](https://carbon.now.sh/) that can enhance readability? +- Are we calling out any key contributor(s) to this release? + - All contributors are automatically credited, use this as an exceptional case to feature them + +Once you're happy, hit `Publish release` 🎉🎉🎉. + +This will kick off the [Post Release workflow](https://github.com/aws-powertools/powertools-lambda-typescript/actions/workflows/post-release.yml) and within a few minutes you should see all issues labeled as `status/pending-release` notified of the new release and labeled as `status/completed`. + +### Run end to end tests + +!!! note + We are planning to automate this process in the future so that tests are run automatically when a PR is merged, see [#1149](https://github.com/aws-powertools/powertools-lambda-typescript/issues/1149){target="_blank" rel="nofollow"} + +E2E tests should be ran before every merge to `main` or manually via [Run e2e Tests workflow](https://github.com/aws-powertools/powertools-lambda-typescript/actions/workflows/run-e2e-tests.yml) before making a release. + +To run locally, you need [AWS CDK CLI](https://docs.aws.amazon.com/cdk/v2/guide/getting_started.html#getting_started_prerequisites) and an [account bootstrapped](https://docs.aws.amazon.com/cdk/v2/guide/bootstrapping.html) (`cdk bootstrap`). With a default AWS CLI profile configured, or `AWS_PROFILE` environment variable set, run `make e2e tests`. + +For more information on how the tests are structured and how they can be run locally, see [Integration Tests](./contributing/testing.md). + +### Releasing a documentation hotfix + +You can rebuild the latest documentation without a full release via this [GitHub Actions Workflow](https://github.com/aws-powertools/powertools-lambda-typescript/actions/workflows/rebuild-latest-docs.yml). Choose `Run workflow`, keep `main` as the branch, and input the latest Powertools for AWS Lambda (TypeScript) version available. + +This workflow will update both user guide and API documentation. + +### Maintain Overall Health of the Repo + +Keep the `main` branch at production quality at all times. Backport features as needed. Cut release branches and tags to enable future patches. + +### Manage Roadmap + +See [Roadmap section](https://docs.powertools.aws.dev/lambda/typescript/latest/roadmap/) + +Ensure the repo highlights features that should be elevated to the project roadmap. Be clear about the feature’s status, priority, target version, and whether or not it should be elevated to the roadmap. + +### Add Continuous Integration Checks + +Add integration checks that validate pull requests and pushes to ease the burden on Pull Request reviewers. Continuously revisit areas of improvement to reduce operational burden in all parties involved. + +### Negative Impact on the Project + +Actions that negatively impact the project will be handled by the admins, in coordination with other maintainers, in balance with the urgency of the issue. Examples would be [Code of Conduct](https://github.com/aws-powertools/powertools-lambda-typescript/blob/develop/CODE_OF_CONDUCT.md){target="_blank"} violations, deliberate harmful or malicious actions, spam, monopolization, and security risks. + +### Becoming a maintainer + +We need to improve our understanding of how other projects are doing, their mechanisms to promote key contributors, and how they interact daily. + +We suspect this process might look similar to the [OpenSearch project](https://github.com/opensearch-project/.github/blob/main/MAINTAINERS.md#becoming-a-maintainer){target="_blank" rel="nofollow"} and will revisit this in late 2024. + +## Common scenarios + +These are recurring ambiguous situations that new and existing maintainers may encounter. They serve as guidance. It is up to each maintainer to follow, adjust, or handle in a different manner as long as [our conduct is consistent](#uphold-code-of-conduct) + +### Contribution is stuck + +A contribution can get stuck often due to lack of bandwidth and language barrier. For bandwidth issues, check whether the author needs help. Make sure you get their permission before pushing code into their existing PR - do not create a new PR unless strictly necessary. + +For language barrier and others, offer a 1:1 chat to get them unblocked. Often times, English might not be their primary language, and writing in public might put them off, or come across not the way they intended to be. + +In other cases, you may have constrained capacity. Use `help-wanted` label when you want to signal other maintainers and external contributors that you could use a hand to move it forward. + +### Insufficient feedback or information + +When in doubt, use `need-more-information` or `need-customer-feedback` labels to signal more context and feedback are necessary before proceeding. You can also use `revisit-in-3-months` label when you expect it might take a while to gather enough information before you can decide. + +Note that issues marked as `need-response` will be automatically closed after 3 weeks of inactivity. + +### Crediting contributions + +We credit all contributions as part of each [release note](https://github.com/aws-powertools/powertools-lambda-typescript/releases){target="_blank"} as an automated process. If you find contributors are missing from the release note you're producing, please add them manually. + +### Is that a bug? + +A bug produces incorrect or unexpected results at runtime that differ from its intended behavior. Bugs must be reproducible. They directly affect customers experience at runtime despite following its recommended usage. + +Documentation snippets, use of internal components, or unadvertised functionalities are not considered bugs. + +### Mentoring contributions + +Always favor mentoring issue authors to contribute, unless they're not interested or the implementation is sensitive (_e.g., complexity, time to release, etc._). + +Make use of `help-wanted` and `good-first-issue` to signal additional contributions the community can help. + +### Long running issues or PRs + +Try offering a 1:1 call in the attempt to get to a mutual understanding and clarify areas that maintainers could help. + +In the rare cases where both parties don't have the bandwidth or expertise to continue, it's best to use the `status/on-hold` or `revisit-in-3-months` labels. After some time has passed, see if it's possible to break the PR or issue in smaller chunks, and eventually close if there is no progress. \ No newline at end of file diff --git a/docs/roadmap.md b/docs/roadmap.md index 3e7ac97cf7..1774b5323f 100644 --- a/docs/roadmap.md +++ b/docs/roadmap.md @@ -1,40 +1,46 @@ ## Overview -This is our public roadmap that outlines the high level direction we are working towards, namely [Themes](#themes). We update this document when our priorities change, however security and stability is always our top priority. +Our public roadmap outlines the high level direction we are working towards, namely [Themes](#themes). We update this document when our priorities change: security and stability is our top priority. -[See our latest list of activities »](https://github.com/orgs/aws-powertools/projects/7){target="_blank"} +!!! info "For most up-to-date information, see our [board of activities](https://github.com/orgs/aws-powertools/projects/7/views/3?query=is%3Aopen+sort%3Aupdated-desc){target="_blank"}." ## Themes -!!! info "Operational Excellence is priority number 1." +Operational Excellence is priority number 1. This means bug fixing, stability, security, customer's support, and governance will take precedence above all else. -Themes are key activities maintainers are focusing on, besides bug reports. These are updated periodically and you can get an idea of the overall progress in the [Milestones section](https://github.com/aws-powertools/powertools-lambda-typescript/milestones){target="_blank"}. +**What are themes?** + +They are key activities maintainers are focusing on. These are updated periodically and you can find the latest [under Themes in our GitHub Milestones](https://github.com/aws-powertools/powertools-lambda-typescript/milestones){target="_blank"}. ### Feature Parity We want to close the gap between this version of Powertools for AWS Lambda and the [Python version](https://github.com/aws-powertools/powertools-lambda-python). This means that in the fullness of time, we want to have the same or equivalent features in both versions. -In the first half of 2023 we have released the [Parameters utility](https://github.com/aws-powertools/powertools-lambda-typescript/milestone/10), then in July we have released public betas for [Idempotency](https://github.com/aws-powertools/powertools-lambda-typescript/milestone/7) and [Batch Processing](https://github.com/aws-powertools/powertools-lambda-typescript/milestone/13). We are eager to hear your feedback on these new features, so please try them out and let us know what you think! +In 2023 we have released three the utilities, first as public betas and then as generally available: + +- [x] [Parameters](https://docs.powertools.aws.dev/lambda/typescript/latest/utilities/parameters/) +- [x] [Idempotency](https://docs.powertools.aws.dev/lambda/typescript/latest/utilities/idempotency/) +- [x] [Batch Processing](https://docs.powertools.aws.dev/lambda/typescript/latest/utilities/batch/) -For the remaining of 2023, we are considering implementing one or more of the following utilities (in no particular order): +Over the next quarter, we are considering implementing one or more of the following utilities (in no particular order): -* Validation (Status: [RFC](https://github.com/aws-powertools/powertools-lambda-typescript/issues/508)) -* Parser (Status: [RFC](https://github.com/aws-powertools/powertools-lambda-typescript/issues/1334)) -* Event Handler (Status: [RFC](https://github.com/aws-powertools/powertools-lambda-typescript/issues/413)) +- [ ] Parser (Status: [RFC Finalized](https://github.com/aws-powertools/powertools-lambda-typescript/issues/1334) - Implementation: [In Progress](https://github.com/aws-powertools/powertools-lambda-typescript/milestone/15)) +- [ ] Validation (Status: [RFC In Progress](https://github.com/aws-powertools/powertools-lambda-typescript/issues/508)) +- [ ] Event Handler (Status: [RFC In Progress](https://github.com/aws-powertools/powertools-lambda-typescript/issues/413)) If any of these utilities are important to you, please let us know by upvoting the issue, leaving a comment under the RFCs, or by joining the discussion in our [Discord community](https://discord.gg/B8zZKbbyET){target="_blank"}. ### Version 2 release -Over the past year, we have gathered a number of feature requests and improvements that we want to implement but that are not backwards compatible with the current API surface. We are planning to release a new major version of the library by the end of 2023, which will include some of these changes. +Over the past year, we have gathered a number of feature requests and improvements that we want to implement but that are not backwards compatible with the current API surface. We are going to release our next major version (v2) by the end of 2023, which will include some of these changes: -The following are some of the changes we are considering: +- [x] **ES Modules support ([#521](https://github.com/aws-powertools/powertools-lambda-typescript/issues/521))** - Thanks to the work of the community we have been able to validate the feasibility of dual support for CommonJS and ES Modules. We are currently working on a plan to implement this. +- [x] **TypeScript 5.x support ([#1375](https://github.com/aws-powertools/powertools-lambda-typescript/issues/1375))** - This new version of TypeScript brings breaking changes to the experimental decorators API, which we use in our core utilities. We need to investigate the impact of this change and how to best support it. +- [x] **Support for 3rd party observability providers ([#1500](https://github.com/aws-powertools/powertools-lambda-typescript/issues/1500))** - Many of our customers would like to use Powertools for AWS to send logs, traces, and metrics to providers other than Amazon CloudWatch. At the moment we are investigating the feasibility of this for the Logger utility, while the Python version of Powertools for AWS Lambda is considering this also for Tracer and Metrics. -* **ES Modules support ([#521](https://github.com/aws-powertools/powertools-lambda-typescript/issues/521))** - Thanks to the work of the community we have been able to validate the feasibility of dual support for CommonJS and ES Modules. We are currently working on a plan to implement this. -* **TypeScript 5.x support ([#1375](https://github.com/aws-powertools/powertools-lambda-typescript/issues/1375))** - This new version of TypeScript brings breaking changes to the experimental decorators API, which we use in our core utilities. We need to investigate the impact of this change and how to best support it. -* **Support for 3rd party observability providers ([#1500](https://github.com/aws-powertools/powertools-lambda-typescript/issues/1500))** - Many of our customers would like to use Powertools for AWS to send logs, traces, and metrics to providers other than Amazon CloudWatch. At the moment we are investigating the feasibility of this for the Logger utility, while the Python version of Powertools for AWS Lambda is considering this also for Tracer and Metrics. +You can find the full list of changes in the [v2 RFC](https://github.com/aws-powertools/powertools-lambda-typescript/issues/1714) and follow the progress in the [v2 milestone](https://github.com/aws-powertools/powertools-lambda-typescript/milestone/12). -We have not yet decided on the final list of features that will be included in this release, if you have any suggestions please let us know by commenting on [this discussion](https://github.com/aws-powertools/powertools-lambda-typescript/discussions/1269) or upvoting existing suggestions. +Just like for the feature parity, if you have any feedback or would like to contribute to the discussion, please leave a comment in the RFC or join the discussion in our [Discord community](https://discord.gg/B8zZKbbyET){target="_blank"}. ### Improve operational excellence @@ -52,15 +58,13 @@ graph LR Visual representation -Within our [public board](https://github.com/orgs/aws-powertools/projects/7){target="_blank"}, you'll see the following values in the `Status` column: +Within our [public board](https://github.com/orgs/aws-powertools/projects/7/views/1?query=is%3Aopen+sort%3Aupdated-desc){target="_blank"}, you'll see the following values in the `Status` column: -* **Ideas**. Incoming and existing feature requests that are not being actively considered yet. These will be reviewed when bandwidth permits and based on demand. -* **Backlog**. Accepted feature requests or enhancements that we want to work on. -* **Working on it**. Features or enhancements we're currently either researching or implementing it. -* **Coming soon**. Any feature, enhancement, or bug fixes that have been merged and are coming in the next release. -* **Shipped**. Features or enhancements that are now available in the most recent release. -* **On hold**. Features or items that are currently blocked until further notice. -* **Pending review**. Features which implementation is mostly completed, but need review and some additional iterations. +- **Ideas**. Incoming and existing feature requests that are not being actively considered yet. These will be reviewed when bandwidth permits. +- **Backlog**. Accepted feature requests or enhancements that we want to work on. +- **Working on it**. Features or enhancements we're currently either researching or implementing it. +- **Coming soon**. Any feature, enhancement, or bug fixes that have been merged and are coming in the next release. +- **Shipped**. Features or enhancements that are now available in the most recent release. > Tasks or issues with empty `Status` will be categorized in upcoming review cycles. @@ -82,18 +86,18 @@ graph LR Our end-to-end mechanism follows four major steps: -* **Feature Request**. Ideas start with a [feature request](https://github.com/aws-powertools/powertools-lambda-typescript/issues/new?assignees=&labels=type/feature-request%2Ctriage&template=feature_request.yml&title=Feature+request%3A+TITLE){target="_blank"} to outline their use case at a high level. For complex use cases, maintainers might ask for/write a RFC. - * Maintainers review requests based on [project tenets](index.md#tenets){target="_blank"}, customers reaction (👍), and use cases. -* **Request-for-comments (RFC)**. Design proposals use our [RFC issue template](https://github.com/aws-powertools/powertools-lambda-typescript/issues/new?assignees=&labels=type/RFC%2Ctriage&template=rfc.yml&title=RFC%3A+TITLE){target="_blank"} to describe its implementation, challenges, developer experience, dependencies, and alternative solutions. - * This helps refine the initial idea with community feedback before a decision is made. -* **Decision**. After carefully reviewing and discussing them, maintainers make a final decision on whether to start implementation, defer or reject it, and update everyone with the next steps. -* **Implementation**. For approved features, maintainers give priority to the original authors for implementation unless it is a sensitive task that is best handled by maintainers. +- **Feature Request**. Ideas start with a [feature request](https://github.com/aws-powertools/powertools-lambda-typescript/issues/new?assignees=&labels=type%2Ffeature-request%2Ctriage&projects=aws-powertools%2F7&template=feature_request.yml&title=Feature+request%3A+TITLE){target="_blank"} to outline their use case at a high level. For complex use cases, maintainers might ask for/write a RFC. + - Maintainers review requests based on [project tenets](index.md#tenets){target="_blank"}, customers reaction (👍), and use cases. +- **Request-for-comments (RFC)**. Design proposals use our [RFC issue template](https://github.com/aws-powertools/powertools-lambda-typescript/issues/new?assignees=&labels=type%2FRFC%2Ctriage&projects=aws-powertools%2F7&template=rfc.yml&title=RFC%3A+TITLE){target="_blank"} to describe its implementation, challenges, developer experience, dependencies, and alternative solutions. + - This helps refine the initial idea with community feedback before a decision is made. +- **Decision**. After carefully reviewing and discussing them, maintainers make a final decision on whether to start implementation, defer or reject it, and update everyone with the next steps. +- **Implementation**. For approved features, maintainers give priority to the original authors for implementation unless it is a sensitive task that is best handled by maintainers. -??? info "See [Maintainers](https://github.com/aws-powertools/powertools-lambda-typescript/blob/develop/MAINTAINERS.md) document to understand how we triage issues and pull requests, labels and governance." +??? info "See [Maintainers](./maintainers.md){target="_blank"} document to understand how we triage issues and pull requests, labels and governance." ## Disclaimer -The Powertools for AWS Lambda team values feedback and guidance from its community of users, although final decisions on inclusion into the project will be made by AWS. +The Powertools for AWS Lambda (TypeScript) team values feedback and guidance from its community of users, although final decisions on inclusion into the project will be made by AWS. We determine the high-level direction for our open roadmap based on customer feedback and popularity (👍🏽 and comments), security and operational impacts, and business value. Where features don’t meet our goals and longer-term strategy, we will communicate that clearly and openly as quickly as possible with an explanation of why the decision was made. diff --git a/docs/upgrade.md b/docs/upgrade.md new file mode 100644 index 0000000000..88a94294d5 --- /dev/null +++ b/docs/upgrade.md @@ -0,0 +1,7 @@ +--- +title: Upgrade guide +description: Guide to update between major Powertools for AWS Lambda (TypeScript) versions +--- + +!!! warning + This guide is a work in progress. We'll update it as we get closer to the 2.0 release. If you have any questions, or want to follow the progress, please join the discussion on the [GitHub issue](https://github.com/aws-powertools/powertools-lambda-typescript/issues/1714). \ No newline at end of file diff --git a/layers/package.json b/layers/package.json index b118451c9b..95dab12127 100644 --- a/layers/package.json +++ b/layers/package.json @@ -9,6 +9,7 @@ "scripts": { "build": "echo 'Not applicable, run `npx cdk synth` instead to build the stack'", "test": "echo 'Not applicable'", + "jest": "jest --detectOpenHandles", "cdk": "cdk", "package": "echo 'Not applicable'", "lint": "eslint --ext .ts,.js --no-error-on-unmatched-pattern .", diff --git a/mkdocs.yml b/mkdocs.yml index 0fdc7b8484..7c49a95aab 100644 --- a/mkdocs.yml +++ b/mkdocs.yml @@ -5,18 +5,28 @@ repo_url: https://github.com/aws-powertools/powertools-lambda-typescript edit_uri: edit/main/docs nav: - - Homepage: index.md - - Changelog: changelog.md - - Roadmap: roadmap.md - - API reference: api/" target="_blank - - We Made This (Community): we_made_this.md - - Features: + - Homepage: + - index.md + - Changelog: changelog.md + - API reference: api/" target="_blank + - Upgrade guide: upgrade.md + - We Made This (Community): we_made_this.md + - Roadmap: roadmap.md + - Features: - core/tracer.md - core/logger.md - core/metrics.md - utilities/parameters.md - utilities/idempotency.md - utilities/batch.md + - Processes: + - Roadmap: roadmap.md + - Maintainers: maintainers.md + - Contributing: + - Development environment: contributing/setup.md + - Your first contribution: contributing/getting_started.md + - Conventions: contributing/conventions.md + - Testing: contributing/testing.md theme: name: material @@ -42,6 +52,7 @@ theme: - navigation.instant - navigation.indexes - navigation.tracking + - navigation.tabs - content.code.annotate - content.code.copy - announce.dismiss diff --git a/package.json b/package.json index 1292f6eb10..dab6966b98 100644 --- a/package.json +++ b/package.json @@ -19,7 +19,9 @@ "scripts": { "init-environment": "husky install", "test": "npm t -ws", + "test:parallel": "lerna exec --no-bail --no-sort --stream --concurrency 8 -- npm run test", "test:e2e": "npm run test:e2e -ws", + "test:e2e:parallel": "lerna exec --no-bail --no-sort --stream --concurrency 8 -- npm run test:e2e", "commit": "commit", "setup-local": "npm ci && npm run build && npm run init-environment", "build": "npm run build -ws", @@ -75,4 +77,4 @@ "engines": { "node": ">=16" } -} +} \ No newline at end of file diff --git a/packages/batch/package.json b/packages/batch/package.json index 1ff802cdf4..e2c8701c2b 100644 --- a/packages/batch/package.json +++ b/packages/batch/package.json @@ -12,6 +12,7 @@ "scripts": { "test": "npm run test:unit", "test:unit": "jest --group=unit --detectOpenHandles --coverage --verbose", + "jest": "jest --detectOpenHandles --verbose", "test:e2e:nodejs16x": "echo 'Not Implemented'", "test:e2e:nodejs18x": "echo 'Not Implemented'", "test:e2e": "echo 'Not Implemented'", diff --git a/packages/commons/package.json b/packages/commons/package.json index a3e0e47296..9398f36a6a 100644 --- a/packages/commons/package.json +++ b/packages/commons/package.json @@ -12,6 +12,7 @@ "scripts": { "test": "npm run test:unit", "test:unit": "jest --group=unit --detectOpenHandles --coverage --verbose", + "jest": "jest --detectOpenHandles --verbose", "test:e2e": "echo 'Not Applicable'", "watch": "jest --watch", "generateVersionFile": "echo \"// this file is auto generated, do not modify\nexport const PT_VERSION = '$(jq -r '.version' package.json)';\" > src/version.ts", diff --git a/packages/idempotency/package.json b/packages/idempotency/package.json index 2f107526e7..aca801e6db 100644 --- a/packages/idempotency/package.json +++ b/packages/idempotency/package.json @@ -12,6 +12,7 @@ "scripts": { "test": "npm run test:unit", "test:unit": "jest --group=unit --detectOpenHandles --coverage --verbose", + "jest": "jest --detectOpenHandles --verbose", "test:e2e:nodejs16x": "RUNTIME=nodejs16x jest --group=e2e", "test:e2e:nodejs18x": "RUNTIME=nodejs18x jest --group=e2e", "test:e2e": "jest --group=e2e", diff --git a/packages/logger/package.json b/packages/logger/package.json index 62c72dae32..90afea2ead 100644 --- a/packages/logger/package.json +++ b/packages/logger/package.json @@ -12,6 +12,7 @@ "scripts": { "test": "npm run test:unit", "test:unit": "jest --group=unit --detectOpenHandles --coverage --verbose", + "jest": "jest --detectOpenHandles --verbose", "test:e2e:nodejs16x": "RUNTIME=nodejs16x jest --group=e2e", "test:e2e:nodejs18x": "RUNTIME=nodejs18x jest --group=e2e", "test:e2e": "jest --group=e2e", diff --git a/packages/metrics/package.json b/packages/metrics/package.json index 25fe12facc..5c1a384064 100644 --- a/packages/metrics/package.json +++ b/packages/metrics/package.json @@ -12,6 +12,7 @@ "scripts": { "test": "npm run test:unit", "test:unit": "jest --group=unit --detectOpenHandles --coverage --verbose", + "jest": "jest --detectOpenHandles --verbose", "test:e2e:nodejs16x": "RUNTIME=nodejs16x jest --group=e2e", "test:e2e:nodejs18x": "RUNTIME=nodejs18x jest --group=e2e", "test:e2e": "jest --group=e2e", diff --git a/packages/parameters/package.json b/packages/parameters/package.json index 9089020fca..5a6fa56f66 100644 --- a/packages/parameters/package.json +++ b/packages/parameters/package.json @@ -12,6 +12,7 @@ "scripts": { "test": "npm run test:unit", "test:unit": "jest --group=unit --detectOpenHandles --coverage --verbose", + "jest": "jest --detectOpenHandles --verbose", "test:e2e:nodejs16x": "RUNTIME=nodejs16x jest --group=e2e", "test:e2e:nodejs18x": "RUNTIME=nodejs18x jest --group=e2e", "test:e2e": "jest --group=e2e", diff --git a/packages/testing/package.json b/packages/testing/package.json index 7c28586b3a..c22980cb23 100644 --- a/packages/testing/package.json +++ b/packages/testing/package.json @@ -10,6 +10,7 @@ "scripts": { "test": "npm run test:unit", "test:unit": "jest --group=unit --detectOpenHandles --verbose", + "jest": "jest --detectOpenHandles --verbose", "test:e2e": "echo 'Not implemented'", "watch": "jest --watch", "build:cjs": "tsc --build --force && echo '{ \"type\": \"commonjs\" }' > lib/cjs/package.json", diff --git a/packages/tracer/package.json b/packages/tracer/package.json index db37da1d73..a3534a43bc 100644 --- a/packages/tracer/package.json +++ b/packages/tracer/package.json @@ -12,6 +12,7 @@ "scripts": { "test": "npm run test:unit", "test:unit": "jest --group=unit --detectOpenHandles --coverage --verbose", + "jest": "jest --detectOpenHandles --verbose", "test:e2e:nodejs16x": "RUNTIME=nodejs16x jest --group=e2e", "test:e2e:nodejs18x": "RUNTIME=nodejs18x jest --group=e2e", "test:e2e": "jest --group=e2e", From 9e7458d1eb2fcb00bc1ee0d4a042a65376caf8a5 Mon Sep 17 00:00:00 2001 From: Andrea Amorosi Date: Wed, 18 Oct 2023 14:43:50 +0200 Subject: [PATCH 25/60] chore(tracer): update warning to better format segment name (#1750) * chore(tracer): update warning in Tracer to better format segment name * chore: linting --- packages/tracer/src/Tracer.ts | 6 ++++-- packages/tracer/src/middleware/middy.ts | 3 ++- packages/tracer/tests/unit/Tracer.test.ts | 6 ++++-- packages/tracer/tests/unit/middy.test.ts | 3 ++- 4 files changed, 12 insertions(+), 6 deletions(-) diff --git a/packages/tracer/src/Tracer.ts b/packages/tracer/src/Tracer.ts index 411f5c5fd3..3acb78a895 100644 --- a/packages/tracer/src/Tracer.ts +++ b/packages/tracer/src/Tracer.ts @@ -410,7 +410,8 @@ class Tracer extends Utility implements TracerInterface { subsegment?.close(); } catch (error) { console.warn( - `Failed to close or serialize segment, ${subsegment?.name}. We are catching the error but data might be lost.`, + `Failed to close or serialize segment %s. We are catching the error but data might be lost.`, + subsegment?.name, error ); } @@ -501,7 +502,8 @@ class Tracer extends Utility implements TracerInterface { subsegment?.close(); } catch (error) { console.warn( - `Failed to close or serialize segment, ${subsegment?.name}. We are catching the error but data might be lost.`, + `Failed to close or serialize segment %s. We are catching the error but data might be lost.`, + subsegment?.name, error ); } diff --git a/packages/tracer/src/middleware/middy.ts b/packages/tracer/src/middleware/middy.ts index 5d1fd11433..fc208c1fef 100644 --- a/packages/tracer/src/middleware/middy.ts +++ b/packages/tracer/src/middleware/middy.ts @@ -74,7 +74,8 @@ const captureLambdaHandler = ( handlerSegment.close(); } catch (error) { console.warn( - `Failed to close or serialize segment, ${handlerSegment.name}. We are catching the error but data might be lost.`, + `Failed to close or serialize segment %s. We are catching the error but data might be lost.`, + handlerSegment.name, error ); } diff --git a/packages/tracer/tests/unit/Tracer.test.ts b/packages/tracer/tests/unit/Tracer.test.ts index 784403daa5..4b6031e092 100644 --- a/packages/tracer/tests/unit/Tracer.test.ts +++ b/packages/tracer/tests/unit/Tracer.test.ts @@ -1253,7 +1253,8 @@ describe('Class: Tracer', () => { expect(closeSpy).toHaveBeenCalledTimes(1); expect(logWarningSpy).toHaveBeenNthCalledWith( 1, - `Failed to close or serialize segment, ${handlerSubsegment.name}. We are catching the error but data might be lost.`, + `Failed to close or serialize segment %s. We are catching the error but data might be lost.`, + handlerSubsegment.name, new Error('dummy error') ); }); @@ -1714,7 +1715,8 @@ describe('Class: Tracer', () => { expect(closeSpy).toHaveBeenCalledTimes(1); expect(logWarningSpy).toHaveBeenNthCalledWith( 1, - `Failed to close or serialize segment, ${handlerSubsegment.name}. We are catching the error but data might be lost.`, + `Failed to close or serialize segment %s. We are catching the error but data might be lost.`, + handlerSubsegment.name, new Error('dummy error') ); }); diff --git a/packages/tracer/tests/unit/middy.test.ts b/packages/tracer/tests/unit/middy.test.ts index 572843c284..5819e54faa 100644 --- a/packages/tracer/tests/unit/middy.test.ts +++ b/packages/tracer/tests/unit/middy.test.ts @@ -391,7 +391,8 @@ describe('Middy middleware', () => { expect(closeSpy).toHaveBeenCalledTimes(1); expect(logWarningSpy).toHaveBeenNthCalledWith( 1, - `Failed to close or serialize segment, ${handlerSubsegment.name}. We are catching the error but data might be lost.`, + `Failed to close or serialize segment %s. We are catching the error but data might be lost.`, + handlerSubsegment.name, new Error('dummy error') ); // Check that the segments are restored From 09ca462ed16843de590b1cf3eb68c3c492eff826 Mon Sep 17 00:00:00 2001 From: Andrea Amorosi Date: Wed, 18 Oct 2023 18:41:29 +0200 Subject: [PATCH 26/60] chore(internal): remove outdated notice files (#1752) --- LICENSE-THIRD-PARTY | 83 --- packages/commons/LICENSE-THIRD-PARTY | 23 - packages/idempotency/LICENSE-THIRD-PARTY | 83 --- packages/logger/LICENSE-THIRD-PARTY | 189 ----- packages/metrics/LICENSE-THIRD-PARTY | 30 - packages/tracer/LICENSE-THIRD-PARTY | 868 ----------------------- 6 files changed, 1276 deletions(-) delete mode 100644 LICENSE-THIRD-PARTY delete mode 100644 packages/commons/LICENSE-THIRD-PARTY delete mode 100644 packages/idempotency/LICENSE-THIRD-PARTY delete mode 100644 packages/logger/LICENSE-THIRD-PARTY delete mode 100644 packages/metrics/LICENSE-THIRD-PARTY delete mode 100644 packages/tracer/LICENSE-THIRD-PARTY diff --git a/LICENSE-THIRD-PARTY b/LICENSE-THIRD-PARTY deleted file mode 100644 index 98a63dfc1f..0000000000 --- a/LICENSE-THIRD-PARTY +++ /dev/null @@ -1,83 +0,0 @@ -hosted-git-info -4.0.2 -Copyright (c) 2015, Rebecca Turner - -Permission to use, copy, modify, and/or distribute this software for any -purpose with or without fee is hereby granted, provided that the above -copyright notice and this permission notice appear in all copies. - -THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH -REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND -FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, -INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM -LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR -OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR -PERFORMANCE OF THIS SOFTWARE. - - -****************************** - -lru-cache -6.0.0 -The ISC License - -Copyright (c) Isaac Z. Schlueter and Contributors - -Permission to use, copy, modify, and/or distribute this software for any -purpose with or without fee is hereby granted, provided that the above -copyright notice and this permission notice appear in all copies. - -THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES -WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF -MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR -ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES -WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN -ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR -IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. - - -****************************** - -yallist -4.0.0 -The ISC License - -Copyright (c) Isaac Z. Schlueter and Contributors - -Permission to use, copy, modify, and/or distribute this software for any -purpose with or without fee is hereby granted, provided that the above -copyright notice and this permission notice appear in all copies. - -THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES -WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF -MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR -ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES -WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN -ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR -IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. - -****************************** - -@middy/core -3.6.2 -MIT License - -Copyright (c) 2017-2023 [Luciano Mammino](https://github.com/lmammino), [will Farrell](https://github.com/willfarrell) and the [Middy team](https://github.com/middyjs/middy/graphs/contributors) - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. \ No newline at end of file diff --git a/packages/commons/LICENSE-THIRD-PARTY b/packages/commons/LICENSE-THIRD-PARTY deleted file mode 100644 index c5047a8067..0000000000 --- a/packages/commons/LICENSE-THIRD-PARTY +++ /dev/null @@ -1,23 +0,0 @@ -@types/aws-lambda -8.10.88 - MIT License - - Copyright (c) Microsoft Corporation. - - Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated documentation files (the "Software"), to deal - in the Software without restriction, including without limitation the rights - to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - copies of the Software, and to permit persons to whom the Software is - furnished to do so, subject to the following conditions: - - The above copyright notice and this permission notice shall be included in all - copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - SOFTWARE diff --git a/packages/idempotency/LICENSE-THIRD-PARTY b/packages/idempotency/LICENSE-THIRD-PARTY deleted file mode 100644 index 0adb67e7ef..0000000000 --- a/packages/idempotency/LICENSE-THIRD-PARTY +++ /dev/null @@ -1,83 +0,0 @@ -@aws-lambda-powertools/commons -0.0.2 -license: MIT* -authors: Amazon Web Services - -****************************** - -@types/aws-lambda -8.10.87 - MIT License - - Copyright (c) Microsoft Corporation. - - Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated documentation files (the "Software"), to deal - in the Software without restriction, including without limitation the rights - to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - copies of the Software, and to permit persons to whom the Software is - furnished to do so, subject to the following conditions: - - The above copyright notice and this permission notice shall be included in all - copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - SOFTWARE - - -****************************** - -lodash -4.17.21 -Copyright OpenJS Foundation and other contributors - -Based on Underscore.js, copyright Jeremy Ashkenas, -DocumentCloud and Investigative Reporters & Editors - -This software consists of voluntary contributions made by many -individuals. For exact contribution history, see the revision history -available at https://github.com/lodash/lodash - -The following license applies to all parts of this software except as -documented below: - -==== - -Permission is hereby granted, free of charge, to any person obtaining -a copy of this software and associated documentation files (the -"Software"), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Software, and to -permit persons to whom the Software is furnished to do so, subject to -the following conditions: - -The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE -LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION -WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - -==== - -Copyright and related rights for sample code are waived via CC0. Sample -code is defined as all source code displayed within the prose of the -documentation. - -CC0: http://creativecommons.org/publicdomain/zero/1.0/ - -==== - -Files located in the node_modules and vendor directories are externally -maintained libraries used by this software which have their own -licenses; we recommend you read them, as their terms may differ from the -terms above. diff --git a/packages/logger/LICENSE-THIRD-PARTY b/packages/logger/LICENSE-THIRD-PARTY deleted file mode 100644 index 1a31f4afa3..0000000000 --- a/packages/logger/LICENSE-THIRD-PARTY +++ /dev/null @@ -1,189 +0,0 @@ -@aws-lambda-powertools/commons -0.0.2 -license: MIT* -authors: Amazon Web Services - -****************************** - -@types/aws-lambda -8.10.87 - MIT License - - Copyright (c) Microsoft Corporation. - - Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated documentation files (the "Software"), to deal - in the Software without restriction, including without limitation the rights - to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - copies of the Software, and to permit persons to whom the Software is - furnished to do so, subject to the following conditions: - - The above copyright notice and this permission notice shall be included in all - copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - SOFTWARE - - -****************************** - -lodash -4.17.21 -Copyright OpenJS Foundation and other contributors - -Based on Underscore.js, copyright Jeremy Ashkenas, -DocumentCloud and Investigative Reporters & Editors - -This software consists of voluntary contributions made by many -individuals. For exact contribution history, see the revision history -available at https://github.com/lodash/lodash - -The following license applies to all parts of this software except as -documented below: - -==== - -Permission is hereby granted, free of charge, to any person obtaining -a copy of this software and associated documentation files (the -"Software"), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Software, and to -permit persons to whom the Software is furnished to do so, subject to -the following conditions: - -The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE -LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION -WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - -==== - -Copyright and related rights for sample code are waived via CC0. Sample -code is defined as all source code displayed within the prose of the -documentation. - -CC0: http://creativecommons.org/publicdomain/zero/1.0/ - -==== - -Files located in the node_modules and vendor directories are externally -maintained libraries used by this software which have their own -licenses; we recommend you read them, as their terms may differ from the -terms above. - - -****************************** - -lodash.clonedeep -4.5.0 -Copyright jQuery Foundation and other contributors - -Based on Underscore.js, copyright Jeremy Ashkenas, -DocumentCloud and Investigative Reporters & Editors - -This software consists of voluntary contributions made by many -individuals. For exact contribution history, see the revision history -available at https://github.com/lodash/lodash - -The following license applies to all parts of this software except as -documented below: - -==== - -Permission is hereby granted, free of charge, to any person obtaining -a copy of this software and associated documentation files (the -"Software"), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Software, and to -permit persons to whom the Software is furnished to do so, subject to -the following conditions: - -The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE -LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION -WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - -==== - -Copyright and related rights for sample code are waived via CC0. Sample -code is defined as all source code displayed within the prose of the -documentation. - -CC0: http://creativecommons.org/publicdomain/zero/1.0/ - -==== - -Files located in the node_modules and vendor directories are externally -maintained libraries used by this software which have their own -licenses; we recommend you read them, as their terms may differ from the -terms above. - - -****************************** - -lodash.merge -4.6.2 -Copyright OpenJS Foundation and other contributors - -Based on Underscore.js, copyright Jeremy Ashkenas, -DocumentCloud and Investigative Reporters & Editors - -This software consists of voluntary contributions made by many -individuals. For exact contribution history, see the revision history -available at https://github.com/lodash/lodash - -The following license applies to all parts of this software except as -documented below: - -==== - -Permission is hereby granted, free of charge, to any person obtaining -a copy of this software and associated documentation files (the -"Software"), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Software, and to -permit persons to whom the Software is furnished to do so, subject to -the following conditions: - -The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE -LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION -WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - -==== - -Copyright and related rights for sample code are waived via CC0. Sample -code is defined as all source code displayed within the prose of the -documentation. - -CC0: http://creativecommons.org/publicdomain/zero/1.0/ - -==== - -Files located in the node_modules and vendor directories are externally -maintained libraries used by this software which have their own -licenses; we recommend you read them, as their terms may differ from the -terms above. diff --git a/packages/metrics/LICENSE-THIRD-PARTY b/packages/metrics/LICENSE-THIRD-PARTY deleted file mode 100644 index 971ce64ff8..0000000000 --- a/packages/metrics/LICENSE-THIRD-PARTY +++ /dev/null @@ -1,30 +0,0 @@ -@aws-lambda-powertools/commons -0.0.2 -license: MIT* -authors: Amazon Web Services - -****************************** - -@types/aws-lambda -8.10.88 - MIT License - - Copyright (c) Microsoft Corporation. - - Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated documentation files (the "Software"), to deal - in the Software without restriction, including without limitation the rights - to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - copies of the Software, and to permit persons to whom the Software is - furnished to do so, subject to the following conditions: - - The above copyright notice and this permission notice shall be included in all - copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - SOFTWARE diff --git a/packages/tracer/LICENSE-THIRD-PARTY b/packages/tracer/LICENSE-THIRD-PARTY deleted file mode 100644 index 9de6740834..0000000000 --- a/packages/tracer/LICENSE-THIRD-PARTY +++ /dev/null @@ -1,868 +0,0 @@ -@aws-lambda-powertools/commons -0.0.2 -license: MIT* -authors: Amazon Web Services - -****************************** - -@aws-sdk/service-error-classification -3.19.0 - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - - END OF TERMS AND CONDITIONS - - APPENDIX: How to apply the Apache License to your work. - - To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "{}" - replaced with your own identifying information. (Don't include - the brackets!) The text should be enclosed in the appropriate - comment syntax for the file format. We also recommend that a - file or class name and description of purpose be included on the - same "printed page" as the copyright notice for easier - identification within third-party archives. - - Copyright 2018-2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. - - -****************************** - -@aws-sdk/types -3.18.0 -Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - - END OF TERMS AND CONDITIONS - - APPENDIX: How to apply the Apache License to your work. - - To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "{}" - replaced with your own identifying information. (Don't include - the brackets!) The text should be enclosed in the appropriate - comment syntax for the file format. We also recommend that a - file or class name and description of purpose be included on the - same "printed page" as the copyright notice for easier - identification within third-party archives. - - Copyright 2018-2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. - -****************************** - -@types/aws-lambda -8.10.88 - MIT License - - Copyright (c) Microsoft Corporation. - - Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated documentation files (the "Software"), to deal - in the Software without restriction, including without limitation the rights - to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - copies of the Software, and to permit persons to whom the Software is - furnished to do so, subject to the following conditions: - - The above copyright notice and this permission notice shall be included in all - copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - SOFTWARE - - -****************************** - -@types/cls-hooked -4.3.3 - MIT License - - Copyright (c) Microsoft Corporation. - - Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated documentation files (the "Software"), to deal - in the Software without restriction, including without limitation the rights - to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - copies of the Software, and to permit persons to whom the Software is - furnished to do so, subject to the following conditions: - - The above copyright notice and this permission notice shall be included in all - copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - SOFTWARE - - -****************************** - -@types/node -16.11.11 - MIT License - - Copyright (c) Microsoft Corporation. - - Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated documentation files (the "Software"), to deal - in the Software without restriction, including without limitation the rights - to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - copies of the Software, and to permit persons to whom the Software is - furnished to do so, subject to the following conditions: - - The above copyright notice and this permission notice shall be included in all - copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - SOFTWARE - - -****************************** - -async-hook-jl -1.7.6 -Copyright (c) 2015 Andreas Madsen - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. - - -****************************** - -atomic-batcher -1.0.2 -The MIT License (MIT) - -Copyright (c) 2016 Mathias Buus - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. - - -****************************** - -aws-xray-sdk-core -3.3.4 - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - - END OF TERMS AND CONDITIONS - - APPENDIX: How to apply the Apache License to your work. - - To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "{}" - replaced with your own identifying information. (Don't include - the brackets!) The text should be enclosed in the appropriate - comment syntax for the file format. We also recommend that a - file or class name and description of purpose be included on the - same "printed page" as the copyright notice for easier - identification within third-party archives. - - Copyright {yyyy} {name of copyright owner} - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. - - -****************************** - -cls-hooked -4.2.2 -Copyright (c) 2013-2016, Forrest L Norvell -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - -1. Redistributions of source code must retain the above copyright notice, this - list of conditions and the following disclaimer. -2. Redistributions in binary form must reproduce the above copyright notice, - this list of conditions and the following disclaimer in the documentation - and/or other materials provided with the distribution. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR -ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND -ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - - -****************************** - -emitter-listener -1.1.2 -license: BSD-2-Clause -authors: Forrest L Norvell - -****************************** - -semver -5.7.1 -The ISC License - -Copyright (c) Isaac Z. Schlueter and Contributors - -Permission to use, copy, modify, and/or distribute this software for any -purpose with or without fee is hereby granted, provided that the above -copyright notice and this permission notice appear in all copies. - -THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES -WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF -MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR -ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES -WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN -ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR -IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. - - -****************************** - -shimmer -1.2.1 -BSD 2-Clause License - -Copyright (c) 2013-2019, Forrest L Norvell -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - -* Redistributions of source code must retain the above copyright notice, this - list of conditions and the following disclaimer. - -* Redistributions in binary form must reproduce the above copyright notice, - this list of conditions and the following disclaimer in the documentation - and/or other materials provided with the distribution. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" -AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE -FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL -DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR -SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER -CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, -OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - - -****************************** - -stack-chain -1.3.7 -Copyright (c) 2012 Andreas Madsen - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. \ No newline at end of file From e7eca23de8856a2a2986080186b6d2a2a6bd4b70 Mon Sep 17 00:00:00 2001 From: Andrea Amorosi Date: Wed, 18 Oct 2023 19:32:42 +0200 Subject: [PATCH 27/60] chore(maintenance): set `removeComments` to` false` in `tsconfig.json` (#1754) --- tsconfig.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tsconfig.json b/tsconfig.json index d2cc3e1c71..a49b03e30e 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -9,7 +9,7 @@ "baseUrl": ".", // "traceResolution": true, // Enable this to debug module resolution issues "declaration": true, - "removeComments": true, + "removeComments": false, // TODO: experiment with this & move to tslib in v2 // "importHelpers": true, /* Allow importing helper functions from tslib once per project, instead of including them per-file. */ // "downlevelIteration": true, /* Emit more compliant, but verbose and less performant JavaScript for iteration. */ From 24c0a18918122adc4b5a9e9947a0865655fa2e16 Mon Sep 17 00:00:00 2001 From: Andrea Amorosi Date: Wed, 18 Oct 2023 19:53:06 +0200 Subject: [PATCH 28/60] chore(docs): add invisible unicode char to decorator docs (#1755) --- .../idempotency/src/idempotencyDecorator.ts | 34 ++++++++-------- packages/logger/src/Logger.ts | 13 +++--- packages/metrics/src/Metrics.ts | 20 +++++----- packages/tracer/src/Tracer.ts | 40 +++++++++---------- 4 files changed, 50 insertions(+), 57 deletions(-) diff --git a/packages/idempotency/src/idempotencyDecorator.ts b/packages/idempotency/src/idempotencyDecorator.ts index f66da1ea8d..e912393a85 100644 --- a/packages/idempotency/src/idempotencyDecorator.ts +++ b/packages/idempotency/src/idempotencyDecorator.ts @@ -17,9 +17,9 @@ import { makeIdempotent } from './makeIdempotent.js'; * } from '@aws-lambda-powertools/idempotency'; * import type { LambdaInterface } from '@aws-lambda-powertools/commons'; * - * class MyLambdaFunction implements LambdaInterface{ - * @idempotent({ persistenceStore: new DynamoDBPersistenceLayer() }) - * async handler(event: any, context: any) { + * class MyLambdaFunction implements LambdaInterface { + * ⁣@idempotent({ persistenceStore: new DynamoDBPersistenceLayer() }) + * async handler(event: unknown, _context: unknown) { * return "Hello World"; * } * } @@ -31,23 +31,23 @@ import { makeIdempotent } from './makeIdempotent.js'; * @example * ```ts * import { - * DynamoDBPersistenceLayer, - * idempotentFunction - * } from '@aws-lambda-powertools/idempotency'; - * import type { LambdaInterface } from '@aws-lambda-powertools/commons'; - * - * class MyClass implements LambdaInterface { + * DynamoDBPersistenceLayer, + * idempotentFunction + * } from '@aws-lambda-powertools/idempotency'; + * import type { LambdaInterface } from '@aws-lambda-powertools/commons'; * - * public async handler(_event: any, _context: any) { - * for(const record of _event.records){ - * await this.process(record); - * } - * } + * class MyClass implements LambdaInterface { + * public async handler(event: unknown, _context: unknown) { + * for(const record of event.records){ + * await this.process(record); + * } + * } * - * @idemptent({ persistenceStore: new DynamoDBPersistenceLayer() }) - * public async process(record: Record) { * // do some processing - * } + * } + * } * ``` * @see {@link DynamoDBPersistenceLayer} * @see https://www.typescriptlang.org/docs/handbook/decorators.html diff --git a/packages/logger/src/Logger.ts b/packages/logger/src/Logger.ts index 3bf7b3caf9..db060ed6b2 100644 --- a/packages/logger/src/Logger.ts +++ b/packages/logger/src/Logger.ts @@ -61,7 +61,7 @@ import type { * * const logger = new Logger(); * - * const lambdaHandler = async (_event: any, _context: any) => { + * const lambdaHandler = async (_event: unknown, _context: unknown) => { * logger.info('This is an INFO log with some context'); * }; * @@ -80,12 +80,9 @@ import type { * const logger = new Logger(); * * class Lambda implements LambdaInterface { - * - * // FYI: Decorator might not render properly in VSCode mouse over due to https://github.com/microsoft/TypeScript/issues/47679 and might show as *@logger* instead of `@logger.injectLambdaContext` - * * // Decorate your handler class method - * @logger.injectLambdaContext() - * public async handler(_event: any, _context: any): Promise { + * ⁣@logger.injectLambdaContext() + * public async handler(_event: unknown, _context: unknown): Promise { * logger.info('This is an INFO log with some context'); * } * } @@ -361,8 +358,8 @@ class Logger extends Utility implements ClassThatLogs { * * class Lambda implements LambdaInterface { * // Decorate your handler class method - * @logger.injectLambdaContext() - * public async handler(_event: any, _context: any): Promise { + * ⁣@logger.injectLambdaContext() + * public async handler(_event: unknown, _context: unknown): Promise { * logger.info('This is an INFO log with some context'); * } * } diff --git a/packages/metrics/src/Metrics.ts b/packages/metrics/src/Metrics.ts index a7a735097e..ad4026f5a3 100644 --- a/packages/metrics/src/Metrics.ts +++ b/packages/metrics/src/Metrics.ts @@ -53,7 +53,7 @@ import { * * const metrics = new Metrics({ namespace: 'serverlessAirline', serviceName: 'orders' }); * - * const lambdaHandler = async (_event: any, _context: any) => { + * const lambdaHandler = async (_event: unknown, _context: unknown) => { * ... * }; * @@ -76,11 +76,9 @@ import { * const metrics = new Metrics({ namespace: 'serverlessAirline', serviceName: 'orders' }); * * class Lambda implements LambdaInterface { - * - * // FYI: Decorator might not render properly in VSCode mouse over due to https://github.com/microsoft/TypeScript/issues/47679 and might show as *@metrics* instead of `@metrics.logMetrics` - * - * @metrics.logMetrics({ captureColdStartMetric: true, throwOnEmptyMetrics: true }) - * public handler(_event: any, _context: any): Promise { + * // Decorate your handler with the logMetrics decorator + * ⁣@metrics.logMetrics({ captureColdStartMetric: true, throwOnEmptyMetrics: true }) + * public handler(_event: unknown, _context: unknown): Promise { * // ... * metrics.addMetric('test-metric', MetricUnit.Count, 10); * // ... @@ -102,7 +100,7 @@ import { * * const metrics = new Metrics({ namespace: 'serverlessAirline', serviceName: 'orders' }); * - * export const handler = async (_event: any, _context: any): Promise => { + * export const handler = async (_event: unknown, __context: unknown): Promise => { * metrics.captureColdStartMetric(); * metrics.addMetric('test-metric', MetricUnit.Count, 10); * metrics.publishStoredMetrics(); @@ -242,7 +240,7 @@ class Metrics extends Utility implements MetricsInterface { * * const metrics = new Metrics({ namespace: 'serverlessAirline', serviceName: 'orders' }); * - * export const handler = async (event: any, _context: any): Promise => { + * export const handler = async (_event: unknown, __context: unknown): Promise => { * metrics.captureColdStartMetric(); * }; * ``` @@ -304,7 +302,7 @@ class Metrics extends Utility implements MetricsInterface { * class Lambda implements LambdaInterface { * * @metrics.logMetrics({ captureColdStartMetric: true }) - * public handler(_event: any, _context: any): Promise { + * public handler(_event: unknown, __context: unknown): Promise { * // ... * } * } @@ -372,7 +370,7 @@ class Metrics extends Utility implements MetricsInterface { * * const metrics = new Metrics({ namespace: 'serverlessAirline', serviceName: 'orders' }); // Sets metric namespace, and service as a metric dimension * - * export const handler = async (_event: any, _context: any): Promise => { + * export const handler = async (_event: unknown, __context: unknown): Promise => { * metrics.addMetric('test-metric', MetricUnit.Count, 10); * metrics.publishStoredMetrics(); * }; @@ -522,7 +520,7 @@ class Metrics extends Utility implements MetricsInterface { * * const metrics = new Metrics({ namespace: 'serverlessAirline', serviceName:'orders' }); * - * export const handler = async (_event: any, _context: any): Promise => { + * export const handler = async (_event: unknown, __context: unknown): Promise => { * metrics.throwOnEmptyMetrics(); * metrics.publishStoredMetrics(); // will throw since no metrics added. * }; diff --git a/packages/tracer/src/Tracer.ts b/packages/tracer/src/Tracer.ts index 3acb78a895..7d1c65145d 100644 --- a/packages/tracer/src/Tracer.ts +++ b/packages/tracer/src/Tracer.ts @@ -51,7 +51,7 @@ import { type Segment, Subsegment } from 'aws-xray-sdk-core'; * * const tracer = new Tracer({ serviceName: 'serverlessAirline' }); * - * const lambdaHandler = async (_event: any, _context: any) => { + * const lambdaHandler = async (_event: unknown, _context: unknown) => { * ... * }; * @@ -73,11 +73,9 @@ import { type Segment, Subsegment } from 'aws-xray-sdk-core'; * * const tracer = new Tracer({ serviceName: 'serverlessAirline' }); * - * // FYI: Decorator might not render properly in VSCode mouse over due to https://github.com/microsoft/TypeScript/issues/47679 and might show as *@tracer* instead of `@tracer.captureLambdaHandler` - * * class Lambda implements LambdaInterface { - * @tracer.captureLambdaHandler() - * public handler(event: any, context: any) { + * ⁣@tracer.captureLambdaHandler() + * public handler(_event: unknown, _context: unknown) { * ... * } * } @@ -96,7 +94,7 @@ import { type Segment, Subsegment } from 'aws-xray-sdk-core'; * * const tracer = new Tracer({ serviceName: 'serverlessAirline' }); * - * export const handler = async (_event: any, context: any) => { + * export const handler = async (_event: unknown, _context: unknown) => { * const segment = tracer.getSegment(); // This is the facade segment (the one that is created by AWS Lambda) * // Create subsegment for the function & set it as active * const subsegment = segment.addNewSubsegment(`## ${process.env._HANDLER}`); @@ -246,7 +244,7 @@ class Tracer extends Utility implements TracerInterface { * const tracer = new Tracer({ serviceName: 'serverlessAirline' }); * const AWS = tracer.captureAWS(require('aws-sdk')); * - * export const handler = async (_event: any, _context: any) => { + * export const handler = async (_event: unknown, _context: unknown) => { * ... * } * ``` @@ -275,7 +273,7 @@ class Tracer extends Utility implements TracerInterface { * const tracer = new Tracer({ serviceName: 'serverlessAirline' }); * const s3 = tracer.captureAWSClient(new S3({ apiVersion: '2006-03-01' })); * - * export const handler = async (_event: any, _context: any) => { + * export const handler = async (_event: unknown, _context: unknown) => { * ... * } * ``` @@ -318,7 +316,7 @@ class Tracer extends Utility implements TracerInterface { * const client = new S3Client({}); * tracer.captureAWSv3Client(client); * - * export const handler = async (_event: any, _context: any) => { + * export const handler = async (_event: unknown, _context: unknown) => { * ... * } * ``` @@ -352,9 +350,9 @@ class Tracer extends Utility implements TracerInterface { * const tracer = new Tracer({ serviceName: 'serverlessAirline' }); * * class Lambda implements LambdaInterface { - * @tracer.captureLambdaHandler() - * public handler(event: any, context: any) { - * ... + * ⁣@tracer.captureLambdaHandler() + * public handler(_event: unknown, _context: unknown) { + * // ... * } * } * @@ -445,13 +443,13 @@ class Tracer extends Utility implements TracerInterface { * const tracer = new Tracer({ serviceName: 'serverlessAirline' }); * * class Lambda implements LambdaInterface { - * @tracer.captureMethod() - * public myMethod(param: any) { - * ... + * ⁣@tracer.captureMethod() + * public myMethod(param: string) { + * // ... * } * - * public handler(event: any, context: any) { - * ... + * public handler(_event: unknown, _context: unknown) { + * this.myMethod('foo'); * } * } * @@ -569,7 +567,7 @@ class Tracer extends Utility implements TracerInterface { * * const tracer = new Tracer({ serviceName: 'serverlessAirline' }); * - * export const handler = async (_event: any, _context: any) => { + * export const handler = async (_event: unknown, _context: unknown) => { * const currentSegment = tracer.getSegment(); * ... // Do something with segment * } @@ -629,7 +627,7 @@ class Tracer extends Utility implements TracerInterface { * * const tracer = new Tracer({ serviceName: 'serverlessAirline' }); * - * export const handler = async (_event: any, _context: any) => { + * export const handler = async (_event: unknown, _context: unknown) => { * tracer.putAnnotation('successfulBooking', true); * } * ``` @@ -654,7 +652,7 @@ class Tracer extends Utility implements TracerInterface { * * const tracer = new Tracer({ serviceName: 'serverlessAirline' }); * - * export const handler = async (_event: any, _context: any) => { + * export const handler = async (_event: unknown, _context: unknown) => { * const res = someLogic(); * tracer.putMetadata('paymentResponse', res); * } @@ -688,7 +686,7 @@ class Tracer extends Utility implements TracerInterface { * * const tracer = new Tracer({ serviceName: 'serverlessAirline' }); * - * export const handler = async (_event: any, _context: any) => { + * export const handler = async (_event: unknown, _context: unknown) => { * const subsegment = new Subsegment('### foo.bar'); * tracer.setSegment(subsegment); * } From 0b32e113c3a77778e6199cfd1f5775b2f254b460 Mon Sep 17 00:00:00 2001 From: Andrea Amorosi Date: Wed, 18 Oct 2023 20:00:21 +0200 Subject: [PATCH 29/60] chore: remove extra comma --- packages/tracer/tests/unit/Tracer.test.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/tracer/tests/unit/Tracer.test.ts b/packages/tracer/tests/unit/Tracer.test.ts index 4b6031e092..812f8ce14f 100644 --- a/packages/tracer/tests/unit/Tracer.test.ts +++ b/packages/tracer/tests/unit/Tracer.test.ts @@ -20,7 +20,7 @@ type CaptureAsyncFuncMock = jest.SpyInstance< [ name: string, fcn: (subsegment?: Subsegment) => unknown, - parent?: Segment | Subsegment, + parent?: Segment | Subsegment ] >; const createCaptureAsyncFuncMock = function ( From cf29d0a99eda4fed80f8b3745f972028b40d998f Mon Sep 17 00:00:00 2001 From: Andrea Amorosi Date: Thu, 19 Oct 2023 12:05:00 +0200 Subject: [PATCH 30/60] chore(docs): upgrade doc intro --- docs/upgrade.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/docs/upgrade.md b/docs/upgrade.md index 88a94294d5..1f5107902f 100644 --- a/docs/upgrade.md +++ b/docs/upgrade.md @@ -3,5 +3,11 @@ title: Upgrade guide description: Guide to update between major Powertools for AWS Lambda (TypeScript) versions --- +## Migrate to v2 from v1 + +This release includes some breaking changes, please take some time to review this guide to make your transition to v2 as smooth as possible. + +### Quick summary + !!! warning This guide is a work in progress. We'll update it as we get closer to the 2.0 release. If you have any questions, or want to follow the progress, please join the discussion on the [GitHub issue](https://github.com/aws-powertools/powertools-lambda-typescript/issues/1714). \ No newline at end of file From f04fee66658a7f74bbe7b4401a9bfe4e6559d84a Mon Sep 17 00:00:00 2001 From: Andrea Amorosi Date: Thu, 19 Oct 2023 11:54:00 +0200 Subject: [PATCH 31/60] chore(ci): add workflow to publish v2 docs on merge (#1756) --- .github/workflows/on-doc-v2-merge.yml | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 .github/workflows/on-doc-v2-merge.yml diff --git a/.github/workflows/on-doc-v2-merge.yml b/.github/workflows/on-doc-v2-merge.yml new file mode 100644 index 0000000000..4733c3dba5 --- /dev/null +++ b/.github/workflows/on-doc-v2-merge.yml @@ -0,0 +1,22 @@ +name: Docs v2 Publish (merge) + +on: + push: + branches: + - feat/v2 + paths: + - "docs/**" + - "mkdocs.yml" + +jobs: + release-docs: + permissions: + contents: write + pages: write + id-token: write + secrets: inherit + uses: ./.github/workflows/reusable-publish-docs.yml + with: + version: next + alias: next + detached_mode: false \ No newline at end of file From 9b06afe1c95a7b80bb234d9dca1aeda3a5b3fa83 Mon Sep 17 00:00:00 2001 From: Andrea Amorosi Date: Thu, 19 Oct 2023 12:13:53 +0200 Subject: [PATCH 32/60] chore(docs): upgrade doc intro --- docs/upgrade.md | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/docs/upgrade.md b/docs/upgrade.md index 1f5107902f..62437fb444 100644 --- a/docs/upgrade.md +++ b/docs/upgrade.md @@ -10,4 +10,7 @@ This release includes some breaking changes, please take some time to review thi ### Quick summary !!! warning - This guide is a work in progress. We'll update it as we get closer to the 2.0 release. If you have any questions, or want to follow the progress, please join the discussion on the [GitHub issue](https://github.com/aws-powertools/powertools-lambda-typescript/issues/1714). \ No newline at end of file + This guide is a work in progress. We'll update it as we get closer to the 2.0 release. If you have any questions, or want to follow the progress, please join the discussion on the [GitHub issue](https://github.com/aws-powertools/powertools-lambda-typescript/issues/1714). + +| Area | Change | Code change required | +| ---- | ------ | -------------------- | \ No newline at end of file From a68a720f3fc90f77a890bb2518f96d09f4bc50f7 Mon Sep 17 00:00:00 2001 From: Andrea Amorosi Date: Thu, 19 Oct 2023 12:35:24 +0200 Subject: [PATCH 33/60] chore(ci): remove mike commands --- .github/workflows/reusable-publish-docs.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/reusable-publish-docs.yml b/.github/workflows/reusable-publish-docs.yml index 9eaace6133..a1d60e3012 100644 --- a/.github/workflows/reusable-publish-docs.yml +++ b/.github/workflows/reusable-publish-docs.yml @@ -78,9 +78,9 @@ jobs: run: | rm -rf site mkdocs build - mike deploy --update-aliases --no-redirect ${{ env.VERSION }} ${{ env.ALIAS }} --branch backup-gh-pages + # mike deploy --update-aliases --no-redirect ${{ env.VERSION }} ${{ env.ALIAS }} --branch backup-gh-pages # Set latest version as a default - mike set-default latest --branch backup-gh-pages + # mike set-default latest --branch backup-gh-pages - name: Build API docs run: | rm -rf api From 66bf1bc2208fb50f45a2decff7b128fe48053e8b Mon Sep 17 00:00:00 2001 From: Andrea Amorosi Date: Thu, 19 Oct 2023 12:38:09 +0200 Subject: [PATCH 34/60] chore(ci): upgrade mkdocs --- docs/requirements.txt | 2 +- mkdocs.yml | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/requirements.txt b/docs/requirements.txt index 28ee101cfe..7806a7e916 100644 --- a/docs/requirements.txt +++ b/docs/requirements.txt @@ -1,4 +1,4 @@ mike==1.1.2 -mkdocs-material==9.3.2 +mkdocs-material==9.4.6 mkdocs-git-revision-date-plugin==0.3.2 mkdocs-exclude==1.0.2 \ No newline at end of file diff --git a/mkdocs.yml b/mkdocs.yml index 7c49a95aab..4719889feb 100644 --- a/mkdocs.yml +++ b/mkdocs.yml @@ -79,8 +79,8 @@ markdown_extensions: toc_depth: 4 - attr_list - pymdownx.emoji: - emoji_index: !!python/name:materialx.emoji.twemoji - emoji_generator: !!python/name:materialx.emoji.to_svg + emoji_index: !!python/name:material.extensions.emoji.twemoji + emoji_generator: !!python/name:material.extensions.emoji.to_svg - pymdownx.inlinehilite - pymdownx.superfences: custom_fences: From f89c795c65ee7522b596aa89275277eb0137993e Mon Sep 17 00:00:00 2001 From: Sergei Cherniaev Date: Fri, 20 Oct 2023 01:50:24 +0300 Subject: [PATCH 35/60] feat(logger): align sampling debug logs feature implementation with the other runtimes (#1744) * test(logger): remove logsSampled field, add default sampleRateValue * test(logger): add tests for sampling debug logs feature * feat(logger): change implementation to make sampling decision at per-function level * refactor(logger): remove redundant createLogger method * refactor(logger): remove getSampleRateValue method * test(logger): improve tests * refactor(logger): return createLogger() back with the detailed comment of the method importance * test(logger): add constructor/custom config/env var priority tests for sampling rate feature, improve description * refactor(logger): address review comments * feat(logger): add refreshSampleRateCalculation method and tests * test(logger): adjust end-to-end tests --- packages/logger/src/Logger.ts | 168 +++--- .../src/config/EnvironmentVariablesService.ts | 2 +- packages/logger/src/types/Logger.ts | 2 +- .../tests/e2e/sampleRate.decorator.test.ts | 7 +- packages/logger/tests/unit/Logger.test.ts | 479 +++++++++++++++--- .../tests/unit/middleware/middy.test.ts | 10 +- packages/testing/src/TestInvocationLogs.ts | 59 ++- 7 files changed, 552 insertions(+), 175 deletions(-) diff --git a/packages/logger/src/Logger.ts b/packages/logger/src/Logger.ts index db060ed6b2..5810a7b2d5 100644 --- a/packages/logger/src/Logger.ts +++ b/packages/logger/src/Logger.ts @@ -155,8 +155,6 @@ class Logger extends Utility implements ClassThatLogs { SILENT: 28, }; - private logsSampled = false; - private persistentLogAttributes?: LogAttributes = {}; private powertoolLogData: PowertoolLogData = {}; @@ -235,6 +233,7 @@ class Logger extends Utility implements ClassThatLogs { logLevel: this.getLevelName(), customConfigService: this.getCustomConfigService(), logFormatter: this.getLogFormatter(), + sampleRateValue: this.powertoolLogData.sampleRateValue, }; const parentsPowertoolsLogData = this.getPowertoolLogData(); const childLogger = this.createLogger( @@ -308,15 +307,6 @@ class Logger extends Utility implements ClassThatLogs { return this.logEvent; } - /** - * It returns a boolean value, if true all the logs will be printed. - * - * @returns {boolean} - */ - public getLogsSampled(): boolean { - return this.logsSampled; - } - /** * It returns the persistent log attributes, which are the attributes * that will be logged in all log items. @@ -456,15 +446,14 @@ class Logger extends Utility implements ClassThatLogs { } /** - * If the sample rate feature is enabled, the calculation that determines whether the logs - * will actually be printed or not for this invocation is done when the Logger class is - * initialized. - * This method will repeat that calculation (with possible different outcome). + * This method allows recalculating the initial sampling decision for changing + * the log level to DEBUG based on a sample rate value used during initialization, + * potentially yielding a different outcome. * * @returns {void} */ public refreshSampleRateCalculation(): void { - this.setLogsSampled(); + this.setInitialSampleRate(this.powertoolLogData.sampleRateValue); } /** @@ -515,19 +504,6 @@ class Logger extends Utility implements ClassThatLogs { this.persistentLogAttributes = attributes; } - /** - * It sets the user-provided sample rate value. - * - * @param {number} [sampleRateValue] - * @returns {void} - */ - public setSampleRateValue(sampleRateValue?: number): void { - this.powertoolLogData.sampleRateValue = - sampleRateValue || - this.getCustomConfigService()?.getSampleRateValue() || - this.getEnvVarsService().getSampleRateValue(); - } - /** * It checks whether the current Lambda invocation event should be printed in the logs or not. * @@ -555,36 +531,31 @@ class Logger extends Utility implements ClassThatLogs { } /** - * Creates a new Logger instance. + * Factory method for instantiating logger instances. Used by `createChild` method. + * Important for customization and subclassing. It allows subclasses, like `MyOwnLogger`, + * to override its behavior while keeping the main business logic in `createChild` intact. * - * @param {ConstructorOptions} [options] - * @returns {Logger} + * @example + * ```typescript + * // MyOwnLogger subclass + * class MyOwnLogger extends Logger { + * protected createLogger(options?: ConstructorOptions): MyOwnLogger { + * return new MyOwnLogger(options); + * } + * // No need to re-implement business logic from `createChild` and keep track on changes + * public createChild(options?: ConstructorOptions): MyOwnLogger { + * return super.createChild(options) as MyOwnLogger; + * } + * } + * ``` + * + * @param {ConstructorOptions} [options] Logger configuration options. + * @returns {Logger} A new logger instance. */ protected createLogger(options?: ConstructorOptions): Logger { return new Logger(options); } - /** - * Decides whether the current log item should be printed or not. - * - * The decision is based on the log level and the sample rate value. - * A log item will be printed if: - * 1. The log level is greater than or equal to the Logger's log level. - * 2. The log level is less than the Logger's log level, but the - * current sampling value is set to `true`. - * - * @param {number} logLevel - * @returns {boolean} - * @protected - */ - protected shouldPrint(logLevel: number): boolean { - if (logLevel >= this.logLevel) { - return true; - } - - return this.getLogsSampled(); - } - /** * It stores information that is printed in all log items. * @@ -750,20 +721,6 @@ class Logger extends Utility implements ClassThatLogs { }; } - /** - * It returns the numeric sample rate value. - * - * @private - * @returns {number} - */ - private getSampleRateValue(): number { - if (!this.powertoolLogData.sampleRateValue) { - this.setSampleRateValue(); - } - - return this.powertoolLogData.sampleRateValue as number; - } - /** * It returns true and type guards the log level if a given log level is valid. * @@ -777,6 +734,23 @@ class Logger extends Utility implements ClassThatLogs { return typeof logLevel === 'string' && logLevel in this.logLevelThresholds; } + /** + * It returns true and type guards the sample rate value if a given value is valid. + * + * @param sampleRateValue + * @private + * @returns {boolean} + */ + private isValidSampleRate( + sampleRateValue?: number + ): sampleRateValue is number { + return ( + typeof sampleRateValue === 'number' && + 0 <= sampleRateValue && + sampleRateValue <= 1 + ); + } + /** * It prints a given log with given log level. * @@ -817,13 +791,12 @@ class Logger extends Utility implements ClassThatLogs { input: LogItemMessage, extraInput: LogItemExtraInput ): void { - if (!this.shouldPrint(logLevel)) { - return; + if (logLevel >= this.logLevel) { + this.printLog( + logLevel, + this.createAndPopulateLogItem(logLevel, input, extraInput) + ); } - this.printLog( - logLevel, - this.createAndPopulateLogItem(logLevel, input, extraInput) - ); } /** @@ -905,6 +878,37 @@ class Logger extends Utility implements ClassThatLogs { } } + /** + * It sets sample rate value with the following prioprity: + * 1. Constructor value + * 2. Custom config service value + * 3. Environment variable value + * 4. Default value (zero) + * + * @private + * @param {number} [sampleRateValue] + * @returns {void} + */ + private setInitialSampleRate(sampleRateValue?: number): void { + this.powertoolLogData.sampleRateValue = 0; + const constructorValue = sampleRateValue; + const customConfigValue = + this.getCustomConfigService()?.getSampleRateValue(); + const envVarsValue = this.getEnvVarsService().getSampleRateValue(); + for (const value of [constructorValue, customConfigValue, envVarsValue]) { + if (this.isValidSampleRate(value)) { + this.powertoolLogData.sampleRateValue = value; + + if (value && randomInt(0, 100) / 100 <= value) { + this.setLogLevel('DEBUG'); + this.debug('Setting log level to DEBUG due to sampling rate'); + } + + return; + } + } + } + /** * If the log event feature is enabled via env variable, it sets a property that tracks whether * the event passed to the Lambda function handler should be logged or not. @@ -943,20 +947,6 @@ class Logger extends Utility implements ClassThatLogs { } } - /** - * If the sample rate feature is enabled, it sets a property that tracks whether this Lambda function invocation - * will print logs or not. - * - * @private - * @returns {void} - */ - private setLogsSampled(): void { - const sampleRateValue = this.getSampleRateValue(); - this.logsSampled = - sampleRateValue !== undefined && - (sampleRateValue === 1 || randomInt(0, 100) / 100 <= sampleRateValue); - } - /** * It configures the Logger instance settings that will affect the Logger's behaviour * and the content of all logs. @@ -981,10 +971,9 @@ class Logger extends Utility implements ClassThatLogs { this.setConsole(); this.setCustomConfigService(customConfigService); this.setInitialLogLevel(logLevel); - this.setSampleRateValue(sampleRateValue); - this.setLogsSampled(); this.setLogFormatter(logFormatter); this.setPowertoolLogData(serviceName, environment); + this.setInitialSampleRate(sampleRateValue); this.setLogEvent(); this.setLogIndentation(); @@ -1014,7 +1003,6 @@ class Logger extends Utility implements ClassThatLogs { environment || this.getCustomConfigService()?.getCurrentEnvironment() || this.getEnvVarsService().getCurrentEnvironment(), - sampleRateValue: this.getSampleRateValue(), serviceName: serviceName || this.getCustomConfigService()?.getServiceName() || diff --git a/packages/logger/src/config/EnvironmentVariablesService.ts b/packages/logger/src/config/EnvironmentVariablesService.ts index 71b0dabab9..a9c0786eb6 100644 --- a/packages/logger/src/config/EnvironmentVariablesService.ts +++ b/packages/logger/src/config/EnvironmentVariablesService.ts @@ -100,7 +100,7 @@ class EnvironmentVariablesService /** * It returns the value of the POWERTOOLS_LOGGER_SAMPLE_RATE environment variable. * - * @returns {string|undefined} + * @returns {number|undefined} */ public getSampleRateValue(): number | undefined { const value = this.get(this.sampleRateValueVariable); diff --git a/packages/logger/src/types/Logger.ts b/packages/logger/src/types/Logger.ts index 193d72daef..c937d66542 100644 --- a/packages/logger/src/types/Logger.ts +++ b/packages/logger/src/types/Logger.ts @@ -47,7 +47,7 @@ type LambdaFunctionContext = { type PowertoolLogData = LogAttributes & { environment?: Environment; serviceName: string; - sampleRateValue?: number; + sampleRateValue: number; lambdaFunctionContext: LambdaFunctionContext; xRayTraceId?: string; awsRegion: string; diff --git a/packages/logger/tests/e2e/sampleRate.decorator.test.ts b/packages/logger/tests/e2e/sampleRate.decorator.test.ts index e87f661a56..dfb60141ab 100644 --- a/packages/logger/tests/e2e/sampleRate.decorator.test.ts +++ b/packages/logger/tests/e2e/sampleRate.decorator.test.ts @@ -81,7 +81,12 @@ describe(`Logger E2E tests, sample rate and injectLambdaContext()`, () => { if (logMessages.length === 1 && logMessages[0].includes('ERROR')) { countNotSampled++; - } else if (logMessages.length === 4) { + } else if ( + logMessages.length === 5 && + logMessages[0].includes( + 'Setting log level to DEBUG due to sampling rate' + ) + ) { countSampled++; } else { console.error(`Log group ${logGroupName} contains missing log`); diff --git a/packages/logger/tests/unit/Logger.test.ts b/packages/logger/tests/unit/Logger.test.ts index f1a5474de0..c3ecc4729f 100644 --- a/packages/logger/tests/unit/Logger.test.ts +++ b/packages/logger/tests/unit/Logger.test.ts @@ -59,10 +59,9 @@ describe('Class: Logger', () => { expect(logger).toBeInstanceOf(Logger); expect(logger).toEqual( expect.objectContaining({ - logsSampled: false, persistentLogAttributes: {}, powertoolLogData: { - sampleRateValue: undefined, + sampleRateValue: 0, awsRegion: 'eu-west-1', environment: '', serviceName: 'hello-world', @@ -103,12 +102,11 @@ describe('Class: Logger', () => { logEvent: false, logIndentation: 0, logFormatter: expect.any(PowertoolsLogFormatter), - logLevel: 16, + logLevel: 8, // 100% sample rate value changes log level to DEBUG console: expect.any(Console), logLevelThresholds: { ...logLevelThresholds, }, - logsSampled: true, persistentLogAttributes: { awsAccountId: '123456789', }, @@ -145,12 +143,11 @@ describe('Class: Logger', () => { logLevelThresholds: { ...logLevelThresholds, }, - logsSampled: false, persistentLogAttributes: {}, powertoolLogData: { awsRegion: 'eu-west-1', environment: '', - sampleRateValue: undefined, + sampleRateValue: 0, serviceName: 'service_undefined', }, }); @@ -169,10 +166,9 @@ describe('Class: Logger', () => { expect(logger).toBeInstanceOf(Logger); expect(logger).toEqual( expect.objectContaining({ - logsSampled: false, persistentLogAttributes: {}, powertoolLogData: { - sampleRateValue: undefined, + sampleRateValue: 0, awsRegion: 'eu-west-1', environment: '', serviceName: 'hello-world', @@ -198,10 +194,9 @@ describe('Class: Logger', () => { expect(logger).toBeInstanceOf(Logger); expect(logger).toEqual( expect.objectContaining({ - logsSampled: false, persistentLogAttributes: {}, powertoolLogData: { - sampleRateValue: undefined, + sampleRateValue: 0, awsRegion: 'eu-west-1', environment: '', serviceName: 'my-backend-service', @@ -227,10 +222,9 @@ describe('Class: Logger', () => { expect(logger).toBeInstanceOf(Logger); expect(logger).toEqual( expect.objectContaining({ - logsSampled: false, persistentLogAttributes: {}, powertoolLogData: { - sampleRateValue: undefined, + sampleRateValue: 0, awsRegion: 'eu-west-1', environment: '', serviceName: 'hello-world', @@ -256,10 +250,9 @@ describe('Class: Logger', () => { expect(logger).toBeInstanceOf(Logger); expect(logger).toEqual( expect.objectContaining({ - logsSampled: false, persistentLogAttributes: {}, powertoolLogData: { - sampleRateValue: undefined, + sampleRateValue: 0, awsRegion: 'eu-west-1', environment: '', serviceName: 'hello-world', @@ -295,12 +288,11 @@ describe('Class: Logger', () => { logLevelThresholds: { ...logLevelThresholds, }, - logsSampled: false, persistentLogAttributes: {}, powertoolLogData: { awsRegion: 'eu-west-1', environment: '', - sampleRateValue: undefined, + sampleRateValue: 0, serviceName: 'hello-world', }, }); @@ -319,7 +311,6 @@ describe('Class: Logger', () => { expect(logger).toBeInstanceOf(Logger); expect(logger).toEqual( expect.objectContaining({ - logsSampled: true, persistentLogAttributes: {}, powertoolLogData: { sampleRateValue: 1, @@ -374,10 +365,9 @@ describe('Class: Logger', () => { expect(logger).toBeInstanceOf(Logger); expect(logger).toEqual( expect.objectContaining({ - logsSampled: false, persistentLogAttributes: {}, powertoolLogData: { - sampleRateValue: undefined, + sampleRateValue: 0, awsRegion: 'eu-west-1', environment: 'dev', serviceName: 'my-backend-service', @@ -410,7 +400,6 @@ describe('Class: Logger', () => { expect(logger).toBeInstanceOf(Logger); expect(logger).toEqual( expect.objectContaining({ - logsSampled: false, persistentLogAttributes: { aws_account_id: '123456789012', aws_region: 'eu-west-1', @@ -420,7 +409,7 @@ describe('Class: Logger', () => { }, }, powertoolLogData: { - sampleRateValue: undefined, + sampleRateValue: 0, awsRegion: 'eu-west-1', environment: '', serviceName: 'hello-world', @@ -446,10 +435,9 @@ describe('Class: Logger', () => { expect(logger).toBeInstanceOf(Logger); expect(logger).toEqual( expect.objectContaining({ - logsSampled: false, persistentLogAttributes: {}, powertoolLogData: { - sampleRateValue: undefined, + sampleRateValue: 0, awsRegion: 'eu-west-1', environment: 'dev', serviceName: 'hello-world', @@ -515,6 +503,7 @@ describe('Class: Logger', () => { JSON.stringify({ level: methodOfLogger.toUpperCase(), message: 'foo', + sampling_rate: 0, service: 'hello-world', timestamp: '2016-06-20T12:08:10.000Z', xray_trace_id: '1-5759e988-bd862e3fe1be46a994272793', @@ -543,6 +532,7 @@ describe('Class: Logger', () => { JSON.stringify({ level: methodOfLogger.toUpperCase(), message: 'foo', + sampling_rate: 0, service: 'hello-world', timestamp: '2016-06-20T12:08:10.000Z', xray_trace_id: '1-5759e988-bd862e3fe1be46a994272793', @@ -571,6 +561,7 @@ describe('Class: Logger', () => { JSON.stringify({ level: methodOfLogger.toUpperCase(), message: 'foo', + sampling_rate: 0, service: 'hello-world', timestamp: '2016-06-20T12:08:10.000Z', xray_trace_id: '1-5759e988-bd862e3fe1be46a994272793', @@ -599,6 +590,7 @@ describe('Class: Logger', () => { JSON.stringify({ level: methodOfLogger.toUpperCase(), message: 'foo', + sampling_rate: 0, service: 'hello-world', timestamp: '2016-06-20T12:08:10.000Z', xray_trace_id: '1-5759e988-bd862e3fe1be46a994272793', @@ -641,6 +633,7 @@ describe('Class: Logger', () => { JSON.stringify({ level: methodOfLogger.toUpperCase(), message: 'foo', + sampling_rate: 0, service: 'hello-world', timestamp: '2016-06-20T12:08:10.000Z', xray_trace_id: '1-5759e988-bd862e3fe1be46a994272793', @@ -649,7 +642,7 @@ describe('Class: Logger', () => { }); }); - describe('Feature: sample rate', () => { + describe('Feature: sampling debug logs', () => { test('when the log level is higher and the current Lambda invocation IS NOT sampled for logging, it DOES NOT print to stdout', () => { // Prepare const logger = new Logger({ @@ -666,10 +659,12 @@ describe('Class: Logger', () => { } // Assess + expect(logger.level).toBe(28); + expect(logger.getLevelName()).toBe('SILENT'); expect(consoleSpy).toBeCalledTimes(0); }); - test('when the log level is higher and the current Lambda invocation IS sampled for logging, it DOES print to stdout', () => { + test('when the log level is higher and the current Lambda invocation IS sampled for logging, it DOES print to stdout and changes log level to DEBUG', () => { // Prepare const logger = new Logger({ logLevel: 'SILENT', @@ -685,6 +680,8 @@ describe('Class: Logger', () => { } // Assess + expect(logger.level).toBe(8); + expect(logger.getLevelName()).toBe('DEBUG'); expect(consoleSpy).toBeCalledTimes(1); expect(consoleSpy).toHaveBeenNthCalledWith( 1, @@ -724,6 +721,7 @@ describe('Class: Logger', () => { JSON.stringify({ level: method.toUpperCase(), message: 'foo', + sampling_rate: 0, service: 'hello-world', timestamp: '2016-06-20T12:08:10.000Z', xray_trace_id: '1-5759e988-bd862e3fe1be46a994272793', @@ -764,6 +762,7 @@ describe('Class: Logger', () => { function_request_id: 'c6af9ac6-7b61-11e6-9a41-93e812345678', level: method.toUpperCase(), message: 'foo', + sampling_rate: 0, service: 'hello-world', timestamp: '2016-06-20T12:08:10.000Z', xray_trace_id: '1-5759e988-bd862e3fe1be46a994272793', @@ -848,6 +847,7 @@ describe('Class: Logger', () => { JSON.stringify({ level: method.toUpperCase(), message: 'A log item without extra parameters', + sampling_rate: 0, service: 'hello-world', timestamp: '2016-06-20T12:08:10.000Z', xray_trace_id: '1-5759e988-bd862e3fe1be46a994272793', @@ -859,6 +859,7 @@ describe('Class: Logger', () => { level: method.toUpperCase(), message: 'A log item with a string as first parameter, and an object as second parameter', + sampling_rate: 0, service: 'hello-world', timestamp: '2016-06-20T12:08:10.000Z', xray_trace_id: '1-5759e988-bd862e3fe1be46a994272793', @@ -871,6 +872,7 @@ describe('Class: Logger', () => { level: method.toUpperCase(), message: 'A log item with a string as first parameter, and objects as other parameters', + sampling_rate: 0, service: 'hello-world', timestamp: '2016-06-20T12:08:10.000Z', xray_trace_id: '1-5759e988-bd862e3fe1be46a994272793', @@ -883,6 +885,7 @@ describe('Class: Logger', () => { JSON.stringify({ level: method.toUpperCase(), message: 'A log item with an object as first parameters', + sampling_rate: 0, service: 'hello-world', timestamp: '2016-06-20T12:08:10.000Z', xray_trace_id: '1-5759e988-bd862e3fe1be46a994272793', @@ -895,6 +898,7 @@ describe('Class: Logger', () => { level: method.toUpperCase(), message: 'A log item with a string as first parameter, and an error as second parameter', + sampling_rate: 0, service: 'hello-world', timestamp: '2016-06-20T12:08:10.000Z', xray_trace_id: '1-5759e988-bd862e3fe1be46a994272793', @@ -914,6 +918,7 @@ describe('Class: Logger', () => { level: method.toUpperCase(), message: 'A log item with a string as first parameter, and an error with custom key as second parameter', + sampling_rate: 0, service: 'hello-world', timestamp: '2016-06-20T12:08:10.000Z', xray_trace_id: '1-5759e988-bd862e3fe1be46a994272793', @@ -931,6 +936,7 @@ describe('Class: Logger', () => { level: method.toUpperCase(), message: 'A log item with a string as first parameter, and a string as second parameter', + sampling_rate: 0, service: 'hello-world', timestamp: '2016-06-20T12:08:10.000Z', xray_trace_id: '1-5759e988-bd862e3fe1be46a994272793', @@ -943,6 +949,7 @@ describe('Class: Logger', () => { level: method.toUpperCase(), message: 'A log item with a string as first parameter, and an inline object as second parameter', + sampling_rate: 0, service: 'hello-world', timestamp: '2016-06-20T12:08:10.000Z', xray_trace_id: '1-5759e988-bd862e3fe1be46a994272793', @@ -955,6 +962,7 @@ describe('Class: Logger', () => { level: method.toUpperCase(), message: 'A log item with a string as first parameter, and an arbitrary object as second parameter', + sampling_rate: 0, service: 'hello-world', timestamp: '2016-06-20T12:08:10.000Z', xray_trace_id: '1-5759e988-bd862e3fe1be46a994272793', @@ -1005,6 +1013,7 @@ describe('Class: Logger', () => { JSON.stringify({ level: method.toUpperCase(), message: 'foo', + sampling_rate: 0, service: 'hello-world', timestamp: '2016-06-20T12:08:10.000Z', xray_trace_id: '1-5759e988-bd862e3fe1be46a994272793', @@ -1037,6 +1046,7 @@ describe('Class: Logger', () => { JSON.stringify({ level: method.toUpperCase(), message: 'foo', + sampling_rate: 0, service: 'hello-world', timestamp: '2016-06-20T12:08:10.000Z', xray_trace_id: '1-5759e988-bd862e3fe1be46a994272793', @@ -1066,6 +1076,7 @@ describe('Class: Logger', () => { JSON.stringify({ level: method.toUpperCase(), message: 'foo', + sampling_rate: 0, service: 'hello-world', timestamp: '2016-06-20T12:08:10.000Z', }) @@ -1107,6 +1118,7 @@ describe('Class: Logger', () => { JSON.stringify({ level: method.toUpperCase(), message: 'A log with a circular reference', + sampling_rate: 0, service: 'hello-world', timestamp: '2016-06-20T12:08:10.000Z', xray_trace_id: '1-5759e988-bd862e3fe1be46a994272793', @@ -1152,6 +1164,7 @@ describe('Class: Logger', () => { JSON.stringify({ level: methodOfLogger.toUpperCase(), message: message, + sampling_rate: 0, service: 'hello-world', timestamp: '2016-06-20T12:08:10.000Z', xray_trace_id: '1-5759e988-bd862e3fe1be46a994272793', @@ -1184,6 +1197,7 @@ describe('Class: Logger', () => { JSON.stringify({ level: methodOfLogger.toUpperCase(), message: message, + sampling_rate: 0, service: 'hello-world', timestamp: '2016-06-20T12:08:10.000Z', xray_trace_id: '1-5759e988-bd862e3fe1be46a994272793', @@ -1217,7 +1231,6 @@ describe('Class: Logger', () => { logLevelThresholds: { ...logLevelThresholds, }, - logsSampled: false, persistentLogAttributes: {}, powertoolLogData: { awsRegion: 'eu-west-1', @@ -1231,7 +1244,7 @@ describe('Class: Logger', () => { 'arn:aws:lambda:eu-west-1:123456789012:function:foo-bar-function', memoryLimitInMB: 128, }, - sampleRateValue: undefined, + sampleRateValue: 0, serviceName: 'hello-world', }, }); @@ -1494,6 +1507,7 @@ describe('Class: Logger', () => { function_request_id: 'c6af9ac6-7b61-11e6-9a41-93e812345678', level: 'INFO', message: 'This is an INFO log with some context', + sampling_rate: 0, service: 'hello-world', timestamp: '2016-06-20T12:08:10.000Z', xray_trace_id: '1-5759e988-bd862e3fe1be46a994272793', @@ -1531,6 +1545,7 @@ describe('Class: Logger', () => { JSON.stringify({ level: 'INFO', message: 'An INFO log without context!', + sampling_rate: 0, service: 'hello-world', timestamp: '2016-06-20T12:08:10.000Z', xray_trace_id: '1-5759e988-bd862e3fe1be46a994272793', @@ -1547,6 +1562,7 @@ describe('Class: Logger', () => { function_request_id: 'c6af9ac6-7b61-11e6-9a41-93e812345678', level: 'INFO', message: 'This is an INFO log with some context', + sampling_rate: 0, service: 'hello-world', timestamp: '2016-06-20T12:08:10.000Z', xray_trace_id: '1-5759e988-bd862e3fe1be46a994272793', @@ -1588,6 +1604,7 @@ describe('Class: Logger', () => { JSON.stringify({ level: 'INFO', message: 'An INFO log without context!', + sampling_rate: 0, service: 'hello-world', timestamp: '2016-06-20T12:08:10.000Z', xray_trace_id: '1-5759e988-bd862e3fe1be46a994272793', @@ -1604,6 +1621,7 @@ describe('Class: Logger', () => { function_request_id: 'c6af9ac6-7b61-11e6-9a41-93e812345678', level: 'INFO', message: 'This is an INFO log with some context', + sampling_rate: 0, service: 'hello-world', timestamp: '2016-06-20T12:08:10.000Z', xray_trace_id: '1-5759e988-bd862e3fe1be46a994272793', @@ -1739,6 +1757,7 @@ describe('Class: Logger', () => { function_request_id: 'c6af9ac6-7b61-11e6-9a41-93e812345678', level: 'INFO', message: 'Lambda invocation event', + sampling_rate: 0, service: 'hello-world', timestamp: '2016-06-20T12:08:10.000Z', xray_trace_id: '1-5759e988-bd862e3fe1be46a994272793', @@ -1788,6 +1807,7 @@ describe('Class: Logger', () => { function_request_id: 'c6af9ac6-7b61-11e6-9a41-93e812345678', level: 'INFO', message: 'Lambda invocation event', + sampling_rate: 0, service: 'hello-world', timestamp: '2016-06-20T12:08:10.000Z', xray_trace_id: '1-5759e988-bd862e3fe1be46a994272793', @@ -1848,6 +1868,7 @@ describe('Class: Logger', () => { function_request_id: 'c6af9ac6-7b61-11e6-9a41-93e812345678', level: 'INFO', message: 'memberVariable:someValue', + sampling_rate: 0, service: 'hello-world', timestamp: '2016-06-20T12:08:10.000Z', xray_trace_id: '1-5759e988-bd862e3fe1be46a994272793', @@ -1960,29 +1981,6 @@ describe('Class: Logger', () => { }); }); - describe('Method: refreshSampleRateCalculation', () => { - test('it recalculates whether the current Lambda invocation logs will be printed or not', () => { - // Prepare - const logger = new Logger({ - logLevel: 'ERROR', - sampleRateValue: 0.1, // 10% probability - }); - let logsSampledCount = 0; - - // Act - for (let i = 0; i < 1000; i++) { - logger.refreshSampleRateCalculation(); - if (logger.getLogsSampled() === true) { - logsSampledCount++; - } - } - - // Assess - expect(logsSampledCount > 50).toBe(true); - expect(logsSampledCount < 150).toBe(true); - }); - }); - describe('Method: createChild', () => { test('child and grandchild loggers should have all the options of its ancestor', () => { // Prepare @@ -2018,12 +2016,11 @@ describe('Class: Logger', () => { logLevelThresholds: { ...logLevelThresholds, }, - logsSampled: false, persistentLogAttributes: {}, powertoolLogData: { awsRegion: 'eu-west-1', environment: '', - sampleRateValue: undefined, + sampleRateValue: 0, serviceName: 'parent-service-name', }, }); @@ -2041,7 +2038,6 @@ describe('Class: Logger', () => { logLevelThresholds: { ...logLevelThresholds, }, - logsSampled: true, persistentLogAttributes: {}, powertoolLogData: { awsRegion: 'eu-west-1', @@ -2064,7 +2060,6 @@ describe('Class: Logger', () => { logLevelThresholds: { ...logLevelThresholds, }, - logsSampled: true, persistentLogAttributes: {}, powertoolLogData: { awsRegion: 'eu-west-1', @@ -2130,12 +2125,11 @@ describe('Class: Logger', () => { logLevelThresholds: { ...logLevelThresholds, }, - logsSampled: false, persistentLogAttributes: {}, powertoolLogData: { awsRegion: 'eu-west-1', environment: '', - sampleRateValue: undefined, + sampleRateValue: 0, serviceName: 'hello-world', }, }); @@ -2153,7 +2147,6 @@ describe('Class: Logger', () => { logLevelThresholds: { ...logLevelThresholds, }, - logsSampled: false, persistentLogAttributes: { extra: 'This is an attribute that will be logged only by the child logger', @@ -2161,7 +2154,7 @@ describe('Class: Logger', () => { powertoolLogData: { awsRegion: 'eu-west-1', environment: '', - sampleRateValue: undefined, + sampleRateValue: 0, serviceName: 'hello-world', }, }); @@ -2179,7 +2172,6 @@ describe('Class: Logger', () => { logLevelThresholds: { ...logLevelThresholds, }, - logsSampled: true, persistentLogAttributes: {}, powertoolLogData: { awsRegion: 'eu-west-1', @@ -2202,12 +2194,11 @@ describe('Class: Logger', () => { logLevelThresholds: { ...logLevelThresholds, }, - logsSampled: false, persistentLogAttributes: {}, powertoolLogData: { awsRegion: 'eu-west-1', environment: '', - sampleRateValue: undefined, + sampleRateValue: 0, serviceName: 'hello-world', }, }); @@ -2246,12 +2237,11 @@ describe('Class: Logger', () => { logLevelThresholds: { ...logLevelThresholds, }, - logsSampled: false, persistentLogAttributes: {}, powertoolLogData: { awsRegion: 'eu-west-1', environment: '', - sampleRateValue: undefined, + sampleRateValue: 0, serviceName: 'hello-world', }, }); @@ -2269,7 +2259,6 @@ describe('Class: Logger', () => { logLevelThresholds: { ...logLevelThresholds, }, - logsSampled: false, persistentLogAttributes: { aws_account_id: '123456789012', aws_region: 'eu-west-1', @@ -2281,7 +2270,7 @@ describe('Class: Logger', () => { powertoolLogData: { awsRegion: 'eu-west-1', environment: '', - sampleRateValue: undefined, + sampleRateValue: 0, serviceName: 'hello-world', }, }); @@ -2299,7 +2288,6 @@ describe('Class: Logger', () => { logLevelThresholds: { ...logLevelThresholds, }, - logsSampled: false, persistentLogAttributes: { aws_account_id: '123456789012', aws_region: 'eu-west-1', @@ -2312,7 +2300,7 @@ describe('Class: Logger', () => { powertoolLogData: { awsRegion: 'eu-west-1', environment: '', - sampleRateValue: undefined, + sampleRateValue: 0, serviceName: 'hello-world', }, }); @@ -2340,7 +2328,6 @@ describe('Class: Logger', () => { logLevelThresholds: { ...logLevelThresholds, }, - logsSampled: false, persistentLogAttributes: {}, powertoolLogData: { awsRegion: 'eu-west-1', @@ -2354,7 +2341,7 @@ describe('Class: Logger', () => { 'arn:aws:lambda:eu-west-1:123456789012:function:foo-bar-function', memoryLimitInMB: 128, }, - sampleRateValue: undefined, + sampleRateValue: 0, serviceName: 'hello-world', }, }); @@ -2410,7 +2397,7 @@ describe('Class: Logger', () => { const options: ConstructorOptions = { logLevel: 'ERROR', serviceName: 'test-service-name', - sampleRateValue: 0.77, + sampleRateValue: 1, logFormatter: new MyCustomLogFormatter(), customConfigService: new MyCustomEnvironmentVariablesService(), persistentLogAttributes: { @@ -2428,7 +2415,6 @@ describe('Class: Logger', () => { expect(childLogger).toEqual({ ...parentLogger, console: expect.any(Console), - logsSampled: expect.any(Boolean), }); expect(childLogger).toEqual( @@ -2480,6 +2466,7 @@ describe('Class: Logger', () => { JSON.stringify({ level: 'INFO', message: 'Lambda invocation event', + sampling_rate: 0, service: 'hello-world', timestamp: '2016-06-20T12:08:10.000Z', xray_trace_id: '1-5759e988-bd862e3fe1be46a994272793', @@ -2512,6 +2499,7 @@ describe('Class: Logger', () => { { level: 'INFO', message: 'Message with pretty identation', + sampling_rate: 0, service: 'hello-world', timestamp: '2016-06-20T12:08:10.000Z', xray_trace_id: '1-5759e988-bd862e3fe1be46a994272793', @@ -2539,6 +2527,7 @@ describe('Class: Logger', () => { JSON.stringify({ level: 'INFO', message: 'Message without pretty identation', + sampling_rate: 0, service: 'hello-world', timestamp: '2016-06-20T12:08:10.000Z', xray_trace_id: '1-5759e988-bd862e3fe1be46a994272793', @@ -2591,4 +2580,352 @@ describe('Class: Logger', () => { ); }); }); + + describe('Feature: Sampling debug logs', () => { + test('when sample rate is set in constructor, it DOES change log level to DEBUG', () => { + // Prepare & Act + const logger: Logger = new Logger({ + logLevel: 'ERROR', + sampleRateValue: 1, + }); + + // Assess + expect(logger.level).toBe(8); + expect(logger.getLevelName()).toBe('DEBUG'); + }); + + test('when sample rate is set in custom config service, it DOES change log level to DEBUG', () => { + // Prepare & Act + class MyCustomEnvironmentVariablesService extends EnvironmentVariablesService { + private sampleRateValue = 1; + public getSampleRateValue(): number { + return this.sampleRateValue; + } + } + + const loggerOptions: ConstructorOptions = { + logLevel: 'ERROR', + customConfigService: new MyCustomEnvironmentVariablesService(), + }; + + const logger: Logger = new Logger(loggerOptions); + + // Assess + expect(logger.level).toBe(8); + expect(logger.getLevelName()).toBe('DEBUG'); + }); + + test('when sample rate is set in environmental variable, it DOES change log level to DEBUG', () => { + // Prepare & Act + process.env.POWERTOOLS_LOGGER_SAMPLE_RATE = '1'; + + const logger: Logger = new Logger({ + logLevel: 'ERROR', + }); + + // Assess + expect(logger.level).toBe(8); + expect(logger.getLevelName()).toBe('DEBUG'); + }); + + test('when sample rate is disabled it DOES NOT changes log level to DEBUG', () => { + // Prepare & Act + const logger: Logger = new Logger({ + logLevel: 'ERROR', + sampleRateValue: 0, + }); + + // Assess + expect(logger.level).toBe(20); + expect(logger.getLevelName()).toBe('ERROR'); + }); + + test('when sample rate is set in constructor, custom config, and environmental variable, it should prioritize constructor value', () => { + // Prepare + process.env.POWERTOOLS_LOGGER_SAMPLE_RATE = '0.5'; + + class MyCustomEnvironmentVariablesService extends EnvironmentVariablesService { + private sampleRateValue = 0.75; + public getSampleRateValue(): number { + return this.sampleRateValue; + } + } + const loggerOptions: ConstructorOptions = { + sampleRateValue: 1, + customConfigService: new MyCustomEnvironmentVariablesService(), + }; + const logger: Logger = new Logger(loggerOptions); + + const consoleSpy = jest + .spyOn(logger['console'], 'info') + .mockImplementation(); + + // Act + logger.info('foo'); + + // Assess + expect(consoleSpy).toBeCalledTimes(1); + expect(consoleSpy).toHaveBeenNthCalledWith( + 1, + JSON.stringify({ + level: 'INFO', + message: 'foo', + sampling_rate: 1, + service: 'hello-world', + timestamp: '2016-06-20T12:08:10.000Z', + xray_trace_id: '1-5759e988-bd862e3fe1be46a994272793', + }) + ); + }); + + test('when sample rate is set in custom config and environmental variable, it should prioritize custom config value', () => { + // Prepare + process.env.POWERTOOLS_LOGGER_SAMPLE_RATE = '0.75'; + + class MyCustomEnvironmentVariablesService extends EnvironmentVariablesService { + private sampleRateValue = 1; + public getSampleRateValue(): number { + return this.sampleRateValue; + } + } + const loggerOptions: ConstructorOptions = { + customConfigService: new MyCustomEnvironmentVariablesService(), + }; + const logger: Logger = new Logger(loggerOptions); + + const consoleSpy = jest + .spyOn(logger['console'], 'info') + .mockImplementation(); + + // Act + logger.info('foo'); + + // Assess + expect(consoleSpy).toBeCalledTimes(1); + expect(consoleSpy).toHaveBeenNthCalledWith( + 1, + JSON.stringify({ + level: 'INFO', + message: 'foo', + sampling_rate: 1, + service: 'hello-world', + timestamp: '2016-06-20T12:08:10.000Z', + xray_trace_id: '1-5759e988-bd862e3fe1be46a994272793', + }) + ); + }); + + test('when sample rate is set in environmental variable, it should use POWERTOOLS_LOGGER_SAMPLE_RATE value', () => { + // Prepare + process.env.POWERTOOLS_LOGGER_SAMPLE_RATE = '1'; + const logger: Logger = new Logger(); + const consoleSpy = jest + .spyOn(logger['console'], 'debug') + .mockImplementation(); + + // Act + logger.debug('foo'); + + // Assess + expect(consoleSpy).toBeCalledTimes(1); + expect(consoleSpy).toHaveBeenNthCalledWith( + 1, + JSON.stringify({ + level: 'DEBUG', + message: 'foo', + sampling_rate: 1, + service: 'hello-world', + timestamp: '2016-06-20T12:08:10.000Z', + xray_trace_id: '1-5759e988-bd862e3fe1be46a994272793', + }) + ); + }); + + test('when sample rate is set in custom config service, it should use custom config service value', () => { + // Prepare + class MyCustomEnvironmentVariablesService extends EnvironmentVariablesService { + private sampleRateValue = 1; + public getSampleRateValue(): number { + return this.sampleRateValue; + } + } + const loggerOptions: ConstructorOptions = { + customConfigService: new MyCustomEnvironmentVariablesService(), + }; + + const logger: Logger = new Logger(loggerOptions); + const consoleSpy = jest + .spyOn(logger['console'], 'info') + .mockImplementation(); + + // Act + logger.info('foo'); + + // Assess + expect(consoleSpy).toBeCalledTimes(1); + expect(consoleSpy).toHaveBeenNthCalledWith( + 1, + JSON.stringify({ + level: 'INFO', + message: 'foo', + sampling_rate: 1, + service: 'hello-world', + timestamp: '2016-06-20T12:08:10.000Z', + xray_trace_id: '1-5759e988-bd862e3fe1be46a994272793', + }) + ); + }); + + test('when sample rate in constructor is out of expected range, it should be ignored', () => { + // Prepare + const logger: Logger = new Logger({ + logLevel: 'INFO', + sampleRateValue: 42, + }); + const consoleSpy = jest + .spyOn(logger['console'], 'info') + .mockImplementation(); + + // Act + logger.info('foo'); + + // Assess + expect(consoleSpy).toBeCalledTimes(1); + expect(consoleSpy).toHaveBeenNthCalledWith( + 1, + JSON.stringify({ + level: 'INFO', + message: 'foo', + sampling_rate: 0, + service: 'hello-world', + timestamp: '2016-06-20T12:08:10.000Z', + xray_trace_id: '1-5759e988-bd862e3fe1be46a994272793', + }) + ); + }); + + test('when sample rate in custom config service is out of expected range, it should be ignored', () => { + // Prepare + class MyCustomEnvironmentVariablesService extends EnvironmentVariablesService { + private sampleRateValue = 42; + public getSampleRateValue(): number { + return this.sampleRateValue; + } + } + const loggerOptions: ConstructorOptions = { + logLevel: 'INFO', + customConfigService: new MyCustomEnvironmentVariablesService(), + }; + + const logger: Logger = new Logger(loggerOptions); + const consoleSpy = jest + .spyOn(logger['console'], 'info') + .mockImplementation(); + + // Act + logger.info('foo'); + + // Assess + expect(consoleSpy).toBeCalledTimes(1); + expect(consoleSpy).toHaveBeenNthCalledWith( + 1, + JSON.stringify({ + level: 'INFO', + message: 'foo', + sampling_rate: 0, + service: 'hello-world', + timestamp: '2016-06-20T12:08:10.000Z', + xray_trace_id: '1-5759e988-bd862e3fe1be46a994272793', + }) + ); + }); + + test('when sample rate in environmental variable is out of expected range, it should be ignored', () => { + // Prepare + process.env.POWERTOOLS_LOGGER_SAMPLE_RATE = '42'; + const logger: Logger = new Logger({ + logLevel: 'INFO', + }); + const consoleSpy = jest + .spyOn(logger['console'], 'info') + .mockImplementation(); + + // Act + logger.info('foo'); + + // Assess + expect(consoleSpy).toBeCalledTimes(1); + expect(consoleSpy).toHaveBeenNthCalledWith( + 1, + JSON.stringify({ + level: 'INFO', + message: 'foo', + sampling_rate: 0, + service: 'hello-world', + timestamp: '2016-06-20T12:08:10.000Z', + xray_trace_id: '1-5759e988-bd862e3fe1be46a994272793', + }) + ); + }); + + describe('Method: refreshSampleRateCalculation', () => { + test('when sample rate calculation is refreshed, it DOES NOT overwrite the sample rate value', () => { + // Prepare + const logger = new Logger({ + logLevel: 'INFO', + sampleRateValue: 1, + }); + const consoleSpy = jest + .spyOn(logger['console'], 'info') + .mockImplementation(); + + // Act + logger.refreshSampleRateCalculation(); + logger.info('foo'); + + // Assess + expect(consoleSpy).toBeCalledTimes(1); + expect(consoleSpy).toHaveBeenNthCalledWith( + 1, + JSON.stringify({ + level: 'INFO', + message: 'foo', + sampling_rate: 1, + service: 'hello-world', + timestamp: '2016-06-20T12:08:10.000Z', + xray_trace_id: '1-5759e988-bd862e3fe1be46a994272793', + }) + ); + }); + + test('when sample rate calculation is refreshed, it respects probability sampling and change log level to DEBUG ', () => { + // Prepare + const logger = new Logger({ + logLevel: 'ERROR', + sampleRateValue: 0.1, // 10% probability + }); + + // suppress "Setting log level to DEBUG due to sampling rate" log messages + jest.spyOn(logger['console'], 'debug').mockImplementation(); + + let logLevelChangedToDebug = 0; + const numOfIterations = 1000; + const minExpected = numOfIterations * 0.05; // Min expected based on 5% probability + const maxExpected = numOfIterations * 0.15; // Max expected based on 15% probability + + // Act + for (let i = 0; i < numOfIterations; i++) { + logger.refreshSampleRateCalculation(); + if (logger.getLevelName() === 'DEBUG') { + logLevelChangedToDebug++; + logger.setLogLevel('ERROR'); + } + } + + // Assess + expect(logLevelChangedToDebug).toBeGreaterThanOrEqual(minExpected); + expect(logLevelChangedToDebug).toBeLessThanOrEqual(maxExpected); + }); + }); + }); }); diff --git a/packages/logger/tests/unit/middleware/middy.test.ts b/packages/logger/tests/unit/middleware/middy.test.ts index cea1597f8e..a37fc5e816 100644 --- a/packages/logger/tests/unit/middleware/middy.test.ts +++ b/packages/logger/tests/unit/middleware/middy.test.ts @@ -52,10 +52,9 @@ describe('Middy middleware', () => { // Assess expect(logger).toEqual( expect.objectContaining({ - logsSampled: false, persistentLogAttributes: {}, powertoolLogData: { - sampleRateValue: undefined, + sampleRateValue: 0, awsRegion: 'eu-west-1', environment: '', lambdaContext: { @@ -91,10 +90,9 @@ describe('Middy middleware', () => { // Assess const expectation = expect.objectContaining({ - logsSampled: false, persistentLogAttributes: {}, powertoolLogData: { - sampleRateValue: undefined, + sampleRateValue: 0, awsRegion: 'eu-west-1', environment: '', lambdaContext: { @@ -280,6 +278,7 @@ describe('Middy middleware', () => { function_request_id: 'c6af9ac6-7b61-11e6-9a41-93e812345678', level: 'INFO', message: 'Lambda invocation event', + sampling_rate: 0, service: 'hello-world', timestamp: '2016-06-20T12:08:10.000Z', xray_trace_id: '1-5759e988-bd862e3fe1be46a994272793', @@ -346,6 +345,7 @@ describe('Middy middleware', () => { function_request_id: 'c6af9ac6-7b61-11e6-9a41-93e812345678', level: 'INFO', message: 'Lambda invocation event', + sampling_rate: 0, service: 'my-backend-service', timestamp: '2016-06-20T12:08:10.000Z', xray_trace_id: '1-5759e988-bd862e3fe1be46a994272793', @@ -384,6 +384,7 @@ describe('Middy middleware', () => { function_request_id: 'c6af9ac6-7b61-11e6-9a41-93e812345678', level: 'INFO', message: 'Lambda invocation event', + sampling_rate: 0, service: 'hello-world', timestamp: '2016-06-20T12:08:10.000Z', xray_trace_id: '1-5759e988-bd862e3fe1be46a994272793', @@ -422,6 +423,7 @@ describe('Middy middleware', () => { function_request_id: 'c6af9ac6-7b61-11e6-9a41-93e812345678', level: 'INFO', message: 'This is an INFO log', + sampling_rate: 0, service: 'hello-world', timestamp: '2016-06-20T12:08:10.000Z', xray_trace_id: '1-5759e988-bd862e3fe1be46a994272793', diff --git a/packages/testing/src/TestInvocationLogs.ts b/packages/testing/src/TestInvocationLogs.ts index 8c37d73a56..0581e0d927 100644 --- a/packages/testing/src/TestInvocationLogs.ts +++ b/packages/testing/src/TestInvocationLogs.ts @@ -1,6 +1,14 @@ import { LogLevel } from './constants.js'; import type { FunctionLog } from './types.js'; +const CloudWatchLogKeywords = { + END: 'END RequestId', + INIT_START: 'INIT_START', + REPORT: 'REPORT RequestId', + START: 'START RequestId', + XRAY: 'XRAY TraceId', +} as const; + class TestInvocationLogs { public static LEVEL = LogLevel; @@ -51,25 +59,26 @@ class TestInvocationLogs { } /** - * Return the index of the log that contains END RequestId + * Return the index of the log that contains `END RequestId` * @param logs * @returns {number} index of the log that contains END RequestId */ public static getEndLogIndex(logs: string[]): number { - return logs.findIndex((log) => log.startsWith('END RequestId')); + return logs.findIndex((log) => log.startsWith(CloudWatchLogKeywords.END)); } /** - * Return only logs from function, exclude START, END, REPORT, + * Return only logs from function, exclude INIT_START, START, END, REPORT, * and X-Ray log generated by the Lambda service. * * @param {typeof LogLevel} [levelToFilter] - Level to filter the logs * @returns Array of function logs, filtered by level if provided */ public getFunctionLogs(levelToFilter?: keyof typeof LogLevel): string[] { - const startLogIndex = TestInvocationLogs.getStartLogIndex(this.logs); - const endLogIndex = TestInvocationLogs.getEndLogIndex(this.logs); - let filteredLogs = this.logs.slice(startLogIndex + 1, endLogIndex); + const exclusionKeywords = Object.values(CloudWatchLogKeywords); + let filteredLogs = this.logs.filter( + (log) => !exclusionKeywords.some((keyword) => log.startsWith(keyword)) + ); if (levelToFilter) { filteredLogs = filteredLogs.filter((log) => { @@ -89,8 +98,44 @@ class TestInvocationLogs { return filteredLogs; } + /** + * Return the index of the log that contains `INIT_START` + * @param logs + * @returns {number} index of the log that contains `INIT_START` + */ + public static getInitLogIndex(logs: string[]): number { + return logs.findIndex((log) => + log.startsWith(CloudWatchLogKeywords.INIT_START) + ); + } + + /** + * Return the index of the log that contains `REPORT RequestId` + * @param logs + * @returns {number} index of the log that contains `REPORT RequestId` + */ + public static getReportLogIndex(logs: string[]): number { + return logs.findIndex((log) => + log.startsWith(CloudWatchLogKeywords.REPORT) + ); + } + + /** + * Return the index of the log that contains `START RequestId` + * @param logs + * @returns {number} index of the log that contains `START RequestId` + */ public static getStartLogIndex(logs: string[]): number { - return logs.findIndex((log) => log.startsWith('START RequestId')); + return logs.findIndex((log) => log.startsWith(CloudWatchLogKeywords.START)); + } + + /** + * Return the index of the log that contains `XRAY TraceId` + * @param logs + * @returns {number} index of the log that contains `XRAY TraceId` + */ + public static getXRayLogIndex(logs: string[]): number { + return logs.findIndex((log) => log.startsWith(CloudWatchLogKeywords.XRAY)); } /** From 13b1d13a698e0d7a7085ef136acddc0846f13c3f Mon Sep 17 00:00:00 2001 From: Andrea Amorosi Date: Sat, 21 Oct 2023 00:12:24 +0200 Subject: [PATCH 36/60] chore(logger): refactor types and interfaces (#1758) * chore(logger): refactor types and interfaces * chore: grouped type files * chore: fix code smell * chore: fix ci * chore: fix ci --- package-lock.json | 6 +- packages/logger/src/Logger.ts | 181 +++--- .../src/config/EnvironmentVariablesService.ts | 2 +- packages/logger/src/constants.ts | 17 + packages/logger/src/formatter/LogFormatter.ts | 31 +- .../src/formatter/LogFormatterInterface.ts | 30 - .../logger/src/{log => formatter}/LogItem.ts | 7 +- .../src/formatter/PowertoolsLogFormatter.ts | 11 +- packages/logger/src/index.ts | 2 +- packages/logger/src/log/LogItemInterface.ts | 9 - packages/logger/src/middleware/middy.ts | 6 +- .../ConfigServiceInterface.ts | 0 packages/logger/src/types/Log.ts | 137 ++++ packages/logger/src/types/Logger.ts | 86 +-- .../logger/src/types/formats/PowertoolsLog.ts | 93 --- packages/logger/src/types/formats/index.ts | 1 - packages/logger/src/types/index.ts | 6 +- .../tests/e2e/sampleRate.decorator.test.ts | 11 +- .../EnvironmentVariablesService.test.ts | 4 +- packages/logger/tests/unit/Logger.test.ts | 604 ++++++++---------- .../formatter/PowertoolsLogFormatter.test.ts | 14 +- .../tests/unit/middleware/middy.test.ts | 52 +- packages/tracer/tests/unit/Tracer.test.ts | 2 +- tsconfig.json | 2 +- 24 files changed, 610 insertions(+), 704 deletions(-) create mode 100644 packages/logger/src/constants.ts delete mode 100644 packages/logger/src/formatter/LogFormatterInterface.ts rename packages/logger/src/{log => formatter}/LogItem.ts (84%) delete mode 100644 packages/logger/src/log/LogItemInterface.ts rename packages/logger/src/{config => types}/ConfigServiceInterface.ts (100%) delete mode 100644 packages/logger/src/types/formats/PowertoolsLog.ts delete mode 100644 packages/logger/src/types/formats/index.ts rename packages/logger/tests/unit/{config => }/EnvironmentVariablesService.test.ts (97%) diff --git a/package-lock.json b/package-lock.json index eefa6cdd40..df69291ea2 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1801,9 +1801,9 @@ } }, "node_modules/@babel/traverse": { - "version": "7.23.0", - "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.23.0.tgz", - "integrity": "sha512-t/QaEvyIoIkwzpiZ7aoSKK8kObQYeF7T2v+dazAYCb8SXtp58zEVkWW7zAnju8FNKNdr4ScAOEDmMItbyOmEYw==", + "version": "7.23.2", + "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.23.2.tgz", + "integrity": "sha512-azpe59SQ48qG6nu2CzcMLbxUudtN+dOM9kDbUqGq3HXUJRlo7i8fvPoxQUzYgLZ4cMVmuZgm8vvBpNeRhd6XSw==", "dev": true, "dependencies": { "@babel/code-frame": "^7.22.13", diff --git a/packages/logger/src/Logger.ts b/packages/logger/src/Logger.ts index 5810a7b2d5..f0d0e8b59d 100644 --- a/packages/logger/src/Logger.ts +++ b/packages/logger/src/Logger.ts @@ -1,30 +1,31 @@ -import { randomInt } from 'node:crypto'; -import { Console } from 'node:console'; -import type { Context, Handler } from 'aws-lambda'; import { Utility } from '@aws-lambda-powertools/commons'; -import { PowertoolsLogFormatter } from './formatter/PowertoolsLogFormatter.js'; -import { LogFormatterInterface } from './formatter/LogFormatterInterface.js'; -import { LogItem } from './log/LogItem.js'; +import type { HandlerMethodDecorator } from '@aws-lambda-powertools/commons/types'; +import type { Context, Handler } from 'aws-lambda'; import merge from 'lodash.merge'; -import { ConfigServiceInterface } from './config/ConfigServiceInterface.js'; +import { Console } from 'node:console'; +import { randomInt } from 'node:crypto'; import { EnvironmentVariablesService } from './config/EnvironmentVariablesService.js'; -import { LogJsonIndent } from './types/Logger.js'; +import { LogJsonIndent } from './constants.js'; +import { LogItem } from './formatter/LogItem.js'; +import { PowertoolsLogFormatter } from './formatter/PowertoolsLogFormatter.js'; +import type { ConfigServiceInterface } from './types/ConfigServiceInterface.js'; import type { Environment, LogAttributes, LogLevel, LogLevelThresholds, + LogFormatterInterface, } from './types/Log.js'; import type { - ClassThatLogs, - HandlerMethodDecorator, - LambdaFunctionContext, + LogFunction, ConstructorOptions, + InjectLambdaContextOptions, LogItemExtraInput, LogItemMessage, - PowertoolLogData, - HandlerOptions, + LoggerInterface, + PowertoolsLogData, } from './types/Logger.js'; + /** * ## Intro * The Logger utility provides an opinionated logger with output structured as JSON. @@ -111,7 +112,7 @@ import type { * @implements {ClassThatLogs} * @see https://docs.powertools.aws.dev/lambda-typescript/latest/core/logger/ */ -class Logger extends Utility implements ClassThatLogs { +class Logger extends Utility implements LoggerInterface { /** * Console instance used to print logs. * @@ -155,9 +156,9 @@ class Logger extends Utility implements ClassThatLogs { SILENT: 28, }; - private persistentLogAttributes?: LogAttributes = {}; + private persistentLogAttributes: LogAttributes = {}; - private powertoolLogData: PowertoolLogData = {}; + private powertoolsLogData: PowertoolsLogData = {}; /** * Log level used by the current instance of Logger. @@ -187,17 +188,15 @@ class Logger extends Utility implements ClassThatLogs { * @returns {void} */ public addContext(context: Context): void { - const lambdaContext: Partial = { - invokedFunctionArn: context.invokedFunctionArn, - coldStart: this.getColdStart(), - awsRequestId: context.awsRequestId, - memoryLimitInMB: Number(context.memoryLimitInMB), - functionName: context.functionName, - functionVersion: context.functionVersion, - }; - - this.addToPowertoolLogData({ - lambdaContext, + this.addToPowertoolsLogData({ + lambdaContext: { + invokedFunctionArn: context.invokedFunctionArn, + coldStart: this.getColdStart(), + awsRequestId: context.awsRequestId, + memoryLimitInMB: context.memoryLimitInMB, + functionName: context.functionName, + functionVersion: context.functionVersion, + }, }); } @@ -229,23 +228,27 @@ class Logger extends Utility implements ClassThatLogs { * @returns {Logger} */ public createChild(options: ConstructorOptions = {}): Logger { - const parentsOptions = { - logLevel: this.getLevelName(), - customConfigService: this.getCustomConfigService(), - logFormatter: this.getLogFormatter(), - sampleRateValue: this.powertoolLogData.sampleRateValue, - }; - const parentsPowertoolsLogData = this.getPowertoolLogData(); const childLogger = this.createLogger( - merge(parentsOptions, parentsPowertoolsLogData, options) + // Merge parent logger options with options passed to createChild, + // the latter having precedence. + merge( + {}, + { + logLevel: this.getLevelName(), + serviceName: this.powertoolsLogData.serviceName, + sampleRateValue: this.powertoolsLogData.sampleRateValue, + logFormatter: this.getLogFormatter(), + customConfigService: this.getCustomConfigService(), + environment: this.powertoolsLogData.environment, + persistentLogAttributes: this.persistentLogAttributes, + }, + options + ) ); - - const parentsPersistentLogAttributes = this.getPersistentLogAttributes(); - childLogger.addPersistentLogAttributes(parentsPersistentLogAttributes); - - if (parentsPowertoolsLogData.lambdaContext) { - childLogger.addContext(parentsPowertoolsLogData.lambdaContext as Context); - } + if (this.powertoolsLogData.lambdaContext) + childLogger.addContext( + this.powertoolsLogData.lambdaContext as unknown as Context + ); return childLogger; } @@ -315,7 +318,7 @@ class Logger extends Utility implements ClassThatLogs { * @returns {LogAttributes} */ public getPersistentLogAttributes(): LogAttributes { - return this.persistentLogAttributes as LogAttributes; + return this.persistentLogAttributes; } /** @@ -361,7 +364,9 @@ class Logger extends Utility implements ClassThatLogs { * @see https://www.typescriptlang.org/docs/handbook/decorators.html#method-decorators * @returns {HandlerMethodDecorator} */ - public injectLambdaContext(options?: HandlerOptions): HandlerMethodDecorator { + public injectLambdaContext( + options?: InjectLambdaContextOptions + ): HandlerMethodDecorator { return (_target, _propertyKey, descriptor) => { /** * The descriptor.value is the method this decorator decorates, it cannot be undefined. @@ -409,7 +414,7 @@ class Logger extends Utility implements ClassThatLogs { public static injectLambdaContextAfterOrOnError( logger: Logger, initialPersistentAttributes: LogAttributes, - options?: HandlerOptions + options?: InjectLambdaContextOptions ): void { if (options && options.clearState === true) { logger.setPersistentLogAttributes(initialPersistentAttributes); @@ -420,13 +425,13 @@ class Logger extends Utility implements ClassThatLogs { logger: Logger, event: unknown, context: Context, - options?: HandlerOptions + options?: InjectLambdaContextOptions ): void { logger.addContext(context); let shouldLogEvent = undefined; - if (options && options.hasOwnProperty('logEvent')) { - shouldLogEvent = options.logEvent; + if (Object.hasOwn(options || {}, 'logEvent')) { + shouldLogEvent = options!.logEvent; } logger.logEventIfEnabled(event, shouldLogEvent); } @@ -439,9 +444,7 @@ class Logger extends Utility implements ClassThatLogs { * @returns {void} */ public logEventIfEnabled(event: unknown, overwriteValue?: boolean): void { - if (!this.shouldLogEvent(overwriteValue)) { - return; - } + if (!this.shouldLogEvent(overwriteValue)) return; this.info('Lambda invocation event', { event }); } @@ -453,7 +456,7 @@ class Logger extends Utility implements ClassThatLogs { * @returns {void} */ public refreshSampleRateCalculation(): void { - this.setInitialSampleRate(this.powertoolLogData.sampleRateValue); + this.setInitialSampleRate(this.powertoolsLogData.sampleRateValue); } /** @@ -473,11 +476,11 @@ class Logger extends Utility implements ClassThatLogs { * @returns {void} */ public removePersistentLogAttributes(keys: string[]): void { - keys.forEach((key) => { - if (this.persistentLogAttributes && key in this.persistentLogAttributes) { + for (const key of keys) { + if (Object.hasOwn(this.persistentLogAttributes, key)) { delete this.persistentLogAttributes[key]; } - }); + } } /** @@ -559,16 +562,12 @@ class Logger extends Utility implements ClassThatLogs { /** * It stores information that is printed in all log items. * - * @param {Partial} attributesArray + * @param {Partial} attributes * @private * @returns {void} */ - private addToPowertoolLogData( - ...attributesArray: Array> - ): void { - attributesArray.forEach((attributes: Partial) => { - merge(this.powertoolLogData, attributes); - }); + private addToPowertoolsLogData(attributes: Partial): void { + merge(this.powertoolsLogData, attributes); } /** @@ -595,7 +594,7 @@ class Logger extends Utility implements ClassThatLogs { message: typeof input === 'string' ? input : input.message, xRayTraceId: this.envVarsService.getXrayTraceId(), }, - this.getPowertoolLogData() + this.getPowertoolsLogData() ); let additionalLogAttributes: LogAttributes = {}; @@ -665,15 +664,15 @@ class Logger extends Utility implements ClassThatLogs { * @returns - The name of the log level */ private getLogLevelNameFromNumber(logLevel: number): Uppercase { - const found = Object.entries(this.logLevelThresholds).find( - ([key, value]) => { - if (value === logLevel) { - return key; - } + let found; + for (const [key, value] of Object.entries(this.logLevelThresholds)) { + if (value === logLevel) { + found = key; + break; } - )!; + } - return found[0] as Uppercase; + return found as Uppercase; } /** @@ -683,8 +682,8 @@ class Logger extends Utility implements ClassThatLogs { * @private * @returns {LogAttributes} */ - private getPowertoolLogData(): PowertoolLogData { - return this.powertoolLogData; + private getPowertoolsLogData(): PowertoolsLogData { + return this.powertoolsLogData; } /** @@ -765,7 +764,7 @@ class Logger extends Utility implements ClassThatLogs { logLevel === 24 ? 'error' : (this.getLogLevelNameFromNumber(logLevel).toLowerCase() as keyof Omit< - ClassThatLogs, + LogFunction, 'critical' >); @@ -890,14 +889,14 @@ class Logger extends Utility implements ClassThatLogs { * @returns {void} */ private setInitialSampleRate(sampleRateValue?: number): void { - this.powertoolLogData.sampleRateValue = 0; + this.powertoolsLogData.sampleRateValue = 0; const constructorValue = sampleRateValue; const customConfigValue = this.getCustomConfigService()?.getSampleRateValue(); const envVarsValue = this.getEnvVarsService().getSampleRateValue(); for (const value of [constructorValue, customConfigValue, envVarsValue]) { if (this.isValidSampleRate(value)) { - this.powertoolLogData.sampleRateValue = value; + this.powertoolsLogData.sampleRateValue = value; if (value && randomInt(0, 100) / 100 <= value) { this.setLogLevel('DEBUG'); @@ -972,7 +971,7 @@ class Logger extends Utility implements ClassThatLogs { this.setCustomConfigService(customConfigService); this.setInitialLogLevel(logLevel); this.setLogFormatter(logFormatter); - this.setPowertoolLogData(serviceName, environment); + this.setPowertoolsLogData(serviceName, environment); this.setInitialSampleRate(sampleRateValue); this.setLogEvent(); this.setLogIndentation(); @@ -991,26 +990,24 @@ class Logger extends Utility implements ClassThatLogs { * @private * @returns {void} */ - private setPowertoolLogData( + private setPowertoolsLogData( serviceName?: string, environment?: Environment, persistentLogAttributes: LogAttributes = {} ): void { - this.addToPowertoolLogData( - { - awsRegion: this.getEnvVarsService().getAwsRegion(), - environment: - environment || - this.getCustomConfigService()?.getCurrentEnvironment() || - this.getEnvVarsService().getCurrentEnvironment(), - serviceName: - serviceName || - this.getCustomConfigService()?.getServiceName() || - this.getEnvVarsService().getServiceName() || - this.getDefaultServiceName(), - }, - persistentLogAttributes - ); + this.addToPowertoolsLogData({ + awsRegion: this.getEnvVarsService().getAwsRegion(), + environment: + environment || + this.getCustomConfigService()?.getCurrentEnvironment() || + this.getEnvVarsService().getCurrentEnvironment(), + serviceName: + serviceName || + this.getCustomConfigService()?.getServiceName() || + this.getEnvVarsService().getServiceName() || + this.getDefaultServiceName(), + }); + this.addPersistentLogAttributes(persistentLogAttributes); } } diff --git a/packages/logger/src/config/EnvironmentVariablesService.ts b/packages/logger/src/config/EnvironmentVariablesService.ts index a9c0786eb6..9627b2c018 100644 --- a/packages/logger/src/config/EnvironmentVariablesService.ts +++ b/packages/logger/src/config/EnvironmentVariablesService.ts @@ -1,4 +1,4 @@ -import { ConfigServiceInterface } from './ConfigServiceInterface.js'; +import { ConfigServiceInterface } from '../types/ConfigServiceInterface.js'; import { EnvironmentVariablesService as CommonEnvironmentVariablesService } from '@aws-lambda-powertools/commons'; /** diff --git a/packages/logger/src/constants.ts b/packages/logger/src/constants.ts new file mode 100644 index 0000000000..90a26baa24 --- /dev/null +++ b/packages/logger/src/constants.ts @@ -0,0 +1,17 @@ +/** + * The indent level for JSON logs. + * + * By default Logger will use the `LogJsonIndent.COMPACT` indent level, which + * produces logs on a single line. This is the most efficient option for + * CloudWatch Logs. + * + * When enabling the `POWERTOOLS_DEV` environment variable, Logger will use the + * `LogJsonIndent.PRETTY` indent level, which indents the JSON logs for easier + * reading. + */ +const LogJsonIndent = { + PRETTY: 4, + COMPACT: 0, +} as const; + +export { LogJsonIndent }; diff --git a/packages/logger/src/formatter/LogFormatter.ts b/packages/logger/src/formatter/LogFormatter.ts index ccdf8b67b3..478e04152f 100644 --- a/packages/logger/src/formatter/LogFormatter.ts +++ b/packages/logger/src/formatter/LogFormatter.ts @@ -1,24 +1,6 @@ -import { LogFormatterInterface } from './LogFormatterInterface.js'; -import { LogAttributes } from '../types/Log.js'; -import { UnformattedAttributes } from '../types/Logger.js'; -import { LogItem } from '../log/LogItem.js'; - -/** - * Typeguard to monkey patch Error to add a cause property. - * - * This is needed because the `cause` property was added in Node 16.x. - * Since we want to be able to format errors in Node 14.x, we need to - * add this property ourselves. We can remove this once we drop support - * for Node 14.x. - * - * @see 1361 - * @see https://nodejs.org/api/errors.html#errors_error_cause - */ -const isErrorWithCause = ( - error: Error -): error is Error & { cause: unknown } => { - return 'cause' in error; -}; +import type { LogAttributes, LogFormatterInterface } from '../types/Log.js'; +import type { UnformattedAttributes } from '../types/Logger.js'; +import { LogItem } from './LogItem.js'; /** * This class defines and implements common methods for the formatting of log attributes. @@ -52,11 +34,10 @@ abstract class LogFormatter implements LogFormatterInterface { location: this.getCodeLocation(error.stack), message: error.message, stack: error.stack, - cause: isErrorWithCause(error) - ? error.cause instanceof Error + cause: + error.cause instanceof Error ? this.formatError(error.cause) - : error.cause - : undefined, + : error.cause, }; } diff --git a/packages/logger/src/formatter/LogFormatterInterface.ts b/packages/logger/src/formatter/LogFormatterInterface.ts deleted file mode 100644 index 49d35154c3..0000000000 --- a/packages/logger/src/formatter/LogFormatterInterface.ts +++ /dev/null @@ -1,30 +0,0 @@ -import { LogAttributes } from '../types/Log.js'; -import { UnformattedAttributes } from '../types/Logger.js'; -import { LogItem } from '../log/LogItem.js'; - -/** - * @interface - */ -interface LogFormatterInterface { - /** - * It formats key-value pairs of log attributes. - * - * @param {UnformattedAttributes} attributes - * @param {LogAttributes} additionalLogAttributes - * @returns {LogItem} - */ - formatAttributes( - attributes: UnformattedAttributes, - additionalLogAttributes: LogAttributes - ): LogItem; - - /** - * It formats a given Error parameter. - * - * @param {Error} error - * @returns {LogAttributes} - */ - formatError(error: Error): LogAttributes; -} - -export { LogFormatterInterface }; diff --git a/packages/logger/src/log/LogItem.ts b/packages/logger/src/formatter/LogItem.ts similarity index 84% rename from packages/logger/src/log/LogItem.ts rename to packages/logger/src/formatter/LogItem.ts index 4183017b4f..7ddacc61f8 100644 --- a/packages/logger/src/log/LogItem.ts +++ b/packages/logger/src/formatter/LogItem.ts @@ -1,6 +1,5 @@ import merge from 'lodash.merge'; -import { LogItemInterface } from './LogItemInterface.js'; -import { LogAttributes } from '../types/Log.js'; +import type { LogAttributes, LogItemInterface } from '../types/Log.js'; class LogItem implements LogItemInterface { private attributes: LogAttributes = {}; @@ -13,8 +12,8 @@ class LogItem implements LogItemInterface { this.addAttributes(params.attributes); } - public addAttributes(attributes: LogAttributes): LogItem { - this.attributes = merge(this.attributes, attributes); + public addAttributes(attributes: LogAttributes): this { + merge(this.attributes, attributes); return this; } diff --git a/packages/logger/src/formatter/PowertoolsLogFormatter.ts b/packages/logger/src/formatter/PowertoolsLogFormatter.ts index f88630bf2a..80c0406bbb 100644 --- a/packages/logger/src/formatter/PowertoolsLogFormatter.ts +++ b/packages/logger/src/formatter/PowertoolsLogFormatter.ts @@ -1,12 +1,11 @@ +import type { LogAttributes, PowertoolsLog } from '../types/Log.js'; +import type { UnformattedAttributes } from '../types/Logger.js'; import { LogFormatter } from './LogFormatter.js'; -import { LogAttributes } from '../types/Log.js'; -import { UnformattedAttributes } from '../types/Logger.js'; -import { PowertoolsLog } from '../types/formats/PowertoolsLog.js'; -import { LogItem } from '../log/LogItem.js'; +import { LogItem } from './LogItem.js'; /** * This class is used to transform a set of log key-value pairs - * in the AWS Lambda Powertools' default structure log format. + * in the Powertools for AWS Lambda default structure log format. * * @class * @extends {LogFormatter} @@ -36,9 +35,7 @@ class PowertoolsLogFormatter extends LogFormatter { timestamp: this.formatTimestamp(attributes.timestamp), xray_trace_id: attributes.xRayTraceId, }; - const powertoolsLogItem = new LogItem({ attributes: baseAttributes }); - powertoolsLogItem.addAttributes(additionalLogAttributes); return powertoolsLogItem; diff --git a/packages/logger/src/index.ts b/packages/logger/src/index.ts index 096d26bb30..1fe46bcf9b 100644 --- a/packages/logger/src/index.ts +++ b/packages/logger/src/index.ts @@ -1,3 +1,3 @@ export { Logger } from './Logger.js'; export { LogFormatter } from './formatter/LogFormatter.js'; -export { LogItem } from './log/LogItem.js'; +export { LogItem } from './formatter/LogItem.js'; diff --git a/packages/logger/src/log/LogItemInterface.ts b/packages/logger/src/log/LogItemInterface.ts deleted file mode 100644 index ed0c89bb0b..0000000000 --- a/packages/logger/src/log/LogItemInterface.ts +++ /dev/null @@ -1,9 +0,0 @@ -import { LogAttributes } from '../types/Log.js'; - -interface LogItemInterface { - addAttributes(attributes: LogAttributes): void; - - getAttributes(): LogAttributes; -} - -export { LogItemInterface }; diff --git a/packages/logger/src/middleware/middy.ts b/packages/logger/src/middleware/middy.ts index 7d8b3099da..d40be85cd2 100644 --- a/packages/logger/src/middleware/middy.ts +++ b/packages/logger/src/middleware/middy.ts @@ -1,6 +1,6 @@ import { Logger } from '../Logger.js'; -import { LogAttributes } from '../types/Log.js'; -import { HandlerOptions } from '../types/Logger.js'; +import type { LogAttributes } from '../types/Log.js'; +import type { InjectLambdaContextOptions } from '../types/Logger.js'; import { LOGGER_KEY } from '@aws-lambda-powertools/commons'; import type { MiddlewareLikeObj, @@ -33,7 +33,7 @@ import type { */ const injectLambdaContext = ( target: Logger | Logger[], - options?: HandlerOptions + options?: InjectLambdaContextOptions ): MiddlewareLikeObj => { const loggers = target instanceof Array ? target : [target]; const persistentAttributes: LogAttributes[] = []; diff --git a/packages/logger/src/config/ConfigServiceInterface.ts b/packages/logger/src/types/ConfigServiceInterface.ts similarity index 100% rename from packages/logger/src/config/ConfigServiceInterface.ts rename to packages/logger/src/types/ConfigServiceInterface.ts diff --git a/packages/logger/src/types/Log.ts b/packages/logger/src/types/Log.ts index 931ef10027..dd15a69f72 100644 --- a/packages/logger/src/types/Log.ts +++ b/packages/logger/src/types/Log.ts @@ -1,3 +1,6 @@ +import type { LogItem } from '../formatter/LogItem.js'; +import type { UnformattedAttributes } from './Logger.js'; + type LogLevelDebug = 'DEBUG'; type LogLevelInfo = 'INFO'; type LogLevelWarn = 'WARN'; @@ -32,6 +35,137 @@ type LogAttributesWithMessage = LogAttributes & { type Environment = 'dev' | 'local' | 'staging' | 'prod' | string; +type PowertoolsLog = LogAttributes & { + /** + * Timestamp of actual log statement. + * + * @example "2020-05-24 18:17:33,774" + */ + timestamp?: string; + + /** + * Log level + * + * @example "INFO" + */ + level?: LogLevel; + + /** + * Service name defined. + * + * @example "payment" + */ + service: string; + + /** + * The value of the logging sampling rate in percentage. + * + * @example 0.1 + */ + sampling_rate?: number; + + /** + * Log statement value. Unserializable JSON values will be cast to string. + * + * @example "Collecting payment" + */ + message?: string; + + /** + * X-Ray Trace ID set by the Lambda runtime. + * + * @example "1-5759e988-bd862e3fe1be46a994272793" + */ + xray_trace_id?: string; + + /** + * Indicates whether the current execution experienced a cold start. + * + * @example false + */ + cold_start?: boolean; + + /** + * The name of the Lambda function. + * + * @example "example-powertools-HelloWorldFunction-1P1Z6B39FLU73" + */ + lambda_function_name?: string; + + /** + * The memory size of the Lambda function. + * + * Description: + * Example: 128 + */ + lambda_function_memory_size?: number; + + /** + * lambda_function_arn + * + * Description: The ARN of the Lambda function. + * Example: "arn:aws:lambda:eu-west-1:012345678910:function:example-powertools-HelloWorldFunction-1P1Z6B39FLU73" + */ + lambda_function_arn?: string; + + /** + * lambda_request_id + * + * Description: The request ID of the current invocation. + * Example: "899856cb-83d1-40d7-8611-9e78f15f32f4" + */ + lambda_request_id?: string; +}; + +interface LogItemInterface { + addAttributes(attributes: LogAttributes): void; + getAttributes(): LogAttributes; + prepareForPrint(): void; + removeEmptyKeys(attributes: LogAttributes): LogAttributes; + setAttributes(attributes: LogAttributes): void; +} + +/** + * @interface + */ +interface LogFormatterInterface { + /** + * It formats key-value pairs of log attributes. + * + * @param {UnformattedAttributes} attributes + * @param {LogAttributes} additionalLogAttributes + * @returns {LogItem} + */ + formatAttributes( + attributes: UnformattedAttributes, + additionalLogAttributes: LogAttributes + ): LogItem; + + /** + * It formats a given Error parameter. + * + * @param {Error} error + * @returns {LogAttributes} + */ + formatError(error: Error): LogAttributes; + + /** + * It formats a date into a string in simplified extended ISO format (ISO 8601). + * + * @param {Date} now + * @returns {string} + */ + formatTimestamp(now: Date): string; + + /** + * It returns a string containing the location of an error, given a particular stack trace. + * + * @param stack + * @returns {string} + */ + getCodeLocation(stack?: string): string; +} + export type { LogAttributesWithMessage, LogAttributeValue, @@ -39,4 +173,7 @@ export type { LogLevelThresholds, LogAttributes, LogLevel, + PowertoolsLog, + LogItemInterface, + LogFormatterInterface, }; diff --git a/packages/logger/src/types/Logger.ts b/packages/logger/src/types/Logger.ts index c937d66542..67d22a2963 100644 --- a/packages/logger/src/types/Logger.ts +++ b/packages/logger/src/types/Logger.ts @@ -1,26 +1,22 @@ +import type { HandlerMethodDecorator } from '@aws-lambda-powertools/commons/types'; +import type { ConfigServiceInterface } from './ConfigServiceInterface.js'; import type { - AsyncHandler, - LambdaInterface, - SyncHandler, -} from '@aws-lambda-powertools/commons/types'; -import { Handler } from 'aws-lambda'; -import { ConfigServiceInterface } from '../config/ConfigServiceInterface.js'; -import { LogFormatterInterface } from '../formatter/LogFormatterInterface.js'; -import { Environment, LogAttributes, LogAttributesWithMessage, LogLevel, + LogFormatterInterface, } from './Log.js'; +import type { Context } from 'aws-lambda'; -type ClassThatLogs = { +type LogFunction = { [key in Exclude, 'silent'>]: ( input: LogItemMessage, ...extraInput: LogItemExtraInput ) => void; }; -type HandlerOptions = { +type InjectLambdaContextOptions = { logEvent?: boolean; clearState?: boolean; }; @@ -35,32 +31,28 @@ type ConstructorOptions = { environment?: Environment; }; -type LambdaFunctionContext = { - functionName: string; - memoryLimitInMB: number; - functionVersion: string; +type LambdaFunctionContext = Pick< + Context, + | 'functionName' + | 'memoryLimitInMB' + | 'functionVersion' + | 'invokedFunctionArn' + | 'awsRequestId' +> & { coldStart: boolean; - invokedFunctionArn: string; - awsRequestId: string; }; -type PowertoolLogData = LogAttributes & { +type PowertoolsLogData = LogAttributes & { environment?: Environment; serviceName: string; sampleRateValue: number; - lambdaFunctionContext: LambdaFunctionContext; + lambdaContext?: LambdaFunctionContext; xRayTraceId?: string; awsRegion: string; }; -type UnformattedAttributes = { - environment?: Environment; +type UnformattedAttributes = PowertoolsLogData & { error?: Error; - serviceName: string; - sampleRateValue?: number; - lambdaContext?: LambdaFunctionContext; - xRayTraceId?: string; - awsRegion: string; logLevel: LogLevel; timestamp: Date; message: string; @@ -69,27 +61,39 @@ type UnformattedAttributes = { type LogItemMessage = string | LogAttributesWithMessage; type LogItemExtraInput = [Error | string] | LogAttributes[]; -type HandlerMethodDecorator = ( - target: LambdaInterface, - propertyKey: string | symbol, - descriptor: - | TypedPropertyDescriptor> - | TypedPropertyDescriptor> -) => void; +type LoggerInterface = { + addContext(context: Context): void; + addPersistentLogAttributes(attributes?: LogAttributes): void; + appendKeys(attributes?: LogAttributes): void; + createChild(options?: ConstructorOptions): LoggerInterface; + critical(input: LogItemMessage, ...extraInput: LogItemExtraInput): void; + debug(input: LogItemMessage, ...extraInput: LogItemExtraInput): void; + error(input: LogItemMessage, ...extraInput: LogItemExtraInput): void; + getLevelName(): Uppercase; + getLogEvent(): boolean; + getPersistentLogAttributes(): LogAttributes; + info(input: LogItemMessage, ...extraInput: LogItemExtraInput): void; + injectLambdaContext( + options?: InjectLambdaContextOptions + ): HandlerMethodDecorator; + logEventIfEnabled(event: unknown, overwriteValue?: boolean): void; + refreshSampleRateCalculation(): void; + removeKeys(keys?: string[]): void; + removePersistentLogAttributes(keys?: string[]): void; + setLogLevel(logLevel: LogLevel): void; + setPersistentLogAttributes(attributes?: LogAttributes): void; + shouldLogEvent(overwriteValue?: boolean): boolean; + warn(input: LogItemMessage, ...extraInput: LogItemExtraInput): void; +}; export { - ClassThatLogs, + LogFunction, + LoggerInterface, LogItemMessage, LogItemExtraInput, - HandlerMethodDecorator, LambdaFunctionContext, UnformattedAttributes, - PowertoolLogData, + PowertoolsLogData, ConstructorOptions, - HandlerOptions, + InjectLambdaContextOptions, }; - -export const enum LogJsonIndent { - PRETTY = 4, - COMPACT = 0, -} diff --git a/packages/logger/src/types/formats/PowertoolsLog.ts b/packages/logger/src/types/formats/PowertoolsLog.ts deleted file mode 100644 index 9406a2a5fe..0000000000 --- a/packages/logger/src/types/formats/PowertoolsLog.ts +++ /dev/null @@ -1,93 +0,0 @@ -import type { LogAttributes, LogLevel } from '../Log.js'; - -type PowertoolsLog = LogAttributes & { - /** - * timestamp - * - * Description: Timestamp of actual log statement. - * Example: "2020-05-24 18:17:33,774" - */ - timestamp?: string; - - /** - * level - * - * Description: Logging level - * Example: "INFO" - */ - level?: LogLevel; - - /** - * service - * - * Description: Service name defined. - * Example: "payment" - */ - service: string; - - /** - * sampling_rate - * - * Description: The value of the logging sampling rate in percentage. - * Example: 0.1 - */ - sampling_rate?: number; - - /** - * message - * - * Description: Log statement value. Unserializable JSON values will be cast to string. - * Example: "Collecting payment" - */ - message?: string; - - /** - * xray_trace_id - * - * Description: X-Ray Trace ID when Lambda function has enabled Tracing. - * Example: "1-5759e988-bd862e3fe1be46a994272793" - */ - xray_trace_id?: string; - - /** - * cold_start - * - * Description: Indicates whether the current execution experienced a cold start. - * Example: false - */ - cold_start?: boolean; - - /** - * lambda_function_name - * - * Description: The name of the Lambda function. - * Example: "example-powertools-HelloWorldFunction-1P1Z6B39FLU73" - */ - lambda_function_name?: string; - - /** - * lambda_function_memory_size - * - * Description: The memory size of the Lambda function. - * Example: 128 - */ - lambda_function_memory_size?: number; - - /** - * lambda_function_arn - * - * Description: The ARN of the Lambda function. - * Example: "arn:aws:lambda:eu-west-1:012345678910:function:example-powertools-HelloWorldFunction-1P1Z6B39FLU73" - */ - lambda_function_arn?: string; - - /** - * lambda_request_id - * - * Description: The request ID of the current invocation. - * Example: "899856cb-83d1-40d7-8611-9e78f15f32f4" - */ - lambda_request_id?: string; -}; - -export type { PowertoolsLog }; diff --git a/packages/logger/src/types/formats/index.ts b/packages/logger/src/types/formats/index.ts deleted file mode 100644 index 03dabd2013..0000000000 --- a/packages/logger/src/types/formats/index.ts +++ /dev/null @@ -1 +0,0 @@ -export type { PowertoolsLog } from './PowertoolsLog.js'; diff --git a/packages/logger/src/types/index.ts b/packages/logger/src/types/index.ts index 9c01595ede..88f38933d1 100644 --- a/packages/logger/src/types/index.ts +++ b/packages/logger/src/types/index.ts @@ -8,13 +8,11 @@ export type { } from './Log.js'; export type { - ClassThatLogs, LogItemMessage, LogItemExtraInput, - HandlerMethodDecorator, LambdaFunctionContext, UnformattedAttributes, - PowertoolLogData, + PowertoolsLogData, ConstructorOptions, - HandlerOptions, + InjectLambdaContextOptions, } from './Logger.js'; diff --git a/packages/logger/tests/e2e/sampleRate.decorator.test.ts b/packages/logger/tests/e2e/sampleRate.decorator.test.ts index dfb60141ab..cf22722e7f 100644 --- a/packages/logger/tests/e2e/sampleRate.decorator.test.ts +++ b/packages/logger/tests/e2e/sampleRate.decorator.test.ts @@ -82,16 +82,17 @@ describe(`Logger E2E tests, sample rate and injectLambdaContext()`, () => { if (logMessages.length === 1 && logMessages[0].includes('ERROR')) { countNotSampled++; } else if ( - logMessages.length === 5 && - logMessages[0].includes( - 'Setting log level to DEBUG due to sampling rate' - ) + (logMessages.length === 5 && + logMessages[0].includes( + 'Setting log level to DEBUG due to sampling rate' + )) || + logMessages.length === 4 ) { countSampled++; } else { console.error(`Log group ${logGroupName} contains missing log`); throw new Error( - 'Sampled log should have either 1 error log or 4 logs of all levels' + 'Sampled log should have either 1 error log or 5 logs of all levels' ); } } diff --git a/packages/logger/tests/unit/config/EnvironmentVariablesService.test.ts b/packages/logger/tests/unit/EnvironmentVariablesService.test.ts similarity index 97% rename from packages/logger/tests/unit/config/EnvironmentVariablesService.test.ts rename to packages/logger/tests/unit/EnvironmentVariablesService.test.ts index 760f50cac9..8ac6924f00 100644 --- a/packages/logger/tests/unit/config/EnvironmentVariablesService.test.ts +++ b/packages/logger/tests/unit/EnvironmentVariablesService.test.ts @@ -1,9 +1,9 @@ /** * Test Logger EnvironmentVariablesService class * - * @group unit/logger/all + * @group unit/logger/config */ -import { EnvironmentVariablesService } from '../../../src/config/EnvironmentVariablesService.js'; +import { EnvironmentVariablesService } from '../../src/config/EnvironmentVariablesService.js'; describe('Class: EnvironmentVariablesService', () => { const ENVIRONMENT_VARIABLES = process.env; diff --git a/packages/logger/tests/unit/Logger.test.ts b/packages/logger/tests/unit/Logger.test.ts index c3ecc4729f..fe91a5ade1 100644 --- a/packages/logger/tests/unit/Logger.test.ts +++ b/packages/logger/tests/unit/Logger.test.ts @@ -1,31 +1,39 @@ /** * Test Logger class * - * @group unit/logger/all + * @group unit/logger/logger */ import context from '@aws-lambda-powertools/testing-utils/context'; import type { LambdaInterface } from '@aws-lambda-powertools/commons/types'; import { Logger, LogFormatter } from '../../src/index.js'; -import { ConfigServiceInterface } from '../../src/config/ConfigServiceInterface.js'; +import { ConfigServiceInterface } from '../../src/types/ConfigServiceInterface.js'; import { EnvironmentVariablesService } from '../../src/config/EnvironmentVariablesService.js'; import { PowertoolsLogFormatter } from '../../src/formatter/PowertoolsLogFormatter.js'; import { LogLevelThresholds, LogLevel } from '../../src/types/Log.js'; -import { - ClassThatLogs, - LogJsonIndent, +import type { + LogFunction, ConstructorOptions, } from '../../src/types/Logger.js'; +import { LogJsonIndent } from '../../src/constants.js'; import type { Context } from 'aws-lambda'; -import { Console } from 'node:console'; const mockDate = new Date(1466424490000); const dateSpy = jest.spyOn(global, 'Date').mockImplementation(() => mockDate); const getConsoleMethod = ( method: string -): keyof Omit => +): keyof Omit => method === 'critical' ? 'error' - : (method.toLowerCase() as keyof Omit); + : (method.toLowerCase() as keyof Omit); +jest.mock('node:console', () => ({ + ...jest.requireActual('node:console'), + Console: jest.fn().mockImplementation(() => ({ + debug: jest.fn(), + info: jest.fn(), + warn: jest.fn(), + error: jest.fn(), + })), +})); describe('Class: Logger', () => { const ENVIRONMENT_VARIABLES = process.env; @@ -60,7 +68,7 @@ describe('Class: Logger', () => { expect(logger).toEqual( expect.objectContaining({ persistentLogAttributes: {}, - powertoolLogData: { + powertoolsLogData: { sampleRateValue: 0, awsRegion: 'eu-west-1', environment: '', @@ -103,14 +111,19 @@ describe('Class: Logger', () => { logIndentation: 0, logFormatter: expect.any(PowertoolsLogFormatter), logLevel: 8, // 100% sample rate value changes log level to DEBUG - console: expect.any(Console), + console: expect.objectContaining({ + debug: expect.any(Function), + error: expect.any(Function), + info: expect.any(Function), + warn: expect.any(Function), + }), logLevelThresholds: { ...logLevelThresholds, }, persistentLogAttributes: { awsAccountId: '123456789', }, - powertoolLogData: { + powertoolsLogData: { awsRegion: 'eu-west-1', environment: 'prod', sampleRateValue: 1, @@ -139,12 +152,17 @@ describe('Class: Logger', () => { logIndentation: 0, logFormatter: expect.any(PowertoolsLogFormatter), logLevel: 12, - console: expect.any(Console), + console: expect.objectContaining({ + debug: expect.any(Function), + error: expect.any(Function), + info: expect.any(Function), + warn: expect.any(Function), + }), logLevelThresholds: { ...logLevelThresholds, }, persistentLogAttributes: {}, - powertoolLogData: { + powertoolsLogData: { awsRegion: 'eu-west-1', environment: '', sampleRateValue: 0, @@ -167,7 +185,7 @@ describe('Class: Logger', () => { expect(logger).toEqual( expect.objectContaining({ persistentLogAttributes: {}, - powertoolLogData: { + powertoolsLogData: { sampleRateValue: 0, awsRegion: 'eu-west-1', environment: '', @@ -195,7 +213,7 @@ describe('Class: Logger', () => { expect(logger).toEqual( expect.objectContaining({ persistentLogAttributes: {}, - powertoolLogData: { + powertoolsLogData: { sampleRateValue: 0, awsRegion: 'eu-west-1', environment: '', @@ -223,7 +241,7 @@ describe('Class: Logger', () => { expect(logger).toEqual( expect.objectContaining({ persistentLogAttributes: {}, - powertoolLogData: { + powertoolsLogData: { sampleRateValue: 0, awsRegion: 'eu-west-1', environment: '', @@ -251,7 +269,7 @@ describe('Class: Logger', () => { expect(logger).toEqual( expect.objectContaining({ persistentLogAttributes: {}, - powertoolLogData: { + powertoolsLogData: { sampleRateValue: 0, awsRegion: 'eu-west-1', environment: '', @@ -284,12 +302,17 @@ describe('Class: Logger', () => { logIndentation: 0, logFormatter: expect.any(PowertoolsLogFormatter), logLevel: 12, - console: expect.any(Console), + console: expect.objectContaining({ + debug: expect.any(Function), + error: expect.any(Function), + info: expect.any(Function), + warn: expect.any(Function), + }), logLevelThresholds: { ...logLevelThresholds, }, persistentLogAttributes: {}, - powertoolLogData: { + powertoolsLogData: { awsRegion: 'eu-west-1', environment: '', sampleRateValue: 0, @@ -312,7 +335,7 @@ describe('Class: Logger', () => { expect(logger).toEqual( expect.objectContaining({ persistentLogAttributes: {}, - powertoolLogData: { + powertoolsLogData: { sampleRateValue: 1, awsRegion: 'eu-west-1', environment: '', @@ -366,7 +389,7 @@ describe('Class: Logger', () => { expect(logger).toEqual( expect.objectContaining({ persistentLogAttributes: {}, - powertoolLogData: { + powertoolsLogData: { sampleRateValue: 0, awsRegion: 'eu-west-1', environment: 'dev', @@ -408,7 +431,7 @@ describe('Class: Logger', () => { version: '0.2.4', }, }, - powertoolLogData: { + powertoolsLogData: { sampleRateValue: 0, awsRegion: 'eu-west-1', environment: '', @@ -436,7 +459,7 @@ describe('Class: Logger', () => { expect(logger).toEqual( expect.objectContaining({ persistentLogAttributes: {}, - powertoolLogData: { + powertoolsLogData: { sampleRateValue: 0, awsRegion: 'eu-west-1', environment: 'dev', @@ -468,7 +491,7 @@ describe('Class: Logger', () => { ['error', 'DOES', true, 'DOES', true, 'DOES', true, 'DOES', true], ['critical', 'DOES', true, 'DOES', true, 'DOES', true, 'DOES', true], ])( - 'Method: %p', + 'Method:', ( method: string, debugAction, @@ -480,7 +503,7 @@ describe('Class: Logger', () => { errorAction, errorPrints ) => { - const methodOfLogger = method as keyof ClassThatLogs; + const methodOfLogger = method as keyof LogFunction; describe('Feature: log level', () => { test(`when the level is DEBUG, it ${debugAction} print to stdout`, () => { @@ -488,10 +511,10 @@ describe('Class: Logger', () => { const logger = new Logger({ logLevel: 'DEBUG', }); - const consoleSpy = jest - .spyOn(logger['console'], getConsoleMethod(method)) - .mockImplementation(); - + const consoleSpy = jest.spyOn( + logger['console'], + getConsoleMethod(method) + ); // Act logger[methodOfLogger]('foo'); @@ -517,10 +540,10 @@ describe('Class: Logger', () => { const logger = new Logger({ logLevel: 'INFO', }); - const consoleSpy = jest - .spyOn(logger['console'], getConsoleMethod(methodOfLogger)) - .mockImplementation(); - + const consoleSpy = jest.spyOn( + logger['console'], + getConsoleMethod(methodOfLogger) + ); // Act logger[methodOfLogger]('foo'); @@ -546,10 +569,10 @@ describe('Class: Logger', () => { const logger = new Logger({ logLevel: 'WARN', }); - const consoleSpy = jest - .spyOn(logger['console'], getConsoleMethod(methodOfLogger)) - .mockImplementation(); - + const consoleSpy = jest.spyOn( + logger['console'], + getConsoleMethod(methodOfLogger) + ); // Act logger[methodOfLogger]('foo'); @@ -575,10 +598,10 @@ describe('Class: Logger', () => { const logger = new Logger({ logLevel: 'ERROR', }); - const consoleSpy = jest - .spyOn(logger['console'], getConsoleMethod(methodOfLogger)) - .mockImplementation(); - + const consoleSpy = jest.spyOn( + logger['console'], + getConsoleMethod(methodOfLogger) + ); // Act logger[methodOfLogger]('foo'); @@ -604,10 +627,10 @@ describe('Class: Logger', () => { const logger = new Logger({ logLevel: 'SILENT', }); - const consoleSpy = jest - .spyOn(logger['console'], getConsoleMethod(methodOfLogger)) - .mockImplementation(); - + const consoleSpy = jest.spyOn( + logger['console'], + getConsoleMethod(methodOfLogger) + ); // Act logger[methodOfLogger]('foo'); @@ -619,10 +642,10 @@ describe('Class: Logger', () => { // Prepare process.env.LOG_LEVEL = methodOfLogger.toUpperCase(); const logger = new Logger(); - const consoleSpy = jest - .spyOn(logger['console'], getConsoleMethod(methodOfLogger)) - .mockImplementation(); - + const consoleSpy = jest.spyOn( + logger['console'], + getConsoleMethod(methodOfLogger) + ); // Act logger[methodOfLogger]('foo'); @@ -649,10 +672,10 @@ describe('Class: Logger', () => { logLevel: 'SILENT', sampleRateValue: 0, }); - const consoleSpy = jest - .spyOn(logger['console'], getConsoleMethod(methodOfLogger)) - .mockImplementation(); - + const consoleSpy = jest.spyOn( + logger['console'], + getConsoleMethod(methodOfLogger) + ); // Act if (logger[methodOfLogger]) { logger[methodOfLogger]('foo'); @@ -670,10 +693,10 @@ describe('Class: Logger', () => { logLevel: 'SILENT', sampleRateValue: 1, }); - const consoleSpy = jest - .spyOn(logger['console'], getConsoleMethod(methodOfLogger)) - .mockImplementation(); - + const consoleSpy = jest.spyOn( + logger['console'], + getConsoleMethod(methodOfLogger) + ); // Act if (logger[methodOfLogger]) { logger[methodOfLogger]('foo'); @@ -682,9 +705,9 @@ describe('Class: Logger', () => { // Assess expect(logger.level).toBe(8); expect(logger.getLevelName()).toBe('DEBUG'); - expect(consoleSpy).toBeCalledTimes(1); + expect(consoleSpy).toBeCalledTimes(method === 'debug' ? 2 : 1); expect(consoleSpy).toHaveBeenNthCalledWith( - 1, + method === 'debug' ? 2 : 1, JSON.stringify({ level: method.toUpperCase(), message: 'foo', @@ -705,10 +728,10 @@ describe('Class: Logger', () => { () => { // Prepare const logger = new Logger(); - const consoleSpy = jest - .spyOn(logger['console'], getConsoleMethod(methodOfLogger)) - .mockImplementation(); - + const consoleSpy = jest.spyOn( + logger['console'], + getConsoleMethod(methodOfLogger) + ); // Act if (logger[methodOfLogger]) { logger[methodOfLogger]('foo'); @@ -740,10 +763,10 @@ describe('Class: Logger', () => { logLevel: 'DEBUG', }); logger.addContext(context); - const consoleSpy = jest - .spyOn(logger['console'], getConsoleMethod(methodOfLogger)) - .mockImplementation(); - + const consoleSpy = jest.spyOn( + logger['console'], + getConsoleMethod(methodOfLogger) + ); // Act if (logger[methodOfLogger]) { logger[methodOfLogger]('foo'); @@ -757,7 +780,7 @@ describe('Class: Logger', () => { cold_start: true, function_arn: 'arn:aws:lambda:eu-west-1:123456789012:function:foo-bar-function', - function_memory_size: 128, + function_memory_size: '128', function_name: 'foo-bar-function', function_request_id: 'c6af9ac6-7b61-11e6-9a41-93e812345678', level: method.toUpperCase(), @@ -778,10 +801,10 @@ describe('Class: Logger', () => { const logger = new Logger({ logLevel: 'DEBUG', }); - const consoleSpy = jest - .spyOn(logger['console'], getConsoleMethod(methodOfLogger)) - .mockImplementation(); - + const consoleSpy = jest.spyOn( + logger['console'], + getConsoleMethod(methodOfLogger) + ); interface NestedObject { bool: boolean; str: string; @@ -997,10 +1020,10 @@ describe('Class: Logger', () => { aws_region: 'eu-west-1', }, }); - const consoleSpy = jest - .spyOn(logger['console'], getConsoleMethod(methodOfLogger)) - .mockImplementation(); - + const consoleSpy = jest.spyOn( + logger['console'], + getConsoleMethod(methodOfLogger) + ); // Act if (logger[methodOfLogger]) { logger[methodOfLogger]('foo'); @@ -1030,10 +1053,10 @@ describe('Class: Logger', () => { const logger = new Logger({ logLevel: 'DEBUG', }); - const consoleSpy = jest - .spyOn(logger['console'], getConsoleMethod(methodOfLogger)) - .mockImplementation(); - + const consoleSpy = jest.spyOn( + logger['console'], + getConsoleMethod(methodOfLogger) + ); // Act if (logger[methodOfLogger]) { logger[methodOfLogger]('foo'); @@ -1060,10 +1083,10 @@ describe('Class: Logger', () => { const logger = new Logger({ logLevel: 'DEBUG', }); - const consoleSpy = jest - .spyOn(logger['console'], getConsoleMethod(methodOfLogger)) - .mockImplementation(); - + const consoleSpy = jest.spyOn( + logger['console'], + getConsoleMethod(methodOfLogger) + ); // Act if (logger[methodOfLogger]) { logger[methodOfLogger]('foo'); @@ -1090,9 +1113,10 @@ describe('Class: Logger', () => { const logger = new Logger({ logLevel: 'DEBUG', }); - const consoleSpy = jest - .spyOn(logger['console'], getConsoleMethod(methodOfLogger)) - .mockImplementation(); + const consoleSpy = jest.spyOn( + logger['console'], + getConsoleMethod(methodOfLogger) + ); const circularObject = { foo: 'bar', self: {}, @@ -1132,9 +1156,7 @@ describe('Class: Logger', () => { test('when a logged item has BigInt value, it does not throw TypeError', () => { // Prepare const logger = new Logger(); - jest - .spyOn(logger['console'], getConsoleMethod(methodOfLogger)) - .mockImplementation(); + jest.spyOn(logger['console'], getConsoleMethod(methodOfLogger)); const message = `This is an ${methodOfLogger} log with BigInt value`; const logItem = { value: BigInt(42) }; const errorMessage = 'Do not know how to serialize a BigInt'; @@ -1148,9 +1170,10 @@ describe('Class: Logger', () => { test('when a logged item has a BigInt value, it prints the log with value as a string', () => { // Prepare const logger = new Logger(); - const consoleSpy = jest - .spyOn(logger['console'], getConsoleMethod(methodOfLogger)) - .mockImplementation(); + const consoleSpy = jest.spyOn( + logger['console'], + getConsoleMethod(methodOfLogger) + ); const message = `This is an ${methodOfLogger} log with BigInt value`; const logItem = { value: BigInt(42) }; @@ -1176,9 +1199,10 @@ describe('Class: Logger', () => { test('when a logged item has empty string, null, or undefined values, it removes it', () => { // Prepare const logger = new Logger(); - const consoleSpy = jest - .spyOn(logger['console'], getConsoleMethod(methodOfLogger)) - .mockImplementation(); + const consoleSpy = jest.spyOn( + logger['console'], + getConsoleMethod(methodOfLogger) + ); const message = `This is an ${methodOfLogger} log with empty, null, and undefined values`; const logItem = { value: 42, @@ -1210,7 +1234,7 @@ describe('Class: Logger', () => { ); describe('Method: addContext', () => { - test('when called during a cold start invocation, it populates the logger PowertoolLogData object with coldStart set to TRUE', () => { + test('when called during a cold start invocation, it populates the logger powertoolsLogData object with coldStart set to TRUE', () => { // Prepare const logger = new Logger(); @@ -1218,36 +1242,18 @@ describe('Class: Logger', () => { logger.addContext(context); // Assess - expect(logger).toEqual({ - console: expect.any(Console), - coldStart: false, // This is now false because the `coldStart` attribute has been already accessed once by the `addContext` method - customConfigService: undefined, - defaultServiceName: 'service_undefined', - envVarsService: expect.any(EnvironmentVariablesService), - logEvent: false, - logIndentation: 0, - logFormatter: expect.any(PowertoolsLogFormatter), - logLevel: 8, - logLevelThresholds: { - ...logLevelThresholds, - }, - persistentLogAttributes: {}, - powertoolLogData: { - awsRegion: 'eu-west-1', - environment: '', - lambdaContext: { - awsRequestId: 'c6af9ac6-7b61-11e6-9a41-93e812345678', - coldStart: true, - functionName: 'foo-bar-function', - functionVersion: '$LATEST', - invokedFunctionArn: - 'arn:aws:lambda:eu-west-1:123456789012:function:foo-bar-function', - memoryLimitInMB: 128, - }, - sampleRateValue: 0, - serviceName: 'hello-world', - }, - }); + expect(logger).toEqual( + expect.objectContaining({ + coldStart: false, // This is now false because the `coldStart` attribute has been already accessed once by the `addContext` method + powertoolsLogData: expect.objectContaining({ + lambdaContext: expect.objectContaining({ + coldStart: true, + }), + sampleRateValue: 0, + serviceName: 'hello-world', + }), + }) + ); }); test('when called with a context object, the object is not mutated', () => { @@ -1294,7 +1300,7 @@ describe('Class: Logger', () => { // Assess expect(logger).toEqual( expect.objectContaining({ - powertoolLogData: expect.objectContaining({ + powertoolsLogData: expect.objectContaining({ lambdaContext: expect.objectContaining({ awsRequestId: context2.awsRequestId, }), @@ -1472,9 +1478,7 @@ describe('Class: Logger', () => { // Prepare const logger = new Logger(); - const consoleSpy = jest - .spyOn(logger['console'], 'info') - .mockImplementation(); + const consoleSpy = jest.spyOn(logger['console'], 'info'); class LambdaFunction implements LambdaInterface { @logger.injectLambdaContext() public async handler( @@ -1502,7 +1506,7 @@ describe('Class: Logger', () => { cold_start: true, function_arn: 'arn:aws:lambda:eu-west-1:123456789012:function:foo-bar-function', - function_memory_size: 128, + function_memory_size: '128', function_name: 'foo-bar-function', function_request_id: 'c6af9ac6-7b61-11e6-9a41-93e812345678', level: 'INFO', @@ -1518,9 +1522,7 @@ describe('Class: Logger', () => { test('it captures Lambda context information and adds it in the printed logs', async () => { // Prepare const logger = new Logger(); - const consoleSpy = jest - .spyOn(logger['console'], 'info') - .mockImplementation(); + const consoleSpy = jest.spyOn(logger['console'], 'info'); class LambdaFunction implements LambdaInterface { @logger.injectLambdaContext() public async handler( @@ -1557,7 +1559,7 @@ describe('Class: Logger', () => { cold_start: true, function_arn: 'arn:aws:lambda:eu-west-1:123456789012:function:foo-bar-function', - function_memory_size: 128, + function_memory_size: '128', function_name: 'foo-bar-function', function_request_id: 'c6af9ac6-7b61-11e6-9a41-93e812345678', level: 'INFO', @@ -1574,9 +1576,7 @@ describe('Class: Logger', () => { // Prepare const expectedReturnValue = 'Lambda invoked!'; const logger = new Logger(); - const consoleSpy = jest - .spyOn(logger['console'], 'info') - .mockImplementation(); + const consoleSpy = jest.spyOn(logger['console'], 'info'); class LambdaFunction implements LambdaInterface { @logger.injectLambdaContext() public async handler( @@ -1616,7 +1616,7 @@ describe('Class: Logger', () => { cold_start: true, function_arn: 'arn:aws:lambda:eu-west-1:123456789012:function:foo-bar-function', - function_memory_size: 128, + function_memory_size: '128', function_name: 'foo-bar-function', function_request_id: 'c6af9ac6-7b61-11e6-9a41-93e812345678', level: 'INFO', @@ -1638,7 +1638,6 @@ describe('Class: Logger', () => { biz: 'baz', }, }); - jest.spyOn(logger['console'], 'debug').mockImplementation(); class LambdaFunction implements LambdaInterface { @logger.injectLambdaContext({ clearState: true }) public async handler( @@ -1684,7 +1683,6 @@ describe('Class: Logger', () => { biz: 'baz', }, }); - jest.spyOn(logger['console'], 'debug').mockImplementation(); class LambdaFunction implements LambdaInterface { @logger.injectLambdaContext({ clearState: true }) public async handler( @@ -1726,9 +1724,7 @@ describe('Class: Logger', () => { const logger = new Logger({ logLevel: 'DEBUG', }); - const consoleSpy = jest - .spyOn(logger['console'], 'info') - .mockImplementation(); + const consoleSpy = jest.spyOn(logger['console'], 'info'); class LambdaFunction implements LambdaInterface { @logger.injectLambdaContext({ logEvent: true }) public async handler( @@ -1752,7 +1748,7 @@ describe('Class: Logger', () => { cold_start: true, function_arn: 'arn:aws:lambda:eu-west-1:123456789012:function:foo-bar-function', - function_memory_size: 128, + function_memory_size: '128', function_name: 'foo-bar-function', function_request_id: 'c6af9ac6-7b61-11e6-9a41-93e812345678', level: 'INFO', @@ -1775,10 +1771,7 @@ describe('Class: Logger', () => { const logger = new Logger({ logLevel: 'DEBUG', }); - const consoleSpy = jest - .spyOn(logger['console'], 'info') - .mockImplementation(); - + const consoleSpy = jest.spyOn(logger['console'], 'info'); class LambdaFunction implements LambdaInterface { @logger.injectLambdaContext() public async handler( @@ -1802,7 +1795,7 @@ describe('Class: Logger', () => { cold_start: true, function_arn: 'arn:aws:lambda:eu-west-1:123456789012:function:foo-bar-function', - function_memory_size: 128, + function_memory_size: '128', function_name: 'foo-bar-function', function_request_id: 'c6af9ac6-7b61-11e6-9a41-93e812345678', level: 'INFO', @@ -1824,10 +1817,7 @@ describe('Class: Logger', () => { const logger = new Logger({ logLevel: 'DEBUG', }); - const consoleSpy = jest - .spyOn(logger['console'], 'info') - .mockImplementation(); - + const consoleSpy = jest.spyOn(logger['console'], 'info'); class LambdaFunction implements LambdaInterface { private readonly memberVariable: string; @@ -1863,7 +1853,7 @@ describe('Class: Logger', () => { cold_start: true, function_arn: 'arn:aws:lambda:eu-west-1:123456789012:function:foo-bar-function', - function_memory_size: 128, + function_memory_size: '128', function_name: 'foo-bar-function', function_request_id: 'c6af9ac6-7b61-11e6-9a41-93e812345678', level: 'INFO', @@ -1885,9 +1875,7 @@ describe('Class: Logger', () => { const logger = new Logger({ logLevel: 'DEBUG', }); - const consoleSpy = jest - .spyOn(logger['console'], 'info') - .mockImplementation(); + const consoleSpy = jest.spyOn(logger['console'], 'info'); class LambdaFunction implements LambdaInterface { @logger.injectLambdaContext() public async handler( @@ -1927,9 +1915,7 @@ describe('Class: Logger', () => { version: '1.0.0', }, }); - const consoleSpy = jest - .spyOn(logger['console'], 'info') - .mockImplementation(); + const consoleSpy = jest.spyOn(logger['console'], 'info'); class LambdaFunction implements LambdaInterface { @logger.injectLambdaContext({ clearState: true, logEvent: true }) public async handler( @@ -2004,7 +1990,12 @@ describe('Class: Logger', () => { expect(parentLogger === grandchildLogger).toBe(false); expect(parentLogger).toEqual({ - console: expect.any(Console), + console: expect.objectContaining({ + debug: expect.any(Function), + error: expect.any(Function), + info: expect.any(Function), + warn: expect.any(Function), + }), coldStart: true, customConfigService: undefined, defaultServiceName: 'service_undefined', @@ -2017,7 +2008,7 @@ describe('Class: Logger', () => { ...logLevelThresholds, }, persistentLogAttributes: {}, - powertoolLogData: { + powertoolsLogData: { awsRegion: 'eu-west-1', environment: '', sampleRateValue: 0, @@ -2026,7 +2017,12 @@ describe('Class: Logger', () => { }); expect(childLogger).toEqual({ - console: expect.any(Console), + console: expect.objectContaining({ + debug: expect.any(Function), + error: expect.any(Function), + info: expect.any(Function), + warn: expect.any(Function), + }), coldStart: true, customConfigService: undefined, defaultServiceName: 'service_undefined', @@ -2039,7 +2035,7 @@ describe('Class: Logger', () => { ...logLevelThresholds, }, persistentLogAttributes: {}, - powertoolLogData: { + powertoolsLogData: { awsRegion: 'eu-west-1', environment: '', sampleRateValue: 1, @@ -2048,7 +2044,12 @@ describe('Class: Logger', () => { }); expect(grandchildLogger).toEqual({ - console: expect.any(Console), + console: expect.objectContaining({ + debug: expect.any(Function), + error: expect.any(Function), + info: expect.any(Function), + warn: expect.any(Function), + }), coldStart: true, customConfigService: undefined, defaultServiceName: 'service_undefined', @@ -2061,7 +2062,7 @@ describe('Class: Logger', () => { ...logLevelThresholds, }, persistentLogAttributes: {}, - powertoolLogData: { + powertoolsLogData: { awsRegion: 'eu-west-1', environment: '', sampleRateValue: 1, @@ -2089,7 +2090,7 @@ describe('Class: Logger', () => { ); const optionsWithSampleRateEnabled = { - sampleRateValue: 1, // 100% probability to make sure that the logs are sampled + sampleRateValue: 1, }; const childLoggerWithSampleRateEnabled = parentLogger.createChild( optionsWithSampleRateEnabled @@ -2106,14 +2107,24 @@ describe('Class: Logger', () => { expect(parentLogger === childLogger).toBe(false); expect(childLogger).toEqual({ ...parentLogger, - console: expect.any(Console), + console: expect.objectContaining({ + debug: expect.any(Function), + error: expect.any(Function), + info: expect.any(Function), + warn: expect.any(Function), + }), }); expect(parentLogger === childLoggerWithPermanentAttributes).toBe(false); expect(parentLogger === childLoggerWithSampleRateEnabled).toBe(false); expect(parentLogger === childLoggerWithErrorLogLevel).toBe(false); expect(parentLogger).toEqual({ - console: expect.any(Console), + console: expect.objectContaining({ + debug: expect.any(Function), + error: expect.any(Function), + info: expect.any(Function), + warn: expect.any(Function), + }), coldStart: true, customConfigService: undefined, defaultServiceName: 'service_undefined', @@ -2126,7 +2137,7 @@ describe('Class: Logger', () => { ...logLevelThresholds, }, persistentLogAttributes: {}, - powertoolLogData: { + powertoolsLogData: { awsRegion: 'eu-west-1', environment: '', sampleRateValue: 0, @@ -2135,7 +2146,12 @@ describe('Class: Logger', () => { }); expect(childLoggerWithPermanentAttributes).toEqual({ - console: expect.any(Console), + console: expect.objectContaining({ + debug: expect.any(Function), + error: expect.any(Function), + info: expect.any(Function), + warn: expect.any(Function), + }), coldStart: true, customConfigService: undefined, defaultServiceName: 'service_undefined', @@ -2151,7 +2167,7 @@ describe('Class: Logger', () => { extra: 'This is an attribute that will be logged only by the child logger', }, - powertoolLogData: { + powertoolsLogData: { awsRegion: 'eu-west-1', environment: '', sampleRateValue: 0, @@ -2160,7 +2176,12 @@ describe('Class: Logger', () => { }); expect(childLoggerWithSampleRateEnabled).toEqual({ - console: expect.any(Console), + console: expect.objectContaining({ + debug: expect.any(Function), + error: expect.any(Function), + info: expect.any(Function), + warn: expect.any(Function), + }), coldStart: true, customConfigService: undefined, defaultServiceName: 'service_undefined', @@ -2173,7 +2194,7 @@ describe('Class: Logger', () => { ...logLevelThresholds, }, persistentLogAttributes: {}, - powertoolLogData: { + powertoolsLogData: { awsRegion: 'eu-west-1', environment: '', sampleRateValue: 1, @@ -2182,7 +2203,12 @@ describe('Class: Logger', () => { }); expect(childLoggerWithErrorLogLevel).toEqual({ - console: expect.any(Console), + console: expect.objectContaining({ + debug: expect.any(Function), + error: expect.any(Function), + info: expect.any(Function), + warn: expect.any(Function), + }), coldStart: true, customConfigService: undefined, defaultServiceName: 'service_undefined', @@ -2195,7 +2221,7 @@ describe('Class: Logger', () => { ...logLevelThresholds, }, persistentLogAttributes: {}, - powertoolLogData: { + powertoolsLogData: { awsRegion: 'eu-west-1', environment: '', sampleRateValue: 0, @@ -2206,7 +2232,6 @@ describe('Class: Logger', () => { test('child logger should have same keys in persistentLogAttributes as its parent', () => { // Prepare - const INDENTATION = LogJsonIndent.COMPACT; const parentLogger = new Logger(); const childLogger = parentLogger.createChild(); @@ -2224,85 +2249,25 @@ describe('Class: Logger', () => { childLoggerWithKeys.removeKeys(['test_key']); // Assess - expect(childLogger).toEqual({ - console: expect.any(Console), - coldStart: true, - customConfigService: undefined, - defaultServiceName: 'service_undefined', - envVarsService: expect.any(EnvironmentVariablesService), - logEvent: false, - logIndentation: INDENTATION, - logFormatter: expect.any(PowertoolsLogFormatter), - logLevel: 8, - logLevelThresholds: { - ...logLevelThresholds, - }, - persistentLogAttributes: {}, - powertoolLogData: { - awsRegion: 'eu-west-1', - environment: '', - sampleRateValue: 0, - serviceName: 'hello-world', - }, - }); + expect(childLogger.getPersistentLogAttributes()).toEqual({}); - expect(childLoggerWithKeys).toEqual({ - console: expect.any(Console), - coldStart: true, - customConfigService: undefined, - defaultServiceName: 'service_undefined', - envVarsService: expect.any(EnvironmentVariablesService), - logEvent: false, - logIndentation: INDENTATION, - logFormatter: expect.any(PowertoolsLogFormatter), - logLevel: 8, - logLevelThresholds: { - ...logLevelThresholds, - }, - persistentLogAttributes: { - aws_account_id: '123456789012', - aws_region: 'eu-west-1', - logger: { - name: 'aws-lambda-powertool-typescript', - version: '0.2.4', - }, - }, - powertoolLogData: { - awsRegion: 'eu-west-1', - environment: '', - sampleRateValue: 0, - serviceName: 'hello-world', + expect(childLoggerWithKeys.getPersistentLogAttributes()).toEqual({ + aws_account_id: '123456789012', + aws_region: 'eu-west-1', + logger: { + name: 'aws-lambda-powertool-typescript', + version: '0.2.4', }, }); - expect(parentLogger).toEqual({ - console: expect.any(Console), - coldStart: true, - customConfigService: undefined, - defaultServiceName: 'service_undefined', - envVarsService: expect.any(EnvironmentVariablesService), - logEvent: false, - logIndentation: INDENTATION, - logFormatter: expect.any(PowertoolsLogFormatter), - logLevel: 8, - logLevelThresholds: { - ...logLevelThresholds, - }, - persistentLogAttributes: { - aws_account_id: '123456789012', - aws_region: 'eu-west-1', - logger: { - name: 'aws-lambda-powertool-typescript', - version: '0.2.4', - }, - test_key: 'key-for-test', - }, - powertoolLogData: { - awsRegion: 'eu-west-1', - environment: '', - sampleRateValue: 0, - serviceName: 'hello-world', + expect(parentLogger.getPersistentLogAttributes()).toEqual({ + aws_account_id: '123456789012', + aws_region: 'eu-west-1', + logger: { + name: 'aws-lambda-powertool-typescript', + version: '0.2.4', }, + test_key: 'key-for-test', }); }); @@ -2315,36 +2280,26 @@ describe('Class: Logger', () => { const childLoggerWithContext = parentLogger.createChild(); // Assess - expect(childLoggerWithContext).toEqual({ - console: expect.any(Console), - coldStart: false, // This is now false because the `coldStart` attribute has been already accessed once by the `addContext` method - customConfigService: undefined, - defaultServiceName: 'service_undefined', - envVarsService: expect.any(EnvironmentVariablesService), - logEvent: false, - logIndentation: 0, - logFormatter: expect.any(PowertoolsLogFormatter), - logLevel: 8, - logLevelThresholds: { - ...logLevelThresholds, - }, - persistentLogAttributes: {}, - powertoolLogData: { - awsRegion: 'eu-west-1', - environment: '', - lambdaContext: { - awsRequestId: 'c6af9ac6-7b61-11e6-9a41-93e812345678', - coldStart: true, - functionName: 'foo-bar-function', - functionVersion: '$LATEST', - invokedFunctionArn: - 'arn:aws:lambda:eu-west-1:123456789012:function:foo-bar-function', - memoryLimitInMB: 128, + expect(childLoggerWithContext).toEqual( + expect.objectContaining({ + coldStart: false, // This is now false because the `coldStart` attribute has been already accessed once by the `addContext` method + powertoolsLogData: { + awsRegion: 'eu-west-1', + environment: '', + lambdaContext: { + awsRequestId: 'c6af9ac6-7b61-11e6-9a41-93e812345678', + coldStart: true, + functionName: 'foo-bar-function', + functionVersion: '$LATEST', + invokedFunctionArn: + 'arn:aws:lambda:eu-west-1:123456789012:function:foo-bar-function', + memoryLimitInMB: '128', + }, + sampleRateValue: 0, + serviceName: 'hello-world', }, - sampleRateValue: 0, - serviceName: 'hello-world', - }, - }); + }) + ); }); test('child logger should have the same logFormatter as its parent', () => { @@ -2414,7 +2369,12 @@ describe('Class: Logger', () => { // Assess expect(childLogger).toEqual({ ...parentLogger, - console: expect.any(Console), + console: expect.objectContaining({ + debug: expect.any(Function), + error: expect.any(Function), + info: expect.any(Function), + warn: expect.any(Function), + }), }); expect(childLogger).toEqual( @@ -2435,10 +2395,7 @@ describe('Class: Logger', () => { test('When the feature is disabled, it DOES NOT log the event', () => { // Prepare const logger = new Logger(); - const consoleSpy = jest - .spyOn(logger['console'], 'info') - .mockImplementation(); - + const consoleSpy = jest.spyOn(logger['console'], 'info'); // Act logger.logEventIfEnabled(event); @@ -2452,10 +2409,7 @@ describe('Class: Logger', () => { something: 'happened!', }; const logger = new Logger(); - const consoleSpy = jest - .spyOn(logger['console'], 'info') - .mockImplementation(); - + const consoleSpy = jest.spyOn(logger['console'], 'info'); // Act logger.logEventIfEnabled(event, true); @@ -2484,9 +2438,7 @@ describe('Class: Logger', () => { process.env.POWERTOOLS_DEV = 'true'; const INDENTATION = LogJsonIndent.PRETTY; const logger = new Logger(); - const consoleSpy = jest - .spyOn(logger['console'], 'info') - .mockImplementation(); + const consoleSpy = jest.spyOn(console, 'info').mockImplementation(); // Act logger.info('Message with pretty identation'); @@ -2513,10 +2465,7 @@ describe('Class: Logger', () => { test('when the `POWERTOOLS_DEV` env var is NOT SET it makes log output as one-liner', () => { // Prepare const logger = new Logger(); - const consoleSpy = jest - .spyOn(logger['console'], 'info') - .mockImplementation(); - + const consoleSpy = jest.spyOn(logger['console'], 'info'); // Act logger.info('Message without pretty identation'); @@ -2607,7 +2556,6 @@ describe('Class: Logger', () => { logLevel: 'ERROR', customConfigService: new MyCustomEnvironmentVariablesService(), }; - const logger: Logger = new Logger(loggerOptions); // Assess @@ -2655,11 +2603,7 @@ describe('Class: Logger', () => { customConfigService: new MyCustomEnvironmentVariablesService(), }; const logger: Logger = new Logger(loggerOptions); - - const consoleSpy = jest - .spyOn(logger['console'], 'info') - .mockImplementation(); - + const consoleSpy = jest.spyOn(logger['console'], 'info'); // Act logger.info('foo'); @@ -2692,11 +2636,7 @@ describe('Class: Logger', () => { customConfigService: new MyCustomEnvironmentVariablesService(), }; const logger: Logger = new Logger(loggerOptions); - - const consoleSpy = jest - .spyOn(logger['console'], 'info') - .mockImplementation(); - + const consoleSpy = jest.spyOn(logger['console'], 'info'); // Act logger.info('foo'); @@ -2719,17 +2659,25 @@ describe('Class: Logger', () => { // Prepare process.env.POWERTOOLS_LOGGER_SAMPLE_RATE = '1'; const logger: Logger = new Logger(); - const consoleSpy = jest - .spyOn(logger['console'], 'debug') - .mockImplementation(); - + const consoleSpy = jest.spyOn(logger['console'], 'debug'); // Act logger.debug('foo'); // Assess - expect(consoleSpy).toBeCalledTimes(1); + expect(consoleSpy).toBeCalledTimes(2); expect(consoleSpy).toHaveBeenNthCalledWith( 1, + JSON.stringify({ + level: 'DEBUG', + message: 'Setting log level to DEBUG due to sampling rate', + sampling_rate: 1, + service: 'hello-world', + timestamp: '2016-06-20T12:08:10.000Z', + xray_trace_id: '1-5759e988-bd862e3fe1be46a994272793', + }) + ); + expect(consoleSpy).toHaveBeenNthCalledWith( + 2, JSON.stringify({ level: 'DEBUG', message: 'foo', @@ -2754,10 +2702,7 @@ describe('Class: Logger', () => { }; const logger: Logger = new Logger(loggerOptions); - const consoleSpy = jest - .spyOn(logger['console'], 'info') - .mockImplementation(); - + const consoleSpy = jest.spyOn(logger['console'], 'info'); // Act logger.info('foo'); @@ -2782,10 +2727,7 @@ describe('Class: Logger', () => { logLevel: 'INFO', sampleRateValue: 42, }); - const consoleSpy = jest - .spyOn(logger['console'], 'info') - .mockImplementation(); - + const consoleSpy = jest.spyOn(logger['console'], 'info'); // Act logger.info('foo'); @@ -2818,10 +2760,7 @@ describe('Class: Logger', () => { }; const logger: Logger = new Logger(loggerOptions); - const consoleSpy = jest - .spyOn(logger['console'], 'info') - .mockImplementation(); - + const consoleSpy = jest.spyOn(logger['console'], 'info'); // Act logger.info('foo'); @@ -2846,10 +2785,7 @@ describe('Class: Logger', () => { const logger: Logger = new Logger({ logLevel: 'INFO', }); - const consoleSpy = jest - .spyOn(logger['console'], 'info') - .mockImplementation(); - + const consoleSpy = jest.spyOn(logger['console'], 'info'); // Act logger.info('foo'); @@ -2875,10 +2811,7 @@ describe('Class: Logger', () => { logLevel: 'INFO', sampleRateValue: 1, }); - const consoleSpy = jest - .spyOn(logger['console'], 'info') - .mockImplementation(); - + const consoleSpy = jest.spyOn(logger['console'], 'info'); // Act logger.refreshSampleRateCalculation(); logger.info('foo'); @@ -2905,9 +2838,6 @@ describe('Class: Logger', () => { sampleRateValue: 0.1, // 10% probability }); - // suppress "Setting log level to DEBUG due to sampling rate" log messages - jest.spyOn(logger['console'], 'debug').mockImplementation(); - let logLevelChangedToDebug = 0; const numOfIterations = 1000; const minExpected = numOfIterations * 0.05; // Min expected based on 5% probability diff --git a/packages/logger/tests/unit/formatter/PowertoolsLogFormatter.test.ts b/packages/logger/tests/unit/formatter/PowertoolsLogFormatter.test.ts index b7d5e3334a..3a97c9637b 100644 --- a/packages/logger/tests/unit/formatter/PowertoolsLogFormatter.test.ts +++ b/packages/logger/tests/unit/formatter/PowertoolsLogFormatter.test.ts @@ -1,13 +1,13 @@ /** * Test Logger formatter * - * @group unit/logger/all + * @group unit/logger/logFormatter */ import { AssertionError, strictEqual } from 'node:assert'; import { PowertoolsLogFormatter } from '../../../src/formatter/PowertoolsLogFormatter.js'; import { LogItem } from '../../../src/index.js'; -import { UnformattedAttributes } from '../../../src/types/Logger.js'; -import { LogAttributes } from '../../../src/types/Log.js'; +import type { UnformattedAttributes } from '../../../src/types/Logger.js'; +import type { LogAttributes } from '../../../src/types/Log.js'; describe('Class: PowertoolsLogFormatter', () => { const mockDate = new Date(1466424490000); @@ -22,7 +22,7 @@ describe('Class: PowertoolsLogFormatter', () => { // Prepare const formatter = new PowertoolsLogFormatter(); const unformattedAttributes: UnformattedAttributes = { - sampleRateValue: undefined, + sampleRateValue: 0, awsRegion: 'eu-west-1', environment: '', serviceName: 'hello-world', @@ -48,7 +48,7 @@ describe('Class: PowertoolsLogFormatter', () => { function_request_id: undefined, level: 'WARN', message: 'This is a WARN log', - sampling_rate: undefined, + sampling_rate: 0, service: 'hello-world', timestamp: '2016-06-20T12:08:10.000Z', xray_trace_id: '1-5759e988-bd862e3fe1be46a994272793', @@ -71,7 +71,7 @@ describe('Class: PowertoolsLogFormatter', () => { error: new Error('Something happened!'), lambdaContext: { functionName: 'my-lambda-function', - memoryLimitInMB: 123, + memoryLimitInMB: '123', functionVersion: '1.23.3', coldStart: true, invokedFunctionArn: @@ -91,7 +91,7 @@ describe('Class: PowertoolsLogFormatter', () => { expect(value.getAttributes()).toEqual({ cold_start: true, function_arn: 'arn:aws:lambda:eu-west-1:123456789012:function:Example', - function_memory_size: 123, + function_memory_size: '123', function_name: 'my-lambda-function', function_request_id: 'abcdefg123456789', level: 'WARN', diff --git a/packages/logger/tests/unit/middleware/middy.test.ts b/packages/logger/tests/unit/middleware/middy.test.ts index a37fc5e816..02738d3a33 100644 --- a/packages/logger/tests/unit/middleware/middy.test.ts +++ b/packages/logger/tests/unit/middleware/middy.test.ts @@ -1,18 +1,15 @@ /** * Test Logger middleware * - * @group unit/logger/all + * @group unit/logger/middleware */ -import context from '@aws-lambda-powertools/testing-utils/context'; import { cleanupMiddlewares } from '@aws-lambda-powertools/commons'; -import { ConfigServiceInterface } from '../../../src/config/ConfigServiceInterface.js'; -import { EnvironmentVariablesService } from '../../../src/config/EnvironmentVariablesService.js'; -import { injectLambdaContext } from '../../../src/middleware/middy.js'; -import { Logger } from './../../../src/Logger.js'; +import context from '@aws-lambda-powertools/testing-utils/context'; import middy from '@middy/core'; -import { PowertoolsLogFormatter } from '../../../src/formatter/PowertoolsLogFormatter.js'; -import { Console } from 'node:console'; import type { Context } from 'aws-lambda'; +import { injectLambdaContext } from '../../../src/middleware/middy.js'; +import { ConfigServiceInterface } from '../../../src/types/ConfigServiceInterface.js'; +import { Logger } from './../../../src/Logger.js'; const mockDate = new Date(1466424490000); const dateSpy = jest.spyOn(global, 'Date').mockImplementation(() => mockDate); @@ -52,11 +49,7 @@ describe('Middy middleware', () => { // Assess expect(logger).toEqual( expect.objectContaining({ - persistentLogAttributes: {}, - powertoolLogData: { - sampleRateValue: 0, - awsRegion: 'eu-west-1', - environment: '', + powertoolsLogData: expect.objectContaining({ lambdaContext: { awsRequestId: 'c6af9ac6-7b61-11e6-9a41-93e812345678', coldStart: true, @@ -64,14 +57,9 @@ describe('Middy middleware', () => { functionVersion: '$LATEST', invokedFunctionArn: 'arn:aws:lambda:eu-west-1:123456789012:function:foo-bar-function', - memoryLimitInMB: 128, + memoryLimitInMB: '128', }, - serviceName: 'hello-world', - }, - envVarsService: expect.any(EnvironmentVariablesService), - customConfigService: undefined, - logLevel: 8, - logFormatter: expect.any(PowertoolsLogFormatter), + }), }) ); }); @@ -90,11 +78,7 @@ describe('Middy middleware', () => { // Assess const expectation = expect.objectContaining({ - persistentLogAttributes: {}, - powertoolLogData: { - sampleRateValue: 0, - awsRegion: 'eu-west-1', - environment: '', + powertoolsLogData: expect.objectContaining({ lambdaContext: { awsRequestId: 'c6af9ac6-7b61-11e6-9a41-93e812345678', coldStart: true, @@ -102,15 +86,9 @@ describe('Middy middleware', () => { functionVersion: '$LATEST', invokedFunctionArn: 'arn:aws:lambda:eu-west-1:123456789012:function:foo-bar-function', - memoryLimitInMB: 128, + memoryLimitInMB: '128', }, - serviceName: 'hello-world', - }, - envVarsService: expect.any(EnvironmentVariablesService), - customConfigService: undefined, - logLevel: 8, - logFormatter: expect.any(PowertoolsLogFormatter), - console: expect.any(Console), + }), }); expect(logger).toEqual(expectation); expect(anotherLogger).toEqual(expectation); @@ -273,7 +251,7 @@ describe('Middy middleware', () => { cold_start: true, function_arn: 'arn:aws:lambda:eu-west-1:123456789012:function:foo-bar-function', - function_memory_size: 128, + function_memory_size: '128', function_name: 'foo-bar-function', function_request_id: 'c6af9ac6-7b61-11e6-9a41-93e812345678', level: 'INFO', @@ -340,7 +318,7 @@ describe('Middy middleware', () => { cold_start: true, function_arn: 'arn:aws:lambda:eu-west-1:123456789012:function:foo-bar-function', - function_memory_size: 128, + function_memory_size: '128', function_name: 'foo-bar-function', function_request_id: 'c6af9ac6-7b61-11e6-9a41-93e812345678', level: 'INFO', @@ -379,7 +357,7 @@ describe('Middy middleware', () => { cold_start: true, function_arn: 'arn:aws:lambda:eu-west-1:123456789012:function:foo-bar-function', - function_memory_size: 128, + function_memory_size: '128', function_name: 'foo-bar-function', function_request_id: 'c6af9ac6-7b61-11e6-9a41-93e812345678', level: 'INFO', @@ -418,7 +396,7 @@ describe('Middy middleware', () => { cold_start: true, function_arn: 'arn:aws:lambda:eu-west-1:123456789012:function:foo-bar-function', - function_memory_size: 128, + function_memory_size: '128', function_name: 'foo-bar-function', function_request_id: 'c6af9ac6-7b61-11e6-9a41-93e812345678', level: 'INFO', diff --git a/packages/tracer/tests/unit/Tracer.test.ts b/packages/tracer/tests/unit/Tracer.test.ts index 812f8ce14f..4b6031e092 100644 --- a/packages/tracer/tests/unit/Tracer.test.ts +++ b/packages/tracer/tests/unit/Tracer.test.ts @@ -20,7 +20,7 @@ type CaptureAsyncFuncMock = jest.SpyInstance< [ name: string, fcn: (subsegment?: Subsegment) => unknown, - parent?: Segment | Subsegment + parent?: Segment | Subsegment, ] >; const createCaptureAsyncFuncMock = function ( diff --git a/tsconfig.json b/tsconfig.json index a49b03e30e..c2eb4a63ed 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -2,7 +2,7 @@ "compilerOptions": { "incremental": true, "composite": true, - "target": "ES2021", // Node.js 16 + "target": "ES2022", // Node.js 16 "experimentalDecorators": true, "module": "commonjs", "moduleResolution": "node", // TODO: experiment with bundler & esnext From cc171a7edbaa67dbb2722042659a635840e42c5b Mon Sep 17 00:00:00 2001 From: Andrea Amorosi Date: Sat, 21 Oct 2023 00:48:29 +0200 Subject: [PATCH 37/60] chore(maintenance): bump Middy v4 & run tests (#1760) --- package-lock.json | 31 ++++++++++++++++++++++++++----- package.json | 4 ++-- 2 files changed, 28 insertions(+), 7 deletions(-) diff --git a/package-lock.json b/package-lock.json index df69291ea2..a9859c9e17 100644 --- a/package-lock.json +++ b/package-lock.json @@ -23,7 +23,7 @@ "examples/sam" ], "devDependencies": { - "@middy/core": "^3.6.2", + "@middy/core": "^4.6.5", "@types/aws-lambda": "^8.10.121", "@types/jest": "^29.5.4", "@types/node": "^20.6.1", @@ -103,6 +103,14 @@ "typescript": "^5.2.2" } }, + "examples/cdk/node_modules/@middy/core": { + "version": "3.6.2", + "resolved": "https://registry.npmjs.org/@middy/core/-/core-3.6.2.tgz", + "integrity": "sha512-/vyvG34RIt7CTmuB/jksGkk9vs6RCoOlRFPfdQq11dHkiKlT2mm8j/jZx7gSpEhXXh9LeaEMuKPnsgWBIlGS1g==", + "engines": { + "node": ">=14" + } + }, "examples/cdk/node_modules/@types/node": { "version": "20.6.1", "resolved": "https://registry.npmjs.org/@types/node/-/node-20.6.1.tgz", @@ -135,6 +143,14 @@ "typescript": "^5.2.2" } }, + "examples/sam/node_modules/@middy/core": { + "version": "3.6.2", + "resolved": "https://registry.npmjs.org/@middy/core/-/core-3.6.2.tgz", + "integrity": "sha512-/vyvG34RIt7CTmuB/jksGkk9vs6RCoOlRFPfdQq11dHkiKlT2mm8j/jZx7gSpEhXXh9LeaEMuKPnsgWBIlGS1g==", + "engines": { + "node": ">=14" + } + }, "examples/sam/node_modules/@types/node": { "version": "20.6.1", "resolved": "https://registry.npmjs.org/@types/node/-/node-20.6.1.tgz", @@ -3145,11 +3161,16 @@ } }, "node_modules/@middy/core": { - "version": "3.6.2", - "resolved": "https://registry.npmjs.org/@middy/core/-/core-3.6.2.tgz", - "integrity": "sha512-/vyvG34RIt7CTmuB/jksGkk9vs6RCoOlRFPfdQq11dHkiKlT2mm8j/jZx7gSpEhXXh9LeaEMuKPnsgWBIlGS1g==", + "version": "4.6.5", + "resolved": "https://registry.npmjs.org/@middy/core/-/core-4.6.5.tgz", + "integrity": "sha512-nsAmIcafn2GGHz7yOJecEZjQ0UVARC+Wem2wzGELolXKM2TskcyDcvwqDSlas4pwh7gzHTdfwP+pUmQVRGWJPQ==", + "devOptional": true, "engines": { - "node": ">=14" + "node": ">=16" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/willfarrell" } }, "node_modules/@nodelib/fs.scandir": { diff --git a/package.json b/package.json index dab6966b98..d0a90a40e6 100644 --- a/package.json +++ b/package.json @@ -48,7 +48,7 @@ }, "homepage": "https://github.com/aws-powertools/powertools-lambda-typescript#readme", "devDependencies": { - "@middy/core": "^3.6.2", + "@middy/core": "^4.6.5", "@types/aws-lambda": "^8.10.121", "@types/jest": "^29.5.4", "@types/node": "^20.6.1", @@ -77,4 +77,4 @@ "engines": { "node": ">=16" } -} \ No newline at end of file +} From 52cc3bcc4d5f61150666aaa13ae22d89cc663848 Mon Sep 17 00:00:00 2001 From: Andrea Amorosi Date: Sat, 21 Oct 2023 10:34:34 +0200 Subject: [PATCH 38/60] chore(parameters): fix esm bundling --- packages/parameters/package.json | 3 ++- packages/parameters/src/index.ts | 4 ++-- packages/parameters/tests/unit/BaseProvider.test.ts | 2 +- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/packages/parameters/package.json b/packages/parameters/package.json index 5a6fa56f66..5afa5f1abf 100644 --- a/packages/parameters/package.json +++ b/packages/parameters/package.json @@ -30,6 +30,7 @@ }, "homepage": "https://github.com/aws-powertools/powertools-lambda-typescript/tree/main/packages/parameters#readme", "license": "MIT-0", + "type": "module", "exports": { ".": { "require": { @@ -197,4 +198,4 @@ "optional": true } } -} +} \ No newline at end of file diff --git a/packages/parameters/src/index.ts b/packages/parameters/src/index.ts index 3142feda2a..89b255eb5c 100644 --- a/packages/parameters/src/index.ts +++ b/packages/parameters/src/index.ts @@ -1,2 +1,2 @@ -export * from './errors.js'; -export * from './constants.js'; +export { GetParameterError, TransformParameterError } from './errors.js'; +export { Transform } from './constants.js'; diff --git a/packages/parameters/tests/unit/BaseProvider.test.ts b/packages/parameters/tests/unit/BaseProvider.test.ts index 9e7d8e8876..913d1cf946 100644 --- a/packages/parameters/tests/unit/BaseProvider.test.ts +++ b/packages/parameters/tests/unit/BaseProvider.test.ts @@ -10,7 +10,7 @@ import { GetOptions, GetMultipleOptions, } from '../../src/base/index.js'; -import { DEFAULT_MAX_AGE_SECS } from '../../src/index.js'; +import { DEFAULT_MAX_AGE_SECS } from '../../src/constants.js'; import type { EnvironmentVariablesService } from '../../src/config/EnvironmentVariablesService.js'; import { ExpirableValue } from '../../src/base/ExpirableValue.js'; import { From 740c6014f699b3f64541d1a8b9077d363400a24d Mon Sep 17 00:00:00 2001 From: Andrea Amorosi Date: Fri, 20 Oct 2023 23:23:41 +0200 Subject: [PATCH 39/60] chore(parameters): refactor provider constructor to init client as needed (#1757) * chore(parameters): refactor provider constructor to init client as needed * chore(parameters): moved client instrumentation up in baseprovider * chore(parameters): fix code smells * chore(parameters): fix code smells --- .../src/appconfig/AppConfigProvider.ts | 31 +++----- packages/parameters/src/base/BaseProvider.ts | 26 ++++++- .../src/dynamodb/DynamoDBProvider.ts | 33 +++----- .../parameters/src/secrets/SecretsProvider.ts | 25 ++---- packages/parameters/src/ssm/SSMProvider.ts | 23 ++---- .../tests/unit/BaseProvider.test.ts | 77 ++++++++++--------- 6 files changed, 99 insertions(+), 116 deletions(-) diff --git a/packages/parameters/src/appconfig/AppConfigProvider.ts b/packages/parameters/src/appconfig/AppConfigProvider.ts index f385bd368b..42d0e6465c 100644 --- a/packages/parameters/src/appconfig/AppConfigProvider.ts +++ b/packages/parameters/src/appconfig/AppConfigProvider.ts @@ -10,10 +10,6 @@ import type { AppConfigGetOptions, AppConfigGetOutput, } from '../types/AppConfigProvider.js'; -import { - addUserAgentMiddleware, - isSdkClient, -} from '@aws-lambda-powertools/commons'; /** * ## Intro @@ -185,7 +181,7 @@ import { * For more usage examples, see [our documentation](https://docs.powertools.aws.dev/lambda-typescript/latest/utilities/parameters/). */ class AppConfigProvider extends BaseProvider { - public client: AppConfigDataClient; + public client!: AppConfigDataClient; protected configurationTokenStore = new Map(); protected valueStore = new Map(); private application?: string; @@ -197,27 +193,22 @@ class AppConfigProvider extends BaseProvider { * @param {AppConfigProviderOptions} options - The configuration object. */ public constructor(options: AppConfigProviderOptions) { - super(); - this.client = new AppConfigDataClient(options.clientConfig || {}); - if (options?.awsSdkV3Client) { - if (isSdkClient(options.awsSdkV3Client)) { - this.client = options.awsSdkV3Client; - } else { - console.warn( - 'awsSdkV3Client is not an AWS SDK v3 client, using default client' - ); - } - } - addUserAgentMiddleware(this.client, 'parameters'); + super({ + proto: AppConfigDataClient as new ( + config?: unknown + ) => AppConfigDataClient, + clientConfig: options.clientConfig, + awsSdkV3Client: options.awsSdkV3Client, + }); - this.application = - options?.application || this.envVarsService.getServiceName(); + const { application, environment } = options; + this.application = application ?? this.envVarsService.getServiceName(); if (!this.application || this.application.trim().length === 0) { throw new Error( 'Application name is not defined or POWERTOOLS_SERVICE_NAME is not set' ); } - this.environment = options.environment; + this.environment = environment; } /** diff --git a/packages/parameters/src/base/BaseProvider.ts b/packages/parameters/src/base/BaseProvider.ts index 66eb053488..739913e3aa 100644 --- a/packages/parameters/src/base/BaseProvider.ts +++ b/packages/parameters/src/base/BaseProvider.ts @@ -1,6 +1,8 @@ import { + addUserAgentMiddleware, isNullOrUndefined, isRecord, + isSdkClient, isString, } from '@aws-lambda-powertools/commons'; import { GetOptions } from './GetOptions.js'; @@ -36,11 +38,33 @@ import type { */ abstract class BaseProvider implements BaseProviderInterface { public envVarsService: EnvironmentVariablesService; + protected client: unknown; protected store: Map; - public constructor() { + public constructor({ + awsSdkV3Client, + clientConfig, + proto, + }: { + awsSdkV3Client?: unknown; + clientConfig?: unknown; + proto: new (config?: unknown) => unknown; + }) { this.store = new Map(); this.envVarsService = new EnvironmentVariablesService(); + if (awsSdkV3Client) { + if (!isSdkClient(awsSdkV3Client)) { + console.warn( + 'awsSdkV3Client is not an AWS SDK v3 client, using default client' + ); + this.client = new proto(clientConfig ?? {}); + } else { + this.client = awsSdkV3Client; + } + } else { + this.client = new proto(clientConfig ?? {}); + } + addUserAgentMiddleware(this.client, 'parameters'); } /** diff --git a/packages/parameters/src/dynamodb/DynamoDBProvider.ts b/packages/parameters/src/dynamodb/DynamoDBProvider.ts index 282406c092..a2e3819ea8 100644 --- a/packages/parameters/src/dynamodb/DynamoDBProvider.ts +++ b/packages/parameters/src/dynamodb/DynamoDBProvider.ts @@ -18,10 +18,6 @@ import type { } from '@aws-sdk/client-dynamodb'; import type { PaginationConfiguration } from '@aws-sdk/types'; import type { JSONValue } from '@aws-lambda-powertools/commons/types'; -import { - addUserAgentMiddleware, - isSdkClient, -} from '@aws-lambda-powertools/commons'; /** * ## Intro @@ -239,7 +235,7 @@ import { * For more usage examples, see [our documentation](https://docs.powertools.aws.dev/lambda-typescript/latest/utilities/parameters/). */ class DynamoDBProvider extends BaseProvider { - public client: DynamoDBClient; + public client!: DynamoDBClient; protected keyAttr = 'id'; protected sortAttr = 'sk'; protected tableName: string; @@ -251,24 +247,17 @@ class DynamoDBProvider extends BaseProvider { * @param {DynamoDBProviderOptions} config - The configuration object. */ public constructor(config: DynamoDBProviderOptions) { - super(); - - this.client = new DynamoDBClient(config?.clientConfig || {}); - if (config?.awsSdkV3Client) { - if (isSdkClient(config.awsSdkV3Client)) { - this.client = config.awsSdkV3Client; - } else { - console.warn( - 'awsSdkV3Client is not an AWS SDK v3 client, using default client' - ); - } - } - addUserAgentMiddleware(this.client, 'parameters'); + super({ + awsSdkV3Client: config.awsSdkV3Client, + clientConfig: config.clientConfig, + proto: DynamoDBClient as new (config?: unknown) => DynamoDBClient, + }); - this.tableName = config.tableName; - if (config.keyAttr) this.keyAttr = config.keyAttr; - if (config.sortAttr) this.sortAttr = config.sortAttr; - if (config.valueAttr) this.valueAttr = config.valueAttr; + const { tableName, keyAttr, sortAttr, valueAttr } = config; + this.tableName = tableName; + if (keyAttr) this.keyAttr = keyAttr; + if (sortAttr) this.sortAttr = sortAttr; + if (valueAttr) this.valueAttr = valueAttr; } /** diff --git a/packages/parameters/src/secrets/SecretsProvider.ts b/packages/parameters/src/secrets/SecretsProvider.ts index 0fe5019355..9758f86cec 100644 --- a/packages/parameters/src/secrets/SecretsProvider.ts +++ b/packages/parameters/src/secrets/SecretsProvider.ts @@ -9,10 +9,6 @@ import type { SecretsGetOptions, SecretsGetOutput, } from '../types/SecretsProvider.js'; -import { - addUserAgentMiddleware, - isSdkClient, -} from '@aws-lambda-powertools/commons'; /** * ## Intro @@ -149,7 +145,7 @@ import { * @see https://docs.powertools.aws.dev/lambda-typescript/latest/utilities/parameters/ */ class SecretsProvider extends BaseProvider { - public client: SecretsManagerClient; + public client!: SecretsManagerClient; /** * It initializes the SecretsProvider class. @@ -157,19 +153,12 @@ class SecretsProvider extends BaseProvider { * @param {SecretsProviderOptions} config - The configuration object. */ public constructor(config?: SecretsProviderOptions) { - super(); - - this.client = new SecretsManagerClient(config?.clientConfig || {}); - if (config?.awsSdkV3Client) { - if (isSdkClient(config.awsSdkV3Client)) { - this.client = config.awsSdkV3Client; - } else { - console.warn( - 'awsSdkV3Client is not an AWS SDK v3 client, using default client' - ); - } - } - addUserAgentMiddleware(this.client, 'parameters'); + super({ + proto: SecretsManagerClient as new ( + config?: unknown + ) => SecretsManagerClient, + ...(config ?? {}), + }); } /** diff --git a/packages/parameters/src/ssm/SSMProvider.ts b/packages/parameters/src/ssm/SSMProvider.ts index 1ca934b518..bb25a8aae7 100644 --- a/packages/parameters/src/ssm/SSMProvider.ts +++ b/packages/parameters/src/ssm/SSMProvider.ts @@ -27,10 +27,6 @@ import type { SSMGetParametersByNameFromCacheOutputType, } from '../types/SSMProvider.js'; import type { PaginationConfiguration } from '@aws-sdk/types'; -import { - addUserAgentMiddleware, - isSdkClient, -} from '@aws-lambda-powertools/commons'; /** * ## Intro @@ -266,7 +262,7 @@ import { * For more usage examples, see [our documentation](https://docs.powertools.aws.dev/lambda-typescript/latest/utilities/parameters/). */ class SSMProvider extends BaseProvider { - public client: SSMClient; + public client!: SSMClient; protected errorsKey = '_errors'; protected maxGetParametersItems = 10; @@ -276,19 +272,10 @@ class SSMProvider extends BaseProvider { * @param {SSMProviderOptions} config - The configuration object. */ public constructor(config?: SSMProviderOptions) { - super(); - - this.client = new SSMClient(config?.clientConfig || {}); - if (config?.awsSdkV3Client) { - if (isSdkClient(config.awsSdkV3Client)) { - this.client = config.awsSdkV3Client; - } else { - console.warn( - 'awsSdkV3Client is not an AWS SDK v3 client, using default client' - ); - } - } - addUserAgentMiddleware(this.client, 'parameters'); + super({ + proto: SSMClient as new (config?: unknown) => SSMClient, + ...(config ?? {}), + }); } /** diff --git a/packages/parameters/tests/unit/BaseProvider.test.ts b/packages/parameters/tests/unit/BaseProvider.test.ts index 913d1cf946..e65fafb1a9 100644 --- a/packages/parameters/tests/unit/BaseProvider.test.ts +++ b/packages/parameters/tests/unit/BaseProvider.test.ts @@ -20,37 +20,52 @@ import { import { toBase64 } from '@aws-sdk/util-base64-node'; const encoder = new TextEncoder(); +jest.mock('@aws-lambda-powertools/commons', () => ({ + ...jest.requireActual('@aws-lambda-powertools/commons'), + addUserAgentMiddleware: jest.fn(), +})); + +class TestProvider extends BaseProvider { + public constructor() { + super({ + proto: class { + #name = 'TestProvider'; + + public hello(): string { + return this.#name; + } + }, + }); + } + + public _add(key: string, value: ExpirableValue): void { + this.store.set(key, value); + } + + public _get(_name: string): Promise { + throw Error('Not implemented.'); + } + + public _getKeyTest(key: string): ExpirableValue | undefined { + return this.store.get(key); + } + + public _getMultiple( + _path: string + ): Promise> { + throw Error('Not implemented.'); + } + + public _getStoreSize(): number { + return this.store.size; + } +} describe('Class: BaseProvider', () => { afterEach(() => { jest.clearAllMocks(); }); - class TestProvider extends BaseProvider { - public _add(key: string, value: ExpirableValue): void { - this.store.set(key, value); - } - - public _get(_name: string, _options: GetOptions): Promise { - throw Error('Not implemented.'); - } - - public _getKeyTest(key: string): ExpirableValue | undefined { - return this.store.get(key); - } - - public _getMultiple( - _path: string, - _options?: GetMultipleOptions - ): Promise> { - throw Error('Not implemented.'); - } - - public _getStoreSize(): number { - return this.store.size; - } - } - describe('Method: addToCache', () => { test('when called with a value and maxAge equal to 0, it skips the cache entirely', () => { // Prepare @@ -593,18 +608,6 @@ describe('Class: BaseProvider', () => { }); describe('Function: clearCaches', () => { - class TestProvider extends BaseProvider { - public _get(_name: string): Promise { - throw Error('Not implemented.'); - } - - public _getMultiple( - _path: string - ): Promise> { - throw Error('Not implemented.'); - } - } - test('when called, it clears all the caches', () => { // Prepare const provider1 = new TestProvider(); From 44da5bed8ccd0555d5a800d20e4c3452f4eab3df Mon Sep 17 00:00:00 2001 From: Andrea Amorosi Date: Sat, 21 Oct 2023 11:16:57 +0200 Subject: [PATCH 40/60] chore(parameters): change declare client param --- packages/parameters/src/appconfig/AppConfigProvider.ts | 2 +- packages/parameters/src/dynamodb/DynamoDBProvider.ts | 2 +- packages/parameters/src/secrets/SecretsProvider.ts | 2 +- packages/parameters/src/ssm/SSMProvider.ts | 2 +- packages/parameters/tests/unit/BaseProvider.test.ts | 5 +---- 5 files changed, 5 insertions(+), 8 deletions(-) diff --git a/packages/parameters/src/appconfig/AppConfigProvider.ts b/packages/parameters/src/appconfig/AppConfigProvider.ts index 42d0e6465c..6fae54a564 100644 --- a/packages/parameters/src/appconfig/AppConfigProvider.ts +++ b/packages/parameters/src/appconfig/AppConfigProvider.ts @@ -181,7 +181,7 @@ import type { * For more usage examples, see [our documentation](https://docs.powertools.aws.dev/lambda-typescript/latest/utilities/parameters/). */ class AppConfigProvider extends BaseProvider { - public client!: AppConfigDataClient; + public declare client: AppConfigDataClient; protected configurationTokenStore = new Map(); protected valueStore = new Map(); private application?: string; diff --git a/packages/parameters/src/dynamodb/DynamoDBProvider.ts b/packages/parameters/src/dynamodb/DynamoDBProvider.ts index a2e3819ea8..0076ac0436 100644 --- a/packages/parameters/src/dynamodb/DynamoDBProvider.ts +++ b/packages/parameters/src/dynamodb/DynamoDBProvider.ts @@ -235,7 +235,7 @@ import type { JSONValue } from '@aws-lambda-powertools/commons/types'; * For more usage examples, see [our documentation](https://docs.powertools.aws.dev/lambda-typescript/latest/utilities/parameters/). */ class DynamoDBProvider extends BaseProvider { - public client!: DynamoDBClient; + public declare client: DynamoDBClient; protected keyAttr = 'id'; protected sortAttr = 'sk'; protected tableName: string; diff --git a/packages/parameters/src/secrets/SecretsProvider.ts b/packages/parameters/src/secrets/SecretsProvider.ts index 9758f86cec..3817e2a108 100644 --- a/packages/parameters/src/secrets/SecretsProvider.ts +++ b/packages/parameters/src/secrets/SecretsProvider.ts @@ -145,7 +145,7 @@ import type { * @see https://docs.powertools.aws.dev/lambda-typescript/latest/utilities/parameters/ */ class SecretsProvider extends BaseProvider { - public client!: SecretsManagerClient; + public declare client: SecretsManagerClient; /** * It initializes the SecretsProvider class. diff --git a/packages/parameters/src/ssm/SSMProvider.ts b/packages/parameters/src/ssm/SSMProvider.ts index bb25a8aae7..4bdfdf9c6c 100644 --- a/packages/parameters/src/ssm/SSMProvider.ts +++ b/packages/parameters/src/ssm/SSMProvider.ts @@ -262,7 +262,7 @@ import type { PaginationConfiguration } from '@aws-sdk/types'; * For more usage examples, see [our documentation](https://docs.powertools.aws.dev/lambda-typescript/latest/utilities/parameters/). */ class SSMProvider extends BaseProvider { - public client!: SSMClient; + public declare client: SSMClient; protected errorsKey = '_errors'; protected maxGetParametersItems = 10; diff --git a/packages/parameters/tests/unit/BaseProvider.test.ts b/packages/parameters/tests/unit/BaseProvider.test.ts index e65fafb1a9..0c2a923fbb 100644 --- a/packages/parameters/tests/unit/BaseProvider.test.ts +++ b/packages/parameters/tests/unit/BaseProvider.test.ts @@ -13,10 +13,7 @@ import { import { DEFAULT_MAX_AGE_SECS } from '../../src/constants.js'; import type { EnvironmentVariablesService } from '../../src/config/EnvironmentVariablesService.js'; import { ExpirableValue } from '../../src/base/ExpirableValue.js'; -import { - GetParameterError, - TransformParameterError, -} from '../../src/errors.js'; +import { GetParameterError, TransformParameterError } from '../../src/index.js'; import { toBase64 } from '@aws-sdk/util-base64-node'; const encoder = new TextEncoder(); From 4aeecae5bc3992698b29aa2b6e6c16853847910d Mon Sep 17 00:00:00 2001 From: Andrea Amorosi Date: Sat, 21 Oct 2023 11:17:03 +0200 Subject: [PATCH 41/60] chore(commons): update Powertools UA middleware detection (#1762) * chore(commons): fix double ua detection * chore(commons): fix unit test --- packages/commons/src/awsSdkUtils.ts | 25 +++++++++++++------ .../commons/tests/unit/awsSdkUtils.test.ts | 4 ++- 2 files changed, 21 insertions(+), 8 deletions(-) diff --git a/packages/commons/src/awsSdkUtils.ts b/packages/commons/src/awsSdkUtils.ts index ce50c5de33..519ee92619 100644 --- a/packages/commons/src/awsSdkUtils.ts +++ b/packages/commons/src/awsSdkUtils.ts @@ -51,14 +51,25 @@ const customUserAgentMiddleware = (feature: string) => { }; }; +/** + * @internal + * Checks if the middleware stack already has the Powertools UA middleware + */ +const hasPowertools = (middlewareStack: string[]): boolean => { + let found = false; + for (const middleware of middlewareStack) { + if (middleware.includes('addPowertoolsToUserAgent')) { + found = true; + } + } + + return found; +}; + const addUserAgentMiddleware = (client: unknown, feature: string): void => { try { if (isSdkClient(client)) { - if ( - client.middlewareStack - .identify() - .includes('addPowertoolsToUserAgent: POWERTOOLS,USER_AGENT') - ) { + if (hasPowertools(client.middlewareStack.identify())) { return; } client.middlewareStack.addRelativeTo( @@ -70,8 +81,8 @@ const addUserAgentMiddleware = (client: unknown, feature: string): void => { `The client provided does not match the expected interface` ); } - } catch (e) { - console.warn('Failed to add user agent middleware', e); + } catch (error) { + console.warn('Failed to add user agent middleware', error); } }; diff --git a/packages/commons/tests/unit/awsSdkUtils.test.ts b/packages/commons/tests/unit/awsSdkUtils.test.ts index ca9dfbd401..0a2e4c6cd7 100644 --- a/packages/commons/tests/unit/awsSdkUtils.test.ts +++ b/packages/commons/tests/unit/awsSdkUtils.test.ts @@ -33,7 +33,9 @@ describe('Helpers: awsSdk', () => { // Prepare const client = { middlewareStack: { - identify: () => 'addPowertoolsToUserAgent: POWERTOOLS,USER_AGENT', + identify: () => [ + 'addPowertoolsToUserAgent: after getUserAgentMiddleware', + ], addRelativeTo: jest.fn(), }, send: jest.fn(), From a5f89112004fd6c8e0bec92bea04ab124d53e3d0 Mon Sep 17 00:00:00 2001 From: Andrea Amorosi Date: Sat, 21 Oct 2023 12:25:27 +0200 Subject: [PATCH 42/60] chore(layers) widen version check in e2e --- .../layerPublisher.class.test.functionCode.ts | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) diff --git a/layers/tests/e2e/layerPublisher.class.test.functionCode.ts b/layers/tests/e2e/layerPublisher.class.test.functionCode.ts index d63f389d7c..3f15dfbbb1 100644 --- a/layers/tests/e2e/layerPublisher.class.test.functionCode.ts +++ b/layers/tests/e2e/layerPublisher.class.test.functionCode.ts @@ -81,11 +81,22 @@ const getVersionFromModule = async (moduleName: string): Promise => { export const handler = async (): Promise => { // Check that the packages version matches the expected one - for (const moduleName of ['commons', 'logger', 'metrics', 'tracer']) { + for (const moduleName of [ + 'commons', + 'logger', + 'metrics', + 'tracer', + 'parameters', + 'idempotency', + 'batch', + ]) { const moduleVersion = await getVersionFromModule(moduleName); - if (moduleVersion != expectedVersion) { + // TODO: remove this check once v2 becomes GA + // if (moduleVersion != expectedVersion) { + if (!moduleVersion.startsWith(expectedVersion)) { throw new Error( - `Package version mismatch (${moduleName}): ${moduleVersion} != ${expectedVersion}` + // `Package version mismatch (${moduleName}): ${moduleVersion} != ${expectedVersion}` + `Package version mismatch (${moduleName}): ${moduleVersion} does not start with ${expectedVersion}` ); } } From 490b2d041c2aa12d6156847c92e1f98f3fa54e1b Mon Sep 17 00:00:00 2001 From: Andrea Amorosi Date: Mon, 23 Oct 2023 20:34:09 +0200 Subject: [PATCH 43/60] chore(maintenance): enable `isolatedModules` and isolate cache (#1765) * chore(layers) widen version check in e2e * chore(maintenance): enable isolatedModules * chore: remove redundant comments from tsconfig * chore: changed path of tsbuild cache --- .gitignore | 3 +-- .../layerPublisher.class.test.functionCode.ts | 17 ++++++++++++++--- packages/batch/package.json | 7 +++---- packages/batch/tsconfig.esm.json | 3 ++- packages/batch/tsconfig.json | 1 + packages/commons/package.json | 6 +++--- packages/commons/src/types/LambdaInterface.ts | 11 ++++++++--- packages/commons/src/types/awsSdk.ts | 2 +- packages/commons/src/types/index.ts | 13 +++++++++---- packages/commons/src/types/middy.ts | 2 +- packages/commons/tsconfig.esm.json | 3 ++- packages/commons/tsconfig.json | 1 + packages/idempotency/package.json | 9 ++++----- .../src/types/BasePersistenceLayer.ts | 2 +- .../src/types/ConfigServiceInterface.ts | 2 +- .../idempotency/src/types/IdempotencyOptions.ts | 2 +- .../idempotency/src/types/IdempotencyRecord.ts | 2 +- packages/idempotency/src/types/LRUCache.ts | 2 +- packages/idempotency/src/types/index.ts | 6 +++--- packages/idempotency/tsconfig.esm.json | 3 ++- packages/idempotency/tsconfig.json | 1 + packages/logger/package.json | 7 +++---- .../logger/src/types/ConfigServiceInterface.ts | 2 +- packages/logger/src/types/Logger.ts | 2 +- packages/logger/src/types/index.ts | 1 - packages/logger/tsconfig.esm.json | 9 ++++++--- packages/logger/tsconfig.json | 9 ++++++--- packages/metrics/package.json | 7 +++---- .../metrics/src/types/ConfigServiceInterface.ts | 2 +- packages/metrics/src/types/Metrics.ts | 2 +- packages/metrics/src/types/MetricsInterface.ts | 2 +- packages/metrics/src/types/index.ts | 6 +++--- packages/metrics/tsconfig.esm.json | 3 ++- packages/metrics/tsconfig.json | 1 + packages/parameters/package.json | 9 ++++----- .../src/types/ConfigServiceInterface.ts | 2 +- packages/parameters/tsconfig.esm.json | 3 ++- packages/parameters/tsconfig.json | 1 + packages/testing/package.json | 9 ++++----- packages/testing/src/types.ts | 2 +- packages/testing/tsconfig.esm.json | 3 ++- packages/testing/tsconfig.json | 1 + packages/tracer/package.json | 9 ++++----- .../tracer/src/types/ConfigServiceInterface.ts | 2 +- .../src/types/ProviderServiceInterface.ts | 2 +- packages/tracer/src/types/Tracer.ts | 2 +- packages/tracer/src/types/index.ts | 2 +- packages/tracer/tsconfig.esm.json | 3 ++- packages/tracer/tsconfig.json | 1 + tsconfig.json | 9 ++------- 50 files changed, 119 insertions(+), 92 deletions(-) diff --git a/.gitignore b/.gitignore index 82e57f76bd..73b53761bc 100644 --- a/.gitignore +++ b/.gitignore @@ -49,5 +49,4 @@ site tmp # TS build files -tsconfig.tsbuildinfo -tsconfig.esm.tsbuildinfo \ No newline at end of file +*.tsbuildinfo \ No newline at end of file diff --git a/layers/tests/e2e/layerPublisher.class.test.functionCode.ts b/layers/tests/e2e/layerPublisher.class.test.functionCode.ts index d63f389d7c..3f15dfbbb1 100644 --- a/layers/tests/e2e/layerPublisher.class.test.functionCode.ts +++ b/layers/tests/e2e/layerPublisher.class.test.functionCode.ts @@ -81,11 +81,22 @@ const getVersionFromModule = async (moduleName: string): Promise => { export const handler = async (): Promise => { // Check that the packages version matches the expected one - for (const moduleName of ['commons', 'logger', 'metrics', 'tracer']) { + for (const moduleName of [ + 'commons', + 'logger', + 'metrics', + 'tracer', + 'parameters', + 'idempotency', + 'batch', + ]) { const moduleVersion = await getVersionFromModule(moduleName); - if (moduleVersion != expectedVersion) { + // TODO: remove this check once v2 becomes GA + // if (moduleVersion != expectedVersion) { + if (!moduleVersion.startsWith(expectedVersion)) { throw new Error( - `Package version mismatch (${moduleName}): ${moduleVersion} != ${expectedVersion}` + // `Package version mismatch (${moduleName}): ${moduleVersion} != ${expectedVersion}` + `Package version mismatch (${moduleName}): ${moduleVersion} does not start with ${expectedVersion}` ); } } diff --git a/packages/batch/package.json b/packages/batch/package.json index e2c8701c2b..224d0e17d5 100644 --- a/packages/batch/package.json +++ b/packages/batch/package.json @@ -17,13 +17,12 @@ "test:e2e:nodejs18x": "echo 'Not Implemented'", "test:e2e": "echo 'Not Implemented'", "watch": "jest --watch", - "build:cjs": "tsc --build --force && echo '{ \"type\": \"commonjs\" }' > lib/cjs/package.json", - "build:esm": "tsc --project tsconfig.esm.json && echo '{ \"type\": \"module\" }' > lib/esm/package.json", + "build:cjs": "tsc --build tsconfig.json && echo '{ \"type\": \"commonjs\" }' > lib/cjs/package.json", + "build:esm": "tsc --build tsconfig.esm.json && echo '{ \"type\": \"module\" }' > lib/esm/package.json", "build": "npm run build:esm & npm run build:cjs", "lint": "eslint --ext .ts,.js --no-error-on-unmatched-pattern .", "lint-fix": "eslint --fix --ext .ts,.js --no-error-on-unmatched-pattern .", - "prebuild": "rimraf ./lib", - "prepack": "rimraf ./lib/*.tsbuildinfo && node ../../.github/scripts/release_patch_package_json.js ." + "prepack": "node ../../.github/scripts/release_patch_package_json.js ." }, "lint-staged": { "*.{js,ts}": "npm run lint-fix" diff --git a/packages/batch/tsconfig.esm.json b/packages/batch/tsconfig.esm.json index 9bed8e4da4..123291b0cf 100644 --- a/packages/batch/tsconfig.esm.json +++ b/packages/batch/tsconfig.esm.json @@ -3,7 +3,8 @@ "compilerOptions": { "baseUrl": ".", "outDir": "./lib/esm", - "rootDir": "./src" + "rootDir": "./src", + "tsBuildInfoFile": ".tsbuildinfo/esm.json" }, "include": [ "./src/**/*" diff --git a/packages/batch/tsconfig.json b/packages/batch/tsconfig.json index 5be842b9f8..4836a14962 100644 --- a/packages/batch/tsconfig.json +++ b/packages/batch/tsconfig.json @@ -3,6 +3,7 @@ "compilerOptions": { "outDir": "./lib/cjs/", "rootDir": "./src", + "tsBuildInfoFile": ".tsbuildinfo/cjs.json" }, "include": [ "./src/**/*" diff --git a/packages/commons/package.json b/packages/commons/package.json index 9398f36a6a..508c45dbd3 100644 --- a/packages/commons/package.json +++ b/packages/commons/package.json @@ -16,12 +16,12 @@ "test:e2e": "echo 'Not Applicable'", "watch": "jest --watch", "generateVersionFile": "echo \"// this file is auto generated, do not modify\nexport const PT_VERSION = '$(jq -r '.version' package.json)';\" > src/version.ts", - "build:cjs": "tsc --build --force && echo '{ \"type\": \"commonjs\" }' > lib/cjs/package.json", - "build:esm": "tsc --project tsconfig.esm.json && echo '{ \"type\": \"module\" }' > lib/esm/package.json", + "build:cjs": "tsc --build tsconfig.json && echo '{ \"type\": \"commonjs\" }' > lib/cjs/package.json", + "build:esm": "tsc --build tsconfig.esm.json && echo '{ \"type\": \"module\" }' > lib/esm/package.json", "build": "npm run build:esm & npm run build:cjs", "lint": "eslint --ext .ts,.js --no-error-on-unmatched-pattern .", "lint-fix": "eslint --fix --ext .ts,.js --no-error-on-unmatched-pattern .", - "prepack": "rimraf ./lib/*.tsbuildinfo && node ../../.github/scripts/release_patch_package_json.js ." + "prepack": "node ../../.github/scripts/release_patch_package_json.js ." }, "lint-staged": { "*.{js,ts}": "npm run lint-fix" diff --git a/packages/commons/src/types/LambdaInterface.ts b/packages/commons/src/types/LambdaInterface.ts index 38a55cdb48..7eb6609487 100644 --- a/packages/commons/src/types/LambdaInterface.ts +++ b/packages/commons/src/types/LambdaInterface.ts @@ -1,12 +1,12 @@ import type { Handler } from 'aws-lambda'; -export type SyncHandler = ( +type SyncHandler = ( event: Parameters[0], context: Parameters[1], callback: Parameters[2] ) => void; -export type AsyncHandler = ( +type AsyncHandler = ( event: Parameters[0], context: Parameters[1] ) => Promise[2]>[1]>>; @@ -23,4 +23,9 @@ type HandlerMethodDecorator = ( | TypedPropertyDescriptor> ) => void; -export { LambdaInterface, HandlerMethodDecorator }; +export type { + AsyncHandler, + SyncHandler, + LambdaInterface, + HandlerMethodDecorator, +}; diff --git a/packages/commons/src/types/awsSdk.ts b/packages/commons/src/types/awsSdk.ts index a62ba6c891..f29d1bc8ff 100644 --- a/packages/commons/src/types/awsSdk.ts +++ b/packages/commons/src/types/awsSdk.ts @@ -19,4 +19,4 @@ interface SdkClient { */ type MiddlewareArgsLike = { request: { headers: { [key: string]: string } } }; -export { SdkClient, MiddlewareArgsLike }; +export type { SdkClient, MiddlewareArgsLike }; diff --git a/packages/commons/src/types/index.ts b/packages/commons/src/types/index.ts index 115abe81fb..068a9225e3 100644 --- a/packages/commons/src/types/index.ts +++ b/packages/commons/src/types/index.ts @@ -1,11 +1,16 @@ -export { +export type { MiddlewareLikeObj, MiddyLikeRequest, CleanupFunction, } from './middy.js'; -export { SdkClient, MiddlewareArgsLike } from './awsSdk.js'; -export { JSONPrimitive, JSONValue, JSONObject, JSONArray } from './json.js'; -export { +export type { SdkClient, MiddlewareArgsLike } from './awsSdk.js'; +export type { + JSONPrimitive, + JSONValue, + JSONObject, + JSONArray, +} from './json.js'; +export type { SyncHandler, AsyncHandler, LambdaInterface, diff --git a/packages/commons/src/types/middy.ts b/packages/commons/src/types/middy.ts index 0399408d8c..92c94a0ba5 100644 --- a/packages/commons/src/types/middy.ts +++ b/packages/commons/src/types/middy.ts @@ -57,4 +57,4 @@ type MiddyLikeRequest = { */ type CleanupFunction = (request: MiddyLikeRequest) => Promise; -export { MiddlewareLikeObj, MiddyLikeRequest, CleanupFunction }; +export type { MiddlewareLikeObj, MiddyLikeRequest, CleanupFunction }; diff --git a/packages/commons/tsconfig.esm.json b/packages/commons/tsconfig.esm.json index 9bed8e4da4..123291b0cf 100644 --- a/packages/commons/tsconfig.esm.json +++ b/packages/commons/tsconfig.esm.json @@ -3,7 +3,8 @@ "compilerOptions": { "baseUrl": ".", "outDir": "./lib/esm", - "rootDir": "./src" + "rootDir": "./src", + "tsBuildInfoFile": ".tsbuildinfo/esm.json" }, "include": [ "./src/**/*" diff --git a/packages/commons/tsconfig.json b/packages/commons/tsconfig.json index 5be842b9f8..4836a14962 100644 --- a/packages/commons/tsconfig.json +++ b/packages/commons/tsconfig.json @@ -3,6 +3,7 @@ "compilerOptions": { "outDir": "./lib/cjs/", "rootDir": "./src", + "tsBuildInfoFile": ".tsbuildinfo/cjs.json" }, "include": [ "./src/**/*" diff --git a/packages/idempotency/package.json b/packages/idempotency/package.json index aca801e6db..48a9850d1c 100644 --- a/packages/idempotency/package.json +++ b/packages/idempotency/package.json @@ -17,13 +17,12 @@ "test:e2e:nodejs18x": "RUNTIME=nodejs18x jest --group=e2e", "test:e2e": "jest --group=e2e", "watch": "jest --watch", - "build:cjs": "tsc --build --force && echo '{ \"type\": \"commonjs\" }' > lib/cjs/package.json", - "build:esm": "tsc --project tsconfig.esm.json && echo '{ \"type\": \"module\" }' > lib/esm/package.json", + "build:cjs": "tsc --build tsconfig.json && echo '{ \"type\": \"commonjs\" }' > lib/cjs/package.json", + "build:esm": "tsc --build tsconfig.esm.json && echo '{ \"type\": \"module\" }' > lib/esm/package.json", "build": "npm run build:esm & npm run build:cjs", "lint": "eslint --ext .ts,.js --no-error-on-unmatched-pattern .", "lint-fix": "eslint --fix --ext .ts,.js --no-error-on-unmatched-pattern .", - "prebuild": "rimraf ./lib", - "prepack": "rimraf ./lib/*.tsbuildinfo && node ../../.github/scripts/release_patch_package_json.js ." + "prepack": "node ../../.github/scripts/release_patch_package_json.js ." }, "lint-staged": { "*.{js,ts}": "npm run lint-fix" @@ -136,4 +135,4 @@ "aws-sdk-client-mock": "^3.0.0", "aws-sdk-client-mock-jest": "^3.0.0" } -} \ No newline at end of file +} diff --git a/packages/idempotency/src/types/BasePersistenceLayer.ts b/packages/idempotency/src/types/BasePersistenceLayer.ts index 7bd61689f8..badda0271f 100644 --- a/packages/idempotency/src/types/BasePersistenceLayer.ts +++ b/packages/idempotency/src/types/BasePersistenceLayer.ts @@ -15,4 +15,4 @@ interface BasePersistenceLayerInterface { getRecord(data: unknown): Promise; } -export { BasePersistenceLayerOptions, BasePersistenceLayerInterface }; +export type { BasePersistenceLayerOptions, BasePersistenceLayerInterface }; diff --git a/packages/idempotency/src/types/ConfigServiceInterface.ts b/packages/idempotency/src/types/ConfigServiceInterface.ts index f4938baeaf..eaa36e8e1f 100644 --- a/packages/idempotency/src/types/ConfigServiceInterface.ts +++ b/packages/idempotency/src/types/ConfigServiceInterface.ts @@ -8,4 +8,4 @@ interface ConfigServiceInterface { getIdempotencyEnabled(): boolean; } -export { ConfigServiceInterface }; +export type { ConfigServiceInterface }; diff --git a/packages/idempotency/src/types/IdempotencyOptions.ts b/packages/idempotency/src/types/IdempotencyOptions.ts index 54487d3396..0f2345cd09 100644 --- a/packages/idempotency/src/types/IdempotencyOptions.ts +++ b/packages/idempotency/src/types/IdempotencyOptions.ts @@ -179,7 +179,7 @@ type IdempotencyConfigOptions = { lambdaContext?: Context; }; -export { +export type { AnyFunction, IdempotencyConfigOptions, ItempotentFunctionOptions, diff --git a/packages/idempotency/src/types/IdempotencyRecord.ts b/packages/idempotency/src/types/IdempotencyRecord.ts index af62b2ac22..486cb2561d 100644 --- a/packages/idempotency/src/types/IdempotencyRecord.ts +++ b/packages/idempotency/src/types/IdempotencyRecord.ts @@ -13,4 +13,4 @@ type IdempotencyRecordOptions = { payloadHash?: string; }; -export { IdempotencyRecordStatusValue, IdempotencyRecordOptions }; +export type { IdempotencyRecordStatusValue, IdempotencyRecordOptions }; diff --git a/packages/idempotency/src/types/LRUCache.ts b/packages/idempotency/src/types/LRUCache.ts index 6ab31d260a..67ab035e60 100644 --- a/packages/idempotency/src/types/LRUCache.ts +++ b/packages/idempotency/src/types/LRUCache.ts @@ -5,4 +5,4 @@ type LRUCacheOptions = { maxSize: number; }; -export { LRUCacheOptions }; +export type { LRUCacheOptions }; diff --git a/packages/idempotency/src/types/index.ts b/packages/idempotency/src/types/index.ts index c67b3e6fe6..3f7d50ea34 100644 --- a/packages/idempotency/src/types/index.ts +++ b/packages/idempotency/src/types/index.ts @@ -1,12 +1,12 @@ -export { +export type { IdempotencyRecordOptions, IdempotencyRecordStatusValue, } from './IdempotencyRecord.js'; -export { +export type { BasePersistenceLayerInterface, BasePersistenceLayerOptions, } from './BasePersistenceLayer.js'; -export { +export type { IdempotencyConfigOptions, IdempotencyLambdaHandlerOptions, IdempotencyHandlerOptions, diff --git a/packages/idempotency/tsconfig.esm.json b/packages/idempotency/tsconfig.esm.json index 9bed8e4da4..123291b0cf 100644 --- a/packages/idempotency/tsconfig.esm.json +++ b/packages/idempotency/tsconfig.esm.json @@ -3,7 +3,8 @@ "compilerOptions": { "baseUrl": ".", "outDir": "./lib/esm", - "rootDir": "./src" + "rootDir": "./src", + "tsBuildInfoFile": ".tsbuildinfo/esm.json" }, "include": [ "./src/**/*" diff --git a/packages/idempotency/tsconfig.json b/packages/idempotency/tsconfig.json index a30fdead42..f216927295 100644 --- a/packages/idempotency/tsconfig.json +++ b/packages/idempotency/tsconfig.json @@ -3,6 +3,7 @@ "compilerOptions": { "outDir": "./lib/cjs", "rootDir": "./src", + "tsBuildInfoFile": ".tsbuildinfo/cjs.json" }, "include": [ "./src/**/*" diff --git a/packages/logger/package.json b/packages/logger/package.json index 90afea2ead..f38e2f388f 100644 --- a/packages/logger/package.json +++ b/packages/logger/package.json @@ -17,13 +17,12 @@ "test:e2e:nodejs18x": "RUNTIME=nodejs18x jest --group=e2e", "test:e2e": "jest --group=e2e", "watch": "jest --watch --group=unit", - "build:cjs": "tsc --build --force && echo '{ \"type\": \"commonjs\" }' > lib/cjs/package.json", - "build:esm": "tsc --project tsconfig.esm.json && echo '{ \"type\": \"module\" }' > lib/esm/package.json", + "build:cjs": "tsc --build tsconfig.json && echo '{ \"type\": \"commonjs\" }' > lib/cjs/package.json", + "build:esm": "tsc --build tsconfig.esm.json && echo '{ \"type\": \"module\" }' > lib/esm/package.json", "build": "npm run build:esm & npm run build:cjs", "lint": "eslint --ext .ts,.js --no-error-on-unmatched-pattern .", "lint-fix": "eslint --fix --ext .ts,.js --no-error-on-unmatched-pattern .", - "prebuild": "rimraf ./lib", - "prepack": "rimraf ./lib/*.tsbuildinfo && node ../../.github/scripts/release_patch_package_json.js ." + "prepack": "node ../../.github/scripts/release_patch_package_json.js ." }, "lint-staged": { "*.{js,ts}": "npm run lint-fix" diff --git a/packages/logger/src/types/ConfigServiceInterface.ts b/packages/logger/src/types/ConfigServiceInterface.ts index 7cbee088b6..99f98dff36 100644 --- a/packages/logger/src/types/ConfigServiceInterface.ts +++ b/packages/logger/src/types/ConfigServiceInterface.ts @@ -65,4 +65,4 @@ interface ConfigServiceInterface { isValueTrue(value: string): boolean; } -export { ConfigServiceInterface }; +export type { ConfigServiceInterface }; diff --git a/packages/logger/src/types/Logger.ts b/packages/logger/src/types/Logger.ts index 67d22a2963..fdeb41d4e3 100644 --- a/packages/logger/src/types/Logger.ts +++ b/packages/logger/src/types/Logger.ts @@ -86,7 +86,7 @@ type LoggerInterface = { warn(input: LogItemMessage, ...extraInput: LogItemExtraInput): void; }; -export { +export type { LogFunction, LoggerInterface, LogItemMessage, diff --git a/packages/logger/src/types/index.ts b/packages/logger/src/types/index.ts index 88f38933d1..e18a8806e0 100644 --- a/packages/logger/src/types/index.ts +++ b/packages/logger/src/types/index.ts @@ -6,7 +6,6 @@ export type { LogAttributes, LogLevel, } from './Log.js'; - export type { LogItemMessage, LogItemExtraInput, diff --git a/packages/logger/tsconfig.esm.json b/packages/logger/tsconfig.esm.json index a78be21539..123291b0cf 100644 --- a/packages/logger/tsconfig.esm.json +++ b/packages/logger/tsconfig.esm.json @@ -3,7 +3,10 @@ "compilerOptions": { "baseUrl": ".", "outDir": "./lib/esm", - "rootDir": "./src" + "rootDir": "./src", + "tsBuildInfoFile": ".tsbuildinfo/esm.json" }, - "include": ["./src/**/*"] -} + "include": [ + "./src/**/*" + ] +} \ No newline at end of file diff --git a/packages/logger/tsconfig.json b/packages/logger/tsconfig.json index 6b64decffb..d56a564ef6 100644 --- a/packages/logger/tsconfig.json +++ b/packages/logger/tsconfig.json @@ -2,7 +2,10 @@ "extends": "../../tsconfig.json", "compilerOptions": { "outDir": "./lib/cjs/", - "rootDir": "./src" + "rootDir": "./src", + "tsBuildInfoFile": ".tsbuildinfo/cjs.json" }, - "include": ["./src/**/*"] -} + "include": [ + "./src/**/*" + ] +} \ No newline at end of file diff --git a/packages/metrics/package.json b/packages/metrics/package.json index 5c1a384064..185fdcfa9b 100644 --- a/packages/metrics/package.json +++ b/packages/metrics/package.json @@ -17,13 +17,12 @@ "test:e2e:nodejs18x": "RUNTIME=nodejs18x jest --group=e2e", "test:e2e": "jest --group=e2e", "watch": "jest --group=unit --watch ", - "build:cjs": "tsc --build --force && echo '{ \"type\": \"commonjs\" }' > lib/cjs/package.json", - "build:esm": "tsc --project tsconfig.esm.json && echo '{ \"type\": \"module\" }' > lib/esm/package.json", + "build:cjs": "tsc --build tsconfig.json && echo '{ \"type\": \"commonjs\" }' > lib/cjs/package.json", + "build:esm": "tsc --build tsconfig.esm.json && echo '{ \"type\": \"module\" }' > lib/esm/package.json", "build": "npm run build:esm & npm run build:cjs", "lint": "eslint --ext .ts,.js --no-error-on-unmatched-pattern .", "lint-fix": "eslint --fix --ext .ts,.js --no-error-on-unmatched-pattern .", - "prebuild": "rimraf ./lib", - "prepack": "rimraf ./lib/*.tsbuildinfo && node ../../.github/scripts/release_patch_package_json.js ." + "prepack": "node ../../.github/scripts/release_patch_package_json.js ." }, "lint-staged": { "*.{js,ts}": "npm run lint-fix" diff --git a/packages/metrics/src/types/ConfigServiceInterface.ts b/packages/metrics/src/types/ConfigServiceInterface.ts index ea1c127db6..81842a691d 100644 --- a/packages/metrics/src/types/ConfigServiceInterface.ts +++ b/packages/metrics/src/types/ConfigServiceInterface.ts @@ -4,4 +4,4 @@ interface ConfigServiceInterface { getServiceName(): string; } -export { ConfigServiceInterface }; +export type { ConfigServiceInterface }; diff --git a/packages/metrics/src/types/Metrics.ts b/packages/metrics/src/types/Metrics.ts index f925ed2e9b..a8780bca10 100644 --- a/packages/metrics/src/types/Metrics.ts +++ b/packages/metrics/src/types/Metrics.ts @@ -68,7 +68,7 @@ type MetricDefinition = { StorageResolution?: MetricResolution; }; -export { +export type { MetricsOptions, Dimensions, EmfOutput, diff --git a/packages/metrics/src/types/MetricsInterface.ts b/packages/metrics/src/types/MetricsInterface.ts index 99650937ba..c4e796cf98 100644 --- a/packages/metrics/src/types/MetricsInterface.ts +++ b/packages/metrics/src/types/MetricsInterface.ts @@ -29,4 +29,4 @@ interface MetricsInterface { singleMetric(): Metrics; } -export { MetricsInterface }; +export type { MetricsInterface }; diff --git a/packages/metrics/src/types/index.ts b/packages/metrics/src/types/index.ts index 115b00059e..7d30ec8888 100644 --- a/packages/metrics/src/types/index.ts +++ b/packages/metrics/src/types/index.ts @@ -1,4 +1,4 @@ -export { +export type { MetricsOptions, Dimensions, EmfOutput, @@ -9,5 +9,5 @@ export { MetricResolution, MetricUnit, } from './Metrics.js'; -export { ConfigServiceInterface } from './ConfigServiceInterface.js'; -export { MetricsInterface } from './MetricsInterface.js'; +export type { ConfigServiceInterface } from './ConfigServiceInterface.js'; +export type { MetricsInterface } from './MetricsInterface.js'; diff --git a/packages/metrics/tsconfig.esm.json b/packages/metrics/tsconfig.esm.json index 9bed8e4da4..123291b0cf 100644 --- a/packages/metrics/tsconfig.esm.json +++ b/packages/metrics/tsconfig.esm.json @@ -3,7 +3,8 @@ "compilerOptions": { "baseUrl": ".", "outDir": "./lib/esm", - "rootDir": "./src" + "rootDir": "./src", + "tsBuildInfoFile": ".tsbuildinfo/esm.json" }, "include": [ "./src/**/*" diff --git a/packages/metrics/tsconfig.json b/packages/metrics/tsconfig.json index a30fdead42..f216927295 100644 --- a/packages/metrics/tsconfig.json +++ b/packages/metrics/tsconfig.json @@ -3,6 +3,7 @@ "compilerOptions": { "outDir": "./lib/cjs", "rootDir": "./src", + "tsBuildInfoFile": ".tsbuildinfo/cjs.json" }, "include": [ "./src/**/*" diff --git a/packages/parameters/package.json b/packages/parameters/package.json index 5afa5f1abf..41fac17563 100644 --- a/packages/parameters/package.json +++ b/packages/parameters/package.json @@ -17,13 +17,12 @@ "test:e2e:nodejs18x": "RUNTIME=nodejs18x jest --group=e2e", "test:e2e": "jest --group=e2e", "watch": "jest --watch", - "build:cjs": "tsc --build --force && echo '{ \"type\": \"commonjs\" }' > lib/cjs/package.json", - "build:esm": "tsc --project tsconfig.esm.json && echo '{ \"type\": \"module\" }' > lib/esm/package.json", + "build:cjs": "tsc --build tsconfig.json && echo '{ \"type\": \"commonjs\" }' > lib/cjs/package.json", + "build:esm": "tsc --build tsconfig.esm.json && echo '{ \"type\": \"module\" }' > lib/esm/package.json", "build": "npm run build:esm & npm run build:cjs", "lint": "eslint --ext .ts,.js --no-error-on-unmatched-pattern .", "lint-fix": "eslint --fix --ext .ts,.js --no-error-on-unmatched-pattern .", - "prebuild": "rimraf ./lib", - "prepack": "rimraf ./lib/*.tsbuildinfo && node ../../.github/scripts/release_patch_package_json.js ." + "prepack": "node ../../.github/scripts/release_patch_package_json.js ." }, "lint-staged": { "*.{js,ts}": "npm run lint-fix" @@ -198,4 +197,4 @@ "optional": true } } -} \ No newline at end of file +} diff --git a/packages/parameters/src/types/ConfigServiceInterface.ts b/packages/parameters/src/types/ConfigServiceInterface.ts index c422265c48..2baf93974d 100644 --- a/packages/parameters/src/types/ConfigServiceInterface.ts +++ b/packages/parameters/src/types/ConfigServiceInterface.ts @@ -8,4 +8,4 @@ interface ConfigServiceInterface { getSSMDecrypt(): string; } -export { ConfigServiceInterface }; +export type { ConfigServiceInterface }; diff --git a/packages/parameters/tsconfig.esm.json b/packages/parameters/tsconfig.esm.json index 9bed8e4da4..123291b0cf 100644 --- a/packages/parameters/tsconfig.esm.json +++ b/packages/parameters/tsconfig.esm.json @@ -3,7 +3,8 @@ "compilerOptions": { "baseUrl": ".", "outDir": "./lib/esm", - "rootDir": "./src" + "rootDir": "./src", + "tsBuildInfoFile": ".tsbuildinfo/esm.json" }, "include": [ "./src/**/*" diff --git a/packages/parameters/tsconfig.json b/packages/parameters/tsconfig.json index 5be842b9f8..4836a14962 100644 --- a/packages/parameters/tsconfig.json +++ b/packages/parameters/tsconfig.json @@ -3,6 +3,7 @@ "compilerOptions": { "outDir": "./lib/cjs/", "rootDir": "./src", + "tsBuildInfoFile": ".tsbuildinfo/cjs.json" }, "include": [ "./src/**/*" diff --git a/packages/testing/package.json b/packages/testing/package.json index c22980cb23..b4c5dc1588 100644 --- a/packages/testing/package.json +++ b/packages/testing/package.json @@ -13,13 +13,12 @@ "jest": "jest --detectOpenHandles --verbose", "test:e2e": "echo 'Not implemented'", "watch": "jest --watch", - "build:cjs": "tsc --build --force && echo '{ \"type\": \"commonjs\" }' > lib/cjs/package.json", - "build:esm": "tsc --project tsconfig.esm.json && echo '{ \"type\": \"module\" }' > lib/esm/package.json", + "build:cjs": "tsc --build tsconfig.json && echo '{ \"type\": \"commonjs\" }' > lib/cjs/package.json", + "build:esm": "tsc --build tsconfig.esm.json && echo '{ \"type\": \"module\" }' > lib/esm/package.json", "build": "npm run build:esm & npm run build:cjs", "lint": "eslint --ext .ts,.js --no-error-on-unmatched-pattern .", "lint-fix": "eslint --fix --ext .ts,.js --no-error-on-unmatched-pattern .", - "prebuild": "rimraf ./lib", - "prepack": "rimraf ./lib/*.tsbuildinfo && node ../../.github/scripts/release_patch_package_json.js ." + "prepack": "node ../../.github/scripts/release_patch_package_json.js ." }, "lint-staged": { "*.{js,ts}": "npm run lint-fix" @@ -101,4 +100,4 @@ "aws-cdk-lib": "^2.96.1", "esbuild": "^0.19.3" } -} \ No newline at end of file +} diff --git a/packages/testing/src/types.ts b/packages/testing/src/types.ts index ef38cb5347..ce11c0fc41 100644 --- a/packages/testing/src/types.ts +++ b/packages/testing/src/types.ts @@ -76,7 +76,7 @@ interface TestStackProps { stack?: Stack; } -export { +export type { ExtraTestProps, TestDynamodbTableProps, TestNodejsFunctionProps, diff --git a/packages/testing/tsconfig.esm.json b/packages/testing/tsconfig.esm.json index 9bed8e4da4..123291b0cf 100644 --- a/packages/testing/tsconfig.esm.json +++ b/packages/testing/tsconfig.esm.json @@ -3,7 +3,8 @@ "compilerOptions": { "baseUrl": ".", "outDir": "./lib/esm", - "rootDir": "./src" + "rootDir": "./src", + "tsBuildInfoFile": ".tsbuildinfo/esm.json" }, "include": [ "./src/**/*" diff --git a/packages/testing/tsconfig.json b/packages/testing/tsconfig.json index a30fdead42..f216927295 100644 --- a/packages/testing/tsconfig.json +++ b/packages/testing/tsconfig.json @@ -3,6 +3,7 @@ "compilerOptions": { "outDir": "./lib/cjs", "rootDir": "./src", + "tsBuildInfoFile": ".tsbuildinfo/cjs.json" }, "include": [ "./src/**/*" diff --git a/packages/tracer/package.json b/packages/tracer/package.json index a3534a43bc..308feb3ac1 100644 --- a/packages/tracer/package.json +++ b/packages/tracer/package.json @@ -17,13 +17,12 @@ "test:e2e:nodejs18x": "RUNTIME=nodejs18x jest --group=e2e", "test:e2e": "jest --group=e2e", "watch": "jest --watch", - "build:cjs": "tsc --build --force && echo '{ \"type\": \"commonjs\" }' > lib/cjs/package.json", - "build:esm": "tsc --project tsconfig.esm.json && echo '{ \"type\": \"module\" }' > lib/esm/package.json", + "build:cjs": "tsc --build tsconfig.json && echo '{ \"type\": \"commonjs\" }' > lib/cjs/package.json", + "build:esm": "tsc --build tsconfig.esm.json && echo '{ \"type\": \"module\" }' > lib/esm/package.json", "build": "npm run build:esm & npm run build:cjs", "lint": "eslint --ext .ts,.js --no-error-on-unmatched-pattern .", "lint-fix": "eslint --fix --ext .ts,.js --no-error-on-unmatched-pattern .", - "prebuild": "rimraf ./lib", - "prepack": "rimraf ./lib/*.tsbuildinfo && node ../../.github/scripts/release_patch_package_json.js ." + "prepack": "node ../../.github/scripts/release_patch_package_json.js ." }, "lint-staged": { "*.{js,ts}": "npm run lint-fix" @@ -105,4 +104,4 @@ "serverless", "nodejs" ] -} \ No newline at end of file +} diff --git a/packages/tracer/src/types/ConfigServiceInterface.ts b/packages/tracer/src/types/ConfigServiceInterface.ts index 78169c4de3..53b49febf9 100644 --- a/packages/tracer/src/types/ConfigServiceInterface.ts +++ b/packages/tracer/src/types/ConfigServiceInterface.ts @@ -12,4 +12,4 @@ interface ConfigServiceInterface { getTracingCaptureError(): string; } -export { ConfigServiceInterface }; +export type { ConfigServiceInterface }; diff --git a/packages/tracer/src/types/ProviderServiceInterface.ts b/packages/tracer/src/types/ProviderServiceInterface.ts index 5439b3a27d..5a704fc705 100644 --- a/packages/tracer/src/types/ProviderServiceInterface.ts +++ b/packages/tracer/src/types/ProviderServiceInterface.ts @@ -45,4 +45,4 @@ interface ProviderServiceInterface { putMetadata(key: string, value: unknown, namespace?: string): void; } -export { ProviderServiceInterface, ContextMissingStrategy }; +export type { ProviderServiceInterface, ContextMissingStrategy }; diff --git a/packages/tracer/src/types/Tracer.ts b/packages/tracer/src/types/Tracer.ts index abac332cf9..ac2e399707 100644 --- a/packages/tracer/src/types/Tracer.ts +++ b/packages/tracer/src/types/Tracer.ts @@ -134,7 +134,7 @@ interface TracerInterface { setSegment(segment: Segment | Subsegment): void; } -export { +export type { TracerOptions, CaptureLambdaHandlerOptions, CaptureMethodOptions, diff --git a/packages/tracer/src/types/index.ts b/packages/tracer/src/types/index.ts index 9c5074d83a..62fd8b99b2 100644 --- a/packages/tracer/src/types/index.ts +++ b/packages/tracer/src/types/index.ts @@ -1,4 +1,4 @@ -export { +export type { TracerOptions, CaptureLambdaHandlerOptions, CaptureMethodOptions, diff --git a/packages/tracer/tsconfig.esm.json b/packages/tracer/tsconfig.esm.json index 9bed8e4da4..123291b0cf 100644 --- a/packages/tracer/tsconfig.esm.json +++ b/packages/tracer/tsconfig.esm.json @@ -3,7 +3,8 @@ "compilerOptions": { "baseUrl": ".", "outDir": "./lib/esm", - "rootDir": "./src" + "rootDir": "./src", + "tsBuildInfoFile": ".tsbuildinfo/esm.json" }, "include": [ "./src/**/*" diff --git a/packages/tracer/tsconfig.json b/packages/tracer/tsconfig.json index a30fdead42..f216927295 100644 --- a/packages/tracer/tsconfig.json +++ b/packages/tracer/tsconfig.json @@ -3,6 +3,7 @@ "compilerOptions": { "outDir": "./lib/cjs", "rootDir": "./src", + "tsBuildInfoFile": ".tsbuildinfo/cjs.json" }, "include": [ "./src/**/*" diff --git a/tsconfig.json b/tsconfig.json index c2eb4a63ed..08d5af9848 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -5,17 +5,12 @@ "target": "ES2022", // Node.js 16 "experimentalDecorators": true, "module": "commonjs", - "moduleResolution": "node", // TODO: experiment with bundler & esnext + "moduleResolution": "node", "baseUrl": ".", // "traceResolution": true, // Enable this to debug module resolution issues "declaration": true, "removeComments": false, - // TODO: experiment with this & move to tslib in v2 - // "importHelpers": true, /* Allow importing helper functions from tslib once per project, instead of including them per-file. */ - // "downlevelIteration": true, /* Emit more compliant, but verbose and less performant JavaScript for iteration. */ - // "noEmitHelpers": true, /* Disable generating custom helper functions like '__extends' in compiled output. */ - // TODO: see if this can introduced in v2 (requires breaking changes in exports) - // "isolatedModules": true, /* Ensure that each file can be safely transpiled without relying on other imports. */ + "isolatedModules": true, "declarationMap": true, "esModuleInterop": true, "forceConsistentCasingInFileNames": true, From a669cb31fbd1e9b05bb7894dd165c3322e22c43a Mon Sep 17 00:00:00 2001 From: Andrea Amorosi Date: Mon, 30 Oct 2023 23:25:19 +0100 Subject: [PATCH 44/60] fix: idempotency types --- packages/idempotency/package.json | 24 +++++++++---------- .../src/types/IdempotencyOptions.ts | 4 ++-- 2 files changed, 14 insertions(+), 14 deletions(-) diff --git a/packages/idempotency/package.json b/packages/idempotency/package.json index 48a9850d1c..5ce3c955bb 100644 --- a/packages/idempotency/package.json +++ b/packages/idempotency/package.json @@ -59,30 +59,30 @@ }, "./types": { "import": "./lib/esm/types/index.d.ts", - "require": "./lib/esm/types/index.d.ts" + "require": "./lib/cjs/types/index.d.ts" } }, "typesVersions": { "*": { "persistence": [ - "lib/esm/persistence/index.d.ts", - "lib/cjs/persistence/index.d.ts" + "lib/cjs/persistence/index.d.ts", + "lib/esm/persistence/index.d.ts" ], "dynamodb": [ - "lib/esm/persistence/DynamoDBPersistenceLayer.d.ts", - "lib/cjs/persistence/DynamoDBPersistenceLayer.d.ts" + "lib/cjs/persistence/DynamoDBPersistenceLayer.d.ts", + "lib/esm/persistence/DynamoDBPersistenceLayer.d.ts" ], "dynamodb/types": [ - "lib/esm/types/DynamoDBPersistence.d.ts", - "lib/cjs/types/DynamoDBPersistence.d.ts" + "lib/cjs/types/DynamoDBPersistence.d.ts", + "lib/esm/types/DynamoDBPersistence.d.ts" ], "middleware": [ - "lib/esm/middleware/makeHandlerIdempotent.d.ts", - "lib/cjs/middleware/makeHandlerIdempotent.d.ts" + "lib/cjs/middleware/makeHandlerIdempotent.d.ts", + "lib/esm/middleware/makeHandlerIdempotent.d.ts" ], "types": [ - "lib/esm/types/index.d.ts", - "lib/cjs/types/index.d.ts" + "lib/cjs/types/index.d.ts", + "lib/esm/types/index.d.ts" ] } }, @@ -135,4 +135,4 @@ "aws-sdk-client-mock": "^3.0.0", "aws-sdk-client-mock-jest": "^3.0.0" } -} +} \ No newline at end of file diff --git a/packages/idempotency/src/types/IdempotencyOptions.ts b/packages/idempotency/src/types/IdempotencyOptions.ts index 0f2345cd09..c8ae467ad4 100644 --- a/packages/idempotency/src/types/IdempotencyOptions.ts +++ b/packages/idempotency/src/types/IdempotencyOptions.ts @@ -1,6 +1,6 @@ import type { Context } from 'aws-lambda'; -import { BasePersistenceLayer } from '../persistence/BasePersistenceLayer.js'; -import { IdempotencyConfig } from '../IdempotencyConfig.js'; +import type { BasePersistenceLayer } from '../persistence/BasePersistenceLayer.js'; +import type { IdempotencyConfig } from '../IdempotencyConfig.js'; import type { JSONValue } from '@aws-lambda-powertools/commons/types'; /** From 4f2ddaec85551f22a1874e9042e1a2ef573bf6b4 Mon Sep 17 00:00:00 2001 From: Andrea Amorosi Date: Mon, 30 Oct 2023 23:43:23 +0100 Subject: [PATCH 45/60] chore(idempotency): refactor aws sdk init logic (#1768) --- .../src/persistence/DynamoDBPersistenceLayer.ts | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/packages/idempotency/src/persistence/DynamoDBPersistenceLayer.ts b/packages/idempotency/src/persistence/DynamoDBPersistenceLayer.ts index 5d1a651f00..32b55777e4 100644 --- a/packages/idempotency/src/persistence/DynamoDBPersistenceLayer.ts +++ b/packages/idempotency/src/persistence/DynamoDBPersistenceLayer.ts @@ -81,15 +81,17 @@ class DynamoDBPersistenceLayer extends BasePersistenceLayer { this.staticPkValue = config.staticPkValue ?? `idempotency#${this.idempotencyKeyPrefix}`; - this.client = new DynamoDBClient(config?.clientConfig ?? {}); - if (config?.awsSdkV3Client) { - if (isSdkClient(config.awsSdkV3Client)) { - this.client = config.awsSdkV3Client; - } else { + if (config.awsSdkV3Client) { + if (!isSdkClient(config.awsSdkV3Client)) { console.warn( 'awsSdkV3Client is not an AWS SDK v3 client, using default client' ); + this.client = new DynamoDBClient(config.clientConfig ?? {}); + } else { + this.client = config.awsSdkV3Client; } + } else { + this.client = new DynamoDBClient(config.clientConfig ?? {}); } addUserAgentMiddleware(this.client, 'idempotency'); } From ae4c9ed6903107b837f1318ccfff4c4462a6c708 Mon Sep 17 00:00:00 2001 From: Andrea Amorosi Date: Tue, 31 Oct 2023 00:14:07 +0100 Subject: [PATCH 46/60] build(tracer): bump aws-xray-sdk-core to latest --- package-lock.json | 44 ++++++++++-------------------------- packages/tracer/package.json | 2 +- 2 files changed, 13 insertions(+), 33 deletions(-) diff --git a/package-lock.json b/package-lock.json index a9859c9e17..a3bd7f6fdb 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1037,26 +1037,6 @@ "node": ">=14.0.0" } }, - "node_modules/@aws-sdk/service-error-classification": { - "version": "3.374.0", - "resolved": "https://registry.npmjs.org/@aws-sdk/service-error-classification/-/service-error-classification-3.374.0.tgz", - "integrity": "sha512-7vFs0+zrP7Ni/t/e5kU/qZyLi7kRR375QWwvoR2ie3lD7cPAa+84IZqzKfcAkL2305Byb4RQrhogrsUh7ts9TA==", - "deprecated": "This package has moved to @smithy/service-error-classification", - "dependencies": { - "@smithy/service-error-classification": "^1.0.2" - }, - "engines": { - "node": ">=14.0.0" - } - }, - "node_modules/@aws-sdk/service-error-classification/node_modules/@smithy/service-error-classification": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/@smithy/service-error-classification/-/service-error-classification-1.1.0.tgz", - "integrity": "sha512-OCTEeJ1igatd5kFrS2VDlYbainNNpf7Lj1siFOxnRWqYOP9oNvC5HOJBd3t+Z8MbrmehBtuDJ2QqeBsfeiNkww==", - "engines": { - "node": ">=14.0.0" - } - }, "node_modules/@aws-sdk/token-providers": { "version": "3.418.0", "resolved": "https://registry.npmjs.org/@aws-sdk/token-providers/-/token-providers-3.418.0.tgz", @@ -4252,11 +4232,11 @@ } }, "node_modules/@smithy/service-error-classification": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/@smithy/service-error-classification/-/service-error-classification-2.0.2.tgz", - "integrity": "sha512-GTUd2j63gKy7A+ggvSdn2hc4sejG7LWfE+ZMF17vzWoNyqERWbRP7HTPS0d0Lwg1p6OQCAzvNigSrEIWVFt6iA==", + "version": "2.0.5", + "resolved": "http://18.100.245.153:4873/@smithy/service-error-classification/-/service-error-classification-2.0.5.tgz", + "integrity": "sha512-M0SeJnEgD2ywJyV99Fb1yKFzmxDe9JfpJiYTVSRMyRLc467BPU0qsuuDPzMCdB1mU8M8u1rVOdkqdoyFN8UFTw==", "dependencies": { - "@smithy/types": "^2.3.3" + "@smithy/types": "^2.4.0" }, "engines": { "node": ">=14.0.0" @@ -4307,9 +4287,9 @@ } }, "node_modules/@smithy/types": { - "version": "2.3.3", - "resolved": "https://registry.npmjs.org/@smithy/types/-/types-2.3.3.tgz", - "integrity": "sha512-zTdIPR9PvFVNRdIKMQu4M5oyTaycIbUqLheQqaOi9rTWPkgjGO2wDBxMA1rBHQB81aqAEv+DbSS4jfKyQMnXRA==", + "version": "2.4.0", + "resolved": "http://18.100.245.153:4873/@smithy/types/-/types-2.4.0.tgz", + "integrity": "sha512-iH1Xz68FWlmBJ9vvYeHifVMWJf82ONx+OybPW8ZGf5wnEv2S0UXcU4zwlwJkRXuLKpcSLHrraHbn2ucdVXLb4g==", "dependencies": { "tslib": "^2.5.0" }, @@ -6044,12 +6024,12 @@ } }, "node_modules/aws-xray-sdk-core": { - "version": "3.5.2", - "resolved": "https://registry.npmjs.org/aws-xray-sdk-core/-/aws-xray-sdk-core-3.5.2.tgz", - "integrity": "sha512-sboSTXIS0tOKYqQ5zrWX6p6k4Mrec84BNeJPHnRakcjzgsU5j8xBB5kim3BVVv+pINGLVpOD568cJzH0GI/HqQ==", + "version": "3.5.3", + "resolved": "http://18.100.245.153:4873/aws-xray-sdk-core/-/aws-xray-sdk-core-3.5.3.tgz", + "integrity": "sha512-FxDRVvIHqf3bzj76M+LSyh/1V5cYuhn+YLRS+u6Xs6WindPMDn9j03v2PNskPgvUi7pMqU40aVhQphRX/YWTfQ==", "dependencies": { - "@aws-sdk/service-error-classification": "^3.4.1", "@aws-sdk/types": "^3.4.1", + "@smithy/service-error-classification": "^2.0.4", "@types/cls-hooked": "^4.3.3", "atomic-batcher": "^1.0.2", "cls-hooked": "^4.2.2", @@ -16736,7 +16716,7 @@ "license": "MIT-0", "dependencies": { "@aws-lambda-powertools/commons": "^1.14.0", - "aws-xray-sdk-core": "^3.5.1" + "aws-xray-sdk-core": "^3.5.3" }, "devDependencies": { "@aws-lambda-powertools/testing-utils": "file:../testing", diff --git a/packages/tracer/package.json b/packages/tracer/package.json index 308feb3ac1..8ca717464d 100644 --- a/packages/tracer/package.json +++ b/packages/tracer/package.json @@ -93,7 +93,7 @@ }, "dependencies": { "@aws-lambda-powertools/commons": "^1.14.0", - "aws-xray-sdk-core": "^3.5.1" + "aws-xray-sdk-core": "^3.5.3" }, "keywords": [ "aws", From 38edc369362030c4608cca75b477998de0f7d22b Mon Sep 17 00:00:00 2001 From: Andrea Amorosi Date: Tue, 31 Oct 2023 11:02:41 +0100 Subject: [PATCH 47/60] build(maintenance): bump aws sdk dev dependencies --- package-lock.json | 1331 +++++++++++++++-------------- packages/idempotency/package.json | 6 +- packages/metrics/package.json | 4 +- packages/parameters/package.json | 10 +- packages/testing/package.json | 2 +- packages/tracer/package.json | 8 +- 6 files changed, 704 insertions(+), 657 deletions(-) diff --git a/package-lock.json b/package-lock.json index a3bd7f6fdb..198ef2f485 100644 --- a/package-lock.json +++ b/package-lock.json @@ -342,47 +342,49 @@ "link": true }, "node_modules/@aws-sdk/client-appconfigdata": { - "version": "3.421.0", - "resolved": "https://registry.npmjs.org/@aws-sdk/client-appconfigdata/-/client-appconfigdata-3.421.0.tgz", - "integrity": "sha512-QTu+RsBMcyyiU6zLr5D8n4dsBChs3fmoa6Gz/GEvqxBVAhopN2a8su8iC88zYViw7T4/J8IXM8Uh8fLulCBQ0w==", + "version": "3.438.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/client-appconfigdata/-/client-appconfigdata-3.438.0.tgz", + "integrity": "sha512-1dYl/QqZaG7hMZ1dwUb68cNc3PpXIP/H2N3c4Kwqb0NPDbjoijSmuaEQIvdWaFjY7BZtvHD/9f8YmmXaQg2SlA==", "dev": true, "dependencies": { "@aws-crypto/sha256-browser": "3.0.0", "@aws-crypto/sha256-js": "3.0.0", - "@aws-sdk/client-sts": "3.421.0", - "@aws-sdk/credential-provider-node": "3.421.0", - "@aws-sdk/middleware-host-header": "3.418.0", - "@aws-sdk/middleware-logger": "3.418.0", - "@aws-sdk/middleware-recursion-detection": "3.418.0", - "@aws-sdk/middleware-signing": "3.418.0", - "@aws-sdk/middleware-user-agent": "3.418.0", - "@aws-sdk/region-config-resolver": "3.418.0", - "@aws-sdk/types": "3.418.0", - "@aws-sdk/util-endpoints": "3.418.0", - "@aws-sdk/util-user-agent-browser": "3.418.0", - "@aws-sdk/util-user-agent-node": "3.418.0", - "@smithy/config-resolver": "^2.0.10", - "@smithy/fetch-http-handler": "^2.1.5", - "@smithy/hash-node": "^2.0.9", - "@smithy/invalid-dependency": "^2.0.9", - "@smithy/middleware-content-length": "^2.0.11", - "@smithy/middleware-endpoint": "^2.0.9", - "@smithy/middleware-retry": "^2.0.12", - "@smithy/middleware-serde": "^2.0.9", - "@smithy/middleware-stack": "^2.0.2", - "@smithy/node-config-provider": "^2.0.12", - "@smithy/node-http-handler": "^2.1.5", - "@smithy/protocol-http": "^3.0.5", - "@smithy/smithy-client": "^2.1.6", - "@smithy/types": "^2.3.3", - "@smithy/url-parser": "^2.0.9", + "@aws-sdk/client-sts": "3.438.0", + "@aws-sdk/core": "3.436.0", + "@aws-sdk/credential-provider-node": "3.438.0", + "@aws-sdk/middleware-host-header": "3.433.0", + "@aws-sdk/middleware-logger": "3.433.0", + "@aws-sdk/middleware-recursion-detection": "3.433.0", + "@aws-sdk/middleware-signing": "3.433.0", + "@aws-sdk/middleware-user-agent": "3.438.0", + "@aws-sdk/region-config-resolver": "3.433.0", + "@aws-sdk/types": "3.433.0", + "@aws-sdk/util-endpoints": "3.438.0", + "@aws-sdk/util-user-agent-browser": "3.433.0", + "@aws-sdk/util-user-agent-node": "3.437.0", + "@smithy/config-resolver": "^2.0.16", + "@smithy/fetch-http-handler": "^2.2.4", + "@smithy/hash-node": "^2.0.12", + "@smithy/invalid-dependency": "^2.0.12", + "@smithy/middleware-content-length": "^2.0.14", + "@smithy/middleware-endpoint": "^2.1.3", + "@smithy/middleware-retry": "^2.0.18", + "@smithy/middleware-serde": "^2.0.12", + "@smithy/middleware-stack": "^2.0.6", + "@smithy/node-config-provider": "^2.1.3", + "@smithy/node-http-handler": "^2.1.8", + "@smithy/protocol-http": "^3.0.8", + "@smithy/smithy-client": "^2.1.12", + "@smithy/types": "^2.4.0", + "@smithy/url-parser": "^2.0.12", "@smithy/util-base64": "^2.0.0", "@smithy/util-body-length-browser": "^2.0.0", "@smithy/util-body-length-node": "^2.1.0", - "@smithy/util-defaults-mode-browser": "^2.0.10", - "@smithy/util-defaults-mode-node": "^2.0.12", - "@smithy/util-retry": "^2.0.2", - "@smithy/util-stream": "^2.0.12", + "@smithy/util-defaults-mode-browser": "^2.0.16", + "@smithy/util-defaults-mode-node": "^2.0.21", + "@smithy/util-endpoints": "^1.0.2", + "@smithy/util-retry": "^2.0.5", + "@smithy/util-stream": "^2.0.17", "@smithy/util-utf8": "^2.0.0", "tslib": "^2.5.0" }, @@ -391,48 +393,50 @@ } }, "node_modules/@aws-sdk/client-cloudwatch": { - "version": "3.421.0", - "resolved": "https://registry.npmjs.org/@aws-sdk/client-cloudwatch/-/client-cloudwatch-3.421.0.tgz", - "integrity": "sha512-EBegld7Ks/g1tyNL+0AgTS0ZdgF0njz/AgyQwDIHXgsJVDn9tNga8wL3V2l2aj37gASJAC6PEXwK1rb0pVz4lw==", + "version": "3.438.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/client-cloudwatch/-/client-cloudwatch-3.438.0.tgz", + "integrity": "sha512-hD45RojI2nJewAv5tTvlbVl9PjT06JkPn5k4z5/XkLEdsj2393MG3vhc6B64iwkOcLe5uJh7AhWbqNbAPAaXAA==", "dev": true, "dependencies": { "@aws-crypto/sha256-browser": "3.0.0", "@aws-crypto/sha256-js": "3.0.0", - "@aws-sdk/client-sts": "3.421.0", - "@aws-sdk/credential-provider-node": "3.421.0", - "@aws-sdk/middleware-host-header": "3.418.0", - "@aws-sdk/middleware-logger": "3.418.0", - "@aws-sdk/middleware-recursion-detection": "3.418.0", - "@aws-sdk/middleware-signing": "3.418.0", - "@aws-sdk/middleware-user-agent": "3.418.0", - "@aws-sdk/region-config-resolver": "3.418.0", - "@aws-sdk/types": "3.418.0", - "@aws-sdk/util-endpoints": "3.418.0", - "@aws-sdk/util-user-agent-browser": "3.418.0", - "@aws-sdk/util-user-agent-node": "3.418.0", - "@smithy/config-resolver": "^2.0.10", - "@smithy/fetch-http-handler": "^2.1.5", - "@smithy/hash-node": "^2.0.9", - "@smithy/invalid-dependency": "^2.0.9", - "@smithy/middleware-content-length": "^2.0.11", - "@smithy/middleware-endpoint": "^2.0.9", - "@smithy/middleware-retry": "^2.0.12", - "@smithy/middleware-serde": "^2.0.9", - "@smithy/middleware-stack": "^2.0.2", - "@smithy/node-config-provider": "^2.0.12", - "@smithy/node-http-handler": "^2.1.5", - "@smithy/protocol-http": "^3.0.5", - "@smithy/smithy-client": "^2.1.6", - "@smithy/types": "^2.3.3", - "@smithy/url-parser": "^2.0.9", + "@aws-sdk/client-sts": "3.438.0", + "@aws-sdk/core": "3.436.0", + "@aws-sdk/credential-provider-node": "3.438.0", + "@aws-sdk/middleware-host-header": "3.433.0", + "@aws-sdk/middleware-logger": "3.433.0", + "@aws-sdk/middleware-recursion-detection": "3.433.0", + "@aws-sdk/middleware-signing": "3.433.0", + "@aws-sdk/middleware-user-agent": "3.438.0", + "@aws-sdk/region-config-resolver": "3.433.0", + "@aws-sdk/types": "3.433.0", + "@aws-sdk/util-endpoints": "3.438.0", + "@aws-sdk/util-user-agent-browser": "3.433.0", + "@aws-sdk/util-user-agent-node": "3.437.0", + "@smithy/config-resolver": "^2.0.16", + "@smithy/fetch-http-handler": "^2.2.4", + "@smithy/hash-node": "^2.0.12", + "@smithy/invalid-dependency": "^2.0.12", + "@smithy/middleware-content-length": "^2.0.14", + "@smithy/middleware-endpoint": "^2.1.3", + "@smithy/middleware-retry": "^2.0.18", + "@smithy/middleware-serde": "^2.0.12", + "@smithy/middleware-stack": "^2.0.6", + "@smithy/node-config-provider": "^2.1.3", + "@smithy/node-http-handler": "^2.1.8", + "@smithy/protocol-http": "^3.0.8", + "@smithy/smithy-client": "^2.1.12", + "@smithy/types": "^2.4.0", + "@smithy/url-parser": "^2.0.12", "@smithy/util-base64": "^2.0.0", "@smithy/util-body-length-browser": "^2.0.0", "@smithy/util-body-length-node": "^2.1.0", - "@smithy/util-defaults-mode-browser": "^2.0.10", - "@smithy/util-defaults-mode-node": "^2.0.12", - "@smithy/util-retry": "^2.0.2", + "@smithy/util-defaults-mode-browser": "^2.0.16", + "@smithy/util-defaults-mode-node": "^2.0.21", + "@smithy/util-endpoints": "^1.0.2", + "@smithy/util-retry": "^2.0.5", "@smithy/util-utf8": "^2.0.0", - "@smithy/util-waiter": "^2.0.9", + "@smithy/util-waiter": "^2.0.12", "fast-xml-parser": "4.2.5", "tslib": "^2.5.0" }, @@ -441,48 +445,50 @@ } }, "node_modules/@aws-sdk/client-dynamodb": { - "version": "3.421.0", - "resolved": "https://registry.npmjs.org/@aws-sdk/client-dynamodb/-/client-dynamodb-3.421.0.tgz", - "integrity": "sha512-TXyKvEYAxoz3LNpXSvPaLp139X06yzz35SNzKKNt/z7lfbmZ/jY7jVK4nur/Y5GSSlL+duW5yeS4iqq67kdl9Q==", + "version": "3.438.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/client-dynamodb/-/client-dynamodb-3.438.0.tgz", + "integrity": "sha512-LBKYjMezMRsxXP1BDnav/rUpwTOXrnD8OQKeYMbVfH0mmCDwd7Ac0cMyRM1c14sdm6Rr0gOCHIZ3Mjbup9r27Q==", "dependencies": { "@aws-crypto/sha256-browser": "3.0.0", "@aws-crypto/sha256-js": "3.0.0", - "@aws-sdk/client-sts": "3.421.0", - "@aws-sdk/credential-provider-node": "3.421.0", - "@aws-sdk/middleware-endpoint-discovery": "3.418.0", - "@aws-sdk/middleware-host-header": "3.418.0", - "@aws-sdk/middleware-logger": "3.418.0", - "@aws-sdk/middleware-recursion-detection": "3.418.0", - "@aws-sdk/middleware-signing": "3.418.0", - "@aws-sdk/middleware-user-agent": "3.418.0", - "@aws-sdk/region-config-resolver": "3.418.0", - "@aws-sdk/types": "3.418.0", - "@aws-sdk/util-endpoints": "3.418.0", - "@aws-sdk/util-user-agent-browser": "3.418.0", - "@aws-sdk/util-user-agent-node": "3.418.0", - "@smithy/config-resolver": "^2.0.10", - "@smithy/fetch-http-handler": "^2.1.5", - "@smithy/hash-node": "^2.0.9", - "@smithy/invalid-dependency": "^2.0.9", - "@smithy/middleware-content-length": "^2.0.11", - "@smithy/middleware-endpoint": "^2.0.9", - "@smithy/middleware-retry": "^2.0.12", - "@smithy/middleware-serde": "^2.0.9", - "@smithy/middleware-stack": "^2.0.2", - "@smithy/node-config-provider": "^2.0.12", - "@smithy/node-http-handler": "^2.1.5", - "@smithy/protocol-http": "^3.0.5", - "@smithy/smithy-client": "^2.1.6", - "@smithy/types": "^2.3.3", - "@smithy/url-parser": "^2.0.9", + "@aws-sdk/client-sts": "3.438.0", + "@aws-sdk/core": "3.436.0", + "@aws-sdk/credential-provider-node": "3.438.0", + "@aws-sdk/middleware-endpoint-discovery": "3.433.0", + "@aws-sdk/middleware-host-header": "3.433.0", + "@aws-sdk/middleware-logger": "3.433.0", + "@aws-sdk/middleware-recursion-detection": "3.433.0", + "@aws-sdk/middleware-signing": "3.433.0", + "@aws-sdk/middleware-user-agent": "3.438.0", + "@aws-sdk/region-config-resolver": "3.433.0", + "@aws-sdk/types": "3.433.0", + "@aws-sdk/util-endpoints": "3.438.0", + "@aws-sdk/util-user-agent-browser": "3.433.0", + "@aws-sdk/util-user-agent-node": "3.437.0", + "@smithy/config-resolver": "^2.0.16", + "@smithy/fetch-http-handler": "^2.2.4", + "@smithy/hash-node": "^2.0.12", + "@smithy/invalid-dependency": "^2.0.12", + "@smithy/middleware-content-length": "^2.0.14", + "@smithy/middleware-endpoint": "^2.1.3", + "@smithy/middleware-retry": "^2.0.18", + "@smithy/middleware-serde": "^2.0.12", + "@smithy/middleware-stack": "^2.0.6", + "@smithy/node-config-provider": "^2.1.3", + "@smithy/node-http-handler": "^2.1.8", + "@smithy/protocol-http": "^3.0.8", + "@smithy/smithy-client": "^2.1.12", + "@smithy/types": "^2.4.0", + "@smithy/url-parser": "^2.0.12", "@smithy/util-base64": "^2.0.0", "@smithy/util-body-length-browser": "^2.0.0", "@smithy/util-body-length-node": "^2.1.0", - "@smithy/util-defaults-mode-browser": "^2.0.10", - "@smithy/util-defaults-mode-node": "^2.0.12", - "@smithy/util-retry": "^2.0.2", + "@smithy/util-defaults-mode-browser": "^2.0.16", + "@smithy/util-defaults-mode-node": "^2.0.21", + "@smithy/util-endpoints": "^1.0.2", + "@smithy/util-retry": "^2.0.5", "@smithy/util-utf8": "^2.0.0", - "@smithy/util-waiter": "^2.0.9", + "@smithy/util-waiter": "^2.0.12", "tslib": "^2.5.0", "uuid": "^8.3.2" }, @@ -491,51 +497,53 @@ } }, "node_modules/@aws-sdk/client-lambda": { - "version": "3.421.0", - "resolved": "https://registry.npmjs.org/@aws-sdk/client-lambda/-/client-lambda-3.421.0.tgz", - "integrity": "sha512-cMk7JeQlyoeIxabVsZXr3rwIfgxSL4kJpoDgFu8q+hnifOdgD8gP6AhMfYu+NMroXjUntXu+ZJbo5eBTn80OtQ==", + "version": "3.438.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/client-lambda/-/client-lambda-3.438.0.tgz", + "integrity": "sha512-FiWjoOabqJcJFHUJBZMzrL1IuvPNNrBnhVJknKo7SGiPtz8xeKZJ4VeJcClQjqGzuEbQCtqp/Ki5F7/EK3qv+w==", "dependencies": { "@aws-crypto/sha256-browser": "3.0.0", "@aws-crypto/sha256-js": "3.0.0", - "@aws-sdk/client-sts": "3.421.0", - "@aws-sdk/credential-provider-node": "3.421.0", - "@aws-sdk/middleware-host-header": "3.418.0", - "@aws-sdk/middleware-logger": "3.418.0", - "@aws-sdk/middleware-recursion-detection": "3.418.0", - "@aws-sdk/middleware-signing": "3.418.0", - "@aws-sdk/middleware-user-agent": "3.418.0", - "@aws-sdk/region-config-resolver": "3.418.0", - "@aws-sdk/types": "3.418.0", - "@aws-sdk/util-endpoints": "3.418.0", - "@aws-sdk/util-user-agent-browser": "3.418.0", - "@aws-sdk/util-user-agent-node": "3.418.0", - "@smithy/config-resolver": "^2.0.10", - "@smithy/eventstream-serde-browser": "^2.0.9", - "@smithy/eventstream-serde-config-resolver": "^2.0.9", - "@smithy/eventstream-serde-node": "^2.0.9", - "@smithy/fetch-http-handler": "^2.1.5", - "@smithy/hash-node": "^2.0.9", - "@smithy/invalid-dependency": "^2.0.9", - "@smithy/middleware-content-length": "^2.0.11", - "@smithy/middleware-endpoint": "^2.0.9", - "@smithy/middleware-retry": "^2.0.12", - "@smithy/middleware-serde": "^2.0.9", - "@smithy/middleware-stack": "^2.0.2", - "@smithy/node-config-provider": "^2.0.12", - "@smithy/node-http-handler": "^2.1.5", - "@smithy/protocol-http": "^3.0.5", - "@smithy/smithy-client": "^2.1.6", - "@smithy/types": "^2.3.3", - "@smithy/url-parser": "^2.0.9", + "@aws-sdk/client-sts": "3.438.0", + "@aws-sdk/core": "3.436.0", + "@aws-sdk/credential-provider-node": "3.438.0", + "@aws-sdk/middleware-host-header": "3.433.0", + "@aws-sdk/middleware-logger": "3.433.0", + "@aws-sdk/middleware-recursion-detection": "3.433.0", + "@aws-sdk/middleware-signing": "3.433.0", + "@aws-sdk/middleware-user-agent": "3.438.0", + "@aws-sdk/region-config-resolver": "3.433.0", + "@aws-sdk/types": "3.433.0", + "@aws-sdk/util-endpoints": "3.438.0", + "@aws-sdk/util-user-agent-browser": "3.433.0", + "@aws-sdk/util-user-agent-node": "3.437.0", + "@smithy/config-resolver": "^2.0.16", + "@smithy/eventstream-serde-browser": "^2.0.12", + "@smithy/eventstream-serde-config-resolver": "^2.0.12", + "@smithy/eventstream-serde-node": "^2.0.12", + "@smithy/fetch-http-handler": "^2.2.4", + "@smithy/hash-node": "^2.0.12", + "@smithy/invalid-dependency": "^2.0.12", + "@smithy/middleware-content-length": "^2.0.14", + "@smithy/middleware-endpoint": "^2.1.3", + "@smithy/middleware-retry": "^2.0.18", + "@smithy/middleware-serde": "^2.0.12", + "@smithy/middleware-stack": "^2.0.6", + "@smithy/node-config-provider": "^2.1.3", + "@smithy/node-http-handler": "^2.1.8", + "@smithy/protocol-http": "^3.0.8", + "@smithy/smithy-client": "^2.1.12", + "@smithy/types": "^2.4.0", + "@smithy/url-parser": "^2.0.12", "@smithy/util-base64": "^2.0.0", "@smithy/util-body-length-browser": "^2.0.0", "@smithy/util-body-length-node": "^2.1.0", - "@smithy/util-defaults-mode-browser": "^2.0.10", - "@smithy/util-defaults-mode-node": "^2.0.12", - "@smithy/util-retry": "^2.0.2", - "@smithy/util-stream": "^2.0.12", + "@smithy/util-defaults-mode-browser": "^2.0.16", + "@smithy/util-defaults-mode-node": "^2.0.21", + "@smithy/util-endpoints": "^1.0.2", + "@smithy/util-retry": "^2.0.5", + "@smithy/util-stream": "^2.0.17", "@smithy/util-utf8": "^2.0.0", - "@smithy/util-waiter": "^2.0.9", + "@smithy/util-waiter": "^2.0.12", "tslib": "^2.5.0" }, "engines": { @@ -543,46 +551,48 @@ } }, "node_modules/@aws-sdk/client-secrets-manager": { - "version": "3.421.0", - "resolved": "https://registry.npmjs.org/@aws-sdk/client-secrets-manager/-/client-secrets-manager-3.421.0.tgz", - "integrity": "sha512-uwoSstFm+A60f2/CuIDHqTJdYm4hPMNCzkI3J/pKoD4A6suLIoJ9lEKGV3fdeL456vir4RTwiJG6Llzo+zI+nA==", + "version": "3.438.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/client-secrets-manager/-/client-secrets-manager-3.438.0.tgz", + "integrity": "sha512-l0c7l0gY181D3hULDPSZjE/OUfzuCSymFLkEwfBMgiB6jZAUcfmENr90rvOt4HS+QoHhDQvf8Fc+HL8A9NSVvw==", "dev": true, "dependencies": { "@aws-crypto/sha256-browser": "3.0.0", "@aws-crypto/sha256-js": "3.0.0", - "@aws-sdk/client-sts": "3.421.0", - "@aws-sdk/credential-provider-node": "3.421.0", - "@aws-sdk/middleware-host-header": "3.418.0", - "@aws-sdk/middleware-logger": "3.418.0", - "@aws-sdk/middleware-recursion-detection": "3.418.0", - "@aws-sdk/middleware-signing": "3.418.0", - "@aws-sdk/middleware-user-agent": "3.418.0", - "@aws-sdk/region-config-resolver": "3.418.0", - "@aws-sdk/types": "3.418.0", - "@aws-sdk/util-endpoints": "3.418.0", - "@aws-sdk/util-user-agent-browser": "3.418.0", - "@aws-sdk/util-user-agent-node": "3.418.0", - "@smithy/config-resolver": "^2.0.10", - "@smithy/fetch-http-handler": "^2.1.5", - "@smithy/hash-node": "^2.0.9", - "@smithy/invalid-dependency": "^2.0.9", - "@smithy/middleware-content-length": "^2.0.11", - "@smithy/middleware-endpoint": "^2.0.9", - "@smithy/middleware-retry": "^2.0.12", - "@smithy/middleware-serde": "^2.0.9", - "@smithy/middleware-stack": "^2.0.2", - "@smithy/node-config-provider": "^2.0.12", - "@smithy/node-http-handler": "^2.1.5", - "@smithy/protocol-http": "^3.0.5", - "@smithy/smithy-client": "^2.1.6", - "@smithy/types": "^2.3.3", - "@smithy/url-parser": "^2.0.9", + "@aws-sdk/client-sts": "3.438.0", + "@aws-sdk/core": "3.436.0", + "@aws-sdk/credential-provider-node": "3.438.0", + "@aws-sdk/middleware-host-header": "3.433.0", + "@aws-sdk/middleware-logger": "3.433.0", + "@aws-sdk/middleware-recursion-detection": "3.433.0", + "@aws-sdk/middleware-signing": "3.433.0", + "@aws-sdk/middleware-user-agent": "3.438.0", + "@aws-sdk/region-config-resolver": "3.433.0", + "@aws-sdk/types": "3.433.0", + "@aws-sdk/util-endpoints": "3.438.0", + "@aws-sdk/util-user-agent-browser": "3.433.0", + "@aws-sdk/util-user-agent-node": "3.437.0", + "@smithy/config-resolver": "^2.0.16", + "@smithy/fetch-http-handler": "^2.2.4", + "@smithy/hash-node": "^2.0.12", + "@smithy/invalid-dependency": "^2.0.12", + "@smithy/middleware-content-length": "^2.0.14", + "@smithy/middleware-endpoint": "^2.1.3", + "@smithy/middleware-retry": "^2.0.18", + "@smithy/middleware-serde": "^2.0.12", + "@smithy/middleware-stack": "^2.0.6", + "@smithy/node-config-provider": "^2.1.3", + "@smithy/node-http-handler": "^2.1.8", + "@smithy/protocol-http": "^3.0.8", + "@smithy/smithy-client": "^2.1.12", + "@smithy/types": "^2.4.0", + "@smithy/url-parser": "^2.0.12", "@smithy/util-base64": "^2.0.0", "@smithy/util-body-length-browser": "^2.0.0", "@smithy/util-body-length-node": "^2.1.0", - "@smithy/util-defaults-mode-browser": "^2.0.10", - "@smithy/util-defaults-mode-node": "^2.0.12", - "@smithy/util-retry": "^2.0.2", + "@smithy/util-defaults-mode-browser": "^2.0.16", + "@smithy/util-defaults-mode-node": "^2.0.21", + "@smithy/util-endpoints": "^1.0.2", + "@smithy/util-retry": "^2.0.5", "@smithy/util-utf8": "^2.0.0", "tslib": "^2.5.0", "uuid": "^8.3.2" @@ -592,47 +602,49 @@ } }, "node_modules/@aws-sdk/client-ssm": { - "version": "3.421.0", - "resolved": "https://registry.npmjs.org/@aws-sdk/client-ssm/-/client-ssm-3.421.0.tgz", - "integrity": "sha512-xdysVX+b0kmt8uEAIlkWNqyvYKVHFQepDlERHa9sXxPB8KEdzgm/To+WlAHE0Ujg6ju0Vf4FZdKA5k/+1Pbydw==", + "version": "3.438.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/client-ssm/-/client-ssm-3.438.0.tgz", + "integrity": "sha512-ltu1YE5BWwhrdKukuLSJlZseCazTU1KCtNJDoXeUuqIKQmEiKZpTWRLOAHai280P90pmFbUdeV/jD3jXfRs+Eg==", "dependencies": { "@aws-crypto/sha256-browser": "3.0.0", "@aws-crypto/sha256-js": "3.0.0", - "@aws-sdk/client-sts": "3.421.0", - "@aws-sdk/credential-provider-node": "3.421.0", - "@aws-sdk/middleware-host-header": "3.418.0", - "@aws-sdk/middleware-logger": "3.418.0", - "@aws-sdk/middleware-recursion-detection": "3.418.0", - "@aws-sdk/middleware-signing": "3.418.0", - "@aws-sdk/middleware-user-agent": "3.418.0", - "@aws-sdk/region-config-resolver": "3.418.0", - "@aws-sdk/types": "3.418.0", - "@aws-sdk/util-endpoints": "3.418.0", - "@aws-sdk/util-user-agent-browser": "3.418.0", - "@aws-sdk/util-user-agent-node": "3.418.0", - "@smithy/config-resolver": "^2.0.10", - "@smithy/fetch-http-handler": "^2.1.5", - "@smithy/hash-node": "^2.0.9", - "@smithy/invalid-dependency": "^2.0.9", - "@smithy/middleware-content-length": "^2.0.11", - "@smithy/middleware-endpoint": "^2.0.9", - "@smithy/middleware-retry": "^2.0.12", - "@smithy/middleware-serde": "^2.0.9", - "@smithy/middleware-stack": "^2.0.2", - "@smithy/node-config-provider": "^2.0.12", - "@smithy/node-http-handler": "^2.1.5", - "@smithy/protocol-http": "^3.0.5", - "@smithy/smithy-client": "^2.1.6", - "@smithy/types": "^2.3.3", - "@smithy/url-parser": "^2.0.9", + "@aws-sdk/client-sts": "3.438.0", + "@aws-sdk/core": "3.436.0", + "@aws-sdk/credential-provider-node": "3.438.0", + "@aws-sdk/middleware-host-header": "3.433.0", + "@aws-sdk/middleware-logger": "3.433.0", + "@aws-sdk/middleware-recursion-detection": "3.433.0", + "@aws-sdk/middleware-signing": "3.433.0", + "@aws-sdk/middleware-user-agent": "3.438.0", + "@aws-sdk/region-config-resolver": "3.433.0", + "@aws-sdk/types": "3.433.0", + "@aws-sdk/util-endpoints": "3.438.0", + "@aws-sdk/util-user-agent-browser": "3.433.0", + "@aws-sdk/util-user-agent-node": "3.437.0", + "@smithy/config-resolver": "^2.0.16", + "@smithy/fetch-http-handler": "^2.2.4", + "@smithy/hash-node": "^2.0.12", + "@smithy/invalid-dependency": "^2.0.12", + "@smithy/middleware-content-length": "^2.0.14", + "@smithy/middleware-endpoint": "^2.1.3", + "@smithy/middleware-retry": "^2.0.18", + "@smithy/middleware-serde": "^2.0.12", + "@smithy/middleware-stack": "^2.0.6", + "@smithy/node-config-provider": "^2.1.3", + "@smithy/node-http-handler": "^2.1.8", + "@smithy/protocol-http": "^3.0.8", + "@smithy/smithy-client": "^2.1.12", + "@smithy/types": "^2.4.0", + "@smithy/url-parser": "^2.0.12", "@smithy/util-base64": "^2.0.0", "@smithy/util-body-length-browser": "^2.0.0", "@smithy/util-body-length-node": "^2.1.0", - "@smithy/util-defaults-mode-browser": "^2.0.10", - "@smithy/util-defaults-mode-node": "^2.0.12", - "@smithy/util-retry": "^2.0.2", + "@smithy/util-defaults-mode-browser": "^2.0.16", + "@smithy/util-defaults-mode-node": "^2.0.21", + "@smithy/util-endpoints": "^1.0.2", + "@smithy/util-retry": "^2.0.5", "@smithy/util-utf8": "^2.0.0", - "@smithy/util-waiter": "^2.0.9", + "@smithy/util-waiter": "^2.0.12", "tslib": "^2.5.0", "uuid": "^8.3.2" }, @@ -641,42 +653,44 @@ } }, "node_modules/@aws-sdk/client-sso": { - "version": "3.421.0", - "resolved": "https://registry.npmjs.org/@aws-sdk/client-sso/-/client-sso-3.421.0.tgz", - "integrity": "sha512-40CmW7K2/FZEn3CbOjbpRYeVjKu6aJQlpRHcAgEJGNoVEAnRA3YNH4H0BN2iWWITfYg3B7sIjMm5VE9fCIK1Ng==", + "version": "3.438.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/client-sso/-/client-sso-3.438.0.tgz", + "integrity": "sha512-L/xKq+K78PShLku8x5gM6lZDUp7LhFJ2ksKH7Vll+exSZq+QUaxuzjp4gqdzh6B0oIshv2jssQlUa0ScOmVRMg==", "dependencies": { "@aws-crypto/sha256-browser": "3.0.0", "@aws-crypto/sha256-js": "3.0.0", - "@aws-sdk/middleware-host-header": "3.418.0", - "@aws-sdk/middleware-logger": "3.418.0", - "@aws-sdk/middleware-recursion-detection": "3.418.0", - "@aws-sdk/middleware-user-agent": "3.418.0", - "@aws-sdk/region-config-resolver": "3.418.0", - "@aws-sdk/types": "3.418.0", - "@aws-sdk/util-endpoints": "3.418.0", - "@aws-sdk/util-user-agent-browser": "3.418.0", - "@aws-sdk/util-user-agent-node": "3.418.0", - "@smithy/config-resolver": "^2.0.10", - "@smithy/fetch-http-handler": "^2.1.5", - "@smithy/hash-node": "^2.0.9", - "@smithy/invalid-dependency": "^2.0.9", - "@smithy/middleware-content-length": "^2.0.11", - "@smithy/middleware-endpoint": "^2.0.9", - "@smithy/middleware-retry": "^2.0.12", - "@smithy/middleware-serde": "^2.0.9", - "@smithy/middleware-stack": "^2.0.2", - "@smithy/node-config-provider": "^2.0.12", - "@smithy/node-http-handler": "^2.1.5", - "@smithy/protocol-http": "^3.0.5", - "@smithy/smithy-client": "^2.1.6", - "@smithy/types": "^2.3.3", - "@smithy/url-parser": "^2.0.9", + "@aws-sdk/core": "3.436.0", + "@aws-sdk/middleware-host-header": "3.433.0", + "@aws-sdk/middleware-logger": "3.433.0", + "@aws-sdk/middleware-recursion-detection": "3.433.0", + "@aws-sdk/middleware-user-agent": "3.438.0", + "@aws-sdk/region-config-resolver": "3.433.0", + "@aws-sdk/types": "3.433.0", + "@aws-sdk/util-endpoints": "3.438.0", + "@aws-sdk/util-user-agent-browser": "3.433.0", + "@aws-sdk/util-user-agent-node": "3.437.0", + "@smithy/config-resolver": "^2.0.16", + "@smithy/fetch-http-handler": "^2.2.4", + "@smithy/hash-node": "^2.0.12", + "@smithy/invalid-dependency": "^2.0.12", + "@smithy/middleware-content-length": "^2.0.14", + "@smithy/middleware-endpoint": "^2.1.3", + "@smithy/middleware-retry": "^2.0.18", + "@smithy/middleware-serde": "^2.0.12", + "@smithy/middleware-stack": "^2.0.6", + "@smithy/node-config-provider": "^2.1.3", + "@smithy/node-http-handler": "^2.1.8", + "@smithy/protocol-http": "^3.0.8", + "@smithy/smithy-client": "^2.1.12", + "@smithy/types": "^2.4.0", + "@smithy/url-parser": "^2.0.12", "@smithy/util-base64": "^2.0.0", "@smithy/util-body-length-browser": "^2.0.0", "@smithy/util-body-length-node": "^2.1.0", - "@smithy/util-defaults-mode-browser": "^2.0.10", - "@smithy/util-defaults-mode-node": "^2.0.12", - "@smithy/util-retry": "^2.0.2", + "@smithy/util-defaults-mode-browser": "^2.0.16", + "@smithy/util-defaults-mode-node": "^2.0.21", + "@smithy/util-endpoints": "^1.0.2", + "@smithy/util-retry": "^2.0.5", "@smithy/util-utf8": "^2.0.0", "tslib": "^2.5.0" }, @@ -685,45 +699,47 @@ } }, "node_modules/@aws-sdk/client-sts": { - "version": "3.421.0", - "resolved": "https://registry.npmjs.org/@aws-sdk/client-sts/-/client-sts-3.421.0.tgz", - "integrity": "sha512-/92NOZMcdkBcvGrINk5B/l+6DGcVzYE4Ab3ME4vcY9y//u2gd0yNn5YYRSzzjVBLvhDP3u6CbTfLX2Bm4qihPw==", + "version": "3.438.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/client-sts/-/client-sts-3.438.0.tgz", + "integrity": "sha512-UBxLZKVVvbR4LHwSNSqaKx22YBSOGkavrh4SyDP8o8XOlXeRxTCllfSfjL9K5Mktp+ZwQ2NiubNcwmvUcGKbbg==", "dependencies": { "@aws-crypto/sha256-browser": "3.0.0", "@aws-crypto/sha256-js": "3.0.0", - "@aws-sdk/credential-provider-node": "3.421.0", - "@aws-sdk/middleware-host-header": "3.418.0", - "@aws-sdk/middleware-logger": "3.418.0", - "@aws-sdk/middleware-recursion-detection": "3.418.0", - "@aws-sdk/middleware-sdk-sts": "3.418.0", - "@aws-sdk/middleware-signing": "3.418.0", - "@aws-sdk/middleware-user-agent": "3.418.0", - "@aws-sdk/region-config-resolver": "3.418.0", - "@aws-sdk/types": "3.418.0", - "@aws-sdk/util-endpoints": "3.418.0", - "@aws-sdk/util-user-agent-browser": "3.418.0", - "@aws-sdk/util-user-agent-node": "3.418.0", - "@smithy/config-resolver": "^2.0.10", - "@smithy/fetch-http-handler": "^2.1.5", - "@smithy/hash-node": "^2.0.9", - "@smithy/invalid-dependency": "^2.0.9", - "@smithy/middleware-content-length": "^2.0.11", - "@smithy/middleware-endpoint": "^2.0.9", - "@smithy/middleware-retry": "^2.0.12", - "@smithy/middleware-serde": "^2.0.9", - "@smithy/middleware-stack": "^2.0.2", - "@smithy/node-config-provider": "^2.0.12", - "@smithy/node-http-handler": "^2.1.5", - "@smithy/protocol-http": "^3.0.5", - "@smithy/smithy-client": "^2.1.6", - "@smithy/types": "^2.3.3", - "@smithy/url-parser": "^2.0.9", + "@aws-sdk/core": "3.436.0", + "@aws-sdk/credential-provider-node": "3.438.0", + "@aws-sdk/middleware-host-header": "3.433.0", + "@aws-sdk/middleware-logger": "3.433.0", + "@aws-sdk/middleware-recursion-detection": "3.433.0", + "@aws-sdk/middleware-sdk-sts": "3.433.0", + "@aws-sdk/middleware-signing": "3.433.0", + "@aws-sdk/middleware-user-agent": "3.438.0", + "@aws-sdk/region-config-resolver": "3.433.0", + "@aws-sdk/types": "3.433.0", + "@aws-sdk/util-endpoints": "3.438.0", + "@aws-sdk/util-user-agent-browser": "3.433.0", + "@aws-sdk/util-user-agent-node": "3.437.0", + "@smithy/config-resolver": "^2.0.16", + "@smithy/fetch-http-handler": "^2.2.4", + "@smithy/hash-node": "^2.0.12", + "@smithy/invalid-dependency": "^2.0.12", + "@smithy/middleware-content-length": "^2.0.14", + "@smithy/middleware-endpoint": "^2.1.3", + "@smithy/middleware-retry": "^2.0.18", + "@smithy/middleware-serde": "^2.0.12", + "@smithy/middleware-stack": "^2.0.6", + "@smithy/node-config-provider": "^2.1.3", + "@smithy/node-http-handler": "^2.1.8", + "@smithy/protocol-http": "^3.0.8", + "@smithy/smithy-client": "^2.1.12", + "@smithy/types": "^2.4.0", + "@smithy/url-parser": "^2.0.12", "@smithy/util-base64": "^2.0.0", "@smithy/util-body-length-browser": "^2.0.0", "@smithy/util-body-length-node": "^2.1.0", - "@smithy/util-defaults-mode-browser": "^2.0.10", - "@smithy/util-defaults-mode-node": "^2.0.12", - "@smithy/util-retry": "^2.0.2", + "@smithy/util-defaults-mode-browser": "^2.0.16", + "@smithy/util-defaults-mode-node": "^2.0.21", + "@smithy/util-endpoints": "^1.0.2", + "@smithy/util-retry": "^2.0.5", "@smithy/util-utf8": "^2.0.0", "fast-xml-parser": "4.2.5", "tslib": "^2.5.0" @@ -733,46 +749,48 @@ } }, "node_modules/@aws-sdk/client-xray": { - "version": "3.421.0", - "resolved": "https://registry.npmjs.org/@aws-sdk/client-xray/-/client-xray-3.421.0.tgz", - "integrity": "sha512-/OrFKLGphV96e3SDM0tZ+xKPBAKw6DznwY9i+I2iwC75B8BJdLnDA6qWuwiDboEKYilVI6JAklpp59i5vmnDUA==", + "version": "3.438.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/client-xray/-/client-xray-3.438.0.tgz", + "integrity": "sha512-tNkGnVFZdKaFGWpGOWy8N9bUH9T7FarmW1Wlnnjkk8uyBYR/0wOs+ICFTEpz+orOluQ3egQdF352CJyM5MY+VQ==", "dev": true, "dependencies": { "@aws-crypto/sha256-browser": "3.0.0", "@aws-crypto/sha256-js": "3.0.0", - "@aws-sdk/client-sts": "3.421.0", - "@aws-sdk/credential-provider-node": "3.421.0", - "@aws-sdk/middleware-host-header": "3.418.0", - "@aws-sdk/middleware-logger": "3.418.0", - "@aws-sdk/middleware-recursion-detection": "3.418.0", - "@aws-sdk/middleware-signing": "3.418.0", - "@aws-sdk/middleware-user-agent": "3.418.0", - "@aws-sdk/region-config-resolver": "3.418.0", - "@aws-sdk/types": "3.418.0", - "@aws-sdk/util-endpoints": "3.418.0", - "@aws-sdk/util-user-agent-browser": "3.418.0", - "@aws-sdk/util-user-agent-node": "3.418.0", - "@smithy/config-resolver": "^2.0.10", - "@smithy/fetch-http-handler": "^2.1.5", - "@smithy/hash-node": "^2.0.9", - "@smithy/invalid-dependency": "^2.0.9", - "@smithy/middleware-content-length": "^2.0.11", - "@smithy/middleware-endpoint": "^2.0.9", - "@smithy/middleware-retry": "^2.0.12", - "@smithy/middleware-serde": "^2.0.9", - "@smithy/middleware-stack": "^2.0.2", - "@smithy/node-config-provider": "^2.0.12", - "@smithy/node-http-handler": "^2.1.5", - "@smithy/protocol-http": "^3.0.5", - "@smithy/smithy-client": "^2.1.6", - "@smithy/types": "^2.3.3", - "@smithy/url-parser": "^2.0.9", + "@aws-sdk/client-sts": "3.438.0", + "@aws-sdk/core": "3.436.0", + "@aws-sdk/credential-provider-node": "3.438.0", + "@aws-sdk/middleware-host-header": "3.433.0", + "@aws-sdk/middleware-logger": "3.433.0", + "@aws-sdk/middleware-recursion-detection": "3.433.0", + "@aws-sdk/middleware-signing": "3.433.0", + "@aws-sdk/middleware-user-agent": "3.438.0", + "@aws-sdk/region-config-resolver": "3.433.0", + "@aws-sdk/types": "3.433.0", + "@aws-sdk/util-endpoints": "3.438.0", + "@aws-sdk/util-user-agent-browser": "3.433.0", + "@aws-sdk/util-user-agent-node": "3.437.0", + "@smithy/config-resolver": "^2.0.16", + "@smithy/fetch-http-handler": "^2.2.4", + "@smithy/hash-node": "^2.0.12", + "@smithy/invalid-dependency": "^2.0.12", + "@smithy/middleware-content-length": "^2.0.14", + "@smithy/middleware-endpoint": "^2.1.3", + "@smithy/middleware-retry": "^2.0.18", + "@smithy/middleware-serde": "^2.0.12", + "@smithy/middleware-stack": "^2.0.6", + "@smithy/node-config-provider": "^2.1.3", + "@smithy/node-http-handler": "^2.1.8", + "@smithy/protocol-http": "^3.0.8", + "@smithy/smithy-client": "^2.1.12", + "@smithy/types": "^2.4.0", + "@smithy/url-parser": "^2.0.12", "@smithy/util-base64": "^2.0.0", "@smithy/util-body-length-browser": "^2.0.0", "@smithy/util-body-length-node": "^2.1.0", - "@smithy/util-defaults-mode-browser": "^2.0.10", - "@smithy/util-defaults-mode-node": "^2.0.12", - "@smithy/util-retry": "^2.0.2", + "@smithy/util-defaults-mode-browser": "^2.0.16", + "@smithy/util-defaults-mode-node": "^2.0.21", + "@smithy/util-endpoints": "^1.0.2", + "@smithy/util-retry": "^2.0.5", "@smithy/util-utf8": "^2.0.0", "tslib": "^2.5.0" }, @@ -780,14 +798,25 @@ "node": ">=14.0.0" } }, + "node_modules/@aws-sdk/core": { + "version": "3.436.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/core/-/core-3.436.0.tgz", + "integrity": "sha512-vX5/LjXvCejC2XUY6TSg1oozjqK6BvkE75t0ys9dgqyr5PlZyZksMoeAFHUlj0sCjhT3ziWCujP1oiSpPWY9hg==", + "dependencies": { + "@smithy/smithy-client": "^2.1.12" + }, + "engines": { + "node": ">=14.0.0" + } + }, "node_modules/@aws-sdk/credential-provider-env": { - "version": "3.418.0", - "resolved": "https://registry.npmjs.org/@aws-sdk/credential-provider-env/-/credential-provider-env-3.418.0.tgz", - "integrity": "sha512-e74sS+x63EZUBO+HaI8zor886YdtmULzwKdctsZp5/37Xho1CVUNtEC+fYa69nigBD9afoiH33I4JggaHgrekQ==", + "version": "3.433.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/credential-provider-env/-/credential-provider-env-3.433.0.tgz", + "integrity": "sha512-Vl7Qz5qYyxBurMn6hfSiNJeUHSqfVUlMt0C1Bds3tCkl3IzecRWwyBOlxtxO3VCrgVeW3HqswLzCvhAFzPH6nQ==", "dependencies": { - "@aws-sdk/types": "3.418.0", + "@aws-sdk/types": "3.433.0", "@smithy/property-provider": "^2.0.0", - "@smithy/types": "^2.3.3", + "@smithy/types": "^2.4.0", "tslib": "^2.5.0" }, "engines": { @@ -795,19 +824,19 @@ } }, "node_modules/@aws-sdk/credential-provider-ini": { - "version": "3.421.0", - "resolved": "https://registry.npmjs.org/@aws-sdk/credential-provider-ini/-/credential-provider-ini-3.421.0.tgz", - "integrity": "sha512-J5yH/gkpAk6FMeH5F9u5Nr6oG+97tj1kkn5q49g3XMbtWw7GiynadxdtoRBCeIg1C7o2LOQx4B1AnhNhIw1z/g==", - "dependencies": { - "@aws-sdk/credential-provider-env": "3.418.0", - "@aws-sdk/credential-provider-process": "3.418.0", - "@aws-sdk/credential-provider-sso": "3.421.0", - "@aws-sdk/credential-provider-web-identity": "3.418.0", - "@aws-sdk/types": "3.418.0", + "version": "3.438.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/credential-provider-ini/-/credential-provider-ini-3.438.0.tgz", + "integrity": "sha512-WYPQR3pXoHJjn9/RMWipUhsUNFy6zhOiII6u8LJ5w84aNqIjV4+BdRYztRNGJD98jdtekhbkX0YKoSuZqP+unQ==", + "dependencies": { + "@aws-sdk/credential-provider-env": "3.433.0", + "@aws-sdk/credential-provider-process": "3.433.0", + "@aws-sdk/credential-provider-sso": "3.438.0", + "@aws-sdk/credential-provider-web-identity": "3.433.0", + "@aws-sdk/types": "3.433.0", "@smithy/credential-provider-imds": "^2.0.0", "@smithy/property-provider": "^2.0.0", "@smithy/shared-ini-file-loader": "^2.0.6", - "@smithy/types": "^2.3.3", + "@smithy/types": "^2.4.0", "tslib": "^2.5.0" }, "engines": { @@ -815,20 +844,20 @@ } }, "node_modules/@aws-sdk/credential-provider-node": { - "version": "3.421.0", - "resolved": "https://registry.npmjs.org/@aws-sdk/credential-provider-node/-/credential-provider-node-3.421.0.tgz", - "integrity": "sha512-g1dvdvfDj0u8B/gOsHR3o1arP4O4QE/dFm2IJBYr/eUdKISMUgbQULWtg4zdtAf0Oz4xN0723i7fpXAF1gTnRA==", - "dependencies": { - "@aws-sdk/credential-provider-env": "3.418.0", - "@aws-sdk/credential-provider-ini": "3.421.0", - "@aws-sdk/credential-provider-process": "3.418.0", - "@aws-sdk/credential-provider-sso": "3.421.0", - "@aws-sdk/credential-provider-web-identity": "3.418.0", - "@aws-sdk/types": "3.418.0", + "version": "3.438.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/credential-provider-node/-/credential-provider-node-3.438.0.tgz", + "integrity": "sha512-uaw3D2R0svyrC32qyZ2aOv/l0AT9eClh+eQsZJTQD3Kz9q+2VdeOBThQ8fsMfRtm26nUbZo6A/CRwxkm6okI+w==", + "dependencies": { + "@aws-sdk/credential-provider-env": "3.433.0", + "@aws-sdk/credential-provider-ini": "3.438.0", + "@aws-sdk/credential-provider-process": "3.433.0", + "@aws-sdk/credential-provider-sso": "3.438.0", + "@aws-sdk/credential-provider-web-identity": "3.433.0", + "@aws-sdk/types": "3.433.0", "@smithy/credential-provider-imds": "^2.0.0", "@smithy/property-provider": "^2.0.0", "@smithy/shared-ini-file-loader": "^2.0.6", - "@smithy/types": "^2.3.3", + "@smithy/types": "^2.4.0", "tslib": "^2.5.0" }, "engines": { @@ -836,14 +865,14 @@ } }, "node_modules/@aws-sdk/credential-provider-process": { - "version": "3.418.0", - "resolved": "https://registry.npmjs.org/@aws-sdk/credential-provider-process/-/credential-provider-process-3.418.0.tgz", - "integrity": "sha512-xPbdm2WKz1oH6pTkrJoUmr3OLuqvvcPYTQX0IIlc31tmDwDWPQjXGGFD/vwZGIZIkKaFpFxVMgAzfFScxox7dw==", + "version": "3.433.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/credential-provider-process/-/credential-provider-process-3.433.0.tgz", + "integrity": "sha512-W7FcGlQjio9Y/PepcZGRyl5Bpwb0uWU7qIUCh+u4+q2mW4D5ZngXg8V/opL9/I/p4tUH9VXZLyLGwyBSkdhL+A==", "dependencies": { - "@aws-sdk/types": "3.418.0", + "@aws-sdk/types": "3.433.0", "@smithy/property-provider": "^2.0.0", "@smithy/shared-ini-file-loader": "^2.0.6", - "@smithy/types": "^2.3.3", + "@smithy/types": "^2.4.0", "tslib": "^2.5.0" }, "engines": { @@ -851,16 +880,16 @@ } }, "node_modules/@aws-sdk/credential-provider-sso": { - "version": "3.421.0", - "resolved": "https://registry.npmjs.org/@aws-sdk/credential-provider-sso/-/credential-provider-sso-3.421.0.tgz", - "integrity": "sha512-f8T3L5rhImL6T6RTSvbOxaWw9k2fDOT2DZbNjcPz9ITWmwXj2NNbdHGWuRi3dv2HoY/nW2IJdNxnhdhbn6Fc1A==", + "version": "3.438.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/credential-provider-sso/-/credential-provider-sso-3.438.0.tgz", + "integrity": "sha512-Xykli/64xR18cBV5P0XFxcH120omtfAjC/cFy/9nFU/+dPvbk0uu1yEOZYteWHyGGkPN4PkHmbh60GiUCLQkWQ==", "dependencies": { - "@aws-sdk/client-sso": "3.421.0", - "@aws-sdk/token-providers": "3.418.0", - "@aws-sdk/types": "3.418.0", + "@aws-sdk/client-sso": "3.438.0", + "@aws-sdk/token-providers": "3.438.0", + "@aws-sdk/types": "3.433.0", "@smithy/property-provider": "^2.0.0", "@smithy/shared-ini-file-loader": "^2.0.6", - "@smithy/types": "^2.3.3", + "@smithy/types": "^2.4.0", "tslib": "^2.5.0" }, "engines": { @@ -868,13 +897,13 @@ } }, "node_modules/@aws-sdk/credential-provider-web-identity": { - "version": "3.418.0", - "resolved": "https://registry.npmjs.org/@aws-sdk/credential-provider-web-identity/-/credential-provider-web-identity-3.418.0.tgz", - "integrity": "sha512-do7ang565n9p3dS1JdsQY01rUfRx8vkxQqz5M8OlcEHBNiCdi2PvSjNwcBdrv/FKkyIxZb0TImOfBSt40hVdxQ==", + "version": "3.433.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/credential-provider-web-identity/-/credential-provider-web-identity-3.433.0.tgz", + "integrity": "sha512-RlwjP1I5wO+aPpwyCp23Mk8nmRbRL33hqRASy73c4JA2z2YiRua+ryt6MalIxehhwQU6xvXUKulJnPG9VaMFZg==", "dependencies": { - "@aws-sdk/types": "3.418.0", + "@aws-sdk/types": "3.433.0", "@smithy/property-provider": "^2.0.0", - "@smithy/types": "^2.3.3", + "@smithy/types": "^2.4.0", "tslib": "^2.5.0" }, "engines": { @@ -905,11 +934,11 @@ } }, "node_modules/@aws-sdk/lib-dynamodb": { - "version": "3.421.0", - "resolved": "https://registry.npmjs.org/@aws-sdk/lib-dynamodb/-/lib-dynamodb-3.421.0.tgz", - "integrity": "sha512-S76WsVMoYyUu4LRcEhC+GD8sEqJqrpgAhb06SMqZ1pfLGzezpESUg0xytXHMgHOaR2A38LNR+ARFeTCf9vNmoA==", + "version": "3.438.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/lib-dynamodb/-/lib-dynamodb-3.438.0.tgz", + "integrity": "sha512-LJXfLabOLytVLBWHVdiPHZCR8RSNCLzaadyLovVXrAPe+c2mbpyUJ+ojO0fB1AlVJnfxcDZLskzUYSP4sw0v5w==", "dependencies": { - "@aws-sdk/util-dynamodb": "3.421.0", + "@aws-sdk/util-dynamodb": "3.438.0", "tslib": "^2.5.0" }, "engines": { @@ -920,15 +949,15 @@ } }, "node_modules/@aws-sdk/middleware-endpoint-discovery": { - "version": "3.418.0", - "resolved": "https://registry.npmjs.org/@aws-sdk/middleware-endpoint-discovery/-/middleware-endpoint-discovery-3.418.0.tgz", - "integrity": "sha512-KRhvFQDzTrayXzswx6KhS+oBDH0NoDT+vERCqvFsGvus+/HhVGACVxINuOJ+b6mqdUPfipSD4Bje3XYunqxbSw==", + "version": "3.433.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/middleware-endpoint-discovery/-/middleware-endpoint-discovery-3.433.0.tgz", + "integrity": "sha512-eGQcncEtnQs2wMpLkJoreba/5547/eDDojGLuGjBmKtbZbVNZ9nbyCC//WIsmgT5CR5Bg9D+bNSsijmYpU6Qpg==", "dependencies": { "@aws-sdk/endpoint-cache": "3.310.0", - "@aws-sdk/types": "3.418.0", - "@smithy/node-config-provider": "^2.0.12", - "@smithy/protocol-http": "^3.0.5", - "@smithy/types": "^2.3.3", + "@aws-sdk/types": "3.433.0", + "@smithy/node-config-provider": "^2.1.3", + "@smithy/protocol-http": "^3.0.8", + "@smithy/types": "^2.4.0", "tslib": "^2.5.0" }, "engines": { @@ -936,13 +965,13 @@ } }, "node_modules/@aws-sdk/middleware-host-header": { - "version": "3.418.0", - "resolved": "https://registry.npmjs.org/@aws-sdk/middleware-host-header/-/middleware-host-header-3.418.0.tgz", - "integrity": "sha512-LrMTdzalkPw/1ujLCKPLwCGvPMCmT4P+vOZQRbSEVZPnlZk+Aj++aL/RaHou0jL4kJH3zl8iQepriBt4a7UvXQ==", + "version": "3.433.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/middleware-host-header/-/middleware-host-header-3.433.0.tgz", + "integrity": "sha512-mBTq3UWv1UzeHG+OfUQ2MB/5GEkt5LTKFaUqzL7ESwzW8XtpBgXnjZvIwu3Vcd3sEetMwijwaGiJhY0ae/YyaA==", "dependencies": { - "@aws-sdk/types": "3.418.0", - "@smithy/protocol-http": "^3.0.5", - "@smithy/types": "^2.3.3", + "@aws-sdk/types": "3.433.0", + "@smithy/protocol-http": "^3.0.8", + "@smithy/types": "^2.4.0", "tslib": "^2.5.0" }, "engines": { @@ -950,12 +979,12 @@ } }, "node_modules/@aws-sdk/middleware-logger": { - "version": "3.418.0", - "resolved": "https://registry.npmjs.org/@aws-sdk/middleware-logger/-/middleware-logger-3.418.0.tgz", - "integrity": "sha512-StKGmyPVfoO/wdNTtKemYwoJsqIl4l7oqarQY7VSf2Mp3mqaa+njLViHsQbirYpyqpgUEusOnuTlH5utxJ1NsQ==", + "version": "3.433.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/middleware-logger/-/middleware-logger-3.433.0.tgz", + "integrity": "sha512-We346Fb5xGonTGVZC9Nvqtnqy74VJzYuTLLiuuftA5sbNzftBDy/22QCfvYSTOAl3bvif+dkDUzQY2ihc5PwOQ==", "dependencies": { - "@aws-sdk/types": "3.418.0", - "@smithy/types": "^2.3.3", + "@aws-sdk/types": "3.433.0", + "@smithy/types": "^2.4.0", "tslib": "^2.5.0" }, "engines": { @@ -963,13 +992,13 @@ } }, "node_modules/@aws-sdk/middleware-recursion-detection": { - "version": "3.418.0", - "resolved": "https://registry.npmjs.org/@aws-sdk/middleware-recursion-detection/-/middleware-recursion-detection-3.418.0.tgz", - "integrity": "sha512-kKFrIQglBLUFPbHSDy1+bbe3Na2Kd70JSUC3QLMbUHmqipXN8KeXRfAj7vTv97zXl0WzG0buV++WcNwOm1rFjg==", + "version": "3.433.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/middleware-recursion-detection/-/middleware-recursion-detection-3.433.0.tgz", + "integrity": "sha512-HEvYC9PQlWY/ccUYtLvAlwwf1iCif2TSAmLNr3YTBRVa98x6jKL0hlCrHWYklFeqOGSKy6XhE+NGJMUII0/HaQ==", "dependencies": { - "@aws-sdk/types": "3.418.0", - "@smithy/protocol-http": "^3.0.5", - "@smithy/types": "^2.3.3", + "@aws-sdk/types": "3.433.0", + "@smithy/protocol-http": "^3.0.8", + "@smithy/types": "^2.4.0", "tslib": "^2.5.0" }, "engines": { @@ -977,13 +1006,13 @@ } }, "node_modules/@aws-sdk/middleware-sdk-sts": { - "version": "3.418.0", - "resolved": "https://registry.npmjs.org/@aws-sdk/middleware-sdk-sts/-/middleware-sdk-sts-3.418.0.tgz", - "integrity": "sha512-cW8ijrCTP+mgihvcq4+TbhAcE/we5lFl4ydRqvTdtcSnYQAVQADg47rnTScQiFsPFEB3NKq7BGeyTJF9MKolPA==", + "version": "3.433.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/middleware-sdk-sts/-/middleware-sdk-sts-3.433.0.tgz", + "integrity": "sha512-ORYbJnBejUyonFl5FwIqhvI3Cq6sAp9j+JpkKZtFNma9tFPdrhmYgfCeNH32H/wGTQV/tUoQ3luh0gA4cuk6DA==", "dependencies": { - "@aws-sdk/middleware-signing": "3.418.0", - "@aws-sdk/types": "3.418.0", - "@smithy/types": "^2.3.3", + "@aws-sdk/middleware-signing": "3.433.0", + "@aws-sdk/types": "3.433.0", + "@smithy/types": "^2.4.0", "tslib": "^2.5.0" }, "engines": { @@ -991,16 +1020,16 @@ } }, "node_modules/@aws-sdk/middleware-signing": { - "version": "3.418.0", - "resolved": "https://registry.npmjs.org/@aws-sdk/middleware-signing/-/middleware-signing-3.418.0.tgz", - "integrity": "sha512-onvs5KoYQE8OlOE740RxWBGtsUyVIgAo0CzRKOQO63ZEYqpL1Os+MS1CGzdNhvQnJgJruE1WW+Ix8fjN30zKPA==", + "version": "3.433.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/middleware-signing/-/middleware-signing-3.433.0.tgz", + "integrity": "sha512-jxPvt59NZo/epMNLNTu47ikmP8v0q217I6bQFGJG7JVFnfl36zDktMwGw+0xZR80qiK47/2BWrNpta61Zd2FxQ==", "dependencies": { - "@aws-sdk/types": "3.418.0", + "@aws-sdk/types": "3.433.0", "@smithy/property-provider": "^2.0.0", - "@smithy/protocol-http": "^3.0.5", + "@smithy/protocol-http": "^3.0.8", "@smithy/signature-v4": "^2.0.0", - "@smithy/types": "^2.3.3", - "@smithy/util-middleware": "^2.0.2", + "@smithy/types": "^2.4.0", + "@smithy/util-middleware": "^2.0.5", "tslib": "^2.5.0" }, "engines": { @@ -1008,14 +1037,14 @@ } }, "node_modules/@aws-sdk/middleware-user-agent": { - "version": "3.418.0", - "resolved": "https://registry.npmjs.org/@aws-sdk/middleware-user-agent/-/middleware-user-agent-3.418.0.tgz", - "integrity": "sha512-Jdcztg9Tal9SEAL0dKRrnpKrm6LFlWmAhvuwv0dQ7bNTJxIxyEFbpqdgy7mpQHsLVZgq1Aad/7gT/72c9igyZw==", - "dependencies": { - "@aws-sdk/types": "3.418.0", - "@aws-sdk/util-endpoints": "3.418.0", - "@smithy/protocol-http": "^3.0.5", - "@smithy/types": "^2.3.3", + "version": "3.438.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/middleware-user-agent/-/middleware-user-agent-3.438.0.tgz", + "integrity": "sha512-a+xHT1wOxT6EA6YyLmrfaroKWOkwwyiktUfXKM0FsUutGzNi4fKhb5NZ2al58NsXzHgHFrasSDp+Lqbd/X2cEw==", + "dependencies": { + "@aws-sdk/types": "3.433.0", + "@aws-sdk/util-endpoints": "3.438.0", + "@smithy/protocol-http": "^3.0.8", + "@smithy/types": "^2.4.0", "tslib": "^2.5.0" }, "engines": { @@ -1023,14 +1052,14 @@ } }, "node_modules/@aws-sdk/region-config-resolver": { - "version": "3.418.0", - "resolved": "https://registry.npmjs.org/@aws-sdk/region-config-resolver/-/region-config-resolver-3.418.0.tgz", - "integrity": "sha512-lJRZ/9TjZU6yLz+mAwxJkcJZ6BmyYoIJVo1p5+BN//EFdEmC8/c0c9gXMRzfISV/mqWSttdtccpAyN4/goHTYA==", + "version": "3.433.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/region-config-resolver/-/region-config-resolver-3.433.0.tgz", + "integrity": "sha512-xpjRjCZW+CDFdcMmmhIYg81ST5UAnJh61IHziQEk0FXONrg4kjyYPZAOjEdzXQ+HxJQuGQLKPhRdzxmQnbX7pg==", "dependencies": { - "@smithy/node-config-provider": "^2.0.12", - "@smithy/types": "^2.3.3", + "@smithy/node-config-provider": "^2.1.3", + "@smithy/types": "^2.4.0", "@smithy/util-config-provider": "^2.0.0", - "@smithy/util-middleware": "^2.0.2", + "@smithy/util-middleware": "^2.0.5", "tslib": "^2.5.0" }, "engines": { @@ -1038,43 +1067,45 @@ } }, "node_modules/@aws-sdk/token-providers": { - "version": "3.418.0", - "resolved": "https://registry.npmjs.org/@aws-sdk/token-providers/-/token-providers-3.418.0.tgz", - "integrity": "sha512-9P7Q0VN0hEzTngy3Sz5eya2qEOEf0Q8qf1vB3um0gE6ID6EVAdz/nc/DztfN32MFxk8FeVBrCP5vWdoOzmd72g==", + "version": "3.438.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/token-providers/-/token-providers-3.438.0.tgz", + "integrity": "sha512-G2fUfTtU6/1ayYRMu0Pd9Ln4qYSvwJOWCqJMdkDgvXSwdgcOSOLsnAIk1AHGJDAvgLikdCzuyOsdJiexr9Vnww==", "dependencies": { "@aws-crypto/sha256-browser": "3.0.0", "@aws-crypto/sha256-js": "3.0.0", - "@aws-sdk/middleware-host-header": "3.418.0", - "@aws-sdk/middleware-logger": "3.418.0", - "@aws-sdk/middleware-recursion-detection": "3.418.0", - "@aws-sdk/middleware-user-agent": "3.418.0", - "@aws-sdk/types": "3.418.0", - "@aws-sdk/util-endpoints": "3.418.0", - "@aws-sdk/util-user-agent-browser": "3.418.0", - "@aws-sdk/util-user-agent-node": "3.418.0", - "@smithy/config-resolver": "^2.0.10", - "@smithy/fetch-http-handler": "^2.1.5", - "@smithy/hash-node": "^2.0.9", - "@smithy/invalid-dependency": "^2.0.9", - "@smithy/middleware-content-length": "^2.0.11", - "@smithy/middleware-endpoint": "^2.0.9", - "@smithy/middleware-retry": "^2.0.12", - "@smithy/middleware-serde": "^2.0.9", - "@smithy/middleware-stack": "^2.0.2", - "@smithy/node-config-provider": "^2.0.12", - "@smithy/node-http-handler": "^2.1.5", + "@aws-sdk/middleware-host-header": "3.433.0", + "@aws-sdk/middleware-logger": "3.433.0", + "@aws-sdk/middleware-recursion-detection": "3.433.0", + "@aws-sdk/middleware-user-agent": "3.438.0", + "@aws-sdk/region-config-resolver": "3.433.0", + "@aws-sdk/types": "3.433.0", + "@aws-sdk/util-endpoints": "3.438.0", + "@aws-sdk/util-user-agent-browser": "3.433.0", + "@aws-sdk/util-user-agent-node": "3.437.0", + "@smithy/config-resolver": "^2.0.16", + "@smithy/fetch-http-handler": "^2.2.4", + "@smithy/hash-node": "^2.0.12", + "@smithy/invalid-dependency": "^2.0.12", + "@smithy/middleware-content-length": "^2.0.14", + "@smithy/middleware-endpoint": "^2.1.3", + "@smithy/middleware-retry": "^2.0.18", + "@smithy/middleware-serde": "^2.0.12", + "@smithy/middleware-stack": "^2.0.6", + "@smithy/node-config-provider": "^2.1.3", + "@smithy/node-http-handler": "^2.1.8", "@smithy/property-provider": "^2.0.0", - "@smithy/protocol-http": "^3.0.5", + "@smithy/protocol-http": "^3.0.8", "@smithy/shared-ini-file-loader": "^2.0.6", - "@smithy/smithy-client": "^2.1.6", - "@smithy/types": "^2.3.3", - "@smithy/url-parser": "^2.0.9", + "@smithy/smithy-client": "^2.1.12", + "@smithy/types": "^2.4.0", + "@smithy/url-parser": "^2.0.12", "@smithy/util-base64": "^2.0.0", "@smithy/util-body-length-browser": "^2.0.0", "@smithy/util-body-length-node": "^2.1.0", - "@smithy/util-defaults-mode-browser": "^2.0.10", - "@smithy/util-defaults-mode-node": "^2.0.12", - "@smithy/util-retry": "^2.0.2", + "@smithy/util-defaults-mode-browser": "^2.0.16", + "@smithy/util-defaults-mode-node": "^2.0.21", + "@smithy/util-endpoints": "^1.0.2", + "@smithy/util-retry": "^2.0.5", "@smithy/util-utf8": "^2.0.0", "tslib": "^2.5.0" }, @@ -1083,11 +1114,11 @@ } }, "node_modules/@aws-sdk/types": { - "version": "3.418.0", - "resolved": "https://registry.npmjs.org/@aws-sdk/types/-/types-3.418.0.tgz", - "integrity": "sha512-y4PQSH+ulfFLY0+FYkaK4qbIaQI9IJNMO2xsxukW6/aNoApNymN1D2FSi2la8Qbp/iPjNDKsG8suNPm9NtsWXQ==", + "version": "3.433.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/types/-/types-3.433.0.tgz", + "integrity": "sha512-0jEE2mSrNDd8VGFjTc1otYrwYPIkzZJEIK90ZxisKvQ/EURGBhNzWn7ejWB9XCMFT6XumYLBR0V9qq5UPisWtA==", "dependencies": { - "@smithy/types": "^2.3.3", + "@smithy/types": "^2.4.0", "tslib": "^2.5.0" }, "engines": { @@ -1120,9 +1151,9 @@ } }, "node_modules/@aws-sdk/util-dynamodb": { - "version": "3.421.0", - "resolved": "https://registry.npmjs.org/@aws-sdk/util-dynamodb/-/util-dynamodb-3.421.0.tgz", - "integrity": "sha512-fCoBv8bX9ruvbxQMH0Flws3cqCjpgUQp8So0J2wwPaLEu6JoXlP1enppYEbjas4nuav9vCocORr+s+kdePw5Kg==", + "version": "3.438.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/util-dynamodb/-/util-dynamodb-3.438.0.tgz", + "integrity": "sha512-K0r30mLy3iQe3qQVJxJAp+eOuoCmrO5KVodBoC5VT1ivjtYIgGxzUWphKhaqcASjmaE+Lg0UjHKjxWGOyAEC4A==", "dependencies": { "tslib": "^2.5.0" }, @@ -1134,11 +1165,12 @@ } }, "node_modules/@aws-sdk/util-endpoints": { - "version": "3.418.0", - "resolved": "https://registry.npmjs.org/@aws-sdk/util-endpoints/-/util-endpoints-3.418.0.tgz", - "integrity": "sha512-sYSDwRTl7yE7LhHkPzemGzmIXFVHSsi3AQ1KeNEk84eBqxMHHcCc2kqklaBk2roXWe50QDgRMy1ikZUxvtzNHQ==", + "version": "3.438.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/util-endpoints/-/util-endpoints-3.438.0.tgz", + "integrity": "sha512-6VyPTq1kN3GWxwFt5DdZfOsr6cJZPLjWh0troY/0uUv3hK74C9o3Y0Xf/z8UAUvQFkVqZse12O0/BgPVMImvfA==", "dependencies": { - "@aws-sdk/types": "3.418.0", + "@aws-sdk/types": "3.433.0", + "@smithy/util-endpoints": "^1.0.2", "tslib": "^2.5.0" }, "engines": { @@ -1157,24 +1189,24 @@ } }, "node_modules/@aws-sdk/util-user-agent-browser": { - "version": "3.418.0", - "resolved": "https://registry.npmjs.org/@aws-sdk/util-user-agent-browser/-/util-user-agent-browser-3.418.0.tgz", - "integrity": "sha512-c4p4mc0VV/jIeNH0lsXzhJ1MpWRLuboGtNEpqE4s1Vl9ck2amv9VdUUZUmHbg+bVxlMgRQ4nmiovA4qIrqGuyg==", + "version": "3.433.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/util-user-agent-browser/-/util-user-agent-browser-3.433.0.tgz", + "integrity": "sha512-2Cf/Lwvxbt5RXvWFXrFr49vXv0IddiUwrZoAiwhDYxvsh+BMnh+NUFot+ZQaTrk/8IPZVDeLPWZRdVy00iaVXQ==", "dependencies": { - "@aws-sdk/types": "3.418.0", - "@smithy/types": "^2.3.3", + "@aws-sdk/types": "3.433.0", + "@smithy/types": "^2.4.0", "bowser": "^2.11.0", "tslib": "^2.5.0" } }, "node_modules/@aws-sdk/util-user-agent-node": { - "version": "3.418.0", - "resolved": "https://registry.npmjs.org/@aws-sdk/util-user-agent-node/-/util-user-agent-node-3.418.0.tgz", - "integrity": "sha512-BXMskXFtg+dmzSCgmnWOffokxIbPr1lFqa1D9kvM3l3IFRiFGx2IyDg+8MAhq11aPDLvoa/BDuQ0Yqma5izOhg==", + "version": "3.437.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/util-user-agent-node/-/util-user-agent-node-3.437.0.tgz", + "integrity": "sha512-JVEcvWaniamtYVPem4UthtCNoTBCfFTwYj7Y3CrWZ2Qic4TqrwLkAfaBGtI2TGrhIClVr77uzLI6exqMTN7orA==", "dependencies": { - "@aws-sdk/types": "3.418.0", - "@smithy/node-config-provider": "^2.0.12", - "@smithy/types": "^2.3.3", + "@aws-sdk/types": "3.433.0", + "@smithy/node-config-provider": "^2.1.3", + "@smithy/types": "^2.4.0", "tslib": "^2.5.0" }, "engines": { @@ -3934,11 +3966,11 @@ "dev": true }, "node_modules/@smithy/abort-controller": { - "version": "2.0.9", - "resolved": "https://registry.npmjs.org/@smithy/abort-controller/-/abort-controller-2.0.9.tgz", - "integrity": "sha512-8liHOEbx99xcy4VndeQNQhyA0LS+e7UqsuRnDTSIA26IKBv/7vA9w09KOd4fgNULrvX0r3WpA6cwsQTRJpSWkg==", + "version": "2.0.12", + "resolved": "https://registry.npmjs.org/@smithy/abort-controller/-/abort-controller-2.0.12.tgz", + "integrity": "sha512-YIJyefe1mi3GxKdZxEBEuzYOeQ9xpYfqnFmWzojCssRAuR7ycxwpoRQgp965vuW426xUAQhCV5rCaWElQ7XsaA==", "dependencies": { - "@smithy/types": "^2.3.3", + "@smithy/types": "^2.4.0", "tslib": "^2.5.0" }, "engines": { @@ -3946,14 +3978,14 @@ } }, "node_modules/@smithy/config-resolver": { - "version": "2.0.10", - "resolved": "https://registry.npmjs.org/@smithy/config-resolver/-/config-resolver-2.0.10.tgz", - "integrity": "sha512-MwToDsCltHjumkCuRn883qoNeJUawc2b8sX9caSn5vLz6J5crU1IklklNxWCaMO2z2nDL91Po4b/aI1eHv5PfA==", + "version": "2.0.16", + "resolved": "https://registry.npmjs.org/@smithy/config-resolver/-/config-resolver-2.0.16.tgz", + "integrity": "sha512-1k+FWHQDt2pfpXhJsOmNMmlAZ3NUQ98X5tYsjQhVGq+0X6cOBMhfh6Igd0IX3Ut6lEO6DQAdPMI/blNr3JZfMQ==", "dependencies": { - "@smithy/node-config-provider": "^2.0.12", - "@smithy/types": "^2.3.3", + "@smithy/node-config-provider": "^2.1.3", + "@smithy/types": "^2.4.0", "@smithy/util-config-provider": "^2.0.0", - "@smithy/util-middleware": "^2.0.2", + "@smithy/util-middleware": "^2.0.5", "tslib": "^2.5.0" }, "engines": { @@ -3961,14 +3993,14 @@ } }, "node_modules/@smithy/credential-provider-imds": { - "version": "2.0.12", - "resolved": "https://registry.npmjs.org/@smithy/credential-provider-imds/-/credential-provider-imds-2.0.12.tgz", - "integrity": "sha512-S3lUNe+2fEFwKcmiQniXGPXt69vaHvQCw8kYQOBL4OvJsgwfpkIYDZdroHbTshYi0M6WaKL26Mw+hvgma6dZqA==", - "dependencies": { - "@smithy/node-config-provider": "^2.0.12", - "@smithy/property-provider": "^2.0.10", - "@smithy/types": "^2.3.3", - "@smithy/url-parser": "^2.0.9", + "version": "2.0.18", + "resolved": "https://registry.npmjs.org/@smithy/credential-provider-imds/-/credential-provider-imds-2.0.18.tgz", + "integrity": "sha512-QnPBi6D2zj6AHJdUTo5zXmk8vwHJ2bNevhcVned1y+TZz/OI5cizz5DsYNkqFUIDn8tBuEyKNgbmKVNhBbuY3g==", + "dependencies": { + "@smithy/node-config-provider": "^2.1.3", + "@smithy/property-provider": "^2.0.13", + "@smithy/types": "^2.4.0", + "@smithy/url-parser": "^2.0.12", "tslib": "^2.5.0" }, "engines": { @@ -3976,23 +4008,23 @@ } }, "node_modules/@smithy/eventstream-codec": { - "version": "2.0.9", - "resolved": "https://registry.npmjs.org/@smithy/eventstream-codec/-/eventstream-codec-2.0.9.tgz", - "integrity": "sha512-sy0pcbKnawt1iu+qCoSFbs/h9PAaUgvlJEO3lqkE1HFFj4p5RgL98vH+9CyDoj6YY82cG5XsorFmcLqQJHTOYw==", + "version": "2.0.12", + "resolved": "https://registry.npmjs.org/@smithy/eventstream-codec/-/eventstream-codec-2.0.12.tgz", + "integrity": "sha512-ZZQLzHBJkbiAAdj2C5K+lBlYp/XJ+eH2uy+jgJgYIFW/o5AM59Hlj7zyI44/ZTDIQWmBxb3EFv/c5t44V8/g8A==", "dependencies": { "@aws-crypto/crc32": "3.0.0", - "@smithy/types": "^2.3.3", + "@smithy/types": "^2.4.0", "@smithy/util-hex-encoding": "^2.0.0", "tslib": "^2.5.0" } }, "node_modules/@smithy/eventstream-serde-browser": { - "version": "2.0.9", - "resolved": "https://registry.npmjs.org/@smithy/eventstream-serde-browser/-/eventstream-serde-browser-2.0.9.tgz", - "integrity": "sha512-g70enHZau2hGj1Uxedrn8AAjH9E7RnpHdwkuPKapagah53ztbwI7xaNeA5SLD4MjSjdrjathyQBCQKIzwXrR1g==", + "version": "2.0.12", + "resolved": "https://registry.npmjs.org/@smithy/eventstream-serde-browser/-/eventstream-serde-browser-2.0.12.tgz", + "integrity": "sha512-0pi8QlU/pwutNshoeJcbKR1p7Ie5STd8UFAMX5xhSoSJjNlxIv/OsHbF023jscMRN2Prrqd6ToGgdCnsZVQjvg==", "dependencies": { - "@smithy/eventstream-serde-universal": "^2.0.9", - "@smithy/types": "^2.3.3", + "@smithy/eventstream-serde-universal": "^2.0.12", + "@smithy/types": "^2.4.0", "tslib": "^2.5.0" }, "engines": { @@ -4000,11 +4032,11 @@ } }, "node_modules/@smithy/eventstream-serde-config-resolver": { - "version": "2.0.9", - "resolved": "https://registry.npmjs.org/@smithy/eventstream-serde-config-resolver/-/eventstream-serde-config-resolver-2.0.9.tgz", - "integrity": "sha512-+15GzIMtdSuRPyuCeGZ7gzgD94Ejv6eM1vKcqvipdzS+i36KTZ2A9aZsJk+gDw//OCD1EMx9SqpV6bUvMS4PWg==", + "version": "2.0.12", + "resolved": "https://registry.npmjs.org/@smithy/eventstream-serde-config-resolver/-/eventstream-serde-config-resolver-2.0.12.tgz", + "integrity": "sha512-I0XfwQkIX3gAnbrU5rLMkBSjTM9DHttdbLwf12CXmj7SSI5dT87PxtKLRrZGanaCMbdf2yCep+MW5/4M7IbvQA==", "dependencies": { - "@smithy/types": "^2.3.3", + "@smithy/types": "^2.4.0", "tslib": "^2.5.0" }, "engines": { @@ -4012,12 +4044,12 @@ } }, "node_modules/@smithy/eventstream-serde-node": { - "version": "2.0.9", - "resolved": "https://registry.npmjs.org/@smithy/eventstream-serde-node/-/eventstream-serde-node-2.0.9.tgz", - "integrity": "sha512-UEJcvN2WXXEjkewtFkj1S2HSZLbyCgzUnfoFPrTuKy4+xRfakO5dNx6ws2h1pvb8Vc7mTuBL+Webl1R5mnVsXA==", + "version": "2.0.12", + "resolved": "https://registry.npmjs.org/@smithy/eventstream-serde-node/-/eventstream-serde-node-2.0.12.tgz", + "integrity": "sha512-vf1vMHGOkG3uqN9x1zKOhnvW/XgvhJXWqjV6zZiT2FMjlEayugQ1mzpSqr7uf89+BzjTzuZKERmOsEAmewLbxw==", "dependencies": { - "@smithy/eventstream-serde-universal": "^2.0.9", - "@smithy/types": "^2.3.3", + "@smithy/eventstream-serde-universal": "^2.0.12", + "@smithy/types": "^2.4.0", "tslib": "^2.5.0" }, "engines": { @@ -4025,12 +4057,12 @@ } }, "node_modules/@smithy/eventstream-serde-universal": { - "version": "2.0.9", - "resolved": "https://registry.npmjs.org/@smithy/eventstream-serde-universal/-/eventstream-serde-universal-2.0.9.tgz", - "integrity": "sha512-dAHQEYlK/1tjjieBE7jjXwpLQFgKdkvC4HSQf+/Jj4t34XbUmXWHbw92/EuLp9+vjNB/JQPvkwpMtN31jxIDeg==", + "version": "2.0.12", + "resolved": "https://registry.npmjs.org/@smithy/eventstream-serde-universal/-/eventstream-serde-universal-2.0.12.tgz", + "integrity": "sha512-xZ3ZNpCxIND+q+UCy7y1n1/5VQEYicgSTNCcPqsKawX+Vd+6OcFX7gUHMyPzL8cZr+GdmJuxNleqHlH4giK2tw==", "dependencies": { - "@smithy/eventstream-codec": "^2.0.9", - "@smithy/types": "^2.3.3", + "@smithy/eventstream-codec": "^2.0.12", + "@smithy/types": "^2.4.0", "tslib": "^2.5.0" }, "engines": { @@ -4038,23 +4070,23 @@ } }, "node_modules/@smithy/fetch-http-handler": { - "version": "2.1.5", - "resolved": "https://registry.npmjs.org/@smithy/fetch-http-handler/-/fetch-http-handler-2.1.5.tgz", - "integrity": "sha512-BIeCHGfr5JCGN+EMTwZK74ELvjPXOIrI7OLM5OhZJJ6AmZyRv2S9ANJk18AtLwht0TsSm+8WoXIEp8LuxNgUyA==", + "version": "2.2.4", + "resolved": "https://registry.npmjs.org/@smithy/fetch-http-handler/-/fetch-http-handler-2.2.4.tgz", + "integrity": "sha512-gIPRFEGi+c6V52eauGKrjDzPWF2Cu7Z1r5F8A3j2wcwz25sPG/t8kjsbEhli/tS/2zJp/ybCZXe4j4ro3yv/HA==", "dependencies": { - "@smithy/protocol-http": "^3.0.5", - "@smithy/querystring-builder": "^2.0.9", - "@smithy/types": "^2.3.3", + "@smithy/protocol-http": "^3.0.8", + "@smithy/querystring-builder": "^2.0.12", + "@smithy/types": "^2.4.0", "@smithy/util-base64": "^2.0.0", "tslib": "^2.5.0" } }, "node_modules/@smithy/hash-node": { - "version": "2.0.9", - "resolved": "https://registry.npmjs.org/@smithy/hash-node/-/hash-node-2.0.9.tgz", - "integrity": "sha512-XP3yWd5wyCtiVmsY5Nuq/FUwyCEQ6YG7DsvRh7ThldNukGpCzyFdP8eivZJVjn4Fx7oYrrOnVoYZ0WEgpW1AvQ==", + "version": "2.0.12", + "resolved": "https://registry.npmjs.org/@smithy/hash-node/-/hash-node-2.0.12.tgz", + "integrity": "sha512-fDZnTr5j9t5qcbeJ037aMZXxMka13Znqwrgy3PAqYj6Dm3XHXHftTH3q+NWgayUxl1992GFtQt1RuEzRMy3NnQ==", "dependencies": { - "@smithy/types": "^2.3.3", + "@smithy/types": "^2.4.0", "@smithy/util-buffer-from": "^2.0.0", "@smithy/util-utf8": "^2.0.0", "tslib": "^2.5.0" @@ -4064,11 +4096,11 @@ } }, "node_modules/@smithy/invalid-dependency": { - "version": "2.0.9", - "resolved": "https://registry.npmjs.org/@smithy/invalid-dependency/-/invalid-dependency-2.0.9.tgz", - "integrity": "sha512-RuJqhYf8nViK96IIO9JbTtjDUuFItVfuuJhWw2yk7fv67yltQ7fZD6IQ2OsHHluoVmstnQJuCg5raXJR696Ubw==", + "version": "2.0.12", + "resolved": "https://registry.npmjs.org/@smithy/invalid-dependency/-/invalid-dependency-2.0.12.tgz", + "integrity": "sha512-p5Y+iMHV3SoEpy3VSR7mifbreHQwVSvHSAz/m4GdoXfOzKzaYC8hYv10Ks7Deblkf7lhas8U+lAp9ThbBM+ZXA==", "dependencies": { - "@smithy/types": "^2.3.3", + "@smithy/types": "^2.4.0", "tslib": "^2.5.0" } }, @@ -4084,12 +4116,12 @@ } }, "node_modules/@smithy/middleware-content-length": { - "version": "2.0.11", - "resolved": "https://registry.npmjs.org/@smithy/middleware-content-length/-/middleware-content-length-2.0.11.tgz", - "integrity": "sha512-Malj4voNTL4+a5ZL3a6+Ij7JTUMTa2R7c3ZIBzMxN5OUUgAspU7uFi1Q97f4B0afVh2joQBAWH5IQJUG25nl8g==", + "version": "2.0.14", + "resolved": "https://registry.npmjs.org/@smithy/middleware-content-length/-/middleware-content-length-2.0.14.tgz", + "integrity": "sha512-poUNgKTw9XwPXfX9nEHpVgrMNVpaSMZbshqvPxFVoalF4wp6kRzYKOfdesSVectlQ51VtigoLfbXcdyPwvxgTg==", "dependencies": { - "@smithy/protocol-http": "^3.0.5", - "@smithy/types": "^2.3.3", + "@smithy/protocol-http": "^3.0.8", + "@smithy/types": "^2.4.0", "tslib": "^2.5.0" }, "engines": { @@ -4097,14 +4129,16 @@ } }, "node_modules/@smithy/middleware-endpoint": { - "version": "2.0.9", - "resolved": "https://registry.npmjs.org/@smithy/middleware-endpoint/-/middleware-endpoint-2.0.9.tgz", - "integrity": "sha512-72/o8R6AAO4+nyTI6h4z6PYGTSA4dr1M7tZz29U8DEUHuh1YkhC77js0P6RyF9G0wDLuYqxb+Yh0crI5WG2pJg==", - "dependencies": { - "@smithy/middleware-serde": "^2.0.9", - "@smithy/types": "^2.3.3", - "@smithy/url-parser": "^2.0.9", - "@smithy/util-middleware": "^2.0.2", + "version": "2.1.3", + "resolved": "https://registry.npmjs.org/@smithy/middleware-endpoint/-/middleware-endpoint-2.1.3.tgz", + "integrity": "sha512-ZrQ0/YX6hNVTxqMEHtEaDbDv6pNeEji/a5Vk3HuFC5R3ZY8lfoATyxmOGxBVYnF3NUvZLNC7umEv1WzWGWvCGQ==", + "dependencies": { + "@smithy/middleware-serde": "^2.0.12", + "@smithy/node-config-provider": "^2.1.3", + "@smithy/shared-ini-file-loader": "^2.2.2", + "@smithy/types": "^2.4.0", + "@smithy/url-parser": "^2.0.12", + "@smithy/util-middleware": "^2.0.5", "tslib": "^2.5.0" }, "engines": { @@ -4112,16 +4146,16 @@ } }, "node_modules/@smithy/middleware-retry": { - "version": "2.0.12", - "resolved": "https://registry.npmjs.org/@smithy/middleware-retry/-/middleware-retry-2.0.12.tgz", - "integrity": "sha512-YQ/ufXX4/d9/+Jf1QQ4J+CVeupC7BW52qldBTvRV33PDX9vxndlAwkFwzBcmnUFC3Hjf1//HW6I77EItcjNSCA==", - "dependencies": { - "@smithy/node-config-provider": "^2.0.12", - "@smithy/protocol-http": "^3.0.5", - "@smithy/service-error-classification": "^2.0.2", - "@smithy/types": "^2.3.3", - "@smithy/util-middleware": "^2.0.2", - "@smithy/util-retry": "^2.0.2", + "version": "2.0.18", + "resolved": "https://registry.npmjs.org/@smithy/middleware-retry/-/middleware-retry-2.0.18.tgz", + "integrity": "sha512-VyrHQRldGSb3v9oFOB5yPxmLT7U2sQic2ytylOnYlnsmVOLlFIaI6sW22c+w2675yq+XZ6HOuzV7x2OBYCWRNA==", + "dependencies": { + "@smithy/node-config-provider": "^2.1.3", + "@smithy/protocol-http": "^3.0.8", + "@smithy/service-error-classification": "^2.0.5", + "@smithy/types": "^2.4.0", + "@smithy/util-middleware": "^2.0.5", + "@smithy/util-retry": "^2.0.5", "tslib": "^2.5.0", "uuid": "^8.3.2" }, @@ -4130,11 +4164,11 @@ } }, "node_modules/@smithy/middleware-serde": { - "version": "2.0.9", - "resolved": "https://registry.npmjs.org/@smithy/middleware-serde/-/middleware-serde-2.0.9.tgz", - "integrity": "sha512-GVbauxrr6WmtCaesakktg3t5LR/yDbajpC7KkWc8rtCpddMI4ShAVO5Q6DqwX8MDFi4CLaY8H7eTGcxhl3jbLg==", + "version": "2.0.12", + "resolved": "https://registry.npmjs.org/@smithy/middleware-serde/-/middleware-serde-2.0.12.tgz", + "integrity": "sha512-IBeco157lIScecq2Z+n0gq56i4MTnfKxS7rbfrAORveDJgnbBAaEQgYqMqp/cYqKrpvEXcyTjwKHrBjCCIZh2A==", "dependencies": { - "@smithy/types": "^2.3.3", + "@smithy/types": "^2.4.0", "tslib": "^2.5.0" }, "engines": { @@ -4142,11 +4176,11 @@ } }, "node_modules/@smithy/middleware-stack": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/@smithy/middleware-stack/-/middleware-stack-2.0.3.tgz", - "integrity": "sha512-AlhPmbwpkC4lQBVaVHXczmjFvsAhDHhrakqLt038qFLotnJcvDLhmMzAtu23alBeOSkKxkTQq0LsAt2N0WpAbw==", + "version": "2.0.6", + "resolved": "https://registry.npmjs.org/@smithy/middleware-stack/-/middleware-stack-2.0.6.tgz", + "integrity": "sha512-YSvNZeOKWLJ0M/ycxwDIe2Ztkp6Qixmcml1ggsSv2fdHKGkBPhGrX5tMzPGMI1yyx55UEYBi2OB4s+RriXX48A==", "dependencies": { - "@smithy/types": "^2.3.3", + "@smithy/types": "^2.4.0", "tslib": "^2.5.0" }, "engines": { @@ -4154,13 +4188,13 @@ } }, "node_modules/@smithy/node-config-provider": { - "version": "2.0.12", - "resolved": "https://registry.npmjs.org/@smithy/node-config-provider/-/node-config-provider-2.0.12.tgz", - "integrity": "sha512-df9y9ywv+JmS40Y60ZqJ4jfZiTCmyHQffwzIqjBjLJLJl0imf9F6DWBd+jiEWHvlohR+sFhyY+KL/qzKgnAq1A==", + "version": "2.1.3", + "resolved": "https://registry.npmjs.org/@smithy/node-config-provider/-/node-config-provider-2.1.3.tgz", + "integrity": "sha512-J6lXvRHGVnSX3n1PYi+e1L5HN73DkkJpUviV3Ebf+8wSaIjAf+eVNbzyvh/S5EQz7nf4KVfwbD5vdoZMAthAEQ==", "dependencies": { - "@smithy/property-provider": "^2.0.10", - "@smithy/shared-ini-file-loader": "^2.0.11", - "@smithy/types": "^2.3.3", + "@smithy/property-provider": "^2.0.13", + "@smithy/shared-ini-file-loader": "^2.2.2", + "@smithy/types": "^2.4.0", "tslib": "^2.5.0" }, "engines": { @@ -4168,14 +4202,14 @@ } }, "node_modules/@smithy/node-http-handler": { - "version": "2.1.5", - "resolved": "https://registry.npmjs.org/@smithy/node-http-handler/-/node-http-handler-2.1.5.tgz", - "integrity": "sha512-52uF+BrZaFiBh+NT/bADiVDCQO91T+OwDRsuaAeWZC1mlCXFjAPPQdxeQohtuYOe9m7mPP/xIMNiqbe8jvndHA==", - "dependencies": { - "@smithy/abort-controller": "^2.0.9", - "@smithy/protocol-http": "^3.0.5", - "@smithy/querystring-builder": "^2.0.9", - "@smithy/types": "^2.3.3", + "version": "2.1.8", + "resolved": "https://registry.npmjs.org/@smithy/node-http-handler/-/node-http-handler-2.1.8.tgz", + "integrity": "sha512-KZylM7Wff/So5SmCiwg2kQNXJ+RXgz34wkxS7WNwIUXuZrZZpY/jKJCK+ZaGyuESDu3TxcaY+zeYGJmnFKbQsA==", + "dependencies": { + "@smithy/abort-controller": "^2.0.12", + "@smithy/protocol-http": "^3.0.8", + "@smithy/querystring-builder": "^2.0.12", + "@smithy/types": "^2.4.0", "tslib": "^2.5.0" }, "engines": { @@ -4183,11 +4217,11 @@ } }, "node_modules/@smithy/property-provider": { - "version": "2.0.10", - "resolved": "https://registry.npmjs.org/@smithy/property-provider/-/property-provider-2.0.10.tgz", - "integrity": "sha512-YMBVfh0ZMmJtbsUn+WfSwR32iRljZPdRN0Tn2GAcdJ+ejX8WrBXD7Z0jIkQDrQZr8fEuuv5x8WxMIj+qVbsPQw==", + "version": "2.0.13", + "resolved": "https://registry.npmjs.org/@smithy/property-provider/-/property-provider-2.0.13.tgz", + "integrity": "sha512-VJqUf2CbsQX6uUiC5dUPuoEATuFjkbkW3lJHbRnpk9EDC9X+iKqhfTK+WP+lve5EQ9TcCI1Q6R7hrg41FyC54w==", "dependencies": { - "@smithy/types": "^2.3.3", + "@smithy/types": "^2.4.0", "tslib": "^2.5.0" }, "engines": { @@ -4195,11 +4229,11 @@ } }, "node_modules/@smithy/protocol-http": { - "version": "3.0.5", - "resolved": "https://registry.npmjs.org/@smithy/protocol-http/-/protocol-http-3.0.5.tgz", - "integrity": "sha512-3t3fxj+ip4EPHRC2fQ0JimMxR/qCQ1LSQJjZZVZFgROnFLYWPDgUZqpoi7chr+EzatxJVXF/Rtoi5yLHOWCoZQ==", + "version": "3.0.8", + "resolved": "https://registry.npmjs.org/@smithy/protocol-http/-/protocol-http-3.0.8.tgz", + "integrity": "sha512-SHJvYeWq8q0FK8xHk+xjV9dzDUDjFMT+G1pZbV+XB6OVoac/FSVshlMNPeUJ8AmSkcDKHRu5vASnRqZHgD3qhw==", "dependencies": { - "@smithy/types": "^2.3.3", + "@smithy/types": "^2.4.0", "tslib": "^2.5.0" }, "engines": { @@ -4207,11 +4241,11 @@ } }, "node_modules/@smithy/querystring-builder": { - "version": "2.0.9", - "resolved": "https://registry.npmjs.org/@smithy/querystring-builder/-/querystring-builder-2.0.9.tgz", - "integrity": "sha512-Yt6CPF4j3j1cuwod/DRflbuXxBFjJm7gAjy6W1RE21Rz5/kfGFqiZBXWmmXwGtnnhiLThYwoHK4S6/TQtnx0Fg==", + "version": "2.0.12", + "resolved": "https://registry.npmjs.org/@smithy/querystring-builder/-/querystring-builder-2.0.12.tgz", + "integrity": "sha512-cDbF07IuCjiN8CdGvPzfJjXIrmDSelScRfyJYrYBNBbKl2+k7QD/KqiHhtRyEKgID5mmEVrV6KE6L/iPJ98sFw==", "dependencies": { - "@smithy/types": "^2.3.3", + "@smithy/types": "^2.4.0", "@smithy/util-uri-escape": "^2.0.0", "tslib": "^2.5.0" }, @@ -4220,11 +4254,11 @@ } }, "node_modules/@smithy/querystring-parser": { - "version": "2.0.9", - "resolved": "https://registry.npmjs.org/@smithy/querystring-parser/-/querystring-parser-2.0.9.tgz", - "integrity": "sha512-U6z4N743s4vrcxPW8p8+reLV0PjMCYEyb1/wtMVvv3VnbJ74gshdI8SR1sBnEh95cF8TxonmX5IxY25tS9qGfg==", + "version": "2.0.12", + "resolved": "https://registry.npmjs.org/@smithy/querystring-parser/-/querystring-parser-2.0.12.tgz", + "integrity": "sha512-fytyTcXaMzPBuNtPlhj5v6dbl4bJAnwKZFyyItAGt4Tgm9HFPZNo7a9r1SKPr/qdxUEBzvL9Rh+B9SkTX3kFxg==", "dependencies": { - "@smithy/types": "^2.3.3", + "@smithy/types": "^2.4.0", "tslib": "^2.5.0" }, "engines": { @@ -4233,7 +4267,7 @@ }, "node_modules/@smithy/service-error-classification": { "version": "2.0.5", - "resolved": "http://18.100.245.153:4873/@smithy/service-error-classification/-/service-error-classification-2.0.5.tgz", + "resolved": "https://registry.npmjs.org/@smithy/service-error-classification/-/service-error-classification-2.0.5.tgz", "integrity": "sha512-M0SeJnEgD2ywJyV99Fb1yKFzmxDe9JfpJiYTVSRMyRLc467BPU0qsuuDPzMCdB1mU8M8u1rVOdkqdoyFN8UFTw==", "dependencies": { "@smithy/types": "^2.4.0" @@ -4243,11 +4277,11 @@ } }, "node_modules/@smithy/shared-ini-file-loader": { - "version": "2.0.11", - "resolved": "https://registry.npmjs.org/@smithy/shared-ini-file-loader/-/shared-ini-file-loader-2.0.11.tgz", - "integrity": "sha512-Sf0u5C5px6eykXi6jImDTp+edvG3REtPjXnFWU/J+b7S2wkXwUqFXqBL5DdM4zC1F+M8u57ZT7NRqDwMOw7/Tw==", + "version": "2.2.2", + "resolved": "https://registry.npmjs.org/@smithy/shared-ini-file-loader/-/shared-ini-file-loader-2.2.2.tgz", + "integrity": "sha512-noyQUPn7b1M8uB0GEXc/Zyxq+5K2b7aaqWnLp+hgJ7+xu/FCvtyWy5eWLDjQEsHnAet2IZhS5QF8872OR69uNg==", "dependencies": { - "@smithy/types": "^2.3.3", + "@smithy/types": "^2.4.0", "tslib": "^2.5.0" }, "engines": { @@ -4273,13 +4307,13 @@ } }, "node_modules/@smithy/smithy-client": { - "version": "2.1.7", - "resolved": "https://registry.npmjs.org/@smithy/smithy-client/-/smithy-client-2.1.7.tgz", - "integrity": "sha512-r6T/oiBQ8vCbGqObH4/h0YqD0jFB1hAS9KFRmuTfaNJueu/L2hjmjqFjv3PV5lkbNHTgUYraSv4cFQ1naxiELQ==", + "version": "2.1.12", + "resolved": "https://registry.npmjs.org/@smithy/smithy-client/-/smithy-client-2.1.12.tgz", + "integrity": "sha512-XXqhridfkKnpj+lt8vM6HRlZbqUAqBjVC74JIi13F/AYQd/zTj9SOyGfxnbp4mjY9q28LityxIuV8CTinr9r5w==", "dependencies": { - "@smithy/middleware-stack": "^2.0.3", - "@smithy/types": "^2.3.3", - "@smithy/util-stream": "^2.0.12", + "@smithy/middleware-stack": "^2.0.6", + "@smithy/types": "^2.4.0", + "@smithy/util-stream": "^2.0.17", "tslib": "^2.5.0" }, "engines": { @@ -4288,7 +4322,7 @@ }, "node_modules/@smithy/types": { "version": "2.4.0", - "resolved": "http://18.100.245.153:4873/@smithy/types/-/types-2.4.0.tgz", + "resolved": "https://registry.npmjs.org/@smithy/types/-/types-2.4.0.tgz", "integrity": "sha512-iH1Xz68FWlmBJ9vvYeHifVMWJf82ONx+OybPW8ZGf5wnEv2S0UXcU4zwlwJkRXuLKpcSLHrraHbn2ucdVXLb4g==", "dependencies": { "tslib": "^2.5.0" @@ -4298,12 +4332,12 @@ } }, "node_modules/@smithy/url-parser": { - "version": "2.0.9", - "resolved": "https://registry.npmjs.org/@smithy/url-parser/-/url-parser-2.0.9.tgz", - "integrity": "sha512-NBnJ0NiY8z6E82Xd5VYUFQfKwK/wA/+QkKmpYUYP+cpH3aCzE6g2gvixd9vQKYjsIdRfNPCf+SFAozt8ljozOw==", + "version": "2.0.12", + "resolved": "https://registry.npmjs.org/@smithy/url-parser/-/url-parser-2.0.12.tgz", + "integrity": "sha512-qgkW2mZqRvlNUcBkxYB/gYacRaAdck77Dk3/g2iw0S9F0EYthIS3loGfly8AwoWpIvHKhkTsCXXQfzksgZ4zIA==", "dependencies": { - "@smithy/querystring-parser": "^2.0.9", - "@smithy/types": "^2.3.3", + "@smithy/querystring-parser": "^2.0.12", + "@smithy/types": "^2.4.0", "tslib": "^2.5.0" } }, @@ -4362,13 +4396,13 @@ } }, "node_modules/@smithy/util-defaults-mode-browser": { - "version": "2.0.11", - "resolved": "https://registry.npmjs.org/@smithy/util-defaults-mode-browser/-/util-defaults-mode-browser-2.0.11.tgz", - "integrity": "sha512-0syV1Mz/mCQ7CG/MHKQfH+w86xq59jpD0EOXv5oe0WBXLmq2lWPpVHl2Y6+jQ+/9fYzyZ5NF+NC/WEIuiv690A==", + "version": "2.0.16", + "resolved": "https://registry.npmjs.org/@smithy/util-defaults-mode-browser/-/util-defaults-mode-browser-2.0.16.tgz", + "integrity": "sha512-Uv5Cu8nVkuvLn0puX+R9zWbSNpLIR3AxUlPoLJ7hC5lvir8B2WVqVEkJLwtixKAncVLasnTVjPDCidtAUTGEQw==", "dependencies": { - "@smithy/property-provider": "^2.0.10", - "@smithy/smithy-client": "^2.1.7", - "@smithy/types": "^2.3.3", + "@smithy/property-provider": "^2.0.13", + "@smithy/smithy-client": "^2.1.12", + "@smithy/types": "^2.4.0", "bowser": "^2.11.0", "tslib": "^2.5.0" }, @@ -4377,22 +4411,35 @@ } }, "node_modules/@smithy/util-defaults-mode-node": { - "version": "2.0.13", - "resolved": "https://registry.npmjs.org/@smithy/util-defaults-mode-node/-/util-defaults-mode-node-2.0.13.tgz", - "integrity": "sha512-6BtCHYdw5Z8r6KpW8tRCc3yURgvcQwfIEeHhR70BeSOfx8T/TXPPjb8A+K45+KASspa3fzrsSxeIwB0sAeMoHA==", - "dependencies": { - "@smithy/config-resolver": "^2.0.10", - "@smithy/credential-provider-imds": "^2.0.12", - "@smithy/node-config-provider": "^2.0.12", - "@smithy/property-provider": "^2.0.10", - "@smithy/smithy-client": "^2.1.7", - "@smithy/types": "^2.3.3", + "version": "2.0.21", + "resolved": "https://registry.npmjs.org/@smithy/util-defaults-mode-node/-/util-defaults-mode-node-2.0.21.tgz", + "integrity": "sha512-cUEsttVZ79B7Al2rWK2FW03HBpD9LyuqFtm+1qFty5u9sHSdesr215gS2Ln53fTopNiPgeXpdoM3IgjvIO0rJw==", + "dependencies": { + "@smithy/config-resolver": "^2.0.16", + "@smithy/credential-provider-imds": "^2.0.18", + "@smithy/node-config-provider": "^2.1.3", + "@smithy/property-provider": "^2.0.13", + "@smithy/smithy-client": "^2.1.12", + "@smithy/types": "^2.4.0", "tslib": "^2.5.0" }, "engines": { "node": ">= 10.0.0" } }, + "node_modules/@smithy/util-endpoints": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/@smithy/util-endpoints/-/util-endpoints-1.0.2.tgz", + "integrity": "sha512-QEdq+sP68IJHAMVB2ugKVVZEWeKQtZLuf+akHzc8eTVElsZ2ZdVLWC6Cp+uKjJ/t4yOj1qu6ZzyxJQEQ8jdEjg==", + "dependencies": { + "@smithy/node-config-provider": "^2.1.3", + "@smithy/types": "^2.4.0", + "tslib": "^2.5.0" + }, + "engines": { + "node": ">= 14.0.0" + } + }, "node_modules/@smithy/util-hex-encoding": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/@smithy/util-hex-encoding/-/util-hex-encoding-2.0.0.tgz", @@ -4405,11 +4452,11 @@ } }, "node_modules/@smithy/util-middleware": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/@smithy/util-middleware/-/util-middleware-2.0.2.tgz", - "integrity": "sha512-UGPZM+Ja/vke5pc/S8G0LNiHpVirtjppsXO+GK9m9wbzRGzPJTfnZA/gERUUN/AfxEy/8SL7U1kd7u4t2X8K1w==", + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/@smithy/util-middleware/-/util-middleware-2.0.5.tgz", + "integrity": "sha512-1lyT3TcaMJQe+OFfVI+TlomDkPuVzb27NZYdYtmSTltVmLaUjdCyt4KE+OH1CnhZKsz4/cdCL420Lg9UH5Z2Mw==", "dependencies": { - "@smithy/types": "^2.3.3", + "@smithy/types": "^2.4.0", "tslib": "^2.5.0" }, "engines": { @@ -4417,12 +4464,12 @@ } }, "node_modules/@smithy/util-retry": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/@smithy/util-retry/-/util-retry-2.0.2.tgz", - "integrity": "sha512-ovWiayUB38moZcLhSFFfUgB2IMb7R1JfojU20qSahjxAgfOZvDWme3eOYUMtAVnouZ9kYJiFgHLy27qRH4NeeA==", + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/@smithy/util-retry/-/util-retry-2.0.5.tgz", + "integrity": "sha512-x3t1+MQAJ6QONk3GTbJNcugCFDVJ+Bkro5YqQQK1EyVesajNDqxFtCx9WdOFNGm/Cbm7tUdwVEmfKQOJoU2Vtw==", "dependencies": { - "@smithy/service-error-classification": "^2.0.2", - "@smithy/types": "^2.3.3", + "@smithy/service-error-classification": "^2.0.5", + "@smithy/types": "^2.4.0", "tslib": "^2.5.0" }, "engines": { @@ -4430,13 +4477,13 @@ } }, "node_modules/@smithy/util-stream": { - "version": "2.0.12", - "resolved": "https://registry.npmjs.org/@smithy/util-stream/-/util-stream-2.0.12.tgz", - "integrity": "sha512-FOCpRLaj6gvSyUC5mJAACT+sPMPmp9sD1o+hVbUH/QxwZfulypA3ZIFdAg/59/IY0d/1Q4CTztsiHEB5LgjN4g==", + "version": "2.0.17", + "resolved": "https://registry.npmjs.org/@smithy/util-stream/-/util-stream-2.0.17.tgz", + "integrity": "sha512-fP/ZQ27rRvHsqItds8yB7jerwMpZFTL3QqbQbidUiG0+mttMoKdP0ZqnvM8UK5q0/dfc3/pN7g4XKPXOU7oRWw==", "dependencies": { - "@smithy/fetch-http-handler": "^2.1.5", - "@smithy/node-http-handler": "^2.1.5", - "@smithy/types": "^2.3.3", + "@smithy/fetch-http-handler": "^2.2.4", + "@smithy/node-http-handler": "^2.1.8", + "@smithy/types": "^2.4.0", "@smithy/util-base64": "^2.0.0", "@smithy/util-buffer-from": "^2.0.0", "@smithy/util-hex-encoding": "^2.0.0", @@ -4471,12 +4518,12 @@ } }, "node_modules/@smithy/util-waiter": { - "version": "2.0.9", - "resolved": "https://registry.npmjs.org/@smithy/util-waiter/-/util-waiter-2.0.9.tgz", - "integrity": "sha512-Hy9Cs0FtIacC1aVFk98bm/7CYqim9fnHAPRnV/SB2mj02ExYs/9Dn5SrNQmtTBTLCn65KqYnNVBNS8GuGpZOOw==", + "version": "2.0.12", + "resolved": "https://registry.npmjs.org/@smithy/util-waiter/-/util-waiter-2.0.12.tgz", + "integrity": "sha512-3sENmyVa1NnOPoiT2NCApPmu7ukP7S/v7kL9IxNmnygkDldn7/yK0TP42oPJLwB2k3mospNsSePIlqdXEUyPHA==", "dependencies": { - "@smithy/abort-controller": "^2.0.9", - "@smithy/types": "^2.3.3", + "@smithy/abort-controller": "^2.0.12", + "@smithy/types": "^2.4.0", "tslib": "^2.5.0" }, "engines": { @@ -5762,9 +5809,9 @@ } }, "node_modules/aws-sdk": { - "version": "2.1466.0", - "resolved": "https://registry.npmjs.org/aws-sdk/-/aws-sdk-2.1466.0.tgz", - "integrity": "sha512-wkpWe0TBNziEI5wNw2twRofCaNQAgQ+v91HoPylmcuD5qqgRm6hoV7M5NSOMKO8ALlglZdR66EmGusaZ2dMJwA==", + "version": "2.1484.0", + "resolved": "https://registry.npmjs.org/aws-sdk/-/aws-sdk-2.1484.0.tgz", + "integrity": "sha512-emfCmb5j/UtaB7U8tvLpGdVNAlZMg4xZOhoFvL8jBQwIVJyCRyaqcshe31JXTwJdafThn2pNPtQOeYbZJCE0Ow==", "dev": true, "dependencies": { "buffer": "4.9.2", @@ -6025,7 +6072,7 @@ }, "node_modules/aws-xray-sdk-core": { "version": "3.5.3", - "resolved": "http://18.100.245.153:4873/aws-xray-sdk-core/-/aws-xray-sdk-core-3.5.3.tgz", + "resolved": "https://registry.npmjs.org/aws-xray-sdk-core/-/aws-xray-sdk-core-3.5.3.tgz", "integrity": "sha512-FxDRVvIHqf3bzj76M+LSyh/1V5cYuhn+YLRS+u6Xs6WindPMDn9j03v2PNskPgvUi7pMqU40aVhQphRX/YWTfQ==", "dependencies": { "@aws-sdk/types": "^3.4.1", @@ -6040,9 +6087,9 @@ } }, "node_modules/axios": { - "version": "1.5.1", - "resolved": "https://registry.npmjs.org/axios/-/axios-1.5.1.tgz", - "integrity": "sha512-Q28iYCWzNHjAm+yEAot5QaAMxhMghWLFVf7rRdwhUI+c2jix2DUXjAHXVi+s1ibs3mjPO/cCgbA++3BjD0vP/A==", + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/axios/-/axios-1.6.0.tgz", + "integrity": "sha512-EZ1DYihju9pwVB+jg67ogm+Tmqc6JmhamRN6I4Zt8DfZu5lbcQGw3ozH9lFejSJgs/ibaef3A9PMXPLeefFGJg==", "dev": true, "dependencies": { "follow-redirects": "^1.15.0", @@ -16585,8 +16632,8 @@ }, "devDependencies": { "@aws-lambda-powertools/testing-utils": "file:../testing", - "@aws-sdk/client-dynamodb": "^3.413.0", - "@aws-sdk/lib-dynamodb": "^3.413.0", + "@aws-sdk/client-dynamodb": "^3.438.0", + "@aws-sdk/lib-dynamodb": "^3.438.0", "@types/jmespath": "^0.15.0", "aws-sdk-client-mock": "^3.0.0", "aws-sdk-client-mock-jest": "^3.0.0" @@ -16638,7 +16685,7 @@ }, "devDependencies": { "@aws-lambda-powertools/testing-utils": "file:../testing", - "@aws-sdk/client-cloudwatch": "^3.413.0", + "@aws-sdk/client-cloudwatch": "^3.438.0", "@types/promise-retry": "^1.1.3", "promise-retry": "^2.0.1" }, @@ -16661,11 +16708,11 @@ }, "devDependencies": { "@aws-lambda-powertools/testing-utils": "file:../testing", - "@aws-sdk/client-appconfigdata": "^3.413.0", - "@aws-sdk/client-dynamodb": "^3.413.0", - "@aws-sdk/client-secrets-manager": "^3.413.0", - "@aws-sdk/client-ssm": "^3.413.0", - "@aws-sdk/util-dynamodb": "^3.413.0", + "@aws-sdk/client-appconfigdata": "^3.438.0", + "@aws-sdk/client-dynamodb": "^3.438.0", + "@aws-sdk/client-secrets-manager": "^3.438.0", + "@aws-sdk/client-ssm": "^3.438.0", + "@aws-sdk/util-dynamodb": "^3.438.0", "aws-sdk-client-mock": "^3.0.0", "aws-sdk-client-mock-jest": "^3.0.0" }, @@ -16704,7 +16751,7 @@ "license": "MIT-0", "dependencies": { "@aws-cdk/cli-lib-alpha": "^2.96.1-alpha.0", - "@aws-sdk/client-lambda": "^3.418.0", + "@aws-sdk/client-lambda": "^3.438.0", "@smithy/util-utf8": "^2.0.0", "aws-cdk-lib": "^2.96.1", "esbuild": "^0.19.3" @@ -16720,11 +16767,11 @@ }, "devDependencies": { "@aws-lambda-powertools/testing-utils": "file:../testing", - "@aws-sdk/client-dynamodb": "^3.413.0", - "@aws-sdk/client-xray": "^3.413.0", + "@aws-sdk/client-dynamodb": "^3.438.0", + "@aws-sdk/client-xray": "^3.438.0", "@types/promise-retry": "^1.1.3", - "aws-sdk": "^2.1458.0", - "axios": "^1.5.0", + "aws-sdk": "^2.1484.0", + "axios": "^1.6.0", "promise-retry": "^2.0.1" }, "peerDependencies": { diff --git a/packages/idempotency/package.json b/packages/idempotency/package.json index 5ce3c955bb..1fdf31ee32 100644 --- a/packages/idempotency/package.json +++ b/packages/idempotency/package.json @@ -129,10 +129,10 @@ ], "devDependencies": { "@aws-lambda-powertools/testing-utils": "file:../testing", - "@aws-sdk/client-dynamodb": "^3.413.0", - "@aws-sdk/lib-dynamodb": "^3.413.0", + "@aws-sdk/client-dynamodb": "^3.438.0", + "@aws-sdk/lib-dynamodb": "^3.438.0", "@types/jmespath": "^0.15.0", "aws-sdk-client-mock": "^3.0.0", "aws-sdk-client-mock-jest": "^3.0.0" } -} \ No newline at end of file +} diff --git a/packages/metrics/package.json b/packages/metrics/package.json index 185fdcfa9b..ad3a9171d5 100644 --- a/packages/metrics/package.json +++ b/packages/metrics/package.json @@ -66,7 +66,7 @@ "main": "./lib/cjs/index.js", "devDependencies": { "@aws-lambda-powertools/testing-utils": "file:../testing", - "@aws-sdk/client-cloudwatch": "^3.413.0", + "@aws-sdk/client-cloudwatch": "^3.438.0", "@types/promise-retry": "^1.1.3", "promise-retry": "^2.0.1" }, @@ -99,4 +99,4 @@ "serverless", "nodejs" ] -} \ No newline at end of file +} diff --git a/packages/parameters/package.json b/packages/parameters/package.json index 41fac17563..5448c0ff69 100644 --- a/packages/parameters/package.json +++ b/packages/parameters/package.json @@ -157,11 +157,11 @@ ], "devDependencies": { "@aws-lambda-powertools/testing-utils": "file:../testing", - "@aws-sdk/client-appconfigdata": "^3.413.0", - "@aws-sdk/client-dynamodb": "^3.413.0", - "@aws-sdk/client-secrets-manager": "^3.413.0", - "@aws-sdk/client-ssm": "^3.413.0", - "@aws-sdk/util-dynamodb": "^3.413.0", + "@aws-sdk/client-appconfigdata": "^3.438.0", + "@aws-sdk/client-dynamodb": "^3.438.0", + "@aws-sdk/client-secrets-manager": "^3.438.0", + "@aws-sdk/client-ssm": "^3.438.0", + "@aws-sdk/util-dynamodb": "^3.438.0", "aws-sdk-client-mock": "^3.0.0", "aws-sdk-client-mock-jest": "^3.0.0" }, diff --git a/packages/testing/package.json b/packages/testing/package.json index b4c5dc1588..247426c843 100644 --- a/packages/testing/package.json +++ b/packages/testing/package.json @@ -95,7 +95,7 @@ "homepage": "https://github.com/aws-powertools/powertools-lambda-typescript/tree/main/packages/testing#readme", "dependencies": { "@aws-cdk/cli-lib-alpha": "^2.96.1-alpha.0", - "@aws-sdk/client-lambda": "^3.418.0", + "@aws-sdk/client-lambda": "^3.438.0", "@smithy/util-utf8": "^2.0.0", "aws-cdk-lib": "^2.96.1", "esbuild": "^0.19.3" diff --git a/packages/tracer/package.json b/packages/tracer/package.json index 8ca717464d..83baccb7ee 100644 --- a/packages/tracer/package.json +++ b/packages/tracer/package.json @@ -31,11 +31,11 @@ "license": "MIT-0", "devDependencies": { "@aws-lambda-powertools/testing-utils": "file:../testing", - "@aws-sdk/client-dynamodb": "^3.413.0", - "@aws-sdk/client-xray": "^3.413.0", + "@aws-sdk/client-dynamodb": "^3.438.0", + "@aws-sdk/client-xray": "^3.438.0", "@types/promise-retry": "^1.1.3", - "aws-sdk": "^2.1458.0", - "axios": "^1.5.0", + "aws-sdk": "^2.1484.0", + "axios": "^1.6.0", "promise-retry": "^2.0.1" }, "peerDependencies": { From 3a072aa0cc790d47401c7854e6bfec86f648ba9b Mon Sep 17 00:00:00 2001 From: Andrea Amorosi Date: Fri, 3 Nov 2023 08:24:54 +0100 Subject: [PATCH 48/60] chore(logger): set default UTC timezone (#1775) * chore(parameters): add export types * chore(logger): set default utc timezone * chore(logger): pass down envvarsservice to log formatter --- packages/logger/src/Logger.ts | 7 +++--- .../src/config/EnvironmentVariablesService.ts | 12 +++++++++ packages/logger/src/formatter/LogFormatter.ts | 17 ++++++++++++- packages/logger/src/types/Log.ts | 10 ++++++++ .../unit/EnvironmentVariablesService.test.ts | 25 +++++++++++++++++++ packages/logger/tests/unit/Logger.test.ts | 10 ++++---- packages/tracer/tests/helpers/tracesUtils.ts | 8 +++--- 7 files changed, 76 insertions(+), 13 deletions(-) diff --git a/packages/logger/src/Logger.ts b/packages/logger/src/Logger.ts index f0d0e8b59d..878541b965 100644 --- a/packages/logger/src/Logger.ts +++ b/packages/logger/src/Logger.ts @@ -930,7 +930,9 @@ class Logger extends Utility implements LoggerInterface { * @returns {void} */ private setLogFormatter(logFormatter?: LogFormatterInterface): void { - this.logFormatter = logFormatter ?? new PowertoolsLogFormatter(); + this.logFormatter = + logFormatter ?? + new PowertoolsLogFormatter({ envVarsService: this.getEnvVarsService() }); } /** @@ -965,8 +967,8 @@ class Logger extends Utility implements LoggerInterface { environment, } = options; + // order is important, EnvVarsService() is used by other methods this.setEnvVarsService(); - // order is important, it uses EnvVarsService() this.setConsole(); this.setCustomConfigService(customConfigService); this.setInitialLogLevel(logLevel); @@ -975,7 +977,6 @@ class Logger extends Utility implements LoggerInterface { this.setInitialSampleRate(sampleRateValue); this.setLogEvent(); this.setLogIndentation(); - this.addPersistentLogAttributes(persistentLogAttributes); return this; diff --git a/packages/logger/src/config/EnvironmentVariablesService.ts b/packages/logger/src/config/EnvironmentVariablesService.ts index 9627b2c018..a91ea1316f 100644 --- a/packages/logger/src/config/EnvironmentVariablesService.ts +++ b/packages/logger/src/config/EnvironmentVariablesService.ts @@ -29,6 +29,7 @@ class EnvironmentVariablesService private logLevelVariable = 'LOG_LEVEL'; private memoryLimitInMBVariable = 'AWS_LAMBDA_FUNCTION_MEMORY_SIZE'; private sampleRateValueVariable = 'POWERTOOLS_LOGGER_SAMPLE_RATE'; + private tzVariable = 'TZ'; /** * It returns the value of the AWS_REGION environment variable. @@ -108,6 +109,17 @@ class EnvironmentVariablesService return value && value.length > 0 ? Number(value) : undefined; } + /** + * It returns the value of the `TZ` environment variable or `UTC` if it is not set. + * + * @returns {string} + */ + public getTimezone(): string { + const value = this.get(this.tzVariable); + + return value.length > 0 ? value : 'UTC'; + } + /** * It returns true if the POWERTOOLS_DEV environment variable is set to truthy value. * diff --git a/packages/logger/src/formatter/LogFormatter.ts b/packages/logger/src/formatter/LogFormatter.ts index 478e04152f..3f723d67a4 100644 --- a/packages/logger/src/formatter/LogFormatter.ts +++ b/packages/logger/src/formatter/LogFormatter.ts @@ -1,4 +1,9 @@ -import type { LogAttributes, LogFormatterInterface } from '../types/Log.js'; +import type { EnvironmentVariablesService } from '../config/EnvironmentVariablesService.js'; +import type { + LogAttributes, + LogFormatterInterface, + LogFormatterOptions, +} from '../types/Log.js'; import type { UnformattedAttributes } from '../types/Logger.js'; import { LogItem } from './LogItem.js'; @@ -10,6 +15,16 @@ import { LogItem } from './LogItem.js'; * @implements {LogFormatterInterface} */ abstract class LogFormatter implements LogFormatterInterface { + /** + * EnvironmentVariablesService instance. + * If set, it allows to access environment variables. + */ + protected envVarsService?: EnvironmentVariablesService; + + public constructor(options?: LogFormatterOptions) { + this.envVarsService = options?.envVarsService; + } + /** * It formats key-value pairs of log attributes. * diff --git a/packages/logger/src/types/Log.ts b/packages/logger/src/types/Log.ts index dd15a69f72..e415ee2544 100644 --- a/packages/logger/src/types/Log.ts +++ b/packages/logger/src/types/Log.ts @@ -1,3 +1,4 @@ +import type { EnvironmentVariablesService } from '../config/EnvironmentVariablesService.js'; import type { LogItem } from '../formatter/LogItem.js'; import type { UnformattedAttributes } from './Logger.js'; @@ -125,6 +126,14 @@ interface LogItemInterface { setAttributes(attributes: LogAttributes): void; } +type LogFormatterOptions = { + /** + * EnvironmentVariablesService instance. + * If set, it gives the LogFormatter access to environment variables. + */ + envVarsService?: EnvironmentVariablesService; +}; + /** * @interface */ @@ -175,5 +184,6 @@ export type { LogLevel, PowertoolsLog, LogItemInterface, + LogFormatterOptions, LogFormatterInterface, }; diff --git a/packages/logger/tests/unit/EnvironmentVariablesService.test.ts b/packages/logger/tests/unit/EnvironmentVariablesService.test.ts index 8ac6924f00..cb5850b3d7 100644 --- a/packages/logger/tests/unit/EnvironmentVariablesService.test.ts +++ b/packages/logger/tests/unit/EnvironmentVariablesService.test.ts @@ -153,6 +153,31 @@ describe('Class: EnvironmentVariablesService', () => { }); }); + describe('Method: getTimezone', () => { + it('returns the value of the TZ environment variable when set', () => { + // Prepare + process.env.TZ = 'Europe/London'; + const service = new EnvironmentVariablesService(); + + // Act + const value = service.getTimezone(); + + // Assess + expect(value).toEqual('Europe/London'); + }); + + it('returns the default UTC value when no TZ is set', () => { + // Prepare + const service = new EnvironmentVariablesService(); + + // Act + const value = service.getTimezone(); + + // Assess + expect(value).toEqual('UTC'); + }); + }); + describe('Method: isDevMode', () => { test('it returns true if the environment variable POWERTOOLS_DEV is "true"', () => { // Prepare diff --git a/packages/logger/tests/unit/Logger.test.ts b/packages/logger/tests/unit/Logger.test.ts index fe91a5ade1..8cc185aeb7 100644 --- a/packages/logger/tests/unit/Logger.test.ts +++ b/packages/logger/tests/unit/Logger.test.ts @@ -222,7 +222,7 @@ describe('Class: Logger', () => { envVarsService: expect.any(EnvironmentVariablesService), customConfigService: undefined, logLevel: 8, - logFormatter: {}, + logFormatter: expect.any(PowertoolsLogFormatter), }) ); }); @@ -344,7 +344,7 @@ describe('Class: Logger', () => { envVarsService: expect.any(EnvironmentVariablesService), customConfigService: undefined, logLevel: 8, - logFormatter: {}, + logFormatter: expect.any(PowertoolsLogFormatter), }) ); }); @@ -398,7 +398,7 @@ describe('Class: Logger', () => { envVarsService: expect.any(EnvironmentVariablesService), customConfigService: configService, logLevel: 12, - logFormatter: {}, + logFormatter: expect.any(PowertoolsLogFormatter), }) ); }); @@ -440,7 +440,7 @@ describe('Class: Logger', () => { envVarsService: expect.any(EnvironmentVariablesService), customConfigService: undefined, logLevel: 8, - logFormatter: {}, + logFormatter: expect.any(PowertoolsLogFormatter), }) ); }); @@ -468,7 +468,7 @@ describe('Class: Logger', () => { envVarsService: expect.any(EnvironmentVariablesService), customConfigService: undefined, logLevel: 8, - logFormatter: {}, + logFormatter: expect.any(PowertoolsLogFormatter), }) ); }); diff --git a/packages/tracer/tests/helpers/tracesUtils.ts b/packages/tracer/tests/helpers/tracesUtils.ts index b12b234175..8557e60b9b 100644 --- a/packages/tracer/tests/helpers/tracesUtils.ts +++ b/packages/tracer/tests/helpers/tracesUtils.ts @@ -314,8 +314,8 @@ export { getInvocationSubsegment, splitSegmentsByName, invokeAllTestCases, - ParsedDocument, - ParsedSegment, - ParsedTrace, - AssertAnnotationParams, + type ParsedDocument, + type ParsedSegment, + type ParsedTrace, + type AssertAnnotationParams, }; From 20cde95c17919933041a1535d5caf49e51f462d7 Mon Sep 17 00:00:00 2001 From: Alexander Schueren Date: Mon, 20 Nov 2023 11:20:55 +0100 Subject: [PATCH 49/60] feat(parser): add built-in schemas (#1788) * add dynamodb schema * add alb * add parser to v2 build * fix test * add alb * add built-in schema * add more tests for schemas * remove index export * add cloudwatch with base64 zlip transform * add throw test case * formatting * add kafka schema * restructured tests * add vpc lattice and lattice v2 * s3 event notification should extend eventbridge * s3 sqs should extend from sqs * simplify cloudwatch extract from string * keep message as string, instead of empty object * fix detail type of eb and field names * remove duplicated entries * fix homepage URL in readme * improved test coverage * key and value are always present * cleanup unnecessary definitions, widen peerDep version req * Update packages/parser/src/schemas/cloudwatch.ts Co-authored-by: Andrea Amorosi * clean up events, some fields are imaginary * fix api gw * fix broken IP addresses in examples * add more tests to api gw * fix apigw2 add more tests * add optional scopes to apigwv2 * add optional field back to api gw, stricter methods for vpc lattice * add test for messageId refinement * remove redundant entry * fix sqs * add dmarcPolicy for ses * added tests * moved cw function from kinesis, fix imports * add parser to build step in ci * use any safely here * removed console logs * name, add datetime to strings * narrow string to datetime * refine to url * imports, remove try/catch * add .js extension to imports * moved comment, fixed path * rename event filename to fix events --------- Co-authored-by: Andrea Amorosi --- .../actions/cached-node-modules/action.yml | 1 + ...sable-run-linting-check-and-unit-tests.yml | 4 +- .npmignore | 3 +- .../samples/makeIdempotentJmes.json | 2 +- ...orkingWIthIdempotencyRequiredKeyError.json | 2 +- ...kingWIthIdempotencyRequiredKeySuccess.json | 2 +- .../idempotency/samples/workingWithBatch.json | 2 +- package-lock.json | 22 +++ .../{jest.config.js => jest.config.cjs} | 9 +- packages/parser/package.json | 46 +++-- packages/parser/src/{intex.ts => index.ts} | 0 packages/parser/src/schemas/alb.ts | 22 +++ packages/parser/src/schemas/apigw.ts | 110 ++++++++++++ packages/parser/src/schemas/apigwv2.ts | 71 ++++++++ .../schemas/cloudformation-custom-resource.ts | 40 +++++ packages/parser/src/schemas/cloudwatch.ts | 44 +++++ packages/parser/src/schemas/dynamodb.ts | 43 +++++ packages/parser/src/schemas/eventbridge.ts | 16 ++ packages/parser/src/schemas/kafka.ts | 44 +++++ .../parser/src/schemas/kinesis-firehose.ts | 51 ++++++ packages/parser/src/schemas/kinesis.ts | 25 +++ packages/parser/src/schemas/lambda.ts | 14 ++ packages/parser/src/schemas/s3.ts | 164 ++++++++++++++++++ packages/parser/src/schemas/ses.ts | 65 +++++++ packages/parser/src/schemas/sns.ts | 33 ++++ packages/parser/src/schemas/sqs.ts | 44 +++++ packages/parser/src/schemas/vpc-lattice.ts | 12 ++ packages/parser/src/schemas/vpc-latticev2.ts | 36 ++++ .../parser/tests/events/activeMQEvent.json | 55 ++++++ packages/parser/tests/events/albEvent.json | 28 +++ .../events/albEventPathTrailingSlash.json | 28 +++ .../events/albMultiValueHeadersEvent.json | 35 ++++ .../apiGatewayAuthorizerRequestEvent.json | 68 ++++++++ .../apiGatewayAuthorizerTokenEvent.json | 5 + .../events/apiGatewayAuthorizerV2Event.json | 52 ++++++ .../tests/events/apiGatewayProxyEvent.json | 81 +++++++++ .../apiGatewayProxyEventAnotherPath.json | 80 +++++++++ ...apiGatewayProxyEventPathTrailingSlash.json | 80 +++++++++ .../apiGatewayProxyEventPrincipalId.json | 13 ++ .../apiGatewayProxyEvent_noVersionAuth.json | 75 ++++++++ .../events/apiGatewayProxyOtherEvent.json | 81 +++++++++ .../tests/events/apiGatewayProxyV2Event.json | 69 ++++++++ ...iGatewayProxyV2EventPathTrailingSlash.json | 69 ++++++++ .../events/apiGatewayProxyV2Event_GET.json | 68 ++++++++ .../events/apiGatewayProxyV2IamEvent.json | 62 +++++++ ...piGatewayProxyV2LambdaAuthorizerEvent.json | 50 ++++++ .../apiGatewayProxyV2OtherGetEvent.json | 68 ++++++++ ...ayProxyV2SchemaMiddlewareInvalidEvent.json | 69 ++++++++ ...ewayProxyV2SchemaMiddlewareValidEvent.json | 69 ++++++++ ...piGatewaySchemaMiddlewareInvalidEvent.json | 81 +++++++++ .../apiGatewaySchemaMiddlewareValidEvent.json | 81 +++++++++ .../tests/events/appSyncAuthorizerEvent.json | 13 ++ .../events/appSyncAuthorizerResponse.json | 9 + .../tests/events/appSyncDirectResolver.json | 74 ++++++++ .../tests/events/appSyncResolverEvent.json | 71 ++++++++ .../awsConfigRuleConfigurationChanged.json | 13 ++ .../awsConfigRuleOversizedConfiguration.json | 12 ++ .../tests/events/awsConfigRuleScheduled.json | 13 ++ .../tests/events/bedrockAgentEvent.json | 16 ++ .../tests/events/bedrockAgentPostEvent.json | 35 ++++ ...oudFormationCustomResourceCreateEvent.json | 13 ++ ...oudFormationCustomResourceDeleteEvent.json | 13 ++ ...oudFormationCustomResourceUpdateEvent.json | 17 ++ .../events/cloudWatchDashboardEvent.json | 38 ++++ .../tests/events/cloudWatchLogEvent.json | 5 + .../tests/events/codePipelineEvent.json | 34 ++++ .../tests/events/codePipelineEventData.json | 46 +++++ .../codePipelineEventEmptyUserParameters.json | 32 ++++ .../codePipelineEventWithEncryptionKey.json | 38 ++++ .../cognitoCreateAuthChallengeEvent.json | 29 ++++ .../events/cognitoCustomMessageEvent.json | 20 +++ .../cognitoDefineAuthChallengeEvent.json | 32 ++++ .../cognitoPostAuthenticationEvent.json | 18 ++ .../events/cognitoPostConfirmationEvent.json | 18 ++ .../events/cognitoPreAuthenticationEvent.json | 20 +++ .../tests/events/cognitoPreSignUpEvent.json | 18 ++ .../cognitoPreTokenGenerationEvent.json | 25 +++ .../events/cognitoUserMigrationEvent.json | 15 ++ ...gnitoVerifyAuthChallengeResponseEvent.json | 28 +++ .../events/connectContactFlowEventAll.json | 41 +++++ .../events/connectContactFlowEventMin.json | 27 +++ .../tests/events/dynamoStreamEvent.json | 65 +++++++ .../parser/tests/events/eventBridgeEvent.json | 17 ++ .../parser/tests/events/kafkaEventMsk.json | 35 ++++ .../tests/events/kafkaEventSelfManaged.json | 34 ++++ .../events/kinesisFirehoseKinesisEvent.json | 32 ++++ .../tests/events/kinesisFirehosePutEvent.json | 17 ++ .../tests/events/kinesisFirehoseSQSEvent.json | 12 ++ .../kinesisStreamCloudWatchLogsEvent.json | 36 ++++ .../tests/events/kinesisStreamEvent.json | 36 ++++ .../events/kinesisStreamEventOneRecord.json | 20 +++ .../tests/events/lambdaFunctionUrlEvent.json | 47 +++++ ...mbdaFunctionUrlEventPathTrailingSlash.json | 52 ++++++ .../events/lambdaFunctionUrlIAMEvent.json | 52 ++++++ .../parser/tests/events/rabbitMQEvent.json | 51 ++++++ packages/parser/tests/events/s3Event.json | 38 ++++ ...tBridgeNotificationObjectCreatedEvent.json | 28 +++ ...tBridgeNotificationObjectDeletedEvent.json | 29 ++++ ...tBridgeNotificationObjectExpiredEvent.json | 28 +++ ...tificationObjectRestoreCompletedEvent.json | 28 +++ .../tests/events/s3EventDecodedKey.json | 40 +++++ .../tests/events/s3EventDeleteObject.json | 36 ++++ .../parser/tests/events/s3EventGlacier.json | 44 +++++ .../tests/events/s3ObjectEventIAMUser.json | 30 ++++ .../events/s3ObjectEventTempCredentials.json | 42 +++++ packages/parser/tests/events/s3SqsEvent.json | 22 +++ .../tests/events/secretsManagerEvent.json | 5 + packages/parser/tests/events/sesEvent.json | 101 +++++++++++ packages/parser/tests/events/snsEvent.json | 31 ++++ packages/parser/tests/events/snsSqsEvent.json | 20 +++ .../parser/tests/events/snsSqsFifoEvent.json | 23 +++ packages/parser/tests/events/sqsEvent.json | 42 +++++ .../parser/tests/events/vpcLatticeEvent.json | 15 ++ .../vpcLatticeEventPathTrailingSlash.json | 15 ++ .../vpcLatticeEventV2PathTrailingSlash.json | 30 ++++ .../tests/events/vpcLatticeV2Event.json | 30 ++++ packages/parser/tests/tsconfig.json | 11 ++ packages/parser/tests/unit/schema/alb.test.ts | 33 ++++ .../parser/tests/unit/schema/apigw.test.ts | 102 +++++++++++ .../parser/tests/unit/schema/apigwv2.test.ts | 71 ++++++++ .../cloudformation-custom-resource.test.ts | 45 +++++ .../tests/unit/schema/cloudwatch.test.ts | 30 ++++ .../parser/tests/unit/schema/dynamodb.test.ts | 17 ++ .../tests/unit/schema/eventbridge.test.ts | 15 ++ .../parser/tests/unit/schema/kafka.test.ts | 63 +++++++ .../parser/tests/unit/schema/kinesis.test.ts | 90 ++++++++++ .../parser/tests/unit/schema/lambda.test.ts | 19 ++ packages/parser/tests/unit/schema/s3.test.ts | 105 +++++++++++ packages/parser/tests/unit/schema/ses.test.ts | 15 ++ packages/parser/tests/unit/schema/sns.test.ts | 15 ++ packages/parser/tests/unit/schema/sqs.test.ts | 15 ++ packages/parser/tests/unit/schema/utils.ts | 7 + .../tests/unit/schema/vpc-lattice.test.ts | 23 +++ .../tests/unit/schema/vpc-latticev2.test.ts | 24 +++ packages/parser/tsconfig.esm.json | 12 ++ packages/parser/tsconfig.json | 3 +- tsconfig.json | 3 + 137 files changed, 4951 insertions(+), 27 deletions(-) rename packages/parser/{jest.config.js => jest.config.cjs} (77%) rename packages/parser/src/{intex.ts => index.ts} (100%) create mode 100644 packages/parser/src/schemas/alb.ts create mode 100644 packages/parser/src/schemas/apigw.ts create mode 100644 packages/parser/src/schemas/apigwv2.ts create mode 100644 packages/parser/src/schemas/cloudformation-custom-resource.ts create mode 100644 packages/parser/src/schemas/cloudwatch.ts create mode 100644 packages/parser/src/schemas/dynamodb.ts create mode 100644 packages/parser/src/schemas/eventbridge.ts create mode 100644 packages/parser/src/schemas/kafka.ts create mode 100644 packages/parser/src/schemas/kinesis-firehose.ts create mode 100644 packages/parser/src/schemas/kinesis.ts create mode 100644 packages/parser/src/schemas/lambda.ts create mode 100644 packages/parser/src/schemas/s3.ts create mode 100644 packages/parser/src/schemas/ses.ts create mode 100644 packages/parser/src/schemas/sns.ts create mode 100644 packages/parser/src/schemas/sqs.ts create mode 100644 packages/parser/src/schemas/vpc-lattice.ts create mode 100644 packages/parser/src/schemas/vpc-latticev2.ts create mode 100644 packages/parser/tests/events/activeMQEvent.json create mode 100644 packages/parser/tests/events/albEvent.json create mode 100644 packages/parser/tests/events/albEventPathTrailingSlash.json create mode 100644 packages/parser/tests/events/albMultiValueHeadersEvent.json create mode 100644 packages/parser/tests/events/apiGatewayAuthorizerRequestEvent.json create mode 100644 packages/parser/tests/events/apiGatewayAuthorizerTokenEvent.json create mode 100644 packages/parser/tests/events/apiGatewayAuthorizerV2Event.json create mode 100644 packages/parser/tests/events/apiGatewayProxyEvent.json create mode 100644 packages/parser/tests/events/apiGatewayProxyEventAnotherPath.json create mode 100644 packages/parser/tests/events/apiGatewayProxyEventPathTrailingSlash.json create mode 100644 packages/parser/tests/events/apiGatewayProxyEventPrincipalId.json create mode 100644 packages/parser/tests/events/apiGatewayProxyEvent_noVersionAuth.json create mode 100644 packages/parser/tests/events/apiGatewayProxyOtherEvent.json create mode 100644 packages/parser/tests/events/apiGatewayProxyV2Event.json create mode 100644 packages/parser/tests/events/apiGatewayProxyV2EventPathTrailingSlash.json create mode 100644 packages/parser/tests/events/apiGatewayProxyV2Event_GET.json create mode 100644 packages/parser/tests/events/apiGatewayProxyV2IamEvent.json create mode 100644 packages/parser/tests/events/apiGatewayProxyV2LambdaAuthorizerEvent.json create mode 100644 packages/parser/tests/events/apiGatewayProxyV2OtherGetEvent.json create mode 100644 packages/parser/tests/events/apiGatewayProxyV2SchemaMiddlewareInvalidEvent.json create mode 100644 packages/parser/tests/events/apiGatewayProxyV2SchemaMiddlewareValidEvent.json create mode 100644 packages/parser/tests/events/apiGatewaySchemaMiddlewareInvalidEvent.json create mode 100644 packages/parser/tests/events/apiGatewaySchemaMiddlewareValidEvent.json create mode 100644 packages/parser/tests/events/appSyncAuthorizerEvent.json create mode 100644 packages/parser/tests/events/appSyncAuthorizerResponse.json create mode 100644 packages/parser/tests/events/appSyncDirectResolver.json create mode 100644 packages/parser/tests/events/appSyncResolverEvent.json create mode 100644 packages/parser/tests/events/awsConfigRuleConfigurationChanged.json create mode 100644 packages/parser/tests/events/awsConfigRuleOversizedConfiguration.json create mode 100644 packages/parser/tests/events/awsConfigRuleScheduled.json create mode 100644 packages/parser/tests/events/bedrockAgentEvent.json create mode 100644 packages/parser/tests/events/bedrockAgentPostEvent.json create mode 100644 packages/parser/tests/events/cloudFormationCustomResourceCreateEvent.json create mode 100644 packages/parser/tests/events/cloudFormationCustomResourceDeleteEvent.json create mode 100644 packages/parser/tests/events/cloudFormationCustomResourceUpdateEvent.json create mode 100644 packages/parser/tests/events/cloudWatchDashboardEvent.json create mode 100644 packages/parser/tests/events/cloudWatchLogEvent.json create mode 100644 packages/parser/tests/events/codePipelineEvent.json create mode 100644 packages/parser/tests/events/codePipelineEventData.json create mode 100644 packages/parser/tests/events/codePipelineEventEmptyUserParameters.json create mode 100644 packages/parser/tests/events/codePipelineEventWithEncryptionKey.json create mode 100644 packages/parser/tests/events/cognitoCreateAuthChallengeEvent.json create mode 100644 packages/parser/tests/events/cognitoCustomMessageEvent.json create mode 100644 packages/parser/tests/events/cognitoDefineAuthChallengeEvent.json create mode 100644 packages/parser/tests/events/cognitoPostAuthenticationEvent.json create mode 100644 packages/parser/tests/events/cognitoPostConfirmationEvent.json create mode 100644 packages/parser/tests/events/cognitoPreAuthenticationEvent.json create mode 100644 packages/parser/tests/events/cognitoPreSignUpEvent.json create mode 100644 packages/parser/tests/events/cognitoPreTokenGenerationEvent.json create mode 100644 packages/parser/tests/events/cognitoUserMigrationEvent.json create mode 100644 packages/parser/tests/events/cognitoVerifyAuthChallengeResponseEvent.json create mode 100644 packages/parser/tests/events/connectContactFlowEventAll.json create mode 100644 packages/parser/tests/events/connectContactFlowEventMin.json create mode 100644 packages/parser/tests/events/dynamoStreamEvent.json create mode 100644 packages/parser/tests/events/eventBridgeEvent.json create mode 100644 packages/parser/tests/events/kafkaEventMsk.json create mode 100644 packages/parser/tests/events/kafkaEventSelfManaged.json create mode 100644 packages/parser/tests/events/kinesisFirehoseKinesisEvent.json create mode 100644 packages/parser/tests/events/kinesisFirehosePutEvent.json create mode 100644 packages/parser/tests/events/kinesisFirehoseSQSEvent.json create mode 100644 packages/parser/tests/events/kinesisStreamCloudWatchLogsEvent.json create mode 100644 packages/parser/tests/events/kinesisStreamEvent.json create mode 100644 packages/parser/tests/events/kinesisStreamEventOneRecord.json create mode 100644 packages/parser/tests/events/lambdaFunctionUrlEvent.json create mode 100644 packages/parser/tests/events/lambdaFunctionUrlEventPathTrailingSlash.json create mode 100644 packages/parser/tests/events/lambdaFunctionUrlIAMEvent.json create mode 100644 packages/parser/tests/events/rabbitMQEvent.json create mode 100644 packages/parser/tests/events/s3Event.json create mode 100644 packages/parser/tests/events/s3EventBridgeNotificationObjectCreatedEvent.json create mode 100644 packages/parser/tests/events/s3EventBridgeNotificationObjectDeletedEvent.json create mode 100644 packages/parser/tests/events/s3EventBridgeNotificationObjectExpiredEvent.json create mode 100644 packages/parser/tests/events/s3EventBridgeNotificationObjectRestoreCompletedEvent.json create mode 100644 packages/parser/tests/events/s3EventDecodedKey.json create mode 100644 packages/parser/tests/events/s3EventDeleteObject.json create mode 100644 packages/parser/tests/events/s3EventGlacier.json create mode 100644 packages/parser/tests/events/s3ObjectEventIAMUser.json create mode 100644 packages/parser/tests/events/s3ObjectEventTempCredentials.json create mode 100644 packages/parser/tests/events/s3SqsEvent.json create mode 100644 packages/parser/tests/events/secretsManagerEvent.json create mode 100644 packages/parser/tests/events/sesEvent.json create mode 100644 packages/parser/tests/events/snsEvent.json create mode 100644 packages/parser/tests/events/snsSqsEvent.json create mode 100644 packages/parser/tests/events/snsSqsFifoEvent.json create mode 100644 packages/parser/tests/events/sqsEvent.json create mode 100644 packages/parser/tests/events/vpcLatticeEvent.json create mode 100644 packages/parser/tests/events/vpcLatticeEventPathTrailingSlash.json create mode 100644 packages/parser/tests/events/vpcLatticeEventV2PathTrailingSlash.json create mode 100644 packages/parser/tests/events/vpcLatticeV2Event.json create mode 100644 packages/parser/tests/tsconfig.json create mode 100644 packages/parser/tests/unit/schema/alb.test.ts create mode 100644 packages/parser/tests/unit/schema/apigw.test.ts create mode 100644 packages/parser/tests/unit/schema/apigwv2.test.ts create mode 100644 packages/parser/tests/unit/schema/cloudformation-custom-resource.test.ts create mode 100644 packages/parser/tests/unit/schema/cloudwatch.test.ts create mode 100644 packages/parser/tests/unit/schema/dynamodb.test.ts create mode 100644 packages/parser/tests/unit/schema/eventbridge.test.ts create mode 100644 packages/parser/tests/unit/schema/kafka.test.ts create mode 100644 packages/parser/tests/unit/schema/kinesis.test.ts create mode 100644 packages/parser/tests/unit/schema/lambda.test.ts create mode 100644 packages/parser/tests/unit/schema/s3.test.ts create mode 100644 packages/parser/tests/unit/schema/ses.test.ts create mode 100644 packages/parser/tests/unit/schema/sns.test.ts create mode 100644 packages/parser/tests/unit/schema/sqs.test.ts create mode 100644 packages/parser/tests/unit/schema/utils.ts create mode 100644 packages/parser/tests/unit/schema/vpc-lattice.test.ts create mode 100644 packages/parser/tests/unit/schema/vpc-latticev2.test.ts create mode 100644 packages/parser/tsconfig.esm.json diff --git a/.github/actions/cached-node-modules/action.yml b/.github/actions/cached-node-modules/action.yml index 008c852792..6d27b04694 100644 --- a/.github/actions/cached-node-modules/action.yml +++ b/.github/actions/cached-node-modules/action.yml @@ -44,5 +44,6 @@ runs: npm run build -w packages/parameters & \ npm run build -w packages/idempotency & \ npm run build -w packages/batch & \ + npm run build -w packages/parser & \ npm run build -w packages/testing shell: bash \ No newline at end of file diff --git a/.github/workflows/reusable-run-linting-check-and-unit-tests.yml b/.github/workflows/reusable-run-linting-check-and-unit-tests.yml index 6b845abe20..a8321ad566 100644 --- a/.github/workflows/reusable-run-linting-check-and-unit-tests.yml +++ b/.github/workflows/reusable-run-linting-check-and-unit-tests.yml @@ -25,9 +25,9 @@ jobs: with: nodeVersion: ${{ matrix.version }} - name: Run linting - run: npm run lint -w packages/commons -w packages/logger -w packages/tracer -w packages/metrics -w packages/parameters -w packages/idempotency -w packages/batch + run: npm run lint -w packages/commons -w packages/logger -w packages/tracer -w packages/metrics -w packages/parameters -w packages/idempotency -w packages/batch -w packages/parser - name: Run unit tests - run: npm t -w packages/commons -w packages/logger -w packages/tracer -w packages/metrics -w packages/parameters -w packages/idempotency -w packages/batch + run: npm t -w packages/commons -w packages/logger -w packages/tracer -w packages/metrics -w packages/parameters -w packages/idempotency -w packages/batch -w packages/parser check-examples: runs-on: ubuntu-latest env: diff --git a/.npmignore b/.npmignore index ec8c75c6f9..54ce5720a8 100644 --- a/.npmignore +++ b/.npmignore @@ -1,6 +1,6 @@ src tests -jest.config.js +jest.config.cjs tsconfig.json .vscode .github @@ -13,7 +13,6 @@ coverage tslint.json tsconfig.json MakeFile -jest.config.js .npmignore .eslintignore .huskyrc.js diff --git a/docs/snippets/idempotency/samples/makeIdempotentJmes.json b/docs/snippets/idempotency/samples/makeIdempotentJmes.json index 9f608983da..158b3a874f 100644 --- a/docs/snippets/idempotency/samples/makeIdempotentJmes.json +++ b/docs/snippets/idempotency/samples/makeIdempotentJmes.json @@ -27,4 +27,4 @@ }, "body": "{\"user\":\"xyz\",\"productId\":\"123456789\"}", "isBase64Encoded": false -} \ No newline at end of file +} diff --git a/docs/snippets/idempotency/samples/workingWIthIdempotencyRequiredKeyError.json b/docs/snippets/idempotency/samples/workingWIthIdempotencyRequiredKeyError.json index a905b83e7a..14ca8067ae 100644 --- a/docs/snippets/idempotency/samples/workingWIthIdempotencyRequiredKeyError.json +++ b/docs/snippets/idempotency/samples/workingWIthIdempotencyRequiredKeyError.json @@ -4,4 +4,4 @@ "name": "foo", "productId": 10000 } -} \ No newline at end of file +} diff --git a/docs/snippets/idempotency/samples/workingWIthIdempotencyRequiredKeySuccess.json b/docs/snippets/idempotency/samples/workingWIthIdempotencyRequiredKeySuccess.json index e721b2c24c..ef9c932907 100644 --- a/docs/snippets/idempotency/samples/workingWIthIdempotencyRequiredKeySuccess.json +++ b/docs/snippets/idempotency/samples/workingWIthIdempotencyRequiredKeySuccess.json @@ -4,4 +4,4 @@ "name": "Foo" }, "productId": 10000 -} \ No newline at end of file +} diff --git a/docs/snippets/idempotency/samples/workingWithBatch.json b/docs/snippets/idempotency/samples/workingWithBatch.json index 44bd07a141..73a5029d61 100644 --- a/docs/snippets/idempotency/samples/workingWithBatch.json +++ b/docs/snippets/idempotency/samples/workingWithBatch.json @@ -23,4 +23,4 @@ "awsRegion": "us-east-2" } ] -} \ No newline at end of file +} diff --git a/package-lock.json b/package-lock.json index 198ef2f485..2b28ed8c51 100644 --- a/package-lock.json +++ b/package-lock.json @@ -17,6 +17,7 @@ "packages/idempotency", "packages/batch", "packages/testing", + "packages/parser", "docs/snippets", "layers", "examples/cdk", @@ -333,6 +334,10 @@ "resolved": "packages/parameters", "link": true }, + "node_modules/@aws-lambda-powertools/parser": { + "resolved": "packages/parser", + "link": true + }, "node_modules/@aws-lambda-powertools/testing-utils": { "resolved": "packages/testing", "link": true @@ -16605,6 +16610,15 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/zod": { + "version": "3.22.4", + "resolved": "https://registry.npmjs.org/zod/-/zod-3.22.4.tgz", + "integrity": "sha512-iC+8Io04lddc+mVqQ9AZ7OQ2MrUKGN+oIQyq1vemgt46jwCwLfhq7/pwnBnNXXXZb8VTVLKwp9EDkx+ryxIWmg==", + "peer": true, + "funding": { + "url": "https://github.com/sponsors/colinhacks" + } + }, "packages/batch": { "name": "@aws-lambda-powertools/batch", "version": "1.14.0", @@ -16745,6 +16759,14 @@ } } }, + "packages/parser": { + "name": "@aws-lambda-powertools/parser", + "version": "0.0.0", + "license": "MIT-0", + "peerDependencies": { + "zod": "^3.22.4" + } + }, "packages/testing": { "name": "@aws-lambda-powertools/testing-utils", "version": "1.14.0", diff --git a/packages/parser/jest.config.js b/packages/parser/jest.config.cjs similarity index 77% rename from packages/parser/jest.config.js rename to packages/parser/jest.config.cjs index a4f984ae47..e1dca130b9 100644 --- a/packages/parser/jest.config.js +++ b/packages/parser/jest.config.cjs @@ -5,8 +5,12 @@ module.exports = { }, runner: 'groups', preset: 'ts-jest', + moduleNameMapper: { + '^(\\.{1,2}/.*)\\.js$': '$1', + }, transform: { - '^.+\\.ts?$': 'ts-jest', + '^.+\\.ts?$': ['ts-jest', {tsconfig: './tests/tsconfig.json'}], + }, moduleFileExtensions: ['js', 'ts'], collectCoverageFrom: ['**/src/**/*.ts', '!**/node_modules/**'], @@ -14,7 +18,7 @@ module.exports = { roots: ['/src', '/tests'], testPathIgnorePatterns: ['/node_modules/'], testEnvironment: 'node', - coveragePathIgnorePatterns: ['/node_modules/', '/types/'], + coveragePathIgnorePatterns: ['/node_modules/', '/types'], coverageThreshold: { global: { statements: 100, @@ -24,5 +28,4 @@ module.exports = { }, }, coverageReporters: ['json-summary', 'text', 'lcov'], - setupFiles: ['/tests/helpers/populateEnvironmentVariables.ts'], }; diff --git a/packages/parser/package.json b/packages/parser/package.json index c40d714f80..6dd191ca17 100644 --- a/packages/parser/package.json +++ b/packages/parser/package.json @@ -2,27 +2,45 @@ "name": "@aws-lambda-powertools/parser", "version": "0.0.0", "description": "The parser package for the Powertools for AWS Lambda (TypeScript) library.", + "author": { + "name": "Amazon Web Services", + "url": "https://aws.amazon.com" + }, + "publishConfig": { + "access": "restricted" + }, "scripts": { "test": "npm run test:unit", "test:unit": "jest --group=unit --detectOpenHandles --coverage --verbose", + "jest": "jest --detectOpenHandles --coverage --verbose", "watch": "jest --watch", - "build": "tsc --build --force", + "build:cjs": "tsc --build tsconfig.json && echo '{ \"type\": \"commonjs\" }' > lib/cjs/package.json", + "build:esm": "tsc --build tsconfig.esm.json && echo '{ \"type\": \"module\" }' > lib/esm/package.json", + "build": "npm run build:esm & npm run build:cjs", "lint": "eslint --ext .ts,.js --no-error-on-unmatched-pattern .", "lint-fix": "eslint --fix --ext .ts,.js --no-error-on-unmatched-pattern .", - "prebuild": "rimraf ./lib", "prepack": "node ../../.github/scripts/release_patch_package_json.js ." }, - "author": { - "name": "Amazon Web Services", - "url": "https://aws.amazon.com" - }, "lint-staged": { "*.{js,ts}": "npm run lint-fix" }, - "homepage": "https://github.com/aws-powertools/powertools-lambda-typescript/tree/main/packages/batch#readme", + "homepage": "https://github.com/aws-powertools/powertools-lambda-typescript/tree/main/packages/parser#readme", "license": "MIT-0", - "main": "./lib/index.js", - "types": "./lib/index.d.ts", + "type": "module", + "exports": { + ".": { + "require": { + "types": "./lib/cjs/index.d.ts", + "default": "./lib/cjs/index.js" + }, + "import": { + "types": "./lib/esm/index.d.ts", + "default": "./lib/esm/index.js" + } + } + }, + "main": "./lib/cjs/index.js", + "types": "./lib/cjs/index.d.ts", "files": [ "lib" ], @@ -42,10 +60,8 @@ "serverless", "nodejs" ], - "publishConfig": { - "access": "restricted" - }, - "devDependencies": { - "zod": "^3.22.2" + + "peerDependencies": { + "zod": ">=3.x" } -} +} \ No newline at end of file diff --git a/packages/parser/src/intex.ts b/packages/parser/src/index.ts similarity index 100% rename from packages/parser/src/intex.ts rename to packages/parser/src/index.ts diff --git a/packages/parser/src/schemas/alb.ts b/packages/parser/src/schemas/alb.ts new file mode 100644 index 0000000000..54d5de4fed --- /dev/null +++ b/packages/parser/src/schemas/alb.ts @@ -0,0 +1,22 @@ +import { z } from 'zod'; + +const AlbSchema = z.object({ + httpMethod: z.string(), + path: z.string(), + body: z.string(), + isBase64Encoded: z.boolean(), + headers: z.record(z.string(), z.string()).optional(), + queryStringParameters: z.record(z.string(), z.string()).optional(), + requestContext: z.object({ + elb: z.object({ + targetGroupArn: z.string(), + }), + }), +}); + +const AlbMultiValueHeadersSchema = AlbSchema.extend({ + multiValueHeaders: z.record(z.string(), z.array(z.string())), + multiValueQueryStringParameters: z.record(z.string(), z.array(z.string())), +}); + +export { AlbSchema, AlbMultiValueHeadersSchema }; diff --git a/packages/parser/src/schemas/apigw.ts b/packages/parser/src/schemas/apigw.ts new file mode 100644 index 0000000000..72878de03a --- /dev/null +++ b/packages/parser/src/schemas/apigw.ts @@ -0,0 +1,110 @@ +import { z } from 'zod'; + +const APIGatewayCert = z.object({ + clientCertPem: z.string(), + subjectDN: z.string(), + issuerDN: z.string(), + serialNumber: z.string(), + validity: z.object({ + notBefore: z.string(), + notAfter: z.string(), + }), +}); + +const APIGatewayEventIdentity = z.object({ + accessKey: z.string().nullish(), + accountId: z.string().nullish(), + apiKey: z.string().nullish(), + apiKeyId: z.string().nullish(), + caller: z.string().nullish(), + cognitoAuthenticationProvider: z.string().nullish(), + cognitoAuthenticationType: z.string().nullish(), + cognitoIdentityId: z.string().nullish(), + cognitoIdentityPoolId: z.string().nullish(), + principalOrgId: z.string().nullish(), + sourceIp: z.string().ip().optional(), + user: z.string().nullish(), + userAgent: z.string().nullish(), + userArn: z.string().nullish(), + clientCert: APIGatewayCert.nullish(), +}); + +const APIGatewayEventRequestContext = z + .object({ + accountId: z.string(), + apiId: z.string(), + authorizer: z + .object({ + claims: z.record(z.string(), z.any()).nullish(), + scopes: z.array(z.string()).nullish(), + }) + .nullish(), + stage: z.string(), + protocol: z.string(), + identity: APIGatewayEventIdentity, + requestId: z.string(), + requestTime: z.string(), + requestTimeEpoch: z.number(), + resourceId: z.string().nullish(), + resourcePath: z.string(), + domainName: z.string().nullish(), + domainPrefix: z.string().nullish(), + extendedRequestId: z.string().nullish(), + httpMethod: z.enum([ + 'GET', + 'POST', + 'PUT', + 'PATCH', + 'DELETE', + 'HEAD', + 'OPTIONS', + ]), + path: z.string(), + connectedAt: z.number().nullish(), + connectionId: z.string().nullish(), + eventType: z.enum(['CONNECT', 'MESSAGE', 'DISCONNECT']).nullish(), + messageDirection: z.string().nullish(), + messageId: z.string().nullish(), + routeKey: z.string().nullish(), + operationName: z.string().nullish(), + }) + .refine( + (input) => { + return ( + !input.messageId || (input.messageId && input.eventType === 'MESSAGE') + ); + }, + { + message: 'messageId is available only when `eventType` is MESSAGE', + } + ); + +const APIGatewayProxyEventSchema = z.object({ + version: z.string().optional(), + authorizationToken: z.string().optional(), + identitySource: z.string().optional(), + methodArn: z.string().optional(), + type: z.enum(['TOKEN', 'REQUEST']).optional(), + resource: z.string(), + path: z.string(), + httpMethod: z.enum([ + 'GET', + 'POST', + 'PUT', + 'PATCH', + 'DELETE', + 'HEAD', + 'OPTIONS', + ]), + headers: z.record(z.string()).optional(), + queryStringParameters: z.record(z.string()).optional(), + multiValueHeaders: z.record(z.array(z.string())).optional(), + multiValueQueryStringParameters: z.record(z.array(z.string())).optional(), + requestContext: APIGatewayEventRequestContext, + pathParameters: z.record(z.string()).optional().nullish(), + stageVariables: z.record(z.string()).optional().nullish(), + isBase64Encoded: z.boolean().optional(), + body: z.string().optional(), +}); + +export { APIGatewayProxyEventSchema, APIGatewayCert }; diff --git a/packages/parser/src/schemas/apigwv2.ts b/packages/parser/src/schemas/apigwv2.ts new file mode 100644 index 0000000000..ec5cfb6156 --- /dev/null +++ b/packages/parser/src/schemas/apigwv2.ts @@ -0,0 +1,71 @@ +import { z } from 'zod'; +import { APIGatewayCert } from './apigw.js'; + +const RequestContextV2Authorizer = z.object({ + jwt: z + .object({ + claims: z.record(z.string(), z.any()), + scopes: z.array(z.string()).optional(), + }) + .optional(), + iam: z + .object({ + accessKey: z.string().optional(), + accountId: z.string().optional(), + callerId: z.string().optional(), + principalOrgId: z.string().optional(), + userArn: z.string().optional(), + userId: z.string().optional(), + cognitoIdentity: z.object({ + amr: z.array(z.string()), + identityId: z.string(), + identityPoolId: z.string(), + }), + }) + .optional(), + lambda: z.record(z.string(), z.any()).optional(), +}); + +const RequestContextV2Http = z.object({ + method: z.enum(['GET', 'POST', 'PUT', 'PATCH', 'DELETE', 'HEAD', 'OPTIONS']), + path: z.string(), + protocol: z.string(), + sourceIp: z.string().ip(), + userAgent: z.string(), +}); + +const RequestContextV2 = z.object({ + accountId: z.string(), + apiId: z.string(), + authorizer: RequestContextV2Authorizer.optional(), + authentication: z + .object({ + clientCert: APIGatewayCert.optional(), + }) + .optional(), + domainName: z.string(), + domainPrefix: z.string(), + http: RequestContextV2Http, + requestId: z.string(), + routeKey: z.string(), + stage: z.string(), + time: z.string(), + timeEpoch: z.number(), +}); + +const APIGatewayProxyEventV2Schema = z.object({ + version: z.string(), + routeKey: z.string(), + rawPath: z.string(), + rawQueryString: z.string(), + cookies: z.array(z.string()).optional(), + headers: z.record(z.string()), + queryStringParameters: z.record(z.string()).optional(), + pathParameters: z.record(z.string()).optional().nullish(), + stageVariables: z.record(z.string()).optional().nullish(), + requestContext: RequestContextV2, + body: z.string().optional(), + isBase64Encoded: z.boolean(), +}); + +export { APIGatewayProxyEventV2Schema }; diff --git a/packages/parser/src/schemas/cloudformation-custom-resource.ts b/packages/parser/src/schemas/cloudformation-custom-resource.ts new file mode 100644 index 0000000000..13f9e9760d --- /dev/null +++ b/packages/parser/src/schemas/cloudformation-custom-resource.ts @@ -0,0 +1,40 @@ +import { z } from 'zod'; + +const CloudFormationCustomResourceBaseSchema = z.object({ + ServiceToken: z.string(), + ResponseURL: z.string().url(), + StackId: z.string(), + RequestId: z.string(), + LogicalResourceId: z.string(), + ResourceType: z.string(), + ResourceProperties: z.record(z.any()), +}); + +const CloudFormationCustomResourceCreateSchema = + CloudFormationCustomResourceBaseSchema.merge( + z.object({ + RequestType: z.literal('Create'), + }) + ); + +const CloudFormationCustomResourceDeleteSchema = + CloudFormationCustomResourceBaseSchema.merge( + z.object({ + RequestType: z.literal('Delete'), + }) + ); + +const CloudFormationCustomResourceUpdateSchema = + CloudFormationCustomResourceBaseSchema.merge( + z.object({ + RequestType: z.literal('Update'), + OldResourceProperties: z.record(z.any()), + }) + ); + +export { + CloudFormationCustomResourceCreateSchema, + CloudFormationCustomResourceDeleteSchema, + CloudFormationCustomResourceUpdateSchema, + CloudFormationCustomResourceBaseSchema, +}; diff --git a/packages/parser/src/schemas/cloudwatch.ts b/packages/parser/src/schemas/cloudwatch.ts new file mode 100644 index 0000000000..8c9e71f9a0 --- /dev/null +++ b/packages/parser/src/schemas/cloudwatch.ts @@ -0,0 +1,44 @@ +import { z } from 'zod'; +import { gunzipSync } from 'node:zlib'; + +const CloudWatchLogEventSchema = z.object({ + id: z.string(), + timestamp: z.number(), + message: z.string(), +}); + +const CloudWatchLogsDecodeSchema = z.object({ + messageType: z.string(), + owner: z.string(), + logGroup: z.string(), + logStream: z.string(), + subscriptionFilters: z.array(z.string()), + logEvents: z.array(CloudWatchLogEventSchema), +}); + +const decompressRecordToJSON = ( + data: string +): z.infer => { + const uncompressed = gunzipSync(Buffer.from(data, 'base64')).toString('utf8'); + + return CloudWatchLogsDecodeSchema.parse(JSON.parse(uncompressed)); +}; + +const CloudWatchLogsSchema = z.object({ + awslogs: z.object({ + data: z.string().transform((data) => decompressRecordToJSON(data)), + }), +}); + +const extractCloudWatchLogFromEvent = ( + data: string +): z.infer => { + return decompressRecordToJSON(data); +}; + +export { + CloudWatchLogsSchema, + CloudWatchLogsDecodeSchema, + decompressRecordToJSON, + extractCloudWatchLogFromEvent, +}; diff --git a/packages/parser/src/schemas/dynamodb.ts b/packages/parser/src/schemas/dynamodb.ts new file mode 100644 index 0000000000..011ff85f8a --- /dev/null +++ b/packages/parser/src/schemas/dynamodb.ts @@ -0,0 +1,43 @@ +import { z } from 'zod'; + +const DynamoDBStreamChangeRecord = z.object({ + ApproximateCreationDateTime: z.number().optional(), + Keys: z.record(z.string(), z.record(z.string(), z.any())), + NewImage: z.record(z.string(), z.any()).optional(), + OldImage: z.record(z.string(), z.any()).optional(), + SequenceNumber: z.string(), + SizeBytes: z.number(), + StreamViewType: z.enum([ + 'NEW_IMAGE', + 'OLD_IMAGE', + 'NEW_AND_OLD_IMAGES', + 'KEYS_ONLY', + ]), +}); + +const UserIdentity = z.object({ + type: z.enum(['Service']), + principalId: z.literal('dynamodb.amazonaws.com'), +}); + +const DynamoDBStreamRecord = z.object({ + eventID: z.string(), + eventName: z.enum(['INSERT', 'MODIFY', 'REMOVE']), + eventVersion: z.string(), + eventSource: z.literal('aws:dynamodb'), + awsRegion: z.string(), + eventSourceARN: z.string(), + dynamodb: DynamoDBStreamChangeRecord, + userIdentity: UserIdentity.optional(), +}); + +const DynamoDBStreamSchema = z.object({ + Records: z.array(DynamoDBStreamRecord), +}); + +export { + DynamoDBStreamSchema, + DynamoDBStreamRecord, + DynamoDBStreamChangeRecord, + UserIdentity, +}; diff --git a/packages/parser/src/schemas/eventbridge.ts b/packages/parser/src/schemas/eventbridge.ts new file mode 100644 index 0000000000..9c509e5c03 --- /dev/null +++ b/packages/parser/src/schemas/eventbridge.ts @@ -0,0 +1,16 @@ +import { z } from 'zod'; + +const EventBridgeSchema = z.object({ + version: z.string(), + id: z.string(), + source: z.string(), + account: z.string(), + time: z.string().datetime(), + region: z.string(), + resources: z.array(z.string()), + 'detail-type': z.string(), + detail: z.unknown(), + 'replay-name': z.string().optional(), +}); + +export { EventBridgeSchema }; diff --git a/packages/parser/src/schemas/kafka.ts b/packages/parser/src/schemas/kafka.ts new file mode 100644 index 0000000000..880fb404d8 --- /dev/null +++ b/packages/parser/src/schemas/kafka.ts @@ -0,0 +1,44 @@ +import { z } from 'zod'; + +const KafkaRecordSchema = z.object({ + topic: z.string(), + partition: z.number(), + offset: z.number(), + timestamp: z.number(), + timestampType: z.string(), + key: z.string().transform((key) => { + return Buffer.from(key, 'base64').toString(); + }), + value: z.string().transform((value) => { + return Buffer.from(value, 'base64').toString(); + }), + headers: z.array( + z.record( + z.string(), + z.array(z.number()).transform((value) => { + return String.fromCharCode(...value); + }) + ) + ), +}); + +const KafkaBaseEventSchema = z.object({ + bootstrapServers: z + .string() + .transform((bootstrapServers) => { + return bootstrapServers ? bootstrapServers.split(',') : undefined; + }) + .nullish(), + records: z.record(z.string(), z.array(KafkaRecordSchema)), +}); + +const KafkaSelfManagedEventSchema = KafkaBaseEventSchema.extend({ + eventSource: z.literal('aws:SelfManagedKafka'), +}); + +const KafkaMskEventSchema = KafkaBaseEventSchema.extend({ + eventSource: z.literal('aws:kafka'), + eventSourceArn: z.string(), +}); + +export { KafkaSelfManagedEventSchema, KafkaMskEventSchema }; diff --git a/packages/parser/src/schemas/kinesis-firehose.ts b/packages/parser/src/schemas/kinesis-firehose.ts new file mode 100644 index 0000000000..e541cc3f65 --- /dev/null +++ b/packages/parser/src/schemas/kinesis-firehose.ts @@ -0,0 +1,51 @@ +import { z } from 'zod'; +import { SqsRecordSchema } from './sqs.js'; + +const KinesisRecordMetaData = z.object({ + shardId: z.string(), + partitionKey: z.string(), + approximateArrivalTimestamp: z.number().positive(), + sequenceNumber: z.string(), + subsequenceNumber: z.number(), +}); + +const KinesisFireHoseRecordBase = z.object({ + recordId: z.string(), + approximateArrivalTimestamp: z.number().positive(), + kinesisRecordMetaData: KinesisRecordMetaData.optional(), +}); + +const KinesisFireHoseBaseSchema = z.object({ + invocationId: z.string(), + deliveryStreamArn: z.string(), + region: z.string(), + sourceKinesisStreamArn: z.string().optional(), +}); + +const KinesisFirehoseRecord = KinesisFireHoseRecordBase.extend({ + data: z + .string() + .transform((data) => Buffer.from(data, 'base64').toString('utf8')), +}); + +const KinesisFirehoseSqsRecord = KinesisFireHoseRecordBase.extend({ + data: z.string().transform((data) => { + try { + return SqsRecordSchema.parse( + JSON.parse(Buffer.from(data, 'base64').toString('utf8')) + ); + } catch (e) { + return data; + } + }), +}); + +const KinesisFirehoseSchema = KinesisFireHoseBaseSchema.extend({ + records: z.array(KinesisFirehoseRecord), +}); + +const KinesisFirehoseSqsSchema = KinesisFireHoseBaseSchema.extend({ + records: z.array(KinesisFirehoseSqsRecord), +}); + +export { KinesisFirehoseSchema, KinesisFirehoseSqsSchema }; diff --git a/packages/parser/src/schemas/kinesis.ts b/packages/parser/src/schemas/kinesis.ts new file mode 100644 index 0000000000..d598715420 --- /dev/null +++ b/packages/parser/src/schemas/kinesis.ts @@ -0,0 +1,25 @@ +import { z } from 'zod'; + +const KinesisDataStreamRecordPayload = z.object({ + kinesisSchemaVersion: z.string(), + partitionKey: z.string(), + sequenceNumber: z.string(), + approximateArrivalTimestamp: z.number(), + data: z.string(), +}); + +const KinesisDataStreamRecord = z.object({ + eventSource: z.literal('aws:kinesis'), + eventVersion: z.string(), + eventID: z.string(), + eventName: z.literal('aws:kinesis:record'), + invokeIdentityArn: z.string(), + eventSourceARN: z.string(), + kinesis: KinesisDataStreamRecordPayload, +}); + +const KinesisDataStreamSchema = z.object({ + Records: z.array(KinesisDataStreamRecord), +}); + +export { KinesisDataStreamSchema }; diff --git a/packages/parser/src/schemas/lambda.ts b/packages/parser/src/schemas/lambda.ts new file mode 100644 index 0000000000..e8e72be255 --- /dev/null +++ b/packages/parser/src/schemas/lambda.ts @@ -0,0 +1,14 @@ +import { APIGatewayProxyEventV2Schema } from './apigwv2.js'; + +/** + * Lambda Function URL follows the API Gateway HTTP APIs Payload Format Version 2.0. + * + * Keys related to API Gateway features not available in Function URL use a sentinel value (e.g.`routeKey`, `stage`). + * Documentation: + * - https://docs.aws.amazon.com/lambda/latest/dg/urls-configuration.html + * - https://docs.aws.amazon.com/lambda/latest/dg/urls-invocation.html#urls-payloads + * + */ +const LambdaFunctionUrlSchema = APIGatewayProxyEventV2Schema.extend({}); + +export { LambdaFunctionUrlSchema }; diff --git a/packages/parser/src/schemas/s3.ts b/packages/parser/src/schemas/s3.ts new file mode 100644 index 0000000000..558776ffa5 --- /dev/null +++ b/packages/parser/src/schemas/s3.ts @@ -0,0 +1,164 @@ +import { z } from 'zod'; +import { EventBridgeSchema } from './eventbridge.js'; +import { SqsRecordSchema } from './sqs.js'; + +const S3Identity = z.object({ + principalId: z.string(), +}); + +const S3RequestParameters = z.object({ + sourceIPAddress: z.string().ip(), +}); + +const S3ResponseElements = z.object({ + 'x-amz-request-id': z.string(), + 'x-amz-id-2': z.string(), +}); + +const S3Message = z.object({ + s3SchemaVersion: z.string(), + configurationId: z.string(), + object: z.object({ + key: z.string(), + size: z.number().optional(), + urlDecodedKey: z.string().optional(), + eTag: z.string().optional(), + sequencer: z.string(), + versionId: z.optional(z.string()), + }), + bucket: z.object({ + name: z.string(), + ownerIdentity: S3Identity, + arn: z.string(), + }), +}); + +const S3EventRecordGlacierEventData = z.object({ + restoreEventData: z.object({ + lifecycleRestorationExpiryTime: z.string(), + lifecycleRestoreStorageClass: z.string(), + }), +}); + +const S3RecordSchema = z + .object({ + eventVersion: z.string(), + eventSource: z.literal('aws:s3'), + awsRegion: z.string(), + eventTime: z.string().datetime(), + eventName: z.string(), + userIdentity: S3Identity, + requestParameters: S3RequestParameters, + responseElements: S3ResponseElements, + s3: S3Message, + glacierEventData: z.optional(S3EventRecordGlacierEventData), + }) + .refine((value) => { + return ( + (!value.eventName.includes('ObjectRemoved') && + value.s3.object.size === undefined) || + value.s3.object.eTag === undefined, + { + message: + 'S3 event notification with ObjectRemoved event name must have size or eTag defined', + } + ); + }); + +const S3EventNotificationEventBridgeDetailSchema = z.object({ + version: z.string(), + bucket: z.object({ + name: z.string(), + }), + object: z.object({ + key: z.string(), + size: z.number().nonnegative().optional(), + etag: z.string(), + 'version-id': z.string().optional(), + sequencer: z.string().optional(), + }), + 'request-id': z.string(), + requester: z.string(), + 'source-ip-address': z.string().ip().optional(), + reason: z.string().optional(), + 'deletion-type': z.string().optional(), + 'restore-expiry-time': z.string().optional(), + 'source-storage-class': z.string().optional(), + 'destination-storage-class': z.string().optional(), + 'destination-access-tier': z.string().optional(), +}); + +const S3EventNotificationEventBridgeSchema = EventBridgeSchema.extend({ + detail: S3EventNotificationEventBridgeDetailSchema, +}); + +const S3Schema = z.object({ + Records: z.array(S3RecordSchema), +}); + +const S3SqsEventNotificationRecordSchema = SqsRecordSchema.extend({ + body: z.string(), +}); + +const S3SqsEventNotificationSchema = z.object({ + Records: z.array(S3SqsEventNotificationRecordSchema), +}); + +const S3ObjectContext = z.object({ + inputS3Url: z.string().url(), + outputRoute: z.string(), + outputToken: z.string(), +}); + +const S3ObjectConfiguration = z.object({ + accessPointArn: z.string(), + supportingAccessPointArn: z.string(), + payload: z.union([z.string(), z.object({})]), +}); + +const S3ObjectUserRequest = z.object({ + url: z.string(), + headers: z.record(z.string(), z.string()), +}); + +const S3ObjectSessionContext = z.object({ + sessionIssuer: z.object({ + type: z.string(), + userName: z.string().optional(), + principalId: z.string(), + arn: z.string(), + accountId: z.string(), + }), + attributes: z.object({ + creationDate: z.string(), + mfaAuthenticated: z + .union([z.boolean(), z.literal('true'), z.literal('false')]) + .transform((value) => value === true || value === 'true'), + }), +}); + +const S3ObjectUserIdentity = z.object({ + type: z.string(), + accountId: z.string(), + accessKeyId: z.string(), + userName: z.string().optional(), + principalId: z.string(), + arn: z.string(), + sessionContext: S3ObjectSessionContext.optional(), +}); + +const S3ObjectLambdaEventSchema = z.object({ + xAmzRequestId: z.string(), + getObjectContext: S3ObjectContext, + configuration: S3ObjectConfiguration, + userRequest: S3ObjectUserRequest, + userIdentity: S3ObjectUserIdentity, + protocolVersion: z.string(), +}); + +export { + S3Schema, + S3EventNotificationEventBridgeSchema, + S3SqsEventNotificationSchema, + S3ObjectLambdaEventSchema, +}; diff --git a/packages/parser/src/schemas/ses.ts b/packages/parser/src/schemas/ses.ts new file mode 100644 index 0000000000..254d3de255 --- /dev/null +++ b/packages/parser/src/schemas/ses.ts @@ -0,0 +1,65 @@ +import { z } from 'zod'; + +const SesReceiptVerdict = z.object({ + status: z.enum(['PASS', 'FAIL', 'GRAY', 'PROCESSING_FAILED']), +}); + +const SesReceipt = z.object({ + timestamp: z.string().datetime(), + processingTimeMillis: z.number().int().positive(), + recipients: z.array(z.string()), + spamVerdict: SesReceiptVerdict, + virusVerdict: SesReceiptVerdict, + spfVerdict: SesReceiptVerdict, + dmarcVerdict: SesReceiptVerdict, + dkimVerdict: SesReceiptVerdict, + dmarcPolicy: z.enum(['none', 'quarantine', 'reject']), + action: z.object({ + type: z.enum(['Lambda']), + invocationType: z.literal('Event'), + functionArn: z.string(), + }), +}); + +const SesMail = z.object({ + timestamp: z.string().datetime(), + source: z.string(), + messageId: z.string(), + destination: z.array(z.string()), + headersTruncated: z.boolean(), + headers: z.array( + z.object({ + name: z.string(), + value: z.string(), + }) + ), + commonHeaders: z.object({ + from: z.array(z.string()), + to: z.array(z.string()), + cc: z.array(z.string()).optional(), + bcc: z.array(z.string()).optional(), + sender: z.array(z.string()).optional(), + 'reply-to': z.array(z.string()).optional(), + returnPath: z.string(), + messageId: z.string(), + date: z.string(), + subject: z.string(), + }), +}); + +const SesMessage = z.object({ + mail: SesMail, + receipt: SesReceipt, +}); + +const SesRecordSchema = z.object({ + eventSource: z.literal('aws:ses'), + eventVersion: z.string(), + ses: SesMessage, +}); + +const SesSchema = z.object({ + Records: z.array(SesRecordSchema), +}); + +export { SesSchema, SesRecordSchema }; diff --git a/packages/parser/src/schemas/sns.ts b/packages/parser/src/schemas/sns.ts new file mode 100644 index 0000000000..f8d8d8bbc4 --- /dev/null +++ b/packages/parser/src/schemas/sns.ts @@ -0,0 +1,33 @@ +import { z } from 'zod'; + +const SnsMsgAttribute = z.object({ + Type: z.string(), + Value: z.string(), +}); + +const SnsNotificationSchema = z.object({ + Subject: z.string().optional(), + TopicArn: z.string(), + UnsubscribeUrl: z.string().url(), + Type: z.literal('Notification'), + MessageAttributes: z.record(z.string(), SnsMsgAttribute).optional(), + Message: z.string(), + MessageId: z.string(), + Signature: z.string().optional(), + SignatureVersion: z.string().optional(), + SigningCertUrl: z.string().url().optional(), + Timestamp: z.string().datetime(), +}); + +const SnsRecordSchema = z.object({ + EventSource: z.literal('aws:sns'), + EventVersion: z.string(), + EventSubscriptionArn: z.string(), + Sns: SnsNotificationSchema, +}); + +const SnsSchema = z.object({ + Records: z.array(SnsRecordSchema), +}); + +export { SnsSchema, SnsRecordSchema, SnsNotificationSchema, SnsMsgAttribute }; diff --git a/packages/parser/src/schemas/sqs.ts b/packages/parser/src/schemas/sqs.ts new file mode 100644 index 0000000000..09aed635ea --- /dev/null +++ b/packages/parser/src/schemas/sqs.ts @@ -0,0 +1,44 @@ +import { z } from 'zod'; + +const SqsMsgAttributeSchema = z.object({ + stringValue: z.string().optional(), + binaryValue: z.string().optional(), + stringListValues: z.array(z.string()).optional(), + binaryListValues: z.array(z.string()).optional(), + dataType: z.string(), +}); + +const SqsAttributesSchema = z.object({ + ApproximateReceiveCount: z.string(), + ApproximateFirstReceiveTimestamp: z.string(), + MessageDeduplicationId: z.string().optional(), + MessageGroupId: z.string().optional(), + SenderId: z.string(), + SentTimestamp: z.string(), + SequenceNumber: z.string().optional(), + AWSTraceHeader: z.string().optional(), +}); + +const SqsRecordSchema = z.object({ + messageId: z.string(), + receiptHandle: z.string(), + body: z.string(), + attributes: SqsAttributesSchema, + messageAttributes: z.record(z.string(), SqsMsgAttributeSchema), + md5OfBody: z.string(), + md5OfMessageAttributes: z.string().optional().nullable(), + eventSource: z.literal('aws:sqs'), + eventSourceARN: z.string(), + awsRegion: z.string(), +}); + +const SqsSchema = z.object({ + Records: z.array(SqsRecordSchema), +}); + +export { + SqsSchema, + SqsRecordSchema, + SqsAttributesSchema, + SqsMsgAttributeSchema, +}; diff --git a/packages/parser/src/schemas/vpc-lattice.ts b/packages/parser/src/schemas/vpc-lattice.ts new file mode 100644 index 0000000000..f8f266fa20 --- /dev/null +++ b/packages/parser/src/schemas/vpc-lattice.ts @@ -0,0 +1,12 @@ +import { z } from 'zod'; + +const VpcLatticeSchema = z.object({ + method: z.enum(['GET', 'POST', 'PUT', 'PATCH', 'DELETE', 'HEAD', 'OPTIONS']), + raw_path: z.string(), + body: z.string(), + is_base64_encoded: z.boolean(), + headers: z.record(z.string(), z.string()), + query_string_parameters: z.record(z.string(), z.string()), +}); + +export { VpcLatticeSchema }; diff --git a/packages/parser/src/schemas/vpc-latticev2.ts b/packages/parser/src/schemas/vpc-latticev2.ts new file mode 100644 index 0000000000..1ef3fd671f --- /dev/null +++ b/packages/parser/src/schemas/vpc-latticev2.ts @@ -0,0 +1,36 @@ +import { z } from 'zod'; + +const VpcLatticeV2RequestContextIdentity = z.object({ + sourceVpcArn: z.string().optional(), + type: z.string().optional(), + principal: z.string().optional(), + principalOrgId: z.string().optional(), + sessionName: z.string().optional(), + X509SubjectCn: z.string().optional(), + X509IssuerOu: z.string().optional(), + x509SanDns: z.string().optional(), + x509SanUri: z.string().optional(), + X509SanNameCn: z.string().optional(), +}); + +const VpcLatticeV2RequestContext = z.object({ + serviceNetworkArn: z.string(), + serviceArn: z.string(), + targetGroupArn: z.string(), + region: z.string(), + timeEpoch: z.string(), + identity: VpcLatticeV2RequestContextIdentity, +}); + +const VpcLatticeV2Schema = z.object({ + version: z.string(), + path: z.string(), + method: z.enum(['GET', 'POST', 'PUT', 'PATCH', 'DELETE', 'HEAD', 'OPTIONS']), + headers: z.record(z.string(), z.string()), + queryStringParameters: z.record(z.string(), z.string()).optional(), + body: z.string().optional(), + isBase64Encoded: z.boolean().optional(), + requestContext: VpcLatticeV2RequestContext, +}); + +export { VpcLatticeV2Schema }; diff --git a/packages/parser/tests/events/activeMQEvent.json b/packages/parser/tests/events/activeMQEvent.json new file mode 100644 index 0000000000..57417cfd22 --- /dev/null +++ b/packages/parser/tests/events/activeMQEvent.json @@ -0,0 +1,55 @@ +{ + "eventSource": "aws:amq", + "eventSourceArn": "arn:aws:mq:us-west-2:112556298976:broker:test:b-9bcfa592-423a-4942-879d-eb284b418fc8", + "messages": [ + { + "messageID": "ID:b-9bcfa592-423a-4942-879d-eb284b418fc8-1.mq.us-west-2.amazonaws.com-37557-1234520418293-4:1:1:1:1", + "messageType": "jms/text-message", + "data": "QUJDOkFBQUE=", + "connectionId": "myJMSCoID", + "redelivered": false, + "destination": { + "physicalname": "testQueue" + }, + "timestamp": 1598827811958, + "brokerInTime": 1598827811958, + "brokerOutTime": 1598827811959, + "properties": { + "testKey": "testValue" + } + }, + { + "messageID": "ID:b-9bcfa592-423a-4942-879d-eb284b418fc8-1.mq.us-west-2.amazonaws.com-37557-1234520418293-4:1:1:1:1", + "messageType": "jms/text-message", + "data": "eyJ0aW1lb3V0IjowLCJkYXRhIjoiQ1pybWYwR3c4T3Y0YnFMUXhENEUifQ==", + "connectionId": "myJMSCoID2", + "redelivered": false, + "destination": { + "physicalname": "testQueue" + }, + "timestamp": 1598827811958, + "brokerInTime": 1598827811958, + "brokerOutTime": 1598827811959, + "properties": { + "testKey": "testValue" + } + + }, + { + "messageID": "ID:b-9bcfa592-423a-4942-879d-eb284b418fc8-1.mq.us-west-2.amazonaws.com-37557-1234520418293-4:1:1:1:1", + "messageType": "jms/bytes-message", + "data": "3DTOOW7crj51prgVLQaGQ82S48k=", + "connectionId": "myJMSCoID1", + "persistent": false, + "destination": { + "physicalname": "testQueue" + }, + "timestamp": 1598827811958, + "brokerInTime": 1598827811958, + "brokerOutTime": 1598827811959, + "properties": { + "testKey": "testValue" + } + } + ] +} diff --git a/packages/parser/tests/events/albEvent.json b/packages/parser/tests/events/albEvent.json new file mode 100644 index 0000000000..9328cb39e1 --- /dev/null +++ b/packages/parser/tests/events/albEvent.json @@ -0,0 +1,28 @@ +{ + "requestContext": { + "elb": { + "targetGroupArn": "arn:aws:elasticloadbalancing:us-east-2:123456789012:targetgroup/lambda-279XGJDqGZ5rsrHC2Fjr/49e9d65c45c6791a" + } + }, + "httpMethod": "GET", + "path": "/lambda", + "queryStringParameters": { + "query": "1234ABCD" + }, + "headers": { + "accept": "text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8", + "accept-encoding": "gzip", + "accept-language": "en-US,en;q=0.9", + "connection": "keep-alive", + "host": "lambda-alb-123578498.us-east-2.elb.amazonaws.com", + "upgrade-insecure-requests": "1", + "user-agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/71.0.3578.98 Safari/537.36", + "x-amzn-trace-id": "Root=1-5c536348-3d683b8b04734faae651f476", + "x-forwarded-for": "72.12.164.125", + "x-forwarded-port": "80", + "x-forwarded-proto": "http", + "x-imforwards": "20" + }, + "body": "Test", + "isBase64Encoded": false +} diff --git a/packages/parser/tests/events/albEventPathTrailingSlash.json b/packages/parser/tests/events/albEventPathTrailingSlash.json new file mode 100644 index 0000000000..c517a3f6b0 --- /dev/null +++ b/packages/parser/tests/events/albEventPathTrailingSlash.json @@ -0,0 +1,28 @@ +{ + "requestContext": { + "elb": { + "targetGroupArn": "arn:aws:elasticloadbalancing:us-east-2:123456789012:targetgroup/lambda-279XGJDqGZ5rsrHC2Fjr/49e9d65c45c6791a" + } + }, + "httpMethod": "GET", + "path": "/lambda/", + "queryStringParameters": { + "query": "1234ABCD" + }, + "headers": { + "accept": "text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8", + "accept-encoding": "gzip", + "accept-language": "en-US,en;q=0.9", + "connection": "keep-alive", + "host": "lambda-alb-123578498.us-east-2.elb.amazonaws.com", + "upgrade-insecure-requests": "1", + "user-agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/71.0.3578.98 Safari/537.36", + "x-amzn-trace-id": "Root=1-5c536348-3d683b8b04734faae651f476", + "x-forwarded-for": "72.12.164.125", + "x-forwarded-port": "80", + "x-forwarded-proto": "http", + "x-imforwards": "20" + }, + "body": "Test", + "isBase64Encoded": false + } \ No newline at end of file diff --git a/packages/parser/tests/events/albMultiValueHeadersEvent.json b/packages/parser/tests/events/albMultiValueHeadersEvent.json new file mode 100644 index 0000000000..6b34709605 --- /dev/null +++ b/packages/parser/tests/events/albMultiValueHeadersEvent.json @@ -0,0 +1,35 @@ +{ + "requestContext": { + "elb": { + "targetGroupArn": "arn:aws:elasticloadbalancing:eu-central-1:1234567890:targetgroup/alb-c-Targe-11GDXTPQ7663S/804a67588bfdc10f" + } + }, + "httpMethod": "GET", + "path": "/todos", + "multiValueQueryStringParameters": {}, + "multiValueHeaders": { + "accept": [ + "*/*" + ], + "host": [ + "alb-c-LoadB-14POFKYCLBNSF-1815800096.eu-central-1.elb.amazonaws.com" + ], + "user-agent": [ + "curl/7.79.1" + ], + "x-amzn-trace-id": [ + "Root=1-62fa9327-21cdd4da4c6db451490a5fb7" + ], + "x-forwarded-for": [ + "123.123.123.123" + ], + "x-forwarded-port": [ + "80" + ], + "x-forwarded-proto": [ + "http" + ] + }, + "body": "", + "isBase64Encoded": false +} diff --git a/packages/parser/tests/events/apiGatewayAuthorizerRequestEvent.json b/packages/parser/tests/events/apiGatewayAuthorizerRequestEvent.json new file mode 100644 index 0000000000..6a80fff823 --- /dev/null +++ b/packages/parser/tests/events/apiGatewayAuthorizerRequestEvent.json @@ -0,0 +1,68 @@ +{ + "version": "1.0", + "type": "REQUEST", + "methodArn": "arn:aws:execute-api:us-east-1:123456789012:abcdef123/test/GET/request", + "identitySource": "user1,123", + "authorizationToken": "user1,123", + "resource": "/request", + "path": "/request", + "httpMethod": "GET", + "headers": { + "X-AMZ-Date": "20170718T062915Z", + "Accept": "*/*", + "HeaderAuth1": "headerValue1", + "CloudFront-Viewer-Country": "US", + "CloudFront-Forwarded-Proto": "https", + "CloudFront-Is-Tablet-Viewer": "false", + "CloudFront-Is-Mobile-Viewer": "false", + "User-Agent": "..." + }, + "queryStringParameters": { + "QueryString1": "queryValue1" + }, + "pathParameters": {}, + "stageVariables": { + "StageVar1": "stageValue1" + }, + "requestContext": { + "accountId": "123456789012", + "apiId": "abcdef123", + "domainName": "3npb9j1tlk.execute-api.us-west-1.amazonaws.com", + "domainPrefix": "3npb9j1tlk", + "extendedRequestId": "EXqgWgXxSK4EJug=", + "httpMethod": "GET", + "identity": { + "accessKey": null, + "accountId": null, + "caller": null, + "cognitoAuthenticationProvider": null, + "cognitoAuthenticationType": null, + "cognitoIdentityId": null, + "cognitoIdentityPoolId": null, + "principalOrgId": null, + "apiKey": "...", + "sourceIp": "192.168.0.1", + "user": null, + "userAgent": "PostmanRuntime/7.28.3", + "userArn": null, + "clientCert": { + "clientCertPem": "CERT_CONTENT", + "subjectDN": "www.example.com", + "issuerDN": "Example issuer", + "serialNumber": "a1:a1:a1:a1:a1:a1:a1:a1:a1:a1:a1:a1:a1:a1:a1:a1", + "validity": { + "notBefore": "May 28 12:30:02 2019 GMT", + "notAfter": "Aug 5 09:36:04 2021 GMT" + } + } + }, + "path": "/request", + "protocol": "HTTP/1.1", + "requestId": "EXqgWgXxSK4EJug=", + "requestTime": "20/Aug/2021:14:36:50 +0000", + "requestTimeEpoch": 1629470210043, + "resourceId": "ANY /request", + "resourcePath": "/request", + "stage": "test" + } +} diff --git a/packages/parser/tests/events/apiGatewayAuthorizerTokenEvent.json b/packages/parser/tests/events/apiGatewayAuthorizerTokenEvent.json new file mode 100644 index 0000000000..f30f360f6d --- /dev/null +++ b/packages/parser/tests/events/apiGatewayAuthorizerTokenEvent.json @@ -0,0 +1,5 @@ +{ + "type": "TOKEN", + "authorizationToken": "allow", + "methodArn": "arn:aws:execute-api:us-west-2:123456789012:ymy8tbxw7b/*/GET/" +} diff --git a/packages/parser/tests/events/apiGatewayAuthorizerV2Event.json b/packages/parser/tests/events/apiGatewayAuthorizerV2Event.json new file mode 100644 index 0000000000..f0528080c9 --- /dev/null +++ b/packages/parser/tests/events/apiGatewayAuthorizerV2Event.json @@ -0,0 +1,52 @@ +{ + "version": "2.0", + "type": "REQUEST", + "routeArn": "arn:aws:execute-api:us-east-1:123456789012:abcdef123/test/GET/request", + "identitySource": ["user1", "123"], + "routeKey": "GET /merchants", + "rawPath": "/merchants", + "rawQueryString": "parameter1=value1¶meter1=value2¶meter2=value", + "cookies": ["cookie1", "cookie2"], + "headers": { + "x-amzn-trace-id": "Root=1-611cc4a7-0746ebee281cfd967db97b64", + "Header1": "value1", + "Header2": "value2", + "Authorization": "value" + }, + "queryStringParameters": { + "parameter1": "value1,value2", + "parameter2": "value" + }, + "requestContext": { + "accountId": "123456789012", + "apiId": "api-id", + "authentication": { + "clientCert": { + "clientCertPem": "CERT_CONTENT", + "subjectDN": "www.example.com", + "issuerDN": "Example issuer", + "serialNumber": "a1:a1:a1:a1:a1:a1:a1:a1:a1:a1:a1:a1:a1:a1:a1:a1", + "validity": { + "notBefore": "May 28 12:30:02 2019 GMT", + "notAfter": "Aug 5 09:36:04 2021 GMT" + } + } + }, + "domainName": "id.execute-api.us-east-1.amazonaws.com", + "domainPrefix": "id", + "http": { + "method": "POST", + "path": "/merchants", + "protocol": "HTTP/1.1", + "sourceIp": "IP", + "userAgent": "agent" + }, + "requestId": "id", + "routeKey": "GET /merchants", + "stage": "$default", + "time": "12/Mar/2020:19:03:58 +0000", + "timeEpoch": 1583348638390 + }, + "pathParameters": { "parameter1": "value1" }, + "stageVariables": { "stageVariable1": "value1", "stageVariable2": "value2" } +} diff --git a/packages/parser/tests/events/apiGatewayProxyEvent.json b/packages/parser/tests/events/apiGatewayProxyEvent.json new file mode 100644 index 0000000000..4d2fb62399 --- /dev/null +++ b/packages/parser/tests/events/apiGatewayProxyEvent.json @@ -0,0 +1,81 @@ +{ + "version": "1.0", + "resource": "/my/path", + "path": "/my/path", + "httpMethod": "GET", + "headers": { + "Header1": "value1", + "Header2": "value2", + "Origin": "https://aws.amazon.com" + }, + "multiValueHeaders": { + "Header1": [ + "value1" + ], + "Header2": [ + "value1", + "value2" + ] + }, + "queryStringParameters": { + "parameter1": "value1", + "parameter2": "value" + }, + "multiValueQueryStringParameters": { + "parameter1": [ + "value1", + "value2" + ], + "parameter2": [ + "value" + ] + }, + "requestContext": { + "accountId": "123456789012", + "apiId": "id", + "authorizer": { + "claims": null, + "scopes": null + }, + "domainName": "id.execute-api.us-east-1.amazonaws.com", + "domainPrefix": "id", + "extendedRequestId": "request-id", + "httpMethod": "GET", + "identity": { + "accessKey": null, + "accountId": null, + "caller": null, + "cognitoAuthenticationProvider": null, + "cognitoAuthenticationType": null, + "cognitoIdentityId": null, + "cognitoIdentityPoolId": null, + "principalOrgId": null, + "sourceIp": "192.168.0.1", + "user": null, + "userAgent": "user-agent", + "userArn": null, + "clientCert": { + "clientCertPem": "CERT_CONTENT", + "subjectDN": "www.example.com", + "issuerDN": "Example issuer", + "serialNumber": "a1:a1:a1:a1:a1:a1:a1:a1:a1:a1:a1:a1:a1:a1:a1:a1", + "validity": { + "notBefore": "May 28 12:30:02 2019 GMT", + "notAfter": "Aug 5 09:36:04 2021 GMT" + } + } + }, + "path": "/my/path", + "protocol": "HTTP/1.1", + "requestId": "id=", + "requestTime": "04/Mar/2020:19:15:17 +0000", + "requestTimeEpoch": 1583349317135, + "resourceId": null, + "resourcePath": "/my/path", + "stage": "$default" + }, + "pathParameters": null, + "stageVariables": null, + "body": "Hello from Lambda!", + "isBase64Encoded": false +} \ No newline at end of file diff --git a/packages/parser/tests/events/apiGatewayProxyEventAnotherPath.json b/packages/parser/tests/events/apiGatewayProxyEventAnotherPath.json new file mode 100644 index 0000000000..660118a2f9 --- /dev/null +++ b/packages/parser/tests/events/apiGatewayProxyEventAnotherPath.json @@ -0,0 +1,80 @@ +{ + "version": "1.0", + "resource": "/my/anotherPath", + "path": "/my/anotherPath", + "httpMethod": "GET", + "headers": { + "Header1": "value1", + "Header2": "value2" + }, + "multiValueHeaders": { + "Header1": [ + "value1" + ], + "Header2": [ + "value1", + "value2" + ] + }, + "queryStringParameters": { + "parameter1": "value1", + "parameter2": "value" + }, + "multiValueQueryStringParameters": { + "parameter1": [ + "value1", + "value2" + ], + "parameter2": [ + "value" + ] + }, + "requestContext": { + "accountId": "123456789012", + "apiId": "id", + "authorizer": { + "claims": null, + "scopes": null + }, + "domainName": "id.execute-api.us-east-1.amazonaws.com", + "domainPrefix": "id", + "extendedRequestId": "request-id", + "httpMethod": "GET", + "identity": { + "accessKey": null, + "accountId": null, + "caller": null, + "cognitoAuthenticationProvider": null, + "cognitoAuthenticationType": null, + "cognitoIdentityId": null, + "cognitoIdentityPoolId": null, + "principalOrgId": null, + "sourceIp": "192.168.0.1", + "user": null, + "userAgent": "user-agent", + "userArn": null, + "clientCert": { + "clientCertPem": "CERT_CONTENT", + "subjectDN": "www.example.com", + "issuerDN": "Example issuer", + "serialNumber": "a1:a1:a1:a1:a1:a1:a1:a1:a1:a1:a1:a1:a1:a1:a1:a1", + "validity": { + "notBefore": "May 28 12:30:02 2019 GMT", + "notAfter": "Aug 5 09:36:04 2021 GMT" + } + } + }, + "path": "/my/anotherPath", + "protocol": "HTTP/1.1", + "requestId": "id=", + "requestTime": "04/Mar/2020:19:15:17 +0000", + "requestTimeEpoch": 1583349317135, + "resourceId": null, + "resourcePath": "/my/anotherPath", + "stage": "$default" + }, + "pathParameters": null, + "stageVariables": null, + "body": "Hello from Lambda!", + "isBase64Encoded": true +} \ No newline at end of file diff --git a/packages/parser/tests/events/apiGatewayProxyEventPathTrailingSlash.json b/packages/parser/tests/events/apiGatewayProxyEventPathTrailingSlash.json new file mode 100644 index 0000000000..ced73da8c9 --- /dev/null +++ b/packages/parser/tests/events/apiGatewayProxyEventPathTrailingSlash.json @@ -0,0 +1,80 @@ +{ + "version": "1.0", + "resource": "/my/path", + "path": "/my/path/", + "httpMethod": "GET", + "headers": { + "Header1": "value1", + "Header2": "value2" + }, + "multiValueHeaders": { + "Header1": [ + "value1" + ], + "Header2": [ + "value1", + "value2" + ] + }, + "queryStringParameters": { + "parameter1": "value1", + "parameter2": "value" + }, + "multiValueQueryStringParameters": { + "parameter1": [ + "value1", + "value2" + ], + "parameter2": [ + "value" + ] + }, + "requestContext": { + "accountId": "123456789012", + "apiId": "id", + "authorizer": { + "claims": null, + "scopes": null + }, + "domainName": "id.execute-api.us-east-1.amazonaws.com", + "domainPrefix": "id", + "extendedRequestId": "request-id", + "httpMethod": "GET", + "identity": { + "accessKey": null, + "accountId": null, + "caller": null, + "cognitoAuthenticationProvider": null, + "cognitoAuthenticationType": null, + "cognitoIdentityId": null, + "cognitoIdentityPoolId": null, + "principalOrgId": null, + "sourceIp": "192.168.0.1", + "user": null, + "userAgent": "user-agent", + "userArn": null, + "clientCert": { + "clientCertPem": "CERT_CONTENT", + "subjectDN": "www.example.com", + "issuerDN": "Example issuer", + "serialNumber": "a1:a1:a1:a1:a1:a1:a1:a1:a1:a1:a1:a1:a1:a1:a1:a1", + "validity": { + "notBefore": "May 28 12:30:02 2019 GMT", + "notAfter": "Aug 5 09:36:04 2021 GMT" + } + } + }, + "path": "/my/path", + "protocol": "HTTP/1.1", + "requestId": "id=", + "requestTime": "04/Mar/2020:19:15:17 +0000", + "requestTimeEpoch": 1583349317135, + "resourceId": null, + "resourcePath": "/my/path", + "stage": "$default" + }, + "pathParameters": null, + "stageVariables": null, + "body": "Hello from Lambda!", + "isBase64Encoded": true + } \ No newline at end of file diff --git a/packages/parser/tests/events/apiGatewayProxyEventPrincipalId.json b/packages/parser/tests/events/apiGatewayProxyEventPrincipalId.json new file mode 100644 index 0000000000..f18a2a44bb --- /dev/null +++ b/packages/parser/tests/events/apiGatewayProxyEventPrincipalId.json @@ -0,0 +1,13 @@ +{ + "resource": "/trip", + "path": "/trip", + "httpMethod": "POST", + "requestContext": { + "requestId": "34972478-2843-4ced-a657-253108738274", + "authorizer": { + "user_id": "fake_username", + "principalId": "fake", + "integrationLatency": 451 + } + } +} diff --git a/packages/parser/tests/events/apiGatewayProxyEvent_noVersionAuth.json b/packages/parser/tests/events/apiGatewayProxyEvent_noVersionAuth.json new file mode 100644 index 0000000000..3a4af1ae9a --- /dev/null +++ b/packages/parser/tests/events/apiGatewayProxyEvent_noVersionAuth.json @@ -0,0 +1,75 @@ +{ + "resource": "/my/path", + "path": "/my/path", + "httpMethod": "GET", + "headers": { + "Header1": "value1", + "Header2": "value2" + }, + "multiValueHeaders": { + "Header1": [ + "value1" + ], + "Header2": [ + "value1", + "value2" + ] + }, + "queryStringParameters": { + "parameter1": "value1", + "parameter2": "value" + }, + "multiValueQueryStringParameters": { + "parameter1": [ + "value1", + "value2" + ], + "parameter2": [ + "value" + ] + }, + "requestContext": { + "accountId": "123456789012", + "apiId": "id", + "domainName": "id.execute-api.us-east-1.amazonaws.com", + "domainPrefix": "id", + "extendedRequestId": "request-id", + "httpMethod": "GET", + "identity": { + "accessKey": null, + "accountId": null, + "caller": null, + "cognitoAuthenticationProvider": null, + "cognitoAuthenticationType": null, + "cognitoIdentityId": null, + "cognitoIdentityPoolId": null, + "principalOrgId": null, + "sourceIp": "192.168.0.1", + "user": null, + "userAgent": "user-agent", + "userArn": null, + "clientCert": { + "clientCertPem": "CERT_CONTENT", + "subjectDN": "www.example.com", + "issuerDN": "Example issuer", + "serialNumber": "a1:a1:a1:a1:a1:a1:a1:a1:a1:a1:a1:a1:a1:a1:a1:a1", + "validity": { + "notBefore": "May 28 12:30:02 2019 GMT", + "notAfter": "Aug 5 09:36:04 2021 GMT" + } + } + }, + "path": "/my/path", + "protocol": "HTTP/1.1", + "requestId": "id=", + "requestTime": "04/Mar/2020:19:15:17 +0000", + "requestTimeEpoch": 1583349317135, + "resourceId": null, + "resourcePath": "/my/path", + "stage": "$default" + }, + "pathParameters": null, + "stageVariables": null, + "body": "Hello from Lambda!", + "isBase64Encoded": true +} diff --git a/packages/parser/tests/events/apiGatewayProxyOtherEvent.json b/packages/parser/tests/events/apiGatewayProxyOtherEvent.json new file mode 100644 index 0000000000..7d5f0ef753 --- /dev/null +++ b/packages/parser/tests/events/apiGatewayProxyOtherEvent.json @@ -0,0 +1,81 @@ +{ + "version": "1.0", + "resource": "/other/path", + "path": "/other/path", + "httpMethod": "GET", + "headers": { + "Header1": "value1", + "Header2": "value2", + "Origin": "https://aws.amazon.com" + }, + "multiValueHeaders": { + "Header1": [ + "value1" + ], + "Header2": [ + "value1", + "value2" + ] + }, + "queryStringParameters": { + "parameter1": "value1", + "parameter2": "value" + }, + "multiValueQueryStringParameters": { + "parameter1": [ + "value1", + "value2" + ], + "parameter2": [ + "value" + ] + }, + "requestContext": { + "accountId": "123456789012", + "apiId": "id", + "authorizer": { + "claims": null, + "scopes": null + }, + "domainName": "id.execute-api.us-east-1.amazonaws.com", + "domainPrefix": "id", + "extendedRequestId": "request-id", + "httpMethod": "GET", + "identity": { + "accessKey": null, + "accountId": null, + "caller": null, + "cognitoAuthenticationProvider": null, + "cognitoAuthenticationType": null, + "cognitoIdentityId": null, + "cognitoIdentityPoolId": null, + "principalOrgId": null, + "sourceIp": "192.168.0.1", + "user": null, + "userAgent": "user-agent", + "userArn": null, + "clientCert": { + "clientCertPem": "CERT_CONTENT", + "subjectDN": "www.example.com", + "issuerDN": "Example issuer", + "serialNumber": "a1:a1:a1:a1:a1:a1:a1:a1:a1:a1:a1:a1:a1:a1:a1:a1", + "validity": { + "notBefore": "May 28 12:30:02 2019 GMT", + "notAfter": "Aug 5 09:36:04 2021 GMT" + } + } + }, + "path": "/other/path", + "protocol": "HTTP/1.1", + "requestId": "id=", + "requestTime": "04/Mar/2020:19:15:17 +0000", + "requestTimeEpoch": 1583349317135, + "resourceId": null, + "resourcePath": "/other/path", + "stage": "$default" + }, + "pathParameters": null, + "stageVariables": null, + "body": "Hello from Lambda!", + "isBase64Encoded": false +} diff --git a/packages/parser/tests/events/apiGatewayProxyV2Event.json b/packages/parser/tests/events/apiGatewayProxyV2Event.json new file mode 100644 index 0000000000..ac287d560a --- /dev/null +++ b/packages/parser/tests/events/apiGatewayProxyV2Event.json @@ -0,0 +1,69 @@ +{ + "version": "2.0", + "routeKey": "$default", + "rawPath": "/my/path", + "rawQueryString": "parameter1=value1¶meter1=value2¶meter2=value", + "cookies": [ + "cookie1", + "cookie2" + ], + "headers": { + "Header1": "value1", + "Header2": "value1,value2" + }, + "queryStringParameters": { + "parameter1": "value1,value2", + "parameter2": "value" + }, + "requestContext": { + "accountId": "123456789012", + "apiId": "api-id", + "authentication": { + "clientCert": { + "clientCertPem": "CERT_CONTENT", + "subjectDN": "www.example.com", + "issuerDN": "Example issuer", + "serialNumber": "a1:a1:a1:a1:a1:a1:a1:a1:a1:a1:a1:a1:a1:a1:a1:a1", + "validity": { + "notBefore": "May 28 12:30:02 2019 GMT", + "notAfter": "Aug 5 09:36:04 2021 GMT" + } + } + }, + "authorizer": { + "jwt": { + "claims": { + "claim1": "value1", + "claim2": "value2" + }, + "scopes": [ + "scope1", + "scope2" + ] + } + }, + "domainName": "id.execute-api.us-east-1.amazonaws.com", + "domainPrefix": "id", + "http": { + "method": "POST", + "path": "/my/path", + "protocol": "HTTP/1.1", + "sourceIp": "192.168.0.1", + "userAgent": "agent" + }, + "requestId": "id", + "routeKey": "$default", + "stage": "$default", + "time": "12/Mar/2020:19:03:58 +0000", + "timeEpoch": 1583348638390 + }, + "body": "{\"message\": \"hello world\", \"username\": \"tom\"}", + "pathParameters": { + "parameter1": "value1" + }, + "isBase64Encoded": false, + "stageVariables": { + "stageVariable1": "value1", + "stageVariable2": "value2" + } +} diff --git a/packages/parser/tests/events/apiGatewayProxyV2EventPathTrailingSlash.json b/packages/parser/tests/events/apiGatewayProxyV2EventPathTrailingSlash.json new file mode 100644 index 0000000000..6a745937ca --- /dev/null +++ b/packages/parser/tests/events/apiGatewayProxyV2EventPathTrailingSlash.json @@ -0,0 +1,69 @@ +{ + "version": "2.0", + "routeKey": "$default", + "rawPath": "/my/path/", + "rawQueryString": "parameter1=value1¶meter1=value2¶meter2=value", + "cookies": [ + "cookie1", + "cookie2" + ], + "headers": { + "Header1": "value1", + "Header2": "value1,value2" + }, + "queryStringParameters": { + "parameter1": "value1,value2", + "parameter2": "value" + }, + "requestContext": { + "accountId": "123456789012", + "apiId": "api-id", + "authentication": { + "clientCert": { + "clientCertPem": "CERT_CONTENT", + "subjectDN": "www.example.com", + "issuerDN": "Example issuer", + "serialNumber": "a1:a1:a1:a1:a1:a1:a1:a1:a1:a1:a1:a1:a1:a1:a1:a1", + "validity": { + "notBefore": "May 28 12:30:02 2019 GMT", + "notAfter": "Aug 5 09:36:04 2021 GMT" + } + } + }, + "authorizer": { + "jwt": { + "claims": { + "claim1": "value1", + "claim2": "value2" + }, + "scopes": [ + "scope1", + "scope2" + ] + } + }, + "domainName": "id.execute-api.us-east-1.amazonaws.com", + "domainPrefix": "id", + "http": { + "method": "POST", + "path": "/my/path", + "protocol": "HTTP/1.1", + "sourceIp": "192.168.0.1", + "userAgent": "agent" + }, + "requestId": "id", + "routeKey": "$default", + "stage": "$default", + "time": "12/Mar/2020:19:03:58 +0000", + "timeEpoch": 1583348638390 + }, + "body": "{\"message\": \"hello world\", \"username\": \"tom\"}", + "pathParameters": { + "parameter1": "value1" + }, + "isBase64Encoded": false, + "stageVariables": { + "stageVariable1": "value1", + "stageVariable2": "value2" + } + } \ No newline at end of file diff --git a/packages/parser/tests/events/apiGatewayProxyV2Event_GET.json b/packages/parser/tests/events/apiGatewayProxyV2Event_GET.json new file mode 100644 index 0000000000..34b9b04628 --- /dev/null +++ b/packages/parser/tests/events/apiGatewayProxyV2Event_GET.json @@ -0,0 +1,68 @@ +{ + "version": "2.0", + "routeKey": "$default", + "rawPath": "/my/path", + "rawQueryString": "parameter1=value1¶meter1=value2¶meter2=value", + "cookies": [ + "cookie1", + "cookie2" + ], + "headers": { + "Header1": "value1", + "Header2": "value1,value2" + }, + "queryStringParameters": { + "parameter1": "value1,value2", + "parameter2": "value" + }, + "requestContext": { + "accountId": "123456789012", + "apiId": "api-id", + "authentication": { + "clientCert": { + "clientCertPem": "CERT_CONTENT", + "subjectDN": "www.example.com", + "issuerDN": "Example issuer", + "serialNumber": "a1:a1:a1:a1:a1:a1:a1:a1:a1:a1:a1:a1:a1:a1:a1:a1", + "validity": { + "notBefore": "May 28 12:30:02 2019 GMT", + "notAfter": "Aug 5 09:36:04 2021 GMT" + } + } + }, + "authorizer": { + "jwt": { + "claims": { + "claim1": "value1", + "claim2": "value2" + }, + "scopes": [ + "scope1", + "scope2" + ] + } + }, + "domainName": "id.execute-api.us-east-1.amazonaws.com", + "domainPrefix": "id", + "http": { + "method": "GET", + "path": "/my/path", + "protocol": "HTTP/1.1", + "sourceIp": "192.168.0.1", + "userAgent": "agent" + }, + "requestId": "id", + "routeKey": "$default", + "stage": "$default", + "time": "12/Mar/2020:19:03:58 +0000", + "timeEpoch": 1583348638390 + }, + "pathParameters": { + "parameter1": "value1" + }, + "isBase64Encoded": false, + "stageVariables": { + "stageVariable1": "value1", + "stageVariable2": "value2" + } +} diff --git a/packages/parser/tests/events/apiGatewayProxyV2IamEvent.json b/packages/parser/tests/events/apiGatewayProxyV2IamEvent.json new file mode 100644 index 0000000000..99f10ef989 --- /dev/null +++ b/packages/parser/tests/events/apiGatewayProxyV2IamEvent.json @@ -0,0 +1,62 @@ +{ + "version": "2.0", + "routeKey": "$default", + "rawPath": "/my/path", + "rawQueryString": "parameter1=value1¶meter1=value2¶meter2=value", + "cookies": [ + "cookie1", + "cookie2" + ], + "headers": { + "Header1": "value1", + "Header2": "value2" + }, + "queryStringParameters": { + "parameter1": "value1,value2", + "parameter2": "value" + }, + "pathParameters": { + "proxy": "hello/world" + }, + "requestContext": { + "routeKey": "$default", + "accountId": "123456789012", + "stage": "$default", + "requestId": "id", + "authorizer": { + "iam": { + "accessKey": "ARIA2ZJZYVUEREEIHAKY", + "accountId": "1234567890", + "callerId": "AROA7ZJZYVRE7C3DUXHH6:CognitoIdentityCredentials", + "cognitoIdentity": { + "amr": [ + "foo" + ], + "identityId": "us-east-1:3f291106-8703-466b-8f2b-3ecee1ca56ce", + "identityPoolId": "us-east-1:4f291106-8703-466b-8f2b-3ecee1ca56ce" + }, + "principalOrgId": "AwsOrgId", + "userArn": "arn:aws:iam::1234567890:user/Admin", + "userId": "AROA2ZJZYVRE7Y3TUXHH6" + } + }, + "apiId": "api-id", + "domainName": "id.execute-api.us-east-1.amazonaws.com", + "domainPrefix": "id", + "time": "12/Mar/2020:19:03:58+0000", + "timeEpoch": 1583348638390, + "http": { + "method": "GET", + "path": "/my/path", + "protocol": "HTTP/1.1", + "sourceIp": "192.168.0.1", + "userAgent": "agent" + } + }, + "stageVariables": { + "stageVariable1": "value1", + "stageVariable2": "value2" + }, + "body": "{\r\n\t\"a\": 1\r\n}", + "isBase64Encoded": false +} \ No newline at end of file diff --git a/packages/parser/tests/events/apiGatewayProxyV2LambdaAuthorizerEvent.json b/packages/parser/tests/events/apiGatewayProxyV2LambdaAuthorizerEvent.json new file mode 100644 index 0000000000..e7e6aeb2ca --- /dev/null +++ b/packages/parser/tests/events/apiGatewayProxyV2LambdaAuthorizerEvent.json @@ -0,0 +1,50 @@ +{ + "version": "2.0", + "routeKey": "$default", + "rawPath": "/my/path", + "rawQueryString": "parameter1=value1¶meter1=value2¶meter2=value", + "cookies": [ + "cookie1", + "cookie2" + ], + "headers": { + "Header1": "value1", + "Header2": "value2" + }, + "queryStringParameters": { + "parameter1": "value1,value2", + "parameter2": "value" + }, + "pathParameters": { + "proxy": "hello/world" + }, + "requestContext": { + "routeKey": "$default", + "accountId": "123456789012", + "stage": "$default", + "requestId": "id", + "authorizer": { + "lambda": { + "key": "value" + } + }, + "apiId": "api-id", + "domainName": "id.execute-api.us-east-1.amazonaws.com", + "domainPrefix": "id", + "time": "12/Mar/2020:19:03:58+0000", + "timeEpoch": 1583348638390, + "http": { + "method": "GET", + "path": "/my/path", + "protocol": "HTTP/1.1", + "sourceIp": "192.168.0.1", + "userAgent": "agent" + } + }, + "stageVariables": { + "stageVariable1": "value1", + "stageVariable2": "value2" + }, + "body": "{\r\n\t\"a\": 1\r\n}", + "isBase64Encoded": false +} \ No newline at end of file diff --git a/packages/parser/tests/events/apiGatewayProxyV2OtherGetEvent.json b/packages/parser/tests/events/apiGatewayProxyV2OtherGetEvent.json new file mode 100644 index 0000000000..c5499c46b4 --- /dev/null +++ b/packages/parser/tests/events/apiGatewayProxyV2OtherGetEvent.json @@ -0,0 +1,68 @@ +{ + "version": "2.0", + "routeKey": "$default", + "rawPath": "/other/path", + "rawQueryString": "parameter1=value1¶meter1=value2¶meter2=value", + "cookies": [ + "cookie1", + "cookie2" + ], + "headers": { + "Header1": "value1", + "Header2": "value1,value2" + }, + "queryStringParameters": { + "parameter1": "value1,value2", + "parameter2": "value" + }, + "requestContext": { + "accountId": "123456789012", + "apiId": "api-id", + "authentication": { + "clientCert": { + "clientCertPem": "CERT_CONTENT", + "subjectDN": "www.example.com", + "issuerDN": "Example issuer", + "serialNumber": "a1:a1:a1:a1:a1:a1:a1:a1:a1:a1:a1:a1:a1:a1:a1:a1", + "validity": { + "notBefore": "May 28 12:30:02 2019 GMT", + "notAfter": "Aug 5 09:36:04 2021 GMT" + } + } + }, + "authorizer": { + "jwt": { + "claims": { + "claim1": "value1", + "claim2": "value2" + }, + "scopes": [ + "scope1", + "scope2" + ] + } + }, + "domainName": "id.execute-api.us-east-1.amazonaws.com", + "domainPrefix": "id", + "http": { + "method": "GET", + "path": "/other/path", + "protocol": "HTTP/1.1", + "sourceIp": "192.168.0.1", + "userAgent": "agent" + }, + "requestId": "id", + "routeKey": "$default", + "stage": "$default", + "time": "12/Mar/2020:19:03:58 +0000", + "timeEpoch": 1583348638390 + }, + "pathParameters": { + "parameter1": "value1" + }, + "isBase64Encoded": false, + "stageVariables": { + "stageVariable1": "value1", + "stageVariable2": "value2" + } +} diff --git a/packages/parser/tests/events/apiGatewayProxyV2SchemaMiddlewareInvalidEvent.json b/packages/parser/tests/events/apiGatewayProxyV2SchemaMiddlewareInvalidEvent.json new file mode 100644 index 0000000000..5b663ec40a --- /dev/null +++ b/packages/parser/tests/events/apiGatewayProxyV2SchemaMiddlewareInvalidEvent.json @@ -0,0 +1,69 @@ +{ + "version": "2.0", + "routeKey": "$default", + "rawPath": "/my/path", + "rawQueryString": "parameter1=value1¶meter1=value2¶meter2=value", + "cookies": [ + "cookie1", + "cookie2" + ], + "headers": { + "Header1": "value1", + "Header2": "value1,value2" + }, + "queryStringParameters": { + "parameter1": "value1,value2", + "parameter2": "value" + }, + "requestContext": { + "accountId": "123456789012", + "apiId": "api-id", + "authentication": { + "clientCert": { + "clientCertPem": "CERT_CONTENT", + "subjectDN": "www.example.com", + "issuerDN": "Example issuer", + "serialNumber": "a1:a1:a1:a1:a1:a1:a1:a1:a1:a1:a1:a1:a1:a1:a1:a1", + "validity": { + "notBefore": "May 28 12:30:02 2019 GMT", + "notAfter": "Aug 5 09:36:04 2021 GMT" + } + } + }, + "authorizer": { + "jwt": { + "claims": { + "claim1": "value1", + "claim2": "value2" + }, + "scopes": [ + "scope1", + "scope2" + ] + } + }, + "domainName": "id.execute-api.us-east-1.amazonaws.com", + "domainPrefix": "id", + "http": { + "method": "POST", + "path": "/my/path", + "protocol": "HTTP/1.1", + "sourceIp": "192.168.0.1", + "userAgent": "agent" + }, + "requestId": "id", + "routeKey": "$default", + "stage": "$default", + "time": "12/Mar/2020:19:03:58 +0000", + "timeEpoch": 1583348638390 + }, + "body": "{\"username\": \"lessa\"}", + "pathParameters": { + "parameter1": "value1" + }, + "isBase64Encoded": false, + "stageVariables": { + "stageVariable1": "value1", + "stageVariable2": "value2" + } +} diff --git a/packages/parser/tests/events/apiGatewayProxyV2SchemaMiddlewareValidEvent.json b/packages/parser/tests/events/apiGatewayProxyV2SchemaMiddlewareValidEvent.json new file mode 100644 index 0000000000..f59a6ef318 --- /dev/null +++ b/packages/parser/tests/events/apiGatewayProxyV2SchemaMiddlewareValidEvent.json @@ -0,0 +1,69 @@ +{ + "version": "2.0", + "routeKey": "$default", + "rawPath": "/my/path", + "rawQueryString": "parameter1=value1¶meter1=value2¶meter2=value", + "cookies": [ + "cookie1", + "cookie2" + ], + "headers": { + "Header1": "value1", + "Header2": "value1,value2" + }, + "queryStringParameters": { + "parameter1": "value1,value2", + "parameter2": "value" + }, + "requestContext": { + "accountId": "123456789012", + "apiId": "api-id", + "authentication": { + "clientCert": { + "clientCertPem": "CERT_CONTENT", + "subjectDN": "www.example.com", + "issuerDN": "Example issuer", + "serialNumber": "a1:a1:a1:a1:a1:a1:a1:a1:a1:a1:a1:a1:a1:a1:a1:a1", + "validity": { + "notBefore": "May 28 12:30:02 2019 GMT", + "notAfter": "Aug 5 09:36:04 2021 GMT" + } + } + }, + "authorizer": { + "jwt": { + "claims": { + "claim1": "value1", + "claim2": "value2" + }, + "scopes": [ + "scope1", + "scope2" + ] + } + }, + "domainName": "id.execute-api.us-east-1.amazonaws.com", + "domainPrefix": "id", + "http": { + "method": "POST", + "path": "/my/path", + "protocol": "HTTP/1.1", + "sourceIp": "192.168.0.1", + "userAgent": "agent" + }, + "requestId": "id", + "routeKey": "$default", + "stage": "$default", + "time": "12/Mar/2020:19:03:58 +0000", + "timeEpoch": 1583348638390 + }, + "body": "{\"message\": \"hello world\", \"username\": \"lessa\"}", + "pathParameters": { + "parameter1": "value1" + }, + "isBase64Encoded": false, + "stageVariables": { + "stageVariable1": "value1", + "stageVariable2": "value2" + } +} diff --git a/packages/parser/tests/events/apiGatewaySchemaMiddlewareInvalidEvent.json b/packages/parser/tests/events/apiGatewaySchemaMiddlewareInvalidEvent.json new file mode 100644 index 0000000000..f601583a76 --- /dev/null +++ b/packages/parser/tests/events/apiGatewaySchemaMiddlewareInvalidEvent.json @@ -0,0 +1,81 @@ +{ + "version": "1.0", + "resource": "/my/path", + "path": "/my/path", + "httpMethod": "POST", + "headers": { + "Header1": "value1", + "Header2": "value2", + "Origin": "https://aws.amazon.com" + }, + "multiValueHeaders": { + "Header1": [ + "value1" + ], + "Header2": [ + "value1", + "value2" + ] + }, + "queryStringParameters": { + "parameter1": "value1", + "parameter2": "value" + }, + "multiValueQueryStringParameters": { + "parameter1": [ + "value1", + "value2" + ], + "parameter2": [ + "value" + ] + }, + "requestContext": { + "accountId": "123456789012", + "apiId": "id", + "authorizer": { + "claims": null, + "scopes": null + }, + "domainName": "id.execute-api.us-east-1.amazonaws.com", + "domainPrefix": "id", + "extendedRequestId": "request-id", + "httpMethod": "GET", + "identity": { + "accessKey": null, + "accountId": null, + "caller": null, + "cognitoAuthenticationProvider": null, + "cognitoAuthenticationType": null, + "cognitoIdentityId": null, + "cognitoIdentityPoolId": null, + "principalOrgId": null, + "sourceIp": "192.168.0.1", + "user": null, + "userAgent": "user-agent", + "userArn": null, + "clientCert": { + "clientCertPem": "CERT_CONTENT", + "subjectDN": "www.example.com", + "issuerDN": "Example issuer", + "serialNumber": "a1:a1:a1:a1:a1:a1:a1:a1:a1:a1:a1:a1:a1:a1:a1:a1", + "validity": { + "notBefore": "May 28 12:30:02 2019 GMT", + "notAfter": "Aug 5 09:36:04 2021 GMT" + } + } + }, + "path": "/my/path", + "protocol": "HTTP/1.1", + "requestId": "id=", + "requestTime": "04/Mar/2020:19:15:17 +0000", + "requestTimeEpoch": 1583349317135, + "resourceId": null, + "resourcePath": "/my/path", + "stage": "$default" + }, + "pathParameters": null, + "stageVariables": null, + "body": "{\"username\": \"lessa\"}", + "isBase64Encoded": false +} diff --git a/packages/parser/tests/events/apiGatewaySchemaMiddlewareValidEvent.json b/packages/parser/tests/events/apiGatewaySchemaMiddlewareValidEvent.json new file mode 100644 index 0000000000..7437eba9e0 --- /dev/null +++ b/packages/parser/tests/events/apiGatewaySchemaMiddlewareValidEvent.json @@ -0,0 +1,81 @@ +{ + "version": "1.0", + "resource": "/my/path", + "path": "/my/path", + "httpMethod": "POST", + "headers": { + "Header1": "value1", + "Header2": "value2", + "Origin": "https://aws.amazon.com" + }, + "multiValueHeaders": { + "Header1": [ + "value1" + ], + "Header2": [ + "value1", + "value2" + ] + }, + "queryStringParameters": { + "parameter1": "value1", + "parameter2": "value" + }, + "multiValueQueryStringParameters": { + "parameter1": [ + "value1", + "value2" + ], + "parameter2": [ + "value" + ] + }, + "requestContext": { + "accountId": "123456789012", + "apiId": "id", + "authorizer": { + "claims": null, + "scopes": null + }, + "domainName": "id.execute-api.us-east-1.amazonaws.com", + "domainPrefix": "id", + "extendedRequestId": "request-id", + "httpMethod": "GET", + "identity": { + "accessKey": null, + "accountId": null, + "caller": null, + "cognitoAuthenticationProvider": null, + "cognitoAuthenticationType": null, + "cognitoIdentityId": null, + "cognitoIdentityPoolId": null, + "principalOrgId": null, + "sourceIp": "192.168.0.1", + "user": null, + "userAgent": "user-agent", + "userArn": null, + "clientCert": { + "clientCertPem": "CERT_CONTENT", + "subjectDN": "www.example.com", + "issuerDN": "Example issuer", + "serialNumber": "a1:a1:a1:a1:a1:a1:a1:a1:a1:a1:a1:a1:a1:a1:a1:a1", + "validity": { + "notBefore": "May 28 12:30:02 2019 GMT", + "notAfter": "Aug 5 09:36:04 2021 GMT" + } + } + }, + "path": "/my/path", + "protocol": "HTTP/1.1", + "requestId": "id=", + "requestTime": "04/Mar/2020:19:15:17 +0000", + "requestTimeEpoch": 1583349317135, + "resourceId": null, + "resourcePath": "/my/path", + "stage": "$default" + }, + "pathParameters": null, + "stageVariables": null, + "body": "{\"message\": \"hello world\", \"username\": \"lessa\"}", + "isBase64Encoded": false +} diff --git a/packages/parser/tests/events/appSyncAuthorizerEvent.json b/packages/parser/tests/events/appSyncAuthorizerEvent.json new file mode 100644 index 0000000000..a8264569bf --- /dev/null +++ b/packages/parser/tests/events/appSyncAuthorizerEvent.json @@ -0,0 +1,13 @@ +{ + "authorizationToken": "BE9DC5E3-D410-4733-AF76-70178092E681", + "requestContext": { + "apiId": "giy7kumfmvcqvbedntjwjvagii", + "accountId": "254688921111", + "requestId": "b80ed838-14c6-4500-b4c3-b694c7bef086", + "queryString": "mutation MyNewTask($desc: String!) {\n createTask(description: $desc, owner: \"ccc\", taskStatus: \"cc\", title: \"ccc\") {\n id\n }\n}\n", + "operationName": "MyNewTask", + "variables": { + "desc": "Foo" + } + } +} diff --git a/packages/parser/tests/events/appSyncAuthorizerResponse.json b/packages/parser/tests/events/appSyncAuthorizerResponse.json new file mode 100644 index 0000000000..7dd8234d2e --- /dev/null +++ b/packages/parser/tests/events/appSyncAuthorizerResponse.json @@ -0,0 +1,9 @@ +{ + "isAuthorized": true, + "resolverContext": { + "name": "Foo Man", + "balance": 100 + }, + "deniedFields": ["Mutation.createEvent"], + "ttlOverride": 15 +} diff --git a/packages/parser/tests/events/appSyncDirectResolver.json b/packages/parser/tests/events/appSyncDirectResolver.json new file mode 100644 index 0000000000..08c3d00b20 --- /dev/null +++ b/packages/parser/tests/events/appSyncDirectResolver.json @@ -0,0 +1,74 @@ +{ + "arguments": { + "id": "my identifier" + }, + "identity": { + "claims": { + "sub": "192879fc-a240-4bf1-ab5a-d6a00f3063f9", + "email_verified": true, + "iss": "https://cognito-idp.us-west-2.amazonaws.com/us-west-xxxxxxxxxxx", + "phone_number_verified": false, + "cognito:username": "jdoe", + "aud": "7471s60os7h0uu77i1tk27sp9n", + "event_id": "bc334ed8-a938-4474-b644-9547e304e606", + "token_use": "id", + "auth_time": 1599154213, + "phone_number": "+19999999999", + "exp": 1599157813, + "iat": 1599154213, + "email": "jdoe@email.com" + }, + "defaultAuthStrategy": "ALLOW", + "groups": null, + "issuer": "https://cognito-idp.us-west-2.amazonaws.com/us-west-xxxxxxxxxxx", + "sourceIp": [ + "1.1.1.1" + ], + "sub": "192879fc-a240-4bf1-ab5a-d6a00f3063f9", + "username": "jdoe" + }, + "source": null, + "request": { + "headers": { + "x-forwarded-for": "1.1.1.1, 2.2.2.2", + "cloudfront-viewer-country": "US", + "cloudfront-is-tablet-viewer": "false", + "via": "2.0 xxxxxxxxxxxxxxxx.cloudfront.net (CloudFront)", + "cloudfront-forwarded-proto": "https", + "origin": "https://us-west-1.console.aws.amazon.com", + "content-length": "217", + "accept-language": "en-US,en;q=0.9", + "host": "xxxxxxxxxxxxxxxx.appsync-api.us-west-1.amazonaws.com", + "x-forwarded-proto": "https", + "user-agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/85.0.4183.83 Safari/537.36", + "accept": "*/*", + "cloudfront-is-mobile-viewer": "false", + "cloudfront-is-smarttv-viewer": "false", + "accept-encoding": "gzip, deflate, br", + "referer": "https://us-west-1.console.aws.amazon.com/appsync/home?region=us-west-1", + "content-type": "application/json", + "sec-fetch-mode": "cors", + "x-amz-cf-id": "3aykhqlUwQeANU-HGY7E_guV5EkNeMMtwyOgiA==", + "x-amzn-trace-id": "Root=1-5f512f51-fac632066c5e848ae714", + "authorization": "eyJraWQiOiJScWFCSlJqYVJlM0hrSnBTUFpIcVRXazNOW...", + "sec-fetch-dest": "empty", + "x-amz-user-agent": "AWS-Console-AppSync/", + "cloudfront-is-desktop-viewer": "true", + "sec-fetch-site": "cross-site", + "x-forwarded-port": "443" + } + }, + "prev": null, + "info": { + "selectionSetList": [ + "id", + "field1", + "field2" + ], + "selectionSetGraphQL": "{\n id\n field1\n field2\n}", + "parentTypeName": "Mutation", + "fieldName": "createSomething", + "variables": {} + }, + "stash": {} +} diff --git a/packages/parser/tests/events/appSyncResolverEvent.json b/packages/parser/tests/events/appSyncResolverEvent.json new file mode 100644 index 0000000000..84ac71951c --- /dev/null +++ b/packages/parser/tests/events/appSyncResolverEvent.json @@ -0,0 +1,71 @@ +{ + "typeName": "Merchant", + "fieldName": "locations", + "arguments": { + "page": 2, + "size": 1, + "name": "value" + }, + "identity": { + "claims": { + "sub": "07920713-4526-4642-9c88-2953512de441", + "iss": "https://cognito-idp.us-east-1.amazonaws.com/us-east-1_POOL_ID", + "aud": "58rc9bf5kkti90ctmvioppukm9", + "event_id": "7f4c9383-abf6-48b7-b821-91643968b755", + "token_use": "id", + "auth_time": 1615366261, + "name": "Michael Brewer", + "exp": 1615369861, + "iat": 1615366261 + }, + "defaultAuthStrategy": "ALLOW", + "groups": null, + "issuer": "https://cognito-idp.us-east-1.amazonaws.com/us-east-1_POOL_ID", + "sourceIp": [ + "11.215.2.22" + ], + "sub": "07920713-4526-4642-9c88-2953512de441", + "username": "mike" + }, + "source": { + "name": "Value", + "nested": { + "name": "value", + "list": [] + } + }, + "request": { + "headers": { + "x-forwarded-for": "11.215.2.22, 64.44.173.11", + "cloudfront-viewer-country": "US", + "cloudfront-is-tablet-viewer": "false", + "via": "2.0 SOMETHING.cloudfront.net (CloudFront)", + "cloudfront-forwarded-proto": "https", + "origin": "https://console.aws.amazon.com", + "content-length": "156", + "accept-language": "en-US,en;q=0.9", + "host": "SOMETHING.appsync-api.us-east-1.amazonaws.com", + "x-forwarded-proto": "https", + "sec-gpc": "1", + "user-agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) etc.", + "accept": "*/*", + "cloudfront-is-mobile-viewer": "false", + "cloudfront-is-smarttv-viewer": "false", + "accept-encoding": "gzip, deflate, br", + "referer": "https://console.aws.amazon.com/", + "content-type": "application/json", + "sec-fetch-mode": "cors", + "x-amz-cf-id": "Fo5VIuvP6V6anIEt62WzFDCK45mzM4yEdpt5BYxOl9OFqafd-WR0cA==", + "x-amzn-trace-id": "Root=1-60488877-0b0c4e6727ab2a1c545babd0", + "authorization": "AUTH-HEADER", + "sec-fetch-dest": "empty", + "x-amz-user-agent": "AWS-Console-AppSync/", + "cloudfront-is-desktop-viewer": "true", + "sec-fetch-site": "cross-site", + "x-forwarded-port": "443" + } + }, + "prev": { + "result": {} + } +} diff --git a/packages/parser/tests/events/awsConfigRuleConfigurationChanged.json b/packages/parser/tests/events/awsConfigRuleConfigurationChanged.json new file mode 100644 index 0000000000..cbf7abf67a --- /dev/null +++ b/packages/parser/tests/events/awsConfigRuleConfigurationChanged.json @@ -0,0 +1,13 @@ +{ + "version":"1.0", + "invokingEvent":"{\"configurationItemDiff\":{\"changedProperties\":{\"Configuration.InstanceType\":{\"previousValue\":\"t2.micro\",\"updatedValue\":\"t2.medium\",\"changeType\":\"UPDATE\"},\"Configuration.State.Name\":{\"previousValue\":\"running\",\"updatedValue\":\"stopped\",\"changeType\":\"UPDATE\"},\"Configuration.StateTransitionReason\":{\"previousValue\":\"\",\"updatedValue\":\"User initiated (2023-04-27 15:01:07 GMT)\",\"changeType\":\"UPDATE\"},\"Configuration.StateReason\":{\"previousValue\":null,\"updatedValue\":{\"code\":\"Client.UserInitiatedShutdown\",\"message\":\"Client.UserInitiatedShutdown: User initiated shutdown\"},\"changeType\":\"CREATE\"},\"Configuration.CpuOptions.CoreCount\":{\"previousValue\":1,\"updatedValue\":2,\"changeType\":\"UPDATE\"}},\"changeType\":\"UPDATE\"},\"configurationItem\":{\"relatedEvents\":[],\"relationships\":[{\"resourceId\":\"eipalloc-0ebb4367662263cc1\",\"resourceName\":null,\"resourceType\":\"AWS::EC2::EIP\",\"name\":\"Is attached to ElasticIp\"},{\"resourceId\":\"eni-034dd31c4b17ada8c\",\"resourceName\":null,\"resourceType\":\"AWS::EC2::NetworkInterface\",\"name\":\"Contains NetworkInterface\"},{\"resourceId\":\"eni-09a604c0ec356b06f\",\"resourceName\":null,\"resourceType\":\"AWS::EC2::NetworkInterface\",\"name\":\"Contains NetworkInterface\"},{\"resourceId\":\"sg-0fb295a327d9b4835\",\"resourceName\":null,\"resourceType\":\"AWS::EC2::SecurityGroup\",\"name\":\"Is associated with SecurityGroup\"},{\"resourceId\":\"subnet-cad1f2f4\",\"resourceName\":null,\"resourceType\":\"AWS::EC2::Subnet\",\"name\":\"Is contained in Subnet\"},{\"resourceId\":\"vol-0a288b5eb9fea4b30\",\"resourceName\":null,\"resourceType\":\"AWS::EC2::Volume\",\"name\":\"Is attached to Volume\"},{\"resourceId\":\"vpc-2d96be57\",\"resourceName\":null,\"resourceType\":\"AWS::EC2::VPC\",\"name\":\"Is contained in Vpc\"}],\"configuration\":{\"amiLaunchIndex\":0,\"imageId\":\"ami-09d95fab7fff3776c\",\"instanceId\":\"i-042dd005362091826\",\"instanceType\":\"t2.medium\",\"kernelId\":null,\"keyName\":\"mihaec2\",\"launchTime\":\"2023-04-27T14:57:16.000Z\",\"monitoring\":{\"state\":\"disabled\"},\"placement\":{\"availabilityZone\":\"us-east-1e\",\"affinity\":null,\"groupName\":\"\",\"partitionNumber\":null,\"hostId\":null,\"tenancy\":\"default\",\"spreadDomain\":null,\"hostResourceGroupArn\":null},\"platform\":null,\"privateDnsName\":\"ip-172-31-78-41.ec2.internal\",\"privateIpAddress\":\"172.31.78.41\",\"productCodes\":[],\"publicDnsName\":\"ec2-3-232-229-57.compute-1.amazonaws.com\",\"publicIpAddress\":\"3.232.229.57\",\"ramdiskId\":null,\"state\":{\"code\":80,\"name\":\"stopped\"},\"stateTransitionReason\":\"User initiated (2023-04-27 15:01:07 GMT)\",\"subnetId\":\"subnet-cad1f2f4\",\"vpcId\":\"vpc-2d96be57\",\"architecture\":\"x86_64\",\"blockDeviceMappings\":[{\"deviceName\":\"/dev/xvda\",\"ebs\":{\"attachTime\":\"2020-05-30T15:21:58.000Z\",\"deleteOnTermination\":true,\"status\":\"attached\",\"volumeId\":\"vol-0a288b5eb9fea4b30\"}}],\"clientToken\":\"\",\"ebsOptimized\":false,\"enaSupport\":true,\"hypervisor\":\"xen\",\"iamInstanceProfile\":{\"arn\":\"arn:aws:iam::0123456789012:instance-profile/AmazonSSMRoleForInstancesQuickSetup\",\"id\":\"AIPAS5S4WFUBL72S3QXW5\"},\"instanceLifecycle\":null,\"elasticGpuAssociations\":[],\"elasticInferenceAcceleratorAssociations\":[],\"networkInterfaces\":[{\"association\":{\"carrierIp\":null,\"ipOwnerId\":\"0123456789012\",\"publicDnsName\":\"ec2-3-232-229-57.compute-1.amazonaws.com\",\"publicIp\":\"3.232.229.57\"},\"attachment\":{\"attachTime\":\"2020-05-30T15:21:57.000Z\",\"attachmentId\":\"eni-attach-0a7e75dc9c1c291a0\",\"deleteOnTermination\":true,\"deviceIndex\":0,\"status\":\"attached\",\"networkCardIndex\":0},\"description\":\"\",\"groups\":[{\"groupName\":\"minhaec2\",\"groupId\":\"sg-0fb295a327d9b4835\"}],\"ipv6Addresses\":[],\"macAddress\":\"06:cf:00:c2:17:db\",\"networkInterfaceId\":\"eni-034dd31c4b17ada8c\",\"ownerId\":\"0123456789012\",\"privateDnsName\":\"ip-172-31-78-41.ec2.internal\",\"privateIpAddress\":\"172.31.78.41\",\"privateIpAddresses\":[{\"association\":{\"carrierIp\":null,\"ipOwnerId\":\"0123456789012\",\"publicDnsName\":\"ec2-3-232-229-57.compute-1.amazonaws.com\",\"publicIp\":\"3.232.229.57\"},\"primary\":true,\"privateDnsName\":\"ip-172-31-78-41.ec2.internal\",\"privateIpAddress\":\"172.31.78.41\"}],\"sourceDestCheck\":true,\"status\":\"in-use\",\"subnetId\":\"subnet-cad1f2f4\",\"vpcId\":\"vpc-2d96be57\",\"interfaceType\":\"interface\"},{\"association\":null,\"attachment\":{\"attachTime\":\"2020-11-26T23:46:04.000Z\",\"attachmentId\":\"eni-attach-0e6d150ebbd19966e\",\"deleteOnTermination\":false,\"deviceIndex\":1,\"status\":\"attached\",\"networkCardIndex\":0},\"description\":\"MINHAEC2AAAAAA\",\"groups\":[{\"groupName\":\"minhaec2\",\"groupId\":\"sg-0fb295a327d9b4835\"},{\"groupName\":\"default\",\"groupId\":\"sg-88105fa0\"}],\"ipv6Addresses\":[],\"macAddress\":\"06:0a:62:00:64:5f\",\"networkInterfaceId\":\"eni-09a604c0ec356b06f\",\"ownerId\":\"0123456789012\",\"privateDnsName\":\"ip-172-31-70-9.ec2.internal\",\"privateIpAddress\":\"172.31.70.9\",\"privateIpAddresses\":[{\"association\":null,\"primary\":true,\"privateDnsName\":\"ip-172-31-70-9.ec2.internal\",\"privateIpAddress\":\"172.31.70.9\"}],\"sourceDestCheck\":true,\"status\":\"in-use\",\"subnetId\":\"subnet-cad1f2f4\",\"vpcId\":\"vpc-2d96be57\",\"interfaceType\":\"interface\"}],\"outpostArn\":null,\"rootDeviceName\":\"/dev/xvda\",\"rootDeviceType\":\"ebs\",\"securityGroups\":[{\"groupName\":\"minhaec2\",\"groupId\":\"sg-0fb295a327d9b4835\"}],\"sourceDestCheck\":true,\"spotInstanceRequestId\":null,\"sriovNetSupport\":null,\"stateReason\":{\"code\":\"Client.UserInitiatedShutdown\",\"message\":\"Client.UserInitiatedShutdown: User initiated shutdown\"},\"tags\":[{\"key\":\"projeto\",\"value\":\"meetup\"},{\"key\":\"Name\",\"value\":\"Minha\"},{\"key\":\"CentroCusto\",\"value\":\"TI\"},{\"key\":\"Setor\",\"value\":\"Desenvolvimento\"}],\"virtualizationType\":\"hvm\",\"cpuOptions\":{\"coreCount\":2,\"threadsPerCore\":1},\"capacityReservationId\":null,\"capacityReservationSpecification\":{\"capacityReservationPreference\":\"open\",\"capacityReservationTarget\":null},\"hibernationOptions\":{\"configured\":false},\"licenses\":[],\"metadataOptions\":{\"state\":\"applied\",\"httpTokens\":\"optional\",\"httpPutResponseHopLimit\":1,\"httpEndpoint\":\"enabled\"},\"enclaveOptions\":{\"enabled\":false},\"bootMode\":null},\"supplementaryConfiguration\":{},\"tags\":{\"projeto\":\"meetup\",\"Setor\":\"Desenvolvimento\",\"CentroCusto\":\"TI\",\"Name\":\"Minha\"},\"configurationItemVersion\":\"1.3\",\"configurationItemCaptureTime\":\"2023-04-27T15:03:11.636Z\",\"configurationStateId\":1682607791636,\"awsAccountId\":\"0123456789012\",\"configurationItemStatus\":\"OK\",\"resourceType\":\"AWS::EC2::Instance\",\"resourceId\":\"i-042dd005362091826\",\"resourceName\":null,\"ARN\":\"arn:aws:ec2:us-east-1:0123456789012:instance/i-042dd005362091826\",\"awsRegion\":\"us-east-1\",\"availabilityZone\":\"us-east-1e\",\"configurationStateMd5Hash\":\"\",\"resourceCreationTime\":\"2023-04-27T14:57:16.000Z\"},\"notificationCreationTime\":\"2023-04-27T15:03:13.332Z\",\"messageType\":\"ConfigurationItemChangeNotification\",\"recordVersion\":\"1.3\"}", + "ruleParameters":"{\"desiredInstanceType\": \"t2.micro\"}", + "resultToken":"eyJlbmNyeXB0ZWREYXRhIjpbLTQxLDEsLTU3LC0zMCwtMTIxLDUzLDUyLDQ1LC01NywtOCw3MywtODEsLTExNiwtMTAyLC01MiwxMTIsLTQ3LDU4LDY1LC0xMjcsMTAyLDUsLTY5LDQ0LC0xNSwxMTQsNDEsLTksMTExLC0zMCw2NSwtNzUsLTM1LDU0LDEwNSwtODksODYsNDAsLTEwNSw5OCw2NSwtMTE5LC02OSwyNCw2NiwtMjAsODAsLTExMiwtNzgsLTgwLDQzLC01NywzMCwtMjUsODIsLTEwLDMsLTQsLTg1LC01MywtMzcsLTkwLC04OCwtOTgsLTk4LC00MSwxOSwxMTYsNjIsLTIzLC0xMjEsLTEwOCw1NywtNTgsLTUyLDI5LDEwMSwxMjIsLTU2LC03MSwtODEsLTQ3LDc3LC0yMiwtMTI0LC0zLC04NiwtMTIyLC00MCwtODksLTEwMSw1NywtMTI3LC0zNywtMzcsLTMxLC05OCwtMzEsMTEsLTEyNSwwLDEwOCwtMzIsNjQsNjIsLTIyLDAsNDcsLTEwNiwtMTAwLDEwNCwxNCw1OCwxMjIsLTEwLC01MCwtOTAsLTgwLC01MCwtNSw2NSwwLC0yNSw4NSw4Miw3LDkzLDEyMiwtODIsLTExNiwtNzksLTQ0LDcyLC03MywtNjksMTQsLTU2LDk0LDkwLDExNCwtMjksLTExOSwtNzEsODgsMTA3LDEwNywxMTAsLTcsMTI3LC0xMjUsLTU3LC0xMjYsLTEyMCw2OSwtMTI3LC03NiwtMTE5LDcxLDEsLTY4LDEwNywxMTMsLTU2LDg3LC0xMDIsLTE2LDEwOCwtMTA3LC00MywtOTQsLTEwNiwzLDkwLDE0LDcyLC0xMiwtMTE2LC03Myw4MCwtMTIyLDQ0LC0xMDQsMTIsNzQsNTcsLTEwLC0xMDUsLTExMiwtMzYsMjgsLTQ1LDk3LDExLC00OSwtMTEsNjEsMzYsLTE3LC03NCw1MCw0LC0yNiwxMDQsLTI4LC0xMjUsMjQsNzAsLTg1LC00Niw5MiwtMTAzLC00MSwtMTA2LDY5LDEyMiwyMSwtMjUsODAsOTksLTkzLC01NiwtMjUsLTQ3LC0xMjMsLTU5LC0xMjQsLTUyLC0xNiwxMjcsLTM4LC0xNiwxMDEsMTE5LDEwNywyNywxMCwtNDYsLTg3LC0xMiwtMzksMTQsNDUsMiw3MCwxMDcsMTA0LC00LC02OSwtMTIsNTksLTEyNiwtOTEsMTI3LDU0LDEwNiwtMTI2LC0xMTYsLTEwMiw3Miw4MSw1MCw3NSwtNTEsMTA4LDQxLC0zLC02LC00NSwxMDMsLTg2LDM3LC00NiwtMzIsLTExMSwxMjQsMTExLDg3LDU0LC03NiwxMjIsLTUsLTM2LC04OCw5LC0xMTMsMTE2LC01OSw4Myw3NywyOCwxMiwtNjUsLTExMywtNzksLTEyOCw4MiwtMTE4LC04MywtMTI0LDMxLDk5LC05MCwtOTksMTYsLTEyMywyMSwtMTE0LC05OCwtMTE2LC0xMTksMiwtNzMsNDYsODIsLTEzLDU0LDcxLC00MiwyNSw3NCw3MywtODYsOTQsNDYsOTksOTMsLTgyLDU1LDY1LC05OCw0OSwtNjAsMTEyLDEwMSwyMiw2OSwtMTYsNzcsLTk0LC01OSwtNDYsMTE1LDMwLC00Myw5Myw4OCwtMjgsMzgsNiw4NCwzMSwtMTAxLDMyLC0yMiwtNjMsLTk1LDExNCwtNzUsMTE0LDM2LC04NCw0MCwtNDQsLTEzLDU5LDcyLC0xLC0xMDMsMzEsMTA1LDY5LDY5LDc3LC02NCwtNTYsMTE4LDEzLC0xMTQsODAsOTksLTUzLDI1LDQyLDk0LDczLC04MCwyNSwzOCwyNCwtMTcsNjYsLTExOCwtMjMsMTE5LDkwLDEyMSwxMTgsLTUxLDUxLC0xMiwtNzYsLTUxLDksLTIxLDExNCwtMzcsLTY0LC0yLC0xMjYsLTk1LDYzLDczLC00MSwtMzQsLTkwLC0yMiw1OSwtNzksMzAsLTQsLTEsLTUsMTIsMzksLTk5LC0xMDUsLTEwNCwtNjEsNjUsLTc0LDE5LC0xMywtNjAsLTI4LC04LDQsLTgsMTIxLC0xMTgsMTIyLC02NSwtMjEsMjMsMTcsLTg0LDQwLC05MiwxNCwtMTI2LC02MCwtNzksLTUzLDM3LC04Myw2NSwxMDQsLTM2LC02MCwtMTEwLC0zMywtMTE3LDYsMTA3LDEsLTMsOTMsNzgsLTk1LC0xMjIsNTMsMTA4LC00OSwtNDksMjQsLTY1LDgzLDEyNSwtNzcsLTE5LC04MSwzNCwtNjcsLTQzLC03MCwtMjYsMTgsMTA0LDY1LDQsLTEyNiw0NCwtMTE5LDUyLC00NiwyMiw2NywxMTMsMTE4LC0zMywzNCwtOTYsMTIxLDE5LC0yLC0zNSwwLC04MiwxNyw2NiwtMjcsNjksLTM2LC0xNCw1NiwtOTcsLTE2LDEyMywyOCwtOTUsLTMyLC02MywtNjksNzAsNjQsLTMzLC0xMDAsNDMsLTExMywxMDUsMTAwLDEwOCwtNjAsNDAsLTIsLTk2LC0xMjQsMzcsLTQ1LC0xMjQsLTY4LC02OSwtMTIzLDE3LC02LDg2LC01OSwtOTQsMTEwLDczLDU3LC0xMTYsMTA3LC00MSwtOTQsLTExOCwtMTI2LDEwLC04MCwtNzAsMTAyLDg4LC0xMjYsODcsLTI3LC0xMDEsLTk0LC0zNSwtMTA2LC02LC03MiwtODYsNTAsMTE2LC0yOCw5MCwxMywtMTIwLDYsMjcsOTIsNTYsLTkwLDM5LDQ5LC0xMywtODYsLTI1LC04NiwxMTMsLTEzLDQxLC0xMTksOTQsLTk0LC0xMDMsLTgzLC02MCwxMjcsLTE1LC0zOSwxMTksLTk1LDI3LDQ0LDExNiwxMDksNywtMTAyLC0xNyw0OCwtODIsLTMxLC04LC02OSwzNSw5NCw1NCwtNTUsMSwtMTE5LDU3LC0xMDgsLTMsLTkxLC0xMjIsLTUzLC04OCw0LC05NywtMzUsMTI2LDExOSw1OSwtMSw4NSw3MywtNTgsLTEyMCwtNjQsMTE5LC0xMTIsOTIsMTksOSwtNjYsLTkyLDEwOCwtMTEsLTQyLDExMSwtMTA0LC0xMjAsMjcsLTEwMywtNjksMTksMTExLDEyLDIzLDEwNyw1NCw0MSwtMjYsNjAsLTMxLC01XSwibWF0ZXJpYWxTZXRTZXJpYWxOdW1iZXIiOjEsIml2UGFyYW1ldGVyU3BlYyI6eyJpdiI6Wy05NSwzMiwxMDgsOTEsMzUsLTgyLC0zNywyNCwtNDQsLTExNSwtODIsLTEyOCwtMTIyLDMsNTMsLTI0XX19", + "eventLeftScope":false, + "executionRoleArn":"arn:aws:iam::0123456789012:role/aws-service-role/config.amazonaws.com/AWSServiceRoleForConfig", + "configRuleArn":"arn:aws:config:us-east-1:0123456789012:config-rule/config-rule-i9y8j9", + "configRuleName":"MyRule", + "configRuleId":"config-rule-i9y8j9", + "accountId":"0123456789012", + "evaluationMode":"DETECTIVE" + } diff --git a/packages/parser/tests/events/awsConfigRuleOversizedConfiguration.json b/packages/parser/tests/events/awsConfigRuleOversizedConfiguration.json new file mode 100644 index 0000000000..5eaef4e001 --- /dev/null +++ b/packages/parser/tests/events/awsConfigRuleOversizedConfiguration.json @@ -0,0 +1,12 @@ +{ + "invokingEvent": "{\"configurationItemSummary\": {\"changeType\": \"UPDATE\",\"configurationItemVersion\": \"1.2\",\"configurationItemCaptureTime\":\"2016-10-06T16:46:16.261Z\",\"configurationStateId\": 0,\"awsAccountId\":\"123456789012\",\"configurationItemStatus\": \"OK\",\"resourceType\": \"AWS::EC2::Instance\",\"resourceId\":\"i-00000000\",\"resourceName\":null,\"ARN\":\"arn:aws:ec2:us-west-2:123456789012:instance/i-00000000\",\"awsRegion\": \"us-west-2\",\"availabilityZone\":\"us-west-2a\",\"configurationStateMd5Hash\":\"8f1ee69b287895a0f8bc5753eca68e96\",\"resourceCreationTime\":\"2016-10-06T16:46:10.489Z\"},\"messageType\":\"OversizedConfigurationItemChangeNotification\", \"notificationCreationTime\": \"2016-10-06T16:46:16.261Z\", \"recordVersion\": \"1.0\"}", + "ruleParameters": "{\"myParameterKey\":\"myParameterValue\"}", + "resultToken": "myResultToken", + "eventLeftScope": false, + "executionRoleArn": "arn:aws:iam::123456789012:role/config-role", + "configRuleArn": "arn:aws:config:us-east-2:123456789012:config-rule/config-rule-ec2-managed-instance-inventory", + "configRuleName": "change-triggered-config-rule", + "configRuleId": "config-rule-0123456", + "accountId": "123456789012", + "version": "1.0" +} diff --git a/packages/parser/tests/events/awsConfigRuleScheduled.json b/packages/parser/tests/events/awsConfigRuleScheduled.json new file mode 100644 index 0000000000..02ce2a0700 --- /dev/null +++ b/packages/parser/tests/events/awsConfigRuleScheduled.json @@ -0,0 +1,13 @@ +{ + "version":"1.0", + "invokingEvent":"{\"awsAccountId\":\"0123456789012\",\"notificationCreationTime\":\"2023-04-27T13:26:17.741Z\",\"messageType\":\"ScheduledNotification\",\"recordVersion\":\"1.0\"}", + "ruleParameters":"{\"test\":\"x\"}", + "resultToken":"eyJlbmNyeXB0ZWREYXRhIjpbLTQyLDEyNiw1MiwtMzcsLTI5LDExNCwxMjYsLTk3LDcxLDIyLC0xMTAsMTEyLC0zMSwtOTMsLTQ5LC0xMDEsODIsMyw1NCw0OSwzLC02OSwtNzEsLTcyLDYyLDgxLC03MiwtODEsNTAsMzUsLTUwLC03NSwtMTE4LC0xMTgsNzcsMTIsLTEsMTQsMTIwLC03MCwxMTAsLTMsNTAsLTYwLDEwNSwtNTcsNDUsMTAyLC0xMDksLTYxLC0xMDEsLTYxLDQsNDcsLTg0LC0yNSwxMTIsNTQsLTcxLC0xMDksNDUsMTksMTIzLC0yNiwxMiwtOTYsLTczLDU0LC0xMDksOTIsNDgsLTU5LC04MywtMzIsODIsLTM2LC05MCwxOSw5OCw3Nyw3OCw0MCw4MCw3OCwtMTA1LDg3LC0xMTMsLTExNiwtNzIsMzAsLTY4LC00MCwtODksMTA5LC0xMDgsLTEyOCwyMiw3Miw3NywtMjEsNzYsODksOTQsLTU5LDgxLC0xMjEsLTEwNywtNjcsNjMsLTcsODIsLTg5LC00NiwtMzQsLTkyLDEyMiwtOTAsMTcsLTEyMywyMCwtODUsLTU5LC03MCw4MSwyNyw2Miw3NCwtODAsODAsMzcsNDAsMTE2LDkxLC0yNCw1MSwtNDEsLTc5LDI4LDEyMCw1MywtMTIyLC04MywxMjYsLTc4LDI1LC05OCwtMzYsMTMsMzIsODYsLTI1LDQ4LDMsLTEwMiwtMTYsMjQsLTMsODUsNDQsLTI4LDE0LDIyLDI3LC0xMjIsMTE4LDEwMSw3Myw1LDE4LDU4LC02NCwyMywtODYsLTExNCwyNCwwLDEwMCwyLDExNywtNjIsLTExOSwtMTI4LDE4LDY1LDkwLDE0LC0xMDIsMjEsODUsMTAwLDExNyw1NSwyOSwxMjcsNTQsNzcsNzIsNzQsMzIsNzgsMywtMTExLDExOCwtNzAsLTg2LDEyNywtNzQsNjAsMjIsNDgsMzcsODcsMTMsMCwtMTA1LDUsLTEyMiwtNzEsLTEwMCwxMDQsLTEyNiwtMTYsNzksLTMwLDEyMCw3NywtNzYsLTQxLC0xMDksMiw5NywtMTAxLC0xLDE1LDEyMywxMTksMTA4LDkxLC0yMCwtMTI1LC05NiwyLC05MiwtMTUsLTY3LC03NiwxMjEsMTA0LDEwNSw2NCwtNjIsMTAyLDgsNCwxMjEsLTQ1LC04MCwtODEsLTgsMTE4LDQ0LC04MiwtNDEsLTg0LDczLC0zNiwxMTcsODAsLTY5LC03MywxNCwtMTgsNzIsMzEsLTUsLTExMSwtMTI3LC00MywzNCwtOCw1NywxMDMsLTQyLDE4LC0zMywxMTcsLTI2LC0xMjQsLTEyNCwxNSw4OCwyMywxNiwtNTcsNTQsLTYsLTEwMiwxMTYsLTk5LC00NSwxMDAsLTM1LDg3LDM3LDYsOTgsMiwxMTIsNjAsLTMzLDE3LDI2LDk5LC0xMDUsNDgsLTEwNCwtMTE5LDc4LDYsLTU4LDk1LDksNDEsLTE2LDk2LDQxLC0yMiw5Niw3MiwxMTYsLTk1LC0xMDUsLTM2LC0xMjMsLTU1LDkxLC00NiwtNywtOTIsMzksNDUsODQsMTYsLTEyNCwtMTIyLC02OCwxLC0yOCwxMjIsLTYwLDgyLDEwMywtNTQsLTkyLDI3LC05OSwtMTI4LDY1LDcsLTcyLC0xMjcsNjIsLTIyLDIsLTExLDE4LC04OSwtMTA2LC03NCw3MSw4NiwtMTE2LC0yNSwtMTE1LC05Niw1NywtMzQsMjIsLTEyNCwtMTI1LC00LC00MSw0MiwtNTcsLTEwMyw0NSw3OCwxNCwtMTA2LDExMSw5OCwtOTQsLTcxLDUsNzUsMTksLTEyNCwtMzAsMzQsLTUwLDc1LC04NCwtNTAsLTU2LDUxLC0xNSwtMzYsNjEsLTk0LC03OSwtNDUsMTI2LC03NywtMTA1LC0yLC05MywtNiw4LC0zLDYsLTQyLDQ2LDEyNSw1LC05OCwxMyw2NywtMTAsLTEzLC05NCwtNzgsLTEyNywxMjEsLTI2LC04LC0xMDEsLTkxLDEyMSwtNDAsLTEyNCwtNjQsODQsLTcyLDYzLDE5LC04NF0sIm1hdGVyaWFsU2V0U2VyaWFsTnVtYmVyIjoxLCJpdlBhcmFtZXRlclNwZWMiOnsiaXYiOlszLC0xMCwtODUsMTE0LC05MCwxMTUsNzcsNTUsNTQsMTUsMzgsODQsLTExNiwxNCwtNDAsMjhdfX0=", + "eventLeftScope":false, + "executionRoleArn":"arn:aws:iam::0123456789012:role/aws-service-role/config.amazonaws.com/AWSServiceRoleForConfig", + "configRuleArn":"arn:aws:config:us-east-1:0123456789012:config-rule/config-rule-pdmyw1", + "configRuleName":"rule-ec2-test", + "configRuleId":"config-rule-pdmyw1", + "accountId":"0123456789012", + "evaluationMode":"DETECTIVE" + } diff --git a/packages/parser/tests/events/bedrockAgentEvent.json b/packages/parser/tests/events/bedrockAgentEvent.json new file mode 100644 index 0000000000..b7ad75b3c4 --- /dev/null +++ b/packages/parser/tests/events/bedrockAgentEvent.json @@ -0,0 +1,16 @@ +{ + "actionGroup": "ClaimManagementActionGroup", + "messageVersion": "1.0", + "sessionId": "12345678912345", + "sessionAttributes": {}, + "promptSessionAttributes": {}, + "inputText": "I want to claim my insurance", + "agent": { + "alias": "TSTALIASID", + "name": "test", + "version": "DRAFT", + "id": "8ZXY0W8P1H" + }, + "httpMethod": "GET", + "apiPath": "/claims" +} diff --git a/packages/parser/tests/events/bedrockAgentPostEvent.json b/packages/parser/tests/events/bedrockAgentPostEvent.json new file mode 100644 index 0000000000..f223bfcd51 --- /dev/null +++ b/packages/parser/tests/events/bedrockAgentPostEvent.json @@ -0,0 +1,35 @@ +{ + "actionGroup": "ClaimManagementActionGroup", + "messageVersion": "1.0", + "sessionId": "12345678912345", + "sessionAttributes": {}, + "promptSessionAttributes": {}, + "inputText": "Send reminders to all pending documents", + "agent": { + "alias": "TSTALIASID", + "name": "test", + "version": "DRAFT", + "id": "8ZXY0W8P1H" + }, + "httpMethod": "POST", + "apiPath": "/send-reminders", + "requestBody": { + "content": { + "application/json": { + "properties": [ + { + "name": "claimId", + "type": "string", + "value": "20" + }, + { + "name": "pendingDocuments", + "type": "string", + "value": "social number and vat" + } + ] + } + } + }, + "parameters": [] +} diff --git a/packages/parser/tests/events/cloudFormationCustomResourceCreateEvent.json b/packages/parser/tests/events/cloudFormationCustomResourceCreateEvent.json new file mode 100644 index 0000000000..5c32d8c7aa --- /dev/null +++ b/packages/parser/tests/events/cloudFormationCustomResourceCreateEvent.json @@ -0,0 +1,13 @@ +{ + "RequestType": "Create", + "ServiceToken": "arn:aws:lambda:us-east-1:xxx:function:xxxx-CrbuiltinfunctionidProvi-2vKAalSppmKe", + "ResponseURL": "https://cloudformation-custom-resource-response-useast1.s3.amazonaws.com/7F%7Cb1f50fdfc25f3b", + "StackId": "arn:aws:cloudformation:us-east-1:xxxx:stack/xxxx/271845b0-f2e8-11ed-90ac-0eeb25b8ae21", + "RequestId": "xxxxx-d2a0-4dfb-ab1f-xxxxxx", + "LogicalResourceId": "xxxxxxxxx", + "ResourceType": "Custom::MyType", + "ResourceProperties": { + "ServiceToken": "arn:aws:lambda:us-east-1:xxxxx:function:xxxxx", + "MyProps": "ss" + } +} \ No newline at end of file diff --git a/packages/parser/tests/events/cloudFormationCustomResourceDeleteEvent.json b/packages/parser/tests/events/cloudFormationCustomResourceDeleteEvent.json new file mode 100644 index 0000000000..f26738133d --- /dev/null +++ b/packages/parser/tests/events/cloudFormationCustomResourceDeleteEvent.json @@ -0,0 +1,13 @@ +{ + "RequestType": "Delete", + "ServiceToken": "arn:aws:lambda:us-east-1:xxx:function:xxxx-CrbuiltinfunctionidProvi-2vKAalSppmKe", + "ResponseURL": "https://cloudformation-custom-resource-response-useast1.s3.amazonaws.com/7F%7Cb1f50fdfc25f3b", + "StackId": "arn:aws:cloudformation:us-east-1:xxxx:stack/xxxx/271845b0-f2e8-11ed-90ac-0eeb25b8ae21", + "RequestId": "xxxxx-d2a0-4dfb-ab1f-xxxxxx", + "LogicalResourceId": "xxxxxxxxx", + "ResourceType": "Custom::MyType", + "ResourceProperties": { + "ServiceToken": "arn:aws:lambda:us-east-1:xxxxx:function:xxxxx", + "MyProps": "ss" + } +} \ No newline at end of file diff --git a/packages/parser/tests/events/cloudFormationCustomResourceUpdateEvent.json b/packages/parser/tests/events/cloudFormationCustomResourceUpdateEvent.json new file mode 100644 index 0000000000..5225746345 --- /dev/null +++ b/packages/parser/tests/events/cloudFormationCustomResourceUpdateEvent.json @@ -0,0 +1,17 @@ +{ + "RequestType": "Update", + "ServiceToken": "arn:aws:lambda:us-east-1:xxx:function:xxxx-CrbuiltinfunctionidProvi-2vKAalSppmKe", + "ResponseURL": "https://cloudformation-custom-resource-response-useast1.s3.amazonaws.com/7F%7Cb1f50fdfc25f3b", + "StackId": "arn:aws:cloudformation:us-east-1:xxxx:stack/xxxx/271845b0-f2e8-11ed-90ac-0eeb25b8ae21", + "RequestId": "xxxxx-d2a0-4dfb-ab1f-xxxxxx", + "LogicalResourceId": "xxxxxxxxx", + "ResourceType": "Custom::MyType", + "ResourceProperties": { + "ServiceToken": "arn:aws:lambda:us-east-1:xxxxx:function:xxxxx", + "MyProps": "new" + }, + "OldResourceProperties": { + "ServiceToken": "arn:aws:lambda:us-east-1:xxxxx:function:xxxxx-xxxx-xxx", + "MyProps": "old" + } +} \ No newline at end of file diff --git a/packages/parser/tests/events/cloudWatchDashboardEvent.json b/packages/parser/tests/events/cloudWatchDashboardEvent.json new file mode 100644 index 0000000000..fd2d3be62d --- /dev/null +++ b/packages/parser/tests/events/cloudWatchDashboardEvent.json @@ -0,0 +1,38 @@ +{ + "original": "param-to-widget", + "widgetContext": { + "dashboardName": "Name-of-current-dashboard", + "widgetId": "widget-16", + "domain": "https://us-east-1.console.aws.amazon.com", + "accountId": "123456789123", + "locale": "en", + "timezone": { + "label": "UTC", + "offsetISO": "+00:00", + "offsetInMinutes": 0 + }, + "period": 300, + "isAutoPeriod": true, + "timeRange": { + "mode": "relative", + "start": 1627236199729, + "end": 1627322599729, + "relativeStart": 86400012, + "zoom": { + "start": 1627276030434, + "end": 1627282956521 + } + }, + "theme": "light", + "linkCharts": true, + "title": "Tweets for Amazon website problem", + "forms": { + "all": {} + }, + "params": { + "original": "param-to-widget" + }, + "width": 588, + "height": 369 + } +} diff --git a/packages/parser/tests/events/cloudWatchLogEvent.json b/packages/parser/tests/events/cloudWatchLogEvent.json new file mode 100644 index 0000000000..aa184c1d01 --- /dev/null +++ b/packages/parser/tests/events/cloudWatchLogEvent.json @@ -0,0 +1,5 @@ +{ + "awslogs": { + "data": "H4sIAAAAAAAAAHWPwQqCQBCGX0Xm7EFtK+smZBEUgXoLCdMhFtKV3akI8d0bLYmibvPPN3wz00CJxmQnTO41whwWQRIctmEcB6sQbFC3CjW3XW8kxpOpP+OC22d1Wml1qZkQGtoMsScxaczKN3plG8zlaHIta5KqWsozoTYw3/djzwhpLwivWFGHGpAFe7DL68JlBUk+l7KSN7tCOEJ4M3/qOI49vMHj+zCKdlFqLaU2ZHV2a4Ct/an0/ivdX8oYc1UVX860fQDQiMdxRQEAAA==" + } +} diff --git a/packages/parser/tests/events/codePipelineEvent.json b/packages/parser/tests/events/codePipelineEvent.json new file mode 100644 index 0000000000..d7abe51346 --- /dev/null +++ b/packages/parser/tests/events/codePipelineEvent.json @@ -0,0 +1,34 @@ +{ + "CodePipeline.job": { + "id": "11111111-abcd-1111-abcd-111111abcdef", + "accountId": "111111111111", + "data": { + "actionConfiguration": { + "configuration": { + "FunctionName": "MyLambdaFunctionForAWSCodePipeline", + "UserParameters": "some-input-such-as-a-URL" + } + }, + "inputArtifacts": [ + { + "name": "ArtifactName", + "revision": null, + "location": { + "type": "S3", + "s3Location": { + "bucketName": "the name of the bucket configured as the pipeline artifact store in Amazon S3, for example codepipeline-us-east-2-1234567890", + "objectKey": "the name of the application, for example CodePipelineDemoApplication.zip" + } + } + } + ], + "outputArtifacts": [], + "artifactCredentials": { + "accessKeyId": "AKIAIOSFODNN7EXAMPLE", + "secretAccessKey": "wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY", + "sessionToken": "MIICiTCCAfICCQD6m7oRw0uXOjANBgkqhkiG9w0BAQUFADCBiDELMAkGA1UEBhMCVVMxCzAJBgNVBAgTAldBMRAwDgYDVQQHEwdTZWF0dGxlMQ8wDQYDVQQKEwZBbWF6b24xFDASBgNVBAsTC0lBTSBDb25zb2xlMRIwEAYDVQQDEwlUZXN0Q2lsYWMxHzAdBgkqhkiG9w0BCQEWEG5vb25lQGFtYXpvbi5jb20wHhcNMTEwNDI1MjA0NTIxWhcNMTIwNDI0MjA0NTIxWjCBiDELMAkGA1UEBhMCVVMxCzAJBgNVBAgTAldBMRAwDgYDVQQHEwdTZWF0dGxlMQ8wDQYDVQQKEwZBbWF6b24xFDASBgNVBAsTC0lBTSBDb25zb2xlMRIwEAYDVQQDEwlUZXN0Q2lsYWMxHzAdBgkqhkiG9w0BCQEWEG5vb25lQGFtYXpvbi5jb20wgZ8wDQYJKoZIhvcNAQEBBQADgY0AMIGJAoGBAMaK0dn+a4GmWIWJ21uUSfwfEvySWtC2XADZ4nB+BLYgVIk60CpiwsZ3G93vUEIO3IyNoH/f0wYK8m9TrDHudUZg3qX4waLG5M43q7Wgc/MbQITxOUSQv7c7ugFFDzQGBzZswY6786m86gpEIbb3OhjZnzcvQAaRHhdlQWIMm2nrAgMBAAEwDQYJKoZIhvcNAQEFBQADgYEAtCu4nUhVVxYUntneD9+h8Mg9q6q+auNKyExzyLwaxlAoo7TJHidbtS4J5iNmZgXL0FkbFFBjvSfpJIlJ00zbhNYS5f6GuoEDmFJl0ZxBHjJnyp378OD8uTs7fLvjx79LjSTbNYiytVbZPQUQ5Yaxu2jXnimvw3rrszlaEXAMPLE=" + }, + "continuationToken": "A continuation token if continuing job" + } + } +} diff --git a/packages/parser/tests/events/codePipelineEventData.json b/packages/parser/tests/events/codePipelineEventData.json new file mode 100644 index 0000000000..7552f19ca9 --- /dev/null +++ b/packages/parser/tests/events/codePipelineEventData.json @@ -0,0 +1,46 @@ +{ + "CodePipeline.job": { + "id": "c0d76431-b0e7-xmpl-97e3-e8ee786eb6f6", + "accountId": "123456789012", + "data": { + "actionConfiguration": { + "configuration": { + "FunctionName": "my-function", + "UserParameters": "{\"KEY\": \"VALUE\"}" + } + }, + "inputArtifacts": [ + { + "name": "my-pipeline-SourceArtifact", + "revision": "e0c7xmpl2308ca3071aa7bab414de234ab52eea", + "location": { + "type": "S3", + "s3Location": { + "bucketName": "us-west-2-123456789012-my-pipeline", + "objectKey": "my-pipeline/test-api-2/TdOSFRV" + } + } + } + ], + "outputArtifacts": [ + { + "name": "invokeOutput", + "revision": null, + "location": { + "type": "S3", + "s3Location": { + "bucketName": "us-west-2-123456789012-my-pipeline", + "objectKey": "my-pipeline/invokeOutp/D0YHsJn" + } + } + } + ], + "artifactCredentials": { + "accessKeyId": "AKIAIOSFODNN7EXAMPLE", + "secretAccessKey": "6CGtmAa3lzWtV7a...", + "sessionToken": "IQoJb3JpZ2luX2VjEA...", + "expirationTime": 1575493418000 + } + } + } +} diff --git a/packages/parser/tests/events/codePipelineEventEmptyUserParameters.json b/packages/parser/tests/events/codePipelineEventEmptyUserParameters.json new file mode 100644 index 0000000000..1a0dec6a15 --- /dev/null +++ b/packages/parser/tests/events/codePipelineEventEmptyUserParameters.json @@ -0,0 +1,32 @@ +{ + "CodePipeline.job": { + "id": "11111111-abcd-1111-abcd-111111abcdef", + "accountId": "111111111111", + "data": { + "actionConfiguration": { + "configuration": { + "FunctionName": "MyLambdaFunctionForAWSCodePipeline" + } + }, + "inputArtifacts": [ + { + "name": "ArtifactName", + "revision": null, + "location": { + "type": "S3", + "s3Location": { + "bucketName": "the name of the bucket configured as the pipeline artifact store in Amazon S3, for example codepipeline-us-east-2-1234567890", + "objectKey": "the name of the application, for example CodePipelineDemoApplication.zip" + } + } + } + ], + "outputArtifacts": [], + "artifactCredentials": { + "accessKeyId": "AKIAIOSFODNN7EXAMPLE", + "secretAccessKey": "wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY", + "sessionToken": "MIICiTCCAfICCQD6m7oRw0uXOjANBgkqhkiG9w0BAQUFADCBiDELMAkGA1UEBhMCVVMxCzAJBgNVBAgTAldBMRAwDgYDVQQHEwdTZWF0dGxlMQ8wDQYDVQQKEwZBbWF6b24xFDASBgNVBAsTC0lBTSBDb25zb2xlMRIwEAYDVQQDEwlUZXN0Q2lsYWMxHzAdBgkqhkiG9w0BCQEWEG5vb25lQGFtYXpvbi5jb20wHhcNMTEwNDI1MjA0NTIxWhcNMTIwNDI0MjA0NTIxWjCBiDELMAkGA1UEBhMCVVMxCzAJBgNVBAgTAldBMRAwDgYDVQQHEwdTZWF0dGxlMQ8wDQYDVQQKEwZBbWF6b24xFDASBgNVBAsTC0lBTSBDb25zb2xlMRIwEAYDVQQDEwlUZXN0Q2lsYWMxHzAdBgkqhkiG9w0BCQEWEG5vb25lQGFtYXpvbi5jb20wgZ8wDQYJKoZIhvcNAQEBBQADgY0AMIGJAoGBAMaK0dn+a4GmWIWJ21uUSfwfEvySWtC2XADZ4nB+BLYgVIk60CpiwsZ3G93vUEIO3IyNoH/f0wYK8m9TrDHudUZg3qX4waLG5M43q7Wgc/MbQITxOUSQv7c7ugFFDzQGBzZswY6786m86gpEIbb3OhjZnzcvQAaRHhdlQWIMm2nrAgMBAAEwDQYJKoZIhvcNAQEFBQADgYEAtCu4nUhVVxYUntneD9+h8Mg9q6q+auNKyExzyLwaxlAoo7TJHidbtS4J5iNmZgXL0FkbFFBjvSfpJIlJ00zbhNYS5f6GuoEDmFJl0ZxBHjJnyp378OD8uTs7fLvjx79LjSTbNYiytVbZPQUQ5Yaxu2jXnimvw3rrszlaEXAMPLE=" + } + } + } +} diff --git a/packages/parser/tests/events/codePipelineEventWithEncryptionKey.json b/packages/parser/tests/events/codePipelineEventWithEncryptionKey.json new file mode 100644 index 0000000000..e4a8528e14 --- /dev/null +++ b/packages/parser/tests/events/codePipelineEventWithEncryptionKey.json @@ -0,0 +1,38 @@ +{ + "CodePipeline.job": { + "id": "11111111-abcd-1111-abcd-111111abcdef", + "accountId": "111111111111", + "data": { + "actionConfiguration": { + "configuration": { + "FunctionName": "MyLambdaFunctionForAWSCodePipeline", + "UserParameters": "some-input-such-as-a-URL" + } + }, + "inputArtifacts": [ + { + "name": "ArtifactName", + "revision": null, + "location": { + "type": "S3", + "s3Location": { + "bucketName": "the name of the bucket configured as the pipeline artifact store in Amazon S3, for example codepipeline-us-east-2-1234567890", + "objectKey": "the name of the application, for example CodePipelineDemoApplication.zip" + } + } + } + ], + "outputArtifacts": [], + "artifactCredentials": { + "accessKeyId": "AKIAIOSFODNN7EXAMPLE", + "secretAccessKey": "wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY", + "sessionToken": "MIICiTCCAfICCQD6m7oRw0uXOjANBgkqhkiG9w0BAQUFADCBiDELMAkGA1UEBhMCVVMxCzAJBgNVBAgTAldBMRAwDgYDVQQHEwdTZWF0dGxlMQ8wDQYDVQQKEwZBbWF6b24xFDASBgNVBAsTC0lBTSBDb25zb2xlMRIwEAYDVQQDEwlUZXN0Q2lsYWMxHzAdBgkqhkiG9w0BCQEWEG5vb25lQGFtYXpvbi5jb20wHhcNMTEwNDI1MjA0NTIxWhcNMTIwNDI0MjA0NTIxWjCBiDELMAkGA1UEBhMCVVMxCzAJBgNVBAgTAldBMRAwDgYDVQQHEwdTZWF0dGxlMQ8wDQYDVQQKEwZBbWF6b24xFDASBgNVBAsTC0lBTSBDb25zb2xlMRIwEAYDVQQDEwlUZXN0Q2lsYWMxHzAdBgkqhkiG9w0BCQEWEG5vb25lQGFtYXpvbi5jb20wgZ8wDQYJKoZIhvcNAQEBBQADgY0AMIGJAoGBAMaK0dn+a4GmWIWJ21uUSfwfEvySWtC2XADZ4nB+BLYgVIk60CpiwsZ3G93vUEIO3IyNoH/f0wYK8m9TrDHudUZg3qX4waLG5M43q7Wgc/MbQITxOUSQv7c7ugFFDzQGBzZswY6786m86gpEIbb3OhjZnzcvQAaRHhdlQWIMm2nrAgMBAAEwDQYJKoZIhvcNAQEFBQADgYEAtCu4nUhVVxYUntneD9+h8Mg9q6q+auNKyExzyLwaxlAoo7TJHidbtS4J5iNmZgXL0FkbFFBjvSfpJIlJ00zbhNYS5f6GuoEDmFJl0ZxBHjJnyp378OD8uTs7fLvjx79LjSTbNYiytVbZPQUQ5Yaxu2jXnimvw3rrszlaEXAMPLE=" + }, + "continuationToken": "A continuation token if continuing job", + "encryptionKey": { + "id": "arn:aws:kms:us-west-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab", + "type": "KMS" + } + } + } +} diff --git a/packages/parser/tests/events/cognitoCreateAuthChallengeEvent.json b/packages/parser/tests/events/cognitoCreateAuthChallengeEvent.json new file mode 100644 index 0000000000..ad018ae082 --- /dev/null +++ b/packages/parser/tests/events/cognitoCreateAuthChallengeEvent.json @@ -0,0 +1,29 @@ +{ + "version": "1", + "region": "us-east-1", + "userPoolId": "us-east-1_example", + "userName": "UserName", + "callerContext": { + "awsSdkVersion": "awsSdkVersion", + "clientId": "clientId" + }, + "triggerSource": "CreateAuthChallenge_Authentication", + "request": { + "userAttributes": { + "sub": "4A709A36-7D63-4785-829D-4198EF10EBDA", + "email_verified": "true", + "name": "First Last", + "email": "create-auth@mail.com" + }, + "challengeName": "PASSWORD_VERIFIER", + "session" : [ + { + "challengeName": "CUSTOM_CHALLENGE", + "challengeResult": true, + "challengeMetadata": "CAPTCHA_CHALLENGE" + } + ], + "userNotFound": false + }, + "response": {} +} diff --git a/packages/parser/tests/events/cognitoCustomMessageEvent.json b/packages/parser/tests/events/cognitoCustomMessageEvent.json new file mode 100644 index 0000000000..8652c3bff4 --- /dev/null +++ b/packages/parser/tests/events/cognitoCustomMessageEvent.json @@ -0,0 +1,20 @@ +{ + "version": "1", + "triggerSource": "CustomMessage_AdminCreateUser", + "region": "region", + "userPoolId": "userPoolId", + "userName": "userName", + "callerContext": { + "awsSdk": "awsSdkVersion", + "clientId": "clientId" + }, + "request": { + "userAttributes": { + "phone_number_verified": false, + "email_verified": true + }, + "codeParameter": "####", + "usernameParameter": "username" + }, + "response": {} +} diff --git a/packages/parser/tests/events/cognitoDefineAuthChallengeEvent.json b/packages/parser/tests/events/cognitoDefineAuthChallengeEvent.json new file mode 100644 index 0000000000..80ea5ac2d9 --- /dev/null +++ b/packages/parser/tests/events/cognitoDefineAuthChallengeEvent.json @@ -0,0 +1,32 @@ +{ + "version": "1", + "region": "us-east-1", + "userPoolId": "us-east-1_example", + "userName": "UserName", + "callerContext": { + "awsSdkVersion": "awsSdkVersion", + "clientId": "clientId" + }, + "triggerSource": "DefineAuthChallenge_Authentication", + "request": { + "userAttributes": { + "sub": "4A709A36-7D63-4785-829D-4198EF10EBDA", + "email_verified": "true", + "name": "First Last", + "email": "define-auth@mail.com" + }, + "session" : [ + { + "challengeName": "PASSWORD_VERIFIER", + "challengeResult": true + }, + { + "challengeName": "CUSTOM_CHALLENGE", + "challengeResult": true, + "challengeMetadata": "CAPTCHA_CHALLENGE" + } + ], + "userNotFound": true + }, + "response": {} +} diff --git a/packages/parser/tests/events/cognitoPostAuthenticationEvent.json b/packages/parser/tests/events/cognitoPostAuthenticationEvent.json new file mode 100644 index 0000000000..d34b18eeba --- /dev/null +++ b/packages/parser/tests/events/cognitoPostAuthenticationEvent.json @@ -0,0 +1,18 @@ +{ + "version": "1", + "region": "us-east-1", + "userPoolId": "us-east-1_example", + "userName": "UserName", + "callerContext": { + "awsSdkVersion": "awsSdkVersion", + "clientId": "clientId" + }, + "triggerSource": "PostAuthentication_Authentication", + "request": { + "newDeviceUsed": true, + "userAttributes": { + "email": "post-auth@mail.com" + } + }, + "response": {} +} diff --git a/packages/parser/tests/events/cognitoPostConfirmationEvent.json b/packages/parser/tests/events/cognitoPostConfirmationEvent.json new file mode 100644 index 0000000000..e88f98150c --- /dev/null +++ b/packages/parser/tests/events/cognitoPostConfirmationEvent.json @@ -0,0 +1,18 @@ +{ + "version": "string", + "triggerSource": "PostConfirmation_ConfirmSignUp", + "region": "us-east-1", + "userPoolId": "string", + "userName": "userName", + "callerContext": { + "awsSdkVersion": "awsSdkVersion", + "clientId": "clientId" + }, + "request": { + "userAttributes": { + "email": "user@example.com", + "email_verified": true + } + }, + "response": {} +} diff --git a/packages/parser/tests/events/cognitoPreAuthenticationEvent.json b/packages/parser/tests/events/cognitoPreAuthenticationEvent.json new file mode 100644 index 0000000000..661fea6372 --- /dev/null +++ b/packages/parser/tests/events/cognitoPreAuthenticationEvent.json @@ -0,0 +1,20 @@ +{ + "version": "1", + "region": "us-east-1", + "userPoolId": "us-east-1_example", + "userName": "UserName", + "callerContext": { + "awsSdkVersion": "awsSdkVersion", + "clientId": "clientId" + }, + "triggerSource": "PreAuthentication_Authentication", + "request": { + "userAttributes": { + "sub": "4A709A36-7D63-4785-829D-4198EF10EBDA", + "email_verified": "true", + "name": "First Last", + "email": "pre-auth@mail.com" + } + }, + "response": {} +} diff --git a/packages/parser/tests/events/cognitoPreSignUpEvent.json b/packages/parser/tests/events/cognitoPreSignUpEvent.json new file mode 100644 index 0000000000..feb4eba25d --- /dev/null +++ b/packages/parser/tests/events/cognitoPreSignUpEvent.json @@ -0,0 +1,18 @@ +{ + "version": "string", + "triggerSource": "PreSignUp_SignUp", + "region": "us-east-1", + "userPoolId": "string", + "userName": "userName", + "callerContext": { + "awsSdkVersion": "awsSdkVersion", + "clientId": "clientId" + }, + "request": { + "userAttributes": { + "email": "user@example.com", + "phone_number": "+12065550100" + } + }, + "response": {} +} diff --git a/packages/parser/tests/events/cognitoPreTokenGenerationEvent.json b/packages/parser/tests/events/cognitoPreTokenGenerationEvent.json new file mode 100644 index 0000000000..f5ee69e0d2 --- /dev/null +++ b/packages/parser/tests/events/cognitoPreTokenGenerationEvent.json @@ -0,0 +1,25 @@ +{ + "version": "1", + "triggerSource": "TokenGeneration_Authentication", + "region": "us-west-2", + "userPoolId": "us-west-2_example", + "userName": "testqq", + "callerContext": { + "awsSdkVersion": "aws-sdk-unknown-unknown", + "clientId": "71ghuul37mresr7h373b704tua" + }, + "request": { + "userAttributes": { + "sub": "0b0a57c5-f013-426a-81a1-f8ffbfba21f0", + "email_verified": "true", + "cognito:user_status": "CONFIRMED", + "email": "test@mail.com" + }, + "groupConfiguration": { + "groupsToOverride": [], + "iamRolesToOverride": [], + "preferredRole": null + } + }, + "response": {} +} diff --git a/packages/parser/tests/events/cognitoUserMigrationEvent.json b/packages/parser/tests/events/cognitoUserMigrationEvent.json new file mode 100644 index 0000000000..2eae4e6618 --- /dev/null +++ b/packages/parser/tests/events/cognitoUserMigrationEvent.json @@ -0,0 +1,15 @@ +{ + "version": "string", + "triggerSource": "UserMigration_Authentication", + "region": "us-east-1", + "userPoolId": "string", + "userName": "userName", + "callerContext": { + "awsSdkVersion": "awsSdkVersion", + "clientId": "clientId" + }, + "request": { + "password": "password" + }, + "response": {} +} diff --git a/packages/parser/tests/events/cognitoVerifyAuthChallengeResponseEvent.json b/packages/parser/tests/events/cognitoVerifyAuthChallengeResponseEvent.json new file mode 100644 index 0000000000..2ebcdb5c27 --- /dev/null +++ b/packages/parser/tests/events/cognitoVerifyAuthChallengeResponseEvent.json @@ -0,0 +1,28 @@ +{ + "version": "1", + "region": "us-east-1", + "userPoolId": "us-east-1_example", + "userName": "UserName", + "callerContext": { + "awsSdkVersion": "awsSdkVersion", + "clientId": "clientId" + }, + "triggerSource": "VerifyAuthChallengeResponse_Authentication", + "request": { + "userAttributes": { + "sub": "4A709A36-7D63-4785-829D-4198EF10EBDA", + "email_verified": "true", + "name": "First Last", + "email": "verify-auth@mail.com" + }, + "privateChallengeParameters": { + "answer": "challengeAnswer" + }, + "clientMetadata" : { + "foo": "value" + }, + "challengeAnswer": "challengeAnswer", + "userNotFound": true + }, + "response": {} +} diff --git a/packages/parser/tests/events/connectContactFlowEventAll.json b/packages/parser/tests/events/connectContactFlowEventAll.json new file mode 100644 index 0000000000..5850649b6e --- /dev/null +++ b/packages/parser/tests/events/connectContactFlowEventAll.json @@ -0,0 +1,41 @@ +{ + "Name": "ContactFlowEvent", + "Details": { + "ContactData": { + "Attributes": { + "Language": "en-US" + }, + "Channel": "VOICE", + "ContactId": "5ca32fbd-8f92-46af-92a5-6b0f970f0efe", + "CustomerEndpoint": { + "Address": "+11234567890", + "Type": "TELEPHONE_NUMBER" + }, + "InitialContactId": "5ca32fbd-8f92-46af-92a5-6b0f970f0efe", + "InitiationMethod": "API", + "InstanceARN": "arn:aws:connect:eu-central-1:123456789012:instance/9308c2a1-9bc6-4cea-8290-6c0b4a6d38fa", + "MediaStreams": { + "Customer": { + "Audio": { + "StartFragmentNumber": "91343852333181432392682062622220590765191907586", + "StartTimestamp": "1565781909613", + "StreamARN": "arn:aws:kinesisvideo:eu-central-1:123456789012:stream/connect-contact-a3d73b84-ce0e-479a-a9dc-5637c9d30ac9/1565272947806" + } + } + }, + "PreviousContactId": "5ca32fbd-8f92-46af-92a5-6b0f970f0efe", + "Queue": { + "ARN": "arn:aws:connect:eu-central-1:123456789012:instance/9308c2a1-9bc6-4cea-8290-6c0b4a6d38fa/queue/5cba7cbf-1ecb-4b6d-b8bd-fe91079b3fc8", + "Name": "QueueOne" + }, + "SystemEndpoint": { + "Address": "+11234567890", + "Type": "TELEPHONE_NUMBER" + } + }, + "Parameters": { + "ParameterOne": "One", + "ParameterTwo": "Two" + } + } +} \ No newline at end of file diff --git a/packages/parser/tests/events/connectContactFlowEventMin.json b/packages/parser/tests/events/connectContactFlowEventMin.json new file mode 100644 index 0000000000..9cc22d59c3 --- /dev/null +++ b/packages/parser/tests/events/connectContactFlowEventMin.json @@ -0,0 +1,27 @@ +{ + "Name": "ContactFlowEvent", + "Details": { + "ContactData": { + "Attributes": {}, + "Channel": "VOICE", + "ContactId": "5ca32fbd-8f92-46af-92a5-6b0f970f0efe", + "CustomerEndpoint": null, + "InitialContactId": "5ca32fbd-8f92-46af-92a5-6b0f970f0efe", + "InitiationMethod": "API", + "InstanceARN": "arn:aws:connect:eu-central-1:123456789012:instance/9308c2a1-9bc6-4cea-8290-6c0b4a6d38fa", + "MediaStreams": { + "Customer": { + "Audio": { + "StartFragmentNumber": null, + "StartTimestamp": null, + "StreamARN": null + } + } + }, + "PreviousContactId": "5ca32fbd-8f92-46af-92a5-6b0f970f0efe", + "Queue": null, + "SystemEndpoint": null + }, + "Parameters": {} + } +} \ No newline at end of file diff --git a/packages/parser/tests/events/dynamoStreamEvent.json b/packages/parser/tests/events/dynamoStreamEvent.json new file mode 100644 index 0000000000..16009a7a95 --- /dev/null +++ b/packages/parser/tests/events/dynamoStreamEvent.json @@ -0,0 +1,65 @@ +{ + "Records": [ + { + "eventID": "1", + "eventVersion": "1.0", + "dynamodb": { + "ApproximateCreationDateTime": 1693997155.0, + "Keys": { + "Id": { + "N": "101" + } + }, + "NewImage": { + "Message": { + "S": "New item!" + }, + "Id": { + "N": "101" + } + }, + "StreamViewType": "NEW_AND_OLD_IMAGES", + "SequenceNumber": "111", + "SizeBytes": 26 + }, + "awsRegion": "us-west-2", + "eventName": "INSERT", + "eventSourceARN": "eventsource_arn", + "eventSource": "aws:dynamodb" + }, + { + "eventID": "2", + "eventVersion": "1.0", + "dynamodb": { + "OldImage": { + "Message": { + "S": "New item!" + }, + "Id": { + "N": "101" + } + }, + "SequenceNumber": "222", + "Keys": { + "Id": { + "N": "101" + } + }, + "SizeBytes": 59, + "NewImage": { + "Message": { + "S": "This item has changed" + }, + "Id": { + "N": "101" + } + }, + "StreamViewType": "NEW_AND_OLD_IMAGES" + }, + "awsRegion": "us-west-2", + "eventName": "MODIFY", + "eventSourceARN": "source_arn", + "eventSource": "aws:dynamodb" + } + ] +} diff --git a/packages/parser/tests/events/eventBridgeEvent.json b/packages/parser/tests/events/eventBridgeEvent.json new file mode 100644 index 0000000000..65872cf9a3 --- /dev/null +++ b/packages/parser/tests/events/eventBridgeEvent.json @@ -0,0 +1,17 @@ +{ + "version": "0", + "id": "6a7e8feb-b491-4cf7-a9f1-bf3703467718", + "detail-type": "EC2 Instance State-change Notification", + "source": "aws.ec2", + "account": "111122223333", + "time": "2017-12-22T18:43:48Z", + "region": "us-west-1", + "resources": [ + "arn:aws:ec2:us-west-1:123456789012:instance/i-1234567890abcdef0" + ], + "detail": { + "instance_id": "i-1234567890abcdef0", + "state": "terminated" + }, + "replay-name": "replay_archive" +} diff --git a/packages/parser/tests/events/kafkaEventMsk.json b/packages/parser/tests/events/kafkaEventMsk.json new file mode 100644 index 0000000000..5a35b89680 --- /dev/null +++ b/packages/parser/tests/events/kafkaEventMsk.json @@ -0,0 +1,35 @@ +{ + "eventSource":"aws:kafka", + "eventSourceArn":"arn:aws:kafka:us-east-1:0123456789019:cluster/SalesCluster/abcd1234-abcd-cafe-abab-9876543210ab-4", + "bootstrapServers":"b-2.demo-cluster-1.a1bcde.c1.kafka.us-east-1.amazonaws.com:9092,b-1.demo-cluster-1.a1bcde.c1.kafka.us-east-1.amazonaws.com:9092", + "records":{ + "mytopic-0":[ + { + "topic":"mytopic", + "partition":0, + "offset":15, + "timestamp":1545084650987, + "timestampType":"CREATE_TIME", + "key":"cmVjb3JkS2V5", + "value":"eyJrZXkiOiJ2YWx1ZSJ9", + "headers":[ + { + "headerKey":[ + 104, + 101, + 97, + 100, + 101, + 114, + 86, + 97, + 108, + 117, + 101 + ] + } + ] + } + ] + } +} diff --git a/packages/parser/tests/events/kafkaEventSelfManaged.json b/packages/parser/tests/events/kafkaEventSelfManaged.json new file mode 100644 index 0000000000..22985dd11d --- /dev/null +++ b/packages/parser/tests/events/kafkaEventSelfManaged.json @@ -0,0 +1,34 @@ +{ + "eventSource":"aws:SelfManagedKafka", + "bootstrapServers":"b-2.demo-cluster-1.a1bcde.c1.kafka.us-east-1.amazonaws.com:9092,b-1.demo-cluster-1.a1bcde.c1.kafka.us-east-1.amazonaws.com:9092", + "records":{ + "mytopic-0":[ + { + "topic":"mytopic", + "partition":0, + "offset":15, + "timestamp":1545084650987, + "timestampType":"CREATE_TIME", + "key":"cmVjb3JkS2V5", + "value":"eyJrZXkiOiJ2YWx1ZSJ9", + "headers":[ + { + "headerKey":[ + 104, + 101, + 97, + 100, + 101, + 114, + 86, + 97, + 108, + 117, + 101 + ] + } + ] + } + ] + } +} diff --git a/packages/parser/tests/events/kinesisFirehoseKinesisEvent.json b/packages/parser/tests/events/kinesisFirehoseKinesisEvent.json new file mode 100644 index 0000000000..6cdd8e8a5b --- /dev/null +++ b/packages/parser/tests/events/kinesisFirehoseKinesisEvent.json @@ -0,0 +1,32 @@ +{ + "invocationId": "2b4d1ad9-2f48-94bd-a088-767c317e994a", + "sourceKinesisStreamArn":"arn:aws:kinesis:us-east-1:123456789012:stream/kinesis-source", + "deliveryStreamArn": "arn:aws:firehose:us-east-2:123456789012:deliverystream/delivery-stream-name", + "region": "us-east-2", + "records": [ + { + "data": "SGVsbG8gV29ybGQ=", + "recordId": "record1", + "approximateArrivalTimestamp": 1664028820148, + "kinesisRecordMetadata": { + "shardId": "shardId-000000000000", + "partitionKey": "4d1ad2b9-24f8-4b9d-a088-76e9947c317a", + "approximateArrivalTimestamp": 1664028820148, + "sequenceNumber": "49546986683135544286507457936321625675700192471156785154", + "subsequenceNumber": 0 + } + }, + { + "data": "eyJIZWxsbyI6ICJXb3JsZCJ9", + "recordId": "record2", + "approximateArrivalTimestamp": 1664028793294, + "kinesisRecordMetadata": { + "shardId": "shardId-000000000001", + "partitionKey": "4d1ad2b9-24f8-4b9d-a088-76e9947c318a", + "approximateArrivalTimestamp": 1664028793294, + "sequenceNumber": "49546986683135544286507457936321625675700192471156785155", + "subsequenceNumber": 0 + } + } + ] +} diff --git a/packages/parser/tests/events/kinesisFirehosePutEvent.json b/packages/parser/tests/events/kinesisFirehosePutEvent.json new file mode 100644 index 0000000000..f3e0719071 --- /dev/null +++ b/packages/parser/tests/events/kinesisFirehosePutEvent.json @@ -0,0 +1,17 @@ +{ + "invocationId": "2b4d1ad9-2f48-94bd-a088-767c317e994a", + "deliveryStreamArn": "arn:aws:firehose:us-east-2:123456789012:deliverystream/delivery-stream-name", + "region": "us-east-2", + "records": [ + { + "recordId": "record1", + "approximateArrivalTimestamp": 1664029185290, + "data": "SGVsbG8gV29ybGQ=" + }, + { + "recordId": "record2", + "approximateArrivalTimestamp": 1664029186945, + "data": "eyJIZWxsbyI6ICJXb3JsZCJ9" + } + ] + } diff --git a/packages/parser/tests/events/kinesisFirehoseSQSEvent.json b/packages/parser/tests/events/kinesisFirehoseSQSEvent.json new file mode 100644 index 0000000000..bea267c420 --- /dev/null +++ b/packages/parser/tests/events/kinesisFirehoseSQSEvent.json @@ -0,0 +1,12 @@ +{ + "invocationId": "556b67a3-48fc-4385-af49-e133aade9cb9", + "deliveryStreamArn": "arn:aws:firehose:us-east-1:123456789012:deliverystream/PUT-S3-tdyyE", + "region": "us-east-1", + "records": [ + { + "recordId": "49640912821178817833517986466168945147170627572855734274000000", + "approximateArrivalTimestamp": 1684864917398, + "data": "eyJtZXNzYWdlSWQiOiI1YWI4MDdkNC01NjQ0LTRjNTUtOTdhMy00NzM5NjYzNWFjNzQiLCJyZWNlaXB0SGFuZGxlIjoiQVFFQndKbkt5ckhpZ1VNWmo2cllpZ0NneGxhUzNTTHkwYS4uLiIsImJvZHkiOiJUZXN0IG1lc3NhZ2UuIiwiYXR0cmlidXRlcyI6eyJBcHByb3hpbWF0ZVJlY2VpdmVDb3VudCI6IjEiLCJTZW50VGltZXN0YW1wIjoiMTY4NDg2NDg1MjQ5MSIsIlNlbmRlcklkIjoiQUlEQUlFTlFaSk9MTzIzWVZKNFZPIiwiQXBwcm94aW1hdGVGaXJzdFJlY2VpdmVUaW1lc3RhbXAiOiIxNjg0ODY0ODcyNDkxIn0sIm1lc3NhZ2VBdHRyaWJ1dGVzIjp7fSwibWQ1T2ZNZXNzYWdlQXR0cmlidXRlcyI6bnVsbCwibWQ1T2ZCb2R5IjoiYzhiNmJjNjBjOGI4YjNhOTA0ZTQ1YzFmYWJkZjUyM2QiLCJldmVudFNvdXJjZSI6ImF3czpzcXMiLCJldmVudFNvdXJjZUFSTiI6ImFybjphd3M6c3FzOnVzLWVhc3QtMToyMDA5ODQxMTIzODY6U05TIiwiYXdzUmVnaW9uIjoidXMtZWFzdC0xIn0K" + } + ] +} diff --git a/packages/parser/tests/events/kinesisStreamCloudWatchLogsEvent.json b/packages/parser/tests/events/kinesisStreamCloudWatchLogsEvent.json new file mode 100644 index 0000000000..a9a6959f90 --- /dev/null +++ b/packages/parser/tests/events/kinesisStreamCloudWatchLogsEvent.json @@ -0,0 +1,36 @@ +{ + "Records": [ + { + "kinesis": { + "kinesisSchemaVersion": "1.0", + "partitionKey": "da10bf66b1f54bff5d96eae99149ad1f", + "sequenceNumber": "49635052289529725553291405521504870233219489715332317186", + "data": "H4sIAAAAAAAAAK2Sa2vbMBSG/4ox+xg3Oror39IlvaztVmJv7WjCUGwl8+ZLZstts5L/vuOsZYUyWGEgJHiP9J7nvOghLF3b2rVLthsXjsLJOBl/uZjG8fh4Gg7C+q5yDcqUAWcSONHEoFzU6+Om7jZYGdq7dljYcpnZ4cZHwLWOJl1Zbs/r9cR6e9RVqc/rKlpXV9eXt+fy27vt8W+L2DfOlr07oXQIMAQyvHlzPk6mcbKgciktF5lQfMU5dZZqzrShLF2uFC60aLtlmzb5prc/ygvvmjYc3YRPFG+LusuurE+/Ikqb1Gd55dq8jV+8isT6+317Rk42J5PTcLFnm966yvd2D2GeISJTYIwCJSQ1BE9OtWZCABWaKMIJAMdDMyU5MYZLhmkxBhQxfY4Re1tiWiAlBsgIVQTE4Cl6tI+T8SwJZu5Hh1dPs1FApOMSDI9WVKmIC+4irTMWQZYpx7QkztrgE06MU4yCx9DmVbgbvABmQJTGtkYAB0NwEwyYQUBpqEFuSbkGrThTRKi/AlP+HHj6fvJa3P9Ap/+Rbja9/PD6POd+0jXW7xM1B8CDsp37w7woXBb8qQDZ6xeurJttEOc/HWpUBxeHKNr74LHwsXXYlsm9flrl/rmFIQeS7m3m1fVs/DlIGpu6nhMiyWQGXNKIMbcCIgkhElKbaZnZpYJUz33s1iV+z/6+StMlR3yphHNcCyxiNEXf2zed6xuEu8XuF2wb6krnAwAA", + "approximateArrivalTimestamp": 1668093033.744 + }, + "eventSource": "aws:kinesis", + "eventVersion": "1.0", + "eventID": "shardId-000000000000:49635052289529725553291405521504870233219489715332317186", + "eventName": "aws:kinesis:record", + "invokeIdentityArn": "arn:aws:iam::231436140809:role/pt-1488-CloudWatchKinesisLogsFunctionRole-1M4G2TIWIE49", + "awsRegion": "eu-west-1", + "eventSourceARN": "arn:aws:kinesis:eu-west-1:231436140809:stream/pt-1488-KinesisStreamCloudWatchLogs-D8tHs0im0aJG" + }, + { + "kinesis": { + "kinesisSchemaVersion": "1.0", + "partitionKey": "cf4c4c2c9a49bdfaf58d7dbbc2b06081", + "sequenceNumber": "49635052289529725553291405520881064510298312199003701250", + "data": "H4sIAAAAAAAAAK2SW2/TQBCF/4pl8ViTvc7u5i0laVraQhUbWtREaG1PgsGXYK/bhqr/nXVoBRIgUYnXc2bPfHO092GFXWc3mOy2GI7D6SSZfDyfxfFkPgsPwua2xtbLjFPBgQqiifFy2WzmbdNvvTOyt92otFWa29HWRVRoHU37qtqdNZupdfaorzNXNHW0qS+vLm7O4PPr3fxHROxatNWQThgbUTqiZHT94mySzOJkBUqYLOWY8ZQLbaTRkEvDciUYzWzKfETXp13WFtsh/qgoHbZdOL4OnyhelU2fX1qXffIoXdKcFjV2RRf/9iqSmy933Sk53h5PT8LVnm12g7Ub4u7DIveIXFFjFNGUKUlAaMY0EUJKLjkQbxhKGCWeknMKoAGUkYoJ7TFd4St2tvJtDRYxDAg3VB08Ve/j42SySIIFfu396Ek+DkS+xkwAiYhM00isgUV6jXmEMrM5EmMsh+C9v9hfMQ4eS1vW4cPBH4CZVpoTJkEIAp5RUMo8vGFae3JNCCdUccMVgPw7sP4VePZm+lzc/0AH/0i3mF28fX6fSzftW+v2jZKXRgVVt3SHRVliHvx06F4+x6ppd0FcfEMvMR2cH3rR3gWPxrsO/Vau9vqyvlpMPgRJazMcYGgEHHLKBhLGJaBA0JLxNc0JppoS9Cwxbir/B4d5QDBAQSnfFFGp8aa/vxw2uLbHYUH4sHr4Dj5RJxfMAwAA", + "approximateArrivalTimestamp": 1668092612.992 + }, + "eventSource": "aws:kinesis", + "eventVersion": "1.0", + "eventID": "shardId-000000000000:49635052289529725553291405520881064510298312199003701250", + "eventName": "aws:kinesis:record", + "invokeIdentityArn": "arn:aws:iam::231436140809:role/pt-1488-CloudWatchKinesisLogsFunctionRole-1M4G2TIWIE49", + "awsRegion": "eu-west-1", + "eventSourceARN": "arn:aws:kinesis:eu-west-1:231436140809:stream/pt-1488-KinesisStreamCloudWatchLogs-D8tHs0im0aJG" + } + ] +} \ No newline at end of file diff --git a/packages/parser/tests/events/kinesisStreamEvent.json b/packages/parser/tests/events/kinesisStreamEvent.json new file mode 100644 index 0000000000..ef8e209638 --- /dev/null +++ b/packages/parser/tests/events/kinesisStreamEvent.json @@ -0,0 +1,36 @@ +{ + "Records": [ + { + "kinesis": { + "kinesisSchemaVersion": "1.0", + "partitionKey": "1", + "sequenceNumber": "49590338271490256608559692538361571095921575989136588898", + "data": "SGVsbG8sIHRoaXMgaXMgYSB0ZXN0Lg==", + "approximateArrivalTimestamp": 1545084650.987 + }, + "eventSource": "aws:kinesis", + "eventVersion": "1.0", + "eventID": "shardId-000000000006:49590338271490256608559692538361571095921575989136588898", + "eventName": "aws:kinesis:record", + "invokeIdentityArn": "arn:aws:iam::123456789012:role/lambda-role", + "awsRegion": "us-east-2", + "eventSourceARN": "arn:aws:kinesis:us-east-2:123456789012:stream/lambda-stream" + }, + { + "kinesis": { + "kinesisSchemaVersion": "1.0", + "partitionKey": "1", + "sequenceNumber": "49590338271490256608559692540925702759324208523137515618", + "data": "VGhpcyBpcyBvbmx5IGEgdGVzdC4=", + "approximateArrivalTimestamp": 1545084711.166 + }, + "eventSource": "aws:kinesis", + "eventVersion": "1.0", + "eventID": "shardId-000000000006:49590338271490256608559692540925702759324208523137515618", + "eventName": "aws:kinesis:record", + "invokeIdentityArn": "arn:aws:iam::123456789012:role/lambda-role", + "awsRegion": "us-east-2", + "eventSourceARN": "arn:aws:kinesis:us-east-2:123456789012:stream/lambda-stream" + } + ] +} diff --git a/packages/parser/tests/events/kinesisStreamEventOneRecord.json b/packages/parser/tests/events/kinesisStreamEventOneRecord.json new file mode 100644 index 0000000000..05fe2d297a --- /dev/null +++ b/packages/parser/tests/events/kinesisStreamEventOneRecord.json @@ -0,0 +1,20 @@ +{ + "Records": [ + { + "kinesis": { + "kinesisSchemaVersion": "1.0", + "partitionKey": "1", + "sequenceNumber": "49590338271490256608559692538361571095921575989136588898", + "data": "eyJtZXNzYWdlIjogInRlc3QgbWVzc2FnZSIsICJ1c2VybmFtZSI6ICJ0ZXN0In0=", + "approximateArrivalTimestamp": 1545084650.987 + }, + "eventSource": "aws:kinesis", + "eventVersion": "1.0", + "eventID": "shardId-000000000006:49590338271490256608559692538361571095921575989136588898", + "eventName": "aws:kinesis:record", + "invokeIdentityArn": "arn:aws:iam::123456789012:role/lambda-role", + "awsRegion": "us-east-2", + "eventSourceARN": "arn:aws:kinesis:us-east-2:123456789012:stream/lambda-stream" + } + ] +} diff --git a/packages/parser/tests/events/lambdaFunctionUrlEvent.json b/packages/parser/tests/events/lambdaFunctionUrlEvent.json new file mode 100644 index 0000000000..da5c133e6f --- /dev/null +++ b/packages/parser/tests/events/lambdaFunctionUrlEvent.json @@ -0,0 +1,47 @@ +{ + "version":"2.0", + "routeKey":"$default", + "rawPath":"/", + "rawQueryString":"", + "headers":{ + "sec-fetch-mode":"navigate", + "x-amzn-tls-version":"TLSv1.2", + "sec-fetch-site":"cross-site", + "accept-language":"pt-BR,pt;q=0.9", + "x-forwarded-proto":"https", + "x-forwarded-port":"443", + "x-forwarded-for":"123.123.123.123", + "sec-fetch-user":"?1", + "accept":"text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9", + "x-amzn-tls-cipher-suite":"ECDHE-RSA-AES128-GCM-SHA256", + "sec-ch-ua":"\" Not A;Brand\";v=\"99\", \"Chromium\";v=\"102\", \"Google Chrome\";v=\"102\"", + "sec-ch-ua-mobile":"?0", + "x-amzn-trace-id":"Root=1-62ecd163-5f302e550dcde3b12402207d", + "sec-ch-ua-platform":"\"Linux\"", + "host":".lambda-url.us-east-1.on.aws", + "upgrade-insecure-requests":"1", + "cache-control":"max-age=0", + "accept-encoding":"gzip, deflate, br", + "sec-fetch-dest":"document", + "user-agent":"Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/102.0.0.0 Safari/537.36" + }, + "requestContext":{ + "accountId":"anonymous", + "apiId":"", + "domainName":".lambda-url.us-east-1.on.aws", + "domainPrefix":"", + "http":{ + "method":"GET", + "path":"/", + "protocol":"HTTP/1.1", + "sourceIp":"123.123.123.123", + "userAgent":"agent" + }, + "requestId":"id", + "routeKey":"$default", + "stage":"$default", + "time":"05/Aug/2022:08:14:39 +0000", + "timeEpoch":1659687279885 + }, + "isBase64Encoded":false +} diff --git a/packages/parser/tests/events/lambdaFunctionUrlEventPathTrailingSlash.json b/packages/parser/tests/events/lambdaFunctionUrlEventPathTrailingSlash.json new file mode 100644 index 0000000000..b1f8226518 --- /dev/null +++ b/packages/parser/tests/events/lambdaFunctionUrlEventPathTrailingSlash.json @@ -0,0 +1,52 @@ +{ + "version": "2.0", + "routeKey": "$default", + "rawPath": "/my/path/", + "rawQueryString": "parameter1=value1¶meter1=value2¶meter2=value", + "cookies": [ + "cookie1", + "cookie2" + ], + "headers": { + "header1": "value1", + "header2": "value1,value2" + }, + "queryStringParameters": { + "parameter1": "value1,value2", + "parameter2": "value" + }, + "requestContext": { + "accountId": "123456789012", + "apiId": "", + "authentication": null, + "authorizer": { + "iam": { + "accessKey": "AKIA...", + "accountId": "111122223333", + "callerId": "AIDA...", + "cognitoIdentity": null, + "principalOrgId": null, + "userArn": "arn:aws:iam::111122223333:user/example-user", + "userId": "AIDA..." + } + }, + "domainName": ".lambda-url.us-west-2.on.aws", + "domainPrefix": "", + "http": { + "method": "POST", + "path": "/my/path", + "protocol": "HTTP/1.1", + "sourceIp": "123.123.123.123", + "userAgent": "agent" + }, + "requestId": "id", + "routeKey": "$default", + "stage": "$default", + "time": "12/Mar/2020:19:03:58 +0000", + "timeEpoch": 1583348638390 + }, + "body": "Hello from client!", + "pathParameters": null, + "isBase64Encoded": false, + "stageVariables": null + } \ No newline at end of file diff --git a/packages/parser/tests/events/lambdaFunctionUrlIAMEvent.json b/packages/parser/tests/events/lambdaFunctionUrlIAMEvent.json new file mode 100644 index 0000000000..bf52342b66 --- /dev/null +++ b/packages/parser/tests/events/lambdaFunctionUrlIAMEvent.json @@ -0,0 +1,52 @@ +{ + "version": "2.0", + "routeKey": "$default", + "rawPath": "/my/path", + "rawQueryString": "parameter1=value1¶meter1=value2¶meter2=value", + "cookies": [ + "cookie1", + "cookie2" + ], + "headers": { + "header1": "value1", + "header2": "value1,value2" + }, + "queryStringParameters": { + "parameter1": "value1,value2", + "parameter2": "value" + }, + "requestContext": { + "accountId": "123456789012", + "apiId": "", + "authentication": null, + "authorizer": { + "iam": { + "accessKey": "AKIA...", + "accountId": "111122223333", + "callerId": "AIDA...", + "cognitoIdentity": null, + "principalOrgId": null, + "userArn": "arn:aws:iam::111122223333:user/example-user", + "userId": "AIDA..." + } + }, + "domainName": ".lambda-url.us-west-2.on.aws", + "domainPrefix": "", + "http": { + "method": "POST", + "path": "/my/path", + "protocol": "HTTP/1.1", + "sourceIp": "123.123.123.123", + "userAgent": "agent" + }, + "requestId": "id", + "routeKey": "$default", + "stage": "$default", + "time": "12/Mar/2020:19:03:58 +0000", + "timeEpoch": 1583348638390 + }, + "body": "Hello from client!", + "pathParameters": null, + "isBase64Encoded": false, + "stageVariables": null +} diff --git a/packages/parser/tests/events/rabbitMQEvent.json b/packages/parser/tests/events/rabbitMQEvent.json new file mode 100644 index 0000000000..e4259555a8 --- /dev/null +++ b/packages/parser/tests/events/rabbitMQEvent.json @@ -0,0 +1,51 @@ +{ + "eventSource": "aws:rmq", + "eventSourceArn": "arn:aws:mq:us-west-2:112556298976:broker:pizzaBroker:b-9bcfa592-423a-4942-879d-eb284b418fc8", + "rmqMessagesByQueue": { + "pizzaQueue::/": [ + { + "basicProperties": { + "contentType": "text/plain", + "contentEncoding": null, + "headers": { + "header1": { + "bytes": [ + 118, + 97, + 108, + 117, + 101, + 49 + ] + }, + "header2": { + "bytes": [ + 118, + 97, + 108, + 117, + 101, + 50 + ] + }, + "numberInHeader": 10 + }, + "deliveryMode": 1, + "priority": 34, + "correlationId": null, + "replyTo": null, + "expiration": "60000", + "messageId": null, + "timestamp": "Jan 1, 1970, 12:33:41 AM", + "type": null, + "userId": "AIDACKCEVSQ6C2EXAMPLE", + "appId": null, + "clusterId": null, + "bodySize": 80 + }, + "redelivered": false, + "data": "eyJ0aW1lb3V0IjowLCJkYXRhIjoiQ1pybWYwR3c4T3Y0YnFMUXhENEUifQ==" + } + ] + } +} diff --git a/packages/parser/tests/events/s3Event.json b/packages/parser/tests/events/s3Event.json new file mode 100644 index 0000000000..4558dc3c9e --- /dev/null +++ b/packages/parser/tests/events/s3Event.json @@ -0,0 +1,38 @@ +{ + "Records": [ + { + "eventVersion": "2.1", + "eventSource": "aws:s3", + "awsRegion": "us-east-2", + "eventTime": "2019-09-03T19:37:27.192Z", + "eventName": "ObjectCreated:Put", + "userIdentity": { + "principalId": "AWS:AIDAINPONIXQXHT3IKHL2" + }, + "requestParameters": { + "sourceIPAddress": "205.255.255.255" + }, + "responseElements": { + "x-amz-request-id": "D82B88E5F771F645", + "x-amz-id-2": "vlR7PnpV2Ce81l0PRw6jlUpck7Jo5ZsQjryTjKlc5aLWGVHPZLj5NeC6qMa0emYBDXOo6QBU0Wo=" + }, + "s3": { + "s3SchemaVersion": "1.0", + "configurationId": "828aa6fc-f7b5-4305-8584-487c791949c1", + "bucket": { + "name": "lambda-artifacts-deafc19498e3f2df", + "ownerIdentity": { + "principalId": "A3I5XTEXAMAI3E" + }, + "arn": "arn:aws:s3:::lambda-artifacts-deafc19498e3f2df" + }, + "object": { + "key": "b21b84d653bb07b05b1e6b33684dc11b", + "size": 1305107, + "eTag": "b21b84d653bb07b05b1e6b33684dc11b", + "sequencer": "0C0F6F405D6ED209E1" + } + } + } + ] +} diff --git a/packages/parser/tests/events/s3EventBridgeNotificationObjectCreatedEvent.json b/packages/parser/tests/events/s3EventBridgeNotificationObjectCreatedEvent.json new file mode 100644 index 0000000000..5cc8f2f402 --- /dev/null +++ b/packages/parser/tests/events/s3EventBridgeNotificationObjectCreatedEvent.json @@ -0,0 +1,28 @@ +{ + "version": "0", + "id": "f5f1e65c-dc3a-93ca-6c1e-b1647eac7963", + "detail-type": "Object Created", + "source": "aws.s3", + "account": "123456789012", + "time": "2023-03-08T17:50:14Z", + "region": "eu-west-1", + "resources": [ + "arn:aws:s3:::example-bucket" + ], + "detail": { + "version": "0", + "bucket": { + "name": "example-bucket" + }, + "object": { + "key": "IMG_m7fzo3.jpg", + "size": 184662, + "etag": "4e68adba0abe2dc8653dc3354e14c01d", + "sequencer": "006408CAD69598B05E" + }, + "request-id": "57H08PA84AB1JZW0", + "requester": "123456789012", + "source-ip-address": "34.252.34.74", + "reason": "PutObject" + } +} \ No newline at end of file diff --git a/packages/parser/tests/events/s3EventBridgeNotificationObjectDeletedEvent.json b/packages/parser/tests/events/s3EventBridgeNotificationObjectDeletedEvent.json new file mode 100644 index 0000000000..af52ee2fef --- /dev/null +++ b/packages/parser/tests/events/s3EventBridgeNotificationObjectDeletedEvent.json @@ -0,0 +1,29 @@ +{ + "version": "0", + "id": "2ee9cc15-d022-99ea-1fb8-1b1bac4850f9", + "detail-type": "Object Deleted", + "source": "aws.s3", + "account": "111122223333", + "time": "2021-11-12T00:00:00Z", + "region": "ca-central-1", + "resources": [ + "arn:aws:s3:::example-bucket" + ], + "detail": { + "version": "0", + "bucket": { + "name": "example-bucket" + }, + "object": { + "key": "IMG_m7fzo3.jpg", + "size": 184662, + "etag": "4e68adba0abe2dc8653dc3354e14c01d", + "sequencer": "006408CAD69598B05E" + }, + "request-id": "0BH729840619AG5K", + "requester": "123456789012", + "source-ip-address": "34.252.34.74", + "reason": "DeleteObject", + "deletion-type": "Delete Marker Created" + } +} \ No newline at end of file diff --git a/packages/parser/tests/events/s3EventBridgeNotificationObjectExpiredEvent.json b/packages/parser/tests/events/s3EventBridgeNotificationObjectExpiredEvent.json new file mode 100644 index 0000000000..ef506cc355 --- /dev/null +++ b/packages/parser/tests/events/s3EventBridgeNotificationObjectExpiredEvent.json @@ -0,0 +1,28 @@ +{ + "version": "0", + "id": "ad1de317-e409-eba2-9552-30113f8d88e3", + "detail-type": "Object Deleted", + "source": "aws.s3", + "account": "111122223333", + "time": "2021-11-12T00:00:00Z", + "region": "ca-central-1", + "resources": [ + "arn:aws:s3:::example-bucket" + ], + "detail": { + "version": "0", + "bucket": { + "name": "example-bucket" + }, + "object": { + "key": "IMG_m7fzo3.jpg", + "size": 184662, + "etag": "4e68adba0abe2dc8653dc3354e14c01d", + "sequencer": "006408CAD69598B05E" + }, + "request-id": "20EB74C14654DC47", + "requester": "s3.amazonaws.com", + "reason": "Lifecycle Expiration", + "deletion-type": "Delete Marker Created" + } +} \ No newline at end of file diff --git a/packages/parser/tests/events/s3EventBridgeNotificationObjectRestoreCompletedEvent.json b/packages/parser/tests/events/s3EventBridgeNotificationObjectRestoreCompletedEvent.json new file mode 100644 index 0000000000..5a2e6a4f9e --- /dev/null +++ b/packages/parser/tests/events/s3EventBridgeNotificationObjectRestoreCompletedEvent.json @@ -0,0 +1,28 @@ +{ + "version": "0", + "id": "6924de0d-13e2-6bbf-c0c1-b903b753565e", + "detail-type": "Object Restore Completed", + "source": "aws.s3", + "account": "111122223333", + "time": "2021-11-12T00:00:00Z", + "region": "ca-central-1", + "resources": [ + "arn:aws:s3:::example-bucket" + ], + "detail": { + "version": "0", + "bucket": { + "name": "example-bucket" + }, + "object": { + "key": "IMG_m7fzo3.jpg", + "size": 184662, + "etag": "4e68adba0abe2dc8653dc3354e14c01d", + "sequencer": "006408CAD69598B05E" + }, + "request-id": "189F19CB7FB1B6A4", + "requester": "s3.amazonaws.com", + "restore-expiry-time": "2021-11-13T00:00:00Z", + "source-storage-class": "GLACIER" + } +} \ No newline at end of file diff --git a/packages/parser/tests/events/s3EventDecodedKey.json b/packages/parser/tests/events/s3EventDecodedKey.json new file mode 100644 index 0000000000..05f5ab5c4b --- /dev/null +++ b/packages/parser/tests/events/s3EventDecodedKey.json @@ -0,0 +1,40 @@ +{ + "Records": [ + { + "eventVersion": "2.0", + "eventSource": "aws:s3", + "awsRegion": "us-east-1", + "eventTime": "1970-01-01T00:00:00.123Z", + "eventName": "ObjectCreated:Put", + "userIdentity": { + "principalId": "EXAMPLE" + }, + "requestParameters": { + "sourceIPAddress": "127.0.0.1" + }, + "responseElements": { + "x-amz-request-id": "C3D13FE58DE4C810", + "x-amz-id-2": "FMyUVURIY8/IgAtTv8xRjskZQpcIZ9KG4V5Wp6S7S/JRWeUWerMUE5JgHvANOjpD" + }, + "s3": { + "s3SchemaVersion": "1.0", + "configurationId": "testConfigRule", + "bucket": { + "name": "sourcebucket", + "ownerIdentity": { + "principalId": "EXAMPLE" + }, + "arn": "arn:aws:s3:::mybucket" + }, + "object": { + "key": "Happy%20Face.jpg", + "urlDecodedKey": "Happy Face.jpg", + "size": 1024, + "versionId": "version", + "eTag": "d41d8cd98f00b204e9800998ecf8427e", + "sequencer": "Happy Sequencer" + } + } + } + ] +} diff --git a/packages/parser/tests/events/s3EventDeleteObject.json b/packages/parser/tests/events/s3EventDeleteObject.json new file mode 100644 index 0000000000..3a607242f0 --- /dev/null +++ b/packages/parser/tests/events/s3EventDeleteObject.json @@ -0,0 +1,36 @@ +{ + "Records": [ + { + "eventVersion": "2.1", + "eventSource": "aws:s3", + "awsRegion": "us-east-2", + "eventTime": "2019-09-03T19:37:27.192Z", + "eventName": "ObjectRemoved:Delete", + "userIdentity": { + "principalId": "AWS:AIDAINPONIXQXHT3IKHL2" + }, + "requestParameters": { + "sourceIPAddress": "205.255.255.255" + }, + "responseElements": { + "x-amz-request-id": "D82B88E5F771F645", + "x-amz-id-2": "vlR7PnpV2Ce81l0PRw6jlUpck7Jo5ZsQjryTjKlc5aLWGVHPZLj5NeC6qMa0emYBDXOo6QBU0Wo=" + }, + "s3": { + "s3SchemaVersion": "1.0", + "configurationId": "828aa6fc-f7b5-4305-8584-487c791949c1", + "bucket": { + "name": "lambda-artifacts-deafc19498e3f2df", + "ownerIdentity": { + "principalId": "A3I5XTEXAMAI3E" + }, + "arn": "arn:aws:s3:::lambda-artifacts-deafc19498e3f2df" + }, + "object": { + "key": "b21b84d653bb07b05b1e6b33684dc11b", + "sequencer": "0C0F6F405D6ED209E1" + } + } + } + ] +} \ No newline at end of file diff --git a/packages/parser/tests/events/s3EventGlacier.json b/packages/parser/tests/events/s3EventGlacier.json new file mode 100644 index 0000000000..2fbc447b30 --- /dev/null +++ b/packages/parser/tests/events/s3EventGlacier.json @@ -0,0 +1,44 @@ +{ + "Records": [ + { + "eventVersion": "2.1", + "eventSource": "aws:s3", + "awsRegion": "us-east-2", + "eventTime": "2019-09-03T19:37:27.192Z", + "eventName": "ObjectCreated:Put", + "userIdentity": { + "principalId": "AWS:AIDAINPONIXQXHT3IKHL2" + }, + "requestParameters": { + "sourceIPAddress": "205.255.255.255" + }, + "responseElements": { + "x-amz-request-id": "D82B88E5F771F645", + "x-amz-id-2": "vlR7PnpV2Ce81l0PRw6jlUpck7Jo5ZsQjryTjKlc5aLWGVHPZLj5NeC6qMa0emYBDXOo6QBU0Wo=" + }, + "s3": { + "s3SchemaVersion": "1.0", + "configurationId": "828aa6fc-f7b5-4305-8584-487c791949c1", + "bucket": { + "name": "lambda-artifacts-deafc19498e3f2df", + "ownerIdentity": { + "principalId": "A3I5XTEXAMAI3E" + }, + "arn": "arn:aws:s3:::lambda-artifacts-deafc19498e3f2df" + }, + "object": { + "key": "b21b84d653bb07b05b1e6b33684dc11b", + "size": 1305107, + "eTag": "b21b84d653bb07b05b1e6b33684dc11b", + "sequencer": "0C0F6F405D6ED209E1" + } + }, + "glacierEventData": { + "restoreEventData": { + "lifecycleRestorationExpiryTime": "1970-01-01T00:01:00.000Z", + "lifecycleRestoreStorageClass": "standard" + } + } + } + ] +} \ No newline at end of file diff --git a/packages/parser/tests/events/s3ObjectEventIAMUser.json b/packages/parser/tests/events/s3ObjectEventIAMUser.json new file mode 100644 index 0000000000..6be41c4352 --- /dev/null +++ b/packages/parser/tests/events/s3ObjectEventIAMUser.json @@ -0,0 +1,30 @@ +{ + "xAmzRequestId": "1a5ed718-5f53-471d-b6fe-5cf62d88d02a", + "getObjectContext": { + "inputS3Url": "https://myap-123412341234.s3-accesspoint.us-east-1.amazonaws.com/s3.txt?X-Amz-Security-Token=...", + "outputRoute": "io-iad-cell001", + "outputToken": "..." + }, + "configuration": { + "accessPointArn": "arn:aws:s3-object-lambda:us-east-1:123412341234:accesspoint/myolap", + "supportingAccessPointArn": "arn:aws:s3:us-east-1:123412341234:accesspoint/myap", + "payload": "test" + }, + "userRequest": { + "url": "/s3.txt", + "headers": { + "Host": "myolap-123412341234.s3-object-lambda.us-east-1.amazonaws.com", + "Accept-Encoding": "identity", + "X-Amz-Content-SHA256": "e3b0c44297fc1c149afbf4c8995fb92427ae41e4649b934ca495991b7852b855" + } + }, + "userIdentity": { + "type": "IAMUser", + "principalId": "...", + "arn": "arn:aws:iam::123412341234:user/myuser", + "accountId": "123412341234", + "accessKeyId": "...", + "userName": "Alice" + }, + "protocolVersion": "1.00" +} diff --git a/packages/parser/tests/events/s3ObjectEventTempCredentials.json b/packages/parser/tests/events/s3ObjectEventTempCredentials.json new file mode 100644 index 0000000000..30c70fe6df --- /dev/null +++ b/packages/parser/tests/events/s3ObjectEventTempCredentials.json @@ -0,0 +1,42 @@ +{ + "xAmzRequestId": "requestId", + "getObjectContext": { + "inputS3Url": "https://my-s3-ap-111122223333.s3-accesspoint.us-east-1.amazonaws.com/example?X-Amz-Security-Token=", + "outputRoute": "io-use1-001", + "outputToken": "OutputToken" + }, + "configuration": { + "accessPointArn": "arn:aws:s3-object-lambda:us-east-1:111122223333:accesspoint/example-object-lambda-ap", + "supportingAccessPointArn": "arn:aws:s3:us-east-1:111122223333:accesspoint/example-ap", + "payload": "{}" + }, + "userRequest": { + "url": "https://object-lambda-111122223333.s3-object-lambda.us-east-1.amazonaws.com/example", + "headers": { + "Host": "object-lambda-111122223333.s3-object-lambda.us-east-1.amazonaws.com", + "Accept-Encoding": "identity", + "X-Amz-Content-SHA256": "e3b0c44298fc1example" + } + }, + "userIdentity": { + "type": "AssumedRole", + "principalId": "principalId", + "arn": "arn:aws:sts::111122223333:assumed-role/Admin/example", + "accountId": "111122223333", + "accessKeyId": "accessKeyId", + "sessionContext": { + "attributes": { + "mfaAuthenticated": "false", + "creationDate": "Wed Mar 10 23:41:52 UTC 2021" + }, + "sessionIssuer": { + "type": "Role", + "principalId": "principalId", + "arn": "arn:aws:iam::111122223333:role/Admin", + "accountId": "111122223333", + "userName": "Admin" + } + } + }, + "protocolVersion": "1.00" +} diff --git a/packages/parser/tests/events/s3SqsEvent.json b/packages/parser/tests/events/s3SqsEvent.json new file mode 100644 index 0000000000..55863af12b --- /dev/null +++ b/packages/parser/tests/events/s3SqsEvent.json @@ -0,0 +1,22 @@ +{ + "Records":[ + { + "messageId":"ca3e7a89-c358-40e5-8aa0-5da01403c267", + "receiptHandle":"AQEBE7XoI7IQRLF7SrpiW9W4BanmOWe8UtVDbv6/CEZYKf/OktSNIb4j689tQfR4k44V/LY20lZ5VpxYt2GTYCsSLKTcBalTJaRX9CKu/hVqy/23sSNiKxnP56D+VLSn+hU275+AP1h4pUL0d9gLdRB2haX8xiM+LcGfis5Jl8BBXtoxKRF60O87O9/NvCmmXLeqkJuexfyEZNyed0fFCRXFXSjbmThG0OIQgcrGI8glBRGPA8htns58VtXFsSaPYNoqP3p5n6+ewKKVLD0lfm+0DlnLKRa+mjvFBaSer9KK1ff+Aq6zJ6HynPwADj+aF70Hwimc2zImYe51SLEF/E2csYlMNZYI/2qXW0m9R7wJ/XDTV4g2+h+BMTxsKnJQ6NQd", + "body":"{\"Records\":[{\"eventVersion\":\"2.1\",\"eventSource\":\"aws:s3\",\"awsRegion\":\"us-east-1\",\"eventTime\":\"2023-04-12T20:43:38.021Z\",\"eventName\":\"ObjectCreated:Put\",\"userIdentity\":{\"principalId\":\"A1YQ72UWCM96UF\"},\"requestParameters\":{\"sourceIPAddress\":\"93.108.161.96\"},\"responseElements\":{\"x-amz-request-id\":\"YMSSR8BZJ2Y99K6P\",\"x-amz-id-2\":\"6ASrUfj5xpn859fIq+6FXflOex/SKl/rjfiMd7wRzMg/zkHKR22PDpnh7KD3uq//cuOTbdX4DInN5eIs+cR0dY1z2Mc5NDP/\"},\"s3\":{\"s3SchemaVersion\":\"1.0\",\"configurationId\":\"SNS\",\"bucket\":{\"name\":\"xxx\",\"ownerIdentity\":{\"principalId\":\"A1YQ72UWCM96UF\"},\"arn\":\"arn:aws:s3:::xxx\"},\"object\":{\"key\":\"test.pdf\",\"size\":104681,\"eTag\":\"2e3ad1e983318bbd8e73b080e2997980\",\"versionId\":\"yd3d4HaWOT2zguDLvIQLU6ptDTwKBnQV\",\"sequencer\":\"00643717F9F8B85354\"}}}]}", + "attributes":{ + "ApproximateReceiveCount":"1", + "SentTimestamp":"1681332219270", + "SenderId":"AIDAJHIPRHEMV73VRJEBU", + "ApproximateFirstReceiveTimestamp":"1681332239270" + }, + "messageAttributes":{ + + }, + "md5OfBody":"16f4460f4477d8d693a5abe94fdbbd73", + "eventSource":"aws:sqs", + "eventSourceARN":"arn:aws:sqs:us-east-1:123456789012:SQS", + "awsRegion":"us-east-1" + } + ] + } diff --git a/packages/parser/tests/events/secretsManagerEvent.json b/packages/parser/tests/events/secretsManagerEvent.json new file mode 100644 index 0000000000..f07ea1e0b0 --- /dev/null +++ b/packages/parser/tests/events/secretsManagerEvent.json @@ -0,0 +1,5 @@ +{ + "SecretId":"arn:aws:secretsmanager:us-west-2:123456789012:secret:MyTestDatabaseSecret-a1b2c3", + "ClientRequestToken":"550e8400-e29b-41d4-a716-446655440000", + "Step":"createSecret" +} \ No newline at end of file diff --git a/packages/parser/tests/events/sesEvent.json b/packages/parser/tests/events/sesEvent.json new file mode 100644 index 0000000000..636ecad687 --- /dev/null +++ b/packages/parser/tests/events/sesEvent.json @@ -0,0 +1,101 @@ +{ + "Records": [ + { + "eventVersion": "1.0", + "ses": { + "mail": { + "commonHeaders": { + "from": [ + "Jane Doe " + ], + "to": [ + "johndoe@example.com" + ], + "returnPath": "janedoe@example.com", + "messageId": "<0123456789example.com>", + "date": "Wed, 7 Oct 2015 12:34:56 -0700", + "subject": "Test Subject" + }, + "source": "janedoe@example.com", + "timestamp": "1970-01-01T00:00:00.000Z", + "destination": [ + "johndoe@example.com" + ], + "headers": [ + { + "name": "Return-Path", + "value": "" + }, + { + "name": "Received", + "value": "from mailer.example.com (mailer.example.com [203.0.113.1]) by ..." + }, + { + "name": "DKIM-Signature", + "value": "v=1; a=rsa-sha256; c=relaxed/relaxed; d=example.com; s=example; ..." + }, + { + "name": "MIME-Version", + "value": "1.0" + }, + { + "name": "From", + "value": "Jane Doe " + }, + { + "name": "Date", + "value": "Wed, 7 Oct 2015 12:34:56 -0700" + }, + { + "name": "Message-ID", + "value": "<0123456789example.com>" + }, + { + "name": "Subject", + "value": "Test Subject" + }, + { + "name": "To", + "value": "johndoe@example.com" + }, + { + "name": "Content-Type", + "value": "text/plain; charset=UTF-8" + } + ], + "headersTruncated": false, + "messageId": "o3vrnil0e2ic28tr" + }, + "receipt": { + "recipients": [ + "johndoe@example.com" + ], + "timestamp": "1970-01-01T00:00:00.000Z", + "spamVerdict": { + "status": "PASS" + }, + "dkimVerdict": { + "status": "PASS" + }, + "dmarcPolicy": "reject", + "processingTimeMillis": 574, + "action": { + "type": "Lambda", + "invocationType": "Event", + "functionArn": "arn:aws:lambda:us-west-2:012345678912:function:Example" + }, + "dmarcVerdict": { + "status": "PASS" + }, + "spfVerdict": { + "status": "PASS" + }, + "virusVerdict": { + "status": "PASS" + } + } + }, + "eventSource": "aws:ses" + } + ] +} diff --git a/packages/parser/tests/events/snsEvent.json b/packages/parser/tests/events/snsEvent.json new file mode 100644 index 0000000000..3d8a8ed443 --- /dev/null +++ b/packages/parser/tests/events/snsEvent.json @@ -0,0 +1,31 @@ +{ + "Records": [ + { + "EventVersion": "1.0", + "EventSubscriptionArn": "arn:aws:sns:us-east-2:123456789012:sns-la ...", + "EventSource": "aws:sns", + "Sns": { + "SignatureVersion": "1", + "Timestamp": "2019-01-02T12:45:07.000Z", + "Signature": "tcc6faL2yUC6dgZdmrwh1Y4cGa/ebXEkAi6RibDsvpi+tE/1+82j...65r==", + "SigningCertUrl": "https://sns.us-east-2.amazonaws.com/SimpleNotification", + "MessageId": "95df01b4-ee98-5cb9-9903-4c221d41eb5e", + "Message": "Hello from SNS!", + "MessageAttributes": { + "Test": { + "Type": "String", + "Value": "TestString" + }, + "TestBinary": { + "Type": "Binary", + "Value": "TestBinary" + } + }, + "Type": "Notification", + "UnsubscribeUrl": "https://sns.us-east-2.amazonaws.com/?Action=Unsubscribe", + "TopicArn": "arn:aws:sns:us-east-2:123456789012:sns-lambda", + "Subject": "TestInvoke" + } + } + ] +} \ No newline at end of file diff --git a/packages/parser/tests/events/snsSqsEvent.json b/packages/parser/tests/events/snsSqsEvent.json new file mode 100644 index 0000000000..ee440fc296 --- /dev/null +++ b/packages/parser/tests/events/snsSqsEvent.json @@ -0,0 +1,20 @@ +{ + "Records": [ + { + "messageId": "79406a00-bf15-46ca-978c-22c3613fcb30", + "receiptHandle": "AQEB3fkqlBqq239bMCAHIr5mZkxJYKtxsTTy1lMImmpY7zqpQdfcAE8zFiuRh7X5ciROy24taT2rRXfuJFN/yEUVcQ6d5CIOCEK4htmRJJOHIyGdZPAm2NUUG5nNn2aEzgfzVvrkPBsrCbr7XTzK5s6eUZNH/Nn9AJtHKHpzweRK34Bon9OU/mvyIT7EJbwHPsdhL14NrCp8pLWBiIhkaJkG2G6gPO89dwHtGVUARJL+zP70AuIu/f7QgmPtY2eeE4AVbcUT1qaIlSGHUXxoHq/VMHLd/c4zWl0EXQOo/90DbyCUMejTIKL7N15YfkHoQDHprvMiAr9S75cdMiNOduiHzZLg/qVcv4kxsksKLFMKjwlzmYuQYy2KslVGwoHMd4PD", + "body": "{\n \"Type\" : \"Notification\",\n \"MessageId\" : \"d88d4479-6ec0-54fe-b63f-1cf9df4bb16e\",\n \"TopicArn\" : \"arn:aws:sns:eu-west-1:231436140809:powertools265\",\n \"Message\" : \"{\\\"message\\\": \\\"hello world\\\", \\\"username\\\": \\\"lessa\\\"}\",\n \"Timestamp\" : \"2021-01-19T10:07:07.287Z\",\n \"SignatureVersion\" : \"1\",\n \"Signature\" : \"tEo2i6Lw6/Dr7Jdlulh0sXgnkF0idd3hqs8QZCorQpzkIWVOuu583NT0Gv0epuZD1Bo+tex6NgP5p6415yNVujGHJKnkrA9ztzXaVgFiol8rf8AFGQbmb7RsM9BqATQUJeg9nCTe0jksmWXmjxEFr8XKyyRuQBwSlRTngAvOw8jUnCe1vyYD5xPec1xpfOEGLi5BqSog+6tBtsry3oAtcENX8SV1tVuMpp6D+UrrU8xNT/5D70uRDppkPE3vq+t7rR0fVSdQRdUV9KmQD2bflA1Dyb2y37EzwJOMHDDQ82aOhj/JmPxvEAlV8RkZl6J0HIveraRy9wbNLbI7jpiOCw==\",\n \"SigningCertURL\" : \"https://sns.eu-west-1.amazonaws.com/SimpleNotificationService-010a507c1833636cd94bdb98bd93083a.pem\",\n \"UnsubscribeURL\" : \"https://sns.eu-west-1.amazonaws.com/?Action=Unsubscribe&SubscriptionArn=arn:aws:sns:eu-west-1:231436140809:powertools265:15189ad7-870e-40e5-a7dd-a48898cd9f86\"\n}", + "attributes": { + "ApproximateReceiveCount": "1", + "SentTimestamp": "1611050827340", + "SenderId": "AIDAISMY7JYY5F7RTT6AO", + "ApproximateFirstReceiveTimestamp": "1611050827344" + }, + "messageAttributes": {}, + "md5OfBody": "8910bdaaf9a30a607f7891037d4af0b0", + "eventSource": "aws:sqs", + "eventSourceARN": "arn:aws:sqs:eu-west-1:231436140809:powertools265", + "awsRegion": "eu-west-1" + } + ] +} diff --git a/packages/parser/tests/events/snsSqsFifoEvent.json b/packages/parser/tests/events/snsSqsFifoEvent.json new file mode 100644 index 0000000000..6c23ef6294 --- /dev/null +++ b/packages/parser/tests/events/snsSqsFifoEvent.json @@ -0,0 +1,23 @@ +{ + "Records": [ + { + "messageId": "69bc4bbd-ed69-4325-a434-85c3b428ceab", + "receiptHandle": "AQEBbfAqjhrgIdW3HGWYPz57mdDatG/dT9LZhRPAsNQ1pJmw495w4esDc8ZSbOwMZuPBol7wtiNWug8U25GpSQDDLY1qv//8/lfmdzXOiprG6xRVeiXSHj0j731rJQ3xo+GPdGjOzjIxI09CrE3HtZ4lpXY9NjjHzP8hdxkCLlbttumc8hDBUR365/Tk+GfV2nNP9qvZtLGEbKCdTm/GYdTSoAr+ML9HnnGrS9T25Md71ASiZMI4DZqptN6g7CYYojFPs1LVM9o1258ferA72zbNoQ==", + "body": "{\n \"Type\" : \"Notification\",\n \"MessageId\" : \"a7c9d2fa-77fa-5184-9de9-89391027cc7d\",\n \"SequenceNumber\" : \"10000000000000004000\",\n \"TopicArn\" : \"arn:aws:sns:eu-west-1:231436140809:Test.fifo\",\n \"Message\" : \"{\\\"message\\\": \\\"hello world\\\", \\\"username\\\": \\\"lessa\\\"}\",\n \"Timestamp\" : \"2022-10-14T13:35:25.419Z\",\n \"UnsubscribeURL\" : \"https://sns.eu-west-1.amazonaws.com/?Action=Unsubscribe&SubscriptionArn=arn:aws:sns:eu-west-1:231436140809:Test.fifo:bb81d3de-a0f9-46e4-b619-d3152a4d545f\"\n}", + "attributes": { + "ApproximateReceiveCount": "1", + "SentTimestamp": "1665754525442", + "SequenceNumber": "18873177232222703872", + "MessageGroupId": "powertools-test", + "SenderId": "AIDAWYJAWPFU7SUQGUJC6", + "MessageDeduplicationId": "4e0a0f61eed277a4b9e4c01d5722b07b0725e42fe782102abee5711adfac701f", + "ApproximateFirstReceiveTimestamp": "1665754525442" + }, + "messageAttributes": {}, + "md5OfBody": "f3c788e623445e3feb263e80c1bffc0b", + "eventSource": "aws:sqs", + "eventSourceARN": "arn:aws:sqs:eu-west-1:231436140809:Test.fifo", + "awsRegion": "eu-west-1" + } + ] +} \ No newline at end of file diff --git a/packages/parser/tests/events/sqsEvent.json b/packages/parser/tests/events/sqsEvent.json new file mode 100644 index 0000000000..2bfcd1c7b8 --- /dev/null +++ b/packages/parser/tests/events/sqsEvent.json @@ -0,0 +1,42 @@ +{ + "Records": [ + { + "messageId": "059f36b4-87a3-44ab-83d2-661975830a7d", + "receiptHandle": "AQEBwJnKyrHigUMZj6rYigCgxlaS3SLy0a...", + "body": "Test message.", + "attributes": { + "ApproximateReceiveCount": "1", + "SentTimestamp": "1545082649183", + "SenderId": "AIDAIENQZJOLO23YVJ4VO", + "ApproximateFirstReceiveTimestamp": "1545082649185" + }, + "messageAttributes": { + "testAttr": { + "stringValue": "100", + "binaryValue": "base64Str", + "dataType": "Number" + } + }, + "md5OfBody": "e4e68fb7bd0e697a0ae8f1bb342846b3", + "eventSource": "aws:sqs", + "eventSourceARN": "arn:aws:sqs:us-east-2:123456789012:my-queue", + "awsRegion": "us-east-2" + }, + { + "messageId": "2e1424d4-f796-459a-8184-9c92662be6da", + "receiptHandle": "AQEBzWwaftRI0KuVm4tP+/7q1rGgNqicHq...", + "body": "{\"message\": \"foo1\"}", + "attributes": { + "ApproximateReceiveCount": "1", + "SentTimestamp": "1545082650636", + "SenderId": "AIDAIENQZJOLO23YVJ4VO", + "ApproximateFirstReceiveTimestamp": "1545082650649" + }, + "messageAttributes": {}, + "md5OfBody": "e4e68fb7bd0e697a0ae8f1bb342846b3", + "eventSource": "aws:sqs", + "eventSourceARN": "arn:aws:sqs:us-east-2:123456789012:my-queue", + "awsRegion": "us-east-2" + } + ] +} diff --git a/packages/parser/tests/events/vpcLatticeEvent.json b/packages/parser/tests/events/vpcLatticeEvent.json new file mode 100644 index 0000000000..936bfb22d1 --- /dev/null +++ b/packages/parser/tests/events/vpcLatticeEvent.json @@ -0,0 +1,15 @@ +{ + "raw_path": "/testpath", + "method": "GET", + "headers": { + "user_agent": "curl/7.64.1", + "x-forwarded-for": "10.213.229.10", + "host": "test-lambda-service-3908sdf9u3u.dkfjd93.vpc-lattice-svcs.us-east-2.on.aws", + "accept": "*/*" + }, + "query_string_parameters": { + "order-id": "1" + }, + "body": "eyJ0ZXN0IjogImV2ZW50In0=", + "is_base64_encoded": true +} diff --git a/packages/parser/tests/events/vpcLatticeEventPathTrailingSlash.json b/packages/parser/tests/events/vpcLatticeEventPathTrailingSlash.json new file mode 100644 index 0000000000..7f6c0cfd9a --- /dev/null +++ b/packages/parser/tests/events/vpcLatticeEventPathTrailingSlash.json @@ -0,0 +1,15 @@ +{ + "raw_path": "/testpath/", + "method": "GET", + "headers": { + "user_agent": "curl/7.64.1", + "x-forwarded-for": "10.213.229.10", + "host": "test-lambda-service-3908sdf9u3u.dkfjd93.vpc-lattice-svcs.us-east-2.on.aws", + "accept": "*/*" + }, + "query_string_parameters": { + "order-id": "1" + }, + "body": "eyJ0ZXN0IjogImV2ZW50In0=", + "is_base64_encoded": true +} diff --git a/packages/parser/tests/events/vpcLatticeEventV2PathTrailingSlash.json b/packages/parser/tests/events/vpcLatticeEventV2PathTrailingSlash.json new file mode 100644 index 0000000000..a9f0188852 --- /dev/null +++ b/packages/parser/tests/events/vpcLatticeEventV2PathTrailingSlash.json @@ -0,0 +1,30 @@ +{ + "version": "2.0", + "path": "/newpath/", + "method": "GET", + "headers": { + "user_agent": "curl/7.64.1", + "x-forwarded-for": "10.213.229.10", + "host": "test-lambda-service-3908sdf9u3u.dkfjd93.vpc-lattice-svcs.us-east-2.on.aws", + "accept": "*/*" + }, + "queryStringParameters": { + "order-id": "1" + }, + "body": "{\"message\": \"Hello from Lambda!\"}", + "isBase64Encoded": false, + "requestContext": { + "serviceNetworkArn": "arn:aws:vpc-lattice:us-east-2:123456789012:servicenetwork/sn-0bf3f2882e9cc805a", + "serviceArn": "arn:aws:vpc-lattice:us-east-2:123456789012:service/svc-0a40eebed65f8d69c", + "targetGroupArn": "arn:aws:vpc-lattice:us-east-2:123456789012:targetgroup/tg-6d0ecf831eec9f09", + "identity": { + "sourceVpcArn": "arn:aws:ec2:region:123456789012:vpc/vpc-0b8276c84697e7339", + "type" : "AWS_IAM", + "principal": "arn:aws:sts::123456789012:assumed-role/example-role/057d00f8b51257ba3c853a0f248943cf", + "sessionName": "057d00f8b51257ba3c853a0f248943cf", + "x509SanDns": "example.com" + }, + "region": "us-east-2", + "timeEpoch": "1696331543569073" + } +} diff --git a/packages/parser/tests/events/vpcLatticeV2Event.json b/packages/parser/tests/events/vpcLatticeV2Event.json new file mode 100644 index 0000000000..fe10d83a3a --- /dev/null +++ b/packages/parser/tests/events/vpcLatticeV2Event.json @@ -0,0 +1,30 @@ +{ + "version": "2.0", + "path": "/newpath", + "method": "GET", + "headers": { + "user_agent": "curl/7.64.1", + "x-forwarded-for": "10.213.229.10", + "host": "test-lambda-service-3908sdf9u3u.dkfjd93.vpc-lattice-svcs.us-east-2.on.aws", + "accept": "*/*" + }, + "queryStringParameters": { + "order-id": "1" + }, + "body": "{\"message\": \"Hello from Lambda!\"}", + "isBase64Encoded": false, + "requestContext": { + "serviceNetworkArn": "arn:aws:vpc-lattice:us-east-2:123456789012:servicenetwork/sn-0bf3f2882e9cc805a", + "serviceArn": "arn:aws:vpc-lattice:us-east-2:123456789012:service/svc-0a40eebed65f8d69c", + "targetGroupArn": "arn:aws:vpc-lattice:us-east-2:123456789012:targetgroup/tg-6d0ecf831eec9f09", + "identity": { + "sourceVpcArn": "arn:aws:ec2:region:123456789012:vpc/vpc-0b8276c84697e7339", + "type" : "AWS_IAM", + "principal": "arn:aws:sts::123456789012:assumed-role/example-role/057d00f8b51257ba3c853a0f248943cf", + "sessionName": "057d00f8b51257ba3c853a0f248943cf", + "x509SanDns": "example.com" + }, + "region": "us-east-2", + "timeEpoch": "1696331543569073" + } +} diff --git a/packages/parser/tests/tsconfig.json b/packages/parser/tests/tsconfig.json new file mode 100644 index 0000000000..dc4ebdfc5f --- /dev/null +++ b/packages/parser/tests/tsconfig.json @@ -0,0 +1,11 @@ +{ + "extends": "../tsconfig.json", + "compilerOptions": { + "rootDir": "../", + "noEmit": true + }, + "include": [ + "../src/**/*", + "./**/*.*" + ] +} \ No newline at end of file diff --git a/packages/parser/tests/unit/schema/alb.test.ts b/packages/parser/tests/unit/schema/alb.test.ts new file mode 100644 index 0000000000..5e9144582e --- /dev/null +++ b/packages/parser/tests/unit/schema/alb.test.ts @@ -0,0 +1,33 @@ +/** + * Test built in schema + * + * @group unit/parser/schema/ + */ +import { + AlbSchema, + AlbMultiValueHeadersSchema, +} from '../../../src/schemas/alb.js'; +import { loadExampleEvent } from './utils.js'; + +describe('ALB ', () => { + it('should parse alb event', () => { + const albEvent = loadExampleEvent('albEvent.json'); + expect(AlbSchema.parse(albEvent)).toEqual(albEvent); + }); + it('should parse alb event path trailing slash', () => { + const albEventPathTrailingSlash = loadExampleEvent( + 'albEventPathTrailingSlash.json' + ); + expect(AlbSchema.parse(albEventPathTrailingSlash)).toEqual( + albEventPathTrailingSlash + ); + }); + it('should parse alb event with multi value headers event', () => { + const albMultiValueHeadersEvent = loadExampleEvent( + 'albMultiValueHeadersEvent.json' + ); + expect(AlbMultiValueHeadersSchema.parse(albMultiValueHeadersEvent)).toEqual( + albMultiValueHeadersEvent + ); + }); +}); diff --git a/packages/parser/tests/unit/schema/apigw.test.ts b/packages/parser/tests/unit/schema/apigw.test.ts new file mode 100644 index 0000000000..9aa23c6694 --- /dev/null +++ b/packages/parser/tests/unit/schema/apigw.test.ts @@ -0,0 +1,102 @@ +/** + * Test built in schema + * + * @group unit/parser/schema/ + */ + +import { loadExampleEvent } from './utils.js'; +import { APIGatewayProxyEventSchema } from '../../../src/schemas/apigw.js'; + +describe('APIGateway ', () => { + it('should parse api gateway event', () => { + const apiGatewayProxyEvent = loadExampleEvent('apiGatewayProxyEvent.json'); + expect(APIGatewayProxyEventSchema.parse(apiGatewayProxyEvent)).toEqual( + apiGatewayProxyEvent + ); + }); + it('should parse api gateway authorizer request event', () => { + const apiGatewayAuthorizerRequestEvent = loadExampleEvent( + 'apiGatewayAuthorizerRequestEvent.json' + ); + expect( + APIGatewayProxyEventSchema.parse(apiGatewayAuthorizerRequestEvent) + ).toEqual(apiGatewayAuthorizerRequestEvent); + }); + it('should parse schema middleware invalid event', () => { + const apiGatewaySchemaMiddlewareInvalidEvent = loadExampleEvent( + 'apiGatewaySchemaMiddlewareInvalidEvent.json' + ); + expect( + APIGatewayProxyEventSchema.parse(apiGatewaySchemaMiddlewareInvalidEvent) + ).toEqual(apiGatewaySchemaMiddlewareInvalidEvent); + }); + it('should parse schema middleware valid event', () => { + const apiGatewaySchemaMiddlewareValidEvent = loadExampleEvent( + 'apiGatewaySchemaMiddlewareValidEvent.json' + ); + expect( + APIGatewayProxyEventSchema.parse(apiGatewaySchemaMiddlewareValidEvent) + ).toEqual(apiGatewaySchemaMiddlewareValidEvent); + }); + it('should parse proxy event with no version auth', () => { + const apiGatewayProxyEvent_noVersionAuth = loadExampleEvent( + 'apiGatewayProxyEvent_noVersionAuth.json' + ); + expect( + APIGatewayProxyEventSchema.parse(apiGatewayProxyEvent_noVersionAuth) + ).toEqual(apiGatewayProxyEvent_noVersionAuth); + }); + it('should parse proxy event with another path', () => { + const apiGatewayProxyEventAnotherPath = loadExampleEvent( + 'apiGatewayProxyEventAnotherPath.json' + ); + expect( + APIGatewayProxyEventSchema.parse(apiGatewayProxyEventAnotherPath) + ).toEqual(apiGatewayProxyEventAnotherPath); + }); + it('should parse proxy event with path trailing slash', () => { + const apiGatewayProxyEventPathTrailingSlash = loadExampleEvent( + 'apiGatewayProxyEventPathTrailingSlash.json' + ); + expect( + APIGatewayProxyEventSchema.parse(apiGatewayProxyEventPathTrailingSlash) + ).toEqual(apiGatewayProxyEventPathTrailingSlash); + }); + it('should parse other proxy event', () => { + const apiGatewayProxyOtherEvent = loadExampleEvent( + 'apiGatewayProxyOtherEvent.json' + ); + expect(APIGatewayProxyEventSchema.parse(apiGatewayProxyOtherEvent)).toEqual( + apiGatewayProxyOtherEvent + ); + }); + it('should throw error when event is not a valid proxy event', () => { + const event = { + resource: '/', + path: '/', + httpMethod: 'GET', + headers: {}, + multiValueHeaders: {}, + isBase64Encoded: false, + body: 'Foo!', + requestContext: { + accountId: '1234', + apiId: 'myApi', + httpMethod: 'GET', + identity: { + sourceIp: '127.0.0.1', + }, + path: '/', + protocol: 'Https', + requestId: '1234', + requestTime: '2018-09-07T16:20:46Z', + requestTimeEpoch: 1536992496000, + resourcePath: '/', + stage: 'test', + eventType: 'DISCONNECT', + messageId: 'messageId', + }, + }; + expect(() => APIGatewayProxyEventSchema.parse(event)).toThrow(); + }); +}); diff --git a/packages/parser/tests/unit/schema/apigwv2.test.ts b/packages/parser/tests/unit/schema/apigwv2.test.ts new file mode 100644 index 0000000000..85ac2da1a2 --- /dev/null +++ b/packages/parser/tests/unit/schema/apigwv2.test.ts @@ -0,0 +1,71 @@ +/** + * Test built in schema + * + * @group unit/parser/schema/ + */ + +import { loadExampleEvent } from './utils.js'; +import { APIGatewayProxyEventV2Schema } from '../../../src/schemas/apigwv2.js'; + +describe('API GW v2 ', () => { + it('should parse api gateway v2 event', () => { + const apiGatewayProxyV2Event = loadExampleEvent( + 'apiGatewayProxyV2Event.json' + ); + expect(APIGatewayProxyEventV2Schema.parse(apiGatewayProxyV2Event)).toEqual( + apiGatewayProxyV2Event + ); + }); + it('should parse api gateway v2 event with GET method', () => { + const apiGatewayProxyV2Event_GET = loadExampleEvent( + 'apiGatewayProxyV2Event_GET.json' + ); + expect( + APIGatewayProxyEventV2Schema.parse(apiGatewayProxyV2Event_GET) + ).toEqual(apiGatewayProxyV2Event_GET); + }); + it('should parse api gateway v2 event with path trailing slash', () => { + const apiGatewayProxyV2EventPathTrailingSlash = loadExampleEvent( + 'apiGatewayProxyV2EventPathTrailingSlash.json' + ); + expect( + APIGatewayProxyEventV2Schema.parse( + apiGatewayProxyV2EventPathTrailingSlash + ) + ).toEqual(apiGatewayProxyV2EventPathTrailingSlash); + }); + it('should parse api gateway v2 event with iam', () => { + const apiGatewayProxyV2IamEvent = loadExampleEvent( + 'apiGatewayProxyV2IamEvent.json' + ); + expect( + APIGatewayProxyEventV2Schema.parse(apiGatewayProxyV2IamEvent) + ).toEqual(apiGatewayProxyV2IamEvent); + }); + it('should parse api gateway v2 event with lambda authorizer', () => { + const apiGatewayProxyV2LambdaAuthorizerEvent = loadExampleEvent( + 'apiGatewayProxyV2LambdaAuthorizerEvent.json' + ); + expect( + APIGatewayProxyEventV2Schema.parse(apiGatewayProxyV2LambdaAuthorizerEvent) + ).toEqual(apiGatewayProxyV2LambdaAuthorizerEvent); + }); + it('should parse api gateway v2 event with other get event', () => { + const apiGatewayProxyV2OtherGetEvent = loadExampleEvent( + 'apiGatewayProxyV2OtherGetEvent.json' + ); + expect( + APIGatewayProxyEventV2Schema.parse(apiGatewayProxyV2OtherGetEvent) + ).toEqual(apiGatewayProxyV2OtherGetEvent); + }); + it('should parse api gateway v2 event with schema middleware', () => { + const apiGatewayProxyV2SchemaMiddlewareValidEvent = loadExampleEvent( + 'apiGatewayProxyV2SchemaMiddlewareValidEvent.json' + ); + expect( + APIGatewayProxyEventV2Schema.parse( + apiGatewayProxyV2SchemaMiddlewareValidEvent + ) + ).toEqual(apiGatewayProxyV2SchemaMiddlewareValidEvent); + }); +}); diff --git a/packages/parser/tests/unit/schema/cloudformation-custom-resource.test.ts b/packages/parser/tests/unit/schema/cloudformation-custom-resource.test.ts new file mode 100644 index 0000000000..66ec61680d --- /dev/null +++ b/packages/parser/tests/unit/schema/cloudformation-custom-resource.test.ts @@ -0,0 +1,45 @@ +/** + * Test built in schema + * + * @group unit/parser/schema/ + */ + +import { loadExampleEvent } from './utils.js'; +import { + CloudFormationCustomResourceCreateSchema, + CloudFormationCustomResourceUpdateSchema, + CloudFormationCustomResourceDeleteSchema, +} from '../../../src/schemas/cloudformation-custom-resource.js'; + +describe('CloudFormationCustomResource ', () => { + it('should parse create event', () => { + const cloudFormationCustomResourceCreateEvent = loadExampleEvent( + 'cloudFormationCustomResourceCreateEvent.json' + ); + expect( + CloudFormationCustomResourceCreateSchema.parse( + cloudFormationCustomResourceCreateEvent + ) + ).toEqual(cloudFormationCustomResourceCreateEvent); + }); + it('should parse update event', () => { + const cloudFormationCustomResourceUpdateEvent = loadExampleEvent( + 'cloudFormationCustomResourceUpdateEvent.json' + ); + expect( + CloudFormationCustomResourceUpdateSchema.parse( + cloudFormationCustomResourceUpdateEvent + ) + ).toEqual(cloudFormationCustomResourceUpdateEvent); + }); + it('should parse delete event', () => { + const cloudFormationCustomResourceDeleteEvent = loadExampleEvent( + 'cloudFormationCustomResourceDeleteEvent.json' + ); + expect( + CloudFormationCustomResourceDeleteSchema.parse( + cloudFormationCustomResourceDeleteEvent + ) + ).toEqual(cloudFormationCustomResourceDeleteEvent); + }); +}); diff --git a/packages/parser/tests/unit/schema/cloudwatch.test.ts b/packages/parser/tests/unit/schema/cloudwatch.test.ts new file mode 100644 index 0000000000..a978030de2 --- /dev/null +++ b/packages/parser/tests/unit/schema/cloudwatch.test.ts @@ -0,0 +1,30 @@ +/** + * Test built in schema + * + * @group unit/parser/schema/ + */ + +import { loadExampleEvent } from './utils.js'; +import { CloudWatchLogsSchema } from '../../../src/schemas/cloudwatch.js'; + +describe('CloudWatchLogs ', () => { + it('should parse cloudwatch logs event', () => { + const cloudWatchLogEvent = loadExampleEvent('cloudWatchLogEvent.json'); + const parsed = CloudWatchLogsSchema.parse(cloudWatchLogEvent); + expect(parsed.awslogs.data).toBeDefined(); + expect(parsed.awslogs.data?.logEvents[0]).toEqual({ + id: 'eventId1', + timestamp: 1440442987000, + message: '[ERROR] First test message', + }); + }); + it('should throw error if cloudwatch logs event is invalid', () => { + expect(() => + CloudWatchLogsSchema.parse({ + awslogs: { + data: 'invalid', + }, + }) + ).toThrowError(); + }); +}); diff --git a/packages/parser/tests/unit/schema/dynamodb.test.ts b/packages/parser/tests/unit/schema/dynamodb.test.ts new file mode 100644 index 0000000000..b152c07b72 --- /dev/null +++ b/packages/parser/tests/unit/schema/dynamodb.test.ts @@ -0,0 +1,17 @@ +/** + * Test built in schema + * + * @group unit/parser/schema/ + */ + +import { DynamoDBStreamSchema } from '../../../src/schemas/dynamodb.js'; +import { loadExampleEvent } from './utils.js'; + +describe('DynamoDB ', () => { + const dynamoStreamEvent = loadExampleEvent('dynamoStreamEvent.json'); + it('should parse a stream of records', () => { + expect(DynamoDBStreamSchema.parse(dynamoStreamEvent)).toEqual( + dynamoStreamEvent + ); + }); +}); diff --git a/packages/parser/tests/unit/schema/eventbridge.test.ts b/packages/parser/tests/unit/schema/eventbridge.test.ts new file mode 100644 index 0000000000..e92bd2248f --- /dev/null +++ b/packages/parser/tests/unit/schema/eventbridge.test.ts @@ -0,0 +1,15 @@ +/** + * Test built in schema + * + * @group unit/parser/schema/ + */ + +import { loadExampleEvent } from './utils.js'; +import { EventBridgeSchema } from '../../../src/schemas/eventbridge.js'; + +describe('EventBridge ', () => { + it('should parse eventbridge event', () => { + const eventBridgeEvent = loadExampleEvent('eventBridgeEvent.json'); + expect(EventBridgeSchema.parse(eventBridgeEvent)).toEqual(eventBridgeEvent); + }); +}); diff --git a/packages/parser/tests/unit/schema/kafka.test.ts b/packages/parser/tests/unit/schema/kafka.test.ts new file mode 100644 index 0000000000..3b2bc50b83 --- /dev/null +++ b/packages/parser/tests/unit/schema/kafka.test.ts @@ -0,0 +1,63 @@ +/** + * Test built in schema + * + * @group unit/parser/schema/ + */ + +import { loadExampleEvent } from './utils.js'; +import { + KafkaMskEventSchema, + KafkaSelfManagedEventSchema, +} from '../../../src/schemas/kafka.js'; + +describe('Kafka ', () => { + const expectedTestEvent = { + key: 'recordKey', + value: JSON.stringify({ key: 'value' }), + partition: 0, + topic: 'mytopic', + offset: 15, + timestamp: 1545084650987, + timestampType: 'CREATE_TIME', + headers: [ + { + headerKey: 'headerValue', + }, + ], + }; + it('should parse kafka MSK event', () => { + const kafkaEventMsk = loadExampleEvent('kafkaEventMsk.json'); + expect( + KafkaMskEventSchema.parse(kafkaEventMsk).records['mytopic-0'][0] + ).toEqual(expectedTestEvent); + }); + it('should parse kafka self managed event', () => { + const kafkaEventSelfManaged = loadExampleEvent( + 'kafkaEventSelfManaged.json' + ); + expect( + KafkaSelfManagedEventSchema.parse(kafkaEventSelfManaged).records[ + 'mytopic-0' + ][0] + ).toEqual(expectedTestEvent); + }); + it('should transform bootstrapServers to array', () => { + const kafkaEventSelfManaged = loadExampleEvent( + 'kafkaEventSelfManaged.json' + ); + expect( + KafkaSelfManagedEventSchema.parse(kafkaEventSelfManaged).bootstrapServers + ).toEqual([ + 'b-2.demo-cluster-1.a1bcde.c1.kafka.us-east-1.amazonaws.com:9092', + 'b-1.demo-cluster-1.a1bcde.c1.kafka.us-east-1.amazonaws.com:9092', + ]); + }); + it('should return undefined if bootstrapServers is not present', () => { + const kafkaEventSelfManaged = loadExampleEvent( + 'kafkaEventSelfManaged.json' + ) as { bootstrapServers: string }; + kafkaEventSelfManaged.bootstrapServers = ''; + const parsed = KafkaSelfManagedEventSchema.parse(kafkaEventSelfManaged); + expect(parsed.bootstrapServers).toBeUndefined(); + }); +}); diff --git a/packages/parser/tests/unit/schema/kinesis.test.ts b/packages/parser/tests/unit/schema/kinesis.test.ts new file mode 100644 index 0000000000..99fc5eebc4 --- /dev/null +++ b/packages/parser/tests/unit/schema/kinesis.test.ts @@ -0,0 +1,90 @@ +/** + * Test built in schema + * + * @group unit/parser/schema/ + */ + +import { loadExampleEvent } from './utils.js'; +import { KinesisDataStreamSchema } from '../../../src/schemas/kinesis.js'; +import { + KinesisFirehoseSchema, + KinesisFirehoseSqsSchema, +} from '../../../src/schemas/kinesis-firehose.js'; +import { extractCloudWatchLogFromEvent } from '../../../src/schemas/cloudwatch.js'; + +describe('Kinesis ', () => { + it('should parse kinesis event', () => { + const kinesisStreamEvent = loadExampleEvent('kinesisStreamEvent.json'); + const parsed = KinesisDataStreamSchema.parse(kinesisStreamEvent); + const decodedData = Buffer.from( + parsed.Records[0].kinesis.data, + 'base64' + ).toString('utf8'); + expect(decodedData).toEqual('Hello, this is a test.'); + }); + it('should parse single kinesis record', () => { + const kinesisStreamEventOneRecord = loadExampleEvent( + 'kinesisStreamEventOneRecord.json' + ); + const parsed = KinesisDataStreamSchema.parse(kinesisStreamEventOneRecord); + const decodedJson = JSON.parse( + Buffer.from(parsed.Records[0].kinesis.data, 'base64').toString('utf8') + ); + expect(decodedJson).toEqual({ + message: 'test message', + username: 'test', + }); + }); + it('should parse Firehose event', () => { + const kinesisFirehoseKinesisEvent = loadExampleEvent( + 'kinesisFirehoseKinesisEvent.json' + ); + const parsed = KinesisFirehoseSchema.parse(kinesisFirehoseKinesisEvent); + expect(parsed.records[0].data).toEqual('Hello World'); + }); + it('should parse Kinesis Firehose PutEvents event', () => { + const kinesisFirehosePutEvent = loadExampleEvent( + 'kinesisFirehosePutEvent.json' + ); + const parsed = KinesisFirehoseSchema.parse(kinesisFirehosePutEvent); + expect(JSON.parse(parsed.records[1].data)).toEqual({ + Hello: 'World', + }); + }); + it('should parse Firehose event with SQS event', () => { + const kinesisFirehoseSQSEvent = loadExampleEvent( + 'kinesisFirehoseSQSEvent.json' + ); + const parsed = KinesisFirehoseSqsSchema.parse(kinesisFirehoseSQSEvent); + expect(parsed.records[0].data).toMatchObject({ + messageId: '5ab807d4-5644-4c55-97a3-47396635ac74', + body: 'Test message.', + }); + }); + it('should parse Firehose event with CloudWatch event', () => { + const kinesisStreamCloudWatchLogsEvent = loadExampleEvent( + 'kinesisStreamCloudWatchLogsEvent.json' + ); + const parsed = KinesisDataStreamSchema.parse( + kinesisStreamCloudWatchLogsEvent + ); + + const jsonParsed = extractCloudWatchLogFromEvent( + parsed.Records[0].kinesis.data + ); + expect(jsonParsed).toMatchObject({ + messageType: 'DATA_MESSAGE', + owner: '231436140809', + logGroup: '/aws/lambda/pt-1488-DummyLogDataFunction-gnWXPvL6jJyG', + logStream: '2022/11/10/[$LATEST]26b6a45d574f442ea28438923cbf7bf7', + }); + }); + it('should return original value if cannot parse KinesisFirehoseSqsRecord', () => { + const kinesisFirehoseSQSEvent = loadExampleEvent( + 'kinesisFirehoseSQSEvent.json' + ) as { records: { data: string }[] }; + kinesisFirehoseSQSEvent.records[0].data = 'not a valid json'; + const parsed = KinesisFirehoseSqsSchema.parse(kinesisFirehoseSQSEvent); + expect(parsed.records[0].data).toEqual('not a valid json'); + }); +}); diff --git a/packages/parser/tests/unit/schema/lambda.test.ts b/packages/parser/tests/unit/schema/lambda.test.ts new file mode 100644 index 0000000000..459cd8a32e --- /dev/null +++ b/packages/parser/tests/unit/schema/lambda.test.ts @@ -0,0 +1,19 @@ +/** + * Test built in schema + * + * @group unit/parser/schema/ + */ + +import { loadExampleEvent } from './utils.js'; +import { LambdaFunctionUrlSchema } from '../../../src/schemas/lambda.js'; + +describe('Lambda ', () => { + it('should parse lambda event', () => { + const lambdaFunctionUrlEvent = loadExampleEvent( + 'apiGatewayProxyV2Event.json' + ); + expect(LambdaFunctionUrlSchema.parse(lambdaFunctionUrlEvent)).toEqual( + lambdaFunctionUrlEvent + ); + }); +}); diff --git a/packages/parser/tests/unit/schema/s3.test.ts b/packages/parser/tests/unit/schema/s3.test.ts new file mode 100644 index 0000000000..2c5378fdf7 --- /dev/null +++ b/packages/parser/tests/unit/schema/s3.test.ts @@ -0,0 +1,105 @@ +/** + * Test built in schema + * + * @group unit/parser/schema/ + */ + +import { + S3EventNotificationEventBridgeSchema, + S3SqsEventNotificationSchema, + S3Schema, + S3ObjectLambdaEventSchema, +} from '../../../src/schemas/s3.js'; +import { loadExampleEvent } from './utils.js'; + +describe('S3 ', () => { + it('should parse s3 event', () => { + const s3Event = loadExampleEvent('s3Event.json'); + expect(S3Schema.parse(s3Event)).toEqual(s3Event); + }); + + it('should parse s3 event bridge notification event created', () => { + const s3EventBridgeNotificationObjectCreatedEvent = loadExampleEvent( + 's3EventBridgeNotificationObjectCreatedEvent.json' + ); + expect( + S3EventNotificationEventBridgeSchema.parse( + s3EventBridgeNotificationObjectCreatedEvent + ) + ).toEqual(s3EventBridgeNotificationObjectCreatedEvent); + }); + + it('should parse s3 event bridge notification event detelted', () => { + const s3EventBridgeNotificationObjectDeletedEvent = loadExampleEvent( + 's3EventBridgeNotificationObjectDeletedEvent.json' + ); + expect( + S3EventNotificationEventBridgeSchema.parse( + s3EventBridgeNotificationObjectDeletedEvent + ) + ).toEqual(s3EventBridgeNotificationObjectDeletedEvent); + }); + it('should parse s3 event bridge notification event expired', () => { + const s3EventBridgeNotificationObjectExpiredEvent = loadExampleEvent( + 's3EventBridgeNotificationObjectExpiredEvent.json' + ); + expect( + S3EventNotificationEventBridgeSchema.parse( + s3EventBridgeNotificationObjectExpiredEvent + ) + ).toEqual(s3EventBridgeNotificationObjectExpiredEvent); + }); + + it('should parse s3 sqs notification event', () => { + const s3SqsEvent = loadExampleEvent('s3SqsEvent.json'); + expect(S3SqsEventNotificationSchema.parse(s3SqsEvent)).toEqual(s3SqsEvent); + }); + + it('should parse s3 event with decoded key', () => { + const s3EventDecodedKey = loadExampleEvent('s3EventDecodedKey.json'); + expect(S3Schema.parse(s3EventDecodedKey)).toEqual(s3EventDecodedKey); + }); + + it('should parse s3 event delete object', () => { + const s3EventDeleteObject = loadExampleEvent('s3EventDeleteObject.json'); + expect(S3Schema.parse(s3EventDeleteObject)).toEqual(s3EventDeleteObject); + }); + + it('should parse s3 event glacier', () => { + const s3EventGlacier = loadExampleEvent('s3EventGlacier.json'); + expect(S3Schema.parse(s3EventGlacier)).toEqual(s3EventGlacier); + }); + + it('should parse s3 object event iam user', () => { + const s3ObjectEventIAMUser = loadExampleEvent('s3ObjectEventIAMUser.json'); + expect(S3ObjectLambdaEventSchema.parse(s3ObjectEventIAMUser)).toEqual( + s3ObjectEventIAMUser + ); + }); + + it('should parse s3 object event temp credentials', () => { + // ignore any because we don't want typed json + const s3ObjectEventTempCredentials = loadExampleEvent( + 's3ObjectEventTempCredentials.json' + ) as any; // eslint-disable-line @typescript-eslint/no-explicit-any + const parsed = S3ObjectLambdaEventSchema.parse( + s3ObjectEventTempCredentials + ); + + expect(parsed.userRequest).toEqual( + s3ObjectEventTempCredentials.userRequest + ); + expect(parsed.getObjectContext).toEqual( + s3ObjectEventTempCredentials.getObjectContext + ); + expect(parsed.configuration).toEqual( + s3ObjectEventTempCredentials.configuration + ); + expect(parsed.userRequest).toEqual( + s3ObjectEventTempCredentials.userRequest + ); + expect( + parsed.userIdentity?.sessionContext?.attributes.mfaAuthenticated + ).toEqual(false); + }); +}); diff --git a/packages/parser/tests/unit/schema/ses.test.ts b/packages/parser/tests/unit/schema/ses.test.ts new file mode 100644 index 0000000000..eeb29f6a1b --- /dev/null +++ b/packages/parser/tests/unit/schema/ses.test.ts @@ -0,0 +1,15 @@ +/** + * Test built in schema + * + * @group unit/parser/schema/ + */ + +import { loadExampleEvent } from './utils.js'; +import { SesSchema } from '../../../src/schemas/ses.js'; + +describe('Schema:', () => { + const sesEvent = loadExampleEvent('sesEvent.json'); + it('SES should parse ses event', () => { + expect(SesSchema.parse(sesEvent)).toEqual(sesEvent); + }); +}); diff --git a/packages/parser/tests/unit/schema/sns.test.ts b/packages/parser/tests/unit/schema/sns.test.ts new file mode 100644 index 0000000000..66ec7aa297 --- /dev/null +++ b/packages/parser/tests/unit/schema/sns.test.ts @@ -0,0 +1,15 @@ +/** + * Test built in schema + * + * @group unit/parser/schema/ + */ + +import { loadExampleEvent } from './utils.js'; +import { SnsSchema } from '../../../src/schemas/sns.js'; + +describe('Schema:', () => { + const snsEvent = loadExampleEvent('snsEvent.json'); + it('SNS should parse sns event', () => { + expect(SnsSchema.parse(snsEvent)).toEqual(snsEvent); + }); +}); diff --git a/packages/parser/tests/unit/schema/sqs.test.ts b/packages/parser/tests/unit/schema/sqs.test.ts new file mode 100644 index 0000000000..191b843298 --- /dev/null +++ b/packages/parser/tests/unit/schema/sqs.test.ts @@ -0,0 +1,15 @@ +/** + * Test built in schema + * + * @group unit/parser/schema/ + */ + +import { loadExampleEvent } from './utils.js'; +import { SqsSchema } from '../../../src/schemas/sqs.js'; + +describe('SQS ', () => { + const sqsEvent = loadExampleEvent('sqsEvent.json'); + it('should parse sqs event', () => { + expect(SqsSchema.parse(sqsEvent)).toEqual(sqsEvent); + }); +}); diff --git a/packages/parser/tests/unit/schema/utils.ts b/packages/parser/tests/unit/schema/utils.ts new file mode 100644 index 0000000000..8101dfefdb --- /dev/null +++ b/packages/parser/tests/unit/schema/utils.ts @@ -0,0 +1,7 @@ +import { readFileSync } from 'node:fs'; + +export const loadExampleEvent = (fileName: string): unknown => { + const event = readFileSync(`./tests/events/${fileName}`, 'utf8'); + + return JSON.parse(event); +}; diff --git a/packages/parser/tests/unit/schema/vpc-lattice.test.ts b/packages/parser/tests/unit/schema/vpc-lattice.test.ts new file mode 100644 index 0000000000..ea0a0dd4a4 --- /dev/null +++ b/packages/parser/tests/unit/schema/vpc-lattice.test.ts @@ -0,0 +1,23 @@ +/** + * Test built in schema + * + * @group unit/parser/schema/ + */ + +import { loadExampleEvent } from './utils.js'; +import { VpcLatticeSchema } from '../../../src/schemas/vpc-lattice.js'; + +describe('VPC Lattice ', () => { + it('should parse vpc lattice event', () => { + const vpcLatticeEvent = loadExampleEvent('vpcLatticeEvent.json'); + expect(VpcLatticeSchema.parse(vpcLatticeEvent)).toEqual(vpcLatticeEvent); + }); + it('should parse vpc lattice path trailing slash event', () => { + const vpcLatticeEventPathTrailingSlash = loadExampleEvent( + 'vpcLatticeEventPathTrailingSlash.json' + ); + expect(VpcLatticeSchema.parse(vpcLatticeEventPathTrailingSlash)).toEqual( + vpcLatticeEventPathTrailingSlash + ); + }); +}); diff --git a/packages/parser/tests/unit/schema/vpc-latticev2.test.ts b/packages/parser/tests/unit/schema/vpc-latticev2.test.ts new file mode 100644 index 0000000000..da6d7d885e --- /dev/null +++ b/packages/parser/tests/unit/schema/vpc-latticev2.test.ts @@ -0,0 +1,24 @@ +/** + * Test built in schema + * + * @group unit/parser/schema/ + */ + +import { loadExampleEvent } from './utils.js'; +import { VpcLatticeV2Schema } from '../../../src/schemas/vpc-latticev2.js'; + +describe('VpcLatticeV2 ', () => { + it('should parse VpcLatticeV2 event', () => { + const vpcLatticeV2Event = loadExampleEvent('vpcLatticeV2Event.json'); + const parsed = VpcLatticeV2Schema.parse(vpcLatticeV2Event); + expect(parsed).toEqual(vpcLatticeV2Event); + }); + + it('should parse VpcLatticeV2PathTrailingSlash event', () => { + const vpcLatticeEventV2PathTrailingSlash = loadExampleEvent( + 'vpcLatticeEventV2PathTrailingSlash.json' + ); + const parsed = VpcLatticeV2Schema.parse(vpcLatticeEventV2PathTrailingSlash); + expect(parsed).toEqual(vpcLatticeEventV2PathTrailingSlash); + }); +}); diff --git a/packages/parser/tsconfig.esm.json b/packages/parser/tsconfig.esm.json new file mode 100644 index 0000000000..123291b0cf --- /dev/null +++ b/packages/parser/tsconfig.esm.json @@ -0,0 +1,12 @@ +{ + "extends": "../../tsconfig.esm.json", + "compilerOptions": { + "baseUrl": ".", + "outDir": "./lib/esm", + "rootDir": "./src", + "tsBuildInfoFile": ".tsbuildinfo/esm.json" + }, + "include": [ + "./src/**/*" + ] +} \ No newline at end of file diff --git a/packages/parser/tsconfig.json b/packages/parser/tsconfig.json index a62acd2a00..92aecd7c98 100644 --- a/packages/parser/tsconfig.json +++ b/packages/parser/tsconfig.json @@ -1,8 +1,9 @@ { "extends": "../../tsconfig.json", "compilerOptions": { - "outDir": "./lib", + "outDir": "./lib/cjs/", "rootDir": "./src", + "tsBuildInfoFile": ".tsbuildinfo/cjs.json" }, "include": [ "./src/**/*" diff --git a/tsconfig.json b/tsconfig.json index 08d5af9848..0042e92513 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -44,5 +44,8 @@ { "path": "./packages/testing" }, + { + "path": "./packages/parser" + } ] } \ No newline at end of file From ce9f8a1c74c00547847441b765086f341ea7aa5d Mon Sep 17 00:00:00 2001 From: Alexander Schueren Date: Tue, 19 Dec 2023 14:12:09 +0100 Subject: [PATCH 50/60] feat(parser): add schema envelopes (#1815) * first envelope * add abstract class * add tests * add more tests * fix tests * add envelopes * add middy parser * minor schema changes * add more envelopes and tests, refactored utils to autocomplete event files * simplified check * remove middleware from this branch * refactored from class to function envelopes * removed parser tests, should be in another branch * add parser to pre push * consistent naming --- .husky/pre-push | 3 +- package-lock.json | 66 +++++++++- packages/parser/package.json | 7 +- packages/parser/src/envelopes/apigw.ts | 18 +++ packages/parser/src/envelopes/apigwv2.ts | 18 +++ packages/parser/src/envelopes/cloudwatch.ts | 23 ++++ packages/parser/src/envelopes/dynamodb.ts | 28 +++++ packages/parser/src/envelopes/envelope.ts | 23 ++++ packages/parser/src/envelopes/eventbridge.ts | 13 ++ packages/parser/src/envelopes/kafka.ts | 39 ++++++ .../parser/src/envelopes/kinesis-firehose.ts | 26 ++++ packages/parser/src/envelopes/kinesis.ts | 24 ++++ packages/parser/src/envelopes/lambda.ts | 18 +++ packages/parser/src/envelopes/sns.ts | 50 ++++++++ packages/parser/src/envelopes/sqs.ts | 23 ++++ packages/parser/src/envelopes/vpc-lattice.ts | 15 +++ .../parser/src/envelopes/vpc-latticev2.ts | 15 +++ packages/parser/src/schemas/cloudwatch.ts | 8 +- packages/parser/src/schemas/kafka.ts | 2 +- packages/parser/src/schemas/kinesis.ts | 26 +++- packages/parser/src/schemas/sns.ts | 20 ++- packages/parser/src/types/index.ts | 0 packages/parser/src/types/schema.ts | 17 +++ .../tests/unit/envelopes/apigwt.test.ts | 29 +++++ .../tests/unit/envelopes/apigwv2.test.ts | 30 +++++ .../tests/unit/envelopes/cloudwatch.test.ts | 63 ++++++++++ .../tests/unit/envelopes/dynamodb.test.ts | 43 +++++++ .../tests/unit/envelopes/eventbridge.test.ts | 51 ++++++++ .../parser/tests/unit/envelopes/kafka.test.ts | 39 ++++++ .../unit/envelopes/kinesis-firehose.test.ts | 55 +++++++++ .../tests/unit/envelopes/kinesis.test.ts | 26 ++++ .../tests/unit/envelopes/lambda.test.ts | 30 +++++ .../parser/tests/unit/envelopes/sns.test.ts | 51 ++++++++ .../parser/tests/unit/envelopes/sqs.test.ts | 45 +++++++ .../tests/unit/envelopes/vpc-lattice.test.ts | 38 ++++++ .../unit/envelopes/vpc-latticev2.test.ts | 38 ++++++ packages/parser/tests/unit/schema/alb.test.ts | 13 +- .../parser/tests/unit/schema/apigw.test.ts | 44 ++++--- .../parser/tests/unit/schema/apigwv2.test.ts | 40 +++--- .../cloudformation-custom-resource.test.ts | 20 +-- .../tests/unit/schema/cloudwatch.test.ts | 4 +- .../parser/tests/unit/schema/dynamodb.test.ts | 4 +- .../tests/unit/schema/eventbridge.test.ts | 5 +- .../parser/tests/unit/schema/kafka.test.ts | 22 ++-- .../parser/tests/unit/schema/kinesis.test.ts | 52 +++----- .../parser/tests/unit/schema/lambda.test.ts | 7 +- packages/parser/tests/unit/schema/s3.test.ts | 38 +++--- packages/parser/tests/unit/schema/ses.test.ts | 4 +- packages/parser/tests/unit/schema/sns.test.ts | 4 +- packages/parser/tests/unit/schema/sqs.test.ts | 4 +- packages/parser/tests/unit/schema/utils.ts | 115 +++++++++++++++++- .../tests/unit/schema/vpc-lattice.test.ts | 9 +- .../tests/unit/schema/vpc-latticev2.test.ts | 9 +- 53 files changed, 1241 insertions(+), 173 deletions(-) create mode 100644 packages/parser/src/envelopes/apigw.ts create mode 100644 packages/parser/src/envelopes/apigwv2.ts create mode 100644 packages/parser/src/envelopes/cloudwatch.ts create mode 100644 packages/parser/src/envelopes/dynamodb.ts create mode 100644 packages/parser/src/envelopes/envelope.ts create mode 100644 packages/parser/src/envelopes/eventbridge.ts create mode 100644 packages/parser/src/envelopes/kafka.ts create mode 100644 packages/parser/src/envelopes/kinesis-firehose.ts create mode 100644 packages/parser/src/envelopes/kinesis.ts create mode 100644 packages/parser/src/envelopes/lambda.ts create mode 100644 packages/parser/src/envelopes/sns.ts create mode 100644 packages/parser/src/envelopes/sqs.ts create mode 100644 packages/parser/src/envelopes/vpc-lattice.ts create mode 100644 packages/parser/src/envelopes/vpc-latticev2.ts create mode 100644 packages/parser/src/types/index.ts create mode 100644 packages/parser/src/types/schema.ts create mode 100644 packages/parser/tests/unit/envelopes/apigwt.test.ts create mode 100644 packages/parser/tests/unit/envelopes/apigwv2.test.ts create mode 100644 packages/parser/tests/unit/envelopes/cloudwatch.test.ts create mode 100644 packages/parser/tests/unit/envelopes/dynamodb.test.ts create mode 100644 packages/parser/tests/unit/envelopes/eventbridge.test.ts create mode 100644 packages/parser/tests/unit/envelopes/kafka.test.ts create mode 100644 packages/parser/tests/unit/envelopes/kinesis-firehose.test.ts create mode 100644 packages/parser/tests/unit/envelopes/kinesis.test.ts create mode 100644 packages/parser/tests/unit/envelopes/lambda.test.ts create mode 100644 packages/parser/tests/unit/envelopes/sns.test.ts create mode 100644 packages/parser/tests/unit/envelopes/sqs.test.ts create mode 100644 packages/parser/tests/unit/envelopes/vpc-lattice.test.ts create mode 100644 packages/parser/tests/unit/envelopes/vpc-latticev2.test.ts diff --git a/.husky/pre-push b/.husky/pre-push index 3b6d564252..b5f55642f9 100755 --- a/.husky/pre-push +++ b/.husky/pre-push @@ -7,4 +7,5 @@ npm t \ -w packages/metrics \ -w packages/tracer \ -w packages/idempotency \ - -w packages/parameters \ No newline at end of file + -w packages/parameters \ + -w packages/parser \ No newline at end of file diff --git a/package-lock.json b/package-lock.json index 2b28ed8c51..07b8a5b164 100644 --- a/package-lock.json +++ b/package-lock.json @@ -196,6 +196,19 @@ "node": ">=6.0.0" } }, + "node_modules/@anatine/zod-mock": { + "version": "3.13.3", + "resolved": "https://registry.npmjs.org/@anatine/zod-mock/-/zod-mock-3.13.3.tgz", + "integrity": "sha512-AN+0YEFE7s6BpuALQHhEoVmJmD+0gPnf4Fehc6oE5NHbM3X2ZD5fW5M6vvot29NWUB6nxvj0gu+BPQ9cVnxALw==", + "dev": true, + "dependencies": { + "randexp": "^0.5.3" + }, + "peerDependencies": { + "@faker-js/faker": "^7.0.0 || ^8.0.0", + "zod": "^3.21.4" + } + }, "node_modules/@aws-cdk/asset-awscli-v1": { "version": "2.2.200", "resolved": "https://registry.npmjs.org/@aws-cdk/asset-awscli-v1/-/asset-awscli-v1-2.2.200.tgz", @@ -2291,6 +2304,22 @@ "node": "^12.22.0 || ^14.17.0 || >=16.0.0" } }, + "node_modules/@faker-js/faker": { + "version": "8.3.1", + "resolved": "https://registry.npmjs.org/@faker-js/faker/-/faker-8.3.1.tgz", + "integrity": "sha512-FdgpFxY6V6rLZE9mmIBb9hM0xpfvQOSNOLnzolzKwsE1DH+gC7lEKV1p1IbR0lAYyvYd5a4u3qWJzowUkw1bIw==", + "dev": true, + "funding": [ + { + "type": "opencollective", + "url": "https://opencollective.com/fakerjs" + } + ], + "engines": { + "node": "^14.17.0 || ^16.13.0 || >=18.0.0", + "npm": ">=6.14.13" + } + }, "node_modules/@humanwhocodes/config-array": { "version": "0.11.11", "resolved": "https://registry.npmjs.org/@humanwhocodes/config-array/-/config-array-0.11.11.tgz", @@ -7597,6 +7626,15 @@ "node": ">=12" } }, + "node_modules/drange": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/drange/-/drange-1.1.1.tgz", + "integrity": "sha512-pYxfDYpued//QpnLIm4Avk7rsNtAtQkUES2cwAYSvD/wd2pKD71gN2Ebj3e7klzXwjocvE8c5vx/1fxwpqmSxA==", + "dev": true, + "engines": { + "node": ">=4" + } + }, "node_modules/duplexer": { "version": "0.1.2", "resolved": "https://registry.npmjs.org/duplexer/-/duplexer-0.1.2.tgz", @@ -14053,6 +14091,19 @@ "node": ">=8" } }, + "node_modules/randexp": { + "version": "0.5.3", + "resolved": "https://registry.npmjs.org/randexp/-/randexp-0.5.3.tgz", + "integrity": "sha512-U+5l2KrcMNOUPYvazA3h5ekF80FHTUG+87SEAmHZmolh1M+i/WyTCxVzmi+tidIa1tM4BSe8g2Y/D3loWDjj+w==", + "dev": true, + "dependencies": { + "drange": "^1.0.2", + "ret": "^0.2.0" + }, + "engines": { + "node": ">=4" + } + }, "node_modules/react-is": { "version": "18.2.0", "resolved": "https://registry.npmjs.org/react-is/-/react-is-18.2.0.tgz", @@ -14545,6 +14596,15 @@ "node": ">=8" } }, + "node_modules/ret": { + "version": "0.2.2", + "resolved": "https://registry.npmjs.org/ret/-/ret-0.2.2.tgz", + "integrity": "sha512-M0b3YWQs7R3Z917WRQy1HHA7Ba7D8hvZg6UE5mLykJxQVE2ju0IXbGlaHPPlkY+WN7wFP+wUMXmBFA0aV6vYGQ==", + "dev": true, + "engines": { + "node": ">=4" + } + }, "node_modules/retry": { "version": "0.12.0", "resolved": "https://registry.npmjs.org/retry/-/retry-0.12.0.tgz", @@ -16763,8 +16823,12 @@ "name": "@aws-lambda-powertools/parser", "version": "0.0.0", "license": "MIT-0", + "devDependencies": { + "@anatine/zod-mock": "^3.13.3", + "@faker-js/faker": "^8.3.1" + }, "peerDependencies": { - "zod": "^3.22.4" + "zod": ">=3.x" } }, "packages/testing": { diff --git a/packages/parser/package.json b/packages/parser/package.json index 6dd191ca17..fb4b54fe51 100644 --- a/packages/parser/package.json +++ b/packages/parser/package.json @@ -60,8 +60,11 @@ "serverless", "nodejs" ], - "peerDependencies": { "zod": ">=3.x" + }, + "devDependencies": { + "@anatine/zod-mock": "^3.13.3", + "@faker-js/faker": "^8.3.1" } -} \ No newline at end of file +} diff --git a/packages/parser/src/envelopes/apigw.ts b/packages/parser/src/envelopes/apigw.ts new file mode 100644 index 0000000000..49d094b405 --- /dev/null +++ b/packages/parser/src/envelopes/apigw.ts @@ -0,0 +1,18 @@ +import { parse } from './envelope.js'; +import { z, ZodSchema } from 'zod'; +import { APIGatewayProxyEventSchema } from '../schemas/apigw.js'; + +/** + * API Gateway envelope to extract data within body key + */ +export const apiGatewayEnvelope = ( + data: unknown, + schema: T +): z.infer => { + const parsedEnvelope = APIGatewayProxyEventSchema.parse(data); + if (!parsedEnvelope.body) { + throw new Error('Body field of API Gateway event is undefined'); + } + + return parse(parsedEnvelope.body, schema); +}; diff --git a/packages/parser/src/envelopes/apigwv2.ts b/packages/parser/src/envelopes/apigwv2.ts new file mode 100644 index 0000000000..decadfcc57 --- /dev/null +++ b/packages/parser/src/envelopes/apigwv2.ts @@ -0,0 +1,18 @@ +import { parse } from './envelope.js'; +import { z, ZodSchema } from 'zod'; +import { APIGatewayProxyEventV2Schema } from '../schemas/apigwv2.js'; + +/** + * API Gateway V2 envelope to extract data within body key + */ +export const apiGatewayV2Envelope = ( + data: unknown, + schema: T +): z.infer => { + const parsedEnvelope = APIGatewayProxyEventV2Schema.parse(data); + if (!parsedEnvelope.body) { + throw new Error('Body field of API Gateway event is undefined'); + } + + return parse(parsedEnvelope.body, schema); +}; diff --git a/packages/parser/src/envelopes/cloudwatch.ts b/packages/parser/src/envelopes/cloudwatch.ts new file mode 100644 index 0000000000..848e7ab070 --- /dev/null +++ b/packages/parser/src/envelopes/cloudwatch.ts @@ -0,0 +1,23 @@ +import { parse } from './envelope.js'; +import { z, ZodSchema } from 'zod'; +import { CloudWatchLogsSchema } from '../schemas/cloudwatch.js'; + +/** + * CloudWatch Envelope to extract a List of log records. + * + * The record's body parameter is a string (after being base64 decoded and gzipped), + * though it can also be a JSON encoded string. + * Regardless of its type it'll be parsed into a BaseModel object. + * + * Note: The record will be parsed the same way so if model is str + */ +export const cloudWatchEnvelope = ( + data: unknown, + schema: T +): z.infer => { + const parsedEnvelope = CloudWatchLogsSchema.parse(data); + + return parsedEnvelope.awslogs.data.logEvents.map((record) => { + return parse(record.message, schema); + }); +}; diff --git a/packages/parser/src/envelopes/dynamodb.ts b/packages/parser/src/envelopes/dynamodb.ts new file mode 100644 index 0000000000..bb378b2d0b --- /dev/null +++ b/packages/parser/src/envelopes/dynamodb.ts @@ -0,0 +1,28 @@ +import { parse } from './envelope.js'; +import { z, ZodSchema } from 'zod'; +import { DynamoDBStreamSchema } from '../schemas/dynamodb.js'; + +type DynamoDBStreamEnvelopeResponse = { + NewImage: z.infer; + OldImage: z.infer; +}; + +/** + * DynamoDB Stream Envelope to extract data within NewImage/OldImage + * + * Note: Values are the parsed models. Images' values can also be None, and + * length of the list is the record's amount in the original event. + */ +export const dynamoDDStreamEnvelope = ( + data: unknown, + schema: T +): DynamoDBStreamEnvelopeResponse[] => { + const parsedEnvelope = DynamoDBStreamSchema.parse(data); + + return parsedEnvelope.Records.map((record) => { + return { + NewImage: parse(record.dynamodb.NewImage, schema), + OldImage: parse(record.dynamodb.OldImage, schema), + }; + }); +}; diff --git a/packages/parser/src/envelopes/envelope.ts b/packages/parser/src/envelopes/envelope.ts new file mode 100644 index 0000000000..4c2dd9570d --- /dev/null +++ b/packages/parser/src/envelopes/envelope.ts @@ -0,0 +1,23 @@ +import { z, ZodSchema } from 'zod'; + +/** + * Abstract function to parse the content of the envelope using provided schema. + * Both inputs are provided as unknown by the user. + * We expect the data to be either string that can be parsed to json or object. + * @internal + * @param data data to parse + * @param schema schema + */ +export const parse = ( + data: unknown, + schema: T +): z.infer[] => { + if (typeof data === 'string') { + return schema.parse(JSON.parse(data)); + } else if (typeof data === 'object') { + return schema.parse(data); + } else + throw new Error( + `Invalid data type for envelope. Expected string or object, got ${typeof data}` + ); +}; diff --git a/packages/parser/src/envelopes/eventbridge.ts b/packages/parser/src/envelopes/eventbridge.ts new file mode 100644 index 0000000000..4484635348 --- /dev/null +++ b/packages/parser/src/envelopes/eventbridge.ts @@ -0,0 +1,13 @@ +import { parse } from './envelope.js'; +import { z, ZodSchema } from 'zod'; +import { EventBridgeSchema } from '../schemas/eventbridge.js'; + +/** + * Envelope for EventBridge schema that extracts and parses data from the `detail` key. + */ +export const eventBridgeEnvelope = ( + data: unknown, + schema: T +): z.infer => { + return parse(EventBridgeSchema.parse(data).detail, schema); +}; diff --git a/packages/parser/src/envelopes/kafka.ts b/packages/parser/src/envelopes/kafka.ts new file mode 100644 index 0000000000..32529d4255 --- /dev/null +++ b/packages/parser/src/envelopes/kafka.ts @@ -0,0 +1,39 @@ +import { z, ZodSchema } from 'zod'; +import { parse } from './envelope.js'; +import { + KafkaMskEventSchema, + KafkaSelfManagedEventSchema, +} from '../schemas/kafka.js'; +import { type KafkaRecord } from '../types/schema.js'; + +/** + * Kafka event envelope to extract data within body key + * The record's body parameter is a string, though it can also be a JSON encoded string. + * Regardless of its type it'll be parsed into a BaseModel object. + * + * Note: Records will be parsed the same way so if model is str, + * all items in the list will be parsed as str and not as JSON (and vice versa) + */ +export const kafkaEnvelope = ( + data: unknown, + schema: T +): z.infer => { + // manually fetch event source to deside between Msk or SelfManaged + + // eslint-disable-next-line @typescript-eslint/ban-ts-comment + // @ts-ignore + const eventSource = data['eventSource']; + + const parsedEnvelope: + | z.infer + | z.infer = + eventSource === 'aws:kafka' + ? KafkaMskEventSchema.parse(data) + : KafkaSelfManagedEventSchema.parse(data); + + return Object.values(parsedEnvelope.records).map((topicRecord) => { + return topicRecord.map((record: KafkaRecord) => { + return parse(record.value, schema); + }); + }); +}; diff --git a/packages/parser/src/envelopes/kinesis-firehose.ts b/packages/parser/src/envelopes/kinesis-firehose.ts new file mode 100644 index 0000000000..e51ae47a12 --- /dev/null +++ b/packages/parser/src/envelopes/kinesis-firehose.ts @@ -0,0 +1,26 @@ +import { parse } from './envelope.js'; +import { z, ZodSchema } from 'zod'; +import { KinesisFirehoseSchema } from '../schemas/kinesis-firehose.js'; + +/** + * Kinesis Firehose Envelope to extract array of Records + * + * The record's data parameter is a base64 encoded string which is parsed into a bytes array, + * though it can also be a JSON encoded string. + * Regardless of its type it'll be parsed into a BaseModel object. + * + * Note: Records will be parsed the same way so if model is str, + * all items in the list will be parsed as str and not as JSON (and vice versa) + * + * https://docs.aws.amazon.com/lambda/latest/dg/services-kinesisfirehose.html + */ +export const kinesisFirehoseEnvelope = ( + data: unknown, + schema: T +): z.infer => { + const parsedEnvelope = KinesisFirehoseSchema.parse(data); + + return parsedEnvelope.records.map((record) => { + return parse(record.data, schema); + }); +}; diff --git a/packages/parser/src/envelopes/kinesis.ts b/packages/parser/src/envelopes/kinesis.ts new file mode 100644 index 0000000000..311223042d --- /dev/null +++ b/packages/parser/src/envelopes/kinesis.ts @@ -0,0 +1,24 @@ +import { parse } from './envelope.js'; +import { z, ZodSchema } from 'zod'; +import { KinesisDataStreamSchema } from '../schemas/kinesis.js'; + +/** + * Kinesis Data Stream Envelope to extract array of Records + * + * The record's data parameter is a base64 encoded string which is parsed into a bytes array, + * though it can also be a JSON encoded string. + * Regardless of its type it'll be parsed into a BaseModel object. + * + * Note: Records will be parsed the same way so if model is str, + * all items in the list will be parsed as str and not as JSON (and vice versa) + */ +export const kinesisEnvelope = ( + data: unknown, + schema: T +): z.infer => { + const parsedEnvelope = KinesisDataStreamSchema.parse(data); + + return parsedEnvelope.Records.map((record) => { + return parse(record.kinesis.data, schema); + }); +}; diff --git a/packages/parser/src/envelopes/lambda.ts b/packages/parser/src/envelopes/lambda.ts new file mode 100644 index 0000000000..3ac1f2b8c6 --- /dev/null +++ b/packages/parser/src/envelopes/lambda.ts @@ -0,0 +1,18 @@ +import { parse } from './envelope.js'; +import { z, ZodSchema } from 'zod'; +import { LambdaFunctionUrlSchema } from '../schemas/lambda.js'; + +/** + * Lambda function URL envelope to extract data within body key + */ +export const lambdaFunctionUrlEnvelope = ( + data: unknown, + schema: T +): z.infer => { + const parsedEnvelope = LambdaFunctionUrlSchema.parse(data); + if (!parsedEnvelope.body) { + throw new Error('Body field of Lambda function URL event is undefined'); + } + + return parse(parsedEnvelope.body, schema); +}; diff --git a/packages/parser/src/envelopes/sns.ts b/packages/parser/src/envelopes/sns.ts new file mode 100644 index 0000000000..3e897a00a8 --- /dev/null +++ b/packages/parser/src/envelopes/sns.ts @@ -0,0 +1,50 @@ +import { z, ZodSchema } from 'zod'; +import { parse } from './envelope.js'; +import { SnsSchema, SnsSqsNotificationSchema } from '../schemas/sns.js'; +import { SqsSchema } from '../schemas/sqs.js'; + +/** + * SNS Envelope to extract array of Records + * + * The record's body parameter is a string, though it can also be a JSON encoded string. + * Regardless of its type it'll be parsed into a BaseModel object. + * + * Note: Records will be parsed the same way so if model is str, + * all items in the list will be parsed as str and npt as JSON (and vice versa) + */ +export const snsEnvelope = ( + data: unknown, + schema: T +): z.infer => { + const parsedEnvelope = SnsSchema.parse(data); + + return parsedEnvelope.Records.map((record) => { + return parse(record.Sns.Message, schema); + }); +}; + +/** + * SNS plus SQS Envelope to extract array of Records + * + * Published messages from SNS to SQS has a slightly different payload. + * Since SNS payload is marshalled into `Record` key in SQS, we have to: + * + * 1. Parse SQS schema with incoming data + * 2. Unmarshall SNS payload and parse against SNS Notification schema not SNS/SNS Record + * 3. Finally, parse provided model against payload extracted + * + */ +export const snsSqsEnvelope = ( + data: unknown, + schema: T +): z.infer => { + const parsedEnvelope = SqsSchema.parse(data); + + return parsedEnvelope.Records.map((record) => { + const snsNotification = SnsSqsNotificationSchema.parse( + JSON.parse(record.body) + ); + + return parse(snsNotification.Message, schema); + }); +}; diff --git a/packages/parser/src/envelopes/sqs.ts b/packages/parser/src/envelopes/sqs.ts new file mode 100644 index 0000000000..2757663a95 --- /dev/null +++ b/packages/parser/src/envelopes/sqs.ts @@ -0,0 +1,23 @@ +import { z, ZodSchema } from 'zod'; +import { SqsSchema } from '../schemas/sqs.js'; +import { parse } from './envelope.js'; + +/** + * SQS Envelope to extract array of Records + * + * The record's body parameter is a string, though it can also be a JSON encoded string. + * Regardless of its type it'll be parsed into a BaseModel object. + * + * Note: Records will be parsed the same way so if model is str, + * all items in the list will be parsed as str and npt as JSON (and vice versa) + */ +export const sqsEnvelope = ( + data: unknown, + schema: T +): z.infer => { + const parsedEnvelope = SqsSchema.parse(data); + + return parsedEnvelope.Records.map((record) => { + return parse(record.body, schema); + }); +}; diff --git a/packages/parser/src/envelopes/vpc-lattice.ts b/packages/parser/src/envelopes/vpc-lattice.ts new file mode 100644 index 0000000000..03d2998757 --- /dev/null +++ b/packages/parser/src/envelopes/vpc-lattice.ts @@ -0,0 +1,15 @@ +import { parse } from './envelope.js'; +import { z, ZodSchema } from 'zod'; +import { VpcLatticeSchema } from '../schemas/vpc-lattice.js'; + +/** + * Amazon VPC Lattice envelope to extract data within body key + */ +export const vpcLatticeEnvelope = ( + data: unknown, + schema: T +): z.infer => { + const parsedEnvelope = VpcLatticeSchema.parse(data); + + return parse(parsedEnvelope.body, schema); +}; diff --git a/packages/parser/src/envelopes/vpc-latticev2.ts b/packages/parser/src/envelopes/vpc-latticev2.ts new file mode 100644 index 0000000000..a3fa4389c0 --- /dev/null +++ b/packages/parser/src/envelopes/vpc-latticev2.ts @@ -0,0 +1,15 @@ +import { parse } from './envelope.js'; +import { z, ZodSchema } from 'zod'; +import { VpcLatticeV2Schema } from '../schemas/vpc-latticev2.js'; + +/** + * Amazon VPC Lattice envelope to extract data within body key + */ +export const vpcLatticeV2Envelope = ( + data: unknown, + schema: T +): z.infer => { + const parsedEnvelope = VpcLatticeV2Schema.parse(data); + + return parse(parsedEnvelope.body, schema); +}; diff --git a/packages/parser/src/schemas/cloudwatch.ts b/packages/parser/src/schemas/cloudwatch.ts index 8c9e71f9a0..2694507b04 100644 --- a/packages/parser/src/schemas/cloudwatch.ts +++ b/packages/parser/src/schemas/cloudwatch.ts @@ -30,15 +30,9 @@ const CloudWatchLogsSchema = z.object({ }), }); -const extractCloudWatchLogFromEvent = ( - data: string -): z.infer => { - return decompressRecordToJSON(data); -}; - export { CloudWatchLogsSchema, CloudWatchLogsDecodeSchema, decompressRecordToJSON, - extractCloudWatchLogFromEvent, + CloudWatchLogEventSchema, }; diff --git a/packages/parser/src/schemas/kafka.ts b/packages/parser/src/schemas/kafka.ts index 880fb404d8..08bd5d03ab 100644 --- a/packages/parser/src/schemas/kafka.ts +++ b/packages/parser/src/schemas/kafka.ts @@ -41,4 +41,4 @@ const KafkaMskEventSchema = KafkaBaseEventSchema.extend({ eventSourceArn: z.string(), }); -export { KafkaSelfManagedEventSchema, KafkaMskEventSchema }; +export { KafkaSelfManagedEventSchema, KafkaMskEventSchema, KafkaRecordSchema }; diff --git a/packages/parser/src/schemas/kinesis.ts b/packages/parser/src/schemas/kinesis.ts index d598715420..fbd734297e 100644 --- a/packages/parser/src/schemas/kinesis.ts +++ b/packages/parser/src/schemas/kinesis.ts @@ -1,13 +1,31 @@ import { z } from 'zod'; +import { gunzipSync } from 'node:zlib'; const KinesisDataStreamRecordPayload = z.object({ kinesisSchemaVersion: z.string(), partitionKey: z.string(), sequenceNumber: z.string(), approximateArrivalTimestamp: z.number(), - data: z.string(), + data: z.string().transform((data) => { + const decompresed = decompress(data); + const decoded = Buffer.from(data, 'base64').toString('utf-8'); + try { + // If data was not compressed, try to parse it as JSON otherwise it must be string + return decompresed === data ? JSON.parse(decoded) : decompresed; + } catch (e) { + return decoded; + } + }), }); +const decompress = (data: string): string => { + try { + return JSON.parse(gunzipSync(Buffer.from(data, 'base64')).toString('utf8')); + } catch (e) { + return data; + } +}; + const KinesisDataStreamRecord = z.object({ eventSource: z.literal('aws:kinesis'), eventVersion: z.string(), @@ -22,4 +40,8 @@ const KinesisDataStreamSchema = z.object({ Records: z.array(KinesisDataStreamRecord), }); -export { KinesisDataStreamSchema }; +export { + KinesisDataStreamSchema, + KinesisDataStreamRecord, + KinesisDataStreamRecordPayload, +}; diff --git a/packages/parser/src/schemas/sns.ts b/packages/parser/src/schemas/sns.ts index f8d8d8bbc4..862306a66b 100644 --- a/packages/parser/src/schemas/sns.ts +++ b/packages/parser/src/schemas/sns.ts @@ -9,16 +9,26 @@ const SnsNotificationSchema = z.object({ Subject: z.string().optional(), TopicArn: z.string(), UnsubscribeUrl: z.string().url(), + UnsubscribeURL: z.string().url().optional(), + SigningCertUrl: z.string().url().optional(), + SigningCertURL: z.string().url().optional(), Type: z.literal('Notification'), MessageAttributes: z.record(z.string(), SnsMsgAttribute).optional(), Message: z.string(), MessageId: z.string(), Signature: z.string().optional(), SignatureVersion: z.string().optional(), - SigningCertUrl: z.string().url().optional(), Timestamp: z.string().datetime(), }); +const SnsSqsNotificationSchema = SnsNotificationSchema.extend({ + UnsubscribeURL: z.string().optional(), + SigningCertURL: z.string().url().optional(), +}).omit({ + UnsubscribeUrl: true, + SigningCertUrl: true, +}); + const SnsRecordSchema = z.object({ EventSource: z.literal('aws:sns'), EventVersion: z.string(), @@ -30,4 +40,10 @@ const SnsSchema = z.object({ Records: z.array(SnsRecordSchema), }); -export { SnsSchema, SnsRecordSchema, SnsNotificationSchema, SnsMsgAttribute }; +export { + SnsSchema, + SnsRecordSchema, + SnsNotificationSchema, + SnsMsgAttribute, + SnsSqsNotificationSchema, +}; diff --git a/packages/parser/src/types/index.ts b/packages/parser/src/types/index.ts new file mode 100644 index 0000000000..e69de29bb2 diff --git a/packages/parser/src/types/schema.ts b/packages/parser/src/types/schema.ts new file mode 100644 index 0000000000..cc5869a1e2 --- /dev/null +++ b/packages/parser/src/types/schema.ts @@ -0,0 +1,17 @@ +import { KafkaRecordSchema } from '../schemas/kafka.js'; +import { z } from 'zod'; +import { + KinesisDataStreamRecord, + KinesisDataStreamRecordPayload, +} from '../schemas/kinesis.js'; +import { APIGatewayProxyEventSchema } from '../schemas/apigw.js'; + +export type KafkaRecord = z.infer; + +export type KinesisDataStreamRecord = z.infer; + +export type KinesisDataStreamRecordPayload = z.infer< + typeof KinesisDataStreamRecordPayload +>; + +export type ApiGatewayProxyEvent = z.infer; diff --git a/packages/parser/tests/unit/envelopes/apigwt.test.ts b/packages/parser/tests/unit/envelopes/apigwt.test.ts new file mode 100644 index 0000000000..6c51736b16 --- /dev/null +++ b/packages/parser/tests/unit/envelopes/apigwt.test.ts @@ -0,0 +1,29 @@ +/** + * Test built in schema envelopes for api gateway + * + * @group unit/parser/envelopes + */ + +import { generateMock } from '@anatine/zod-mock'; +import { TestEvents, TestSchema } from '../schema/utils.js'; +import { ApiGatewayProxyEvent } from '../../../src/types/schema.js'; +import { apiGatewayEnvelope } from '../../../src/envelopes/apigw'; + +describe('ApigwEnvelope ', () => { + it('should parse custom schema in envelope', () => { + const testCustomSchemaObject = generateMock(TestSchema); + const testEvent = TestEvents.apiGatewayProxyEvent as ApiGatewayProxyEvent; + + testEvent.body = JSON.stringify(testCustomSchemaObject); + + const resp = apiGatewayEnvelope(testEvent, TestSchema); + expect(resp).toEqual(testCustomSchemaObject); + }); + + it('should throw no body provided', () => { + const testEvent = TestEvents.apiGatewayProxyEvent as ApiGatewayProxyEvent; + testEvent.body = undefined; + + expect(() => apiGatewayEnvelope(testEvent, TestSchema)).toThrow(); + }); +}); diff --git a/packages/parser/tests/unit/envelopes/apigwv2.test.ts b/packages/parser/tests/unit/envelopes/apigwv2.test.ts new file mode 100644 index 0000000000..acf7ee815b --- /dev/null +++ b/packages/parser/tests/unit/envelopes/apigwv2.test.ts @@ -0,0 +1,30 @@ +/** + * Test built in schema envelopes for api gateway v2 + * + * @group unit/parser/envelopes + */ + +import { TestEvents, TestSchema } from '../schema/utils.js'; +import { generateMock } from '@anatine/zod-mock'; +import { APIGatewayProxyEventV2 } from 'aws-lambda'; +import { apiGatewayV2Envelope } from '../../../src/envelopes/apigwv2'; + +describe('ApiGwV2Envelope ', () => { + it('should parse custom schema in envelope', () => { + const testEvent = + TestEvents.apiGatewayProxyV2Event as APIGatewayProxyEventV2; + const data = generateMock(TestSchema); + + testEvent.body = JSON.stringify(data); + + expect(apiGatewayV2Envelope(testEvent, TestSchema)).toEqual(data); + }); + + it('should throw when no body provided', () => { + const testEvent = + TestEvents.apiGatewayProxyV2Event as APIGatewayProxyEventV2; + testEvent.body = undefined; + + expect(() => apiGatewayV2Envelope(testEvent, TestSchema)).toThrow(); + }); +}); diff --git a/packages/parser/tests/unit/envelopes/cloudwatch.test.ts b/packages/parser/tests/unit/envelopes/cloudwatch.test.ts new file mode 100644 index 0000000000..3258768b5a --- /dev/null +++ b/packages/parser/tests/unit/envelopes/cloudwatch.test.ts @@ -0,0 +1,63 @@ +/** + * Test built in schema envelopes for CloudWatch + * + * @group unit/parser/envelopes + */ + +import { generateMock } from '@anatine/zod-mock'; +import { gzipSync } from 'node:zlib'; +import { + CloudWatchLogEventSchema, + CloudWatchLogsDecodeSchema, +} from '../../../src/schemas/cloudwatch.js'; +import { TestSchema } from '../schema/utils.js'; +import { cloudWatchEnvelope } from '../../../src/envelopes/cloudwatch'; + +describe('CloudWatch', () => { + it('should parse custom schema in envelope', () => { + const testEvent = { + awslogs: { + data: '', + }, + }; + + const data = generateMock(TestSchema); + const eventMock = generateMock(CloudWatchLogEventSchema, { + stringMap: { + message: () => JSON.stringify(data), + }, + }); + + const logMock = generateMock(CloudWatchLogsDecodeSchema); + logMock.logEvents = [eventMock]; + + testEvent.awslogs.data = gzipSync( + Buffer.from(JSON.stringify(logMock), 'utf8') + ).toString('base64'); + + expect(cloudWatchEnvelope(testEvent, TestSchema)).toEqual([data]); + }); + + it('should throw when schema does not match', () => { + const testEvent = { + awslogs: { + data: '', + }, + }; + + const eventMock = generateMock(CloudWatchLogEventSchema, { + stringMap: { + message: () => JSON.stringify({ foo: 'bar' }), + }, + }); + + const logMock = generateMock(CloudWatchLogsDecodeSchema); + logMock.logEvents = [eventMock]; + + testEvent.awslogs.data = gzipSync( + Buffer.from(JSON.stringify(logMock), 'utf8') + ).toString('base64'); + + expect(() => cloudWatchEnvelope(testEvent, TestSchema)).toThrow(); + }); +}); diff --git a/packages/parser/tests/unit/envelopes/dynamodb.test.ts b/packages/parser/tests/unit/envelopes/dynamodb.test.ts new file mode 100644 index 0000000000..342ad474e3 --- /dev/null +++ b/packages/parser/tests/unit/envelopes/dynamodb.test.ts @@ -0,0 +1,43 @@ +/** + * Test built in schema envelopes for api gateway v2 + * + * @group unit/parser/envelopes + */ + +import { generateMock } from '@anatine/zod-mock'; +import { TestEvents } from '../schema/utils.js'; +import { DynamoDBStreamEvent } from 'aws-lambda'; +import { z } from 'zod'; +import { dynamoDDStreamEnvelope } from '../../../src/envelopes/dynamodb'; + +describe('DynamoDB', () => { + const schema = z.object({ + Message: z.record(z.literal('S'), z.string()), + Id: z.record(z.literal('N'), z.number().min(0).max(100)), + }); + + it('should parse dynamodb envelope', () => { + const mockOldImage = generateMock(schema); + const mockNewImage = generateMock(schema); + const dynamodbEvent = TestEvents.dynamoStreamEvent as DynamoDBStreamEvent; + + (dynamodbEvent.Records[0].dynamodb!.NewImage as typeof mockNewImage) = + mockNewImage; + (dynamodbEvent.Records[1].dynamodb!.NewImage as typeof mockNewImage) = + mockNewImage; + (dynamodbEvent.Records[0].dynamodb!.OldImage as typeof mockOldImage) = + mockOldImage; + (dynamodbEvent.Records[1].dynamodb!.OldImage as typeof mockOldImage) = + mockOldImage; + + const parsed = dynamoDDStreamEnvelope(dynamodbEvent, schema); + expect(parsed[0]).toEqual({ + OldImage: mockOldImage, + NewImage: mockNewImage, + }); + expect(parsed[1]).toEqual({ + OldImage: mockOldImage, + NewImage: mockNewImage, + }); + }); +}); diff --git a/packages/parser/tests/unit/envelopes/eventbridge.test.ts b/packages/parser/tests/unit/envelopes/eventbridge.test.ts new file mode 100644 index 0000000000..ee8c62a95c --- /dev/null +++ b/packages/parser/tests/unit/envelopes/eventbridge.test.ts @@ -0,0 +1,51 @@ +/** + * Test built in schema envelopes for event bridge + * + * @group unit/parser/envelopes + */ + +import { TestEvents, TestSchema } from '../schema/utils.js'; +import { generateMock } from '@anatine/zod-mock'; +import { EventBridgeEvent } from 'aws-lambda'; +import { eventBridgeEnvelope } from '../../../src/envelopes/eventbridge.js'; + +describe('EventBridgeEnvelope ', () => { + it('should parse eventbridge event', () => { + const eventBridgeEvent = TestEvents.eventBridgeEvent as EventBridgeEvent< + string, + object + >; + + const data = generateMock(TestSchema); + + eventBridgeEvent.detail = data; + + expect(eventBridgeEnvelope(eventBridgeEvent, TestSchema)).toEqual(data); + }); + + it('should throw error if detail type does not match schema', () => { + const eventBridgeEvent = TestEvents.eventBridgeEvent as EventBridgeEvent< + string, + object + >; + + eventBridgeEvent.detail = { + foo: 'bar', + }; + + expect(() => + eventBridgeEnvelope(eventBridgeEvent, TestSchema) + ).toThrowError(); + }); + + it('should throw when invalid data type provided', () => { + const eventBridgeEvent = TestEvents.eventBridgeEvent as EventBridgeEvent< + string, + object + >; + + eventBridgeEvent.detail = 1 as unknown as object; + + expect(() => eventBridgeEnvelope(eventBridgeEvent, TestSchema)).toThrow(); + }); +}); diff --git a/packages/parser/tests/unit/envelopes/kafka.test.ts b/packages/parser/tests/unit/envelopes/kafka.test.ts new file mode 100644 index 0000000000..57e43a584f --- /dev/null +++ b/packages/parser/tests/unit/envelopes/kafka.test.ts @@ -0,0 +1,39 @@ +/** + * Test built in schema envelopes for api gateway v2 + * + * @group unit/parser/envelopes + */ + +import { generateMock } from '@anatine/zod-mock'; +import { TestEvents, TestSchema } from '../schema/utils.js'; +import { MSKEvent, SelfManagedKafkaEvent } from 'aws-lambda'; +import { kafkaEnvelope } from '../../../src/envelopes/kafka'; + +describe('Kafka', () => { + it('should parse MSK kafka envelope', () => { + const mock = generateMock(TestSchema); + + const kafkaEvent = TestEvents.kafkaEventMsk as MSKEvent; + kafkaEvent.records['mytopic-0'][0].value = Buffer.from( + JSON.stringify(mock) + ).toString('base64'); + + const result = kafkaEnvelope(kafkaEvent, TestSchema); + + expect(result).toEqual([[mock]]); + }); + + it('should parse Self Managed kafka envelope', () => { + const mock = generateMock(TestSchema); + + const kafkaEvent = + TestEvents.kafkaEventSelfManaged as SelfManagedKafkaEvent; + kafkaEvent.records['mytopic-0'][0].value = Buffer.from( + JSON.stringify(mock) + ).toString('base64'); + + const result = kafkaEnvelope(kafkaEvent, TestSchema); + + expect(result).toEqual([[mock]]); + }); +}); diff --git a/packages/parser/tests/unit/envelopes/kinesis-firehose.test.ts b/packages/parser/tests/unit/envelopes/kinesis-firehose.test.ts new file mode 100644 index 0000000000..581785d99f --- /dev/null +++ b/packages/parser/tests/unit/envelopes/kinesis-firehose.test.ts @@ -0,0 +1,55 @@ +/** + * Test built in schema envelopes for Kinesis Firehose + * + * @group unit/parser/envelopes + */ + +import { TestEvents, TestSchema } from '../schema/utils.js'; +import { generateMock } from '@anatine/zod-mock'; +import { KinesisFirehoseSchema } from '../../../src/schemas/kinesis-firehose.js'; +import { z } from 'zod'; +import { kinesisFirehoseEnvelope } from '../../../src/envelopes/kinesis-firehose'; + +describe('Kinesis Firehose Envelope', () => { + it('should parse records for PutEvent', () => { + const mock = generateMock(TestSchema); + const testEvent = TestEvents.kinesisFirehosePutEvent as z.infer< + typeof KinesisFirehoseSchema + >; + + testEvent.records.map((record) => { + record.data = Buffer.from(JSON.stringify(mock)).toString('base64'); + }); + + const resp = kinesisFirehoseEnvelope(testEvent, TestSchema); + expect(resp).toEqual([mock, mock]); + }); + + it('should parse a single record for SQS event', () => { + const mock = generateMock(TestSchema); + const testEvent = TestEvents.kinesisFirehoseSQSEvent as z.infer< + typeof KinesisFirehoseSchema + >; + + testEvent.records.map((record) => { + record.data = Buffer.from(JSON.stringify(mock)).toString('base64'); + }); + + const resp = kinesisFirehoseEnvelope(testEvent, TestSchema); + expect(resp).toEqual([mock]); + }); + + it('should parse records for kinesis event', () => { + const mock = generateMock(TestSchema); + const testEvent = TestEvents.kinesisFirehoseKinesisEvent as z.infer< + typeof KinesisFirehoseSchema + >; + + testEvent.records.map((record) => { + record.data = Buffer.from(JSON.stringify(mock)).toString('base64'); + }); + + const resp = kinesisFirehoseEnvelope(testEvent, TestSchema); + expect(resp).toEqual([mock, mock]); + }); +}); diff --git a/packages/parser/tests/unit/envelopes/kinesis.test.ts b/packages/parser/tests/unit/envelopes/kinesis.test.ts new file mode 100644 index 0000000000..6395cf9803 --- /dev/null +++ b/packages/parser/tests/unit/envelopes/kinesis.test.ts @@ -0,0 +1,26 @@ +/** + * Test built in schema envelopes for Kinesis + * + * @group unit/parser/envelopes + */ + +import { generateMock } from '@anatine/zod-mock'; +import { KinesisStreamEvent } from 'aws-lambda'; +import { TestEvents, TestSchema } from '../schema/utils.js'; +import { kinesisEnvelope } from '../../../src/envelopes/kinesis'; + +describe('Kinesis', () => { + it('should parse Kinesis Stream event', () => { + const mock = generateMock(TestSchema); + const testEvent = TestEvents.kinesisStreamEvent as KinesisStreamEvent; + + testEvent.Records.map((record) => { + record.kinesis.data = Buffer.from(JSON.stringify(mock)).toString( + 'base64' + ); + }); + + const resp = kinesisEnvelope(testEvent, TestSchema); + expect(resp).toEqual([mock, mock]); + }); +}); diff --git a/packages/parser/tests/unit/envelopes/lambda.test.ts b/packages/parser/tests/unit/envelopes/lambda.test.ts new file mode 100644 index 0000000000..f00411e8b3 --- /dev/null +++ b/packages/parser/tests/unit/envelopes/lambda.test.ts @@ -0,0 +1,30 @@ +/** + * Test built in schema envelopes for Lambda Functions URL + * + * @group unit/parser/envelopes + */ + +import { TestEvents, TestSchema } from '../schema/utils.js'; +import { generateMock } from '@anatine/zod-mock'; +import { APIGatewayProxyEventV2 } from 'aws-lambda'; +import { lambdaFunctionUrlEnvelope } from '../../../src/envelopes/lambda'; + +describe('Lambda Functions Url ', () => { + it('should parse custom schema in envelope', () => { + const testEvent = + TestEvents.lambdaFunctionUrlEvent as APIGatewayProxyEventV2; + const data = generateMock(TestSchema); + + testEvent.body = JSON.stringify(data); + + expect(lambdaFunctionUrlEnvelope(testEvent, TestSchema)).toEqual(data); + }); + + it('should throw when no body provided', () => { + const testEvent = + TestEvents.apiGatewayProxyV2Event as APIGatewayProxyEventV2; + testEvent.body = undefined; + + expect(() => lambdaFunctionUrlEnvelope(testEvent, TestSchema)).toThrow(); + }); +}); diff --git a/packages/parser/tests/unit/envelopes/sns.test.ts b/packages/parser/tests/unit/envelopes/sns.test.ts new file mode 100644 index 0000000000..3a380303ed --- /dev/null +++ b/packages/parser/tests/unit/envelopes/sns.test.ts @@ -0,0 +1,51 @@ +/** + * Test built in schema envelopes for SNS + * + * @group unit/parser/envelopes + */ + +import { z } from 'zod'; +import { generateMock } from '@anatine/zod-mock'; +import { SNSEvent, SQSEvent } from 'aws-lambda'; +import { TestEvents, TestSchema } from '../schema/utils.js'; +import { snsEnvelope, snsSqsEnvelope } from '../../../src/envelopes/sns'; + +describe('SNS Envelope', () => { + it('should parse custom schema in envelope', () => { + const testEvent = TestEvents.snsEvent as SNSEvent; + + const testRecords = [] as z.infer[]; + + testEvent.Records.map((record) => { + const value = generateMock(TestSchema); + testRecords.push(value); + record.Sns.Message = JSON.stringify(value); + }); + + expect(snsEnvelope(testEvent, TestSchema)).toEqual(testRecords); + }); + + it('should throw if message does not macht schema', () => { + const testEvent = TestEvents.snsEvent as SNSEvent; + + testEvent.Records.map((record) => { + record.Sns.Message = JSON.stringify({ + foo: 'bar', + }); + }); + + expect(() => snsEnvelope(testEvent, TestSchema)).toThrowError(); + }); + + it('should parse sqs inside sns envelope', () => { + const snsSqsTestEvent = TestEvents.snsSqsEvent as SQSEvent; + + const data = generateMock(TestSchema); + const snsEvent = JSON.parse(snsSqsTestEvent.Records[0].body); + snsEvent.Message = JSON.stringify(data); + + snsSqsTestEvent.Records[0].body = JSON.stringify(snsEvent); + + expect(snsSqsEnvelope(snsSqsTestEvent, TestSchema)).toEqual([data]); + }); +}); diff --git a/packages/parser/tests/unit/envelopes/sqs.test.ts b/packages/parser/tests/unit/envelopes/sqs.test.ts new file mode 100644 index 0000000000..4fb775433f --- /dev/null +++ b/packages/parser/tests/unit/envelopes/sqs.test.ts @@ -0,0 +1,45 @@ +/** + * Test built in schema envelopes for sqs + * + * @group unit/parser/envelopes + */ + +import { generateMock } from '@anatine/zod-mock'; +import { TestEvents, TestSchema } from '../schema/utils.js'; +import { SQSEvent } from 'aws-lambda'; +import { sqsEnvelope } from '../../../src/envelopes/sqs'; + +describe('SqsEnvelope ', () => { + it('should parse custom schema in envelope', () => { + const mock = generateMock(TestSchema); + + const sqsEvent = TestEvents.sqsEvent as SQSEvent; + sqsEvent.Records[0].body = JSON.stringify(mock); + sqsEvent.Records[1].body = JSON.stringify(mock); + + const resp = sqsEnvelope(sqsEvent, TestSchema); + expect(resp).toEqual([mock, mock]); + }); + + it('should throw error if invalid keys for a schema', () => { + expect(() => { + sqsEnvelope({ Records: [{ foo: 'bar' }] }, TestSchema); + }).toThrow(); + }); + + it('should throw error if invalid values for a schema', () => { + expect(() => { + sqsEnvelope( + { + Records: [ + { + name: 'foo', + age: 17, + }, + ], + }, + TestSchema + ); + }).toThrow(); + }); +}); diff --git a/packages/parser/tests/unit/envelopes/vpc-lattice.test.ts b/packages/parser/tests/unit/envelopes/vpc-lattice.test.ts new file mode 100644 index 0000000000..a3b1b0f6c4 --- /dev/null +++ b/packages/parser/tests/unit/envelopes/vpc-lattice.test.ts @@ -0,0 +1,38 @@ +/** + * Test built in schema envelopes for VPC Lattice + * + * @group unit/parser/envelopes + */ + +import { generateMock } from '@anatine/zod-mock'; +import { TestEvents, TestSchema } from '../schema/utils.js'; +import { VpcLatticeSchema } from '../../../src/schemas/vpc-lattice.js'; +import { z } from 'zod'; +import { vpcLatticeEnvelope } from '../../../src/envelopes/vpc-lattice'; + +describe('VPC Lattice envelope', () => { + it('should parse VPC Lattice event', () => { + const mock = generateMock(TestSchema); + const testEvent = TestEvents.vpcLatticeEvent as z.infer< + typeof VpcLatticeSchema + >; + + testEvent.body = JSON.stringify(mock); + + const resp = vpcLatticeEnvelope(testEvent, TestSchema); + + expect(resp).toEqual(mock); + }); + + it('should parse VPC Lattice event with trailing slash', () => { + const mock = generateMock(TestSchema); + const testEvent = TestEvents.vpcLatticeEventPathTrailingSlash as z.infer< + typeof VpcLatticeSchema + >; + + testEvent.body = JSON.stringify(mock); + + const resp = vpcLatticeEnvelope(testEvent, TestSchema); + expect(resp).toEqual(mock); + }); +}); diff --git a/packages/parser/tests/unit/envelopes/vpc-latticev2.test.ts b/packages/parser/tests/unit/envelopes/vpc-latticev2.test.ts new file mode 100644 index 0000000000..207dedb2da --- /dev/null +++ b/packages/parser/tests/unit/envelopes/vpc-latticev2.test.ts @@ -0,0 +1,38 @@ +/** + * Test built in schema envelopes for VPC Lattice V2 + * + * @group unit/parser/envelopes + */ + +import { generateMock } from '@anatine/zod-mock'; +import { VpcLatticeSchema } from '../../../src/schemas/vpc-lattice.js'; +import { z } from 'zod'; +import { TestEvents, TestSchema } from '../schema/utils.js'; +import { vpcLatticeV2Envelope } from '../../../src/envelopes/vpc-latticev2'; + +describe('VPC Lattice envelope', () => { + it('should parse VPC Lattice event', () => { + const mock = generateMock(TestSchema); + const testEvent = TestEvents.vpcLatticeV2Event as z.infer< + typeof VpcLatticeSchema + >; + + testEvent.body = JSON.stringify(mock); + + const resp = vpcLatticeV2Envelope(testEvent, TestSchema); + + expect(resp).toEqual(mock); + }); + + it('should parse VPC Lattice event with trailing slash', () => { + const mock = generateMock(TestSchema); + const testEvent = TestEvents.vpcLatticeEventV2PathTrailingSlash as z.infer< + typeof VpcLatticeSchema + >; + + testEvent.body = JSON.stringify(mock); + + const resp = vpcLatticeV2Envelope(testEvent, TestSchema); + expect(resp).toEqual(mock); + }); +}); diff --git a/packages/parser/tests/unit/schema/alb.test.ts b/packages/parser/tests/unit/schema/alb.test.ts index 5e9144582e..071f4598ce 100644 --- a/packages/parser/tests/unit/schema/alb.test.ts +++ b/packages/parser/tests/unit/schema/alb.test.ts @@ -7,25 +7,22 @@ import { AlbSchema, AlbMultiValueHeadersSchema, } from '../../../src/schemas/alb.js'; -import { loadExampleEvent } from './utils.js'; +import { TestEvents } from './utils.js'; describe('ALB ', () => { it('should parse alb event', () => { - const albEvent = loadExampleEvent('albEvent.json'); + const albEvent = TestEvents.albEvent; expect(AlbSchema.parse(albEvent)).toEqual(albEvent); }); it('should parse alb event path trailing slash', () => { - const albEventPathTrailingSlash = loadExampleEvent( - 'albEventPathTrailingSlash.json' - ); + const albEventPathTrailingSlash = TestEvents.albEventPathTrailingSlash; expect(AlbSchema.parse(albEventPathTrailingSlash)).toEqual( albEventPathTrailingSlash ); }); it('should parse alb event with multi value headers event', () => { - const albMultiValueHeadersEvent = loadExampleEvent( - 'albMultiValueHeadersEvent.json' - ); + const albMultiValueHeadersEvent = TestEvents.albMultiValueHeadersEvent; + expect(AlbMultiValueHeadersSchema.parse(albMultiValueHeadersEvent)).toEqual( albMultiValueHeadersEvent ); diff --git a/packages/parser/tests/unit/schema/apigw.test.ts b/packages/parser/tests/unit/schema/apigw.test.ts index 9aa23c6694..472aa89d39 100644 --- a/packages/parser/tests/unit/schema/apigw.test.ts +++ b/packages/parser/tests/unit/schema/apigw.test.ts @@ -4,68 +4,66 @@ * @group unit/parser/schema/ */ -import { loadExampleEvent } from './utils.js'; import { APIGatewayProxyEventSchema } from '../../../src/schemas/apigw.js'; +import { TestEvents } from './utils.js'; describe('APIGateway ', () => { it('should parse api gateway event', () => { - const apiGatewayProxyEvent = loadExampleEvent('apiGatewayProxyEvent.json'); + const apiGatewayProxyEvent = TestEvents.apiGatewayProxyEvent; + expect(APIGatewayProxyEventSchema.parse(apiGatewayProxyEvent)).toEqual( apiGatewayProxyEvent ); }); it('should parse api gateway authorizer request event', () => { - const apiGatewayAuthorizerRequestEvent = loadExampleEvent( - 'apiGatewayAuthorizerRequestEvent.json' - ); + const apiGatewayAuthorizerRequestEvent = + TestEvents.apiGatewayAuthorizerRequestEvent; + expect( APIGatewayProxyEventSchema.parse(apiGatewayAuthorizerRequestEvent) ).toEqual(apiGatewayAuthorizerRequestEvent); }); it('should parse schema middleware invalid event', () => { - const apiGatewaySchemaMiddlewareInvalidEvent = loadExampleEvent( - 'apiGatewaySchemaMiddlewareInvalidEvent.json' - ); + const apiGatewaySchemaMiddlewareInvalidEvent = + TestEvents.apiGatewaySchemaMiddlewareInvalidEvent; + expect( APIGatewayProxyEventSchema.parse(apiGatewaySchemaMiddlewareInvalidEvent) ).toEqual(apiGatewaySchemaMiddlewareInvalidEvent); }); it('should parse schema middleware valid event', () => { - const apiGatewaySchemaMiddlewareValidEvent = loadExampleEvent( - 'apiGatewaySchemaMiddlewareValidEvent.json' - ); + const apiGatewaySchemaMiddlewareValidEvent = + TestEvents.apiGatewaySchemaMiddlewareValidEvent; + expect( APIGatewayProxyEventSchema.parse(apiGatewaySchemaMiddlewareValidEvent) ).toEqual(apiGatewaySchemaMiddlewareValidEvent); }); it('should parse proxy event with no version auth', () => { - const apiGatewayProxyEvent_noVersionAuth = loadExampleEvent( - 'apiGatewayProxyEvent_noVersionAuth.json' - ); + const apiGatewayProxyEvent_noVersionAuth = + TestEvents.apiGatewayProxyEvent_noVersionAuth; + expect( APIGatewayProxyEventSchema.parse(apiGatewayProxyEvent_noVersionAuth) ).toEqual(apiGatewayProxyEvent_noVersionAuth); }); it('should parse proxy event with another path', () => { - const apiGatewayProxyEventAnotherPath = loadExampleEvent( - 'apiGatewayProxyEventAnotherPath.json' - ); + const apiGatewayProxyEventAnotherPath = + TestEvents.apiGatewayProxyEventAnotherPath; + expect( APIGatewayProxyEventSchema.parse(apiGatewayProxyEventAnotherPath) ).toEqual(apiGatewayProxyEventAnotherPath); }); it('should parse proxy event with path trailing slash', () => { - const apiGatewayProxyEventPathTrailingSlash = loadExampleEvent( - 'apiGatewayProxyEventPathTrailingSlash.json' - ); + const apiGatewayProxyEventPathTrailingSlash = + TestEvents.apiGatewayProxyEventPathTrailingSlash; expect( APIGatewayProxyEventSchema.parse(apiGatewayProxyEventPathTrailingSlash) ).toEqual(apiGatewayProxyEventPathTrailingSlash); }); it('should parse other proxy event', () => { - const apiGatewayProxyOtherEvent = loadExampleEvent( - 'apiGatewayProxyOtherEvent.json' - ); + const apiGatewayProxyOtherEvent = TestEvents.apiGatewayProxyOtherEvent; expect(APIGatewayProxyEventSchema.parse(apiGatewayProxyOtherEvent)).toEqual( apiGatewayProxyOtherEvent ); diff --git a/packages/parser/tests/unit/schema/apigwv2.test.ts b/packages/parser/tests/unit/schema/apigwv2.test.ts index 85ac2da1a2..59faa6ca70 100644 --- a/packages/parser/tests/unit/schema/apigwv2.test.ts +++ b/packages/parser/tests/unit/schema/apigwv2.test.ts @@ -4,30 +4,27 @@ * @group unit/parser/schema/ */ -import { loadExampleEvent } from './utils.js'; import { APIGatewayProxyEventV2Schema } from '../../../src/schemas/apigwv2.js'; +import { TestEvents } from './utils.js'; describe('API GW v2 ', () => { it('should parse api gateway v2 event', () => { - const apiGatewayProxyV2Event = loadExampleEvent( - 'apiGatewayProxyV2Event.json' - ); + const apiGatewayProxyV2Event = TestEvents.apiGatewayProxyV2Event; + expect(APIGatewayProxyEventV2Schema.parse(apiGatewayProxyV2Event)).toEqual( apiGatewayProxyV2Event ); }); it('should parse api gateway v2 event with GET method', () => { - const apiGatewayProxyV2Event_GET = loadExampleEvent( - 'apiGatewayProxyV2Event_GET.json' - ); + const apiGatewayProxyV2Event_GET = TestEvents.apiGatewayProxyV2Event_GET; expect( APIGatewayProxyEventV2Schema.parse(apiGatewayProxyV2Event_GET) ).toEqual(apiGatewayProxyV2Event_GET); }); it('should parse api gateway v2 event with path trailing slash', () => { - const apiGatewayProxyV2EventPathTrailingSlash = loadExampleEvent( - 'apiGatewayProxyV2EventPathTrailingSlash.json' - ); + const apiGatewayProxyV2EventPathTrailingSlash = + TestEvents.apiGatewayProxyV2EventPathTrailingSlash; + expect( APIGatewayProxyEventV2Schema.parse( apiGatewayProxyV2EventPathTrailingSlash @@ -35,33 +32,32 @@ describe('API GW v2 ', () => { ).toEqual(apiGatewayProxyV2EventPathTrailingSlash); }); it('should parse api gateway v2 event with iam', () => { - const apiGatewayProxyV2IamEvent = loadExampleEvent( - 'apiGatewayProxyV2IamEvent.json' - ); + const apiGatewayProxyV2IamEvent = TestEvents.apiGatewayProxyV2IamEvent; + expect( APIGatewayProxyEventV2Schema.parse(apiGatewayProxyV2IamEvent) ).toEqual(apiGatewayProxyV2IamEvent); }); it('should parse api gateway v2 event with lambda authorizer', () => { - const apiGatewayProxyV2LambdaAuthorizerEvent = loadExampleEvent( - 'apiGatewayProxyV2LambdaAuthorizerEvent.json' - ); + const apiGatewayProxyV2LambdaAuthorizerEvent = + TestEvents.apiGatewayProxyV2LambdaAuthorizerEvent; + expect( APIGatewayProxyEventV2Schema.parse(apiGatewayProxyV2LambdaAuthorizerEvent) ).toEqual(apiGatewayProxyV2LambdaAuthorizerEvent); }); it('should parse api gateway v2 event with other get event', () => { - const apiGatewayProxyV2OtherGetEvent = loadExampleEvent( - 'apiGatewayProxyV2OtherGetEvent.json' - ); + const apiGatewayProxyV2OtherGetEvent = + TestEvents.apiGatewayProxyV2OtherGetEvent; + expect( APIGatewayProxyEventV2Schema.parse(apiGatewayProxyV2OtherGetEvent) ).toEqual(apiGatewayProxyV2OtherGetEvent); }); it('should parse api gateway v2 event with schema middleware', () => { - const apiGatewayProxyV2SchemaMiddlewareValidEvent = loadExampleEvent( - 'apiGatewayProxyV2SchemaMiddlewareValidEvent.json' - ); + const apiGatewayProxyV2SchemaMiddlewareValidEvent = + TestEvents.apiGatewayProxyV2SchemaMiddlewareValidEvent; + expect( APIGatewayProxyEventV2Schema.parse( apiGatewayProxyV2SchemaMiddlewareValidEvent diff --git a/packages/parser/tests/unit/schema/cloudformation-custom-resource.test.ts b/packages/parser/tests/unit/schema/cloudformation-custom-resource.test.ts index 66ec61680d..d7ac35ac29 100644 --- a/packages/parser/tests/unit/schema/cloudformation-custom-resource.test.ts +++ b/packages/parser/tests/unit/schema/cloudformation-custom-resource.test.ts @@ -4,18 +4,18 @@ * @group unit/parser/schema/ */ -import { loadExampleEvent } from './utils.js'; import { CloudFormationCustomResourceCreateSchema, CloudFormationCustomResourceUpdateSchema, CloudFormationCustomResourceDeleteSchema, } from '../../../src/schemas/cloudformation-custom-resource.js'; +import { TestEvents } from './utils.js'; describe('CloudFormationCustomResource ', () => { it('should parse create event', () => { - const cloudFormationCustomResourceCreateEvent = loadExampleEvent( - 'cloudFormationCustomResourceCreateEvent.json' - ); + const cloudFormationCustomResourceCreateEvent = + TestEvents.cloudFormationCustomResourceCreateEvent; + expect( CloudFormationCustomResourceCreateSchema.parse( cloudFormationCustomResourceCreateEvent @@ -23,9 +23,9 @@ describe('CloudFormationCustomResource ', () => { ).toEqual(cloudFormationCustomResourceCreateEvent); }); it('should parse update event', () => { - const cloudFormationCustomResourceUpdateEvent = loadExampleEvent( - 'cloudFormationCustomResourceUpdateEvent.json' - ); + const cloudFormationCustomResourceUpdateEvent = + TestEvents.cloudFormationCustomResourceUpdateEvent; + expect( CloudFormationCustomResourceUpdateSchema.parse( cloudFormationCustomResourceUpdateEvent @@ -33,9 +33,9 @@ describe('CloudFormationCustomResource ', () => { ).toEqual(cloudFormationCustomResourceUpdateEvent); }); it('should parse delete event', () => { - const cloudFormationCustomResourceDeleteEvent = loadExampleEvent( - 'cloudFormationCustomResourceDeleteEvent.json' - ); + const cloudFormationCustomResourceDeleteEvent = + TestEvents.cloudFormationCustomResourceDeleteEvent; + expect( CloudFormationCustomResourceDeleteSchema.parse( cloudFormationCustomResourceDeleteEvent diff --git a/packages/parser/tests/unit/schema/cloudwatch.test.ts b/packages/parser/tests/unit/schema/cloudwatch.test.ts index a978030de2..c12e0d608c 100644 --- a/packages/parser/tests/unit/schema/cloudwatch.test.ts +++ b/packages/parser/tests/unit/schema/cloudwatch.test.ts @@ -4,12 +4,12 @@ * @group unit/parser/schema/ */ -import { loadExampleEvent } from './utils.js'; import { CloudWatchLogsSchema } from '../../../src/schemas/cloudwatch.js'; +import { TestEvents } from './utils.js'; describe('CloudWatchLogs ', () => { it('should parse cloudwatch logs event', () => { - const cloudWatchLogEvent = loadExampleEvent('cloudWatchLogEvent.json'); + const cloudWatchLogEvent = TestEvents.cloudWatchLogEvent; const parsed = CloudWatchLogsSchema.parse(cloudWatchLogEvent); expect(parsed.awslogs.data).toBeDefined(); expect(parsed.awslogs.data?.logEvents[0]).toEqual({ diff --git a/packages/parser/tests/unit/schema/dynamodb.test.ts b/packages/parser/tests/unit/schema/dynamodb.test.ts index b152c07b72..821d484f40 100644 --- a/packages/parser/tests/unit/schema/dynamodb.test.ts +++ b/packages/parser/tests/unit/schema/dynamodb.test.ts @@ -5,10 +5,10 @@ */ import { DynamoDBStreamSchema } from '../../../src/schemas/dynamodb.js'; -import { loadExampleEvent } from './utils.js'; +import { TestEvents } from './utils.js'; describe('DynamoDB ', () => { - const dynamoStreamEvent = loadExampleEvent('dynamoStreamEvent.json'); + const dynamoStreamEvent = TestEvents.dynamoStreamEvent; it('should parse a stream of records', () => { expect(DynamoDBStreamSchema.parse(dynamoStreamEvent)).toEqual( dynamoStreamEvent diff --git a/packages/parser/tests/unit/schema/eventbridge.test.ts b/packages/parser/tests/unit/schema/eventbridge.test.ts index e92bd2248f..b7ed50d37c 100644 --- a/packages/parser/tests/unit/schema/eventbridge.test.ts +++ b/packages/parser/tests/unit/schema/eventbridge.test.ts @@ -4,12 +4,13 @@ * @group unit/parser/schema/ */ -import { loadExampleEvent } from './utils.js'; import { EventBridgeSchema } from '../../../src/schemas/eventbridge.js'; +import { TestEvents } from './utils.js'; describe('EventBridge ', () => { it('should parse eventbridge event', () => { - const eventBridgeEvent = loadExampleEvent('eventBridgeEvent.json'); + const eventBridgeEvent = TestEvents.eventBridgeEvent; + expect(EventBridgeSchema.parse(eventBridgeEvent)).toEqual(eventBridgeEvent); }); }); diff --git a/packages/parser/tests/unit/schema/kafka.test.ts b/packages/parser/tests/unit/schema/kafka.test.ts index 3b2bc50b83..1296130dd8 100644 --- a/packages/parser/tests/unit/schema/kafka.test.ts +++ b/packages/parser/tests/unit/schema/kafka.test.ts @@ -4,11 +4,11 @@ * @group unit/parser/schema/ */ -import { loadExampleEvent } from './utils.js'; import { KafkaMskEventSchema, KafkaSelfManagedEventSchema, } from '../../../src/schemas/kafka.js'; +import { TestEvents } from './utils.js'; describe('Kafka ', () => { const expectedTestEvent = { @@ -26,15 +26,15 @@ describe('Kafka ', () => { ], }; it('should parse kafka MSK event', () => { - const kafkaEventMsk = loadExampleEvent('kafkaEventMsk.json'); + const kafkaEventMsk = TestEvents.kafkaEventMsk; + expect( KafkaMskEventSchema.parse(kafkaEventMsk).records['mytopic-0'][0] ).toEqual(expectedTestEvent); }); it('should parse kafka self managed event', () => { - const kafkaEventSelfManaged = loadExampleEvent( - 'kafkaEventSelfManaged.json' - ); + const kafkaEventSelfManaged = TestEvents.kafkaEventSelfManaged; + expect( KafkaSelfManagedEventSchema.parse(kafkaEventSelfManaged).records[ 'mytopic-0' @@ -42,9 +42,8 @@ describe('Kafka ', () => { ).toEqual(expectedTestEvent); }); it('should transform bootstrapServers to array', () => { - const kafkaEventSelfManaged = loadExampleEvent( - 'kafkaEventSelfManaged.json' - ); + const kafkaEventSelfManaged = TestEvents.kafkaEventSelfManaged; + expect( KafkaSelfManagedEventSchema.parse(kafkaEventSelfManaged).bootstrapServers ).toEqual([ @@ -53,11 +52,12 @@ describe('Kafka ', () => { ]); }); it('should return undefined if bootstrapServers is not present', () => { - const kafkaEventSelfManaged = loadExampleEvent( - 'kafkaEventSelfManaged.json' - ) as { bootstrapServers: string }; + const kafkaEventSelfManaged = TestEvents.kafkaEventSelfManaged as { + bootstrapServers: string; + }; kafkaEventSelfManaged.bootstrapServers = ''; const parsed = KafkaSelfManagedEventSchema.parse(kafkaEventSelfManaged); + expect(parsed.bootstrapServers).toBeUndefined(); }); }); diff --git a/packages/parser/tests/unit/schema/kinesis.test.ts b/packages/parser/tests/unit/schema/kinesis.test.ts index 99fc5eebc4..8a9aabadec 100644 --- a/packages/parser/tests/unit/schema/kinesis.test.ts +++ b/packages/parser/tests/unit/schema/kinesis.test.ts @@ -4,75 +4,57 @@ * @group unit/parser/schema/ */ -import { loadExampleEvent } from './utils.js'; import { KinesisDataStreamSchema } from '../../../src/schemas/kinesis.js'; import { KinesisFirehoseSchema, KinesisFirehoseSqsSchema, } from '../../../src/schemas/kinesis-firehose.js'; -import { extractCloudWatchLogFromEvent } from '../../../src/schemas/cloudwatch.js'; +import { TestEvents } from './utils.js'; describe('Kinesis ', () => { it('should parse kinesis event', () => { - const kinesisStreamEvent = loadExampleEvent('kinesisStreamEvent.json'); + const kinesisStreamEvent = TestEvents.kinesisStreamEvent; const parsed = KinesisDataStreamSchema.parse(kinesisStreamEvent); - const decodedData = Buffer.from( - parsed.Records[0].kinesis.data, - 'base64' - ).toString('utf8'); - expect(decodedData).toEqual('Hello, this is a test.'); + + expect(parsed.Records[0].kinesis.data).toEqual('Hello, this is a test.'); }); it('should parse single kinesis record', () => { - const kinesisStreamEventOneRecord = loadExampleEvent( - 'kinesisStreamEventOneRecord.json' - ); + const kinesisStreamEventOneRecord = TestEvents.kinesisStreamEventOneRecord; const parsed = KinesisDataStreamSchema.parse(kinesisStreamEventOneRecord); - const decodedJson = JSON.parse( - Buffer.from(parsed.Records[0].kinesis.data, 'base64').toString('utf8') - ); - expect(decodedJson).toEqual({ + + expect(parsed.Records[0].kinesis.data).toEqual({ message: 'test message', username: 'test', }); }); it('should parse Firehose event', () => { - const kinesisFirehoseKinesisEvent = loadExampleEvent( - 'kinesisFirehoseKinesisEvent.json' - ); + const kinesisFirehoseKinesisEvent = TestEvents.kinesisFirehoseKinesisEvent; const parsed = KinesisFirehoseSchema.parse(kinesisFirehoseKinesisEvent); expect(parsed.records[0].data).toEqual('Hello World'); }); it('should parse Kinesis Firehose PutEvents event', () => { - const kinesisFirehosePutEvent = loadExampleEvent( - 'kinesisFirehosePutEvent.json' - ); + const kinesisFirehosePutEvent = TestEvents.kinesisFirehosePutEvent; const parsed = KinesisFirehoseSchema.parse(kinesisFirehosePutEvent); expect(JSON.parse(parsed.records[1].data)).toEqual({ Hello: 'World', }); }); it('should parse Firehose event with SQS event', () => { - const kinesisFirehoseSQSEvent = loadExampleEvent( - 'kinesisFirehoseSQSEvent.json' - ); + const kinesisFirehoseSQSEvent = TestEvents.kinesisFirehoseSQSEvent; const parsed = KinesisFirehoseSqsSchema.parse(kinesisFirehoseSQSEvent); expect(parsed.records[0].data).toMatchObject({ messageId: '5ab807d4-5644-4c55-97a3-47396635ac74', body: 'Test message.', }); }); - it('should parse Firehose event with CloudWatch event', () => { - const kinesisStreamCloudWatchLogsEvent = loadExampleEvent( - 'kinesisStreamCloudWatchLogsEvent.json' - ); + it('should parse Kinesis event with CloudWatch event', () => { + const kinesisStreamCloudWatchLogsEvent = + TestEvents.kinesisStreamCloudWatchLogsEvent; const parsed = KinesisDataStreamSchema.parse( kinesisStreamCloudWatchLogsEvent ); - const jsonParsed = extractCloudWatchLogFromEvent( - parsed.Records[0].kinesis.data - ); - expect(jsonParsed).toMatchObject({ + expect(parsed.Records[0].kinesis.data).toMatchObject({ messageType: 'DATA_MESSAGE', owner: '231436140809', logGroup: '/aws/lambda/pt-1488-DummyLogDataFunction-gnWXPvL6jJyG', @@ -80,9 +62,9 @@ describe('Kinesis ', () => { }); }); it('should return original value if cannot parse KinesisFirehoseSqsRecord', () => { - const kinesisFirehoseSQSEvent = loadExampleEvent( - 'kinesisFirehoseSQSEvent.json' - ) as { records: { data: string }[] }; + const kinesisFirehoseSQSEvent = TestEvents.kinesisFirehoseSQSEvent as { + records: { data: string }[]; + }; kinesisFirehoseSQSEvent.records[0].data = 'not a valid json'; const parsed = KinesisFirehoseSqsSchema.parse(kinesisFirehoseSQSEvent); expect(parsed.records[0].data).toEqual('not a valid json'); diff --git a/packages/parser/tests/unit/schema/lambda.test.ts b/packages/parser/tests/unit/schema/lambda.test.ts index 459cd8a32e..cd789704bc 100644 --- a/packages/parser/tests/unit/schema/lambda.test.ts +++ b/packages/parser/tests/unit/schema/lambda.test.ts @@ -4,14 +4,13 @@ * @group unit/parser/schema/ */ -import { loadExampleEvent } from './utils.js'; import { LambdaFunctionUrlSchema } from '../../../src/schemas/lambda.js'; +import { TestEvents } from './utils.js'; describe('Lambda ', () => { it('should parse lambda event', () => { - const lambdaFunctionUrlEvent = loadExampleEvent( - 'apiGatewayProxyV2Event.json' - ); + const lambdaFunctionUrlEvent = TestEvents.apiGatewayProxyV2Event; + expect(LambdaFunctionUrlSchema.parse(lambdaFunctionUrlEvent)).toEqual( lambdaFunctionUrlEvent ); diff --git a/packages/parser/tests/unit/schema/s3.test.ts b/packages/parser/tests/unit/schema/s3.test.ts index 2c5378fdf7..eff1bb6840 100644 --- a/packages/parser/tests/unit/schema/s3.test.ts +++ b/packages/parser/tests/unit/schema/s3.test.ts @@ -10,18 +10,19 @@ import { S3Schema, S3ObjectLambdaEventSchema, } from '../../../src/schemas/s3.js'; -import { loadExampleEvent } from './utils.js'; +import { TestEvents } from './utils.js'; describe('S3 ', () => { it('should parse s3 event', () => { - const s3Event = loadExampleEvent('s3Event.json'); + const s3Event = TestEvents.s3Event; + expect(S3Schema.parse(s3Event)).toEqual(s3Event); }); it('should parse s3 event bridge notification event created', () => { - const s3EventBridgeNotificationObjectCreatedEvent = loadExampleEvent( - 's3EventBridgeNotificationObjectCreatedEvent.json' - ); + const s3EventBridgeNotificationObjectCreatedEvent = + TestEvents.s3EventBridgeNotificationObjectCreatedEvent; + expect( S3EventNotificationEventBridgeSchema.parse( s3EventBridgeNotificationObjectCreatedEvent @@ -30,9 +31,9 @@ describe('S3 ', () => { }); it('should parse s3 event bridge notification event detelted', () => { - const s3EventBridgeNotificationObjectDeletedEvent = loadExampleEvent( - 's3EventBridgeNotificationObjectDeletedEvent.json' - ); + const s3EventBridgeNotificationObjectDeletedEvent = + TestEvents.s3EventBridgeNotificationObjectDeletedEvent; + expect( S3EventNotificationEventBridgeSchema.parse( s3EventBridgeNotificationObjectDeletedEvent @@ -40,9 +41,9 @@ describe('S3 ', () => { ).toEqual(s3EventBridgeNotificationObjectDeletedEvent); }); it('should parse s3 event bridge notification event expired', () => { - const s3EventBridgeNotificationObjectExpiredEvent = loadExampleEvent( - 's3EventBridgeNotificationObjectExpiredEvent.json' - ); + const s3EventBridgeNotificationObjectExpiredEvent = + TestEvents.s3EventBridgeNotificationObjectExpiredEvent; + expect( S3EventNotificationEventBridgeSchema.parse( s3EventBridgeNotificationObjectExpiredEvent @@ -51,27 +52,27 @@ describe('S3 ', () => { }); it('should parse s3 sqs notification event', () => { - const s3SqsEvent = loadExampleEvent('s3SqsEvent.json'); + const s3SqsEvent = TestEvents.s3SqsEvent; expect(S3SqsEventNotificationSchema.parse(s3SqsEvent)).toEqual(s3SqsEvent); }); it('should parse s3 event with decoded key', () => { - const s3EventDecodedKey = loadExampleEvent('s3EventDecodedKey.json'); + const s3EventDecodedKey = TestEvents.s3EventDecodedKey; expect(S3Schema.parse(s3EventDecodedKey)).toEqual(s3EventDecodedKey); }); it('should parse s3 event delete object', () => { - const s3EventDeleteObject = loadExampleEvent('s3EventDeleteObject.json'); + const s3EventDeleteObject = TestEvents.s3EventDeleteObject; expect(S3Schema.parse(s3EventDeleteObject)).toEqual(s3EventDeleteObject); }); it('should parse s3 event glacier', () => { - const s3EventGlacier = loadExampleEvent('s3EventGlacier.json'); + const s3EventGlacier = TestEvents.s3EventGlacier; expect(S3Schema.parse(s3EventGlacier)).toEqual(s3EventGlacier); }); it('should parse s3 object event iam user', () => { - const s3ObjectEventIAMUser = loadExampleEvent('s3ObjectEventIAMUser.json'); + const s3ObjectEventIAMUser = TestEvents.s3ObjectEventIAMUser; expect(S3ObjectLambdaEventSchema.parse(s3ObjectEventIAMUser)).toEqual( s3ObjectEventIAMUser ); @@ -79,9 +80,8 @@ describe('S3 ', () => { it('should parse s3 object event temp credentials', () => { // ignore any because we don't want typed json - const s3ObjectEventTempCredentials = loadExampleEvent( - 's3ObjectEventTempCredentials.json' - ) as any; // eslint-disable-line @typescript-eslint/no-explicit-any + const s3ObjectEventTempCredentials = + TestEvents.s3ObjectEventTempCredentials as any; // eslint-disable-line @typescript-eslint/no-explicit-any const parsed = S3ObjectLambdaEventSchema.parse( s3ObjectEventTempCredentials ); diff --git a/packages/parser/tests/unit/schema/ses.test.ts b/packages/parser/tests/unit/schema/ses.test.ts index eeb29f6a1b..3d714ea074 100644 --- a/packages/parser/tests/unit/schema/ses.test.ts +++ b/packages/parser/tests/unit/schema/ses.test.ts @@ -4,12 +4,12 @@ * @group unit/parser/schema/ */ -import { loadExampleEvent } from './utils.js'; import { SesSchema } from '../../../src/schemas/ses.js'; +import { TestEvents } from './utils.js'; describe('Schema:', () => { - const sesEvent = loadExampleEvent('sesEvent.json'); it('SES should parse ses event', () => { + const sesEvent = TestEvents.sesEvent; expect(SesSchema.parse(sesEvent)).toEqual(sesEvent); }); }); diff --git a/packages/parser/tests/unit/schema/sns.test.ts b/packages/parser/tests/unit/schema/sns.test.ts index 66ec7aa297..1875d20642 100644 --- a/packages/parser/tests/unit/schema/sns.test.ts +++ b/packages/parser/tests/unit/schema/sns.test.ts @@ -4,12 +4,12 @@ * @group unit/parser/schema/ */ -import { loadExampleEvent } from './utils.js'; import { SnsSchema } from '../../../src/schemas/sns.js'; +import { TestEvents } from './utils.js'; describe('Schema:', () => { - const snsEvent = loadExampleEvent('snsEvent.json'); it('SNS should parse sns event', () => { + const snsEvent = TestEvents.snsEvent; expect(SnsSchema.parse(snsEvent)).toEqual(snsEvent); }); }); diff --git a/packages/parser/tests/unit/schema/sqs.test.ts b/packages/parser/tests/unit/schema/sqs.test.ts index 191b843298..802c36da08 100644 --- a/packages/parser/tests/unit/schema/sqs.test.ts +++ b/packages/parser/tests/unit/schema/sqs.test.ts @@ -4,12 +4,12 @@ * @group unit/parser/schema/ */ -import { loadExampleEvent } from './utils.js'; import { SqsSchema } from '../../../src/schemas/sqs.js'; +import { TestEvents } from './utils.js'; describe('SQS ', () => { - const sqsEvent = loadExampleEvent('sqsEvent.json'); it('should parse sqs event', () => { + const sqsEvent = TestEvents.sqsEvent; expect(SqsSchema.parse(sqsEvent)).toEqual(sqsEvent); }); }); diff --git a/packages/parser/tests/unit/schema/utils.ts b/packages/parser/tests/unit/schema/utils.ts index 8101dfefdb..3a17df8570 100644 --- a/packages/parser/tests/unit/schema/utils.ts +++ b/packages/parser/tests/unit/schema/utils.ts @@ -1,7 +1,116 @@ import { readFileSync } from 'node:fs'; +import { z } from 'zod'; -export const loadExampleEvent = (fileName: string): unknown => { - const event = readFileSync(`./tests/events/${fileName}`, 'utf8'); +export const TestSchema = z.object({ + name: z.string(), + age: z.number().min(18).max(99), +}); - return JSON.parse(event); +const filenames = [ + 'activeMQEvent', + 'albEvent', + 'albEventPathTrailingSlash', + 'albMultiValueHeadersEvent', + 'apiGatewayAuthorizerRequestEvent', + 'apiGatewayAuthorizerTokenEvent', + 'apiGatewayAuthorizerV2Event', + 'apiGatewayProxyEvent', + 'apiGatewayProxyEventAnotherPath', + 'apiGatewayProxyEventPathTrailingSlash', + 'apiGatewayProxyEventPrincipalId', + 'apiGatewayProxyEvent_noVersionAuth', + 'apiGatewayProxyOtherEvent', + 'apiGatewayProxyV2Event', + 'apiGatewayProxyV2EventPathTrailingSlash', + 'apiGatewayProxyV2Event_GET', + 'apiGatewayProxyV2IamEvent', + 'apiGatewayProxyV2LambdaAuthorizerEvent', + 'apiGatewayProxyV2OtherGetEvent', + 'apiGatewayProxyV2SchemaMiddlewareInvalidEvent', + 'apiGatewayProxyV2SchemaMiddlewareValidEvent', + 'apiGatewaySchemaMiddlewareInvalidEvent', + 'apiGatewaySchemaMiddlewareValidEvent', + 'appSyncAuthorizerEvent', + 'appSyncAuthorizerResponse', + 'appSyncDirectResolver', + 'appSyncResolverEvent', + 'awsConfigRuleConfigurationChanged', + 'awsConfigRuleOversizedConfiguration', + 'awsConfigRuleScheduled', + 'bedrockAgentEvent', + 'bedrockAgentPostEvent', + 'cloudFormationCustomResourceCreateEvent', + 'cloudFormationCustomResourceDeleteEvent', + 'cloudFormationCustomResourceUpdateEvent', + 'cloudWatchDashboardEvent', + 'cloudWatchLogEvent', + 'codePipelineEvent', + 'codePipelineEventData', + 'codePipelineEventEmptyUserParameters', + 'codePipelineEventWithEncryptionKey', + 'cognitoCreateAuthChallengeEvent', + 'cognitoCustomMessageEvent', + 'cognitoDefineAuthChallengeEvent', + 'cognitoPostAuthenticationEvent', + 'cognitoPostConfirmationEvent', + 'cognitoPreAuthenticationEvent', + 'cognitoPreSignUpEvent', + 'cognitoPreTokenGenerationEvent', + 'cognitoUserMigrationEvent', + 'cognitoVerifyAuthChallengeResponseEvent', + 'connectContactFlowEventAll', + 'connectContactFlowEventMin', + 'dynamoStreamEvent', + 'eventBridgeEvent', + 'kafkaEventMsk', + 'kafkaEventSelfManaged', + 'kinesisFirehoseKinesisEvent', + 'kinesisFirehosePutEvent', + 'kinesisFirehoseSQSEvent', + 'kinesisStreamCloudWatchLogsEvent', + 'kinesisStreamEvent', + 'kinesisStreamEventOneRecord', + 'lambdaFunctionUrlEvent', + 'lambdaFunctionUrlEventPathTrailingSlash', + 'lambdaFunctionUrlIAMEvent', + 'rabbitMQEvent', + 's3Event', + 's3EventBridgeNotificationObjectCreatedEvent', + 's3EventBridgeNotificationObjectDeletedEvent', + 's3EventBridgeNotificationObjectExpiredEvent', + 's3EventBridgeNotificationObjectRestoreCompletedEvent', + 's3EventDecodedKey', + 's3EventDeleteObject', + 's3EventGlacier', + 's3ObjectEventIAMUser', + 's3ObjectEventTempCredentials', + 's3SqsEvent', + 'secretsManagerEvent', + 'sesEvent', + 'snsEvent', + 'snsSqsEvent', + 'snsSqsFifoEvent', + 'sqsEvent', + 'vpcLatticeEvent', + 'vpcLatticeEventPathTrailingSlash', + 'vpcLatticeEventV2PathTrailingSlash', + 'vpcLatticeV2Event', +] as const; + +type TestEvents = { [K in (typeof filenames)[number]]: unknown }; +const loadFileContent = (filename: string): string => + readFileSync(`./tests/events/${filename}.json`, 'utf-8'); + +const createTestEvents = (fileList: readonly string[]): TestEvents => { + const testEvents: Partial = {}; + + fileList.forEach((filename) => { + Object.defineProperty(testEvents, filename, { + get: () => JSON.parse(loadFileContent(filename)), + }); + }); + + return testEvents as TestEvents; }; + +export const TestEvents = createTestEvents(filenames); diff --git a/packages/parser/tests/unit/schema/vpc-lattice.test.ts b/packages/parser/tests/unit/schema/vpc-lattice.test.ts index ea0a0dd4a4..576efa623f 100644 --- a/packages/parser/tests/unit/schema/vpc-lattice.test.ts +++ b/packages/parser/tests/unit/schema/vpc-lattice.test.ts @@ -4,18 +4,17 @@ * @group unit/parser/schema/ */ -import { loadExampleEvent } from './utils.js'; import { VpcLatticeSchema } from '../../../src/schemas/vpc-lattice.js'; +import { TestEvents } from './utils.js'; describe('VPC Lattice ', () => { it('should parse vpc lattice event', () => { - const vpcLatticeEvent = loadExampleEvent('vpcLatticeEvent.json'); + const vpcLatticeEvent = TestEvents.vpcLatticeEvent; expect(VpcLatticeSchema.parse(vpcLatticeEvent)).toEqual(vpcLatticeEvent); }); it('should parse vpc lattice path trailing slash event', () => { - const vpcLatticeEventPathTrailingSlash = loadExampleEvent( - 'vpcLatticeEventPathTrailingSlash.json' - ); + const vpcLatticeEventPathTrailingSlash = + TestEvents.vpcLatticeEventPathTrailingSlash; expect(VpcLatticeSchema.parse(vpcLatticeEventPathTrailingSlash)).toEqual( vpcLatticeEventPathTrailingSlash ); diff --git a/packages/parser/tests/unit/schema/vpc-latticev2.test.ts b/packages/parser/tests/unit/schema/vpc-latticev2.test.ts index da6d7d885e..e93deb24c1 100644 --- a/packages/parser/tests/unit/schema/vpc-latticev2.test.ts +++ b/packages/parser/tests/unit/schema/vpc-latticev2.test.ts @@ -4,20 +4,19 @@ * @group unit/parser/schema/ */ -import { loadExampleEvent } from './utils.js'; import { VpcLatticeV2Schema } from '../../../src/schemas/vpc-latticev2.js'; +import { TestEvents } from './utils.js'; describe('VpcLatticeV2 ', () => { it('should parse VpcLatticeV2 event', () => { - const vpcLatticeV2Event = loadExampleEvent('vpcLatticeV2Event.json'); + const vpcLatticeV2Event = TestEvents.vpcLatticeV2Event; const parsed = VpcLatticeV2Schema.parse(vpcLatticeV2Event); expect(parsed).toEqual(vpcLatticeV2Event); }); it('should parse VpcLatticeV2PathTrailingSlash event', () => { - const vpcLatticeEventV2PathTrailingSlash = loadExampleEvent( - 'vpcLatticeEventV2PathTrailingSlash.json' - ); + const vpcLatticeEventV2PathTrailingSlash = + TestEvents.vpcLatticeEventV2PathTrailingSlash; const parsed = VpcLatticeV2Schema.parse(vpcLatticeEventV2PathTrailingSlash); expect(parsed).toEqual(vpcLatticeEventV2PathTrailingSlash); }); From 803f8d9874520b80add45edf6bb979229e8642d7 Mon Sep 17 00:00:00 2001 From: Alexander Schueren Date: Wed, 20 Dec 2023 09:55:49 +0100 Subject: [PATCH 51/60] feat(parser): implement middy parser middleware (#1823) * add middy middleware * add type to imports * remove schema type, stick with unkown --- .../{eventbridge.ts => event-bridge.ts} | 0 packages/parser/src/middleware/parser.ts | 56 ++++++++ packages/parser/src/types/envelope.ts | 29 +++++ .../tests/unit/envelopes/eventbridge.test.ts | 2 +- packages/parser/tests/unit/parser.test.ts | 123 ++++++++++++++++++ 5 files changed, 209 insertions(+), 1 deletion(-) rename packages/parser/src/envelopes/{eventbridge.ts => event-bridge.ts} (100%) create mode 100644 packages/parser/src/middleware/parser.ts create mode 100644 packages/parser/src/types/envelope.ts create mode 100644 packages/parser/tests/unit/parser.test.ts diff --git a/packages/parser/src/envelopes/eventbridge.ts b/packages/parser/src/envelopes/event-bridge.ts similarity index 100% rename from packages/parser/src/envelopes/eventbridge.ts rename to packages/parser/src/envelopes/event-bridge.ts diff --git a/packages/parser/src/middleware/parser.ts b/packages/parser/src/middleware/parser.ts new file mode 100644 index 0000000000..2a79ad0a3f --- /dev/null +++ b/packages/parser/src/middleware/parser.ts @@ -0,0 +1,56 @@ +import { type MiddyLikeRequest } from '@aws-lambda-powertools/commons/types'; +import { type MiddlewareObj } from '@middy/core'; +import { type ZodSchema } from 'zod'; +import { type Envelope } from '../types/envelope.js'; + +interface ParserOptions { + schema: S; + envelope?: Envelope; +} + +/** + * A middiy middleware to parse your event. + * + * @exmaple + * ```typescript + * import { parser } from '@aws-lambda-powertools/parser/middleware'; + * import middy from '@middy/core'; + * import { sqsEnvelope } from '@aws-lambda-powertools/parser/envelopes/sqs;' + * + * const oderSchema = z.object({ + * id: z.number(), + * description: z.string(), + * quantity: z.number(), + * }); + * + * type Order = z.infer; + * + * export const handler = middy( + * async (event: Order, _context: unknown): Promise => { + * // event is validated as sqs message envelope + * // the body is unwrapped and parsed into object ready to use + * // you can now use event as Order in your code + * } + * ).use(parser({ schema: oderSchema, envelope: sqsEnvelope })); + * ``` + * + * @param options + */ +const parser = ( + options: ParserOptions +): MiddlewareObj => { + const before = (request: MiddyLikeRequest): void => { + const { schema, envelope } = options; + if (envelope) { + request.event = envelope(request.event, schema); + } else { + request.event = schema.parse(request.event); + } + }; + + return { + before, + }; +}; + +export { parser }; diff --git a/packages/parser/src/types/envelope.ts b/packages/parser/src/types/envelope.ts new file mode 100644 index 0000000000..e54958dca2 --- /dev/null +++ b/packages/parser/src/types/envelope.ts @@ -0,0 +1,29 @@ +import { type apiGatewayEnvelope } from '../envelopes/apigw.js'; +import { type apiGatewayV2Envelope } from '../envelopes/apigwv2.js'; +import { type cloudWatchEnvelope } from '../envelopes/cloudwatch.js'; +import { type dynamoDDStreamEnvelope } from '../envelopes/dynamodb.js'; +import { type kafkaEnvelope } from '../envelopes/kafka.js'; +import { type kinesisEnvelope } from '../envelopes/kinesis.js'; +import { type kinesisFirehoseEnvelope } from '../envelopes/kinesis-firehose.js'; +import { type lambdaFunctionUrlEnvelope } from '../envelopes/lambda.js'; +import { type snsEnvelope, type snsSqsEnvelope } from '../envelopes/sns.js'; +import { type sqsEnvelope } from '../envelopes/sqs.js'; +import { type vpcLatticeEnvelope } from '../envelopes/vpc-lattice.js'; +import { type vpcLatticeV2Envelope } from '../envelopes/vpc-latticev2.js'; +import { type eventBridgeEnvelope } from '../envelopes/event-bridge.js'; + +export type Envelope = + | typeof apiGatewayEnvelope + | typeof apiGatewayV2Envelope + | typeof cloudWatchEnvelope + | typeof dynamoDDStreamEnvelope + | typeof eventBridgeEnvelope + | typeof kafkaEnvelope + | typeof kinesisEnvelope + | typeof kinesisFirehoseEnvelope + | typeof lambdaFunctionUrlEnvelope + | typeof snsEnvelope + | typeof snsSqsEnvelope + | typeof sqsEnvelope + | typeof vpcLatticeEnvelope + | typeof vpcLatticeV2Envelope; diff --git a/packages/parser/tests/unit/envelopes/eventbridge.test.ts b/packages/parser/tests/unit/envelopes/eventbridge.test.ts index ee8c62a95c..8212e77d9f 100644 --- a/packages/parser/tests/unit/envelopes/eventbridge.test.ts +++ b/packages/parser/tests/unit/envelopes/eventbridge.test.ts @@ -7,7 +7,7 @@ import { TestEvents, TestSchema } from '../schema/utils.js'; import { generateMock } from '@anatine/zod-mock'; import { EventBridgeEvent } from 'aws-lambda'; -import { eventBridgeEnvelope } from '../../../src/envelopes/eventbridge.js'; +import { eventBridgeEnvelope } from '../../../src/envelopes/event-bridge.js'; describe('EventBridgeEnvelope ', () => { it('should parse eventbridge event', () => { diff --git a/packages/parser/tests/unit/parser.test.ts b/packages/parser/tests/unit/parser.test.ts new file mode 100644 index 0000000000..979892a21c --- /dev/null +++ b/packages/parser/tests/unit/parser.test.ts @@ -0,0 +1,123 @@ +/** + * Test middleware parser + * + * @group unit/parser + */ + +import middy from '@middy/core'; +import { Context } from 'aws-lambda'; +import { parser } from '../../src/middleware/parser.js'; +import { generateMock } from '@anatine/zod-mock'; +import { SqsSchema } from '../../src/schemas/sqs.js'; +import { z, type ZodSchema } from 'zod'; +import { sqsEnvelope } from '../../src/envelopes/sqs'; +import { TestSchema } from './schema/utils'; + +describe('Middleware: parser', () => { + type schema = z.infer; + const handler = async ( + event: unknown, + _context: Context + ): Promise => { + return event; + }; + + describe(' when envelope is provided ', () => { + const middyfiedHandler = middy(handler).use( + parser({ schema: TestSchema, envelope: sqsEnvelope }) + ); + + it('should parse request body with schema and envelope', async () => { + const bodyMock = generateMock(TestSchema); + parser({ schema: TestSchema, envelope: sqsEnvelope }); + + const event = generateMock(SqsSchema, { + stringMap: { + body: () => JSON.stringify(bodyMock), + }, + }); + + const result = (await middyfiedHandler(event, {} as Context)) as schema[]; + result.forEach((item) => { + expect(item).toEqual(bodyMock); + }); + }); + + it('should throw when envelope does not match', async () => { + await expect(async () => { + await middyfiedHandler({ name: 'John', age: 18 }, {} as Context); + }).rejects.toThrowError(); + }); + + it('should throw when schema does not match', async () => { + const event = generateMock(SqsSchema, { + stringMap: { + body: () => '42', + }, + }); + + await expect(middyfiedHandler(event, {} as Context)).rejects.toThrow(); + }); + it('should throw when provided schema is invalid', async () => { + const middyfiedHandler = middy(handler).use( + parser({ schema: {} as ZodSchema, envelope: sqsEnvelope }) + ); + + await expect(middyfiedHandler(42, {} as Context)).rejects.toThrowError(); + }); + it('should throw when envelope is correct but schema is invalid', async () => { + const event = generateMock(SqsSchema, { + stringMap: { + body: () => JSON.stringify({ name: 'John', foo: 'bar' }), + }, + }); + + const middyfiedHandler = middy(handler).use( + parser({ schema: {} as ZodSchema, envelope: sqsEnvelope }) + ); + + await expect( + middyfiedHandler(event, {} as Context) + ).rejects.toThrowError(); + }); + }); + + describe(' when envelope is not provided', () => { + it('should parse the event with built-in schema', async () => { + const event = generateMock(SqsSchema); + + const middyfiedHandler = middy(handler).use( + parser({ schema: SqsSchema }) + ); + + expect(await middyfiedHandler(event, {} as Context)).toEqual(event); + }); + + it('should parse custom event', async () => { + const event = { name: 'John', age: 18 }; + const middyfiedHandler = middy(handler).use( + parser({ schema: TestSchema }) + ); + + expect(await middyfiedHandler(event, {} as Context)).toEqual(event); + }); + + it('should throw when the schema does not match', async () => { + const middyfiedHandler = middy(handler).use( + parser({ schema: TestSchema }) + ); + + await expect(middyfiedHandler(42, {} as Context)).rejects.toThrow(); + }); + + it('should throw when provided schema is invalid', async () => { + const middyfiedHandler = middy(handler).use( + parser({ schema: {} as ZodSchema }) + ); + + await expect( + middyfiedHandler({ foo: 'bar' }, {} as Context) + ).rejects.toThrowError(); + }); + }); +}); From 5343894be856011bf4f0b512c66f072193ed6fd5 Mon Sep 17 00:00:00 2001 From: Alexander Schueren Date: Thu, 21 Dec 2023 20:08:12 +0100 Subject: [PATCH 52/60] feat(parser): implement parser decorator (#1831) --- packages/parser/src/middleware/parser.ts | 7 +- packages/parser/src/parser.ts | 59 +++++++++ packages/parser/src/types/ParserOptions.ts | 9 ++ .../tests/unit/parser.decorator.test.ts | 118 ++++++++++++++++++ .../{parser.test.ts => parser.middy.test.ts} | 0 5 files changed, 187 insertions(+), 6 deletions(-) create mode 100644 packages/parser/src/parser.ts create mode 100644 packages/parser/src/types/ParserOptions.ts create mode 100644 packages/parser/tests/unit/parser.decorator.test.ts rename packages/parser/tests/unit/{parser.test.ts => parser.middy.test.ts} (100%) diff --git a/packages/parser/src/middleware/parser.ts b/packages/parser/src/middleware/parser.ts index 2a79ad0a3f..8a2c26c327 100644 --- a/packages/parser/src/middleware/parser.ts +++ b/packages/parser/src/middleware/parser.ts @@ -1,12 +1,7 @@ import { type MiddyLikeRequest } from '@aws-lambda-powertools/commons/types'; import { type MiddlewareObj } from '@middy/core'; import { type ZodSchema } from 'zod'; -import { type Envelope } from '../types/envelope.js'; - -interface ParserOptions { - schema: S; - envelope?: Envelope; -} +import { type ParserOptions } from '../types/ParserOptions.js'; /** * A middiy middleware to parse your event. diff --git a/packages/parser/src/parser.ts b/packages/parser/src/parser.ts new file mode 100644 index 0000000000..c3ba727ae3 --- /dev/null +++ b/packages/parser/src/parser.ts @@ -0,0 +1,59 @@ +import { HandlerMethodDecorator } from '@aws-lambda-powertools/commons/types'; +import { Context, Handler } from 'aws-lambda'; +import { ZodSchema } from 'zod'; +import { type ParserOptions } from './types/ParserOptions.js'; + +/** + * A decorator to parse your event. + * + * @example + * ```typescript + * + * import { parser } from '@aws-lambda-powertools/parser'; + * import { sqsEnvelope } from '@aws-lambda-powertools/parser/envelopes/sqs'; + * + * + * const Order = z.object({ + * orderId: z.string(), + * description: z.string(), + * } + * + * class Lambda extends LambdaInterface { + * + * @parser({ envelope: sqsEnvelope, schema: OrderSchema }) + * public async handler(event: Order, _context: Context): Promise { + * // sqs event is parsed and the payload is extracted and parsed + * // apply business logic to your Order event + * const res = processOrder(event); + * return res; + * } + * } + * + * @param options + */ +const parser = ( + options: ParserOptions +): HandlerMethodDecorator => { + return (_target, _propertyKey, descriptor) => { + const original = descriptor.value!; + + const { schema, envelope } = options; + + descriptor.value = async function ( + this: Handler, + event: unknown, + context: Context, + callback + ) { + const parsedEvent = envelope + ? envelope(event, schema) + : schema.parse(event); + + return original.call(this, parsedEvent, context, callback); + }; + + return descriptor; + }; +}; + +export { parser }; diff --git a/packages/parser/src/types/ParserOptions.ts b/packages/parser/src/types/ParserOptions.ts new file mode 100644 index 0000000000..efdf91cf95 --- /dev/null +++ b/packages/parser/src/types/ParserOptions.ts @@ -0,0 +1,9 @@ +import type { ZodSchema } from 'zod'; +import { Envelope } from './envelope.js'; + +type ParserOptions = { + schema: S; + envelope?: Envelope; +}; + +export { type ParserOptions }; diff --git a/packages/parser/tests/unit/parser.decorator.test.ts b/packages/parser/tests/unit/parser.decorator.test.ts new file mode 100644 index 0000000000..eba2a3b59b --- /dev/null +++ b/packages/parser/tests/unit/parser.decorator.test.ts @@ -0,0 +1,118 @@ +/** + * Test decorator parser + * + * @group unit/parser + */ + +import { LambdaInterface } from '@aws-lambda-powertools/commons/lib/esm/types'; +import { Context, EventBridgeEvent } from 'aws-lambda'; +import { parser } from '../../src/parser'; +import { TestSchema, TestEvents } from './schema/utils'; +import { generateMock } from '@anatine/zod-mock'; +import { eventBridgeEnvelope } from '../../src/envelopes/event-bridge'; +import { EventBridgeSchema } from '../../src/schemas/eventbridge'; +import { z } from 'zod'; + +describe('Parser Decorator', () => { + const customEventBridgeSchema = EventBridgeSchema.extend({ + detail: TestSchema, + }); + + type TestSchema = z.infer; + + class TestClass implements LambdaInterface { + @parser({ schema: TestSchema }) + public async handler( + event: TestSchema, + _context: Context + ): Promise { + return event; + } + + @parser({ schema: customEventBridgeSchema }) + public async handlerWithCustomSchema( + event: unknown, + _context: Context + ): Promise { + return event; + } + + @parser({ schema: TestSchema, envelope: eventBridgeEnvelope }) + public async handlerWithParserCallsAnotherMethod( + event: unknown, + _context: Context + ): Promise { + return this.anotherMethod(event as TestSchema); + } + + @parser({ envelope: eventBridgeEnvelope, schema: TestSchema }) + public async handlerWithSchemaAndEnvelope( + event: unknown, + _context: Context + ): Promise { + return event; + } + + private async anotherMethod(event: TestSchema): Promise { + return event; + } + } + + const lambda = new TestClass(); + + it('should parse custom schema event', async () => { + const testEvent = generateMock(TestSchema); + + const resp = await lambda.handler(testEvent, {} as Context); + + expect(resp).toEqual(testEvent); + }); + + it('should parse custom schema with envelope event', async () => { + const customPayload = generateMock(TestSchema); + const testEvent = TestEvents.eventBridgeEvent as EventBridgeEvent< + string, + unknown + >; + testEvent.detail = customPayload; + + const resp = await lambda.handlerWithSchemaAndEnvelope( + testEvent, + {} as Context + ); + + expect(resp).toEqual(customPayload); + }); + + it('should parse extended envelope event', async () => { + const customPayload = generateMock(TestSchema); + + const testEvent = generateMock(customEventBridgeSchema); + testEvent.detail = customPayload; + + const resp: z.infer = + (await lambda.handlerWithCustomSchema( + testEvent, + {} as Context + )) as z.infer; + + expect(customEventBridgeSchema.parse(resp)).toEqual(testEvent); + expect(resp.detail).toEqual(customPayload); + }); + + it('should parse and call private async method', async () => { + const customPayload = generateMock(TestSchema); + const testEvent = TestEvents.eventBridgeEvent as EventBridgeEvent< + string, + unknown + >; + testEvent.detail = customPayload; + + const resp = await lambda.handlerWithParserCallsAnotherMethod( + testEvent, + {} as Context + ); + + expect(resp).toEqual(customPayload); + }); +}); diff --git a/packages/parser/tests/unit/parser.test.ts b/packages/parser/tests/unit/parser.middy.test.ts similarity index 100% rename from packages/parser/tests/unit/parser.test.ts rename to packages/parser/tests/unit/parser.middy.test.ts From d81445d48f68f936f7df10a23075602ba2cb49b3 Mon Sep 17 00:00:00 2001 From: Alexander Schueren Date: Wed, 6 Mar 2024 10:03:52 +0100 Subject: [PATCH 53/60] feat(parser): add types for built-in schemas (#1838) * add types for built-in schemas * fixed imports * only use top level schema --- packages/parser/src/envelopes/kafka.ts | 3 +- packages/parser/src/types/schema.ts | 115 +++++++++++++++++- .../tests/unit/envelopes/apigwt.test.ts | 6 +- 3 files changed, 113 insertions(+), 11 deletions(-) diff --git a/packages/parser/src/envelopes/kafka.ts b/packages/parser/src/envelopes/kafka.ts index 32529d4255..86eb44063f 100644 --- a/packages/parser/src/envelopes/kafka.ts +++ b/packages/parser/src/envelopes/kafka.ts @@ -4,7 +4,6 @@ import { KafkaMskEventSchema, KafkaSelfManagedEventSchema, } from '../schemas/kafka.js'; -import { type KafkaRecord } from '../types/schema.js'; /** * Kafka event envelope to extract data within body key @@ -32,7 +31,7 @@ export const kafkaEnvelope = ( : KafkaSelfManagedEventSchema.parse(data); return Object.values(parsedEnvelope.records).map((topicRecord) => { - return topicRecord.map((record: KafkaRecord) => { + return topicRecord.map((record) => { return parse(record.value, schema); }); }); diff --git a/packages/parser/src/types/schema.ts b/packages/parser/src/types/schema.ts index cc5869a1e2..6e15f17bd0 100644 --- a/packages/parser/src/types/schema.ts +++ b/packages/parser/src/types/schema.ts @@ -1,17 +1,120 @@ -import { KafkaRecordSchema } from '../schemas/kafka.js'; +import { + KafkaSelfManagedEventSchema, + KafkaMskEventSchema, +} from '../schemas/kafka.js'; import { z } from 'zod'; import { KinesisDataStreamRecord, KinesisDataStreamRecordPayload, + KinesisDataStreamSchema, } from '../schemas/kinesis.js'; import { APIGatewayProxyEventSchema } from '../schemas/apigw.js'; +import { AlbSchema, AlbMultiValueHeadersSchema } from '../schemas/alb.js'; +import { APIGatewayProxyEventV2Schema } from '../schemas/apigwv2.js'; +import { DynamoDBStreamSchema } from '../schemas/dynamodb.js'; +import { SqsSchema } from '../schemas/sqs.js'; +import { + CloudFormationCustomResourceCreateSchema, + CloudFormationCustomResourceDeleteSchema, + CloudFormationCustomResourceUpdateSchema, +} from '../schemas/cloudformation-custom-resource.js'; +import { CloudWatchLogsSchema } from '../schemas/cloudwatch.js'; +import { EventBridgeSchema } from '../schemas/eventbridge.js'; +import { + KinesisFirehoseSchema, + KinesisFirehoseSqsSchema, +} from '../schemas/kinesis-firehose.js'; +import { LambdaFunctionUrlSchema } from '../schemas/lambda.js'; +import { + S3EventNotificationEventBridgeSchema, + S3Schema, + S3SqsEventNotificationSchema, +} from '../schemas/s3.js'; +import { SesSchema } from '../schemas/ses.js'; +import { SnsSchema } from '../schemas/sns.js'; +import { VpcLatticeSchema } from '../schemas/vpc-lattice.js'; +import { VpcLatticeV2Schema } from '../schemas/vpc-latticev2.js'; + +type ALBEvent = z.infer; + +type ALBMultiValueHeadersEvent = z.infer; + +type APIGatewayProxyEvent = z.infer; +type APIGatewayProxyEventV2 = z.infer; -export type KafkaRecord = z.infer; +type CloudFormationCustomResourceCreateEvent = z.infer< + typeof CloudFormationCustomResourceCreateSchema +>; -export type KinesisDataStreamRecord = z.infer; +type CloudFormationCustomResourceDeleteEvent = z.infer< + typeof CloudFormationCustomResourceDeleteSchema +>; -export type KinesisDataStreamRecordPayload = z.infer< - typeof KinesisDataStreamRecordPayload +type CloudFormationCustomResourceUpdateEvent = z.infer< + typeof CloudFormationCustomResourceUpdateSchema >; -export type ApiGatewayProxyEvent = z.infer; +type CloudWatchLogsEvent = z.infer; + +type DynamoDBStreamEvent = z.infer; + +type EventBridgeEvent = z.infer; + +type KafkaSelfManagedEvent = z.infer; + +type KafkaMskEvent = z.infer; + +type KinesisDataStreamEvent = z.infer; + +type KinesisFireHoseEvent = z.infer; + +type KinesisFireHoseSqsEvent = z.infer; + +type LambdaFunctionUrlEvent = z.infer; + +type S3Event = z.infer; + +type S3EventNotificationEventBridge = z.infer< + typeof S3EventNotificationEventBridgeSchema +>; + +type S3SqsEventNotification = z.infer; + +type SesEvent = z.infer; + +type SnsEvent = z.infer; + +type SqsEvent = z.infer; + +type VpcLatticeEvent = z.infer; + +type VpcLatticeEventV2 = z.infer; + +export { + type ALBEvent, + type ALBMultiValueHeadersEvent, + type APIGatewayProxyEvent, + type APIGatewayProxyEventV2, + type CloudFormationCustomResourceCreateEvent, + type CloudFormationCustomResourceDeleteEvent, + type CloudFormationCustomResourceUpdateEvent, + type CloudWatchLogsEvent, + type DynamoDBStreamEvent, + type EventBridgeEvent, + type KafkaSelfManagedEvent, + type KafkaMskEvent, + type KinesisDataStreamEvent, + type KinesisDataStreamRecord, + type KinesisDataStreamRecordPayload, + type KinesisFireHoseEvent, + type KinesisFireHoseSqsEvent, + type LambdaFunctionUrlEvent, + type S3Event, + type S3EventNotificationEventBridge, + type S3SqsEventNotification, + type SesEvent, + type SnsEvent, + type SqsEvent, + type VpcLatticeEvent, + type VpcLatticeEventV2, +}; diff --git a/packages/parser/tests/unit/envelopes/apigwt.test.ts b/packages/parser/tests/unit/envelopes/apigwt.test.ts index 6c51736b16..b50e18b439 100644 --- a/packages/parser/tests/unit/envelopes/apigwt.test.ts +++ b/packages/parser/tests/unit/envelopes/apigwt.test.ts @@ -6,13 +6,13 @@ import { generateMock } from '@anatine/zod-mock'; import { TestEvents, TestSchema } from '../schema/utils.js'; -import { ApiGatewayProxyEvent } from '../../../src/types/schema.js'; +import { APIGatewayProxyEvent } from '../../../src/types/schema.js'; import { apiGatewayEnvelope } from '../../../src/envelopes/apigw'; describe('ApigwEnvelope ', () => { it('should parse custom schema in envelope', () => { const testCustomSchemaObject = generateMock(TestSchema); - const testEvent = TestEvents.apiGatewayProxyEvent as ApiGatewayProxyEvent; + const testEvent = TestEvents.apiGatewayProxyEvent as APIGatewayProxyEvent; testEvent.body = JSON.stringify(testCustomSchemaObject); @@ -21,7 +21,7 @@ describe('ApigwEnvelope ', () => { }); it('should throw no body provided', () => { - const testEvent = TestEvents.apiGatewayProxyEvent as ApiGatewayProxyEvent; + const testEvent = TestEvents.apiGatewayProxyEvent as APIGatewayProxyEvent; testEvent.body = undefined; expect(() => apiGatewayEnvelope(testEvent, TestSchema)).toThrow(); From b348b957c8ff1b3eb90a6c66ba17002bc9b5234b Mon Sep 17 00:00:00 2001 From: Alexander Schueren Date: Mon, 11 Mar 2024 14:04:46 +0100 Subject: [PATCH 54/60] chore(parser): add parser subpath exports to package.json (#2179) * add exports and type version to package json, including index.js * use index.js as import for coverage * use package lock from main * fix envelope path and add types to exports * use explicit exports instead of * * import type * make export types explicit * adjust imports in tests for coverage, removed unused exports * remove duplicate imports --- package-lock.json | 6188 +++++++++++------ packages/parser/package.json | 36 + packages/parser/src/envelopes/index.ts | 13 + packages/parser/src/index.ts | 1 + packages/parser/src/parser.ts | 4 +- packages/parser/src/schemas/index.ts | 33 + packages/parser/src/types/ParserOptions.ts | 4 +- packages/parser/src/types/index.ts | 31 + .../tests/unit/envelopes/apigwt.test.ts | 4 +- .../tests/unit/envelopes/apigwv2.test.ts | 2 +- .../tests/unit/envelopes/cloudwatch.test.ts | 4 +- .../tests/unit/envelopes/dynamodb.test.ts | 2 +- .../tests/unit/envelopes/eventbridge.test.ts | 2 +- .../parser/tests/unit/envelopes/kafka.test.ts | 2 +- .../unit/envelopes/kinesis-firehose.test.ts | 4 +- .../tests/unit/envelopes/kinesis.test.ts | 2 +- .../tests/unit/envelopes/lambda.test.ts | 2 +- .../parser/tests/unit/envelopes/sns.test.ts | 2 +- .../parser/tests/unit/envelopes/sqs.test.ts | 2 +- .../tests/unit/envelopes/vpc-lattice.test.ts | 4 +- .../unit/envelopes/vpc-latticev2.test.ts | 4 +- .../tests/unit/parser.decorator.test.ts | 8 +- .../parser/tests/unit/parser.middy.test.ts | 4 +- packages/parser/tests/unit/schema/alb.test.ts | 5 +- .../parser/tests/unit/schema/apigw.test.ts | 2 +- .../parser/tests/unit/schema/apigwv2.test.ts | 2 +- .../cloudformation-custom-resource.test.ts | 2 +- .../tests/unit/schema/cloudwatch.test.ts | 2 +- .../parser/tests/unit/schema/dynamodb.test.ts | 2 +- .../tests/unit/schema/eventbridge.test.ts | 2 +- .../parser/tests/unit/schema/kafka.test.ts | 2 +- .../parser/tests/unit/schema/kinesis.test.ts | 4 +- .../parser/tests/unit/schema/lambda.test.ts | 2 +- packages/parser/tests/unit/schema/s3.test.ts | 2 +- packages/parser/tests/unit/schema/ses.test.ts | 2 +- packages/parser/tests/unit/schema/sns.test.ts | 2 +- packages/parser/tests/unit/schema/sqs.test.ts | 2 +- .../tests/unit/schema/vpc-lattice.test.ts | 2 +- .../tests/unit/schema/vpc-latticev2.test.ts | 2 +- 39 files changed, 4029 insertions(+), 2366 deletions(-) create mode 100644 packages/parser/src/envelopes/index.ts create mode 100644 packages/parser/src/schemas/index.ts diff --git a/package-lock.json b/package-lock.json index acdf278931..237963475e 100644 --- a/package-lock.json +++ b/package-lock.json @@ -103,14 +103,6 @@ "typescript": "^5.3.3" } }, - "examples/cdk/node_modules/@types/node": { - "version": "20.11.24", - "dev": true, - "license": "MIT", - "dependencies": { - "undici-types": "~5.26.4" - } - }, "examples/sam": { "name": "sam-example", "version": "2.0.2", @@ -155,19 +147,21 @@ }, "node_modules/@aashutoshrathi/word-wrap": { "version": "1.2.6", + "resolved": "https://registry.npmjs.org/@aashutoshrathi/word-wrap/-/word-wrap-1.2.6.tgz", + "integrity": "sha512-1Yjs2SvM8TflER/OD3cOjhWWOZb58A2t7wpE2S9XfBYTiIl+XFhQG2bjy4Pu1I+EAlCNUzRDYDdFwFYUKvXcIA==", "dev": true, - "license": "MIT", "engines": { "node": ">=0.10.0" } }, "node_modules/@ampproject/remapping": { - "version": "2.3.0", + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/@ampproject/remapping/-/remapping-2.2.1.tgz", + "integrity": "sha512-lFMjJTrFL3j7L9yBxwYfCq2k6qqwHyzuUl/XBnif78PWTJYyL/dfowQHWE3sp6U6ZzqWiiIZnpTMO96zhkjwtg==", "dev": true, - "license": "Apache-2.0", "dependencies": { - "@jridgewell/gen-mapping": "^0.3.5", - "@jridgewell/trace-mapping": "^0.3.24" + "@jridgewell/gen-mapping": "^0.3.0", + "@jridgewell/trace-mapping": "^0.3.9" }, "engines": { "node": ">=6.0.0" @@ -175,8 +169,9 @@ }, "node_modules/@anatine/zod-mock": { "version": "3.13.3", + "resolved": "https://registry.npmjs.org/@anatine/zod-mock/-/zod-mock-3.13.3.tgz", + "integrity": "sha512-AN+0YEFE7s6BpuALQHhEoVmJmD+0gPnf4Fehc6oE5NHbM3X2ZD5fW5M6vvot29NWUB6nxvj0gu+BPQ9cVnxALw==", "dev": true, - "license": "MIT", "dependencies": { "randexp": "^0.5.3" }, @@ -187,26 +182,31 @@ }, "node_modules/@aws-cdk/asset-awscli-v1": { "version": "2.2.202", - "license": "Apache-2.0" + "resolved": "https://registry.npmjs.org/@aws-cdk/asset-awscli-v1/-/asset-awscli-v1-2.2.202.tgz", + "integrity": "sha512-JqlF0D4+EVugnG5dAsNZMqhu3HW7ehOXm5SDMxMbXNDMdsF0pxtQKNHRl52z1U9igsHmaFpUgSGjbhAJ+0JONg==" }, "node_modules/@aws-cdk/asset-kubectl-v20": { "version": "2.1.2", - "license": "Apache-2.0" + "resolved": "https://registry.npmjs.org/@aws-cdk/asset-kubectl-v20/-/asset-kubectl-v20-2.1.2.tgz", + "integrity": "sha512-3M2tELJOxQv0apCIiuKQ4pAbncz9GuLwnKFqxifWfe77wuMxyTRPmxssYHs42ePqzap1LT6GDcPygGs+hHstLg==" }, "node_modules/@aws-cdk/asset-node-proxy-agent-v6": { "version": "2.0.1", - "license": "Apache-2.0" + "resolved": "https://registry.npmjs.org/@aws-cdk/asset-node-proxy-agent-v6/-/asset-node-proxy-agent-v6-2.0.1.tgz", + "integrity": "sha512-DDt4SLdLOwWCjGtltH4VCST7hpOI5DzieuhGZsBpZ+AgJdSI2GCjklCXm0GCTwJG/SolkL5dtQXyUKgg9luBDg==" }, "node_modules/@aws-cdk/cli-lib-alpha": { "version": "2.121.1-alpha.0", - "license": "Apache-2.0", + "resolved": "https://registry.npmjs.org/@aws-cdk/cli-lib-alpha/-/cli-lib-alpha-2.121.1-alpha.0.tgz", + "integrity": "sha512-OG8VOukqFD4YFzmMN5+ppoVSvRugWaep7UVJle6JgvCN6/AvxTb2zCsAhhrCx4mDuckubD6WAkHNz2CRsFQAWg==", "engines": { "node": ">= 14.15.0" } }, "node_modules/@aws-crypto/crc32": { "version": "3.0.0", - "license": "Apache-2.0", + "resolved": "https://registry.npmjs.org/@aws-crypto/crc32/-/crc32-3.0.0.tgz", + "integrity": "sha512-IzSgsrxUcsrejQbPVilIKy16kAT52EwB6zSaI+M3xxIhKh5+aldEyvI+z6erM7TCLB2BJsFrtHjp6/4/sr+3dA==", "dependencies": { "@aws-crypto/util": "^3.0.0", "@aws-sdk/types": "^3.222.0", @@ -215,22 +215,26 @@ }, "node_modules/@aws-crypto/crc32/node_modules/tslib": { "version": "1.14.1", - "license": "0BSD" + "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.14.1.tgz", + "integrity": "sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==" }, "node_modules/@aws-crypto/ie11-detection": { "version": "3.0.0", - "license": "Apache-2.0", + "resolved": "https://registry.npmjs.org/@aws-crypto/ie11-detection/-/ie11-detection-3.0.0.tgz", + "integrity": "sha512-341lBBkiY1DfDNKai/wXM3aujNBkXR7tq1URPQDL9wi3AUbI80NR74uF1TXHMm7po1AcnFk8iu2S2IeU/+/A+Q==", "dependencies": { "tslib": "^1.11.1" } }, "node_modules/@aws-crypto/ie11-detection/node_modules/tslib": { "version": "1.14.1", - "license": "0BSD" + "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.14.1.tgz", + "integrity": "sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==" }, "node_modules/@aws-crypto/sha256-browser": { "version": "3.0.0", - "license": "Apache-2.0", + "resolved": "https://registry.npmjs.org/@aws-crypto/sha256-browser/-/sha256-browser-3.0.0.tgz", + "integrity": "sha512-8VLmW2B+gjFbU5uMeqtQM6Nj0/F1bro80xQXCW6CQBWgosFWXTx77aeOF5CAIAmbOK64SdMBJdNr6J41yP5mvQ==", "dependencies": { "@aws-crypto/ie11-detection": "^3.0.0", "@aws-crypto/sha256-js": "^3.0.0", @@ -244,11 +248,13 @@ }, "node_modules/@aws-crypto/sha256-browser/node_modules/tslib": { "version": "1.14.1", - "license": "0BSD" + "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.14.1.tgz", + "integrity": "sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==" }, "node_modules/@aws-crypto/sha256-js": { "version": "3.0.0", - "license": "Apache-2.0", + "resolved": "https://registry.npmjs.org/@aws-crypto/sha256-js/-/sha256-js-3.0.0.tgz", + "integrity": "sha512-PnNN7os0+yd1XvXAy23CFOmTbMaDxgxXtTKHybrJ39Y8kGzBATgBFibWJKH6BhytLI/Zyszs87xCOBNyBig6vQ==", "dependencies": { "@aws-crypto/util": "^3.0.0", "@aws-sdk/types": "^3.222.0", @@ -257,22 +263,26 @@ }, "node_modules/@aws-crypto/sha256-js/node_modules/tslib": { "version": "1.14.1", - "license": "0BSD" + "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.14.1.tgz", + "integrity": "sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==" }, "node_modules/@aws-crypto/supports-web-crypto": { "version": "3.0.0", - "license": "Apache-2.0", + "resolved": "https://registry.npmjs.org/@aws-crypto/supports-web-crypto/-/supports-web-crypto-3.0.0.tgz", + "integrity": "sha512-06hBdMwUAb2WFTuGG73LSC0wfPu93xWwo5vL2et9eymgmu3Id5vFAHBbajVWiGhPO37qcsdCap/FqXvJGJWPIg==", "dependencies": { "tslib": "^1.11.1" } }, "node_modules/@aws-crypto/supports-web-crypto/node_modules/tslib": { "version": "1.14.1", - "license": "0BSD" + "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.14.1.tgz", + "integrity": "sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==" }, "node_modules/@aws-crypto/util": { "version": "3.0.0", - "license": "Apache-2.0", + "resolved": "https://registry.npmjs.org/@aws-crypto/util/-/util-3.0.0.tgz", + "integrity": "sha512-2OJlpeJpCR48CC8r+uKVChzs9Iungj9wkZrl8Z041DWEWvyIHILYKCPNzJghKsivj+S3mLo6BVc7mBNzdxA46w==", "dependencies": { "@aws-sdk/types": "^3.222.0", "@aws-sdk/util-utf8-browser": "^3.0.0", @@ -281,7 +291,8 @@ }, "node_modules/@aws-crypto/util/node_modules/tslib": { "version": "1.14.1", - "license": "0BSD" + "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.14.1.tgz", + "integrity": "sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==" }, "node_modules/@aws-lambda-powertools/batch": { "resolved": "packages/batch", @@ -321,8 +332,9 @@ }, "node_modules/@aws-sdk/client-appconfigdata": { "version": "3.525.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/client-appconfigdata/-/client-appconfigdata-3.525.0.tgz", + "integrity": "sha512-GdtNOcTSzf5Gg4RxFskrVCNiyLi0KUMXjIueoDK1KdF7/aNCIAbIdqTaHZ4BwE9fma4JpKwexgCHX9myGeVinw==", "dev": true, - "license": "Apache-2.0", "dependencies": { "@aws-crypto/sha256-browser": "3.0.0", "@aws-crypto/sha256-js": "3.0.0", @@ -372,8 +384,9 @@ }, "node_modules/@aws-sdk/client-cloudwatch": { "version": "3.525.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/client-cloudwatch/-/client-cloudwatch-3.525.0.tgz", + "integrity": "sha512-qi73IN/cGDxixHKnO99UIzGhYshStPXsZou8PNp0ee6ZJgyEpwtj1lFAoAEAbYcD0/PjtXsVNCOpyA1VXNjDDQ==", "dev": true, - "license": "Apache-2.0", "dependencies": { "@aws-crypto/sha256-browser": "3.0.0", "@aws-crypto/sha256-js": "3.0.0", @@ -425,8 +438,9 @@ }, "node_modules/@aws-sdk/client-dynamodb": { "version": "3.528.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/client-dynamodb/-/client-dynamodb-3.528.0.tgz", + "integrity": "sha512-qqgw2NM4m+WgZ5owLe7+ThtCpjnRxTA19ojFcxcrnKksXngwNqcWof6/OXhGkumeN73IdS08upiw4904ZbjZlQ==", "dev": true, - "license": "Apache-2.0", "dependencies": { "@aws-crypto/sha256-browser": "3.0.0", "@aws-crypto/sha256-js": "3.0.0", @@ -476,9 +490,23 @@ "node": ">=14.0.0" } }, + "node_modules/@aws-sdk/client-dynamodb/node_modules/uuid": { + "version": "9.0.1", + "resolved": "https://registry.npmjs.org/uuid/-/uuid-9.0.1.tgz", + "integrity": "sha512-b+1eJOlsR9K8HJpow9Ok3fiWOWSIcIzXodvv0rQjVoOVNpWMpxf1wZNpt4y9h10odCNrqnYp1OBzRktckBe3sA==", + "dev": true, + "funding": [ + "https://github.com/sponsors/broofa", + "https://github.com/sponsors/ctavan" + ], + "bin": { + "uuid": "dist/bin/uuid" + } + }, "node_modules/@aws-sdk/client-lambda": { "version": "3.525.0", - "license": "Apache-2.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/client-lambda/-/client-lambda-3.525.0.tgz", + "integrity": "sha512-Jsz2F6X6DBV962T4wTyQgP2KqsIS3Hxw6shC5653tapCrR+AK2psFpeKs9w3SQA8D0SnEOAQf/5ay4n9sL+fZw==", "dependencies": { "@aws-crypto/sha256-browser": "3.0.0", "@aws-crypto/sha256-js": "3.0.0", @@ -532,8 +560,9 @@ }, "node_modules/@aws-sdk/client-secrets-manager": { "version": "3.525.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/client-secrets-manager/-/client-secrets-manager-3.525.0.tgz", + "integrity": "sha512-YhPfH87BWGNrkfV7VkP1EyjNzPkgqxen5aBqQKgJOxPy1M2+kNjqB9zQ/B/Q3T6cyQ/aduQ7Bi7bm3cqihmtbA==", "dev": true, - "license": "Apache-2.0", "dependencies": { "@aws-crypto/sha256-browser": "3.0.0", "@aws-crypto/sha256-js": "3.0.0", @@ -581,10 +610,24 @@ "node": ">=14.0.0" } }, + "node_modules/@aws-sdk/client-secrets-manager/node_modules/uuid": { + "version": "9.0.1", + "resolved": "https://registry.npmjs.org/uuid/-/uuid-9.0.1.tgz", + "integrity": "sha512-b+1eJOlsR9K8HJpow9Ok3fiWOWSIcIzXodvv0rQjVoOVNpWMpxf1wZNpt4y9h10odCNrqnYp1OBzRktckBe3sA==", + "dev": true, + "funding": [ + "https://github.com/sponsors/broofa", + "https://github.com/sponsors/ctavan" + ], + "bin": { + "uuid": "dist/bin/uuid" + } + }, "node_modules/@aws-sdk/client-ssm": { "version": "3.525.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/client-ssm/-/client-ssm-3.525.0.tgz", + "integrity": "sha512-q/z2CltlIePY/FGAFzuZpVRZuAzEopd2/YmQSCFtGZr04weKKXb+6qxdE3P3rdJf+a4MILcLszR3M+xmjK9Rlg==", "dev": true, - "license": "Apache-2.0", "dependencies": { "@aws-crypto/sha256-browser": "3.0.0", "@aws-crypto/sha256-js": "3.0.0", @@ -633,9 +676,23 @@ "node": ">=14.0.0" } }, + "node_modules/@aws-sdk/client-ssm/node_modules/uuid": { + "version": "9.0.1", + "resolved": "https://registry.npmjs.org/uuid/-/uuid-9.0.1.tgz", + "integrity": "sha512-b+1eJOlsR9K8HJpow9Ok3fiWOWSIcIzXodvv0rQjVoOVNpWMpxf1wZNpt4y9h10odCNrqnYp1OBzRktckBe3sA==", + "dev": true, + "funding": [ + "https://github.com/sponsors/broofa", + "https://github.com/sponsors/ctavan" + ], + "bin": { + "uuid": "dist/bin/uuid" + } + }, "node_modules/@aws-sdk/client-sso": { "version": "3.525.0", - "license": "Apache-2.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/client-sso/-/client-sso-3.525.0.tgz", + "integrity": "sha512-6KwGQWFoNLH1UupdWPFdKPfTgjSz1kN8/r8aCzuvvXBe4Pz+iDUZ6FEJzGWNc9AapjvZDNO1hs23slomM9rTaA==", "dependencies": { "@aws-crypto/sha256-browser": "3.0.0", "@aws-crypto/sha256-js": "3.0.0", @@ -682,7 +739,8 @@ }, "node_modules/@aws-sdk/client-sso-oidc": { "version": "3.525.0", - "license": "Apache-2.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/client-sso-oidc/-/client-sso-oidc-3.525.0.tgz", + "integrity": "sha512-zz13k/6RkjPSLmReSeGxd8wzGiiZa4Odr2Tv3wTcxClM4wOjD+zOgGv4Fe32b9AMqaueiCdjbvdu7AKcYxFA4A==", "dependencies": { "@aws-crypto/sha256-browser": "3.0.0", "@aws-crypto/sha256-js": "3.0.0", @@ -733,7 +791,8 @@ }, "node_modules/@aws-sdk/client-sts": { "version": "3.525.0", - "license": "Apache-2.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/client-sts/-/client-sts-3.525.0.tgz", + "integrity": "sha512-a8NUGRvO6rkfTZCbMaCsjDjLbERCwIUU9dIywFYcRgbFhkupJ7fSaZz3Het98U51M9ZbTEpaTa3fz0HaJv8VJw==", "dependencies": { "@aws-crypto/sha256-browser": "3.0.0", "@aws-crypto/sha256-js": "3.0.0", @@ -784,8 +843,9 @@ }, "node_modules/@aws-sdk/client-xray": { "version": "3.525.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/client-xray/-/client-xray-3.525.0.tgz", + "integrity": "sha512-A09mMsmi6oC0i+AW41hmxsIGZreN79js7g3rEgZU05kFC8UAnxhZ7fX1GUoMV9B1ww17r2eY9zS/45aEcEckNw==", "dev": true, - "license": "Apache-2.0", "dependencies": { "@aws-crypto/sha256-browser": "3.0.0", "@aws-crypto/sha256-js": "3.0.0", @@ -834,7 +894,8 @@ }, "node_modules/@aws-sdk/core": { "version": "3.525.0", - "license": "Apache-2.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/core/-/core-3.525.0.tgz", + "integrity": "sha512-E3LtEtMWCriQOFZpVKpLYzbdw/v2PAOEAMhn2VRRZ1g0/g1TXzQrfhEU2yd8l/vQEJaCJ82ooGGg7YECviBUxA==", "dependencies": { "@smithy/core": "^1.3.5", "@smithy/protocol-http": "^3.2.1", @@ -849,7 +910,8 @@ }, "node_modules/@aws-sdk/credential-provider-env": { "version": "3.523.0", - "license": "Apache-2.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/credential-provider-env/-/credential-provider-env-3.523.0.tgz", + "integrity": "sha512-Y6DWdH6/OuMDoNKVzZlNeBc6f1Yjk1lYMjANKpIhMbkRCvLJw/PYZKOZa8WpXbTYdgg9XLjKybnLIb3ww3uuzA==", "dependencies": { "@aws-sdk/types": "3.523.0", "@smithy/property-provider": "^2.1.3", @@ -862,7 +924,8 @@ }, "node_modules/@aws-sdk/credential-provider-http": { "version": "3.525.0", - "license": "Apache-2.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/credential-provider-http/-/credential-provider-http-3.525.0.tgz", + "integrity": "sha512-RNWQGuSBQZhl3iqklOslUEfQ4br1V3DCPboMpeqFtddUWJV3m2u2extFur9/4Uy+1EHVF120IwZUKtd8dF+ibw==", "dependencies": { "@aws-sdk/types": "3.523.0", "@smithy/fetch-http-handler": "^2.4.3", @@ -880,7 +943,8 @@ }, "node_modules/@aws-sdk/credential-provider-ini": { "version": "3.525.0", - "license": "Apache-2.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/credential-provider-ini/-/credential-provider-ini-3.525.0.tgz", + "integrity": "sha512-JDnccfK5JRb9jcgpc9lirL9PyCwGIqY0nKdw3LlX5WL5vTpTG4E1q7rLAlpNh7/tFD1n66Itarfv2tsyHMIqCw==", "dependencies": { "@aws-sdk/client-sts": "3.525.0", "@aws-sdk/credential-provider-env": "3.523.0", @@ -900,7 +964,8 @@ }, "node_modules/@aws-sdk/credential-provider-node": { "version": "3.525.0", - "license": "Apache-2.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/credential-provider-node/-/credential-provider-node-3.525.0.tgz", + "integrity": "sha512-RJXlO8goGXpnoHQAyrCcJ0QtWEOFa34LSbfdqBIjQX/fwnjUuEmiGdXTV3AZmwYQ7juk49tfBneHbtOP3AGqsQ==", "dependencies": { "@aws-sdk/credential-provider-env": "3.523.0", "@aws-sdk/credential-provider-http": "3.525.0", @@ -921,7 +986,8 @@ }, "node_modules/@aws-sdk/credential-provider-process": { "version": "3.523.0", - "license": "Apache-2.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/credential-provider-process/-/credential-provider-process-3.523.0.tgz", + "integrity": "sha512-f0LP9KlFmMvPWdKeUKYlZ6FkQAECUeZMmISsv6NKtvPCI9e4O4cLTeR09telwDK8P0HrgcRuZfXM7E30m8re0Q==", "dependencies": { "@aws-sdk/types": "3.523.0", "@smithy/property-provider": "^2.1.3", @@ -935,7 +1001,8 @@ }, "node_modules/@aws-sdk/credential-provider-sso": { "version": "3.525.0", - "license": "Apache-2.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/credential-provider-sso/-/credential-provider-sso-3.525.0.tgz", + "integrity": "sha512-7V7ybtufxdD3plxeIeB6aqHZeFIUlAyPphXIUgXrGY10iNcosL970rQPBeggsohe4gCM6UvY2TfMeEcr+ZE8FA==", "dependencies": { "@aws-sdk/client-sso": "3.525.0", "@aws-sdk/token-providers": "3.525.0", @@ -951,7 +1018,8 @@ }, "node_modules/@aws-sdk/credential-provider-web-identity": { "version": "3.525.0", - "license": "Apache-2.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/credential-provider-web-identity/-/credential-provider-web-identity-3.525.0.tgz", + "integrity": "sha512-sAukOjR1oKb2JXG4nPpuBFpSwGUhrrY17PG/xbTy8NAoLLhrqRwnErcLfdTfmj6tH+3094k6ws/Sh8a35ae7fA==", "dependencies": { "@aws-sdk/client-sts": "3.525.0", "@aws-sdk/types": "3.523.0", @@ -965,8 +1033,9 @@ }, "node_modules/@aws-sdk/endpoint-cache": { "version": "3.495.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/endpoint-cache/-/endpoint-cache-3.495.0.tgz", + "integrity": "sha512-XCDrpiS50WaPzPzp7FwsChPHtX9PQQUU4nRzcn2N7IkUtpcFCUx8m1PAZe086VQr6hrbdeE4Z4j8hUPNwVdJGQ==", "dev": true, - "license": "Apache-2.0", "dependencies": { "mnemonist": "0.38.3", "tslib": "^2.5.0" @@ -977,7 +1046,8 @@ }, "node_modules/@aws-sdk/is-array-buffer": { "version": "3.201.0", - "license": "Apache-2.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/is-array-buffer/-/is-array-buffer-3.201.0.tgz", + "integrity": "sha512-UPez5qLh3dNgt0DYnPD/q0mVJY84rA17QE26hVNOW3fAji8W2wrwrxdacWOxyXvlxWsVRcKmr+lay1MDqpAMfg==", "dependencies": { "tslib": "^2.3.1" }, @@ -987,8 +1057,9 @@ }, "node_modules/@aws-sdk/lib-dynamodb": { "version": "3.528.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/lib-dynamodb/-/lib-dynamodb-3.528.0.tgz", + "integrity": "sha512-BGyST10K2jRE8m+EuW8SVIMjsDd5/KkNhCv8Qm8dUsgSwSWSOokG0B0adOJBg5702X5j6N5mNi47Qd6mEViySA==", "dev": true, - "license": "Apache-2.0", "dependencies": { "@aws-sdk/util-dynamodb": "3.528.0", "@smithy/smithy-client": "^2.4.2", @@ -1004,8 +1075,9 @@ }, "node_modules/@aws-sdk/middleware-endpoint-discovery": { "version": "3.525.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/middleware-endpoint-discovery/-/middleware-endpoint-discovery-3.525.0.tgz", + "integrity": "sha512-nT/XYP3RDRWPFCTEOZQbOC3HWmUkxB0fDuobmH8WzL92MCBGz9gBG/q9XBxiw9pHk9Dky/MIkLV50BlGB3kM7g==", "dev": true, - "license": "Apache-2.0", "dependencies": { "@aws-sdk/endpoint-cache": "3.495.0", "@aws-sdk/types": "3.523.0", @@ -1020,7 +1092,8 @@ }, "node_modules/@aws-sdk/middleware-host-header": { "version": "3.523.0", - "license": "Apache-2.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/middleware-host-header/-/middleware-host-header-3.523.0.tgz", + "integrity": "sha512-4g3q7Ta9sdD9TMUuohBAkbx/e3I/juTqfKi7TPgP+8jxcYX72MOsgemAMHuP6CX27eyj4dpvjH+w4SIVDiDSmg==", "dependencies": { "@aws-sdk/types": "3.523.0", "@smithy/protocol-http": "^3.2.1", @@ -1033,7 +1106,8 @@ }, "node_modules/@aws-sdk/middleware-logger": { "version": "3.523.0", - "license": "Apache-2.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/middleware-logger/-/middleware-logger-3.523.0.tgz", + "integrity": "sha512-PeDNJNhfiaZx54LBaLTXzUaJ9LXFwDFFIksipjqjvxMafnoVcQwKbkoPUWLe5ytT4nnL1LogD3s55mERFUsnwg==", "dependencies": { "@aws-sdk/types": "3.523.0", "@smithy/types": "^2.10.1", @@ -1045,7 +1119,8 @@ }, "node_modules/@aws-sdk/middleware-recursion-detection": { "version": "3.523.0", - "license": "Apache-2.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/middleware-recursion-detection/-/middleware-recursion-detection-3.523.0.tgz", + "integrity": "sha512-nZ3Vt7ehfSDYnrcg/aAfjjvpdE+61B3Zk68i6/hSUIegT3IH9H1vSW67NDKVp+50hcEfzWwM2HMPXxlzuyFyrw==", "dependencies": { "@aws-sdk/types": "3.523.0", "@smithy/protocol-http": "^3.2.1", @@ -1058,7 +1133,8 @@ }, "node_modules/@aws-sdk/middleware-user-agent": { "version": "3.525.0", - "license": "Apache-2.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/middleware-user-agent/-/middleware-user-agent-3.525.0.tgz", + "integrity": "sha512-4al/6uO+t/QIYXK2OgqzDKQzzLAYJza1vWFS+S0lJ3jLNGyLB5BMU5KqWjDzevYZ4eCnz2Nn7z0FveUTNz8YdQ==", "dependencies": { "@aws-sdk/types": "3.523.0", "@aws-sdk/util-endpoints": "3.525.0", @@ -1072,7 +1148,8 @@ }, "node_modules/@aws-sdk/region-config-resolver": { "version": "3.525.0", - "license": "Apache-2.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/region-config-resolver/-/region-config-resolver-3.525.0.tgz", + "integrity": "sha512-8kFqXk6UyKgTMi7N7QlhA6qM4pGPWbiUXqEY2RgUWngtxqNFGeM9JTexZeuavQI+qLLe09VPShPNX71fEDcM6w==", "dependencies": { "@aws-sdk/types": "3.523.0", "@smithy/node-config-provider": "^2.2.4", @@ -1087,7 +1164,8 @@ }, "node_modules/@aws-sdk/token-providers": { "version": "3.525.0", - "license": "Apache-2.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/token-providers/-/token-providers-3.525.0.tgz", + "integrity": "sha512-puVjbxuK0Dq7PTQ2HdddHy2eQjOH8GZbump74yWJa6JVpRW84LlOcNmP+79x4Kscvz2ldWB8XDFw/pcCiSDe5A==", "dependencies": { "@aws-sdk/client-sso-oidc": "3.525.0", "@aws-sdk/types": "3.523.0", @@ -1102,7 +1180,8 @@ }, "node_modules/@aws-sdk/types": { "version": "3.523.0", - "license": "Apache-2.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/types/-/types-3.523.0.tgz", + "integrity": "sha512-AqGIu4u+SxPiUuNBp2acCVcq80KDUFjxe6e3cMTvKWTzCbrVk1AXv0dAaJnCmdkWIha6zJDWxpIk/aL4EGhZ9A==", "dependencies": { "@smithy/types": "^2.10.1", "tslib": "^2.5.0" @@ -1113,7 +1192,9 @@ }, "node_modules/@aws-sdk/util-base64-node": { "version": "3.209.0", - "license": "Apache-2.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/util-base64-node/-/util-base64-node-3.209.0.tgz", + "integrity": "sha512-U6pjb6uF/BameQLmzoSrqeiTxu5otwwGV7fO+TyE/3SJm/lyIsBaO+wr0qsoK0ae1VqggR+KCsUG13pWhdltpw==", + "deprecated": "The package @aws-sdk/util-base64-node has been renamed to @aws-sdk/util-base64. Please install the renamed package.", "dependencies": { "@aws-sdk/util-buffer-from": "3.208.0", "tslib": "^2.3.1" @@ -1124,7 +1205,8 @@ }, "node_modules/@aws-sdk/util-buffer-from": { "version": "3.208.0", - "license": "Apache-2.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/util-buffer-from/-/util-buffer-from-3.208.0.tgz", + "integrity": "sha512-7L0XUixNEFcLUGPeBF35enCvB9Xl+K6SQsmbrPk1P3mlV9mguWSDQqbOBwY1Ir0OVbD6H/ZOQU7hI/9RtRI0Zw==", "dependencies": { "@aws-sdk/is-array-buffer": "3.201.0", "tslib": "^2.3.1" @@ -1135,8 +1217,9 @@ }, "node_modules/@aws-sdk/util-dynamodb": { "version": "3.528.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/util-dynamodb/-/util-dynamodb-3.528.0.tgz", + "integrity": "sha512-RSSFtTWqJOeZHDtaSXd51LIP3Xu0mDPYc1Eu+LJXEC2GHWYDdjoeAMpIJvETBg13bBWkRgHatujT8tLFxCx1ug==", "dev": true, - "license": "Apache-2.0", "dependencies": { "tslib": "^2.5.0" }, @@ -1149,7 +1232,8 @@ }, "node_modules/@aws-sdk/util-endpoints": { "version": "3.525.0", - "license": "Apache-2.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/util-endpoints/-/util-endpoints-3.525.0.tgz", + "integrity": "sha512-DIW7WWU5tIGkeeKX6NJUyrEIdWMiqjLQG3XBzaUj+ufIENwNjdAHhlD8l2vX7Yr3JZRT6yN/84wBCj7Tw1xd1g==", "dependencies": { "@aws-sdk/types": "3.523.0", "@smithy/types": "^2.10.1", @@ -1161,8 +1245,9 @@ } }, "node_modules/@aws-sdk/util-locate-window": { - "version": "3.495.0", - "license": "Apache-2.0", + "version": "3.465.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/util-locate-window/-/util-locate-window-3.465.0.tgz", + "integrity": "sha512-f+QNcWGswredzC1ExNAB/QzODlxwaTdXkNT5cvke2RLX8SFU5pYk6h4uCtWC0vWPELzOfMfloBrJefBzlarhsw==", "dependencies": { "tslib": "^2.5.0" }, @@ -1172,7 +1257,8 @@ }, "node_modules/@aws-sdk/util-user-agent-browser": { "version": "3.523.0", - "license": "Apache-2.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/util-user-agent-browser/-/util-user-agent-browser-3.523.0.tgz", + "integrity": "sha512-6ZRNdGHX6+HQFqTbIA5+i8RWzxFyxsZv8D3soRfpdyWIKkzhSz8IyRKXRciwKBJDaC7OX2jzGE90wxRQft27nA==", "dependencies": { "@aws-sdk/types": "3.523.0", "@smithy/types": "^2.10.1", @@ -1182,7 +1268,8 @@ }, "node_modules/@aws-sdk/util-user-agent-node": { "version": "3.525.0", - "license": "Apache-2.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/util-user-agent-node/-/util-user-agent-node-3.525.0.tgz", + "integrity": "sha512-88Wjt4efyUSBGcyIuh1dvoMqY1k15jpJc5A/3yi67clBQEFsu9QCodQCQPqmRjV3VRcMtBOk+jeCTiUzTY5dRQ==", "dependencies": { "@aws-sdk/types": "3.523.0", "@smithy/node-config-provider": "^2.2.4", @@ -1203,15 +1290,17 @@ }, "node_modules/@aws-sdk/util-utf8-browser": { "version": "3.259.0", - "license": "Apache-2.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/util-utf8-browser/-/util-utf8-browser-3.259.0.tgz", + "integrity": "sha512-UvFa/vR+e19XookZF8RzFZBrw2EUkQWxiBW0yYQAhvk3C+QVGl0H3ouca8LDBlBfQKXwmW3huo/59H8rwb1wJw==", "dependencies": { "tslib": "^2.3.1" } }, "node_modules/@babel/code-frame": { "version": "7.23.5", + "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.23.5.tgz", + "integrity": "sha512-CgH3s1a96LipHCmSUmYFPwY7MNx8C3avkq7i4Wl3cfa662ldtUe4VM1TPXX70pfmrlWTb6jLqTYrZyT2ZTJBgA==", "dev": true, - "license": "MIT", "dependencies": { "@babel/highlight": "^7.23.4", "chalk": "^2.4.2" @@ -1222,8 +1311,9 @@ }, "node_modules/@babel/code-frame/node_modules/ansi-styles": { "version": "3.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", + "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", "dev": true, - "license": "MIT", "dependencies": { "color-convert": "^1.9.0" }, @@ -1233,8 +1323,9 @@ }, "node_modules/@babel/code-frame/node_modules/chalk": { "version": "2.4.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", + "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", "dev": true, - "license": "MIT", "dependencies": { "ansi-styles": "^3.2.1", "escape-string-regexp": "^1.0.5", @@ -1246,37 +1337,42 @@ }, "node_modules/@babel/code-frame/node_modules/color-convert": { "version": "1.9.3", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz", + "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==", "dev": true, - "license": "MIT", "dependencies": { "color-name": "1.1.3" } }, "node_modules/@babel/code-frame/node_modules/color-name": { "version": "1.1.3", - "dev": true, - "license": "MIT" + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", + "integrity": "sha512-72fSenhMw2HZMTVHeCA9KCmpEIbzWiQsjN+BHcBbS9vr1mtt+vJjPdksIBNUmKAW8TFUDPJK5SUU3QhE9NEXDw==", + "dev": true }, "node_modules/@babel/code-frame/node_modules/escape-string-regexp": { "version": "1.0.5", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", + "integrity": "sha512-vbRorB5FUQWvla16U8R/qgaFIya2qGzwDrNmCZuYKrbdSUMG6I1ZCGQRefkRVhuOkIGVne7BQ35DSfo1qvJqFg==", "dev": true, - "license": "MIT", "engines": { "node": ">=0.8.0" } }, "node_modules/@babel/code-frame/node_modules/has-flag": { "version": "3.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", + "integrity": "sha512-sKJf1+ceQBr4SMkvQnBDNDtf4TXpVhVGateu0t918bl30FnbE2m4vNLX+VWe/dpjlb+HugGYzW7uQXH98HPEYw==", "dev": true, - "license": "MIT", "engines": { "node": ">=4" } }, "node_modules/@babel/code-frame/node_modules/supports-color": { "version": "5.5.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", + "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", "dev": true, - "license": "MIT", "dependencies": { "has-flag": "^3.0.0" }, @@ -1286,27 +1382,29 @@ }, "node_modules/@babel/compat-data": { "version": "7.23.5", + "resolved": "https://registry.npmjs.org/@babel/compat-data/-/compat-data-7.23.5.tgz", + "integrity": "sha512-uU27kfDRlhfKl+w1U6vp16IuvSLtjAxdArVXPa9BvLkrr7CYIsxH5adpHObeAGY/41+syctUWOZ140a2Rvkgjw==", "dev": true, - "license": "MIT", "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/core": { - "version": "7.24.0", + "version": "7.23.7", + "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.23.7.tgz", + "integrity": "sha512-+UpDgowcmqe36d4NwqvKsyPMlOLNGMsfMmQ5WGCu+siCe3t3dfe9njrzGfdN4qq+bcNUt0+Vw6haRxBOycs4dw==", "dev": true, - "license": "MIT", "dependencies": { "@ampproject/remapping": "^2.2.0", "@babel/code-frame": "^7.23.5", "@babel/generator": "^7.23.6", "@babel/helper-compilation-targets": "^7.23.6", "@babel/helper-module-transforms": "^7.23.3", - "@babel/helpers": "^7.24.0", - "@babel/parser": "^7.24.0", - "@babel/template": "^7.24.0", - "@babel/traverse": "^7.24.0", - "@babel/types": "^7.24.0", + "@babel/helpers": "^7.23.7", + "@babel/parser": "^7.23.6", + "@babel/template": "^7.22.15", + "@babel/traverse": "^7.23.7", + "@babel/types": "^7.23.6", "convert-source-map": "^2.0.0", "debug": "^4.1.0", "gensync": "^1.0.0-beta.2", @@ -1323,16 +1421,18 @@ }, "node_modules/@babel/core/node_modules/semver": { "version": "6.3.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.1.tgz", + "integrity": "sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==", "dev": true, - "license": "ISC", "bin": { "semver": "bin/semver.js" } }, "node_modules/@babel/generator": { "version": "7.23.6", + "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.23.6.tgz", + "integrity": "sha512-qrSfCYxYQB5owCmGLbl8XRpX1ytXlpueOb0N0UmQwA073KZxejgQTzAmJezxvpwQD9uGtK2shHdi55QT+MbjIw==", "dev": true, - "license": "MIT", "dependencies": { "@babel/types": "^7.23.6", "@jridgewell/gen-mapping": "^0.3.2", @@ -1345,8 +1445,9 @@ }, "node_modules/@babel/helper-compilation-targets": { "version": "7.23.6", + "resolved": "https://registry.npmjs.org/@babel/helper-compilation-targets/-/helper-compilation-targets-7.23.6.tgz", + "integrity": "sha512-9JB548GZoQVmzrFgp8o7KxdgkTGm6xs9DW0o/Pim72UDjzr5ObUQ6ZzYPqA+g9OTS2bBQoctLJrky0RDCAWRgQ==", "dev": true, - "license": "MIT", "dependencies": { "@babel/compat-data": "^7.23.5", "@babel/helper-validator-option": "^7.23.5", @@ -1360,24 +1461,27 @@ }, "node_modules/@babel/helper-compilation-targets/node_modules/semver": { "version": "6.3.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.1.tgz", + "integrity": "sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==", "dev": true, - "license": "ISC", "bin": { "semver": "bin/semver.js" } }, "node_modules/@babel/helper-environment-visitor": { "version": "7.22.20", + "resolved": "https://registry.npmjs.org/@babel/helper-environment-visitor/-/helper-environment-visitor-7.22.20.tgz", + "integrity": "sha512-zfedSIzFhat/gFhWfHtgWvlec0nqB9YEIVrpuwjruLlXfUSnA8cJB0miHKwqDnQ7d32aKo2xt88/xZptwxbfhA==", "dev": true, - "license": "MIT", "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/helper-function-name": { "version": "7.23.0", + "resolved": "https://registry.npmjs.org/@babel/helper-function-name/-/helper-function-name-7.23.0.tgz", + "integrity": "sha512-OErEqsrxjZTJciZ4Oo+eoZqeW9UIiOcuYKRJA4ZAgV9myA+pOXhhmpfNCKjEH/auVfEYVFJ6y1Tc4r0eIApqiw==", "dev": true, - "license": "MIT", "dependencies": { "@babel/template": "^7.22.15", "@babel/types": "^7.23.0" @@ -1388,8 +1492,9 @@ }, "node_modules/@babel/helper-hoist-variables": { "version": "7.22.5", + "resolved": "https://registry.npmjs.org/@babel/helper-hoist-variables/-/helper-hoist-variables-7.22.5.tgz", + "integrity": "sha512-wGjk9QZVzvknA6yKIUURb8zY3grXCcOZt+/7Wcy8O2uctxhplmUPkOdlgoNhmdVee2c92JXbf1xpMtVNbfoxRw==", "dev": true, - "license": "MIT", "dependencies": { "@babel/types": "^7.22.5" }, @@ -1399,8 +1504,9 @@ }, "node_modules/@babel/helper-module-imports": { "version": "7.22.15", + "resolved": "https://registry.npmjs.org/@babel/helper-module-imports/-/helper-module-imports-7.22.15.tgz", + "integrity": "sha512-0pYVBnDKZO2fnSPCrgM/6WMc7eS20Fbok+0r88fp+YtWVLZrp4CkafFGIp+W0VKw4a22sgebPT99y+FDNMdP4w==", "dev": true, - "license": "MIT", "dependencies": { "@babel/types": "^7.22.15" }, @@ -1410,8 +1516,9 @@ }, "node_modules/@babel/helper-module-transforms": { "version": "7.23.3", + "resolved": "https://registry.npmjs.org/@babel/helper-module-transforms/-/helper-module-transforms-7.23.3.tgz", + "integrity": "sha512-7bBs4ED9OmswdfDzpz4MpWgSrV7FXlc3zIagvLFjS5H+Mk7Snr21vQ6QwrsoCGMfNC4e4LQPdoULEt4ykz0SRQ==", "dev": true, - "license": "MIT", "dependencies": { "@babel/helper-environment-visitor": "^7.22.20", "@babel/helper-module-imports": "^7.22.15", @@ -1427,17 +1534,19 @@ } }, "node_modules/@babel/helper-plugin-utils": { - "version": "7.24.0", + "version": "7.22.5", + "resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.22.5.tgz", + "integrity": "sha512-uLls06UVKgFG9QD4OeFYLEGteMIAa5kpTPcFL28yuCIIzsf6ZyKZMllKVOCZFhiZ5ptnwX4mtKdWCBE/uT4amg==", "dev": true, - "license": "MIT", "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/helper-simple-access": { "version": "7.22.5", + "resolved": "https://registry.npmjs.org/@babel/helper-simple-access/-/helper-simple-access-7.22.5.tgz", + "integrity": "sha512-n0H99E/K+Bika3++WNL17POvo4rKWZ7lZEp1Q+fStVbUi8nxPQEBOlTmCOxW/0JsS56SKKQ+ojAe2pHKJHN35w==", "dev": true, - "license": "MIT", "dependencies": { "@babel/types": "^7.22.5" }, @@ -1447,8 +1556,9 @@ }, "node_modules/@babel/helper-split-export-declaration": { "version": "7.22.6", + "resolved": "https://registry.npmjs.org/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.22.6.tgz", + "integrity": "sha512-AsUnxuLhRYsisFiaJwvp1QF+I3KjD5FOxut14q/GzovUe6orHLesW2C7d754kRm53h5gqrz6sFl6sxc4BVtE/g==", "dev": true, - "license": "MIT", "dependencies": { "@babel/types": "^7.22.5" }, @@ -1458,36 +1568,40 @@ }, "node_modules/@babel/helper-string-parser": { "version": "7.23.4", + "resolved": "https://registry.npmjs.org/@babel/helper-string-parser/-/helper-string-parser-7.23.4.tgz", + "integrity": "sha512-803gmbQdqwdf4olxrX4AJyFBV/RTr3rSmOj0rKwesmzlfhYNDEs+/iOcznzpNWlJlIlTJC2QfPFcHB6DlzdVLQ==", "dev": true, - "license": "MIT", "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/helper-validator-identifier": { "version": "7.22.20", + "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.22.20.tgz", + "integrity": "sha512-Y4OZ+ytlatR8AI+8KZfKuL5urKp7qey08ha31L8b3BwewJAoJamTzyvxPR/5D+KkdJCGPq/+8TukHBlY10FX9A==", "dev": true, - "license": "MIT", "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/helper-validator-option": { "version": "7.23.5", + "resolved": "https://registry.npmjs.org/@babel/helper-validator-option/-/helper-validator-option-7.23.5.tgz", + "integrity": "sha512-85ttAOMLsr53VgXkTbkx8oA6YTfT4q7/HzXSLEYmjcSTJPMPQtvq1BD79Byep5xMUYbGRzEpDsjUf3dyp54IKw==", "dev": true, - "license": "MIT", "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/helpers": { - "version": "7.24.0", + "version": "7.23.8", + "resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.23.8.tgz", + "integrity": "sha512-KDqYz4PiOWvDFrdHLPhKtCThtIcKVy6avWD2oG4GEvyQ+XDZwHD4YQd+H2vNMnq2rkdxsDkU82T+Vk8U/WXHRQ==", "dev": true, - "license": "MIT", "dependencies": { - "@babel/template": "^7.24.0", - "@babel/traverse": "^7.24.0", - "@babel/types": "^7.24.0" + "@babel/template": "^7.22.15", + "@babel/traverse": "^7.23.7", + "@babel/types": "^7.23.6" }, "engines": { "node": ">=6.9.0" @@ -1495,8 +1609,9 @@ }, "node_modules/@babel/highlight": { "version": "7.23.4", + "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.23.4.tgz", + "integrity": "sha512-acGdbYSfp2WheJoJm/EBBBLh/ID8KDc64ISZ9DYtBmC8/Q204PZJLHyzeB5qMzJ5trcOkybd78M4x2KWsUq++A==", "dev": true, - "license": "MIT", "dependencies": { "@babel/helper-validator-identifier": "^7.22.20", "chalk": "^2.4.2", @@ -1508,8 +1623,9 @@ }, "node_modules/@babel/highlight/node_modules/ansi-styles": { "version": "3.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", + "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", "dev": true, - "license": "MIT", "dependencies": { "color-convert": "^1.9.0" }, @@ -1519,8 +1635,9 @@ }, "node_modules/@babel/highlight/node_modules/chalk": { "version": "2.4.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", + "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", "dev": true, - "license": "MIT", "dependencies": { "ansi-styles": "^3.2.1", "escape-string-regexp": "^1.0.5", @@ -1532,37 +1649,42 @@ }, "node_modules/@babel/highlight/node_modules/color-convert": { "version": "1.9.3", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz", + "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==", "dev": true, - "license": "MIT", "dependencies": { "color-name": "1.1.3" } }, "node_modules/@babel/highlight/node_modules/color-name": { "version": "1.1.3", - "dev": true, - "license": "MIT" + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", + "integrity": "sha512-72fSenhMw2HZMTVHeCA9KCmpEIbzWiQsjN+BHcBbS9vr1mtt+vJjPdksIBNUmKAW8TFUDPJK5SUU3QhE9NEXDw==", + "dev": true }, "node_modules/@babel/highlight/node_modules/escape-string-regexp": { "version": "1.0.5", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", + "integrity": "sha512-vbRorB5FUQWvla16U8R/qgaFIya2qGzwDrNmCZuYKrbdSUMG6I1ZCGQRefkRVhuOkIGVne7BQ35DSfo1qvJqFg==", "dev": true, - "license": "MIT", "engines": { "node": ">=0.8.0" } }, "node_modules/@babel/highlight/node_modules/has-flag": { "version": "3.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", + "integrity": "sha512-sKJf1+ceQBr4SMkvQnBDNDtf4TXpVhVGateu0t918bl30FnbE2m4vNLX+VWe/dpjlb+HugGYzW7uQXH98HPEYw==", "dev": true, - "license": "MIT", "engines": { "node": ">=4" } }, "node_modules/@babel/highlight/node_modules/supports-color": { "version": "5.5.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", + "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", "dev": true, - "license": "MIT", "dependencies": { "has-flag": "^3.0.0" }, @@ -1571,9 +1693,10 @@ } }, "node_modules/@babel/parser": { - "version": "7.24.0", + "version": "7.23.6", + "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.23.6.tgz", + "integrity": "sha512-Z2uID7YJ7oNvAI20O9X0bblw7Qqs8Q2hFy0R9tAfnfLkp5MW0UH9eUvnDSnFwKZ0AvgS1ucqR4KzvVHgnke1VQ==", "dev": true, - "license": "MIT", "bin": { "parser": "bin/babel-parser.js" }, @@ -1583,8 +1706,9 @@ }, "node_modules/@babel/plugin-syntax-async-generators": { "version": "7.8.4", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-async-generators/-/plugin-syntax-async-generators-7.8.4.tgz", + "integrity": "sha512-tycmZxkGfZaxhMRbXlPXuVFpdWlXpir2W4AMhSJgRKzk/eDlIXOhb2LHWoLpDF7TEHylV5zNhykX6KAgHJmTNw==", "dev": true, - "license": "MIT", "dependencies": { "@babel/helper-plugin-utils": "^7.8.0" }, @@ -1594,8 +1718,9 @@ }, "node_modules/@babel/plugin-syntax-bigint": { "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-bigint/-/plugin-syntax-bigint-7.8.3.tgz", + "integrity": "sha512-wnTnFlG+YxQm3vDxpGE57Pj0srRU4sHE/mDkt1qv2YJJSeUAec2ma4WLUnUPeKjyrfntVwe/N6dCXpU+zL3Npg==", "dev": true, - "license": "MIT", "dependencies": { "@babel/helper-plugin-utils": "^7.8.0" }, @@ -1605,8 +1730,9 @@ }, "node_modules/@babel/plugin-syntax-class-properties": { "version": "7.12.13", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-class-properties/-/plugin-syntax-class-properties-7.12.13.tgz", + "integrity": "sha512-fm4idjKla0YahUNgFNLCB0qySdsoPiZP3iQE3rky0mBUtMZ23yDJ9SJdg6dXTSDnulOVqiF3Hgr9nbXvXTQZYA==", "dev": true, - "license": "MIT", "dependencies": { "@babel/helper-plugin-utils": "^7.12.13" }, @@ -1616,8 +1742,9 @@ }, "node_modules/@babel/plugin-syntax-import-meta": { "version": "7.10.4", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-import-meta/-/plugin-syntax-import-meta-7.10.4.tgz", + "integrity": "sha512-Yqfm+XDx0+Prh3VSeEQCPU81yC+JWZ2pDPFSS4ZdpfZhp4MkFMaDC1UqseovEKwSUpnIL7+vK+Clp7bfh0iD7g==", "dev": true, - "license": "MIT", "dependencies": { "@babel/helper-plugin-utils": "^7.10.4" }, @@ -1627,8 +1754,9 @@ }, "node_modules/@babel/plugin-syntax-json-strings": { "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-json-strings/-/plugin-syntax-json-strings-7.8.3.tgz", + "integrity": "sha512-lY6kdGpWHvjoe2vk4WrAapEuBR69EMxZl+RoGRhrFGNYVK8mOPAW8VfbT/ZgrFbXlDNiiaxQnAtgVCZ6jv30EA==", "dev": true, - "license": "MIT", "dependencies": { "@babel/helper-plugin-utils": "^7.8.0" }, @@ -1638,8 +1766,9 @@ }, "node_modules/@babel/plugin-syntax-jsx": { "version": "7.23.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-jsx/-/plugin-syntax-jsx-7.23.3.tgz", + "integrity": "sha512-EB2MELswq55OHUoRZLGg/zC7QWUKfNLpE57m/S2yr1uEneIgsTgrSzXP3NXEsMkVn76OlaVVnzN+ugObuYGwhg==", "dev": true, - "license": "MIT", "dependencies": { "@babel/helper-plugin-utils": "^7.22.5" }, @@ -1652,8 +1781,9 @@ }, "node_modules/@babel/plugin-syntax-logical-assignment-operators": { "version": "7.10.4", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-logical-assignment-operators/-/plugin-syntax-logical-assignment-operators-7.10.4.tgz", + "integrity": "sha512-d8waShlpFDinQ5MtvGU9xDAOzKH47+FFoney2baFIoMr952hKOLp1HR7VszoZvOsV/4+RRszNY7D17ba0te0ig==", "dev": true, - "license": "MIT", "dependencies": { "@babel/helper-plugin-utils": "^7.10.4" }, @@ -1663,8 +1793,9 @@ }, "node_modules/@babel/plugin-syntax-nullish-coalescing-operator": { "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-nullish-coalescing-operator/-/plugin-syntax-nullish-coalescing-operator-7.8.3.tgz", + "integrity": "sha512-aSff4zPII1u2QD7y+F8oDsz19ew4IGEJg9SVW+bqwpwtfFleiQDMdzA/R+UlWDzfnHFCxxleFT0PMIrR36XLNQ==", "dev": true, - "license": "MIT", "dependencies": { "@babel/helper-plugin-utils": "^7.8.0" }, @@ -1674,8 +1805,9 @@ }, "node_modules/@babel/plugin-syntax-numeric-separator": { "version": "7.10.4", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-numeric-separator/-/plugin-syntax-numeric-separator-7.10.4.tgz", + "integrity": "sha512-9H6YdfkcK/uOnY/K7/aA2xpzaAgkQn37yzWUMRK7OaPOqOpGS1+n0H5hxT9AUw9EsSjPW8SVyMJwYRtWs3X3ug==", "dev": true, - "license": "MIT", "dependencies": { "@babel/helper-plugin-utils": "^7.10.4" }, @@ -1685,8 +1817,9 @@ }, "node_modules/@babel/plugin-syntax-object-rest-spread": { "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-object-rest-spread/-/plugin-syntax-object-rest-spread-7.8.3.tgz", + "integrity": "sha512-XoqMijGZb9y3y2XskN+P1wUGiVwWZ5JmoDRwx5+3GmEplNyVM2s2Dg8ILFQm8rWM48orGy5YpI5Bl8U1y7ydlA==", "dev": true, - "license": "MIT", "dependencies": { "@babel/helper-plugin-utils": "^7.8.0" }, @@ -1696,8 +1829,9 @@ }, "node_modules/@babel/plugin-syntax-optional-catch-binding": { "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-optional-catch-binding/-/plugin-syntax-optional-catch-binding-7.8.3.tgz", + "integrity": "sha512-6VPD0Pc1lpTqw0aKoeRTMiB+kWhAoT24PA+ksWSBrFtl5SIRVpZlwN3NNPQjehA2E/91FV3RjLWoVTglWcSV3Q==", "dev": true, - "license": "MIT", "dependencies": { "@babel/helper-plugin-utils": "^7.8.0" }, @@ -1707,8 +1841,9 @@ }, "node_modules/@babel/plugin-syntax-optional-chaining": { "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-optional-chaining/-/plugin-syntax-optional-chaining-7.8.3.tgz", + "integrity": "sha512-KoK9ErH1MBlCPxV0VANkXW2/dw4vlbGDrFgz8bmUsBGYkFRcbRwMh6cIJubdPrkxRwuGdtCk0v/wPTKbQgBjkg==", "dev": true, - "license": "MIT", "dependencies": { "@babel/helper-plugin-utils": "^7.8.0" }, @@ -1718,8 +1853,9 @@ }, "node_modules/@babel/plugin-syntax-top-level-await": { "version": "7.14.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-top-level-await/-/plugin-syntax-top-level-await-7.14.5.tgz", + "integrity": "sha512-hx++upLv5U1rgYfwe1xBQUhRmU41NEvpUvrp8jkrSCdvGSnM5/qdRMtylJ6PG5OFkBaHkbTAKTnd3/YyESRHFw==", "dev": true, - "license": "MIT", "dependencies": { "@babel/helper-plugin-utils": "^7.14.5" }, @@ -1732,8 +1868,9 @@ }, "node_modules/@babel/plugin-syntax-typescript": { "version": "7.23.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-typescript/-/plugin-syntax-typescript-7.23.3.tgz", + "integrity": "sha512-9EiNjVJOMwCO+43TqoTrgQ8jMwcAd0sWyXi9RPfIsLTj4R2MADDDQXELhffaUx/uJv2AYcxBgPwH6j4TIA4ytQ==", "dev": true, - "license": "MIT", "dependencies": { "@babel/helper-plugin-utils": "^7.22.5" }, @@ -1745,22 +1882,24 @@ } }, "node_modules/@babel/template": { - "version": "7.24.0", + "version": "7.22.15", + "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.22.15.tgz", + "integrity": "sha512-QPErUVm4uyJa60rkI73qneDacvdvzxshT3kksGqlGWYdOTIUOwJ7RDUL8sGqslY1uXWSL6xMFKEXDS3ox2uF0w==", "dev": true, - "license": "MIT", "dependencies": { - "@babel/code-frame": "^7.23.5", - "@babel/parser": "^7.24.0", - "@babel/types": "^7.24.0" + "@babel/code-frame": "^7.22.13", + "@babel/parser": "^7.22.15", + "@babel/types": "^7.22.15" }, "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/traverse": { - "version": "7.24.0", + "version": "7.23.7", + "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.23.7.tgz", + "integrity": "sha512-tY3mM8rH9jM0YHFGyfC0/xf+SB5eKUu7HPj7/k3fpi9dAlsMc5YbQvDi0Sh2QTPXqMhyaAtzAr807TIyfQrmyg==", "dev": true, - "license": "MIT", "dependencies": { "@babel/code-frame": "^7.23.5", "@babel/generator": "^7.23.6", @@ -1768,8 +1907,8 @@ "@babel/helper-function-name": "^7.23.0", "@babel/helper-hoist-variables": "^7.22.5", "@babel/helper-split-export-declaration": "^7.22.6", - "@babel/parser": "^7.24.0", - "@babel/types": "^7.24.0", + "@babel/parser": "^7.23.6", + "@babel/types": "^7.23.6", "debug": "^4.3.1", "globals": "^11.1.0" }, @@ -1779,16 +1918,18 @@ }, "node_modules/@babel/traverse/node_modules/globals": { "version": "11.12.0", + "resolved": "https://registry.npmjs.org/globals/-/globals-11.12.0.tgz", + "integrity": "sha512-WOBp/EEGUiIsJSp7wcv/y6MO+lV9UoncWqxuFfm8eBwzWNgyfBd6Gz+IeKQ9jCmyhoH99g15M3T+QaVHFjizVA==", "dev": true, - "license": "MIT", "engines": { "node": ">=4" } }, "node_modules/@babel/types": { - "version": "7.24.0", + "version": "7.23.6", + "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.23.6.tgz", + "integrity": "sha512-+uarb83brBzPKN38NX1MkB6vb6+mwvR6amUulqAE7ccQw1pEl+bCia9TbdG1lsnFP7lZySvUn37CHyXQdfTwzg==", "dev": true, - "license": "MIT", "dependencies": { "@babel/helper-string-parser": "^7.23.4", "@babel/helper-validator-identifier": "^7.22.20", @@ -1800,13 +1941,15 @@ }, "node_modules/@bcoe/v8-coverage": { "version": "0.2.3", - "dev": true, - "license": "MIT" + "resolved": "https://registry.npmjs.org/@bcoe/v8-coverage/-/v8-coverage-0.2.3.tgz", + "integrity": "sha512-0hYQ8SB4Db5zvZB4axdMHGwEaQjkZzFjQiN9LVYvIFB2nSUHW9tYpxWriPrWDASIxiaXax83REcLxuSdnGPZtw==", + "dev": true }, "node_modules/@cspotcode/source-map-support": { "version": "0.8.1", + "resolved": "https://registry.npmjs.org/@cspotcode/source-map-support/-/source-map-support-0.8.1.tgz", + "integrity": "sha512-IchNf6dN4tHoMFIn/7OE8LWZ19Y6q/67Bmf6vnGREv8RSbBVb9LPJxEcnwrcwX6ixSvaiGoomAUvu4YSxXrVgw==", "dev": true, - "license": "MIT", "dependencies": { "@jridgewell/trace-mapping": "0.3.9" }, @@ -1816,131 +1959,472 @@ }, "node_modules/@cspotcode/source-map-support/node_modules/@jridgewell/trace-mapping": { "version": "0.3.9", + "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.9.tgz", + "integrity": "sha512-3Belt6tdc8bPgAtbcmdtNJlirVoTmEb5e2gC94PnkwEW9jI6CAHUeoG85tjWP5WquqfavoMtMwiG4P926ZKKuQ==", "dev": true, - "license": "MIT", "dependencies": { "@jridgewell/resolve-uri": "^3.0.3", "@jridgewell/sourcemap-codec": "^1.4.10" } }, - "node_modules/@esbuild/darwin-arm64": { + "node_modules/@esbuild/aix-ppc64": { "version": "0.20.1", + "resolved": "https://registry.npmjs.org/@esbuild/aix-ppc64/-/aix-ppc64-0.20.1.tgz", + "integrity": "sha512-m55cpeupQ2DbuRGQMMZDzbv9J9PgVelPjlcmM5kxHnrBdBx6REaEd7LamYV7Dm8N7rCyR/XwU6rVP8ploKtIkA==", "cpu": [ - "arm64" + "ppc64" ], - "license": "MIT", "optional": true, "os": [ - "darwin" + "aix" ], "engines": { "node": ">=12" } }, - "node_modules/@eslint-community/eslint-utils": { - "version": "4.4.0", - "dev": true, - "license": "MIT", - "dependencies": { - "eslint-visitor-keys": "^3.3.0" - }, + "node_modules/@esbuild/android-arm": { + "version": "0.20.1", + "resolved": "https://registry.npmjs.org/@esbuild/android-arm/-/android-arm-0.20.1.tgz", + "integrity": "sha512-4j0+G27/2ZXGWR5okcJi7pQYhmkVgb4D7UKwxcqrjhvp5TKWx3cUjgB1CGj1mfdmJBQ9VnUGgUhign+FPF2Zgw==", + "cpu": [ + "arm" + ], + "optional": true, + "os": [ + "android" + ], "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" - }, - "peerDependencies": { - "eslint": "^6.0.0 || ^7.0.0 || >=8.0.0" + "node": ">=12" } }, - "node_modules/@eslint-community/regexpp": { - "version": "4.10.0", - "dev": true, - "license": "MIT", + "node_modules/@esbuild/android-arm64": { + "version": "0.20.1", + "resolved": "https://registry.npmjs.org/@esbuild/android-arm64/-/android-arm64-0.20.1.tgz", + "integrity": "sha512-hCnXNF0HM6AjowP+Zou0ZJMWWa1VkD77BXe959zERgGJBBxB+sV+J9f/rcjeg2c5bsukD/n17RKWXGFCO5dD5A==", + "cpu": [ + "arm64" + ], + "optional": true, + "os": [ + "android" + ], "engines": { - "node": "^12.0.0 || ^14.0.0 || >=16.0.0" + "node": ">=12" } }, - "node_modules/@eslint/eslintrc": { - "version": "2.1.4", - "dev": true, - "license": "MIT", - "dependencies": { - "ajv": "^6.12.4", - "debug": "^4.3.2", - "espree": "^9.6.0", - "globals": "^13.19.0", - "ignore": "^5.2.0", - "import-fresh": "^3.2.1", - "js-yaml": "^4.1.0", - "minimatch": "^3.1.2", - "strip-json-comments": "^3.1.1" - }, + "node_modules/@esbuild/android-x64": { + "version": "0.20.1", + "resolved": "https://registry.npmjs.org/@esbuild/android-x64/-/android-x64-0.20.1.tgz", + "integrity": "sha512-MSfZMBoAsnhpS+2yMFYIQUPs8Z19ajwfuaSZx+tSl09xrHZCjbeXXMsUF/0oq7ojxYEpsSo4c0SfjxOYXRbpaA==", + "cpu": [ + "x64" + ], + "optional": true, + "os": [ + "android" + ], "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" - }, - "funding": { - "url": "https://opencollective.com/eslint" + "node": ">=12" } }, - "node_modules/@eslint/eslintrc/node_modules/brace-expansion": { - "version": "1.1.11", - "dev": true, - "license": "MIT", - "dependencies": { - "balanced-match": "^1.0.0", - "concat-map": "0.0.1" + "node_modules/@esbuild/darwin-arm64": { + "version": "0.20.1", + "resolved": "https://registry.npmjs.org/@esbuild/darwin-arm64/-/darwin-arm64-0.20.1.tgz", + "integrity": "sha512-Ylk6rzgMD8klUklGPzS414UQLa5NPXZD5tf8JmQU8GQrj6BrFA/Ic9tb2zRe1kOZyCbGl+e8VMbDRazCEBqPvA==", + "cpu": [ + "arm64" + ], + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">=12" } }, - "node_modules/@eslint/eslintrc/node_modules/minimatch": { - "version": "3.1.2", - "dev": true, - "license": "ISC", - "dependencies": { - "brace-expansion": "^1.1.7" - }, + "node_modules/@esbuild/darwin-x64": { + "version": "0.20.1", + "resolved": "https://registry.npmjs.org/@esbuild/darwin-x64/-/darwin-x64-0.20.1.tgz", + "integrity": "sha512-pFIfj7U2w5sMp52wTY1XVOdoxw+GDwy9FsK3OFz4BpMAjvZVs0dT1VXs8aQm22nhwoIWUmIRaE+4xow8xfIDZA==", + "cpu": [ + "x64" + ], + "optional": true, + "os": [ + "darwin" + ], "engines": { - "node": "*" + "node": ">=12" } }, - "node_modules/@eslint/js": { - "version": "8.57.0", - "dev": true, - "license": "MIT", + "node_modules/@esbuild/freebsd-arm64": { + "version": "0.20.1", + "resolved": "https://registry.npmjs.org/@esbuild/freebsd-arm64/-/freebsd-arm64-0.20.1.tgz", + "integrity": "sha512-UyW1WZvHDuM4xDz0jWun4qtQFauNdXjXOtIy7SYdf7pbxSWWVlqhnR/T2TpX6LX5NI62spt0a3ldIIEkPM6RHw==", + "cpu": [ + "arm64" + ], + "optional": true, + "os": [ + "freebsd" + ], "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + "node": ">=12" } }, - "node_modules/@faker-js/faker": { - "version": "8.4.1", - "dev": true, - "funding": [ - { - "type": "opencollective", - "url": "https://opencollective.com/fakerjs" - } + "node_modules/@esbuild/freebsd-x64": { + "version": "0.20.1", + "resolved": "https://registry.npmjs.org/@esbuild/freebsd-x64/-/freebsd-x64-0.20.1.tgz", + "integrity": "sha512-itPwCw5C+Jh/c624vcDd9kRCCZVpzpQn8dtwoYIt2TJF3S9xJLiRohnnNrKwREvcZYx0n8sCSbvGH349XkcQeg==", + "cpu": [ + "x64" + ], + "optional": true, + "os": [ + "freebsd" ], - "license": "MIT", "engines": { - "node": "^14.17.0 || ^16.13.0 || >=18.0.0", - "npm": ">=6.14.13" + "node": ">=12" } }, - "node_modules/@humanwhocodes/config-array": { - "version": "0.11.14", - "dev": true, - "license": "Apache-2.0", - "dependencies": { - "@humanwhocodes/object-schema": "^2.0.2", - "debug": "^4.3.1", - "minimatch": "^3.0.5" - }, + "node_modules/@esbuild/linux-arm": { + "version": "0.20.1", + "resolved": "https://registry.npmjs.org/@esbuild/linux-arm/-/linux-arm-0.20.1.tgz", + "integrity": "sha512-LojC28v3+IhIbfQ+Vu4Ut5n3wKcgTu6POKIHN9Wpt0HnfgUGlBuyDDQR4jWZUZFyYLiz4RBBBmfU6sNfn6RhLw==", + "cpu": [ + "arm" + ], + "optional": true, + "os": [ + "linux" + ], "engines": { - "node": ">=10.10.0" + "node": ">=12" } }, - "node_modules/@humanwhocodes/config-array/node_modules/brace-expansion": { + "node_modules/@esbuild/linux-arm64": { + "version": "0.20.1", + "resolved": "https://registry.npmjs.org/@esbuild/linux-arm64/-/linux-arm64-0.20.1.tgz", + "integrity": "sha512-cX8WdlF6Cnvw/DO9/X7XLH2J6CkBnz7Twjpk56cshk9sjYVcuh4sXQBy5bmTwzBjNVZze2yaV1vtcJS04LbN8w==", + "cpu": [ + "arm64" + ], + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/linux-ia32": { + "version": "0.20.1", + "resolved": "https://registry.npmjs.org/@esbuild/linux-ia32/-/linux-ia32-0.20.1.tgz", + "integrity": "sha512-4H/sQCy1mnnGkUt/xszaLlYJVTz3W9ep52xEefGtd6yXDQbz/5fZE5dFLUgsPdbUOQANcVUa5iO6g3nyy5BJiw==", + "cpu": [ + "ia32" + ], + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/linux-loong64": { + "version": "0.20.1", + "resolved": "https://registry.npmjs.org/@esbuild/linux-loong64/-/linux-loong64-0.20.1.tgz", + "integrity": "sha512-c0jgtB+sRHCciVXlyjDcWb2FUuzlGVRwGXgI+3WqKOIuoo8AmZAddzeOHeYLtD+dmtHw3B4Xo9wAUdjlfW5yYA==", + "cpu": [ + "loong64" + ], + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/linux-mips64el": { + "version": "0.20.1", + "resolved": "https://registry.npmjs.org/@esbuild/linux-mips64el/-/linux-mips64el-0.20.1.tgz", + "integrity": "sha512-TgFyCfIxSujyuqdZKDZ3yTwWiGv+KnlOeXXitCQ+trDODJ+ZtGOzLkSWngynP0HZnTsDyBbPy7GWVXWaEl6lhA==", + "cpu": [ + "mips64el" + ], + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/linux-ppc64": { + "version": "0.20.1", + "resolved": "https://registry.npmjs.org/@esbuild/linux-ppc64/-/linux-ppc64-0.20.1.tgz", + "integrity": "sha512-b+yuD1IUeL+Y93PmFZDZFIElwbmFfIKLKlYI8M6tRyzE6u7oEP7onGk0vZRh8wfVGC2dZoy0EqX1V8qok4qHaw==", + "cpu": [ + "ppc64" + ], + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/linux-riscv64": { + "version": "0.20.1", + "resolved": "https://registry.npmjs.org/@esbuild/linux-riscv64/-/linux-riscv64-0.20.1.tgz", + "integrity": "sha512-wpDlpE0oRKZwX+GfomcALcouqjjV8MIX8DyTrxfyCfXxoKQSDm45CZr9fanJ4F6ckD4yDEPT98SrjvLwIqUCgg==", + "cpu": [ + "riscv64" + ], + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/linux-s390x": { + "version": "0.20.1", + "resolved": "https://registry.npmjs.org/@esbuild/linux-s390x/-/linux-s390x-0.20.1.tgz", + "integrity": "sha512-5BepC2Au80EohQ2dBpyTquqGCES7++p7G+7lXe1bAIvMdXm4YYcEfZtQrP4gaoZ96Wv1Ute61CEHFU7h4FMueQ==", + "cpu": [ + "s390x" + ], + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/linux-x64": { + "version": "0.20.1", + "resolved": "https://registry.npmjs.org/@esbuild/linux-x64/-/linux-x64-0.20.1.tgz", + "integrity": "sha512-5gRPk7pKuaIB+tmH+yKd2aQTRpqlf1E4f/mC+tawIm/CGJemZcHZpp2ic8oD83nKgUPMEd0fNanrnFljiruuyA==", + "cpu": [ + "x64" + ], + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/netbsd-x64": { + "version": "0.20.1", + "resolved": "https://registry.npmjs.org/@esbuild/netbsd-x64/-/netbsd-x64-0.20.1.tgz", + "integrity": "sha512-4fL68JdrLV2nVW2AaWZBv3XEm3Ae3NZn/7qy2KGAt3dexAgSVT+Hc97JKSZnqezgMlv9x6KV0ZkZY7UO5cNLCg==", + "cpu": [ + "x64" + ], + "optional": true, + "os": [ + "netbsd" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/openbsd-x64": { + "version": "0.20.1", + "resolved": "https://registry.npmjs.org/@esbuild/openbsd-x64/-/openbsd-x64-0.20.1.tgz", + "integrity": "sha512-GhRuXlvRE+twf2ES+8REbeCb/zeikNqwD3+6S5y5/x+DYbAQUNl0HNBs4RQJqrechS4v4MruEr8ZtAin/hK5iw==", + "cpu": [ + "x64" + ], + "optional": true, + "os": [ + "openbsd" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/sunos-x64": { + "version": "0.20.1", + "resolved": "https://registry.npmjs.org/@esbuild/sunos-x64/-/sunos-x64-0.20.1.tgz", + "integrity": "sha512-ZnWEyCM0G1Ex6JtsygvC3KUUrlDXqOihw8RicRuQAzw+c4f1D66YlPNNV3rkjVW90zXVsHwZYWbJh3v+oQFM9Q==", + "cpu": [ + "x64" + ], + "optional": true, + "os": [ + "sunos" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/win32-arm64": { + "version": "0.20.1", + "resolved": "https://registry.npmjs.org/@esbuild/win32-arm64/-/win32-arm64-0.20.1.tgz", + "integrity": "sha512-QZ6gXue0vVQY2Oon9WyLFCdSuYbXSoxaZrPuJ4c20j6ICedfsDilNPYfHLlMH7vGfU5DQR0czHLmJvH4Nzis/A==", + "cpu": [ + "arm64" + ], + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/win32-ia32": { + "version": "0.20.1", + "resolved": "https://registry.npmjs.org/@esbuild/win32-ia32/-/win32-ia32-0.20.1.tgz", + "integrity": "sha512-HzcJa1NcSWTAU0MJIxOho8JftNp9YALui3o+Ny7hCh0v5f90nprly1U3Sj1Ldj/CvKKdvvFsCRvDkpsEMp4DNw==", + "cpu": [ + "ia32" + ], + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/win32-x64": { + "version": "0.20.1", + "resolved": "https://registry.npmjs.org/@esbuild/win32-x64/-/win32-x64-0.20.1.tgz", + "integrity": "sha512-0MBh53o6XtI6ctDnRMeQ+xoCN8kD2qI1rY1KgF/xdWQwoFeKou7puvDfV8/Wv4Ctx2rRpET/gGdz3YlNtNACSA==", + "cpu": [ + "x64" + ], + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@eslint-community/eslint-utils": { + "version": "4.4.0", + "resolved": "https://registry.npmjs.org/@eslint-community/eslint-utils/-/eslint-utils-4.4.0.tgz", + "integrity": "sha512-1/sA4dwrzBAyeUoQ6oxahHKmrZvsnLCg4RfxW3ZFGGmQkSNQPFNLV9CUEFQP1x9EYXHTo5p6xdhZM1Ne9p/AfA==", + "dev": true, + "dependencies": { + "eslint-visitor-keys": "^3.3.0" + }, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "peerDependencies": { + "eslint": "^6.0.0 || ^7.0.0 || >=8.0.0" + } + }, + "node_modules/@eslint-community/regexpp": { + "version": "4.10.0", + "resolved": "https://registry.npmjs.org/@eslint-community/regexpp/-/regexpp-4.10.0.tgz", + "integrity": "sha512-Cu96Sd2By9mCNTx2iyKOmq10v22jUVQv0lQnlGNy16oE9589yE+QADPbrMGCkA51cKZSg3Pu/aTJVTGfL/qjUA==", + "dev": true, + "engines": { + "node": "^12.0.0 || ^14.0.0 || >=16.0.0" + } + }, + "node_modules/@eslint/eslintrc": { + "version": "2.1.4", + "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-2.1.4.tgz", + "integrity": "sha512-269Z39MS6wVJtsoUl10L60WdkhJVdPG24Q4eZTH3nnF6lpvSShEK3wQjDX9JRWAUPvPh7COouPpU9IrqaZFvtQ==", + "dev": true, + "dependencies": { + "ajv": "^6.12.4", + "debug": "^4.3.2", + "espree": "^9.6.0", + "globals": "^13.19.0", + "ignore": "^5.2.0", + "import-fresh": "^3.2.1", + "js-yaml": "^4.1.0", + "minimatch": "^3.1.2", + "strip-json-comments": "^3.1.1" + }, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "url": "https://opencollective.com/eslint" + } + }, + "node_modules/@eslint/eslintrc/node_modules/brace-expansion": { "version": "1.1.11", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", + "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", + "dev": true, + "dependencies": { + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" + } + }, + "node_modules/@eslint/eslintrc/node_modules/minimatch": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", + "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", + "dev": true, + "dependencies": { + "brace-expansion": "^1.1.7" + }, + "engines": { + "node": "*" + } + }, + "node_modules/@eslint/js": { + "version": "8.57.0", + "resolved": "https://registry.npmjs.org/@eslint/js/-/js-8.57.0.tgz", + "integrity": "sha512-Ys+3g2TaW7gADOJzPt83SJtCDhMjndcDMFVQ/Tj9iA1BfJzFKD9mAUXT3OenpuPHbI6P/myECxRJrofUsDx/5g==", + "dev": true, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + } + }, + "node_modules/@faker-js/faker": { + "version": "8.4.1", + "resolved": "https://registry.npmjs.org/@faker-js/faker/-/faker-8.4.1.tgz", + "integrity": "sha512-XQ3cU+Q8Uqmrbf2e0cIC/QN43sTBSC8KF12u29Mb47tWrt2hAgBXSgpZMj4Ao8Uk0iJcU99QsOCaIL8934obCg==", + "dev": true, + "funding": [ + { + "type": "opencollective", + "url": "https://opencollective.com/fakerjs" + } + ], + "engines": { + "node": "^14.17.0 || ^16.13.0 || >=18.0.0", + "npm": ">=6.14.13" + } + }, + "node_modules/@humanwhocodes/config-array": { + "version": "0.11.14", + "resolved": "https://registry.npmjs.org/@humanwhocodes/config-array/-/config-array-0.11.14.tgz", + "integrity": "sha512-3T8LkOmg45BV5FICb15QQMsyUSWrQ8AygVfC7ZG32zOalnqrilm018ZVCw0eapXux8FtA33q8PSRSstjee3jSg==", + "dev": true, + "dependencies": { + "@humanwhocodes/object-schema": "^2.0.2", + "debug": "^4.3.1", + "minimatch": "^3.0.5" + }, + "engines": { + "node": ">=10.10.0" + } + }, + "node_modules/@humanwhocodes/config-array/node_modules/brace-expansion": { + "version": "1.1.11", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", + "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", "dev": true, - "license": "MIT", "dependencies": { "balanced-match": "^1.0.0", "concat-map": "0.0.1" @@ -1948,8 +2432,9 @@ }, "node_modules/@humanwhocodes/config-array/node_modules/minimatch": { "version": "3.1.2", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", + "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", "dev": true, - "license": "ISC", "dependencies": { "brace-expansion": "^1.1.7" }, @@ -1959,8 +2444,9 @@ }, "node_modules/@humanwhocodes/module-importer": { "version": "1.0.1", + "resolved": "https://registry.npmjs.org/@humanwhocodes/module-importer/-/module-importer-1.0.1.tgz", + "integrity": "sha512-bxveV4V8v5Yb4ncFTT3rPSgZBOpCkjfK0y4oVVVJwIuDVBRMDXrPyXRL988i5ap9m9bnyEEjWfm5WkBmtffLfA==", "dev": true, - "license": "Apache-2.0", "engines": { "node": ">=12.22" }, @@ -1971,21 +2457,24 @@ }, "node_modules/@humanwhocodes/object-schema": { "version": "2.0.2", - "dev": true, - "license": "BSD-3-Clause" + "resolved": "https://registry.npmjs.org/@humanwhocodes/object-schema/-/object-schema-2.0.2.tgz", + "integrity": "sha512-6EwiSjwWYP7pTckG6I5eyFANjPhmPjUX9JRLUSfNPC7FX7zK9gyZAfUEaECL6ALTpGX5AjnBq3C9XmVWPitNpw==", + "dev": true }, "node_modules/@hutson/parse-repository-url": { "version": "3.0.2", + "resolved": "https://registry.npmjs.org/@hutson/parse-repository-url/-/parse-repository-url-3.0.2.tgz", + "integrity": "sha512-H9XAx3hc0BQHY6l+IFSWHDySypcXsvsuLhgYLUGywmJ5pswRVQJUHpOsobnLYp2ZUaUlKiKDrgWWhosOwAEM8Q==", "dev": true, - "license": "Apache-2.0", "engines": { "node": ">=6.9.0" } }, "node_modules/@isaacs/cliui": { "version": "8.0.2", + "resolved": "https://registry.npmjs.org/@isaacs/cliui/-/cliui-8.0.2.tgz", + "integrity": "sha512-O8jcjabXaleOG9DQ0+ARXWZBTfnP4WNAqzuiJK7ll44AmxGKv/J2M4TPjxjY3znBCfvBXFzucm1twdyFybFqEA==", "dev": true, - "license": "ISC", "dependencies": { "string-width": "^5.1.2", "string-width-cjs": "npm:string-width@^4.2.0", @@ -2000,8 +2489,9 @@ }, "node_modules/@isaacs/cliui/node_modules/ansi-regex": { "version": "6.0.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-6.0.1.tgz", + "integrity": "sha512-n5M855fKb2SsfMIiFFoVrABHJC8QtHwVx+mHWP3QcEqBHYienj5dHSgjbxtC0WEZXYt4wcD6zrQElDPhFuZgfA==", "dev": true, - "license": "MIT", "engines": { "node": ">=12" }, @@ -2011,8 +2501,9 @@ }, "node_modules/@isaacs/cliui/node_modules/ansi-styles": { "version": "6.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-6.2.1.tgz", + "integrity": "sha512-bN798gFfQX+viw3R7yrGWRqnrN2oRkEkUjjl4JNn4E8GxxbjtG3FbrEIIY3l8/hrwUwIeCZvi4QuOTP4MErVug==", "dev": true, - "license": "MIT", "engines": { "node": ">=12" }, @@ -2022,13 +2513,15 @@ }, "node_modules/@isaacs/cliui/node_modules/emoji-regex": { "version": "9.2.2", - "dev": true, - "license": "MIT" + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-9.2.2.tgz", + "integrity": "sha512-L18DaJsXSUk2+42pv8mLs5jJT2hqFkFE4j21wOmgbUqsZ2hL72NsUU785g9RXgo3s0ZNgVl42TiHp3ZtOv/Vyg==", + "dev": true }, "node_modules/@isaacs/cliui/node_modules/string-width": { "version": "5.1.2", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-5.1.2.tgz", + "integrity": "sha512-HnLOCR3vjcY8beoNLtcjZ5/nxn2afmME6lhrDrebokqMap+XbeW8n9TXpPDOqdGK5qcI3oT0GKTW6wC7EMiVqA==", "dev": true, - "license": "MIT", "dependencies": { "eastasianwidth": "^0.2.0", "emoji-regex": "^9.2.2", @@ -2043,8 +2536,9 @@ }, "node_modules/@isaacs/cliui/node_modules/strip-ansi": { "version": "7.1.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-7.1.0.tgz", + "integrity": "sha512-iq6eVVI64nQQTRYq2KtEg2d2uU7LElhTJwsH4YzIHZshxlgZms/wIc4VoDQTlG/IvVIrBKG06CrZnp0qv7hkcQ==", "dev": true, - "license": "MIT", "dependencies": { "ansi-regex": "^6.0.1" }, @@ -2057,8 +2551,9 @@ }, "node_modules/@isaacs/cliui/node_modules/wrap-ansi": { "version": "8.1.0", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-8.1.0.tgz", + "integrity": "sha512-si7QWI6zUMq56bESFvagtmzMdGOtoxfR+Sez11Mobfc7tm+VkUckk9bW2UeffTGVUbOksxmSw0AA2gs8g71NCQ==", "dev": true, - "license": "MIT", "dependencies": { "ansi-styles": "^6.1.0", "string-width": "^5.0.1", @@ -2073,8 +2568,9 @@ }, "node_modules/@istanbuljs/load-nyc-config": { "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@istanbuljs/load-nyc-config/-/load-nyc-config-1.1.0.tgz", + "integrity": "sha512-VjeHSlIzpv/NyD3N0YuHfXOPDIixcA1q2ZV98wsMqcYlPmv2n3Yb2lYP9XMElnaFVXg5A7YLTeLu6V84uQDjmQ==", "dev": true, - "license": "ISC", "dependencies": { "camelcase": "^5.3.1", "find-up": "^4.1.0", @@ -2088,16 +2584,18 @@ }, "node_modules/@istanbuljs/load-nyc-config/node_modules/argparse": { "version": "1.0.10", + "resolved": "https://registry.npmjs.org/argparse/-/argparse-1.0.10.tgz", + "integrity": "sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg==", "dev": true, - "license": "MIT", "dependencies": { "sprintf-js": "~1.0.2" } }, "node_modules/@istanbuljs/load-nyc-config/node_modules/find-up": { "version": "4.1.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-4.1.0.tgz", + "integrity": "sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw==", "dev": true, - "license": "MIT", "dependencies": { "locate-path": "^5.0.0", "path-exists": "^4.0.0" @@ -2108,8 +2606,9 @@ }, "node_modules/@istanbuljs/load-nyc-config/node_modules/js-yaml": { "version": "3.14.1", + "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.14.1.tgz", + "integrity": "sha512-okMH7OXXJ7YrN9Ok3/SXrnu4iX9yOk+25nqX4imS2npuvTYDmo/QEZoqwZkYaIDk3jVvBOTOIEgEhaLOynBS9g==", "dev": true, - "license": "MIT", "dependencies": { "argparse": "^1.0.7", "esprima": "^4.0.0" @@ -2120,8 +2619,9 @@ }, "node_modules/@istanbuljs/load-nyc-config/node_modules/locate-path": { "version": "5.0.0", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-5.0.0.tgz", + "integrity": "sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g==", "dev": true, - "license": "MIT", "dependencies": { "p-locate": "^4.1.0" }, @@ -2131,8 +2631,9 @@ }, "node_modules/@istanbuljs/load-nyc-config/node_modules/p-limit": { "version": "2.3.0", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.3.0.tgz", + "integrity": "sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w==", "dev": true, - "license": "MIT", "dependencies": { "p-try": "^2.0.0" }, @@ -2145,8 +2646,9 @@ }, "node_modules/@istanbuljs/load-nyc-config/node_modules/p-locate": { "version": "4.1.0", + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-4.1.0.tgz", + "integrity": "sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A==", "dev": true, - "license": "MIT", "dependencies": { "p-limit": "^2.2.0" }, @@ -2156,29 +2658,27 @@ }, "node_modules/@istanbuljs/load-nyc-config/node_modules/resolve-from": { "version": "5.0.0", + "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-5.0.0.tgz", + "integrity": "sha512-qYg9KP24dD5qka9J47d0aVky0N+b4fTU89LN9iDnjB5waksiC49rvMB0PrUJQGoTmH50XPiqOvAjDfaijGxYZw==", "dev": true, - "license": "MIT", "engines": { "node": ">=8" } }, - "node_modules/@istanbuljs/load-nyc-config/node_modules/sprintf-js": { - "version": "1.0.3", - "dev": true, - "license": "BSD-3-Clause" - }, "node_modules/@istanbuljs/schema": { "version": "0.1.3", + "resolved": "https://registry.npmjs.org/@istanbuljs/schema/-/schema-0.1.3.tgz", + "integrity": "sha512-ZXRY4jNvVgSVQ8DL3LTcakaAtXwTVUxE81hslsyD2AtoXW/wVob10HkOJ1X/pAlcI7D+2YoZKg5do8G/w6RYgA==", "dev": true, - "license": "MIT", "engines": { "node": ">=8" } }, "node_modules/@jest/console": { "version": "29.7.0", + "resolved": "https://registry.npmjs.org/@jest/console/-/console-29.7.0.tgz", + "integrity": "sha512-5Ni4CU7XHQi32IJ398EEP4RrB8eV09sXP2ROqD4bksHrnTree52PsxvX8tpL8LvTZ3pFzXyPbNQReSN41CAhOg==", "dev": true, - "license": "MIT", "dependencies": { "@jest/types": "^29.6.3", "@types/node": "*", @@ -2193,8 +2693,9 @@ }, "node_modules/@jest/core": { "version": "29.7.0", + "resolved": "https://registry.npmjs.org/@jest/core/-/core-29.7.0.tgz", + "integrity": "sha512-n7aeXWKMnGtDA48y8TLWJPJmLmmZ642Ceo78cYWEpiD7FzDgmNDV/GCVRorPABdXLJZ/9wzzgZAlHjXjxDHGsg==", "dev": true, - "license": "MIT", "dependencies": { "@jest/console": "^29.7.0", "@jest/reporters": "^29.7.0", @@ -2239,8 +2740,9 @@ }, "node_modules/@jest/environment": { "version": "29.7.0", + "resolved": "https://registry.npmjs.org/@jest/environment/-/environment-29.7.0.tgz", + "integrity": "sha512-aQIfHDq33ExsN4jP1NWGXhxgQ/wixs60gDiKO+XVMd8Mn0NWPWgc34ZQDTb2jKaUWQ7MuwoitXAsN2XVXNMpAw==", "dev": true, - "license": "MIT", "dependencies": { "@jest/fake-timers": "^29.7.0", "@jest/types": "^29.6.3", @@ -2253,8 +2755,9 @@ }, "node_modules/@jest/expect": { "version": "29.7.0", + "resolved": "https://registry.npmjs.org/@jest/expect/-/expect-29.7.0.tgz", + "integrity": "sha512-8uMeAMycttpva3P1lBHB8VciS9V0XAr3GymPpipdyQXbBcuhkLQOSe8E/p92RyAdToS6ZD1tFkX+CkhoECE0dQ==", "dev": true, - "license": "MIT", "dependencies": { "expect": "^29.7.0", "jest-snapshot": "^29.7.0" @@ -2265,8 +2768,9 @@ }, "node_modules/@jest/expect-utils": { "version": "29.7.0", + "resolved": "https://registry.npmjs.org/@jest/expect-utils/-/expect-utils-29.7.0.tgz", + "integrity": "sha512-GlsNBWiFQFCVi9QVSx7f5AgMeLxe9YCCs5PuP2O2LdjDAA8Jh9eX7lA1Jq/xdXw3Wb3hyvlFNfZIfcRetSzYcA==", "dev": true, - "license": "MIT", "dependencies": { "jest-get-type": "^29.6.3" }, @@ -2276,8 +2780,9 @@ }, "node_modules/@jest/fake-timers": { "version": "29.7.0", + "resolved": "https://registry.npmjs.org/@jest/fake-timers/-/fake-timers-29.7.0.tgz", + "integrity": "sha512-q4DH1Ha4TTFPdxLsqDXK1d3+ioSL7yL5oCMJZgDYm6i+6CygW5E5xVr/D1HdsGxjt1ZWSfUAs9OxSB/BNelWrQ==", "dev": true, - "license": "MIT", "dependencies": { "@jest/types": "^29.6.3", "@sinonjs/fake-timers": "^10.0.2", @@ -2292,8 +2797,9 @@ }, "node_modules/@jest/globals": { "version": "29.7.0", + "resolved": "https://registry.npmjs.org/@jest/globals/-/globals-29.7.0.tgz", + "integrity": "sha512-mpiz3dutLbkW2MNFubUGUEVLkTGiqW6yLVTA+JbP6fI6J5iL9Y0Nlg8k95pcF8ctKwCS7WVxteBs29hhfAotzQ==", "dev": true, - "license": "MIT", "dependencies": { "@jest/environment": "^29.7.0", "@jest/expect": "^29.7.0", @@ -2306,8 +2812,9 @@ }, "node_modules/@jest/reporters": { "version": "29.7.0", + "resolved": "https://registry.npmjs.org/@jest/reporters/-/reporters-29.7.0.tgz", + "integrity": "sha512-DApq0KJbJOEzAFYjHADNNxAE3KbhxQB1y5Kplb5Waqw6zVbuWatSnMjE5gs8FUgEPmNsnZA3NCWl9NG0ia04Pg==", "dev": true, - "license": "MIT", "dependencies": { "@bcoe/v8-coverage": "^0.2.3", "@jest/console": "^29.7.0", @@ -2348,8 +2855,9 @@ }, "node_modules/@jest/schemas": { "version": "29.6.3", + "resolved": "https://registry.npmjs.org/@jest/schemas/-/schemas-29.6.3.tgz", + "integrity": "sha512-mo5j5X+jIZmJQveBKeS/clAueipV7KgiX1vMgCxam1RNYiqE1w62n0/tJJnHtjW8ZHcQco5gY85jA3mi0L+nSA==", "dev": true, - "license": "MIT", "dependencies": { "@sinclair/typebox": "^0.27.8" }, @@ -2359,8 +2867,9 @@ }, "node_modules/@jest/source-map": { "version": "29.6.3", + "resolved": "https://registry.npmjs.org/@jest/source-map/-/source-map-29.6.3.tgz", + "integrity": "sha512-MHjT95QuipcPrpLM+8JMSzFx6eHp5Bm+4XeFDJlwsvVBjmKNiIAvasGK2fxz2WbGRlnvqehFbh07MMa7n3YJnw==", "dev": true, - "license": "MIT", "dependencies": { "@jridgewell/trace-mapping": "^0.3.18", "callsites": "^3.0.0", @@ -2372,8 +2881,9 @@ }, "node_modules/@jest/test-result": { "version": "29.7.0", + "resolved": "https://registry.npmjs.org/@jest/test-result/-/test-result-29.7.0.tgz", + "integrity": "sha512-Fdx+tv6x1zlkJPcWXmMDAG2HBnaR9XPSd5aDWQVsfrZmLVT3lU1cwyxLgRmXR9yrq4NBoEm9BMsfgFzTQAbJYA==", "dev": true, - "license": "MIT", "dependencies": { "@jest/console": "^29.7.0", "@jest/types": "^29.6.3", @@ -2386,8 +2896,9 @@ }, "node_modules/@jest/test-sequencer": { "version": "29.7.0", + "resolved": "https://registry.npmjs.org/@jest/test-sequencer/-/test-sequencer-29.7.0.tgz", + "integrity": "sha512-GQwJ5WZVrKnOJuiYiAF52UNUJXgTZx1NHjFSEB0qEMmSZKAkdMoIzw/Cj6x6NF4AvV23AUqDpFzQkN/eYCYTxw==", "dev": true, - "license": "MIT", "dependencies": { "@jest/test-result": "^29.7.0", "graceful-fs": "^4.2.9", @@ -2400,8 +2911,9 @@ }, "node_modules/@jest/transform": { "version": "29.7.0", + "resolved": "https://registry.npmjs.org/@jest/transform/-/transform-29.7.0.tgz", + "integrity": "sha512-ok/BTPFzFKVMwO5eOHRrvnBVHdRy9IrsrW1GpMaQ9MCnilNLXQKmAX8s1YXDFaai9xJpac2ySzV0YeRRECr2Vw==", "dev": true, - "license": "MIT", "dependencies": { "@babel/core": "^7.11.6", "@jest/types": "^29.6.3", @@ -2425,8 +2937,9 @@ }, "node_modules/@jest/types": { "version": "29.6.3", + "resolved": "https://registry.npmjs.org/@jest/types/-/types-29.6.3.tgz", + "integrity": "sha512-u3UPsIilWKOM3F9CXtrG8LEJmNxwoCQC/XVj4IKYXvvpx7QIi/Kg1LI5uDmDpKlac62NUtX7eLjRh+jVZcLOzw==", "dev": true, - "license": "MIT", "dependencies": { "@jest/schemas": "^29.6.3", "@types/istanbul-lib-coverage": "^2.0.0", @@ -2440,43 +2953,48 @@ } }, "node_modules/@jridgewell/gen-mapping": { - "version": "0.3.5", + "version": "0.3.3", + "resolved": "https://registry.npmjs.org/@jridgewell/gen-mapping/-/gen-mapping-0.3.3.tgz", + "integrity": "sha512-HLhSWOLRi875zjjMG/r+Nv0oCW8umGb0BgEhyX3dDX3egwZtB8PqLnjz3yedt8R5StBrzcg4aBpnh8UA9D1BoQ==", "dev": true, - "license": "MIT", "dependencies": { - "@jridgewell/set-array": "^1.2.1", + "@jridgewell/set-array": "^1.0.1", "@jridgewell/sourcemap-codec": "^1.4.10", - "@jridgewell/trace-mapping": "^0.3.24" + "@jridgewell/trace-mapping": "^0.3.9" }, "engines": { "node": ">=6.0.0" } }, "node_modules/@jridgewell/resolve-uri": { - "version": "3.1.2", + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/@jridgewell/resolve-uri/-/resolve-uri-3.1.1.tgz", + "integrity": "sha512-dSYZh7HhCDtCKm4QakX0xFpsRDqjjtZf/kjI/v3T3Nwt5r8/qz/M19F9ySyOqU94SXBmeG9ttTul+YnR4LOxFA==", "dev": true, - "license": "MIT", "engines": { "node": ">=6.0.0" } }, "node_modules/@jridgewell/set-array": { - "version": "1.2.1", + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/@jridgewell/set-array/-/set-array-1.1.2.tgz", + "integrity": "sha512-xnkseuNADM0gt2bs+BvhO0p78Mk762YnZdsuzFV018NoG1Sj1SCQvpSqa7XUaTam5vAGasABV9qXASMKnFMwMw==", "dev": true, - "license": "MIT", "engines": { "node": ">=6.0.0" } }, "node_modules/@jridgewell/sourcemap-codec": { "version": "1.4.15", - "dev": true, - "license": "MIT" + "resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.4.15.tgz", + "integrity": "sha512-eF2rxCRulEKXHTRiDrDy6erMYWqNw4LPdQ8UQA4huuxaQsVeRPFl2oM8oDGxMFhJUWZf9McpLtJasDDZb/Bpeg==", + "dev": true }, "node_modules/@jridgewell/trace-mapping": { - "version": "0.3.25", + "version": "0.3.21", + "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.21.tgz", + "integrity": "sha512-SRfKmRe1KvYnxjEMtxEr+J4HIeMX5YBg/qhRHpxEIGjhX1rshcHlnFUE9K0GazhVKWM7B+nARSkV8LuvJdJ5/g==", "dev": true, - "license": "MIT", "dependencies": { "@jridgewell/resolve-uri": "^3.1.0", "@jridgewell/sourcemap-codec": "^1.4.14" @@ -2484,8 +3002,9 @@ }, "node_modules/@lerna/create": { "version": "8.1.2", + "resolved": "https://registry.npmjs.org/@lerna/create/-/create-8.1.2.tgz", + "integrity": "sha512-GzScCIkAW3tg3+Yn/MKCH9963bzG+zpjGz2NdfYDlYWI7p0f/SH46v1dqpPpYmZ2E/m3JK8HjTNNNL8eIm8/YQ==", "dev": true, - "license": "MIT", "dependencies": { "@npmcli/run-script": "7.0.2", "@nx/devkit": ">=17.1.2 < 19", @@ -2558,8 +3077,9 @@ }, "node_modules/@lerna/create/node_modules/brace-expansion": { "version": "1.1.11", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", + "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", "dev": true, - "license": "MIT", "dependencies": { "balanced-match": "^1.0.0", "concat-map": "0.0.1" @@ -2567,8 +3087,9 @@ }, "node_modules/@lerna/create/node_modules/chalk": { "version": "4.1.0", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.0.tgz", + "integrity": "sha512-qwx12AxXe2Q5xQ43Ac//I6v5aXTipYrSESdOgzrN+9XjgEpyjpKuvSGaN4qE93f7TQTlerQQ8S+EQ0EyDoVL1A==", "dev": true, - "license": "MIT", "dependencies": { "ansi-styles": "^4.1.0", "supports-color": "^7.1.0" @@ -2582,13 +3103,15 @@ }, "node_modules/@lerna/create/node_modules/dedent": { "version": "0.7.0", - "dev": true, - "license": "MIT" + "resolved": "https://registry.npmjs.org/dedent/-/dedent-0.7.0.tgz", + "integrity": "sha512-Q6fKUPqnAHAyhiUgFU7BUzLiv0kd8saH9al7tnu5Q/okj6dnupxyTgFIBjVzJATdfIAm9NAsvXNzjaKa+bxVyA==", + "dev": true }, "node_modules/@lerna/create/node_modules/execa": { "version": "5.0.0", + "resolved": "https://registry.npmjs.org/execa/-/execa-5.0.0.tgz", + "integrity": "sha512-ov6w/2LCiuyO4RLYGdpFGjkcs0wMTgGE8PrkTHikeUy5iJekXyPIKUjifk5CsE0pt7sMCrMZ3YNqoCj6idQOnQ==", "dev": true, - "license": "MIT", "dependencies": { "cross-spawn": "^7.0.3", "get-stream": "^6.0.0", @@ -2609,8 +3132,9 @@ }, "node_modules/@lerna/create/node_modules/get-stream": { "version": "6.0.0", + "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-6.0.0.tgz", + "integrity": "sha512-A1B3Bh1UmL0bidM/YX2NsCOTnGJePL9rO/M+Mw3m9f2gUpfokS0hi5Eah0WSUEWZdZhIZtMjkIYS7mDfOqNHbg==", "dev": true, - "license": "MIT", "engines": { "node": ">=10" }, @@ -2620,8 +3144,9 @@ }, "node_modules/@lerna/create/node_modules/glob": { "version": "9.3.5", + "resolved": "https://registry.npmjs.org/glob/-/glob-9.3.5.tgz", + "integrity": "sha512-e1LleDykUz2Iu+MTYdkSsuWX8lvAjAcs0Xef0lNIu0S2wOAzuTxCJtcd9S3cijlwYF18EsU3rzb8jPVobxDh9Q==", "dev": true, - "license": "ISC", "dependencies": { "fs.realpath": "^1.0.0", "minimatch": "^8.0.2", @@ -2637,8 +3162,9 @@ }, "node_modules/@lerna/create/node_modules/glob-parent": { "version": "5.1.2", + "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz", + "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==", "dev": true, - "license": "ISC", "dependencies": { "is-glob": "^4.0.1" }, @@ -2648,16 +3174,18 @@ }, "node_modules/@lerna/create/node_modules/glob/node_modules/brace-expansion": { "version": "2.0.1", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz", + "integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==", "dev": true, - "license": "MIT", "dependencies": { "balanced-match": "^1.0.0" } }, "node_modules/@lerna/create/node_modules/glob/node_modules/minimatch": { "version": "8.0.4", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-8.0.4.tgz", + "integrity": "sha512-W0Wvr9HyFXZRGIDgCicunpQ299OKXs9RgZfaukz4qAW/pJhcpUfupc9c+OObPOFueNy8VSrZgEmDtk6Kh4WzDA==", "dev": true, - "license": "ISC", "dependencies": { "brace-expansion": "^2.0.1" }, @@ -2670,16 +3198,18 @@ }, "node_modules/@lerna/create/node_modules/is-stream": { "version": "2.0.0", + "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-2.0.0.tgz", + "integrity": "sha512-XCoy+WlUr7d1+Z8GgSuXmpuUFC9fOhRXglJMx+dwLKTkL44Cjd4W1Z5P+BQZpr+cR93aGP4S/s7Ftw6Nd/kiEw==", "dev": true, - "license": "MIT", "engines": { "node": ">=8" } }, "node_modules/@lerna/create/node_modules/minimatch": { "version": "3.0.5", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.5.tgz", + "integrity": "sha512-tUpxzX0VAzJHjLu0xUfFv1gwVp9ba3IOuRAVH2EGuRW8a5emA2FlACLqiT/lDVtS1W+TGNwqz3sWaNyLgDJWuw==", "dev": true, - "license": "ISC", "dependencies": { "brace-expansion": "^1.1.7" }, @@ -2689,24 +3219,27 @@ }, "node_modules/@lerna/create/node_modules/minipass": { "version": "4.2.8", + "resolved": "https://registry.npmjs.org/minipass/-/minipass-4.2.8.tgz", + "integrity": "sha512-fNzuVyifolSLFL4NzpF+wEF4qrgqaaKX0haXPQEdQ7NKAN+WecoKMHV09YcuL/DHxrUsYQOK3MiuDf7Ip2OXfQ==", "dev": true, - "license": "ISC", "engines": { "node": ">=8" } }, "node_modules/@lerna/create/node_modules/resolve-from": { "version": "5.0.0", + "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-5.0.0.tgz", + "integrity": "sha512-qYg9KP24dD5qka9J47d0aVky0N+b4fTU89LN9iDnjB5waksiC49rvMB0PrUJQGoTmH50XPiqOvAjDfaijGxYZw==", "dev": true, - "license": "MIT", "engines": { "node": ">=8" } }, "node_modules/@lerna/create/node_modules/rimraf": { "version": "4.4.1", + "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-4.4.1.tgz", + "integrity": "sha512-Gk8NlF062+T9CqNGn6h4tls3k6T1+/nXdOcSZVikNVtlRdYpA7wRJJMoXmuvOnLW844rPjdQ7JgXCYM6PPC/og==", "dev": true, - "license": "ISC", "dependencies": { "glob": "^9.2.0" }, @@ -2720,10 +3253,24 @@ "url": "https://github.com/sponsors/isaacs" } }, + "node_modules/@lerna/create/node_modules/uuid": { + "version": "9.0.1", + "resolved": "https://registry.npmjs.org/uuid/-/uuid-9.0.1.tgz", + "integrity": "sha512-b+1eJOlsR9K8HJpow9Ok3fiWOWSIcIzXodvv0rQjVoOVNpWMpxf1wZNpt4y9h10odCNrqnYp1OBzRktckBe3sA==", + "dev": true, + "funding": [ + "https://github.com/sponsors/broofa", + "https://github.com/sponsors/ctavan" + ], + "bin": { + "uuid": "dist/bin/uuid" + } + }, "node_modules/@lerna/create/node_modules/write-file-atomic": { "version": "5.0.1", + "resolved": "https://registry.npmjs.org/write-file-atomic/-/write-file-atomic-5.0.1.tgz", + "integrity": "sha512-+QU2zd6OTD8XWIJCbffaiQeH9U73qIqafo1x6V1snCWYGJf6cVE0cDR4D8xRzcEnfI21IFrUPzPGtcPf8AC+Rw==", "dev": true, - "license": "ISC", "dependencies": { "imurmurhash": "^0.1.4", "signal-exit": "^4.0.1" @@ -2734,8 +3281,9 @@ }, "node_modules/@lerna/create/node_modules/write-file-atomic/node_modules/signal-exit": { "version": "4.1.0", + "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-4.1.0.tgz", + "integrity": "sha512-bzyZ1e88w9O1iNJbKnOlvYTrWPDl46O1bG0D3XInv+9tkPrxrN8jUUTiFlDkkmKWgn1M6CfIA13SuGqOa9Korw==", "dev": true, - "license": "ISC", "engines": { "node": ">=14" }, @@ -2745,7 +3293,8 @@ }, "node_modules/@middy/core": { "version": "4.7.0", - "license": "MIT", + "resolved": "https://registry.npmjs.org/@middy/core/-/core-4.7.0.tgz", + "integrity": "sha512-yI++DmhDQ8+ugvY7+GrEnb2PF0M/6Wzbgu4Tf7QhOlhwKGDd4j6or+Ab7qYPWx+jnKf8F0tqlmh0gV4JLi0yHw==", "engines": { "node": ">=16" }, @@ -2756,8 +3305,9 @@ }, "node_modules/@nodelib/fs.scandir": { "version": "2.1.5", + "resolved": "https://registry.npmjs.org/@nodelib/fs.scandir/-/fs.scandir-2.1.5.tgz", + "integrity": "sha512-vq24Bq3ym5HEQm2NKCr3yXDwjc7vTsEThRDnkp2DK9p1uqLR+DHurm/NOTo0KG7HYHU7eppKZj3MyqYuMBf62g==", "dev": true, - "license": "MIT", "dependencies": { "@nodelib/fs.stat": "2.0.5", "run-parallel": "^1.1.9" @@ -2768,16 +3318,18 @@ }, "node_modules/@nodelib/fs.stat": { "version": "2.0.5", + "resolved": "https://registry.npmjs.org/@nodelib/fs.stat/-/fs.stat-2.0.5.tgz", + "integrity": "sha512-RkhPPp2zrqDAQA/2jNhnztcPAlv64XdhIp7a7454A5ovI7Bukxgt7MX7udwAu3zg1DcpPU0rz3VV1SeaqvY4+A==", "dev": true, - "license": "MIT", "engines": { "node": ">= 8" } }, "node_modules/@nodelib/fs.walk": { "version": "1.2.8", + "resolved": "https://registry.npmjs.org/@nodelib/fs.walk/-/fs.walk-1.2.8.tgz", + "integrity": "sha512-oGB+UxlgWcgQkgwo8GcEGwemoTFt3FIO9ababBmaGwXIoBKZ+GTy0pP185beGg7Llih/NSHSV2XAs1lnznocSg==", "dev": true, - "license": "MIT", "dependencies": { "@nodelib/fs.scandir": "2.1.5", "fastq": "^1.6.0" @@ -2788,8 +3340,9 @@ }, "node_modules/@npmcli/agent": { "version": "2.2.1", + "resolved": "https://registry.npmjs.org/@npmcli/agent/-/agent-2.2.1.tgz", + "integrity": "sha512-H4FrOVtNyWC8MUwL3UfjOsAihHvT1Pe8POj3JvjXhSTJipsZMtgUALCT4mGyYZNxymkUfOw3PUj6dE4QPp6osQ==", "dev": true, - "license": "ISC", "dependencies": { "agent-base": "^7.1.0", "http-proxy-agent": "^7.0.0", @@ -2801,18 +3354,72 @@ "node": "^16.14.0 || >=18.0.0" } }, + "node_modules/@npmcli/agent/node_modules/agent-base": { + "version": "7.1.0", + "resolved": "https://registry.npmjs.org/agent-base/-/agent-base-7.1.0.tgz", + "integrity": "sha512-o/zjMZRhJxny7OyEF+Op8X+efiELC7k7yOjMzgfzVqOzXqkBkWI79YoTdOtsuWd5BWhAGAuOY/Xa6xpiaWXiNg==", + "dev": true, + "dependencies": { + "debug": "^4.3.4" + }, + "engines": { + "node": ">= 14" + } + }, + "node_modules/@npmcli/agent/node_modules/http-proxy-agent": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/http-proxy-agent/-/http-proxy-agent-7.0.0.tgz", + "integrity": "sha512-+ZT+iBxVUQ1asugqnD6oWoRiS25AkjNfG085dKJGtGxkdwLQrMKU5wJr2bOOFAXzKcTuqq+7fZlTMgG3SRfIYQ==", + "dev": true, + "dependencies": { + "agent-base": "^7.1.0", + "debug": "^4.3.4" + }, + "engines": { + "node": ">= 14" + } + }, + "node_modules/@npmcli/agent/node_modules/https-proxy-agent": { + "version": "7.0.2", + "resolved": "https://registry.npmjs.org/https-proxy-agent/-/https-proxy-agent-7.0.2.tgz", + "integrity": "sha512-NmLNjm6ucYwtcUmL7JQC1ZQ57LmHP4lT15FQ8D61nak1rO6DH+fz5qNK2Ap5UN4ZapYICE3/0KodcLYSPsPbaA==", + "dev": true, + "dependencies": { + "agent-base": "^7.0.2", + "debug": "4" + }, + "engines": { + "node": ">= 14" + } + }, "node_modules/@npmcli/agent/node_modules/lru-cache": { "version": "10.2.0", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-10.2.0.tgz", + "integrity": "sha512-2bIM8x+VAf6JT4bKAljS1qUWgMsqZRPGJS6FSahIMPVvctcNhyVp7AJu7quxOW9jwkryBReKZY5tY5JYv2n/7Q==", "dev": true, - "license": "ISC", "engines": { "node": "14 || >=16.14" } }, + "node_modules/@npmcli/agent/node_modules/socks-proxy-agent": { + "version": "8.0.2", + "resolved": "https://registry.npmjs.org/socks-proxy-agent/-/socks-proxy-agent-8.0.2.tgz", + "integrity": "sha512-8zuqoLv1aP/66PHF5TqwJ7Czm3Yv32urJQHrVyhD7mmA6d61Zv8cIXQYPTWwmg6qlupnPvs/QKDmfa4P/qct2g==", + "dev": true, + "dependencies": { + "agent-base": "^7.0.2", + "debug": "^4.3.4", + "socks": "^2.7.1" + }, + "engines": { + "node": ">= 14" + } + }, "node_modules/@npmcli/fs": { "version": "3.1.0", + "resolved": "https://registry.npmjs.org/@npmcli/fs/-/fs-3.1.0.tgz", + "integrity": "sha512-7kZUAaLscfgbwBQRbvdMYaZOWyMEcPTH/tJjnyAWJ/dvvs9Ef+CERx/qJb9GExJpl1qipaDGn7KqHnFGGixd0w==", "dev": true, - "license": "ISC", "dependencies": { "semver": "^7.3.5" }, @@ -2822,8 +3429,9 @@ }, "node_modules/@npmcli/git": { "version": "5.0.4", + "resolved": "https://registry.npmjs.org/@npmcli/git/-/git-5.0.4.tgz", + "integrity": "sha512-nr6/WezNzuYUppzXRaYu/W4aT5rLxdXqEFupbh6e/ovlYFQ8hpu1UUPV3Ir/YTl+74iXl2ZOMlGzudh9ZPUchQ==", "dev": true, - "license": "ISC", "dependencies": { "@npmcli/promise-spawn": "^7.0.0", "lru-cache": "^10.0.1", @@ -2840,24 +3448,27 @@ }, "node_modules/@npmcli/git/node_modules/isexe": { "version": "3.1.1", + "resolved": "https://registry.npmjs.org/isexe/-/isexe-3.1.1.tgz", + "integrity": "sha512-LpB/54B+/2J5hqQ7imZHfdU31OlgQqx7ZicVlkm9kzg9/w8GKLEcFfJl/t7DCEDueOyBAD6zCCwTO6Fzs0NoEQ==", "dev": true, - "license": "ISC", "engines": { "node": ">=16" } }, "node_modules/@npmcli/git/node_modules/lru-cache": { "version": "10.2.0", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-10.2.0.tgz", + "integrity": "sha512-2bIM8x+VAf6JT4bKAljS1qUWgMsqZRPGJS6FSahIMPVvctcNhyVp7AJu7quxOW9jwkryBReKZY5tY5JYv2n/7Q==", "dev": true, - "license": "ISC", "engines": { "node": "14 || >=16.14" } }, "node_modules/@npmcli/git/node_modules/which": { "version": "4.0.0", + "resolved": "https://registry.npmjs.org/which/-/which-4.0.0.tgz", + "integrity": "sha512-GlaYyEb07DPxYCKhKzplCWBJtvxZcZMrL+4UkrTSJHHPyZU4mYYTv3qaOe77H7EODLSSopAUFAc6W8U4yqvscg==", "dev": true, - "license": "ISC", "dependencies": { "isexe": "^3.1.1" }, @@ -2870,8 +3481,9 @@ }, "node_modules/@npmcli/installed-package-contents": { "version": "2.0.2", + "resolved": "https://registry.npmjs.org/@npmcli/installed-package-contents/-/installed-package-contents-2.0.2.tgz", + "integrity": "sha512-xACzLPhnfD51GKvTOOuNX2/V4G4mz9/1I2MfDoye9kBM3RYe5g2YbscsaGoTlaWqkxeiapBWyseULVKpSVHtKQ==", "dev": true, - "license": "ISC", "dependencies": { "npm-bundled": "^3.0.0", "npm-normalize-package-bin": "^3.0.0" @@ -2885,8 +3497,9 @@ }, "node_modules/@npmcli/installed-package-contents/node_modules/npm-bundled": { "version": "3.0.0", + "resolved": "https://registry.npmjs.org/npm-bundled/-/npm-bundled-3.0.0.tgz", + "integrity": "sha512-Vq0eyEQy+elFpzsKjMss9kxqb9tG3YHg4dsyWuUENuzvSUWe1TCnW/vV9FkhvBk/brEDoDiVd+M1Btosa6ImdQ==", "dev": true, - "license": "ISC", "dependencies": { "npm-normalize-package-bin": "^3.0.0" }, @@ -2896,24 +3509,27 @@ }, "node_modules/@npmcli/installed-package-contents/node_modules/npm-normalize-package-bin": { "version": "3.0.1", + "resolved": "https://registry.npmjs.org/npm-normalize-package-bin/-/npm-normalize-package-bin-3.0.1.tgz", + "integrity": "sha512-dMxCf+zZ+3zeQZXKxmyuCKlIDPGuv8EF940xbkC4kQVDTtqoh6rJFO+JTKSA6/Rwi0getWmtuy4Itup0AMcaDQ==", "dev": true, - "license": "ISC", "engines": { "node": "^14.17.0 || ^16.13.0 || >=18.0.0" } }, "node_modules/@npmcli/node-gyp": { "version": "3.0.0", + "resolved": "https://registry.npmjs.org/@npmcli/node-gyp/-/node-gyp-3.0.0.tgz", + "integrity": "sha512-gp8pRXC2oOxu0DUE1/M3bYtb1b3/DbJ5aM113+XJBgfXdussRAsX0YOrOhdd8WvnAR6auDBvJomGAkLKA5ydxA==", "dev": true, - "license": "ISC", "engines": { "node": "^14.17.0 || ^16.13.0 || >=18.0.0" } }, "node_modules/@npmcli/promise-spawn": { "version": "7.0.1", + "resolved": "https://registry.npmjs.org/@npmcli/promise-spawn/-/promise-spawn-7.0.1.tgz", + "integrity": "sha512-P4KkF9jX3y+7yFUxgcUdDtLy+t4OlDGuEBLNs57AZsfSfg+uV6MLndqGpnl4831ggaEdXwR50XFoZP4VFtHolg==", "dev": true, - "license": "ISC", "dependencies": { "which": "^4.0.0" }, @@ -2923,16 +3539,18 @@ }, "node_modules/@npmcli/promise-spawn/node_modules/isexe": { "version": "3.1.1", + "resolved": "https://registry.npmjs.org/isexe/-/isexe-3.1.1.tgz", + "integrity": "sha512-LpB/54B+/2J5hqQ7imZHfdU31OlgQqx7ZicVlkm9kzg9/w8GKLEcFfJl/t7DCEDueOyBAD6zCCwTO6Fzs0NoEQ==", "dev": true, - "license": "ISC", "engines": { "node": ">=16" } }, "node_modules/@npmcli/promise-spawn/node_modules/which": { "version": "4.0.0", + "resolved": "https://registry.npmjs.org/which/-/which-4.0.0.tgz", + "integrity": "sha512-GlaYyEb07DPxYCKhKzplCWBJtvxZcZMrL+4UkrTSJHHPyZU4mYYTv3qaOe77H7EODLSSopAUFAc6W8U4yqvscg==", "dev": true, - "license": "ISC", "dependencies": { "isexe": "^3.1.1" }, @@ -2945,8 +3563,9 @@ }, "node_modules/@npmcli/run-script": { "version": "7.0.2", + "resolved": "https://registry.npmjs.org/@npmcli/run-script/-/run-script-7.0.2.tgz", + "integrity": "sha512-Omu0rpA8WXvcGeY6DDzyRoY1i5DkCBkzyJ+m2u7PD6quzb0TvSqdIPOkTn8ZBOj7LbbcbMfZ3c5skwSu6m8y2w==", "dev": true, - "license": "ISC", "dependencies": { "@npmcli/node-gyp": "^3.0.0", "@npmcli/promise-spawn": "^7.0.0", @@ -2960,16 +3579,18 @@ }, "node_modules/@npmcli/run-script/node_modules/isexe": { "version": "3.1.1", + "resolved": "https://registry.npmjs.org/isexe/-/isexe-3.1.1.tgz", + "integrity": "sha512-LpB/54B+/2J5hqQ7imZHfdU31OlgQqx7ZicVlkm9kzg9/w8GKLEcFfJl/t7DCEDueOyBAD6zCCwTO6Fzs0NoEQ==", "dev": true, - "license": "ISC", "engines": { "node": ">=16" } }, "node_modules/@npmcli/run-script/node_modules/which": { "version": "4.0.0", + "resolved": "https://registry.npmjs.org/which/-/which-4.0.0.tgz", + "integrity": "sha512-GlaYyEb07DPxYCKhKzplCWBJtvxZcZMrL+4UkrTSJHHPyZU4mYYTv3qaOe77H7EODLSSopAUFAc6W8U4yqvscg==", "dev": true, - "license": "ISC", "dependencies": { "isexe": "^3.1.1" }, @@ -2977,57 +3598,205 @@ "node-which": "bin/which.js" }, "engines": { - "node": "^16.13.0 || >=18.0.0" + "node": "^16.13.0 || >=18.0.0" + } + }, + "node_modules/@nrwl/devkit": { + "version": "18.0.3", + "resolved": "https://registry.npmjs.org/@nrwl/devkit/-/devkit-18.0.3.tgz", + "integrity": "sha512-ztDAaiEciEL4Gwq42m6+gz392QnBRBZoYwYUEXhLiOrPngAu2eGnkXrQlSvF54ISKLwzD7gnGAKRzpA6nw8u5w==", + "dev": true, + "dependencies": { + "@nx/devkit": "18.0.3" + } + }, + "node_modules/@nrwl/tao": { + "version": "18.0.3", + "resolved": "https://registry.npmjs.org/@nrwl/tao/-/tao-18.0.3.tgz", + "integrity": "sha512-9EIIkjvaXs7JM0shhZAQIblV3ym+wZyqxZ9nYc39OwPkII2xXtGhWPhd7SRj+If6lbVNpelIc/Xg5DpTMgu16g==", + "dev": true, + "dependencies": { + "nx": "18.0.3", + "tslib": "^2.3.0" + }, + "bin": { + "tao": "index.js" + } + }, + "node_modules/@nx/devkit": { + "version": "18.0.3", + "resolved": "https://registry.npmjs.org/@nx/devkit/-/devkit-18.0.3.tgz", + "integrity": "sha512-HiQq43YHfdjG5WnBxVNTlRm1IhnVaWoBLZrbkFItElX4SIhUqWQUp0gjtdTXy0do8Q2hkj8aITrC4Tm92KiyUw==", + "dev": true, + "dependencies": { + "@nrwl/devkit": "18.0.3", + "ejs": "^3.1.7", + "enquirer": "~2.3.6", + "ignore": "^5.0.4", + "semver": "^7.5.3", + "tmp": "~0.2.1", + "tslib": "^2.3.0", + "yargs-parser": "21.1.1" + }, + "peerDependencies": { + "nx": ">= 16 <= 18" + } + }, + "node_modules/@nx/nx-darwin-arm64": { + "version": "18.0.3", + "resolved": "https://registry.npmjs.org/@nx/nx-darwin-arm64/-/nx-darwin-arm64-18.0.3.tgz", + "integrity": "sha512-fsMzaX848KMNyF3+I5JjayHFKPsANsbr/++qTIc9skMLPYz1DQANcD6TSkc1tOWLSn4CV44cEAIwfAddPEBupw==", + "cpu": [ + "arm64" + ], + "dev": true, + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">= 10" + } + }, + "node_modules/@nx/nx-darwin-x64": { + "version": "18.0.3", + "resolved": "https://registry.npmjs.org/@nx/nx-darwin-x64/-/nx-darwin-x64-18.0.3.tgz", + "integrity": "sha512-W/FcvpQcBmsHuTcLQ2BwVjgARqTzGgLEqUGs6S/PnSEL+IgoBaWvQMavOoiisv8QY9GlLzX5Oq3rAkpJ1EmoNw==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">= 10" + } + }, + "node_modules/@nx/nx-freebsd-x64": { + "version": "18.0.3", + "resolved": "https://registry.npmjs.org/@nx/nx-freebsd-x64/-/nx-freebsd-x64-18.0.3.tgz", + "integrity": "sha512-Wx+nRQdQQsXd8DvAy426AtPoo80F3Loku+r8AKp1QBT24NCPzD/yjz6bGyNucGCrt+RKGPmaFHWBw+8qByMi6A==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "freebsd" + ], + "engines": { + "node": ">= 10" + } + }, + "node_modules/@nx/nx-linux-arm-gnueabihf": { + "version": "18.0.3", + "resolved": "https://registry.npmjs.org/@nx/nx-linux-arm-gnueabihf/-/nx-linux-arm-gnueabihf-18.0.3.tgz", + "integrity": "sha512-oM2Yraf2JVaLyT8GLUnwGKiIyB5WIi07TbJs9kLiZz1HAoJs6pG9kwrilHoS8o1t1jNR87pYbyfO1nRpa8ZR0Q==", + "cpu": [ + "arm" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">= 10" + } + }, + "node_modules/@nx/nx-linux-arm64-gnu": { + "version": "18.0.3", + "resolved": "https://registry.npmjs.org/@nx/nx-linux-arm64-gnu/-/nx-linux-arm64-gnu-18.0.3.tgz", + "integrity": "sha512-z5T32HcsoaTUazDiN0HSMSxnuw3W2GG1ASvqaWOn+LU7pCDasPFSVylJx68hNEjo9dYMBg9OCHyuhffwi8ZlOg==", + "cpu": [ + "arm64" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">= 10" } }, - "node_modules/@nrwl/devkit": { - "version": "18.0.7", + "node_modules/@nx/nx-linux-arm64-musl": { + "version": "18.0.3", + "resolved": "https://registry.npmjs.org/@nx/nx-linux-arm64-musl/-/nx-linux-arm64-musl-18.0.3.tgz", + "integrity": "sha512-1t85YQEPsOSjEWGiho4zuQMH6Zb24yCbAVJJPZpKzASQzOvv+0ayITkY7P4OaJ84oZ9T/GojXmYnINAePTlrNQ==", + "cpu": [ + "arm64" + ], "dev": true, - "license": "MIT", - "dependencies": { - "@nx/devkit": "18.0.7" + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">= 10" } }, - "node_modules/@nrwl/tao": { - "version": "18.0.7", + "node_modules/@nx/nx-linux-x64-gnu": { + "version": "18.0.3", + "resolved": "https://registry.npmjs.org/@nx/nx-linux-x64-gnu/-/nx-linux-x64-gnu-18.0.3.tgz", + "integrity": "sha512-4sS6mnLt+PGG8oYmV91tvLuAu7jh1YrRuZQlv166nVS61TI0V0oaNREdxUZF92WpvavDA1ftXEImcASEex6n3Q==", + "cpu": [ + "x64" + ], "dev": true, - "license": "MIT", - "dependencies": { - "nx": "18.0.7", - "tslib": "^2.3.0" - }, - "bin": { - "tao": "index.js" + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">= 10" } }, - "node_modules/@nx/devkit": { - "version": "18.0.7", + "node_modules/@nx/nx-linux-x64-musl": { + "version": "18.0.3", + "resolved": "https://registry.npmjs.org/@nx/nx-linux-x64-musl/-/nx-linux-x64-musl-18.0.3.tgz", + "integrity": "sha512-VmiNOH4/dYOQ5X8DaHrmTZyzrIbCUgHE7oco1pRBPEHkid8E0WyvD9sZLCVEipV80Av9nhOaQ1srAtcfOxchVQ==", + "cpu": [ + "x64" + ], "dev": true, - "license": "MIT", - "dependencies": { - "@nrwl/devkit": "18.0.7", - "ejs": "^3.1.7", - "enquirer": "~2.3.6", - "ignore": "^5.0.4", - "semver": "^7.5.3", - "tmp": "~0.2.1", - "tslib": "^2.3.0", - "yargs-parser": "21.1.1" - }, - "peerDependencies": { - "nx": ">= 16 <= 18" + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">= 10" } }, - "node_modules/@nx/nx-darwin-arm64": { - "version": "18.0.7", + "node_modules/@nx/nx-win32-arm64-msvc": { + "version": "18.0.3", + "resolved": "https://registry.npmjs.org/@nx/nx-win32-arm64-msvc/-/nx-win32-arm64-msvc-18.0.3.tgz", + "integrity": "sha512-ymqpAyJ86I5LzFa4O7FByl770U3R//s1nFsrAz9mDm1AIq5uQyyW+EOMJzJwzm0JinRnwtxiK/GdjgWM6dNSDg==", "cpu": [ "arm64" ], "dev": true, - "license": "MIT", "optional": true, "os": [ - "darwin" + "win32" + ], + "engines": { + "node": ">= 10" + } + }, + "node_modules/@nx/nx-win32-x64-msvc": { + "version": "18.0.3", + "resolved": "https://registry.npmjs.org/@nx/nx-win32-x64-msvc/-/nx-win32-x64-msvc-18.0.3.tgz", + "integrity": "sha512-JkBx64Lg7Ezyr6RML/ajOdy9/NIbVO5dI5bG9ZmryeS5mnUPFBY0ExspL0t4X/ud+F4Sh7gN7uGanNd32wRD1Q==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "win32" ], "engines": { "node": ">= 10" @@ -3035,16 +3804,18 @@ }, "node_modules/@octokit/auth-token": { "version": "3.0.4", + "resolved": "https://registry.npmjs.org/@octokit/auth-token/-/auth-token-3.0.4.tgz", + "integrity": "sha512-TWFX7cZF2LXoCvdmJWY7XVPi74aSY0+FfBZNSXEXFkMpjcqsQwDSYVv5FhRFaI0V1ECnwbz4j59T/G+rXNWaIQ==", "dev": true, - "license": "MIT", "engines": { "node": ">= 14" } }, "node_modules/@octokit/core": { "version": "4.2.4", + "resolved": "https://registry.npmjs.org/@octokit/core/-/core-4.2.4.tgz", + "integrity": "sha512-rYKilwgzQ7/imScn3M9/pFfUf4I1AZEH3KhyJmtPdE2zfaXAn2mFfUy4FbKewzc2We5y/LlKLj36fWJLKC2SIQ==", "dev": true, - "license": "MIT", "dependencies": { "@octokit/auth-token": "^3.0.0", "@octokit/graphql": "^5.0.0", @@ -3060,8 +3831,9 @@ }, "node_modules/@octokit/endpoint": { "version": "7.0.6", + "resolved": "https://registry.npmjs.org/@octokit/endpoint/-/endpoint-7.0.6.tgz", + "integrity": "sha512-5L4fseVRUsDFGR00tMWD/Trdeeihn999rTMGRMC1G/Ldi1uWlWJzI98H4Iak5DB/RVvQuyMYKqSK/R6mbSOQyg==", "dev": true, - "license": "MIT", "dependencies": { "@octokit/types": "^9.0.0", "is-plain-object": "^5.0.0", @@ -3073,8 +3845,9 @@ }, "node_modules/@octokit/graphql": { "version": "5.0.6", + "resolved": "https://registry.npmjs.org/@octokit/graphql/-/graphql-5.0.6.tgz", + "integrity": "sha512-Fxyxdy/JH0MnIB5h+UQ3yCoh1FG4kWXfFKkpWqjZHw/p+Kc8Y44Hu/kCgNBT6nU1shNumEchmW/sUO1JuQnPcw==", "dev": true, - "license": "MIT", "dependencies": { "@octokit/request": "^6.0.0", "@octokit/types": "^9.0.0", @@ -3086,18 +3859,21 @@ }, "node_modules/@octokit/openapi-types": { "version": "18.1.1", - "dev": true, - "license": "MIT" + "resolved": "https://registry.npmjs.org/@octokit/openapi-types/-/openapi-types-18.1.1.tgz", + "integrity": "sha512-VRaeH8nCDtF5aXWnjPuEMIYf1itK/s3JYyJcWFJT8X9pSNnBtriDf7wlEWsGuhPLl4QIH4xM8fqTXDwJ3Mu6sw==", + "dev": true }, "node_modules/@octokit/plugin-enterprise-rest": { "version": "6.0.1", - "dev": true, - "license": "MIT" + "resolved": "https://registry.npmjs.org/@octokit/plugin-enterprise-rest/-/plugin-enterprise-rest-6.0.1.tgz", + "integrity": "sha512-93uGjlhUD+iNg1iWhUENAtJata6w5nE+V4urXOAlIXdco6xNZtUSfYY8dzp3Udy74aqO/B5UZL80x/YMa5PKRw==", + "dev": true }, "node_modules/@octokit/plugin-paginate-rest": { "version": "6.1.2", + "resolved": "https://registry.npmjs.org/@octokit/plugin-paginate-rest/-/plugin-paginate-rest-6.1.2.tgz", + "integrity": "sha512-qhrmtQeHU/IivxucOV1bbI/xZyC/iOBhclokv7Sut5vnejAIAEXVcGQeRpQlU39E0WwK9lNvJHphHri/DB6lbQ==", "dev": true, - "license": "MIT", "dependencies": { "@octokit/tsconfig": "^1.0.2", "@octokit/types": "^9.2.3" @@ -3111,16 +3887,18 @@ }, "node_modules/@octokit/plugin-request-log": { "version": "1.0.4", + "resolved": "https://registry.npmjs.org/@octokit/plugin-request-log/-/plugin-request-log-1.0.4.tgz", + "integrity": "sha512-mLUsMkgP7K/cnFEw07kWqXGF5LKrOkD+lhCrKvPHXWDywAwuDUeDwWBpc69XK3pNX0uKiVt8g5z96PJ6z9xCFA==", "dev": true, - "license": "MIT", "peerDependencies": { "@octokit/core": ">=3" } }, "node_modules/@octokit/plugin-rest-endpoint-methods": { "version": "7.2.3", + "resolved": "https://registry.npmjs.org/@octokit/plugin-rest-endpoint-methods/-/plugin-rest-endpoint-methods-7.2.3.tgz", + "integrity": "sha512-I5Gml6kTAkzVlN7KCtjOM+Ruwe/rQppp0QU372K1GP7kNOYEKe8Xn5BW4sE62JAHdwpq95OQK/qGNyKQMUzVgA==", "dev": true, - "license": "MIT", "dependencies": { "@octokit/types": "^10.0.0" }, @@ -3133,16 +3911,18 @@ }, "node_modules/@octokit/plugin-rest-endpoint-methods/node_modules/@octokit/types": { "version": "10.0.0", + "resolved": "https://registry.npmjs.org/@octokit/types/-/types-10.0.0.tgz", + "integrity": "sha512-Vm8IddVmhCgU1fxC1eyinpwqzXPEYu0NrYzD3YZjlGjyftdLBTeqNblRC0jmJmgxbJIsQlyogVeGnrNaaMVzIg==", "dev": true, - "license": "MIT", "dependencies": { "@octokit/openapi-types": "^18.0.0" } }, "node_modules/@octokit/request": { "version": "6.2.8", + "resolved": "https://registry.npmjs.org/@octokit/request/-/request-6.2.8.tgz", + "integrity": "sha512-ow4+pkVQ+6XVVsekSYBzJC0VTVvh/FCTUUgTsboGq+DTeWdyIFV8WSCdo0RIxk6wSkBTHqIK1mYuY7nOBXOchw==", "dev": true, - "license": "MIT", "dependencies": { "@octokit/endpoint": "^7.0.0", "@octokit/request-error": "^3.0.0", @@ -3157,8 +3937,9 @@ }, "node_modules/@octokit/request-error": { "version": "3.0.3", + "resolved": "https://registry.npmjs.org/@octokit/request-error/-/request-error-3.0.3.tgz", + "integrity": "sha512-crqw3V5Iy2uOU5Np+8M/YexTlT8zxCfI+qu+LxUB7SZpje4Qmx3mub5DfEKSO8Ylyk0aogi6TYdf6kxzh2BguQ==", "dev": true, - "license": "MIT", "dependencies": { "@octokit/types": "^9.0.0", "deprecation": "^2.0.0", @@ -3170,8 +3951,9 @@ }, "node_modules/@octokit/rest": { "version": "19.0.11", + "resolved": "https://registry.npmjs.org/@octokit/rest/-/rest-19.0.11.tgz", + "integrity": "sha512-m2a9VhaP5/tUw8FwfnW2ICXlXpLPIqxtg3XcAiGMLj/Xhw3RSBfZ8le/466ktO1Gcjr8oXudGnHhxV1TXJgFxw==", "dev": true, - "license": "MIT", "dependencies": { "@octokit/core": "^4.2.1", "@octokit/plugin-paginate-rest": "^6.1.2", @@ -3184,30 +3966,34 @@ }, "node_modules/@octokit/tsconfig": { "version": "1.0.2", - "dev": true, - "license": "MIT" + "resolved": "https://registry.npmjs.org/@octokit/tsconfig/-/tsconfig-1.0.2.tgz", + "integrity": "sha512-I0vDR0rdtP8p2lGMzvsJzbhdOWy405HcGovrspJ8RRibHnyRgggUSNO5AIox5LmqiwmatHKYsvj6VGFHkqS7lA==", + "dev": true }, "node_modules/@octokit/types": { "version": "9.3.2", + "resolved": "https://registry.npmjs.org/@octokit/types/-/types-9.3.2.tgz", + "integrity": "sha512-D4iHGTdAnEEVsB8fl95m1hiz7D5YiRdQ9b/OEb3BYRVwbLsGHcRVPz+u+BgRLNk0Q0/4iZCBqDN96j2XNxfXrA==", "dev": true, - "license": "MIT", "dependencies": { "@octokit/openapi-types": "^18.0.0" } }, "node_modules/@pkgjs/parseargs": { "version": "0.11.0", + "resolved": "https://registry.npmjs.org/@pkgjs/parseargs/-/parseargs-0.11.0.tgz", + "integrity": "sha512-+1VkjdD0QBLPodGrJUeqarH8VAIvQODIbwh9XpP5Syisf7YoQgsJKPNFoqqLQlu+VQ/tVSshMR6loPMn8U+dPg==", "dev": true, - "license": "MIT", "optional": true, "engines": { "node": ">=14" } }, "node_modules/@pkgr/core": { - "version": "0.1.1", + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/@pkgr/core/-/core-0.1.0.tgz", + "integrity": "sha512-Zwq5OCzuwJC2jwqmpEQt7Ds1DTi6BWSwoGkbb1n9pO3hzb35BoJELx7c0T23iDkBGkh2e7tvOtjF3tr3OaQHDQ==", "dev": true, - "license": "MIT", "engines": { "node": "^12.20.0 || ^14.18.0 || >=16.0.0" }, @@ -3217,8 +4003,9 @@ }, "node_modules/@sigstore/bundle": { "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@sigstore/bundle/-/bundle-1.1.0.tgz", + "integrity": "sha512-PFutXEy0SmQxYI4texPw3dd2KewuNqv7OuK1ZFtY2fM754yhvG2KdgwIhRnoEE2uHdtdGNQ8s0lb94dW9sELog==", "dev": true, - "license": "Apache-2.0", "dependencies": { "@sigstore/protobuf-specs": "^0.2.0" }, @@ -3228,24 +4015,27 @@ }, "node_modules/@sigstore/core": { "version": "1.0.0", + "resolved": "https://registry.npmjs.org/@sigstore/core/-/core-1.0.0.tgz", + "integrity": "sha512-dW2qjbWLRKGu6MIDUTBuJwXCnR8zivcSpf5inUzk7y84zqy/dji0/uahppoIgMoKeR+6pUZucrwHfkQQtiG9Rw==", "dev": true, - "license": "Apache-2.0", "engines": { "node": "^16.14.0 || >=18.0.0" } }, "node_modules/@sigstore/protobuf-specs": { "version": "0.2.1", + "resolved": "https://registry.npmjs.org/@sigstore/protobuf-specs/-/protobuf-specs-0.2.1.tgz", + "integrity": "sha512-XTWVxnWJu+c1oCshMLwnKvz8ZQJJDVOlciMfgpJBQbThVjKTCG8dwyhgLngBD2KN0ap9F/gOV8rFDEx8uh7R2A==", "dev": true, - "license": "Apache-2.0", "engines": { "node": "^14.17.0 || ^16.13.0 || >=18.0.0" } }, "node_modules/@sigstore/sign": { "version": "1.0.0", + "resolved": "https://registry.npmjs.org/@sigstore/sign/-/sign-1.0.0.tgz", + "integrity": "sha512-INxFVNQteLtcfGmcoldzV6Je0sbbfh9I16DM4yJPw3j5+TFP8X6uIiA18mvpEa9yyeycAKgPmOA3X9hVdVTPUA==", "dev": true, - "license": "Apache-2.0", "dependencies": { "@sigstore/bundle": "^1.1.0", "@sigstore/protobuf-specs": "^0.2.0", @@ -3255,21 +4045,11 @@ "node": "^14.17.0 || ^16.13.0 || >=18.0.0" } }, - "node_modules/@sigstore/sign/node_modules/agent-base": { - "version": "6.0.2", - "dev": true, - "license": "MIT", - "dependencies": { - "debug": "4" - }, - "engines": { - "node": ">= 6.0.0" - } - }, "node_modules/@sigstore/sign/node_modules/cacache": { "version": "17.1.4", + "resolved": "https://registry.npmjs.org/cacache/-/cacache-17.1.4.tgz", + "integrity": "sha512-/aJwG2l3ZMJ1xNAnqbMpA40of9dj/pIH3QfiuQSqjfPJF747VR0J/bHn+/KdNnHKc6XQcWt/AfRSBft82W1d2A==", "dev": true, - "license": "ISC", "dependencies": { "@npmcli/fs": "^3.1.0", "fs-minipass": "^3.0.0", @@ -3288,10 +4068,41 @@ "node": "^14.17.0 || ^16.13.0 || >=18.0.0" } }, + "node_modules/@sigstore/sign/node_modules/cacache/node_modules/minipass": { + "version": "7.0.4", + "resolved": "https://registry.npmjs.org/minipass/-/minipass-7.0.4.tgz", + "integrity": "sha512-jYofLM5Dam9279rdkWzqHozUo4ybjdZmCsDHePy5V/PbBcVMiSZR97gmAy45aqi8CK1lG2ECd356FU86avfwUQ==", + "dev": true, + "engines": { + "node": ">=16 || 14 >=14.17" + } + }, + "node_modules/@sigstore/sign/node_modules/fs-minipass": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/fs-minipass/-/fs-minipass-3.0.3.tgz", + "integrity": "sha512-XUBA9XClHbnJWSfBzjkm6RvPsyg3sryZt06BEQoXcF7EK/xpGaQYJgQKDJSUH5SGZ76Y7pFx1QBnXz09rU5Fbw==", + "dev": true, + "dependencies": { + "minipass": "^7.0.3" + }, + "engines": { + "node": "^14.17.0 || ^16.13.0 || >=18.0.0" + } + }, + "node_modules/@sigstore/sign/node_modules/fs-minipass/node_modules/minipass": { + "version": "7.0.4", + "resolved": "https://registry.npmjs.org/minipass/-/minipass-7.0.4.tgz", + "integrity": "sha512-jYofLM5Dam9279rdkWzqHozUo4ybjdZmCsDHePy5V/PbBcVMiSZR97gmAy45aqi8CK1lG2ECd356FU86avfwUQ==", + "dev": true, + "engines": { + "node": ">=16 || 14 >=14.17" + } + }, "node_modules/@sigstore/sign/node_modules/glob": { "version": "10.3.10", + "resolved": "https://registry.npmjs.org/glob/-/glob-10.3.10.tgz", + "integrity": "sha512-fa46+tv1Ak0UPK1TOy/pZrIybNNt4HCv7SDzwyfiOZkvZLEbjsZkJBPtDHVshZjbecAoAGSC20MjLDG/qr679g==", "dev": true, - "license": "ISC", "dependencies": { "foreground-child": "^3.1.0", "jackspeak": "^2.3.5", @@ -3309,43 +4120,20 @@ "url": "https://github.com/sponsors/isaacs" } }, - "node_modules/@sigstore/sign/node_modules/http-proxy-agent": { - "version": "5.0.0", - "dev": true, - "license": "MIT", - "dependencies": { - "@tootallnate/once": "2", - "agent-base": "6", - "debug": "4" - }, - "engines": { - "node": ">= 6" - } - }, - "node_modules/@sigstore/sign/node_modules/https-proxy-agent": { - "version": "5.0.1", - "dev": true, - "license": "MIT", - "dependencies": { - "agent-base": "6", - "debug": "4" - }, - "engines": { - "node": ">= 6" - } - }, "node_modules/@sigstore/sign/node_modules/lru-cache": { "version": "7.18.3", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-7.18.3.tgz", + "integrity": "sha512-jumlc0BIUrS3qJGgIkWZsyfAM7NCWiBcCDhnd+3NNM5KbBmLTgHVfWBcg6W+rLUsIpzpERPsvwUP7CckAQSOoA==", "dev": true, - "license": "ISC", "engines": { "node": ">=12" } }, "node_modules/@sigstore/sign/node_modules/make-fetch-happen": { "version": "11.1.1", + "resolved": "https://registry.npmjs.org/make-fetch-happen/-/make-fetch-happen-11.1.1.tgz", + "integrity": "sha512-rLWS7GCSTcEujjVBs2YqG7Y4643u8ucvCJeSRqiLYhesrDuzeuFIk37xREzAsfQaqzl8b9rNCE4m6J8tvX4Q8w==", "dev": true, - "license": "ISC", "dependencies": { "agentkeepalive": "^4.2.1", "cacache": "^17.0.0", @@ -3367,53 +4155,20 @@ "node": "^14.17.0 || ^16.13.0 || >=18.0.0" } }, - "node_modules/@sigstore/sign/node_modules/make-fetch-happen/node_modules/minipass": { + "node_modules/@sigstore/sign/node_modules/minipass": { "version": "5.0.0", + "resolved": "https://registry.npmjs.org/minipass/-/minipass-5.0.0.tgz", + "integrity": "sha512-3FnjYuehv9k6ovOEbyOswadCDPX1piCfhV8ncmYtHOjuPwylVWsghTLo7rabjC3Rx5xD4HDx8Wm1xnMF7S5qFQ==", "dev": true, - "license": "ISC", - "engines": { - "node": ">=8" - } - }, - "node_modules/@sigstore/sign/node_modules/minipass-collect": { - "version": "1.0.2", - "dev": true, - "license": "ISC", - "dependencies": { - "minipass": "^3.0.0" - }, - "engines": { - "node": ">= 8" - } - }, - "node_modules/@sigstore/sign/node_modules/minipass-collect/node_modules/minipass": { - "version": "3.3.6", - "dev": true, - "license": "ISC", - "dependencies": { - "yallist": "^4.0.0" - }, "engines": { "node": ">=8" } }, - "node_modules/@sigstore/sign/node_modules/socks-proxy-agent": { - "version": "7.0.0", - "dev": true, - "license": "MIT", - "dependencies": { - "agent-base": "^6.0.2", - "debug": "^4.3.3", - "socks": "^2.6.2" - }, - "engines": { - "node": ">= 10" - } - }, "node_modules/@sigstore/sign/node_modules/ssri": { "version": "10.0.5", + "resolved": "https://registry.npmjs.org/ssri/-/ssri-10.0.5.tgz", + "integrity": "sha512-bSf16tAFkGeRlUNDjXu8FzaMQt6g2HZJrun7mtMbIPOddxt3GLMSz5VWUWcqTJUPfLEaDIepGxv+bYQW49596A==", "dev": true, - "license": "ISC", "dependencies": { "minipass": "^7.0.3" }, @@ -3421,15 +4176,20 @@ "node": "^14.17.0 || ^16.13.0 || >=18.0.0" } }, - "node_modules/@sigstore/sign/node_modules/yallist": { - "version": "4.0.0", + "node_modules/@sigstore/sign/node_modules/ssri/node_modules/minipass": { + "version": "7.0.4", + "resolved": "https://registry.npmjs.org/minipass/-/minipass-7.0.4.tgz", + "integrity": "sha512-jYofLM5Dam9279rdkWzqHozUo4ybjdZmCsDHePy5V/PbBcVMiSZR97gmAy45aqi8CK1lG2ECd356FU86avfwUQ==", "dev": true, - "license": "ISC" + "engines": { + "node": ">=16 || 14 >=14.17" + } }, "node_modules/@sigstore/tuf": { "version": "1.0.3", + "resolved": "https://registry.npmjs.org/@sigstore/tuf/-/tuf-1.0.3.tgz", + "integrity": "sha512-2bRovzs0nJZFlCN3rXirE4gwxCn97JNjMmwpecqlbgV9WcxX7WRuIrgzx/X7Ib7MYRbyUTpBYE0s2x6AmZXnlg==", "dev": true, - "license": "Apache-2.0", "dependencies": { "@sigstore/protobuf-specs": "^0.2.0", "tuf-js": "^1.1.7" @@ -3439,62 +4199,60 @@ } }, "node_modules/@sigstore/verify": { - "version": "1.1.0", + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/@sigstore/verify/-/verify-1.0.0.tgz", + "integrity": "sha512-sRU6nblDBQ4pVTWni019Kij+XQj4RP75WXN5z3qHk81dt/L8A7r3v8RgRInTup4/Jf90WNods9CcbnWj7zJ26w==", "dev": true, - "license": "Apache-2.0", "dependencies": { - "@sigstore/bundle": "^2.2.0", + "@sigstore/bundle": "^2.1.1", "@sigstore/core": "^1.0.0", - "@sigstore/protobuf-specs": "^0.3.0" + "@sigstore/protobuf-specs": "^0.2.1" }, "engines": { "node": "^16.14.0 || >=18.0.0" } }, "node_modules/@sigstore/verify/node_modules/@sigstore/bundle": { - "version": "2.2.0", + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/@sigstore/bundle/-/bundle-2.1.1.tgz", + "integrity": "sha512-v3/iS+1nufZdKQ5iAlQKcCsoh0jffQyABvYIxKsZQFWc4ubuGjwZklFHpDgV6O6T7vvV78SW5NHI91HFKEcxKg==", "dev": true, - "license": "Apache-2.0", "dependencies": { - "@sigstore/protobuf-specs": "^0.3.0" + "@sigstore/protobuf-specs": "^0.2.1" }, "engines": { "node": "^16.14.0 || >=18.0.0" } }, - "node_modules/@sigstore/verify/node_modules/@sigstore/protobuf-specs": { - "version": "0.3.0", - "dev": true, - "license": "Apache-2.0", - "engines": { - "node": "^14.17.0 || ^16.13.0 || >=18.0.0" - } - }, "node_modules/@sinclair/typebox": { "version": "0.27.8", - "dev": true, - "license": "MIT" + "resolved": "https://registry.npmjs.org/@sinclair/typebox/-/typebox-0.27.8.tgz", + "integrity": "sha512-+Fj43pSMwJs4KRrH/938Uf+uAELIgVBmQzg/q1YG10djyfA3TnrU8N8XzqCh/okZdszqBQTZf96idMfE5lnwTA==", + "dev": true }, "node_modules/@sinonjs/commons": { - "version": "3.0.1", + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/@sinonjs/commons/-/commons-3.0.0.tgz", + "integrity": "sha512-jXBtWAF4vmdNmZgD5FoKsVLv3rPgDnLgPbU84LIJ3otV44vJlDRokVng5v8NFJdCf/da9legHcKaRuZs4L7faA==", "dev": true, - "license": "BSD-3-Clause", "dependencies": { "type-detect": "4.0.8" } }, "node_modules/@sinonjs/fake-timers": { "version": "10.3.0", + "resolved": "https://registry.npmjs.org/@sinonjs/fake-timers/-/fake-timers-10.3.0.tgz", + "integrity": "sha512-V4BG07kuYSUkTCSBHG8G8TNhM+F19jXFWnQtzj+we8DrkpSBCee9Z3Ms8yiGer/dlmhe35/Xdgyo3/0rQKg7YA==", "dev": true, - "license": "BSD-3-Clause", "dependencies": { "@sinonjs/commons": "^3.0.0" } }, "node_modules/@sinonjs/samsam": { "version": "8.0.0", + "resolved": "https://registry.npmjs.org/@sinonjs/samsam/-/samsam-8.0.0.tgz", + "integrity": "sha512-Bp8KUVlLp8ibJZrnvq2foVhP0IVX2CIprMJPK0vqGqgrDa0OHVKeZyBykqskkrdxV6yKBPmGasO8LVjAKR3Gew==", "dev": true, - "license": "BSD-3-Clause", "dependencies": { "@sinonjs/commons": "^2.0.0", "lodash.get": "^4.4.2", @@ -3503,20 +4261,23 @@ }, "node_modules/@sinonjs/samsam/node_modules/@sinonjs/commons": { "version": "2.0.0", + "resolved": "https://registry.npmjs.org/@sinonjs/commons/-/commons-2.0.0.tgz", + "integrity": "sha512-uLa0j859mMrg2slwQYdO/AkrOfmH+X6LTVmNTS9CqexuE2IvVORIkSpJLqePAbEnKJ77aMmCwr1NUZ57120Xcg==", "dev": true, - "license": "BSD-3-Clause", "dependencies": { "type-detect": "4.0.8" } }, "node_modules/@sinonjs/text-encoding": { "version": "0.7.2", - "dev": true, - "license": "(Unlicense OR Apache-2.0)" + "resolved": "https://registry.npmjs.org/@sinonjs/text-encoding/-/text-encoding-0.7.2.tgz", + "integrity": "sha512-sXXKG+uL9IrKqViTtao2Ws6dy0znu9sOaP1di/jKGW1M6VssO8vlpXCQcpZ+jisQ1tTFAC5Jo/EOzFbggBagFQ==", + "dev": true }, "node_modules/@smithy/abort-controller": { "version": "2.1.3", - "license": "Apache-2.0", + "resolved": "https://registry.npmjs.org/@smithy/abort-controller/-/abort-controller-2.1.3.tgz", + "integrity": "sha512-c2aYH2Wu1RVE3rLlVgg2kQOBJGM0WbjReQi5DnPTm2Zb7F0gk7J2aeQeaX2u/lQZoHl6gv8Oac7mt9alU3+f4A==", "dependencies": { "@smithy/types": "^2.10.1", "tslib": "^2.5.0" @@ -3527,7 +4288,8 @@ }, "node_modules/@smithy/config-resolver": { "version": "2.1.4", - "license": "Apache-2.0", + "resolved": "https://registry.npmjs.org/@smithy/config-resolver/-/config-resolver-2.1.4.tgz", + "integrity": "sha512-AW2WUZmBAzgO3V3ovKtsUbI3aBNMeQKFDumoqkNxaVDWF/xfnxAWqBKDr/NuG7c06N2Rm4xeZLPiJH/d+na0HA==", "dependencies": { "@smithy/node-config-provider": "^2.2.4", "@smithy/types": "^2.10.1", @@ -3541,7 +4303,8 @@ }, "node_modules/@smithy/core": { "version": "1.3.5", - "license": "Apache-2.0", + "resolved": "https://registry.npmjs.org/@smithy/core/-/core-1.3.5.tgz", + "integrity": "sha512-Rrc+e2Jj6Gu7Xbn0jvrzZlSiP2CZocIOfZ9aNUA82+1sa6GBnxqL9+iZ9EKHeD9aqD1nU8EK4+oN2EiFpSv7Yw==", "dependencies": { "@smithy/middleware-endpoint": "^2.4.4", "@smithy/middleware-retry": "^2.1.4", @@ -3557,8 +4320,9 @@ } }, "node_modules/@smithy/credential-provider-imds": { - "version": "2.2.5", - "license": "Apache-2.0", + "version": "2.2.4", + "resolved": "https://registry.npmjs.org/@smithy/credential-provider-imds/-/credential-provider-imds-2.2.4.tgz", + "integrity": "sha512-DdatjmBZQnhGe1FhI8gO98f7NmvQFSDiZTwC3WMvLTCKQUY+Y1SVkhJqIuLu50Eb7pTheoXQmK+hKYUgpUWsNA==", "dependencies": { "@smithy/node-config-provider": "^2.2.4", "@smithy/property-provider": "^2.1.3", @@ -3572,7 +4336,8 @@ }, "node_modules/@smithy/eventstream-codec": { "version": "2.1.3", - "license": "Apache-2.0", + "resolved": "https://registry.npmjs.org/@smithy/eventstream-codec/-/eventstream-codec-2.1.3.tgz", + "integrity": "sha512-rGlCVuwSDv6qfKH4/lRxFjcZQnIE0LZ3D4lkMHg7ZSltK9rA74r0VuGSvWVQ4N/d70VZPaniFhp4Z14QYZsa+A==", "dependencies": { "@aws-crypto/crc32": "3.0.0", "@smithy/types": "^2.10.1", @@ -3582,7 +4347,8 @@ }, "node_modules/@smithy/eventstream-serde-browser": { "version": "2.1.3", - "license": "Apache-2.0", + "resolved": "https://registry.npmjs.org/@smithy/eventstream-serde-browser/-/eventstream-serde-browser-2.1.3.tgz", + "integrity": "sha512-qAgKbZ9m2oBfSyJWWurX/MvQFRPrYypj79cDSleEgDwBoez6Tfd+FTpu2L/j3ZeC3mDlDHIKWksoeaXZpLLAHw==", "dependencies": { "@smithy/eventstream-serde-universal": "^2.1.3", "@smithy/types": "^2.10.1", @@ -3594,7 +4360,8 @@ }, "node_modules/@smithy/eventstream-serde-config-resolver": { "version": "2.1.3", - "license": "Apache-2.0", + "resolved": "https://registry.npmjs.org/@smithy/eventstream-serde-config-resolver/-/eventstream-serde-config-resolver-2.1.3.tgz", + "integrity": "sha512-48rvsNv/MgAFCxOE0qwR7ZwKhaEdDoTxqH5HM+T6SDxICmPGb7gEuQzjTxQhcieCPgqyXeZFW8cU0QJxdowuIg==", "dependencies": { "@smithy/types": "^2.10.1", "tslib": "^2.5.0" @@ -3605,7 +4372,8 @@ }, "node_modules/@smithy/eventstream-serde-node": { "version": "2.1.3", - "license": "Apache-2.0", + "resolved": "https://registry.npmjs.org/@smithy/eventstream-serde-node/-/eventstream-serde-node-2.1.3.tgz", + "integrity": "sha512-RPJWWDhj8isk3NtGfm3Xt1WdHyX9ZE42V+m1nLU1I0zZ1hEol/oawHsTnhva/VR5bn+bJ2zscx+BYr0cEPRtmg==", "dependencies": { "@smithy/eventstream-serde-universal": "^2.1.3", "@smithy/types": "^2.10.1", @@ -3617,7 +4385,8 @@ }, "node_modules/@smithy/eventstream-serde-universal": { "version": "2.1.3", - "license": "Apache-2.0", + "resolved": "https://registry.npmjs.org/@smithy/eventstream-serde-universal/-/eventstream-serde-universal-2.1.3.tgz", + "integrity": "sha512-ssvSMk1LX2jRhiOVgVLGfNJXdB8SvyjieKcJDHq698Gi3LOog6g/+l7ggrN+hZxyjUiDF4cUxgKaZTBUghzhLw==", "dependencies": { "@smithy/eventstream-codec": "^2.1.3", "@smithy/types": "^2.10.1", @@ -3629,7 +4398,8 @@ }, "node_modules/@smithy/fetch-http-handler": { "version": "2.4.3", - "license": "Apache-2.0", + "resolved": "https://registry.npmjs.org/@smithy/fetch-http-handler/-/fetch-http-handler-2.4.3.tgz", + "integrity": "sha512-Fn/KYJFo6L5I4YPG8WQb2hOmExgRmNpVH5IK2zU3JKrY5FKW7y9ar5e0BexiIC9DhSKqKX+HeWq/Y18fq7Dkpw==", "dependencies": { "@smithy/protocol-http": "^3.2.1", "@smithy/querystring-builder": "^2.1.3", @@ -3640,7 +4410,8 @@ }, "node_modules/@smithy/hash-node": { "version": "2.1.3", - "license": "Apache-2.0", + "resolved": "https://registry.npmjs.org/@smithy/hash-node/-/hash-node-2.1.3.tgz", + "integrity": "sha512-FsAPCUj7VNJIdHbSxMd5uiZiF20G2zdSDgrgrDrHqIs/VMxK85Vqk5kMVNNDMCZmMezp6UKnac0B4nAyx7HJ9g==", "dependencies": { "@smithy/types": "^2.10.1", "@smithy/util-buffer-from": "^2.1.1", @@ -3653,7 +4424,8 @@ }, "node_modules/@smithy/invalid-dependency": { "version": "2.1.3", - "license": "Apache-2.0", + "resolved": "https://registry.npmjs.org/@smithy/invalid-dependency/-/invalid-dependency-2.1.3.tgz", + "integrity": "sha512-wkra7d/G4CbngV4xsjYyAYOvdAhahQje/WymuQdVEnXFExJopEu7fbL5AEAlBPgWHXwu94VnCSG00gVzRfExyg==", "dependencies": { "@smithy/types": "^2.10.1", "tslib": "^2.5.0" @@ -3661,7 +4433,8 @@ }, "node_modules/@smithy/is-array-buffer": { "version": "2.1.1", - "license": "Apache-2.0", + "resolved": "https://registry.npmjs.org/@smithy/is-array-buffer/-/is-array-buffer-2.1.1.tgz", + "integrity": "sha512-xozSQrcUinPpNPNPds4S7z/FakDTh1MZWtRP/2vQtYB/u3HYrX2UXuZs+VhaKBd6Vc7g2XPr2ZtwGBNDN6fNKQ==", "dependencies": { "tslib": "^2.5.0" }, @@ -3671,8 +4444,9 @@ }, "node_modules/@smithy/middleware-compression": { "version": "2.1.4", + "resolved": "https://registry.npmjs.org/@smithy/middleware-compression/-/middleware-compression-2.1.4.tgz", + "integrity": "sha512-euMHyTkvKbndhLvoMKwDDZAcQPhVHv4prkEru2xkbH85ShC8SMLGjuTvQ6UcmOQCzuDZaMCBLhisKxbfn4GWWg==", "dev": true, - "license": "Apache-2.0", "dependencies": { "@smithy/is-array-buffer": "^2.1.1", "@smithy/node-config-provider": "^2.2.4", @@ -3690,7 +4464,8 @@ }, "node_modules/@smithy/middleware-content-length": { "version": "2.1.3", - "license": "Apache-2.0", + "resolved": "https://registry.npmjs.org/@smithy/middleware-content-length/-/middleware-content-length-2.1.3.tgz", + "integrity": "sha512-aJduhkC+dcXxdnv5ZpM3uMmtGmVFKx412R1gbeykS5HXDmRU6oSsyy2SoHENCkfOGKAQOjVE2WVqDJibC0d21g==", "dependencies": { "@smithy/protocol-http": "^3.2.1", "@smithy/types": "^2.10.1", @@ -3702,7 +4477,8 @@ }, "node_modules/@smithy/middleware-endpoint": { "version": "2.4.4", - "license": "Apache-2.0", + "resolved": "https://registry.npmjs.org/@smithy/middleware-endpoint/-/middleware-endpoint-2.4.4.tgz", + "integrity": "sha512-4yjHyHK2Jul4JUDBo2sTsWY9UshYUnXeb/TAK/MTaPEb8XQvDmpwSFnfIRDU45RY1a6iC9LCnmJNg/yHyfxqkw==", "dependencies": { "@smithy/middleware-serde": "^2.1.3", "@smithy/node-config-provider": "^2.2.4", @@ -3718,7 +4494,8 @@ }, "node_modules/@smithy/middleware-retry": { "version": "2.1.4", - "license": "Apache-2.0", + "resolved": "https://registry.npmjs.org/@smithy/middleware-retry/-/middleware-retry-2.1.4.tgz", + "integrity": "sha512-Cyolv9YckZTPli1EkkaS39UklonxMd08VskiuMhURDjC0HHa/AD6aK/YoD21CHv9s0QLg0WMLvk9YeLTKkXaFQ==", "dependencies": { "@smithy/node-config-provider": "^2.2.4", "@smithy/protocol-http": "^3.2.1", @@ -3734,16 +4511,10 @@ "node": ">=14.0.0" } }, - "node_modules/@smithy/middleware-retry/node_modules/uuid": { - "version": "8.3.2", - "license": "MIT", - "bin": { - "uuid": "dist/bin/uuid" - } - }, "node_modules/@smithy/middleware-serde": { "version": "2.1.3", - "license": "Apache-2.0", + "resolved": "https://registry.npmjs.org/@smithy/middleware-serde/-/middleware-serde-2.1.3.tgz", + "integrity": "sha512-s76LId+TwASrHhUa9QS4k/zeXDUAuNuddKklQzRgumbzge5BftVXHXIqL4wQxKGLocPwfgAOXWx+HdWhQk9hTg==", "dependencies": { "@smithy/types": "^2.10.1", "tslib": "^2.5.0" @@ -3754,7 +4525,8 @@ }, "node_modules/@smithy/middleware-stack": { "version": "2.1.3", - "license": "Apache-2.0", + "resolved": "https://registry.npmjs.org/@smithy/middleware-stack/-/middleware-stack-2.1.3.tgz", + "integrity": "sha512-opMFufVQgvBSld/b7mD7OOEBxF6STyraVr1xel1j0abVILM8ALJvRoFbqSWHGmaDlRGIiV9Q5cGbWi0sdiEaLQ==", "dependencies": { "@smithy/types": "^2.10.1", "tslib": "^2.5.0" @@ -3765,7 +4537,8 @@ }, "node_modules/@smithy/node-config-provider": { "version": "2.2.4", - "license": "Apache-2.0", + "resolved": "https://registry.npmjs.org/@smithy/node-config-provider/-/node-config-provider-2.2.4.tgz", + "integrity": "sha512-nqazHCp8r4KHSFhRQ+T0VEkeqvA0U+RhehBSr1gunUuNW3X7j0uDrWBxB2gE9eutzy6kE3Y7L+Dov/UXT871vg==", "dependencies": { "@smithy/property-provider": "^2.1.3", "@smithy/shared-ini-file-loader": "^2.3.4", @@ -3778,7 +4551,8 @@ }, "node_modules/@smithy/node-http-handler": { "version": "2.4.1", - "license": "Apache-2.0", + "resolved": "https://registry.npmjs.org/@smithy/node-http-handler/-/node-http-handler-2.4.1.tgz", + "integrity": "sha512-HCkb94soYhJMxPCa61wGKgmeKpJ3Gftx1XD6bcWEB2wMV1L9/SkQu/6/ysKBnbOzWRE01FGzwrTxucHypZ8rdg==", "dependencies": { "@smithy/abort-controller": "^2.1.3", "@smithy/protocol-http": "^3.2.1", @@ -3792,7 +4566,8 @@ }, "node_modules/@smithy/property-provider": { "version": "2.1.3", - "license": "Apache-2.0", + "resolved": "https://registry.npmjs.org/@smithy/property-provider/-/property-provider-2.1.3.tgz", + "integrity": "sha512-bMz3se+ySKWNrgm7eIiQMa2HO/0fl2D0HvLAdg9pTMcpgp4SqOAh6bz7Ik6y7uQqSrk4rLjIKgbQ6yzYgGehCQ==", "dependencies": { "@smithy/types": "^2.10.1", "tslib": "^2.5.0" @@ -3803,7 +4578,8 @@ }, "node_modules/@smithy/protocol-http": { "version": "3.2.1", - "license": "Apache-2.0", + "resolved": "https://registry.npmjs.org/@smithy/protocol-http/-/protocol-http-3.2.1.tgz", + "integrity": "sha512-KLrQkEw4yJCeAmAH7hctE8g9KwA7+H2nSJwxgwIxchbp/L0B5exTdOQi9D5HinPLlothoervGmhpYKelZ6AxIA==", "dependencies": { "@smithy/types": "^2.10.1", "tslib": "^2.5.0" @@ -3814,7 +4590,8 @@ }, "node_modules/@smithy/querystring-builder": { "version": "2.1.3", - "license": "Apache-2.0", + "resolved": "https://registry.npmjs.org/@smithy/querystring-builder/-/querystring-builder-2.1.3.tgz", + "integrity": "sha512-kFD3PnNqKELe6m9GRHQw/ftFFSZpnSeQD4qvgDB6BQN6hREHELSosVFUMPN4M3MDKN2jAwk35vXHLoDrNfKu0A==", "dependencies": { "@smithy/types": "^2.10.1", "@smithy/util-uri-escape": "^2.1.1", @@ -3826,7 +4603,8 @@ }, "node_modules/@smithy/querystring-parser": { "version": "2.1.3", - "license": "Apache-2.0", + "resolved": "https://registry.npmjs.org/@smithy/querystring-parser/-/querystring-parser-2.1.3.tgz", + "integrity": "sha512-3+CWJoAqcBMR+yvz6D+Fc5VdoGFtfenW6wqSWATWajrRMGVwJGPT3Vy2eb2bnMktJc4HU4bpjeovFa566P3knQ==", "dependencies": { "@smithy/types": "^2.10.1", "tslib": "^2.5.0" @@ -3837,7 +4615,8 @@ }, "node_modules/@smithy/service-error-classification": { "version": "2.1.3", - "license": "Apache-2.0", + "resolved": "https://registry.npmjs.org/@smithy/service-error-classification/-/service-error-classification-2.1.3.tgz", + "integrity": "sha512-iUrpSsem97bbXHHT/v3s7vaq8IIeMo6P6cXdeYHrx0wOJpMeBGQF7CB0mbJSiTm3//iq3L55JiEm8rA7CTVI8A==", "dependencies": { "@smithy/types": "^2.10.1" }, @@ -3847,7 +4626,8 @@ }, "node_modules/@smithy/shared-ini-file-loader": { "version": "2.3.4", - "license": "Apache-2.0", + "resolved": "https://registry.npmjs.org/@smithy/shared-ini-file-loader/-/shared-ini-file-loader-2.3.4.tgz", + "integrity": "sha512-CiZmPg9GeDKbKmJGEFvJBsJcFnh0AQRzOtQAzj1XEa8N/0/uSN/v1LYzgO7ry8hhO8+9KB7+DhSW0weqBra4Aw==", "dependencies": { "@smithy/types": "^2.10.1", "tslib": "^2.5.0" @@ -3858,7 +4638,8 @@ }, "node_modules/@smithy/signature-v4": { "version": "2.1.3", - "license": "Apache-2.0", + "resolved": "https://registry.npmjs.org/@smithy/signature-v4/-/signature-v4-2.1.3.tgz", + "integrity": "sha512-Jq4iPPdCmJojZTsPePn4r1ULShh6ONkokLuxp1Lnk4Sq7r7rJp4HlA1LbPBq4bD64TIzQezIpr1X+eh5NYkNxw==", "dependencies": { "@smithy/eventstream-codec": "^2.1.3", "@smithy/is-array-buffer": "^2.1.1", @@ -3875,7 +4656,8 @@ }, "node_modules/@smithy/smithy-client": { "version": "2.4.2", - "license": "Apache-2.0", + "resolved": "https://registry.npmjs.org/@smithy/smithy-client/-/smithy-client-2.4.2.tgz", + "integrity": "sha512-ntAFYN51zu3N3mCd95YFcFi/8rmvm//uX+HnK24CRbI6k5Rjackn0JhgKz5zOx/tbNvOpgQIwhSX+1EvEsBLbA==", "dependencies": { "@smithy/middleware-endpoint": "^2.4.4", "@smithy/middleware-stack": "^2.1.3", @@ -3890,7 +4672,8 @@ }, "node_modules/@smithy/types": { "version": "2.10.1", - "license": "Apache-2.0", + "resolved": "https://registry.npmjs.org/@smithy/types/-/types-2.10.1.tgz", + "integrity": "sha512-hjQO+4ru4cQ58FluQvKKiyMsFg0A6iRpGm2kqdH8fniyNd2WyanoOsYJfMX/IFLuLxEoW6gnRkNZy1y6fUUhtA==", "dependencies": { "tslib": "^2.5.0" }, @@ -3900,7 +4683,8 @@ }, "node_modules/@smithy/url-parser": { "version": "2.1.3", - "license": "Apache-2.0", + "resolved": "https://registry.npmjs.org/@smithy/url-parser/-/url-parser-2.1.3.tgz", + "integrity": "sha512-X1NRA4WzK/ihgyzTpeGvI9Wn45y8HmqF4AZ/FazwAv8V203Ex+4lXqcYI70naX9ETqbqKVzFk88W6WJJzCggTQ==", "dependencies": { "@smithy/querystring-parser": "^2.1.3", "@smithy/types": "^2.10.1", @@ -3909,7 +4693,8 @@ }, "node_modules/@smithy/util-base64": { "version": "2.1.1", - "license": "Apache-2.0", + "resolved": "https://registry.npmjs.org/@smithy/util-base64/-/util-base64-2.1.1.tgz", + "integrity": "sha512-UfHVpY7qfF/MrgndI5PexSKVTxSZIdz9InghTFa49QOvuu9I52zLPLUHXvHpNuMb1iD2vmc6R+zbv/bdMipR/g==", "dependencies": { "@smithy/util-buffer-from": "^2.1.1", "tslib": "^2.5.0" @@ -3920,14 +4705,16 @@ }, "node_modules/@smithy/util-body-length-browser": { "version": "2.1.1", - "license": "Apache-2.0", + "resolved": "https://registry.npmjs.org/@smithy/util-body-length-browser/-/util-body-length-browser-2.1.1.tgz", + "integrity": "sha512-ekOGBLvs1VS2d1zM2ER4JEeBWAvIOUKeaFch29UjjJsxmZ/f0L3K3x0dEETgh3Q9bkZNHgT+rkdl/J/VUqSRag==", "dependencies": { "tslib": "^2.5.0" } }, "node_modules/@smithy/util-body-length-node": { "version": "2.2.1", - "license": "Apache-2.0", + "resolved": "https://registry.npmjs.org/@smithy/util-body-length-node/-/util-body-length-node-2.2.1.tgz", + "integrity": "sha512-/ggJG+ta3IDtpNVq4ktmEUtOkH1LW64RHB5B0hcr5ZaWBmo96UX2cIOVbjCqqDickTXqBWZ4ZO0APuaPrD7Abg==", "dependencies": { "tslib": "^2.5.0" }, @@ -3937,7 +4724,8 @@ }, "node_modules/@smithy/util-buffer-from": { "version": "2.1.1", - "license": "Apache-2.0", + "resolved": "https://registry.npmjs.org/@smithy/util-buffer-from/-/util-buffer-from-2.1.1.tgz", + "integrity": "sha512-clhNjbyfqIv9Md2Mg6FffGVrJxw7bgK7s3Iax36xnfVj6cg0fUG7I4RH0XgXJF8bxi+saY5HR21g2UPKSxVCXg==", "dependencies": { "@smithy/is-array-buffer": "^2.1.1", "tslib": "^2.5.0" @@ -3948,7 +4736,8 @@ }, "node_modules/@smithy/util-config-provider": { "version": "2.2.1", - "license": "Apache-2.0", + "resolved": "https://registry.npmjs.org/@smithy/util-config-provider/-/util-config-provider-2.2.1.tgz", + "integrity": "sha512-50VL/tx9oYYcjJn/qKqNy7sCtpD0+s8XEBamIFo4mFFTclKMNp+rsnymD796uybjiIquB7VCB/DeafduL0y2kw==", "dependencies": { "tslib": "^2.5.0" }, @@ -3958,7 +4747,8 @@ }, "node_modules/@smithy/util-defaults-mode-browser": { "version": "2.1.4", - "license": "Apache-2.0", + "resolved": "https://registry.npmjs.org/@smithy/util-defaults-mode-browser/-/util-defaults-mode-browser-2.1.4.tgz", + "integrity": "sha512-J6XAVY+/g7jf03QMnvqPyU+8jqGrrtXoKWFVOS+n1sz0Lg8HjHJ1ANqaDN+KTTKZRZlvG8nU5ZrJOUL6VdwgcQ==", "dependencies": { "@smithy/property-provider": "^2.1.3", "@smithy/smithy-client": "^2.4.2", @@ -3971,11 +4761,12 @@ } }, "node_modules/@smithy/util-defaults-mode-node": { - "version": "2.2.4", - "license": "Apache-2.0", + "version": "2.2.3", + "resolved": "https://registry.npmjs.org/@smithy/util-defaults-mode-node/-/util-defaults-mode-node-2.2.3.tgz", + "integrity": "sha512-ttUISrv1uVOjTlDa3nznX33f0pthoUlP+4grhTvOzcLhzArx8qHB94/untGACOG3nlf8vU20nI2iWImfzoLkYA==", "dependencies": { "@smithy/config-resolver": "^2.1.4", - "@smithy/credential-provider-imds": "^2.2.5", + "@smithy/credential-provider-imds": "^2.2.4", "@smithy/node-config-provider": "^2.2.4", "@smithy/property-provider": "^2.1.3", "@smithy/smithy-client": "^2.4.2", @@ -3988,7 +4779,8 @@ }, "node_modules/@smithy/util-endpoints": { "version": "1.1.4", - "license": "Apache-2.0", + "resolved": "https://registry.npmjs.org/@smithy/util-endpoints/-/util-endpoints-1.1.4.tgz", + "integrity": "sha512-/qAeHmK5l4yQ4/bCIJ9p49wDe9rwWtOzhPHblu386fwPNT3pxmodgcs9jDCV52yK9b4rB8o9Sj31P/7Vzka1cg==", "dependencies": { "@smithy/node-config-provider": "^2.2.4", "@smithy/types": "^2.10.1", @@ -4000,7 +4792,8 @@ }, "node_modules/@smithy/util-hex-encoding": { "version": "2.1.1", - "license": "Apache-2.0", + "resolved": "https://registry.npmjs.org/@smithy/util-hex-encoding/-/util-hex-encoding-2.1.1.tgz", + "integrity": "sha512-3UNdP2pkYUUBGEXzQI9ODTDK+Tcu1BlCyDBaRHwyxhA+8xLP8agEKQq4MGmpjqb4VQAjq9TwlCQX0kP6XDKYLg==", "dependencies": { "tslib": "^2.5.0" }, @@ -4010,7 +4803,8 @@ }, "node_modules/@smithy/util-middleware": { "version": "2.1.3", - "license": "Apache-2.0", + "resolved": "https://registry.npmjs.org/@smithy/util-middleware/-/util-middleware-2.1.3.tgz", + "integrity": "sha512-/+2fm7AZ2ozl5h8wM++ZP0ovE9/tiUUAHIbCfGfb3Zd3+Dyk17WODPKXBeJ/TnK5U+x743QmA0xHzlSm8I/qhw==", "dependencies": { "@smithy/types": "^2.10.1", "tslib": "^2.5.0" @@ -4021,7 +4815,8 @@ }, "node_modules/@smithy/util-retry": { "version": "2.1.3", - "license": "Apache-2.0", + "resolved": "https://registry.npmjs.org/@smithy/util-retry/-/util-retry-2.1.3.tgz", + "integrity": "sha512-Kbvd+GEMuozbNUU3B89mb99tbufwREcyx2BOX0X2+qHjq6Gvsah8xSDDgxISDwcOHoDqUWO425F0Uc/QIRhYkg==", "dependencies": { "@smithy/service-error-classification": "^2.1.3", "@smithy/types": "^2.10.1", @@ -4033,7 +4828,8 @@ }, "node_modules/@smithy/util-stream": { "version": "2.1.3", - "license": "Apache-2.0", + "resolved": "https://registry.npmjs.org/@smithy/util-stream/-/util-stream-2.1.3.tgz", + "integrity": "sha512-HvpEQbP8raTy9n86ZfXiAkf3ezp1c3qeeO//zGqwZdrfaoOpGKQgF2Sv1IqZp7wjhna7pvczWaGUHjcOPuQwKw==", "dependencies": { "@smithy/fetch-http-handler": "^2.4.3", "@smithy/node-http-handler": "^2.4.1", @@ -4050,7 +4846,8 @@ }, "node_modules/@smithy/util-uri-escape": { "version": "2.1.1", - "license": "Apache-2.0", + "resolved": "https://registry.npmjs.org/@smithy/util-uri-escape/-/util-uri-escape-2.1.1.tgz", + "integrity": "sha512-saVzI1h6iRBUVSqtnlOnc9ssU09ypo7n+shdQ8hBTZno/9rZ3AuRYvoHInV57VF7Qn7B+pFJG7qTzFiHxWlWBw==", "dependencies": { "tslib": "^2.5.0" }, @@ -4060,7 +4857,8 @@ }, "node_modules/@smithy/util-utf8": { "version": "2.1.1", - "license": "Apache-2.0", + "resolved": "https://registry.npmjs.org/@smithy/util-utf8/-/util-utf8-2.1.1.tgz", + "integrity": "sha512-BqTpzYEcUMDwAKr7/mVRUtHDhs6ZoXDi9NypMvMfOr/+u1NW7JgqodPDECiiLboEm6bobcPcECxzjtQh865e9A==", "dependencies": { "@smithy/util-buffer-from": "^2.1.1", "tslib": "^2.5.0" @@ -4071,7 +4869,8 @@ }, "node_modules/@smithy/util-waiter": { "version": "2.1.3", - "license": "Apache-2.0", + "resolved": "https://registry.npmjs.org/@smithy/util-waiter/-/util-waiter-2.1.3.tgz", + "integrity": "sha512-3R0wNFAQQoH9e4m+bVLDYNOst2qNxtxFgq03WoNHWTBOqQT3jFnOBRj1W51Rf563xDA5kwqjziksxn6RKkHB+Q==", "dependencies": { "@smithy/abort-controller": "^2.1.3", "@smithy/types": "^2.10.1", @@ -4083,44 +4882,51 @@ }, "node_modules/@tootallnate/once": { "version": "2.0.0", + "resolved": "https://registry.npmjs.org/@tootallnate/once/-/once-2.0.0.tgz", + "integrity": "sha512-XCuKFP5PS55gnMVu3dty8KPatLqUoy/ZYzDzAGCQ8JNFCkLXzmI7vNHCR+XpbZaMWQK/vQubr7PkYq8g470J/A==", "dev": true, - "license": "MIT", "engines": { "node": ">= 10" } }, "node_modules/@tsconfig/node10": { "version": "1.0.9", - "dev": true, - "license": "MIT" + "resolved": "https://registry.npmjs.org/@tsconfig/node10/-/node10-1.0.9.tgz", + "integrity": "sha512-jNsYVVxU8v5g43Erja32laIDHXeoNvFEpX33OK4d6hljo3jDhCBDhx5dhCCTMWUojscpAagGiRkBKxpdl9fxqA==", + "dev": true }, "node_modules/@tsconfig/node12": { "version": "1.0.11", - "dev": true, - "license": "MIT" + "resolved": "https://registry.npmjs.org/@tsconfig/node12/-/node12-1.0.11.tgz", + "integrity": "sha512-cqefuRsh12pWyGsIoBKJA9luFu3mRxCA+ORZvA4ktLSzIuCUtWVxGIuXigEwO5/ywWFMZ2QEGKWvkZG1zDMTag==", + "dev": true }, "node_modules/@tsconfig/node14": { "version": "1.0.3", - "dev": true, - "license": "MIT" + "resolved": "https://registry.npmjs.org/@tsconfig/node14/-/node14-1.0.3.tgz", + "integrity": "sha512-ysT8mhdixWK6Hw3i1V2AeRqZ5WfXg1G43mqoYlM2nc6388Fq5jcXyr5mRsqViLx/GJYdoL0bfXD8nmF+Zn/Iow==", + "dev": true }, "node_modules/@tsconfig/node16": { "version": "1.0.4", - "dev": true, - "license": "MIT" + "resolved": "https://registry.npmjs.org/@tsconfig/node16/-/node16-1.0.4.tgz", + "integrity": "sha512-vxhUy4J8lyeyinH7Azl1pdd43GJhZH/tP2weN8TntQblOY+A0XbT8DJk1/oCPuOOyg/Ja757rG0CgHcWC8OfMA==", + "dev": true }, "node_modules/@tufjs/canonical-json": { "version": "1.0.0", + "resolved": "https://registry.npmjs.org/@tufjs/canonical-json/-/canonical-json-1.0.0.tgz", + "integrity": "sha512-QTnf++uxunWvG2z3UFNzAoQPHxnSXOwtaI3iJ+AohhV+5vONuArPjJE7aPXPVXfXJsqrVbZBu9b81AJoSd09IQ==", "dev": true, - "license": "MIT", "engines": { "node": "^14.17.0 || ^16.13.0 || >=18.0.0" } }, "node_modules/@tufjs/models": { "version": "1.0.4", + "resolved": "https://registry.npmjs.org/@tufjs/models/-/models-1.0.4.tgz", + "integrity": "sha512-qaGV9ltJP0EO25YfFUPhxRVK0evXFIAGicsVXuRim4Ed9cjPxYhNnNJ49SFmbeLgtxpslIkX317IgpfcHPVj/A==", "dev": true, - "license": "MIT", "dependencies": { "@tufjs/canonical-json": "1.0.0", "minimatch": "^9.0.0" @@ -4131,13 +4937,15 @@ }, "node_modules/@types/aws-lambda": { "version": "8.10.136", - "dev": true, - "license": "MIT" + "resolved": "https://registry.npmjs.org/@types/aws-lambda/-/aws-lambda-8.10.136.tgz", + "integrity": "sha512-cmmgqxdVGhxYK9lZMYYXYRJk6twBo53ivtXjIUEFZxfxe4TkZTZBK3RRWrY2HjJcUIix0mdifn15yjOAat5lTA==", + "dev": true }, "node_modules/@types/babel__core": { "version": "7.20.5", + "resolved": "https://registry.npmjs.org/@types/babel__core/-/babel__core-7.20.5.tgz", + "integrity": "sha512-qoQprZvz5wQFJwMDqeseRXWv3rqMvhgpbXFfVyWhbx9X47POIA6i/+dXefEmZKoAgOaTdaIgNSMqMIU61yRyzA==", "dev": true, - "license": "MIT", "dependencies": { "@babel/parser": "^7.20.7", "@babel/types": "^7.20.7", @@ -4148,16 +4956,18 @@ }, "node_modules/@types/babel__generator": { "version": "7.6.8", + "resolved": "https://registry.npmjs.org/@types/babel__generator/-/babel__generator-7.6.8.tgz", + "integrity": "sha512-ASsj+tpEDsEiFr1arWrlN6V3mdfjRMZt6LtK/Vp/kreFLnr5QH5+DhvD5nINYZXzwJvXeGq+05iUXcAzVrqWtw==", "dev": true, - "license": "MIT", "dependencies": { "@babel/types": "^7.0.0" } }, "node_modules/@types/babel__template": { "version": "7.4.4", + "resolved": "https://registry.npmjs.org/@types/babel__template/-/babel__template-7.4.4.tgz", + "integrity": "sha512-h/NUaSyG5EyxBIp8YRxo4RMe2/qQgvyowRwVMzhYhBCONbW8PUsg4lkFMrhgZhUe5z3L3MiLDuvyJ/CaPa2A8A==", "dev": true, - "license": "MIT", "dependencies": { "@babel/parser": "^7.1.0", "@babel/types": "^7.0.0" @@ -4165,52 +4975,59 @@ }, "node_modules/@types/babel__traverse": { "version": "7.20.5", + "resolved": "https://registry.npmjs.org/@types/babel__traverse/-/babel__traverse-7.20.5.tgz", + "integrity": "sha512-WXCyOcRtH37HAUkpXhUduaxdm82b4GSlyTqajXviN4EfiuPgNYR109xMCKvpl6zPIpua0DGlMEDCq+g8EdoheQ==", "dev": true, - "license": "MIT", "dependencies": { "@babel/types": "^7.20.7" } }, "node_modules/@types/cls-hooked": { "version": "4.3.8", - "license": "MIT", + "resolved": "https://registry.npmjs.org/@types/cls-hooked/-/cls-hooked-4.3.8.tgz", + "integrity": "sha512-tf/7H883gFA6MPlWI15EQtfNZ+oPL0gLKkOlx9UHFrun1fC/FkuyNBpTKq1B5E3T4fbvjId6WifHUdSGsMMuPg==", "dependencies": { "@types/node": "*" } }, "node_modules/@types/graceful-fs": { "version": "4.1.9", + "resolved": "https://registry.npmjs.org/@types/graceful-fs/-/graceful-fs-4.1.9.tgz", + "integrity": "sha512-olP3sd1qOEe5dXTSaFvQG+02VdRXcdytWLAZsAq1PecU8uqQAhkrnbli7DagjtXKW/Bl7YJbUsa8MPcuc8LHEQ==", "dev": true, - "license": "MIT", "dependencies": { "@types/node": "*" } }, "node_modules/@types/istanbul-lib-coverage": { "version": "2.0.6", - "dev": true, - "license": "MIT" + "resolved": "https://registry.npmjs.org/@types/istanbul-lib-coverage/-/istanbul-lib-coverage-2.0.6.tgz", + "integrity": "sha512-2QF/t/auWm0lsy8XtKVPG19v3sSOQlJe/YHZgfjb/KBBHOGSV+J2q/S671rcq9uTBrLAXmZpqJiaQbMT+zNU1w==", + "dev": true }, "node_modules/@types/istanbul-lib-report": { "version": "3.0.3", + "resolved": "https://registry.npmjs.org/@types/istanbul-lib-report/-/istanbul-lib-report-3.0.3.tgz", + "integrity": "sha512-NQn7AHQnk/RSLOxrBbGyJM/aVQ+pjj5HCgasFxc0K/KhoATfQ/47AyUl15I2yBUpihjmas+a+VJBOqecrFH+uA==", "dev": true, - "license": "MIT", "dependencies": { "@types/istanbul-lib-coverage": "*" } }, "node_modules/@types/istanbul-reports": { "version": "3.0.4", + "resolved": "https://registry.npmjs.org/@types/istanbul-reports/-/istanbul-reports-3.0.4.tgz", + "integrity": "sha512-pk2B1NWalF9toCRu6gjBzR69syFjP4Od8WRAX+0mmf9lAjCRicLOWc+ZrxZHx/0XRjotgkF9t6iaMJ+aXcOdZQ==", "dev": true, - "license": "MIT", "dependencies": { "@types/istanbul-lib-report": "*" } }, "node_modules/@types/jest": { "version": "29.5.12", + "resolved": "https://registry.npmjs.org/@types/jest/-/jest-29.5.12.tgz", + "integrity": "sha512-eDC8bTvT/QhYdxJAulQikueigY5AsdBRH2yDKW3yveW7svY3+DzN84/2NUgkw10RTiJbWqZrTtoGVdYlvFJdLw==", "dev": true, - "license": "MIT", "dependencies": { "expect": "^29.0.0", "pretty-format": "^29.0.0" @@ -4218,107 +5035,125 @@ }, "node_modules/@types/jmespath": { "version": "0.15.2", - "dev": true, - "license": "MIT" + "resolved": "https://registry.npmjs.org/@types/jmespath/-/jmespath-0.15.2.tgz", + "integrity": "sha512-pegh49FtNsC389Flyo9y8AfkVIZn9MMPE9yJrO9svhq6Fks2MwymULWjZqySuxmctd3ZH4/n7Mr98D+1Qo5vGA==", + "dev": true }, "node_modules/@types/json-schema": { "version": "7.0.15", - "dev": true, - "license": "MIT" + "resolved": "https://registry.npmjs.org/@types/json-schema/-/json-schema-7.0.15.tgz", + "integrity": "sha512-5+fP8P8MFNC+AyZCDxrB2pkZFPGzqQWUzpSeuuVLvm8VMcorNYavBqoFcxK8bQz4Qsbn4oUEEem4wDLfcysGHA==", + "dev": true }, "node_modules/@types/json5": { "version": "0.0.29", - "dev": true, - "license": "MIT" + "resolved": "https://registry.npmjs.org/@types/json5/-/json5-0.0.29.tgz", + "integrity": "sha512-dRLjCWHYg4oaA77cxO64oO+7JwCwnIzkZPdrrC71jQmQtlhM556pwKo5bUzqvZndkVbeFLIIi+9TC40JNF5hNQ==", + "dev": true }, "node_modules/@types/lodash": { "version": "4.14.202", - "dev": true, - "license": "MIT" + "resolved": "https://registry.npmjs.org/@types/lodash/-/lodash-4.14.202.tgz", + "integrity": "sha512-OvlIYQK9tNneDlS0VN54LLd5uiPCBOp7gS5Z0f1mjoJYBrtStzgmJBxONW3U6OZqdtNzZPmn9BS/7WI7BFFcFQ==", + "dev": true }, "node_modules/@types/lodash.merge": { "version": "4.6.9", + "resolved": "https://registry.npmjs.org/@types/lodash.merge/-/lodash.merge-4.6.9.tgz", + "integrity": "sha512-23sHDPmzd59kUgWyKGiOMO2Qb9YtqRO/x4IhkgNUiPQ1+5MUVqi6bCZeq9nBJ17msjIMbEIO5u+XW4Kz6aGUhQ==", "dev": true, - "license": "MIT", "dependencies": { "@types/lodash": "*" } }, "node_modules/@types/minimatch": { "version": "3.0.5", - "dev": true, - "license": "MIT" + "resolved": "https://registry.npmjs.org/@types/minimatch/-/minimatch-3.0.5.tgz", + "integrity": "sha512-Klz949h02Gz2uZCMGwDUSDS1YBlTdDDgbWHi+81l29tQALUtvz4rAYi5uoVhE5Lagoq6DeqAUlbrHvW/mXDgdQ==", + "dev": true }, "node_modules/@types/minimist": { "version": "1.2.5", - "dev": true, - "license": "MIT" + "resolved": "https://registry.npmjs.org/@types/minimist/-/minimist-1.2.5.tgz", + "integrity": "sha512-hov8bUuiLiyFPGyFPE1lwWhmzYbirOXQNNo40+y3zow8aFVTeyn3VWL0VFFfdNddA8S4Vf0Tc062rzyNr7Paag==", + "dev": true }, "node_modules/@types/node": { - "version": "20.11.25", - "license": "MIT", + "version": "20.11.24", + "resolved": "https://registry.npmjs.org/@types/node/-/node-20.11.24.tgz", + "integrity": "sha512-Kza43ewS3xoLgCEpQrsT+xRo/EJej1y0kVYGiLFE1NEODXGzTfwiC6tXTLMQskn1X4/Rjlh0MQUvx9W+L9long==", "dependencies": { "undici-types": "~5.26.4" } }, "node_modules/@types/normalize-package-data": { "version": "2.4.4", - "dev": true, - "license": "MIT" + "resolved": "https://registry.npmjs.org/@types/normalize-package-data/-/normalize-package-data-2.4.4.tgz", + "integrity": "sha512-37i+OaWTh9qeK4LSHPsyRC7NahnGotNuZvjLSgcPzblpHB3rrCJxAOgI5gCdKm7coonsaX1Of0ILiTcnZjbfxA==", + "dev": true }, "node_modules/@types/promise-retry": { "version": "1.1.6", + "resolved": "https://registry.npmjs.org/@types/promise-retry/-/promise-retry-1.1.6.tgz", + "integrity": "sha512-EC1+OMXV0PZb0pf+cmyxc43MEP2CDumZe4AfuxWboxxEixztIebknpJPZAX5XlodGF1OY+C1E/RAeNGzxf+bJA==", "dev": true, - "license": "MIT", "dependencies": { "@types/retry": "*" } }, "node_modules/@types/retry": { "version": "0.12.5", - "dev": true, - "license": "MIT" + "resolved": "https://registry.npmjs.org/@types/retry/-/retry-0.12.5.tgz", + "integrity": "sha512-3xSjTp3v03X/lSQLkczaN9UIEwJMoMCA1+Nb5HfbJEQWogdeQIyVtTvxPXDQjZ5zws8rFQfVfRdz03ARihPJgw==", + "dev": true }, "node_modules/@types/semver": { - "version": "7.5.8", - "dev": true, - "license": "MIT" + "version": "7.5.6", + "resolved": "https://registry.npmjs.org/@types/semver/-/semver-7.5.6.tgz", + "integrity": "sha512-dn1l8LaMea/IjDoHNd9J52uBbInB796CDffS6VdIxvqYCPSG0V0DzHp76GpaWnlhg88uYyPbXCDIowa86ybd5A==", + "dev": true }, "node_modules/@types/sinon": { "version": "10.0.20", + "resolved": "https://registry.npmjs.org/@types/sinon/-/sinon-10.0.20.tgz", + "integrity": "sha512-2APKKruFNCAZgx3daAyACGzWuJ028VVCUDk6o2rw/Z4PXT0ogwdV4KUegW0MwVs0Zu59auPXbbuBJHF12Sx1Eg==", "dev": true, - "license": "MIT", "dependencies": { "@types/sinonjs__fake-timers": "*" } }, "node_modules/@types/sinonjs__fake-timers": { "version": "8.1.5", - "dev": true, - "license": "MIT" + "resolved": "https://registry.npmjs.org/@types/sinonjs__fake-timers/-/sinonjs__fake-timers-8.1.5.tgz", + "integrity": "sha512-mQkU2jY8jJEF7YHjHvsQO8+3ughTL1mcnn96igfhONmR+fUPSKIkefQYpSe8bsly2Ep7oQbn/6VG5/9/0qcArQ==", + "dev": true }, "node_modules/@types/stack-utils": { "version": "2.0.3", - "dev": true, - "license": "MIT" + "resolved": "https://registry.npmjs.org/@types/stack-utils/-/stack-utils-2.0.3.tgz", + "integrity": "sha512-9aEbYZ3TbYMznPdcdr3SmIrLXwC/AKZXQeCf9Pgao5CKb8CyHuEX5jzWPTkvregvhRJHcpRO6BFoGW9ycaOkYw==", + "dev": true }, "node_modules/@types/yargs": { "version": "17.0.32", + "resolved": "https://registry.npmjs.org/@types/yargs/-/yargs-17.0.32.tgz", + "integrity": "sha512-xQ67Yc/laOG5uMfX/093MRlGGCIBzZMarVa+gfNKJxWAIgykYpVGkBdbqEzGDDfCrVUj6Hiff4mTZ5BA6TmAog==", "dev": true, - "license": "MIT", "dependencies": { "@types/yargs-parser": "*" } }, "node_modules/@types/yargs-parser": { "version": "21.0.3", - "dev": true, - "license": "MIT" + "resolved": "https://registry.npmjs.org/@types/yargs-parser/-/yargs-parser-21.0.3.tgz", + "integrity": "sha512-I4q9QU9MQv4oEOz4tAHJtNz1cwuLxn2F3xcc2iV5WdqLPpUnj30aUuxt1mAxYTG+oe8CZMV/+6rU4S4gRDzqtQ==", + "dev": true }, "node_modules/@typescript-eslint/eslint-plugin": { "version": "6.21.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-6.21.0.tgz", + "integrity": "sha512-oy9+hTPCUFpngkEZUSzbf9MxI65wbKFoQYsgPdILTfbUldp5ovUuphZVe4i30emU9M/kP+T64Di0mxl7dSw3MA==", "dev": true, - "license": "MIT", "dependencies": { "@eslint-community/regexpp": "^4.5.1", "@typescript-eslint/scope-manager": "6.21.0", @@ -4351,8 +5186,9 @@ }, "node_modules/@typescript-eslint/parser": { "version": "6.21.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-6.21.0.tgz", + "integrity": "sha512-tbsV1jPne5CkFQCgPBcDOt30ItF7aJoZL997JSF7MhGQqOeT3svWRYxiqlfA5RUdlHN6Fi+EI9bxqbdyAUZjYQ==", "dev": true, - "license": "BSD-2-Clause", "dependencies": { "@typescript-eslint/scope-manager": "6.21.0", "@typescript-eslint/types": "6.21.0", @@ -4378,8 +5214,9 @@ }, "node_modules/@typescript-eslint/scope-manager": { "version": "6.21.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-6.21.0.tgz", + "integrity": "sha512-OwLUIWZJry80O99zvqXVEioyniJMa+d2GrqpUTqi5/v5D5rOrppJVBPa0yKCblcigC0/aYAzxxqQ1B+DS2RYsg==", "dev": true, - "license": "MIT", "dependencies": { "@typescript-eslint/types": "6.21.0", "@typescript-eslint/visitor-keys": "6.21.0" @@ -4394,8 +5231,9 @@ }, "node_modules/@typescript-eslint/type-utils": { "version": "6.21.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-6.21.0.tgz", + "integrity": "sha512-rZQI7wHfao8qMX3Rd3xqeYSMCL3SoiSQLBATSiVKARdFGCYSRvmViieZjqc58jKgs8Y8i9YvVVhRbHSTA4VBag==", "dev": true, - "license": "MIT", "dependencies": { "@typescript-eslint/typescript-estree": "6.21.0", "@typescript-eslint/utils": "6.21.0", @@ -4420,8 +5258,9 @@ }, "node_modules/@typescript-eslint/types": { "version": "6.21.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-6.21.0.tgz", + "integrity": "sha512-1kFmZ1rOm5epu9NZEZm1kckCDGj5UJEf7P1kliH4LKu/RkwpsfqqGmY2OOcUs18lSlQBKLDYBOGxRVtrMN5lpg==", "dev": true, - "license": "MIT", "engines": { "node": "^16.0.0 || >=18.0.0" }, @@ -4432,8 +5271,9 @@ }, "node_modules/@typescript-eslint/typescript-estree": { "version": "6.21.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-6.21.0.tgz", + "integrity": "sha512-6npJTkZcO+y2/kr+z0hc4HwNfrrP4kNYh57ek7yCNlrBjWQ1Y0OS7jiZTkgumrvkX5HkEKXFZkkdFNkaW2wmUQ==", "dev": true, - "license": "BSD-2-Clause", "dependencies": { "@typescript-eslint/types": "6.21.0", "@typescript-eslint/visitor-keys": "6.21.0", @@ -4459,8 +5299,9 @@ }, "node_modules/@typescript-eslint/utils": { "version": "6.21.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-6.21.0.tgz", + "integrity": "sha512-NfWVaC8HP9T8cbKQxHcsJBY5YE1O33+jpMwN45qzWWaPDZgLIbo12toGMWnmhvCpd3sIxkpDw3Wv1B3dYrbDQQ==", "dev": true, - "license": "MIT", "dependencies": { "@eslint-community/eslint-utils": "^4.4.0", "@types/json-schema": "^7.0.12", @@ -4483,8 +5324,9 @@ }, "node_modules/@typescript-eslint/visitor-keys": { "version": "6.21.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-6.21.0.tgz", + "integrity": "sha512-JJtkDduxLi9bivAB+cYOVMtbkqdPOhZ+ZI5LC47MIRrDV4Yn2o+ZnW10Nkmr28xRpSpdJ6Sm42Hjf2+REYXm0A==", "dev": true, - "license": "MIT", "dependencies": { "@typescript-eslint/types": "6.21.0", "eslint-visitor-keys": "^3.4.1" @@ -4499,18 +5341,21 @@ }, "node_modules/@ungap/structured-clone": { "version": "1.2.0", - "dev": true, - "license": "ISC" + "resolved": "https://registry.npmjs.org/@ungap/structured-clone/-/structured-clone-1.2.0.tgz", + "integrity": "sha512-zuVdFrMJiuCDQUMCzQaD6KL28MjnqqN8XnAqiEq9PNm/hCPTSGfrXCOfwj1ow4LFb/tNymJPwsNbVePc1xFqrQ==", + "dev": true }, "node_modules/@yarnpkg/lockfile": { "version": "1.1.0", - "dev": true, - "license": "BSD-2-Clause" + "resolved": "https://registry.npmjs.org/@yarnpkg/lockfile/-/lockfile-1.1.0.tgz", + "integrity": "sha512-GpSwvyXOcOOlV70vbnzjj4fW5xW/FdUF6nQEt1ENy7m4ZCczi1+/buVUPAqmGfqznsORNFzUMjctTIp8a9tuCQ==", + "dev": true }, "node_modules/@yarnpkg/parsers": { "version": "3.0.0-rc.46", + "resolved": "https://registry.npmjs.org/@yarnpkg/parsers/-/parsers-3.0.0-rc.46.tgz", + "integrity": "sha512-aiATs7pSutzda/rq8fnuPwTglyVwjM22bNnK2ZgjrpAjQHSSl3lztd2f9evst1W/qnC58DRz7T7QndUDumAR4Q==", "dev": true, - "license": "BSD-2-Clause", "dependencies": { "js-yaml": "^3.10.0", "tslib": "^2.4.0" @@ -4521,16 +5366,18 @@ }, "node_modules/@yarnpkg/parsers/node_modules/argparse": { "version": "1.0.10", + "resolved": "https://registry.npmjs.org/argparse/-/argparse-1.0.10.tgz", + "integrity": "sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg==", "dev": true, - "license": "MIT", "dependencies": { "sprintf-js": "~1.0.2" } }, "node_modules/@yarnpkg/parsers/node_modules/js-yaml": { "version": "3.14.1", + "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.14.1.tgz", + "integrity": "sha512-okMH7OXXJ7YrN9Ok3/SXrnu4iX9yOk+25nqX4imS2npuvTYDmo/QEZoqwZkYaIDk3jVvBOTOIEgEhaLOynBS9g==", "dev": true, - "license": "MIT", "dependencies": { "argparse": "^1.0.7", "esprima": "^4.0.0" @@ -4539,15 +5386,11 @@ "js-yaml": "bin/js-yaml.js" } }, - "node_modules/@yarnpkg/parsers/node_modules/sprintf-js": { - "version": "1.0.3", - "dev": true, - "license": "BSD-3-Clause" - }, "node_modules/@zkochan/js-yaml": { "version": "0.0.6", + "resolved": "https://registry.npmjs.org/@zkochan/js-yaml/-/js-yaml-0.0.6.tgz", + "integrity": "sha512-nzvgl3VfhcELQ8LyVrYOru+UtAy1nrygk2+AGbTm8a5YcO6o8lSjAT+pfg3vJWxIoZKOUhrK6UU7xW/+00kQrg==", "dev": true, - "license": "MIT", "dependencies": { "argparse": "^2.0.1" }, @@ -4557,16 +5400,18 @@ }, "node_modules/abbrev": { "version": "2.0.0", + "resolved": "https://registry.npmjs.org/abbrev/-/abbrev-2.0.0.tgz", + "integrity": "sha512-6/mh1E2u2YgEsCHdY0Yx5oW+61gZU+1vXaoiHHrpKeuRNNgFvS+/jrwHiQhB5apAf5oB7UB7E19ol2R2LKH8hQ==", "dev": true, - "license": "ISC", "engines": { "node": "^14.17.0 || ^16.13.0 || >=18.0.0" } }, "node_modules/acorn": { "version": "8.11.3", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.11.3.tgz", + "integrity": "sha512-Y9rRfJG5jcKOE0CLisYbojUjIrIEE7AGMzA/Sm4BslANhbS+cDMpgBdcPT91oJ7OuJ9hYJBx59RjbhxVnrF8Xg==", "dev": true, - "license": "MIT", "bin": { "acorn": "bin/acorn" }, @@ -4576,40 +5421,45 @@ }, "node_modules/acorn-jsx": { "version": "5.3.2", + "resolved": "https://registry.npmjs.org/acorn-jsx/-/acorn-jsx-5.3.2.tgz", + "integrity": "sha512-rq9s+JNhf0IChjtDXxllJ7g41oZk5SlXtp0LHwyA5cejwn7vKmKp4pPri6YEePv2PU65sAsegbXtIinmDFDXgQ==", "dev": true, - "license": "MIT", "peerDependencies": { "acorn": "^6.0.0 || ^7.0.0 || ^8.0.0" } }, "node_modules/acorn-walk": { "version": "8.3.2", + "resolved": "https://registry.npmjs.org/acorn-walk/-/acorn-walk-8.3.2.tgz", + "integrity": "sha512-cjkyv4OtNCIeqhHrfS81QWXoCBPExR/J62oyEqepVw8WaQeSqpW2uhuLPh1m9eWhDuOo/jUXVTlifvesOWp/4A==", "dev": true, - "license": "MIT", "engines": { "node": ">=0.4.0" } }, "node_modules/add-stream": { "version": "1.0.0", - "dev": true, - "license": "MIT" + "resolved": "https://registry.npmjs.org/add-stream/-/add-stream-1.0.0.tgz", + "integrity": "sha512-qQLMr+8o0WC4FZGQTcJiKBVC59JylcPSrTtk6usvmIDFUOCKegapy1VHQwRbFMOFyb/inzUVqHs+eMYKDM1YeQ==", + "dev": true }, "node_modules/agent-base": { - "version": "7.1.0", + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/agent-base/-/agent-base-6.0.2.tgz", + "integrity": "sha512-RZNwNclF7+MS/8bDg70amg32dyeZGZxiDuQmZxKLAlQjr3jGyLx+4Kkk58UO7D2QdgFIQCovuSuZESne6RG6XQ==", "dev": true, - "license": "MIT", "dependencies": { - "debug": "^4.3.4" + "debug": "4" }, "engines": { - "node": ">= 14" + "node": ">= 6.0.0" } }, "node_modules/agentkeepalive": { "version": "4.5.0", + "resolved": "https://registry.npmjs.org/agentkeepalive/-/agentkeepalive-4.5.0.tgz", + "integrity": "sha512-5GG/5IbQQpC9FpkRGsSvZI5QYeSCzlJHdpBQntCsuTOxhKD8lqKhrleg2Yi7yvMIf82Ycmmqln9U8V9qwEiJew==", "dev": true, - "license": "MIT", "dependencies": { "humanize-ms": "^1.2.1" }, @@ -4619,8 +5469,9 @@ }, "node_modules/aggregate-error": { "version": "3.1.0", + "resolved": "https://registry.npmjs.org/aggregate-error/-/aggregate-error-3.1.0.tgz", + "integrity": "sha512-4I7Td01quW/RpocfNayFdFVk1qSuoh0E7JrbRJ16nH01HhKFQ88INq9Sd+nd72zqRySlr9BmDA8xlEJ6vJMrYA==", "dev": true, - "license": "MIT", "dependencies": { "clean-stack": "^2.0.0", "indent-string": "^4.0.0" @@ -4631,8 +5482,9 @@ }, "node_modules/ajv": { "version": "6.12.6", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz", + "integrity": "sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==", "dev": true, - "license": "MIT", "dependencies": { "fast-deep-equal": "^3.1.1", "fast-json-stable-stringify": "^2.0.0", @@ -4646,16 +5498,18 @@ }, "node_modules/ansi-colors": { "version": "4.1.3", + "resolved": "https://registry.npmjs.org/ansi-colors/-/ansi-colors-4.1.3.tgz", + "integrity": "sha512-/6w/C21Pm1A7aZitlI5Ni/2J6FFQN8i1Cvz3kHABAAbw93v/NlvKdVOqz7CCWz/3iv/JplRSEEZ83XION15ovw==", "dev": true, - "license": "MIT", "engines": { "node": ">=6" } }, "node_modules/ansi-escapes": { "version": "4.3.2", + "resolved": "https://registry.npmjs.org/ansi-escapes/-/ansi-escapes-4.3.2.tgz", + "integrity": "sha512-gKXj5ALrKWQLsYG9jlTRmR/xKluxHV+Z9QEwNIgCfM1/uwPMCuzVVnh5mwTd+OuBZcwSIMbqssNWRm1lE51QaQ==", "dev": true, - "license": "MIT", "dependencies": { "type-fest": "^0.21.3" }, @@ -4668,8 +5522,9 @@ }, "node_modules/ansi-escapes/node_modules/type-fest": { "version": "0.21.3", + "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.21.3.tgz", + "integrity": "sha512-t0rzBq87m3fVcduHDUFhKmyyX+9eo6WQjZvf51Ea/M0Q7+T374Jp1aUiyUl0GKxp8M/OETVHSDvmkyPgvX+X2w==", "dev": true, - "license": "(MIT OR CC0-1.0)", "engines": { "node": ">=10" }, @@ -4679,21 +5534,24 @@ }, "node_modules/ansi-regex": { "version": "5.0.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", + "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", "dev": true, - "license": "MIT", "engines": { "node": ">=8" } }, "node_modules/ansi-sequence-parser": { "version": "1.1.1", - "dev": true, - "license": "MIT" + "resolved": "https://registry.npmjs.org/ansi-sequence-parser/-/ansi-sequence-parser-1.1.1.tgz", + "integrity": "sha512-vJXt3yiaUL4UU546s3rPXlsry/RnM730G1+HkpKE012AN0sx1eOrxSu95oKDIonskeLTijMgqWZ3uDEe3NFvyg==", + "dev": true }, "node_modules/ansi-styles": { "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", "dev": true, - "license": "MIT", "dependencies": { "color-convert": "^2.0.1" }, @@ -4706,8 +5564,9 @@ }, "node_modules/anymatch": { "version": "3.1.3", + "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-3.1.3.tgz", + "integrity": "sha512-KMReFUr0B4t+D+OBkjR3KYqvocp2XaSzO55UcB6mgQMd3KbcE+mWTyvVV7D/zsdEbNnV6acZUutkiHQXvTr1Rw==", "dev": true, - "license": "ISC", "dependencies": { "normalize-path": "^3.0.0", "picomatch": "^2.0.4" @@ -4718,13 +5577,15 @@ }, "node_modules/aproba": { "version": "2.0.0", - "dev": true, - "license": "ISC" + "resolved": "https://registry.npmjs.org/aproba/-/aproba-2.0.0.tgz", + "integrity": "sha512-lYe4Gx7QT+MKGbDsA+Z+he/Wtef0BiwDOlK/XkBrdfsh9J/jPPXbX0tE9x9cl27Tmu5gg3QUbUrQYa/y+KOHPQ==", + "dev": true }, "node_modules/are-we-there-yet": { "version": "3.0.1", + "resolved": "https://registry.npmjs.org/are-we-there-yet/-/are-we-there-yet-3.0.1.tgz", + "integrity": "sha512-QZW4EDmGwlYur0Yyf/b2uGucHQMa8aFUP7eu9ddR73vvhFyt4V0Vl3QHPcTNJ8l6qYOBdxgXdnBXQrHilfRQBg==", "dev": true, - "license": "ISC", "dependencies": { "delegates": "^1.0.0", "readable-stream": "^3.6.0" @@ -4735,24 +5596,24 @@ }, "node_modules/arg": { "version": "4.1.3", - "dev": true, - "license": "MIT" + "resolved": "https://registry.npmjs.org/arg/-/arg-4.1.3.tgz", + "integrity": "sha512-58S9QDqG0Xx27YwPSt9fJxivjYl432YCwfDMfZ+71RAqUrZef7LrKQZ3LHLOwCS4FLNBplP533Zx895SeOCHvA==", + "dev": true }, "node_modules/argparse": { "version": "2.0.1", - "dev": true, - "license": "Python-2.0" + "resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz", + "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==", + "dev": true }, "node_modules/array-buffer-byte-length": { - "version": "1.0.1", + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/array-buffer-byte-length/-/array-buffer-byte-length-1.0.0.tgz", + "integrity": "sha512-LPuwb2P+NrQw3XhxGc36+XSvuBPopovXYTR9Ew++Du9Yb/bx5AzBfrIsBoj0EZUifjQU+sHL21sseZ3jerWO/A==", "dev": true, - "license": "MIT", "dependencies": { - "call-bind": "^1.0.5", - "is-array-buffer": "^3.0.4" - }, - "engines": { - "node": ">= 0.4" + "call-bind": "^1.0.2", + "is-array-buffer": "^3.0.1" }, "funding": { "url": "https://github.com/sponsors/ljharb" @@ -4760,21 +5621,24 @@ }, "node_modules/array-differ": { "version": "3.0.0", + "resolved": "https://registry.npmjs.org/array-differ/-/array-differ-3.0.0.tgz", + "integrity": "sha512-THtfYS6KtME/yIAhKjZ2ul7XI96lQGHRputJQHO80LAWQnuGP4iCIN8vdMRboGbIEYBwU33q8Tch1os2+X0kMg==", "dev": true, - "license": "MIT", "engines": { "node": ">=8" } }, "node_modules/array-ify": { "version": "1.0.0", - "dev": true, - "license": "MIT" + "resolved": "https://registry.npmjs.org/array-ify/-/array-ify-1.0.0.tgz", + "integrity": "sha512-c5AMf34bKdvPhQ7tBGhqkgKNUzMr4WUs+WDtC2ZUGOUncbxKMTvqxYctiseW3+L4bA8ec+GcZ6/A/FW4m8ukng==", + "dev": true }, "node_modules/array-includes": { "version": "3.1.7", + "resolved": "https://registry.npmjs.org/array-includes/-/array-includes-3.1.7.tgz", + "integrity": "sha512-dlcsNBIiWhPkHdOEEKnehA+RNUWDc4UqFtnIXU4uuYDPtA4LDkr7qip2p0VvFAEXNDr0yWZ9PJyIRiGjRLQzwQ==", "dev": true, - "license": "MIT", "dependencies": { "call-bind": "^1.0.2", "define-properties": "^1.2.0", @@ -4791,40 +5655,24 @@ }, "node_modules/array-union": { "version": "2.1.0", + "resolved": "https://registry.npmjs.org/array-union/-/array-union-2.1.0.tgz", + "integrity": "sha512-HGyxoOTYUyCM6stUe6EJgnd4EoewAI7zMdfqO+kGjnlZmBDz/cR5pf8r/cR4Wq60sL/p0IkcjUEEPwS3GFrIyw==", "dev": true, - "license": "MIT", "engines": { "node": ">=8" } }, - "node_modules/array.prototype.filter": { - "version": "1.0.3", + "node_modules/array.prototype.findlastindex": { + "version": "1.2.3", + "resolved": "https://registry.npmjs.org/array.prototype.findlastindex/-/array.prototype.findlastindex-1.2.3.tgz", + "integrity": "sha512-LzLoiOMAxvy+Gd3BAq3B7VeIgPdo+Q8hthvKtXybMvRV0jrXfJM/t8mw7nNlpEcVlVUnCnM2KSX4XU5HmpodOA==", "dev": true, - "license": "MIT", "dependencies": { "call-bind": "^1.0.2", "define-properties": "^1.2.0", "es-abstract": "^1.22.1", - "es-array-method-boxes-properly": "^1.0.0", - "is-string": "^1.0.7" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/array.prototype.findlastindex": { - "version": "1.2.4", - "dev": true, - "license": "MIT", - "dependencies": { - "call-bind": "^1.0.5", - "define-properties": "^1.2.1", - "es-abstract": "^1.22.3", - "es-errors": "^1.3.0", - "es-shim-unscopables": "^1.0.2" + "es-shim-unscopables": "^1.0.0", + "get-intrinsic": "^1.2.1" }, "engines": { "node": ">= 0.4" @@ -4835,8 +5683,9 @@ }, "node_modules/array.prototype.flat": { "version": "1.3.2", + "resolved": "https://registry.npmjs.org/array.prototype.flat/-/array.prototype.flat-1.3.2.tgz", + "integrity": "sha512-djYB+Zx2vLewY8RWlNCUdHjDXs2XOgm602S9E7P/UpHgfeHL00cRiIF+IN/G/aUJ7kGPb6yO/ErDI5V2s8iycA==", "dev": true, - "license": "MIT", "dependencies": { "call-bind": "^1.0.2", "define-properties": "^1.2.0", @@ -4852,8 +5701,9 @@ }, "node_modules/array.prototype.flatmap": { "version": "1.3.2", + "resolved": "https://registry.npmjs.org/array.prototype.flatmap/-/array.prototype.flatmap-1.3.2.tgz", + "integrity": "sha512-Ewyx0c9PmpcsByhSW4r+9zDU7sGjFc86qf/kKtuSCRdhfbk0SNLLkaT5qvcHnRGgc5NP/ly/y+qkXkqONX54CQ==", "dev": true, - "license": "MIT", "dependencies": { "call-bind": "^1.0.2", "define-properties": "^1.2.0", @@ -4868,17 +5718,17 @@ } }, "node_modules/arraybuffer.prototype.slice": { - "version": "1.0.3", + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/arraybuffer.prototype.slice/-/arraybuffer.prototype.slice-1.0.2.tgz", + "integrity": "sha512-yMBKppFur/fbHu9/6USUe03bZ4knMYiwFBcyiaXB8Go0qNehwX6inYPzK9U0NeQvGxKthcmHcaR8P5MStSRBAw==", "dev": true, - "license": "MIT", "dependencies": { - "array-buffer-byte-length": "^1.0.1", - "call-bind": "^1.0.5", - "define-properties": "^1.2.1", - "es-abstract": "^1.22.3", - "es-errors": "^1.2.1", - "get-intrinsic": "^1.2.3", - "is-array-buffer": "^3.0.4", + "array-buffer-byte-length": "^1.0.0", + "call-bind": "^1.0.2", + "define-properties": "^1.2.0", + "es-abstract": "^1.22.1", + "get-intrinsic": "^1.2.1", + "is-array-buffer": "^3.0.2", "is-shared-array-buffer": "^1.0.2" }, "engines": { @@ -4890,20 +5740,23 @@ }, "node_modules/arrify": { "version": "1.0.1", + "resolved": "https://registry.npmjs.org/arrify/-/arrify-1.0.1.tgz", + "integrity": "sha512-3CYzex9M9FGQjCGMGyi6/31c8GJbgb0qGyrx5HWxPd0aCwh4cB2YjMb2Xf9UuoogrMrlO9cTqnB5rI5GHZTcUA==", "dev": true, - "license": "MIT", "engines": { "node": ">=0.10.0" } }, "node_modules/async": { "version": "3.2.5", - "dev": true, - "license": "MIT" + "resolved": "https://registry.npmjs.org/async/-/async-3.2.5.tgz", + "integrity": "sha512-baNZyqaaLhyLVKm/DlvdW051MSgO6b8eVfIezl9E5PqWxFgzLm/wQntEW4zOytVburDEr0JlALEpdOFwvErLsg==", + "dev": true }, "node_modules/async-hook-jl": { "version": "1.7.6", - "license": "MIT", + "resolved": "https://registry.npmjs.org/async-hook-jl/-/async-hook-jl-1.7.6.tgz", + "integrity": "sha512-gFaHkFfSxTjvoxDMYqDuGHlcRyUuamF8s+ZTtJdDzqjws4mCt7v0vuV79/E2Wr2/riMQgtG4/yUtXWs1gZ7JMg==", "dependencies": { "stack-chain": "^1.3.7" }, @@ -4913,20 +5766,20 @@ }, "node_modules/asynckit": { "version": "0.4.0", - "dev": true, - "license": "MIT" + "resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz", + "integrity": "sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q==", + "dev": true }, "node_modules/atomic-batcher": { "version": "1.0.2", - "license": "MIT" + "resolved": "https://registry.npmjs.org/atomic-batcher/-/atomic-batcher-1.0.2.tgz", + "integrity": "sha512-EFGCRj4kLX1dHv1cDzTk+xbjBFj1GnJDpui52YmEcxxHHEWjYyT6l51U7n6WQ28osZH4S9gSybxe56Vm7vB61Q==" }, "node_modules/available-typed-arrays": { - "version": "1.0.7", + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/available-typed-arrays/-/available-typed-arrays-1.0.5.tgz", + "integrity": "sha512-DMD0KiN46eipeziST1LPP/STfDU0sufISXmjSgvVsoU2tqxctQeASejWcfNtxYKqETM1UxQ8sp2OrSBWpHY6sw==", "dev": true, - "license": "MIT", - "dependencies": { - "possible-typed-array-names": "^1.0.0" - }, "engines": { "node": ">= 0.4" }, @@ -4936,7 +5789,8 @@ }, "node_modules/aws-cdk": { "version": "2.131.0", - "license": "Apache-2.0", + "resolved": "https://registry.npmjs.org/aws-cdk/-/aws-cdk-2.131.0.tgz", + "integrity": "sha512-ji+MwGFGC88HE/EqV6/VARBp5mu3nXIDa/GYwtGycJqu6WqXhNZXWeDH0JsWaY6+BSUdpY6pr6KWpV+MDyVkDg==", "bin": { "cdk": "bin/cdk" }, @@ -4949,6 +5803,8 @@ }, "node_modules/aws-cdk-lib": { "version": "2.131.0", + "resolved": "https://registry.npmjs.org/aws-cdk-lib/-/aws-cdk-lib-2.131.0.tgz", + "integrity": "sha512-9XLgiTgY+q0S3K93VPeJO0chIN8BZwZ3aSrILvF868Dz+0NTNrD2m5M0xGK5Rw0uoJS+N+DvGaz/2hLAiVqcBw==", "bundleDependencies": [ "@balena/dockerignore", "case", @@ -4962,7 +5818,6 @@ "yaml", "mime-types" ], - "license": "Apache-2.0", "dependencies": { "@aws-cdk/asset-awscli-v1": "^2.2.202", "@aws-cdk/asset-kubectl-v20": "^2.1.2", @@ -5308,10 +6163,10 @@ } }, "node_modules/aws-sdk": { - "version": "2.1572.0", + "version": "2.1568.0", + "resolved": "https://registry.npmjs.org/aws-sdk/-/aws-sdk-2.1568.0.tgz", + "integrity": "sha512-ECGJlhn4tnvC+MwNxGDGbhKEOwqLtmtEb3VK5s0z8pcU60Uv1b8+wRPKjqM/eJ+J4N5CL92Y5aq5xAdTquBZRQ==", "dev": true, - "hasInstallScript": true, - "license": "Apache-2.0", "dependencies": { "buffer": "4.9.2", "events": "1.1.1", @@ -5330,8 +6185,9 @@ }, "node_modules/aws-sdk-client-mock": { "version": "3.0.1", + "resolved": "https://registry.npmjs.org/aws-sdk-client-mock/-/aws-sdk-client-mock-3.0.1.tgz", + "integrity": "sha512-9VAzJLl8mz99KP9HjOm/93d8vznRRUTpJooPBOunRdUAnVYopCe9xmMuu7eVemu8fQ+w6rP7o5bBK1kAFkB2KQ==", "dev": true, - "license": "MIT", "dependencies": { "@types/sinon": "^10.0.10", "sinon": "^16.1.3", @@ -5340,8 +6196,9 @@ }, "node_modules/aws-sdk-client-mock-jest": { "version": "3.0.1", + "resolved": "https://registry.npmjs.org/aws-sdk-client-mock-jest/-/aws-sdk-client-mock-jest-3.0.1.tgz", + "integrity": "sha512-eT0i+XkvitMt7ml2LVUayVd6oiFO7SqLQBEbRId094fs2qlWlL+Png0WuOFVCIcTZgjoK5v81UnKSLwFbbpWqA==", "dev": true, - "license": "MIT", "dependencies": { "@types/jest": "^28.1.3", "tslib": "^2.1.0" @@ -5352,8 +6209,9 @@ }, "node_modules/aws-sdk-client-mock-jest/node_modules/@jest/expect-utils": { "version": "28.1.3", + "resolved": "https://registry.npmjs.org/@jest/expect-utils/-/expect-utils-28.1.3.tgz", + "integrity": "sha512-wvbi9LUrHJLn3NlDW6wF2hvIMtd4JUl2QNVrjq+IBSHirgfrR3o9RnVtxzdEGO2n9JyIWwHnLfby5KzqBGg2YA==", "dev": true, - "license": "MIT", "dependencies": { "jest-get-type": "^28.0.2" }, @@ -5363,8 +6221,9 @@ }, "node_modules/aws-sdk-client-mock-jest/node_modules/@jest/schemas": { "version": "28.1.3", + "resolved": "https://registry.npmjs.org/@jest/schemas/-/schemas-28.1.3.tgz", + "integrity": "sha512-/l/VWsdt/aBXgjshLWOFyFt3IVdYypu5y2Wn2rOO1un6nkqIn8SLXzgIMYXFyYsRWDyF5EthmKJMIdJvk08grg==", "dev": true, - "license": "MIT", "dependencies": { "@sinclair/typebox": "^0.24.1" }, @@ -5374,8 +6233,9 @@ }, "node_modules/aws-sdk-client-mock-jest/node_modules/@jest/types": { "version": "28.1.3", + "resolved": "https://registry.npmjs.org/@jest/types/-/types-28.1.3.tgz", + "integrity": "sha512-RyjiyMUZrKz/c+zlMFO1pm70DcIlST8AeWTkoUdZevew44wcNZQHsEVOiCVtgVnlFFD82FPaXycys58cf2muVQ==", "dev": true, - "license": "MIT", "dependencies": { "@jest/schemas": "^28.1.3", "@types/istanbul-lib-coverage": "^2.0.0", @@ -5390,13 +6250,15 @@ }, "node_modules/aws-sdk-client-mock-jest/node_modules/@sinclair/typebox": { "version": "0.24.51", - "dev": true, - "license": "MIT" + "resolved": "https://registry.npmjs.org/@sinclair/typebox/-/typebox-0.24.51.tgz", + "integrity": "sha512-1P1OROm/rdubP5aFDSZQILU0vrLCJ4fvHt6EoqHEM+2D/G5MK3bIaymUKLit8Js9gbns5UyJnkP/TZROLw4tUA==", + "dev": true }, "node_modules/aws-sdk-client-mock-jest/node_modules/@types/jest": { "version": "28.1.8", + "resolved": "https://registry.npmjs.org/@types/jest/-/jest-28.1.8.tgz", + "integrity": "sha512-8TJkV++s7B6XqnDrzR1m/TT0A0h948Pnl/097veySPN67VRAgQ4gZ7n2KfJo2rVq6njQjdxU3GCCyDvAeuHoiw==", "dev": true, - "license": "MIT", "dependencies": { "expect": "^28.0.0", "pretty-format": "^28.0.0" @@ -5404,8 +6266,9 @@ }, "node_modules/aws-sdk-client-mock-jest/node_modules/ansi-styles": { "version": "5.2.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-5.2.0.tgz", + "integrity": "sha512-Cxwpt2SfTzTtXcfOlzGEee8O+c+MmUgGrNiBcXnuWxuFJHe6a5Hz7qwhwe5OgaSYI0IJvkLqWX1ASG+cJOkEiA==", "dev": true, - "license": "MIT", "engines": { "node": ">=10" }, @@ -5415,16 +6278,18 @@ }, "node_modules/aws-sdk-client-mock-jest/node_modules/diff-sequences": { "version": "28.1.1", + "resolved": "https://registry.npmjs.org/diff-sequences/-/diff-sequences-28.1.1.tgz", + "integrity": "sha512-FU0iFaH/E23a+a718l8Qa/19bF9p06kgE0KipMOMadwa3SjnaElKzPaUC0vnibs6/B/9ni97s61mcejk8W1fQw==", "dev": true, - "license": "MIT", "engines": { "node": "^12.13.0 || ^14.15.0 || ^16.10.0 || >=17.0.0" } }, "node_modules/aws-sdk-client-mock-jest/node_modules/expect": { "version": "28.1.3", + "resolved": "https://registry.npmjs.org/expect/-/expect-28.1.3.tgz", + "integrity": "sha512-eEh0xn8HlsuOBxFgIss+2mX85VAS4Qy3OSkjV7rlBWljtA4oWH37glVGyOZSZvErDT/yBywZdPGwCXuTvSG85g==", "dev": true, - "license": "MIT", "dependencies": { "@jest/expect-utils": "^28.1.3", "jest-get-type": "^28.0.2", @@ -5438,8 +6303,9 @@ }, "node_modules/aws-sdk-client-mock-jest/node_modules/jest-diff": { "version": "28.1.3", + "resolved": "https://registry.npmjs.org/jest-diff/-/jest-diff-28.1.3.tgz", + "integrity": "sha512-8RqP1B/OXzjjTWkqMX67iqgwBVJRgCyKD3L9nq+6ZqJMdvjE8RgHktqZ6jNrkdMT+dJuYNI3rhQpxaz7drJHfw==", "dev": true, - "license": "MIT", "dependencies": { "chalk": "^4.0.0", "diff-sequences": "^28.1.1", @@ -5452,16 +6318,18 @@ }, "node_modules/aws-sdk-client-mock-jest/node_modules/jest-get-type": { "version": "28.0.2", + "resolved": "https://registry.npmjs.org/jest-get-type/-/jest-get-type-28.0.2.tgz", + "integrity": "sha512-ioj2w9/DxSYHfOm5lJKCdcAmPJzQXmbM/Url3rhlghrPvT3tt+7a/+oXc9azkKmLvoiXjtV83bEWqi+vs5nlPA==", "dev": true, - "license": "MIT", "engines": { "node": "^12.13.0 || ^14.15.0 || ^16.10.0 || >=17.0.0" } }, "node_modules/aws-sdk-client-mock-jest/node_modules/jest-matcher-utils": { "version": "28.1.3", + "resolved": "https://registry.npmjs.org/jest-matcher-utils/-/jest-matcher-utils-28.1.3.tgz", + "integrity": "sha512-kQeJ7qHemKfbzKoGjHHrRKH6atgxMk8Enkk2iPQ3XwO6oE/KYD8lMYOziCkeSB9G4adPM4nR1DE8Tf5JeWH6Bw==", "dev": true, - "license": "MIT", "dependencies": { "chalk": "^4.0.0", "jest-diff": "^28.1.3", @@ -5474,8 +6342,9 @@ }, "node_modules/aws-sdk-client-mock-jest/node_modules/jest-message-util": { "version": "28.1.3", + "resolved": "https://registry.npmjs.org/jest-message-util/-/jest-message-util-28.1.3.tgz", + "integrity": "sha512-PFdn9Iewbt575zKPf1286Ht9EPoJmYT7P0kY+RibeYZ2XtOr53pDLEFoTWXbd1h4JiGiWpTBC84fc8xMXQMb7g==", "dev": true, - "license": "MIT", "dependencies": { "@babel/code-frame": "^7.12.13", "@jest/types": "^28.1.3", @@ -5493,8 +6362,9 @@ }, "node_modules/aws-sdk-client-mock-jest/node_modules/jest-util": { "version": "28.1.3", + "resolved": "https://registry.npmjs.org/jest-util/-/jest-util-28.1.3.tgz", + "integrity": "sha512-XdqfpHwpcSRko/C35uLYFM2emRAltIIKZiJ9eAmhjsj0CqZMa0p1ib0R5fWIqGhn1a103DebTbpqIaP1qCQ6tQ==", "dev": true, - "license": "MIT", "dependencies": { "@jest/types": "^28.1.3", "@types/node": "*", @@ -5509,8 +6379,9 @@ }, "node_modules/aws-sdk-client-mock-jest/node_modules/pretty-format": { "version": "28.1.3", + "resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-28.1.3.tgz", + "integrity": "sha512-8gFb/To0OmxHR9+ZTb14Df2vNxdGCX8g1xWGUTqUw5TiZvcQf5sHKObd5UcPyLLyowNwDAMTF3XWOG1B6mxl1Q==", "dev": true, - "license": "MIT", "dependencies": { "@jest/schemas": "^28.1.3", "ansi-regex": "^5.0.1", @@ -5523,8 +6394,9 @@ }, "node_modules/aws-sdk/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==", "dev": true, - "license": "MIT", "dependencies": { "base64-js": "^1.0.2", "ieee754": "^1.1.4", @@ -5533,25 +6405,29 @@ }, "node_modules/aws-sdk/node_modules/ieee754": { "version": "1.1.13", - "dev": true, - "license": "BSD-3-Clause" + "resolved": "https://registry.npmjs.org/ieee754/-/ieee754-1.1.13.tgz", + "integrity": "sha512-4vf7I2LYV/HaWerSo3XmlMkp5eZ83i+/CDluXi/IGTs/O1sejBNhTtnxzmRZfvOUqj7lZjqHkeTvpgSFDlWZTg==", + "dev": true }, "node_modules/aws-sdk/node_modules/isarray": { "version": "1.0.0", - "dev": true, - "license": "MIT" + "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", + "integrity": "sha512-VLghIWNM6ELQzo7zwmcg0NmTVyWKYjvIeM83yjp0wRDTmUnrM678fQbcKBo6n2CJEF0szoG//ytg+TKla89ALQ==", + "dev": true }, "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==", "dev": true, - "license": "MIT", "bin": { "uuid": "dist/bin/uuid" } }, "node_modules/aws-xray-sdk-core": { - "version": "3.5.4", - "license": "Apache-2.0", + "version": "3.5.3", + "resolved": "https://registry.npmjs.org/aws-xray-sdk-core/-/aws-xray-sdk-core-3.5.3.tgz", + "integrity": "sha512-FxDRVvIHqf3bzj76M+LSyh/1V5cYuhn+YLRS+u6Xs6WindPMDn9j03v2PNskPgvUi7pMqU40aVhQphRX/YWTfQ==", "dependencies": { "@aws-sdk/types": "^3.4.1", "@smithy/service-error-classification": "^2.0.4", @@ -5566,8 +6442,9 @@ }, "node_modules/axios": { "version": "1.6.7", + "resolved": "https://registry.npmjs.org/axios/-/axios-1.6.7.tgz", + "integrity": "sha512-/hDJGff6/c7u0hDkvkGxR/oy6CbCs8ziCsC7SqmhjfozqiJGc8Z11wrv9z9lYfY4K8l+H9TpjcMDX0xOZmx+RA==", "dev": true, - "license": "MIT", "dependencies": { "follow-redirects": "^1.15.4", "form-data": "^4.0.0", @@ -5576,8 +6453,9 @@ }, "node_modules/babel-jest": { "version": "29.7.0", + "resolved": "https://registry.npmjs.org/babel-jest/-/babel-jest-29.7.0.tgz", + "integrity": "sha512-BrvGY3xZSwEcCzKvKsCi2GgHqDqsYkOP4/by5xCgIwGXQxIEh+8ew3gmrE1y7XRR6LHZIj6yLYnUi/mm2KXKBg==", "dev": true, - "license": "MIT", "dependencies": { "@jest/transform": "^29.7.0", "@types/babel__core": "^7.1.14", @@ -5596,8 +6474,9 @@ }, "node_modules/babel-plugin-istanbul": { "version": "6.1.1", + "resolved": "https://registry.npmjs.org/babel-plugin-istanbul/-/babel-plugin-istanbul-6.1.1.tgz", + "integrity": "sha512-Y1IQok9821cC9onCx5otgFfRm7Lm+I+wwxOx738M/WLPZ9Q42m4IG5W0FNX8WLL2gYMZo3JkuXIH2DOpWM+qwA==", "dev": true, - "license": "BSD-3-Clause", "dependencies": { "@babel/helper-plugin-utils": "^7.0.0", "@istanbuljs/load-nyc-config": "^1.0.0", @@ -5611,8 +6490,9 @@ }, "node_modules/babel-plugin-istanbul/node_modules/istanbul-lib-instrument": { "version": "5.2.1", + "resolved": "https://registry.npmjs.org/istanbul-lib-instrument/-/istanbul-lib-instrument-5.2.1.tgz", + "integrity": "sha512-pzqtp31nLv/XFOzXGuvhCb8qhjmTVo5vjVk19XE4CRlSWz0KoeJ3bw9XsA7nOp9YBf4qHjwBxkDzKcME/J29Yg==", "dev": true, - "license": "BSD-3-Clause", "dependencies": { "@babel/core": "^7.12.3", "@babel/parser": "^7.14.7", @@ -5626,16 +6506,18 @@ }, "node_modules/babel-plugin-istanbul/node_modules/semver": { "version": "6.3.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.1.tgz", + "integrity": "sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==", "dev": true, - "license": "ISC", "bin": { "semver": "bin/semver.js" } }, "node_modules/babel-plugin-jest-hoist": { "version": "29.6.3", + "resolved": "https://registry.npmjs.org/babel-plugin-jest-hoist/-/babel-plugin-jest-hoist-29.6.3.tgz", + "integrity": "sha512-ESAc/RJvGTFEzRwOTT4+lNDk/GNHMkKbNzsvT0qKRfDyyYTskxB5rnU2njIDYVxXCBHHEI1c0YwHob3WaYujOg==", "dev": true, - "license": "MIT", "dependencies": { "@babel/template": "^7.3.3", "@babel/types": "^7.3.3", @@ -5648,8 +6530,9 @@ }, "node_modules/babel-preset-current-node-syntax": { "version": "1.0.1", + "resolved": "https://registry.npmjs.org/babel-preset-current-node-syntax/-/babel-preset-current-node-syntax-1.0.1.tgz", + "integrity": "sha512-M7LQ0bxarkxQoN+vz5aJPsLBn77n8QgTFmo8WK0/44auK2xlCXrYcUxHFxgU7qW5Yzw/CjmLRK2uJzaCd7LvqQ==", "dev": true, - "license": "MIT", "dependencies": { "@babel/plugin-syntax-async-generators": "^7.8.4", "@babel/plugin-syntax-bigint": "^7.8.3", @@ -5670,8 +6553,9 @@ }, "node_modules/babel-preset-jest": { "version": "29.6.3", + "resolved": "https://registry.npmjs.org/babel-preset-jest/-/babel-preset-jest-29.6.3.tgz", + "integrity": "sha512-0B3bhxR6snWXJZtR/RliHTDPRgn1sNHOR0yVtq/IiQFyuOVjFS+wuio/R4gSNkyYmKmJB4wGZv2NZanmKmTnNA==", "dev": true, - "license": "MIT", "dependencies": { "babel-plugin-jest-hoist": "^29.6.3", "babel-preset-current-node-syntax": "^1.0.0" @@ -5685,11 +6569,14 @@ }, "node_modules/balanced-match": { "version": "1.0.2", - "dev": true, - "license": "MIT" + "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz", + "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==", + "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==", "dev": true, "funding": [ { @@ -5704,18 +6591,19 @@ "type": "consulting", "url": "https://feross.org/support" } - ], - "license": "MIT" + ] }, "node_modules/before-after-hook": { "version": "2.2.3", - "dev": true, - "license": "Apache-2.0" + "resolved": "https://registry.npmjs.org/before-after-hook/-/before-after-hook-2.2.3.tgz", + "integrity": "sha512-NzUnlZexiaH/46WDhANlyR2bXRopNg4F/zuSA3OpZnllCUgRaOF2znDioDWrmbNVsuZk6l9pMquQB38cfBZwkQ==", + "dev": true }, "node_modules/bl": { "version": "4.1.0", + "resolved": "https://registry.npmjs.org/bl/-/bl-4.1.0.tgz", + "integrity": "sha512-1W07cM9gS6DcLperZfFSj+bWLtaPGSOHWhPiGzXmvVJbRLdG82sH/Kn8EtW1VqWVA54AKf2h5k5BbnIbwF3h6w==", "dev": true, - "license": "MIT", "dependencies": { "buffer": "^5.5.0", "inherits": "^2.0.4", @@ -5724,20 +6612,23 @@ }, "node_modules/bowser": { "version": "2.11.0", - "license": "MIT" + "resolved": "https://registry.npmjs.org/bowser/-/bowser-2.11.0.tgz", + "integrity": "sha512-AlcaJBi/pqqJBIQ8U9Mcpc9i8Aqxn88Skv5d+xBX006BY5u8N3mGLHa5Lgppa7L/HfwgwLgZ6NYs+Ag6uUmJRA==" }, "node_modules/brace-expansion": { "version": "2.0.1", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz", + "integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==", "dev": true, - "license": "MIT", "dependencies": { "balanced-match": "^1.0.0" } }, "node_modules/braces": { "version": "3.0.2", + "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.2.tgz", + "integrity": "sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==", "dev": true, - "license": "MIT", "dependencies": { "fill-range": "^7.0.1" }, @@ -5746,7 +6637,9 @@ } }, "node_modules/browserslist": { - "version": "4.23.0", + "version": "4.22.2", + "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.22.2.tgz", + "integrity": "sha512-0UgcrvQmBDvZHFGdYUehrCNIazki7/lUP3kkoi/r3YB2amZbFM9J43ZRkJTXBUZK4gmx56+Sqk9+Vs9mwZx9+A==", "dev": true, "funding": [ { @@ -5762,10 +6655,9 @@ "url": "https://github.com/sponsors/ai" } ], - "license": "MIT", "dependencies": { - "caniuse-lite": "^1.0.30001587", - "electron-to-chromium": "^1.4.668", + "caniuse-lite": "^1.0.30001565", + "electron-to-chromium": "^1.4.601", "node-releases": "^2.0.14", "update-browserslist-db": "^1.0.13" }, @@ -5778,8 +6670,9 @@ }, "node_modules/bs-logger": { "version": "0.2.6", + "resolved": "https://registry.npmjs.org/bs-logger/-/bs-logger-0.2.6.tgz", + "integrity": "sha512-pd8DCoxmbgc7hyPKOvxtqNcjYoOsABPQdcCUjGp3d42VR2CX1ORhk2A87oqqu5R1kk+76nsxZupkmyd+MVtCog==", "dev": true, - "license": "MIT", "dependencies": { "fast-json-stable-stringify": "2.x" }, @@ -5789,14 +6682,17 @@ }, "node_modules/bser": { "version": "2.1.1", + "resolved": "https://registry.npmjs.org/bser/-/bser-2.1.1.tgz", + "integrity": "sha512-gQxTNE/GAfIIrmHLUE3oJyp5FO6HRBfhjnw4/wMmA63ZGDJnWBmgY/lyQBpnDUkGmAhbSe39tx2d/iTOAfglwQ==", "dev": true, - "license": "Apache-2.0", "dependencies": { "node-int64": "^0.4.0" } }, "node_modules/buffer": { "version": "5.7.1", + "resolved": "https://registry.npmjs.org/buffer/-/buffer-5.7.1.tgz", + "integrity": "sha512-EHcyIPBQ4BSGlvjB16k5KgAJ27CIsHY/2JBmCRReo48y9rQ3MaUzWX3KVlBa4U7MyX02HdVj0K7C3WaB3ju7FQ==", "dev": true, "funding": [ { @@ -5812,7 +6708,6 @@ "url": "https://feross.org/support" } ], - "license": "MIT", "dependencies": { "base64-js": "^1.3.1", "ieee754": "^1.1.13" @@ -5820,28 +6715,32 @@ }, "node_modules/buffer-from": { "version": "1.1.2", - "license": "MIT" + "resolved": "https://registry.npmjs.org/buffer-from/-/buffer-from-1.1.2.tgz", + "integrity": "sha512-E+XQCRwSbaaiChtv6k6Dwgc+bx+Bs6vuKJHHl5kox/BaKbhiXzqQOwK4cO22yElGp2OCmjwVhT3HmxgyPGnJfQ==" }, "node_modules/builtins": { "version": "5.0.1", + "resolved": "https://registry.npmjs.org/builtins/-/builtins-5.0.1.tgz", + "integrity": "sha512-qwVpFEHNfhYJIzNRBvd2C1kyo6jz3ZSMPyyuR47OPdiKWlbYnZNyDWuyR175qDnAJLiCo5fBBqPb3RiXgWlkOQ==", "dev": true, - "license": "MIT", "dependencies": { "semver": "^7.0.0" } }, "node_modules/byte-size": { "version": "8.1.1", + "resolved": "https://registry.npmjs.org/byte-size/-/byte-size-8.1.1.tgz", + "integrity": "sha512-tUkzZWK0M/qdoLEqikxBWe4kumyuwjl3HO6zHTr4yEI23EojPtLYXdG1+AQY7MN0cGyNDvEaJ8wiYQm6P2bPxg==", "dev": true, - "license": "MIT", "engines": { "node": ">=12.17" } }, "node_modules/cacache": { "version": "18.0.2", + "resolved": "https://registry.npmjs.org/cacache/-/cacache-18.0.2.tgz", + "integrity": "sha512-r3NU8h/P+4lVUHfeRw1dtgQYar3DZMm4/cm2bZgOvrFC/su7budSOeqh52VJIC4U4iG1WWwV6vRW0znqBvxNuw==", "dev": true, - "license": "ISC", "dependencies": { "@npmcli/fs": "^3.1.0", "fs-minipass": "^3.0.0", @@ -5860,10 +6759,23 @@ "node": "^16.14.0 || >=18.0.0" } }, + "node_modules/cacache/node_modules/fs-minipass": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/fs-minipass/-/fs-minipass-3.0.3.tgz", + "integrity": "sha512-XUBA9XClHbnJWSfBzjkm6RvPsyg3sryZt06BEQoXcF7EK/xpGaQYJgQKDJSUH5SGZ76Y7pFx1QBnXz09rU5Fbw==", + "dev": true, + "dependencies": { + "minipass": "^7.0.3" + }, + "engines": { + "node": "^14.17.0 || ^16.13.0 || >=18.0.0" + } + }, "node_modules/cacache/node_modules/glob": { "version": "10.3.10", + "resolved": "https://registry.npmjs.org/glob/-/glob-10.3.10.tgz", + "integrity": "sha512-fa46+tv1Ak0UPK1TOy/pZrIybNNt4HCv7SDzwyfiOZkvZLEbjsZkJBPtDHVshZjbecAoAGSC20MjLDG/qr679g==", "dev": true, - "license": "ISC", "dependencies": { "foreground-child": "^3.1.0", "jackspeak": "^2.3.5", @@ -5883,16 +6795,39 @@ }, "node_modules/cacache/node_modules/lru-cache": { "version": "10.2.0", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-10.2.0.tgz", + "integrity": "sha512-2bIM8x+VAf6JT4bKAljS1qUWgMsqZRPGJS6FSahIMPVvctcNhyVp7AJu7quxOW9jwkryBReKZY5tY5JYv2n/7Q==", "dev": true, - "license": "ISC", "engines": { "node": "14 || >=16.14" } }, + "node_modules/cacache/node_modules/minipass": { + "version": "7.0.4", + "resolved": "https://registry.npmjs.org/minipass/-/minipass-7.0.4.tgz", + "integrity": "sha512-jYofLM5Dam9279rdkWzqHozUo4ybjdZmCsDHePy5V/PbBcVMiSZR97gmAy45aqi8CK1lG2ECd356FU86avfwUQ==", + "dev": true, + "engines": { + "node": ">=16 || 14 >=14.17" + } + }, + "node_modules/cacache/node_modules/minipass-collect": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/minipass-collect/-/minipass-collect-2.0.1.tgz", + "integrity": "sha512-D7V8PO9oaz7PWGLbCACuI1qEOsq7UKfLotx/C0Aet43fCUB/wfQ7DYeq2oR/svFJGYDHPr38SHATeaj/ZoKHKw==", + "dev": true, + "dependencies": { + "minipass": "^7.0.3" + }, + "engines": { + "node": ">=16 || 14 >=14.17" + } + }, "node_modules/cacache/node_modules/ssri": { "version": "10.0.5", + "resolved": "https://registry.npmjs.org/ssri/-/ssri-10.0.5.tgz", + "integrity": "sha512-bSf16tAFkGeRlUNDjXu8FzaMQt6g2HZJrun7mtMbIPOddxt3GLMSz5VWUWcqTJUPfLEaDIepGxv+bYQW49596A==", "dev": true, - "license": "ISC", "dependencies": { "minipass": "^7.0.3" }, @@ -5901,18 +6836,14 @@ } }, "node_modules/call-bind": { - "version": "1.0.7", + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/call-bind/-/call-bind-1.0.5.tgz", + "integrity": "sha512-C3nQxfFZxFRVoJoGKKI8y3MOEo129NQ+FgQ08iye+Mk4zNZZGdjfs06bVTr+DBSlA66Q2VEcMki/cUCP4SercQ==", "dev": true, - "license": "MIT", "dependencies": { - "es-define-property": "^1.0.0", - "es-errors": "^1.3.0", "function-bind": "^1.1.2", - "get-intrinsic": "^1.2.4", - "set-function-length": "^1.2.1" - }, - "engines": { - "node": ">= 0.4" + "get-intrinsic": "^1.2.1", + "set-function-length": "^1.1.1" }, "funding": { "url": "https://github.com/sponsors/ljharb" @@ -5920,24 +6851,27 @@ }, "node_modules/callsites": { "version": "3.1.0", + "resolved": "https://registry.npmjs.org/callsites/-/callsites-3.1.0.tgz", + "integrity": "sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ==", "dev": true, - "license": "MIT", "engines": { "node": ">=6" } }, "node_modules/camelcase": { "version": "5.3.1", + "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-5.3.1.tgz", + "integrity": "sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg==", "dev": true, - "license": "MIT", "engines": { "node": ">=6" } }, "node_modules/camelcase-keys": { "version": "6.2.2", + "resolved": "https://registry.npmjs.org/camelcase-keys/-/camelcase-keys-6.2.2.tgz", + "integrity": "sha512-YrwaA0vEKazPBkn0ipTiMpSajYDSe+KjQfrjhcBMxJt/znbvlHd8Pw/Vamaz5EB4Wfhs3SUR3Z9mwRu/P3s3Yg==", "dev": true, - "license": "MIT", "dependencies": { "camelcase": "^5.3.1", "map-obj": "^4.0.0", @@ -5951,7 +6885,9 @@ } }, "node_modules/caniuse-lite": { - "version": "1.0.30001596", + "version": "1.0.30001577", + "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001577.tgz", + "integrity": "sha512-rs2ZygrG1PNXMfmncM0B5H1hndY5ZCC9b5TkFaVNfZ+AUlyqcMyVIQtc3fsezi0NUCk5XZfDf9WS6WxMxnfdrg==", "dev": true, "funding": [ { @@ -5966,8 +6902,7 @@ "type": "github", "url": "https://github.com/sponsors/ai" } - ], - "license": "CC-BY-4.0" + ] }, "node_modules/cdk-sample": { "resolved": "examples/cdk", @@ -5975,12 +6910,14 @@ }, "node_modules/centra": { "version": "2.6.0", - "license": "MIT" + "resolved": "https://registry.npmjs.org/centra/-/centra-2.6.0.tgz", + "integrity": "sha512-dgh+YleemrT8u85QL11Z6tYhegAs3MMxsaWAq/oXeAmYJ7VxL3SI9TZtnfaEvNDMAPolj25FXIb3S+HCI4wQaQ==" }, "node_modules/chalk": { "version": "4.1.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", + "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", "dev": true, - "license": "MIT", "dependencies": { "ansi-styles": "^4.1.0", "supports-color": "^7.1.0" @@ -5994,27 +6931,32 @@ }, "node_modules/char-regex": { "version": "1.0.2", + "resolved": "https://registry.npmjs.org/char-regex/-/char-regex-1.0.2.tgz", + "integrity": "sha512-kWWXztvZ5SBQV+eRgKFeh8q5sLuZY2+8WUIzlxWVTg+oGwY14qylx1KbKzHd8P6ZYkAg0xyIDU9JMHhyJMZ1jw==", "dev": true, - "license": "MIT", "engines": { "node": ">=10" } }, "node_modules/chardet": { "version": "0.7.0", - "dev": true, - "license": "MIT" + "resolved": "https://registry.npmjs.org/chardet/-/chardet-0.7.0.tgz", + "integrity": "sha512-mT8iDcrh03qDGRRmoA2hmBJnxpllMR+0/0qlzjqZES6NdiWDcZkCNAk4rPFZ9Q85r27unkiNNg8ZOiwZXBHwcA==", + "dev": true }, "node_modules/chownr": { "version": "2.0.0", + "resolved": "https://registry.npmjs.org/chownr/-/chownr-2.0.0.tgz", + "integrity": "sha512-bIomtDF5KGpdogkLd9VspvFzk9KfpyyGlS8YFVZl7TGPBHL5snIOnxeshwVgPteQ9b4Eydl+pVbIyE1DcvCWgQ==", "dev": true, - "license": "ISC", "engines": { "node": ">=10" } }, "node_modules/ci-info": { "version": "3.9.0", + "resolved": "https://registry.npmjs.org/ci-info/-/ci-info-3.9.0.tgz", + "integrity": "sha512-NIxF55hv4nSqQswkAeiOi1r83xy8JldOFDTWiug55KBu9Jnblncd2U6ViHmYgHf01TPZS77NJBhBMKdWj9HQMQ==", "dev": true, "funding": [ { @@ -6022,28 +6964,30 @@ "url": "https://github.com/sponsors/sibiraj-s" } ], - "license": "MIT", "engines": { "node": ">=8" } }, "node_modules/cjs-module-lexer": { "version": "1.2.3", - "dev": true, - "license": "MIT" + "resolved": "https://registry.npmjs.org/cjs-module-lexer/-/cjs-module-lexer-1.2.3.tgz", + "integrity": "sha512-0TNiGstbQmCFwt4akjjBg5pLRTSyj/PkWQ1ZoO2zntmg9yLqSRxwEa4iCfQLGjqhiqBfOJa7W/E8wfGrTDmlZQ==", + "dev": true }, "node_modules/clean-stack": { "version": "2.2.0", + "resolved": "https://registry.npmjs.org/clean-stack/-/clean-stack-2.2.0.tgz", + "integrity": "sha512-4diC9HaTE+KRAMWhDhrGOECgWZxoevMc5TlkObMqNSsVU62PYzXZ/SMTjzyGAFF1YusgxGcSWTEXBhp0CPwQ1A==", "dev": true, - "license": "MIT", "engines": { "node": ">=6" } }, "node_modules/cli-cursor": { "version": "3.1.0", + "resolved": "https://registry.npmjs.org/cli-cursor/-/cli-cursor-3.1.0.tgz", + "integrity": "sha512-I/zHAwsKf9FqGoXM4WWRACob9+SNukZTd94DWF57E4toouRulbCxcUh6RKUEOQlYTHJnzkPMySvPNaaSLNfLZw==", "dev": true, - "license": "MIT", "dependencies": { "restore-cursor": "^3.1.0" }, @@ -6053,8 +6997,9 @@ }, "node_modules/cli-spinners": { "version": "2.6.1", + "resolved": "https://registry.npmjs.org/cli-spinners/-/cli-spinners-2.6.1.tgz", + "integrity": "sha512-x/5fWmGMnbKQAaNwN+UZlV79qBLM9JFnJuJ03gIi5whrob0xV0ofNVHy9DhwGdsMJQc2OKv0oGmLzvaqvAVv+g==", "dev": true, - "license": "MIT", "engines": { "node": ">=6" }, @@ -6064,8 +7009,9 @@ }, "node_modules/cli-truncate": { "version": "4.0.0", + "resolved": "https://registry.npmjs.org/cli-truncate/-/cli-truncate-4.0.0.tgz", + "integrity": "sha512-nPdaFdQ0h/GEigbPClz11D0v/ZJEwxmeVZGeMo3Z5StPtUTkA9o1lD6QwoirYiSDzbcwn2XcjwmCp68W1IS4TA==", "dev": true, - "license": "MIT", "dependencies": { "slice-ansi": "^5.0.0", "string-width": "^7.0.0" @@ -6079,8 +7025,9 @@ }, "node_modules/cli-truncate/node_modules/ansi-regex": { "version": "6.0.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-6.0.1.tgz", + "integrity": "sha512-n5M855fKb2SsfMIiFFoVrABHJC8QtHwVx+mHWP3QcEqBHYienj5dHSgjbxtC0WEZXYt4wcD6zrQElDPhFuZgfA==", "dev": true, - "license": "MIT", "engines": { "node": ">=12" }, @@ -6090,13 +7037,15 @@ }, "node_modules/cli-truncate/node_modules/emoji-regex": { "version": "10.3.0", - "dev": true, - "license": "MIT" + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-10.3.0.tgz", + "integrity": "sha512-QpLs9D9v9kArv4lfDEgg1X/gN5XLnf/A6l9cs8SPZLRZR3ZkY9+kwIQTxm+fsSej5UMYGE8fdoaZVIBlqG0XTw==", + "dev": true }, "node_modules/cli-truncate/node_modules/string-width": { "version": "7.1.0", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-7.1.0.tgz", + "integrity": "sha512-SEIJCWiX7Kg4c129n48aDRwLbFb2LJmXXFrWBG4NGaRtMQ3myKPKbwrD1BKqQn74oCoNMBVrfDEr5M9YxCsrkw==", "dev": true, - "license": "MIT", "dependencies": { "emoji-regex": "^10.3.0", "get-east-asian-width": "^1.0.0", @@ -6111,8 +7060,9 @@ }, "node_modules/cli-truncate/node_modules/strip-ansi": { "version": "7.1.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-7.1.0.tgz", + "integrity": "sha512-iq6eVVI64nQQTRYq2KtEg2d2uU7LElhTJwsH4YzIHZshxlgZms/wIc4VoDQTlG/IvVIrBKG06CrZnp0qv7hkcQ==", "dev": true, - "license": "MIT", "dependencies": { "ansi-regex": "^6.0.1" }, @@ -6125,16 +7075,18 @@ }, "node_modules/cli-width": { "version": "3.0.0", + "resolved": "https://registry.npmjs.org/cli-width/-/cli-width-3.0.0.tgz", + "integrity": "sha512-FxqpkPPwu1HjuN93Omfm4h8uIanXofW0RxVEW3k5RKx+mJJYSthzNhp32Kzxxy3YAEZ/Dc/EWN1vZRY0+kOhbw==", "dev": true, - "license": "ISC", "engines": { "node": ">= 10" } }, "node_modules/cliui": { "version": "8.0.1", + "resolved": "https://registry.npmjs.org/cliui/-/cliui-8.0.1.tgz", + "integrity": "sha512-BSeNnyus75C4//NQ9gQt1/csTXyo/8Sb+afLAkzAptFuMsod9HFokGNudZpi/oQV73hnVK+sR+5PVRMd+Dr7YQ==", "dev": true, - "license": "ISC", "dependencies": { "string-width": "^4.2.0", "strip-ansi": "^6.0.1", @@ -6146,8 +7098,9 @@ }, "node_modules/cliui/node_modules/wrap-ansi": { "version": "7.0.0", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz", + "integrity": "sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==", "dev": true, - "license": "MIT", "dependencies": { "ansi-styles": "^4.0.0", "string-width": "^4.1.0", @@ -6162,16 +7115,18 @@ }, "node_modules/clone": { "version": "1.0.4", + "resolved": "https://registry.npmjs.org/clone/-/clone-1.0.4.tgz", + "integrity": "sha512-JQHZ2QMW6l3aH/j6xCqQThY/9OH4D/9ls34cgkUBiEeocRTU04tHfKPBsUK1PqZCUQM7GiA0IIXJSuXHI64Kbg==", "dev": true, - "license": "MIT", "engines": { "node": ">=0.8" } }, "node_modules/clone-deep": { "version": "4.0.1", + "resolved": "https://registry.npmjs.org/clone-deep/-/clone-deep-4.0.1.tgz", + "integrity": "sha512-neHB9xuzh/wk0dIHweyAXv2aPGZIVk3pLMe+/RNzINf17fe0OG96QroktYAUm7SM1PBnzTabaLboqqxDyMU+SQ==", "dev": true, - "license": "MIT", "dependencies": { "is-plain-object": "^2.0.4", "kind-of": "^6.0.2", @@ -6183,8 +7138,9 @@ }, "node_modules/clone-deep/node_modules/is-plain-object": { "version": "2.0.4", + "resolved": "https://registry.npmjs.org/is-plain-object/-/is-plain-object-2.0.4.tgz", + "integrity": "sha512-h5PpgXkWitc38BBMYawTYMWJHFZJVnBquFE57xFpjB8pJFiF6gZ+bU+WyI/yqXiFR5mdLsgYNaPe8uao6Uv9Og==", "dev": true, - "license": "MIT", "dependencies": { "isobject": "^3.0.1" }, @@ -6194,7 +7150,8 @@ }, "node_modules/cls-hooked": { "version": "4.2.2", - "license": "BSD-2-Clause", + "resolved": "https://registry.npmjs.org/cls-hooked/-/cls-hooked-4.2.2.tgz", + "integrity": "sha512-J4Xj5f5wq/4jAvcdgoGsL3G103BtWpZrMo8NEinRltN+xpTZdI+M38pyQqhuFU/P792xkMFvnKSf+Lm81U1bxw==", "dependencies": { "async-hook-jl": "^1.7.6", "emitter-listener": "^1.0.1", @@ -6206,23 +7163,26 @@ }, "node_modules/cls-hooked/node_modules/semver": { "version": "5.7.2", - "license": "ISC", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.2.tgz", + "integrity": "sha512-cBznnQ9KjJqU67B52RMC65CMarK2600WFnbkcaiwWq3xy/5haFJlshgnpjovMVJ+Hff49d8GEn0b87C5pDQ10g==", "bin": { "semver": "bin/semver" } }, "node_modules/cmd-shim": { "version": "6.0.1", + "resolved": "https://registry.npmjs.org/cmd-shim/-/cmd-shim-6.0.1.tgz", + "integrity": "sha512-S9iI9y0nKR4hwEQsVWpyxld/6kRfGepGfzff83FcaiEBpmvlbA2nnGe7Cylgrx2f/p1P5S5wpRm9oL8z1PbS3Q==", "dev": true, - "license": "ISC", "engines": { "node": "^14.17.0 || ^16.13.0 || >=18.0.0" } }, "node_modules/co": { "version": "4.6.0", + "resolved": "https://registry.npmjs.org/co/-/co-4.6.0.tgz", + "integrity": "sha512-QVb0dM5HvG+uaxitm8wONl7jltx8dqhfU33DcqtOZcLSVIKSDDLDi7+0LbAKiyI8hD9u42m2YxXSkMGWThaecQ==", "dev": true, - "license": "MIT", "engines": { "iojs": ">= 1.0.0", "node": ">= 0.12.0" @@ -6230,13 +7190,15 @@ }, "node_modules/collect-v8-coverage": { "version": "1.0.2", - "dev": true, - "license": "MIT" + "resolved": "https://registry.npmjs.org/collect-v8-coverage/-/collect-v8-coverage-1.0.2.tgz", + "integrity": "sha512-lHl4d5/ONEbLlJvaJNtsF/Lz+WvB07u2ycqTYbdrq7UypDXailES4valYb2eWiJFxZlVmpGekfqoxQhzyFdT4Q==", + "dev": true }, "node_modules/color-convert": { "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", "dev": true, - "license": "MIT", "dependencies": { "color-name": "~1.1.4" }, @@ -6246,26 +7208,30 @@ }, "node_modules/color-name": { "version": "1.1.4", - "dev": true, - "license": "MIT" + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", + "dev": true }, "node_modules/color-support": { "version": "1.1.3", + "resolved": "https://registry.npmjs.org/color-support/-/color-support-1.1.3.tgz", + "integrity": "sha512-qiBjkpbMLO/HL68y+lh4q0/O1MZFj2RX6X/KmMa3+gJD3z+WwI1ZzDHysvqHGS3mP6mznPckpXmw1nI9cJjyRg==", "dev": true, - "license": "ISC", "bin": { "color-support": "bin.js" } }, "node_modules/colorette": { "version": "2.0.20", - "dev": true, - "license": "MIT" + "resolved": "https://registry.npmjs.org/colorette/-/colorette-2.0.20.tgz", + "integrity": "sha512-IfEDxwoWIjkeXL1eXcDiow4UbKjhLdq6/EuSVR9GMN7KVH3r9gQ83e73hsz1Nd1T3ijd5xv1wcWRYO+D6kCI2w==", + "dev": true }, "node_modules/columnify": { "version": "1.6.0", + "resolved": "https://registry.npmjs.org/columnify/-/columnify-1.6.0.tgz", + "integrity": "sha512-lomjuFZKfM6MSAnV9aCZC9sc0qGbmZdfygNv+nCpqVkSKdCxCklLtd16O0EILGkImHw9ZpHkAnHaB+8Zxq5W6Q==", "dev": true, - "license": "MIT", "dependencies": { "strip-ansi": "^6.0.1", "wcwidth": "^1.0.0" @@ -6276,8 +7242,9 @@ }, "node_modules/combined-stream": { "version": "1.0.8", + "resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.8.tgz", + "integrity": "sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg==", "dev": true, - "license": "MIT", "dependencies": { "delayed-stream": "~1.0.0" }, @@ -6287,16 +7254,18 @@ }, "node_modules/commander": { "version": "11.1.0", + "resolved": "https://registry.npmjs.org/commander/-/commander-11.1.0.tgz", + "integrity": "sha512-yPVavfyCcRhmorC7rWlkHn15b4wDVgVmBA7kV4QVBsF7kv/9TKJAbAXVTxvTnwP8HHKjRCJDClKbciiYS7p0DQ==", "dev": true, - "license": "MIT", "engines": { "node": ">=16" } }, "node_modules/compare-func": { "version": "2.0.0", + "resolved": "https://registry.npmjs.org/compare-func/-/compare-func-2.0.0.tgz", + "integrity": "sha512-zHig5N+tPWARooBnb0Zx1MFcdfpyJrfTJ3Y5L+IFvUm8rM74hHz66z0gw0x4tijh5CorKkKUCnW82R2vmpeCRA==", "dev": true, - "license": "MIT", "dependencies": { "array-ify": "^1.0.0", "dot-prop": "^5.1.0" @@ -6304,16 +7273,18 @@ }, "node_modules/concat-map": { "version": "0.0.1", - "dev": true, - "license": "MIT" + "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", + "integrity": "sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==", + "dev": true }, "node_modules/concat-stream": { "version": "2.0.0", + "resolved": "https://registry.npmjs.org/concat-stream/-/concat-stream-2.0.0.tgz", + "integrity": "sha512-MWufYdFw53ccGjCA+Ol7XJYpAlW6/prSMzuPOTRnJGcGzuhLn4Scrz7qf6o8bROZ514ltazcIFJZevcfbo0x7A==", "dev": true, "engines": [ "node >= 6.0" ], - "license": "MIT", "dependencies": { "buffer-from": "^1.0.0", "inherits": "^2.0.3", @@ -6323,26 +7294,31 @@ }, "node_modules/console-control-strings": { "version": "1.1.0", - "dev": true, - "license": "ISC" + "resolved": "https://registry.npmjs.org/console-control-strings/-/console-control-strings-1.1.0.tgz", + "integrity": "sha512-ty/fTekppD2fIwRvnZAVdeOiGd1c7YXEixbgJTNzqcxJWKQnjJ/V1bNEEE6hygpM3WjwHFUVK6HTjWSzV4a8sQ==", + "dev": true }, "node_modules/construct": { "version": "1.0.0", + "resolved": "https://registry.npmjs.org/construct/-/construct-1.0.0.tgz", + "integrity": "sha512-AGU/GtcAyDLIToOmzth6/dfynQq7EJuhY4t3nK6Z8aYU+k3/SHOouD1S40q2rALxZN8glMN07jdFsMdVUpomjQ==", "engines": { "node": "*" } }, "node_modules/constructs": { "version": "10.3.0", - "license": "Apache-2.0", + "resolved": "https://registry.npmjs.org/constructs/-/constructs-10.3.0.tgz", + "integrity": "sha512-vbK8i3rIb/xwZxSpTjz3SagHn1qq9BChLEfy5Hf6fB3/2eFbrwt2n9kHwQcS0CPTRBesreeAcsJfMq2229FnbQ==", "engines": { "node": ">= 16.14.0" } }, "node_modules/conventional-changelog-angular": { "version": "7.0.0", + "resolved": "https://registry.npmjs.org/conventional-changelog-angular/-/conventional-changelog-angular-7.0.0.tgz", + "integrity": "sha512-ROjNchA9LgfNMTTFSIWPzebCwOGFdgkEq45EnvvrmSLvCtAw0HSmrCs7/ty+wAeYUZyNay0YMUNYFTRL72PkBQ==", "dev": true, - "license": "ISC", "dependencies": { "compare-func": "^2.0.0" }, @@ -6352,8 +7328,9 @@ }, "node_modules/conventional-changelog-core": { "version": "5.0.1", + "resolved": "https://registry.npmjs.org/conventional-changelog-core/-/conventional-changelog-core-5.0.1.tgz", + "integrity": "sha512-Rvi5pH+LvgsqGwZPZ3Cq/tz4ty7mjijhr3qR4m9IBXNbxGGYgTVVO+duXzz9aArmHxFtwZ+LRkrNIMDQzgoY4A==", "dev": true, - "license": "MIT", "dependencies": { "add-stream": "^1.0.0", "conventional-changelog-writer": "^6.0.0", @@ -6373,16 +7350,18 @@ }, "node_modules/conventional-changelog-preset-loader": { "version": "3.0.0", + "resolved": "https://registry.npmjs.org/conventional-changelog-preset-loader/-/conventional-changelog-preset-loader-3.0.0.tgz", + "integrity": "sha512-qy9XbdSLmVnwnvzEisjxdDiLA4OmV3o8db+Zdg4WiFw14fP3B6XNz98X0swPPpkTd/pc1K7+adKgEDM1JCUMiA==", "dev": true, - "license": "MIT", "engines": { "node": ">=14" } }, "node_modules/conventional-changelog-writer": { "version": "6.0.1", + "resolved": "https://registry.npmjs.org/conventional-changelog-writer/-/conventional-changelog-writer-6.0.1.tgz", + "integrity": "sha512-359t9aHorPw+U+nHzUXHS5ZnPBOizRxfQsWT5ZDHBfvfxQOAik+yfuhKXG66CN5LEWPpMNnIMHUTCKeYNprvHQ==", "dev": true, - "license": "MIT", "dependencies": { "conventional-commits-filter": "^3.0.0", "dateformat": "^3.0.3", @@ -6401,8 +7380,9 @@ }, "node_modules/conventional-commits-filter": { "version": "3.0.0", + "resolved": "https://registry.npmjs.org/conventional-commits-filter/-/conventional-commits-filter-3.0.0.tgz", + "integrity": "sha512-1ymej8b5LouPx9Ox0Dw/qAO2dVdfpRFq28e5Y0jJEU8ZrLdy0vOSkkIInwmxErFGhg6SALro60ZrwYFVTUDo4Q==", "dev": true, - "license": "MIT", "dependencies": { "lodash.ismatch": "^4.4.0", "modify-values": "^1.0.1" @@ -6413,8 +7393,9 @@ }, "node_modules/conventional-commits-parser": { "version": "4.0.0", + "resolved": "https://registry.npmjs.org/conventional-commits-parser/-/conventional-commits-parser-4.0.0.tgz", + "integrity": "sha512-WRv5j1FsVM5FISJkoYMR6tPk07fkKT0UodruX4je86V4owk451yjXAKzKAPOs9l7y59E2viHUS9eQ+dfUA9NSg==", "dev": true, - "license": "MIT", "dependencies": { "is-text-path": "^1.0.1", "JSONStream": "^1.3.5", @@ -6430,8 +7411,9 @@ }, "node_modules/conventional-recommended-bump": { "version": "7.0.1", + "resolved": "https://registry.npmjs.org/conventional-recommended-bump/-/conventional-recommended-bump-7.0.1.tgz", + "integrity": "sha512-Ft79FF4SlOFvX4PkwFDRnaNiIVX7YbmqGU0RwccUaiGvgp3S0a8ipR2/Qxk31vclDNM+GSdJOVs2KrsUCjblVA==", "dev": true, - "license": "MIT", "dependencies": { "concat-stream": "^2.0.0", "conventional-changelog-preset-loader": "^3.0.0", @@ -6450,18 +7432,21 @@ }, "node_modules/convert-source-map": { "version": "2.0.0", - "dev": true, - "license": "MIT" + "resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-2.0.0.tgz", + "integrity": "sha512-Kvp459HrV2FEJ1CAsi1Ku+MY3kasH19TFykTz2xWmMeq6bk2NU3XXvfJ+Q61m0xktWwt+1HSYf3JZsTms3aRJg==", + "dev": true }, "node_modules/core-util-is": { "version": "1.0.3", - "dev": true, - "license": "MIT" + "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.3.tgz", + "integrity": "sha512-ZQBvi1DcpJ4GDqanjucZ2Hj3wEO5pZDS89BWbkcrvdxksJorwUDDZamX9ldFkp9aw2lmBDLgkObEA4DWNJ9FYQ==", + "dev": true }, "node_modules/cosmiconfig": { "version": "8.3.6", + "resolved": "https://registry.npmjs.org/cosmiconfig/-/cosmiconfig-8.3.6.tgz", + "integrity": "sha512-kcZ6+W5QzcJ3P1Mt+83OUv/oHFqZHIx8DuxG6eZ5RGMERoLqp4BuGjhHLYGK+Kf5XVkQvqBSmAy/nGWN3qDgEA==", "dev": true, - "license": "MIT", "dependencies": { "import-fresh": "^3.3.0", "js-yaml": "^4.1.0", @@ -6485,8 +7470,9 @@ }, "node_modules/create-jest": { "version": "29.7.0", + "resolved": "https://registry.npmjs.org/create-jest/-/create-jest-29.7.0.tgz", + "integrity": "sha512-Adz2bdH0Vq3F53KEMJOoftQFutWCukm6J24wbPWRO4k1kMY7gS7ds/uoJkNuV8wDCtWWnuwGcJwpWcih+zEW1Q==", "dev": true, - "license": "MIT", "dependencies": { "@jest/types": "^29.6.3", "chalk": "^4.0.0", @@ -6505,13 +7491,15 @@ }, "node_modules/create-require": { "version": "1.1.1", - "dev": true, - "license": "MIT" + "resolved": "https://registry.npmjs.org/create-require/-/create-require-1.1.1.tgz", + "integrity": "sha512-dcKFX3jn0MpIaXjisoRvexIJVEKzaq7z2rZKxf+MSr9TkdmHmsU4m2lcLojrj/FHl8mk5VxMmYA+ftRkP/3oKQ==", + "dev": true }, "node_modules/cross-spawn": { "version": "7.0.3", + "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.3.tgz", + "integrity": "sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w==", "dev": true, - "license": "MIT", "dependencies": { "path-key": "^3.1.0", "shebang-command": "^2.0.0", @@ -6523,24 +7511,27 @@ }, "node_modules/dargs": { "version": "7.0.0", + "resolved": "https://registry.npmjs.org/dargs/-/dargs-7.0.0.tgz", + "integrity": "sha512-2iy1EkLdlBzQGvbweYRFxmFath8+K7+AKB0TlhHWkNuH+TmovaMH/Wp7V7R4u7f4SnX3OgLsU9t1NI9ioDnUpg==", "dev": true, - "license": "MIT", "engines": { "node": ">=8" } }, "node_modules/dateformat": { "version": "3.0.3", + "resolved": "https://registry.npmjs.org/dateformat/-/dateformat-3.0.3.tgz", + "integrity": "sha512-jyCETtSl3VMZMWeRo7iY1FL19ges1t55hMo5yaam4Jrsm5EPL89UQkoQRyiI+Yf4k8r2ZpdngkV8hr1lIdjb3Q==", "dev": true, - "license": "MIT", "engines": { "node": "*" } }, "node_modules/debug": { "version": "4.3.4", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz", + "integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==", "dev": true, - "license": "MIT", "dependencies": { "ms": "2.1.2" }, @@ -6555,16 +7546,18 @@ }, "node_modules/decamelize": { "version": "1.2.0", + "resolved": "https://registry.npmjs.org/decamelize/-/decamelize-1.2.0.tgz", + "integrity": "sha512-z2S+W9X73hAUUki+N+9Za2lBlun89zigOyGrsax+KUQ6wKW4ZoWpEYBkGhQjwAjjDCkWxhY0VKEhk8wzY7F5cA==", "dev": true, - "license": "MIT", "engines": { "node": ">=0.10.0" } }, "node_modules/decamelize-keys": { "version": "1.1.1", + "resolved": "https://registry.npmjs.org/decamelize-keys/-/decamelize-keys-1.1.1.tgz", + "integrity": "sha512-WiPxgEirIV0/eIOMcnFBA3/IJZAZqKnwAwWyvvdi4lsr1WCN22nhdf/3db3DoZcUjTV2SqfzIwNyp6y2xs3nmg==", "dev": true, - "license": "MIT", "dependencies": { "decamelize": "^1.1.0", "map-obj": "^1.0.0" @@ -6578,16 +7571,18 @@ }, "node_modules/decamelize-keys/node_modules/map-obj": { "version": "1.0.1", + "resolved": "https://registry.npmjs.org/map-obj/-/map-obj-1.0.1.tgz", + "integrity": "sha512-7N/q3lyZ+LVCp7PzuxrJr4KMbBE2hW7BT7YNia330OFxIf4d3r5zVpicP2650l7CPN6RM9zOJRl3NGpqSiw3Eg==", "dev": true, - "license": "MIT", "engines": { "node": ">=0.10.0" } }, "node_modules/dedent": { "version": "1.5.1", + "resolved": "https://registry.npmjs.org/dedent/-/dedent-1.5.1.tgz", + "integrity": "sha512-+LxW+KLWxu3HW3M2w2ympwtqPrqYRzU8fqi6Fhd18fBALe15blJPI/I4+UHveMVG6lJqB4JNd4UG0S5cnVHwIg==", "dev": true, - "license": "MIT", "peerDependencies": { "babel-plugin-macros": "^3.1.0" }, @@ -6599,21 +7594,24 @@ }, "node_modules/deep-is": { "version": "0.1.4", - "dev": true, - "license": "MIT" + "resolved": "https://registry.npmjs.org/deep-is/-/deep-is-0.1.4.tgz", + "integrity": "sha512-oIPzksmTg4/MriiaYGO+okXDT7ztn/w3Eptv/+gSIdMdKsJo0u4CfYNFJPy+4SKMuCqGw2wxnA+URMg3t8a/bQ==", + "dev": true }, "node_modules/deepmerge": { "version": "4.3.1", + "resolved": "https://registry.npmjs.org/deepmerge/-/deepmerge-4.3.1.tgz", + "integrity": "sha512-3sUqbMEc77XqpdNO7FRyRog+eW3ph+GYCbj+rK+uYyRMuwsVy0rMiVtPn+QJlKFvWP/1PYpapqYn0Me2knFn+A==", "dev": true, - "license": "MIT", "engines": { "node": ">=0.10.0" } }, "node_modules/defaults": { "version": "1.0.4", + "resolved": "https://registry.npmjs.org/defaults/-/defaults-1.0.4.tgz", + "integrity": "sha512-eFuaLoy/Rxalv2kr+lqMlUnrDWV+3j4pljOIJgLIhI058IQfWJ7vXhyEIHu+HtC738klGALYxOKDO0bQP3tg8A==", "dev": true, - "license": "MIT", "dependencies": { "clone": "^1.0.2" }, @@ -6622,33 +7620,33 @@ } }, "node_modules/define-data-property": { - "version": "1.1.4", + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/define-data-property/-/define-data-property-1.1.1.tgz", + "integrity": "sha512-E7uGkTzkk1d0ByLeSc6ZsFS79Axg+m1P/VsgYsxHgiuc3tFSj+MjMIwe90FC4lOAZzNBdY7kkO2P2wKdsQ1vgQ==", "dev": true, - "license": "MIT", "dependencies": { - "es-define-property": "^1.0.0", - "es-errors": "^1.3.0", - "gopd": "^1.0.1" + "get-intrinsic": "^1.2.1", + "gopd": "^1.0.1", + "has-property-descriptors": "^1.0.0" }, "engines": { "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" } }, "node_modules/define-lazy-prop": { "version": "2.0.0", + "resolved": "https://registry.npmjs.org/define-lazy-prop/-/define-lazy-prop-2.0.0.tgz", + "integrity": "sha512-Ds09qNh8yw3khSjiJjiUInaGX9xlqZDY7JVryGxdxV7NPeuqQfplOpQ66yJFZut3jLa5zOwkXw1g9EI2uKh4Og==", "dev": true, - "license": "MIT", "engines": { "node": ">=8" } }, "node_modules/define-properties": { "version": "1.2.1", + "resolved": "https://registry.npmjs.org/define-properties/-/define-properties-1.2.1.tgz", + "integrity": "sha512-8QmQKqEASLd5nx0U1B1okLElbUuuttJ/AnYmRXbbbGDWh6uS208EjD4Xqq/I9wK7u0v6O08XhTWnt5XtEbR6Dg==", "dev": true, - "license": "MIT", "dependencies": { "define-data-property": "^1.0.1", "has-property-descriptors": "^1.0.0", @@ -6663,58 +7661,66 @@ }, "node_modules/delayed-stream": { "version": "1.0.0", + "resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz", + "integrity": "sha512-ZySD7Nf91aLB0RxL4KGrKHBXl7Eds1DAmEdcoVawXnLD7SDhpNgtuII2aAkg7a7QS41jxPSZ17p4VdGnMHk3MQ==", "dev": true, - "license": "MIT", "engines": { "node": ">=0.4.0" } }, "node_modules/delegates": { "version": "1.0.0", - "dev": true, - "license": "MIT" + "resolved": "https://registry.npmjs.org/delegates/-/delegates-1.0.0.tgz", + "integrity": "sha512-bd2L678uiWATM6m5Z1VzNCErI3jiGzt6HGY8OVICs40JQq/HALfbyNJmp0UDakEY4pMMaN0Ly5om/B1VI/+xfQ==", + "dev": true }, "node_modules/deprecation": { "version": "2.3.1", - "dev": true, - "license": "ISC" + "resolved": "https://registry.npmjs.org/deprecation/-/deprecation-2.3.1.tgz", + "integrity": "sha512-xmHIy4F3scKVwMsQ4WnVaS8bHOx0DmVwRywosKhaILI0ywMDWPtBSku2HNxRvF7jtwDRsoEwYQSfbxj8b7RlJQ==", + "dev": true }, "node_modules/detect-indent": { "version": "5.0.0", + "resolved": "https://registry.npmjs.org/detect-indent/-/detect-indent-5.0.0.tgz", + "integrity": "sha512-rlpvsxUtM0PQvy9iZe640/IWwWYyBsTApREbA1pHOpmOUIl9MkP/U4z7vTtg4Oaojvqhxt7sdufnT0EzGaR31g==", "dev": true, - "license": "MIT", "engines": { "node": ">=4" } }, "node_modules/detect-newline": { "version": "3.1.0", + "resolved": "https://registry.npmjs.org/detect-newline/-/detect-newline-3.1.0.tgz", + "integrity": "sha512-TLz+x/vEXm/Y7P7wn1EJFNLxYpUD4TgMosxY6fAVJUnJMbupHBOncxyWUG9OpTaH9EBD7uFI5LfEgmMOc54DsA==", "dev": true, - "license": "MIT", "engines": { "node": ">=8" } }, "node_modules/diff": { "version": "4.0.2", + "resolved": "https://registry.npmjs.org/diff/-/diff-4.0.2.tgz", + "integrity": "sha512-58lmxKSA4BNyLz+HHMUzlOEpg09FV+ev6ZMe3vJihgdxzgcwZ8VoEEPmALCZG9LmqfVoNMMKpttIYTVG6uDY7A==", "dev": true, - "license": "BSD-3-Clause", "engines": { "node": ">=0.3.1" } }, "node_modules/diff-sequences": { "version": "29.6.3", + "resolved": "https://registry.npmjs.org/diff-sequences/-/diff-sequences-29.6.3.tgz", + "integrity": "sha512-EjePK1srD3P08o2j4f0ExnylqRs5B9tJjcp9t1krH2qRi8CCdsYfwe9JgSLurFBWwq4uOlipzfk5fHNvwFKr8Q==", "dev": true, - "license": "MIT", "engines": { "node": "^14.15.0 || ^16.10.0 || >=18.0.0" } }, "node_modules/dir-glob": { "version": "3.0.1", + "resolved": "https://registry.npmjs.org/dir-glob/-/dir-glob-3.0.1.tgz", + "integrity": "sha512-WkrWp9GR4KXfKGYzOLmTuGVi1UWFfws377n9cc55/tb6DuqyF6pcQ5AbiHEshaDpY9v6oaSr2XCDidGmMwdzIA==", "dev": true, - "license": "MIT", "dependencies": { "path-type": "^4.0.0" }, @@ -6728,8 +7734,9 @@ }, "node_modules/doctrine": { "version": "3.0.0", + "resolved": "https://registry.npmjs.org/doctrine/-/doctrine-3.0.0.tgz", + "integrity": "sha512-yS+Q5i3hBf7GBkd4KG8a7eBNNWNGLTaEwwYWUijIYM7zrlYDM0BFXHjjPWlWZ1Rg7UaddZeIDmi9jF3HmqiQ2w==", "dev": true, - "license": "Apache-2.0", "dependencies": { "esutils": "^2.0.2" }, @@ -6739,8 +7746,9 @@ }, "node_modules/dot-prop": { "version": "5.3.0", + "resolved": "https://registry.npmjs.org/dot-prop/-/dot-prop-5.3.0.tgz", + "integrity": "sha512-QM8q3zDe58hqUqjraQOmzZ1LIH9SWQJTlEKCH4kJ2oQvLZk7RbQXvtDM2XEq3fwkV9CCvvH4LA0AV+ogFsBM2Q==", "dev": true, - "license": "MIT", "dependencies": { "is-obj": "^2.0.0" }, @@ -6750,8 +7758,9 @@ }, "node_modules/dotenv": { "version": "16.3.2", + "resolved": "https://registry.npmjs.org/dotenv/-/dotenv-16.3.2.tgz", + "integrity": "sha512-HTlk5nmhkm8F6JcdXvHIzaorzCoziNQT9mGxLPVXW8wJF1TiGSL60ZGB4gHWabHOaMmWmhvk2/lPHfnBiT78AQ==", "dev": true, - "license": "BSD-2-Clause", "engines": { "node": ">=12" }, @@ -6761,34 +7770,39 @@ }, "node_modules/dotenv-expand": { "version": "10.0.0", + "resolved": "https://registry.npmjs.org/dotenv-expand/-/dotenv-expand-10.0.0.tgz", + "integrity": "sha512-GopVGCpVS1UKH75VKHGuQFqS1Gusej0z4FyQkPdwjil2gNIv+LNsqBlboOzpJFZKVT95GkCyWJbBSdFEFUWI2A==", "dev": true, - "license": "BSD-2-Clause", "engines": { "node": ">=12" } }, "node_modules/drange": { "version": "1.1.1", + "resolved": "https://registry.npmjs.org/drange/-/drange-1.1.1.tgz", + "integrity": "sha512-pYxfDYpued//QpnLIm4Avk7rsNtAtQkUES2cwAYSvD/wd2pKD71gN2Ebj3e7klzXwjocvE8c5vx/1fxwpqmSxA==", "dev": true, - "license": "MIT", "engines": { "node": ">=4" } }, "node_modules/duplexer": { "version": "0.1.2", - "dev": true, - "license": "MIT" + "resolved": "https://registry.npmjs.org/duplexer/-/duplexer-0.1.2.tgz", + "integrity": "sha512-jtD6YG370ZCIi/9GTaJKQxWTZD045+4R4hTk/x1UyoqadyJ9x9CgSi1RlVDQF8U2sxLLSnFkCaMihqljHIWgMg==", + "dev": true }, "node_modules/eastasianwidth": { "version": "0.2.0", - "dev": true, - "license": "MIT" + "resolved": "https://registry.npmjs.org/eastasianwidth/-/eastasianwidth-0.2.0.tgz", + "integrity": "sha512-I88TYZWc9XiYHRQ4/3c5rjjfgkjhLyW2luGIheGERbNQ6OY7yTybanSpDXZa8y7VUP9YmDcYa+eyq4ca7iLqWA==", + "dev": true }, "node_modules/ejs": { "version": "3.1.9", + "resolved": "https://registry.npmjs.org/ejs/-/ejs-3.1.9.tgz", + "integrity": "sha512-rC+QVNMJWv+MtPgkt0y+0rVEIdbtxVADApW9JXrUVlzHetgcyczP/E7DJmWJ4fJCZF2cPcBk0laWO9ZHMG3DmQ==", "dev": true, - "license": "Apache-2.0", "dependencies": { "jake": "^10.8.5" }, @@ -6800,21 +7814,24 @@ } }, "node_modules/electron-to-chromium": { - "version": "1.4.695", - "dev": true, - "license": "ISC" + "version": "1.4.632", + "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.4.632.tgz", + "integrity": "sha512-JGmudTwg7yxMYvR/gWbalqqQiyu7WTFv2Xu3vw4cJHXPFxNgAk0oy8UHaer8nLF4lZJa+rNoj6GsrKIVJTV6Tw==", + "dev": true }, "node_modules/emitter-listener": { "version": "1.1.2", - "license": "BSD-2-Clause", + "resolved": "https://registry.npmjs.org/emitter-listener/-/emitter-listener-1.1.2.tgz", + "integrity": "sha512-Bt1sBAGFHY9DKY+4/2cV6izcKJUf5T7/gkdmkxzX/qv9CcGH8xSwVRW5mtX03SWJtRTWSOpzCuWN9rBFYZepZQ==", "dependencies": { "shimmer": "^1.2.0" } }, "node_modules/emittery": { "version": "0.13.1", + "resolved": "https://registry.npmjs.org/emittery/-/emittery-0.13.1.tgz", + "integrity": "sha512-DeWwawk6r5yR9jFgnDKYt4sLS0LmHJJi3ZOnb5/JdbYwj3nW+FxQnHIjhBKz8YLC7oRNPVM9NQ47I3CVx34eqQ==", "dev": true, - "license": "MIT", "engines": { "node": ">=12" }, @@ -6824,13 +7841,15 @@ }, "node_modules/emoji-regex": { "version": "8.0.0", - "dev": true, - "license": "MIT" + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", + "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==", + "dev": true }, "node_modules/encoding": { "version": "0.1.13", + "resolved": "https://registry.npmjs.org/encoding/-/encoding-0.1.13.tgz", + "integrity": "sha512-ETBauow1T35Y/WZMkio9jiM0Z5xjHHmJ4XmjZOq1l/dXz3lr2sRn87nJy20RupqSh1F2m3HHPSp8ShIPQJrJ3A==", "dev": true, - "license": "MIT", "optional": true, "dependencies": { "iconv-lite": "^0.6.2" @@ -6838,8 +7857,9 @@ }, "node_modules/encoding/node_modules/iconv-lite": { "version": "0.6.3", + "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.6.3.tgz", + "integrity": "sha512-4fCk79wshMdzMp2rH06qWrJE4iolqLhCUH+OiuIgU++RB0+94NlDL81atO7GX55uUKueo0txHNtvEyI6D7WdMw==", "dev": true, - "license": "MIT", "optional": true, "dependencies": { "safer-buffer": ">= 2.1.2 < 3.0.0" @@ -6850,16 +7870,18 @@ }, "node_modules/end-of-stream": { "version": "1.4.4", + "resolved": "https://registry.npmjs.org/end-of-stream/-/end-of-stream-1.4.4.tgz", + "integrity": "sha512-+uw1inIHVPQoaVuHzRyXd21icM+cnt4CzD5rW+NC1wjOUSTOs+Te7FOv7AhN7vS9x/oIyhLP5PR1H+phQAHu5Q==", "dev": true, - "license": "MIT", "dependencies": { "once": "^1.4.0" } }, "node_modules/enhanced-resolve": { - "version": "5.15.1", + "version": "5.15.0", + "resolved": "https://registry.npmjs.org/enhanced-resolve/-/enhanced-resolve-5.15.0.tgz", + "integrity": "sha512-LXYT42KJ7lpIKECr2mAXIaMldcNCh/7E0KBKOu4KSfkHmP+mZmSs+8V5gBAqisWBy0OO4W5Oyys0GO1Y8KtdKg==", "dev": true, - "license": "MIT", "dependencies": { "graceful-fs": "^4.2.4", "tapable": "^2.2.0" @@ -6870,8 +7892,9 @@ }, "node_modules/enquirer": { "version": "2.3.6", + "resolved": "https://registry.npmjs.org/enquirer/-/enquirer-2.3.6.tgz", + "integrity": "sha512-yjNnPr315/FjS4zIsUxYguYUPP2e1NK4d7E7ZOLiyYCcbFBiTMyID+2wvm2w6+pZ/odMA7cRkjhsPbltwBOrLg==", "dev": true, - "license": "MIT", "dependencies": { "ansi-colors": "^4.1.1" }, @@ -6881,16 +7904,18 @@ }, "node_modules/env-paths": { "version": "2.2.1", + "resolved": "https://registry.npmjs.org/env-paths/-/env-paths-2.2.1.tgz", + "integrity": "sha512-+h1lkLKhZMTYjog1VEpJNG7NZJWcuc2DDk/qsqSTRRCOXiLjeQ1d1/udrUGhqMxUgAlwKNZ0cf2uqan5GLuS2A==", "dev": true, - "license": "MIT", "engines": { "node": ">=6" } }, "node_modules/envinfo": { "version": "7.8.1", + "resolved": "https://registry.npmjs.org/envinfo/-/envinfo-7.8.1.tgz", + "integrity": "sha512-/o+BXHmB7ocbHEAs6F2EnG0ogybVVUdkRunTT2glZU9XAaGmhqskrvKwqXuDfNjEO0LZKWdejEEpnq8aM0tOaw==", "dev": true, - "license": "MIT", "bin": { "envinfo": "dist/cli.js" }, @@ -6900,63 +7925,64 @@ }, "node_modules/err-code": { "version": "2.0.3", - "dev": true, - "license": "MIT" + "resolved": "https://registry.npmjs.org/err-code/-/err-code-2.0.3.tgz", + "integrity": "sha512-2bmlRpNKBxT/CRmPOlyISQpNj+qSeYvcym/uT0Jx2bMOlKLtSy1ZmLuVxSEKKyor/N5yhvp/ZiG1oE3DEYMSFA==", + "dev": true }, "node_modules/error-ex": { "version": "1.3.2", + "resolved": "https://registry.npmjs.org/error-ex/-/error-ex-1.3.2.tgz", + "integrity": "sha512-7dFHNmqeFSEt2ZBsCriorKnn3Z2pj+fd9kmI6QoWw4//DL+icEBfc0U7qJCisqrTsKTjw4fNFy2pW9OqStD84g==", "dev": true, - "license": "MIT", "dependencies": { "is-arrayish": "^0.2.1" } }, "node_modules/es-abstract": { - "version": "1.22.5", + "version": "1.22.3", + "resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.22.3.tgz", + "integrity": "sha512-eiiY8HQeYfYH2Con2berK+To6GrK2RxbPawDkGq4UiCQQfZHb6wX9qQqkbpPqaxQFcl8d9QzZqo0tGE0VcrdwA==", "dev": true, - "license": "MIT", "dependencies": { - "array-buffer-byte-length": "^1.0.1", - "arraybuffer.prototype.slice": "^1.0.3", - "available-typed-arrays": "^1.0.7", - "call-bind": "^1.0.7", - "es-define-property": "^1.0.0", - "es-errors": "^1.3.0", - "es-set-tostringtag": "^2.0.3", + "array-buffer-byte-length": "^1.0.0", + "arraybuffer.prototype.slice": "^1.0.2", + "available-typed-arrays": "^1.0.5", + "call-bind": "^1.0.5", + "es-set-tostringtag": "^2.0.1", "es-to-primitive": "^1.2.1", "function.prototype.name": "^1.1.6", - "get-intrinsic": "^1.2.4", - "get-symbol-description": "^1.0.2", + "get-intrinsic": "^1.2.2", + "get-symbol-description": "^1.0.0", "globalthis": "^1.0.3", "gopd": "^1.0.1", - "has-property-descriptors": "^1.0.2", - "has-proto": "^1.0.3", + "has-property-descriptors": "^1.0.0", + "has-proto": "^1.0.1", "has-symbols": "^1.0.3", - "hasown": "^2.0.1", - "internal-slot": "^1.0.7", - "is-array-buffer": "^3.0.4", + "hasown": "^2.0.0", + "internal-slot": "^1.0.5", + "is-array-buffer": "^3.0.2", "is-callable": "^1.2.7", - "is-negative-zero": "^2.0.3", + "is-negative-zero": "^2.0.2", "is-regex": "^1.1.4", - "is-shared-array-buffer": "^1.0.3", + "is-shared-array-buffer": "^1.0.2", "is-string": "^1.0.7", - "is-typed-array": "^1.1.13", + "is-typed-array": "^1.1.12", "is-weakref": "^1.0.2", "object-inspect": "^1.13.1", "object-keys": "^1.1.1", - "object.assign": "^4.1.5", - "regexp.prototype.flags": "^1.5.2", - "safe-array-concat": "^1.1.0", - "safe-regex-test": "^1.0.3", + "object.assign": "^4.1.4", + "regexp.prototype.flags": "^1.5.1", + "safe-array-concat": "^1.0.1", + "safe-regex-test": "^1.0.0", "string.prototype.trim": "^1.2.8", "string.prototype.trimend": "^1.0.7", "string.prototype.trimstart": "^1.0.7", - "typed-array-buffer": "^1.0.2", - "typed-array-byte-length": "^1.0.1", - "typed-array-byte-offset": "^1.0.2", - "typed-array-length": "^1.0.5", + "typed-array-buffer": "^1.0.0", + "typed-array-byte-length": "^1.0.0", + "typed-array-byte-offset": "^1.0.0", + "typed-array-length": "^1.0.4", "unbox-primitive": "^1.0.2", - "which-typed-array": "^1.1.14" + "which-typed-array": "^1.1.13" }, "engines": { "node": ">= 0.4" @@ -6965,38 +7991,15 @@ "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/es-array-method-boxes-properly": { - "version": "1.0.0", - "dev": true, - "license": "MIT" - }, - "node_modules/es-define-property": { - "version": "1.0.0", - "dev": true, - "license": "MIT", - "dependencies": { - "get-intrinsic": "^1.2.4" - }, - "engines": { - "node": ">= 0.4" - } - }, - "node_modules/es-errors": { - "version": "1.3.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">= 0.4" - } - }, "node_modules/es-set-tostringtag": { - "version": "2.0.3", + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/es-set-tostringtag/-/es-set-tostringtag-2.0.2.tgz", + "integrity": "sha512-BuDyupZt65P9D2D2vA/zqcI3G5xRsklm5N3xCwuiy+/vKy8i0ifdsQP1sLgO4tZDSCaQUSnmC48khknGMV3D2Q==", "dev": true, - "license": "MIT", "dependencies": { - "get-intrinsic": "^1.2.4", - "has-tostringtag": "^1.0.2", - "hasown": "^2.0.1" + "get-intrinsic": "^1.2.2", + "has-tostringtag": "^1.0.0", + "hasown": "^2.0.0" }, "engines": { "node": ">= 0.4" @@ -7004,16 +8007,18 @@ }, "node_modules/es-shim-unscopables": { "version": "1.0.2", + "resolved": "https://registry.npmjs.org/es-shim-unscopables/-/es-shim-unscopables-1.0.2.tgz", + "integrity": "sha512-J3yBRXCzDu4ULnQwxyToo/OjdMx6akgVC7K6few0a7F/0wLtmKKN7I73AH5T2836UuXRqN7Qg+IIUw/+YJksRw==", "dev": true, - "license": "MIT", "dependencies": { "hasown": "^2.0.0" } }, "node_modules/es-to-primitive": { "version": "1.2.1", + "resolved": "https://registry.npmjs.org/es-to-primitive/-/es-to-primitive-1.2.1.tgz", + "integrity": "sha512-QCOllgZJtaUo9miYBcLChTUaHNjJF3PYs1VidD7AwiEj1kYxKeQTctLAezAOH5ZKRH0g2IgPn6KwB4IT8iRpvA==", "dev": true, - "license": "MIT", "dependencies": { "is-callable": "^1.1.4", "is-date-object": "^1.0.1", @@ -7028,8 +8033,9 @@ }, "node_modules/esbuild": { "version": "0.20.1", + "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.20.1.tgz", + "integrity": "sha512-OJwEgrpWm/PCMsLVWXKqvcjme3bHNpOgN7Tb6cQnR5n0TPbQx1/Xrn7rqM+wn17bYeT6MGB5sn1Bh5YiGi70nA==", "hasInstallScript": true, - "license": "MIT", "bin": { "esbuild": "bin/esbuild" }, @@ -7063,17 +8069,19 @@ } }, "node_modules/escalade": { - "version": "3.1.2", + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/escalade/-/escalade-3.1.1.tgz", + "integrity": "sha512-k0er2gUkLf8O0zKJiAhmkTnJlTvINGv7ygDNPbeIsX/TJjGJZHuh9B2UxbsaEkmlEo9MfhrSzmhIlhRlI2GXnw==", "dev": true, - "license": "MIT", "engines": { "node": ">=6" } }, "node_modules/escape-string-regexp": { "version": "4.0.0", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz", + "integrity": "sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA==", "dev": true, - "license": "MIT", "engines": { "node": ">=10" }, @@ -7083,8 +8091,9 @@ }, "node_modules/eslint": { "version": "8.57.0", + "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.57.0.tgz", + "integrity": "sha512-dZ6+mexnaTIbSBZWgou51U6OmzIhYM2VcNdtiTtI7qPNZm35Akpr0f6vtw3w1Kmn5PYo+tZVfh13WrhpS6oLqQ==", "dev": true, - "license": "MIT", "dependencies": { "@eslint-community/eslint-utils": "^4.2.0", "@eslint-community/regexpp": "^4.6.1", @@ -7137,8 +8146,9 @@ }, "node_modules/eslint-config-prettier": { "version": "9.1.0", + "resolved": "https://registry.npmjs.org/eslint-config-prettier/-/eslint-config-prettier-9.1.0.tgz", + "integrity": "sha512-NSWl5BFQWEPi1j4TjVNItzYV7dZXZ+wP6I6ZhrBGpChQhZRUaElihE9uRRkcbRnNb76UMKDF3r+WTmNcGPKsqw==", "dev": true, - "license": "MIT", "bin": { "eslint-config-prettier": "bin/cli.js" }, @@ -7148,8 +8158,9 @@ }, "node_modules/eslint-import-resolver-node": { "version": "0.3.9", + "resolved": "https://registry.npmjs.org/eslint-import-resolver-node/-/eslint-import-resolver-node-0.3.9.tgz", + "integrity": "sha512-WFj2isz22JahUv+B788TlO3N6zL3nNJGU8CcZbPZvVEkBPaJdCV4vy5wyghty5ROFbCRnm132v8BScu5/1BQ8g==", "dev": true, - "license": "MIT", "dependencies": { "debug": "^3.2.7", "is-core-module": "^2.13.0", @@ -7158,16 +8169,18 @@ }, "node_modules/eslint-import-resolver-node/node_modules/debug": { "version": "3.2.7", + "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.7.tgz", + "integrity": "sha512-CFjzYYAi4ThfiQvizrFQevTTXHtnCqWfe7x1AhgEscTz6ZbLbfoLRLPugTQyBth6f8ZERVUSyWHFD/7Wu4t1XQ==", "dev": true, - "license": "MIT", "dependencies": { "ms": "^2.1.1" } }, "node_modules/eslint-import-resolver-typescript": { "version": "3.6.1", + "resolved": "https://registry.npmjs.org/eslint-import-resolver-typescript/-/eslint-import-resolver-typescript-3.6.1.tgz", + "integrity": "sha512-xgdptdoi5W3niYeuQxKmzVDTATvLYqhpwmykwsh7f6HIOStGWEIL9iqZgQDF9u9OEzrRwR8no5q2VT+bjAujTg==", "dev": true, - "license": "ISC", "dependencies": { "debug": "^4.3.4", "enhanced-resolve": "^5.12.0", @@ -7189,9 +8202,10 @@ } }, "node_modules/eslint-module-utils": { - "version": "2.8.1", + "version": "2.8.0", + "resolved": "https://registry.npmjs.org/eslint-module-utils/-/eslint-module-utils-2.8.0.tgz", + "integrity": "sha512-aWajIYfsqCKRDgUfjEXNN/JlrzauMuSEy5sbd7WXbtW3EH6A6MpwEh42c7qD+MqQo9QMJ6fWLAeIJynx0g6OAw==", "dev": true, - "license": "MIT", "dependencies": { "debug": "^3.2.7" }, @@ -7206,16 +8220,18 @@ }, "node_modules/eslint-module-utils/node_modules/debug": { "version": "3.2.7", + "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.7.tgz", + "integrity": "sha512-CFjzYYAi4ThfiQvizrFQevTTXHtnCqWfe7x1AhgEscTz6ZbLbfoLRLPugTQyBth6f8ZERVUSyWHFD/7Wu4t1XQ==", "dev": true, - "license": "MIT", "dependencies": { "ms": "^2.1.1" } }, "node_modules/eslint-plugin-import": { "version": "2.29.1", + "resolved": "https://registry.npmjs.org/eslint-plugin-import/-/eslint-plugin-import-2.29.1.tgz", + "integrity": "sha512-BbPC0cuExzhiMo4Ff1BTVwHpjjv28C5R+btTOGaCRC7UEz801up0JadwkeSk5Ued6TG34uaczuVuH6qyy5YUxw==", "dev": true, - "license": "MIT", "dependencies": { "array-includes": "^3.1.7", "array.prototype.findlastindex": "^1.2.3", @@ -7244,8 +8260,9 @@ }, "node_modules/eslint-plugin-import/node_modules/brace-expansion": { "version": "1.1.11", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", + "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", "dev": true, - "license": "MIT", "dependencies": { "balanced-match": "^1.0.0", "concat-map": "0.0.1" @@ -7253,16 +8270,18 @@ }, "node_modules/eslint-plugin-import/node_modules/debug": { "version": "3.2.7", + "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.7.tgz", + "integrity": "sha512-CFjzYYAi4ThfiQvizrFQevTTXHtnCqWfe7x1AhgEscTz6ZbLbfoLRLPugTQyBth6f8ZERVUSyWHFD/7Wu4t1XQ==", "dev": true, - "license": "MIT", "dependencies": { "ms": "^2.1.1" } }, "node_modules/eslint-plugin-import/node_modules/doctrine": { "version": "2.1.0", + "resolved": "https://registry.npmjs.org/doctrine/-/doctrine-2.1.0.tgz", + "integrity": "sha512-35mSku4ZXK0vfCuHEDAwt55dg2jNajHZ1odvF+8SSr82EsZY4QmXfuWso8oEd8zRhVObSN18aM0CjSdoBX7zIw==", "dev": true, - "license": "Apache-2.0", "dependencies": { "esutils": "^2.0.2" }, @@ -7272,8 +8291,9 @@ }, "node_modules/eslint-plugin-import/node_modules/minimatch": { "version": "3.1.2", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", + "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", "dev": true, - "license": "ISC", "dependencies": { "brace-expansion": "^1.1.7" }, @@ -7283,16 +8303,18 @@ }, "node_modules/eslint-plugin-import/node_modules/semver": { "version": "6.3.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.1.tgz", + "integrity": "sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==", "dev": true, - "license": "ISC", "bin": { "semver": "bin/semver.js" } }, "node_modules/eslint-plugin-prettier": { "version": "5.1.3", + "resolved": "https://registry.npmjs.org/eslint-plugin-prettier/-/eslint-plugin-prettier-5.1.3.tgz", + "integrity": "sha512-C9GCVAs4Eq7ZC/XFQHITLiHJxQngdtraXaM+LoUFoFp/lHNl2Zn8f3WQbe9HvTBBQ9YnKFB0/2Ajdqwo5D1EAw==", "dev": true, - "license": "MIT", "dependencies": { "prettier-linter-helpers": "^1.0.0", "synckit": "^0.8.6" @@ -7320,8 +8342,9 @@ }, "node_modules/eslint-scope": { "version": "7.2.2", + "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-7.2.2.tgz", + "integrity": "sha512-dOt21O7lTMhDM+X9mB4GX+DZrZtCUJPL/wlcTqxyrx5IvO0IYtILdtrQGQp+8n5S0gwSVmOf9NQrjMOgfQZlIg==", "dev": true, - "license": "BSD-2-Clause", "dependencies": { "esrecurse": "^4.3.0", "estraverse": "^5.2.0" @@ -7335,8 +8358,9 @@ }, "node_modules/eslint-visitor-keys": { "version": "3.4.3", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-3.4.3.tgz", + "integrity": "sha512-wpc+LXeiyiisxPlEkUzU6svyS1frIO3Mgxj1fdy7Pm8Ygzguax2N3Fa/D/ag1WqbOprdI+uY6wMUl8/a2G+iag==", "dev": true, - "license": "Apache-2.0", "engines": { "node": "^12.22.0 || ^14.17.0 || >=16.0.0" }, @@ -7346,8 +8370,9 @@ }, "node_modules/eslint/node_modules/brace-expansion": { "version": "1.1.11", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", + "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", "dev": true, - "license": "MIT", "dependencies": { "balanced-match": "^1.0.0", "concat-map": "0.0.1" @@ -7355,8 +8380,9 @@ }, "node_modules/eslint/node_modules/minimatch": { "version": "3.1.2", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", + "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", "dev": true, - "license": "ISC", "dependencies": { "brace-expansion": "^1.1.7" }, @@ -7366,8 +8392,9 @@ }, "node_modules/espree": { "version": "9.6.1", + "resolved": "https://registry.npmjs.org/espree/-/espree-9.6.1.tgz", + "integrity": "sha512-oruZaFkjorTpF32kDSI5/75ViwGeZginGGy2NoOSg3Q9bnwlnmDm4HLnkl0RE3n+njDXR037aY1+x58Z/zFdwQ==", "dev": true, - "license": "BSD-2-Clause", "dependencies": { "acorn": "^8.9.0", "acorn-jsx": "^5.3.2", @@ -7382,8 +8409,9 @@ }, "node_modules/esprima": { "version": "4.0.1", + "resolved": "https://registry.npmjs.org/esprima/-/esprima-4.0.1.tgz", + "integrity": "sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A==", "dev": true, - "license": "BSD-2-Clause", "bin": { "esparse": "bin/esparse.js", "esvalidate": "bin/esvalidate.js" @@ -7394,8 +8422,9 @@ }, "node_modules/esquery": { "version": "1.5.0", + "resolved": "https://registry.npmjs.org/esquery/-/esquery-1.5.0.tgz", + "integrity": "sha512-YQLXUplAwJgCydQ78IMJywZCceoqk1oH01OERdSAJc/7U2AylwjhSCLDEtqwg811idIS/9fIU5GjG73IgjKMVg==", "dev": true, - "license": "BSD-3-Clause", "dependencies": { "estraverse": "^5.1.0" }, @@ -7405,8 +8434,9 @@ }, "node_modules/esrecurse": { "version": "4.3.0", + "resolved": "https://registry.npmjs.org/esrecurse/-/esrecurse-4.3.0.tgz", + "integrity": "sha512-KmfKL3b6G+RXvP8N1vr3Tq1kL/oCFgn2NYXEtqP8/L3pKapUA4G8cFVaoF3SU323CD4XypR/ffioHmkti6/Tag==", "dev": true, - "license": "BSD-2-Clause", "dependencies": { "estraverse": "^5.2.0" }, @@ -7416,37 +8446,42 @@ }, "node_modules/estraverse": { "version": "5.3.0", + "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.3.0.tgz", + "integrity": "sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA==", "dev": true, - "license": "BSD-2-Clause", "engines": { "node": ">=4.0" } }, "node_modules/esutils": { "version": "2.0.3", + "resolved": "https://registry.npmjs.org/esutils/-/esutils-2.0.3.tgz", + "integrity": "sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g==", "dev": true, - "license": "BSD-2-Clause", "engines": { "node": ">=0.10.0" } }, "node_modules/eventemitter3": { "version": "5.0.1", - "dev": true, - "license": "MIT" + "resolved": "https://registry.npmjs.org/eventemitter3/-/eventemitter3-5.0.1.tgz", + "integrity": "sha512-GWkBvjiSZK87ELrYOSESUYeVIc9mvLLf/nXalMOS5dYrgZq9o5OVkbZAVM06CVxYsCwH9BDZFPlQTlPA1j4ahA==", + "dev": true }, "node_modules/events": { "version": "1.1.1", + "resolved": "https://registry.npmjs.org/events/-/events-1.1.1.tgz", + "integrity": "sha512-kEcvvCBByWXGnZy6JUlgAp2gBIUjfCAV6P6TgT1/aaQKcmuAEC4OZTV1I4EWQLz2gxZw76atuVyvHhTxvi0Flw==", "dev": true, - "license": "MIT", "engines": { "node": ">=0.4.x" } }, "node_modules/execa": { "version": "5.1.1", + "resolved": "https://registry.npmjs.org/execa/-/execa-5.1.1.tgz", + "integrity": "sha512-8uSpZZocAZRBAPIEINJj3Lo9HyGitllczc27Eh5YYojjMFMn8yHMDMaUHE2Jqfq05D/wucwI4JGURyXt1vchyg==", "dev": true, - "license": "MIT", "dependencies": { "cross-spawn": "^7.0.3", "get-stream": "^6.0.0", @@ -7467,6 +8502,8 @@ }, "node_modules/exit": { "version": "0.1.2", + "resolved": "https://registry.npmjs.org/exit/-/exit-0.1.2.tgz", + "integrity": "sha512-Zk/eNKV2zbjpKzrsQ+n1G6poVbErQxJ0LBOJXaKZ1EViLzH+hrLu9cdXI4zw9dBQJslwBEpbQ2P1oS7nDxs6jQ==", "dev": true, "engines": { "node": ">= 0.8.0" @@ -7474,8 +8511,9 @@ }, "node_modules/expect": { "version": "29.7.0", + "resolved": "https://registry.npmjs.org/expect/-/expect-29.7.0.tgz", + "integrity": "sha512-2Zks0hf1VLFYI1kbh0I5jP3KHHyCHpkfyHBzsSXRFgl/Bg9mWYfMW8oD+PdMPlEwy5HNsR9JutYy6pMeOh61nw==", "dev": true, - "license": "MIT", "dependencies": { "@jest/expect-utils": "^29.7.0", "jest-get-type": "^29.6.3", @@ -7489,13 +8527,15 @@ }, "node_modules/exponential-backoff": { "version": "3.1.1", - "dev": true, - "license": "Apache-2.0" + "resolved": "https://registry.npmjs.org/exponential-backoff/-/exponential-backoff-3.1.1.tgz", + "integrity": "sha512-dX7e/LHVJ6W3DE1MHWi9S1EYzDESENfLrYohG2G++ovZrYOkm4Knwa0mc1cn84xJOR4KEU0WSchhLbd0UklbHw==", + "dev": true }, "node_modules/external-editor": { "version": "3.1.0", + "resolved": "https://registry.npmjs.org/external-editor/-/external-editor-3.1.0.tgz", + "integrity": "sha512-hMQ4CX1p1izmuLYyZqLMO/qGNw10wSv9QDCPfzXfyFrOaCSSoRfqE1Kf1s5an66J5JZC62NewG+mK49jOCtQew==", "dev": true, - "license": "MIT", "dependencies": { "chardet": "^0.7.0", "iconv-lite": "^0.4.24", @@ -7507,8 +8547,9 @@ }, "node_modules/external-editor/node_modules/tmp": { "version": "0.0.33", + "resolved": "https://registry.npmjs.org/tmp/-/tmp-0.0.33.tgz", + "integrity": "sha512-jRCJlojKnZ3addtTOjdIqoRuPEKBvNXcGYqzO6zWZX8KfKEpnGY5jfggJQ3EjKuu8D4bJRr0y+cYJFmYbImXGw==", "dev": true, - "license": "MIT", "dependencies": { "os-tmpdir": "~1.0.2" }, @@ -7518,18 +8559,21 @@ }, "node_modules/fast-deep-equal": { "version": "3.1.3", - "dev": true, - "license": "MIT" + "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz", + "integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==", + "dev": true }, "node_modules/fast-diff": { "version": "1.3.0", - "dev": true, - "license": "Apache-2.0" + "resolved": "https://registry.npmjs.org/fast-diff/-/fast-diff-1.3.0.tgz", + "integrity": "sha512-VxPP4NqbUjj6MaAOafWeUn2cXWLcCtljklUtZf0Ind4XQ+QPtmA0b18zZy0jIQx+ExRVCR/ZQpBmik5lXshNsw==", + "dev": true }, "node_modules/fast-glob": { "version": "3.3.2", + "resolved": "https://registry.npmjs.org/fast-glob/-/fast-glob-3.3.2.tgz", + "integrity": "sha512-oX2ruAFQwf/Orj8m737Y5adxDQO0LAB7/S5MnxCdTNDd4p6BsyIVsv9JQsATbTSq8KHRpLwIHbVlUNatxd+1Ow==", "dev": true, - "license": "MIT", "dependencies": { "@nodelib/fs.stat": "^2.0.2", "@nodelib/fs.walk": "^1.2.3", @@ -7543,8 +8587,9 @@ }, "node_modules/fast-glob/node_modules/glob-parent": { "version": "5.1.2", + "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz", + "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==", "dev": true, - "license": "ISC", "dependencies": { "is-glob": "^4.0.1" }, @@ -7554,16 +8599,20 @@ }, "node_modules/fast-json-stable-stringify": { "version": "2.1.0", - "dev": true, - "license": "MIT" + "resolved": "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz", + "integrity": "sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw==", + "dev": true }, "node_modules/fast-levenshtein": { "version": "2.0.6", - "dev": true, - "license": "MIT" + "resolved": "https://registry.npmjs.org/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz", + "integrity": "sha512-DCXu6Ifhqcks7TZKY3Hxp3y6qphY5SJZmrWMDrKcERSOXWQdMhU9Ig/PYrzyw/ul9jOIyh0N4M0tbC5hodg8dw==", + "dev": true }, "node_modules/fast-xml-parser": { "version": "4.2.5", + "resolved": "https://registry.npmjs.org/fast-xml-parser/-/fast-xml-parser-4.2.5.tgz", + "integrity": "sha512-B9/wizE4WngqQftFPmdaMYlXoJlJOYxGQOanC77fq9k8+Z0v5dDSVh+3glErdIROP//s/jgb7ZuxKfB8nVyo0g==", "funding": [ { "type": "paypal", @@ -7574,7 +8623,6 @@ "url": "https://github.com/sponsors/NaturalIntelligence" } ], - "license": "MIT", "dependencies": { "strnum": "^1.0.5" }, @@ -7583,30 +8631,34 @@ } }, "node_modules/fastq": { - "version": "1.17.1", + "version": "1.16.0", + "resolved": "https://registry.npmjs.org/fastq/-/fastq-1.16.0.tgz", + "integrity": "sha512-ifCoaXsDrsdkWTtiNJX5uzHDsrck5TzfKKDcuFFTIrrc/BS076qgEIfoIy1VeZqViznfKiysPYTh/QeHtnIsYA==", "dev": true, - "license": "ISC", "dependencies": { "reusify": "^1.0.4" } }, "node_modules/fb-watchman": { "version": "2.0.2", + "resolved": "https://registry.npmjs.org/fb-watchman/-/fb-watchman-2.0.2.tgz", + "integrity": "sha512-p5161BqbuCaSnB8jIbzQHOlpgsPmK5rJVDfDKO91Axs5NC1uu3HRQm6wt9cd9/+GtQQIO53JdGXXoyDpTAsgYA==", "dev": true, - "license": "Apache-2.0", "dependencies": { "bser": "2.1.1" } }, "node_modules/fflate": { "version": "0.8.1", - "dev": true, - "license": "MIT" + "resolved": "https://registry.npmjs.org/fflate/-/fflate-0.8.1.tgz", + "integrity": "sha512-/exOvEuc+/iaUm105QIiOt4LpBdMTWsXxqR0HDF35vx3fmaKzw7354gTilCh5rkzEt8WYyG//ku3h3nRmd7CHQ==", + "dev": true }, "node_modules/figures": { "version": "3.2.0", + "resolved": "https://registry.npmjs.org/figures/-/figures-3.2.0.tgz", + "integrity": "sha512-yaduQFRKLXYOGgEn6AZau90j3ggSOyiqXU0F9JZfeXYhNa+Jk4X+s45A2zg5jns87GAFa34BBm2kXw4XpNcbdg==", "dev": true, - "license": "MIT", "dependencies": { "escape-string-regexp": "^1.0.5" }, @@ -7619,16 +8671,18 @@ }, "node_modules/figures/node_modules/escape-string-regexp": { "version": "1.0.5", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", + "integrity": "sha512-vbRorB5FUQWvla16U8R/qgaFIya2qGzwDrNmCZuYKrbdSUMG6I1ZCGQRefkRVhuOkIGVne7BQ35DSfo1qvJqFg==", "dev": true, - "license": "MIT", "engines": { "node": ">=0.8.0" } }, "node_modules/file-entry-cache": { "version": "6.0.1", + "resolved": "https://registry.npmjs.org/file-entry-cache/-/file-entry-cache-6.0.1.tgz", + "integrity": "sha512-7Gps/XWymbLk2QLYK4NzpMOrYjMhdIxXuIvy2QBsLE6ljuodKvdkWs/cpyJJ3CVIVpH0Oi1Hvg1ovbMzLdFBBg==", "dev": true, - "license": "MIT", "dependencies": { "flat-cache": "^3.0.4" }, @@ -7638,16 +8692,18 @@ }, "node_modules/filelist": { "version": "1.0.4", + "resolved": "https://registry.npmjs.org/filelist/-/filelist-1.0.4.tgz", + "integrity": "sha512-w1cEuf3S+DrLCQL7ET6kz+gmlJdbq9J7yXCSjK/OZCPA+qEN1WyF4ZAf0YYJa4/shHJra2t/d/r8SV4Ji+x+8Q==", "dev": true, - "license": "Apache-2.0", "dependencies": { "minimatch": "^5.0.1" } }, "node_modules/filelist/node_modules/minimatch": { "version": "5.1.6", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-5.1.6.tgz", + "integrity": "sha512-lKwV/1brpG6mBUFHtb7NUmtABCb2WZZmm2wNiOA5hAb8VdCS4B3dtMWyvcoViccwAW/COERjXLt0zP1zXUN26g==", "dev": true, - "license": "ISC", "dependencies": { "brace-expansion": "^2.0.1" }, @@ -7657,8 +8713,9 @@ }, "node_modules/fill-range": { "version": "7.0.1", + "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.0.1.tgz", + "integrity": "sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ==", "dev": true, - "license": "MIT", "dependencies": { "to-regex-range": "^5.0.1" }, @@ -7668,8 +8725,9 @@ }, "node_modules/find-up": { "version": "5.0.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-5.0.0.tgz", + "integrity": "sha512-78/PXT1wlLLDgTzDs7sjq9hzz0vXD+zn+7wypEe4fXQxCmdmqfGsEPQxmiCSQI3ajFV91bVSsvNtrJRiW6nGng==", "dev": true, - "license": "MIT", "dependencies": { "locate-path": "^6.0.0", "path-exists": "^4.0.0" @@ -7683,16 +8741,18 @@ }, "node_modules/flat": { "version": "5.0.2", + "resolved": "https://registry.npmjs.org/flat/-/flat-5.0.2.tgz", + "integrity": "sha512-b6suED+5/3rTpUBdG1gupIl8MPFCAMA0QXwmljLhvCUKcUvdE4gWky9zpuGCcXHOsz4J9wPGNWq6OKpmIzz3hQ==", "dev": true, - "license": "BSD-3-Clause", "bin": { "flat": "cli.js" } }, "node_modules/flat-cache": { "version": "3.2.0", + "resolved": "https://registry.npmjs.org/flat-cache/-/flat-cache-3.2.0.tgz", + "integrity": "sha512-CYcENa+FtcUKLmhhqyctpclsq7QF38pKjZHsGNiSQF5r4FtoKDWabFDl3hzaEQMvT1LHEysw5twgLvpYYb4vbw==", "dev": true, - "license": "MIT", "dependencies": { "flatted": "^3.2.9", "keyv": "^4.5.3", @@ -7702,13 +8762,31 @@ "node": "^10.12.0 || >=12.0.0" } }, - "node_modules/flatted": { - "version": "3.3.1", + "node_modules/flat-cache/node_modules/rimraf": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-3.0.2.tgz", + "integrity": "sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA==", "dev": true, - "license": "ISC" + "dependencies": { + "glob": "^7.1.3" + }, + "bin": { + "rimraf": "bin.js" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/flatted": { + "version": "3.2.9", + "resolved": "https://registry.npmjs.org/flatted/-/flatted-3.2.9.tgz", + "integrity": "sha512-36yxDn5H7OFZQla0/jFJmbIKTdZAQHngCedGxiMmpNfEZM0sdEeT+WczLQrjK6D7o2aiyLYDnkw0R3JK0Qv1RQ==", + "dev": true }, "node_modules/follow-redirects": { "version": "1.15.5", + "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.15.5.tgz", + "integrity": "sha512-vSFWUON1B+yAw1VN4xMfxgn5fTUiaOzAJCKBwIIgT/+7CuGy9+r+5gITvP62j3RmaD5Ph65UaERdOSRGUzZtgw==", "dev": true, "funding": [ { @@ -7716,7 +8794,6 @@ "url": "https://github.com/sponsors/RubenVerborgh" } ], - "license": "MIT", "engines": { "node": ">=4.0" }, @@ -7728,16 +8805,18 @@ }, "node_modules/for-each": { "version": "0.3.3", + "resolved": "https://registry.npmjs.org/for-each/-/for-each-0.3.3.tgz", + "integrity": "sha512-jqYfLp7mo9vIyQf8ykW2v7A+2N4QjeCeI5+Dz9XraiO1ign81wjiH7Fb9vSOWvQfNtmSa4H2RoQTrrXivdUZmw==", "dev": true, - "license": "MIT", "dependencies": { "is-callable": "^1.1.3" } }, "node_modules/foreground-child": { "version": "3.1.1", + "resolved": "https://registry.npmjs.org/foreground-child/-/foreground-child-3.1.1.tgz", + "integrity": "sha512-TMKDUnIte6bfb5nWv7V/caI169OHgvwjb7V4WkeUvbQQdjr5rWKqHFiKWb/fcOwB+CzBT+qbWjvj+DVwRskpIg==", "dev": true, - "license": "ISC", "dependencies": { "cross-spawn": "^7.0.0", "signal-exit": "^4.0.1" @@ -7751,8 +8830,9 @@ }, "node_modules/foreground-child/node_modules/signal-exit": { "version": "4.1.0", + "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-4.1.0.tgz", + "integrity": "sha512-bzyZ1e88w9O1iNJbKnOlvYTrWPDl46O1bG0D3XInv+9tkPrxrN8jUUTiFlDkkmKWgn1M6CfIA13SuGqOa9Korw==", "dev": true, - "license": "ISC", "engines": { "node": ">=14" }, @@ -7762,8 +8842,9 @@ }, "node_modules/form-data": { "version": "4.0.0", + "resolved": "https://registry.npmjs.org/form-data/-/form-data-4.0.0.tgz", + "integrity": "sha512-ETEklSGi5t0QMZuiXoA/Q6vcnxcLQP5vdugSpuAyi6SVGi2clPPp+xgEhuMaHC+zGgn31Kd235W35f7Hykkaww==", "dev": true, - "license": "MIT", "dependencies": { "asynckit": "^0.4.0", "combined-stream": "^1.0.8", @@ -7775,13 +8856,15 @@ }, "node_modules/fs-constants": { "version": "1.0.0", - "dev": true, - "license": "MIT" + "resolved": "https://registry.npmjs.org/fs-constants/-/fs-constants-1.0.0.tgz", + "integrity": "sha512-y6OAwoSIf7FyjMIv94u+b5rdheZEjzR63GTyZJm5qh4Bi+2YgwLCcI/fPFZkL5PSixOt6ZNKm+w+Hfp/Bciwow==", + "dev": true }, "node_modules/fs-extra": { "version": "11.2.0", + "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-11.2.0.tgz", + "integrity": "sha512-PmDi3uwK5nFuXh7XDTlVnS17xJS7vW36is2+w3xcv8SVxiB4NyATf4ctkVY5bkSjX0Y4nbvZCq1/EjtEyr9ktw==", "dev": true, - "license": "MIT", "dependencies": { "graceful-fs": "^4.2.0", "jsonfile": "^6.0.1", @@ -7792,24 +8875,28 @@ } }, "node_modules/fs-minipass": { - "version": "3.0.3", + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/fs-minipass/-/fs-minipass-2.1.0.tgz", + "integrity": "sha512-V/JgOLFCS+R6Vcq0slCuaeWEdNC3ouDlJMNIsacH2VtALiu9mV4LPrHc5cDl8k5aw6J8jwgWWpiTo5RYhmIzvg==", "dev": true, - "license": "ISC", "dependencies": { - "minipass": "^7.0.3" + "minipass": "^3.0.0" }, "engines": { - "node": "^14.17.0 || ^16.13.0 || >=18.0.0" + "node": ">= 8" } }, "node_modules/fs.realpath": { "version": "1.0.0", - "dev": true, - "license": "ISC" + "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", + "integrity": "sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw==", + "dev": true }, "node_modules/fsevents": { "version": "2.3.2", - "license": "MIT", + "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.2.tgz", + "integrity": "sha512-xiqMQR4xAeHTuB9uWm+fFRcIOgKBMiOBP+eXiyT7jsgVCq1bkVygt00oASowB7EdtpOHaaPgKt812P9ab+DDKA==", + "hasInstallScript": true, "optional": true, "os": [ "darwin" @@ -7820,16 +8907,18 @@ }, "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==", "dev": true, - "license": "MIT", "funding": { "url": "https://github.com/sponsors/ljharb" } }, "node_modules/function.prototype.name": { "version": "1.1.6", + "resolved": "https://registry.npmjs.org/function.prototype.name/-/function.prototype.name-1.1.6.tgz", + "integrity": "sha512-Z5kx79swU5P27WEayXM1tBi5Ze/lbIyiNgU3qyXUOf9b2rgXYyF9Dy9Cx+IQv/Lc8WCG6L82zwUPpSS9hGehIg==", "dev": true, - "license": "MIT", "dependencies": { "call-bind": "^1.0.2", "define-properties": "^1.2.0", @@ -7845,16 +8934,18 @@ }, "node_modules/functions-have-names": { "version": "1.2.3", + "resolved": "https://registry.npmjs.org/functions-have-names/-/functions-have-names-1.2.3.tgz", + "integrity": "sha512-xckBUXyTIqT97tq2x2AMb+g163b5JFysYk0x4qxNFwbfQkmNZoiRHb6sPzI9/QV33WeuvVYBUIiD4NzNIyqaRQ==", "dev": true, - "license": "MIT", "funding": { "url": "https://github.com/sponsors/ljharb" } }, "node_modules/gauge": { "version": "4.0.4", + "resolved": "https://registry.npmjs.org/gauge/-/gauge-4.0.4.tgz", + "integrity": "sha512-f9m+BEN5jkg6a0fZjleidjN51VE1X+mPFQ2DJ0uv1V39oCLCbsGe6yjbBnp7eK7z/+GAon99a3nHuqbuuthyPg==", "dev": true, - "license": "ISC", "dependencies": { "aproba": "^1.0.3 || ^2.0.0", "color-support": "^1.1.3", @@ -7871,24 +8962,27 @@ }, "node_modules/gensync": { "version": "1.0.0-beta.2", + "resolved": "https://registry.npmjs.org/gensync/-/gensync-1.0.0-beta.2.tgz", + "integrity": "sha512-3hN7NaskYvMDLQY55gnW3NQ+mesEAepTqlg+VEbj7zzqEMBVNhzcGYYeqFo/TlYz6eQiFcp1HcsCZO+nGgS8zg==", "dev": true, - "license": "MIT", "engines": { "node": ">=6.9.0" } }, "node_modules/get-caller-file": { "version": "2.0.5", + "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-2.0.5.tgz", + "integrity": "sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==", "dev": true, - "license": "ISC", "engines": { "node": "6.* || 8.* || >= 10.*" } }, "node_modules/get-east-asian-width": { "version": "1.2.0", + "resolved": "https://registry.npmjs.org/get-east-asian-width/-/get-east-asian-width-1.2.0.tgz", + "integrity": "sha512-2nk+7SIVb14QrgXFHcm84tD4bKQz0RxPuMT8Ag5KPOq7J5fEmAg0UbXdTOSHqNuHSU28k55qnceesxXRZGzKWA==", "dev": true, - "license": "MIT", "engines": { "node": ">=18" }, @@ -7897,35 +8991,34 @@ } }, "node_modules/get-intrinsic": { - "version": "1.2.4", + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.2.2.tgz", + "integrity": "sha512-0gSo4ml/0j98Y3lngkFEot/zhiCeWsbYIlZ+uZOVgzLyLaUw7wxUL+nCTP0XJvJg1AXulJRI3UJi8GsbDuxdGA==", "dev": true, - "license": "MIT", "dependencies": { - "es-errors": "^1.3.0", "function-bind": "^1.1.2", "has-proto": "^1.0.1", "has-symbols": "^1.0.3", "hasown": "^2.0.0" }, - "engines": { - "node": ">= 0.4" - }, "funding": { "url": "https://github.com/sponsors/ljharb" } }, "node_modules/get-package-type": { "version": "0.1.0", + "resolved": "https://registry.npmjs.org/get-package-type/-/get-package-type-0.1.0.tgz", + "integrity": "sha512-pjzuKtY64GYfWizNAJ0fr9VqttZkNiK2iS430LtIHzjBEr6bX8Am2zm4sW4Ro5wjWW5cAlRL1qAMTcXbjNAO2Q==", "dev": true, - "license": "MIT", "engines": { "node": ">=8.0.0" } }, "node_modules/get-pkg-repo": { "version": "4.2.1", + "resolved": "https://registry.npmjs.org/get-pkg-repo/-/get-pkg-repo-4.2.1.tgz", + "integrity": "sha512-2+QbHjFRfGB74v/pYWjd5OhU3TDIC2Gv/YKUTk/tCvAz0pkn/Mz6P3uByuBimLOcPvN2jYdScl3xGFSrx0jEcA==", "dev": true, - "license": "MIT", "dependencies": { "@hutson/parse-repository-url": "^3.0.0", "hosted-git-info": "^4.0.0", @@ -7941,8 +9034,9 @@ }, "node_modules/get-pkg-repo/node_modules/cliui": { "version": "7.0.4", + "resolved": "https://registry.npmjs.org/cliui/-/cliui-7.0.4.tgz", + "integrity": "sha512-OcRE68cOsVMXp1Yvonl/fzkQOyjLSu/8bhPDfQt0e0/Eb283TKP20Fs2MqoPsr9SwA595rRCA+QMzYc9nBP+JQ==", "dev": true, - "license": "ISC", "dependencies": { "string-width": "^4.2.0", "strip-ansi": "^6.0.0", @@ -7951,8 +9045,9 @@ }, "node_modules/get-pkg-repo/node_modules/wrap-ansi": { "version": "7.0.0", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz", + "integrity": "sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==", "dev": true, - "license": "MIT", "dependencies": { "ansi-styles": "^4.0.0", "string-width": "^4.1.0", @@ -7967,8 +9062,9 @@ }, "node_modules/get-pkg-repo/node_modules/yargs": { "version": "16.2.0", + "resolved": "https://registry.npmjs.org/yargs/-/yargs-16.2.0.tgz", + "integrity": "sha512-D1mvvtDG0L5ft/jGWkLpG1+m0eQxOfaBvTNELraWj22wSVUMWxZUvYgJYcKh6jGGIkJFhH4IZPQhR4TKpc8mBw==", "dev": true, - "license": "MIT", "dependencies": { "cliui": "^7.0.2", "escalade": "^3.1.1", @@ -7984,16 +9080,18 @@ }, "node_modules/get-pkg-repo/node_modules/yargs-parser": { "version": "20.2.9", + "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-20.2.9.tgz", + "integrity": "sha512-y11nGElTIV+CT3Zv9t7VKl+Q3hTQoT9a1Qzezhhl6Rp21gJ/IVTW7Z3y9EWXhuUBC2Shnf+DX0antecpAwSP8w==", "dev": true, - "license": "ISC", "engines": { "node": ">=10" } }, "node_modules/get-port": { "version": "5.1.1", + "resolved": "https://registry.npmjs.org/get-port/-/get-port-5.1.1.tgz", + "integrity": "sha512-g/Q1aTSDOxFpchXC4i8ZWvxA1lnPqx/JHqcpIw0/LX9T8x/GBbi6YnlN5nhaKIFkT8oFsscUKgDJYxfwfS6QsQ==", "dev": true, - "license": "MIT", "engines": { "node": ">=8" }, @@ -8003,8 +9101,9 @@ }, "node_modules/get-stream": { "version": "6.0.1", + "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-6.0.1.tgz", + "integrity": "sha512-ts6Wi+2j3jQjqi70w5AlN8DFnkSwC+MqmxEzdEALB2qXZYV3X/b1CTfgPLGJNMeAWxdPfU8FO1ms3NUfaHCPYg==", "dev": true, - "license": "MIT", "engines": { "node": ">=10" }, @@ -8013,13 +9112,13 @@ } }, "node_modules/get-symbol-description": { - "version": "1.0.2", + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/get-symbol-description/-/get-symbol-description-1.0.0.tgz", + "integrity": "sha512-2EmdH1YvIQiZpltCNgkuiUnyukzxM/R6NDJX31Ke3BG1Nq5b0S2PhX59UKi9vZpPDQVdqn+1IcaAwnzTT5vCjw==", "dev": true, - "license": "MIT", "dependencies": { - "call-bind": "^1.0.5", - "es-errors": "^1.3.0", - "get-intrinsic": "^1.2.4" + "call-bind": "^1.0.2", + "get-intrinsic": "^1.1.1" }, "engines": { "node": ">= 0.4" @@ -8029,9 +9128,10 @@ } }, "node_modules/get-tsconfig": { - "version": "4.7.3", + "version": "4.7.2", + "resolved": "https://registry.npmjs.org/get-tsconfig/-/get-tsconfig-4.7.2.tgz", + "integrity": "sha512-wuMsz4leaj5hbGgg4IvDU0bqJagpftG5l5cXIAvo8uZrqn0NJqwtfupTN00VnkQJPcIRrxYrm1Ue24btpCha2A==", "dev": true, - "license": "MIT", "dependencies": { "resolve-pkg-maps": "^1.0.0" }, @@ -8041,8 +9141,9 @@ }, "node_modules/git-raw-commits": { "version": "3.0.0", + "resolved": "https://registry.npmjs.org/git-raw-commits/-/git-raw-commits-3.0.0.tgz", + "integrity": "sha512-b5OHmZ3vAgGrDn/X0kS+9qCfNKWe4K/jFnhwzVWWg0/k5eLa3060tZShrRg8Dja5kPc+YjS0Gc6y7cRr44Lpjw==", "dev": true, - "license": "MIT", "dependencies": { "dargs": "^7.0.0", "meow": "^8.1.2", @@ -8057,8 +9158,9 @@ }, "node_modules/git-remote-origin-url": { "version": "2.0.0", + "resolved": "https://registry.npmjs.org/git-remote-origin-url/-/git-remote-origin-url-2.0.0.tgz", + "integrity": "sha512-eU+GGrZgccNJcsDH5LkXR3PB9M958hxc7sbA8DFJjrv9j4L2P/eZfKhM+QD6wyzpiv+b1BpK0XrYCxkovtjSLw==", "dev": true, - "license": "MIT", "dependencies": { "gitconfiglocal": "^1.0.0", "pify": "^2.3.0" @@ -8069,16 +9171,18 @@ }, "node_modules/git-remote-origin-url/node_modules/pify": { "version": "2.3.0", + "resolved": "https://registry.npmjs.org/pify/-/pify-2.3.0.tgz", + "integrity": "sha512-udgsAY+fTnvv7kI7aaxbqwWNb0AHiB0qBO89PZKPkoTmGOgdbrHDKD+0B2X4uTfJ/FT1R09r9gTsjUjNJotuog==", "dev": true, - "license": "MIT", "engines": { "node": ">=0.10.0" } }, "node_modules/git-semver-tags": { "version": "5.0.1", + "resolved": "https://registry.npmjs.org/git-semver-tags/-/git-semver-tags-5.0.1.tgz", + "integrity": "sha512-hIvOeZwRbQ+7YEUmCkHqo8FOLQZCEn18yevLHADlFPZY02KJGsu5FZt9YW/lybfK2uhWFI7Qg/07LekJiTv7iA==", "dev": true, - "license": "MIT", "dependencies": { "meow": "^8.1.2", "semver": "^7.0.0" @@ -8092,8 +9196,9 @@ }, "node_modules/git-up": { "version": "7.0.0", + "resolved": "https://registry.npmjs.org/git-up/-/git-up-7.0.0.tgz", + "integrity": "sha512-ONdIrbBCFusq1Oy0sC71F5azx8bVkvtZtMJAsv+a6lz5YAmbNnLD6HAB4gptHZVLPR8S2/kVN6Gab7lryq5+lQ==", "dev": true, - "license": "MIT", "dependencies": { "is-ssh": "^1.4.0", "parse-url": "^8.1.0" @@ -8101,24 +9206,27 @@ }, "node_modules/git-url-parse": { "version": "13.1.0", + "resolved": "https://registry.npmjs.org/git-url-parse/-/git-url-parse-13.1.0.tgz", + "integrity": "sha512-5FvPJP/70WkIprlUZ33bm4UAaFdjcLkJLpWft1BeZKqwR0uhhNGoKwlUaPtVb4LxCSQ++erHapRak9kWGj+FCA==", "dev": true, - "license": "MIT", "dependencies": { "git-up": "^7.0.0" } }, "node_modules/gitconfiglocal": { "version": "1.0.0", + "resolved": "https://registry.npmjs.org/gitconfiglocal/-/gitconfiglocal-1.0.0.tgz", + "integrity": "sha512-spLUXeTAVHxDtKsJc8FkFVgFtMdEN9qPGpL23VfSHx4fP4+Ds097IXLvymbnDH8FnmxX5Nr9bPw3A+AQ6mWEaQ==", "dev": true, - "license": "BSD", "dependencies": { "ini": "^1.3.2" } }, "node_modules/glob": { "version": "7.2.3", + "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.3.tgz", + "integrity": "sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==", "dev": true, - "license": "ISC", "dependencies": { "fs.realpath": "^1.0.0", "inflight": "^1.0.4", @@ -8136,8 +9244,9 @@ }, "node_modules/glob-parent": { "version": "6.0.2", + "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-6.0.2.tgz", + "integrity": "sha512-XxwI8EOhVQgWp6iDL+3b0r86f4d6AX6zSU55HfB4ydCEuXLXc5FcYeOu+nnGftS4TEju/11rt4KJPTMgbfmv4A==", "dev": true, - "license": "ISC", "dependencies": { "is-glob": "^4.0.3" }, @@ -8147,8 +9256,9 @@ }, "node_modules/glob/node_modules/brace-expansion": { "version": "1.1.11", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", + "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", "dev": true, - "license": "MIT", "dependencies": { "balanced-match": "^1.0.0", "concat-map": "0.0.1" @@ -8156,8 +9266,9 @@ }, "node_modules/glob/node_modules/minimatch": { "version": "3.1.2", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", + "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", "dev": true, - "license": "ISC", "dependencies": { "brace-expansion": "^1.1.7" }, @@ -8167,8 +9278,9 @@ }, "node_modules/globals": { "version": "13.24.0", + "resolved": "https://registry.npmjs.org/globals/-/globals-13.24.0.tgz", + "integrity": "sha512-AhO5QUcj8llrbG09iWhPU2B204J1xnPeL8kQmVorSsy+Sjj1sk8gIyh6cUocGmH4L0UuhAJy+hJMRA4mgA4mFQ==", "dev": true, - "license": "MIT", "dependencies": { "type-fest": "^0.20.2" }, @@ -8181,8 +9293,9 @@ }, "node_modules/globalthis": { "version": "1.0.3", + "resolved": "https://registry.npmjs.org/globalthis/-/globalthis-1.0.3.tgz", + "integrity": "sha512-sFdI5LyBiNTHjRd7cGPWapiHWMOXKyuBNX/cWJ3NfzrZQVa8GI/8cofCl74AOVqq9W5kNmguTIzJ/1s2gyI9wA==", "dev": true, - "license": "MIT", "dependencies": { "define-properties": "^1.1.3" }, @@ -8195,8 +9308,9 @@ }, "node_modules/globby": { "version": "11.1.0", + "resolved": "https://registry.npmjs.org/globby/-/globby-11.1.0.tgz", + "integrity": "sha512-jhIXaOzy1sb8IyocaruWSn1TjmnBVs8Ayhcy83rmxNJ8q2uWKCAj3CnJY+KpGSXCueAPc0i05kVvVKtP1t9S3g==", "dev": true, - "license": "MIT", "dependencies": { "array-union": "^2.1.0", "dir-glob": "^3.0.1", @@ -8214,8 +9328,9 @@ }, "node_modules/gopd": { "version": "1.0.1", + "resolved": "https://registry.npmjs.org/gopd/-/gopd-1.0.1.tgz", + "integrity": "sha512-d65bNlIadxvpb/A2abVdlqKqV563juRnZ1Wtk6s1sIR8uNsXR70xqIzVqxVf1eTqDunwT2MkczEeaezCKTZhwA==", "dev": true, - "license": "MIT", "dependencies": { "get-intrinsic": "^1.1.3" }, @@ -8225,18 +9340,21 @@ }, "node_modules/graceful-fs": { "version": "4.2.11", - "dev": true, - "license": "ISC" + "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.11.tgz", + "integrity": "sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ==", + "dev": true }, "node_modules/graphemer": { "version": "1.4.0", - "dev": true, - "license": "MIT" + "resolved": "https://registry.npmjs.org/graphemer/-/graphemer-1.4.0.tgz", + "integrity": "sha512-EtKwoO6kxCL9WO5xipiHTZlSzBm7WLT627TqC/uVRd0HKmq8NXyebnNYxDoBi7wt8eTWrUrKXCOVaFq9x1kgag==", + "dev": true }, "node_modules/handlebars": { "version": "4.7.8", + "resolved": "https://registry.npmjs.org/handlebars/-/handlebars-4.7.8.tgz", + "integrity": "sha512-vafaFqs8MZkRrSX7sFVUdo3ap/eNiLnb4IakshzvP56X5Nr1iGKAIqdX6tMlm6HcNRIkr6AxO5jFEoJzzpT8aQ==", "dev": true, - "license": "MIT", "dependencies": { "minimist": "^1.2.5", "neo-async": "^2.6.2", @@ -8255,43 +9373,48 @@ }, "node_modules/hard-rejection": { "version": "2.1.0", + "resolved": "https://registry.npmjs.org/hard-rejection/-/hard-rejection-2.1.0.tgz", + "integrity": "sha512-VIZB+ibDhx7ObhAe7OVtoEbuP4h/MuOTHJ+J8h/eBXotJYl0fBgR72xDFCKgIh22OJZIOVNxBMWuhAr10r8HdA==", "dev": true, - "license": "MIT", "engines": { "node": ">=6" } }, "node_modules/has-bigints": { "version": "1.0.2", + "resolved": "https://registry.npmjs.org/has-bigints/-/has-bigints-1.0.2.tgz", + "integrity": "sha512-tSvCKtBr9lkF0Ex0aQiP9N+OpV4zi2r/Nee5VkRDbaqv35RLYMzbwQfFSZZH0kR+Rd6302UJZ2p/bJCEoR3VoQ==", "dev": true, - "license": "MIT", "funding": { "url": "https://github.com/sponsors/ljharb" } }, "node_modules/has-flag": { "version": "4.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", + "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", "dev": true, - "license": "MIT", "engines": { "node": ">=8" } }, "node_modules/has-property-descriptors": { - "version": "1.0.2", + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/has-property-descriptors/-/has-property-descriptors-1.0.1.tgz", + "integrity": "sha512-VsX8eaIewvas0xnvinAe9bw4WfIeODpGYikiWYLH+dma0Jw6KHYqWiWfhQlgOVK8D6PvjubK5Uc4P0iIhIcNVg==", "dev": true, - "license": "MIT", "dependencies": { - "es-define-property": "^1.0.0" + "get-intrinsic": "^1.2.2" }, "funding": { "url": "https://github.com/sponsors/ljharb" } }, "node_modules/has-proto": { - "version": "1.0.3", + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/has-proto/-/has-proto-1.0.1.tgz", + "integrity": "sha512-7qE+iP+O+bgF9clE5+UoBFzE65mlBiVj3tKCrlNQ0Ogwm0BjpT/gK4SlLYDMybDh5I3TCTKnPPa0oMG7JDYrhg==", "dev": true, - "license": "MIT", "engines": { "node": ">= 0.4" }, @@ -8301,8 +9424,9 @@ }, "node_modules/has-symbols": { "version": "1.0.3", + "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.3.tgz", + "integrity": "sha512-l3LCuF6MgDNwTDKkdYGEihYjt5pRPbEg46rtlmnSPlUbgmB8LOIrKJbYYFBSbnPaJexMKtiPO8hmeRjRz2Td+A==", "dev": true, - "license": "MIT", "engines": { "node": ">= 0.4" }, @@ -8311,11 +9435,12 @@ } }, "node_modules/has-tostringtag": { - "version": "1.0.2", + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/has-tostringtag/-/has-tostringtag-1.0.0.tgz", + "integrity": "sha512-kFjcSNhnlGV1kyoGk7OXKSawH5JOb/LzUc5w9B02hOTO0dfFRjbHQKvg1d6cf3HbeUmtU9VbbV3qzZ2Teh97WQ==", "dev": true, - "license": "MIT", "dependencies": { - "has-symbols": "^1.0.3" + "has-symbols": "^1.0.2" }, "engines": { "node": ">= 0.4" @@ -8326,13 +9451,15 @@ }, "node_modules/has-unicode": { "version": "2.0.1", - "dev": true, - "license": "ISC" + "resolved": "https://registry.npmjs.org/has-unicode/-/has-unicode-2.0.1.tgz", + "integrity": "sha512-8Rf9Y83NBReMnx0gFzA8JImQACstCYWUplepDa9xprwwtmgEZUF0h/i5xSA625zB/I37EtrswSST6OXxwaaIJQ==", + "dev": true }, "node_modules/hashi-vault-js": { "version": "0.4.14", + "resolved": "https://registry.npmjs.org/hashi-vault-js/-/hashi-vault-js-0.4.14.tgz", + "integrity": "sha512-TUn4G7GYbARfYMfb/M24hjFdkqtSY9FKSw3yPvKM60CzdduNSaasZnlMNMoydo2khQH+4NoBWpApH5OiCT5nuw==", "dev": true, - "license": "MIT", "dependencies": { "axios": "^1.5.0" }, @@ -8341,9 +9468,10 @@ } }, "node_modules/hasown": { - "version": "2.0.1", + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/hasown/-/hasown-2.0.0.tgz", + "integrity": "sha512-vUptKVTpIJhcczKBbgnS+RtcuYMB8+oNzPK2/Hp3hanz8JmpATdmmgLgSaadVREkDm+e2giHwY3ZRkyjSIDDFA==", "dev": true, - "license": "MIT", "dependencies": { "function-bind": "^1.1.2" }, @@ -8353,8 +9481,9 @@ }, "node_modules/hosted-git-info": { "version": "4.1.0", + "resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-4.1.0.tgz", + "integrity": "sha512-kyCuEOWjJqZuDbRHzL8V93NzQhwIB71oFWSyzVo+KPZI+pnQPPxucdkrOZvkLRnrf5URsQM+IJ09Dw29cRALIA==", "dev": true, - "license": "ISC", "dependencies": { "lru-cache": "^6.0.0" }, @@ -8364,8 +9493,9 @@ }, "node_modules/hosted-git-info/node_modules/lru-cache": { "version": "6.0.0", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz", + "integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==", "dev": true, - "license": "ISC", "dependencies": { "yallist": "^4.0.0" }, @@ -8375,63 +9505,72 @@ }, "node_modules/hosted-git-info/node_modules/yallist": { "version": "4.0.0", - "dev": true, - "license": "ISC" + "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", + "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==", + "dev": true }, "node_modules/html-escaper": { "version": "2.0.2", - "dev": true, - "license": "MIT" + "resolved": "https://registry.npmjs.org/html-escaper/-/html-escaper-2.0.2.tgz", + "integrity": "sha512-H2iMtd0I4Mt5eYiapRdIDjp+XzelXQ0tFE4JS7YFwFevXXMmOp9myNrUvCg0D6ws8iqkRPBfKHgbwig1SmlLfg==", + "dev": true }, "node_modules/http-cache-semantics": { "version": "4.1.1", - "dev": true, - "license": "BSD-2-Clause" + "resolved": "https://registry.npmjs.org/http-cache-semantics/-/http-cache-semantics-4.1.1.tgz", + "integrity": "sha512-er295DKPVsV82j5kw1Gjt+ADA/XYHsajl82cGNQG2eyoPkvgUhX+nDIyelzhIWbbsXP39EHcI6l5tYs2FYqYXQ==", + "dev": true }, "node_modules/http-proxy-agent": { - "version": "7.0.2", + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/http-proxy-agent/-/http-proxy-agent-5.0.0.tgz", + "integrity": "sha512-n2hY8YdoRE1i7r6M0w9DIw5GgZN0G25P8zLCRQ8rjXtTU3vsNFBI/vWK/UIeE6g5MUUz6avwAPXmL6Fy9D/90w==", "dev": true, - "license": "MIT", "dependencies": { - "agent-base": "^7.1.0", - "debug": "^4.3.4" + "@tootallnate/once": "2", + "agent-base": "6", + "debug": "4" }, "engines": { - "node": ">= 14" + "node": ">= 6" } }, "node_modules/https-proxy-agent": { - "version": "7.0.4", + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/https-proxy-agent/-/https-proxy-agent-5.0.1.tgz", + "integrity": "sha512-dFcAjpTQFgoLMzC2VwU+C/CbS7uRL0lWmxDITmqm7C+7F0Odmj6s9l6alZc6AELXhrnggM2CeWSXHGOdX2YtwA==", "dev": true, - "license": "MIT", "dependencies": { - "agent-base": "^7.0.2", + "agent-base": "6", "debug": "4" }, "engines": { - "node": ">= 14" + "node": ">= 6" } }, "node_modules/human-signals": { "version": "2.1.0", + "resolved": "https://registry.npmjs.org/human-signals/-/human-signals-2.1.0.tgz", + "integrity": "sha512-B4FFZ6q/T2jhhksgkbEW3HBvWIfDW85snkQgawt07S7J5QXTk6BkNV+0yAeZrM5QpMAdYlocGoljn0sJ/WQkFw==", "dev": true, - "license": "Apache-2.0", "engines": { "node": ">=10.17.0" } }, "node_modules/humanize-ms": { "version": "1.2.1", + "resolved": "https://registry.npmjs.org/humanize-ms/-/humanize-ms-1.2.1.tgz", + "integrity": "sha512-Fl70vYtsAFb/C06PTS9dZBo7ihau+Tu/DNCk/OyHhea07S+aeMWpFFkUaXRa8fI+ScZbEI8dfSxwY7gxZ9SAVQ==", "dev": true, - "license": "MIT", "dependencies": { "ms": "^2.0.0" } }, "node_modules/husky": { "version": "9.0.11", + "resolved": "https://registry.npmjs.org/husky/-/husky-9.0.11.tgz", + "integrity": "sha512-AB6lFlbwwyIqMdHYhwPe+kjOC3Oc5P3nThEoW/AaO2BX3vJDjWPFxYLxokUZOo6RNX20He3AaT8sESs9NJcmEw==", "dev": true, - "license": "MIT", "bin": { "husky": "bin.mjs" }, @@ -8444,8 +9583,9 @@ }, "node_modules/iconv-lite": { "version": "0.4.24", + "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.24.tgz", + "integrity": "sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA==", "dev": true, - "license": "MIT", "dependencies": { "safer-buffer": ">= 2.1.2 < 3" }, @@ -8455,6 +9595,8 @@ }, "node_modules/ieee754": { "version": "1.2.1", + "resolved": "https://registry.npmjs.org/ieee754/-/ieee754-1.2.1.tgz", + "integrity": "sha512-dcyqhDvX1C46lXZcVqCpK+FtMRQVdIMN6/Df5js2zouUsqG7I6sFxitIC+7KYK29KdXOLHdu9zL4sFnoVQnqaA==", "dev": true, "funding": [ { @@ -8469,21 +9611,22 @@ "type": "consulting", "url": "https://feross.org/support" } - ], - "license": "BSD-3-Clause" + ] }, "node_modules/ignore": { - "version": "5.3.1", + "version": "5.3.0", + "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.3.0.tgz", + "integrity": "sha512-g7dmpshy+gD7mh88OC9NwSGTKoc3kyLAZQRU1mt53Aw/vnvfXnbC+F/7F7QoYVKbV+KNvJx8wArewKy1vXMtlg==", "dev": true, - "license": "MIT", "engines": { "node": ">= 4" } }, "node_modules/ignore-walk": { "version": "5.0.1", + "resolved": "https://registry.npmjs.org/ignore-walk/-/ignore-walk-5.0.1.tgz", + "integrity": "sha512-yemi4pMf51WKT7khInJqAvsIGzoqYXblnsz0ql8tM+yi1EKYTY1evX4NAbJrLL/Aanr2HyZeluqU+Oi7MGHokw==", "dev": true, - "license": "ISC", "dependencies": { "minimatch": "^5.0.1" }, @@ -8493,8 +9636,9 @@ }, "node_modules/ignore-walk/node_modules/minimatch": { "version": "5.1.6", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-5.1.6.tgz", + "integrity": "sha512-lKwV/1brpG6mBUFHtb7NUmtABCb2WZZmm2wNiOA5hAb8VdCS4B3dtMWyvcoViccwAW/COERjXLt0zP1zXUN26g==", "dev": true, - "license": "ISC", "dependencies": { "brace-expansion": "^2.0.1" }, @@ -8504,8 +9648,9 @@ }, "node_modules/import-fresh": { "version": "3.3.0", + "resolved": "https://registry.npmjs.org/import-fresh/-/import-fresh-3.3.0.tgz", + "integrity": "sha512-veYYhQa+D1QBKznvhUHxb8faxlrwUnxseDAbAp457E0wLNio2bOSKnjYDhMj+YiAq61xrMGhQk9iXVk5FzgQMw==", "dev": true, - "license": "MIT", "dependencies": { "parent-module": "^1.0.0", "resolve-from": "^4.0.0" @@ -8519,8 +9664,9 @@ }, "node_modules/import-local": { "version": "3.1.0", + "resolved": "https://registry.npmjs.org/import-local/-/import-local-3.1.0.tgz", + "integrity": "sha512-ASB07uLtnDs1o6EHjKpX34BKYDSqnFerfTOJL2HvMqF70LnxpjkzDB8J44oT9pu4AMPkQwf8jl6szgvNd2tRIg==", "dev": true, - "license": "MIT", "dependencies": { "pkg-dir": "^4.2.0", "resolve-cwd": "^3.0.0" @@ -8537,24 +9683,27 @@ }, "node_modules/imurmurhash": { "version": "0.1.4", + "resolved": "https://registry.npmjs.org/imurmurhash/-/imurmurhash-0.1.4.tgz", + "integrity": "sha512-JmXMZ6wuvDmLiHEml9ykzqO6lwFbof0GG4IkcGaENdCRDDmMVnny7s5HsIgHCbaq0w2MyPhDqkhTUgS2LU2PHA==", "dev": true, - "license": "MIT", "engines": { "node": ">=0.8.19" } }, "node_modules/indent-string": { "version": "4.0.0", + "resolved": "https://registry.npmjs.org/indent-string/-/indent-string-4.0.0.tgz", + "integrity": "sha512-EdDDZu4A2OyIK7Lr/2zG+w5jmbuk1DVBnEwREQvBzspBJkCEbRa8GxU1lghYcaGJCnRWibjDXlq779X1/y5xwg==", "dev": true, - "license": "MIT", "engines": { "node": ">=8" } }, "node_modules/inflight": { "version": "1.0.6", + "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", + "integrity": "sha512-k92I/b08q4wvFscXCLvqfsHCrjrF7yiXsQuIVvVE7N82W3+aqpzuUdBbfhWcy/FZR3/4IgflMgKLOsvPDrGCJA==", "dev": true, - "license": "ISC", "dependencies": { "once": "^1.3.0", "wrappy": "1" @@ -8562,18 +9711,21 @@ }, "node_modules/inherits": { "version": "2.0.4", - "dev": true, - "license": "ISC" + "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", + "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==", + "dev": true }, "node_modules/ini": { "version": "1.3.8", - "dev": true, - "license": "ISC" + "resolved": "https://registry.npmjs.org/ini/-/ini-1.3.8.tgz", + "integrity": "sha512-JV/yugV2uzW5iMRSiZAyDtQd+nxtUnjeLt0acNdw98kKLrvuRVyB80tsREOE7yvGVgalhZ6RNXCmEHkUKBKxew==", + "dev": true }, "node_modules/init-package-json": { "version": "5.0.0", + "resolved": "https://registry.npmjs.org/init-package-json/-/init-package-json-5.0.0.tgz", + "integrity": "sha512-kBhlSheBfYmq3e0L1ii+VKe3zBTLL5lDCDWR+f9dLmEGSB3MqLlMlsolubSsyI88Bg6EA+BIMlomAnQ1SwgQBw==", "dev": true, - "license": "ISC", "dependencies": { "npm-package-arg": "^10.0.0", "promzard": "^1.0.0", @@ -8589,8 +9741,9 @@ }, "node_modules/init-package-json/node_modules/hosted-git-info": { "version": "6.1.1", + "resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-6.1.1.tgz", + "integrity": "sha512-r0EI+HBMcXadMrugk0GCQ+6BQV39PiWAZVfq7oIckeGiN7sjRGyQxPdft3nQekFTCQbYxLBH+/axZMeH8UX6+w==", "dev": true, - "license": "ISC", "dependencies": { "lru-cache": "^7.5.1" }, @@ -8600,16 +9753,18 @@ }, "node_modules/init-package-json/node_modules/lru-cache": { "version": "7.18.3", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-7.18.3.tgz", + "integrity": "sha512-jumlc0BIUrS3qJGgIkWZsyfAM7NCWiBcCDhnd+3NNM5KbBmLTgHVfWBcg6W+rLUsIpzpERPsvwUP7CckAQSOoA==", "dev": true, - "license": "ISC", "engines": { "node": ">=12" } }, "node_modules/init-package-json/node_modules/npm-package-arg": { "version": "10.1.0", + "resolved": "https://registry.npmjs.org/npm-package-arg/-/npm-package-arg-10.1.0.tgz", + "integrity": "sha512-uFyyCEmgBfZTtrKk/5xDfHp6+MdrqGotX/VoOyEEl3mBwiEE5FlBaePanazJSVMPT7vKepcjYBY2ztg9A3yPIA==", "dev": true, - "license": "ISC", "dependencies": { "hosted-git-info": "^6.0.0", "proc-log": "^3.0.0", @@ -8622,8 +9777,9 @@ }, "node_modules/inquirer": { "version": "8.2.6", + "resolved": "https://registry.npmjs.org/inquirer/-/inquirer-8.2.6.tgz", + "integrity": "sha512-M1WuAmb7pn9zdFRtQYk26ZBoY043Sse0wVDdk4Bppr+JOXyQYybdtvK+l9wUibhtjdjvtoiNy8tk+EgsYIUqKg==", "dev": true, - "license": "MIT", "dependencies": { "ansi-escapes": "^4.2.1", "chalk": "^4.1.1", @@ -8646,11 +9802,12 @@ } }, "node_modules/internal-slot": { - "version": "1.0.7", + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/internal-slot/-/internal-slot-1.0.6.tgz", + "integrity": "sha512-Xj6dv+PsbtwyPpEflsejS+oIZxmMlV44zAhG479uYu89MsjcYOhCFnNyKrkJrihbsiasQyY0afoCl/9BLR65bg==", "dev": true, - "license": "MIT", "dependencies": { - "es-errors": "^1.3.0", + "get-intrinsic": "^1.2.2", "hasown": "^2.0.0", "side-channel": "^1.0.4" }, @@ -8660,8 +9817,9 @@ }, "node_modules/ip-address": { "version": "9.0.5", + "resolved": "https://registry.npmjs.org/ip-address/-/ip-address-9.0.5.tgz", + "integrity": "sha512-zHtQzGojZXTwZTHQqra+ETKd4Sn3vgi7uBmlPoXVWZqYvuKmtI0l/VZTjqGmJY9x88GGOaZ9+G9ES8hC4T4X8g==", "dev": true, - "license": "MIT", "dependencies": { "jsbn": "1.1.0", "sprintf-js": "^1.1.3" @@ -8670,10 +9828,17 @@ "node": ">= 12" } }, + "node_modules/ip-address/node_modules/sprintf-js": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.1.3.tgz", + "integrity": "sha512-Oo+0REFV59/rz3gfJNKQiBlwfHaSESl1pcGyABQsnnIfWOFt6JNj5gCog2U6MLZ//IGYD+nA8nI+mTShREReaA==", + "dev": true + }, "node_modules/is-arguments": { "version": "1.1.1", + "resolved": "https://registry.npmjs.org/is-arguments/-/is-arguments-1.1.1.tgz", + "integrity": "sha512-8Q7EARjzEnKpt/PCD7e1cgUS0a6X8u5tdSiMqXhojOdoV9TsMsiO+9VLC5vAmO8N7/GmXn7yjR8qnA6bVAEzfA==", "dev": true, - "license": "MIT", "dependencies": { "call-bind": "^1.0.2", "has-tostringtag": "^1.0.0" @@ -8686,15 +9851,14 @@ } }, "node_modules/is-array-buffer": { - "version": "3.0.4", + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/is-array-buffer/-/is-array-buffer-3.0.2.tgz", + "integrity": "sha512-y+FyyR/w8vfIRq4eQcM1EYgSTnmHXPqaF+IgzgraytCFq5Xh8lllDVmAZolPJiZttZLeFSINPYMaEJ7/vWUa1w==", "dev": true, - "license": "MIT", "dependencies": { "call-bind": "^1.0.2", - "get-intrinsic": "^1.2.1" - }, - "engines": { - "node": ">= 0.4" + "get-intrinsic": "^1.2.0", + "is-typed-array": "^1.1.10" }, "funding": { "url": "https://github.com/sponsors/ljharb" @@ -8702,13 +9866,15 @@ }, "node_modules/is-arrayish": { "version": "0.2.1", - "dev": true, - "license": "MIT" + "resolved": "https://registry.npmjs.org/is-arrayish/-/is-arrayish-0.2.1.tgz", + "integrity": "sha512-zz06S8t0ozoDXMG+ube26zeCTNXcKIPJZJi8hBrF4idCLms4CG9QtK7qBl1boi5ODzFpjswb5JPmHCbMpjaYzg==", + "dev": true }, "node_modules/is-bigint": { "version": "1.0.4", + "resolved": "https://registry.npmjs.org/is-bigint/-/is-bigint-1.0.4.tgz", + "integrity": "sha512-zB9CruMamjym81i2JZ3UMn54PKGsQzsJeo6xvN3HJJ4CAsQNB6iRutp2To77OfCNuoxspsIhzaPoO1zyCEhFOg==", "dev": true, - "license": "MIT", "dependencies": { "has-bigints": "^1.0.1" }, @@ -8718,8 +9884,9 @@ }, "node_modules/is-boolean-object": { "version": "1.1.2", + "resolved": "https://registry.npmjs.org/is-boolean-object/-/is-boolean-object-1.1.2.tgz", + "integrity": "sha512-gDYaKHJmnj4aWxyj6YHyXVpdQawtVLHU5cb+eztPGczf6cjuTdwve5ZIEfgXqH4e57An1D1AKf8CZ3kYrQRqYA==", "dev": true, - "license": "MIT", "dependencies": { "call-bind": "^1.0.2", "has-tostringtag": "^1.0.0" @@ -8733,8 +9900,9 @@ }, "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==", "dev": true, - "license": "MIT", "engines": { "node": ">= 0.4" }, @@ -8744,8 +9912,9 @@ }, "node_modules/is-ci": { "version": "3.0.1", + "resolved": "https://registry.npmjs.org/is-ci/-/is-ci-3.0.1.tgz", + "integrity": "sha512-ZYvCgrefwqoQ6yTyYUbQu64HsITZ3NfKX1lzaEYdkTDcfKzzCI/wthRRYKkdjHKFVgNiXKAKm65Zo1pk2as/QQ==", "dev": true, - "license": "MIT", "dependencies": { "ci-info": "^3.2.0" }, @@ -8755,8 +9924,9 @@ }, "node_modules/is-core-module": { "version": "2.13.1", + "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.13.1.tgz", + "integrity": "sha512-hHrIjvZsftOsvKSn2TRYl63zvxsgE0K+0mYMoH6gD4omR5IWB2KynivBQczo3+wF1cCkjzvptnI9Q0sPU66ilw==", "dev": true, - "license": "MIT", "dependencies": { "hasown": "^2.0.0" }, @@ -8766,8 +9936,9 @@ }, "node_modules/is-date-object": { "version": "1.0.5", + "resolved": "https://registry.npmjs.org/is-date-object/-/is-date-object-1.0.5.tgz", + "integrity": "sha512-9YQaSxsAiSwcvS33MBk3wTCVnWK+HhF8VZR2jRxehM16QcVOdHqPn4VPHmRK4lSr38n9JriurInLcP90xsYNfQ==", "dev": true, - "license": "MIT", "dependencies": { "has-tostringtag": "^1.0.0" }, @@ -8780,8 +9951,9 @@ }, "node_modules/is-docker": { "version": "2.2.1", + "resolved": "https://registry.npmjs.org/is-docker/-/is-docker-2.2.1.tgz", + "integrity": "sha512-F+i2BKsFrH66iaUFc0woD8sLy8getkwTwtOBjvs56Cx4CgJDeKQeqfz8wAYiSb8JOprWhHH5p77PbmYCvvUuXQ==", "dev": true, - "license": "MIT", "bin": { "is-docker": "cli.js" }, @@ -8794,16 +9966,18 @@ }, "node_modules/is-extglob": { "version": "2.1.1", + "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", + "integrity": "sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ==", "dev": true, - "license": "MIT", "engines": { "node": ">=0.10.0" } }, "node_modules/is-fullwidth-code-point": { "version": "4.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-4.0.0.tgz", + "integrity": "sha512-O4L094N2/dZ7xqVdrXhh9r1KODPJpFms8B5sGdJLPy664AgvXsreZUyCQQNItZRDlYug4xStLjNp/sz3HvBowQ==", "dev": true, - "license": "MIT", "engines": { "node": ">=12" }, @@ -8813,16 +9987,18 @@ }, "node_modules/is-generator-fn": { "version": "2.1.0", + "resolved": "https://registry.npmjs.org/is-generator-fn/-/is-generator-fn-2.1.0.tgz", + "integrity": "sha512-cTIB4yPYL/Grw0EaSzASzg6bBy9gqCofvWN8okThAYIxKJZC+udlRAmGbM0XLeniEJSs8uEgHPGuHSe1XsOLSQ==", "dev": true, - "license": "MIT", "engines": { "node": ">=6" } }, "node_modules/is-generator-function": { "version": "1.0.10", + "resolved": "https://registry.npmjs.org/is-generator-function/-/is-generator-function-1.0.10.tgz", + "integrity": "sha512-jsEjy9l3yiXEQ+PsXdmBwEPcOxaXWLspKdplFUVI9vq1iZgIekeC0L167qeu86czQaxed3q/Uzuw0swL0irL8A==", "dev": true, - "license": "MIT", "dependencies": { "has-tostringtag": "^1.0.0" }, @@ -8835,8 +10011,9 @@ }, "node_modules/is-glob": { "version": "4.0.3", + "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.3.tgz", + "integrity": "sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==", "dev": true, - "license": "MIT", "dependencies": { "is-extglob": "^2.1.1" }, @@ -8846,21 +10023,24 @@ }, "node_modules/is-interactive": { "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-interactive/-/is-interactive-1.0.0.tgz", + "integrity": "sha512-2HvIEKRoqS62guEC+qBjpvRubdX910WCMuJTZ+I9yvqKU2/12eSL549HMwtabb4oupdj2sMP50k+XJfB/8JE6w==", "dev": true, - "license": "MIT", "engines": { "node": ">=8" } }, "node_modules/is-lambda": { "version": "1.0.1", - "dev": true, - "license": "MIT" + "resolved": "https://registry.npmjs.org/is-lambda/-/is-lambda-1.0.1.tgz", + "integrity": "sha512-z7CMFGNrENq5iFB9Bqo64Xk6Y9sg+epq1myIcdHaGnbMTYOxvzsEtdYqQUylB7LxfkvgrrjP32T6Ywciio9UIQ==", + "dev": true }, "node_modules/is-negative-zero": { - "version": "2.0.3", + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/is-negative-zero/-/is-negative-zero-2.0.2.tgz", + "integrity": "sha512-dqJvarLawXsFbNDeJW7zAz8ItJ9cd28YufuuFzh0G8pNHjJMnY08Dv7sYX2uF5UpQOwieAeOExEYAWWfu7ZZUA==", "dev": true, - "license": "MIT", "engines": { "node": ">= 0.4" }, @@ -8870,16 +10050,18 @@ }, "node_modules/is-number": { "version": "7.0.0", + "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz", + "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==", "dev": true, - "license": "MIT", "engines": { "node": ">=0.12.0" } }, "node_modules/is-number-object": { "version": "1.0.7", + "resolved": "https://registry.npmjs.org/is-number-object/-/is-number-object-1.0.7.tgz", + "integrity": "sha512-k1U0IRzLMo7ZlYIfzRu23Oh6MiIFasgpb9X76eqfFZAqwH44UI4KTBvBYIZ1dSL9ZzChTB9ShHfLkR4pdW5krQ==", "dev": true, - "license": "MIT", "dependencies": { "has-tostringtag": "^1.0.0" }, @@ -8892,40 +10074,45 @@ }, "node_modules/is-obj": { "version": "2.0.0", + "resolved": "https://registry.npmjs.org/is-obj/-/is-obj-2.0.0.tgz", + "integrity": "sha512-drqDG3cbczxxEJRoOXcOjtdp1J/lyp1mNn0xaznRs8+muBhgQcrnbspox5X5fOw0HnMnbfDzvnEMEtqDEJEo8w==", "dev": true, - "license": "MIT", "engines": { "node": ">=8" } }, "node_modules/is-path-inside": { "version": "3.0.3", + "resolved": "https://registry.npmjs.org/is-path-inside/-/is-path-inside-3.0.3.tgz", + "integrity": "sha512-Fd4gABb+ycGAmKou8eMftCupSir5lRxqf4aD/vd0cD2qc4HL07OjCeuHMr8Ro4CoMaeCKDB0/ECBOVWjTwUvPQ==", "dev": true, - "license": "MIT", "engines": { "node": ">=8" } }, "node_modules/is-plain-obj": { "version": "1.1.0", + "resolved": "https://registry.npmjs.org/is-plain-obj/-/is-plain-obj-1.1.0.tgz", + "integrity": "sha512-yvkRyxmFKEOQ4pNXCmJG5AEQNlXJS5LaONXo5/cLdTZdWvsZ1ioJEonLGAosKlMWE8lwUy/bJzMjcw8az73+Fg==", "dev": true, - "license": "MIT", "engines": { "node": ">=0.10.0" } }, "node_modules/is-plain-object": { "version": "5.0.0", + "resolved": "https://registry.npmjs.org/is-plain-object/-/is-plain-object-5.0.0.tgz", + "integrity": "sha512-VRSzKkbMm5jMDoKLbltAkFQ5Qr7VDiTFGXxYFXXowVj387GeGNOCsOH6Msy00SGZ3Fp84b1Naa1psqgcCIEP5Q==", "dev": true, - "license": "MIT", "engines": { "node": ">=0.10.0" } }, "node_modules/is-regex": { "version": "1.1.4", + "resolved": "https://registry.npmjs.org/is-regex/-/is-regex-1.1.4.tgz", + "integrity": "sha512-kvRdxDsxZjhzUX07ZnLydzS1TU/TJlTUHHY4YLL87e37oUA49DfkLqgy+VjFocowy29cKvcSiu+kIv728jTTVg==", "dev": true, - "license": "MIT", "dependencies": { "call-bind": "^1.0.2", "has-tostringtag": "^1.0.0" @@ -8938,14 +10125,12 @@ } }, "node_modules/is-shared-array-buffer": { - "version": "1.0.3", + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/is-shared-array-buffer/-/is-shared-array-buffer-1.0.2.tgz", + "integrity": "sha512-sqN2UDu1/0y6uvXyStCOzyhAjCSlHceFoMKJW8W9EU9cvic/QdsZ0kEU93HEy3IUEFZIiH/3w+AH/UQbPHNdhA==", "dev": true, - "license": "MIT", "dependencies": { - "call-bind": "^1.0.7" - }, - "engines": { - "node": ">= 0.4" + "call-bind": "^1.0.2" }, "funding": { "url": "https://github.com/sponsors/ljharb" @@ -8953,16 +10138,18 @@ }, "node_modules/is-ssh": { "version": "1.4.0", + "resolved": "https://registry.npmjs.org/is-ssh/-/is-ssh-1.4.0.tgz", + "integrity": "sha512-x7+VxdxOdlV3CYpjvRLBv5Lo9OJerlYanjwFrPR9fuGPjCiNiCzFgAWpiLAohSbsnH4ZAys3SBh+hq5rJosxUQ==", "dev": true, - "license": "MIT", "dependencies": { "protocols": "^2.0.1" } }, "node_modules/is-stream": { "version": "2.0.1", + "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-2.0.1.tgz", + "integrity": "sha512-hFoiJiTl63nn+kstHGBtewWSKnQLpyb155KHheA1l39uvtO9nWIop1p3udqPcUd/xbF1VLMO4n7OI6p7RbngDg==", "dev": true, - "license": "MIT", "engines": { "node": ">=8" }, @@ -8972,8 +10159,9 @@ }, "node_modules/is-string": { "version": "1.0.7", + "resolved": "https://registry.npmjs.org/is-string/-/is-string-1.0.7.tgz", + "integrity": "sha512-tE2UXzivje6ofPW7l23cjDOMa09gb7xlAqG6jG5ej6uPV32TlWP3NKPigtaGeHNu9fohccRYvIiZMfOOnOYUtg==", "dev": true, - "license": "MIT", "dependencies": { "has-tostringtag": "^1.0.0" }, @@ -8986,8 +10174,9 @@ }, "node_modules/is-symbol": { "version": "1.0.4", + "resolved": "https://registry.npmjs.org/is-symbol/-/is-symbol-1.0.4.tgz", + "integrity": "sha512-C/CPBqKWnvdcxqIARxyOh4v1UUEOCHpgDa0WYgpKDFMszcrPcffg5uhwSgPCLD2WWxmq6isisz87tzT01tuGhg==", "dev": true, - "license": "MIT", "dependencies": { "has-symbols": "^1.0.2" }, @@ -9000,8 +10189,9 @@ }, "node_modules/is-text-path": { "version": "1.0.1", + "resolved": "https://registry.npmjs.org/is-text-path/-/is-text-path-1.0.1.tgz", + "integrity": "sha512-xFuJpne9oFz5qDaodwmmG08e3CawH/2ZV8Qqza1Ko7Sk8POWbkRdwIoAWVhqvq0XeUzANEhKo2n0IXUGBm7A/w==", "dev": true, - "license": "MIT", "dependencies": { "text-extensions": "^1.0.0" }, @@ -9010,11 +10200,12 @@ } }, "node_modules/is-typed-array": { - "version": "1.1.13", + "version": "1.1.12", + "resolved": "https://registry.npmjs.org/is-typed-array/-/is-typed-array-1.1.12.tgz", + "integrity": "sha512-Z14TF2JNG8Lss5/HMqt0//T9JeHXttXy5pH/DBU4vi98ozO2btxzq9MwYDZYnKwU8nRsz/+GVFVRDq3DkVuSPg==", "dev": true, - "license": "MIT", "dependencies": { - "which-typed-array": "^1.1.14" + "which-typed-array": "^1.1.11" }, "engines": { "node": ">= 0.4" @@ -9025,8 +10216,9 @@ }, "node_modules/is-unicode-supported": { "version": "0.1.0", + "resolved": "https://registry.npmjs.org/is-unicode-supported/-/is-unicode-supported-0.1.0.tgz", + "integrity": "sha512-knxG2q4UC3u8stRGyAVJCOdxFmv5DZiRcdlIaAQXAbSfJya+OhopNotLQrstBhququ4ZpuKbDc/8S6mgXgPFPw==", "dev": true, - "license": "MIT", "engines": { "node": ">=10" }, @@ -9036,8 +10228,9 @@ }, "node_modules/is-weakref": { "version": "1.0.2", + "resolved": "https://registry.npmjs.org/is-weakref/-/is-weakref-1.0.2.tgz", + "integrity": "sha512-qctsuLZmIQ0+vSSMfoVvyFe2+GSEvnmZ2ezTup1SBse9+twCCeial6EEi3Nc2KFcf6+qz2FBPnjXsk8xhKSaPQ==", "dev": true, - "license": "MIT", "dependencies": { "call-bind": "^1.0.2" }, @@ -9047,8 +10240,9 @@ }, "node_modules/is-wsl": { "version": "2.2.0", + "resolved": "https://registry.npmjs.org/is-wsl/-/is-wsl-2.2.0.tgz", + "integrity": "sha512-fKzAra0rGJUUBwGBgNkHZuToZcn+TtXHpeCgmkMJMMYx1sQDYaCSyjJBSCa2nH1DGm7s3n1oBnohoVTBaN7Lww==", "dev": true, - "license": "MIT", "dependencies": { "is-docker": "^2.0.0" }, @@ -9058,38 +10252,43 @@ }, "node_modules/isarray": { "version": "2.0.5", - "dev": true, - "license": "MIT" + "resolved": "https://registry.npmjs.org/isarray/-/isarray-2.0.5.tgz", + "integrity": "sha512-xHjhDr3cNBK0BzdUJSPXZntQUx/mwMS5Rw4A7lPJ90XGAO6ISP/ePDNuo0vhqOZU+UD5JoodwCAAoZQd3FeAKw==", + "dev": true }, "node_modules/isexe": { "version": "2.0.0", - "dev": true, - "license": "ISC" + "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", + "integrity": "sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw==", + "dev": true }, "node_modules/isobject": { "version": "3.0.1", + "resolved": "https://registry.npmjs.org/isobject/-/isobject-3.0.1.tgz", + "integrity": "sha512-WhB9zCku7EGTj/HQQRz5aUQEUeoQZH2bWcltRErOpymJ4boYE6wL9Tbr23krRPSZ+C5zqNSrSw+Cc7sZZ4b7vg==", "dev": true, - "license": "MIT", "engines": { "node": ">=0.10.0" } }, "node_modules/istanbul-lib-coverage": { "version": "3.2.2", + "resolved": "https://registry.npmjs.org/istanbul-lib-coverage/-/istanbul-lib-coverage-3.2.2.tgz", + "integrity": "sha512-O8dpsF+r0WV/8MNRKfnmrtCWhuKjxrq2w+jpzBL5UZKTi2LeVWnWOmWRxFlesJONmc+wLAGvKQZEOanko0LFTg==", "dev": true, - "license": "BSD-3-Clause", "engines": { "node": ">=8" } }, "node_modules/istanbul-lib-instrument": { - "version": "6.0.2", + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/istanbul-lib-instrument/-/istanbul-lib-instrument-6.0.1.tgz", + "integrity": "sha512-EAMEJBsYuyyztxMxW3g7ugGPkrZsV57v0Hmv3mm1uQsmB+QnZuepg731CRaIgeUVSdmsTngOkSnauNF8p7FIhA==", "dev": true, - "license": "BSD-3-Clause", "dependencies": { - "@babel/core": "^7.23.9", - "@babel/parser": "^7.23.9", - "@istanbuljs/schema": "^0.1.3", + "@babel/core": "^7.12.3", + "@babel/parser": "^7.14.7", + "@istanbuljs/schema": "^0.1.2", "istanbul-lib-coverage": "^3.2.0", "semver": "^7.5.4" }, @@ -9099,8 +10298,9 @@ }, "node_modules/istanbul-lib-report": { "version": "3.0.1", + "resolved": "https://registry.npmjs.org/istanbul-lib-report/-/istanbul-lib-report-3.0.1.tgz", + "integrity": "sha512-GCfE1mtsHGOELCU8e/Z7YWzpmybrx/+dSTfLrvY8qRmaY6zXTKWn6WQIjaAFw069icm6GVMNkgu0NzI4iPZUNw==", "dev": true, - "license": "BSD-3-Clause", "dependencies": { "istanbul-lib-coverage": "^3.0.0", "make-dir": "^4.0.0", @@ -9112,8 +10312,9 @@ }, "node_modules/istanbul-lib-source-maps": { "version": "4.0.1", + "resolved": "https://registry.npmjs.org/istanbul-lib-source-maps/-/istanbul-lib-source-maps-4.0.1.tgz", + "integrity": "sha512-n3s8EwkdFIJCG3BPKBYvskgXGoy88ARzvegkitk60NxRdwltLOTaH7CUiMRXvwYorl0Q712iEjcWB+fK/MrWVw==", "dev": true, - "license": "BSD-3-Clause", "dependencies": { "debug": "^4.1.1", "istanbul-lib-coverage": "^3.0.0", @@ -9124,9 +10325,10 @@ } }, "node_modules/istanbul-reports": { - "version": "3.1.7", + "version": "3.1.6", + "resolved": "https://registry.npmjs.org/istanbul-reports/-/istanbul-reports-3.1.6.tgz", + "integrity": "sha512-TLgnMkKg3iTDsQ9PbPTdpfAK2DzjF9mqUG7RMgcQl8oFjad8ob4laGxv5XV5U9MAfx8D6tSJiUyuAwzLicaxlg==", "dev": true, - "license": "BSD-3-Clause", "dependencies": { "html-escaper": "^2.0.0", "istanbul-lib-report": "^3.0.0" @@ -9137,8 +10339,9 @@ }, "node_modules/jackspeak": { "version": "2.3.6", + "resolved": "https://registry.npmjs.org/jackspeak/-/jackspeak-2.3.6.tgz", + "integrity": "sha512-N3yCS/NegsOBokc8GAdM8UcmfsKiSS8cipheD/nivzr700H+nsMOxJjQnvwOcRYVuFkdH0wGUvW2WbXGmrZGbQ==", "dev": true, - "license": "BlueOak-1.0.0", "dependencies": { "@isaacs/cliui": "^8.0.2" }, @@ -9154,8 +10357,9 @@ }, "node_modules/jake": { "version": "10.8.7", + "resolved": "https://registry.npmjs.org/jake/-/jake-10.8.7.tgz", + "integrity": "sha512-ZDi3aP+fG/LchyBzUM804VjddnwfSfsdeYkwt8NcbKRvo4rFkjhs456iLFn3k2ZUWvNe4i48WACDbza8fhq2+w==", "dev": true, - "license": "Apache-2.0", "dependencies": { "async": "^3.2.3", "chalk": "^4.0.2", @@ -9171,8 +10375,9 @@ }, "node_modules/jake/node_modules/brace-expansion": { "version": "1.1.11", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", + "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", "dev": true, - "license": "MIT", "dependencies": { "balanced-match": "^1.0.0", "concat-map": "0.0.1" @@ -9180,8 +10385,9 @@ }, "node_modules/jake/node_modules/minimatch": { "version": "3.1.2", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", + "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", "dev": true, - "license": "ISC", "dependencies": { "brace-expansion": "^1.1.7" }, @@ -9191,8 +10397,9 @@ }, "node_modules/jest": { "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest/-/jest-29.7.0.tgz", + "integrity": "sha512-NIy3oAFp9shda19hy4HK0HRTWKtPJmGdnvywu01nOqNC2vZg+Z+fvJDxpMQA88eb2I9EcafcdjYgsDthnYTvGw==", "dev": true, - "license": "MIT", "dependencies": { "@jest/core": "^29.7.0", "@jest/types": "^29.6.3", @@ -9216,8 +10423,9 @@ }, "node_modules/jest-changed-files": { "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-changed-files/-/jest-changed-files-29.7.0.tgz", + "integrity": "sha512-fEArFiwf1BpQ+4bXSprcDc3/x4HSzL4al2tozwVpDFpsxALjLYdyiIK4e5Vz66GQJIbXJ82+35PtysofptNX2w==", "dev": true, - "license": "MIT", "dependencies": { "execa": "^5.0.0", "jest-util": "^29.7.0", @@ -9229,8 +10437,9 @@ }, "node_modules/jest-circus": { "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-circus/-/jest-circus-29.7.0.tgz", + "integrity": "sha512-3E1nCMgipcTkCocFwM90XXQab9bS+GMsjdpmPrlelaxwD93Ad8iVEjX/vvHPdLPnFf+L40u+5+iutRdA1N9myw==", "dev": true, - "license": "MIT", "dependencies": { "@jest/environment": "^29.7.0", "@jest/expect": "^29.7.0", @@ -9259,8 +10468,9 @@ }, "node_modules/jest-cli": { "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-cli/-/jest-cli-29.7.0.tgz", + "integrity": "sha512-OVVobw2IubN/GSYsxETi+gOe7Ka59EFMR/twOU3Jb2GnKKeMGJB5SGUUrEz3SFVmJASUdZUzy83sLNNQ2gZslg==", "dev": true, - "license": "MIT", "dependencies": { "@jest/core": "^29.7.0", "@jest/test-result": "^29.7.0", @@ -9291,8 +10501,9 @@ }, "node_modules/jest-config": { "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-config/-/jest-config-29.7.0.tgz", + "integrity": "sha512-uXbpfeQ7R6TZBqI3/TxCU4q4ttk3u0PJeC+E0zbfSoSjq6bJ7buBPxzQPL0ifrkY4DNu4JUdk0ImlBUYi840eQ==", "dev": true, - "license": "MIT", "dependencies": { "@babel/core": "^7.11.6", "@jest/test-sequencer": "^29.7.0", @@ -9335,8 +10546,9 @@ }, "node_modules/jest-diff": { "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-diff/-/jest-diff-29.7.0.tgz", + "integrity": "sha512-LMIgiIrhigmPrs03JHpxUh2yISK3vLFPkAodPeo0+BuF7wA2FoQbkEg1u8gBYBThncu7e1oEDUfIXVuTqLRUjw==", "dev": true, - "license": "MIT", "dependencies": { "chalk": "^4.0.0", "diff-sequences": "^29.6.3", @@ -9349,8 +10561,9 @@ }, "node_modules/jest-docblock": { "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-docblock/-/jest-docblock-29.7.0.tgz", + "integrity": "sha512-q617Auw3A612guyaFgsbFeYpNP5t2aoUNLwBUbc/0kD1R4t9ixDbyFTHd1nok4epoVFpr7PmeWHrhvuV3XaJ4g==", "dev": true, - "license": "MIT", "dependencies": { "detect-newline": "^3.0.0" }, @@ -9360,8 +10573,9 @@ }, "node_modules/jest-each": { "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-each/-/jest-each-29.7.0.tgz", + "integrity": "sha512-gns+Er14+ZrEoC5fhOfYCY1LOHHr0TI+rQUHZS8Ttw2l7gl+80eHc/gFf2Ktkw0+SIACDTeWvpFcv3B04VembQ==", "dev": true, - "license": "MIT", "dependencies": { "@jest/types": "^29.6.3", "chalk": "^4.0.0", @@ -9375,8 +10589,9 @@ }, "node_modules/jest-environment-node": { "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-environment-node/-/jest-environment-node-29.7.0.tgz", + "integrity": "sha512-DOSwCRqXirTOyheM+4d5YZOrWcdu0LNZ87ewUoywbcb2XR4wKgqiG8vNeYwhjFMbEkfju7wx2GYH0P2gevGvFw==", "dev": true, - "license": "MIT", "dependencies": { "@jest/environment": "^29.7.0", "@jest/fake-timers": "^29.7.0", @@ -9391,16 +10606,18 @@ }, "node_modules/jest-get-type": { "version": "29.6.3", + "resolved": "https://registry.npmjs.org/jest-get-type/-/jest-get-type-29.6.3.tgz", + "integrity": "sha512-zrteXnqYxfQh7l5FHyL38jL39di8H8rHoecLH3JNxH3BwOrBsNeabdap5e0I23lD4HHI8W5VFBZqG4Eaq5LNcw==", "dev": true, - "license": "MIT", "engines": { "node": "^14.15.0 || ^16.10.0 || >=18.0.0" } }, "node_modules/jest-haste-map": { "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-haste-map/-/jest-haste-map-29.7.0.tgz", + "integrity": "sha512-fP8u2pyfqx0K1rGn1R9pyE0/KTn+G7PxktWidOBTqFPLYX0b9ksaMFkhK5vrS3DVun09pckLdlx90QthlW7AmA==", "dev": true, - "license": "MIT", "dependencies": { "@jest/types": "^29.6.3", "@types/graceful-fs": "^4.1.3", @@ -9423,8 +10640,9 @@ }, "node_modules/jest-leak-detector": { "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-leak-detector/-/jest-leak-detector-29.7.0.tgz", + "integrity": "sha512-kYA8IJcSYtST2BY9I+SMC32nDpBT3J2NvWJx8+JCuCdl/CR1I4EKUJROiP8XtCcxqgTTBGJNdbB1A8XRKbTetw==", "dev": true, - "license": "MIT", "dependencies": { "jest-get-type": "^29.6.3", "pretty-format": "^29.7.0" @@ -9435,8 +10653,9 @@ }, "node_modules/jest-matcher-utils": { "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-matcher-utils/-/jest-matcher-utils-29.7.0.tgz", + "integrity": "sha512-sBkD+Xi9DtcChsI3L3u0+N0opgPYnCRPtGcQYrgXmR+hmt/fYfWAL0xRXYU8eWOdfuLgBe0YCW3AFtnRLagq/g==", "dev": true, - "license": "MIT", "dependencies": { "chalk": "^4.0.0", "jest-diff": "^29.7.0", @@ -9449,8 +10668,9 @@ }, "node_modules/jest-message-util": { "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-message-util/-/jest-message-util-29.7.0.tgz", + "integrity": "sha512-GBEV4GRADeP+qtB2+6u61stea8mGcOT4mCtrYISZwfu9/ISHFJ/5zOMXYbpBE9RsS5+Gb63DW4FgmnKJ79Kf6w==", "dev": true, - "license": "MIT", "dependencies": { "@babel/code-frame": "^7.12.13", "@jest/types": "^29.6.3", @@ -9468,8 +10688,9 @@ }, "node_modules/jest-mock": { "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-mock/-/jest-mock-29.7.0.tgz", + "integrity": "sha512-ITOMZn+UkYS4ZFh83xYAOzWStloNzJFO2s8DWrE4lhtGD+AorgnbkiKERe4wQVBydIGPx059g6riW5Btp6Llnw==", "dev": true, - "license": "MIT", "dependencies": { "@jest/types": "^29.6.3", "@types/node": "*", @@ -9481,8 +10702,9 @@ }, "node_modules/jest-pnp-resolver": { "version": "1.2.3", + "resolved": "https://registry.npmjs.org/jest-pnp-resolver/-/jest-pnp-resolver-1.2.3.tgz", + "integrity": "sha512-+3NpwQEnRoIBtx4fyhblQDPgJI0H1IEIkX7ShLUjPGA7TtUTvI1oiKi3SR4oBR0hQhQR80l4WAe5RrXBwWMA8w==", "dev": true, - "license": "MIT", "engines": { "node": ">=6" }, @@ -9497,16 +10719,18 @@ }, "node_modules/jest-regex-util": { "version": "29.6.3", + "resolved": "https://registry.npmjs.org/jest-regex-util/-/jest-regex-util-29.6.3.tgz", + "integrity": "sha512-KJJBsRCyyLNWCNBOvZyRDnAIfUiRJ8v+hOBQYGn8gDyF3UegwiP4gwRR3/SDa42g1YbVycTidUF3rKjyLFDWbg==", "dev": true, - "license": "MIT", "engines": { "node": "^14.15.0 || ^16.10.0 || >=18.0.0" } }, "node_modules/jest-resolve": { "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-resolve/-/jest-resolve-29.7.0.tgz", + "integrity": "sha512-IOVhZSrg+UvVAshDSDtHyFCCBUl/Q3AAJv8iZ6ZjnZ74xzvwuzLXid9IIIPgTnY62SJjfuupMKZsZQRsCvxEgA==", "dev": true, - "license": "MIT", "dependencies": { "chalk": "^4.0.0", "graceful-fs": "^4.2.9", @@ -9524,8 +10748,9 @@ }, "node_modules/jest-resolve-dependencies": { "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-resolve-dependencies/-/jest-resolve-dependencies-29.7.0.tgz", + "integrity": "sha512-un0zD/6qxJ+S0et7WxeI3H5XSe9lTBBR7bOHCHXkKR6luG5mwDDlIzVQ0V5cZCuoTgEdcdwzTghYkTWfubi+nA==", "dev": true, - "license": "MIT", "dependencies": { "jest-regex-util": "^29.6.3", "jest-snapshot": "^29.7.0" @@ -9536,8 +10761,9 @@ }, "node_modules/jest-runner": { "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-runner/-/jest-runner-29.7.0.tgz", + "integrity": "sha512-fsc4N6cPCAahybGBfTRcq5wFR6fpLznMg47sY5aDpsoejOcVYFb07AHuSnR0liMcPTgBsA3ZJL6kFOjPdoNipQ==", "dev": true, - "license": "MIT", "dependencies": { "@jest/console": "^29.7.0", "@jest/environment": "^29.7.0", @@ -9567,8 +10793,9 @@ }, "node_modules/jest-runner-groups": { "version": "2.2.0", + "resolved": "https://registry.npmjs.org/jest-runner-groups/-/jest-runner-groups-2.2.0.tgz", + "integrity": "sha512-Sp/B9ZX0CDAKa9dIkgH0sGyl2eDuScV4SVvOxqhBMxqWpsNAkmol/C58aTFmPWZj+C0ZTW1r1BSu66MTCN+voA==", "dev": true, - "license": "MIT", "engines": { "node": ">= 10.14.2" }, @@ -9579,8 +10806,9 @@ }, "node_modules/jest-runner/node_modules/source-map-support": { "version": "0.5.13", + "resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.5.13.tgz", + "integrity": "sha512-SHSKFHadjVA5oR4PPqhtAVdcBWwRYVd6g6cAXnIbRiIwc2EhPrTuKUBdSLvlEKyIP3GCf89fltvcZiP9MMFA1w==", "dev": true, - "license": "MIT", "dependencies": { "buffer-from": "^1.0.0", "source-map": "^0.6.0" @@ -9588,8 +10816,9 @@ }, "node_modules/jest-runtime": { "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-runtime/-/jest-runtime-29.7.0.tgz", + "integrity": "sha512-gUnLjgwdGqW7B4LvOIkbKs9WGbn+QLqRQQ9juC6HndeDiezIwhDP+mhMwHWCEcfQ5RUXa6OPnFF8BJh5xegwwQ==", "dev": true, - "license": "MIT", "dependencies": { "@jest/environment": "^29.7.0", "@jest/fake-timers": "^29.7.0", @@ -9620,8 +10849,9 @@ }, "node_modules/jest-snapshot": { "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-snapshot/-/jest-snapshot-29.7.0.tgz", + "integrity": "sha512-Rm0BMWtxBcioHr1/OX5YCP8Uov4riHvKPknOGs804Zg9JGZgmIBkbtlxJC/7Z4msKYVbIJtfU+tKb8xlYNfdkw==", "dev": true, - "license": "MIT", "dependencies": { "@babel/core": "^7.11.6", "@babel/generator": "^7.7.2", @@ -9650,8 +10880,9 @@ }, "node_modules/jest-util": { "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-util/-/jest-util-29.7.0.tgz", + "integrity": "sha512-z6EbKajIpqGKU56y5KBUgy1dt1ihhQJgWzUlZHArA/+X2ad7Cb5iF+AK1EWVL/Bo7Rz9uurpqw6SiBCefUbCGA==", "dev": true, - "license": "MIT", "dependencies": { "@jest/types": "^29.6.3", "@types/node": "*", @@ -9666,8 +10897,9 @@ }, "node_modules/jest-validate": { "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-validate/-/jest-validate-29.7.0.tgz", + "integrity": "sha512-ZB7wHqaRGVw/9hST/OuFUReG7M8vKeq0/J2egIGLdvjHCmYqGARhzXmtgi+gVeZ5uXFF219aOc3Ls2yLg27tkw==", "dev": true, - "license": "MIT", "dependencies": { "@jest/types": "^29.6.3", "camelcase": "^6.2.0", @@ -9682,8 +10914,9 @@ }, "node_modules/jest-validate/node_modules/camelcase": { "version": "6.3.0", + "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-6.3.0.tgz", + "integrity": "sha512-Gmy6FhYlCY7uOElZUSbxo2UCDH8owEk996gkbrpsgGtrJLM3J7jGxl9Ic7Qwwj4ivOE5AWZWRMecDdF7hqGjFA==", "dev": true, - "license": "MIT", "engines": { "node": ">=10" }, @@ -9693,8 +10926,9 @@ }, "node_modules/jest-watcher": { "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-watcher/-/jest-watcher-29.7.0.tgz", + "integrity": "sha512-49Fg7WXkU3Vl2h6LbLtMQ/HyB6rXSIX7SqvBLQmssRBGN9I0PNvPmAmCWSOY6SOvrjhI/F7/bGAv9RtnsPA03g==", "dev": true, - "license": "MIT", "dependencies": { "@jest/test-result": "^29.7.0", "@jest/types": "^29.6.3", @@ -9711,8 +10945,9 @@ }, "node_modules/jest-worker": { "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-worker/-/jest-worker-29.7.0.tgz", + "integrity": "sha512-eIz2msL/EzL9UFTFFx7jBTkeZfku0yUAyZZZmJ93H2TYEiroIx2PQjEXcwYtYl8zXCxb+PAmA2hLIt/6ZEkPHw==", "dev": true, - "license": "MIT", "dependencies": { "@types/node": "*", "jest-util": "^29.7.0", @@ -9725,8 +10960,9 @@ }, "node_modules/jest-worker/node_modules/supports-color": { "version": "8.1.1", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-8.1.1.tgz", + "integrity": "sha512-MpUEN2OodtUzxvKQl72cUF7RQ5EiHsGvSsVG0ia9c5RbWGL2CI4C7EpPS8UTBIplnlzZiNuV56w+FuNxy3ty2Q==", "dev": true, - "license": "MIT", "dependencies": { "has-flag": "^4.0.0" }, @@ -9739,20 +10975,23 @@ }, "node_modules/jmespath": { "version": "0.16.0", - "license": "Apache-2.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", - "dev": true, - "license": "MIT" + "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz", + "integrity": "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==", + "dev": true }, "node_modules/js-yaml": { "version": "4.1.0", + "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.0.tgz", + "integrity": "sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA==", "dev": true, - "license": "MIT", "dependencies": { "argparse": "^2.0.1" }, @@ -9762,13 +11001,15 @@ }, "node_modules/jsbn": { "version": "1.1.0", - "dev": true, - "license": "MIT" + "resolved": "https://registry.npmjs.org/jsbn/-/jsbn-1.1.0.tgz", + "integrity": "sha512-4bYVV3aAMtDTTu4+xsDYa6sy9GyJ69/amsu9sYF2zqjiEoZA5xJi3BrfX3uY+/IekIu7MwdObdbDWpoZdBv3/A==", + "dev": true }, "node_modules/jsesc": { "version": "2.5.2", + "resolved": "https://registry.npmjs.org/jsesc/-/jsesc-2.5.2.tgz", + "integrity": "sha512-OYu7XEzjkCQ3C5Ps3QIZsQfNpqoJyZZA99wd9aWd05NCtC5pWOkShK2mkL6HXQR6/Cy2lbNdPlZBpuQHXE63gA==", "dev": true, - "license": "MIT", "bin": { "jsesc": "bin/jsesc" }, @@ -9778,38 +11019,45 @@ }, "node_modules/json-buffer": { "version": "3.0.1", - "dev": true, - "license": "MIT" + "resolved": "https://registry.npmjs.org/json-buffer/-/json-buffer-3.0.1.tgz", + "integrity": "sha512-4bV5BfR2mqfQTJm+V5tPPdf+ZpuhiIvTuAB5g8kcrXOZpTT/QwwVRWBywX1ozr6lEuPdbHxwaJlm9G6mI2sfSQ==", + "dev": true }, "node_modules/json-parse-better-errors": { "version": "1.0.2", - "dev": true, - "license": "MIT" + "resolved": "https://registry.npmjs.org/json-parse-better-errors/-/json-parse-better-errors-1.0.2.tgz", + "integrity": "sha512-mrqyZKfX5EhL7hvqcV6WG1yYjnjeuYDzDhhcAAUrq8Po85NBQBJP+ZDUT75qZQ98IkUoBqdkExkukOU7Ts2wrw==", + "dev": true }, "node_modules/json-parse-even-better-errors": { "version": "2.3.1", - "dev": true, - "license": "MIT" + "resolved": "https://registry.npmjs.org/json-parse-even-better-errors/-/json-parse-even-better-errors-2.3.1.tgz", + "integrity": "sha512-xyFwyhro/JEof6Ghe2iz2NcXoj2sloNsWr/XsERDK/oiPCfaNhl5ONfp+jQdAZRQQ0IJWNzH9zIZF7li91kh2w==", + "dev": true }, "node_modules/json-schema-traverse": { "version": "0.4.1", - "dev": true, - "license": "MIT" + "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz", + "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==", + "dev": true }, "node_modules/json-stable-stringify-without-jsonify": { "version": "1.0.1", - "dev": true, - "license": "MIT" + "resolved": "https://registry.npmjs.org/json-stable-stringify-without-jsonify/-/json-stable-stringify-without-jsonify-1.0.1.tgz", + "integrity": "sha512-Bdboy+l7tA3OGW6FjyFHWkP5LuByj1Tk33Ljyq0axyzdk9//JSi2u3fP1QSmd1KNwq6VOKYGlAu87CisVir6Pw==", + "dev": true }, "node_modules/json-stringify-safe": { "version": "5.0.1", - "dev": true, - "license": "ISC" + "resolved": "https://registry.npmjs.org/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz", + "integrity": "sha512-ZClg6AaYvamvYEE82d3Iyd3vSSIjQ+odgjaTzRuO3s7toCdFKczob2i0zCh7JE8kWn17yvAWhUVxvqGwUalsRA==", + "dev": true }, "node_modules/json5": { "version": "2.2.3", + "resolved": "https://registry.npmjs.org/json5/-/json5-2.2.3.tgz", + "integrity": "sha512-XmOWe7eyHYH14cLdVPoyg+GOH3rYX++KpzrylJwSW98t3Nk+U8XOl8FWKOgwtzdb8lXGf6zYwDUzeHMWfxasyg==", "dev": true, - "license": "MIT", "bin": { "json5": "lib/cli.js" }, @@ -9819,13 +11067,15 @@ }, "node_modules/jsonc-parser": { "version": "3.2.0", - "dev": true, - "license": "MIT" + "resolved": "https://registry.npmjs.org/jsonc-parser/-/jsonc-parser-3.2.0.tgz", + "integrity": "sha512-gfFQZrcTc8CnKXp6Y4/CBT3fTc0OVuDofpre4aEeEpSBPV5X5v4+Vmx+8snU7RLPrNHPKSgLxGo9YuQzz20o+w==", + "dev": true }, "node_modules/jsonfile": { "version": "6.1.0", + "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-6.1.0.tgz", + "integrity": "sha512-5dgndWOriYSm5cnYaJNhalLNDKOqFwyDB/rr1E9ZsGciGvKPs8R2xYGCacuf3z6K1YKDz182fd+fY3cn3pMqXQ==", "dev": true, - "license": "MIT", "dependencies": { "universalify": "^2.0.0" }, @@ -9835,16 +11085,18 @@ }, "node_modules/jsonparse": { "version": "1.3.1", + "resolved": "https://registry.npmjs.org/jsonparse/-/jsonparse-1.3.1.tgz", + "integrity": "sha512-POQXvpdL69+CluYsillJ7SUhKvytYjW9vG/GKpnf+xP8UWgYEM/RaMzHHofbALDiKbbP1W8UEYmgGl39WkPZsg==", "dev": true, "engines": [ "node >= 0.2.0" - ], - "license": "MIT" + ] }, "node_modules/JSONStream": { "version": "1.3.5", + "resolved": "https://registry.npmjs.org/JSONStream/-/JSONStream-1.3.5.tgz", + "integrity": "sha512-E+iruNOY8VV9s4JEbe1aNEm6MiszPRr/UfcHMz0TQh1BXSxHK+ASV1R6W4HpjBhSeS+54PIsAMCBmwD06LLsqQ==", "dev": true, - "license": "(MIT OR Apache-2.0)", "dependencies": { "jsonparse": "^1.2.0", "through": ">=2.2.7 <3" @@ -9858,29 +11110,33 @@ }, "node_modules/just-extend": { "version": "6.2.0", - "dev": true, - "license": "MIT" + "resolved": "https://registry.npmjs.org/just-extend/-/just-extend-6.2.0.tgz", + "integrity": "sha512-cYofQu2Xpom82S6qD778jBDpwvvy39s1l/hrYij2u9AMdQcGRpaBu6kY4mVhuno5kJVi1DAz4aiphA2WI1/OAw==", + "dev": true }, "node_modules/keyv": { "version": "4.5.4", + "resolved": "https://registry.npmjs.org/keyv/-/keyv-4.5.4.tgz", + "integrity": "sha512-oxVHkHR/EJf2CNXnWxRLW6mg7JyCCUcG0DtEGmL2ctUo1PNTin1PUil+r/+4r5MpVgC/fn1kjsx7mjSujKqIpw==", "dev": true, - "license": "MIT", "dependencies": { "json-buffer": "3.0.1" } }, "node_modules/kind-of": { "version": "6.0.3", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.3.tgz", + "integrity": "sha512-dcS1ul+9tmeD95T+x28/ehLgd9mENa3LsvDTtzm3vyBEO7RPptvAD+t44WVXaUjTBRcrpFeFlC8WCruUR456hw==", "dev": true, - "license": "MIT", "engines": { "node": ">=0.10.0" } }, "node_modules/kleur": { "version": "3.0.3", + "resolved": "https://registry.npmjs.org/kleur/-/kleur-3.0.3.tgz", + "integrity": "sha512-eTIzlVOSUR+JxdDFepEYcBMtZ9Qqdef+rnzWdRZuMbOywu5tO2w2N7rqjoANZ5k9vywhL6Br1VRjUIgTQx4E8w==", "dev": true, - "license": "MIT", "engines": { "node": ">=6" } @@ -9891,8 +11147,9 @@ }, "node_modules/lerna": { "version": "8.1.2", + "resolved": "https://registry.npmjs.org/lerna/-/lerna-8.1.2.tgz", + "integrity": "sha512-RCyBAn3XsqqvHbz3TxLfD7ylqzCi1A2UJnFEZmhURgx589vM3qYWQa/uOMeEEf565q6cAdtmulITciX1wgkAtw==", "dev": true, - "license": "MIT", "dependencies": { "@lerna/create": "8.1.2", "@npmcli/run-script": "7.0.2", @@ -9978,8 +11235,9 @@ }, "node_modules/lerna/node_modules/brace-expansion": { "version": "1.1.11", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", + "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", "dev": true, - "license": "MIT", "dependencies": { "balanced-match": "^1.0.0", "concat-map": "0.0.1" @@ -9987,8 +11245,9 @@ }, "node_modules/lerna/node_modules/chalk": { "version": "4.1.0", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.0.tgz", + "integrity": "sha512-qwx12AxXe2Q5xQ43Ac//I6v5aXTipYrSESdOgzrN+9XjgEpyjpKuvSGaN4qE93f7TQTlerQQ8S+EQ0EyDoVL1A==", "dev": true, - "license": "MIT", "dependencies": { "ansi-styles": "^4.1.0", "supports-color": "^7.1.0" @@ -10002,13 +11261,15 @@ }, "node_modules/lerna/node_modules/dedent": { "version": "0.7.0", - "dev": true, - "license": "MIT" + "resolved": "https://registry.npmjs.org/dedent/-/dedent-0.7.0.tgz", + "integrity": "sha512-Q6fKUPqnAHAyhiUgFU7BUzLiv0kd8saH9al7tnu5Q/okj6dnupxyTgFIBjVzJATdfIAm9NAsvXNzjaKa+bxVyA==", + "dev": true }, "node_modules/lerna/node_modules/execa": { "version": "5.0.0", + "resolved": "https://registry.npmjs.org/execa/-/execa-5.0.0.tgz", + "integrity": "sha512-ov6w/2LCiuyO4RLYGdpFGjkcs0wMTgGE8PrkTHikeUy5iJekXyPIKUjifk5CsE0pt7sMCrMZ3YNqoCj6idQOnQ==", "dev": true, - "license": "MIT", "dependencies": { "cross-spawn": "^7.0.3", "get-stream": "^6.0.0", @@ -10029,8 +11290,9 @@ }, "node_modules/lerna/node_modules/get-stream": { "version": "6.0.0", + "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-6.0.0.tgz", + "integrity": "sha512-A1B3Bh1UmL0bidM/YX2NsCOTnGJePL9rO/M+Mw3m9f2gUpfokS0hi5Eah0WSUEWZdZhIZtMjkIYS7mDfOqNHbg==", "dev": true, - "license": "MIT", "engines": { "node": ">=10" }, @@ -10040,8 +11302,9 @@ }, "node_modules/lerna/node_modules/glob": { "version": "9.3.5", + "resolved": "https://registry.npmjs.org/glob/-/glob-9.3.5.tgz", + "integrity": "sha512-e1LleDykUz2Iu+MTYdkSsuWX8lvAjAcs0Xef0lNIu0S2wOAzuTxCJtcd9S3cijlwYF18EsU3rzb8jPVobxDh9Q==", "dev": true, - "license": "ISC", "dependencies": { "fs.realpath": "^1.0.0", "minimatch": "^8.0.2", @@ -10057,8 +11320,9 @@ }, "node_modules/lerna/node_modules/glob-parent": { "version": "5.1.2", + "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz", + "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==", "dev": true, - "license": "ISC", "dependencies": { "is-glob": "^4.0.1" }, @@ -10068,16 +11332,18 @@ }, "node_modules/lerna/node_modules/glob/node_modules/brace-expansion": { "version": "2.0.1", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz", + "integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==", "dev": true, - "license": "MIT", "dependencies": { "balanced-match": "^1.0.0" } }, "node_modules/lerna/node_modules/glob/node_modules/minimatch": { "version": "8.0.4", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-8.0.4.tgz", + "integrity": "sha512-W0Wvr9HyFXZRGIDgCicunpQ299OKXs9RgZfaukz4qAW/pJhcpUfupc9c+OObPOFueNy8VSrZgEmDtk6Kh4WzDA==", "dev": true, - "license": "ISC", "dependencies": { "brace-expansion": "^2.0.1" }, @@ -10090,16 +11356,18 @@ }, "node_modules/lerna/node_modules/is-stream": { "version": "2.0.0", + "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-2.0.0.tgz", + "integrity": "sha512-XCoy+WlUr7d1+Z8GgSuXmpuUFC9fOhRXglJMx+dwLKTkL44Cjd4W1Z5P+BQZpr+cR93aGP4S/s7Ftw6Nd/kiEw==", "dev": true, - "license": "MIT", "engines": { "node": ">=8" } }, "node_modules/lerna/node_modules/minimatch": { "version": "3.0.5", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.5.tgz", + "integrity": "sha512-tUpxzX0VAzJHjLu0xUfFv1gwVp9ba3IOuRAVH2EGuRW8a5emA2FlACLqiT/lDVtS1W+TGNwqz3sWaNyLgDJWuw==", "dev": true, - "license": "ISC", "dependencies": { "brace-expansion": "^1.1.7" }, @@ -10109,24 +11377,27 @@ }, "node_modules/lerna/node_modules/minipass": { "version": "4.2.8", + "resolved": "https://registry.npmjs.org/minipass/-/minipass-4.2.8.tgz", + "integrity": "sha512-fNzuVyifolSLFL4NzpF+wEF4qrgqaaKX0haXPQEdQ7NKAN+WecoKMHV09YcuL/DHxrUsYQOK3MiuDf7Ip2OXfQ==", "dev": true, - "license": "ISC", "engines": { "node": ">=8" } }, "node_modules/lerna/node_modules/resolve-from": { "version": "5.0.0", + "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-5.0.0.tgz", + "integrity": "sha512-qYg9KP24dD5qka9J47d0aVky0N+b4fTU89LN9iDnjB5waksiC49rvMB0PrUJQGoTmH50XPiqOvAjDfaijGxYZw==", "dev": true, - "license": "MIT", "engines": { "node": ">=8" } }, "node_modules/lerna/node_modules/rimraf": { "version": "4.4.1", + "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-4.4.1.tgz", + "integrity": "sha512-Gk8NlF062+T9CqNGn6h4tls3k6T1+/nXdOcSZVikNVtlRdYpA7wRJJMoXmuvOnLW844rPjdQ7JgXCYM6PPC/og==", "dev": true, - "license": "ISC", "dependencies": { "glob": "^9.2.0" }, @@ -10140,10 +11411,24 @@ "url": "https://github.com/sponsors/isaacs" } }, + "node_modules/lerna/node_modules/uuid": { + "version": "9.0.1", + "resolved": "https://registry.npmjs.org/uuid/-/uuid-9.0.1.tgz", + "integrity": "sha512-b+1eJOlsR9K8HJpow9Ok3fiWOWSIcIzXodvv0rQjVoOVNpWMpxf1wZNpt4y9h10odCNrqnYp1OBzRktckBe3sA==", + "dev": true, + "funding": [ + "https://github.com/sponsors/broofa", + "https://github.com/sponsors/ctavan" + ], + "bin": { + "uuid": "dist/bin/uuid" + } + }, "node_modules/lerna/node_modules/write-file-atomic": { "version": "5.0.1", + "resolved": "https://registry.npmjs.org/write-file-atomic/-/write-file-atomic-5.0.1.tgz", + "integrity": "sha512-+QU2zd6OTD8XWIJCbffaiQeH9U73qIqafo1x6V1snCWYGJf6cVE0cDR4D8xRzcEnfI21IFrUPzPGtcPf8AC+Rw==", "dev": true, - "license": "ISC", "dependencies": { "imurmurhash": "^0.1.4", "signal-exit": "^4.0.1" @@ -10154,8 +11439,9 @@ }, "node_modules/lerna/node_modules/write-file-atomic/node_modules/signal-exit": { "version": "4.1.0", + "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-4.1.0.tgz", + "integrity": "sha512-bzyZ1e88w9O1iNJbKnOlvYTrWPDl46O1bG0D3XInv+9tkPrxrN8jUUTiFlDkkmKWgn1M6CfIA13SuGqOa9Korw==", "dev": true, - "license": "ISC", "engines": { "node": ">=14" }, @@ -10165,16 +11451,18 @@ }, "node_modules/leven": { "version": "3.1.0", + "resolved": "https://registry.npmjs.org/leven/-/leven-3.1.0.tgz", + "integrity": "sha512-qsda+H8jTaUaN/x5vzW2rzc+8Rw4TAQ/4KjB46IwK5VH+IlVeeeje/EoZRpiXvIqjFgK84QffqPztGI3VBLG1A==", "dev": true, - "license": "MIT", "engines": { "node": ">=6" } }, "node_modules/levn": { "version": "0.4.1", + "resolved": "https://registry.npmjs.org/levn/-/levn-0.4.1.tgz", + "integrity": "sha512-+bT2uH4E5LGE7h/n3evcS/sQlJXCpIp6ym8OWJ5eV6+67Dsql/LaaT7qJBAt2rzfoa/5QBGBhxDix1dMt2kQKQ==", "dev": true, - "license": "MIT", "dependencies": { "prelude-ls": "^1.2.1", "type-check": "~0.4.0" @@ -10185,8 +11473,9 @@ }, "node_modules/libnpmaccess": { "version": "7.0.2", + "resolved": "https://registry.npmjs.org/libnpmaccess/-/libnpmaccess-7.0.2.tgz", + "integrity": "sha512-vHBVMw1JFMTgEk15zRsJuSAg7QtGGHpUSEfnbcRL1/gTBag9iEfJbyjpDmdJmwMhvpoLoNBtdAUCdGnaP32hhw==", "dev": true, - "license": "ISC", "dependencies": { "npm-package-arg": "^10.1.0", "npm-registry-fetch": "^14.0.3" @@ -10197,8 +11486,9 @@ }, "node_modules/libnpmaccess/node_modules/hosted-git-info": { "version": "6.1.1", + "resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-6.1.1.tgz", + "integrity": "sha512-r0EI+HBMcXadMrugk0GCQ+6BQV39PiWAZVfq7oIckeGiN7sjRGyQxPdft3nQekFTCQbYxLBH+/axZMeH8UX6+w==", "dev": true, - "license": "ISC", "dependencies": { "lru-cache": "^7.5.1" }, @@ -10208,16 +11498,18 @@ }, "node_modules/libnpmaccess/node_modules/lru-cache": { "version": "7.18.3", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-7.18.3.tgz", + "integrity": "sha512-jumlc0BIUrS3qJGgIkWZsyfAM7NCWiBcCDhnd+3NNM5KbBmLTgHVfWBcg6W+rLUsIpzpERPsvwUP7CckAQSOoA==", "dev": true, - "license": "ISC", "engines": { "node": ">=12" } }, "node_modules/libnpmaccess/node_modules/npm-package-arg": { "version": "10.1.0", + "resolved": "https://registry.npmjs.org/npm-package-arg/-/npm-package-arg-10.1.0.tgz", + "integrity": "sha512-uFyyCEmgBfZTtrKk/5xDfHp6+MdrqGotX/VoOyEEl3mBwiEE5FlBaePanazJSVMPT7vKepcjYBY2ztg9A3yPIA==", "dev": true, - "license": "ISC", "dependencies": { "hosted-git-info": "^6.0.0", "proc-log": "^3.0.0", @@ -10230,8 +11522,9 @@ }, "node_modules/libnpmpublish": { "version": "7.3.0", + "resolved": "https://registry.npmjs.org/libnpmpublish/-/libnpmpublish-7.3.0.tgz", + "integrity": "sha512-fHUxw5VJhZCNSls0KLNEG0mCD2PN1i14gH5elGOgiVnU3VgTcRahagYP2LKI1m0tFCJ+XrAm0zVYyF5RCbXzcg==", "dev": true, - "license": "ISC", "dependencies": { "ci-info": "^3.6.1", "normalize-package-data": "^5.0.0", @@ -10248,8 +11541,9 @@ }, "node_modules/libnpmpublish/node_modules/hosted-git-info": { "version": "6.1.1", + "resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-6.1.1.tgz", + "integrity": "sha512-r0EI+HBMcXadMrugk0GCQ+6BQV39PiWAZVfq7oIckeGiN7sjRGyQxPdft3nQekFTCQbYxLBH+/axZMeH8UX6+w==", "dev": true, - "license": "ISC", "dependencies": { "lru-cache": "^7.5.1" }, @@ -10259,16 +11553,27 @@ }, "node_modules/libnpmpublish/node_modules/lru-cache": { "version": "7.18.3", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-7.18.3.tgz", + "integrity": "sha512-jumlc0BIUrS3qJGgIkWZsyfAM7NCWiBcCDhnd+3NNM5KbBmLTgHVfWBcg6W+rLUsIpzpERPsvwUP7CckAQSOoA==", "dev": true, - "license": "ISC", "engines": { "node": ">=12" } }, + "node_modules/libnpmpublish/node_modules/minipass": { + "version": "7.0.4", + "resolved": "https://registry.npmjs.org/minipass/-/minipass-7.0.4.tgz", + "integrity": "sha512-jYofLM5Dam9279rdkWzqHozUo4ybjdZmCsDHePy5V/PbBcVMiSZR97gmAy45aqi8CK1lG2ECd356FU86avfwUQ==", + "dev": true, + "engines": { + "node": ">=16 || 14 >=14.17" + } + }, "node_modules/libnpmpublish/node_modules/normalize-package-data": { "version": "5.0.0", + "resolved": "https://registry.npmjs.org/normalize-package-data/-/normalize-package-data-5.0.0.tgz", + "integrity": "sha512-h9iPVIfrVZ9wVYQnxFgtw1ugSvGEMOlyPWWtm8BMJhnwyEL/FLbYbTY3V3PpjI/BUK67n9PEWDu6eHzu1fB15Q==", "dev": true, - "license": "BSD-2-Clause", "dependencies": { "hosted-git-info": "^6.0.0", "is-core-module": "^2.8.1", @@ -10281,8 +11586,9 @@ }, "node_modules/libnpmpublish/node_modules/npm-package-arg": { "version": "10.1.0", + "resolved": "https://registry.npmjs.org/npm-package-arg/-/npm-package-arg-10.1.0.tgz", + "integrity": "sha512-uFyyCEmgBfZTtrKk/5xDfHp6+MdrqGotX/VoOyEEl3mBwiEE5FlBaePanazJSVMPT7vKepcjYBY2ztg9A3yPIA==", "dev": true, - "license": "ISC", "dependencies": { "hosted-git-info": "^6.0.0", "proc-log": "^3.0.0", @@ -10295,8 +11601,9 @@ }, "node_modules/libnpmpublish/node_modules/ssri": { "version": "10.0.5", + "resolved": "https://registry.npmjs.org/ssri/-/ssri-10.0.5.tgz", + "integrity": "sha512-bSf16tAFkGeRlUNDjXu8FzaMQt6g2HZJrun7mtMbIPOddxt3GLMSz5VWUWcqTJUPfLEaDIepGxv+bYQW49596A==", "dev": true, - "license": "ISC", "dependencies": { "minipass": "^7.0.3" }, @@ -10306,24 +11613,27 @@ }, "node_modules/lilconfig": { "version": "3.0.0", + "resolved": "https://registry.npmjs.org/lilconfig/-/lilconfig-3.0.0.tgz", + "integrity": "sha512-K2U4W2Ff5ibV7j7ydLr+zLAkIg5JJ4lPn1Ltsdt+Tz/IjQ8buJ55pZAxoP34lqIiwtF9iAvtLv3JGv7CAyAg+g==", "dev": true, - "license": "MIT", "engines": { "node": ">=14" } }, "node_modules/lines-and-columns": { "version": "2.0.4", + "resolved": "https://registry.npmjs.org/lines-and-columns/-/lines-and-columns-2.0.4.tgz", + "integrity": "sha512-wM1+Z03eypVAVUCE7QdSqpVIvelbOakn1M0bPDoA4SGWPx3sNDVUiMo3L6To6WWGClB7VyXnhQ4Sn7gxiJbE6A==", "dev": true, - "license": "MIT", "engines": { "node": "^12.20.0 || ^14.13.1 || >=16.0.0" } }, "node_modules/lint-staged": { "version": "15.2.2", + "resolved": "https://registry.npmjs.org/lint-staged/-/lint-staged-15.2.2.tgz", + "integrity": "sha512-TiTt93OPh1OZOsb5B7k96A/ATl2AjIZo+vnzFZ6oHK5FuTk63ByDtxGQpHm+kFETjEWqgkF95M8FRXKR/LEBcw==", "dev": true, - "license": "MIT", "dependencies": { "chalk": "5.3.0", "commander": "11.1.0", @@ -10348,8 +11658,9 @@ }, "node_modules/lint-staged/node_modules/chalk": { "version": "5.3.0", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-5.3.0.tgz", + "integrity": "sha512-dLitG79d+GV1Nb/VYcCDFivJeK1hiukt9QjRNVOsUtTy1rR1YJsmpGGTZ3qJos+uw7WmWF4wUwBd9jxjocFC2w==", "dev": true, - "license": "MIT", "engines": { "node": "^12.17.0 || ^14.13 || >=16.0.0" }, @@ -10359,8 +11670,9 @@ }, "node_modules/lint-staged/node_modules/execa": { "version": "8.0.1", + "resolved": "https://registry.npmjs.org/execa/-/execa-8.0.1.tgz", + "integrity": "sha512-VyhnebXciFV2DESc+p6B+y0LjSm0krU4OgJN44qFAhBY0TJ+1V61tYD2+wHusZ6F9n5K+vl8k0sTy7PEfV4qpg==", "dev": true, - "license": "MIT", "dependencies": { "cross-spawn": "^7.0.3", "get-stream": "^8.0.1", @@ -10381,8 +11693,9 @@ }, "node_modules/lint-staged/node_modules/get-stream": { "version": "8.0.1", + "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-8.0.1.tgz", + "integrity": "sha512-VaUJspBffn/LMCJVoMvSAdmscJyS1auj5Zulnn5UoYcY531UWmdwhRWkcGKnGU93m5HSXP9LP2usOryrBtQowA==", "dev": true, - "license": "MIT", "engines": { "node": ">=16" }, @@ -10392,16 +11705,18 @@ }, "node_modules/lint-staged/node_modules/human-signals": { "version": "5.0.0", + "resolved": "https://registry.npmjs.org/human-signals/-/human-signals-5.0.0.tgz", + "integrity": "sha512-AXcZb6vzzrFAUE61HnN4mpLqd/cSIwNQjtNWR0euPm6y0iqx3G4gOXaIDdtdDwZmhwe82LA6+zinmW4UBWVePQ==", "dev": true, - "license": "Apache-2.0", "engines": { "node": ">=16.17.0" } }, "node_modules/lint-staged/node_modules/is-stream": { "version": "3.0.0", + "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-3.0.0.tgz", + "integrity": "sha512-LnQR4bZ9IADDRSkvpqMGvt/tEJWclzklNgSw48V5EAaAeDd6qGvN8ei6k5p0tvxSR171VmGyHuTiAOfxAbr8kA==", "dev": true, - "license": "MIT", "engines": { "node": "^12.20.0 || ^14.13.1 || >=16.0.0" }, @@ -10411,8 +11726,9 @@ }, "node_modules/lint-staged/node_modules/mimic-fn": { "version": "4.0.0", + "resolved": "https://registry.npmjs.org/mimic-fn/-/mimic-fn-4.0.0.tgz", + "integrity": "sha512-vqiC06CuhBTUdZH+RYl8sFrL096vA45Ok5ISO6sE/Mr1jRbGH4Csnhi8f3wKVl7x8mO4Au7Ir9D3Oyv1VYMFJw==", "dev": true, - "license": "MIT", "engines": { "node": ">=12" }, @@ -10421,9 +11737,10 @@ } }, "node_modules/lint-staged/node_modules/npm-run-path": { - "version": "5.3.0", + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/npm-run-path/-/npm-run-path-5.2.0.tgz", + "integrity": "sha512-W4/tgAXFqFA0iL7fk0+uQ3g7wkL8xJmx3XdK0VGb4cHW//eZTtKGvFBBoRKVTpY7n6ze4NL9ly7rgXcHufqXKg==", "dev": true, - "license": "MIT", "dependencies": { "path-key": "^4.0.0" }, @@ -10436,8 +11753,9 @@ }, "node_modules/lint-staged/node_modules/onetime": { "version": "6.0.0", + "resolved": "https://registry.npmjs.org/onetime/-/onetime-6.0.0.tgz", + "integrity": "sha512-1FlR+gjXK7X+AsAHso35MnyN5KqGwJRi/31ft6x0M194ht7S+rWAvd7PHss9xSKMzE0asv1pyIHaJYq+BbacAQ==", "dev": true, - "license": "MIT", "dependencies": { "mimic-fn": "^4.0.0" }, @@ -10450,8 +11768,9 @@ }, "node_modules/lint-staged/node_modules/path-key": { "version": "4.0.0", + "resolved": "https://registry.npmjs.org/path-key/-/path-key-4.0.0.tgz", + "integrity": "sha512-haREypq7xkM7ErfgIyA0z+Bj4AGKlMSdlQE2jvJo6huWD1EdkKYV+G/T4nq0YEF2vgTT8kqMFKo1uHn950r4SQ==", "dev": true, - "license": "MIT", "engines": { "node": ">=12" }, @@ -10461,8 +11780,9 @@ }, "node_modules/lint-staged/node_modules/signal-exit": { "version": "4.1.0", + "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-4.1.0.tgz", + "integrity": "sha512-bzyZ1e88w9O1iNJbKnOlvYTrWPDl46O1bG0D3XInv+9tkPrxrN8jUUTiFlDkkmKWgn1M6CfIA13SuGqOa9Korw==", "dev": true, - "license": "ISC", "engines": { "node": ">=14" }, @@ -10472,8 +11792,9 @@ }, "node_modules/lint-staged/node_modules/strip-final-newline": { "version": "3.0.0", + "resolved": "https://registry.npmjs.org/strip-final-newline/-/strip-final-newline-3.0.0.tgz", + "integrity": "sha512-dOESqjYr96iWYylGObzd39EuNTa5VJxyvVAEm5Jnh7KGo75V43Hk1odPQkNDyXNmUR6k+gEiDVXnjB8HJ3crXw==", "dev": true, - "license": "MIT", "engines": { "node": ">=12" }, @@ -10483,8 +11804,9 @@ }, "node_modules/listr2": { "version": "8.0.1", + "resolved": "https://registry.npmjs.org/listr2/-/listr2-8.0.1.tgz", + "integrity": "sha512-ovJXBXkKGfq+CwmKTjluEqFi3p4h8xvkxGQQAQan22YCgef4KZ1mKGjzfGh6PL6AW5Csw0QiQPNuQyH+6Xk3hA==", "dev": true, - "license": "MIT", "dependencies": { "cli-truncate": "^4.0.0", "colorette": "^2.0.20", @@ -10499,8 +11821,9 @@ }, "node_modules/listr2/node_modules/ansi-regex": { "version": "6.0.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-6.0.1.tgz", + "integrity": "sha512-n5M855fKb2SsfMIiFFoVrABHJC8QtHwVx+mHWP3QcEqBHYienj5dHSgjbxtC0WEZXYt4wcD6zrQElDPhFuZgfA==", "dev": true, - "license": "MIT", "engines": { "node": ">=12" }, @@ -10510,8 +11833,9 @@ }, "node_modules/listr2/node_modules/ansi-styles": { "version": "6.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-6.2.1.tgz", + "integrity": "sha512-bN798gFfQX+viw3R7yrGWRqnrN2oRkEkUjjl4JNn4E8GxxbjtG3FbrEIIY3l8/hrwUwIeCZvi4QuOTP4MErVug==", "dev": true, - "license": "MIT", "engines": { "node": ">=12" }, @@ -10521,13 +11845,15 @@ }, "node_modules/listr2/node_modules/emoji-regex": { "version": "10.3.0", - "dev": true, - "license": "MIT" + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-10.3.0.tgz", + "integrity": "sha512-QpLs9D9v9kArv4lfDEgg1X/gN5XLnf/A6l9cs8SPZLRZR3ZkY9+kwIQTxm+fsSej5UMYGE8fdoaZVIBlqG0XTw==", + "dev": true }, "node_modules/listr2/node_modules/string-width": { "version": "7.1.0", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-7.1.0.tgz", + "integrity": "sha512-SEIJCWiX7Kg4c129n48aDRwLbFb2LJmXXFrWBG4NGaRtMQ3myKPKbwrD1BKqQn74oCoNMBVrfDEr5M9YxCsrkw==", "dev": true, - "license": "MIT", "dependencies": { "emoji-regex": "^10.3.0", "get-east-asian-width": "^1.0.0", @@ -10542,8 +11868,9 @@ }, "node_modules/listr2/node_modules/strip-ansi": { "version": "7.1.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-7.1.0.tgz", + "integrity": "sha512-iq6eVVI64nQQTRYq2KtEg2d2uU7LElhTJwsH4YzIHZshxlgZms/wIc4VoDQTlG/IvVIrBKG06CrZnp0qv7hkcQ==", "dev": true, - "license": "MIT", "dependencies": { "ansi-regex": "^6.0.1" }, @@ -10556,8 +11883,9 @@ }, "node_modules/listr2/node_modules/wrap-ansi": { "version": "9.0.0", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-9.0.0.tgz", + "integrity": "sha512-G8ura3S+3Z2G+mkgNRq8dqaFZAuxfsxpBB8OCTGRTCtp+l/v9nbFNmCUP1BZMts3G1142MsZfn6eeUKrr4PD1Q==", "dev": true, - "license": "MIT", "dependencies": { "ansi-styles": "^6.2.1", "string-width": "^7.0.0", @@ -10572,8 +11900,9 @@ }, "node_modules/load-json-file": { "version": "6.2.0", + "resolved": "https://registry.npmjs.org/load-json-file/-/load-json-file-6.2.0.tgz", + "integrity": "sha512-gUD/epcRms75Cw8RT1pUdHugZYM5ce64ucs2GEISABwkRsOQr0q2wm/MV2TKThycIe5e0ytRweW2RZxclogCdQ==", "dev": true, - "license": "MIT", "dependencies": { "graceful-fs": "^4.1.15", "parse-json": "^5.0.0", @@ -10586,16 +11915,18 @@ }, "node_modules/load-json-file/node_modules/type-fest": { "version": "0.6.0", + "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.6.0.tgz", + "integrity": "sha512-q+MB8nYR1KDLrgr4G5yemftpMC7/QLqVndBmEEdqzmNj5dcFOO4Oo8qlwZE3ULT3+Zim1F8Kq4cBnikNhlCMlg==", "dev": true, - "license": "(MIT OR CC0-1.0)", "engines": { "node": ">=8" } }, "node_modules/locate-path": { "version": "6.0.0", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-6.0.0.tgz", + "integrity": "sha512-iPZK6eYjbxRu3uB4/WZ3EsEIMJFMqAoopl3R+zuq0UjcAm/MO6KCweDgPfP3elTztoKP3KtnVHxTn2NHBSDVUw==", "dev": true, - "license": "MIT", "dependencies": { "p-locate": "^5.0.0" }, @@ -10608,32 +11939,38 @@ }, "node_modules/lodash": { "version": "4.17.21", - "dev": true, - "license": "MIT" + "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.21.tgz", + "integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==", + "dev": true }, "node_modules/lodash.get": { "version": "4.4.2", - "dev": true, - "license": "MIT" + "resolved": "https://registry.npmjs.org/lodash.get/-/lodash.get-4.4.2.tgz", + "integrity": "sha512-z+Uw/vLuy6gQe8cfaFWD7p0wVv8fJl3mbzXh33RS+0oW2wvUqiRXiQ69gLWSLpgB5/6sU+r6BlQR0MBILadqTQ==", + "dev": true }, "node_modules/lodash.ismatch": { "version": "4.4.0", - "dev": true, - "license": "MIT" + "resolved": "https://registry.npmjs.org/lodash.ismatch/-/lodash.ismatch-4.4.0.tgz", + "integrity": "sha512-fPMfXjGQEV9Xsq/8MTSgUf255gawYRbjwMyDbcvDhXgV7enSZA0hynz6vMPnpAb5iONEzBHBPsT+0zes5Z301g==", + "dev": true }, "node_modules/lodash.memoize": { "version": "4.1.2", - "dev": true, - "license": "MIT" + "resolved": "https://registry.npmjs.org/lodash.memoize/-/lodash.memoize-4.1.2.tgz", + "integrity": "sha512-t7j+NzmgnQzTAYXcsHYLgimltOV1MXHtlOWf6GjL9Kj8GK5FInw5JotxvbOs+IvV1/Dzo04/fCGfLVs7aXb4Ag==", + "dev": true }, "node_modules/lodash.merge": { "version": "4.6.2", - "license": "MIT" + "resolved": "https://registry.npmjs.org/lodash.merge/-/lodash.merge-4.6.2.tgz", + "integrity": "sha512-0KpjqXRVvrYyCsX1swR/XTK0va6VQkQM6MNo7PqW77ByjAhoARA8EfrP1N4+KlKj8YS0ZUCtRT/YUuhyYDujIQ==" }, "node_modules/log-symbols": { "version": "4.1.0", + "resolved": "https://registry.npmjs.org/log-symbols/-/log-symbols-4.1.0.tgz", + "integrity": "sha512-8XPvpAA8uyhfteu8pIvQxpJZ7SYYdpUivZpGy6sFsBuKRY/7rQGavedeB8aK+Zkyq6upMFVL/9AW6vOYzfRyLg==", "dev": true, - "license": "MIT", "dependencies": { "chalk": "^4.1.0", "is-unicode-supported": "^0.1.0" @@ -10647,8 +11984,9 @@ }, "node_modules/log-update": { "version": "6.0.0", + "resolved": "https://registry.npmjs.org/log-update/-/log-update-6.0.0.tgz", + "integrity": "sha512-niTvB4gqvtof056rRIrTZvjNYE4rCUzO6X/X+kYjd7WFxXeJ0NwEFnRxX6ehkvv3jTwrXnNdtAak5XYZuIyPFw==", "dev": true, - "license": "MIT", "dependencies": { "ansi-escapes": "^6.2.0", "cli-cursor": "^4.0.0", @@ -10665,8 +12003,9 @@ }, "node_modules/log-update/node_modules/ansi-escapes": { "version": "6.2.0", + "resolved": "https://registry.npmjs.org/ansi-escapes/-/ansi-escapes-6.2.0.tgz", + "integrity": "sha512-kzRaCqXnpzWs+3z5ABPQiVke+iq0KXkHo8xiWV4RPTi5Yli0l97BEQuhXV1s7+aSU/fu1kUuxgS4MsQ0fRuygw==", "dev": true, - "license": "MIT", "dependencies": { "type-fest": "^3.0.0" }, @@ -10679,8 +12018,9 @@ }, "node_modules/log-update/node_modules/ansi-regex": { "version": "6.0.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-6.0.1.tgz", + "integrity": "sha512-n5M855fKb2SsfMIiFFoVrABHJC8QtHwVx+mHWP3QcEqBHYienj5dHSgjbxtC0WEZXYt4wcD6zrQElDPhFuZgfA==", "dev": true, - "license": "MIT", "engines": { "node": ">=12" }, @@ -10690,8 +12030,9 @@ }, "node_modules/log-update/node_modules/ansi-styles": { "version": "6.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-6.2.1.tgz", + "integrity": "sha512-bN798gFfQX+viw3R7yrGWRqnrN2oRkEkUjjl4JNn4E8GxxbjtG3FbrEIIY3l8/hrwUwIeCZvi4QuOTP4MErVug==", "dev": true, - "license": "MIT", "engines": { "node": ">=12" }, @@ -10701,8 +12042,9 @@ }, "node_modules/log-update/node_modules/cli-cursor": { "version": "4.0.0", + "resolved": "https://registry.npmjs.org/cli-cursor/-/cli-cursor-4.0.0.tgz", + "integrity": "sha512-VGtlMu3x/4DOtIUwEkRezxUZ2lBacNJCHash0N0WeZDBS+7Ux1dm3XWAgWYxLJFMMdOeXMHXorshEFhbMSGelg==", "dev": true, - "license": "MIT", "dependencies": { "restore-cursor": "^4.0.0" }, @@ -10715,13 +12057,15 @@ }, "node_modules/log-update/node_modules/emoji-regex": { "version": "10.3.0", - "dev": true, - "license": "MIT" + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-10.3.0.tgz", + "integrity": "sha512-QpLs9D9v9kArv4lfDEgg1X/gN5XLnf/A6l9cs8SPZLRZR3ZkY9+kwIQTxm+fsSej5UMYGE8fdoaZVIBlqG0XTw==", + "dev": true }, "node_modules/log-update/node_modules/is-fullwidth-code-point": { "version": "5.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-5.0.0.tgz", + "integrity": "sha512-OVa3u9kkBbw7b8Xw5F9P+D/T9X+Z4+JruYVNapTjPYZYUznQ5YfWeFkOj606XYYW8yugTfC8Pj0hYqvi4ryAhA==", "dev": true, - "license": "MIT", "dependencies": { "get-east-asian-width": "^1.0.0" }, @@ -10734,8 +12078,9 @@ }, "node_modules/log-update/node_modules/restore-cursor": { "version": "4.0.0", + "resolved": "https://registry.npmjs.org/restore-cursor/-/restore-cursor-4.0.0.tgz", + "integrity": "sha512-I9fPXU9geO9bHOt9pHHOhOkYerIMsmVaWB0rA2AI9ERh/+x/i7MV5HKBNrg+ljO5eoPVgCcnFuRjJ9uH6I/3eg==", "dev": true, - "license": "MIT", "dependencies": { "onetime": "^5.1.0", "signal-exit": "^3.0.2" @@ -10749,8 +12094,9 @@ }, "node_modules/log-update/node_modules/slice-ansi": { "version": "7.1.0", + "resolved": "https://registry.npmjs.org/slice-ansi/-/slice-ansi-7.1.0.tgz", + "integrity": "sha512-bSiSngZ/jWeX93BqeIAbImyTbEihizcwNjFoRUIY/T1wWQsfsm2Vw1agPKylXvQTU7iASGdHhyqRlqQzfz+Htg==", "dev": true, - "license": "MIT", "dependencies": { "ansi-styles": "^6.2.1", "is-fullwidth-code-point": "^5.0.0" @@ -10764,8 +12110,9 @@ }, "node_modules/log-update/node_modules/string-width": { "version": "7.1.0", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-7.1.0.tgz", + "integrity": "sha512-SEIJCWiX7Kg4c129n48aDRwLbFb2LJmXXFrWBG4NGaRtMQ3myKPKbwrD1BKqQn74oCoNMBVrfDEr5M9YxCsrkw==", "dev": true, - "license": "MIT", "dependencies": { "emoji-regex": "^10.3.0", "get-east-asian-width": "^1.0.0", @@ -10780,8 +12127,9 @@ }, "node_modules/log-update/node_modules/strip-ansi": { "version": "7.1.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-7.1.0.tgz", + "integrity": "sha512-iq6eVVI64nQQTRYq2KtEg2d2uU7LElhTJwsH4YzIHZshxlgZms/wIc4VoDQTlG/IvVIrBKG06CrZnp0qv7hkcQ==", "dev": true, - "license": "MIT", "dependencies": { "ansi-regex": "^6.0.1" }, @@ -10794,8 +12142,9 @@ }, "node_modules/log-update/node_modules/type-fest": { "version": "3.13.1", + "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-3.13.1.tgz", + "integrity": "sha512-tLq3bSNx+xSpwvAJnzrK0Ep5CLNWjvFTOp71URMaAEWBfRb9nnJiBoUe0tF8bI4ZFO3omgBR6NvnbzVUT3Ly4g==", "dev": true, - "license": "(MIT OR CC0-1.0)", "engines": { "node": ">=14.16" }, @@ -10805,8 +12154,9 @@ }, "node_modules/log-update/node_modules/wrap-ansi": { "version": "9.0.0", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-9.0.0.tgz", + "integrity": "sha512-G8ura3S+3Z2G+mkgNRq8dqaFZAuxfsxpBB8OCTGRTCtp+l/v9nbFNmCUP1BZMts3G1142MsZfn6eeUKrr4PD1Q==", "dev": true, - "license": "MIT", "dependencies": { "ansi-styles": "^6.2.1", "string-width": "^7.0.0", @@ -10821,21 +12171,24 @@ }, "node_modules/lru-cache": { "version": "5.1.1", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-5.1.1.tgz", + "integrity": "sha512-KpNARQA3Iwv+jTA0utUVVbrh+Jlrr1Fv0e56GGzAFOXN7dk/FviaDW8LHmK52DlcH4WP2n6gI8vN1aesBFgo9w==", "dev": true, - "license": "ISC", "dependencies": { "yallist": "^3.0.2" } }, "node_modules/lunr": { "version": "2.3.9", - "dev": true, - "license": "MIT" + "resolved": "https://registry.npmjs.org/lunr/-/lunr-2.3.9.tgz", + "integrity": "sha512-zTU3DaZaF3Rt9rhN3uBMGQD3dD2/vFQqnvZCDv4dl5iOzq2IZQqTxu90r4E5J+nP70J3ilqVCrbho2eWaeW8Ow==", + "dev": true }, "node_modules/make-dir": { "version": "4.0.0", + "resolved": "https://registry.npmjs.org/make-dir/-/make-dir-4.0.0.tgz", + "integrity": "sha512-hXdUTZYIVOt1Ex//jAQi+wTZZpUpwBj/0QsOzqegb3rGMMeJiSEu5xLHnYfBrRV4RH2+OCSOO95Is/7x1WJ4bw==", "dev": true, - "license": "MIT", "dependencies": { "semver": "^7.5.3" }, @@ -10848,13 +12201,15 @@ }, "node_modules/make-error": { "version": "1.3.6", - "dev": true, - "license": "ISC" + "resolved": "https://registry.npmjs.org/make-error/-/make-error-1.3.6.tgz", + "integrity": "sha512-s8UhlNe7vPKomQhC1qFelMokr/Sc3AgNbso3n74mVPA5LTZwkB9NlXf4XPamLxJE8h0gh73rM94xvwRT2CVInw==", + "dev": true }, "node_modules/make-fetch-happen": { "version": "13.0.0", + "resolved": "https://registry.npmjs.org/make-fetch-happen/-/make-fetch-happen-13.0.0.tgz", + "integrity": "sha512-7ThobcL8brtGo9CavByQrQi+23aIfgYU++wg4B87AIS8Rb2ZBt/MEaDqzA00Xwv/jUjAjYkLHjVolYuTLKda2A==", "dev": true, - "license": "ISC", "dependencies": { "@npmcli/agent": "^2.0.0", "cacache": "^18.0.0", @@ -10872,10 +12227,20 @@ "node": "^16.14.0 || >=18.0.0" } }, + "node_modules/make-fetch-happen/node_modules/minipass": { + "version": "7.0.4", + "resolved": "https://registry.npmjs.org/minipass/-/minipass-7.0.4.tgz", + "integrity": "sha512-jYofLM5Dam9279rdkWzqHozUo4ybjdZmCsDHePy5V/PbBcVMiSZR97gmAy45aqi8CK1lG2ECd356FU86avfwUQ==", + "dev": true, + "engines": { + "node": ">=16 || 14 >=14.17" + } + }, "node_modules/make-fetch-happen/node_modules/ssri": { "version": "10.0.5", + "resolved": "https://registry.npmjs.org/ssri/-/ssri-10.0.5.tgz", + "integrity": "sha512-bSf16tAFkGeRlUNDjXu8FzaMQt6g2HZJrun7mtMbIPOddxt3GLMSz5VWUWcqTJUPfLEaDIepGxv+bYQW49596A==", "dev": true, - "license": "ISC", "dependencies": { "minipass": "^7.0.3" }, @@ -10885,16 +12250,18 @@ }, "node_modules/makeerror": { "version": "1.0.12", + "resolved": "https://registry.npmjs.org/makeerror/-/makeerror-1.0.12.tgz", + "integrity": "sha512-JmqCvUhmt43madlpFzG4BQzG2Z3m6tvQDNKdClZnO3VbIudJYmxsT0FNJMeiB2+JTSlTQTSbU8QdesVmwJcmLg==", "dev": true, - "license": "BSD-3-Clause", "dependencies": { "tmpl": "1.0.5" } }, "node_modules/map-obj": { "version": "4.3.0", + "resolved": "https://registry.npmjs.org/map-obj/-/map-obj-4.3.0.tgz", + "integrity": "sha512-hdN1wVrZbb29eBGiGjJbeP8JbKjq1urkHJ/LIP/NY48MZ1QVXUsQBV1G1zvYFHn1XE06cwjBsOI2K3Ulnj1YXQ==", "dev": true, - "license": "MIT", "engines": { "node": ">=8" }, @@ -10904,8 +12271,9 @@ }, "node_modules/marked": { "version": "4.3.0", + "resolved": "https://registry.npmjs.org/marked/-/marked-4.3.0.tgz", + "integrity": "sha512-PRsaiG84bK+AMvxziE/lCFss8juXjNaWzVbN5tXAm4XjeaS9NAHhop+PjQxz2A9h8Q4M/xGmzP8vqNwy6JeK0A==", "dev": true, - "license": "MIT", "bin": { "marked": "bin/marked.js" }, @@ -10915,8 +12283,9 @@ }, "node_modules/meow": { "version": "8.1.2", + "resolved": "https://registry.npmjs.org/meow/-/meow-8.1.2.tgz", + "integrity": "sha512-r85E3NdZ+mpYk1C6RjPFEMSE+s1iZMuHtsHAqY0DT3jZczl0diWUZ8g6oU7h0M9cD2EL+PzaYghhCLzR0ZNn5Q==", "dev": true, - "license": "MIT", "dependencies": { "@types/minimist": "^1.2.0", "camelcase-keys": "^6.2.2", @@ -10939,8 +12308,9 @@ }, "node_modules/meow/node_modules/find-up": { "version": "4.1.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-4.1.0.tgz", + "integrity": "sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw==", "dev": true, - "license": "MIT", "dependencies": { "locate-path": "^5.0.0", "path-exists": "^4.0.0" @@ -10951,13 +12321,15 @@ }, "node_modules/meow/node_modules/hosted-git-info": { "version": "2.8.9", - "dev": true, - "license": "ISC" + "resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-2.8.9.tgz", + "integrity": "sha512-mxIDAb9Lsm6DoOJ7xH+5+X4y1LU/4Hi50L9C5sIswK3JzULS4bwk1FvjdBgvYR4bzT4tuUQiC15FE2f5HbLvYw==", + "dev": true }, "node_modules/meow/node_modules/locate-path": { "version": "5.0.0", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-5.0.0.tgz", + "integrity": "sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g==", "dev": true, - "license": "MIT", "dependencies": { "p-locate": "^4.1.0" }, @@ -10967,8 +12339,9 @@ }, "node_modules/meow/node_modules/p-limit": { "version": "2.3.0", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.3.0.tgz", + "integrity": "sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w==", "dev": true, - "license": "MIT", "dependencies": { "p-try": "^2.0.0" }, @@ -10981,8 +12354,9 @@ }, "node_modules/meow/node_modules/p-locate": { "version": "4.1.0", + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-4.1.0.tgz", + "integrity": "sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A==", "dev": true, - "license": "MIT", "dependencies": { "p-limit": "^2.2.0" }, @@ -10992,8 +12366,9 @@ }, "node_modules/meow/node_modules/read-pkg": { "version": "5.2.0", + "resolved": "https://registry.npmjs.org/read-pkg/-/read-pkg-5.2.0.tgz", + "integrity": "sha512-Ug69mNOpfvKDAc2Q8DRpMjjzdtrnv9HcSMX+4VsZxD1aZ6ZzrIE7rlzXBtWTyhULSMKg076AW6WR5iZpD0JiOg==", "dev": true, - "license": "MIT", "dependencies": { "@types/normalize-package-data": "^2.4.0", "normalize-package-data": "^2.5.0", @@ -11006,8 +12381,9 @@ }, "node_modules/meow/node_modules/read-pkg-up": { "version": "7.0.1", + "resolved": "https://registry.npmjs.org/read-pkg-up/-/read-pkg-up-7.0.1.tgz", + "integrity": "sha512-zK0TB7Xd6JpCLmlLmufqykGE+/TlOePD6qKClNW7hHDKFh/J7/7gCWGR7joEQEW1bKq3a3yUZSObOoWLFQ4ohg==", "dev": true, - "license": "MIT", "dependencies": { "find-up": "^4.1.0", "read-pkg": "^5.2.0", @@ -11022,16 +12398,18 @@ }, "node_modules/meow/node_modules/read-pkg-up/node_modules/type-fest": { "version": "0.8.1", + "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.8.1.tgz", + "integrity": "sha512-4dbzIzqvjtgiM5rw1k5rEHtBANKmdudhGyBEajN01fEyhaAIhsoKNy6y7+IN93IfpFtwY9iqi7kD+xwKhQsNJA==", "dev": true, - "license": "(MIT OR CC0-1.0)", "engines": { "node": ">=8" } }, "node_modules/meow/node_modules/read-pkg/node_modules/normalize-package-data": { "version": "2.5.0", + "resolved": "https://registry.npmjs.org/normalize-package-data/-/normalize-package-data-2.5.0.tgz", + "integrity": "sha512-/5CMN3T0R4XTj4DcGaexo+roZSdSFW/0AOOTROrjxzCG1wrWXEsGbRKevjlIL+ZDE4sZlJr5ED4YW0yqmkK+eA==", "dev": true, - "license": "BSD-2-Clause", "dependencies": { "hosted-git-info": "^2.1.4", "resolve": "^1.10.0", @@ -11041,24 +12419,27 @@ }, "node_modules/meow/node_modules/read-pkg/node_modules/type-fest": { "version": "0.6.0", + "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.6.0.tgz", + "integrity": "sha512-q+MB8nYR1KDLrgr4G5yemftpMC7/QLqVndBmEEdqzmNj5dcFOO4Oo8qlwZE3ULT3+Zim1F8Kq4cBnikNhlCMlg==", "dev": true, - "license": "(MIT OR CC0-1.0)", "engines": { "node": ">=8" } }, "node_modules/meow/node_modules/semver": { "version": "5.7.2", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.2.tgz", + "integrity": "sha512-cBznnQ9KjJqU67B52RMC65CMarK2600WFnbkcaiwWq3xy/5haFJlshgnpjovMVJ+Hff49d8GEn0b87C5pDQ10g==", "dev": true, - "license": "ISC", "bin": { "semver": "bin/semver" } }, "node_modules/meow/node_modules/type-fest": { "version": "0.18.1", + "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.18.1.tgz", + "integrity": "sha512-OIAYXk8+ISY+qTOwkHtKqzAuxchoMiD9Udx+FSGQDuiRR+PJKJHc2NJAXlbhkGwTt/4/nKZxELY1w3ReWOL8mw==", "dev": true, - "license": "(MIT OR CC0-1.0)", "engines": { "node": ">=10" }, @@ -11068,29 +12449,33 @@ }, "node_modules/meow/node_modules/yargs-parser": { "version": "20.2.9", + "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-20.2.9.tgz", + "integrity": "sha512-y11nGElTIV+CT3Zv9t7VKl+Q3hTQoT9a1Qzezhhl6Rp21gJ/IVTW7Z3y9EWXhuUBC2Shnf+DX0antecpAwSP8w==", "dev": true, - "license": "ISC", "engines": { "node": ">=10" } }, "node_modules/merge-stream": { "version": "2.0.0", - "dev": true, - "license": "MIT" + "resolved": "https://registry.npmjs.org/merge-stream/-/merge-stream-2.0.0.tgz", + "integrity": "sha512-abv/qOcuPfk3URPfDzmZU1LKmuw8kT+0nIHvKrKgFrwifol/doWcdA4ZqsWQ8ENrFKkd67Mfpo/LovbIUsbt3w==", + "dev": true }, "node_modules/merge2": { "version": "1.4.1", + "resolved": "https://registry.npmjs.org/merge2/-/merge2-1.4.1.tgz", + "integrity": "sha512-8q7VEgMJW4J8tcfVPy8g09NcQwZdbwFEqhe/WZkoIzjn/3TGDwtOCYtXGxA3O8tPzpczCCDgv+P2P5y00ZJOOg==", "dev": true, - "license": "MIT", "engines": { "node": ">= 8" } }, "node_modules/micromatch": { "version": "4.0.5", + "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.5.tgz", + "integrity": "sha512-DMy+ERcEW2q8Z2Po+WNXuw3c5YaUSFjAO5GsJqfEl7UjvtIuFKO6ZrKvcItdy98dwFI2N1tg3zNIdKaQT+aNdA==", "dev": true, - "license": "MIT", "dependencies": { "braces": "^3.0.2", "picomatch": "^2.3.1" @@ -11101,16 +12486,18 @@ }, "node_modules/mime-db": { "version": "1.52.0", + "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.52.0.tgz", + "integrity": "sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg==", "dev": true, - "license": "MIT", "engines": { "node": ">= 0.6" } }, "node_modules/mime-types": { "version": "2.1.35", + "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.35.tgz", + "integrity": "sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw==", "dev": true, - "license": "MIT", "dependencies": { "mime-db": "1.52.0" }, @@ -11120,24 +12507,27 @@ }, "node_modules/mimic-fn": { "version": "2.1.0", + "resolved": "https://registry.npmjs.org/mimic-fn/-/mimic-fn-2.1.0.tgz", + "integrity": "sha512-OqbOk5oEQeAZ8WXWydlu9HJjz9WVdEIvamMCcXmuqUYjTknH/sqsWvhQ3vgwKFRR1HpjvNBKQ37nbJgYzGqGcg==", "dev": true, - "license": "MIT", "engines": { "node": ">=6" } }, "node_modules/min-indent": { "version": "1.0.1", + "resolved": "https://registry.npmjs.org/min-indent/-/min-indent-1.0.1.tgz", + "integrity": "sha512-I9jwMn07Sy/IwOj3zVkVik2JTvgpaykDZEigL6Rx6N9LbMywwUSMtxET+7lVoDLLd3O3IXwJwvuuns8UB/HeAg==", "dev": true, - "license": "MIT", "engines": { "node": ">=4" } }, "node_modules/minimatch": { "version": "9.0.3", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-9.0.3.tgz", + "integrity": "sha512-RHiac9mvaRw0x3AYRgDC1CxAP7HTcNrrECeA8YYJeWnpo+2Q5CegtZjaotWTWxDG3UeGA1coE05iH1mPjT/2mg==", "dev": true, - "license": "ISC", "dependencies": { "brace-expansion": "^2.0.1" }, @@ -11150,16 +12540,18 @@ }, "node_modules/minimist": { "version": "1.2.8", + "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.8.tgz", + "integrity": "sha512-2yyAR8qBkN3YuheJanUpWC5U3bb5osDywNB8RzDVlDwDHbocAJveqqj1u8+SVD7jkWT4yvsHCpWqqWqAxb0zCA==", "dev": true, - "license": "MIT", "funding": { "url": "https://github.com/sponsors/ljharb" } }, "node_modules/minimist-options": { "version": "4.1.0", + "resolved": "https://registry.npmjs.org/minimist-options/-/minimist-options-4.1.0.tgz", + "integrity": "sha512-Q4r8ghd80yhO/0j1O3B2BjweX3fiHg9cdOwjJd2J76Q135c+NDxGCqdYKQ1SKBuFfgWbAUzBfvYjPUEeNgqN1A==", "dev": true, - "license": "MIT", "dependencies": { "arrify": "^1.0.1", "is-plain-obj": "^1.1.0", @@ -11170,28 +12562,34 @@ } }, "node_modules/minipass": { - "version": "7.0.4", + "version": "3.3.6", + "resolved": "https://registry.npmjs.org/minipass/-/minipass-3.3.6.tgz", + "integrity": "sha512-DxiNidxSEK+tHG6zOIklvNOwm3hvCrbUrdtzY74U6HKTJxvIDfOUL5W5P2Ghd3DTkhhKPYGqeNUIh5qcM4YBfw==", "dev": true, - "license": "ISC", + "dependencies": { + "yallist": "^4.0.0" + }, "engines": { - "node": ">=16 || 14 >=14.17" + "node": ">=8" } }, "node_modules/minipass-collect": { - "version": "2.0.1", + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/minipass-collect/-/minipass-collect-1.0.2.tgz", + "integrity": "sha512-6T6lH0H8OG9kITm/Jm6tdooIbogG9e0tLgpY6mphXSm/A9u8Nq1ryBG+Qspiub9LjWlBPsPS3tWQ/Botq4FdxA==", "dev": true, - "license": "ISC", "dependencies": { - "minipass": "^7.0.3" + "minipass": "^3.0.0" }, "engines": { - "node": ">=16 || 14 >=14.17" + "node": ">= 8" } }, "node_modules/minipass-fetch": { "version": "3.0.4", + "resolved": "https://registry.npmjs.org/minipass-fetch/-/minipass-fetch-3.0.4.tgz", + "integrity": "sha512-jHAqnA728uUpIaFm7NWsCnqKT6UqZz7GcI/bDpPATuwYyKwJwW0remxSCxUlKiEty+eopHGa3oc8WxgQ1FFJqg==", "dev": true, - "license": "MIT", "dependencies": { "minipass": "^7.0.3", "minipass-sized": "^1.0.3", @@ -11204,62 +12602,42 @@ "encoding": "^0.1.13" } }, - "node_modules/minipass-flush": { - "version": "1.0.5", + "node_modules/minipass-fetch/node_modules/minipass": { + "version": "7.0.4", + "resolved": "https://registry.npmjs.org/minipass/-/minipass-7.0.4.tgz", + "integrity": "sha512-jYofLM5Dam9279rdkWzqHozUo4ybjdZmCsDHePy5V/PbBcVMiSZR97gmAy45aqi8CK1lG2ECd356FU86avfwUQ==", "dev": true, - "license": "ISC", - "dependencies": { - "minipass": "^3.0.0" - }, "engines": { - "node": ">= 8" + "node": ">=16 || 14 >=14.17" } }, - "node_modules/minipass-flush/node_modules/minipass": { - "version": "3.3.6", + "node_modules/minipass-flush": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/minipass-flush/-/minipass-flush-1.0.5.tgz", + "integrity": "sha512-JmQSYYpPUqX5Jyn1mXaRwOda1uQ8HP5KAT/oDSLCzt1BYRhQU0/hDtsB1ufZfEEzMZ9aAVmsBw8+FWsIXlClWw==", "dev": true, - "license": "ISC", "dependencies": { - "yallist": "^4.0.0" + "minipass": "^3.0.0" }, "engines": { - "node": ">=8" + "node": ">= 8" } }, - "node_modules/minipass-flush/node_modules/yallist": { - "version": "4.0.0", - "dev": true, - "license": "ISC" - }, "node_modules/minipass-json-stream": { "version": "1.0.1", + "resolved": "https://registry.npmjs.org/minipass-json-stream/-/minipass-json-stream-1.0.1.tgz", + "integrity": "sha512-ODqY18UZt/I8k+b7rl2AENgbWE8IDYam+undIJONvigAz8KR5GWblsFTEfQs0WODsjbSXWlm+JHEv8Gr6Tfdbg==", "dev": true, - "license": "MIT", "dependencies": { "jsonparse": "^1.3.1", "minipass": "^3.0.0" } }, - "node_modules/minipass-json-stream/node_modules/minipass": { - "version": "3.3.6", - "dev": true, - "license": "ISC", - "dependencies": { - "yallist": "^4.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/minipass-json-stream/node_modules/yallist": { - "version": "4.0.0", - "dev": true, - "license": "ISC" - }, "node_modules/minipass-pipeline": { "version": "1.2.4", + "resolved": "https://registry.npmjs.org/minipass-pipeline/-/minipass-pipeline-1.2.4.tgz", + "integrity": "sha512-xuIq7cIOt09RPRJ19gdi4b+RiNvDFYe5JH+ggNvBqGqpQXcru3PcRmOZuHBKWK1Txf9+cQ+HMVN4d6z46LZP7A==", "dev": true, - "license": "ISC", "dependencies": { "minipass": "^3.0.0" }, @@ -11267,26 +12645,11 @@ "node": ">=8" } }, - "node_modules/minipass-pipeline/node_modules/minipass": { - "version": "3.3.6", - "dev": true, - "license": "ISC", - "dependencies": { - "yallist": "^4.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/minipass-pipeline/node_modules/yallist": { - "version": "4.0.0", - "dev": true, - "license": "ISC" - }, "node_modules/minipass-sized": { "version": "1.0.3", + "resolved": "https://registry.npmjs.org/minipass-sized/-/minipass-sized-1.0.3.tgz", + "integrity": "sha512-MbkQQ2CTiBMlA2Dm/5cY+9SWFEN8pzzOXi6rlM5Xxq0Yqbda5ZQy9sU75a673FE9ZK0Zsbr6Y5iP6u9nktfg2g==", "dev": true, - "license": "ISC", "dependencies": { "minipass": "^3.0.0" }, @@ -11294,26 +12657,17 @@ "node": ">=8" } }, - "node_modules/minipass-sized/node_modules/minipass": { - "version": "3.3.6", - "dev": true, - "license": "ISC", - "dependencies": { - "yallist": "^4.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/minipass-sized/node_modules/yallist": { + "node_modules/minipass/node_modules/yallist": { "version": "4.0.0", - "dev": true, - "license": "ISC" + "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", + "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==", + "dev": true }, "node_modules/minizlib": { "version": "2.1.2", + "resolved": "https://registry.npmjs.org/minizlib/-/minizlib-2.1.2.tgz", + "integrity": "sha512-bAxsR8BVfj60DWXHE3u30oHzfl4G7khkSuPW+qvpd7jFRHm7dLxOjUk1EHACJ/hxLY8phGJ0YhYHZo7jil7Qdg==", "dev": true, - "license": "MIT", "dependencies": { "minipass": "^3.0.0", "yallist": "^4.0.0" @@ -11322,26 +12676,17 @@ "node": ">= 8" } }, - "node_modules/minizlib/node_modules/minipass": { - "version": "3.3.6", - "dev": true, - "license": "ISC", - "dependencies": { - "yallist": "^4.0.0" - }, - "engines": { - "node": ">=8" - } - }, "node_modules/minizlib/node_modules/yallist": { "version": "4.0.0", - "dev": true, - "license": "ISC" + "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", + "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==", + "dev": true }, "node_modules/mkdirp": { "version": "1.0.4", + "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-1.0.4.tgz", + "integrity": "sha512-vVqVZQyf3WLx2Shd0qJ9xuvqgAyKPLAiqITEtqW0oIUjzo3PePDd6fW9iFz30ef7Ysp/oiWqbhszeGWW2T6Gzw==", "dev": true, - "license": "MIT", "bin": { "mkdirp": "bin/cmd.js" }, @@ -11351,29 +12696,33 @@ }, "node_modules/mnemonist": { "version": "0.38.3", + "resolved": "https://registry.npmjs.org/mnemonist/-/mnemonist-0.38.3.tgz", + "integrity": "sha512-2K9QYubXx/NAjv4VLq1d1Ly8pWNC5L3BrixtdkyTegXWJIqY+zLNDhhX/A+ZwWt70tB1S8H4BE8FLYEFyNoOBw==", "dev": true, - "license": "MIT", "dependencies": { "obliterator": "^1.6.1" } }, "node_modules/modify-values": { "version": "1.0.1", + "resolved": "https://registry.npmjs.org/modify-values/-/modify-values-1.0.1.tgz", + "integrity": "sha512-xV2bxeN6F7oYjZWTe/YPAy6MN2M+sL4u/Rlm2AHCIVGfo2p1yGmBHQ6vHehl4bRTZBdHu3TSkWdYgkwpYzAGSw==", "dev": true, - "license": "MIT", "engines": { "node": ">=0.10.0" } }, "node_modules/ms": { "version": "2.1.2", - "dev": true, - "license": "MIT" + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", + "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", + "dev": true }, "node_modules/multimatch": { "version": "5.0.0", + "resolved": "https://registry.npmjs.org/multimatch/-/multimatch-5.0.0.tgz", + "integrity": "sha512-ypMKuglUrZUD99Tk2bUQ+xNQj43lPEfAeX2o9cTteAmShXy2VHDJpuwu1o0xqoKCt9jLVAvwyFKdLTPXKAfJyA==", "dev": true, - "license": "MIT", "dependencies": { "@types/minimatch": "^3.0.3", "array-differ": "^3.0.0", @@ -11390,16 +12739,18 @@ }, "node_modules/multimatch/node_modules/arrify": { "version": "2.0.1", + "resolved": "https://registry.npmjs.org/arrify/-/arrify-2.0.1.tgz", + "integrity": "sha512-3duEwti880xqi4eAMN8AyR4a0ByT90zoYdLlevfrvU43vb0YZwZVfxOgxWrLXXXpyugL0hNZc9G6BiB5B3nUug==", "dev": true, - "license": "MIT", "engines": { "node": ">=8" } }, "node_modules/multimatch/node_modules/brace-expansion": { "version": "1.1.11", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", + "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", "dev": true, - "license": "MIT", "dependencies": { "balanced-match": "^1.0.0", "concat-map": "0.0.1" @@ -11407,8 +12758,9 @@ }, "node_modules/multimatch/node_modules/minimatch": { "version": "3.1.2", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", + "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", "dev": true, - "license": "ISC", "dependencies": { "brace-expansion": "^1.1.7" }, @@ -11418,31 +12770,36 @@ }, "node_modules/mute-stream": { "version": "0.0.8", - "dev": true, - "license": "ISC" + "resolved": "https://registry.npmjs.org/mute-stream/-/mute-stream-0.0.8.tgz", + "integrity": "sha512-nnbWWOkoWyUsTjKrhgD0dcz22mdkSnpYqbEjIm2nhwhuxlSkpywJmBo8h0ZqJdkp73mb90SssHkN4rsRaBAfAA==", + "dev": true }, "node_modules/natural-compare": { "version": "1.4.0", - "dev": true, - "license": "MIT" + "resolved": "https://registry.npmjs.org/natural-compare/-/natural-compare-1.4.0.tgz", + "integrity": "sha512-OWND8ei3VtNC9h7V60qff3SVobHr996CTwgxubgyQYEpg290h9J0buyECNNJexkFm5sOajh5G116RYA1c8ZMSw==", + "dev": true }, "node_modules/negotiator": { "version": "0.6.3", + "resolved": "https://registry.npmjs.org/negotiator/-/negotiator-0.6.3.tgz", + "integrity": "sha512-+EUsqGPLsM+j/zdChZjsnX51g4XrHFOIXwfnCVPGlQk/k5giakcKsuxCObBRu6DSm9opw/O6slWbJdghQM4bBg==", "dev": true, - "license": "MIT", "engines": { "node": ">= 0.6" } }, "node_modules/neo-async": { "version": "2.6.2", - "dev": true, - "license": "MIT" + "resolved": "https://registry.npmjs.org/neo-async/-/neo-async-2.6.2.tgz", + "integrity": "sha512-Yd3UES5mWCSqR+qNT93S3UoYUkqAZ9lLg8a7g9rimsWmYGK8cVToA4/sF3RrshdyV3sAGMXVUmpMYOw+dLpOuw==", + "dev": true }, "node_modules/nise": { - "version": "5.1.9", + "version": "5.1.7", + "resolved": "https://registry.npmjs.org/nise/-/nise-5.1.7.tgz", + "integrity": "sha512-wWtNUhkT7k58uvWTB/Gy26eA/EJKtPZFVAhEilN5UYVmmGRYOURbejRUyKm0Uu9XVEW7K5nBOZfR8VMB4QR2RQ==", "dev": true, - "license": "BSD-3-Clause", "dependencies": { "@sinonjs/commons": "^3.0.0", "@sinonjs/fake-timers": "^11.2.2", @@ -11453,16 +12810,18 @@ }, "node_modules/nise/node_modules/@sinonjs/fake-timers": { "version": "11.2.2", + "resolved": "https://registry.npmjs.org/@sinonjs/fake-timers/-/fake-timers-11.2.2.tgz", + "integrity": "sha512-G2piCSxQ7oWOxwGSAyFHfPIsyeJGXYtc6mFbnFA+kRXkiEnTl8c/8jul2S329iFBnDI9HGoeWWAZvuvOkZccgw==", "dev": true, - "license": "BSD-3-Clause", "dependencies": { "@sinonjs/commons": "^3.0.0" } }, "node_modules/node-fetch": { "version": "2.6.7", + "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.6.7.tgz", + "integrity": "sha512-ZjMPFEfVx5j+y2yF35Kzx5sF7kDzxuDj6ziH4FFbOp87zKDZNx8yExJIb05OGF4Nlt9IHFIMBkRl41VdvcNdbQ==", "dev": true, - "license": "MIT", "dependencies": { "whatwg-url": "^5.0.0" }, @@ -11480,8 +12839,9 @@ }, "node_modules/node-gyp": { "version": "10.0.1", + "resolved": "https://registry.npmjs.org/node-gyp/-/node-gyp-10.0.1.tgz", + "integrity": "sha512-gg3/bHehQfZivQVfqIyy8wTdSymF9yTyP4CJifK73imyNMU8AIGQE2pUa7dNWfmMeG9cDVF2eehiRMv0LC1iAg==", "dev": true, - "license": "MIT", "dependencies": { "env-paths": "^2.2.0", "exponential-backoff": "^3.1.1", @@ -11503,8 +12863,9 @@ }, "node_modules/node-gyp/node_modules/glob": { "version": "10.3.10", + "resolved": "https://registry.npmjs.org/glob/-/glob-10.3.10.tgz", + "integrity": "sha512-fa46+tv1Ak0UPK1TOy/pZrIybNNt4HCv7SDzwyfiOZkvZLEbjsZkJBPtDHVshZjbecAoAGSC20MjLDG/qr679g==", "dev": true, - "license": "ISC", "dependencies": { "foreground-child": "^3.1.0", "jackspeak": "^2.3.5", @@ -11524,16 +12885,27 @@ }, "node_modules/node-gyp/node_modules/isexe": { "version": "3.1.1", + "resolved": "https://registry.npmjs.org/isexe/-/isexe-3.1.1.tgz", + "integrity": "sha512-LpB/54B+/2J5hqQ7imZHfdU31OlgQqx7ZicVlkm9kzg9/w8GKLEcFfJl/t7DCEDueOyBAD6zCCwTO6Fzs0NoEQ==", "dev": true, - "license": "ISC", "engines": { "node": ">=16" } }, + "node_modules/node-gyp/node_modules/minipass": { + "version": "7.0.4", + "resolved": "https://registry.npmjs.org/minipass/-/minipass-7.0.4.tgz", + "integrity": "sha512-jYofLM5Dam9279rdkWzqHozUo4ybjdZmCsDHePy5V/PbBcVMiSZR97gmAy45aqi8CK1lG2ECd356FU86avfwUQ==", + "dev": true, + "engines": { + "node": ">=16 || 14 >=14.17" + } + }, "node_modules/node-gyp/node_modules/which": { "version": "4.0.0", + "resolved": "https://registry.npmjs.org/which/-/which-4.0.0.tgz", + "integrity": "sha512-GlaYyEb07DPxYCKhKzplCWBJtvxZcZMrL+4UkrTSJHHPyZU4mYYTv3qaOe77H7EODLSSopAUFAc6W8U4yqvscg==", "dev": true, - "license": "ISC", "dependencies": { "isexe": "^3.1.1" }, @@ -11546,23 +12918,27 @@ }, "node_modules/node-int64": { "version": "0.4.0", - "dev": true, - "license": "MIT" + "resolved": "https://registry.npmjs.org/node-int64/-/node-int64-0.4.0.tgz", + "integrity": "sha512-O5lz91xSOeoXP6DulyHfllpq+Eg00MWitZIbtPfoSEvqIHdl5gfcY6hYzDWnj0qD5tz52PI08u9qUvSVeUBeHw==", + "dev": true }, "node_modules/node-machine-id": { "version": "1.1.12", - "dev": true, - "license": "MIT" + "resolved": "https://registry.npmjs.org/node-machine-id/-/node-machine-id-1.1.12.tgz", + "integrity": "sha512-QNABxbrPa3qEIfrE6GOJ7BYIuignnJw7iQ2YPbc3Nla1HzRJjXzZOiikfF8m7eAMfichLt3M4VgLOetqgDmgGQ==", + "dev": true }, "node_modules/node-releases": { "version": "2.0.14", - "dev": true, - "license": "MIT" + "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-2.0.14.tgz", + "integrity": "sha512-y10wOWt8yZpqXmOgRo77WaHEmhYQYGNA6y421PKsKYWEK8aW+cqAphborZDhqfyKrbZEN92CN1X2KbafY2s7Yw==", + "dev": true }, "node_modules/nopt": { "version": "7.2.0", + "resolved": "https://registry.npmjs.org/nopt/-/nopt-7.2.0.tgz", + "integrity": "sha512-CVDtwCdhYIvnAzFoJ6NJ6dX3oga9/HyciQDnG1vQDjSLMeKLJ4A93ZqYKDrgYSr1FBY5/hMYC+2VCi24pgpkGA==", "dev": true, - "license": "ISC", "dependencies": { "abbrev": "^2.0.0" }, @@ -11575,8 +12951,9 @@ }, "node_modules/normalize-package-data": { "version": "3.0.3", + "resolved": "https://registry.npmjs.org/normalize-package-data/-/normalize-package-data-3.0.3.tgz", + "integrity": "sha512-p2W1sgqij3zMMyRC067Dg16bfzVH+w7hyegmpIvZ4JNjqtGOVAIvLmjBx3yP7YTe9vKJgkoNOPjwQGogDoMXFA==", "dev": true, - "license": "BSD-2-Clause", "dependencies": { "hosted-git-info": "^4.0.1", "is-core-module": "^2.5.0", @@ -11589,24 +12966,27 @@ }, "node_modules/normalize-path": { "version": "3.0.0", + "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-3.0.0.tgz", + "integrity": "sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==", "dev": true, - "license": "MIT", "engines": { "node": ">=0.10.0" } }, "node_modules/npm-bundled": { "version": "1.1.2", + "resolved": "https://registry.npmjs.org/npm-bundled/-/npm-bundled-1.1.2.tgz", + "integrity": "sha512-x5DHup0SuyQcmL3s7Rx/YQ8sbw/Hzg0rj48eN0dV7hf5cmQq5PXIeioroH3raV1QC1yh3uTYuMThvEQF3iKgGQ==", "dev": true, - "license": "ISC", "dependencies": { "npm-normalize-package-bin": "^1.0.1" } }, "node_modules/npm-install-checks": { "version": "6.3.0", + "resolved": "https://registry.npmjs.org/npm-install-checks/-/npm-install-checks-6.3.0.tgz", + "integrity": "sha512-W29RiK/xtpCGqn6f3ixfRYGk+zRyr+Ew9F2E20BfXxT5/euLdA/Nm7fO7OeTGuAmTs30cpgInyJ0cYe708YTZw==", "dev": true, - "license": "BSD-2-Clause", "dependencies": { "semver": "^7.1.1" }, @@ -11616,13 +12996,15 @@ }, "node_modules/npm-normalize-package-bin": { "version": "1.0.1", - "dev": true, - "license": "ISC" + "resolved": "https://registry.npmjs.org/npm-normalize-package-bin/-/npm-normalize-package-bin-1.0.1.tgz", + "integrity": "sha512-EPfafl6JL5/rU+ot6P3gRSCpPDW5VmIzX959Ob1+ySFUuuYHWHekXpwdUZcKP5C+DS4GEtdJluwBjnsNDl+fSA==", + "dev": true }, "node_modules/npm-package-arg": { "version": "8.1.1", + "resolved": "https://registry.npmjs.org/npm-package-arg/-/npm-package-arg-8.1.1.tgz", + "integrity": "sha512-CsP95FhWQDwNqiYS+Q0mZ7FAEDytDZAkNxQqea6IaAFJTAY9Lhhqyl0irU/6PMc7BGfUmnsbHcqxJD7XuVM/rg==", "dev": true, - "license": "ISC", "dependencies": { "hosted-git-info": "^3.0.6", "semver": "^7.0.0", @@ -11634,13 +13016,15 @@ }, "node_modules/npm-package-arg/node_modules/builtins": { "version": "1.0.3", - "dev": true, - "license": "MIT" + "resolved": "https://registry.npmjs.org/builtins/-/builtins-1.0.3.tgz", + "integrity": "sha512-uYBjakWipfaO/bXI7E8rq6kpwHRZK5cNYrUv2OzZSI/FvmdMyXJ2tG9dKcjEC5YHmHpUAwsargWIZNWdxb/bnQ==", + "dev": true }, "node_modules/npm-package-arg/node_modules/hosted-git-info": { "version": "3.0.8", + "resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-3.0.8.tgz", + "integrity": "sha512-aXpmwoOhRBrw6X3j0h5RloK4x1OzsxMPyxqIHyNfSe2pypkVTZFpEiRoSipPEPlMrh0HW/XsjkJ5WgnCirpNUw==", "dev": true, - "license": "ISC", "dependencies": { "lru-cache": "^6.0.0" }, @@ -11650,8 +13034,9 @@ }, "node_modules/npm-package-arg/node_modules/lru-cache": { "version": "6.0.0", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz", + "integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==", "dev": true, - "license": "ISC", "dependencies": { "yallist": "^4.0.0" }, @@ -11661,21 +13046,24 @@ }, "node_modules/npm-package-arg/node_modules/validate-npm-package-name": { "version": "3.0.0", + "resolved": "https://registry.npmjs.org/validate-npm-package-name/-/validate-npm-package-name-3.0.0.tgz", + "integrity": "sha512-M6w37eVCMMouJ9V/sdPGnC5H4uDr73/+xdq0FBLO3TFFX1+7wiUY6Es328NN+y43tmY+doUdN9g9J21vqB7iLw==", "dev": true, - "license": "ISC", "dependencies": { "builtins": "^1.0.3" } }, "node_modules/npm-package-arg/node_modules/yallist": { "version": "4.0.0", - "dev": true, - "license": "ISC" + "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", + "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==", + "dev": true }, "node_modules/npm-packlist": { "version": "5.1.1", + "resolved": "https://registry.npmjs.org/npm-packlist/-/npm-packlist-5.1.1.tgz", + "integrity": "sha512-UfpSvQ5YKwctmodvPPkK6Fwk603aoVsf8AEbmVKAEECrfvL8SSe1A2YIwrJ6xmTHAITKPwwZsWo7WwEbNk0kxw==", "dev": true, - "license": "ISC", "dependencies": { "glob": "^8.0.1", "ignore-walk": "^5.0.1", @@ -11691,8 +13079,9 @@ }, "node_modules/npm-packlist/node_modules/glob": { "version": "8.1.0", + "resolved": "https://registry.npmjs.org/glob/-/glob-8.1.0.tgz", + "integrity": "sha512-r8hpEjiQEYlF2QU0df3dS+nxxSIreXQS1qRhMJM0Q5NDdR386C7jb7Hwwod8Fgiuex+k0GFjgft18yvxm5XoCQ==", "dev": true, - "license": "ISC", "dependencies": { "fs.realpath": "^1.0.0", "inflight": "^1.0.4", @@ -11709,8 +13098,9 @@ }, "node_modules/npm-packlist/node_modules/minimatch": { "version": "5.1.6", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-5.1.6.tgz", + "integrity": "sha512-lKwV/1brpG6mBUFHtb7NUmtABCb2WZZmm2wNiOA5hAb8VdCS4B3dtMWyvcoViccwAW/COERjXLt0zP1zXUN26g==", "dev": true, - "license": "ISC", "dependencies": { "brace-expansion": "^2.0.1" }, @@ -11720,8 +13110,9 @@ }, "node_modules/npm-pick-manifest": { "version": "9.0.0", + "resolved": "https://registry.npmjs.org/npm-pick-manifest/-/npm-pick-manifest-9.0.0.tgz", + "integrity": "sha512-VfvRSs/b6n9ol4Qb+bDwNGUXutpy76x6MARw/XssevE0TnctIKcmklJZM5Z7nqs5z5aW+0S63pgCNbpkUNNXBg==", "dev": true, - "license": "ISC", "dependencies": { "npm-install-checks": "^6.0.0", "npm-normalize-package-bin": "^3.0.0", @@ -11734,8 +13125,9 @@ }, "node_modules/npm-pick-manifest/node_modules/hosted-git-info": { "version": "7.0.1", + "resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-7.0.1.tgz", + "integrity": "sha512-+K84LB1DYwMHoHSgaOY/Jfhw3ucPmSET5v98Ke/HdNSw4a0UktWzyW1mjhjpuxxTqOOsfWT/7iVshHmVZ4IpOA==", "dev": true, - "license": "ISC", "dependencies": { "lru-cache": "^10.0.1" }, @@ -11745,24 +13137,27 @@ }, "node_modules/npm-pick-manifest/node_modules/lru-cache": { "version": "10.2.0", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-10.2.0.tgz", + "integrity": "sha512-2bIM8x+VAf6JT4bKAljS1qUWgMsqZRPGJS6FSahIMPVvctcNhyVp7AJu7quxOW9jwkryBReKZY5tY5JYv2n/7Q==", "dev": true, - "license": "ISC", "engines": { "node": "14 || >=16.14" } }, "node_modules/npm-pick-manifest/node_modules/npm-normalize-package-bin": { "version": "3.0.1", + "resolved": "https://registry.npmjs.org/npm-normalize-package-bin/-/npm-normalize-package-bin-3.0.1.tgz", + "integrity": "sha512-dMxCf+zZ+3zeQZXKxmyuCKlIDPGuv8EF940xbkC4kQVDTtqoh6rJFO+JTKSA6/Rwi0getWmtuy4Itup0AMcaDQ==", "dev": true, - "license": "ISC", "engines": { "node": "^14.17.0 || ^16.13.0 || >=18.0.0" } }, "node_modules/npm-pick-manifest/node_modules/npm-package-arg": { "version": "11.0.1", + "resolved": "https://registry.npmjs.org/npm-package-arg/-/npm-package-arg-11.0.1.tgz", + "integrity": "sha512-M7s1BD4NxdAvBKUPqqRW957Xwcl/4Zvo8Aj+ANrzvIPzGJZElrH7Z//rSaec2ORcND6FHHLnZeY8qgTpXDMFQQ==", "dev": true, - "license": "ISC", "dependencies": { "hosted-git-info": "^7.0.0", "proc-log": "^3.0.0", @@ -11775,8 +13170,9 @@ }, "node_modules/npm-registry-fetch": { "version": "14.0.5", + "resolved": "https://registry.npmjs.org/npm-registry-fetch/-/npm-registry-fetch-14.0.5.tgz", + "integrity": "sha512-kIDMIo4aBm6xg7jOttupWZamsZRkAqMqwqqbVXnUqstY5+tapvv6bkH/qMR76jdgV+YljEUCyWx3hRYMrJiAgA==", "dev": true, - "license": "ISC", "dependencies": { "make-fetch-happen": "^11.0.0", "minipass": "^5.0.0", @@ -11790,21 +13186,11 @@ "node": "^14.17.0 || ^16.13.0 || >=18.0.0" } }, - "node_modules/npm-registry-fetch/node_modules/agent-base": { - "version": "6.0.2", - "dev": true, - "license": "MIT", - "dependencies": { - "debug": "4" - }, - "engines": { - "node": ">= 6.0.0" - } - }, "node_modules/npm-registry-fetch/node_modules/cacache": { "version": "17.1.4", + "resolved": "https://registry.npmjs.org/cacache/-/cacache-17.1.4.tgz", + "integrity": "sha512-/aJwG2l3ZMJ1xNAnqbMpA40of9dj/pIH3QfiuQSqjfPJF747VR0J/bHn+/KdNnHKc6XQcWt/AfRSBft82W1d2A==", "dev": true, - "license": "ISC", "dependencies": { "@npmcli/fs": "^3.1.0", "fs-minipass": "^3.0.0", @@ -11825,16 +13211,39 @@ }, "node_modules/npm-registry-fetch/node_modules/cacache/node_modules/minipass": { "version": "7.0.4", + "resolved": "https://registry.npmjs.org/minipass/-/minipass-7.0.4.tgz", + "integrity": "sha512-jYofLM5Dam9279rdkWzqHozUo4ybjdZmCsDHePy5V/PbBcVMiSZR97gmAy45aqi8CK1lG2ECd356FU86avfwUQ==", + "dev": true, + "engines": { + "node": ">=16 || 14 >=14.17" + } + }, + "node_modules/npm-registry-fetch/node_modules/fs-minipass": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/fs-minipass/-/fs-minipass-3.0.3.tgz", + "integrity": "sha512-XUBA9XClHbnJWSfBzjkm6RvPsyg3sryZt06BEQoXcF7EK/xpGaQYJgQKDJSUH5SGZ76Y7pFx1QBnXz09rU5Fbw==", + "dev": true, + "dependencies": { + "minipass": "^7.0.3" + }, + "engines": { + "node": "^14.17.0 || ^16.13.0 || >=18.0.0" + } + }, + "node_modules/npm-registry-fetch/node_modules/fs-minipass/node_modules/minipass": { + "version": "7.0.4", + "resolved": "https://registry.npmjs.org/minipass/-/minipass-7.0.4.tgz", + "integrity": "sha512-jYofLM5Dam9279rdkWzqHozUo4ybjdZmCsDHePy5V/PbBcVMiSZR97gmAy45aqi8CK1lG2ECd356FU86avfwUQ==", "dev": true, - "license": "ISC", "engines": { "node": ">=16 || 14 >=14.17" } }, "node_modules/npm-registry-fetch/node_modules/glob": { "version": "10.3.10", + "resolved": "https://registry.npmjs.org/glob/-/glob-10.3.10.tgz", + "integrity": "sha512-fa46+tv1Ak0UPK1TOy/pZrIybNNt4HCv7SDzwyfiOZkvZLEbjsZkJBPtDHVshZjbecAoAGSC20MjLDG/qr679g==", "dev": true, - "license": "ISC", "dependencies": { "foreground-child": "^3.1.0", "jackspeak": "^2.3.5", @@ -11847,59 +13256,37 @@ }, "engines": { "node": ">=16 || 14 >=14.17" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" - } - }, - "node_modules/npm-registry-fetch/node_modules/hosted-git-info": { - "version": "6.1.1", - "dev": true, - "license": "ISC", - "dependencies": { - "lru-cache": "^7.5.1" - }, - "engines": { - "node": "^14.17.0 || ^16.13.0 || >=18.0.0" - } - }, - "node_modules/npm-registry-fetch/node_modules/http-proxy-agent": { - "version": "5.0.0", - "dev": true, - "license": "MIT", - "dependencies": { - "@tootallnate/once": "2", - "agent-base": "6", - "debug": "4" - }, - "engines": { - "node": ">= 6" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" } }, - "node_modules/npm-registry-fetch/node_modules/https-proxy-agent": { - "version": "5.0.1", + "node_modules/npm-registry-fetch/node_modules/hosted-git-info": { + "version": "6.1.1", + "resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-6.1.1.tgz", + "integrity": "sha512-r0EI+HBMcXadMrugk0GCQ+6BQV39PiWAZVfq7oIckeGiN7sjRGyQxPdft3nQekFTCQbYxLBH+/axZMeH8UX6+w==", "dev": true, - "license": "MIT", "dependencies": { - "agent-base": "6", - "debug": "4" + "lru-cache": "^7.5.1" }, "engines": { - "node": ">= 6" + "node": "^14.17.0 || ^16.13.0 || >=18.0.0" } }, "node_modules/npm-registry-fetch/node_modules/lru-cache": { "version": "7.18.3", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-7.18.3.tgz", + "integrity": "sha512-jumlc0BIUrS3qJGgIkWZsyfAM7NCWiBcCDhnd+3NNM5KbBmLTgHVfWBcg6W+rLUsIpzpERPsvwUP7CckAQSOoA==", "dev": true, - "license": "ISC", "engines": { "node": ">=12" } }, "node_modules/npm-registry-fetch/node_modules/make-fetch-happen": { "version": "11.1.1", + "resolved": "https://registry.npmjs.org/make-fetch-happen/-/make-fetch-happen-11.1.1.tgz", + "integrity": "sha512-rLWS7GCSTcEujjVBs2YqG7Y4643u8ucvCJeSRqiLYhesrDuzeuFIk37xREzAsfQaqzl8b9rNCE4m6J8tvX4Q8w==", "dev": true, - "license": "ISC", "dependencies": { "agentkeepalive": "^4.2.1", "cacache": "^17.0.0", @@ -11923,38 +13310,18 @@ }, "node_modules/npm-registry-fetch/node_modules/minipass": { "version": "5.0.0", + "resolved": "https://registry.npmjs.org/minipass/-/minipass-5.0.0.tgz", + "integrity": "sha512-3FnjYuehv9k6ovOEbyOswadCDPX1piCfhV8ncmYtHOjuPwylVWsghTLo7rabjC3Rx5xD4HDx8Wm1xnMF7S5qFQ==", "dev": true, - "license": "ISC", - "engines": { - "node": ">=8" - } - }, - "node_modules/npm-registry-fetch/node_modules/minipass-collect": { - "version": "1.0.2", - "dev": true, - "license": "ISC", - "dependencies": { - "minipass": "^3.0.0" - }, - "engines": { - "node": ">= 8" - } - }, - "node_modules/npm-registry-fetch/node_modules/minipass-collect/node_modules/minipass": { - "version": "3.3.6", - "dev": true, - "license": "ISC", - "dependencies": { - "yallist": "^4.0.0" - }, "engines": { "node": ">=8" } }, "node_modules/npm-registry-fetch/node_modules/npm-package-arg": { "version": "10.1.0", + "resolved": "https://registry.npmjs.org/npm-package-arg/-/npm-package-arg-10.1.0.tgz", + "integrity": "sha512-uFyyCEmgBfZTtrKk/5xDfHp6+MdrqGotX/VoOyEEl3mBwiEE5FlBaePanazJSVMPT7vKepcjYBY2ztg9A3yPIA==", "dev": true, - "license": "ISC", "dependencies": { "hosted-git-info": "^6.0.0", "proc-log": "^3.0.0", @@ -11965,23 +13332,11 @@ "node": "^14.17.0 || ^16.13.0 || >=18.0.0" } }, - "node_modules/npm-registry-fetch/node_modules/socks-proxy-agent": { - "version": "7.0.0", - "dev": true, - "license": "MIT", - "dependencies": { - "agent-base": "^6.0.2", - "debug": "^4.3.3", - "socks": "^2.6.2" - }, - "engines": { - "node": ">= 10" - } - }, "node_modules/npm-registry-fetch/node_modules/ssri": { "version": "10.0.5", + "resolved": "https://registry.npmjs.org/ssri/-/ssri-10.0.5.tgz", + "integrity": "sha512-bSf16tAFkGeRlUNDjXu8FzaMQt6g2HZJrun7mtMbIPOddxt3GLMSz5VWUWcqTJUPfLEaDIepGxv+bYQW49596A==", "dev": true, - "license": "ISC", "dependencies": { "minipass": "^7.0.3" }, @@ -11991,21 +13346,18 @@ }, "node_modules/npm-registry-fetch/node_modules/ssri/node_modules/minipass": { "version": "7.0.4", + "resolved": "https://registry.npmjs.org/minipass/-/minipass-7.0.4.tgz", + "integrity": "sha512-jYofLM5Dam9279rdkWzqHozUo4ybjdZmCsDHePy5V/PbBcVMiSZR97gmAy45aqi8CK1lG2ECd356FU86avfwUQ==", "dev": true, - "license": "ISC", "engines": { "node": ">=16 || 14 >=14.17" } }, - "node_modules/npm-registry-fetch/node_modules/yallist": { - "version": "4.0.0", - "dev": true, - "license": "ISC" - }, "node_modules/npm-run-path": { "version": "4.0.1", + "resolved": "https://registry.npmjs.org/npm-run-path/-/npm-run-path-4.0.1.tgz", + "integrity": "sha512-S48WzZW777zhNIrn7gxOlISNAqi9ZC/uQFnRdbeIHhZhCA6UqpkOT8T1G7BvfdgP4Er8gF4sUbaS0i7QvIfCWw==", "dev": true, - "license": "MIT", "dependencies": { "path-key": "^3.0.0" }, @@ -12015,8 +13367,9 @@ }, "node_modules/npmlog": { "version": "6.0.2", + "resolved": "https://registry.npmjs.org/npmlog/-/npmlog-6.0.2.tgz", + "integrity": "sha512-/vBvz5Jfr9dT/aFWd0FIRf+T/Q2WBsLENygUaFUqstqsycmZAP/t5BvFJTK0viFmSUxiUKTUplWy5vt+rvKIxg==", "dev": true, - "license": "ISC", "dependencies": { "are-we-there-yet": "^3.0.0", "console-control-strings": "^1.1.0", @@ -12028,12 +13381,13 @@ } }, "node_modules/nx": { - "version": "18.0.7", + "version": "18.0.3", + "resolved": "https://registry.npmjs.org/nx/-/nx-18.0.3.tgz", + "integrity": "sha512-Lvkd+er641xrBqA7kdEnzf7zvLIEmqLouzONByVZtRrk1BbgEjapUj9r+QLBxXTvmhS7tHFLNiMh1KgpDOWsLQ==", "dev": true, "hasInstallScript": true, - "license": "MIT", "dependencies": { - "@nrwl/tao": "18.0.7", + "@nrwl/tao": "18.0.3", "@yarnpkg/lockfile": "^1.1.0", "@yarnpkg/parsers": "3.0.0-rc.46", "@zkochan/js-yaml": "0.0.6", @@ -12073,19 +13427,19 @@ "nx-cloud": "bin/nx-cloud.js" }, "optionalDependencies": { - "@nx/nx-darwin-arm64": "18.0.7", - "@nx/nx-darwin-x64": "18.0.7", - "@nx/nx-freebsd-x64": "18.0.7", - "@nx/nx-linux-arm-gnueabihf": "18.0.7", - "@nx/nx-linux-arm64-gnu": "18.0.7", - "@nx/nx-linux-arm64-musl": "18.0.7", - "@nx/nx-linux-x64-gnu": "18.0.7", - "@nx/nx-linux-x64-musl": "18.0.7", - "@nx/nx-win32-arm64-msvc": "18.0.7", - "@nx/nx-win32-x64-msvc": "18.0.7" + "@nx/nx-darwin-arm64": "18.0.3", + "@nx/nx-darwin-x64": "18.0.3", + "@nx/nx-freebsd-x64": "18.0.3", + "@nx/nx-linux-arm-gnueabihf": "18.0.3", + "@nx/nx-linux-arm64-gnu": "18.0.3", + "@nx/nx-linux-arm64-musl": "18.0.3", + "@nx/nx-linux-x64-gnu": "18.0.3", + "@nx/nx-linux-x64-musl": "18.0.3", + "@nx/nx-win32-arm64-msvc": "18.0.3", + "@nx/nx-win32-x64-msvc": "18.0.3" }, "peerDependencies": { - "@swc-node/register": "^1.8.0", + "@swc-node/register": "^1.6.7", "@swc/core": "^1.3.85" }, "peerDependenciesMeta": { @@ -12099,8 +13453,9 @@ }, "node_modules/nx/node_modules/ora": { "version": "5.3.0", + "resolved": "https://registry.npmjs.org/ora/-/ora-5.3.0.tgz", + "integrity": "sha512-zAKMgGXUim0Jyd6CXK9lraBnD3H5yPGBPPOkC23a2BG6hsm4Zu6OQSjQuEtV0BHDf4aKHcUFvJiGRrFuW3MG8g==", "dev": true, - "license": "MIT", "dependencies": { "bl": "^4.0.3", "chalk": "^4.1.0", @@ -12120,16 +13475,18 @@ }, "node_modules/nx/node_modules/strip-bom": { "version": "3.0.0", + "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-3.0.0.tgz", + "integrity": "sha512-vavAMRXOgBVNF6nyEEmL3DBK19iRpDcoIwW+swQ+CbGiu7lju6t+JklA1MHweoWtadgt4ISVUsXLyDq34ddcwA==", "dev": true, - "license": "MIT", "engines": { "node": ">=4" } }, "node_modules/nx/node_modules/tsconfig-paths": { "version": "4.2.0", + "resolved": "https://registry.npmjs.org/tsconfig-paths/-/tsconfig-paths-4.2.0.tgz", + "integrity": "sha512-NoZ4roiN7LnbKn9QqE1amc9DJfzvZXxF4xDavcOWt1BPkdx+m+0gJuPM+S0vCe7zTJMYUP0R8pO2XMr+Y8oLIg==", "dev": true, - "license": "MIT", "dependencies": { "json5": "^2.2.2", "minimist": "^1.2.6", @@ -12141,24 +13498,27 @@ }, "node_modules/object-inspect": { "version": "1.13.1", + "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.13.1.tgz", + "integrity": "sha512-5qoj1RUiKOMsCCNLV1CBiPYE10sziTsnmNxkAI/rZhiD63CF7IqdFGC/XzjWjpSgLf0LxXX3bDFIh0E18f6UhQ==", "dev": true, - "license": "MIT", "funding": { "url": "https://github.com/sponsors/ljharb" } }, "node_modules/object-keys": { "version": "1.1.1", + "resolved": "https://registry.npmjs.org/object-keys/-/object-keys-1.1.1.tgz", + "integrity": "sha512-NuAESUOUMrlIXOfHKzD6bpPu3tYt3xvjNdRIQ+FeT0lNb4K8WR70CaDxhuNguS2XG+GjkyMwOzsN5ZktImfhLA==", "dev": true, - "license": "MIT", "engines": { "node": ">= 0.4" } }, "node_modules/object.assign": { "version": "4.1.5", + "resolved": "https://registry.npmjs.org/object.assign/-/object.assign-4.1.5.tgz", + "integrity": "sha512-byy+U7gp+FVwmyzKPYhW2h5l3crpmGsxl7X2s8y43IgxvG4g3QZ6CffDtsNQy1WsmZpQbO+ybo0AlW7TY6DcBQ==", "dev": true, - "license": "MIT", "dependencies": { "call-bind": "^1.0.5", "define-properties": "^1.2.1", @@ -12174,8 +13534,9 @@ }, "node_modules/object.fromentries": { "version": "2.0.7", + "resolved": "https://registry.npmjs.org/object.fromentries/-/object.fromentries-2.0.7.tgz", + "integrity": "sha512-UPbPHML6sL8PI/mOqPwsH4G6iyXcCGzLin8KvEPenOZN5lpCNBZZQ+V62vdjB1mQHrmqGQt5/OJzemUA+KJmEA==", "dev": true, - "license": "MIT", "dependencies": { "call-bind": "^1.0.2", "define-properties": "^1.2.0", @@ -12189,21 +13550,22 @@ } }, "node_modules/object.groupby": { - "version": "1.0.2", + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/object.groupby/-/object.groupby-1.0.1.tgz", + "integrity": "sha512-HqaQtqLnp/8Bn4GL16cj+CUYbnpe1bh0TtEaWvybszDG4tgxCJuRpV8VGuvNaI1fAnI4lUJzDG55MXcOH4JZcQ==", "dev": true, - "license": "MIT", "dependencies": { - "array.prototype.filter": "^1.0.3", - "call-bind": "^1.0.5", - "define-properties": "^1.2.1", - "es-abstract": "^1.22.3", - "es-errors": "^1.0.0" + "call-bind": "^1.0.2", + "define-properties": "^1.2.0", + "es-abstract": "^1.22.1", + "get-intrinsic": "^1.2.1" } }, "node_modules/object.values": { "version": "1.1.7", + "resolved": "https://registry.npmjs.org/object.values/-/object.values-1.1.7.tgz", + "integrity": "sha512-aU6xnDFYT3x17e/f0IiiwlGPTy2jzMySGfUB4fq6z7CV8l85CWHDk5ErhyhpfDHhrOMwGFhSQkhMGHaIotA6Ng==", "dev": true, - "license": "MIT", "dependencies": { "call-bind": "^1.0.2", "define-properties": "^1.2.0", @@ -12218,21 +13580,24 @@ }, "node_modules/obliterator": { "version": "1.6.1", - "dev": true, - "license": "MIT" + "resolved": "https://registry.npmjs.org/obliterator/-/obliterator-1.6.1.tgz", + "integrity": "sha512-9WXswnqINnnhOG/5SLimUlzuU1hFJUc8zkwyD59Sd+dPOMf05PmnYG/d6Q7HZ+KmgkZJa1PxRso6QdM3sTNHig==", + "dev": true }, "node_modules/once": { "version": "1.4.0", + "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", + "integrity": "sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w==", "dev": true, - "license": "ISC", "dependencies": { "wrappy": "1" } }, "node_modules/onetime": { "version": "5.1.2", + "resolved": "https://registry.npmjs.org/onetime/-/onetime-5.1.2.tgz", + "integrity": "sha512-kbpaSSGJTWdAY5KPVeMOKXSrPtr8C8C7wodJbcsd51jRnmD+GZu8Y0VoU6Dm5Z4vWr0Ig/1NKuWRKf7j5aaYSg==", "dev": true, - "license": "MIT", "dependencies": { "mimic-fn": "^2.1.0" }, @@ -12245,8 +13610,9 @@ }, "node_modules/open": { "version": "8.4.2", + "resolved": "https://registry.npmjs.org/open/-/open-8.4.2.tgz", + "integrity": "sha512-7x81NCL719oNbsq/3mh+hVrAWmFuEYUqrq/Iw3kUzH8ReypT9QQ0BLoJS7/G9k6N81XjW4qHWtjWwe/9eLy1EQ==", "dev": true, - "license": "MIT", "dependencies": { "define-lazy-prop": "^2.0.0", "is-docker": "^2.1.1", @@ -12261,8 +13627,9 @@ }, "node_modules/optionator": { "version": "0.9.3", + "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.9.3.tgz", + "integrity": "sha512-JjCoypp+jKn1ttEFExxhetCKeJt9zhAgAve5FXHixTvFDW/5aEktX9bufBKLRRMdU7bNtpLfcGu94B3cdEJgjg==", "dev": true, - "license": "MIT", "dependencies": { "@aashutoshrathi/word-wrap": "^1.2.3", "deep-is": "^0.1.3", @@ -12277,8 +13644,9 @@ }, "node_modules/ora": { "version": "5.4.1", + "resolved": "https://registry.npmjs.org/ora/-/ora-5.4.1.tgz", + "integrity": "sha512-5b6Y85tPxZZ7QytO+BQzysW31HJku27cRIlkbAXaNx+BdcVi+LlRFmVXzeF6a7JCwJpyw5c4b+YSVImQIrBpuQ==", "dev": true, - "license": "MIT", "dependencies": { "bl": "^4.1.0", "chalk": "^4.1.0", @@ -12299,24 +13667,27 @@ }, "node_modules/os-tmpdir": { "version": "1.0.2", + "resolved": "https://registry.npmjs.org/os-tmpdir/-/os-tmpdir-1.0.2.tgz", + "integrity": "sha512-D2FR03Vir7FIu45XBY20mTb+/ZSWB00sjU9jdQXt83gDrI4Ztz5Fs7/yy74g2N5SVQY4xY1qDr4rNddwYRVX0g==", "dev": true, - "license": "MIT", "engines": { "node": ">=0.10.0" } }, "node_modules/p-finally": { "version": "1.0.0", + "resolved": "https://registry.npmjs.org/p-finally/-/p-finally-1.0.0.tgz", + "integrity": "sha512-LICb2p9CB7FS+0eR1oqWnHhp0FljGLZCWBE9aix0Uye9W8LTQPwMTYVGWQWIw9RdQiDg4+epXQODwIYJtSJaow==", "dev": true, - "license": "MIT", "engines": { "node": ">=4" } }, "node_modules/p-limit": { "version": "3.1.0", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-3.1.0.tgz", + "integrity": "sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ==", "dev": true, - "license": "MIT", "dependencies": { "yocto-queue": "^0.1.0" }, @@ -12329,8 +13700,9 @@ }, "node_modules/p-locate": { "version": "5.0.0", + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-5.0.0.tgz", + "integrity": "sha512-LaNjtRWUBY++zB5nE/NwcaoMylSPk+S+ZHNB1TzdbMJMny6dynpAGt7X/tl/QYq3TIeE6nxHppbo2LGymrG5Pw==", "dev": true, - "license": "MIT", "dependencies": { "p-limit": "^3.0.2" }, @@ -12343,8 +13715,9 @@ }, "node_modules/p-map": { "version": "4.0.0", + "resolved": "https://registry.npmjs.org/p-map/-/p-map-4.0.0.tgz", + "integrity": "sha512-/bjOqmgETBYB5BoEeGVea8dmvHb2m9GLy1E9W43yeyfP6QQCZGFNa+XRceJEuDB6zqr+gKpIAmlLebMpykw/MQ==", "dev": true, - "license": "MIT", "dependencies": { "aggregate-error": "^3.0.0" }, @@ -12357,16 +13730,18 @@ }, "node_modules/p-map-series": { "version": "2.1.0", + "resolved": "https://registry.npmjs.org/p-map-series/-/p-map-series-2.1.0.tgz", + "integrity": "sha512-RpYIIK1zXSNEOdwxcfe7FdvGcs7+y5n8rifMhMNWvaxRNMPINJHF5GDeuVxWqnfrcHPSCnp7Oo5yNXHId9Av2Q==", "dev": true, - "license": "MIT", "engines": { "node": ">=8" } }, "node_modules/p-pipe": { "version": "3.1.0", + "resolved": "https://registry.npmjs.org/p-pipe/-/p-pipe-3.1.0.tgz", + "integrity": "sha512-08pj8ATpzMR0Y80x50yJHn37NF6vjrqHutASaX5LiH5npS9XPvrUmscd9MF5R4fuYRHOxQR1FfMIlF7AzwoPqw==", "dev": true, - "license": "MIT", "engines": { "node": ">=8" }, @@ -12376,8 +13751,9 @@ }, "node_modules/p-queue": { "version": "6.6.2", + "resolved": "https://registry.npmjs.org/p-queue/-/p-queue-6.6.2.tgz", + "integrity": "sha512-RwFpb72c/BhQLEXIZ5K2e+AhgNVmIejGlTgiB9MzZ0e93GRvqZ7uSi0dvRF7/XIXDeNkra2fNHBxTyPDGySpjQ==", "dev": true, - "license": "MIT", "dependencies": { "eventemitter3": "^4.0.4", "p-timeout": "^3.2.0" @@ -12391,21 +13767,24 @@ }, "node_modules/p-queue/node_modules/eventemitter3": { "version": "4.0.7", - "dev": true, - "license": "MIT" + "resolved": "https://registry.npmjs.org/eventemitter3/-/eventemitter3-4.0.7.tgz", + "integrity": "sha512-8guHBZCwKnFhYdHr2ysuRWErTwhoN2X8XELRlrRwpmfeY2jjuUN4taQMsULKUVo1K4DvZl+0pgfyoysHxvmvEw==", + "dev": true }, "node_modules/p-reduce": { "version": "2.1.0", + "resolved": "https://registry.npmjs.org/p-reduce/-/p-reduce-2.1.0.tgz", + "integrity": "sha512-2USApvnsutq8uoxZBGbbWM0JIYLiEMJ9RlaN7fAzVNb9OZN0SHjjTTfIcb667XynS5Y1VhwDJVDa72TnPzAYWw==", "dev": true, - "license": "MIT", "engines": { "node": ">=8" } }, "node_modules/p-timeout": { "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, - "license": "MIT", "dependencies": { "p-finally": "^1.0.0" }, @@ -12415,16 +13794,18 @@ }, "node_modules/p-try": { "version": "2.2.0", + "resolved": "https://registry.npmjs.org/p-try/-/p-try-2.2.0.tgz", + "integrity": "sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ==", "dev": true, - "license": "MIT", "engines": { "node": ">=6" } }, "node_modules/p-waterfall": { "version": "2.1.1", + "resolved": "https://registry.npmjs.org/p-waterfall/-/p-waterfall-2.1.1.tgz", + "integrity": "sha512-RRTnDb2TBG/epPRI2yYXsimO0v3BXC8Yd3ogr1545IaqKK17VGhbWVeGGN+XfCm/08OK8635nH31c8bATkHuSw==", "dev": true, - "license": "MIT", "dependencies": { "p-reduce": "^2.0.0" }, @@ -12437,8 +13818,9 @@ }, "node_modules/pacote": { "version": "17.0.6", + "resolved": "https://registry.npmjs.org/pacote/-/pacote-17.0.6.tgz", + "integrity": "sha512-cJKrW21VRE8vVTRskJo78c/RCvwJCn1f4qgfxL4w77SOWrTCRcmfkYHlHtS0gqpgjv3zhXflRtgsrUCX5xwNnQ==", "dev": true, - "license": "ISC", "dependencies": { "@npmcli/git": "^5.0.0", "@npmcli/installed-package-contents": "^2.0.1", @@ -12467,32 +13849,26 @@ } }, "node_modules/pacote/node_modules/@sigstore/bundle": { - "version": "2.2.0", + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/@sigstore/bundle/-/bundle-2.1.1.tgz", + "integrity": "sha512-v3/iS+1nufZdKQ5iAlQKcCsoh0jffQyABvYIxKsZQFWc4ubuGjwZklFHpDgV6O6T7vvV78SW5NHI91HFKEcxKg==", "dev": true, - "license": "Apache-2.0", "dependencies": { - "@sigstore/protobuf-specs": "^0.3.0" + "@sigstore/protobuf-specs": "^0.2.1" }, "engines": { "node": "^16.14.0 || >=18.0.0" } }, - "node_modules/pacote/node_modules/@sigstore/protobuf-specs": { - "version": "0.3.0", - "dev": true, - "license": "Apache-2.0", - "engines": { - "node": "^14.17.0 || ^16.13.0 || >=18.0.0" - } - }, "node_modules/pacote/node_modules/@sigstore/sign": { - "version": "2.2.3", + "version": "2.2.2", + "resolved": "https://registry.npmjs.org/@sigstore/sign/-/sign-2.2.2.tgz", + "integrity": "sha512-mAifqvvGOCkb5BJ5d/SRrVP5+kKCGxtcHuti6lgqZalIfNxikxlJMMptOqFp9+xV5LAnJMSaMWtzvcgNZ3PlPA==", "dev": true, - "license": "Apache-2.0", "dependencies": { - "@sigstore/bundle": "^2.2.0", + "@sigstore/bundle": "^2.1.1", "@sigstore/core": "^1.0.0", - "@sigstore/protobuf-specs": "^0.3.0", + "@sigstore/protobuf-specs": "^0.2.1", "make-fetch-happen": "^13.0.0" }, "engines": { @@ -12500,11 +13876,12 @@ } }, "node_modules/pacote/node_modules/@sigstore/tuf": { - "version": "2.3.1", + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/@sigstore/tuf/-/tuf-2.3.0.tgz", + "integrity": "sha512-S98jo9cpJwO1mtQ+2zY7bOdcYyfVYCUaofCG6wWRzk3pxKHVAkSfshkfecto2+LKsx7Ovtqbgb2LS8zTRhxJ9Q==", "dev": true, - "license": "Apache-2.0", "dependencies": { - "@sigstore/protobuf-specs": "^0.3.0", + "@sigstore/protobuf-specs": "^0.2.1", "tuf-js": "^2.2.0" }, "engines": { @@ -12513,16 +13890,18 @@ }, "node_modules/pacote/node_modules/@tufjs/canonical-json": { "version": "2.0.0", + "resolved": "https://registry.npmjs.org/@tufjs/canonical-json/-/canonical-json-2.0.0.tgz", + "integrity": "sha512-yVtV8zsdo8qFHe+/3kw81dSLyF7D576A5cCFCi4X7B39tWT7SekaEFUnvnWJHz+9qO7qJTah1JbrDjWKqFtdWA==", "dev": true, - "license": "MIT", "engines": { "node": "^16.14.0 || >=18.0.0" } }, "node_modules/pacote/node_modules/@tufjs/models": { "version": "2.0.0", + "resolved": "https://registry.npmjs.org/@tufjs/models/-/models-2.0.0.tgz", + "integrity": "sha512-c8nj8BaOExmZKO2DXhDfegyhSGcG9E/mPN3U13L+/PsoWm1uaGiHHjxqSHQiasDBQwDA3aHuw9+9spYAP1qvvg==", "dev": true, - "license": "MIT", "dependencies": { "@tufjs/canonical-json": "2.0.0", "minimatch": "^9.0.3" @@ -12531,10 +13910,23 @@ "node": "^16.14.0 || >=18.0.0" } }, + "node_modules/pacote/node_modules/fs-minipass": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/fs-minipass/-/fs-minipass-3.0.3.tgz", + "integrity": "sha512-XUBA9XClHbnJWSfBzjkm6RvPsyg3sryZt06BEQoXcF7EK/xpGaQYJgQKDJSUH5SGZ76Y7pFx1QBnXz09rU5Fbw==", + "dev": true, + "dependencies": { + "minipass": "^7.0.3" + }, + "engines": { + "node": "^14.17.0 || ^16.13.0 || >=18.0.0" + } + }, "node_modules/pacote/node_modules/glob": { "version": "10.3.10", + "resolved": "https://registry.npmjs.org/glob/-/glob-10.3.10.tgz", + "integrity": "sha512-fa46+tv1Ak0UPK1TOy/pZrIybNNt4HCv7SDzwyfiOZkvZLEbjsZkJBPtDHVshZjbecAoAGSC20MjLDG/qr679g==", "dev": true, - "license": "ISC", "dependencies": { "foreground-child": "^3.1.0", "jackspeak": "^2.3.5", @@ -12554,8 +13946,9 @@ }, "node_modules/pacote/node_modules/hosted-git-info": { "version": "7.0.1", + "resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-7.0.1.tgz", + "integrity": "sha512-+K84LB1DYwMHoHSgaOY/Jfhw3ucPmSET5v98Ke/HdNSw4a0UktWzyW1mjhjpuxxTqOOsfWT/7iVshHmVZ4IpOA==", "dev": true, - "license": "ISC", "dependencies": { "lru-cache": "^10.0.1" }, @@ -12565,8 +13958,9 @@ }, "node_modules/pacote/node_modules/ignore-walk": { "version": "6.0.4", + "resolved": "https://registry.npmjs.org/ignore-walk/-/ignore-walk-6.0.4.tgz", + "integrity": "sha512-t7sv42WkwFkyKbivUCglsQW5YWMskWtbEf4MNKX5u/CCWHKSPzN4FtBQGsQZgCLbxOzpVlcbWVK5KB3auIOjSw==", "dev": true, - "license": "ISC", "dependencies": { "minimatch": "^9.0.0" }, @@ -12576,24 +13970,36 @@ }, "node_modules/pacote/node_modules/json-parse-even-better-errors": { "version": "3.0.1", + "resolved": "https://registry.npmjs.org/json-parse-even-better-errors/-/json-parse-even-better-errors-3.0.1.tgz", + "integrity": "sha512-aatBvbL26wVUCLmbWdCpeu9iF5wOyWpagiKkInA+kfws3sWdBrTnsvN2CKcyCYyUrc7rebNBlK6+kteg7ksecg==", "dev": true, - "license": "MIT", "engines": { "node": "^14.17.0 || ^16.13.0 || >=18.0.0" } }, "node_modules/pacote/node_modules/lru-cache": { "version": "10.2.0", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-10.2.0.tgz", + "integrity": "sha512-2bIM8x+VAf6JT4bKAljS1qUWgMsqZRPGJS6FSahIMPVvctcNhyVp7AJu7quxOW9jwkryBReKZY5tY5JYv2n/7Q==", "dev": true, - "license": "ISC", "engines": { "node": "14 || >=16.14" } }, + "node_modules/pacote/node_modules/minipass": { + "version": "7.0.4", + "resolved": "https://registry.npmjs.org/minipass/-/minipass-7.0.4.tgz", + "integrity": "sha512-jYofLM5Dam9279rdkWzqHozUo4ybjdZmCsDHePy5V/PbBcVMiSZR97gmAy45aqi8CK1lG2ECd356FU86avfwUQ==", + "dev": true, + "engines": { + "node": ">=16 || 14 >=14.17" + } + }, "node_modules/pacote/node_modules/normalize-package-data": { "version": "6.0.0", + "resolved": "https://registry.npmjs.org/normalize-package-data/-/normalize-package-data-6.0.0.tgz", + "integrity": "sha512-UL7ELRVxYBHBgYEtZCXjxuD5vPxnmvMGq0jp/dGPKKrN7tfsBh2IY7TlJ15WWwdjRWD3RJbnsygUurTK3xkPkg==", "dev": true, - "license": "BSD-2-Clause", "dependencies": { "hosted-git-info": "^7.0.0", "is-core-module": "^2.8.1", @@ -12606,16 +14012,18 @@ }, "node_modules/pacote/node_modules/npm-normalize-package-bin": { "version": "3.0.1", + "resolved": "https://registry.npmjs.org/npm-normalize-package-bin/-/npm-normalize-package-bin-3.0.1.tgz", + "integrity": "sha512-dMxCf+zZ+3zeQZXKxmyuCKlIDPGuv8EF940xbkC4kQVDTtqoh6rJFO+JTKSA6/Rwi0getWmtuy4Itup0AMcaDQ==", "dev": true, - "license": "ISC", "engines": { "node": "^14.17.0 || ^16.13.0 || >=18.0.0" } }, "node_modules/pacote/node_modules/npm-package-arg": { "version": "11.0.1", + "resolved": "https://registry.npmjs.org/npm-package-arg/-/npm-package-arg-11.0.1.tgz", + "integrity": "sha512-M7s1BD4NxdAvBKUPqqRW957Xwcl/4Zvo8Aj+ANrzvIPzGJZElrH7Z//rSaec2ORcND6FHHLnZeY8qgTpXDMFQQ==", "dev": true, - "license": "ISC", "dependencies": { "hosted-git-info": "^7.0.0", "proc-log": "^3.0.0", @@ -12628,8 +14036,9 @@ }, "node_modules/pacote/node_modules/npm-packlist": { "version": "8.0.2", + "resolved": "https://registry.npmjs.org/npm-packlist/-/npm-packlist-8.0.2.tgz", + "integrity": "sha512-shYrPFIS/JLP4oQmAwDyk5HcyysKW8/JLTEA32S0Z5TzvpaeeX2yMFfoK1fjEBnCBvVyIB/Jj/GBFdm0wsgzbA==", "dev": true, - "license": "ISC", "dependencies": { "ignore-walk": "^6.0.4" }, @@ -12639,8 +14048,9 @@ }, "node_modules/pacote/node_modules/npm-registry-fetch": { "version": "16.1.0", + "resolved": "https://registry.npmjs.org/npm-registry-fetch/-/npm-registry-fetch-16.1.0.tgz", + "integrity": "sha512-PQCELXKt8Azvxnt5Y85GseQDJJlglTFM9L9U9gkv2y4e9s0k3GVDdOx3YoB6gm2Do0hlkzC39iCGXby+Wve1Bw==", "dev": true, - "license": "ISC", "dependencies": { "make-fetch-happen": "^13.0.0", "minipass": "^7.0.2", @@ -12656,8 +14066,9 @@ }, "node_modules/pacote/node_modules/read-package-json": { "version": "7.0.0", + "resolved": "https://registry.npmjs.org/read-package-json/-/read-package-json-7.0.0.tgz", + "integrity": "sha512-uL4Z10OKV4p6vbdvIXB+OzhInYtIozl/VxUBPgNkBuUi2DeRonnuspmaVAMcrkmfjKGNmRndyQAbE7/AmzGwFg==", "dev": true, - "license": "ISC", "dependencies": { "glob": "^10.2.2", "json-parse-even-better-errors": "^3.0.0", @@ -12669,16 +14080,17 @@ } }, "node_modules/pacote/node_modules/sigstore": { - "version": "2.2.2", + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/sigstore/-/sigstore-2.2.1.tgz", + "integrity": "sha512-OBBSKvmjr4DCyUb+IC2p7wooOCsCNwaqvCilTJVNPo0y8lJl+LsCrfz4LtMwnw3Gn+8frt816wi1+DWZTUCpBQ==", "dev": true, - "license": "Apache-2.0", "dependencies": { - "@sigstore/bundle": "^2.2.0", + "@sigstore/bundle": "^2.1.1", "@sigstore/core": "^1.0.0", - "@sigstore/protobuf-specs": "^0.3.0", - "@sigstore/sign": "^2.2.3", - "@sigstore/tuf": "^2.3.1", - "@sigstore/verify": "^1.1.0" + "@sigstore/protobuf-specs": "^0.2.1", + "@sigstore/sign": "^2.2.2", + "@sigstore/tuf": "^2.3.0", + "@sigstore/verify": "^1.0.0" }, "engines": { "node": "^16.14.0 || >=18.0.0" @@ -12686,8 +14098,9 @@ }, "node_modules/pacote/node_modules/ssri": { "version": "10.0.5", + "resolved": "https://registry.npmjs.org/ssri/-/ssri-10.0.5.tgz", + "integrity": "sha512-bSf16tAFkGeRlUNDjXu8FzaMQt6g2HZJrun7mtMbIPOddxt3GLMSz5VWUWcqTJUPfLEaDIepGxv+bYQW49596A==", "dev": true, - "license": "ISC", "dependencies": { "minipass": "^7.0.3" }, @@ -12697,8 +14110,9 @@ }, "node_modules/pacote/node_modules/tuf-js": { "version": "2.2.0", + "resolved": "https://registry.npmjs.org/tuf-js/-/tuf-js-2.2.0.tgz", + "integrity": "sha512-ZSDngmP1z6zw+FIkIBjvOp/II/mIub/O7Pp12j1WNsiCpg5R5wAc//i555bBQsE44O94btLt0xM/Zr2LQjwdCg==", "dev": true, - "license": "MIT", "dependencies": { "@tufjs/models": "2.0.0", "debug": "^4.3.4", @@ -12710,8 +14124,9 @@ }, "node_modules/parent-module": { "version": "1.0.1", + "resolved": "https://registry.npmjs.org/parent-module/-/parent-module-1.0.1.tgz", + "integrity": "sha512-GQ2EWRpQV8/o+Aw8YqtfZZPfNRWZYkbidE9k5rpl/hC3vtHHBfGm2Ifi6qWV+coDGkrUKZAxE3Lot5kcsRlh+g==", "dev": true, - "license": "MIT", "dependencies": { "callsites": "^3.0.0" }, @@ -12721,8 +14136,9 @@ }, "node_modules/parse-json": { "version": "5.2.0", + "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-5.2.0.tgz", + "integrity": "sha512-ayCKvm/phCGxOkYRSCM82iDwct8/EonSEgCSxWxD7ve6jHggsFl4fZVQBPRNgQoKiuV/odhFrGzQXZwbifC8Rg==", "dev": true, - "license": "MIT", "dependencies": { "@babel/code-frame": "^7.0.0", "error-ex": "^1.3.1", @@ -12738,58 +14154,66 @@ }, "node_modules/parse-json/node_modules/lines-and-columns": { "version": "1.2.4", - "dev": true, - "license": "MIT" + "resolved": "https://registry.npmjs.org/lines-and-columns/-/lines-and-columns-1.2.4.tgz", + "integrity": "sha512-7ylylesZQ/PV29jhEDl3Ufjo6ZX7gCqJr5F7PKrqc93v7fzSymt1BpwEU8nAUXs8qzzvqhbjhK5QZg6Mt/HkBg==", + "dev": true }, "node_modules/parse-path": { "version": "7.0.0", + "resolved": "https://registry.npmjs.org/parse-path/-/parse-path-7.0.0.tgz", + "integrity": "sha512-Euf9GG8WT9CdqwuWJGdf3RkUcTBArppHABkO7Lm8IzRQp0e2r/kkFnmhu4TSK30Wcu5rVAZLmfPKSBBi9tWFog==", "dev": true, - "license": "MIT", "dependencies": { "protocols": "^2.0.0" } }, "node_modules/parse-url": { "version": "8.1.0", + "resolved": "https://registry.npmjs.org/parse-url/-/parse-url-8.1.0.tgz", + "integrity": "sha512-xDvOoLU5XRrcOZvnI6b8zA6n9O9ejNk/GExuz1yBuWUGn9KA97GI6HTs6u02wKara1CeVmZhH+0TZFdWScR89w==", "dev": true, - "license": "MIT", "dependencies": { "parse-path": "^7.0.0" } }, "node_modules/path-exists": { "version": "4.0.0", + "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz", + "integrity": "sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==", "dev": true, - "license": "MIT", "engines": { "node": ">=8" } }, "node_modules/path-is-absolute": { "version": "1.0.1", + "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", + "integrity": "sha512-AVbw3UJ2e9bq64vSaS9Am0fje1Pa8pbGqTTsmXfaIiMpnr5DlDhfJOuLj9Sf95ZPVDAUerDfEk88MPmPe7UCQg==", "dev": true, - "license": "MIT", "engines": { "node": ">=0.10.0" } }, "node_modules/path-key": { "version": "3.1.1", + "resolved": "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz", + "integrity": "sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==", "dev": true, - "license": "MIT", "engines": { "node": ">=8" } }, "node_modules/path-parse": { "version": "1.0.7", - "dev": true, - "license": "MIT" + "resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.7.tgz", + "integrity": "sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==", + "dev": true }, "node_modules/path-scurry": { "version": "1.10.1", + "resolved": "https://registry.npmjs.org/path-scurry/-/path-scurry-1.10.1.tgz", + "integrity": "sha512-MkhCqzzBEpPvxxQ71Md0b1Kk51W01lrYvlMzSUaIzNsODdd7mqhiimSZlr+VegAz5Z6Vzt9Xg2ttE//XBhH3EQ==", "dev": true, - "license": "BlueOak-1.0.0", "dependencies": { "lru-cache": "^9.1.1 || ^10.0.0", "minipass": "^5.0.0 || ^6.0.2 || ^7.0.0" @@ -12802,29 +14226,42 @@ } }, "node_modules/path-scurry/node_modules/lru-cache": { - "version": "10.2.0", + "version": "10.1.0", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-10.1.0.tgz", + "integrity": "sha512-/1clY/ui8CzjKFyjdvwPWJUYKiFVXG2I2cY0ssG7h4+hwk+XOIX7ZSG9Q7TW8TW3Kp3BUSqgFWBLgL4PJ+Blag==", "dev": true, - "license": "ISC", "engines": { "node": "14 || >=16.14" } }, + "node_modules/path-scurry/node_modules/minipass": { + "version": "7.0.4", + "resolved": "https://registry.npmjs.org/minipass/-/minipass-7.0.4.tgz", + "integrity": "sha512-jYofLM5Dam9279rdkWzqHozUo4ybjdZmCsDHePy5V/PbBcVMiSZR97gmAy45aqi8CK1lG2ECd356FU86avfwUQ==", + "dev": true, + "engines": { + "node": ">=16 || 14 >=14.17" + } + }, "node_modules/path-to-regexp": { "version": "6.2.1", - "dev": true, - "license": "MIT" + "resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-6.2.1.tgz", + "integrity": "sha512-JLyh7xT1kizaEvcaXOQwOc2/Yhw6KZOvPf1S8401UyLk86CU79LN3vl7ztXGm/pZ+YjoyAJ4rxmHwbkBXJX+yw==", + "dev": true }, "node_modules/path-type": { "version": "4.0.0", + "resolved": "https://registry.npmjs.org/path-type/-/path-type-4.0.0.tgz", + "integrity": "sha512-gDKb8aZMDeD/tZWs9P6+q0J9Mwkdl6xMV8TjnGP3qJVJ06bdMgkbBlLU8IdfOsIsFz2BW1rNVT3XuNEl8zPAvw==", "dev": true, - "license": "MIT", "engines": { "node": ">=8" } }, "node_modules/phin": { "version": "3.7.0", - "license": "MIT", + "resolved": "https://registry.npmjs.org/phin/-/phin-3.7.0.tgz", + "integrity": "sha512-DqnVNrpYhKGBZppNKprD+UJylMeEKOZxHgPB+ZP6mGzf3uA2uox4Ep9tUm+rUc8WLIdHT3HcAE4X8fhwQA9JKg==", "dependencies": { "centra": "^2.6.0" }, @@ -12834,13 +14271,15 @@ }, "node_modules/picocolors": { "version": "1.0.0", - "dev": true, - "license": "ISC" + "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.0.0.tgz", + "integrity": "sha512-1fygroTLlHu66zi26VoTDv8yRgm0Fccecssto+MhsZ0D/DGW2sm8E8AjW7NU5VVTRt5GxbeZ5qBuJr+HyLYkjQ==", + "dev": true }, "node_modules/picomatch": { "version": "2.3.1", + "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz", + "integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==", "dev": true, - "license": "MIT", "engines": { "node": ">=8.6" }, @@ -12850,8 +14289,9 @@ }, "node_modules/pidtree": { "version": "0.6.0", + "resolved": "https://registry.npmjs.org/pidtree/-/pidtree-0.6.0.tgz", + "integrity": "sha512-eG2dWTVw5bzqGRztnHExczNxt5VGsE6OwTeCG3fdUf9KBsZzO3R5OIIIzWR+iZA0NtZ+RDVdaoE2dK1cn6jH4g==", "dev": true, - "license": "MIT", "bin": { "pidtree": "bin/pidtree.js" }, @@ -12861,8 +14301,9 @@ }, "node_modules/pify": { "version": "5.0.0", + "resolved": "https://registry.npmjs.org/pify/-/pify-5.0.0.tgz", + "integrity": "sha512-eW/gHNMlxdSP6dmG6uJip6FXN0EQBwm2clYYd8Wul42Cwu/DK8HEftzsapcNdYe2MfLiIwZqsDk2RDEsTE79hA==", "dev": true, - "license": "MIT", "engines": { "node": ">=10" }, @@ -12872,16 +14313,18 @@ }, "node_modules/pirates": { "version": "4.0.6", + "resolved": "https://registry.npmjs.org/pirates/-/pirates-4.0.6.tgz", + "integrity": "sha512-saLsH7WeYYPiD25LDuLRRY/i+6HaPYr6G1OUlN39otzkSTxKnubR9RTxS3/Kk50s1g2JTgFwWQDQyplC5/SHZg==", "dev": true, - "license": "MIT", "engines": { "node": ">= 6" } }, "node_modules/pkg-dir": { "version": "4.2.0", + "resolved": "https://registry.npmjs.org/pkg-dir/-/pkg-dir-4.2.0.tgz", + "integrity": "sha512-HRDzbaKjC+AOWVXxAU/x54COGeIv9eb+6CkDSQoNTt4XyWoIJvuPsXizxu/Fr23EiekbtZwmh1IcIG/l/a10GQ==", "dev": true, - "license": "MIT", "dependencies": { "find-up": "^4.0.0" }, @@ -12891,8 +14334,9 @@ }, "node_modules/pkg-dir/node_modules/find-up": { "version": "4.1.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-4.1.0.tgz", + "integrity": "sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw==", "dev": true, - "license": "MIT", "dependencies": { "locate-path": "^5.0.0", "path-exists": "^4.0.0" @@ -12903,8 +14347,9 @@ }, "node_modules/pkg-dir/node_modules/locate-path": { "version": "5.0.0", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-5.0.0.tgz", + "integrity": "sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g==", "dev": true, - "license": "MIT", "dependencies": { "p-locate": "^4.1.0" }, @@ -12914,8 +14359,9 @@ }, "node_modules/pkg-dir/node_modules/p-limit": { "version": "2.3.0", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.3.0.tgz", + "integrity": "sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w==", "dev": true, - "license": "MIT", "dependencies": { "p-try": "^2.0.0" }, @@ -12928,8 +14374,9 @@ }, "node_modules/pkg-dir/node_modules/p-locate": { "version": "4.1.0", + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-4.1.0.tgz", + "integrity": "sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A==", "dev": true, - "license": "MIT", "dependencies": { "p-limit": "^2.2.0" }, @@ -12937,26 +14384,20 @@ "node": ">=8" } }, - "node_modules/possible-typed-array-names": { - "version": "1.0.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">= 0.4" - } - }, "node_modules/prelude-ls": { "version": "1.2.1", + "resolved": "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.2.1.tgz", + "integrity": "sha512-vkcDPrRZo1QZLbn5RLGPpg/WmIQ65qoWWhcGKf/b5eplkkarX0m9z8ppCat4mlOqUsWpyNuYgO3VRyrYHSzX5g==", "dev": true, - "license": "MIT", "engines": { "node": ">= 0.8.0" } }, "node_modules/prettier": { "version": "3.2.5", + "resolved": "https://registry.npmjs.org/prettier/-/prettier-3.2.5.tgz", + "integrity": "sha512-3/GWa9aOC0YeD7LUfvOG2NiDyhOWRvt1k+rcKhOuYnMY24iiCphgneUfJDyFXd6rZCAnuLBv6UeAULtrhT/F4A==", "dev": true, - "license": "MIT", "bin": { "prettier": "bin/prettier.cjs" }, @@ -12969,8 +14410,9 @@ }, "node_modules/prettier-linter-helpers": { "version": "1.0.0", + "resolved": "https://registry.npmjs.org/prettier-linter-helpers/-/prettier-linter-helpers-1.0.0.tgz", + "integrity": "sha512-GbK2cP9nraSSUF9N2XwUwqfzlAFlMNYYl+ShE/V+H8a9uNl/oUqB1w2EL54Jh0OlyRSd8RfWYJ3coVS4TROP2w==", "dev": true, - "license": "MIT", "dependencies": { "fast-diff": "^1.1.2" }, @@ -12980,8 +14422,9 @@ }, "node_modules/pretty-format": { "version": "29.7.0", + "resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-29.7.0.tgz", + "integrity": "sha512-Pdlw/oPxN+aXdmM9R00JVC9WVFoCLTKJvDVLgmJ+qAffBMxsV85l/Lu7sNx4zSzPyoL2euImuEwHhOXdEgNFZQ==", "dev": true, - "license": "MIT", "dependencies": { "@jest/schemas": "^29.6.3", "ansi-styles": "^5.0.0", @@ -12993,8 +14436,9 @@ }, "node_modules/pretty-format/node_modules/ansi-styles": { "version": "5.2.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-5.2.0.tgz", + "integrity": "sha512-Cxwpt2SfTzTtXcfOlzGEee8O+c+MmUgGrNiBcXnuWxuFJHe6a5Hz7qwhwe5OgaSYI0IJvkLqWX1ASG+cJOkEiA==", "dev": true, - "license": "MIT", "engines": { "node": ">=10" }, @@ -13004,26 +14448,30 @@ }, "node_modules/proc-log": { "version": "3.0.0", + "resolved": "https://registry.npmjs.org/proc-log/-/proc-log-3.0.0.tgz", + "integrity": "sha512-++Vn7NS4Xf9NacaU9Xq3URUuqZETPsf8L4j5/ckhaRYsfPeRyzGw+iDjFhV/Jr3uNmTvvddEJFWh5R1gRgUH8A==", "dev": true, - "license": "ISC", "engines": { "node": "^14.17.0 || ^16.13.0 || >=18.0.0" } }, "node_modules/process-nextick-args": { "version": "2.0.1", - "dev": true, - "license": "MIT" + "resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-2.0.1.tgz", + "integrity": "sha512-3ouUOpQhtgrbOa17J7+uxOTpITYWaGP7/AhoR3+A+/1e9skrzelGi/dXzEYyvbxubEF6Wn2ypscTKiKJFFn1ag==", + "dev": true }, "node_modules/promise-inflight": { "version": "1.0.1", - "dev": true, - "license": "ISC" + "resolved": "https://registry.npmjs.org/promise-inflight/-/promise-inflight-1.0.1.tgz", + "integrity": "sha512-6zWPyEOFaQBJYcGMHBKTKJ3u6TBsnMFOIZSa6ce1e/ZrrsOlnHRHbabMjLiBYKp+n44X9eUI6VUPaukCXHuG4g==", + "dev": true }, "node_modules/promise-retry": { "version": "2.0.1", + "resolved": "https://registry.npmjs.org/promise-retry/-/promise-retry-2.0.1.tgz", + "integrity": "sha512-y+WKFlBR8BGXnsNlIHFGPZmyDf3DFMoLhaflAnyZgV6rG6xu+JwesTo2Q9R6XwYmtmwAFCkAk3e35jEdoeh/3g==", "dev": true, - "license": "MIT", "dependencies": { "err-code": "^2.0.2", "retry": "^0.12.0" @@ -13034,8 +14482,9 @@ }, "node_modules/prompts": { "version": "2.4.2", + "resolved": "https://registry.npmjs.org/prompts/-/prompts-2.4.2.tgz", + "integrity": "sha512-NxNv/kLguCA7p3jE8oL2aEBsrJWgAakBpgmgK6lpPWV+WuOmY6r2/zbAVnP+T8bQlA0nzHXSJSJW0Hq7ylaD2Q==", "dev": true, - "license": "MIT", "dependencies": { "kleur": "^3.0.3", "sisteransi": "^1.0.5" @@ -13046,8 +14495,9 @@ }, "node_modules/promzard": { "version": "1.0.0", + "resolved": "https://registry.npmjs.org/promzard/-/promzard-1.0.0.tgz", + "integrity": "sha512-KQVDEubSUHGSt5xLakaToDFrSoZhStB8dXLzk2xvwR67gJktrHFvpR63oZgHyK19WKbHFLXJqCPXdVR3aBP8Ig==", "dev": true, - "license": "ISC", "dependencies": { "read": "^2.0.0" }, @@ -13057,24 +14507,29 @@ }, "node_modules/protocols": { "version": "2.0.1", - "dev": true, - "license": "MIT" + "resolved": "https://registry.npmjs.org/protocols/-/protocols-2.0.1.tgz", + "integrity": "sha512-/XJ368cyBJ7fzLMwLKv1e4vLxOju2MNAIokcr7meSaNcVbWz/CPcW22cP04mwxOErdA5mwjA8Q6w/cdAQxVn7Q==", + "dev": true }, "node_modules/proxy-from-env": { "version": "1.1.0", - "dev": true, - "license": "MIT" + "resolved": "https://registry.npmjs.org/proxy-from-env/-/proxy-from-env-1.1.0.tgz", + "integrity": "sha512-D+zkORCbA9f1tdWRK0RaCR3GPv50cMxcrz4X8k5LTSUD1Dkw47mKJEZQNunItRTkWwgtaUSo1RVFRIG9ZXiFYg==", + "dev": true }, "node_modules/punycode": { "version": "2.3.1", + "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.3.1.tgz", + "integrity": "sha512-vYt7UD1U9Wg6138shLtLOvdAu+8DsC/ilFtEVHcH+wydcSpNE20AfSOduf6MkRFahL5FY7X1oU7nKVZFtfq8Fg==", "dev": true, - "license": "MIT", "engines": { "node": ">=6" } }, "node_modules/pure-rand": { "version": "6.0.4", + "resolved": "https://registry.npmjs.org/pure-rand/-/pure-rand-6.0.4.tgz", + "integrity": "sha512-LA0Y9kxMYv47GIPJy6MI84fqTd2HmYZI83W/kM/SkKfDlajnZYfmXFTxkbY+xSBPkLJxltMa9hIkmdc29eguMA==", "dev": true, "funding": [ { @@ -13085,11 +14540,13 @@ "type": "opencollective", "url": "https://opencollective.com/fast-check" } - ], - "license": "MIT" + ] }, "node_modules/querystring": { "version": "0.2.0", + "resolved": "https://registry.npmjs.org/querystring/-/querystring-0.2.0.tgz", + "integrity": "sha512-X/xY82scca2tau62i9mDyU9K+I+djTMUsvwf7xnUX5GLvVzgJybOJf4Y6o9Zx3oJK/LSXg5tTZBjwzqVPaPO2g==", + "deprecated": "The querystring API is considered Legacy. new code should use the URLSearchParams API instead.", "dev": true, "engines": { "node": ">=0.4.x" @@ -13097,6 +14554,8 @@ }, "node_modules/queue-microtask": { "version": "1.2.3", + "resolved": "https://registry.npmjs.org/queue-microtask/-/queue-microtask-1.2.3.tgz", + "integrity": "sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A==", "dev": true, "funding": [ { @@ -13111,21 +14570,22 @@ "type": "consulting", "url": "https://feross.org/support" } - ], - "license": "MIT" + ] }, "node_modules/quick-lru": { "version": "4.0.1", + "resolved": "https://registry.npmjs.org/quick-lru/-/quick-lru-4.0.1.tgz", + "integrity": "sha512-ARhCpm70fzdcvNQfPoy49IaanKkTlRWF2JMzqhcJbhSFRZv7nPTvZJdcY7301IPmvW+/p0RgIWnQDLJxifsQ7g==", "dev": true, - "license": "MIT", "engines": { "node": ">=8" } }, "node_modules/randexp": { "version": "0.5.3", + "resolved": "https://registry.npmjs.org/randexp/-/randexp-0.5.3.tgz", + "integrity": "sha512-U+5l2KrcMNOUPYvazA3h5ekF80FHTUG+87SEAmHZmolh1M+i/WyTCxVzmi+tidIa1tM4BSe8g2Y/D3loWDjj+w==", "dev": true, - "license": "MIT", "dependencies": { "drange": "^1.0.2", "ret": "^0.2.0" @@ -13136,13 +14596,15 @@ }, "node_modules/react-is": { "version": "18.2.0", - "dev": true, - "license": "MIT" + "resolved": "https://registry.npmjs.org/react-is/-/react-is-18.2.0.tgz", + "integrity": "sha512-xWGDIW6x921xtzPkhiULtthJHoJvBbF3q26fzloPCK0hsvxtPVelvftw3zjbHWSkR2km9Z+4uxbDDK/6Zw9B8w==", + "dev": true }, "node_modules/read": { "version": "2.1.0", + "resolved": "https://registry.npmjs.org/read/-/read-2.1.0.tgz", + "integrity": "sha512-bvxi1QLJHcaywCAEsAk4DG3nVoqiY2Csps3qzWalhj5hFqRn1d/OixkFXtLO1PrgHUcAP0FNaSY/5GYNfENFFQ==", "dev": true, - "license": "ISC", "dependencies": { "mute-stream": "~1.0.0" }, @@ -13152,16 +14614,18 @@ }, "node_modules/read-cmd-shim": { "version": "4.0.0", + "resolved": "https://registry.npmjs.org/read-cmd-shim/-/read-cmd-shim-4.0.0.tgz", + "integrity": "sha512-yILWifhaSEEytfXI76kB9xEEiG1AiozaCJZ83A87ytjRiN+jVibXjedjCRNjoZviinhG+4UkalO3mWTd8u5O0Q==", "dev": true, - "license": "ISC", "engines": { "node": "^14.17.0 || ^16.13.0 || >=18.0.0" } }, "node_modules/read-package-json": { "version": "6.0.4", + "resolved": "https://registry.npmjs.org/read-package-json/-/read-package-json-6.0.4.tgz", + "integrity": "sha512-AEtWXYfopBj2z5N5PbkAOeNHRPUg5q+Nen7QLxV8M2zJq1ym6/lCz3fYNTCXe19puu2d06jfHhrP7v/S2PtMMw==", "dev": true, - "license": "ISC", "dependencies": { "glob": "^10.2.2", "json-parse-even-better-errors": "^3.0.0", @@ -13174,8 +14638,9 @@ }, "node_modules/read-package-json-fast": { "version": "3.0.2", + "resolved": "https://registry.npmjs.org/read-package-json-fast/-/read-package-json-fast-3.0.2.tgz", + "integrity": "sha512-0J+Msgym3vrLOUB3hzQCuZHII0xkNGCtz/HJH9xZshwv9DbDwkw1KaE3gx/e2J5rpEY5rtOy6cyhKOPrkP7FZw==", "dev": true, - "license": "ISC", "dependencies": { "json-parse-even-better-errors": "^3.0.0", "npm-normalize-package-bin": "^3.0.0" @@ -13186,24 +14651,27 @@ }, "node_modules/read-package-json-fast/node_modules/json-parse-even-better-errors": { "version": "3.0.1", + "resolved": "https://registry.npmjs.org/json-parse-even-better-errors/-/json-parse-even-better-errors-3.0.1.tgz", + "integrity": "sha512-aatBvbL26wVUCLmbWdCpeu9iF5wOyWpagiKkInA+kfws3sWdBrTnsvN2CKcyCYyUrc7rebNBlK6+kteg7ksecg==", "dev": true, - "license": "MIT", "engines": { "node": "^14.17.0 || ^16.13.0 || >=18.0.0" } }, "node_modules/read-package-json-fast/node_modules/npm-normalize-package-bin": { "version": "3.0.1", + "resolved": "https://registry.npmjs.org/npm-normalize-package-bin/-/npm-normalize-package-bin-3.0.1.tgz", + "integrity": "sha512-dMxCf+zZ+3zeQZXKxmyuCKlIDPGuv8EF940xbkC4kQVDTtqoh6rJFO+JTKSA6/Rwi0getWmtuy4Itup0AMcaDQ==", "dev": true, - "license": "ISC", "engines": { "node": "^14.17.0 || ^16.13.0 || >=18.0.0" } }, "node_modules/read-package-json/node_modules/glob": { "version": "10.3.10", + "resolved": "https://registry.npmjs.org/glob/-/glob-10.3.10.tgz", + "integrity": "sha512-fa46+tv1Ak0UPK1TOy/pZrIybNNt4HCv7SDzwyfiOZkvZLEbjsZkJBPtDHVshZjbecAoAGSC20MjLDG/qr679g==", "dev": true, - "license": "ISC", "dependencies": { "foreground-child": "^3.1.0", "jackspeak": "^2.3.5", @@ -13223,8 +14691,9 @@ }, "node_modules/read-package-json/node_modules/hosted-git-info": { "version": "6.1.1", + "resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-6.1.1.tgz", + "integrity": "sha512-r0EI+HBMcXadMrugk0GCQ+6BQV39PiWAZVfq7oIckeGiN7sjRGyQxPdft3nQekFTCQbYxLBH+/axZMeH8UX6+w==", "dev": true, - "license": "ISC", "dependencies": { "lru-cache": "^7.5.1" }, @@ -13234,24 +14703,36 @@ }, "node_modules/read-package-json/node_modules/json-parse-even-better-errors": { "version": "3.0.1", + "resolved": "https://registry.npmjs.org/json-parse-even-better-errors/-/json-parse-even-better-errors-3.0.1.tgz", + "integrity": "sha512-aatBvbL26wVUCLmbWdCpeu9iF5wOyWpagiKkInA+kfws3sWdBrTnsvN2CKcyCYyUrc7rebNBlK6+kteg7ksecg==", "dev": true, - "license": "MIT", "engines": { "node": "^14.17.0 || ^16.13.0 || >=18.0.0" } }, "node_modules/read-package-json/node_modules/lru-cache": { "version": "7.18.3", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-7.18.3.tgz", + "integrity": "sha512-jumlc0BIUrS3qJGgIkWZsyfAM7NCWiBcCDhnd+3NNM5KbBmLTgHVfWBcg6W+rLUsIpzpERPsvwUP7CckAQSOoA==", "dev": true, - "license": "ISC", "engines": { "node": ">=12" } }, + "node_modules/read-package-json/node_modules/minipass": { + "version": "7.0.4", + "resolved": "https://registry.npmjs.org/minipass/-/minipass-7.0.4.tgz", + "integrity": "sha512-jYofLM5Dam9279rdkWzqHozUo4ybjdZmCsDHePy5V/PbBcVMiSZR97gmAy45aqi8CK1lG2ECd356FU86avfwUQ==", + "dev": true, + "engines": { + "node": ">=16 || 14 >=14.17" + } + }, "node_modules/read-package-json/node_modules/normalize-package-data": { "version": "5.0.0", + "resolved": "https://registry.npmjs.org/normalize-package-data/-/normalize-package-data-5.0.0.tgz", + "integrity": "sha512-h9iPVIfrVZ9wVYQnxFgtw1ugSvGEMOlyPWWtm8BMJhnwyEL/FLbYbTY3V3PpjI/BUK67n9PEWDu6eHzu1fB15Q==", "dev": true, - "license": "BSD-2-Clause", "dependencies": { "hosted-git-info": "^6.0.0", "is-core-module": "^2.8.1", @@ -13264,16 +14745,18 @@ }, "node_modules/read-package-json/node_modules/npm-normalize-package-bin": { "version": "3.0.1", + "resolved": "https://registry.npmjs.org/npm-normalize-package-bin/-/npm-normalize-package-bin-3.0.1.tgz", + "integrity": "sha512-dMxCf+zZ+3zeQZXKxmyuCKlIDPGuv8EF940xbkC4kQVDTtqoh6rJFO+JTKSA6/Rwi0getWmtuy4Itup0AMcaDQ==", "dev": true, - "license": "ISC", "engines": { "node": "^14.17.0 || ^16.13.0 || >=18.0.0" } }, "node_modules/read-pkg": { "version": "3.0.0", + "resolved": "https://registry.npmjs.org/read-pkg/-/read-pkg-3.0.0.tgz", + "integrity": "sha512-BLq/cCO9two+lBgiTYNqD6GdtK8s4NpaWrl6/rCO9w0TUS8oJl7cmToOZfRYllKTISY6nt1U7jQ53brmKqY6BA==", "dev": true, - "license": "MIT", "dependencies": { "load-json-file": "^4.0.0", "normalize-package-data": "^2.3.2", @@ -13285,8 +14768,9 @@ }, "node_modules/read-pkg-up": { "version": "3.0.0", + "resolved": "https://registry.npmjs.org/read-pkg-up/-/read-pkg-up-3.0.0.tgz", + "integrity": "sha512-YFzFrVvpC6frF1sz8psoHDBGF7fLPc+llq/8NB43oagqWkx8ar5zYtsTORtOjw9W2RHLpWP+zTWwBvf1bCmcSw==", "dev": true, - "license": "MIT", "dependencies": { "find-up": "^2.0.0", "read-pkg": "^3.0.0" @@ -13297,8 +14781,9 @@ }, "node_modules/read-pkg-up/node_modules/find-up": { "version": "2.1.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-2.1.0.tgz", + "integrity": "sha512-NWzkk0jSJtTt08+FBFMvXoeZnOJD+jTtsRmBYbAIzJdX6l7dLgR7CTubCM5/eDdPUBvLCeVasP1brfVR/9/EZQ==", "dev": true, - "license": "MIT", "dependencies": { "locate-path": "^2.0.0" }, @@ -13308,8 +14793,9 @@ }, "node_modules/read-pkg-up/node_modules/locate-path": { "version": "2.0.0", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-2.0.0.tgz", + "integrity": "sha512-NCI2kiDkyR7VeEKm27Kda/iQHyKJe1Bu0FlTbYp3CqJu+9IFe9bLyAjMxf5ZDDbEg+iMPzB5zYyUTSm8wVTKmA==", "dev": true, - "license": "MIT", "dependencies": { "p-locate": "^2.0.0", "path-exists": "^3.0.0" @@ -13320,8 +14806,9 @@ }, "node_modules/read-pkg-up/node_modules/p-limit": { "version": "1.3.0", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-1.3.0.tgz", + "integrity": "sha512-vvcXsLAJ9Dr5rQOPk7toZQZJApBl2K4J6dANSsEuh6QI41JYcsS/qhTGa9ErIUUgK3WNQoJYvylxvjqmiqEA9Q==", "dev": true, - "license": "MIT", "dependencies": { "p-try": "^1.0.0" }, @@ -13331,8 +14818,9 @@ }, "node_modules/read-pkg-up/node_modules/p-locate": { "version": "2.0.0", + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-2.0.0.tgz", + "integrity": "sha512-nQja7m7gSKuewoVRen45CtVfODR3crN3goVQ0DDZ9N3yHxgpkuBhZqsaiotSQRrADUrne346peY7kT3TSACykg==", "dev": true, - "license": "MIT", "dependencies": { "p-limit": "^1.1.0" }, @@ -13342,29 +14830,33 @@ }, "node_modules/read-pkg-up/node_modules/p-try": { "version": "1.0.0", + "resolved": "https://registry.npmjs.org/p-try/-/p-try-1.0.0.tgz", + "integrity": "sha512-U1etNYuMJoIz3ZXSrrySFjsXQTWOx2/jdi86L+2pRvph/qMKL6sbcCYdH23fqsbm8TH2Gn0OybpT4eSFlCVHww==", "dev": true, - "license": "MIT", "engines": { "node": ">=4" } }, "node_modules/read-pkg-up/node_modules/path-exists": { "version": "3.0.0", + "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-3.0.0.tgz", + "integrity": "sha512-bpC7GYwiDYQ4wYLe+FA8lhRjhQCMcQGuSgGGqDkg/QerRWw9CmGRT0iSOVRSZJ29NMLZgIzqaljJ63oaL4NIJQ==", "dev": true, - "license": "MIT", "engines": { "node": ">=4" } }, "node_modules/read-pkg/node_modules/hosted-git-info": { "version": "2.8.9", - "dev": true, - "license": "ISC" + "resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-2.8.9.tgz", + "integrity": "sha512-mxIDAb9Lsm6DoOJ7xH+5+X4y1LU/4Hi50L9C5sIswK3JzULS4bwk1FvjdBgvYR4bzT4tuUQiC15FE2f5HbLvYw==", + "dev": true }, "node_modules/read-pkg/node_modules/load-json-file": { "version": "4.0.0", + "resolved": "https://registry.npmjs.org/load-json-file/-/load-json-file-4.0.0.tgz", + "integrity": "sha512-Kx8hMakjX03tiGTLAIdJ+lL0htKnXjEZN6hk/tozf/WOuYGdZBJrZ+rCJRbVCugsjB3jMLn9746NsQIf5VjBMw==", "dev": true, - "license": "MIT", "dependencies": { "graceful-fs": "^4.1.2", "parse-json": "^4.0.0", @@ -13377,8 +14869,9 @@ }, "node_modules/read-pkg/node_modules/normalize-package-data": { "version": "2.5.0", + "resolved": "https://registry.npmjs.org/normalize-package-data/-/normalize-package-data-2.5.0.tgz", + "integrity": "sha512-/5CMN3T0R4XTj4DcGaexo+roZSdSFW/0AOOTROrjxzCG1wrWXEsGbRKevjlIL+ZDE4sZlJr5ED4YW0yqmkK+eA==", "dev": true, - "license": "BSD-2-Clause", "dependencies": { "hosted-git-info": "^2.1.4", "resolve": "^1.10.0", @@ -13388,8 +14881,9 @@ }, "node_modules/read-pkg/node_modules/parse-json": { "version": "4.0.0", + "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-4.0.0.tgz", + "integrity": "sha512-aOIos8bujGN93/8Ox/jPLh7RwVnPEysynVFE+fQZyg6jKELEHwzgKdLRFHUgXJL6kylijVSBC4BvN9OmsB48Rw==", "dev": true, - "license": "MIT", "dependencies": { "error-ex": "^1.3.1", "json-parse-better-errors": "^1.0.1" @@ -13400,8 +14894,9 @@ }, "node_modules/read-pkg/node_modules/path-type": { "version": "3.0.0", + "resolved": "https://registry.npmjs.org/path-type/-/path-type-3.0.0.tgz", + "integrity": "sha512-T2ZUsdZFHgA3u4e5PfPbjd7HDDpxPnQb5jN0SrDsjNSuVXHJqtwTnWqG0B1jZrgmJ/7lj1EmVIByWt1gxGkWvg==", "dev": true, - "license": "MIT", "dependencies": { "pify": "^3.0.0" }, @@ -13411,40 +14906,45 @@ }, "node_modules/read-pkg/node_modules/pify": { "version": "3.0.0", + "resolved": "https://registry.npmjs.org/pify/-/pify-3.0.0.tgz", + "integrity": "sha512-C3FsVNH1udSEX48gGX1xfvwTWfsYWj5U+8/uK15BGzIGrKoUpghX8hWZwa/OFnakBiiVNmBvemTJR5mcy7iPcg==", "dev": true, - "license": "MIT", "engines": { "node": ">=4" } }, "node_modules/read-pkg/node_modules/semver": { "version": "5.7.2", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.2.tgz", + "integrity": "sha512-cBznnQ9KjJqU67B52RMC65CMarK2600WFnbkcaiwWq3xy/5haFJlshgnpjovMVJ+Hff49d8GEn0b87C5pDQ10g==", "dev": true, - "license": "ISC", "bin": { "semver": "bin/semver" } }, "node_modules/read-pkg/node_modules/strip-bom": { "version": "3.0.0", + "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-3.0.0.tgz", + "integrity": "sha512-vavAMRXOgBVNF6nyEEmL3DBK19iRpDcoIwW+swQ+CbGiu7lju6t+JklA1MHweoWtadgt4ISVUsXLyDq34ddcwA==", "dev": true, - "license": "MIT", "engines": { "node": ">=4" } }, "node_modules/read/node_modules/mute-stream": { "version": "1.0.0", + "resolved": "https://registry.npmjs.org/mute-stream/-/mute-stream-1.0.0.tgz", + "integrity": "sha512-avsJQhyd+680gKXyG/sQc0nXaC6rBkPOfyHYcFb9+hdkqQkR9bdnkJ0AMZhke0oesPqIO+mFFJ+IdBc7mst4IA==", "dev": true, - "license": "ISC", "engines": { "node": "^14.17.0 || ^16.13.0 || >=18.0.0" } }, "node_modules/readable-stream": { "version": "3.6.2", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.2.tgz", + "integrity": "sha512-9u/sniCrY3D5WdsERHzHE4G2YCXqoG5FTHUiCC4SIbr6XcLZBY05ya9EKjYek9O5xOAwjGq+1JdGBAS7Q9ScoA==", "dev": true, - "license": "MIT", "dependencies": { "inherits": "^2.0.3", "string_decoder": "^1.1.1", @@ -13456,8 +14956,9 @@ }, "node_modules/redent": { "version": "3.0.0", + "resolved": "https://registry.npmjs.org/redent/-/redent-3.0.0.tgz", + "integrity": "sha512-6tDA8g98We0zd0GvVeMT9arEOnTw9qM03L9cJXaCjrip1OO764RDBLBfrB4cwzNGDj5OA5ioymC9GkizgWJDUg==", "dev": true, - "license": "MIT", "dependencies": { "indent-string": "^4.0.0", "strip-indent": "^3.0.0" @@ -13467,14 +14968,14 @@ } }, "node_modules/regexp.prototype.flags": { - "version": "1.5.2", + "version": "1.5.1", + "resolved": "https://registry.npmjs.org/regexp.prototype.flags/-/regexp.prototype.flags-1.5.1.tgz", + "integrity": "sha512-sy6TXMN+hnP/wMy+ISxg3krXx7BAtWVO4UouuCN/ziM9UEne0euamVNafDfvC83bRNr95y0V5iijeDQFUNpvrg==", "dev": true, - "license": "MIT", "dependencies": { - "call-bind": "^1.0.6", - "define-properties": "^1.2.1", - "es-errors": "^1.3.0", - "set-function-name": "^2.0.1" + "call-bind": "^1.0.2", + "define-properties": "^1.2.0", + "set-function-name": "^2.0.0" }, "engines": { "node": ">= 0.4" @@ -13485,16 +14986,18 @@ }, "node_modules/require-directory": { "version": "2.1.1", + "resolved": "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz", + "integrity": "sha512-fGxEI7+wsG9xrvdjsrlmL22OMTTiHRwAMroiEeMgq8gzoLC/PQr7RsRDSTLUg/bZAZtF+TVIkHc6/4RIKrui+Q==", "dev": true, - "license": "MIT", "engines": { "node": ">=0.10.0" } }, "node_modules/resolve": { "version": "1.22.8", + "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.22.8.tgz", + "integrity": "sha512-oKWePCxqpd6FlLvGV1VU0x7bkPmmCNolxzjMf4NczoDnQcIWrAF+cPtZn5i6n+RfD2d9i0tzpKnG6Yk168yIyw==", "dev": true, - "license": "MIT", "dependencies": { "is-core-module": "^2.13.0", "path-parse": "^1.0.7", @@ -13509,8 +15012,9 @@ }, "node_modules/resolve-cwd": { "version": "3.0.0", + "resolved": "https://registry.npmjs.org/resolve-cwd/-/resolve-cwd-3.0.0.tgz", + "integrity": "sha512-OrZaX2Mb+rJCpH/6CpSqt9xFVpN++x01XnN2ie9g6P5/3xelLAkXWVADpdz1IHD/KFfEXyE6V0U01OQ3UO2rEg==", "dev": true, - "license": "MIT", "dependencies": { "resolve-from": "^5.0.0" }, @@ -13520,40 +15024,45 @@ }, "node_modules/resolve-cwd/node_modules/resolve-from": { "version": "5.0.0", + "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-5.0.0.tgz", + "integrity": "sha512-qYg9KP24dD5qka9J47d0aVky0N+b4fTU89LN9iDnjB5waksiC49rvMB0PrUJQGoTmH50XPiqOvAjDfaijGxYZw==", "dev": true, - "license": "MIT", "engines": { "node": ">=8" } }, "node_modules/resolve-from": { "version": "4.0.0", + "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-4.0.0.tgz", + "integrity": "sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g==", "dev": true, - "license": "MIT", "engines": { "node": ">=4" } }, "node_modules/resolve-pkg-maps": { "version": "1.0.0", + "resolved": "https://registry.npmjs.org/resolve-pkg-maps/-/resolve-pkg-maps-1.0.0.tgz", + "integrity": "sha512-seS2Tj26TBVOC2NIc2rOe2y2ZO7efxITtLZcGSOnHHNOQ7CkiUBfw0Iw2ck6xkIhPwLhKNLS8BO+hEpngQlqzw==", "dev": true, - "license": "MIT", "funding": { "url": "https://github.com/privatenumber/resolve-pkg-maps?sponsor=1" } }, "node_modules/resolve.exports": { "version": "2.0.2", + "resolved": "https://registry.npmjs.org/resolve.exports/-/resolve.exports-2.0.2.tgz", + "integrity": "sha512-X2UW6Nw3n/aMgDVy+0rSqgHlv39WZAlZrXCdnbyEiKm17DSqHX4MmQMaST3FbeWR5FTuRcUwYAziZajji0Y7mg==", "dev": true, - "license": "MIT", "engines": { "node": ">=10" } }, "node_modules/restore-cursor": { "version": "3.1.0", + "resolved": "https://registry.npmjs.org/restore-cursor/-/restore-cursor-3.1.0.tgz", + "integrity": "sha512-l+sSefzHpj5qimhFSE5a8nufZYAM3sBSVMAPtYkmC+4EH2anSGaEMXSD0izRQbu9nfyQ9y5JrVmp7E8oZrUjvA==", "dev": true, - "license": "MIT", "dependencies": { "onetime": "^5.1.0", "signal-exit": "^3.0.2" @@ -13564,24 +15073,27 @@ }, "node_modules/ret": { "version": "0.2.2", + "resolved": "https://registry.npmjs.org/ret/-/ret-0.2.2.tgz", + "integrity": "sha512-M0b3YWQs7R3Z917WRQy1HHA7Ba7D8hvZg6UE5mLykJxQVE2ju0IXbGlaHPPlkY+WN7wFP+wUMXmBFA0aV6vYGQ==", "dev": true, - "license": "MIT", "engines": { "node": ">=4" } }, "node_modules/retry": { "version": "0.12.0", + "resolved": "https://registry.npmjs.org/retry/-/retry-0.12.0.tgz", + "integrity": "sha512-9LkiTwjUh6rT555DtE9rTX+BKByPfrMzEAtnlEtdEwr3Nkffwiihqe2bWADg+OQRjt9gl6ICdmB/ZFDCGAtSow==", "dev": true, - "license": "MIT", "engines": { "node": ">= 4" } }, "node_modules/reusify": { "version": "1.0.4", + "resolved": "https://registry.npmjs.org/reusify/-/reusify-1.0.4.tgz", + "integrity": "sha512-U9nH88a3fc/ekCF1l0/UP1IosiuIjyTh7hBvXVMHYgVcfGvt897Xguj2UOLDeI5BG2m7/uwyaLVT6fbtCwTyzw==", "dev": true, - "license": "MIT", "engines": { "iojs": ">=1.0.0", "node": ">=0.10.0" @@ -13589,33 +15101,23 @@ }, "node_modules/rfdc": { "version": "1.3.1", - "dev": true, - "license": "MIT" - }, - "node_modules/rimraf": { - "version": "3.0.2", - "dev": true, - "license": "ISC", - "dependencies": { - "glob": "^7.1.3" - }, - "bin": { - "rimraf": "bin.js" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" - } + "resolved": "https://registry.npmjs.org/rfdc/-/rfdc-1.3.1.tgz", + "integrity": "sha512-r5a3l5HzYlIC68TpmYKlxWjmOP6wiPJ1vWv2HeLhNsRZMrCkxeqxiHlQ21oXmQ4F3SiryXBHhAD7JZqvOJjFmg==", + "dev": true }, "node_modules/run-async": { "version": "2.4.1", + "resolved": "https://registry.npmjs.org/run-async/-/run-async-2.4.1.tgz", + "integrity": "sha512-tvVnVv01b8c1RrA6Ep7JkStj85Guv/YrMcwqYQnwjsAS2cTmmPGBBjAjpCW7RrSodNSoE2/qg9O4bceNvUuDgQ==", "dev": true, - "license": "MIT", "engines": { "node": ">=0.12.0" } }, "node_modules/run-parallel": { "version": "1.2.0", + "resolved": "https://registry.npmjs.org/run-parallel/-/run-parallel-1.2.0.tgz", + "integrity": "sha512-5l4VyZR86LZ/lDxZTR6jqL8AFE2S0IFLMP26AbjsLVADxHdhB/c0GUsH+y39UfCi3dzz8OlQuPmnaJOMoDHQBA==", "dev": true, "funding": [ { @@ -13631,23 +15133,24 @@ "url": "https://feross.org/support" } ], - "license": "MIT", "dependencies": { "queue-microtask": "^1.2.2" } }, "node_modules/rxjs": { "version": "7.8.1", + "resolved": "https://registry.npmjs.org/rxjs/-/rxjs-7.8.1.tgz", + "integrity": "sha512-AA3TVj+0A2iuIoQkWEK/tqFjBq2j+6PO6Y0zJcvzLAFhEFIO3HL0vls9hWLncZbAAbK0mar7oZ4V079I/qPMxg==", "dev": true, - "license": "Apache-2.0", "dependencies": { "tslib": "^2.1.0" } }, "node_modules/safe-array-concat": { "version": "1.1.0", + "resolved": "https://registry.npmjs.org/safe-array-concat/-/safe-array-concat-1.1.0.tgz", + "integrity": "sha512-ZdQ0Jeb9Ofti4hbt5lX3T2JcAamT9hfzYU1MNB+z/jaEbB6wfFfPIR/zEORmZqobkCCJhSjodobH6WHNmJ97dg==", "dev": true, - "license": "MIT", "dependencies": { "call-bind": "^1.0.5", "get-intrinsic": "^1.2.2", @@ -13663,6 +15166,8 @@ }, "node_modules/safe-buffer": { "version": "5.2.1", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz", + "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==", "dev": true, "funding": [ { @@ -13677,16 +15182,16 @@ "type": "consulting", "url": "https://feross.org/support" } - ], - "license": "MIT" + ] }, "node_modules/safe-regex-test": { - "version": "1.0.3", + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/safe-regex-test/-/safe-regex-test-1.0.2.tgz", + "integrity": "sha512-83S9w6eFq12BBIJYvjMux6/dkirb8+4zJRA9cxNBVb7Wq5fJBW+Xze48WqR8pxua7bDuAaaAxtVVd4Idjp1dBQ==", "dev": true, - "license": "MIT", "dependencies": { - "call-bind": "^1.0.6", - "es-errors": "^1.3.0", + "call-bind": "^1.0.5", + "get-intrinsic": "^1.2.2", "is-regex": "^1.1.4" }, "engines": { @@ -13698,8 +15203,9 @@ }, "node_modules/safer-buffer": { "version": "2.1.2", - "dev": true, - "license": "MIT" + "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz", + "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==", + "dev": true }, "node_modules/sam-example": { "resolved": "examples/sam", @@ -13707,12 +15213,14 @@ }, "node_modules/sax": { "version": "1.2.1", - "dev": true, - "license": "ISC" + "resolved": "https://registry.npmjs.org/sax/-/sax-1.2.1.tgz", + "integrity": "sha512-8I2a3LovHTOpm7NV5yOyO8IHqgVsfK4+UuySrXU8YXkSRX7k6hCV9b3HrkKCr3nMpgj+0bmocaJJWpvp1oc7ZA==", + "dev": true }, "node_modules/semver": { - "version": "7.6.0", - "license": "ISC", + "version": "7.5.4", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.5.4.tgz", + "integrity": "sha512-1bCSESV6Pv+i21Hvpxp3Dx+pSD8lIPt8uVjRrxAUt/nbswYc+tK6Y2btiULjd4+fnq15PX+nqQDC7Oft7WkwcA==", "dependencies": { "lru-cache": "^6.0.0" }, @@ -13725,7 +15233,8 @@ }, "node_modules/semver/node_modules/lru-cache": { "version": "6.0.0", - "license": "ISC", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz", + "integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==", "dependencies": { "yallist": "^4.0.0" }, @@ -13735,22 +15244,24 @@ }, "node_modules/semver/node_modules/yallist": { "version": "4.0.0", - "license": "ISC" + "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", + "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==" }, "node_modules/set-blocking": { "version": "2.0.0", - "dev": true, - "license": "ISC" + "resolved": "https://registry.npmjs.org/set-blocking/-/set-blocking-2.0.0.tgz", + "integrity": "sha512-KiKBS8AnWGEyLzofFfmvKwpdPzqiy16LvQfK3yv/fVH7Bj13/wl3JSR1J+rfgRE9q7xUJK4qvgS8raSOeLUehw==", + "dev": true }, "node_modules/set-function-length": { - "version": "1.2.1", + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/set-function-length/-/set-function-length-1.2.0.tgz", + "integrity": "sha512-4DBHDoyHlM1IRPGYcoxexgh67y4ueR53FKV1yyxwFMY7aCqcN/38M1+SwZ/qJQ8iLv7+ck385ot4CcisOAPT9w==", "dev": true, - "license": "MIT", "dependencies": { - "define-data-property": "^1.1.2", - "es-errors": "^1.3.0", + "define-data-property": "^1.1.1", "function-bind": "^1.1.2", - "get-intrinsic": "^1.2.3", + "get-intrinsic": "^1.2.2", "gopd": "^1.0.1", "has-property-descriptors": "^1.0.1" }, @@ -13759,14 +15270,14 @@ } }, "node_modules/set-function-name": { - "version": "2.0.2", + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/set-function-name/-/set-function-name-2.0.1.tgz", + "integrity": "sha512-tMNCiqYVkXIZgc2Hnoy2IvC/f8ezc5koaRFkCjrpWzGpCd3qbZXPzVy9MAZzK1ch/X0jvSkojys3oqJN0qCmdA==", "dev": true, - "license": "MIT", "dependencies": { - "define-data-property": "^1.1.4", - "es-errors": "^1.3.0", + "define-data-property": "^1.0.1", "functions-have-names": "^1.2.3", - "has-property-descriptors": "^1.0.2" + "has-property-descriptors": "^1.0.0" }, "engines": { "node": ">= 0.4" @@ -13774,8 +15285,9 @@ }, "node_modules/shallow-clone": { "version": "3.0.1", + "resolved": "https://registry.npmjs.org/shallow-clone/-/shallow-clone-3.0.1.tgz", + "integrity": "sha512-/6KqX+GVUdqPuPPd2LxDDxzX6CAbjJehAAOKlNpqqUpAqPM6HeL8f+o3a+JsyGjn2lv0WY8UsTgUJjU9Ok55NA==", "dev": true, - "license": "MIT", "dependencies": { "kind-of": "^6.0.2" }, @@ -13785,8 +15297,9 @@ }, "node_modules/shebang-command": { "version": "2.0.0", + "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz", + "integrity": "sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==", "dev": true, - "license": "MIT", "dependencies": { "shebang-regex": "^3.0.0" }, @@ -13796,16 +15309,18 @@ }, "node_modules/shebang-regex": { "version": "3.0.0", + "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-3.0.0.tgz", + "integrity": "sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==", "dev": true, - "license": "MIT", "engines": { "node": ">=8" } }, "node_modules/shiki": { "version": "0.14.7", + "resolved": "https://registry.npmjs.org/shiki/-/shiki-0.14.7.tgz", + "integrity": "sha512-dNPAPrxSc87ua2sKJ3H5dQ/6ZaY8RNnaAqK+t0eG7p0Soi2ydiqbGOTaZCqaYvA/uZYfS1LJnemt3Q+mSfcPCg==", "dev": true, - "license": "MIT", "dependencies": { "ansi-sequence-parser": "^1.1.0", "jsonc-parser": "^3.2.0", @@ -13815,20 +15330,18 @@ }, "node_modules/shimmer": { "version": "1.2.1", - "license": "BSD-2-Clause" + "resolved": "https://registry.npmjs.org/shimmer/-/shimmer-1.2.1.tgz", + "integrity": "sha512-sQTKC1Re/rM6XyFM6fIAGHRPVGvyXfgzIDvzoq608vM+jeyVD0Tu1E6Np0Kc2zAIFWIj963V2800iF/9LPieQw==" }, "node_modules/side-channel": { - "version": "1.0.6", + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/side-channel/-/side-channel-1.0.4.tgz", + "integrity": "sha512-q5XPytqFEIKHkGdiMIrY10mvLRvnQh42/+GoBlFW3b2LXLE2xxJpZFdm94we0BaoV3RwJyGqg5wS7epxTv0Zvw==", "dev": true, - "license": "MIT", "dependencies": { - "call-bind": "^1.0.7", - "es-errors": "^1.3.0", - "get-intrinsic": "^1.2.4", - "object-inspect": "^1.13.1" - }, - "engines": { - "node": ">= 0.4" + "call-bind": "^1.0.0", + "get-intrinsic": "^1.0.2", + "object-inspect": "^1.9.0" }, "funding": { "url": "https://github.com/sponsors/ljharb" @@ -13836,13 +15349,15 @@ }, "node_modules/signal-exit": { "version": "3.0.7", - "dev": true, - "license": "ISC" + "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.7.tgz", + "integrity": "sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ==", + "dev": true }, "node_modules/sigstore": { "version": "1.9.0", + "resolved": "https://registry.npmjs.org/sigstore/-/sigstore-1.9.0.tgz", + "integrity": "sha512-0Zjz0oe37d08VeOtBIuB6cRriqXse2e8w+7yIy2XSXjshRKxbc2KkhXjL229jXSxEm7UbcjS76wcJDGQddVI9A==", "dev": true, - "license": "Apache-2.0", "dependencies": { "@sigstore/bundle": "^1.1.0", "@sigstore/protobuf-specs": "^0.2.0", @@ -13857,21 +15372,11 @@ "node": "^14.17.0 || ^16.13.0 || >=18.0.0" } }, - "node_modules/sigstore/node_modules/agent-base": { - "version": "6.0.2", - "dev": true, - "license": "MIT", - "dependencies": { - "debug": "4" - }, - "engines": { - "node": ">= 6.0.0" - } - }, "node_modules/sigstore/node_modules/cacache": { "version": "17.1.4", + "resolved": "https://registry.npmjs.org/cacache/-/cacache-17.1.4.tgz", + "integrity": "sha512-/aJwG2l3ZMJ1xNAnqbMpA40of9dj/pIH3QfiuQSqjfPJF747VR0J/bHn+/KdNnHKc6XQcWt/AfRSBft82W1d2A==", "dev": true, - "license": "ISC", "dependencies": { "@npmcli/fs": "^3.1.0", "fs-minipass": "^3.0.0", @@ -13890,10 +15395,41 @@ "node": "^14.17.0 || ^16.13.0 || >=18.0.0" } }, + "node_modules/sigstore/node_modules/cacache/node_modules/minipass": { + "version": "7.0.4", + "resolved": "https://registry.npmjs.org/minipass/-/minipass-7.0.4.tgz", + "integrity": "sha512-jYofLM5Dam9279rdkWzqHozUo4ybjdZmCsDHePy5V/PbBcVMiSZR97gmAy45aqi8CK1lG2ECd356FU86avfwUQ==", + "dev": true, + "engines": { + "node": ">=16 || 14 >=14.17" + } + }, + "node_modules/sigstore/node_modules/fs-minipass": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/fs-minipass/-/fs-minipass-3.0.3.tgz", + "integrity": "sha512-XUBA9XClHbnJWSfBzjkm6RvPsyg3sryZt06BEQoXcF7EK/xpGaQYJgQKDJSUH5SGZ76Y7pFx1QBnXz09rU5Fbw==", + "dev": true, + "dependencies": { + "minipass": "^7.0.3" + }, + "engines": { + "node": "^14.17.0 || ^16.13.0 || >=18.0.0" + } + }, + "node_modules/sigstore/node_modules/fs-minipass/node_modules/minipass": { + "version": "7.0.4", + "resolved": "https://registry.npmjs.org/minipass/-/minipass-7.0.4.tgz", + "integrity": "sha512-jYofLM5Dam9279rdkWzqHozUo4ybjdZmCsDHePy5V/PbBcVMiSZR97gmAy45aqi8CK1lG2ECd356FU86avfwUQ==", + "dev": true, + "engines": { + "node": ">=16 || 14 >=14.17" + } + }, "node_modules/sigstore/node_modules/glob": { "version": "10.3.10", + "resolved": "https://registry.npmjs.org/glob/-/glob-10.3.10.tgz", + "integrity": "sha512-fa46+tv1Ak0UPK1TOy/pZrIybNNt4HCv7SDzwyfiOZkvZLEbjsZkJBPtDHVshZjbecAoAGSC20MjLDG/qr679g==", "dev": true, - "license": "ISC", "dependencies": { "foreground-child": "^3.1.0", "jackspeak": "^2.3.5", @@ -13911,43 +15447,20 @@ "url": "https://github.com/sponsors/isaacs" } }, - "node_modules/sigstore/node_modules/http-proxy-agent": { - "version": "5.0.0", - "dev": true, - "license": "MIT", - "dependencies": { - "@tootallnate/once": "2", - "agent-base": "6", - "debug": "4" - }, - "engines": { - "node": ">= 6" - } - }, - "node_modules/sigstore/node_modules/https-proxy-agent": { - "version": "5.0.1", - "dev": true, - "license": "MIT", - "dependencies": { - "agent-base": "6", - "debug": "4" - }, - "engines": { - "node": ">= 6" - } - }, "node_modules/sigstore/node_modules/lru-cache": { "version": "7.18.3", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-7.18.3.tgz", + "integrity": "sha512-jumlc0BIUrS3qJGgIkWZsyfAM7NCWiBcCDhnd+3NNM5KbBmLTgHVfWBcg6W+rLUsIpzpERPsvwUP7CckAQSOoA==", "dev": true, - "license": "ISC", "engines": { "node": ">=12" } }, "node_modules/sigstore/node_modules/make-fetch-happen": { "version": "11.1.1", + "resolved": "https://registry.npmjs.org/make-fetch-happen/-/make-fetch-happen-11.1.1.tgz", + "integrity": "sha512-rLWS7GCSTcEujjVBs2YqG7Y4643u8ucvCJeSRqiLYhesrDuzeuFIk37xREzAsfQaqzl8b9rNCE4m6J8tvX4Q8w==", "dev": true, - "license": "ISC", "dependencies": { "agentkeepalive": "^4.2.1", "cacache": "^17.0.0", @@ -13969,53 +15482,20 @@ "node": "^14.17.0 || ^16.13.0 || >=18.0.0" } }, - "node_modules/sigstore/node_modules/make-fetch-happen/node_modules/minipass": { + "node_modules/sigstore/node_modules/minipass": { "version": "5.0.0", + "resolved": "https://registry.npmjs.org/minipass/-/minipass-5.0.0.tgz", + "integrity": "sha512-3FnjYuehv9k6ovOEbyOswadCDPX1piCfhV8ncmYtHOjuPwylVWsghTLo7rabjC3Rx5xD4HDx8Wm1xnMF7S5qFQ==", "dev": true, - "license": "ISC", - "engines": { - "node": ">=8" - } - }, - "node_modules/sigstore/node_modules/minipass-collect": { - "version": "1.0.2", - "dev": true, - "license": "ISC", - "dependencies": { - "minipass": "^3.0.0" - }, - "engines": { - "node": ">= 8" - } - }, - "node_modules/sigstore/node_modules/minipass-collect/node_modules/minipass": { - "version": "3.3.6", - "dev": true, - "license": "ISC", - "dependencies": { - "yallist": "^4.0.0" - }, "engines": { "node": ">=8" } }, - "node_modules/sigstore/node_modules/socks-proxy-agent": { - "version": "7.0.0", - "dev": true, - "license": "MIT", - "dependencies": { - "agent-base": "^6.0.2", - "debug": "^4.3.3", - "socks": "^2.6.2" - }, - "engines": { - "node": ">= 10" - } - }, "node_modules/sigstore/node_modules/ssri": { "version": "10.0.5", + "resolved": "https://registry.npmjs.org/ssri/-/ssri-10.0.5.tgz", + "integrity": "sha512-bSf16tAFkGeRlUNDjXu8FzaMQt6g2HZJrun7mtMbIPOddxt3GLMSz5VWUWcqTJUPfLEaDIepGxv+bYQW49596A==", "dev": true, - "license": "ISC", "dependencies": { "minipass": "^7.0.3" }, @@ -14023,15 +15503,20 @@ "node": "^14.17.0 || ^16.13.0 || >=18.0.0" } }, - "node_modules/sigstore/node_modules/yallist": { - "version": "4.0.0", + "node_modules/sigstore/node_modules/ssri/node_modules/minipass": { + "version": "7.0.4", + "resolved": "https://registry.npmjs.org/minipass/-/minipass-7.0.4.tgz", + "integrity": "sha512-jYofLM5Dam9279rdkWzqHozUo4ybjdZmCsDHePy5V/PbBcVMiSZR97gmAy45aqi8CK1lG2ECd356FU86avfwUQ==", "dev": true, - "license": "ISC" + "engines": { + "node": ">=16 || 14 >=14.17" + } }, "node_modules/sinon": { "version": "16.1.3", + "resolved": "https://registry.npmjs.org/sinon/-/sinon-16.1.3.tgz", + "integrity": "sha512-mjnWWeyxcAf9nC0bXcPmiDut+oE8HYridTNzBbF98AYVLmWwGRp2ISEpyhYflG1ifILT+eNn3BmKUJPxjXUPlA==", "dev": true, - "license": "BSD-3-Clause", "dependencies": { "@sinonjs/commons": "^3.0.0", "@sinonjs/fake-timers": "^10.3.0", @@ -14046,30 +15531,34 @@ } }, "node_modules/sinon/node_modules/diff": { - "version": "5.2.0", + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/diff/-/diff-5.1.0.tgz", + "integrity": "sha512-D+mk+qE8VC/PAUrlAU34N+VfXev0ghe5ywmpqrawphmVZc1bEfn56uo9qpyGp1p4xpzOHkSW4ztBd6L7Xx4ACw==", "dev": true, - "license": "BSD-3-Clause", "engines": { "node": ">=0.3.1" } }, "node_modules/sisteransi": { "version": "1.0.5", - "dev": true, - "license": "MIT" + "resolved": "https://registry.npmjs.org/sisteransi/-/sisteransi-1.0.5.tgz", + "integrity": "sha512-bLGGlR1QxBcynn2d5YmDX4MGjlZvy2MRBDRNHLJ8VI6l6+9FUiyTFNJ0IveOSP0bcXgVDPRcfGqA0pjaqUpfVg==", + "dev": true }, "node_modules/slash": { "version": "3.0.0", + "resolved": "https://registry.npmjs.org/slash/-/slash-3.0.0.tgz", + "integrity": "sha512-g9Q1haeby36OSStwb4ntCGGGaKsaVSjQ68fBxoQcutl5fS1vuY18H3wSt3jFyFtrkx+Kz0V1G85A4MyAdDMi2Q==", "dev": true, - "license": "MIT", "engines": { "node": ">=8" } }, "node_modules/slice-ansi": { "version": "5.0.0", + "resolved": "https://registry.npmjs.org/slice-ansi/-/slice-ansi-5.0.0.tgz", + "integrity": "sha512-FC+lgizVPfie0kkhqUScwRu1O/lF6NOgJmlCgK+/LYxDCTk8sGelYaHDhFcDN+Sn3Cv+3VSa4Byeo+IMCzpMgQ==", "dev": true, - "license": "MIT", "dependencies": { "ansi-styles": "^6.0.0", "is-fullwidth-code-point": "^4.0.0" @@ -14083,8 +15572,9 @@ }, "node_modules/slice-ansi/node_modules/ansi-styles": { "version": "6.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-6.2.1.tgz", + "integrity": "sha512-bN798gFfQX+viw3R7yrGWRqnrN2oRkEkUjjl4JNn4E8GxxbjtG3FbrEIIY3l8/hrwUwIeCZvi4QuOTP4MErVug==", "dev": true, - "license": "MIT", "engines": { "node": ">=12" }, @@ -14094,17 +15584,19 @@ }, "node_modules/smart-buffer": { "version": "4.2.0", + "resolved": "https://registry.npmjs.org/smart-buffer/-/smart-buffer-4.2.0.tgz", + "integrity": "sha512-94hK0Hh8rPqQl2xXc3HsaBoOXKV20MToPkcXvwbISWLEs+64sBq5kFgn2kJDHb1Pry9yrP0dxrCI9RRci7RXKg==", "dev": true, - "license": "MIT", "engines": { "node": ">= 6.0.0", "npm": ">= 3.0.0" } }, "node_modules/socks": { - "version": "2.8.1", + "version": "2.7.3", + "resolved": "https://registry.npmjs.org/socks/-/socks-2.7.3.tgz", + "integrity": "sha512-vfuYK48HXCTFD03G/1/zkIls3Ebr2YNa4qU9gHDZdblHLiqhJrJGkY3+0Nx0JpN9qBhJbVObc1CNciT1bIZJxw==", "dev": true, - "license": "MIT", "dependencies": { "ip-address": "^9.0.5", "smart-buffer": "^4.2.0" @@ -14115,22 +15607,24 @@ } }, "node_modules/socks-proxy-agent": { - "version": "8.0.2", + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/socks-proxy-agent/-/socks-proxy-agent-7.0.0.tgz", + "integrity": "sha512-Fgl0YPZ902wEsAyiQ+idGd1A7rSFx/ayC1CQVMw5P+EQx2V0SgpGtf6OKFhVjPflPUl9YMmEOnmfjCdMUsygww==", "dev": true, - "license": "MIT", "dependencies": { - "agent-base": "^7.0.2", - "debug": "^4.3.4", - "socks": "^2.7.1" + "agent-base": "^6.0.2", + "debug": "^4.3.3", + "socks": "^2.6.2" }, "engines": { - "node": ">= 14" + "node": ">= 10" } }, "node_modules/sort-keys": { "version": "2.0.0", + "resolved": "https://registry.npmjs.org/sort-keys/-/sort-keys-2.0.0.tgz", + "integrity": "sha512-/dPCrG1s3ePpWm6yBbxZq5Be1dXGLyLn9Z791chDC3NFrpkVbWGzkBwPN1knaciexFXgRJ7hzdnwZ4stHSDmjg==", "dev": true, - "license": "MIT", "dependencies": { "is-plain-obj": "^1.0.0" }, @@ -14140,14 +15634,16 @@ }, "node_modules/source-map": { "version": "0.6.1", - "license": "BSD-3-Clause", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", "engines": { "node": ">=0.10.0" } }, "node_modules/source-map-support": { "version": "0.5.21", - "license": "MIT", + "resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.5.21.tgz", + "integrity": "sha512-uBHU3L3czsIyYXKX88fdrGovxdSCoTGDRZ6SYXtSRxLZUzHg5P/66Ht6uoUlHu9EZod+inXhKo3qQgwXUT/y1w==", "dependencies": { "buffer-from": "^1.0.0", "source-map": "^0.6.0" @@ -14155,36 +15651,41 @@ }, "node_modules/spdx-correct": { "version": "3.2.0", + "resolved": "https://registry.npmjs.org/spdx-correct/-/spdx-correct-3.2.0.tgz", + "integrity": "sha512-kN9dJbvnySHULIluDHy32WHRUu3Og7B9sbY7tsFLctQkIqnMh3hErYgdMjTYuqmcXX+lK5T1lnUt3G7zNswmZA==", "dev": true, - "license": "Apache-2.0", "dependencies": { "spdx-expression-parse": "^3.0.0", "spdx-license-ids": "^3.0.0" } }, "node_modules/spdx-exceptions": { - "version": "2.5.0", - "dev": true, - "license": "CC-BY-3.0" + "version": "2.4.0", + "resolved": "https://registry.npmjs.org/spdx-exceptions/-/spdx-exceptions-2.4.0.tgz", + "integrity": "sha512-hcjppoJ68fhxA/cjbN4T8N6uCUejN8yFw69ttpqtBeCbF3u13n7mb31NB9jKwGTTWWnt9IbRA/mf1FprYS8wfw==", + "dev": true }, "node_modules/spdx-expression-parse": { "version": "3.0.1", + "resolved": "https://registry.npmjs.org/spdx-expression-parse/-/spdx-expression-parse-3.0.1.tgz", + "integrity": "sha512-cbqHunsQWnJNE6KhVSMsMeH5H/L9EpymbzqTQ3uLwNCLZ1Q481oWaofqH7nO6V07xlXwY6PhQdQ2IedWx/ZK4Q==", "dev": true, - "license": "MIT", "dependencies": { "spdx-exceptions": "^2.1.0", "spdx-license-ids": "^3.0.0" } }, "node_modules/spdx-license-ids": { - "version": "3.0.17", - "dev": true, - "license": "CC0-1.0" + "version": "3.0.16", + "resolved": "https://registry.npmjs.org/spdx-license-ids/-/spdx-license-ids-3.0.16.tgz", + "integrity": "sha512-eWN+LnM3GR6gPu35WxNgbGl8rmY1AEmoMDvL/QD6zYmPWgywxWqJWNdLGT+ke8dKNWrcYgYjPpG5gbTfghP8rw==", + "dev": true }, "node_modules/split": { "version": "1.0.1", + "resolved": "https://registry.npmjs.org/split/-/split-1.0.1.tgz", + "integrity": "sha512-mTyOoPbrivtXnwnIxZRFYRrPNtEFKlpB2fvjSnCQUiAA6qAZzqwna5envK4uk6OIeP17CsdF3rSBGYVBsU0Tkg==", "dev": true, - "license": "MIT", "dependencies": { "through": "2" }, @@ -14194,21 +15695,24 @@ }, "node_modules/split2": { "version": "3.2.2", + "resolved": "https://registry.npmjs.org/split2/-/split2-3.2.2.tgz", + "integrity": "sha512-9NThjpgZnifTkJpzTZ7Eue85S49QwpNhZTq6GRJwObb6jnLFNGB7Qm73V5HewTROPyxD0C29xqmaI68bQtV+hg==", "dev": true, - "license": "ISC", "dependencies": { "readable-stream": "^3.0.0" } }, "node_modules/sprintf-js": { - "version": "1.1.3", - "dev": true, - "license": "BSD-3-Clause" + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.0.3.tgz", + "integrity": "sha512-D9cPgkvLlV3t3IzL0D0YLvGA9Ahk4PcvVwUbN0dSGr1aP0Nrt4AEnTUbuGvquEC0mA64Gqt1fzirlRs5ibXx8g==", + "dev": true }, "node_modules/ssri": { "version": "9.0.1", + "resolved": "https://registry.npmjs.org/ssri/-/ssri-9.0.1.tgz", + "integrity": "sha512-o57Wcn66jMQvfHG1FlYbWeZWW/dHZhJXjpIcTfXldXEk5nz5lStPo3mK0OJQfGR3RbZUlbISexbljkJzuEj/8Q==", "dev": true, - "license": "ISC", "dependencies": { "minipass": "^3.1.1" }, @@ -14216,30 +15720,16 @@ "node": "^12.13.0 || ^14.15.0 || >=16.0.0" } }, - "node_modules/ssri/node_modules/minipass": { - "version": "3.3.6", - "dev": true, - "license": "ISC", - "dependencies": { - "yallist": "^4.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/ssri/node_modules/yallist": { - "version": "4.0.0", - "dev": true, - "license": "ISC" - }, "node_modules/stack-chain": { "version": "1.3.7", - "license": "MIT" + "resolved": "https://registry.npmjs.org/stack-chain/-/stack-chain-1.3.7.tgz", + "integrity": "sha512-D8cWtWVdIe/jBA7v5p5Hwl5yOSOrmZPWDPe2KxQ5UAGD+nxbxU0lKXA4h85Ta6+qgdKVL3vUxsbIZjc1kBG7ug==" }, "node_modules/stack-utils": { "version": "2.0.6", + "resolved": "https://registry.npmjs.org/stack-utils/-/stack-utils-2.0.6.tgz", + "integrity": "sha512-XlkWvfIm6RmsWtNJx+uqtKLS8eqFbxUg0ZzLXqY0caEy9l7hruX8IpiDnjsLavoBgqCCR71TqWO8MaXYheJ3RQ==", "dev": true, - "license": "MIT", "dependencies": { "escape-string-regexp": "^2.0.0" }, @@ -14249,32 +15739,36 @@ }, "node_modules/stack-utils/node_modules/escape-string-regexp": { "version": "2.0.0", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-2.0.0.tgz", + "integrity": "sha512-UpzcLCXolUWcNu5HtVMHYdXJjArjsF9C0aNnquZYY4uW/Vu0miy5YoWvbV345HauVvcAUnpRuhMMcqTcGOY2+w==", "dev": true, - "license": "MIT", "engines": { "node": ">=8" } }, "node_modules/string_decoder": { "version": "1.3.0", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.3.0.tgz", + "integrity": "sha512-hkRX8U1WjJFd8LsDJ2yQ/wWWxaopEsABU1XfkM8A+j0+85JAGppt16cr1Whg6KIbb4okU6Mql6BOj+uup/wKeA==", "dev": true, - "license": "MIT", "dependencies": { "safe-buffer": "~5.2.0" } }, "node_modules/string-argv": { "version": "0.3.2", + "resolved": "https://registry.npmjs.org/string-argv/-/string-argv-0.3.2.tgz", + "integrity": "sha512-aqD2Q0144Z+/RqG52NeHEkZauTAUWJO8c6yTftGJKO3Tja5tUgIfmIl6kExvhtxSDP7fXB6DvzkfMpCd/F3G+Q==", "dev": true, - "license": "MIT", "engines": { "node": ">=0.6.19" } }, "node_modules/string-length": { "version": "4.0.2", + "resolved": "https://registry.npmjs.org/string-length/-/string-length-4.0.2.tgz", + "integrity": "sha512-+l6rNN5fYHNhZZy41RXsYptCjA2Igmq4EG7kZAYFQI1E1VTXarr6ZPXBg6eq7Y6eK4FEhY6AJlyuFIb/v/S0VQ==", "dev": true, - "license": "MIT", "dependencies": { "char-regex": "^1.0.2", "strip-ansi": "^6.0.0" @@ -14285,8 +15779,9 @@ }, "node_modules/string-width": { "version": "4.2.3", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", + "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", "dev": true, - "license": "MIT", "dependencies": { "emoji-regex": "^8.0.0", "is-fullwidth-code-point": "^3.0.0", @@ -14299,8 +15794,9 @@ "node_modules/string-width-cjs": { "name": "string-width", "version": "4.2.3", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", + "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", "dev": true, - "license": "MIT", "dependencies": { "emoji-regex": "^8.0.0", "is-fullwidth-code-point": "^3.0.0", @@ -14312,24 +15808,27 @@ }, "node_modules/string-width-cjs/node_modules/is-fullwidth-code-point": { "version": "3.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", + "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", "dev": true, - "license": "MIT", "engines": { "node": ">=8" } }, "node_modules/string-width/node_modules/is-fullwidth-code-point": { "version": "3.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", + "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", "dev": true, - "license": "MIT", "engines": { "node": ">=8" } }, "node_modules/string.prototype.trim": { "version": "1.2.8", + "resolved": "https://registry.npmjs.org/string.prototype.trim/-/string.prototype.trim-1.2.8.tgz", + "integrity": "sha512-lfjY4HcixfQXOfaqCvcBuOIapyaroTXhbkfJN3gcB1OtyupngWK4sEET9Knd0cXd28kTUqu/kHoV4HKSJdnjiQ==", "dev": true, - "license": "MIT", "dependencies": { "call-bind": "^1.0.2", "define-properties": "^1.2.0", @@ -14344,8 +15843,9 @@ }, "node_modules/string.prototype.trimend": { "version": "1.0.7", + "resolved": "https://registry.npmjs.org/string.prototype.trimend/-/string.prototype.trimend-1.0.7.tgz", + "integrity": "sha512-Ni79DqeB72ZFq1uH/L6zJ+DKZTkOtPIHovb3YZHQViE+HDouuU4mBrLOLDn5Dde3RF8qw5qVETEjhu9locMLvA==", "dev": true, - "license": "MIT", "dependencies": { "call-bind": "^1.0.2", "define-properties": "^1.2.0", @@ -14357,8 +15857,9 @@ }, "node_modules/string.prototype.trimstart": { "version": "1.0.7", + "resolved": "https://registry.npmjs.org/string.prototype.trimstart/-/string.prototype.trimstart-1.0.7.tgz", + "integrity": "sha512-NGhtDFu3jCEm7B4Fy0DpLewdJQOZcQ0rGbwQ/+stjnrp2i+rlKeCvos9hOIeCmqwratM47OBxY7uFZzjxHXmrg==", "dev": true, - "license": "MIT", "dependencies": { "call-bind": "^1.0.2", "define-properties": "^1.2.0", @@ -14370,8 +15871,9 @@ }, "node_modules/strip-ansi": { "version": "6.0.1", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", + "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", "dev": true, - "license": "MIT", "dependencies": { "ansi-regex": "^5.0.1" }, @@ -14382,8 +15884,9 @@ "node_modules/strip-ansi-cjs": { "name": "strip-ansi", "version": "6.0.1", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", + "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", "dev": true, - "license": "MIT", "dependencies": { "ansi-regex": "^5.0.1" }, @@ -14393,24 +15896,27 @@ }, "node_modules/strip-bom": { "version": "4.0.0", + "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-4.0.0.tgz", + "integrity": "sha512-3xurFv5tEgii33Zi8Jtp55wEIILR9eh34FAW00PZf+JnSsTmV/ioewSgQl97JHvgjoRGwPShsWm+IdrxB35d0w==", "dev": true, - "license": "MIT", "engines": { "node": ">=8" } }, "node_modules/strip-final-newline": { "version": "2.0.0", + "resolved": "https://registry.npmjs.org/strip-final-newline/-/strip-final-newline-2.0.0.tgz", + "integrity": "sha512-BrpvfNAE3dcvq7ll3xVumzjKjZQ5tI1sEUIKr3Uoks0XUl45St3FlatVqef9prk4jRDzhW6WZg+3bk93y6pLjA==", "dev": true, - "license": "MIT", "engines": { "node": ">=6" } }, "node_modules/strip-indent": { "version": "3.0.0", + "resolved": "https://registry.npmjs.org/strip-indent/-/strip-indent-3.0.0.tgz", + "integrity": "sha512-laJTa3Jb+VQpaC6DseHhF7dXVqHTfJPCRDaEbid/drOhgitgYku/letMUqOXFoWV0zIIUbjpdH2t+tYj4bQMRQ==", "dev": true, - "license": "MIT", "dependencies": { "min-indent": "^1.0.0" }, @@ -14420,8 +15926,9 @@ }, "node_modules/strip-json-comments": { "version": "3.1.1", + "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-3.1.1.tgz", + "integrity": "sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig==", "dev": true, - "license": "MIT", "engines": { "node": ">=8" }, @@ -14431,12 +15938,14 @@ }, "node_modules/strnum": { "version": "1.0.5", - "license": "MIT" + "resolved": "https://registry.npmjs.org/strnum/-/strnum-1.0.5.tgz", + "integrity": "sha512-J8bbNyKKXl5qYcR36TIO8W3mVGVHrmmxsd5PAItGkmyzwJvybiw2IVq5nqd0i4LSNSkB/sx9VHllbfFdr9k1JA==" }, "node_modules/strong-log-transformer": { "version": "2.1.0", + "resolved": "https://registry.npmjs.org/strong-log-transformer/-/strong-log-transformer-2.1.0.tgz", + "integrity": "sha512-B3Hgul+z0L9a236FAUC9iZsL+nVHgoCJnqCbN588DjYxvGXaXaaFbfmQ/JhvKjZwsOukuR72XbHv71Qkug0HxA==", "dev": true, - "license": "Apache-2.0", "dependencies": { "duplexer": "^0.1.1", "minimist": "^1.2.0", @@ -14451,8 +15960,9 @@ }, "node_modules/supports-color": { "version": "7.2.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", + "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", "dev": true, - "license": "MIT", "dependencies": { "has-flag": "^4.0.0" }, @@ -14462,8 +15972,9 @@ }, "node_modules/supports-preserve-symlinks-flag": { "version": "1.0.0", + "resolved": "https://registry.npmjs.org/supports-preserve-symlinks-flag/-/supports-preserve-symlinks-flag-1.0.0.tgz", + "integrity": "sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w==", "dev": true, - "license": "MIT", "engines": { "node": ">= 0.4" }, @@ -14473,8 +15984,9 @@ }, "node_modules/synckit": { "version": "0.8.8", + "resolved": "https://registry.npmjs.org/synckit/-/synckit-0.8.8.tgz", + "integrity": "sha512-HwOKAP7Wc5aRGYdKH+dw0PRRpbO841v2DENBtjnR5HFWoiNByAl7vrx3p0G/rCyYXQsrxqtX48TImFtPcIHSpQ==", "dev": true, - "license": "MIT", "dependencies": { "@pkgr/core": "^0.1.0", "tslib": "^2.6.2" @@ -14488,16 +16000,18 @@ }, "node_modules/tapable": { "version": "2.2.1", + "resolved": "https://registry.npmjs.org/tapable/-/tapable-2.2.1.tgz", + "integrity": "sha512-GNzQvQTOIP6RyTfE2Qxb8ZVlNmw0n88vp1szwWRimP02mnTsx3Wtn5qRdqY9w2XduFNUgvOwhNnQsjwCp+kqaQ==", "dev": true, - "license": "MIT", "engines": { "node": ">=6" } }, "node_modules/tar": { "version": "6.1.11", + "resolved": "https://registry.npmjs.org/tar/-/tar-6.1.11.tgz", + "integrity": "sha512-an/KZQzQUkZCkuoAA64hM92X0Urb6VpRhAFllDzz44U2mcD5scmT3zBc4VgVpkugF580+DQn8eAFSyoQt0tznA==", "dev": true, - "license": "ISC", "dependencies": { "chownr": "^2.0.0", "fs-minipass": "^2.0.0", @@ -14512,58 +16026,40 @@ }, "node_modules/tar-stream": { "version": "2.2.0", + "resolved": "https://registry.npmjs.org/tar-stream/-/tar-stream-2.2.0.tgz", + "integrity": "sha512-ujeqbceABgwMZxEJnk2HDY2DlnUZ+9oEcb1KzTVfYHio0UE6dG71n60d8D2I4qNvleWrrXpmjpt7vZeF1LnMZQ==", "dev": true, - "license": "MIT", - "dependencies": { - "bl": "^4.0.3", - "end-of-stream": "^1.4.1", - "fs-constants": "^1.0.0", - "inherits": "^2.0.3", - "readable-stream": "^3.1.1" - }, - "engines": { - "node": ">=6" - } - }, - "node_modules/tar/node_modules/fs-minipass": { - "version": "2.1.0", - "dev": true, - "license": "ISC", - "dependencies": { - "minipass": "^3.0.0" - }, - "engines": { - "node": ">= 8" - } - }, - "node_modules/tar/node_modules/minipass": { - "version": "3.3.6", - "dev": true, - "license": "ISC", "dependencies": { - "yallist": "^4.0.0" + "bl": "^4.0.3", + "end-of-stream": "^1.4.1", + "fs-constants": "^1.0.0", + "inherits": "^2.0.3", + "readable-stream": "^3.1.1" }, "engines": { - "node": ">=8" + "node": ">=6" } }, "node_modules/tar/node_modules/yallist": { "version": "4.0.0", - "dev": true, - "license": "ISC" + "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", + "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==", + "dev": true }, "node_modules/temp-dir": { "version": "1.0.0", + "resolved": "https://registry.npmjs.org/temp-dir/-/temp-dir-1.0.0.tgz", + "integrity": "sha512-xZFXEGbG7SNC3itwBzI3RYjq/cEhBkx2hJuKGIUOcEULmkQExXiHat2z/qkISYsuR+IKumhEfKKbV5qXmhICFQ==", "dev": true, - "license": "MIT", "engines": { "node": ">=4" } }, "node_modules/test-exclude": { "version": "6.0.0", + "resolved": "https://registry.npmjs.org/test-exclude/-/test-exclude-6.0.0.tgz", + "integrity": "sha512-cAGWPIyOHU6zlmg88jwm7VRyXnMN7iV68OGAbYDk/Mh/xC/pzVPlQtY6ngoIH/5/tciuhGfvESU8GrHrcxD56w==", "dev": true, - "license": "ISC", "dependencies": { "@istanbuljs/schema": "^0.1.2", "glob": "^7.1.4", @@ -14575,8 +16071,9 @@ }, "node_modules/test-exclude/node_modules/brace-expansion": { "version": "1.1.11", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", + "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", "dev": true, - "license": "MIT", "dependencies": { "balanced-match": "^1.0.0", "concat-map": "0.0.1" @@ -14584,8 +16081,9 @@ }, "node_modules/test-exclude/node_modules/minimatch": { "version": "3.1.2", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", + "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", "dev": true, - "license": "ISC", "dependencies": { "brace-expansion": "^1.1.7" }, @@ -14595,26 +16093,30 @@ }, "node_modules/text-extensions": { "version": "1.9.0", + "resolved": "https://registry.npmjs.org/text-extensions/-/text-extensions-1.9.0.tgz", + "integrity": "sha512-wiBrwC1EhBelW12Zy26JeOUkQ5mRu+5o8rpsJk5+2t+Y5vE7e842qtZDQ2g1NpX/29HdyFeJ4nSIhI47ENSxlQ==", "dev": true, - "license": "MIT", "engines": { "node": ">=0.10" } }, "node_modules/text-table": { "version": "0.2.0", - "dev": true, - "license": "MIT" + "resolved": "https://registry.npmjs.org/text-table/-/text-table-0.2.0.tgz", + "integrity": "sha512-N+8UisAXDGk8PFXP4HAzVR9nbfmVJ3zYLAWiTIoqC5v5isinhr+r5uaO8+7r3BMfuNIufIsA7RdpVgacC2cSpw==", + "dev": true }, "node_modules/through": { "version": "2.3.8", - "dev": true, - "license": "MIT" + "resolved": "https://registry.npmjs.org/through/-/through-2.3.8.tgz", + "integrity": "sha512-w89qg7PI8wAdvX60bMDP+bFoD5Dvhm9oLheFp5O4a2QF0cSBGsBX4qZmadPMvVqlLJBBci+WqGGOAPvcDeNSVg==", + "dev": true }, "node_modules/through2": { "version": "2.0.5", + "resolved": "https://registry.npmjs.org/through2/-/through2-2.0.5.tgz", + "integrity": "sha512-/mrRod8xqpA+IHSLyGCQ2s8SPHiCDEeQJSep1jqLYeEUClOFG2Qsh+4FU6G9VeqpZnGW/Su8LQGc4YKni5rYSQ==", "dev": true, - "license": "MIT", "dependencies": { "readable-stream": "~2.3.6", "xtend": "~4.0.1" @@ -14622,13 +16124,15 @@ }, "node_modules/through2/node_modules/isarray": { "version": "1.0.0", - "dev": true, - "license": "MIT" + "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", + "integrity": "sha512-VLghIWNM6ELQzo7zwmcg0NmTVyWKYjvIeM83yjp0wRDTmUnrM678fQbcKBo6n2CJEF0szoG//ytg+TKla89ALQ==", + "dev": true }, "node_modules/through2/node_modules/readable-stream": { "version": "2.3.8", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.8.tgz", + "integrity": "sha512-8p0AUk4XODgIewSi0l8Epjs+EVnWiK7NoDIEGU0HhE7+ZyY8D1IMY7odu5lRrFXGg71L15KG8QrPmum45RTtdA==", "dev": true, - "license": "MIT", "dependencies": { "core-util-is": "~1.0.0", "inherits": "~2.0.3", @@ -14641,42 +16145,66 @@ }, "node_modules/through2/node_modules/safe-buffer": { "version": "5.1.2", - "dev": true, - "license": "MIT" + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", + "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==", + "dev": true }, "node_modules/through2/node_modules/string_decoder": { "version": "1.1.1", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", + "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", "dev": true, - "license": "MIT", "dependencies": { "safe-buffer": "~5.1.0" } }, "node_modules/tmp": { - "version": "0.2.3", + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/tmp/-/tmp-0.2.1.tgz", + "integrity": "sha512-76SUhtfqR2Ijn+xllcI5P1oyannHNHByD80W1q447gU3mp9G9PSpGdWmjUOHRDPiHYacIk66W7ubDTuPF3BEtQ==", "dev": true, - "license": "MIT", + "dependencies": { + "rimraf": "^3.0.0" + }, "engines": { - "node": ">=14.14" + "node": ">=8.17.0" + } + }, + "node_modules/tmp/node_modules/rimraf": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-3.0.2.tgz", + "integrity": "sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA==", + "dev": true, + "dependencies": { + "glob": "^7.1.3" + }, + "bin": { + "rimraf": "bin.js" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" } }, "node_modules/tmpl": { "version": "1.0.5", - "dev": true, - "license": "BSD-3-Clause" + "resolved": "https://registry.npmjs.org/tmpl/-/tmpl-1.0.5.tgz", + "integrity": "sha512-3f0uOEAQwIqGuWW2MVzYg8fV/QNnc/IpuJNG837rLuczAaLVHslWHZQj4IGiEl5Hs3kkbhwL9Ab7Hrsmuj+Smw==", + "dev": true }, "node_modules/to-fast-properties": { "version": "2.0.0", + "resolved": "https://registry.npmjs.org/to-fast-properties/-/to-fast-properties-2.0.0.tgz", + "integrity": "sha512-/OaKK0xYrs3DmxRYqL/yDc+FxFUVYhDlXMhRmv3z915w2HF1tnN1omB354j8VUGO/hbRzyD6Y3sA7v7GS/ceog==", "dev": true, - "license": "MIT", "engines": { "node": ">=4" } }, "node_modules/to-regex-range": { "version": "5.0.1", + "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz", + "integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==", "dev": true, - "license": "MIT", "dependencies": { "is-number": "^7.0.0" }, @@ -14686,23 +16214,26 @@ }, "node_modules/tr46": { "version": "0.0.3", - "dev": true, - "license": "MIT" + "resolved": "https://registry.npmjs.org/tr46/-/tr46-0.0.3.tgz", + "integrity": "sha512-N3WMsuqV66lT30CrXNbEjx4GEwlow3v6rr4mCcv6prnfwhS01rkgyFdjPNBYd9br7LpXV1+Emh01fHnq2Gdgrw==", + "dev": true }, "node_modules/trim-newlines": { "version": "3.0.1", + "resolved": "https://registry.npmjs.org/trim-newlines/-/trim-newlines-3.0.1.tgz", + "integrity": "sha512-c1PTsA3tYrIsLGkJkzHF+w9F2EyxfXGo4UyJc4pFL++FMjnq0HJS69T3M7d//gKrFKwy429bouPescbjecU+Zw==", "dev": true, - "license": "MIT", "engines": { "node": ">=8" } }, "node_modules/ts-api-utils": { - "version": "1.2.1", + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/ts-api-utils/-/ts-api-utils-1.0.3.tgz", + "integrity": "sha512-wNMeqtMz5NtwpT/UZGY5alT+VoKdSsOOP/kqHFcUW1P/VRhH2wJ48+DN2WwUliNbQ976ETwDL0Ifd2VVvgonvg==", "dev": true, - "license": "MIT", "engines": { - "node": ">=16" + "node": ">=16.13.0" }, "peerDependencies": { "typescript": ">=4.2.0" @@ -14710,8 +16241,9 @@ }, "node_modules/ts-jest": { "version": "29.1.2", + "resolved": "https://registry.npmjs.org/ts-jest/-/ts-jest-29.1.2.tgz", + "integrity": "sha512-br6GJoH/WUX4pu7FbZXuWGKGNDuU7b8Uj77g/Sp7puZV6EXzuByl6JrECvm0MzVzSTkSHWTihsXt+5XYER5b+g==", "dev": true, - "license": "MIT", "dependencies": { "bs-logger": "0.x", "fast-json-stable-stringify": "2.x", @@ -14752,8 +16284,9 @@ }, "node_modules/ts-node": { "version": "10.9.2", + "resolved": "https://registry.npmjs.org/ts-node/-/ts-node-10.9.2.tgz", + "integrity": "sha512-f0FFpIdcHgn8zcPSbf1dRevwt047YMnaiJM3u2w2RewrB+fob/zePZcrOyQoLMMO7aBIddLcQIEK5dYjkLnGrQ==", "dev": true, - "license": "MIT", "dependencies": { "@cspotcode/source-map-support": "^0.8.0", "@tsconfig/node10": "^1.0.7", @@ -14794,8 +16327,9 @@ }, "node_modules/tsconfig-paths": { "version": "3.15.0", + "resolved": "https://registry.npmjs.org/tsconfig-paths/-/tsconfig-paths-3.15.0.tgz", + "integrity": "sha512-2Ac2RgzDe/cn48GvOe3M+o82pEFewD3UPbyoUHHdKasHwJKjds4fLXWf/Ux5kATBKN20oaFGu+jbElp1pos0mg==", "dev": true, - "license": "MIT", "dependencies": { "@types/json5": "^0.0.29", "json5": "^1.0.2", @@ -14805,8 +16339,9 @@ }, "node_modules/tsconfig-paths/node_modules/json5": { "version": "1.0.2", + "resolved": "https://registry.npmjs.org/json5/-/json5-1.0.2.tgz", + "integrity": "sha512-g1MWMLBiz8FKi1e4w0UyVL3w+iJceWAFBAaBnnGKOpNa5f8TLktkbre1+s6oICydWAm+HRUGTmI+//xv2hvXYA==", "dev": true, - "license": "MIT", "dependencies": { "minimist": "^1.2.0" }, @@ -14816,20 +16351,23 @@ }, "node_modules/tsconfig-paths/node_modules/strip-bom": { "version": "3.0.0", + "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-3.0.0.tgz", + "integrity": "sha512-vavAMRXOgBVNF6nyEEmL3DBK19iRpDcoIwW+swQ+CbGiu7lju6t+JklA1MHweoWtadgt4ISVUsXLyDq34ddcwA==", "dev": true, - "license": "MIT", "engines": { "node": ">=4" } }, "node_modules/tslib": { "version": "2.6.2", - "license": "0BSD" + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.6.2.tgz", + "integrity": "sha512-AEYxH93jGFPn/a2iVAwW87VuUIkR1FVUKB77NwMF7nBTDkDrrT/Hpt/IrCJ0QXhW27jTBDcf5ZY7w6RiqTMw2Q==" }, "node_modules/tuf-js": { "version": "1.1.7", + "resolved": "https://registry.npmjs.org/tuf-js/-/tuf-js-1.1.7.tgz", + "integrity": "sha512-i3P9Kgw3ytjELUfpuKVDNBJvk4u5bXL6gskv572mcevPbSKCV3zt3djhmlEQ65yERjIbOSncy7U4cQJaB1CBCg==", "dev": true, - "license": "MIT", "dependencies": { "@tufjs/models": "1.0.4", "debug": "^4.3.4", @@ -14839,21 +16377,11 @@ "node": "^14.17.0 || ^16.13.0 || >=18.0.0" } }, - "node_modules/tuf-js/node_modules/agent-base": { - "version": "6.0.2", - "dev": true, - "license": "MIT", - "dependencies": { - "debug": "4" - }, - "engines": { - "node": ">= 6.0.0" - } - }, "node_modules/tuf-js/node_modules/cacache": { "version": "17.1.4", + "resolved": "https://registry.npmjs.org/cacache/-/cacache-17.1.4.tgz", + "integrity": "sha512-/aJwG2l3ZMJ1xNAnqbMpA40of9dj/pIH3QfiuQSqjfPJF747VR0J/bHn+/KdNnHKc6XQcWt/AfRSBft82W1d2A==", "dev": true, - "license": "ISC", "dependencies": { "@npmcli/fs": "^3.1.0", "fs-minipass": "^3.0.0", @@ -14872,10 +16400,41 @@ "node": "^14.17.0 || ^16.13.0 || >=18.0.0" } }, + "node_modules/tuf-js/node_modules/cacache/node_modules/minipass": { + "version": "7.0.4", + "resolved": "https://registry.npmjs.org/minipass/-/minipass-7.0.4.tgz", + "integrity": "sha512-jYofLM5Dam9279rdkWzqHozUo4ybjdZmCsDHePy5V/PbBcVMiSZR97gmAy45aqi8CK1lG2ECd356FU86avfwUQ==", + "dev": true, + "engines": { + "node": ">=16 || 14 >=14.17" + } + }, + "node_modules/tuf-js/node_modules/fs-minipass": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/fs-minipass/-/fs-minipass-3.0.3.tgz", + "integrity": "sha512-XUBA9XClHbnJWSfBzjkm6RvPsyg3sryZt06BEQoXcF7EK/xpGaQYJgQKDJSUH5SGZ76Y7pFx1QBnXz09rU5Fbw==", + "dev": true, + "dependencies": { + "minipass": "^7.0.3" + }, + "engines": { + "node": "^14.17.0 || ^16.13.0 || >=18.0.0" + } + }, + "node_modules/tuf-js/node_modules/fs-minipass/node_modules/minipass": { + "version": "7.0.4", + "resolved": "https://registry.npmjs.org/minipass/-/minipass-7.0.4.tgz", + "integrity": "sha512-jYofLM5Dam9279rdkWzqHozUo4ybjdZmCsDHePy5V/PbBcVMiSZR97gmAy45aqi8CK1lG2ECd356FU86avfwUQ==", + "dev": true, + "engines": { + "node": ">=16 || 14 >=14.17" + } + }, "node_modules/tuf-js/node_modules/glob": { "version": "10.3.10", + "resolved": "https://registry.npmjs.org/glob/-/glob-10.3.10.tgz", + "integrity": "sha512-fa46+tv1Ak0UPK1TOy/pZrIybNNt4HCv7SDzwyfiOZkvZLEbjsZkJBPtDHVshZjbecAoAGSC20MjLDG/qr679g==", "dev": true, - "license": "ISC", "dependencies": { "foreground-child": "^3.1.0", "jackspeak": "^2.3.5", @@ -14893,43 +16452,20 @@ "url": "https://github.com/sponsors/isaacs" } }, - "node_modules/tuf-js/node_modules/http-proxy-agent": { - "version": "5.0.0", - "dev": true, - "license": "MIT", - "dependencies": { - "@tootallnate/once": "2", - "agent-base": "6", - "debug": "4" - }, - "engines": { - "node": ">= 6" - } - }, - "node_modules/tuf-js/node_modules/https-proxy-agent": { - "version": "5.0.1", - "dev": true, - "license": "MIT", - "dependencies": { - "agent-base": "6", - "debug": "4" - }, - "engines": { - "node": ">= 6" - } - }, "node_modules/tuf-js/node_modules/lru-cache": { "version": "7.18.3", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-7.18.3.tgz", + "integrity": "sha512-jumlc0BIUrS3qJGgIkWZsyfAM7NCWiBcCDhnd+3NNM5KbBmLTgHVfWBcg6W+rLUsIpzpERPsvwUP7CckAQSOoA==", "dev": true, - "license": "ISC", "engines": { "node": ">=12" } }, "node_modules/tuf-js/node_modules/make-fetch-happen": { "version": "11.1.1", + "resolved": "https://registry.npmjs.org/make-fetch-happen/-/make-fetch-happen-11.1.1.tgz", + "integrity": "sha512-rLWS7GCSTcEujjVBs2YqG7Y4643u8ucvCJeSRqiLYhesrDuzeuFIk37xREzAsfQaqzl8b9rNCE4m6J8tvX4Q8w==", "dev": true, - "license": "ISC", "dependencies": { "agentkeepalive": "^4.2.1", "cacache": "^17.0.0", @@ -14951,53 +16487,20 @@ "node": "^14.17.0 || ^16.13.0 || >=18.0.0" } }, - "node_modules/tuf-js/node_modules/make-fetch-happen/node_modules/minipass": { + "node_modules/tuf-js/node_modules/minipass": { "version": "5.0.0", + "resolved": "https://registry.npmjs.org/minipass/-/minipass-5.0.0.tgz", + "integrity": "sha512-3FnjYuehv9k6ovOEbyOswadCDPX1piCfhV8ncmYtHOjuPwylVWsghTLo7rabjC3Rx5xD4HDx8Wm1xnMF7S5qFQ==", "dev": true, - "license": "ISC", - "engines": { - "node": ">=8" - } - }, - "node_modules/tuf-js/node_modules/minipass-collect": { - "version": "1.0.2", - "dev": true, - "license": "ISC", - "dependencies": { - "minipass": "^3.0.0" - }, - "engines": { - "node": ">= 8" - } - }, - "node_modules/tuf-js/node_modules/minipass-collect/node_modules/minipass": { - "version": "3.3.6", - "dev": true, - "license": "ISC", - "dependencies": { - "yallist": "^4.0.0" - }, "engines": { "node": ">=8" } }, - "node_modules/tuf-js/node_modules/socks-proxy-agent": { - "version": "7.0.0", - "dev": true, - "license": "MIT", - "dependencies": { - "agent-base": "^6.0.2", - "debug": "^4.3.3", - "socks": "^2.6.2" - }, - "engines": { - "node": ">= 10" - } - }, "node_modules/tuf-js/node_modules/ssri": { "version": "10.0.5", + "resolved": "https://registry.npmjs.org/ssri/-/ssri-10.0.5.tgz", + "integrity": "sha512-bSf16tAFkGeRlUNDjXu8FzaMQt6g2HZJrun7mtMbIPOddxt3GLMSz5VWUWcqTJUPfLEaDIepGxv+bYQW49596A==", "dev": true, - "license": "ISC", "dependencies": { "minipass": "^7.0.3" }, @@ -15005,15 +16508,20 @@ "node": "^14.17.0 || ^16.13.0 || >=18.0.0" } }, - "node_modules/tuf-js/node_modules/yallist": { - "version": "4.0.0", + "node_modules/tuf-js/node_modules/ssri/node_modules/minipass": { + "version": "7.0.4", + "resolved": "https://registry.npmjs.org/minipass/-/minipass-7.0.4.tgz", + "integrity": "sha512-jYofLM5Dam9279rdkWzqHozUo4ybjdZmCsDHePy5V/PbBcVMiSZR97gmAy45aqi8CK1lG2ECd356FU86avfwUQ==", "dev": true, - "license": "ISC" + "engines": { + "node": ">=16 || 14 >=14.17" + } }, "node_modules/type-check": { "version": "0.4.0", + "resolved": "https://registry.npmjs.org/type-check/-/type-check-0.4.0.tgz", + "integrity": "sha512-XleUoc9uwGXqjWwXaUTZAmzMcFZ5858QA2vvx1Ur5xIcixXIP+8LnFDgRplU30us6teqdlskFfu+ae4K79Ooew==", "dev": true, - "license": "MIT", "dependencies": { "prelude-ls": "^1.2.1" }, @@ -15023,16 +16531,18 @@ }, "node_modules/type-detect": { "version": "4.0.8", + "resolved": "https://registry.npmjs.org/type-detect/-/type-detect-4.0.8.tgz", + "integrity": "sha512-0fr/mIH1dlO+x7TlcMy+bIDqKPsw/70tVyeHW787goQjhmqaZe10uwLujubK9q9Lg6Fiho1KUKDYz0Z7k7g5/g==", "dev": true, - "license": "MIT", "engines": { "node": ">=4" } }, "node_modules/type-fest": { "version": "0.20.2", + "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.20.2.tgz", + "integrity": "sha512-Ne+eE4r0/iWnpAxD852z3A+N0Bt5RN//NjJwRd2VFHEmrywxf5vsZlh4R6lixl6B+wz/8d+maTSAkN1FIkI3LQ==", "dev": true, - "license": "(MIT OR CC0-1.0)", "engines": { "node": ">=10" }, @@ -15041,28 +16551,29 @@ } }, "node_modules/typed-array-buffer": { - "version": "1.0.2", + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/typed-array-buffer/-/typed-array-buffer-1.0.0.tgz", + "integrity": "sha512-Y8KTSIglk9OZEr8zywiIHG/kmQ7KWyjseXs1CbSo8vC42w7hg2HgYTxSWwP0+is7bWDc1H+Fo026CpHFwm8tkw==", "dev": true, - "license": "MIT", "dependencies": { - "call-bind": "^1.0.7", - "es-errors": "^1.3.0", - "is-typed-array": "^1.1.13" + "call-bind": "^1.0.2", + "get-intrinsic": "^1.2.1", + "is-typed-array": "^1.1.10" }, "engines": { "node": ">= 0.4" } }, "node_modules/typed-array-byte-length": { - "version": "1.0.1", + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/typed-array-byte-length/-/typed-array-byte-length-1.0.0.tgz", + "integrity": "sha512-Or/+kvLxNpeQ9DtSydonMxCx+9ZXOswtwJn17SNLvhptaXYDJvkFFP5zbfU/uLmvnBJlI4yrnXRxpdWH/M5tNA==", "dev": true, - "license": "MIT", "dependencies": { - "call-bind": "^1.0.7", + "call-bind": "^1.0.2", "for-each": "^0.3.3", - "gopd": "^1.0.1", - "has-proto": "^1.0.3", - "is-typed-array": "^1.1.13" + "has-proto": "^1.0.1", + "is-typed-array": "^1.1.10" }, "engines": { "node": ">= 0.4" @@ -15072,16 +16583,16 @@ } }, "node_modules/typed-array-byte-offset": { - "version": "1.0.2", + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/typed-array-byte-offset/-/typed-array-byte-offset-1.0.0.tgz", + "integrity": "sha512-RD97prjEt9EL8YgAgpOkf3O4IF9lhJFr9g0htQkm0rchFp/Vx7LW5Q8fSXXub7BXAODyUQohRMyOc3faCPd0hg==", "dev": true, - "license": "MIT", "dependencies": { - "available-typed-arrays": "^1.0.7", - "call-bind": "^1.0.7", + "available-typed-arrays": "^1.0.5", + "call-bind": "^1.0.2", "for-each": "^0.3.3", - "gopd": "^1.0.1", - "has-proto": "^1.0.3", - "is-typed-array": "^1.1.13" + "has-proto": "^1.0.1", + "is-typed-array": "^1.1.10" }, "engines": { "node": ">= 0.4" @@ -15091,19 +16602,14 @@ } }, "node_modules/typed-array-length": { - "version": "1.0.5", + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/typed-array-length/-/typed-array-length-1.0.4.tgz", + "integrity": "sha512-KjZypGq+I/H7HI5HlOoGHkWUUGq+Q0TPhQurLbyrVrvnKTBgzLhIJ7j6J/XTQOi0d1RjyZ0wdas8bKs2p0x3Ng==", "dev": true, - "license": "MIT", "dependencies": { - "call-bind": "^1.0.7", + "call-bind": "^1.0.2", "for-each": "^0.3.3", - "gopd": "^1.0.1", - "has-proto": "^1.0.3", - "is-typed-array": "^1.1.13", - "possible-typed-array-names": "^1.0.0" - }, - "engines": { - "node": ">= 0.4" + "is-typed-array": "^1.1.9" }, "funding": { "url": "https://github.com/sponsors/ljharb" @@ -15111,13 +16617,15 @@ }, "node_modules/typedarray": { "version": "0.0.6", - "dev": true, - "license": "MIT" + "resolved": "https://registry.npmjs.org/typedarray/-/typedarray-0.0.6.tgz", + "integrity": "sha512-/aCDEGatGvZ2BIk+HmLf4ifCJFwvKFNb9/JeZPMulfgFracn9QFcAf5GO8B/mweUjSoblS5In0cWhqpfs/5PQA==", + "dev": true }, "node_modules/typedoc": { "version": "0.25.11", + "resolved": "https://registry.npmjs.org/typedoc/-/typedoc-0.25.11.tgz", + "integrity": "sha512-5MbI1W/FOG6oXsd8bdssQidSTeKh8Kt3xA5uKVzI+K99uzP8EGN45uPnPvQesyaWdD+89s4wCQdtWEd8QUbiRg==", "dev": true, - "license": "Apache-2.0", "dependencies": { "lunr": "^2.3.9", "marked": "^4.3.0", @@ -15136,16 +16644,18 @@ }, "node_modules/typedoc-plugin-missing-exports": { "version": "2.2.0", + "resolved": "https://registry.npmjs.org/typedoc-plugin-missing-exports/-/typedoc-plugin-missing-exports-2.2.0.tgz", + "integrity": "sha512-2+XR1IcyQ5UwXZVJe9NE6HrLmNufT9i5OwoIuuj79VxuA3eYq+Y6itS9rnNV1D7UeQnUSH8kISYD73gHE5zw+w==", "dev": true, - "license": "MIT", "peerDependencies": { "typedoc": "0.24.x || 0.25.x" } }, "node_modules/typescript": { "version": "5.3.3", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.3.3.tgz", + "integrity": "sha512-pXWcraxM0uxAS+tN0AG/BF2TyqmHO014Z070UsJ+pFvYuRSq8KH8DmWpnbXe0pEPDHXZV3FcAbJkijJ5oNEnWw==", "dev": true, - "license": "Apache-2.0", "bin": { "tsc": "bin/tsc", "tsserver": "bin/tsserver" @@ -15156,8 +16666,9 @@ }, "node_modules/uglify-js": { "version": "3.17.4", + "resolved": "https://registry.npmjs.org/uglify-js/-/uglify-js-3.17.4.tgz", + "integrity": "sha512-T9q82TJI9e/C1TAxYvfb16xO120tMVFZrGA3f9/P4424DNu6ypK103y0GPFVa17yotwSyZW5iYXgjYHkGrJW/g==", "dev": true, - "license": "BSD-2-Clause", "optional": true, "bin": { "uglifyjs": "bin/uglifyjs" @@ -15168,8 +16679,9 @@ }, "node_modules/unbox-primitive": { "version": "1.0.2", + "resolved": "https://registry.npmjs.org/unbox-primitive/-/unbox-primitive-1.0.2.tgz", + "integrity": "sha512-61pPlCD9h51VoreyJ0BReideM3MDKMKnh6+V9L08331ipq6Q8OFXZYiqP6n/tbHx4s5I9uRhcye6BrbkizkBDw==", "dev": true, - "license": "MIT", "dependencies": { "call-bind": "^1.0.2", "has-bigints": "^1.0.2", @@ -15182,12 +16694,14 @@ }, "node_modules/undici-types": { "version": "5.26.5", - "license": "MIT" + "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-5.26.5.tgz", + "integrity": "sha512-JlCMO+ehdEIKqlFxk6IfVoAUVmgz7cU7zD/h9XZ0qzeosSHmUJVOzSQvvYSYWXkFXC+IfLKSIffhv0sVZup6pA==" }, "node_modules/unique-filename": { "version": "3.0.0", + "resolved": "https://registry.npmjs.org/unique-filename/-/unique-filename-3.0.0.tgz", + "integrity": "sha512-afXhuC55wkAmZ0P18QsVE6kp8JaxrEokN2HGIoIVv2ijHQd419H0+6EigAFcIzXeMIkcIkNBpB3L/DXB3cTS/g==", "dev": true, - "license": "ISC", "dependencies": { "unique-slug": "^4.0.0" }, @@ -15197,8 +16711,9 @@ }, "node_modules/unique-slug": { "version": "4.0.0", + "resolved": "https://registry.npmjs.org/unique-slug/-/unique-slug-4.0.0.tgz", + "integrity": "sha512-WrcA6AyEfqDX5bWige/4NQfPZMtASNVxdmWR76WESYQVAACSgWcR6e9i0mofqqBxYFtL4oAxPIptY73/0YE1DQ==", "dev": true, - "license": "ISC", "dependencies": { "imurmurhash": "^0.1.4" }, @@ -15208,21 +16723,24 @@ }, "node_modules/universal-user-agent": { "version": "6.0.1", - "dev": true, - "license": "ISC" + "resolved": "https://registry.npmjs.org/universal-user-agent/-/universal-user-agent-6.0.1.tgz", + "integrity": "sha512-yCzhz6FN2wU1NiiQRogkTQszlQSlpWaw8SvVegAc+bDxbzHgh1vX8uIe8OYyMH6DwH+sdTJsgMl36+mSMdRJIQ==", + "dev": true }, "node_modules/universalify": { "version": "2.0.1", + "resolved": "https://registry.npmjs.org/universalify/-/universalify-2.0.1.tgz", + "integrity": "sha512-gptHNQghINnc/vTGIk0SOFGFNXw7JVrlRUtConJRlvaw6DuX0wO5Jeko9sWrMBhh+PsYAZ7oXAiOnf/UKogyiw==", "dev": true, - "license": "MIT", "engines": { "node": ">= 10.0.0" } }, "node_modules/upath": { "version": "2.0.1", + "resolved": "https://registry.npmjs.org/upath/-/upath-2.0.1.tgz", + "integrity": "sha512-1uEe95xksV1O0CYKXo8vQvN1JEbtJp7lb7C5U9HMsIp6IVwntkH/oNUzyVNQSd4S1sYk2FpSSW44FqMc8qee5w==", "dev": true, - "license": "MIT", "engines": { "node": ">=4", "yarn": "*" @@ -15230,6 +16748,8 @@ }, "node_modules/update-browserslist-db": { "version": "1.0.13", + "resolved": "https://registry.npmjs.org/update-browserslist-db/-/update-browserslist-db-1.0.13.tgz", + "integrity": "sha512-xebP81SNcPuNpPP3uzeW1NYXxI3rxyJzF3pD6sH4jE7o/IX+WtSpwnVU+qIsDPyk0d3hmFQ7mjqc6AtV604hbg==", "dev": true, "funding": [ { @@ -15245,7 +16765,6 @@ "url": "https://github.com/sponsors/ai" } ], - "license": "MIT", "dependencies": { "escalade": "^3.1.1", "picocolors": "^1.0.0" @@ -15259,16 +16778,18 @@ }, "node_modules/uri-js": { "version": "4.4.1", + "resolved": "https://registry.npmjs.org/uri-js/-/uri-js-4.4.1.tgz", + "integrity": "sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg==", "dev": true, - "license": "BSD-2-Clause", "dependencies": { "punycode": "^2.1.0" } }, "node_modules/url": { "version": "0.10.3", + "resolved": "https://registry.npmjs.org/url/-/url-0.10.3.tgz", + "integrity": "sha512-hzSUW2q06EqL1gKM/a+obYHLIO6ct2hwPuviqTTOcfFVc61UbfJ2Q32+uGL/HCPxKqrdGB5QUwIe7UqlDgwsOQ==", "dev": true, - "license": "MIT", "dependencies": { "punycode": "1.3.2", "querystring": "0.2.0" @@ -15276,13 +16797,15 @@ }, "node_modules/url/node_modules/punycode": { "version": "1.3.2", - "dev": true, - "license": "MIT" + "resolved": "https://registry.npmjs.org/punycode/-/punycode-1.3.2.tgz", + "integrity": "sha512-RofWgt/7fL5wP1Y7fxE7/EmTLzQVnB0ycyibJ0OOHIlJqTNzglYFxVwETOcIoJqJmpDXJ9xImDv+Fq34F/d4Dw==", + "dev": true }, "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==", "dev": true, - "license": "MIT", "dependencies": { "inherits": "^2.0.3", "is-arguments": "^1.0.4", @@ -15293,30 +16816,29 @@ }, "node_modules/util-deprecate": { "version": "1.0.2", - "dev": true, - "license": "MIT" + "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", + "integrity": "sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw==", + "dev": true }, "node_modules/uuid": { - "version": "9.0.1", - "dev": true, - "funding": [ - "https://github.com/sponsors/broofa", - "https://github.com/sponsors/ctavan" - ], - "license": "MIT", + "version": "8.3.2", + "resolved": "https://registry.npmjs.org/uuid/-/uuid-8.3.2.tgz", + "integrity": "sha512-+NYs2QeMWy+GWFOEm9xnn6HCDp0l7QBD7ml8zLUmJ+93Q5NF0NocErnwkTkXVFNiX3/fpC6afS8Dhb/gz7R7eg==", "bin": { "uuid": "dist/bin/uuid" } }, "node_modules/v8-compile-cache-lib": { "version": "3.0.1", - "dev": true, - "license": "MIT" + "resolved": "https://registry.npmjs.org/v8-compile-cache-lib/-/v8-compile-cache-lib-3.0.1.tgz", + "integrity": "sha512-wa7YjyUGfNZngI/vtK0UHAN+lgDCxBPCylVXGp0zu59Fz5aiGtNXaq3DhIov063MorB+VfufLh3JlF2KdTK3xg==", + "dev": true }, "node_modules/v8-to-istanbul": { "version": "9.2.0", + "resolved": "https://registry.npmjs.org/v8-to-istanbul/-/v8-to-istanbul-9.2.0.tgz", + "integrity": "sha512-/EH/sDgxU2eGxajKdwLCDmQ4FWq+kpi3uCmBGpw1xJtnAxEjlD8j8PEiGWpCIMIs3ciNAgH0d3TTJiUkYzyZjA==", "dev": true, - "license": "ISC", "dependencies": { "@jridgewell/trace-mapping": "^0.3.12", "@types/istanbul-lib-coverage": "^2.0.1", @@ -15328,8 +16850,9 @@ }, "node_modules/validate-npm-package-license": { "version": "3.0.4", + "resolved": "https://registry.npmjs.org/validate-npm-package-license/-/validate-npm-package-license-3.0.4.tgz", + "integrity": "sha512-DpKm2Ui/xN7/HQKCtpZxoRWBhZ9Z0kqtygG8XCgNQ8ZlDnxuQmWhj566j8fN4Cu3/JmbhsDo7fcAJq4s9h27Ew==", "dev": true, - "license": "Apache-2.0", "dependencies": { "spdx-correct": "^3.0.0", "spdx-expression-parse": "^3.0.0" @@ -15337,8 +16860,9 @@ }, "node_modules/validate-npm-package-name": { "version": "5.0.0", + "resolved": "https://registry.npmjs.org/validate-npm-package-name/-/validate-npm-package-name-5.0.0.tgz", + "integrity": "sha512-YuKoXDAhBYxY7SfOKxHBDoSyENFeW5VvIIQp2TGQuit8gpK6MnWaQelBKxso72DoxTZfZdcP3W90LqpSkgPzLQ==", "dev": true, - "license": "ISC", "dependencies": { "builtins": "^5.0.0" }, @@ -15348,39 +16872,45 @@ }, "node_modules/vscode-oniguruma": { "version": "1.7.0", - "dev": true, - "license": "MIT" + "resolved": "https://registry.npmjs.org/vscode-oniguruma/-/vscode-oniguruma-1.7.0.tgz", + "integrity": "sha512-L9WMGRfrjOhgHSdOYgCt/yRMsXzLDJSL7BPrOZt73gU0iWO4mpqzqQzOz5srxqTvMBaR0XZTSrVWo4j55Rc6cA==", + "dev": true }, "node_modules/vscode-textmate": { "version": "8.0.0", - "dev": true, - "license": "MIT" + "resolved": "https://registry.npmjs.org/vscode-textmate/-/vscode-textmate-8.0.0.tgz", + "integrity": "sha512-AFbieoL7a5LMqcnOF04ji+rpXadgOXnZsxQr//r83kLPr7biP7am3g9zbaZIaBGwBRWeSvoMD4mgPdX3e4NWBg==", + "dev": true }, "node_modules/walker": { "version": "1.0.8", + "resolved": "https://registry.npmjs.org/walker/-/walker-1.0.8.tgz", + "integrity": "sha512-ts/8E8l5b7kY0vlWLewOkDXMmPdLcVV4GmOQLyxuSswIJsweeFZtAsMF7k1Nszz+TYBQrlYRmzOnr398y1JemQ==", "dev": true, - "license": "Apache-2.0", "dependencies": { "makeerror": "1.0.12" } }, "node_modules/wcwidth": { "version": "1.0.1", + "resolved": "https://registry.npmjs.org/wcwidth/-/wcwidth-1.0.1.tgz", + "integrity": "sha512-XHPEwS0q6TaxcvG85+8EYkbiCux2XtWG2mkc47Ng2A77BQu9+DqIOJldST4HgPkuea7dvKSj5VgX3P1d4rW8Tg==", "dev": true, - "license": "MIT", "dependencies": { "defaults": "^1.0.3" } }, "node_modules/webidl-conversions": { "version": "3.0.1", - "dev": true, - "license": "BSD-2-Clause" + "resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-3.0.1.tgz", + "integrity": "sha512-2JAn3z8AR6rjK8Sm8orRC0h/bcl/DqL7tRPdGZ4I1CjdF+EaMLmYxBHyXuKL849eucPFhvBoxMsflfOb8kxaeQ==", + "dev": true }, "node_modules/whatwg-url": { "version": "5.0.0", + "resolved": "https://registry.npmjs.org/whatwg-url/-/whatwg-url-5.0.0.tgz", + "integrity": "sha512-saE57nupxk6v3HY35+jzBwYa0rKSy0XR8JSxZPwgLr7ys0IBzhGviA1/TUGJLmSVqs8pb9AnvICXEuOHLprYTw==", "dev": true, - "license": "MIT", "dependencies": { "tr46": "~0.0.3", "webidl-conversions": "^3.0.0" @@ -15388,8 +16918,9 @@ }, "node_modules/which": { "version": "2.0.2", + "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz", + "integrity": "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==", "dev": true, - "license": "ISC", "dependencies": { "isexe": "^2.0.0" }, @@ -15402,8 +16933,9 @@ }, "node_modules/which-boxed-primitive": { "version": "1.0.2", + "resolved": "https://registry.npmjs.org/which-boxed-primitive/-/which-boxed-primitive-1.0.2.tgz", + "integrity": "sha512-bwZdv0AKLpplFY2KZRX6TvyuN7ojjr7lwkg6ml0roIy9YeuSr7JS372qlNW18UQYzgYK9ziGcerWqZOmEn9VNg==", "dev": true, - "license": "MIT", "dependencies": { "is-bigint": "^1.0.1", "is-boolean-object": "^1.1.0", @@ -15416,15 +16948,16 @@ } }, "node_modules/which-typed-array": { - "version": "1.1.14", + "version": "1.1.13", + "resolved": "https://registry.npmjs.org/which-typed-array/-/which-typed-array-1.1.13.tgz", + "integrity": "sha512-P5Nra0qjSncduVPEAr7xhoF5guty49ArDTwzJ/yNuPIbZppyRxFQsRCWrocxIY+CnMVG+qfbU2FmDKyvSGClow==", "dev": true, - "license": "MIT", "dependencies": { - "available-typed-arrays": "^1.0.6", - "call-bind": "^1.0.5", + "available-typed-arrays": "^1.0.5", + "call-bind": "^1.0.4", "for-each": "^0.3.3", "gopd": "^1.0.1", - "has-tostringtag": "^1.0.1" + "has-tostringtag": "^1.0.0" }, "engines": { "node": ">= 0.4" @@ -15435,21 +16968,24 @@ }, "node_modules/wide-align": { "version": "1.1.5", + "resolved": "https://registry.npmjs.org/wide-align/-/wide-align-1.1.5.tgz", + "integrity": "sha512-eDMORYaPNZ4sQIuuYPDHdQvf4gyCF9rEEV/yPxGfwPkRodwEgiMUUXTx/dex+Me0wxx53S+NgUHaP7y3MGlDmg==", "dev": true, - "license": "ISC", "dependencies": { "string-width": "^1.0.2 || 2 || 3 || 4" } }, "node_modules/wordwrap": { "version": "1.0.0", - "dev": true, - "license": "MIT" + "resolved": "https://registry.npmjs.org/wordwrap/-/wordwrap-1.0.0.tgz", + "integrity": "sha512-gvVzJFlPycKc5dZN4yPkP8w7Dc37BtP1yczEneOb4uq34pXZcvrtRTmWV8W+Ume+XCxKgbjM+nevkyFPMybd4Q==", + "dev": true }, "node_modules/wrap-ansi": { "version": "6.2.0", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-6.2.0.tgz", + "integrity": "sha512-r6lPcBGxZXlIcymEu7InxDMhdW0KDxpLgoFLcguasxCaJ/SOIZwINatK9KY/tf+ZrlywOKU0UDj3ATXUBfxJXA==", "dev": true, - "license": "MIT", "dependencies": { "ansi-styles": "^4.0.0", "string-width": "^4.1.0", @@ -15462,8 +16998,9 @@ "node_modules/wrap-ansi-cjs": { "name": "wrap-ansi", "version": "7.0.0", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz", + "integrity": "sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==", "dev": true, - "license": "MIT", "dependencies": { "ansi-styles": "^4.0.0", "string-width": "^4.1.0", @@ -15478,13 +17015,15 @@ }, "node_modules/wrappy": { "version": "1.0.2", - "dev": true, - "license": "ISC" + "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", + "integrity": "sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==", + "dev": true }, "node_modules/write-file-atomic": { "version": "4.0.2", + "resolved": "https://registry.npmjs.org/write-file-atomic/-/write-file-atomic-4.0.2.tgz", + "integrity": "sha512-7KxauUdBmSdWnmpaGFg+ppNjKF8uNLry8LyzjauQDOVONfFLNKrKvQOxZ/VuTIcS/gge/YNahf5RIIQWTSarlg==", "dev": true, - "license": "ISC", "dependencies": { "imurmurhash": "^0.1.4", "signal-exit": "^3.0.7" @@ -15495,8 +17034,9 @@ }, "node_modules/write-json-file": { "version": "3.2.0", + "resolved": "https://registry.npmjs.org/write-json-file/-/write-json-file-3.2.0.tgz", + "integrity": "sha512-3xZqT7Byc2uORAatYiP3DHUUAVEkNOswEWNs9H5KXiicRTvzYzYqKjYc4G7p+8pltvAw641lVByKVtMpf+4sYQ==", "dev": true, - "license": "MIT", "dependencies": { "detect-indent": "^5.0.0", "graceful-fs": "^4.1.15", @@ -15511,8 +17051,9 @@ }, "node_modules/write-json-file/node_modules/make-dir": { "version": "2.1.0", + "resolved": "https://registry.npmjs.org/make-dir/-/make-dir-2.1.0.tgz", + "integrity": "sha512-LS9X+dc8KLxXCb8dni79fLIIUA5VyZoyjSMCwTluaXA0o27cCK0bhXkpgw+sTXVpPy/lSO57ilRixqk0vDmtRA==", "dev": true, - "license": "MIT", "dependencies": { "pify": "^4.0.1", "semver": "^5.6.0" @@ -15523,24 +17064,27 @@ }, "node_modules/write-json-file/node_modules/pify": { "version": "4.0.1", + "resolved": "https://registry.npmjs.org/pify/-/pify-4.0.1.tgz", + "integrity": "sha512-uB80kBFb/tfd68bVleG9T5GGsGPjJrLAUpR5PZIrhBnIaRTQRjqdJSsIKkOP6OAIFbj7GOrcudc5pNjZ+geV2g==", "dev": true, - "license": "MIT", "engines": { "node": ">=6" } }, "node_modules/write-json-file/node_modules/semver": { "version": "5.7.2", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.2.tgz", + "integrity": "sha512-cBznnQ9KjJqU67B52RMC65CMarK2600WFnbkcaiwWq3xy/5haFJlshgnpjovMVJ+Hff49d8GEn0b87C5pDQ10g==", "dev": true, - "license": "ISC", "bin": { "semver": "bin/semver" } }, "node_modules/write-json-file/node_modules/write-file-atomic": { "version": "2.4.3", + "resolved": "https://registry.npmjs.org/write-file-atomic/-/write-file-atomic-2.4.3.tgz", + "integrity": "sha512-GaETH5wwsX+GcnzhPgKcKjJ6M2Cq3/iZp1WyY/X1CSqrW+jVNM9Y7D8EC2sM4ZG/V8wZlSniJnCKWPmBYAucRQ==", "dev": true, - "license": "ISC", "dependencies": { "graceful-fs": "^4.1.11", "imurmurhash": "^0.1.4", @@ -15549,8 +17093,9 @@ }, "node_modules/write-pkg": { "version": "4.0.0", + "resolved": "https://registry.npmjs.org/write-pkg/-/write-pkg-4.0.0.tgz", + "integrity": "sha512-v2UQ+50TNf2rNHJ8NyWttfm/EJUBWMJcx6ZTYZr6Qp52uuegWw/lBkCtCbnYZEmPRNL61m+u67dAmGxo+HTULA==", "dev": true, - "license": "MIT", "dependencies": { "sort-keys": "^2.0.0", "type-fest": "^0.4.1", @@ -15562,16 +17107,18 @@ }, "node_modules/write-pkg/node_modules/type-fest": { "version": "0.4.1", + "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.4.1.tgz", + "integrity": "sha512-IwzA/LSfD2vC1/YDYMv/zHP4rDF1usCwllsDpbolT3D4fUepIO7f9K70jjmUewU/LmGUKJcwcVtDCpnKk4BPMw==", "dev": true, - "license": "(MIT OR CC0-1.0)", "engines": { "node": ">=6" } }, "node_modules/xml2js": { "version": "0.6.2", + "resolved": "https://registry.npmjs.org/xml2js/-/xml2js-0.6.2.tgz", + "integrity": "sha512-T4rieHaC1EXcES0Kxxj4JWgaUQHDk+qwHcYOCFHfiwKz7tOVPLq7Hjq9dM1WCMhylqMEfP7hMcOIChvotiZegA==", "dev": true, - "license": "MIT", "dependencies": { "sax": ">=0.6.0", "xmlbuilder": "~11.0.0" @@ -15582,45 +17129,51 @@ }, "node_modules/xmlbuilder": { "version": "11.0.1", + "resolved": "https://registry.npmjs.org/xmlbuilder/-/xmlbuilder-11.0.1.tgz", + "integrity": "sha512-fDlsI/kFEx7gLvbecc0/ohLG50fugQp8ryHzMTuW9vSa1GJ0XYWKnhsUx7oie3G98+r56aTQIUB4kht42R3JvA==", "dev": true, - "license": "MIT", "engines": { "node": ">=4.0" } }, "node_modules/xtend": { "version": "4.0.2", + "resolved": "https://registry.npmjs.org/xtend/-/xtend-4.0.2.tgz", + "integrity": "sha512-LKYU1iAXJXUgAXn9URjiu+MWhyUXHsvfp7mcuYm9dSUKK0/CjtrUwFAxD82/mCWbtLsGjFIad0wIsod4zrTAEQ==", "dev": true, - "license": "MIT", "engines": { "node": ">=0.4" } }, "node_modules/y18n": { "version": "5.0.8", + "resolved": "https://registry.npmjs.org/y18n/-/y18n-5.0.8.tgz", + "integrity": "sha512-0pfFzegeDWJHJIAmTLRP2DwHjdF5s7jo9tuztdQxAhINCdvS+3nGINqPd00AphqJR/0LhANUS6/+7SCb98YOfA==", "dev": true, - "license": "ISC", "engines": { "node": ">=10" } }, "node_modules/yallist": { "version": "3.1.1", - "dev": true, - "license": "ISC" + "resolved": "https://registry.npmjs.org/yallist/-/yallist-3.1.1.tgz", + "integrity": "sha512-a4UGQaWPH59mOXUYnAG2ewncQS4i4F43Tv3JoAM+s2VDAmS9NsK8GpDMLrCHPksFT7h3K6TOoUNn2pb7RoXx4g==", + "dev": true }, "node_modules/yaml": { "version": "2.3.4", + "resolved": "https://registry.npmjs.org/yaml/-/yaml-2.3.4.tgz", + "integrity": "sha512-8aAvwVUSHpfEqTQ4w/KMlf3HcRdt50E5ODIQJBw1fQ5RL34xabzxtUlzTXVqc4rkZsPbvrXKWnABCD7kWSmocA==", "dev": true, - "license": "ISC", "engines": { "node": ">= 14" } }, "node_modules/yargs": { "version": "17.7.2", + "resolved": "https://registry.npmjs.org/yargs/-/yargs-17.7.2.tgz", + "integrity": "sha512-7dSzzRQ++CKnNI/krKnYRV7JKKPUXMEh61soaHKg9mrWEhzFWhFnxPxGl+69cD1Ou63C13NUPCnmIcrvqCuM6w==", "dev": true, - "license": "MIT", "dependencies": { "cliui": "^8.0.1", "escalade": "^3.1.1", @@ -15636,24 +17189,27 @@ }, "node_modules/yargs-parser": { "version": "21.1.1", + "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-21.1.1.tgz", + "integrity": "sha512-tVpsJW7DdjecAiFpbIB1e3qxIQsE6NoPc5/eTdrbbIC4h0LVsWhnoa3g+m2HclBIujHzsxZ4VJVA+GUuc2/LBw==", "dev": true, - "license": "ISC", "engines": { "node": ">=12" } }, "node_modules/yn": { "version": "3.1.1", + "resolved": "https://registry.npmjs.org/yn/-/yn-3.1.1.tgz", + "integrity": "sha512-Ux4ygGWsu2c7isFWe8Yu1YluJmqVhxqK2cLXNQA5AcC3QfbGNpM7fu0Y8b/z16pXLnFxZYvWhd3fhBY9DLmC6Q==", "dev": true, - "license": "MIT", "engines": { "node": ">=6" } }, "node_modules/yocto-queue": { "version": "0.1.0", + "resolved": "https://registry.npmjs.org/yocto-queue/-/yocto-queue-0.1.0.tgz", + "integrity": "sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q==", "dev": true, - "license": "MIT", "engines": { "node": ">=10" }, @@ -15663,7 +17219,8 @@ }, "node_modules/zod": { "version": "3.22.4", - "license": "MIT", + "resolved": "https://registry.npmjs.org/zod/-/zod-3.22.4.tgz", + "integrity": "sha512-iC+8Io04lddc+mVqQ9AZ7OQ2MrUKGN+oIQyq1vemgt46jwCwLfhq7/pwnBnNXXXZb8VTVLKwp9EDkx+ryxIWmg==", "peer": true, "funding": { "url": "https://github.com/sponsors/colinhacks" @@ -15810,7 +17367,6 @@ } }, "packages/parser": { - "name": "@aws-lambda-powertools/parser", "version": "0.0.0", "license": "MIT-0", "devDependencies": { diff --git a/packages/parser/package.json b/packages/parser/package.json index fb4b54fe51..947b633e19 100644 --- a/packages/parser/package.json +++ b/packages/parser/package.json @@ -37,6 +37,42 @@ "types": "./lib/esm/index.d.ts", "default": "./lib/esm/index.js" } + }, + "./middleware": { + "require": "./lib/cjs/middleware/parser.js", + "import": "./lib/esm/middleware/parser.js" + }, + "./schemas": { + "require": "./lib/cjs/schemas/index.js", + "import": "./lib/esm/schemas/index.js" + }, + "./envelopes": { + "require": "./lib/cjs/envelopes/index.js", + "import": "./lib/esm/envelopes/index.js" + }, + "./types": { + "require": "./lib/cjs/types/index.js", + "import": "./lib/esm/types/index.js" + } + }, + "typesVersions": { + "*": { + "types": [ + "./lib/cjs/types/index.d.ts", + "./lib/esm/types/index.d.ts" + ], + "middleware": [ + "./lib/cjs/middleware/parser.d.ts", + "./lib/esm/middleware/parser.d.ts" + ], + "schemas": [ + "./lib/cjs/schemas/index.d.ts", + "./lib/esm/schemas/index.d.ts" + ], + "envelopes": [ + "./lib/cjs/envelopes/index.d.ts", + "./lib/esm/envelopes/index.d.ts" + ] } }, "main": "./lib/cjs/index.js", diff --git a/packages/parser/src/envelopes/index.ts b/packages/parser/src/envelopes/index.ts new file mode 100644 index 0000000000..dd28c4aeea --- /dev/null +++ b/packages/parser/src/envelopes/index.ts @@ -0,0 +1,13 @@ +export { apiGatewayEnvelope } from './apigw.js'; +export { apiGatewayV2Envelope } from './apigwv2.js'; +export { cloudWatchEnvelope } from './cloudwatch.js'; +export { dynamoDDStreamEnvelope } from './dynamodb.js'; +export { eventBridgeEnvelope } from './event-bridge.js'; +export { kafkaEnvelope } from './kafka.js'; +export { kinesisEnvelope } from './kinesis.js'; +export { kinesisFirehoseEnvelope } from './kinesis-firehose.js'; +export { lambdaFunctionUrlEnvelope } from './lambda.js'; +export { snsEnvelope, snsSqsEnvelope } from './sns.js'; +export { sqsEnvelope } from './sqs.js'; +export { vpcLatticeEnvelope } from './vpc-lattice.js'; +export { vpcLatticeV2Envelope } from './vpc-latticev2.js'; diff --git a/packages/parser/src/index.ts b/packages/parser/src/index.ts index e69de29bb2..bb7ee75eb5 100644 --- a/packages/parser/src/index.ts +++ b/packages/parser/src/index.ts @@ -0,0 +1 @@ +export { parser } from './parser.js'; diff --git a/packages/parser/src/parser.ts b/packages/parser/src/parser.ts index c3ba727ae3..1320b643a8 100644 --- a/packages/parser/src/parser.ts +++ b/packages/parser/src/parser.ts @@ -31,7 +31,7 @@ import { type ParserOptions } from './types/ParserOptions.js'; * * @param options */ -const parser = ( +export const parser = ( options: ParserOptions ): HandlerMethodDecorator => { return (_target, _propertyKey, descriptor) => { @@ -55,5 +55,3 @@ const parser = ( return descriptor; }; }; - -export { parser }; diff --git a/packages/parser/src/schemas/index.ts b/packages/parser/src/schemas/index.ts new file mode 100644 index 0000000000..ff56350195 --- /dev/null +++ b/packages/parser/src/schemas/index.ts @@ -0,0 +1,33 @@ +export { AlbSchema, AlbMultiValueHeadersSchema } from './alb.js'; +export { APIGatewayProxyEventSchema } from './apigw.js'; +export { APIGatewayProxyEventV2Schema } from './apigwv2.js'; +export { + CloudFormationCustomResourceCreateSchema, + CloudFormationCustomResourceDeleteSchema, + CloudFormationCustomResourceUpdateSchema, +} from './cloudformation-custom-resource.js'; +export { + CloudWatchLogEventSchema, + CloudWatchLogsDecodeSchema, + CloudWatchLogsSchema, +} from './cloudwatch.js'; +export { DynamoDBStreamSchema } from './dynamodb.js'; +export { EventBridgeSchema } from './eventbridge.js'; +export { KafkaMskEventSchema, KafkaSelfManagedEventSchema } from './kafka.js'; +export { KinesisDataStreamSchema } from './kinesis.js'; +export { + KinesisFirehoseSchema, + KinesisFirehoseSqsSchema, +} from './kinesis-firehose.js'; +export { LambdaFunctionUrlSchema } from './lambda.js'; +export { + S3SqsEventNotificationSchema, + S3EventNotificationEventBridgeSchema, + S3ObjectLambdaEventSchema, + S3Schema, +} from './s3.js'; +export { SesSchema } from './ses.js'; +export { SnsSchema } from './sns.js'; +export { SqsSchema } from './sqs.js'; +export { VpcLatticeSchema } from './vpc-lattice.js'; +export { VpcLatticeV2Schema } from './vpc-latticev2.js'; diff --git a/packages/parser/src/types/ParserOptions.ts b/packages/parser/src/types/ParserOptions.ts index efdf91cf95..57fcb9beca 100644 --- a/packages/parser/src/types/ParserOptions.ts +++ b/packages/parser/src/types/ParserOptions.ts @@ -1,9 +1,7 @@ import type { ZodSchema } from 'zod'; import { Envelope } from './envelope.js'; -type ParserOptions = { +export type ParserOptions = { schema: S; envelope?: Envelope; }; - -export { type ParserOptions }; diff --git a/packages/parser/src/types/index.ts b/packages/parser/src/types/index.ts index e69de29bb2..d1c8e6fc13 100644 --- a/packages/parser/src/types/index.ts +++ b/packages/parser/src/types/index.ts @@ -0,0 +1,31 @@ +export type { ParserOptions } from './ParserOptions.js'; +export type { Envelope } from './envelope.js'; + +export type { + ALBEvent, + APIGatewayProxyEvent, + ALBMultiValueHeadersEvent, + APIGatewayProxyEventV2, + S3Event, + S3EventNotificationEventBridge, + S3SqsEventNotification, + SnsEvent, + SqsEvent, + DynamoDBStreamEvent, + CloudWatchLogsEvent, + CloudFormationCustomResourceCreateEvent, + CloudFormationCustomResourceDeleteEvent, + CloudFormationCustomResourceUpdateEvent, + EventBridgeEvent, + KafkaSelfManagedEvent, + KafkaMskEvent, + KinesisDataStreamEvent, + KinesisDataStreamRecord, + KinesisDataStreamRecordPayload, + KinesisFireHoseEvent, + KinesisFireHoseSqsEvent, + LambdaFunctionUrlEvent, + SesEvent, + VpcLatticeEvent, + VpcLatticeEventV2, +} from './schema.js'; diff --git a/packages/parser/tests/unit/envelopes/apigwt.test.ts b/packages/parser/tests/unit/envelopes/apigwt.test.ts index b50e18b439..03417fcc67 100644 --- a/packages/parser/tests/unit/envelopes/apigwt.test.ts +++ b/packages/parser/tests/unit/envelopes/apigwt.test.ts @@ -6,8 +6,8 @@ import { generateMock } from '@anatine/zod-mock'; import { TestEvents, TestSchema } from '../schema/utils.js'; -import { APIGatewayProxyEvent } from '../../../src/types/schema.js'; -import { apiGatewayEnvelope } from '../../../src/envelopes/apigw'; +import { APIGatewayProxyEvent } from '../../../src/types/'; +import { apiGatewayEnvelope } from '../../../src/envelopes/'; describe('ApigwEnvelope ', () => { it('should parse custom schema in envelope', () => { diff --git a/packages/parser/tests/unit/envelopes/apigwv2.test.ts b/packages/parser/tests/unit/envelopes/apigwv2.test.ts index acf7ee815b..0d2d225bf1 100644 --- a/packages/parser/tests/unit/envelopes/apigwv2.test.ts +++ b/packages/parser/tests/unit/envelopes/apigwv2.test.ts @@ -7,7 +7,7 @@ import { TestEvents, TestSchema } from '../schema/utils.js'; import { generateMock } from '@anatine/zod-mock'; import { APIGatewayProxyEventV2 } from 'aws-lambda'; -import { apiGatewayV2Envelope } from '../../../src/envelopes/apigwv2'; +import { apiGatewayV2Envelope } from '../../../src/envelopes/'; describe('ApiGwV2Envelope ', () => { it('should parse custom schema in envelope', () => { diff --git a/packages/parser/tests/unit/envelopes/cloudwatch.test.ts b/packages/parser/tests/unit/envelopes/cloudwatch.test.ts index 3258768b5a..e47d85f26d 100644 --- a/packages/parser/tests/unit/envelopes/cloudwatch.test.ts +++ b/packages/parser/tests/unit/envelopes/cloudwatch.test.ts @@ -9,9 +9,9 @@ import { gzipSync } from 'node:zlib'; import { CloudWatchLogEventSchema, CloudWatchLogsDecodeSchema, -} from '../../../src/schemas/cloudwatch.js'; +} from '../../../src/schemas/'; import { TestSchema } from '../schema/utils.js'; -import { cloudWatchEnvelope } from '../../../src/envelopes/cloudwatch'; +import { cloudWatchEnvelope } from '../../../src/envelopes/'; describe('CloudWatch', () => { it('should parse custom schema in envelope', () => { diff --git a/packages/parser/tests/unit/envelopes/dynamodb.test.ts b/packages/parser/tests/unit/envelopes/dynamodb.test.ts index 342ad474e3..0c9c940daf 100644 --- a/packages/parser/tests/unit/envelopes/dynamodb.test.ts +++ b/packages/parser/tests/unit/envelopes/dynamodb.test.ts @@ -8,7 +8,7 @@ import { generateMock } from '@anatine/zod-mock'; import { TestEvents } from '../schema/utils.js'; import { DynamoDBStreamEvent } from 'aws-lambda'; import { z } from 'zod'; -import { dynamoDDStreamEnvelope } from '../../../src/envelopes/dynamodb'; +import { dynamoDDStreamEnvelope } from '../../../src/envelopes/'; describe('DynamoDB', () => { const schema = z.object({ diff --git a/packages/parser/tests/unit/envelopes/eventbridge.test.ts b/packages/parser/tests/unit/envelopes/eventbridge.test.ts index 8212e77d9f..5baaf12f9f 100644 --- a/packages/parser/tests/unit/envelopes/eventbridge.test.ts +++ b/packages/parser/tests/unit/envelopes/eventbridge.test.ts @@ -7,7 +7,7 @@ import { TestEvents, TestSchema } from '../schema/utils.js'; import { generateMock } from '@anatine/zod-mock'; import { EventBridgeEvent } from 'aws-lambda'; -import { eventBridgeEnvelope } from '../../../src/envelopes/event-bridge.js'; +import { eventBridgeEnvelope } from '../../../src/envelopes/'; describe('EventBridgeEnvelope ', () => { it('should parse eventbridge event', () => { diff --git a/packages/parser/tests/unit/envelopes/kafka.test.ts b/packages/parser/tests/unit/envelopes/kafka.test.ts index 57e43a584f..37657bf93a 100644 --- a/packages/parser/tests/unit/envelopes/kafka.test.ts +++ b/packages/parser/tests/unit/envelopes/kafka.test.ts @@ -7,7 +7,7 @@ import { generateMock } from '@anatine/zod-mock'; import { TestEvents, TestSchema } from '../schema/utils.js'; import { MSKEvent, SelfManagedKafkaEvent } from 'aws-lambda'; -import { kafkaEnvelope } from '../../../src/envelopes/kafka'; +import { kafkaEnvelope } from '../../../src/envelopes/'; describe('Kafka', () => { it('should parse MSK kafka envelope', () => { diff --git a/packages/parser/tests/unit/envelopes/kinesis-firehose.test.ts b/packages/parser/tests/unit/envelopes/kinesis-firehose.test.ts index 581785d99f..65c7be5fd5 100644 --- a/packages/parser/tests/unit/envelopes/kinesis-firehose.test.ts +++ b/packages/parser/tests/unit/envelopes/kinesis-firehose.test.ts @@ -6,9 +6,9 @@ import { TestEvents, TestSchema } from '../schema/utils.js'; import { generateMock } from '@anatine/zod-mock'; -import { KinesisFirehoseSchema } from '../../../src/schemas/kinesis-firehose.js'; +import { KinesisFirehoseSchema } from '../../../src/schemas/'; import { z } from 'zod'; -import { kinesisFirehoseEnvelope } from '../../../src/envelopes/kinesis-firehose'; +import { kinesisFirehoseEnvelope } from '../../../src/envelopes/'; describe('Kinesis Firehose Envelope', () => { it('should parse records for PutEvent', () => { diff --git a/packages/parser/tests/unit/envelopes/kinesis.test.ts b/packages/parser/tests/unit/envelopes/kinesis.test.ts index 6395cf9803..67dfc464eb 100644 --- a/packages/parser/tests/unit/envelopes/kinesis.test.ts +++ b/packages/parser/tests/unit/envelopes/kinesis.test.ts @@ -7,7 +7,7 @@ import { generateMock } from '@anatine/zod-mock'; import { KinesisStreamEvent } from 'aws-lambda'; import { TestEvents, TestSchema } from '../schema/utils.js'; -import { kinesisEnvelope } from '../../../src/envelopes/kinesis'; +import { kinesisEnvelope } from '../../../src/envelopes/'; describe('Kinesis', () => { it('should parse Kinesis Stream event', () => { diff --git a/packages/parser/tests/unit/envelopes/lambda.test.ts b/packages/parser/tests/unit/envelopes/lambda.test.ts index f00411e8b3..1cf6e20cea 100644 --- a/packages/parser/tests/unit/envelopes/lambda.test.ts +++ b/packages/parser/tests/unit/envelopes/lambda.test.ts @@ -7,7 +7,7 @@ import { TestEvents, TestSchema } from '../schema/utils.js'; import { generateMock } from '@anatine/zod-mock'; import { APIGatewayProxyEventV2 } from 'aws-lambda'; -import { lambdaFunctionUrlEnvelope } from '../../../src/envelopes/lambda'; +import { lambdaFunctionUrlEnvelope } from '../../../src/envelopes/'; describe('Lambda Functions Url ', () => { it('should parse custom schema in envelope', () => { diff --git a/packages/parser/tests/unit/envelopes/sns.test.ts b/packages/parser/tests/unit/envelopes/sns.test.ts index 3a380303ed..0bf36c94c0 100644 --- a/packages/parser/tests/unit/envelopes/sns.test.ts +++ b/packages/parser/tests/unit/envelopes/sns.test.ts @@ -8,7 +8,7 @@ import { z } from 'zod'; import { generateMock } from '@anatine/zod-mock'; import { SNSEvent, SQSEvent } from 'aws-lambda'; import { TestEvents, TestSchema } from '../schema/utils.js'; -import { snsEnvelope, snsSqsEnvelope } from '../../../src/envelopes/sns'; +import { snsEnvelope, snsSqsEnvelope } from '../../../src/envelopes/'; describe('SNS Envelope', () => { it('should parse custom schema in envelope', () => { diff --git a/packages/parser/tests/unit/envelopes/sqs.test.ts b/packages/parser/tests/unit/envelopes/sqs.test.ts index 4fb775433f..7725e1a992 100644 --- a/packages/parser/tests/unit/envelopes/sqs.test.ts +++ b/packages/parser/tests/unit/envelopes/sqs.test.ts @@ -7,7 +7,7 @@ import { generateMock } from '@anatine/zod-mock'; import { TestEvents, TestSchema } from '../schema/utils.js'; import { SQSEvent } from 'aws-lambda'; -import { sqsEnvelope } from '../../../src/envelopes/sqs'; +import { sqsEnvelope } from '../../../src/envelopes/'; describe('SqsEnvelope ', () => { it('should parse custom schema in envelope', () => { diff --git a/packages/parser/tests/unit/envelopes/vpc-lattice.test.ts b/packages/parser/tests/unit/envelopes/vpc-lattice.test.ts index a3b1b0f6c4..7ce781100e 100644 --- a/packages/parser/tests/unit/envelopes/vpc-lattice.test.ts +++ b/packages/parser/tests/unit/envelopes/vpc-lattice.test.ts @@ -6,9 +6,9 @@ import { generateMock } from '@anatine/zod-mock'; import { TestEvents, TestSchema } from '../schema/utils.js'; -import { VpcLatticeSchema } from '../../../src/schemas/vpc-lattice.js'; +import { VpcLatticeSchema } from '../../../src/schemas/'; import { z } from 'zod'; -import { vpcLatticeEnvelope } from '../../../src/envelopes/vpc-lattice'; +import { vpcLatticeEnvelope } from '../../../src/envelopes/'; describe('VPC Lattice envelope', () => { it('should parse VPC Lattice event', () => { diff --git a/packages/parser/tests/unit/envelopes/vpc-latticev2.test.ts b/packages/parser/tests/unit/envelopes/vpc-latticev2.test.ts index 207dedb2da..251382fb87 100644 --- a/packages/parser/tests/unit/envelopes/vpc-latticev2.test.ts +++ b/packages/parser/tests/unit/envelopes/vpc-latticev2.test.ts @@ -5,10 +5,10 @@ */ import { generateMock } from '@anatine/zod-mock'; -import { VpcLatticeSchema } from '../../../src/schemas/vpc-lattice.js'; +import { VpcLatticeSchema } from '../../../src/schemas/'; import { z } from 'zod'; import { TestEvents, TestSchema } from '../schema/utils.js'; -import { vpcLatticeV2Envelope } from '../../../src/envelopes/vpc-latticev2'; +import { vpcLatticeV2Envelope } from '../../../src/envelopes/'; describe('VPC Lattice envelope', () => { it('should parse VPC Lattice event', () => { diff --git a/packages/parser/tests/unit/parser.decorator.test.ts b/packages/parser/tests/unit/parser.decorator.test.ts index eba2a3b59b..11df5d6703 100644 --- a/packages/parser/tests/unit/parser.decorator.test.ts +++ b/packages/parser/tests/unit/parser.decorator.test.ts @@ -4,13 +4,13 @@ * @group unit/parser */ -import { LambdaInterface } from '@aws-lambda-powertools/commons/lib/esm/types'; +import type { LambdaInterface } from '@aws-lambda-powertools/commons/lib/esm/types'; import { Context, EventBridgeEvent } from 'aws-lambda'; -import { parser } from '../../src/parser'; +import { parser } from '../../src/index.js'; import { TestSchema, TestEvents } from './schema/utils'; import { generateMock } from '@anatine/zod-mock'; -import { eventBridgeEnvelope } from '../../src/envelopes/event-bridge'; -import { EventBridgeSchema } from '../../src/schemas/eventbridge'; +import { eventBridgeEnvelope } from '../../src/envelopes/index.js'; +import { EventBridgeSchema } from '../../src/schemas/index.js'; import { z } from 'zod'; describe('Parser Decorator', () => { diff --git a/packages/parser/tests/unit/parser.middy.test.ts b/packages/parser/tests/unit/parser.middy.test.ts index 979892a21c..369a04d776 100644 --- a/packages/parser/tests/unit/parser.middy.test.ts +++ b/packages/parser/tests/unit/parser.middy.test.ts @@ -8,9 +8,9 @@ import middy from '@middy/core'; import { Context } from 'aws-lambda'; import { parser } from '../../src/middleware/parser.js'; import { generateMock } from '@anatine/zod-mock'; -import { SqsSchema } from '../../src/schemas/sqs.js'; +import { SqsSchema } from '../../src/schemas/index.js'; import { z, type ZodSchema } from 'zod'; -import { sqsEnvelope } from '../../src/envelopes/sqs'; +import { sqsEnvelope } from '../../src/envelopes/index.js'; import { TestSchema } from './schema/utils'; describe('Middleware: parser', () => { diff --git a/packages/parser/tests/unit/schema/alb.test.ts b/packages/parser/tests/unit/schema/alb.test.ts index 071f4598ce..6984f56f6d 100644 --- a/packages/parser/tests/unit/schema/alb.test.ts +++ b/packages/parser/tests/unit/schema/alb.test.ts @@ -3,10 +3,7 @@ * * @group unit/parser/schema/ */ -import { - AlbSchema, - AlbMultiValueHeadersSchema, -} from '../../../src/schemas/alb.js'; +import { AlbSchema, AlbMultiValueHeadersSchema } from '../../../src/schemas/'; import { TestEvents } from './utils.js'; describe('ALB ', () => { diff --git a/packages/parser/tests/unit/schema/apigw.test.ts b/packages/parser/tests/unit/schema/apigw.test.ts index 472aa89d39..8b03c9ffbe 100644 --- a/packages/parser/tests/unit/schema/apigw.test.ts +++ b/packages/parser/tests/unit/schema/apigw.test.ts @@ -4,7 +4,7 @@ * @group unit/parser/schema/ */ -import { APIGatewayProxyEventSchema } from '../../../src/schemas/apigw.js'; +import { APIGatewayProxyEventSchema } from '../../../src/schemas/'; import { TestEvents } from './utils.js'; describe('APIGateway ', () => { diff --git a/packages/parser/tests/unit/schema/apigwv2.test.ts b/packages/parser/tests/unit/schema/apigwv2.test.ts index 59faa6ca70..1ebb547c7f 100644 --- a/packages/parser/tests/unit/schema/apigwv2.test.ts +++ b/packages/parser/tests/unit/schema/apigwv2.test.ts @@ -4,7 +4,7 @@ * @group unit/parser/schema/ */ -import { APIGatewayProxyEventV2Schema } from '../../../src/schemas/apigwv2.js'; +import { APIGatewayProxyEventV2Schema } from '../../../src/schemas/'; import { TestEvents } from './utils.js'; describe('API GW v2 ', () => { diff --git a/packages/parser/tests/unit/schema/cloudformation-custom-resource.test.ts b/packages/parser/tests/unit/schema/cloudformation-custom-resource.test.ts index d7ac35ac29..7b4df56201 100644 --- a/packages/parser/tests/unit/schema/cloudformation-custom-resource.test.ts +++ b/packages/parser/tests/unit/schema/cloudformation-custom-resource.test.ts @@ -8,7 +8,7 @@ import { CloudFormationCustomResourceCreateSchema, CloudFormationCustomResourceUpdateSchema, CloudFormationCustomResourceDeleteSchema, -} from '../../../src/schemas/cloudformation-custom-resource.js'; +} from '../../../src/schemas/'; import { TestEvents } from './utils.js'; describe('CloudFormationCustomResource ', () => { diff --git a/packages/parser/tests/unit/schema/cloudwatch.test.ts b/packages/parser/tests/unit/schema/cloudwatch.test.ts index c12e0d608c..e126bdb7fb 100644 --- a/packages/parser/tests/unit/schema/cloudwatch.test.ts +++ b/packages/parser/tests/unit/schema/cloudwatch.test.ts @@ -4,7 +4,7 @@ * @group unit/parser/schema/ */ -import { CloudWatchLogsSchema } from '../../../src/schemas/cloudwatch.js'; +import { CloudWatchLogsSchema } from '../../../src/schemas/'; import { TestEvents } from './utils.js'; describe('CloudWatchLogs ', () => { diff --git a/packages/parser/tests/unit/schema/dynamodb.test.ts b/packages/parser/tests/unit/schema/dynamodb.test.ts index 821d484f40..f0d90fbc5b 100644 --- a/packages/parser/tests/unit/schema/dynamodb.test.ts +++ b/packages/parser/tests/unit/schema/dynamodb.test.ts @@ -4,7 +4,7 @@ * @group unit/parser/schema/ */ -import { DynamoDBStreamSchema } from '../../../src/schemas/dynamodb.js'; +import { DynamoDBStreamSchema } from '../../../src/schemas/'; import { TestEvents } from './utils.js'; describe('DynamoDB ', () => { diff --git a/packages/parser/tests/unit/schema/eventbridge.test.ts b/packages/parser/tests/unit/schema/eventbridge.test.ts index b7ed50d37c..4423318874 100644 --- a/packages/parser/tests/unit/schema/eventbridge.test.ts +++ b/packages/parser/tests/unit/schema/eventbridge.test.ts @@ -4,7 +4,7 @@ * @group unit/parser/schema/ */ -import { EventBridgeSchema } from '../../../src/schemas/eventbridge.js'; +import { EventBridgeSchema } from '../../../src/schemas/'; import { TestEvents } from './utils.js'; describe('EventBridge ', () => { diff --git a/packages/parser/tests/unit/schema/kafka.test.ts b/packages/parser/tests/unit/schema/kafka.test.ts index 1296130dd8..c6aab47348 100644 --- a/packages/parser/tests/unit/schema/kafka.test.ts +++ b/packages/parser/tests/unit/schema/kafka.test.ts @@ -7,7 +7,7 @@ import { KafkaMskEventSchema, KafkaSelfManagedEventSchema, -} from '../../../src/schemas/kafka.js'; +} from '../../../src/schemas/'; import { TestEvents } from './utils.js'; describe('Kafka ', () => { diff --git a/packages/parser/tests/unit/schema/kinesis.test.ts b/packages/parser/tests/unit/schema/kinesis.test.ts index 8a9aabadec..7d66b99469 100644 --- a/packages/parser/tests/unit/schema/kinesis.test.ts +++ b/packages/parser/tests/unit/schema/kinesis.test.ts @@ -4,11 +4,11 @@ * @group unit/parser/schema/ */ -import { KinesisDataStreamSchema } from '../../../src/schemas/kinesis.js'; import { KinesisFirehoseSchema, KinesisFirehoseSqsSchema, -} from '../../../src/schemas/kinesis-firehose.js'; + KinesisDataStreamSchema, +} from '../../../src/schemas/'; import { TestEvents } from './utils.js'; describe('Kinesis ', () => { diff --git a/packages/parser/tests/unit/schema/lambda.test.ts b/packages/parser/tests/unit/schema/lambda.test.ts index cd789704bc..cfef867657 100644 --- a/packages/parser/tests/unit/schema/lambda.test.ts +++ b/packages/parser/tests/unit/schema/lambda.test.ts @@ -4,7 +4,7 @@ * @group unit/parser/schema/ */ -import { LambdaFunctionUrlSchema } from '../../../src/schemas/lambda.js'; +import { LambdaFunctionUrlSchema } from '../../../src/schemas/'; import { TestEvents } from './utils.js'; describe('Lambda ', () => { diff --git a/packages/parser/tests/unit/schema/s3.test.ts b/packages/parser/tests/unit/schema/s3.test.ts index eff1bb6840..72e3ba74dc 100644 --- a/packages/parser/tests/unit/schema/s3.test.ts +++ b/packages/parser/tests/unit/schema/s3.test.ts @@ -9,7 +9,7 @@ import { S3SqsEventNotificationSchema, S3Schema, S3ObjectLambdaEventSchema, -} from '../../../src/schemas/s3.js'; +} from '../../../src/schemas/'; import { TestEvents } from './utils.js'; describe('S3 ', () => { diff --git a/packages/parser/tests/unit/schema/ses.test.ts b/packages/parser/tests/unit/schema/ses.test.ts index 3d714ea074..010fa4872c 100644 --- a/packages/parser/tests/unit/schema/ses.test.ts +++ b/packages/parser/tests/unit/schema/ses.test.ts @@ -4,7 +4,7 @@ * @group unit/parser/schema/ */ -import { SesSchema } from '../../../src/schemas/ses.js'; +import { SesSchema } from '../../../src/schemas/'; import { TestEvents } from './utils.js'; describe('Schema:', () => { diff --git a/packages/parser/tests/unit/schema/sns.test.ts b/packages/parser/tests/unit/schema/sns.test.ts index 1875d20642..26a212b7ad 100644 --- a/packages/parser/tests/unit/schema/sns.test.ts +++ b/packages/parser/tests/unit/schema/sns.test.ts @@ -4,7 +4,7 @@ * @group unit/parser/schema/ */ -import { SnsSchema } from '../../../src/schemas/sns.js'; +import { SnsSchema } from '../../../src/schemas/'; import { TestEvents } from './utils.js'; describe('Schema:', () => { diff --git a/packages/parser/tests/unit/schema/sqs.test.ts b/packages/parser/tests/unit/schema/sqs.test.ts index 802c36da08..d92f0d73e5 100644 --- a/packages/parser/tests/unit/schema/sqs.test.ts +++ b/packages/parser/tests/unit/schema/sqs.test.ts @@ -4,7 +4,7 @@ * @group unit/parser/schema/ */ -import { SqsSchema } from '../../../src/schemas/sqs.js'; +import { SqsSchema } from '../../../src/schemas/'; import { TestEvents } from './utils.js'; describe('SQS ', () => { diff --git a/packages/parser/tests/unit/schema/vpc-lattice.test.ts b/packages/parser/tests/unit/schema/vpc-lattice.test.ts index 576efa623f..643714fb47 100644 --- a/packages/parser/tests/unit/schema/vpc-lattice.test.ts +++ b/packages/parser/tests/unit/schema/vpc-lattice.test.ts @@ -4,7 +4,7 @@ * @group unit/parser/schema/ */ -import { VpcLatticeSchema } from '../../../src/schemas/vpc-lattice.js'; +import { VpcLatticeSchema } from '../../../src/schemas/'; import { TestEvents } from './utils.js'; describe('VPC Lattice ', () => { diff --git a/packages/parser/tests/unit/schema/vpc-latticev2.test.ts b/packages/parser/tests/unit/schema/vpc-latticev2.test.ts index e93deb24c1..5e1b6c7343 100644 --- a/packages/parser/tests/unit/schema/vpc-latticev2.test.ts +++ b/packages/parser/tests/unit/schema/vpc-latticev2.test.ts @@ -4,7 +4,7 @@ * @group unit/parser/schema/ */ -import { VpcLatticeV2Schema } from '../../../src/schemas/vpc-latticev2.js'; +import { VpcLatticeV2Schema } from '../../../src/schemas/'; import { TestEvents } from './utils.js'; describe('VpcLatticeV2 ', () => { From 0012f926885cad89b482c1079b6ee6f0e22b2d8d Mon Sep 17 00:00:00 2001 From: Alexander Schueren Date: Thu, 21 Mar 2024 14:56:55 +0100 Subject: [PATCH 55/60] feat(parser): implement `safeParse` option (#2244) * first draft on safeParse with major refactoring * add safeParse * fixed sns tests * bump coverage * remove throw error and return ParsedResult * remove one level to reduce complexity score * make static methods readonly * simplified cryptic ternary operation into something readble * Update packages/parser/src/parserDecorator.ts Co-authored-by: Andrea Amorosi * merged * simplify export * add invisible character for decorator rendering * fix docs and tests * Update packages/parser/src/parserDecorator.ts Co-authored-by: Andrea Amorosi * add comment with description * remove context * remove unintentional safeParse export * add examples to parse standalone function --------- Co-authored-by: Andrea Amorosi --- packages/parser/src/envelopes/apigw.ts | 44 +++-- packages/parser/src/envelopes/apigwv2.ts | 44 +++-- packages/parser/src/envelopes/cloudwatch.ts | 61 +++++-- packages/parser/src/envelopes/dynamodb.ts | 69 ++++++-- packages/parser/src/envelopes/envelope.ts | 91 +++++++--- packages/parser/src/envelopes/event-bridge.ts | 46 ++++- packages/parser/src/envelopes/index.ts | 26 +-- packages/parser/src/envelopes/kafka.ts | 89 +++++++--- .../parser/src/envelopes/kinesis-firehose.ts | 59 +++++-- packages/parser/src/envelopes/kinesis.ts | 56 ++++-- packages/parser/src/envelopes/lambda.ts | 52 ++++-- packages/parser/src/envelopes/sns.ts | 135 +++++++++++--- packages/parser/src/envelopes/sqs.ts | 52 ++++-- packages/parser/src/envelopes/vpc-lattice.ts | 50 ++++-- .../parser/src/envelopes/vpc-latticev2.ts | 49 +++-- packages/parser/src/index.ts | 2 +- packages/parser/src/middleware/parser.ts | 12 +- packages/parser/src/parser.ts | 93 +++++----- packages/parser/src/parserDecorator.ts | 94 ++++++++++ packages/parser/src/types/ParserOptions.ts | 7 - packages/parser/src/types/envelope.ts | 57 +++--- packages/parser/src/types/index.ts | 7 +- packages/parser/src/types/parser.ts | 30 ++++ packages/parser/src/types/schema.ts | 54 +++--- packages/parser/tests/unit/envelope.test.ts | 83 +++++++++ .../tests/unit/envelopes/apigwt.test.ts | 81 +++++++-- .../tests/unit/envelopes/apigwv2.test.ts | 88 +++++++-- .../tests/unit/envelopes/cloudwatch.test.ts | 140 +++++++++++---- .../tests/unit/envelopes/dynamodb.test.ts | 131 +++++++++++--- .../tests/unit/envelopes/eventbridge.test.ts | 127 ++++++++++--- .../parser/tests/unit/envelopes/kafka.test.ts | 95 ++++++++-- .../unit/envelopes/kinesis-firehose.test.ts | 167 +++++++++++++++--- .../tests/unit/envelopes/kinesis.test.ts | 68 +++++-- .../tests/unit/envelopes/lambda.test.ts | 94 ++++++++-- .../parser/tests/unit/envelopes/sns.test.ts | 160 ++++++++++++++--- .../parser/tests/unit/envelopes/sqs.test.ts | 79 ++++++--- .../tests/unit/envelopes/vpc-lattice.test.ts | 99 ++++++++--- .../unit/envelopes/vpc-latticev2.test.ts | 99 ++++++++--- .../tests/unit/parser.decorator.test.ts | 121 +++++++++++-- .../parser/tests/unit/parser.middy.test.ts | 101 +++++++++-- 40 files changed, 2381 insertions(+), 631 deletions(-) create mode 100644 packages/parser/src/parserDecorator.ts delete mode 100644 packages/parser/src/types/ParserOptions.ts create mode 100644 packages/parser/src/types/parser.ts create mode 100644 packages/parser/tests/unit/envelope.test.ts diff --git a/packages/parser/src/envelopes/apigw.ts b/packages/parser/src/envelopes/apigw.ts index 49d094b405..ee4d71e9c0 100644 --- a/packages/parser/src/envelopes/apigw.ts +++ b/packages/parser/src/envelopes/apigw.ts @@ -1,18 +1,40 @@ -import { parse } from './envelope.js'; -import { z, ZodSchema } from 'zod'; +import { Envelope } from './envelope.js'; +import { z, type ZodSchema } from 'zod'; import { APIGatewayProxyEventSchema } from '../schemas/apigw.js'; +import type { ParsedResult } from '../types/parser.js'; /** * API Gateway envelope to extract data within body key */ -export const apiGatewayEnvelope = ( - data: unknown, - schema: T -): z.infer => { - const parsedEnvelope = APIGatewayProxyEventSchema.parse(data); - if (!parsedEnvelope.body) { - throw new Error('Body field of API Gateway event is undefined'); +export class ApiGatewayEnvelope extends Envelope { + public static parse( + data: unknown, + schema: T + ): z.infer { + return super.parse(APIGatewayProxyEventSchema.parse(data).body, schema); } - return parse(parsedEnvelope.body, schema); -}; + public static safeParse( + data: unknown, + schema: T + ): ParsedResult> { + const parsedEnvelope = APIGatewayProxyEventSchema.safeParse(data); + if (!parsedEnvelope.success) { + return { + ...parsedEnvelope, + originalEvent: data, + }; + } + + const parsedBody = super.safeParse(parsedEnvelope.data.body, schema); + + if (!parsedBody.success) { + return { + ...parsedBody, + originalEvent: data, + }; + } + + return parsedBody; + } +} diff --git a/packages/parser/src/envelopes/apigwv2.ts b/packages/parser/src/envelopes/apigwv2.ts index decadfcc57..3da86e26e4 100644 --- a/packages/parser/src/envelopes/apigwv2.ts +++ b/packages/parser/src/envelopes/apigwv2.ts @@ -1,18 +1,40 @@ -import { parse } from './envelope.js'; -import { z, ZodSchema } from 'zod'; +import { z, type ZodSchema } from 'zod'; import { APIGatewayProxyEventV2Schema } from '../schemas/apigwv2.js'; +import { Envelope } from './envelope.js'; +import type { ParsedResult } from '../types/index.js'; /** * API Gateway V2 envelope to extract data within body key */ -export const apiGatewayV2Envelope = ( - data: unknown, - schema: T -): z.infer => { - const parsedEnvelope = APIGatewayProxyEventV2Schema.parse(data); - if (!parsedEnvelope.body) { - throw new Error('Body field of API Gateway event is undefined'); +export class ApiGatewayV2Envelope extends Envelope { + public static parse( + data: unknown, + schema: T + ): z.infer { + return super.parse(APIGatewayProxyEventV2Schema.parse(data).body, schema); } - return parse(parsedEnvelope.body, schema); -}; + public static safeParse( + data: unknown, + schema: T + ): ParsedResult { + const parsedEnvelope = APIGatewayProxyEventV2Schema.safeParse(data); + if (!parsedEnvelope.success) { + return { + ...parsedEnvelope, + originalEvent: data, + }; + } + + const parsedBody = super.safeParse(parsedEnvelope.data.body, schema); + + if (!parsedBody.success) { + return { + ...parsedBody, + originalEvent: data, + }; + } + + return parsedBody; + } +} diff --git a/packages/parser/src/envelopes/cloudwatch.ts b/packages/parser/src/envelopes/cloudwatch.ts index 848e7ab070..f90e6455f9 100644 --- a/packages/parser/src/envelopes/cloudwatch.ts +++ b/packages/parser/src/envelopes/cloudwatch.ts @@ -1,6 +1,7 @@ -import { parse } from './envelope.js'; -import { z, ZodSchema } from 'zod'; -import { CloudWatchLogsSchema } from '../schemas/cloudwatch.js'; +import { z, type ZodSchema } from 'zod'; +import { Envelope } from './envelope.js'; +import { CloudWatchLogsSchema } from '../schemas/index.js'; +import type { ParsedResult } from '../types/index.js'; /** * CloudWatch Envelope to extract a List of log records. @@ -11,13 +12,49 @@ import { CloudWatchLogsSchema } from '../schemas/cloudwatch.js'; * * Note: The record will be parsed the same way so if model is str */ -export const cloudWatchEnvelope = ( - data: unknown, - schema: T -): z.infer => { - const parsedEnvelope = CloudWatchLogsSchema.parse(data); +export class CloudWatchEnvelope extends Envelope { + public static parse( + data: unknown, + schema: T + ): z.infer { + const parsedEnvelope = CloudWatchLogsSchema.parse(data); - return parsedEnvelope.awslogs.data.logEvents.map((record) => { - return parse(record.message, schema); - }); -}; + return parsedEnvelope.awslogs.data.logEvents.map((record) => { + return super.parse(record.message, schema); + }); + } + + public static safeParse( + data: unknown, + schema: T + ): ParsedResult { + const parsedEnvelope = CloudWatchLogsSchema.safeParse(data); + + if (!parsedEnvelope.success) { + return { + success: false, + error: parsedEnvelope.error, + originalEvent: data, + }; + } + const parsedLogEvents: z.infer[] = []; + + for (const record of parsedEnvelope.data.awslogs.data.logEvents) { + const parsedMessage = super.safeParse(record.message, schema); + if (!parsedMessage.success) { + return { + success: false, + error: parsedMessage.error, + originalEvent: data, + }; + } else { + parsedLogEvents.push(parsedMessage.data); + } + } + + return { + success: true, + data: parsedLogEvents, + }; + } +} diff --git a/packages/parser/src/envelopes/dynamodb.ts b/packages/parser/src/envelopes/dynamodb.ts index bb378b2d0b..4898369422 100644 --- a/packages/parser/src/envelopes/dynamodb.ts +++ b/packages/parser/src/envelopes/dynamodb.ts @@ -1,6 +1,7 @@ -import { parse } from './envelope.js'; -import { z, ZodSchema } from 'zod'; -import { DynamoDBStreamSchema } from '../schemas/dynamodb.js'; +import { z, type ZodSchema } from 'zod'; +import { DynamoDBStreamSchema } from '../schemas/index.js'; +import type { ParsedResult, ParsedResultError } from '../types/index.js'; +import { Envelope } from './envelope.js'; type DynamoDBStreamEnvelopeResponse = { NewImage: z.infer; @@ -13,16 +14,58 @@ type DynamoDBStreamEnvelopeResponse = { * Note: Values are the parsed models. Images' values can also be None, and * length of the list is the record's amount in the original event. */ -export const dynamoDDStreamEnvelope = ( - data: unknown, - schema: T -): DynamoDBStreamEnvelopeResponse[] => { - const parsedEnvelope = DynamoDBStreamSchema.parse(data); +export class DynamoDBStreamEnvelope extends Envelope { + public static parse( + data: unknown, + schema: T + ): DynamoDBStreamEnvelopeResponse>[] { + const parsedEnvelope = DynamoDBStreamSchema.parse(data); + + return parsedEnvelope.Records.map((record) => { + return { + NewImage: super.parse(record.dynamodb.NewImage, schema), + OldImage: super.parse(record.dynamodb.OldImage, schema), + }; + }); + } + + public static safeParse( + data: unknown, + schema: T + ): ParsedResult { + const parsedEnvelope = DynamoDBStreamSchema.safeParse(data); + + if (!parsedEnvelope.success) { + return { + success: false, + error: parsedEnvelope.error, + originalEvent: data, + }; + } + const parsedLogEvents: DynamoDBStreamEnvelopeResponse>[] = []; + + for (const record of parsedEnvelope.data.Records) { + const parsedNewImage = super.safeParse(record.dynamodb.NewImage, schema); + const parsedOldImage = super.safeParse(record.dynamodb.OldImage, schema); + if (!parsedNewImage.success || !parsedOldImage.success) { + return { + success: false, + error: !parsedNewImage.success + ? parsedNewImage.error + : (parsedOldImage as ParsedResultError).error, + originalEvent: data, + }; + } else { + parsedLogEvents.push({ + NewImage: parsedNewImage.data, + OldImage: parsedOldImage.data, + }); + } + } - return parsedEnvelope.Records.map((record) => { return { - NewImage: parse(record.dynamodb.NewImage, schema), - OldImage: parse(record.dynamodb.OldImage, schema), + success: true, + data: parsedLogEvents, }; - }); -}; + } +} diff --git a/packages/parser/src/envelopes/envelope.ts b/packages/parser/src/envelopes/envelope.ts index 4c2dd9570d..ed55758153 100644 --- a/packages/parser/src/envelopes/envelope.ts +++ b/packages/parser/src/envelopes/envelope.ts @@ -1,23 +1,70 @@ -import { z, ZodSchema } from 'zod'; +import { z, type ZodSchema } from 'zod'; +import type { ParsedResult } from '../types/parser.js'; -/** - * Abstract function to parse the content of the envelope using provided schema. - * Both inputs are provided as unknown by the user. - * We expect the data to be either string that can be parsed to json or object. - * @internal - * @param data data to parse - * @param schema schema - */ -export const parse = ( - data: unknown, - schema: T -): z.infer[] => { - if (typeof data === 'string') { - return schema.parse(JSON.parse(data)); - } else if (typeof data === 'object') { - return schema.parse(data); - } else - throw new Error( - `Invalid data type for envelope. Expected string or object, got ${typeof data}` - ); -}; +export class Envelope { + /** + * Abstract function to parse the content of the envelope using provided schema. + * Both inputs are provided as unknown by the user. + * We expect the data to be either string that can be parsed to json or object. + * @internal + * @param data data to parse + * @param schema schema + */ + public static readonly parse = ( + data: unknown, + schema: T + ): z.infer => { + if (typeof data === 'string') { + return schema.parse(JSON.parse(data)); + } else if (typeof data === 'object') { + return schema.parse(data); + } else + throw new Error( + `Invalid data type for envelope. Expected string or object, got ${typeof data}` + ); + }; + + /** + * Abstract function to safely parse the content of the envelope using provided schema. + * safeParse is used to avoid throwing errors, thus we catuch all errors and wrap them in the result. + * @param input + * @param schema + */ + public static readonly safeParse = ( + input: unknown, + schema: T + ): ParsedResult> => { + try { + if (typeof input !== 'object' && typeof input !== 'string') { + return { + success: false, + error: new Error( + `Invalid data type for envelope. Expected string or object, got ${typeof input}` + ), + originalEvent: input, + }; + } + + const parsed = schema.safeParse( + typeof input === 'string' ? JSON.parse(input) : input + ); + + return parsed.success + ? { + success: true, + data: parsed.data, + } + : { + success: false, + error: parsed.error, + originalEvent: input, + }; + } catch (e) { + return { + success: false, + error: e as Error, + originalEvent: input, + }; + } + }; +} diff --git a/packages/parser/src/envelopes/event-bridge.ts b/packages/parser/src/envelopes/event-bridge.ts index 4484635348..0d166d673b 100644 --- a/packages/parser/src/envelopes/event-bridge.ts +++ b/packages/parser/src/envelopes/event-bridge.ts @@ -1,13 +1,41 @@ -import { parse } from './envelope.js'; -import { z, ZodSchema } from 'zod'; -import { EventBridgeSchema } from '../schemas/eventbridge.js'; +import { Envelope } from './envelope.js'; +import { z, type ZodSchema } from 'zod'; +import { EventBridgeSchema } from '../schemas/index.js'; +import type { ParsedResult } from '../types/index.js'; /** * Envelope for EventBridge schema that extracts and parses data from the `detail` key. */ -export const eventBridgeEnvelope = ( - data: unknown, - schema: T -): z.infer => { - return parse(EventBridgeSchema.parse(data).detail, schema); -}; +export class EventBridgeEnvelope extends Envelope { + public static parse( + data: unknown, + schema: T + ): z.infer { + return super.parse(EventBridgeSchema.parse(data).detail, schema); + } + + public static safeParse( + data: unknown, + schema: T + ): ParsedResult { + const parsedEnvelope = EventBridgeSchema.safeParse(data); + + if (!parsedEnvelope.success) { + return { + ...parsedEnvelope, + originalEvent: data, + }; + } + + const parsedDetail = super.safeParse(parsedEnvelope.data.detail, schema); + + if (!parsedDetail.success) { + return { + ...parsedDetail, + originalEvent: data, + }; + } + + return parsedDetail; + } +} diff --git a/packages/parser/src/envelopes/index.ts b/packages/parser/src/envelopes/index.ts index dd28c4aeea..3d1487a7b0 100644 --- a/packages/parser/src/envelopes/index.ts +++ b/packages/parser/src/envelopes/index.ts @@ -1,13 +1,13 @@ -export { apiGatewayEnvelope } from './apigw.js'; -export { apiGatewayV2Envelope } from './apigwv2.js'; -export { cloudWatchEnvelope } from './cloudwatch.js'; -export { dynamoDDStreamEnvelope } from './dynamodb.js'; -export { eventBridgeEnvelope } from './event-bridge.js'; -export { kafkaEnvelope } from './kafka.js'; -export { kinesisEnvelope } from './kinesis.js'; -export { kinesisFirehoseEnvelope } from './kinesis-firehose.js'; -export { lambdaFunctionUrlEnvelope } from './lambda.js'; -export { snsEnvelope, snsSqsEnvelope } from './sns.js'; -export { sqsEnvelope } from './sqs.js'; -export { vpcLatticeEnvelope } from './vpc-lattice.js'; -export { vpcLatticeV2Envelope } from './vpc-latticev2.js'; +export { ApiGatewayEnvelope } from './apigw.js'; +export { ApiGatewayV2Envelope } from './apigwv2.js'; +export { CloudWatchEnvelope } from './cloudwatch.js'; +export { DynamoDBStreamEnvelope } from './dynamodb.js'; +export { EventBridgeEnvelope } from './event-bridge.js'; +export { KafkaEnvelope } from './kafka.js'; +export { KinesisEnvelope } from './kinesis.js'; +export { KinesisFirehoseEnvelope } from './kinesis-firehose.js'; +export { LambdaFunctionUrlEnvelope } from './lambda.js'; +export { SnsEnvelope, SnsSqsEnvelope } from './sns.js'; +export { SqsEnvelope } from './sqs.js'; +export { VpcLatticeEnvelope } from './vpc-lattice.js'; +export { VpcLatticeV2Envelope } from './vpc-latticev2.js'; diff --git a/packages/parser/src/envelopes/kafka.ts b/packages/parser/src/envelopes/kafka.ts index 86eb44063f..1bbd442f3f 100644 --- a/packages/parser/src/envelopes/kafka.ts +++ b/packages/parser/src/envelopes/kafka.ts @@ -1,9 +1,10 @@ -import { z, ZodSchema } from 'zod'; -import { parse } from './envelope.js'; +import { z, type ZodSchema } from 'zod'; +import { Envelope } from './envelope.js'; import { KafkaMskEventSchema, KafkaSelfManagedEventSchema, } from '../schemas/kafka.js'; +import { ParsedResult, KafkaMskEvent } from '../types/index.js'; /** * Kafka event envelope to extract data within body key @@ -13,26 +14,66 @@ import { * Note: Records will be parsed the same way so if model is str, * all items in the list will be parsed as str and not as JSON (and vice versa) */ -export const kafkaEnvelope = ( - data: unknown, - schema: T -): z.infer => { - // manually fetch event source to deside between Msk or SelfManaged - - // eslint-disable-next-line @typescript-eslint/ban-ts-comment - // @ts-ignore - const eventSource = data['eventSource']; - - const parsedEnvelope: - | z.infer - | z.infer = - eventSource === 'aws:kafka' - ? KafkaMskEventSchema.parse(data) - : KafkaSelfManagedEventSchema.parse(data); - - return Object.values(parsedEnvelope.records).map((topicRecord) => { - return topicRecord.map((record) => { - return parse(record.value, schema); + +export class KafkaEnvelope extends Envelope { + public static parse( + data: unknown, + schema: T + ): z.infer { + // manually fetch event source to deside between Msk or SelfManaged + const eventSource = (data as KafkaMskEvent)['eventSource']; + + const parsedEnvelope: + | z.infer + | z.infer = + eventSource === 'aws:kafka' + ? KafkaMskEventSchema.parse(data) + : KafkaSelfManagedEventSchema.parse(data); + + return Object.values(parsedEnvelope.records).map((topicRecord) => { + return topicRecord.map((record) => { + return super.parse(record.value, schema); + }); }); - }); -}; + } + + public static safeParse( + data: unknown, + schema: T + ): ParsedResult { + // manually fetch event source to deside between Msk or SelfManaged + const eventSource = (data as KafkaMskEvent)['eventSource']; + + const parsedEnvelope = + eventSource === 'aws:kafka' + ? KafkaMskEventSchema.safeParse(data) + : KafkaSelfManagedEventSchema.safeParse(data); + + if (!parsedEnvelope.success) { + return { + ...parsedEnvelope, + originalEvent: data, + }; + } + const parsedRecords: z.infer[] = []; + + for (const topicRecord of Object.values(parsedEnvelope.data.records)) { + for (const record of topicRecord) { + const parsedRecord = super.safeParse(record.value, schema); + if (!parsedRecord.success) { + return { + success: false, + error: parsedRecord.error, + originalEvent: data, + }; + } + parsedRecords.push(parsedRecord.data); + } + } + + return { + success: true, + data: parsedRecords, + }; + } +} diff --git a/packages/parser/src/envelopes/kinesis-firehose.ts b/packages/parser/src/envelopes/kinesis-firehose.ts index e51ae47a12..7dca3cae73 100644 --- a/packages/parser/src/envelopes/kinesis-firehose.ts +++ b/packages/parser/src/envelopes/kinesis-firehose.ts @@ -1,6 +1,7 @@ -import { parse } from './envelope.js'; -import { z, ZodSchema } from 'zod'; -import { KinesisFirehoseSchema } from '../schemas/kinesis-firehose.js'; +import { z, type ZodSchema } from 'zod'; +import { Envelope } from './envelope.js'; +import { KinesisFirehoseSchema } from '../schemas/index.js'; +import type { ParsedResult } from '../types/index.js'; /** * Kinesis Firehose Envelope to extract array of Records @@ -14,13 +15,47 @@ import { KinesisFirehoseSchema } from '../schemas/kinesis-firehose.js'; * * https://docs.aws.amazon.com/lambda/latest/dg/services-kinesisfirehose.html */ -export const kinesisFirehoseEnvelope = ( - data: unknown, - schema: T -): z.infer => { - const parsedEnvelope = KinesisFirehoseSchema.parse(data); +export class KinesisFirehoseEnvelope extends Envelope { + public static parse( + data: unknown, + schema: T + ): z.infer { + const parsedEnvelope = KinesisFirehoseSchema.parse(data); - return parsedEnvelope.records.map((record) => { - return parse(record.data, schema); - }); -}; + return parsedEnvelope.records.map((record) => { + return super.parse(record.data, schema); + }); + } + + public static safeParse( + data: unknown, + schema: T + ): ParsedResult { + const parsedEnvelope = KinesisFirehoseSchema.safeParse(data); + + if (!parsedEnvelope.success) { + return { + ...parsedEnvelope, + originalEvent: data, + }; + } + const parsedRecords: z.infer[] = []; + + for (const record of parsedEnvelope.data.records) { + const parsedData = super.safeParse(record.data, schema); + if (!parsedData.success) { + return { + success: false, + error: parsedData.error, + originalEvent: data, + }; + } + parsedRecords.push(parsedData.data); + } + + return { + success: true, + data: parsedRecords, + }; + } +} diff --git a/packages/parser/src/envelopes/kinesis.ts b/packages/parser/src/envelopes/kinesis.ts index 311223042d..470df40522 100644 --- a/packages/parser/src/envelopes/kinesis.ts +++ b/packages/parser/src/envelopes/kinesis.ts @@ -1,6 +1,7 @@ -import { parse } from './envelope.js'; -import { z, ZodSchema } from 'zod'; +import { Envelope } from './envelope.js'; +import { z, type ZodSchema } from 'zod'; import { KinesisDataStreamSchema } from '../schemas/kinesis.js'; +import type { ParsedResult } from '../types/index.js'; /** * Kinesis Data Stream Envelope to extract array of Records @@ -12,13 +13,46 @@ import { KinesisDataStreamSchema } from '../schemas/kinesis.js'; * Note: Records will be parsed the same way so if model is str, * all items in the list will be parsed as str and not as JSON (and vice versa) */ -export const kinesisEnvelope = ( - data: unknown, - schema: T -): z.infer => { - const parsedEnvelope = KinesisDataStreamSchema.parse(data); +export class KinesisEnvelope extends Envelope { + public static parse( + data: unknown, + schema: T + ): z.infer { + const parsedEnvelope = KinesisDataStreamSchema.parse(data); - return parsedEnvelope.Records.map((record) => { - return parse(record.kinesis.data, schema); - }); -}; + return parsedEnvelope.Records.map((record) => { + return super.parse(record.kinesis.data, schema); + }); + } + + public static safeParse( + data: unknown, + schema: T + ): ParsedResult { + const parsedEnvelope = KinesisDataStreamSchema.safeParse(data); + if (!parsedEnvelope.success) { + return { + ...parsedEnvelope, + originalEvent: data, + }; + } + + const parsedRecords: z.infer[] = []; + + for (const record of parsedEnvelope.data.Records) { + const parsedRecord = super.safeParse(record.kinesis.data, schema); + if (!parsedRecord.success) { + return { + ...parsedRecord, + originalEvent: data, + }; + } + parsedRecords.push(parsedRecord.data); + } + + return { + success: true, + data: parsedRecords, + }; + } +} diff --git a/packages/parser/src/envelopes/lambda.ts b/packages/parser/src/envelopes/lambda.ts index 3ac1f2b8c6..a839c68287 100644 --- a/packages/parser/src/envelopes/lambda.ts +++ b/packages/parser/src/envelopes/lambda.ts @@ -1,18 +1,46 @@ -import { parse } from './envelope.js'; -import { z, ZodSchema } from 'zod'; -import { LambdaFunctionUrlSchema } from '../schemas/lambda.js'; +import { Envelope } from './envelope.js'; +import { z, type ZodSchema } from 'zod'; +import { LambdaFunctionUrlSchema } from '../schemas/index.js'; +import type { ParsedResult } from '../types/index.js'; /** * Lambda function URL envelope to extract data within body key */ -export const lambdaFunctionUrlEnvelope = ( - data: unknown, - schema: T -): z.infer => { - const parsedEnvelope = LambdaFunctionUrlSchema.parse(data); - if (!parsedEnvelope.body) { - throw new Error('Body field of Lambda function URL event is undefined'); +export class LambdaFunctionUrlEnvelope extends Envelope { + public static parse( + data: unknown, + schema: T + ): z.infer { + const parsedEnvelope = LambdaFunctionUrlSchema.parse(data); + + if (!parsedEnvelope.body) { + throw new Error('Body field of Lambda function URL event is undefined'); + } + + return super.parse(parsedEnvelope.body, schema); } - return parse(parsedEnvelope.body, schema); -}; + public static safeParse( + data: unknown, + schema: T + ): ParsedResult { + const parsedEnvelope = LambdaFunctionUrlSchema.safeParse(data); + + if (!parsedEnvelope.success) { + return { + ...parsedEnvelope, + originalEvent: data, + }; + } + + const parsedBody = super.safeParse(parsedEnvelope.data.body, schema); + if (!parsedBody.success) { + return { + ...parsedBody, + originalEvent: data, + }; + } + + return parsedBody; + } +} diff --git a/packages/parser/src/envelopes/sns.ts b/packages/parser/src/envelopes/sns.ts index 3e897a00a8..1141dff305 100644 --- a/packages/parser/src/envelopes/sns.ts +++ b/packages/parser/src/envelopes/sns.ts @@ -1,7 +1,8 @@ -import { z, ZodSchema } from 'zod'; -import { parse } from './envelope.js'; +import { z, type ZodSchema } from 'zod'; +import { Envelope } from './envelope.js'; import { SnsSchema, SnsSqsNotificationSchema } from '../schemas/sns.js'; import { SqsSchema } from '../schemas/sqs.js'; +import type { ParsedResult } from '../types/index.js'; /** * SNS Envelope to extract array of Records @@ -12,16 +13,49 @@ import { SqsSchema } from '../schemas/sqs.js'; * Note: Records will be parsed the same way so if model is str, * all items in the list will be parsed as str and npt as JSON (and vice versa) */ -export const snsEnvelope = ( - data: unknown, - schema: T -): z.infer => { - const parsedEnvelope = SnsSchema.parse(data); +export class SnsEnvelope extends Envelope { + public static parse( + data: unknown, + schema: T + ): z.infer { + const parsedEnvelope = SnsSchema.parse(data); - return parsedEnvelope.Records.map((record) => { - return parse(record.Sns.Message, schema); - }); -}; + return parsedEnvelope.Records.map((record) => { + return super.parse(record.Sns.Message, schema); + }); + } + + public static safeParse( + data: unknown, + schema: T + ): ParsedResult { + const parsedEnvelope = SnsSchema.safeParse(data); + + if (!parsedEnvelope.success) { + return { + ...parsedEnvelope, + originalEvent: data, + }; + } + + const parsedMessages: z.infer[] = []; + for (const record of parsedEnvelope.data.Records) { + const parsedMessage = super.safeParse(record.Sns.Message, schema); + if (!parsedMessage.success) { + return { + ...parsedMessage, + originalEvent: data, + }; + } + parsedMessages.push(parsedMessage.data); + } + + return { + success: true, + data: parsedMessages, + }; + } +} /** * SNS plus SQS Envelope to extract array of Records @@ -34,17 +68,68 @@ export const snsEnvelope = ( * 3. Finally, parse provided model against payload extracted * */ -export const snsSqsEnvelope = ( - data: unknown, - schema: T -): z.infer => { - const parsedEnvelope = SqsSchema.parse(data); - - return parsedEnvelope.Records.map((record) => { - const snsNotification = SnsSqsNotificationSchema.parse( - JSON.parse(record.body) - ); - - return parse(snsNotification.Message, schema); - }); -}; +export class SnsSqsEnvelope extends Envelope { + public static parse( + data: unknown, + schema: T + ): z.infer { + const parsedEnvelope = SqsSchema.parse(data); + + return parsedEnvelope.Records.map((record) => { + const snsNotification = SnsSqsNotificationSchema.parse( + JSON.parse(record.body) + ); + + return super.parse(snsNotification.Message, schema); + }); + } + + public static safeParse( + data: unknown, + schema: T + ): ParsedResult { + const parsedEnvelope = SqsSchema.safeParse(data); + if (!parsedEnvelope.success) { + return { + ...parsedEnvelope, + originalEvent: data, + }; + } + + const parsedMessages: z.infer[] = []; + + // JSON.parse can throw an error, thus we catch it and return ParsedErrorResult + try { + for (const record of parsedEnvelope.data.Records) { + const snsNotification = SnsSqsNotificationSchema.safeParse( + JSON.parse(record.body) + ); + if (!snsNotification.success) { + return { + ...snsNotification, + originalEvent: data, + }; + } + const parsedMessage = super.safeParse( + snsNotification.data.Message, + schema + ); + if (!parsedMessage.success) { + return { + ...parsedMessage, + originalEvent: data, + }; + } + parsedMessages.push(parsedMessage.data); + } + } catch (e) { + return { + success: false, + error: e as Error, + originalEvent: data, + }; + } + + return { success: true, data: parsedMessages }; + } +} diff --git a/packages/parser/src/envelopes/sqs.ts b/packages/parser/src/envelopes/sqs.ts index 2757663a95..b1c8f6c059 100644 --- a/packages/parser/src/envelopes/sqs.ts +++ b/packages/parser/src/envelopes/sqs.ts @@ -1,6 +1,7 @@ -import { z, ZodSchema } from 'zod'; +import { z, type ZodSchema } from 'zod'; import { SqsSchema } from '../schemas/sqs.js'; -import { parse } from './envelope.js'; +import { Envelope } from './envelope.js'; +import type { ParsedResult } from '../types/index.js'; /** * SQS Envelope to extract array of Records @@ -11,13 +12,42 @@ import { parse } from './envelope.js'; * Note: Records will be parsed the same way so if model is str, * all items in the list will be parsed as str and npt as JSON (and vice versa) */ -export const sqsEnvelope = ( - data: unknown, - schema: T -): z.infer => { - const parsedEnvelope = SqsSchema.parse(data); +export class SqsEnvelope extends Envelope { + public static parse( + data: unknown, + schema: T + ): z.infer { + const parsedEnvelope = SqsSchema.parse(data); - return parsedEnvelope.Records.map((record) => { - return parse(record.body, schema); - }); -}; + return parsedEnvelope.Records.map((record) => { + return super.parse(record.body, schema); + }); + } + + public static safeParse( + data: unknown, + schema: T + ): ParsedResult { + const parsedEnvelope = SqsSchema.safeParse(data); + if (!parsedEnvelope.success) { + return { + ...parsedEnvelope, + originalEvent: data, + }; + } + + const parsedRecords: z.infer[] = []; + for (const record of parsedEnvelope.data.Records) { + const parsedRecord = super.safeParse(record.body, schema); + if (!parsedRecord.success) { + return { + ...parsedRecord, + originalEvent: data, + }; + } + parsedRecords.push(parsedRecord.data); + } + + return { success: true, data: parsedRecords }; + } +} diff --git a/packages/parser/src/envelopes/vpc-lattice.ts b/packages/parser/src/envelopes/vpc-lattice.ts index 03d2998757..a7150dd5a4 100644 --- a/packages/parser/src/envelopes/vpc-lattice.ts +++ b/packages/parser/src/envelopes/vpc-lattice.ts @@ -1,15 +1,43 @@ -import { parse } from './envelope.js'; -import { z, ZodSchema } from 'zod'; -import { VpcLatticeSchema } from '../schemas/vpc-lattice.js'; +import { z, type ZodSchema } from 'zod'; +import { Envelope } from './envelope.js'; +import { VpcLatticeSchema } from '../schemas/index.js'; +import type { ParsedResult } from '../types/index.js'; /** * Amazon VPC Lattice envelope to extract data within body key */ -export const vpcLatticeEnvelope = ( - data: unknown, - schema: T -): z.infer => { - const parsedEnvelope = VpcLatticeSchema.parse(data); - - return parse(parsedEnvelope.body, schema); -}; + +export class VpcLatticeEnvelope extends Envelope { + public static parse( + data: unknown, + schema: T + ): z.infer { + const parsedEnvelope = VpcLatticeSchema.parse(data); + + return super.parse(parsedEnvelope.body, schema); + } + + public static safeParse( + data: unknown, + schema: T + ): ParsedResult { + const parsedEnvelope = VpcLatticeSchema.safeParse(data); + if (!parsedEnvelope.success) { + return { + ...parsedEnvelope, + originalEvent: data, + }; + } + + const parsedBody = super.safeParse(parsedEnvelope.data.body, schema); + + if (!parsedBody.success) { + return { + ...parsedBody, + originalEvent: data, + }; + } + + return parsedBody; + } +} diff --git a/packages/parser/src/envelopes/vpc-latticev2.ts b/packages/parser/src/envelopes/vpc-latticev2.ts index a3fa4389c0..7ef31b0702 100644 --- a/packages/parser/src/envelopes/vpc-latticev2.ts +++ b/packages/parser/src/envelopes/vpc-latticev2.ts @@ -1,15 +1,42 @@ -import { parse } from './envelope.js'; -import { z, ZodSchema } from 'zod'; -import { VpcLatticeV2Schema } from '../schemas/vpc-latticev2.js'; +import { Envelope } from './envelope.js'; +import { z, type ZodSchema } from 'zod'; +import { VpcLatticeV2Schema } from '../schemas/index.js'; +import type { ParsedResult } from '../types/index.js'; /** * Amazon VPC Lattice envelope to extract data within body key */ -export const vpcLatticeV2Envelope = ( - data: unknown, - schema: T -): z.infer => { - const parsedEnvelope = VpcLatticeV2Schema.parse(data); - - return parse(parsedEnvelope.body, schema); -}; +export class VpcLatticeV2Envelope extends Envelope { + public static parse( + data: unknown, + schema: T + ): z.infer { + const parsedEnvelope = VpcLatticeV2Schema.parse(data); + + return super.parse(parsedEnvelope.body, schema); + } + + public static safeParse( + data: unknown, + schema: T + ): ParsedResult { + const parsedEnvelope = VpcLatticeV2Schema.safeParse(data); + if (!parsedEnvelope.success) { + return { + ...parsedEnvelope, + originalEvent: data, + }; + } + + const parsedBody = super.safeParse(parsedEnvelope.data.body, schema); + + if (!parsedBody.success) { + return { + ...parsedBody, + originalEvent: data, + }; + } + + return parsedBody; + } +} diff --git a/packages/parser/src/index.ts b/packages/parser/src/index.ts index bb7ee75eb5..940216fe90 100644 --- a/packages/parser/src/index.ts +++ b/packages/parser/src/index.ts @@ -1 +1 @@ -export { parser } from './parser.js'; +export { parser } from './parserDecorator.js'; diff --git a/packages/parser/src/middleware/parser.ts b/packages/parser/src/middleware/parser.ts index 8a2c26c327..0c536b0aeb 100644 --- a/packages/parser/src/middleware/parser.ts +++ b/packages/parser/src/middleware/parser.ts @@ -1,7 +1,8 @@ import { type MiddyLikeRequest } from '@aws-lambda-powertools/commons/types'; import { type MiddlewareObj } from '@middy/core'; import { type ZodSchema } from 'zod'; -import { type ParserOptions } from '../types/ParserOptions.js'; +import { type ParserOptions } from '../types/parser.js'; +import { parse } from '../parser.js'; /** * A middiy middleware to parse your event. @@ -35,12 +36,9 @@ const parser = ( options: ParserOptions ): MiddlewareObj => { const before = (request: MiddyLikeRequest): void => { - const { schema, envelope } = options; - if (envelope) { - request.event = envelope(request.event, schema); - } else { - request.event = schema.parse(request.event); - } + const { schema, envelope, safeParse } = options; + + request.event = parse(request.event, envelope, schema, safeParse); }; return { diff --git a/packages/parser/src/parser.ts b/packages/parser/src/parser.ts index 1320b643a8..89ed2e4ffb 100644 --- a/packages/parser/src/parser.ts +++ b/packages/parser/src/parser.ts @@ -1,57 +1,66 @@ -import { HandlerMethodDecorator } from '@aws-lambda-powertools/commons/types'; -import { Context, Handler } from 'aws-lambda'; -import { ZodSchema } from 'zod'; -import { type ParserOptions } from './types/ParserOptions.js'; +import type { ParsedResult, Envelope } from './types/index.js'; +import { z, type ZodSchema } from 'zod'; /** - * A decorator to parse your event. + * Parse the data using the provided schema, envelope and safeParse flag * * @example * ```typescript - * - * import { parser } from '@aws-lambda-powertools/parser'; - * import { sqsEnvelope } from '@aws-lambda-powertools/parser/envelopes/sqs'; - * + * import { z } from 'zod'; + * import type { SqsEvent, ParsedResult } from '@aws-lambda-powertools/parser/types'; + * import { SqsEnvelope } from '@aws-lambda-powertools/parser/types/envelopes'; + * import { parse } from '@aws-lambda-powertools/parser'; * * const Order = z.object({ - * orderId: z.string(), - * description: z.string(), - * } + * orderId: z.string(), + * description: z.string(), + * }); * - * class Lambda extends LambdaInterface { + * const handler = async (event: SqsEvent, context: unknown): Promise => { + * const parsedEvent = parse(event, SqsEnvelope, Order); * - * @parser({ envelope: sqsEnvelope, schema: OrderSchema }) - * public async handler(event: Order, _context: Context): Promise { - * // sqs event is parsed and the payload is extracted and parsed - * // apply business logic to your Order event - * const res = processOrder(event); - * return res; - * } + * const parsedSafe: ParsedResult = parse(event, SqsEnvelope, Order, true) * } - * - * @param options + * @param data the data to parse + * @param envelope the envelope to use, can be undefined + * @param schema the schema to use + * @param safeParse whether to use safeParse or not, if true it will return a ParsedResult with the original event if the parsing fails */ -export const parser = ( - options: ParserOptions -): HandlerMethodDecorator => { - return (_target, _propertyKey, descriptor) => { - const original = descriptor.value!; - - const { schema, envelope } = options; +const parse = ( + data: z.infer, + envelope: E | undefined, + schema: T, + safeParse?: boolean +): ParsedResult | z.infer => { + if (envelope && safeParse) { + return envelope.safeParse(data, schema); + } + if (envelope) { + return envelope.parse(data, schema); + } + if (safeParse) { + return safeParseSchema(data, schema); + } - descriptor.value = async function ( - this: Handler, - event: unknown, - context: Context, - callback - ) { - const parsedEvent = envelope - ? envelope(event, schema) - : schema.parse(event); + return schema.parse(data); +}; - return original.call(this, parsedEvent, context, callback); - }; +/** + * Parse the data safely using the provided schema. + * This function will not throw an error if the parsing fails, instead it will return a ParsedResultError with the original event. + * Otherwise, it will return ParsedResultSuccess with the parsed data. + * @param data the data to parse + * @param schema the zod schema to use + */ +const safeParseSchema = ( + data: z.infer, + schema: T +): ParsedResult => { + const result = schema.safeParse(data); - return descriptor; - }; + return result.success + ? result + : { success: false, error: result.error, originalEvent: data }; }; + +export { parse }; diff --git a/packages/parser/src/parserDecorator.ts b/packages/parser/src/parserDecorator.ts new file mode 100644 index 0000000000..0572d3a22e --- /dev/null +++ b/packages/parser/src/parserDecorator.ts @@ -0,0 +1,94 @@ +import type { HandlerMethodDecorator } from '@aws-lambda-powertools/commons/types'; +import type { Context, Handler } from 'aws-lambda'; +import { ZodSchema, z } from 'zod'; +import { parse } from './parser.js'; +import type { ParserOptions, ParsedResult } from './types/index.js'; + +/** + * A decorator to parse your event. + * + * @example + * ```typescript + * import { z } from 'zod'; + * import type { LambdaInterface } from '@aws-lambda-powertools/commons/types'; + * import type { SqSEvent } from '@aws-lambda-powertools/parser/types; + * import { parser } from '@aws-lambda-powertools/parser'; + * import { SqsEnvelope } from '@aws-lambda-powertools/parser/envelopes'; + * + * const Order = z.object({ + * orderId: z.string(), + * description: z.string(), + * }); + * + * class Lambda implements LambdaInterface { + * + * ⁣@parser({ envelope: SqsEnvelope, schema: OrderSchema }) + * public async handler(event: Order, _context: Context): Promise { + * // sqs event is parsed and the payload is extracted and parsed + * // apply business logic to your Order event + * const res = processOrder(event); + * return res; + * } + * } + * + * ``` + * + * In case you want to parse the event and handle the error, you can use the safeParse option. + * The safeParse option will return an object with the parsed event and an error object if the parsing fails. + * + * @example + * ```typescript + * + * import type { LambdaInterface } from '@aws-lambda-powertools/commons/types'; + * import type { SqSEvent, ParsedResult } from '@aws-lambda-powertools/parser/types; + * import { z } from 'zod'; + * import { parser } from '@aws-lambda-powertools/parser'; + * import { SqsEnvelope } from '@aws-lambda-powertools/parser/envelopes'; + * + * + * const Order = z.object({ + * orderId: z.string(), + * description: z.string(), + * } + * + * class Lambda implements LambdaInterface { + * + * ⁣git@parser({ envelope: SqsEnvelope, schema: OrderSchema, safeParse: true }) + * public async handler(event: ParsedResult, _context: unknown): Promise { + * if (event.success) { + * // event.data is the parsed event object of type Order + * } else { + * // event.error is the error object, you can inspect and recover + * // event.originalEvent is the original event that failed to parse + * } + * } + * } + * ``` + * + * @param options Configure the parser with the `schema`, `envelope` and whether to `safeParse` or not + */ +export const parser = ( + options: ParserOptions +): HandlerMethodDecorator => { + return (_target, _propertyKey, descriptor) => { + const original = descriptor.value!; + + const { schema, envelope, safeParse } = options; + + descriptor.value = async function ( + this: Handler, + event: unknown, + context: Context, + callback + ) { + const parsedEvent: ParsedResult< + typeof event, + z.infer + > = parse(event, envelope, schema, safeParse); + + return original.call(this, parsedEvent, context, callback); + }; + + return descriptor; + }; +}; diff --git a/packages/parser/src/types/ParserOptions.ts b/packages/parser/src/types/ParserOptions.ts deleted file mode 100644 index 57fcb9beca..0000000000 --- a/packages/parser/src/types/ParserOptions.ts +++ /dev/null @@ -1,7 +0,0 @@ -import type { ZodSchema } from 'zod'; -import { Envelope } from './envelope.js'; - -export type ParserOptions = { - schema: S; - envelope?: Envelope; -}; diff --git a/packages/parser/src/types/envelope.ts b/packages/parser/src/types/envelope.ts index e54958dca2..9e049c1178 100644 --- a/packages/parser/src/types/envelope.ts +++ b/packages/parser/src/types/envelope.ts @@ -1,29 +1,32 @@ -import { type apiGatewayEnvelope } from '../envelopes/apigw.js'; -import { type apiGatewayV2Envelope } from '../envelopes/apigwv2.js'; -import { type cloudWatchEnvelope } from '../envelopes/cloudwatch.js'; -import { type dynamoDDStreamEnvelope } from '../envelopes/dynamodb.js'; -import { type kafkaEnvelope } from '../envelopes/kafka.js'; -import { type kinesisEnvelope } from '../envelopes/kinesis.js'; -import { type kinesisFirehoseEnvelope } from '../envelopes/kinesis-firehose.js'; -import { type lambdaFunctionUrlEnvelope } from '../envelopes/lambda.js'; -import { type snsEnvelope, type snsSqsEnvelope } from '../envelopes/sns.js'; -import { type sqsEnvelope } from '../envelopes/sqs.js'; -import { type vpcLatticeEnvelope } from '../envelopes/vpc-lattice.js'; -import { type vpcLatticeV2Envelope } from '../envelopes/vpc-latticev2.js'; -import { type eventBridgeEnvelope } from '../envelopes/event-bridge.js'; +import type { + ApiGatewayEnvelope, + KinesisFirehoseEnvelope, + KinesisEnvelope, + KafkaEnvelope, + CloudWatchEnvelope, + EventBridgeEnvelope, + ApiGatewayV2Envelope, + DynamoDBStreamEnvelope, + LambdaFunctionUrlEnvelope, + SnsEnvelope, + SnsSqsEnvelope, + SqsEnvelope, + VpcLatticeEnvelope, + VpcLatticeV2Envelope, +} from '../envelopes/index.js'; export type Envelope = - | typeof apiGatewayEnvelope - | typeof apiGatewayV2Envelope - | typeof cloudWatchEnvelope - | typeof dynamoDDStreamEnvelope - | typeof eventBridgeEnvelope - | typeof kafkaEnvelope - | typeof kinesisEnvelope - | typeof kinesisFirehoseEnvelope - | typeof lambdaFunctionUrlEnvelope - | typeof snsEnvelope - | typeof snsSqsEnvelope - | typeof sqsEnvelope - | typeof vpcLatticeEnvelope - | typeof vpcLatticeV2Envelope; + | typeof ApiGatewayEnvelope + | typeof ApiGatewayV2Envelope + | typeof CloudWatchEnvelope + | typeof DynamoDBStreamEnvelope + | typeof EventBridgeEnvelope + | typeof KafkaEnvelope + | typeof KinesisEnvelope + | typeof KinesisFirehoseEnvelope + | typeof LambdaFunctionUrlEnvelope + | typeof SnsEnvelope + | typeof SnsSqsEnvelope + | typeof SqsEnvelope + | typeof VpcLatticeEnvelope + | typeof VpcLatticeV2Envelope; diff --git a/packages/parser/src/types/index.ts b/packages/parser/src/types/index.ts index d1c8e6fc13..26052e60b6 100644 --- a/packages/parser/src/types/index.ts +++ b/packages/parser/src/types/index.ts @@ -1,4 +1,9 @@ -export type { ParserOptions } from './ParserOptions.js'; +export type { + ParserOptions, + ParsedResult, + ParsedResultSuccess, + ParsedResultError, +} from '../types/parser.js'; export type { Envelope } from './envelope.js'; export type { diff --git a/packages/parser/src/types/parser.ts b/packages/parser/src/types/parser.ts new file mode 100644 index 0000000000..c775a78d94 --- /dev/null +++ b/packages/parser/src/types/parser.ts @@ -0,0 +1,30 @@ +import type { ZodSchema, ZodError } from 'zod'; +import type { Envelope } from './envelope.js'; + +type ParserOptions = { + schema: S; + envelope?: Envelope; + safeParse?: boolean; +}; + +type ParsedResultSuccess = { + success: true; + data: Output; +}; + +type ParsedResultError = { + success: false; + error: ZodError | Error; + originalEvent: Input; +}; + +type ParsedResult = + | ParsedResultSuccess + | ParsedResultError; + +export type { + ParserOptions, + ParsedResult, + ParsedResultError, + ParsedResultSuccess, +}; diff --git a/packages/parser/src/types/schema.ts b/packages/parser/src/types/schema.ts index 6e15f17bd0..6b18b57968 100644 --- a/packages/parser/src/types/schema.ts +++ b/packages/parser/src/types/schema.ts @@ -90,31 +90,31 @@ type VpcLatticeEvent = z.infer; type VpcLatticeEventV2 = z.infer; -export { - type ALBEvent, - type ALBMultiValueHeadersEvent, - type APIGatewayProxyEvent, - type APIGatewayProxyEventV2, - type CloudFormationCustomResourceCreateEvent, - type CloudFormationCustomResourceDeleteEvent, - type CloudFormationCustomResourceUpdateEvent, - type CloudWatchLogsEvent, - type DynamoDBStreamEvent, - type EventBridgeEvent, - type KafkaSelfManagedEvent, - type KafkaMskEvent, - type KinesisDataStreamEvent, - type KinesisDataStreamRecord, - type KinesisDataStreamRecordPayload, - type KinesisFireHoseEvent, - type KinesisFireHoseSqsEvent, - type LambdaFunctionUrlEvent, - type S3Event, - type S3EventNotificationEventBridge, - type S3SqsEventNotification, - type SesEvent, - type SnsEvent, - type SqsEvent, - type VpcLatticeEvent, - type VpcLatticeEventV2, +export type { + ALBEvent, + ALBMultiValueHeadersEvent, + APIGatewayProxyEvent, + APIGatewayProxyEventV2, + CloudFormationCustomResourceCreateEvent, + CloudFormationCustomResourceDeleteEvent, + CloudFormationCustomResourceUpdateEvent, + CloudWatchLogsEvent, + DynamoDBStreamEvent, + EventBridgeEvent, + KafkaSelfManagedEvent, + KafkaMskEvent, + KinesisDataStreamEvent, + KinesisDataStreamRecord, + KinesisDataStreamRecordPayload, + KinesisFireHoseEvent, + KinesisFireHoseSqsEvent, + LambdaFunctionUrlEvent, + S3Event, + S3EventNotificationEventBridge, + S3SqsEventNotification, + SesEvent, + SnsEvent, + SqsEvent, + VpcLatticeEvent, + VpcLatticeEventV2, }; diff --git a/packages/parser/tests/unit/envelope.test.ts b/packages/parser/tests/unit/envelope.test.ts new file mode 100644 index 0000000000..1f92ed6e64 --- /dev/null +++ b/packages/parser/tests/unit/envelope.test.ts @@ -0,0 +1,83 @@ +import { z, ZodError } from 'zod'; +import { Envelope } from '../../src/envelopes/envelope.js'; + +describe('envelope: ', () => { + describe('parseSafe', () => { + it('returns success response when input is object', () => { + const result = Envelope.safeParse( + '{"name": "John"}', + z.object({ name: z.string() }) + ); + expect(result).toEqual({ + success: true, + data: { name: 'John' }, + }); + }); + it('returns success response when input is string', () => { + const result = Envelope.safeParse( + { name: 'John' }, + z.object({ name: z.string() }) + ); + expect(result).toEqual({ + success: true, + data: { name: 'John' }, + }); + }); + it('returns error when input does not match schema', () => { + const result = Envelope.safeParse( + { name: 123 }, + z.object({ name: z.string() }) + ); + expect(result).toEqual({ + success: false, + error: expect.any(ZodError), + originalEvent: { name: 123 }, + }); + }); + + it('returns error when input is invalid JSON string', () => { + let err: unknown; + try { + JSON.parse('{name: "John"}'); + } catch (e) { + err = e; + } + const result = Envelope.safeParse( + '{name: "John"}', + z.object({ name: z.string() }) + ); + expect(result).toEqual({ + success: false, + error: err, + originalEvent: '{name: "John"}', + }); + }); + }); + + describe('parse', () => { + it('returns parsed data when input is object', () => { + const result = Envelope.parse( + { name: 'John' }, + z.object({ name: z.string() }) + ); + expect(result).toEqual({ name: 'John' }); + }); + it('returns parsed data when input is string', () => { + const result = Envelope.parse( + '{"name": "John"}', + z.object({ name: z.string() }) + ); + expect(result).toEqual({ name: 'John' }); + }); + it('throw custom error if input is not string or object', () => { + expect(() => Envelope.parse(123, z.object({ name: z.string() }))).toThrow( + 'Invalid data type for envelope. Expected string or object, got number' + ); + }); + it('throws error when input does not match schema', () => { + expect(() => + Envelope.parse({ name: 123 }, z.object({ name: z.string() })) + ).toThrow(); + }); + }); +}); diff --git a/packages/parser/tests/unit/envelopes/apigwt.test.ts b/packages/parser/tests/unit/envelopes/apigwt.test.ts index 03417fcc67..c9df0c03c7 100644 --- a/packages/parser/tests/unit/envelopes/apigwt.test.ts +++ b/packages/parser/tests/unit/envelopes/apigwt.test.ts @@ -7,23 +7,82 @@ import { generateMock } from '@anatine/zod-mock'; import { TestEvents, TestSchema } from '../schema/utils.js'; import { APIGatewayProxyEvent } from '../../../src/types/'; -import { apiGatewayEnvelope } from '../../../src/envelopes/'; +import { ApiGatewayEnvelope } from '../../../src/envelopes/index.js'; +import { ZodError } from 'zod'; describe('ApigwEnvelope ', () => { - it('should parse custom schema in envelope', () => { - const testCustomSchemaObject = generateMock(TestSchema); - const testEvent = TestEvents.apiGatewayProxyEvent as APIGatewayProxyEvent; + describe('parse', () => { + it('should parse custom schema in envelope', () => { + const testCustomSchemaObject = generateMock(TestSchema); + const testEvent = TestEvents.apiGatewayProxyEvent as APIGatewayProxyEvent; - testEvent.body = JSON.stringify(testCustomSchemaObject); + testEvent.body = JSON.stringify(testCustomSchemaObject); - const resp = apiGatewayEnvelope(testEvent, TestSchema); - expect(resp).toEqual(testCustomSchemaObject); + const resp = ApiGatewayEnvelope.parse(testEvent, TestSchema); + expect(resp).toEqual(testCustomSchemaObject); + }); + + it('should throw no body provided', () => { + const testEvent = TestEvents.apiGatewayProxyEvent as APIGatewayProxyEvent; + testEvent.body = undefined; + + expect(() => ApiGatewayEnvelope.parse(testEvent, TestSchema)).toThrow(); + }); + it('should throw invalid event provided', () => { + const testEvent = TestEvents.apiGatewayProxyEvent as APIGatewayProxyEvent; + testEvent.body = 'invalid'; + + expect(() => ApiGatewayEnvelope.parse(testEvent, TestSchema)).toThrow(); + }); }); - it('should throw no body provided', () => { - const testEvent = TestEvents.apiGatewayProxyEvent as APIGatewayProxyEvent; - testEvent.body = undefined; + describe('safeParse', () => { + it('should parse custom schema in envelope', () => { + const testCustomSchemaObject = generateMock(TestSchema); + const testEvent = TestEvents.apiGatewayProxyEvent as APIGatewayProxyEvent; + + testEvent.body = JSON.stringify(testCustomSchemaObject); + + const resp = ApiGatewayEnvelope.safeParse(testEvent, TestSchema); + expect(resp).toEqual({ + success: true, + data: testCustomSchemaObject, + }); + }); + + it('should return success false with original body if no body provided', () => { + const testEvent = TestEvents.apiGatewayProxyEvent as APIGatewayProxyEvent; + testEvent.body = undefined; + + const resp = ApiGatewayEnvelope.safeParse(testEvent, TestSchema); + expect(resp).toEqual({ + success: false, + error: expect.any(Error), + originalEvent: testEvent, + }); + }); + + it('should return success false with original body if invalid body provided', () => { + const testEvent = TestEvents.apiGatewayProxyEvent as APIGatewayProxyEvent; + testEvent.body = 'invalid'; - expect(() => apiGatewayEnvelope(testEvent, TestSchema)).toThrow(); + const resp = ApiGatewayEnvelope.safeParse(testEvent, TestSchema); + expect(resp).toEqual({ + success: false, + error: expect.any(SyntaxError), + originalEvent: testEvent, + }); + }); + it('should return success false if event is invalid', () => { + const resp = ApiGatewayEnvelope.safeParse( + 'invalid' as unknown, + TestSchema + ); + expect(resp).toEqual({ + success: false, + error: expect.any(ZodError), + originalEvent: 'invalid', + }); + }); }); }); diff --git a/packages/parser/tests/unit/envelopes/apigwv2.test.ts b/packages/parser/tests/unit/envelopes/apigwv2.test.ts index 0d2d225bf1..dd5a82609b 100644 --- a/packages/parser/tests/unit/envelopes/apigwv2.test.ts +++ b/packages/parser/tests/unit/envelopes/apigwv2.test.ts @@ -7,24 +7,88 @@ import { TestEvents, TestSchema } from '../schema/utils.js'; import { generateMock } from '@anatine/zod-mock'; import { APIGatewayProxyEventV2 } from 'aws-lambda'; -import { apiGatewayV2Envelope } from '../../../src/envelopes/'; +import { ApiGatewayV2Envelope } from '../../../src/envelopes/index.js'; describe('ApiGwV2Envelope ', () => { - it('should parse custom schema in envelope', () => { - const testEvent = - TestEvents.apiGatewayProxyV2Event as APIGatewayProxyEventV2; - const data = generateMock(TestSchema); + describe('parse', () => { + it('should parse custom schema in envelope', () => { + const testEvent = + TestEvents.apiGatewayProxyV2Event as APIGatewayProxyEventV2; + const data = generateMock(TestSchema); - testEvent.body = JSON.stringify(data); + testEvent.body = JSON.stringify(data); - expect(apiGatewayV2Envelope(testEvent, TestSchema)).toEqual(data); + expect(ApiGatewayV2Envelope.parse(testEvent, TestSchema)).toEqual(data); + }); + + it('should throw when no body provided', () => { + const testEvent = + TestEvents.apiGatewayProxyV2Event as APIGatewayProxyEventV2; + testEvent.body = undefined; + + expect(() => ApiGatewayV2Envelope.parse(testEvent, TestSchema)).toThrow(); + }); + + it('should throw when invalid body provided', () => { + const testEvent = + TestEvents.apiGatewayProxyV2Event as APIGatewayProxyEventV2; + testEvent.body = 'invalid'; + + expect(() => ApiGatewayV2Envelope.parse(testEvent, TestSchema)).toThrow(); + }); + it('should throw when invalid event provided', () => { + expect(() => + ApiGatewayV2Envelope.parse({ foo: 'bar' }, TestSchema) + ).toThrow(); + }); }); - it('should throw when no body provided', () => { - const testEvent = - TestEvents.apiGatewayProxyV2Event as APIGatewayProxyEventV2; - testEvent.body = undefined; + describe('safeParse', () => { + it('should parse custom schema in envelope', () => { + const testEvent = + TestEvents.apiGatewayProxyV2Event as APIGatewayProxyEventV2; + const data = generateMock(TestSchema); + + testEvent.body = JSON.stringify(data); + + expect(ApiGatewayV2Envelope.safeParse(testEvent, TestSchema)).toEqual({ + success: true, + data, + }); + }); + + it('should return success false with original body if no body provided', () => { + const testEvent = + TestEvents.apiGatewayProxyV2Event as APIGatewayProxyEventV2; + testEvent.body = undefined; + + expect(ApiGatewayV2Envelope.safeParse(testEvent, TestSchema)).toEqual({ + success: false, + error: expect.any(Error), + originalEvent: testEvent, + }); + }); + + it('should return success false with original body if invalid body provided', () => { + const testEvent = + TestEvents.apiGatewayProxyV2Event as APIGatewayProxyEventV2; + testEvent.body = 'invalid'; + + expect(ApiGatewayV2Envelope.safeParse(testEvent, TestSchema)).toEqual({ + success: false, + error: expect.any(Error), + originalEvent: testEvent, + }); + }); - expect(() => apiGatewayV2Envelope(testEvent, TestSchema)).toThrow(); + it('should return success false with original event if invalid event provided', () => { + expect( + ApiGatewayV2Envelope.safeParse({ foo: 'bar' }, TestSchema) + ).toEqual({ + success: false, + error: expect.any(Error), + originalEvent: { foo: 'bar' }, + }); + }); }); }); diff --git a/packages/parser/tests/unit/envelopes/cloudwatch.test.ts b/packages/parser/tests/unit/envelopes/cloudwatch.test.ts index e47d85f26d..adfe6e52f9 100644 --- a/packages/parser/tests/unit/envelopes/cloudwatch.test.ts +++ b/packages/parser/tests/unit/envelopes/cloudwatch.test.ts @@ -11,53 +11,121 @@ import { CloudWatchLogsDecodeSchema, } from '../../../src/schemas/'; import { TestSchema } from '../schema/utils.js'; -import { cloudWatchEnvelope } from '../../../src/envelopes/'; +import { CloudWatchEnvelope } from '../../../src/envelopes/index.js'; +import { ZodError } from 'zod'; describe('CloudWatch', () => { - it('should parse custom schema in envelope', () => { - const testEvent = { - awslogs: { - data: '', - }, - }; - - const data = generateMock(TestSchema); - const eventMock = generateMock(CloudWatchLogEventSchema, { - stringMap: { - message: () => JSON.stringify(data), - }, + describe('parse', () => { + it('should parse custom schema in envelope', () => { + const testEvent = { + awslogs: { + data: '', + }, + }; + + const data = generateMock(TestSchema); + const eventMock = generateMock(CloudWatchLogEventSchema, { + stringMap: { + message: () => JSON.stringify(data), + }, + }); + + const logMock = generateMock(CloudWatchLogsDecodeSchema); + logMock.logEvents = [eventMock]; + + testEvent.awslogs.data = gzipSync( + Buffer.from(JSON.stringify(logMock), 'utf8') + ).toString('base64'); + + expect(CloudWatchEnvelope.parse(testEvent, TestSchema)).toEqual([data]); }); - const logMock = generateMock(CloudWatchLogsDecodeSchema); - logMock.logEvents = [eventMock]; + it('should throw when schema does not match', () => { + const testEvent = { + awslogs: { + data: '', + }, + }; - testEvent.awslogs.data = gzipSync( - Buffer.from(JSON.stringify(logMock), 'utf8') - ).toString('base64'); + const eventMock = generateMock(CloudWatchLogEventSchema, { + stringMap: { + message: () => JSON.stringify({ foo: 'bar' }), + }, + }); - expect(cloudWatchEnvelope(testEvent, TestSchema)).toEqual([data]); + const logMock = generateMock(CloudWatchLogsDecodeSchema); + logMock.logEvents = [eventMock]; + + testEvent.awslogs.data = gzipSync( + Buffer.from(JSON.stringify(logMock), 'utf8') + ).toString('base64'); + + expect(() => CloudWatchEnvelope.parse(testEvent, TestSchema)).toThrow(); + }); }); - it('should throw when schema does not match', () => { - const testEvent = { - awslogs: { - data: '', - }, - }; - - const eventMock = generateMock(CloudWatchLogEventSchema, { - stringMap: { - message: () => JSON.stringify({ foo: 'bar' }), - }, + describe('safeParse', () => { + it('should parse custom schema in envelope', () => { + const testEvent = { + awslogs: { + data: '', + }, + }; + + const data = generateMock(TestSchema); + const eventMock = generateMock(CloudWatchLogEventSchema, { + stringMap: { + message: () => JSON.stringify(data), + }, + }); + + const logMock = generateMock(CloudWatchLogsDecodeSchema); + logMock.logEvents = [eventMock]; + + testEvent.awslogs.data = gzipSync( + Buffer.from(JSON.stringify(logMock), 'utf8') + ).toString('base64'); + + const actual = CloudWatchEnvelope.safeParse(testEvent, TestSchema); + expect(actual).toEqual({ + success: true, + data: [data], + }); }); - const logMock = generateMock(CloudWatchLogsDecodeSchema); - logMock.logEvents = [eventMock]; + it('should return success false when schema does not match', () => { + const testEvent = { + awslogs: { + data: '', + }, + }; + + const eventMock = generateMock(CloudWatchLogEventSchema, { + stringMap: { + message: () => JSON.stringify({ foo: 'bar' }), + }, + }); - testEvent.awslogs.data = gzipSync( - Buffer.from(JSON.stringify(logMock), 'utf8') - ).toString('base64'); + const logMock = generateMock(CloudWatchLogsDecodeSchema); + logMock.logEvents = [eventMock]; - expect(() => cloudWatchEnvelope(testEvent, TestSchema)).toThrow(); + testEvent.awslogs.data = gzipSync( + Buffer.from(JSON.stringify(logMock), 'utf8') + ).toString('base64'); + + expect(CloudWatchEnvelope.safeParse(testEvent, TestSchema)).toEqual({ + success: false, + error: expect.any(Error), + originalEvent: testEvent, + }); + }); + + it('should return success false when envelope does not match', () => { + expect(CloudWatchEnvelope.safeParse({ foo: 'bar' }, TestSchema)).toEqual({ + success: false, + error: expect.any(ZodError), + originalEvent: { foo: 'bar' }, + }); + }); }); }); diff --git a/packages/parser/tests/unit/envelopes/dynamodb.test.ts b/packages/parser/tests/unit/envelopes/dynamodb.test.ts index 0c9c940daf..4d2c9fb657 100644 --- a/packages/parser/tests/unit/envelopes/dynamodb.test.ts +++ b/packages/parser/tests/unit/envelopes/dynamodb.test.ts @@ -7,37 +7,122 @@ import { generateMock } from '@anatine/zod-mock'; import { TestEvents } from '../schema/utils.js'; import { DynamoDBStreamEvent } from 'aws-lambda'; -import { z } from 'zod'; -import { dynamoDDStreamEnvelope } from '../../../src/envelopes/'; +import { z, ZodError } from 'zod'; +import { DynamoDBStreamEnvelope } from '../../../src/envelopes/index.js'; describe('DynamoDB', () => { const schema = z.object({ Message: z.record(z.literal('S'), z.string()), Id: z.record(z.literal('N'), z.number().min(0).max(100)), }); + const mockOldImage = generateMock(schema); + const mockNewImage = generateMock(schema); + const dynamodbEvent = TestEvents.dynamoStreamEvent as DynamoDBStreamEvent; + (dynamodbEvent.Records[0].dynamodb!.NewImage as typeof mockNewImage) = + mockNewImage; + (dynamodbEvent.Records[1].dynamodb!.NewImage as typeof mockNewImage) = + mockNewImage; + (dynamodbEvent.Records[0].dynamodb!.OldImage as typeof mockOldImage) = + mockOldImage; + (dynamodbEvent.Records[1].dynamodb!.OldImage as typeof mockOldImage) = + mockOldImage; + describe('parse', () => { + it('parse should parse dynamodb envelope', () => { + const parsed = DynamoDBStreamEnvelope.parse(dynamodbEvent, schema); + expect(parsed[0]).toEqual({ + OldImage: mockOldImage, + NewImage: mockNewImage, + }); + expect(parsed[1]).toEqual({ + OldImage: mockOldImage, + NewImage: mockNewImage, + }); + }); + it('parse should throw error if envelope invalid', () => { + expect(() => + DynamoDBStreamEnvelope.parse({ foo: 'bar' }, schema) + ).toThrow(); + }); + it('parse should throw error if new or old image is invalid', () => { + const ddbEvent = TestEvents.dynamoStreamEvent as DynamoDBStreamEvent; + // eslint-disable-next-line @typescript-eslint/ban-ts-comment + // @ts-ignore + ddbEvent.Records[0].dynamodb!.NewImage.Id = 'foo'; + expect(() => DynamoDBStreamEnvelope.parse(ddbEvent, schema)).toThrow(); + }); + }); + + describe('safeParse', () => { + it('safeParse should parse dynamodb envelope', () => { + const parsed = DynamoDBStreamEnvelope.safeParse(dynamodbEvent, schema); + expect(parsed.success).toBe(true); + expect(parsed).toEqual({ + success: true, + data: [ + { + OldImage: mockOldImage, + NewImage: mockNewImage, + }, + { + OldImage: mockOldImage, + NewImage: mockNewImage, + }, + ], + }); + }); + it('safeParse should return error if NewImage is invalid', () => { + const invalidDDBEvent = + TestEvents.dynamoStreamEvent as DynamoDBStreamEvent; - it('should parse dynamodb envelope', () => { - const mockOldImage = generateMock(schema); - const mockNewImage = generateMock(schema); - const dynamodbEvent = TestEvents.dynamoStreamEvent as DynamoDBStreamEvent; - - (dynamodbEvent.Records[0].dynamodb!.NewImage as typeof mockNewImage) = - mockNewImage; - (dynamodbEvent.Records[1].dynamodb!.NewImage as typeof mockNewImage) = - mockNewImage; - (dynamodbEvent.Records[0].dynamodb!.OldImage as typeof mockOldImage) = - mockOldImage; - (dynamodbEvent.Records[1].dynamodb!.OldImage as typeof mockOldImage) = - mockOldImage; - - const parsed = dynamoDDStreamEnvelope(dynamodbEvent, schema); - expect(parsed[0]).toEqual({ - OldImage: mockOldImage, - NewImage: mockNewImage, + (invalidDDBEvent.Records[0].dynamodb!.NewImage as typeof mockNewImage) = { + Id: { N: 101 }, + Message: { S: 'foo' }, + }; + (invalidDDBEvent.Records[1].dynamodb!.NewImage as typeof mockNewImage) = + mockNewImage; + (invalidDDBEvent.Records[0].dynamodb!.OldImage as typeof mockOldImage) = + mockOldImage; + (invalidDDBEvent.Records[1].dynamodb!.OldImage as typeof mockOldImage) = + mockOldImage; + + const parsed = DynamoDBStreamEnvelope.safeParse(invalidDDBEvent, schema); + expect(parsed).toEqual({ + success: false, + error: expect.any(ZodError), + originalEvent: invalidDDBEvent, + }); + }); + + it('safeParse should return error if OldImage is invalid', () => { + const invalidDDBEvent = + TestEvents.dynamoStreamEvent as DynamoDBStreamEvent; + + (invalidDDBEvent.Records[0].dynamodb!.OldImage as typeof mockNewImage) = { + Id: { N: 101 }, + Message: { S: 'foo' }, + }; + (invalidDDBEvent.Records[1].dynamodb!.NewImage as typeof mockNewImage) = + mockNewImage; + (invalidDDBEvent.Records[0].dynamodb!.OldImage as typeof mockOldImage) = + mockOldImage; + (invalidDDBEvent.Records[0].dynamodb!.NewImage as typeof mockNewImage) = + mockNewImage; + + const parsed = DynamoDBStreamEnvelope.safeParse(invalidDDBEvent, schema); + expect(parsed).toEqual({ + success: false, + error: expect.any(ZodError), + originalEvent: invalidDDBEvent, + }); }); - expect(parsed[1]).toEqual({ - OldImage: mockOldImage, - NewImage: mockNewImage, + + it('safeParse should return error if envelope is invalid', () => { + const parsed = DynamoDBStreamEnvelope.safeParse({ foo: 'bar' }, schema); + expect(parsed).toEqual({ + success: false, + error: expect.any(ZodError), + originalEvent: { foo: 'bar' }, + }); }); }); }); diff --git a/packages/parser/tests/unit/envelopes/eventbridge.test.ts b/packages/parser/tests/unit/envelopes/eventbridge.test.ts index 5baaf12f9f..746d95b160 100644 --- a/packages/parser/tests/unit/envelopes/eventbridge.test.ts +++ b/packages/parser/tests/unit/envelopes/eventbridge.test.ts @@ -7,45 +7,116 @@ import { TestEvents, TestSchema } from '../schema/utils.js'; import { generateMock } from '@anatine/zod-mock'; import { EventBridgeEvent } from 'aws-lambda'; -import { eventBridgeEnvelope } from '../../../src/envelopes/'; +import { ZodError } from 'zod'; +import { EventBridgeEnvelope } from '../../../src/envelopes/index.js'; describe('EventBridgeEnvelope ', () => { - it('should parse eventbridge event', () => { - const eventBridgeEvent = TestEvents.eventBridgeEvent as EventBridgeEvent< - string, - object - >; + describe('parse', () => { + it('should parse eventbridge event', () => { + const eventBridgeEvent = TestEvents.eventBridgeEvent as EventBridgeEvent< + string, + object + >; - const data = generateMock(TestSchema); + const data = generateMock(TestSchema); - eventBridgeEvent.detail = data; + eventBridgeEvent.detail = data; - expect(eventBridgeEnvelope(eventBridgeEvent, TestSchema)).toEqual(data); - }); + expect(EventBridgeEnvelope.parse(eventBridgeEvent, TestSchema)).toEqual( + data + ); + }); + + it('should throw error if detail type does not match schema', () => { + const eventBridgeEvent = TestEvents.eventBridgeEvent as EventBridgeEvent< + string, + object + >; + + eventBridgeEvent.detail = { + foo: 'bar', + }; - it('should throw error if detail type does not match schema', () => { - const eventBridgeEvent = TestEvents.eventBridgeEvent as EventBridgeEvent< - string, - object - >; + expect(() => + EventBridgeEnvelope.parse(eventBridgeEvent, TestSchema) + ).toThrowError(); + }); - eventBridgeEvent.detail = { - foo: 'bar', - }; + it('should throw when invalid data type provided', () => { + const eventBridgeEvent = TestEvents.eventBridgeEvent as EventBridgeEvent< + string, + object + >; - expect(() => - eventBridgeEnvelope(eventBridgeEvent, TestSchema) - ).toThrowError(); + eventBridgeEvent.detail = 1 as unknown as object; + + expect(() => + EventBridgeEnvelope.parse(eventBridgeEvent, TestSchema) + ).toThrow(); + }); }); - it('should throw when invalid data type provided', () => { - const eventBridgeEvent = TestEvents.eventBridgeEvent as EventBridgeEvent< - string, - object - >; + describe('safeParse', () => { + it('should safe parse eventbridge event', () => { + const eventBridgeEvent = TestEvents.eventBridgeEvent as EventBridgeEvent< + string, + object + >; + + const data = generateMock(TestSchema); + + eventBridgeEvent.detail = data; + + expect( + EventBridgeEnvelope.safeParse(eventBridgeEvent, TestSchema) + ).toEqual({ + success: true, + data: data, + }); + }); + + it('should safe parse eventbridge event and return original event if invalid', () => { + const eventBridgeEvent = TestEvents.eventBridgeEvent as EventBridgeEvent< + string, + object + >; + + eventBridgeEvent.detail = { + foo: 'bar', + }; + + expect( + EventBridgeEnvelope.safeParse(eventBridgeEvent, TestSchema) + ).toEqual({ + success: false, + error: expect.any(ZodError), + originalEvent: eventBridgeEvent, + }); + }); + + it('should safe parse eventbridge event and return original event if invalid data type', () => { + const eventBridgeEvent = TestEvents.eventBridgeEvent as EventBridgeEvent< + string, + object + >; + + eventBridgeEvent.detail = 1 as unknown as object; - eventBridgeEvent.detail = 1 as unknown as object; + expect( + EventBridgeEnvelope.safeParse(eventBridgeEvent, TestSchema) + ).toEqual({ + success: false, + error: expect.any(Error), + originalEvent: eventBridgeEvent, + }); + }); - expect(() => eventBridgeEnvelope(eventBridgeEvent, TestSchema)).toThrow(); + it('should return original event and error envelope is invalid', () => { + expect(EventBridgeEnvelope.safeParse(1, TestSchema)).toEqual({ + success: false, + error: expect.any(ZodError), + originalEvent: 1, + }); + }); }); }); diff --git a/packages/parser/tests/unit/envelopes/kafka.test.ts b/packages/parser/tests/unit/envelopes/kafka.test.ts index 37657bf93a..5c55013244 100644 --- a/packages/parser/tests/unit/envelopes/kafka.test.ts +++ b/packages/parser/tests/unit/envelopes/kafka.test.ts @@ -7,33 +7,90 @@ import { generateMock } from '@anatine/zod-mock'; import { TestEvents, TestSchema } from '../schema/utils.js'; import { MSKEvent, SelfManagedKafkaEvent } from 'aws-lambda'; -import { kafkaEnvelope } from '../../../src/envelopes/'; +import { KafkaEnvelope } from '../../../src/envelopes/index.js'; describe('Kafka', () => { - it('should parse MSK kafka envelope', () => { - const mock = generateMock(TestSchema); + describe('parse', () => { + it('should parse MSK kafka envelope', () => { + const mock = generateMock(TestSchema); - const kafkaEvent = TestEvents.kafkaEventMsk as MSKEvent; - kafkaEvent.records['mytopic-0'][0].value = Buffer.from( - JSON.stringify(mock) - ).toString('base64'); + const kafkaEvent = TestEvents.kafkaEventMsk as MSKEvent; + kafkaEvent.records['mytopic-0'][0].value = Buffer.from( + JSON.stringify(mock) + ).toString('base64'); - const result = kafkaEnvelope(kafkaEvent, TestSchema); + const result = KafkaEnvelope.parse(kafkaEvent, TestSchema); - expect(result).toEqual([[mock]]); - }); + expect(result).toEqual([[mock]]); + }); + + it('should parse Self Managed kafka envelope', () => { + const mock = generateMock(TestSchema); + + const kafkaEvent = + TestEvents.kafkaEventSelfManaged as SelfManagedKafkaEvent; + kafkaEvent.records['mytopic-0'][0].value = Buffer.from( + JSON.stringify(mock) + ).toString('base64'); + + const result = KafkaEnvelope.parse(kafkaEvent, TestSchema); + + expect(result).toEqual([[mock]]); + }); + + describe('safeParse', () => { + it('should parse MSK kafka envelope', () => { + const mock = generateMock(TestSchema); + + const kafkaEvent = TestEvents.kafkaEventMsk as MSKEvent; + kafkaEvent.records['mytopic-0'][0].value = Buffer.from( + JSON.stringify(mock) + ).toString('base64'); + + const result = KafkaEnvelope.safeParse(kafkaEvent, TestSchema); + + expect(result).toEqual({ + success: true, + data: [mock], + }); + }); + + it('should parse Self Managed kafka envelope', () => { + const mock = generateMock(TestSchema); + + const kafkaEvent = + TestEvents.kafkaEventSelfManaged as SelfManagedKafkaEvent; + kafkaEvent.records['mytopic-0'][0].value = Buffer.from( + JSON.stringify(mock) + ).toString('base64'); + + const result = KafkaEnvelope.safeParse(kafkaEvent, TestSchema); - it('should parse Self Managed kafka envelope', () => { - const mock = generateMock(TestSchema); + expect(result).toEqual({ + success: true, + data: [mock], + }); + }); - const kafkaEvent = - TestEvents.kafkaEventSelfManaged as SelfManagedKafkaEvent; - kafkaEvent.records['mytopic-0'][0].value = Buffer.from( - JSON.stringify(mock) - ).toString('base64'); + it('should return original event on failure', () => { + const kafkaEvent = TestEvents.kafkaEventMsk as MSKEvent; + kafkaEvent.records['mytopic-0'][0].value = 'not a valid json'; - const result = kafkaEnvelope(kafkaEvent, TestSchema); + const result = KafkaEnvelope.safeParse(kafkaEvent, TestSchema); - expect(result).toEqual([[mock]]); + expect(result).toEqual({ + success: false, + error: expect.any(Error), + originalEvent: kafkaEvent, + }); + }); + it('should return original event and error if envelope is invalid', () => { + expect(KafkaEnvelope.safeParse({ foo: 'bar' }, TestSchema)).toEqual({ + success: false, + error: expect.any(Error), + originalEvent: { foo: 'bar' }, + }); + }); + }); }); }); diff --git a/packages/parser/tests/unit/envelopes/kinesis-firehose.test.ts b/packages/parser/tests/unit/envelopes/kinesis-firehose.test.ts index 65c7be5fd5..50951d7c0c 100644 --- a/packages/parser/tests/unit/envelopes/kinesis-firehose.test.ts +++ b/packages/parser/tests/unit/envelopes/kinesis-firehose.test.ts @@ -8,48 +8,157 @@ import { TestEvents, TestSchema } from '../schema/utils.js'; import { generateMock } from '@anatine/zod-mock'; import { KinesisFirehoseSchema } from '../../../src/schemas/'; import { z } from 'zod'; -import { kinesisFirehoseEnvelope } from '../../../src/envelopes/'; +import { KinesisFirehoseEnvelope } from '../../../src/envelopes/index.js'; describe('Kinesis Firehose Envelope', () => { - it('should parse records for PutEvent', () => { - const mock = generateMock(TestSchema); - const testEvent = TestEvents.kinesisFirehosePutEvent as z.infer< - typeof KinesisFirehoseSchema - >; + describe('parse', () => { + it('should parse records for PutEvent', () => { + const mock = generateMock(TestSchema); + const testEvent = TestEvents.kinesisFirehosePutEvent as z.infer< + typeof KinesisFirehoseSchema + >; - testEvent.records.map((record) => { - record.data = Buffer.from(JSON.stringify(mock)).toString('base64'); + testEvent.records.map((record) => { + record.data = Buffer.from(JSON.stringify(mock)).toString('base64'); + }); + + const resp = KinesisFirehoseEnvelope.parse(testEvent, TestSchema); + expect(resp).toEqual([mock, mock]); }); - const resp = kinesisFirehoseEnvelope(testEvent, TestSchema); - expect(resp).toEqual([mock, mock]); - }); + it('should parse a single record for SQS event', () => { + const mock = generateMock(TestSchema); + const testEvent = TestEvents.kinesisFirehoseSQSEvent as z.infer< + typeof KinesisFirehoseSchema + >; + + testEvent.records.map((record) => { + record.data = Buffer.from(JSON.stringify(mock)).toString('base64'); + }); + + const resp = KinesisFirehoseEnvelope.parse(testEvent, TestSchema); + expect(resp).toEqual([mock]); + }); + + it('should parse records for kinesis event', () => { + const mock = generateMock(TestSchema); + const testEvent = TestEvents.kinesisFirehoseKinesisEvent as z.infer< + typeof KinesisFirehoseSchema + >; - it('should parse a single record for SQS event', () => { - const mock = generateMock(TestSchema); - const testEvent = TestEvents.kinesisFirehoseSQSEvent as z.infer< - typeof KinesisFirehoseSchema - >; + testEvent.records.map((record) => { + record.data = Buffer.from(JSON.stringify(mock)).toString('base64'); + }); - testEvent.records.map((record) => { - record.data = Buffer.from(JSON.stringify(mock)).toString('base64'); + const resp = KinesisFirehoseEnvelope.parse(testEvent, TestSchema); + expect(resp).toEqual([mock, mock]); }); + it('should throw if record is not base64 encoded', () => { + const testEvent = TestEvents.kinesisFirehosePutEvent as z.infer< + typeof KinesisFirehoseSchema + >; - const resp = kinesisFirehoseEnvelope(testEvent, TestSchema); - expect(resp).toEqual([mock]); + testEvent.records.map((record) => { + record.data = 'not base64 encoded'; + }); + + expect(() => { + KinesisFirehoseEnvelope.parse(testEvent, TestSchema); + }).toThrow(); + }); + it('should throw if envelope is invalid', () => { + expect(() => { + KinesisFirehoseEnvelope.parse({ foo: 'bar' }, TestSchema); + }).toThrow(); + }); + it('should throw when schema does not match record', () => { + const testEvent = TestEvents.kinesisFirehosePutEvent as z.infer< + typeof KinesisFirehoseSchema + >; + + testEvent.records.map((record) => { + record.data = Buffer.from('not a valid json').toString('base64'); + }); + + expect(() => { + KinesisFirehoseEnvelope.parse(testEvent, TestSchema); + }).toThrow(); + }); }); + describe('safeParse', () => { + it('should parse records for PutEvent', () => { + const mock = generateMock(TestSchema); + const testEvent = TestEvents.kinesisFirehosePutEvent as z.infer< + typeof KinesisFirehoseSchema + >; - it('should parse records for kinesis event', () => { - const mock = generateMock(TestSchema); - const testEvent = TestEvents.kinesisFirehoseKinesisEvent as z.infer< - typeof KinesisFirehoseSchema - >; + testEvent.records.map((record) => { + record.data = Buffer.from(JSON.stringify(mock)).toString('base64'); + }); - testEvent.records.map((record) => { - record.data = Buffer.from(JSON.stringify(mock)).toString('base64'); + const resp = KinesisFirehoseEnvelope.safeParse(testEvent, TestSchema); + expect(resp).toEqual({ success: true, data: [mock, mock] }); }); - const resp = kinesisFirehoseEnvelope(testEvent, TestSchema); - expect(resp).toEqual([mock, mock]); + it('should parse a single record for SQS event', () => { + const mock = generateMock(TestSchema); + const testEvent = TestEvents.kinesisFirehoseSQSEvent as z.infer< + typeof KinesisFirehoseSchema + >; + + testEvent.records.map((record) => { + record.data = Buffer.from(JSON.stringify(mock)).toString('base64'); + }); + + const resp = KinesisFirehoseEnvelope.safeParse(testEvent, TestSchema); + expect(resp).toEqual({ success: true, data: [mock] }); + }); + + it('should parse records for kinesis event', () => { + const mock = generateMock(TestSchema); + const testEvent = TestEvents.kinesisFirehoseKinesisEvent as z.infer< + typeof KinesisFirehoseSchema + >; + + testEvent.records.map((record) => { + record.data = Buffer.from(JSON.stringify(mock)).toString('base64'); + }); + + const resp = KinesisFirehoseEnvelope.safeParse(testEvent, TestSchema); + expect(resp).toEqual({ success: true, data: [mock, mock] }); + }); + it('should return original event if envelope is invalid', () => { + expect( + KinesisFirehoseEnvelope.safeParse({ foo: 'bar' }, TestSchema) + ).toEqual({ + success: false, + error: expect.any(Error), + originalEvent: { foo: 'bar' }, + }); + }); + it('should return original event if record is not base64 encoded', () => { + const testEvent = TestEvents.kinesisFirehosePutEvent as z.infer< + typeof KinesisFirehoseSchema + >; + + testEvent.records.map((record) => { + record.data = 'not base64 encoded'; + }); + + expect(KinesisFirehoseEnvelope.safeParse(testEvent, TestSchema)).toEqual({ + success: false, + error: expect.any(Error), + originalEvent: testEvent, + }); + }); + it('should return original event envelope is invalid', () => { + expect( + KinesisFirehoseEnvelope.safeParse({ foo: 'bar' }, TestSchema) + ).toEqual({ + success: false, + error: expect.any(Error), + originalEvent: { foo: 'bar' }, + }); + }); }); }); diff --git a/packages/parser/tests/unit/envelopes/kinesis.test.ts b/packages/parser/tests/unit/envelopes/kinesis.test.ts index 67dfc464eb..f84149c252 100644 --- a/packages/parser/tests/unit/envelopes/kinesis.test.ts +++ b/packages/parser/tests/unit/envelopes/kinesis.test.ts @@ -7,20 +7,66 @@ import { generateMock } from '@anatine/zod-mock'; import { KinesisStreamEvent } from 'aws-lambda'; import { TestEvents, TestSchema } from '../schema/utils.js'; -import { kinesisEnvelope } from '../../../src/envelopes/'; +import { KinesisEnvelope } from '../../../src/envelopes/index.js'; +import { ZodError } from 'zod'; -describe('Kinesis', () => { - it('should parse Kinesis Stream event', () => { - const mock = generateMock(TestSchema); - const testEvent = TestEvents.kinesisStreamEvent as KinesisStreamEvent; +describe('KinesisEnvelope', () => { + describe('parse', () => { + it('should parse Kinesis Stream event', () => { + const mock = generateMock(TestSchema); + const testEvent = TestEvents.kinesisStreamEvent as KinesisStreamEvent; - testEvent.Records.map((record) => { - record.kinesis.data = Buffer.from(JSON.stringify(mock)).toString( - 'base64' - ); + testEvent.Records.map((record) => { + record.kinesis.data = Buffer.from(JSON.stringify(mock)).toString( + 'base64' + ); + }); + + const resp = KinesisEnvelope.parse(testEvent, TestSchema); + expect(resp).toEqual([mock, mock]); + }); + it('should throw if envelope is invalid', () => { + expect(() => KinesisEnvelope.parse({ foo: 'bar' }, TestSchema)).toThrow(); + }); + it('should throw if record is invalid', () => { + const testEvent = TestEvents.kinesisStreamEvent as KinesisStreamEvent; + testEvent.Records[0].kinesis.data = 'invalid'; + expect(() => KinesisEnvelope.parse(testEvent, TestSchema)).toThrow(); }); + }); + + describe('safeParse', () => { + it('should parse Kinesis Stream event', () => { + const mock = generateMock(TestSchema); + const testEvent = TestEvents.kinesisStreamEvent as KinesisStreamEvent; - const resp = kinesisEnvelope(testEvent, TestSchema); - expect(resp).toEqual([mock, mock]); + testEvent.Records.map((record) => { + record.kinesis.data = Buffer.from(JSON.stringify(mock)).toString( + 'base64' + ); + }); + + const resp = KinesisEnvelope.safeParse(testEvent, TestSchema); + expect(resp).toEqual({ success: true, data: [mock, mock] }); + }); + it('should return original event if envelope is invalid', () => { + const testEvent = { foo: 'bar' }; + const resp = KinesisEnvelope.safeParse(testEvent, TestSchema); + expect(resp).toEqual({ + success: false, + error: expect.any(ZodError), + originalEvent: testEvent, + }); + }); + it('should return original event if record is invalid', () => { + const testEvent = TestEvents.kinesisStreamEvent as KinesisStreamEvent; + testEvent.Records[0].kinesis.data = 'invalid'; + const resp = KinesisEnvelope.safeParse(testEvent, TestSchema); + expect(resp).toEqual({ + success: false, + error: expect.any(SyntaxError), + originalEvent: testEvent, + }); + }); }); }); diff --git a/packages/parser/tests/unit/envelopes/lambda.test.ts b/packages/parser/tests/unit/envelopes/lambda.test.ts index 1cf6e20cea..56b0551cfd 100644 --- a/packages/parser/tests/unit/envelopes/lambda.test.ts +++ b/packages/parser/tests/unit/envelopes/lambda.test.ts @@ -1,30 +1,92 @@ +import { LambdaFunctionUrlEnvelope } from '../../../src/envelopes/index.js'; +import { TestEvents, TestSchema } from '../schema/utils.js'; +import { generateMock } from '@anatine/zod-mock'; +import { APIGatewayProxyEventV2 } from 'aws-lambda'; + /** * Test built in schema envelopes for Lambda Functions URL * * @group unit/parser/envelopes */ -import { TestEvents, TestSchema } from '../schema/utils.js'; -import { generateMock } from '@anatine/zod-mock'; -import { APIGatewayProxyEventV2 } from 'aws-lambda'; -import { lambdaFunctionUrlEnvelope } from '../../../src/envelopes/'; - describe('Lambda Functions Url ', () => { - it('should parse custom schema in envelope', () => { - const testEvent = - TestEvents.lambdaFunctionUrlEvent as APIGatewayProxyEventV2; - const data = generateMock(TestSchema); + describe('parse', () => { + it('should parse custom schema in envelope', () => { + const testEvent = + TestEvents.lambdaFunctionUrlEvent as APIGatewayProxyEventV2; + const data = generateMock(TestSchema); - testEvent.body = JSON.stringify(data); + testEvent.body = JSON.stringify(data); - expect(lambdaFunctionUrlEnvelope(testEvent, TestSchema)).toEqual(data); + expect(LambdaFunctionUrlEnvelope.parse(testEvent, TestSchema)).toEqual( + data + ); + }); + + it('should throw when no body provided', () => { + const testEvent = + TestEvents.apiGatewayProxyV2Event as APIGatewayProxyEventV2; + testEvent.body = undefined; + + expect(() => + LambdaFunctionUrlEnvelope.parse(testEvent, TestSchema) + ).toThrow(); + }); + + it('should throw when envelope is not valid', () => { + expect(() => + LambdaFunctionUrlEnvelope.parse({ foo: 'bar' }, TestSchema) + ).toThrow(); + }); + + it('should throw when body does not match schema', () => { + const testEvent = + TestEvents.lambdaFunctionUrlEvent as APIGatewayProxyEventV2; + testEvent.body = JSON.stringify({ foo: 'bar' }); + + expect(() => + LambdaFunctionUrlEnvelope.parse(testEvent, TestSchema) + ).toThrow(); + }); }); + describe('safeParse', () => { + it('should parse custom schema in envelope', () => { + const testEvent = + TestEvents.lambdaFunctionUrlEvent as APIGatewayProxyEventV2; + const data = generateMock(TestSchema); + + testEvent.body = JSON.stringify(data); + + expect( + LambdaFunctionUrlEnvelope.safeParse(testEvent, TestSchema) + ).toEqual({ + success: true, + data, + }); + }); + + it('should return original event when envelope is not valid', () => { + expect( + LambdaFunctionUrlEnvelope.safeParse({ foo: 'bar' }, TestSchema) + ).toEqual({ + success: false, + error: expect.any(Error), + originalEvent: { foo: 'bar' }, + }); + }); - it('should throw when no body provided', () => { - const testEvent = - TestEvents.apiGatewayProxyV2Event as APIGatewayProxyEventV2; - testEvent.body = undefined; + it('should return original event when body does not match schema', () => { + const testEvent = + TestEvents.lambdaFunctionUrlEvent as APIGatewayProxyEventV2; + testEvent.body = JSON.stringify({ foo: 'bar' }); - expect(() => lambdaFunctionUrlEnvelope(testEvent, TestSchema)).toThrow(); + expect( + LambdaFunctionUrlEnvelope.safeParse(testEvent, TestSchema) + ).toEqual({ + success: false, + error: expect.any(Error), + originalEvent: testEvent, + }); + }); }); }); diff --git a/packages/parser/tests/unit/envelopes/sns.test.ts b/packages/parser/tests/unit/envelopes/sns.test.ts index 0bf36c94c0..c1e9b67bee 100644 --- a/packages/parser/tests/unit/envelopes/sns.test.ts +++ b/packages/parser/tests/unit/envelopes/sns.test.ts @@ -4,48 +4,160 @@ * @group unit/parser/envelopes */ -import { z } from 'zod'; +import { z, ZodError } from 'zod'; import { generateMock } from '@anatine/zod-mock'; import { SNSEvent, SQSEvent } from 'aws-lambda'; import { TestEvents, TestSchema } from '../schema/utils.js'; -import { snsEnvelope, snsSqsEnvelope } from '../../../src/envelopes/'; +import { SnsEnvelope, SnsSqsEnvelope } from '../../../src/envelopes/index.js'; -describe('SNS Envelope', () => { - it('should parse custom schema in envelope', () => { - const testEvent = TestEvents.snsEvent as SNSEvent; +describe('Sns and SQS Envelope', () => { + describe('SnsSqsEnvelope parse', () => { + it('should parse sqs inside sns envelope', () => { + const snsSqsTestEvent = TestEvents.snsSqsEvent as SQSEvent; - const testRecords = [] as z.infer[]; + const data = generateMock(TestSchema); + const snsEvent = JSON.parse(snsSqsTestEvent.Records[0].body); + snsEvent.Message = JSON.stringify(data); - testEvent.Records.map((record) => { - const value = generateMock(TestSchema); - testRecords.push(value); - record.Sns.Message = JSON.stringify(value); - }); + snsSqsTestEvent.Records[0].body = JSON.stringify(snsEvent); - expect(snsEnvelope(testEvent, TestSchema)).toEqual(testRecords); + expect(SnsSqsEnvelope.parse(snsSqsTestEvent, TestSchema)).toEqual([data]); + }); }); + describe('SnsSqsEnvelope safeParse', () => { + it('should parse sqs inside sns envelope', () => { + const snsSqsTestEvent = TestEvents.snsSqsEvent as SQSEvent; + + const data = generateMock(TestSchema); + const snsEvent = JSON.parse(snsSqsTestEvent.Records[0].body); + snsEvent.Message = JSON.stringify(data); + + snsSqsTestEvent.Records[0].body = JSON.stringify(snsEvent); + + expect(SnsSqsEnvelope.safeParse(snsSqsTestEvent, TestSchema)).toEqual({ + success: true, + data: [data], + }); + }); + it('should return error when envelope is not valid', () => { + expect(SnsSqsEnvelope.safeParse({ foo: 'bar' }, TestSchema)).toEqual({ + success: false, + error: expect.any(Error), + originalEvent: { foo: 'bar' }, + }); + }); + it('should return error if message does not match schema', () => { + const snsSqsTestEvent = TestEvents.snsSqsEvent as SQSEvent; + + const snsEvent = JSON.parse(snsSqsTestEvent.Records[0].body); + snsEvent.Message = JSON.stringify({ + foo: 'bar', + }); + + snsSqsTestEvent.Records[0].body = JSON.stringify(snsEvent); - it('should throw if message does not macht schema', () => { - const testEvent = TestEvents.snsEvent as SNSEvent; + expect(SnsSqsEnvelope.safeParse(snsSqsTestEvent, TestSchema)).toEqual({ + success: false, + error: expect.any(ZodError), + originalEvent: snsSqsTestEvent, + }); + }); + it('should return error if sns message is not valid', () => { + const snsSqsTestEvent = TestEvents.snsSqsEvent as SQSEvent; - testEvent.Records.map((record) => { - record.Sns.Message = JSON.stringify({ + snsSqsTestEvent.Records[0].body = JSON.stringify({ foo: 'bar', }); + + expect(SnsSqsEnvelope.safeParse(snsSqsTestEvent, TestSchema)).toEqual({ + success: false, + error: expect.any(ZodError), + originalEvent: snsSqsTestEvent, + }); }); + it('should return error if JSON parse fails for record.body', () => { + const snsSqsTestEvent = TestEvents.snsSqsEvent as SQSEvent; - expect(() => snsEnvelope(testEvent, TestSchema)).toThrowError(); + snsSqsTestEvent.Records[0].body = 'not a json string'; + + expect(SnsSqsEnvelope.safeParse(snsSqsTestEvent, TestSchema)).toEqual({ + success: false, + error: expect.any(Error), + originalEvent: snsSqsTestEvent, + }); + }); }); +}); +describe('SnsEnvelope', () => { + describe('parse', () => { + it('should parse custom schema in envelope', () => { + const testEvent = TestEvents.snsEvent as SNSEvent; - it('should parse sqs inside sns envelope', () => { - const snsSqsTestEvent = TestEvents.snsSqsEvent as SQSEvent; + const testRecords = [] as z.infer[]; - const data = generateMock(TestSchema); - const snsEvent = JSON.parse(snsSqsTestEvent.Records[0].body); - snsEvent.Message = JSON.stringify(data); + testEvent.Records.map((record) => { + const value = generateMock(TestSchema); + testRecords.push(value); + record.Sns.Message = JSON.stringify(value); + }); - snsSqsTestEvent.Records[0].body = JSON.stringify(snsEvent); + expect(SnsEnvelope.parse(testEvent, TestSchema)).toEqual(testRecords); + }); + + it('should throw if message does not macht schema', () => { + const testEvent = TestEvents.snsEvent as SNSEvent; + + testEvent.Records.map((record) => { + record.Sns.Message = JSON.stringify({ + foo: 'bar', + }); + }); + + expect(() => SnsEnvelope.parse(testEvent, TestSchema)).toThrow(); + }); + it('should throw if envelope is not valid', () => { + expect(() => SnsEnvelope.parse({ foo: 'bar' }, TestSchema)).toThrow(); + }); + }); + describe('safeParse', () => { + it('should parse custom schema in envelope', () => { + const testEvent = TestEvents.snsEvent as SNSEvent; + + const testRecords = [] as z.infer[]; + + testEvent.Records.map((record) => { + const value = generateMock(TestSchema); + testRecords.push(value); + record.Sns.Message = JSON.stringify(value); + }); - expect(snsSqsEnvelope(snsSqsTestEvent, TestSchema)).toEqual([data]); + expect(SnsEnvelope.safeParse(testEvent, TestSchema)).toEqual({ + success: true, + data: testRecords, + }); + }); + + it('should return error when message does not macht schema', () => { + const testEvent = TestEvents.snsEvent as SNSEvent; + + testEvent.Records.map((record) => { + record.Sns.Message = JSON.stringify({ + foo: 'bar', + }); + }); + + expect(SnsEnvelope.safeParse(testEvent, TestSchema)).toEqual({ + success: false, + error: expect.any(ZodError), + originalEvent: testEvent, + }); + }); + it('should return error when envelope is not valid', () => { + expect(SnsEnvelope.safeParse({ foo: 'bar' }, TestSchema)).toEqual({ + success: false, + error: expect.any(Error), + originalEvent: { foo: 'bar' }, + }); + }); }); }); diff --git a/packages/parser/tests/unit/envelopes/sqs.test.ts b/packages/parser/tests/unit/envelopes/sqs.test.ts index 7725e1a992..4d1ab3a419 100644 --- a/packages/parser/tests/unit/envelopes/sqs.test.ts +++ b/packages/parser/tests/unit/envelopes/sqs.test.ts @@ -7,39 +7,64 @@ import { generateMock } from '@anatine/zod-mock'; import { TestEvents, TestSchema } from '../schema/utils.js'; import { SQSEvent } from 'aws-lambda'; -import { sqsEnvelope } from '../../../src/envelopes/'; +import { SqsEnvelope } from '../../../src/envelopes/sqs.js'; +import { ZodError } from 'zod'; describe('SqsEnvelope ', () => { - it('should parse custom schema in envelope', () => { - const mock = generateMock(TestSchema); + describe('parse', () => { + it('should parse custom schema in envelope', () => { + const mock = generateMock(TestSchema); - const sqsEvent = TestEvents.sqsEvent as SQSEvent; - sqsEvent.Records[0].body = JSON.stringify(mock); - sqsEvent.Records[1].body = JSON.stringify(mock); + const sqsEvent = TestEvents.sqsEvent as SQSEvent; + sqsEvent.Records[0].body = JSON.stringify(mock); + sqsEvent.Records[1].body = JSON.stringify(mock); - const resp = sqsEnvelope(sqsEvent, TestSchema); - expect(resp).toEqual([mock, mock]); - }); + const resp = SqsEnvelope.parse(sqsEvent, TestSchema); + expect(resp).toEqual([mock, mock]); + }); + + it('should throw error if invalid keys for a schema', () => { + expect(() => { + SqsEnvelope.parse({ Records: [{ foo: 'bar' }] }, TestSchema); + }).toThrow(); + }); - it('should throw error if invalid keys for a schema', () => { - expect(() => { - sqsEnvelope({ Records: [{ foo: 'bar' }] }, TestSchema); - }).toThrow(); + it('should throw if invalid envelope', () => { + expect(() => { + SqsEnvelope.parse({ foo: 'bar' }, TestSchema); + }).toThrow(); + }); }); + describe('safeParse', () => { + it('should parse custom schema in envelope', () => { + const mock = generateMock(TestSchema); + + const sqsEvent = TestEvents.sqsEvent as SQSEvent; + sqsEvent.Records[0].body = JSON.stringify(mock); + sqsEvent.Records[1].body = JSON.stringify(mock); + + expect(SqsEnvelope.safeParse(sqsEvent, TestSchema)).toEqual({ + success: true, + data: [mock, mock], + }); + }); + + it('should return error if event does not match schema', () => { + const sqsEvent = TestEvents.sqsEvent as SQSEvent; + sqsEvent.Records[0].body = JSON.stringify({ foo: 'bar' }); + expect(SqsEnvelope.safeParse(sqsEvent, TestSchema)).toEqual({ + success: false, + error: expect.any(ZodError), + originalEvent: sqsEvent, + }); + }); - it('should throw error if invalid values for a schema', () => { - expect(() => { - sqsEnvelope( - { - Records: [ - { - name: 'foo', - age: 17, - }, - ], - }, - TestSchema - ); - }).toThrow(); + it('should return error if envelope is invalid', () => { + expect(SqsEnvelope.safeParse({ foo: 'bar' }, TestSchema)).toEqual({ + success: false, + error: expect.any(ZodError), + originalEvent: { foo: 'bar' }, + }); + }); }); }); diff --git a/packages/parser/tests/unit/envelopes/vpc-lattice.test.ts b/packages/parser/tests/unit/envelopes/vpc-lattice.test.ts index 7ce781100e..a4282064d2 100644 --- a/packages/parser/tests/unit/envelopes/vpc-lattice.test.ts +++ b/packages/parser/tests/unit/envelopes/vpc-lattice.test.ts @@ -6,33 +6,92 @@ import { generateMock } from '@anatine/zod-mock'; import { TestEvents, TestSchema } from '../schema/utils.js'; -import { VpcLatticeSchema } from '../../../src/schemas/'; -import { z } from 'zod'; -import { vpcLatticeEnvelope } from '../../../src/envelopes/'; +import { VpcLatticeEnvelope } from '../../../src/envelopes/index.js'; +import { VpcLatticeEvent } from '../../../src/types/index.js'; -describe('VPC Lattice envelope', () => { - it('should parse VPC Lattice event', () => { - const mock = generateMock(TestSchema); - const testEvent = TestEvents.vpcLatticeEvent as z.infer< - typeof VpcLatticeSchema - >; +describe('VpcLatticeEnvelope', () => { + describe('parse', () => { + it('should parse VPC Lattice event', () => { + const mock = generateMock(TestSchema); + const testEvent = TestEvents.vpcLatticeEvent as VpcLatticeEvent; - testEvent.body = JSON.stringify(mock); + testEvent.body = JSON.stringify(mock); - const resp = vpcLatticeEnvelope(testEvent, TestSchema); + const resp = VpcLatticeEnvelope.parse(testEvent, TestSchema); - expect(resp).toEqual(mock); + expect(resp).toEqual(mock); + }); + + it('should parse VPC Lattice event with trailing slash', () => { + const mock = generateMock(TestSchema); + const testEvent = + TestEvents.vpcLatticeEventPathTrailingSlash as VpcLatticeEvent; + + testEvent.body = JSON.stringify(mock); + + const resp = VpcLatticeEnvelope.parse(testEvent, TestSchema); + expect(resp).toEqual(mock); + }); + + it('should throw if event is not a VPC Lattice event', () => { + expect(() => + VpcLatticeEnvelope.parse({ foo: 'bar' }, TestSchema) + ).toThrow(); + }); + + it('should throw if body does not match schema', () => { + const testEvent = TestEvents.vpcLatticeEvent as VpcLatticeEvent; + + testEvent.body = JSON.stringify({ foo: 'bar' }); + + expect(() => VpcLatticeEnvelope.parse(testEvent, TestSchema)).toThrow(); + }); }); - it('should parse VPC Lattice event with trailing slash', () => { - const mock = generateMock(TestSchema); - const testEvent = TestEvents.vpcLatticeEventPathTrailingSlash as z.infer< - typeof VpcLatticeSchema - >; + describe('safeParse', () => { + it('should parse VPC Lattice event', () => { + const mock = generateMock(TestSchema); + const testEvent = TestEvents.vpcLatticeEvent as VpcLatticeEvent; + + testEvent.body = JSON.stringify(mock); + + const resp = VpcLatticeEnvelope.safeParse(testEvent, TestSchema); + + expect(resp).toEqual({ success: true, data: mock }); + }); + + it('should parse VPC Lattice event with trailing slash', () => { + const mock = generateMock(TestSchema); + const testEvent = + TestEvents.vpcLatticeEventPathTrailingSlash as VpcLatticeEvent; + + testEvent.body = JSON.stringify(mock); + + const resp = VpcLatticeEnvelope.safeParse(testEvent, TestSchema); + expect(resp).toEqual({ success: true, data: mock }); + }); + + it('should return error if event is not a VPC Lattice event', () => { + const resp = VpcLatticeEnvelope.safeParse({ foo: 'bar' }, TestSchema); + + expect(resp).toEqual({ + success: false, + error: expect.any(Error), + originalEvent: { foo: 'bar' }, + }); + }); + + it('should return error if body does not match schema', () => { + const testEvent = TestEvents.vpcLatticeEvent as VpcLatticeEvent; - testEvent.body = JSON.stringify(mock); + testEvent.body = JSON.stringify({ foo: 'bar' }); - const resp = vpcLatticeEnvelope(testEvent, TestSchema); - expect(resp).toEqual(mock); + const resp = VpcLatticeEnvelope.safeParse(testEvent, TestSchema); + expect(resp).toEqual({ + success: false, + error: expect.any(Error), + originalEvent: testEvent, + }); + }); }); }); diff --git a/packages/parser/tests/unit/envelopes/vpc-latticev2.test.ts b/packages/parser/tests/unit/envelopes/vpc-latticev2.test.ts index 251382fb87..6f615178ec 100644 --- a/packages/parser/tests/unit/envelopes/vpc-latticev2.test.ts +++ b/packages/parser/tests/unit/envelopes/vpc-latticev2.test.ts @@ -5,34 +5,93 @@ */ import { generateMock } from '@anatine/zod-mock'; -import { VpcLatticeSchema } from '../../../src/schemas/'; -import { z } from 'zod'; import { TestEvents, TestSchema } from '../schema/utils.js'; -import { vpcLatticeV2Envelope } from '../../../src/envelopes/'; +import { VpcLatticeV2Envelope } from '../../../src/envelopes/index.js'; +import { VpcLatticeEventV2 } from '../../../src/types/index.js'; -describe('VPC Lattice envelope', () => { - it('should parse VPC Lattice event', () => { - const mock = generateMock(TestSchema); - const testEvent = TestEvents.vpcLatticeV2Event as z.infer< - typeof VpcLatticeSchema - >; +describe('VpcLatticeV2Envelope2', () => { + describe('parse', () => { + it('should parse VPC Lattice event', () => { + const mock = generateMock(TestSchema); + const testEvent = TestEvents.vpcLatticeV2Event as VpcLatticeEventV2; - testEvent.body = JSON.stringify(mock); + testEvent.body = JSON.stringify(mock); - const resp = vpcLatticeV2Envelope(testEvent, TestSchema); + const resp = VpcLatticeV2Envelope.parse(testEvent, TestSchema); - expect(resp).toEqual(mock); + expect(resp).toEqual(mock); + }); + + it('should parse VPC Lattice event with trailing slash', () => { + const mock = generateMock(TestSchema); + const testEvent = + TestEvents.vpcLatticeEventV2PathTrailingSlash as VpcLatticeEventV2; + + testEvent.body = JSON.stringify(mock); + + const resp = VpcLatticeV2Envelope.parse(testEvent, TestSchema); + expect(resp).toEqual(mock); + }); + + it('should throw if event is not a VPC Lattice event', () => { + expect(() => + VpcLatticeV2Envelope.parse({ foo: 'bar' }, TestSchema) + ).toThrow(); + }); + + it('should throw if body does not match schema', () => { + const testEvent = TestEvents.vpcLatticeV2Event as VpcLatticeEventV2; + + testEvent.body = JSON.stringify({ foo: 'bar' }); + + expect(() => VpcLatticeV2Envelope.parse(testEvent, TestSchema)).toThrow(); + }); }); - it('should parse VPC Lattice event with trailing slash', () => { - const mock = generateMock(TestSchema); - const testEvent = TestEvents.vpcLatticeEventV2PathTrailingSlash as z.infer< - typeof VpcLatticeSchema - >; + describe('safeParse', () => { + it('should parse VPC Lattice event', () => { + const mock = generateMock(TestSchema); + const testEvent = TestEvents.vpcLatticeV2Event as VpcLatticeEventV2; + + testEvent.body = JSON.stringify(mock); + + const resp = VpcLatticeV2Envelope.safeParse(testEvent, TestSchema); + + expect(resp).toEqual({ success: true, data: mock }); + }); + + it('should parse VPC Lattice event with trailing slash', () => { + const mock = generateMock(TestSchema); + const testEvent = + TestEvents.vpcLatticeEventV2PathTrailingSlash as VpcLatticeEventV2; + + testEvent.body = JSON.stringify(mock); + + const resp = VpcLatticeV2Envelope.safeParse(testEvent, TestSchema); + expect(resp).toEqual({ success: true, data: mock }); + }); + + it('should return error if event is not a VPC Lattice event', () => { + const resp = VpcLatticeV2Envelope.safeParse({ foo: 'bar' }, TestSchema); + + expect(resp).toEqual({ + success: false, + error: expect.any(Error), + originalEvent: { foo: 'bar' }, + }); + }); + + it('should return error if body does not match schema', () => { + const testEvent = TestEvents.vpcLatticeV2Event as VpcLatticeEventV2; - testEvent.body = JSON.stringify(mock); + testEvent.body = JSON.stringify({ foo: 'bar' }); - const resp = vpcLatticeV2Envelope(testEvent, TestSchema); - expect(resp).toEqual(mock); + const resp = VpcLatticeV2Envelope.safeParse(testEvent, TestSchema); + expect(resp).toEqual({ + success: false, + error: expect.any(Error), + originalEvent: testEvent, + }); + }); }); }); diff --git a/packages/parser/tests/unit/parser.decorator.test.ts b/packages/parser/tests/unit/parser.decorator.test.ts index 11df5d6703..1e05efa510 100644 --- a/packages/parser/tests/unit/parser.decorator.test.ts +++ b/packages/parser/tests/unit/parser.decorator.test.ts @@ -5,25 +5,26 @@ */ import type { LambdaInterface } from '@aws-lambda-powertools/commons/lib/esm/types'; -import { Context, EventBridgeEvent } from 'aws-lambda'; +import { Context } from 'aws-lambda'; import { parser } from '../../src/index.js'; import { TestSchema, TestEvents } from './schema/utils'; import { generateMock } from '@anatine/zod-mock'; -import { eventBridgeEnvelope } from '../../src/envelopes/index.js'; import { EventBridgeSchema } from '../../src/schemas/index.js'; -import { z } from 'zod'; +import { z, ZodError } from 'zod'; +import { ParsedResult, EventBridgeEvent } from '../../src/types'; +import { EventBridgeEnvelope } from '../../src/envelopes/index.js'; describe('Parser Decorator', () => { const customEventBridgeSchema = EventBridgeSchema.extend({ detail: TestSchema, }); - type TestSchema = z.infer; + type TestEvent = z.infer; class TestClass implements LambdaInterface { @parser({ schema: TestSchema }) public async handler( - event: TestSchema, + event: TestEvent, _context: Context ): Promise { return event; @@ -37,23 +38,46 @@ describe('Parser Decorator', () => { return event; } - @parser({ schema: TestSchema, envelope: eventBridgeEnvelope }) + @parser({ schema: TestSchema, envelope: EventBridgeEnvelope }) public async handlerWithParserCallsAnotherMethod( - event: unknown, + event: TestEvent, _context: Context ): Promise { - return this.anotherMethod(event as TestSchema); + return this.anotherMethod(event); } - @parser({ envelope: eventBridgeEnvelope, schema: TestSchema }) + @parser({ schema: TestSchema, envelope: EventBridgeEnvelope }) public async handlerWithSchemaAndEnvelope( - event: unknown, + event: TestEvent, _context: Context ): Promise { return event; } - private async anotherMethod(event: TestSchema): Promise { + @parser({ + schema: TestSchema, + safeParse: true, + }) + public async handlerWithSchemaAndSafeParse( + event: ParsedResult, + _context: Context + ): Promise { + return event; + } + + @parser({ + schema: TestSchema, + envelope: EventBridgeEnvelope, + safeParse: true, + }) + public async harndlerWithEnvelopeAndSafeParse( + event: ParsedResult, + _context: Context + ): Promise { + return event; + } + + private async anotherMethod(event: TestEvent): Promise { return event; } } @@ -70,13 +94,12 @@ describe('Parser Decorator', () => { it('should parse custom schema with envelope event', async () => { const customPayload = generateMock(TestSchema); - const testEvent = TestEvents.eventBridgeEvent as EventBridgeEvent< - string, - unknown - >; + const testEvent = TestEvents.eventBridgeEvent as EventBridgeEvent; testEvent.detail = customPayload; const resp = await lambda.handlerWithSchemaAndEnvelope( + // eslint-disable-next-line @typescript-eslint/ban-ts-comment + // @ts-ignore testEvent, {} as Context ); @@ -102,17 +125,77 @@ describe('Parser Decorator', () => { it('should parse and call private async method', async () => { const customPayload = generateMock(TestSchema); - const testEvent = TestEvents.eventBridgeEvent as EventBridgeEvent< - string, - unknown - >; + const testEvent = TestEvents.eventBridgeEvent as EventBridgeEvent; testEvent.detail = customPayload; const resp = await lambda.handlerWithParserCallsAnotherMethod( + // eslint-disable-next-line @typescript-eslint/ban-ts-comment + // @ts-ignore testEvent, {} as Context ); expect(resp).toEqual(customPayload); }); + + it('should parse event with schema and safeParse', async () => { + const testEvent = generateMock(TestSchema); + + const resp = await lambda.handlerWithSchemaAndSafeParse( + // eslint-disable-next-line @typescript-eslint/ban-ts-comment + // @ts-ignore + testEvent, + {} as Context + ); + + expect(resp).toEqual({ + success: true, + data: testEvent, + }); + }); + + it('should parse event with schema and safeParse and return error', async () => { + expect( + // eslint-disable-next-line @typescript-eslint/ban-ts-comment + // @ts-ignore + await lambda.handlerWithSchemaAndSafeParse({ foo: 'bar' }, {} as Context) + ).toEqual({ + error: expect.any(ZodError), + success: false, + originalEvent: { foo: 'bar' }, + }); + }); + + it('should parse event with envelope and safeParse', async () => { + const testEvent = generateMock(TestSchema); + const event = TestEvents.eventBridgeEvent as EventBridgeEvent; + event.detail = testEvent; + + const resp = await lambda.harndlerWithEnvelopeAndSafeParse( + // eslint-disable-next-line @typescript-eslint/ban-ts-comment + // @ts-ignore + event, + {} as Context + ); + + expect(resp).toEqual({ + success: true, + data: testEvent, + }); + }); + + it('should parse event with envelope and safeParse and return error', async () => { + expect( + await lambda.harndlerWithEnvelopeAndSafeParse( + // eslint-disable-next-line @typescript-eslint/ban-ts-comment + // @ts-ignore + { foo: 'bar' }, + {} as Context + ) + ).toEqual({ + error: expect.any(ZodError), + success: false, + originalEvent: { foo: 'bar' }, + }); + }); }); diff --git a/packages/parser/tests/unit/parser.middy.test.ts b/packages/parser/tests/unit/parser.middy.test.ts index 369a04d776..d8dd4ae1b1 100644 --- a/packages/parser/tests/unit/parser.middy.test.ts +++ b/packages/parser/tests/unit/parser.middy.test.ts @@ -10,8 +10,9 @@ import { parser } from '../../src/middleware/parser.js'; import { generateMock } from '@anatine/zod-mock'; import { SqsSchema } from '../../src/schemas/index.js'; import { z, type ZodSchema } from 'zod'; -import { sqsEnvelope } from '../../src/envelopes/index.js'; -import { TestSchema } from './schema/utils'; +import { SqsEnvelope, EventBridgeEnvelope } from '../../src/envelopes/index.js'; +import { TestSchema, TestEvents } from './schema/utils'; +import { EventBridgeEvent } from '../../src/types/index.js'; describe('Middleware: parser', () => { type schema = z.infer; @@ -23,13 +24,13 @@ describe('Middleware: parser', () => { }; describe(' when envelope is provided ', () => { - const middyfiedHandler = middy(handler).use( - parser({ schema: TestSchema, envelope: sqsEnvelope }) + const middyfiedHandlerSchemaEnvelope = middy(handler).use( + parser({ schema: TestSchema, envelope: SqsEnvelope }) ); it('should parse request body with schema and envelope', async () => { const bodyMock = generateMock(TestSchema); - parser({ schema: TestSchema, envelope: sqsEnvelope }); + parser({ schema: TestSchema, envelope: SqsEnvelope }); const event = generateMock(SqsSchema, { stringMap: { @@ -37,7 +38,10 @@ describe('Middleware: parser', () => { }, }); - const result = (await middyfiedHandler(event, {} as Context)) as schema[]; + const result = (await middyfiedHandlerSchemaEnvelope( + event, + {} as Context + )) as schema[]; result.forEach((item) => { expect(item).toEqual(bodyMock); }); @@ -45,8 +49,11 @@ describe('Middleware: parser', () => { it('should throw when envelope does not match', async () => { await expect(async () => { - await middyfiedHandler({ name: 'John', age: 18 }, {} as Context); - }).rejects.toThrowError(); + await middyfiedHandlerSchemaEnvelope( + { name: 'John', age: 18 }, + {} as Context + ); + }).rejects.toThrow(); }); it('should throw when schema does not match', async () => { @@ -56,14 +63,16 @@ describe('Middleware: parser', () => { }, }); - await expect(middyfiedHandler(event, {} as Context)).rejects.toThrow(); + await expect( + middyfiedHandlerSchemaEnvelope(event, {} as Context) + ).rejects.toThrow(); }); it('should throw when provided schema is invalid', async () => { const middyfiedHandler = middy(handler).use( - parser({ schema: {} as ZodSchema, envelope: sqsEnvelope }) + parser({ schema: {} as ZodSchema, envelope: SqsEnvelope }) ); - await expect(middyfiedHandler(42, {} as Context)).rejects.toThrowError(); + await expect(middyfiedHandler(42, {} as Context)).rejects.toThrow(); }); it('should throw when envelope is correct but schema is invalid', async () => { const event = generateMock(SqsSchema, { @@ -73,12 +82,10 @@ describe('Middleware: parser', () => { }); const middyfiedHandler = middy(handler).use( - parser({ schema: {} as ZodSchema, envelope: sqsEnvelope }) + parser({ schema: {} as ZodSchema, envelope: SqsEnvelope }) ); - await expect( - middyfiedHandler(event, {} as Context) - ).rejects.toThrowError(); + await expect(middyfiedHandler(event, {} as Context)).rejects.toThrow(); }); }); @@ -117,7 +124,69 @@ describe('Middleware: parser', () => { await expect( middyfiedHandler({ foo: 'bar' }, {} as Context) - ).rejects.toThrowError(); + ).rejects.toThrow(); + }); + + it('should return the event when safeParse is true', async () => { + const event = { name: 'John', age: 18 }; + const middyfiedHandler = middy(handler).use( + parser({ schema: TestSchema, safeParse: true }) + ); + + expect(await middyfiedHandler(event, {} as Context)).toEqual({ + success: true, + data: event, + }); + }); + + it('should return error when safeParse is true and schema does not match', async () => { + const middyfiedHandler = middy(handler).use( + parser({ schema: TestSchema, safeParse: true }) + ); + + expect(await middyfiedHandler(42, {} as Context)).toEqual({ + success: false, + error: expect.any(Error), + originalEvent: 42, + }); + }); + + it('should return event when envelope and safeParse are true', async () => { + const detail = generateMock(TestSchema); + const event = TestEvents.eventBridgeEvent as EventBridgeEvent; + + event.detail = detail; + + const middyfiedHandler = middy(handler).use( + parser({ + schema: TestSchema, + envelope: EventBridgeEnvelope, + safeParse: true, + }) + ); + + expect(await middyfiedHandler(event, {} as Context)).toEqual({ + success: true, + data: detail, + }); + }); + + it('should return error when envelope and safeParse are true and schema does not match', async () => { + const event = TestEvents.eventBridgeEvent as EventBridgeEvent; + + const middyfiedHandler = middy(handler).use( + parser({ + schema: TestSchema, + envelope: EventBridgeEnvelope, + safeParse: true, + }) + ); + + expect(await middyfiedHandler(event, {} as Context)).toEqual({ + success: false, + error: expect.any(Error), + originalEvent: event, + }); }); }); }); From badfef5811dadb15d8d7e6342d70437b136e9e52 Mon Sep 17 00:00:00 2001 From: Alexander Schueren Date: Tue, 2 Apr 2024 14:06:43 +0200 Subject: [PATCH 56/60] refresh package lock after merge --- package-lock.json | 85 +++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 85 insertions(+) diff --git a/package-lock.json b/package-lock.json index e3d42b5bc9..5bd18ee54e 100644 --- a/package-lock.json +++ b/package-lock.json @@ -18,6 +18,7 @@ "packages/batch", "packages/testing", "packages/jmespath", + "packages/parser", "docs/snippets", "layers", "examples/app" @@ -145,6 +146,19 @@ "node": ">=6.0.0" } }, + "node_modules/@anatine/zod-mock": { + "version": "3.13.4", + "resolved": "https://registry.npmjs.org/@anatine/zod-mock/-/zod-mock-3.13.4.tgz", + "integrity": "sha512-yO/KeuyYsEDCTcQ+7CiRuY3dnafMHIZUMok6Ci7aERRCTQ+/XmsiPk/RnMx5wlLmWBTmX9kw+PavbMsjM+sAJA==", + "dev": true, + "dependencies": { + "randexp": "^0.5.3" + }, + "peerDependencies": { + "@faker-js/faker": "^7.0.0 || ^8.0.0", + "zod": "^3.21.4" + } + }, "node_modules/@aws-cdk/asset-awscli-v1": { "version": "2.2.202", "resolved": "https://registry.npmjs.org/@aws-cdk/asset-awscli-v1/-/asset-awscli-v1-2.2.202.tgz", @@ -287,6 +301,10 @@ "resolved": "packages/parameters", "link": true }, + "node_modules/@aws-lambda-powertools/parser": { + "resolved": "packages/parser", + "link": true + }, "node_modules/@aws-lambda-powertools/testing-utils": { "resolved": "packages/testing", "link": true @@ -2308,6 +2326,22 @@ "node": "^12.22.0 || ^14.17.0 || >=16.0.0" } }, + "node_modules/@faker-js/faker": { + "version": "8.4.1", + "resolved": "https://registry.npmjs.org/@faker-js/faker/-/faker-8.4.1.tgz", + "integrity": "sha512-XQ3cU+Q8Uqmrbf2e0cIC/QN43sTBSC8KF12u29Mb47tWrt2hAgBXSgpZMj4Ao8Uk0iJcU99QsOCaIL8934obCg==", + "dev": true, + "funding": [ + { + "type": "opencollective", + "url": "https://opencollective.com/fakerjs" + } + ], + "engines": { + "node": "^14.17.0 || ^16.13.0 || >=18.0.0", + "npm": ">=6.14.13" + } + }, "node_modules/@humanwhocodes/config-array": { "version": "0.11.14", "resolved": "https://registry.npmjs.org/@humanwhocodes/config-array/-/config-array-0.11.14.tgz", @@ -7469,6 +7503,15 @@ "node": ">=12" } }, + "node_modules/drange": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/drange/-/drange-1.1.1.tgz", + "integrity": "sha512-pYxfDYpued//QpnLIm4Avk7rsNtAtQkUES2cwAYSvD/wd2pKD71gN2Ebj3e7klzXwjocvE8c5vx/1fxwpqmSxA==", + "dev": true, + "engines": { + "node": ">=4" + } + }, "node_modules/duplexer": { "version": "0.1.2", "resolved": "https://registry.npmjs.org/duplexer/-/duplexer-0.1.2.tgz", @@ -14254,6 +14297,19 @@ "node": ">=8" } }, + "node_modules/randexp": { + "version": "0.5.3", + "resolved": "https://registry.npmjs.org/randexp/-/randexp-0.5.3.tgz", + "integrity": "sha512-U+5l2KrcMNOUPYvazA3h5ekF80FHTUG+87SEAmHZmolh1M+i/WyTCxVzmi+tidIa1tM4BSe8g2Y/D3loWDjj+w==", + "dev": true, + "dependencies": { + "drange": "^1.0.2", + "ret": "^0.2.0" + }, + "engines": { + "node": ">=4" + } + }, "node_modules/react-is": { "version": "18.2.0", "resolved": "https://registry.npmjs.org/react-is/-/react-is-18.2.0.tgz", @@ -14731,6 +14787,15 @@ "node": ">=8" } }, + "node_modules/ret": { + "version": "0.2.2", + "resolved": "https://registry.npmjs.org/ret/-/ret-0.2.2.tgz", + "integrity": "sha512-M0b3YWQs7R3Z917WRQy1HHA7Ba7D8hvZg6UE5mLykJxQVE2ju0IXbGlaHPPlkY+WN7wFP+wUMXmBFA0aV6vYGQ==", + "dev": true, + "engines": { + "node": ">=4" + } + }, "node_modules/retry": { "version": "0.12.0", "resolved": "https://registry.npmjs.org/retry/-/retry-0.12.0.tgz", @@ -17301,6 +17366,15 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/zod": { + "version": "3.22.4", + "resolved": "https://registry.npmjs.org/zod/-/zod-3.22.4.tgz", + "integrity": "sha512-iC+8Io04lddc+mVqQ9AZ7OQ2MrUKGN+oIQyq1vemgt46jwCwLfhq7/pwnBnNXXXZb8VTVLKwp9EDkx+ryxIWmg==", + "peer": true, + "funding": { + "url": "https://github.com/sponsors/colinhacks" + } + }, "packages/batch": { "name": "@aws-lambda-powertools/batch", "version": "2.0.3", @@ -17448,6 +17522,17 @@ } } }, + "packages/parser": { + "version": "0.0.0", + "license": "MIT-0", + "devDependencies": { + "@anatine/zod-mock": "^3.13.3", + "@faker-js/faker": "^8.3.1" + }, + "peerDependencies": { + "zod": ">=3.x" + } + }, "packages/testing": { "name": "@aws-lambda-powertools/testing-utils", "version": "2.0.3", From e0de20b4b8c50f90b2a525f9822b921b5886540d Mon Sep 17 00:00:00 2001 From: Alexander Schueren Date: Fri, 5 Apr 2024 13:17:50 +0200 Subject: [PATCH 57/60] docs(parser): add docs for parser utility (#1835) * WIP: parser * fix test imports * remove unnecessary exports * add custom validation * remove unnecessary export * add warning * remove duplicate imports * add types and error handlig * remove comment from annotations * minor changes * revert merge changes * merged package-lock * Update docs/utilities/parser.md Co-authored-by: Andrea Amorosi * Update docs/utilities/parser.md Co-authored-by: Andrea Amorosi * adjust imports to new implementation * add safeParse * fixed line highlight * typo * revert index.md, add private scope to snippets packagef * Update docs/utilities/parser.md Co-authored-by: Andrea Amorosi * add parser to main, fixed zod install command * fix callout indent * fix tooltip --------- Co-authored-by: Andrea Amorosi --- docs/index.md | 11 +- docs/snippets/package.json | 5 +- docs/snippets/parser/decorator.ts | 35 +++ docs/snippets/parser/envelopeDecorator.ts | 36 +++ docs/snippets/parser/envelopeMiddy.ts | 37 +++ docs/snippets/parser/examplePayload.json | 21 ++ docs/snippets/parser/extend.ts | 40 +++ docs/snippets/parser/manual.ts | 33 +++ docs/snippets/parser/manualSafeParse.ts | 35 +++ docs/snippets/parser/middy.ts | 36 +++ docs/snippets/parser/refine.ts | 21 ++ docs/snippets/parser/safeParseDecorator.ts | 47 ++++ docs/snippets/parser/safeParseMiddy.ts | 45 +++ docs/snippets/parser/schema.ts | 16 ++ docs/snippets/parser/types.ts | 36 +++ docs/snippets/tsconfig.json | 6 +- docs/utilities/parser.md | 258 ++++++++++++++++++ mkdocs.yml | 3 + package-lock.json | 6 +- .../schemas/cloudformation-custom-resource.ts | 1 - 20 files changed, 718 insertions(+), 10 deletions(-) create mode 100644 docs/snippets/parser/decorator.ts create mode 100644 docs/snippets/parser/envelopeDecorator.ts create mode 100644 docs/snippets/parser/envelopeMiddy.ts create mode 100644 docs/snippets/parser/examplePayload.json create mode 100644 docs/snippets/parser/extend.ts create mode 100644 docs/snippets/parser/manual.ts create mode 100644 docs/snippets/parser/manualSafeParse.ts create mode 100644 docs/snippets/parser/middy.ts create mode 100644 docs/snippets/parser/refine.ts create mode 100644 docs/snippets/parser/safeParseDecorator.ts create mode 100644 docs/snippets/parser/safeParseMiddy.ts create mode 100644 docs/snippets/parser/schema.ts create mode 100644 docs/snippets/parser/types.ts create mode 100644 docs/utilities/parser.md diff --git a/docs/index.md b/docs/index.md index 47ea41e2b6..ed1c1e514b 100644 --- a/docs/index.md +++ b/docs/index.md @@ -70,7 +70,7 @@ You can include Powertools for AWS Lambda (TypeScript) Lambda Layer using [AWS L | `il-central-1` | [arn:aws:lambda:il-central-1:094274105915:layer:AWSLambdaPowertoolsTypeScriptV2:3](#){: .copyMe}:clipboard: | ??? note "Click to expand and copy code snippets for popular frameworks" - + === "SAM" ```yaml hl_lines="5" @@ -252,7 +252,7 @@ You can include Powertools for AWS Lambda (TypeScript) Lambda Layer using [AWS L !!! info "Using Powertools for AWS Lambda (TypeScript) via Lambda Layer? Simply add the Powertools for AWS Lambda (TypeScript) utilities you are using as a development dependency" ??? question "Want to inspect the contents of the Layer?" - Change {region} to your AWS region, e.g. `eu-west-1` + Change {region} to your AWS region, e.g. `eu-west-1` ```bash title="AWS CLI" aws lambda get-layer-version-by-arn --arn arn:aws:lambda:{aws::region}:094274105915:layer:AWSLambdaPowertoolsTypeScriptV2:3 --region {region} @@ -262,7 +262,7 @@ You can include Powertools for AWS Lambda (TypeScript) Lambda Layer using [AWS L ## Instrumentation -You can instrument your code with Powertools for AWS Lambda (TypeScript) in three different ways: +You can instrument your code with Powertools for AWS Lambda (TypeScript) in three different ways: * **Middy** middleware. It is the best choice if your existing code base relies on the [Middy 4.x](https://middy.js.org/docs/) middleware engine. Powertools for AWS Lambda (TypeScript) offers compatible Middy middleware to make this integration seamless. * **Method decorator**. Use [TypeScript method decorators](https://www.typescriptlang.org/docs/handbook/decorators.html#method-decorators) if you prefer writing your business logic using [TypeScript Classes](https://www.typescriptlang.org/docs/handbook/classes.html). If you aren’t using Classes, this requires the most significant refactoring. @@ -289,11 +289,12 @@ Core utilities such as Tracing, Logging, and Metrics will be available across al | [Parameters](./utilities/parameters.md) | High-level functions to retrieve one or more parameters from AWS SSM Parameter Store, AWS Secrets Manager, AWS AppConfig, and Amazon DynamoDB | | [Idempotency](./utilities/idempotency.md) | Class method decorator, Middy middleware, and function wrapper to make your Lambda functions idempotent and prevent duplicate execution based on payload content. | | [Batch Processing](./utilities/batch.md) | Utility to handle partial failures when processing batches from Amazon SQS, Amazon Kinesis Data Streams, and Amazon DynamoDB Streams. | +| [Parser](./utilities/parser.md) | Utility to parse and validate AWS Lambda event payloads using Zod, a TypeScript-first schema declaration and validation library. | ## Environment variables ???+ info - Explicit parameters take precedence over environment variables + Explicit parameters take precedence over environment variables | Environment variable | Description | Utility | Default | | -------------------------------------------- | ------------------------------------------------------------------------------------------------------------- | --------------------------------------- | ------------------- | @@ -351,4 +352,4 @@ These are our core principles to guide our decision making. * **We strive for backwards compatibility**. New features and changes should keep backwards compatibility. If a breaking change cannot be avoided, the deprecation and migration process should be clearly defined. * **We work backwards from the community**. We aim to strike a balance of what would work best for 80% of customers. Emerging practices are considered and discussed via Requests for Comment (RFCs) * **Progressive**. Utilities are designed to be incrementally adoptable for customers at any stage of their Serverless journey. They follow language idioms and their community’s common practices. - + \ No newline at end of file diff --git a/docs/snippets/package.json b/docs/snippets/package.json index 7dbf011cea..16b9b8aada 100644 --- a/docs/snippets/package.json +++ b/docs/snippets/package.json @@ -2,6 +2,7 @@ "name": "docs", "version": "2.0.3", "description": "A collection code snippets for the Powertools for AWS Lambda (TypeScript) docs", + "type": "module", "author": { "name": "Amazon Web Services", "url": "https://aws.amazon.com" @@ -34,10 +35,12 @@ "@aws-sdk/client-secrets-manager": "^3.543.0", "@aws-sdk/client-ssm": "^3.540.0", "@aws-sdk/util-dynamodb": "^3.540.0", + "@middy/core": "^4.7.0", "aws-sdk": "^2.1589.0", "aws-sdk-client-mock": "^4.0.0", "aws-sdk-client-mock-jest": "^4.0.0", "axios": "^1.6.8", - "hashi-vault-js": "^0.4.14" + "hashi-vault-js": "^0.4.14", + "zod": "^3.22.4" } } diff --git a/docs/snippets/parser/decorator.ts b/docs/snippets/parser/decorator.ts new file mode 100644 index 0000000000..c1a91ad096 --- /dev/null +++ b/docs/snippets/parser/decorator.ts @@ -0,0 +1,35 @@ +import type { Context } from 'aws-lambda'; +import type { LambdaInterface } from '@aws-lambda-powertools/commons/types'; +import { parser } from '@aws-lambda-powertools/parser'; +import { z } from 'zod'; +import { Logger } from '@aws-lambda-powertools/logger'; + +const logger = new Logger(); + +const orderSchema = z.object({ + id: z.number().positive(), + description: z.string(), + items: z.array( + z.object({ + id: z.number().positive(), + quantity: z.number(), + description: z.string(), + }) + ), + optionalField: z.string().optional(), +}); + +type Order = z.infer; + +class Lambda implements LambdaInterface { + @parser({ schema: orderSchema }) + public async handler(event: Order, _context: Context): Promise { + // event is now typed as Order + for (const item of event.items) { + logger.info('Processing item', { item }); + } + } +} + +const myFunction = new Lambda(); +export const handler = myFunction.handler.bind(myFunction); diff --git a/docs/snippets/parser/envelopeDecorator.ts b/docs/snippets/parser/envelopeDecorator.ts new file mode 100644 index 0000000000..e54e0f7387 --- /dev/null +++ b/docs/snippets/parser/envelopeDecorator.ts @@ -0,0 +1,36 @@ +import type { Context } from 'aws-lambda'; +import type { LambdaInterface } from '@aws-lambda-powertools/commons/types'; +import { parser } from '@aws-lambda-powertools/parser'; +import { z } from 'zod'; +import { EventBridgeEnvelope } from '@aws-lambda-powertools/parser/envelopes'; +import { Logger } from '@aws-lambda-powertools/logger'; + +const logger = new Logger(); + +const orderSchema = z.object({ + id: z.number().positive(), + description: z.string(), + items: z.array( + z.object({ + id: z.number().positive(), + quantity: z.number(), + description: z.string(), + }) + ), + optionalField: z.string().optional(), +}); + +type Order = z.infer; + +class Lambda implements LambdaInterface { + @parser({ schema: orderSchema, envelope: EventBridgeEnvelope }) // (1)! + public async handler(event: Order, _context: Context): Promise { + // event is now typed as Order + for (const item of event.items) { + logger.info('Processing item', item); // (2)! + } + } +} + +const myFunction = new Lambda(); +export const handler = myFunction.handler.bind(myFunction); diff --git a/docs/snippets/parser/envelopeMiddy.ts b/docs/snippets/parser/envelopeMiddy.ts new file mode 100644 index 0000000000..94f8f012af --- /dev/null +++ b/docs/snippets/parser/envelopeMiddy.ts @@ -0,0 +1,37 @@ +import type { Context } from 'aws-lambda'; +import { parser } from '@aws-lambda-powertools/parser/middleware'; +import { z } from 'zod'; +import middy from '@middy/core'; +import { EventBridgeEnvelope } from '@aws-lambda-powertools/parser/envelopes'; +import { Logger } from '@aws-lambda-powertools/logger'; + +const logger = new Logger(); + +const orderSchema = z.object({ + id: z.number().positive(), + description: z.string(), + items: z.array( + z.object({ + id: z.number().positive(), + quantity: z.number(), + description: z.string(), + }) + ), + optionalField: z.string().optional(), +}); + +type Order = z.infer; + +const lambdaHandler = async ( + event: Order, + _context: Context +): Promise => { + for (const item of event.items) { + // item is parsed as OrderItem + logger.info('Processing item', { item }); + } +}; + +export const handler = middy(lambdaHandler).use( + parser({ schema: orderSchema, envelope: EventBridgeEnvelope }) +); diff --git a/docs/snippets/parser/examplePayload.json b/docs/snippets/parser/examplePayload.json new file mode 100644 index 0000000000..225be75a69 --- /dev/null +++ b/docs/snippets/parser/examplePayload.json @@ -0,0 +1,21 @@ +{ + "version": "0", + "id": "6a7e8feb-b491-4cf7-a9f1-bf3703467718", + "detail-type": "OrderPurchased", + "source": "OrderService", + "account": "111122223333", + "time": "2020-10-22T18:43:48Z", + "region": "us-west-1", + "resources": ["some_additional"], + "detail": { + "id": 10876546789, + "description": "My order", + "items": [ + { + "id": 1015938732, + "quantity": 1, + "description": "item xpto" + } + ] + } +} diff --git a/docs/snippets/parser/extend.ts b/docs/snippets/parser/extend.ts new file mode 100644 index 0000000000..d14845c10f --- /dev/null +++ b/docs/snippets/parser/extend.ts @@ -0,0 +1,40 @@ +import type { Context } from 'aws-lambda'; +import type { LambdaInterface } from '@aws-lambda-powertools/commons/types'; +import { parser } from '@aws-lambda-powertools/parser'; +import { z } from 'zod'; +import { EventBridgeSchema } from '@aws-lambda-powertools/parser/schemas'; +import { Logger } from '@aws-lambda-powertools/logger'; + +const logger = new Logger(); + +const orderSchema = z.object({ + id: z.number().positive(), + description: z.string(), + items: z.array( + z.object({ + id: z.number().positive(), + quantity: z.number(), + description: z.string(), + }) + ), + optionalField: z.string().optional(), +}); + +const orderEventSchema = EventBridgeSchema.extend({ + detail: orderSchema, // (1)! +}); + +type OrderEvent = z.infer; + +class Lambda implements LambdaInterface { + @parser({ schema: orderEventSchema }) // (2)! + public async handler(event: OrderEvent, _context: Context): Promise { + for (const item of event.detail.items) { + // process OrderItem + logger.info('Processing item', { item }); // (3)! + } + } +} + +const myFunction = new Lambda(); +export const handler = myFunction.handler.bind(myFunction); diff --git a/docs/snippets/parser/manual.ts b/docs/snippets/parser/manual.ts new file mode 100644 index 0000000000..2be8204cad --- /dev/null +++ b/docs/snippets/parser/manual.ts @@ -0,0 +1,33 @@ +import type { Context } from 'aws-lambda'; +import { z } from 'zod'; +import { EventBridgeEnvelope } from '@aws-lambda-powertools/parser/envelopes'; +import { EventBridgeSchema } from '@aws-lambda-powertools/parser/schemas'; +import type { EventBridgeEvent } from '@aws-lambda-powertools/parser/types'; +import { Logger } from '@aws-lambda-powertools/logger'; + +const logger = new Logger(); + +const orderSchema = z.object({ + id: z.number().positive(), + description: z.string(), + items: z.array( + z.object({ + id: z.number().positive(), + quantity: z.number(), + description: z.string(), + }) + ), + optionalField: z.string().optional(), +}); +type Order = z.infer; + +export const handler = async ( + event: EventBridgeEvent, + _context: Context +): Promise => { + const parsedEvent = EventBridgeSchema.parse(event); // (1)! + logger.info('Parsed event', parsedEvent); + + const orders: Order = EventBridgeEnvelope.parse(event, orderSchema); // (2)! + logger.info('Parsed orders', orders); +}; diff --git a/docs/snippets/parser/manualSafeParse.ts b/docs/snippets/parser/manualSafeParse.ts new file mode 100644 index 0000000000..17106c1bda --- /dev/null +++ b/docs/snippets/parser/manualSafeParse.ts @@ -0,0 +1,35 @@ +import type { Context } from 'aws-lambda'; +import { z } from 'zod'; +import { EventBridgeEnvelope } from '@aws-lambda-powertools/parser/envelopes'; +import { EventBridgeSchema } from '@aws-lambda-powertools/parser/schemas'; +import type { EventBridgeEvent } from '@aws-lambda-powertools/parser/types'; +import { Logger } from '@aws-lambda-powertools/logger'; + +const logger = new Logger(); + +const orderSchema = z.object({ + id: z.number().positive(), + description: z.string(), + items: z.array( + z.object({ + id: z.number().positive(), + quantity: z.number(), + description: z.string(), + }) + ), + optionalField: z.string().optional(), +}); + +export const handler = async ( + event: EventBridgeEvent, + _context: Context +): Promise => { + const parsedEvent = EventBridgeSchema.safeParse(event); // (1)! + parsedEvent.success + ? logger.info('Event parsed successfully', parsedEvent.data) + : logger.error('Event parsing failed', parsedEvent.error); + const parsedEvenlope = EventBridgeEnvelope.safeParse(event, orderSchema); // (2)! + parsedEvenlope.success + ? logger.info('Event envelope parsed successfully', parsedEvenlope.data) + : logger.error('Event envelope parsing failed', parsedEvenlope.error); +}; diff --git a/docs/snippets/parser/middy.ts b/docs/snippets/parser/middy.ts new file mode 100644 index 0000000000..ff3bf3a879 --- /dev/null +++ b/docs/snippets/parser/middy.ts @@ -0,0 +1,36 @@ +import type { Context } from 'aws-lambda'; +import { parser } from '@aws-lambda-powertools/parser/middleware'; +import { z } from 'zod'; +import middy from '@middy/core'; +import { Logger } from '@aws-lambda-powertools/logger'; + +const logger = new Logger(); + +const orderSchema = z.object({ + id: z.number().positive(), + description: z.string(), + items: z.array( + z.object({ + id: z.number().positive(), + quantity: z.number(), + description: z.string(), + }) + ), + optionalField: z.string().optional(), +}); + +type Order = z.infer; + +const lambdaHandler = async ( + event: Order, + _context: Context +): Promise => { + for (const item of event.items) { + // item is parsed as OrderItem + logger.info('Processing item', { item }); + } +}; + +export const handler = middy(lambdaHandler).use( + parser({ schema: orderSchema }) +); diff --git a/docs/snippets/parser/refine.ts b/docs/snippets/parser/refine.ts new file mode 100644 index 0000000000..b3e58fad08 --- /dev/null +++ b/docs/snippets/parser/refine.ts @@ -0,0 +1,21 @@ +import { z } from 'zod'; + +const orderItemSchema = z.object({ + id: z.number().positive(), + quantity: z.number(), + description: z.string(), +}); + +export const orderSchema = z + .object({ + id: z.number().positive(), + description: z.string(), + items: z.array(orderItemSchema).refine((items) => items.length > 0, { + message: 'Order must have at least one item', // (1)! + }), + optionalField: z.string().optional(), + }) + .refine((order) => order.id > 100 && order.items.length > 100, { + message: + 'All orders with more than 100 items must have an id greater than 100', // (2)! + }); diff --git a/docs/snippets/parser/safeParseDecorator.ts b/docs/snippets/parser/safeParseDecorator.ts new file mode 100644 index 0000000000..aaf4d19ca9 --- /dev/null +++ b/docs/snippets/parser/safeParseDecorator.ts @@ -0,0 +1,47 @@ +import type { Context } from 'aws-lambda'; +import type { LambdaInterface } from '@aws-lambda-powertools/commons/types'; +import { parser } from '@aws-lambda-powertools/parser'; +import { z } from 'zod'; +import type { + ParsedResult, + EventBridgeEvent, +} from '@aws-lambda-powertools/parser/types'; +import { Logger } from '@aws-lambda-powertools/logger'; + +const logger = new Logger(); + +const orderSchema = z.object({ + id: z.number().positive(), + description: z.string(), + items: z.array( + z.object({ + id: z.number().positive(), + quantity: z.number(), + description: z.string(), + }) + ), + optionalField: z.string().optional(), +}); + +type Order = z.infer; + +class Lambda implements LambdaInterface { + @parser({ schema: orderSchema, safeParse: true }) // (1)! + public async handler( + event: ParsedResult, + _context: Context + ): Promise { + if (event.success) { + // (2)! + for (const item of event.data.items) { + logger.info('Processing item', { item }); // (3)! + } + } else { + logger.error('Failed to parse event', event.error); // (4)! + logger.error('Original event is: ', event.originalEvent); // (5)! + } + } +} + +const myFunction = new Lambda(); +export const handler = myFunction.handler.bind(myFunction); diff --git a/docs/snippets/parser/safeParseMiddy.ts b/docs/snippets/parser/safeParseMiddy.ts new file mode 100644 index 0000000000..547eae73b7 --- /dev/null +++ b/docs/snippets/parser/safeParseMiddy.ts @@ -0,0 +1,45 @@ +import type { Context } from 'aws-lambda'; +import { parser } from '@aws-lambda-powertools/parser/middleware'; +import { z } from 'zod'; +import middy from '@middy/core'; +import type { + ParsedResult, + EventBridgeEvent, +} from '@aws-lambda-powertools/parser/types'; +import { Logger } from '@aws-lambda-powertools/logger'; + +const logger = new Logger(); + +const orderSchema = z.object({ + id: z.number().positive(), + description: z.string(), + items: z.array( + z.object({ + id: z.number().positive(), + quantity: z.number(), + description: z.string(), + }) + ), + optionalField: z.string().optional(), +}); + +type Order = z.infer; + +const lambdaHandler = async ( + event: ParsedResult, + _context: Context +): Promise => { + if (event.success) { + // (2)! + for (const item of event.data.items) { + logger.info('Processing item', { item }); // (3)! + } + } else { + logger.error('Error parsing event', { event: event.error }); // (4)! + logger.error('Original event', { event: event.originalEvent }); // (5)! + } +}; + +export const handler = middy(lambdaHandler).use( + parser({ schema: orderSchema, safeParse: true }) // (1)! +); diff --git a/docs/snippets/parser/schema.ts b/docs/snippets/parser/schema.ts new file mode 100644 index 0000000000..f14db32fff --- /dev/null +++ b/docs/snippets/parser/schema.ts @@ -0,0 +1,16 @@ +import { z } from 'zod'; + +const orderSchema = z.object({ + id: z.number().positive(), + description: z.string(), + items: z.array( + z.object({ + id: z.number().positive(), + quantity: z.number(), + description: z.string(), + }) + ), + optionalField: z.string().optional(), +}); + +export { orderSchema }; diff --git a/docs/snippets/parser/types.ts b/docs/snippets/parser/types.ts new file mode 100644 index 0000000000..eba3862835 --- /dev/null +++ b/docs/snippets/parser/types.ts @@ -0,0 +1,36 @@ +import type { Context } from 'aws-lambda'; +import { parser } from '@aws-lambda-powertools/parser/middleware'; +import { z } from 'zod'; +import middy from '@middy/core'; +import { Logger } from '@aws-lambda-powertools/logger'; + +const logger = new Logger(); + +const orderSchema = z.object({ + id: z.number().positive(), + description: z.string(), + items: z.array( + z.object({ + id: z.number().positive(), + quantity: z.number(), + description: z.string(), + }) + ), + optionalField: z.string().optional(), +}); + +type Order = z.infer; // (1)! + +const lambdaHandler = async ( + event: Order, // (2)! + _context: Context +): Promise => { + for (const item of event.items) { + // item is parsed as OrderItem + logger.info('Processing item', { item }); // (3)! + } +}; + +export const handler = middy(lambdaHandler).use( + parser({ schema: orderSchema }) +); diff --git a/docs/snippets/tsconfig.json b/docs/snippets/tsconfig.json index d6aec30ce7..7c921276c8 100644 --- a/docs/snippets/tsconfig.json +++ b/docs/snippets/tsconfig.json @@ -4,6 +4,8 @@ "rootDir": "./", "baseUrl": ".", "noEmit": true, + "noUnusedLocals": false, + "allowUnusedLabels": true, "paths": { "@aws-lambda-powertools/parameters/ssm": [ "../../packages/parameters/lib/ssm" @@ -31,7 +33,9 @@ "@aws-lambda-powertools/jmespath": ["../../packages/jmespath/lib"], "@aws-lambda-powertools/jmespath/envelopes": [ "../../packages/jmespath/lib/envelopes" - ] + ], + "@aws-lambda-powertools/parser": ["../../packages/parser/lib"], + "@aws-lambda-powertools/logger": ["../../packages/logger/lib"] } } } diff --git a/docs/utilities/parser.md b/docs/utilities/parser.md new file mode 100644 index 0000000000..7a31119c29 --- /dev/null +++ b/docs/utilities/parser.md @@ -0,0 +1,258 @@ +--- +title: Parser (Zod) +descrition: Utility +status: new +--- + + +???+ warning + **This utility is currently released as beta developer preview** and is intended strictly for feedback and testing purposes **and not for production workloads**. The version and all future versions tagged with the `-beta` suffix should be treated as not stable. Up until before the [General Availability release](https://github.com/aws-powertools/powertools-lambda-typescript/milestone/16) we might introduce significant breaking changes and improvements in response to customers feedback. + +This utility provides data validation and parsing using [Zod](https://zod.dev){target="_blank"}. +Zod is a TypeScript-first schema declaration and validation library. + +## Key features + +* Define data schema as Zod schema, then parse, validate and extract only what you want +* Built-in envelopes to unwrap and validate popular AWS event sources payloads +* Extend and customize envelopes to fit your needs +* Safe parsing option to avoid throwing errors and custom error handling +* Available for Middy.js middleware and TypeScript method decorators + +## Getting started + +### Install + +```bash +npm install @aws-lambda-powertools/parser zod@~3 +``` + +This utility supports Zod v3.x and above. + +## Define schema + +You can define your schema using Zod: + +```typescript title="schema.ts" +--8<-- "docs/snippets/parser/schema.ts" +``` + +This is a schema for `Order` object using Zod. +You can create complex schemas by using nested objects, arrays, unions, and other types, see [Zod documentation](https://zod.dev) for more details. + +## Parse events + +You can parse inbound events using `parser` decorator or middy middleware, or [manually](#manual-parsing) using built-in envelopes and schemas. +Both are also able to parse either an object or JSON string as an input. + +???+ warning + The decorator and middleware will replace the event object with the parsed schema if successful. + Be cautious when using multiple decorators that expect event to have a specific structure, the order of evaluation for decorators is from bottom to top. + +=== "Middy middleware" + ```typescript hl_lines="34" + --8<-- "docs/snippets/parser/middy.ts" + ``` + +=== "Decorator" + ```typescript hl_lines="25" + --8<-- "docs/snippets/parser/decorator.ts" + ``` + +## Built-in schemas + + +Parser comes with the following built-in schemas: + +| Model name | Description | +|-----------------------------------------------| ------------------------------------------------------------------------------------- | +| **AlbSchema** | Lambda Event Source payload for Amazon Application Load Balancer | +| **APIGatewayProxyEventSchema** | Lambda Event Source payload for Amazon API Gateway | +| **APIGatewayProxyEventV2Schema** | Lambda Event Source payload for Amazon API Gateway v2 payload | +| **CloudFormationCustomResourceCreateSchema** | Lambda Event Source payload for AWS CloudFormation `CREATE` operation | +| **CloudFormationCustomResourceUpdateSchema** | Lambda Event Source payload for AWS CloudFormation `UPDATE` operation | +| **CloudFormationCustomResourceDeleteSchema** | Lambda Event Source payload for AWS CloudFormation `DELETE` operation | +| **CloudwatchLogsSchema** | Lambda Event Source payload for Amazon CloudWatch Logs | +| **DynamoDBStreamSchema** | Lambda Event Source payload for Amazon DynamoDB Streams | +| **EventBridgeSchema** | Lambda Event Source payload for Amazon EventBridge | +| **KafkaMskEventSchema** | Lambda Event Source payload for AWS MSK payload | +| **KafkaSelfManagedEventSchema** | Lambda Event Source payload for self managed Kafka payload | +| **KinesisDataStreamSchema** | Lambda Event Source payload for Amazon Kinesis Data Streams | +| **KinesisFirehoseSchema** | Lambda Event Source payload for Amazon Kinesis Firehose | +| **KinesisFirehoseSqsSchema** | Lambda Event Source payload for SQS messages wrapped in Kinesis Firehose records | +| **LambdaFunctionUrlSchema** | Lambda Event Source payload for Lambda Function URL payload | +| **S3EventNotificationEventBridgeSchema** | Lambda Event Source payload for Amazon S3 Event Notification to EventBridge. | +| **S3Schema** | Lambda Event Source payload for Amazon S3 | +| **S3ObjectLambdaEvent** | Lambda Event Source payload for Amazon S3 Object Lambda | +| **S3SqsEventNotificationSchema** | Lambda Event Source payload for S3 event notifications wrapped in SQS event (S3->SQS) | +| **SesSchema** | Lambda Event Source payload for Amazon Simple Email Service | +| **SnsSchema** | Lambda Event Source payload for Amazon Simple Notification Service | +| **SqsSchema** | Lambda Event Source payload for Amazon SQS | +| **VpcLatticeSchema** | Lambda Event Source payload for Amazon VPC Lattice | +| **VpcLatticeV2Schema** | Lambda Event Source payload for Amazon VPC Lattice v2 payload | + +### Extend built-in schemas + +You can extend every built-in schema to include your own schema, and yet have all other known fields parsed along the way. + +=== "handler.ts" + ```typescript hl_lines="23-25 30 34" + --8<-- "docs/snippets/parser/extend.ts" + ``` + + 1. Extend built-in `EventBridgeSchema` with your own detail schema + 2. Pass the extended schema to `parser` decorator or middy middleware + 3. `event` is validated including your custom schema and now available in your handler + + +=== "Example payload" + + ```json + --8<-- "docs/snippets/parser/examplePayload.json" + ``` + +## Envelopes + +When trying to parse your payload you might encounter the following situations: + +* Your actual payload is wrapped around a known structure, for example Lambda Event Sources like EventBridge +* You're only interested in a portion of the payload, for example parsing the detail of custom events in EventBridge, or body of SQS records +* You can either solve these situations by creating a schema of these known structures, parsing them, then extracting and parsing a key where your payload is. + +This can become difficult quite quickly. Parser simplifies the development through a feature named Envelope. +Envelopes can be used via envelope parameter available in middy and decorator. +Here's an example of parsing a custom schema in an event coming from EventBridge, where all you want is what's inside the detail key. + +=== "Middy middleware" + ```typescript hl_lines="5 36" + --8<-- "docs/snippets/parser/envelopeMiddy.ts" + ``` + +=== "Decorator" + ```typescript hl_lines="5 26 30" + --8<-- "docs/snippets/parser/envelopeDecorator.ts" + ``` + + 1. Pass `eventBridgeEnvelope` to `parser` decorator + 2. `event` is parsed and replaced as `Order` object + + + +The envelopes are functions that take an event and the schema to parse, and return the result of the inner schema. +Depending on the envelope it can be something simple like extracting a key. +We have also complex envelopes that parse the payload from a string, decode base64, uncompress gzip, etc. + +!!! tip "Envelopes vs schema extension" + Use envelopes if you want to extract only the inner part of an event payload and don't use the information from the Lambda event. + Otherwise, extend built-in schema to parse the whole payload and use the metadata from the Lambda event. + +### Built-in envelopes + +Parser comes with the following built-in envelopes: + +| Envelope name | Behaviour | +| ----------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| **apiGatewayEnvelope** | 1. Parses data using `APIGatewayProxyEventSchema`.
2. Parses `body` key using your schema and returns it. | +| **apiGatewayV2Envelope** | 1. Parses data using `APIGatewayProxyEventV2Schema`.
2. Parses `body` key using your schema and returns it. | +| **cloudWatchEnvelope** | 1. Parses data using `CloudwatchLogsSchema` which will base64 decode and decompress it.
2. Parses records in `message` key using your schema and return them in a list. | +| **dynamoDBStreamEnvelope** | 1. Parses data using `DynamoDBStreamSchema`.
2. Parses records in `NewImage` and `OldImage` keys using your schema.
3. Returns a list with a dictionary containing `NewImage` and `OldImage` keys | +| **eventBridgeEnvelope** | 1. Parses data using `EventBridgeSchema`.
2. Parses `detail` key using your schema and returns it. | +| **kafkaEnvelope** | 1. Parses data using `KafkaRecordSchema`.
2. Parses `value` key using your schema and returns it. | +| **kinesisEnvelope** | 1. Parses data using `KinesisDataStreamSchema` which will base64 decode it.
2. Parses records in `Records` key using your schema and returns them in a list. | +| **kinesisFirehoseEnvelope** | 1. Parses data using `KinesisFirehoseSchema` which will base64 decode it.
2. Parses records in `Records` key using your schema and returns them in a list. | +| **lambdaFunctionUrlEnvelope** | 1. Parses data using `LambdaFunctionUrlSchema`.
2. Parses `body` key using your schema and returns it. | +| **snsEnvelope** | 1. Parses data using `SnsSchema`.
2. Parses records in `body` key using your schema and return them in a list. | +| **snsSqsEnvelope** | 1. Parses data using `SqsSchema`.
2. Parses SNS records in `body` key using `SnsNotificationSchema`.
3. Parses data in `Message` key using your schema and return them in a list. | +| **sqsEnvelope** | 1. Parses data using `SqsSchema`.
2. Parses records in `body` key using your schema and return them in a list. | +| **vpcLatticeEnvelope** | 1. Parses data using `VpcLatticeSchema`.
2. Parses `value` key using your schema and returns it. | +| **vpcLatticeV2Envelope** | 1. Parses data using `VpcLatticeSchema`.
2. Parses `value` key using your schema and returns it. | + + +## Safe parsing + +If you want to parse the event without throwing an error, use the `safeParse` option. +The handler `event` object will be replaced with `ParsedResult`, for example `ParsedResult`, where `SqsEvent` is the original event and `Order` is the parsed schema. + +The `ParsedResult` object will have `success`, `data`, or `error` and `originalEvent` fields, depending on the outcome. +If the parsing is successful, the `data` field will contain the parsed event, otherwise you can access the `error` field and the `originalEvent` to handle the error and recover the original event. + +=== "Middy middleware" + ```typescript hl_lines="32 35 38 39 44" + --8<-- "docs/snippets/parser/safeParseMiddy.ts" + ``` + + 1. Use `safeParse` option to parse the event without throwing an error + 2. Check if the result is successful or not and handle the error accordingly + 3. Use `data` to access the parsed event + 4. Use `error` to handle the error message + 5. Use `originalEvent` to get the original event and recover + +=== "Decorator" + ```typescript hl_lines="29 35 37 40 41" + --8<-- "docs/snippets/parser/safeParseDecorator.ts" + ``` + + 1. Use `safeParse` option to parse the event without throwing an error + 2. Check if the result is successful or not and handle the error accordingly + 3. Use `data` to access the parsed event + 4. Use `error` to handle the error message + 5. Use `originalEvent` to get the original event and recover + + +## Manual parsing + +You can use built-in envelopes and schemas to parse the incoming events manually, without using middy or decorator. + + +=== "Manual parse" + ```typescript hl_lines="28 31" + --8<-- "docs/snippets/parser/manual.ts" + ``` + + 1. Use `EventBridgeSchema` to parse the event, the `details` fields will be parsed as a generic record. + 2. Use `eventBridgeEnvelope` with a combination of `orderSchema` to get `Order` object from the `details` field. + +=== "Manual safeParse" + ```typescript hl_lines="27 31" + --8<-- "docs/snippets/parser/manualSafeParse.ts" + ``` + + 1. Use `safeParse` option to parse the event without throwing an error + 2. `safeParse` is also available for envelopes + +## Custom validation + +Because Parser uses Zod, you can use all the features of Zod to validate your data. +For example, you can use `refine` to validate a field or a combination of fields: + +=== "Custom validation" + ```typescript hl_lines="13 18" + --8<-- "docs/snippets/parser/refine.ts" + ``` + + 1. validate a single field + 2. validate an object with multiple fields + +Zod provides a lot of other features and customization, see [Zod documentation](https://zod.dev) for more details. + + +## Types + +### Schema and Type inference +Use `z.infer` to extract the type of the schema, so you can use types during development and avoid type errors. + +=== "Types" + ```typescript hl_lines="22 25 30" + --8<-- "docs/snippets/parser/types.ts" + ``` + + 1. Use `z.infer` to extract the type of the schema, also works for nested schemas + 2. `event` is of type `Order` + 3. infer types from deeply nested schemas + +### Compatibility with @types/aws-lambda + +The package `@types/aws-lambda` is a popular project that contains type definitions for many AWS service event invocations. +Powertools parser utility also bring AWS Lambda event types based on the built-in schema definitions. + +We recommend to use the types provided by the parser utility. If you encounter any issues or have any feedback, please [submit an issue](https://github.com/aws-powertools/powertools-lambda-typescript/issues/new/choose). diff --git a/mkdocs.yml b/mkdocs.yml index 107ca2b45f..31e1be3d24 100644 --- a/mkdocs.yml +++ b/mkdocs.yml @@ -20,6 +20,7 @@ nav: - utilities/idempotency.md - utilities/batch.md - utilities/jmespath.md + - utilities/parser.md - Processes: - Roadmap: roadmap.md - Versioning policy: versioning.md @@ -119,3 +120,5 @@ extra: - icon: fontawesome/brands/discord link: https://discord.gg/B8zZKbbyET name: Join our Discord Server! + status: + new: New Utility diff --git a/package-lock.json b/package-lock.json index 5bd18ee54e..f726c5f6ee 100644 --- a/package-lock.json +++ b/package-lock.json @@ -62,11 +62,13 @@ "@aws-sdk/client-secrets-manager": "^3.543.0", "@aws-sdk/client-ssm": "^3.540.0", "@aws-sdk/util-dynamodb": "^3.540.0", + "@middy/core": "^4.7.0", "aws-sdk": "^2.1589.0", "aws-sdk-client-mock": "^4.0.0", "aws-sdk-client-mock-jest": "^4.0.0", "axios": "^1.6.8", - "hashi-vault-js": "^0.4.14" + "hashi-vault-js": "^0.4.14", + "zod": "^3.22.4" } }, "examples/app": { @@ -17370,7 +17372,6 @@ "version": "3.22.4", "resolved": "https://registry.npmjs.org/zod/-/zod-3.22.4.tgz", "integrity": "sha512-iC+8Io04lddc+mVqQ9AZ7OQ2MrUKGN+oIQyq1vemgt46jwCwLfhq7/pwnBnNXXXZb8VTVLKwp9EDkx+ryxIWmg==", - "peer": true, "funding": { "url": "https://github.com/sponsors/colinhacks" } @@ -17523,6 +17524,7 @@ } }, "packages/parser": { + "name": "@aws-lambda-powertools/parser", "version": "0.0.0", "license": "MIT-0", "devDependencies": { diff --git a/packages/parser/src/schemas/cloudformation-custom-resource.ts b/packages/parser/src/schemas/cloudformation-custom-resource.ts index 13f9e9760d..84369dbdae 100644 --- a/packages/parser/src/schemas/cloudformation-custom-resource.ts +++ b/packages/parser/src/schemas/cloudformation-custom-resource.ts @@ -36,5 +36,4 @@ export { CloudFormationCustomResourceCreateSchema, CloudFormationCustomResourceDeleteSchema, CloudFormationCustomResourceUpdateSchema, - CloudFormationCustomResourceBaseSchema, }; From 221c7694e13961c656dfcca967e1461c583ad01a Mon Sep 17 00:00:00 2001 From: Alexander Schueren Date: Tue, 9 Apr 2024 11:05:43 +0200 Subject: [PATCH 58/60] feat(parser): add custom parse error (#2339) --- packages/parser/src/envelopes/apigw.ts | 13 ++++++-- packages/parser/src/envelopes/apigwv2.ts | 13 ++++++-- packages/parser/src/envelopes/cloudwatch.ts | 11 +++++-- packages/parser/src/envelopes/dynamodb.ts | 13 ++++++-- packages/parser/src/envelopes/envelope.ts | 25 +++++++++------ packages/parser/src/envelopes/event-bridge.ts | 13 ++++++-- packages/parser/src/envelopes/kafka.ts | 12 +++++-- .../parser/src/envelopes/kinesis-firehose.ts | 12 +++++-- packages/parser/src/envelopes/kinesis.ts | 13 ++++++-- packages/parser/src/envelopes/lambda.ts | 10 ++++-- packages/parser/src/envelopes/sns.ts | 31 ++++++++++++++++--- packages/parser/src/envelopes/sqs.ts | 13 ++++++-- packages/parser/src/envelopes/vpc-lattice.ts | 13 ++++++-- .../parser/src/envelopes/vpc-latticev2.ts | 13 ++++++-- packages/parser/src/errors.ts | 25 +++++++++++++++ packages/parser/src/index.ts | 1 + packages/parser/src/parser.ts | 14 +++++++-- packages/parser/tests/unit/envelope.test.ts | 13 +++----- .../tests/unit/envelopes/apigwt.test.ts | 14 ++++++--- .../tests/unit/envelopes/cloudwatch.test.ts | 4 +-- .../tests/unit/envelopes/dynamodb.test.ts | 9 +++--- .../tests/unit/envelopes/eventbridge.test.ts | 6 ++-- .../tests/unit/envelopes/kinesis.test.ts | 6 ++-- .../parser/tests/unit/envelopes/sns.test.ts | 9 +++--- .../parser/tests/unit/envelopes/sqs.test.ts | 6 ++-- .../tests/unit/parser.decorator.test.ts | 7 +++-- 26 files changed, 241 insertions(+), 78 deletions(-) create mode 100644 packages/parser/src/errors.ts diff --git a/packages/parser/src/envelopes/apigw.ts b/packages/parser/src/envelopes/apigw.ts index ee4d71e9c0..064fe8477c 100644 --- a/packages/parser/src/envelopes/apigw.ts +++ b/packages/parser/src/envelopes/apigw.ts @@ -2,6 +2,7 @@ import { Envelope } from './envelope.js'; import { z, type ZodSchema } from 'zod'; import { APIGatewayProxyEventSchema } from '../schemas/apigw.js'; import type { ParsedResult } from '../types/parser.js'; +import { ParseError } from '../errors.js'; /** * API Gateway envelope to extract data within body key @@ -21,7 +22,11 @@ export class ApiGatewayEnvelope extends Envelope { const parsedEnvelope = APIGatewayProxyEventSchema.safeParse(data); if (!parsedEnvelope.success) { return { - ...parsedEnvelope, + success: false, + error: new ParseError( + 'Failed to parse ApiGatewayEnvelope', + parsedEnvelope.error + ), originalEvent: data, }; } @@ -30,7 +35,11 @@ export class ApiGatewayEnvelope extends Envelope { if (!parsedBody.success) { return { - ...parsedBody, + success: false, + error: new ParseError( + 'Failed to parse ApiGatewayEnvelope body', + parsedBody.error + ), originalEvent: data, }; } diff --git a/packages/parser/src/envelopes/apigwv2.ts b/packages/parser/src/envelopes/apigwv2.ts index 3da86e26e4..d4abbc4738 100644 --- a/packages/parser/src/envelopes/apigwv2.ts +++ b/packages/parser/src/envelopes/apigwv2.ts @@ -2,6 +2,7 @@ import { z, type ZodSchema } from 'zod'; import { APIGatewayProxyEventV2Schema } from '../schemas/apigwv2.js'; import { Envelope } from './envelope.js'; import type { ParsedResult } from '../types/index.js'; +import { ParseError } from '../errors.js'; /** * API Gateway V2 envelope to extract data within body key @@ -21,7 +22,11 @@ export class ApiGatewayV2Envelope extends Envelope { const parsedEnvelope = APIGatewayProxyEventV2Schema.safeParse(data); if (!parsedEnvelope.success) { return { - ...parsedEnvelope, + success: false, + error: new ParseError( + 'Failed to parse API Gateway V2 envelope', + parsedEnvelope.error + ), originalEvent: data, }; } @@ -30,7 +35,11 @@ export class ApiGatewayV2Envelope extends Envelope { if (!parsedBody.success) { return { - ...parsedBody, + success: false, + error: new ParseError( + 'Failed to parse API Gateway V2 envelope body', + parsedBody.error + ), originalEvent: data, }; } diff --git a/packages/parser/src/envelopes/cloudwatch.ts b/packages/parser/src/envelopes/cloudwatch.ts index f90e6455f9..4778d9b508 100644 --- a/packages/parser/src/envelopes/cloudwatch.ts +++ b/packages/parser/src/envelopes/cloudwatch.ts @@ -2,6 +2,7 @@ import { z, type ZodSchema } from 'zod'; import { Envelope } from './envelope.js'; import { CloudWatchLogsSchema } from '../schemas/index.js'; import type { ParsedResult } from '../types/index.js'; +import { ParseError } from '../errors.js'; /** * CloudWatch Envelope to extract a List of log records. @@ -33,7 +34,10 @@ export class CloudWatchEnvelope extends Envelope { if (!parsedEnvelope.success) { return { success: false, - error: parsedEnvelope.error, + error: new ParseError( + 'Failed to parse CloudWatch envelope', + parsedEnvelope.error + ), originalEvent: data, }; } @@ -44,7 +48,10 @@ export class CloudWatchEnvelope extends Envelope { if (!parsedMessage.success) { return { success: false, - error: parsedMessage.error, + error: new ParseError( + 'Failed to parse CloudWatch log event', + parsedMessage.error + ), originalEvent: data, }; } else { diff --git a/packages/parser/src/envelopes/dynamodb.ts b/packages/parser/src/envelopes/dynamodb.ts index 4898369422..59bf83a850 100644 --- a/packages/parser/src/envelopes/dynamodb.ts +++ b/packages/parser/src/envelopes/dynamodb.ts @@ -2,6 +2,7 @@ import { z, type ZodSchema } from 'zod'; import { DynamoDBStreamSchema } from '../schemas/index.js'; import type { ParsedResult, ParsedResultError } from '../types/index.js'; import { Envelope } from './envelope.js'; +import { ParseError } from '../errors.js'; type DynamoDBStreamEnvelopeResponse = { NewImage: z.infer; @@ -38,7 +39,10 @@ export class DynamoDBStreamEnvelope extends Envelope { if (!parsedEnvelope.success) { return { success: false, - error: parsedEnvelope.error, + error: new ParseError( + 'Failed to parse DynamoDB Stream envelope', + parsedEnvelope.error + ), originalEvent: data, }; } @@ -51,8 +55,11 @@ export class DynamoDBStreamEnvelope extends Envelope { return { success: false, error: !parsedNewImage.success - ? parsedNewImage.error - : (parsedOldImage as ParsedResultError).error, + ? new ParseError('Failed to parse NewImage', parsedNewImage.error) + : new ParseError( + 'Failed to parse OldImage', + (parsedOldImage as ParsedResultError).error + ), originalEvent: data, }; } else { diff --git a/packages/parser/src/envelopes/envelope.ts b/packages/parser/src/envelopes/envelope.ts index ed55758153..9e0ae3a8cf 100644 --- a/packages/parser/src/envelopes/envelope.ts +++ b/packages/parser/src/envelopes/envelope.ts @@ -1,5 +1,6 @@ import { z, type ZodSchema } from 'zod'; import type { ParsedResult } from '../types/parser.js'; +import { ParseError } from '../errors.js'; export class Envelope { /** @@ -14,14 +15,20 @@ export class Envelope { data: unknown, schema: T ): z.infer => { - if (typeof data === 'string') { - return schema.parse(JSON.parse(data)); - } else if (typeof data === 'object') { - return schema.parse(data); - } else - throw new Error( + if (typeof data !== 'object' && typeof data !== 'string') { + throw new ParseError( `Invalid data type for envelope. Expected string or object, got ${typeof data}` ); + } + try { + if (typeof data === 'string') { + return schema.parse(JSON.parse(data)); + } else if (typeof data === 'object') { + return schema.parse(data); + } + } catch (e) { + throw new ParseError(`Failed to parse envelope`, e as Error); + } }; /** @@ -38,7 +45,7 @@ export class Envelope { if (typeof input !== 'object' && typeof input !== 'string') { return { success: false, - error: new Error( + error: new ParseError( `Invalid data type for envelope. Expected string or object, got ${typeof input}` ), originalEvent: input, @@ -56,13 +63,13 @@ export class Envelope { } : { success: false, - error: parsed.error, + error: new ParseError(`Failed to parse envelope`, parsed.error), originalEvent: input, }; } catch (e) { return { success: false, - error: e as Error, + error: new ParseError(`Failed to parse envelope`, e as Error), originalEvent: input, }; } diff --git a/packages/parser/src/envelopes/event-bridge.ts b/packages/parser/src/envelopes/event-bridge.ts index 0d166d673b..1659dd93ed 100644 --- a/packages/parser/src/envelopes/event-bridge.ts +++ b/packages/parser/src/envelopes/event-bridge.ts @@ -2,6 +2,7 @@ import { Envelope } from './envelope.js'; import { z, type ZodSchema } from 'zod'; import { EventBridgeSchema } from '../schemas/index.js'; import type { ParsedResult } from '../types/index.js'; +import { ParseError } from '../errors.js'; /** * Envelope for EventBridge schema that extracts and parses data from the `detail` key. @@ -22,7 +23,11 @@ export class EventBridgeEnvelope extends Envelope { if (!parsedEnvelope.success) { return { - ...parsedEnvelope, + success: false, + error: new ParseError( + 'Failed to parse EventBridge envelope', + parsedEnvelope.error + ), originalEvent: data, }; } @@ -31,7 +36,11 @@ export class EventBridgeEnvelope extends Envelope { if (!parsedDetail.success) { return { - ...parsedDetail, + success: false, + error: new ParseError( + 'Failed to parse EventBridge envelope detail', + parsedDetail.error + ), originalEvent: data, }; } diff --git a/packages/parser/src/envelopes/kafka.ts b/packages/parser/src/envelopes/kafka.ts index 1bbd442f3f..8c8e481a07 100644 --- a/packages/parser/src/envelopes/kafka.ts +++ b/packages/parser/src/envelopes/kafka.ts @@ -5,6 +5,7 @@ import { KafkaSelfManagedEventSchema, } from '../schemas/kafka.js'; import { ParsedResult, KafkaMskEvent } from '../types/index.js'; +import { ParseError } from '../errors.js'; /** * Kafka event envelope to extract data within body key @@ -51,7 +52,11 @@ export class KafkaEnvelope extends Envelope { if (!parsedEnvelope.success) { return { - ...parsedEnvelope, + success: false, + error: new ParseError( + 'Failed to parse Kafka envelope', + parsedEnvelope.error + ), originalEvent: data, }; } @@ -63,7 +68,10 @@ export class KafkaEnvelope extends Envelope { if (!parsedRecord.success) { return { success: false, - error: parsedRecord.error, + error: new ParseError( + 'Failed to parse Kafka record', + parsedRecord.error + ), originalEvent: data, }; } diff --git a/packages/parser/src/envelopes/kinesis-firehose.ts b/packages/parser/src/envelopes/kinesis-firehose.ts index 7dca3cae73..71535894c3 100644 --- a/packages/parser/src/envelopes/kinesis-firehose.ts +++ b/packages/parser/src/envelopes/kinesis-firehose.ts @@ -2,6 +2,7 @@ import { z, type ZodSchema } from 'zod'; import { Envelope } from './envelope.js'; import { KinesisFirehoseSchema } from '../schemas/index.js'; import type { ParsedResult } from '../types/index.js'; +import { ParseError } from '../errors.js'; /** * Kinesis Firehose Envelope to extract array of Records @@ -35,7 +36,11 @@ export class KinesisFirehoseEnvelope extends Envelope { if (!parsedEnvelope.success) { return { - ...parsedEnvelope, + success: false, + error: new ParseError( + 'Failed to parse Kinesis Firehose envelope', + parsedEnvelope.error + ), originalEvent: data, }; } @@ -46,7 +51,10 @@ export class KinesisFirehoseEnvelope extends Envelope { if (!parsedData.success) { return { success: false, - error: parsedData.error, + error: new ParseError( + 'Failed to parse Kinesis Firehose record', + parsedData.error + ), originalEvent: data, }; } diff --git a/packages/parser/src/envelopes/kinesis.ts b/packages/parser/src/envelopes/kinesis.ts index 470df40522..8ddfb3d34e 100644 --- a/packages/parser/src/envelopes/kinesis.ts +++ b/packages/parser/src/envelopes/kinesis.ts @@ -2,6 +2,7 @@ import { Envelope } from './envelope.js'; import { z, type ZodSchema } from 'zod'; import { KinesisDataStreamSchema } from '../schemas/kinesis.js'; import type { ParsedResult } from '../types/index.js'; +import { ParseError } from '../errors.js'; /** * Kinesis Data Stream Envelope to extract array of Records @@ -32,7 +33,11 @@ export class KinesisEnvelope extends Envelope { const parsedEnvelope = KinesisDataStreamSchema.safeParse(data); if (!parsedEnvelope.success) { return { - ...parsedEnvelope, + success: false, + error: new ParseError( + 'Failed to parse Kinesis Data Stream envelope', + parsedEnvelope.error + ), originalEvent: data, }; } @@ -43,7 +48,11 @@ export class KinesisEnvelope extends Envelope { const parsedRecord = super.safeParse(record.kinesis.data, schema); if (!parsedRecord.success) { return { - ...parsedRecord, + success: false, + error: new ParseError( + 'Failed to parse Kinesis Data Stream record', + parsedRecord.error + ), originalEvent: data, }; } diff --git a/packages/parser/src/envelopes/lambda.ts b/packages/parser/src/envelopes/lambda.ts index a839c68287..9d694cc517 100644 --- a/packages/parser/src/envelopes/lambda.ts +++ b/packages/parser/src/envelopes/lambda.ts @@ -2,6 +2,7 @@ import { Envelope } from './envelope.js'; import { z, type ZodSchema } from 'zod'; import { LambdaFunctionUrlSchema } from '../schemas/index.js'; import type { ParsedResult } from '../types/index.js'; +import { ParseError } from '../errors.js'; /** * Lambda function URL envelope to extract data within body key @@ -28,7 +29,8 @@ export class LambdaFunctionUrlEnvelope extends Envelope { if (!parsedEnvelope.success) { return { - ...parsedEnvelope, + success: false, + error: new ParseError('Failed to parse Lambda function URL envelope'), originalEvent: data, }; } @@ -36,7 +38,11 @@ export class LambdaFunctionUrlEnvelope extends Envelope { const parsedBody = super.safeParse(parsedEnvelope.data.body, schema); if (!parsedBody.success) { return { - ...parsedBody, + success: false, + error: new ParseError( + 'Failed to parse Lambda function URL body', + parsedBody.error + ), originalEvent: data, }; } diff --git a/packages/parser/src/envelopes/sns.ts b/packages/parser/src/envelopes/sns.ts index 1141dff305..50083d7ca7 100644 --- a/packages/parser/src/envelopes/sns.ts +++ b/packages/parser/src/envelopes/sns.ts @@ -3,6 +3,7 @@ import { Envelope } from './envelope.js'; import { SnsSchema, SnsSqsNotificationSchema } from '../schemas/sns.js'; import { SqsSchema } from '../schemas/sqs.js'; import type { ParsedResult } from '../types/index.js'; +import { ParseError } from '../errors.js'; /** * SNS Envelope to extract array of Records @@ -33,7 +34,11 @@ export class SnsEnvelope extends Envelope { if (!parsedEnvelope.success) { return { - ...parsedEnvelope, + success: false, + error: new ParseError( + `Failed to parse SNS envelope`, + parsedEnvelope.error + ), originalEvent: data, }; } @@ -43,7 +48,11 @@ export class SnsEnvelope extends Envelope { const parsedMessage = super.safeParse(record.Sns.Message, schema); if (!parsedMessage.success) { return { - ...parsedMessage, + success: false, + error: new ParseError( + `Failed to parse SNS message`, + parsedMessage.error + ), originalEvent: data, }; } @@ -91,7 +100,11 @@ export class SnsSqsEnvelope extends Envelope { const parsedEnvelope = SqsSchema.safeParse(data); if (!parsedEnvelope.success) { return { - ...parsedEnvelope, + success: false, + error: new ParseError( + `Failed to parse SQS envelope`, + parsedEnvelope.error + ), originalEvent: data, }; } @@ -106,7 +119,11 @@ export class SnsSqsEnvelope extends Envelope { ); if (!snsNotification.success) { return { - ...snsNotification, + success: false, + error: new ParseError( + `Failed to parse SNS notification`, + snsNotification.error + ), originalEvent: data, }; } @@ -116,7 +133,11 @@ export class SnsSqsEnvelope extends Envelope { ); if (!parsedMessage.success) { return { - ...parsedMessage, + success: false, + error: new ParseError( + `Failed to parse SNS message`, + parsedMessage.error + ), originalEvent: data, }; } diff --git a/packages/parser/src/envelopes/sqs.ts b/packages/parser/src/envelopes/sqs.ts index b1c8f6c059..e5350365d4 100644 --- a/packages/parser/src/envelopes/sqs.ts +++ b/packages/parser/src/envelopes/sqs.ts @@ -2,6 +2,7 @@ import { z, type ZodSchema } from 'zod'; import { SqsSchema } from '../schemas/sqs.js'; import { Envelope } from './envelope.js'; import type { ParsedResult } from '../types/index.js'; +import { ParseError } from '../errors.js'; /** * SQS Envelope to extract array of Records @@ -31,7 +32,11 @@ export class SqsEnvelope extends Envelope { const parsedEnvelope = SqsSchema.safeParse(data); if (!parsedEnvelope.success) { return { - ...parsedEnvelope, + success: false, + error: new ParseError( + 'Failed to parse Sqs Envelope', + parsedEnvelope.error + ), originalEvent: data, }; } @@ -41,7 +46,11 @@ export class SqsEnvelope extends Envelope { const parsedRecord = super.safeParse(record.body, schema); if (!parsedRecord.success) { return { - ...parsedRecord, + success: false, + error: new ParseError( + 'Failed to parse Sqs Record', + parsedRecord.error + ), originalEvent: data, }; } diff --git a/packages/parser/src/envelopes/vpc-lattice.ts b/packages/parser/src/envelopes/vpc-lattice.ts index a7150dd5a4..1f157eac3d 100644 --- a/packages/parser/src/envelopes/vpc-lattice.ts +++ b/packages/parser/src/envelopes/vpc-lattice.ts @@ -2,6 +2,7 @@ import { z, type ZodSchema } from 'zod'; import { Envelope } from './envelope.js'; import { VpcLatticeSchema } from '../schemas/index.js'; import type { ParsedResult } from '../types/index.js'; +import { ParseError } from '../errors.js'; /** * Amazon VPC Lattice envelope to extract data within body key @@ -24,7 +25,11 @@ export class VpcLatticeEnvelope extends Envelope { const parsedEnvelope = VpcLatticeSchema.safeParse(data); if (!parsedEnvelope.success) { return { - ...parsedEnvelope, + success: false, + error: new ParseError( + 'Failed to parse VpcLattice envelope', + parsedEnvelope.error + ), originalEvent: data, }; } @@ -33,7 +38,11 @@ export class VpcLatticeEnvelope extends Envelope { if (!parsedBody.success) { return { - ...parsedBody, + success: false, + error: new ParseError( + 'Failed to parse VpcLattice envelope body', + parsedBody.error + ), originalEvent: data, }; } diff --git a/packages/parser/src/envelopes/vpc-latticev2.ts b/packages/parser/src/envelopes/vpc-latticev2.ts index 7ef31b0702..50a1b058f3 100644 --- a/packages/parser/src/envelopes/vpc-latticev2.ts +++ b/packages/parser/src/envelopes/vpc-latticev2.ts @@ -2,6 +2,7 @@ import { Envelope } from './envelope.js'; import { z, type ZodSchema } from 'zod'; import { VpcLatticeV2Schema } from '../schemas/index.js'; import type { ParsedResult } from '../types/index.js'; +import { ParseError } from '../errors.js'; /** * Amazon VPC Lattice envelope to extract data within body key @@ -23,7 +24,11 @@ export class VpcLatticeV2Envelope extends Envelope { const parsedEnvelope = VpcLatticeV2Schema.safeParse(data); if (!parsedEnvelope.success) { return { - ...parsedEnvelope, + success: false, + error: new ParseError( + 'Failed to parse VpcLatticeV2 envelope.', + parsedEnvelope.error + ), originalEvent: data, }; } @@ -32,7 +37,11 @@ export class VpcLatticeV2Envelope extends Envelope { if (!parsedBody.success) { return { - ...parsedBody, + success: false, + error: new ParseError( + 'Failed to parse VpcLatticeV2 body.', + parsedBody.error + ), originalEvent: data, }; } diff --git a/packages/parser/src/errors.ts b/packages/parser/src/errors.ts new file mode 100644 index 0000000000..8e03bce5e9 --- /dev/null +++ b/packages/parser/src/errors.ts @@ -0,0 +1,25 @@ +/** + * Error thrown when a parsing error occurs. The cause of the error is included in the message, if possible. + */ +class ParseError extends Error { + /** + * we use the `cause` property, which is present in ES2022 or newer, to store the cause of the error. + * because we have to support Node 16.x, we need to add this property ourselves. + * We can remove this once we drop support for Node 16.x. + * see: https://github.com/aws-powertools/powertools-lambda-typescript/issues/2223 + * + * @see https://nodejs.org/api/errors.html#errors_error_cause + */ + public readonly cause: Error | undefined; + + public constructor(message: string, cause?: Error) { + const errorMessage = cause + ? `${message}. This error was caused by: ${cause.message}.` + : message; + super(errorMessage); + this.cause = cause; + this.name = 'ParseError'; + } +} + +export { ParseError }; diff --git a/packages/parser/src/index.ts b/packages/parser/src/index.ts index 940216fe90..e181735190 100644 --- a/packages/parser/src/index.ts +++ b/packages/parser/src/index.ts @@ -1 +1,2 @@ export { parser } from './parserDecorator.js'; +export { ParseError } from './errors.js'; diff --git a/packages/parser/src/parser.ts b/packages/parser/src/parser.ts index 89ed2e4ffb..b7537de77a 100644 --- a/packages/parser/src/parser.ts +++ b/packages/parser/src/parser.ts @@ -1,5 +1,6 @@ import type { ParsedResult, Envelope } from './types/index.js'; import { z, type ZodSchema } from 'zod'; +import { ParseError } from './errors.js'; /** * Parse the data using the provided schema, envelope and safeParse flag @@ -41,8 +42,11 @@ const parse = ( if (safeParse) { return safeParseSchema(data, schema); } - - return schema.parse(data); + try { + return schema.parse(data); + } catch (e) { + throw new ParseError('Failed to parse schema', e as Error); + } }; /** @@ -60,7 +64,11 @@ const safeParseSchema = ( return result.success ? result - : { success: false, error: result.error, originalEvent: data }; + : { + success: false, + error: new ParseError('Failed to parse schema safely', result.error), + originalEvent: data, + }; }; export { parse }; diff --git a/packages/parser/tests/unit/envelope.test.ts b/packages/parser/tests/unit/envelope.test.ts index 1f92ed6e64..8d7778bc25 100644 --- a/packages/parser/tests/unit/envelope.test.ts +++ b/packages/parser/tests/unit/envelope.test.ts @@ -1,5 +1,6 @@ -import { z, ZodError } from 'zod'; +import { z } from 'zod'; import { Envelope } from '../../src/envelopes/envelope.js'; +import { ParseError } from '../../src/errors.js'; describe('envelope: ', () => { describe('parseSafe', () => { @@ -30,25 +31,19 @@ describe('envelope: ', () => { ); expect(result).toEqual({ success: false, - error: expect.any(ZodError), + error: expect.any(ParseError), originalEvent: { name: 123 }, }); }); it('returns error when input is invalid JSON string', () => { - let err: unknown; - try { - JSON.parse('{name: "John"}'); - } catch (e) { - err = e; - } const result = Envelope.safeParse( '{name: "John"}', z.object({ name: z.string() }) ); expect(result).toEqual({ success: false, - error: err, + error: expect.any(ParseError), originalEvent: '{name: "John"}', }); }); diff --git a/packages/parser/tests/unit/envelopes/apigwt.test.ts b/packages/parser/tests/unit/envelopes/apigwt.test.ts index c9df0c03c7..0a1e675ae4 100644 --- a/packages/parser/tests/unit/envelopes/apigwt.test.ts +++ b/packages/parser/tests/unit/envelopes/apigwt.test.ts @@ -8,7 +8,7 @@ import { generateMock } from '@anatine/zod-mock'; import { TestEvents, TestSchema } from '../schema/utils.js'; import { APIGatewayProxyEvent } from '../../../src/types/'; import { ApiGatewayEnvelope } from '../../../src/envelopes/index.js'; -import { ZodError } from 'zod'; +import { ParseError } from '../../../src/errors.js'; describe('ApigwEnvelope ', () => { describe('parse', () => { @@ -26,13 +26,17 @@ describe('ApigwEnvelope ', () => { const testEvent = TestEvents.apiGatewayProxyEvent as APIGatewayProxyEvent; testEvent.body = undefined; - expect(() => ApiGatewayEnvelope.parse(testEvent, TestSchema)).toThrow(); + expect(() => ApiGatewayEnvelope.parse(testEvent, TestSchema)).toThrow( + ParseError + ); }); it('should throw invalid event provided', () => { const testEvent = TestEvents.apiGatewayProxyEvent as APIGatewayProxyEvent; testEvent.body = 'invalid'; - expect(() => ApiGatewayEnvelope.parse(testEvent, TestSchema)).toThrow(); + expect(() => ApiGatewayEnvelope.parse(testEvent, TestSchema)).toThrow( + ParseError + ); }); }); @@ -69,7 +73,7 @@ describe('ApigwEnvelope ', () => { const resp = ApiGatewayEnvelope.safeParse(testEvent, TestSchema); expect(resp).toEqual({ success: false, - error: expect.any(SyntaxError), + error: expect.any(ParseError), originalEvent: testEvent, }); }); @@ -80,7 +84,7 @@ describe('ApigwEnvelope ', () => { ); expect(resp).toEqual({ success: false, - error: expect.any(ZodError), + error: expect.any(ParseError), originalEvent: 'invalid', }); }); diff --git a/packages/parser/tests/unit/envelopes/cloudwatch.test.ts b/packages/parser/tests/unit/envelopes/cloudwatch.test.ts index adfe6e52f9..6eec52fd9a 100644 --- a/packages/parser/tests/unit/envelopes/cloudwatch.test.ts +++ b/packages/parser/tests/unit/envelopes/cloudwatch.test.ts @@ -12,7 +12,7 @@ import { } from '../../../src/schemas/'; import { TestSchema } from '../schema/utils.js'; import { CloudWatchEnvelope } from '../../../src/envelopes/index.js'; -import { ZodError } from 'zod'; +import { ParseError } from '../../../src'; describe('CloudWatch', () => { describe('parse', () => { @@ -123,7 +123,7 @@ describe('CloudWatch', () => { it('should return success false when envelope does not match', () => { expect(CloudWatchEnvelope.safeParse({ foo: 'bar' }, TestSchema)).toEqual({ success: false, - error: expect.any(ZodError), + error: expect.any(ParseError), originalEvent: { foo: 'bar' }, }); }); diff --git a/packages/parser/tests/unit/envelopes/dynamodb.test.ts b/packages/parser/tests/unit/envelopes/dynamodb.test.ts index 4d2c9fb657..80385eca45 100644 --- a/packages/parser/tests/unit/envelopes/dynamodb.test.ts +++ b/packages/parser/tests/unit/envelopes/dynamodb.test.ts @@ -7,8 +7,9 @@ import { generateMock } from '@anatine/zod-mock'; import { TestEvents } from '../schema/utils.js'; import { DynamoDBStreamEvent } from 'aws-lambda'; -import { z, ZodError } from 'zod'; +import { z } from 'zod'; import { DynamoDBStreamEnvelope } from '../../../src/envelopes/index.js'; +import { ParseError } from '../../../src/errors.js'; describe('DynamoDB', () => { const schema = z.object({ @@ -88,7 +89,7 @@ describe('DynamoDB', () => { const parsed = DynamoDBStreamEnvelope.safeParse(invalidDDBEvent, schema); expect(parsed).toEqual({ success: false, - error: expect.any(ZodError), + error: expect.any(ParseError), originalEvent: invalidDDBEvent, }); }); @@ -111,7 +112,7 @@ describe('DynamoDB', () => { const parsed = DynamoDBStreamEnvelope.safeParse(invalidDDBEvent, schema); expect(parsed).toEqual({ success: false, - error: expect.any(ZodError), + error: expect.any(ParseError), originalEvent: invalidDDBEvent, }); }); @@ -120,7 +121,7 @@ describe('DynamoDB', () => { const parsed = DynamoDBStreamEnvelope.safeParse({ foo: 'bar' }, schema); expect(parsed).toEqual({ success: false, - error: expect.any(ZodError), + error: expect.any(ParseError), originalEvent: { foo: 'bar' }, }); }); diff --git a/packages/parser/tests/unit/envelopes/eventbridge.test.ts b/packages/parser/tests/unit/envelopes/eventbridge.test.ts index 746d95b160..1c57549818 100644 --- a/packages/parser/tests/unit/envelopes/eventbridge.test.ts +++ b/packages/parser/tests/unit/envelopes/eventbridge.test.ts @@ -7,8 +7,8 @@ import { TestEvents, TestSchema } from '../schema/utils.js'; import { generateMock } from '@anatine/zod-mock'; import { EventBridgeEvent } from 'aws-lambda'; -import { ZodError } from 'zod'; import { EventBridgeEnvelope } from '../../../src/envelopes/index.js'; +import { ParseError } from '../../../src/errors.js'; describe('EventBridgeEnvelope ', () => { describe('parse', () => { @@ -89,7 +89,7 @@ describe('EventBridgeEnvelope ', () => { EventBridgeEnvelope.safeParse(eventBridgeEvent, TestSchema) ).toEqual({ success: false, - error: expect.any(ZodError), + error: expect.any(ParseError), originalEvent: eventBridgeEvent, }); }); @@ -114,7 +114,7 @@ describe('EventBridgeEnvelope ', () => { it('should return original event and error envelope is invalid', () => { expect(EventBridgeEnvelope.safeParse(1, TestSchema)).toEqual({ success: false, - error: expect.any(ZodError), + error: expect.any(ParseError), originalEvent: 1, }); }); diff --git a/packages/parser/tests/unit/envelopes/kinesis.test.ts b/packages/parser/tests/unit/envelopes/kinesis.test.ts index f84149c252..b30c0f1e75 100644 --- a/packages/parser/tests/unit/envelopes/kinesis.test.ts +++ b/packages/parser/tests/unit/envelopes/kinesis.test.ts @@ -8,7 +8,7 @@ import { generateMock } from '@anatine/zod-mock'; import { KinesisStreamEvent } from 'aws-lambda'; import { TestEvents, TestSchema } from '../schema/utils.js'; import { KinesisEnvelope } from '../../../src/envelopes/index.js'; -import { ZodError } from 'zod'; +import { ParseError } from '../../../src/errors.js'; describe('KinesisEnvelope', () => { describe('parse', () => { @@ -54,7 +54,7 @@ describe('KinesisEnvelope', () => { const resp = KinesisEnvelope.safeParse(testEvent, TestSchema); expect(resp).toEqual({ success: false, - error: expect.any(ZodError), + error: expect.any(ParseError), originalEvent: testEvent, }); }); @@ -64,7 +64,7 @@ describe('KinesisEnvelope', () => { const resp = KinesisEnvelope.safeParse(testEvent, TestSchema); expect(resp).toEqual({ success: false, - error: expect.any(SyntaxError), + error: expect.any(ParseError), originalEvent: testEvent, }); }); diff --git a/packages/parser/tests/unit/envelopes/sns.test.ts b/packages/parser/tests/unit/envelopes/sns.test.ts index c1e9b67bee..5a6389c9fe 100644 --- a/packages/parser/tests/unit/envelopes/sns.test.ts +++ b/packages/parser/tests/unit/envelopes/sns.test.ts @@ -4,11 +4,12 @@ * @group unit/parser/envelopes */ -import { z, ZodError } from 'zod'; +import { z } from 'zod'; import { generateMock } from '@anatine/zod-mock'; import { SNSEvent, SQSEvent } from 'aws-lambda'; import { TestEvents, TestSchema } from '../schema/utils.js'; import { SnsEnvelope, SnsSqsEnvelope } from '../../../src/envelopes/index.js'; +import { ParseError } from '../../../src/errors.js'; describe('Sns and SQS Envelope', () => { describe('SnsSqsEnvelope parse', () => { @@ -58,7 +59,7 @@ describe('Sns and SQS Envelope', () => { expect(SnsSqsEnvelope.safeParse(snsSqsTestEvent, TestSchema)).toEqual({ success: false, - error: expect.any(ZodError), + error: expect.any(ParseError), originalEvent: snsSqsTestEvent, }); }); @@ -71,7 +72,7 @@ describe('Sns and SQS Envelope', () => { expect(SnsSqsEnvelope.safeParse(snsSqsTestEvent, TestSchema)).toEqual({ success: false, - error: expect.any(ZodError), + error: expect.any(ParseError), originalEvent: snsSqsTestEvent, }); }); @@ -148,7 +149,7 @@ describe('SnsEnvelope', () => { expect(SnsEnvelope.safeParse(testEvent, TestSchema)).toEqual({ success: false, - error: expect.any(ZodError), + error: expect.any(ParseError), originalEvent: testEvent, }); }); diff --git a/packages/parser/tests/unit/envelopes/sqs.test.ts b/packages/parser/tests/unit/envelopes/sqs.test.ts index 4d1ab3a419..778e0baee1 100644 --- a/packages/parser/tests/unit/envelopes/sqs.test.ts +++ b/packages/parser/tests/unit/envelopes/sqs.test.ts @@ -8,7 +8,7 @@ import { generateMock } from '@anatine/zod-mock'; import { TestEvents, TestSchema } from '../schema/utils.js'; import { SQSEvent } from 'aws-lambda'; import { SqsEnvelope } from '../../../src/envelopes/sqs.js'; -import { ZodError } from 'zod'; +import { ParseError } from '../../../src/errors.js'; describe('SqsEnvelope ', () => { describe('parse', () => { @@ -54,7 +54,7 @@ describe('SqsEnvelope ', () => { sqsEvent.Records[0].body = JSON.stringify({ foo: 'bar' }); expect(SqsEnvelope.safeParse(sqsEvent, TestSchema)).toEqual({ success: false, - error: expect.any(ZodError), + error: expect.any(ParseError), originalEvent: sqsEvent, }); }); @@ -62,7 +62,7 @@ describe('SqsEnvelope ', () => { it('should return error if envelope is invalid', () => { expect(SqsEnvelope.safeParse({ foo: 'bar' }, TestSchema)).toEqual({ success: false, - error: expect.any(ZodError), + error: expect.any(ParseError), originalEvent: { foo: 'bar' }, }); }); diff --git a/packages/parser/tests/unit/parser.decorator.test.ts b/packages/parser/tests/unit/parser.decorator.test.ts index 1e05efa510..dcc4dc6756 100644 --- a/packages/parser/tests/unit/parser.decorator.test.ts +++ b/packages/parser/tests/unit/parser.decorator.test.ts @@ -10,9 +10,10 @@ import { parser } from '../../src/index.js'; import { TestSchema, TestEvents } from './schema/utils'; import { generateMock } from '@anatine/zod-mock'; import { EventBridgeSchema } from '../../src/schemas/index.js'; -import { z, ZodError } from 'zod'; +import { z } from 'zod'; import { ParsedResult, EventBridgeEvent } from '../../src/types'; import { EventBridgeEnvelope } from '../../src/envelopes/index.js'; +import { ParseError } from '../../src/errors.js'; describe('Parser Decorator', () => { const customEventBridgeSchema = EventBridgeSchema.extend({ @@ -160,7 +161,7 @@ describe('Parser Decorator', () => { // @ts-ignore await lambda.handlerWithSchemaAndSafeParse({ foo: 'bar' }, {} as Context) ).toEqual({ - error: expect.any(ZodError), + error: expect.any(ParseError), success: false, originalEvent: { foo: 'bar' }, }); @@ -193,7 +194,7 @@ describe('Parser Decorator', () => { {} as Context ) ).toEqual({ - error: expect.any(ZodError), + error: expect.any(ParseError), success: false, originalEvent: { foo: 'bar' }, }); From 080ae52cca602007e520de3bbc6050aa0c04f041 Mon Sep 17 00:00:00 2001 From: Andrea Amorosi Date: Mon, 15 Apr 2024 10:22:53 +0200 Subject: [PATCH 59/60] chore: remove rebase leftovers --- .github/ISSUE_TEMPLATE/bug_report.yml | 12 +++++----- .github/scripts/release_patch_package_json.js | 23 +++---------------- .npmignore | 2 +- docs/snippets/package.json | 1 - .../layerPublisher.class.test.functionCode.ts | 7 ++---- .../parameters/src/secrets/SecretsProvider.ts | 6 ++--- v2.json | 3 --- 7 files changed, 15 insertions(+), 39 deletions(-) delete mode 100644 v2.json diff --git a/.github/ISSUE_TEMPLATE/bug_report.yml b/.github/ISSUE_TEMPLATE/bug_report.yml index 3b9c913987..06af982ec3 100644 --- a/.github/ISSUE_TEMPLATE/bug_report.yml +++ b/.github/ISSUE_TEMPLATE/bug_report.yml @@ -1,14 +1,14 @@ name: Bug report description: Report a reproducible bug to help us improve -title: 'Bug: TITLE' -labels: ['type/bug', 'triage'] -projects: ['aws-powertools/7'] +title: "Bug: TITLE" +labels: ["type/bug", "triage"] +projects: ["aws-powertools/7"] body: - type: markdown attributes: value: | Thank you for submitting a bug report. Before you start, make sure that [the bug hasn't been reported already](https://github.com/aws-powertools/powertools-lambda-typescript/issues). - + Please add as much information as possible to help us reproduce, and remove any potential sensitive data. - type: textarea id: expected_behaviour @@ -58,7 +58,7 @@ body: id: version attributes: label: Powertools for AWS Lambda (TypeScript) version - placeholder: 'latest, 2.0.0' + placeholder: "latest, 1.3.0" value: latest validations: required: true @@ -95,4 +95,4 @@ body: value: | --- - **Disclaimer**: After creating an issue, please wait until it is triaged and confirmed by a maintainer before implementing it. This will reduce amount of rework and the chance that a pull request gets rejected. + **Disclaimer**: After creating an issue, please wait until it is triaged and confirmed by a maintainer before implementing it. This will reduce amount of rework and the chance that a pull request gets rejected. \ No newline at end of file diff --git a/.github/scripts/release_patch_package_json.js b/.github/scripts/release_patch_package_json.js index 932bc7b109..ccd2ad674e 100644 --- a/.github/scripts/release_patch_package_json.js +++ b/.github/scripts/release_patch_package_json.js @@ -17,15 +17,7 @@ if (process.argv.length < 3) { } const basePath = resolve(process.argv[2]); const packageJsonPath = join(basePath, 'package.json'); -const alphaPackages = [ - '@aws-lambda-powertools/batch', - '@aws-lambda-powertools/commons', - '@aws-lambda-powertools/idempotency', - '@aws-lambda-powertools/logger', - '@aws-lambda-powertools/metrics', - '@aws-lambda-powertools/parameters', - '@aws-lambda-powertools/tracer', -]; +const alphaPackages = []; const betaPackages = []; (() => { @@ -58,16 +50,7 @@ const betaPackages = []; let version = originalVersion; // If the package is an alpha or beta package, update the version number to include a suffix if (alphaPackages.includes(name)) { - const iteration = JSON.parse( - readFileSync(resolve('..', '..', 'v2.json'), 'utf8') - ).iteration; - version = `${version}-alpha.${iteration}`; - dependencies && - Object.entries(dependencies).forEach(([dependencyName, version]) => { - if (alphaPackages.includes(dependencyName)) { - dependencies[dependencyName] = `${version}-alpha.${iteration}`; - } - }); + version = `${version}-alpha`; } else if (betaPackages.includes(name)) { version = `${version}-beta`; } @@ -111,4 +94,4 @@ const betaPackages = []; } catch (err) { throw err; } -})(); +})(); \ No newline at end of file diff --git a/.npmignore b/.npmignore index 54ce5720a8..d502d47a85 100644 --- a/.npmignore +++ b/.npmignore @@ -1,6 +1,5 @@ src tests -jest.config.cjs tsconfig.json .vscode .github @@ -13,6 +12,7 @@ coverage tslint.json tsconfig.json MakeFile +jest.config.cjs .npmignore .eslintignore .huskyrc.js diff --git a/docs/snippets/package.json b/docs/snippets/package.json index 1449d62425..eeb20f64fe 100644 --- a/docs/snippets/package.json +++ b/docs/snippets/package.json @@ -2,7 +2,6 @@ "name": "docs", "version": "2.0.4", "description": "A collection code snippets for the Powertools for AWS Lambda (TypeScript) docs", - "type": "module", "author": { "name": "Amazon Web Services", "url": "https://aws.amazon.com" diff --git a/layers/tests/e2e/layerPublisher.class.test.functionCode.ts b/layers/tests/e2e/layerPublisher.class.test.functionCode.ts index 3f15dfbbb1..b95eeafea9 100644 --- a/layers/tests/e2e/layerPublisher.class.test.functionCode.ts +++ b/layers/tests/e2e/layerPublisher.class.test.functionCode.ts @@ -91,12 +91,9 @@ export const handler = async (): Promise => { 'batch', ]) { const moduleVersion = await getVersionFromModule(moduleName); - // TODO: remove this check once v2 becomes GA - // if (moduleVersion != expectedVersion) { - if (!moduleVersion.startsWith(expectedVersion)) { + if (moduleVersion != expectedVersion) { throw new Error( - // `Package version mismatch (${moduleName}): ${moduleVersion} != ${expectedVersion}` - `Package version mismatch (${moduleName}): ${moduleVersion} does not start with ${expectedVersion}` + `Package version mismatch (${moduleName}): ${moduleVersion} != ${expectedVersion}` ); } } diff --git a/packages/parameters/src/secrets/SecretsProvider.ts b/packages/parameters/src/secrets/SecretsProvider.ts index 3817e2a108..c60d2aee85 100644 --- a/packages/parameters/src/secrets/SecretsProvider.ts +++ b/packages/parameters/src/secrets/SecretsProvider.ts @@ -138,11 +138,11 @@ import type { * * This object must be an instance of the [AWS SDK v3 for JavaScript Secrets Manager client](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/clients/client-secrets-manager/classes/secretsmanagerclient.html). * - * For more usage examples, see [our documentation](https://docs.powertools.aws.dev/lambda-typescript/latest/utilities/parameters/). + * For more usage examples, see [our documentation](https://docs.powertools.aws.dev/lambda/typescript/latest/utilities/parameters/). * * @class * @implements {BaseProvider} - * @see https://docs.powertools.aws.dev/lambda-typescript/latest/utilities/parameters/ + * @see https://docs.powertools.aws.dev/lambda/typescript/latest/utilities/parameters/ */ class SecretsProvider extends BaseProvider { public declare client: SecretsManagerClient; @@ -186,7 +186,7 @@ class SecretsProvider extends BaseProvider { * * @param {string} name - The name of the secret * @param {SecretsGetOptions} options - Options to customize the retrieval of the secret - * @see https://docs.powertools.aws.dev/lambda-typescript/latest/utilities/parameters/ + * @see https://docs.powertools.aws.dev/lambda/typescript/latest/utilities/parameters/ */ public async get< ExplicitUserProvidedType = undefined, diff --git a/v2.json b/v2.json deleted file mode 100644 index f732091fe5..0000000000 --- a/v2.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "iteration": 0 -} \ No newline at end of file From e0d05295e968a019ea5f70aac3884ddf04bdf36e Mon Sep 17 00:00:00 2001 From: Andrea Amorosi Date: Mon, 15 Apr 2024 13:12:48 +0200 Subject: [PATCH 60/60] docs(parser): add utility readme --- docs/utilities/parser.md | 61 ++++----- packages/parser/README.md | 274 +++++++++++++++++++++++++++++++++++++- 2 files changed, 298 insertions(+), 37 deletions(-) diff --git a/docs/utilities/parser.md b/docs/utilities/parser.md index 7a31119c29..4947f86a2c 100644 --- a/docs/utilities/parser.md +++ b/docs/utilities/parser.md @@ -4,11 +4,8 @@ descrition: Utility status: new --- - -???+ warning - **This utility is currently released as beta developer preview** and is intended strictly for feedback and testing purposes **and not for production workloads**. The version and all future versions tagged with the `-beta` suffix should be treated as not stable. Up until before the [General Availability release](https://github.com/aws-powertools/powertools-lambda-typescript/milestone/16) we might introduce significant breaking changes and improvements in response to customers feedback. - This utility provides data validation and parsing using [Zod](https://zod.dev){target="_blank"}. + Zod is a TypeScript-first schema declaration and validation library. ## Key features @@ -42,7 +39,7 @@ You can create complex schemas by using nested objects, arrays, unions, and othe ## Parse events -You can parse inbound events using `parser` decorator or middy middleware, or [manually](#manual-parsing) using built-in envelopes and schemas. +You can parse inbound events using `parser` decorator, Middy.js middleware, or [manually](#manual-parsing) using built-in envelopes and schemas. Both are also able to parse either an object or JSON string as an input. ???+ warning @@ -64,32 +61,32 @@ Both are also able to parse either an object or JSON string as an input. Parser comes with the following built-in schemas: -| Model name | Description | -|-----------------------------------------------| ------------------------------------------------------------------------------------- | -| **AlbSchema** | Lambda Event Source payload for Amazon Application Load Balancer | -| **APIGatewayProxyEventSchema** | Lambda Event Source payload for Amazon API Gateway | -| **APIGatewayProxyEventV2Schema** | Lambda Event Source payload for Amazon API Gateway v2 payload | -| **CloudFormationCustomResourceCreateSchema** | Lambda Event Source payload for AWS CloudFormation `CREATE` operation | -| **CloudFormationCustomResourceUpdateSchema** | Lambda Event Source payload for AWS CloudFormation `UPDATE` operation | -| **CloudFormationCustomResourceDeleteSchema** | Lambda Event Source payload for AWS CloudFormation `DELETE` operation | -| **CloudwatchLogsSchema** | Lambda Event Source payload for Amazon CloudWatch Logs | -| **DynamoDBStreamSchema** | Lambda Event Source payload for Amazon DynamoDB Streams | -| **EventBridgeSchema** | Lambda Event Source payload for Amazon EventBridge | -| **KafkaMskEventSchema** | Lambda Event Source payload for AWS MSK payload | -| **KafkaSelfManagedEventSchema** | Lambda Event Source payload for self managed Kafka payload | -| **KinesisDataStreamSchema** | Lambda Event Source payload for Amazon Kinesis Data Streams | -| **KinesisFirehoseSchema** | Lambda Event Source payload for Amazon Kinesis Firehose | -| **KinesisFirehoseSqsSchema** | Lambda Event Source payload for SQS messages wrapped in Kinesis Firehose records | -| **LambdaFunctionUrlSchema** | Lambda Event Source payload for Lambda Function URL payload | -| **S3EventNotificationEventBridgeSchema** | Lambda Event Source payload for Amazon S3 Event Notification to EventBridge. | -| **S3Schema** | Lambda Event Source payload for Amazon S3 | -| **S3ObjectLambdaEvent** | Lambda Event Source payload for Amazon S3 Object Lambda | -| **S3SqsEventNotificationSchema** | Lambda Event Source payload for S3 event notifications wrapped in SQS event (S3->SQS) | -| **SesSchema** | Lambda Event Source payload for Amazon Simple Email Service | -| **SnsSchema** | Lambda Event Source payload for Amazon Simple Notification Service | -| **SqsSchema** | Lambda Event Source payload for Amazon SQS | -| **VpcLatticeSchema** | Lambda Event Source payload for Amazon VPC Lattice | -| **VpcLatticeV2Schema** | Lambda Event Source payload for Amazon VPC Lattice v2 payload | +| Model name | Description | +| -------------------------------------------- | ------------------------------------------------------------------------------------- | +| **AlbSchema** | Lambda Event Source payload for Amazon Application Load Balancer | +| **APIGatewayProxyEventSchema** | Lambda Event Source payload for Amazon API Gateway | +| **APIGatewayProxyEventV2Schema** | Lambda Event Source payload for Amazon API Gateway v2 payload | +| **CloudFormationCustomResourceCreateSchema** | Lambda Event Source payload for AWS CloudFormation `CREATE` operation | +| **CloudFormationCustomResourceUpdateSchema** | Lambda Event Source payload for AWS CloudFormation `UPDATE` operation | +| **CloudFormationCustomResourceDeleteSchema** | Lambda Event Source payload for AWS CloudFormation `DELETE` operation | +| **CloudwatchLogsSchema** | Lambda Event Source payload for Amazon CloudWatch Logs | +| **DynamoDBStreamSchema** | Lambda Event Source payload for Amazon DynamoDB Streams | +| **EventBridgeSchema** | Lambda Event Source payload for Amazon EventBridge | +| **KafkaMskEventSchema** | Lambda Event Source payload for AWS MSK payload | +| **KafkaSelfManagedEventSchema** | Lambda Event Source payload for self managed Kafka payload | +| **KinesisDataStreamSchema** | Lambda Event Source payload for Amazon Kinesis Data Streams | +| **KinesisFirehoseSchema** | Lambda Event Source payload for Amazon Kinesis Firehose | +| **KinesisFirehoseSqsSchema** | Lambda Event Source payload for SQS messages wrapped in Kinesis Firehose records | +| **LambdaFunctionUrlSchema** | Lambda Event Source payload for Lambda Function URL payload | +| **S3EventNotificationEventBridgeSchema** | Lambda Event Source payload for Amazon S3 Event Notification to EventBridge. | +| **S3Schema** | Lambda Event Source payload for Amazon S3 | +| **S3ObjectLambdaEvent** | Lambda Event Source payload for Amazon S3 Object Lambda | +| **S3SqsEventNotificationSchema** | Lambda Event Source payload for S3 event notifications wrapped in SQS event (S3->SQS) | +| **SesSchema** | Lambda Event Source payload for Amazon Simple Email Service | +| **SnsSchema** | Lambda Event Source payload for Amazon Simple Notification Service | +| **SqsSchema** | Lambda Event Source payload for Amazon SQS | +| **VpcLatticeSchema** | Lambda Event Source payload for Amazon VPC Lattice | +| **VpcLatticeV2Schema** | Lambda Event Source payload for Amazon VPC Lattice v2 payload | ### Extend built-in schemas @@ -151,7 +148,7 @@ We have also complex envelopes that parse the payload from a string, decode base Parser comes with the following built-in envelopes: | Envelope name | Behaviour | -| ----------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| ----------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | **apiGatewayEnvelope** | 1. Parses data using `APIGatewayProxyEventSchema`.
2. Parses `body` key using your schema and returns it. | | **apiGatewayV2Envelope** | 1. Parses data using `APIGatewayProxyEventV2Schema`.
2. Parses `body` key using your schema and returns it. | | **cloudWatchEnvelope** | 1. Parses data using `CloudwatchLogsSchema` which will base64 decode and decompress it.
2. Parses records in `message` key using your schema and return them in a list. | diff --git a/packages/parser/README.md b/packages/parser/README.md index efc076dcc7..e430a5c350 100644 --- a/packages/parser/README.md +++ b/packages/parser/README.md @@ -1,13 +1,17 @@ # Powertools for AWS Lambda (TypeScript) - Parser Utility +Powertools for AWS Lambda (TypeScript) is a developer toolkit to implement Serverless [best practices and increase developer velocity](https://docs.powertools.aws.dev/lambda/typescript/latest/#features). -| ⚠️ **WARNING: Do not use this utility in production just yet!** ⚠️ | -| :--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| **This utility is currently released as beta developer preview** and is intended strictly for feedback and testing purposes **and not for production workloads**.. The version and all future versions tagged with the `-beta` suffix should be treated as not stable. Up until before the [General Availability release](https://github.com/aws-powertools/powertools-lambda-typescript/milestone/14) we might introduce significant breaking changes and improvements in response to customers feedback. | _ | +You can use the package in both TypeScript and JavaScript code bases. - [Intro](#intro) - [Key features](#key-features) - [Usage](#usage) + - [Middleware](#middleware) + - [Decorator](#decorator) + - [Manual parsing](#manual-parsing) + - [Safe parsing](#safe-parsing) + - [Built-in schemas and envelopes](#built-in-schemas-and-envelopes) - [Contribute](#contribute) - [Roadmap](#roadmap) - [Connect](#connect) @@ -20,10 +24,268 @@ ## Intro +The parser utility provides data validation and parsing using [Zod](https://zod.dev), a TypeScript-first schema declaration and validation library. + ## Key features +* Define data schema as Zod schema, then parse, validate and extract only what you want +* Built-in envelopes to unwrap and validate popular AWS event sources payloads +* Extend and customize envelopes to fit your needs +* Safe parsing option to avoid throwing errors and custom error handling +* Available for Middy.js middleware and TypeScript method decorators + ## Usage +To get started, install the library by running: + +```sh +npm install @aws-lambda-powertools/parser zod@~3 +``` + +Then, define your schema using Zod: + +```typescript +import { z } from 'zod'; + +const orderSchema = z.object({ + id: z.number().positive(), + description: z.string(), + items: z.array( + z.object({ + id: z.number().positive(), + quantity: z.number(), + description: z.string(), + }) + ), + optionalField: z.string().optional(), +}); + +export { orderSchema }; +``` + +Next, you can parse incoming events using the `parser` decorator or Middy.js middleware: + +### Middleware + +```typescript +import type { Context } from 'aws-lambda'; +import { parser } from '@aws-lambda-powertools/parser/middleware'; +import { z } from 'zod'; +import middy from '@middy/core'; +import { Logger } from '@aws-lambda-powertools/logger'; + +const logger = new Logger(); + +const orderSchema = z.object({ + id: z.number().positive(), + description: z.string(), + items: z.array( + z.object({ + id: z.number().positive(), + quantity: z.number(), + description: z.string(), + }) + ), + optionalField: z.string().optional(), +}); + +type Order = z.infer; + +const lambdaHandler = async ( + event: Order, + _context: Context +): Promise => { + for (const item of event.items) { + // item is parsed as OrderItem + logger.info('Processing item', { item }); + } +}; + +export const handler = middy(lambdaHandler).use( + parser({ schema: orderSchema }) +); +``` + +### Decorator + +```typescript +import type { Context } from 'aws-lambda'; +import type { LambdaInterface } from '@aws-lambda-powertools/commons/types'; +import { parser } from '@aws-lambda-powertools/parser'; +import { z } from 'zod'; +import { Logger } from '@aws-lambda-powertools/logger'; + +const logger = new Logger(); + +const orderSchema = z.object({ + id: z.number().positive(), + description: z.string(), + items: z.array( + z.object({ + id: z.number().positive(), + quantity: z.number(), + description: z.string(), + }) + ), + optionalField: z.string().optional(), +}); + +type Order = z.infer; + +class Lambda implements LambdaInterface { + @parser({ schema: orderSchema }) + public async handler(event: Order, _context: Context): Promise { + // event is now typed as Order + for (const item of event.items) { + logger.info('Processing item', { item }); + } + } +} + +const myFunction = new Lambda(); +export const handler = myFunction.handler.bind(myFunction); +``` + +### Manual parsing + +If you don't want to add an additional dependency, or you prefer the manual approach, you can `parse` the event directly by calling the `parse` method on schemas and envelopes: + +```typescript +import type { Context } from 'aws-lambda'; +import { z } from 'zod'; +import { EventBridgeEnvelope } from '@aws-lambda-powertools/parser/envelopes'; +import { EventBridgeSchema } from '@aws-lambda-powertools/parser/schemas'; +import type { EventBridgeEvent } from '@aws-lambda-powertools/parser/types'; +import { Logger } from '@aws-lambda-powertools/logger'; + +const logger = new Logger(); + +const orderSchema = z.object({ + id: z.number().positive(), + description: z.string(), + items: z.array( + z.object({ + id: z.number().positive(), + quantity: z.number(), + description: z.string(), + }) + ), + optionalField: z.string().optional(), +}); +type Order = z.infer; + +export const handler = async ( + event: EventBridgeEvent, + _context: Context +): Promise => { + const parsedEvent = EventBridgeSchema.parse(event); + logger.info('Parsed event', parsedEvent); + + const orders: Order = EventBridgeEnvelope.parse(event, orderSchema); + logger.info('Parsed orders', orders); +}; +``` + +### Safe parsing + +When parsing data, you can use the `safeParse` method to avoid throwing errors and handle them manually: + + +```typescript +import type { Context } from 'aws-lambda'; +import { parser } from '@aws-lambda-powertools/parser/middleware'; +import { z } from 'zod'; +import middy from '@middy/core'; +import type { + ParsedResult, + EventBridgeEvent, +} from '@aws-lambda-powertools/parser/types'; +import { Logger } from '@aws-lambda-powertools/logger'; + +const logger = new Logger(); + +const orderSchema = z.object({ + id: z.number().positive(), + description: z.string(), + items: z.array( + z.object({ + id: z.number().positive(), + quantity: z.number(), + description: z.string(), + }) + ), + optionalField: z.string().optional(), +}); + +type Order = z.infer; + +const lambdaHandler = async ( + event: ParsedResult, + _context: Context +): Promise => { + if (event.success) { + // (2)! + for (const item of event.data.items) { + logger.info('Processing item', { item }); + } + } else { + logger.error('Error parsing event', { event: event.error }); + logger.error('Original event', { event: event.originalEvent }); + } +}; + +export const handler = middy(lambdaHandler).use( + parser({ schema: orderSchema, safeParse: true }) +); +``` + +See the [safe parsing](https://docs.powertools.aws.dev/lambda/typescript/latest/utilities/parser#safe-parsing) section in the documentation for more details. + +### Built-in schemas and envelopes + +The utility provides a set of built-in schemas and envelopes to parse popular AWS event sources payloads, for example: + +```typescript +import type { Context } from 'aws-lambda'; +import type { LambdaInterface } from '@aws-lambda-powertools/commons/types'; +import { parser } from '@aws-lambda-powertools/parser'; +import { z } from 'zod'; +import { EventBridgeEnvelope } from '@aws-lambda-powertools/parser/envelopes'; +import { Logger } from '@aws-lambda-powertools/logger'; + +const logger = new Logger(); + +const orderSchema = z.object({ + id: z.number().positive(), + description: z.string(), + items: z.array( + z.object({ + id: z.number().positive(), + quantity: z.number(), + description: z.string(), + }) + ), + optionalField: z.string().optional(), +}); + +type Order = z.infer; + +class Lambda implements LambdaInterface { + @parser({ schema: orderSchema, envelope: EventBridgeEnvelope }) + public async handler(event: Order, _context: Context): Promise { + // event is now typed as Order + for (const item of event.items) { + logger.info('Processing item', item); // (2)! + } + } +} + +const myFunction = new Lambda(); +export const handler = myFunction.handler.bind(myFunction); +``` + +Check the utility documentation for a complete list of built-in [schemas](https://docs.powertools.aws.dev/lambda/typescript/latest/utilities/parser/#built-in-schemas) and [envelopes](https://docs.powertools.aws.dev/lambda/typescript/latest/utilities/parser/#built-in-envelopes). + ## Contribute If you are interested in contributing to this project, please refer to our [Contributing Guidelines](https://github.com/aws-powertools/powertools-lambda-typescript/blob/main/CONTRIBUTING.md). @@ -55,14 +317,16 @@ The following companies, among others, use Powertools: * [Sennder](https://sennder.com/) * [Certible](https://www.certible.com/) * [tecRacer GmbH & Co. KG](https://www.tecracer.com/) +* [AppYourself](https://appyourself.net) +* [Alma Media](https://www.almamedia.fi) ### Sharing your work -Share what you did with Powertools for AWS Lambda (TypeScript) 💞💞. Blog post, workshops, presentation, sample apps and others. Check out what the community has already shared about Powertools for AWS Lambda (TypeScript) [here](https://docs.powertools.aws.dev/lambda-typescript/latest/we_made_this). +Share what you did with Powertools for AWS Lambda (TypeScript) 💞💞. Blog post, workshops, presentation, sample apps and others. Check out what the community has already shared about Powertools for AWS Lambda (TypeScript) [here](https://docs.powertools.aws.dev/lambda/typescript/latest/we_made_this). ### Using Lambda Layer -This helps us understand who uses Powertools for AWS Lambda (TypeScript) in a non-intrusive way, and helps us gain future investments for other Powertools for AWS Lambda languages. When [using Layers](#lambda-layers), you can add Powertools as a dev dependency (or as part of your virtual env) to not impact the development process. +This helps us understand who uses Powertools for AWS Lambda (TypeScript) in a non-intrusive way, and helps us gain future investments for other Powertools for AWS Lambda languages. When [using Layers](https://docs.powertools.aws.dev/lambda/typescript/latest/#lambda-layer), you can add Powertools as a dev dependency (or as part of your virtual env) to not impact the development process. ## Credits