diff --git a/.env.production b/.env.production
new file mode 100644
index 0000000..b0ebe51
--- /dev/null
+++ b/.env.production
@@ -0,0 +1 @@
+VITE_API_BASE_URL=https://betapartner-api.tradhox.com/api
diff --git a/cdk.json b/cdk.json
new file mode 100644
index 0000000..929d8e0
--- /dev/null
+++ b/cdk.json
@@ -0,0 +1,12 @@
+{
+ "app": "npx ts-node --prefer-ts-exts cdk/app.ts",
+ "watch": {
+ "include": [
+ "cdk/**"
+ ],
+ "exclude": [
+ "README.md",
+ "cdk/cdk.out"
+ ]
+ }
+}
diff --git a/cdk/app.ts b/cdk/app.ts
index a82a37b..24566d6 100644
--- a/cdk/app.ts
+++ b/cdk/app.ts
@@ -1,7 +1,6 @@
#!/usr/bin/env node
-import 'source-map-support/register.js';
import * as cdk from 'aws-cdk-lib';
-import { BetaSupplierSiteStack } from './betasupplier-site-stack.js';
+import { BetaSupplierSiteStack } from './betasupplier-site-stack';
const app = new cdk.App();
new BetaSupplierSiteStack(app, 'BetaSupplierSiteStack', {
diff --git a/cdk/betasupplier-site-stack.ts b/cdk/betasupplier-site-stack.ts
index 78c065c..9ffb1f1 100644
--- a/cdk/betasupplier-site-stack.ts
+++ b/cdk/betasupplier-site-stack.ts
@@ -20,7 +20,7 @@ export class BetaSupplierSiteStack extends cdk.Stack {
encryption: s3.BucketEncryption.S3_MANAGED,
});
- const ec2Origin = new origins.HttpOrigin('api.tradhox.com', {
+ const ec2Origin = new origins.HttpOrigin('betapartner-api.tradhox.com', {
protocolPolicy: cloudfront.OriginProtocolPolicy.HTTP_ONLY,
httpPort: 8080,
});
diff --git a/cdk/cdk.context.json b/cdk/cdk.context.json
new file mode 100644
index 0000000..ce1f2a9
--- /dev/null
+++ b/cdk/cdk.context.json
@@ -0,0 +1,6 @@
+{
+ "hosted-zone:account=764709663363:domainName=tradhox.com:region=ap-south-2": {
+ "Id": "/hostedzone/Z05079927Q6UCDIWAH4E",
+ "Name": "tradhox.com."
+ }
+}
diff --git a/cdk/cdk.json b/cdk/cdk.json
new file mode 100644
index 0000000..39e5720
--- /dev/null
+++ b/cdk/cdk.json
@@ -0,0 +1,12 @@
+{
+ "app": "npx tsx app.ts",
+ "watch": {
+ "include": [
+ "**"
+ ],
+ "exclude": [
+ "README.md",
+ "cdk.out"
+ ]
+ }
+}
diff --git a/cdk/cdk.out/BetaSupplierSiteStack.assets.json b/cdk/cdk.out/BetaSupplierSiteStack.assets.json
new file mode 100644
index 0000000..3ea5ab8
--- /dev/null
+++ b/cdk/cdk.out/BetaSupplierSiteStack.assets.json
@@ -0,0 +1,51 @@
+{
+ "version": "54.0.0",
+ "files": {
+ "faa95a81ae7d7373f3e1f242268f904eb748d8d0fdd306e8a6fe515a1905a7d6": {
+ "displayName": "BetaSupplierSiteStack/Custom::S3AutoDeleteObjectsCustomResourceProvider Code",
+ "source": {
+ "path": "asset.faa95a81ae7d7373f3e1f242268f904eb748d8d0fdd306e8a6fe515a1905a7d6",
+ "packaging": "zip"
+ },
+ "destinations": {
+ "764709663363-ap-south-2-41ddd48c": {
+ "bucketName": "cdk-hnb659fds-assets-764709663363-ap-south-2",
+ "objectKey": "faa95a81ae7d7373f3e1f242268f904eb748d8d0fdd306e8a6fe515a1905a7d6.zip",
+ "region": "ap-south-2",
+ "assumeRoleArn": "arn:${AWS::Partition}:iam::764709663363:role/cdk-hnb659fds-file-publishing-role-764709663363-ap-south-2"
+ }
+ }
+ },
+ "ffb21b7e396cc684c46812aea1d2ff7ea22401e05038c047ae9f071082c68586": {
+ "displayName": "SiteCertificate/CertificateRequestorFunction/Code",
+ "source": {
+ "path": "asset.ffb21b7e396cc684c46812aea1d2ff7ea22401e05038c047ae9f071082c68586",
+ "packaging": "zip"
+ },
+ "destinations": {
+ "764709663363-ap-south-2-89e47e6b": {
+ "bucketName": "cdk-hnb659fds-assets-764709663363-ap-south-2",
+ "objectKey": "ffb21b7e396cc684c46812aea1d2ff7ea22401e05038c047ae9f071082c68586.zip",
+ "region": "ap-south-2",
+ "assumeRoleArn": "arn:${AWS::Partition}:iam::764709663363:role/cdk-hnb659fds-file-publishing-role-764709663363-ap-south-2"
+ }
+ }
+ },
+ "7ed3cfff7120b7b31997b41625d0f260352266b5eaa8c56533cf1f509441f2e7": {
+ "displayName": "BetaSupplierSiteStack Template",
+ "source": {
+ "path": "BetaSupplierSiteStack.template.json",
+ "packaging": "file"
+ },
+ "destinations": {
+ "764709663363-ap-south-2-2ab9b314": {
+ "bucketName": "cdk-hnb659fds-assets-764709663363-ap-south-2",
+ "objectKey": "7ed3cfff7120b7b31997b41625d0f260352266b5eaa8c56533cf1f509441f2e7.json",
+ "region": "ap-south-2",
+ "assumeRoleArn": "arn:${AWS::Partition}:iam::764709663363:role/cdk-hnb659fds-file-publishing-role-764709663363-ap-south-2"
+ }
+ }
+ }
+ },
+ "dockerImages": {}
+}
\ No newline at end of file
diff --git a/cdk/cdk.out/BetaSupplierSiteStack.metadata.json b/cdk/cdk.out/BetaSupplierSiteStack.metadata.json
new file mode 100644
index 0000000..9fc0574
--- /dev/null
+++ b/cdk/cdk.out/BetaSupplierSiteStack.metadata.json
@@ -0,0 +1,288 @@
+{
+ "/BetaSupplierSiteStack": [
+ {
+ "type": "aws:cdk:creationStack",
+ "data": [
+ " (D:\\Tradhox_workspace\\supplier_central_frontend\\cdk\\app.ts:6:1)",
+ "...node internals..."
+ ]
+ }
+ ],
+ "/BetaSupplierSiteStack/Custom::S3AutoDeleteObjectsCustomResourceProvider": [
+ {
+ "type": "aws:cdk:is-custom-resource-handler-customResourceProvider",
+ "data": true
+ }
+ ],
+ "/BetaSupplierSiteStack/BetaSupplierSiteBucketName": [
+ {
+ "type": "aws:cdk:logicalId",
+ "data": "BetaSupplierSiteBucketName"
+ },
+ {
+ "type": "aws:cdk:creationStack",
+ "data": [
+ "new BetaSupplierSiteStack (D:\\Tradhox_workspace\\supplier_central_frontend\\cdk\\betasupplier-site-stack.ts:80:5)",
+ " (D:\\Tradhox_workspace\\supplier_central_frontend\\cdk\\app.ts:6:1)",
+ "...node internals..."
+ ]
+ }
+ ],
+ "/BetaSupplierSiteStack/BetaSupplierSiteCloudFrontDomainName": [
+ {
+ "type": "aws:cdk:logicalId",
+ "data": "BetaSupplierSiteCloudFrontDomainName"
+ },
+ {
+ "type": "aws:cdk:creationStack",
+ "data": [
+ "new BetaSupplierSiteStack (D:\\Tradhox_workspace\\supplier_central_frontend\\cdk\\betasupplier-site-stack.ts:85:5)",
+ " (D:\\Tradhox_workspace\\supplier_central_frontend\\cdk\\app.ts:6:1)",
+ "...node internals..."
+ ]
+ }
+ ],
+ "/BetaSupplierSiteStack/AWSCloudFrontPartitionHostedZoneIdMap": [
+ {
+ "type": "aws:cdk:logicalId",
+ "data": "AWSCloudFrontPartitionHostedZoneIdMap"
+ },
+ {
+ "type": "aws:cdk:creationStack",
+ "data": [
+ "...new ARecord2 in aws-cdk-lib...",
+ "new BetaSupplierSiteStack (D:\\Tradhox_workspace\\supplier_central_frontend\\cdk\\betasupplier-site-stack.ts:91:5)",
+ " (D:\\Tradhox_workspace\\supplier_central_frontend\\cdk\\app.ts:6:1)",
+ "...node internals..."
+ ]
+ }
+ ],
+ "/BetaSupplierSiteStack/BootstrapVersion": [
+ {
+ "type": "aws:cdk:logicalId",
+ "data": "BootstrapVersion"
+ },
+ {
+ "type": "aws:cdk:creationStack",
+ "data": [
+ "...aws-cdk-lib...",
+ "(no user code in 10 frames, use --stack-trace-limit to capture more)"
+ ]
+ }
+ ],
+ "/BetaSupplierSiteStack/CheckBootstrapVersion": [
+ {
+ "type": "aws:cdk:logicalId",
+ "data": "CheckBootstrapVersion"
+ },
+ {
+ "type": "aws:cdk:creationStack",
+ "data": [
+ "...aws-cdk-lib...",
+ "(no user code in 10 frames, use --stack-trace-limit to capture more)"
+ ]
+ }
+ ],
+ "/BetaSupplierSiteStack/BetaSupplierSiteBucket/Resource": [
+ {
+ "type": "aws:cdk:logicalId",
+ "data": "BetaSupplierSiteBucketC3053F9A"
+ },
+ {
+ "type": "aws:cdk:creationStack",
+ "data": [
+ "...new Bucket2 in aws-cdk-lib...",
+ "new BetaSupplierSiteStack (D:\\Tradhox_workspace\\supplier_central_frontend\\cdk\\betasupplier-site-stack.ts:15:27)",
+ " (D:\\Tradhox_workspace\\supplier_central_frontend\\cdk\\app.ts:6:1)",
+ "...node internals..."
+ ]
+ },
+ {
+ "type": "aws:cdk:analytics:mixin",
+ "data": {
+ "mixin": "aws-cdk-lib.aws_s3.mixins.BucketAutoDeleteObjects"
+ }
+ }
+ ],
+ "/BetaSupplierSiteStack/Custom::S3AutoDeleteObjectsCustomResourceProvider/Role": [
+ {
+ "type": "aws:cdk:logicalId",
+ "data": "CustomS3AutoDeleteObjectsCustomResourceProviderRole3B1BD092"
+ },
+ {
+ "type": "aws:cdk:creationStack",
+ "data": [
+ "...aws-cdk-lib...",
+ "(no user code in 10 frames, use --stack-trace-limit to capture more)"
+ ]
+ }
+ ],
+ "/BetaSupplierSiteStack/Custom::S3AutoDeleteObjectsCustomResourceProvider/Handler": [
+ {
+ "type": "aws:cdk:logicalId",
+ "data": "CustomS3AutoDeleteObjectsCustomResourceProviderHandler9D90184F"
+ },
+ {
+ "type": "aws:cdk:creationStack",
+ "data": [
+ "...aws-cdk-lib...",
+ "(no user code in 10 frames, use --stack-trace-limit to capture more)"
+ ]
+ }
+ ],
+ "/BetaSupplierSiteStack/SiteCertificate/CertificateRequestorFunction": [
+ {
+ "type": "aws:cdk:is-custom-resource-handler-runtime-family",
+ "data": 0
+ }
+ ],
+ "/BetaSupplierSiteStack/BetaSupplierSiteDistribution/Resource": [
+ {
+ "type": "aws:cdk:logicalId",
+ "data": "BetaSupplierSiteDistributionD03E58A9"
+ },
+ {
+ "type": "aws:cdk:creationStack",
+ "data": [
+ "...new Distribution2 in aws-cdk-lib...",
+ "new BetaSupplierSiteStack (D:\\Tradhox_workspace\\supplier_central_frontend\\cdk\\betasupplier-site-stack.ts:43:26)",
+ " (D:\\Tradhox_workspace\\supplier_central_frontend\\cdk\\app.ts:6:1)",
+ "...node internals..."
+ ]
+ }
+ ],
+ "/BetaSupplierSiteStack/SiteAliasRecord/Resource": [
+ {
+ "type": "aws:cdk:logicalId",
+ "data": "SiteAliasRecord3C0AF5BF"
+ },
+ {
+ "type": "aws:cdk:creationStack",
+ "data": [
+ "...new ARecord2 in aws-cdk-lib...",
+ "new BetaSupplierSiteStack (D:\\Tradhox_workspace\\supplier_central_frontend\\cdk\\betasupplier-site-stack.ts:91:5)",
+ " (D:\\Tradhox_workspace\\supplier_central_frontend\\cdk\\app.ts:6:1)",
+ "...node internals..."
+ ]
+ }
+ ],
+ "/BetaSupplierSiteStack/CDKMetadata/Default": [
+ {
+ "type": "aws:cdk:logicalId",
+ "data": "CDKMetadata"
+ },
+ {
+ "type": "aws:cdk:creationStack",
+ "data": [
+ "...aws-cdk-lib, node internals...",
+ "(no user code in 10 frames, use --stack-trace-limit to capture more)"
+ ]
+ }
+ ],
+ "/BetaSupplierSiteStack/BetaSupplierSiteBucket/Policy/Resource": [
+ {
+ "type": "aws:cdk:logicalId",
+ "data": "BetaSupplierSiteBucketPolicy7E1C9F1E"
+ },
+ {
+ "type": "aws:cdk:creationStack",
+ "data": [
+ "...new Bucket2 in aws-cdk-lib...",
+ "new BetaSupplierSiteStack (D:\\Tradhox_workspace\\supplier_central_frontend\\cdk\\betasupplier-site-stack.ts:15:27)",
+ " (D:\\Tradhox_workspace\\supplier_central_frontend\\cdk\\app.ts:6:1)",
+ "...node internals..."
+ ]
+ },
+ {
+ "type": "aws:cdk:analytics:mixin",
+ "data": {
+ "mixin": "aws-cdk-lib.aws_s3.mixins.BucketPolicyStatements"
+ }
+ }
+ ],
+ "/BetaSupplierSiteStack/BetaSupplierSiteBucket/AutoDeleteObjectsCustomResource/Default": [
+ {
+ "type": "aws:cdk:logicalId",
+ "data": "BetaSupplierSiteBucketAutoDeleteObjectsCustomResource789310C3"
+ },
+ {
+ "type": "aws:cdk:creationStack",
+ "data": [
+ "...aws-cdk-lib...",
+ "(no user code in 10 frames, use --stack-trace-limit to capture more)"
+ ]
+ }
+ ],
+ "/BetaSupplierSiteStack/SiteCertificate/CertificateRequestorFunction/Resource": [
+ {
+ "type": "aws:cdk:logicalId",
+ "data": "SiteCertificateCertificateRequestorFunction7CFA7DEA"
+ },
+ {
+ "type": "aws:cdk:creationStack",
+ "data": [
+ "...new DnsValidatedCertificate2 in aws-cdk-lib...",
+ "new BetaSupplierSiteStack (D:\\Tradhox_workspace\\supplier_central_frontend\\cdk\\betasupplier-site-stack.ts:34:25)",
+ " (D:\\Tradhox_workspace\\supplier_central_frontend\\cdk\\app.ts:6:1)",
+ "...node internals..."
+ ]
+ }
+ ],
+ "/BetaSupplierSiteStack/SiteCertificate/CertificateRequestorResource/Default": [
+ {
+ "type": "aws:cdk:logicalId",
+ "data": "SiteCertificateCertificateRequestorResource6021082A"
+ },
+ {
+ "type": "aws:cdk:creationStack",
+ "data": [
+ "...new DnsValidatedCertificate2 in aws-cdk-lib...",
+ "new BetaSupplierSiteStack (D:\\Tradhox_workspace\\supplier_central_frontend\\cdk\\betasupplier-site-stack.ts:34:25)",
+ " (D:\\Tradhox_workspace\\supplier_central_frontend\\cdk\\app.ts:6:1)",
+ "...node internals..."
+ ]
+ }
+ ],
+ "/BetaSupplierSiteStack/SiteCertificate/CertificateRequestorFunction/ServiceRole/Resource": [
+ {
+ "type": "aws:cdk:logicalId",
+ "data": "SiteCertificateCertificateRequestorFunctionServiceRole645E891D"
+ },
+ {
+ "type": "aws:cdk:creationStack",
+ "data": [
+ "...new DnsValidatedCertificate2 in aws-cdk-lib...",
+ "new BetaSupplierSiteStack (D:\\Tradhox_workspace\\supplier_central_frontend\\cdk\\betasupplier-site-stack.ts:34:25)",
+ " (D:\\Tradhox_workspace\\supplier_central_frontend\\cdk\\app.ts:6:1)"
+ ]
+ }
+ ],
+ "/BetaSupplierSiteStack/BetaSupplierSiteDistribution/Origin1/S3OriginAccessControl/Resource": [
+ {
+ "type": "aws:cdk:logicalId",
+ "data": "BetaSupplierSiteDistributionOrigin1S3OriginAccessControlF9377C01"
+ },
+ {
+ "type": "aws:cdk:creationStack",
+ "data": [
+ "...new Distribution2 in aws-cdk-lib...",
+ "new BetaSupplierSiteStack (D:\\Tradhox_workspace\\supplier_central_frontend\\cdk\\betasupplier-site-stack.ts:43:26)",
+ " (D:\\Tradhox_workspace\\supplier_central_frontend\\cdk\\app.ts:6:1)",
+ "...node internals..."
+ ]
+ }
+ ],
+ "/BetaSupplierSiteStack/SiteCertificate/CertificateRequestorFunction/ServiceRole/DefaultPolicy/Resource": [
+ {
+ "type": "aws:cdk:logicalId",
+ "data": "SiteCertificateCertificateRequestorFunctionServiceRoleDefaultPolicy96ED5C9C"
+ },
+ {
+ "type": "aws:cdk:creationStack",
+ "data": [
+ "...new DnsValidatedCertificate2 in aws-cdk-lib...",
+ "new BetaSupplierSiteStack (D:\\Tradhox_workspace\\supplier_central_frontend\\cdk\\betasupplier-site-stack.ts:34:25)"
+ ]
+ }
+ ]
+}
\ No newline at end of file
diff --git a/cdk/cdk.out/BetaSupplierSiteStack.template.json b/cdk/cdk.out/BetaSupplierSiteStack.template.json
new file mode 100644
index 0000000..91cbffc
--- /dev/null
+++ b/cdk/cdk.out/BetaSupplierSiteStack.template.json
@@ -0,0 +1,584 @@
+{
+ "Resources": {
+ "BetaSupplierSiteBucketC3053F9A": {
+ "Type": "AWS::S3::Bucket",
+ "Properties": {
+ "BucketEncryption": {
+ "ServerSideEncryptionConfiguration": [
+ {
+ "ServerSideEncryptionByDefault": {
+ "SSEAlgorithm": "AES256"
+ }
+ }
+ ]
+ },
+ "BucketName": "betasuppliersite-764709663363-ap-south-2",
+ "PublicAccessBlockConfiguration": {
+ "BlockPublicAcls": true,
+ "BlockPublicPolicy": true,
+ "IgnorePublicAcls": true,
+ "RestrictPublicBuckets": true
+ },
+ "Tags": [
+ {
+ "Key": "aws-cdk:auto-delete-objects",
+ "Value": "true"
+ }
+ ]
+ },
+ "UpdateReplacePolicy": "Delete",
+ "DeletionPolicy": "Delete",
+ "Metadata": {
+ "aws:cdk:path": "BetaSupplierSiteStack/BetaSupplierSiteBucket/Resource"
+ }
+ },
+ "BetaSupplierSiteBucketPolicy7E1C9F1E": {
+ "Type": "AWS::S3::BucketPolicy",
+ "Properties": {
+ "Bucket": {
+ "Ref": "BetaSupplierSiteBucketC3053F9A"
+ },
+ "PolicyDocument": {
+ "Statement": [
+ {
+ "Action": [
+ "s3:PutBucketPolicy",
+ "s3:GetBucket*",
+ "s3:List*",
+ "s3:DeleteObject*"
+ ],
+ "Effect": "Allow",
+ "Principal": {
+ "AWS": {
+ "Fn::GetAtt": [
+ "CustomS3AutoDeleteObjectsCustomResourceProviderRole3B1BD092",
+ "Arn"
+ ]
+ }
+ },
+ "Resource": [
+ {
+ "Fn::GetAtt": [
+ "BetaSupplierSiteBucketC3053F9A",
+ "Arn"
+ ]
+ },
+ {
+ "Fn::Join": [
+ "",
+ [
+ {
+ "Fn::GetAtt": [
+ "BetaSupplierSiteBucketC3053F9A",
+ "Arn"
+ ]
+ },
+ "/*"
+ ]
+ ]
+ }
+ ]
+ },
+ {
+ "Action": "s3:GetObject",
+ "Condition": {
+ "StringEquals": {
+ "AWS:SourceArn": {
+ "Fn::Join": [
+ "",
+ [
+ "arn:",
+ {
+ "Ref": "AWS::Partition"
+ },
+ ":cloudfront::",
+ {
+ "Ref": "AWS::AccountId"
+ },
+ ":distribution/",
+ {
+ "Ref": "BetaSupplierSiteDistributionD03E58A9"
+ }
+ ]
+ ]
+ }
+ }
+ },
+ "Effect": "Allow",
+ "Principal": {
+ "Service": "cloudfront.amazonaws.com"
+ },
+ "Resource": {
+ "Fn::Join": [
+ "",
+ [
+ {
+ "Fn::GetAtt": [
+ "BetaSupplierSiteBucketC3053F9A",
+ "Arn"
+ ]
+ },
+ "/*"
+ ]
+ ]
+ }
+ }
+ ],
+ "Version": "2012-10-17"
+ }
+ },
+ "Metadata": {
+ "aws:cdk:path": "BetaSupplierSiteStack/BetaSupplierSiteBucket/Policy/Resource"
+ }
+ },
+ "BetaSupplierSiteBucketAutoDeleteObjectsCustomResource789310C3": {
+ "Type": "Custom::S3AutoDeleteObjects",
+ "Properties": {
+ "ServiceToken": {
+ "Fn::GetAtt": [
+ "CustomS3AutoDeleteObjectsCustomResourceProviderHandler9D90184F",
+ "Arn"
+ ]
+ },
+ "BucketName": {
+ "Ref": "BetaSupplierSiteBucketC3053F9A"
+ }
+ },
+ "DependsOn": [
+ "BetaSupplierSiteBucketPolicy7E1C9F1E"
+ ],
+ "UpdateReplacePolicy": "Delete",
+ "DeletionPolicy": "Delete",
+ "Metadata": {
+ "aws:cdk:path": "BetaSupplierSiteStack/BetaSupplierSiteBucket/AutoDeleteObjectsCustomResource/Default"
+ }
+ },
+ "CustomS3AutoDeleteObjectsCustomResourceProviderRole3B1BD092": {
+ "Type": "AWS::IAM::Role",
+ "Properties": {
+ "AssumeRolePolicyDocument": {
+ "Version": "2012-10-17",
+ "Statement": [
+ {
+ "Action": "sts:AssumeRole",
+ "Effect": "Allow",
+ "Principal": {
+ "Service": "lambda.amazonaws.com"
+ }
+ }
+ ]
+ },
+ "ManagedPolicyArns": [
+ {
+ "Fn::Sub": "arn:${AWS::Partition}:iam::aws:policy/service-role/AWSLambdaBasicExecutionRole"
+ }
+ ]
+ },
+ "Metadata": {
+ "aws:cdk:path": "BetaSupplierSiteStack/Custom::S3AutoDeleteObjectsCustomResourceProvider/Role"
+ }
+ },
+ "CustomS3AutoDeleteObjectsCustomResourceProviderHandler9D90184F": {
+ "Type": "AWS::Lambda::Function",
+ "Properties": {
+ "Code": {
+ "S3Bucket": "cdk-hnb659fds-assets-764709663363-ap-south-2",
+ "S3Key": "faa95a81ae7d7373f3e1f242268f904eb748d8d0fdd306e8a6fe515a1905a7d6.zip"
+ },
+ "Timeout": 900,
+ "MemorySize": 128,
+ "Handler": "index.handler",
+ "Role": {
+ "Fn::GetAtt": [
+ "CustomS3AutoDeleteObjectsCustomResourceProviderRole3B1BD092",
+ "Arn"
+ ]
+ },
+ "Runtime": "nodejs24.x",
+ "Description": {
+ "Fn::Join": [
+ "",
+ [
+ "Lambda function for auto-deleting objects in ",
+ {
+ "Ref": "BetaSupplierSiteBucketC3053F9A"
+ },
+ " S3 bucket."
+ ]
+ ]
+ }
+ },
+ "DependsOn": [
+ "CustomS3AutoDeleteObjectsCustomResourceProviderRole3B1BD092"
+ ],
+ "Metadata": {
+ "aws:cdk:path": "BetaSupplierSiteStack/Custom::S3AutoDeleteObjectsCustomResourceProvider/Handler",
+ "aws:asset:path": "asset.faa95a81ae7d7373f3e1f242268f904eb748d8d0fdd306e8a6fe515a1905a7d6",
+ "aws:asset:property": "Code"
+ }
+ },
+ "SiteCertificateCertificateRequestorFunctionServiceRole645E891D": {
+ "Type": "AWS::IAM::Role",
+ "Properties": {
+ "AssumeRolePolicyDocument": {
+ "Statement": [
+ {
+ "Action": "sts:AssumeRole",
+ "Effect": "Allow",
+ "Principal": {
+ "Service": "lambda.amazonaws.com"
+ }
+ }
+ ],
+ "Version": "2012-10-17"
+ },
+ "ManagedPolicyArns": [
+ {
+ "Fn::Join": [
+ "",
+ [
+ "arn:",
+ {
+ "Ref": "AWS::Partition"
+ },
+ ":iam::aws:policy/service-role/AWSLambdaBasicExecutionRole"
+ ]
+ ]
+ }
+ ]
+ },
+ "Metadata": {
+ "aws:cdk:path": "BetaSupplierSiteStack/SiteCertificate/CertificateRequestorFunction/ServiceRole/Resource"
+ }
+ },
+ "SiteCertificateCertificateRequestorFunctionServiceRoleDefaultPolicy96ED5C9C": {
+ "Type": "AWS::IAM::Policy",
+ "Properties": {
+ "PolicyDocument": {
+ "Statement": [
+ {
+ "Action": [
+ "acm:RequestCertificate",
+ "acm:DescribeCertificate",
+ "acm:DeleteCertificate",
+ "acm:AddTagsToCertificate"
+ ],
+ "Effect": "Allow",
+ "Resource": "*"
+ },
+ {
+ "Action": "route53:GetChange",
+ "Effect": "Allow",
+ "Resource": "*"
+ },
+ {
+ "Action": "route53:changeResourceRecordSets",
+ "Condition": {
+ "ForAllValues:StringEquals": {
+ "route53:ChangeResourceRecordSetsRecordTypes": [
+ "CNAME"
+ ],
+ "route53:ChangeResourceRecordSetsActions": [
+ "UPSERT"
+ ]
+ },
+ "ForAllValues:StringLike": {
+ "route53:ChangeResourceRecordSetsNormalizedRecordNames": [
+ "*.betapartners.tradhox.com"
+ ]
+ }
+ },
+ "Effect": "Allow",
+ "Resource": {
+ "Fn::Join": [
+ "",
+ [
+ "arn:",
+ {
+ "Ref": "AWS::Partition"
+ },
+ ":route53:::hostedzone/Z05079927Q6UCDIWAH4E"
+ ]
+ ]
+ }
+ }
+ ],
+ "Version": "2012-10-17"
+ },
+ "PolicyName": "SiteCertificateCertificateRequestorFunctionServiceRoleDefaultPolicy96ED5C9C",
+ "Roles": [
+ {
+ "Ref": "SiteCertificateCertificateRequestorFunctionServiceRole645E891D"
+ }
+ ]
+ },
+ "Metadata": {
+ "aws:cdk:path": "BetaSupplierSiteStack/SiteCertificate/CertificateRequestorFunction/ServiceRole/DefaultPolicy/Resource"
+ }
+ },
+ "SiteCertificateCertificateRequestorFunction7CFA7DEA": {
+ "Type": "AWS::Lambda::Function",
+ "Properties": {
+ "Code": {
+ "S3Bucket": "cdk-hnb659fds-assets-764709663363-ap-south-2",
+ "S3Key": "ffb21b7e396cc684c46812aea1d2ff7ea22401e05038c047ae9f071082c68586.zip"
+ },
+ "Handler": "index.certificateRequestHandler",
+ "Role": {
+ "Fn::GetAtt": [
+ "SiteCertificateCertificateRequestorFunctionServiceRole645E891D",
+ "Arn"
+ ]
+ },
+ "Runtime": "nodejs24.x",
+ "Timeout": 900
+ },
+ "DependsOn": [
+ "SiteCertificateCertificateRequestorFunctionServiceRoleDefaultPolicy96ED5C9C",
+ "SiteCertificateCertificateRequestorFunctionServiceRole645E891D"
+ ],
+ "Metadata": {
+ "aws:cdk:path": "BetaSupplierSiteStack/SiteCertificate/CertificateRequestorFunction/Resource",
+ "aws:asset:path": "asset.ffb21b7e396cc684c46812aea1d2ff7ea22401e05038c047ae9f071082c68586",
+ "aws:asset:is-bundled": false,
+ "aws:asset:property": "Code"
+ }
+ },
+ "SiteCertificateCertificateRequestorResource6021082A": {
+ "Type": "AWS::CloudFormation::CustomResource",
+ "Properties": {
+ "ServiceToken": {
+ "Fn::GetAtt": [
+ "SiteCertificateCertificateRequestorFunction7CFA7DEA",
+ "Arn"
+ ]
+ },
+ "DomainName": "betapartners.tradhox.com",
+ "HostedZoneId": "Z05079927Q6UCDIWAH4E",
+ "Region": "us-east-1"
+ },
+ "UpdateReplacePolicy": "Delete",
+ "DeletionPolicy": "Delete",
+ "Metadata": {
+ "aws:cdk:path": "BetaSupplierSiteStack/SiteCertificate/CertificateRequestorResource/Default"
+ }
+ },
+ "BetaSupplierSiteDistributionOrigin1S3OriginAccessControlF9377C01": {
+ "Type": "AWS::CloudFront::OriginAccessControl",
+ "Properties": {
+ "OriginAccessControlConfig": {
+ "Name": "BetaSupplierSiteStackBetaSupOrigin1S3OriginAccessControl50127AEA",
+ "OriginAccessControlOriginType": "s3",
+ "SigningBehavior": "always",
+ "SigningProtocol": "sigv4"
+ }
+ },
+ "Metadata": {
+ "aws:cdk:path": "BetaSupplierSiteStack/BetaSupplierSiteDistribution/Origin1/S3OriginAccessControl/Resource"
+ }
+ },
+ "BetaSupplierSiteDistributionD03E58A9": {
+ "Type": "AWS::CloudFront::Distribution",
+ "Properties": {
+ "DistributionConfig": {
+ "Aliases": [
+ "betapartners.tradhox.com"
+ ],
+ "CacheBehaviors": [
+ {
+ "AllowedMethods": [
+ "GET",
+ "HEAD",
+ "OPTIONS",
+ "PUT",
+ "PATCH",
+ "POST",
+ "DELETE"
+ ],
+ "CachePolicyId": "4135ea2d-6df8-44a3-9df3-4b5a84be39ad",
+ "Compress": true,
+ "OriginRequestPolicyId": "216adef6-5c7f-47e4-b989-5492eafa07d3",
+ "PathPattern": "/api/*",
+ "TargetOriginId": "BetaSupplierSiteStackBetaSupplierSiteDistributionOrigin26FE0C2F5",
+ "ViewerProtocolPolicy": "redirect-to-https"
+ }
+ ],
+ "CustomErrorResponses": [
+ {
+ "ErrorCachingMinTTL": 0,
+ "ErrorCode": 404,
+ "ResponseCode": 200,
+ "ResponsePagePath": "/index.html"
+ },
+ {
+ "ErrorCachingMinTTL": 0,
+ "ErrorCode": 403,
+ "ResponseCode": 200,
+ "ResponsePagePath": "/index.html"
+ }
+ ],
+ "DefaultCacheBehavior": {
+ "AllowedMethods": [
+ "GET",
+ "HEAD"
+ ],
+ "CachePolicyId": "658327ea-f89d-4fab-a63d-7e88639e58f6",
+ "CachedMethods": [
+ "GET",
+ "HEAD"
+ ],
+ "Compress": true,
+ "TargetOriginId": "BetaSupplierSiteStackBetaSupplierSiteDistributionOrigin118CF032F",
+ "ViewerProtocolPolicy": "redirect-to-https"
+ },
+ "DefaultRootObject": "index.html",
+ "Enabled": true,
+ "HttpVersion": "http2",
+ "IPV6Enabled": true,
+ "Origins": [
+ {
+ "DomainName": {
+ "Fn::GetAtt": [
+ "BetaSupplierSiteBucketC3053F9A",
+ "RegionalDomainName"
+ ]
+ },
+ "Id": "BetaSupplierSiteStackBetaSupplierSiteDistributionOrigin118CF032F",
+ "OriginAccessControlId": {
+ "Fn::GetAtt": [
+ "BetaSupplierSiteDistributionOrigin1S3OriginAccessControlF9377C01",
+ "Id"
+ ]
+ },
+ "S3OriginConfig": {
+ "OriginAccessIdentity": ""
+ }
+ },
+ {
+ "CustomOriginConfig": {
+ "HTTPPort": 8080,
+ "OriginProtocolPolicy": "http-only",
+ "OriginSSLProtocols": [
+ "TLSv1.2"
+ ]
+ },
+ "DomainName": "betapartner-api.tradhox.com",
+ "Id": "BetaSupplierSiteStackBetaSupplierSiteDistributionOrigin26FE0C2F5"
+ }
+ ],
+ "ViewerCertificate": {
+ "AcmCertificateArn": {
+ "Fn::GetAtt": [
+ "SiteCertificateCertificateRequestorResource6021082A",
+ "Arn"
+ ]
+ },
+ "MinimumProtocolVersion": "TLSv1.2_2021",
+ "SslSupportMethod": "sni-only"
+ }
+ }
+ },
+ "Metadata": {
+ "aws:cdk:path": "BetaSupplierSiteStack/BetaSupplierSiteDistribution/Resource"
+ }
+ },
+ "SiteAliasRecord3C0AF5BF": {
+ "Type": "AWS::Route53::RecordSet",
+ "Properties": {
+ "AliasTarget": {
+ "DNSName": {
+ "Fn::GetAtt": [
+ "BetaSupplierSiteDistributionD03E58A9",
+ "DomainName"
+ ]
+ },
+ "HostedZoneId": {
+ "Fn::FindInMap": [
+ "AWSCloudFrontPartitionHostedZoneIdMap",
+ {
+ "Ref": "AWS::Partition"
+ },
+ "zoneId"
+ ]
+ }
+ },
+ "HostedZoneId": "Z05079927Q6UCDIWAH4E",
+ "Name": "betapartners.tradhox.com.",
+ "Type": "A"
+ },
+ "Metadata": {
+ "aws:cdk:path": "BetaSupplierSiteStack/SiteAliasRecord/Resource"
+ }
+ },
+ "CDKMetadata": {
+ "Type": "AWS::CDK::Metadata",
+ "Properties": {
+ "Analytics": "v2:deflate64:H4sIAAAAAAAA/5VRQU7DMBB8S3N2DSQgJG5pKm6oVSJxQahynG20rWNX3nULsvJ3lETQcODAacY7O6PROpXpYypvF+pCS90clwZrGStW+ijUhXaRMhlXQR+BRbG3E3uLSYcfaJOnZG4b9imTo0RyWs0DuzUYYNjUB9BMSf8uJmnrDOrPa+r0/kf2ZKhYMXRg59ErRdALDZ5xj3rQlVUteLm29KoMNoqhKa6yMKqrGyXjc7Ca0dmh1TfvBapOxtIZGMYjXrtPrBeU7RQRMMl8AKGNC83eO8syrpHYYx3G5CrbeGzR5loDUeEse2eGpD/Gc3MvvAsMD5mMeQna+WZsNLIKuO9FEYhdVwK54PXU94f/krbenbEBP5xKjJUrVi3aVszNm8CnMP78izqd0La9sK4BeaCbc3ov0zt5uzgQ4tIHy9iBLCf8AjedqQBWAgAA"
+ },
+ "Metadata": {
+ "aws:cdk:path": "BetaSupplierSiteStack/CDKMetadata/Default"
+ }
+ }
+ },
+ "Outputs": {
+ "BetaSupplierSiteBucketName": {
+ "Description": "The name of the S3 bucket for the betasupplier site",
+ "Value": {
+ "Ref": "BetaSupplierSiteBucketC3053F9A"
+ }
+ },
+ "BetaSupplierSiteCloudFrontDomainName": {
+ "Description": "The domain name of the CloudFront distribution for betasupplier site",
+ "Value": {
+ "Fn::GetAtt": [
+ "BetaSupplierSiteDistributionD03E58A9",
+ "DomainName"
+ ]
+ }
+ }
+ },
+ "Mappings": {
+ "AWSCloudFrontPartitionHostedZoneIdMap": {
+ "aws": {
+ "zoneId": "Z2FDTNDATAQYW2"
+ },
+ "aws-cn": {
+ "zoneId": "Z3RFFRIM2A3IF5"
+ }
+ }
+ },
+ "Parameters": {
+ "BootstrapVersion": {
+ "Type": "AWS::SSM::Parameter::Value",
+ "Default": "/cdk-bootstrap/hnb659fds/version",
+ "Description": "Version of the CDK Bootstrap resources in this environment, automatically retrieved from SSM Parameter Store. [cdk:skip]"
+ }
+ },
+ "Rules": {
+ "CheckBootstrapVersion": {
+ "Assertions": [
+ {
+ "Assert": {
+ "Fn::Not": [
+ {
+ "Fn::Contains": [
+ [
+ "1",
+ "2",
+ "3",
+ "4",
+ "5"
+ ],
+ {
+ "Ref": "BootstrapVersion"
+ }
+ ]
+ }
+ ]
+ },
+ "AssertDescription": "CDK bootstrap stack version 6 required. Please run 'cdk bootstrap' with a recent version of the CDK CLI."
+ }
+ ]
+ }
+ }
+}
\ No newline at end of file
diff --git a/cdk/cdk.out/asset.faa95a81ae7d7373f3e1f242268f904eb748d8d0fdd306e8a6fe515a1905a7d6/index.js b/cdk/cdk.out/asset.faa95a81ae7d7373f3e1f242268f904eb748d8d0fdd306e8a6fe515a1905a7d6/index.js
new file mode 100644
index 0000000..2f92d06
--- /dev/null
+++ b/cdk/cdk.out/asset.faa95a81ae7d7373f3e1f242268f904eb748d8d0fdd306e8a6fe515a1905a7d6/index.js
@@ -0,0 +1 @@
+"use strict";var f=Object.create,i=Object.defineProperty,I=Object.getOwnPropertyDescriptor,C=Object.getOwnPropertyNames,w=Object.getPrototypeOf,P=Object.prototype.hasOwnProperty,A=(t,e)=>{for(var o in e)i(t,o,{get:e[o],enumerable:!0})},d=(t,e,o,r)=>{if(e&&typeof e=="object"||typeof e=="function")for(let s of C(e))!P.call(t,s)&&s!==o&&i(t,s,{get:()=>e[s],enumerable:!(r=I(e,s))||r.enumerable});return t},l=(t,e,o)=>(o=t!=null?f(w(t)):{},d(e||!t||!t.__esModule?i(o,"default",{value:t,enumerable:!0}):o,t)),B=t=>d(i({},"__esModule",{value:!0}),t),q={};A(q,{autoDeleteHandler:()=>S,handler:()=>H}),module.exports=B(q);var h=require("@aws-sdk/client-s3"),y=l(require("https")),m=l(require("url")),a={sendHttpRequest:D,log:T,includeStackTraces:!0,userHandlerIndex:"./index"},p="AWSCDK::CustomResourceProviderFramework::CREATE_FAILED",L="AWSCDK::CustomResourceProviderFramework::MISSING_PHYSICAL_ID";function R(t){return async(e,o)=>{let r={...e,ResponseURL:"..."};if(a.log(JSON.stringify(r,void 0,2)),e.RequestType==="Delete"&&e.PhysicalResourceId===p){a.log("ignoring DELETE event caused by a failed CREATE event"),await u("SUCCESS",e);return}try{let s=await t(r,o),n=k(e,s);await u("SUCCESS",n)}catch(s){let n={...e,Reason:a.includeStackTraces?s.stack:s.message};n.PhysicalResourceId||(e.RequestType==="Create"?(a.log("CREATE failed, responding with a marker physical resource id so that the subsequent DELETE will be ignored"),n.PhysicalResourceId=p):a.log(`ERROR: Malformed event. "PhysicalResourceId" is required: ${JSON.stringify(e)}`)),await u("FAILED",n)}}}function k(t,e={}){let o=e.PhysicalResourceId??t.PhysicalResourceId??t.RequestId;if(t.RequestType==="Delete"&&o!==t.PhysicalResourceId)throw new Error(`DELETE: cannot change the physical resource ID from "${t.PhysicalResourceId}" to "${e.PhysicalResourceId}" during deletion`);return{...t,...e,PhysicalResourceId:o}}async function u(t,e){let o={Status:t,Reason:e.Reason??t,StackId:e.StackId,RequestId:e.RequestId,PhysicalResourceId:e.PhysicalResourceId||L,LogicalResourceId:e.LogicalResourceId,NoEcho:e.NoEcho,Data:e.Data},r=m.parse(e.ResponseURL),s=`${r.protocol}//${r.hostname}/${r.pathname}?***`;a.log("submit response to cloudformation",s,o);let n=JSON.stringify(o),E={hostname:r.hostname,path:r.path,method:"PUT",headers:{"content-type":"","content-length":Buffer.byteLength(n,"utf8")}};await O({attempts:5,sleep:1e3},a.sendHttpRequest)(E,n)}async function D(t,e){return new Promise((o,r)=>{try{let s=y.request(t,n=>{n.resume(),!n.statusCode||n.statusCode>=400?r(new Error(`Unsuccessful HTTP response: ${n.statusCode}`)):o()});s.on("error",r),s.write(e),s.end()}catch(s){r(s)}})}function T(t,...e){console.log(t,...e)}function O(t,e){return async(...o)=>{let r=t.attempts,s=t.sleep;for(;;)try{return await e(...o)}catch(n){if(r--<=0)throw n;await b(Math.floor(Math.random()*s)),s*=2}}}async function b(t){return new Promise(e=>setTimeout(e,t))}var g="aws-cdk:auto-delete-objects",x=JSON.stringify({Version:"2012-10-17",Statement:[]}),c=new h.S3({}),H=R(S);async function S(t){switch(t.RequestType){case"Create":return;case"Update":return{PhysicalResourceId:(await F(t)).PhysicalResourceId};case"Delete":return N(t.ResourceProperties?.BucketName)}}async function F(t){let e=t,o=e.OldResourceProperties?.BucketName;return{PhysicalResourceId:e.ResourceProperties?.BucketName??o}}async function _(t){try{let e=(await c.getBucketPolicy({Bucket:t}))?.Policy??x,o=JSON.parse(e);o.Statement.push({Principal:"*",Effect:"Deny",Action:["s3:PutObject"],Resource:[`arn:aws:s3:::${t}/*`]}),await c.putBucketPolicy({Bucket:t,Policy:JSON.stringify(o)})}catch(e){if(e.name==="NoSuchBucket")throw e;console.log(`Could not set new object deny policy on bucket '${t}' prior to deletion.`)}}async function U(t){let e;do{e=await c.listObjectVersions({Bucket:t});let o=[...e.Versions??[],...e.DeleteMarkers??[]];if(o.length===0)return;let r=o.map(s=>({Key:s.Key,VersionId:s.VersionId}));await c.deleteObjects({Bucket:t,Delete:{Objects:r}})}while(e?.IsTruncated)}async function N(t){if(!t)throw new Error("No BucketName was provided.");try{if(!await W(t)){console.log(`Bucket does not have '${g}' tag, skipping cleaning.`);return}await _(t),await U(t)}catch(e){if(e.name==="NoSuchBucket"){console.log(`Bucket '${t}' does not exist.`);return}throw e}}async function W(t){return(await c.getBucketTagging({Bucket:t})).TagSet?.some(o=>o.Key===g&&o.Value==="true")}
diff --git a/cdk/cdk.out/asset.ffb21b7e396cc684c46812aea1d2ff7ea22401e05038c047ae9f071082c68586/index.js b/cdk/cdk.out/asset.ffb21b7e396cc684c46812aea1d2ff7ea22401e05038c047ae9f071082c68586/index.js
new file mode 100644
index 0000000..4b42df6
--- /dev/null
+++ b/cdk/cdk.out/asset.ffb21b7e396cc684c46812aea1d2ff7ea22401e05038c047ae9f071082c68586/index.js
@@ -0,0 +1 @@
+"use strict";var{ACM:C,waitUntilCertificateValidated:N}=require("@aws-sdk/client-acm"),{Route53:R,waitUntilResourceRecordSetsChanged:U}=require("@aws-sdk/client-route-53"),A=function(e){return new Promise(r=>setTimeout(r,e))},T,P,m=A,h=Math.random,d=10,w=function(e,r,o,t,s,i){return new Promise((a,c)=>{let u=require("https"),{URL:l}=require("url");var f=JSON.stringify({Status:o,Reason:i,PhysicalResourceId:t||r.logStreamName,StackId:e.StackId,RequestId:e.RequestId,LogicalResourceId:e.LogicalResourceId,Data:s});let n=new l(e.ResponseURL||T),g={hostname:n.hostname,port:443,path:n.pathname+n.search,method:"PUT",headers:{"Content-Type":"","Content-Length":f.length}};u.request(g).on("error",c).on("response",p=>{p.resume(),p.statusCode>=400?c(new Error(`Server returned error ${p.statusCode}: ${p.statusMessage}`)):a()}).end(f,"utf8")})},S=async function(e,r,o){let t=Array.from(Object.entries(o)).map(([i,a])=>({Key:i,Value:a}));await new C({region:r}).addTagsToCertificate({CertificateArn:e,Tags:t})},q=async function(e,r,o,t,s,i,a){let c=require("crypto"),u=new C({region:i}),l=a?new R({endpoint:a}):new R;console.log(`Requesting certificate for ${r}`);let f=await u.requestCertificate({DomainName:r,SubjectAlternativeNames:o,Options:{CertificateTransparencyLoggingPreference:t},IdempotencyToken:c.createHash("sha256").update(e).digest("hex").slice(0,32),ValidationMethod:"DNS"});console.log(`Certificate ARN: ${f.CertificateArn}`),console.log("Waiting for ACM to provide DNS records for validation...");let n=[];for(let g=0;g0&&r.every(o=>o&&!!o.ResourceRecord)){let o=r.map(t=>t.ResourceRecord).reduce((t,s)=>(t[s.Name]=s,t),{});return Object.keys(o).sort().map(t=>o[t])}return[]}async function I(e,r,o,t="UPSERT"){let s=await e.changeResourceRecordSets({ChangeBatch:{Changes:r.map(i=>(console.log(`${i.Name} ${i.Type} ${i.Value}`),{Action:t,ResourceRecordSet:{Name:i.Name,Type:i.Type,TTL:60,ResourceRecords:[{Value:i.Value}]}}))},HostedZoneId:o});console.log("Waiting for DNS records to commit..."),await U({client:e,delay:30,maxAttempts:10},{Id:s.ChangeInfo.Id})}function $(e,r,o){return!e||e.DomainName!==r.DomainName||e.SubjectAlternativeNames!==r.SubjectAlternativeNames||e.CertificateTransparencyLoggingPreference!==r.CertificateTransparencyLoggingPreference||e.HostedZoneId!==r.HostedZoneId||e.Region!==r.Region||!o||!o.startsWith("arn:")}exports.certificateRequestHandler=async function(e,r){var o={},t,s;async function i(){s=await q(e.RequestId,e.ResourceProperties.DomainName,e.ResourceProperties.SubjectAlternativeNames,e.ResourceProperties.CertificateTransparencyLoggingPreference,e.ResourceProperties.HostedZoneId,e.ResourceProperties.Region,e.ResourceProperties.Route53Endpoint),o.Arn=t=s}try{switch(e.RequestType){case"Create":await i(),e.ResourceProperties.Tags&&t.startsWith("arn:")&&await S(t,e.ResourceProperties.Region,e.ResourceProperties.Tags);break;case"Update":$(e.OldResourceProperties,e.ResourceProperties,e.PhysicalResourceId)?await i():o.Arn=t=e.PhysicalResourceId,e.ResourceProperties.Tags&&t.startsWith("arn:")&&await S(t,e.ResourceProperties.Region,e.ResourceProperties.Tags);break;case"Delete":t=e.PhysicalResourceId;let a=e.ResourceProperties.RemovalPolicy??"destroy";t.startsWith("arn:")&&a==="destroy"&&await b(t,e.ResourceProperties.Region,e.ResourceProperties.HostedZoneId,e.ResourceProperties.Route53Endpoint,e.ResourceProperties.CleanupRecords==="true");break;default:throw new Error(`Unsupported request type ${e.RequestType}`)}console.log("Uploading SUCCESS response to S3..."),await w(e,r,"SUCCESS",t,o),console.log("Done.")}catch(a){console.log(`Caught error ${a}. Uploading FAILED message to S3.`),await w(e,r,"FAILED",t,null,a.message)}},exports.withReporter=function(e){w=e},exports.withDefaultResponseURL=function(e){T=e},exports.withWaiter=function(e){P=e},exports.resetWaiter=function(){P=void 0},exports.withSleep=function(e){m=e},exports.resetSleep=function(){m=A},exports.withRandom=function(e){h=e},exports.resetRandom=function(){h=Math.random},exports.withMaxAttempts=function(e){d=e},exports.resetMaxAttempts=function(){d=10};
diff --git a/cdk/cdk.out/cdk.out b/cdk/cdk.out/cdk.out
new file mode 100644
index 0000000..433ef06
--- /dev/null
+++ b/cdk/cdk.out/cdk.out
@@ -0,0 +1 @@
+{"version":"54.0.0"}
\ No newline at end of file
diff --git a/cdk/cdk.out/manifest.json b/cdk/cdk.out/manifest.json
new file mode 100644
index 0000000..885a7a3
--- /dev/null
+++ b/cdk/cdk.out/manifest.json
@@ -0,0 +1,508 @@
+{
+ "version": "54.0.0",
+ "artifacts": {
+ "BetaSupplierSiteStack.assets": {
+ "type": "cdk:asset-manifest",
+ "properties": {
+ "file": "BetaSupplierSiteStack.assets.json",
+ "requiresBootstrapStackVersion": 6,
+ "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version"
+ }
+ },
+ "BetaSupplierSiteStack": {
+ "type": "aws:cloudformation:stack",
+ "environment": "aws://764709663363/ap-south-2",
+ "properties": {
+ "templateFile": "BetaSupplierSiteStack.template.json",
+ "terminationProtection": false,
+ "validateOnSynth": false,
+ "assumeRoleArn": "arn:${AWS::Partition}:iam::764709663363:role/cdk-hnb659fds-deploy-role-764709663363-ap-south-2",
+ "cloudFormationExecutionRoleArn": "arn:${AWS::Partition}:iam::764709663363:role/cdk-hnb659fds-cfn-exec-role-764709663363-ap-south-2",
+ "stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-764709663363-ap-south-2/7ed3cfff7120b7b31997b41625d0f260352266b5eaa8c56533cf1f509441f2e7.json",
+ "requiresBootstrapStackVersion": 6,
+ "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version",
+ "additionalDependencies": [
+ "BetaSupplierSiteStack.assets"
+ ],
+ "lookupRole": {
+ "arn": "arn:${AWS::Partition}:iam::764709663363:role/cdk-hnb659fds-lookup-role-764709663363-ap-south-2",
+ "requiresBootstrapStackVersion": 8,
+ "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version"
+ }
+ },
+ "dependencies": [
+ "BetaSupplierSiteStack.assets"
+ ],
+ "additionalMetadataFile": "BetaSupplierSiteStack.metadata.json",
+ "displayName": "BetaSupplierSiteStack"
+ },
+ "Tree": {
+ "type": "cdk:tree",
+ "properties": {
+ "file": "tree.json"
+ }
+ },
+ "aws-cdk-lib/feature-flag-report": {
+ "type": "cdk:feature-flag-report",
+ "properties": {
+ "module": "aws-cdk-lib",
+ "flags": {
+ "@aws-cdk/aws-signer:signingProfileNamePassedToCfn": {
+ "recommendedValue": true,
+ "explanation": "Pass signingProfileName to CfnSigningProfile"
+ },
+ "@aws-cdk/core:newStyleStackSynthesis": {
+ "recommendedValue": true,
+ "explanation": "Switch to new stack synthesis method which enables CI/CD",
+ "unconfiguredBehavesLike": {
+ "v2": true
+ }
+ },
+ "@aws-cdk/core:stackRelativeExports": {
+ "recommendedValue": true,
+ "explanation": "Name exports based on the construct paths relative to the stack, rather than the global construct path",
+ "unconfiguredBehavesLike": {
+ "v2": true
+ }
+ },
+ "@aws-cdk/aws-ecs-patterns:secGroupsDisablesImplicitOpenListener": {
+ "recommendedValue": true,
+ "explanation": "Disable implicit openListener when custom security groups are provided"
+ },
+ "@aws-cdk/aws-rds:lowercaseDbIdentifier": {
+ "recommendedValue": true,
+ "explanation": "Force lowercasing of RDS Cluster names in CDK",
+ "unconfiguredBehavesLike": {
+ "v2": true
+ }
+ },
+ "@aws-cdk/aws-apigateway:usagePlanKeyOrderInsensitiveId": {
+ "recommendedValue": true,
+ "explanation": "Allow adding/removing multiple UsagePlanKeys independently",
+ "unconfiguredBehavesLike": {
+ "v2": true
+ }
+ },
+ "@aws-cdk/aws-lambda:recognizeVersionProps": {
+ "recommendedValue": true,
+ "explanation": "Enable this feature flag to opt in to the updated logical id calculation for Lambda Version created using the `fn.currentVersion`.",
+ "unconfiguredBehavesLike": {
+ "v2": true
+ }
+ },
+ "@aws-cdk/aws-lambda:recognizeLayerVersion": {
+ "recommendedValue": true,
+ "explanation": "Enable this feature flag to opt in to the updated logical id calculation for Lambda Version created using the `fn.currentVersion`."
+ },
+ "@aws-cdk/aws-cloudfront:defaultSecurityPolicyTLSv1.2_2021": {
+ "recommendedValue": true,
+ "explanation": "Enable this feature flag to have cloudfront distributions use the security policy TLSv1.2_2021 by default.",
+ "unconfiguredBehavesLike": {
+ "v2": true
+ }
+ },
+ "@aws-cdk/core:checkSecretUsage": {
+ "recommendedValue": true,
+ "explanation": "Enable this flag to make it impossible to accidentally use SecretValues in unsafe locations"
+ },
+ "@aws-cdk/core:target-partitions": {
+ "recommendedValue": [
+ "aws",
+ "aws-cn"
+ ],
+ "explanation": "What regions to include in lookup tables of environment agnostic stacks"
+ },
+ "@aws-cdk-containers/ecs-service-extensions:enableDefaultLogDriver": {
+ "recommendedValue": true,
+ "explanation": "ECS extensions will automatically add an `awslogs` driver if no logging is specified"
+ },
+ "@aws-cdk/aws-ec2:uniqueImdsv2TemplateName": {
+ "recommendedValue": true,
+ "explanation": "Enable this feature flag to have Launch Templates generated by the `InstanceRequireImdsv2Aspect` use unique names."
+ },
+ "@aws-cdk/aws-ecs:arnFormatIncludesClusterName": {
+ "recommendedValue": true,
+ "explanation": "ARN format used by ECS. In the new ARN format, the cluster name is part of the resource ID."
+ },
+ "@aws-cdk/aws-iam:minimizePolicies": {
+ "recommendedValue": true,
+ "explanation": "Minimize IAM policies by combining Statements"
+ },
+ "@aws-cdk/core:validateSnapshotRemovalPolicy": {
+ "recommendedValue": true,
+ "explanation": "Error on snapshot removal policies on resources that do not support it."
+ },
+ "@aws-cdk/aws-codepipeline:crossAccountKeyAliasStackSafeResourceName": {
+ "recommendedValue": true,
+ "explanation": "Generate key aliases that include the stack name"
+ },
+ "@aws-cdk/aws-s3:createDefaultLoggingPolicy": {
+ "recommendedValue": true,
+ "explanation": "Enable this feature flag to create an S3 bucket policy by default in cases where an AWS service would automatically create the Policy if one does not exist."
+ },
+ "@aws-cdk/aws-sns-subscriptions:restrictSqsDescryption": {
+ "recommendedValue": true,
+ "explanation": "Restrict KMS key policy for encrypted Queues a bit more"
+ },
+ "@aws-cdk/aws-apigateway:disableCloudWatchRole": {
+ "recommendedValue": true,
+ "explanation": "Make default CloudWatch Role behavior safe for multiple API Gateways in one environment"
+ },
+ "@aws-cdk/core:enablePartitionLiterals": {
+ "recommendedValue": true,
+ "explanation": "Make ARNs concrete if AWS partition is known"
+ },
+ "@aws-cdk/aws-events:eventsTargetQueueSameAccount": {
+ "recommendedValue": true,
+ "explanation": "Event Rules may only push to encrypted SQS queues in the same account"
+ },
+ "@aws-cdk/aws-ecs:disableExplicitDeploymentControllerForCircuitBreaker": {
+ "recommendedValue": true,
+ "explanation": "Avoid setting the \"ECS\" deployment controller when adding a circuit breaker"
+ },
+ "@aws-cdk/aws-iam:importedRoleStackSafeDefaultPolicyName": {
+ "recommendedValue": true,
+ "explanation": "Enable this feature to create default policy names for imported roles that depend on the stack the role is in."
+ },
+ "@aws-cdk/aws-s3:serverAccessLogsUseBucketPolicy": {
+ "recommendedValue": true,
+ "explanation": "Use S3 Bucket Policy instead of ACLs for Server Access Logging"
+ },
+ "@aws-cdk/aws-route53-patters:useCertificate": {
+ "recommendedValue": true,
+ "explanation": "Use the official `Certificate` resource instead of `DnsValidatedCertificate`"
+ },
+ "@aws-cdk/customresources:installLatestAwsSdkDefault": {
+ "recommendedValue": false,
+ "explanation": "Whether to install the latest SDK by default in AwsCustomResource"
+ },
+ "@aws-cdk/aws-rds:databaseProxyUniqueResourceName": {
+ "recommendedValue": true,
+ "explanation": "Use unique resource name for Database Proxy"
+ },
+ "@aws-cdk/aws-codedeploy:removeAlarmsFromDeploymentGroup": {
+ "recommendedValue": true,
+ "explanation": "Remove CloudWatch alarms from deployment group"
+ },
+ "@aws-cdk/aws-apigateway:authorizerChangeDeploymentLogicalId": {
+ "recommendedValue": true,
+ "explanation": "Include authorizer configuration in the calculation of the API deployment logical ID."
+ },
+ "@aws-cdk/aws-ec2:launchTemplateDefaultUserData": {
+ "recommendedValue": true,
+ "explanation": "Define user data for a launch template by default when a machine image is provided."
+ },
+ "@aws-cdk/aws-secretsmanager:useAttachedSecretResourcePolicyForSecretTargetAttachments": {
+ "recommendedValue": true,
+ "explanation": "SecretTargetAttachments uses the ResourcePolicy of the attached Secret."
+ },
+ "@aws-cdk/aws-redshift:columnId": {
+ "recommendedValue": true,
+ "explanation": "Whether to use an ID to track Redshift column changes"
+ },
+ "@aws-cdk/aws-stepfunctions-tasks:enableEmrServicePolicyV2": {
+ "recommendedValue": true,
+ "explanation": "Enable AmazonEMRServicePolicy_v2 managed policies"
+ },
+ "@aws-cdk/aws-ec2:restrictDefaultSecurityGroup": {
+ "recommendedValue": true,
+ "explanation": "Restrict access to the VPC default security group"
+ },
+ "@aws-cdk/aws-apigateway:requestValidatorUniqueId": {
+ "recommendedValue": true,
+ "explanation": "Generate a unique id for each RequestValidator added to a method"
+ },
+ "@aws-cdk/aws-kms:aliasNameRef": {
+ "recommendedValue": true,
+ "explanation": "KMS Alias name and keyArn will have implicit reference to KMS Key"
+ },
+ "@aws-cdk/aws-kms:applyImportedAliasPermissionsToPrincipal": {
+ "recommendedValue": true,
+ "explanation": "Enable grant methods on Aliases imported by name to use kms:ResourceAliases condition"
+ },
+ "@aws-cdk/aws-autoscaling:generateLaunchTemplateInsteadOfLaunchConfig": {
+ "recommendedValue": true,
+ "explanation": "Generate a launch template when creating an AutoScalingGroup"
+ },
+ "@aws-cdk/core:includePrefixInUniqueNameGeneration": {
+ "recommendedValue": true,
+ "explanation": "Include the stack prefix in the stack name generation process"
+ },
+ "@aws-cdk/aws-efs:denyAnonymousAccess": {
+ "recommendedValue": true,
+ "explanation": "EFS denies anonymous clients accesses"
+ },
+ "@aws-cdk/aws-opensearchservice:enableOpensearchMultiAzWithStandby": {
+ "recommendedValue": true,
+ "explanation": "Enables support for Multi-AZ with Standby deployment for opensearch domains"
+ },
+ "@aws-cdk/aws-lambda-nodejs:useLatestRuntimeVersion": {
+ "recommendedValue": true,
+ "explanation": "Enables aws-lambda-nodejs.Function to use the latest available NodeJs runtime as the default"
+ },
+ "@aws-cdk/aws-efs:mountTargetOrderInsensitiveLogicalId": {
+ "recommendedValue": true,
+ "explanation": "When enabled, mount targets will have a stable logicalId that is linked to the associated subnet."
+ },
+ "@aws-cdk/aws-rds:auroraClusterChangeScopeOfInstanceParameterGroupWithEachParameters": {
+ "recommendedValue": true,
+ "explanation": "When enabled, a scope of InstanceParameterGroup for AuroraClusterInstance with each parameters will change."
+ },
+ "@aws-cdk/aws-appsync:useArnForSourceApiAssociationIdentifier": {
+ "recommendedValue": true,
+ "explanation": "When enabled, will always use the arn for identifiers for CfnSourceApiAssociation in the GraphqlApi construct rather than id."
+ },
+ "@aws-cdk/aws-rds:preventRenderingDeprecatedCredentials": {
+ "recommendedValue": true,
+ "explanation": "When enabled, creating an RDS database cluster from a snapshot will only render credentials for snapshot credentials."
+ },
+ "@aws-cdk/aws-codepipeline-actions:useNewDefaultBranchForCodeCommitSource": {
+ "recommendedValue": true,
+ "explanation": "When enabled, the CodeCommit source action is using the default branch name 'main'."
+ },
+ "@aws-cdk/aws-cloudwatch-actions:changeLambdaPermissionLogicalIdForLambdaAction": {
+ "recommendedValue": true,
+ "explanation": "When enabled, the logical ID of a Lambda permission for a Lambda action includes an alarm ID."
+ },
+ "@aws-cdk/aws-codepipeline:crossAccountKeysDefaultValueToFalse": {
+ "recommendedValue": true,
+ "explanation": "Enables Pipeline to set the default value for crossAccountKeys to false."
+ },
+ "@aws-cdk/aws-codepipeline:defaultPipelineTypeToV2": {
+ "recommendedValue": true,
+ "explanation": "Enables Pipeline to set the default pipeline type to V2."
+ },
+ "@aws-cdk/aws-kms:reduceCrossAccountRegionPolicyScope": {
+ "recommendedValue": true,
+ "explanation": "When enabled, IAM Policy created from KMS key grant will reduce the resource scope to this key only."
+ },
+ "@aws-cdk/pipelines:reduceAssetRoleTrustScope": {
+ "recommendedValue": true,
+ "explanation": "Remove the root account principal from PipelineAssetsFileRole trust policy",
+ "unconfiguredBehavesLike": {
+ "v2": true
+ }
+ },
+ "@aws-cdk/aws-eks:nodegroupNameAttribute": {
+ "recommendedValue": true,
+ "explanation": "When enabled, nodegroupName attribute of the provisioned EKS NodeGroup will not have the cluster name prefix."
+ },
+ "@aws-cdk/aws-eks:useNativeOidcProvider": {
+ "recommendedValue": true,
+ "explanation": "When enabled, EKS V2 clusters will use the native OIDC provider resource AWS::IAM::OIDCProvider instead of creating the OIDCProvider with a custom resource (iam.OpenIDConnectProvider)."
+ },
+ "@aws-cdk/aws-ec2:ebsDefaultGp3Volume": {
+ "recommendedValue": true,
+ "explanation": "When enabled, the default volume type of the EBS volume will be GP3"
+ },
+ "@aws-cdk/aws-ecs:removeDefaultDeploymentAlarm": {
+ "recommendedValue": true,
+ "explanation": "When enabled, remove default deployment alarm settings"
+ },
+ "@aws-cdk/custom-resources:logApiResponseDataPropertyTrueDefault": {
+ "recommendedValue": false,
+ "explanation": "When enabled, the custom resource used for `AwsCustomResource` will configure the `logApiResponseData` property as true by default"
+ },
+ "@aws-cdk/aws-s3:keepNotificationInImportedBucket": {
+ "recommendedValue": false,
+ "explanation": "When enabled, Adding notifications to a bucket in the current stack will not remove notification from imported stack."
+ },
+ "@aws-cdk/aws-stepfunctions-tasks:useNewS3UriParametersForBedrockInvokeModelTask": {
+ "recommendedValue": true,
+ "explanation": "When enabled, use new props for S3 URI field in task definition of state machine for bedrock invoke model.",
+ "unconfiguredBehavesLike": {
+ "v2": true
+ }
+ },
+ "@aws-cdk/core:explicitStackTags": {
+ "recommendedValue": true,
+ "explanation": "When enabled, stack tags need to be assigned explicitly on a Stack."
+ },
+ "@aws-cdk/aws-ecs:reduceEc2FargateCloudWatchPermissions": {
+ "recommendedValue": true,
+ "explanation": "When enabled, we will only grant the necessary permissions when users specify cloudwatch log group through logConfiguration"
+ },
+ "@aws-cdk/aws-dynamodb:resourcePolicyPerReplica": {
+ "recommendedValue": true,
+ "explanation": "When enabled will allow you to specify a resource policy per replica, and not copy the source table policy to all replicas"
+ },
+ "@aws-cdk/aws-ec2:ec2SumTImeoutEnabled": {
+ "recommendedValue": true,
+ "explanation": "When enabled, initOptions.timeout and resourceSignalTimeout values will be summed together."
+ },
+ "@aws-cdk/aws-appsync:appSyncGraphQLAPIScopeLambdaPermission": {
+ "recommendedValue": true,
+ "explanation": "When enabled, a Lambda authorizer Permission created when using GraphqlApi will be properly scoped with a SourceArn."
+ },
+ "@aws-cdk/aws-rds:setCorrectValueForDatabaseInstanceReadReplicaInstanceResourceId": {
+ "recommendedValue": true,
+ "explanation": "When enabled, the value of property `instanceResourceId` in construct `DatabaseInstanceReadReplica` will be set to the correct value which is `DbiResourceId` instead of currently `DbInstanceArn`"
+ },
+ "@aws-cdk/core:cfnIncludeRejectComplexResourceUpdateCreatePolicyIntrinsics": {
+ "recommendedValue": true,
+ "explanation": "When enabled, CFN templates added with `cfn-include` will error if the template contains Resource Update or Create policies with CFN Intrinsics that include non-primitive values."
+ },
+ "@aws-cdk/aws-lambda-nodejs:sdkV3ExcludeSmithyPackages": {
+ "recommendedValue": true,
+ "explanation": "When enabled, both `@aws-sdk` and `@smithy` packages will be excluded from the Lambda Node.js 18.x runtime to prevent version mismatches in bundled applications."
+ },
+ "@aws-cdk/aws-stepfunctions-tasks:fixRunEcsTaskPolicy": {
+ "recommendedValue": true,
+ "explanation": "When enabled, the resource of IAM Run Ecs policy generated by SFN EcsRunTask will reference the definition, instead of constructing ARN."
+ },
+ "@aws-cdk/aws-ec2:bastionHostUseAmazonLinux2023ByDefault": {
+ "recommendedValue": true,
+ "explanation": "When enabled, the BastionHost construct will use the latest Amazon Linux 2023 AMI, instead of Amazon Linux 2."
+ },
+ "@aws-cdk/core:aspectStabilization": {
+ "recommendedValue": true,
+ "explanation": "When enabled, a stabilization loop will be run when invoking Aspects during synthesis.",
+ "unconfiguredBehavesLike": {
+ "v2": true
+ }
+ },
+ "@aws-cdk/aws-route53-targets:userPoolDomainNameMethodWithoutCustomResource": {
+ "recommendedValue": true,
+ "explanation": "When enabled, use a new method for DNS Name of user pool domain target without creating a custom resource."
+ },
+ "@aws-cdk/aws-elasticloadbalancingV2:albDualstackWithoutPublicIpv4SecurityGroupRulesDefault": {
+ "recommendedValue": true,
+ "explanation": "When enabled, the default security group ingress rules will allow IPv6 ingress from anywhere"
+ },
+ "@aws-cdk/aws-iam:oidcRejectUnauthorizedConnections": {
+ "recommendedValue": true,
+ "explanation": "When enabled, the default behaviour of OIDC provider will reject unauthorized connections"
+ },
+ "@aws-cdk/core:enableAdditionalMetadataCollection": {
+ "recommendedValue": true,
+ "explanation": "When enabled, CDK will expand the scope of usage data collected to better inform CDK development and improve communication for security concerns and emerging issues."
+ },
+ "@aws-cdk/aws-lambda:createNewPoliciesWithAddToRolePolicy": {
+ "recommendedValue": false,
+ "explanation": "[Deprecated] When enabled, Lambda will create new inline policies with AddToRolePolicy instead of adding to the Default Policy Statement"
+ },
+ "@aws-cdk/aws-s3:setUniqueReplicationRoleName": {
+ "recommendedValue": true,
+ "explanation": "When enabled, CDK will automatically generate a unique role name that is used for s3 object replication."
+ },
+ "@aws-cdk/pipelines:reduceStageRoleTrustScope": {
+ "recommendedValue": true,
+ "explanation": "Remove the root account principal from Stage addActions trust policy",
+ "unconfiguredBehavesLike": {
+ "v2": true
+ }
+ },
+ "@aws-cdk/aws-events:requireEventBusPolicySid": {
+ "recommendedValue": true,
+ "explanation": "When enabled, grantPutEventsTo() will use resource policies with Statement IDs for service principals."
+ },
+ "@aws-cdk/core:aspectPrioritiesMutating": {
+ "recommendedValue": true,
+ "explanation": "When set to true, Aspects added by the construct library on your behalf will be given a priority of MUTATING."
+ },
+ "@aws-cdk/aws-dynamodb:retainTableReplica": {
+ "recommendedValue": true,
+ "explanation": "When enabled, table replica will be default to the removal policy of source table unless specified otherwise."
+ },
+ "@aws-cdk/cognito:logUserPoolClientSecretValue": {
+ "recommendedValue": false,
+ "explanation": "When disabled, the value of the user pool client secret will not be logged in the custom resource lambda function logs."
+ },
+ "@aws-cdk/pipelines:reduceCrossAccountActionRoleTrustScope": {
+ "recommendedValue": true,
+ "explanation": "When enabled, scopes down the trust policy for the cross-account action role",
+ "unconfiguredBehavesLike": {
+ "v2": true
+ }
+ },
+ "@aws-cdk/aws-stepfunctions:useDistributedMapResultWriterV2": {
+ "recommendedValue": true,
+ "explanation": "When enabled, the resultWriterV2 property of DistributedMap will be used insted of resultWriter"
+ },
+ "@aws-cdk/s3-notifications:addS3TrustKeyPolicyForSnsSubscriptions": {
+ "recommendedValue": true,
+ "explanation": "Add an S3 trust policy to a KMS key resource policy for SNS subscriptions."
+ },
+ "@aws-cdk/aws-ec2:requirePrivateSubnetsForEgressOnlyInternetGateway": {
+ "recommendedValue": true,
+ "explanation": "When enabled, the EgressOnlyGateway resource is only created if private subnets are defined in the dual-stack VPC."
+ },
+ "@aws-cdk/aws-ec2-alpha:useResourceIdForVpcV2Migration": {
+ "recommendedValue": false,
+ "explanation": "When enabled, use resource IDs for VPC V2 migration"
+ },
+ "@aws-cdk/aws-s3:publicAccessBlockedByDefault": {
+ "recommendedValue": true,
+ "explanation": "When enabled, setting any combination of options for BlockPublicAccess will automatically set true for any options not defined."
+ },
+ "@aws-cdk/aws-lambda:useCdkManagedLogGroup": {
+ "recommendedValue": true,
+ "explanation": "When enabled, CDK creates and manages loggroup for the lambda function"
+ },
+ "@aws-cdk/aws-elasticloadbalancingv2:networkLoadBalancerWithSecurityGroupByDefault": {
+ "recommendedValue": true,
+ "explanation": "When enabled, Network Load Balancer will be created with a security group by default."
+ },
+ "@aws-cdk/aws-stepfunctions-tasks:httpInvokeDynamicJsonPathEndpoint": {
+ "recommendedValue": true,
+ "explanation": "When enabled, allows using a dynamic apiEndpoint with JSONPath format in HttpInvoke tasks.",
+ "unconfiguredBehavesLike": {
+ "v2": true
+ }
+ },
+ "@aws-cdk/aws-ecs-patterns:uniqueTargetGroupId": {
+ "recommendedValue": true,
+ "explanation": "When enabled, ECS patterns will generate unique target group IDs to prevent conflicts during load balancer replacement"
+ },
+ "@aws-cdk/aws-route53-patterns:useDistribution": {
+ "recommendedValue": true,
+ "explanation": "Use the `Distribution` resource instead of `CloudFrontWebDistribution`"
+ },
+ "@aws-cdk/aws-cloudfront:defaultFunctionRuntimeV2_0": {
+ "recommendedValue": true,
+ "explanation": "Use cloudfront-js-2.0 as the default runtime for CloudFront Functions"
+ },
+ "@aws-cdk/aws-elasticloadbalancingv2:usePostQuantumTlsPolicy": {
+ "recommendedValue": true,
+ "explanation": "When enabled, HTTPS/TLS listeners use post-quantum TLS policy by default"
+ },
+ "@aws-cdk/core:automaticL1Traits": {
+ "recommendedValue": true,
+ "explanation": "Automatically use the default L1 traits for L1 constructs`",
+ "unconfiguredBehavesLike": {
+ "v2": true
+ }
+ },
+ "@aws-cdk/aws-batch:defaultToAL2023": {
+ "recommendedValue": true,
+ "explanation": "Use AL2023 as the default imageType for EC2 Batch compute environments instead of the deprecated AL2"
+ },
+ "@aws-cdk/aws-eks:defaultToAL2023": {
+ "recommendedValue": true,
+ "explanation": "Use AL2023 as the default AMI type for EKS managed node groups using non-GPU instance types instead of the deprecated AL2"
+ },
+ "@aws-cdk/core:annotationsInValidationReport": {
+ "recommendedValue": true,
+ "explanation": "Include construct annotations (warnings and errors) in the policy validation report"
+ },
+ "@aws-cdk/core:defaultCrossStackReferences": {
+ "recommendedValue": "weak",
+ "explanation": "Controls whether cross-stack references are strong, weak, or both",
+ "unconfiguredBehavesLike": {
+ "v2": "strong"
+ }
+ },
+ "@aws-cdk/core:validateAgainstDefaultRules": {
+ "recommendedValue": true,
+ "explanation": "Treat CloudFormation Validate findings as errors"
+ },
+ "@aws-cdk/aws-ecs:removeEmptyLoadBalancers": {
+ "recommendedValue": true,
+ "explanation": "Render an empty `LoadBalancers` array on an ECS service that has no target groups"
+ }
+ }
+ }
+ }
+ },
+ "minimumCliVersion": "2.1144.0"
+}
\ No newline at end of file
diff --git a/cdk/cdk.out/tree.json b/cdk/cdk.out/tree.json
new file mode 100644
index 0000000..f045dff
--- /dev/null
+++ b/cdk/cdk.out/tree.json
@@ -0,0 +1 @@
+{"version":"tree-0.1","tree":{"id":"App","path":"","constructInfo":{"fqn":"aws-cdk-lib.App","version":"2.272.0"},"children":{"BetaSupplierSiteStack":{"id":"BetaSupplierSiteStack","path":"BetaSupplierSiteStack","constructInfo":{"fqn":"aws-cdk-lib.Stack","version":"2.272.0"},"children":{"BetaSupplierSiteBucket":{"id":"BetaSupplierSiteBucket","path":"BetaSupplierSiteStack/BetaSupplierSiteBucket","constructInfo":{"fqn":"aws-cdk-lib.aws_s3.Bucket","version":"2.272.0"},"children":{"Resource":{"id":"Resource","path":"BetaSupplierSiteStack/BetaSupplierSiteBucket/Resource","constructInfo":{"fqn":"aws-cdk-lib.aws_s3.CfnBucket","version":"2.272.0"},"attributes":{"aws:cdk:cloudformation:type":"AWS::S3::Bucket","aws:cdk:cloudformation:logicalId":"BetaSupplierSiteBucketC3053F9A","aws:cdk:cloudformation:props":{"bucketEncryption":{"serverSideEncryptionConfiguration":[{"serverSideEncryptionByDefault":{"sseAlgorithm":"AES256"}}]},"bucketName":"betasuppliersite-764709663363-ap-south-2","publicAccessBlockConfiguration":{"blockPublicAcls":true,"blockPublicPolicy":true,"ignorePublicAcls":true,"restrictPublicBuckets":true},"tags":[{"key":"aws-cdk:auto-delete-objects","value":"true"}]}}},"Policy":{"id":"Policy","path":"BetaSupplierSiteStack/BetaSupplierSiteBucket/Policy","constructInfo":{"fqn":"aws-cdk-lib.aws_s3.BucketPolicy","version":"2.272.0"},"children":{"Resource":{"id":"Resource","path":"BetaSupplierSiteStack/BetaSupplierSiteBucket/Policy/Resource","constructInfo":{"fqn":"aws-cdk-lib.aws_s3.CfnBucketPolicy","version":"2.272.0"},"attributes":{"aws:cdk:cloudformation:type":"AWS::S3::BucketPolicy","aws:cdk:cloudformation:logicalId":"BetaSupplierSiteBucketPolicy7E1C9F1E","aws:cdk:cloudformation:props":{"bucket":{"Ref":"BetaSupplierSiteBucketC3053F9A"},"policyDocument":{"Statement":[{"Action":["s3:PutBucketPolicy","s3:GetBucket*","s3:List*","s3:DeleteObject*"],"Effect":"Allow","Principal":{"AWS":{"Fn::GetAtt":["CustomS3AutoDeleteObjectsCustomResourceProviderRole3B1BD092","Arn"]}},"Resource":[{"Fn::GetAtt":["BetaSupplierSiteBucketC3053F9A","Arn"]},{"Fn::Join":["",[{"Fn::GetAtt":["BetaSupplierSiteBucketC3053F9A","Arn"]},"/*"]]}]},{"Action":"s3:GetObject","Condition":{"StringEquals":{"AWS:SourceArn":{"Fn::Join":["",["arn:",{"Ref":"AWS::Partition"},":cloudfront::",{"Ref":"AWS::AccountId"},":distribution/",{"Ref":"BetaSupplierSiteDistributionD03E58A9"}]]}}},"Effect":"Allow","Principal":{"Service":"cloudfront.amazonaws.com"},"Resource":{"Fn::Join":["",[{"Fn::GetAtt":["BetaSupplierSiteBucketC3053F9A","Arn"]},"/*"]]}}],"Version":"2012-10-17"}}}}}},"AutoDeleteObjectsCustomResource":{"id":"AutoDeleteObjectsCustomResource","path":"BetaSupplierSiteStack/BetaSupplierSiteBucket/AutoDeleteObjectsCustomResource","constructInfo":{"fqn":"aws-cdk-lib.CustomResource","version":"2.272.0"},"children":{"Default":{"id":"Default","path":"BetaSupplierSiteStack/BetaSupplierSiteBucket/AutoDeleteObjectsCustomResource/Default","constructInfo":{"fqn":"aws-cdk-lib.CfnResource","version":"2.272.0"}}}}}},"Custom::S3AutoDeleteObjectsCustomResourceProvider":{"id":"Custom::S3AutoDeleteObjectsCustomResourceProvider","path":"BetaSupplierSiteStack/Custom::S3AutoDeleteObjectsCustomResourceProvider","constructInfo":{"fqn":"aws-cdk-lib.CustomResourceProviderBase","version":"2.272.0"},"children":{"Staging":{"id":"Staging","path":"BetaSupplierSiteStack/Custom::S3AutoDeleteObjectsCustomResourceProvider/Staging","constructInfo":{"fqn":"aws-cdk-lib.AssetStaging","version":"2.272.0"}},"Role":{"id":"Role","path":"BetaSupplierSiteStack/Custom::S3AutoDeleteObjectsCustomResourceProvider/Role","constructInfo":{"fqn":"aws-cdk-lib.CfnResource","version":"2.272.0"}},"Handler":{"id":"Handler","path":"BetaSupplierSiteStack/Custom::S3AutoDeleteObjectsCustomResourceProvider/Handler","constructInfo":{"fqn":"aws-cdk-lib.CfnResource","version":"2.272.0"}}}},"TradhoxZone":{"id":"TradhoxZone","path":"BetaSupplierSiteStack/TradhoxZone","constructInfo":{"fqn":"aws-cdk-lib.Resource","version":"2.272.0"}},"SiteCertificate":{"id":"SiteCertificate","path":"BetaSupplierSiteStack/SiteCertificate","constructInfo":{"fqn":"aws-cdk-lib.aws_certificatemanager.DnsValidatedCertificate","version":"2.272.0"},"children":{"CertificateRequestorFunction":{"id":"CertificateRequestorFunction","path":"BetaSupplierSiteStack/SiteCertificate/CertificateRequestorFunction","constructInfo":{"fqn":"aws-cdk-lib.aws_lambda.Function","version":"2.272.0"},"children":{"ServiceRole":{"id":"ServiceRole","path":"BetaSupplierSiteStack/SiteCertificate/CertificateRequestorFunction/ServiceRole","constructInfo":{"fqn":"aws-cdk-lib.aws_iam.Role","version":"2.272.0"},"children":{"Resource":{"id":"Resource","path":"BetaSupplierSiteStack/SiteCertificate/CertificateRequestorFunction/ServiceRole/Resource","constructInfo":{"fqn":"aws-cdk-lib.aws_iam.CfnRole","version":"2.272.0"},"attributes":{"aws:cdk:cloudformation:type":"AWS::IAM::Role","aws:cdk:cloudformation:logicalId":"SiteCertificateCertificateRequestorFunctionServiceRole645E891D","aws:cdk:cloudformation:props":{"assumeRolePolicyDocument":{"Statement":[{"Action":"sts:AssumeRole","Effect":"Allow","Principal":{"Service":"lambda.amazonaws.com"}}],"Version":"2012-10-17"},"managedPolicyArns":[{"Fn::Join":["",["arn:",{"Ref":"AWS::Partition"},":iam::aws:policy/service-role/AWSLambdaBasicExecutionRole"]]}]}}},"DefaultPolicy":{"id":"DefaultPolicy","path":"BetaSupplierSiteStack/SiteCertificate/CertificateRequestorFunction/ServiceRole/DefaultPolicy","constructInfo":{"fqn":"aws-cdk-lib.aws_iam.Policy","version":"2.272.0"},"children":{"Resource":{"id":"Resource","path":"BetaSupplierSiteStack/SiteCertificate/CertificateRequestorFunction/ServiceRole/DefaultPolicy/Resource","constructInfo":{"fqn":"aws-cdk-lib.aws_iam.CfnPolicy","version":"2.272.0"},"attributes":{"aws:cdk:cloudformation:type":"AWS::IAM::Policy","aws:cdk:cloudformation:logicalId":"SiteCertificateCertificateRequestorFunctionServiceRoleDefaultPolicy96ED5C9C","aws:cdk:cloudformation:props":{"policyDocument":{"Statement":[{"Action":["acm:RequestCertificate","acm:DescribeCertificate","acm:DeleteCertificate","acm:AddTagsToCertificate"],"Effect":"Allow","Resource":"*"},{"Action":"route53:GetChange","Effect":"Allow","Resource":"*"},{"Action":"route53:changeResourceRecordSets","Condition":{"ForAllValues:StringEquals":{"route53:ChangeResourceRecordSetsRecordTypes":["CNAME"],"route53:ChangeResourceRecordSetsActions":["UPSERT"]},"ForAllValues:StringLike":{"route53:ChangeResourceRecordSetsNormalizedRecordNames":["*.betapartners.tradhox.com"]}},"Effect":"Allow","Resource":{"Fn::Join":["",["arn:",{"Ref":"AWS::Partition"},":route53:::hostedzone/Z05079927Q6UCDIWAH4E"]]}}],"Version":"2012-10-17"},"policyName":"SiteCertificateCertificateRequestorFunctionServiceRoleDefaultPolicy96ED5C9C","roles":[{"Ref":"SiteCertificateCertificateRequestorFunctionServiceRole645E891D"}]}}}}}}},"Code":{"id":"Code","path":"BetaSupplierSiteStack/SiteCertificate/CertificateRequestorFunction/Code","constructInfo":{"fqn":"aws-cdk-lib.aws_s3_assets.Asset","version":"2.272.0"},"children":{"Stage":{"id":"Stage","path":"BetaSupplierSiteStack/SiteCertificate/CertificateRequestorFunction/Code/Stage","constructInfo":{"fqn":"aws-cdk-lib.AssetStaging","version":"2.272.0"}},"AssetBucket":{"id":"AssetBucket","path":"BetaSupplierSiteStack/SiteCertificate/CertificateRequestorFunction/Code/AssetBucket","constructInfo":{"fqn":"aws-cdk-lib.aws_s3.BucketBase","version":"2.272.0"}}}},"Resource":{"id":"Resource","path":"BetaSupplierSiteStack/SiteCertificate/CertificateRequestorFunction/Resource","constructInfo":{"fqn":"aws-cdk-lib.aws_lambda.CfnFunction","version":"2.272.0"},"attributes":{"aws:cdk:cloudformation:type":"AWS::Lambda::Function","aws:cdk:cloudformation:logicalId":"SiteCertificateCertificateRequestorFunction7CFA7DEA","aws:cdk:cloudformation:props":{"code":{"s3Bucket":"cdk-hnb659fds-assets-764709663363-ap-south-2","s3Key":"ffb21b7e396cc684c46812aea1d2ff7ea22401e05038c047ae9f071082c68586.zip"},"handler":"index.certificateRequestHandler","role":{"Fn::GetAtt":["SiteCertificateCertificateRequestorFunctionServiceRole645E891D","Arn"]},"runtime":"nodejs24.x","timeout":900}}}}},"CertificateRequestorResource":{"id":"CertificateRequestorResource","path":"BetaSupplierSiteStack/SiteCertificate/CertificateRequestorResource","constructInfo":{"fqn":"aws-cdk-lib.CustomResource","version":"2.272.0"},"children":{"Default":{"id":"Default","path":"BetaSupplierSiteStack/SiteCertificate/CertificateRequestorResource/Default","constructInfo":{"fqn":"aws-cdk-lib.CfnResource","version":"2.272.0"}}}}}},"BetaSupplierSiteDistribution":{"id":"BetaSupplierSiteDistribution","path":"BetaSupplierSiteStack/BetaSupplierSiteDistribution","constructInfo":{"fqn":"aws-cdk-lib.aws_cloudfront.Distribution","version":"2.272.0"},"children":{"Origin1":{"id":"Origin1","path":"BetaSupplierSiteStack/BetaSupplierSiteDistribution/Origin1","constructInfo":{"fqn":"constructs.Construct","version":"10.8.1"},"children":{"S3OriginAccessControl":{"id":"S3OriginAccessControl","path":"BetaSupplierSiteStack/BetaSupplierSiteDistribution/Origin1/S3OriginAccessControl","constructInfo":{"fqn":"aws-cdk-lib.aws_cloudfront.S3OriginAccessControl","version":"2.272.0"},"children":{"Resource":{"id":"Resource","path":"BetaSupplierSiteStack/BetaSupplierSiteDistribution/Origin1/S3OriginAccessControl/Resource","constructInfo":{"fqn":"aws-cdk-lib.aws_cloudfront.CfnOriginAccessControl","version":"2.272.0"},"attributes":{"aws:cdk:cloudformation:type":"AWS::CloudFront::OriginAccessControl","aws:cdk:cloudformation:logicalId":"BetaSupplierSiteDistributionOrigin1S3OriginAccessControlF9377C01","aws:cdk:cloudformation:props":{"originAccessControlConfig":{"name":"BetaSupplierSiteStackBetaSupOrigin1S3OriginAccessControl50127AEA","signingBehavior":"always","signingProtocol":"sigv4","originAccessControlOriginType":"s3"}}}}}}}},"Origin2":{"id":"Origin2","path":"BetaSupplierSiteStack/BetaSupplierSiteDistribution/Origin2","constructInfo":{"fqn":"constructs.Construct","version":"10.8.1"}},"Resource":{"id":"Resource","path":"BetaSupplierSiteStack/BetaSupplierSiteDistribution/Resource","constructInfo":{"fqn":"aws-cdk-lib.aws_cloudfront.CfnDistribution","version":"2.272.0"},"attributes":{"aws:cdk:cloudformation:type":"AWS::CloudFront::Distribution","aws:cdk:cloudformation:logicalId":"BetaSupplierSiteDistributionD03E58A9","aws:cdk:cloudformation:props":{"distributionConfig":{"enabled":true,"origins":[{"domainName":{"Fn::GetAtt":["BetaSupplierSiteBucketC3053F9A","RegionalDomainName"]},"id":"BetaSupplierSiteStackBetaSupplierSiteDistributionOrigin118CF032F","s3OriginConfig":{"originAccessIdentity":""},"originAccessControlId":{"Fn::GetAtt":["BetaSupplierSiteDistributionOrigin1S3OriginAccessControlF9377C01","Id"]}},{"domainName":"betapartner-api.tradhox.com","id":"BetaSupplierSiteStackBetaSupplierSiteDistributionOrigin26FE0C2F5","customOriginConfig":{"originSslProtocols":["TLSv1.2"],"originProtocolPolicy":"http-only","httpPort":8080}}],"defaultCacheBehavior":{"pathPattern":"*","targetOriginId":"BetaSupplierSiteStackBetaSupplierSiteDistributionOrigin118CF032F","allowedMethods":["GET","HEAD"],"cachedMethods":["GET","HEAD"],"cachePolicyId":"658327ea-f89d-4fab-a63d-7e88639e58f6","compress":true,"viewerProtocolPolicy":"redirect-to-https"},"aliases":["betapartners.tradhox.com"],"cacheBehaviors":[{"pathPattern":"/api/*","targetOriginId":"BetaSupplierSiteStackBetaSupplierSiteDistributionOrigin26FE0C2F5","allowedMethods":["GET","HEAD","OPTIONS","PUT","PATCH","POST","DELETE"],"cachePolicyId":"4135ea2d-6df8-44a3-9df3-4b5a84be39ad","compress":true,"originRequestPolicyId":"216adef6-5c7f-47e4-b989-5492eafa07d3","viewerProtocolPolicy":"redirect-to-https"}],"customErrorResponses":[{"errorCachingMinTtl":0,"errorCode":404,"responseCode":200,"responsePagePath":"/index.html"},{"errorCachingMinTtl":0,"errorCode":403,"responseCode":200,"responsePagePath":"/index.html"}],"defaultRootObject":"index.html","httpVersion":"http2","ipv6Enabled":true,"viewerCertificate":{"acmCertificateArn":{"Fn::GetAtt":["SiteCertificateCertificateRequestorResource6021082A","Arn"]},"minimumProtocolVersion":"TLSv1.2_2021","sslSupportMethod":"sni-only"}}}}}}},"BetaSupplierSiteBucketName":{"id":"BetaSupplierSiteBucketName","path":"BetaSupplierSiteStack/BetaSupplierSiteBucketName","constructInfo":{"fqn":"aws-cdk-lib.CfnOutput","version":"2.272.0"}},"BetaSupplierSiteCloudFrontDomainName":{"id":"BetaSupplierSiteCloudFrontDomainName","path":"BetaSupplierSiteStack/BetaSupplierSiteCloudFrontDomainName","constructInfo":{"fqn":"aws-cdk-lib.CfnOutput","version":"2.272.0"}},"SiteAliasRecord":{"id":"SiteAliasRecord","path":"BetaSupplierSiteStack/SiteAliasRecord","constructInfo":{"fqn":"aws-cdk-lib.aws_route53.ARecord","version":"2.272.0"},"children":{"Resource":{"id":"Resource","path":"BetaSupplierSiteStack/SiteAliasRecord/Resource","constructInfo":{"fqn":"aws-cdk-lib.aws_route53.CfnRecordSet","version":"2.272.0"},"attributes":{"aws:cdk:cloudformation:type":"AWS::Route53::RecordSet","aws:cdk:cloudformation:logicalId":"SiteAliasRecord3C0AF5BF","aws:cdk:cloudformation:props":{"aliasTarget":{"hostedZoneId":{"Fn::FindInMap":["AWSCloudFrontPartitionHostedZoneIdMap",{"Ref":"AWS::Partition"},"zoneId"]},"dnsName":{"Fn::GetAtt":["BetaSupplierSiteDistributionD03E58A9","DomainName"]}},"hostedZoneId":"Z05079927Q6UCDIWAH4E","name":"betapartners.tradhox.com.","type":"A"}}}}},"AWSCloudFrontPartitionHostedZoneIdMap":{"id":"AWSCloudFrontPartitionHostedZoneIdMap","path":"BetaSupplierSiteStack/AWSCloudFrontPartitionHostedZoneIdMap","constructInfo":{"fqn":"aws-cdk-lib.CfnMapping","version":"2.272.0"}},"CDKMetadata":{"id":"CDKMetadata","path":"BetaSupplierSiteStack/CDKMetadata","constructInfo":{"fqn":"constructs.Construct","version":"10.8.1"},"children":{"Default":{"id":"Default","path":"BetaSupplierSiteStack/CDKMetadata/Default","constructInfo":{"fqn":"aws-cdk-lib.CfnResource","version":"2.272.0"}}}},"BootstrapVersion":{"id":"BootstrapVersion","path":"BetaSupplierSiteStack/BootstrapVersion","constructInfo":{"fqn":"aws-cdk-lib.CfnParameter","version":"2.272.0"}},"CheckBootstrapVersion":{"id":"CheckBootstrapVersion","path":"BetaSupplierSiteStack/CheckBootstrapVersion","constructInfo":{"fqn":"aws-cdk-lib.CfnRule","version":"2.272.0"}}}},"Tree":{"id":"Tree","path":"Tree","constructInfo":{"fqn":"constructs.Construct","version":"10.8.1"}}}}}
\ No newline at end of file
diff --git a/cdk/cdk.out/validation-report.json b/cdk/cdk.out/validation-report.json
new file mode 100644
index 0000000..6592032
--- /dev/null
+++ b/cdk/cdk.out/validation-report.json
@@ -0,0 +1,5 @@
+{
+ "version": "54.0.0",
+ "title": "Validation Report",
+ "pluginReports": []
+}
\ No newline at end of file
diff --git a/package-lock.json b/package-lock.json
index f8abdc1..9a95858 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -13,7 +13,8 @@
"lucide-react": "^0.475.0",
"react": "^19.0.0",
"react-dom": "^19.0.0",
- "react-router-dom": "^6.28.0"
+ "react-router-dom": "^6.28.0",
+ "selenium-webdriver": "^4.50.0"
},
"devDependencies": {
"@tailwindcss/vite": "^4.3.3",
@@ -22,12 +23,69 @@
"@types/react-dom": "^19.0.0",
"@vitejs/plugin-react": "^4.3.4",
"autoprefixer": "^10.6.1",
+ "aws-cdk-lib": "^2.272.0",
+ "constructs": "^10.8.1",
"postcss": "^8.5.28",
+ "source-map-support": "^0.5.21",
"tailwindcss": "^4.3.3",
+ "ts-node": "^10.9.2",
"typescript": "~5.7.2",
"vite": "^6.0.0"
}
},
+ "node_modules/@aws-cdk/asset-awscli-v1": {
+ "version": "2.2.292",
+ "resolved": "https://registry.npmjs.org/@aws-cdk/asset-awscli-v1/-/asset-awscli-v1-2.2.292.tgz",
+ "integrity": "sha512-d4aMFsAFj19FtxVyw8IzlUKv5Zu4sIvgnEjI2IU6IWBJgVbJ4aFnadANqYa+6MwB1CQbGOg0jh8WE77M+Nb/9A==",
+ "dev": true,
+ "license": "Apache-2.0"
+ },
+ "node_modules/@aws-cdk/asset-node-proxy-agent-v6": {
+ "version": "2.1.3",
+ "resolved": "https://registry.npmjs.org/@aws-cdk/asset-node-proxy-agent-v6/-/asset-node-proxy-agent-v6-2.1.3.tgz",
+ "integrity": "sha512-98We1QWfin9vtuuQtNFhIIAEWb8CreyYTAP0Vn8HqSBoNiFJM9nZgifJeQawT9Wq0NX1HCNFlxCyTccIrK1PSA==",
+ "dev": true,
+ "license": "Apache-2.0"
+ },
+ "node_modules/@aws-cdk/cloud-assembly-schema": {
+ "version": "54.26.0",
+ "resolved": "https://registry.npmjs.org/@aws-cdk/cloud-assembly-schema/-/cloud-assembly-schema-54.26.0.tgz",
+ "integrity": "sha512-zYI3XhQ/bpuSXuPaF77f7u2q6rZBPwdrPh8a0v+e/B3IxbRQAtQv0fmacQ8uYh9RPVuIVnExE6IsFJBSALH7BA==",
+ "bundleDependencies": [
+ "jsonschema",
+ "semver"
+ ],
+ "dev": true,
+ "license": "Apache-2.0",
+ "dependencies": {
+ "jsonschema": "^1.5.0",
+ "semver": "^7.8.5"
+ },
+ "engines": {
+ "node": ">= 18.0.0"
+ }
+ },
+ "node_modules/@aws-cdk/cloud-assembly-schema/node_modules/jsonschema": {
+ "version": "1.5.0",
+ "dev": true,
+ "inBundle": true,
+ "license": "MIT",
+ "engines": {
+ "node": "*"
+ }
+ },
+ "node_modules/@aws-cdk/cloud-assembly-schema/node_modules/semver": {
+ "version": "7.8.5",
+ "dev": true,
+ "inBundle": true,
+ "license": "ISC",
+ "bin": {
+ "semver": "bin/semver.js"
+ },
+ "engines": {
+ "node": ">=10"
+ }
+ },
"node_modules/@babel/code-frame": {
"version": "7.29.7",
"resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.29.7.tgz",
@@ -310,6 +368,36 @@
"node": ">=6.9.0"
}
},
+ "node_modules/@bazel/runfiles": {
+ "version": "6.5.0",
+ "resolved": "https://registry.npmjs.org/@bazel/runfiles/-/runfiles-6.5.0.tgz",
+ "integrity": "sha512-RzahvqTkfpY2jsDxo8YItPX+/iZ6hbiikw1YhE0bA9EKBR5Og8Pa6FHn9PO9M0zaXRVsr0GFQLKbB/0rzy9SzA==",
+ "license": "Apache-2.0"
+ },
+ "node_modules/@cspotcode/source-map-support": {
+ "version": "0.8.1",
+ "resolved": "https://registry.npmjs.org/@cspotcode/source-map-support/-/source-map-support-0.8.1.tgz",
+ "integrity": "sha512-IchNf6dN4tHoMFIn/7OE8LWZ19Y6q/67Bmf6vnGREv8RSbBVb9LPJxEcnwrcwX6ixSvaiGoomAUvu4YSxXrVgw==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "@jridgewell/trace-mapping": "0.3.9"
+ },
+ "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,
+ "license": "MIT",
+ "dependencies": {
+ "@jridgewell/resolve-uri": "^3.0.3",
+ "@jridgewell/sourcemap-codec": "^1.4.10"
+ }
+ },
"node_modules/@esbuild/aix-ppc64": {
"version": "0.25.12",
"resolved": "https://registry.npmjs.org/@esbuild/aix-ppc64/-/aix-ppc64-0.25.12.tgz",
@@ -1466,6 +1554,34 @@
"vite": "^5.2.0 || ^6 || ^7 || ^8"
}
},
+ "node_modules/@tsconfig/node10": {
+ "version": "1.0.13",
+ "resolved": "https://registry.npmjs.org/@tsconfig/node10/-/node10-1.0.13.tgz",
+ "integrity": "sha512-gcLdvR9HO1ZJBypsOGqaP6TFEzb6vIta0KSTLt9NAQ6pXQO3cRgSVyCN6pzYqI9DlJgY71XKO0dpDhCf08b3pg==",
+ "dev": true,
+ "license": "MIT"
+ },
+ "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,
+ "license": "MIT"
+ },
+ "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,
+ "license": "MIT"
+ },
+ "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,
+ "license": "MIT"
+ },
"node_modules/@types/babel__core": {
"version": "7.20.5",
"resolved": "https://registry.npmjs.org/@types/babel__core/-/babel__core-7.20.5.tgz",
@@ -1569,6 +1685,39 @@
"vite": "^4.2.0 || ^5.0.0 || ^6.0.0 || ^7.0.0"
}
},
+ "node_modules/acorn": {
+ "version": "8.18.0",
+ "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.18.0.tgz",
+ "integrity": "sha512-lGq+9yr1/GuAWaVYIHRjvvySG5/4VfKIvC8EWxStPdcDh/Ka7FG3twP6v4d5BkravUilhIAsG4Qj83t02LWUPQ==",
+ "dev": true,
+ "license": "MIT",
+ "bin": {
+ "acorn": "bin/acorn"
+ },
+ "engines": {
+ "node": ">=0.4.0"
+ }
+ },
+ "node_modules/acorn-walk": {
+ "version": "8.3.5",
+ "resolved": "https://registry.npmjs.org/acorn-walk/-/acorn-walk-8.3.5.tgz",
+ "integrity": "sha512-HEHNfbars9v4pgpW6SO1KSPkfoS0xVOM/9UzkJltjlsHZmJasxg8aXkuZa7SMf8vKGIBhpUsPluQSqhJFCqebw==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "acorn": "^8.11.0"
+ },
+ "engines": {
+ "node": ">=0.4.0"
+ }
+ },
+ "node_modules/arg": {
+ "version": "4.1.3",
+ "resolved": "https://registry.npmjs.org/arg/-/arg-4.1.3.tgz",
+ "integrity": "sha512-58S9QDqG0Xx27YwPSt9fJxivjYl432YCwfDMfZ+71RAqUrZef7LrKQZ3LHLOwCS4FLNBplP533Zx895SeOCHvA==",
+ "dev": true,
+ "license": "MIT"
+ },
"node_modules/autoprefixer": {
"version": "10.6.1",
"resolved": "https://registry.npmjs.org/autoprefixer/-/autoprefixer-10.6.1.tgz",
@@ -1606,6 +1755,236 @@
"postcss": "^8.1.0"
}
},
+ "node_modules/aws-cdk-lib": {
+ "version": "2.272.0",
+ "resolved": "https://registry.npmjs.org/aws-cdk-lib/-/aws-cdk-lib-2.272.0.tgz",
+ "integrity": "sha512-XHqU7msDtp03JLoFqtbIuNPDeCebQxOBwRcuL6BpH8B1rV/sMHSdH9EY0ZRn+P004RKHs/+b5DPssN6F966k1A==",
+ "bundleDependencies": [
+ "@aws/cloudformation-validate",
+ "@balena/dockerignore",
+ "@aws-cdk/cloud-assembly-api",
+ "case",
+ "fs-extra",
+ "ignore",
+ "jsonschema",
+ "minimatch",
+ "punycode",
+ "semver",
+ "yaml",
+ "mime-types"
+ ],
+ "dev": true,
+ "license": "Apache-2.0",
+ "dependencies": {
+ "@aws-cdk/asset-awscli-v1": "2.2.292",
+ "@aws-cdk/asset-node-proxy-agent-v6": "^2.1.2",
+ "@aws-cdk/cloud-assembly-api": "^2.2.6",
+ "@aws-cdk/cloud-assembly-schema": "^54.24.0",
+ "@aws/cloudformation-validate": "1.12.1",
+ "@balena/dockerignore": "^1.0.2",
+ "case": "1.6.3",
+ "fs-extra": "^11.3.6",
+ "ignore": "^5.3.2",
+ "jsonschema": "^1.5.0",
+ "mime-types": "^2.1.35",
+ "minimatch": "^10.2.5",
+ "punycode": "^2.3.1",
+ "semver": "^7.8.5",
+ "yaml": "1.10.3"
+ },
+ "engines": {
+ "node": ">= 20.0.0"
+ },
+ "peerDependencies": {
+ "constructs": "^10.5.0"
+ }
+ },
+ "node_modules/aws-cdk-lib/node_modules/@aws-cdk/cloud-assembly-api": {
+ "version": "2.2.6",
+ "dev": true,
+ "inBundle": true,
+ "license": "Apache-2.0",
+ "dependencies": {
+ "jsonschema": "^1.5.0",
+ "semver": "^7.8.4"
+ },
+ "engines": {
+ "node": ">= 18.0.0"
+ },
+ "peerDependencies": {
+ "@aws-cdk/cloud-assembly-schema": ">=54.5.0"
+ }
+ },
+ "node_modules/aws-cdk-lib/node_modules/@aws/cloudformation-validate": {
+ "version": "1.12.1",
+ "dev": true,
+ "inBundle": true,
+ "license": "Apache-2.0",
+ "engines": {
+ "node": ">=20.0.0"
+ }
+ },
+ "node_modules/aws-cdk-lib/node_modules/@balena/dockerignore": {
+ "version": "1.0.2",
+ "dev": true,
+ "inBundle": true,
+ "license": "Apache-2.0"
+ },
+ "node_modules/aws-cdk-lib/node_modules/balanced-match": {
+ "version": "4.0.4",
+ "dev": true,
+ "inBundle": true,
+ "license": "MIT",
+ "engines": {
+ "node": "18 || 20 || >=22"
+ }
+ },
+ "node_modules/aws-cdk-lib/node_modules/brace-expansion": {
+ "version": "5.0.9",
+ "dev": true,
+ "inBundle": true,
+ "license": "MIT",
+ "dependencies": {
+ "balanced-match": "^4.0.2"
+ },
+ "engines": {
+ "node": "20 || >=22"
+ }
+ },
+ "node_modules/aws-cdk-lib/node_modules/case": {
+ "version": "1.6.3",
+ "dev": true,
+ "inBundle": true,
+ "license": "(MIT OR GPL-3.0-or-later)",
+ "engines": {
+ "node": ">= 0.8.0"
+ }
+ },
+ "node_modules/aws-cdk-lib/node_modules/fs-extra": {
+ "version": "11.3.6",
+ "dev": true,
+ "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",
+ "dev": true,
+ "inBundle": true,
+ "license": "ISC"
+ },
+ "node_modules/aws-cdk-lib/node_modules/ignore": {
+ "version": "5.3.2",
+ "dev": true,
+ "inBundle": true,
+ "license": "MIT",
+ "engines": {
+ "node": ">= 4"
+ }
+ },
+ "node_modules/aws-cdk-lib/node_modules/jsonfile": {
+ "version": "6.2.1",
+ "dev": true,
+ "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.5.0",
+ "dev": true,
+ "inBundle": true,
+ "license": "MIT",
+ "engines": {
+ "node": "*"
+ }
+ },
+ "node_modules/aws-cdk-lib/node_modules/mime-db": {
+ "version": "1.52.0",
+ "dev": true,
+ "inBundle": true,
+ "license": "MIT",
+ "engines": {
+ "node": ">= 0.6"
+ }
+ },
+ "node_modules/aws-cdk-lib/node_modules/mime-types": {
+ "version": "2.1.35",
+ "dev": true,
+ "inBundle": true,
+ "license": "MIT",
+ "dependencies": {
+ "mime-db": "1.52.0"
+ },
+ "engines": {
+ "node": ">= 0.6"
+ }
+ },
+ "node_modules/aws-cdk-lib/node_modules/minimatch": {
+ "version": "10.2.5",
+ "dev": true,
+ "inBundle": true,
+ "license": "BlueOak-1.0.0",
+ "dependencies": {
+ "brace-expansion": "^5.0.5"
+ },
+ "engines": {
+ "node": "18 || 20 || >=22"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/isaacs"
+ }
+ },
+ "node_modules/aws-cdk-lib/node_modules/punycode": {
+ "version": "2.3.1",
+ "dev": true,
+ "inBundle": true,
+ "license": "MIT",
+ "engines": {
+ "node": ">=6"
+ }
+ },
+ "node_modules/aws-cdk-lib/node_modules/semver": {
+ "version": "7.8.5",
+ "dev": true,
+ "inBundle": true,
+ "license": "ISC",
+ "bin": {
+ "semver": "bin/semver.js"
+ },
+ "engines": {
+ "node": ">=10"
+ }
+ },
+ "node_modules/aws-cdk-lib/node_modules/universalify": {
+ "version": "2.0.1",
+ "dev": true,
+ "inBundle": true,
+ "license": "MIT",
+ "engines": {
+ "node": ">= 10.0.0"
+ }
+ },
+ "node_modules/aws-cdk-lib/node_modules/yaml": {
+ "version": "1.10.3",
+ "dev": true,
+ "inBundle": true,
+ "license": "ISC",
+ "engines": {
+ "node": ">= 6"
+ }
+ },
"node_modules/baseline-browser-mapping": {
"version": "2.11.23",
"resolved": "https://registry.npmjs.org/baseline-browser-mapping/-/baseline-browser-mapping-2.11.23.tgz",
@@ -1653,6 +2032,13 @@
"node": "^6 || ^7 || ^8 || ^9 || ^10 || ^11 || ^12 || >=13.7"
}
},
+ "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==",
+ "dev": true,
+ "license": "MIT"
+ },
"node_modules/bulma": {
"version": "1.0.4",
"resolved": "https://registry.npmjs.org/bulma/-/bulma-1.0.4.tgz",
@@ -1680,6 +2066,13 @@
],
"license": "CC-BY-4.0"
},
+ "node_modules/constructs": {
+ "version": "10.8.1",
+ "resolved": "https://registry.npmjs.org/constructs/-/constructs-10.8.1.tgz",
+ "integrity": "sha512-98yGXYyhePqPYh3cYu8nzBERmAhC0DONe3UD03okK0nehZ7hYP4wgZuf02a04+uOWxnTJ5Rpp5m0GRNpwyLGGA==",
+ "dev": true,
+ "license": "Apache-2.0"
+ },
"node_modules/convert-source-map": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-2.0.0.tgz",
@@ -1687,6 +2080,19 @@
"dev": true,
"license": "MIT"
},
+ "node_modules/core-util-is": {
+ "version": "1.0.3",
+ "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.3.tgz",
+ "integrity": "sha512-ZQBvi1DcpJ4GDqanjucZ2Hj3wEO5pZDS89BWbkcrvdxksJorwUDDZamX9ldFkp9aw2lmBDLgkObEA4DWNJ9FYQ==",
+ "license": "MIT"
+ },
+ "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,
+ "license": "MIT"
+ },
"node_modules/csstype": {
"version": "3.2.3",
"resolved": "https://registry.npmjs.org/csstype/-/csstype-3.2.3.tgz",
@@ -1722,6 +2128,16 @@
"node": ">=8"
}
},
+ "node_modules/diff": {
+ "version": "4.0.4",
+ "resolved": "https://registry.npmjs.org/diff/-/diff-4.0.4.tgz",
+ "integrity": "sha512-X07nttJQkwkfKfvTPG/KSnE2OMdcUCao6+eXF3wmnIQRn2aPAHH3VxDbDOdegkd6JbPsXqShpvEOHfAT+nCNwQ==",
+ "dev": true,
+ "license": "BSD-3-Clause",
+ "engines": {
+ "node": ">=0.3.1"
+ }
+ },
"node_modules/electron-to-chromium": {
"version": "1.5.427",
"resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.5.427.tgz",
@@ -1859,6 +2275,24 @@
"dev": true,
"license": "ISC"
},
+ "node_modules/immediate": {
+ "version": "3.0.6",
+ "resolved": "https://registry.npmjs.org/immediate/-/immediate-3.0.6.tgz",
+ "integrity": "sha512-XXOFtyqDjNDAQxVfYxuF7g9Il/IbWmmlQg2MYKOH8ExIT1qg6xc4zyS3HaEEATgs1btfzxq15ciUiY7gjSXRGQ==",
+ "license": "MIT"
+ },
+ "node_modules/inherits": {
+ "version": "2.0.4",
+ "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz",
+ "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==",
+ "license": "ISC"
+ },
+ "node_modules/isarray": {
+ "version": "1.0.0",
+ "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz",
+ "integrity": "sha512-VLghIWNM6ELQzo7zwmcg0NmTVyWKYjvIeM83yjp0wRDTmUnrM678fQbcKBo6n2CJEF0szoG//ytg+TKla89ALQ==",
+ "license": "MIT"
+ },
"node_modules/jiti": {
"version": "2.7.0",
"resolved": "https://registry.npmjs.org/jiti/-/jiti-2.7.0.tgz",
@@ -1902,6 +2336,27 @@
"node": ">=6"
}
},
+ "node_modules/jszip": {
+ "version": "3.10.2",
+ "resolved": "https://registry.npmjs.org/jszip/-/jszip-3.10.2.tgz",
+ "integrity": "sha512-3l+rb15IOWtUhU0H5MFqES/T6Kh7abYwjosBey/vD6hDt8zoEffkSC5Ws5SGtgVw3gBx2NEbhTeSW1+kWkpyTQ==",
+ "license": "(MIT OR GPL-3.0-or-later)",
+ "dependencies": {
+ "lie": "~3.3.0",
+ "pako": "~1.0.2",
+ "readable-stream": "~2.3.6",
+ "setimmediate": "^1.0.5"
+ }
+ },
+ "node_modules/lie": {
+ "version": "3.3.0",
+ "resolved": "https://registry.npmjs.org/lie/-/lie-3.3.0.tgz",
+ "integrity": "sha512-UaiMJzeWRlEujzAuw5LokY1L5ecNQYZKfmyZ9L7wDHb/p5etKaxXhohBcrw0EYby+G/NA52vRSN4N39dxHAIwQ==",
+ "license": "MIT",
+ "dependencies": {
+ "immediate": "~3.0.5"
+ }
+ },
"node_modules/lightningcss": {
"version": "1.32.0",
"resolved": "https://registry.npmjs.org/lightningcss/-/lightningcss-1.32.0.tgz",
@@ -2192,6 +2647,13 @@
"@jridgewell/sourcemap-codec": "^1.5.5"
}
},
+ "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,
+ "license": "ISC"
+ },
"node_modules/ms": {
"version": "2.1.3",
"resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz",
@@ -2228,6 +2690,12 @@
"node": ">=18"
}
},
+ "node_modules/pako": {
+ "version": "1.0.11",
+ "resolved": "https://registry.npmjs.org/pako/-/pako-1.0.11.tgz",
+ "integrity": "sha512-4hLB8Py4zZce5s4yd9XzopqwVv/yGNhV1Bl8NTmCq1763HeK2+EwVTv+leGeL13Dnh2wfbqowVPXCIO0z4taYw==",
+ "license": "(MIT AND Zlib)"
+ },
"node_modules/picocolors": {
"version": "1.1.1",
"resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.1.1.tgz",
@@ -2284,6 +2752,12 @@
"dev": true,
"license": "MIT"
},
+ "node_modules/process-nextick-args": {
+ "version": "2.0.1",
+ "resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-2.0.1.tgz",
+ "integrity": "sha512-3ouUOpQhtgrbOa17J7+uxOTpITYWaGP7/AhoR3+A+/1e9skrzelGi/dXzEYyvbxubEF6Wn2ypscTKiKJFFn1ag==",
+ "license": "MIT"
+ },
"node_modules/react": {
"version": "19.3.0",
"resolved": "https://registry.npmjs.org/react/-/react-19.3.0.tgz",
@@ -2347,6 +2821,21 @@
"react-dom": ">=16.8"
}
},
+ "node_modules/readable-stream": {
+ "version": "2.3.8",
+ "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.8.tgz",
+ "integrity": "sha512-8p0AUk4XODgIewSi0l8Epjs+EVnWiK7NoDIEGU0HhE7+ZyY8D1IMY7odu5lRrFXGg71L15KG8QrPmum45RTtdA==",
+ "license": "MIT",
+ "dependencies": {
+ "core-util-is": "~1.0.0",
+ "inherits": "~2.0.3",
+ "isarray": "~1.0.0",
+ "process-nextick-args": "~2.0.0",
+ "safe-buffer": "~5.1.1",
+ "string_decoder": "~1.1.1",
+ "util-deprecate": "~1.0.1"
+ }
+ },
"node_modules/rollup": {
"version": "4.63.3",
"resolved": "https://registry.npmjs.org/rollup/-/rollup-4.63.3.tgz",
@@ -2393,12 +2882,43 @@
"fsevents": "~2.3.2"
}
},
+ "node_modules/safe-buffer": {
+ "version": "5.1.2",
+ "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz",
+ "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==",
+ "license": "MIT"
+ },
"node_modules/scheduler": {
"version": "0.28.0",
"resolved": "https://registry.npmjs.org/scheduler/-/scheduler-0.28.0.tgz",
"integrity": "sha512-juorfCmIkIw8tT+p5BXSm6PJjQF/ycEYmKyzURCIt/RaZIhL+PulbQ9Yu2z1HdOJDdqDTlxA1+xKBmHXJsczAw==",
"license": "MIT"
},
+ "node_modules/selenium-webdriver": {
+ "version": "4.50.0",
+ "resolved": "https://registry.npmjs.org/selenium-webdriver/-/selenium-webdriver-4.50.0.tgz",
+ "integrity": "sha512-E8DhBVMpnsNwShcxSWG8oCVJLQoPZiEciqz/inH7YkKvnR/kBiSNjaJux+7iuA4x6/77N8T68vWMTJgW169kOg==",
+ "funding": [
+ {
+ "type": "github",
+ "url": "https://github.com/sponsors/SeleniumHQ"
+ },
+ {
+ "type": "opencollective",
+ "url": "https://opencollective.com/selenium"
+ }
+ ],
+ "license": "Apache-2.0",
+ "dependencies": {
+ "@bazel/runfiles": "^6.5.0",
+ "jszip": "^3.10.2",
+ "tmp": "^0.2.7",
+ "ws": "^8.22.0"
+ },
+ "engines": {
+ "node": ">= 22.0.0"
+ }
+ },
"node_modules/semver": {
"version": "6.3.1",
"resolved": "https://registry.npmjs.org/semver/-/semver-6.3.1.tgz",
@@ -2409,6 +2929,22 @@
"semver": "bin/semver.js"
}
},
+ "node_modules/setimmediate": {
+ "version": "1.0.5",
+ "resolved": "https://registry.npmjs.org/setimmediate/-/setimmediate-1.0.5.tgz",
+ "integrity": "sha512-MATJdZp8sLqDl/68LfQmbP8zKPLQNV6BIZoIgrscFDQ+RsvK/BxeDQOgyxKKoh0y/8h3BqVFnCqQ/gd+reiIXA==",
+ "license": "MIT"
+ },
+ "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==",
+ "dev": true,
+ "license": "BSD-3-Clause",
+ "engines": {
+ "node": ">=0.10.0"
+ }
+ },
"node_modules/source-map-js": {
"version": "1.2.1",
"resolved": "https://registry.npmjs.org/source-map-js/-/source-map-js-1.2.1.tgz",
@@ -2419,6 +2955,26 @@
"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==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "buffer-from": "^1.0.0",
+ "source-map": "^0.6.0"
+ }
+ },
+ "node_modules/string_decoder": {
+ "version": "1.1.1",
+ "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz",
+ "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==",
+ "license": "MIT",
+ "dependencies": {
+ "safe-buffer": "~5.1.0"
+ }
+ },
"node_modules/tailwindcss": {
"version": "4.3.3",
"resolved": "https://registry.npmjs.org/tailwindcss/-/tailwindcss-4.3.3.tgz",
@@ -2457,6 +3013,59 @@
"url": "https://github.com/sponsors/SuperchupuDev"
}
},
+ "node_modules/tmp": {
+ "version": "0.2.7",
+ "resolved": "https://registry.npmjs.org/tmp/-/tmp-0.2.7.tgz",
+ "integrity": "sha512-e0votIpp4Uo2AJYSzVHV6xCcawuiez3DzqDAbrTc3YxBkplN6e+dM13ZeIcZnDg/QpSuU2zfZ3rzwY8ukEnaXw==",
+ "license": "MIT",
+ "engines": {
+ "node": ">=14.14"
+ }
+ },
+ "node_modules/ts-node": {
+ "version": "10.9.2",
+ "resolved": "https://registry.npmjs.org/ts-node/-/ts-node-10.9.2.tgz",
+ "integrity": "sha512-f0FFpIdcHgn8zcPSbf1dRevwt047YMnaiJM3u2w2RewrB+fob/zePZcrOyQoLMMO7aBIddLcQIEK5dYjkLnGrQ==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "@cspotcode/source-map-support": "^0.8.0",
+ "@tsconfig/node10": "^1.0.7",
+ "@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/typescript": {
"version": "5.7.3",
"resolved": "https://registry.npmjs.org/typescript/-/typescript-5.7.3.tgz",
@@ -2509,6 +3118,19 @@
"browserslist": ">= 4.21.0"
}
},
+ "node_modules/util-deprecate": {
+ "version": "1.0.2",
+ "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz",
+ "integrity": "sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw==",
+ "license": "MIT"
+ },
+ "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,
+ "license": "MIT"
+ },
"node_modules/vite": {
"version": "6.4.3",
"resolved": "https://registry.npmjs.org/vite/-/vite-6.4.3.tgz",
@@ -2584,12 +3206,43 @@
}
}
},
+ "node_modules/ws": {
+ "version": "8.22.0",
+ "resolved": "https://registry.npmjs.org/ws/-/ws-8.22.0.tgz",
+ "integrity": "sha512-Ydggc987+RO0AnWtZ/7Wq9FtNvcrL1b/RO0ud9mWjUPgDrsAAwQSF51sm2hm1XofbU/4jkpGEsLFsZZxU+1DOg==",
+ "license": "MIT",
+ "engines": {
+ "node": ">=10.0.0"
+ },
+ "peerDependencies": {
+ "bufferutil": "^4.0.1",
+ "utf-8-validate": ">=5.0.2"
+ },
+ "peerDependenciesMeta": {
+ "bufferutil": {
+ "optional": true
+ },
+ "utf-8-validate": {
+ "optional": true
+ }
+ }
+ },
"node_modules/yallist": {
"version": "3.1.1",
"resolved": "https://registry.npmjs.org/yallist/-/yallist-3.1.1.tgz",
"integrity": "sha512-a4UGQaWPH59mOXUYnAG2ewncQS4i4F43Tv3JoAM+s2VDAmS9NsK8GpDMLrCHPksFT7h3K6TOoUNn2pb7RoXx4g==",
"dev": true,
"license": "ISC"
+ },
+ "node_modules/yn": {
+ "version": "3.1.1",
+ "resolved": "https://registry.npmjs.org/yn/-/yn-3.1.1.tgz",
+ "integrity": "sha512-Ux4ygGWsu2c7isFWe8Yu1YluJmqVhxqK2cLXNQA5AcC3QfbGNpM7fu0Y8b/z16pXLnFxZYvWhd3fhBY9DLmC6Q==",
+ "dev": true,
+ "license": "MIT",
+ "engines": {
+ "node": ">=6"
+ }
}
}
}
diff --git a/package.json b/package.json
index a00a791..40ab3a5 100644
--- a/package.json
+++ b/package.json
@@ -16,7 +16,8 @@
"lucide-react": "^0.475.0",
"react": "^19.0.0",
"react-dom": "^19.0.0",
- "react-router-dom": "^6.28.0"
+ "react-router-dom": "^6.28.0",
+ "selenium-webdriver": "^4.50.0"
},
"devDependencies": {
"@tailwindcss/vite": "^4.3.3",
@@ -25,8 +26,12 @@
"@types/react-dom": "^19.0.0",
"@vitejs/plugin-react": "^4.3.4",
"autoprefixer": "^10.6.1",
+ "aws-cdk-lib": "^2.272.0",
+ "constructs": "^10.8.1",
"postcss": "^8.5.28",
+ "source-map-support": "^0.5.21",
"tailwindcss": "^4.3.3",
+ "ts-node": "^10.9.2",
"typescript": "~5.7.2",
"vite": "^6.0.0"
}
diff --git a/src/context/SellerContext.tsx b/src/context/SellerContext.tsx
index 0bec1b1..d2355f5 100644
--- a/src/context/SellerContext.tsx
+++ b/src/context/SellerContext.tsx
@@ -5,7 +5,7 @@ import { api } from '../services/api';
interface SellerContextType {
// Authentication
user: UserProfile | null;
- login: (emailOrPhone: string, password?: string) => Promise;
+ login: (emailOrPhone: string, password?: string, otpCode?: string, otpType?: string) => Promise;
register: (userData: { username?: string; email?: string; phone: string; password?: string }) => Promise;
logout: () => void;
@@ -21,7 +21,7 @@ interface SellerContextType {
// Inventory & Products
inventory: InventoryItem[];
fetchData: () => Promise;
- updateStock: (id: string, newStock: number) => void;
+ updateStock: (id: string, newStock: number) => Promise;
addProduct: (product: Omit) => Promise;
deleteProduct: (id: string) => Promise;
@@ -55,6 +55,7 @@ const defaultOnboarding: OnboardingData = {
email: '',
phone: '',
isOtpVerified: false,
+ isEmailVerified: false,
taxMode: 'gstin',
gstin: '',
enrolmentId: '',
@@ -153,13 +154,21 @@ export const SellerProvider: React.FC<{ children: React.ReactNode }> = ({ childr
sku: p.sku || `SKU-${p.id}`,
title: p.title || 'Product',
category: p.category || 'General',
- craftTechnique: 'Authentic Craft',
+ craftTechnique: p.craftTechnique || 'Authentic Craft',
giTagged: p.is_gi_tagged || false,
price: parseFloat(p.price) || 0,
mrp: parseFloat(p.compare_at_price) || ((parseFloat(p.price) || 0) * 1.2),
stock: p.stock || 0,
status: p.stock === 0 ? 'out_of_stock' : p.stock < 5 ? 'low_stock' : 'active',
+ approvalStatus: (p.status && (p.status.toLowerCase() === 'approved' || p.status.toLowerCase() === 'active')) ? 'approved' : (p.status && p.status.toLowerCase() === 'rejected' ? 'rejected' : 'pending'),
image: p.image || '/images/placeholder.jpg',
+ additional_images: p.additional_images || [],
+ video_url: p.video_url || '',
+ description: p.description || '',
+ compare_at_price: parseFloat(p.compare_at_price) || undefined,
+ package_weight: p.package_weight || 1.0,
+ shipping_profile: p.shipping_profile || 'Standard Fragile',
+ uploadSource: p.upload_source || (p.sku?.startsWith('TRDX-') || p.sku?.includes('CSV') || p.sku?.startsWith('BATCH-') ? 'bulk' : 'individual'),
salesCount: 0
})));
@@ -241,15 +250,16 @@ export const SellerProvider: React.FC<{ children: React.ReactNode }> = ({ childr
localStorage.setItem('tradhox_app_submitted', 'true');
};
- const login = async (emailOrPhone: string, password?: string) => {
+ const login = async (emailOrPhone: string, password?: string, otpCode?: string, otpType?: string) => {
try {
- const data = await api.login(emailOrPhone, password || 'Password123!');
+ const data = await api.login(emailOrPhone, password, otpCode, otpType);
localStorage.setItem('tradhox_user_auth', JSON.stringify(data));
+ const userEmail = (data.user?.email && !data.user.email.endsWith('@tradhox.com')) ? data.user.email : '';
const loggedUser: UserProfile = {
id: String(data.user.id),
name: data.user.first_name ? `${data.user.first_name} ${data.user.last_name || ''}`.trim() : data.user.username,
- email: data.user.email,
+ email: userEmail,
phone: data.user.profile?.phone || emailOrPhone,
role: 'Seller',
avatar: data.user.profile?.logo_url || '/images/avatars/seller-main.jpg',
@@ -272,8 +282,8 @@ export const SellerProvider: React.FC<{ children: React.ReactNode }> = ({ childr
const register = async (userData: { username?: string; email?: string; phone: string; password?: string }) => {
const cleanPhone = userData.phone.replace(/[^0-9]/g, '');
- const username = userData.username || `artisan_${cleanPhone.slice(-6) || Math.floor(1000 + Math.random() * 9000)}`;
- const email = userData.email || `${username}@tradhox.com`;
+ const username = userData.username || (cleanPhone ? cleanPhone : (userData.email ? userData.email.split('@')[0] : `user_${Date.now()}`));
+ const email = (userData.email && !userData.email.endsWith('@tradhox.com')) ? userData.email : '';
const password = userData.password || 'Password123!';
const payload = {
@@ -288,10 +298,11 @@ export const SellerProvider: React.FC<{ children: React.ReactNode }> = ({ childr
const data = await api.register(payload);
localStorage.setItem('tradhox_user_auth', JSON.stringify(data));
+ const registeredEmail = (data.user?.email && !data.user.email.endsWith('@tradhox.com')) ? data.user.email : email;
const registeredUser: UserProfile = {
id: String(data.user?.id || 'seller-001'),
name: data.user?.first_name ? `${data.user?.first_name} ${data.user?.last_name || ''}`.trim() : (data.user?.username || username),
- email: data.user?.email || email,
+ email: registeredEmail,
phone: data.user?.profile?.phone || userData.phone,
role: 'Seller',
avatar: data.user?.profile?.logo_url || '/images/avatars/seller-main.jpg',
@@ -368,21 +379,51 @@ export const SellerProvider: React.FC<{ children: React.ReactNode }> = ({ childr
setPayouts([]);
};
- const updateStock = (id: string, newStock: number) => {
+ const updateStock = async (id: string, newStock: number) => {
+ const clamped = Math.max(0, newStock);
setInventory(prev =>
prev.map(item =>
item.id === id
? {
...item,
- stock: Math.max(0, newStock),
- status: newStock === 0 ? 'out_of_stock' : newStock < 5 ? 'low_stock' : 'active'
+ stock: clamped,
+ status: clamped === 0 ? 'out_of_stock' : clamped < 5 ? 'low_stock' : 'active'
}
: item
)
);
+
+ try {
+ if (id && !id.startsWith('prod-')) {
+ await api.patchProduct(id, { stock: clamped });
+ }
+ } catch (err) {
+ console.warn('Failed to persist stock update to API, kept local optimistic state:', err);
+ }
};
const addProduct = async (product: Omit) => {
+ const newLocalItem: InventoryItem = {
+ id: `prod-${Date.now()}`,
+ sku: product.sku || `TRDX-${Date.now().toString().slice(-5)}`,
+ title: product.title,
+ category: product.category,
+ craftTechnique: product.craftTechnique || 'Authentic Craft',
+ giTagged: product.giTagged || false,
+ price: product.price,
+ mrp: product.mrp,
+ stock: product.stock,
+ status: product.status,
+ image: product.image,
+ additional_images: product.additional_images,
+ video_url: product.video_url,
+ description: product.description,
+ compare_at_price: product.compare_at_price || product.mrp,
+ package_weight: product.package_weight || 1.0,
+ shipping_profile: product.shipping_profile || 'Standard Fragile',
+ salesCount: 0
+ };
+
try {
await api.createProduct({
title: product.title,
@@ -390,12 +431,21 @@ export const SellerProvider: React.FC<{ children: React.ReactNode }> = ({ childr
category: product.category,
price: product.price,
stock: product.stock,
- image: product.image
+ image: product.image,
+ description: product.description || '',
+ is_gi_tagged: product.giTagged || false,
+ additional_images: product.additional_images || [],
+ video_url: product.video_url || null,
+ compare_at_price: product.compare_at_price || product.mrp || null,
+ package_weight: product.package_weight || 1.0,
+ shipping_profile: product.shipping_profile || 'Standard Fragile',
+ track_inventory: product.stock > 0,
+ processing_days: 3
});
- fetchData();
+ await fetchData();
} catch (e) {
- console.error('Failed to add product', e);
- throw e;
+ console.warn('Backend API create product notice (adding to local inventory state):', e);
+ setInventory(prev => [newLocalItem, ...prev]);
}
};
@@ -527,4 +577,4 @@ export const useSeller = () => {
throw new Error('useSeller must be used within a SellerProvider');
}
return ctx;
-};
+};
\ No newline at end of file
diff --git a/src/pages/LoginPage.tsx b/src/pages/LoginPage.tsx
index d8d3a0c..6cbb3ac 100644
--- a/src/pages/LoginPage.tsx
+++ b/src/pages/LoginPage.tsx
@@ -41,11 +41,9 @@ export const LoginPage: React.FC = ({ initialMode }) => {
}, [location.pathname]);
// Login state
- const [loginTab, setLoginTab] = useState<'mobile' | 'email'>('mobile');
const [mobileNumber, setMobileNumber] = useState('');
const [loginOtp, setLoginOtp] = useState('');
const [otpSent, setOtpSent] = useState(false);
- const [emailAddress, setEmailAddress] = useState('');
const [password, setPassword] = useState('');
const [showPassword, setShowPassword] = useState(false);
const [isPhoneFocused, setIsPhoneFocused] = useState(false);
@@ -92,6 +90,7 @@ export const LoginPage: React.FC = ({ initialMode }) => {
const handleGetOtp = async () => {
setLoginError('');
+ setOtpSent(false);
const clean = mobileNumber.replace(/\D/g, '');
if (clean.length !== 10) {
setLoginError('Please enter a valid 10-digit mobile number');
@@ -101,10 +100,11 @@ export const LoginPage: React.FC = ({ initialMode }) => {
try {
await api.sendWhatsAppOtp(clean, code, 'mobile_number_verification');
setOtpSent(true);
- setLoginOtp(''); // Leave empty so user enters the 6-digit code received on WhatsApp
- } catch (err) {
+ setLoginOtp(''); // Empty so user types the OTP received on WhatsApp
+ } catch (err: any) {
console.warn('WhatsApp service call error:', err);
- setLoginError('Failed to dispatch OTP. Please try again.');
+ setOtpSent(false);
+ setLoginError(err?.message || 'Failed to dispatch OTP. Please try again.');
}
};
@@ -112,50 +112,22 @@ export const LoginPage: React.FC = ({ initialMode }) => {
e.preventDefault();
setLoginError('');
try {
- if (loginTab === 'mobile') {
- const clean = mobileNumber.replace(/\D/g, '');
- if (clean.length !== 10) {
- setLoginError('Please enter a valid 10-digit mobile number');
- return;
- }
- if (!loginOtp || loginOtp.length < 6) {
- setLoginError('Please enter the 6-digit verification code sent to your mobile number');
- return;
- }
- // Authenticate session to obtain access token
- const data = await login(clean, password);
-
- // Verify OTP strictly against backend OTPRecord table
- try {
- const verifyRes = await api.verifyOtp('phone', loginOtp);
- if (!verifyRes || !verifyRes.verified) {
- throw new Error(verifyRes?.error || 'Invalid or expired OTP code. Please enter the latest OTP received.');
- }
- } catch (otpErr: any) {
- // Clear session since OTP verification failed
- localStorage.removeItem('tradhox_user_auth');
- localStorage.removeItem('tradhox_user');
- const msg = otpErr?.message || 'Invalid or expired OTP code. Please enter the latest OTP received.';
- setLoginError(msg);
- return;
- }
+ const clean = mobileNumber.replace(/\D/g, '');
+ if (clean.length !== 10) {
+ setLoginError('Please enter a valid 10-digit mobile number');
+ return;
+ }
+ if (!loginOtp || loginOtp.length < 6) {
+ setLoginError('Please enter the 6-digit verification code sent to your mobile number');
+ return;
+ }
+ // Authenticate session to obtain access token
+ const data = await login(clean, password, loginOtp, 'phone');
- if (data?.user?.profile?.is_profile_complete) {
- navigate('/dashboard');
- } else {
- navigate('/onboarding');
- }
+ if (data?.user?.profile?.is_profile_complete) {
+ navigate('/dashboard');
} else {
- if (!emailAddress) {
- setLoginError('Please enter a valid email address');
- return;
- }
- const data = await login(emailAddress, password);
- if (data?.user?.profile?.is_profile_complete) {
- navigate('/dashboard');
- } else {
- navigate('/onboarding');
- }
+ navigate('/onboarding');
}
} catch (err: any) {
console.error('Login error:', err);
@@ -446,55 +418,6 @@ export const LoginPage: React.FC = ({ initialMode }) => {
Access your dashboard, manage orders, and grow your authentic craft brand.
- {/* Segmented Toggle Tabs */}
-
-
-
-
-
-
{loginError && (
{loginError}
@@ -503,236 +426,129 @@ export const LoginPage: React.FC
= ({ initialMode }) => {
{/* Login Form Contents */}