alchemy 2.0.0-beta.10 → 2.0.0-beta.13
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/bin/alchemy.js +1122 -450
- package/bin/alchemy.js.map +1 -1
- package/bin/alchemy.sh +15 -0
- package/bin/alchemy.ts +22 -727
- package/bin/commands/_shared.ts +237 -0
- package/bin/commands/bootstrap.ts +117 -0
- package/bin/commands/deploy.ts +144 -0
- package/bin/commands/login.ts +93 -0
- package/bin/commands/logs.ts +157 -0
- package/bin/commands/tail.ts +138 -0
- package/lib/AWS/AuthProvider.d.ts +7 -71
- package/lib/AWS/AuthProvider.d.ts.map +1 -1
- package/lib/AWS/AuthProvider.js +27 -22
- package/lib/AWS/AuthProvider.js.map +1 -1
- package/lib/AWS/AutoScaling/LaunchTemplate.d.ts +3 -3
- package/lib/AWS/AutoScaling/LaunchTemplate.d.ts.map +1 -1
- package/lib/AWS/AutoScaling/LaunchTemplate.js +2 -2
- package/lib/AWS/AutoScaling/LaunchTemplate.js.map +1 -1
- package/lib/AWS/Bootstrap.d.ts +2 -1
- package/lib/AWS/Bootstrap.d.ts.map +1 -1
- package/lib/AWS/Bootstrap.js +27 -29
- package/lib/AWS/Bootstrap.js.map +1 -1
- package/lib/AWS/CloudWatch/Alarm.d.ts +2 -2
- package/lib/AWS/CloudWatch/Alarm.d.ts.map +1 -1
- package/lib/AWS/CloudWatch/Alarm.js +2 -2
- package/lib/AWS/CloudWatch/Alarm.js.map +1 -1
- package/lib/AWS/CloudWatch/AlarmMuteRule.d.ts +2 -2
- package/lib/AWS/CloudWatch/AlarmMuteRule.d.ts.map +1 -1
- package/lib/AWS/CloudWatch/AlarmMuteRule.js +2 -2
- package/lib/AWS/CloudWatch/AlarmMuteRule.js.map +1 -1
- package/lib/AWS/CloudWatch/CompositeAlarm.d.ts +2 -2
- package/lib/AWS/CloudWatch/CompositeAlarm.d.ts.map +1 -1
- package/lib/AWS/CloudWatch/CompositeAlarm.js +2 -2
- package/lib/AWS/CloudWatch/CompositeAlarm.js.map +1 -1
- package/lib/AWS/CloudWatch/Dashboard.d.ts +2 -2
- package/lib/AWS/CloudWatch/Dashboard.d.ts.map +1 -1
- package/lib/AWS/CloudWatch/Dashboard.js +2 -2
- package/lib/AWS/CloudWatch/Dashboard.js.map +1 -1
- package/lib/AWS/CloudWatch/InsightRule.d.ts +2 -2
- package/lib/AWS/CloudWatch/InsightRule.d.ts.map +1 -1
- package/lib/AWS/CloudWatch/InsightRule.js +2 -2
- package/lib/AWS/CloudWatch/InsightRule.js.map +1 -1
- package/lib/AWS/CloudWatch/MetricStream.d.ts +2 -2
- package/lib/AWS/CloudWatch/MetricStream.d.ts.map +1 -1
- package/lib/AWS/CloudWatch/MetricStream.js +2 -2
- package/lib/AWS/CloudWatch/MetricStream.js.map +1 -1
- package/lib/AWS/Credentials.d.ts +5 -10
- package/lib/AWS/Credentials.d.ts.map +1 -1
- package/lib/AWS/Credentials.js +6 -30
- package/lib/AWS/Credentials.js.map +1 -1
- package/lib/AWS/DynamoDB/Table.d.ts +1 -1
- package/lib/AWS/DynamoDB/Table.d.ts.map +1 -1
- package/lib/AWS/EC2/EIP.d.ts +3 -3
- package/lib/AWS/EC2/EIP.d.ts.map +1 -1
- package/lib/AWS/EC2/EIP.js +2 -2
- package/lib/AWS/EC2/EIP.js.map +1 -1
- package/lib/AWS/EC2/EgressOnlyInternetGateway.d.ts +3 -3
- package/lib/AWS/EC2/EgressOnlyInternetGateway.d.ts.map +1 -1
- package/lib/AWS/EC2/EgressOnlyInternetGateway.js +2 -2
- package/lib/AWS/EC2/EgressOnlyInternetGateway.js.map +1 -1
- package/lib/AWS/EC2/Instance.d.ts +3 -3
- package/lib/AWS/EC2/Instance.d.ts.map +1 -1
- package/lib/AWS/EC2/Instance.js +2 -2
- package/lib/AWS/EC2/Instance.js.map +1 -1
- package/lib/AWS/EC2/InternetGateway.d.ts +3 -3
- package/lib/AWS/EC2/InternetGateway.d.ts.map +1 -1
- package/lib/AWS/EC2/InternetGateway.js +2 -2
- package/lib/AWS/EC2/InternetGateway.js.map +1 -1
- package/lib/AWS/EC2/NatGateway.d.ts +3 -3
- package/lib/AWS/EC2/NatGateway.d.ts.map +1 -1
- package/lib/AWS/EC2/NatGateway.js +2 -2
- package/lib/AWS/EC2/NatGateway.js.map +1 -1
- package/lib/AWS/EC2/Network.d.ts +1 -1
- package/lib/AWS/EC2/NetworkAcl.d.ts +3 -3
- package/lib/AWS/EC2/NetworkAcl.d.ts.map +1 -1
- package/lib/AWS/EC2/NetworkAcl.js +2 -2
- package/lib/AWS/EC2/NetworkAcl.js.map +1 -1
- package/lib/AWS/EC2/RouteTable.d.ts +3 -3
- package/lib/AWS/EC2/RouteTable.d.ts.map +1 -1
- package/lib/AWS/EC2/RouteTable.js +2 -2
- package/lib/AWS/EC2/RouteTable.js.map +1 -1
- package/lib/AWS/EC2/SecurityGroup.d.ts +3 -3
- package/lib/AWS/EC2/SecurityGroup.d.ts.map +1 -1
- package/lib/AWS/EC2/SecurityGroup.js +2 -2
- package/lib/AWS/EC2/SecurityGroup.js.map +1 -1
- package/lib/AWS/EC2/Subnet.d.ts +1 -1
- package/lib/AWS/EC2/Subnet.d.ts.map +1 -1
- package/lib/AWS/EC2/Vpc.d.ts +3 -3
- package/lib/AWS/EC2/Vpc.d.ts.map +1 -1
- package/lib/AWS/EC2/Vpc.js +2 -2
- package/lib/AWS/EC2/Vpc.js.map +1 -1
- package/lib/AWS/EC2/VpcEndpoint.d.ts +3 -3
- package/lib/AWS/EC2/VpcEndpoint.d.ts.map +1 -1
- package/lib/AWS/EC2/VpcEndpoint.js +2 -2
- package/lib/AWS/EC2/VpcEndpoint.js.map +1 -1
- package/lib/AWS/ECR/Repository.d.ts +1 -1
- package/lib/AWS/ECR/Repository.d.ts.map +1 -1
- package/lib/AWS/ECR/Repository.js +0 -1
- package/lib/AWS/ECR/Repository.js.map +1 -1
- package/lib/AWS/ECS/Cluster.d.ts +2 -2
- package/lib/AWS/ECS/Cluster.d.ts.map +1 -1
- package/lib/AWS/ECS/Cluster.js +2 -2
- package/lib/AWS/ECS/Cluster.js.map +1 -1
- package/lib/AWS/ECS/Service.d.ts +1 -1
- package/lib/AWS/ECS/Service.d.ts.map +1 -1
- package/lib/AWS/ECS/Task.d.ts +2 -2
- package/lib/AWS/ECS/Task.d.ts.map +1 -1
- package/lib/AWS/ECS/Task.js +2 -2
- package/lib/AWS/ECS/Task.js.map +1 -1
- package/lib/AWS/EKS/Cluster.d.ts +1 -1
- package/lib/AWS/EKS/Cluster.d.ts.map +1 -1
- package/lib/AWS/ELBv2/Listener.d.ts +1 -1
- package/lib/AWS/ELBv2/Listener.d.ts.map +1 -1
- package/lib/AWS/ELBv2/LoadBalancer.d.ts +1 -1
- package/lib/AWS/ELBv2/LoadBalancer.d.ts.map +1 -1
- package/lib/AWS/ELBv2/TargetGroup.d.ts +1 -1
- package/lib/AWS/ELBv2/TargetGroup.d.ts.map +1 -1
- package/lib/AWS/Endpoint.d.ts +7 -2
- package/lib/AWS/Endpoint.d.ts.map +1 -1
- package/lib/AWS/Endpoint.js +7 -2
- package/lib/AWS/Endpoint.js.map +1 -1
- package/lib/AWS/Environment.d.ts +68 -0
- package/lib/AWS/Environment.d.ts.map +1 -0
- package/lib/AWS/Environment.js +53 -0
- package/lib/AWS/Environment.js.map +1 -0
- package/lib/AWS/EventBridge/EventBus.d.ts +2 -2
- package/lib/AWS/EventBridge/EventBus.d.ts.map +1 -1
- package/lib/AWS/EventBridge/EventBus.js +2 -2
- package/lib/AWS/EventBridge/EventBus.js.map +1 -1
- package/lib/AWS/EventBridge/ListRules.d.ts +2 -2
- package/lib/AWS/EventBridge/ListRules.d.ts.map +1 -1
- package/lib/AWS/EventBridge/ListRules.js +2 -2
- package/lib/AWS/EventBridge/ListRules.js.map +1 -1
- package/lib/AWS/EventBridge/PutEvents.d.ts +2 -2
- package/lib/AWS/EventBridge/PutEvents.d.ts.map +1 -1
- package/lib/AWS/EventBridge/PutEvents.js +2 -2
- package/lib/AWS/EventBridge/PutEvents.js.map +1 -1
- package/lib/AWS/EventBridge/Rule.d.ts +2 -2
- package/lib/AWS/EventBridge/Rule.d.ts.map +1 -1
- package/lib/AWS/EventBridge/Rule.js +2 -2
- package/lib/AWS/EventBridge/Rule.js.map +1 -1
- package/lib/AWS/IAM/OpenIDConnectProvider.d.ts +2 -2
- package/lib/AWS/IAM/OpenIDConnectProvider.d.ts.map +1 -1
- package/lib/AWS/IAM/OpenIDConnectProvider.js +2 -2
- package/lib/AWS/IAM/OpenIDConnectProvider.js.map +1 -1
- package/lib/AWS/IAM/Policy.d.ts +3 -3
- package/lib/AWS/IAM/Policy.d.ts.map +1 -1
- package/lib/AWS/IAM/Policy.js +2 -2
- package/lib/AWS/IAM/Policy.js.map +1 -1
- package/lib/AWS/IAM/Role.d.ts +3 -3
- package/lib/AWS/IAM/Role.d.ts.map +1 -1
- package/lib/AWS/IAM/Role.js +3 -3
- package/lib/AWS/IAM/Role.js.map +1 -1
- package/lib/AWS/Kinesis/Stream.d.ts +2 -2
- package/lib/AWS/Kinesis/Stream.d.ts.map +1 -1
- package/lib/AWS/Kinesis/Stream.js +2 -2
- package/lib/AWS/Kinesis/Stream.js.map +1 -1
- package/lib/AWS/Lambda/BucketEventSource.d.ts +1 -1
- package/lib/AWS/Lambda/BucketEventSource.d.ts.map +1 -1
- package/lib/AWS/Lambda/EventBridgeEventSource.d.ts +1 -1
- package/lib/AWS/Lambda/EventBridgeEventSource.d.ts.map +1 -1
- package/lib/AWS/Lambda/EventSourceMapping.d.ts +2 -2
- package/lib/AWS/Lambda/EventSourceMapping.d.ts.map +1 -1
- package/lib/AWS/Lambda/EventSourceMapping.js +2 -2
- package/lib/AWS/Lambda/EventSourceMapping.js.map +1 -1
- package/lib/AWS/Lambda/Function.d.ts +2 -2
- package/lib/AWS/Lambda/Function.d.ts.map +1 -1
- package/lib/AWS/Lambda/Function.js +2 -2
- package/lib/AWS/Lambda/Function.js.map +1 -1
- package/lib/AWS/Lambda/Permission.d.ts +1 -1
- package/lib/AWS/Lambda/Permission.js +1 -1
- package/lib/AWS/Lambda/QueueEventSource.d.ts +1 -1
- package/lib/AWS/Lambda/QueueEventSource.d.ts.map +1 -1
- package/lib/AWS/Lambda/StreamEventSource.d.ts +1 -1
- package/lib/AWS/Lambda/StreamEventSource.d.ts.map +1 -1
- package/lib/AWS/Lambda/TableEventSource.d.ts +1 -1
- package/lib/AWS/Lambda/TableEventSource.d.ts.map +1 -1
- package/lib/AWS/Lambda/TopicEventSource.d.ts +1 -1
- package/lib/AWS/Lambda/TopicEventSource.d.ts.map +1 -1
- package/lib/AWS/Logs/LogGroup.d.ts +3 -3
- package/lib/AWS/Logs/LogGroup.d.ts.map +1 -1
- package/lib/AWS/Logs/LogGroup.js +2 -2
- package/lib/AWS/Logs/LogGroup.js.map +1 -1
- package/lib/AWS/Providers.d.ts +1 -2
- package/lib/AWS/Providers.d.ts.map +1 -1
- package/lib/AWS/Providers.js +3 -3
- package/lib/AWS/Providers.js.map +1 -1
- package/lib/AWS/Region.d.ts +6 -22
- package/lib/AWS/Region.d.ts.map +1 -1
- package/lib/AWS/Region.js +6 -39
- package/lib/AWS/Region.js.map +1 -1
- package/lib/AWS/S3/Bucket.d.ts +2 -2
- package/lib/AWS/S3/Bucket.d.ts.map +1 -1
- package/lib/AWS/S3/Bucket.js +2 -2
- package/lib/AWS/S3/Bucket.js.map +1 -1
- package/lib/AWS/SNS/Topic.d.ts +1 -1
- package/lib/AWS/SNS/Topic.d.ts.map +1 -1
- package/lib/AWS/SQS/Queue.d.ts +3 -3
- package/lib/AWS/SQS/Queue.d.ts.map +1 -1
- package/lib/AWS/SQS/Queue.js +2 -2
- package/lib/AWS/SQS/Queue.js.map +1 -1
- package/lib/AWS/index.d.ts +1 -3
- package/lib/AWS/index.d.ts.map +1 -1
- package/lib/AWS/index.js +1 -3
- package/lib/AWS/index.js.map +1 -1
- package/lib/Apply.d.ts.map +1 -1
- package/lib/Apply.js +2 -2
- package/lib/Apply.js.map +1 -1
- package/lib/Auth/AuthProvider.d.ts +51 -7
- package/lib/Auth/AuthProvider.d.ts.map +1 -1
- package/lib/Auth/AuthProvider.js +37 -0
- package/lib/Auth/AuthProvider.js.map +1 -1
- package/lib/Auth/Profile.d.ts +71 -10
- package/lib/Auth/Profile.d.ts.map +1 -1
- package/lib/Auth/Profile.js +47 -30
- package/lib/Auth/Profile.js.map +1 -1
- package/lib/Auth/index.d.ts +1 -1
- package/lib/Auth/index.d.ts.map +1 -1
- package/lib/Cloudflare/Auth/AuthProvider.d.ts +14 -31
- package/lib/Cloudflare/Auth/AuthProvider.d.ts.map +1 -1
- package/lib/Cloudflare/Auth/AuthProvider.js +59 -38
- package/lib/Cloudflare/Auth/AuthProvider.js.map +1 -1
- package/lib/Cloudflare/CloudflareEnvironment.d.ts +11 -0
- package/lib/Cloudflare/CloudflareEnvironment.d.ts.map +1 -0
- package/lib/Cloudflare/CloudflareEnvironment.js +26 -0
- package/lib/Cloudflare/CloudflareEnvironment.js.map +1 -0
- package/lib/Cloudflare/Container/ContainerApplication.d.ts +70 -42
- package/lib/Cloudflare/Container/ContainerApplication.d.ts.map +1 -1
- package/lib/Cloudflare/Container/ContainerApplication.js +49 -24
- package/lib/Cloudflare/Container/ContainerApplication.js.map +1 -1
- package/lib/Cloudflare/Credentials.d.ts +11 -0
- package/lib/Cloudflare/Credentials.d.ts.map +1 -0
- package/lib/Cloudflare/Credentials.js +34 -0
- package/lib/Cloudflare/Credentials.js.map +1 -0
- package/lib/Cloudflare/D1/D1Database.d.ts +2 -2
- package/lib/Cloudflare/D1/D1Database.d.ts.map +1 -1
- package/lib/Cloudflare/D1/D1Database.js +2 -2
- package/lib/Cloudflare/D1/D1Database.js.map +1 -1
- package/lib/Cloudflare/KV/KVNamespace.d.ts +2 -2
- package/lib/Cloudflare/KV/KVNamespace.d.ts.map +1 -1
- package/lib/Cloudflare/KV/KVNamespace.js +2 -2
- package/lib/Cloudflare/KV/KVNamespace.js.map +1 -1
- package/lib/Cloudflare/Providers.d.ts +2 -3
- package/lib/Cloudflare/Providers.d.ts.map +1 -1
- package/lib/Cloudflare/Providers.js +12 -4
- package/lib/Cloudflare/Providers.js.map +1 -1
- package/lib/Cloudflare/Queue/Queue.d.ts +52 -0
- package/lib/Cloudflare/Queue/Queue.d.ts.map +1 -0
- package/lib/Cloudflare/Queue/Queue.js +136 -0
- package/lib/Cloudflare/Queue/Queue.js.map +1 -0
- package/lib/Cloudflare/Queue/QueueBinding.d.ts +35 -0
- package/lib/Cloudflare/Queue/QueueBinding.d.ts.map +1 -0
- package/lib/Cloudflare/Queue/QueueBinding.js +51 -0
- package/lib/Cloudflare/Queue/QueueBinding.js.map +1 -0
- package/lib/Cloudflare/Queue/QueueConsumer.d.ts +86 -0
- package/lib/Cloudflare/Queue/QueueConsumer.d.ts.map +1 -0
- package/lib/Cloudflare/Queue/QueueConsumer.js +138 -0
- package/lib/Cloudflare/Queue/QueueConsumer.js.map +1 -0
- package/lib/Cloudflare/Queue/index.d.ts +4 -0
- package/lib/Cloudflare/Queue/index.d.ts.map +1 -0
- package/lib/Cloudflare/Queue/index.js +4 -0
- package/lib/Cloudflare/Queue/index.js.map +1 -0
- package/lib/Cloudflare/R2/R2Bucket.d.ts +2 -2
- package/lib/Cloudflare/R2/R2Bucket.d.ts.map +1 -1
- package/lib/Cloudflare/R2/R2Bucket.js +2 -2
- package/lib/Cloudflare/R2/R2Bucket.js.map +1 -1
- package/lib/Cloudflare/SecretsStore/Secret.d.ts +74 -0
- package/lib/Cloudflare/SecretsStore/Secret.d.ts.map +1 -0
- package/lib/Cloudflare/SecretsStore/Secret.js +161 -0
- package/lib/Cloudflare/SecretsStore/Secret.js.map +1 -0
- package/lib/Cloudflare/SecretsStore/SecretBinding.d.ts +42 -0
- package/lib/Cloudflare/SecretsStore/SecretBinding.d.ts.map +1 -0
- package/lib/Cloudflare/SecretsStore/SecretBinding.js +49 -0
- package/lib/Cloudflare/SecretsStore/SecretBinding.js.map +1 -0
- package/lib/Cloudflare/SecretsStore/SecretsStore.d.ts +37 -0
- package/lib/Cloudflare/SecretsStore/SecretsStore.d.ts.map +1 -0
- package/lib/Cloudflare/SecretsStore/SecretsStore.js +88 -0
- package/lib/Cloudflare/SecretsStore/SecretsStore.js.map +1 -0
- package/lib/Cloudflare/SecretsStore/index.d.ts +4 -0
- package/lib/Cloudflare/SecretsStore/index.d.ts.map +1 -0
- package/lib/Cloudflare/SecretsStore/index.js +4 -0
- package/lib/Cloudflare/SecretsStore/index.js.map +1 -0
- package/lib/Cloudflare/Workers/InferEnv.d.ts +1 -1
- package/lib/Cloudflare/Workers/InferEnv.d.ts.map +1 -1
- package/lib/Cloudflare/Workers/Worker.d.ts +5 -3
- package/lib/Cloudflare/Workers/Worker.d.ts.map +1 -1
- package/lib/Cloudflare/Workers/Worker.js +61 -7
- package/lib/Cloudflare/Workers/Worker.js.map +1 -1
- package/lib/Cloudflare/Workers/Workflow.d.ts +10 -4
- package/lib/Cloudflare/Workers/Workflow.d.ts.map +1 -1
- package/lib/Cloudflare/Workers/Workflow.js +3 -3
- package/lib/Cloudflare/Workers/Workflow.js.map +1 -1
- package/lib/Cloudflare/index.d.ts +3 -1
- package/lib/Cloudflare/index.d.ts.map +1 -1
- package/lib/Cloudflare/index.js +3 -1
- package/lib/Cloudflare/index.js.map +1 -1
- package/lib/Stack.d.ts +3 -2
- package/lib/Stack.d.ts.map +1 -1
- package/lib/Stack.js +10 -7
- package/lib/Stack.js.map +1 -1
- package/lib/State/LocalState.d.ts.map +1 -1
- package/lib/State/LocalState.js +40 -12
- package/lib/State/LocalState.js.map +1 -1
- package/lib/Test/Bun.d.ts.map +1 -1
- package/lib/Test/Bun.js +3 -2
- package/lib/Test/Bun.js.map +1 -1
- package/lib/Test/Vitest.d.ts +3 -1
- package/lib/Test/Vitest.d.ts.map +1 -1
- package/lib/Test/Vitest.js +19 -16
- package/lib/Test/Vitest.js.map +1 -1
- package/lib/Util/PlatformServices.d.ts +14 -3
- package/lib/Util/PlatformServices.d.ts.map +1 -1
- package/lib/Util/PlatformServices.js +21 -3
- package/lib/Util/PlatformServices.js.map +1 -1
- package/package.json +5 -5
- package/src/AWS/AuthProvider.ts +67 -67
- package/src/AWS/AutoScaling/LaunchTemplate.ts +3 -3
- package/src/AWS/Bootstrap.ts +32 -37
- package/src/AWS/CloudWatch/Alarm.ts +2 -2
- package/src/AWS/CloudWatch/AlarmMuteRule.ts +2 -2
- package/src/AWS/CloudWatch/CompositeAlarm.ts +2 -2
- package/src/AWS/CloudWatch/Dashboard.ts +2 -2
- package/src/AWS/CloudWatch/InsightRule.ts +2 -2
- package/src/AWS/CloudWatch/MetricStream.ts +2 -2
- package/src/AWS/Credentials.ts +9 -44
- package/src/AWS/DynamoDB/Table.ts +1 -1
- package/src/AWS/EC2/EIP.ts +3 -3
- package/src/AWS/EC2/EgressOnlyInternetGateway.ts +3 -3
- package/src/AWS/EC2/Instance.ts +3 -3
- package/src/AWS/EC2/InternetGateway.ts +3 -3
- package/src/AWS/EC2/NatGateway.ts +3 -3
- package/src/AWS/EC2/NetworkAcl.ts +3 -3
- package/src/AWS/EC2/RouteTable.ts +3 -3
- package/src/AWS/EC2/SecurityGroup.ts +3 -3
- package/src/AWS/EC2/Subnet.ts +1 -1
- package/src/AWS/EC2/Vpc.ts +3 -3
- package/src/AWS/EC2/VpcEndpoint.ts +3 -3
- package/src/AWS/ECR/Repository.ts +1 -1
- package/src/AWS/ECS/Cluster.ts +2 -2
- package/src/AWS/ECS/Service.ts +1 -1
- package/src/AWS/ECS/Task.ts +2 -2
- package/src/AWS/EKS/Cluster.ts +1 -1
- package/src/AWS/ELBv2/Listener.ts +1 -1
- package/src/AWS/ELBv2/LoadBalancer.ts +1 -1
- package/src/AWS/ELBv2/TargetGroup.ts +1 -1
- package/src/AWS/Endpoint.ts +12 -8
- package/src/AWS/Environment.ts +123 -0
- package/src/AWS/EventBridge/EventBus.ts +2 -2
- package/src/AWS/EventBridge/ListRules.ts +2 -2
- package/src/AWS/EventBridge/PutEvents.ts +2 -2
- package/src/AWS/EventBridge/Rule.ts +2 -2
- package/src/AWS/IAM/OpenIDConnectProvider.ts +2 -2
- package/src/AWS/IAM/Policy.ts +3 -3
- package/src/AWS/IAM/Role.ts +4 -4
- package/src/AWS/Kinesis/Stream.ts +2 -2
- package/src/AWS/Lambda/EventSourceMapping.ts +2 -2
- package/src/AWS/Lambda/Function.ts +2 -2
- package/src/AWS/Lambda/Permission.ts +1 -1
- package/src/AWS/Logs/LogGroup.ts +3 -3
- package/src/AWS/Providers.ts +7 -7
- package/src/AWS/Region.ts +9 -66
- package/src/AWS/S3/Bucket.ts +2 -2
- package/src/AWS/SNS/Topic.ts +1 -1
- package/src/AWS/SQS/Queue.ts +3 -3
- package/src/AWS/index.ts +1 -3
- package/src/Apply.ts +55 -57
- package/src/Auth/AuthProvider.ts +188 -8
- package/src/Auth/Profile.ts +117 -54
- package/src/Auth/index.ts +1 -1
- package/src/Cloudflare/Auth/AuthProvider.ts +127 -98
- package/src/Cloudflare/CloudflareEnvironment.ts +49 -0
- package/src/Cloudflare/Container/ContainerApplication.ts +172 -94
- package/src/Cloudflare/Credentials.ts +75 -0
- package/src/Cloudflare/D1/D1Database.ts +2 -2
- package/src/Cloudflare/KV/KVNamespace.ts +2 -2
- package/src/Cloudflare/Providers.ts +20 -10
- package/src/Cloudflare/Queue/Queue.ts +174 -0
- package/src/Cloudflare/Queue/QueueBinding.ts +110 -0
- package/src/Cloudflare/Queue/QueueConsumer.ts +219 -0
- package/src/Cloudflare/Queue/index.ts +3 -0
- package/src/Cloudflare/R2/R2Bucket.ts +2 -2
- package/src/Cloudflare/SecretsStore/Secret.ts +229 -0
- package/src/Cloudflare/SecretsStore/SecretBinding.ts +107 -0
- package/src/Cloudflare/SecretsStore/SecretsStore.ts +106 -0
- package/src/Cloudflare/SecretsStore/index.ts +3 -0
- package/src/Cloudflare/Workers/InferEnv.ts +5 -3
- package/src/Cloudflare/Workers/Worker.ts +63 -7
- package/src/Cloudflare/Workers/Workflow.ts +19 -9
- package/src/Cloudflare/index.ts +3 -1
- package/src/Stack.ts +40 -29
- package/src/State/LocalState.ts +43 -16
- package/src/Test/Bun.ts +3 -0
- package/src/Test/Vitest.ts +31 -23
- package/src/Util/PlatformServices.ts +54 -13
- package/bin/process-manager.ts +0 -10
- package/lib/AWS/Account.d.ts +0 -26
- package/lib/AWS/Account.d.ts.map +0 -1
- package/lib/AWS/Account.js +0 -32
- package/lib/AWS/Account.js.map +0 -1
- package/lib/AWS/Profile.d.ts +0 -6
- package/lib/AWS/Profile.d.ts.map +0 -1
- package/lib/AWS/Profile.js +0 -4
- package/lib/AWS/Profile.js.map +0 -1
- package/lib/AWS/StageConfig.d.ts +0 -25
- package/lib/AWS/StageConfig.d.ts.map +0 -1
- package/lib/AWS/StageConfig.js +0 -23
- package/lib/AWS/StageConfig.js.map +0 -1
- package/lib/Cloudflare/Account.d.ts +0 -10
- package/lib/Cloudflare/Account.d.ts.map +0 -1
- package/lib/Cloudflare/Account.js +0 -24
- package/lib/Cloudflare/Account.js.map +0 -1
- package/lib/Cloudflare/StageConfig.d.ts +0 -8
- package/lib/Cloudflare/StageConfig.d.ts.map +0 -1
- package/lib/Cloudflare/StageConfig.js +0 -4
- package/lib/Cloudflare/StageConfig.js.map +0 -1
- package/src/AWS/Account.ts +0 -56
- package/src/AWS/Profile.ts +0 -5
- package/src/AWS/StageConfig.ts +0 -44
- package/src/Cloudflare/Account.ts +0 -38
- package/src/Cloudflare/StageConfig.ts +0 -8
|
@@ -16,8 +16,8 @@ import type { Providers } from "../Providers.ts";
|
|
|
16
16
|
import { Stack } from "../../Stack.ts";
|
|
17
17
|
import { Stage } from "../../Stage.ts";
|
|
18
18
|
import { createInternalTags, diffTags, hasTags } from "../../Tags.ts";
|
|
19
|
-
import type { AccountID } from "../
|
|
20
|
-
import {
|
|
19
|
+
import type { AccountID } from "../Environment.ts";
|
|
20
|
+
import { AWSEnvironment } from "../Environment.ts";
|
|
21
21
|
import { Assets } from "../Assets.ts";
|
|
22
22
|
import type { SecurityGroupId } from "../EC2/SecurityGroup.ts";
|
|
23
23
|
import {
|
|
@@ -175,7 +175,7 @@ export const LaunchTemplateProvider = () =>
|
|
|
175
175
|
Provider.effect(
|
|
176
176
|
LaunchTemplate,
|
|
177
177
|
Effect.gen(function* () {
|
|
178
|
-
const accountId = yield*
|
|
178
|
+
const { accountId } = yield* AWSEnvironment;
|
|
179
179
|
const region = yield* Region;
|
|
180
180
|
const stack = yield* Stack;
|
|
181
181
|
const stage = yield* Stage;
|
package/src/AWS/Bootstrap.ts
CHANGED
|
@@ -4,6 +4,7 @@ import * as s3 from "@distilled.cloud/aws/s3";
|
|
|
4
4
|
import * as Effect from "effect/Effect";
|
|
5
5
|
import * as Option from "effect/Option";
|
|
6
6
|
import * as Schedule from "effect/Schedule";
|
|
7
|
+
import { AWSEnvironment } from "./Environment.ts";
|
|
7
8
|
|
|
8
9
|
/**
|
|
9
10
|
* Tag key used to identify the alchemy assets bucket.
|
|
@@ -15,8 +16,16 @@ export const ASSETS_BUCKET_TAG = "alchemy::assets-bucket";
|
|
|
15
16
|
*/
|
|
16
17
|
export const ASSETS_BUCKET_REGION_TAG = "alchemy::assets-bucket-region";
|
|
17
18
|
|
|
18
|
-
|
|
19
|
-
|
|
19
|
+
/**
|
|
20
|
+
* Build an account-regional namespace bucket name.
|
|
21
|
+
*
|
|
22
|
+
* Account-regional buckets must follow the naming convention:
|
|
23
|
+
* `<prefix>-<accountId>-<region>-an`
|
|
24
|
+
*
|
|
25
|
+
* @see https://docs.aws.amazon.com/AmazonS3/latest/userguide/gpbucketnamespaces.html#account-regional-gp-buckets
|
|
26
|
+
*/
|
|
27
|
+
const createAssetsBucketName = (accountId: string, region: string) =>
|
|
28
|
+
`alchemy-assets-${accountId}-${region}-an`.toLowerCase();
|
|
20
29
|
|
|
21
30
|
const createAssetsBucketTags = (region: string) => [
|
|
22
31
|
{ Key: ASSETS_BUCKET_TAG, Value: "true" },
|
|
@@ -208,39 +217,28 @@ export const bootstrap = Effect.fn(function* () {
|
|
|
208
217
|
return { bucketName: existingBucket.value, created: false };
|
|
209
218
|
}
|
|
210
219
|
|
|
211
|
-
const
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
})
|
|
233
|
-
.pipe(
|
|
234
|
-
Effect.catchTag("BucketAlreadyOwnedByYou", () => Effect.void),
|
|
235
|
-
Effect.retry({
|
|
236
|
-
while: (e) =>
|
|
237
|
-
e._tag === "OperationAborted" || e._tag === "ServiceUnavailable",
|
|
238
|
-
schedule: Schedule.exponential(100),
|
|
239
|
-
}),
|
|
240
|
-
);
|
|
241
|
-
}
|
|
220
|
+
const { accountId } = yield* AWSEnvironment;
|
|
221
|
+
const bucketName = createAssetsBucketName(accountId, region);
|
|
222
|
+
yield* s3
|
|
223
|
+
.createBucket({
|
|
224
|
+
Bucket: bucketName,
|
|
225
|
+
BucketNamespace: "account-regional",
|
|
226
|
+
CreateBucketConfiguration: {
|
|
227
|
+
Tags: createAssetsBucketTags(region),
|
|
228
|
+
...(region === "us-east-1"
|
|
229
|
+
? {}
|
|
230
|
+
: { LocationConstraint: region as BucketLocationConstraint }),
|
|
231
|
+
},
|
|
232
|
+
})
|
|
233
|
+
.pipe(
|
|
234
|
+
Effect.catchTag("BucketAlreadyOwnedByYou", () => Effect.void),
|
|
235
|
+
Effect.retry({
|
|
236
|
+
while: (e) =>
|
|
237
|
+
e._tag === "OperationAborted" || e._tag === "ServiceUnavailable",
|
|
238
|
+
schedule: Schedule.exponential(100),
|
|
239
|
+
}),
|
|
240
|
+
);
|
|
242
241
|
|
|
243
|
-
// Wait for bucket to exist (eventual consistency)
|
|
244
242
|
yield* s3.headBucket({ Bucket: bucketName }).pipe(
|
|
245
243
|
Effect.retry({
|
|
246
244
|
schedule: Schedule.exponential(100).pipe(
|
|
@@ -249,9 +247,6 @@ export const bootstrap = Effect.fn(function* () {
|
|
|
249
247
|
}),
|
|
250
248
|
);
|
|
251
249
|
|
|
252
|
-
// Tag the bucket
|
|
253
|
-
yield* ensureAssetsBucketTags(bucketName, region);
|
|
254
|
-
|
|
255
250
|
yield* Effect.logInfo(`Created assets bucket: ${bucketName}`);
|
|
256
251
|
|
|
257
252
|
return { bucketName, created: true };
|
|
@@ -5,7 +5,7 @@ import { isResolved } from "../../Diff.ts";
|
|
|
5
5
|
import * as Provider from "../../Provider.ts";
|
|
6
6
|
import { Resource } from "../../Resource.ts";
|
|
7
7
|
import type { Providers } from "../Providers.ts";
|
|
8
|
-
import {
|
|
8
|
+
import { AWSEnvironment, type AccountID } from "../Environment.ts";
|
|
9
9
|
import type { RegionID } from "../Region.ts";
|
|
10
10
|
import {
|
|
11
11
|
createName,
|
|
@@ -73,7 +73,7 @@ export const AlarmProvider = () =>
|
|
|
73
73
|
Alarm,
|
|
74
74
|
Effect.gen(function* () {
|
|
75
75
|
const region = yield* Region;
|
|
76
|
-
const accountId = yield*
|
|
76
|
+
const { accountId } = yield* AWSEnvironment;
|
|
77
77
|
|
|
78
78
|
const createAlarmName = (id: string, props: { name?: string } = {}) =>
|
|
79
79
|
createName(id, props.name, 255);
|
|
@@ -5,7 +5,7 @@ import { isResolved } from "../../Diff.ts";
|
|
|
5
5
|
import * as Provider from "../../Provider.ts";
|
|
6
6
|
import { Resource } from "../../Resource.ts";
|
|
7
7
|
import type { Providers } from "../Providers.ts";
|
|
8
|
-
import {
|
|
8
|
+
import { AWSEnvironment, type AccountID } from "../Environment.ts";
|
|
9
9
|
import type { RegionID } from "../Region.ts";
|
|
10
10
|
import { createManagedTags, createName, retryConcurrent } from "./common.ts";
|
|
11
11
|
|
|
@@ -67,7 +67,7 @@ export const AlarmMuteRuleProvider = () =>
|
|
|
67
67
|
AlarmMuteRule,
|
|
68
68
|
Effect.gen(function* () {
|
|
69
69
|
const region = yield* Region;
|
|
70
|
-
const accountId = yield*
|
|
70
|
+
const { accountId } = yield* AWSEnvironment;
|
|
71
71
|
|
|
72
72
|
const createMuteRuleName = (id: string, props: { name?: string } = {}) =>
|
|
73
73
|
createName(id, props.name, 255);
|
|
@@ -5,7 +5,7 @@ import { isResolved } from "../../Diff.ts";
|
|
|
5
5
|
import * as Provider from "../../Provider.ts";
|
|
6
6
|
import { Resource } from "../../Resource.ts";
|
|
7
7
|
import type { Providers } from "../Providers.ts";
|
|
8
|
-
import {
|
|
8
|
+
import { AWSEnvironment } from "../Environment.ts";
|
|
9
9
|
import type { AlarmArn } from "./Alarm.ts";
|
|
10
10
|
import {
|
|
11
11
|
createName,
|
|
@@ -66,7 +66,7 @@ export const CompositeAlarmProvider = () =>
|
|
|
66
66
|
CompositeAlarm,
|
|
67
67
|
Effect.gen(function* () {
|
|
68
68
|
const region = yield* Region;
|
|
69
|
-
const accountId = yield*
|
|
69
|
+
const { accountId } = yield* AWSEnvironment;
|
|
70
70
|
|
|
71
71
|
const createAlarmName = (id: string, props: { name?: string } = {}) =>
|
|
72
72
|
createName(id, props.name, 255);
|
|
@@ -4,7 +4,7 @@ import { isResolved } from "../../Diff.ts";
|
|
|
4
4
|
import * as Provider from "../../Provider.ts";
|
|
5
5
|
import { Resource } from "../../Resource.ts";
|
|
6
6
|
import type { Providers } from "../Providers.ts";
|
|
7
|
-
import {
|
|
7
|
+
import { AWSEnvironment, type AccountID } from "../Environment.ts";
|
|
8
8
|
import { createName, retryConcurrent } from "./common.ts";
|
|
9
9
|
|
|
10
10
|
export type DashboardName = string;
|
|
@@ -163,7 +163,7 @@ export const DashboardProvider = () =>
|
|
|
163
163
|
Provider.effect(
|
|
164
164
|
Dashboard,
|
|
165
165
|
Effect.gen(function* () {
|
|
166
|
-
const accountId = yield*
|
|
166
|
+
const { accountId } = yield* AWSEnvironment;
|
|
167
167
|
|
|
168
168
|
const createDashboardName = (id: string, props: { name?: string } = {}) =>
|
|
169
169
|
createName(id, props.name, 255);
|
|
@@ -8,7 +8,7 @@ import type { Input } from "../../Input.ts";
|
|
|
8
8
|
import * as Provider from "../../Provider.ts";
|
|
9
9
|
import { Resource } from "../../Resource.ts";
|
|
10
10
|
import type { Providers } from "../Providers.ts";
|
|
11
|
-
import {
|
|
11
|
+
import { AWSEnvironment, type AccountID } from "../Environment.ts";
|
|
12
12
|
import type { RegionID } from "../Region.ts";
|
|
13
13
|
import {
|
|
14
14
|
createName,
|
|
@@ -121,7 +121,7 @@ export const InsightRuleProvider = () =>
|
|
|
121
121
|
InsightRule,
|
|
122
122
|
Effect.gen(function* () {
|
|
123
123
|
const region = yield* Region;
|
|
124
|
-
const accountId = yield*
|
|
124
|
+
const { accountId } = yield* AWSEnvironment;
|
|
125
125
|
|
|
126
126
|
const createRuleName = (id: string, props: { name?: string } = {}) =>
|
|
127
127
|
createName(id, props.name, 255);
|
|
@@ -6,7 +6,7 @@ import type { Input } from "../../Input.ts";
|
|
|
6
6
|
import * as Provider from "../../Provider.ts";
|
|
7
7
|
import { Resource } from "../../Resource.ts";
|
|
8
8
|
import type { Providers } from "../Providers.ts";
|
|
9
|
-
import {
|
|
9
|
+
import { AWSEnvironment, type AccountID } from "../Environment.ts";
|
|
10
10
|
import type { RegionID } from "../Region.ts";
|
|
11
11
|
import {
|
|
12
12
|
createName,
|
|
@@ -75,7 +75,7 @@ export const MetricStreamProvider = () =>
|
|
|
75
75
|
MetricStream,
|
|
76
76
|
Effect.gen(function* () {
|
|
77
77
|
const region = yield* Region;
|
|
78
|
-
const accountId = yield*
|
|
78
|
+
const { accountId } = yield* AWSEnvironment;
|
|
79
79
|
const createMetricStreamName = (
|
|
80
80
|
id: string,
|
|
81
81
|
props: { name?: string } = {},
|
package/src/AWS/Credentials.ts
CHANGED
|
@@ -1,51 +1,16 @@
|
|
|
1
|
-
import
|
|
2
|
-
import {
|
|
3
|
-
Credentials,
|
|
4
|
-
fromAwsCredentialIdentity,
|
|
5
|
-
} from "@distilled.cloud/aws/Credentials";
|
|
1
|
+
import { Credentials } from "@distilled.cloud/aws/Credentials";
|
|
6
2
|
import * as Effect from "effect/Effect";
|
|
7
3
|
import * as Layer from "effect/Layer";
|
|
8
|
-
import
|
|
9
|
-
import { Profile } from "./Profile.ts";
|
|
10
|
-
import { StageConfig } from "./StageConfig.ts";
|
|
4
|
+
import { AWSEnvironment } from "./Environment.ts";
|
|
11
5
|
|
|
12
6
|
export { Credentials } from "@distilled.cloud/aws/Credentials";
|
|
13
7
|
|
|
14
8
|
/**
|
|
15
|
-
*
|
|
16
|
-
* Credentials are resolved on first access
|
|
9
|
+
* Lazy `Credentials` layer derived from the surrounding {@link AWSEnvironment}.
|
|
10
|
+
* Credentials are resolved on first access (not during layer construction),
|
|
11
|
+
* matching the existing @distilled.cloud/aws semantics.
|
|
17
12
|
*/
|
|
18
|
-
export const
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
const config = yield* StageConfig;
|
|
23
|
-
const auth = yield* Auth.Default;
|
|
24
|
-
if (config.profile) {
|
|
25
|
-
// Return the lazy Effect - it will be resolved when credentials are actually needed
|
|
26
|
-
return auth.loadProfileCredentials(config.profile);
|
|
27
|
-
} else if (config.credentials) {
|
|
28
|
-
// Static credentials - wrap in Effect.succeed
|
|
29
|
-
return Effect.succeed(fromAwsCredentialIdentity(config.credentials));
|
|
30
|
-
}
|
|
31
|
-
return yield* Effect.die("No AWS credentials found in stage config");
|
|
32
|
-
}),
|
|
33
|
-
);
|
|
34
|
-
|
|
35
|
-
/**
|
|
36
|
-
* Create a lazy SSO credentials layer.
|
|
37
|
-
* Credentials are resolved on first access, not during layer construction.
|
|
38
|
-
*/
|
|
39
|
-
export const fromSSO = () =>
|
|
40
|
-
Layer.effect(
|
|
41
|
-
Credentials,
|
|
42
|
-
Effect.gen(function* () {
|
|
43
|
-
const auth = yield* Auth.Auth;
|
|
44
|
-
const profileName = Option.getOrElse(
|
|
45
|
-
yield* Effect.serviceOption(Profile),
|
|
46
|
-
() => "default",
|
|
47
|
-
);
|
|
48
|
-
// Return the lazy Effect - it will be resolved when credentials are actually needed
|
|
49
|
-
return auth.loadProfileCredentials(profileName);
|
|
50
|
-
}),
|
|
51
|
-
);
|
|
13
|
+
export const fromEnvironment = Layer.effect(
|
|
14
|
+
Credentials,
|
|
15
|
+
Effect.map(AWSEnvironment.asEffect(), (env) => env.credentials),
|
|
16
|
+
);
|
package/src/AWS/EC2/EIP.ts
CHANGED
|
@@ -7,8 +7,8 @@ import * as Provider from "../../Provider.ts";
|
|
|
7
7
|
import { Resource } from "../../Resource.ts";
|
|
8
8
|
import type { Providers } from "../Providers.ts";
|
|
9
9
|
import { createInternalTags, createTagsList, diffTags } from "../../Tags.ts";
|
|
10
|
-
import type { AccountID } from "../
|
|
11
|
-
import {
|
|
10
|
+
import type { AccountID } from "../Environment.ts";
|
|
11
|
+
import { AWSEnvironment } from "../Environment.ts";
|
|
12
12
|
import type { RegionID } from "../Region.ts";
|
|
13
13
|
|
|
14
14
|
export type EIPArn =
|
|
@@ -110,7 +110,7 @@ export const EIPProvider = () =>
|
|
|
110
110
|
EIP,
|
|
111
111
|
Effect.gen(function* () {
|
|
112
112
|
const region = yield* Region;
|
|
113
|
-
const accountId = yield*
|
|
113
|
+
const { accountId } = yield* AWSEnvironment;
|
|
114
114
|
|
|
115
115
|
const createTags = Effect.fn(function* (
|
|
116
116
|
id: string,
|
|
@@ -7,8 +7,8 @@ import * as Provider from "../../Provider.ts";
|
|
|
7
7
|
import { Resource } from "../../Resource.ts";
|
|
8
8
|
import type { Providers } from "../Providers.ts";
|
|
9
9
|
import { createInternalTags, createTagsList, diffTags } from "../../Tags.ts";
|
|
10
|
-
import type { AccountID } from "../
|
|
11
|
-
import {
|
|
10
|
+
import type { AccountID } from "../Environment.ts";
|
|
11
|
+
import { AWSEnvironment } from "../Environment.ts";
|
|
12
12
|
import type { RegionID } from "../Region.ts";
|
|
13
13
|
import type { VpcId } from "./Vpc.ts";
|
|
14
14
|
|
|
@@ -75,7 +75,7 @@ export const EgressOnlyInternetGatewayProvider = () =>
|
|
|
75
75
|
EgressOnlyInternetGateway,
|
|
76
76
|
Effect.gen(function* () {
|
|
77
77
|
const region = yield* Region;
|
|
78
|
-
const accountId = yield*
|
|
78
|
+
const { accountId } = yield* AWSEnvironment;
|
|
79
79
|
|
|
80
80
|
const createTags = Effect.fn(function* (
|
|
81
81
|
id: string,
|
package/src/AWS/EC2/Instance.ts
CHANGED
|
@@ -24,8 +24,8 @@ import {
|
|
|
24
24
|
createInternalTags,
|
|
25
25
|
diffTags,
|
|
26
26
|
} from "../../Tags.ts";
|
|
27
|
-
import type { AccountID } from "../
|
|
28
|
-
import {
|
|
27
|
+
import type { AccountID } from "../Environment.ts";
|
|
28
|
+
import { AWSEnvironment } from "../Environment.ts";
|
|
29
29
|
import { Assets } from "../Assets.ts";
|
|
30
30
|
import type { PolicyStatement } from "../IAM/Policy.ts";
|
|
31
31
|
import type { RegionID } from "../Region.ts";
|
|
@@ -316,7 +316,7 @@ export const InstanceProvider = () =>
|
|
|
316
316
|
Instance,
|
|
317
317
|
Effect.gen(function* () {
|
|
318
318
|
const region = yield* Region;
|
|
319
|
-
const accountId = yield*
|
|
319
|
+
const { accountId } = yield* AWSEnvironment;
|
|
320
320
|
const stack = yield* Stack;
|
|
321
321
|
const stage = yield* Stage;
|
|
322
322
|
const fs = yield* FileSystem.FileSystem;
|
|
@@ -7,8 +7,8 @@ import * as Provider from "../../Provider.ts";
|
|
|
7
7
|
import { Resource } from "../../Resource.ts";
|
|
8
8
|
import type { Providers } from "../Providers.ts";
|
|
9
9
|
import { createInternalTags, createTagsList } from "../../Tags.ts";
|
|
10
|
-
import type { AccountID } from "../
|
|
11
|
-
import {
|
|
10
|
+
import type { AccountID } from "../Environment.ts";
|
|
11
|
+
import { AWSEnvironment } from "../Environment.ts";
|
|
12
12
|
import type { RegionID } from "../Region.ts";
|
|
13
13
|
import type { VpcId } from "./Vpc.ts";
|
|
14
14
|
|
|
@@ -72,7 +72,7 @@ export const InternetGatewayProvider = () =>
|
|
|
72
72
|
InternetGateway,
|
|
73
73
|
Effect.gen(function* () {
|
|
74
74
|
const region = yield* Region;
|
|
75
|
-
const accountId = yield*
|
|
75
|
+
const { accountId } = yield* AWSEnvironment;
|
|
76
76
|
|
|
77
77
|
return {
|
|
78
78
|
stables: ["internetGatewayId", "internetGatewayArn", "ownerId"],
|
|
@@ -15,8 +15,8 @@ import {
|
|
|
15
15
|
createTagsList,
|
|
16
16
|
diffTags,
|
|
17
17
|
} from "../../Tags.ts";
|
|
18
|
-
import type { AccountID } from "../
|
|
19
|
-
import {
|
|
18
|
+
import type { AccountID } from "../Environment.ts";
|
|
19
|
+
import { AWSEnvironment } from "../Environment.ts";
|
|
20
20
|
import type { RegionID } from "../Region.ts";
|
|
21
21
|
import type { AllocationId } from "./EIP.ts";
|
|
22
22
|
import type { SubnetId } from "./Subnet.ts";
|
|
@@ -166,7 +166,7 @@ export const NatGatewayProvider = () =>
|
|
|
166
166
|
NatGateway,
|
|
167
167
|
Effect.gen(function* () {
|
|
168
168
|
const region = yield* Region;
|
|
169
|
-
const accountId = yield*
|
|
169
|
+
const { accountId } = yield* AWSEnvironment;
|
|
170
170
|
|
|
171
171
|
const createTags = Effect.fn(function* (
|
|
172
172
|
id: string,
|
|
@@ -8,8 +8,8 @@ import * as Provider from "../../Provider.ts";
|
|
|
8
8
|
import { Resource } from "../../Resource.ts";
|
|
9
9
|
import type { Providers } from "../Providers.ts";
|
|
10
10
|
import { createInternalTags, createTagsList, diffTags } from "../../Tags.ts";
|
|
11
|
-
import type { AccountID } from "../
|
|
12
|
-
import {
|
|
11
|
+
import type { AccountID } from "../Environment.ts";
|
|
12
|
+
import { AWSEnvironment } from "../Environment.ts";
|
|
13
13
|
import type { RegionID } from "../Region.ts";
|
|
14
14
|
import type { VpcId } from "./Vpc.ts";
|
|
15
15
|
|
|
@@ -74,7 +74,7 @@ export const NetworkAclProvider = () =>
|
|
|
74
74
|
NetworkAcl,
|
|
75
75
|
Effect.gen(function* () {
|
|
76
76
|
const region = yield* Region;
|
|
77
|
-
const accountId = yield*
|
|
77
|
+
const { accountId } = yield* AWSEnvironment;
|
|
78
78
|
|
|
79
79
|
const createTags = Effect.fn(function* (
|
|
80
80
|
id: string,
|
|
@@ -10,8 +10,8 @@ import * as Provider from "../../Provider.ts";
|
|
|
10
10
|
import { Resource } from "../../Resource.ts";
|
|
11
11
|
import type { Providers } from "../Providers.ts";
|
|
12
12
|
import { createInternalTags, createTagsList } from "../../Tags.ts";
|
|
13
|
-
import type { AccountID } from "../
|
|
14
|
-
import {
|
|
13
|
+
import type { AccountID } from "../Environment.ts";
|
|
14
|
+
import { AWSEnvironment } from "../Environment.ts";
|
|
15
15
|
import type { RegionID } from "../Region.ts";
|
|
16
16
|
import type { VpcId } from "./Vpc.ts";
|
|
17
17
|
|
|
@@ -178,7 +178,7 @@ export const RouteTableProvider = () =>
|
|
|
178
178
|
RouteTable,
|
|
179
179
|
Effect.gen(function* () {
|
|
180
180
|
const region = yield* Region;
|
|
181
|
-
const accountId = yield*
|
|
181
|
+
const { accountId } = yield* AWSEnvironment;
|
|
182
182
|
|
|
183
183
|
return {
|
|
184
184
|
stables: ["routeTableId", "ownerId", "routeTableArn", "vpcId"],
|
|
@@ -8,8 +8,8 @@ import * as Provider from "../../Provider.ts";
|
|
|
8
8
|
import { Resource } from "../../Resource.ts";
|
|
9
9
|
import type { Providers } from "../Providers.ts";
|
|
10
10
|
import { createInternalTags, createTagsList, diffTags } from "../../Tags.ts";
|
|
11
|
-
import type { AccountID } from "../
|
|
12
|
-
import {
|
|
11
|
+
import type { AccountID } from "../Environment.ts";
|
|
12
|
+
import { AWSEnvironment } from "../Environment.ts";
|
|
13
13
|
import type { RegionID } from "../Region.ts";
|
|
14
14
|
import type { VpcId } from "./Vpc.ts";
|
|
15
15
|
|
|
@@ -181,7 +181,7 @@ export const SecurityGroupProvider = () =>
|
|
|
181
181
|
SecurityGroup,
|
|
182
182
|
Effect.gen(function* () {
|
|
183
183
|
const region = yield* Region;
|
|
184
|
-
const accountId = yield*
|
|
184
|
+
const { accountId } = yield* AWSEnvironment;
|
|
185
185
|
|
|
186
186
|
const createTags = Effect.fn(function* (
|
|
187
187
|
id: string,
|
package/src/AWS/EC2/Subnet.ts
CHANGED
|
@@ -9,7 +9,7 @@ import * as Provider from "../../Provider.ts";
|
|
|
9
9
|
import { Resource } from "../../Resource.ts";
|
|
10
10
|
import type { Providers } from "../Providers.ts";
|
|
11
11
|
import { createInternalTags, createTagsList, diffTags } from "../../Tags.ts";
|
|
12
|
-
import type { AccountID } from "../
|
|
12
|
+
import type { AccountID } from "../Environment.ts";
|
|
13
13
|
import type { RegionID } from "../Region.ts";
|
|
14
14
|
import type { VpcId } from "./Vpc.ts";
|
|
15
15
|
|
package/src/AWS/EC2/Vpc.ts
CHANGED
|
@@ -10,8 +10,8 @@ import * as Provider from "../../Provider.ts";
|
|
|
10
10
|
import { Resource } from "../../Resource.ts";
|
|
11
11
|
import type { Providers } from "../Providers.ts";
|
|
12
12
|
import { createInternalTags, createTagsList, diffTags } from "../../Tags.ts";
|
|
13
|
-
import type { AccountID } from "../
|
|
14
|
-
import {
|
|
13
|
+
import type { AccountID } from "../Environment.ts";
|
|
14
|
+
import { AWSEnvironment } from "../Environment.ts";
|
|
15
15
|
import type { RegionID } from "../Region.ts";
|
|
16
16
|
|
|
17
17
|
export type VpcId = `vpc-${string}`;
|
|
@@ -170,7 +170,7 @@ export const VpcProvider = () =>
|
|
|
170
170
|
Vpc,
|
|
171
171
|
Effect.gen(function* () {
|
|
172
172
|
const region = yield* Region;
|
|
173
|
-
const accountId = yield*
|
|
173
|
+
const { accountId } = yield* AWSEnvironment;
|
|
174
174
|
|
|
175
175
|
const createTags = Effect.fn(function* (
|
|
176
176
|
id: string,
|
|
@@ -10,8 +10,8 @@ import { isResolved } from "../../Diff.ts";
|
|
|
10
10
|
import * as Provider from "../../Provider.ts";
|
|
11
11
|
import { Resource } from "../../Resource.ts";
|
|
12
12
|
import { createInternalTags, createTagsList, diffTags } from "../../Tags.ts";
|
|
13
|
-
import type { AccountID } from "../
|
|
14
|
-
import {
|
|
13
|
+
import type { AccountID } from "../Environment.ts";
|
|
14
|
+
import { AWSEnvironment } from "../Environment.ts";
|
|
15
15
|
import type { Providers } from "../Providers.ts";
|
|
16
16
|
import type { RegionID } from "../Region.ts";
|
|
17
17
|
import type { RouteTableId } from "./RouteTable.ts";
|
|
@@ -220,7 +220,7 @@ export const VpcEndpointProvider = () =>
|
|
|
220
220
|
VpcEndpoint,
|
|
221
221
|
Effect.gen(function* () {
|
|
222
222
|
const region = yield* Region;
|
|
223
|
-
const accountId = yield*
|
|
223
|
+
const { accountId } = yield* AWSEnvironment;
|
|
224
224
|
|
|
225
225
|
const createTags = Effect.fn(function* (
|
|
226
226
|
id: string,
|
|
@@ -6,7 +6,7 @@ import * as Provider from "../../Provider.ts";
|
|
|
6
6
|
import { Resource } from "../../Resource.ts";
|
|
7
7
|
import type { Providers } from "../Providers.ts";
|
|
8
8
|
import { createInternalTags, diffTags, hasAlchemyTags } from "../../Tags.ts";
|
|
9
|
-
import {
|
|
9
|
+
import type { AccountID } from "../Environment.ts";
|
|
10
10
|
import type { RegionID } from "../Region.ts";
|
|
11
11
|
|
|
12
12
|
export type RepositoryName = string;
|
package/src/AWS/ECS/Cluster.ts
CHANGED
|
@@ -7,7 +7,7 @@ import * as Provider from "../../Provider.ts";
|
|
|
7
7
|
import { Resource } from "../../Resource.ts";
|
|
8
8
|
import type { Providers } from "../Providers.ts";
|
|
9
9
|
import { createInternalTags, diffTags } from "../../Tags.ts";
|
|
10
|
-
import {
|
|
10
|
+
import { AWSEnvironment, type AccountID } from "../Environment.ts";
|
|
11
11
|
import type { RegionID } from "../Region.ts";
|
|
12
12
|
|
|
13
13
|
export type ClusterName = string;
|
|
@@ -79,7 +79,7 @@ export const ClusterProvider = () =>
|
|
|
79
79
|
Cluster,
|
|
80
80
|
Effect.gen(function* () {
|
|
81
81
|
const region = yield* Region;
|
|
82
|
-
const accountId = yield*
|
|
82
|
+
const { accountId } = yield* AWSEnvironment;
|
|
83
83
|
|
|
84
84
|
const toEcsTags = (tags: Record<string, string>): ecs.Tag[] =>
|
|
85
85
|
Object.entries(tags).map(([key, value]) => ({
|
package/src/AWS/ECS/Service.ts
CHANGED
|
@@ -8,7 +8,7 @@ import * as Provider from "../../Provider.ts";
|
|
|
8
8
|
import { Resource } from "../../Resource.ts";
|
|
9
9
|
import type { Providers } from "../Providers.ts";
|
|
10
10
|
import { createInternalTags } from "../../Tags.ts";
|
|
11
|
-
import type { AccountID } from "../
|
|
11
|
+
import type { AccountID } from "../Environment.ts";
|
|
12
12
|
import type { RegionID } from "../Region.ts";
|
|
13
13
|
import type { ClusterArn } from "./Cluster.ts";
|
|
14
14
|
|
package/src/AWS/ECS/Task.ts
CHANGED
|
@@ -30,7 +30,7 @@ import type { Providers } from "../Providers.ts";
|
|
|
30
30
|
import type { ProcessContext, ServerHost } from "../../Server/Process.ts";
|
|
31
31
|
import { Stack } from "../../Stack.ts";
|
|
32
32
|
import { createInternalTags, createTagsList, hasTags } from "../../Tags.ts";
|
|
33
|
-
import {
|
|
33
|
+
import { AWSEnvironment } from "../Environment.ts";
|
|
34
34
|
import type { Credentials } from "../Credentials.ts";
|
|
35
35
|
import type { PolicyStatement } from "../IAM/Policy.ts";
|
|
36
36
|
|
|
@@ -223,7 +223,7 @@ export const TaskProvider = () =>
|
|
|
223
223
|
Task,
|
|
224
224
|
Effect.gen(function* () {
|
|
225
225
|
const stack = yield* Stack;
|
|
226
|
-
const accountId = yield*
|
|
226
|
+
const { accountId } = yield* AWSEnvironment;
|
|
227
227
|
const region = yield* Region;
|
|
228
228
|
const dotAlchemy = yield* DotAlchemy;
|
|
229
229
|
const fs = yield* FileSystem.FileSystem;
|
package/src/AWS/EKS/Cluster.ts
CHANGED
|
@@ -18,7 +18,7 @@ import * as Provider from "../../Provider.ts";
|
|
|
18
18
|
import { Resource, type ResourceBinding } from "../../Resource.ts";
|
|
19
19
|
import type { Providers } from "../Providers.ts";
|
|
20
20
|
import { createInternalTags, diffTags, hasAlchemyTags } from "../../Tags.ts";
|
|
21
|
-
import type { AccountID } from "../
|
|
21
|
+
import type { AccountID } from "../Environment.ts";
|
|
22
22
|
import type { RegionID } from "../Region.ts";
|
|
23
23
|
|
|
24
24
|
export type ClusterName = string;
|
|
@@ -5,7 +5,7 @@ import type { Input } from "../../Input.ts";
|
|
|
5
5
|
import * as Provider from "../../Provider.ts";
|
|
6
6
|
import { Resource } from "../../Resource.ts";
|
|
7
7
|
import type { Providers } from "../Providers.ts";
|
|
8
|
-
import type { AccountID } from "../
|
|
8
|
+
import type { AccountID } from "../Environment.ts";
|
|
9
9
|
import type { RegionID } from "../Region.ts";
|
|
10
10
|
import type { LoadBalancer, LoadBalancerArn } from "./LoadBalancer.ts";
|
|
11
11
|
import type { TargetGroup, TargetGroupArn } from "./TargetGroup.ts";
|
|
@@ -7,7 +7,7 @@ import * as Provider from "../../Provider.ts";
|
|
|
7
7
|
import { Resource } from "../../Resource.ts";
|
|
8
8
|
import type { Providers } from "../Providers.ts";
|
|
9
9
|
import { createInternalTags, diffTags } from "../../Tags.ts";
|
|
10
|
-
import type { AccountID } from "../
|
|
10
|
+
import type { AccountID } from "../Environment.ts";
|
|
11
11
|
import type { SecurityGroupId } from "../EC2/SecurityGroup.ts";
|
|
12
12
|
import type { SubnetId } from "../EC2/Subnet.ts";
|
|
13
13
|
import type { RegionID } from "../Region.ts";
|
|
@@ -6,7 +6,7 @@ import * as Provider from "../../Provider.ts";
|
|
|
6
6
|
import { Resource } from "../../Resource.ts";
|
|
7
7
|
import type { Providers } from "../Providers.ts";
|
|
8
8
|
import { createInternalTags, diffTags } from "../../Tags.ts";
|
|
9
|
-
import type { AccountID } from "../
|
|
9
|
+
import type { AccountID } from "../Environment.ts";
|
|
10
10
|
import type { RegionID } from "../Region.ts";
|
|
11
11
|
|
|
12
12
|
export type TargetGroupName = string;
|