alchemy 2.0.0-beta.60 → 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/cli.js +9 -1
- package/bin/exec.js +86 -17
- package/bin/exec.js.map +1 -1
- package/lib/AWS/ACM/Certificate.d.ts.map +1 -1
- package/lib/AWS/ACM/Certificate.js +25 -6
- 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 +26 -13
- package/lib/AWS/AutoScaling/AutoScalingGroup.js.map +1 -1
- package/lib/AWS/AutoScaling/LaunchTemplate.js +6 -1
- package/lib/AWS/AutoScaling/LaunchTemplate.js.map +1 -1
- package/lib/AWS/AutoScaling/ScalingPolicy.d.ts.map +1 -1
- package/lib/AWS/AutoScaling/ScalingPolicy.js +28 -10
- package/lib/AWS/AutoScaling/ScalingPolicy.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/PublicKey.d.ts.map +1 -1
- package/lib/AWS/CloudFront/PublicKey.js +5 -1
- package/lib/AWS/CloudFront/PublicKey.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 +54 -21
- 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 +33 -5
- 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/OpenIDConnectProvider.d.ts.map +1 -1
- package/lib/AWS/IAM/OpenIDConnectProvider.js +9 -1
- package/lib/AWS/IAM/OpenIDConnectProvider.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 +26 -0
- package/lib/AWS/Lambda/Alias.d.ts.map +1 -1
- package/lib/AWS/Lambda/Alias.js +35 -1
- package/lib/AWS/Lambda/Alias.js.map +1 -1
- package/lib/AWS/Lambda/EventInvokeConfig.d.ts +36 -0
- package/lib/AWS/Lambda/EventInvokeConfig.d.ts.map +1 -0
- package/lib/AWS/Lambda/EventInvokeConfig.js +76 -0
- package/lib/AWS/Lambda/EventInvokeConfig.js.map +1 -0
- 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 +43 -3
- package/lib/AWS/Lambda/Function.d.ts.map +1 -1
- package/lib/AWS/Lambda/Function.js +124 -28
- 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/Lambda/index.d.ts +1 -0
- package/lib/AWS/Lambda/index.d.ts.map +1 -1
- package/lib/AWS/Lambda/index.js +1 -0
- package/lib/AWS/Lambda/index.js.map +1 -1
- package/lib/AWS/Organizations/Account.js +5 -2
- package/lib/AWS/Organizations/Account.js.map +1 -1
- package/lib/AWS/Organizations/DelegatedAdministrator.d.ts.map +1 -1
- package/lib/AWS/Organizations/DelegatedAdministrator.js +10 -2
- package/lib/AWS/Organizations/DelegatedAdministrator.js.map +1 -1
- package/lib/AWS/Organizations/PolicyAttachment.d.ts.map +1 -1
- package/lib/AWS/Organizations/PolicyAttachment.js +10 -4
- package/lib/AWS/Organizations/PolicyAttachment.js.map +1 -1
- package/lib/AWS/Organizations/RootPolicyType.d.ts.map +1 -1
- package/lib/AWS/Organizations/RootPolicyType.js +9 -4
- package/lib/AWS/Organizations/RootPolicyType.js.map +1 -1
- package/lib/AWS/Organizations/TrustedServiceAccess.d.ts.map +1 -1
- package/lib/AWS/Organizations/TrustedServiceAccess.js +8 -1
- package/lib/AWS/Organizations/TrustedServiceAccess.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 +28 -6
- 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 +36 -10
- 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 +15 -1
- 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/Auth/Lock.d.ts +17 -0
- package/lib/Auth/Lock.d.ts.map +1 -1
- package/lib/Auth/Lock.js +53 -18
- package/lib/Auth/Lock.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/PurePlugin.d.ts.map +1 -1
- package/lib/Bundle/PurePlugin.js +15 -2
- package/lib/Bundle/PurePlugin.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/sync.d.ts +22 -0
- package/lib/Cli/commands/sync.d.ts.map +1 -0
- package/lib/Cli/commands/sync.js +64 -0
- package/lib/Cli/commands/sync.js.map +1 -0
- 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/Cli/main.d.ts.map +1 -1
- package/lib/Cli/main.js +2 -0
- package/lib/Cli/main.js.map +1 -1
- package/lib/Cloudflare/AI/CustomTopics.d.ts.map +1 -1
- package/lib/Cloudflare/AI/CustomTopics.js +3 -1
- package/lib/Cloudflare/AI/CustomTopics.js.map +1 -1
- package/lib/Cloudflare/AI/Dataset.d.ts.map +1 -1
- package/lib/Cloudflare/AI/Dataset.js +3 -1
- package/lib/Cloudflare/AI/Dataset.js.map +1 -1
- package/lib/Cloudflare/AI/Evaluation.d.ts.map +1 -1
- package/lib/Cloudflare/AI/Evaluation.js +3 -1
- package/lib/Cloudflare/AI/Evaluation.js.map +1 -1
- package/lib/Cloudflare/AI/Gateway.d.ts.map +1 -1
- package/lib/Cloudflare/AI/Gateway.js +5 -6
- package/lib/Cloudflare/AI/Gateway.js.map +1 -1
- package/lib/Cloudflare/AI/GatewayDynamicRouting.d.ts.map +1 -1
- package/lib/Cloudflare/AI/GatewayDynamicRouting.js +34 -3
- package/lib/Cloudflare/AI/GatewayDynamicRouting.js.map +1 -1
- package/lib/Cloudflare/AI/GatewayProvider.d.ts +2 -1
- package/lib/Cloudflare/AI/GatewayProvider.d.ts.map +1 -1
- package/lib/Cloudflare/AI/GatewayProvider.js +5 -2
- package/lib/Cloudflare/AI/GatewayProvider.js.map +1 -1
- package/lib/Cloudflare/AI/ProviderKey.d.ts +135 -0
- package/lib/Cloudflare/AI/ProviderKey.d.ts.map +1 -0
- package/lib/Cloudflare/AI/ProviderKey.js +90 -0
- package/lib/Cloudflare/AI/ProviderKey.js.map +1 -0
- package/lib/Cloudflare/AI/SearchInstance.d.ts.map +1 -1
- package/lib/Cloudflare/AI/SearchInstance.js +9 -5
- package/lib/Cloudflare/AI/SearchInstance.js.map +1 -1
- package/lib/Cloudflare/AI/SearchNamespace.d.ts.map +1 -1
- package/lib/Cloudflare/AI/SearchNamespace.js +5 -4
- package/lib/Cloudflare/AI/SearchNamespace.js.map +1 -1
- package/lib/Cloudflare/AI/SearchToken.d.ts.map +1 -1
- package/lib/Cloudflare/AI/SearchToken.js +3 -1
- package/lib/Cloudflare/AI/SearchToken.js.map +1 -1
- package/lib/Cloudflare/AI/SecuritySettings.d.ts.map +1 -1
- package/lib/Cloudflare/AI/SecuritySettings.js +3 -1
- package/lib/Cloudflare/AI/SecuritySettings.js.map +1 -1
- package/lib/Cloudflare/AI/index.d.ts +1 -0
- package/lib/Cloudflare/AI/index.d.ts.map +1 -1
- package/lib/Cloudflare/AI/index.js +1 -0
- package/lib/Cloudflare/AI/index.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/Access/InfrastructureTarget.d.ts.map +1 -1
- package/lib/Cloudflare/Access/InfrastructureTarget.js +3 -1
- package/lib/Cloudflare/Access/InfrastructureTarget.js.map +1 -1
- package/lib/Cloudflare/Access/Organization.d.ts.map +1 -1
- package/lib/Cloudflare/Access/Organization.js +1 -1
- package/lib/Cloudflare/Access/Organization.js.map +1 -1
- package/lib/Cloudflare/Access/Policy.d.ts.map +1 -1
- package/lib/Cloudflare/Access/Policy.js +3 -1
- package/lib/Cloudflare/Access/Policy.js.map +1 -1
- package/lib/Cloudflare/Account/Account.d.ts.map +1 -1
- package/lib/Cloudflare/Account/Account.js +3 -1
- package/lib/Cloudflare/Account/Account.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/ApiToken/AccountApiToken.d.ts.map +1 -1
- package/lib/Cloudflare/ApiToken/AccountApiToken.js +1 -1
- package/lib/Cloudflare/ApiToken/AccountApiToken.js.map +1 -1
- package/lib/Cloudflare/ApiToken/UserApiToken.d.ts.map +1 -1
- package/lib/Cloudflare/ApiToken/UserApiToken.js +1 -1
- package/lib/Cloudflare/ApiToken/UserApiToken.js.map +1 -1
- package/lib/Cloudflare/Auth/AuthProvider.d.ts +3 -0
- package/lib/Cloudflare/Auth/AuthProvider.d.ts.map +1 -1
- package/lib/Cloudflare/Auth/AuthProvider.js +73 -21
- 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/BotManagement/BotManagement.d.ts.map +1 -1
- package/lib/Cloudflare/BotManagement/BotManagement.js +3 -1
- package/lib/Cloudflare/BotManagement/BotManagement.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/Cache/Reserve.d.ts.map +1 -1
- package/lib/Cloudflare/Cache/Reserve.js +3 -1
- package/lib/Cloudflare/Cache/Reserve.js.map +1 -1
- package/lib/Cloudflare/ClientCertificate/ClientCertificate.d.ts.map +1 -1
- package/lib/Cloudflare/ClientCertificate/ClientCertificate.js +3 -1
- package/lib/Cloudflare/ClientCertificate/ClientCertificate.js.map +1 -1
- package/lib/Cloudflare/Containers/Container.d.ts +2 -2
- package/lib/Cloudflare/Containers/Container.js +2 -2
- 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/ContentScanning/ContentScanning.d.ts.map +1 -1
- package/lib/Cloudflare/ContentScanning/ContentScanning.js +3 -1
- package/lib/Cloudflare/ContentScanning/ContentScanning.js.map +1 -1
- package/lib/Cloudflare/CustomCertificate/CustomCertificate.d.ts.map +1 -1
- package/lib/Cloudflare/CustomCertificate/CustomCertificate.js +3 -1
- package/lib/Cloudflare/CustomCertificate/CustomCertificate.js.map +1 -1
- package/lib/Cloudflare/CustomHostname/CustomHostname.d.ts.map +1 -1
- package/lib/Cloudflare/CustomHostname/CustomHostname.js +1 -1
- package/lib/Cloudflare/CustomHostname/CustomHostname.js.map +1 -1
- package/lib/Cloudflare/CustomHostname/FallbackOrigin.d.ts.map +1 -1
- package/lib/Cloudflare/CustomHostname/FallbackOrigin.js +1 -1
- package/lib/Cloudflare/CustomHostname/FallbackOrigin.js.map +1 -1
- package/lib/Cloudflare/CustomNameserver/CustomNameserver.d.ts.map +1 -1
- package/lib/Cloudflare/CustomNameserver/CustomNameserver.js +3 -1
- package/lib/Cloudflare/CustomNameserver/CustomNameserver.js.map +1 -1
- package/lib/Cloudflare/D1/Database.d.ts.map +1 -1
- package/lib/Cloudflare/D1/Database.js +2 -2
- package/lib/Cloudflare/D1/Database.js.map +1 -1
- package/lib/Cloudflare/DNS/AccountSettings.d.ts.map +1 -1
- package/lib/Cloudflare/DNS/AccountSettings.js +3 -1
- package/lib/Cloudflare/DNS/AccountSettings.js.map +1 -1
- package/lib/Cloudflare/DNS/Dnssec.d.ts.map +1 -1
- package/lib/Cloudflare/DNS/Dnssec.js +3 -1
- package/lib/Cloudflare/DNS/Dnssec.js.map +1 -1
- package/lib/Cloudflare/DNS/Firewall.d.ts.map +1 -1
- package/lib/Cloudflare/DNS/Firewall.js +3 -1
- package/lib/Cloudflare/DNS/Firewall.js.map +1 -1
- package/lib/Cloudflare/DNS/Record.d.ts.map +1 -1
- package/lib/Cloudflare/DNS/Record.js +3 -1
- package/lib/Cloudflare/DNS/Record.js.map +1 -1
- package/lib/Cloudflare/DNS/View.d.ts.map +1 -1
- package/lib/Cloudflare/DNS/View.js +3 -1
- package/lib/Cloudflare/DNS/View.js.map +1 -1
- package/lib/Cloudflare/DNS/ZoneSettings.d.ts.map +1 -1
- package/lib/Cloudflare/DNS/ZoneSettings.js +3 -1
- package/lib/Cloudflare/DNS/ZoneSettings.js.map +1 -1
- package/lib/Cloudflare/DNS/ZoneTransferAcl.d.ts.map +1 -1
- package/lib/Cloudflare/DNS/ZoneTransferAcl.js +3 -1
- package/lib/Cloudflare/DNS/ZoneTransferAcl.js.map +1 -1
- package/lib/Cloudflare/DNS/ZoneTransferIncoming.d.ts.map +1 -1
- package/lib/Cloudflare/DNS/ZoneTransferIncoming.js +3 -1
- package/lib/Cloudflare/DNS/ZoneTransferIncoming.js.map +1 -1
- package/lib/Cloudflare/DNS/ZoneTransferOutgoing.d.ts.map +1 -1
- package/lib/Cloudflare/DNS/ZoneTransferOutgoing.js +3 -1
- package/lib/Cloudflare/DNS/ZoneTransferOutgoing.js.map +1 -1
- package/lib/Cloudflare/DNS/ZoneTransferPeer.d.ts.map +1 -1
- package/lib/Cloudflare/DNS/ZoneTransferPeer.js +3 -1
- package/lib/Cloudflare/DNS/ZoneTransferPeer.js.map +1 -1
- package/lib/Cloudflare/DNS/ZoneTransferTsig.d.ts.map +1 -1
- package/lib/Cloudflare/DNS/ZoneTransferTsig.js +3 -1
- package/lib/Cloudflare/DNS/ZoneTransferTsig.js.map +1 -1
- package/lib/Cloudflare/Diagnostics/EndpointHealthcheck.js +4 -1
- package/lib/Cloudflare/Diagnostics/EndpointHealthcheck.js.map +1 -1
- package/lib/Cloudflare/Email/Address.d.ts.map +1 -1
- package/lib/Cloudflare/Email/Address.js +3 -1
- package/lib/Cloudflare/Email/Address.js.map +1 -1
- package/lib/Cloudflare/Email/AllowPolicy.d.ts.map +1 -1
- package/lib/Cloudflare/Email/AllowPolicy.js +1 -1
- package/lib/Cloudflare/Email/AllowPolicy.js.map +1 -1
- package/lib/Cloudflare/Email/BlockSender.d.ts.map +1 -1
- package/lib/Cloudflare/Email/BlockSender.js +1 -1
- package/lib/Cloudflare/Email/BlockSender.js.map +1 -1
- package/lib/Cloudflare/Email/CatchAll.d.ts.map +1 -1
- package/lib/Cloudflare/Email/CatchAll.js +8 -2
- package/lib/Cloudflare/Email/CatchAll.js.map +1 -1
- package/lib/Cloudflare/Email/Domain.d.ts.map +1 -1
- package/lib/Cloudflare/Email/Domain.js +3 -1
- package/lib/Cloudflare/Email/Domain.js.map +1 -1
- package/lib/Cloudflare/Email/ImpersonationRegistryEntry.d.ts.map +1 -1
- package/lib/Cloudflare/Email/ImpersonationRegistryEntry.js +1 -1
- package/lib/Cloudflare/Email/ImpersonationRegistryEntry.js.map +1 -1
- package/lib/Cloudflare/Email/Routing.d.ts.map +1 -1
- package/lib/Cloudflare/Email/Routing.js +3 -1
- package/lib/Cloudflare/Email/Routing.js.map +1 -1
- package/lib/Cloudflare/Email/Rule.d.ts.map +1 -1
- package/lib/Cloudflare/Email/Rule.js +3 -1
- package/lib/Cloudflare/Email/Rule.js.map +1 -1
- package/lib/Cloudflare/Email/SendingSubdomain.d.ts.map +1 -1
- package/lib/Cloudflare/Email/SendingSubdomain.js +1 -1
- package/lib/Cloudflare/Email/SendingSubdomain.js.map +1 -1
- package/lib/Cloudflare/Email/TrustedDomain.d.ts.map +1 -1
- package/lib/Cloudflare/Email/TrustedDomain.js +1 -1
- package/lib/Cloudflare/Email/TrustedDomain.js.map +1 -1
- package/lib/Cloudflare/Fetcher.d.ts.map +1 -1
- package/lib/Cloudflare/Fetcher.js +10 -3
- package/lib/Cloudflare/Fetcher.js.map +1 -1
- package/lib/Cloudflare/Flagship/App.d.ts.map +1 -1
- package/lib/Cloudflare/Flagship/App.js +2 -3
- package/lib/Cloudflare/Flagship/App.js.map +1 -1
- package/lib/Cloudflare/Fraud/DetectionSettings.d.ts.map +1 -1
- package/lib/Cloudflare/Fraud/DetectionSettings.js +3 -1
- package/lib/Cloudflare/Fraud/DetectionSettings.js.map +1 -1
- package/lib/Cloudflare/GoogleTagGateway/GoogleTagGateway.d.ts.map +1 -1
- package/lib/Cloudflare/GoogleTagGateway/GoogleTagGateway.js +8 -2
- package/lib/Cloudflare/GoogleTagGateway/GoogleTagGateway.js.map +1 -1
- package/lib/Cloudflare/Healthcheck/Healthcheck.d.ts.map +1 -1
- package/lib/Cloudflare/Healthcheck/Healthcheck.js +3 -1
- package/lib/Cloudflare/Healthcheck/Healthcheck.js.map +1 -1
- package/lib/Cloudflare/HostnameTlsSetting/HostnameTlsSetting.d.ts.map +1 -1
- package/lib/Cloudflare/HostnameTlsSetting/HostnameTlsSetting.js +3 -1
- package/lib/Cloudflare/HostnameTlsSetting/HostnameTlsSetting.js.map +1 -1
- package/lib/Cloudflare/Hyperdrive/Connection.d.ts.map +1 -1
- package/lib/Cloudflare/Hyperdrive/Connection.js +2 -4
- package/lib/Cloudflare/Hyperdrive/Connection.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/KV/Namespace.d.ts.map +1 -1
- package/lib/Cloudflare/KV/Namespace.js +5 -4
- package/lib/Cloudflare/KV/Namespace.js.map +1 -1
- package/lib/Cloudflare/KeylessCertificate/KeylessCertificate.d.ts.map +1 -1
- package/lib/Cloudflare/KeylessCertificate/KeylessCertificate.js +3 -1
- package/lib/Cloudflare/KeylessCertificate/KeylessCertificate.js.map +1 -1
- package/lib/Cloudflare/LeakedCredentialCheck/LeakedCredentialCheck.d.ts.map +1 -1
- package/lib/Cloudflare/LeakedCredentialCheck/LeakedCredentialCheck.js +3 -1
- package/lib/Cloudflare/LeakedCredentialCheck/LeakedCredentialCheck.js.map +1 -1
- package/lib/Cloudflare/LoadBalancer/LoadBalancer.d.ts.map +1 -1
- package/lib/Cloudflare/LoadBalancer/LoadBalancer.js +3 -1
- package/lib/Cloudflare/LoadBalancer/LoadBalancer.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/ManagedTransforms/ManagedTransforms.d.ts.map +1 -1
- package/lib/Cloudflare/ManagedTransforms/ManagedTransforms.js +3 -1
- package/lib/Cloudflare/ManagedTransforms/ManagedTransforms.js.map +1 -1
- package/lib/Cloudflare/MtlsCertificate/MtlsCertificate.d.ts.map +1 -1
- package/lib/Cloudflare/MtlsCertificate/MtlsCertificate.js +3 -1
- package/lib/Cloudflare/MtlsCertificate/MtlsCertificate.js.map +1 -1
- package/lib/Cloudflare/Organization/Organization.d.ts.map +1 -1
- package/lib/Cloudflare/Organization/Organization.js +3 -1
- package/lib/Cloudflare/Organization/Organization.js.map +1 -1
- package/lib/Cloudflare/OriginCaCertificate/OriginCaCertificate.d.ts.map +1 -1
- package/lib/Cloudflare/OriginCaCertificate/OriginCaCertificate.js +7 -2
- package/lib/Cloudflare/OriginCaCertificate/OriginCaCertificate.js.map +1 -1
- package/lib/Cloudflare/OriginPostQuantumEncryption/OriginPostQuantumEncryption.d.ts.map +1 -1
- package/lib/Cloudflare/OriginPostQuantumEncryption/OriginPostQuantumEncryption.js +3 -1
- package/lib/Cloudflare/OriginPostQuantumEncryption/OriginPostQuantumEncryption.js.map +1 -1
- package/lib/Cloudflare/OriginTlsClientAuth/HostnameCertificate.d.ts.map +1 -1
- package/lib/Cloudflare/OriginTlsClientAuth/HostnameCertificate.js +5 -1
- package/lib/Cloudflare/OriginTlsClientAuth/HostnameCertificate.js.map +1 -1
- package/lib/Cloudflare/PageRule/PageRule.d.ts.map +1 -1
- package/lib/Cloudflare/PageRule/PageRule.js +3 -1
- package/lib/Cloudflare/PageRule/PageRule.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.d.ts +29 -0
- package/lib/Cloudflare/Providers.d.ts.map +1 -1
- package/lib/Cloudflare/Providers.js +44 -30
- package/lib/Cloudflare/Providers.js.map +1 -1
- package/lib/Cloudflare/Queues/Consumer.d.ts.map +1 -1
- package/lib/Cloudflare/Queues/Consumer.js +33 -4
- 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 +9 -5
- package/lib/Cloudflare/Queues/Queue.js.map +1 -1
- package/lib/Cloudflare/Queues/Subscription.d.ts.map +1 -1
- package/lib/Cloudflare/Queues/Subscription.js +3 -1
- package/lib/Cloudflare/Queues/Subscription.js.map +1 -1
- package/lib/Cloudflare/R2/Bucket.d.ts +98 -0
- package/lib/Cloudflare/R2/Bucket.d.ts.map +1 -1
- package/lib/Cloudflare/R2/Bucket.js +153 -6
- 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/RegionalHostname/RegionalHostname.d.ts.map +1 -1
- package/lib/Cloudflare/RegionalHostname/RegionalHostname.js +3 -1
- package/lib/Cloudflare/RegionalHostname/RegionalHostname.js.map +1 -1
- package/lib/Cloudflare/Ruleset/Ruleset.d.ts.map +1 -1
- package/lib/Cloudflare/Ruleset/Ruleset.js +8 -3
- package/lib/Cloudflare/Ruleset/Ruleset.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/SecretsStore/Secret.d.ts.map +1 -1
- package/lib/Cloudflare/SecretsStore/Secret.js +31 -5
- package/lib/Cloudflare/SecretsStore/Secret.js.map +1 -1
- package/lib/Cloudflare/SecurityTxt/SecurityTxt.d.ts.map +1 -1
- package/lib/Cloudflare/SecurityTxt/SecurityTxt.js +3 -1
- package/lib/Cloudflare/SecurityTxt/SecurityTxt.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/Api.d.ts +15 -0
- 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 +32 -3
- package/lib/Cloudflare/StateStore/State.d.ts.map +1 -1
- package/lib/Cloudflare/StateStore/State.js +128 -22
- package/lib/Cloudflare/StateStore/State.js.map +1 -1
- package/lib/Cloudflare/Tags/AccountResourceTags.d.ts.map +1 -1
- package/lib/Cloudflare/Tags/AccountResourceTags.js +8 -3
- package/lib/Cloudflare/Tags/AccountResourceTags.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/Tunnel/Route.d.ts.map +1 -1
- package/lib/Cloudflare/Tunnel/Route.js +3 -1
- package/lib/Cloudflare/Tunnel/Route.js.map +1 -1
- package/lib/Cloudflare/Tunnel/Tunnel.d.ts.map +1 -1
- package/lib/Cloudflare/Tunnel/Tunnel.js +3 -1
- package/lib/Cloudflare/Tunnel/Tunnel.js.map +1 -1
- package/lib/Cloudflare/UrlNormalization/UrlNormalization.d.ts.map +1 -1
- package/lib/Cloudflare/UrlNormalization/UrlNormalization.js +10 -2
- package/lib/Cloudflare/UrlNormalization/UrlNormalization.js.map +1 -1
- package/lib/Cloudflare/Vectorize/VectorizeIndex.d.ts.map +1 -1
- package/lib/Cloudflare/Vectorize/VectorizeIndex.js +2 -3
- package/lib/Cloudflare/Vectorize/VectorizeIndex.js.map +1 -1
- package/lib/Cloudflare/VpcService/VpcService.d.ts.map +1 -1
- package/lib/Cloudflare/VpcService/VpcService.js +1 -1
- package/lib/Cloudflare/VpcService/VpcService.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/WaitingRoom/WaitingRoom.d.ts.map +1 -1
- package/lib/Cloudflare/WaitingRoom/WaitingRoom.js +3 -1
- package/lib/Cloudflare/WaitingRoom/WaitingRoom.js.map +1 -1
- package/lib/Cloudflare/Web3/ContentList.d.ts.map +1 -1
- package/lib/Cloudflare/Web3/ContentList.js +3 -1
- package/lib/Cloudflare/Web3/ContentList.js.map +1 -1
- package/lib/Cloudflare/Web3/Hostname.d.ts.map +1 -1
- package/lib/Cloudflare/Web3/Hostname.js +3 -1
- package/lib/Cloudflare/Web3/Hostname.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/Cache.d.ts +71 -0
- package/lib/Cloudflare/Workers/Cache.d.ts.map +1 -0
- package/lib/Cloudflare/Workers/Cache.js +64 -0
- package/lib/Cloudflare/Workers/Cache.js.map +1 -0
- 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 +183 -8
- package/lib/Cloudflare/Workers/CronEventSource.d.ts.map +1 -1
- package/lib/Cloudflare/Workers/CronEventSource.js +180 -6
- package/lib/Cloudflare/Workers/CronEventSource.js.map +1 -1
- package/lib/Cloudflare/Workers/DurableObject.d.ts +36 -1
- package/lib/Cloudflare/Workers/DurableObject.d.ts.map +1 -1
- package/lib/Cloudflare/Workers/DurableObject.js +36 -1
- package/lib/Cloudflare/Workers/DurableObject.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/DurableObjectState.d.ts +11 -0
- package/lib/Cloudflare/Workers/DurableObjectState.d.ts.map +1 -1
- package/lib/Cloudflare/Workers/DurableObjectState.js +7 -0
- package/lib/Cloudflare/Workers/DurableObjectState.js.map +1 -1
- package/lib/Cloudflare/Workers/Fetch.js +2 -2
- package/lib/Cloudflare/Workers/Fetch.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 +77 -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 +252 -4
- package/lib/Cloudflare/Workers/Worker.d.ts.map +1 -1
- package/lib/Cloudflare/Workers/Worker.js +166 -7
- package/lib/Cloudflare/Workers/Worker.js.map +1 -1
- package/lib/Cloudflare/Workers/WorkerAsyncBindings.d.ts +9 -0
- package/lib/Cloudflare/Workers/WorkerAsyncBindings.d.ts.map +1 -1
- package/lib/Cloudflare/Workers/WorkerAsyncBindings.js +39 -15
- package/lib/Cloudflare/Workers/WorkerAsyncBindings.js.map +1 -1
- package/lib/Cloudflare/Workers/WorkerBinding.d.ts +30 -0
- package/lib/Cloudflare/Workers/WorkerBinding.d.ts.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 +133 -35
- package/lib/Cloudflare/Workers/WorkerBridge.js.map +1 -1
- package/lib/Cloudflare/Workers/WorkerLoader.js +9 -1
- package/lib/Cloudflare/Workers/WorkerLoader.js.map +1 -1
- package/lib/Cloudflare/Workers/WorkerProvider.d.ts.map +1 -1
- package/lib/Cloudflare/Workers/WorkerProvider.js +389 -23
- package/lib/Cloudflare/Workers/WorkerProvider.js.map +1 -1
- package/lib/Cloudflare/Workers/WorkerRuntimeContext.d.ts.map +1 -1
- package/lib/Cloudflare/Workers/WorkerRuntimeContext.js +20 -3
- package/lib/Cloudflare/Workers/WorkerRuntimeContext.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/Workers/index.d.ts +1 -0
- package/lib/Cloudflare/Workers/index.d.ts.map +1 -1
- package/lib/Cloudflare/Workers/index.js +1 -0
- package/lib/Cloudflare/Workers/index.js.map +1 -1
- package/lib/Cloudflare/WorkersForPlatforms/DispatchNamespace.d.ts.map +1 -1
- package/lib/Cloudflare/WorkersForPlatforms/DispatchNamespace.js +2 -3
- package/lib/Cloudflare/WorkersForPlatforms/DispatchNamespace.js.map +1 -1
- package/lib/Cloudflare/Workflows/Workflow.d.ts +210 -31
- package/lib/Cloudflare/Workflows/Workflow.d.ts.map +1 -1
- package/lib/Cloudflare/Workflows/Workflow.js +164 -41
- 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 +81 -40
- 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/Zaraz/Config.d.ts +1 -0
- package/lib/Cloudflare/Zaraz/Config.d.ts.map +1 -1
- package/lib/Cloudflare/Zaraz/Config.js +8 -2
- package/lib/Cloudflare/Zaraz/Config.js.map +1 -1
- 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/Cloudflare/Zone/Zone.d.ts.map +1 -1
- package/lib/Cloudflare/Zone/Zone.js +1 -0
- package/lib/Cloudflare/Zone/Zone.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.d.ts.map +1 -1
- package/lib/Docker/Container.js +15 -2
- 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/Drizzle/Schema.d.ts.map +1 -1
- package/lib/Drizzle/Schema.js +12 -5
- package/lib/Drizzle/Schema.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/Branch.d.ts.map +1 -1
- package/lib/Neon/Branch.js +15 -3
- package/lib/Neon/Branch.js.map +1 -1
- package/lib/Neon/Project.js +4 -1
- package/lib/Neon/Project.js.map +1 -1
- package/lib/Output.d.ts +13 -1
- package/lib/Output.d.ts.map +1 -1
- package/lib/Output.js +17 -3
- package/lib/Output.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/Postgres/PostgresRole.js +2 -2
- package/lib/Planetscale/Postgres/PostgresRole.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 +43 -0
- package/lib/Provider.d.ts.map +1 -1
- package/lib/Provider.js +38 -3
- package/lib/Provider.js.map +1 -1
- package/lib/Ref.d.ts +9 -1
- package/lib/Ref.d.ts.map +1 -1
- package/lib/Ref.js +2 -1
- package/lib/Ref.js.map +1 -1
- package/lib/Resource.d.ts +44 -0
- package/lib/Resource.d.ts.map +1 -1
- package/lib/Resource.js +22 -1
- package/lib/Resource.js.map +1 -1
- package/lib/Stack.js +1 -1
- package/lib/Stack.js.map +1 -1
- package/lib/State/HttpStateApi.d.ts +8 -8
- package/lib/State/HttpStateStore.d.ts +12 -0
- package/lib/State/HttpStateStore.d.ts.map +1 -1
- package/lib/State/HttpStateStore.js +50 -6
- package/lib/State/HttpStateStore.js.map +1 -1
- package/lib/Sync.d.ts +109 -0
- package/lib/Sync.d.ts.map +1 -0
- package/lib/Sync.js +315 -0
- package/lib/Sync.js.map +1 -0
- package/lib/Test/Bun.d.ts +1 -1
- package/lib/Test/Bun.d.ts.map +1 -1
- package/lib/Test/Bun.js +1 -1
- package/lib/Test/Bun.js.map +1 -1
- package/lib/Test/Http.d.ts +67 -0
- package/lib/Test/Http.d.ts.map +1 -1
- package/lib/Test/Http.js +76 -1
- package/lib/Test/Http.js.map +1 -1
- package/lib/Test/Vitest.d.ts +1 -1
- package/lib/Test/Vitest.d.ts.map +1 -1
- package/lib/Test/Vitest.js +1 -0
- package/lib/Test/Vitest.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/lib/Util/proxy-chain.js +14 -15
- package/lib/Util/proxy-chain.js.map +1 -1
- package/lib/index.d.ts +1 -0
- package/lib/index.d.ts.map +1 -1
- package/lib/index.js +1 -0
- package/lib/index.js.map +1 -1
- package/package.json +20 -20
- package/src/AWS/ACM/Certificate.ts +29 -14
- package/src/AWS/ApiGateway/common.ts +11 -8
- package/src/AWS/AuthProvider.ts +0 -3
- package/src/AWS/AutoScaling/AutoScalingGroup.ts +29 -21
- package/src/AWS/AutoScaling/LaunchTemplate.ts +6 -1
- package/src/AWS/AutoScaling/ScalingPolicy.ts +31 -17
- 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/PublicKey.ts +4 -0
- 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 +58 -48
- 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 +39 -9
- 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/OpenIDConnectProvider.ts +9 -1
- 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 +46 -3
- package/src/AWS/Lambda/EventInvokeConfig.ts +146 -0
- package/src/AWS/Lambda/EventSourceMapping.ts +10 -8
- package/src/AWS/Lambda/Function.ts +146 -33
- 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/Lambda/index.ts +1 -0
- package/src/AWS/Organizations/Account.ts +5 -6
- package/src/AWS/Organizations/DelegatedAdministrator.ts +11 -3
- package/src/AWS/Organizations/PolicyAttachment.ts +10 -4
- package/src/AWS/Organizations/RootPolicyType.ts +9 -4
- package/src/AWS/Organizations/TrustedServiceAccess.ts +9 -3
- 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 +35 -16
- package/src/AWS/Route53/Record.ts +45 -22
- 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 +15 -1
- package/src/Auth/AuthProvider.ts +11 -0
- package/src/Auth/Lock.ts +62 -18
- package/src/Axiom/AuthProvider.ts +0 -3
- package/src/Bundle/PurePlugin.ts +15 -2
- 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/sync.ts +123 -0
- package/src/Cli/commands/tail.ts +1 -0
- package/src/Cli/main.ts +2 -0
- package/src/Cloudflare/AI/CustomTopics.ts +3 -1
- package/src/Cloudflare/AI/Dataset.ts +3 -1
- package/src/Cloudflare/AI/Evaluation.ts +3 -1
- package/src/Cloudflare/AI/Gateway.ts +5 -6
- package/src/Cloudflare/AI/GatewayDynamicRouting.ts +41 -7
- package/src/Cloudflare/AI/GatewayProvider.ts +5 -2
- package/src/Cloudflare/AI/ProviderKey.ts +161 -0
- package/src/Cloudflare/AI/SearchInstance.ts +9 -7
- package/src/Cloudflare/AI/SearchNamespace.ts +5 -4
- package/src/Cloudflare/AI/SearchToken.ts +3 -1
- package/src/Cloudflare/AI/SecuritySettings.ts +3 -0
- package/src/Cloudflare/AI/index.ts +1 -0
- package/src/Cloudflare/Access/Application.ts +7 -4
- package/src/Cloudflare/Access/InfrastructureTarget.ts +4 -1
- package/src/Cloudflare/Access/Organization.ts +1 -0
- package/src/Cloudflare/Access/Policy.ts +3 -1
- package/src/Cloudflare/Account/Account.ts +3 -1
- package/src/Cloudflare/Alerting/Silence.ts +4 -3
- package/src/Cloudflare/Alerting/Webhook.ts +8 -6
- package/src/Cloudflare/ApiToken/AccountApiToken.ts +1 -0
- package/src/Cloudflare/ApiToken/UserApiToken.ts +1 -0
- package/src/Cloudflare/Auth/AuthProvider.ts +123 -46
- package/src/Cloudflare/Auth/OAuthClient.ts +6 -7
- package/src/Cloudflare/BotManagement/BotManagement.ts +3 -1
- package/src/Cloudflare/Cache/RegionalTieredCache.ts +7 -4
- package/src/Cloudflare/Cache/Reserve.ts +3 -1
- package/src/Cloudflare/ClientCertificate/ClientCertificate.ts +3 -1
- package/src/Cloudflare/Containers/Container.ts +2 -2
- 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/ContentScanning/ContentScanning.ts +3 -1
- package/src/Cloudflare/CustomCertificate/CustomCertificate.ts +3 -1
- package/src/Cloudflare/CustomHostname/CustomHostname.ts +1 -0
- package/src/Cloudflare/CustomHostname/FallbackOrigin.ts +1 -0
- package/src/Cloudflare/CustomNameserver/CustomNameserver.ts +3 -1
- package/src/Cloudflare/D1/Database.ts +2 -2
- package/src/Cloudflare/DNS/AccountSettings.ts +3 -1
- package/src/Cloudflare/DNS/Dnssec.ts +3 -1
- package/src/Cloudflare/DNS/Firewall.ts +3 -1
- package/src/Cloudflare/DNS/Record.ts +3 -1
- package/src/Cloudflare/DNS/View.ts +3 -1
- package/src/Cloudflare/DNS/ZoneSettings.ts +3 -1
- package/src/Cloudflare/DNS/ZoneTransferAcl.ts +3 -1
- package/src/Cloudflare/DNS/ZoneTransferIncoming.ts +3 -1
- package/src/Cloudflare/DNS/ZoneTransferOutgoing.ts +3 -1
- package/src/Cloudflare/DNS/ZoneTransferPeer.ts +3 -1
- package/src/Cloudflare/DNS/ZoneTransferTsig.ts +3 -1
- package/src/Cloudflare/Diagnostics/EndpointHealthcheck.ts +4 -3
- package/src/Cloudflare/Email/Address.ts +3 -1
- package/src/Cloudflare/Email/AllowPolicy.ts +1 -0
- package/src/Cloudflare/Email/BlockSender.ts +1 -0
- package/src/Cloudflare/Email/CatchAll.ts +7 -2
- package/src/Cloudflare/Email/Domain.ts +3 -1
- package/src/Cloudflare/Email/ImpersonationRegistryEntry.ts +1 -0
- package/src/Cloudflare/Email/Routing.ts +3 -1
- package/src/Cloudflare/Email/Rule.ts +3 -1
- package/src/Cloudflare/Email/SendingSubdomain.ts +1 -0
- package/src/Cloudflare/Email/TrustedDomain.ts +1 -0
- package/src/Cloudflare/Fetcher.ts +12 -5
- package/src/Cloudflare/Flagship/App.ts +2 -3
- package/src/Cloudflare/Fraud/DetectionSettings.ts +3 -1
- package/src/Cloudflare/GoogleTagGateway/GoogleTagGateway.ts +7 -2
- package/src/Cloudflare/Healthcheck/Healthcheck.ts +3 -1
- package/src/Cloudflare/HostnameTlsSetting/HostnameTlsSetting.ts +3 -1
- package/src/Cloudflare/Hyperdrive/Connection.ts +2 -4
- package/src/Cloudflare/Images/Variant.ts +4 -3
- package/src/Cloudflare/KV/Namespace.ts +5 -4
- package/src/Cloudflare/KeylessCertificate/KeylessCertificate.ts +3 -1
- package/src/Cloudflare/LeakedCredentialCheck/LeakedCredentialCheck.ts +3 -1
- package/src/Cloudflare/LoadBalancer/LoadBalancer.ts +3 -1
- 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/ManagedTransforms/ManagedTransforms.ts +3 -1
- package/src/Cloudflare/MtlsCertificate/MtlsCertificate.ts +3 -1
- package/src/Cloudflare/Organization/Organization.ts +3 -1
- package/src/Cloudflare/OriginCaCertificate/OriginCaCertificate.ts +7 -2
- package/src/Cloudflare/OriginPostQuantumEncryption/OriginPostQuantumEncryption.ts +3 -1
- package/src/Cloudflare/OriginTlsClientAuth/HostnameCertificate.ts +5 -1
- package/src/Cloudflare/PageRule/PageRule.ts +3 -1
- 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 +55 -38
- package/src/Cloudflare/Queues/Consumer.ts +48 -10
- package/src/Cloudflare/Queues/Queue.ts +9 -7
- package/src/Cloudflare/Queues/Subscription.ts +3 -1
- package/src/Cloudflare/R2/Bucket.ts +242 -12
- package/src/Cloudflare/R2/BucketEventNotification.ts +4 -3
- package/src/Cloudflare/R2/DataCatalog.ts +4 -3
- package/src/Cloudflare/RegionalHostname/RegionalHostname.ts +3 -1
- package/src/Cloudflare/Ruleset/Ruleset.ts +9 -4
- package/src/Cloudflare/Rum/Rule.ts +4 -3
- package/src/Cloudflare/SecretsStore/Secret.ts +46 -5
- package/src/Cloudflare/SecurityTxt/SecurityTxt.ts +3 -1
- package/src/Cloudflare/Snippets/Snippet.ts +4 -3
- package/src/Cloudflare/StateStore/CredentialsFile.ts +48 -0
- package/src/Cloudflare/StateStore/State.ts +144 -43
- package/src/Cloudflare/Tags/AccountResourceTags.ts +9 -5
- package/src/Cloudflare/Tags/ZoneResourceTags.ts +4 -3
- package/src/Cloudflare/Tunnel/Route.ts +3 -1
- package/src/Cloudflare/Tunnel/Tunnel.ts +3 -1
- package/src/Cloudflare/UrlNormalization/UrlNormalization.ts +10 -5
- package/src/Cloudflare/Vectorize/VectorizeIndex.ts +2 -3
- package/src/Cloudflare/VpcService/VpcService.ts +1 -0
- package/src/Cloudflare/WaitingRoom/Settings.ts +7 -4
- package/src/Cloudflare/WaitingRoom/WaitingRoom.ts +3 -1
- package/src/Cloudflare/Web3/ContentList.ts +3 -1
- package/src/Cloudflare/Web3/Hostname.ts +3 -1
- package/src/Cloudflare/Website/Vite.ts +20 -0
- package/src/Cloudflare/Workers/Cache.ts +102 -0
- package/src/Cloudflare/Workers/Compatibility.ts +50 -7
- package/src/Cloudflare/Workers/CronEventSource.ts +183 -8
- package/src/Cloudflare/Workers/DurableObject.ts +36 -1
- package/src/Cloudflare/Workers/DurableObjectBridge.ts +38 -33
- package/src/Cloudflare/Workers/DurableObjectState.ts +25 -0
- package/src/Cloudflare/Workers/Fetch.ts +2 -2
- package/src/Cloudflare/Workers/HttpServer.ts +1 -4
- package/src/Cloudflare/Workers/LocalWorkerProvider.ts +135 -26
- package/src/Cloudflare/Workers/ObservabilityDestination.ts +4 -3
- package/src/Cloudflare/Workers/Worker.ts +337 -9
- package/src/Cloudflare/Workers/WorkerAsyncBindings.ts +45 -16
- package/src/Cloudflare/Workers/WorkerBridge.ts +245 -97
- package/src/Cloudflare/Workers/WorkerLoader.ts +10 -1
- package/src/Cloudflare/Workers/WorkerProvider.ts +598 -55
- package/src/Cloudflare/Workers/WorkerRuntimeContext.ts +23 -2
- package/src/Cloudflare/Workers/cloudflare_workers.ts +20 -12
- package/src/Cloudflare/Workers/index.ts +1 -0
- package/src/Cloudflare/WorkersForPlatforms/DispatchNamespace.ts +2 -4
- package/src/Cloudflare/Workflows/Workflow.ts +350 -58
- package/src/Cloudflare/Workflows/WorkflowBridge.ts +81 -35
- package/src/Cloudflare/Workflows/WorkflowName.ts +41 -0
- package/src/Cloudflare/Zaraz/Config.ts +7 -2
- package/src/Cloudflare/Zone/Hold.ts +7 -4
- package/src/Cloudflare/Zone/Zone.ts +1 -0
- package/src/Command/Dev.ts +42 -10
- package/src/Docker/Container.ts +14 -2
- package/src/Drizzle/Postgres.ts +51 -23
- package/src/Drizzle/Schema.ts +12 -5
- 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/Branch.ts +15 -3
- package/src/Neon/Project.ts +2 -2
- package/src/Output.ts +18 -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/Postgres/PostgresRole.ts +2 -2
- package/src/Planetscale/Util.ts +4 -3
- package/src/Platform.ts +74 -7
- package/src/Provider.ts +88 -3
- package/src/Ref.ts +10 -0
- package/src/Resource.ts +50 -1
- package/src/Stack.ts +1 -1
- package/src/State/HttpStateStore.ts +51 -9
- package/src/Sync.ts +497 -0
- package/src/Test/Bun.ts +4 -0
- package/src/Test/Http.ts +138 -3
- package/src/Test/Vitest.ts +11 -0
- package/src/Util/data.ts +14 -5
- package/src/Util/poll.ts +1 -1
- package/src/Util/proxy-chain.ts +9 -12
- package/src/index.ts +1 -0
- 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
|
@@ -18,14 +18,16 @@ import * as ProviderLayer from "../../Local/ProviderLayer.ts";
|
|
|
18
18
|
import * as Provider from "../../Provider.ts";
|
|
19
19
|
import { type ResourceBinding } from "../../Resource.ts";
|
|
20
20
|
import { Stack } from "../../Stack.ts";
|
|
21
|
+
import { sha256Object } from "../../Util/sha256.ts";
|
|
21
22
|
import { CloudflareEnvironment } from "../CloudflareEnvironment.ts";
|
|
22
23
|
import { CloudflareLogs } from "../Logs.ts";
|
|
24
|
+
import { listAllZones, resolveZoneId } from "../Zone/lookup.ts";
|
|
23
25
|
import { readAssets, uploadAssets } from "./Assets.ts";
|
|
24
26
|
import { getCompatibility } from "./Compatibility.ts";
|
|
25
27
|
import { isDurableObjectExport } from "./DurableObject.ts";
|
|
26
28
|
import { LocalWorkerProvider } from "./LocalWorkerProvider.ts";
|
|
27
|
-
import { Worker, type WorkerProps } from "./Worker.ts";
|
|
28
|
-
import { getCronBindings } from "./WorkerAsyncBindings.ts";
|
|
29
|
+
import { Worker, type WorkerProps, type WorkerRouteConfig } from "./Worker.ts";
|
|
30
|
+
import { getCacheBinding, getCronBindings } from "./WorkerAsyncBindings.ts";
|
|
29
31
|
import type { WorkerBinding, WorkerSettingsBinding } from "./WorkerBinding.ts";
|
|
30
32
|
import { readPrebuiltWorkerBundle, WorkerBundle } from "./WorkerBundle.ts";
|
|
31
33
|
import { isWorkerLoader } from "./WorkerLoader.ts";
|
|
@@ -91,9 +93,45 @@ const getScriptSettings = (
|
|
|
91
93
|
});
|
|
92
94
|
});
|
|
93
95
|
|
|
96
|
+
/**
|
|
97
|
+
* Deploy-time binding validation rejects an upload whose bindings
|
|
98
|
+
* reference a resource Cloudflare can't see (each resource type has
|
|
99
|
+
* its own typed not-found error, verified against the live API).
|
|
100
|
+
* Every bound resource is provisioned before the Worker deploys —
|
|
101
|
+
* dependency order for KV/R2/D1/queues/etc., a pre-created stub
|
|
102
|
+
* (which exports the Durable Object classes) for circular
|
|
103
|
+
* Worker↔Worker references — so a not-found here is either
|
|
104
|
+
* propagation lag on a just-created resource (a Secrets Store secret
|
|
105
|
+
* still `pending`, a stub script not yet in the registry) that
|
|
106
|
+
* retrying converges, or a genuine misconfiguration that keeps
|
|
107
|
+
* failing and surfaces as the typed error once the bounded budget is
|
|
108
|
+
* exhausted.
|
|
109
|
+
*/
|
|
110
|
+
const isBindingTargetNotFound = (
|
|
111
|
+
e:
|
|
112
|
+
| Effect.Error<ReturnType<typeof workers.putScript>>
|
|
113
|
+
| Effect.Error<ReturnType<typeof wfp.putDispatchNamespaceScript>>,
|
|
114
|
+
): boolean =>
|
|
115
|
+
e._tag === "SecretsStoreBindingNotFound" ||
|
|
116
|
+
e._tag === "KVNamespaceNotFound" ||
|
|
117
|
+
e._tag === "R2BucketNotFound" ||
|
|
118
|
+
e._tag === "D1DatabaseNotFound" ||
|
|
119
|
+
e._tag === "QueueNotFound" ||
|
|
120
|
+
e._tag === "ServiceBindingNotFound" ||
|
|
121
|
+
e._tag === "DurableObjectClassNotFound" ||
|
|
122
|
+
e._tag === "HyperdriveConfigNotFound" ||
|
|
123
|
+
e._tag === "VectorizeIndexNotFound" ||
|
|
124
|
+
e._tag === "DispatchNamespaceNotFound" ||
|
|
125
|
+
e._tag === "MtlsCertificateNotFound";
|
|
126
|
+
|
|
127
|
+
const bindingTargetNotFoundRetrySchedule = () =>
|
|
128
|
+
Schedule.max([Schedule.fixed("2 seconds"), Schedule.recurs(10)]);
|
|
129
|
+
|
|
94
130
|
/**
|
|
95
131
|
* Upsert a Worker script, routing to the dispatch-namespace endpoint when
|
|
96
|
-
* `dispatchNamespace` is set. The metadata/files contract is identical
|
|
132
|
+
* `dispatchNamespace` is set. The metadata/files contract is identical, and
|
|
133
|
+
* both endpoints run the same binding validation (see
|
|
134
|
+
* {@link isBindingTargetNotFound}), so both get the same bounded retry.
|
|
97
135
|
*
|
|
98
136
|
* @internal
|
|
99
137
|
*/
|
|
@@ -106,21 +144,35 @@ const putWorkerScript = (params: {
|
|
|
106
144
|
}) =>
|
|
107
145
|
Effect.gen(function* () {
|
|
108
146
|
if (params.dispatchNamespace) {
|
|
109
|
-
return yield* wfp
|
|
147
|
+
return yield* wfp
|
|
148
|
+
.putDispatchNamespaceScript({
|
|
149
|
+
accountId: params.accountId,
|
|
150
|
+
dispatchNamespace: params.dispatchNamespace,
|
|
151
|
+
scriptName: params.scriptName,
|
|
152
|
+
metadata:
|
|
153
|
+
params.metadata as unknown as wfp.PutDispatchNamespaceScriptRequest["metadata"],
|
|
154
|
+
files: params.files,
|
|
155
|
+
})
|
|
156
|
+
.pipe(
|
|
157
|
+
Effect.retry({
|
|
158
|
+
while: isBindingTargetNotFound,
|
|
159
|
+
schedule: bindingTargetNotFoundRetrySchedule(),
|
|
160
|
+
}),
|
|
161
|
+
);
|
|
162
|
+
}
|
|
163
|
+
return yield* workers
|
|
164
|
+
.putScript({
|
|
110
165
|
accountId: params.accountId,
|
|
111
|
-
dispatchNamespace: params.dispatchNamespace,
|
|
112
166
|
scriptName: params.scriptName,
|
|
113
|
-
metadata:
|
|
114
|
-
params.metadata as unknown as wfp.PutDispatchNamespaceScriptRequest["metadata"],
|
|
167
|
+
metadata: params.metadata,
|
|
115
168
|
files: params.files,
|
|
116
|
-
})
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
});
|
|
169
|
+
})
|
|
170
|
+
.pipe(
|
|
171
|
+
Effect.retry({
|
|
172
|
+
while: isBindingTargetNotFound,
|
|
173
|
+
schedule: bindingTargetNotFoundRetrySchedule(),
|
|
174
|
+
}),
|
|
175
|
+
);
|
|
124
176
|
});
|
|
125
177
|
|
|
126
178
|
/**
|
|
@@ -167,6 +219,146 @@ export const normalizeStateDomains = (
|
|
|
167
219
|
return typeof hostname === "string" ? [`https://${hostname}`] : [];
|
|
168
220
|
});
|
|
169
221
|
|
|
222
|
+
type MetadataHashValue =
|
|
223
|
+
| string
|
|
224
|
+
| number
|
|
225
|
+
| boolean
|
|
226
|
+
| null
|
|
227
|
+
| undefined
|
|
228
|
+
| readonly MetadataHashValue[]
|
|
229
|
+
| { readonly [key: string]: MetadataHashValue };
|
|
230
|
+
|
|
231
|
+
/**
|
|
232
|
+
* Deeply materialize an arbitrary value into a JSON-stable shape for hashing:
|
|
233
|
+
* unwrap `Redacted` secrets by value, ISO-stringify `Date`s, keep plain
|
|
234
|
+
* objects/arrays/primitives, and drop Effects, functions, `undefined`, and
|
|
235
|
+
* class instances (which don't round-trip through `JSON.stringify`). Redacted
|
|
236
|
+
* values contribute by value, not by reference identity, so two
|
|
237
|
+
* independently-constructed secrets with the same contents hash identically.
|
|
238
|
+
*
|
|
239
|
+
* Effects are dropped, never executed: resource-typed `env` entries (Worker
|
|
240
|
+
* effect-classes, R2 buckets, Provider/Context tags, ...) are all Effects
|
|
241
|
+
* whose evaluation requires plan-phase context that is not available inside
|
|
242
|
+
* lifecycle operations (running one here fails with `Service not found:
|
|
243
|
+
* Cloudflare.Worker`). Their deploy-time identity is already captured by the
|
|
244
|
+
* resolved `bindings` data hashed alongside `env`, so skipping them loses no
|
|
245
|
+
* change-detection.
|
|
246
|
+
*/
|
|
247
|
+
const resolveMetadataHashValue = (
|
|
248
|
+
value: unknown,
|
|
249
|
+
): Effect.Effect<MetadataHashValue> =>
|
|
250
|
+
Effect.gen(function* () {
|
|
251
|
+
if (Effect.isEffect(value)) {
|
|
252
|
+
return undefined;
|
|
253
|
+
}
|
|
254
|
+
const resolved = Redacted.isRedacted(value) ? Redacted.value(value) : value;
|
|
255
|
+
|
|
256
|
+
if (
|
|
257
|
+
resolved === null ||
|
|
258
|
+
Predicate.isString(resolved) ||
|
|
259
|
+
Predicate.isNumber(resolved) ||
|
|
260
|
+
Predicate.isBoolean(resolved)
|
|
261
|
+
) {
|
|
262
|
+
return resolved;
|
|
263
|
+
}
|
|
264
|
+
if (resolved === undefined || Predicate.isFunction(resolved)) {
|
|
265
|
+
return undefined;
|
|
266
|
+
}
|
|
267
|
+
if (Predicate.isDate(resolved)) {
|
|
268
|
+
return resolved.toISOString();
|
|
269
|
+
}
|
|
270
|
+
if (Array.isArray(resolved)) {
|
|
271
|
+
return yield* Effect.all(
|
|
272
|
+
resolved.map((item) => resolveMetadataHashValue(item)),
|
|
273
|
+
{ concurrency: "unbounded" },
|
|
274
|
+
);
|
|
275
|
+
}
|
|
276
|
+
if (Predicate.isObject(resolved)) {
|
|
277
|
+
// Only plain objects round-trip predictably. A class instance would
|
|
278
|
+
// serialize to `{}` (or throw), so drop it rather than hash a lie.
|
|
279
|
+
const prototype = Object.getPrototypeOf(resolved);
|
|
280
|
+
if (prototype !== Object.prototype && prototype !== null) {
|
|
281
|
+
return undefined;
|
|
282
|
+
}
|
|
283
|
+
const entries = yield* Effect.all(
|
|
284
|
+
Object.entries(resolved).map(([key, nested]) =>
|
|
285
|
+
resolveMetadataHashValue(nested).pipe(
|
|
286
|
+
Effect.map(
|
|
287
|
+
(materializedNested) => [key, materializedNested] as const,
|
|
288
|
+
),
|
|
289
|
+
),
|
|
290
|
+
),
|
|
291
|
+
{ concurrency: "unbounded" },
|
|
292
|
+
);
|
|
293
|
+
return Object.fromEntries(
|
|
294
|
+
entries.filter(([, nested]) => nested !== undefined),
|
|
295
|
+
);
|
|
296
|
+
}
|
|
297
|
+
return undefined;
|
|
298
|
+
});
|
|
299
|
+
|
|
300
|
+
/**
|
|
301
|
+
* The deploy-time metadata surface of a Worker whose changes must trigger an
|
|
302
|
+
* update but that never touch the bundle/vite/asset-content hashes:
|
|
303
|
+
* compatibility, env literals, bindings, asset routing config, cache,
|
|
304
|
+
* limits, logpush, observability, placement, subdomain, and tags. See #745.
|
|
305
|
+
*/
|
|
306
|
+
interface WorkerMetadataHashInput {
|
|
307
|
+
readonly props: WorkerProps;
|
|
308
|
+
readonly bindings: readonly ResourceBinding<Worker["Binding"]>[];
|
|
309
|
+
readonly accountId: string;
|
|
310
|
+
readonly stack: { readonly name: string; readonly stage: string };
|
|
311
|
+
}
|
|
312
|
+
|
|
313
|
+
// The asset router config the resource declares (htmlHandling,
|
|
314
|
+
// notFoundHandling, ...), minus the local `directory` path (machine-specific,
|
|
315
|
+
// would break hash stability across machines) and the precomputed `hash`
|
|
316
|
+
// (already compared via `output.hash.assets`). A bare string `assets` is just
|
|
317
|
+
// a directory path, so it contributes nothing here.
|
|
318
|
+
const workerAssetConfigForHash = (assets: WorkerProps["assets"]) => {
|
|
319
|
+
if (!assets || typeof assets === "string") {
|
|
320
|
+
return undefined;
|
|
321
|
+
}
|
|
322
|
+
const { directory: _directory, ...config } = assets;
|
|
323
|
+
if (Predicate.hasProperty(config, "hash")) {
|
|
324
|
+
const { hash: _hash, ...configWithoutHash } = config;
|
|
325
|
+
return configWithoutHash;
|
|
326
|
+
}
|
|
327
|
+
return config;
|
|
328
|
+
};
|
|
329
|
+
|
|
330
|
+
/**
|
|
331
|
+
* Hash a Worker's deploy-time metadata surface so metadata-only edits are
|
|
332
|
+
* detected by the diff (#745). Previously the update decision compared only
|
|
333
|
+
* the bundle/vite/asset-content hashes, so a change to e.g. a compatibility
|
|
334
|
+
* flag or observability config planned as a noop and silently never deployed.
|
|
335
|
+
*/
|
|
336
|
+
const resolveWorkerMetadataHash = ({
|
|
337
|
+
props,
|
|
338
|
+
bindings,
|
|
339
|
+
accountId,
|
|
340
|
+
stack,
|
|
341
|
+
}: WorkerMetadataHashInput): Effect.Effect<string> =>
|
|
342
|
+
resolveMetadataHashValue({
|
|
343
|
+
accountId,
|
|
344
|
+
stack: { name: stack.name, stage: stack.stage },
|
|
345
|
+
compatibility: getCompatibility(props),
|
|
346
|
+
env: props.env,
|
|
347
|
+
bindings: bindings.map((binding) => ({
|
|
348
|
+
sid: binding.sid,
|
|
349
|
+
data: binding.data,
|
|
350
|
+
})),
|
|
351
|
+
assets: workerAssetConfigForHash(props.assets),
|
|
352
|
+
cache: props.cache,
|
|
353
|
+
limits: props.limits,
|
|
354
|
+
logpush: props.logpush,
|
|
355
|
+
observability: props.observability,
|
|
356
|
+
placement: props.placement,
|
|
357
|
+
subdomain: props.subdomain,
|
|
358
|
+
tags: props.tags,
|
|
359
|
+
url: props.url,
|
|
360
|
+
}).pipe(Effect.flatMap((metadata) => sha256Object({ metadata })));
|
|
361
|
+
|
|
170
362
|
export const WorkerProvider = () =>
|
|
171
363
|
ProviderLayer.select({
|
|
172
364
|
live: () => LiveWorkerProvider(),
|
|
@@ -296,9 +488,10 @@ export const LiveWorkerProvider = () =>
|
|
|
296
488
|
.pipe(
|
|
297
489
|
Effect.retry({
|
|
298
490
|
while: (error) => error._tag === "WorkerNotFound",
|
|
299
|
-
schedule: Schedule.
|
|
300
|
-
Schedule.
|
|
301
|
-
|
|
491
|
+
schedule: Schedule.max([
|
|
492
|
+
Schedule.exponential(200),
|
|
493
|
+
Schedule.recurs(15),
|
|
494
|
+
]),
|
|
302
495
|
}),
|
|
303
496
|
);
|
|
304
497
|
return normalizeCrons(
|
|
@@ -448,9 +641,10 @@ export const LiveWorkerProvider = () =>
|
|
|
448
641
|
.pipe(
|
|
449
642
|
Effect.retry({
|
|
450
643
|
while: (error) => error._tag === "WorkerNotFound",
|
|
451
|
-
schedule: Schedule.
|
|
452
|
-
Schedule.
|
|
453
|
-
|
|
644
|
+
schedule: Schedule.max([
|
|
645
|
+
Schedule.exponential(200),
|
|
646
|
+
Schedule.recurs(15),
|
|
647
|
+
]),
|
|
454
648
|
}),
|
|
455
649
|
);
|
|
456
650
|
return {
|
|
@@ -466,6 +660,227 @@ export const LiveWorkerProvider = () =>
|
|
|
466
660
|
return applied;
|
|
467
661
|
});
|
|
468
662
|
|
|
663
|
+
type NormalizedWorkerRoute = {
|
|
664
|
+
pattern: string;
|
|
665
|
+
zoneId: string;
|
|
666
|
+
};
|
|
667
|
+
|
|
668
|
+
const routeKey = (route: { pattern: string; zoneId: string }) =>
|
|
669
|
+
`${route.zoneId}:${route.pattern}`;
|
|
670
|
+
|
|
671
|
+
// Derive a concrete hostname inside the zone from a route pattern so
|
|
672
|
+
// zone inference can walk the DNS label hierarchy. A wildcard label
|
|
673
|
+
// (`*.example.com/*`) is replaced with a stand-in label — only the
|
|
674
|
+
// parent labels matter for finding the zone.
|
|
675
|
+
const hostnameFromPattern = (pattern: string): string => {
|
|
676
|
+
const hostPart = pattern.split("/")[0] ?? pattern;
|
|
677
|
+
return hostPart.startsWith("*.")
|
|
678
|
+
? `routes.${hostPart.slice(2)}`
|
|
679
|
+
: hostPart;
|
|
680
|
+
};
|
|
681
|
+
|
|
682
|
+
// Resolve each route's zone to a concrete zone id: an explicit
|
|
683
|
+
// `zoneId` wins, then `zone` / `zoneName` via `resolveZoneId`, and
|
|
684
|
+
// finally inference from the pattern's hostname. Duplicate
|
|
685
|
+
// `(zoneId, pattern)` pairs are dropped — Cloudflare enforces one
|
|
686
|
+
// route per pattern per zone.
|
|
687
|
+
const normalizeRoutes = (routes: WorkerRouteConfig[] | undefined) =>
|
|
688
|
+
Effect.gen(function* () {
|
|
689
|
+
if (!routes?.length) return [] as NormalizedWorkerRoute[];
|
|
690
|
+
const { accountId } = yield* yield* CloudflareEnvironment;
|
|
691
|
+
const zoneCache = new Map<string, string>();
|
|
692
|
+
const normalized: NormalizedWorkerRoute[] = [];
|
|
693
|
+
const seen = new Set<string>();
|
|
694
|
+
for (const route of routes) {
|
|
695
|
+
const pattern = route.pattern.trim();
|
|
696
|
+
const zoneId = route.zoneId
|
|
697
|
+
? route.zoneId
|
|
698
|
+
: route.zone || route.zoneName
|
|
699
|
+
? yield* resolveZoneId({
|
|
700
|
+
accountId,
|
|
701
|
+
zone: route.zone ?? route.zoneName!,
|
|
702
|
+
hostname: hostnameFromPattern(pattern),
|
|
703
|
+
})
|
|
704
|
+
: yield* inferZoneIdForHostname(
|
|
705
|
+
hostnameFromPattern(pattern),
|
|
706
|
+
zoneCache,
|
|
707
|
+
);
|
|
708
|
+
const key = routeKey({ pattern, zoneId });
|
|
709
|
+
if (seen.has(key)) continue;
|
|
710
|
+
seen.add(key);
|
|
711
|
+
normalized.push({ pattern, zoneId });
|
|
712
|
+
}
|
|
713
|
+
return normalized;
|
|
714
|
+
});
|
|
715
|
+
|
|
716
|
+
// List the routes attached to `scriptName` across the given zones.
|
|
717
|
+
// Routes without an id/pattern or owned by another script are
|
|
718
|
+
// ignored. Zones the token can't read are skipped rather than
|
|
719
|
+
// failing the whole listing.
|
|
720
|
+
const listWorkerRoutesInZones = (
|
|
721
|
+
scriptName: string,
|
|
722
|
+
zoneIds: readonly string[],
|
|
723
|
+
) => {
|
|
724
|
+
const uniqueZoneIds = Array.from(new Set(zoneIds));
|
|
725
|
+
if (uniqueZoneIds.length === 0) {
|
|
726
|
+
return Effect.succeed([] as Worker["Attributes"]["routes"]);
|
|
727
|
+
}
|
|
728
|
+
|
|
729
|
+
const routesByZone = Effect.all(
|
|
730
|
+
uniqueZoneIds.map((zoneId) =>
|
|
731
|
+
workers.listRoutes({ zoneId }).pipe(
|
|
732
|
+
Effect.map((response) =>
|
|
733
|
+
(response.result ?? []).flatMap((route) =>
|
|
734
|
+
route.id && route.pattern && route.script === scriptName
|
|
735
|
+
? [{ id: route.id, pattern: route.pattern, zoneId }]
|
|
736
|
+
: [],
|
|
737
|
+
),
|
|
738
|
+
),
|
|
739
|
+
Effect.catch(() => Effect.succeed([])),
|
|
740
|
+
),
|
|
741
|
+
),
|
|
742
|
+
{ concurrency: "unbounded" },
|
|
743
|
+
);
|
|
744
|
+
|
|
745
|
+
return Effect.map(routesByZone, (routes) => routes.flat());
|
|
746
|
+
};
|
|
747
|
+
|
|
748
|
+
// Observe every route attached to `scriptName` account-wide. Routes
|
|
749
|
+
// are zone-scoped with no account-level enumeration API, so fan out
|
|
750
|
+
// over all of the account's zones. Any failure to enumerate zones
|
|
751
|
+
// (e.g. a token without zone read scope) degrades to "no routes"
|
|
752
|
+
// rather than failing the read.
|
|
753
|
+
const readWorkerRoutes = (scriptName: string) =>
|
|
754
|
+
Effect.gen(function* () {
|
|
755
|
+
const { accountId } = yield* yield* CloudflareEnvironment;
|
|
756
|
+
const accountZones = yield* listAllZones(accountId).pipe(
|
|
757
|
+
Effect.catch(() => Effect.succeed([])),
|
|
758
|
+
);
|
|
759
|
+
return yield* listWorkerRoutesInZones(
|
|
760
|
+
scriptName,
|
|
761
|
+
accountZones.map((zone) => zone.id),
|
|
762
|
+
);
|
|
763
|
+
});
|
|
764
|
+
|
|
765
|
+
// Converge the zone routes attached to `scriptName` to `desired`.
|
|
766
|
+
// Observed cloud state (not `previous`) is the diff baseline —
|
|
767
|
+
// `previous` only contributes zone ids so routes moved out of a zone
|
|
768
|
+
// are still cleaned up after state loss or an interrupted apply.
|
|
769
|
+
const reconcileRoutes = (
|
|
770
|
+
scriptName: string,
|
|
771
|
+
desired: NormalizedWorkerRoute[],
|
|
772
|
+
previous: Worker["Attributes"]["routes"],
|
|
773
|
+
) =>
|
|
774
|
+
Effect.gen(function* () {
|
|
775
|
+
const zoneIds = Array.from(
|
|
776
|
+
new Set([
|
|
777
|
+
...desired.map((route) => route.zoneId),
|
|
778
|
+
...previous.map((route) => route.zoneId),
|
|
779
|
+
]),
|
|
780
|
+
);
|
|
781
|
+
const liveAll = yield* listWorkerRoutesInZones(scriptName, zoneIds);
|
|
782
|
+
const desiredKeys = new Set(desired.map(routeKey));
|
|
783
|
+
const liveByKey = new Map(
|
|
784
|
+
liveAll.map((route) => [routeKey(route), route]),
|
|
785
|
+
);
|
|
786
|
+
|
|
787
|
+
const toRemove = liveAll.filter(
|
|
788
|
+
(route) => !desiredKeys.has(routeKey(route)),
|
|
789
|
+
);
|
|
790
|
+
yield* Effect.all(
|
|
791
|
+
toRemove.map((route) =>
|
|
792
|
+
workers
|
|
793
|
+
.deleteRoute({ zoneId: route.zoneId, routeId: route.id })
|
|
794
|
+
.pipe(Effect.catchTag("RouteNotFound", () => Effect.void)),
|
|
795
|
+
),
|
|
796
|
+
{ concurrency: "unbounded" },
|
|
797
|
+
);
|
|
798
|
+
|
|
799
|
+
if (desired.length === 0) return [];
|
|
800
|
+
|
|
801
|
+
const attachRoute = Effect.fn(function* (
|
|
802
|
+
route: NormalizedWorkerRoute,
|
|
803
|
+
) {
|
|
804
|
+
const existing = liveByKey.get(routeKey(route));
|
|
805
|
+
if (existing) return existing;
|
|
806
|
+
|
|
807
|
+
const zoneRoutes = yield* workers
|
|
808
|
+
.listRoutes({ zoneId: route.zoneId })
|
|
809
|
+
.pipe(
|
|
810
|
+
Effect.map((response) => response.result ?? []),
|
|
811
|
+
Effect.catch(() => Effect.succeed([])),
|
|
812
|
+
);
|
|
813
|
+
const otherOwner = zoneRoutes.find(
|
|
814
|
+
(candidate) =>
|
|
815
|
+
candidate.pattern === route.pattern &&
|
|
816
|
+
candidate.script &&
|
|
817
|
+
candidate.script !== scriptName,
|
|
818
|
+
);
|
|
819
|
+
if (otherOwner) {
|
|
820
|
+
return yield* Effect.die(
|
|
821
|
+
new Error(
|
|
822
|
+
`Cannot attach route '${route.pattern}' to Worker '${scriptName}': ` +
|
|
823
|
+
`it is already attached to Worker '${otherOwner.script}'. ` +
|
|
824
|
+
`Remove it from that Worker first, or pick a different pattern.`,
|
|
825
|
+
),
|
|
826
|
+
);
|
|
827
|
+
}
|
|
828
|
+
|
|
829
|
+
// A duplicate-pattern failure means another actor (or a crashed
|
|
830
|
+
// previous reconcile) created the route between our observation
|
|
831
|
+
// and now — re-list and converge if it points at this script.
|
|
832
|
+
const created = yield* workers
|
|
833
|
+
.createRoute({
|
|
834
|
+
zoneId: route.zoneId,
|
|
835
|
+
pattern: route.pattern,
|
|
836
|
+
script: scriptName,
|
|
837
|
+
})
|
|
838
|
+
.pipe(
|
|
839
|
+
// Same eventual-consistency window as `putDomain`: creating
|
|
840
|
+
// a route right after `putScript` can race Cloudflare's
|
|
841
|
+
// script registry, which rejects with code 10019 ("Cannot
|
|
842
|
+
// configure a route for a Worker which does not exist") —
|
|
843
|
+
// typed as `RouteScriptNotFound` via the createRoute patch.
|
|
844
|
+
Effect.retry({
|
|
845
|
+
while: (error) => error._tag === "RouteScriptNotFound",
|
|
846
|
+
schedule: Schedule.max([
|
|
847
|
+
Schedule.exponential(200),
|
|
848
|
+
Schedule.recurs(15),
|
|
849
|
+
]),
|
|
850
|
+
}),
|
|
851
|
+
Effect.catchTag("InvalidRoute", (originalError) =>
|
|
852
|
+
Effect.gen(function* () {
|
|
853
|
+
const match = yield* workers
|
|
854
|
+
.listRoutes({ zoneId: route.zoneId })
|
|
855
|
+
.pipe(
|
|
856
|
+
Effect.map((response) =>
|
|
857
|
+
(response.result ?? []).find(
|
|
858
|
+
(candidate) =>
|
|
859
|
+
candidate.pattern === route.pattern &&
|
|
860
|
+
candidate.script === scriptName,
|
|
861
|
+
),
|
|
862
|
+
),
|
|
863
|
+
Effect.catch(() => Effect.succeed(undefined)),
|
|
864
|
+
);
|
|
865
|
+
if (!match?.id) {
|
|
866
|
+
return yield* Effect.fail(originalError);
|
|
867
|
+
}
|
|
868
|
+
return { id: match.id, pattern: match.pattern };
|
|
869
|
+
}),
|
|
870
|
+
),
|
|
871
|
+
);
|
|
872
|
+
return {
|
|
873
|
+
id: created.id,
|
|
874
|
+
pattern: created.pattern,
|
|
875
|
+
zoneId: route.zoneId,
|
|
876
|
+
};
|
|
877
|
+
});
|
|
878
|
+
|
|
879
|
+
return yield* Effect.all(desired.map(attachRoute), {
|
|
880
|
+
concurrency: "unbounded",
|
|
881
|
+
});
|
|
882
|
+
});
|
|
883
|
+
|
|
469
884
|
const createAlchemyWorkerTags = (id: string) => [
|
|
470
885
|
`alchemy:stack:${stack.name}`,
|
|
471
886
|
`alchemy:stage:${stack.stage}`,
|
|
@@ -556,9 +971,10 @@ export const LiveWorkerProvider = () =>
|
|
|
556
971
|
error._tag === "WorkerNotFound" ||
|
|
557
972
|
error._tag === "DispatchNamespaceScriptNotFound" ||
|
|
558
973
|
error._tag === "DispatchNamespaceNotFound",
|
|
559
|
-
schedule: Schedule.
|
|
560
|
-
Schedule.
|
|
561
|
-
|
|
974
|
+
schedule: Schedule.max([
|
|
975
|
+
Schedule.exponential(100),
|
|
976
|
+
Schedule.recurs(20),
|
|
977
|
+
]),
|
|
562
978
|
}),
|
|
563
979
|
);
|
|
564
980
|
});
|
|
@@ -643,6 +1059,7 @@ export const LiveWorkerProvider = () =>
|
|
|
643
1059
|
)).filter(([_, value]) => value !== undefined),
|
|
644
1060
|
),
|
|
645
1061
|
{
|
|
1062
|
+
main: props.vite?.main,
|
|
646
1063
|
compatibilityDate: compatibility.date,
|
|
647
1064
|
compatibilityFlags: compatibility.flags,
|
|
648
1065
|
viteEnvironments: props.vite?.viteEnvironments,
|
|
@@ -794,9 +1211,16 @@ export const LiveWorkerProvider = () =>
|
|
|
794
1211
|
// hash that `readAssets` produces is the manifest-derived
|
|
795
1212
|
// hash, which is shaped differently from any upstream
|
|
796
1213
|
// build-input hash and will never match it on the next pass.
|
|
1214
|
+
const metadataHash = yield* resolveWorkerMetadataHash({
|
|
1215
|
+
props: news,
|
|
1216
|
+
bindings,
|
|
1217
|
+
accountId,
|
|
1218
|
+
stack: { name: stack.name, stage: stack.stage },
|
|
1219
|
+
});
|
|
797
1220
|
const hash = {
|
|
798
1221
|
...preparedHash,
|
|
799
1222
|
assets: prebuiltAssets?.hash ?? preparedHash.assets,
|
|
1223
|
+
metadata: metadataHash,
|
|
800
1224
|
} satisfies Worker["Attributes"]["hash"];
|
|
801
1225
|
const metadataBindings = bindings.flatMap((b) => b.data.bindings ?? []);
|
|
802
1226
|
const expectedDurableObjectClassNames =
|
|
@@ -1081,6 +1505,7 @@ export const LiveWorkerProvider = () =>
|
|
|
1081
1505
|
assets: metadataAssets,
|
|
1082
1506
|
bindings: metadataBindings,
|
|
1083
1507
|
bodyPart: undefined,
|
|
1508
|
+
cache: news.cache ?? getCacheBinding(bindings),
|
|
1084
1509
|
compatibilityDate: compatibility.date,
|
|
1085
1510
|
compatibilityFlags: compatibility.flags,
|
|
1086
1511
|
containers:
|
|
@@ -1152,7 +1577,8 @@ export const LiveWorkerProvider = () =>
|
|
|
1152
1577
|
);
|
|
1153
1578
|
// Workers for Platforms user workers are invoked via dynamic dispatch,
|
|
1154
1579
|
// never routed directly — they have no workers.dev subdomain, custom
|
|
1155
|
-
// domains, or cron triggers. Skip all of that
|
|
1580
|
+
// domains, zone routes, or cron triggers. Skip all of that
|
|
1581
|
+
// reconciliation.
|
|
1156
1582
|
if (dispatchNamespace) {
|
|
1157
1583
|
return {
|
|
1158
1584
|
workerId: worker.id ?? name,
|
|
@@ -1164,6 +1590,7 @@ export const LiveWorkerProvider = () =>
|
|
|
1164
1590
|
durableObjectNamespaces,
|
|
1165
1591
|
accountId,
|
|
1166
1592
|
domains: [],
|
|
1593
|
+
routes: [],
|
|
1167
1594
|
crons: [],
|
|
1168
1595
|
hash,
|
|
1169
1596
|
} satisfies Worker["Attributes"];
|
|
@@ -1208,9 +1635,10 @@ export const LiveWorkerProvider = () =>
|
|
|
1208
1635
|
error._tag === "WorkerNotFound" ||
|
|
1209
1636
|
error._tag === "InternalServerError" ||
|
|
1210
1637
|
error._tag === "UnknownCloudflareError",
|
|
1211
|
-
schedule: Schedule.
|
|
1212
|
-
Schedule.
|
|
1213
|
-
|
|
1638
|
+
schedule: Schedule.max([
|
|
1639
|
+
Schedule.exponential(200),
|
|
1640
|
+
Schedule.recurs(15),
|
|
1641
|
+
]),
|
|
1214
1642
|
}),
|
|
1215
1643
|
);
|
|
1216
1644
|
}
|
|
@@ -1230,6 +1658,18 @@ export const LiveWorkerProvider = () =>
|
|
|
1230
1658
|
...reconciled.map((d) => `https://${d.hostname}`),
|
|
1231
1659
|
...(workersDevUrl ? [workersDevUrl] : []),
|
|
1232
1660
|
];
|
|
1661
|
+
const desiredRoutes = yield* normalizeRoutes(news.routes);
|
|
1662
|
+
const previousRoutes = output?.routes ?? [];
|
|
1663
|
+
if (desiredRoutes.length > 0 || previousRoutes.length > 0) {
|
|
1664
|
+
yield* session.note(
|
|
1665
|
+
`Reconciling worker routes (${desiredRoutes.length}) ...`,
|
|
1666
|
+
);
|
|
1667
|
+
}
|
|
1668
|
+
const routes = yield* reconcileRoutes(
|
|
1669
|
+
name,
|
|
1670
|
+
desiredRoutes,
|
|
1671
|
+
previousRoutes,
|
|
1672
|
+
);
|
|
1233
1673
|
const crons = yield* reconcileCrons(
|
|
1234
1674
|
name,
|
|
1235
1675
|
normalizeCrons([...getCronBindings(bindings), ...(news.crons ?? [])]),
|
|
@@ -1246,6 +1686,7 @@ export const LiveWorkerProvider = () =>
|
|
|
1246
1686
|
durableObjectNamespaces,
|
|
1247
1687
|
accountId,
|
|
1248
1688
|
domains,
|
|
1689
|
+
routes,
|
|
1249
1690
|
crons,
|
|
1250
1691
|
hash,
|
|
1251
1692
|
} satisfies Worker["Attributes"];
|
|
@@ -1255,7 +1696,26 @@ export const LiveWorkerProvider = () =>
|
|
|
1255
1696
|
id: string,
|
|
1256
1697
|
props: WorkerProps,
|
|
1257
1698
|
output: Worker["Attributes"],
|
|
1699
|
+
bindings: readonly ResourceBinding<Worker["Binding"]>[] | undefined,
|
|
1700
|
+
accountId: string,
|
|
1258
1701
|
) {
|
|
1702
|
+
// #745: metadata-only edits (compatibility, observability, placement,
|
|
1703
|
+
// limits, logpush, env literals, bindings, subdomain config, tags)
|
|
1704
|
+
// don't touch the bundle/vite/asset-content hashes below, so compare a
|
|
1705
|
+
// hash of that surface first. Skipped when bindings are still
|
|
1706
|
+
// unresolved: the hash can't be computed deterministically here, and
|
|
1707
|
+
// the eventual apply stores it once bindings resolve.
|
|
1708
|
+
if (bindings) {
|
|
1709
|
+
const metadataHash = yield* resolveWorkerMetadataHash({
|
|
1710
|
+
props,
|
|
1711
|
+
bindings,
|
|
1712
|
+
accountId,
|
|
1713
|
+
stack: { name: stack.name, stage: stack.stage },
|
|
1714
|
+
});
|
|
1715
|
+
if (metadataHash !== output.hash?.metadata) {
|
|
1716
|
+
return true;
|
|
1717
|
+
}
|
|
1718
|
+
}
|
|
1259
1719
|
if (props.script !== undefined) {
|
|
1260
1720
|
const scriptHash = yield* hashScript(props.script);
|
|
1261
1721
|
if (scriptHash !== output.hash?.bundle) {
|
|
@@ -1357,6 +1817,7 @@ export const LiveWorkerProvider = () =>
|
|
|
1357
1817
|
tags: script.tags ?? undefined,
|
|
1358
1818
|
durableObjectNamespaces: {},
|
|
1359
1819
|
domains: [],
|
|
1820
|
+
routes: [],
|
|
1360
1821
|
crons: [],
|
|
1361
1822
|
},
|
|
1362
1823
|
]
|
|
@@ -1412,6 +1873,13 @@ export const LiveWorkerProvider = () =>
|
|
|
1412
1873
|
const cronsChanged =
|
|
1413
1874
|
newCrons.length !== oldCrons.length ||
|
|
1414
1875
|
newCrons.some((cron, index) => cron !== oldCrons[index]);
|
|
1876
|
+
const newRouteKeys = (yield* normalizeRoutes(news.routes))
|
|
1877
|
+
.map(routeKey)
|
|
1878
|
+
.sort();
|
|
1879
|
+
const oldRouteKeys = (output?.routes ?? []).map(routeKey).sort();
|
|
1880
|
+
const routesChanged =
|
|
1881
|
+
newRouteKeys.length !== oldRouteKeys.length ||
|
|
1882
|
+
newRouteKeys.some((key, index) => key !== oldRouteKeys[index]);
|
|
1415
1883
|
// `url` is `domains[0]`: the first custom domain in user order if
|
|
1416
1884
|
// any, otherwise the workers.dev URL (derived from the stable
|
|
1417
1885
|
// worker name + account subdomain). It's stable across this update
|
|
@@ -1465,8 +1933,17 @@ export const LiveWorkerProvider = () =>
|
|
|
1465
1933
|
newDoClassNames.every((name, i) => name === oldDoClassNames[i]);
|
|
1466
1934
|
if (
|
|
1467
1935
|
domainsChanged ||
|
|
1936
|
+
routesChanged ||
|
|
1468
1937
|
cronsChanged ||
|
|
1469
|
-
(yield* hasChanged(
|
|
1938
|
+
(yield* hasChanged(
|
|
1939
|
+
id,
|
|
1940
|
+
news,
|
|
1941
|
+
output,
|
|
1942
|
+
Array.isArray(newBindings)
|
|
1943
|
+
? (newBindings as ResourceBinding<Worker["Binding"]>[])
|
|
1944
|
+
: undefined,
|
|
1945
|
+
accountId,
|
|
1946
|
+
))
|
|
1470
1947
|
) {
|
|
1471
1948
|
// `workerId` is always stable across an update; seed it so it
|
|
1472
1949
|
// survives now that `diff.stables` overrides `provider.stables`
|
|
@@ -1487,7 +1964,7 @@ export const LiveWorkerProvider = () =>
|
|
|
1487
1964
|
};
|
|
1488
1965
|
}
|
|
1489
1966
|
}),
|
|
1490
|
-
precreate: Effect.fn(function* ({ id, news, session }) {
|
|
1967
|
+
precreate: Effect.fn(function* ({ id, news, session, bindings }) {
|
|
1491
1968
|
const { accountId } = yield* yield* CloudflareEnvironment;
|
|
1492
1969
|
const name = yield* createWorkerName(id, news.name);
|
|
1493
1970
|
// A Workers for Platforms user worker can't be pre-created: precreate
|
|
@@ -1513,19 +1990,41 @@ export const LiveWorkerProvider = () =>
|
|
|
1513
1990
|
durableObjectNamespaces: {},
|
|
1514
1991
|
accountId,
|
|
1515
1992
|
domains: [],
|
|
1993
|
+
routes: [],
|
|
1516
1994
|
crons: [],
|
|
1517
1995
|
} satisfies Worker["Attributes"];
|
|
1518
1996
|
}
|
|
1519
1997
|
const dispatchNamespace = resolveNamespaceName(news.namespace);
|
|
1520
1998
|
const exportMap = news.exports ?? {};
|
|
1521
|
-
|
|
1999
|
+
// A worker hosts Durable Object classes from two independent sources:
|
|
2000
|
+
// Effect-native DO *exports* (classes defined in the worker entry) and
|
|
2001
|
+
// DO *bindings* declared in `env` — e.g. a bare `Cloudflare.DurableObject`
|
|
2002
|
+
// that fronts a Container image. The placeholder must declare *every*
|
|
2003
|
+
// hosted class so each namespace is created here. A class that exists
|
|
2004
|
+
// only as a binding (a container-fronted DO) is otherwise absent from
|
|
2005
|
+
// this stub, and a resource caught in a worker<->container dependency
|
|
2006
|
+
// cycle — which resolves `worker.durableObjectNamespaces[className]`
|
|
2007
|
+
// against the precreate stub rather than the final reconcile output —
|
|
2008
|
+
// fails because the namespace id it needs never surfaced.
|
|
2009
|
+
const exportDerived = Object.keys(exportMap)
|
|
1522
2010
|
.filter((logicalId) => isDurableObjectExport(exportMap[logicalId]))
|
|
1523
|
-
.map((logicalId) => ({
|
|
1524
|
-
|
|
1525
|
-
|
|
1526
|
-
|
|
2011
|
+
.map((logicalId) => ({ logicalId, className: logicalId }));
|
|
2012
|
+
const durableObjects = mergeDurableObjectClasses(
|
|
2013
|
+
exportDerived,
|
|
2014
|
+
getDurableObjectBindings(bindings, name),
|
|
2015
|
+
);
|
|
1527
2016
|
const doClasses = durableObjects.map((binding) => binding.className);
|
|
1528
|
-
|
|
2017
|
+
// Only attach container metadata for classes actually fronted by a
|
|
2018
|
+
// Container binding (mirrors reconcile's `containerClassNames`).
|
|
2019
|
+
// Mapping every DO class to a container would wrongly mark plain DOs
|
|
2020
|
+
// as container-backed in the placeholder.
|
|
2021
|
+
const containers = Array.from(
|
|
2022
|
+
new Set(
|
|
2023
|
+
bindings.flatMap((b) =>
|
|
2024
|
+
(b.data.containers ?? []).map((c) => c.className),
|
|
2025
|
+
),
|
|
2026
|
+
),
|
|
2027
|
+
).map((className) => ({ className }));
|
|
1529
2028
|
const alchemyDoTags = durableObjects.map(
|
|
1530
2029
|
({ logicalId, className }) =>
|
|
1531
2030
|
`alchemy:do:${logicalId}:${className}`,
|
|
@@ -1641,9 +2140,10 @@ export const LiveWorkerProvider = () =>
|
|
|
1641
2140
|
while: (e) =>
|
|
1642
2141
|
e._tag === "InternalServerError" ||
|
|
1643
2142
|
e._tag === "UnknownCloudflareError",
|
|
1644
|
-
schedule: Schedule.
|
|
1645
|
-
Schedule.
|
|
1646
|
-
|
|
2143
|
+
schedule: Schedule.max([
|
|
2144
|
+
Schedule.exponential(1000),
|
|
2145
|
+
Schedule.recurs(5),
|
|
2146
|
+
]),
|
|
1647
2147
|
}),
|
|
1648
2148
|
);
|
|
1649
2149
|
if (doClasses.length > 0) {
|
|
@@ -1675,6 +2175,7 @@ export const LiveWorkerProvider = () =>
|
|
|
1675
2175
|
durableObjectNamespaces,
|
|
1676
2176
|
accountId,
|
|
1677
2177
|
domains: [],
|
|
2178
|
+
routes: [],
|
|
1678
2179
|
crons: [],
|
|
1679
2180
|
} satisfies Worker["Attributes"];
|
|
1680
2181
|
}),
|
|
@@ -1711,6 +2212,7 @@ export const LiveWorkerProvider = () =>
|
|
|
1711
2212
|
tags: settings.tags ?? undefined,
|
|
1712
2213
|
durableObjectNamespaces: getDurableObjects(settings.bindings),
|
|
1713
2214
|
domains: [],
|
|
2215
|
+
routes: [],
|
|
1714
2216
|
crons: [],
|
|
1715
2217
|
} satisfies Worker["Attributes"];
|
|
1716
2218
|
return hasAlchemyWorkerTags(id, settings.tags ?? [])
|
|
@@ -1726,22 +2228,27 @@ export const LiveWorkerProvider = () =>
|
|
|
1726
2228
|
// `WorkerNotFound` if the script doesn't exist, which the
|
|
1727
2229
|
// surrounding `Effect.catchTag` turns into `undefined` — that's
|
|
1728
2230
|
// all the existence check we need.
|
|
1729
|
-
const [subdomain, settings, domainsList] =
|
|
1730
|
-
|
|
1731
|
-
|
|
1732
|
-
|
|
1733
|
-
|
|
1734
|
-
|
|
1735
|
-
|
|
1736
|
-
|
|
1737
|
-
|
|
1738
|
-
|
|
1739
|
-
|
|
1740
|
-
|
|
1741
|
-
|
|
1742
|
-
|
|
1743
|
-
|
|
1744
|
-
|
|
2231
|
+
const [subdomain, settings, domainsList, routesList] =
|
|
2232
|
+
yield* Effect.all(
|
|
2233
|
+
[
|
|
2234
|
+
workers.getScriptSubdomain({
|
|
2235
|
+
accountId,
|
|
2236
|
+
scriptName: workerName,
|
|
2237
|
+
}),
|
|
2238
|
+
workers.getScriptScriptAndVersionSetting({
|
|
2239
|
+
accountId,
|
|
2240
|
+
scriptName: workerName,
|
|
2241
|
+
}),
|
|
2242
|
+
workers
|
|
2243
|
+
.listDomains({
|
|
2244
|
+
accountId,
|
|
2245
|
+
service: workerName,
|
|
2246
|
+
})
|
|
2247
|
+
.pipe(Effect.map((r) => r.result ?? [])),
|
|
2248
|
+
readWorkerRoutes(workerName),
|
|
2249
|
+
],
|
|
2250
|
+
{ concurrency: "unbounded" },
|
|
2251
|
+
);
|
|
1745
2252
|
// Preserve the order the user provided in `olds.domain`. The
|
|
1746
2253
|
// Cloudflare API returns domains in non-deterministic order,
|
|
1747
2254
|
// which would cause downstream `worker.domains[0]` reads to flip
|
|
@@ -1780,6 +2287,7 @@ export const LiveWorkerProvider = () =>
|
|
|
1780
2287
|
tags: settings.tags ?? undefined,
|
|
1781
2288
|
durableObjectNamespaces: getDurableObjects(settings.bindings),
|
|
1782
2289
|
domains,
|
|
2290
|
+
routes: routesList,
|
|
1783
2291
|
crons,
|
|
1784
2292
|
} satisfies Worker["Attributes"];
|
|
1785
2293
|
|
|
@@ -1946,6 +2454,22 @@ export const LiveWorkerProvider = () =>
|
|
|
1946
2454
|
{ concurrency: "unbounded" },
|
|
1947
2455
|
);
|
|
1948
2456
|
}
|
|
2457
|
+
// Routes are zone-scoped; enumerating every zone live is
|
|
2458
|
+
// expensive, so trust the persisted route ids (refreshed by
|
|
2459
|
+
// `read`) and tolerate already-deleted routes.
|
|
2460
|
+
if (output.routes?.length) {
|
|
2461
|
+
yield* Effect.all(
|
|
2462
|
+
output.routes.map((route) =>
|
|
2463
|
+
workers
|
|
2464
|
+
.deleteRoute({
|
|
2465
|
+
zoneId: route.zoneId,
|
|
2466
|
+
routeId: route.id,
|
|
2467
|
+
})
|
|
2468
|
+
.pipe(Effect.catchTag("RouteNotFound", () => Effect.void)),
|
|
2469
|
+
),
|
|
2470
|
+
{ concurrency: "unbounded" },
|
|
2471
|
+
);
|
|
2472
|
+
}
|
|
1949
2473
|
yield* deleteWorkerScript(
|
|
1950
2474
|
output.accountId,
|
|
1951
2475
|
output.workerName,
|
|
@@ -2006,6 +2530,25 @@ function bumpMigrationTagVersion(
|
|
|
2006
2530
|
return `alchemy:v${parseInt(version, 10) + 1}`;
|
|
2007
2531
|
}
|
|
2008
2532
|
|
|
2533
|
+
/**
|
|
2534
|
+
* Merges a worker's export-derived and binding-derived Durable Object class
|
|
2535
|
+
* lists for the precreate placeholder, deduping by class name. The
|
|
2536
|
+
* binding-derived entry wins on a collision so the `alchemy:do:` tag keys off
|
|
2537
|
+
* the same logical id (the binding sid) that `reconcile` writes.
|
|
2538
|
+
*/
|
|
2539
|
+
function mergeDurableObjectClasses(
|
|
2540
|
+
exportDerived: ReadonlyArray<{ logicalId: string; className: string }>,
|
|
2541
|
+
bindingDerived: ReadonlyArray<{ logicalId: string; className: string }>,
|
|
2542
|
+
) {
|
|
2543
|
+
return Array.from(
|
|
2544
|
+
new Map(
|
|
2545
|
+
[...exportDerived, ...bindingDerived].map(
|
|
2546
|
+
(binding) => [binding.className, binding] as const,
|
|
2547
|
+
),
|
|
2548
|
+
).values(),
|
|
2549
|
+
);
|
|
2550
|
+
}
|
|
2551
|
+
|
|
2009
2552
|
function getDurableObjectBindings(
|
|
2010
2553
|
bindings: ReadonlyArray<ResourceBinding>,
|
|
2011
2554
|
workerName: string,
|