From f39922bba9852b8f6fea9fed20cb161e93ae569c Mon Sep 17 00:00:00 2001 From: Kai Nguyen Date: Mon, 1 Jul 2024 15:11:12 +1000 Subject: [PATCH 1/6] MICRO-53: Rename general template folder --- .../.eslintrc.json.template | 0 .../service/{files => general-files}/README.md | 0 .../docs/sample-context-diagram.png | Bin .../{files => general-files}/package.json.template | 0 .../serverless.yml.template | 0 .../src/lambda/hello.ts.template | 0 .../src/lambda/world.ts.template | 0 .../tests/__data__/example-data.ts.template | 2 +- .../tests/example-tests.test.ts.template | 0 .../{files => general-files}/tsconfig.json.template | 0 .../vite.config.ts.template | 0 11 files changed, 1 insertion(+), 1 deletion(-) rename tools/serverless-plugin/src/generators/service/{files => general-files}/.eslintrc.json.template (100%) rename tools/serverless-plugin/src/generators/service/{files => general-files}/README.md (100%) rename tools/serverless-plugin/src/generators/service/{files => general-files}/docs/sample-context-diagram.png (100%) rename tools/serverless-plugin/src/generators/service/{files => general-files}/package.json.template (100%) rename tools/serverless-plugin/src/generators/service/{files => general-files}/serverless.yml.template (100%) rename tools/serverless-plugin/src/generators/service/{files => general-files}/src/lambda/hello.ts.template (100%) rename tools/serverless-plugin/src/generators/service/{files => general-files}/src/lambda/world.ts.template (100%) rename tools/serverless-plugin/src/generators/service/{files => general-files}/tests/__data__/example-data.ts.template (55%) rename tools/serverless-plugin/src/generators/service/{files => general-files}/tests/example-tests.test.ts.template (100%) rename tools/serverless-plugin/src/generators/service/{files => general-files}/tsconfig.json.template (100%) rename tools/serverless-plugin/src/generators/service/{files => general-files}/vite.config.ts.template (100%) diff --git a/tools/serverless-plugin/src/generators/service/files/.eslintrc.json.template b/tools/serverless-plugin/src/generators/service/general-files/.eslintrc.json.template similarity index 100% rename from tools/serverless-plugin/src/generators/service/files/.eslintrc.json.template rename to tools/serverless-plugin/src/generators/service/general-files/.eslintrc.json.template diff --git a/tools/serverless-plugin/src/generators/service/files/README.md b/tools/serverless-plugin/src/generators/service/general-files/README.md similarity index 100% rename from tools/serverless-plugin/src/generators/service/files/README.md rename to tools/serverless-plugin/src/generators/service/general-files/README.md diff --git a/tools/serverless-plugin/src/generators/service/files/docs/sample-context-diagram.png b/tools/serverless-plugin/src/generators/service/general-files/docs/sample-context-diagram.png similarity index 100% rename from tools/serverless-plugin/src/generators/service/files/docs/sample-context-diagram.png rename to tools/serverless-plugin/src/generators/service/general-files/docs/sample-context-diagram.png diff --git a/tools/serverless-plugin/src/generators/service/files/package.json.template b/tools/serverless-plugin/src/generators/service/general-files/package.json.template similarity index 100% rename from tools/serverless-plugin/src/generators/service/files/package.json.template rename to tools/serverless-plugin/src/generators/service/general-files/package.json.template diff --git a/tools/serverless-plugin/src/generators/service/files/serverless.yml.template b/tools/serverless-plugin/src/generators/service/general-files/serverless.yml.template similarity index 100% rename from tools/serverless-plugin/src/generators/service/files/serverless.yml.template rename to tools/serverless-plugin/src/generators/service/general-files/serverless.yml.template diff --git a/tools/serverless-plugin/src/generators/service/files/src/lambda/hello.ts.template b/tools/serverless-plugin/src/generators/service/general-files/src/lambda/hello.ts.template similarity index 100% rename from tools/serverless-plugin/src/generators/service/files/src/lambda/hello.ts.template rename to tools/serverless-plugin/src/generators/service/general-files/src/lambda/hello.ts.template diff --git a/tools/serverless-plugin/src/generators/service/files/src/lambda/world.ts.template b/tools/serverless-plugin/src/generators/service/general-files/src/lambda/world.ts.template similarity index 100% rename from tools/serverless-plugin/src/generators/service/files/src/lambda/world.ts.template rename to tools/serverless-plugin/src/generators/service/general-files/src/lambda/world.ts.template diff --git a/tools/serverless-plugin/src/generators/service/files/tests/__data__/example-data.ts.template b/tools/serverless-plugin/src/generators/service/general-files/tests/__data__/example-data.ts.template similarity index 55% rename from tools/serverless-plugin/src/generators/service/files/tests/__data__/example-data.ts.template rename to tools/serverless-plugin/src/generators/service/general-files/tests/__data__/example-data.ts.template index d5dbbd21..65705200 100644 --- a/tools/serverless-plugin/src/generators/service/files/tests/__data__/example-data.ts.template +++ b/tools/serverless-plugin/src/generators/service/general-files/tests/__data__/example-data.ts.template @@ -1,4 +1,4 @@ -export const YOUR_ENV_VAR = process.env.YOUR_ENV_VAR; +export const YOUR_ENV_VAR = process.env['YOUR_ENV_VAR']; export const simpleObject = { name: 'Test Object', diff --git a/tools/serverless-plugin/src/generators/service/files/tests/example-tests.test.ts.template b/tools/serverless-plugin/src/generators/service/general-files/tests/example-tests.test.ts.template similarity index 100% rename from tools/serverless-plugin/src/generators/service/files/tests/example-tests.test.ts.template rename to tools/serverless-plugin/src/generators/service/general-files/tests/example-tests.test.ts.template diff --git a/tools/serverless-plugin/src/generators/service/files/tsconfig.json.template b/tools/serverless-plugin/src/generators/service/general-files/tsconfig.json.template similarity index 100% rename from tools/serverless-plugin/src/generators/service/files/tsconfig.json.template rename to tools/serverless-plugin/src/generators/service/general-files/tsconfig.json.template diff --git a/tools/serverless-plugin/src/generators/service/files/vite.config.ts.template b/tools/serverless-plugin/src/generators/service/general-files/vite.config.ts.template similarity index 100% rename from tools/serverless-plugin/src/generators/service/files/vite.config.ts.template rename to tools/serverless-plugin/src/generators/service/general-files/vite.config.ts.template From 5f01e247f352eff1d4fa0ae81b6271588834d9b6 Mon Sep 17 00:00:00 2001 From: Kai Nguyen Date: Mon, 1 Jul 2024 15:26:45 +1000 Subject: [PATCH 2/6] MICRO-53: Added notification template --- .../.eslintrc.json.template | 18 +++ .../docs/architecture-diagram.mmd | 4 + .../docs/architecture-diagram.svg | 1 + .../notification-files/package.json.template | 5 + .../serverless.yml.template | 57 ++++++++ .../src/lambda/notify-error.ts.template | 49 +++++++ .../src/utils/aws-formatting.ts.template | 83 +++++++++++ .../src/utils/aws-sns.ts.template | 57 ++++++++ .../tests/aws-formatting.test.ts.template | 130 ++++++++++++++++++ .../notification-files/tsconfig.json.template | 12 ++ .../types/notify-error.ts.template | 62 +++++++++ .../vite.config.ts.template | 16 +++ 12 files changed, 494 insertions(+) create mode 100644 tools/serverless-plugin/src/generators/service/notification-files/.eslintrc.json.template create mode 100644 tools/serverless-plugin/src/generators/service/notification-files/docs/architecture-diagram.mmd create mode 100644 tools/serverless-plugin/src/generators/service/notification-files/docs/architecture-diagram.svg create mode 100644 tools/serverless-plugin/src/generators/service/notification-files/package.json.template create mode 100644 tools/serverless-plugin/src/generators/service/notification-files/serverless.yml.template create mode 100644 tools/serverless-plugin/src/generators/service/notification-files/src/lambda/notify-error.ts.template create mode 100644 tools/serverless-plugin/src/generators/service/notification-files/src/utils/aws-formatting.ts.template create mode 100644 tools/serverless-plugin/src/generators/service/notification-files/src/utils/aws-sns.ts.template create mode 100644 tools/serverless-plugin/src/generators/service/notification-files/tests/aws-formatting.test.ts.template create mode 100644 tools/serverless-plugin/src/generators/service/notification-files/tsconfig.json.template create mode 100644 tools/serverless-plugin/src/generators/service/notification-files/types/notify-error.ts.template create mode 100644 tools/serverless-plugin/src/generators/service/notification-files/vite.config.ts.template diff --git a/tools/serverless-plugin/src/generators/service/notification-files/.eslintrc.json.template b/tools/serverless-plugin/src/generators/service/notification-files/.eslintrc.json.template new file mode 100644 index 00000000..5626944b --- /dev/null +++ b/tools/serverless-plugin/src/generators/service/notification-files/.eslintrc.json.template @@ -0,0 +1,18 @@ +{ + "extends": ["../../.eslintrc.json"], + "ignorePatterns": ["!**/*"], + "overrides": [ + { + "files": ["*.ts", "*.tsx", "*.js", "*.jsx"], + "rules": {} + }, + { + "files": ["*.ts", "*.tsx"], + "rules": {} + }, + { + "files": ["*.js", "*.jsx"], + "rules": {} + } + ] +} diff --git a/tools/serverless-plugin/src/generators/service/notification-files/docs/architecture-diagram.mmd b/tools/serverless-plugin/src/generators/service/notification-files/docs/architecture-diagram.mmd new file mode 100644 index 00000000..39b3fe44 --- /dev/null +++ b/tools/serverless-plugin/src/generators/service/notification-files/docs/architecture-diagram.mmd @@ -0,0 +1,4 @@ +flowchart LR + A[Other services] --> B(AWS Lambda) + B(AWS Lambda) --> C(Amazon SNS) + C --> D[Subscribers] diff --git a/tools/serverless-plugin/src/generators/service/notification-files/docs/architecture-diagram.svg b/tools/serverless-plugin/src/generators/service/notification-files/docs/architecture-diagram.svg new file mode 100644 index 00000000..bed2cd58 --- /dev/null +++ b/tools/serverless-plugin/src/generators/service/notification-files/docs/architecture-diagram.svg @@ -0,0 +1 @@ +
Other services
AWS Lambda
Amazon SNS
Subscribers
\ No newline at end of file diff --git a/tools/serverless-plugin/src/generators/service/notification-files/package.json.template b/tools/serverless-plugin/src/generators/service/notification-files/package.json.template new file mode 100644 index 00000000..7a3cd52c --- /dev/null +++ b/tools/serverless-plugin/src/generators/service/notification-files/package.json.template @@ -0,0 +1,5 @@ +{ + "name": "<%= name %>", + "version": "0.0.1", + "type": "commonjs" +} diff --git a/tools/serverless-plugin/src/generators/service/notification-files/serverless.yml.template b/tools/serverless-plugin/src/generators/service/notification-files/serverless.yml.template new file mode 100644 index 00000000..2693c70d --- /dev/null +++ b/tools/serverless-plugin/src/generators/service/notification-files/serverless.yml.template @@ -0,0 +1,57 @@ +service: <%= brand %>-<%= name %> + +configValidationMode: error + +package: + patterns: + - src/ + +custom: + esbuild: + bundle: true + minify: true + sourcemap: true + exclude: + - '@aws-sdk' + +plugins: + - '@aligent/serverless-conventions' + - serverless-esbuild + +provider: + name: aws + runtime: nodejs20.x + stage: ${opt:stage, 'dev'} + region: ${opt:region, 'ap-southeast-2'} + memorySize: 192 #mb (default for all) + timeout: 29 #seconds (default for all) + iam: + role: + statements: + - Effect: Allow + Action: + - sns:Publish + Resource: + - !Ref SNSTopicNotifications + environment: + NODE_OPTIONS: --enable-source-maps + SNS_TOPIC_ARN: !Ref SNSTopicNotifications + +functions: + notifyError: + handler: src/lambda/notify-error.handler + +resources: + Description: Notification service for error notifying + Resources: + SNSTopicNotifications: + Type: AWS::SNS::Topic + Properties: + TopicName: ${self:service}-${self:provider.stage}-notifications-topic + + Outputs: + ErrorNotificationLambdaFunction: + Description: Arn of ${self:service}-${self:provider.stage}-notifyError + Value: !GetAtt NotifyErrorLambdaFunction.Arn + Export: + Name: ErrorNotificationLambdaFunction-${self:provider.stage} diff --git a/tools/serverless-plugin/src/generators/service/notification-files/src/lambda/notify-error.ts.template b/tools/serverless-plugin/src/generators/service/notification-files/src/lambda/notify-error.ts.template new file mode 100644 index 00000000..0506411a --- /dev/null +++ b/tools/serverless-plugin/src/generators/service/notification-files/src/lambda/notify-error.ts.template @@ -0,0 +1,49 @@ +/* v8 ignore start */ +import type { Handler } from 'aws-lambda/handler'; +import type { NotifyError } from '../../types/notify-error'; +import { + extractNameFromExecutionArn, + extractNameFromResourceName, + generateChatbotNextSteps, +} from '../utils/aws-formatting'; +import { AmazonSNS } from '../utils/aws-sns'; + +const snsClient = new AmazonSNS(process.env['SNS_TOPIC_ARN'] as string); + +export const handler: Handler = async (event: NotifyError.InvocationEvent) => { + console.log('Lambda event: ', JSON.stringify(event)); + try { + const { source, region, detail } = event; + const { executionArn, logGroupName, cause } = detail; + + const resourceName = extractNameFromExecutionArn(executionArn); + const name = extractNameFromResourceName(resourceName); + + const { errorType, errorMessage } = JSON.parse( + cause + ) as NotifyError.Cause; + + const nextSteps = generateChatbotNextSteps({ + source, + region, + logGroupName, + executionArn, + }); + + const message: NotifyError.Message = { + version: '1.0', + source: 'custom', + content: { + textType: 'client-markdown', + title: `${event.detail.status}: ${name}`, + description: `${name} service encountered an error: [${errorType}] ${errorMessage}`, + nextSteps, + }, + }; + + await snsClient.publish(event['detail-type'], JSON.stringify(message)); + } catch (error) { + console.error(JSON.stringify(error)); + throw error; + } +}; diff --git a/tools/serverless-plugin/src/generators/service/notification-files/src/utils/aws-formatting.ts.template b/tools/serverless-plugin/src/generators/service/notification-files/src/utils/aws-formatting.ts.template new file mode 100644 index 00000000..36ceff02 --- /dev/null +++ b/tools/serverless-plugin/src/generators/service/notification-files/src/utils/aws-formatting.ts.template @@ -0,0 +1,83 @@ +import { NotifyError } from '../../types/notify-error'; + +/** + * Extracts the name from an AWS Step Functions execution ARN + * It assumes that the arn is always in the correct format + * + * @param {string} arn - The AWS Step Functions execution ARN. + * @returns {string} The extracted name from the execution ARN. + * @throws {Error} If the provided ARN is invalid or does not contain a name. + */ +export function extractNameFromExecutionArn(arn: string) { + const parts = arn.split(':'); + const name = parts[6]; + + if (!name) { + throw new Error('Invalid execution ARN'); + } + + return name; +} + +/** + * Extracts the name from a resource name string. + * It assumes our resource name is in the correct format + * Eg: tt-int-shippit-order-dev-createShippitOrder + * + * @param {string} resourceName - The resource name string. + * @returns {string} The extracted name from the resource name. + */ +export function extractNameFromResourceName(resourceName: string) { + return resourceName.split('-').pop() as string; +} + +function generateCloudWatchUrl(region: string, logGroupName?: string) { + const logGroupsUrl = `https://${region}.console.aws.amazon.com/cloudwatch/home?region=${region}#logsV2:log-groups`; + + if (!logGroupName) { + return logGroupsUrl; + } + + const encodedLogGroupName = encodeURIComponent( + encodeURIComponent(logGroupName) + ).replace(/%/g, '$'); + + return `${logGroupsUrl}/log-group/${encodedLogGroupName}`; +} + +function generateStepFunctionUrl(region: string, executionArn: string) { + return `https://${region}.console.aws.amazon.com/states/home?region=${region}#/v2/executions/details/${executionArn}`; +} + +/** + * Generates a list of AWS Chatbot custom message nextSteps. + * For more information, please check https://docs.aws.amazon.com/chatbot/latest/adminguide/custom-notifs.html#event-schema + * + * @param {NotifyError.NextStepsInput} input - The input object containing the source, region, executionArn, and logGroupName. + * @returns {string[]} An array of strings representing the next steps. + * @throws {Error} If the required parameters are missing for the specified source. + */ +export function generateChatbotNextSteps(input: NotifyError.NextStepsInput) { + const { source, region, executionArn, logGroupName } = input; + const steps: string[] = []; + + if (source === 'aws.lambda') { + steps.push( + `Check the <${generateCloudWatchUrl( + region, + logGroupName + )}|*CloudWatch Logs*> for more details.` + ); + } + + if (source === 'aws.states') { + steps.push( + `Check the <${generateStepFunctionUrl( + region, + executionArn + )}|*Step Functions execution*> for more details.` + ); + } + + return steps; +} diff --git a/tools/serverless-plugin/src/generators/service/notification-files/src/utils/aws-sns.ts.template b/tools/serverless-plugin/src/generators/service/notification-files/src/utils/aws-sns.ts.template new file mode 100644 index 00000000..ae8e964d --- /dev/null +++ b/tools/serverless-plugin/src/generators/service/notification-files/src/utils/aws-sns.ts.template @@ -0,0 +1,57 @@ +import { + PublishCommand, + PublishCommandInput, + PublishCommandOutput, + SNSClient, +} from '@aws-sdk/client-sns'; + +export class AmazonSNS { + private readonly client: SNSClient; + private readonly topicArn: string; + + private readonly maxBytes = 262144; // 256KB + // Making the assumption that it would be rare to have Egyptian Hieroglyphs + // in the message this approximation should be good enough + private readonly maxChars = this.maxBytes / 2 - 1; + private readonly maxSubjectChars = 100; + + constructor(topicArn: string) { + const region = topicArn.split(':')[3] as string; + + this.client = new SNSClient({ region }); + this.topicArn = topicArn; + } + + /** + * This function send a message to an SNS topic + * Due to the SNS subject and message size restrictions + * the subject and message will be truncated if they exceeds the maximum allowed size. + * + * @async + * @param {string} subject - The subject of the message + * @param {string} message - The message to send + * @returns {Promise} + */ + async publish( + subject: string, + message: string + ): Promise { + const input: PublishCommandInput = { + TopicArn: this.topicArn, + Subject: subject, + Message: message, + }; + + if (subject.length > this.maxSubjectChars) { + console.warn('Need to truncate SNS subject, too long'); + input.Subject = subject.substring(0, this.maxSubjectChars); + } + + if (Buffer.byteLength(message, 'utf8') > this.maxBytes) { + console.warn('Need to truncate SNS message, too long'); + input.Message = message.substring(0, this.maxChars); + } + + return await this.client.send(new PublishCommand(input)); + } +} diff --git a/tools/serverless-plugin/src/generators/service/notification-files/tests/aws-formatting.test.ts.template b/tools/serverless-plugin/src/generators/service/notification-files/tests/aws-formatting.test.ts.template new file mode 100644 index 00000000..f5a30ff9 --- /dev/null +++ b/tools/serverless-plugin/src/generators/service/notification-files/tests/aws-formatting.test.ts.template @@ -0,0 +1,130 @@ +import { + extractNameFromExecutionArn, + extractNameFromResourceName, + generateChatbotNextSteps, +} from '../src/utils/aws-formatting'; +import { NotifyError } from '../types/notify-error'; + +describe('extractNameFromExecutionArn', () => { + it('should extract the name from a valid execution ARN', () => { + const arn = + 'arn:aws:states:ap-southeast-2:123456789012:execution:my-state-machine:my-execution-name'; + const expectedName = 'my-state-machine'; + + const result = extractNameFromExecutionArn(arn); + + expect(result).toEqual(expectedName); + }); + + it('should throw an error for an invalid execution ARN', () => { + const arn = 'invalid-arn'; + const result = () => extractNameFromExecutionArn(arn); + + expect(result).toThrowError('Invalid execution ARN'); + }); + + it('should throw an error if the ARN does not have enough parts', () => { + const arn = 'arn:aws:states:ap-southeast-2:123456789012'; + const result = () => extractNameFromExecutionArn(arn); + + expect(result).toThrowError('Invalid execution ARN'); + }); + + it('should handle ARNs with different formats', () => { + const arn = + 'arn:aws:lambda:ap-southeast-2:123456789012:function:my-lambda-name'; + const expectedName = 'my-lambda-name'; + + const result = extractNameFromExecutionArn(arn); + + expect(result).toEqual(expectedName); + }); +}); + +describe('extractNameFromResourceName', () => { + it('should extract the name from a valid resource name', () => { + const resourceName = 'my-resource-name'; + const expectedName = 'name'; + + const result = extractNameFromResourceName(resourceName); + + expect(result).toBe(expectedName); + }); + + it('should return an empty string for an empty input', () => { + const resourceName = ''; + const expectedName = ''; + + const result = extractNameFromResourceName(resourceName); + + expect(result).toBe(expectedName); + }); + + it('should return the entire string if there are no hyphens', () => { + const resourceName = 'resourceName'; + const expectedName = 'resourceName'; + + const result = extractNameFromResourceName(resourceName); + + expect(result).toBe(expectedName); + }); + + it('should handle resource names with leading and trailing hyphens', () => { + const resourceName = '-leading-and-trailing-'; + const expectedName = ''; + + const result = extractNameFromResourceName(resourceName); + + expect(result).toBe(expectedName); + }); +}); + +describe('generateChatbotNextSteps', () => { + it('should generate a CloudWatch Log Groups URL if source is aws.lambda but logGroupName is missing', () => { + const input: NotifyError.NextStepsInput = { + source: 'aws.lambda', + region: 'ap-southeast-2', + executionArn: 'my-execution-arn', + logGroupName: undefined, + }; + + const expected = [ + 'Check the for more details.', + ]; + + const result = generateChatbotNextSteps(input); + expect(result).toEqual(expected); + }); + + it('should generate a CloudWatch Logs URL if source is aws.lambda', () => { + const input: NotifyError.NextStepsInput = { + source: 'aws.lambda', + region: 'ap-southeast-2', + executionArn: 'my-execution-arn', + logGroupName: 'aws/lambda/my-log-group', + }; + + const expected = [ + 'Check the for more details.', + ]; + + const result = generateChatbotNextSteps(input); + expect(result).toEqual(expected); + }); + + it('should generate a Step Functions URL if source is aws.states', () => { + const input: NotifyError.NextStepsInput = { + source: 'aws.states', + region: 'ap-southeast-2', + executionArn: 'my-execution-arn', + logGroupName: undefined, + }; + + const expected = [ + 'Check the for more details.', + ]; + + const result = generateChatbotNextSteps(input); + expect(result).toEqual(expected); + }); +}); diff --git a/tools/serverless-plugin/src/generators/service/notification-files/tsconfig.json.template b/tools/serverless-plugin/src/generators/service/notification-files/tsconfig.json.template new file mode 100644 index 00000000..f1fc9c5b --- /dev/null +++ b/tools/serverless-plugin/src/generators/service/notification-files/tsconfig.json.template @@ -0,0 +1,12 @@ +{ + "extends": "../../tsconfig.base.json", + "compilerOptions": { + "esModuleInterop": true + }, + "include": [ + "vite.config.ts", + "../../libs/**/src/index.ts", + "src/**/*.ts", + "**/*.test.ts" + ] +} diff --git a/tools/serverless-plugin/src/generators/service/notification-files/types/notify-error.ts.template b/tools/serverless-plugin/src/generators/service/notification-files/types/notify-error.ts.template new file mode 100644 index 00000000..3b0b872c --- /dev/null +++ b/tools/serverless-plugin/src/generators/service/notification-files/types/notify-error.ts.template @@ -0,0 +1,62 @@ +/* eslint-disable @typescript-eslint/no-namespace */ +export namespace NotifyError { + export type InvocationEvent = { + id: string; + 'detail-type': string; + source: Source; + time: string; + region: string; + resources: string[]; + detail: { + executionArn: string; + logGroupName?: string; + name: string; + status: string; + error: string; + cause: string; + }; + }; + + export type Source = 'aws.lambda' | 'aws.states'; + + export type NextStepsInput = { + source: Source; + region: string; + executionArn: string; + logGroupName: string | undefined; + }; + + export type Cause = { + errorType: string; + errorMessage: string; + trace?: unknown; + }; + + export type Message = AWSChatbot.CustomNotification; + + export namespace AWSChatbot { + export interface CustomNotification { + version: '1.0'; + source: 'custom'; + id?: string; + content: Content; + metadata?: Metadata; + } + + interface Content { + textType?: 'client-markdown'; + title?: string; + description: string; + nextSteps?: string[]; + keywords?: string[]; + } + + interface Metadata { + threadId?: string; + summary?: string; + eventType?: string; + relatedResources?: string[]; + additionalContext?: Record; + } + } +} diff --git a/tools/serverless-plugin/src/generators/service/notification-files/vite.config.ts.template b/tools/serverless-plugin/src/generators/service/notification-files/vite.config.ts.template new file mode 100644 index 00000000..906e024a --- /dev/null +++ b/tools/serverless-plugin/src/generators/service/notification-files/vite.config.ts.template @@ -0,0 +1,16 @@ +import { defineConfig, mergeConfig } from 'vitest/config'; +import { viteBaseConfig } from '../../vite.config.base'; + +export default mergeConfig( + viteBaseConfig, + defineConfig({ + cacheDir: '../../node_modules/.vite/notification', + test: { + env: { + NODE_ENV: 'test', + YOUR_ENV_VAR: 'environment-variable', + }, + unstubEnvs: true, + }, + }) +); From 31ca81ab46a5b31150288a1007514e0dc15a2914 Mon Sep 17 00:00:00 2001 From: Kai Nguyen Date: Mon, 1 Jul 2024 15:28:39 +1000 Subject: [PATCH 3/6] MICRO-53: Added client-sns and npm audit fix --- package-lock.json | 2033 ++++++++++++++++++++++++++++++++++++++++++--- package.json | 3 + 2 files changed, 1906 insertions(+), 130 deletions(-) diff --git a/package-lock.json b/package-lock.json index bbdf8631..069ac5d2 100644 --- a/package-lock.json +++ b/package-lock.json @@ -8,8 +8,11 @@ "name": "@aligent/serverless-aws-nodejs-service-template", "version": "2.0.0", "license": "MIT", + "dependencies": { + "@aws-sdk/client-sns": "^3.606.0" + }, "devDependencies": { - "@aligent/serverless-conventions": "*", + "@aligent/serverless-conventions": "latest", "@nx/devkit": "^17.1.3", "@nx/esbuild": "17.1.3", "@nx/eslint-plugin": "17.1.3", @@ -255,130 +258,1537 @@ "uuid": "dist/bin/uuid" } }, - "node_modules/@aws-sdk/client-sso": { - "version": "3.468.0", - "resolved": "https://registry.npmjs.org/@aws-sdk/client-sso/-/client-sso-3.468.0.tgz", - "integrity": "sha512-NabkDaiFsMP8lBR3+JzdtOVarH8kCJst30fQyBIs2PI0uMfajFJ+SK9JTg1J1YZY6aNJBxo2Bxu3dl0fjZ5N/g==", - "dev": true, + "node_modules/@aws-sdk/client-sns": { + "version": "3.606.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/client-sns/-/client-sns-3.606.0.tgz", + "integrity": "sha512-WNxi24jDbj8/tXTFVAFxwFdSJFuYA0W0PFNXG2oC+BWVPWK4yRILD05h9j3fR1luufWSqXIe0oVv3531Jgw0AQ==", + "dependencies": { + "@aws-crypto/sha256-browser": "5.2.0", + "@aws-crypto/sha256-js": "5.2.0", + "@aws-sdk/client-sso-oidc": "3.606.0", + "@aws-sdk/client-sts": "3.606.0", + "@aws-sdk/core": "3.598.0", + "@aws-sdk/credential-provider-node": "3.600.0", + "@aws-sdk/middleware-host-header": "3.598.0", + "@aws-sdk/middleware-logger": "3.598.0", + "@aws-sdk/middleware-recursion-detection": "3.598.0", + "@aws-sdk/middleware-user-agent": "3.598.0", + "@aws-sdk/region-config-resolver": "3.598.0", + "@aws-sdk/types": "3.598.0", + "@aws-sdk/util-endpoints": "3.598.0", + "@aws-sdk/util-user-agent-browser": "3.598.0", + "@aws-sdk/util-user-agent-node": "3.598.0", + "@smithy/config-resolver": "^3.0.2", + "@smithy/core": "^2.2.1", + "@smithy/fetch-http-handler": "^3.0.2", + "@smithy/hash-node": "^3.0.1", + "@smithy/invalid-dependency": "^3.0.1", + "@smithy/middleware-content-length": "^3.0.1", + "@smithy/middleware-endpoint": "^3.0.2", + "@smithy/middleware-retry": "^3.0.4", + "@smithy/middleware-serde": "^3.0.1", + "@smithy/middleware-stack": "^3.0.1", + "@smithy/node-config-provider": "^3.1.1", + "@smithy/node-http-handler": "^3.0.1", + "@smithy/protocol-http": "^4.0.1", + "@smithy/smithy-client": "^3.1.2", + "@smithy/types": "^3.1.0", + "@smithy/url-parser": "^3.0.1", + "@smithy/util-base64": "^3.0.0", + "@smithy/util-body-length-browser": "^3.0.0", + "@smithy/util-body-length-node": "^3.0.0", + "@smithy/util-defaults-mode-browser": "^3.0.4", + "@smithy/util-defaults-mode-node": "^3.0.4", + "@smithy/util-endpoints": "^2.0.2", + "@smithy/util-middleware": "^3.0.1", + "@smithy/util-retry": "^3.0.1", + "@smithy/util-utf8": "^3.0.0", + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=16.0.0" + } + }, + "node_modules/@aws-sdk/client-sns/node_modules/@aws-crypto/sha256-browser": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/@aws-crypto/sha256-browser/-/sha256-browser-5.2.0.tgz", + "integrity": "sha512-AXfN/lGotSQwu6HNcEsIASo7kWXZ5HYWvfOmSNKDsEqC4OashTp8alTmaz+F7TC2L083SFv5RdB+qU3Vs1kZqw==", "dependencies": { - "@aws-crypto/sha256-browser": "3.0.0", - "@aws-crypto/sha256-js": "3.0.0", - "@aws-sdk/core": "3.468.0", - "@aws-sdk/middleware-host-header": "3.468.0", - "@aws-sdk/middleware-logger": "3.468.0", - "@aws-sdk/middleware-recursion-detection": "3.468.0", - "@aws-sdk/middleware-user-agent": "3.468.0", - "@aws-sdk/region-config-resolver": "3.468.0", - "@aws-sdk/types": "3.468.0", - "@aws-sdk/util-endpoints": "3.468.0", - "@aws-sdk/util-user-agent-browser": "3.468.0", - "@aws-sdk/util-user-agent-node": "3.468.0", - "@smithy/config-resolver": "^2.0.20", - "@smithy/fetch-http-handler": "^2.3.1", - "@smithy/hash-node": "^2.0.17", - "@smithy/invalid-dependency": "^2.0.15", - "@smithy/middleware-content-length": "^2.0.17", - "@smithy/middleware-endpoint": "^2.2.2", - "@smithy/middleware-retry": "^2.0.23", - "@smithy/middleware-serde": "^2.0.15", - "@smithy/middleware-stack": "^2.0.9", - "@smithy/node-config-provider": "^2.1.7", - "@smithy/node-http-handler": "^2.2.1", - "@smithy/protocol-http": "^3.0.11", - "@smithy/smithy-client": "^2.1.18", - "@smithy/types": "^2.7.0", - "@smithy/url-parser": "^2.0.15", - "@smithy/util-base64": "^2.0.1", - "@smithy/util-body-length-browser": "^2.0.1", - "@smithy/util-body-length-node": "^2.1.0", - "@smithy/util-defaults-mode-browser": "^2.0.22", - "@smithy/util-defaults-mode-node": "^2.0.28", - "@smithy/util-endpoints": "^1.0.6", - "@smithy/util-retry": "^2.0.8", - "@smithy/util-utf8": "^2.0.2", - "tslib": "^2.5.0" + "@aws-crypto/sha256-js": "^5.2.0", + "@aws-crypto/supports-web-crypto": "^5.2.0", + "@aws-crypto/util": "^5.2.0", + "@aws-sdk/types": "^3.222.0", + "@aws-sdk/util-locate-window": "^3.0.0", + "@smithy/util-utf8": "^2.0.0", + "tslib": "^2.6.2" + } + }, + "node_modules/@aws-sdk/client-sns/node_modules/@aws-crypto/sha256-browser/node_modules/@smithy/is-array-buffer": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/@smithy/is-array-buffer/-/is-array-buffer-2.2.0.tgz", + "integrity": "sha512-GGP3O9QFD24uGeAXYUjwSTXARoqpZykHadOmA8G5vfJPK0/DC67qa//0qvqrJzL1xc8WQWX7/yc7fwudjPHPhA==", + "dependencies": { + "tslib": "^2.6.2" }, "engines": { "node": ">=14.0.0" } }, - "node_modules/@aws-sdk/client-sts": { - "version": "3.468.0", - "resolved": "https://registry.npmjs.org/@aws-sdk/client-sts/-/client-sts-3.468.0.tgz", - "integrity": "sha512-EausH7ezv1AIgl/4rfZRNRxrFND5hChbIqkuAf8e5wZ74HUEVBMmD5Jiwfs0WRCso3ejOjsNtS8PAOA3djn28w==", - "dev": true, + "node_modules/@aws-sdk/client-sns/node_modules/@aws-crypto/sha256-browser/node_modules/@smithy/util-buffer-from": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/@smithy/util-buffer-from/-/util-buffer-from-2.2.0.tgz", + "integrity": "sha512-IJdWBbTcMQ6DA0gdNhh/BwrLkDR+ADW5Kr1aZmd4k3DIF6ezMV4R2NIAmT08wQJ3yUK82thHWmC/TnK/wpMMIA==", "dependencies": { - "@aws-crypto/sha256-browser": "3.0.0", - "@aws-crypto/sha256-js": "3.0.0", - "@aws-sdk/core": "3.468.0", - "@aws-sdk/credential-provider-node": "3.468.0", - "@aws-sdk/middleware-host-header": "3.468.0", - "@aws-sdk/middleware-logger": "3.468.0", - "@aws-sdk/middleware-recursion-detection": "3.468.0", - "@aws-sdk/middleware-sdk-sts": "3.468.0", - "@aws-sdk/middleware-signing": "3.468.0", - "@aws-sdk/middleware-user-agent": "3.468.0", - "@aws-sdk/region-config-resolver": "3.468.0", - "@aws-sdk/types": "3.468.0", - "@aws-sdk/util-endpoints": "3.468.0", - "@aws-sdk/util-user-agent-browser": "3.468.0", - "@aws-sdk/util-user-agent-node": "3.468.0", - "@smithy/config-resolver": "^2.0.20", - "@smithy/fetch-http-handler": "^2.3.1", - "@smithy/hash-node": "^2.0.17", - "@smithy/invalid-dependency": "^2.0.15", - "@smithy/middleware-content-length": "^2.0.17", - "@smithy/middleware-endpoint": "^2.2.2", - "@smithy/middleware-retry": "^2.0.23", - "@smithy/middleware-serde": "^2.0.15", - "@smithy/middleware-stack": "^2.0.9", - "@smithy/node-config-provider": "^2.1.7", - "@smithy/node-http-handler": "^2.2.1", - "@smithy/protocol-http": "^3.0.11", - "@smithy/smithy-client": "^2.1.18", - "@smithy/types": "^2.7.0", - "@smithy/url-parser": "^2.0.15", - "@smithy/util-base64": "^2.0.1", - "@smithy/util-body-length-browser": "^2.0.1", - "@smithy/util-body-length-node": "^2.1.0", - "@smithy/util-defaults-mode-browser": "^2.0.22", - "@smithy/util-defaults-mode-node": "^2.0.28", - "@smithy/util-endpoints": "^1.0.6", - "@smithy/util-retry": "^2.0.8", - "@smithy/util-utf8": "^2.0.2", + "@smithy/is-array-buffer": "^2.2.0", + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=14.0.0" + } + }, + "node_modules/@aws-sdk/client-sns/node_modules/@aws-crypto/sha256-browser/node_modules/@smithy/util-utf8": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/@smithy/util-utf8/-/util-utf8-2.3.0.tgz", + "integrity": "sha512-R8Rdn8Hy72KKcebgLiv8jQcQkXoLMOGGv5uI1/k0l+snqkOzQ1R0ChUBCxWMlBsFMekWjq0wRudIweFs7sKT5A==", + "dependencies": { + "@smithy/util-buffer-from": "^2.2.0", + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=14.0.0" + } + }, + "node_modules/@aws-sdk/client-sns/node_modules/@aws-crypto/sha256-js": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/@aws-crypto/sha256-js/-/sha256-js-5.2.0.tgz", + "integrity": "sha512-FFQQyu7edu4ufvIZ+OadFpHHOt+eSTBaYaki44c+akjg7qZg9oOQeLlk77F6tSYqjDAFClrHJk9tMf0HdVyOvA==", + "dependencies": { + "@aws-crypto/util": "^5.2.0", + "@aws-sdk/types": "^3.222.0", + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=16.0.0" + } + }, + "node_modules/@aws-sdk/client-sns/node_modules/@aws-crypto/supports-web-crypto": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/@aws-crypto/supports-web-crypto/-/supports-web-crypto-5.2.0.tgz", + "integrity": "sha512-iAvUotm021kM33eCdNfwIN//F77/IADDSs58i+MDaOqFrVjZo9bAal0NK7HurRuWLLpF1iLX7gbWrjHjeo+YFg==", + "dependencies": { + "tslib": "^2.6.2" + } + }, + "node_modules/@aws-sdk/client-sns/node_modules/@aws-crypto/util": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/@aws-crypto/util/-/util-5.2.0.tgz", + "integrity": "sha512-4RkU9EsI6ZpBve5fseQlGNUWKMa1RLPQ1dnjnQoe07ldfIzcsGb5hC5W0Dm7u423KWzawlrpbjXBrXCEv9zazQ==", + "dependencies": { + "@aws-sdk/types": "^3.222.0", + "@smithy/util-utf8": "^2.0.0", + "tslib": "^2.6.2" + } + }, + "node_modules/@aws-sdk/client-sns/node_modules/@aws-crypto/util/node_modules/@smithy/is-array-buffer": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/@smithy/is-array-buffer/-/is-array-buffer-2.2.0.tgz", + "integrity": "sha512-GGP3O9QFD24uGeAXYUjwSTXARoqpZykHadOmA8G5vfJPK0/DC67qa//0qvqrJzL1xc8WQWX7/yc7fwudjPHPhA==", + "dependencies": { + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=14.0.0" + } + }, + "node_modules/@aws-sdk/client-sns/node_modules/@aws-crypto/util/node_modules/@smithy/util-buffer-from": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/@smithy/util-buffer-from/-/util-buffer-from-2.2.0.tgz", + "integrity": "sha512-IJdWBbTcMQ6DA0gdNhh/BwrLkDR+ADW5Kr1aZmd4k3DIF6ezMV4R2NIAmT08wQJ3yUK82thHWmC/TnK/wpMMIA==", + "dependencies": { + "@smithy/is-array-buffer": "^2.2.0", + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=14.0.0" + } + }, + "node_modules/@aws-sdk/client-sns/node_modules/@aws-crypto/util/node_modules/@smithy/util-utf8": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/@smithy/util-utf8/-/util-utf8-2.3.0.tgz", + "integrity": "sha512-R8Rdn8Hy72KKcebgLiv8jQcQkXoLMOGGv5uI1/k0l+snqkOzQ1R0ChUBCxWMlBsFMekWjq0wRudIweFs7sKT5A==", + "dependencies": { + "@smithy/util-buffer-from": "^2.2.0", + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=14.0.0" + } + }, + "node_modules/@aws-sdk/client-sns/node_modules/@aws-sdk/client-sso": { + "version": "3.598.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/client-sso/-/client-sso-3.598.0.tgz", + "integrity": "sha512-nOI5lqPYa+YZlrrzwAJywJSw3MKVjvu6Ge2fCqQUNYMfxFB0NAaDFnl0EPjXi+sEbtCuz/uWE77poHbqiZ+7Iw==", + "dependencies": { + "@aws-crypto/sha256-browser": "5.2.0", + "@aws-crypto/sha256-js": "5.2.0", + "@aws-sdk/core": "3.598.0", + "@aws-sdk/middleware-host-header": "3.598.0", + "@aws-sdk/middleware-logger": "3.598.0", + "@aws-sdk/middleware-recursion-detection": "3.598.0", + "@aws-sdk/middleware-user-agent": "3.598.0", + "@aws-sdk/region-config-resolver": "3.598.0", + "@aws-sdk/types": "3.598.0", + "@aws-sdk/util-endpoints": "3.598.0", + "@aws-sdk/util-user-agent-browser": "3.598.0", + "@aws-sdk/util-user-agent-node": "3.598.0", + "@smithy/config-resolver": "^3.0.2", + "@smithy/core": "^2.2.1", + "@smithy/fetch-http-handler": "^3.0.2", + "@smithy/hash-node": "^3.0.1", + "@smithy/invalid-dependency": "^3.0.1", + "@smithy/middleware-content-length": "^3.0.1", + "@smithy/middleware-endpoint": "^3.0.2", + "@smithy/middleware-retry": "^3.0.4", + "@smithy/middleware-serde": "^3.0.1", + "@smithy/middleware-stack": "^3.0.1", + "@smithy/node-config-provider": "^3.1.1", + "@smithy/node-http-handler": "^3.0.1", + "@smithy/protocol-http": "^4.0.1", + "@smithy/smithy-client": "^3.1.2", + "@smithy/types": "^3.1.0", + "@smithy/url-parser": "^3.0.1", + "@smithy/util-base64": "^3.0.0", + "@smithy/util-body-length-browser": "^3.0.0", + "@smithy/util-body-length-node": "^3.0.0", + "@smithy/util-defaults-mode-browser": "^3.0.4", + "@smithy/util-defaults-mode-node": "^3.0.4", + "@smithy/util-endpoints": "^2.0.2", + "@smithy/util-middleware": "^3.0.1", + "@smithy/util-retry": "^3.0.1", + "@smithy/util-utf8": "^3.0.0", + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=16.0.0" + } + }, + "node_modules/@aws-sdk/client-sns/node_modules/@aws-sdk/client-sso-oidc": { + "version": "3.606.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/client-sso-oidc/-/client-sso-oidc-3.606.0.tgz", + "integrity": "sha512-gL1FHPS6hwgMNS/A+Qh5bUyHOeRVOqdb7c6+i+9gR3wtGvt2lvoSm8w5DhS08Xiiacz2AqYRDEapp0xuyCrbBQ==", + "dependencies": { + "@aws-crypto/sha256-browser": "5.2.0", + "@aws-crypto/sha256-js": "5.2.0", + "@aws-sdk/core": "3.598.0", + "@aws-sdk/credential-provider-node": "3.600.0", + "@aws-sdk/middleware-host-header": "3.598.0", + "@aws-sdk/middleware-logger": "3.598.0", + "@aws-sdk/middleware-recursion-detection": "3.598.0", + "@aws-sdk/middleware-user-agent": "3.598.0", + "@aws-sdk/region-config-resolver": "3.598.0", + "@aws-sdk/types": "3.598.0", + "@aws-sdk/util-endpoints": "3.598.0", + "@aws-sdk/util-user-agent-browser": "3.598.0", + "@aws-sdk/util-user-agent-node": "3.598.0", + "@smithy/config-resolver": "^3.0.2", + "@smithy/core": "^2.2.1", + "@smithy/fetch-http-handler": "^3.0.2", + "@smithy/hash-node": "^3.0.1", + "@smithy/invalid-dependency": "^3.0.1", + "@smithy/middleware-content-length": "^3.0.1", + "@smithy/middleware-endpoint": "^3.0.2", + "@smithy/middleware-retry": "^3.0.4", + "@smithy/middleware-serde": "^3.0.1", + "@smithy/middleware-stack": "^3.0.1", + "@smithy/node-config-provider": "^3.1.1", + "@smithy/node-http-handler": "^3.0.1", + "@smithy/protocol-http": "^4.0.1", + "@smithy/smithy-client": "^3.1.2", + "@smithy/types": "^3.1.0", + "@smithy/url-parser": "^3.0.1", + "@smithy/util-base64": "^3.0.0", + "@smithy/util-body-length-browser": "^3.0.0", + "@smithy/util-body-length-node": "^3.0.0", + "@smithy/util-defaults-mode-browser": "^3.0.4", + "@smithy/util-defaults-mode-node": "^3.0.4", + "@smithy/util-endpoints": "^2.0.2", + "@smithy/util-middleware": "^3.0.1", + "@smithy/util-retry": "^3.0.1", + "@smithy/util-utf8": "^3.0.0", + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=16.0.0" + }, + "peerDependencies": { + "@aws-sdk/client-sts": "^3.606.0" + } + }, + "node_modules/@aws-sdk/client-sns/node_modules/@aws-sdk/client-sts": { + "version": "3.606.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/client-sts/-/client-sts-3.606.0.tgz", + "integrity": "sha512-b11mAhjrkm3MMiAPoMGcmd6vsaz2120lg8rHG/NZCo9vB1K6Kc7WP+a1Q05TRMseer2egTtpWJfn44aVO97VqA==", + "dependencies": { + "@aws-crypto/sha256-browser": "5.2.0", + "@aws-crypto/sha256-js": "5.2.0", + "@aws-sdk/client-sso-oidc": "3.606.0", + "@aws-sdk/core": "3.598.0", + "@aws-sdk/credential-provider-node": "3.600.0", + "@aws-sdk/middleware-host-header": "3.598.0", + "@aws-sdk/middleware-logger": "3.598.0", + "@aws-sdk/middleware-recursion-detection": "3.598.0", + "@aws-sdk/middleware-user-agent": "3.598.0", + "@aws-sdk/region-config-resolver": "3.598.0", + "@aws-sdk/types": "3.598.0", + "@aws-sdk/util-endpoints": "3.598.0", + "@aws-sdk/util-user-agent-browser": "3.598.0", + "@aws-sdk/util-user-agent-node": "3.598.0", + "@smithy/config-resolver": "^3.0.2", + "@smithy/core": "^2.2.1", + "@smithy/fetch-http-handler": "^3.0.2", + "@smithy/hash-node": "^3.0.1", + "@smithy/invalid-dependency": "^3.0.1", + "@smithy/middleware-content-length": "^3.0.1", + "@smithy/middleware-endpoint": "^3.0.2", + "@smithy/middleware-retry": "^3.0.4", + "@smithy/middleware-serde": "^3.0.1", + "@smithy/middleware-stack": "^3.0.1", + "@smithy/node-config-provider": "^3.1.1", + "@smithy/node-http-handler": "^3.0.1", + "@smithy/protocol-http": "^4.0.1", + "@smithy/smithy-client": "^3.1.2", + "@smithy/types": "^3.1.0", + "@smithy/url-parser": "^3.0.1", + "@smithy/util-base64": "^3.0.0", + "@smithy/util-body-length-browser": "^3.0.0", + "@smithy/util-body-length-node": "^3.0.0", + "@smithy/util-defaults-mode-browser": "^3.0.4", + "@smithy/util-defaults-mode-node": "^3.0.4", + "@smithy/util-endpoints": "^2.0.2", + "@smithy/util-middleware": "^3.0.1", + "@smithy/util-retry": "^3.0.1", + "@smithy/util-utf8": "^3.0.0", + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=16.0.0" + } + }, + "node_modules/@aws-sdk/client-sns/node_modules/@aws-sdk/core": { + "version": "3.598.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/core/-/core-3.598.0.tgz", + "integrity": "sha512-HaSjt7puO5Cc7cOlrXFCW0rtA0BM9lvzjl56x0A20Pt+0wxXGeTOZZOkXQIepbrFkV2e/HYukuT9e99vXDm59g==", + "dependencies": { + "@smithy/core": "^2.2.1", + "@smithy/protocol-http": "^4.0.1", + "@smithy/signature-v4": "^3.1.0", + "@smithy/smithy-client": "^3.1.2", + "@smithy/types": "^3.1.0", "fast-xml-parser": "4.2.5", - "tslib": "^2.5.0" + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=16.0.0" + } + }, + "node_modules/@aws-sdk/client-sns/node_modules/@aws-sdk/credential-provider-env": { + "version": "3.598.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/credential-provider-env/-/credential-provider-env-3.598.0.tgz", + "integrity": "sha512-vi1khgn7yXzLCcgSIzQrrtd2ilUM0dWodxj3PQ6BLfP0O+q1imO3hG1nq7DVyJtq7rFHs6+9N8G4mYvTkxby2w==", + "dependencies": { + "@aws-sdk/types": "3.598.0", + "@smithy/property-provider": "^3.1.1", + "@smithy/types": "^3.1.0", + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=16.0.0" + } + }, + "node_modules/@aws-sdk/client-sns/node_modules/@aws-sdk/credential-provider-ini": { + "version": "3.598.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/credential-provider-ini/-/credential-provider-ini-3.598.0.tgz", + "integrity": "sha512-/ppcIVUbRwDIwJDoYfp90X3+AuJo2mvE52Y1t2VSrvUovYn6N4v95/vXj6LS8CNDhz2jvEJYmu+0cTMHdhI6eA==", + "dependencies": { + "@aws-sdk/credential-provider-env": "3.598.0", + "@aws-sdk/credential-provider-http": "3.598.0", + "@aws-sdk/credential-provider-process": "3.598.0", + "@aws-sdk/credential-provider-sso": "3.598.0", + "@aws-sdk/credential-provider-web-identity": "3.598.0", + "@aws-sdk/types": "3.598.0", + "@smithy/credential-provider-imds": "^3.1.1", + "@smithy/property-provider": "^3.1.1", + "@smithy/shared-ini-file-loader": "^3.1.1", + "@smithy/types": "^3.1.0", + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=16.0.0" + }, + "peerDependencies": { + "@aws-sdk/client-sts": "^3.598.0" + } + }, + "node_modules/@aws-sdk/client-sns/node_modules/@aws-sdk/credential-provider-node": { + "version": "3.600.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/credential-provider-node/-/credential-provider-node-3.600.0.tgz", + "integrity": "sha512-1pC7MPMYD45J7yFjA90SxpR0yaSvy+yZiq23aXhAPZLYgJBAxHLu0s0mDCk/piWGPh8+UGur5K0bVdx4B1D5hw==", + "dependencies": { + "@aws-sdk/credential-provider-env": "3.598.0", + "@aws-sdk/credential-provider-http": "3.598.0", + "@aws-sdk/credential-provider-ini": "3.598.0", + "@aws-sdk/credential-provider-process": "3.598.0", + "@aws-sdk/credential-provider-sso": "3.598.0", + "@aws-sdk/credential-provider-web-identity": "3.598.0", + "@aws-sdk/types": "3.598.0", + "@smithy/credential-provider-imds": "^3.1.1", + "@smithy/property-provider": "^3.1.1", + "@smithy/shared-ini-file-loader": "^3.1.1", + "@smithy/types": "^3.1.0", + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=16.0.0" + } + }, + "node_modules/@aws-sdk/client-sns/node_modules/@aws-sdk/credential-provider-process": { + "version": "3.598.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/credential-provider-process/-/credential-provider-process-3.598.0.tgz", + "integrity": "sha512-rM707XbLW8huMk722AgjVyxu2tMZee++fNA8TJVNgs1Ma02Wx6bBrfIvlyK0rCcIRb0WdQYP6fe3Xhiu4e8IBA==", + "dependencies": { + "@aws-sdk/types": "3.598.0", + "@smithy/property-provider": "^3.1.1", + "@smithy/shared-ini-file-loader": "^3.1.1", + "@smithy/types": "^3.1.0", + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=16.0.0" + } + }, + "node_modules/@aws-sdk/client-sns/node_modules/@aws-sdk/credential-provider-sso": { + "version": "3.598.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/credential-provider-sso/-/credential-provider-sso-3.598.0.tgz", + "integrity": "sha512-5InwUmrAuqQdOOgxTccRayMMkSmekdLk6s+az9tmikq0QFAHUCtofI+/fllMXSR9iL6JbGYi1940+EUmS4pHJA==", + "dependencies": { + "@aws-sdk/client-sso": "3.598.0", + "@aws-sdk/token-providers": "3.598.0", + "@aws-sdk/types": "3.598.0", + "@smithy/property-provider": "^3.1.1", + "@smithy/shared-ini-file-loader": "^3.1.1", + "@smithy/types": "^3.1.0", + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=16.0.0" + } + }, + "node_modules/@aws-sdk/client-sns/node_modules/@aws-sdk/credential-provider-web-identity": { + "version": "3.598.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/credential-provider-web-identity/-/credential-provider-web-identity-3.598.0.tgz", + "integrity": "sha512-GV5GdiMbz5Tz9JO4NJtRoFXjW0GPEujA0j+5J/B723rTN+REHthJu48HdBKouHGhdzkDWkkh1bu52V02Wprw8w==", + "dependencies": { + "@aws-sdk/types": "3.598.0", + "@smithy/property-provider": "^3.1.1", + "@smithy/types": "^3.1.0", + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=16.0.0" + }, + "peerDependencies": { + "@aws-sdk/client-sts": "^3.598.0" + } + }, + "node_modules/@aws-sdk/client-sns/node_modules/@aws-sdk/middleware-host-header": { + "version": "3.598.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/middleware-host-header/-/middleware-host-header-3.598.0.tgz", + "integrity": "sha512-WiaG059YBQwQraNejLIi0gMNkX7dfPZ8hDIhvMr5aVPRbaHH8AYF3iNSsXYCHvA2Cfa1O9haYXsuMF9flXnCmA==", + "dependencies": { + "@aws-sdk/types": "3.598.0", + "@smithy/protocol-http": "^4.0.1", + "@smithy/types": "^3.1.0", + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=16.0.0" + } + }, + "node_modules/@aws-sdk/client-sns/node_modules/@aws-sdk/middleware-logger": { + "version": "3.598.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/middleware-logger/-/middleware-logger-3.598.0.tgz", + "integrity": "sha512-bxBjf/VYiu3zfu8SYM2S9dQQc3tz5uBAOcPz/Bt8DyyK3GgOpjhschH/2XuUErsoUO1gDJqZSdGOmuHGZQn00Q==", + "dependencies": { + "@aws-sdk/types": "3.598.0", + "@smithy/types": "^3.1.0", + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=16.0.0" + } + }, + "node_modules/@aws-sdk/client-sns/node_modules/@aws-sdk/middleware-recursion-detection": { + "version": "3.598.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/middleware-recursion-detection/-/middleware-recursion-detection-3.598.0.tgz", + "integrity": "sha512-vjT9BeFY9FeN0f8hm2l6F53tI0N5bUq6RcDkQXKNabXBnQxKptJRad6oP2X5y3FoVfBLOuDkQgiC2940GIPxtQ==", + "dependencies": { + "@aws-sdk/types": "3.598.0", + "@smithy/protocol-http": "^4.0.1", + "@smithy/types": "^3.1.0", + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=16.0.0" + } + }, + "node_modules/@aws-sdk/client-sns/node_modules/@aws-sdk/middleware-user-agent": { + "version": "3.598.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/middleware-user-agent/-/middleware-user-agent-3.598.0.tgz", + "integrity": "sha512-4tjESlHG5B5MdjUaLK7tQs/miUtHbb6deauQx8ryqSBYOhfHVgb1ZnzvQR0bTrhpqUg0WlybSkDaZAICf9xctg==", + "dependencies": { + "@aws-sdk/types": "3.598.0", + "@aws-sdk/util-endpoints": "3.598.0", + "@smithy/protocol-http": "^4.0.1", + "@smithy/types": "^3.1.0", + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=16.0.0" + } + }, + "node_modules/@aws-sdk/client-sns/node_modules/@aws-sdk/region-config-resolver": { + "version": "3.598.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/region-config-resolver/-/region-config-resolver-3.598.0.tgz", + "integrity": "sha512-oYXhmTokSav4ytmWleCr3rs/1nyvZW/S0tdi6X7u+dLNL5Jee+uMxWGzgOrWK6wrQOzucLVjS4E/wA11Kv2GTw==", + "dependencies": { + "@aws-sdk/types": "3.598.0", + "@smithy/node-config-provider": "^3.1.1", + "@smithy/types": "^3.1.0", + "@smithy/util-config-provider": "^3.0.0", + "@smithy/util-middleware": "^3.0.1", + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=16.0.0" + } + }, + "node_modules/@aws-sdk/client-sns/node_modules/@aws-sdk/token-providers": { + "version": "3.598.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/token-providers/-/token-providers-3.598.0.tgz", + "integrity": "sha512-TKY1EVdHVBnZqpyxyTHdpZpa1tUpb6nxVeRNn1zWG8QB5MvH4ALLd/jR+gtmWDNQbIG4cVuBOZFVL8hIYicKTA==", + "dependencies": { + "@aws-sdk/types": "3.598.0", + "@smithy/property-provider": "^3.1.1", + "@smithy/shared-ini-file-loader": "^3.1.1", + "@smithy/types": "^3.1.0", + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=16.0.0" + }, + "peerDependencies": { + "@aws-sdk/client-sso-oidc": "^3.598.0" + } + }, + "node_modules/@aws-sdk/client-sns/node_modules/@aws-sdk/types": { + "version": "3.598.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/types/-/types-3.598.0.tgz", + "integrity": "sha512-742uRl6z7u0LFmZwDrFP6r1wlZcgVPw+/TilluDJmCAR8BgRw3IR+743kUXKBGd8QZDRW2n6v/PYsi/AWCDDMQ==", + "dependencies": { + "@smithy/types": "^3.1.0", + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=16.0.0" + } + }, + "node_modules/@aws-sdk/client-sns/node_modules/@aws-sdk/util-endpoints": { + "version": "3.598.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/util-endpoints/-/util-endpoints-3.598.0.tgz", + "integrity": "sha512-Qo9UoiVVZxcOEdiOMZg3xb1mzkTxrhd4qSlg5QQrfWPJVx/QOg+Iy0NtGxPtHtVZNHZxohYwDwV/tfsnDSE2gQ==", + "dependencies": { + "@aws-sdk/types": "3.598.0", + "@smithy/types": "^3.1.0", + "@smithy/util-endpoints": "^2.0.2", + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=16.0.0" + } + }, + "node_modules/@aws-sdk/client-sns/node_modules/@aws-sdk/util-user-agent-browser": { + "version": "3.598.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/util-user-agent-browser/-/util-user-agent-browser-3.598.0.tgz", + "integrity": "sha512-36Sxo6F+ykElaL1mWzWjlg+1epMpSe8obwhCN1yGE7Js9ywy5U6k6l+A3q3YM9YRbm740sNxncbwLklMvuhTKw==", + "dependencies": { + "@aws-sdk/types": "3.598.0", + "@smithy/types": "^3.1.0", + "bowser": "^2.11.0", + "tslib": "^2.6.2" + } + }, + "node_modules/@aws-sdk/client-sns/node_modules/@aws-sdk/util-user-agent-node": { + "version": "3.598.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/util-user-agent-node/-/util-user-agent-node-3.598.0.tgz", + "integrity": "sha512-oyWGcOlfTdzkC6SVplyr0AGh54IMrDxbhg5RxJ5P+V4BKfcDoDcZV9xenUk9NsOi9MuUjxMumb9UJGkDhM1m0A==", + "dependencies": { + "@aws-sdk/types": "3.598.0", + "@smithy/node-config-provider": "^3.1.1", + "@smithy/types": "^3.1.0", + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=16.0.0" + }, + "peerDependencies": { + "aws-crt": ">=1.0.0" + }, + "peerDependenciesMeta": { + "aws-crt": { + "optional": true + } + } + }, + "node_modules/@aws-sdk/client-sns/node_modules/@smithy/abort-controller": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/@smithy/abort-controller/-/abort-controller-3.1.1.tgz", + "integrity": "sha512-MBJBiidoe+0cTFhyxT8g+9g7CeVccLM0IOKKUMCNQ1CNMJ/eIfoo0RTfVrXOONEI1UCN1W+zkiHSbzUNE9dZtQ==", + "dependencies": { + "@smithy/types": "^3.3.0", + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=16.0.0" + } + }, + "node_modules/@aws-sdk/client-sns/node_modules/@smithy/config-resolver": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/@smithy/config-resolver/-/config-resolver-3.0.4.tgz", + "integrity": "sha512-VwiOk7TwXoE7NlNguV/aPq1hFH72tqkHCw8eWXbr2xHspRyyv9DLpLXhq+Ieje+NwoqXrY0xyQjPXdOE6cGcHA==", + "dependencies": { + "@smithy/node-config-provider": "^3.1.3", + "@smithy/types": "^3.3.0", + "@smithy/util-config-provider": "^3.0.0", + "@smithy/util-middleware": "^3.0.3", + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=16.0.0" + } + }, + "node_modules/@aws-sdk/client-sns/node_modules/@smithy/credential-provider-imds": { + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/@smithy/credential-provider-imds/-/credential-provider-imds-3.1.3.tgz", + "integrity": "sha512-U1Yrv6hx/mRK6k8AncuI6jLUx9rn0VVSd9NPEX6pyYFBfkSkChOc/n4zUb8alHUVg83TbI4OdZVo1X0Zfj3ijA==", + "dependencies": { + "@smithy/node-config-provider": "^3.1.3", + "@smithy/property-provider": "^3.1.3", + "@smithy/types": "^3.3.0", + "@smithy/url-parser": "^3.0.3", + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=16.0.0" + } + }, + "node_modules/@aws-sdk/client-sns/node_modules/@smithy/fetch-http-handler": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/@smithy/fetch-http-handler/-/fetch-http-handler-3.2.0.tgz", + "integrity": "sha512-vFvDxMrc6sO5Atec8PaISckMcAwsCrRhYxwUylg97bRT2KZoumOF7qk5+6EVUtuM1IG9AJV5aqXnHln9ZdXHpg==", + "dependencies": { + "@smithy/protocol-http": "^4.0.3", + "@smithy/querystring-builder": "^3.0.3", + "@smithy/types": "^3.3.0", + "@smithy/util-base64": "^3.0.0", + "tslib": "^2.6.2" + } + }, + "node_modules/@aws-sdk/client-sns/node_modules/@smithy/hash-node": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/@smithy/hash-node/-/hash-node-3.0.3.tgz", + "integrity": "sha512-2ctBXpPMG+B3BtWSGNnKELJ7SH9e4TNefJS0cd2eSkOOROeBnnVBnAy9LtJ8tY4vUEoe55N4CNPxzbWvR39iBw==", + "dependencies": { + "@smithy/types": "^3.3.0", + "@smithy/util-buffer-from": "^3.0.0", + "@smithy/util-utf8": "^3.0.0", + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=16.0.0" + } + }, + "node_modules/@aws-sdk/client-sns/node_modules/@smithy/invalid-dependency": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/@smithy/invalid-dependency/-/invalid-dependency-3.0.3.tgz", + "integrity": "sha512-ID1eL/zpDULmHJbflb864k72/SNOZCADRc9i7Exq3RUNJw6raWUSlFEQ+3PX3EYs++bTxZB2dE9mEHTQLv61tw==", + "dependencies": { + "@smithy/types": "^3.3.0", + "tslib": "^2.6.2" + } + }, + "node_modules/@aws-sdk/client-sns/node_modules/@smithy/is-array-buffer": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/@smithy/is-array-buffer/-/is-array-buffer-3.0.0.tgz", + "integrity": "sha512-+Fsu6Q6C4RSJiy81Y8eApjEB5gVtM+oFKTffg+jSuwtvomJJrhUJBu2zS8wjXSgH/g1MKEWrzyChTBe6clb5FQ==", + "dependencies": { + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=16.0.0" + } + }, + "node_modules/@aws-sdk/client-sns/node_modules/@smithy/middleware-content-length": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/@smithy/middleware-content-length/-/middleware-content-length-3.0.3.tgz", + "integrity": "sha512-Dbz2bzexReYIQDWMr+gZhpwBetNXzbhnEMhYKA6urqmojO14CsXjnsoPYO8UL/xxcawn8ZsuVU61ElkLSltIUQ==", + "dependencies": { + "@smithy/protocol-http": "^4.0.3", + "@smithy/types": "^3.3.0", + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=16.0.0" + } + }, + "node_modules/@aws-sdk/client-sns/node_modules/@smithy/middleware-endpoint": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/@smithy/middleware-endpoint/-/middleware-endpoint-3.0.4.tgz", + "integrity": "sha512-whUJMEPwl3ANIbXjBXZVdJNgfV2ZU8ayln7xUM47rXL2txuenI7jQ/VFFwCzy5lCmXScjp6zYtptW5Evud8e9g==", + "dependencies": { + "@smithy/middleware-serde": "^3.0.3", + "@smithy/node-config-provider": "^3.1.3", + "@smithy/shared-ini-file-loader": "^3.1.3", + "@smithy/types": "^3.3.0", + "@smithy/url-parser": "^3.0.3", + "@smithy/util-middleware": "^3.0.3", + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=16.0.0" + } + }, + "node_modules/@aws-sdk/client-sns/node_modules/@smithy/middleware-retry": { + "version": "3.0.7", + "resolved": "https://registry.npmjs.org/@smithy/middleware-retry/-/middleware-retry-3.0.7.tgz", + "integrity": "sha512-f5q7Y09G+2h5ivkSx5CHvlAT4qRR3jBFEsfXyQ9nFNiWQlr8c48blnu5cmbTQ+p1xmIO14UXzKoF8d7Tm0Gsjw==", + "dependencies": { + "@smithy/node-config-provider": "^3.1.3", + "@smithy/protocol-http": "^4.0.3", + "@smithy/service-error-classification": "^3.0.3", + "@smithy/smithy-client": "^3.1.5", + "@smithy/types": "^3.3.0", + "@smithy/util-middleware": "^3.0.3", + "@smithy/util-retry": "^3.0.3", + "tslib": "^2.6.2", + "uuid": "^9.0.1" + }, + "engines": { + "node": ">=16.0.0" + } + }, + "node_modules/@aws-sdk/client-sns/node_modules/@smithy/middleware-serde": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/@smithy/middleware-serde/-/middleware-serde-3.0.3.tgz", + "integrity": "sha512-puUbyJQBcg9eSErFXjKNiGILJGtiqmuuNKEYNYfUD57fUl4i9+mfmThtQhvFXU0hCVG0iEJhvQUipUf+/SsFdA==", + "dependencies": { + "@smithy/types": "^3.3.0", + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=16.0.0" + } + }, + "node_modules/@aws-sdk/client-sns/node_modules/@smithy/middleware-stack": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/@smithy/middleware-stack/-/middleware-stack-3.0.3.tgz", + "integrity": "sha512-r4klY9nFudB0r9UdSMaGSyjyQK5adUyPnQN/ZM6M75phTxOdnc/AhpvGD1fQUvgmqjQEBGCwpnPbDm8pH5PapA==", + "dependencies": { + "@smithy/types": "^3.3.0", + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=16.0.0" + } + }, + "node_modules/@aws-sdk/client-sns/node_modules/@smithy/node-config-provider": { + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/@smithy/node-config-provider/-/node-config-provider-3.1.3.tgz", + "integrity": "sha512-rxdpAZczzholz6CYZxtqDu/aKTxATD5DAUDVj7HoEulq+pDSQVWzbg0btZDlxeFfa6bb2b5tUvgdX5+k8jUqcg==", + "dependencies": { + "@smithy/property-provider": "^3.1.3", + "@smithy/shared-ini-file-loader": "^3.1.3", + "@smithy/types": "^3.3.0", + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=16.0.0" + } + }, + "node_modules/@aws-sdk/client-sns/node_modules/@smithy/node-http-handler": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/@smithy/node-http-handler/-/node-http-handler-3.1.1.tgz", + "integrity": "sha512-L71NLyPeP450r2J/mfu1jMc//Z1YnqJt2eSNw7uhiItaONnBLDA68J5jgxq8+MBDsYnFwNAIc7dBG1ImiWBiwg==", + "dependencies": { + "@smithy/abort-controller": "^3.1.1", + "@smithy/protocol-http": "^4.0.3", + "@smithy/querystring-builder": "^3.0.3", + "@smithy/types": "^3.3.0", + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=16.0.0" + } + }, + "node_modules/@aws-sdk/client-sns/node_modules/@smithy/property-provider": { + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/@smithy/property-provider/-/property-provider-3.1.3.tgz", + "integrity": "sha512-zahyOVR9Q4PEoguJ/NrFP4O7SMAfYO1HLhB18M+q+Z4KFd4V2obiMnlVoUFzFLSPeVt1POyNWneHHrZaTMoc/g==", + "dependencies": { + "@smithy/types": "^3.3.0", + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=16.0.0" + } + }, + "node_modules/@aws-sdk/client-sns/node_modules/@smithy/protocol-http": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/@smithy/protocol-http/-/protocol-http-4.0.3.tgz", + "integrity": "sha512-x5jmrCWwQlx+Zv4jAtc33ijJ+vqqYN+c/ZkrnpvEe/uDas7AT7A/4Rc2CdfxgWv4WFGmEqODIrrUToPN6DDkGw==", + "dependencies": { + "@smithy/types": "^3.3.0", + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=16.0.0" + } + }, + "node_modules/@aws-sdk/client-sns/node_modules/@smithy/querystring-builder": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/@smithy/querystring-builder/-/querystring-builder-3.0.3.tgz", + "integrity": "sha512-vyWckeUeesFKzCDaRwWLUA1Xym9McaA6XpFfAK5qI9DKJ4M33ooQGqvM4J+LalH4u/Dq9nFiC8U6Qn1qi0+9zw==", + "dependencies": { + "@smithy/types": "^3.3.0", + "@smithy/util-uri-escape": "^3.0.0", + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=16.0.0" + } + }, + "node_modules/@aws-sdk/client-sns/node_modules/@smithy/querystring-parser": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/@smithy/querystring-parser/-/querystring-parser-3.0.3.tgz", + "integrity": "sha512-zahM1lQv2YjmznnfQsWbYojFe55l0SLG/988brlLv1i8z3dubloLF+75ATRsqPBboUXsW6I9CPGE5rQgLfY0vQ==", + "dependencies": { + "@smithy/types": "^3.3.0", + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=16.0.0" + } + }, + "node_modules/@aws-sdk/client-sns/node_modules/@smithy/service-error-classification": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/@smithy/service-error-classification/-/service-error-classification-3.0.3.tgz", + "integrity": "sha512-Jn39sSl8cim/VlkLsUhRFq/dKDnRUFlfRkvhOJaUbLBXUsLRLNf9WaxDv/z9BjuQ3A6k/qE8af1lsqcwm7+DaQ==", + "dependencies": { + "@smithy/types": "^3.3.0" + }, + "engines": { + "node": ">=16.0.0" + } + }, + "node_modules/@aws-sdk/client-sns/node_modules/@smithy/shared-ini-file-loader": { + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/@smithy/shared-ini-file-loader/-/shared-ini-file-loader-3.1.3.tgz", + "integrity": "sha512-Z8Y3+08vgoDgl4HENqNnnzSISAaGrF2RoKupoC47u2wiMp+Z8P/8mDh1CL8+8ujfi2U5naNvopSBmP/BUj8b5w==", + "dependencies": { + "@smithy/types": "^3.3.0", + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=16.0.0" + } + }, + "node_modules/@aws-sdk/client-sns/node_modules/@smithy/signature-v4": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/@smithy/signature-v4/-/signature-v4-3.1.2.tgz", + "integrity": "sha512-3BcPylEsYtD0esM4Hoyml/+s7WP2LFhcM3J2AGdcL2vx9O60TtfpDOL72gjb4lU8NeRPeKAwR77YNyyGvMbuEA==", + "dependencies": { + "@smithy/is-array-buffer": "^3.0.0", + "@smithy/types": "^3.3.0", + "@smithy/util-hex-encoding": "^3.0.0", + "@smithy/util-middleware": "^3.0.3", + "@smithy/util-uri-escape": "^3.0.0", + "@smithy/util-utf8": "^3.0.0", + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=16.0.0" + } + }, + "node_modules/@aws-sdk/client-sns/node_modules/@smithy/smithy-client": { + "version": "3.1.5", + "resolved": "https://registry.npmjs.org/@smithy/smithy-client/-/smithy-client-3.1.5.tgz", + "integrity": "sha512-x9bL9Mx2CT2P1OiUlHM+ZNpbVU6TgT32f9CmTRzqIHA7M4vYrROCWEoC3o4xHNJASoGd4Opos3cXYPgh+/m4Ww==", + "dependencies": { + "@smithy/middleware-endpoint": "^3.0.4", + "@smithy/middleware-stack": "^3.0.3", + "@smithy/protocol-http": "^4.0.3", + "@smithy/types": "^3.3.0", + "@smithy/util-stream": "^3.0.5", + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=16.0.0" + } + }, + "node_modules/@aws-sdk/client-sns/node_modules/@smithy/types": { + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/@smithy/types/-/types-3.3.0.tgz", + "integrity": "sha512-IxvBBCTFDHbVoK7zIxqA1ZOdc4QfM5HM7rGleCuHi7L1wnKv5Pn69xXJQ9hgxH60ZVygH9/JG0jRgtUncE3QUA==", + "dependencies": { + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=16.0.0" + } + }, + "node_modules/@aws-sdk/client-sns/node_modules/@smithy/url-parser": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/@smithy/url-parser/-/url-parser-3.0.3.tgz", + "integrity": "sha512-pw3VtZtX2rg+s6HMs6/+u9+hu6oY6U7IohGhVNnjbgKy86wcIsSZwgHrFR+t67Uyxvp4Xz3p3kGXXIpTNisq8A==", + "dependencies": { + "@smithy/querystring-parser": "^3.0.3", + "@smithy/types": "^3.3.0", + "tslib": "^2.6.2" + } + }, + "node_modules/@aws-sdk/client-sns/node_modules/@smithy/util-base64": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/@smithy/util-base64/-/util-base64-3.0.0.tgz", + "integrity": "sha512-Kxvoh5Qtt0CDsfajiZOCpJxgtPHXOKwmM+Zy4waD43UoEMA+qPxxa98aE/7ZhdnBFZFXMOiBR5xbcaMhLtznQQ==", + "dependencies": { + "@smithy/util-buffer-from": "^3.0.0", + "@smithy/util-utf8": "^3.0.0", + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=16.0.0" + } + }, + "node_modules/@aws-sdk/client-sns/node_modules/@smithy/util-body-length-browser": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/@smithy/util-body-length-browser/-/util-body-length-browser-3.0.0.tgz", + "integrity": "sha512-cbjJs2A1mLYmqmyVl80uoLTJhAcfzMOyPgjwAYusWKMdLeNtzmMz9YxNl3/jRLoxSS3wkqkf0jwNdtXWtyEBaQ==", + "dependencies": { + "tslib": "^2.6.2" + } + }, + "node_modules/@aws-sdk/client-sns/node_modules/@smithy/util-body-length-node": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/@smithy/util-body-length-node/-/util-body-length-node-3.0.0.tgz", + "integrity": "sha512-Tj7pZ4bUloNUP6PzwhN7K386tmSmEET9QtQg0TgdNOnxhZvCssHji+oZTUIuzxECRfG8rdm2PMw2WCFs6eIYkA==", + "dependencies": { + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=16.0.0" + } + }, + "node_modules/@aws-sdk/client-sns/node_modules/@smithy/util-buffer-from": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/@smithy/util-buffer-from/-/util-buffer-from-3.0.0.tgz", + "integrity": "sha512-aEOHCgq5RWFbP+UDPvPot26EJHjOC+bRgse5A8V3FSShqd5E5UN4qc7zkwsvJPPAVsf73QwYcHN1/gt/rtLwQA==", + "dependencies": { + "@smithy/is-array-buffer": "^3.0.0", + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=16.0.0" + } + }, + "node_modules/@aws-sdk/client-sns/node_modules/@smithy/util-config-provider": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/@smithy/util-config-provider/-/util-config-provider-3.0.0.tgz", + "integrity": "sha512-pbjk4s0fwq3Di/ANL+rCvJMKM5bzAQdE5S/6RL5NXgMExFAi6UgQMPOm5yPaIWPpr+EOXKXRonJ3FoxKf4mCJQ==", + "dependencies": { + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=16.0.0" + } + }, + "node_modules/@aws-sdk/client-sns/node_modules/@smithy/util-defaults-mode-browser": { + "version": "3.0.7", + "resolved": "https://registry.npmjs.org/@smithy/util-defaults-mode-browser/-/util-defaults-mode-browser-3.0.7.tgz", + "integrity": "sha512-Q2txLyvQyGfmjsaDbVV7Sg8psefpFcrnlGapDzXGFRPFKRBeEg6OvFK8FljqjeHSaCZ6/UuzQExUPqBR/2qlDA==", + "dependencies": { + "@smithy/property-provider": "^3.1.3", + "@smithy/smithy-client": "^3.1.5", + "@smithy/types": "^3.3.0", + "bowser": "^2.11.0", + "tslib": "^2.6.2" + }, + "engines": { + "node": ">= 10.0.0" + } + }, + "node_modules/@aws-sdk/client-sns/node_modules/@smithy/util-defaults-mode-node": { + "version": "3.0.7", + "resolved": "https://registry.npmjs.org/@smithy/util-defaults-mode-node/-/util-defaults-mode-node-3.0.7.tgz", + "integrity": "sha512-F4Qcj1fG6MGi2BSWCslfsMSwllws/WzYONBGtLybyY+halAcXdWhcew+mej8M5SKd5hqPYp4f7b+ABQEaeytgg==", + "dependencies": { + "@smithy/config-resolver": "^3.0.4", + "@smithy/credential-provider-imds": "^3.1.3", + "@smithy/node-config-provider": "^3.1.3", + "@smithy/property-provider": "^3.1.3", + "@smithy/smithy-client": "^3.1.5", + "@smithy/types": "^3.3.0", + "tslib": "^2.6.2" + }, + "engines": { + "node": ">= 10.0.0" + } + }, + "node_modules/@aws-sdk/client-sns/node_modules/@smithy/util-endpoints": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/@smithy/util-endpoints/-/util-endpoints-2.0.4.tgz", + "integrity": "sha512-ZAtNf+vXAsgzgRutDDiklU09ZzZiiV/nATyqde4Um4priTmasDH+eLpp3tspL0hS2dEootyFMhu1Y6Y+tzpWBQ==", + "dependencies": { + "@smithy/node-config-provider": "^3.1.3", + "@smithy/types": "^3.3.0", + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=16.0.0" + } + }, + "node_modules/@aws-sdk/client-sns/node_modules/@smithy/util-hex-encoding": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/@smithy/util-hex-encoding/-/util-hex-encoding-3.0.0.tgz", + "integrity": "sha512-eFndh1WEK5YMUYvy3lPlVmYY/fZcQE1D8oSf41Id2vCeIkKJXPcYDCZD+4+xViI6b1XSd7tE+s5AmXzz5ilabQ==", + "dependencies": { + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=16.0.0" + } + }, + "node_modules/@aws-sdk/client-sns/node_modules/@smithy/util-middleware": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/@smithy/util-middleware/-/util-middleware-3.0.3.tgz", + "integrity": "sha512-l+StyYYK/eO3DlVPbU+4Bi06Jjal+PFLSMmlWM1BEwyLxZ3aKkf1ROnoIakfaA7mC6uw3ny7JBkau4Yc+5zfWw==", + "dependencies": { + "@smithy/types": "^3.3.0", + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=16.0.0" + } + }, + "node_modules/@aws-sdk/client-sns/node_modules/@smithy/util-retry": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/@smithy/util-retry/-/util-retry-3.0.3.tgz", + "integrity": "sha512-AFw+hjpbtVApzpNDhbjNG5NA3kyoMs7vx0gsgmlJF4s+yz1Zlepde7J58zpIRIsdjc+emhpAITxA88qLkPF26w==", + "dependencies": { + "@smithy/service-error-classification": "^3.0.3", + "@smithy/types": "^3.3.0", + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=16.0.0" + } + }, + "node_modules/@aws-sdk/client-sns/node_modules/@smithy/util-stream": { + "version": "3.0.5", + "resolved": "https://registry.npmjs.org/@smithy/util-stream/-/util-stream-3.0.5.tgz", + "integrity": "sha512-xC3L5PKMAT/Bh8fmHNXP9sdQ4+4aKVUU3EEJ2CF/lLk7R+wtMJM+v/1B4en7jO++Wa5spGzFDBCl0QxgbUc5Ug==", + "dependencies": { + "@smithy/fetch-http-handler": "^3.2.0", + "@smithy/node-http-handler": "^3.1.1", + "@smithy/types": "^3.3.0", + "@smithy/util-base64": "^3.0.0", + "@smithy/util-buffer-from": "^3.0.0", + "@smithy/util-hex-encoding": "^3.0.0", + "@smithy/util-utf8": "^3.0.0", + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=16.0.0" + } + }, + "node_modules/@aws-sdk/client-sns/node_modules/@smithy/util-uri-escape": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/@smithy/util-uri-escape/-/util-uri-escape-3.0.0.tgz", + "integrity": "sha512-LqR7qYLgZTD7nWLBecUi4aqolw8Mhza9ArpNEQ881MJJIU2sE5iHCK6TdyqqzcDLy0OPe10IY4T8ctVdtynubg==", + "dependencies": { + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=16.0.0" + } + }, + "node_modules/@aws-sdk/client-sns/node_modules/@smithy/util-utf8": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/@smithy/util-utf8/-/util-utf8-3.0.0.tgz", + "integrity": "sha512-rUeT12bxFnplYDe815GXbq/oixEGHfRFFtcTF3YdDi/JaENIM6aSYYLJydG83UNzLXeRI5K8abYd/8Sp/QM0kA==", + "dependencies": { + "@smithy/util-buffer-from": "^3.0.0", + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=16.0.0" + } + }, + "node_modules/@aws-sdk/client-sso": { + "version": "3.468.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/client-sso/-/client-sso-3.468.0.tgz", + "integrity": "sha512-NabkDaiFsMP8lBR3+JzdtOVarH8kCJst30fQyBIs2PI0uMfajFJ+SK9JTg1J1YZY6aNJBxo2Bxu3dl0fjZ5N/g==", + "dev": true, + "dependencies": { + "@aws-crypto/sha256-browser": "3.0.0", + "@aws-crypto/sha256-js": "3.0.0", + "@aws-sdk/core": "3.468.0", + "@aws-sdk/middleware-host-header": "3.468.0", + "@aws-sdk/middleware-logger": "3.468.0", + "@aws-sdk/middleware-recursion-detection": "3.468.0", + "@aws-sdk/middleware-user-agent": "3.468.0", + "@aws-sdk/region-config-resolver": "3.468.0", + "@aws-sdk/types": "3.468.0", + "@aws-sdk/util-endpoints": "3.468.0", + "@aws-sdk/util-user-agent-browser": "3.468.0", + "@aws-sdk/util-user-agent-node": "3.468.0", + "@smithy/config-resolver": "^2.0.20", + "@smithy/fetch-http-handler": "^2.3.1", + "@smithy/hash-node": "^2.0.17", + "@smithy/invalid-dependency": "^2.0.15", + "@smithy/middleware-content-length": "^2.0.17", + "@smithy/middleware-endpoint": "^2.2.2", + "@smithy/middleware-retry": "^2.0.23", + "@smithy/middleware-serde": "^2.0.15", + "@smithy/middleware-stack": "^2.0.9", + "@smithy/node-config-provider": "^2.1.7", + "@smithy/node-http-handler": "^2.2.1", + "@smithy/protocol-http": "^3.0.11", + "@smithy/smithy-client": "^2.1.18", + "@smithy/types": "^2.7.0", + "@smithy/url-parser": "^2.0.15", + "@smithy/util-base64": "^2.0.1", + "@smithy/util-body-length-browser": "^2.0.1", + "@smithy/util-body-length-node": "^2.1.0", + "@smithy/util-defaults-mode-browser": "^2.0.22", + "@smithy/util-defaults-mode-node": "^2.0.28", + "@smithy/util-endpoints": "^1.0.6", + "@smithy/util-retry": "^2.0.8", + "@smithy/util-utf8": "^2.0.2", + "tslib": "^2.5.0" + }, + "engines": { + "node": ">=14.0.0" + } + }, + "node_modules/@aws-sdk/client-sts": { + "version": "3.468.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/client-sts/-/client-sts-3.468.0.tgz", + "integrity": "sha512-EausH7ezv1AIgl/4rfZRNRxrFND5hChbIqkuAf8e5wZ74HUEVBMmD5Jiwfs0WRCso3ejOjsNtS8PAOA3djn28w==", + "dev": true, + "dependencies": { + "@aws-crypto/sha256-browser": "3.0.0", + "@aws-crypto/sha256-js": "3.0.0", + "@aws-sdk/core": "3.468.0", + "@aws-sdk/credential-provider-node": "3.468.0", + "@aws-sdk/middleware-host-header": "3.468.0", + "@aws-sdk/middleware-logger": "3.468.0", + "@aws-sdk/middleware-recursion-detection": "3.468.0", + "@aws-sdk/middleware-sdk-sts": "3.468.0", + "@aws-sdk/middleware-signing": "3.468.0", + "@aws-sdk/middleware-user-agent": "3.468.0", + "@aws-sdk/region-config-resolver": "3.468.0", + "@aws-sdk/types": "3.468.0", + "@aws-sdk/util-endpoints": "3.468.0", + "@aws-sdk/util-user-agent-browser": "3.468.0", + "@aws-sdk/util-user-agent-node": "3.468.0", + "@smithy/config-resolver": "^2.0.20", + "@smithy/fetch-http-handler": "^2.3.1", + "@smithy/hash-node": "^2.0.17", + "@smithy/invalid-dependency": "^2.0.15", + "@smithy/middleware-content-length": "^2.0.17", + "@smithy/middleware-endpoint": "^2.2.2", + "@smithy/middleware-retry": "^2.0.23", + "@smithy/middleware-serde": "^2.0.15", + "@smithy/middleware-stack": "^2.0.9", + "@smithy/node-config-provider": "^2.1.7", + "@smithy/node-http-handler": "^2.2.1", + "@smithy/protocol-http": "^3.0.11", + "@smithy/smithy-client": "^2.1.18", + "@smithy/types": "^2.7.0", + "@smithy/url-parser": "^2.0.15", + "@smithy/util-base64": "^2.0.1", + "@smithy/util-body-length-browser": "^2.0.1", + "@smithy/util-body-length-node": "^2.1.0", + "@smithy/util-defaults-mode-browser": "^2.0.22", + "@smithy/util-defaults-mode-node": "^2.0.28", + "@smithy/util-endpoints": "^1.0.6", + "@smithy/util-retry": "^2.0.8", + "@smithy/util-utf8": "^2.0.2", + "fast-xml-parser": "4.2.5", + "tslib": "^2.5.0" + }, + "engines": { + "node": ">=14.0.0" + } + }, + "node_modules/@aws-sdk/core": { + "version": "3.468.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/core/-/core-3.468.0.tgz", + "integrity": "sha512-ezUJR9VvknKoXzNZ4wvzGi1jdkmm+/1dUYQ9Sw4r8bzlJDTsUnWbyvaDlBQh81RuhLtVkaUfTnQKoec0cwlZKQ==", + "dev": true, + "dependencies": { + "@smithy/smithy-client": "^2.1.18", + "tslib": "^2.5.0" + }, + "engines": { + "node": ">=14.0.0" + } + }, + "node_modules/@aws-sdk/credential-provider-env": { + "version": "3.468.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/credential-provider-env/-/credential-provider-env-3.468.0.tgz", + "integrity": "sha512-k/1WHd3KZn0EQYjadooj53FC0z24/e4dUZhbSKTULgmxyO62pwh9v3Brvw4WRa/8o2wTffU/jo54tf4vGuP/ZA==", + "dev": true, + "dependencies": { + "@aws-sdk/types": "3.468.0", + "@smithy/property-provider": "^2.0.0", + "@smithy/types": "^2.7.0", + "tslib": "^2.5.0" + }, + "engines": { + "node": ">=14.0.0" + } + }, + "node_modules/@aws-sdk/credential-provider-http": { + "version": "3.598.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/credential-provider-http/-/credential-provider-http-3.598.0.tgz", + "integrity": "sha512-N7cIafi4HVlQvEgvZSo1G4T9qb/JMLGMdBsDCT5XkeJrF0aptQWzTFH0jIdZcLrMYvzPcuEyO3yCBe6cy/ba0g==", + "dependencies": { + "@aws-sdk/types": "3.598.0", + "@smithy/fetch-http-handler": "^3.0.2", + "@smithy/node-http-handler": "^3.0.1", + "@smithy/property-provider": "^3.1.1", + "@smithy/protocol-http": "^4.0.1", + "@smithy/smithy-client": "^3.1.2", + "@smithy/types": "^3.1.0", + "@smithy/util-stream": "^3.0.2", + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=16.0.0" + } + }, + "node_modules/@aws-sdk/credential-provider-http/node_modules/@aws-sdk/types": { + "version": "3.598.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/types/-/types-3.598.0.tgz", + "integrity": "sha512-742uRl6z7u0LFmZwDrFP6r1wlZcgVPw+/TilluDJmCAR8BgRw3IR+743kUXKBGd8QZDRW2n6v/PYsi/AWCDDMQ==", + "dependencies": { + "@smithy/types": "^3.1.0", + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=16.0.0" + } + }, + "node_modules/@aws-sdk/credential-provider-http/node_modules/@smithy/abort-controller": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/@smithy/abort-controller/-/abort-controller-3.1.1.tgz", + "integrity": "sha512-MBJBiidoe+0cTFhyxT8g+9g7CeVccLM0IOKKUMCNQ1CNMJ/eIfoo0RTfVrXOONEI1UCN1W+zkiHSbzUNE9dZtQ==", + "dependencies": { + "@smithy/types": "^3.3.0", + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=16.0.0" + } + }, + "node_modules/@aws-sdk/credential-provider-http/node_modules/@smithy/fetch-http-handler": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/@smithy/fetch-http-handler/-/fetch-http-handler-3.2.0.tgz", + "integrity": "sha512-vFvDxMrc6sO5Atec8PaISckMcAwsCrRhYxwUylg97bRT2KZoumOF7qk5+6EVUtuM1IG9AJV5aqXnHln9ZdXHpg==", + "dependencies": { + "@smithy/protocol-http": "^4.0.3", + "@smithy/querystring-builder": "^3.0.3", + "@smithy/types": "^3.3.0", + "@smithy/util-base64": "^3.0.0", + "tslib": "^2.6.2" + } + }, + "node_modules/@aws-sdk/credential-provider-http/node_modules/@smithy/is-array-buffer": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/@smithy/is-array-buffer/-/is-array-buffer-3.0.0.tgz", + "integrity": "sha512-+Fsu6Q6C4RSJiy81Y8eApjEB5gVtM+oFKTffg+jSuwtvomJJrhUJBu2zS8wjXSgH/g1MKEWrzyChTBe6clb5FQ==", + "dependencies": { + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=16.0.0" + } + }, + "node_modules/@aws-sdk/credential-provider-http/node_modules/@smithy/middleware-endpoint": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/@smithy/middleware-endpoint/-/middleware-endpoint-3.0.4.tgz", + "integrity": "sha512-whUJMEPwl3ANIbXjBXZVdJNgfV2ZU8ayln7xUM47rXL2txuenI7jQ/VFFwCzy5lCmXScjp6zYtptW5Evud8e9g==", + "dependencies": { + "@smithy/middleware-serde": "^3.0.3", + "@smithy/node-config-provider": "^3.1.3", + "@smithy/shared-ini-file-loader": "^3.1.3", + "@smithy/types": "^3.3.0", + "@smithy/url-parser": "^3.0.3", + "@smithy/util-middleware": "^3.0.3", + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=16.0.0" + } + }, + "node_modules/@aws-sdk/credential-provider-http/node_modules/@smithy/middleware-serde": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/@smithy/middleware-serde/-/middleware-serde-3.0.3.tgz", + "integrity": "sha512-puUbyJQBcg9eSErFXjKNiGILJGtiqmuuNKEYNYfUD57fUl4i9+mfmThtQhvFXU0hCVG0iEJhvQUipUf+/SsFdA==", + "dependencies": { + "@smithy/types": "^3.3.0", + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=16.0.0" + } + }, + "node_modules/@aws-sdk/credential-provider-http/node_modules/@smithy/middleware-stack": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/@smithy/middleware-stack/-/middleware-stack-3.0.3.tgz", + "integrity": "sha512-r4klY9nFudB0r9UdSMaGSyjyQK5adUyPnQN/ZM6M75phTxOdnc/AhpvGD1fQUvgmqjQEBGCwpnPbDm8pH5PapA==", + "dependencies": { + "@smithy/types": "^3.3.0", + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=16.0.0" + } + }, + "node_modules/@aws-sdk/credential-provider-http/node_modules/@smithy/node-config-provider": { + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/@smithy/node-config-provider/-/node-config-provider-3.1.3.tgz", + "integrity": "sha512-rxdpAZczzholz6CYZxtqDu/aKTxATD5DAUDVj7HoEulq+pDSQVWzbg0btZDlxeFfa6bb2b5tUvgdX5+k8jUqcg==", + "dependencies": { + "@smithy/property-provider": "^3.1.3", + "@smithy/shared-ini-file-loader": "^3.1.3", + "@smithy/types": "^3.3.0", + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=16.0.0" + } + }, + "node_modules/@aws-sdk/credential-provider-http/node_modules/@smithy/node-http-handler": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/@smithy/node-http-handler/-/node-http-handler-3.1.1.tgz", + "integrity": "sha512-L71NLyPeP450r2J/mfu1jMc//Z1YnqJt2eSNw7uhiItaONnBLDA68J5jgxq8+MBDsYnFwNAIc7dBG1ImiWBiwg==", + "dependencies": { + "@smithy/abort-controller": "^3.1.1", + "@smithy/protocol-http": "^4.0.3", + "@smithy/querystring-builder": "^3.0.3", + "@smithy/types": "^3.3.0", + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=16.0.0" + } + }, + "node_modules/@aws-sdk/credential-provider-http/node_modules/@smithy/property-provider": { + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/@smithy/property-provider/-/property-provider-3.1.3.tgz", + "integrity": "sha512-zahyOVR9Q4PEoguJ/NrFP4O7SMAfYO1HLhB18M+q+Z4KFd4V2obiMnlVoUFzFLSPeVt1POyNWneHHrZaTMoc/g==", + "dependencies": { + "@smithy/types": "^3.3.0", + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=16.0.0" + } + }, + "node_modules/@aws-sdk/credential-provider-http/node_modules/@smithy/protocol-http": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/@smithy/protocol-http/-/protocol-http-4.0.3.tgz", + "integrity": "sha512-x5jmrCWwQlx+Zv4jAtc33ijJ+vqqYN+c/ZkrnpvEe/uDas7AT7A/4Rc2CdfxgWv4WFGmEqODIrrUToPN6DDkGw==", + "dependencies": { + "@smithy/types": "^3.3.0", + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=16.0.0" + } + }, + "node_modules/@aws-sdk/credential-provider-http/node_modules/@smithy/querystring-builder": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/@smithy/querystring-builder/-/querystring-builder-3.0.3.tgz", + "integrity": "sha512-vyWckeUeesFKzCDaRwWLUA1Xym9McaA6XpFfAK5qI9DKJ4M33ooQGqvM4J+LalH4u/Dq9nFiC8U6Qn1qi0+9zw==", + "dependencies": { + "@smithy/types": "^3.3.0", + "@smithy/util-uri-escape": "^3.0.0", + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=16.0.0" + } + }, + "node_modules/@aws-sdk/credential-provider-http/node_modules/@smithy/querystring-parser": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/@smithy/querystring-parser/-/querystring-parser-3.0.3.tgz", + "integrity": "sha512-zahM1lQv2YjmznnfQsWbYojFe55l0SLG/988brlLv1i8z3dubloLF+75ATRsqPBboUXsW6I9CPGE5rQgLfY0vQ==", + "dependencies": { + "@smithy/types": "^3.3.0", + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=16.0.0" + } + }, + "node_modules/@aws-sdk/credential-provider-http/node_modules/@smithy/shared-ini-file-loader": { + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/@smithy/shared-ini-file-loader/-/shared-ini-file-loader-3.1.3.tgz", + "integrity": "sha512-Z8Y3+08vgoDgl4HENqNnnzSISAaGrF2RoKupoC47u2wiMp+Z8P/8mDh1CL8+8ujfi2U5naNvopSBmP/BUj8b5w==", + "dependencies": { + "@smithy/types": "^3.3.0", + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=16.0.0" + } + }, + "node_modules/@aws-sdk/credential-provider-http/node_modules/@smithy/smithy-client": { + "version": "3.1.5", + "resolved": "https://registry.npmjs.org/@smithy/smithy-client/-/smithy-client-3.1.5.tgz", + "integrity": "sha512-x9bL9Mx2CT2P1OiUlHM+ZNpbVU6TgT32f9CmTRzqIHA7M4vYrROCWEoC3o4xHNJASoGd4Opos3cXYPgh+/m4Ww==", + "dependencies": { + "@smithy/middleware-endpoint": "^3.0.4", + "@smithy/middleware-stack": "^3.0.3", + "@smithy/protocol-http": "^4.0.3", + "@smithy/types": "^3.3.0", + "@smithy/util-stream": "^3.0.5", + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=16.0.0" + } + }, + "node_modules/@aws-sdk/credential-provider-http/node_modules/@smithy/types": { + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/@smithy/types/-/types-3.3.0.tgz", + "integrity": "sha512-IxvBBCTFDHbVoK7zIxqA1ZOdc4QfM5HM7rGleCuHi7L1wnKv5Pn69xXJQ9hgxH60ZVygH9/JG0jRgtUncE3QUA==", + "dependencies": { + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=16.0.0" + } + }, + "node_modules/@aws-sdk/credential-provider-http/node_modules/@smithy/url-parser": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/@smithy/url-parser/-/url-parser-3.0.3.tgz", + "integrity": "sha512-pw3VtZtX2rg+s6HMs6/+u9+hu6oY6U7IohGhVNnjbgKy86wcIsSZwgHrFR+t67Uyxvp4Xz3p3kGXXIpTNisq8A==", + "dependencies": { + "@smithy/querystring-parser": "^3.0.3", + "@smithy/types": "^3.3.0", + "tslib": "^2.6.2" + } + }, + "node_modules/@aws-sdk/credential-provider-http/node_modules/@smithy/util-base64": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/@smithy/util-base64/-/util-base64-3.0.0.tgz", + "integrity": "sha512-Kxvoh5Qtt0CDsfajiZOCpJxgtPHXOKwmM+Zy4waD43UoEMA+qPxxa98aE/7ZhdnBFZFXMOiBR5xbcaMhLtznQQ==", + "dependencies": { + "@smithy/util-buffer-from": "^3.0.0", + "@smithy/util-utf8": "^3.0.0", + "tslib": "^2.6.2" }, "engines": { - "node": ">=14.0.0" + "node": ">=16.0.0" } }, - "node_modules/@aws-sdk/core": { - "version": "3.468.0", - "resolved": "https://registry.npmjs.org/@aws-sdk/core/-/core-3.468.0.tgz", - "integrity": "sha512-ezUJR9VvknKoXzNZ4wvzGi1jdkmm+/1dUYQ9Sw4r8bzlJDTsUnWbyvaDlBQh81RuhLtVkaUfTnQKoec0cwlZKQ==", - "dev": true, + "node_modules/@aws-sdk/credential-provider-http/node_modules/@smithy/util-buffer-from": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/@smithy/util-buffer-from/-/util-buffer-from-3.0.0.tgz", + "integrity": "sha512-aEOHCgq5RWFbP+UDPvPot26EJHjOC+bRgse5A8V3FSShqd5E5UN4qc7zkwsvJPPAVsf73QwYcHN1/gt/rtLwQA==", "dependencies": { - "@smithy/smithy-client": "^2.1.18", - "tslib": "^2.5.0" + "@smithy/is-array-buffer": "^3.0.0", + "tslib": "^2.6.2" }, "engines": { - "node": ">=14.0.0" + "node": ">=16.0.0" } }, - "node_modules/@aws-sdk/credential-provider-env": { - "version": "3.468.0", - "resolved": "https://registry.npmjs.org/@aws-sdk/credential-provider-env/-/credential-provider-env-3.468.0.tgz", - "integrity": "sha512-k/1WHd3KZn0EQYjadooj53FC0z24/e4dUZhbSKTULgmxyO62pwh9v3Brvw4WRa/8o2wTffU/jo54tf4vGuP/ZA==", - "dev": true, + "node_modules/@aws-sdk/credential-provider-http/node_modules/@smithy/util-hex-encoding": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/@smithy/util-hex-encoding/-/util-hex-encoding-3.0.0.tgz", + "integrity": "sha512-eFndh1WEK5YMUYvy3lPlVmYY/fZcQE1D8oSf41Id2vCeIkKJXPcYDCZD+4+xViI6b1XSd7tE+s5AmXzz5ilabQ==", "dependencies": { - "@aws-sdk/types": "3.468.0", - "@smithy/property-provider": "^2.0.0", - "@smithy/types": "^2.7.0", - "tslib": "^2.5.0" + "tslib": "^2.6.2" }, "engines": { - "node": ">=14.0.0" + "node": ">=16.0.0" + } + }, + "node_modules/@aws-sdk/credential-provider-http/node_modules/@smithy/util-middleware": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/@smithy/util-middleware/-/util-middleware-3.0.3.tgz", + "integrity": "sha512-l+StyYYK/eO3DlVPbU+4Bi06Jjal+PFLSMmlWM1BEwyLxZ3aKkf1ROnoIakfaA7mC6uw3ny7JBkau4Yc+5zfWw==", + "dependencies": { + "@smithy/types": "^3.3.0", + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=16.0.0" + } + }, + "node_modules/@aws-sdk/credential-provider-http/node_modules/@smithy/util-stream": { + "version": "3.0.5", + "resolved": "https://registry.npmjs.org/@smithy/util-stream/-/util-stream-3.0.5.tgz", + "integrity": "sha512-xC3L5PKMAT/Bh8fmHNXP9sdQ4+4aKVUU3EEJ2CF/lLk7R+wtMJM+v/1B4en7jO++Wa5spGzFDBCl0QxgbUc5Ug==", + "dependencies": { + "@smithy/fetch-http-handler": "^3.2.0", + "@smithy/node-http-handler": "^3.1.1", + "@smithy/types": "^3.3.0", + "@smithy/util-base64": "^3.0.0", + "@smithy/util-buffer-from": "^3.0.0", + "@smithy/util-hex-encoding": "^3.0.0", + "@smithy/util-utf8": "^3.0.0", + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=16.0.0" + } + }, + "node_modules/@aws-sdk/credential-provider-http/node_modules/@smithy/util-uri-escape": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/@smithy/util-uri-escape/-/util-uri-escape-3.0.0.tgz", + "integrity": "sha512-LqR7qYLgZTD7nWLBecUi4aqolw8Mhza9ArpNEQ881MJJIU2sE5iHCK6TdyqqzcDLy0OPe10IY4T8ctVdtynubg==", + "dependencies": { + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=16.0.0" + } + }, + "node_modules/@aws-sdk/credential-provider-http/node_modules/@smithy/util-utf8": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/@smithy/util-utf8/-/util-utf8-3.0.0.tgz", + "integrity": "sha512-rUeT12bxFnplYDe815GXbq/oixEGHfRFFtcTF3YdDi/JaENIM6aSYYLJydG83UNzLXeRI5K8abYd/8Sp/QM0kA==", + "dependencies": { + "@smithy/util-buffer-from": "^3.0.0", + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=16.0.0" } }, "node_modules/@aws-sdk/credential-provider-ini": { @@ -661,7 +2071,6 @@ "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==", - "dev": true, "dependencies": { "tslib": "^2.5.0" }, @@ -5868,6 +7277,359 @@ "node": ">=14.0.0" } }, + "node_modules/@smithy/core": { + "version": "2.2.4", + "resolved": "https://registry.npmjs.org/@smithy/core/-/core-2.2.4.tgz", + "integrity": "sha512-qdY3LpMOUyLM/gfjjMQZui+UTNS7kBRDWlvyIhVOql5dn2J3isk9qUTBtQ1CbDH8MTugHis1zu3h4rH+Qmmh4g==", + "dependencies": { + "@smithy/middleware-endpoint": "^3.0.4", + "@smithy/middleware-retry": "^3.0.7", + "@smithy/middleware-serde": "^3.0.3", + "@smithy/protocol-http": "^4.0.3", + "@smithy/smithy-client": "^3.1.5", + "@smithy/types": "^3.3.0", + "@smithy/util-middleware": "^3.0.3", + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=16.0.0" + } + }, + "node_modules/@smithy/core/node_modules/@smithy/abort-controller": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/@smithy/abort-controller/-/abort-controller-3.1.1.tgz", + "integrity": "sha512-MBJBiidoe+0cTFhyxT8g+9g7CeVccLM0IOKKUMCNQ1CNMJ/eIfoo0RTfVrXOONEI1UCN1W+zkiHSbzUNE9dZtQ==", + "dependencies": { + "@smithy/types": "^3.3.0", + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=16.0.0" + } + }, + "node_modules/@smithy/core/node_modules/@smithy/fetch-http-handler": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/@smithy/fetch-http-handler/-/fetch-http-handler-3.2.0.tgz", + "integrity": "sha512-vFvDxMrc6sO5Atec8PaISckMcAwsCrRhYxwUylg97bRT2KZoumOF7qk5+6EVUtuM1IG9AJV5aqXnHln9ZdXHpg==", + "dependencies": { + "@smithy/protocol-http": "^4.0.3", + "@smithy/querystring-builder": "^3.0.3", + "@smithy/types": "^3.3.0", + "@smithy/util-base64": "^3.0.0", + "tslib": "^2.6.2" + } + }, + "node_modules/@smithy/core/node_modules/@smithy/is-array-buffer": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/@smithy/is-array-buffer/-/is-array-buffer-3.0.0.tgz", + "integrity": "sha512-+Fsu6Q6C4RSJiy81Y8eApjEB5gVtM+oFKTffg+jSuwtvomJJrhUJBu2zS8wjXSgH/g1MKEWrzyChTBe6clb5FQ==", + "dependencies": { + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=16.0.0" + } + }, + "node_modules/@smithy/core/node_modules/@smithy/middleware-endpoint": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/@smithy/middleware-endpoint/-/middleware-endpoint-3.0.4.tgz", + "integrity": "sha512-whUJMEPwl3ANIbXjBXZVdJNgfV2ZU8ayln7xUM47rXL2txuenI7jQ/VFFwCzy5lCmXScjp6zYtptW5Evud8e9g==", + "dependencies": { + "@smithy/middleware-serde": "^3.0.3", + "@smithy/node-config-provider": "^3.1.3", + "@smithy/shared-ini-file-loader": "^3.1.3", + "@smithy/types": "^3.3.0", + "@smithy/url-parser": "^3.0.3", + "@smithy/util-middleware": "^3.0.3", + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=16.0.0" + } + }, + "node_modules/@smithy/core/node_modules/@smithy/middleware-retry": { + "version": "3.0.7", + "resolved": "https://registry.npmjs.org/@smithy/middleware-retry/-/middleware-retry-3.0.7.tgz", + "integrity": "sha512-f5q7Y09G+2h5ivkSx5CHvlAT4qRR3jBFEsfXyQ9nFNiWQlr8c48blnu5cmbTQ+p1xmIO14UXzKoF8d7Tm0Gsjw==", + "dependencies": { + "@smithy/node-config-provider": "^3.1.3", + "@smithy/protocol-http": "^4.0.3", + "@smithy/service-error-classification": "^3.0.3", + "@smithy/smithy-client": "^3.1.5", + "@smithy/types": "^3.3.0", + "@smithy/util-middleware": "^3.0.3", + "@smithy/util-retry": "^3.0.3", + "tslib": "^2.6.2", + "uuid": "^9.0.1" + }, + "engines": { + "node": ">=16.0.0" + } + }, + "node_modules/@smithy/core/node_modules/@smithy/middleware-serde": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/@smithy/middleware-serde/-/middleware-serde-3.0.3.tgz", + "integrity": "sha512-puUbyJQBcg9eSErFXjKNiGILJGtiqmuuNKEYNYfUD57fUl4i9+mfmThtQhvFXU0hCVG0iEJhvQUipUf+/SsFdA==", + "dependencies": { + "@smithy/types": "^3.3.0", + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=16.0.0" + } + }, + "node_modules/@smithy/core/node_modules/@smithy/middleware-stack": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/@smithy/middleware-stack/-/middleware-stack-3.0.3.tgz", + "integrity": "sha512-r4klY9nFudB0r9UdSMaGSyjyQK5adUyPnQN/ZM6M75phTxOdnc/AhpvGD1fQUvgmqjQEBGCwpnPbDm8pH5PapA==", + "dependencies": { + "@smithy/types": "^3.3.0", + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=16.0.0" + } + }, + "node_modules/@smithy/core/node_modules/@smithy/node-config-provider": { + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/@smithy/node-config-provider/-/node-config-provider-3.1.3.tgz", + "integrity": "sha512-rxdpAZczzholz6CYZxtqDu/aKTxATD5DAUDVj7HoEulq+pDSQVWzbg0btZDlxeFfa6bb2b5tUvgdX5+k8jUqcg==", + "dependencies": { + "@smithy/property-provider": "^3.1.3", + "@smithy/shared-ini-file-loader": "^3.1.3", + "@smithy/types": "^3.3.0", + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=16.0.0" + } + }, + "node_modules/@smithy/core/node_modules/@smithy/node-http-handler": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/@smithy/node-http-handler/-/node-http-handler-3.1.1.tgz", + "integrity": "sha512-L71NLyPeP450r2J/mfu1jMc//Z1YnqJt2eSNw7uhiItaONnBLDA68J5jgxq8+MBDsYnFwNAIc7dBG1ImiWBiwg==", + "dependencies": { + "@smithy/abort-controller": "^3.1.1", + "@smithy/protocol-http": "^4.0.3", + "@smithy/querystring-builder": "^3.0.3", + "@smithy/types": "^3.3.0", + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=16.0.0" + } + }, + "node_modules/@smithy/core/node_modules/@smithy/property-provider": { + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/@smithy/property-provider/-/property-provider-3.1.3.tgz", + "integrity": "sha512-zahyOVR9Q4PEoguJ/NrFP4O7SMAfYO1HLhB18M+q+Z4KFd4V2obiMnlVoUFzFLSPeVt1POyNWneHHrZaTMoc/g==", + "dependencies": { + "@smithy/types": "^3.3.0", + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=16.0.0" + } + }, + "node_modules/@smithy/core/node_modules/@smithy/protocol-http": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/@smithy/protocol-http/-/protocol-http-4.0.3.tgz", + "integrity": "sha512-x5jmrCWwQlx+Zv4jAtc33ijJ+vqqYN+c/ZkrnpvEe/uDas7AT7A/4Rc2CdfxgWv4WFGmEqODIrrUToPN6DDkGw==", + "dependencies": { + "@smithy/types": "^3.3.0", + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=16.0.0" + } + }, + "node_modules/@smithy/core/node_modules/@smithy/querystring-builder": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/@smithy/querystring-builder/-/querystring-builder-3.0.3.tgz", + "integrity": "sha512-vyWckeUeesFKzCDaRwWLUA1Xym9McaA6XpFfAK5qI9DKJ4M33ooQGqvM4J+LalH4u/Dq9nFiC8U6Qn1qi0+9zw==", + "dependencies": { + "@smithy/types": "^3.3.0", + "@smithy/util-uri-escape": "^3.0.0", + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=16.0.0" + } + }, + "node_modules/@smithy/core/node_modules/@smithy/querystring-parser": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/@smithy/querystring-parser/-/querystring-parser-3.0.3.tgz", + "integrity": "sha512-zahM1lQv2YjmznnfQsWbYojFe55l0SLG/988brlLv1i8z3dubloLF+75ATRsqPBboUXsW6I9CPGE5rQgLfY0vQ==", + "dependencies": { + "@smithy/types": "^3.3.0", + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=16.0.0" + } + }, + "node_modules/@smithy/core/node_modules/@smithy/service-error-classification": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/@smithy/service-error-classification/-/service-error-classification-3.0.3.tgz", + "integrity": "sha512-Jn39sSl8cim/VlkLsUhRFq/dKDnRUFlfRkvhOJaUbLBXUsLRLNf9WaxDv/z9BjuQ3A6k/qE8af1lsqcwm7+DaQ==", + "dependencies": { + "@smithy/types": "^3.3.0" + }, + "engines": { + "node": ">=16.0.0" + } + }, + "node_modules/@smithy/core/node_modules/@smithy/shared-ini-file-loader": { + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/@smithy/shared-ini-file-loader/-/shared-ini-file-loader-3.1.3.tgz", + "integrity": "sha512-Z8Y3+08vgoDgl4HENqNnnzSISAaGrF2RoKupoC47u2wiMp+Z8P/8mDh1CL8+8ujfi2U5naNvopSBmP/BUj8b5w==", + "dependencies": { + "@smithy/types": "^3.3.0", + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=16.0.0" + } + }, + "node_modules/@smithy/core/node_modules/@smithy/smithy-client": { + "version": "3.1.5", + "resolved": "https://registry.npmjs.org/@smithy/smithy-client/-/smithy-client-3.1.5.tgz", + "integrity": "sha512-x9bL9Mx2CT2P1OiUlHM+ZNpbVU6TgT32f9CmTRzqIHA7M4vYrROCWEoC3o4xHNJASoGd4Opos3cXYPgh+/m4Ww==", + "dependencies": { + "@smithy/middleware-endpoint": "^3.0.4", + "@smithy/middleware-stack": "^3.0.3", + "@smithy/protocol-http": "^4.0.3", + "@smithy/types": "^3.3.0", + "@smithy/util-stream": "^3.0.5", + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=16.0.0" + } + }, + "node_modules/@smithy/core/node_modules/@smithy/types": { + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/@smithy/types/-/types-3.3.0.tgz", + "integrity": "sha512-IxvBBCTFDHbVoK7zIxqA1ZOdc4QfM5HM7rGleCuHi7L1wnKv5Pn69xXJQ9hgxH60ZVygH9/JG0jRgtUncE3QUA==", + "dependencies": { + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=16.0.0" + } + }, + "node_modules/@smithy/core/node_modules/@smithy/url-parser": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/@smithy/url-parser/-/url-parser-3.0.3.tgz", + "integrity": "sha512-pw3VtZtX2rg+s6HMs6/+u9+hu6oY6U7IohGhVNnjbgKy86wcIsSZwgHrFR+t67Uyxvp4Xz3p3kGXXIpTNisq8A==", + "dependencies": { + "@smithy/querystring-parser": "^3.0.3", + "@smithy/types": "^3.3.0", + "tslib": "^2.6.2" + } + }, + "node_modules/@smithy/core/node_modules/@smithy/util-base64": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/@smithy/util-base64/-/util-base64-3.0.0.tgz", + "integrity": "sha512-Kxvoh5Qtt0CDsfajiZOCpJxgtPHXOKwmM+Zy4waD43UoEMA+qPxxa98aE/7ZhdnBFZFXMOiBR5xbcaMhLtznQQ==", + "dependencies": { + "@smithy/util-buffer-from": "^3.0.0", + "@smithy/util-utf8": "^3.0.0", + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=16.0.0" + } + }, + "node_modules/@smithy/core/node_modules/@smithy/util-buffer-from": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/@smithy/util-buffer-from/-/util-buffer-from-3.0.0.tgz", + "integrity": "sha512-aEOHCgq5RWFbP+UDPvPot26EJHjOC+bRgse5A8V3FSShqd5E5UN4qc7zkwsvJPPAVsf73QwYcHN1/gt/rtLwQA==", + "dependencies": { + "@smithy/is-array-buffer": "^3.0.0", + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=16.0.0" + } + }, + "node_modules/@smithy/core/node_modules/@smithy/util-hex-encoding": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/@smithy/util-hex-encoding/-/util-hex-encoding-3.0.0.tgz", + "integrity": "sha512-eFndh1WEK5YMUYvy3lPlVmYY/fZcQE1D8oSf41Id2vCeIkKJXPcYDCZD+4+xViI6b1XSd7tE+s5AmXzz5ilabQ==", + "dependencies": { + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=16.0.0" + } + }, + "node_modules/@smithy/core/node_modules/@smithy/util-middleware": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/@smithy/util-middleware/-/util-middleware-3.0.3.tgz", + "integrity": "sha512-l+StyYYK/eO3DlVPbU+4Bi06Jjal+PFLSMmlWM1BEwyLxZ3aKkf1ROnoIakfaA7mC6uw3ny7JBkau4Yc+5zfWw==", + "dependencies": { + "@smithy/types": "^3.3.0", + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=16.0.0" + } + }, + "node_modules/@smithy/core/node_modules/@smithy/util-retry": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/@smithy/util-retry/-/util-retry-3.0.3.tgz", + "integrity": "sha512-AFw+hjpbtVApzpNDhbjNG5NA3kyoMs7vx0gsgmlJF4s+yz1Zlepde7J58zpIRIsdjc+emhpAITxA88qLkPF26w==", + "dependencies": { + "@smithy/service-error-classification": "^3.0.3", + "@smithy/types": "^3.3.0", + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=16.0.0" + } + }, + "node_modules/@smithy/core/node_modules/@smithy/util-stream": { + "version": "3.0.5", + "resolved": "https://registry.npmjs.org/@smithy/util-stream/-/util-stream-3.0.5.tgz", + "integrity": "sha512-xC3L5PKMAT/Bh8fmHNXP9sdQ4+4aKVUU3EEJ2CF/lLk7R+wtMJM+v/1B4en7jO++Wa5spGzFDBCl0QxgbUc5Ug==", + "dependencies": { + "@smithy/fetch-http-handler": "^3.2.0", + "@smithy/node-http-handler": "^3.1.1", + "@smithy/types": "^3.3.0", + "@smithy/util-base64": "^3.0.0", + "@smithy/util-buffer-from": "^3.0.0", + "@smithy/util-hex-encoding": "^3.0.0", + "@smithy/util-utf8": "^3.0.0", + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=16.0.0" + } + }, + "node_modules/@smithy/core/node_modules/@smithy/util-uri-escape": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/@smithy/util-uri-escape/-/util-uri-escape-3.0.0.tgz", + "integrity": "sha512-LqR7qYLgZTD7nWLBecUi4aqolw8Mhza9ArpNEQ881MJJIU2sE5iHCK6TdyqqzcDLy0OPe10IY4T8ctVdtynubg==", + "dependencies": { + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=16.0.0" + } + }, + "node_modules/@smithy/core/node_modules/@smithy/util-utf8": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/@smithy/util-utf8/-/util-utf8-3.0.0.tgz", + "integrity": "sha512-rUeT12bxFnplYDe815GXbq/oixEGHfRFFtcTF3YdDi/JaENIM6aSYYLJydG83UNzLXeRI5K8abYd/8Sp/QM0kA==", + "dependencies": { + "@smithy/util-buffer-from": "^3.0.0", + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=16.0.0" + } + }, "node_modules/@smithy/credential-provider-imds": { "version": "2.1.4", "resolved": "https://registry.npmjs.org/@smithy/credential-provider-imds/-/credential-provider-imds-2.1.4.tgz", @@ -8853,8 +10615,7 @@ "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==", - "dev": true + "integrity": "sha512-AlcaJBi/pqqJBIQ8U9Mcpc9i8Aqxn88Skv5d+xBX006BY5u8N3mGLHa5Lgppa7L/HfwgwLgZ6NYs+Ag6uUmJRA==" }, "node_modules/brace-expansion": { "version": "1.1.11", @@ -8867,12 +10628,12 @@ } }, "node_modules/braces": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.2.tgz", - "integrity": "sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==", + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.3.tgz", + "integrity": "sha512-yQbXgO/OSZVD2IsiLlro+7Hf6Q18EJrKSEsdoMzKePKXct3gvD8oLcOQdIzGupr5Fj+EDe8gO/lxc1BzfMpxvA==", "dev": true, "dependencies": { - "fill-range": "^7.0.1" + "fill-range": "^7.1.1" }, "engines": { "node": ">=8" @@ -10409,20 +12170,36 @@ } }, "node_modules/es5-ext": { - "version": "0.10.62", - "resolved": "https://registry.npmjs.org/es5-ext/-/es5-ext-0.10.62.tgz", - "integrity": "sha512-BHLqn0klhEpnOKSrzn/Xsz2UIW8j+cGmo9JLzr8BiUapV8hPL9+FliFqjwr9ngW7jWdnxv6eO+/LqyhJVqgrjA==", + "version": "0.10.64", + "resolved": "https://registry.npmjs.org/es5-ext/-/es5-ext-0.10.64.tgz", + "integrity": "sha512-p2snDhiLaXe6dahss1LddxqEm+SkuDvV8dnIQG0MWjyHpcMNfXKPE+/Cc0y+PhxJX3A4xGNeFCj5oc0BUh6deg==", "dev": true, "hasInstallScript": true, "dependencies": { "es6-iterator": "^2.0.3", "es6-symbol": "^3.1.3", + "esniff": "^2.0.1", "next-tick": "^1.1.0" }, "engines": { "node": ">=0.10" } }, + "node_modules/es5-ext/node_modules/esniff": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/esniff/-/esniff-2.0.1.tgz", + "integrity": "sha512-kTUIGKQ/mDPFoJ0oVfcmyJn4iBDRptjNVIzwIFR7tqWXdVI9xfA2RMwY/gbSpJG3lkdWNEjLap/NqVHZiJsdfg==", + "dev": true, + "dependencies": { + "d": "^1.0.1", + "es5-ext": "^0.10.62", + "event-emitter": "^0.3.5", + "type": "^2.7.2" + }, + "engines": { + "node": ">=0.10" + } + }, "node_modules/es6-iterator": { "version": "2.0.3", "resolved": "https://registry.npmjs.org/es6-iterator/-/es6-iterator-2.0.3.tgz", @@ -11253,7 +13030,6 @@ "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==", - "dev": true, "funding": [ { "type": "paypal", @@ -11435,9 +13211,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==", + "version": "7.1.1", + "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.1.1.tgz", + "integrity": "sha512-YsGpe3WHLK8ZYi4tWDg2Jy3ebRz2rXowDxnld4bkQB00cc/1Zw9AWnC0i9ztDJitivtQvaI9KaLyKrc+hBW0yg==", "dev": true, "dependencies": { "to-regex-range": "^5.0.1" @@ -16564,8 +18340,7 @@ "node_modules/strnum": { "version": "1.0.5", "resolved": "https://registry.npmjs.org/strnum/-/strnum-1.0.5.tgz", - "integrity": "sha512-J8bbNyKKXl5qYcR36TIO8W3mVGVHrmmxsd5PAItGkmyzwJvybiw2IVq5nqd0i4LSNSkB/sx9VHllbfFdr9k1JA==", - "dev": true + "integrity": "sha512-J8bbNyKKXl5qYcR36TIO8W3mVGVHrmmxsd5PAItGkmyzwJvybiw2IVq5nqd0i4LSNSkB/sx9VHllbfFdr9k1JA==" }, "node_modules/strong-log-transformer": { "version": "2.1.0", @@ -16649,9 +18424,9 @@ } }, "node_modules/tar": { - "version": "6.2.0", - "resolved": "https://registry.npmjs.org/tar/-/tar-6.2.0.tgz", - "integrity": "sha512-/Wo7DcT0u5HUV486xg675HtjNd3BXZ6xDbzsCUZPt5iw8bTQ63bP0Raut3mvro9u+CUyq7YQd8Cx55fsZXxqLQ==", + "version": "6.2.1", + "resolved": "https://registry.npmjs.org/tar/-/tar-6.2.1.tgz", + "integrity": "sha512-DZ4yORTwrbTj/7MZYq2w+/ZFdI6OZ/f9SFHR+71gIVUZhOQPHzVCLpvRnPgyaMpfWxxk/4ONva3GQSyNIKRv6A==", "dev": true, "dependencies": { "chownr": "^2.0.0", @@ -16964,8 +18739,7 @@ "node_modules/tslib": { "version": "2.6.2", "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.6.2.tgz", - "integrity": "sha512-AEYxH93jGFPn/a2iVAwW87VuUIkR1FVUKB77NwMF7nBTDkDrrT/Hpt/IrCJ0QXhW27jTBDcf5ZY7w6RiqTMw2Q==", - "dev": true + "integrity": "sha512-AEYxH93jGFPn/a2iVAwW87VuUIkR1FVUKB77NwMF7nBTDkDrrT/Hpt/IrCJ0QXhW27jTBDcf5ZY7w6RiqTMw2Q==" }, "node_modules/type": { "version": "2.7.2", @@ -17294,7 +19068,6 @@ "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" @@ -18055,9 +19828,9 @@ } }, "node_modules/ws": { - "version": "7.5.9", - "resolved": "https://registry.npmjs.org/ws/-/ws-7.5.9.tgz", - "integrity": "sha512-F+P9Jil7UiSKSkppIiD94dN07AwvFixvLIj1Og1Rl9GGMuNipJnV9JzjD6XuqmAeiswGvUmNLjr5cFuXwNS77Q==", + "version": "7.5.10", + "resolved": "https://registry.npmjs.org/ws/-/ws-7.5.10.tgz", + "integrity": "sha512-+dbF1tHwZpXcbOJdVOkzLDxZP1ailvSxM6ZweXTegylPny803bFhA+vqBYw4s31NSAk4S2Qz+AKXK9a4wkdjcQ==", "dev": true, "engines": { "node": ">=8.3.0" diff --git a/package.json b/package.json index 0aaec8ba..24052a42 100644 --- a/package.json +++ b/package.json @@ -13,6 +13,9 @@ "check-types:all": "nx run-many -t check-types", "prepare": "[ -d .git ] && git config core.hooksPath '.git-hooks' || true" }, + "dependencies": { + "@aws-sdk/client-sns": "^3.606.0" + }, "devDependencies": { "@aligent/serverless-conventions": "latest", "@nx/devkit": "^17.1.3", From 3a8096d0efa8e63f80650e76c8ba7c515c022a5a Mon Sep 17 00:00:00 2001 From: Kai Nguyen Date: Mon, 1 Jul 2024 15:30:10 +1000 Subject: [PATCH 4/6] MICRO-53: Update generator to support notification service --- .../src/generators/service/generator.spec.ts | 22 ++- .../src/generators/service/generator.ts | 37 +++-- .../service/notification-files/README.md | 149 ++++++++++++++++++ .../src/generators/service/schema.d.ts | 1 + .../src/generators/service/schema.json | 11 +- 5 files changed, 203 insertions(+), 17 deletions(-) create mode 100644 tools/serverless-plugin/src/generators/service/notification-files/README.md diff --git a/tools/serverless-plugin/src/generators/service/generator.spec.ts b/tools/serverless-plugin/src/generators/service/generator.spec.ts index bfb7317e..679e8aea 100644 --- a/tools/serverless-plugin/src/generators/service/generator.spec.ts +++ b/tools/serverless-plugin/src/generators/service/generator.spec.ts @@ -6,15 +6,31 @@ import { serviceGeneratorSchema } from './schema'; describe('service generator', () => { let tree: Tree; - const options: serviceGeneratorSchema = { brand: 'test', name: 'test' }; - beforeEach(() => { tree = createTreeWithEmptyWorkspace(); }); - it('should run successfully', async () => { + it('should run successfully when type is general', async () => { + const options: serviceGeneratorSchema = { + brand: 'test', + name: 'test', + type: 'general', + }; + await serviceGenerator(tree, options); + const config = readProjectConfiguration(tree, 'test'); + expect(config).toBeDefined(); + expect(config.tags).toEqual(['service', 'general', 'test']); + }); + + it('should run successfully when type is notification', async () => { + const options: serviceGeneratorSchema = { + brand: 'test', + name: 'test', + type: 'notification', + }; await serviceGenerator(tree, options); const config = readProjectConfiguration(tree, 'test'); expect(config).toBeDefined(); + expect(config.tags).toEqual(['service', 'notification', 'test']); }); }); diff --git a/tools/serverless-plugin/src/generators/service/generator.ts b/tools/serverless-plugin/src/generators/service/generator.ts index 12d26fc0..70c38d30 100644 --- a/tools/serverless-plugin/src/generators/service/generator.ts +++ b/tools/serverless-plugin/src/generators/service/generator.ts @@ -7,7 +7,7 @@ import { import * as path from 'path'; import { serviceGeneratorSchema } from './schema'; -const buildRunCommandConfig = (dir: string, command: string) => ({ +const buildRunCommandConfig = (command: string, dir = '{projectRoot}') => ({ executor: 'nx:run-commands', options: { cwd: dir, @@ -16,32 +16,39 @@ const buildRunCommandConfig = (dir: string, command: string) => ({ }, }); +const getTemplateFilesLocation = ( + type: serviceGeneratorSchema['type'] = 'general' +) => { + if (type === 'notification') { + return path.join(__dirname, 'notification-files'); + } + + return path.join(__dirname, 'general-files'); +}; + export async function serviceGenerator( tree: Tree, options: serviceGeneratorSchema ) { - const projectRoot = `services/${options.name}`; - addProjectConfiguration(tree, options.name, { + const { name, type } = options; + const projectRoot = `services/${name}`; + + addProjectConfiguration(tree, name, { root: projectRoot, projectType: 'application', sourceRoot: `${projectRoot}/src`, targets: { build: { - ...buildRunCommandConfig(projectRoot, 'sls package'), + ...buildRunCommandConfig('sls package'), }, deploy: { - ...buildRunCommandConfig(projectRoot, 'sls deploy'), + ...buildRunCommandConfig('sls deploy'), }, remove: { - ...buildRunCommandConfig(projectRoot, 'sls remove'), + ...buildRunCommandConfig('sls remove'), }, 'check-types': { - 'executor': 'nx:run-commands', - 'options': { - 'cwd': '{projectRoot}', - 'color': true, - 'command': 'tsc --noEmit --pretty' - } + ...buildRunCommandConfig('tsc --noEmit --pretty'), }, lint: { executor: '@nx/linter:eslint', @@ -60,8 +67,12 @@ export async function serviceGenerator( }, }, }, + tags: ['service', type, name], }); - generateFiles(tree, path.join(__dirname, 'files'), projectRoot, options); + + const templateFilesLocation = getTemplateFilesLocation(type); + + generateFiles(tree, templateFilesLocation, projectRoot, options); await formatFiles(tree); } diff --git a/tools/serverless-plugin/src/generators/service/notification-files/README.md b/tools/serverless-plugin/src/generators/service/notification-files/README.md new file mode 100644 index 00000000..3f7222d1 --- /dev/null +++ b/tools/serverless-plugin/src/generators/service/notification-files/README.md @@ -0,0 +1,149 @@ +# <%= name %> + +This is a serverless notification system built using AWS Lambda and Amazon SNS. It allows you to send notifications to various channels such as email, Slack or even mobile push notification. + +## Architecture + +![Architecture Diagram](docs/architecture-diagram.svg) + +The system consists of the following components: + +1. AWS Lambda: A Lambda function is responsible for processing the notification requests and publishing messages to an SNS topic. +2. Amazon SNS: An SNS topic is used to distribute the notification messages to different channels (email, SMS, mobile push, etc.) based on subscriptions. +3. Subscribers: Various services or applications can subscribe to the SNS topic to receive notifications. For example, an email service can subscribe to receive email notifications, and `AWS Chatbot` service can subscribe to receive notifications and forward to Slack. + +## Setup + +- This service exports a Lambda Arn named as the endpoint for receiving notification. Other services can import it by: `!ImportValue: ErrorNotificationLambdaFunction-${self:provider.stage}` +- Since other services depends on this service exported value, we will need to tell Nx about this dependency by adding `implicitDependencies` & ``dependsOn` to the service `project.json` like so: + +```json +{ + "name": "service-name", + "implicitDependencies": ["notification"], // For `nx graph` only + "targets": { + "build": { + "executor": "nx:run-commands", + "options": { + "cwd": "services/service-name", + "color": true, + "command": "sls package" + }, + "dependsOn": [{ "projects": ["notification"], "target": "build", "params": "forward" }] + }, + "deploy": { + "executor": "nx:run-commands", + "options": { + "cwd": "services/service-name", + "color": true, + "command": "sls deploy" + }, + "dependsOn": [{ "projects": ["notification"], "target": "deploy", "params": "forward" }] + } + } +} +``` + +## Usage + +This service accepts events in the following format (similar to CloudWatch Event events): + +```json +{ + "id": "00acdcb8-8864-405f-af3d-51a6bfb2d151", + "detail-type": "Lambda Execution Failed", + "source": "aws.lambda", + "time": "2024-06-24T04:42:33.884Z", + "region": "ap-southeast-2", + "resources": ["arn:aws:lambda:ap-southeast-2:XXXXXXXXXX:function:tt-int-shippit-order-dev-lambdaName"], + "detail": { + "executionArn": "arn:aws:lambda:ap-southeast-2:XXXXXXXXXX:function:tt-int-shippit-order-dev-lambdaName", + "logGroupName": "/aws/lambda/tt-int-shippit-order-dev-lambdaName", + "name": "tt-int-shippit-order-dev-lambdaName", + "status": "FAILED", + "error": "SyntaxError", + "cause": "{\"errorType\":\"SyntaxError\",\"errorMessage\":\"Unexpected token u in JSON at position 0\",\"trace\":\"SyntaxError: Unexpected token u in JSON at position 0\\n at JSON.parse ()\\n at Runtime.V1 (/src/lambda/create-shippit-order.ts:39:34)\\n at Runtime.handleOnceNonStreaming (file:///var/runtime/index.mjs:1173:29)\"}" + } +} +``` + +The Lambda function will process the payload, format the notification message, and publish it to the SNS topic. The subscribed services will then receive the notification and handle it accordingly. + +### Working with StepFunction + +The `serverless-step-functions` plugin supports CloudWatch Event notifications. Therefore, we only need to add the following `notifications` configure: + +```yaml +stepFunctions: + validate: true + stateMachines: + stateMachineName: + name: ${self:service}-${self:provider.stage}-stateMachineName + notifications: + ABORTED: + - lambda: arn:aws:lambda:${aws:region}:${aws:accountId}:function:tt-int-notification-${self:provider.stage}-notifyError + FAILED: + - lambda: arn:aws:lambda:${aws:region}:${aws:accountId}:function:tt-int-notification-${self:provider.stage}-notifyError + TIMED_OUT: + - lambda: arn:aws:lambda:${aws:region}:${aws:accountId}:function:tt-int-notification-${self:provider.stage}-notifyError +``` + +**_Note_**: It's unfortunate that `serverless-step-functions` does not support `!ImportValue`. Therefore, we have to manually build the notification arn. + +### Working with Lambda + +To send message to this notification service, we need to invoke the exported Lambda endpoint by [AWS SDK](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/lambda/command/InvokeCommand/). + +For that reason, we need to update the `serverless.yml` file to include necessary permissions like so: + +```yaml +provider: + iam: + role: + statements: + - Effect: Allow + Action: + - lambda:InvokeFunction + Resource: !ImportValue ErrorNotificationLambdaFunction-${self:provider.stage} + environment: + ERROR_NOTIFICATION_LAMBDA_ARN: !ImportValue ErrorNotificationLambdaFunction-${self:provider.stage} +``` + +Below is an example of how this service can be invoked: + +```typescript +async notifyError(error: Error, context: Context) { + const payload = { + id: context.awsRequestId, + 'detail-type': 'Lambda Execution Failed', + source: 'aws.lambda', + time: new Date().toISOString(), + region: context.invokedFunctionArn.split(':')[3] as string, + resources: [context.invokedFunctionArn], + detail: { + executionArn: context.invokedFunctionArn, + logGroupName: context.logGroupName, + name: context.functionName, + status: 'FAILED', + error: error.name, + cause: JSON.stringify({ + errorType: error.name, + errorMessage: error.message, + trace: error.stack, + }), + }, + }; + + const input: InvokeCommandInput = { + FunctionName: process.env.ERROR_NOTIFICATION_LAMBDA_ARN, + InvocationType: 'Event', + Payload: payload, + }; + + const response = await this.client.send(new InvokeCommand(input)); + + console.log('Error notification sent:', JSON.stringify(response)); + + return response; + } +``` diff --git a/tools/serverless-plugin/src/generators/service/schema.d.ts b/tools/serverless-plugin/src/generators/service/schema.d.ts index 2b747ca0..18bf6a76 100644 --- a/tools/serverless-plugin/src/generators/service/schema.d.ts +++ b/tools/serverless-plugin/src/generators/service/schema.d.ts @@ -2,4 +2,5 @@ export interface serviceGeneratorSchema { brand: string; name: string; + type: 'general' | 'notification'; } diff --git a/tools/serverless-plugin/src/generators/service/schema.json b/tools/serverless-plugin/src/generators/service/schema.json index 6e04de46..b1a92329 100644 --- a/tools/serverless-plugin/src/generators/service/schema.json +++ b/tools/serverless-plugin/src/generators/service/schema.json @@ -16,7 +16,16 @@ "index": 0 }, "x-prompt": "What would you like to call the service?" + }, + "type": { + "type": "string", + "description": "Service type", + "default": "general", + "$default": { + "$source": "argv", + "index": 1 + } } }, - "required": ["brand", "name"] + "required": [ "brand", "name" ] } From 592dce73aae2a50501807cb2d22c073ac01dce94 Mon Sep 17 00:00:00 2001 From: Kai Nguyen Date: Mon, 1 Jul 2024 15:53:30 +1000 Subject: [PATCH 5/6] MICRO-53: Update ReadMe --- README.md | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 8321d868..4c3ecb47 100644 --- a/README.md +++ b/README.md @@ -20,11 +20,21 @@ Services are generated by our `@aligent/serverless-plugin`. It supports generati #### Service generator (for generating new service) -`npx nx g service ` +- To generate a service, use the command: + + ```bash + npx nx g service + # The command above is equivalent to 'npx nx g service general' + ``` + +- To generate a `notification` service, use the command: + ```bash + npx nx g service notification + ``` #### Service executors -Our service executors are `lint`, `test`, `build`, `deploy` and `remove`. Executor can be executed using the command in the format: +Our service executors are `lint`, `test`, `check-types`, `build`, `deploy` and `remove`. Executor can be executed using the command in the format: `npx nx run : -- --` or `npx nx -- --` @@ -45,6 +55,7 @@ Libraries are generated by `@nx/js` plugin. For more information, check out thei `npx nx g library ` Shared library will need to have the `check-types` command added manually to ensure proper type checking. This is because the the `@nx/js` plugin does not add it by default. + ```json "check-types": { "executor": "nx:run-commands", @@ -86,5 +97,5 @@ Below are some example of general Nx. commands. For more information, check out - [ ] Bespoke library generator -> use same base vite configuration if we do this. - [ ] Develop workspace [preset](https://nx.dev/extending-nx/recipes/create-preset) - [x] Pre-commit hooks -- [ ] Add error notification service +- [x] Add error notification service - [ ] Add step function metric configuration From 3829d1719931db5b12332e804cb3b167eba03647 Mon Sep 17 00:00:00 2001 From: Kai Nguyen Date: Mon, 1 Jul 2024 15:59:56 +1000 Subject: [PATCH 6/6] MICRO-53: Few minor format and fix up --- .../notification-files/src/utils/aws-formatting.ts.template | 2 +- .../service/notification-files/src/utils/aws-sns.ts.template | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/tools/serverless-plugin/src/generators/service/notification-files/src/utils/aws-formatting.ts.template b/tools/serverless-plugin/src/generators/service/notification-files/src/utils/aws-formatting.ts.template index 36ceff02..77ab062a 100644 --- a/tools/serverless-plugin/src/generators/service/notification-files/src/utils/aws-formatting.ts.template +++ b/tools/serverless-plugin/src/generators/service/notification-files/src/utils/aws-formatting.ts.template @@ -22,7 +22,7 @@ export function extractNameFromExecutionArn(arn: string) { /** * Extracts the name from a resource name string. * It assumes our resource name is in the correct format - * Eg: tt-int-shippit-order-dev-createShippitOrder + * Eg: brand-int-service-name-stage-resourceName * * @param {string} resourceName - The resource name string. * @returns {string} The extracted name from the resource name. diff --git a/tools/serverless-plugin/src/generators/service/notification-files/src/utils/aws-sns.ts.template b/tools/serverless-plugin/src/generators/service/notification-files/src/utils/aws-sns.ts.template index ae8e964d..522ff518 100644 --- a/tools/serverless-plugin/src/generators/service/notification-files/src/utils/aws-sns.ts.template +++ b/tools/serverless-plugin/src/generators/service/notification-files/src/utils/aws-sns.ts.template @@ -1,3 +1,4 @@ +/* v8 ignore start */ import { PublishCommand, PublishCommandInput,