@takumi-stack/core 1.0.0
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/common/coordinator.d.ts +28 -0
- package/common/coordinator.d.ts.map +1 -0
- package/common/coordinator.js +94 -0
- package/common/coordinator.js.map +1 -0
- package/common/index.d.ts +6 -0
- package/common/index.d.ts.map +1 -0
- package/common/index.js +22 -0
- package/common/index.js.map +1 -0
- package/common/modifier.d.ts +5 -0
- package/common/modifier.d.ts.map +1 -0
- package/common/modifier.js +12 -0
- package/common/modifier.js.map +1 -0
- package/common/naming/get-deploy-config.d.ts +9 -0
- package/common/naming/get-deploy-config.d.ts.map +1 -0
- package/common/naming/get-deploy-config.js +8 -0
- package/common/naming/get-deploy-config.js.map +1 -0
- package/common/naming/get-domain.d.ts +9 -0
- package/common/naming/get-domain.d.ts.map +1 -0
- package/common/naming/get-domain.js +13 -0
- package/common/naming/get-domain.js.map +1 -0
- package/common/naming/get-function-entry.d.ts +4 -0
- package/common/naming/get-function-entry.d.ts.map +1 -0
- package/common/naming/get-function-entry.js +14 -0
- package/common/naming/get-function-entry.js.map +1 -0
- package/common/naming/get-logical-name.d.ts +2 -0
- package/common/naming/get-logical-name.d.ts.map +1 -0
- package/common/naming/get-logical-name.js +8 -0
- package/common/naming/get-logical-name.js.map +1 -0
- package/common/naming/get-resource-name.d.ts +47 -0
- package/common/naming/get-resource-name.d.ts.map +1 -0
- package/common/naming/get-resource-name.js +38 -0
- package/common/naming/get-resource-name.js.map +1 -0
- package/common/naming/get-service-name.d.ts +10 -0
- package/common/naming/get-service-name.d.ts.map +1 -0
- package/common/naming/get-service-name.js +10 -0
- package/common/naming/get-service-name.js.map +1 -0
- package/common/naming/index.d.ts +8 -0
- package/common/naming/index.d.ts.map +1 -0
- package/common/naming/index.js +24 -0
- package/common/naming/index.js.map +1 -0
- package/common/naming/string-parser.d.ts +4 -0
- package/common/naming/string-parser.d.ts.map +1 -0
- package/common/naming/string-parser.js +22 -0
- package/common/naming/string-parser.js.map +1 -0
- package/common/service.d.ts +29 -0
- package/common/service.d.ts.map +1 -0
- package/common/service.js +28 -0
- package/common/service.js.map +1 -0
- package/common/synth/account-mapping.d.ts +2 -0
- package/common/synth/account-mapping.d.ts.map +1 -0
- package/common/synth/account-mapping.js +18 -0
- package/common/synth/account-mapping.js.map +1 -0
- package/common/synth/assume-role.d.ts +18 -0
- package/common/synth/assume-role.d.ts.map +1 -0
- package/common/synth/assume-role.js +25 -0
- package/common/synth/assume-role.js.map +1 -0
- package/common/synth/get-global-props.d.ts +16 -0
- package/common/synth/get-global-props.d.ts.map +1 -0
- package/common/synth/get-global-props.js +34 -0
- package/common/synth/get-global-props.js.map +1 -0
- package/common/synth/get-service-props.d.ts +11 -0
- package/common/synth/get-service-props.d.ts.map +1 -0
- package/common/synth/get-service-props.js +12 -0
- package/common/synth/get-service-props.js.map +1 -0
- package/common/synth/index.d.ts +8 -0
- package/common/synth/index.d.ts.map +1 -0
- package/common/synth/index.js +24 -0
- package/common/synth/index.js.map +1 -0
- package/common/synth/pre-script.d.ts +32 -0
- package/common/synth/pre-script.d.ts.map +1 -0
- package/common/synth/pre-script.js +74 -0
- package/common/synth/pre-script.js.map +1 -0
- package/common/synth/props-types.d.ts +60 -0
- package/common/synth/props-types.d.ts.map +1 -0
- package/common/synth/props-types.js +3 -0
- package/common/synth/props-types.js.map +1 -0
- package/common/synth/synth-error.d.ts +8 -0
- package/common/synth/synth-error.d.ts.map +1 -0
- package/common/synth/synth-error.js +17 -0
- package/common/synth/synth-error.js.map +1 -0
- package/index.d.ts +4 -0
- package/index.d.ts.map +1 -0
- package/index.js +20 -0
- package/index.js.map +1 -0
- package/package.json +43 -0
- package/prefab/analytics/events/handlers/ingestion-transform/handler.d.ts +4 -0
- package/prefab/analytics/events/handlers/ingestion-transform/handler.d.ts.map +1 -0
- package/prefab/analytics/events/handlers/ingestion-transform/handler.js +34 -0
- package/prefab/analytics/events/handlers/ingestion-transform/handler.js.map +1 -0
- package/prefab/analytics/events/index.d.ts +31 -0
- package/prefab/analytics/events/index.d.ts.map +1 -0
- package/prefab/analytics/events/index.js +163 -0
- package/prefab/analytics/events/index.js.map +1 -0
- package/prefab/analytics/index.d.ts +2 -0
- package/prefab/analytics/index.d.ts.map +1 -0
- package/prefab/analytics/index.js +18 -0
- package/prefab/analytics/index.js.map +1 -0
- package/prefab/auth/cognito-pool/index.d.ts +65 -0
- package/prefab/auth/cognito-pool/index.d.ts.map +1 -0
- package/prefab/auth/cognito-pool/index.js +240 -0
- package/prefab/auth/cognito-pool/index.js.map +1 -0
- package/prefab/auth/index.d.ts +2 -0
- package/prefab/auth/index.d.ts.map +1 -0
- package/prefab/auth/index.js +18 -0
- package/prefab/auth/index.js.map +1 -0
- package/prefab/cdn/cdn-api/index.d.ts +38 -0
- package/prefab/cdn/cdn-api/index.d.ts.map +1 -0
- package/prefab/cdn/cdn-api/index.js +153 -0
- package/prefab/cdn/cdn-api/index.js.map +1 -0
- package/prefab/cdn/cdn-asset/index.d.ts +27 -0
- package/prefab/cdn/cdn-asset/index.d.ts.map +1 -0
- package/prefab/cdn/cdn-asset/index.js +96 -0
- package/prefab/cdn/cdn-asset/index.js.map +1 -0
- package/prefab/cdn/cdn-spa/index.d.ts +27 -0
- package/prefab/cdn/cdn-spa/index.d.ts.map +1 -0
- package/prefab/cdn/cdn-spa/index.js +138 -0
- package/prefab/cdn/cdn-spa/index.js.map +1 -0
- package/prefab/cdn/cdn-ssr/index.d.ts +36 -0
- package/prefab/cdn/cdn-ssr/index.d.ts.map +1 -0
- package/prefab/cdn/cdn-ssr/index.js +271 -0
- package/prefab/cdn/cdn-ssr/index.js.map +1 -0
- package/prefab/cdn/index.d.ts +5 -0
- package/prefab/cdn/index.d.ts.map +1 -0
- package/prefab/cdn/index.js +21 -0
- package/prefab/cdn/index.js.map +1 -0
- package/prefab/compute/fargate/cluster.d.ts +16 -0
- package/prefab/compute/fargate/cluster.d.ts.map +1 -0
- package/prefab/compute/fargate/cluster.js +42 -0
- package/prefab/compute/fargate/cluster.js.map +1 -0
- package/prefab/compute/fargate/index.d.ts +3 -0
- package/prefab/compute/fargate/index.d.ts.map +1 -0
- package/prefab/compute/fargate/index.js +19 -0
- package/prefab/compute/fargate/index.js.map +1 -0
- package/prefab/compute/fargate/service.d.ts +49 -0
- package/prefab/compute/fargate/service.d.ts.map +1 -0
- package/prefab/compute/fargate/service.js +109 -0
- package/prefab/compute/fargate/service.js.map +1 -0
- package/prefab/compute/function/api-function/api-aggregate.d.ts +32 -0
- package/prefab/compute/function/api-function/api-aggregate.d.ts.map +1 -0
- package/prefab/compute/function/api-function/api-aggregate.js +54 -0
- package/prefab/compute/function/api-function/api-aggregate.js.map +1 -0
- package/prefab/compute/function/api-function/api-function.d.ts +22 -0
- package/prefab/compute/function/api-function/api-function.d.ts.map +1 -0
- package/prefab/compute/function/api-function/api-function.js +45 -0
- package/prefab/compute/function/api-function/api-function.js.map +1 -0
- package/prefab/compute/function/api-function/index.d.ts +3 -0
- package/prefab/compute/function/api-function/index.d.ts.map +1 -0
- package/prefab/compute/function/api-function/index.js +19 -0
- package/prefab/compute/function/api-function/index.js.map +1 -0
- package/prefab/compute/function/base-function/index.d.ts +33 -0
- package/prefab/compute/function/base-function/index.d.ts.map +1 -0
- package/prefab/compute/function/base-function/index.js +70 -0
- package/prefab/compute/function/base-function/index.js.map +1 -0
- package/prefab/compute/function/cognito-function/cognito-aggregate.d.ts +18 -0
- package/prefab/compute/function/cognito-function/cognito-aggregate.d.ts.map +1 -0
- package/prefab/compute/function/cognito-function/cognito-aggregate.js +22 -0
- package/prefab/compute/function/cognito-function/cognito-aggregate.js.map +1 -0
- package/prefab/compute/function/cognito-function/cognito-function.d.ts +19 -0
- package/prefab/compute/function/cognito-function/cognito-function.d.ts.map +1 -0
- package/prefab/compute/function/cognito-function/cognito-function.js +24 -0
- package/prefab/compute/function/cognito-function/cognito-function.js.map +1 -0
- package/prefab/compute/function/cognito-function/index.d.ts +3 -0
- package/prefab/compute/function/cognito-function/index.d.ts.map +1 -0
- package/prefab/compute/function/cognito-function/index.js +19 -0
- package/prefab/compute/function/cognito-function/index.js.map +1 -0
- package/prefab/compute/function/cron-function/cron-aggregate.d.ts +17 -0
- package/prefab/compute/function/cron-function/cron-aggregate.d.ts.map +1 -0
- package/prefab/compute/function/cron-function/cron-aggregate.js +22 -0
- package/prefab/compute/function/cron-function/cron-aggregate.js.map +1 -0
- package/prefab/compute/function/cron-function/cron-function.d.ts +17 -0
- package/prefab/compute/function/cron-function/cron-function.d.ts.map +1 -0
- package/prefab/compute/function/cron-function/cron-function.js +24 -0
- package/prefab/compute/function/cron-function/cron-function.js.map +1 -0
- package/prefab/compute/function/cron-function/index.d.ts +3 -0
- package/prefab/compute/function/cron-function/index.d.ts.map +1 -0
- package/prefab/compute/function/cron-function/index.js +19 -0
- package/prefab/compute/function/cron-function/index.js.map +1 -0
- package/prefab/compute/function/event-function/event-aggregate.d.ts +20 -0
- package/prefab/compute/function/event-function/event-aggregate.d.ts.map +1 -0
- package/prefab/compute/function/event-function/event-aggregate.js +25 -0
- package/prefab/compute/function/event-function/event-aggregate.js.map +1 -0
- package/prefab/compute/function/event-function/event-function.d.ts +14 -0
- package/prefab/compute/function/event-function/event-function.d.ts.map +1 -0
- package/prefab/compute/function/event-function/event-function.js +33 -0
- package/prefab/compute/function/event-function/event-function.js.map +1 -0
- package/prefab/compute/function/event-function/index.d.ts +3 -0
- package/prefab/compute/function/event-function/index.d.ts.map +1 -0
- package/prefab/compute/function/event-function/index.js +19 -0
- package/prefab/compute/function/event-function/index.js.map +1 -0
- package/prefab/compute/function/index.d.ts +8 -0
- package/prefab/compute/function/index.d.ts.map +1 -0
- package/prefab/compute/function/index.js +24 -0
- package/prefab/compute/function/index.js.map +1 -0
- package/prefab/compute/function/queue-function/index.d.ts +25 -0
- package/prefab/compute/function/queue-function/index.d.ts.map +1 -0
- package/prefab/compute/function/queue-function/index.js +46 -0
- package/prefab/compute/function/queue-function/index.js.map +1 -0
- package/prefab/compute/function/topic-function/index.d.ts +23 -0
- package/prefab/compute/function/topic-function/index.d.ts.map +1 -0
- package/prefab/compute/function/topic-function/index.js +23 -0
- package/prefab/compute/function/topic-function/index.js.map +1 -0
- package/prefab/compute/index.d.ts +3 -0
- package/prefab/compute/index.d.ts.map +1 -0
- package/prefab/compute/index.js +19 -0
- package/prefab/compute/index.js.map +1 -0
- package/prefab/database/dynamo/index.d.ts +14 -0
- package/prefab/database/dynamo/index.d.ts.map +1 -0
- package/prefab/database/dynamo/index.js +106 -0
- package/prefab/database/dynamo/index.js.map +1 -0
- package/prefab/database/index.d.ts +4 -0
- package/prefab/database/index.d.ts.map +1 -0
- package/prefab/database/index.js +20 -0
- package/prefab/database/index.js.map +1 -0
- package/prefab/database/rds/handlers/start-cluster/handler.d.ts +2 -0
- package/prefab/database/rds/handlers/start-cluster/handler.d.ts.map +1 -0
- package/prefab/database/rds/handlers/start-cluster/handler.js +10 -0
- package/prefab/database/rds/handlers/start-cluster/handler.js.map +1 -0
- package/prefab/database/rds/handlers/stop-cluster/handler.d.ts +2 -0
- package/prefab/database/rds/handlers/stop-cluster/handler.d.ts.map +1 -0
- package/prefab/database/rds/handlers/stop-cluster/handler.js +10 -0
- package/prefab/database/rds/handlers/stop-cluster/handler.js.map +1 -0
- package/prefab/database/rds/index.d.ts +54 -0
- package/prefab/database/rds/index.d.ts.map +1 -0
- package/prefab/database/rds/index.js +223 -0
- package/prefab/database/rds/index.js.map +1 -0
- package/prefab/database/timestream/index.d.ts +3 -0
- package/prefab/database/timestream/index.d.ts.map +1 -0
- package/prefab/database/timestream/index.js +19 -0
- package/prefab/database/timestream/index.js.map +1 -0
- package/prefab/database/timestream/timestream-database.d.ts +13 -0
- package/prefab/database/timestream/timestream-database.d.ts.map +1 -0
- package/prefab/database/timestream/timestream-database.js +21 -0
- package/prefab/database/timestream/timestream-database.js.map +1 -0
- package/prefab/database/timestream/timestream-table.d.ts +23 -0
- package/prefab/database/timestream/timestream-table.d.ts.map +1 -0
- package/prefab/database/timestream/timestream-table.js +62 -0
- package/prefab/database/timestream/timestream-table.js.map +1 -0
- package/prefab/gateway/alb-public/index.d.ts +44 -0
- package/prefab/gateway/alb-public/index.d.ts.map +1 -0
- package/prefab/gateway/alb-public/index.js +116 -0
- package/prefab/gateway/alb-public/index.js.map +1 -0
- package/prefab/gateway/api-gateway/api-http.d.ts +27 -0
- package/prefab/gateway/api-gateway/api-http.d.ts.map +1 -0
- package/prefab/gateway/api-gateway/api-http.js +48 -0
- package/prefab/gateway/api-gateway/api-http.js.map +1 -0
- package/prefab/gateway/api-gateway/api-rest.d.ts +26 -0
- package/prefab/gateway/api-gateway/api-rest.d.ts.map +1 -0
- package/prefab/gateway/api-gateway/api-rest.js +90 -0
- package/prefab/gateway/api-gateway/api-rest.js.map +1 -0
- package/prefab/gateway/api-gateway/index.d.ts +3 -0
- package/prefab/gateway/api-gateway/index.d.ts.map +1 -0
- package/prefab/gateway/api-gateway/index.js +19 -0
- package/prefab/gateway/api-gateway/index.js.map +1 -0
- package/prefab/gateway/app-sync/index.d.ts +36 -0
- package/prefab/gateway/app-sync/index.d.ts.map +1 -0
- package/prefab/gateway/app-sync/index.js +114 -0
- package/prefab/gateway/app-sync/index.js.map +1 -0
- package/prefab/gateway/app-sync/resolver-aggregate.d.ts +33 -0
- package/prefab/gateway/app-sync/resolver-aggregate.d.ts.map +1 -0
- package/prefab/gateway/app-sync/resolver-aggregate.js +125 -0
- package/prefab/gateway/app-sync/resolver-aggregate.js.map +1 -0
- package/prefab/gateway/app-sync/types.d.ts +29 -0
- package/prefab/gateway/app-sync/types.d.ts.map +1 -0
- package/prefab/gateway/app-sync/types.js +3 -0
- package/prefab/gateway/app-sync/types.js.map +1 -0
- package/prefab/gateway/index.d.ts +4 -0
- package/prefab/gateway/index.d.ts.map +1 -0
- package/prefab/gateway/index.js +20 -0
- package/prefab/gateway/index.js.map +1 -0
- package/prefab/index.d.ts +11 -0
- package/prefab/index.d.ts.map +1 -0
- package/prefab/index.js +27 -0
- package/prefab/index.js.map +1 -0
- package/prefab/integration/event-bus/index.d.ts +20 -0
- package/prefab/integration/event-bus/index.d.ts.map +1 -0
- package/prefab/integration/event-bus/index.js +46 -0
- package/prefab/integration/event-bus/index.js.map +1 -0
- package/prefab/integration/index.d.ts +4 -0
- package/prefab/integration/index.d.ts.map +1 -0
- package/prefab/integration/index.js +20 -0
- package/prefab/integration/index.js.map +1 -0
- package/prefab/integration/queue/index.d.ts +29 -0
- package/prefab/integration/queue/index.d.ts.map +1 -0
- package/prefab/integration/queue/index.js +70 -0
- package/prefab/integration/queue/index.js.map +1 -0
- package/prefab/integration/topic/index.d.ts +21 -0
- package/prefab/integration/topic/index.d.ts.map +1 -0
- package/prefab/integration/topic/index.js +48 -0
- package/prefab/integration/topic/index.js.map +1 -0
- package/prefab/networking/dns-domain-ref/index.d.ts +16 -0
- package/prefab/networking/dns-domain-ref/index.d.ts.map +1 -0
- package/prefab/networking/dns-domain-ref/index.js +28 -0
- package/prefab/networking/dns-domain-ref/index.js.map +1 -0
- package/prefab/networking/dns-subdomain-certificate/index.d.ts +13 -0
- package/prefab/networking/dns-subdomain-certificate/index.d.ts.map +1 -0
- package/prefab/networking/dns-subdomain-certificate/index.js +28 -0
- package/prefab/networking/dns-subdomain-certificate/index.js.map +1 -0
- package/prefab/networking/dns-subdomain-hosted-zone/index.d.ts +12 -0
- package/prefab/networking/dns-subdomain-hosted-zone/index.d.ts.map +1 -0
- package/prefab/networking/dns-subdomain-hosted-zone/index.js +27 -0
- package/prefab/networking/dns-subdomain-hosted-zone/index.js.map +1 -0
- package/prefab/networking/index.d.ts +6 -0
- package/prefab/networking/index.d.ts.map +1 -0
- package/prefab/networking/index.js +22 -0
- package/prefab/networking/index.js.map +1 -0
- package/prefab/networking/vpc/index.d.ts +20 -0
- package/prefab/networking/vpc/index.d.ts.map +1 -0
- package/prefab/networking/vpc/index.js +28 -0
- package/prefab/networking/vpc/index.js.map +1 -0
- package/prefab/networking/waf/index.d.ts +14 -0
- package/prefab/networking/waf/index.d.ts.map +1 -0
- package/prefab/networking/waf/index.js +45 -0
- package/prefab/networking/waf/index.js.map +1 -0
- package/prefab/storage/bucket/asset-bucket.d.ts +12 -0
- package/prefab/storage/bucket/asset-bucket.d.ts.map +1 -0
- package/prefab/storage/bucket/asset-bucket.js +19 -0
- package/prefab/storage/bucket/asset-bucket.js.map +1 -0
- package/prefab/storage/bucket/index.d.ts +3 -0
- package/prefab/storage/bucket/index.d.ts.map +1 -0
- package/prefab/storage/bucket/index.js +19 -0
- package/prefab/storage/bucket/index.js.map +1 -0
- package/prefab/storage/bucket/private-bucket.d.ts +26 -0
- package/prefab/storage/bucket/private-bucket.d.ts.map +1 -0
- package/prefab/storage/bucket/private-bucket.js +82 -0
- package/prefab/storage/bucket/private-bucket.js.map +1 -0
- package/prefab/storage/index.d.ts +2 -0
- package/prefab/storage/index.d.ts.map +1 -0
- package/prefab/storage/index.js +18 -0
- package/prefab/storage/index.js.map +1 -0
- package/prefab/utils/config/frontend-env-builder.d.ts +14 -0
- package/prefab/utils/config/frontend-env-builder.d.ts.map +1 -0
- package/prefab/utils/config/frontend-env-builder.js +25 -0
- package/prefab/utils/config/frontend-env-builder.js.map +1 -0
- package/prefab/utils/config/index.d.ts +4 -0
- package/prefab/utils/config/index.d.ts.map +1 -0
- package/prefab/utils/config/index.js +20 -0
- package/prefab/utils/config/index.js.map +1 -0
- package/prefab/utils/config/parameter-secret.d.ts +21 -0
- package/prefab/utils/config/parameter-secret.d.ts.map +1 -0
- package/prefab/utils/config/parameter-secret.js +42 -0
- package/prefab/utils/config/parameter-secret.js.map +1 -0
- package/prefab/utils/config/runtime-secret.d.ts +20 -0
- package/prefab/utils/config/runtime-secret.d.ts.map +1 -0
- package/prefab/utils/config/runtime-secret.js +37 -0
- package/prefab/utils/config/runtime-secret.js.map +1 -0
- package/prefab/utils/deploy-pipeline/catalog/integrations/index.d.ts +2 -0
- package/prefab/utils/deploy-pipeline/catalog/integrations/index.d.ts.map +1 -0
- package/prefab/utils/deploy-pipeline/catalog/integrations/index.js +28 -0
- package/prefab/utils/deploy-pipeline/catalog/integrations/index.js.map +1 -0
- package/prefab/utils/deploy-pipeline/catalog/integrations/slack.d.ts +28 -0
- package/prefab/utils/deploy-pipeline/catalog/integrations/slack.d.ts.map +1 -0
- package/prefab/utils/deploy-pipeline/catalog/integrations/slack.js +8 -0
- package/prefab/utils/deploy-pipeline/catalog/integrations/slack.js.map +1 -0
- package/prefab/utils/deploy-pipeline/entities/index.d.ts +29 -0
- package/prefab/utils/deploy-pipeline/entities/index.d.ts.map +1 -0
- package/prefab/utils/deploy-pipeline/entities/index.js +3 -0
- package/prefab/utils/deploy-pipeline/entities/index.js.map +1 -0
- package/prefab/utils/deploy-pipeline/handlers/send-to-slack/handler.d.ts +3 -0
- package/prefab/utils/deploy-pipeline/handlers/send-to-slack/handler.d.ts.map +1 -0
- package/prefab/utils/deploy-pipeline/handlers/send-to-slack/handler.js +28 -0
- package/prefab/utils/deploy-pipeline/handlers/send-to-slack/handler.js.map +1 -0
- package/prefab/utils/deploy-pipeline/index.d.ts +15 -0
- package/prefab/utils/deploy-pipeline/index.d.ts.map +1 -0
- package/prefab/utils/deploy-pipeline/index.js +173 -0
- package/prefab/utils/deploy-pipeline/index.js.map +1 -0
- package/prefab/utils/deploy-pipeline/platform/get-pipeline-detail.d.ts +6 -0
- package/prefab/utils/deploy-pipeline/platform/get-pipeline-detail.d.ts.map +1 -0
- package/prefab/utils/deploy-pipeline/platform/get-pipeline-detail.js +26 -0
- package/prefab/utils/deploy-pipeline/platform/get-pipeline-detail.js.map +1 -0
- package/prefab/utils/deploy-pipeline/platform/get-slack-payload.d.ts +4 -0
- package/prefab/utils/deploy-pipeline/platform/get-slack-payload.d.ts.map +1 -0
- package/prefab/utils/deploy-pipeline/platform/get-slack-payload.js +39 -0
- package/prefab/utils/deploy-pipeline/platform/get-slack-payload.js.map +1 -0
- package/prefab/utils/deploy-pipeline/platform/send-to-slack.d.ts +3 -0
- package/prefab/utils/deploy-pipeline/platform/send-to-slack.d.ts.map +1 -0
- package/prefab/utils/deploy-pipeline/platform/send-to-slack.js +14 -0
- package/prefab/utils/deploy-pipeline/platform/send-to-slack.js.map +1 -0
- package/prefab/utils/duration.d.ts +2 -0
- package/prefab/utils/duration.d.ts.map +1 -0
- package/prefab/utils/duration.js +6 -0
- package/prefab/utils/duration.js.map +1 -0
- package/prefab/utils/index.d.ts +5 -0
- package/prefab/utils/index.d.ts.map +1 -0
- package/prefab/utils/index.js +21 -0
- package/prefab/utils/index.js.map +1 -0
- package/prefab/utils/ses/index.d.ts +22 -0
- package/prefab/utils/ses/index.d.ts.map +1 -0
- package/prefab/utils/ses/index.js +124 -0
- package/prefab/utils/ses/index.js.map +1 -0
- package/script/config-command/bootstrap.d.ts +4 -0
- package/script/config-command/bootstrap.d.ts.map +1 -0
- package/script/config-command/bootstrap.js +66 -0
- package/script/config-command/bootstrap.js.map +1 -0
- package/script/config-command/deploy-spa.d.ts +4 -0
- package/script/config-command/deploy-spa.d.ts.map +1 -0
- package/script/config-command/deploy-spa.js +84 -0
- package/script/config-command/deploy-spa.js.map +1 -0
- package/script/config-command/deploy.d.ts +4 -0
- package/script/config-command/deploy.d.ts.map +1 -0
- package/script/config-command/deploy.js +26 -0
- package/script/config-command/deploy.js.map +1 -0
- package/script/config-command/destroy.d.ts +4 -0
- package/script/config-command/destroy.d.ts.map +1 -0
- package/script/config-command/destroy.js +26 -0
- package/script/config-command/destroy.js.map +1 -0
- package/script/config-command/env-ssr.d.ts +4 -0
- package/script/config-command/env-ssr.d.ts.map +1 -0
- package/script/config-command/env-ssr.js +51 -0
- package/script/config-command/env-ssr.js.map +1 -0
- package/script/config-command/invalidation-ssr.d.ts +4 -0
- package/script/config-command/invalidation-ssr.d.ts.map +1 -0
- package/script/config-command/invalidation-ssr.js +55 -0
- package/script/config-command/invalidation-ssr.js.map +1 -0
- package/script/config-command/rds-migration.d.ts +7 -0
- package/script/config-command/rds-migration.d.ts.map +1 -0
- package/script/config-command/rds-migration.js +125 -0
- package/script/config-command/rds-migration.js.map +1 -0
- package/script/config-command/rds-sync.d.ts +4 -0
- package/script/config-command/rds-sync.d.ts.map +1 -0
- package/script/config-command/rds-sync.js +66 -0
- package/script/config-command/rds-sync.js.map +1 -0
- package/script/config-command/ssm-connect.d.ts +4 -0
- package/script/config-command/ssm-connect.d.ts.map +1 -0
- package/script/config-command/ssm-connect.js +86 -0
- package/script/config-command/ssm-connect.js.map +1 -0
- package/script/config-command/start-spa.d.ts +4 -0
- package/script/config-command/start-spa.d.ts.map +1 -0
- package/script/config-command/start-spa.js +55 -0
- package/script/config-command/start-spa.js.map +1 -0
- package/script/config-command/start-ssr.d.ts +4 -0
- package/script/config-command/start-ssr.d.ts.map +1 -0
- package/script/config-command/start-ssr.js +55 -0
- package/script/config-command/start-ssr.js.map +1 -0
- package/script/config-command/synth.d.ts +4 -0
- package/script/config-command/synth.d.ts.map +1 -0
- package/script/config-command/synth.js +26 -0
- package/script/config-command/synth.js.map +1 -0
- package/script/index.d.ts +25 -0
- package/script/index.d.ts.map +1 -0
- package/script/index.js +70 -0
- package/script/index.js.map +1 -0
- package/script/output-command/create-user.d.ts +9 -0
- package/script/output-command/create-user.d.ts.map +1 -0
- package/script/output-command/create-user.js +61 -0
- package/script/output-command/create-user.js.map +1 -0
- package/script/output-command/gen-postman-env.d.ts +28 -0
- package/script/output-command/gen-postman-env.d.ts.map +1 -0
- package/script/output-command/gen-postman-env.js +56 -0
- package/script/output-command/gen-postman-env.js.map +1 -0
- package/tsconfig.tsbuildinfo +1 -0
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.accountMapping = void 0;
|
|
4
|
+
const client_dynamodb_1 = require("@aws-sdk/client-dynamodb");
|
|
5
|
+
const lib_dynamodb_1 = require("@aws-sdk/lib-dynamodb");
|
|
6
|
+
const client = new client_dynamodb_1.DynamoDBClient({ region: 'us-east-1' });
|
|
7
|
+
const dynamo = lib_dynamodb_1.DynamoDBDocumentClient.from(client);
|
|
8
|
+
const accountMapping = async (project, env) => {
|
|
9
|
+
const { Item } = await dynamo.send(new lib_dynamodb_1.GetCommand({
|
|
10
|
+
TableName: 'accounts-repository',
|
|
11
|
+
Key: { pk: project, sk: env },
|
|
12
|
+
}));
|
|
13
|
+
if (!Item)
|
|
14
|
+
throw new Error(`Not entry for account: ${project}-${env}`);
|
|
15
|
+
return Item['account'];
|
|
16
|
+
};
|
|
17
|
+
exports.accountMapping = accountMapping;
|
|
18
|
+
//# sourceMappingURL=account-mapping.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"account-mapping.js","sourceRoot":"","sources":["../../../common/synth/account-mapping.ts"],"names":[],"mappings":";;;AAAA,8DAA0D;AAC1D,wDAA2E;AAE3E,MAAM,MAAM,GAAG,IAAI,gCAAc,CAAC,EAAE,MAAM,EAAE,WAAW,EAAE,CAAC,CAAC;AAC3D,MAAM,MAAM,GAAG,qCAAsB,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;AAC5C,MAAM,cAAc,GAAG,KAAK,EAAE,OAAe,EAAE,GAAW,EAAmB,EAAE;IACpF,MAAM,EAAE,IAAI,EAAE,GAAG,MAAM,MAAM,CAAC,IAAI,CAChC,IAAI,yBAAU,CAAC;QACb,SAAS,EAAE,qBAAqB;QAChC,GAAG,EAAE,EAAE,EAAE,EAAE,OAAO,EAAE,EAAE,EAAE,GAAG,EAAE;KAC9B,CAAC,CACH,CAAC;IACF,IAAI,CAAC,IAAI;QAAE,MAAM,IAAI,KAAK,CAAC,0BAA0B,OAAO,IAAI,GAAG,EAAE,CAAC,CAAC;IAEvE,OAAO,IAAI,CAAC,SAAS,CAAW,CAAC;AACnC,CAAC,CAAC;AAVW,QAAA,cAAc,kBAUzB"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { BaseGlobalProps, BaseRegionName, DeployConfig } from './props-types';
|
|
2
|
+
|
|
3
|
+
export type AssumeRoleResponse = {
|
|
4
|
+
region: BaseRegionName;
|
|
5
|
+
credentials: {
|
|
6
|
+
accessKeyId: string;
|
|
7
|
+
secretAccessKey: string;
|
|
8
|
+
sessionToken: string;
|
|
9
|
+
};
|
|
10
|
+
};
|
|
11
|
+
type AssumeRoleParams = {
|
|
12
|
+
region: BaseGlobalProps['regionName'];
|
|
13
|
+
account: DeployConfig['account'];
|
|
14
|
+
};
|
|
15
|
+
export declare const assumeRole: ({ account, region }: AssumeRoleParams, roleName: string) => Promise<AssumeRoleResponse>;
|
|
16
|
+
export declare const assumeRoleArn: (arn: string, region?: string) => Promise<AssumeRoleResponse>;
|
|
17
|
+
export {};
|
|
18
|
+
//# sourceMappingURL=assume-role.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"assume-role.d.ts","sourceRoot":"","sources":["../../../common/synth/assume-role.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,eAAe,EAAE,cAAc,EAAE,YAAY,EAAE,MAAM,eAAe,CAAC;AAE9E,MAAM,MAAM,kBAAkB,GAAG;IAC/B,MAAM,EAAE,cAAc,CAAC;IACvB,WAAW,EAAE;QACX,WAAW,EAAE,MAAM,CAAC;QACpB,eAAe,EAAE,MAAM,CAAC;QACxB,YAAY,EAAE,MAAM,CAAC;KACtB,CAAC;CACH,CAAC;AAEF,KAAK,gBAAgB,GAAG;IACtB,MAAM,EAAE,eAAe,CAAC,YAAY,CAAC,CAAC;IACtC,OAAO,EAAE,YAAY,CAAC,SAAS,CAAC,CAAC;CAClC,CAAC;AAEF,eAAO,MAAM,UAAU,wBAA6C,gBAAgB,YAAY,MAAM,KAAG,OAAO,CAAC,kBAAkB,CAElI,CAAC;AAEF,eAAO,MAAM,aAAa,QAAe,MAAM,sBAAyB,OAAO,CAAC,kBAAkB,CAgBjG,CAAC"}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.assumeRoleArn = exports.assumeRole = void 0;
|
|
4
|
+
const client_sts_1 = require("@aws-sdk/client-sts");
|
|
5
|
+
const assumeRole = async ({ account, region = 'us-east-1' }, roleName) => {
|
|
6
|
+
return (0, exports.assumeRoleArn)(`arn:aws:iam::${account}:role/${roleName}`, region);
|
|
7
|
+
};
|
|
8
|
+
exports.assumeRole = assumeRole;
|
|
9
|
+
const assumeRoleArn = async (arn, region = 'us-east-1') => {
|
|
10
|
+
const sts = new client_sts_1.STSClient({ region });
|
|
11
|
+
const { Credentials } = await sts.send(new client_sts_1.AssumeRoleCommand({
|
|
12
|
+
RoleArn: arn,
|
|
13
|
+
RoleSessionName: 'cdk-scripts',
|
|
14
|
+
}));
|
|
15
|
+
return {
|
|
16
|
+
region,
|
|
17
|
+
credentials: {
|
|
18
|
+
accessKeyId: Credentials?.AccessKeyId,
|
|
19
|
+
secretAccessKey: Credentials?.SecretAccessKey,
|
|
20
|
+
sessionToken: Credentials?.SessionToken,
|
|
21
|
+
},
|
|
22
|
+
};
|
|
23
|
+
};
|
|
24
|
+
exports.assumeRoleArn = assumeRoleArn;
|
|
25
|
+
//# sourceMappingURL=assume-role.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"assume-role.js","sourceRoot":"","sources":["../../../common/synth/assume-role.ts"],"names":[],"mappings":";;;AAAA,oDAAmE;AAkB5D,MAAM,UAAU,GAAG,KAAK,EAAE,EAAE,OAAO,EAAE,MAAM,GAAG,WAAW,EAAoB,EAAE,QAAgB,EAA+B,EAAE;IACrI,OAAO,IAAA,qBAAa,EAAC,gBAAgB,OAAO,SAAS,QAAQ,EAAE,EAAE,MAAM,CAAC,CAAC;AAC3E,CAAC,CAAC;AAFW,QAAA,UAAU,cAErB;AAEK,MAAM,aAAa,GAAG,KAAK,EAAE,GAAW,EAAE,MAAM,GAAG,WAAW,EAA+B,EAAE;IACpG,MAAM,GAAG,GAAG,IAAI,sBAAS,CAAC,EAAE,MAAM,EAAE,CAAC,CAAC;IACtC,MAAM,EAAE,WAAW,EAAE,GAAG,MAAM,GAAG,CAAC,IAAI,CACpC,IAAI,8BAAiB,CAAC;QACpB,OAAO,EAAE,GAAG;QACZ,eAAe,EAAE,aAAa;KAC/B,CAAC,CACH,CAAC;IACF,OAAO;QACL,MAAM;QACN,WAAW,EAAE;YACX,WAAW,EAAE,WAAW,EAAE,WAAqB;YAC/C,eAAe,EAAE,WAAW,EAAE,eAAyB;YACvD,YAAY,EAAE,WAAW,EAAE,YAAsB;SAClD;KACF,CAAC;AACJ,CAAC,CAAC;AAhBW,QAAA,aAAa,iBAgBxB"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { Construct } from 'constructs';
|
|
2
|
+
|
|
3
|
+
import * as propsTypes from './props-types';
|
|
4
|
+
|
|
5
|
+
export declare const getGlobalProps: <
|
|
6
|
+
GlobalConstConfig extends propsTypes.BaseGlobalConstConfig,
|
|
7
|
+
AllowedEnvName extends propsTypes.BaseEnvName,
|
|
8
|
+
GlobalEnv extends propsTypes.BaseGlobalEnv,
|
|
9
|
+
GlobalDeployTarget extends propsTypes.BaseGlobalDeployTarget,
|
|
10
|
+
>(
|
|
11
|
+
app: Construct,
|
|
12
|
+
globalConstConfig: GlobalConstConfig,
|
|
13
|
+
globalEnvConfig: propsTypes.BaseGlobalEnvConfig<AllowedEnvName, GlobalEnv>,
|
|
14
|
+
globalDeployTargetConfig: propsTypes.BaseGlobalDeployTargetConfig<AllowedEnvName, propsTypes.BaseDeployTargetName>
|
|
15
|
+
) => propsTypes.BaseGlobalProps<GlobalConstConfig, GlobalEnv, GlobalDeployTarget>;
|
|
16
|
+
//# sourceMappingURL=get-global-props.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"get-global-props.d.ts","sourceRoot":"","sources":["../../../common/synth/get-global-props.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,YAAY,CAAC;AAEvC,OAAO,KAAK,UAAU,MAAM,eAAe,CAAC;AAI5C,eAAO,MAAM,cAAc,GACzB,iBAAiB,SAAS,UAAU,CAAC,qBAAqB,EAC1D,cAAc,SAAS,UAAU,CAAC,WAAW,EAC7C,SAAS,SAAS,UAAU,CAAC,aAAa,EAC1C,kBAAkB,SAAS,UAAU,CAAC,sBAAsB,OAEvD,SAAS,qBACK,iBAAiB,mBACnB,UAAU,CAAC,mBAAmB,CAAC,cAAc,EAAE,SAAS,CAAC,4BAChD,UAAU,CAAC,4BAA4B,CAAC,cAAc,EAAE,UAAU,CAAC,oBAAoB,CAAC,KACjH,UAAU,CAAC,eAAe,CAAC,iBAAiB,EAAE,SAAS,EAAE,kBAAkB,CA6B7E,CAAC"}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.getGlobalProps = void 0;
|
|
4
|
+
const get_domain_1 = require("../naming/get-domain");
|
|
5
|
+
const synth_error_1 = require("./synth-error");
|
|
6
|
+
const getGlobalProps = (app, globalConstConfig, globalEnvConfig, globalDeployTargetConfig) => {
|
|
7
|
+
const envInput = app.node.tryGetContext('env');
|
|
8
|
+
const envName = (envInput.includes('-') ? envInput.split('-')[0] : envInput);
|
|
9
|
+
const ephemeralEnvName = envInput.includes('-') ? envInput.split('-')[1] : '';
|
|
10
|
+
const currentGlobalServiceEnv = globalEnvConfig[envName];
|
|
11
|
+
if (!currentGlobalServiceEnv)
|
|
12
|
+
throw new Error(`Invalid env name: '${envName}'`);
|
|
13
|
+
const currentGlobalDeployTarget = globalDeployTargetConfig[envName];
|
|
14
|
+
Object.keys(currentGlobalDeployTarget).forEach((a) => {
|
|
15
|
+
currentGlobalDeployTarget[a]['account'] = app.node.tryGetContext(a);
|
|
16
|
+
if (!currentGlobalDeployTarget[a]['account'])
|
|
17
|
+
throw new synth_error_1.SynthError(`Missing account mapping of ${a}`);
|
|
18
|
+
});
|
|
19
|
+
const emailSender = `${currentGlobalServiceEnv['emailSender']}@${(0, get_domain_1.getDomain)('', {
|
|
20
|
+
envDomainName: currentGlobalServiceEnv['envDomainName'],
|
|
21
|
+
ephemeralEnvName,
|
|
22
|
+
})}`;
|
|
23
|
+
return {
|
|
24
|
+
envName,
|
|
25
|
+
ephemeralEnvName,
|
|
26
|
+
regionName: currentGlobalDeployTarget['services'].region,
|
|
27
|
+
deployTarget: currentGlobalDeployTarget,
|
|
28
|
+
...globalConstConfig,
|
|
29
|
+
...currentGlobalServiceEnv,
|
|
30
|
+
emailSender,
|
|
31
|
+
};
|
|
32
|
+
};
|
|
33
|
+
exports.getGlobalProps = getGlobalProps;
|
|
34
|
+
//# sourceMappingURL=get-global-props.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"get-global-props.js","sourceRoot":"","sources":["../../../common/synth/get-global-props.ts"],"names":[],"mappings":";;;AAGA,qDAAiD;AACjD,+CAA2C;AAEpC,MAAM,cAAc,GAAG,CAM5B,GAAc,EACd,iBAAoC,EACpC,eAA0E,EAC1E,wBAAkH,EACpC,EAAE;IAChF,MAAM,QAAQ,GAAW,GAAG,CAAC,IAAI,CAAC,aAAa,CAAC,KAAK,CAAC,CAAC;IAEvD,MAAM,OAAO,GAAmB,CAAC,QAAQ,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAmB,CAAC;IAC/G,MAAM,gBAAgB,GAAG,QAAQ,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC;IAE9E,MAAM,uBAAuB,GAAG,eAAe,CAAC,OAAyB,CAAC,CAAC;IAC3E,IAAI,CAAC,uBAAuB;QAAE,MAAM,IAAI,KAAK,CAAC,sBAAsB,OAAO,GAAG,CAAC,CAAC;IAEhF,MAAM,yBAAyB,GAAG,wBAAwB,CAAC,OAAO,CAAC,CAAC;IACpE,MAAM,CAAC,IAAI,CAAC,yBAAyB,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,EAAE,EAAE;QACnD,yBAAyB,CAAC,CAAC,CAAE,CAAC,SAAS,CAAC,GAAG,GAAG,CAAC,IAAI,CAAC,aAAa,CAAC,CAAC,CAAC,CAAC;QACrE,IAAI,CAAC,yBAAyB,CAAC,CAAC,CAAE,CAAC,SAAS,CAAC;YAAE,MAAM,IAAI,wBAAU,CAAC,8BAA8B,CAAC,EAAE,CAAC,CAAC;IACzG,CAAC,CAAC,CAAC;IAEH,MAAM,WAAW,GAAG,GAAG,uBAAuB,CAAC,aAAa,CAAC,IAAI,IAAA,sBAAS,EAAC,EAAE,EAAE;QAC7E,aAAa,EAAE,uBAAuB,CAAC,eAAe,CAAC;QACvD,gBAAgB;KACjB,CAAC,EAAE,CAAC;IAEL,OAAO;QACL,OAAO;QACP,gBAAgB;QAChB,UAAU,EAAE,yBAAyB,CAAC,UAAU,CAAE,CAAC,MAAM;QACzD,YAAY,EAAE,yBAA+C;QAC7D,GAAG,iBAAiB;QACpB,GAAG,uBAAuB;QAC1B,WAAW;KACZ,CAAC;AACJ,CAAC,CAAC;AAvCW,QAAA,cAAc,kBAuCzB"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { BaseGlobalProps, BaseServiceProps, BaseServiceDependencies } from './props-types';
|
|
2
|
+
|
|
3
|
+
export declare const getServiceProps: <
|
|
4
|
+
GlobalProps extends BaseGlobalProps = BaseGlobalProps,
|
|
5
|
+
ServiceDependencies extends BaseServiceDependencies = {},
|
|
6
|
+
>(
|
|
7
|
+
serviceName: string,
|
|
8
|
+
globalProps: GlobalProps,
|
|
9
|
+
serviceDependencies?: ServiceDependencies
|
|
10
|
+
) => BaseServiceProps<GlobalProps, ServiceDependencies>;
|
|
11
|
+
//# sourceMappingURL=get-service-props.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"get-service-props.d.ts","sourceRoot":"","sources":["../../../common/synth/get-service-props.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,gBAAgB,EAAE,uBAAuB,EAAE,MAAM,eAAe,CAAC;AAE3F,eAAO,MAAM,eAAe,GAC1B,WAAW,SAAS,eAAe,oBACnC,mBAAmB,SAAS,uBAAuB,oBAEtC,MAAM,eACN,WAAW,wBACH,mBAAmB,KACvC,gBAAgB,CAAC,WAAW,EAAE,mBAAmB,CAMnD,CAAC"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.getServiceProps = void 0;
|
|
4
|
+
const getServiceProps = (serviceName, globalProps, serviceDependencies = {}) => {
|
|
5
|
+
return {
|
|
6
|
+
serviceName,
|
|
7
|
+
...globalProps,
|
|
8
|
+
...serviceDependencies,
|
|
9
|
+
};
|
|
10
|
+
};
|
|
11
|
+
exports.getServiceProps = getServiceProps;
|
|
12
|
+
//# sourceMappingURL=get-service-props.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"get-service-props.js","sourceRoot":"","sources":["../../../common/synth/get-service-props.ts"],"names":[],"mappings":";;;AAEO,MAAM,eAAe,GAAG,CAI7B,WAAmB,EACnB,WAAwB,EACxB,sBAA2C,EAAyB,EAChB,EAAE;IACtD,OAAO;QACL,WAAW;QACX,GAAG,WAAW;QACd,GAAG,mBAAmB;KACvB,CAAC;AACJ,CAAC,CAAC;AAbW,QAAA,eAAe,mBAa1B"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export * from './account-mapping';
|
|
2
|
+
export * from './assume-role';
|
|
3
|
+
export * from './get-global-props';
|
|
4
|
+
export * from './get-service-props';
|
|
5
|
+
export * from './pre-script';
|
|
6
|
+
export * from './props-types';
|
|
7
|
+
export * from './synth-error';
|
|
8
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../common/synth/index.ts"],"names":[],"mappings":"AAAA,cAAc,mBAAmB,CAAC;AAClC,cAAc,eAAe,CAAC;AAC9B,cAAc,oBAAoB,CAAC;AACnC,cAAc,qBAAqB,CAAC;AACpC,cAAc,cAAc,CAAC;AAC7B,cAAc,eAAe,CAAC;AAC9B,cAAc,eAAe,CAAC"}
|
|
@@ -0,0 +1,24 @@
|
|
|
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("./account-mapping"), exports);
|
|
18
|
+
__exportStar(require("./assume-role"), exports);
|
|
19
|
+
__exportStar(require("./get-global-props"), exports);
|
|
20
|
+
__exportStar(require("./get-service-props"), exports);
|
|
21
|
+
__exportStar(require("./pre-script"), exports);
|
|
22
|
+
__exportStar(require("./props-types"), exports);
|
|
23
|
+
__exportStar(require("./synth-error"), exports);
|
|
24
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../common/synth/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,oDAAkC;AAClC,gDAA8B;AAC9B,qDAAmC;AACnC,sDAAoC;AACpC,+CAA6B;AAC7B,gDAA8B;AAC9B,gDAA8B"}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import * as propsTypes from './props-types';
|
|
2
|
+
|
|
3
|
+
export declare const preScript: <
|
|
4
|
+
GlobalConst,
|
|
5
|
+
AllowedEnv extends propsTypes.BaseEnvName = string,
|
|
6
|
+
GlobalEnv extends propsTypes.BaseGlobalEnv = {
|
|
7
|
+
roleName: string;
|
|
8
|
+
deployBranch: string;
|
|
9
|
+
hostedZoneName: string;
|
|
10
|
+
envDomainName: string;
|
|
11
|
+
emailSender: string;
|
|
12
|
+
},
|
|
13
|
+
DeployTargetName extends propsTypes.BaseDeployTargetName = string,
|
|
14
|
+
>(
|
|
15
|
+
globalConstConfig: propsTypes.BaseGlobalConstConfig<GlobalConst>,
|
|
16
|
+
globalEnvConfig: propsTypes.BaseGlobalEnvConfig<AllowedEnv, GlobalEnv>,
|
|
17
|
+
globalDeployTargetConfig: propsTypes.BaseGlobalDeployTargetConfig<AllowedEnv, DeployTargetName>,
|
|
18
|
+
args: string[]
|
|
19
|
+
) => Promise<{
|
|
20
|
+
isSingleProjectAccount?: boolean;
|
|
21
|
+
servicesNamesInput: string[];
|
|
22
|
+
envNameInput: string;
|
|
23
|
+
ephemeralEnvName: string | undefined;
|
|
24
|
+
envName: AllowedEnv;
|
|
25
|
+
roleName: string;
|
|
26
|
+
outputFile: string;
|
|
27
|
+
servicesNames: string;
|
|
28
|
+
bootstrappingServices: string;
|
|
29
|
+
accountMap: string;
|
|
30
|
+
landingZones: string[];
|
|
31
|
+
}>;
|
|
32
|
+
//# sourceMappingURL=pre-script.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"pre-script.d.ts","sourceRoot":"","sources":["../../../common/synth/pre-script.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,UAAU,MAAM,eAAe,CAAC;AAK5C,eAAO,MAAM,SAAS,GACpB,WAAW,EACX,UAAU,SAAS,UAAU,CAAC,WAAW,WACzC,SAAS,SAAS,UAAU,CAAC,aAAa;;;;;;GAC1C,gBAAgB,SAAS,UAAU,CAAC,oBAAoB,8BAErC,UAAU,CAAC,qBAAqB,CAAC,WAAW,CAAC,mBAC/C,UAAU,CAAC,mBAAmB,CAAC,UAAU,EAAE,SAAS,CAAC,4BAC5C,UAAU,CAAC,4BAA4B,CAAC,UAAU,EAAE,gBAAgB,CAAC,QACzF,MAAM,EAAE,KACb,OAAO,CAAC;IACT,sBAAsB,CAAC,EAAE,OAAO,CAAC;IACjC,kBAAkB,EAAE,MAAM,EAAE,CAAC;IAC7B,YAAY,EAAE,MAAM,CAAC;IACrB,gBAAgB,EAAE,MAAM,GAAG,SAAS,CAAC;IACrC,OAAO,EAAE,UAAU,CAAC;IACpB,QAAQ,EAAE,MAAM,CAAC;IACjB,UAAU,EAAE,MAAM,CAAC;IACnB,aAAa,EAAE,MAAM,CAAC;IACtB,qBAAqB,EAAE,MAAM,CAAC;IAC9B,UAAU,EAAE,MAAM,CAAC;IACnB,YAAY,EAAE,MAAM,EAAE,CAAC;CACxB,CAyDA,CAAC"}
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.preScript = void 0;
|
|
4
|
+
const get_service_name_1 = require("../naming/get-service-name");
|
|
5
|
+
const account_mapping_1 = require("./account-mapping");
|
|
6
|
+
const synth_error_1 = require("./synth-error");
|
|
7
|
+
const preScript = async (globalConstConfig, globalEnvConfig, globalDeployTargetConfig, args) => {
|
|
8
|
+
try {
|
|
9
|
+
if (!args[3])
|
|
10
|
+
throw new synth_error_1.SynthError('Missing env');
|
|
11
|
+
const envNameInput = args[3];
|
|
12
|
+
const servicesNamesInput = args.slice(4);
|
|
13
|
+
const envName = (envNameInput.includes('-') ? envNameInput.split('-')[0] : envNameInput);
|
|
14
|
+
const ephemeralEnvName = envNameInput.includes('-') ? envNameInput.split('-')[1] : '';
|
|
15
|
+
const props = {
|
|
16
|
+
...globalConstConfig,
|
|
17
|
+
...globalEnvConfig[envName],
|
|
18
|
+
envName,
|
|
19
|
+
ephemeralEnvName,
|
|
20
|
+
regionName: '', // Add the regionName property
|
|
21
|
+
deployTarget: {}, // Add the deployTarget property
|
|
22
|
+
};
|
|
23
|
+
if (!globalDeployTargetConfig[envName])
|
|
24
|
+
throw new synth_error_1.SynthError('Invalid Env');
|
|
25
|
+
const landingZones = await Promise.all(globalConstConfig.landingZones.map((l) => (0, account_mapping_1.accountMapping)(l, 'landingzone')));
|
|
26
|
+
const accountMap = parseContext((await Promise.all(Object.keys(globalDeployTargetConfig[envName]).map(async (a) => {
|
|
27
|
+
const account = globalDeployTargetConfig[envName][a]['account'];
|
|
28
|
+
if (!account.includes('-'))
|
|
29
|
+
return `${a}=${account}`;
|
|
30
|
+
const [env, ...project] = account.split('-').reverse();
|
|
31
|
+
const composed = project.reverse();
|
|
32
|
+
return `${a}=${await (0, account_mapping_1.accountMapping)(composed.join('-'), env)}`;
|
|
33
|
+
}))).join('&'));
|
|
34
|
+
const outputFile = `cdk.out/output/${envNameInput}.json`;
|
|
35
|
+
const roleName = globalEnvConfig[envName].roleName;
|
|
36
|
+
const servicesNames = parseServicesNames(servicesNamesInput, props);
|
|
37
|
+
const bootstrappingServices = globalConstConfig.bootstrappingServices ? parseServicesNames(globalConstConfig.bootstrappingServices, props) : '';
|
|
38
|
+
return {
|
|
39
|
+
isSingleProjectAccount: props.isSingleProjectAccount,
|
|
40
|
+
servicesNamesInput,
|
|
41
|
+
envName,
|
|
42
|
+
envNameInput,
|
|
43
|
+
ephemeralEnvName,
|
|
44
|
+
roleName,
|
|
45
|
+
outputFile,
|
|
46
|
+
servicesNames,
|
|
47
|
+
bootstrappingServices,
|
|
48
|
+
accountMap,
|
|
49
|
+
landingZones,
|
|
50
|
+
};
|
|
51
|
+
}
|
|
52
|
+
catch (error) {
|
|
53
|
+
console.log(`PreScript Error: ${error.message}`);
|
|
54
|
+
process.exit(1);
|
|
55
|
+
}
|
|
56
|
+
};
|
|
57
|
+
exports.preScript = preScript;
|
|
58
|
+
const parseServicesNames = (servicesNamesInput, props) => {
|
|
59
|
+
return servicesNamesInput.length < 1
|
|
60
|
+
? '--all'
|
|
61
|
+
: `${servicesNamesInput.reduce((acc, s) => {
|
|
62
|
+
acc += `${(0, get_service_name_1.getServiceName)(s, props)} `;
|
|
63
|
+
return acc;
|
|
64
|
+
}, '')}--exclusively`;
|
|
65
|
+
};
|
|
66
|
+
const parseContext = (stringContext) => {
|
|
67
|
+
if (!stringContext)
|
|
68
|
+
return '';
|
|
69
|
+
return stringContext
|
|
70
|
+
.split('&')
|
|
71
|
+
.map((c) => `--context ${c} `)
|
|
72
|
+
.join('');
|
|
73
|
+
};
|
|
74
|
+
//# sourceMappingURL=pre-script.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"pre-script.js","sourceRoot":"","sources":["../../../common/synth/pre-script.ts"],"names":[],"mappings":"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"}
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
export type BaseRegionName = 'us-east-1' | string;
|
|
2
|
+
export type BaseEnvName = 'dev' | 'test' | 'staging' | 'prod' | string;
|
|
3
|
+
export type BaseDeployTargetName = 'services' | string;
|
|
4
|
+
export interface DeployConfig {
|
|
5
|
+
region: BaseRegionName;
|
|
6
|
+
account: string;
|
|
7
|
+
}
|
|
8
|
+
export type BaseGlobalConstConfig<ExtendedConst = {}> = {
|
|
9
|
+
projectName: string;
|
|
10
|
+
projectShortName: string;
|
|
11
|
+
repositoryName: string;
|
|
12
|
+
landingZones: string[];
|
|
13
|
+
pipelineNotificationSlackChannel?: string;
|
|
14
|
+
isDemoProject?: boolean;
|
|
15
|
+
bootstrappingServices?: string[];
|
|
16
|
+
isSingleProjectAccount?: boolean;
|
|
17
|
+
} & ExtendedConst;
|
|
18
|
+
export type BaseGlobalEnv<ExtendedEnv = {}> = {
|
|
19
|
+
roleName: string;
|
|
20
|
+
deployBranch: string;
|
|
21
|
+
hostedZoneName: string;
|
|
22
|
+
envDomainName: string;
|
|
23
|
+
emailSender: string;
|
|
24
|
+
} & ExtendedEnv;
|
|
25
|
+
export type BaseGlobalEnvConfig<AllowedEnv extends BaseEnvName = BaseEnvName, GlobalEnv extends BaseGlobalEnv = BaseGlobalEnv> = Record<
|
|
26
|
+
AllowedEnv,
|
|
27
|
+
GlobalEnv
|
|
28
|
+
>;
|
|
29
|
+
export type BaseGlobalDeployTarget<DeployTargetName extends BaseDeployTargetName = BaseDeployTargetName> = Record<DeployTargetName, DeployConfig>;
|
|
30
|
+
export type BaseGlobalDeployTargetConfig<
|
|
31
|
+
AllowedEnv extends BaseEnvName = BaseEnvName,
|
|
32
|
+
DeployTargetName extends BaseDeployTargetName = BaseDeployTargetName,
|
|
33
|
+
GlobalDeployTarget extends BaseGlobalDeployTarget<DeployTargetName> = BaseGlobalDeployTarget<DeployTargetName>,
|
|
34
|
+
> = Record<AllowedEnv, GlobalDeployTarget>;
|
|
35
|
+
export type BaseServiceDependencies<ServiceDependencies = {}> = {} & ServiceDependencies;
|
|
36
|
+
export type BaseServiceConstConfig<ExtendedConst = {}> = {} & ExtendedConst;
|
|
37
|
+
export type BaseServiceEnv<ExtendedEnv = {}> = {} & ExtendedEnv;
|
|
38
|
+
export type BaseServiceEnvConfig<AllowedEnv extends BaseEnvName = BaseEnvName, ServiceEnv extends BaseServiceEnv = BaseServiceEnv> = Record<
|
|
39
|
+
AllowedEnv,
|
|
40
|
+
ServiceEnv
|
|
41
|
+
>;
|
|
42
|
+
export type BaseGlobalProps<
|
|
43
|
+
GlobalConstConfig extends BaseGlobalConstConfig = BaseGlobalConstConfig,
|
|
44
|
+
GlobalEnv extends BaseGlobalEnv = BaseGlobalEnv,
|
|
45
|
+
GlobalDeployTarget extends BaseGlobalDeployTarget = BaseGlobalDeployTarget,
|
|
46
|
+
> = {
|
|
47
|
+
envName: BaseEnvName;
|
|
48
|
+
regionName: BaseRegionName;
|
|
49
|
+
ephemeralEnvName?: string;
|
|
50
|
+
deployTarget: GlobalDeployTarget;
|
|
51
|
+
} & GlobalConstConfig &
|
|
52
|
+
GlobalEnv;
|
|
53
|
+
export type BaseServiceProps<
|
|
54
|
+
GlobalProps extends BaseGlobalProps = BaseGlobalProps,
|
|
55
|
+
ServiceDependencies extends BaseServiceDependencies = BaseServiceDependencies,
|
|
56
|
+
> = {
|
|
57
|
+
serviceName: string;
|
|
58
|
+
} & GlobalProps &
|
|
59
|
+
ServiceDependencies;
|
|
60
|
+
//# sourceMappingURL=props-types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"props-types.d.ts","sourceRoot":"","sources":["../../../common/synth/props-types.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,cAAc,GAAG,WAAW,GAAG,MAAM,CAAC;AAElD,MAAM,MAAM,WAAW,GAAG,KAAK,GAAG,MAAM,GAAG,SAAS,GAAG,MAAM,GAAG,MAAM,CAAC;AAEvE,MAAM,MAAM,oBAAoB,GAAG,UAAU,GAAG,MAAM,CAAC;AAEvD,MAAM,WAAW,YAAY;IAC3B,MAAM,EAAE,cAAc,CAAC;IACvB,OAAO,EAAE,MAAM,CAAC;CACjB;AAID,MAAM,MAAM,qBAAqB,CAAC,aAAa,GAAG,EAAE,IAAI;IACtD,WAAW,EAAE,MAAM,CAAC;IACpB,gBAAgB,EAAE,MAAM,CAAC;IACzB,cAAc,EAAE,MAAM,CAAC;IACvB,YAAY,EAAE,MAAM,EAAE,CAAC;IACvB,gCAAgC,CAAC,EAAE,MAAM,CAAC;IAC1C,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,qBAAqB,CAAC,EAAE,MAAM,EAAE,CAAC;IACjC,sBAAsB,CAAC,EAAE,OAAO,CAAC;CAClC,GAAG,aAAa,CAAC;AAElB,MAAM,MAAM,aAAa,CAAC,WAAW,GAAG,EAAE,IAAI;IAC5C,QAAQ,EAAE,MAAM,CAAC;IACjB,YAAY,EAAE,MAAM,CAAC;IACrB,cAAc,EAAE,MAAM,CAAC;IACvB,aAAa,EAAE,MAAM,CAAC;IACtB,WAAW,EAAE,MAAM,CAAC;CACrB,GAAG,WAAW,CAAC;AAEhB,MAAM,MAAM,mBAAmB,CAAC,UAAU,SAAS,WAAW,GAAG,WAAW,EAAE,SAAS,SAAS,aAAa,GAAG,aAAa,IAAI,MAAM,CACrI,UAAU,EACV,SAAS,CACV,CAAC;AAEF,MAAM,MAAM,sBAAsB,CAAC,gBAAgB,SAAS,oBAAoB,GAAG,oBAAoB,IAAI,MAAM,CAAC,gBAAgB,EAAE,YAAY,CAAC,CAAC;AAElJ,MAAM,MAAM,4BAA4B,CACtC,UAAU,SAAS,WAAW,GAAG,WAAW,EAC5C,gBAAgB,SAAS,oBAAoB,GAAG,oBAAoB,EACpE,kBAAkB,SAAS,sBAAsB,CAAC,gBAAgB,CAAC,GAAG,sBAAsB,CAAC,gBAAgB,CAAC,IAC5G,MAAM,CAAC,UAAU,EAAE,kBAAkB,CAAC,CAAC;AAI3C,MAAM,MAAM,uBAAuB,CAAC,mBAAmB,GAAG,EAAE,IAAI,EAAE,GAAG,mBAAmB,CAAC;AAEzF,MAAM,MAAM,sBAAsB,CAAC,aAAa,GAAG,EAAE,IAAI,EAAE,GAAG,aAAa,CAAC;AAE5E,MAAM,MAAM,cAAc,CAAC,WAAW,GAAG,EAAE,IAAI,EAAE,GAAG,WAAW,CAAC;AAEhE,MAAM,MAAM,oBAAoB,CAAC,UAAU,SAAS,WAAW,GAAG,WAAW,EAAE,UAAU,SAAS,cAAc,GAAG,cAAc,IAAI,MAAM,CACzI,UAAU,EACV,UAAU,CACX,CAAC;AAIF,MAAM,MAAM,eAAe,CACzB,iBAAiB,SAAS,qBAAqB,GAAG,qBAAqB,EACvE,SAAS,SAAS,aAAa,GAAG,aAAa,EAC/C,kBAAkB,SAAS,sBAAsB,GAAG,sBAAsB,IACxE;IACF,OAAO,EAAE,WAAW,CAAC;IACrB,UAAU,EAAE,cAAc,CAAC;IAC3B,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,YAAY,EAAE,kBAAkB,CAAC;CAClC,GAAG,iBAAiB,GACnB,SAAS,CAAC;AAEZ,MAAM,MAAM,gBAAgB,CAC1B,WAAW,SAAS,eAAe,GAAG,eAAe,EACrD,mBAAmB,SAAS,uBAAuB,GAAG,uBAAuB,IAC3E;IACF,WAAW,EAAE,MAAM,CAAC;CACrB,GAAG,WAAW,GACb,mBAAmB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"props-types.js","sourceRoot":"","sources":["../../../common/synth/props-types.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { BaseServiceProps } from './props-types';
|
|
2
|
+
|
|
3
|
+
export declare class SynthError extends Error {
|
|
4
|
+
message: string;
|
|
5
|
+
props?: BaseServiceProps | undefined;
|
|
6
|
+
constructor(message: string, props?: BaseServiceProps | undefined);
|
|
7
|
+
}
|
|
8
|
+
//# sourceMappingURL=synth-error.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"synth-error.d.ts","sourceRoot":"","sources":["../../../common/synth/synth-error.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,eAAe,CAAC;AAEjD,qBAAa,UAAW,SAAQ,KAAK;IAEjB,OAAO,EAAE,MAAM;IACxB,KAAK,CAAC,EAAE,gBAAgB;gBADf,OAAO,EAAE,MAAM,EACxB,KAAK,CAAC,EAAE,gBAAgB,YAAA;CAOlC"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.SynthError = void 0;
|
|
4
|
+
class SynthError extends Error {
|
|
5
|
+
message;
|
|
6
|
+
props;
|
|
7
|
+
constructor(message, props) {
|
|
8
|
+
super(message);
|
|
9
|
+
this.message = message;
|
|
10
|
+
this.props = props;
|
|
11
|
+
this.message = `[${props?.serviceName || 'UnknownService'}] ${message}`;
|
|
12
|
+
const actualProto = new.target.prototype;
|
|
13
|
+
Object.setPrototypeOf(this, actualProto);
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
exports.SynthError = SynthError;
|
|
17
|
+
//# sourceMappingURL=synth-error.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"synth-error.js","sourceRoot":"","sources":["../../../common/synth/synth-error.ts"],"names":[],"mappings":";;;AAEA,MAAa,UAAW,SAAQ,KAAK;IAEjB;IACT;IAFT,YACkB,OAAe,EACxB,KAAwB;QAE/B,KAAK,CAAC,OAAO,CAAC,CAAC;QAHC,YAAO,GAAP,OAAO,CAAQ;QACxB,UAAK,GAAL,KAAK,CAAmB;QAG/B,IAAI,CAAC,OAAO,GAAG,IAAI,KAAK,EAAE,WAAW,IAAI,gBAAgB,KAAK,OAAO,EAAE,CAAC;QACxE,MAAM,WAAW,GAAG,GAAG,CAAC,MAAM,CAAC,SAAS,CAAC;QACzC,MAAM,CAAC,cAAc,CAAC,IAAI,EAAE,WAAW,CAAC,CAAC;IAC3C,CAAC;CACF;AAVD,gCAUC"}
|
package/index.d.ts
ADDED
package/index.d.ts.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../index.ts"],"names":[],"mappings":"AAAA,cAAc,UAAU,CAAC;AACzB,cAAc,UAAU,CAAC;AACzB,cAAc,UAAU,CAAC"}
|
package/index.js
ADDED
|
@@ -0,0 +1,20 @@
|
|
|
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("./common"), exports);
|
|
18
|
+
__exportStar(require("./prefab"), exports);
|
|
19
|
+
__exportStar(require("./script"), exports);
|
|
20
|
+
//# sourceMappingURL=index.js.map
|
package/index.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,2CAAyB;AACzB,2CAAyB;AACzB,2CAAyB"}
|
package/package.json
ADDED
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@takumi-stack/core",
|
|
3
|
+
"version": "1.0.0",
|
|
4
|
+
"author": "sinapsis.co",
|
|
5
|
+
"license": "MIT",
|
|
6
|
+
"main": "./index.js",
|
|
7
|
+
"types": "./index.d.ts",
|
|
8
|
+
"dependencies": {
|
|
9
|
+
"@aws-appsync/utils": "^1.9.0",
|
|
10
|
+
"@aws-sdk/client-cloudfront": "^3.632.0",
|
|
11
|
+
"@aws-sdk/client-codepipeline": "^3.632.0",
|
|
12
|
+
"@aws-sdk/client-cognito-identity-provider": "^3.632.0",
|
|
13
|
+
"@aws-sdk/client-dynamodb": "^3.632.0",
|
|
14
|
+
"@aws-sdk/client-rds": "^3.632.0",
|
|
15
|
+
"@aws-sdk/client-secrets-manager": "^3.632.0",
|
|
16
|
+
"@aws-sdk/client-ssm": "^3.632.0",
|
|
17
|
+
"@aws-sdk/client-sts": "^3.632.0",
|
|
18
|
+
"@aws-sdk/lib-dynamodb": "^3.632.0",
|
|
19
|
+
"@takumi-stack/sdk": "^1.0.2",
|
|
20
|
+
"@types/node": "^22.3.0",
|
|
21
|
+
"aws-cdk-lib": "^2.152.0",
|
|
22
|
+
"aws-lambda": "^1.0.7",
|
|
23
|
+
"constructs": "^10.3.0",
|
|
24
|
+
"dotenv": "^16.4.5",
|
|
25
|
+
"esbuild": "^0.17.19",
|
|
26
|
+
"graphql": "^15.9.0",
|
|
27
|
+
"open-next": "^2.3.9",
|
|
28
|
+
"reflect-metadata": "^0.1.14",
|
|
29
|
+
"type-graphql": "^1.1.1",
|
|
30
|
+
"typeorm": "^0.3.20"
|
|
31
|
+
},
|
|
32
|
+
"devDependencies": {
|
|
33
|
+
"@trivago/prettier-plugin-sort-imports": "^4.3.0",
|
|
34
|
+
"@types/aws-lambda": "^8.10.143",
|
|
35
|
+
"@types/html-minifier-terser": "^6.1.0",
|
|
36
|
+
"cdk": "^2.152.0"
|
|
37
|
+
},
|
|
38
|
+
"scripts": {
|
|
39
|
+
"build": "tsc && npx tsc-alias",
|
|
40
|
+
"release": "cp package.json .dist/package.json && cd .dist && pnpm publish --access public && cd ..",
|
|
41
|
+
"lint": "eslint . --max-warnings 0"
|
|
42
|
+
}
|
|
43
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"handler.d.ts","sourceRoot":"","sources":["../../../../../../prefab/analytics/events/handlers/ingestion-transform/handler.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,SAAS,MAAM,YAAY,CAAC;AA6BxC,eAAO,MAAM,OAAO,EAAE,SAAS,CAAC,6BAK/B,CAAC"}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.handler = void 0;
|
|
4
|
+
const createDroppedRecord = (recordId) => {
|
|
5
|
+
return { recordId, result: 'Dropped', data: Buffer.from('').toString('base64') };
|
|
6
|
+
};
|
|
7
|
+
const processData = (payloadStr) => {
|
|
8
|
+
return JSON.parse(payloadStr);
|
|
9
|
+
};
|
|
10
|
+
const transformRecord = (record) => {
|
|
11
|
+
try {
|
|
12
|
+
const payloadStr = Buffer.from(record.data, 'base64').toString();
|
|
13
|
+
const jsonRecord = processData(payloadStr);
|
|
14
|
+
if (!jsonRecord) {
|
|
15
|
+
console.error('Error creating json record');
|
|
16
|
+
return createDroppedRecord(record.recordId);
|
|
17
|
+
}
|
|
18
|
+
return {
|
|
19
|
+
recordId: record.recordId,
|
|
20
|
+
result: 'Ok',
|
|
21
|
+
data: Buffer.from(JSON.stringify(jsonRecord) + '\n').toString('base64'),
|
|
22
|
+
};
|
|
23
|
+
}
|
|
24
|
+
catch (error) {
|
|
25
|
+
console.error('Error processing record ${record.recordId}: ', error);
|
|
26
|
+
return createDroppedRecord(record.recordId);
|
|
27
|
+
}
|
|
28
|
+
};
|
|
29
|
+
const handler = async (event) => {
|
|
30
|
+
const records = event.records.map((r) => transformRecord(r));
|
|
31
|
+
return { records };
|
|
32
|
+
};
|
|
33
|
+
exports.handler = handler;
|
|
34
|
+
//# sourceMappingURL=handler.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"handler.js","sourceRoot":"","sources":["../../../../../../prefab/analytics/events/handlers/ingestion-transform/handler.ts"],"names":[],"mappings":";;;AAEA,MAAM,mBAAmB,GAAG,CAAC,QAAgB,EAAgD,EAAE;IAC7F,OAAO,EAAE,QAAQ,EAAE,MAAM,EAAE,SAAS,EAAE,IAAI,EAAE,MAAM,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC,QAAQ,CAAC,QAAQ,CAAC,EAAE,CAAC;AACnF,CAAC,CAAC;AAEF,MAAM,WAAW,GAAG,CAAC,UAAkB,EAAU,EAAE;IACjD,OAAO,IAAI,CAAC,KAAK,CAAC,UAAU,CAAC,CAAC;AAChC,CAAC,CAAC;AAEF,MAAM,eAAe,GAAG,CAAC,MAAmD,EAAgD,EAAE;IAC5H,IAAI,CAAC;QACH,MAAM,UAAU,GAAG,MAAM,CAAC,IAAI,CAAC,MAAM,CAAC,IAAI,EAAE,QAAQ,CAAC,CAAC,QAAQ,EAAE,CAAC;QACjE,MAAM,UAAU,GAAG,WAAW,CAAC,UAAU,CAAC,CAAC;QAC3C,IAAI,CAAC,UAAU,EAAE,CAAC;YAChB,OAAO,CAAC,KAAK,CAAC,4BAA4B,CAAC,CAAC;YAC5C,OAAO,mBAAmB,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC;QAC9C,CAAC;QACD,OAAO;YACL,QAAQ,EAAE,MAAM,CAAC,QAAQ;YACzB,MAAM,EAAE,IAAI;YACZ,IAAI,EAAE,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,SAAS,CAAC,UAAU,CAAC,GAAG,IAAI,CAAC,CAAC,QAAQ,CAAC,QAAQ,CAAC;SACxE,CAAC;IACJ,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QACf,OAAO,CAAC,KAAK,CAAC,8CAA8C,EAAE,KAAK,CAAC,CAAC;QACrE,OAAO,mBAAmB,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC;IAC9C,CAAC;AACH,CAAC,CAAC;AAEK,MAAM,OAAO,GAA4C,KAAK,EACnE,KAA4C,EACK,EAAE;IACnD,MAAM,OAAO,GAAmD,KAAK,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,eAAe,CAAC,CAAC,CAAC,CAAC,CAAC;IAC7G,OAAO,EAAE,OAAO,EAAE,CAAC;AACrB,CAAC,CAAC;AALW,QAAA,OAAO,WAKlB"}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { CfnWorkGroup } from 'aws-cdk-lib/aws-athena';
|
|
2
|
+
import { CfnCrawler, CfnCrawlerProps, CfnDatabase } from 'aws-cdk-lib/aws-glue';
|
|
3
|
+
import { Bucket } from 'aws-cdk-lib/aws-s3';
|
|
4
|
+
import { Construct } from 'constructs';
|
|
5
|
+
|
|
6
|
+
import { ServiceStack } from '../../../common';
|
|
7
|
+
|
|
8
|
+
import { EventBusPrefab } from '../../../prefab/integration/event-bus';
|
|
9
|
+
|
|
10
|
+
export type EventsAnalyticsParams = {
|
|
11
|
+
eventBus: EventBusPrefab;
|
|
12
|
+
eventSource?: string;
|
|
13
|
+
paramsCrawlerProps?: Partial<CfnCrawlerProps>;
|
|
14
|
+
lifecycleDurations?: {
|
|
15
|
+
infrequentDays: number;
|
|
16
|
+
glacierDays: number;
|
|
17
|
+
};
|
|
18
|
+
bufferingHints?: {
|
|
19
|
+
intervalInSeconds: number;
|
|
20
|
+
sizeInMBs: number;
|
|
21
|
+
};
|
|
22
|
+
};
|
|
23
|
+
export declare class EventsAnalyticsPrefab extends Construct {
|
|
24
|
+
readonly datalakeBucket: Bucket;
|
|
25
|
+
readonly database: CfnDatabase;
|
|
26
|
+
readonly crawler: CfnCrawler;
|
|
27
|
+
readonly athenaOutputBucket: Bucket;
|
|
28
|
+
readonly workGroup: CfnWorkGroup;
|
|
29
|
+
constructor(service: ServiceStack, params: EventsAnalyticsParams);
|
|
30
|
+
}
|
|
31
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../prefab/analytics/events/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAE,MAAM,wBAAwB,CAAC;AAGtD,OAAO,EAAE,UAAU,EAAE,eAAe,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAC;AAGhF,OAAO,EAAqB,MAAM,EAAkC,MAAM,oBAAoB,CAAC;AAC/F,OAAO,EAAE,SAAS,EAAE,MAAM,YAAY,CAAC;AAEvC,OAAO,EAAE,YAAY,EAAoF,MAAM,QAAQ,CAAC;AAGxH,OAAO,EAAE,cAAc,EAAE,MAAM,8BAA8B,CAAC;AAE9D,MAAM,MAAM,qBAAqB,GAAG;IAClC,QAAQ,EAAE,cAAc,CAAC;IACzB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,kBAAkB,CAAC,EAAE,OAAO,CAAC,eAAe,CAAC,CAAC;IAC9C,kBAAkB,CAAC,EAAE;QACnB,cAAc,EAAE,MAAM,CAAC;QACvB,WAAW,EAAE,MAAM,CAAC;KACrB,CAAC;IACF,cAAc,CAAC,EAAE;QACf,iBAAiB,EAAE,MAAM,CAAC;QAC1B,SAAS,EAAE,MAAM,CAAC;KACnB,CAAC;CACH,CAAC;AAEF,qBAAa,qBAAsB,SAAQ,SAAS;IAClD,SAAgB,cAAc,EAAE,MAAM,CAAC;IACvC,SAAgB,QAAQ,EAAE,WAAW,CAAC;IACtC,SAAgB,OAAO,EAAE,UAAU,CAAC;IACpC,SAAgB,kBAAkB,EAAE,MAAM,CAAC;IAC3C,SAAgB,SAAS,EAAE,YAAY,CAAC;gBAE5B,OAAO,EAAE,YAAY,EAAE,MAAM,EAAE,qBAAqB;CA4JjE"}
|