alchemy 2.0.0-beta.61 → 2.0.0-beta.62
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +15 -0
- package/bin/exec.js +71 -12
- package/bin/exec.js.map +1 -1
- package/lib/AWS/ACM/Certificate.d.ts.map +1 -1
- package/lib/AWS/ACM/Certificate.js +16 -4
- package/lib/AWS/ACM/Certificate.js.map +1 -1
- package/lib/AWS/ApiGateway/common.d.ts.map +1 -1
- package/lib/AWS/ApiGateway/common.js +6 -3
- package/lib/AWS/ApiGateway/common.js.map +1 -1
- package/lib/AWS/AuthProvider.d.ts.map +1 -1
- package/lib/AWS/AuthProvider.js +1 -1
- package/lib/AWS/AuthProvider.js.map +1 -1
- package/lib/AWS/AutoScaling/AutoScalingGroup.d.ts.map +1 -1
- package/lib/AWS/AutoScaling/AutoScalingGroup.js +8 -2
- package/lib/AWS/AutoScaling/AutoScalingGroup.js.map +1 -1
- package/lib/AWS/Bootstrap.d.ts.map +1 -1
- package/lib/AWS/Bootstrap.js +5 -2
- package/lib/AWS/Bootstrap.js.map +1 -1
- package/lib/AWS/CloudFront/Distribution.d.ts.map +1 -1
- package/lib/AWS/CloudFront/Distribution.js +20 -5
- package/lib/AWS/CloudFront/Distribution.js.map +1 -1
- package/lib/AWS/CloudFront/Function.js +5 -2
- package/lib/AWS/CloudFront/Function.js.map +1 -1
- package/lib/AWS/CloudFront/Invalidation.d.ts.map +1 -1
- package/lib/AWS/CloudFront/Invalidation.js +4 -1
- package/lib/AWS/CloudFront/Invalidation.js.map +1 -1
- package/lib/AWS/CloudFront/KvEntries.d.ts.map +1 -1
- package/lib/AWS/CloudFront/KvEntries.js +4 -1
- package/lib/AWS/CloudFront/KvEntries.js.map +1 -1
- package/lib/AWS/CloudFront/KvRoutesUpdate.d.ts.map +1 -1
- package/lib/AWS/CloudFront/KvRoutesUpdate.js +8 -2
- package/lib/AWS/CloudFront/KvRoutesUpdate.js.map +1 -1
- package/lib/AWS/CloudFront/VpcOrigin.d.ts.map +1 -1
- package/lib/AWS/CloudFront/VpcOrigin.js +12 -3
- package/lib/AWS/CloudFront/VpcOrigin.js.map +1 -1
- package/lib/AWS/CloudFront/common.d.ts.map +1 -1
- package/lib/AWS/CloudFront/common.js +5 -2
- package/lib/AWS/CloudFront/common.js.map +1 -1
- package/lib/AWS/CloudWatch/AnomalyDetector.d.ts.map +1 -1
- package/lib/AWS/CloudWatch/AnomalyDetector.js +4 -1
- package/lib/AWS/CloudWatch/AnomalyDetector.js.map +1 -1
- package/lib/AWS/CloudWatch/common.d.ts.map +1 -1
- package/lib/AWS/CloudWatch/common.js +1 -1
- package/lib/AWS/CloudWatch/common.js.map +1 -1
- package/lib/AWS/DynamoDB/Table.d.ts.map +1 -1
- package/lib/AWS/DynamoDB/Table.js +53 -20
- package/lib/AWS/DynamoDB/Table.js.map +1 -1
- package/lib/AWS/EC2/EIP.d.ts.map +1 -1
- package/lib/AWS/EC2/EIP.js +4 -1
- package/lib/AWS/EC2/EIP.js.map +1 -1
- package/lib/AWS/EC2/EgressOnlyInternetGateway.d.ts.map +1 -1
- package/lib/AWS/EC2/EgressOnlyInternetGateway.js +4 -2
- package/lib/AWS/EC2/EgressOnlyInternetGateway.js.map +1 -1
- package/lib/AWS/EC2/Instance.d.ts.map +1 -1
- package/lib/AWS/EC2/Instance.js +12 -3
- package/lib/AWS/EC2/Instance.js.map +1 -1
- package/lib/AWS/EC2/InternetGateway.d.ts.map +1 -1
- package/lib/AWS/EC2/InternetGateway.js +12 -5
- package/lib/AWS/EC2/InternetGateway.js.map +1 -1
- package/lib/AWS/EC2/NatGateway.js +2 -4
- package/lib/AWS/EC2/NatGateway.js.map +1 -1
- package/lib/AWS/EC2/NetworkAcl.d.ts.map +1 -1
- package/lib/AWS/EC2/NetworkAcl.js +4 -1
- package/lib/AWS/EC2/NetworkAcl.js.map +1 -1
- package/lib/AWS/EC2/NetworkAclEntry.d.ts.map +1 -1
- package/lib/AWS/EC2/NetworkAclEntry.js +4 -1
- package/lib/AWS/EC2/NetworkAclEntry.js.map +1 -1
- package/lib/AWS/EC2/RouteTable.d.ts.map +1 -1
- package/lib/AWS/EC2/RouteTable.js +8 -6
- package/lib/AWS/EC2/RouteTable.js.map +1 -1
- package/lib/AWS/EC2/RouteTableAssociation.js +2 -5
- package/lib/AWS/EC2/RouteTableAssociation.js.map +1 -1
- package/lib/AWS/EC2/SecurityGroup.d.ts.map +1 -1
- package/lib/AWS/EC2/SecurityGroup.js +8 -3
- package/lib/AWS/EC2/SecurityGroup.js.map +1 -1
- package/lib/AWS/EC2/Subnet.d.ts.map +1 -1
- package/lib/AWS/EC2/Subnet.js +10 -6
- package/lib/AWS/EC2/Subnet.js.map +1 -1
- package/lib/AWS/EC2/Vpc.d.ts.map +1 -1
- package/lib/AWS/EC2/Vpc.js +7 -7
- package/lib/AWS/EC2/Vpc.js.map +1 -1
- package/lib/AWS/EC2/VpcEndpoint.js +2 -4
- package/lib/AWS/EC2/VpcEndpoint.js.map +1 -1
- package/lib/AWS/ECS/Service.d.ts.map +1 -1
- package/lib/AWS/ECS/Service.js +4 -1
- package/lib/AWS/ECS/Service.js.map +1 -1
- package/lib/AWS/EKS/Addon.js +8 -2
- package/lib/AWS/EKS/Addon.js.map +1 -1
- package/lib/AWS/EKS/Cluster.d.ts.map +1 -1
- package/lib/AWS/EKS/Cluster.js +4 -1
- package/lib/AWS/EKS/Cluster.js.map +1 -1
- package/lib/AWS/ELBv2/TargetGroup.d.ts.map +1 -1
- package/lib/AWS/ELBv2/TargetGroup.js +4 -1
- package/lib/AWS/ELBv2/TargetGroup.js.map +1 -1
- package/lib/AWS/ELBv2/TrustStore.d.ts.map +1 -1
- package/lib/AWS/ELBv2/TrustStore.js +4 -1
- package/lib/AWS/ELBv2/TrustStore.js.map +1 -1
- package/lib/AWS/IAM/SAMLProvider.js +4 -1
- package/lib/AWS/IAM/SAMLProvider.js.map +1 -1
- package/lib/AWS/IdentityCenter/AccountAssignment.js +8 -2
- package/lib/AWS/IdentityCenter/AccountAssignment.js.map +1 -1
- package/lib/AWS/IdentityCenter/common.d.ts.map +1 -1
- package/lib/AWS/IdentityCenter/common.js +1 -1
- package/lib/AWS/IdentityCenter/common.js.map +1 -1
- package/lib/AWS/KMS/Alias.js +4 -1
- package/lib/AWS/KMS/Alias.js.map +1 -1
- package/lib/AWS/KMS/Key.js +4 -1
- package/lib/AWS/KMS/Key.js.map +1 -1
- 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/Kinesis/StreamConsumer.d.ts.map +1 -1
- package/lib/AWS/Kinesis/StreamConsumer.js +7 -4
- package/lib/AWS/Kinesis/StreamConsumer.js.map +1 -1
- package/lib/AWS/Lambda/Alias.d.ts.map +1 -1
- package/lib/AWS/Lambda/Alias.js +4 -1
- package/lib/AWS/Lambda/Alias.js.map +1 -1
- package/lib/AWS/Lambda/EventInvokeConfig.d.ts.map +1 -1
- package/lib/AWS/Lambda/EventInvokeConfig.js +2 -2
- package/lib/AWS/Lambda/EventInvokeConfig.js.map +1 -1
- package/lib/AWS/Lambda/EventSourceMapping.d.ts.map +1 -1
- package/lib/AWS/Lambda/EventSourceMapping.js +10 -4
- package/lib/AWS/Lambda/EventSourceMapping.js.map +1 -1
- package/lib/AWS/Lambda/Function.d.ts +16 -1
- package/lib/AWS/Lambda/Function.d.ts.map +1 -1
- package/lib/AWS/Lambda/Function.js +101 -26
- package/lib/AWS/Lambda/Function.js.map +1 -1
- package/lib/AWS/Lambda/MicrovmProvider.d.ts.map +1 -1
- package/lib/AWS/Lambda/MicrovmProvider.js +13 -5
- package/lib/AWS/Lambda/MicrovmProvider.js.map +1 -1
- package/lib/AWS/Lambda/NetworkConnector.js +13 -5
- package/lib/AWS/Lambda/NetworkConnector.js.map +1 -1
- package/lib/AWS/Lambda/RuntimeExtension.d.ts +27 -0
- package/lib/AWS/Lambda/RuntimeExtension.d.ts.map +1 -0
- package/lib/AWS/Lambda/RuntimeExtension.js +49 -0
- package/lib/AWS/Lambda/RuntimeExtension.js.map +1 -0
- package/lib/AWS/Organizations/Account.js +5 -2
- package/lib/AWS/Organizations/Account.js.map +1 -1
- package/lib/AWS/Organizations/common.d.ts.map +1 -1
- package/lib/AWS/Organizations/common.js +1 -1
- package/lib/AWS/Organizations/common.js.map +1 -1
- package/lib/AWS/Providers.js +14 -12
- package/lib/AWS/Providers.js.map +1 -1
- package/lib/AWS/RDS/DBCluster.d.ts.map +1 -1
- package/lib/AWS/RDS/DBCluster.js +8 -2
- package/lib/AWS/RDS/DBCluster.js.map +1 -1
- package/lib/AWS/RDS/DBInstance.d.ts.map +1 -1
- package/lib/AWS/RDS/DBInstance.js +8 -2
- package/lib/AWS/RDS/DBInstance.js.map +1 -1
- package/lib/AWS/RDS/DBProxy.d.ts.map +1 -1
- package/lib/AWS/RDS/DBProxy.js +4 -1
- package/lib/AWS/RDS/DBProxy.js.map +1 -1
- package/lib/AWS/RDS/DBProxyEndpoint.d.ts.map +1 -1
- package/lib/AWS/RDS/DBProxyEndpoint.js +4 -1
- package/lib/AWS/RDS/DBProxyEndpoint.js.map +1 -1
- package/lib/AWS/Route53/HealthCheck.d.ts.map +1 -1
- package/lib/AWS/Route53/HealthCheck.js +8 -2
- package/lib/AWS/Route53/HealthCheck.js.map +1 -1
- package/lib/AWS/Route53/HostedZone.d.ts.map +1 -1
- package/lib/AWS/Route53/HostedZone.js +8 -2
- package/lib/AWS/Route53/HostedZone.js.map +1 -1
- package/lib/AWS/Route53/Record.d.ts.map +1 -1
- package/lib/AWS/Route53/Record.js +4 -1
- package/lib/AWS/Route53/Record.js.map +1 -1
- package/lib/AWS/S3/Bucket.d.ts.map +1 -1
- package/lib/AWS/S3/Bucket.js +5 -2
- package/lib/AWS/S3/Bucket.js.map +1 -1
- package/lib/AWS/SQS/Queue.d.ts.map +1 -1
- package/lib/AWS/SQS/Queue.js +25 -7
- package/lib/AWS/SQS/Queue.js.map +1 -1
- package/lib/AWS/StateStore/State.js +5 -2
- package/lib/AWS/StateStore/State.js.map +1 -1
- package/lib/AWS/Website/AssetDeployment.js +5 -2
- package/lib/AWS/Website/AssetDeployment.js.map +1 -1
- package/lib/Apply.js +8 -0
- package/lib/Apply.js.map +1 -1
- package/lib/Auth/AuthProvider.d.ts +10 -0
- package/lib/Auth/AuthProvider.d.ts.map +1 -1
- package/lib/Auth/AuthProvider.js +10 -0
- package/lib/Auth/AuthProvider.js.map +1 -1
- package/lib/Axiom/AuthProvider.d.ts.map +1 -1
- package/lib/Axiom/AuthProvider.js +1 -1
- package/lib/Axiom/AuthProvider.js.map +1 -1
- package/lib/Bundle/Vite.d.ts +1 -1
- package/lib/Bundle/Vite.d.ts.map +1 -1
- package/lib/Bundle/Vite.js +14 -12
- package/lib/Bundle/Vite.js.map +1 -1
- package/lib/Cli/commands/_shared.d.ts +55 -5
- package/lib/Cli/commands/_shared.d.ts.map +1 -1
- package/lib/Cli/commands/_shared.js +62 -2
- package/lib/Cli/commands/_shared.js.map +1 -1
- package/lib/Cli/commands/login.d.ts.map +1 -1
- package/lib/Cli/commands/login.js +9 -20
- package/lib/Cli/commands/login.js.map +1 -1
- package/lib/Cli/commands/logs.d.ts.map +1 -1
- package/lib/Cli/commands/logs.js +1 -0
- package/lib/Cli/commands/logs.js.map +1 -1
- package/lib/Cli/commands/nuke.d.ts.map +1 -1
- package/lib/Cli/commands/nuke.js +15 -24
- package/lib/Cli/commands/nuke.js.map +1 -1
- package/lib/Cli/commands/profile.d.ts +23 -1
- package/lib/Cli/commands/profile.d.ts.map +1 -1
- package/lib/Cli/commands/profile.js +47 -10
- package/lib/Cli/commands/profile.js.map +1 -1
- package/lib/Cli/commands/tail.d.ts.map +1 -1
- package/lib/Cli/commands/tail.js +1 -0
- package/lib/Cli/commands/tail.js.map +1 -1
- package/lib/Cloudflare/AI/GatewayDynamicRouting.d.ts.map +1 -1
- package/lib/Cloudflare/AI/GatewayDynamicRouting.js +31 -2
- package/lib/Cloudflare/AI/GatewayDynamicRouting.js.map +1 -1
- package/lib/Cloudflare/AI/SearchInstance.js +4 -1
- package/lib/Cloudflare/AI/SearchInstance.js.map +1 -1
- package/lib/Cloudflare/Access/Application.d.ts.map +1 -1
- package/lib/Cloudflare/Access/Application.js +7 -1
- package/lib/Cloudflare/Access/Application.js.map +1 -1
- package/lib/Cloudflare/Alerting/Silence.d.ts.map +1 -1
- package/lib/Cloudflare/Alerting/Silence.js +4 -1
- package/lib/Cloudflare/Alerting/Silence.js.map +1 -1
- package/lib/Cloudflare/Alerting/Webhook.d.ts.map +1 -1
- package/lib/Cloudflare/Alerting/Webhook.js +8 -2
- package/lib/Cloudflare/Alerting/Webhook.js.map +1 -1
- package/lib/Cloudflare/Auth/AuthProvider.d.ts.map +1 -1
- package/lib/Cloudflare/Auth/AuthProvider.js +22 -7
- package/lib/Cloudflare/Auth/AuthProvider.js.map +1 -1
- package/lib/Cloudflare/Auth/OAuthClient.d.ts.map +1 -1
- package/lib/Cloudflare/Auth/OAuthClient.js +6 -7
- package/lib/Cloudflare/Auth/OAuthClient.js.map +1 -1
- package/lib/Cloudflare/Cache/RegionalTieredCache.d.ts.map +1 -1
- package/lib/Cloudflare/Cache/RegionalTieredCache.js +7 -1
- package/lib/Cloudflare/Cache/RegionalTieredCache.js.map +1 -1
- package/lib/Cloudflare/Containers/ContainerApplication.d.ts +18 -2
- package/lib/Cloudflare/Containers/ContainerApplication.d.ts.map +1 -1
- package/lib/Cloudflare/Containers/ContainerApplication.js +1 -0
- package/lib/Cloudflare/Containers/ContainerApplication.js.map +1 -1
- package/lib/Cloudflare/Containers/ContainerBundle.d.ts +29 -3
- package/lib/Cloudflare/Containers/ContainerBundle.d.ts.map +1 -1
- package/lib/Cloudflare/Containers/ContainerBundle.js +73 -22
- package/lib/Cloudflare/Containers/ContainerBundle.js.map +1 -1
- package/lib/Cloudflare/Containers/ContainerProvider.d.ts.map +1 -1
- package/lib/Cloudflare/Containers/ContainerProvider.js +53 -14
- package/lib/Cloudflare/Containers/ContainerProvider.js.map +1 -1
- package/lib/Cloudflare/Containers/LocalContainerProvider.d.ts +6 -6
- package/lib/Cloudflare/Containers/LocalContainerProvider.d.ts.map +1 -1
- package/lib/Cloudflare/Containers/LocalContainerProvider.js +69 -47
- package/lib/Cloudflare/Containers/LocalContainerProvider.js.map +1 -1
- package/lib/Cloudflare/Diagnostics/EndpointHealthcheck.js +4 -1
- package/lib/Cloudflare/Diagnostics/EndpointHealthcheck.js.map +1 -1
- package/lib/Cloudflare/Images/Variant.d.ts.map +1 -1
- package/lib/Cloudflare/Images/Variant.js +4 -1
- package/lib/Cloudflare/Images/Variant.js.map +1 -1
- package/lib/Cloudflare/LoadBalancer/Monitor.d.ts.map +1 -1
- package/lib/Cloudflare/LoadBalancer/Monitor.js +4 -1
- package/lib/Cloudflare/LoadBalancer/Monitor.js.map +1 -1
- package/lib/Cloudflare/LoadBalancer/MonitorGroup.d.ts.map +1 -1
- package/lib/Cloudflare/LoadBalancer/MonitorGroup.js +4 -1
- package/lib/Cloudflare/LoadBalancer/MonitorGroup.js.map +1 -1
- package/lib/Cloudflare/LoadBalancer/Pool.d.ts.map +1 -1
- package/lib/Cloudflare/LoadBalancer/Pool.js +4 -1
- package/lib/Cloudflare/LoadBalancer/Pool.js.map +1 -1
- package/lib/Cloudflare/LocalRuntime.d.ts +14 -0
- package/lib/Cloudflare/LocalRuntime.d.ts.map +1 -1
- package/lib/Cloudflare/LocalRuntime.js +1 -0
- package/lib/Cloudflare/LocalRuntime.js.map +1 -1
- package/lib/Cloudflare/MagicNetworkMonitoring/Rule.d.ts.map +1 -1
- package/lib/Cloudflare/MagicNetworkMonitoring/Rule.js +4 -1
- package/lib/Cloudflare/MagicNetworkMonitoring/Rule.js.map +1 -1
- package/lib/Cloudflare/Pipelines/Pipeline.d.ts.map +1 -1
- package/lib/Cloudflare/Pipelines/Pipeline.js +8 -2
- package/lib/Cloudflare/Pipelines/Pipeline.js.map +1 -1
- package/lib/Cloudflare/Pipelines/Sink.d.ts.map +1 -1
- package/lib/Cloudflare/Pipelines/Sink.js +8 -2
- package/lib/Cloudflare/Pipelines/Sink.js.map +1 -1
- package/lib/Cloudflare/Pipelines/Stream.d.ts.map +1 -1
- package/lib/Cloudflare/Pipelines/Stream.js +4 -1
- package/lib/Cloudflare/Pipelines/Stream.js.map +1 -1
- package/lib/Cloudflare/Providers.js +14 -11
- package/lib/Cloudflare/Providers.js.map +1 -1
- package/lib/Cloudflare/Queues/Consumer.d.ts.map +1 -1
- package/lib/Cloudflare/Queues/Consumer.js +30 -3
- package/lib/Cloudflare/Queues/Consumer.js.map +1 -1
- package/lib/Cloudflare/Queues/Queue.d.ts.map +1 -1
- package/lib/Cloudflare/Queues/Queue.js +4 -1
- package/lib/Cloudflare/Queues/Queue.js.map +1 -1
- package/lib/Cloudflare/R2/Bucket.js +12 -3
- package/lib/Cloudflare/R2/Bucket.js.map +1 -1
- package/lib/Cloudflare/R2/BucketEventNotification.js +4 -1
- package/lib/Cloudflare/R2/BucketEventNotification.js.map +1 -1
- package/lib/Cloudflare/R2/DataCatalog.js +4 -1
- package/lib/Cloudflare/R2/DataCatalog.js.map +1 -1
- package/lib/Cloudflare/Rum/Rule.d.ts.map +1 -1
- package/lib/Cloudflare/Rum/Rule.js +4 -1
- package/lib/Cloudflare/Rum/Rule.js.map +1 -1
- package/lib/Cloudflare/Snippets/Snippet.d.ts.map +1 -1
- package/lib/Cloudflare/Snippets/Snippet.js +4 -1
- package/lib/Cloudflare/Snippets/Snippet.js.map +1 -1
- package/lib/Cloudflare/StateStore/CredentialsFile.d.ts +42 -0
- package/lib/Cloudflare/StateStore/CredentialsFile.d.ts.map +1 -0
- package/lib/Cloudflare/StateStore/CredentialsFile.js +23 -0
- package/lib/Cloudflare/StateStore/CredentialsFile.js.map +1 -0
- package/lib/Cloudflare/StateStore/State.d.ts +2 -2
- package/lib/Cloudflare/StateStore/State.d.ts.map +1 -1
- package/lib/Cloudflare/StateStore/State.js +46 -9
- package/lib/Cloudflare/StateStore/State.js.map +1 -1
- package/lib/Cloudflare/Tags/ZoneResourceTags.d.ts.map +1 -1
- package/lib/Cloudflare/Tags/ZoneResourceTags.js +4 -1
- package/lib/Cloudflare/Tags/ZoneResourceTags.js.map +1 -1
- package/lib/Cloudflare/UrlNormalization/UrlNormalization.d.ts.map +1 -1
- package/lib/Cloudflare/UrlNormalization/UrlNormalization.js +7 -1
- package/lib/Cloudflare/UrlNormalization/UrlNormalization.js.map +1 -1
- package/lib/Cloudflare/WaitingRoom/Settings.d.ts.map +1 -1
- package/lib/Cloudflare/WaitingRoom/Settings.js +7 -1
- package/lib/Cloudflare/WaitingRoom/Settings.js.map +1 -1
- package/lib/Cloudflare/Website/Vite.d.ts +19 -0
- package/lib/Cloudflare/Website/Vite.d.ts.map +1 -1
- package/lib/Cloudflare/Website/Vite.js +20 -0
- package/lib/Cloudflare/Website/Vite.js.map +1 -1
- package/lib/Cloudflare/Workers/Compatibility.d.ts.map +1 -1
- package/lib/Cloudflare/Workers/Compatibility.js +43 -7
- package/lib/Cloudflare/Workers/Compatibility.js.map +1 -1
- package/lib/Cloudflare/Workers/CronEventSource.d.ts +3 -2
- package/lib/Cloudflare/Workers/CronEventSource.d.ts.map +1 -1
- package/lib/Cloudflare/Workers/CronEventSource.js.map +1 -1
- package/lib/Cloudflare/Workers/DurableObjectBridge.d.ts.map +1 -1
- package/lib/Cloudflare/Workers/DurableObjectBridge.js +86 -82
- package/lib/Cloudflare/Workers/DurableObjectBridge.js.map +1 -1
- package/lib/Cloudflare/Workers/HttpServer.d.ts +1 -4
- package/lib/Cloudflare/Workers/HttpServer.d.ts.map +1 -1
- package/lib/Cloudflare/Workers/HttpServer.js +1 -3
- package/lib/Cloudflare/Workers/HttpServer.js.map +1 -1
- package/lib/Cloudflare/Workers/LocalWorkerProvider.d.ts.map +1 -1
- package/lib/Cloudflare/Workers/LocalWorkerProvider.js +74 -11
- package/lib/Cloudflare/Workers/LocalWorkerProvider.js.map +1 -1
- package/lib/Cloudflare/Workers/ObservabilityDestination.d.ts.map +1 -1
- package/lib/Cloudflare/Workers/ObservabilityDestination.js +4 -1
- package/lib/Cloudflare/Workers/ObservabilityDestination.js.map +1 -1
- package/lib/Cloudflare/Workers/Vite.d.ts +1 -1
- package/lib/Cloudflare/Workers/Vite.d.ts.map +1 -1
- package/lib/Cloudflare/Workers/Worker.d.ts +27 -5
- package/lib/Cloudflare/Workers/Worker.d.ts.map +1 -1
- package/lib/Cloudflare/Workers/Worker.js +10 -5
- package/lib/Cloudflare/Workers/Worker.js.map +1 -1
- package/lib/Cloudflare/Workers/WorkerAsyncBindings.d.ts.map +1 -1
- package/lib/Cloudflare/Workers/WorkerAsyncBindings.js +24 -15
- package/lib/Cloudflare/Workers/WorkerAsyncBindings.js.map +1 -1
- package/lib/Cloudflare/Workers/WorkerBridge.d.ts +13 -5
- package/lib/Cloudflare/Workers/WorkerBridge.d.ts.map +1 -1
- package/lib/Cloudflare/Workers/WorkerBridge.js +126 -50
- package/lib/Cloudflare/Workers/WorkerBridge.js.map +1 -1
- package/lib/Cloudflare/Workers/WorkerProvider.d.ts.map +1 -1
- package/lib/Cloudflare/Workers/WorkerProvider.js +26 -7
- package/lib/Cloudflare/Workers/WorkerProvider.js.map +1 -1
- package/lib/Cloudflare/Workers/cloudflare_workers.d.ts.map +1 -1
- package/lib/Cloudflare/Workers/cloudflare_workers.js +10 -3
- package/lib/Cloudflare/Workers/cloudflare_workers.js.map +1 -1
- package/lib/Cloudflare/Workflows/Workflow.d.ts +10 -7
- package/lib/Cloudflare/Workflows/Workflow.d.ts.map +1 -1
- package/lib/Cloudflare/Workflows/Workflow.js +38 -13
- package/lib/Cloudflare/Workflows/Workflow.js.map +1 -1
- package/lib/Cloudflare/Workflows/WorkflowBridge.d.ts.map +1 -1
- package/lib/Cloudflare/Workflows/WorkflowBridge.js +39 -37
- package/lib/Cloudflare/Workflows/WorkflowBridge.js.map +1 -1
- package/lib/Cloudflare/Workflows/WorkflowName.d.ts +11 -0
- package/lib/Cloudflare/Workflows/WorkflowName.d.ts.map +1 -0
- package/lib/Cloudflare/Workflows/WorkflowName.js +28 -0
- package/lib/Cloudflare/Workflows/WorkflowName.js.map +1 -0
- package/lib/Cloudflare/Zone/Hold.d.ts.map +1 -1
- package/lib/Cloudflare/Zone/Hold.js +7 -1
- package/lib/Cloudflare/Zone/Hold.js.map +1 -1
- package/lib/Command/Dev.d.ts +16 -6
- package/lib/Command/Dev.d.ts.map +1 -1
- package/lib/Command/Dev.js +37 -7
- package/lib/Command/Dev.js.map +1 -1
- package/lib/Docker/Container.js +4 -1
- package/lib/Docker/Container.js.map +1 -1
- package/lib/Drizzle/Postgres.d.ts +14 -13
- package/lib/Drizzle/Postgres.d.ts.map +1 -1
- package/lib/Drizzle/Postgres.js +39 -19
- package/lib/Drizzle/Postgres.js.map +1 -1
- package/lib/GitHub/AuthProvider.d.ts.map +1 -1
- package/lib/GitHub/AuthProvider.js +1 -1
- package/lib/GitHub/AuthProvider.js.map +1 -1
- package/lib/GitHub/Env.d.ts +20 -0
- package/lib/GitHub/Env.d.ts.map +1 -0
- package/lib/GitHub/Env.js +27 -0
- package/lib/GitHub/Env.js.map +1 -0
- package/lib/GitHub/index.d.ts +1 -0
- package/lib/GitHub/index.d.ts.map +1 -1
- package/lib/GitHub/index.js +1 -0
- package/lib/GitHub/index.js.map +1 -1
- package/lib/Http.d.ts +9 -0
- package/lib/Http.d.ts.map +1 -1
- package/lib/Http.js +9 -0
- package/lib/Http.js.map +1 -1
- package/lib/Local/RpcProviderProxy.js +1 -1
- package/lib/Local/RpcProviderProxy.js.map +1 -1
- package/lib/Neon/AuthProvider.d.ts.map +1 -1
- package/lib/Neon/AuthProvider.js +1 -1
- package/lib/Neon/AuthProvider.js.map +1 -1
- package/lib/Neon/Project.js +4 -1
- package/lib/Neon/Project.js.map +1 -1
- package/lib/Plan.d.ts.map +1 -1
- package/lib/Plan.js +28 -11
- package/lib/Plan.js.map +1 -1
- package/lib/Planetscale/AuthProvider.d.ts +26 -9
- package/lib/Planetscale/AuthProvider.d.ts.map +1 -1
- package/lib/Planetscale/AuthProvider.js +142 -11
- package/lib/Planetscale/AuthProvider.js.map +1 -1
- package/lib/Planetscale/Branch.d.ts.map +1 -1
- package/lib/Planetscale/Branch.js +4 -1
- package/lib/Planetscale/Branch.js.map +1 -1
- package/lib/Planetscale/Credentials.d.ts.map +1 -1
- package/lib/Planetscale/Credentials.js +14 -6
- package/lib/Planetscale/Credentials.js.map +1 -1
- package/lib/Planetscale/MySQL/MySQLMigrations.js +4 -1
- package/lib/Planetscale/MySQL/MySQLMigrations.js.map +1 -1
- package/lib/Planetscale/OAuthClient.d.ts +72 -0
- package/lib/Planetscale/OAuthClient.d.ts.map +1 -0
- package/lib/Planetscale/OAuthClient.js +227 -0
- package/lib/Planetscale/OAuthClient.js.map +1 -0
- package/lib/Planetscale/Postgres/PostgresClusterSize.d.ts.map +1 -1
- package/lib/Planetscale/Postgres/PostgresClusterSize.js +4 -1
- package/lib/Planetscale/Postgres/PostgresClusterSize.js.map +1 -1
- package/lib/Planetscale/Postgres/PostgresMigrations.js +4 -1
- package/lib/Planetscale/Postgres/PostgresMigrations.js.map +1 -1
- package/lib/Planetscale/Util.d.ts.map +1 -1
- package/lib/Planetscale/Util.js +4 -1
- package/lib/Planetscale/Util.js.map +1 -1
- package/lib/Platform.d.ts +2 -3
- package/lib/Platform.d.ts.map +1 -1
- package/lib/Platform.js +52 -3
- package/lib/Platform.js.map +1 -1
- package/lib/Provider.d.ts +35 -0
- package/lib/Provider.d.ts.map +1 -1
- package/lib/Provider.js.map +1 -1
- package/lib/State/HttpStateApi.d.ts +8 -8
- package/lib/State/HttpStateStore.js +5 -2
- package/lib/State/HttpStateStore.js.map +1 -1
- package/lib/Sync.d.ts.map +1 -1
- package/lib/Sync.js +3 -0
- package/lib/Sync.js.map +1 -1
- package/lib/Test/Http.d.ts.map +1 -1
- package/lib/Test/Http.js +8 -2
- package/lib/Test/Http.js.map +1 -1
- package/lib/Util/data.d.ts +6 -1
- package/lib/Util/data.d.ts.map +1 -1
- package/lib/Util/data.js.map +1 -1
- package/lib/Util/poll.js +1 -1
- package/lib/Util/poll.js.map +1 -1
- package/package.json +20 -20
- package/src/AWS/ACM/Certificate.ts +16 -12
- package/src/AWS/ApiGateway/common.ts +11 -8
- package/src/AWS/AuthProvider.ts +0 -3
- package/src/AWS/AutoScaling/AutoScalingGroup.ts +8 -6
- package/src/AWS/Bootstrap.ts +5 -6
- package/src/AWS/CloudFront/Distribution.ts +20 -16
- package/src/AWS/CloudFront/Function.ts +10 -6
- package/src/AWS/CloudFront/Invalidation.ts +4 -3
- package/src/AWS/CloudFront/KvEntries.ts +4 -3
- package/src/AWS/CloudFront/KvRoutesUpdate.ts +8 -6
- package/src/AWS/CloudFront/VpcOrigin.ts +12 -9
- package/src/AWS/CloudFront/common.ts +10 -6
- package/src/AWS/CloudWatch/AnomalyDetector.ts +4 -3
- package/src/AWS/CloudWatch/common.ts +1 -3
- package/src/AWS/DynamoDB/Table.ts +57 -47
- package/src/AWS/EC2/EIP.ts +6 -4
- package/src/AWS/EC2/EgressOnlyInternetGateway.ts +6 -4
- package/src/AWS/EC2/Instance.ts +12 -9
- package/src/AWS/EC2/InternetGateway.ts +18 -12
- package/src/AWS/EC2/NatGateway.ts +6 -10
- package/src/AWS/EC2/NetworkAcl.ts +6 -4
- package/src/AWS/EC2/NetworkAclEntry.ts +4 -3
- package/src/AWS/EC2/RouteTable.ts +12 -9
- package/src/AWS/EC2/RouteTableAssociation.ts +3 -5
- package/src/AWS/EC2/SecurityGroup.ts +10 -7
- package/src/AWS/EC2/Subnet.ts +15 -15
- package/src/AWS/EC2/Vpc.ts +12 -12
- package/src/AWS/EC2/VpcEndpoint.ts +6 -8
- package/src/AWS/ECS/Service.ts +4 -3
- package/src/AWS/EKS/Addon.ts +8 -6
- package/src/AWS/EKS/Cluster.ts +4 -3
- package/src/AWS/ELBv2/TargetGroup.ts +4 -3
- package/src/AWS/ELBv2/TrustStore.ts +4 -3
- package/src/AWS/IAM/SAMLProvider.ts +4 -4
- package/src/AWS/IdentityCenter/AccountAssignment.ts +8 -6
- package/src/AWS/IdentityCenter/common.ts +1 -3
- package/src/AWS/KMS/Alias.ts +4 -3
- package/src/AWS/KMS/Key.ts +4 -3
- package/src/AWS/Kinesis/Stream.ts +2 -6
- package/src/AWS/Kinesis/StreamConsumer.ts +7 -12
- package/src/AWS/Lambda/Alias.ts +4 -3
- package/src/AWS/Lambda/EventInvokeConfig.ts +2 -6
- package/src/AWS/Lambda/EventSourceMapping.ts +10 -8
- package/src/AWS/Lambda/Function.ts +111 -31
- package/src/AWS/Lambda/MicrovmProvider.ts +18 -16
- package/src/AWS/Lambda/NetworkConnector.ts +19 -15
- package/src/AWS/Lambda/RuntimeExtension.ts +46 -0
- package/src/AWS/Organizations/Account.ts +5 -6
- package/src/AWS/Organizations/common.ts +1 -3
- package/src/AWS/Providers.ts +22 -20
- package/src/AWS/RDS/DBCluster.ts +8 -6
- package/src/AWS/RDS/DBInstance.ts +8 -6
- package/src/AWS/RDS/DBProxy.ts +4 -3
- package/src/AWS/RDS/DBProxyEndpoint.ts +4 -3
- package/src/AWS/Route53/HealthCheck.ts +8 -6
- package/src/AWS/Route53/HostedZone.ts +8 -6
- package/src/AWS/Route53/Record.ts +4 -3
- package/src/AWS/S3/Bucket.ts +5 -4
- package/src/AWS/SQS/Queue.ts +26 -20
- package/src/AWS/StateStore/State.ts +5 -4
- package/src/AWS/Website/AssetDeployment.ts +10 -6
- package/src/Apply.ts +8 -0
- package/src/Auth/AuthProvider.ts +11 -0
- package/src/Axiom/AuthProvider.ts +0 -3
- package/src/Bundle/Vite.ts +16 -15
- package/src/Cli/commands/_shared.ts +119 -5
- package/src/Cli/commands/login.ts +9 -40
- package/src/Cli/commands/logs.ts +1 -0
- package/src/Cli/commands/nuke.ts +16 -44
- package/src/Cli/commands/profile.ts +89 -27
- package/src/Cli/commands/tail.ts +1 -0
- package/src/Cloudflare/AI/GatewayDynamicRouting.ts +38 -6
- package/src/Cloudflare/AI/SearchInstance.ts +4 -3
- package/src/Cloudflare/Access/Application.ts +7 -4
- package/src/Cloudflare/Alerting/Silence.ts +4 -3
- package/src/Cloudflare/Alerting/Webhook.ts +8 -6
- package/src/Cloudflare/Auth/AuthProvider.ts +54 -38
- package/src/Cloudflare/Auth/OAuthClient.ts +6 -7
- package/src/Cloudflare/Cache/RegionalTieredCache.ts +7 -4
- package/src/Cloudflare/Containers/ContainerApplication.ts +22 -2
- package/src/Cloudflare/Containers/ContainerBundle.ts +99 -33
- package/src/Cloudflare/Containers/ContainerProvider.ts +73 -19
- package/src/Cloudflare/Containers/LocalContainerProvider.ts +78 -72
- package/src/Cloudflare/Diagnostics/EndpointHealthcheck.ts +4 -3
- package/src/Cloudflare/Images/Variant.ts +4 -3
- package/src/Cloudflare/LoadBalancer/Monitor.ts +4 -3
- package/src/Cloudflare/LoadBalancer/MonitorGroup.ts +4 -3
- package/src/Cloudflare/LoadBalancer/Pool.ts +4 -3
- package/src/Cloudflare/LocalRuntime.ts +17 -0
- package/src/Cloudflare/MagicNetworkMonitoring/Rule.ts +4 -3
- package/src/Cloudflare/Pipelines/Pipeline.ts +8 -6
- package/src/Cloudflare/Pipelines/Sink.ts +8 -6
- package/src/Cloudflare/Pipelines/Stream.ts +4 -3
- package/src/Cloudflare/Providers.ts +21 -19
- package/src/Cloudflare/Queues/Consumer.ts +45 -9
- package/src/Cloudflare/Queues/Queue.ts +4 -3
- package/src/Cloudflare/R2/Bucket.ts +12 -9
- package/src/Cloudflare/R2/BucketEventNotification.ts +4 -3
- package/src/Cloudflare/R2/DataCatalog.ts +4 -3
- package/src/Cloudflare/Rum/Rule.ts +4 -3
- package/src/Cloudflare/Snippets/Snippet.ts +4 -3
- package/src/Cloudflare/StateStore/CredentialsFile.ts +48 -0
- package/src/Cloudflare/StateStore/State.ts +61 -25
- package/src/Cloudflare/Tags/ZoneResourceTags.ts +4 -3
- package/src/Cloudflare/UrlNormalization/UrlNormalization.ts +7 -4
- package/src/Cloudflare/WaitingRoom/Settings.ts +7 -4
- package/src/Cloudflare/Website/Vite.ts +20 -0
- package/src/Cloudflare/Workers/Compatibility.ts +50 -7
- package/src/Cloudflare/Workers/CronEventSource.ts +3 -2
- package/src/Cloudflare/Workers/DurableObjectBridge.ts +38 -33
- package/src/Cloudflare/Workers/HttpServer.ts +1 -4
- package/src/Cloudflare/Workers/LocalWorkerProvider.ts +132 -26
- package/src/Cloudflare/Workers/ObservabilityDestination.ts +4 -3
- package/src/Cloudflare/Workers/Worker.ts +27 -5
- package/src/Cloudflare/Workers/WorkerAsyncBindings.ts +27 -16
- package/src/Cloudflare/Workers/WorkerBridge.ts +227 -106
- package/src/Cloudflare/Workers/WorkerProvider.ts +26 -19
- package/src/Cloudflare/Workers/cloudflare_workers.ts +20 -12
- package/src/Cloudflare/Workflows/Workflow.ts +54 -20
- package/src/Cloudflare/Workflows/WorkflowBridge.ts +19 -23
- package/src/Cloudflare/Workflows/WorkflowName.ts +41 -0
- package/src/Cloudflare/Zone/Hold.ts +7 -4
- package/src/Command/Dev.ts +42 -10
- package/src/Docker/Container.ts +4 -1
- package/src/Drizzle/Postgres.ts +51 -23
- package/src/GitHub/AuthProvider.ts +0 -3
- package/src/GitHub/Env.ts +57 -0
- package/src/GitHub/index.ts +1 -0
- package/src/Http.ts +11 -0
- package/src/Local/RpcProviderProxy.ts +1 -1
- package/src/Neon/AuthProvider.ts +0 -3
- package/src/Neon/Project.ts +2 -2
- package/src/Plan.ts +28 -11
- package/src/Planetscale/AuthProvider.ts +267 -27
- package/src/Planetscale/Branch.ts +4 -3
- package/src/Planetscale/Credentials.ts +18 -6
- package/src/Planetscale/MySQL/MySQLMigrations.ts +4 -3
- package/src/Planetscale/OAuthClient.ts +307 -0
- package/src/Planetscale/Postgres/PostgresClusterSize.ts +4 -3
- package/src/Planetscale/Postgres/PostgresMigrations.ts +4 -3
- package/src/Planetscale/Util.ts +4 -3
- package/src/Platform.ts +74 -7
- package/src/Provider.ts +35 -0
- package/src/State/HttpStateStore.ts +5 -5
- package/src/Sync.ts +3 -0
- package/src/Test/Http.ts +8 -6
- package/src/Util/data.ts +14 -5
- package/src/Util/poll.ts +1 -1
- package/lib/ExecutionContext.d.ts +0 -18
- package/lib/ExecutionContext.d.ts.map +0 -1
- package/lib/ExecutionContext.js +0 -10
- package/lib/ExecutionContext.js.map +0 -1
- package/src/ExecutionContext.ts +0 -18
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import * as Effect from "effect/Effect";
|
|
2
|
+
import * as FileSystem from "effect/FileSystem";
|
|
2
3
|
import * as Path from "effect/Path";
|
|
3
|
-
import
|
|
4
|
+
import * as Redacted from "effect/Redacted";
|
|
4
5
|
import * as Artifacts from "../../Artifacts.ts";
|
|
5
|
-
import {
|
|
6
|
+
import { hashDirectory } from "../../Command/Memo.ts";
|
|
6
7
|
import { isResolved } from "../../Diff.ts";
|
|
7
|
-
import { Docker } from "../../Docker/Docker.ts";
|
|
8
8
|
import * as RpcProvider from "../../Local/RpcProvider.ts";
|
|
9
9
|
import { sha256Object } from "../../Util/sha256.ts";
|
|
10
10
|
import { normalizeNulls } from "../../Util/stable.ts";
|
|
@@ -13,12 +13,12 @@ import { generateLocalId, LOCAL_ENTRY_URL } from "../LocalRuntime.ts";
|
|
|
13
13
|
import type {
|
|
14
14
|
ContainerApplication,
|
|
15
15
|
ContainerApplicationProps,
|
|
16
|
+
DevContainerImage,
|
|
16
17
|
} from "./ContainerApplication.ts";
|
|
17
18
|
import {
|
|
18
|
-
buildFinalDockerfile,
|
|
19
|
-
bundleContainerProgram,
|
|
20
19
|
createContainerApplicationName,
|
|
21
|
-
|
|
20
|
+
makeContainerEnv,
|
|
21
|
+
prepareContainerBuildContext,
|
|
22
22
|
} from "./ContainerBundle.ts";
|
|
23
23
|
import { ContainerPlatform } from "./ContainerPlatform.ts";
|
|
24
24
|
|
|
@@ -26,9 +26,10 @@ import { ContainerPlatform } from "./ContainerPlatform.ts";
|
|
|
26
26
|
* Local (dev) provider for Cloudflare Container applications.
|
|
27
27
|
*
|
|
28
28
|
* The Docker build/run is owned by `@distilled.cloud/cloudflare-runtime`; this
|
|
29
|
-
* provider's only job is to
|
|
30
|
-
*
|
|
31
|
-
*
|
|
29
|
+
* provider's only job is to resolve the `dev` image the runtime should use —
|
|
30
|
+
* a build context to `docker build` (Effect-native `main` or a user-supplied
|
|
31
|
+
* Dockerfile) or a remote image to `docker pull` — mirroring the three image
|
|
32
|
+
* variants of the live provider's `computeImage`.
|
|
32
33
|
*
|
|
33
34
|
* Everything else on the attributes is a placeholder: the real
|
|
34
35
|
* `applicationId`/`configuration`/etc. only exist once the live provider
|
|
@@ -41,68 +42,72 @@ export const LocalContainerProvider = () =>
|
|
|
41
42
|
ContainerPlatform,
|
|
42
43
|
LOCAL_ENTRY_URL,
|
|
43
44
|
Effect.gen(function* () {
|
|
44
|
-
const
|
|
45
|
-
const docker = yield* Docker;
|
|
45
|
+
const fs = yield* FileSystem.FileSystem;
|
|
46
46
|
const path = yield* Path.Path;
|
|
47
47
|
|
|
48
|
-
//
|
|
49
|
-
//
|
|
50
|
-
//
|
|
51
|
-
//
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
}
|
|
85
|
-
|
|
86
|
-
|
|
48
|
+
// Resolve the `dev` image plus a content hash for change detection.
|
|
49
|
+
// Cached per run (`Artifacts.cached`, keyed by resource id) so repeated
|
|
50
|
+
// diffs/reconciles in a single dev session don't re-bundle or re-hash.
|
|
51
|
+
//
|
|
52
|
+
// IMPORTANT: the cached result must stay env-free. The cache is warmed
|
|
53
|
+
// by `precreate`, which runs against unresolved props — binding-derived
|
|
54
|
+
// env values (e.g. an ApiToken's value/accountId) are still unresolved
|
|
55
|
+
// `Output`s there and get skipped. Caching env here would freeze that
|
|
56
|
+
// incomplete env and start the container without its bindings;
|
|
57
|
+
// `makeAttributes` attaches the freshly-computed env instead.
|
|
58
|
+
const prepareImage = (id: string, news: ContainerApplicationProps) =>
|
|
59
|
+
Effect.gen(function* () {
|
|
60
|
+
// Variant 1 — Effect-native program. Bundle `main` and write it
|
|
61
|
+
// (plus the generated Dockerfile) into a stable build context
|
|
62
|
+
// directory. `Docker.build` in cloudflare-runtime reads `dockerfile`
|
|
63
|
+
// as a file path and uses `context` as the build context, so we
|
|
64
|
+
// point `dev` at both. The build-context materialization is shared
|
|
65
|
+
// with the live provider (see `prepareContainerBuildContext`).
|
|
66
|
+
if (news.main) {
|
|
67
|
+
const { context, dockerfile, hash } =
|
|
68
|
+
yield* prepareContainerBuildContext(id, news);
|
|
69
|
+
return {
|
|
70
|
+
dev: {
|
|
71
|
+
context: path.relative(process.cwd(), context),
|
|
72
|
+
dockerfile: path.relative(context, dockerfile),
|
|
73
|
+
} as DevContainerImage,
|
|
74
|
+
hash,
|
|
75
|
+
};
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
// Variant 2 — pre-built remote image. The runtime pulls it
|
|
79
|
+
// directly; there is nothing to build.
|
|
80
|
+
if (news.image) {
|
|
81
|
+
return {
|
|
82
|
+
dev: { imageUri: news.image } as DevContainerImage,
|
|
83
|
+
hash: yield* sha256Object({ image: news.image }),
|
|
84
|
+
};
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
// Variant 3 — user-supplied Dockerfile + build context directory.
|
|
88
|
+
// The runtime builds the user's Dockerfile against the (real-path'd)
|
|
89
|
+
// context, exactly like the live provider's `external` variant.
|
|
90
|
+
const context = yield* fs.realPath(news.context ?? ".");
|
|
91
|
+
const dockerfile = news.dockerfile
|
|
92
|
+
? yield* fs.realPath(news.dockerfile)
|
|
93
|
+
: path.join(context, "Dockerfile");
|
|
94
|
+
const contextHash = yield* hashDirectory({ cwd: context });
|
|
95
|
+
const dockerfileContent = yield* fs.readFileString(dockerfile);
|
|
96
|
+
return {
|
|
97
|
+
dev: {
|
|
98
|
+
context: path.relative(process.cwd(), context),
|
|
99
|
+
dockerfile: path.relative(context, dockerfile),
|
|
100
|
+
} as DevContainerImage,
|
|
101
|
+
hash: yield* sha256Object({
|
|
102
|
+
contextHash,
|
|
87
103
|
dockerfile: dockerfileContent,
|
|
88
|
-
files: [],
|
|
89
104
|
}),
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
);
|
|
93
|
-
return {
|
|
94
|
-
context,
|
|
95
|
-
dockerfile: path.join(context, "Dockerfile"),
|
|
96
|
-
hash: yield* sha256Object({
|
|
97
|
-
bundle: bundle.hash,
|
|
98
|
-
dockerfileContent,
|
|
99
|
-
}),
|
|
100
|
-
};
|
|
101
|
-
}, Artifacts.cached("container-image"));
|
|
105
|
+
};
|
|
106
|
+
}).pipe(Artifacts.cached(`container-image:${id}`));
|
|
102
107
|
|
|
103
108
|
const placeholderConfiguration = (
|
|
104
109
|
props: ContainerApplicationProps,
|
|
105
|
-
|
|
110
|
+
env: Record<string, string | Redacted.Redacted<string>>,
|
|
106
111
|
) =>
|
|
107
112
|
normalizeNulls({
|
|
108
113
|
image: "local",
|
|
@@ -113,10 +118,10 @@ export const LocalContainerProvider = () =>
|
|
|
113
118
|
vcpu: props.vcpu,
|
|
114
119
|
memory: props.memory,
|
|
115
120
|
disk: props.disk,
|
|
116
|
-
environmentVariables:
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
),
|
|
121
|
+
environmentVariables: Object.entries(env).map(([name, value]) => ({
|
|
122
|
+
name,
|
|
123
|
+
value: Redacted.isRedacted(value) ? Redacted.value(value) : value,
|
|
124
|
+
})),
|
|
120
125
|
labels: props.labels,
|
|
121
126
|
network: props.network,
|
|
122
127
|
command: props.command,
|
|
@@ -136,7 +141,8 @@ export const LocalContainerProvider = () =>
|
|
|
136
141
|
output: ContainerApplication["Attributes"] | undefined;
|
|
137
142
|
}) {
|
|
138
143
|
const { accountId } = yield* yield* CloudflareEnvironment;
|
|
139
|
-
const
|
|
144
|
+
const env = makeContainerEnv(news, accountId);
|
|
145
|
+
const { dev, hash } = yield* prepareImage(id, news);
|
|
140
146
|
return {
|
|
141
147
|
applicationId: output?.applicationId ?? generateLocalId(),
|
|
142
148
|
applicationName: yield* createContainerApplicationName(id, news.name),
|
|
@@ -146,11 +152,11 @@ export const LocalContainerProvider = () =>
|
|
|
146
152
|
maxInstances: news.maxInstances ?? 1,
|
|
147
153
|
constraints: news.constraints,
|
|
148
154
|
affinities: news.affinities,
|
|
149
|
-
configuration: placeholderConfiguration(news,
|
|
155
|
+
configuration: placeholderConfiguration(news, env),
|
|
150
156
|
durableObjects: undefined,
|
|
151
157
|
createdAt: new Date().toISOString(),
|
|
152
158
|
version: 1,
|
|
153
|
-
dev: {
|
|
159
|
+
dev: { ...dev, env },
|
|
154
160
|
hash: { image: hash },
|
|
155
161
|
} satisfies ContainerApplication["Attributes"];
|
|
156
162
|
});
|
|
@@ -164,7 +170,7 @@ export const LocalContainerProvider = () =>
|
|
|
164
170
|
if (!output) return { action: "update" };
|
|
165
171
|
if (!isResolved(news)) return undefined;
|
|
166
172
|
const input = yield* prepareImage(id, news);
|
|
167
|
-
return input.hash !== output.hash?.image
|
|
173
|
+
return input.hash !== output.hash?.image || !output.dev
|
|
168
174
|
? { action: "update" }
|
|
169
175
|
: undefined;
|
|
170
176
|
}),
|
|
@@ -260,9 +260,10 @@ const observeExisting = (accountId: string, id: string) =>
|
|
|
260
260
|
Effect.map((hc): ObservedHealthcheck => ({ ...hc, accountId })),
|
|
261
261
|
Effect.retry({
|
|
262
262
|
while: (e) => e._tag === "EndpointHealthcheckNotFound",
|
|
263
|
-
schedule: Schedule.
|
|
264
|
-
Schedule.
|
|
265
|
-
|
|
263
|
+
schedule: Schedule.max([
|
|
264
|
+
Schedule.exponential("500 millis"),
|
|
265
|
+
Schedule.recurs(6),
|
|
266
|
+
]),
|
|
266
267
|
}),
|
|
267
268
|
Effect.catchTag("EndpointHealthcheckNotFound", () =>
|
|
268
269
|
Effect.succeed(undefined),
|
|
@@ -322,9 +322,10 @@ export const VariantProvider = () =>
|
|
|
322
322
|
// Bounded — if it never clears we stop polling and proceed.
|
|
323
323
|
yield* getVariant(output.accountId, output.variantName).pipe(
|
|
324
324
|
Effect.repeat({
|
|
325
|
-
schedule: Schedule.
|
|
326
|
-
Schedule.
|
|
327
|
-
|
|
325
|
+
schedule: Schedule.max([
|
|
326
|
+
Schedule.exponential("500 millis"),
|
|
327
|
+
Schedule.recurs(12),
|
|
328
|
+
]),
|
|
328
329
|
until: (observed) => observed === undefined,
|
|
329
330
|
}),
|
|
330
331
|
);
|
|
@@ -286,9 +286,10 @@ export const MonitorProvider = () =>
|
|
|
286
286
|
.pipe(
|
|
287
287
|
Effect.retry({
|
|
288
288
|
while: (e) => e._tag === "MonitorInUse",
|
|
289
|
-
schedule: Schedule.
|
|
290
|
-
Schedule.
|
|
291
|
-
|
|
289
|
+
schedule: Schedule.max([
|
|
290
|
+
Schedule.exponential("1 second"),
|
|
291
|
+
Schedule.recurs(6),
|
|
292
|
+
]),
|
|
292
293
|
}),
|
|
293
294
|
Effect.catchTag("MonitorNotFound", () => Effect.void),
|
|
294
295
|
);
|
|
@@ -220,9 +220,10 @@ export const MonitorGroupProvider = () =>
|
|
|
220
220
|
.pipe(
|
|
221
221
|
Effect.retry({
|
|
222
222
|
while: (e) => e._tag === "MonitorGroupInUse",
|
|
223
|
-
schedule: Schedule.
|
|
224
|
-
Schedule.
|
|
225
|
-
|
|
223
|
+
schedule: Schedule.max([
|
|
224
|
+
Schedule.exponential("1 second"),
|
|
225
|
+
Schedule.recurs(6),
|
|
226
|
+
]),
|
|
226
227
|
}),
|
|
227
228
|
Effect.catchTag("MonitorGroupNotFound", () => Effect.void),
|
|
228
229
|
);
|
|
@@ -336,9 +336,10 @@ export const PoolProvider = () =>
|
|
|
336
336
|
.pipe(
|
|
337
337
|
Effect.retry({
|
|
338
338
|
while: (e) => e._tag === "PoolInUse",
|
|
339
|
-
schedule: Schedule.
|
|
340
|
-
Schedule.
|
|
341
|
-
|
|
339
|
+
schedule: Schedule.max([
|
|
340
|
+
Schedule.exponential("1 second"),
|
|
341
|
+
Schedule.recurs(6),
|
|
342
|
+
]),
|
|
342
343
|
}),
|
|
343
344
|
Effect.catchTag("PoolNotFound", () => Effect.void),
|
|
344
345
|
);
|
|
@@ -32,6 +32,22 @@ export class LocalRuntimeState extends Context.Service<
|
|
|
32
32
|
Consumer["Attributes"]["consumerId"],
|
|
33
33
|
Consumer["Attributes"]
|
|
34
34
|
>;
|
|
35
|
+
/**
|
|
36
|
+
* Restart hooks for locally running Workers, keyed by script name.
|
|
37
|
+
*
|
|
38
|
+
* A local workerd instance bakes its queue-consumer wiring in at start
|
|
39
|
+
* time (`runtime.start({ queueConsumers })`), but the `Consumer`
|
|
40
|
+
* resource that populates {@link queueConsumers} reconciles as a
|
|
41
|
+
* *sibling* of the Worker — the engine may start workerd before the
|
|
42
|
+
* consumer registers. Providers that mutate a worker's runtime wiring
|
|
43
|
+
* (e.g. `ConsumerProviderLocal`) invoke the script's hook after
|
|
44
|
+
* updating state so the running instance is reconfigured; the hook is
|
|
45
|
+
* a no-op until the worker has served at least once.
|
|
46
|
+
*/
|
|
47
|
+
readonly workerRestarts: MutableHashMap.MutableHashMap<
|
|
48
|
+
string,
|
|
49
|
+
Effect.Effect<void>
|
|
50
|
+
>;
|
|
35
51
|
}
|
|
36
52
|
>()("alchemy/cloudflare/LocalRuntimeState") {}
|
|
37
53
|
|
|
@@ -40,6 +56,7 @@ const LocalRuntimeStateLive = Layer.succeed(
|
|
|
40
56
|
LocalRuntimeState.of({
|
|
41
57
|
queues: MutableHashMap.empty(),
|
|
42
58
|
queueConsumers: MutableHashMap.empty(),
|
|
59
|
+
workerRestarts: MutableHashMap.empty(),
|
|
43
60
|
}),
|
|
44
61
|
);
|
|
45
62
|
|
|
@@ -286,9 +286,10 @@ export const RuleProvider = () =>
|
|
|
286
286
|
// config has propagated, so ride out that consistency window.
|
|
287
287
|
Effect.retry({
|
|
288
288
|
while: (e) => e._tag === "MnmConfigMissing",
|
|
289
|
-
schedule: Schedule.
|
|
290
|
-
Schedule.
|
|
291
|
-
|
|
289
|
+
schedule: Schedule.max([
|
|
290
|
+
Schedule.exponential("500 millis"),
|
|
291
|
+
Schedule.recurs(8),
|
|
292
|
+
]),
|
|
292
293
|
}),
|
|
293
294
|
Effect.catchTag("DuplicateMnmRuleName", (error) =>
|
|
294
295
|
findByName(accountId, name).pipe(
|
|
@@ -175,9 +175,10 @@ export const PipelineProvider = () =>
|
|
|
175
175
|
// race an `PipelineAlreadyExists` against the dying pipeline.
|
|
176
176
|
yield* getPipeline(accountId, observed.id).pipe(
|
|
177
177
|
Effect.repeat({
|
|
178
|
-
schedule: Schedule.
|
|
179
|
-
Schedule.
|
|
180
|
-
|
|
178
|
+
schedule: Schedule.max([
|
|
179
|
+
Schedule.exponential("250 millis"),
|
|
180
|
+
Schedule.recurs(8),
|
|
181
|
+
]),
|
|
181
182
|
until: (p) => p === undefined,
|
|
182
183
|
}),
|
|
183
184
|
);
|
|
@@ -196,9 +197,10 @@ export const PipelineProvider = () =>
|
|
|
196
197
|
.pipe(
|
|
197
198
|
Effect.retry({
|
|
198
199
|
while: (e) => e._tag === "TableNotFound",
|
|
199
|
-
schedule: Schedule.
|
|
200
|
-
Schedule.
|
|
201
|
-
|
|
200
|
+
schedule: Schedule.max([
|
|
201
|
+
Schedule.exponential("500 millis"),
|
|
202
|
+
Schedule.recurs(6),
|
|
203
|
+
]),
|
|
202
204
|
}),
|
|
203
205
|
Effect.catchTag("PipelineAlreadyExists", (error) =>
|
|
204
206
|
findPipelineByName(accountId, name).pipe(
|
|
@@ -348,9 +348,10 @@ export const SinkProvider = () =>
|
|
|
348
348
|
// race a `SinkAlreadyExists` against the dying sink.
|
|
349
349
|
yield* getSink(accountId, observed.id).pipe(
|
|
350
350
|
Effect.repeat({
|
|
351
|
-
schedule: Schedule.
|
|
352
|
-
Schedule.
|
|
353
|
-
|
|
351
|
+
schedule: Schedule.max([
|
|
352
|
+
Schedule.exponential("250 millis"),
|
|
353
|
+
Schedule.recurs(8),
|
|
354
|
+
]),
|
|
354
355
|
until: (s) => s === undefined,
|
|
355
356
|
}),
|
|
356
357
|
);
|
|
@@ -458,9 +459,10 @@ const deleteSink = (accountId: string, sinkId: string) =>
|
|
|
458
459
|
pipelines.deleteSink({ accountId, sinkId }).pipe(
|
|
459
460
|
Effect.retry({
|
|
460
461
|
while: (e) => e._tag === "SinkInUse",
|
|
461
|
-
schedule: Schedule.
|
|
462
|
-
Schedule.
|
|
463
|
-
|
|
462
|
+
schedule: Schedule.max([
|
|
463
|
+
Schedule.exponential("500 millis"),
|
|
464
|
+
Schedule.recurs(8),
|
|
465
|
+
]),
|
|
464
466
|
}),
|
|
465
467
|
Effect.catchTag("SinkNotFound", () => Effect.void),
|
|
466
468
|
Effect.catchTag("InvalidSinkId", () => Effect.void),
|
|
@@ -367,9 +367,10 @@ export const StreamProvider = () =>
|
|
|
367
367
|
.pipe(
|
|
368
368
|
Effect.retry({
|
|
369
369
|
while: (e) => e._tag === "StreamInUse",
|
|
370
|
-
schedule: Schedule.
|
|
371
|
-
Schedule.
|
|
372
|
-
|
|
370
|
+
schedule: Schedule.max([
|
|
371
|
+
Schedule.exponential("500 millis"),
|
|
372
|
+
Schedule.recurs(8),
|
|
373
|
+
]),
|
|
373
374
|
}),
|
|
374
375
|
Effect.catchTag("StreamNotFound", () => Effect.void),
|
|
375
376
|
Effect.catchTag("InvalidStreamId", () => Effect.void),
|
|
@@ -476,7 +476,7 @@ export const providers = () =>
|
|
|
476
476
|
Devices.DeviceSettingsProvider(),
|
|
477
477
|
|
|
478
478
|
// Split into nested groups: a single flat mergeAll with ~200
|
|
479
|
-
// arguments exceeds
|
|
479
|
+
// arguments exceeds tsc's variadic inference ceiling and
|
|
480
480
|
// silently drops the tail layers from the inferred union.
|
|
481
481
|
Layer.mergeAll(
|
|
482
482
|
Diagnostics.EndpointHealthcheckProvider(),
|
|
@@ -731,25 +731,27 @@ const cloudflareRetryFactory: Retry.Factory = (lastError) => {
|
|
|
731
731
|
return {
|
|
732
732
|
while: (error) =>
|
|
733
733
|
defaults.while?.(error) === true || isMisleadinglyTaggedTransient(error),
|
|
734
|
-
schedule:
|
|
735
|
-
|
|
736
|
-
|
|
737
|
-
|
|
738
|
-
|
|
739
|
-
|
|
740
|
-
|
|
741
|
-
|
|
742
|
-
|
|
743
|
-
|
|
744
|
-
|
|
745
|
-
|
|
746
|
-
|
|
747
|
-
|
|
734
|
+
schedule: Schedule.max([
|
|
735
|
+
pipe(
|
|
736
|
+
Schedule.exponential(Duration.millis(250), 2),
|
|
737
|
+
Schedule.modifyDelay(
|
|
738
|
+
Effect.fn(function* ({ duration }) {
|
|
739
|
+
const error = yield* Ref.get(lastError);
|
|
740
|
+
// Throttling errors (429): honor a 500ms floor matching the
|
|
741
|
+
// distilled default.
|
|
742
|
+
const isThrottling =
|
|
743
|
+
(error as { _tag?: unknown })?._tag === "TooManyRequests";
|
|
744
|
+
if (isThrottling && Duration.toMillis(duration) < 500) {
|
|
745
|
+
return Duration.toMillis(Duration.millis(500));
|
|
746
|
+
}
|
|
747
|
+
return Duration.toMillis(duration);
|
|
748
|
+
}),
|
|
749
|
+
),
|
|
750
|
+
Retry.capped(Duration.seconds(5)),
|
|
751
|
+
Retry.jittered,
|
|
748
752
|
),
|
|
749
|
-
|
|
750
|
-
|
|
751
|
-
Schedule.both(Schedule.recurs(8)),
|
|
752
|
-
),
|
|
753
|
+
Schedule.recurs(8),
|
|
754
|
+
]),
|
|
753
755
|
};
|
|
754
756
|
};
|
|
755
757
|
|
|
@@ -308,9 +308,10 @@ export const ConsumerProviderLive = () =>
|
|
|
308
308
|
Effect.catchTag("ConsumerNotFound", () => Effect.void),
|
|
309
309
|
Effect.retry({
|
|
310
310
|
while: (e) => e === "still-attached",
|
|
311
|
-
schedule: Schedule.
|
|
312
|
-
Schedule.
|
|
313
|
-
|
|
311
|
+
schedule: Schedule.max([
|
|
312
|
+
Schedule.spaced("1 second"),
|
|
313
|
+
Schedule.recurs(30),
|
|
314
|
+
]),
|
|
314
315
|
}),
|
|
315
316
|
Effect.ignore,
|
|
316
317
|
);
|
|
@@ -487,9 +488,10 @@ export const ConsumerProviderLive = () =>
|
|
|
487
488
|
Effect.catchTag("ConsumerNotFound", () => Effect.void),
|
|
488
489
|
Effect.retry({
|
|
489
490
|
while: (e) => e === "still-attached",
|
|
490
|
-
schedule: Schedule.
|
|
491
|
-
Schedule.
|
|
492
|
-
|
|
491
|
+
schedule: Schedule.max([
|
|
492
|
+
Schedule.spaced("1 second"),
|
|
493
|
+
Schedule.recurs(30),
|
|
494
|
+
]),
|
|
493
495
|
}),
|
|
494
496
|
Effect.ignore,
|
|
495
497
|
);
|
|
@@ -561,9 +563,10 @@ const toObserved = (c: {
|
|
|
561
563
|
|
|
562
564
|
// ~60s budget — Worker reconcile uploads typically land in 2–10s,
|
|
563
565
|
// but a fresh container/asset deploy can stretch that.
|
|
564
|
-
const queueHandlerReadinessSchedule = Schedule.
|
|
565
|
-
Schedule.
|
|
566
|
-
)
|
|
566
|
+
const queueHandlerReadinessSchedule = Schedule.max([
|
|
567
|
+
Schedule.spaced("2 seconds"),
|
|
568
|
+
Schedule.recurs(30),
|
|
569
|
+
]);
|
|
567
570
|
|
|
568
571
|
export const ConsumerProviderLocal = () =>
|
|
569
572
|
RpcProvider.effect(
|
|
@@ -571,6 +574,27 @@ export const ConsumerProviderLocal = () =>
|
|
|
571
574
|
LOCAL_ENTRY_URL,
|
|
572
575
|
Effect.gen(function* () {
|
|
573
576
|
const localRuntimeState = yield* LocalRuntimeState;
|
|
577
|
+
|
|
578
|
+
// Restart the locally running workerd instances (if any) for the
|
|
579
|
+
// given scripts so start-time queue-consumer wiring is re-read from
|
|
580
|
+
// `localRuntimeState.queueConsumers`. See `workerRestarts` on
|
|
581
|
+
// {@link LocalRuntimeState}.
|
|
582
|
+
const restartScripts = (scriptNames: ReadonlyArray<string>) =>
|
|
583
|
+
Effect.forEach(
|
|
584
|
+
scriptNames,
|
|
585
|
+
(scriptName) =>
|
|
586
|
+
MutableHashMap.get(
|
|
587
|
+
localRuntimeState.workerRestarts,
|
|
588
|
+
scriptName,
|
|
589
|
+
).pipe(
|
|
590
|
+
Option.match({
|
|
591
|
+
onNone: () => Effect.void,
|
|
592
|
+
onSome: (restart) => restart,
|
|
593
|
+
}),
|
|
594
|
+
),
|
|
595
|
+
{ discard: true },
|
|
596
|
+
);
|
|
597
|
+
|
|
574
598
|
return {
|
|
575
599
|
list: () =>
|
|
576
600
|
Effect.sync(() =>
|
|
@@ -625,6 +649,17 @@ export const ConsumerProviderLocal = () =>
|
|
|
625
649
|
consumer.consumerId,
|
|
626
650
|
consumer,
|
|
627
651
|
);
|
|
652
|
+
// A local workerd instance only reads its queue-consumer wiring
|
|
653
|
+
// at start time, and this reconcile races the sibling Worker's
|
|
654
|
+
// start (the Worker's `precreate` resolves `scriptName` before
|
|
655
|
+
// workerd is up). Restart any already-running instance so it
|
|
656
|
+
// picks up the new wiring; if the worker hasn't served yet this
|
|
657
|
+
// is a no-op and its first serve observes the map we just set.
|
|
658
|
+
yield* restartScripts(
|
|
659
|
+
output && output.scriptName !== consumer.scriptName
|
|
660
|
+
? [output.scriptName, consumer.scriptName]
|
|
661
|
+
: [consumer.scriptName],
|
|
662
|
+
);
|
|
628
663
|
return consumer;
|
|
629
664
|
}),
|
|
630
665
|
delete: Effect.fn(function* ({ output }) {
|
|
@@ -632,6 +667,7 @@ export const ConsumerProviderLocal = () =>
|
|
|
632
667
|
localRuntimeState.queueConsumers,
|
|
633
668
|
output.consumerId,
|
|
634
669
|
);
|
|
670
|
+
yield* restartScripts([output.scriptName]);
|
|
635
671
|
}),
|
|
636
672
|
};
|
|
637
673
|
}),
|
|
@@ -208,9 +208,10 @@ export const ProviderLive = () =>
|
|
|
208
208
|
.pipe(
|
|
209
209
|
Effect.retry({
|
|
210
210
|
while: (e) => e._tag === "QueueInUseByEventNotification",
|
|
211
|
-
schedule: Schedule.
|
|
212
|
-
Schedule.
|
|
213
|
-
|
|
211
|
+
schedule: Schedule.max([
|
|
212
|
+
Schedule.exponential("1 second"),
|
|
213
|
+
Schedule.recurs(8),
|
|
214
|
+
]),
|
|
214
215
|
}),
|
|
215
216
|
Effect.catchTag("QueueNotFound", () => Effect.void),
|
|
216
217
|
);
|
|
@@ -1136,16 +1136,18 @@ export const BucketProvider = () =>
|
|
|
1136
1136
|
// sub-resource endpoints (custom domains, lifecycle) accept it. Retry only
|
|
1137
1137
|
// that narrow `NoSuchBucket` lag here; not-found sub-resources are still
|
|
1138
1138
|
// treated as terminal for idempotent deletes.
|
|
1139
|
-
const r2BucketEndpointConsistencySchedule = Schedule.
|
|
1140
|
-
Schedule.
|
|
1141
|
-
)
|
|
1139
|
+
const r2BucketEndpointConsistencySchedule = Schedule.max([
|
|
1140
|
+
Schedule.exponential(100),
|
|
1141
|
+
Schedule.recurs(5),
|
|
1142
|
+
]);
|
|
1142
1143
|
|
|
1143
1144
|
// R2 sub-resource reads (notably the custom-domain endpoint, which touches the
|
|
1144
1145
|
// bucket's public-access policy) can return a transient 500 ("Failed to access
|
|
1145
1146
|
// or modify the bucket policy"). Ride out the blip with a short bounded retry.
|
|
1146
|
-
const r2TransientServerErrorSchedule = Schedule.
|
|
1147
|
-
Schedule.
|
|
1148
|
-
)
|
|
1147
|
+
const r2TransientServerErrorSchedule = Schedule.max([
|
|
1148
|
+
Schedule.exponential("500 millis"),
|
|
1149
|
+
Schedule.recurs(6),
|
|
1150
|
+
]);
|
|
1149
1151
|
|
|
1150
1152
|
// Distilled widened generated string enums to open unions (`string & {}`); the
|
|
1151
1153
|
// API only ever returns the known variants, narrowed in `toCustomDomainAttributes`.
|
|
@@ -1266,6 +1268,7 @@ const toLifecyclePutPayload = (
|
|
|
1266
1268
|
// consistency and retry it on create. Releasing a custom domain after delete
|
|
1267
1269
|
// can lag a few seconds, so give the conflict a longer, bounded budget than
|
|
1268
1270
|
// the bucket-endpoint lag above.
|
|
1269
|
-
const r2CustomDomainConflictSchedule = Schedule.
|
|
1270
|
-
Schedule.
|
|
1271
|
-
)
|
|
1271
|
+
const r2CustomDomainConflictSchedule = Schedule.max([
|
|
1272
|
+
Schedule.spaced("2 seconds"),
|
|
1273
|
+
Schedule.recurs(8),
|
|
1274
|
+
]);
|
|
@@ -456,9 +456,10 @@ export const BucketEventNotificationProvider = () =>
|
|
|
456
456
|
// R2 can make a freshly-created bucket/queue visible to its own endpoints
|
|
457
457
|
// before the event-notification endpoints accept it. Retry only that narrow
|
|
458
458
|
// not-found lag with a bounded budget.
|
|
459
|
-
const r2EventNotificationConsistencySchedule = Schedule.
|
|
460
|
-
Schedule.
|
|
461
|
-
)
|
|
459
|
+
const r2EventNotificationConsistencySchedule = Schedule.max([
|
|
460
|
+
Schedule.exponential(250),
|
|
461
|
+
Schedule.recurs(6),
|
|
462
|
+
]);
|
|
462
463
|
|
|
463
464
|
type ObservedBucket = NonNullable<r2.ListBucketsResponse["buckets"]>[number];
|
|
464
465
|
|
|
@@ -373,9 +373,10 @@ export const DataCatalogProvider = () =>
|
|
|
373
373
|
|
|
374
374
|
// A freshly-created bucket (or freshly-enabled catalog) can briefly 404 on
|
|
375
375
|
// the r2-catalog endpoints before the warehouse propagates.
|
|
376
|
-
const catalogConsistencySchedule = Schedule.
|
|
377
|
-
Schedule.
|
|
378
|
-
)
|
|
376
|
+
const catalogConsistencySchedule = Schedule.max([
|
|
377
|
+
Schedule.exponential(100),
|
|
378
|
+
Schedule.recurs(5),
|
|
379
|
+
]);
|
|
379
380
|
|
|
380
381
|
/**
|
|
381
382
|
* Read a catalog by bucket name, mapping "gone" (`WarehouseNotFound`, code
|