alchemy 2.0.0-beta.64 → 2.0.0-beta.66
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bin/exec.js +433 -181
- package/bin/exec.js.map +1 -1
- package/lib/AWS/ApiGateway/common.d.ts.map +1 -1
- package/lib/AWS/ApiGateway/common.js +8 -1
- package/lib/AWS/ApiGateway/common.js.map +1 -1
- package/lib/AWS/Bedrock/LanguageModel.d.ts +208 -0
- package/lib/AWS/Bedrock/LanguageModel.d.ts.map +1 -0
- package/lib/AWS/Bedrock/LanguageModel.js +508 -0
- package/lib/AWS/Bedrock/LanguageModel.js.map +1 -0
- package/lib/AWS/Bedrock/LanguageModelHttp.d.ts +10 -0
- package/lib/AWS/Bedrock/LanguageModelHttp.d.ts.map +1 -0
- package/lib/AWS/Bedrock/LanguageModelHttp.js +26 -0
- package/lib/AWS/Bedrock/LanguageModelHttp.js.map +1 -0
- package/lib/AWS/Bedrock/index.d.ts +2 -0
- package/lib/AWS/Bedrock/index.d.ts.map +1 -1
- package/lib/AWS/Bedrock/index.js +2 -0
- package/lib/AWS/Bedrock/index.js.map +1 -1
- package/lib/AWS/CloudFront/Distribution.d.ts +24 -0
- package/lib/AWS/CloudFront/Distribution.d.ts.map +1 -1
- package/lib/AWS/CloudFront/Distribution.js +89 -4
- package/lib/AWS/CloudFront/Distribution.js.map +1 -1
- package/lib/AWS/CostExplorer/AnomalyMonitor.d.ts +1 -1
- package/lib/AWS/CostExplorer/AnomalyMonitor.d.ts.map +1 -1
- package/lib/AWS/CostExplorer/AnomalySubscription.d.ts +1 -1
- package/lib/AWS/CostExplorer/AnomalySubscription.d.ts.map +1 -1
- package/lib/AWS/CostExplorer/BindingHttp.d.ts +3 -3
- package/lib/AWS/CostExplorer/BindingHttp.d.ts.map +1 -1
- package/lib/AWS/CostExplorer/CostCategory.d.ts +1 -1
- package/lib/AWS/CostExplorer/CostCategory.d.ts.map +1 -1
- package/lib/AWS/CostExplorer/GetAnomaliesHttp.d.ts +1 -1
- package/lib/AWS/CostExplorer/GetAnomaliesHttp.d.ts.map +1 -1
- package/lib/AWS/CostExplorer/GetApproximateUsageRecordsHttp.d.ts +1 -1
- package/lib/AWS/CostExplorer/GetApproximateUsageRecordsHttp.d.ts.map +1 -1
- package/lib/AWS/CostExplorer/GetCommitmentPurchaseAnalysisHttp.d.ts +1 -1
- package/lib/AWS/CostExplorer/GetCommitmentPurchaseAnalysisHttp.d.ts.map +1 -1
- package/lib/AWS/CostExplorer/GetCostAndUsageComparisonsHttp.d.ts +1 -1
- package/lib/AWS/CostExplorer/GetCostAndUsageComparisonsHttp.d.ts.map +1 -1
- package/lib/AWS/CostExplorer/GetCostAndUsageHttp.d.ts +1 -1
- package/lib/AWS/CostExplorer/GetCostAndUsageHttp.d.ts.map +1 -1
- package/lib/AWS/CostExplorer/GetCostAndUsageWithResourcesHttp.d.ts +1 -1
- package/lib/AWS/CostExplorer/GetCostAndUsageWithResourcesHttp.d.ts.map +1 -1
- package/lib/AWS/CostExplorer/GetCostCategoriesHttp.d.ts +1 -1
- package/lib/AWS/CostExplorer/GetCostCategoriesHttp.d.ts.map +1 -1
- package/lib/AWS/CostExplorer/GetCostComparisonDriversHttp.d.ts +1 -1
- package/lib/AWS/CostExplorer/GetCostComparisonDriversHttp.d.ts.map +1 -1
- package/lib/AWS/CostExplorer/GetCostForecastHttp.d.ts +1 -1
- package/lib/AWS/CostExplorer/GetCostForecastHttp.d.ts.map +1 -1
- package/lib/AWS/CostExplorer/GetDimensionValuesHttp.d.ts +1 -1
- package/lib/AWS/CostExplorer/GetDimensionValuesHttp.d.ts.map +1 -1
- package/lib/AWS/CostExplorer/GetReservationCoverageHttp.d.ts +1 -1
- package/lib/AWS/CostExplorer/GetReservationCoverageHttp.d.ts.map +1 -1
- package/lib/AWS/CostExplorer/GetReservationPurchaseRecommendationHttp.d.ts +1 -1
- package/lib/AWS/CostExplorer/GetReservationPurchaseRecommendationHttp.d.ts.map +1 -1
- package/lib/AWS/CostExplorer/GetReservationUtilizationHttp.d.ts +1 -1
- package/lib/AWS/CostExplorer/GetReservationUtilizationHttp.d.ts.map +1 -1
- package/lib/AWS/CostExplorer/GetRightsizingRecommendationHttp.d.ts +1 -1
- package/lib/AWS/CostExplorer/GetRightsizingRecommendationHttp.d.ts.map +1 -1
- package/lib/AWS/CostExplorer/GetSavingsPlanPurchaseRecommendationDetailsHttp.d.ts +1 -1
- package/lib/AWS/CostExplorer/GetSavingsPlanPurchaseRecommendationDetailsHttp.d.ts.map +1 -1
- package/lib/AWS/CostExplorer/GetSavingsPlansCoverageHttp.d.ts +1 -1
- package/lib/AWS/CostExplorer/GetSavingsPlansCoverageHttp.d.ts.map +1 -1
- package/lib/AWS/CostExplorer/GetSavingsPlansPurchaseRecommendationHttp.d.ts +1 -1
- package/lib/AWS/CostExplorer/GetSavingsPlansPurchaseRecommendationHttp.d.ts.map +1 -1
- package/lib/AWS/CostExplorer/GetSavingsPlansUtilizationDetailsHttp.d.ts +1 -1
- package/lib/AWS/CostExplorer/GetSavingsPlansUtilizationDetailsHttp.d.ts.map +1 -1
- package/lib/AWS/CostExplorer/GetSavingsPlansUtilizationHttp.d.ts +1 -1
- package/lib/AWS/CostExplorer/GetSavingsPlansUtilizationHttp.d.ts.map +1 -1
- package/lib/AWS/CostExplorer/GetTagsHttp.d.ts +1 -1
- package/lib/AWS/CostExplorer/GetTagsHttp.d.ts.map +1 -1
- package/lib/AWS/CostExplorer/GetUsageForecastHttp.d.ts +1 -1
- package/lib/AWS/CostExplorer/GetUsageForecastHttp.d.ts.map +1 -1
- package/lib/AWS/CostExplorer/ListCommitmentPurchaseAnalysesHttp.d.ts +1 -1
- package/lib/AWS/CostExplorer/ListCommitmentPurchaseAnalysesHttp.d.ts.map +1 -1
- package/lib/AWS/CostExplorer/ListCostAllocationTagBackfillHistoryHttp.d.ts +1 -1
- package/lib/AWS/CostExplorer/ListCostAllocationTagBackfillHistoryHttp.d.ts.map +1 -1
- package/lib/AWS/CostExplorer/ListCostAllocationTagsHttp.d.ts +1 -1
- package/lib/AWS/CostExplorer/ListCostAllocationTagsHttp.d.ts.map +1 -1
- package/lib/AWS/CostExplorer/ListCostCategoryResourceAssociationsHttp.d.ts +1 -1
- package/lib/AWS/CostExplorer/ListCostCategoryResourceAssociationsHttp.d.ts.map +1 -1
- package/lib/AWS/CostExplorer/ListSavingsPlansPurchaseRecommendationGenerationHttp.d.ts +1 -1
- package/lib/AWS/CostExplorer/ListSavingsPlansPurchaseRecommendationGenerationHttp.d.ts.map +1 -1
- package/lib/AWS/CostExplorer/ProvideAnomalyFeedbackHttp.d.ts +1 -1
- package/lib/AWS/CostExplorer/ProvideAnomalyFeedbackHttp.d.ts.map +1 -1
- package/lib/AWS/CostExplorer/StartCommitmentPurchaseAnalysisHttp.d.ts +1 -1
- package/lib/AWS/CostExplorer/StartCommitmentPurchaseAnalysisHttp.d.ts.map +1 -1
- package/lib/AWS/CostExplorer/StartCostAllocationTagBackfillHttp.d.ts +1 -1
- package/lib/AWS/CostExplorer/StartCostAllocationTagBackfillHttp.d.ts.map +1 -1
- package/lib/AWS/CostExplorer/StartSavingsPlansPurchaseRecommendationGenerationHttp.d.ts +1 -1
- package/lib/AWS/CostExplorer/StartSavingsPlansPurchaseRecommendationGenerationHttp.d.ts.map +1 -1
- package/lib/AWS/CostExplorer/UpdateCostAllocationTagsStatusHttp.d.ts +1 -1
- package/lib/AWS/CostExplorer/UpdateCostAllocationTagsStatusHttp.d.ts.map +1 -1
- package/lib/AWS/CostExplorer/common.d.ts +5 -3
- package/lib/AWS/CostExplorer/common.d.ts.map +1 -1
- package/lib/AWS/CostExplorer/common.js +16 -1
- package/lib/AWS/CostExplorer/common.js.map +1 -1
- package/lib/AWS/DataSync/Task.d.ts.map +1 -1
- package/lib/AWS/DataSync/Task.js +16 -2
- package/lib/AWS/DataSync/Task.js.map +1 -1
- package/lib/AWS/EC2/InternetGateway.d.ts.map +1 -1
- package/lib/AWS/EC2/InternetGateway.js +8 -3
- package/lib/AWS/EC2/InternetGateway.js.map +1 -1
- package/lib/AWS/EC2/LingeringEnis.d.ts +26 -0
- package/lib/AWS/EC2/LingeringEnis.d.ts.map +1 -0
- package/lib/AWS/EC2/LingeringEnis.js +128 -0
- package/lib/AWS/EC2/LingeringEnis.js.map +1 -0
- package/lib/AWS/EC2/SecurityGroup.d.ts.map +1 -1
- package/lib/AWS/EC2/SecurityGroup.js +14 -14
- 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 +13 -21
- 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 +15 -2
- package/lib/AWS/EC2/Vpc.js.map +1 -1
- package/lib/AWS/EC2/hosted.d.ts.map +1 -1
- package/lib/AWS/EC2/hosted.js +10 -2
- package/lib/AWS/EC2/hosted.js.map +1 -1
- package/lib/AWS/ECR/Image.d.ts +133 -13
- package/lib/AWS/ECR/Image.d.ts.map +1 -1
- package/lib/AWS/ECR/ImageSource.d.ts.map +1 -1
- package/lib/AWS/ECR/ImageSource.js +10 -2
- package/lib/AWS/ECR/ImageSource.js.map +1 -1
- package/lib/AWS/ECR/Repository.d.ts +2 -0
- package/lib/AWS/ECR/Repository.d.ts.map +1 -1
- package/lib/AWS/ECR/Repository.js +28 -3
- package/lib/AWS/ECR/Repository.js.map +1 -1
- package/lib/AWS/ECS/Service.d.ts +27 -1
- package/lib/AWS/ECS/Service.d.ts.map +1 -1
- package/lib/AWS/ECS/Service.js +184 -22
- package/lib/AWS/ECS/Service.js.map +1 -1
- package/lib/AWS/ECS/Task.d.ts +32 -8
- package/lib/AWS/ECS/Task.d.ts.map +1 -1
- package/lib/AWS/ECS/Task.js +62 -29
- package/lib/AWS/ECS/Task.js.map +1 -1
- package/lib/AWS/EKS/Addon.d.ts.map +1 -1
- package/lib/AWS/EKS/Addon.js +15 -3
- package/lib/AWS/EKS/Addon.js.map +1 -1
- package/lib/AWS/EKS/Deployment.d.ts +10 -1
- package/lib/AWS/EKS/Deployment.d.ts.map +1 -1
- package/lib/AWS/EKS/Deployment.js +20 -6
- package/lib/AWS/EKS/Deployment.js.map +1 -1
- package/lib/AWS/EKS/HyperPod.d.ts +57 -0
- package/lib/AWS/EKS/HyperPod.d.ts.map +1 -0
- package/lib/AWS/EKS/HyperPod.js +46 -0
- package/lib/AWS/EKS/HyperPod.js.map +1 -0
- package/lib/AWS/EKS/Job.d.ts +10 -1
- package/lib/AWS/EKS/Job.d.ts.map +1 -1
- package/lib/AWS/EKS/Job.js +26 -8
- package/lib/AWS/EKS/Job.js.map +1 -1
- package/lib/AWS/EKS/internal/client.d.ts +4 -3
- package/lib/AWS/EKS/internal/client.d.ts.map +1 -1
- package/lib/AWS/EKS/internal/client.js +33 -2
- package/lib/AWS/EKS/internal/client.js.map +1 -1
- package/lib/AWS/Lambda/Function.d.ts +15 -0
- package/lib/AWS/Lambda/Function.d.ts.map +1 -1
- package/lib/AWS/Lambda/Function.js +68 -30
- package/lib/AWS/Lambda/Function.js.map +1 -1
- package/lib/AWS/Lambda/HttpServer.d.ts.map +1 -1
- package/lib/AWS/Lambda/HttpServer.js +7 -1
- package/lib/AWS/Lambda/HttpServer.js.map +1 -1
- package/lib/AWS/Lambda/LayerVersion.d.ts +176 -0
- package/lib/AWS/Lambda/LayerVersion.d.ts.map +1 -0
- package/lib/AWS/Lambda/LayerVersion.js +288 -0
- package/lib/AWS/Lambda/LayerVersion.js.map +1 -0
- package/lib/AWS/Lambda/MicrovmBundle.d.ts.map +1 -1
- package/lib/AWS/Lambda/MicrovmBundle.js +10 -2
- package/lib/AWS/Lambda/MicrovmBundle.js.map +1 -1
- 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/Providers.d.ts.map +1 -1
- package/lib/AWS/Providers.js +9 -1
- package/lib/AWS/Providers.js.map +1 -1
- package/lib/AWS/SES/ActiveReceiptRuleSet.d.ts +40 -0
- package/lib/AWS/SES/ActiveReceiptRuleSet.d.ts.map +1 -0
- package/lib/AWS/SES/ActiveReceiptRuleSet.js +58 -0
- package/lib/AWS/SES/ActiveReceiptRuleSet.js.map +1 -0
- package/lib/AWS/SES/ReceiptFilter.d.ts +67 -0
- package/lib/AWS/SES/ReceiptFilter.d.ts.map +1 -0
- package/lib/AWS/SES/ReceiptFilter.js +92 -0
- package/lib/AWS/SES/ReceiptFilter.js.map +1 -0
- package/lib/AWS/SES/ReceiptRule.d.ts +133 -0
- package/lib/AWS/SES/ReceiptRule.d.ts.map +1 -0
- package/lib/AWS/SES/ReceiptRule.js +178 -0
- package/lib/AWS/SES/ReceiptRule.js.map +1 -0
- package/lib/AWS/SES/ReceiptRuleSet.d.ts +55 -0
- package/lib/AWS/SES/ReceiptRuleSet.d.ts.map +1 -0
- package/lib/AWS/SES/ReceiptRuleSet.js +112 -0
- package/lib/AWS/SES/ReceiptRuleSet.js.map +1 -0
- package/lib/AWS/SES/SendBounce.d.ts +37 -0
- package/lib/AWS/SES/SendBounce.d.ts.map +1 -0
- package/lib/AWS/SES/SendBounce.js +3 -0
- package/lib/AWS/SES/SendBounce.js.map +1 -0
- package/lib/AWS/SES/SendBounceHttp.d.ts +4 -0
- package/lib/AWS/SES/SendBounceHttp.d.ts.map +1 -0
- package/lib/AWS/SES/SendBounceHttp.js +10 -0
- package/lib/AWS/SES/SendBounceHttp.js.map +1 -0
- package/lib/AWS/SES/index.d.ts +6 -0
- package/lib/AWS/SES/index.d.ts.map +1 -1
- package/lib/AWS/SES/index.js +6 -0
- package/lib/AWS/SES/index.js.map +1 -1
- package/lib/AWS/SageMaker/Cluster.d.ts +327 -0
- package/lib/AWS/SageMaker/Cluster.d.ts.map +1 -0
- package/lib/AWS/SageMaker/Cluster.js +469 -0
- package/lib/AWS/SageMaker/Cluster.js.map +1 -0
- package/lib/AWS/SageMaker/ClusterSchedulerConfig.d.ts +96 -0
- package/lib/AWS/SageMaker/ClusterSchedulerConfig.d.ts.map +1 -0
- package/lib/AWS/SageMaker/ClusterSchedulerConfig.js +270 -0
- package/lib/AWS/SageMaker/ClusterSchedulerConfig.js.map +1 -0
- package/lib/AWS/SageMaker/ComputeQuota.d.ts +106 -0
- package/lib/AWS/SageMaker/ComputeQuota.d.ts.map +1 -0
- package/lib/AWS/SageMaker/ComputeQuota.js +268 -0
- package/lib/AWS/SageMaker/ComputeQuota.js.map +1 -0
- package/lib/AWS/SageMaker/index.d.ts +3 -0
- package/lib/AWS/SageMaker/index.d.ts.map +1 -1
- package/lib/AWS/SageMaker/index.js +3 -0
- package/lib/AWS/SageMaker/index.js.map +1 -1
- package/lib/AWS/StateStore/State.d.ts +11 -0
- package/lib/AWS/StateStore/State.d.ts.map +1 -1
- package/lib/AWS/StateStore/State.js +117 -38
- package/lib/AWS/StateStore/State.js.map +1 -1
- package/lib/Apply.d.ts +37 -1
- package/lib/Apply.d.ts.map +1 -1
- package/lib/Apply.js +270 -194
- package/lib/Apply.js.map +1 -1
- package/lib/Axiom/Telemetry.d.ts +66 -0
- package/lib/Axiom/Telemetry.d.ts.map +1 -0
- package/lib/Axiom/Telemetry.js +69 -0
- package/lib/Axiom/Telemetry.js.map +1 -0
- package/lib/Axiom/index.d.ts +1 -0
- package/lib/Axiom/index.d.ts.map +1 -1
- package/lib/Axiom/index.js +1 -0
- package/lib/Axiom/index.js.map +1 -1
- package/lib/Bundle/Bundle.d.ts +1 -1
- package/lib/Bundle/Bundle.d.ts.map +1 -1
- package/lib/Bundle/Bundle.js +14 -6
- package/lib/Bundle/Bundle.js.map +1 -1
- package/lib/Bundle/BundleAnalyzerPlugin.d.ts +1 -1
- package/lib/Bundle/BundleAnalyzerPlugin.d.ts.map +1 -1
- package/lib/Bundle/BundleAnalyzerPlugin.js +10 -5
- package/lib/Bundle/BundleAnalyzerPlugin.js.map +1 -1
- package/lib/Bundle/PurePlugin.d.ts +29 -7
- package/lib/Bundle/PurePlugin.d.ts.map +1 -1
- package/lib/Bundle/PurePlugin.js +71 -40
- package/lib/Bundle/PurePlugin.js.map +1 -1
- package/lib/Cli/checkVersion.d.ts +11 -5
- package/lib/Cli/checkVersion.d.ts.map +1 -1
- package/lib/Cli/checkVersion.js +73 -12
- package/lib/Cli/checkVersion.js.map +1 -1
- package/lib/Cli/commands/cloudflare.d.ts +1 -1
- package/lib/Cli/commands/deploy.d.ts.map +1 -1
- package/lib/Cli/commands/deploy.js +3 -11
- package/lib/Cli/commands/deploy.js.map +1 -1
- package/lib/Cli/commands/logs.d.ts.map +1 -1
- package/lib/Cli/commands/logs.js +3 -1
- 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 +231 -37
- package/lib/Cli/commands/nuke.js.map +1 -1
- package/lib/Cli/commands/tail.d.ts.map +1 -1
- package/lib/Cli/commands/tail.js +3 -1
- package/lib/Cli/commands/tail.js.map +1 -1
- package/lib/Cli/main.d.ts.map +1 -1
- package/lib/Cli/main.js +5 -4
- package/lib/Cli/main.js.map +1 -1
- package/lib/Cloudflare/AI/Search.d.ts +4 -15
- package/lib/Cloudflare/AI/Search.d.ts.map +1 -1
- package/lib/Cloudflare/AI/Search.js +4 -6
- package/lib/Cloudflare/AI/Search.js.map +1 -1
- package/lib/Cloudflare/AI/SearchInstance.d.ts +7 -26
- package/lib/Cloudflare/AI/SearchInstance.d.ts.map +1 -1
- package/lib/Cloudflare/AI/SearchInstance.js +7 -26
- package/lib/Cloudflare/AI/SearchInstance.js.map +1 -1
- package/lib/Cloudflare/ApiToken/AccountApiToken.d.ts +3 -0
- package/lib/Cloudflare/ApiToken/AccountApiToken.d.ts.map +1 -1
- package/lib/Cloudflare/ApiToken/AccountApiToken.js +3 -0
- package/lib/Cloudflare/ApiToken/AccountApiToken.js.map +1 -1
- package/lib/Cloudflare/Auth/AuthProvider.d.ts +2 -1
- package/lib/Cloudflare/Auth/AuthProvider.d.ts.map +1 -1
- package/lib/Cloudflare/Auth/AuthProvider.js +8 -3
- package/lib/Cloudflare/Auth/AuthProvider.js.map +1 -1
- package/lib/Cloudflare/Auth/OAuthClient.d.ts +5 -0
- package/lib/Cloudflare/Auth/OAuthClient.d.ts.map +1 -1
- package/lib/Cloudflare/Auth/OAuthClient.js +50 -4
- package/lib/Cloudflare/Auth/OAuthClient.js.map +1 -1
- package/lib/Cloudflare/Containers/Container.d.ts +81 -3
- package/lib/Cloudflare/Containers/Container.d.ts.map +1 -1
- package/lib/Cloudflare/Containers/Container.js +70 -0
- package/lib/Cloudflare/Containers/Container.js.map +1 -1
- package/lib/Cloudflare/Containers/ContainerApplication.d.ts +22 -1
- package/lib/Cloudflare/Containers/ContainerApplication.d.ts.map +1 -1
- package/lib/Cloudflare/Containers/ContainerApplication.js +4 -1
- package/lib/Cloudflare/Containers/ContainerApplication.js.map +1 -1
- package/lib/Cloudflare/Containers/ContainerBundle.d.ts.map +1 -1
- package/lib/Cloudflare/Containers/ContainerBundle.js +10 -2
- 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 +43 -0
- package/lib/Cloudflare/Containers/ContainerProvider.js.map +1 -1
- package/lib/Cloudflare/Credentials.d.ts +21 -1
- package/lib/Cloudflare/Credentials.d.ts.map +1 -1
- package/lib/Cloudflare/Credentials.js +52 -9
- package/lib/Cloudflare/Credentials.js.map +1 -1
- package/lib/Cloudflare/D1/ApplyMigrations.d.ts +30 -5
- package/lib/Cloudflare/D1/ApplyMigrations.d.ts.map +1 -1
- package/lib/Cloudflare/D1/ApplyMigrations.js +36 -26
- package/lib/Cloudflare/D1/ApplyMigrations.js.map +1 -1
- package/lib/Cloudflare/D1/Database.d.ts +18 -1
- package/lib/Cloudflare/D1/Database.d.ts.map +1 -1
- package/lib/Cloudflare/D1/Database.js +134 -2
- package/lib/Cloudflare/D1/Database.js.map +1 -1
- package/lib/Cloudflare/D1/LocalD1Gateway.d.ts +39 -0
- package/lib/Cloudflare/D1/LocalD1Gateway.d.ts.map +1 -0
- package/lib/Cloudflare/D1/LocalD1Gateway.js +100 -0
- package/lib/Cloudflare/D1/LocalD1Gateway.js.map +1 -0
- package/lib/Cloudflare/D1/QueryDatabaseHttpClient.d.ts +31 -0
- package/lib/Cloudflare/D1/QueryDatabaseHttpClient.d.ts.map +1 -1
- package/lib/Cloudflare/D1/QueryDatabaseHttpClient.js +13 -6
- package/lib/Cloudflare/D1/QueryDatabaseHttpClient.js.map +1 -1
- package/lib/Cloudflare/D1/QueryDatabaseLocal.d.ts.map +1 -1
- package/lib/Cloudflare/D1/QueryDatabaseLocal.js +21 -2
- package/lib/Cloudflare/D1/QueryDatabaseLocal.js.map +1 -1
- package/lib/Cloudflare/Email/Address.d.ts.map +1 -1
- package/lib/Cloudflare/Email/Address.js +15 -1
- package/lib/Cloudflare/Email/Address.js.map +1 -1
- package/lib/Cloudflare/Email/SendBinding.d.ts.map +1 -1
- package/lib/Cloudflare/Email/SendBinding.js +1 -0
- package/lib/Cloudflare/Email/SendBinding.js.map +1 -1
- package/lib/Cloudflare/Email/SendEmail.d.ts +12 -0
- package/lib/Cloudflare/Email/SendEmail.d.ts.map +1 -1
- package/lib/Cloudflare/Email/SendEmail.js +1 -0
- package/lib/Cloudflare/Email/SendEmail.js.map +1 -1
- package/lib/Cloudflare/Flagship/App.d.ts.map +1 -1
- package/lib/Cloudflare/Flagship/App.js +8 -3
- package/lib/Cloudflare/Flagship/App.js.map +1 -1
- package/lib/Cloudflare/KV/LocalKVGateway.d.ts +15 -0
- package/lib/Cloudflare/KV/LocalKVGateway.d.ts.map +1 -0
- package/lib/Cloudflare/KV/LocalKVGateway.js +64 -0
- package/lib/Cloudflare/KV/LocalKVGateway.js.map +1 -0
- package/lib/Cloudflare/KV/Namespace.d.ts +9 -1
- package/lib/Cloudflare/KV/Namespace.d.ts.map +1 -1
- package/lib/Cloudflare/KV/Namespace.js +45 -1
- package/lib/Cloudflare/KV/Namespace.js.map +1 -1
- package/lib/Cloudflare/KV/NamespaceLocal.d.ts +16 -5
- package/lib/Cloudflare/KV/NamespaceLocal.d.ts.map +1 -1
- package/lib/Cloudflare/KV/NamespaceLocal.js +21 -4
- package/lib/Cloudflare/KV/NamespaceLocal.js.map +1 -1
- package/lib/Cloudflare/KV/ReadNamespaceLocal.d.ts.map +1 -1
- package/lib/Cloudflare/KV/ReadNamespaceLocal.js +5 -1
- package/lib/Cloudflare/KV/ReadNamespaceLocal.js.map +1 -1
- package/lib/Cloudflare/KV/ReadWriteNamespaceLocal.d.ts.map +1 -1
- package/lib/Cloudflare/KV/ReadWriteNamespaceLocal.js +5 -1
- package/lib/Cloudflare/KV/ReadWriteNamespaceLocal.js.map +1 -1
- package/lib/Cloudflare/KV/WriteNamespaceLocal.d.ts.map +1 -1
- package/lib/Cloudflare/KV/WriteNamespaceLocal.js +5 -1
- package/lib/Cloudflare/KV/WriteNamespaceLocal.js.map +1 -1
- package/lib/Cloudflare/LocalGateway.d.ts +25 -0
- package/lib/Cloudflare/LocalGateway.d.ts.map +1 -0
- package/lib/Cloudflare/LocalGateway.js +70 -0
- package/lib/Cloudflare/LocalGateway.js.map +1 -0
- package/lib/Cloudflare/LocalRuntime.d.ts +14 -1
- package/lib/Cloudflare/LocalRuntime.d.ts.map +1 -1
- package/lib/Cloudflare/LocalRuntime.js +16 -1
- package/lib/Cloudflare/LocalRuntime.js.map +1 -1
- package/lib/Cloudflare/Logs.d.ts.map +1 -1
- package/lib/Cloudflare/Logs.js +18 -6
- package/lib/Cloudflare/Logs.js.map +1 -1
- package/lib/Cloudflare/Providers.d.ts +1 -1
- package/lib/Cloudflare/Providers.d.ts.map +1 -1
- package/lib/Cloudflare/Providers.js +6 -2
- package/lib/Cloudflare/Providers.js.map +1 -1
- package/lib/Cloudflare/Queues/Consumer.d.ts +16 -3
- package/lib/Cloudflare/Queues/Consumer.d.ts.map +1 -1
- package/lib/Cloudflare/Queues/Consumer.js +51 -3
- package/lib/Cloudflare/Queues/Consumer.js.map +1 -1
- package/lib/Cloudflare/Queues/Queue.d.ts +4 -3
- package/lib/Cloudflare/Queues/Queue.d.ts.map +1 -1
- package/lib/Cloudflare/Queues/Queue.js +7 -17
- package/lib/Cloudflare/Queues/Queue.js.map +1 -1
- package/lib/Cloudflare/Queues/QueueBinding.d.ts.map +1 -1
- package/lib/Cloudflare/Queues/QueueBinding.js +19 -0
- package/lib/Cloudflare/Queues/QueueBinding.js.map +1 -1
- package/lib/Cloudflare/Queues/QueueShim.d.ts +55 -0
- package/lib/Cloudflare/Queues/QueueShim.d.ts.map +1 -0
- package/lib/Cloudflare/Queues/QueueShim.js +177 -0
- package/lib/Cloudflare/Queues/QueueShim.js.map +1 -0
- package/lib/Cloudflare/R2/Bucket.d.ts +14 -1
- package/lib/Cloudflare/R2/Bucket.d.ts.map +1 -1
- package/lib/Cloudflare/R2/Bucket.js +53 -1
- package/lib/Cloudflare/R2/Bucket.js.map +1 -1
- package/lib/Cloudflare/R2/BucketBinding.d.ts +10 -0
- package/lib/Cloudflare/R2/BucketBinding.d.ts.map +1 -1
- package/lib/Cloudflare/R2/BucketBinding.js +14 -3
- package/lib/Cloudflare/R2/BucketBinding.js.map +1 -1
- package/lib/Cloudflare/R2/BucketLocal.d.ts +13 -6
- package/lib/Cloudflare/R2/BucketLocal.d.ts.map +1 -1
- package/lib/Cloudflare/R2/BucketLocal.js +19 -6
- package/lib/Cloudflare/R2/BucketLocal.js.map +1 -1
- package/lib/Cloudflare/R2/LocalR2Gateway.d.ts +15 -0
- package/lib/Cloudflare/R2/LocalR2Gateway.d.ts.map +1 -0
- package/lib/Cloudflare/R2/LocalR2Gateway.js +65 -0
- package/lib/Cloudflare/R2/LocalR2Gateway.js.map +1 -0
- package/lib/Cloudflare/R2/ReadBucketLocal.d.ts.map +1 -1
- package/lib/Cloudflare/R2/ReadBucketLocal.js +5 -1
- package/lib/Cloudflare/R2/ReadBucketLocal.js.map +1 -1
- package/lib/Cloudflare/R2/ReadWriteBucketLocal.d.ts.map +1 -1
- package/lib/Cloudflare/R2/ReadWriteBucketLocal.js +5 -1
- package/lib/Cloudflare/R2/ReadWriteBucketLocal.js.map +1 -1
- package/lib/Cloudflare/R2/WriteBucketLocal.d.ts.map +1 -1
- package/lib/Cloudflare/R2/WriteBucketLocal.js +5 -1
- package/lib/Cloudflare/R2/WriteBucketLocal.js.map +1 -1
- package/lib/Cloudflare/Ruleset/AccountEntrypoint.d.ts.map +1 -1
- package/lib/Cloudflare/Ruleset/AccountEntrypoint.js +5 -1
- package/lib/Cloudflare/Ruleset/AccountEntrypoint.js.map +1 -1
- package/lib/Cloudflare/Ruleset/Ruleset.d.ts.map +1 -1
- package/lib/Cloudflare/Ruleset/Ruleset.js +19 -6
- package/lib/Cloudflare/Ruleset/Ruleset.js.map +1 -1
- package/lib/Cloudflare/Rum/Site.js +10 -2
- package/lib/Cloudflare/Rum/Site.js.map +1 -1
- package/lib/Cloudflare/StateStore/Api.d.ts +32 -3
- package/lib/Cloudflare/StateStore/Api.js +1 -1
- package/lib/Cloudflare/StateStore/Api.js.map +1 -1
- package/lib/Cloudflare/StateStore/State.d.ts +1 -1
- package/lib/Cloudflare/StateStore/State.d.ts.map +1 -1
- package/lib/Cloudflare/Tunnel/Tunnel.d.ts.map +1 -1
- package/lib/Cloudflare/Tunnel/Tunnel.js +20 -1
- package/lib/Cloudflare/Tunnel/Tunnel.js.map +1 -1
- package/lib/Cloudflare/Website/StaticSite.d.ts +34 -7
- package/lib/Cloudflare/Website/StaticSite.d.ts.map +1 -1
- package/lib/Cloudflare/Website/StaticSite.js +108 -24
- package/lib/Cloudflare/Website/StaticSite.js.map +1 -1
- package/lib/Cloudflare/Website/Vite.d.ts +33 -19
- package/lib/Cloudflare/Website/Vite.d.ts.map +1 -1
- package/lib/Cloudflare/Website/Vite.js +33 -19
- package/lib/Cloudflare/Website/Vite.js.map +1 -1
- package/lib/Cloudflare/Workers/Assets.d.ts +26 -8
- package/lib/Cloudflare/Workers/Assets.d.ts.map +1 -1
- package/lib/Cloudflare/Workers/Assets.js +46 -1
- package/lib/Cloudflare/Workers/Assets.js.map +1 -1
- package/lib/Cloudflare/Workers/Compatibility.d.ts.map +1 -1
- package/lib/Cloudflare/Workers/Compatibility.js +26 -7
- package/lib/Cloudflare/Workers/Compatibility.js.map +1 -1
- package/lib/Cloudflare/Workers/DurableObject.d.ts +22 -0
- package/lib/Cloudflare/Workers/DurableObject.d.ts.map +1 -1
- package/lib/Cloudflare/Workers/DurableObject.js +22 -0
- 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 +20 -5
- package/lib/Cloudflare/Workers/DurableObjectBridge.js.map +1 -1
- package/lib/Cloudflare/Workers/InferEnv.d.ts +4 -2
- package/lib/Cloudflare/Workers/InferEnv.d.ts.map +1 -1
- package/lib/Cloudflare/Workers/LocalWorkerProvider.d.ts +7 -3
- package/lib/Cloudflare/Workers/LocalWorkerProvider.d.ts.map +1 -1
- package/lib/Cloudflare/Workers/LocalWorkerProvider.js +520 -302
- package/lib/Cloudflare/Workers/LocalWorkerProvider.js.map +1 -1
- package/lib/Cloudflare/Workers/Worker.d.ts +619 -18
- package/lib/Cloudflare/Workers/Worker.d.ts.map +1 -1
- package/lib/Cloudflare/Workers/Worker.js +222 -2
- package/lib/Cloudflare/Workers/Worker.js.map +1 -1
- package/lib/Cloudflare/Workers/WorkerAsyncBindings.d.ts +13 -1
- package/lib/Cloudflare/Workers/WorkerAsyncBindings.d.ts.map +1 -1
- package/lib/Cloudflare/Workers/WorkerAsyncBindings.js +171 -21
- package/lib/Cloudflare/Workers/WorkerAsyncBindings.js.map +1 -1
- package/lib/Cloudflare/Workers/WorkerBinding.d.ts +130 -28
- package/lib/Cloudflare/Workers/WorkerBinding.d.ts.map +1 -1
- package/lib/Cloudflare/Workers/WorkerBinding.js.map +1 -1
- package/lib/Cloudflare/Workers/WorkerBridge.d.ts +6 -2
- package/lib/Cloudflare/Workers/WorkerBridge.d.ts.map +1 -1
- package/lib/Cloudflare/Workers/WorkerBridge.js +18 -2
- package/lib/Cloudflare/Workers/WorkerBridge.js.map +1 -1
- package/lib/Cloudflare/Workers/WorkerBundle.d.ts +20 -1
- package/lib/Cloudflare/Workers/WorkerBundle.d.ts.map +1 -1
- package/lib/Cloudflare/Workers/WorkerBundle.js +15 -1
- package/lib/Cloudflare/Workers/WorkerBundle.js.map +1 -1
- package/lib/Cloudflare/Workers/WorkerProvider.d.ts +186 -11
- package/lib/Cloudflare/Workers/WorkerProvider.d.ts.map +1 -1
- package/lib/Cloudflare/Workers/WorkerProvider.js +1775 -240
- package/lib/Cloudflare/Workers/WorkerProvider.js.map +1 -1
- package/lib/Cloudflare/Workflows/WorkflowBridge.d.ts +9 -2
- package/lib/Cloudflare/Workflows/WorkflowBridge.d.ts.map +1 -1
- package/lib/Cloudflare/Workflows/WorkflowBridge.js +19 -9
- package/lib/Cloudflare/Workflows/WorkflowBridge.js.map +1 -1
- package/lib/Cloudflare/Workflows/index.d.ts +1 -1
- package/lib/Cloudflare/Workflows/index.d.ts.map +1 -1
- package/lib/Cloudflare/Workflows/index.js +1 -1
- package/lib/Cloudflare/Workflows/index.js.map +1 -1
- package/lib/Command/Build.d.ts +2 -2
- package/lib/Command/Build.d.ts.map +1 -1
- package/lib/Command/Build.js +4 -7
- package/lib/Command/Build.js.map +1 -1
- package/lib/Command/Command.d.ts +34 -4
- package/lib/Command/Command.d.ts.map +1 -1
- package/lib/Command/Command.js +125 -30
- package/lib/Command/Command.js.map +1 -1
- package/lib/Command/Dev.d.ts +2 -2
- package/lib/Command/Dev.d.ts.map +1 -1
- package/lib/Command/Dev.js +51 -73
- package/lib/Command/Dev.js.map +1 -1
- package/lib/Command/Exec.d.ts +11 -2
- package/lib/Command/Exec.d.ts.map +1 -1
- package/lib/Command/Exec.js +9 -0
- package/lib/Command/Exec.js.map +1 -1
- package/lib/Command/Memo.d.ts +9 -1
- package/lib/Command/Memo.d.ts.map +1 -1
- package/lib/Command/Memo.js +14 -2
- package/lib/Command/Memo.js.map +1 -1
- package/lib/Command/Providers.d.ts +1 -1
- package/lib/Command/Providers.d.ts.map +1 -1
- package/lib/Command/Redaction.d.ts +10 -0
- package/lib/Command/Redaction.d.ts.map +1 -0
- package/lib/Command/Redaction.js +119 -0
- package/lib/Command/Redaction.js.map +1 -0
- package/lib/Deploy.d.ts +2 -1
- package/lib/Deploy.d.ts.map +1 -1
- package/lib/Destroy.d.ts +2 -1
- package/lib/Destroy.d.ts.map +1 -1
- package/lib/Destroy.js +1 -9
- package/lib/Destroy.js.map +1 -1
- package/lib/Docker/Container.d.ts +41 -1
- package/lib/Docker/Container.d.ts.map +1 -1
- package/lib/Docker/Container.js +54 -12
- package/lib/Docker/Container.js.map +1 -1
- package/lib/Docker/Context.d.ts +84 -0
- package/lib/Docker/Context.d.ts.map +1 -0
- package/lib/Docker/Context.js +145 -0
- package/lib/Docker/Context.js.map +1 -0
- package/lib/Docker/Docker.d.ts +192 -14
- package/lib/Docker/Docker.d.ts.map +1 -1
- package/lib/Docker/Docker.js +149 -28
- package/lib/Docker/Docker.js.map +1 -1
- package/lib/Docker/Image.d.ts +12 -0
- package/lib/Docker/Image.d.ts.map +1 -1
- package/lib/Docker/Image.js +24 -7
- package/lib/Docker/Image.js.map +1 -1
- package/lib/Docker/Network.d.ts +7 -0
- package/lib/Docker/Network.d.ts.map +1 -1
- package/lib/Docker/Network.js +16 -7
- package/lib/Docker/Network.js.map +1 -1
- package/lib/Docker/Providers.d.ts +1 -1
- package/lib/Docker/Providers.d.ts.map +1 -1
- package/lib/Docker/Providers.js +13 -1
- package/lib/Docker/Providers.js.map +1 -1
- package/lib/Docker/RemoteImage.d.ts +12 -0
- package/lib/Docker/RemoteImage.d.ts.map +1 -1
- package/lib/Docker/RemoteImage.js +22 -8
- package/lib/Docker/RemoteImage.js.map +1 -1
- package/lib/Docker/Service.d.ts +445 -0
- package/lib/Docker/Service.d.ts.map +1 -0
- package/lib/Docker/Service.js +578 -0
- package/lib/Docker/Service.js.map +1 -0
- package/lib/Docker/ServiceImage.d.ts +78 -0
- package/lib/Docker/ServiceImage.d.ts.map +1 -0
- package/lib/Docker/ServiceImage.js +232 -0
- package/lib/Docker/ServiceImage.js.map +1 -0
- package/lib/Docker/Swarm.d.ts +117 -0
- package/lib/Docker/Swarm.d.ts.map +1 -0
- package/lib/Docker/Swarm.js +149 -0
- package/lib/Docker/Swarm.js.map +1 -0
- package/lib/Docker/Volume.d.ts +11 -0
- package/lib/Docker/Volume.d.ts.map +1 -1
- package/lib/Docker/Volume.js +21 -6
- package/lib/Docker/Volume.js.map +1 -1
- package/lib/Docker/index.d.ts +3 -0
- package/lib/Docker/index.d.ts.map +1 -1
- package/lib/Docker/index.js +3 -0
- package/lib/Docker/index.js.map +1 -1
- package/lib/Http.d.ts +8 -1
- package/lib/Http.d.ts.map +1 -1
- package/lib/Http.js +7 -2
- package/lib/Http.js.map +1 -1
- package/lib/Local/LocalProvider.d.ts +182 -0
- package/lib/Local/LocalProvider.d.ts.map +1 -0
- package/lib/Local/LocalProvider.js +226 -0
- package/lib/Local/LocalProvider.js.map +1 -0
- package/lib/Local/ProviderLayer.d.ts +43 -2
- package/lib/Local/ProviderLayer.d.ts.map +1 -1
- package/lib/Local/ProviderLayer.js +80 -2
- package/lib/Local/ProviderLayer.js.map +1 -1
- package/lib/Local/RpcProvider.d.ts +7 -0
- package/lib/Local/RpcProvider.d.ts.map +1 -1
- package/lib/Local/RpcProvider.js +8 -3
- package/lib/Local/RpcProvider.js.map +1 -1
- package/lib/Local/RpcProviderProxy.d.ts.map +1 -1
- package/lib/Local/RpcProviderProxy.js +3 -0
- package/lib/Local/RpcProviderProxy.js.map +1 -1
- package/lib/Local/RpcServer.d.ts +8 -1
- package/lib/Local/RpcServer.d.ts.map +1 -1
- package/lib/Local/RpcServer.js +4 -1
- package/lib/Local/RpcServer.js.map +1 -1
- package/lib/Output.d.ts +4 -1
- package/lib/Output.d.ts.map +1 -1
- package/lib/Output.js.map +1 -1
- package/lib/Plan.d.ts +34 -0
- package/lib/Plan.d.ts.map +1 -1
- package/lib/Plan.js +127 -40
- package/lib/Plan.js.map +1 -1
- package/lib/Planetscale/AuthProvider.d.ts.map +1 -1
- package/lib/Planetscale/AuthProvider.js +6 -2
- package/lib/Planetscale/AuthProvider.js.map +1 -1
- package/lib/Planetscale/Branch.d.ts.map +1 -1
- package/lib/Planetscale/Branch.js +36 -6
- package/lib/Planetscale/Branch.js.map +1 -1
- package/lib/Planetscale/MySQL/MySQLDatabase.d.ts.map +1 -1
- package/lib/Planetscale/MySQL/MySQLDatabase.js +31 -6
- package/lib/Planetscale/MySQL/MySQLDatabase.js.map +1 -1
- package/lib/Planetscale/OAuthClient.d.ts +7 -1
- package/lib/Planetscale/OAuthClient.d.ts.map +1 -1
- package/lib/Planetscale/OAuthClient.js +51 -4
- package/lib/Planetscale/OAuthClient.js.map +1 -1
- package/lib/Planetscale/Postgres/PostgresDatabase.d.ts.map +1 -1
- package/lib/Planetscale/Postgres/PostgresDatabase.js +30 -5
- package/lib/Planetscale/Postgres/PostgresDatabase.js.map +1 -1
- package/lib/Platform.d.ts.map +1 -1
- package/lib/Platform.js +25 -14
- package/lib/Platform.js.map +1 -1
- package/lib/Prisma/App.d.ts +80 -0
- package/lib/Prisma/App.d.ts.map +1 -0
- package/lib/Prisma/App.js +238 -0
- package/lib/Prisma/App.js.map +1 -0
- package/lib/Prisma/AuthProvider.d.ts +28 -0
- package/lib/Prisma/AuthProvider.d.ts.map +1 -0
- package/lib/Prisma/AuthProvider.js +131 -0
- package/lib/Prisma/AuthProvider.js.map +1 -0
- package/lib/Prisma/Branch.d.ts +75 -0
- package/lib/Prisma/Branch.d.ts.map +1 -0
- package/lib/Prisma/Branch.js +216 -0
- package/lib/Prisma/Branch.js.map +1 -0
- package/lib/Prisma/Client.d.ts +178 -0
- package/lib/Prisma/Client.d.ts.map +1 -0
- package/lib/Prisma/Client.js +562 -0
- package/lib/Prisma/Client.js.map +1 -0
- package/lib/Prisma/Compute.d.ts +583 -0
- package/lib/Prisma/Compute.d.ts.map +1 -0
- package/lib/Prisma/Compute.js +1543 -0
- package/lib/Prisma/Compute.js.map +1 -0
- package/lib/Prisma/ComputeArchive.d.ts +63 -0
- package/lib/Prisma/ComputeArchive.d.ts.map +1 -0
- package/lib/Prisma/ComputeArchive.js +227 -0
- package/lib/Prisma/ComputeArchive.js.map +1 -0
- package/lib/Prisma/ComputeBuild.d.ts +106 -0
- package/lib/Prisma/ComputeBuild.d.ts.map +1 -0
- package/lib/Prisma/ComputeBuild.js +987 -0
- package/lib/Prisma/ComputeBuild.js.map +1 -0
- package/lib/Prisma/ComputeLifecycle.d.ts +84 -0
- package/lib/Prisma/ComputeLifecycle.d.ts.map +1 -0
- package/lib/Prisma/ComputeLifecycle.js +186 -0
- package/lib/Prisma/ComputeLifecycle.js.map +1 -0
- package/lib/Prisma/Connect.d.ts +99 -0
- package/lib/Prisma/Connect.d.ts.map +1 -0
- package/lib/Prisma/Connect.js +187 -0
- package/lib/Prisma/Connect.js.map +1 -0
- package/lib/Prisma/Connection.d.ts +202 -0
- package/lib/Prisma/Connection.d.ts.map +1 -0
- package/lib/Prisma/Connection.js +346 -0
- package/lib/Prisma/Connection.js.map +1 -0
- package/lib/Prisma/CustomDomain.d.ts +81 -0
- package/lib/Prisma/CustomDomain.d.ts.map +1 -0
- package/lib/Prisma/CustomDomain.js +175 -0
- package/lib/Prisma/CustomDomain.js.map +1 -0
- package/lib/Prisma/Database.d.ts +208 -0
- package/lib/Prisma/Database.d.ts.map +1 -0
- package/lib/Prisma/Database.js +405 -0
- package/lib/Prisma/Database.js.map +1 -0
- package/lib/Prisma/Deployment.d.ts +135 -0
- package/lib/Prisma/Deployment.d.ts.map +1 -0
- package/lib/Prisma/Deployment.js +348 -0
- package/lib/Prisma/Deployment.js.map +1 -0
- package/lib/Prisma/EnvironmentVariable.d.ts +89 -0
- package/lib/Prisma/EnvironmentVariable.d.ts.map +1 -0
- package/lib/Prisma/EnvironmentVariable.js +213 -0
- package/lib/Prisma/EnvironmentVariable.js.map +1 -0
- package/lib/Prisma/Internal/AppIdentity.d.ts +10 -0
- package/lib/Prisma/Internal/AppIdentity.d.ts.map +1 -0
- package/lib/Prisma/Internal/AppIdentity.js +6 -0
- package/lib/Prisma/Internal/AppIdentity.js.map +1 -0
- package/lib/Prisma/Internal/AppPromotion.d.ts +19 -0
- package/lib/Prisma/Internal/AppPromotion.d.ts.map +1 -0
- package/lib/Prisma/Internal/AppPromotion.js +107 -0
- package/lib/Prisma/Internal/AppPromotion.js.map +1 -0
- package/lib/Prisma/Internal/ArchivePlatform.d.ts +42 -0
- package/lib/Prisma/Internal/ArchivePlatform.d.ts.map +1 -0
- package/lib/Prisma/Internal/ArchivePlatform.js +214 -0
- package/lib/Prisma/Internal/ArchivePlatform.js.map +1 -0
- package/lib/Prisma/Internal/ArtifactFile.d.ts +58 -0
- package/lib/Prisma/Internal/ArtifactFile.d.ts.map +1 -0
- package/lib/Prisma/Internal/ArtifactFile.js +134 -0
- package/lib/Prisma/Internal/ArtifactFile.js.map +1 -0
- package/lib/Prisma/Internal/ArtifactUpload.d.ts +5 -0
- package/lib/Prisma/Internal/ArtifactUpload.d.ts.map +1 -0
- package/lib/Prisma/Internal/ArtifactUpload.js +51 -0
- package/lib/Prisma/Internal/ArtifactUpload.js.map +1 -0
- package/lib/Prisma/Internal/BundlePaths.d.ts +4 -0
- package/lib/Prisma/Internal/BundlePaths.d.ts.map +1 -0
- package/lib/Prisma/Internal/BundlePaths.js +16 -0
- package/lib/Prisma/Internal/BundlePaths.js.map +1 -0
- package/lib/Prisma/Internal/CleanupFailure.d.ts +8 -0
- package/lib/Prisma/Internal/CleanupFailure.d.ts.map +1 -0
- package/lib/Prisma/Internal/CleanupFailure.js +8 -0
- package/lib/Prisma/Internal/CleanupFailure.js.map +1 -0
- package/lib/Prisma/Internal/DatabaseSecrets.d.ts +35 -0
- package/lib/Prisma/Internal/DatabaseSecrets.d.ts.map +1 -0
- package/lib/Prisma/Internal/DatabaseSecrets.js +85 -0
- package/lib/Prisma/Internal/DatabaseSecrets.js.map +1 -0
- package/lib/Prisma/Internal/DeploymentActions.d.ts +5 -0
- package/lib/Prisma/Internal/DeploymentActions.d.ts.map +1 -0
- package/lib/Prisma/Internal/DeploymentActions.js +16 -0
- package/lib/Prisma/Internal/DeploymentActions.js.map +1 -0
- package/lib/Prisma/Internal/DeploymentIdentity.d.ts +8 -0
- package/lib/Prisma/Internal/DeploymentIdentity.d.ts.map +1 -0
- package/lib/Prisma/Internal/DeploymentIdentity.js +12 -0
- package/lib/Prisma/Internal/DeploymentIdentity.js.map +1 -0
- package/lib/Prisma/Internal/DeploymentObserve.d.ts +3 -0
- package/lib/Prisma/Internal/DeploymentObserve.d.ts.map +1 -0
- package/lib/Prisma/Internal/DeploymentObserve.js +2 -0
- package/lib/Prisma/Internal/DeploymentObserve.js.map +1 -0
- package/lib/Prisma/Internal/EnvName.d.ts +7 -0
- package/lib/Prisma/Internal/EnvName.d.ts.map +1 -0
- package/lib/Prisma/Internal/EnvName.js +23 -0
- package/lib/Prisma/Internal/EnvName.js.map +1 -0
- package/lib/Prisma/Internal/HttpClient.d.ts +21 -0
- package/lib/Prisma/Internal/HttpClient.d.ts.map +1 -0
- package/lib/Prisma/Internal/HttpClient.js +23 -0
- package/lib/Prisma/Internal/HttpClient.js.map +1 -0
- package/lib/Prisma/Operations.d.ts +143 -0
- package/lib/Prisma/Operations.d.ts.map +1 -0
- package/lib/Prisma/Operations.js +75 -0
- package/lib/Prisma/Operations.js.map +1 -0
- package/lib/Prisma/Postgres.d.ts +24 -0
- package/lib/Prisma/Postgres.d.ts.map +1 -0
- package/lib/Prisma/Postgres.js +23 -0
- package/lib/Prisma/Postgres.js.map +1 -0
- package/lib/Prisma/PostgresOrigin.d.ts +31 -0
- package/lib/Prisma/PostgresOrigin.d.ts.map +1 -0
- package/lib/Prisma/PostgresOrigin.js +30 -0
- package/lib/Prisma/PostgresOrigin.js.map +1 -0
- package/lib/Prisma/PrismaDevDatabase.d.ts +25 -0
- package/lib/Prisma/PrismaDevDatabase.d.ts.map +1 -0
- package/lib/Prisma/PrismaDevDatabase.js +280 -0
- package/lib/Prisma/PrismaDevDatabase.js.map +1 -0
- package/lib/Prisma/PrismaEnvironment.d.ts +14 -0
- package/lib/Prisma/PrismaEnvironment.d.ts.map +1 -0
- package/lib/Prisma/PrismaEnvironment.js +50 -0
- package/lib/Prisma/PrismaEnvironment.js.map +1 -0
- package/lib/Prisma/PrismaLogs.d.ts +42 -0
- package/lib/Prisma/PrismaLogs.d.ts.map +1 -0
- package/lib/Prisma/PrismaLogs.js +318 -0
- package/lib/Prisma/PrismaLogs.js.map +1 -0
- package/lib/Prisma/Project.d.ts +117 -0
- package/lib/Prisma/Project.d.ts.map +1 -0
- package/lib/Prisma/Project.js +361 -0
- package/lib/Prisma/Project.js.map +1 -0
- package/lib/Prisma/Providers.d.ts +61 -0
- package/lib/Prisma/Providers.d.ts.map +1 -0
- package/lib/Prisma/Providers.js +282 -0
- package/lib/Prisma/Providers.js.map +1 -0
- package/lib/Prisma/Refs.d.ts +19 -0
- package/lib/Prisma/Refs.d.ts.map +1 -0
- package/lib/Prisma/Refs.js +25 -0
- package/lib/Prisma/Refs.js.map +1 -0
- package/lib/Prisma/SourceRepository.d.ts +104 -0
- package/lib/Prisma/SourceRepository.d.ts.map +1 -0
- package/lib/Prisma/SourceRepository.js +221 -0
- package/lib/Prisma/SourceRepository.js.map +1 -0
- package/lib/Prisma/Types.d.ts +539 -0
- package/lib/Prisma/Types.d.ts.map +1 -0
- package/lib/Prisma/Types.js +13 -0
- package/lib/Prisma/Types.js.map +1 -0
- package/lib/Prisma/index.d.ts +25 -0
- package/lib/Prisma/index.d.ts.map +1 -0
- package/lib/Prisma/index.js +24 -0
- package/lib/Prisma/index.js.map +1 -0
- package/lib/Provider.d.ts +77 -5
- package/lib/Provider.d.ts.map +1 -1
- package/lib/Provider.js +54 -30
- package/lib/Provider.js.map +1 -1
- package/lib/ProviderMode.d.ts +93 -0
- package/lib/ProviderMode.d.ts.map +1 -0
- package/lib/ProviderMode.js +77 -0
- package/lib/ProviderMode.js.map +1 -0
- package/lib/Random.d.ts +1 -1
- package/lib/Random.d.ts.map +1 -1
- package/lib/Resource.d.ts +22 -1
- package/lib/Resource.d.ts.map +1 -1
- package/lib/Resource.js +31 -0
- package/lib/Resource.js.map +1 -1
- package/lib/RuntimeContext.d.ts +7 -0
- package/lib/RuntimeContext.d.ts.map +1 -1
- package/lib/RuntimeContext.js.map +1 -1
- package/lib/SQL/D1.d.ts +1 -1
- package/lib/SQL/D1.js +1 -1
- package/lib/SQL/Postgres.d.ts +1 -1
- package/lib/SQL/Postgres.js +1 -1
- package/lib/Server/Process.d.ts +8 -0
- package/lib/Server/Process.d.ts.map +1 -1
- package/lib/Server/Process.js +29 -0
- package/lib/Server/Process.js.map +1 -1
- package/lib/State/HttpStateApi.d.ts +11 -11
- package/lib/State/InMemoryState.d.ts.map +1 -1
- package/lib/State/InMemoryState.js +2 -0
- package/lib/State/InMemoryState.js.map +1 -1
- package/lib/State/ResourceState.d.ts +18 -0
- package/lib/State/ResourceState.d.ts.map +1 -1
- package/lib/Sync.d.ts.map +1 -1
- package/lib/Sync.js +8 -2
- package/lib/Sync.js.map +1 -1
- package/lib/Telemetry.d.ts +150 -0
- package/lib/Telemetry.d.ts.map +1 -0
- package/lib/Telemetry.js +512 -0
- package/lib/Telemetry.js.map +1 -0
- package/lib/Test/Alchemy.d.ts +1 -1
- package/lib/Test/Alchemy.d.ts.map +1 -1
- package/lib/Test/Alchemy.js +4 -2
- package/lib/Test/Alchemy.js.map +1 -1
- package/lib/Test/Core.d.ts +2 -2
- package/lib/Test/Core.d.ts.map +1 -1
- package/lib/Test/Core.js +1 -8
- package/lib/Test/Core.js.map +1 -1
- package/lib/Test/Vitest.d.ts +58 -0
- package/lib/Test/Vitest.d.ts.map +1 -0
- package/lib/Test/Vitest.js +114 -0
- package/lib/Test/Vitest.js.map +1 -0
- package/lib/Util/Clank.d.ts +11 -6
- package/lib/Util/Clank.d.ts.map +1 -1
- package/lib/Util/Clank.js +22 -9
- package/lib/Util/Clank.js.map +1 -1
- package/lib/Util/proxy-chain.d.ts +5 -0
- package/lib/Util/proxy-chain.d.ts.map +1 -1
- package/lib/Util/proxy-chain.js +52 -4
- package/lib/Util/proxy-chain.js.map +1 -1
- package/lib/Util/zip.d.ts +11 -0
- package/lib/Util/zip.d.ts.map +1 -1
- package/lib/Util/zip.js +30 -0
- package/lib/Util/zip.js.map +1 -1
- package/lib/index.d.ts +3 -0
- package/lib/index.d.ts.map +1 -1
- package/lib/index.js +3 -0
- package/lib/index.js.map +1 -1
- package/package.json +59 -18
- package/src/AWS/ApiGateway/common.ts +9 -0
- package/src/AWS/Bedrock/LanguageModel.ts +883 -0
- package/src/AWS/Bedrock/LanguageModelHttp.ts +36 -0
- package/src/AWS/Bedrock/index.ts +2 -0
- package/src/AWS/CloudFront/Distribution.ts +116 -6
- package/src/AWS/CostExplorer/common.ts +23 -2
- package/src/AWS/DataSync/Task.ts +30 -15
- package/src/AWS/EC2/InternetGateway.ts +8 -3
- package/src/AWS/EC2/LingeringEnis.ts +169 -0
- package/src/AWS/EC2/SecurityGroup.ts +24 -28
- package/src/AWS/EC2/Subnet.ts +23 -34
- package/src/AWS/EC2/Vpc.ts +35 -21
- package/src/AWS/EC2/hosted.ts +10 -2
- package/src/AWS/ECR/ImageSource.ts +10 -2
- package/src/AWS/ECR/Repository.ts +39 -4
- package/src/AWS/ECS/Service.ts +322 -22
- package/src/AWS/ECS/Task.ts +82 -32
- package/src/AWS/EKS/Addon.ts +17 -4
- package/src/AWS/EKS/Deployment.ts +36 -7
- package/src/AWS/EKS/HyperPod.ts +97 -0
- package/src/AWS/EKS/Job.ts +42 -9
- package/src/AWS/EKS/internal/client.ts +40 -3
- package/src/AWS/Lambda/Function.ts +106 -46
- package/src/AWS/Lambda/HttpServer.ts +7 -1
- package/src/AWS/Lambda/LayerVersion.ts +490 -0
- package/src/AWS/Lambda/MicrovmBundle.ts +10 -2
- package/src/AWS/Lambda/index.ts +1 -0
- package/src/AWS/Providers.ts +16 -0
- package/src/AWS/SES/ActiveReceiptRuleSet.ts +88 -0
- package/src/AWS/SES/ReceiptFilter.ts +169 -0
- package/src/AWS/SES/ReceiptRule.ts +300 -0
- package/src/AWS/SES/ReceiptRuleSet.ts +164 -0
- package/src/AWS/SES/SendBounce.ts +44 -0
- package/src/AWS/SES/SendBounceHttp.ts +13 -0
- package/src/AWS/SES/index.ts +6 -0
- package/src/AWS/SageMaker/Cluster.ts +775 -0
- package/src/AWS/SageMaker/ClusterSchedulerConfig.ts +430 -0
- package/src/AWS/SageMaker/ComputeQuota.ts +426 -0
- package/src/AWS/SageMaker/index.ts +3 -0
- package/src/AWS/StateStore/State.ts +159 -42
- package/src/Apply.ts +199 -83
- package/src/Axiom/Telemetry.ts +119 -0
- package/src/Axiom/index.ts +1 -0
- package/src/Bundle/Bundle.ts +17 -7
- package/src/Bundle/BundleAnalyzerPlugin.ts +9 -4
- package/src/Bundle/PurePlugin.ts +109 -46
- package/src/Cli/checkVersion.ts +102 -16
- package/src/Cli/commands/deploy.ts +3 -14
- package/src/Cli/commands/logs.ts +6 -1
- package/src/Cli/commands/nuke.ts +295 -56
- package/src/Cli/commands/tail.ts +6 -1
- package/src/Cli/main.ts +5 -4
- package/src/Cloudflare/AI/Search.ts +4 -18
- package/src/Cloudflare/AI/SearchInstance.ts +7 -26
- package/src/Cloudflare/ApiToken/AccountApiToken.ts +3 -0
- package/src/Cloudflare/Auth/AuthProvider.ts +17 -3
- package/src/Cloudflare/Auth/OAuthClient.ts +58 -2
- package/src/Cloudflare/Containers/Container.ts +92 -3
- package/src/Cloudflare/Containers/ContainerApplication.ts +31 -5
- package/src/Cloudflare/Containers/ContainerBundle.ts +10 -2
- package/src/Cloudflare/Containers/ContainerProvider.ts +62 -0
- package/src/Cloudflare/Credentials.ts +69 -9
- package/src/Cloudflare/D1/ApplyMigrations.ts +72 -77
- package/src/Cloudflare/D1/Database.ts +154 -2
- package/src/Cloudflare/D1/LocalD1Gateway.ts +150 -0
- package/src/Cloudflare/D1/QueryDatabaseHttpClient.ts +49 -11
- package/src/Cloudflare/D1/QueryDatabaseLocal.ts +44 -2
- package/src/Cloudflare/Email/Address.ts +18 -1
- package/src/Cloudflare/Email/SendBinding.ts +1 -0
- package/src/Cloudflare/Email/SendEmail.ts +13 -0
- package/src/Cloudflare/Flagship/App.ts +18 -6
- package/src/Cloudflare/KV/LocalKVGateway.ts +86 -0
- package/src/Cloudflare/KV/Namespace.ts +47 -1
- package/src/Cloudflare/KV/NamespaceLocal.ts +29 -6
- package/src/Cloudflare/KV/ReadNamespaceLocal.ts +5 -1
- package/src/Cloudflare/KV/ReadWriteNamespaceLocal.ts +5 -1
- package/src/Cloudflare/KV/WriteNamespaceLocal.ts +5 -1
- package/src/Cloudflare/LocalGateway.ts +86 -0
- package/src/Cloudflare/LocalRuntime.ts +21 -1
- package/src/Cloudflare/Logs.ts +58 -28
- package/src/Cloudflare/Providers.ts +4 -2
- package/src/Cloudflare/Queues/Consumer.ts +70 -2
- package/src/Cloudflare/Queues/Queue.ts +7 -16
- package/src/Cloudflare/Queues/QueueBinding.ts +21 -0
- package/src/Cloudflare/Queues/QueueShim.ts +193 -0
- package/src/Cloudflare/R2/Bucket.ts +55 -1
- package/src/Cloudflare/R2/BucketBinding.ts +17 -3
- package/src/Cloudflare/R2/BucketLocal.ts +25 -8
- package/src/Cloudflare/R2/LocalR2Gateway.ts +84 -0
- package/src/Cloudflare/R2/ReadBucketLocal.ts +7 -1
- package/src/Cloudflare/R2/ReadWriteBucketLocal.ts +7 -1
- package/src/Cloudflare/R2/WriteBucketLocal.ts +7 -1
- package/src/Cloudflare/Ruleset/AccountEntrypoint.ts +5 -1
- package/src/Cloudflare/Ruleset/Ruleset.ts +20 -6
- package/src/Cloudflare/Rum/Site.ts +11 -4
- package/src/Cloudflare/StateStore/Api.ts +1 -1
- package/src/Cloudflare/Tunnel/Tunnel.ts +23 -1
- package/src/Cloudflare/Website/StaticSite.ts +117 -28
- package/src/Cloudflare/Website/Vite.ts +33 -19
- package/src/Cloudflare/Workers/Assets.ts +53 -1
- package/src/Cloudflare/Workers/Compatibility.ts +27 -7
- package/src/Cloudflare/Workers/DurableObject.ts +22 -0
- package/src/Cloudflare/Workers/DurableObjectBridge.ts +29 -10
- package/src/Cloudflare/Workers/InferEnv.ts +74 -59
- package/src/Cloudflare/Workers/LocalWorkerProvider.ts +662 -405
- package/src/Cloudflare/Workers/Worker.ts +683 -33
- package/src/Cloudflare/Workers/WorkerAsyncBindings.ts +209 -25
- package/src/Cloudflare/Workers/WorkerBinding.ts +67 -3
- package/src/Cloudflare/Workers/WorkerBridge.ts +26 -4
- package/src/Cloudflare/Workers/WorkerBundle.ts +37 -2
- package/src/Cloudflare/Workers/WorkerProvider.ts +2287 -281
- package/src/Cloudflare/Workflows/WorkflowBridge.ts +36 -18
- package/src/Cloudflare/Workflows/index.ts +1 -1
- package/src/Command/Build.ts +8 -8
- package/src/Command/Command.ts +217 -42
- package/src/Command/Dev.ts +79 -107
- package/src/Command/Exec.ts +11 -2
- package/src/Command/Memo.ts +27 -3
- package/src/Command/Redaction.ts +181 -0
- package/src/Destroy.ts +1 -10
- package/src/Docker/Container.ts +85 -16
- package/src/Docker/Context.ts +236 -0
- package/src/Docker/Docker.ts +395 -43
- package/src/Docker/Image.ts +28 -7
- package/src/Docker/Network.ts +38 -14
- package/src/Docker/Providers.ts +16 -1
- package/src/Docker/RemoteImage.ts +23 -7
- package/src/Docker/Service.ts +1119 -0
- package/src/Docker/ServiceImage.ts +331 -0
- package/src/Docker/Swarm.ts +226 -0
- package/src/Docker/Volume.ts +25 -6
- package/src/Docker/index.ts +3 -0
- package/src/Http.ts +15 -2
- package/src/Local/LocalProvider.ts +518 -0
- package/src/Local/ProviderLayer.ts +113 -11
- package/src/Local/RpcProvider.ts +10 -5
- package/src/Local/RpcProviderProxy.ts +4 -1
- package/src/Local/RpcServer.ts +20 -2
- package/src/Output.ts +19 -11
- package/src/Plan.ts +182 -54
- package/src/Planetscale/AuthProvider.ts +15 -2
- package/src/Planetscale/Branch.ts +39 -6
- package/src/Planetscale/MySQL/MySQLDatabase.ts +34 -6
- package/src/Planetscale/OAuthClient.ts +59 -3
- package/src/Planetscale/Postgres/PostgresDatabase.ts +33 -5
- package/src/Platform.ts +29 -17
- package/src/Prisma/App.ts +420 -0
- package/src/Prisma/AuthProvider.ts +260 -0
- package/src/Prisma/Branch.ts +396 -0
- package/src/Prisma/Client.ts +1337 -0
- package/src/Prisma/Compute.ts +2876 -0
- package/src/Prisma/ComputeArchive.ts +432 -0
- package/src/Prisma/ComputeBuild.ts +1652 -0
- package/src/Prisma/ComputeLifecycle.ts +391 -0
- package/src/Prisma/Connect.ts +410 -0
- package/src/Prisma/Connection.ts +626 -0
- package/src/Prisma/CustomDomain.ts +363 -0
- package/src/Prisma/Database.ts +836 -0
- package/src/Prisma/Deployment.ts +655 -0
- package/src/Prisma/EnvironmentVariable.ts +401 -0
- package/src/Prisma/Internal/AppIdentity.ts +19 -0
- package/src/Prisma/Internal/AppPromotion.ts +172 -0
- package/src/Prisma/Internal/ArchivePlatform.ts +320 -0
- package/src/Prisma/Internal/ArtifactFile.ts +242 -0
- package/src/Prisma/Internal/ArtifactUpload.ts +86 -0
- package/src/Prisma/Internal/BundlePaths.ts +28 -0
- package/src/Prisma/Internal/CleanupFailure.ts +17 -0
- package/src/Prisma/Internal/DatabaseSecrets.ts +175 -0
- package/src/Prisma/Internal/DeploymentActions.ts +59 -0
- package/src/Prisma/Internal/DeploymentIdentity.ts +25 -0
- package/src/Prisma/Internal/DeploymentObserve.ts +6 -0
- package/src/Prisma/Internal/EnvName.ts +24 -0
- package/src/Prisma/Internal/HttpClient.ts +30 -0
- package/src/Prisma/Operations.ts +259 -0
- package/src/Prisma/Postgres.ts +24 -0
- package/src/Prisma/PostgresOrigin.ts +52 -0
- package/src/Prisma/PrismaDevDatabase.ts +395 -0
- package/src/Prisma/PrismaEnvironment.ts +89 -0
- package/src/Prisma/PrismaLogs.ts +434 -0
- package/src/Prisma/Project.ts +681 -0
- package/src/Prisma/Providers.ts +411 -0
- package/src/Prisma/Refs.ts +69 -0
- package/src/Prisma/SourceRepository.ts +432 -0
- package/src/Prisma/Types.ts +611 -0
- package/src/Prisma/index.ts +24 -0
- package/src/Provider.ts +175 -39
- package/src/ProviderMode.ts +123 -0
- package/src/Resource.ts +64 -1
- package/src/RuntimeContext.ts +7 -0
- package/src/SQL/D1.ts +1 -1
- package/src/SQL/Postgres.ts +1 -1
- package/src/Server/Process.ts +33 -0
- package/src/State/InMemoryState.ts +2 -0
- package/src/State/ResourceState.ts +18 -0
- package/src/Sync.ts +14 -2
- package/src/Telemetry.ts +736 -0
- package/src/Test/Alchemy.ts +4 -2
- package/src/Test/Core.ts +1 -8
- package/src/Test/Vitest.ts +244 -0
- package/src/Util/Clank.ts +37 -11
- package/src/Util/proxy-chain.ts +73 -4
- package/src/Util/zip.ts +39 -0
- package/src/index.ts +3 -0
- package/lib/SQL/index.d.ts +0 -4
- package/lib/SQL/index.d.ts.map +0 -1
- package/lib/SQL/index.js +0 -4
- package/lib/SQL/index.js.map +0 -1
- package/src/SQL/index.ts +0 -3
|
@@ -1,11 +1,10 @@
|
|
|
1
|
-
import { Runtime,
|
|
1
|
+
import { Runtime, } from "@distilled.cloud/cloudflare-runtime";
|
|
2
2
|
import { Ai, AiSearch, AnalyticsEngine, Artifacts, Assets, Browser, D1, Data, DispatchNamespace, DurableObjectNamespace, Flagship, Hyperdrive, Images, Json, KvNamespace, MtlsCertificate, Pipelines, Queue, R2Bucket, RateLimit, SendEmail, Service, Text, Vectorize, VersionMetadata, WasmModule, WorkerLoader, Workflows, } from "@distilled.cloud/cloudflare-runtime/bindings";
|
|
3
3
|
import * as WorkerProxy from "@distilled.cloud/cloudflare-runtime/proxy/WorkerProxy";
|
|
4
4
|
import * as Cause from "effect/Cause";
|
|
5
5
|
import * as Effect from "effect/Effect";
|
|
6
6
|
import * as Equal from "effect/Equal";
|
|
7
7
|
import * as Exit from "effect/Exit";
|
|
8
|
-
import * as Fiber from "effect/Fiber";
|
|
9
8
|
import * as MutableHashMap from "effect/MutableHashMap";
|
|
10
9
|
import * as Option from "effect/Option";
|
|
11
10
|
import * as Path from "effect/Path";
|
|
@@ -15,36 +14,92 @@ import * as Schema from "effect/Schema";
|
|
|
15
14
|
import * as Scope from "effect/Scope";
|
|
16
15
|
import * as Semaphore from "effect/Semaphore";
|
|
17
16
|
import * as Stream from "effect/Stream";
|
|
18
|
-
import
|
|
19
|
-
import * as
|
|
17
|
+
import * as os from "node:os";
|
|
18
|
+
import * as LocalProvider from "../../Local/LocalProvider.js";
|
|
20
19
|
import { Stack } from "../../Stack.js";
|
|
21
|
-
import {
|
|
20
|
+
import { unwrapRedacted } from "../../Util/index.js";
|
|
22
21
|
import { CloudflareEnvironment } from "../CloudflareEnvironment.js";
|
|
23
|
-
import { LOCAL_ENTRY_URL, LocalRuntimeState } from "../LocalRuntime.js";
|
|
22
|
+
import { isLiveId, isLocalId, LOCAL_ENTRY_URL, LocalRuntimeState, } from "../LocalRuntime.js";
|
|
23
|
+
import { readAssetsConfigFiles } from "./Assets.js";
|
|
24
24
|
import { getCompatibility } from "./Compatibility.js";
|
|
25
25
|
import { isPythonMain, watchPythonWorkerBundle } from "./PythonWorkerBundle.js";
|
|
26
|
-
import { Worker } from "./Worker.js";
|
|
26
|
+
import { isSelfUrl, Worker } from "./Worker.js";
|
|
27
27
|
import { getCronBindings } from "./WorkerAsyncBindings.js";
|
|
28
28
|
import { WorkerBundle } from "./WorkerBundle.js";
|
|
29
29
|
import { createWorkerName } from "./WorkerName.js";
|
|
30
|
+
// Hosts that bind every interface — the dev server is then reachable at
|
|
31
|
+
// `localhost` *and* at each LAN address, like Vite's `--host` output.
|
|
32
|
+
const isWildcardHost = (host) => host === "0.0.0.0" || host === "::" || host === "[::]" || host === "*";
|
|
33
|
+
/**
|
|
34
|
+
* Resolve every URL a local dev server is reachable at, most relevant
|
|
35
|
+
* first. A loopback or explicit host yields just that URL; a wildcard host
|
|
36
|
+
* (`0.0.0.0`, `::`) yields `http://localhost:<port>` followed by one URL
|
|
37
|
+
* per external IPv4 interface (`http://192.168.0.12:<port>`, ...) —
|
|
38
|
+
* mirroring Vite's "Local / Network" dev-server output.
|
|
39
|
+
*/
|
|
40
|
+
const resolveLocalUrls = (serverUrl) => Effect.sync(() => {
|
|
41
|
+
const port = serverUrl.port;
|
|
42
|
+
const host = serverUrl.hostname;
|
|
43
|
+
if (!isWildcardHost(host)) {
|
|
44
|
+
return [serverUrl.origin];
|
|
45
|
+
}
|
|
46
|
+
// `os.networkInterfaces()` is a sync, CPU-only syscall with no Effect
|
|
47
|
+
// platform equivalent — wrapped in `Effect.sync` so it participates in
|
|
48
|
+
// the runtime.
|
|
49
|
+
const interfaces = os.networkInterfaces();
|
|
50
|
+
const lanAddresses = Object.values(interfaces)
|
|
51
|
+
.flatMap((addresses) => addresses ?? [])
|
|
52
|
+
.filter((address) => address.family === "IPv4" && !address.internal)
|
|
53
|
+
.map((address) => address.address);
|
|
54
|
+
return [
|
|
55
|
+
`http://localhost:${port}`,
|
|
56
|
+
...lanAddresses.map((address) => `http://${address}:${port}`),
|
|
57
|
+
];
|
|
58
|
+
});
|
|
30
59
|
export class WorkerValidationError extends Schema.TaggedErrorClass()("WorkerValidationError", {
|
|
31
60
|
message: Schema.String,
|
|
32
61
|
hint: Schema.optional(Schema.String),
|
|
33
62
|
value: Schema.Unknown,
|
|
34
63
|
}) {
|
|
35
64
|
}
|
|
36
|
-
export const LocalWorkerProvider = () =>
|
|
65
|
+
export const LocalWorkerProvider = () => LocalProvider.make(Worker, LOCAL_ENTRY_URL, Effect.gen(function* () {
|
|
37
66
|
const bundler = yield* WorkerBundle;
|
|
38
67
|
const runtime = yield* Runtime;
|
|
39
68
|
const stack = yield* Stack;
|
|
40
69
|
const path = yield* Path.Path;
|
|
41
70
|
const localRuntimeState = yield* LocalRuntimeState;
|
|
42
71
|
const workerProxy = yield* WorkerProxy.WorkerProxy;
|
|
72
|
+
const cloudflareEnv = yield* CloudflareEnvironment;
|
|
73
|
+
const context = yield* Effect.context();
|
|
74
|
+
const rootScope = yield* Effect.scope;
|
|
75
|
+
// Proxies are deliberately NOT owned by the per-instance scope: they
|
|
76
|
+
// survive restarts so the worker's URL stays stable across rebuilds
|
|
77
|
+
// and config changes. Torn down by `stop` on delete.
|
|
43
78
|
const proxyInstances = new Map();
|
|
44
79
|
const getQueueConsumers = Effect.fn(function* (scriptName) {
|
|
45
80
|
const consumers = [];
|
|
46
81
|
for (const consumer of MutableHashMap.values(localRuntimeState.queueConsumers)) {
|
|
47
82
|
if (consumer.scriptName === scriptName) {
|
|
83
|
+
// A LIVE queue (`Alchemy.remote()`) consumed locally: the broker
|
|
84
|
+
// is still local, but it is fed by the runtime's pull loop
|
|
85
|
+
// draining the real queue over the HTTP pull API (the
|
|
86
|
+
// Consumer's local provider attached the `http_pull` consumer
|
|
87
|
+
// and resolved the queue's real name).
|
|
88
|
+
if (isLiveId(consumer.queueId)) {
|
|
89
|
+
if (!consumer.queueName) {
|
|
90
|
+
return yield* Effect.die(`Consumer of live queue ${consumer.queueId} is missing its resolved queueName — re-deploy the consumer`);
|
|
91
|
+
}
|
|
92
|
+
consumers.push({
|
|
93
|
+
queueName: consumer.queueName,
|
|
94
|
+
deadLetterQueue: consumer.deadLetterQueue,
|
|
95
|
+
...consumer.settings,
|
|
96
|
+
pull: {
|
|
97
|
+
queueId: consumer.queueId,
|
|
98
|
+
accountId: consumer.accountId,
|
|
99
|
+
},
|
|
100
|
+
});
|
|
101
|
+
continue;
|
|
102
|
+
}
|
|
48
103
|
const queue = MutableHashMap.get(localRuntimeState.queues, consumer.queueId).pipe(Option.getOrUndefined);
|
|
49
104
|
if (queue) {
|
|
50
105
|
consumers.push({
|
|
@@ -145,123 +200,25 @@ export const LocalWorkerProvider = () => RpcProvider.effect(Worker, LOCAL_ENTRY_
|
|
|
145
200
|
}
|
|
146
201
|
return modules;
|
|
147
202
|
});
|
|
148
|
-
// Latest successful serve per worker id, so runtime wiring changes
|
|
149
|
-
// that arrive AFTER workerd started (e.g. a sibling `Consumer`
|
|
150
|
-
// resource registering this script as a queue consumer) can restart
|
|
151
|
-
// the instance with the same bundle. `scope` is the parent scope the
|
|
152
|
-
// workerd child scope is forked from (the instance scope), NOT the
|
|
153
|
-
// caller's ambient scope — restarts are triggered from other
|
|
154
|
-
// providers' reconcile fibers whose scopes must not own workerd.
|
|
155
|
-
const latestServes = new Map();
|
|
156
|
-
// Serializes serves per worker id: a restart triggered by a sibling
|
|
157
|
-
// resource may otherwise interleave with a rebuild-triggered serve
|
|
158
|
-
// and leak a workerd scope.
|
|
159
|
-
const serveLocks = new Map();
|
|
160
|
-
const serveLock = (id) => {
|
|
161
|
-
let lock = serveLocks.get(id);
|
|
162
|
-
if (!lock) {
|
|
163
|
-
lock = Semaphore.makeUnsafe(1);
|
|
164
|
-
serveLocks.set(id, lock);
|
|
165
|
-
}
|
|
166
|
-
return lock;
|
|
167
|
-
};
|
|
168
|
-
const serveWith = (worker, bundle, proxy, parentScope) => Semaphore.withPermits(serveLock(worker.id), 1)(Effect.gen(function* () {
|
|
169
|
-
// Queue-consumer wiring can change while `runtime.start` is in
|
|
170
|
-
// flight (a sibling `Consumer` reconcile), before the restart
|
|
171
|
-
// hook below exists to pick it up. We hold the serve lock, so a
|
|
172
|
-
// restart would deadlock — instead, loop and serve again until
|
|
173
|
-
// the wiring is stable across a start.
|
|
174
|
-
while (true) {
|
|
175
|
-
const previous = workerdScopes.get(worker.id);
|
|
176
|
-
if (previous) {
|
|
177
|
-
// Both runtimes use the same registry key. Close the old scope first so
|
|
178
|
-
// its unregister finalizer cannot delete the replacement registration.
|
|
179
|
-
yield* Scope.close(previous, Exit.void);
|
|
180
|
-
workerdScopes.delete(worker.id);
|
|
181
|
-
}
|
|
182
|
-
const queueConsumers = yield* getQueueConsumers(worker.name);
|
|
183
|
-
const scope = yield* Scope.fork(parentScope);
|
|
184
|
-
const url = yield* runtime
|
|
185
|
-
.start({
|
|
186
|
-
name: worker.name,
|
|
187
|
-
compatibilityDate: worker.compatibility.date,
|
|
188
|
-
compatibilityFlags: worker.compatibility.flags,
|
|
189
|
-
bindings: worker.workerBindings,
|
|
190
|
-
hyperdrives: worker.hyperdrives,
|
|
191
|
-
durableObjectNamespaces: worker.durableObjectNamespaces,
|
|
192
|
-
queueConsumers,
|
|
193
|
-
modules: yield* toRuntimeModules(bundle),
|
|
194
|
-
assets: toRuntimeAssets(worker.assets),
|
|
195
|
-
})
|
|
196
|
-
.pipe(Scope.provide(scope));
|
|
197
|
-
workerdScopes.set(worker.id, scope);
|
|
198
|
-
latestServes.set(worker.id, {
|
|
199
|
-
worker,
|
|
200
|
-
bundle,
|
|
201
|
-
proxy,
|
|
202
|
-
scope: parentScope,
|
|
203
|
-
});
|
|
204
|
-
// Register the restart hook before the re-check below: changes
|
|
205
|
-
// landing after the re-check find the hook; changes before it
|
|
206
|
-
// are caught by the re-check. Nothing falls in between.
|
|
207
|
-
MutableHashMap.set(localRuntimeState.workerRestarts, worker.name, restartWorker(worker.id));
|
|
208
|
-
const currentConsumers = yield* getQueueConsumers(worker.name);
|
|
209
|
-
if (JSON.stringify(currentConsumers) !==
|
|
210
|
-
JSON.stringify(queueConsumers)) {
|
|
211
|
-
// Wiring changed while workerd was starting — serve again with
|
|
212
|
-
// the fresh consumers before exposing the instance.
|
|
213
|
-
continue;
|
|
214
|
-
}
|
|
215
|
-
yield* proxy.set(url);
|
|
216
|
-
return url;
|
|
217
|
-
}
|
|
218
|
-
}));
|
|
219
|
-
const serveScoped = Effect.fn(function* (worker, bundle, proxy) {
|
|
220
|
-
const parentScope = yield* Effect.scope;
|
|
221
|
-
return yield* serveWith(worker, bundle, proxy, parentScope);
|
|
222
|
-
});
|
|
223
203
|
/**
|
|
224
|
-
*
|
|
225
|
-
*
|
|
226
|
-
*
|
|
227
|
-
*
|
|
204
|
+
* The restart-relevant, canonically-hashable view of a local Worker's
|
|
205
|
+
* desired state — `LocalProvider`'s `resolveConfig`. Everything here
|
|
206
|
+
* is plain data: binding *descriptors* (not `BindingHook` closures —
|
|
207
|
+
* those are materialized in `start` via {@link toRuntimeBinding}),
|
|
208
|
+
* DO-namespace/hyperdrive/container-image records, bundle options.
|
|
209
|
+
*
|
|
210
|
+
* Queue consumers are deliberately EXCLUDED: `getQueueConsumers`
|
|
211
|
+
* reads `LocalRuntimeState` at serve time and sibling `Consumer`
|
|
212
|
+
* reconciles drive restarts through the `workerRestarts` hook — they
|
|
213
|
+
* are runtime wiring observed at start, not desired-state config.
|
|
228
214
|
*/
|
|
229
|
-
const
|
|
230
|
-
const
|
|
231
|
-
if (!latest)
|
|
232
|
-
return Effect.void;
|
|
233
|
-
return serveWith(latest.worker, latest.bundle, latest.proxy, latest.scope).pipe(Effect.asVoid, Effect.catchCause((cause) => Effect.logWarning(`[${id}] Failed to restart local worker`, Cause.squash(cause))));
|
|
234
|
-
});
|
|
235
|
-
// Note: `serveLocks` entries are intentionally retained — an
|
|
236
|
-
// in-flight restart may still hold the semaphore when the instance
|
|
237
|
-
// is torn down, and a same-id re-create must serialize against it.
|
|
238
|
-
const dropServeState = (id) => {
|
|
239
|
-
const latest = latestServes.get(id);
|
|
240
|
-
if (latest) {
|
|
241
|
-
MutableHashMap.remove(localRuntimeState.workerRestarts, latest.worker.name);
|
|
242
|
-
latestServes.delete(id);
|
|
243
|
-
}
|
|
244
|
-
};
|
|
245
|
-
const buildConfig = Effect.fn(function* ({ id, props, bindings, }) {
|
|
246
|
-
const { accountId } = yield* yield* CloudflareEnvironment;
|
|
215
|
+
const resolveConfig = Effect.fn(function* ({ id, news, bindings, }) {
|
|
216
|
+
const props = news;
|
|
247
217
|
const name = yield* createWorkerName(id, props.name);
|
|
248
218
|
const compatibility = getCompatibility(props);
|
|
249
|
-
const
|
|
250
|
-
Text.local("ALCHEMY_PHASE", "runtime"),
|
|
251
|
-
Text.local("ALCHEMY_STACK_NAME", stack.name),
|
|
252
|
-
Text.local("ALCHEMY_STAGE", stack.stage),
|
|
253
|
-
Text.local("ALCHEMY_CLOUDFLARE_ACCOUNT_ID", accountId),
|
|
254
|
-
...Object.entries(props.env ?? {}).map(([key, value]) => {
|
|
255
|
-
const unredacted = Redacted.isRedacted(value)
|
|
256
|
-
? Redacted.value(value)
|
|
257
|
-
: value;
|
|
258
|
-
return typeof unredacted === "string"
|
|
259
|
-
? Text.local(key, unredacted)
|
|
260
|
-
: Json.local(key, unredacted);
|
|
261
|
-
}),
|
|
262
|
-
...(props.assets || props.vite ? [Assets.local("ASSETS")] : []),
|
|
263
|
-
];
|
|
219
|
+
const bindingDescriptors = [];
|
|
264
220
|
const durableObjectNamespaces = {};
|
|
221
|
+
const workflows = {};
|
|
265
222
|
const hyperdrives = {};
|
|
266
223
|
const containers = {};
|
|
267
224
|
for (const { data } of bindings) {
|
|
@@ -279,13 +236,20 @@ export const LocalWorkerProvider = () => RpcProvider.effect(Worker, LOCAL_ENTRY_
|
|
|
279
236
|
uniqueKey: namespaceId,
|
|
280
237
|
sql: true,
|
|
281
238
|
};
|
|
282
|
-
|
|
283
|
-
...binding,
|
|
284
|
-
namespaceId,
|
|
285
|
-
}));
|
|
239
|
+
bindingDescriptors.push({ ...binding, namespaceId });
|
|
286
240
|
}
|
|
287
241
|
else {
|
|
288
|
-
|
|
242
|
+
if (binding.type === "workflow" &&
|
|
243
|
+
// Same ownership rule as DOs: only declare workflows hosted by
|
|
244
|
+
// this worker. Cross-script workflow bindings are routed via
|
|
245
|
+
// the registry proxy.
|
|
246
|
+
(!binding.scriptName || binding.scriptName === name)) {
|
|
247
|
+
workflows[binding.workflowName] = {
|
|
248
|
+
workflowName: binding.workflowName,
|
|
249
|
+
className: binding.className,
|
|
250
|
+
};
|
|
251
|
+
}
|
|
252
|
+
bindingDescriptors.push(binding);
|
|
289
253
|
}
|
|
290
254
|
}
|
|
291
255
|
if (data.hyperdrives) {
|
|
@@ -319,38 +283,271 @@ export const LocalWorkerProvider = () => RpcProvider.effect(Worker, LOCAL_ENTRY_
|
|
|
319
283
|
}
|
|
320
284
|
durableObjectNamespaces[className].container = dev;
|
|
321
285
|
}
|
|
286
|
+
const dev = props.dev?.mode === "external"
|
|
287
|
+
? props.dev
|
|
288
|
+
: {
|
|
289
|
+
...props.dev,
|
|
290
|
+
mode: "worker",
|
|
291
|
+
// This is the default. Vite and cloudflare-runtime will retry
|
|
292
|
+
// if unavailable, unless `strictPort` is true.
|
|
293
|
+
port: props.dev?.port ?? 1337,
|
|
294
|
+
};
|
|
322
295
|
return {
|
|
323
296
|
id,
|
|
324
297
|
name,
|
|
325
298
|
compatibility,
|
|
326
|
-
|
|
299
|
+
/** User env (Redacted preserved — the canonical hasher unwraps). */
|
|
300
|
+
env: props.env,
|
|
301
|
+
/**
|
|
302
|
+
* Raw inline module source (mutually exclusive with `main`).
|
|
303
|
+
* Serves as-is without the bundler; part of the hashed config so
|
|
304
|
+
* editing the script restarts the instance.
|
|
305
|
+
*/
|
|
306
|
+
script: props.script,
|
|
307
|
+
hasAssets: !!(props.assets || props.vite),
|
|
308
|
+
/**
|
|
309
|
+
* Assets-only Worker (no entry module at all): served locally by
|
|
310
|
+
* a stub that delegates every request to the ASSETS binding.
|
|
311
|
+
*/
|
|
312
|
+
assetsOnly: props.main === undefined &&
|
|
313
|
+
props.script === undefined &&
|
|
314
|
+
!props.vite &&
|
|
315
|
+
!!props.assets,
|
|
316
|
+
bindingDescriptors,
|
|
327
317
|
durableObjectNamespaces: Object.values(durableObjectNamespaces),
|
|
328
|
-
|
|
329
|
-
viteEnvironments: props.vite?.viteEnvironments,
|
|
318
|
+
workflows: Object.values(workflows),
|
|
330
319
|
hyperdrives,
|
|
331
|
-
|
|
320
|
+
vite: !!props.vite,
|
|
321
|
+
// Relative `vite.main` resolves from the Vite root (see the
|
|
322
|
+
// matching normalization in WorkerProvider's `viteBuild`).
|
|
323
|
+
viteMain: props.vite?.main
|
|
324
|
+
? path.resolve(props.vite.rootDir ?? process.cwd(), props.vite.main)
|
|
325
|
+
: undefined,
|
|
326
|
+
viteEnvironments: props.vite?.viteEnvironments,
|
|
327
|
+
viteRootDir: props.vite?.rootDir,
|
|
332
328
|
bundleOptions: {
|
|
333
329
|
id,
|
|
334
330
|
main: props.main,
|
|
335
331
|
compatibility,
|
|
336
332
|
entry: props.isExternal
|
|
337
333
|
? { kind: "external" }
|
|
338
|
-
: {
|
|
334
|
+
: {
|
|
335
|
+
kind: "effect",
|
|
336
|
+
exports: props.exports ?? {},
|
|
337
|
+
},
|
|
339
338
|
stack: { name: stack.name, stage: stack.stage },
|
|
340
339
|
extraOptions: props.build,
|
|
341
340
|
},
|
|
342
341
|
assets: props.assets,
|
|
343
|
-
dev
|
|
344
|
-
|
|
345
|
-
// This is the default. Vite and cloudflare-runtime will retry if unavailable, unless `strictPort` is true.
|
|
346
|
-
port: props.dev?.port ?? 1337,
|
|
347
|
-
},
|
|
342
|
+
dev,
|
|
343
|
+
crons: Array.from(new Set([...getCronBindings(bindings), ...(props.crons ?? [])])),
|
|
348
344
|
};
|
|
349
345
|
});
|
|
346
|
+
/**
|
|
347
|
+
* Materialize the plain binding descriptors from {@link resolveConfig}
|
|
348
|
+
* into live cloudflare-runtime `BindingHook`s. This is the non-plain
|
|
349
|
+
* half of the old `buildConfig` — kept out of the hashed config.
|
|
350
|
+
*/
|
|
351
|
+
const materializeWorkerBindings = Effect.fn(function* (config, selfUrl) {
|
|
352
|
+
const { accountId } = yield* cloudflareEnv;
|
|
353
|
+
// Resource-backed env entries (e.g. `env: { KV: namespace }`) are
|
|
354
|
+
// represented by their binding descriptor (same name) — don't ALSO
|
|
355
|
+
// serialize the resolved attributes as a duplicate json binding.
|
|
356
|
+
const descriptorNames = new Set(config.bindingDescriptors.map((descriptor) => descriptor.name));
|
|
357
|
+
const workerBindings = [
|
|
358
|
+
Text.local("ALCHEMY_PHASE", "runtime"),
|
|
359
|
+
Text.local("ALCHEMY_WORKER_NAME", config.name),
|
|
360
|
+
Text.local("ALCHEMY_STACK_NAME", stack.name),
|
|
361
|
+
Text.local("ALCHEMY_STAGE", stack.stage),
|
|
362
|
+
Text.local("ALCHEMY_CLOUDFLARE_ACCOUNT_ID", accountId),
|
|
363
|
+
...Object.entries(config.env ?? {})
|
|
364
|
+
.filter(([key]) => !descriptorNames.has(key))
|
|
365
|
+
.map(([key, value]) => {
|
|
366
|
+
if (isSelfUrl(value)) {
|
|
367
|
+
return Text.local(key, selfUrl);
|
|
368
|
+
}
|
|
369
|
+
const unredacted = Redacted.isRedacted(value)
|
|
370
|
+
? Redacted.value(value)
|
|
371
|
+
: value;
|
|
372
|
+
return typeof unredacted === "string"
|
|
373
|
+
? Text.local(key, unredacted)
|
|
374
|
+
: Json.local(key, unredacted);
|
|
375
|
+
}),
|
|
376
|
+
...(config.hasAssets ? [Assets.local("ASSETS")] : []),
|
|
377
|
+
];
|
|
378
|
+
for (const descriptor of config.bindingDescriptors) {
|
|
379
|
+
if (descriptor.type === "self_url") {
|
|
380
|
+
// Lowered here rather than in `toRuntimeBinding` — only this
|
|
381
|
+
// scope knows the worker's own dev-proxy URL.
|
|
382
|
+
workerBindings.push(Text.local(descriptor.name, selfUrl));
|
|
383
|
+
continue;
|
|
384
|
+
}
|
|
385
|
+
workerBindings.push(yield* toRuntimeBinding(descriptor));
|
|
386
|
+
}
|
|
387
|
+
return workerBindings;
|
|
388
|
+
});
|
|
389
|
+
// Latest successful serve per worker id, so runtime wiring changes
|
|
390
|
+
// that arrive AFTER workerd started (e.g. a sibling `Consumer`
|
|
391
|
+
// resource registering this script as a queue consumer) can restart
|
|
392
|
+
// the instance with the same bundle.
|
|
393
|
+
const latestServes = new Map();
|
|
394
|
+
// Serializes serves per worker id: a restart triggered by a sibling
|
|
395
|
+
// resource may otherwise interleave with a rebuild-triggered serve
|
|
396
|
+
// and leak a workerd scope.
|
|
397
|
+
const serveLocks = new Map();
|
|
398
|
+
const serveLock = (id) => {
|
|
399
|
+
let lock = serveLocks.get(id);
|
|
400
|
+
if (!lock) {
|
|
401
|
+
lock = Semaphore.makeUnsafe(1);
|
|
402
|
+
serveLocks.set(id, lock);
|
|
403
|
+
}
|
|
404
|
+
return lock;
|
|
405
|
+
};
|
|
406
|
+
const workerdScopes = new Map();
|
|
407
|
+
// Serve with make-before-break semantics: start the replacement
|
|
408
|
+
// workerd while the previous instance (if any) keeps serving — and
|
|
409
|
+
// stays registered in the dev registry — then cut the proxy over and
|
|
410
|
+
// tear the previous instance down. Cross-script consumers (e.g. a DO
|
|
411
|
+
// bound via `scriptName` from another Worker) therefore never observe
|
|
412
|
+
// a window where the script has no running instance and no registry
|
|
413
|
+
// entry, even when `runtime.start` is slow (container image builds).
|
|
414
|
+
// Both instances use the same registry key; the registry's entry
|
|
415
|
+
// removal is owner-aware, so closing the old scope after the
|
|
416
|
+
// replacement has re-registered cannot delete the replacement's
|
|
417
|
+
// registration.
|
|
418
|
+
//
|
|
419
|
+
// The workerd scope is forked from the provider's `rootScope`, NOT
|
|
420
|
+
// the instance scope: a reconcile that replaces the instance (or a
|
|
421
|
+
// restart triggered from a sibling provider's fiber) tears down the
|
|
422
|
+
// bundle watcher without killing the currently serving workerd — the
|
|
423
|
+
// last good instance keeps serving until the replacement's first
|
|
424
|
+
// serve completes. Ownership is tracked in `workerdScopes`, closed by
|
|
425
|
+
// the next successful serve, by `delete`, or by provider shutdown.
|
|
426
|
+
const serveWith = (worker, bundle, proxy) => Semaphore.withPermits(serveLock(worker.id), 1)(
|
|
427
|
+
// The bookkeeping around `runtime.start` must not be torn in half
|
|
428
|
+
// by an interrupt: once a replacement workerd is up, it must be
|
|
429
|
+
// recorded in `workerdScopes` and the superseded instances must be
|
|
430
|
+
// closed, or one of the workerds would leak until provider
|
|
431
|
+
// shutdown while holding the shared registry key.
|
|
432
|
+
Effect.uninterruptibleMask((restore) => Effect.gen(function* () {
|
|
433
|
+
const previous = workerdScopes.get(worker.id);
|
|
434
|
+
// Instances whose queue-consumer wiring went stale while they
|
|
435
|
+
// were starting; never exposed via the proxy, closed together
|
|
436
|
+
// with `previous` after the cutover below.
|
|
437
|
+
const superseded = [];
|
|
438
|
+
let scope;
|
|
439
|
+
let url;
|
|
440
|
+
// Queue-consumer wiring can change while `runtime.start` is in
|
|
441
|
+
// flight (a sibling `Consumer` reconcile), before the restart
|
|
442
|
+
// hook below exists to pick it up. We hold the serve lock, so a
|
|
443
|
+
// restart would deadlock — instead, loop and serve again until
|
|
444
|
+
// the wiring is stable across a start.
|
|
445
|
+
while (true) {
|
|
446
|
+
const queueConsumers = yield* getQueueConsumers(worker.name);
|
|
447
|
+
scope = yield* Scope.fork(rootScope);
|
|
448
|
+
url = yield* restore(runtime
|
|
449
|
+
.start({
|
|
450
|
+
name: worker.name,
|
|
451
|
+
compatibilityDate: worker.compatibility.date,
|
|
452
|
+
compatibilityFlags: worker.compatibility.flags,
|
|
453
|
+
bindings: worker.workerBindings,
|
|
454
|
+
hyperdrives: worker.hyperdrives,
|
|
455
|
+
durableObjectNamespaces: worker.durableObjectNamespaces,
|
|
456
|
+
workflows: worker.workflows,
|
|
457
|
+
queueConsumers,
|
|
458
|
+
// Cache API opt-out (`dev: { cache: false }`) — matches
|
|
459
|
+
// production workers.dev, where the Cache API is a no-op.
|
|
460
|
+
cache: worker.dev.cache,
|
|
461
|
+
// Per-worker request.cf override (`dev: { cf: {...} }`).
|
|
462
|
+
cf: worker.dev.cf,
|
|
463
|
+
modules: yield* toRuntimeModules(bundle),
|
|
464
|
+
assets: yield* toRuntimeAssets(worker.assets),
|
|
465
|
+
})
|
|
466
|
+
.pipe(Scope.provide(scope))).pipe(
|
|
467
|
+
// The scope hangs off `rootScope`, so a failed or
|
|
468
|
+
// interrupted start must close it here — nothing else owns
|
|
469
|
+
// it yet.
|
|
470
|
+
Effect.onExit((exit) => exit._tag === "Failure"
|
|
471
|
+
? Scope.close(scope, exit)
|
|
472
|
+
: Effect.void));
|
|
473
|
+
workerdScopes.set(worker.id, scope);
|
|
474
|
+
latestServes.set(worker.id, { worker, bundle, proxy });
|
|
475
|
+
// Register the restart hook before the re-check below: changes
|
|
476
|
+
// landing after the re-check find the hook; changes before it
|
|
477
|
+
// are caught by the re-check. Nothing falls in between.
|
|
478
|
+
MutableHashMap.set(localRuntimeState.workerRestarts, worker.name, restartWorker(worker.id));
|
|
479
|
+
const currentConsumers = yield* getQueueConsumers(worker.name);
|
|
480
|
+
if (JSON.stringify(currentConsumers) !==
|
|
481
|
+
JSON.stringify(queueConsumers)) {
|
|
482
|
+
// Wiring changed while workerd was starting — serve again
|
|
483
|
+
// with the fresh consumers before exposing the instance.
|
|
484
|
+
superseded.push(scope);
|
|
485
|
+
continue;
|
|
486
|
+
}
|
|
487
|
+
break;
|
|
488
|
+
}
|
|
489
|
+
yield* proxy.set(url);
|
|
490
|
+
// Only now tear the replaced instances down: `previous` kept
|
|
491
|
+
// serving — and stayed registered in the dev registry — until
|
|
492
|
+
// the cutover above. The registry's entry removal is
|
|
493
|
+
// owner-aware, so these closes cannot delete the replacement's
|
|
494
|
+
// registration.
|
|
495
|
+
for (const replaced of previous
|
|
496
|
+
? [...superseded, previous]
|
|
497
|
+
: superseded) {
|
|
498
|
+
yield* Scope.close(replaced, Exit.void).pipe(Effect.catchCause((cause) => Effect.logWarning(`[${worker.id}] Failed to stop previous local worker instance`, Cause.squash(cause))));
|
|
499
|
+
}
|
|
500
|
+
return url;
|
|
501
|
+
})));
|
|
502
|
+
/**
|
|
503
|
+
* Restart a running worker with its latest bundle so start-time
|
|
504
|
+
* runtime wiring (queue consumers) is re-read from
|
|
505
|
+
* {@link LocalRuntimeState}. No-op if the worker hasn't served yet —
|
|
506
|
+
* the pending first serve will already observe the updated state.
|
|
507
|
+
*/
|
|
508
|
+
const restartWorker = (id) => Effect.suspend(() => {
|
|
509
|
+
const latest = latestServes.get(id);
|
|
510
|
+
if (!latest)
|
|
511
|
+
return Effect.void;
|
|
512
|
+
return serveWith(latest.worker, latest.bundle, latest.proxy).pipe(Effect.asVoid, Effect.catchCause((cause) => Effect.logWarning(`[${id}] Failed to restart local worker`, Cause.squash(cause))));
|
|
513
|
+
});
|
|
514
|
+
// Tear down the running workerd for a worker id, if any. Used when the
|
|
515
|
+
// Worker is deleted or handed off to an external dev process —
|
|
516
|
+
// instance replacement does NOT go through this: the previous workerd
|
|
517
|
+
// keeps serving until the replacement's first serve closes it.
|
|
518
|
+
const closeWorkerd = Effect.fn(function* (id) {
|
|
519
|
+
const scope = workerdScopes.get(id);
|
|
520
|
+
if (scope) {
|
|
521
|
+
workerdScopes.delete(id);
|
|
522
|
+
yield* Scope.close(scope, Exit.void);
|
|
523
|
+
}
|
|
524
|
+
});
|
|
525
|
+
// Note: `serveLocks` entries are intentionally retained — an
|
|
526
|
+
// in-flight restart may still hold the semaphore when the instance
|
|
527
|
+
// is torn down, and a same-id re-create must serialize against it.
|
|
528
|
+
const dropServeState = (id) => {
|
|
529
|
+
const latest = latestServes.get(id);
|
|
530
|
+
if (latest) {
|
|
531
|
+
MutableHashMap.remove(localRuntimeState.workerRestarts, latest.worker.name);
|
|
532
|
+
latestServes.delete(id);
|
|
533
|
+
}
|
|
534
|
+
};
|
|
350
535
|
const runWorker = Effect.fn(function* (worker) {
|
|
351
536
|
let start = Date.now();
|
|
352
537
|
let status = "start";
|
|
353
538
|
const proxy = yield* maybeStartProxy(worker.id, worker.dev);
|
|
539
|
+
// Inline `script` workers bypass the bundler entirely — the string
|
|
540
|
+
// IS the module (mirroring the deploy path, which uploads it as a
|
|
541
|
+
// single `main.js`). There is nothing to watch: script changes flow
|
|
542
|
+
// through the hashed config and restart the instance.
|
|
543
|
+
if (worker.script !== undefined) {
|
|
544
|
+
yield* serveWith(worker, {
|
|
545
|
+
files: [{ path: "main.js", content: worker.script, hash: "" }],
|
|
546
|
+
hash: "",
|
|
547
|
+
}, proxy);
|
|
548
|
+
yield* Effect.log(`[${worker.id}] Started in ${Math.round(Date.now() - start)}ms`);
|
|
549
|
+
return proxy.url;
|
|
550
|
+
}
|
|
354
551
|
yield* (isPythonMain(worker.bundleOptions.main)
|
|
355
552
|
? watchPythonWorkerBundle({
|
|
356
553
|
id: worker.bundleOptions.id,
|
|
@@ -374,7 +571,7 @@ export const LocalWorkerProvider = () => RpcProvider.effect(Worker, LOCAL_ENTRY_
|
|
|
374
571
|
return Effect.void;
|
|
375
572
|
}), Stream.filterMap((event) => event._tag === "Success"
|
|
376
573
|
? Result.succeed(event.output)
|
|
377
|
-
: Result.failVoid), Stream.mapEffect((bundle) =>
|
|
574
|
+
: Result.failVoid), Stream.mapEffect((bundle) => serveWith(worker, bundle, proxy).pipe(Effect.exit, Effect.tap((exit) => {
|
|
378
575
|
if (exit._tag === "Success") {
|
|
379
576
|
const message = Effect.log(`[${worker.id}] ${status === "update" ? "Updated" : "Started"} in ${Math.round(Date.now() - start)}ms`);
|
|
380
577
|
status = "update";
|
|
@@ -386,6 +583,29 @@ export const LocalWorkerProvider = () => RpcProvider.effect(Worker, LOCAL_ENTRY_
|
|
|
386
583
|
}))), Stream.runDrain, Effect.forkScoped);
|
|
387
584
|
return proxy.url;
|
|
388
585
|
});
|
|
586
|
+
// Assets-only Worker: there is no entry module to bundle or watch.
|
|
587
|
+
// The local runtime requires a user worker module, so serve a stub
|
|
588
|
+
// that delegates every request to the ASSETS binding — the assets
|
|
589
|
+
// worker applies `htmlHandling` / `notFoundHandling` (including SPA
|
|
590
|
+
// fallback) itself, matching Cloudflare's deployed assets-only
|
|
591
|
+
// behavior.
|
|
592
|
+
const assetsOnlyBundle = {
|
|
593
|
+
files: [
|
|
594
|
+
{
|
|
595
|
+
path: "main.js",
|
|
596
|
+
content: "export default { fetch: (request, env) => env.ASSETS.fetch(request) };",
|
|
597
|
+
hash: "assets-only-stub",
|
|
598
|
+
},
|
|
599
|
+
],
|
|
600
|
+
hash: "assets-only-stub",
|
|
601
|
+
};
|
|
602
|
+
const runAssetsOnly = Effect.fn(function* (worker) {
|
|
603
|
+
const start = Date.now();
|
|
604
|
+
const proxy = yield* maybeStartProxy(worker.id, worker.dev);
|
|
605
|
+
yield* serveWith(worker, assetsOnlyBundle, proxy);
|
|
606
|
+
yield* Effect.log(`[${worker.id}] Started in ${Math.round(Date.now() - start)}ms`);
|
|
607
|
+
return proxy.url;
|
|
608
|
+
});
|
|
389
609
|
const runVite = Effect.fn(function* (worker, rootDir) {
|
|
390
610
|
const proxy = yield* maybeStartProxy(worker.id, worker.dev);
|
|
391
611
|
yield* proxy.unset().pipe(Effect.forkChild);
|
|
@@ -401,70 +621,22 @@ export const LocalWorkerProvider = () => RpcProvider.effect(Worker, LOCAL_ENTRY_
|
|
|
401
621
|
name: worker.name,
|
|
402
622
|
bindings: worker.workerBindings,
|
|
403
623
|
durableObjectNamespaces: worker.durableObjectNamespaces,
|
|
624
|
+
workflows: worker.workflows,
|
|
404
625
|
hyperdrives: worker.hyperdrives,
|
|
405
626
|
queueConsumers: yield* getQueueConsumers(worker.name),
|
|
406
|
-
assets: toRuntimeAssets(worker.assets),
|
|
627
|
+
assets: yield* toRuntimeAssets(worker.assets),
|
|
407
628
|
},
|
|
408
629
|
context,
|
|
409
630
|
}, { port: 0 });
|
|
410
631
|
yield* proxy.set(new URL(devServer.resolvedUrls.local[0]));
|
|
411
632
|
return proxy.url;
|
|
412
633
|
});
|
|
413
|
-
const rootScope = yield* Effect.scope;
|
|
414
|
-
const workerdScopes = new Map();
|
|
415
|
-
const context = yield* Effect.context();
|
|
416
|
-
const instances = new Map();
|
|
417
|
-
const runInstance = Effect.fn(function* (options) {
|
|
418
|
-
const { accountId } = yield* yield* CloudflareEnvironment;
|
|
419
|
-
const { props, bindings } = options;
|
|
420
|
-
const config = yield* buildConfig(options);
|
|
421
|
-
const url = yield* (props.vite ? runVite(config, props.vite.rootDir) : runWorker(config)).pipe(Effect.map((url) => url.toString()));
|
|
422
|
-
return {
|
|
423
|
-
workerId: config.name,
|
|
424
|
-
workerName: config.name,
|
|
425
|
-
namespace: undefined,
|
|
426
|
-
logpush: undefined,
|
|
427
|
-
url,
|
|
428
|
-
tags: [],
|
|
429
|
-
durableObjectNamespaces: Object.fromEntries(config.durableObjectNamespaces.map((namespace) => [
|
|
430
|
-
namespace.className,
|
|
431
|
-
namespace.uniqueKey,
|
|
432
|
-
])),
|
|
433
|
-
domains: [url],
|
|
434
|
-
routes: [],
|
|
435
|
-
crons: Array.from(new Set([...getCronBindings(bindings), ...(props.crons ?? [])])),
|
|
436
|
-
accountId,
|
|
437
|
-
};
|
|
438
|
-
});
|
|
439
634
|
return {
|
|
440
|
-
|
|
441
|
-
//
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
diff: Effect.fn(function* ({ id, news: desired, newBindings, output }) {
|
|
446
|
-
// Effect-valued `env` entries (tagged Worker classes) never resolve
|
|
447
|
-
// at plan time; their identity is carried by the resolved binding
|
|
448
|
-
// data. Strip them so the signature-based diff still runs — same
|
|
449
|
-
// rationale as the cloud WorkerProvider (#874).
|
|
450
|
-
const news = stripEffects(desired);
|
|
451
|
-
if (!isResolved(news) || !isResolved(newBindings))
|
|
452
|
-
return undefined;
|
|
453
|
-
const options = {
|
|
454
|
-
id,
|
|
455
|
-
props: news,
|
|
456
|
-
bindings: newBindings,
|
|
457
|
-
};
|
|
458
|
-
const signature = yield* structuralSignature(options);
|
|
459
|
-
if (instances.get(options.id)?.signature === signature) {
|
|
460
|
-
return { action: "noop" };
|
|
461
|
-
}
|
|
462
|
-
const name = yield* createWorkerName(id, news.name);
|
|
463
|
-
return {
|
|
464
|
-
action: "update",
|
|
465
|
-
stables: output?.workerName === name ? ["workerName"] : undefined,
|
|
466
|
-
};
|
|
467
|
-
}),
|
|
635
|
+
resolveConfig,
|
|
636
|
+
// The physical name only survives an update when it isn't changing.
|
|
637
|
+
stables: ({ output, config }) => Effect.succeed(output?.workerName === config.name
|
|
638
|
+
? ["workerName"]
|
|
639
|
+
: undefined),
|
|
468
640
|
precreate: Effect.fn(function* ({ id, news, bindings }) {
|
|
469
641
|
const name = yield* createWorkerName(id, news.name);
|
|
470
642
|
const durableObjectNamespaces = {};
|
|
@@ -477,93 +649,123 @@ export const LocalWorkerProvider = () => RpcProvider.effect(Worker, LOCAL_ENTRY_
|
|
|
477
649
|
}
|
|
478
650
|
}
|
|
479
651
|
}
|
|
480
|
-
const { accountId } = yield*
|
|
481
|
-
const
|
|
652
|
+
const { accountId } = yield* cloudflareEnv;
|
|
653
|
+
const urls = news.dev?.mode === "external"
|
|
482
654
|
? // news.dev.url may be an unresolved output; avoid trying to resolve it here.
|
|
483
|
-
|
|
655
|
+
[]
|
|
484
656
|
: yield* maybeStartProxy(id, {
|
|
485
657
|
...news.dev,
|
|
658
|
+
mode: "worker",
|
|
486
659
|
port: news.dev?.port ?? 1337,
|
|
487
|
-
}).pipe(Effect.
|
|
660
|
+
}).pipe(Effect.flatMap((proxy) => resolveLocalUrls(proxy.url)));
|
|
488
661
|
return {
|
|
489
662
|
workerId: name,
|
|
490
663
|
workerName: name,
|
|
491
664
|
namespace: undefined,
|
|
492
665
|
logpush: undefined,
|
|
493
|
-
url,
|
|
666
|
+
url: urls[0],
|
|
667
|
+
urls,
|
|
668
|
+
domain: undefined,
|
|
494
669
|
tags: [],
|
|
495
670
|
durableObjectNamespaces,
|
|
496
|
-
domains: url ? [url] : [],
|
|
497
671
|
routes: [],
|
|
498
672
|
crons: Array.from(new Set([...getCronBindings(bindings), ...(news.crons ?? [])])),
|
|
499
673
|
accountId,
|
|
500
674
|
};
|
|
501
675
|
}),
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
//
|
|
505
|
-
//
|
|
506
|
-
//
|
|
507
|
-
//
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
|
|
511
|
-
|
|
512
|
-
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
|
|
516
|
-
}
|
|
517
|
-
const name = yield* createWorkerName(id, news.name);
|
|
676
|
+
start: Effect.fn(function* ({ id, config }) {
|
|
677
|
+
const { accountId } = yield* cloudflareEnv;
|
|
678
|
+
// `dev: { mode: "external" }` opts out of running a local Worker
|
|
679
|
+
// entirely — typically because an external dev process
|
|
680
|
+
// (Command.Dev) is serving requests. The instance exists in the
|
|
681
|
+
// registry (with an empty scope) but has no workerd behind it. A
|
|
682
|
+
// previous worker-mode instance for this id may have registered
|
|
683
|
+
// serve/restart state — drop it, and tear down its workerd (with
|
|
684
|
+
// make-before-break the running workerd outlives instance scopes
|
|
685
|
+
// and must be closed explicitly on handoff).
|
|
686
|
+
if (config.dev.mode === "external") {
|
|
687
|
+
dropServeState(id);
|
|
688
|
+
yield* closeWorkerd(id);
|
|
689
|
+
const urls = config.dev.url ? [config.dev.url] : [];
|
|
518
690
|
return {
|
|
519
|
-
workerId: name,
|
|
520
|
-
workerName: name,
|
|
691
|
+
workerId: config.name,
|
|
692
|
+
workerName: config.name,
|
|
521
693
|
namespace: undefined,
|
|
522
694
|
logpush: undefined,
|
|
523
|
-
url:
|
|
695
|
+
url: urls[0],
|
|
696
|
+
urls,
|
|
697
|
+
domain: undefined,
|
|
524
698
|
tags: [],
|
|
525
699
|
durableObjectNamespaces: {},
|
|
526
700
|
accountId,
|
|
527
|
-
domains: [],
|
|
528
701
|
routes: [],
|
|
529
|
-
crons:
|
|
702
|
+
crons: config.crons,
|
|
530
703
|
};
|
|
531
704
|
}
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
|
|
537
|
-
|
|
538
|
-
|
|
539
|
-
|
|
540
|
-
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
|
|
545
|
-
|
|
546
|
-
|
|
547
|
-
|
|
548
|
-
|
|
549
|
-
|
|
550
|
-
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
|
|
705
|
+
// `Worker.URL` locally resolves to the worker's dev-proxy URL —
|
|
706
|
+
// the proxy is stable per worker id (the same instance `runWorker`
|
|
707
|
+
// / `runVite` attach to below), so the URL is known before workerd
|
|
708
|
+
// starts. Trailing slash stripped to match the cloud value's shape.
|
|
709
|
+
const needsSelfUrl = config.bindingDescriptors.some((b) => b.type === "self_url") ||
|
|
710
|
+
Object.values(config.env ?? {}).some(isSelfUrl);
|
|
711
|
+
const selfUrl = needsSelfUrl
|
|
712
|
+
? (yield* maybeStartProxy(id, config.dev)).url
|
|
713
|
+
.toString()
|
|
714
|
+
.replace(/\/$/, "")
|
|
715
|
+
: undefined;
|
|
716
|
+
const workerBindings = yield* materializeWorkerBindings(config, selfUrl);
|
|
717
|
+
const worker = {
|
|
718
|
+
...config,
|
|
719
|
+
// Substitute `Worker.URL` sentinels so the Vite dev server
|
|
720
|
+
// inlines the local URL into VITE_*-prefixed define entries.
|
|
721
|
+
env: config.env && selfUrl !== undefined
|
|
722
|
+
? Object.fromEntries(Object.entries(config.env).map(([key, value]) => [
|
|
723
|
+
key,
|
|
724
|
+
isSelfUrl(value) ? selfUrl : value,
|
|
725
|
+
]))
|
|
726
|
+
: config.env,
|
|
727
|
+
dev: config.dev,
|
|
728
|
+
workerBindings,
|
|
729
|
+
};
|
|
730
|
+
const serverUrl = yield* config.vite
|
|
731
|
+
? runVite(worker, config.viteRootDir)
|
|
732
|
+
: config.assetsOnly
|
|
733
|
+
? runAssetsOnly(worker)
|
|
734
|
+
: runWorker(worker);
|
|
735
|
+
// In dev, `urls` is the dev server's actual surface — localhost
|
|
736
|
+
// first, then LAN addresses for wildcard hosts. Deployed domains
|
|
737
|
+
// are not served by this session, so they don't appear.
|
|
738
|
+
const urls = yield* resolveLocalUrls(serverUrl);
|
|
739
|
+
return {
|
|
740
|
+
workerId: config.name,
|
|
741
|
+
workerName: config.name,
|
|
742
|
+
namespace: undefined,
|
|
743
|
+
logpush: undefined,
|
|
744
|
+
url: urls[0],
|
|
745
|
+
urls,
|
|
746
|
+
domain: undefined,
|
|
747
|
+
tags: [],
|
|
748
|
+
durableObjectNamespaces: Object.fromEntries(config.durableObjectNamespaces.map((namespace) => [
|
|
749
|
+
namespace.className,
|
|
750
|
+
namespace.uniqueKey,
|
|
751
|
+
])),
|
|
752
|
+
routes: [],
|
|
753
|
+
crons: config.crons,
|
|
754
|
+
accountId,
|
|
755
|
+
};
|
|
554
756
|
}),
|
|
555
|
-
|
|
556
|
-
|
|
557
|
-
|
|
558
|
-
|
|
559
|
-
|
|
560
|
-
|
|
561
|
-
|
|
562
|
-
|
|
757
|
+
stop: Effect.fn(function* ({ id }) {
|
|
758
|
+
// Cross-restart state: the serve/restart bookkeeping, the running
|
|
759
|
+
// workerd (which outlives instance scopes for make-before-break),
|
|
760
|
+
// and the URL proxy live outside instance scopes and are only
|
|
761
|
+
// reclaimed on a real delete.
|
|
762
|
+
dropServeState(id);
|
|
763
|
+
yield* closeWorkerd(id);
|
|
764
|
+
yield* stopProxy(id);
|
|
563
765
|
}),
|
|
564
766
|
};
|
|
565
767
|
}));
|
|
566
|
-
export const toRuntimeBinding = Effect.fn(function* (b) {
|
|
768
|
+
export const toRuntimeBinding = Effect.fn(function* (b, dev) {
|
|
567
769
|
const unsupported = () => new WorkerValidationError({
|
|
568
770
|
message: `${b.type} bindings are not supported in local mode`,
|
|
569
771
|
value: b,
|
|
@@ -584,7 +786,12 @@ export const toRuntimeBinding = Effect.fn(function* (b) {
|
|
|
584
786
|
case "browser":
|
|
585
787
|
return Browser.remote(b.name);
|
|
586
788
|
case "d1":
|
|
587
|
-
|
|
789
|
+
// A `dev:` id belongs to a locally-emulated database (local D1
|
|
790
|
+
// provider); a real id is a live database the dev worker proxies to
|
|
791
|
+
// (e.g. the resource opted out of emulation via `Alchemy.remote()`).
|
|
792
|
+
return isLocalId(b.databaseId)
|
|
793
|
+
? D1.local({ binding: b.name, id: b.databaseId })
|
|
794
|
+
: D1.remote(b.name, b.databaseId);
|
|
588
795
|
case "data_blob":
|
|
589
796
|
return Data.local(b.name, Buffer.from(b.part));
|
|
590
797
|
case "dispatch_namespace":
|
|
@@ -611,20 +818,57 @@ export const toRuntimeBinding = Effect.fn(function* (b) {
|
|
|
611
818
|
case "json":
|
|
612
819
|
return Json.local(b.name, b.json);
|
|
613
820
|
case "kv_namespace":
|
|
614
|
-
|
|
821
|
+
// A `dev:` id belongs to a locally-emulated namespace; a real id is
|
|
822
|
+
// a live namespace the dev worker proxies to.
|
|
823
|
+
return isLocalId(b.namespaceId)
|
|
824
|
+
? KvNamespace.local({ binding: b.name, id: b.namespaceId })
|
|
825
|
+
: KvNamespace.remote(b.name, b.namespaceId);
|
|
615
826
|
case "mtls_certificate":
|
|
616
827
|
return MtlsCertificate.remote(b.name, b.certificateId);
|
|
617
828
|
case "pipelines":
|
|
618
829
|
return Pipelines.remote(b.name, b.pipeline);
|
|
619
830
|
case "plain_text":
|
|
620
831
|
return Text.local(b.name, b.text);
|
|
621
|
-
case "queue":
|
|
832
|
+
case "queue": {
|
|
833
|
+
// A real queueId belongs to an `Alchemy.remote()` queue. Queue bindings
|
|
834
|
+
// are NOT supported in Cloudflare's remote/preview sessions — a
|
|
835
|
+
// platform limitation (cloudflare/workers-sdk#9929) — so live
|
|
836
|
+
// production goes through the deployed shim worker registered at
|
|
837
|
+
// eval time (see `Queues/QueueShim.ts`): the local binding targets a
|
|
838
|
+
// forwarder service that relays the queue wire protocol to the shim
|
|
839
|
+
// over HTTPS with a bearer token.
|
|
840
|
+
if (b.queueId !== undefined && !isLocalId(b.queueId)) {
|
|
841
|
+
const url = b.shim?.url;
|
|
842
|
+
const token = b.shim?.token;
|
|
843
|
+
if (url === undefined || token === undefined) {
|
|
844
|
+
// Defensive: binding data produced by current eval always carries
|
|
845
|
+
// the shim for this mode combination.
|
|
846
|
+
return yield* new WorkerValidationError({
|
|
847
|
+
message: `Queue binding "${b.name}" targets a live queue ` +
|
|
848
|
+
"(Alchemy.remote()) but no producer shim was registered for it — " +
|
|
849
|
+
"re-deploy, or remove remote() from the queue (local emulation).",
|
|
850
|
+
value: b,
|
|
851
|
+
});
|
|
852
|
+
}
|
|
853
|
+
return Queue.remote({
|
|
854
|
+
binding: b.name,
|
|
855
|
+
queueName: b.queueName,
|
|
856
|
+
url,
|
|
857
|
+
token: typeof token === "string" ? token : Redacted.value(token),
|
|
858
|
+
});
|
|
859
|
+
}
|
|
622
860
|
return Queue.local({
|
|
623
861
|
binding: b.name,
|
|
624
862
|
queueName: b.queueName,
|
|
625
863
|
});
|
|
864
|
+
}
|
|
626
865
|
case "r2_bucket":
|
|
627
|
-
|
|
866
|
+
// A `dev:`-prefixed bucket name belongs to a locally-emulated bucket
|
|
867
|
+
// (R2 has no opaque id — the name is the identity); a real name is a
|
|
868
|
+
// live bucket the dev worker proxies to.
|
|
869
|
+
return isLocalId(b.bucketName)
|
|
870
|
+
? R2Bucket.local({ binding: b.name, id: b.bucketName })
|
|
871
|
+
: R2Bucket.remote(b.name, b.bucketName, b.jurisdiction);
|
|
628
872
|
case "ratelimit":
|
|
629
873
|
return RateLimit.local({
|
|
630
874
|
binding: b.name,
|
|
@@ -638,7 +882,7 @@ export const toRuntimeBinding = Effect.fn(function* (b) {
|
|
|
638
882
|
case "secrets_store_secret":
|
|
639
883
|
return yield* unsupported();
|
|
640
884
|
case "send_email":
|
|
641
|
-
return SendEmail
|
|
885
|
+
return SendEmail[dev?.remote ? "remote" : "local"]({
|
|
642
886
|
binding: b.name,
|
|
643
887
|
destinationAddress: b.destinationAddress,
|
|
644
888
|
allowedDestinationAddresses: b.allowedDestinationAddresses,
|
|
@@ -671,62 +915,36 @@ export const toRuntimeBinding = Effect.fn(function* (b) {
|
|
|
671
915
|
return yield* unsupported();
|
|
672
916
|
}
|
|
673
917
|
});
|
|
674
|
-
|
|
675
|
-
* Stable, collision-free structural signature used to decide whether a
|
|
676
|
-
* locally-running dev Worker needs to be torn down and restarted.
|
|
677
|
-
*
|
|
678
|
-
* We deliberately do NOT use `Hash.structure` here: Effect's structural
|
|
679
|
-
* hash folds sibling fields together with XOR, so when the *same* value
|
|
680
|
-
* change appears in two sibling subtrees the diffs cancel and the hash is
|
|
681
|
-
* unchanged. The Worker config mirrors `env` values into `bindings`
|
|
682
|
-
* (e.g. `DEV_MARKER`/an R2 bucket name appear in both `props.env` and the
|
|
683
|
-
* derived `bindings`), which is exactly the shape that collides — so an
|
|
684
|
-
* env-only or rebind change would be silently treated as "no change" and
|
|
685
|
-
* the dev Worker would never restart with the new bindings.
|
|
686
|
-
*
|
|
687
|
-
* A canonical JSON serialization (sorted keys, unwrapped `Redacted`,
|
|
688
|
-
* cycle-safe) gives an exact comparison instead of a lossy fingerprint. We
|
|
689
|
-
* hash that serialization with SHA-256 so each retained signature is a fixed
|
|
690
|
-
* 64-char digest rather than a copy of the whole props/bindings blob.
|
|
691
|
-
*/
|
|
692
|
-
const structuralSignature = (value) => {
|
|
693
|
-
const seen = new WeakSet();
|
|
694
|
-
const normalize = (input) => {
|
|
695
|
-
if (typeof input === "bigint")
|
|
696
|
-
return `bigint:${input.toString()}`;
|
|
697
|
-
if (input === null || typeof input !== "object")
|
|
698
|
-
return input;
|
|
699
|
-
if (Redacted.isRedacted(input)) {
|
|
700
|
-
return { __redacted: normalize(Redacted.value(input)) };
|
|
701
|
-
}
|
|
702
|
-
if (seen.has(input))
|
|
703
|
-
return "[circular]";
|
|
704
|
-
seen.add(input);
|
|
705
|
-
if (input instanceof Uint8Array)
|
|
706
|
-
return { __bytes: Array.from(input) };
|
|
707
|
-
if (Array.isArray(input))
|
|
708
|
-
return input.map(normalize);
|
|
709
|
-
return Object.fromEntries(Object.keys(input)
|
|
710
|
-
.sort()
|
|
711
|
-
.map((key) => [
|
|
712
|
-
key,
|
|
713
|
-
normalize(input[key]),
|
|
714
|
-
]));
|
|
715
|
-
};
|
|
716
|
-
return sha256(JSON.stringify(normalize(value)));
|
|
717
|
-
};
|
|
718
|
-
const toRuntimeAssets = (assets) => {
|
|
918
|
+
const toRuntimeAssets = Effect.fn(function* (assets) {
|
|
719
919
|
if (!assets)
|
|
720
920
|
return undefined;
|
|
921
|
+
// Mirror the deploy path: the special `_headers` / `_redirects` files
|
|
922
|
+
// in the assets directory carry the rules unless overridden by
|
|
923
|
+
// explicit `headers` / `redirects` props. The local runtime parses
|
|
924
|
+
// the raw string contents just like Cloudflare does.
|
|
925
|
+
//
|
|
926
|
+
// A Vite website's `assets` is config-only (`{ runWorkerFirst: true }`) —
|
|
927
|
+
// the client output directory is the build's business, and in `dev` the
|
|
928
|
+
// vite plugin serves assets from the dev server, so there is no directory
|
|
929
|
+
// to read here.
|
|
930
|
+
const directory = typeof assets === "string" ? assets : assets.directory;
|
|
931
|
+
// An unreadable file just means no rules here — the assets plugin
|
|
932
|
+
// reports directory problems itself.
|
|
933
|
+
const files = yield* readAssetsConfigFiles(directory).pipe(Effect.orElseSucceed(() => ({
|
|
934
|
+
_headers: undefined,
|
|
935
|
+
_redirects: undefined,
|
|
936
|
+
})));
|
|
721
937
|
if (typeof assets === "string") {
|
|
722
938
|
return {
|
|
723
939
|
directory: assets,
|
|
940
|
+
headers: files._headers,
|
|
941
|
+
redirects: files._redirects,
|
|
724
942
|
};
|
|
725
943
|
}
|
|
726
944
|
return {
|
|
727
945
|
directory: assets.directory,
|
|
728
|
-
headers: assets.headers,
|
|
729
|
-
redirects: assets.redirects,
|
|
946
|
+
headers: assets.headers ?? files._headers,
|
|
947
|
+
redirects: assets.redirects ?? files._redirects,
|
|
730
948
|
// Distilled widened generated string enums to open unions (`string & {}`);
|
|
731
949
|
// the API only ever returns the known variants here.
|
|
732
950
|
htmlHandling: assets.htmlHandling,
|
|
@@ -734,7 +952,7 @@ const toRuntimeAssets = (assets) => {
|
|
|
734
952
|
runWorkerFirst: assets.runWorkerFirst,
|
|
735
953
|
serveDirectly: assets.serveDirectly,
|
|
736
954
|
};
|
|
737
|
-
};
|
|
955
|
+
});
|
|
738
956
|
const moduleTypeFromExtension = (ext) => {
|
|
739
957
|
switch (ext) {
|
|
740
958
|
case ".wasm":
|