@guardian/cdk 0.0.0-canary-20260805130549
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +50 -0
- package/bin/gu-cdk +5 -0
- package/lib/aspects/cfn-include-reporter.d.ts +9 -0
- package/lib/aspects/cfn-include-reporter.d.ts.map +1 -0
- package/lib/aspects/cfn-include-reporter.js +18 -0
- package/lib/aspects/cfn-include-reporter.js.map +1 -0
- package/lib/aspects/cfn-parameter-reporter.d.ts +9 -0
- package/lib/aspects/cfn-parameter-reporter.d.ts.map +1 -0
- package/lib/aspects/cfn-parameter-reporter.js +21 -0
- package/lib/aspects/cfn-parameter-reporter.js.map +1 -0
- package/lib/aspects/metadata.d.ts +8 -0
- package/lib/aspects/metadata.d.ts.map +1 -0
- package/lib/aspects/metadata.js +28 -0
- package/lib/aspects/metadata.js.map +1 -0
- package/lib/bin/aws-credential-provider.d.ts +3 -0
- package/lib/bin/aws-credential-provider.d.ts.map +1 -0
- package/lib/bin/aws-credential-provider.js +9 -0
- package/lib/bin/aws-credential-provider.js.map +1 -0
- package/lib/bin/commands/account-readiness/index.d.ts +11 -0
- package/lib/bin/commands/account-readiness/index.d.ts.map +1 -0
- package/lib/bin/commands/account-readiness/index.js +26 -0
- package/lib/bin/commands/account-readiness/index.js.map +1 -0
- package/lib/bin/commands/account-readiness/ssm.d.ts +12 -0
- package/lib/bin/commands/account-readiness/ssm.d.ts.map +1 -0
- package/lib/bin/commands/account-readiness/ssm.js +76 -0
- package/lib/bin/commands/account-readiness/ssm.js.map +1 -0
- package/lib/bin/commands/aws-cdk-version.d.ts +3 -0
- package/lib/bin/commands/aws-cdk-version.d.ts.map +1 -0
- package/lib/bin/commands/aws-cdk-version.js +9 -0
- package/lib/bin/commands/aws-cdk-version.js.map +1 -0
- package/lib/bin/commands/new-project/index.d.ts +14 -0
- package/lib/bin/commands/new-project/index.d.ts.map +1 -0
- package/lib/bin/commands/new-project/index.js +134 -0
- package/lib/bin/commands/new-project/index.js.map +1 -0
- package/lib/bin/commands/new-project/template/.gitignore.template +11 -0
- package/lib/bin/commands/new-project/template/README.md +5 -0
- package/lib/bin/commands/new-project/template/bin/.ignore +2 -0
- package/lib/bin/commands/new-project/template/cdk.json +7 -0
- package/lib/bin/commands/new-project/template/eslint.config.mjs +6 -0
- package/lib/bin/commands/new-project/template/jest.setup.js +2 -0
- package/lib/bin/commands/new-project/template/tsconfig.json.template +12 -0
- package/lib/bin/commands/new-project/utils/app.d.ts +23 -0
- package/lib/bin/commands/new-project/utils/app.d.ts.map +1 -0
- package/lib/bin/commands/new-project/utils/app.js +36 -0
- package/lib/bin/commands/new-project/utils/app.js.map +1 -0
- package/lib/bin/commands/new-project/utils/imports.d.ts +11 -0
- package/lib/bin/commands/new-project/utils/imports.d.ts.map +1 -0
- package/lib/bin/commands/new-project/utils/imports.js +107 -0
- package/lib/bin/commands/new-project/utils/imports.js.map +1 -0
- package/lib/bin/commands/new-project/utils/init.d.ts +13 -0
- package/lib/bin/commands/new-project/utils/init.d.ts.map +1 -0
- package/lib/bin/commands/new-project/utils/init.js +113 -0
- package/lib/bin/commands/new-project/utils/init.js.map +1 -0
- package/lib/bin/commands/new-project/utils/snapshot.d.ts +21 -0
- package/lib/bin/commands/new-project/utils/snapshot.d.ts.map +1 -0
- package/lib/bin/commands/new-project/utils/snapshot.js +41 -0
- package/lib/bin/commands/new-project/utils/snapshot.js.map +1 -0
- package/lib/bin/commands/new-project/utils/stack.d.ts +21 -0
- package/lib/bin/commands/new-project/utils/stack.d.ts.map +1 -0
- package/lib/bin/commands/new-project/utils/stack.js +40 -0
- package/lib/bin/commands/new-project/utils/stack.js.map +1 -0
- package/lib/bin/commands/new-project/utils/utils.d.ts +12 -0
- package/lib/bin/commands/new-project/utils/utils.d.ts.map +1 -0
- package/lib/bin/commands/new-project/utils/utils.js +16 -0
- package/lib/bin/commands/new-project/utils/utils.js.map +1 -0
- package/lib/bin/index.d.ts +3 -0
- package/lib/bin/index.d.ts.map +1 -0
- package/lib/bin/index.js +124 -0
- package/lib/bin/index.js.map +1 -0
- package/lib/constants/__mocks__/library-info.d.ts +6 -0
- package/lib/constants/__mocks__/library-info.d.ts.map +1 -0
- package/lib/constants/__mocks__/library-info.js +11 -0
- package/lib/constants/__mocks__/library-info.js.map +1 -0
- package/lib/constants/__mocks__/tracking-tag.d.ts +5 -0
- package/lib/constants/__mocks__/tracking-tag.d.ts.map +1 -0
- package/lib/constants/__mocks__/tracking-tag.js +9 -0
- package/lib/constants/__mocks__/tracking-tag.js.map +1 -0
- package/lib/constants/access.d.ts +18 -0
- package/lib/constants/access.d.ts.map +1 -0
- package/lib/constants/access.js +22 -0
- package/lib/constants/access.js.map +1 -0
- package/lib/constants/context-keys.d.ts +7 -0
- package/lib/constants/context-keys.d.ts.map +1 -0
- package/lib/constants/context-keys.js +10 -0
- package/lib/constants/context-keys.js.map +1 -0
- package/lib/constants/fastly-aws-account-id.d.ts +8 -0
- package/lib/constants/fastly-aws-account-id.d.ts.map +1 -0
- package/lib/constants/fastly-aws-account-id.js +11 -0
- package/lib/constants/fastly-aws-account-id.js.map +1 -0
- package/lib/constants/index.d.ts +9 -0
- package/lib/constants/index.d.ts.map +1 -0
- package/lib/constants/index.js +25 -0
- package/lib/constants/index.js.map +1 -0
- package/lib/constants/library-info.d.ts +28 -0
- package/lib/constants/library-info.d.ts.map +1 -0
- package/lib/constants/library-info.js +46 -0
- package/lib/constants/library-info.js.map +1 -0
- package/lib/constants/metadata-keys.d.ts +9 -0
- package/lib/constants/metadata-keys.d.ts.map +1 -0
- package/lib/constants/metadata-keys.js +12 -0
- package/lib/constants/metadata-keys.js.map +1 -0
- package/lib/constants/regex-pattern.d.ts +5 -0
- package/lib/constants/regex-pattern.d.ts.map +1 -0
- package/lib/constants/regex-pattern.js +11 -0
- package/lib/constants/regex-pattern.js.map +1 -0
- package/lib/constants/ssm-parameter-paths.d.ts +24 -0
- package/lib/constants/ssm-parameter-paths.d.ts.map +1 -0
- package/lib/constants/ssm-parameter-paths.js +56 -0
- package/lib/constants/ssm-parameter-paths.js.map +1 -0
- package/lib/constants/tracking-tag.d.ts +5 -0
- package/lib/constants/tracking-tag.d.ts.map +1 -0
- package/lib/constants/tracking-tag.js +10 -0
- package/lib/constants/tracking-tag.js.map +1 -0
- package/lib/constructs/acm/certificate.d.ts +24 -0
- package/lib/constructs/acm/certificate.d.ts.map +1 -0
- package/lib/constructs/acm/certificate.js +34 -0
- package/lib/constructs/acm/certificate.js.map +1 -0
- package/lib/constructs/acm/index.d.ts +2 -0
- package/lib/constructs/acm/index.d.ts.map +1 -0
- package/lib/constructs/acm/index.js +18 -0
- package/lib/constructs/acm/index.js.map +1 -0
- package/lib/constructs/autoscaling/asg.d.ts +75 -0
- package/lib/constructs/autoscaling/asg.d.ts.map +1 -0
- package/lib/constructs/autoscaling/asg.js +103 -0
- package/lib/constructs/autoscaling/asg.js.map +1 -0
- package/lib/constructs/autoscaling/index.d.ts +3 -0
- package/lib/constructs/autoscaling/index.d.ts.map +1 -0
- package/lib/constructs/autoscaling/index.js +19 -0
- package/lib/constructs/autoscaling/index.js.map +1 -0
- package/lib/constructs/autoscaling/user-data.d.ts +28 -0
- package/lib/constructs/autoscaling/user-data.d.ts.map +1 -0
- package/lib/constructs/autoscaling/user-data.js +66 -0
- package/lib/constructs/autoscaling/user-data.js.map +1 -0
- package/lib/constructs/cloudwatch/alarm.d.ts +35 -0
- package/lib/constructs/cloudwatch/alarm.d.ts.map +1 -0
- package/lib/constructs/cloudwatch/alarm.js +37 -0
- package/lib/constructs/cloudwatch/alarm.js.map +1 -0
- package/lib/constructs/cloudwatch/api-gateway-alarms.d.ts +17 -0
- package/lib/constructs/cloudwatch/api-gateway-alarms.d.ts.map +1 -0
- package/lib/constructs/cloudwatch/api-gateway-alarms.js +39 -0
- package/lib/constructs/cloudwatch/api-gateway-alarms.js.map +1 -0
- package/lib/constructs/cloudwatch/ec2-alarms.d.ts +36 -0
- package/lib/constructs/cloudwatch/ec2-alarms.d.ts.map +1 -0
- package/lib/constructs/cloudwatch/ec2-alarms.js +102 -0
- package/lib/constructs/cloudwatch/ec2-alarms.js.map +1 -0
- package/lib/constructs/cloudwatch/index.d.ts +5 -0
- package/lib/constructs/cloudwatch/index.d.ts.map +1 -0
- package/lib/constructs/cloudwatch/index.js +21 -0
- package/lib/constructs/cloudwatch/index.js.map +1 -0
- package/lib/constructs/cloudwatch/lambda-alarms.d.ts +43 -0
- package/lib/constructs/cloudwatch/lambda-alarms.d.ts.map +1 -0
- package/lib/constructs/cloudwatch/lambda-alarms.js +54 -0
- package/lib/constructs/cloudwatch/lambda-alarms.js.map +1 -0
- package/lib/constructs/cloudwatch/no-monitoring.d.ts +4 -0
- package/lib/constructs/cloudwatch/no-monitoring.d.ts.map +1 -0
- package/lib/constructs/cloudwatch/no-monitoring.js +3 -0
- package/lib/constructs/cloudwatch/no-monitoring.js.map +1 -0
- package/lib/constructs/core/identity.d.ts +16 -0
- package/lib/constructs/core/identity.d.ts.map +1 -0
- package/lib/constructs/core/identity.js +21 -0
- package/lib/constructs/core/identity.js.map +1 -0
- package/lib/constructs/core/index.d.ts +5 -0
- package/lib/constructs/core/index.d.ts.map +1 -0
- package/lib/constructs/core/index.js +21 -0
- package/lib/constructs/core/index.js.map +1 -0
- package/lib/constructs/core/migrating.d.ts +11 -0
- package/lib/constructs/core/migrating.d.ts.map +1 -0
- package/lib/constructs/core/migrating.js +3 -0
- package/lib/constructs/core/migrating.js.map +1 -0
- package/lib/constructs/core/parameters/acm.d.ts +7 -0
- package/lib/constructs/core/parameters/acm.d.ts.map +1 -0
- package/lib/constructs/core/parameters/acm.js +17 -0
- package/lib/constructs/core/parameters/acm.js.map +1 -0
- package/lib/constructs/core/parameters/anghammarad.d.ts +20 -0
- package/lib/constructs/core/parameters/anghammarad.d.ts.map +1 -0
- package/lib/constructs/core/parameters/anghammarad.js +35 -0
- package/lib/constructs/core/parameters/anghammarad.js.map +1 -0
- package/lib/constructs/core/parameters/base.d.ts +20 -0
- package/lib/constructs/core/parameters/base.d.ts.map +1 -0
- package/lib/constructs/core/parameters/base.js +33 -0
- package/lib/constructs/core/parameters/base.js.map +1 -0
- package/lib/constructs/core/parameters/ec2.d.ts +7 -0
- package/lib/constructs/core/parameters/ec2.d.ts.map +1 -0
- package/lib/constructs/core/parameters/ec2.js +16 -0
- package/lib/constructs/core/parameters/ec2.js.map +1 -0
- package/lib/constructs/core/parameters/fastly.d.ts +13 -0
- package/lib/constructs/core/parameters/fastly.d.ts.map +1 -0
- package/lib/constructs/core/parameters/fastly.js +28 -0
- package/lib/constructs/core/parameters/fastly.js.map +1 -0
- package/lib/constructs/core/parameters/index.d.ts +9 -0
- package/lib/constructs/core/parameters/index.d.ts.map +1 -0
- package/lib/constructs/core/parameters/index.js +25 -0
- package/lib/constructs/core/parameters/index.js.map +1 -0
- package/lib/constructs/core/parameters/log-shipping.d.ts +8 -0
- package/lib/constructs/core/parameters/log-shipping.d.ts.map +1 -0
- package/lib/constructs/core/parameters/log-shipping.js +23 -0
- package/lib/constructs/core/parameters/log-shipping.js.map +1 -0
- package/lib/constructs/core/parameters/s3.d.ts +25 -0
- package/lib/constructs/core/parameters/s3.d.ts.map +1 -0
- package/lib/constructs/core/parameters/s3.js +58 -0
- package/lib/constructs/core/parameters/s3.js.map +1 -0
- package/lib/constructs/core/parameters/vpc.d.ts +17 -0
- package/lib/constructs/core/parameters/vpc.d.ts.map +1 -0
- package/lib/constructs/core/parameters/vpc.js +35 -0
- package/lib/constructs/core/parameters/vpc.js.map +1 -0
- package/lib/constructs/core/stack.d.ts +166 -0
- package/lib/constructs/core/stack.d.ts.map +1 -0
- package/lib/constructs/core/stack.js +183 -0
- package/lib/constructs/core/stack.js.map +1 -0
- package/lib/constructs/dns/dns-records.d.ts +37 -0
- package/lib/constructs/dns/dns-records.d.ts.map +1 -0
- package/lib/constructs/dns/dns-records.js +75 -0
- package/lib/constructs/dns/dns-records.js.map +1 -0
- package/lib/constructs/dns/index.d.ts +2 -0
- package/lib/constructs/dns/index.d.ts.map +1 -0
- package/lib/constructs/dns/index.js +18 -0
- package/lib/constructs/dns/index.js.map +1 -0
- package/lib/constructs/dynamodb/dynamodb.d.ts +31 -0
- package/lib/constructs/dynamodb/dynamodb.d.ts.map +1 -0
- package/lib/constructs/dynamodb/dynamodb.js +18 -0
- package/lib/constructs/dynamodb/dynamodb.js.map +1 -0
- package/lib/constructs/dynamodb/index.d.ts +2 -0
- package/lib/constructs/dynamodb/index.d.ts.map +1 -0
- package/lib/constructs/dynamodb/index.js +18 -0
- package/lib/constructs/dynamodb/index.js.map +1 -0
- package/lib/constructs/ec2/index.d.ts +3 -0
- package/lib/constructs/ec2/index.d.ts.map +1 -0
- package/lib/constructs/ec2/index.js +19 -0
- package/lib/constructs/ec2/index.js.map +1 -0
- package/lib/constructs/ec2/security-groups/base.d.ts +60 -0
- package/lib/constructs/ec2/security-groups/base.d.ts.map +1 -0
- package/lib/constructs/ec2/security-groups/base.js +57 -0
- package/lib/constructs/ec2/security-groups/base.js.map +1 -0
- package/lib/constructs/ec2/security-groups/index.d.ts +2 -0
- package/lib/constructs/ec2/security-groups/index.d.ts.map +1 -0
- package/lib/constructs/ec2/security-groups/index.js +18 -0
- package/lib/constructs/ec2/security-groups/index.js.map +1 -0
- package/lib/constructs/ec2/vpc.d.ts +26 -0
- package/lib/constructs/ec2/vpc.d.ts.map +1 -0
- package/lib/constructs/ec2/vpc.js +76 -0
- package/lib/constructs/ec2/vpc.js.map +1 -0
- package/lib/constructs/ecs/ecs-task.d.ts +139 -0
- package/lib/constructs/ecs/ecs-task.d.ts.map +1 -0
- package/lib/constructs/ecs/ecs-task.js +169 -0
- package/lib/constructs/ecs/ecs-task.js.map +1 -0
- package/lib/constructs/ecs/index.d.ts +2 -0
- package/lib/constructs/ecs/index.d.ts.map +1 -0
- package/lib/constructs/ecs/index.js +18 -0
- package/lib/constructs/ecs/index.js.map +1 -0
- package/lib/constructs/iam/fastly-logs-iam.d.ts +38 -0
- package/lib/constructs/iam/fastly-logs-iam.d.ts.map +1 -0
- package/lib/constructs/iam/fastly-logs-iam.js +44 -0
- package/lib/constructs/iam/fastly-logs-iam.js.map +1 -0
- package/lib/constructs/iam/index.d.ts +4 -0
- package/lib/constructs/iam/index.d.ts.map +1 -0
- package/lib/constructs/iam/index.js +20 -0
- package/lib/constructs/iam/index.js.map +1 -0
- package/lib/constructs/iam/policies/anghammarad.d.ts +15 -0
- package/lib/constructs/iam/policies/anghammarad.d.ts.map +1 -0
- package/lib/constructs/iam/policies/anghammarad.js +30 -0
- package/lib/constructs/iam/policies/anghammarad.js.map +1 -0
- package/lib/constructs/iam/policies/assume-role.d.ts +10 -0
- package/lib/constructs/iam/policies/assume-role.d.ts.map +1 -0
- package/lib/constructs/iam/policies/assume-role.js +21 -0
- package/lib/constructs/iam/policies/assume-role.js.map +1 -0
- package/lib/constructs/iam/policies/base-policy.d.ts +20 -0
- package/lib/constructs/iam/policies/base-policy.d.ts.map +1 -0
- package/lib/constructs/iam/policies/base-policy.js +33 -0
- package/lib/constructs/iam/policies/base-policy.js.map +1 -0
- package/lib/constructs/iam/policies/cloudwatch.d.ts +14 -0
- package/lib/constructs/iam/policies/cloudwatch.d.ts.map +1 -0
- package/lib/constructs/iam/policies/cloudwatch.js +28 -0
- package/lib/constructs/iam/policies/cloudwatch.js.map +1 -0
- package/lib/constructs/iam/policies/describe-ec2.d.ts +8 -0
- package/lib/constructs/iam/policies/describe-ec2.d.ts.map +1 -0
- package/lib/constructs/iam/policies/describe-ec2.js +33 -0
- package/lib/constructs/iam/policies/describe-ec2.js.map +1 -0
- package/lib/constructs/iam/policies/dynamodb.d.ts +20 -0
- package/lib/constructs/iam/policies/dynamodb.d.ts.map +1 -0
- package/lib/constructs/iam/policies/dynamodb.js +32 -0
- package/lib/constructs/iam/policies/dynamodb.js.map +1 -0
- package/lib/constructs/iam/policies/index.d.ts +13 -0
- package/lib/constructs/iam/policies/index.d.ts.map +1 -0
- package/lib/constructs/iam/policies/index.js +29 -0
- package/lib/constructs/iam/policies/index.js.map +1 -0
- package/lib/constructs/iam/policies/kcl.d.ts +17 -0
- package/lib/constructs/iam/policies/kcl.d.ts.map +1 -0
- package/lib/constructs/iam/policies/kcl.js +60 -0
- package/lib/constructs/iam/policies/kcl.js.map +1 -0
- package/lib/constructs/iam/policies/log-shipping.d.ts +8 -0
- package/lib/constructs/iam/policies/log-shipping.d.ts.map +1 -0
- package/lib/constructs/iam/policies/log-shipping.js +24 -0
- package/lib/constructs/iam/policies/log-shipping.js.map +1 -0
- package/lib/constructs/iam/policies/parameter-store-read.d.ts +39 -0
- package/lib/constructs/iam/policies/parameter-store-read.d.ts.map +1 -0
- package/lib/constructs/iam/policies/parameter-store-read.js +73 -0
- package/lib/constructs/iam/policies/parameter-store-read.js.map +1 -0
- package/lib/constructs/iam/policies/s3-get-object.d.ts +57 -0
- package/lib/constructs/iam/policies/s3-get-object.d.ts.map +1 -0
- package/lib/constructs/iam/policies/s3-get-object.js +73 -0
- package/lib/constructs/iam/policies/s3-get-object.js.map +1 -0
- package/lib/constructs/iam/policies/s3-put-object.d.ts +11 -0
- package/lib/constructs/iam/policies/s3-put-object.d.ts.map +1 -0
- package/lib/constructs/iam/policies/s3-put-object.js +13 -0
- package/lib/constructs/iam/policies/s3-put-object.js.map +1 -0
- package/lib/constructs/iam/policies/ses.d.ts +15 -0
- package/lib/constructs/iam/policies/ses.d.ts.map +1 -0
- package/lib/constructs/iam/policies/ses.js +14 -0
- package/lib/constructs/iam/policies/ses.js.map +1 -0
- package/lib/constructs/iam/policies/ssm-ssh.d.ts +19 -0
- package/lib/constructs/iam/policies/ssm-ssh.d.ts.map +1 -0
- package/lib/constructs/iam/policies/ssm-ssh.js +49 -0
- package/lib/constructs/iam/policies/ssm-ssh.js.map +1 -0
- package/lib/constructs/iam/roles/github-actions.d.ts +41 -0
- package/lib/constructs/iam/roles/github-actions.d.ts.map +1 -0
- package/lib/constructs/iam/roles/github-actions.js +77 -0
- package/lib/constructs/iam/roles/github-actions.js.map +1 -0
- package/lib/constructs/iam/roles/index.d.ts +4 -0
- package/lib/constructs/iam/roles/index.d.ts.map +1 -0
- package/lib/constructs/iam/roles/index.js +20 -0
- package/lib/constructs/iam/roles/index.js.map +1 -0
- package/lib/constructs/iam/roles/instance-role.d.ts +38 -0
- package/lib/constructs/iam/roles/instance-role.d.ts.map +1 -0
- package/lib/constructs/iam/roles/instance-role.js +45 -0
- package/lib/constructs/iam/roles/instance-role.js.map +1 -0
- package/lib/constructs/iam/roles/roles.d.ts +8 -0
- package/lib/constructs/iam/roles/roles.d.ts.map +1 -0
- package/lib/constructs/iam/roles/roles.js +11 -0
- package/lib/constructs/iam/roles/roles.js.map +1 -0
- package/lib/constructs/kinesis/index.d.ts +2 -0
- package/lib/constructs/kinesis/index.d.ts.map +1 -0
- package/lib/constructs/kinesis/index.js +18 -0
- package/lib/constructs/kinesis/index.js.map +1 -0
- package/lib/constructs/kinesis/kinesis-stream.d.ts +14 -0
- package/lib/constructs/kinesis/kinesis-stream.d.ts.map +1 -0
- package/lib/constructs/kinesis/kinesis-stream.js +17 -0
- package/lib/constructs/kinesis/kinesis-stream.js.map +1 -0
- package/lib/constructs/lambda/index.d.ts +2 -0
- package/lib/constructs/lambda/index.d.ts.map +1 -0
- package/lib/constructs/lambda/index.js +18 -0
- package/lib/constructs/lambda/index.js.map +1 -0
- package/lib/constructs/lambda/lambda.d.ts +95 -0
- package/lib/constructs/lambda/lambda.d.ts.map +1 -0
- package/lib/constructs/lambda/lambda.js +115 -0
- package/lib/constructs/lambda/lambda.js.map +1 -0
- package/lib/constructs/loadbalancing/alb/application-listener.d.ts +49 -0
- package/lib/constructs/loadbalancing/alb/application-listener.d.ts.map +1 -0
- package/lib/constructs/loadbalancing/alb/application-listener.js +53 -0
- package/lib/constructs/loadbalancing/alb/application-listener.js.map +1 -0
- package/lib/constructs/loadbalancing/alb/application-load-balancer.d.ts +63 -0
- package/lib/constructs/loadbalancing/alb/application-load-balancer.d.ts.map +1 -0
- package/lib/constructs/loadbalancing/alb/application-load-balancer.js +70 -0
- package/lib/constructs/loadbalancing/alb/application-load-balancer.js.map +1 -0
- package/lib/constructs/loadbalancing/alb/application-target-group.d.ts +42 -0
- package/lib/constructs/loadbalancing/alb/application-target-group.d.ts.map +1 -0
- package/lib/constructs/loadbalancing/alb/application-target-group.js +64 -0
- package/lib/constructs/loadbalancing/alb/application-target-group.js.map +1 -0
- package/lib/constructs/loadbalancing/alb/index.d.ts +4 -0
- package/lib/constructs/loadbalancing/alb/index.d.ts.map +1 -0
- package/lib/constructs/loadbalancing/alb/index.js +20 -0
- package/lib/constructs/loadbalancing/alb/index.js.map +1 -0
- package/lib/constructs/loadbalancing/index.d.ts +2 -0
- package/lib/constructs/loadbalancing/index.d.ts.map +1 -0
- package/lib/constructs/loadbalancing/index.js +18 -0
- package/lib/constructs/loadbalancing/index.js.map +1 -0
- package/lib/constructs/rds/index.d.ts +2 -0
- package/lib/constructs/rds/index.d.ts.map +1 -0
- package/lib/constructs/rds/index.js +18 -0
- package/lib/constructs/rds/index.js.map +1 -0
- package/lib/constructs/rds/instance.d.ts +33 -0
- package/lib/constructs/rds/instance.d.ts.map +1 -0
- package/lib/constructs/rds/instance.js +27 -0
- package/lib/constructs/rds/instance.js.map +1 -0
- package/lib/constructs/root.d.ts +32 -0
- package/lib/constructs/root.d.ts.map +1 -0
- package/lib/constructs/root.js +46 -0
- package/lib/constructs/root.js.map +1 -0
- package/lib/constructs/s3/index.d.ts +18 -0
- package/lib/constructs/s3/index.d.ts.map +1 -0
- package/lib/constructs/s3/index.js +21 -0
- package/lib/constructs/s3/index.js.map +1 -0
- package/lib/constructs/ses/index.d.ts +35 -0
- package/lib/constructs/ses/index.d.ts.map +1 -0
- package/lib/constructs/ses/index.js +52 -0
- package/lib/constructs/ses/index.js.map +1 -0
- package/lib/constructs/vpc/index.d.ts +2 -0
- package/lib/constructs/vpc/index.d.ts.map +1 -0
- package/lib/constructs/vpc/index.js +18 -0
- package/lib/constructs/vpc/index.js.map +1 -0
- package/lib/constructs/vpc/vpc.d.ts +57 -0
- package/lib/constructs/vpc/vpc.d.ts.map +1 -0
- package/lib/constructs/vpc/vpc.js +91 -0
- package/lib/constructs/vpc/vpc.js.map +1 -0
- package/lib/experimental/constructs/iam/index.d.ts +2 -0
- package/lib/experimental/constructs/iam/index.d.ts.map +1 -0
- package/lib/experimental/constructs/iam/index.js +18 -0
- package/lib/experimental/constructs/iam/index.js.map +1 -0
- package/lib/experimental/constructs/iam/policies/developer-policy.d.ts +63 -0
- package/lib/experimental/constructs/iam/policies/developer-policy.d.ts.map +1 -0
- package/lib/experimental/constructs/iam/policies/developer-policy.js +150 -0
- package/lib/experimental/constructs/iam/policies/developer-policy.js.map +1 -0
- package/lib/experimental/constructs/iam/policies/index.d.ts +2 -0
- package/lib/experimental/constructs/iam/policies/index.d.ts.map +1 -0
- package/lib/experimental/constructs/iam/policies/index.js +18 -0
- package/lib/experimental/constructs/iam/policies/index.js.map +1 -0
- package/lib/experimental/constructs/iam/roles/fastly-kinesis-log.d.ts +30 -0
- package/lib/experimental/constructs/iam/roles/fastly-kinesis-log.d.ts.map +1 -0
- package/lib/experimental/constructs/iam/roles/fastly-kinesis-log.js +34 -0
- package/lib/experimental/constructs/iam/roles/fastly-kinesis-log.js.map +1 -0
- package/lib/experimental/constructs/iam/roles/index.d.ts +2 -0
- package/lib/experimental/constructs/iam/roles/index.d.ts.map +1 -0
- package/lib/experimental/constructs/iam/roles/index.js +18 -0
- package/lib/experimental/constructs/iam/roles/index.js.map +1 -0
- package/lib/experimental/constructs/policies/index.d.ts +2 -0
- package/lib/experimental/constructs/policies/index.d.ts.map +1 -0
- package/lib/experimental/constructs/policies/index.js +18 -0
- package/lib/experimental/constructs/policies/index.js.map +1 -0
- package/lib/experimental/constructs/policies/kinesis-put-records.d.ts +11 -0
- package/lib/experimental/constructs/policies/kinesis-put-records.d.ts.map +1 -0
- package/lib/experimental/constructs/policies/kinesis-put-records.js +12 -0
- package/lib/experimental/constructs/policies/kinesis-put-records.js.map +1 -0
- package/lib/experimental/constructs/riff-raff-deployment-id.d.ts +8 -0
- package/lib/experimental/constructs/riff-raff-deployment-id.d.ts.map +1 -0
- package/lib/experimental/constructs/riff-raff-deployment-id.js +21 -0
- package/lib/experimental/constructs/riff-raff-deployment-id.js.map +1 -0
- package/lib/experimental/patterns/ec2-app.d.ts +175 -0
- package/lib/experimental/patterns/ec2-app.d.ts.map +1 -0
- package/lib/experimental/patterns/ec2-app.js +412 -0
- package/lib/experimental/patterns/ec2-app.js.map +1 -0
- package/lib/experimental/patterns/gu-load-balanced-app.d.ts +360 -0
- package/lib/experimental/patterns/gu-load-balanced-app.d.ts.map +1 -0
- package/lib/experimental/patterns/gu-load-balanced-app.js +520 -0
- package/lib/experimental/patterns/gu-load-balanced-app.js.map +1 -0
- package/lib/experimental/patterns/index.d.ts +3 -0
- package/lib/experimental/patterns/index.d.ts.map +1 -0
- package/lib/experimental/patterns/index.js +19 -0
- package/lib/experimental/patterns/index.js.map +1 -0
- package/lib/experimental/patterns/kinesis-lambda.d.ts +75 -0
- package/lib/experimental/patterns/kinesis-lambda.d.ts.map +1 -0
- package/lib/experimental/patterns/kinesis-lambda.js +48 -0
- package/lib/experimental/patterns/kinesis-lambda.js.map +1 -0
- package/lib/experimental/patterns/sns-lambda.d.ts +62 -0
- package/lib/experimental/patterns/sns-lambda.d.ts.map +1 -0
- package/lib/experimental/patterns/sns-lambda.js +41 -0
- package/lib/experimental/patterns/sns-lambda.js.map +1 -0
- package/lib/index.d.ts +2 -0
- package/lib/index.d.ts.map +1 -0
- package/lib/index.js +18 -0
- package/lib/index.js.map +1 -0
- package/lib/patterns/api-lambda.d.ts +61 -0
- package/lib/patterns/api-lambda.d.ts.map +1 -0
- package/lib/patterns/api-lambda.js +62 -0
- package/lib/patterns/api-lambda.js.map +1 -0
- package/lib/patterns/api-multiple-lambdas.d.ts +122 -0
- package/lib/patterns/api-multiple-lambdas.d.ts.map +1 -0
- package/lib/patterns/api-multiple-lambdas.js +93 -0
- package/lib/patterns/api-multiple-lambdas.js.map +1 -0
- package/lib/patterns/ec2-app/base.d.ts +325 -0
- package/lib/patterns/ec2-app/base.d.ts.map +1 -0
- package/lib/patterns/ec2-app/base.js +273 -0
- package/lib/patterns/ec2-app/base.js.map +1 -0
- package/lib/patterns/ec2-app/framework.d.ts +32 -0
- package/lib/patterns/ec2-app/framework.d.ts.map +1 -0
- package/lib/patterns/ec2-app/framework.js +46 -0
- package/lib/patterns/ec2-app/framework.js.map +1 -0
- package/lib/patterns/ec2-app/index.d.ts +3 -0
- package/lib/patterns/ec2-app/index.d.ts.map +1 -0
- package/lib/patterns/ec2-app/index.js +19 -0
- package/lib/patterns/ec2-app/index.js.map +1 -0
- package/lib/patterns/index.d.ts +6 -0
- package/lib/patterns/index.d.ts.map +1 -0
- package/lib/patterns/index.js +22 -0
- package/lib/patterns/index.js.map +1 -0
- package/lib/patterns/scheduled-ecs-task.d.ts +36 -0
- package/lib/patterns/scheduled-ecs-task.d.ts.map +1 -0
- package/lib/patterns/scheduled-ecs-task.js +30 -0
- package/lib/patterns/scheduled-ecs-task.js.map +1 -0
- package/lib/patterns/scheduled-lambda.d.ts +42 -0
- package/lib/patterns/scheduled-lambda.d.ts.map +1 -0
- package/lib/patterns/scheduled-lambda.js +33 -0
- package/lib/patterns/scheduled-lambda.js.map +1 -0
- package/lib/riff-raff-yaml-file/deployments/autoscaling.d.ts +5 -0
- package/lib/riff-raff-yaml-file/deployments/autoscaling.d.ts.map +1 -0
- package/lib/riff-raff-yaml-file/deployments/autoscaling.js +44 -0
- package/lib/riff-raff-yaml-file/deployments/autoscaling.js.map +1 -0
- package/lib/riff-raff-yaml-file/deployments/cloudformation.d.ts +7 -0
- package/lib/riff-raff-yaml-file/deployments/cloudformation.d.ts.map +1 -0
- package/lib/riff-raff-yaml-file/deployments/cloudformation.js +64 -0
- package/lib/riff-raff-yaml-file/deployments/cloudformation.js.map +1 -0
- package/lib/riff-raff-yaml-file/deployments/lambda.d.ts +5 -0
- package/lib/riff-raff-yaml-file/deployments/lambda.d.ts.map +1 -0
- package/lib/riff-raff-yaml-file/deployments/lambda.js +71 -0
- package/lib/riff-raff-yaml-file/deployments/lambda.js.map +1 -0
- package/lib/riff-raff-yaml-file/deployments/update-parameters.d.ts +3 -0
- package/lib/riff-raff-yaml-file/deployments/update-parameters.d.ts.map +1 -0
- package/lib/riff-raff-yaml-file/deployments/update-parameters.js +17 -0
- package/lib/riff-raff-yaml-file/deployments/update-parameters.js.map +1 -0
- package/lib/riff-raff-yaml-file/group-by.d.ts +8 -0
- package/lib/riff-raff-yaml-file/group-by.d.ts.map +1 -0
- package/lib/riff-raff-yaml-file/group-by.js +25 -0
- package/lib/riff-raff-yaml-file/group-by.js.map +1 -0
- package/lib/riff-raff-yaml-file/index.d.ts +71 -0
- package/lib/riff-raff-yaml-file/index.d.ts.map +1 -0
- package/lib/riff-raff-yaml-file/index.js +244 -0
- package/lib/riff-raff-yaml-file/index.js.map +1 -0
- package/lib/riff-raff-yaml-file/types.d.ts +35 -0
- package/lib/riff-raff-yaml-file/types.d.ts.map +1 -0
- package/lib/riff-raff-yaml-file/types.js +10 -0
- package/lib/riff-raff-yaml-file/types.js.map +1 -0
- package/lib/types/access.d.ts +66 -0
- package/lib/types/access.d.ts.map +1 -0
- package/lib/types/access.js +39 -0
- package/lib/types/access.js.map +1 -0
- package/lib/types/amigo.d.ts +17 -0
- package/lib/types/amigo.d.ts.map +1 -0
- package/lib/types/amigo.js +3 -0
- package/lib/types/amigo.js.map +1 -0
- package/lib/types/asg.d.ts +19 -0
- package/lib/types/asg.d.ts.map +1 -0
- package/lib/types/asg.js +3 -0
- package/lib/types/asg.js.map +1 -0
- package/lib/types/cli.d.ts +12 -0
- package/lib/types/cli.d.ts.map +1 -0
- package/lib/types/cli.js +3 -0
- package/lib/types/cli.js.map +1 -0
- package/lib/types/distributable.d.ts +19 -0
- package/lib/types/distributable.d.ts.map +1 -0
- package/lib/types/distributable.js +9 -0
- package/lib/types/distributable.js.map +1 -0
- package/lib/types/domain-names.d.ts +15 -0
- package/lib/types/domain-names.d.ts.map +1 -0
- package/lib/types/domain-names.js +3 -0
- package/lib/types/domain-names.js.map +1 -0
- package/lib/types/index.d.ts +5 -0
- package/lib/types/index.d.ts.map +1 -0
- package/lib/types/index.js +21 -0
- package/lib/types/index.js.map +1 -0
- package/lib/utils/array.d.ts +7 -0
- package/lib/utils/array.d.ts.map +1 -0
- package/lib/utils/array.js +19 -0
- package/lib/utils/array.js.map +1 -0
- package/lib/utils/cli/vpc.d.ts +8 -0
- package/lib/utils/cli/vpc.d.ts.map +1 -0
- package/lib/utils/cli/vpc.js +74 -0
- package/lib/utils/cli/vpc.js.map +1 -0
- package/lib/utils/cognito/cognito.d.ts +2 -0
- package/lib/utils/cognito/cognito.d.ts.map +1 -0
- package/lib/utils/cognito/cognito.js +19 -0
- package/lib/utils/cognito/cognito.js.map +1 -0
- package/lib/utils/ec2/index.d.ts +2 -0
- package/lib/utils/ec2/index.d.ts.map +1 -0
- package/lib/utils/ec2/index.js +18 -0
- package/lib/utils/ec2/index.js.map +1 -0
- package/lib/utils/ec2/private-config.d.ts +11 -0
- package/lib/utils/ec2/private-config.d.ts.map +1 -0
- package/lib/utils/ec2/private-config.js +3 -0
- package/lib/utils/ec2/private-config.js.map +1 -0
- package/lib/utils/exec.d.ts +7 -0
- package/lib/utils/exec.d.ts.map +1 -0
- package/lib/utils/exec.js +46 -0
- package/lib/utils/exec.js.map +1 -0
- package/lib/utils/git.d.ts +3 -0
- package/lib/utils/git.d.ts.map +1 -0
- package/lib/utils/git.js +23 -0
- package/lib/utils/git.js.map +1 -0
- package/lib/utils/lambda/event-source.d.ts +52 -0
- package/lib/utils/lambda/event-source.d.ts.map +1 -0
- package/lib/utils/lambda/event-source.js +41 -0
- package/lib/utils/lambda/event-source.js.map +1 -0
- package/lib/utils/lambda/index.d.ts +2 -0
- package/lib/utils/lambda/index.d.ts.map +1 -0
- package/lib/utils/lambda/index.js +18 -0
- package/lib/utils/lambda/index.js.map +1 -0
- package/lib/utils/math.d.ts +2 -0
- package/lib/utils/math.d.ts.map +1 -0
- package/lib/utils/math.js +6 -0
- package/lib/utils/math.js.map +1 -0
- package/lib/utils/mixin/app-aware-construct.d.ts +11 -0
- package/lib/utils/mixin/app-aware-construct.d.ts.map +1 -0
- package/lib/utils/mixin/app-aware-construct.js +35 -0
- package/lib/utils/mixin/app-aware-construct.js.map +1 -0
- package/lib/utils/mixin/types.d.ts +2 -0
- package/lib/utils/mixin/types.d.ts.map +1 -0
- package/lib/utils/mixin/types.js +3 -0
- package/lib/utils/mixin/types.js.map +1 -0
- package/lib/utils/security-groups/helpers.d.ts +4 -0
- package/lib/utils/security-groups/helpers.d.ts.map +1 -0
- package/lib/utils/security-groups/helpers.js +15 -0
- package/lib/utils/security-groups/helpers.js.map +1 -0
- package/lib/utils/security-groups/index.d.ts +2 -0
- package/lib/utils/security-groups/index.d.ts.map +1 -0
- package/lib/utils/security-groups/index.js +18 -0
- package/lib/utils/security-groups/index.js.map +1 -0
- package/lib/utils/singleton.d.ts +40 -0
- package/lib/utils/singleton.d.ts.map +1 -0
- package/lib/utils/singleton.js +43 -0
- package/lib/utils/singleton.js.map +1 -0
- package/lib/utils/string.d.ts +3 -0
- package/lib/utils/string.d.ts.map +1 -0
- package/lib/utils/string.js +19 -0
- package/lib/utils/string.js.map +1 -0
- package/lib/utils/test/assertions.d.ts +24 -0
- package/lib/utils/test/assertions.d.ts.map +1 -0
- package/lib/utils/test/assertions.js +88 -0
- package/lib/utils/test/assertions.js.map +1 -0
- package/lib/utils/test/attach-policy-to-test-role.d.ts +4 -0
- package/lib/utils/test/attach-policy-to-test-role.d.ts.map +1 -0
- package/lib/utils/test/attach-policy-to-test-role.js +15 -0
- package/lib/utils/test/attach-policy-to-test-role.js.map +1 -0
- package/lib/utils/test/index.d.ts +5 -0
- package/lib/utils/test/index.d.ts.map +1 -0
- package/lib/utils/test/index.js +21 -0
- package/lib/utils/test/index.js.map +1 -0
- package/lib/utils/test/simple-gu-stack.d.ts +4 -0
- package/lib/utils/test/simple-gu-stack.d.ts.map +1 -0
- package/lib/utils/test/simple-gu-stack.js +13 -0
- package/lib/utils/test/simple-gu-stack.js.map +1 -0
- package/lib/utils/test/template.d.ts +12 -0
- package/lib/utils/test/template.d.ts.map +1 -0
- package/lib/utils/test/template.js +28 -0
- package/lib/utils/test/template.js.map +1 -0
- package/package.json +72 -0
package/lib/bin/index.js
ADDED
|
@@ -0,0 +1,124 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
"use strict";
|
|
3
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
4
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
5
|
+
};
|
|
6
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7
|
+
const yargs_1 = __importDefault(require("yargs"));
|
|
8
|
+
const constants_1 = require("../constants");
|
|
9
|
+
const aws_credential_provider_1 = require("./aws-credential-provider");
|
|
10
|
+
const account_readiness_1 = require("./commands/account-readiness");
|
|
11
|
+
const aws_cdk_version_1 = require("./commands/aws-cdk-version");
|
|
12
|
+
const new_project_1 = require("./commands/new-project");
|
|
13
|
+
const Commands = {
|
|
14
|
+
AwsCdkVersion: "aws-cdk-version",
|
|
15
|
+
AccountReadiness: "account-readiness",
|
|
16
|
+
New: "new",
|
|
17
|
+
};
|
|
18
|
+
const parseCommandLineArguments = () => {
|
|
19
|
+
/*
|
|
20
|
+
The type of `yargs.argv` is `T | Promise<T>`.
|
|
21
|
+
To avoid creating custom type guards, use `Promise.resolve` which takes `T | PromiseLike<T>` and returns `Promise<T>`.
|
|
22
|
+
That is, use `Promise.resolve` to provide a single type.
|
|
23
|
+
See https://github.com/DefinitelyTyped/DefinitelyTyped/blob/7b2f0d45985538a40df96244481bfc6cd309c250/types/yargs/index.d.ts#L74
|
|
24
|
+
*/
|
|
25
|
+
return Promise.resolve(yargs_1.default
|
|
26
|
+
.usage("$0 COMMAND [args]")
|
|
27
|
+
.command(Commands.AwsCdkVersion, "Print the version of AWS CDK libraries being used")
|
|
28
|
+
.command(Commands.AccountReadiness, "Perform checks on an AWS account to see if it is GuCDK ready", (yargs) => yargs
|
|
29
|
+
.option("profile", { type: "string", description: "AWS profile" })
|
|
30
|
+
.option("region", { type: "string", description: "AWS region", default: "eu-west-1" }))
|
|
31
|
+
.command(Commands.New, "Creates a new CDK project within a `cdk` directory at the root of the repository", (yargs) => yargs
|
|
32
|
+
.option("init", {
|
|
33
|
+
type: "boolean",
|
|
34
|
+
description: "Create the cdk directory before building the app and stack files (defaults to true)",
|
|
35
|
+
default: true,
|
|
36
|
+
})
|
|
37
|
+
.option("app", {
|
|
38
|
+
type: "string",
|
|
39
|
+
description: "The name of your application e.g. Amigo",
|
|
40
|
+
demandOption: true,
|
|
41
|
+
})
|
|
42
|
+
.option("stack", {
|
|
43
|
+
type: "string",
|
|
44
|
+
description: "The Guardian stack being used (as defined in your riff-raff.yaml). This will be applied as a tag to all of your resources.",
|
|
45
|
+
demandOption: true,
|
|
46
|
+
})
|
|
47
|
+
.option("yaml-template-location", {
|
|
48
|
+
type: "string",
|
|
49
|
+
description: "Path to the YAML CloudFormation template",
|
|
50
|
+
})
|
|
51
|
+
.option("stage", {
|
|
52
|
+
description: "The stage(s) for your stack. Can be specified multiple times, e.g. --stage CODE --stage PROD",
|
|
53
|
+
type: "array",
|
|
54
|
+
demandOption: true,
|
|
55
|
+
})
|
|
56
|
+
.option("region", {
|
|
57
|
+
description: "The region(s) for your stack. Can be specified multiple times, e.g. --region eu-west-1 --region us-east-1",
|
|
58
|
+
type: "array",
|
|
59
|
+
default: ["eu-west-1"],
|
|
60
|
+
})
|
|
61
|
+
.option("package-manager", {
|
|
62
|
+
description: "The Node package manager to use. Match this to the repository (package-lock.json = npm, yarn.lock = yarn). If the repository has neither file, and there is no strong convention in your team, we recommend npm.",
|
|
63
|
+
choices: ["npm", "yarn"],
|
|
64
|
+
demandOption: true,
|
|
65
|
+
}))
|
|
66
|
+
.version(`${constants_1.LibraryInfo.VERSION} (using aws-cdk ${constants_1.LibraryInfo.AWS_CDK_VERSION}, aws-cdk-lib ${constants_1.LibraryInfo.AWS_CDK_LIB_VERSION}, constructs ${constants_1.LibraryInfo.CONSTRUCTS_VERSION})`)
|
|
67
|
+
.demandCommand(1, "") // just print help
|
|
68
|
+
.help()
|
|
69
|
+
.alias("h", "help").argv);
|
|
70
|
+
};
|
|
71
|
+
parseCommandLineArguments()
|
|
72
|
+
.then((argv) => {
|
|
73
|
+
const command = argv._[0];
|
|
74
|
+
switch (command) {
|
|
75
|
+
case Commands.AwsCdkVersion: {
|
|
76
|
+
return (0, aws_cdk_version_1.awsCdkVersionCommand)();
|
|
77
|
+
}
|
|
78
|
+
case Commands.AccountReadiness: {
|
|
79
|
+
// TODO remove casting as yargs should be able to infer the type of the options
|
|
80
|
+
const profile = argv.profile;
|
|
81
|
+
const region = argv.region;
|
|
82
|
+
return (0, account_readiness_1.accountReadinessCommand)({ credentialProvider: (0, aws_credential_provider_1.awsCredentialProviderChain)(profile), region: region });
|
|
83
|
+
}
|
|
84
|
+
case Commands.New: {
|
|
85
|
+
// TODO remove casting as yargs should be able to infer the type of the options
|
|
86
|
+
const init = argv.init;
|
|
87
|
+
const app = argv.app;
|
|
88
|
+
const stack = argv.stack;
|
|
89
|
+
const yamlTemplateLocation = argv["yaml-template-location"];
|
|
90
|
+
const stage = argv.stage;
|
|
91
|
+
const regions = argv.region;
|
|
92
|
+
const packageManager = argv["package-manager"];
|
|
93
|
+
const stages = stage.map((_) => _.toUpperCase());
|
|
94
|
+
return (0, new_project_1.newCdkProject)({
|
|
95
|
+
init,
|
|
96
|
+
app,
|
|
97
|
+
stack,
|
|
98
|
+
yamlTemplateLocation,
|
|
99
|
+
stages,
|
|
100
|
+
regions,
|
|
101
|
+
packageManager: packageManager,
|
|
102
|
+
});
|
|
103
|
+
}
|
|
104
|
+
default:
|
|
105
|
+
throw new Error(`Unknown command: ${command ?? ""}`);
|
|
106
|
+
}
|
|
107
|
+
})
|
|
108
|
+
.then((commandResponse) => {
|
|
109
|
+
if (typeof commandResponse === "number") {
|
|
110
|
+
process.exitCode = commandResponse;
|
|
111
|
+
}
|
|
112
|
+
else if (typeof commandResponse === "string") {
|
|
113
|
+
console.log(commandResponse);
|
|
114
|
+
}
|
|
115
|
+
else {
|
|
116
|
+
const responseWithVersionInfo = { "@guardian/cdk": { version: constants_1.LibraryInfo.VERSION }, ...commandResponse };
|
|
117
|
+
console.log(JSON.stringify(responseWithVersionInfo));
|
|
118
|
+
}
|
|
119
|
+
})
|
|
120
|
+
.catch((err) => {
|
|
121
|
+
console.error(err);
|
|
122
|
+
process.exitCode = 1;
|
|
123
|
+
});
|
|
124
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/bin/index.ts"],"names":[],"mappings":"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","sourcesContent":["#!/usr/bin/env node\n\nimport yargs from \"yargs\";\nimport { LibraryInfo } from \"../constants\";\nimport type { CliCommandResponse } from \"../types/cli\";\nimport { awsCredentialProviderChain } from \"./aws-credential-provider\";\nimport { accountReadinessCommand } from \"./commands/account-readiness\";\nimport { awsCdkVersionCommand } from \"./commands/aws-cdk-version\";\nimport type { PackageManager } from \"./commands/new-project\";\nimport { newCdkProject } from \"./commands/new-project\";\n\nconst Commands = {\n AwsCdkVersion: \"aws-cdk-version\",\n AccountReadiness: \"account-readiness\",\n New: \"new\",\n};\n\nconst parseCommandLineArguments = () => {\n /*\n The type of `yargs.argv` is `T | Promise<T>`.\n To avoid creating custom type guards, use `Promise.resolve` which takes `T | PromiseLike<T>` and returns `Promise<T>`.\n That is, use `Promise.resolve` to provide a single type.\n See https://github.com/DefinitelyTyped/DefinitelyTyped/blob/7b2f0d45985538a40df96244481bfc6cd309c250/types/yargs/index.d.ts#L74\n */\n return Promise.resolve(\n yargs\n .usage(\"$0 COMMAND [args]\")\n .command(Commands.AwsCdkVersion, \"Print the version of AWS CDK libraries being used\")\n .command(Commands.AccountReadiness, \"Perform checks on an AWS account to see if it is GuCDK ready\", (yargs) =>\n yargs\n .option(\"profile\", { type: \"string\", description: \"AWS profile\" })\n .option(\"region\", { type: \"string\", description: \"AWS region\", default: \"eu-west-1\" }),\n )\n .command(\n Commands.New,\n \"Creates a new CDK project within a `cdk` directory at the root of the repository\",\n (yargs) =>\n yargs\n .option(\"init\", {\n type: \"boolean\",\n description: \"Create the cdk directory before building the app and stack files (defaults to true)\",\n default: true,\n })\n .option(\"app\", {\n type: \"string\",\n description: \"The name of your application e.g. Amigo\",\n demandOption: true,\n })\n .option(\"stack\", {\n type: \"string\",\n description:\n \"The Guardian stack being used (as defined in your riff-raff.yaml). This will be applied as a tag to all of your resources.\",\n demandOption: true,\n })\n .option(\"yaml-template-location\", {\n type: \"string\",\n description: \"Path to the YAML CloudFormation template\",\n })\n .option(\"stage\", {\n description:\n \"The stage(s) for your stack. Can be specified multiple times, e.g. --stage CODE --stage PROD\",\n type: \"array\",\n demandOption: true,\n })\n .option(\"region\", {\n description:\n \"The region(s) for your stack. Can be specified multiple times, e.g. --region eu-west-1 --region us-east-1\",\n type: \"array\",\n default: [\"eu-west-1\"],\n })\n .option(\"package-manager\", {\n description:\n \"The Node package manager to use. Match this to the repository (package-lock.json = npm, yarn.lock = yarn). If the repository has neither file, and there is no strong convention in your team, we recommend npm.\",\n choices: [\"npm\", \"yarn\"],\n demandOption: true,\n }),\n )\n .version(\n `${LibraryInfo.VERSION} (using aws-cdk ${LibraryInfo.AWS_CDK_VERSION}, aws-cdk-lib ${LibraryInfo.AWS_CDK_LIB_VERSION}, constructs ${LibraryInfo.CONSTRUCTS_VERSION})`,\n )\n .demandCommand(1, \"\") // just print help\n .help()\n .alias(\"h\", \"help\").argv,\n );\n};\n\nparseCommandLineArguments()\n .then((argv): CliCommandResponse => {\n const command = argv._[0];\n switch (command) {\n case Commands.AwsCdkVersion: {\n return awsCdkVersionCommand();\n }\n case Commands.AccountReadiness: {\n // TODO remove casting as yargs should be able to infer the type of the options\n const profile = argv.profile as string;\n const region = argv.region as string;\n return accountReadinessCommand({ credentialProvider: awsCredentialProviderChain(profile), region: region });\n }\n case Commands.New: {\n // TODO remove casting as yargs should be able to infer the type of the options\n const init = argv.init as boolean;\n const app = argv.app as string;\n const stack = argv.stack as string;\n const yamlTemplateLocation = argv[\"yaml-template-location\"] as string | undefined;\n const stage = argv.stage as string[];\n const regions = argv.region as string[];\n const packageManager = argv[\"package-manager\"] as string;\n\n const stages = stage.map((_) => _.toUpperCase());\n\n return newCdkProject({\n init,\n app,\n stack,\n yamlTemplateLocation,\n stages,\n regions,\n packageManager: packageManager as PackageManager,\n });\n }\n default:\n throw new Error(`Unknown command: ${command ?? \"\"}`);\n }\n })\n .then((commandResponse) => {\n if (typeof commandResponse === \"number\") {\n process.exitCode = commandResponse;\n } else if (typeof commandResponse === \"string\") {\n console.log(commandResponse);\n } else {\n const responseWithVersionInfo = { \"@guardian/cdk\": { version: LibraryInfo.VERSION }, ...commandResponse };\n console.log(JSON.stringify(responseWithVersionInfo));\n }\n })\n .catch((err) => {\n console.error(err);\n process.exitCode = 1;\n });\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"library-info.d.ts","sourceRoot":"","sources":["../../../src/constants/__mocks__/library-info.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,WAAW;;;;CAIvB,CAAC"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.LibraryInfo = void 0;
|
|
4
|
+
const mockAwsCdkVersion = "0.0.1";
|
|
5
|
+
const mockConstructsVersion = "0.0.1";
|
|
6
|
+
exports.LibraryInfo = {
|
|
7
|
+
VERSION: "1.0.0",
|
|
8
|
+
AWS_CDK_VERSION: mockAwsCdkVersion,
|
|
9
|
+
CONSTRUCTS_VERSION: mockConstructsVersion,
|
|
10
|
+
};
|
|
11
|
+
//# sourceMappingURL=library-info.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"library-info.js","sourceRoot":"","sources":["../../../src/constants/__mocks__/library-info.ts"],"names":[],"mappings":";;;AAAA,MAAM,iBAAiB,GAAG,OAAO,CAAC;AAClC,MAAM,qBAAqB,GAAG,OAAO,CAAC;AAEzB,QAAA,WAAW,GAAG;IACzB,OAAO,EAAE,OAAO;IAChB,eAAe,EAAE,iBAAiB;IAClC,kBAAkB,EAAE,qBAAqB;CAC1C,CAAC","sourcesContent":["const mockAwsCdkVersion = \"0.0.1\";\nconst mockConstructsVersion = \"0.0.1\";\n\nexport const LibraryInfo = {\n VERSION: \"1.0.0\",\n AWS_CDK_VERSION: mockAwsCdkVersion,\n CONSTRUCTS_VERSION: mockConstructsVersion,\n};\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tracking-tag.d.ts","sourceRoot":"","sources":["../../../src/constants/__mocks__/tracking-tag.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,WAAW;;;CAGvB,CAAC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.TrackingTag = void 0;
|
|
4
|
+
const metadata_keys_1 = require("../metadata-keys");
|
|
5
|
+
exports.TrackingTag = {
|
|
6
|
+
Key: metadata_keys_1.MetadataKeys.VERSION,
|
|
7
|
+
Value: "TEST",
|
|
8
|
+
};
|
|
9
|
+
//# sourceMappingURL=tracking-tag.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tracking-tag.js","sourceRoot":"","sources":["../../../src/constants/__mocks__/tracking-tag.ts"],"names":[],"mappings":";;;AAAA,oDAAgD;AAEnC,QAAA,WAAW,GAAG;IACzB,GAAG,EAAE,4BAAY,CAAC,OAAO;IACzB,KAAK,EAAE,MAAM;CACd,CAAC","sourcesContent":["import { MetadataKeys } from \"../metadata-keys\";\n\nexport const TrackingTag = {\n Key: MetadataKeys.VERSION,\n Value: \"TEST\",\n};\n"]}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* An enum representing different types of application access.
|
|
3
|
+
*/
|
|
4
|
+
export declare enum AccessScope {
|
|
5
|
+
/**
|
|
6
|
+
* For when you want your application to be accessible to the world (0.0.0.0/0).
|
|
7
|
+
*/
|
|
8
|
+
PUBLIC = "Public",
|
|
9
|
+
/**
|
|
10
|
+
* For when you want to restrict your application's access to a list of CIDR ranges.
|
|
11
|
+
*/
|
|
12
|
+
RESTRICTED = "Restricted",
|
|
13
|
+
/**
|
|
14
|
+
* For when you want to restrict your application's access to the VPC.
|
|
15
|
+
*/
|
|
16
|
+
INTERNAL = "Internal"
|
|
17
|
+
}
|
|
18
|
+
//# sourceMappingURL=access.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"access.d.ts","sourceRoot":"","sources":["../../src/constants/access.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,oBAAY,WAAW;IACrB;;OAEG;IACH,MAAM,WAAW;IAEjB;;OAEG;IACH,UAAU,eAAe;IAEzB;;OAEG;IACH,QAAQ,aAAa;CACtB"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.AccessScope = void 0;
|
|
4
|
+
/**
|
|
5
|
+
* An enum representing different types of application access.
|
|
6
|
+
*/
|
|
7
|
+
var AccessScope;
|
|
8
|
+
(function (AccessScope) {
|
|
9
|
+
/**
|
|
10
|
+
* For when you want your application to be accessible to the world (0.0.0.0/0).
|
|
11
|
+
*/
|
|
12
|
+
AccessScope["PUBLIC"] = "Public";
|
|
13
|
+
/**
|
|
14
|
+
* For when you want to restrict your application's access to a list of CIDR ranges.
|
|
15
|
+
*/
|
|
16
|
+
AccessScope["RESTRICTED"] = "Restricted";
|
|
17
|
+
/**
|
|
18
|
+
* For when you want to restrict your application's access to the VPC.
|
|
19
|
+
*/
|
|
20
|
+
AccessScope["INTERNAL"] = "Internal";
|
|
21
|
+
})(AccessScope || (exports.AccessScope = AccessScope = {}));
|
|
22
|
+
//# sourceMappingURL=access.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"access.js","sourceRoot":"","sources":["../../src/constants/access.ts"],"names":[],"mappings":";;;AAAA;;GAEG;AACH,IAAY,WAeX;AAfD,WAAY,WAAW;IACrB;;OAEG;IACH,gCAAiB,CAAA;IAEjB;;OAEG;IACH,wCAAyB,CAAA;IAEzB;;OAEG;IACH,oCAAqB,CAAA;AACvB,CAAC,EAfW,WAAW,2BAAX,WAAW,QAetB","sourcesContent":["/**\n * An enum representing different types of application access.\n */\nexport enum AccessScope {\n /**\n * For when you want your application to be accessible to the world (0.0.0.0/0).\n */\n PUBLIC = \"Public\",\n\n /**\n * For when you want to restrict your application's access to a list of CIDR ranges.\n */\n RESTRICTED = \"Restricted\",\n\n /**\n * For when you want to restrict your application's access to the VPC.\n */\n INTERNAL = \"Internal\",\n}\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"context-keys.d.ts","sourceRoot":"","sources":["../../src/constants/context-keys.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,eAAO,MAAM,WAAW;;CAEvB,CAAC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ContextKeys = void 0;
|
|
4
|
+
/**
|
|
5
|
+
* A list of items we will read from the CDK context
|
|
6
|
+
*/
|
|
7
|
+
exports.ContextKeys = {
|
|
8
|
+
REPOSITORY_URL: "repository_url",
|
|
9
|
+
};
|
|
10
|
+
//# sourceMappingURL=context-keys.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"context-keys.js","sourceRoot":"","sources":["../../src/constants/context-keys.ts"],"names":[],"mappings":";;;AAAA;;GAEG;AACU,QAAA,WAAW,GAAG;IACzB,cAAc,EAAE,gBAAgB;CACjC,CAAC","sourcesContent":["/**\n * A list of items we will read from the CDK context\n */\nexport const ContextKeys = {\n REPOSITORY_URL: \"repository_url\",\n};\n"]}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Fastly's AWS account ID.
|
|
3
|
+
* This is needed by IAM roles assumed by Fastly in order to write into
|
|
4
|
+
* an S3 bucket or a Kinesis stream.
|
|
5
|
+
* See https://docs.fastly.com/en/guides/creating-an-aws-iam-role-for-fastly-logging
|
|
6
|
+
*/
|
|
7
|
+
export declare const FASTLY_AWS_ACCOUNT_ID = "717331877981";
|
|
8
|
+
//# sourceMappingURL=fastly-aws-account-id.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"fastly-aws-account-id.d.ts","sourceRoot":"","sources":["../../src/constants/fastly-aws-account-id.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,eAAO,MAAM,qBAAqB,iBAAiB,CAAC"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.FASTLY_AWS_ACCOUNT_ID = void 0;
|
|
4
|
+
/**
|
|
5
|
+
* Fastly's AWS account ID.
|
|
6
|
+
* This is needed by IAM roles assumed by Fastly in order to write into
|
|
7
|
+
* an S3 bucket or a Kinesis stream.
|
|
8
|
+
* See https://docs.fastly.com/en/guides/creating-an-aws-iam-role-for-fastly-logging
|
|
9
|
+
*/
|
|
10
|
+
exports.FASTLY_AWS_ACCOUNT_ID = "717331877981";
|
|
11
|
+
//# sourceMappingURL=fastly-aws-account-id.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"fastly-aws-account-id.js","sourceRoot":"","sources":["../../src/constants/fastly-aws-account-id.ts"],"names":[],"mappings":";;;AAAA;;;;;GAKG;AACU,QAAA,qBAAqB,GAAG,cAAc,CAAC","sourcesContent":["/**\n * Fastly's AWS account ID.\n * This is needed by IAM roles assumed by Fastly in order to write into\n * an S3 bucket or a Kinesis stream.\n * See https://docs.fastly.com/en/guides/creating-an-aws-iam-role-for-fastly-logging\n */\nexport const FASTLY_AWS_ACCOUNT_ID = \"717331877981\";\n"]}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export * from "./access";
|
|
2
|
+
export * from "./context-keys";
|
|
3
|
+
export * from "./library-info";
|
|
4
|
+
export * from "./regex-pattern";
|
|
5
|
+
export * from "./ssm-parameter-paths";
|
|
6
|
+
export * from "./metadata-keys";
|
|
7
|
+
export * from "./tracking-tag";
|
|
8
|
+
export * from "./fastly-aws-account-id";
|
|
9
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/constants/index.ts"],"names":[],"mappings":"AAAA,cAAc,UAAU,CAAC;AACzB,cAAc,gBAAgB,CAAC;AAC/B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,iBAAiB,CAAC;AAChC,cAAc,uBAAuB,CAAC;AACtC,cAAc,iBAAiB,CAAC;AAChC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,yBAAyB,CAAC"}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./access"), exports);
|
|
18
|
+
__exportStar(require("./context-keys"), exports);
|
|
19
|
+
__exportStar(require("./library-info"), exports);
|
|
20
|
+
__exportStar(require("./regex-pattern"), exports);
|
|
21
|
+
__exportStar(require("./ssm-parameter-paths"), exports);
|
|
22
|
+
__exportStar(require("./metadata-keys"), exports);
|
|
23
|
+
__exportStar(require("./tracking-tag"), exports);
|
|
24
|
+
__exportStar(require("./fastly-aws-account-id"), exports);
|
|
25
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/constants/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,2CAAyB;AACzB,iDAA+B;AAC/B,iDAA+B;AAC/B,kDAAgC;AAChC,wDAAsC;AACtC,kDAAgC;AAChC,iDAA+B;AAC/B,0DAAwC","sourcesContent":["export * from \"./access\";\nexport * from \"./context-keys\";\nexport * from \"./library-info\";\nexport * from \"./regex-pattern\";\nexport * from \"./ssm-parameter-paths\";\nexport * from \"./metadata-keys\";\nexport * from \"./tracking-tag\";\nexport * from \"./fastly-aws-account-id\";\n"]}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
export declare function getDevDependency(packageName: string): string | undefined;
|
|
2
|
+
export declare function getDependency(packageName: string): string | undefined;
|
|
3
|
+
export declare const LibraryInfo: {
|
|
4
|
+
/**
|
|
5
|
+
* The name of this package
|
|
6
|
+
*/
|
|
7
|
+
NAME: string;
|
|
8
|
+
/**
|
|
9
|
+
* The current version of `@guardian/cdk`.
|
|
10
|
+
*/
|
|
11
|
+
VERSION: string;
|
|
12
|
+
/**
|
|
13
|
+
* The version of the `aws-cdk` library used by `@guardian/cdk`.
|
|
14
|
+
* You need to match this version exactly.
|
|
15
|
+
*/
|
|
16
|
+
AWS_CDK_VERSION: string;
|
|
17
|
+
/**
|
|
18
|
+
* The version of the `aws-cdk-lib` library used by `@guardian/cdk`.
|
|
19
|
+
* You need to match this version exactly.
|
|
20
|
+
*/
|
|
21
|
+
AWS_CDK_LIB_VERSION: string;
|
|
22
|
+
/**
|
|
23
|
+
* The version of the `constructs` library used by `@guardian/cdk`.
|
|
24
|
+
* You need to match this version exactly.
|
|
25
|
+
*/
|
|
26
|
+
CONSTRUCTS_VERSION: string;
|
|
27
|
+
};
|
|
28
|
+
//# sourceMappingURL=library-info.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"library-info.d.ts","sourceRoot":"","sources":["../../src/constants/library-info.ts"],"names":[],"mappings":"AASA,wBAAgB,gBAAgB,CAAC,WAAW,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS,CAGxE;AAED,wBAAgB,aAAa,CAAC,WAAW,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS,CAGrE;AAED,eAAO,MAAM,WAAW;IACtB;;OAEG;;IAGH;;OAEG;;IAGH;;;OAGG;;IAGH;;;OAGG;;IAGH;;;OAGG;;CAEJ,CAAC"}
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.LibraryInfo = void 0;
|
|
7
|
+
exports.getDevDependency = getDevDependency;
|
|
8
|
+
exports.getDependency = getDependency;
|
|
9
|
+
const read_pkg_up_1 = __importDefault(require("read-pkg-up"));
|
|
10
|
+
const valueOrUnknown = (value) => value ?? "unknown";
|
|
11
|
+
const packageJson = read_pkg_up_1.default.sync({ cwd: __dirname })?.packageJson ?? {};
|
|
12
|
+
const version = valueOrUnknown(packageJson.version);
|
|
13
|
+
function getDevDependency(packageName) {
|
|
14
|
+
const { devDependencies = {} } = packageJson;
|
|
15
|
+
return devDependencies[packageName];
|
|
16
|
+
}
|
|
17
|
+
function getDependency(packageName) {
|
|
18
|
+
const { dependencies = {} } = packageJson;
|
|
19
|
+
return dependencies[packageName];
|
|
20
|
+
}
|
|
21
|
+
exports.LibraryInfo = {
|
|
22
|
+
/**
|
|
23
|
+
* The name of this package
|
|
24
|
+
*/
|
|
25
|
+
NAME: "@guardian/cdk",
|
|
26
|
+
/**
|
|
27
|
+
* The current version of `@guardian/cdk`.
|
|
28
|
+
*/
|
|
29
|
+
VERSION: version,
|
|
30
|
+
/**
|
|
31
|
+
* The version of the `aws-cdk` library used by `@guardian/cdk`.
|
|
32
|
+
* You need to match this version exactly.
|
|
33
|
+
*/
|
|
34
|
+
AWS_CDK_VERSION: valueOrUnknown(getDevDependency("aws-cdk")),
|
|
35
|
+
/**
|
|
36
|
+
* The version of the `aws-cdk-lib` library used by `@guardian/cdk`.
|
|
37
|
+
* You need to match this version exactly.
|
|
38
|
+
*/
|
|
39
|
+
AWS_CDK_LIB_VERSION: valueOrUnknown(getDevDependency("aws-cdk-lib")),
|
|
40
|
+
/**
|
|
41
|
+
* The version of the `constructs` library used by `@guardian/cdk`.
|
|
42
|
+
* You need to match this version exactly.
|
|
43
|
+
*/
|
|
44
|
+
CONSTRUCTS_VERSION: valueOrUnknown(getDevDependency("constructs")),
|
|
45
|
+
};
|
|
46
|
+
//# sourceMappingURL=library-info.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"library-info.js","sourceRoot":"","sources":["../../src/constants/library-info.ts"],"names":[],"mappings":";;;;;;AASA,4CAGC;AAED,sCAGC;AAhBD,8DAAoC;AAEpC,MAAM,cAAc,GAAG,CAAC,KAAyB,EAAE,EAAE,CAAC,KAAK,IAAI,SAAS,CAAC;AAEzE,MAAM,WAAW,GAAwC,qBAAS,CAAC,IAAI,CAAC,EAAE,GAAG,EAAE,SAAS,EAAE,CAAC,EAAE,WAAW,IAAI,EAAE,CAAC;AAE/G,MAAM,OAAO,GAAG,cAAc,CAAC,WAAW,CAAC,OAAO,CAAC,CAAC;AAEpD,SAAgB,gBAAgB,CAAC,WAAmB;IAClD,MAAM,EAAE,eAAe,GAAG,EAAE,EAAE,GAAG,WAAW,CAAC;IAC7C,OAAO,eAAe,CAAC,WAAW,CAAC,CAAC;AACtC,CAAC;AAED,SAAgB,aAAa,CAAC,WAAmB;IAC/C,MAAM,EAAE,YAAY,GAAG,EAAE,EAAE,GAAG,WAAW,CAAC;IAC1C,OAAO,YAAY,CAAC,WAAW,CAAC,CAAC;AACnC,CAAC;AAEY,QAAA,WAAW,GAAG;IACzB;;OAEG;IACH,IAAI,EAAE,eAAe;IAErB;;OAEG;IACH,OAAO,EAAE,OAAO;IAEhB;;;OAGG;IACH,eAAe,EAAE,cAAc,CAAC,gBAAgB,CAAC,SAAS,CAAC,CAAC;IAE5D;;;OAGG;IACH,mBAAmB,EAAE,cAAc,CAAC,gBAAgB,CAAC,aAAa,CAAC,CAAC;IAEpE;;;OAGG;IACH,kBAAkB,EAAE,cAAc,CAAC,gBAAgB,CAAC,YAAY,CAAC,CAAC;CACnE,CAAC","sourcesContent":["import type { NormalizedPackageJson, PackageJson } from \"read-pkg-up\";\nimport readPkgUp from \"read-pkg-up\";\n\nconst valueOrUnknown = (value: string | undefined) => value ?? \"unknown\";\n\nconst packageJson: PackageJson | NormalizedPackageJson = readPkgUp.sync({ cwd: __dirname })?.packageJson ?? {};\n\nconst version = valueOrUnknown(packageJson.version);\n\nexport function getDevDependency(packageName: string): string | undefined {\n const { devDependencies = {} } = packageJson;\n return devDependencies[packageName];\n}\n\nexport function getDependency(packageName: string): string | undefined {\n const { dependencies = {} } = packageJson;\n return dependencies[packageName];\n}\n\nexport const LibraryInfo = {\n /**\n * The name of this package\n */\n NAME: \"@guardian/cdk\",\n\n /**\n * The current version of `@guardian/cdk`.\n */\n VERSION: version,\n\n /**\n * The version of the `aws-cdk` library used by `@guardian/cdk`.\n * You need to match this version exactly.\n */\n AWS_CDK_VERSION: valueOrUnknown(getDevDependency(\"aws-cdk\")),\n\n /**\n * The version of the `aws-cdk-lib` library used by `@guardian/cdk`.\n * You need to match this version exactly.\n */\n AWS_CDK_LIB_VERSION: valueOrUnknown(getDevDependency(\"aws-cdk-lib\")),\n\n /**\n * The version of the `constructs` library used by `@guardian/cdk`.\n * You need to match this version exactly.\n */\n CONSTRUCTS_VERSION: valueOrUnknown(getDevDependency(\"constructs\")),\n};\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"metadata-keys.d.ts","sourceRoot":"","sources":["../../src/constants/metadata-keys.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,YAAY;;;;;;;CAOxB,CAAC"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.MetadataKeys = void 0;
|
|
4
|
+
exports.MetadataKeys = {
|
|
5
|
+
VERSION: "gu:cdk:version",
|
|
6
|
+
CONSTRUCTS_KEY: "gu:cdk:constructs",
|
|
7
|
+
REPOSITORY_NAME: "gu:repo",
|
|
8
|
+
LOG_KINESIS_STREAM_NAME: "LogKinesisStreamName",
|
|
9
|
+
SYSTEMD_UNIT: "SystemdUnit",
|
|
10
|
+
BUILD_IDENTIFIER: "gu:build-identifier",
|
|
11
|
+
};
|
|
12
|
+
//# sourceMappingURL=metadata-keys.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"metadata-keys.js","sourceRoot":"","sources":["../../src/constants/metadata-keys.ts"],"names":[],"mappings":";;;AAAa,QAAA,YAAY,GAAG;IAC1B,OAAO,EAAE,gBAAgB;IACzB,cAAc,EAAE,mBAAmB;IACnC,eAAe,EAAE,SAAS;IAC1B,uBAAuB,EAAE,sBAAsB;IAC/C,YAAY,EAAE,aAAa;IAC3B,gBAAgB,EAAE,qBAAqB;CACxC,CAAC","sourcesContent":["export const MetadataKeys = {\n VERSION: \"gu:cdk:version\",\n CONSTRUCTS_KEY: \"gu:cdk:constructs\",\n REPOSITORY_NAME: \"gu:repo\",\n LOG_KINESIS_STREAM_NAME: \"LogKinesisStreamName\",\n SYSTEMD_UNIT: \"SystemdUnit\",\n BUILD_IDENTIFIER: \"gu:build-identifier\",\n};\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"regex-pattern.d.ts","sourceRoot":"","sources":["../../src/constants/regex-pattern.ts"],"names":[],"mappings":"AAKA,eAAO,MAAM,YAAY;;;CAGxB,CAAC"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.RegexPattern = void 0;
|
|
4
|
+
const arnRegex = "arn:aws:[a-z0-9]*:[a-z0-9\\-]*:[0-9]{12}:.*";
|
|
5
|
+
// TODO be more strict on region?
|
|
6
|
+
const acmRegex = "arn:aws:acm:[0-9a-z\\-]+:[0-9]{12}:certificate/[0-9a-z\\-]+";
|
|
7
|
+
exports.RegexPattern = {
|
|
8
|
+
ARN: arnRegex,
|
|
9
|
+
ACM_ARN: acmRegex,
|
|
10
|
+
};
|
|
11
|
+
//# sourceMappingURL=regex-pattern.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"regex-pattern.js","sourceRoot":"","sources":["../../src/constants/regex-pattern.ts"],"names":[],"mappings":";;;AAAA,MAAM,QAAQ,GAAG,6CAA6C,CAAC;AAE/D,iCAAiC;AACjC,MAAM,QAAQ,GAAG,6DAA6D,CAAC;AAElE,QAAA,YAAY,GAAG;IAC1B,GAAG,EAAE,QAAQ;IACb,OAAO,EAAE,QAAQ;CAClB,CAAC","sourcesContent":["const arnRegex = \"arn:aws:[a-z0-9]*:[a-z0-9\\\\-]*:[0-9]{12}:.*\";\n\n// TODO be more strict on region?\nconst acmRegex = \"arn:aws:acm:[0-9a-z\\\\-]+:[0-9]{12}:certificate/[0-9a-z\\\\-]+\";\n\nexport const RegexPattern = {\n ARN: arnRegex,\n ACM_ARN: acmRegex,\n};\n"]}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
export interface SsmParameterPath {
|
|
2
|
+
path: string;
|
|
3
|
+
description: string;
|
|
4
|
+
optional?: boolean;
|
|
5
|
+
namingPattern?: string;
|
|
6
|
+
}
|
|
7
|
+
interface NamedSsmParameterPaths {
|
|
8
|
+
Anghammarad: SsmParameterPath;
|
|
9
|
+
LoggingStreamName: SsmParameterPath;
|
|
10
|
+
DistributionBucket: SsmParameterPath;
|
|
11
|
+
AccessLoggingBucket: SsmParameterPath;
|
|
12
|
+
ConfigurationBucket: SsmParameterPath;
|
|
13
|
+
PrimaryVpcId: SsmParameterPath;
|
|
14
|
+
PrimaryVpcPrivateSubnets: SsmParameterPath;
|
|
15
|
+
PrimaryVpcPublicSubnets: SsmParameterPath;
|
|
16
|
+
FastlyCustomerId: SsmParameterPath;
|
|
17
|
+
OrganisationDistributionBucket: SsmParameterPath;
|
|
18
|
+
DeployToolsAccountId: SsmParameterPath;
|
|
19
|
+
}
|
|
20
|
+
export declare const VPC_SSM_PARAMETER_PREFIX = "/account/vpc";
|
|
21
|
+
export declare const NAMED_SSM_PARAMETER_PATHS: NamedSsmParameterPaths;
|
|
22
|
+
export declare const ALL_SSM_PARAMETER_PATHS: SsmParameterPath[];
|
|
23
|
+
export {};
|
|
24
|
+
//# sourceMappingURL=ssm-parameter-paths.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ssm-parameter-paths.d.ts","sourceRoot":"","sources":["../../src/constants/ssm-parameter-paths.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,gBAAgB;IAC/B,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,EAAE,MAAM,CAAC;IACpB,QAAQ,CAAC,EAAE,OAAO,CAAC;IAInB,aAAa,CAAC,EAAE,MAAM,CAAC;CACxB;AAED,UAAU,sBAAsB;IAC9B,WAAW,EAAE,gBAAgB,CAAC;IAC9B,iBAAiB,EAAE,gBAAgB,CAAC;IACpC,kBAAkB,EAAE,gBAAgB,CAAC;IACrC,mBAAmB,EAAE,gBAAgB,CAAC;IACtC,mBAAmB,EAAE,gBAAgB,CAAC;IACtC,YAAY,EAAE,gBAAgB,CAAC;IAC/B,wBAAwB,EAAE,gBAAgB,CAAC;IAC3C,uBAAuB,EAAE,gBAAgB,CAAC;IAC1C,gBAAgB,EAAE,gBAAgB,CAAC;IACnC,8BAA8B,EAAE,gBAAgB,CAAC;IACjD,oBAAoB,EAAE,gBAAgB,CAAC;CACxC;AAED,eAAO,MAAM,wBAAwB,iBAAiB,CAAC;AAEvD,eAAO,MAAM,yBAAyB,EAAE,sBAkDvC,CAAC;AAEF,eAAO,MAAM,uBAAuB,EAAE,gBAAgB,EAE/B,CAAC"}
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ALL_SSM_PARAMETER_PATHS = exports.NAMED_SSM_PARAMETER_PATHS = exports.VPC_SSM_PARAMETER_PREFIX = void 0;
|
|
4
|
+
exports.VPC_SSM_PARAMETER_PREFIX = "/account/vpc";
|
|
5
|
+
exports.NAMED_SSM_PARAMETER_PATHS = {
|
|
6
|
+
Anghammarad: {
|
|
7
|
+
path: "/account/services/anghammarad.topic.arn",
|
|
8
|
+
description: "SSM parameter containing the ARN of the Anghammarad SNS topic",
|
|
9
|
+
optional: true,
|
|
10
|
+
},
|
|
11
|
+
LoggingStreamName: {
|
|
12
|
+
path: "/account/services/logging.stream.name",
|
|
13
|
+
description: "SSM parameter containing the Name (not ARN) on the kinesis stream",
|
|
14
|
+
},
|
|
15
|
+
DistributionBucket: {
|
|
16
|
+
path: "/account/services/artifact.bucket",
|
|
17
|
+
description: "SSM parameter containing the S3 bucket name holding distribution artifacts",
|
|
18
|
+
namingPattern: "com-gu-$account-artifacts",
|
|
19
|
+
},
|
|
20
|
+
AccessLoggingBucket: {
|
|
21
|
+
path: "/account/services/access-logging/bucket",
|
|
22
|
+
description: "S3 bucket to store your access logs",
|
|
23
|
+
},
|
|
24
|
+
ConfigurationBucket: {
|
|
25
|
+
path: "/account/services/private.config.bucket",
|
|
26
|
+
description: "SSM parameter containing the S3 bucket name holding the app's private configuration",
|
|
27
|
+
namingPattern: "com-gu-$account-configs",
|
|
28
|
+
},
|
|
29
|
+
PrimaryVpcId: {
|
|
30
|
+
path: `${exports.VPC_SSM_PARAMETER_PREFIX}/primary/id`,
|
|
31
|
+
description: "Virtual Private Cloud to run EC2 instances within. Should NOT be the account default VPC.",
|
|
32
|
+
},
|
|
33
|
+
PrimaryVpcPrivateSubnets: {
|
|
34
|
+
path: `${exports.VPC_SSM_PARAMETER_PREFIX}/primary/subnets/private`,
|
|
35
|
+
description: "A comma-separated list of private subnets",
|
|
36
|
+
},
|
|
37
|
+
PrimaryVpcPublicSubnets: {
|
|
38
|
+
path: `${exports.VPC_SSM_PARAMETER_PREFIX}/primary/subnets/public`,
|
|
39
|
+
description: "A comma-separated list of public subnets",
|
|
40
|
+
},
|
|
41
|
+
OrganisationDistributionBucket: {
|
|
42
|
+
path: "/organisation/services/artifact.bucket",
|
|
43
|
+
description: "SSM parameter containing the S3 bucket name holding organisation-level DevX artifacts",
|
|
44
|
+
},
|
|
45
|
+
FastlyCustomerId: {
|
|
46
|
+
path: "/account/external/fastly/customer.id",
|
|
47
|
+
description: "SSM parameter containing the Fastly Customer ID. Can be obtained from https://manage.fastly.com/account/company by an admin",
|
|
48
|
+
optional: true,
|
|
49
|
+
},
|
|
50
|
+
DeployToolsAccountId: {
|
|
51
|
+
path: "/organisation/accounts/deployTools",
|
|
52
|
+
description: "Account ID of the Deploy Tools account. Useful as some shared resources live here.",
|
|
53
|
+
},
|
|
54
|
+
};
|
|
55
|
+
exports.ALL_SSM_PARAMETER_PATHS = Object.values(exports.NAMED_SSM_PARAMETER_PATHS);
|
|
56
|
+
//# sourceMappingURL=ssm-parameter-paths.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ssm-parameter-paths.js","sourceRoot":"","sources":["../../src/constants/ssm-parameter-paths.ts"],"names":[],"mappings":";;;AAwBa,QAAA,wBAAwB,GAAG,cAAc,CAAC;AAE1C,QAAA,yBAAyB,GAA2B;IAC/D,WAAW,EAAE;QACX,IAAI,EAAE,yCAAyC;QAC/C,WAAW,EAAE,+DAA+D;QAC5E,QAAQ,EAAE,IAAI;KACf;IACD,iBAAiB,EAAE;QACjB,IAAI,EAAE,uCAAuC;QAC7C,WAAW,EAAE,mEAAmE;KACjF;IACD,kBAAkB,EAAE;QAClB,IAAI,EAAE,mCAAmC;QACzC,WAAW,EAAE,4EAA4E;QACzF,aAAa,EAAE,2BAA2B;KAC3C;IACD,mBAAmB,EAAE;QACnB,IAAI,EAAE,yCAAyC;QAC/C,WAAW,EAAE,qCAAqC;KACnD;IACD,mBAAmB,EAAE;QACnB,IAAI,EAAE,yCAAyC;QAC/C,WAAW,EAAE,qFAAqF;QAClG,aAAa,EAAE,yBAAyB;KACzC;IACD,YAAY,EAAE;QACZ,IAAI,EAAE,GAAG,gCAAwB,aAAa;QAC9C,WAAW,EAAE,2FAA2F;KACzG;IACD,wBAAwB,EAAE;QACxB,IAAI,EAAE,GAAG,gCAAwB,0BAA0B;QAC3D,WAAW,EAAE,2CAA2C;KACzD;IACD,uBAAuB,EAAE;QACvB,IAAI,EAAE,GAAG,gCAAwB,yBAAyB;QAC1D,WAAW,EAAE,0CAA0C;KACxD;IACD,8BAA8B,EAAE;QAC9B,IAAI,EAAE,wCAAwC;QAC9C,WAAW,EAAE,uFAAuF;KACrG;IACD,gBAAgB,EAAE;QAChB,IAAI,EAAE,sCAAsC;QAC5C,WAAW,EACT,6HAA6H;QAC/H,QAAQ,EAAE,IAAI;KACf;IACD,oBAAoB,EAAE;QACpB,IAAI,EAAE,oCAAoC;QAC1C,WAAW,EAAE,oFAAoF;KAClG;CACF,CAAC;AAEW,QAAA,uBAAuB,GAAuB,MAAM,CAAC,MAAM,CACtE,iCAAyB,CACJ,CAAC","sourcesContent":["export interface SsmParameterPath {\n path: string;\n description: string;\n optional?: boolean;\n\n // Recommended naming convention for target resource, such as an S3 bucket.\n // $account is substituted as the account name.\n namingPattern?: string;\n}\n\ninterface NamedSsmParameterPaths {\n Anghammarad: SsmParameterPath;\n LoggingStreamName: SsmParameterPath;\n DistributionBucket: SsmParameterPath;\n AccessLoggingBucket: SsmParameterPath;\n ConfigurationBucket: SsmParameterPath;\n PrimaryVpcId: SsmParameterPath;\n PrimaryVpcPrivateSubnets: SsmParameterPath;\n PrimaryVpcPublicSubnets: SsmParameterPath;\n FastlyCustomerId: SsmParameterPath;\n OrganisationDistributionBucket: SsmParameterPath;\n DeployToolsAccountId: SsmParameterPath;\n}\n\nexport const VPC_SSM_PARAMETER_PREFIX = \"/account/vpc\";\n\nexport const NAMED_SSM_PARAMETER_PATHS: NamedSsmParameterPaths = {\n Anghammarad: {\n path: \"/account/services/anghammarad.topic.arn\",\n description: \"SSM parameter containing the ARN of the Anghammarad SNS topic\",\n optional: true,\n },\n LoggingStreamName: {\n path: \"/account/services/logging.stream.name\",\n description: \"SSM parameter containing the Name (not ARN) on the kinesis stream\",\n },\n DistributionBucket: {\n path: \"/account/services/artifact.bucket\",\n description: \"SSM parameter containing the S3 bucket name holding distribution artifacts\",\n namingPattern: \"com-gu-$account-artifacts\",\n },\n AccessLoggingBucket: {\n path: \"/account/services/access-logging/bucket\",\n description: \"S3 bucket to store your access logs\",\n },\n ConfigurationBucket: {\n path: \"/account/services/private.config.bucket\",\n description: \"SSM parameter containing the S3 bucket name holding the app's private configuration\",\n namingPattern: \"com-gu-$account-configs\",\n },\n PrimaryVpcId: {\n path: `${VPC_SSM_PARAMETER_PREFIX}/primary/id`,\n description: \"Virtual Private Cloud to run EC2 instances within. Should NOT be the account default VPC.\",\n },\n PrimaryVpcPrivateSubnets: {\n path: `${VPC_SSM_PARAMETER_PREFIX}/primary/subnets/private`,\n description: \"A comma-separated list of private subnets\",\n },\n PrimaryVpcPublicSubnets: {\n path: `${VPC_SSM_PARAMETER_PREFIX}/primary/subnets/public`,\n description: \"A comma-separated list of public subnets\",\n },\n OrganisationDistributionBucket: {\n path: \"/organisation/services/artifact.bucket\",\n description: \"SSM parameter containing the S3 bucket name holding organisation-level DevX artifacts\",\n },\n FastlyCustomerId: {\n path: \"/account/external/fastly/customer.id\",\n description:\n \"SSM parameter containing the Fastly Customer ID. Can be obtained from https://manage.fastly.com/account/company by an admin\",\n optional: true,\n },\n DeployToolsAccountId: {\n path: \"/organisation/accounts/deployTools\",\n description: \"Account ID of the Deploy Tools account. Useful as some shared resources live here.\",\n },\n};\n\nexport const ALL_SSM_PARAMETER_PATHS: SsmParameterPath[] = Object.values(\n NAMED_SSM_PARAMETER_PATHS,\n) as SsmParameterPath[];\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tracking-tag.d.ts","sourceRoot":"","sources":["../../src/constants/tracking-tag.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,WAAW;;;CAGvB,CAAC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.TrackingTag = void 0;
|
|
4
|
+
const library_info_1 = require("./library-info");
|
|
5
|
+
const metadata_keys_1 = require("./metadata-keys");
|
|
6
|
+
exports.TrackingTag = {
|
|
7
|
+
Key: metadata_keys_1.MetadataKeys.VERSION,
|
|
8
|
+
Value: library_info_1.LibraryInfo.VERSION,
|
|
9
|
+
};
|
|
10
|
+
//# sourceMappingURL=tracking-tag.js.map
|