From 50444672b9bd105a69f262f95e0ec9ef2c9429fa Mon Sep 17 00:00:00 2001 From: Blair Huang Date: Wed, 4 Dec 2024 12:56:57 -0800 Subject: [PATCH] Use CDK for ecs sample app setup (#77) *Issue #, if available:* *Description of changes:* We use CDK to replace the bash script to set up the ECS sample app. In addition, the following changes are made: 1. Create a separate VPC for hosting the sample app to improve network isolation. 2. Place ECS services into a private subnet with egress. 3. Place RDS database into a private isolated subnet and use Secrets Manager to manage the access to the database. 4. Modify the cloudwatch agent config to replace the Dependencies with proper service names. 5. Use private ECR instead of public ECR to obtain images (README is updated accordingly). 6. Fix issues caused by regions not being specified in customers and visits services. By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice. --- README.md | 9 +- cdk/ecs/.gitignore | 8 + cdk/ecs/.npmignore | 6 + cdk/ecs/.prettierignore | 3 + cdk/ecs/cdk.json | 75 + cdk/ecs/ecs-cdk.sh | 56 + cdk/ecs/jest.config.js | 8 + cdk/ecs/lib/app.ts | 73 + cdk/ecs/lib/stacks/databaseStack.ts | 84 + cdk/ecs/lib/stacks/ecsStack.ts | 770 +++ cdk/ecs/lib/stacks/iamRolesStack.ts | 57 + cdk/ecs/lib/stacks/loadbalancerStack.ts | 67 + cdk/ecs/lib/stacks/logStack.ts | 16 + cdk/ecs/lib/stacks/petClinicNetworkStack.ts | 110 + cdk/ecs/lib/stacks/servicediscoveryStack.ts | 37 + cdk/ecs/lib/utils.ts | 30 + cdk/ecs/package-lock.json | 4151 +++++++++++++++++ cdk/ecs/package.json | 26 + cdk/ecs/tsconfig.json | 23 + .../spring-petclinic-admin-server.json | 53 - .../spring-petclinic-api-gateway.json | 143 - .../spring-petclinic-billing-service.json | 170 - .../spring-petclinic-config-server.json | 41 - .../spring-petclinic-customers-service.json | 147 - .../spring-petclinic-discovery-server.json | 45 - .../spring-petclinic-insurance-service.json | 180 - .../spring-petclinic-vets-service.json | 143 - .../spring-petclinic-visits-service.json | 143 - .../task-definitions/traffic-generator.json | 57 - scripts/ecs/appsignals/setup-ecs-demo.sh | 676 +-- scripts/ecs/appsignals/trust-policy.json | 13 - .../customers/aws/BedrockAgentV1Service.java | 4 +- .../aws/BedrockRuntimeV1Service.java | 4 +- .../customers/aws/BedrockV1Service.java | 4 +- .../customers/aws/KinesisService.java | 8 +- .../petclinic/customers/aws/SqsService.java | 8 +- .../petclinic/visits/aws/DdbService.java | 9 +- 37 files changed, 5660 insertions(+), 1797 deletions(-) create mode 100644 cdk/ecs/.gitignore create mode 100644 cdk/ecs/.npmignore create mode 100644 cdk/ecs/.prettierignore create mode 100644 cdk/ecs/cdk.json create mode 100755 cdk/ecs/ecs-cdk.sh create mode 100644 cdk/ecs/jest.config.js create mode 100644 cdk/ecs/lib/app.ts create mode 100644 cdk/ecs/lib/stacks/databaseStack.ts create mode 100644 cdk/ecs/lib/stacks/ecsStack.ts create mode 100644 cdk/ecs/lib/stacks/iamRolesStack.ts create mode 100644 cdk/ecs/lib/stacks/loadbalancerStack.ts create mode 100644 cdk/ecs/lib/stacks/logStack.ts create mode 100644 cdk/ecs/lib/stacks/petClinicNetworkStack.ts create mode 100644 cdk/ecs/lib/stacks/servicediscoveryStack.ts create mode 100644 cdk/ecs/lib/utils.ts create mode 100644 cdk/ecs/package-lock.json create mode 100644 cdk/ecs/package.json create mode 100644 cdk/ecs/tsconfig.json delete mode 100644 scripts/ecs/appsignals/sample-app/task-definitions/spring-petclinic-admin-server.json delete mode 100644 scripts/ecs/appsignals/sample-app/task-definitions/spring-petclinic-api-gateway.json delete mode 100644 scripts/ecs/appsignals/sample-app/task-definitions/spring-petclinic-billing-service.json delete mode 100644 scripts/ecs/appsignals/sample-app/task-definitions/spring-petclinic-config-server.json delete mode 100644 scripts/ecs/appsignals/sample-app/task-definitions/spring-petclinic-customers-service.json delete mode 100644 scripts/ecs/appsignals/sample-app/task-definitions/spring-petclinic-discovery-server.json delete mode 100644 scripts/ecs/appsignals/sample-app/task-definitions/spring-petclinic-insurance-service.json delete mode 100644 scripts/ecs/appsignals/sample-app/task-definitions/spring-petclinic-vets-service.json delete mode 100644 scripts/ecs/appsignals/sample-app/task-definitions/spring-petclinic-visits-service.json delete mode 100644 scripts/ecs/appsignals/sample-app/task-definitions/traffic-generator.json delete mode 100644 scripts/ecs/appsignals/trust-policy.json diff --git a/README.md b/README.md index 01c5d45..a374b1e 100644 --- a/README.md +++ b/README.md @@ -182,10 +182,13 @@ The following instructions set up an kubernetes cluster on 2 EC2 instances (one # ECS Demo The following instructions set up an ECS cluster with all services running in Fargate. You can run these steps in your personal AWS account to follow along (Not recommended for production usage). -1. Build container images and push them to public ECR repo - +1. Build container images and push them to private ECR repo. Replace `region-name` with the region you choose. + ```shell + export ACCOUNT=`aws sts get-caller-identity | jq .Account -r` + export REGION=region-name + ``` ``` shell - ./mvnw clean install -P buildDocker && ./push-public-ecr.sh + ./mvnw clean install -P buildDocker && ./push-ecr.sh ``` 2. Set up a ECS cluster and deploy sample app. Replace `region-name` with the region you choose. diff --git a/cdk/ecs/.gitignore b/cdk/ecs/.gitignore new file mode 100644 index 0000000..f60797b --- /dev/null +++ b/cdk/ecs/.gitignore @@ -0,0 +1,8 @@ +*.js +!jest.config.js +*.d.ts +node_modules + +# CDK asset staging directory +.cdk.staging +cdk.out diff --git a/cdk/ecs/.npmignore b/cdk/ecs/.npmignore new file mode 100644 index 0000000..c1d6d45 --- /dev/null +++ b/cdk/ecs/.npmignore @@ -0,0 +1,6 @@ +*.ts +!*.d.ts + +# CDK asset staging directory +.cdk.staging +cdk.out diff --git a/cdk/ecs/.prettierignore b/cdk/ecs/.prettierignore new file mode 100644 index 0000000..1b8ac88 --- /dev/null +++ b/cdk/ecs/.prettierignore @@ -0,0 +1,3 @@ +# Ignore artifacts: +build +coverage diff --git a/cdk/ecs/cdk.json b/cdk/ecs/cdk.json new file mode 100644 index 0000000..851eb9a --- /dev/null +++ b/cdk/ecs/cdk.json @@ -0,0 +1,75 @@ +{ + "app": "npx ts-node --prefer-ts-exts lib/app.ts", + "watch": { + "include": ["**"], + "exclude": [ + "README.md", + "cdk*.json", + "**/*.d.ts", + "**/*.js", + "tsconfig.json", + "package*.json", + "yarn.lock", + "node_modules", + "test" + ] + }, + "context": { + "@aws-cdk/aws-lambda:recognizeLayerVersion": true, + "@aws-cdk/core:checkSecretUsage": true, + "@aws-cdk/core:target-partitions": ["aws", "aws-cn"], + "@aws-cdk-containers/ecs-service-extensions:enableDefaultLogDriver": true, + "@aws-cdk/aws-ec2:uniqueImdsv2TemplateName": true, + "@aws-cdk/aws-ecs:arnFormatIncludesClusterName": true, + "@aws-cdk/aws-iam:minimizePolicies": true, + "@aws-cdk/core:validateSnapshotRemovalPolicy": true, + "@aws-cdk/aws-codepipeline:crossAccountKeyAliasStackSafeResourceName": true, + "@aws-cdk/aws-s3:createDefaultLoggingPolicy": true, + "@aws-cdk/aws-sns-subscriptions:restrictSqsDescryption": true, + "@aws-cdk/aws-apigateway:disableCloudWatchRole": true, + "@aws-cdk/core:enablePartitionLiterals": true, + "@aws-cdk/aws-events:eventsTargetQueueSameAccount": true, + "@aws-cdk/aws-ecs:disableExplicitDeploymentControllerForCircuitBreaker": true, + "@aws-cdk/aws-iam:importedRoleStackSafeDefaultPolicyName": true, + "@aws-cdk/aws-s3:serverAccessLogsUseBucketPolicy": true, + "@aws-cdk/aws-route53-patters:useCertificate": true, + "@aws-cdk/customresources:installLatestAwsSdkDefault": false, + "@aws-cdk/aws-rds:databaseProxyUniqueResourceName": true, + "@aws-cdk/aws-codedeploy:removeAlarmsFromDeploymentGroup": true, + "@aws-cdk/aws-apigateway:authorizerChangeDeploymentLogicalId": true, + "@aws-cdk/aws-ec2:launchTemplateDefaultUserData": true, + "@aws-cdk/aws-secretsmanager:useAttachedSecretResourcePolicyForSecretTargetAttachments": true, + "@aws-cdk/aws-redshift:columnId": true, + "@aws-cdk/aws-stepfunctions-tasks:enableEmrServicePolicyV2": true, + "@aws-cdk/aws-ec2:restrictDefaultSecurityGroup": true, + "@aws-cdk/aws-apigateway:requestValidatorUniqueId": true, + "@aws-cdk/aws-kms:aliasNameRef": true, + "@aws-cdk/aws-autoscaling:generateLaunchTemplateInsteadOfLaunchConfig": true, + "@aws-cdk/core:includePrefixInUniqueNameGeneration": true, + "@aws-cdk/aws-efs:denyAnonymousAccess": true, + "@aws-cdk/aws-opensearchservice:enableOpensearchMultiAzWithStandby": true, + "@aws-cdk/aws-lambda-nodejs:useLatestRuntimeVersion": true, + "@aws-cdk/aws-efs:mountTargetOrderInsensitiveLogicalId": true, + "@aws-cdk/aws-rds:auroraClusterChangeScopeOfInstanceParameterGroupWithEachParameters": true, + "@aws-cdk/aws-appsync:useArnForSourceApiAssociationIdentifier": true, + "@aws-cdk/aws-rds:preventRenderingDeprecatedCredentials": true, + "@aws-cdk/aws-codepipeline-actions:useNewDefaultBranchForCodeCommitSource": true, + "@aws-cdk/aws-cloudwatch-actions:changeLambdaPermissionLogicalIdForLambdaAction": true, + "@aws-cdk/aws-codepipeline:crossAccountKeysDefaultValueToFalse": true, + "@aws-cdk/aws-codepipeline:defaultPipelineTypeToV2": true, + "@aws-cdk/aws-kms:reduceCrossAccountRegionPolicyScope": true, + "@aws-cdk/aws-eks:nodegroupNameAttribute": true, + "@aws-cdk/aws-ec2:ebsDefaultGp3Volume": true, + "@aws-cdk/aws-ecs:removeDefaultDeploymentAlarm": true, + "@aws-cdk/custom-resources:logApiResponseDataPropertyTrueDefault": false, + "@aws-cdk/aws-s3:keepNotificationInImportedBucket": false, + "@aws-cdk/aws-ecs:reduceEc2FargateCloudWatchPermissions": true, + "@aws-cdk/aws-dynamodb:resourcePolicyPerReplica": true, + "@aws-cdk/aws-ec2:ec2SumTImeoutEnabled": true, + "@aws-cdk/aws-appsync:appSyncGraphQLAPIScopeLambdaPermission": true, + "@aws-cdk/aws-rds:setCorrectValueForDatabaseInstanceReadReplicaInstanceResourceId": true, + "@aws-cdk/core:cfnIncludeRejectComplexResourceUpdateCreatePolicyIntrinsics": true, + "@aws-cdk/aws-lambda-nodejs:sdkV3ExcludeSmithyPackages": true, + "@aws-cdk/aws-stepfunctions-tasks:fixRunEcsTaskPolicy": true + } +} diff --git a/cdk/ecs/ecs-cdk.sh b/cdk/ecs/ecs-cdk.sh new file mode 100755 index 0000000..e9a3977 --- /dev/null +++ b/cdk/ecs/ecs-cdk.sh @@ -0,0 +1,56 @@ +#!/usr/bin/env bash + +# Script to synthesize, deploy, or destroy AWS CDK stacks with stack dependencies +# Usage: ./ecs-cdk.sh +# Example for deploy: ./ecs-cdk.sh deploy +# Example for destroy: ./ecs-cdk.sh destroy +# Example to only synth: ./ecs-cdk.sh synth + +ACTION=$1 + +# Check for action parameter +if [[ -z "$ACTION" ]]; then + echo "Usage: $0 " + echo "action can be 'synth', 'deploy', or 'destroy'" + exit 1 +fi + + +# Run CDK synth once for all stacks +if [[ "$ACTION" == "synth" || "$ACTION" == "deploy" ]]; then + echo "Running npm install" + npm install + + echo "Running CDK bootstrap" + cdk bootstrap + + rm -rf cdk.out + echo "Running CDK synth for all stacks..." + if cdk synth; then + echo "CDK synth successful!" + if [[ "$ACTION" == "synth" ]]; then + exit 0 + fi + else + echo "CDK synth failed. Exiting." + exit 1 + fi +fi + +# Deploy or destroy all stacks in the app +if [[ "$ACTION" == "deploy" ]]; then + echo "Starting CDK deployment for all stacks in the app" + if cdk deploy --all --require-approval never; then + echo "Deployment successful for all stacks in the app" + else + echo "Deployment failed. Attempting to clean up resources by destroying all stacks..." + cdk destroy --all --force --verbose + fi +elif [[ "$ACTION" == "destroy" ]]; then + echo "Starting CDK destroy for all stacks in the app" + cdk destroy --all --force --verbose + echo "Destroy complete for all stacks in the app" +else + echo "Invalid action: $ACTION. Please use 'synth', 'deploy', or 'destroy'." + exit 1 +fi diff --git a/cdk/ecs/jest.config.js b/cdk/ecs/jest.config.js new file mode 100644 index 0000000..f3465cb --- /dev/null +++ b/cdk/ecs/jest.config.js @@ -0,0 +1,8 @@ +module.exports = { + testEnvironment: 'node', + roots: ['/test'], + testMatch: ['**/*.test.ts'], + transform: { + '^.+\\.tsx?$': 'ts-jest', + }, +}; diff --git a/cdk/ecs/lib/app.ts b/cdk/ecs/lib/app.ts new file mode 100644 index 0000000..e450f31 --- /dev/null +++ b/cdk/ecs/lib/app.ts @@ -0,0 +1,73 @@ +import * as assert from 'assert'; +import { App } from 'aws-cdk-lib'; + +import { getLatestAdotJavaTag, getLatestAdotPythonTag } from './utils'; +import { EcsClusterStack } from './stacks/ecsStack'; +import { IamRolesStack } from './stacks/iamRolesStack'; +import { PetClinicNetworkStack } from './stacks/petClinicNetworkStack'; +import { ServiceDiscoveryStack } from './stacks/servicediscoveryStack'; +import { LogStack } from './stacks/logStack'; +import { LoadBalancerStack } from './stacks/loadbalancerStack'; +import { RdsDatabaseStack } from './stacks/databaseStack'; + +class ApplicationSignalsECSDemo { + private readonly app: App; + + constructor() { + this.app = new App(); + this.runApp(); + } + + public async runApp(): Promise { + const [adotJavaImageTag, adotPythonImageTag] = await Promise.all([ + getLatestAdotJavaTag(), + getLatestAdotPythonTag(), + ]); + + assert(adotJavaImageTag !== '', 'ADOT Java Image Tag is empty'); + assert(adotPythonImageTag !== '', 'ADOT Python Image Tag is empty'); + + const petClinicNetworkStack = new PetClinicNetworkStack(this.app, 'PetClinicNetworkStack'); + + const logStack = new LogStack(this.app, 'LogStack'); + + const loadbalancerStack = new LoadBalancerStack(this.app, 'LoadBalancerStack', { + vpc: petClinicNetworkStack.vpc, + securityGroup: petClinicNetworkStack.albSecurityGroup, + }); + + const rdsDatabaseStack = new RdsDatabaseStack(this.app, 'RdsDatabaseStack', { + vpc: petClinicNetworkStack.vpc, + rdsSecurityGroup: petClinicNetworkStack.rdsSecurityGroup, + }); + + const iamRolesStack = new IamRolesStack(this.app, 'IamRolesStack'); + + // Grant ecsTaskRole access to database + rdsDatabaseStack.dbSecret.grantRead(iamRolesStack.ecsTaskRole); + rdsDatabaseStack.dbSecret.grantWrite(iamRolesStack.ecsTaskRole); + + const serviceDiscoveryStack = new ServiceDiscoveryStack(this.app, 'ServiceDiscoveryStack', { + vpc: petClinicNetworkStack.vpc, + }); + + new EcsClusterStack(this.app, 'EcsClusterStack', { + vpc: petClinicNetworkStack.vpc, + securityGroups: [petClinicNetworkStack.ecsSecurityGroup], + ecsTaskRole: iamRolesStack.ecsTaskRole, + ecsTaskExecutionRole: iamRolesStack.ecsTaskExecutionRole, + serviceDiscoveryStack: serviceDiscoveryStack, + logStack: logStack, + adotPythonImageTag: adotPythonImageTag, + adotJavaImageTag: adotJavaImageTag, + dbSecret: rdsDatabaseStack.dbSecret, + dbInstanceEndpointAddress: rdsDatabaseStack.rdsInstance.dbInstanceEndpointAddress, + loadBalancerTargetGroup: loadbalancerStack.targetGroup, + loadBalancerDnsName: loadbalancerStack.loadBalancer.loadBalancerDnsName, + }); + + this.app.synth(); + } +} + +new ApplicationSignalsECSDemo(); diff --git a/cdk/ecs/lib/stacks/databaseStack.ts b/cdk/ecs/lib/stacks/databaseStack.ts new file mode 100644 index 0000000..b4377db --- /dev/null +++ b/cdk/ecs/lib/stacks/databaseStack.ts @@ -0,0 +1,84 @@ +import { Construct } from 'constructs'; +import { + DatabaseInstance, + SubnetGroup, + Credentials, + DatabaseInstanceEngine, + PostgresEngineVersion, + StorageType, +} from 'aws-cdk-lib/aws-rds'; +import { Secret } from 'aws-cdk-lib/aws-secretsmanager'; +import { StackProps, Stack, CfnOutput, Duration, RemovalPolicy, Tags } from 'aws-cdk-lib'; +import { Vpc, SecurityGroup, SubnetType, InstanceType, InstanceClass, InstanceSize } from 'aws-cdk-lib/aws-ec2'; + +interface RdsDatabaseStackProps extends StackProps { + readonly vpc: Vpc; + readonly rdsSecurityGroup: SecurityGroup; +} + +export class RdsDatabaseStack extends Stack { + private readonly vpc: Vpc; + private readonly DB_INSTANCE_IDENTIFIER: string = 'petclinic-python'; + public readonly rdsInstance: DatabaseInstance; + public readonly dbSecret: Secret; + + constructor(scope: Construct, id: string, props: RdsDatabaseStackProps) { + super(scope, id, props); + + this.vpc = props.vpc; + + // Create DB Subnet Group + const dbSubnetGroup = new SubnetGroup(this, 'MyDBSubnetGroup', { + vpc: this.vpc, + description: 'Subnet group for RDS', + subnetGroupName: 'my-db-subnet-group', + vpcSubnets: { + subnetType: SubnetType.PRIVATE_ISOLATED, // Ensure private subnets with NAT are used + }, + removalPolicy: RemovalPolicy.DESTROY, + }); + + // Create a Secret for the database credentials + this.dbSecret = new Secret(this, 'DBSecret', { + secretName: 'PetClinicDBCredentials', + generateSecretString: { + secretStringTemplate: JSON.stringify({ username: 'root' }), + generateStringKey: 'password', + excludePunctuation: true, + includeSpace: false, + }, + }); + + // Create database instance + this.rdsInstance = new DatabaseInstance(this, 'MyDatabase', { + vpc: this.vpc, + credentials: Credentials.fromSecret(this.dbSecret), + vpcSubnets: { + subnetType: SubnetType.PRIVATE_ISOLATED, // Ensure private subnets with NAT are used + }, + publiclyAccessible: false, + instanceIdentifier: this.DB_INSTANCE_IDENTIFIER, + instanceType: InstanceType.of(InstanceClass.T3, InstanceSize.MICRO), // db.t3.micro + engine: DatabaseInstanceEngine.postgres({ + version: PostgresEngineVersion.VER_14, + }), + allocatedStorage: 20, // 20 GB allocated storage + maxAllocatedStorage: 25, + storageType: StorageType.GP2, + subnetGroup: dbSubnetGroup, + securityGroups: [props.rdsSecurityGroup], + multiAz: false, // Disable Multi-AZ + backupRetention: Duration.days(0), // 0 days backup retention + removalPolicy: RemovalPolicy.DESTROY, // For dev/testing environments + deletionProtection: false, // Disable deletion protection + deleteAutomatedBackups: true, + }); + + Tags.of(this.rdsInstance).add('Name', this.DB_INSTANCE_IDENTIFIER); + + // Output the subnet group name + new CfnOutput(this, 'DBSubnetGroupName', { + value: dbSubnetGroup.subnetGroupName, + }); + } +} diff --git a/cdk/ecs/lib/stacks/ecsStack.ts b/cdk/ecs/lib/stacks/ecsStack.ts new file mode 100644 index 0000000..3745384 --- /dev/null +++ b/cdk/ecs/lib/stacks/ecsStack.ts @@ -0,0 +1,770 @@ +import { ApplicationTargetGroup } from 'aws-cdk-lib/aws-elasticloadbalancingv2'; +import { CfnOutput, Duration, Stack, StackProps } from 'aws-cdk-lib'; +import { Construct } from 'constructs'; +import { Role } from 'aws-cdk-lib/aws-iam'; +import { Secret as SmSecret } from 'aws-cdk-lib/aws-secretsmanager'; +import { + Cluster, + Compatibility, + ContainerImage, + FargateService, + HealthCheck, + LogDrivers, + NetworkMode, + Protocol, + Secret as EcsSecret, + TaskDefinition, +} from 'aws-cdk-lib/aws-ecs'; +import { SecurityGroup, SubnetType, Vpc } from 'aws-cdk-lib/aws-ec2'; + +import { ServiceDiscoveryStack } from './servicediscoveryStack'; +import { LogStack } from './logStack'; + +interface EcsClusterStackProps extends StackProps { + readonly vpc: Vpc; + readonly securityGroups: SecurityGroup[]; + readonly ecsTaskRole: Role; + readonly ecsTaskExecutionRole: Role; + readonly serviceDiscoveryStack: ServiceDiscoveryStack; + readonly logStack: LogStack; + readonly adotJavaImageTag: string; + readonly adotPythonImageTag: string; + readonly dbSecret: SmSecret; + readonly dbInstanceEndpointAddress: string; + readonly loadBalancerDnsName: string; + readonly loadBalancerTargetGroup: ApplicationTargetGroup; +} + +interface CreateServiceProps { + readonly serviceName: string; + readonly taskDefinition: TaskDefinition; +} + +interface ServerTaskDefinitionConfig { + image: string; + port: number; + environmentArgs: { + [key: string]: string; + }; +} + +interface ServiceTaskDefinitionConfig extends ServerTaskDefinitionConfig { + rules: MetricTransformationConfig[]; + command?: string[]; + healthCheck?: HealthCheck; +} + +type MetricTransformationConfig = { + readonly selectors: Array<{ + readonly dimension: string; + readonly match: string; + }>; + readonly replacements: Array<{ + readonly target_dimension: string; + readonly value: string; + }>; + readonly action: string; +}; + +export class EcsClusterStack extends Stack { + public readonly cluster: Cluster; + private readonly securityGroups: SecurityGroup[]; + private readonly ecsTaskRole: Role; + private readonly ecsTaskExecutionRole: Role; + private readonly ecrImagePrefix: string; + private readonly serviceDiscoveryStack: ServiceDiscoveryStack; + private readonly logStack: LogStack; + private readonly adotJavaImageTag: string; + private readonly adotPythonImageTag: string; + private readonly dbSecret: SmSecret; + private readonly dbInstanceEndpointAddress: string; + private readonly CLUSTER_NAME = 'ecs-pet-clinic-demo'; + private readonly CONFIG_SERVER = 'pet-clinic-config-server'; + private readonly DISCOVERY_SERVER = 'pet-clinic-discovery-server'; + private readonly ADMIN_SERVER = 'pet-clinic-admin-server'; + private readonly API_GATEWAY = 'pet-clinic-api-gateway'; + private readonly VISITS_SERVICE = 'pet-clinic-visits-service'; + private readonly CUSTOMERS_SERVICE = 'pet-clinic-customers-service'; + private readonly VETS_SERVICE = 'pet-clinic-vets-service'; + private DISCOVERY_SERVER_CW_CONFIG: MetricTransformationConfig; + private CONFIG_SERVER_CW_CONFIG: MetricTransformationConfig; + private VISITS_SERVICE_CW_CONFIG: MetricTransformationConfig; + private VETS_SERVICE_CW_CONFIG: MetricTransformationConfig; + private CUSTOMERS_SERVICE_CW_CONFIG: MetricTransformationConfig; + + constructor(scope: Construct, id: string, props: EcsClusterStackProps) { + super(scope, id, props); + + this.cluster = new Cluster(this, 'EcsCluster', { + vpc: props.vpc, + clusterName: this.CLUSTER_NAME, + }); + + this.ecrImagePrefix = `${this.account}.dkr.ecr.${this.region}.amazonaws.com`; // retrive ECR image from the private repository + this.adotJavaImageTag = props.adotJavaImageTag; + this.adotPythonImageTag = props.adotPythonImageTag; + this.dbSecret = props.dbSecret; + this.dbInstanceEndpointAddress = props.dbInstanceEndpointAddress; + this.securityGroups = props.securityGroups; + this.ecsTaskRole = props.ecsTaskRole; + this.ecsTaskExecutionRole = props.ecsTaskExecutionRole; + this.serviceDiscoveryStack = props.serviceDiscoveryStack; + this.logStack = props.logStack; + + this.replaceRemoteServicesNames(); + + // Create Config, Discovery and Admin servers + this.createConfigServer(); + this.createDiscoveryServer(); + this.createAdminServer(); + + // Create microservices + this.runVetsService(); + this.runCustomersService(); + this.runVisitsService(); + this.runInsuranceService(); + this.runBillingService(); + + // Create pet clinic frontend + this.createPetClinicFrontend(props.loadBalancerDnsName, props.loadBalancerTargetGroup); + + // Generate traffic + this.generateTraffic(props.loadBalancerDnsName); + + new CfnOutput(this, 'EcsClusterArn', { value: this.cluster.clusterArn }); + } + + createConfigServer() { + const configServerConfig: ServerTaskDefinitionConfig = { + image: 'spring-petclinic-config-server', + port: 8888, + environmentArgs: {}, + }; + const taskDefinition = this.createServerTaskDefinition(this.CONFIG_SERVER, configServerConfig); + + // Create ECS service + this.createService({ + serviceName: this.CONFIG_SERVER, + taskDefinition: taskDefinition, + }); + } + + createDiscoveryServer() { + const discoveryServerConfig: ServerTaskDefinitionConfig = { + image: 'spring-petclinic-discovery-server', + port: 8761, + environmentArgs: { + CONFIG_SERVER_URL: `http://${this.CONFIG_SERVER}-DNS.${this.serviceDiscoveryStack.namespace.namespaceName}:8888`, + }, + }; + + const taskDefinition = this.createServerTaskDefinition(this.DISCOVERY_SERVER, discoveryServerConfig); + + // Create ECS service + this.createService({ + serviceName: this.DISCOVERY_SERVER, + taskDefinition: taskDefinition, + }); + } + + createAdminServer() { + const adminServerConfig: ServerTaskDefinitionConfig = { + image: 'spring-petclinic-admin-server', + port: 9090, + environmentArgs: { + CONFIG_SERVER_URL: `http://${this.CONFIG_SERVER}-DNS.${this.serviceDiscoveryStack.namespace.namespaceName}:8888`, + DISCOVERY_SERVER_URL: `http://${this.DISCOVERY_SERVER}-DNS.${this.serviceDiscoveryStack.namespace.namespaceName}:8761/eureka`, + ADMIN_IP: `${this.ADMIN_SERVER}-DNS.${this.serviceDiscoveryStack.namespace.namespaceName}`, + }, + }; + + const taskDefinition = this.createServerTaskDefinition(this.ADMIN_SERVER, adminServerConfig); + + // Create ECS service + this.createService({ + serviceName: this.ADMIN_SERVER, + taskDefinition: taskDefinition, + }); + } + + createPetClinicFrontend(loadBalancerDNS: string, targetGroup: ApplicationTargetGroup) { + const frontendConfig: ServiceTaskDefinitionConfig = { + image: 'spring-petclinic-api-gateway', + environmentArgs: { + CONFIG_SERVER_URL: `http://${this.CONFIG_SERVER}-DNS.${this.serviceDiscoveryStack.namespace.namespaceName}:8888`, + DISCOVERY_SERVER_URL: `http://${this.DISCOVERY_SERVER}-DNS.${this.serviceDiscoveryStack.namespace.namespaceName}:8761/eureka`, + API_GATEWAY_IP: loadBalancerDNS, + }, + port: 8080, + rules: [ + this.DISCOVERY_SERVER_CW_CONFIG, + this.CONFIG_SERVER_CW_CONFIG, + this.CUSTOMERS_SERVICE_CW_CONFIG, + this.VISITS_SERVICE_CW_CONFIG, + this.VETS_SERVICE_CW_CONFIG, + ], + }; + + const taskDefinition = this.createJavaTaskDefinition(this.API_GATEWAY, frontendConfig); + + const service = new FargateService(this, `${this.API_GATEWAY}-ecs-service`, { + serviceName: this.API_GATEWAY, + taskDefinition: taskDefinition, + cluster: this.cluster, + securityGroups: this.securityGroups, + vpcSubnets: { + subnetType: SubnetType.PRIVATE_WITH_EGRESS, + }, + assignPublicIp: false, + desiredCount: 1, + }); + + // Add Application Load Balancer target group + service.attachToApplicationTargetGroup(targetGroup); + } + + runVetsService() { + const vetsConfig: ServiceTaskDefinitionConfig = { + image: 'spring-petclinic-vets-service', + environmentArgs: { + CONFIG_SERVER_URL: `http://${this.CONFIG_SERVER}-DNS.${this.serviceDiscoveryStack.namespace.namespaceName}:8888`, + DISCOVERY_SERVER_URL: `http://${this.DISCOVERY_SERVER}-DNS.${this.serviceDiscoveryStack.namespace.namespaceName}:8761/eureka`, + VETS_SERVICE_IP: `${this.VETS_SERVICE}-DNS.${this.serviceDiscoveryStack.namespace.namespaceName}`, + }, + port: 8083, + rules: [this.DISCOVERY_SERVER_CW_CONFIG, this.CONFIG_SERVER_CW_CONFIG], + }; + + const taskDefinition = this.createJavaTaskDefinition(this.VETS_SERVICE, vetsConfig); + + // Create ECS service + this.createService({ + serviceName: this.VETS_SERVICE, + taskDefinition: taskDefinition, + }); + } + + runCustomersService() { + const customersConfig: ServiceTaskDefinitionConfig = { + image: 'spring-petclinic-customers-service', + environmentArgs: { + REGION_FROM_ECS: this.region, + CONFIG_SERVER_URL: `http://${this.CONFIG_SERVER}-DNS.${this.serviceDiscoveryStack.namespace.namespaceName}:8888`, + DISCOVERY_SERVER_URL: `http://${this.DISCOVERY_SERVER}-DNS.${this.serviceDiscoveryStack.namespace.namespaceName}:8761/eureka`, + CUSTOMER_SERVICE_IP: `${this.CUSTOMERS_SERVICE}-DNS.${this.serviceDiscoveryStack.namespace.namespaceName}`, + }, + port: 8081, + rules: [this.DISCOVERY_SERVER_CW_CONFIG, this.CONFIG_SERVER_CW_CONFIG], + }; + + const taskDefinition = this.createJavaTaskDefinition(this.CUSTOMERS_SERVICE, customersConfig); + + // Create ECS service + this.createService({ + serviceName: this.CUSTOMERS_SERVICE, + taskDefinition: taskDefinition, + }); + } + + runVisitsService() { + const visitsConfig: ServiceTaskDefinitionConfig = { + image: 'spring-petclinic-visits-service', + environmentArgs: { + REGION_FROM_ECS: this.region, + CONFIG_SERVER_URL: `http://${this.CONFIG_SERVER}-DNS.${this.serviceDiscoveryStack.namespace.namespaceName}:8888`, + DISCOVERY_SERVER_URL: `http://${this.DISCOVERY_SERVER}-DNS.${this.serviceDiscoveryStack.namespace.namespaceName}:8761/eureka`, + VISITS_SERVICE_IP: `${this.VISITS_SERVICE}-DNS.${this.serviceDiscoveryStack.namespace.namespaceName}`, + }, + port: 8082, + rules: [this.DISCOVERY_SERVER_CW_CONFIG, this.CONFIG_SERVER_CW_CONFIG], + }; + + const taskDefinition = this.createJavaTaskDefinition(this.VISITS_SERVICE, visitsConfig); + + // Create ECS service + this.createService({ + serviceName: this.VISITS_SERVICE, + taskDefinition: taskDefinition, + }); + } + + runInsuranceService() { + const INSURANCE_SERVICE = 'pet-clinic-insurance-service'; + + const healthCheck: HealthCheck = { + command: ['CMD-SHELL', 'curl -f http://localhost:8000/insurances/ || exit 1'], + interval: Duration.seconds(60), + timeout: Duration.seconds(10), + retries: 5, + startPeriod: Duration.seconds(3), + }; + + const insuranceConfig: ServiceTaskDefinitionConfig = { + port: 8000, + image: 'python-petclinic-insurance-service', + environmentArgs: { + INSURANCE_SERVICE_IP: `${INSURANCE_SERVICE}-DNS.${this.serviceDiscoveryStack.namespace.namespaceName}`, + DJANGO_SETTINGS_MODULE: 'pet_clinic_insurance_service.settings', + }, + command: [ + 'sh', + '-c', + 'python manage.py migrate && python manage.py loaddata initial_data.json && python manage.py runserver 0.0.0.0:8000 --noreload', + ], + rules: [this.DISCOVERY_SERVER_CW_CONFIG], + healthCheck: healthCheck, + }; + + const taskDefinition = this.createPythonTaskDefinition(INSURANCE_SERVICE, insuranceConfig); + + // Create ECS service + this.createService({ + serviceName: INSURANCE_SERVICE, + taskDefinition: taskDefinition, + }); + } + + runBillingService() { + const BILLING_SERVICE = 'pet-clinic-billing-service'; + + const billingConfig: ServiceTaskDefinitionConfig = { + port: 8800, + image: 'python-petclinic-billing-service', + environmentArgs: { + REGION: this.region, + DJANGO_SETTINGS_MODULE: 'pet_clinic_billing_service.settings', + BILLING_SERVICE_IP: `${BILLING_SERVICE}-DNS.${this.serviceDiscoveryStack.namespace.namespaceName}`, + }, + rules: [this.DISCOVERY_SERVER_CW_CONFIG], + command: ['sh', '-c', 'python manage.py migrate && python manage.py runserver 0.0.0.0:8800 --noreload'], + }; + + const taskDefinition = this.createPythonTaskDefinition(BILLING_SERVICE, billingConfig); + + // Create ECS service + this.createService({ + serviceName: BILLING_SERVICE, + taskDefinition: taskDefinition, + }); + } + + generateTraffic(loadBalancerDNS: string) { + const TRAFFIC_GENERATOR = 'traffic-generator'; + const trafficGeneratorLogGroup = this.logStack.createLogGroup(TRAFFIC_GENERATOR); + + // Create ECS task definition + const taskDefinition = new TaskDefinition(this, `${TRAFFIC_GENERATOR}-task`, { + cpu: '256', + memoryMiB: '512', + compatibility: Compatibility.FARGATE, + family: TRAFFIC_GENERATOR, + networkMode: NetworkMode.AWS_VPC, + taskRole: this.ecsTaskRole, + executionRole: this.ecsTaskExecutionRole, + }); + + // Add Container to Task Definition + taskDefinition.addContainer(`${TRAFFIC_GENERATOR}-container`, { + image: ContainerImage.fromRegistry(`public.ecr.aws/u8q5x3l1/traffic-generator`), + cpu: 256, + memoryLimitMiB: 512, + essential: true, + environment: { + URL: `http://${loadBalancerDNS}:80`, + HIGH_LOAD_MAX: '1600', + HIGH_LOAD_MIN: '800', + BURST_DELAY_MAX: '80', + BURST_DELAY_MIN: '60', + LOW_LOAD_MAX: '60', + LOW_LOAD_MIN: '30', + }, + logging: LogDrivers.awsLogs({ + streamPrefix: 'ecs', + logGroup: trafficGeneratorLogGroup, + }), + }); + + new FargateService(this, `${TRAFFIC_GENERATOR}-ecs-service`, { + serviceName: TRAFFIC_GENERATOR, + taskDefinition: taskDefinition, + cluster: this.cluster, + securityGroups: this.securityGroups, + vpcSubnets: { + subnetType: SubnetType.PRIVATE_WITH_EGRESS, + }, + assignPublicIp: false, + desiredCount: 1, + }); + } + + replaceRemoteServicesNames() { + this.DISCOVERY_SERVER_CW_CONFIG = { + selectors: [ + { + dimension: 'RemoteService', + match: `${this.DISCOVERY_SERVER}-DNS.${this.serviceDiscoveryStack.namespace.namespaceName}*`, + }, + ], + replacements: [ + { + target_dimension: 'RemoteService', + value: `${this.DISCOVERY_SERVER}`, + }, + ], + action: 'replace', + }; + + this.CONFIG_SERVER_CW_CONFIG = { + selectors: [ + { + dimension: 'RemoteService', + match: `${this.CONFIG_SERVER}-DNS.${this.serviceDiscoveryStack.namespace.namespaceName}*`, + }, + ], + replacements: [ + { + target_dimension: 'RemoteService', + value: `${this.CONFIG_SERVER}`, + }, + ], + action: 'replace', + }; + + this.VETS_SERVICE_CW_CONFIG = { + selectors: [ + { + dimension: 'RemoteService', + match: `${this.VETS_SERVICE}-DNS.${this.serviceDiscoveryStack.namespace.namespaceName}*`, + }, + ], + replacements: [ + { + target_dimension: 'RemoteService', + value: `${this.VETS_SERVICE}`, + }, + ], + action: 'replace', + }; + + this.VISITS_SERVICE_CW_CONFIG = { + selectors: [ + { + dimension: 'RemoteService', + match: `${this.VISITS_SERVICE}-DNS.${this.serviceDiscoveryStack.namespace.namespaceName}*`, + }, + ], + replacements: [ + { + target_dimension: 'RemoteService', + value: `${this.VISITS_SERVICE}`, + }, + ], + action: 'replace', + }; + + this.CUSTOMERS_SERVICE_CW_CONFIG = { + selectors: [ + { + dimension: 'RemoteService', + match: `${this.CUSTOMERS_SERVICE}-DNS.${this.serviceDiscoveryStack.namespace.namespaceName}*`, + }, + ], + replacements: [ + { + target_dimension: 'RemoteService', + value: `${this.CUSTOMERS_SERVICE}`, + }, + ], + action: 'replace', + }; + } + + createJavaTaskDefinition(serviceName: string, config: ServiceTaskDefinitionConfig) { + const { image, environmentArgs, port, rules } = config; + + const logGroup = this.logStack.createLogGroup(serviceName); + const cwAgentLogGroup = this.logStack.createLogGroup(`${serviceName}-cwagent`); + + // Create ECS task definition + const taskDefinition = new TaskDefinition(this, `${serviceName}-task`, { + cpu: '256', + memoryMiB: '512', + compatibility: Compatibility.FARGATE, + family: serviceName, + networkMode: NetworkMode.AWS_VPC, + taskRole: this.ecsTaskRole, + executionRole: this.ecsTaskExecutionRole, + volumes: [ + { + name: 'opentelemetry-auto-instrumentation', + }, + ], + }); + + // Add Container to Task Definition + const mainContainer = taskDefinition.addContainer(`${serviceName}-container`, { + image: ContainerImage.fromRegistry(`${this.ecrImagePrefix}/springcommunity/${image}`), + cpu: 256, + memoryLimitMiB: 512, + essential: true, + environment: { + OTEL_EXPORTER_OTLP_PROTOCOL: 'http/protobuf', + OTEL_LOGS_EXPORTER: 'none', + OTEL_TRACES_SAMPLER: 'xray', + OTEL_EXPORTER_OTLP_TRACES_ENDPOINT: 'http://localhost:4316/v1/traces', + OTEL_PROPAGATORS: 'tracecontext,baggage,b3,xray', + OTEL_RESOURCE_ATTRIBUTES: `aws.log.group.names=${logGroup.logGroupName},service.name=${serviceName}`, + OTEL_AWS_APPLICATION_SIGNALS_ENABLED: 'true', + OTEL_AWS_APPLICATION_SIGNALS_EXPORTER_ENDPOINT: 'http://localhost:4316/v1/metrics', + OTEL_METRICS_EXPORTER: 'none', + JAVA_TOOL_OPTIONS: ' -javaagent:/otel-auto-instrumentation/javaagent.jar', + SPRING_PROFILES_ACTIVE: 'ecs', + ...environmentArgs, + }, + logging: LogDrivers.awsLogs({ + streamPrefix: 'ecs', + logGroup: logGroup, + }), + }); + + // Add Port Mapping + mainContainer.addPortMappings({ + containerPort: port, + protocol: Protocol.TCP, + }); + + mainContainer.addMountPoints({ + sourceVolume: 'opentelemetry-auto-instrumentation', + containerPath: '/otel-auto-instrumentation', + readOnly: false, + }); + + // Add init container + const initContainer = taskDefinition.addContainer(`${serviceName}-init-container`, { + image: ContainerImage.fromRegistry( + `public.ecr.aws/aws-observability/adot-autoinstrumentation-java:${this.adotJavaImageTag}`, + ), + essential: false, // The container will stop with exit 0 after it completes. + command: ['cp', '/javaagent.jar', '/otel-auto-instrumentation/javaagent.jar'], + }); + + initContainer.addMountPoints({ + sourceVolume: 'opentelemetry-auto-instrumentation', + containerPath: '/otel-auto-instrumentation', + readOnly: false, + }); + + // Add CloudWatch agent container + taskDefinition.addContainer(`${serviceName}-cwagent-container`, { + image: ContainerImage.fromRegistry('public.ecr.aws/cloudwatch-agent/cloudwatch-agent:latest'), + memoryLimitMiB: 128, + essential: true, + environment: { + CW_CONFIG_CONTENT: JSON.stringify({ + traces: { + traces_collected: { + application_signals: {}, + }, + }, + logs: { + metrics_collected: { + application_signals: { + rules: rules, + }, + }, + }, + }), + }, + + logging: LogDrivers.awsLogs({ + streamPrefix: 'ecs', + logGroup: cwAgentLogGroup, + }), + }); + + return taskDefinition; + } + + createPythonTaskDefinition(serviceName: string, config: ServiceTaskDefinitionConfig) { + const { image, environmentArgs, port, rules, command, healthCheck } = config; + + const logGroup = this.logStack.createLogGroup(serviceName); + const cwAgentLogGroup = this.logStack.createLogGroup(`${serviceName}-cwagent`); + + // Create ECS task definition + const taskDefinition = new TaskDefinition(this, `${serviceName}-task`, { + cpu: '256', + memoryMiB: '512', + compatibility: Compatibility.FARGATE, + family: serviceName, + networkMode: NetworkMode.AWS_VPC, + taskRole: this.ecsTaskRole, + executionRole: this.ecsTaskExecutionRole, + volumes: [ + { + name: 'opentelemetry-auto-instrumentation-python', + }, + ], + }); + + // Add Container to Task Definition + const mainContainer = taskDefinition.addContainer(`${serviceName}-container`, { + image: ContainerImage.fromRegistry(`${this.ecrImagePrefix}/${image}`), + cpu: 256, + memoryLimitMiB: 512, + essential: true, + secrets: { + DB_USER: EcsSecret.fromSecretsManager(this.dbSecret, 'username'), + DB_USER_PASSWORD: EcsSecret.fromSecretsManager(this.dbSecret, 'password'), + }, + environment: { + PYTHONPATH: + '/otel-auto-instrumentation-python/opentelemetry/instrumentation/auto_instrumentation:/app:/otel-auto-instrumentation-python', + OTEL_EXPORTER_OTLP_PROTOCOL: 'http/protobuf', + OTEL_TRACES_SAMPLER_ARG: 'endpoint=http://localhost:2000', + OTEL_LOGS_EXPORTER: 'none', + OTEL_PYTHON_CONFIGURATOR: 'aws_configurator', + OTEL_TRACES_SAMPLER: 'xray', + OTEL_EXPORTER_OTLP_TRACES_ENDPOINT: 'http://localhost:4316/v1/traces', + OTEL_AWS_APPLICATION_SIGNALS_EXPORTER_ENDPOINT: 'http://localhost:4316/v1/metrics', + OTEL_AWS_APPLICATION_SIGNALS_ENABLED: 'true', + OTEL_RESOURCE_ATTRIBUTES: `service.name=${serviceName}`, + OTEL_METRICS_EXPORTER: 'none', + OTEL_PYTHON_DISTRO: 'aws_distro', + EUREKA_SERVER_URL: `${this.DISCOVERY_SERVER}-DNS.${this.serviceDiscoveryStack.namespace.namespaceName}`, + DB_NAME: 'postgres', + DATABASE_PROFILE: 'postgresql', + DB_SERVICE_HOST: this.dbInstanceEndpointAddress, + DB_SERVICE_PORT: '5432', + ...environmentArgs, + }, + logging: LogDrivers.awsLogs({ + streamPrefix: 'ecs', + logGroup: logGroup, + }), + command, + healthCheck, + }); + + // Add Port Mapping + mainContainer.addPortMappings({ + containerPort: port, + protocol: Protocol.TCP, + }); + + mainContainer.addMountPoints({ + sourceVolume: 'opentelemetry-auto-instrumentation-python', + containerPath: '/otel-auto-instrumentation-python', + readOnly: false, + }); + + // Add init container + const initContainer = taskDefinition.addContainer(`${serviceName}-init-container`, { + image: ContainerImage.fromRegistry( + `public.ecr.aws/aws-observability/adot-autoinstrumentation-python:${this.adotPythonImageTag}`, + ), + essential: false, // The container will stop with exit 0 after it completes. + command: ['cp', '-a', '/autoinstrumentation/.', '/otel-auto-instrumentation-python'], + }); + + initContainer.addMountPoints({ + sourceVolume: 'opentelemetry-auto-instrumentation-python', + containerPath: '/otel-auto-instrumentation-python', + readOnly: false, + }); + + // Add CloudWatch agent container + taskDefinition.addContainer(`${serviceName}-cwagent-container`, { + image: ContainerImage.fromRegistry('public.ecr.aws/cloudwatch-agent/cloudwatch-agent:latest'), + memoryLimitMiB: 128, + essential: true, + environment: { + CW_CONFIG_CONTENT: JSON.stringify({ + traces: { + traces_collected: { + application_signals: {}, + }, + }, + logs: { + metrics_collected: { + application_signals: { + rules: rules, + }, + }, + }, + }), + }, + + logging: LogDrivers.awsLogs({ + streamPrefix: 'ecs', + logGroup: cwAgentLogGroup, + }), + }); + + return taskDefinition; + } + + createService(props: CreateServiceProps) { + // 1. create service discovery service + const DNSService = this.serviceDiscoveryStack.createService(props.serviceName); + + // 2, create ECS service + const ecsService = new FargateService(this, `${props.serviceName}-ecs-service`, { + serviceName: props.serviceName, + taskDefinition: props.taskDefinition, + cluster: this.cluster, + securityGroups: this.securityGroups, + vpcSubnets: { + subnetType: SubnetType.PRIVATE_WITH_EGRESS, + }, + assignPublicIp: false, + }); + + ecsService.associateCloudMapService({ + service: DNSService, + }); + + new CfnOutput(this, `ecsService-${props.serviceName}`, { + value: ecsService.serviceName, + }); + console.log(`Ecs Service - ${props.serviceName} is created`); + } + + createServerTaskDefinition(serverName: string, config: ServerTaskDefinitionConfig) { + const { image, port, environmentArgs } = config; + + const logGroup = this.logStack.createLogGroup(serverName); + const taskDefinition = new TaskDefinition(this, `${serverName}-task`, { + cpu: '256', + memoryMiB: '512', + compatibility: Compatibility.FARGATE, + family: serverName, + networkMode: NetworkMode.AWS_VPC, + taskRole: this.ecsTaskRole, + executionRole: this.ecsTaskExecutionRole, + }); + + // Add Container to Task Definition + const container = taskDefinition.addContainer(`${serverName}-container`, { + image: ContainerImage.fromRegistry(`${this.ecrImagePrefix}/springcommunity/${image}`), + cpu: 256, + memoryLimitMiB: 512, + essential: true, + environment: { + SPRING_PROFILES_ACTIVE: 'ecs', + ...environmentArgs, + }, + logging: LogDrivers.awsLogs({ + streamPrefix: 'ecs', + logGroup: logGroup, + }), + }); + + container.addPortMappings({ + containerPort: port, + protocol: Protocol.TCP, + }); + + return taskDefinition; + } +} diff --git a/cdk/ecs/lib/stacks/iamRolesStack.ts b/cdk/ecs/lib/stacks/iamRolesStack.ts new file mode 100644 index 0000000..31de343 --- /dev/null +++ b/cdk/ecs/lib/stacks/iamRolesStack.ts @@ -0,0 +1,57 @@ +import { Construct } from 'constructs'; +import { Role, ServicePrincipal, ManagedPolicy } from 'aws-cdk-lib/aws-iam'; +import { Stack, StackProps, CfnOutput } from 'aws-cdk-lib'; + +export class IamRolesStack extends Stack { + private readonly ECS_TASK_ROLE_NAME = 'ecs-pet-clinic-task-role'; + private readonly ECS_TASK_EXECUTION_ROLE_NAME = 'ecs-pet-clinic-task-execution-role'; + public readonly ecsTaskRole: Role; + public readonly ecsTaskExecutionRole: Role; + + constructor(scope: Construct, id: string, props?: StackProps) { + super(scope, id, props); + + // Create IAM Roles for ECS Task + this.ecsTaskRole = new Role(this, 'EcsTaskRole', { + roleName: this.ECS_TASK_ROLE_NAME, + assumedBy: new ServicePrincipal('ecs-tasks.amazonaws.com'), + }); + + const taskRolePolicies: string[] = [ + 'AWSXrayWriteOnlyAccess', + 'CloudWatchAgentServerPolicy', + 'service-role/AmazonEC2ContainerServiceRole', + 'AmazonECS_FullAccess', + 'AmazonSQSFullAccess', + 'AmazonDynamoDBFullAccess', + 'AmazonRDSFullAccess', + 'AmazonS3FullAccess', + 'AmazonBedrockFullAccess', + 'AmazonKinesisFullAccess', + ]; + + taskRolePolicies.forEach((policy) => { + this.ecsTaskRole.addManagedPolicy(ManagedPolicy.fromAwsManagedPolicyName(policy)); + }); + + // Create IAM Roles for ECS Task Execution + this.ecsTaskExecutionRole = new Role(this, 'EcsTaskExecutionRole', { + roleName: this.ECS_TASK_EXECUTION_ROLE_NAME, + assumedBy: new ServicePrincipal('ecs-tasks.amazonaws.com'), + }); + + const taskExecutionRolePolicies = [ + 'CloudWatchAgentServerPolicy', + 'service-role/AmazonECSTaskExecutionRolePolicy', + ]; + + taskExecutionRolePolicies.forEach((policy) => { + this.ecsTaskExecutionRole.addManagedPolicy(ManagedPolicy.fromAwsManagedPolicyName(policy)); + }); + + new CfnOutput(this, 'TaskRoleArn', { value: this.ecsTaskRole.roleArn }); + new CfnOutput(this, 'TaskExecutionRoleArn', { + value: this.ecsTaskExecutionRole.roleArn, + }); + } +} diff --git a/cdk/ecs/lib/stacks/loadbalancerStack.ts b/cdk/ecs/lib/stacks/loadbalancerStack.ts new file mode 100644 index 0000000..ed870ba --- /dev/null +++ b/cdk/ecs/lib/stacks/loadbalancerStack.ts @@ -0,0 +1,67 @@ +import { + ApplicationTargetGroup, + TargetType, + ApplicationProtocol, + ApplicationLoadBalancer, + Protocol, +} from 'aws-cdk-lib/aws-elasticloadbalancingv2'; +import { Construct } from 'constructs'; +import { Stack, StackProps, CfnOutput, Duration } from 'aws-cdk-lib'; +import { Vpc, SecurityGroup, SubnetType } from 'aws-cdk-lib/aws-ec2'; + +interface LoadBalancerStackProps extends StackProps { + vpc: Vpc; + securityGroup: SecurityGroup; +} + +export class LoadBalancerStack extends Stack { + public readonly loadBalancer: ApplicationLoadBalancer; + public readonly targetGroup: ApplicationTargetGroup; + private readonly LOAD_BALANCER_NAME = 'ecs-load-balancer'; + private readonly TARGET_GROUP_NAME = 'api-gateway-target-group'; + + constructor(scope: Construct, id: string, props: LoadBalancerStackProps) { + super(scope, id, props); + + // Create Application Load Balancer (ALB) + this.loadBalancer = new ApplicationLoadBalancer(this, 'LoadBalancer', { + loadBalancerName: this.LOAD_BALANCER_NAME, + vpc: props.vpc, + internetFacing: true, + securityGroup: props.securityGroup, + vpcSubnets: { + subnetType: SubnetType.PUBLIC, + }, + }); + + this.targetGroup = new ApplicationTargetGroup(this, 'ApiGatewayTargetGroup', { + targetGroupName: this.TARGET_GROUP_NAME, + vpc: props.vpc, + port: 8080, + protocol: ApplicationProtocol.HTTP, + targetType: TargetType.IP, + healthCheck: { + path: '/', + protocol: Protocol.HTTP, + healthyThresholdCount: 5, + unhealthyThresholdCount: 2, + interval: Duration.seconds(240), + timeout: Duration.seconds(60), + }, + }); + + this.loadBalancer.addListener('Listener', { + protocol: ApplicationProtocol.HTTP, + port: 80, + defaultTargetGroups: [this.targetGroup], + }); + + // Output the Load Balancer ARN and DNS + new CfnOutput(this, 'LoadBalancerARN', { + value: this.loadBalancer.loadBalancerArn, + }); + new CfnOutput(this, 'LoadBalancerDNS', { + value: this.loadBalancer.loadBalancerDnsName, + }); + } +} diff --git a/cdk/ecs/lib/stacks/logStack.ts b/cdk/ecs/lib/stacks/logStack.ts new file mode 100644 index 0000000..1751531 --- /dev/null +++ b/cdk/ecs/lib/stacks/logStack.ts @@ -0,0 +1,16 @@ +import { Construct } from 'constructs'; +import { LogGroup } from 'aws-cdk-lib/aws-logs'; +import { RemovalPolicy, Stack, StackProps } from 'aws-cdk-lib'; + +export class LogStack extends Stack { + constructor(scope: Construct, id: string, props?: StackProps) { + super(scope, id, props); + } + + public createLogGroup(serviceName: string) { + return new LogGroup(this, `${serviceName}-log-group`, { + logGroupName: `/ecs/${serviceName}`, + removalPolicy: RemovalPolicy.DESTROY, + }); + } +} diff --git a/cdk/ecs/lib/stacks/petClinicNetworkStack.ts b/cdk/ecs/lib/stacks/petClinicNetworkStack.ts new file mode 100644 index 0000000..020e5f6 --- /dev/null +++ b/cdk/ecs/lib/stacks/petClinicNetworkStack.ts @@ -0,0 +1,110 @@ +import { Construct } from 'constructs'; +import { Stack, StackProps, CfnOutput } from 'aws-cdk-lib'; +import { + Vpc, + SecurityGroup, + SubnetType, + Port, + Peer, + InterfaceVpcEndpoint, + InterfaceVpcEndpointAwsService, + GatewayVpcEndpoint, + GatewayVpcEndpointAwsService, +} from 'aws-cdk-lib/aws-ec2'; + +export class PetClinicNetworkStack extends Stack { + public readonly vpc: Vpc; + public readonly rdsSecurityGroup: SecurityGroup; + public readonly albSecurityGroup: SecurityGroup; + public readonly ecsSecurityGroup: SecurityGroup; + private readonly ECS_SECURITY_GROUP_NAME = 'ecs-security-group'; + private readonly RDS_SECURITY_GROUP_NAME = 'rds-security-group'; + private readonly ALB_SECURITY_GROUP_NAME = 'alb-security-group'; + + constructor(scope: Construct, id: string, props?: StackProps) { + super(scope, id, props); + + // Create VPC + this.vpc = new Vpc(this, 'VPC', { + maxAzs: 2, + subnetConfiguration: [ + { + name: 'pet-clinic-public-subnet', + subnetType: SubnetType.PUBLIC, + cidrMask: 24, + }, + { + name: 'pet-clinic-private-subnet', + subnetType: SubnetType.PRIVATE_ISOLATED, // Completely isolated private subnet + cidrMask: 24, + }, + { + name: 'pet-clinic-private-subnet-with-egress', + subnetType: SubnetType.PRIVATE_WITH_EGRESS, + cidrMask: 24, + }, + ], + }); + + // Add ECR API VPC Endpoint + new InterfaceVpcEndpoint(this, 'EcrApiEndpoint', { + vpc: this.vpc, + service: InterfaceVpcEndpointAwsService.ECR, + subnets: { + subnetType: SubnetType.PUBLIC, + }, + }); + + // Add ECR Docker VPC Endpoint + new InterfaceVpcEndpoint(this, 'EcrDkrEndpoint', { + vpc: this.vpc, + service: InterfaceVpcEndpointAwsService.ECR_DOCKER, + subnets: { + subnetType: SubnetType.PUBLIC, + }, + }); + + // Add S3 Gateway Endpoint as ECR uses S3 to store layers + new GatewayVpcEndpoint(this, 's3Endpoint', { + vpc: this.vpc, + service: GatewayVpcEndpointAwsService.S3, + subnets: [ + { + subnetType: SubnetType.PUBLIC, + }, + ], + }); + + // Create Security Groups + this.albSecurityGroup = new SecurityGroup(this, this.ALB_SECURITY_GROUP_NAME, { + vpc: this.vpc, + securityGroupName: this.ALB_SECURITY_GROUP_NAME, + allowAllOutbound: true, + }); + this.albSecurityGroup.addIngressRule(Peer.anyIpv4(), Port.tcp(80), 'Allow HTTP traffic'); + + this.ecsSecurityGroup = new SecurityGroup(this, this.ECS_SECURITY_GROUP_NAME, { + vpc: this.vpc, + securityGroupName: this.ECS_SECURITY_GROUP_NAME, + allowAllOutbound: true, + }); + this.ecsSecurityGroup.addIngressRule(this.ecsSecurityGroup, Port.allTraffic()); + this.ecsSecurityGroup.addIngressRule(this.albSecurityGroup, Port.tcp(8080)); + + this.rdsSecurityGroup = new SecurityGroup(this, this.RDS_SECURITY_GROUP_NAME, { + vpc: this.vpc, + securityGroupName: this.RDS_SECURITY_GROUP_NAME, + allowAllOutbound: true, + }); + this.rdsSecurityGroup.addIngressRule(this.ecsSecurityGroup, Port.tcp(5432)); + + // Output the VPC ID, subnet ID and security group ID + new CfnOutput(this, 'VPCId', { value: this.vpc.vpcId }); + new CfnOutput(this, 'AlbSecurityGroup', { + value: this.albSecurityGroup.securityGroupId, + }); + new CfnOutput(this, 'RdsSecurityGroup', { + value: this.rdsSecurityGroup.securityGroupId, + }); + } +} diff --git a/cdk/ecs/lib/stacks/servicediscoveryStack.ts b/cdk/ecs/lib/stacks/servicediscoveryStack.ts new file mode 100644 index 0000000..62f63ca --- /dev/null +++ b/cdk/ecs/lib/stacks/servicediscoveryStack.ts @@ -0,0 +1,37 @@ +import { Construct } from 'constructs'; +import { Stack, StackProps, CfnOutput, Duration } from 'aws-cdk-lib'; +import { PrivateDnsNamespace, Service, RoutingPolicy, DnsRecordType } from 'aws-cdk-lib/aws-servicediscovery'; +import { Vpc } from 'aws-cdk-lib/aws-ec2'; + +interface ServiceDiscoveryStackProps extends StackProps { + readonly vpc: Vpc; +} + +export class ServiceDiscoveryStack extends Stack { + public readonly namespace: PrivateDnsNamespace; + + constructor(scope: Construct, id: string, props: ServiceDiscoveryStackProps) { + super(scope, id); + + this.namespace = new PrivateDnsNamespace(this, 'Namespace', { + vpc: props.vpc, + name: 'ecs-pet-clinic', + }); + + new CfnOutput(this, 'NamespaceId', { value: this.namespace.namespaceId }); + } + + createService(serviceName: string) { + const dnsService = `${serviceName}-DNS`; + return new Service(this, dnsService, { + namespace: this.namespace, + name: dnsService, + customHealthCheck: { + failureThreshold: 2, // TODO: A known issue that failure threshold cannot be set other than 1: https://github.com/hashicorp/terraform-provider-aws/issues/35559 + }, + routingPolicy: RoutingPolicy.WEIGHTED, + dnsRecordType: DnsRecordType.A, + dnsTtl: Duration.seconds(300), + }); + } +} diff --git a/cdk/ecs/lib/utils.ts b/cdk/ecs/lib/utils.ts new file mode 100644 index 0000000..508a829 --- /dev/null +++ b/cdk/ecs/lib/utils.ts @@ -0,0 +1,30 @@ +async function getLatestAdotJavaTag(): Promise { + const response = await fetch('https://github.com/aws-observability/aws-otel-java-instrumentation/releases/latest', { + method: 'HEAD', + redirect: 'follow', + }); + + // Get the final URL after redirects + const finalUrl = response.url; + + // Extract the tag from the URL + return finalUrl.split('/').pop() || ''; +} + +async function getLatestAdotPythonTag(): Promise { + const response = await fetch( + 'https://github.com/aws-observability/aws-otel-python-instrumentation/releases/latest', + { + method: 'HEAD', + redirect: 'follow', + }, + ); + + // Get the final URL after redirects + const finalUrl = response.url; + + // Extract the tag from the URL + return finalUrl.split('/').pop() || ''; +} + +export { getLatestAdotJavaTag, getLatestAdotPythonTag }; diff --git a/cdk/ecs/package-lock.json b/cdk/ecs/package-lock.json new file mode 100644 index 0000000..eec11a6 --- /dev/null +++ b/cdk/ecs/package-lock.json @@ -0,0 +1,4151 @@ +{ + "name": "cdk-ecs", + "version": "0.1.0", + "lockfileVersion": 3, + "requires": true, + "packages": { + "": { + "name": "cdk-ecs", + "version": "0.1.0", + "dependencies": { + "aws-cdk-lib": "2.166.0", + "constructs": "^10.0.0", + "source-map-support": "^0.5.21" + }, + "devDependencies": { + "@types/jest": "^29.5.14", + "@types/node": "22.7.9", + "aws-cdk": "2.166.0", + "jest": "^29.7.0", + "prettier": "3.3.3", + "ts-jest": "^29.2.5", + "ts-node": "^10.9.2", + "typescript": "~5.6.3" + } + }, + "node_modules/@ampproject/remapping": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/@ampproject/remapping/-/remapping-2.3.0.tgz", + "integrity": "sha512-30iZtAPgz+LTIYoeivqYo853f02jBYSd5uGnGpkFV0M3xOt9aN73erkgYAmZU43x4VfqcnLxW9Kpg3R5LC4YYw==", + "dev": true, + "dependencies": { + "@jridgewell/gen-mapping": "^0.3.5", + "@jridgewell/trace-mapping": "^0.3.24" + }, + "engines": { + "node": ">=6.0.0" + } + }, + "node_modules/@aws-cdk/asset-awscli-v1": { + "version": "2.2.211", + "resolved": "https://registry.npmjs.org/@aws-cdk/asset-awscli-v1/-/asset-awscli-v1-2.2.211.tgz", + "integrity": "sha512-56G1FYTiKyec3bEfEI/5UcU0XPnaGUlaDDH7OYClyvqss0HlnmoSulHK2gwai2PGAD1Nk+scPrdfH/MVAkSKuw==" + }, + "node_modules/@aws-cdk/asset-kubectl-v20": { + "version": "2.1.3", + "resolved": "https://registry.npmjs.org/@aws-cdk/asset-kubectl-v20/-/asset-kubectl-v20-2.1.3.tgz", + "integrity": "sha512-cDG1w3ieM6eOT9mTefRuTypk95+oyD7P5X/wRltwmYxU7nZc3+076YEVS6vrjDKr3ADYbfn0lDKpfB1FBtO9CQ==" + }, + "node_modules/@aws-cdk/asset-node-proxy-agent-v6": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/@aws-cdk/asset-node-proxy-agent-v6/-/asset-node-proxy-agent-v6-2.1.0.tgz", + "integrity": "sha512-7bY3J8GCVxLupn/kNmpPc5VJz8grx+4RKfnnJiO1LG+uxkZfANZG3RMHhE+qQxxwkyQ9/MfPtTpf748UhR425A==" + }, + "node_modules/@aws-cdk/cloud-assembly-schema": { + "version": "38.0.1", + "resolved": "https://registry.npmjs.org/@aws-cdk/cloud-assembly-schema/-/cloud-assembly-schema-38.0.1.tgz", + "integrity": "sha512-KvPe+NMWAulfNVwY7jenFhzhuLhLqJ/OPy5jx7wUstbjnYnjRVLpUHPU3yCjXFE0J8cuJVdx95BJ4rOs66Pi9w==", + "bundleDependencies": [ + "jsonschema", + "semver" + ], + "dependencies": { + "jsonschema": "^1.4.1", + "semver": "^7.6.3" + } + }, + "node_modules/@aws-cdk/cloud-assembly-schema/node_modules/jsonschema": { + "version": "1.4.1", + "inBundle": true, + "license": "MIT", + "engines": { + "node": "*" + } + }, + "node_modules/@aws-cdk/cloud-assembly-schema/node_modules/semver": { + "version": "7.6.3", + "inBundle": true, + "license": "ISC", + "bin": { + "semver": "bin/semver.js" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/@babel/code-frame": { + "version": "7.26.2", + "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.26.2.tgz", + "integrity": "sha512-RJlIHRueQgwWitWgF8OdFYGZX328Ax5BCemNGlqHfplnRT9ESi8JkFlvaVYbS+UubVY6dpv87Fs2u5M29iNFVQ==", + "dev": true, + "dependencies": { + "@babel/helper-validator-identifier": "^7.25.9", + "js-tokens": "^4.0.0", + "picocolors": "^1.0.0" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/compat-data": { + "version": "7.26.2", + "resolved": "https://registry.npmjs.org/@babel/compat-data/-/compat-data-7.26.2.tgz", + "integrity": "sha512-Z0WgzSEa+aUcdiJuCIqgujCshpMWgUpgOxXotrYPSA53hA3qopNaqcJpyr0hVb1FeWdnqFA35/fUtXgBK8srQg==", + "dev": true, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/core": { + "version": "7.26.0", + "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.26.0.tgz", + "integrity": "sha512-i1SLeK+DzNnQ3LL/CswPCa/E5u4lh1k6IAEphON8F+cXt0t9euTshDru0q7/IqMa1PMPz5RnHuHscF8/ZJsStg==", + "dev": true, + "dependencies": { + "@ampproject/remapping": "^2.2.0", + "@babel/code-frame": "^7.26.0", + "@babel/generator": "^7.26.0", + "@babel/helper-compilation-targets": "^7.25.9", + "@babel/helper-module-transforms": "^7.26.0", + "@babel/helpers": "^7.26.0", + "@babel/parser": "^7.26.0", + "@babel/template": "^7.25.9", + "@babel/traverse": "^7.25.9", + "@babel/types": "^7.26.0", + "convert-source-map": "^2.0.0", + "debug": "^4.1.0", + "gensync": "^1.0.0-beta.2", + "json5": "^2.2.3", + "semver": "^6.3.1" + }, + "engines": { + "node": ">=6.9.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/babel" + } + }, + "node_modules/@babel/generator": { + "version": "7.26.2", + "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.26.2.tgz", + "integrity": "sha512-zevQbhbau95nkoxSq3f/DC/SC+EEOUZd3DYqfSkMhY2/wfSeaHV1Ew4vk8e+x8lja31IbyuUa2uQ3JONqKbysw==", + "dev": true, + "dependencies": { + "@babel/parser": "^7.26.2", + "@babel/types": "^7.26.0", + "@jridgewell/gen-mapping": "^0.3.5", + "@jridgewell/trace-mapping": "^0.3.25", + "jsesc": "^3.0.2" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-compilation-targets": { + "version": "7.25.9", + "resolved": "https://registry.npmjs.org/@babel/helper-compilation-targets/-/helper-compilation-targets-7.25.9.tgz", + "integrity": "sha512-j9Db8Suy6yV/VHa4qzrj9yZfZxhLWQdVnRlXxmKLYlhWUVB1sB2G5sxuWYXk/whHD9iW76PmNzxZ4UCnTQTVEQ==", + "dev": true, + "dependencies": { + "@babel/compat-data": "^7.25.9", + "@babel/helper-validator-option": "^7.25.9", + "browserslist": "^4.24.0", + "lru-cache": "^5.1.1", + "semver": "^6.3.1" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-module-imports": { + "version": "7.25.9", + "resolved": "https://registry.npmjs.org/@babel/helper-module-imports/-/helper-module-imports-7.25.9.tgz", + "integrity": "sha512-tnUA4RsrmflIM6W6RFTLFSXITtl0wKjgpnLgXyowocVPrbYrLUXSBXDgTs8BlbmIzIdlBySRQjINYs2BAkiLtw==", + "dev": true, + "dependencies": { + "@babel/traverse": "^7.25.9", + "@babel/types": "^7.25.9" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-module-transforms": { + "version": "7.26.0", + "resolved": "https://registry.npmjs.org/@babel/helper-module-transforms/-/helper-module-transforms-7.26.0.tgz", + "integrity": "sha512-xO+xu6B5K2czEnQye6BHA7DolFFmS3LB7stHZFaOLb1pAwO1HWLS8fXA+eh0A2yIvltPVmx3eNNDBJA2SLHXFw==", + "dev": true, + "dependencies": { + "@babel/helper-module-imports": "^7.25.9", + "@babel/helper-validator-identifier": "^7.25.9", + "@babel/traverse": "^7.25.9" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0" + } + }, + "node_modules/@babel/helper-plugin-utils": { + "version": "7.25.9", + "resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.25.9.tgz", + "integrity": "sha512-kSMlyUVdWe25rEsRGviIgOWnoT/nfABVWlqt9N19/dIPWViAOW2s9wznP5tURbs/IDuNk4gPy3YdYRgH3uxhBw==", + "dev": true, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-string-parser": { + "version": "7.25.9", + "resolved": "https://registry.npmjs.org/@babel/helper-string-parser/-/helper-string-parser-7.25.9.tgz", + "integrity": "sha512-4A/SCr/2KLd5jrtOMFzaKjVtAei3+2r/NChoBNoZ3EyP/+GlhoaEGoWOZUmFmoITP7zOJyHIMm+DYRd8o3PvHA==", + "dev": true, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-validator-identifier": { + "version": "7.25.9", + "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.25.9.tgz", + "integrity": "sha512-Ed61U6XJc3CVRfkERJWDz4dJwKe7iLmmJsbOGu9wSloNSFttHV0I8g6UAgb7qnK5ly5bGLPd4oXZlxCdANBOWQ==", + "dev": true, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-validator-option": { + "version": "7.25.9", + "resolved": "https://registry.npmjs.org/@babel/helper-validator-option/-/helper-validator-option-7.25.9.tgz", + "integrity": "sha512-e/zv1co8pp55dNdEcCynfj9X7nyUKUXoUEwfXqaZt0omVOmDe9oOTdKStH4GmAw6zxMFs50ZayuMfHDKlO7Tfw==", + "dev": true, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helpers": { + "version": "7.26.0", + "resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.26.0.tgz", + "integrity": "sha512-tbhNuIxNcVb21pInl3ZSjksLCvgdZy9KwJ8brv993QtIVKJBBkYXz4q4ZbAv31GdnC+R90np23L5FbEBlthAEw==", + "dev": true, + "dependencies": { + "@babel/template": "^7.25.9", + "@babel/types": "^7.26.0" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/parser": { + "version": "7.26.2", + "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.26.2.tgz", + "integrity": "sha512-DWMCZH9WA4Maitz2q21SRKHo9QXZxkDsbNZoVD62gusNtNBBqDg9i7uOhASfTfIGNzW+O+r7+jAlM8dwphcJKQ==", + "dev": true, + "dependencies": { + "@babel/types": "^7.26.0" + }, + "bin": { + "parser": "bin/babel-parser.js" + }, + "engines": { + "node": ">=6.0.0" + } + }, + "node_modules/@babel/plugin-syntax-async-generators": { + "version": "7.8.4", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-async-generators/-/plugin-syntax-async-generators-7.8.4.tgz", + "integrity": "sha512-tycmZxkGfZaxhMRbXlPXuVFpdWlXpir2W4AMhSJgRKzk/eDlIXOhb2LHWoLpDF7TEHylV5zNhykX6KAgHJmTNw==", + "dev": true, + "dependencies": { + "@babel/helper-plugin-utils": "^7.8.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-syntax-bigint": { + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-bigint/-/plugin-syntax-bigint-7.8.3.tgz", + "integrity": "sha512-wnTnFlG+YxQm3vDxpGE57Pj0srRU4sHE/mDkt1qv2YJJSeUAec2ma4WLUnUPeKjyrfntVwe/N6dCXpU+zL3Npg==", + "dev": true, + "dependencies": { + "@babel/helper-plugin-utils": "^7.8.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-syntax-class-properties": { + "version": "7.12.13", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-class-properties/-/plugin-syntax-class-properties-7.12.13.tgz", + "integrity": "sha512-fm4idjKla0YahUNgFNLCB0qySdsoPiZP3iQE3rky0mBUtMZ23yDJ9SJdg6dXTSDnulOVqiF3Hgr9nbXvXTQZYA==", + "dev": true, + "dependencies": { + "@babel/helper-plugin-utils": "^7.12.13" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-syntax-class-static-block": { + "version": "7.14.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-class-static-block/-/plugin-syntax-class-static-block-7.14.5.tgz", + "integrity": "sha512-b+YyPmr6ldyNnM6sqYeMWE+bgJcJpO6yS4QD7ymxgH34GBPNDM/THBh8iunyvKIZztiwLH4CJZ0RxTk9emgpjw==", + "dev": true, + "dependencies": { + "@babel/helper-plugin-utils": "^7.14.5" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-syntax-import-attributes": { + "version": "7.26.0", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-import-attributes/-/plugin-syntax-import-attributes-7.26.0.tgz", + "integrity": "sha512-e2dttdsJ1ZTpi3B9UYGLw41hifAubg19AtCu/2I/F1QNVclOBr1dYpTdmdyZ84Xiz43BS/tCUkMAZNLv12Pi+A==", + "dev": true, + "dependencies": { + "@babel/helper-plugin-utils": "^7.25.9" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-syntax-import-meta": { + "version": "7.10.4", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-import-meta/-/plugin-syntax-import-meta-7.10.4.tgz", + "integrity": "sha512-Yqfm+XDx0+Prh3VSeEQCPU81yC+JWZ2pDPFSS4ZdpfZhp4MkFMaDC1UqseovEKwSUpnIL7+vK+Clp7bfh0iD7g==", + "dev": true, + "dependencies": { + "@babel/helper-plugin-utils": "^7.10.4" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-syntax-json-strings": { + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-json-strings/-/plugin-syntax-json-strings-7.8.3.tgz", + "integrity": "sha512-lY6kdGpWHvjoe2vk4WrAapEuBR69EMxZl+RoGRhrFGNYVK8mOPAW8VfbT/ZgrFbXlDNiiaxQnAtgVCZ6jv30EA==", + "dev": true, + "dependencies": { + "@babel/helper-plugin-utils": "^7.8.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-syntax-jsx": { + "version": "7.25.9", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-jsx/-/plugin-syntax-jsx-7.25.9.tgz", + "integrity": "sha512-ld6oezHQMZsZfp6pWtbjaNDF2tiiCYYDqQszHt5VV437lewP9aSi2Of99CK0D0XB21k7FLgnLcmQKyKzynfeAA==", + "dev": true, + "dependencies": { + "@babel/helper-plugin-utils": "^7.25.9" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-syntax-logical-assignment-operators": { + "version": "7.10.4", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-logical-assignment-operators/-/plugin-syntax-logical-assignment-operators-7.10.4.tgz", + "integrity": "sha512-d8waShlpFDinQ5MtvGU9xDAOzKH47+FFoney2baFIoMr952hKOLp1HR7VszoZvOsV/4+RRszNY7D17ba0te0ig==", + "dev": true, + "dependencies": { + "@babel/helper-plugin-utils": "^7.10.4" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-syntax-nullish-coalescing-operator": { + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-nullish-coalescing-operator/-/plugin-syntax-nullish-coalescing-operator-7.8.3.tgz", + "integrity": "sha512-aSff4zPII1u2QD7y+F8oDsz19ew4IGEJg9SVW+bqwpwtfFleiQDMdzA/R+UlWDzfnHFCxxleFT0PMIrR36XLNQ==", + "dev": true, + "dependencies": { + "@babel/helper-plugin-utils": "^7.8.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-syntax-numeric-separator": { + "version": "7.10.4", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-numeric-separator/-/plugin-syntax-numeric-separator-7.10.4.tgz", + "integrity": "sha512-9H6YdfkcK/uOnY/K7/aA2xpzaAgkQn37yzWUMRK7OaPOqOpGS1+n0H5hxT9AUw9EsSjPW8SVyMJwYRtWs3X3ug==", + "dev": true, + "dependencies": { + "@babel/helper-plugin-utils": "^7.10.4" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-syntax-object-rest-spread": { + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-object-rest-spread/-/plugin-syntax-object-rest-spread-7.8.3.tgz", + "integrity": "sha512-XoqMijGZb9y3y2XskN+P1wUGiVwWZ5JmoDRwx5+3GmEplNyVM2s2Dg8ILFQm8rWM48orGy5YpI5Bl8U1y7ydlA==", + "dev": true, + "dependencies": { + "@babel/helper-plugin-utils": "^7.8.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-syntax-optional-catch-binding": { + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-optional-catch-binding/-/plugin-syntax-optional-catch-binding-7.8.3.tgz", + "integrity": "sha512-6VPD0Pc1lpTqw0aKoeRTMiB+kWhAoT24PA+ksWSBrFtl5SIRVpZlwN3NNPQjehA2E/91FV3RjLWoVTglWcSV3Q==", + "dev": true, + "dependencies": { + "@babel/helper-plugin-utils": "^7.8.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-syntax-optional-chaining": { + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-optional-chaining/-/plugin-syntax-optional-chaining-7.8.3.tgz", + "integrity": "sha512-KoK9ErH1MBlCPxV0VANkXW2/dw4vlbGDrFgz8bmUsBGYkFRcbRwMh6cIJubdPrkxRwuGdtCk0v/wPTKbQgBjkg==", + "dev": true, + "dependencies": { + "@babel/helper-plugin-utils": "^7.8.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-syntax-private-property-in-object": { + "version": "7.14.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-private-property-in-object/-/plugin-syntax-private-property-in-object-7.14.5.tgz", + "integrity": "sha512-0wVnp9dxJ72ZUJDV27ZfbSj6iHLoytYZmh3rFcxNnvsJF3ktkzLDZPy/mA17HGsaQT3/DQsWYX1f1QGWkCoVUg==", + "dev": true, + "dependencies": { + "@babel/helper-plugin-utils": "^7.14.5" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-syntax-top-level-await": { + "version": "7.14.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-top-level-await/-/plugin-syntax-top-level-await-7.14.5.tgz", + "integrity": "sha512-hx++upLv5U1rgYfwe1xBQUhRmU41NEvpUvrp8jkrSCdvGSnM5/qdRMtylJ6PG5OFkBaHkbTAKTnd3/YyESRHFw==", + "dev": true, + "dependencies": { + "@babel/helper-plugin-utils": "^7.14.5" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-syntax-typescript": { + "version": "7.25.9", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-typescript/-/plugin-syntax-typescript-7.25.9.tgz", + "integrity": "sha512-hjMgRy5hb8uJJjUcdWunWVcoi9bGpJp8p5Ol1229PoN6aytsLwNMgmdftO23wnCLMfVmTwZDWMPNq/D1SY60JQ==", + "dev": true, + "dependencies": { + "@babel/helper-plugin-utils": "^7.25.9" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/template": { + "version": "7.25.9", + "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.25.9.tgz", + "integrity": "sha512-9DGttpmPvIxBb/2uwpVo3dqJ+O6RooAFOS+lB+xDqoE2PVCE8nfoHMdZLpfCQRLwvohzXISPZcgxt80xLfsuwg==", + "dev": true, + "dependencies": { + "@babel/code-frame": "^7.25.9", + "@babel/parser": "^7.25.9", + "@babel/types": "^7.25.9" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/traverse": { + "version": "7.25.9", + "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.25.9.tgz", + "integrity": "sha512-ZCuvfwOwlz/bawvAuvcj8rrithP2/N55Tzz342AkTvq4qaWbGfmCk/tKhNaV2cthijKrPAA8SRJV5WWe7IBMJw==", + "dev": true, + "dependencies": { + "@babel/code-frame": "^7.25.9", + "@babel/generator": "^7.25.9", + "@babel/parser": "^7.25.9", + "@babel/template": "^7.25.9", + "@babel/types": "^7.25.9", + "debug": "^4.3.1", + "globals": "^11.1.0" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/types": { + "version": "7.26.0", + "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.26.0.tgz", + "integrity": "sha512-Z/yiTPj+lDVnF7lWeKCIJzaIkI0vYO87dMpZ4bg4TDrFe4XXLFWL1TbXU27gBP3QccxV9mZICCrnjnYlJjXHOA==", + "dev": true, + "dependencies": { + "@babel/helper-string-parser": "^7.25.9", + "@babel/helper-validator-identifier": "^7.25.9" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@bcoe/v8-coverage": { + "version": "0.2.3", + "resolved": "https://registry.npmjs.org/@bcoe/v8-coverage/-/v8-coverage-0.2.3.tgz", + "integrity": "sha512-0hYQ8SB4Db5zvZB4axdMHGwEaQjkZzFjQiN9LVYvIFB2nSUHW9tYpxWriPrWDASIxiaXax83REcLxuSdnGPZtw==", + "dev": true + }, + "node_modules/@cspotcode/source-map-support": { + "version": "0.8.1", + "resolved": "https://registry.npmjs.org/@cspotcode/source-map-support/-/source-map-support-0.8.1.tgz", + "integrity": "sha512-IchNf6dN4tHoMFIn/7OE8LWZ19Y6q/67Bmf6vnGREv8RSbBVb9LPJxEcnwrcwX6ixSvaiGoomAUvu4YSxXrVgw==", + "dev": true, + "dependencies": { + "@jridgewell/trace-mapping": "0.3.9" + }, + "engines": { + "node": ">=12" + } + }, + "node_modules/@cspotcode/source-map-support/node_modules/@jridgewell/trace-mapping": { + "version": "0.3.9", + "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.9.tgz", + "integrity": "sha512-3Belt6tdc8bPgAtbcmdtNJlirVoTmEb5e2gC94PnkwEW9jI6CAHUeoG85tjWP5WquqfavoMtMwiG4P926ZKKuQ==", + "dev": true, + "dependencies": { + "@jridgewell/resolve-uri": "^3.0.3", + "@jridgewell/sourcemap-codec": "^1.4.10" + } + }, + "node_modules/@istanbuljs/load-nyc-config": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@istanbuljs/load-nyc-config/-/load-nyc-config-1.1.0.tgz", + "integrity": "sha512-VjeHSlIzpv/NyD3N0YuHfXOPDIixcA1q2ZV98wsMqcYlPmv2n3Yb2lYP9XMElnaFVXg5A7YLTeLu6V84uQDjmQ==", + "dev": true, + "dependencies": { + "camelcase": "^5.3.1", + "find-up": "^4.1.0", + "get-package-type": "^0.1.0", + "js-yaml": "^3.13.1", + "resolve-from": "^5.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/@istanbuljs/schema": { + "version": "0.1.3", + "resolved": "https://registry.npmjs.org/@istanbuljs/schema/-/schema-0.1.3.tgz", + "integrity": "sha512-ZXRY4jNvVgSVQ8DL3LTcakaAtXwTVUxE81hslsyD2AtoXW/wVob10HkOJ1X/pAlcI7D+2YoZKg5do8G/w6RYgA==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/@jest/console": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/@jest/console/-/console-29.7.0.tgz", + "integrity": "sha512-5Ni4CU7XHQi32IJ398EEP4RrB8eV09sXP2ROqD4bksHrnTree52PsxvX8tpL8LvTZ3pFzXyPbNQReSN41CAhOg==", + "dev": true, + "dependencies": { + "@jest/types": "^29.6.3", + "@types/node": "*", + "chalk": "^4.0.0", + "jest-message-util": "^29.7.0", + "jest-util": "^29.7.0", + "slash": "^3.0.0" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/@jest/core": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/@jest/core/-/core-29.7.0.tgz", + "integrity": "sha512-n7aeXWKMnGtDA48y8TLWJPJmLmmZ642Ceo78cYWEpiD7FzDgmNDV/GCVRorPABdXLJZ/9wzzgZAlHjXjxDHGsg==", + "dev": true, + "dependencies": { + "@jest/console": "^29.7.0", + "@jest/reporters": "^29.7.0", + "@jest/test-result": "^29.7.0", + "@jest/transform": "^29.7.0", + "@jest/types": "^29.6.3", + "@types/node": "*", + "ansi-escapes": "^4.2.1", + "chalk": "^4.0.0", + "ci-info": "^3.2.0", + "exit": "^0.1.2", + "graceful-fs": "^4.2.9", + "jest-changed-files": "^29.7.0", + "jest-config": "^29.7.0", + "jest-haste-map": "^29.7.0", + "jest-message-util": "^29.7.0", + "jest-regex-util": "^29.6.3", + "jest-resolve": "^29.7.0", + "jest-resolve-dependencies": "^29.7.0", + "jest-runner": "^29.7.0", + "jest-runtime": "^29.7.0", + "jest-snapshot": "^29.7.0", + "jest-util": "^29.7.0", + "jest-validate": "^29.7.0", + "jest-watcher": "^29.7.0", + "micromatch": "^4.0.4", + "pretty-format": "^29.7.0", + "slash": "^3.0.0", + "strip-ansi": "^6.0.0" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + }, + "peerDependencies": { + "node-notifier": "^8.0.1 || ^9.0.0 || ^10.0.0" + }, + "peerDependenciesMeta": { + "node-notifier": { + "optional": true + } + } + }, + "node_modules/@jest/environment": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/@jest/environment/-/environment-29.7.0.tgz", + "integrity": "sha512-aQIfHDq33ExsN4jP1NWGXhxgQ/wixs60gDiKO+XVMd8Mn0NWPWgc34ZQDTb2jKaUWQ7MuwoitXAsN2XVXNMpAw==", + "dev": true, + "dependencies": { + "@jest/fake-timers": "^29.7.0", + "@jest/types": "^29.6.3", + "@types/node": "*", + "jest-mock": "^29.7.0" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/@jest/expect": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/@jest/expect/-/expect-29.7.0.tgz", + "integrity": "sha512-8uMeAMycttpva3P1lBHB8VciS9V0XAr3GymPpipdyQXbBcuhkLQOSe8E/p92RyAdToS6ZD1tFkX+CkhoECE0dQ==", + "dev": true, + "dependencies": { + "expect": "^29.7.0", + "jest-snapshot": "^29.7.0" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/@jest/expect-utils": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/@jest/expect-utils/-/expect-utils-29.7.0.tgz", + "integrity": "sha512-GlsNBWiFQFCVi9QVSx7f5AgMeLxe9YCCs5PuP2O2LdjDAA8Jh9eX7lA1Jq/xdXw3Wb3hyvlFNfZIfcRetSzYcA==", + "dev": true, + "dependencies": { + "jest-get-type": "^29.6.3" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/@jest/fake-timers": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/@jest/fake-timers/-/fake-timers-29.7.0.tgz", + "integrity": "sha512-q4DH1Ha4TTFPdxLsqDXK1d3+ioSL7yL5oCMJZgDYm6i+6CygW5E5xVr/D1HdsGxjt1ZWSfUAs9OxSB/BNelWrQ==", + "dev": true, + "dependencies": { + "@jest/types": "^29.6.3", + "@sinonjs/fake-timers": "^10.0.2", + "@types/node": "*", + "jest-message-util": "^29.7.0", + "jest-mock": "^29.7.0", + "jest-util": "^29.7.0" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/@jest/globals": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/@jest/globals/-/globals-29.7.0.tgz", + "integrity": "sha512-mpiz3dutLbkW2MNFubUGUEVLkTGiqW6yLVTA+JbP6fI6J5iL9Y0Nlg8k95pcF8ctKwCS7WVxteBs29hhfAotzQ==", + "dev": true, + "dependencies": { + "@jest/environment": "^29.7.0", + "@jest/expect": "^29.7.0", + "@jest/types": "^29.6.3", + "jest-mock": "^29.7.0" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/@jest/reporters": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/@jest/reporters/-/reporters-29.7.0.tgz", + "integrity": "sha512-DApq0KJbJOEzAFYjHADNNxAE3KbhxQB1y5Kplb5Waqw6zVbuWatSnMjE5gs8FUgEPmNsnZA3NCWl9NG0ia04Pg==", + "dev": true, + "dependencies": { + "@bcoe/v8-coverage": "^0.2.3", + "@jest/console": "^29.7.0", + "@jest/test-result": "^29.7.0", + "@jest/transform": "^29.7.0", + "@jest/types": "^29.6.3", + "@jridgewell/trace-mapping": "^0.3.18", + "@types/node": "*", + "chalk": "^4.0.0", + "collect-v8-coverage": "^1.0.0", + "exit": "^0.1.2", + "glob": "^7.1.3", + "graceful-fs": "^4.2.9", + "istanbul-lib-coverage": "^3.0.0", + "istanbul-lib-instrument": "^6.0.0", + "istanbul-lib-report": "^3.0.0", + "istanbul-lib-source-maps": "^4.0.0", + "istanbul-reports": "^3.1.3", + "jest-message-util": "^29.7.0", + "jest-util": "^29.7.0", + "jest-worker": "^29.7.0", + "slash": "^3.0.0", + "string-length": "^4.0.1", + "strip-ansi": "^6.0.0", + "v8-to-istanbul": "^9.0.1" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + }, + "peerDependencies": { + "node-notifier": "^8.0.1 || ^9.0.0 || ^10.0.0" + }, + "peerDependenciesMeta": { + "node-notifier": { + "optional": true + } + } + }, + "node_modules/@jest/schemas": { + "version": "29.6.3", + "resolved": "https://registry.npmjs.org/@jest/schemas/-/schemas-29.6.3.tgz", + "integrity": "sha512-mo5j5X+jIZmJQveBKeS/clAueipV7KgiX1vMgCxam1RNYiqE1w62n0/tJJnHtjW8ZHcQco5gY85jA3mi0L+nSA==", + "dev": true, + "dependencies": { + "@sinclair/typebox": "^0.27.8" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/@jest/source-map": { + "version": "29.6.3", + "resolved": "https://registry.npmjs.org/@jest/source-map/-/source-map-29.6.3.tgz", + "integrity": "sha512-MHjT95QuipcPrpLM+8JMSzFx6eHp5Bm+4XeFDJlwsvVBjmKNiIAvasGK2fxz2WbGRlnvqehFbh07MMa7n3YJnw==", + "dev": true, + "dependencies": { + "@jridgewell/trace-mapping": "^0.3.18", + "callsites": "^3.0.0", + "graceful-fs": "^4.2.9" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/@jest/test-result": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/@jest/test-result/-/test-result-29.7.0.tgz", + "integrity": "sha512-Fdx+tv6x1zlkJPcWXmMDAG2HBnaR9XPSd5aDWQVsfrZmLVT3lU1cwyxLgRmXR9yrq4NBoEm9BMsfgFzTQAbJYA==", + "dev": true, + "dependencies": { + "@jest/console": "^29.7.0", + "@jest/types": "^29.6.3", + "@types/istanbul-lib-coverage": "^2.0.0", + "collect-v8-coverage": "^1.0.0" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/@jest/test-sequencer": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/@jest/test-sequencer/-/test-sequencer-29.7.0.tgz", + "integrity": "sha512-GQwJ5WZVrKnOJuiYiAF52UNUJXgTZx1NHjFSEB0qEMmSZKAkdMoIzw/Cj6x6NF4AvV23AUqDpFzQkN/eYCYTxw==", + "dev": true, + "dependencies": { + "@jest/test-result": "^29.7.0", + "graceful-fs": "^4.2.9", + "jest-haste-map": "^29.7.0", + "slash": "^3.0.0" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/@jest/transform": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/@jest/transform/-/transform-29.7.0.tgz", + "integrity": "sha512-ok/BTPFzFKVMwO5eOHRrvnBVHdRy9IrsrW1GpMaQ9MCnilNLXQKmAX8s1YXDFaai9xJpac2ySzV0YeRRECr2Vw==", + "dev": true, + "dependencies": { + "@babel/core": "^7.11.6", + "@jest/types": "^29.6.3", + "@jridgewell/trace-mapping": "^0.3.18", + "babel-plugin-istanbul": "^6.1.1", + "chalk": "^4.0.0", + "convert-source-map": "^2.0.0", + "fast-json-stable-stringify": "^2.1.0", + "graceful-fs": "^4.2.9", + "jest-haste-map": "^29.7.0", + "jest-regex-util": "^29.6.3", + "jest-util": "^29.7.0", + "micromatch": "^4.0.4", + "pirates": "^4.0.4", + "slash": "^3.0.0", + "write-file-atomic": "^4.0.2" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/@jest/types": { + "version": "29.6.3", + "resolved": "https://registry.npmjs.org/@jest/types/-/types-29.6.3.tgz", + "integrity": "sha512-u3UPsIilWKOM3F9CXtrG8LEJmNxwoCQC/XVj4IKYXvvpx7QIi/Kg1LI5uDmDpKlac62NUtX7eLjRh+jVZcLOzw==", + "dev": true, + "dependencies": { + "@jest/schemas": "^29.6.3", + "@types/istanbul-lib-coverage": "^2.0.0", + "@types/istanbul-reports": "^3.0.0", + "@types/node": "*", + "@types/yargs": "^17.0.8", + "chalk": "^4.0.0" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/@jridgewell/gen-mapping": { + "version": "0.3.5", + "resolved": "https://registry.npmjs.org/@jridgewell/gen-mapping/-/gen-mapping-0.3.5.tgz", + "integrity": "sha512-IzL8ZoEDIBRWEzlCcRhOaCupYyN5gdIK+Q6fbFdPDg6HqX6jpkItn7DFIpW9LQzXG6Df9sA7+OKnq0qlz/GaQg==", + "dev": true, + "dependencies": { + "@jridgewell/set-array": "^1.2.1", + "@jridgewell/sourcemap-codec": "^1.4.10", + "@jridgewell/trace-mapping": "^0.3.24" + }, + "engines": { + "node": ">=6.0.0" + } + }, + "node_modules/@jridgewell/resolve-uri": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/@jridgewell/resolve-uri/-/resolve-uri-3.1.2.tgz", + "integrity": "sha512-bRISgCIjP20/tbWSPWMEi54QVPRZExkuD9lJL+UIxUKtwVJA8wW1Trb1jMs1RFXo1CBTNZ/5hpC9QvmKWdopKw==", + "dev": true, + "engines": { + "node": ">=6.0.0" + } + }, + "node_modules/@jridgewell/set-array": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/@jridgewell/set-array/-/set-array-1.2.1.tgz", + "integrity": "sha512-R8gLRTZeyp03ymzP/6Lil/28tGeGEzhx1q2k703KGWRAI1VdvPIXdG70VJc2pAMw3NA6JKL5hhFu1sJX0Mnn/A==", + "dev": true, + "engines": { + "node": ">=6.0.0" + } + }, + "node_modules/@jridgewell/sourcemap-codec": { + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.5.0.tgz", + "integrity": "sha512-gv3ZRaISU3fjPAgNsriBRqGWQL6quFx04YMPW/zD8XMLsU32mhCCbfbO6KZFLjvYpCZ8zyDEgqsgf+PwPaM7GQ==", + "dev": true + }, + "node_modules/@jridgewell/trace-mapping": { + "version": "0.3.25", + "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.25.tgz", + "integrity": "sha512-vNk6aEwybGtawWmy/PzwnGDOjCkLWSD2wqvjGGAgOAwCGWySYXfYoxt00IJkTF+8Lb57DwOb3Aa0o9CApepiYQ==", + "dev": true, + "dependencies": { + "@jridgewell/resolve-uri": "^3.1.0", + "@jridgewell/sourcemap-codec": "^1.4.14" + } + }, + "node_modules/@sinclair/typebox": { + "version": "0.27.8", + "resolved": "https://registry.npmjs.org/@sinclair/typebox/-/typebox-0.27.8.tgz", + "integrity": "sha512-+Fj43pSMwJs4KRrH/938Uf+uAELIgVBmQzg/q1YG10djyfA3TnrU8N8XzqCh/okZdszqBQTZf96idMfE5lnwTA==", + "dev": true + }, + "node_modules/@sinonjs/commons": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/@sinonjs/commons/-/commons-3.0.1.tgz", + "integrity": "sha512-K3mCHKQ9sVh8o1C9cxkwxaOmXoAMlDxC1mYyHrjqOWEcBjYr76t96zL2zlj5dUGZ3HSw240X1qgH3Mjf1yJWpQ==", + "dev": true, + "dependencies": { + "type-detect": "4.0.8" + } + }, + "node_modules/@sinonjs/fake-timers": { + "version": "10.3.0", + "resolved": "https://registry.npmjs.org/@sinonjs/fake-timers/-/fake-timers-10.3.0.tgz", + "integrity": "sha512-V4BG07kuYSUkTCSBHG8G8TNhM+F19jXFWnQtzj+we8DrkpSBCee9Z3Ms8yiGer/dlmhe35/Xdgyo3/0rQKg7YA==", + "dev": true, + "dependencies": { + "@sinonjs/commons": "^3.0.0" + } + }, + "node_modules/@tsconfig/node10": { + "version": "1.0.11", + "resolved": "https://registry.npmjs.org/@tsconfig/node10/-/node10-1.0.11.tgz", + "integrity": "sha512-DcRjDCujK/kCk/cUe8Xz8ZSpm8mS3mNNpta+jGCA6USEDfktlNvm1+IuZ9eTcDbNk41BHwpHHeW+N1lKCz4zOw==", + "dev": true + }, + "node_modules/@tsconfig/node12": { + "version": "1.0.11", + "resolved": "https://registry.npmjs.org/@tsconfig/node12/-/node12-1.0.11.tgz", + "integrity": "sha512-cqefuRsh12pWyGsIoBKJA9luFu3mRxCA+ORZvA4ktLSzIuCUtWVxGIuXigEwO5/ywWFMZ2QEGKWvkZG1zDMTag==", + "dev": true + }, + "node_modules/@tsconfig/node14": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/@tsconfig/node14/-/node14-1.0.3.tgz", + "integrity": "sha512-ysT8mhdixWK6Hw3i1V2AeRqZ5WfXg1G43mqoYlM2nc6388Fq5jcXyr5mRsqViLx/GJYdoL0bfXD8nmF+Zn/Iow==", + "dev": true + }, + "node_modules/@tsconfig/node16": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/@tsconfig/node16/-/node16-1.0.4.tgz", + "integrity": "sha512-vxhUy4J8lyeyinH7Azl1pdd43GJhZH/tP2weN8TntQblOY+A0XbT8DJk1/oCPuOOyg/Ja757rG0CgHcWC8OfMA==", + "dev": true + }, + "node_modules/@types/babel__core": { + "version": "7.20.5", + "resolved": "https://registry.npmjs.org/@types/babel__core/-/babel__core-7.20.5.tgz", + "integrity": "sha512-qoQprZvz5wQFJwMDqeseRXWv3rqMvhgpbXFfVyWhbx9X47POIA6i/+dXefEmZKoAgOaTdaIgNSMqMIU61yRyzA==", + "dev": true, + "dependencies": { + "@babel/parser": "^7.20.7", + "@babel/types": "^7.20.7", + "@types/babel__generator": "*", + "@types/babel__template": "*", + "@types/babel__traverse": "*" + } + }, + "node_modules/@types/babel__generator": { + "version": "7.6.8", + "resolved": "https://registry.npmjs.org/@types/babel__generator/-/babel__generator-7.6.8.tgz", + "integrity": "sha512-ASsj+tpEDsEiFr1arWrlN6V3mdfjRMZt6LtK/Vp/kreFLnr5QH5+DhvD5nINYZXzwJvXeGq+05iUXcAzVrqWtw==", + "dev": true, + "dependencies": { + "@babel/types": "^7.0.0" + } + }, + "node_modules/@types/babel__template": { + "version": "7.4.4", + "resolved": "https://registry.npmjs.org/@types/babel__template/-/babel__template-7.4.4.tgz", + "integrity": "sha512-h/NUaSyG5EyxBIp8YRxo4RMe2/qQgvyowRwVMzhYhBCONbW8PUsg4lkFMrhgZhUe5z3L3MiLDuvyJ/CaPa2A8A==", + "dev": true, + "dependencies": { + "@babel/parser": "^7.1.0", + "@babel/types": "^7.0.0" + } + }, + "node_modules/@types/babel__traverse": { + "version": "7.20.6", + "resolved": "https://registry.npmjs.org/@types/babel__traverse/-/babel__traverse-7.20.6.tgz", + "integrity": "sha512-r1bzfrm0tomOI8g1SzvCaQHo6Lcv6zu0EA+W2kHrt8dyrHQxGzBBL4kdkzIS+jBMV+EYcMAEAqXqYaLJq5rOZg==", + "dev": true, + "dependencies": { + "@babel/types": "^7.20.7" + } + }, + "node_modules/@types/graceful-fs": { + "version": "4.1.9", + "resolved": "https://registry.npmjs.org/@types/graceful-fs/-/graceful-fs-4.1.9.tgz", + "integrity": "sha512-olP3sd1qOEe5dXTSaFvQG+02VdRXcdytWLAZsAq1PecU8uqQAhkrnbli7DagjtXKW/Bl7YJbUsa8MPcuc8LHEQ==", + "dev": true, + "dependencies": { + "@types/node": "*" + } + }, + "node_modules/@types/istanbul-lib-coverage": { + "version": "2.0.6", + "resolved": "https://registry.npmjs.org/@types/istanbul-lib-coverage/-/istanbul-lib-coverage-2.0.6.tgz", + "integrity": "sha512-2QF/t/auWm0lsy8XtKVPG19v3sSOQlJe/YHZgfjb/KBBHOGSV+J2q/S671rcq9uTBrLAXmZpqJiaQbMT+zNU1w==", + "dev": true + }, + "node_modules/@types/istanbul-lib-report": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/@types/istanbul-lib-report/-/istanbul-lib-report-3.0.3.tgz", + "integrity": "sha512-NQn7AHQnk/RSLOxrBbGyJM/aVQ+pjj5HCgasFxc0K/KhoATfQ/47AyUl15I2yBUpihjmas+a+VJBOqecrFH+uA==", + "dev": true, + "dependencies": { + "@types/istanbul-lib-coverage": "*" + } + }, + "node_modules/@types/istanbul-reports": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/@types/istanbul-reports/-/istanbul-reports-3.0.4.tgz", + "integrity": "sha512-pk2B1NWalF9toCRu6gjBzR69syFjP4Od8WRAX+0mmf9lAjCRicLOWc+ZrxZHx/0XRjotgkF9t6iaMJ+aXcOdZQ==", + "dev": true, + "dependencies": { + "@types/istanbul-lib-report": "*" + } + }, + "node_modules/@types/jest": { + "version": "29.5.14", + "resolved": "https://registry.npmjs.org/@types/jest/-/jest-29.5.14.tgz", + "integrity": "sha512-ZN+4sdnLUbo8EVvVc2ao0GFW6oVrQRPn4K2lglySj7APvSrgzxHiNNK99us4WDMi57xxA2yggblIAMNhXOotLQ==", + "dev": true, + "dependencies": { + "expect": "^29.0.0", + "pretty-format": "^29.0.0" + } + }, + "node_modules/@types/node": { + "version": "22.7.9", + "resolved": "https://registry.npmjs.org/@types/node/-/node-22.7.9.tgz", + "integrity": "sha512-jrTfRC7FM6nChvU7X2KqcrgquofrWLFDeYC1hKfwNWomVvrn7JIksqf344WN2X/y8xrgqBd2dJATZV4GbatBfg==", + "dev": true, + "dependencies": { + "undici-types": "~6.19.2" + } + }, + "node_modules/@types/stack-utils": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/@types/stack-utils/-/stack-utils-2.0.3.tgz", + "integrity": "sha512-9aEbYZ3TbYMznPdcdr3SmIrLXwC/AKZXQeCf9Pgao5CKb8CyHuEX5jzWPTkvregvhRJHcpRO6BFoGW9ycaOkYw==", + "dev": true + }, + "node_modules/@types/yargs": { + "version": "17.0.33", + "resolved": "https://registry.npmjs.org/@types/yargs/-/yargs-17.0.33.tgz", + "integrity": "sha512-WpxBCKWPLr4xSsHgz511rFJAM+wS28w2zEO1QDNY5zM/S8ok70NNfztH0xwhqKyaK0OHCbN98LDAZuy1ctxDkA==", + "dev": true, + "dependencies": { + "@types/yargs-parser": "*" + } + }, + "node_modules/@types/yargs-parser": { + "version": "21.0.3", + "resolved": "https://registry.npmjs.org/@types/yargs-parser/-/yargs-parser-21.0.3.tgz", + "integrity": "sha512-I4q9QU9MQv4oEOz4tAHJtNz1cwuLxn2F3xcc2iV5WdqLPpUnj30aUuxt1mAxYTG+oe8CZMV/+6rU4S4gRDzqtQ==", + "dev": true + }, + "node_modules/acorn": { + "version": "8.14.0", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.14.0.tgz", + "integrity": "sha512-cl669nCJTZBsL97OF4kUQm5g5hC2uihk0NxY3WENAC0TYdILVkAyHymAntgxGkl7K+t0cXIrH5siy5S4XkFycA==", + "dev": true, + "bin": { + "acorn": "bin/acorn" + }, + "engines": { + "node": ">=0.4.0" + } + }, + "node_modules/acorn-walk": { + "version": "8.3.4", + "resolved": "https://registry.npmjs.org/acorn-walk/-/acorn-walk-8.3.4.tgz", + "integrity": "sha512-ueEepnujpqee2o5aIYnvHU6C0A42MNdsIDeqy5BydrkuC5R1ZuUFnm27EeFJGoEHJQgn3uleRvmTXaJgfXbt4g==", + "dev": true, + "dependencies": { + "acorn": "^8.11.0" + }, + "engines": { + "node": ">=0.4.0" + } + }, + "node_modules/ansi-escapes": { + "version": "4.3.2", + "resolved": "https://registry.npmjs.org/ansi-escapes/-/ansi-escapes-4.3.2.tgz", + "integrity": "sha512-gKXj5ALrKWQLsYG9jlTRmR/xKluxHV+Z9QEwNIgCfM1/uwPMCuzVVnh5mwTd+OuBZcwSIMbqssNWRm1lE51QaQ==", + "dev": true, + "dependencies": { + "type-fest": "^0.21.3" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/ansi-regex": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", + "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/ansi-styles": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "dev": true, + "dependencies": { + "color-convert": "^2.0.1" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" + } + }, + "node_modules/anymatch": { + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-3.1.3.tgz", + "integrity": "sha512-KMReFUr0B4t+D+OBkjR3KYqvocp2XaSzO55UcB6mgQMd3KbcE+mWTyvVV7D/zsdEbNnV6acZUutkiHQXvTr1Rw==", + "dev": true, + "dependencies": { + "normalize-path": "^3.0.0", + "picomatch": "^2.0.4" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/arg": { + "version": "4.1.3", + "resolved": "https://registry.npmjs.org/arg/-/arg-4.1.3.tgz", + "integrity": "sha512-58S9QDqG0Xx27YwPSt9fJxivjYl432YCwfDMfZ+71RAqUrZef7LrKQZ3LHLOwCS4FLNBplP533Zx895SeOCHvA==", + "dev": true + }, + "node_modules/argparse": { + "version": "1.0.10", + "resolved": "https://registry.npmjs.org/argparse/-/argparse-1.0.10.tgz", + "integrity": "sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg==", + "dev": true, + "dependencies": { + "sprintf-js": "~1.0.2" + } + }, + "node_modules/async": { + "version": "3.2.6", + "resolved": "https://registry.npmjs.org/async/-/async-3.2.6.tgz", + "integrity": "sha512-htCUDlxyyCLMgaM3xXg0C0LW2xqfuQ6p05pCEIsXuyQ+a1koYKTuBMzRNwmybfLgvJDMd0r1LTn4+E0Ti6C2AA==", + "dev": true + }, + "node_modules/aws-cdk": { + "version": "2.166.0", + "resolved": "https://registry.npmjs.org/aws-cdk/-/aws-cdk-2.166.0.tgz", + "integrity": "sha512-AvwYXJt92lMlp0pB49HJtlvyWFZUBcX4DliIV3JfLngLpAlwVHQtvzPbL8qCvxHwZ3CIzJ1wKEth8QzdYmyOPQ==", + "dev": true, + "bin": { + "cdk": "bin/cdk" + }, + "engines": { + "node": ">= 14.15.0" + }, + "optionalDependencies": { + "fsevents": "2.3.2" + } + }, + "node_modules/aws-cdk-lib": { + "version": "2.166.0", + "resolved": "https://registry.npmjs.org/aws-cdk-lib/-/aws-cdk-lib-2.166.0.tgz", + "integrity": "sha512-FAsIz/CpczbMrcShgvTWNp3kcGN6IDojJWNLqHioTRsTekcyN3OPmKvQJXUNWL0fnhTd8biFXC2esg6kM19xZw==", + "bundleDependencies": [ + "@balena/dockerignore", + "case", + "fs-extra", + "ignore", + "jsonschema", + "minimatch", + "punycode", + "semver", + "table", + "yaml", + "mime-types" + ], + "dependencies": { + "@aws-cdk/asset-awscli-v1": "^2.2.208", + "@aws-cdk/asset-kubectl-v20": "^2.1.3", + "@aws-cdk/asset-node-proxy-agent-v6": "^2.1.0", + "@aws-cdk/cloud-assembly-schema": "^38.0.1", + "@balena/dockerignore": "^1.0.2", + "case": "1.6.3", + "fs-extra": "^11.2.0", + "ignore": "^5.3.2", + "jsonschema": "^1.4.1", + "mime-types": "^2.1.35", + "minimatch": "^3.1.2", + "punycode": "^2.3.1", + "semver": "^7.6.3", + "table": "^6.8.2", + "yaml": "1.10.2" + }, + "engines": { + "node": ">= 14.15.0" + }, + "peerDependencies": { + "constructs": "^10.0.0" + } + }, + "node_modules/aws-cdk-lib/node_modules/@balena/dockerignore": { + "version": "1.0.2", + "inBundle": true, + "license": "Apache-2.0" + }, + "node_modules/aws-cdk-lib/node_modules/ajv": { + "version": "8.17.1", + "inBundle": true, + "license": "MIT", + "dependencies": { + "fast-deep-equal": "^3.1.3", + "fast-uri": "^3.0.1", + "json-schema-traverse": "^1.0.0", + "require-from-string": "^2.0.2" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/epoberezkin" + } + }, + "node_modules/aws-cdk-lib/node_modules/ansi-regex": { + "version": "5.0.1", + "inBundle": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/aws-cdk-lib/node_modules/ansi-styles": { + "version": "4.3.0", + "inBundle": true, + "license": "MIT", + "dependencies": { + "color-convert": "^2.0.1" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" + } + }, + "node_modules/aws-cdk-lib/node_modules/astral-regex": { + "version": "2.0.0", + "inBundle": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/aws-cdk-lib/node_modules/balanced-match": { + "version": "1.0.2", + "inBundle": true, + "license": "MIT" + }, + "node_modules/aws-cdk-lib/node_modules/brace-expansion": { + "version": "1.1.11", + "inBundle": true, + "license": "MIT", + "dependencies": { + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" + } + }, + "node_modules/aws-cdk-lib/node_modules/case": { + "version": "1.6.3", + "inBundle": true, + "license": "(MIT OR GPL-3.0-or-later)", + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/aws-cdk-lib/node_modules/color-convert": { + "version": "2.0.1", + "inBundle": true, + "license": "MIT", + "dependencies": { + "color-name": "~1.1.4" + }, + "engines": { + "node": ">=7.0.0" + } + }, + "node_modules/aws-cdk-lib/node_modules/color-name": { + "version": "1.1.4", + "inBundle": true, + "license": "MIT" + }, + "node_modules/aws-cdk-lib/node_modules/concat-map": { + "version": "0.0.1", + "inBundle": true, + "license": "MIT" + }, + "node_modules/aws-cdk-lib/node_modules/emoji-regex": { + "version": "8.0.0", + "inBundle": true, + "license": "MIT" + }, + "node_modules/aws-cdk-lib/node_modules/fast-deep-equal": { + "version": "3.1.3", + "inBundle": true, + "license": "MIT" + }, + "node_modules/aws-cdk-lib/node_modules/fast-uri": { + "version": "3.0.3", + "inBundle": true, + "license": "BSD-3-Clause" + }, + "node_modules/aws-cdk-lib/node_modules/fs-extra": { + "version": "11.2.0", + "inBundle": true, + "license": "MIT", + "dependencies": { + "graceful-fs": "^4.2.0", + "jsonfile": "^6.0.1", + "universalify": "^2.0.0" + }, + "engines": { + "node": ">=14.14" + } + }, + "node_modules/aws-cdk-lib/node_modules/graceful-fs": { + "version": "4.2.11", + "inBundle": true, + "license": "ISC" + }, + "node_modules/aws-cdk-lib/node_modules/ignore": { + "version": "5.3.2", + "inBundle": true, + "license": "MIT", + "engines": { + "node": ">= 4" + } + }, + "node_modules/aws-cdk-lib/node_modules/is-fullwidth-code-point": { + "version": "3.0.0", + "inBundle": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/aws-cdk-lib/node_modules/json-schema-traverse": { + "version": "1.0.0", + "inBundle": true, + "license": "MIT" + }, + "node_modules/aws-cdk-lib/node_modules/jsonfile": { + "version": "6.1.0", + "inBundle": true, + "license": "MIT", + "dependencies": { + "universalify": "^2.0.0" + }, + "optionalDependencies": { + "graceful-fs": "^4.1.6" + } + }, + "node_modules/aws-cdk-lib/node_modules/jsonschema": { + "version": "1.4.1", + "inBundle": true, + "license": "MIT", + "engines": { + "node": "*" + } + }, + "node_modules/aws-cdk-lib/node_modules/lodash.truncate": { + "version": "4.4.2", + "inBundle": true, + "license": "MIT" + }, + "node_modules/aws-cdk-lib/node_modules/mime-db": { + "version": "1.52.0", + "inBundle": true, + "license": "MIT", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/aws-cdk-lib/node_modules/mime-types": { + "version": "2.1.35", + "inBundle": true, + "license": "MIT", + "dependencies": { + "mime-db": "1.52.0" + }, + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/aws-cdk-lib/node_modules/minimatch": { + "version": "3.1.2", + "inBundle": true, + "license": "ISC", + "dependencies": { + "brace-expansion": "^1.1.7" + }, + "engines": { + "node": "*" + } + }, + "node_modules/aws-cdk-lib/node_modules/punycode": { + "version": "2.3.1", + "inBundle": true, + "license": "MIT", + "engines": { + "node": ">=6" + } + }, + "node_modules/aws-cdk-lib/node_modules/require-from-string": { + "version": "2.0.2", + "inBundle": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/aws-cdk-lib/node_modules/semver": { + "version": "7.6.3", + "inBundle": true, + "license": "ISC", + "bin": { + "semver": "bin/semver.js" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/aws-cdk-lib/node_modules/slice-ansi": { + "version": "4.0.0", + "inBundle": true, + "license": "MIT", + "dependencies": { + "ansi-styles": "^4.0.0", + "astral-regex": "^2.0.0", + "is-fullwidth-code-point": "^3.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/slice-ansi?sponsor=1" + } + }, + "node_modules/aws-cdk-lib/node_modules/string-width": { + "version": "4.2.3", + "inBundle": true, + "license": "MIT", + "dependencies": { + "emoji-regex": "^8.0.0", + "is-fullwidth-code-point": "^3.0.0", + "strip-ansi": "^6.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/aws-cdk-lib/node_modules/strip-ansi": { + "version": "6.0.1", + "inBundle": true, + "license": "MIT", + "dependencies": { + "ansi-regex": "^5.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/aws-cdk-lib/node_modules/table": { + "version": "6.8.2", + "inBundle": true, + "license": "BSD-3-Clause", + "dependencies": { + "ajv": "^8.0.1", + "lodash.truncate": "^4.4.2", + "slice-ansi": "^4.0.0", + "string-width": "^4.2.3", + "strip-ansi": "^6.0.1" + }, + "engines": { + "node": ">=10.0.0" + } + }, + "node_modules/aws-cdk-lib/node_modules/universalify": { + "version": "2.0.1", + "inBundle": true, + "license": "MIT", + "engines": { + "node": ">= 10.0.0" + } + }, + "node_modules/aws-cdk-lib/node_modules/yaml": { + "version": "1.10.2", + "inBundle": true, + "license": "ISC", + "engines": { + "node": ">= 6" + } + }, + "node_modules/babel-jest": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/babel-jest/-/babel-jest-29.7.0.tgz", + "integrity": "sha512-BrvGY3xZSwEcCzKvKsCi2GgHqDqsYkOP4/by5xCgIwGXQxIEh+8ew3gmrE1y7XRR6LHZIj6yLYnUi/mm2KXKBg==", + "dev": true, + "dependencies": { + "@jest/transform": "^29.7.0", + "@types/babel__core": "^7.1.14", + "babel-plugin-istanbul": "^6.1.1", + "babel-preset-jest": "^29.6.3", + "chalk": "^4.0.0", + "graceful-fs": "^4.2.9", + "slash": "^3.0.0" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + }, + "peerDependencies": { + "@babel/core": "^7.8.0" + } + }, + "node_modules/babel-plugin-istanbul": { + "version": "6.1.1", + "resolved": "https://registry.npmjs.org/babel-plugin-istanbul/-/babel-plugin-istanbul-6.1.1.tgz", + "integrity": "sha512-Y1IQok9821cC9onCx5otgFfRm7Lm+I+wwxOx738M/WLPZ9Q42m4IG5W0FNX8WLL2gYMZo3JkuXIH2DOpWM+qwA==", + "dev": true, + "dependencies": { + "@babel/helper-plugin-utils": "^7.0.0", + "@istanbuljs/load-nyc-config": "^1.0.0", + "@istanbuljs/schema": "^0.1.2", + "istanbul-lib-instrument": "^5.0.4", + "test-exclude": "^6.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/babel-plugin-istanbul/node_modules/istanbul-lib-instrument": { + "version": "5.2.1", + "resolved": "https://registry.npmjs.org/istanbul-lib-instrument/-/istanbul-lib-instrument-5.2.1.tgz", + "integrity": "sha512-pzqtp31nLv/XFOzXGuvhCb8qhjmTVo5vjVk19XE4CRlSWz0KoeJ3bw9XsA7nOp9YBf4qHjwBxkDzKcME/J29Yg==", + "dev": true, + "dependencies": { + "@babel/core": "^7.12.3", + "@babel/parser": "^7.14.7", + "@istanbuljs/schema": "^0.1.2", + "istanbul-lib-coverage": "^3.2.0", + "semver": "^6.3.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/babel-plugin-jest-hoist": { + "version": "29.6.3", + "resolved": "https://registry.npmjs.org/babel-plugin-jest-hoist/-/babel-plugin-jest-hoist-29.6.3.tgz", + "integrity": "sha512-ESAc/RJvGTFEzRwOTT4+lNDk/GNHMkKbNzsvT0qKRfDyyYTskxB5rnU2njIDYVxXCBHHEI1c0YwHob3WaYujOg==", + "dev": true, + "dependencies": { + "@babel/template": "^7.3.3", + "@babel/types": "^7.3.3", + "@types/babel__core": "^7.1.14", + "@types/babel__traverse": "^7.0.6" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/babel-preset-current-node-syntax": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/babel-preset-current-node-syntax/-/babel-preset-current-node-syntax-1.1.0.tgz", + "integrity": "sha512-ldYss8SbBlWva1bs28q78Ju5Zq1F+8BrqBZZ0VFhLBvhh6lCpC2o3gDJi/5DRLs9FgYZCnmPYIVFU4lRXCkyUw==", + "dev": true, + "dependencies": { + "@babel/plugin-syntax-async-generators": "^7.8.4", + "@babel/plugin-syntax-bigint": "^7.8.3", + "@babel/plugin-syntax-class-properties": "^7.12.13", + "@babel/plugin-syntax-class-static-block": "^7.14.5", + "@babel/plugin-syntax-import-attributes": "^7.24.7", + "@babel/plugin-syntax-import-meta": "^7.10.4", + "@babel/plugin-syntax-json-strings": "^7.8.3", + "@babel/plugin-syntax-logical-assignment-operators": "^7.10.4", + "@babel/plugin-syntax-nullish-coalescing-operator": "^7.8.3", + "@babel/plugin-syntax-numeric-separator": "^7.10.4", + "@babel/plugin-syntax-object-rest-spread": "^7.8.3", + "@babel/plugin-syntax-optional-catch-binding": "^7.8.3", + "@babel/plugin-syntax-optional-chaining": "^7.8.3", + "@babel/plugin-syntax-private-property-in-object": "^7.14.5", + "@babel/plugin-syntax-top-level-await": "^7.14.5" + }, + "peerDependencies": { + "@babel/core": "^7.0.0" + } + }, + "node_modules/babel-preset-jest": { + "version": "29.6.3", + "resolved": "https://registry.npmjs.org/babel-preset-jest/-/babel-preset-jest-29.6.3.tgz", + "integrity": "sha512-0B3bhxR6snWXJZtR/RliHTDPRgn1sNHOR0yVtq/IiQFyuOVjFS+wuio/R4gSNkyYmKmJB4wGZv2NZanmKmTnNA==", + "dev": true, + "dependencies": { + "babel-plugin-jest-hoist": "^29.6.3", + "babel-preset-current-node-syntax": "^1.0.0" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0" + } + }, + "node_modules/balanced-match": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz", + "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==", + "dev": true + }, + "node_modules/brace-expansion": { + "version": "1.1.11", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", + "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", + "dev": true, + "dependencies": { + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" + } + }, + "node_modules/braces": { + "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.1.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/browserslist": { + "version": "4.24.2", + "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.24.2.tgz", + "integrity": "sha512-ZIc+Q62revdMcqC6aChtW4jz3My3klmCO1fEmINZY/8J3EpBg5/A/D0AKmBveUh6pgoeycoMkVMko84tuYS+Gg==", + "dev": true, + "funding": [ + { + "type": "opencollective", + "url": "https://opencollective.com/browserslist" + }, + { + "type": "tidelift", + "url": "https://tidelift.com/funding/github/npm/browserslist" + }, + { + "type": "github", + "url": "https://github.com/sponsors/ai" + } + ], + "dependencies": { + "caniuse-lite": "^1.0.30001669", + "electron-to-chromium": "^1.5.41", + "node-releases": "^2.0.18", + "update-browserslist-db": "^1.1.1" + }, + "bin": { + "browserslist": "cli.js" + }, + "engines": { + "node": "^6 || ^7 || ^8 || ^9 || ^10 || ^11 || ^12 || >=13.7" + } + }, + "node_modules/bs-logger": { + "version": "0.2.6", + "resolved": "https://registry.npmjs.org/bs-logger/-/bs-logger-0.2.6.tgz", + "integrity": "sha512-pd8DCoxmbgc7hyPKOvxtqNcjYoOsABPQdcCUjGp3d42VR2CX1ORhk2A87oqqu5R1kk+76nsxZupkmyd+MVtCog==", + "dev": true, + "dependencies": { + "fast-json-stable-stringify": "2.x" + }, + "engines": { + "node": ">= 6" + } + }, + "node_modules/bser": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/bser/-/bser-2.1.1.tgz", + "integrity": "sha512-gQxTNE/GAfIIrmHLUE3oJyp5FO6HRBfhjnw4/wMmA63ZGDJnWBmgY/lyQBpnDUkGmAhbSe39tx2d/iTOAfglwQ==", + "dev": true, + "dependencies": { + "node-int64": "^0.4.0" + } + }, + "node_modules/buffer-from": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/buffer-from/-/buffer-from-1.1.2.tgz", + "integrity": "sha512-E+XQCRwSbaaiChtv6k6Dwgc+bx+Bs6vuKJHHl5kox/BaKbhiXzqQOwK4cO22yElGp2OCmjwVhT3HmxgyPGnJfQ==" + }, + "node_modules/callsites": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/callsites/-/callsites-3.1.0.tgz", + "integrity": "sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ==", + "dev": true, + "engines": { + "node": ">=6" + } + }, + "node_modules/camelcase": { + "version": "5.3.1", + "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-5.3.1.tgz", + "integrity": "sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg==", + "dev": true, + "engines": { + "node": ">=6" + } + }, + "node_modules/caniuse-lite": { + "version": "1.0.30001680", + "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001680.tgz", + "integrity": "sha512-rPQy70G6AGUMnbwS1z6Xg+RkHYPAi18ihs47GH0jcxIG7wArmPgY3XbS2sRdBbxJljp3thdT8BIqv9ccCypiPA==", + "dev": true, + "funding": [ + { + "type": "opencollective", + "url": "https://opencollective.com/browserslist" + }, + { + "type": "tidelift", + "url": "https://tidelift.com/funding/github/npm/caniuse-lite" + }, + { + "type": "github", + "url": "https://github.com/sponsors/ai" + } + ] + }, + "node_modules/chalk": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", + "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", + "dev": true, + "dependencies": { + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/chalk?sponsor=1" + } + }, + "node_modules/char-regex": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/char-regex/-/char-regex-1.0.2.tgz", + "integrity": "sha512-kWWXztvZ5SBQV+eRgKFeh8q5sLuZY2+8WUIzlxWVTg+oGwY14qylx1KbKzHd8P6ZYkAg0xyIDU9JMHhyJMZ1jw==", + "dev": true, + "engines": { + "node": ">=10" + } + }, + "node_modules/ci-info": { + "version": "3.9.0", + "resolved": "https://registry.npmjs.org/ci-info/-/ci-info-3.9.0.tgz", + "integrity": "sha512-NIxF55hv4nSqQswkAeiOi1r83xy8JldOFDTWiug55KBu9Jnblncd2U6ViHmYgHf01TPZS77NJBhBMKdWj9HQMQ==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/sibiraj-s" + } + ], + "engines": { + "node": ">=8" + } + }, + "node_modules/cjs-module-lexer": { + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/cjs-module-lexer/-/cjs-module-lexer-1.4.1.tgz", + "integrity": "sha512-cuSVIHi9/9E/+821Qjdvngor+xpnlwnuwIyZOaLmHBVdXL+gP+I6QQB9VkO7RI77YIcTV+S1W9AreJ5eN63JBA==", + "dev": true + }, + "node_modules/cliui": { + "version": "8.0.1", + "resolved": "https://registry.npmjs.org/cliui/-/cliui-8.0.1.tgz", + "integrity": "sha512-BSeNnyus75C4//NQ9gQt1/csTXyo/8Sb+afLAkzAptFuMsod9HFokGNudZpi/oQV73hnVK+sR+5PVRMd+Dr7YQ==", + "dev": true, + "dependencies": { + "string-width": "^4.2.0", + "strip-ansi": "^6.0.1", + "wrap-ansi": "^7.0.0" + }, + "engines": { + "node": ">=12" + } + }, + "node_modules/co": { + "version": "4.6.0", + "resolved": "https://registry.npmjs.org/co/-/co-4.6.0.tgz", + "integrity": "sha512-QVb0dM5HvG+uaxitm8wONl7jltx8dqhfU33DcqtOZcLSVIKSDDLDi7+0LbAKiyI8hD9u42m2YxXSkMGWThaecQ==", + "dev": true, + "engines": { + "iojs": ">= 1.0.0", + "node": ">= 0.12.0" + } + }, + "node_modules/collect-v8-coverage": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/collect-v8-coverage/-/collect-v8-coverage-1.0.2.tgz", + "integrity": "sha512-lHl4d5/ONEbLlJvaJNtsF/Lz+WvB07u2ycqTYbdrq7UypDXailES4valYb2eWiJFxZlVmpGekfqoxQhzyFdT4Q==", + "dev": true + }, + "node_modules/color-convert": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "dev": true, + "dependencies": { + "color-name": "~1.1.4" + }, + "engines": { + "node": ">=7.0.0" + } + }, + "node_modules/color-name": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", + "dev": true + }, + "node_modules/concat-map": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", + "integrity": "sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==", + "dev": true + }, + "node_modules/constructs": { + "version": "10.4.2", + "resolved": "https://registry.npmjs.org/constructs/-/constructs-10.4.2.tgz", + "integrity": "sha512-wsNxBlAott2qg8Zv87q3eYZYgheb9lchtBfjHzzLHtXbttwSrHPs1NNQbBrmbb1YZvYg2+Vh0Dor76w4mFxJkA==" + }, + "node_modules/convert-source-map": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-2.0.0.tgz", + "integrity": "sha512-Kvp459HrV2FEJ1CAsi1Ku+MY3kasH19TFykTz2xWmMeq6bk2NU3XXvfJ+Q61m0xktWwt+1HSYf3JZsTms3aRJg==", + "dev": true + }, + "node_modules/create-jest": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/create-jest/-/create-jest-29.7.0.tgz", + "integrity": "sha512-Adz2bdH0Vq3F53KEMJOoftQFutWCukm6J24wbPWRO4k1kMY7gS7ds/uoJkNuV8wDCtWWnuwGcJwpWcih+zEW1Q==", + "dev": true, + "dependencies": { + "@jest/types": "^29.6.3", + "chalk": "^4.0.0", + "exit": "^0.1.2", + "graceful-fs": "^4.2.9", + "jest-config": "^29.7.0", + "jest-util": "^29.7.0", + "prompts": "^2.0.1" + }, + "bin": { + "create-jest": "bin/create-jest.js" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/create-require": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/create-require/-/create-require-1.1.1.tgz", + "integrity": "sha512-dcKFX3jn0MpIaXjisoRvexIJVEKzaq7z2rZKxf+MSr9TkdmHmsU4m2lcLojrj/FHl8mk5VxMmYA+ftRkP/3oKQ==", + "dev": true + }, + "node_modules/cross-spawn": { + "version": "7.0.5", + "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.5.tgz", + "integrity": "sha512-ZVJrKKYunU38/76t0RMOulHOnUcbU9GbpWKAOZ0mhjr7CX6FVrH+4FrAapSOekrgFQ3f/8gwMEuIft0aKq6Hug==", + "dev": true, + "dependencies": { + "path-key": "^3.1.0", + "shebang-command": "^2.0.0", + "which": "^2.0.1" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/debug": { + "version": "4.3.7", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.7.tgz", + "integrity": "sha512-Er2nc/H7RrMXZBFCEim6TCmMk02Z8vLC2Rbi1KEBggpo0fS6l0S1nnapwmIi3yW/+GOJap1Krg4w0Hg80oCqgQ==", + "dev": true, + "dependencies": { + "ms": "^2.1.3" + }, + "engines": { + "node": ">=6.0" + }, + "peerDependenciesMeta": { + "supports-color": { + "optional": true + } + } + }, + "node_modules/dedent": { + "version": "1.5.3", + "resolved": "https://registry.npmjs.org/dedent/-/dedent-1.5.3.tgz", + "integrity": "sha512-NHQtfOOW68WD8lgypbLA5oT+Bt0xXJhiYvoR6SmmNXZfpzOGXwdKWmcwG8N7PwVVWV3eF/68nmD9BaJSsTBhyQ==", + "dev": true, + "peerDependencies": { + "babel-plugin-macros": "^3.1.0" + }, + "peerDependenciesMeta": { + "babel-plugin-macros": { + "optional": true + } + } + }, + "node_modules/deepmerge": { + "version": "4.3.1", + "resolved": "https://registry.npmjs.org/deepmerge/-/deepmerge-4.3.1.tgz", + "integrity": "sha512-3sUqbMEc77XqpdNO7FRyRog+eW3ph+GYCbj+rK+uYyRMuwsVy0rMiVtPn+QJlKFvWP/1PYpapqYn0Me2knFn+A==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/detect-newline": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/detect-newline/-/detect-newline-3.1.0.tgz", + "integrity": "sha512-TLz+x/vEXm/Y7P7wn1EJFNLxYpUD4TgMosxY6fAVJUnJMbupHBOncxyWUG9OpTaH9EBD7uFI5LfEgmMOc54DsA==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/diff": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/diff/-/diff-4.0.2.tgz", + "integrity": "sha512-58lmxKSA4BNyLz+HHMUzlOEpg09FV+ev6ZMe3vJihgdxzgcwZ8VoEEPmALCZG9LmqfVoNMMKpttIYTVG6uDY7A==", + "dev": true, + "engines": { + "node": ">=0.3.1" + } + }, + "node_modules/diff-sequences": { + "version": "29.6.3", + "resolved": "https://registry.npmjs.org/diff-sequences/-/diff-sequences-29.6.3.tgz", + "integrity": "sha512-EjePK1srD3P08o2j4f0ExnylqRs5B9tJjcp9t1krH2qRi8CCdsYfwe9JgSLurFBWwq4uOlipzfk5fHNvwFKr8Q==", + "dev": true, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/ejs": { + "version": "3.1.10", + "resolved": "https://registry.npmjs.org/ejs/-/ejs-3.1.10.tgz", + "integrity": "sha512-UeJmFfOrAQS8OJWPZ4qtgHyWExa088/MtK5UEyoJGFH67cDEXkZSviOiKRCZ4Xij0zxI3JECgYs3oKx+AizQBA==", + "dev": true, + "dependencies": { + "jake": "^10.8.5" + }, + "bin": { + "ejs": "bin/cli.js" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/electron-to-chromium": { + "version": "1.5.62", + "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.5.62.tgz", + "integrity": "sha512-t8c+zLmJHa9dJy96yBZRXGQYoiCEnHYgFwn1asvSPZSUdVxnB62A4RASd7k41ytG3ErFBA0TpHlKg9D9SQBmLg==", + "dev": true + }, + "node_modules/emittery": { + "version": "0.13.1", + "resolved": "https://registry.npmjs.org/emittery/-/emittery-0.13.1.tgz", + "integrity": "sha512-DeWwawk6r5yR9jFgnDKYt4sLS0LmHJJi3ZOnb5/JdbYwj3nW+FxQnHIjhBKz8YLC7oRNPVM9NQ47I3CVx34eqQ==", + "dev": true, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sindresorhus/emittery?sponsor=1" + } + }, + "node_modules/emoji-regex": { + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", + "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==", + "dev": true + }, + "node_modules/error-ex": { + "version": "1.3.2", + "resolved": "https://registry.npmjs.org/error-ex/-/error-ex-1.3.2.tgz", + "integrity": "sha512-7dFHNmqeFSEt2ZBsCriorKnn3Z2pj+fd9kmI6QoWw4//DL+icEBfc0U7qJCisqrTsKTjw4fNFy2pW9OqStD84g==", + "dev": true, + "dependencies": { + "is-arrayish": "^0.2.1" + } + }, + "node_modules/escalade": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/escalade/-/escalade-3.2.0.tgz", + "integrity": "sha512-WUj2qlxaQtO4g6Pq5c29GTcWGDyd8itL8zTlipgECz3JesAiiOKotd8JU6otB3PACgG6xkJUyVhboMS+bje/jA==", + "dev": true, + "engines": { + "node": ">=6" + } + }, + "node_modules/escape-string-regexp": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-2.0.0.tgz", + "integrity": "sha512-UpzcLCXolUWcNu5HtVMHYdXJjArjsF9C0aNnquZYY4uW/Vu0miy5YoWvbV345HauVvcAUnpRuhMMcqTcGOY2+w==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/esprima": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/esprima/-/esprima-4.0.1.tgz", + "integrity": "sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A==", + "dev": true, + "bin": { + "esparse": "bin/esparse.js", + "esvalidate": "bin/esvalidate.js" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/execa": { + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/execa/-/execa-5.1.1.tgz", + "integrity": "sha512-8uSpZZocAZRBAPIEINJj3Lo9HyGitllczc27Eh5YYojjMFMn8yHMDMaUHE2Jqfq05D/wucwI4JGURyXt1vchyg==", + "dev": true, + "dependencies": { + "cross-spawn": "^7.0.3", + "get-stream": "^6.0.0", + "human-signals": "^2.1.0", + "is-stream": "^2.0.0", + "merge-stream": "^2.0.0", + "npm-run-path": "^4.0.1", + "onetime": "^5.1.2", + "signal-exit": "^3.0.3", + "strip-final-newline": "^2.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sindresorhus/execa?sponsor=1" + } + }, + "node_modules/exit": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/exit/-/exit-0.1.2.tgz", + "integrity": "sha512-Zk/eNKV2zbjpKzrsQ+n1G6poVbErQxJ0LBOJXaKZ1EViLzH+hrLu9cdXI4zw9dBQJslwBEpbQ2P1oS7nDxs6jQ==", + "dev": true, + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/expect": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/expect/-/expect-29.7.0.tgz", + "integrity": "sha512-2Zks0hf1VLFYI1kbh0I5jP3KHHyCHpkfyHBzsSXRFgl/Bg9mWYfMW8oD+PdMPlEwy5HNsR9JutYy6pMeOh61nw==", + "dev": true, + "dependencies": { + "@jest/expect-utils": "^29.7.0", + "jest-get-type": "^29.6.3", + "jest-matcher-utils": "^29.7.0", + "jest-message-util": "^29.7.0", + "jest-util": "^29.7.0" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/fast-json-stable-stringify": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz", + "integrity": "sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw==", + "dev": true + }, + "node_modules/fb-watchman": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/fb-watchman/-/fb-watchman-2.0.2.tgz", + "integrity": "sha512-p5161BqbuCaSnB8jIbzQHOlpgsPmK5rJVDfDKO91Axs5NC1uu3HRQm6wt9cd9/+GtQQIO53JdGXXoyDpTAsgYA==", + "dev": true, + "dependencies": { + "bser": "2.1.1" + } + }, + "node_modules/filelist": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/filelist/-/filelist-1.0.4.tgz", + "integrity": "sha512-w1cEuf3S+DrLCQL7ET6kz+gmlJdbq9J7yXCSjK/OZCPA+qEN1WyF4ZAf0YYJa4/shHJra2t/d/r8SV4Ji+x+8Q==", + "dev": true, + "dependencies": { + "minimatch": "^5.0.1" + } + }, + "node_modules/filelist/node_modules/brace-expansion": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz", + "integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==", + "dev": true, + "dependencies": { + "balanced-match": "^1.0.0" + } + }, + "node_modules/filelist/node_modules/minimatch": { + "version": "5.1.6", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-5.1.6.tgz", + "integrity": "sha512-lKwV/1brpG6mBUFHtb7NUmtABCb2WZZmm2wNiOA5hAb8VdCS4B3dtMWyvcoViccwAW/COERjXLt0zP1zXUN26g==", + "dev": true, + "dependencies": { + "brace-expansion": "^2.0.1" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/fill-range": { + "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" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/find-up": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-4.1.0.tgz", + "integrity": "sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw==", + "dev": true, + "dependencies": { + "locate-path": "^5.0.0", + "path-exists": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/fs.realpath": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", + "integrity": "sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw==", + "dev": true + }, + "node_modules/fsevents": { + "version": "2.3.2", + "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.2.tgz", + "integrity": "sha512-xiqMQR4xAeHTuB9uWm+fFRcIOgKBMiOBP+eXiyT7jsgVCq1bkVygt00oASowB7EdtpOHaaPgKt812P9ab+DDKA==", + "dev": true, + "hasInstallScript": true, + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": "^8.16.0 || ^10.6.0 || >=11.0.0" + } + }, + "node_modules/function-bind": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.2.tgz", + "integrity": "sha512-7XHNxH7qX9xG5mIwxkhumTox/MIRNcOgDrxWsMt2pAr23WHp6MrRlN7FBSFpCpr+oVO0F744iUgR82nJMfG2SA==", + "dev": true, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/gensync": { + "version": "1.0.0-beta.2", + "resolved": "https://registry.npmjs.org/gensync/-/gensync-1.0.0-beta.2.tgz", + "integrity": "sha512-3hN7NaskYvMDLQY55gnW3NQ+mesEAepTqlg+VEbj7zzqEMBVNhzcGYYeqFo/TlYz6eQiFcp1HcsCZO+nGgS8zg==", + "dev": true, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/get-caller-file": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-2.0.5.tgz", + "integrity": "sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==", + "dev": true, + "engines": { + "node": "6.* || 8.* || >= 10.*" + } + }, + "node_modules/get-package-type": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/get-package-type/-/get-package-type-0.1.0.tgz", + "integrity": "sha512-pjzuKtY64GYfWizNAJ0fr9VqttZkNiK2iS430LtIHzjBEr6bX8Am2zm4sW4Ro5wjWW5cAlRL1qAMTcXbjNAO2Q==", + "dev": true, + "engines": { + "node": ">=8.0.0" + } + }, + "node_modules/get-stream": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-6.0.1.tgz", + "integrity": "sha512-ts6Wi+2j3jQjqi70w5AlN8DFnkSwC+MqmxEzdEALB2qXZYV3X/b1CTfgPLGJNMeAWxdPfU8FO1ms3NUfaHCPYg==", + "dev": true, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/glob": { + "version": "7.2.3", + "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.3.tgz", + "integrity": "sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==", + "deprecated": "Glob versions prior to v9 are no longer supported", + "dev": true, + "dependencies": { + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^3.1.1", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" + }, + "engines": { + "node": "*" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/globals": { + "version": "11.12.0", + "resolved": "https://registry.npmjs.org/globals/-/globals-11.12.0.tgz", + "integrity": "sha512-WOBp/EEGUiIsJSp7wcv/y6MO+lV9UoncWqxuFfm8eBwzWNgyfBd6Gz+IeKQ9jCmyhoH99g15M3T+QaVHFjizVA==", + "dev": true, + "engines": { + "node": ">=4" + } + }, + "node_modules/graceful-fs": { + "version": "4.2.11", + "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.11.tgz", + "integrity": "sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ==", + "dev": true + }, + "node_modules/has-flag": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", + "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/hasown": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/hasown/-/hasown-2.0.2.tgz", + "integrity": "sha512-0hJU9SCPvmMzIBdZFqNPXWa6dqh7WdH0cII9y+CyS8rG3nL48Bclra9HmKhVVUHyPWNH5Y7xDwAB7bfgSjkUMQ==", + "dev": true, + "dependencies": { + "function-bind": "^1.1.2" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/html-escaper": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/html-escaper/-/html-escaper-2.0.2.tgz", + "integrity": "sha512-H2iMtd0I4Mt5eYiapRdIDjp+XzelXQ0tFE4JS7YFwFevXXMmOp9myNrUvCg0D6ws8iqkRPBfKHgbwig1SmlLfg==", + "dev": true + }, + "node_modules/human-signals": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/human-signals/-/human-signals-2.1.0.tgz", + "integrity": "sha512-B4FFZ6q/T2jhhksgkbEW3HBvWIfDW85snkQgawt07S7J5QXTk6BkNV+0yAeZrM5QpMAdYlocGoljn0sJ/WQkFw==", + "dev": true, + "engines": { + "node": ">=10.17.0" + } + }, + "node_modules/import-local": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/import-local/-/import-local-3.2.0.tgz", + "integrity": "sha512-2SPlun1JUPWoM6t3F0dw0FkCF/jWY8kttcY4f599GLTSjh2OCuuhdTkJQsEcZzBqbXZGKMK2OqW1oZsjtf/gQA==", + "dev": true, + "dependencies": { + "pkg-dir": "^4.2.0", + "resolve-cwd": "^3.0.0" + }, + "bin": { + "import-local-fixture": "fixtures/cli.js" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/imurmurhash": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/imurmurhash/-/imurmurhash-0.1.4.tgz", + "integrity": "sha512-JmXMZ6wuvDmLiHEml9ykzqO6lwFbof0GG4IkcGaENdCRDDmMVnny7s5HsIgHCbaq0w2MyPhDqkhTUgS2LU2PHA==", + "dev": true, + "engines": { + "node": ">=0.8.19" + } + }, + "node_modules/inflight": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", + "integrity": "sha512-k92I/b08q4wvFscXCLvqfsHCrjrF7yiXsQuIVvVE7N82W3+aqpzuUdBbfhWcy/FZR3/4IgflMgKLOsvPDrGCJA==", + "deprecated": "This module is not supported, and leaks memory. Do not use it. Check out lru-cache if you want a good and tested way to coalesce async requests by a key value, which is much more comprehensive and powerful.", + "dev": true, + "dependencies": { + "once": "^1.3.0", + "wrappy": "1" + } + }, + "node_modules/inherits": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", + "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==", + "dev": true + }, + "node_modules/is-arrayish": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/is-arrayish/-/is-arrayish-0.2.1.tgz", + "integrity": "sha512-zz06S8t0ozoDXMG+ube26zeCTNXcKIPJZJi8hBrF4idCLms4CG9QtK7qBl1boi5ODzFpjswb5JPmHCbMpjaYzg==", + "dev": true + }, + "node_modules/is-core-module": { + "version": "2.15.1", + "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.15.1.tgz", + "integrity": "sha512-z0vtXSwucUJtANQWldhbtbt7BnL0vxiFjIdDLAatwhDYty2bad6s+rijD6Ri4YuYJubLzIJLUidCh09e1djEVQ==", + "dev": true, + "dependencies": { + "hasown": "^2.0.2" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-fullwidth-code-point": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", + "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/is-generator-fn": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/is-generator-fn/-/is-generator-fn-2.1.0.tgz", + "integrity": "sha512-cTIB4yPYL/Grw0EaSzASzg6bBy9gqCofvWN8okThAYIxKJZC+udlRAmGbM0XLeniEJSs8uEgHPGuHSe1XsOLSQ==", + "dev": true, + "engines": { + "node": ">=6" + } + }, + "node_modules/is-number": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz", + "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==", + "dev": true, + "engines": { + "node": ">=0.12.0" + } + }, + "node_modules/is-stream": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-2.0.1.tgz", + "integrity": "sha512-hFoiJiTl63nn+kstHGBtewWSKnQLpyb155KHheA1l39uvtO9nWIop1p3udqPcUd/xbF1VLMO4n7OI6p7RbngDg==", + "dev": true, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/isexe": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", + "integrity": "sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw==", + "dev": true + }, + "node_modules/istanbul-lib-coverage": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/istanbul-lib-coverage/-/istanbul-lib-coverage-3.2.2.tgz", + "integrity": "sha512-O8dpsF+r0WV/8MNRKfnmrtCWhuKjxrq2w+jpzBL5UZKTi2LeVWnWOmWRxFlesJONmc+wLAGvKQZEOanko0LFTg==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/istanbul-lib-instrument": { + "version": "6.0.3", + "resolved": "https://registry.npmjs.org/istanbul-lib-instrument/-/istanbul-lib-instrument-6.0.3.tgz", + "integrity": "sha512-Vtgk7L/R2JHyyGW07spoFlB8/lpjiOLTjMdms6AFMraYt3BaJauod/NGrfnVG/y4Ix1JEuMRPDPEj2ua+zz1/Q==", + "dev": true, + "dependencies": { + "@babel/core": "^7.23.9", + "@babel/parser": "^7.23.9", + "@istanbuljs/schema": "^0.1.3", + "istanbul-lib-coverage": "^3.2.0", + "semver": "^7.5.4" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/istanbul-lib-instrument/node_modules/semver": { + "version": "7.6.3", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.6.3.tgz", + "integrity": "sha512-oVekP1cKtI+CTDvHWYFUcMtsK/00wmAEfyqKfNdARm8u1wNVhSgaX7A8d4UuIlUI5e84iEwOhs7ZPYRmzU9U6A==", + "dev": true, + "bin": { + "semver": "bin/semver.js" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/istanbul-lib-report": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/istanbul-lib-report/-/istanbul-lib-report-3.0.1.tgz", + "integrity": "sha512-GCfE1mtsHGOELCU8e/Z7YWzpmybrx/+dSTfLrvY8qRmaY6zXTKWn6WQIjaAFw069icm6GVMNkgu0NzI4iPZUNw==", + "dev": true, + "dependencies": { + "istanbul-lib-coverage": "^3.0.0", + "make-dir": "^4.0.0", + "supports-color": "^7.1.0" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/istanbul-lib-source-maps": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/istanbul-lib-source-maps/-/istanbul-lib-source-maps-4.0.1.tgz", + "integrity": "sha512-n3s8EwkdFIJCG3BPKBYvskgXGoy88ARzvegkitk60NxRdwltLOTaH7CUiMRXvwYorl0Q712iEjcWB+fK/MrWVw==", + "dev": true, + "dependencies": { + "debug": "^4.1.1", + "istanbul-lib-coverage": "^3.0.0", + "source-map": "^0.6.1" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/istanbul-reports": { + "version": "3.1.7", + "resolved": "https://registry.npmjs.org/istanbul-reports/-/istanbul-reports-3.1.7.tgz", + "integrity": "sha512-BewmUXImeuRk2YY0PVbxgKAysvhRPUQE0h5QRM++nVWyubKGV0l8qQ5op8+B2DOmwSe63Jivj0BjkPQVf8fP5g==", + "dev": true, + "dependencies": { + "html-escaper": "^2.0.0", + "istanbul-lib-report": "^3.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/jake": { + "version": "10.9.2", + "resolved": "https://registry.npmjs.org/jake/-/jake-10.9.2.tgz", + "integrity": "sha512-2P4SQ0HrLQ+fw6llpLnOaGAvN2Zu6778SJMrCUwns4fOoG9ayrTiZk3VV8sCPkVZF8ab0zksVpS8FDY5pRCNBA==", + "dev": true, + "dependencies": { + "async": "^3.2.3", + "chalk": "^4.0.2", + "filelist": "^1.0.4", + "minimatch": "^3.1.2" + }, + "bin": { + "jake": "bin/cli.js" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/jest": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest/-/jest-29.7.0.tgz", + "integrity": "sha512-NIy3oAFp9shda19hy4HK0HRTWKtPJmGdnvywu01nOqNC2vZg+Z+fvJDxpMQA88eb2I9EcafcdjYgsDthnYTvGw==", + "dev": true, + "dependencies": { + "@jest/core": "^29.7.0", + "@jest/types": "^29.6.3", + "import-local": "^3.0.2", + "jest-cli": "^29.7.0" + }, + "bin": { + "jest": "bin/jest.js" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + }, + "peerDependencies": { + "node-notifier": "^8.0.1 || ^9.0.0 || ^10.0.0" + }, + "peerDependenciesMeta": { + "node-notifier": { + "optional": true + } + } + }, + "node_modules/jest-changed-files": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-changed-files/-/jest-changed-files-29.7.0.tgz", + "integrity": "sha512-fEArFiwf1BpQ+4bXSprcDc3/x4HSzL4al2tozwVpDFpsxALjLYdyiIK4e5Vz66GQJIbXJ82+35PtysofptNX2w==", + "dev": true, + "dependencies": { + "execa": "^5.0.0", + "jest-util": "^29.7.0", + "p-limit": "^3.1.0" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/jest-circus": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-circus/-/jest-circus-29.7.0.tgz", + "integrity": "sha512-3E1nCMgipcTkCocFwM90XXQab9bS+GMsjdpmPrlelaxwD93Ad8iVEjX/vvHPdLPnFf+L40u+5+iutRdA1N9myw==", + "dev": true, + "dependencies": { + "@jest/environment": "^29.7.0", + "@jest/expect": "^29.7.0", + "@jest/test-result": "^29.7.0", + "@jest/types": "^29.6.3", + "@types/node": "*", + "chalk": "^4.0.0", + "co": "^4.6.0", + "dedent": "^1.0.0", + "is-generator-fn": "^2.0.0", + "jest-each": "^29.7.0", + "jest-matcher-utils": "^29.7.0", + "jest-message-util": "^29.7.0", + "jest-runtime": "^29.7.0", + "jest-snapshot": "^29.7.0", + "jest-util": "^29.7.0", + "p-limit": "^3.1.0", + "pretty-format": "^29.7.0", + "pure-rand": "^6.0.0", + "slash": "^3.0.0", + "stack-utils": "^2.0.3" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/jest-cli": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-cli/-/jest-cli-29.7.0.tgz", + "integrity": "sha512-OVVobw2IubN/GSYsxETi+gOe7Ka59EFMR/twOU3Jb2GnKKeMGJB5SGUUrEz3SFVmJASUdZUzy83sLNNQ2gZslg==", + "dev": true, + "dependencies": { + "@jest/core": "^29.7.0", + "@jest/test-result": "^29.7.0", + "@jest/types": "^29.6.3", + "chalk": "^4.0.0", + "create-jest": "^29.7.0", + "exit": "^0.1.2", + "import-local": "^3.0.2", + "jest-config": "^29.7.0", + "jest-util": "^29.7.0", + "jest-validate": "^29.7.0", + "yargs": "^17.3.1" + }, + "bin": { + "jest": "bin/jest.js" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + }, + "peerDependencies": { + "node-notifier": "^8.0.1 || ^9.0.0 || ^10.0.0" + }, + "peerDependenciesMeta": { + "node-notifier": { + "optional": true + } + } + }, + "node_modules/jest-config": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-config/-/jest-config-29.7.0.tgz", + "integrity": "sha512-uXbpfeQ7R6TZBqI3/TxCU4q4ttk3u0PJeC+E0zbfSoSjq6bJ7buBPxzQPL0ifrkY4DNu4JUdk0ImlBUYi840eQ==", + "dev": true, + "dependencies": { + "@babel/core": "^7.11.6", + "@jest/test-sequencer": "^29.7.0", + "@jest/types": "^29.6.3", + "babel-jest": "^29.7.0", + "chalk": "^4.0.0", + "ci-info": "^3.2.0", + "deepmerge": "^4.2.2", + "glob": "^7.1.3", + "graceful-fs": "^4.2.9", + "jest-circus": "^29.7.0", + "jest-environment-node": "^29.7.0", + "jest-get-type": "^29.6.3", + "jest-regex-util": "^29.6.3", + "jest-resolve": "^29.7.0", + "jest-runner": "^29.7.0", + "jest-util": "^29.7.0", + "jest-validate": "^29.7.0", + "micromatch": "^4.0.4", + "parse-json": "^5.2.0", + "pretty-format": "^29.7.0", + "slash": "^3.0.0", + "strip-json-comments": "^3.1.1" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + }, + "peerDependencies": { + "@types/node": "*", + "ts-node": ">=9.0.0" + }, + "peerDependenciesMeta": { + "@types/node": { + "optional": true + }, + "ts-node": { + "optional": true + } + } + }, + "node_modules/jest-diff": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-diff/-/jest-diff-29.7.0.tgz", + "integrity": "sha512-LMIgiIrhigmPrs03JHpxUh2yISK3vLFPkAodPeo0+BuF7wA2FoQbkEg1u8gBYBThncu7e1oEDUfIXVuTqLRUjw==", + "dev": true, + "dependencies": { + "chalk": "^4.0.0", + "diff-sequences": "^29.6.3", + "jest-get-type": "^29.6.3", + "pretty-format": "^29.7.0" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/jest-docblock": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-docblock/-/jest-docblock-29.7.0.tgz", + "integrity": "sha512-q617Auw3A612guyaFgsbFeYpNP5t2aoUNLwBUbc/0kD1R4t9ixDbyFTHd1nok4epoVFpr7PmeWHrhvuV3XaJ4g==", + "dev": true, + "dependencies": { + "detect-newline": "^3.0.0" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/jest-each": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-each/-/jest-each-29.7.0.tgz", + "integrity": "sha512-gns+Er14+ZrEoC5fhOfYCY1LOHHr0TI+rQUHZS8Ttw2l7gl+80eHc/gFf2Ktkw0+SIACDTeWvpFcv3B04VembQ==", + "dev": true, + "dependencies": { + "@jest/types": "^29.6.3", + "chalk": "^4.0.0", + "jest-get-type": "^29.6.3", + "jest-util": "^29.7.0", + "pretty-format": "^29.7.0" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/jest-environment-node": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-environment-node/-/jest-environment-node-29.7.0.tgz", + "integrity": "sha512-DOSwCRqXirTOyheM+4d5YZOrWcdu0LNZ87ewUoywbcb2XR4wKgqiG8vNeYwhjFMbEkfju7wx2GYH0P2gevGvFw==", + "dev": true, + "dependencies": { + "@jest/environment": "^29.7.0", + "@jest/fake-timers": "^29.7.0", + "@jest/types": "^29.6.3", + "@types/node": "*", + "jest-mock": "^29.7.0", + "jest-util": "^29.7.0" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/jest-get-type": { + "version": "29.6.3", + "resolved": "https://registry.npmjs.org/jest-get-type/-/jest-get-type-29.6.3.tgz", + "integrity": "sha512-zrteXnqYxfQh7l5FHyL38jL39di8H8rHoecLH3JNxH3BwOrBsNeabdap5e0I23lD4HHI8W5VFBZqG4Eaq5LNcw==", + "dev": true, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/jest-haste-map": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-haste-map/-/jest-haste-map-29.7.0.tgz", + "integrity": "sha512-fP8u2pyfqx0K1rGn1R9pyE0/KTn+G7PxktWidOBTqFPLYX0b9ksaMFkhK5vrS3DVun09pckLdlx90QthlW7AmA==", + "dev": true, + "dependencies": { + "@jest/types": "^29.6.3", + "@types/graceful-fs": "^4.1.3", + "@types/node": "*", + "anymatch": "^3.0.3", + "fb-watchman": "^2.0.0", + "graceful-fs": "^4.2.9", + "jest-regex-util": "^29.6.3", + "jest-util": "^29.7.0", + "jest-worker": "^29.7.0", + "micromatch": "^4.0.4", + "walker": "^1.0.8" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + }, + "optionalDependencies": { + "fsevents": "^2.3.2" + } + }, + "node_modules/jest-leak-detector": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-leak-detector/-/jest-leak-detector-29.7.0.tgz", + "integrity": "sha512-kYA8IJcSYtST2BY9I+SMC32nDpBT3J2NvWJx8+JCuCdl/CR1I4EKUJROiP8XtCcxqgTTBGJNdbB1A8XRKbTetw==", + "dev": true, + "dependencies": { + "jest-get-type": "^29.6.3", + "pretty-format": "^29.7.0" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/jest-matcher-utils": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-matcher-utils/-/jest-matcher-utils-29.7.0.tgz", + "integrity": "sha512-sBkD+Xi9DtcChsI3L3u0+N0opgPYnCRPtGcQYrgXmR+hmt/fYfWAL0xRXYU8eWOdfuLgBe0YCW3AFtnRLagq/g==", + "dev": true, + "dependencies": { + "chalk": "^4.0.0", + "jest-diff": "^29.7.0", + "jest-get-type": "^29.6.3", + "pretty-format": "^29.7.0" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/jest-message-util": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-message-util/-/jest-message-util-29.7.0.tgz", + "integrity": "sha512-GBEV4GRADeP+qtB2+6u61stea8mGcOT4mCtrYISZwfu9/ISHFJ/5zOMXYbpBE9RsS5+Gb63DW4FgmnKJ79Kf6w==", + "dev": true, + "dependencies": { + "@babel/code-frame": "^7.12.13", + "@jest/types": "^29.6.3", + "@types/stack-utils": "^2.0.0", + "chalk": "^4.0.0", + "graceful-fs": "^4.2.9", + "micromatch": "^4.0.4", + "pretty-format": "^29.7.0", + "slash": "^3.0.0", + "stack-utils": "^2.0.3" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/jest-mock": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-mock/-/jest-mock-29.7.0.tgz", + "integrity": "sha512-ITOMZn+UkYS4ZFh83xYAOzWStloNzJFO2s8DWrE4lhtGD+AorgnbkiKERe4wQVBydIGPx059g6riW5Btp6Llnw==", + "dev": true, + "dependencies": { + "@jest/types": "^29.6.3", + "@types/node": "*", + "jest-util": "^29.7.0" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/jest-pnp-resolver": { + "version": "1.2.3", + "resolved": "https://registry.npmjs.org/jest-pnp-resolver/-/jest-pnp-resolver-1.2.3.tgz", + "integrity": "sha512-+3NpwQEnRoIBtx4fyhblQDPgJI0H1IEIkX7ShLUjPGA7TtUTvI1oiKi3SR4oBR0hQhQR80l4WAe5RrXBwWMA8w==", + "dev": true, + "engines": { + "node": ">=6" + }, + "peerDependencies": { + "jest-resolve": "*" + }, + "peerDependenciesMeta": { + "jest-resolve": { + "optional": true + } + } + }, + "node_modules/jest-regex-util": { + "version": "29.6.3", + "resolved": "https://registry.npmjs.org/jest-regex-util/-/jest-regex-util-29.6.3.tgz", + "integrity": "sha512-KJJBsRCyyLNWCNBOvZyRDnAIfUiRJ8v+hOBQYGn8gDyF3UegwiP4gwRR3/SDa42g1YbVycTidUF3rKjyLFDWbg==", + "dev": true, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/jest-resolve": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-resolve/-/jest-resolve-29.7.0.tgz", + "integrity": "sha512-IOVhZSrg+UvVAshDSDtHyFCCBUl/Q3AAJv8iZ6ZjnZ74xzvwuzLXid9IIIPgTnY62SJjfuupMKZsZQRsCvxEgA==", + "dev": true, + "dependencies": { + "chalk": "^4.0.0", + "graceful-fs": "^4.2.9", + "jest-haste-map": "^29.7.0", + "jest-pnp-resolver": "^1.2.2", + "jest-util": "^29.7.0", + "jest-validate": "^29.7.0", + "resolve": "^1.20.0", + "resolve.exports": "^2.0.0", + "slash": "^3.0.0" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/jest-resolve-dependencies": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-resolve-dependencies/-/jest-resolve-dependencies-29.7.0.tgz", + "integrity": "sha512-un0zD/6qxJ+S0et7WxeI3H5XSe9lTBBR7bOHCHXkKR6luG5mwDDlIzVQ0V5cZCuoTgEdcdwzTghYkTWfubi+nA==", + "dev": true, + "dependencies": { + "jest-regex-util": "^29.6.3", + "jest-snapshot": "^29.7.0" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/jest-runner": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-runner/-/jest-runner-29.7.0.tgz", + "integrity": "sha512-fsc4N6cPCAahybGBfTRcq5wFR6fpLznMg47sY5aDpsoejOcVYFb07AHuSnR0liMcPTgBsA3ZJL6kFOjPdoNipQ==", + "dev": true, + "dependencies": { + "@jest/console": "^29.7.0", + "@jest/environment": "^29.7.0", + "@jest/test-result": "^29.7.0", + "@jest/transform": "^29.7.0", + "@jest/types": "^29.6.3", + "@types/node": "*", + "chalk": "^4.0.0", + "emittery": "^0.13.1", + "graceful-fs": "^4.2.9", + "jest-docblock": "^29.7.0", + "jest-environment-node": "^29.7.0", + "jest-haste-map": "^29.7.0", + "jest-leak-detector": "^29.7.0", + "jest-message-util": "^29.7.0", + "jest-resolve": "^29.7.0", + "jest-runtime": "^29.7.0", + "jest-util": "^29.7.0", + "jest-watcher": "^29.7.0", + "jest-worker": "^29.7.0", + "p-limit": "^3.1.0", + "source-map-support": "0.5.13" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/jest-runner/node_modules/source-map-support": { + "version": "0.5.13", + "resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.5.13.tgz", + "integrity": "sha512-SHSKFHadjVA5oR4PPqhtAVdcBWwRYVd6g6cAXnIbRiIwc2EhPrTuKUBdSLvlEKyIP3GCf89fltvcZiP9MMFA1w==", + "dev": true, + "dependencies": { + "buffer-from": "^1.0.0", + "source-map": "^0.6.0" + } + }, + "node_modules/jest-runtime": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-runtime/-/jest-runtime-29.7.0.tgz", + "integrity": "sha512-gUnLjgwdGqW7B4LvOIkbKs9WGbn+QLqRQQ9juC6HndeDiezIwhDP+mhMwHWCEcfQ5RUXa6OPnFF8BJh5xegwwQ==", + "dev": true, + "dependencies": { + "@jest/environment": "^29.7.0", + "@jest/fake-timers": "^29.7.0", + "@jest/globals": "^29.7.0", + "@jest/source-map": "^29.6.3", + "@jest/test-result": "^29.7.0", + "@jest/transform": "^29.7.0", + "@jest/types": "^29.6.3", + "@types/node": "*", + "chalk": "^4.0.0", + "cjs-module-lexer": "^1.0.0", + "collect-v8-coverage": "^1.0.0", + "glob": "^7.1.3", + "graceful-fs": "^4.2.9", + "jest-haste-map": "^29.7.0", + "jest-message-util": "^29.7.0", + "jest-mock": "^29.7.0", + "jest-regex-util": "^29.6.3", + "jest-resolve": "^29.7.0", + "jest-snapshot": "^29.7.0", + "jest-util": "^29.7.0", + "slash": "^3.0.0", + "strip-bom": "^4.0.0" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/jest-snapshot": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-snapshot/-/jest-snapshot-29.7.0.tgz", + "integrity": "sha512-Rm0BMWtxBcioHr1/OX5YCP8Uov4riHvKPknOGs804Zg9JGZgmIBkbtlxJC/7Z4msKYVbIJtfU+tKb8xlYNfdkw==", + "dev": true, + "dependencies": { + "@babel/core": "^7.11.6", + "@babel/generator": "^7.7.2", + "@babel/plugin-syntax-jsx": "^7.7.2", + "@babel/plugin-syntax-typescript": "^7.7.2", + "@babel/types": "^7.3.3", + "@jest/expect-utils": "^29.7.0", + "@jest/transform": "^29.7.0", + "@jest/types": "^29.6.3", + "babel-preset-current-node-syntax": "^1.0.0", + "chalk": "^4.0.0", + "expect": "^29.7.0", + "graceful-fs": "^4.2.9", + "jest-diff": "^29.7.0", + "jest-get-type": "^29.6.3", + "jest-matcher-utils": "^29.7.0", + "jest-message-util": "^29.7.0", + "jest-util": "^29.7.0", + "natural-compare": "^1.4.0", + "pretty-format": "^29.7.0", + "semver": "^7.5.3" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/jest-snapshot/node_modules/semver": { + "version": "7.6.3", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.6.3.tgz", + "integrity": "sha512-oVekP1cKtI+CTDvHWYFUcMtsK/00wmAEfyqKfNdARm8u1wNVhSgaX7A8d4UuIlUI5e84iEwOhs7ZPYRmzU9U6A==", + "dev": true, + "bin": { + "semver": "bin/semver.js" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/jest-util": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-util/-/jest-util-29.7.0.tgz", + "integrity": "sha512-z6EbKajIpqGKU56y5KBUgy1dt1ihhQJgWzUlZHArA/+X2ad7Cb5iF+AK1EWVL/Bo7Rz9uurpqw6SiBCefUbCGA==", + "dev": true, + "dependencies": { + "@jest/types": "^29.6.3", + "@types/node": "*", + "chalk": "^4.0.0", + "ci-info": "^3.2.0", + "graceful-fs": "^4.2.9", + "picomatch": "^2.2.3" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/jest-validate": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-validate/-/jest-validate-29.7.0.tgz", + "integrity": "sha512-ZB7wHqaRGVw/9hST/OuFUReG7M8vKeq0/J2egIGLdvjHCmYqGARhzXmtgi+gVeZ5uXFF219aOc3Ls2yLg27tkw==", + "dev": true, + "dependencies": { + "@jest/types": "^29.6.3", + "camelcase": "^6.2.0", + "chalk": "^4.0.0", + "jest-get-type": "^29.6.3", + "leven": "^3.1.0", + "pretty-format": "^29.7.0" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/jest-validate/node_modules/camelcase": { + "version": "6.3.0", + "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-6.3.0.tgz", + "integrity": "sha512-Gmy6FhYlCY7uOElZUSbxo2UCDH8owEk996gkbrpsgGtrJLM3J7jGxl9Ic7Qwwj4ivOE5AWZWRMecDdF7hqGjFA==", + "dev": true, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/jest-watcher": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-watcher/-/jest-watcher-29.7.0.tgz", + "integrity": "sha512-49Fg7WXkU3Vl2h6LbLtMQ/HyB6rXSIX7SqvBLQmssRBGN9I0PNvPmAmCWSOY6SOvrjhI/F7/bGAv9RtnsPA03g==", + "dev": true, + "dependencies": { + "@jest/test-result": "^29.7.0", + "@jest/types": "^29.6.3", + "@types/node": "*", + "ansi-escapes": "^4.2.1", + "chalk": "^4.0.0", + "emittery": "^0.13.1", + "jest-util": "^29.7.0", + "string-length": "^4.0.1" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/jest-worker": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-worker/-/jest-worker-29.7.0.tgz", + "integrity": "sha512-eIz2msL/EzL9UFTFFx7jBTkeZfku0yUAyZZZmJ93H2TYEiroIx2PQjEXcwYtYl8zXCxb+PAmA2hLIt/6ZEkPHw==", + "dev": true, + "dependencies": { + "@types/node": "*", + "jest-util": "^29.7.0", + "merge-stream": "^2.0.0", + "supports-color": "^8.0.0" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/jest-worker/node_modules/supports-color": { + "version": "8.1.1", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-8.1.1.tgz", + "integrity": "sha512-MpUEN2OodtUzxvKQl72cUF7RQ5EiHsGvSsVG0ia9c5RbWGL2CI4C7EpPS8UTBIplnlzZiNuV56w+FuNxy3ty2Q==", + "dev": true, + "dependencies": { + "has-flag": "^4.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/supports-color?sponsor=1" + } + }, + "node_modules/js-tokens": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz", + "integrity": "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==", + "dev": true + }, + "node_modules/js-yaml": { + "version": "3.14.1", + "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.14.1.tgz", + "integrity": "sha512-okMH7OXXJ7YrN9Ok3/SXrnu4iX9yOk+25nqX4imS2npuvTYDmo/QEZoqwZkYaIDk3jVvBOTOIEgEhaLOynBS9g==", + "dev": true, + "dependencies": { + "argparse": "^1.0.7", + "esprima": "^4.0.0" + }, + "bin": { + "js-yaml": "bin/js-yaml.js" + } + }, + "node_modules/jsesc": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/jsesc/-/jsesc-3.0.2.tgz", + "integrity": "sha512-xKqzzWXDttJuOcawBt4KnKHHIf5oQ/Cxax+0PWFG+DFDgHNAdi+TXECADI+RYiFUMmx8792xsMbbgXj4CwnP4g==", + "dev": true, + "bin": { + "jsesc": "bin/jsesc" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/json-parse-even-better-errors": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/json-parse-even-better-errors/-/json-parse-even-better-errors-2.3.1.tgz", + "integrity": "sha512-xyFwyhro/JEof6Ghe2iz2NcXoj2sloNsWr/XsERDK/oiPCfaNhl5ONfp+jQdAZRQQ0IJWNzH9zIZF7li91kh2w==", + "dev": true + }, + "node_modules/json5": { + "version": "2.2.3", + "resolved": "https://registry.npmjs.org/json5/-/json5-2.2.3.tgz", + "integrity": "sha512-XmOWe7eyHYH14cLdVPoyg+GOH3rYX++KpzrylJwSW98t3Nk+U8XOl8FWKOgwtzdb8lXGf6zYwDUzeHMWfxasyg==", + "dev": true, + "bin": { + "json5": "lib/cli.js" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/kleur": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/kleur/-/kleur-3.0.3.tgz", + "integrity": "sha512-eTIzlVOSUR+JxdDFepEYcBMtZ9Qqdef+rnzWdRZuMbOywu5tO2w2N7rqjoANZ5k9vywhL6Br1VRjUIgTQx4E8w==", + "dev": true, + "engines": { + "node": ">=6" + } + }, + "node_modules/leven": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/leven/-/leven-3.1.0.tgz", + "integrity": "sha512-qsda+H8jTaUaN/x5vzW2rzc+8Rw4TAQ/4KjB46IwK5VH+IlVeeeje/EoZRpiXvIqjFgK84QffqPztGI3VBLG1A==", + "dev": true, + "engines": { + "node": ">=6" + } + }, + "node_modules/lines-and-columns": { + "version": "1.2.4", + "resolved": "https://registry.npmjs.org/lines-and-columns/-/lines-and-columns-1.2.4.tgz", + "integrity": "sha512-7ylylesZQ/PV29jhEDl3Ufjo6ZX7gCqJr5F7PKrqc93v7fzSymt1BpwEU8nAUXs8qzzvqhbjhK5QZg6Mt/HkBg==", + "dev": true + }, + "node_modules/locate-path": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-5.0.0.tgz", + "integrity": "sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g==", + "dev": true, + "dependencies": { + "p-locate": "^4.1.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/lodash.memoize": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/lodash.memoize/-/lodash.memoize-4.1.2.tgz", + "integrity": "sha512-t7j+NzmgnQzTAYXcsHYLgimltOV1MXHtlOWf6GjL9Kj8GK5FInw5JotxvbOs+IvV1/Dzo04/fCGfLVs7aXb4Ag==", + "dev": true + }, + "node_modules/lru-cache": { + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-5.1.1.tgz", + "integrity": "sha512-KpNARQA3Iwv+jTA0utUVVbrh+Jlrr1Fv0e56GGzAFOXN7dk/FviaDW8LHmK52DlcH4WP2n6gI8vN1aesBFgo9w==", + "dev": true, + "dependencies": { + "yallist": "^3.0.2" + } + }, + "node_modules/make-dir": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/make-dir/-/make-dir-4.0.0.tgz", + "integrity": "sha512-hXdUTZYIVOt1Ex//jAQi+wTZZpUpwBj/0QsOzqegb3rGMMeJiSEu5xLHnYfBrRV4RH2+OCSOO95Is/7x1WJ4bw==", + "dev": true, + "dependencies": { + "semver": "^7.5.3" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/make-dir/node_modules/semver": { + "version": "7.6.3", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.6.3.tgz", + "integrity": "sha512-oVekP1cKtI+CTDvHWYFUcMtsK/00wmAEfyqKfNdARm8u1wNVhSgaX7A8d4UuIlUI5e84iEwOhs7ZPYRmzU9U6A==", + "dev": true, + "bin": { + "semver": "bin/semver.js" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/make-error": { + "version": "1.3.6", + "resolved": "https://registry.npmjs.org/make-error/-/make-error-1.3.6.tgz", + "integrity": "sha512-s8UhlNe7vPKomQhC1qFelMokr/Sc3AgNbso3n74mVPA5LTZwkB9NlXf4XPamLxJE8h0gh73rM94xvwRT2CVInw==", + "dev": true + }, + "node_modules/makeerror": { + "version": "1.0.12", + "resolved": "https://registry.npmjs.org/makeerror/-/makeerror-1.0.12.tgz", + "integrity": "sha512-JmqCvUhmt43madlpFzG4BQzG2Z3m6tvQDNKdClZnO3VbIudJYmxsT0FNJMeiB2+JTSlTQTSbU8QdesVmwJcmLg==", + "dev": true, + "dependencies": { + "tmpl": "1.0.5" + } + }, + "node_modules/merge-stream": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/merge-stream/-/merge-stream-2.0.0.tgz", + "integrity": "sha512-abv/qOcuPfk3URPfDzmZU1LKmuw8kT+0nIHvKrKgFrwifol/doWcdA4ZqsWQ8ENrFKkd67Mfpo/LovbIUsbt3w==", + "dev": true + }, + "node_modules/micromatch": { + "version": "4.0.8", + "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.8.tgz", + "integrity": "sha512-PXwfBhYu0hBCPw8Dn0E+WDYb7af3dSLVWKi3HGv84IdF4TyFoC0ysxFd0Goxw7nSv4T/PzEJQxsYsEiFCKo2BA==", + "dev": true, + "dependencies": { + "braces": "^3.0.3", + "picomatch": "^2.3.1" + }, + "engines": { + "node": ">=8.6" + } + }, + "node_modules/mimic-fn": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/mimic-fn/-/mimic-fn-2.1.0.tgz", + "integrity": "sha512-OqbOk5oEQeAZ8WXWydlu9HJjz9WVdEIvamMCcXmuqUYjTknH/sqsWvhQ3vgwKFRR1HpjvNBKQ37nbJgYzGqGcg==", + "dev": true, + "engines": { + "node": ">=6" + } + }, + "node_modules/minimatch": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", + "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", + "dev": true, + "dependencies": { + "brace-expansion": "^1.1.7" + }, + "engines": { + "node": "*" + } + }, + "node_modules/ms": { + "version": "2.1.3", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", + "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==", + "dev": true + }, + "node_modules/natural-compare": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/natural-compare/-/natural-compare-1.4.0.tgz", + "integrity": "sha512-OWND8ei3VtNC9h7V60qff3SVobHr996CTwgxubgyQYEpg290h9J0buyECNNJexkFm5sOajh5G116RYA1c8ZMSw==", + "dev": true + }, + "node_modules/node-int64": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/node-int64/-/node-int64-0.4.0.tgz", + "integrity": "sha512-O5lz91xSOeoXP6DulyHfllpq+Eg00MWitZIbtPfoSEvqIHdl5gfcY6hYzDWnj0qD5tz52PI08u9qUvSVeUBeHw==", + "dev": true + }, + "node_modules/node-releases": { + "version": "2.0.18", + "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-2.0.18.tgz", + "integrity": "sha512-d9VeXT4SJ7ZeOqGX6R5EM022wpL+eWPooLI+5UpWn2jCT1aosUQEhQP214x33Wkwx3JQMvIm+tIoVOdodFS40g==", + "dev": true + }, + "node_modules/normalize-path": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-3.0.0.tgz", + "integrity": "sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/npm-run-path": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/npm-run-path/-/npm-run-path-4.0.1.tgz", + "integrity": "sha512-S48WzZW777zhNIrn7gxOlISNAqi9ZC/uQFnRdbeIHhZhCA6UqpkOT8T1G7BvfdgP4Er8gF4sUbaS0i7QvIfCWw==", + "dev": true, + "dependencies": { + "path-key": "^3.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/once": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", + "integrity": "sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w==", + "dev": true, + "dependencies": { + "wrappy": "1" + } + }, + "node_modules/onetime": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/onetime/-/onetime-5.1.2.tgz", + "integrity": "sha512-kbpaSSGJTWdAY5KPVeMOKXSrPtr8C8C7wodJbcsd51jRnmD+GZu8Y0VoU6Dm5Z4vWr0Ig/1NKuWRKf7j5aaYSg==", + "dev": true, + "dependencies": { + "mimic-fn": "^2.1.0" + }, + "engines": { + "node": ">=6" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/p-limit": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-3.1.0.tgz", + "integrity": "sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ==", + "dev": true, + "dependencies": { + "yocto-queue": "^0.1.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/p-locate": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-4.1.0.tgz", + "integrity": "sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A==", + "dev": true, + "dependencies": { + "p-limit": "^2.2.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/p-locate/node_modules/p-limit": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.3.0.tgz", + "integrity": "sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w==", + "dev": true, + "dependencies": { + "p-try": "^2.0.0" + }, + "engines": { + "node": ">=6" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/p-try": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/p-try/-/p-try-2.2.0.tgz", + "integrity": "sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ==", + "dev": true, + "engines": { + "node": ">=6" + } + }, + "node_modules/parse-json": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-5.2.0.tgz", + "integrity": "sha512-ayCKvm/phCGxOkYRSCM82iDwct8/EonSEgCSxWxD7ve6jHggsFl4fZVQBPRNgQoKiuV/odhFrGzQXZwbifC8Rg==", + "dev": true, + "dependencies": { + "@babel/code-frame": "^7.0.0", + "error-ex": "^1.3.1", + "json-parse-even-better-errors": "^2.3.0", + "lines-and-columns": "^1.1.6" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/path-exists": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz", + "integrity": "sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/path-is-absolute": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", + "integrity": "sha512-AVbw3UJ2e9bq64vSaS9Am0fje1Pa8pbGqTTsmXfaIiMpnr5DlDhfJOuLj9Sf95ZPVDAUerDfEk88MPmPe7UCQg==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/path-key": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz", + "integrity": "sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/path-parse": { + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.7.tgz", + "integrity": "sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==", + "dev": true + }, + "node_modules/picocolors": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.1.1.tgz", + "integrity": "sha512-xceH2snhtb5M9liqDsmEw56le376mTZkEX/jEb/RxNFyegNul7eNslCXP9FDj/Lcu0X8KEyMceP2ntpaHrDEVA==", + "dev": true + }, + "node_modules/picomatch": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz", + "integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==", + "dev": true, + "engines": { + "node": ">=8.6" + }, + "funding": { + "url": "https://github.com/sponsors/jonschlinkert" + } + }, + "node_modules/pirates": { + "version": "4.0.6", + "resolved": "https://registry.npmjs.org/pirates/-/pirates-4.0.6.tgz", + "integrity": "sha512-saLsH7WeYYPiD25LDuLRRY/i+6HaPYr6G1OUlN39otzkSTxKnubR9RTxS3/Kk50s1g2JTgFwWQDQyplC5/SHZg==", + "dev": true, + "engines": { + "node": ">= 6" + } + }, + "node_modules/pkg-dir": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/pkg-dir/-/pkg-dir-4.2.0.tgz", + "integrity": "sha512-HRDzbaKjC+AOWVXxAU/x54COGeIv9eb+6CkDSQoNTt4XyWoIJvuPsXizxu/Fr23EiekbtZwmh1IcIG/l/a10GQ==", + "dev": true, + "dependencies": { + "find-up": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/prettier": { + "version": "3.3.3", + "resolved": "https://registry.npmjs.org/prettier/-/prettier-3.3.3.tgz", + "integrity": "sha512-i2tDNA0O5IrMO757lfrdQZCc2jPNDVntV0m/+4whiDfWaTKfMNgR7Qz0NAeGz/nRqF4m5/6CLzbP4/liHt12Ew==", + "dev": true, + "bin": { + "prettier": "bin/prettier.cjs" + }, + "engines": { + "node": ">=14" + }, + "funding": { + "url": "https://github.com/prettier/prettier?sponsor=1" + } + }, + "node_modules/pretty-format": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-29.7.0.tgz", + "integrity": "sha512-Pdlw/oPxN+aXdmM9R00JVC9WVFoCLTKJvDVLgmJ+qAffBMxsV85l/Lu7sNx4zSzPyoL2euImuEwHhOXdEgNFZQ==", + "dev": true, + "dependencies": { + "@jest/schemas": "^29.6.3", + "ansi-styles": "^5.0.0", + "react-is": "^18.0.0" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/pretty-format/node_modules/ansi-styles": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-5.2.0.tgz", + "integrity": "sha512-Cxwpt2SfTzTtXcfOlzGEee8O+c+MmUgGrNiBcXnuWxuFJHe6a5Hz7qwhwe5OgaSYI0IJvkLqWX1ASG+cJOkEiA==", + "dev": true, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" + } + }, + "node_modules/prompts": { + "version": "2.4.2", + "resolved": "https://registry.npmjs.org/prompts/-/prompts-2.4.2.tgz", + "integrity": "sha512-NxNv/kLguCA7p3jE8oL2aEBsrJWgAakBpgmgK6lpPWV+WuOmY6r2/zbAVnP+T8bQlA0nzHXSJSJW0Hq7ylaD2Q==", + "dev": true, + "dependencies": { + "kleur": "^3.0.3", + "sisteransi": "^1.0.5" + }, + "engines": { + "node": ">= 6" + } + }, + "node_modules/pure-rand": { + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/pure-rand/-/pure-rand-6.1.0.tgz", + "integrity": "sha512-bVWawvoZoBYpp6yIoQtQXHZjmz35RSVHnUOTefl8Vcjr8snTPY1wnpSPMWekcFwbxI6gtmT7rSYPFvz71ldiOA==", + "dev": true, + "funding": [ + { + "type": "individual", + "url": "https://github.com/sponsors/dubzzz" + }, + { + "type": "opencollective", + "url": "https://opencollective.com/fast-check" + } + ] + }, + "node_modules/react-is": { + "version": "18.3.1", + "resolved": "https://registry.npmjs.org/react-is/-/react-is-18.3.1.tgz", + "integrity": "sha512-/LLMVyas0ljjAtoYiPqYiL8VWXzUUdThrmU5+n20DZv+a+ClRoevUzw5JxU+Ieh5/c87ytoTBV9G1FiKfNJdmg==", + "dev": true + }, + "node_modules/require-directory": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz", + "integrity": "sha512-fGxEI7+wsG9xrvdjsrlmL22OMTTiHRwAMroiEeMgq8gzoLC/PQr7RsRDSTLUg/bZAZtF+TVIkHc6/4RIKrui+Q==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/resolve": { + "version": "1.22.8", + "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.22.8.tgz", + "integrity": "sha512-oKWePCxqpd6FlLvGV1VU0x7bkPmmCNolxzjMf4NczoDnQcIWrAF+cPtZn5i6n+RfD2d9i0tzpKnG6Yk168yIyw==", + "dev": true, + "dependencies": { + "is-core-module": "^2.13.0", + "path-parse": "^1.0.7", + "supports-preserve-symlinks-flag": "^1.0.0" + }, + "bin": { + "resolve": "bin/resolve" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/resolve-cwd": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/resolve-cwd/-/resolve-cwd-3.0.0.tgz", + "integrity": "sha512-OrZaX2Mb+rJCpH/6CpSqt9xFVpN++x01XnN2ie9g6P5/3xelLAkXWVADpdz1IHD/KFfEXyE6V0U01OQ3UO2rEg==", + "dev": true, + "dependencies": { + "resolve-from": "^5.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/resolve-from": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-5.0.0.tgz", + "integrity": "sha512-qYg9KP24dD5qka9J47d0aVky0N+b4fTU89LN9iDnjB5waksiC49rvMB0PrUJQGoTmH50XPiqOvAjDfaijGxYZw==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/resolve.exports": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/resolve.exports/-/resolve.exports-2.0.2.tgz", + "integrity": "sha512-X2UW6Nw3n/aMgDVy+0rSqgHlv39WZAlZrXCdnbyEiKm17DSqHX4MmQMaST3FbeWR5FTuRcUwYAziZajji0Y7mg==", + "dev": true, + "engines": { + "node": ">=10" + } + }, + "node_modules/semver": { + "version": "6.3.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.1.tgz", + "integrity": "sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==", + "dev": true, + "bin": { + "semver": "bin/semver.js" + } + }, + "node_modules/shebang-command": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz", + "integrity": "sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==", + "dev": true, + "dependencies": { + "shebang-regex": "^3.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/shebang-regex": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-3.0.0.tgz", + "integrity": "sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/signal-exit": { + "version": "3.0.7", + "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.7.tgz", + "integrity": "sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ==", + "dev": true + }, + "node_modules/sisteransi": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/sisteransi/-/sisteransi-1.0.5.tgz", + "integrity": "sha512-bLGGlR1QxBcynn2d5YmDX4MGjlZvy2MRBDRNHLJ8VI6l6+9FUiyTFNJ0IveOSP0bcXgVDPRcfGqA0pjaqUpfVg==", + "dev": true + }, + "node_modules/slash": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/slash/-/slash-3.0.0.tgz", + "integrity": "sha512-g9Q1haeby36OSStwb4ntCGGGaKsaVSjQ68fBxoQcutl5fS1vuY18H3wSt3jFyFtrkx+Kz0V1G85A4MyAdDMi2Q==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/source-map": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/source-map-support": { + "version": "0.5.21", + "resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.5.21.tgz", + "integrity": "sha512-uBHU3L3czsIyYXKX88fdrGovxdSCoTGDRZ6SYXtSRxLZUzHg5P/66Ht6uoUlHu9EZod+inXhKo3qQgwXUT/y1w==", + "dependencies": { + "buffer-from": "^1.0.0", + "source-map": "^0.6.0" + } + }, + "node_modules/sprintf-js": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.0.3.tgz", + "integrity": "sha512-D9cPgkvLlV3t3IzL0D0YLvGA9Ahk4PcvVwUbN0dSGr1aP0Nrt4AEnTUbuGvquEC0mA64Gqt1fzirlRs5ibXx8g==", + "dev": true + }, + "node_modules/stack-utils": { + "version": "2.0.6", + "resolved": "https://registry.npmjs.org/stack-utils/-/stack-utils-2.0.6.tgz", + "integrity": "sha512-XlkWvfIm6RmsWtNJx+uqtKLS8eqFbxUg0ZzLXqY0caEy9l7hruX8IpiDnjsLavoBgqCCR71TqWO8MaXYheJ3RQ==", + "dev": true, + "dependencies": { + "escape-string-regexp": "^2.0.0" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/string-length": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/string-length/-/string-length-4.0.2.tgz", + "integrity": "sha512-+l6rNN5fYHNhZZy41RXsYptCjA2Igmq4EG7kZAYFQI1E1VTXarr6ZPXBg6eq7Y6eK4FEhY6AJlyuFIb/v/S0VQ==", + "dev": true, + "dependencies": { + "char-regex": "^1.0.2", + "strip-ansi": "^6.0.0" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/string-width": { + "version": "4.2.3", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", + "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", + "dev": true, + "dependencies": { + "emoji-regex": "^8.0.0", + "is-fullwidth-code-point": "^3.0.0", + "strip-ansi": "^6.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/strip-ansi": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", + "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", + "dev": true, + "dependencies": { + "ansi-regex": "^5.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/strip-bom": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-4.0.0.tgz", + "integrity": "sha512-3xurFv5tEgii33Zi8Jtp55wEIILR9eh34FAW00PZf+JnSsTmV/ioewSgQl97JHvgjoRGwPShsWm+IdrxB35d0w==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/strip-final-newline": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/strip-final-newline/-/strip-final-newline-2.0.0.tgz", + "integrity": "sha512-BrpvfNAE3dcvq7ll3xVumzjKjZQ5tI1sEUIKr3Uoks0XUl45St3FlatVqef9prk4jRDzhW6WZg+3bk93y6pLjA==", + "dev": true, + "engines": { + "node": ">=6" + } + }, + "node_modules/strip-json-comments": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-3.1.1.tgz", + "integrity": "sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig==", + "dev": true, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/supports-color": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", + "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", + "dev": true, + "dependencies": { + "has-flag": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/supports-preserve-symlinks-flag": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/supports-preserve-symlinks-flag/-/supports-preserve-symlinks-flag-1.0.0.tgz", + "integrity": "sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w==", + "dev": true, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/test-exclude": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/test-exclude/-/test-exclude-6.0.0.tgz", + "integrity": "sha512-cAGWPIyOHU6zlmg88jwm7VRyXnMN7iV68OGAbYDk/Mh/xC/pzVPlQtY6ngoIH/5/tciuhGfvESU8GrHrcxD56w==", + "dev": true, + "dependencies": { + "@istanbuljs/schema": "^0.1.2", + "glob": "^7.1.4", + "minimatch": "^3.0.4" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/tmpl": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/tmpl/-/tmpl-1.0.5.tgz", + "integrity": "sha512-3f0uOEAQwIqGuWW2MVzYg8fV/QNnc/IpuJNG837rLuczAaLVHslWHZQj4IGiEl5Hs3kkbhwL9Ab7Hrsmuj+Smw==", + "dev": true + }, + "node_modules/to-regex-range": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz", + "integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==", + "dev": true, + "dependencies": { + "is-number": "^7.0.0" + }, + "engines": { + "node": ">=8.0" + } + }, + "node_modules/ts-jest": { + "version": "29.2.5", + "resolved": "https://registry.npmjs.org/ts-jest/-/ts-jest-29.2.5.tgz", + "integrity": "sha512-KD8zB2aAZrcKIdGk4OwpJggeLcH1FgrICqDSROWqlnJXGCXK4Mn6FcdK2B6670Xr73lHMG1kHw8R87A0ecZ+vA==", + "dev": true, + "dependencies": { + "bs-logger": "^0.2.6", + "ejs": "^3.1.10", + "fast-json-stable-stringify": "^2.1.0", + "jest-util": "^29.0.0", + "json5": "^2.2.3", + "lodash.memoize": "^4.1.2", + "make-error": "^1.3.6", + "semver": "^7.6.3", + "yargs-parser": "^21.1.1" + }, + "bin": { + "ts-jest": "cli.js" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || ^18.0.0 || >=20.0.0" + }, + "peerDependencies": { + "@babel/core": ">=7.0.0-beta.0 <8", + "@jest/transform": "^29.0.0", + "@jest/types": "^29.0.0", + "babel-jest": "^29.0.0", + "jest": "^29.0.0", + "typescript": ">=4.3 <6" + }, + "peerDependenciesMeta": { + "@babel/core": { + "optional": true + }, + "@jest/transform": { + "optional": true + }, + "@jest/types": { + "optional": true + }, + "babel-jest": { + "optional": true + }, + "esbuild": { + "optional": true + } + } + }, + "node_modules/ts-jest/node_modules/semver": { + "version": "7.6.3", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.6.3.tgz", + "integrity": "sha512-oVekP1cKtI+CTDvHWYFUcMtsK/00wmAEfyqKfNdARm8u1wNVhSgaX7A8d4UuIlUI5e84iEwOhs7ZPYRmzU9U6A==", + "dev": true, + "bin": { + "semver": "bin/semver.js" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/ts-node": { + "version": "10.9.2", + "resolved": "https://registry.npmjs.org/ts-node/-/ts-node-10.9.2.tgz", + "integrity": "sha512-f0FFpIdcHgn8zcPSbf1dRevwt047YMnaiJM3u2w2RewrB+fob/zePZcrOyQoLMMO7aBIddLcQIEK5dYjkLnGrQ==", + "dev": true, + "dependencies": { + "@cspotcode/source-map-support": "^0.8.0", + "@tsconfig/node10": "^1.0.7", + "@tsconfig/node12": "^1.0.7", + "@tsconfig/node14": "^1.0.0", + "@tsconfig/node16": "^1.0.2", + "acorn": "^8.4.1", + "acorn-walk": "^8.1.1", + "arg": "^4.1.0", + "create-require": "^1.1.0", + "diff": "^4.0.1", + "make-error": "^1.1.1", + "v8-compile-cache-lib": "^3.0.1", + "yn": "3.1.1" + }, + "bin": { + "ts-node": "dist/bin.js", + "ts-node-cwd": "dist/bin-cwd.js", + "ts-node-esm": "dist/bin-esm.js", + "ts-node-script": "dist/bin-script.js", + "ts-node-transpile-only": "dist/bin-transpile.js", + "ts-script": "dist/bin-script-deprecated.js" + }, + "peerDependencies": { + "@swc/core": ">=1.2.50", + "@swc/wasm": ">=1.2.50", + "@types/node": "*", + "typescript": ">=2.7" + }, + "peerDependenciesMeta": { + "@swc/core": { + "optional": true + }, + "@swc/wasm": { + "optional": true + } + } + }, + "node_modules/type-detect": { + "version": "4.0.8", + "resolved": "https://registry.npmjs.org/type-detect/-/type-detect-4.0.8.tgz", + "integrity": "sha512-0fr/mIH1dlO+x7TlcMy+bIDqKPsw/70tVyeHW787goQjhmqaZe10uwLujubK9q9Lg6Fiho1KUKDYz0Z7k7g5/g==", + "dev": true, + "engines": { + "node": ">=4" + } + }, + "node_modules/type-fest": { + "version": "0.21.3", + "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.21.3.tgz", + "integrity": "sha512-t0rzBq87m3fVcduHDUFhKmyyX+9eo6WQjZvf51Ea/M0Q7+T374Jp1aUiyUl0GKxp8M/OETVHSDvmkyPgvX+X2w==", + "dev": true, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/typescript": { + "version": "5.6.3", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.6.3.tgz", + "integrity": "sha512-hjcS1mhfuyi4WW8IWtjP7brDrG2cuDZukyrYrSauoXGNgx0S7zceP07adYkJycEr56BOUTNPzbInooiN3fn1qw==", + "dev": true, + "bin": { + "tsc": "bin/tsc", + "tsserver": "bin/tsserver" + }, + "engines": { + "node": ">=14.17" + } + }, + "node_modules/undici-types": { + "version": "6.19.8", + "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-6.19.8.tgz", + "integrity": "sha512-ve2KP6f/JnbPBFyobGHuerC9g1FYGn/F8n1LWTwNxCEzd6IfqTwUQcNXgEtmmQ6DlRrC1hrSrBnCZPokRrDHjw==", + "dev": true + }, + "node_modules/update-browserslist-db": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/update-browserslist-db/-/update-browserslist-db-1.1.1.tgz", + "integrity": "sha512-R8UzCaa9Az+38REPiJ1tXlImTJXlVfgHZsglwBD/k6nj76ctsH1E3q4doGrukiLQd3sGQYu56r5+lo5r94l29A==", + "dev": true, + "funding": [ + { + "type": "opencollective", + "url": "https://opencollective.com/browserslist" + }, + { + "type": "tidelift", + "url": "https://tidelift.com/funding/github/npm/browserslist" + }, + { + "type": "github", + "url": "https://github.com/sponsors/ai" + } + ], + "dependencies": { + "escalade": "^3.2.0", + "picocolors": "^1.1.0" + }, + "bin": { + "update-browserslist-db": "cli.js" + }, + "peerDependencies": { + "browserslist": ">= 4.21.0" + } + }, + "node_modules/v8-compile-cache-lib": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/v8-compile-cache-lib/-/v8-compile-cache-lib-3.0.1.tgz", + "integrity": "sha512-wa7YjyUGfNZngI/vtK0UHAN+lgDCxBPCylVXGp0zu59Fz5aiGtNXaq3DhIov063MorB+VfufLh3JlF2KdTK3xg==", + "dev": true + }, + "node_modules/v8-to-istanbul": { + "version": "9.3.0", + "resolved": "https://registry.npmjs.org/v8-to-istanbul/-/v8-to-istanbul-9.3.0.tgz", + "integrity": "sha512-kiGUalWN+rgBJ/1OHZsBtU4rXZOfj/7rKQxULKlIzwzQSvMJUUNgPwJEEh7gU6xEVxC0ahoOBvN2YI8GH6FNgA==", + "dev": true, + "dependencies": { + "@jridgewell/trace-mapping": "^0.3.12", + "@types/istanbul-lib-coverage": "^2.0.1", + "convert-source-map": "^2.0.0" + }, + "engines": { + "node": ">=10.12.0" + } + }, + "node_modules/walker": { + "version": "1.0.8", + "resolved": "https://registry.npmjs.org/walker/-/walker-1.0.8.tgz", + "integrity": "sha512-ts/8E8l5b7kY0vlWLewOkDXMmPdLcVV4GmOQLyxuSswIJsweeFZtAsMF7k1Nszz+TYBQrlYRmzOnr398y1JemQ==", + "dev": true, + "dependencies": { + "makeerror": "1.0.12" + } + }, + "node_modules/which": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz", + "integrity": "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==", + "dev": true, + "dependencies": { + "isexe": "^2.0.0" + }, + "bin": { + "node-which": "bin/node-which" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/wrap-ansi": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz", + "integrity": "sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==", + "dev": true, + "dependencies": { + "ansi-styles": "^4.0.0", + "string-width": "^4.1.0", + "strip-ansi": "^6.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/wrap-ansi?sponsor=1" + } + }, + "node_modules/wrappy": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", + "integrity": "sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==", + "dev": true + }, + "node_modules/write-file-atomic": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/write-file-atomic/-/write-file-atomic-4.0.2.tgz", + "integrity": "sha512-7KxauUdBmSdWnmpaGFg+ppNjKF8uNLry8LyzjauQDOVONfFLNKrKvQOxZ/VuTIcS/gge/YNahf5RIIQWTSarlg==", + "dev": true, + "dependencies": { + "imurmurhash": "^0.1.4", + "signal-exit": "^3.0.7" + }, + "engines": { + "node": "^12.13.0 || ^14.15.0 || >=16.0.0" + } + }, + "node_modules/y18n": { + "version": "5.0.8", + "resolved": "https://registry.npmjs.org/y18n/-/y18n-5.0.8.tgz", + "integrity": "sha512-0pfFzegeDWJHJIAmTLRP2DwHjdF5s7jo9tuztdQxAhINCdvS+3nGINqPd00AphqJR/0LhANUS6/+7SCb98YOfA==", + "dev": true, + "engines": { + "node": ">=10" + } + }, + "node_modules/yallist": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/yallist/-/yallist-3.1.1.tgz", + "integrity": "sha512-a4UGQaWPH59mOXUYnAG2ewncQS4i4F43Tv3JoAM+s2VDAmS9NsK8GpDMLrCHPksFT7h3K6TOoUNn2pb7RoXx4g==", + "dev": true + }, + "node_modules/yargs": { + "version": "17.7.2", + "resolved": "https://registry.npmjs.org/yargs/-/yargs-17.7.2.tgz", + "integrity": "sha512-7dSzzRQ++CKnNI/krKnYRV7JKKPUXMEh61soaHKg9mrWEhzFWhFnxPxGl+69cD1Ou63C13NUPCnmIcrvqCuM6w==", + "dev": true, + "dependencies": { + "cliui": "^8.0.1", + "escalade": "^3.1.1", + "get-caller-file": "^2.0.5", + "require-directory": "^2.1.1", + "string-width": "^4.2.3", + "y18n": "^5.0.5", + "yargs-parser": "^21.1.1" + }, + "engines": { + "node": ">=12" + } + }, + "node_modules/yargs-parser": { + "version": "21.1.1", + "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-21.1.1.tgz", + "integrity": "sha512-tVpsJW7DdjecAiFpbIB1e3qxIQsE6NoPc5/eTdrbbIC4h0LVsWhnoa3g+m2HclBIujHzsxZ4VJVA+GUuc2/LBw==", + "dev": true, + "engines": { + "node": ">=12" + } + }, + "node_modules/yn": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/yn/-/yn-3.1.1.tgz", + "integrity": "sha512-Ux4ygGWsu2c7isFWe8Yu1YluJmqVhxqK2cLXNQA5AcC3QfbGNpM7fu0Y8b/z16pXLnFxZYvWhd3fhBY9DLmC6Q==", + "dev": true, + "engines": { + "node": ">=6" + } + }, + "node_modules/yocto-queue": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/yocto-queue/-/yocto-queue-0.1.0.tgz", + "integrity": "sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q==", + "dev": true, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + } + } +} diff --git a/cdk/ecs/package.json b/cdk/ecs/package.json new file mode 100644 index 0000000..089b43d --- /dev/null +++ b/cdk/ecs/package.json @@ -0,0 +1,26 @@ +{ + "name": "cdk-ecs", + "version": "0.1.0", + "scripts": { + "build": "npm install && tsc && cdk synth", + "watch": "tsc -w", + "test": "jest", + "cdk": "cdk", + "clean": "rm -rf node_modules && rm -rf ./cdk.out" + }, + "devDependencies": { + "@types/jest": "^29.5.14", + "@types/node": "22.7.9", + "aws-cdk": "2.166.0", + "jest": "^29.7.0", + "prettier": "3.3.3", + "ts-jest": "^29.2.5", + "ts-node": "^10.9.2", + "typescript": "~5.6.3" + }, + "dependencies": { + "aws-cdk-lib": "2.166.0", + "constructs": "^10.0.0", + "source-map-support": "^0.5.21" + } +} diff --git a/cdk/ecs/tsconfig.json b/cdk/ecs/tsconfig.json new file mode 100644 index 0000000..7c8babe --- /dev/null +++ b/cdk/ecs/tsconfig.json @@ -0,0 +1,23 @@ +{ + "compilerOptions": { + "target": "ES2020", + "module": "commonjs", + "lib": ["es2020", "dom"], + "declaration": true, + "strict": true, + "noImplicitAny": true, + "strictNullChecks": true, + "noImplicitThis": true, + "alwaysStrict": true, + "noUnusedLocals": false, + "noUnusedParameters": false, + "noImplicitReturns": true, + "noFallthroughCasesInSwitch": false, + "inlineSourceMap": true, + "inlineSources": true, + "experimentalDecorators": true, + "strictPropertyInitialization": false, + "typeRoots": ["./node_modules/@types"] + }, + "exclude": ["node_modules", "cdk.out"] +} diff --git a/scripts/ecs/appsignals/sample-app/task-definitions/spring-petclinic-admin-server.json b/scripts/ecs/appsignals/sample-app/task-definitions/spring-petclinic-admin-server.json deleted file mode 100644 index 387eb78..0000000 --- a/scripts/ecs/appsignals/sample-app/task-definitions/spring-petclinic-admin-server.json +++ /dev/null @@ -1,53 +0,0 @@ -{ - "family": "admin-server", - "networkMode": "awsvpc", - "requiresCompatibilities": [ - "FARGATE" - ], - "cpu": "256", - "memory": "512", - "containerDefinitions": [ - { - "name": "admin-server", - "image": "admin-server-image", - "portMappings": [ - { - "containerPort": 9090, - "protocol": "tcp" - } - ], - "environment": [ - { - "name": "CONFIG_SERVER_URL", - "value": "http://config-server-cluster-name.ecs-petclinic:8888" - }, - { - "name": "SPRING_PROFILES_ACTIVE", - "value": "ecs" - }, - { - "name": "DISCOVERY_SERVER_URL", - "value": "http://discovery-server-cluster-name.ecs-petclinic:8761/eureka" - }, - { - "name": "ADMIN_IP", - "value": "admin-server-cluster-name.ecs-petclinic" - } - ], - "essential": true, - "logConfiguration": { - "logDriver": "awslogs", - "options": { - "awslogs-group": "/ecs/pet-clinic-admin-server", - "awslogs-create-group": "true", - "awslogs-region": "region-name", - "awslogs-stream-prefix": "ecs" - } - }, - "cpu": 256, - "memory": 512 - } - ], - "taskRoleArn": "arn:aws:iam::000111222333:role/ecs-pet-clinic-task-role-region-name", - "executionRoleArn": "arn:aws:iam::000111222333:role/ecs-pet-clinic-execution-role-region-name" -} \ No newline at end of file diff --git a/scripts/ecs/appsignals/sample-app/task-definitions/spring-petclinic-api-gateway.json b/scripts/ecs/appsignals/sample-app/task-definitions/spring-petclinic-api-gateway.json deleted file mode 100644 index 7adccaa..0000000 --- a/scripts/ecs/appsignals/sample-app/task-definitions/spring-petclinic-api-gateway.json +++ /dev/null @@ -1,143 +0,0 @@ -{ - "family": "api-gateway", - "networkMode": "awsvpc", - "requiresCompatibilities": [ - "FARGATE" - ], - "cpu": "256", - "memory": "512", - "containerDefinitions": [ - { - "name": "api-gateway", - "image": "api-gateway-image", - "portMappings": [ - { - "containerPort": 8080, - "protocol": "tcp" - } - ], - "environment": [ - { - "name": "OTEL_EXPORTER_OTLP_PROTOCOL", - "value": "http/protobuf" - }, - { - "name": "OTEL_LOGS_EXPORTER", - "value": "none" - }, - { - "name": "OTEL_TRACES_SAMPLER", - "value": "xray" - }, - { - "name": "OTEL_EXPORTER_OTLP_TRACES_ENDPOINT", - "value": "http://localhost:4316/v1/traces" - }, - { - "name": "OTEL_PROPAGATORS", - "value": "tracecontext,baggage,b3,xray" - }, - { - "name": "CONFIG_SERVER_URL", - "value": "http://config-server-cluster-name.ecs-petclinic:8888" - }, - { - "name": "OTEL_RESOURCE_ATTRIBUTES", - "value": "aws.log.group.names=/ecs/pet-clinic-api-gateway,service.name=spring-petclinic-demo-api-gateway" - }, - { - "name": "OTEL_AWS_APPLICATION_SIGNALS_ENABLED", - "value": "true" - }, - { - "name": "OTEL_AWS_APPLICATION_SIGNALS_EXPORTER_ENDPOINT", - "value": "http://localhost:4316/v1/metrics" - }, - { - "name": "OTEL_METRICS_EXPORTER", - "value": "none" - }, - { - "name": "JAVA_TOOL_OPTIONS", - "value": " -javaagent:/otel-auto-instrumentation/javaagent.jar" - }, - { - "name": "SPRING_PROFILES_ACTIVE", - "value": "ecs" - }, - { - "name": "DISCOVERY_SERVER_URL", - "value": "http://discovery-server-cluster-name.ecs-petclinic:8761/eureka" - }, - { - "name": "API_GATEWAY_IP", - "value": "api_gateway_ip" - } - ], - "mountPoints": [ - { - "sourceVolume": "opentelemetry-auto-instrumentation", - "containerPath": "/otel-auto-instrumentation", - "readOnly": false - } - ], - "essential": true, - "logConfiguration": { - "logDriver": "awslogs", - "options": { - "awslogs-group": "/ecs/pet-clinic-api-gateway", - "awslogs-create-group": "true", - "awslogs-region": "region-name", - "awslogs-stream-prefix": "ecs" - } - }, - "cpu": 256, - "memory": 512 - }, - { - "name": "init", - "image": "adot-java-image", - "essential": false, - "command": [ - "cp", - "/javaagent.jar", - "/otel-auto-instrumentation/javaagent.jar" - ], - "mountPoints": [ - { - "sourceVolume": "opentelemetry-auto-instrumentation", - "containerPath": "/otel-auto-instrumentation", - "readOnly": false - } - ] - }, - { - "name": "ecs-cwagent", - "image": "public.ecr.aws/cloudwatch-agent/cloudwatch-agent:latest", - "memory": 128, - "essential": true, - "environment": [ - { - "name": "CW_CONFIG_CONTENT", - "value": "{\"traces\": {\"traces_collected\": {\"application_signals\": {}}}, \"logs\": {\"metrics_collected\": {\"application_signals\": {}}}}" - } - ], - "logConfiguration": { - "logDriver": "awslogs", - "options": { - "awslogs-group": "/ecs/ecs-cwagent-api-gateway", - "awslogs-create-group": "true", - "awslogs-region": "region-name", - "awslogs-stream-prefix": "ecs" - } - } - } - ], - "volumes": [ - { - "name": "opentelemetry-auto-instrumentation" - } - ], - "taskRoleArn": "arn:aws:iam::000111222333:role/ecs-pet-clinic-task-role-region-name", - "executionRoleArn": "arn:aws:iam::000111222333:role/ecs-pet-clinic-execution-role-region-name" -} diff --git a/scripts/ecs/appsignals/sample-app/task-definitions/spring-petclinic-billing-service.json b/scripts/ecs/appsignals/sample-app/task-definitions/spring-petclinic-billing-service.json deleted file mode 100644 index e0030b0..0000000 --- a/scripts/ecs/appsignals/sample-app/task-definitions/spring-petclinic-billing-service.json +++ /dev/null @@ -1,170 +0,0 @@ -{ - "family": "billing-service", - "networkMode": "awsvpc", - "containerDefinitions": [ - { - "name": "billing-service", - "image": "billing-service-image", - "essential": true, - "environment": [ - { - "name": "DJANGO_SETTINGS_MODULE", - "value": "pet_clinic_billing_service.settings" - }, - { - "name": "PYTHONPATH", - "value": "/otel-auto-instrumentation-python/opentelemetry/instrumentation/auto_instrumentation:/app:/otel-auto-instrumentation-python" - }, - { - "name": "OTEL_EXPORTER_OTLP_PROTOCOL", - "value": "http/protobuf" - }, - { - "name": "OTEL_TRACES_SAMPLER_ARG", - "value": "endpoint=http://localhost:2000" - }, - { - "name": "OTEL_LOGS_EXPORTER", - "value": "none" - }, - { - "name": "OTEL_PYTHON_CONFIGURATOR", - "value": "aws_configurator" - }, - { - "name": "OTEL_TRACES_SAMPLER", - "value": "xray" - }, - { - "name": "OTEL_EXPORTER_OTLP_TRACES_ENDPOINT", - "value": "http://localhost:4316/v1/traces" - }, - { - "name": "OTEL_AWS_APPLICATION_SIGNALS_EXPORTER_ENDPOINT", - "value": "http://localhost:4316/v1/metrics" - }, - { - "name": "OTEL_AWS_APPLICATION_SIGNALS_ENABLED", - "value": "true" - }, - { - "name": "OTEL_RESOURCE_ATTRIBUTES", - "value": "service.name=billing-service-cluster-name.ecs-petclinic" - }, - { - "name": "OTEL_METRICS_EXPORTER", - "value": "none" - }, - { - "name": "OTEL_PYTHON_DISTRO", - "value": "aws_distro" - }, - { - "name": "EUREKA_SERVER_URL", - "value": "discovery-server-cluster-name.ecs-petclinic" - }, - { - "name": "BILLING_SERVICE_IP", - "value": "billing-service-cluster-name.ecs-petclinic" - }, - { - "name": "DB_NAME", - "value": "postgres" - }, - { - "name": "DB_USER", - "value": "db-user-name" - }, - { - "name": "DB_USER_PASSWORD", - "value": "db-user-password" - }, - { - "name": "DATABASE_PROFILE", - "value": "postgresql" - }, - { - "name": "DB_SERVICE_HOST", - "value": "db_service_host" - }, - { - "name": "DB_SERVICE_PORT", - "value": "5432" - } - ], - "command": ["sh", "-c", "python manage.py migrate && python manage.py runserver 0.0.0.0:8800 --noreload"], - "portMappings": [ - { - "containerPort": 8800, - "protocol": "tcp" - } - ], - "logConfiguration": { - "logDriver": "awslogs", - "options": { - "awslogs-group": "/ecs/pet-clinic-billing-service", - "awslogs-create-group": "true", - "awslogs-region": "region-name", - "awslogs-stream-prefix": "ecs" - } - }, - "mountPoints": [ - { - "sourceVolume": "opentelemetry-auto-instrumentation-python", - "containerPath": "/otel-auto-instrumentation-python", - "readOnly": false - } - ] - }, - { - "name": "init", - "image": "adot-python-image", - "essential": false, - "command": [ - "cp", - "-a", - "/autoinstrumentation/.", - "/otel-auto-instrumentation-python" - ], - "mountPoints": [ - { - "sourceVolume": "opentelemetry-auto-instrumentation-python", - "containerPath": "/otel-auto-instrumentation-python", - "readOnly": false - } - ] - }, - { - "name": "ecs-cwagent", - "image": "public.ecr.aws/cloudwatch-agent/cloudwatch-agent:latest", - "essential": true, - "environment": [ - { - "name": "CW_CONFIG_CONTENT", - "value": "{\"traces\": {\"traces_collected\": {\"application_signals\": {}}}, \"logs\": {\"metrics_collected\": {\"application_signals\": {}}}}" - } - ], - "logConfiguration": { - "logDriver": "awslogs", - "options": { - "awslogs-group": "/ecs/ecs-cwagent-billing-service", - "awslogs-create-group": "true", - "awslogs-region": "region-name", - "awslogs-stream-prefix": "ecs" - } - } - } - ], - "cpu": "256", - "memory": "512", - "requiresCompatibilities": [ - "FARGATE" - ], - "volumes": [ - { - "name": "opentelemetry-auto-instrumentation-python" - } - ], - "taskRoleArn": "arn:aws:iam::000111222333:role/ecs-pet-clinic-task-role-region-name", - "executionRoleArn": "arn:aws:iam::000111222333:role/ecs-pet-clinic-execution-role-region-name" -} diff --git a/scripts/ecs/appsignals/sample-app/task-definitions/spring-petclinic-config-server.json b/scripts/ecs/appsignals/sample-app/task-definitions/spring-petclinic-config-server.json deleted file mode 100644 index 4f25f54..0000000 --- a/scripts/ecs/appsignals/sample-app/task-definitions/spring-petclinic-config-server.json +++ /dev/null @@ -1,41 +0,0 @@ -{ - "family": "config-server", - "networkMode": "awsvpc", - "requiresCompatibilities": [ - "FARGATE" - ], - "cpu": "256", - "memory": "512", - "containerDefinitions": [ - { - "name": "config-server", - "image": "config-server-image", - "portMappings": [ - { - "containerPort": 8888, - "protocol": "tcp" - } - ], - "environment": [ - { - "name": "SPRING_PROFILES_ACTIVE", - "value": "ecs" - } - ], - "essential": true, - "logConfiguration": { - "logDriver": "awslogs", - "options": { - "awslogs-group": "/ecs/pet-clinic-config-server", - "awslogs-create-group": "true", - "awslogs-region": "region-name", - "awslogs-stream-prefix": "ecs" - } - }, - "cpu": 256, - "memory": 512 - } - ], - "taskRoleArn": "arn:aws:iam::000111222333:role/ecs-pet-clinic-task-role-region-name", - "executionRoleArn": "arn:aws:iam::000111222333:role/ecs-pet-clinic-execution-role-region-name" -} \ No newline at end of file diff --git a/scripts/ecs/appsignals/sample-app/task-definitions/spring-petclinic-customers-service.json b/scripts/ecs/appsignals/sample-app/task-definitions/spring-petclinic-customers-service.json deleted file mode 100644 index 2ab375a..0000000 --- a/scripts/ecs/appsignals/sample-app/task-definitions/spring-petclinic-customers-service.json +++ /dev/null @@ -1,147 +0,0 @@ -{ - "family": "customers-service", - "networkMode": "awsvpc", - "requiresCompatibilities": [ - "FARGATE" - ], - "cpu": "256", - "memory": "512", - "containerDefinitions": [ - { - "name": "customers-service", - "image": "customers-service-image", - "portMappings": [ - { - "containerPort": 8081, - "protocol": "tcp" - } - ], - "environment": [ - { - "name": "AWS_DEFAULT_REGION", - "value": "region-name" - }, - { - "name": "OTEL_EXPORTER_OTLP_PROTOCOL", - "value": "http/protobuf" - }, - { - "name": "OTEL_LOGS_EXPORTER", - "value": "none" - }, - { - "name": "OTEL_TRACES_SAMPLER", - "value": "xray" - }, - { - "name": "OTEL_EXPORTER_OTLP_TRACES_ENDPOINT", - "value": "http://localhost:4316/v1/traces" - }, - { - "name": "OTEL_PROPAGATORS", - "value": "tracecontext,baggage,b3,xray" - }, - { - "name": "OTEL_RESOURCE_ATTRIBUTES", - "value": "aws.log.group.names=/ecs/pet-clinic-customers-service,service.name=customers-service-cluster-name.ecs-petclinic" - }, - { - "name": "OTEL_AWS_APPLICATION_SIGNALS_ENABLED", - "value": "true" - }, - { - "name": "OTEL_AWS_APPLICATION_SIGNALS_EXPORTER_ENDPOINT", - "value": "http://localhost:4316/v1/metrics" - }, - { - "name": "OTEL_METRICS_EXPORTER", - "value": "none" - }, - { - "name": "JAVA_TOOL_OPTIONS", - "value": " -javaagent:/otel-auto-instrumentation/javaagent.jar" - }, - { - "name": "SPRING_PROFILES_ACTIVE", - "value": "ecs" - }, - { - "name": "CONFIG_SERVER_URL", - "value": "http://config-server-cluster-name.ecs-petclinic:8888" - }, - { - "name": "DISCOVERY_SERVER_URL", - "value": "http://discovery-server-cluster-name.ecs-petclinic:8761/eureka" - }, - { - "name": "CUSTOMER_SERVICE_IP", - "value": "customers-service-cluster-name.ecs-petclinic" - } - ], - "mountPoints": [ - { - "sourceVolume": "opentelemetry-auto-instrumentation", - "containerPath": "/otel-auto-instrumentation", - "readOnly": false - } - ], - "essential": true, - "logConfiguration": { - "logDriver": "awslogs", - "options": { - "awslogs-group": "/ecs/pet-clinic-customers-service", - "awslogs-create-group": "true", - "awslogs-region": "region-name", - "awslogs-stream-prefix": "ecs" - } - }, - "cpu": 256, - "memory": 512 - }, - { - "name": "init", - "image": "adot-java-image", - "essential": false, - "command": [ - "cp", - "/javaagent.jar", - "/otel-auto-instrumentation/javaagent.jar" - ], - "mountPoints": [ - { - "sourceVolume": "opentelemetry-auto-instrumentation", - "containerPath": "/otel-auto-instrumentation", - "readOnly": false - } - ] - }, - { - "name": "ecs-cwagent", - "image": "public.ecr.aws/cloudwatch-agent/cloudwatch-agent:latest", - "memory": 128, - "essential": true, - "environment": [ - { - "name": "CW_CONFIG_CONTENT", - "value": "{\"traces\": {\"traces_collected\": {\"application_signals\": {}}}, \"logs\": {\"metrics_collected\": {\"application_signals\": {}}}}" - } - ], - "logConfiguration": { - "logDriver": "awslogs", - "options": { - "awslogs-group": "/ecs/ecs-cwagent-customers-service", - "awslogs-create-group": "true", - "awslogs-region": "region-name", - "awslogs-stream-prefix": "ecs" - } - } - } - ], - "volumes": [ - { - "name": "opentelemetry-auto-instrumentation" - } - ], - "taskRoleArn": "arn:aws:iam::000111222333:role/ecs-pet-clinic-task-role-region-name", - "executionRoleArn": "arn:aws:iam::000111222333:role/ecs-pet-clinic-execution-role-region-name" -} \ No newline at end of file diff --git a/scripts/ecs/appsignals/sample-app/task-definitions/spring-petclinic-discovery-server.json b/scripts/ecs/appsignals/sample-app/task-definitions/spring-petclinic-discovery-server.json deleted file mode 100644 index 602e94a..0000000 --- a/scripts/ecs/appsignals/sample-app/task-definitions/spring-petclinic-discovery-server.json +++ /dev/null @@ -1,45 +0,0 @@ -{ - "family": "discovery-server", - "networkMode": "awsvpc", - "requiresCompatibilities": [ - "FARGATE" - ], - "cpu": "256", - "memory": "512", - "containerDefinitions": [ - { - "name": "discovery-server", - "image": "discovery-server-image", - "portMappings": [ - { - "containerPort": 8761, - "protocol": "tcp" - } - ], - "environment": [ - { - "name": "CONFIG_SERVER_URL", - "value": "http://config-server-cluster-name.ecs-petclinic:8888" - }, - { - "name": "SPRING_PROFILES_ACTIVE", - "value": "ecs" - } - ], - "essential": true, - "logConfiguration": { - "logDriver": "awslogs", - "options": { - "awslogs-group": "/ecs/pet-clinic-discovery-server", - "awslogs-create-group": "true", - "awslogs-region": "region-name", - "awslogs-stream-prefix": "ecs" - } - }, - "cpu": 256, - "memory": 512 - } - ], - "taskRoleArn": "arn:aws:iam::000111222333:role/ecs-pet-clinic-task-role-region-name", - "executionRoleArn": "arn:aws:iam::000111222333:role/ecs-pet-clinic-execution-role-region-name" -} \ No newline at end of file diff --git a/scripts/ecs/appsignals/sample-app/task-definitions/spring-petclinic-insurance-service.json b/scripts/ecs/appsignals/sample-app/task-definitions/spring-petclinic-insurance-service.json deleted file mode 100644 index a5c76f3..0000000 --- a/scripts/ecs/appsignals/sample-app/task-definitions/spring-petclinic-insurance-service.json +++ /dev/null @@ -1,180 +0,0 @@ -{ - "family": "insurance-service", - "networkMode": "awsvpc", - "containerDefinitions": [ - { - "name": "insurance-service", - "image": "insurance-service-image", - "essential": true, - "environment": [ - { - "name": "DJANGO_SETTINGS_MODULE", - "value": "pet_clinic_insurance_service.settings" - }, - { - "name": "PYTHONPATH", - "value": "/otel-auto-instrumentation-python/opentelemetry/instrumentation/auto_instrumentation:/app:/otel-auto-instrumentation-python" - }, - { - "name": "OTEL_EXPORTER_OTLP_PROTOCOL", - "value": "http/protobuf" - }, - { - "name": "OTEL_TRACES_SAMPLER_ARG", - "value": "endpoint=http://localhost:2000" - }, - { - "name": "OTEL_LOGS_EXPORTER", - "value": "none" - }, - { - "name": "OTEL_PYTHON_CONFIGURATOR", - "value": "aws_configurator" - }, - { - "name": "OTEL_TRACES_SAMPLER", - "value": "xray" - }, - { - "name": "OTEL_EXPORTER_OTLP_TRACES_ENDPOINT", - "value": "http://localhost:4316/v1/traces" - }, - { - "name": "OTEL_AWS_APPLICATION_SIGNALS_EXPORTER_ENDPOINT", - "value": "http://localhost:4316/v1/metrics" - }, - { - "name": "OTEL_AWS_APPLICATION_SIGNALS_ENABLED", - "value": "true" - }, - { - "name": "OTEL_RESOURCE_ATTRIBUTES", - "value": "service.name=insurance-service-cluster-name.ecs-petclinic" - }, - { - "name": "OTEL_METRICS_EXPORTER", - "value": "none" - }, - { - "name": "OTEL_PYTHON_DISTRO", - "value": "aws_distro" - }, - { - "name": "EUREKA_SERVER_URL", - "value": "discovery-server-cluster-name.ecs-petclinic" - }, - { - "name": "INSURANCE_SERVICE_IP", - "value": "insurance-service-cluster-name.ecs-petclinic" - }, - { - "name": "DB_NAME", - "value": "postgres" - }, - { - "name": "DB_USER", - "value": "db-user-name" - }, - { - "name": "DB_USER_PASSWORD", - "value": "db-user-password" - }, - { - "name": "DATABASE_PROFILE", - "value": "postgresql" - }, - { - "name": "DB_SERVICE_HOST", - "value": "db_service_host" - }, - { - "name": "DB_SERVICE_PORT", - "value": "5432" - } - ], - "command": ["sh", "-c", "python manage.py migrate && python manage.py loaddata initial_data.json && python manage.py runserver 0.0.0.0:8000 --noreload"], - "portMappings": [ - { - "containerPort": 8000, - "protocol": "tcp" - } - ], - "logConfiguration": { - "logDriver": "awslogs", - "options": { - "awslogs-group": "/ecs/pet-clinic-insurance-service", - "awslogs-create-group": "true", - "awslogs-region": "region-name", - "awslogs-stream-prefix": "ecs" - } - }, - "healthCheck": { - "command": [ - "CMD-SHELL", - "curl -f http://localhost:8000/insurances/ || exit 1" - ], - "interval": 60, - "timeout": 10, - "retries": 5, - "startPeriod": 3 - }, - "mountPoints": [ - { - "sourceVolume": "opentelemetry-auto-instrumentation-python", - "containerPath": "/otel-auto-instrumentation-python", - "readOnly": false - } - ] - }, - { - "name": "init", - "image": "adot-python-image", - "essential": false, - "command": [ - "cp", - "-a", - "/autoinstrumentation/.", - "/otel-auto-instrumentation-python" - ], - "mountPoints": [ - { - "sourceVolume": "opentelemetry-auto-instrumentation-python", - "containerPath": "/otel-auto-instrumentation-python", - "readOnly": false - } - ] - }, - { - "name": "ecs-cwagent", - "image": "public.ecr.aws/cloudwatch-agent/cloudwatch-agent:latest", - "essential": true, - "environment": [ - { - "name": "CW_CONFIG_CONTENT", - "value": "{\"traces\": {\"traces_collected\": {\"application_signals\": {}}}, \"logs\": {\"metrics_collected\": {\"application_signals\": {}}}}" - } - ], - "logConfiguration": { - "logDriver": "awslogs", - "options": { - "awslogs-group": "/ecs/ecs-cwagent-insurance-service", - "awslogs-create-group": "true", - "awslogs-region": "region-name", - "awslogs-stream-prefix": "ecs" - } - } - } - ], - "cpu": "256", - "memory": "512", - "requiresCompatibilities": [ - "FARGATE" - ], - "volumes": [ - { - "name": "opentelemetry-auto-instrumentation-python" - } - ], - "taskRoleArn": "arn:aws:iam::000111222333:role/ecs-pet-clinic-task-role-region-name", - "executionRoleArn": "arn:aws:iam::000111222333:role/ecs-pet-clinic-execution-role-region-name" -} diff --git a/scripts/ecs/appsignals/sample-app/task-definitions/spring-petclinic-vets-service.json b/scripts/ecs/appsignals/sample-app/task-definitions/spring-petclinic-vets-service.json deleted file mode 100644 index 53c0a0e..0000000 --- a/scripts/ecs/appsignals/sample-app/task-definitions/spring-petclinic-vets-service.json +++ /dev/null @@ -1,143 +0,0 @@ -{ - "family": "vets-service", - "networkMode": "awsvpc", - "requiresCompatibilities": [ - "FARGATE" - ], - "cpu": "256", - "memory": "512", - "containerDefinitions": [ - { - "name": "vets-service", - "image": "vets-service-image", - "portMappings": [ - { - "containerPort": 8083, - "protocol": "tcp" - } - ], - "environment": [ - { - "name": "OTEL_EXPORTER_OTLP_PROTOCOL", - "value": "http/protobuf" - }, - { - "name": "SPRING_PROFILES_ACTIVE", - "value": "ecs" - }, - { - "name": "OTEL_LOGS_EXPORTER", - "value": "none" - }, - { - "name": "OTEL_TRACES_SAMPLER", - "value": "xray" - }, - { - "name": "OTEL_EXPORTER_OTLP_TRACES_ENDPOINT", - "value": "http://localhost:4316/v1/traces" - }, - { - "name": "OTEL_PROPAGATORS", - "value": "tracecontext,baggage,b3,xray" - }, - { - "name": "OTEL_RESOURCE_ATTRIBUTES", - "value": "aws.log.group.names=/ecs/pet-clinic-vets-service,service.name=vets-service-cluster-name.ecs-petclinic" - }, - { - "name": "OTEL_AWS_APPLICATION_SIGNALS_ENABLED", - "value": "true" - }, - { - "name": "OTEL_AWS_APPLICATION_SIGNALS_EXPORTER_ENDPOINT", - "value": "http://localhost:4316/v1/metrics" - }, - { - "name": "OTEL_METRICS_EXPORTER", - "value": "none" - }, - { - "name": "JAVA_TOOL_OPTIONS", - "value": " -javaagent:/otel-auto-instrumentation/javaagent.jar" - }, - { - "name": "DISCOVERY_SERVER_URL", - "value": "http://discovery-server-cluster-name.ecs-petclinic:8761/eureka" - }, - { - "name": "VETS_SERVICE_IP", - "value": "vets-service-cluster-name.ecs-petclinic" - }, - { - "name": "CONFIG_SERVER_URL", - "value": "http://config-server-cluster-name.ecs-petclinic:8888" - } - ], - "mountPoints": [ - { - "sourceVolume": "opentelemetry-auto-instrumentation", - "containerPath": "/otel-auto-instrumentation", - "readOnly": false - } - ], - "essential": true, - "logConfiguration": { - "logDriver": "awslogs", - "options": { - "awslogs-group": "/ecs/pet-clinic-vets-service", - "awslogs-create-group": "true", - "awslogs-region": "region-name", - "awslogs-stream-prefix": "ecs" - } - }, - "cpu": 256, - "memory": 512 - }, - { - "name": "init", - "image": "adot-java-image", - "essential": false, - "command": [ - "cp", - "/javaagent.jar", - "/otel-auto-instrumentation/javaagent.jar" - ], - "mountPoints": [ - { - "sourceVolume": "opentelemetry-auto-instrumentation", - "containerPath": "/otel-auto-instrumentation", - "readOnly": false - } - ] - }, - { - "name": "ecs-cwagent", - "image": "public.ecr.aws/cloudwatch-agent/cloudwatch-agent:latest", - "memory": 128, - "essential": true, - "environment": [ - { - "name": "CW_CONFIG_CONTENT", - "value": "{\"traces\": {\"traces_collected\": {\"application_signals\": {}}}, \"logs\": {\"metrics_collected\": {\"application_signals\": {}}}}" - } - ], - "logConfiguration": { - "logDriver": "awslogs", - "options": { - "awslogs-group": "/ecs/ecs-cwagent-vets-service", - "awslogs-create-group": "true", - "awslogs-region": "region-name", - "awslogs-stream-prefix": "ecs" - } - } - } - ], - "volumes": [ - { - "name": "opentelemetry-auto-instrumentation" - } - ], - "taskRoleArn": "arn:aws:iam::000111222333:role/ecs-pet-clinic-task-role-region-name", - "executionRoleArn": "arn:aws:iam::000111222333:role/ecs-pet-clinic-execution-role-region-name" -} \ No newline at end of file diff --git a/scripts/ecs/appsignals/sample-app/task-definitions/spring-petclinic-visits-service.json b/scripts/ecs/appsignals/sample-app/task-definitions/spring-petclinic-visits-service.json deleted file mode 100644 index 5b92af7..0000000 --- a/scripts/ecs/appsignals/sample-app/task-definitions/spring-petclinic-visits-service.json +++ /dev/null @@ -1,143 +0,0 @@ -{ - "family": "visits-service", - "networkMode": "awsvpc", - "requiresCompatibilities": [ - "FARGATE" - ], - "cpu": "256", - "memory": "512", - "containerDefinitions": [ - { - "name": "visits-service", - "image": "visits-service-image", - "portMappings": [ - { - "containerPort": 8082, - "protocol": "tcp" - } - ], - "environment": [ - { - "name": "OTEL_EXPORTER_OTLP_PROTOCOL", - "value": "http/protobuf" - }, - { - "name": "OTEL_LOGS_EXPORTER", - "value": "none" - }, - { - "name": "OTEL_TRACES_SAMPLER", - "value": "xray" - }, - { - "name": "OTEL_EXPORTER_OTLP_TRACES_ENDPOINT", - "value": "http://localhost:4316/v1/traces" - }, - { - "name": "OTEL_PROPAGATORS", - "value": "tracecontext,baggage,b3,xray" - }, - { - "name": "OTEL_RESOURCE_ATTRIBUTES", - "value": "aws.log.group.names=/ecs/pet-clinic-visits-service,service.name=visits-service-cluster-name.ecs-petclinic" - }, - { - "name": "OTEL_AWS_APPLICATION_SIGNALS_ENABLED", - "value": "true" - }, - { - "name": "OTEL_AWS_APPLICATION_SIGNALS_EXPORTER_ENDPOINT", - "value": "http://localhost:4316/v1/metrics" - }, - { - "name": "OTEL_METRICS_EXPORTER", - "value": "none" - }, - { - "name": "JAVA_TOOL_OPTIONS", - "value": " -javaagent:/otel-auto-instrumentation/javaagent.jar" - }, - { - "name": "SPRING_PROFILES_ACTIVE", - "value": "ecs" - }, - { - "name": "CONFIG_SERVER_URL", - "value": "http://config-server-cluster-name.ecs-petclinic:8888" - }, - { - "name": "DISCOVERY_SERVER_URL", - "value": "http://discovery-server-cluster-name.ecs-petclinic:8761/eureka" - }, - { - "name": "VISITS_SERVICE_IP", - "value": "visits-service-cluster-name.ecs-petclinic" - } - ], - "mountPoints": [ - { - "sourceVolume": "opentelemetry-auto-instrumentation", - "containerPath": "/otel-auto-instrumentation", - "readOnly": false - } - ], - "essential": true, - "logConfiguration": { - "logDriver": "awslogs", - "options": { - "awslogs-group": "/ecs/pet-clinic-visits-service", - "awslogs-create-group": "true", - "awslogs-region": "region-name", - "awslogs-stream-prefix": "ecs" - } - }, - "cpu": 256, - "memory": 512 - }, - { - "name": "init", - "image": "adot-java-image", - "essential": false, - "command": [ - "cp", - "/javaagent.jar", - "/otel-auto-instrumentation/javaagent.jar" - ], - "mountPoints": [ - { - "sourceVolume": "opentelemetry-auto-instrumentation", - "containerPath": "/otel-auto-instrumentation", - "readOnly": false - } - ] - }, - { - "name": "ecs-cwagent", - "image": "public.ecr.aws/cloudwatch-agent/cloudwatch-agent:latest", - "memory": 128, - "essential": true, - "environment": [ - { - "name": "CW_CONFIG_CONTENT", - "value": "{\"traces\": {\"traces_collected\": {\"application_signals\": {}}}, \"logs\": {\"metrics_collected\": {\"application_signals\": {}}}}" - } - ], - "logConfiguration": { - "logDriver": "awslogs", - "options": { - "awslogs-group": "/ecs/ecs-cwagent-visits-service", - "awslogs-create-group": "true", - "awslogs-region": "region-name", - "awslogs-stream-prefix": "ecs" - } - } - } - ], - "volumes": [ - { - "name": "opentelemetry-auto-instrumentation" - } - ], - "taskRoleArn": "arn:aws:iam::000111222333:role/ecs-pet-clinic-task-role-region-name", - "executionRoleArn": "arn:aws:iam::000111222333:role/ecs-pet-clinic-execution-role-region-name" -} \ No newline at end of file diff --git a/scripts/ecs/appsignals/sample-app/task-definitions/traffic-generator.json b/scripts/ecs/appsignals/sample-app/task-definitions/traffic-generator.json deleted file mode 100644 index 8e41055..0000000 --- a/scripts/ecs/appsignals/sample-app/task-definitions/traffic-generator.json +++ /dev/null @@ -1,57 +0,0 @@ -{ - "family": "traffic-generator", - "networkMode": "awsvpc", - "requiresCompatibilities": [ - "FARGATE" - ], - "cpu": "256", - "memory": "512", - "containerDefinitions": [ - { - "name": "traffic-generator", - "image": "public.ecr.aws/u8q5x3l1/traffic-generator", - "essential": true, - "environment": [ - { - "name": "URL", - "value": "discovery-service-url" - }, - { - "name": "HIGH_LOAD_MAX", - "value": "1600" - }, - { - "name": "HIGH_LOAD_MIN", - "value": "800" - }, - { - "name": "BURST_DELAY_MAX", - "value": "80" - }, - { - "name": "BURST_DELAY_MIN", - "value": "60" - }, - { - "name": "LOW_LOAD_MAX", - "value": "60" - }, - { - "name": "LOW_LOAD_MIN", - "value": "30" - } - ], - "logConfiguration": { - "logDriver": "awslogs", - "options": { - "awslogs-group": "/ecs/traffic-generator", - "awslogs-create-group": "true", - "awslogs-region": "region-name", - "awslogs-stream-prefix": "ecs" - } - } - } - ], - "taskRoleArn": "arn:aws:iam::000111222333:role/ecs-pet-clinic-task-role-region-name", - "executionRoleArn": "arn:aws:iam::000111222333:role/ecs-pet-clinic-execution-role-region-name" -} diff --git a/scripts/ecs/appsignals/setup-ecs-demo.sh b/scripts/ecs/appsignals/setup-ecs-demo.sh index 8f46897..22ae65f 100755 --- a/scripts/ecs/appsignals/setup-ecs-demo.sh +++ b/scripts/ecs/appsignals/setup-ecs-demo.sh @@ -3,679 +3,55 @@ set -ex # Default values DEFAULT_REGION="us-east-1" -DEFAULT_CLUSTER="ecs-pet-clinic-demo" OPERATION="create" # Read command line arguments -for i in "$@" -do -case $i in - --operation=*) +for i in "$@"; do + case $i in + --operation=*) OPERATION="${i#*=}" - shift + shift # past argument=value ;; - --region=*) + --region=*) REGION="${i#*=}" - shift + shift # past argument=value ;; - --cluster=*) - CLUSTER="${i#*=}" - shift + *) + # unknown option ;; - *) - - ;; -esac + esac done -# Set region cluster name with provided value or default +# Set region with provided value or default REGION="${REGION:-$DEFAULT_REGION}" -CLUSTER="${CLUSTER:-$DEFAULT_CLUSTER}" export AWS_DEFAULT_REGION=$REGION -# Variables -SG_NAME="ecs-security-group" -IAM_TASK_ROLE_NAME="ecs-pet-clinic-task-role-${REGION}" -IAM_EXECUTION_ROLE_NAME="ecs-pet-clinic-execution-role-${REGION}" -LOAD_BALANCER_NAME="ecs-pet-clinic-lb-${REGION}" -OUTPUT_FILE="ecs-pet-clinic-vars.txt" -ACCOUNT_ID=$(aws sts get-caller-identity --query 'Account' --output text) -adot_java_image_tag=$(curl -s -I -L 'https://github.com/aws-observability/aws-otel-java-instrumentation/releases/latest' | grep -i Location | awk -F'/tag/' '{print $2}' | tr -d '\r') -adot_java_image="public.ecr.aws/aws-observability/adot-autoinstrumentation-java:$adot_java_image_tag" -adot_python_image_tag=$(curl -s -I -L 'https://github.com/aws-observability/aws-otel-python-instrumentation/releases/latest' | grep -i Location | awk -F'/tag/' '{print $2}' | tr -d '\r') -adot_python_image="public.ecr.aws/aws-observability/adot-autoinstrumentation-python:$adot_python_image_tag" -master_username="djangouser" -master_password=$(LC_ALL=C tr -dc 'A-Za-z0-9_' < /dev/urandom | head -c 10; echo) - -VPC_ID="" -SUBNET_IDS="" -SECURITY_GROUP_ID="" -LOAD_BALANCER_ARN="" -LOAD_BALANCER_DNS="" -ECR_IMAGE_PREFIX="$ACCOUNT_ID.dkr.ecr.$REGION.amazonaws.com" - - -function create_resources() { - # Enabling Application Signal discovery see: https://docs.aws.amazon.com/cli/latest/reference/application-signals/start-discovery.html - aws application-signals start-discovery - - echo "Creating resources..." - # Get the default VPC - VPC_ID=$(aws ec2 describe-vpcs --filters "Name=isDefault,Values=true" --query 'Vpcs[0].VpcId' --output text) - - SUBNET_IDS=$(aws ec2 describe-subnets --filters "Name=vpc-id,Values=$VPC_ID" --query "Subnets[*].SubnetId" --output text) - echo "Subnet IDs: $SUBNET_IDS" - - # Create a security group - SECURITY_GROUP_ID=$(aws ec2 create-security-group --group-name $SG_NAME --description "Security group for all traffic" --vpc-id $VPC_ID --query 'GroupId' --output text) - aws ec2 authorize-security-group-ingress --group-id $SECURITY_GROUP_ID --protocol all --cidr 0.0.0.0/0 - echo "Security group ID: $SECURITY_GROUP_ID" - - # Create a load balancer - LOAD_BALANCER_ARN=$(aws elbv2 create-load-balancer \ - --name $LOAD_BALANCER_NAME \ - --subnets $SUBNET_IDS \ - --security-groups $SECURITY_GROUP_ID \ - --scheme internet-facing \ - --type application \ - --query "LoadBalancers[0].LoadBalancerArn" \ - --output text) - echo "Load balancer ARN: $LOAD_BALANCER_ARN" - - LOAD_BALANCER_DNS=$(aws elbv2 describe-load-balancers \ - --load-balancer-arns $LOAD_BALANCER_ARN \ - --query "LoadBalancers[0].DNSName" \ - --output text) - - echo "Load balancer DNS: $LOAD_BALANCER_DNS" - - - # Create an ECS Task role and attach policies - aws iam create-role --role-name $IAM_TASK_ROLE_NAME --assume-role-policy-document file://trust-policy.json > /dev/null - aws iam attach-role-policy --role-name $IAM_TASK_ROLE_NAME --policy-arn "arn:aws:iam::aws:policy/AWSXrayWriteOnlyAccess" - aws iam attach-role-policy --role-name $IAM_TASK_ROLE_NAME --policy-arn "arn:aws:iam::aws:policy/CloudWatchAgentServerPolicy" - aws iam attach-role-policy --role-name $IAM_TASK_ROLE_NAME --policy-arn "arn:aws:iam::aws:policy/service-role/AmazonEC2ContainerServiceRole" - aws iam attach-role-policy --role-name $IAM_TASK_ROLE_NAME --policy-arn "arn:aws:iam::aws:policy/AmazonECS_FullAccess" - aws iam attach-role-policy --role-name $IAM_TASK_ROLE_NAME --policy-arn "arn:aws:iam::aws:policy/AmazonSQSFullAccess" - aws iam attach-role-policy --role-name $IAM_TASK_ROLE_NAME --policy-arn "arn:aws:iam::aws:policy/AmazonDynamoDBFullAccess" - aws iam attach-role-policy --role-name $IAM_TASK_ROLE_NAME --policy-arn "arn:aws:iam::aws:policy/AmazonRDSFullAccess" - aws iam attach-role-policy --role-name $IAM_TASK_ROLE_NAME --policy-arn "arn:aws:iam::aws:policy/AmazonS3FullAccess" - aws iam attach-role-policy --role-name $IAM_TASK_ROLE_NAME --policy-arn "arn:aws:iam::aws:policy/AmazonBedrockFullAccess" - aws iam attach-role-policy --role-name $IAM_TASK_ROLE_NAME --policy-arn "arn:aws:iam::aws:policy/AmazonKinesisFullAccess" - - # Create an ECS Task Execution role and attach policies - aws iam create-role --role-name $IAM_EXECUTION_ROLE_NAME --assume-role-policy-document file://trust-policy.json > /dev/null - aws iam attach-role-policy --role-name $IAM_EXECUTION_ROLE_NAME --policy-arn "arn:aws:iam::aws:policy/CloudWatchAgentServerPolicy" - aws iam attach-role-policy --role-name $IAM_EXECUTION_ROLE_NAME --policy-arn "arn:aws:iam::aws:policy/service-role/AmazonECSTaskExecutionRolePolicy" - - operation_id=$(aws servicediscovery create-private-dns-namespace \ - --name ecs-petclinic \ - --vpc $VPC_ID \ - --query 'OperationId' \ - --output text) - - echo "Namespace creation initiated. Waiting for the namespace to be available..." - while true; do - STATUS=$(aws servicediscovery get-operation \ - --operation-id $operation_id \ - --query 'Operation.Status' \ - --output text) - - if [ "$STATUS" == "SUCCESS" ]; then - echo "Namespace is now available!" - break - elif [ "$STATUS" == "FAIL" ]; then - echo "Namespace creation failed." - exit 1 - else - echo "Namespace is still being created. Status: $STATUS" - sleep 30 - fi - done - - # Creat ECS cluster - aws ecs create-cluster --cluster-name ${CLUSTER} > /dev/null - - # Get ECR image prefix - #ECR_IMAGE_PREFIX=$(aws ecr describe-repositories --repository-names traffic-generator --region $REGION --query 'repositories[0].repositoryUri' --output text | cut -d'/' -f1,4) - - echo "VPC_ID=\"$VPC_ID\"" >> $OUTPUT_FILE - echo "SUBNET_IDS=\"$SUBNET_IDS\"" >> $OUTPUT_FILE - echo "SECURITY_GROUP_ID=\"$SECURITY_GROUP_ID\"" >> $OUTPUT_FILE - echo "LOAD_BALANCER_ARN=\"$LOAD_BALANCER_ARN\"" >> $OUTPUT_FILE - echo "LOAD_BALANCER_DNS=\"$LOAD_BALANCER_DNS\"" >> $OUTPUT_FILE - echo "ECR_IMAGE_PREFIX=\"$ECR_IMAGE_PREFIX\"" >> $OUTPUT_FILE - echo "ACCOUNT_ID=\"$ACCOUNT_ID\"" >> $OUTPUT_FILE - echo "adot_java_image=\"$adot_java_image\"" >> $OUTPUT_FILE - echo "adot_python_image=\"$adot_python_image\"" >> $OUTPUT_FILE - echo "master_password=\"$master_password\"" >> $OUTPUT_FILE - - # Confirm the output file has been written - echo "Variables written to $OUTPUT_FILE" - - echo "Resource creation complete." - -} - -function create_service() { - # This file sets up the Petclinic sample app on the ECS platform, where each service is registered with Eureka using its - # IP and port, exposing the health check endpoint at: http://:/actuator/health. - # If the actuator/health check fails, the service is automatically deregistered from Eureka. - - # In ECS, the application cannot be accessed using the instance IP (since each task has its own IP) or the container name. - # We use service discovery to expose the app using the format. This makes the health check accessible via: - # http://:/actuator/health. - # For example, for the vets-service, the endpoint would be:http://vets-service.ecs-petclinic:/actuator/health. - - local service_name=$1 - # Get the namespace ID for the specified namespace - namespace_id=$(aws servicediscovery list-namespaces --query "Namespaces[?Name=='ecs-petclinic'].Id" --output text) - - # Create the service and capture the service discovery ID - service_discovery_id=$(aws servicediscovery create-service \ - --name "$service_name-$CLUSTER" \ - --dns-config "NamespaceId=$namespace_id,RoutingPolicy=WEIGHTED,DnsRecords=[{Type=A,TTL=300}]" \ - --health-check-custom-config FailureThreshold=2 \ - --query "Service.Id" --output text) - - # Get the registry ARN for the newly created service - registryArn=$(aws servicediscovery get-service \ - --id "$service_discovery_id" \ - --query 'Service.Arn' --output text) - - aws ecs create-service \ - --service-name $service_name \ - --task-definition $service_name \ - --service-registries registryArn=$registryArn \ - --desired-count 1 \ - --launch-type FARGATE \ - --network-configuration "awsvpcConfiguration={subnets=[$(echo $SUBNET_IDS | tr -s ' ' ',')],securityGroups=[$SECURITY_GROUP_ID],assignPublicIp=ENABLED}" \ - --cluster $CLUSTER > /dev/null -} - -function run_config_server() { - sed -i "s|\"config-server-image\"|\"${ECR_IMAGE_PREFIX}/springcommunity/spring-petclinic-config-server\"|" ./sample-app/task-definitions/spring-petclinic-config-server.json - sed -i "s|region-name|${REGION}|g" ./sample-app/task-definitions/spring-petclinic-config-server.json - sed -i "s|000111222333|${ACCOUNT_ID}|g" ./sample-app/task-definitions/spring-petclinic-config-server.json - - aws ecs register-task-definition --cli-input-json file://sample-app/task-definitions/spring-petclinic-config-server.json > /dev/null - create_service "config-server" - echo "Waiting for the config server to be accessible..." - sleep 180 -} - -function run_discovery_server() { - sed -i "s|\"discovery-server-image\"|\"${ECR_IMAGE_PREFIX}/springcommunity/spring-petclinic-discovery-server\"|" ./sample-app/task-definitions/spring-petclinic-discovery-server.json - sed -i "s|cluster-name|${CLUSTER}|g" ./sample-app/task-definitions/spring-petclinic-discovery-server.json - sed -i "s|region-name|${REGION}|g" ./sample-app/task-definitions/spring-petclinic-discovery-server.json - sed -i "s|discovery-service-url|${REGION}|g" ./sample-app/task-definitions/spring-petclinic-discovery-server.json - sed -i "s|000111222333|${ACCOUNT_ID}|g" ./sample-app/task-definitions/spring-petclinic-discovery-server.json - - aws ecs register-task-definition --cli-input-json file://sample-app/task-definitions/spring-petclinic-discovery-server.json > /dev/null - create_service "discovery-server" - echo "Waiting for the discovery server to be accessible..." - sleep 180 -} - -function run_admin_server() { - sed -i "s|\"adot-java-image\"|\"${adot_java_image}\"|" ./sample-app/task-definitions/spring-petclinic-admin-server.json - sed -i "s|\"admin-server-image\"|\"${ECR_IMAGE_PREFIX}/springcommunity/spring-petclinic-admin-server\"|" ./sample-app/task-definitions/spring-petclinic-admin-server.json - sed -i "s|cluster-name|${CLUSTER}|g" ./sample-app/task-definitions/spring-petclinic-admin-server.json - sed -i "s|region-name|${REGION}|g" ./sample-app/task-definitions/spring-petclinic-admin-server.json - sed -i "s|000111222333|${ACCOUNT_ID}|g" ./sample-app/task-definitions/spring-petclinic-admin-server.json - - aws ecs register-task-definition --cli-input-json file://sample-app/task-definitions/spring-petclinic-admin-server.json > /dev/null - create_service "admin-server" - echo "Waiting for the Admin server to be accessible..." - sleep 120 -} - -function run_api_gateway() { - api_gateway_target_group_arn=$(aws elbv2 create-target-group \ - --name api-gateway-target-group \ - --protocol HTTP \ - --port 8080 \ - --vpc-id $VPC_ID \ - --target-type ip \ - --query "TargetGroups[0].TargetGroupArn" \ - --output text) - - aws elbv2 modify-target-group \ - --target-group-arn $api_gateway_target_group_arn \ - --health-check-protocol HTTP \ - --health-check-path "/" \ - --health-check-interval-seconds 240 \ - --health-check-timeout-seconds 60 \ - --healthy-threshold-count 5 \ - --unhealthy-threshold-count 2 > /dev/null - - aws elbv2 create-listener \ - --load-balancer-arn $LOAD_BALANCER_ARN \ - --protocol HTTP \ - --port 80 \ - --default-actions Type=forward,TargetGroupArn=$api_gateway_target_group_arn > /dev/null - - sed -i "s|\"adot-java-image\"|\"${adot_java_image}\"|" ./sample-app/task-definitions/spring-petclinic-api-gateway.json - sed -i "s|\"api_gateway_ip\"|\"${LOAD_BALANCER_DNS}\"|" ./sample-app/task-definitions/spring-petclinic-api-gateway.json - sed -i "s|\"api-gateway-image\"|\"${ECR_IMAGE_PREFIX}/springcommunity/spring-petclinic-api-gateway\"|" ./sample-app/task-definitions/spring-petclinic-api-gateway.json - sed -i "s|cluster-name|${CLUSTER}|g" ./sample-app/task-definitions/spring-petclinic-api-gateway.json - sed -i "s|region-name|${REGION}|g" ./sample-app/task-definitions/spring-petclinic-api-gateway.json - sed -i "s|000111222333|${ACCOUNT_ID}|g" ./sample-app/task-definitions/spring-petclinic-api-gateway.json - - aws ecs register-task-definition --cli-input-json file://sample-app/task-definitions/spring-petclinic-api-gateway.json > /dev/null - - aws ecs create-service \ - --service-name api-gateway \ - --task-definition api-gateway \ - --load-balancers targetGroupArn=$api_gateway_target_group_arn,containerName=api-gateway,containerPort=8080 \ - --desired-count 1 \ - --launch-type FARGATE \ - --network-configuration "awsvpcConfiguration={subnets=[$(echo $SUBNET_IDS | tr -s ' ' ',')],securityGroups=[$SECURITY_GROUP_ID],assignPublicIp=ENABLED}" \ - --cluster $CLUSTER > /dev/null - - echo "Waiting for the Frontened server to be accessible..." - sleep 240 - - echo "Frontened server is now accessible!" -} - -function run_vets_service() { - sed -i "s|\"adot-java-image\"|\"${adot_java_image}\"|" ./sample-app/task-definitions/spring-petclinic-vets-service.json - sed -i "s|\"vets-service-image\"|\"${ECR_IMAGE_PREFIX}/springcommunity/spring-petclinic-vets-service\"|" ./sample-app/task-definitions/spring-petclinic-vets-service.json - sed -i "s|region-name|${REGION}|g" ./sample-app/task-definitions/spring-petclinic-vets-service.json - sed -i "s|cluster-name|${CLUSTER}|g" ./sample-app/task-definitions/spring-petclinic-vets-service.json - sed -i "s|000111222333|${ACCOUNT_ID}|g" ./sample-app/task-definitions/spring-petclinic-vets-service.json - - aws ecs register-task-definition --cli-input-json file://sample-app/task-definitions/spring-petclinic-vets-service.json > /dev/null - create_service "vets-service" - echo "Waiting for the Vets server to be accessible..." - sleep 180 -} - -function run_customers_service() { - sed -i "s|\"adot-java-image\"|\"${adot_java_image}\"|" ./sample-app/task-definitions/spring-petclinic-customers-service.json - sed -i "s|\"customers-service-image\"|\"${ECR_IMAGE_PREFIX}/springcommunity/spring-petclinic-customers-service\"|" ./sample-app/task-definitions/spring-petclinic-customers-service.json - sed -i "s|cluster-name|${CLUSTER}|g" ./sample-app/task-definitions/spring-petclinic-customers-service.json - sed -i "s|region-name|${REGION}|g" ./sample-app/task-definitions/spring-petclinic-customers-service.json - sed -i "s|000111222333|${ACCOUNT_ID}|g" ./sample-app/task-definitions/spring-petclinic-customers-service.json - - aws ecs register-task-definition --cli-input-json file://sample-app/task-definitions/spring-petclinic-customers-service.json > /dev/null - create_service "customers-service" - echo "Waiting for the Customers server to be accessible..." - sleep 180 -} - -function run_visits_service() { - sed -i "s|\"adot-java-image\"|\"${adot_java_image}\"|" ./sample-app/task-definitions/spring-petclinic-visits-service.json - sed -i "s|\"visits-service-image\"|\"${ECR_IMAGE_PREFIX}/springcommunity/spring-petclinic-visits-service\"|" ./sample-app/task-definitions/spring-petclinic-visits-service.json - sed -i "s|cluster-name|${CLUSTER}|g" ./sample-app/task-definitions/spring-petclinic-visits-service.json - sed -i "s|region-name|${REGION}|g" ./sample-app/task-definitions/spring-petclinic-visits-service.json - sed -i "s|000111222333|${ACCOUNT_ID}|g" ./sample-app/task-definitions/spring-petclinic-visits-service.json - - aws ecs register-task-definition --cli-input-json file://sample-app/task-definitions/spring-petclinic-visits-service.json > /dev/null - create_service "visits-service" - echo "Waiting for the Visits server to be accessible..." - sleep 180 -} - -function create_database() { - # Create a database subnet group - db_subnet_group_name="my-db-subnet-group" - aws rds create-db-subnet-group --db-subnet-group-name $db_subnet_group_name --db-subnet-group-description "Subnet group for RDS" --subnet-ids $SUBNET_IDS > /dev/null - - # Wait for the DB subnet group to be available (assumed immediate availability after creation) - echo "DB subnet group created and ready to use." - - # Create the DB instance using the new DB subnet group - db_instance_identifier="petclinic-python" - echo "the password for the database is: $master_password" - - security_group=$(aws ec2 describe-security-groups --filters "Name=group-name,Values=$SG_NAME" --query 'SecurityGroups[*].GroupId' --output text) - - aws rds create-db-instance \ - --db-instance-identifier $db_instance_identifier \ - --db-instance-class db.t3.micro \ - --engine postgres \ - --engine-version "14" \ - --allocated-storage 20 \ - --master-username $master_username \ - --master-user-password $master_password \ - --db-subnet-group-name $db_subnet_group_name \ - --vpc-security-group-ids $security_group \ - --no-multi-az \ - --backup-retention-period 0 \ - --tags Key=Name,Value=$db_instance_identifier \ - --output text > /dev/null - - echo "DB instance creation initiated..." - - # Wait for the DB instance to be ready - echo "Waiting for DB instance to become available..." - aws rds wait db-instance-available --db-instance-identifier $db_instance_identifier - - echo "DB instance is now available." - - # allow ec2 to connect to database - aws ec2 authorize-security-group-ingress \ - --group-id $security_group \ - --protocol tcp \ - --port 5432 \ - --source-group $security_group > /dev/null - -} - -function run_insurance_service() { - sed -i "s|\"adot-python-image\"|\"${adot_python_image}\"|" ./sample-app/task-definitions/spring-petclinic-insurance-service.json - sed -i "s|\"insurance-service-image\"|\"${ECR_IMAGE_PREFIX}/python-petclinic-insurance-service\"|" ./sample-app/task-definitions/spring-petclinic-insurance-service.json - sed -i "s|cluster-name|${CLUSTER}|g" ./sample-app/task-definitions/spring-petclinic-insurance-service.json - sed -i "s|region-name|${REGION}|g" ./sample-app/task-definitions/spring-petclinic-insurance-service.json - sed -i "s|000111222333|${ACCOUNT_ID}|g" ./sample-app/task-definitions/spring-petclinic-insurance-service.json - sed -i "s|db-user-name|${master_username}|g" ./sample-app/task-definitions/spring-petclinic-insurance-service.json - - rds_endpoint=`aws rds describe-db-instances --db-instance-identifier petclinic-python --query "DBInstances[*].Endpoint.Address" --output text` - sed -i "s|\"db_service_host\"|\"${rds_endpoint}\"|" ./sample-app/task-definitions/spring-petclinic-insurance-service.json - sed -i "s|db-user-name|${master_username}|g" ./sample-app/task-definitions/spring-petclinic-insurance-service.json - sed -i "s|db-user-password|${master_password}|g" ./sample-app/task-definitions/spring-petclinic-insurance-service.json - - aws ecs register-task-definition --cli-input-json file://sample-app/task-definitions/spring-petclinic-insurance-service.json > /dev/null - create_service "insurance-service" - echo "Waiting for the Insurance server to be accessible..." - sleep 180 -} - -function run_billing_service() { - sed -i "s|\"adot-python-image\"|\"${adot_python_image}\"|" ./sample-app/task-definitions/spring-petclinic-billing-service.json - sed -i "s|\"billing-service-image\"|\"${ECR_IMAGE_PREFIX}/python-petclinic-billing-service\"|" ./sample-app/task-definitions/spring-petclinic-billing-service.json - sed -i "s|cluster-name|${CLUSTER}|g" ./sample-app/task-definitions/spring-petclinic-billing-service.json - sed -i "s|region-name|${REGION}|g" ./sample-app/task-definitions/spring-petclinic-billing-service.json - sed -i "s|000111222333|${ACCOUNT_ID}|g" ./sample-app/task-definitions/spring-petclinic-billing-service.json - - rds_endpoint=`aws rds describe-db-instances --db-instance-identifier petclinic-python --query "DBInstances[*].Endpoint.Address" --output text` - sed -i "s|\"db_service_host\"|\"${rds_endpoint}\"|" ./sample-app/task-definitions/spring-petclinic-billing-service.json - sed -i "s|db-user-name|${master_username}|g" ./sample-app/task-definitions/spring-petclinic-billing-service.json - sed -i "s|db-user-password|${master_password}|g" ./sample-app/task-definitions/spring-petclinic-billing-service.json - - aws ecs register-task-definition --cli-input-json file://sample-app/task-definitions/spring-petclinic-billing-service.json > /dev/null - create_service "billing-service" - echo "Waiting for the Billing server to be accessible..." - sleep 180 -} - -function generate_traffic() { - LOAD_BALANCER_ARN=$(aws elbv2 describe-load-balancers \ - --names $LOAD_BALANCER_NAME \ - --query "LoadBalancers[0].LoadBalancerArn" \ - --output text) - - sed -i "s|\"discovery-server-url\"|\"http://${LOAD_BALANCER_DNS}:80\"|" ./sample-app/task-definitions/traffic-generator.json - sed -i "s|\"traffic-generator-image\"|\"${ECR_IMAGE_PREFIX}/traffic-generator\"|" ./sample-app/task-definitions/traffic-generator.json - sed -i "s|region-name|${REGION}|g" ./sample-app/task-definitions/traffic-generator.json - sed -i "s|000111222333|${ACCOUNT_ID}|g" ./sample-app/task-definitions/traffic-generator.json - - aws ecs register-task-definition --cli-input-json file://sample-app/task-definitions/traffic-generator.json > /dev/null - - aws ecs create-service \ - --service-name traffic-generator \ - --task-definition traffic-generator \ - --desired-count 1 \ - --launch-type FARGATE \ - --network-configuration "awsvpcConfiguration={subnets=[$(echo $SUBNET_IDS | tr -s ' ' ',')],securityGroups=[$SECURITY_GROUP_ID],assignPublicIp=ENABLED}" \ - --cluster $CLUSTER > /dev/null - - echo "Waiting for the traffic generator..." - sleep 120 -} - -function print_url() { - echo "Visit the sample app at this url: http://${LOAD_BALANCER_DNS}:80" -} - -function delete_service() { - local service_name=$1 - echo "Deleting $service_name..." - - # Delete the ECS service - aws ecs update-service \ - --cluster $CLUSTER \ - --service $service_name \ - --desired-count 0 > /dev/null - - aws ecs delete-service \ - --cluster $CLUSTER \ - --service $service_name \ - --force > /dev/null - - # Wait for the service to be deleted - while true; do - STATUS=$(aws ecs describe-services \ - --cluster $CLUSTER \ - --services $service_name \ - --query 'services[0].status' \ - --output text) - - if [ "$STATUS" == "INACTIVE" ] || [ "$STATUS" == "None" ]; then - echo "$service_name deleted successfully." - break - else - echo "Waiting for service deletion..." - sleep 20 - fi - done - - # Get all task definitions for the specified family - TASK_DEFINITIONS=$(aws ecs list-task-definitions --family-prefix $service_name --query "taskDefinitionArns" --output text) - - # Loop through each task definition and deregister it - for TASK_DEF in $TASK_DEFINITIONS; do - aws ecs deregister-task-definition --task-definition $TASK_DEF > /dev/null - done - - echo $service_name - - discovery_service_id=$(aws servicediscovery list-services \ - --query "Services[?Name=='$service_name-$CLUSTER'].Id" \ - --output text) - - aws servicediscovery delete-service --id $discovery_service_id - - echo "$service_name deleted." -} - -function delete_traffic() { - echo "Deleting resources..." - # Delete the ECS service - aws ecs update-service \ - --cluster $CLUSTER \ - --service traffic-generator \ - --desired-count 0 > /dev/null - - aws ecs delete-service \ - --cluster $CLUSTER \ - --service traffic-generator \ - --force > /dev/null - echo "ECS service deleted." - - # Get all task definitions for the specified family - TASK_DEFINITIONS=$(aws ecs list-task-definitions --family-prefix traffic-generator --query "taskDefinitionArns" --output text) - - # Loop through each task definition and deregister it - for TASK_DEF in $TASK_DEFINITIONS; do - aws ecs deregister-task-definition --task-definition $TASK_DEF > /dev/null - done - - echo "All resources deleted." -} - -function delete_database() { - # Configuration variables - db_instance_identifier="petclinic-python" - db_subnet_group_name="my-db-subnet-group" - security_group=$(aws ec2 describe-security-groups --filters "Name=group-name,Values=$SG_NAME" --query 'SecurityGroups[*].GroupId' --output text) - - echo "Deleting DB instance..." - aws rds delete-db-instance \ - --db-instance-identifier $db_instance_identifier \ - --skip-final-snapshot \ - --output text - - echo "Waiting for DB instance to be deleted..." - aws rds wait db-instance-deleted --db-instance-identifier $db_instance_identifier - - echo "Deleting DB subnet group..." - aws rds delete-db-subnet-group --db-subnet-group-name $db_subnet_group_name - - echo "Revoking security group ingress rules..." - aws ec2 revoke-security-group-ingress \ - --group-id $security_group \ - --protocol tcp \ - --port 5432 \ - --source-group $security_group - - echo "All specified database resources have been deleted." -} - -function delete_api_gateway() { - echo "Deleting resources..." - # Get all task definitions for the specified family - TASK_DEFINITIONS=$(aws ecs list-task-definitions --family-prefix api-gateway --query "taskDefinitionArns" --output text) - - # Loop through each task definition and deregister it - for TASK_DEF in $TASK_DEFINITIONS; do - aws ecs deregister-task-definition --task-definition $TASK_DEF > /dev/null - done - - - # Delete the ECS service - aws ecs update-service \ - --cluster $CLUSTER \ - --service api-gateway \ - --desired-count 0 > /dev/null - - aws ecs delete-service \ - --cluster $CLUSTER \ - --service api-gateway \ - --force > /dev/null - echo "ECS service deleted." - - #Get the load balancer ARN - - LOAD_BALANCER_ARN=$(aws elbv2 describe-load-balancers \ - --names $LOAD_BALANCER_NAME \ - --query "LoadBalancers[0].LoadBalancerArn" \ - --output text) - - # Get the listener ARN - listener_arn=$(aws elbv2 describe-listeners \ - --load-balancer-arn $LOAD_BALANCER_ARN \ - --query "Listeners[?Port==\`80\`].ListenerArn" \ - --output text) - - api_gateway_target_group_arn=$(aws elbv2 describe-listeners \ - --listener-arns $listener_arn \ - --query "Listeners[0].DefaultActions[0].TargetGroupArn" \ - --output text) - - # Delete the listener - if [ -n "$listener_arn" ]; then - aws elbv2 delete-listener \ - --listener-arn $listener_arn > /dev/null - echo "Listener deleted." - fi - - # Delete the target group - aws elbv2 delete-target-group \ - --target-group-arn $api_gateway_target_group_arn > /dev/null - echo "Target group deleted." - - echo "All resources deleted." +function run_cdk() { + echo "Running CDK..." + # jump to the cdk folder, run the cdk commands, and then jump back to current folder + pushd ../../../cdk/ecs >/dev/null + ./ecs-cdk.sh $1 + popd >/dev/null } function delete_resources() { - echo "Deleting resources..." - - while true; do - remaining_services=$(aws ecs list-services --cluster ${CLUSTER} --query 'serviceArns' --output text) - if [ -z "$remaining_services" ]; then - echo "All services deleted." - break - else - echo "Still waiting for services to be deleted..." - sleep 5 - fi - done - - aws ecs delete-cluster --cluster ${CLUSTER} - - namespace_id=$(aws servicediscovery list-namespaces \ - --query "Namespaces[?Name=='ecs-petclinic'].Id" --output text) - aws servicediscovery delete-namespace --id $namespace_id + echo "Deleting resources..." - # Detach and delete IAM policies for ECS Task role - task_role_policy_arns=("arn:aws:iam::aws:policy/AmazonKinesisFullAccess" "arn:aws:iam::aws:policy/AWSXrayWriteOnlyAccess" "arn:aws:iam::aws:policy/CloudWatchAgentServerPolicy" "arn:aws:iam::aws:policy/service-role/AmazonEC2ContainerServiceRole" "arn:aws:iam::aws:policy/AmazonECS_FullAccess" "arn:aws:iam::aws:policy/AmazonSQSFullAccess" "arn:aws:iam::aws:policy/AmazonDynamoDBFullAccess" "arn:aws:iam::aws:policy/AmazonRDSFullAccess" "arn:aws:iam::aws:policy/AmazonS3FullAccess" "arn:aws:iam::aws:policy/AmazonBedrockFullAccess") - for arn in "${task_role_policy_arns[@]}" - do - echo $arn - aws iam detach-role-policy --role-name $IAM_TASK_ROLE_NAME --policy-arn $arn - done - aws iam delete-role --role-name $IAM_TASK_ROLE_NAME + run_cdk destroy - # Detach and delete IAM policies for ECS Task Execution role - task_execution_role_policy_arns=("arn:aws:iam::aws:policy/CloudWatchAgentServerPolicy" "arn:aws:iam::aws:policy/service-role/AmazonECSTaskExecutionRolePolicy") - for arn in "${task_execution_role_policy_arns[@]}" - do - echo $arn - aws iam detach-role-policy --role-name $IAM_EXECUTION_ROLE_NAME --policy-arn $arn - done - aws iam delete-role --role-name $IAM_EXECUTION_ROLE_NAME + # delete resources created by the sample app itself + aws sqs delete-queue --queue-url $(aws sqs get-queue-url --queue-name apm_test --query 'QueueUrl' --output text) + aws kinesis delete-stream --stream-name apm_test + aws dynamodb delete-table --table-name apm_test + aws dynamodb delete-table --table-name BillingInfo - LOAD_BALANCER_ARN=$(aws elbv2 describe-load-balancers \ - --names $LOAD_BALANCER_NAME \ - --query "LoadBalancers[0].LoadBalancerArn" \ - --output text) - - aws elbv2 delete-load-balancer --load-balancer-arn $LOAD_BALANCER_ARN - aws elbv2 wait load-balancers-deleted --load-balancer-arns $LOAD_BALANCER_ARN - sleep 30 - echo "Load balancer deleted: $LOAD_BALANCER_ARN" - - # Delete security groups - sg_id=$(aws ec2 describe-security-groups --filters "Name=group-name,Values=$SG_NAME" --query 'SecurityGroups[0].GroupId' --output text) - if [ ! -z "$sg_id" ]; then - aws ec2 delete-security-group --group-id $sg_id - echo "Security group deleted: $sg_id" - fi - - echo "Resource deletion complete." + echo "Resource deletion complete." } # Execute based on operation if [ "$OPERATION" == "delete" ]; then - delete_traffic - delete_service "billing-service" - delete_service "insurance-service" - delete_database - delete_service "visits-service" - delete_service "customers-service" - delete_service "vets-service" - delete_api_gateway - delete_service "admin-server" - delete_service "discovery-server" - delete_service "config-server" - delete_resources + delete_resources else - create_resources - run_config_server - run_discovery_server - run_admin_server - run_api_gateway - run_vets_service - run_customers_service - run_visits_service - create_database - run_insurance_service - run_billing_service - generate_traffic - print_url - + run_cdk deploy fi \ No newline at end of file diff --git a/scripts/ecs/appsignals/trust-policy.json b/scripts/ecs/appsignals/trust-policy.json deleted file mode 100644 index 014611f..0000000 --- a/scripts/ecs/appsignals/trust-policy.json +++ /dev/null @@ -1,13 +0,0 @@ -{ - "Version": "2012-10-17", - "Statement": [ - { - "Sid": "", - "Effect": "Allow", - "Principal": { - "Service": "ecs-tasks.amazonaws.com" - }, - "Action": "sts:AssumeRole" - } - ] -} \ No newline at end of file diff --git a/spring-petclinic-customers-service/src/main/java/org/springframework/samples/petclinic/customers/aws/BedrockAgentV1Service.java b/spring-petclinic-customers-service/src/main/java/org/springframework/samples/petclinic/customers/aws/BedrockAgentV1Service.java index 84d7868..14f3e5b 100644 --- a/spring-petclinic-customers-service/src/main/java/org/springframework/samples/petclinic/customers/aws/BedrockAgentV1Service.java +++ b/spring-petclinic-customers-service/src/main/java/org/springframework/samples/petclinic/customers/aws/BedrockAgentV1Service.java @@ -17,8 +17,8 @@ public class BedrockAgentV1Service { public BedrockAgentV1Service() { // AWS web identity is set for EKS clusters, if these are not set then use default credentials - if (System.getenv("AWS_DEFAULT_REGION") != null) { - String regionName = System.getenv("AWS_DEFAULT_REGION"); + if (System.getenv("REGION_FROM_ECS") != null) { + String regionName = System.getenv("REGION_FROM_ECS"); bedrockAgentV1Client = AWSBedrockAgentClientBuilder.standard() .withRegion(regionName) .build(); diff --git a/spring-petclinic-customers-service/src/main/java/org/springframework/samples/petclinic/customers/aws/BedrockRuntimeV1Service.java b/spring-petclinic-customers-service/src/main/java/org/springframework/samples/petclinic/customers/aws/BedrockRuntimeV1Service.java index bcdd690..baa2254 100644 --- a/spring-petclinic-customers-service/src/main/java/org/springframework/samples/petclinic/customers/aws/BedrockRuntimeV1Service.java +++ b/spring-petclinic-customers-service/src/main/java/org/springframework/samples/petclinic/customers/aws/BedrockRuntimeV1Service.java @@ -23,8 +23,8 @@ public class BedrockRuntimeV1Service { public BedrockRuntimeV1Service() { // AWS web identity is set for EKS clusters, if these are not set then use default credentials - if (System.getenv("AWS_DEFAULT_REGION") != null) { - String regionName = System.getenv("AWS_DEFAULT_REGION"); + if (System.getenv("REGION_FROM_ECS") != null) { + String regionName = System.getenv("REGION_FROM_ECS"); bedrockRuntimeV1Client = AmazonBedrockRuntimeClientBuilder.standard() .withRegion(regionName) .build(); diff --git a/spring-petclinic-customers-service/src/main/java/org/springframework/samples/petclinic/customers/aws/BedrockV1Service.java b/spring-petclinic-customers-service/src/main/java/org/springframework/samples/petclinic/customers/aws/BedrockV1Service.java index 3a33aa3..a1bfff6 100644 --- a/spring-petclinic-customers-service/src/main/java/org/springframework/samples/petclinic/customers/aws/BedrockV1Service.java +++ b/spring-petclinic-customers-service/src/main/java/org/springframework/samples/petclinic/customers/aws/BedrockV1Service.java @@ -16,8 +16,8 @@ public class BedrockV1Service { public BedrockV1Service() { // AWS web identity is set for EKS clusters, if these are not set then use default credentials - if (System.getenv("AWS_DEFAULT_REGION") != null) { - String regionName = System.getenv("AWS_DEFAULT_REGION"); + if (System.getenv("REGION_FROM_ECS") != null) { + String regionName = System.getenv("REGION_FROM_ECS"); bedrockV1Client = AmazonBedrockClientBuilder.standard() .withRegion(regionName) .build(); diff --git a/spring-petclinic-customers-service/src/main/java/org/springframework/samples/petclinic/customers/aws/KinesisService.java b/spring-petclinic-customers-service/src/main/java/org/springframework/samples/petclinic/customers/aws/KinesisService.java index 91f6040..c25cf63 100644 --- a/spring-petclinic-customers-service/src/main/java/org/springframework/samples/petclinic/customers/aws/KinesisService.java +++ b/spring-petclinic-customers-service/src/main/java/org/springframework/samples/petclinic/customers/aws/KinesisService.java @@ -30,7 +30,13 @@ public class KinesisService { public KinesisService() { // AWS web identity is set for EKS clusters, if these are not set then use default credentials - if (System.getenv("AWS_WEB_IDENTITY_TOKEN_FILE") == null && System.getProperty("aws.webIdentityTokenFile") == null) { + if (System.getenv("REGION_FROM_ECS") != null) { + String regionName = System.getenv("REGION_FROM_ECS"); + kinesisClient = KinesisClient.builder() + .region(Region.of(regionName)) + .build(); + } + else if (System.getenv("AWS_WEB_IDENTITY_TOKEN_FILE") == null && System.getProperty("aws.webIdentityTokenFile") == null) { kinesisClient = KinesisClient.builder() .region(Region.of(Util.REGION_FROM_EC2)) .build(); diff --git a/spring-petclinic-customers-service/src/main/java/org/springframework/samples/petclinic/customers/aws/SqsService.java b/spring-petclinic-customers-service/src/main/java/org/springframework/samples/petclinic/customers/aws/SqsService.java index d82f01d..f690bde 100644 --- a/spring-petclinic-customers-service/src/main/java/org/springframework/samples/petclinic/customers/aws/SqsService.java +++ b/spring-petclinic-customers-service/src/main/java/org/springframework/samples/petclinic/customers/aws/SqsService.java @@ -21,7 +21,13 @@ public class SqsService { public SqsService() { // AWS web identity is set for EKS clusters, if these are not set then use default credentials - if (System.getenv("AWS_WEB_IDENTITY_TOKEN_FILE") == null && System.getProperty("aws.webIdentityTokenFile") == null) { + if (System.getenv("REGION_FROM_ECS") != null) { + String regionName = System.getenv("REGION_FROM_ECS"); + sqs = SqsClient.builder() + .region(Region.of(regionName)) + .build(); + } + else if (System.getenv("AWS_WEB_IDENTITY_TOKEN_FILE") == null && System.getProperty("aws.webIdentityTokenFile") == null) { sqs = SqsClient.builder() .region(Region.of(Util.REGION_FROM_EC2)) .build(); diff --git a/spring-petclinic-visits-service/src/main/java/org/springframework/samples/petclinic/visits/aws/DdbService.java b/spring-petclinic-visits-service/src/main/java/org/springframework/samples/petclinic/visits/aws/DdbService.java index fe69b9a..4239ee6 100644 --- a/spring-petclinic-visits-service/src/main/java/org/springframework/samples/petclinic/visits/aws/DdbService.java +++ b/spring-petclinic-visits-service/src/main/java/org/springframework/samples/petclinic/visits/aws/DdbService.java @@ -42,7 +42,14 @@ public DdbService() { DynamoDbClient dynamoDbClient = null; // AWS web identity is set for EKS clusters, if these are not set then use default credentials - if (System.getenv("AWS_WEB_IDENTITY_TOKEN_FILE") == null && System.getProperty("aws.webIdentityTokenFile") == null) { + if (System.getenv("REGION_FROM_ECS") != null) { + String regionName = System.getenv("REGION_FROM_ECS"); + dynamoDbClient = DynamoDbClient.builder() + .region(Region.of(regionName)) + .overrideConfiguration(clientOverrideConfiguration) + .build(); + } + else if (System.getenv("AWS_WEB_IDENTITY_TOKEN_FILE") == null && System.getProperty("aws.webIdentityTokenFile") == null) { dynamoDbClient = DynamoDbClient.builder() .region(Region.of(Util.REGION_FROM_EC2)) .overrideConfiguration(clientOverrideConfiguration)