alchemy-effect 0.6.0 → 0.6.3
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-effect.js +7152 -17685
- package/bin/alchemy-effect.js.map +1 -1
- package/bin/alchemy-effect.sh +14 -0
- package/bin/alchemy-effect.ts +644 -130
- package/bin/process-manager.ts +10 -0
- package/lib/cli/index.d.ts +206 -377
- package/lib/cli/index.d.ts.map +1 -1
- package/lib/cli/index.js +4134 -985
- package/lib/cli/index.js.map +1 -1
- package/package.json +152 -87
- package/src/AWS/ACM/Certificate.ts +502 -0
- package/src/AWS/ACM/index.ts +1 -0
- package/src/AWS/AGENTS.md +505 -0
- package/src/AWS/Account.ts +56 -0
- package/src/AWS/Assets.ts +182 -0
- package/src/AWS/AutoScaling/AutoScalingGroup.ts +440 -0
- package/src/AWS/AutoScaling/LaunchTemplate.ts +535 -0
- package/src/AWS/AutoScaling/ScalingPolicy.ts +232 -0
- package/src/AWS/AutoScaling/index.ts +3 -0
- package/src/AWS/Bootstrap.ts +281 -0
- package/src/AWS/CloudFront/Distribution.ts +952 -0
- package/src/AWS/CloudFront/Function.ts +374 -0
- package/src/AWS/CloudFront/Invalidation.ts +202 -0
- package/src/AWS/CloudFront/KeyValueStore.ts +216 -0
- package/src/AWS/CloudFront/KvEntries.ts +250 -0
- package/src/AWS/CloudFront/KvRoutesUpdate.ts +301 -0
- package/src/AWS/CloudFront/ManagedPolicies.ts +20 -0
- package/src/AWS/CloudFront/OriginAccessControl.ts +266 -0
- package/src/AWS/CloudFront/common.ts +55 -0
- package/src/AWS/CloudFront/index.ts +15 -0
- package/src/AWS/CloudWatch/Alarm.ts +198 -0
- package/src/AWS/CloudWatch/AlarmMuteRule.ts +183 -0
- package/src/AWS/CloudWatch/AnomalyDetector.ts +242 -0
- package/src/AWS/CloudWatch/CompositeAlarm.ts +198 -0
- package/src/AWS/CloudWatch/Dashboard.ts +262 -0
- package/src/AWS/CloudWatch/DescribeAlarmContributors.ts +79 -0
- package/src/AWS/CloudWatch/DescribeAlarmHistory.ts +66 -0
- package/src/AWS/CloudWatch/DescribeAlarms.ts +94 -0
- package/src/AWS/CloudWatch/DescribeAlarmsForMetric.ts +66 -0
- package/src/AWS/CloudWatch/DescribeAnomalyDetectors.ts +68 -0
- package/src/AWS/CloudWatch/DescribeInsightRules.ts +66 -0
- package/src/AWS/CloudWatch/DisableAlarmActions.ts +74 -0
- package/src/AWS/CloudWatch/DisableInsightRules.ts +74 -0
- package/src/AWS/CloudWatch/EnableAlarmActions.ts +74 -0
- package/src/AWS/CloudWatch/GetAlarmMuteRule.ts +75 -0
- package/src/AWS/CloudWatch/GetDashboard.ts +75 -0
- package/src/AWS/CloudWatch/GetInsightRuleReport.ts +76 -0
- package/src/AWS/CloudWatch/GetMetricData.ts +62 -0
- package/src/AWS/CloudWatch/GetMetricStatistics.ts +64 -0
- package/src/AWS/CloudWatch/GetMetricStream.ts +75 -0
- package/src/AWS/CloudWatch/GetMetricWidgetImage.ts +66 -0
- package/src/AWS/CloudWatch/InsightRule.ts +277 -0
- package/src/AWS/CloudWatch/ListAlarmMuteRules.ts +64 -0
- package/src/AWS/CloudWatch/ListDashboards.ts +62 -0
- package/src/AWS/CloudWatch/ListManagedInsightRules.ts +68 -0
- package/src/AWS/CloudWatch/ListMetricStreams.ts +64 -0
- package/src/AWS/CloudWatch/ListMetrics.ts +62 -0
- package/src/AWS/CloudWatch/ListTagsForResource.ts +79 -0
- package/src/AWS/CloudWatch/MetricStream.ts +262 -0
- package/src/AWS/CloudWatch/PutMetricData.ts +62 -0
- package/src/AWS/CloudWatch/SetAlarmState.ts +73 -0
- package/src/AWS/CloudWatch/alarmStateChanges.ts +24 -0
- package/src/AWS/CloudWatch/binding-common.ts +42 -0
- package/src/AWS/CloudWatch/common.ts +168 -0
- package/src/AWS/CloudWatch/index.ts +32 -0
- package/src/AWS/Context.ts +30 -0
- package/src/AWS/Credentials.ts +52 -0
- package/src/AWS/DynamoDB/AttributeValue.ts +250 -0
- package/src/AWS/DynamoDB/BatchExecuteStatement.ts +113 -0
- package/src/AWS/DynamoDB/BatchGetItem.ts +138 -0
- package/src/AWS/DynamoDB/BatchWriteItem.ts +144 -0
- package/src/AWS/DynamoDB/DeleteItem.ts +67 -0
- package/src/AWS/DynamoDB/DescribeTable.ts +69 -0
- package/src/AWS/DynamoDB/DescribeTimeToLive.ts +72 -0
- package/src/AWS/DynamoDB/ExecuteStatement.ts +91 -0
- package/src/AWS/DynamoDB/ExecuteTransaction.ts +77 -0
- package/src/AWS/DynamoDB/GetItem.ts +85 -0
- package/src/AWS/DynamoDB/ListTables.ts +56 -0
- package/src/AWS/DynamoDB/ListTagsOfResource.ts +72 -0
- package/src/AWS/DynamoDB/ProjectionExpression.ts +159 -0
- package/src/AWS/DynamoDB/PutItem.ts +67 -0
- package/src/AWS/DynamoDB/Query.ts +68 -0
- package/src/AWS/DynamoDB/RestoreTableToPointInTime.ts +94 -0
- package/src/AWS/DynamoDB/Scan.ts +68 -0
- package/src/AWS/DynamoDB/Stream.ts +94 -0
- package/src/AWS/DynamoDB/Table.ts +1175 -0
- package/src/AWS/DynamoDB/TransactGetItems.ts +154 -0
- package/src/AWS/DynamoDB/TransactWriteItems.ts +216 -0
- package/src/AWS/DynamoDB/UpdateItem.ts +67 -0
- package/src/AWS/DynamoDB/UpdateTimeToLive.ts +71 -0
- package/src/AWS/DynamoDB/index.ts +24 -0
- package/src/AWS/EC2/EIP.ts +285 -0
- package/src/AWS/EC2/EgressOnlyInternetGateway.ts +248 -0
- package/src/AWS/EC2/Image.ts +108 -0
- package/src/AWS/EC2/Instance.ts +877 -0
- package/src/AWS/EC2/InternetGateway.ts +382 -0
- package/src/AWS/EC2/NatGateway.ts +474 -0
- package/src/AWS/EC2/Network.ts +459 -0
- package/src/AWS/EC2/NetworkAcl.ts +247 -0
- package/src/AWS/EC2/NetworkAclAssociation.ts +206 -0
- package/src/AWS/EC2/NetworkAclEntry.ts +300 -0
- package/src/AWS/EC2/Route.ts +323 -0
- package/src/AWS/EC2/RouteTable.ts +448 -0
- package/src/AWS/EC2/RouteTableAssociation.ts +274 -0
- package/src/AWS/EC2/SecurityGroup.ts +552 -0
- package/src/AWS/EC2/SecurityGroupRule.ts +395 -0
- package/src/AWS/EC2/Subnet.ts +583 -0
- package/src/AWS/EC2/Vpc.ts +455 -0
- package/src/AWS/EC2/VpcEndpoint.ts +657 -0
- package/src/AWS/EC2/hosted.ts +891 -0
- package/src/AWS/EC2/index.ts +18 -0
- package/src/AWS/ECR/Repository.ts +254 -0
- package/src/AWS/ECR/index.ts +1 -0
- package/src/AWS/ECS/Cluster.ts +257 -0
- package/src/AWS/ECS/DescribeTasks.ts +67 -0
- package/src/AWS/ECS/ListTasks.ts +67 -0
- package/src/AWS/ECS/RunTask.ts +82 -0
- package/src/AWS/ECS/Schedule.ts +115 -0
- package/src/AWS/ECS/Service.ts +572 -0
- package/src/AWS/ECS/StopTask.ts +64 -0
- package/src/AWS/ECS/Task.ts +981 -0
- package/src/AWS/ECS/index.ts +28 -0
- package/src/AWS/EKS/AccessEntry.ts +382 -0
- package/src/AWS/EKS/Addon.ts +385 -0
- package/src/AWS/EKS/AutoCluster.ts +288 -0
- package/src/AWS/EKS/Cluster.ts +655 -0
- package/src/AWS/EKS/LoadBalancedWorkload.ts +76 -0
- package/src/AWS/EKS/PodIdentityAssociation.ts +354 -0
- package/src/AWS/EKS/PodIdentityServiceAccount.ts +156 -0
- package/src/AWS/EKS/PodIdentityWorkload.ts +185 -0
- package/src/AWS/EKS/Workload.ts +145 -0
- package/src/AWS/EKS/index.ts +9 -0
- package/src/AWS/ELBv2/Listener.ts +139 -0
- package/src/AWS/ELBv2/LoadBalancer.ts +227 -0
- package/src/AWS/ELBv2/TargetGroup.ts +209 -0
- package/src/AWS/ELBv2/index.ts +3 -0
- package/src/AWS/Endpoint.ts +16 -0
- package/src/AWS/EventBridge/DescribeEventBus.ts +71 -0
- package/src/AWS/EventBridge/DescribeRule.ts +73 -0
- package/src/AWS/EventBridge/EventBus.ts +273 -0
- package/src/AWS/EventBridge/EventSource.ts +146 -0
- package/src/AWS/EventBridge/ListEventBuses.ts +60 -0
- package/src/AWS/EventBridge/ListRules.ts +87 -0
- package/src/AWS/EventBridge/ListTargetsByRule.ts +76 -0
- package/src/AWS/EventBridge/Permission.ts +151 -0
- package/src/AWS/EventBridge/PutEvents.ts +91 -0
- package/src/AWS/EventBridge/Rule.ts +620 -0
- package/src/AWS/EventBridge/TestEventPattern.ts +60 -0
- package/src/AWS/EventBridge/ToEcsTask.ts +118 -0
- package/src/AWS/EventBridge/ToLambda.ts +87 -0
- package/src/AWS/EventBridge/ToQueue.ts +97 -0
- package/src/AWS/EventBridge/index.ts +14 -0
- package/src/AWS/IAM/AccessKey.ts +142 -0
- package/src/AWS/IAM/AccountAlias.ts +96 -0
- package/src/AWS/IAM/AccountPasswordPolicy.ts +64 -0
- package/src/AWS/IAM/Group.ts +357 -0
- package/src/AWS/IAM/GroupMembership.ts +142 -0
- package/src/AWS/IAM/InstanceProfile.ts +285 -0
- package/src/AWS/IAM/LoginProfile.ts +137 -0
- package/src/AWS/IAM/OpenIDConnectProvider.ts +192 -0
- package/src/AWS/IAM/Policy.ts +387 -0
- package/src/AWS/IAM/Role.ts +500 -0
- package/src/AWS/IAM/SAMLProvider.ts +165 -0
- package/src/AWS/IAM/SSHPublicKey.ts +148 -0
- package/src/AWS/IAM/ServerCertificate.ts +261 -0
- package/src/AWS/IAM/ServiceSpecificCredential.ts +172 -0
- package/src/AWS/IAM/SigningCertificate.ts +137 -0
- package/src/AWS/IAM/User.ts +436 -0
- package/src/AWS/IAM/VirtualMFADevice.ts +259 -0
- package/src/AWS/IAM/common.ts +89 -0
- package/src/AWS/IAM/index.ts +40 -0
- package/src/AWS/IdentityCenter/AccountAssignment.ts +290 -0
- package/src/AWS/IdentityCenter/Group.ts +211 -0
- package/src/AWS/IdentityCenter/Instance.ts +190 -0
- package/src/AWS/IdentityCenter/PermissionSet.ts +235 -0
- package/src/AWS/IdentityCenter/common.ts +117 -0
- package/src/AWS/IdentityCenter/index.ts +4 -0
- package/src/AWS/Kinesis/DescribeAccountSettings.ts +63 -0
- package/src/AWS/Kinesis/DescribeLimits.ts +59 -0
- package/src/AWS/Kinesis/DescribeStream.ts +69 -0
- package/src/AWS/Kinesis/DescribeStreamConsumer.ts +72 -0
- package/src/AWS/Kinesis/DescribeStreamSummary.ts +72 -0
- package/src/AWS/Kinesis/GetRecords.ts +59 -0
- package/src/AWS/Kinesis/GetResourcePolicy.ts +72 -0
- package/src/AWS/Kinesis/GetShardIterator.ts +71 -0
- package/src/AWS/Kinesis/ListShards.ts +66 -0
- package/src/AWS/Kinesis/ListStreamConsumers.ts +72 -0
- package/src/AWS/Kinesis/ListStreams.ts +56 -0
- package/src/AWS/Kinesis/ListTagsForResource.ts +78 -0
- package/src/AWS/Kinesis/PutRecord.ts +67 -0
- package/src/AWS/Kinesis/PutRecords.ts +67 -0
- package/src/AWS/Kinesis/Stream.ts +731 -0
- package/src/AWS/Kinesis/StreamConsumer.ts +325 -0
- package/src/AWS/Kinesis/StreamEventSource.ts +106 -0
- package/src/AWS/Kinesis/StreamSink.ts +68 -0
- package/src/AWS/Kinesis/SubscribeToShard.ts +71 -0
- package/src/AWS/Kinesis/index.ts +19 -0
- package/src/AWS/Lambda/BucketEventSource.ts +146 -0
- package/src/AWS/Lambda/EventBridgeEventSource.ts +183 -0
- package/src/AWS/Lambda/EventSourceMapping.ts +438 -0
- package/src/AWS/Lambda/Function.ts +1185 -0
- package/src/AWS/Lambda/HttpServer.ts +125 -0
- package/src/AWS/Lambda/InvokeFunction.ts +67 -0
- package/src/AWS/Lambda/Permission.ts +217 -0
- package/src/AWS/Lambda/QueueEventSource.ts +96 -0
- package/src/AWS/Lambda/StreamEventSource.ts +123 -0
- package/src/AWS/Lambda/TableEventSource.ts +156 -0
- package/src/AWS/Lambda/TopicEventSource.ts +105 -0
- package/src/AWS/Lambda/index.ts +13 -0
- package/src/AWS/Logs/LogGroup.ts +209 -0
- package/src/AWS/Logs/index.ts +1 -0
- package/src/AWS/Organizations/Account.ts +328 -0
- package/src/AWS/Organizations/DelegatedAdministrator.ts +158 -0
- package/src/AWS/Organizations/Organization.ts +179 -0
- package/src/AWS/Organizations/OrganizationResourcePolicy.ts +108 -0
- package/src/AWS/Organizations/OrganizationalUnit.ts +268 -0
- package/src/AWS/Organizations/Policy.ts +241 -0
- package/src/AWS/Organizations/PolicyAttachment.ts +130 -0
- package/src/AWS/Organizations/Root.ts +151 -0
- package/src/AWS/Organizations/RootPolicyType.ts +130 -0
- package/src/AWS/Organizations/TenantRoot.ts +506 -0
- package/src/AWS/Organizations/TrustedServiceAccess.ts +107 -0
- package/src/AWS/Organizations/common.ts +130 -0
- package/src/AWS/Organizations/index.ts +11 -0
- package/src/AWS/Profile.ts +5 -0
- package/src/AWS/Providers.ts +326 -0
- package/src/AWS/RDS/Aurora.ts +499 -0
- package/src/AWS/RDS/Connect.ts +127 -0
- package/src/AWS/RDS/DBCluster.ts +361 -0
- package/src/AWS/RDS/DBClusterEndpoint.ts +226 -0
- package/src/AWS/RDS/DBClusterParameterGroup.ts +195 -0
- package/src/AWS/RDS/DBInstance.ts +274 -0
- package/src/AWS/RDS/DBParameterGroup.ts +190 -0
- package/src/AWS/RDS/DBProxy.ts +257 -0
- package/src/AWS/RDS/DBProxyEndpoint.ts +255 -0
- package/src/AWS/RDS/DBProxyTargetGroup.ts +243 -0
- package/src/AWS/RDS/DBSubnetGroup.ts +208 -0
- package/src/AWS/RDS/index.ts +11 -0
- package/src/AWS/RDSData/BatchExecuteStatement.ts +103 -0
- package/src/AWS/RDSData/BeginTransaction.ts +97 -0
- package/src/AWS/RDSData/CommitTransaction.ts +102 -0
- package/src/AWS/RDSData/ExecuteSql.ts +98 -0
- package/src/AWS/RDSData/ExecuteStatement.ts +99 -0
- package/src/AWS/RDSData/RollbackTransaction.ts +105 -0
- package/src/AWS/RDSData/index.ts +6 -0
- package/src/AWS/Region.ts +77 -0
- package/src/AWS/Route53/Record.ts +342 -0
- package/src/AWS/Route53/index.ts +1 -0
- package/src/AWS/S3/AbortMultipartUpload.ts +73 -0
- package/src/AWS/S3/Bucket.ts +550 -0
- package/src/AWS/S3/BucketEventSource.ts +26 -0
- package/src/AWS/S3/BucketNotifications.ts +77 -0
- package/src/AWS/S3/CompleteMultipartUpload.ts +73 -0
- package/src/AWS/S3/CopyObject.ts +68 -0
- package/src/AWS/S3/CreateMultipartUpload.ts +73 -0
- package/src/AWS/S3/DeleteObject.ts +67 -0
- package/src/AWS/S3/GetObject.ts +74 -0
- package/src/AWS/S3/HeadObject.ts +67 -0
- package/src/AWS/S3/ListObjectsV2.ts +67 -0
- package/src/AWS/S3/PutObject.ts +83 -0
- package/src/AWS/S3/S3Event.ts +43 -0
- package/src/AWS/S3/UploadPart.ts +67 -0
- package/src/AWS/S3/index.ts +14 -0
- package/src/AWS/SNS/AddPermission.ts +66 -0
- package/src/AWS/SNS/ConfirmSubscription.ts +72 -0
- package/src/AWS/SNS/GetDataProtectionPolicy.ts +72 -0
- package/src/AWS/SNS/GetSubscriptionAttributes.ts +72 -0
- package/src/AWS/SNS/GetTopicAttributes.ts +70 -0
- package/src/AWS/SNS/ListSubscriptions.ts +60 -0
- package/src/AWS/SNS/ListSubscriptionsByTopic.ts +72 -0
- package/src/AWS/SNS/ListTagsForResource.ts +72 -0
- package/src/AWS/SNS/ListTopics.ts +56 -0
- package/src/AWS/SNS/Publish.ts +66 -0
- package/src/AWS/SNS/PublishBatch.ts +66 -0
- package/src/AWS/SNS/PutDataProtectionPolicy.ts +72 -0
- package/src/AWS/SNS/RemovePermission.ts +66 -0
- package/src/AWS/SNS/SetSubscriptionAttributes.ts +72 -0
- package/src/AWS/SNS/SetTopicAttributes.ts +70 -0
- package/src/AWS/SNS/Subscription.ts +305 -0
- package/src/AWS/SNS/TagResource.ts +66 -0
- package/src/AWS/SNS/Topic.ts +363 -0
- package/src/AWS/SNS/TopicEventSource.ts +42 -0
- package/src/AWS/SNS/TopicSink.ts +61 -0
- package/src/AWS/SNS/UntagResource.ts +66 -0
- package/src/AWS/SNS/index.ts +21 -0
- package/src/AWS/SQS/DeleteMessage.ts +67 -0
- package/src/AWS/SQS/DeleteMessageBatch.ts +72 -0
- package/src/AWS/SQS/Queue.ts +210 -0
- package/src/AWS/SQS/QueueEventSource.ts +57 -0
- package/src/AWS/SQS/QueueSink.ts +62 -0
- package/src/AWS/SQS/ReceiveMessage.ts +68 -0
- package/src/AWS/SQS/SendMessage.ts +69 -0
- package/src/AWS/SQS/SendMessageBatch.ts +67 -0
- package/src/AWS/SQS/index.ts +8 -0
- package/src/AWS/Scheduler/Schedule.ts +296 -0
- package/src/AWS/Scheduler/ScheduleGroup.ts +186 -0
- package/src/AWS/Scheduler/builders.ts +229 -0
- package/src/AWS/Scheduler/index.ts +3 -0
- package/src/AWS/SecretsManager/DescribeSecret.ts +66 -0
- package/src/AWS/SecretsManager/GetRandomPassword.ts +65 -0
- package/src/AWS/SecretsManager/GetSecretValue.ts +78 -0
- package/src/AWS/SecretsManager/ListSecrets.ts +62 -0
- package/src/AWS/SecretsManager/PutSecretValue.ts +78 -0
- package/src/AWS/SecretsManager/Secret.ts +318 -0
- package/src/AWS/SecretsManager/index.ts +6 -0
- package/src/AWS/StageConfig.ts +44 -0
- package/src/AWS/Website/AssetDeployment.ts +348 -0
- package/src/AWS/Website/Router.ts +384 -0
- package/src/AWS/Website/SsrSite.ts +393 -0
- package/src/AWS/Website/StaticSite.ts +611 -0
- package/src/AWS/Website/cfcode.ts +180 -0
- package/src/AWS/Website/index.ts +5 -0
- package/src/AWS/Website/shared.ts +223 -0
- package/src/AWS/index.ts +37 -0
- package/src/AdoptPolicy.ts +25 -0
- package/src/Agent/Agent.ts +26 -0
- package/src/Agent/Aspect.ts +173 -0
- package/src/Agent/AspectGraph.ts +98 -0
- package/src/Agent/ContextPlugin.ts +18 -0
- package/src/Agent/Plugin.ts +29 -0
- package/src/Agent/chat/channel.ts +26 -0
- package/src/Agent/chat/event.ts +43 -0
- package/src/Agent/chat/message.ts +35 -0
- package/src/Agent/chat/service.ts +133 -0
- package/src/Agent/chat/thread.ts +17 -0
- package/src/Agent/coding/bash.ts +198 -0
- package/src/Agent/coding/edit.ts +152 -0
- package/src/Agent/coding/glob.ts +97 -0
- package/src/Agent/coding/grep.ts +144 -0
- package/src/Agent/coding/index.ts +7 -0
- package/src/Agent/coding/read.ts +119 -0
- package/src/Agent/coding/readlints.ts +78 -0
- package/src/Agent/coding/write.ts +79 -0
- package/src/Agent/fs/file.ts +22 -0
- package/src/Agent/fs/folder.ts +16 -0
- package/src/Agent/index.ts +9 -0
- package/src/Agent/llm/error.ts +330 -0
- package/src/Agent/llm/index.ts +4 -0
- package/src/Agent/llm/llm.ts +131 -0
- package/src/Agent/llm/stream-collectors.ts +58 -0
- package/src/Agent/llm/stream-text-part.ts +7 -0
- package/src/Agent/lsp/client.ts +293 -0
- package/src/Agent/lsp/diagnostics.ts +64 -0
- package/src/Agent/lsp/jsonrpc.ts +317 -0
- package/src/Agent/lsp/manager.ts +213 -0
- package/src/Agent/lsp/servers.ts +37 -0
- package/src/Agent/process/driver.ts +168 -0
- package/src/Agent/process/issue-service.ts +48 -0
- package/src/Agent/process/issue-tools.ts +33 -0
- package/src/Agent/process/issue.ts +22 -0
- package/src/Agent/process/organization.ts +16 -0
- package/src/Agent/process/process.ts +16 -0
- package/src/Agent/process/reply.ts +21 -0
- package/src/Agent/process/task.ts +34 -0
- package/src/Agent/tool/index.ts +3 -0
- package/src/Agent/tool/parameter.ts +35 -0
- package/src/Agent/tool/result.ts +51 -0
- package/src/Agent/tool/tool.ts +74 -0
- package/src/Agent/util/command-validator.ts +98 -0
- package/src/Agent/util/exec.ts +18 -0
- package/src/Agent/util/parser.ts +39 -0
- package/src/Agent/util/replace.ts +559 -0
- package/src/Agent/util/ripgrep.ts +256 -0
- package/src/Apply.ts +1070 -0
- package/src/Binding.ts +193 -0
- package/src/Build/Command.ts +322 -0
- package/src/Build/index.ts +1 -0
- package/src/Bundle/Bundle.ts +215 -0
- package/src/Bundle/Docker.ts +213 -0
- package/src/Bundle/TempRoot.ts +104 -0
- package/src/Bundle/index.ts +3 -0
- package/src/Cli/Cli.ts +23 -0
- package/src/Cli/Event.ts +32 -0
- package/src/Cli/InkCLI.tsx +60 -0
- package/src/Cli/NamespaceTree.ts +199 -0
- package/src/Cli/Reporter.ts +8 -0
- package/src/Cli/components/ApprovePlan.tsx +44 -0
- package/src/Cli/components/Plan.tsx +148 -0
- package/src/Cli/components/PlanProgress.tsx +325 -0
- package/src/Cli/index.ts +2 -0
- package/src/Cloudflare/Account.ts +38 -0
- package/src/Cloudflare/Container.ts +1345 -0
- package/src/Cloudflare/D1/D1Connection.ts +74 -0
- package/src/Cloudflare/D1/D1Database.ts +222 -0
- package/src/Cloudflare/D1/D1DatabaseBinding.ts +25 -0
- package/src/Cloudflare/D1/index.ts +3 -0
- package/src/Cloudflare/KV/Delete.ts +38 -0
- package/src/Cloudflare/KV/Get.ts +40 -0
- package/src/Cloudflare/KV/GetWithMetadata.ts +54 -0
- package/src/Cloudflare/KV/List.ts +45 -0
- package/src/Cloudflare/KV/Namespace.ts +150 -0
- package/src/Cloudflare/KV/NamespaceBinding.ts +25 -0
- package/src/Cloudflare/KV/Put.ts +59 -0
- package/src/Cloudflare/KV/index.ts +6 -0
- package/src/Cloudflare/Logs.ts +122 -0
- package/src/Cloudflare/Providers.ts +80 -0
- package/src/Cloudflare/R2/Bucket.ts +173 -0
- package/src/Cloudflare/R2/BucketBinding.ts +31 -0
- package/src/Cloudflare/R2/CreateMultipartUpload.ts +59 -0
- package/src/Cloudflare/R2/DeleteObject.ts +41 -0
- package/src/Cloudflare/R2/GetObject.ts +47 -0
- package/src/Cloudflare/R2/HeadObject.ts +41 -0
- package/src/Cloudflare/R2/ListObjects.ts +45 -0
- package/src/Cloudflare/R2/MultipartUploadClient.ts +40 -0
- package/src/Cloudflare/R2/PutObject.ts +55 -0
- package/src/Cloudflare/R2/ResumeMultipartUpload.ts +48 -0
- package/src/Cloudflare/R2/UploadValue.ts +10 -0
- package/src/Cloudflare/R2/index.ts +9 -0
- package/src/Cloudflare/StageConfig.ts +8 -0
- package/src/Cloudflare/Website/StaticSite.ts +35 -0
- package/src/Cloudflare/Website/TanstackStart.ts +14 -0
- package/src/Cloudflare/Website/index.ts +2 -0
- package/src/Cloudflare/Workers/Assets.ts +286 -0
- package/src/Cloudflare/Workers/ConfigProvider.ts +9 -0
- package/src/Cloudflare/Workers/DurableObject.ts +558 -0
- package/src/Cloudflare/Workers/DynamicWorker.ts +144 -0
- package/src/Cloudflare/Workers/Fetch.ts +142 -0
- package/src/Cloudflare/Workers/Fetcher.ts +280 -0
- package/src/Cloudflare/Workers/HttpServer.ts +163 -0
- package/src/Cloudflare/Workers/Request.ts +5 -0
- package/src/Cloudflare/Workers/Rpc.ts +472 -0
- package/src/Cloudflare/Workers/WebSocket.ts +44 -0
- package/src/Cloudflare/Workers/Worker.ts +1222 -0
- package/src/Cloudflare/Workers/Workflow.ts +400 -0
- package/src/Cloudflare/Workers/cloudflare_workers.ts +25 -0
- package/src/Cloudflare/Workers/index.ts +11 -0
- package/src/Cloudflare/index.ts +8 -0
- package/src/Cloudflare/stream.ts +20 -0
- package/src/Config.ts +31 -0
- package/src/Construct.ts +75 -0
- package/src/Daemon/Client.ts +116 -0
- package/src/Daemon/Config.ts +28 -0
- package/src/Daemon/Errors.ts +48 -0
- package/src/Daemon/Lock.ts +162 -0
- package/src/Daemon/ProcessRegistry.ts +284 -0
- package/src/Daemon/RpcSchema.ts +43 -0
- package/src/Daemon/RpcServer.ts +231 -0
- package/src/Daemon/index.ts +27 -0
- package/src/Destroy.ts +15 -0
- package/src/Diff.ts +142 -0
- package/src/ExecutionContext.ts +30 -0
- package/src/FQN.ts +94 -0
- package/src/Http.ts +105 -0
- package/src/Input.ts +91 -0
- package/src/InstanceId.ts +19 -0
- package/src/Kubernetes/ConfigMap.ts +59 -0
- package/src/Kubernetes/Deployment.ts +123 -0
- package/src/Kubernetes/Job.ts +82 -0
- package/src/Kubernetes/Namespace.ts +49 -0
- package/src/Kubernetes/Object.ts +99 -0
- package/src/Kubernetes/Service.ts +78 -0
- package/src/Kubernetes/ServiceAccount.ts +49 -0
- package/src/Kubernetes/client.ts +298 -0
- package/src/Kubernetes/common.ts +23 -0
- package/src/Kubernetes/index.ts +11 -0
- package/src/Kubernetes/types.ts +177 -0
- package/src/Namespace.ts +64 -0
- package/src/Observability.ts +0 -0
- package/src/Output.ts +584 -0
- package/src/Phase.ts +5 -0
- package/src/PhysicalName.ts +62 -0
- package/src/Plan.ts +910 -0
- package/src/Platform.ts +398 -0
- package/src/Provider.ts +156 -0
- package/src/Random.ts +61 -0
- package/src/Ref.ts +46 -0
- package/src/RemovalPolicy.ts +51 -0
- package/src/Resource.ts +387 -0
- package/src/SQLite/BunSQLite.ts +132 -0
- package/src/SQLite/SQLite.ts +19 -0
- package/src/SQLite/SQLiteConnection.ts +55 -0
- package/src/SQLite/SQLiteError.ts +904 -0
- package/src/SQLite/SQLiteStatement.ts +24 -0
- package/src/SQLite/index.ts +6 -0
- package/src/SQLite/libSQL.ts +194 -0
- package/src/Schema.ts +333 -0
- package/src/Self.ts +10 -0
- package/src/Server/Process.ts +30 -0
- package/src/Server/S3BucketEventSource.ts +100 -0
- package/src/Server/SQSQueueEventSource.ts +77 -0
- package/src/Server/index.ts +3 -0
- package/src/Serverless/Function.ts +18 -0
- package/src/Serverless/index.ts +1 -0
- package/src/Spawn.ts +23 -0
- package/src/Stack.ts +84 -0
- package/src/Stage.ts +3 -0
- package/src/State/InMemoryState.ts +86 -0
- package/src/State/LocalState.ts +120 -0
- package/src/State/ResourceState.ts +121 -0
- package/src/State/State.ts +72 -0
- package/src/State/index.ts +4 -0
- package/src/Tags.ts +106 -0
- package/src/Test/TestCli.ts +21 -0
- package/src/Test/TestState.ts +37 -0
- package/src/Test/Vitest.ts +503 -0
- package/src/Test/index.ts +3 -0
- package/src/Trait.ts +105 -0
- package/src/Util/base32.ts +44 -0
- package/src/Util/camel.ts +23 -0
- package/src/Util/class.ts +7 -0
- package/src/Util/effect.ts +57 -0
- package/src/Util/index.ts +15 -0
- package/src/Util/instance.ts +9 -0
- package/src/Util/pointer.ts +5 -0
- package/src/Util/schema-to-type.ts +456 -0
- package/src/Util/service.ts +16 -0
- package/src/Util/sha256.ts +27 -0
- package/src/Util/stable.ts +41 -0
- package/src/Util/todo.ts +4 -0
- package/src/Util/types.ts +25 -0
- package/src/Util/unknown.ts +19 -0
- package/src/Util/zip.ts +27 -0
- package/src/index.ts +30 -26
- package/README.md +0 -185
- package/lib/$.d.ts +0 -5
- package/lib/$.d.ts.map +0 -1
- package/lib/$.js +0 -9
- package/lib/$.js.map +0 -1
- package/lib/app.d.ts +0 -15
- package/lib/app.d.ts.map +0 -1
- package/lib/app.js +0 -7
- package/lib/app.js.map +0 -1
- package/lib/apply.d.ts +0 -18
- package/lib/apply.d.ts.map +0 -1
- package/lib/apply.js +0 -569
- package/lib/apply.js.map +0 -1
- package/lib/assert-never.d.ts +0 -12
- package/lib/assert-never.d.ts.map +0 -1
- package/lib/assert-never.js +0 -11
- package/lib/assert-never.js.map +0 -1
- package/lib/aws/account.d.ts +0 -27
- package/lib/aws/account.d.ts.map +0 -1
- package/lib/aws/account.js +0 -33
- package/lib/aws/account.js.map +0 -1
- package/lib/aws/arn.d.ts +0 -2
- package/lib/aws/arn.d.ts.map +0 -1
- package/lib/aws/arn.js +0 -1
- package/lib/aws/arn.js.map +0 -1
- package/lib/aws/assets.d.ts +0 -8
- package/lib/aws/assets.d.ts.map +0 -1
- package/lib/aws/assets.js +0 -4
- package/lib/aws/assets.js.map +0 -1
- package/lib/aws/bundle.d.ts +0 -4
- package/lib/aws/bundle.d.ts.map +0 -1
- package/lib/aws/bundle.js +0 -4
- package/lib/aws/bundle.js.map +0 -1
- package/lib/aws/client.d.ts +0 -8
- package/lib/aws/client.d.ts.map +0 -1
- package/lib/aws/client.js +0 -40
- package/lib/aws/client.js.map +0 -1
- package/lib/aws/config.d.ts +0 -15
- package/lib/aws/config.d.ts.map +0 -1
- package/lib/aws/config.js +0 -1
- package/lib/aws/config.js.map +0 -1
- package/lib/aws/credentials.d.ts +0 -156
- package/lib/aws/credentials.d.ts.map +0 -1
- package/lib/aws/credentials.js +0 -196
- package/lib/aws/credentials.js.map +0 -1
- package/lib/aws/dynamodb/attribute-value.d.ts +0 -20
- package/lib/aws/dynamodb/attribute-value.d.ts.map +0 -1
- package/lib/aws/dynamodb/attribute-value.js +0 -217
- package/lib/aws/dynamodb/attribute-value.js.map +0 -1
- package/lib/aws/dynamodb/client.d.ts +0 -12
- package/lib/aws/dynamodb/client.d.ts.map +0 -1
- package/lib/aws/dynamodb/client.js +0 -11
- package/lib/aws/dynamodb/client.js.map +0 -1
- package/lib/aws/dynamodb/expr.d.ts +0 -41
- package/lib/aws/dynamodb/expr.d.ts.map +0 -1
- package/lib/aws/dynamodb/expr.js +0 -1
- package/lib/aws/dynamodb/expr.js.map +0 -1
- package/lib/aws/dynamodb/index.d.ts +0 -10
- package/lib/aws/dynamodb/index.d.ts.map +0 -1
- package/lib/aws/dynamodb/index.js +0 -9
- package/lib/aws/dynamodb/index.js.map +0 -1
- package/lib/aws/dynamodb/projection.d.ts +0 -25
- package/lib/aws/dynamodb/projection.d.ts.map +0 -1
- package/lib/aws/dynamodb/projection.js +0 -1
- package/lib/aws/dynamodb/projection.js.map +0 -1
- package/lib/aws/dynamodb/secondary-index.d.ts +0 -26
- package/lib/aws/dynamodb/secondary-index.d.ts.map +0 -1
- package/lib/aws/dynamodb/secondary-index.js +0 -4
- package/lib/aws/dynamodb/secondary-index.js.map +0 -1
- package/lib/aws/dynamodb/table.d.ts +0 -59
- package/lib/aws/dynamodb/table.d.ts.map +0 -1
- package/lib/aws/dynamodb/table.get-item.d.ts +0 -57
- package/lib/aws/dynamodb/table.get-item.d.ts.map +0 -1
- package/lib/aws/dynamodb/table.get-item.js +0 -77
- package/lib/aws/dynamodb/table.get-item.js.map +0 -1
- package/lib/aws/dynamodb/table.js +0 -4
- package/lib/aws/dynamodb/table.js.map +0 -1
- package/lib/aws/dynamodb/table.provider.d.ts +0 -7
- package/lib/aws/dynamodb/table.provider.d.ts.map +0 -1
- package/lib/aws/dynamodb/table.provider.js +0 -196
- package/lib/aws/dynamodb/table.provider.js.map +0 -1
- package/lib/aws/ec2/client.d.ts +0 -12
- package/lib/aws/ec2/client.d.ts.map +0 -1
- package/lib/aws/ec2/client.js +0 -11
- package/lib/aws/ec2/client.js.map +0 -1
- package/lib/aws/ec2/egress-only-igw.d.ts +0 -55
- package/lib/aws/ec2/egress-only-igw.d.ts.map +0 -1
- package/lib/aws/ec2/egress-only-igw.js +0 -4
- package/lib/aws/ec2/egress-only-igw.js.map +0 -1
- package/lib/aws/ec2/egress-only-igw.provider.d.ts +0 -6
- package/lib/aws/ec2/egress-only-igw.provider.d.ts.map +0 -1
- package/lib/aws/ec2/egress-only-igw.provider.js +0 -114
- package/lib/aws/ec2/egress-only-igw.provider.js.map +0 -1
- package/lib/aws/ec2/eip.d.ts +0 -85
- package/lib/aws/ec2/eip.d.ts.map +0 -1
- package/lib/aws/ec2/eip.js +0 -4
- package/lib/aws/ec2/eip.js.map +0 -1
- package/lib/aws/ec2/eip.provider.d.ts +0 -6
- package/lib/aws/ec2/eip.provider.d.ts.map +0 -1
- package/lib/aws/ec2/eip.provider.js +0 -135
- package/lib/aws/ec2/eip.provider.js.map +0 -1
- package/lib/aws/ec2/index.d.ts +0 -33
- package/lib/aws/ec2/index.d.ts.map +0 -1
- package/lib/aws/ec2/index.js +0 -33
- package/lib/aws/ec2/index.js.map +0 -1
- package/lib/aws/ec2/internet-gateway.d.ts +0 -65
- package/lib/aws/ec2/internet-gateway.d.ts.map +0 -1
- package/lib/aws/ec2/internet-gateway.js +0 -4
- package/lib/aws/ec2/internet-gateway.js.map +0 -1
- package/lib/aws/ec2/internet-gateway.provider.d.ts +0 -6
- package/lib/aws/ec2/internet-gateway.provider.d.ts.map +0 -1
- package/lib/aws/ec2/internet-gateway.provider.js +0 -197
- package/lib/aws/ec2/internet-gateway.provider.js.map +0 -1
- package/lib/aws/ec2/nat-gateway.d.ts +0 -127
- package/lib/aws/ec2/nat-gateway.d.ts.map +0 -1
- package/lib/aws/ec2/nat-gateway.js +0 -4
- package/lib/aws/ec2/nat-gateway.js.map +0 -1
- package/lib/aws/ec2/nat-gateway.provider.d.ts +0 -6
- package/lib/aws/ec2/nat-gateway.provider.d.ts.map +0 -1
- package/lib/aws/ec2/nat-gateway.provider.js +0 -222
- package/lib/aws/ec2/nat-gateway.provider.js.map +0 -1
- package/lib/aws/ec2/network-acl-association.d.ts +0 -44
- package/lib/aws/ec2/network-acl-association.d.ts.map +0 -1
- package/lib/aws/ec2/network-acl-association.js +0 -4
- package/lib/aws/ec2/network-acl-association.js.map +0 -1
- package/lib/aws/ec2/network-acl-association.provider.d.ts +0 -4
- package/lib/aws/ec2/network-acl-association.provider.d.ts.map +0 -1
- package/lib/aws/ec2/network-acl-association.provider.js +0 -115
- package/lib/aws/ec2/network-acl-association.provider.js.map +0 -1
- package/lib/aws/ec2/network-acl-entry.d.ts +0 -118
- package/lib/aws/ec2/network-acl-entry.d.ts.map +0 -1
- package/lib/aws/ec2/network-acl-entry.js +0 -3
- package/lib/aws/ec2/network-acl-entry.js.map +0 -1
- package/lib/aws/ec2/network-acl-entry.provider.d.ts +0 -4
- package/lib/aws/ec2/network-acl-entry.provider.d.ts.map +0 -1
- package/lib/aws/ec2/network-acl-entry.provider.js +0 -129
- package/lib/aws/ec2/network-acl-entry.provider.js.map +0 -1
- package/lib/aws/ec2/network-acl.d.ts +0 -82
- package/lib/aws/ec2/network-acl.d.ts.map +0 -1
- package/lib/aws/ec2/network-acl.js +0 -4
- package/lib/aws/ec2/network-acl.js.map +0 -1
- package/lib/aws/ec2/network-acl.provider.d.ts +0 -6
- package/lib/aws/ec2/network-acl.provider.d.ts.map +0 -1
- package/lib/aws/ec2/network-acl.provider.js +0 -136
- package/lib/aws/ec2/network-acl.provider.js.map +0 -1
- package/lib/aws/ec2/route-table-association.d.ts +0 -63
- package/lib/aws/ec2/route-table-association.d.ts.map +0 -1
- package/lib/aws/ec2/route-table-association.js +0 -4
- package/lib/aws/ec2/route-table-association.js.map +0 -1
- package/lib/aws/ec2/route-table-association.provider.d.ts +0 -4
- package/lib/aws/ec2/route-table-association.provider.d.ts.map +0 -1
- package/lib/aws/ec2/route-table-association.provider.js +0 -121
- package/lib/aws/ec2/route-table-association.provider.js.map +0 -1
- package/lib/aws/ec2/route-table.d.ts +0 -159
- package/lib/aws/ec2/route-table.d.ts.map +0 -1
- package/lib/aws/ec2/route-table.js +0 -4
- package/lib/aws/ec2/route-table.js.map +0 -1
- package/lib/aws/ec2/route-table.provider.d.ts +0 -6
- package/lib/aws/ec2/route-table.provider.d.ts.map +0 -1
- package/lib/aws/ec2/route-table.provider.js +0 -213
- package/lib/aws/ec2/route-table.provider.js.map +0 -1
- package/lib/aws/ec2/route.d.ts +0 -155
- package/lib/aws/ec2/route.d.ts.map +0 -1
- package/lib/aws/ec2/route.js +0 -3
- package/lib/aws/ec2/route.js.map +0 -1
- package/lib/aws/ec2/route.provider.d.ts +0 -4
- package/lib/aws/ec2/route.provider.d.ts.map +0 -1
- package/lib/aws/ec2/route.provider.js +0 -166
- package/lib/aws/ec2/route.provider.js.map +0 -1
- package/lib/aws/ec2/security-group-rule.d.ts +0 -118
- package/lib/aws/ec2/security-group-rule.d.ts.map +0 -1
- package/lib/aws/ec2/security-group-rule.js +0 -4
- package/lib/aws/ec2/security-group-rule.js.map +0 -1
- package/lib/aws/ec2/security-group-rule.provider.d.ts +0 -4
- package/lib/aws/ec2/security-group-rule.provider.d.ts.map +0 -1
- package/lib/aws/ec2/security-group-rule.provider.js +0 -193
- package/lib/aws/ec2/security-group-rule.provider.js.map +0 -1
- package/lib/aws/ec2/security-group.d.ts +0 -147
- package/lib/aws/ec2/security-group.d.ts.map +0 -1
- package/lib/aws/ec2/security-group.js +0 -4
- package/lib/aws/ec2/security-group.js.map +0 -1
- package/lib/aws/ec2/security-group.provider.d.ts +0 -6
- package/lib/aws/ec2/security-group.provider.d.ts.map +0 -1
- package/lib/aws/ec2/security-group.provider.js +0 -291
- package/lib/aws/ec2/security-group.provider.js.map +0 -1
- package/lib/aws/ec2/subnet.d.ts +0 -175
- package/lib/aws/ec2/subnet.d.ts.map +0 -1
- package/lib/aws/ec2/subnet.js +0 -4
- package/lib/aws/ec2/subnet.js.map +0 -1
- package/lib/aws/ec2/subnet.provider.d.ts +0 -4
- package/lib/aws/ec2/subnet.provider.d.ts.map +0 -1
- package/lib/aws/ec2/subnet.provider.js +0 -253
- package/lib/aws/ec2/subnet.provider.js.map +0 -1
- package/lib/aws/ec2/vpc-endpoint.d.ts +0 -176
- package/lib/aws/ec2/vpc-endpoint.d.ts.map +0 -1
- package/lib/aws/ec2/vpc-endpoint.js +0 -4
- package/lib/aws/ec2/vpc-endpoint.js.map +0 -1
- package/lib/aws/ec2/vpc-endpoint.provider.d.ts +0 -6
- package/lib/aws/ec2/vpc-endpoint.provider.d.ts.map +0 -1
- package/lib/aws/ec2/vpc-endpoint.provider.js +0 -315
- package/lib/aws/ec2/vpc-endpoint.provider.js.map +0 -1
- package/lib/aws/ec2/vpc.d.ts +0 -136
- package/lib/aws/ec2/vpc.d.ts.map +0 -1
- package/lib/aws/ec2/vpc.js +0 -4
- package/lib/aws/ec2/vpc.js.map +0 -1
- package/lib/aws/ec2/vpc.provider.d.ts +0 -6
- package/lib/aws/ec2/vpc.provider.d.ts.map +0 -1
- package/lib/aws/ec2/vpc.provider.js +0 -212
- package/lib/aws/ec2/vpc.provider.js.map +0 -1
- package/lib/aws/iam.d.ts +0 -23
- package/lib/aws/iam.d.ts.map +0 -1
- package/lib/aws/iam.js +0 -7
- package/lib/aws/iam.js.map +0 -1
- package/lib/aws/index.d.ts +0 -28
- package/lib/aws/index.d.ts.map +0 -1
- package/lib/aws/index.js +0 -21
- package/lib/aws/index.js.map +0 -1
- package/lib/aws/lambda/client.d.ts +0 -8
- package/lib/aws/lambda/client.d.ts.map +0 -1
- package/lib/aws/lambda/client.js +0 -7
- package/lib/aws/lambda/client.js.map +0 -1
- package/lib/aws/lambda/consume.d.ts +0 -16
- package/lib/aws/lambda/consume.d.ts.map +0 -1
- package/lib/aws/lambda/consume.js +0 -30
- package/lib/aws/lambda/consume.js.map +0 -1
- package/lib/aws/lambda/function.d.ts +0 -41
- package/lib/aws/lambda/function.d.ts.map +0 -1
- package/lib/aws/lambda/function.handler.d.ts +0 -7
- package/lib/aws/lambda/function.handler.d.ts.map +0 -1
- package/lib/aws/lambda/function.handler.js +0 -8
- package/lib/aws/lambda/function.handler.js.map +0 -1
- package/lib/aws/lambda/function.invoke.d.ts +0 -12
- package/lib/aws/lambda/function.invoke.d.ts.map +0 -1
- package/lib/aws/lambda/function.invoke.js +0 -33
- package/lib/aws/lambda/function.invoke.js.map +0 -1
- package/lib/aws/lambda/function.js +0 -3
- package/lib/aws/lambda/function.js.map +0 -1
- package/lib/aws/lambda/function.provider.d.ts +0 -10
- package/lib/aws/lambda/function.provider.d.ts.map +0 -1
- package/lib/aws/lambda/function.provider.js +0 -464
- package/lib/aws/lambda/function.provider.js.map +0 -1
- package/lib/aws/lambda/index.d.ts +0 -9
- package/lib/aws/lambda/index.d.ts.map +0 -1
- package/lib/aws/lambda/index.js +0 -10
- package/lib/aws/lambda/index.js.map +0 -1
- package/lib/aws/lambda/serve.d.ts +0 -12
- package/lib/aws/lambda/serve.d.ts.map +0 -1
- package/lib/aws/lambda/serve.js +0 -7
- package/lib/aws/lambda/serve.js.map +0 -1
- package/lib/aws/parse-ini.d.ts +0 -4
- package/lib/aws/parse-ini.d.ts.map +0 -1
- package/lib/aws/parse-ini.js +0 -67
- package/lib/aws/parse-ini.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/region.d.ts +0 -31
- package/lib/aws/region.d.ts.map +0 -1
- package/lib/aws/region.js +0 -46
- package/lib/aws/region.js.map +0 -1
- package/lib/aws/s3.d.ts +0 -8
- package/lib/aws/s3.d.ts.map +0 -1
- package/lib/aws/s3.js +0 -7
- package/lib/aws/s3.js.map +0 -1
- package/lib/aws/sqs/client.d.ts +0 -12
- package/lib/aws/sqs/client.d.ts.map +0 -1
- package/lib/aws/sqs/client.js +0 -11
- package/lib/aws/sqs/client.js.map +0 -1
- package/lib/aws/sqs/index.d.ts +0 -8
- package/lib/aws/sqs/index.d.ts.map +0 -1
- package/lib/aws/sqs/index.js +0 -8
- package/lib/aws/sqs/index.js.map +0 -1
- package/lib/aws/sqs/queue.consume.d.ts +0 -12
- package/lib/aws/sqs/queue.consume.d.ts.map +0 -1
- package/lib/aws/sqs/queue.consume.js +0 -2
- package/lib/aws/sqs/queue.consume.js.map +0 -1
- package/lib/aws/sqs/queue.d.ts +0 -80
- package/lib/aws/sqs/queue.d.ts.map +0 -1
- package/lib/aws/sqs/queue.event-source.d.ts +0 -22
- package/lib/aws/sqs/queue.event-source.d.ts.map +0 -1
- package/lib/aws/sqs/queue.event-source.js +0 -130
- package/lib/aws/sqs/queue.event-source.js.map +0 -1
- package/lib/aws/sqs/queue.js +0 -3
- package/lib/aws/sqs/queue.js.map +0 -1
- package/lib/aws/sqs/queue.provider.d.ts +0 -6
- package/lib/aws/sqs/queue.provider.d.ts.map +0 -1
- package/lib/aws/sqs/queue.provider.js +0 -95
- package/lib/aws/sqs/queue.provider.js.map +0 -1
- package/lib/aws/sqs/queue.send-message.d.ts +0 -13
- package/lib/aws/sqs/queue.send-message.d.ts.map +0 -1
- package/lib/aws/sqs/queue.send-message.js +0 -34
- package/lib/aws/sqs/queue.send-message.js.map +0 -1
- package/lib/aws/sts.d.ts +0 -8
- package/lib/aws/sts.d.ts.map +0 -1
- package/lib/aws/sts.js +0 -7
- package/lib/aws/sts.js.map +0 -1
- package/lib/aws/zip.d.ts +0 -3
- package/lib/aws/zip.d.ts.map +0 -1
- package/lib/aws/zip.js +0 -12
- package/lib/aws/zip.js.map +0 -1
- package/lib/binding.d.ts +0 -106
- package/lib/binding.d.ts.map +0 -1
- package/lib/binding.js +0 -27
- package/lib/binding.js.map +0 -1
- package/lib/capability.d.ts +0 -49
- package/lib/capability.d.ts.map +0 -1
- package/lib/capability.js +0 -1
- package/lib/capability.js.map +0 -1
- package/lib/cli/components/ApprovePlan.d.ts +0 -8
- package/lib/cli/components/ApprovePlan.d.ts.map +0 -1
- package/lib/cli/components/ApprovePlan.js +0 -30
- package/lib/cli/components/ApprovePlan.js.map +0 -1
- package/lib/cli/components/Plan.d.ts +0 -7
- package/lib/cli/components/Plan.d.ts.map +0 -1
- package/lib/cli/components/Plan.js +0 -100
- package/lib/cli/components/Plan.js.map +0 -1
- package/lib/cli/components/PlanProgress.d.ts +0 -13
- package/lib/cli/components/PlanProgress.d.ts.map +0 -1
- package/lib/cli/components/PlanProgress.js +0 -176
- package/lib/cli/components/PlanProgress.js.map +0 -1
- package/lib/cli/ink-service.d.ts +0 -4
- package/lib/cli/ink-service.d.ts.map +0 -1
- package/lib/cli/ink-service.js +0 -43
- package/lib/cli/ink-service.js.map +0 -1
- package/lib/cli/service.d.ts +0 -21
- package/lib/cli/service.d.ts.map +0 -1
- package/lib/cli/service.js +0 -5
- package/lib/cli/service.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/api.d.ts +0 -36
- package/lib/cloudflare/api.d.ts.map +0 -1
- package/lib/cloudflare/api.js +0 -100
- package/lib/cloudflare/api.js.map +0 -1
- package/lib/cloudflare/config.d.ts +0 -9
- package/lib/cloudflare/config.d.ts.map +0 -1
- package/lib/cloudflare/config.js +0 -1
- package/lib/cloudflare/config.js.map +0 -1
- package/lib/cloudflare/context.d.ts +0 -27
- package/lib/cloudflare/context.d.ts.map +0 -1
- package/lib/cloudflare/context.js +0 -24
- package/lib/cloudflare/context.js.map +0 -1
- package/lib/cloudflare/index.d.ts +0 -8
- package/lib/cloudflare/index.d.ts.map +0 -1
- package/lib/cloudflare/index.js +0 -8
- package/lib/cloudflare/index.js.map +0 -1
- package/lib/cloudflare/kv/index.d.ts +0 -4
- package/lib/cloudflare/kv/index.d.ts.map +0 -1
- package/lib/cloudflare/kv/index.js +0 -4
- package/lib/cloudflare/kv/index.js.map +0 -1
- package/lib/cloudflare/kv/namespace.binding.d.ts +0 -10
- package/lib/cloudflare/kv/namespace.binding.d.ts.map +0 -1
- package/lib/cloudflare/kv/namespace.binding.js +0 -15
- package/lib/cloudflare/kv/namespace.binding.js.map +0 -1
- package/lib/cloudflare/kv/namespace.client.d.ts +0 -11
- package/lib/cloudflare/kv/namespace.client.d.ts.map +0 -1
- package/lib/cloudflare/kv/namespace.client.js +0 -31
- package/lib/cloudflare/kv/namespace.client.js.map +0 -1
- package/lib/cloudflare/kv/namespace.d.ts +0 -24
- package/lib/cloudflare/kv/namespace.d.ts.map +0 -1
- package/lib/cloudflare/kv/namespace.js +0 -3
- package/lib/cloudflare/kv/namespace.js.map +0 -1
- package/lib/cloudflare/kv/namespace.provider.d.ts +0 -5
- package/lib/cloudflare/kv/namespace.provider.d.ts.map +0 -1
- package/lib/cloudflare/kv/namespace.provider.js +0 -85
- package/lib/cloudflare/kv/namespace.provider.js.map +0 -1
- package/lib/cloudflare/live.d.ts +0 -11
- package/lib/cloudflare/live.d.ts.map +0 -1
- package/lib/cloudflare/live.js +0 -15
- package/lib/cloudflare/live.js.map +0 -1
- package/lib/cloudflare/r2/bucket.binding.d.ts +0 -10
- package/lib/cloudflare/r2/bucket.binding.d.ts.map +0 -1
- package/lib/cloudflare/r2/bucket.binding.js +0 -18
- package/lib/cloudflare/r2/bucket.binding.js.map +0 -1
- package/lib/cloudflare/r2/bucket.client.d.ts +0 -8
- package/lib/cloudflare/r2/bucket.client.d.ts.map +0 -1
- package/lib/cloudflare/r2/bucket.client.js +0 -9
- package/lib/cloudflare/r2/bucket.client.js.map +0 -1
- package/lib/cloudflare/r2/bucket.d.ts +0 -33
- package/lib/cloudflare/r2/bucket.d.ts.map +0 -1
- package/lib/cloudflare/r2/bucket.del.d.ts +0 -4
- package/lib/cloudflare/r2/bucket.del.d.ts.map +0 -1
- package/lib/cloudflare/r2/bucket.del.js +0 -7
- package/lib/cloudflare/r2/bucket.del.js.map +0 -1
- package/lib/cloudflare/r2/bucket.get.d.ts +0 -5
- package/lib/cloudflare/r2/bucket.get.d.ts.map +0 -1
- package/lib/cloudflare/r2/bucket.get.js +0 -7
- package/lib/cloudflare/r2/bucket.get.js.map +0 -1
- package/lib/cloudflare/r2/bucket.head.d.ts +0 -4
- package/lib/cloudflare/r2/bucket.head.d.ts.map +0 -1
- package/lib/cloudflare/r2/bucket.head.js +0 -7
- package/lib/cloudflare/r2/bucket.head.js.map +0 -1
- package/lib/cloudflare/r2/bucket.js +0 -3
- package/lib/cloudflare/r2/bucket.js.map +0 -1
- package/lib/cloudflare/r2/bucket.list.d.ts +0 -5
- package/lib/cloudflare/r2/bucket.list.d.ts.map +0 -1
- package/lib/cloudflare/r2/bucket.list.js +0 -7
- package/lib/cloudflare/r2/bucket.list.js.map +0 -1
- package/lib/cloudflare/r2/bucket.multipart.d.ts +0 -19
- package/lib/cloudflare/r2/bucket.multipart.d.ts.map +0 -1
- package/lib/cloudflare/r2/bucket.multipart.js +0 -25
- package/lib/cloudflare/r2/bucket.multipart.js.map +0 -1
- package/lib/cloudflare/r2/bucket.provider.d.ts +0 -5
- package/lib/cloudflare/r2/bucket.provider.d.ts.map +0 -1
- package/lib/cloudflare/r2/bucket.provider.js +0 -78
- package/lib/cloudflare/r2/bucket.provider.js.map +0 -1
- package/lib/cloudflare/r2/bucket.put.d.ts +0 -6
- package/lib/cloudflare/r2/bucket.put.d.ts.map +0 -1
- package/lib/cloudflare/r2/bucket.put.js +0 -8
- package/lib/cloudflare/r2/bucket.put.js.map +0 -1
- package/lib/cloudflare/r2/index.d.ts +0 -10
- package/lib/cloudflare/r2/index.d.ts.map +0 -1
- package/lib/cloudflare/r2/index.js +0 -10
- package/lib/cloudflare/r2/index.js.map +0 -1
- package/lib/cloudflare/stream.d.ts +0 -10
- package/lib/cloudflare/stream.d.ts.map +0 -1
- package/lib/cloudflare/stream.js +0 -16
- package/lib/cloudflare/stream.js.map +0 -1
- package/lib/cloudflare/worker/assets.fetch.d.ts +0 -9
- package/lib/cloudflare/worker/assets.fetch.d.ts.map +0 -1
- package/lib/cloudflare/worker/assets.fetch.js +0 -12
- package/lib/cloudflare/worker/assets.fetch.js.map +0 -1
- package/lib/cloudflare/worker/assets.provider.d.ts +0 -66
- package/lib/cloudflare/worker/assets.provider.d.ts.map +0 -1
- package/lib/cloudflare/worker/assets.provider.js +0 -145
- package/lib/cloudflare/worker/assets.provider.js.map +0 -1
- package/lib/cloudflare/worker/index.d.ts +0 -5
- package/lib/cloudflare/worker/index.d.ts.map +0 -1
- package/lib/cloudflare/worker/index.js +0 -5
- package/lib/cloudflare/worker/index.js.map +0 -1
- package/lib/cloudflare/worker/worker.d.ts +0 -66
- package/lib/cloudflare/worker/worker.d.ts.map +0 -1
- package/lib/cloudflare/worker/worker.handler.d.ts +0 -11
- package/lib/cloudflare/worker/worker.handler.d.ts.map +0 -1
- package/lib/cloudflare/worker/worker.handler.js +0 -15
- package/lib/cloudflare/worker/worker.handler.js.map +0 -1
- package/lib/cloudflare/worker/worker.js +0 -4
- package/lib/cloudflare/worker/worker.js.map +0 -1
- package/lib/cloudflare/worker/worker.provider.d.ts +0 -10
- package/lib/cloudflare/worker/worker.provider.d.ts.map +0 -1
- package/lib/cloudflare/worker/worker.provider.js +0 -225
- package/lib/cloudflare/worker/worker.provider.js.map +0 -1
- package/lib/cloudflare/worker/worker.serve.d.ts +0 -39
- package/lib/cloudflare/worker/worker.serve.d.ts.map +0 -1
- package/lib/cloudflare/worker/worker.serve.js +0 -4
- package/lib/cloudflare/worker/worker.serve.js.map +0 -1
- package/lib/data.d.ts +0 -3
- package/lib/data.d.ts.map +0 -1
- package/lib/data.js +0 -8
- package/lib/data.js.map +0 -1
- package/lib/destroy.d.ts +0 -2
- package/lib/destroy.d.ts.map +0 -1
- package/lib/destroy.js +0 -3
- package/lib/destroy.js.map +0 -1
- package/lib/diff.d.ts +0 -18
- package/lib/diff.d.ts.map +0 -1
- package/lib/diff.js +0 -22
- package/lib/diff.js.map +0 -1
- package/lib/dot-alchemy.d.ts +0 -10
- package/lib/dot-alchemy.d.ts.map +0 -1
- package/lib/dot-alchemy.js +0 -15
- package/lib/dot-alchemy.js.map +0 -1
- package/lib/env.d.ts +0 -9
- package/lib/env.d.ts.map +0 -1
- package/lib/env.js +0 -19
- package/lib/env.js.map +0 -1
- package/lib/esbuild.d.ts +0 -28
- package/lib/esbuild.d.ts.map +0 -1
- package/lib/esbuild.js +0 -63
- package/lib/esbuild.js.map +0 -1
- package/lib/event.d.ts +0 -16
- package/lib/event.d.ts.map +0 -1
- package/lib/event.js +0 -1
- package/lib/event.js.map +0 -1
- package/lib/exports.d.ts +0 -9
- package/lib/exports.d.ts.map +0 -1
- package/lib/exports.js +0 -13
- package/lib/exports.js.map +0 -1
- package/lib/index.d.ts +0 -27
- package/lib/index.d.ts.map +0 -1
- package/lib/index.js +0 -27
- package/lib/index.js.map +0 -1
- package/lib/input.d.ts +0 -32
- package/lib/input.d.ts.map +0 -1
- package/lib/input.js +0 -1
- package/lib/input.js.map +0 -1
- package/lib/instance-id.d.ts +0 -12
- package/lib/instance-id.d.ts.map +0 -1
- package/lib/instance-id.js +0 -16
- package/lib/instance-id.js.map +0 -1
- package/lib/output.d.ts +0 -145
- package/lib/output.d.ts.map +0 -1
- package/lib/output.js +0 -283
- package/lib/output.js.map +0 -1
- package/lib/phase.d.ts +0 -2
- package/lib/phase.d.ts.map +0 -1
- package/lib/phase.js +0 -1
- package/lib/phase.js.map +0 -1
- package/lib/physical-name.d.ts +0 -28
- package/lib/physical-name.d.ts.map +0 -1
- package/lib/physical-name.js +0 -55
- package/lib/physical-name.js.map +0 -1
- package/lib/plan.d.ts +0 -135
- package/lib/plan.d.ts.map +0 -1
- package/lib/plan.js +0 -687
- package/lib/plan.js.map +0 -1
- package/lib/policy.d.ts +0 -54
- package/lib/policy.d.ts.map +0 -1
- package/lib/policy.js +0 -24
- package/lib/policy.js.map +0 -1
- package/lib/provider.d.ts +0 -71
- package/lib/provider.d.ts.map +0 -1
- package/lib/provider.js +0 -11
- package/lib/provider.js.map +0 -1
- package/lib/ref.d.ts +0 -14
- package/lib/ref.d.ts.map +0 -1
- package/lib/ref.js +0 -21
- package/lib/ref.js.map +0 -1
- package/lib/reporter.d.ts +0 -8
- package/lib/reporter.d.ts.map +0 -1
- package/lib/reporter.js +0 -4
- package/lib/reporter.js.map +0 -1
- package/lib/resource.d.ts +0 -36
- package/lib/resource.d.ts.map +0 -1
- package/lib/resource.js +0 -26
- package/lib/resource.js.map +0 -1
- package/lib/runtime.d.ts +0 -40
- package/lib/runtime.d.ts.map +0 -1
- package/lib/runtime.js +0 -54
- package/lib/runtime.js.map +0 -1
- package/lib/schema.d.ts +0 -37
- package/lib/schema.d.ts.map +0 -1
- package/lib/schema.js +0 -61
- package/lib/schema.js.map +0 -1
- package/lib/service.d.ts +0 -36
- package/lib/service.d.ts.map +0 -1
- package/lib/service.js +0 -4
- package/lib/service.js.map +0 -1
- package/lib/sha256.d.ts +0 -5
- package/lib/sha256.d.ts.map +0 -1
- package/lib/sha256.js +0 -16
- package/lib/sha256.js.map +0 -1
- package/lib/stack.d.ts +0 -60
- package/lib/stack.d.ts.map +0 -1
- package/lib/stack.js +0 -11
- package/lib/stack.js.map +0 -1
- package/lib/stage.d.ts +0 -39
- package/lib/stage.d.ts.map +0 -1
- package/lib/stage.js +0 -32
- package/lib/stage.js.map +0 -1
- package/lib/state.d.ts +0 -157
- package/lib/state.d.ts.map +0 -1
- package/lib/state.js +0 -71
- package/lib/state.js.map +0 -1
- package/lib/tags.d.ts +0 -44
- package/lib/tags.d.ts.map +0 -1
- package/lib/tags.js +0 -73
- package/lib/tags.js.map +0 -1
- package/lib/test.d.ts +0 -35
- package/lib/test.d.ts.map +0 -1
- package/lib/test.js +0 -68
- package/lib/test.js.map +0 -1
- package/lib/todo.d.ts +0 -3
- package/lib/todo.d.ts.map +0 -1
- package/lib/todo.js +0 -3
- package/lib/todo.js.map +0 -1
- package/lib/tsconfig.test.tsbuildinfo +0 -1
- package/lib/type.d.ts +0 -6
- package/lib/type.d.ts.map +0 -1
- package/lib/type.js +0 -3
- package/lib/type.js.map +0 -1
- package/lib/unknown.d.ts +0 -4
- package/lib/unknown.d.ts.map +0 -1
- package/lib/unknown.js +0 -4
- package/lib/unknown.js.map +0 -1
- package/lib/user.d.ts +0 -3
- package/lib/user.d.ts.map +0 -1
- package/lib/user.js +0 -3
- package/lib/user.js.map +0 -1
- package/lib/util.d.ts +0 -6
- package/lib/util.d.ts.map +0 -1
- package/lib/util.js +0 -9
- package/lib/util.js.map +0 -1
- package/src/$.ts +0 -17
- package/src/app.ts +0 -15
- package/src/apply.ts +0 -867
- package/src/aws/account.ts +0 -57
- package/src/aws/assets.ts +0 -8
- package/src/aws/bundle.ts +0 -5
- package/src/aws/client.ts +0 -67
- package/src/aws/config.ts +0 -16
- package/src/aws/credentials.ts +0 -444
- package/src/aws/dynamodb/attribute-value.ts +0 -240
- package/src/aws/dynamodb/client.ts +0 -20
- package/src/aws/dynamodb/index.ts +0 -12
- package/src/aws/dynamodb/projection.ts +0 -159
- package/src/aws/dynamodb/secondary-index.ts +0 -45
- package/src/aws/dynamodb/table.get-item.ts +0 -173
- package/src/aws/dynamodb/table.provider.ts +0 -288
- package/src/aws/dynamodb/table.ts +0 -98
- package/src/aws/ec2/client.ts +0 -20
- package/src/aws/ec2/egress-only-igw.provider.ts +0 -181
- package/src/aws/ec2/egress-only-igw.ts +0 -77
- package/src/aws/ec2/eip.provider.ts +0 -191
- package/src/aws/ec2/eip.ts +0 -106
- package/src/aws/ec2/index.ts +0 -33
- package/src/aws/ec2/internet-gateway.provider.ts +0 -325
- package/src/aws/ec2/internet-gateway.ts +0 -79
- package/src/aws/ec2/nat-gateway.provider.ts +0 -341
- package/src/aws/ec2/nat-gateway.ts +0 -155
- package/src/aws/ec2/network-acl-association.provider.ts +0 -181
- package/src/aws/ec2/network-acl-association.ts +0 -60
- package/src/aws/ec2/network-acl-entry.provider.ts +0 -218
- package/src/aws/ec2/network-acl-entry.ts +0 -140
- package/src/aws/ec2/network-acl.provider.ts +0 -195
- package/src/aws/ec2/network-acl.ts +0 -102
- package/src/aws/ec2/route-table-association.provider.ts +0 -213
- package/src/aws/ec2/route-table-association.ts +0 -82
- package/src/aws/ec2/route-table.provider.ts +0 -305
- package/src/aws/ec2/route-table.ts +0 -175
- package/src/aws/ec2/route.provider.ts +0 -212
- package/src/aws/ec2/route.ts +0 -192
- package/src/aws/ec2/security-group-rule.provider.ts +0 -264
- package/src/aws/ec2/security-group-rule.ts +0 -151
- package/src/aws/ec2/security-group.provider.ts +0 -392
- package/src/aws/ec2/security-group.ts +0 -182
- package/src/aws/ec2/subnet.provider.ts +0 -359
- package/src/aws/ec2/subnet.ts +0 -213
- package/src/aws/ec2/vpc-endpoint.provider.ts +0 -466
- package/src/aws/ec2/vpc-endpoint.ts +0 -213
- package/src/aws/ec2/vpc.provider.ts +0 -301
- package/src/aws/ec2/vpc.ts +0 -165
- package/src/aws/iam.ts +0 -30
- package/src/aws/index.ts +0 -72
- package/src/aws/lambda/client.ts +0 -14
- package/src/aws/lambda/consume.ts +0 -64
- package/src/aws/lambda/function.handler.ts +0 -30
- package/src/aws/lambda/function.invoke.ts +0 -46
- package/src/aws/lambda/function.provider.ts +0 -675
- package/src/aws/lambda/function.ts +0 -50
- package/src/aws/lambda/index.ts +0 -11
- package/src/aws/lambda/serve.ts +0 -29
- package/src/aws/parse-ini.ts +0 -80
- package/src/aws/profile.ts +0 -3
- package/src/aws/region.ts +0 -76
- package/src/aws/s3.ts +0 -10
- package/src/aws/sqs/client.ts +0 -20
- package/src/aws/sqs/index.ts +0 -8
- package/src/aws/sqs/queue.consume.ts +0 -13
- package/src/aws/sqs/queue.event-source.ts +0 -225
- package/src/aws/sqs/queue.provider.ts +0 -118
- package/src/aws/sqs/queue.send-message.ts +0 -50
- package/src/aws/sqs/queue.ts +0 -84
- package/src/aws/sts.ts +0 -13
- package/src/aws/zip.ts +0 -17
- package/src/binding.ts +0 -240
- package/src/capability.ts +0 -63
- package/src/cli/components/ApprovePlan.tsx +0 -44
- package/src/cli/components/Plan.tsx +0 -155
- package/src/cli/components/PlanProgress.tsx +0 -225
- package/src/cli/index.ts +0 -2
- package/src/cli/ink-service.tsx +0 -61
- package/src/cli/service.ts +0 -23
- package/src/cloudflare/account.ts +0 -37
- package/src/cloudflare/api.ts +0 -156
- package/src/cloudflare/config.ts +0 -7
- package/src/cloudflare/context.ts +0 -49
- package/src/cloudflare/index.ts +0 -8
- package/src/cloudflare/kv/index.ts +0 -3
- package/src/cloudflare/kv/namespace.binding.ts +0 -29
- package/src/cloudflare/kv/namespace.client.ts +0 -70
- package/src/cloudflare/kv/namespace.provider.ts +0 -103
- package/src/cloudflare/kv/namespace.ts +0 -30
- package/src/cloudflare/live.ts +0 -32
- package/src/cloudflare/r2/bucket.binding.ts +0 -31
- package/src/cloudflare/r2/bucket.client.ts +0 -22
- package/src/cloudflare/r2/bucket.del.ts +0 -11
- package/src/cloudflare/r2/bucket.get.ts +0 -13
- package/src/cloudflare/r2/bucket.head.ts +0 -11
- package/src/cloudflare/r2/bucket.list.ts +0 -12
- package/src/cloudflare/r2/bucket.multipart.ts +0 -55
- package/src/cloudflare/r2/bucket.provider.ts +0 -94
- package/src/cloudflare/r2/bucket.put.ts +0 -17
- package/src/cloudflare/r2/bucket.ts +0 -44
- package/src/cloudflare/r2/index.ts +0 -9
- package/src/cloudflare/stream.ts +0 -21
- package/src/cloudflare/worker/assets.fetch.ts +0 -29
- package/src/cloudflare/worker/assets.provider.ts +0 -249
- package/src/cloudflare/worker/index.ts +0 -4
- package/src/cloudflare/worker/worker.handler.ts +0 -39
- package/src/cloudflare/worker/worker.provider.ts +0 -279
- package/src/cloudflare/worker/worker.serve.ts +0 -22
- package/src/cloudflare/worker/worker.ts +0 -77
- package/src/destroy.ts +0 -3
- package/src/diff.ts +0 -48
- package/src/dot-alchemy.ts +0 -18
- package/src/env.ts +0 -39
- package/src/esbuild.ts +0 -98
- package/src/event.ts +0 -33
- package/src/exports.ts +0 -21
- package/src/input.ts +0 -81
- package/src/instance-id.ts +0 -20
- package/src/output.ts +0 -544
- package/src/phase.ts +0 -1
- package/src/physical-name.ts +0 -84
- package/src/plan.ts +0 -1129
- package/src/policy.ts +0 -128
- package/src/provider.ts +0 -113
- package/src/ref.ts +0 -48
- package/src/reporter.ts +0 -8
- package/src/resource.ts +0 -140
- package/src/runtime.ts +0 -152
- package/src/schema.ts +0 -102
- package/src/service.ts +0 -59
- package/src/sha256.ts +0 -23
- package/src/stack.ts +0 -116
- package/src/stage.ts +0 -85
- package/src/state.ts +0 -390
- package/src/tags.ts +0 -98
- package/src/test.ts +0 -172
- package/src/todo.ts +0 -4
- package/src/unknown.ts +0 -6
- package/src/user.ts +0 -4
- package/src/util.ts +0 -21
- /package/src/{aws/arn.ts → AWS/Arn.ts} +0 -0
- /package/src/{aws/dynamodb/expr.ts → AWS/DynamoDB/Expr.ts} +0 -0
- /package/src/{assert-never.ts → Util/assert-never.ts} +0 -0
- /package/src/{data.ts → Util/data.ts} +0 -0
- /package/src/{type.ts → Util/type.ts} +0 -0
|
@@ -0,0 +1,952 @@
|
|
|
1
|
+
import * as cloudfront from "@distilled.cloud/aws/cloudfront";
|
|
2
|
+
import * as Data from "effect/Data";
|
|
3
|
+
import * as Effect from "effect/Effect";
|
|
4
|
+
import * as Schedule from "effect/Schedule";
|
|
5
|
+
import type { Input } from "../../Input.ts";
|
|
6
|
+
import { Resource } from "../../Resource.ts";
|
|
7
|
+
import { createInternalTags, createTagsList, diffTags } from "../../Tags.ts";
|
|
8
|
+
|
|
9
|
+
const CLOUDFRONT_HOSTED_ZONE_ID = "Z2FDTNDATAQYW2" as const;
|
|
10
|
+
|
|
11
|
+
class DistributionFunctionAssociationPending extends Data.TaggedError(
|
|
12
|
+
"DistributionFunctionAssociationPending",
|
|
13
|
+
)<{
|
|
14
|
+
message: string;
|
|
15
|
+
}> {}
|
|
16
|
+
|
|
17
|
+
class DistributionPendingDeployment extends Data.TaggedError(
|
|
18
|
+
"DistributionPendingDeployment",
|
|
19
|
+
)<{
|
|
20
|
+
message: string;
|
|
21
|
+
}> {}
|
|
22
|
+
|
|
23
|
+
export interface DistributionOrigin {
|
|
24
|
+
/**
|
|
25
|
+
* Unique origin identifier inside the distribution.
|
|
26
|
+
*/
|
|
27
|
+
id: string;
|
|
28
|
+
/**
|
|
29
|
+
* Origin domain name.
|
|
30
|
+
*/
|
|
31
|
+
domainName: Input<string>;
|
|
32
|
+
/**
|
|
33
|
+
* Optional origin path prefix.
|
|
34
|
+
*/
|
|
35
|
+
originPath?: Input<string>;
|
|
36
|
+
/**
|
|
37
|
+
* CloudFront Origin Access Control identifier.
|
|
38
|
+
*/
|
|
39
|
+
originAccessControlId?: Input<string>;
|
|
40
|
+
/**
|
|
41
|
+
* Whether the origin should be modeled as an S3 origin.
|
|
42
|
+
* @default false
|
|
43
|
+
*/
|
|
44
|
+
s3Origin?: boolean;
|
|
45
|
+
/**
|
|
46
|
+
* Optional custom origin settings.
|
|
47
|
+
*/
|
|
48
|
+
customOriginConfig?: {
|
|
49
|
+
httpPort?: number;
|
|
50
|
+
httpsPort?: number;
|
|
51
|
+
originProtocolPolicy?: cloudfront.OriginProtocolPolicy;
|
|
52
|
+
originReadTimeout?: number;
|
|
53
|
+
originKeepaliveTimeout?: number;
|
|
54
|
+
originSslProtocols?: cloudfront.SslProtocol[];
|
|
55
|
+
};
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
export interface DistributionBehavior {
|
|
59
|
+
targetOriginId: string;
|
|
60
|
+
viewerProtocolPolicy?: cloudfront.ViewerProtocolPolicy;
|
|
61
|
+
allowedMethods?: cloudfront.Method[];
|
|
62
|
+
cachedMethods?: cloudfront.Method[];
|
|
63
|
+
compress?: boolean;
|
|
64
|
+
cachePolicyId?: string;
|
|
65
|
+
originRequestPolicyId?: string;
|
|
66
|
+
responseHeadersPolicyId?: string;
|
|
67
|
+
forwardedValues?: cloudfront.ForwardedValues;
|
|
68
|
+
minTtl?: number;
|
|
69
|
+
defaultTtl?: number;
|
|
70
|
+
maxTtl?: number;
|
|
71
|
+
functionAssociations?: {
|
|
72
|
+
functionArn: string;
|
|
73
|
+
eventType: cloudfront.EventType;
|
|
74
|
+
}[];
|
|
75
|
+
lambdaFunctionAssociations?: {
|
|
76
|
+
lambdaFunctionArn: string;
|
|
77
|
+
eventType: cloudfront.EventType;
|
|
78
|
+
includeBody?: boolean;
|
|
79
|
+
}[];
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
export interface DistributionViewerCertificate {
|
|
83
|
+
cloudFrontDefaultCertificate?: boolean;
|
|
84
|
+
acmCertificateArn?: string;
|
|
85
|
+
sslSupportMethod?: cloudfront.SSLSupportMethod;
|
|
86
|
+
minimumProtocolVersion?: cloudfront.MinimumProtocolVersion;
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
const isFunctionAssociationPending = (error: cloudfront.InvalidArgument) => {
|
|
90
|
+
const message = error.Message ?? "";
|
|
91
|
+
return (
|
|
92
|
+
message.includes("FunctionAssociationArn") &&
|
|
93
|
+
message.includes("not found or is not published")
|
|
94
|
+
);
|
|
95
|
+
};
|
|
96
|
+
|
|
97
|
+
export interface DistributionProps {
|
|
98
|
+
/**
|
|
99
|
+
* Alternate domain names routed to this distribution.
|
|
100
|
+
*/
|
|
101
|
+
aliases?: string[];
|
|
102
|
+
/**
|
|
103
|
+
* Default root object served for `/`.
|
|
104
|
+
*/
|
|
105
|
+
defaultRootObject?: string;
|
|
106
|
+
/**
|
|
107
|
+
* CloudFront origin definitions.
|
|
108
|
+
*/
|
|
109
|
+
origins: Input<DistributionOrigin[]>;
|
|
110
|
+
/**
|
|
111
|
+
* Default cache behavior.
|
|
112
|
+
*/
|
|
113
|
+
defaultCacheBehavior: Input<DistributionBehavior>;
|
|
114
|
+
/**
|
|
115
|
+
* Ordered cache behaviors.
|
|
116
|
+
*/
|
|
117
|
+
orderedCacheBehaviors?: Input<
|
|
118
|
+
Array<
|
|
119
|
+
DistributionBehavior & {
|
|
120
|
+
pathPattern: string;
|
|
121
|
+
}
|
|
122
|
+
>
|
|
123
|
+
>;
|
|
124
|
+
/**
|
|
125
|
+
* Custom error response rules.
|
|
126
|
+
*/
|
|
127
|
+
customErrorResponses?: Input<cloudfront.CustomErrorResponse[]>;
|
|
128
|
+
/**
|
|
129
|
+
* Human-readable distribution comment.
|
|
130
|
+
* @default ""
|
|
131
|
+
*/
|
|
132
|
+
comment?: string;
|
|
133
|
+
/**
|
|
134
|
+
* Whether the distribution should serve traffic.
|
|
135
|
+
* @default true
|
|
136
|
+
*/
|
|
137
|
+
enabled?: boolean;
|
|
138
|
+
/**
|
|
139
|
+
* Viewer certificate configuration.
|
|
140
|
+
*/
|
|
141
|
+
viewerCertificate?: Input<DistributionViewerCertificate>;
|
|
142
|
+
/**
|
|
143
|
+
* CloudFront price class.
|
|
144
|
+
*/
|
|
145
|
+
priceClass?: cloudfront.PriceClass;
|
|
146
|
+
/**
|
|
147
|
+
* Optional AWS WAF web ACL association.
|
|
148
|
+
*/
|
|
149
|
+
webAclId?: string;
|
|
150
|
+
/**
|
|
151
|
+
* Preferred HTTP version support.
|
|
152
|
+
*/
|
|
153
|
+
httpVersion?: cloudfront.HttpVersion;
|
|
154
|
+
/**
|
|
155
|
+
* Whether IPv6 should be enabled.
|
|
156
|
+
* @default true
|
|
157
|
+
*/
|
|
158
|
+
isIpv6Enabled?: boolean;
|
|
159
|
+
/**
|
|
160
|
+
* User-defined tags to apply to the distribution.
|
|
161
|
+
*/
|
|
162
|
+
tags?: Record<string, string>;
|
|
163
|
+
}
|
|
164
|
+
|
|
165
|
+
export interface Distribution extends Resource<
|
|
166
|
+
"AWS.CloudFront.Distribution",
|
|
167
|
+
DistributionProps,
|
|
168
|
+
{
|
|
169
|
+
/**
|
|
170
|
+
* CloudFront distribution identifier.
|
|
171
|
+
*/
|
|
172
|
+
distributionId: string;
|
|
173
|
+
/**
|
|
174
|
+
* ARN of the distribution.
|
|
175
|
+
*/
|
|
176
|
+
distributionArn: string;
|
|
177
|
+
/**
|
|
178
|
+
* CloudFront-assigned domain name.
|
|
179
|
+
*/
|
|
180
|
+
domainName: string;
|
|
181
|
+
/**
|
|
182
|
+
* Route 53 hosted zone ID for CloudFront aliases.
|
|
183
|
+
*/
|
|
184
|
+
hostedZoneId: string;
|
|
185
|
+
/**
|
|
186
|
+
* Current deployment status.
|
|
187
|
+
*/
|
|
188
|
+
status: string;
|
|
189
|
+
/**
|
|
190
|
+
* Configured alternate domain names.
|
|
191
|
+
*/
|
|
192
|
+
aliases: string[];
|
|
193
|
+
/**
|
|
194
|
+
* Current comment.
|
|
195
|
+
*/
|
|
196
|
+
comment: string;
|
|
197
|
+
/**
|
|
198
|
+
* Whether the distribution is enabled.
|
|
199
|
+
*/
|
|
200
|
+
enabled: boolean;
|
|
201
|
+
/**
|
|
202
|
+
* Most recent entity tag for update/delete operations.
|
|
203
|
+
*/
|
|
204
|
+
etag: string | undefined;
|
|
205
|
+
/**
|
|
206
|
+
* Number of invalidation batches still in progress.
|
|
207
|
+
*/
|
|
208
|
+
inProgressInvalidationBatches: number;
|
|
209
|
+
/**
|
|
210
|
+
* Last CloudFront modification timestamp.
|
|
211
|
+
*/
|
|
212
|
+
lastModifiedTime: Date | undefined;
|
|
213
|
+
/**
|
|
214
|
+
* Current tags on the distribution.
|
|
215
|
+
*/
|
|
216
|
+
tags: Record<string, string>;
|
|
217
|
+
}
|
|
218
|
+
> {}
|
|
219
|
+
|
|
220
|
+
/**
|
|
221
|
+
* A CloudFront distribution.
|
|
222
|
+
*
|
|
223
|
+
* `Distribution` manages the CDN layer for static sites and HTTP origins such
|
|
224
|
+
* as Lambda Function URLs and ALBs. It exposes the distribution domain and
|
|
225
|
+
* hosted zone ID needed for Route 53 alias records.
|
|
226
|
+
*
|
|
227
|
+
* @section Creating Distributions
|
|
228
|
+
* @example Private S3 Origin
|
|
229
|
+
* ```typescript
|
|
230
|
+
* const distribution = yield* Distribution("WebsiteCdn", {
|
|
231
|
+
* aliases: ["www.example.com"],
|
|
232
|
+
* origins: [
|
|
233
|
+
* {
|
|
234
|
+
* id: "site",
|
|
235
|
+
* domainName: bucket.bucketRegionalDomainName,
|
|
236
|
+
* s3Origin: true,
|
|
237
|
+
* originAccessControlId: oac.originAccessControlId,
|
|
238
|
+
* },
|
|
239
|
+
* ],
|
|
240
|
+
* defaultCacheBehavior: {
|
|
241
|
+
* targetOriginId: "site",
|
|
242
|
+
* viewerProtocolPolicy: "redirect-to-https",
|
|
243
|
+
* compress: true,
|
|
244
|
+
* },
|
|
245
|
+
* viewerCertificate: {
|
|
246
|
+
* acmCertificateArn: certificate.certificateArn,
|
|
247
|
+
* sslSupportMethod: "sni-only",
|
|
248
|
+
* minimumProtocolVersion: "TLSv1.2_2021",
|
|
249
|
+
* },
|
|
250
|
+
* });
|
|
251
|
+
* ```
|
|
252
|
+
*/
|
|
253
|
+
export const Distribution = Resource<Distribution>(
|
|
254
|
+
"AWS.CloudFront.Distribution",
|
|
255
|
+
);
|
|
256
|
+
|
|
257
|
+
export const DistributionProvider = () =>
|
|
258
|
+
Distribution.provider.effect(
|
|
259
|
+
Effect.gen(function* () {
|
|
260
|
+
const waitForDeployment = Effect.fn(function* (distributionId: string) {
|
|
261
|
+
yield* Effect.logInfo(
|
|
262
|
+
`CloudFront Distribution wait: polling deployment for ${distributionId}`,
|
|
263
|
+
);
|
|
264
|
+
return yield* cloudfront.getDistribution({ Id: distributionId }).pipe(
|
|
265
|
+
Effect.map((response) => response.Distribution),
|
|
266
|
+
Effect.flatMap((distribution) =>
|
|
267
|
+
distribution?.Status === "Deployed"
|
|
268
|
+
? Effect.gen(function* () {
|
|
269
|
+
yield* Effect.logInfo(
|
|
270
|
+
`CloudFront Distribution wait: ${distributionId} deployed`,
|
|
271
|
+
);
|
|
272
|
+
return distribution;
|
|
273
|
+
})
|
|
274
|
+
: Effect.gen(function* () {
|
|
275
|
+
yield* Effect.logInfo(
|
|
276
|
+
`CloudFront Distribution wait: ${distributionId} status=${distribution?.Status ?? "unknown"}`,
|
|
277
|
+
);
|
|
278
|
+
return yield* Effect.fail(
|
|
279
|
+
new DistributionPendingDeployment({
|
|
280
|
+
message: `Distribution ${distributionId} is not yet deployed`,
|
|
281
|
+
}),
|
|
282
|
+
);
|
|
283
|
+
}),
|
|
284
|
+
),
|
|
285
|
+
Effect.retry({
|
|
286
|
+
while: (error) => error._tag === "DistributionPendingDeployment",
|
|
287
|
+
schedule: Schedule.fixed("10 seconds").pipe(
|
|
288
|
+
Schedule.both(Schedule.recurs(60)),
|
|
289
|
+
),
|
|
290
|
+
}),
|
|
291
|
+
);
|
|
292
|
+
});
|
|
293
|
+
|
|
294
|
+
const getCurrent = Effect.fn(function* (distributionId: string) {
|
|
295
|
+
yield* Effect.logInfo(
|
|
296
|
+
`CloudFront Distribution read: loading distribution ${distributionId}`,
|
|
297
|
+
);
|
|
298
|
+
const distribution = yield* cloudfront
|
|
299
|
+
.getDistribution({ Id: distributionId })
|
|
300
|
+
.pipe(
|
|
301
|
+
Effect.map((response) => response.Distribution),
|
|
302
|
+
Effect.catchTag("NoSuchDistribution", () =>
|
|
303
|
+
Effect.succeed(undefined),
|
|
304
|
+
),
|
|
305
|
+
);
|
|
306
|
+
|
|
307
|
+
if (!distribution?.Id) {
|
|
308
|
+
yield* Effect.logInfo(
|
|
309
|
+
`CloudFront Distribution read: distribution ${distributionId} not found`,
|
|
310
|
+
);
|
|
311
|
+
return undefined;
|
|
312
|
+
}
|
|
313
|
+
|
|
314
|
+
yield* Effect.logInfo(
|
|
315
|
+
`CloudFront Distribution read: loading config and tags for ${distributionId}`,
|
|
316
|
+
);
|
|
317
|
+
const config = yield* cloudfront.getDistributionConfig({
|
|
318
|
+
Id: distributionId,
|
|
319
|
+
});
|
|
320
|
+
const tags = yield* cloudfront
|
|
321
|
+
.listTagsForResource({
|
|
322
|
+
Resource: distribution.ARN,
|
|
323
|
+
})
|
|
324
|
+
.pipe(Effect.map((response) => toTagsRecord(response.Tags.Items)));
|
|
325
|
+
|
|
326
|
+
yield* Effect.logInfo(
|
|
327
|
+
`CloudFront Distribution read: loaded ${distributionId} status=${distribution.Status} enabled=${config.DistributionConfig?.Enabled ?? "unknown"} etag=${config.ETag ?? "missing"} tags=${Object.keys(tags).length}`,
|
|
328
|
+
);
|
|
329
|
+
return {
|
|
330
|
+
distribution,
|
|
331
|
+
config: config.DistributionConfig!,
|
|
332
|
+
etag: config.ETag,
|
|
333
|
+
tags,
|
|
334
|
+
};
|
|
335
|
+
});
|
|
336
|
+
|
|
337
|
+
const getByCallerReference = Effect.fn(function* (
|
|
338
|
+
callerReference: string,
|
|
339
|
+
) {
|
|
340
|
+
yield* Effect.logInfo(
|
|
341
|
+
`CloudFront Distribution read: searching for callerReference=${callerReference}`,
|
|
342
|
+
);
|
|
343
|
+
let marker: string | undefined;
|
|
344
|
+
|
|
345
|
+
do {
|
|
346
|
+
const listed = yield* cloudfront.listDistributions({
|
|
347
|
+
Marker: marker,
|
|
348
|
+
});
|
|
349
|
+
|
|
350
|
+
for (const item of listed.DistributionList?.Items ?? []) {
|
|
351
|
+
if (!item.Id) continue;
|
|
352
|
+
|
|
353
|
+
const config = yield* cloudfront
|
|
354
|
+
.getDistributionConfig({
|
|
355
|
+
Id: item.Id,
|
|
356
|
+
})
|
|
357
|
+
.pipe(
|
|
358
|
+
Effect.catchTag("NoSuchDistribution", () =>
|
|
359
|
+
Effect.succeed(undefined),
|
|
360
|
+
),
|
|
361
|
+
);
|
|
362
|
+
|
|
363
|
+
if (
|
|
364
|
+
config?.DistributionConfig?.CallerReference === callerReference
|
|
365
|
+
) {
|
|
366
|
+
yield* Effect.logInfo(
|
|
367
|
+
`CloudFront Distribution read: recovered ${item.Id} for callerReference=${callerReference}`,
|
|
368
|
+
);
|
|
369
|
+
return yield* getCurrent(item.Id);
|
|
370
|
+
}
|
|
371
|
+
}
|
|
372
|
+
|
|
373
|
+
marker = listed.DistributionList?.IsTruncated
|
|
374
|
+
? listed.DistributionList.NextMarker
|
|
375
|
+
: undefined;
|
|
376
|
+
} while (marker);
|
|
377
|
+
|
|
378
|
+
yield* Effect.logInfo(
|
|
379
|
+
`CloudFront Distribution read: no distribution found for callerReference=${callerReference}`,
|
|
380
|
+
);
|
|
381
|
+
return undefined;
|
|
382
|
+
});
|
|
383
|
+
|
|
384
|
+
const waitForDeletionReady = Effect.fn(function* (
|
|
385
|
+
distributionId: string,
|
|
386
|
+
) {
|
|
387
|
+
class DistributionPendingDeletionReadiness extends Data.TaggedError(
|
|
388
|
+
"DistributionPendingDeletionReadiness",
|
|
389
|
+
)<{
|
|
390
|
+
message: string;
|
|
391
|
+
}> {}
|
|
392
|
+
|
|
393
|
+
yield* Effect.logInfo(
|
|
394
|
+
`CloudFront Distribution delete: waiting for ${distributionId} to become disabled and deployed`,
|
|
395
|
+
);
|
|
396
|
+
return yield* Effect.logInfo(
|
|
397
|
+
`CloudFront Distribution delete: waiting for ${distributionId} to become disabled and deployed`,
|
|
398
|
+
).pipe(
|
|
399
|
+
Effect.andThen(() => getCurrent(distributionId)),
|
|
400
|
+
Effect.flatMap(
|
|
401
|
+
Effect.fnUntraced(function* (current) {
|
|
402
|
+
if (!current) {
|
|
403
|
+
yield* Effect.logInfo(
|
|
404
|
+
`CloudFront Distribution delete: ${distributionId} already absent while waiting`,
|
|
405
|
+
);
|
|
406
|
+
return undefined;
|
|
407
|
+
}
|
|
408
|
+
|
|
409
|
+
if (
|
|
410
|
+
current.config.Enabled ||
|
|
411
|
+
current.distribution.Status !== "Deployed"
|
|
412
|
+
) {
|
|
413
|
+
yield* Effect.logInfo(
|
|
414
|
+
`CloudFront Distribution delete: ${distributionId} not ready enabled=${current.config.Enabled} status=${current.distribution.Status}`,
|
|
415
|
+
);
|
|
416
|
+
return yield* Effect.fail(
|
|
417
|
+
new DistributionPendingDeletionReadiness({
|
|
418
|
+
message: `Distribution ${distributionId} is not yet ready for deletion`,
|
|
419
|
+
}),
|
|
420
|
+
);
|
|
421
|
+
}
|
|
422
|
+
|
|
423
|
+
yield* Effect.logInfo(
|
|
424
|
+
`CloudFront Distribution delete: ${distributionId} ready for delete with etag=${current.etag ?? "missing"}`,
|
|
425
|
+
);
|
|
426
|
+
return current;
|
|
427
|
+
}),
|
|
428
|
+
),
|
|
429
|
+
Effect.retry({
|
|
430
|
+
while: (error) =>
|
|
431
|
+
error._tag === "DistributionPendingDeletionReadiness",
|
|
432
|
+
schedule: Schedule.fixed("10 seconds").pipe(
|
|
433
|
+
Schedule.both(Schedule.recurs(60)),
|
|
434
|
+
),
|
|
435
|
+
}),
|
|
436
|
+
);
|
|
437
|
+
});
|
|
438
|
+
|
|
439
|
+
return {
|
|
440
|
+
stables: [
|
|
441
|
+
"distributionId",
|
|
442
|
+
"distributionArn",
|
|
443
|
+
"domainName",
|
|
444
|
+
"hostedZoneId",
|
|
445
|
+
],
|
|
446
|
+
read: Effect.fn(function* ({ output }) {
|
|
447
|
+
if (!output?.distributionId) {
|
|
448
|
+
return undefined;
|
|
449
|
+
}
|
|
450
|
+
|
|
451
|
+
const current = yield* getCurrent(output.distributionId);
|
|
452
|
+
if (!current) {
|
|
453
|
+
return undefined;
|
|
454
|
+
}
|
|
455
|
+
|
|
456
|
+
return toAttrs(current.distribution, current.etag, current.tags);
|
|
457
|
+
}),
|
|
458
|
+
create: Effect.fn(function* ({ id, instanceId, news, session }) {
|
|
459
|
+
const tags = {
|
|
460
|
+
...(yield* createInternalTags(id)),
|
|
461
|
+
...news.tags,
|
|
462
|
+
};
|
|
463
|
+
|
|
464
|
+
const callerReference = instanceId;
|
|
465
|
+
const config = toConfig(callerReference, news);
|
|
466
|
+
yield* Effect.logInfo(
|
|
467
|
+
`CloudFront Distribution create: callerReference=${callerReference} aliases=${news.aliases?.length ?? 0} origins=${(news.origins as DistributionOrigin[]).length} tags=${Object.keys(tags).length}`,
|
|
468
|
+
);
|
|
469
|
+
yield* Effect.logInfo(
|
|
470
|
+
`CloudFront Distribution create: creating distribution with tags for callerReference=${callerReference}`,
|
|
471
|
+
);
|
|
472
|
+
const created = yield* cloudfront
|
|
473
|
+
.createDistributionWithTags({
|
|
474
|
+
DistributionConfigWithTags: {
|
|
475
|
+
DistributionConfig: config,
|
|
476
|
+
Tags: {
|
|
477
|
+
Items: createTagsList(tags),
|
|
478
|
+
},
|
|
479
|
+
},
|
|
480
|
+
})
|
|
481
|
+
.pipe(
|
|
482
|
+
Effect.catch((error) =>
|
|
483
|
+
isAccessDenied(error)
|
|
484
|
+
? Effect.gen(function* () {
|
|
485
|
+
yield* Effect.logInfo(
|
|
486
|
+
`CloudFront Distribution create: createDistributionWithTags denied, retrying without tags for callerReference=${callerReference}`,
|
|
487
|
+
);
|
|
488
|
+
const created = yield* cloudfront.createDistribution({
|
|
489
|
+
DistributionConfig: config,
|
|
490
|
+
});
|
|
491
|
+
|
|
492
|
+
if (
|
|
493
|
+
created.Distribution?.ARN &&
|
|
494
|
+
Object.keys(tags).length > 0
|
|
495
|
+
) {
|
|
496
|
+
yield* Effect.logInfo(
|
|
497
|
+
`CloudFront Distribution create: tagging distribution ${created.Distribution.Id} after fallback`,
|
|
498
|
+
);
|
|
499
|
+
yield* cloudfront.tagResource({
|
|
500
|
+
Resource: created.Distribution.ARN,
|
|
501
|
+
Tags: {
|
|
502
|
+
Items: createTagsList(tags),
|
|
503
|
+
},
|
|
504
|
+
});
|
|
505
|
+
}
|
|
506
|
+
|
|
507
|
+
return created;
|
|
508
|
+
})
|
|
509
|
+
: Effect.gen(function* () {
|
|
510
|
+
yield* Effect.logInfo(
|
|
511
|
+
`CloudFront Distribution create: createDistributionWithTags failed for callerReference=${callerReference} error=${String(error)}`,
|
|
512
|
+
);
|
|
513
|
+
return yield* Effect.fail(error);
|
|
514
|
+
}),
|
|
515
|
+
),
|
|
516
|
+
)
|
|
517
|
+
.pipe(
|
|
518
|
+
Effect.map((created) => ({
|
|
519
|
+
distributionId: created.Distribution?.Id,
|
|
520
|
+
etag: created.ETag,
|
|
521
|
+
tags,
|
|
522
|
+
})),
|
|
523
|
+
Effect.catchTag("DistributionAlreadyExists", () =>
|
|
524
|
+
Effect.gen(function* () {
|
|
525
|
+
yield* Effect.logInfo(
|
|
526
|
+
`CloudFront Distribution create: callerReference=${callerReference} already exists, attempting recovery`,
|
|
527
|
+
);
|
|
528
|
+
const recovered =
|
|
529
|
+
yield* getByCallerReference(callerReference);
|
|
530
|
+
if (!recovered?.distribution.Id) {
|
|
531
|
+
return yield* Effect.fail(
|
|
532
|
+
new Error(
|
|
533
|
+
`CloudFront distribution with caller reference '${callerReference}' already exists but could not be recovered`,
|
|
534
|
+
),
|
|
535
|
+
);
|
|
536
|
+
}
|
|
537
|
+
return {
|
|
538
|
+
distributionId: recovered.distribution.Id,
|
|
539
|
+
etag: recovered.etag,
|
|
540
|
+
tags: recovered.tags,
|
|
541
|
+
};
|
|
542
|
+
}),
|
|
543
|
+
),
|
|
544
|
+
Effect.catchTag(
|
|
545
|
+
"InvalidArgument",
|
|
546
|
+
(
|
|
547
|
+
error,
|
|
548
|
+
): Effect.Effect<
|
|
549
|
+
never,
|
|
550
|
+
| cloudfront.InvalidArgument
|
|
551
|
+
| DistributionFunctionAssociationPending
|
|
552
|
+
> =>
|
|
553
|
+
isFunctionAssociationPending(error)
|
|
554
|
+
? Effect.logInfo(
|
|
555
|
+
"CloudFront Distribution create: function association not yet ready, retrying",
|
|
556
|
+
).pipe(
|
|
557
|
+
Effect.andThen(
|
|
558
|
+
Effect.fail(
|
|
559
|
+
new DistributionFunctionAssociationPending({
|
|
560
|
+
message:
|
|
561
|
+
error.Message ??
|
|
562
|
+
"CloudFront function association pending",
|
|
563
|
+
}),
|
|
564
|
+
),
|
|
565
|
+
),
|
|
566
|
+
)
|
|
567
|
+
: Effect.fail(error),
|
|
568
|
+
),
|
|
569
|
+
Effect.retry({
|
|
570
|
+
while: (error) =>
|
|
571
|
+
error instanceof DistributionFunctionAssociationPending,
|
|
572
|
+
schedule: Schedule.fixed("5 seconds").pipe(
|
|
573
|
+
Schedule.both(Schedule.recurs(24)),
|
|
574
|
+
),
|
|
575
|
+
}),
|
|
576
|
+
);
|
|
577
|
+
|
|
578
|
+
if (!created.distributionId) {
|
|
579
|
+
return yield* Effect.fail(
|
|
580
|
+
new Error("createDistribution returned no distribution"),
|
|
581
|
+
);
|
|
582
|
+
}
|
|
583
|
+
|
|
584
|
+
yield* Effect.logInfo(
|
|
585
|
+
`CloudFront Distribution create: created ${created.distributionId} etag=${created.etag ?? "missing"}, waiting for deployment`,
|
|
586
|
+
);
|
|
587
|
+
const deployed = yield* waitForDeployment(created.distributionId);
|
|
588
|
+
yield* Effect.logInfo(
|
|
589
|
+
`CloudFront Distribution create: deployed ${created.distributionId} domain=${deployed.DomainName}`,
|
|
590
|
+
);
|
|
591
|
+
yield* session.note(created.distributionId);
|
|
592
|
+
return toAttrs(deployed, created.etag, created.tags);
|
|
593
|
+
}),
|
|
594
|
+
update: Effect.fn(function* ({ id, news, olds, output, session }) {
|
|
595
|
+
yield* Effect.logInfo(
|
|
596
|
+
`CloudFront Distribution update: distribution=${output.distributionId} aliases=${news.aliases?.length ?? 0}`,
|
|
597
|
+
);
|
|
598
|
+
const current = yield* getCurrent(output.distributionId);
|
|
599
|
+
if (!current) {
|
|
600
|
+
return yield* Effect.fail(
|
|
601
|
+
new Error(
|
|
602
|
+
`CloudFront distribution '${output.distributionId}' was not found`,
|
|
603
|
+
),
|
|
604
|
+
);
|
|
605
|
+
}
|
|
606
|
+
|
|
607
|
+
yield* Effect.logInfo(
|
|
608
|
+
`CloudFront Distribution update: updating config for ${output.distributionId} with etag=${current.etag ?? "missing"}`,
|
|
609
|
+
);
|
|
610
|
+
const updated = yield* cloudfront
|
|
611
|
+
.updateDistribution({
|
|
612
|
+
Id: output.distributionId,
|
|
613
|
+
IfMatch: current.etag,
|
|
614
|
+
DistributionConfig: toConfig(
|
|
615
|
+
current.config.CallerReference,
|
|
616
|
+
news,
|
|
617
|
+
),
|
|
618
|
+
})
|
|
619
|
+
.pipe(
|
|
620
|
+
Effect.catchTag(
|
|
621
|
+
"InvalidArgument",
|
|
622
|
+
(
|
|
623
|
+
error,
|
|
624
|
+
): Effect.Effect<
|
|
625
|
+
never,
|
|
626
|
+
| cloudfront.InvalidArgument
|
|
627
|
+
| DistributionFunctionAssociationPending
|
|
628
|
+
> =>
|
|
629
|
+
isFunctionAssociationPending(error)
|
|
630
|
+
? Effect.logInfo(
|
|
631
|
+
"CloudFront Distribution update: function association not yet ready, retrying",
|
|
632
|
+
).pipe(
|
|
633
|
+
Effect.andThen(
|
|
634
|
+
Effect.fail(
|
|
635
|
+
new DistributionFunctionAssociationPending({
|
|
636
|
+
message:
|
|
637
|
+
error.Message ??
|
|
638
|
+
"CloudFront function association pending",
|
|
639
|
+
}),
|
|
640
|
+
),
|
|
641
|
+
),
|
|
642
|
+
)
|
|
643
|
+
: Effect.fail(error),
|
|
644
|
+
),
|
|
645
|
+
Effect.retry({
|
|
646
|
+
while: (error) =>
|
|
647
|
+
error instanceof DistributionFunctionAssociationPending,
|
|
648
|
+
schedule: Schedule.fixed("5 seconds").pipe(
|
|
649
|
+
Schedule.both(Schedule.recurs(24)),
|
|
650
|
+
),
|
|
651
|
+
}),
|
|
652
|
+
);
|
|
653
|
+
|
|
654
|
+
const oldTags = {
|
|
655
|
+
...(yield* createInternalTags(id)),
|
|
656
|
+
...olds.tags,
|
|
657
|
+
};
|
|
658
|
+
const newTags = {
|
|
659
|
+
...(yield* createInternalTags(id)),
|
|
660
|
+
...news.tags,
|
|
661
|
+
};
|
|
662
|
+
const { removed, upsert } = diffTags(oldTags, newTags);
|
|
663
|
+
|
|
664
|
+
yield* Effect.logInfo(
|
|
665
|
+
`CloudFront Distribution update: distribution=${output.distributionId} upsertTags=${upsert.length} removedTags=${removed.length}`,
|
|
666
|
+
);
|
|
667
|
+
|
|
668
|
+
if (upsert.length > 0) {
|
|
669
|
+
yield* Effect.logInfo(
|
|
670
|
+
`CloudFront Distribution update: tagging ${output.distributionId} with ${upsert.length} tag(s)`,
|
|
671
|
+
);
|
|
672
|
+
yield* cloudfront.tagResource({
|
|
673
|
+
Resource: output.distributionArn,
|
|
674
|
+
Tags: {
|
|
675
|
+
Items: upsert,
|
|
676
|
+
},
|
|
677
|
+
});
|
|
678
|
+
}
|
|
679
|
+
|
|
680
|
+
if (removed.length > 0) {
|
|
681
|
+
yield* Effect.logInfo(
|
|
682
|
+
`CloudFront Distribution update: removing ${removed.length} tag(s) from ${output.distributionId}`,
|
|
683
|
+
);
|
|
684
|
+
yield* cloudfront.untagResource({
|
|
685
|
+
Resource: output.distributionArn,
|
|
686
|
+
TagKeys: {
|
|
687
|
+
Items: removed,
|
|
688
|
+
},
|
|
689
|
+
});
|
|
690
|
+
}
|
|
691
|
+
|
|
692
|
+
if (!updated.Distribution?.Id) {
|
|
693
|
+
return yield* Effect.fail(
|
|
694
|
+
new Error("updateDistribution returned no distribution"),
|
|
695
|
+
);
|
|
696
|
+
}
|
|
697
|
+
|
|
698
|
+
yield* Effect.logInfo(
|
|
699
|
+
`CloudFront Distribution update: updated ${output.distributionId} etag=${updated.ETag ?? "missing"}, waiting for deployment`,
|
|
700
|
+
);
|
|
701
|
+
const deployed = yield* waitForDeployment(updated.Distribution.Id);
|
|
702
|
+
yield* Effect.logInfo(
|
|
703
|
+
`CloudFront Distribution update: deployed ${output.distributionId} domain=${deployed.DomainName}`,
|
|
704
|
+
);
|
|
705
|
+
yield* session.note(output.distributionId);
|
|
706
|
+
return toAttrs(deployed, updated.ETag, newTags);
|
|
707
|
+
}),
|
|
708
|
+
delete: Effect.fn(function* ({ output }) {
|
|
709
|
+
yield* Effect.logInfo(
|
|
710
|
+
`CloudFront Distribution delete: distribution=${output.distributionId}`,
|
|
711
|
+
);
|
|
712
|
+
const current = yield* getCurrent(output.distributionId);
|
|
713
|
+
if (!current) {
|
|
714
|
+
yield* Effect.logInfo(
|
|
715
|
+
`CloudFront Distribution delete: ${output.distributionId} already absent`,
|
|
716
|
+
);
|
|
717
|
+
return;
|
|
718
|
+
}
|
|
719
|
+
|
|
720
|
+
if (current.config.Enabled) {
|
|
721
|
+
yield* Effect.logInfo(
|
|
722
|
+
`CloudFront Distribution delete: disabling ${output.distributionId} before delete`,
|
|
723
|
+
);
|
|
724
|
+
yield* cloudfront.updateDistribution({
|
|
725
|
+
Id: output.distributionId,
|
|
726
|
+
IfMatch: current.etag,
|
|
727
|
+
DistributionConfig: {
|
|
728
|
+
...current.config,
|
|
729
|
+
Enabled: false,
|
|
730
|
+
},
|
|
731
|
+
});
|
|
732
|
+
}
|
|
733
|
+
|
|
734
|
+
const latest = yield* waitForDeletionReady(output.distributionId);
|
|
735
|
+
if (!latest) {
|
|
736
|
+
yield* Effect.logInfo(
|
|
737
|
+
`CloudFront Distribution delete: ${output.distributionId} disappeared before delete`,
|
|
738
|
+
);
|
|
739
|
+
return;
|
|
740
|
+
}
|
|
741
|
+
|
|
742
|
+
yield* Effect.logInfo(
|
|
743
|
+
`CloudFront Distribution delete: deleting ${output.distributionId} with etag=${latest.etag ?? "missing"}`,
|
|
744
|
+
);
|
|
745
|
+
yield* cloudfront
|
|
746
|
+
.deleteDistribution({
|
|
747
|
+
Id: output.distributionId,
|
|
748
|
+
IfMatch: latest.etag,
|
|
749
|
+
})
|
|
750
|
+
.pipe(Effect.catchTag("NoSuchDistribution", () => Effect.void));
|
|
751
|
+
}),
|
|
752
|
+
};
|
|
753
|
+
}),
|
|
754
|
+
);
|
|
755
|
+
|
|
756
|
+
const toTagsRecord = (tags: cloudfront.Tag[] | undefined) =>
|
|
757
|
+
Object.fromEntries(
|
|
758
|
+
(tags ?? [])
|
|
759
|
+
.filter(
|
|
760
|
+
(tag): tag is { Key: string; Value: string } =>
|
|
761
|
+
typeof tag.Key === "string" && typeof tag.Value === "string",
|
|
762
|
+
)
|
|
763
|
+
.map((tag) => [tag.Key, tag.Value]),
|
|
764
|
+
);
|
|
765
|
+
|
|
766
|
+
const isAccessDenied = (error: unknown) => {
|
|
767
|
+
const tag = (error as { _tag?: string; name?: string })?._tag;
|
|
768
|
+
const name = (error as { _tag?: string; name?: string })?.name;
|
|
769
|
+
const text = String(error);
|
|
770
|
+
return (
|
|
771
|
+
tag === "AccessDenied" ||
|
|
772
|
+
tag === "AccessDeniedException" ||
|
|
773
|
+
name === "AccessDenied" ||
|
|
774
|
+
name === "AccessDeniedException" ||
|
|
775
|
+
text.includes("AccessDenied")
|
|
776
|
+
);
|
|
777
|
+
};
|
|
778
|
+
|
|
779
|
+
const toBehavior = (
|
|
780
|
+
behavior: DistributionBehavior & {
|
|
781
|
+
pathPattern?: string;
|
|
782
|
+
},
|
|
783
|
+
): cloudfront.CacheBehavior | cloudfront.DefaultCacheBehavior => ({
|
|
784
|
+
...(behavior.pathPattern ? { PathPattern: behavior.pathPattern } : undefined),
|
|
785
|
+
TargetOriginId: behavior.targetOriginId,
|
|
786
|
+
ViewerProtocolPolicy: behavior.viewerProtocolPolicy ?? "redirect-to-https",
|
|
787
|
+
AllowedMethods: behavior.allowedMethods
|
|
788
|
+
? {
|
|
789
|
+
Quantity: behavior.allowedMethods.length,
|
|
790
|
+
Items: behavior.allowedMethods,
|
|
791
|
+
CachedMethods: behavior.cachedMethods
|
|
792
|
+
? {
|
|
793
|
+
Quantity: behavior.cachedMethods.length,
|
|
794
|
+
Items: behavior.cachedMethods,
|
|
795
|
+
}
|
|
796
|
+
: undefined,
|
|
797
|
+
}
|
|
798
|
+
: undefined,
|
|
799
|
+
Compress: behavior.compress ?? true,
|
|
800
|
+
CachePolicyId: behavior.cachePolicyId,
|
|
801
|
+
OriginRequestPolicyId: behavior.originRequestPolicyId,
|
|
802
|
+
ResponseHeadersPolicyId: behavior.responseHeadersPolicyId,
|
|
803
|
+
ForwardedValues: behavior.forwardedValues,
|
|
804
|
+
MinTTL: behavior.minTtl,
|
|
805
|
+
DefaultTTL: behavior.defaultTtl,
|
|
806
|
+
MaxTTL: behavior.maxTtl,
|
|
807
|
+
FunctionAssociations: behavior.functionAssociations
|
|
808
|
+
? {
|
|
809
|
+
Quantity: behavior.functionAssociations.length,
|
|
810
|
+
Items: behavior.functionAssociations.map((association) => ({
|
|
811
|
+
FunctionARN: association.functionArn,
|
|
812
|
+
EventType: association.eventType,
|
|
813
|
+
})),
|
|
814
|
+
}
|
|
815
|
+
: undefined,
|
|
816
|
+
LambdaFunctionAssociations: behavior.lambdaFunctionAssociations
|
|
817
|
+
? {
|
|
818
|
+
Quantity: behavior.lambdaFunctionAssociations.length,
|
|
819
|
+
Items: behavior.lambdaFunctionAssociations.map((association) => ({
|
|
820
|
+
LambdaFunctionARN: association.lambdaFunctionArn,
|
|
821
|
+
EventType: association.eventType,
|
|
822
|
+
IncludeBody: association.includeBody,
|
|
823
|
+
})),
|
|
824
|
+
}
|
|
825
|
+
: undefined,
|
|
826
|
+
});
|
|
827
|
+
|
|
828
|
+
const toOrigin = (origin: DistributionOrigin): cloudfront.Origin => ({
|
|
829
|
+
Id: origin.id,
|
|
830
|
+
DomainName: origin.domainName as string,
|
|
831
|
+
OriginPath: origin.originPath as string | undefined,
|
|
832
|
+
OriginAccessControlId: origin.originAccessControlId as string | undefined,
|
|
833
|
+
S3OriginConfig: origin.s3Origin ? { OriginAccessIdentity: "" } : undefined,
|
|
834
|
+
CustomOriginConfig: origin.s3Origin
|
|
835
|
+
? undefined
|
|
836
|
+
: {
|
|
837
|
+
HTTPPort: origin.customOriginConfig?.httpPort ?? 80,
|
|
838
|
+
HTTPSPort: origin.customOriginConfig?.httpsPort ?? 443,
|
|
839
|
+
OriginProtocolPolicy:
|
|
840
|
+
origin.customOriginConfig?.originProtocolPolicy ?? "https-only",
|
|
841
|
+
OriginSslProtocols: {
|
|
842
|
+
Quantity: (
|
|
843
|
+
origin.customOriginConfig?.originSslProtocols ?? ["TLSv1.2"]
|
|
844
|
+
).length,
|
|
845
|
+
Items: origin.customOriginConfig?.originSslProtocols ?? ["TLSv1.2"],
|
|
846
|
+
},
|
|
847
|
+
OriginReadTimeout: origin.customOriginConfig?.originReadTimeout,
|
|
848
|
+
OriginKeepaliveTimeout:
|
|
849
|
+
origin.customOriginConfig?.originKeepaliveTimeout,
|
|
850
|
+
},
|
|
851
|
+
});
|
|
852
|
+
|
|
853
|
+
const toConfig = (
|
|
854
|
+
callerReference: string,
|
|
855
|
+
props: DistributionProps,
|
|
856
|
+
): cloudfront.DistributionConfig => ({
|
|
857
|
+
CallerReference: callerReference,
|
|
858
|
+
Aliases: props.aliases
|
|
859
|
+
? {
|
|
860
|
+
Quantity: props.aliases.length,
|
|
861
|
+
Items: props.aliases,
|
|
862
|
+
}
|
|
863
|
+
: undefined,
|
|
864
|
+
DefaultRootObject: props.defaultRootObject,
|
|
865
|
+
Origins: {
|
|
866
|
+
Quantity: (props.origins as DistributionOrigin[]).length,
|
|
867
|
+
Items: (props.origins as DistributionOrigin[]).map(toOrigin),
|
|
868
|
+
},
|
|
869
|
+
DefaultCacheBehavior: toBehavior(
|
|
870
|
+
props.defaultCacheBehavior as DistributionBehavior,
|
|
871
|
+
) as cloudfront.DefaultCacheBehavior,
|
|
872
|
+
CacheBehaviors: props.orderedCacheBehaviors
|
|
873
|
+
? {
|
|
874
|
+
Quantity: (
|
|
875
|
+
props.orderedCacheBehaviors as Array<
|
|
876
|
+
DistributionBehavior & { pathPattern: string }
|
|
877
|
+
>
|
|
878
|
+
).length,
|
|
879
|
+
Items: (
|
|
880
|
+
props.orderedCacheBehaviors as Array<
|
|
881
|
+
DistributionBehavior & { pathPattern: string }
|
|
882
|
+
>
|
|
883
|
+
).map((behavior) =>
|
|
884
|
+
toBehavior(
|
|
885
|
+
behavior as DistributionBehavior & { pathPattern: string },
|
|
886
|
+
),
|
|
887
|
+
) as cloudfront.CacheBehavior[],
|
|
888
|
+
}
|
|
889
|
+
: undefined,
|
|
890
|
+
CustomErrorResponses: props.customErrorResponses
|
|
891
|
+
? {
|
|
892
|
+
Quantity: (
|
|
893
|
+
props.customErrorResponses as cloudfront.CustomErrorResponse[]
|
|
894
|
+
).length,
|
|
895
|
+
Items: props.customErrorResponses as cloudfront.CustomErrorResponse[],
|
|
896
|
+
}
|
|
897
|
+
: undefined,
|
|
898
|
+
Comment: props.comment ?? "",
|
|
899
|
+
Enabled: props.enabled ?? true,
|
|
900
|
+
ViewerCertificate: props.viewerCertificate
|
|
901
|
+
? {
|
|
902
|
+
CloudFrontDefaultCertificate: (
|
|
903
|
+
props.viewerCertificate as DistributionViewerCertificate
|
|
904
|
+
).cloudFrontDefaultCertificate,
|
|
905
|
+
ACMCertificateArn: (
|
|
906
|
+
props.viewerCertificate as DistributionViewerCertificate
|
|
907
|
+
).acmCertificateArn,
|
|
908
|
+
SSLSupportMethod: (
|
|
909
|
+
props.viewerCertificate as DistributionViewerCertificate
|
|
910
|
+
).sslSupportMethod,
|
|
911
|
+
MinimumProtocolVersion: (
|
|
912
|
+
props.viewerCertificate as DistributionViewerCertificate
|
|
913
|
+
).minimumProtocolVersion,
|
|
914
|
+
}
|
|
915
|
+
: props.aliases && props.aliases.length > 0
|
|
916
|
+
? undefined
|
|
917
|
+
: {
|
|
918
|
+
CloudFrontDefaultCertificate: true,
|
|
919
|
+
},
|
|
920
|
+
Restrictions: {
|
|
921
|
+
GeoRestriction: {
|
|
922
|
+
RestrictionType: "none",
|
|
923
|
+
Quantity: 0,
|
|
924
|
+
},
|
|
925
|
+
},
|
|
926
|
+
PriceClass: props.priceClass,
|
|
927
|
+
WebACLId: props.webAclId,
|
|
928
|
+
HttpVersion: props.httpVersion ?? "http2",
|
|
929
|
+
IsIPV6Enabled: props.isIpv6Enabled ?? true,
|
|
930
|
+
});
|
|
931
|
+
|
|
932
|
+
const toAttrs = (
|
|
933
|
+
distribution: cloudfront.Distribution,
|
|
934
|
+
etag: string | undefined,
|
|
935
|
+
tags: Record<string, string>,
|
|
936
|
+
): Distribution["Attributes"] => ({
|
|
937
|
+
distributionId: distribution.Id,
|
|
938
|
+
distributionArn: distribution.ARN,
|
|
939
|
+
domainName: distribution.DomainName,
|
|
940
|
+
hostedZoneId: CLOUDFRONT_HOSTED_ZONE_ID,
|
|
941
|
+
status: distribution.Status,
|
|
942
|
+
aliases: distribution.DistributionConfig.Aliases?.Items ?? [],
|
|
943
|
+
comment:
|
|
944
|
+
typeof distribution.DistributionConfig.Comment === "string"
|
|
945
|
+
? distribution.DistributionConfig.Comment
|
|
946
|
+
: "",
|
|
947
|
+
enabled: distribution.DistributionConfig.Enabled,
|
|
948
|
+
etag,
|
|
949
|
+
inProgressInvalidationBatches: distribution.InProgressInvalidationBatches,
|
|
950
|
+
lastModifiedTime: distribution.LastModifiedTime,
|
|
951
|
+
tags,
|
|
952
|
+
});
|