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,14 +1,13 @@
|
|
|
1
1
|
import {
|
|
2
2
|
Runtime,
|
|
3
|
-
RuntimeError,
|
|
4
3
|
type BindingHook,
|
|
5
4
|
type BindingServices,
|
|
6
5
|
type HyperdriveOrigin,
|
|
7
6
|
type Module,
|
|
8
|
-
type Assets as RuntimeAssets,
|
|
9
7
|
type DurableObjectNamespace as RuntimeDurableObject,
|
|
10
8
|
type QueueConsumer as RuntimeQueueConsumer,
|
|
11
9
|
type RuntimeServices,
|
|
10
|
+
type Workflow as RuntimeWorkflow,
|
|
12
11
|
} from "@distilled.cloud/cloudflare-runtime";
|
|
13
12
|
import {
|
|
14
13
|
Ai,
|
|
@@ -46,7 +45,7 @@ import * as Cause from "effect/Cause";
|
|
|
46
45
|
import * as Effect from "effect/Effect";
|
|
47
46
|
import * as Equal from "effect/Equal";
|
|
48
47
|
import * as Exit from "effect/Exit";
|
|
49
|
-
import * as
|
|
48
|
+
import type * as FileSystem from "effect/FileSystem";
|
|
50
49
|
import * as MutableHashMap from "effect/MutableHashMap";
|
|
51
50
|
import * as Option from "effect/Option";
|
|
52
51
|
import * as Path from "effect/Path";
|
|
@@ -56,27 +55,67 @@ import * as Schema from "effect/Schema";
|
|
|
56
55
|
import * as Scope from "effect/Scope";
|
|
57
56
|
import * as Semaphore from "effect/Semaphore";
|
|
58
57
|
import * as Stream from "effect/Stream";
|
|
58
|
+
import type * as ChildProcessSpawner from "effect/unstable/process/ChildProcessSpawner";
|
|
59
|
+
import * as os from "node:os";
|
|
59
60
|
import type * as Bundle from "../../Bundle/Bundle.ts";
|
|
60
|
-
import
|
|
61
|
-
import * as RpcProvider from "../../Local/RpcProvider.ts";
|
|
62
|
-
import type { ResourceBinding } from "../../Resource.ts";
|
|
61
|
+
import * as LocalProvider from "../../Local/LocalProvider.ts";
|
|
63
62
|
import { Stack } from "../../Stack.ts";
|
|
64
|
-
import {
|
|
63
|
+
import { unwrapRedacted } from "../../Util/index.ts";
|
|
65
64
|
import { CloudflareEnvironment } from "../CloudflareEnvironment.ts";
|
|
66
|
-
import {
|
|
65
|
+
import {
|
|
66
|
+
isLiveId,
|
|
67
|
+
isLocalId,
|
|
68
|
+
LOCAL_ENTRY_URL,
|
|
69
|
+
LocalRuntimeState,
|
|
70
|
+
} from "../LocalRuntime.ts";
|
|
67
71
|
import type { WorkerAssetsConfig, WorkerProps } from "../Workers/Worker.ts";
|
|
72
|
+
import { readAssetsConfigFiles } from "./Assets.ts";
|
|
68
73
|
import { getCompatibility } from "./Compatibility.ts";
|
|
69
74
|
import { isPythonMain, watchPythonWorkerBundle } from "./PythonWorkerBundle.ts";
|
|
70
|
-
import { Worker } from "./Worker.ts";
|
|
75
|
+
import { isSelfUrl, Worker } from "./Worker.ts";
|
|
71
76
|
import { getCronBindings } from "./WorkerAsyncBindings.ts";
|
|
72
77
|
import type { WorkerBinding } from "./WorkerBinding.ts";
|
|
73
78
|
import { WorkerBundle, type WorkerBundleOptions } from "./WorkerBundle.ts";
|
|
74
79
|
import { createWorkerName } from "./WorkerName.ts";
|
|
75
80
|
|
|
76
|
-
|
|
77
|
-
|
|
81
|
+
/** Local dev-server options (the worker-mode arm of `WorkerProps["dev"]`). */
|
|
82
|
+
type DevServerOptions = Extract<WorkerProps["dev"], { mode?: "worker" }> & {
|
|
83
|
+
port: number;
|
|
78
84
|
};
|
|
79
85
|
|
|
86
|
+
// Hosts that bind every interface — the dev server is then reachable at
|
|
87
|
+
// `localhost` *and* at each LAN address, like Vite's `--host` output.
|
|
88
|
+
const isWildcardHost = (host: string) =>
|
|
89
|
+
host === "0.0.0.0" || host === "::" || host === "[::]" || host === "*";
|
|
90
|
+
|
|
91
|
+
/**
|
|
92
|
+
* Resolve every URL a local dev server is reachable at, most relevant
|
|
93
|
+
* first. A loopback or explicit host yields just that URL; a wildcard host
|
|
94
|
+
* (`0.0.0.0`, `::`) yields `http://localhost:<port>` followed by one URL
|
|
95
|
+
* per external IPv4 interface (`http://192.168.0.12:<port>`, ...) —
|
|
96
|
+
* mirroring Vite's "Local / Network" dev-server output.
|
|
97
|
+
*/
|
|
98
|
+
const resolveLocalUrls = (serverUrl: URL): Effect.Effect<string[]> =>
|
|
99
|
+
Effect.sync(() => {
|
|
100
|
+
const port = serverUrl.port;
|
|
101
|
+
const host = serverUrl.hostname;
|
|
102
|
+
if (!isWildcardHost(host)) {
|
|
103
|
+
return [serverUrl.origin];
|
|
104
|
+
}
|
|
105
|
+
// `os.networkInterfaces()` is a sync, CPU-only syscall with no Effect
|
|
106
|
+
// platform equivalent — wrapped in `Effect.sync` so it participates in
|
|
107
|
+
// the runtime.
|
|
108
|
+
const interfaces = os.networkInterfaces();
|
|
109
|
+
const lanAddresses = Object.values(interfaces)
|
|
110
|
+
.flatMap((addresses) => addresses ?? [])
|
|
111
|
+
.filter((address) => address.family === "IPv4" && !address.internal)
|
|
112
|
+
.map((address) => address.address);
|
|
113
|
+
return [
|
|
114
|
+
`http://localhost:${port}`,
|
|
115
|
+
...lanAddresses.map((address) => `http://${address}:${port}`),
|
|
116
|
+
];
|
|
117
|
+
});
|
|
118
|
+
|
|
80
119
|
export class WorkerValidationError extends Schema.TaggedErrorClass<WorkerValidationError>()(
|
|
81
120
|
"WorkerValidationError",
|
|
82
121
|
{
|
|
@@ -87,7 +126,7 @@ export class WorkerValidationError extends Schema.TaggedErrorClass<WorkerValidat
|
|
|
87
126
|
) {}
|
|
88
127
|
|
|
89
128
|
export const LocalWorkerProvider = () =>
|
|
90
|
-
|
|
129
|
+
LocalProvider.make(
|
|
91
130
|
Worker,
|
|
92
131
|
LOCAL_ENTRY_URL,
|
|
93
132
|
Effect.gen(function* () {
|
|
@@ -97,10 +136,17 @@ export const LocalWorkerProvider = () =>
|
|
|
97
136
|
const path = yield* Path.Path;
|
|
98
137
|
const localRuntimeState = yield* LocalRuntimeState;
|
|
99
138
|
const workerProxy = yield* WorkerProxy.WorkerProxy;
|
|
139
|
+
const cloudflareEnv = yield* CloudflareEnvironment;
|
|
140
|
+
const context = yield* Effect.context<RuntimeServices>();
|
|
141
|
+
const rootScope = yield* Effect.scope;
|
|
142
|
+
|
|
143
|
+
// Proxies are deliberately NOT owned by the per-instance scope: they
|
|
144
|
+
// survive restarts so the worker's URL stays stable across rebuilds
|
|
145
|
+
// and config changes. Torn down by `stop` on delete.
|
|
100
146
|
const proxyInstances = new Map<
|
|
101
147
|
string,
|
|
102
148
|
{
|
|
103
|
-
serverOptions:
|
|
149
|
+
serverOptions: DevServerOptions;
|
|
104
150
|
instance: WorkerProxy.WorkerProxyInstance;
|
|
105
151
|
scope: Scope.Closeable;
|
|
106
152
|
}
|
|
@@ -112,6 +158,28 @@ export const LocalWorkerProvider = () =>
|
|
|
112
158
|
localRuntimeState.queueConsumers,
|
|
113
159
|
)) {
|
|
114
160
|
if (consumer.scriptName === scriptName) {
|
|
161
|
+
// A LIVE queue (`Alchemy.remote()`) consumed locally: the broker
|
|
162
|
+
// is still local, but it is fed by the runtime's pull loop
|
|
163
|
+
// draining the real queue over the HTTP pull API (the
|
|
164
|
+
// Consumer's local provider attached the `http_pull` consumer
|
|
165
|
+
// and resolved the queue's real name).
|
|
166
|
+
if (isLiveId(consumer.queueId)) {
|
|
167
|
+
if (!consumer.queueName) {
|
|
168
|
+
return yield* Effect.die(
|
|
169
|
+
`Consumer of live queue ${consumer.queueId} is missing its resolved queueName — re-deploy the consumer`,
|
|
170
|
+
);
|
|
171
|
+
}
|
|
172
|
+
consumers.push({
|
|
173
|
+
queueName: consumer.queueName,
|
|
174
|
+
deadLetterQueue: consumer.deadLetterQueue,
|
|
175
|
+
...consumer.settings,
|
|
176
|
+
pull: {
|
|
177
|
+
queueId: consumer.queueId,
|
|
178
|
+
accountId: consumer.accountId,
|
|
179
|
+
},
|
|
180
|
+
});
|
|
181
|
+
continue;
|
|
182
|
+
}
|
|
115
183
|
const queue = MutableHashMap.get(
|
|
116
184
|
localRuntimeState.queues,
|
|
117
185
|
consumer.queueId,
|
|
@@ -132,7 +200,7 @@ export const LocalWorkerProvider = () =>
|
|
|
132
200
|
|
|
133
201
|
const startProxy = Effect.fn(function* (
|
|
134
202
|
id: string,
|
|
135
|
-
serverOptions:
|
|
203
|
+
serverOptions: DevServerOptions,
|
|
136
204
|
) {
|
|
137
205
|
const scope = yield* Scope.fork(rootScope);
|
|
138
206
|
const instance = yield* workerProxy
|
|
@@ -152,7 +220,7 @@ export const LocalWorkerProvider = () =>
|
|
|
152
220
|
|
|
153
221
|
const maybeStartProxy = Effect.fn(function* (
|
|
154
222
|
id: string,
|
|
155
|
-
serverOptions:
|
|
223
|
+
serverOptions: DevServerOptions,
|
|
156
224
|
) {
|
|
157
225
|
const existing = proxyInstances.get(id);
|
|
158
226
|
if (existing) {
|
|
@@ -230,184 +298,32 @@ export const LocalWorkerProvider = () =>
|
|
|
230
298
|
return modules;
|
|
231
299
|
});
|
|
232
300
|
|
|
233
|
-
// Latest successful serve per worker id, so runtime wiring changes
|
|
234
|
-
// that arrive AFTER workerd started (e.g. a sibling `Consumer`
|
|
235
|
-
// resource registering this script as a queue consumer) can restart
|
|
236
|
-
// the instance with the same bundle. `scope` is the parent scope the
|
|
237
|
-
// workerd child scope is forked from (the instance scope), NOT the
|
|
238
|
-
// caller's ambient scope — restarts are triggered from other
|
|
239
|
-
// providers' reconcile fibers whose scopes must not own workerd.
|
|
240
|
-
const latestServes = new Map<
|
|
241
|
-
string,
|
|
242
|
-
{
|
|
243
|
-
worker: WorkerConfig;
|
|
244
|
-
bundle: Bundle.BundleOutput;
|
|
245
|
-
proxy: WorkerProxy.WorkerProxyInstance;
|
|
246
|
-
scope: Scope.Scope;
|
|
247
|
-
}
|
|
248
|
-
>();
|
|
249
|
-
// Serializes serves per worker id: a restart triggered by a sibling
|
|
250
|
-
// resource may otherwise interleave with a rebuild-triggered serve
|
|
251
|
-
// and leak a workerd scope.
|
|
252
|
-
const serveLocks = new Map<string, Semaphore.Semaphore>();
|
|
253
|
-
const serveLock = (id: string) => {
|
|
254
|
-
let lock = serveLocks.get(id);
|
|
255
|
-
if (!lock) {
|
|
256
|
-
lock = Semaphore.makeUnsafe(1);
|
|
257
|
-
serveLocks.set(id, lock);
|
|
258
|
-
}
|
|
259
|
-
return lock;
|
|
260
|
-
};
|
|
261
|
-
|
|
262
|
-
const serveWith = (
|
|
263
|
-
worker: WorkerConfig,
|
|
264
|
-
bundle: Bundle.BundleOutput,
|
|
265
|
-
proxy: WorkerProxy.WorkerProxyInstance,
|
|
266
|
-
parentScope: Scope.Scope,
|
|
267
|
-
) =>
|
|
268
|
-
Semaphore.withPermits(
|
|
269
|
-
serveLock(worker.id),
|
|
270
|
-
1,
|
|
271
|
-
)(
|
|
272
|
-
Effect.gen(function* () {
|
|
273
|
-
// Queue-consumer wiring can change while `runtime.start` is in
|
|
274
|
-
// flight (a sibling `Consumer` reconcile), before the restart
|
|
275
|
-
// hook below exists to pick it up. We hold the serve lock, so a
|
|
276
|
-
// restart would deadlock — instead, loop and serve again until
|
|
277
|
-
// the wiring is stable across a start.
|
|
278
|
-
while (true) {
|
|
279
|
-
const previous = workerdScopes.get(worker.id);
|
|
280
|
-
if (previous) {
|
|
281
|
-
// Both runtimes use the same registry key. Close the old scope first so
|
|
282
|
-
// its unregister finalizer cannot delete the replacement registration.
|
|
283
|
-
yield* Scope.close(previous, Exit.void);
|
|
284
|
-
workerdScopes.delete(worker.id);
|
|
285
|
-
}
|
|
286
|
-
const queueConsumers = yield* getQueueConsumers(worker.name);
|
|
287
|
-
const scope = yield* Scope.fork(parentScope);
|
|
288
|
-
const url = yield* runtime
|
|
289
|
-
.start({
|
|
290
|
-
name: worker.name,
|
|
291
|
-
compatibilityDate: worker.compatibility.date,
|
|
292
|
-
compatibilityFlags: worker.compatibility.flags,
|
|
293
|
-
bindings: worker.workerBindings as never,
|
|
294
|
-
hyperdrives: worker.hyperdrives,
|
|
295
|
-
durableObjectNamespaces: worker.durableObjectNamespaces,
|
|
296
|
-
queueConsumers,
|
|
297
|
-
modules: yield* toRuntimeModules(bundle),
|
|
298
|
-
assets: toRuntimeAssets(worker.assets),
|
|
299
|
-
})
|
|
300
|
-
.pipe(Scope.provide(scope));
|
|
301
|
-
workerdScopes.set(worker.id, scope);
|
|
302
|
-
latestServes.set(worker.id, {
|
|
303
|
-
worker,
|
|
304
|
-
bundle,
|
|
305
|
-
proxy,
|
|
306
|
-
scope: parentScope,
|
|
307
|
-
});
|
|
308
|
-
// Register the restart hook before the re-check below: changes
|
|
309
|
-
// landing after the re-check find the hook; changes before it
|
|
310
|
-
// are caught by the re-check. Nothing falls in between.
|
|
311
|
-
MutableHashMap.set(
|
|
312
|
-
localRuntimeState.workerRestarts,
|
|
313
|
-
worker.name,
|
|
314
|
-
restartWorker(worker.id),
|
|
315
|
-
);
|
|
316
|
-
const currentConsumers = yield* getQueueConsumers(worker.name);
|
|
317
|
-
if (
|
|
318
|
-
JSON.stringify(currentConsumers) !==
|
|
319
|
-
JSON.stringify(queueConsumers)
|
|
320
|
-
) {
|
|
321
|
-
// Wiring changed while workerd was starting — serve again with
|
|
322
|
-
// the fresh consumers before exposing the instance.
|
|
323
|
-
continue;
|
|
324
|
-
}
|
|
325
|
-
yield* proxy.set(url);
|
|
326
|
-
return url;
|
|
327
|
-
}
|
|
328
|
-
}),
|
|
329
|
-
);
|
|
330
|
-
|
|
331
|
-
const serveScoped = Effect.fn(function* (
|
|
332
|
-
worker: WorkerConfig,
|
|
333
|
-
bundle: Bundle.BundleOutput,
|
|
334
|
-
proxy: WorkerProxy.WorkerProxyInstance,
|
|
335
|
-
) {
|
|
336
|
-
const parentScope = yield* Effect.scope;
|
|
337
|
-
return yield* serveWith(worker, bundle, proxy, parentScope);
|
|
338
|
-
});
|
|
339
|
-
|
|
340
301
|
/**
|
|
341
|
-
*
|
|
342
|
-
*
|
|
343
|
-
*
|
|
344
|
-
*
|
|
302
|
+
* The restart-relevant, canonically-hashable view of a local Worker's
|
|
303
|
+
* desired state — `LocalProvider`'s `resolveConfig`. Everything here
|
|
304
|
+
* is plain data: binding *descriptors* (not `BindingHook` closures —
|
|
305
|
+
* those are materialized in `start` via {@link toRuntimeBinding}),
|
|
306
|
+
* DO-namespace/hyperdrive/container-image records, bundle options.
|
|
307
|
+
*
|
|
308
|
+
* Queue consumers are deliberately EXCLUDED: `getQueueConsumers`
|
|
309
|
+
* reads `LocalRuntimeState` at serve time and sibling `Consumer`
|
|
310
|
+
* reconciles drive restarts through the `workerRestarts` hook — they
|
|
311
|
+
* are runtime wiring observed at start, not desired-state config.
|
|
345
312
|
*/
|
|
346
|
-
const
|
|
347
|
-
Effect.suspend(() => {
|
|
348
|
-
const latest = latestServes.get(id);
|
|
349
|
-
if (!latest) return Effect.void;
|
|
350
|
-
return serveWith(
|
|
351
|
-
latest.worker,
|
|
352
|
-
latest.bundle,
|
|
353
|
-
latest.proxy,
|
|
354
|
-
latest.scope,
|
|
355
|
-
).pipe(
|
|
356
|
-
Effect.asVoid,
|
|
357
|
-
Effect.catchCause((cause) =>
|
|
358
|
-
Effect.logWarning(
|
|
359
|
-
`[${id}] Failed to restart local worker`,
|
|
360
|
-
Cause.squash(cause),
|
|
361
|
-
),
|
|
362
|
-
),
|
|
363
|
-
);
|
|
364
|
-
});
|
|
365
|
-
|
|
366
|
-
// Note: `serveLocks` entries are intentionally retained — an
|
|
367
|
-
// in-flight restart may still hold the semaphore when the instance
|
|
368
|
-
// is torn down, and a same-id re-create must serialize against it.
|
|
369
|
-
const dropServeState = (id: string) => {
|
|
370
|
-
const latest = latestServes.get(id);
|
|
371
|
-
if (latest) {
|
|
372
|
-
MutableHashMap.remove(
|
|
373
|
-
localRuntimeState.workerRestarts,
|
|
374
|
-
latest.worker.name,
|
|
375
|
-
);
|
|
376
|
-
latestServes.delete(id);
|
|
377
|
-
}
|
|
378
|
-
};
|
|
379
|
-
|
|
380
|
-
const buildConfig = Effect.fn(function* ({
|
|
313
|
+
const resolveConfig = Effect.fn(function* ({
|
|
381
314
|
id,
|
|
382
|
-
|
|
315
|
+
news,
|
|
383
316
|
bindings,
|
|
384
|
-
}: {
|
|
385
|
-
|
|
386
|
-
props: WorkerPropsWithDev;
|
|
387
|
-
bindings: ResourceBinding<Worker["Binding"]>[];
|
|
388
|
-
}) {
|
|
389
|
-
const { accountId } = yield* yield* CloudflareEnvironment;
|
|
317
|
+
}: LocalProvider.LocalProviderInput<Worker>) {
|
|
318
|
+
const props = news as WorkerProps;
|
|
390
319
|
const name = yield* createWorkerName(id, props.name);
|
|
391
320
|
const compatibility = getCompatibility(props);
|
|
392
|
-
const
|
|
393
|
-
Text.local("ALCHEMY_PHASE", "runtime"),
|
|
394
|
-
Text.local("ALCHEMY_STACK_NAME", stack.name),
|
|
395
|
-
Text.local("ALCHEMY_STAGE", stack.stage),
|
|
396
|
-
Text.local("ALCHEMY_CLOUDFLARE_ACCOUNT_ID", accountId),
|
|
397
|
-
...Object.entries(props.env ?? {}).map(([key, value]) => {
|
|
398
|
-
const unredacted = Redacted.isRedacted(value)
|
|
399
|
-
? Redacted.value(value)
|
|
400
|
-
: value;
|
|
401
|
-
return typeof unredacted === "string"
|
|
402
|
-
? Text.local(key, unredacted)
|
|
403
|
-
: Json.local(key, unredacted);
|
|
404
|
-
}),
|
|
405
|
-
...(props.assets || props.vite ? [Assets.local("ASSETS")] : []),
|
|
406
|
-
];
|
|
321
|
+
const bindingDescriptors: WorkerBinding[] = [];
|
|
407
322
|
const durableObjectNamespaces: Record<
|
|
408
323
|
string,
|
|
409
324
|
RuntimeDurableObject & { uniqueKey: string }
|
|
410
325
|
> = {};
|
|
326
|
+
const workflows: Record<string, RuntimeWorkflow> = {};
|
|
411
327
|
const hyperdrives: Record<string, Required<HyperdriveOrigin>> = {};
|
|
412
328
|
const containers: Record<string, ContainerImage> = {};
|
|
413
329
|
for (const { data } of bindings) {
|
|
@@ -428,14 +344,21 @@ export const LocalWorkerProvider = () =>
|
|
|
428
344
|
uniqueKey: namespaceId,
|
|
429
345
|
sql: true,
|
|
430
346
|
};
|
|
431
|
-
|
|
432
|
-
yield* toRuntimeBinding({
|
|
433
|
-
...binding,
|
|
434
|
-
namespaceId,
|
|
435
|
-
}),
|
|
436
|
-
);
|
|
347
|
+
bindingDescriptors.push({ ...binding, namespaceId });
|
|
437
348
|
} else {
|
|
438
|
-
|
|
349
|
+
if (
|
|
350
|
+
binding.type === "workflow" &&
|
|
351
|
+
// Same ownership rule as DOs: only declare workflows hosted by
|
|
352
|
+
// this worker. Cross-script workflow bindings are routed via
|
|
353
|
+
// the registry proxy.
|
|
354
|
+
(!binding.scriptName || binding.scriptName === name)
|
|
355
|
+
) {
|
|
356
|
+
workflows[binding.workflowName] = {
|
|
357
|
+
workflowName: binding.workflowName,
|
|
358
|
+
className: binding.className,
|
|
359
|
+
};
|
|
360
|
+
}
|
|
361
|
+
bindingDescriptors.push(binding);
|
|
439
362
|
}
|
|
440
363
|
}
|
|
441
364
|
if (data.hyperdrives) {
|
|
@@ -473,41 +396,350 @@ export const LocalWorkerProvider = () =>
|
|
|
473
396
|
}
|
|
474
397
|
durableObjectNamespaces[className].container = dev;
|
|
475
398
|
}
|
|
399
|
+
const dev:
|
|
400
|
+
| DevServerOptions
|
|
401
|
+
| { readonly mode: "external"; readonly url?: string } =
|
|
402
|
+
props.dev?.mode === "external"
|
|
403
|
+
? props.dev
|
|
404
|
+
: {
|
|
405
|
+
...props.dev,
|
|
406
|
+
mode: "worker" as const,
|
|
407
|
+
// This is the default. Vite and cloudflare-runtime will retry
|
|
408
|
+
// if unavailable, unless `strictPort` is true.
|
|
409
|
+
port: props.dev?.port ?? 1337,
|
|
410
|
+
};
|
|
476
411
|
return {
|
|
477
412
|
id,
|
|
478
413
|
name,
|
|
479
414
|
compatibility,
|
|
480
|
-
|
|
415
|
+
/** User env (Redacted preserved — the canonical hasher unwraps). */
|
|
416
|
+
env: props.env,
|
|
417
|
+
/**
|
|
418
|
+
* Raw inline module source (mutually exclusive with `main`).
|
|
419
|
+
* Serves as-is without the bundler; part of the hashed config so
|
|
420
|
+
* editing the script restarts the instance.
|
|
421
|
+
*/
|
|
422
|
+
script: props.script,
|
|
423
|
+
hasAssets: !!(props.assets || props.vite),
|
|
424
|
+
/**
|
|
425
|
+
* Assets-only Worker (no entry module at all): served locally by
|
|
426
|
+
* a stub that delegates every request to the ASSETS binding.
|
|
427
|
+
*/
|
|
428
|
+
assetsOnly:
|
|
429
|
+
props.main === undefined &&
|
|
430
|
+
props.script === undefined &&
|
|
431
|
+
!props.vite &&
|
|
432
|
+
!!props.assets,
|
|
433
|
+
bindingDescriptors,
|
|
481
434
|
durableObjectNamespaces: Object.values(durableObjectNamespaces),
|
|
482
|
-
|
|
483
|
-
viteEnvironments: props.vite?.viteEnvironments,
|
|
435
|
+
workflows: Object.values(workflows),
|
|
484
436
|
hyperdrives,
|
|
485
|
-
|
|
437
|
+
vite: !!props.vite,
|
|
438
|
+
// Relative `vite.main` resolves from the Vite root (see the
|
|
439
|
+
// matching normalization in WorkerProvider's `viteBuild`).
|
|
440
|
+
viteMain: props.vite?.main
|
|
441
|
+
? path.resolve(props.vite.rootDir ?? process.cwd(), props.vite.main)
|
|
442
|
+
: undefined,
|
|
443
|
+
viteEnvironments: props.vite?.viteEnvironments,
|
|
444
|
+
viteRootDir: props.vite?.rootDir,
|
|
486
445
|
bundleOptions: {
|
|
487
446
|
id,
|
|
488
447
|
main: props.main!,
|
|
489
448
|
compatibility,
|
|
490
449
|
entry: props.isExternal
|
|
491
|
-
? { kind: "external" }
|
|
492
|
-
: {
|
|
450
|
+
? { kind: "external" as const }
|
|
451
|
+
: {
|
|
452
|
+
kind: "effect" as const,
|
|
453
|
+
exports: props.exports ?? {},
|
|
454
|
+
},
|
|
493
455
|
stack: { name: stack.name, stage: stack.stage },
|
|
494
456
|
extraOptions: props.build,
|
|
495
457
|
} satisfies WorkerBundleOptions,
|
|
496
458
|
assets: props.assets,
|
|
497
|
-
dev
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
},
|
|
459
|
+
dev,
|
|
460
|
+
crons: Array.from(
|
|
461
|
+
new Set([...getCronBindings(bindings), ...(props.crons ?? [])]),
|
|
462
|
+
),
|
|
502
463
|
};
|
|
503
464
|
});
|
|
504
465
|
|
|
505
|
-
type WorkerConfig = Effect.Success<ReturnType<typeof
|
|
466
|
+
type WorkerConfig = Effect.Success<ReturnType<typeof resolveConfig>>;
|
|
467
|
+
/** A worker-mode config with its runtime `BindingHook`s materialized. */
|
|
468
|
+
type RunnableWorkerConfig = Omit<WorkerConfig, "dev"> & {
|
|
469
|
+
dev: DevServerOptions;
|
|
470
|
+
workerBindings: BindingHook<BindingServices>[];
|
|
471
|
+
};
|
|
472
|
+
|
|
473
|
+
/**
|
|
474
|
+
* Materialize the plain binding descriptors from {@link resolveConfig}
|
|
475
|
+
* into live cloudflare-runtime `BindingHook`s. This is the non-plain
|
|
476
|
+
* half of the old `buildConfig` — kept out of the hashed config.
|
|
477
|
+
*/
|
|
478
|
+
const materializeWorkerBindings = Effect.fn(function* (
|
|
479
|
+
config: WorkerConfig,
|
|
480
|
+
selfUrl: string | undefined,
|
|
481
|
+
) {
|
|
482
|
+
const { accountId } = yield* cloudflareEnv;
|
|
483
|
+
// Resource-backed env entries (e.g. `env: { KV: namespace }`) are
|
|
484
|
+
// represented by their binding descriptor (same name) — don't ALSO
|
|
485
|
+
// serialize the resolved attributes as a duplicate json binding.
|
|
486
|
+
const descriptorNames = new Set(
|
|
487
|
+
config.bindingDescriptors.map((descriptor) => descriptor.name),
|
|
488
|
+
);
|
|
489
|
+
const workerBindings: BindingHook<BindingServices>[] = [
|
|
490
|
+
Text.local("ALCHEMY_PHASE", "runtime"),
|
|
491
|
+
Text.local("ALCHEMY_WORKER_NAME", config.name),
|
|
492
|
+
Text.local("ALCHEMY_STACK_NAME", stack.name),
|
|
493
|
+
Text.local("ALCHEMY_STAGE", stack.stage),
|
|
494
|
+
Text.local("ALCHEMY_CLOUDFLARE_ACCOUNT_ID", accountId),
|
|
495
|
+
...Object.entries(config.env ?? {})
|
|
496
|
+
.filter(([key]) => !descriptorNames.has(key))
|
|
497
|
+
.map(([key, value]) => {
|
|
498
|
+
if (isSelfUrl(value)) {
|
|
499
|
+
return Text.local(key, selfUrl!);
|
|
500
|
+
}
|
|
501
|
+
const unredacted = Redacted.isRedacted(value)
|
|
502
|
+
? Redacted.value(value)
|
|
503
|
+
: value;
|
|
504
|
+
return typeof unredacted === "string"
|
|
505
|
+
? Text.local(key, unredacted)
|
|
506
|
+
: Json.local(key, unredacted);
|
|
507
|
+
}),
|
|
508
|
+
...(config.hasAssets ? [Assets.local("ASSETS")] : []),
|
|
509
|
+
];
|
|
510
|
+
for (const descriptor of config.bindingDescriptors) {
|
|
511
|
+
if (descriptor.type === "self_url") {
|
|
512
|
+
// Lowered here rather than in `toRuntimeBinding` — only this
|
|
513
|
+
// scope knows the worker's own dev-proxy URL.
|
|
514
|
+
workerBindings.push(Text.local(descriptor.name, selfUrl!));
|
|
515
|
+
continue;
|
|
516
|
+
}
|
|
517
|
+
workerBindings.push(yield* toRuntimeBinding(descriptor));
|
|
518
|
+
}
|
|
519
|
+
return workerBindings;
|
|
520
|
+
});
|
|
521
|
+
|
|
522
|
+
// Latest successful serve per worker id, so runtime wiring changes
|
|
523
|
+
// that arrive AFTER workerd started (e.g. a sibling `Consumer`
|
|
524
|
+
// resource registering this script as a queue consumer) can restart
|
|
525
|
+
// the instance with the same bundle.
|
|
526
|
+
const latestServes = new Map<
|
|
527
|
+
string,
|
|
528
|
+
{
|
|
529
|
+
worker: RunnableWorkerConfig;
|
|
530
|
+
bundle: Bundle.BundleOutput;
|
|
531
|
+
proxy: WorkerProxy.WorkerProxyInstance;
|
|
532
|
+
}
|
|
533
|
+
>();
|
|
534
|
+
// Serializes serves per worker id: a restart triggered by a sibling
|
|
535
|
+
// resource may otherwise interleave with a rebuild-triggered serve
|
|
536
|
+
// and leak a workerd scope.
|
|
537
|
+
const serveLocks = new Map<string, Semaphore.Semaphore>();
|
|
538
|
+
const serveLock = (id: string) => {
|
|
539
|
+
let lock = serveLocks.get(id);
|
|
540
|
+
if (!lock) {
|
|
541
|
+
lock = Semaphore.makeUnsafe(1);
|
|
542
|
+
serveLocks.set(id, lock);
|
|
543
|
+
}
|
|
544
|
+
return lock;
|
|
545
|
+
};
|
|
546
|
+
|
|
547
|
+
const workerdScopes = new Map<string, Scope.Closeable>();
|
|
548
|
+
|
|
549
|
+
// Serve with make-before-break semantics: start the replacement
|
|
550
|
+
// workerd while the previous instance (if any) keeps serving — and
|
|
551
|
+
// stays registered in the dev registry — then cut the proxy over and
|
|
552
|
+
// tear the previous instance down. Cross-script consumers (e.g. a DO
|
|
553
|
+
// bound via `scriptName` from another Worker) therefore never observe
|
|
554
|
+
// a window where the script has no running instance and no registry
|
|
555
|
+
// entry, even when `runtime.start` is slow (container image builds).
|
|
556
|
+
// Both instances use the same registry key; the registry's entry
|
|
557
|
+
// removal is owner-aware, so closing the old scope after the
|
|
558
|
+
// replacement has re-registered cannot delete the replacement's
|
|
559
|
+
// registration.
|
|
560
|
+
//
|
|
561
|
+
// The workerd scope is forked from the provider's `rootScope`, NOT
|
|
562
|
+
// the instance scope: a reconcile that replaces the instance (or a
|
|
563
|
+
// restart triggered from a sibling provider's fiber) tears down the
|
|
564
|
+
// bundle watcher without killing the currently serving workerd — the
|
|
565
|
+
// last good instance keeps serving until the replacement's first
|
|
566
|
+
// serve completes. Ownership is tracked in `workerdScopes`, closed by
|
|
567
|
+
// the next successful serve, by `delete`, or by provider shutdown.
|
|
568
|
+
const serveWith = (
|
|
569
|
+
worker: RunnableWorkerConfig,
|
|
570
|
+
bundle: Bundle.BundleOutput,
|
|
571
|
+
proxy: WorkerProxy.WorkerProxyInstance,
|
|
572
|
+
) =>
|
|
573
|
+
Semaphore.withPermits(
|
|
574
|
+
serveLock(worker.id),
|
|
575
|
+
1,
|
|
576
|
+
)(
|
|
577
|
+
// The bookkeeping around `runtime.start` must not be torn in half
|
|
578
|
+
// by an interrupt: once a replacement workerd is up, it must be
|
|
579
|
+
// recorded in `workerdScopes` and the superseded instances must be
|
|
580
|
+
// closed, or one of the workerds would leak until provider
|
|
581
|
+
// shutdown while holding the shared registry key.
|
|
582
|
+
Effect.uninterruptibleMask((restore) =>
|
|
583
|
+
Effect.gen(function* () {
|
|
584
|
+
const previous = workerdScopes.get(worker.id);
|
|
585
|
+
// Instances whose queue-consumer wiring went stale while they
|
|
586
|
+
// were starting; never exposed via the proxy, closed together
|
|
587
|
+
// with `previous` after the cutover below.
|
|
588
|
+
const superseded: Scope.Closeable[] = [];
|
|
589
|
+
let scope!: Scope.Closeable;
|
|
590
|
+
let url!: URL;
|
|
591
|
+
// Queue-consumer wiring can change while `runtime.start` is in
|
|
592
|
+
// flight (a sibling `Consumer` reconcile), before the restart
|
|
593
|
+
// hook below exists to pick it up. We hold the serve lock, so a
|
|
594
|
+
// restart would deadlock — instead, loop and serve again until
|
|
595
|
+
// the wiring is stable across a start.
|
|
596
|
+
while (true) {
|
|
597
|
+
const queueConsumers = yield* getQueueConsumers(worker.name);
|
|
598
|
+
scope = yield* Scope.fork(rootScope);
|
|
599
|
+
url = yield* restore(
|
|
600
|
+
runtime
|
|
601
|
+
.start({
|
|
602
|
+
name: worker.name,
|
|
603
|
+
compatibilityDate: worker.compatibility.date,
|
|
604
|
+
compatibilityFlags: worker.compatibility.flags,
|
|
605
|
+
bindings: worker.workerBindings as never,
|
|
606
|
+
hyperdrives: worker.hyperdrives,
|
|
607
|
+
durableObjectNamespaces: worker.durableObjectNamespaces,
|
|
608
|
+
workflows: worker.workflows,
|
|
609
|
+
queueConsumers,
|
|
610
|
+
// Cache API opt-out (`dev: { cache: false }`) — matches
|
|
611
|
+
// production workers.dev, where the Cache API is a no-op.
|
|
612
|
+
cache: worker.dev.cache,
|
|
613
|
+
// Per-worker request.cf override (`dev: { cf: {...} }`).
|
|
614
|
+
cf: worker.dev.cf,
|
|
615
|
+
modules: yield* toRuntimeModules(bundle),
|
|
616
|
+
assets: yield* toRuntimeAssets(worker.assets),
|
|
617
|
+
})
|
|
618
|
+
.pipe(Scope.provide(scope)),
|
|
619
|
+
).pipe(
|
|
620
|
+
// The scope hangs off `rootScope`, so a failed or
|
|
621
|
+
// interrupted start must close it here — nothing else owns
|
|
622
|
+
// it yet.
|
|
623
|
+
Effect.onExit((exit) =>
|
|
624
|
+
exit._tag === "Failure"
|
|
625
|
+
? Scope.close(scope, exit)
|
|
626
|
+
: Effect.void,
|
|
627
|
+
),
|
|
628
|
+
);
|
|
629
|
+
workerdScopes.set(worker.id, scope);
|
|
630
|
+
latestServes.set(worker.id, { worker, bundle, proxy });
|
|
631
|
+
// Register the restart hook before the re-check below: changes
|
|
632
|
+
// landing after the re-check find the hook; changes before it
|
|
633
|
+
// are caught by the re-check. Nothing falls in between.
|
|
634
|
+
MutableHashMap.set(
|
|
635
|
+
localRuntimeState.workerRestarts,
|
|
636
|
+
worker.name,
|
|
637
|
+
restartWorker(worker.id),
|
|
638
|
+
);
|
|
639
|
+
const currentConsumers = yield* getQueueConsumers(worker.name);
|
|
640
|
+
if (
|
|
641
|
+
JSON.stringify(currentConsumers) !==
|
|
642
|
+
JSON.stringify(queueConsumers)
|
|
643
|
+
) {
|
|
644
|
+
// Wiring changed while workerd was starting — serve again
|
|
645
|
+
// with the fresh consumers before exposing the instance.
|
|
646
|
+
superseded.push(scope);
|
|
647
|
+
continue;
|
|
648
|
+
}
|
|
649
|
+
break;
|
|
650
|
+
}
|
|
651
|
+
yield* proxy.set(url);
|
|
652
|
+
// Only now tear the replaced instances down: `previous` kept
|
|
653
|
+
// serving — and stayed registered in the dev registry — until
|
|
654
|
+
// the cutover above. The registry's entry removal is
|
|
655
|
+
// owner-aware, so these closes cannot delete the replacement's
|
|
656
|
+
// registration.
|
|
657
|
+
for (const replaced of previous
|
|
658
|
+
? [...superseded, previous]
|
|
659
|
+
: superseded) {
|
|
660
|
+
yield* Scope.close(replaced, Exit.void).pipe(
|
|
661
|
+
Effect.catchCause((cause) =>
|
|
662
|
+
Effect.logWarning(
|
|
663
|
+
`[${worker.id}] Failed to stop previous local worker instance`,
|
|
664
|
+
Cause.squash(cause),
|
|
665
|
+
),
|
|
666
|
+
),
|
|
667
|
+
);
|
|
668
|
+
}
|
|
669
|
+
return url;
|
|
670
|
+
}),
|
|
671
|
+
),
|
|
672
|
+
);
|
|
673
|
+
|
|
674
|
+
/**
|
|
675
|
+
* Restart a running worker with its latest bundle so start-time
|
|
676
|
+
* runtime wiring (queue consumers) is re-read from
|
|
677
|
+
* {@link LocalRuntimeState}. No-op if the worker hasn't served yet —
|
|
678
|
+
* the pending first serve will already observe the updated state.
|
|
679
|
+
*/
|
|
680
|
+
const restartWorker = (id: string) =>
|
|
681
|
+
Effect.suspend(() => {
|
|
682
|
+
const latest = latestServes.get(id);
|
|
683
|
+
if (!latest) return Effect.void;
|
|
684
|
+
return serveWith(latest.worker, latest.bundle, latest.proxy).pipe(
|
|
685
|
+
Effect.asVoid,
|
|
686
|
+
Effect.catchCause((cause) =>
|
|
687
|
+
Effect.logWarning(
|
|
688
|
+
`[${id}] Failed to restart local worker`,
|
|
689
|
+
Cause.squash(cause),
|
|
690
|
+
),
|
|
691
|
+
),
|
|
692
|
+
);
|
|
693
|
+
});
|
|
694
|
+
|
|
695
|
+
// Tear down the running workerd for a worker id, if any. Used when the
|
|
696
|
+
// Worker is deleted or handed off to an external dev process —
|
|
697
|
+
// instance replacement does NOT go through this: the previous workerd
|
|
698
|
+
// keeps serving until the replacement's first serve closes it.
|
|
699
|
+
const closeWorkerd = Effect.fn(function* (id: string) {
|
|
700
|
+
const scope = workerdScopes.get(id);
|
|
701
|
+
if (scope) {
|
|
702
|
+
workerdScopes.delete(id);
|
|
703
|
+
yield* Scope.close(scope, Exit.void);
|
|
704
|
+
}
|
|
705
|
+
});
|
|
706
|
+
|
|
707
|
+
// Note: `serveLocks` entries are intentionally retained — an
|
|
708
|
+
// in-flight restart may still hold the semaphore when the instance
|
|
709
|
+
// is torn down, and a same-id re-create must serialize against it.
|
|
710
|
+
const dropServeState = (id: string) => {
|
|
711
|
+
const latest = latestServes.get(id);
|
|
712
|
+
if (latest) {
|
|
713
|
+
MutableHashMap.remove(
|
|
714
|
+
localRuntimeState.workerRestarts,
|
|
715
|
+
latest.worker.name,
|
|
716
|
+
);
|
|
717
|
+
latestServes.delete(id);
|
|
718
|
+
}
|
|
719
|
+
};
|
|
506
720
|
|
|
507
|
-
const runWorker = Effect.fn(function* (worker:
|
|
721
|
+
const runWorker = Effect.fn(function* (worker: RunnableWorkerConfig) {
|
|
508
722
|
let start = Date.now();
|
|
509
723
|
let status: "start" | "update" = "start";
|
|
510
724
|
const proxy = yield* maybeStartProxy(worker.id, worker.dev);
|
|
725
|
+
// Inline `script` workers bypass the bundler entirely — the string
|
|
726
|
+
// IS the module (mirroring the deploy path, which uploads it as a
|
|
727
|
+
// single `main.js`). There is nothing to watch: script changes flow
|
|
728
|
+
// through the hashed config and restart the instance.
|
|
729
|
+
if (worker.script !== undefined) {
|
|
730
|
+
yield* serveWith(
|
|
731
|
+
worker,
|
|
732
|
+
{
|
|
733
|
+
files: [{ path: "main.js", content: worker.script, hash: "" }],
|
|
734
|
+
hash: "",
|
|
735
|
+
},
|
|
736
|
+
proxy,
|
|
737
|
+
);
|
|
738
|
+
yield* Effect.log(
|
|
739
|
+
`[${worker.id}] Started in ${Math.round(Date.now() - start)}ms`,
|
|
740
|
+
);
|
|
741
|
+
return proxy.url;
|
|
742
|
+
}
|
|
511
743
|
yield* (
|
|
512
744
|
isPythonMain(worker.bundleOptions.main)
|
|
513
745
|
? watchPythonWorkerBundle({
|
|
@@ -541,7 +773,7 @@ export const LocalWorkerProvider = () =>
|
|
|
541
773
|
: Result.failVoid,
|
|
542
774
|
),
|
|
543
775
|
Stream.mapEffect((bundle) =>
|
|
544
|
-
|
|
776
|
+
serveWith(worker, bundle, proxy).pipe(
|
|
545
777
|
Effect.exit,
|
|
546
778
|
Effect.tap((exit) => {
|
|
547
779
|
if (exit._tag === "Success") {
|
|
@@ -565,8 +797,36 @@ export const LocalWorkerProvider = () =>
|
|
|
565
797
|
return proxy.url;
|
|
566
798
|
});
|
|
567
799
|
|
|
800
|
+
// Assets-only Worker: there is no entry module to bundle or watch.
|
|
801
|
+
// The local runtime requires a user worker module, so serve a stub
|
|
802
|
+
// that delegates every request to the ASSETS binding — the assets
|
|
803
|
+
// worker applies `htmlHandling` / `notFoundHandling` (including SPA
|
|
804
|
+
// fallback) itself, matching Cloudflare's deployed assets-only
|
|
805
|
+
// behavior.
|
|
806
|
+
const assetsOnlyBundle: Bundle.BundleOutput = {
|
|
807
|
+
files: [
|
|
808
|
+
{
|
|
809
|
+
path: "main.js",
|
|
810
|
+
content:
|
|
811
|
+
"export default { fetch: (request, env) => env.ASSETS.fetch(request) };",
|
|
812
|
+
hash: "assets-only-stub",
|
|
813
|
+
},
|
|
814
|
+
],
|
|
815
|
+
hash: "assets-only-stub",
|
|
816
|
+
};
|
|
817
|
+
|
|
818
|
+
const runAssetsOnly = Effect.fn(function* (worker: RunnableWorkerConfig) {
|
|
819
|
+
const start = Date.now();
|
|
820
|
+
const proxy = yield* maybeStartProxy(worker.id, worker.dev);
|
|
821
|
+
yield* serveWith(worker, assetsOnlyBundle, proxy);
|
|
822
|
+
yield* Effect.log(
|
|
823
|
+
`[${worker.id}] Started in ${Math.round(Date.now() - start)}ms`,
|
|
824
|
+
);
|
|
825
|
+
return proxy.url;
|
|
826
|
+
});
|
|
827
|
+
|
|
568
828
|
const runVite = Effect.fn(function* (
|
|
569
|
-
worker:
|
|
829
|
+
worker: RunnableWorkerConfig,
|
|
570
830
|
rootDir: string | undefined,
|
|
571
831
|
) {
|
|
572
832
|
const proxy = yield* maybeStartProxy(worker.id, worker.dev);
|
|
@@ -586,9 +846,10 @@ export const LocalWorkerProvider = () =>
|
|
|
586
846
|
name: worker.name,
|
|
587
847
|
bindings: worker.workerBindings,
|
|
588
848
|
durableObjectNamespaces: worker.durableObjectNamespaces,
|
|
849
|
+
workflows: worker.workflows,
|
|
589
850
|
hyperdrives: worker.hyperdrives,
|
|
590
851
|
queueConsumers: yield* getQueueConsumers(worker.name),
|
|
591
|
-
assets: toRuntimeAssets(worker.assets),
|
|
852
|
+
assets: yield* toRuntimeAssets(worker.assets),
|
|
592
853
|
},
|
|
593
854
|
context,
|
|
594
855
|
},
|
|
@@ -598,88 +859,17 @@ export const LocalWorkerProvider = () =>
|
|
|
598
859
|
return proxy.url;
|
|
599
860
|
});
|
|
600
861
|
|
|
601
|
-
|
|
602
|
-
|
|
603
|
-
|
|
604
|
-
const context = yield* Effect.context<RuntimeServices>();
|
|
605
|
-
const instances = new Map<
|
|
606
|
-
string,
|
|
607
|
-
{
|
|
608
|
-
signature: string;
|
|
609
|
-
fiber: Fiber.Fiber<
|
|
610
|
-
Worker["Attributes"],
|
|
611
|
-
Bundle.BundleError | WorkerValidationError | RuntimeError
|
|
612
|
-
>;
|
|
613
|
-
scope: Scope.Closeable;
|
|
614
|
-
}
|
|
615
|
-
>();
|
|
862
|
+
return {
|
|
863
|
+
resolveConfig,
|
|
616
864
|
|
|
617
|
-
|
|
618
|
-
|
|
619
|
-
|
|
620
|
-
|
|
621
|
-
|
|
622
|
-
|
|
623
|
-
const { props, bindings } = options;
|
|
624
|
-
const config = yield* buildConfig(options);
|
|
625
|
-
const url = yield* (
|
|
626
|
-
props.vite ? runVite(config, props.vite.rootDir) : runWorker(config)
|
|
627
|
-
).pipe(Effect.map((url) => url.toString()));
|
|
628
|
-
return {
|
|
629
|
-
workerId: config.name,
|
|
630
|
-
workerName: config.name,
|
|
631
|
-
namespace: undefined,
|
|
632
|
-
logpush: undefined,
|
|
633
|
-
url,
|
|
634
|
-
tags: [],
|
|
635
|
-
durableObjectNamespaces: Object.fromEntries(
|
|
636
|
-
config.durableObjectNamespaces.map((namespace) => [
|
|
637
|
-
namespace.className,
|
|
638
|
-
namespace.uniqueKey,
|
|
639
|
-
]),
|
|
865
|
+
// The physical name only survives an update when it isn't changing.
|
|
866
|
+
stables: ({ output, config }) =>
|
|
867
|
+
Effect.succeed(
|
|
868
|
+
output?.workerName === config.name
|
|
869
|
+
? (["workerName"] as ["workerName"])
|
|
870
|
+
: undefined,
|
|
640
871
|
),
|
|
641
|
-
domains: [url],
|
|
642
|
-
routes: [],
|
|
643
|
-
crons: Array.from(
|
|
644
|
-
new Set([...getCronBindings(bindings), ...(props.crons ?? [])]),
|
|
645
|
-
),
|
|
646
|
-
accountId,
|
|
647
|
-
} satisfies Worker["Attributes"];
|
|
648
|
-
});
|
|
649
872
|
|
|
650
|
-
return {
|
|
651
|
-
// Local dev provider: there is no cloud enumeration API. The set of
|
|
652
|
-
// locally running Workers is the in-memory `instances` map; each
|
|
653
|
-
// instance's fiber resolves to the Worker Attributes once it has
|
|
654
|
-
// started, so enumerate that local state.
|
|
655
|
-
list: () =>
|
|
656
|
-
Effect.forEach(
|
|
657
|
-
Array.from(instances.values()),
|
|
658
|
-
(instance) => Fiber.join(instance.fiber),
|
|
659
|
-
{ concurrency: "unbounded" },
|
|
660
|
-
),
|
|
661
|
-
diff: Effect.fn(function* ({ id, news: desired, newBindings, output }) {
|
|
662
|
-
// Effect-valued `env` entries (tagged Worker classes) never resolve
|
|
663
|
-
// at plan time; their identity is carried by the resolved binding
|
|
664
|
-
// data. Strip them so the signature-based diff still runs — same
|
|
665
|
-
// rationale as the cloud WorkerProvider (#874).
|
|
666
|
-
const news = stripEffects(desired);
|
|
667
|
-
if (!isResolved(news) || !isResolved(newBindings)) return undefined;
|
|
668
|
-
const options = {
|
|
669
|
-
id,
|
|
670
|
-
props: news,
|
|
671
|
-
bindings: newBindings,
|
|
672
|
-
};
|
|
673
|
-
const signature = yield* structuralSignature(options);
|
|
674
|
-
if (instances.get(options.id)?.signature === signature) {
|
|
675
|
-
return { action: "noop" };
|
|
676
|
-
}
|
|
677
|
-
const name = yield* createWorkerName(id, news.name);
|
|
678
|
-
return {
|
|
679
|
-
action: "update",
|
|
680
|
-
stables: output?.workerName === name ? ["workerName"] : undefined,
|
|
681
|
-
};
|
|
682
|
-
}),
|
|
683
873
|
precreate: Effect.fn(function* ({ id, news, bindings }) {
|
|
684
874
|
const name = yield* createWorkerName(id, news.name);
|
|
685
875
|
const durableObjectNamespaces: Record<string, string> = {};
|
|
@@ -694,24 +884,26 @@ export const LocalWorkerProvider = () =>
|
|
|
694
884
|
}
|
|
695
885
|
}
|
|
696
886
|
}
|
|
697
|
-
const { accountId } = yield*
|
|
698
|
-
const
|
|
887
|
+
const { accountId } = yield* cloudflareEnv;
|
|
888
|
+
const urls =
|
|
699
889
|
news.dev?.mode === "external"
|
|
700
890
|
? // news.dev.url may be an unresolved output; avoid trying to resolve it here.
|
|
701
|
-
|
|
891
|
+
[]
|
|
702
892
|
: yield* maybeStartProxy(id, {
|
|
703
893
|
...news.dev,
|
|
894
|
+
mode: "worker" as const,
|
|
704
895
|
port: news.dev?.port ?? 1337,
|
|
705
|
-
}).pipe(Effect.
|
|
896
|
+
}).pipe(Effect.flatMap((proxy) => resolveLocalUrls(proxy.url)));
|
|
706
897
|
return {
|
|
707
898
|
workerId: name,
|
|
708
899
|
workerName: name,
|
|
709
900
|
namespace: undefined,
|
|
710
901
|
logpush: undefined,
|
|
711
|
-
url,
|
|
902
|
+
url: urls[0],
|
|
903
|
+
urls,
|
|
904
|
+
domain: undefined,
|
|
712
905
|
tags: [],
|
|
713
906
|
durableObjectNamespaces,
|
|
714
|
-
domains: url ? [url] : [],
|
|
715
907
|
routes: [],
|
|
716
908
|
crons: Array.from(
|
|
717
909
|
new Set([...getCronBindings(bindings), ...(news.crons ?? [])]),
|
|
@@ -719,84 +911,127 @@ export const LocalWorkerProvider = () =>
|
|
|
719
911
|
accountId,
|
|
720
912
|
};
|
|
721
913
|
}),
|
|
722
|
-
|
|
723
|
-
|
|
724
|
-
|
|
725
|
-
|
|
726
|
-
//
|
|
727
|
-
//
|
|
728
|
-
|
|
729
|
-
|
|
730
|
-
|
|
731
|
-
|
|
732
|
-
|
|
733
|
-
|
|
734
|
-
|
|
735
|
-
|
|
736
|
-
|
|
737
|
-
const
|
|
914
|
+
|
|
915
|
+
start: Effect.fn(function* ({ id, config }) {
|
|
916
|
+
const { accountId } = yield* cloudflareEnv;
|
|
917
|
+
|
|
918
|
+
// `dev: { mode: "external" }` opts out of running a local Worker
|
|
919
|
+
// entirely — typically because an external dev process
|
|
920
|
+
// (Command.Dev) is serving requests. The instance exists in the
|
|
921
|
+
// registry (with an empty scope) but has no workerd behind it. A
|
|
922
|
+
// previous worker-mode instance for this id may have registered
|
|
923
|
+
// serve/restart state — drop it, and tear down its workerd (with
|
|
924
|
+
// make-before-break the running workerd outlives instance scopes
|
|
925
|
+
// and must be closed explicitly on handoff).
|
|
926
|
+
if (config.dev.mode === "external") {
|
|
927
|
+
dropServeState(id);
|
|
928
|
+
yield* closeWorkerd(id);
|
|
929
|
+
const urls = config.dev.url ? [config.dev.url] : [];
|
|
738
930
|
return {
|
|
739
|
-
workerId: name,
|
|
740
|
-
workerName: name,
|
|
931
|
+
workerId: config.name,
|
|
932
|
+
workerName: config.name,
|
|
741
933
|
namespace: undefined,
|
|
742
934
|
logpush: undefined,
|
|
743
|
-
url:
|
|
935
|
+
url: urls[0],
|
|
936
|
+
urls,
|
|
937
|
+
domain: undefined,
|
|
744
938
|
tags: [],
|
|
745
939
|
durableObjectNamespaces: {},
|
|
746
940
|
accountId,
|
|
747
|
-
domains: [],
|
|
748
941
|
routes: [],
|
|
749
|
-
crons:
|
|
942
|
+
crons: config.crons,
|
|
750
943
|
} satisfies Worker["Attributes"];
|
|
751
944
|
}
|
|
752
|
-
|
|
753
|
-
|
|
754
|
-
|
|
755
|
-
|
|
756
|
-
|
|
757
|
-
|
|
758
|
-
|
|
759
|
-
|
|
760
|
-
|
|
761
|
-
|
|
762
|
-
|
|
763
|
-
|
|
764
|
-
|
|
765
|
-
|
|
766
|
-
|
|
767
|
-
|
|
768
|
-
dropServeState(options.id);
|
|
769
|
-
}
|
|
770
|
-
const scope = yield* Scope.fork(rootScope);
|
|
771
|
-
const fiber = yield* runInstance(options).pipe(
|
|
772
|
-
Effect.forkDetach,
|
|
773
|
-
Scope.provide(scope),
|
|
945
|
+
|
|
946
|
+
// `Worker.URL` locally resolves to the worker's dev-proxy URL —
|
|
947
|
+
// the proxy is stable per worker id (the same instance `runWorker`
|
|
948
|
+
// / `runVite` attach to below), so the URL is known before workerd
|
|
949
|
+
// starts. Trailing slash stripped to match the cloud value's shape.
|
|
950
|
+
const needsSelfUrl =
|
|
951
|
+
config.bindingDescriptors.some((b) => b.type === "self_url") ||
|
|
952
|
+
Object.values(config.env ?? {}).some(isSelfUrl);
|
|
953
|
+
const selfUrl = needsSelfUrl
|
|
954
|
+
? (yield* maybeStartProxy(id, config.dev)).url
|
|
955
|
+
.toString()
|
|
956
|
+
.replace(/\/$/, "")
|
|
957
|
+
: undefined;
|
|
958
|
+
const workerBindings = yield* materializeWorkerBindings(
|
|
959
|
+
config,
|
|
960
|
+
selfUrl,
|
|
774
961
|
);
|
|
775
|
-
|
|
776
|
-
|
|
777
|
-
|
|
778
|
-
|
|
779
|
-
|
|
780
|
-
|
|
781
|
-
|
|
782
|
-
|
|
962
|
+
const worker: RunnableWorkerConfig = {
|
|
963
|
+
...config,
|
|
964
|
+
// Substitute `Worker.URL` sentinels so the Vite dev server
|
|
965
|
+
// inlines the local URL into VITE_*-prefixed define entries.
|
|
966
|
+
env:
|
|
967
|
+
config.env && selfUrl !== undefined
|
|
968
|
+
? Object.fromEntries(
|
|
969
|
+
Object.entries(config.env).map(([key, value]) => [
|
|
970
|
+
key,
|
|
971
|
+
isSelfUrl(value) ? selfUrl : value,
|
|
972
|
+
]),
|
|
973
|
+
)
|
|
974
|
+
: config.env,
|
|
975
|
+
dev: config.dev,
|
|
976
|
+
workerBindings,
|
|
977
|
+
};
|
|
978
|
+
const serverUrl = yield* config.vite
|
|
979
|
+
? runVite(worker, config.viteRootDir)
|
|
980
|
+
: config.assetsOnly
|
|
981
|
+
? runAssetsOnly(worker)
|
|
982
|
+
: runWorker(worker);
|
|
983
|
+
// In dev, `urls` is the dev server's actual surface — localhost
|
|
984
|
+
// first, then LAN addresses for wildcard hosts. Deployed domains
|
|
985
|
+
// are not served by this session, so they don't appear.
|
|
986
|
+
const urls = yield* resolveLocalUrls(serverUrl);
|
|
987
|
+
return {
|
|
988
|
+
workerId: config.name,
|
|
989
|
+
workerName: config.name,
|
|
990
|
+
namespace: undefined,
|
|
991
|
+
logpush: undefined,
|
|
992
|
+
url: urls[0],
|
|
993
|
+
urls,
|
|
994
|
+
domain: undefined,
|
|
995
|
+
tags: [],
|
|
996
|
+
durableObjectNamespaces: Object.fromEntries(
|
|
997
|
+
config.durableObjectNamespaces.map((namespace) => [
|
|
998
|
+
namespace.className,
|
|
999
|
+
namespace.uniqueKey,
|
|
1000
|
+
]),
|
|
783
1001
|
),
|
|
784
|
-
|
|
1002
|
+
routes: [],
|
|
1003
|
+
crons: config.crons,
|
|
1004
|
+
accountId,
|
|
1005
|
+
} satisfies Worker["Attributes"];
|
|
785
1006
|
}),
|
|
786
|
-
|
|
787
|
-
|
|
788
|
-
|
|
789
|
-
|
|
790
|
-
|
|
791
|
-
|
|
792
|
-
|
|
793
|
-
|
|
1007
|
+
|
|
1008
|
+
stop: Effect.fn(function* ({ id }) {
|
|
1009
|
+
// Cross-restart state: the serve/restart bookkeeping, the running
|
|
1010
|
+
// workerd (which outlives instance scopes for make-before-break),
|
|
1011
|
+
// and the URL proxy live outside instance scopes and are only
|
|
1012
|
+
// reclaimed on a real delete.
|
|
1013
|
+
dropServeState(id);
|
|
1014
|
+
yield* closeWorkerd(id);
|
|
1015
|
+
yield* stopProxy(id);
|
|
794
1016
|
}),
|
|
795
|
-
}
|
|
1017
|
+
} satisfies LocalProvider.LocalProviderSpec<
|
|
1018
|
+
Worker,
|
|
1019
|
+
Effect.Success<ReturnType<typeof resolveConfig>>,
|
|
1020
|
+
// The Python-bundle watcher spawns `uv` (ChildProcessSpawner) and
|
|
1021
|
+
// reads vendored modules (FileSystem) from inside `start`;
|
|
1022
|
+
// `readAssetsConfigFiles` (assets `_headers`/`_redirects`) needs
|
|
1023
|
+
// FileSystem + Path.
|
|
1024
|
+
| ChildProcessSpawner.ChildProcessSpawner
|
|
1025
|
+
| FileSystem.FileSystem
|
|
1026
|
+
| Path.Path
|
|
1027
|
+
>;
|
|
796
1028
|
}),
|
|
797
1029
|
);
|
|
798
1030
|
|
|
799
|
-
export const toRuntimeBinding = Effect.fn(function* (
|
|
1031
|
+
export const toRuntimeBinding = Effect.fn(function* (
|
|
1032
|
+
b: WorkerBinding,
|
|
1033
|
+
dev?: { remote?: boolean },
|
|
1034
|
+
) {
|
|
800
1035
|
const unsupported = () =>
|
|
801
1036
|
new WorkerValidationError({
|
|
802
1037
|
message: `${b.type} bindings are not supported in local mode`,
|
|
@@ -818,7 +1053,12 @@ export const toRuntimeBinding = Effect.fn(function* (b: WorkerBinding) {
|
|
|
818
1053
|
case "browser":
|
|
819
1054
|
return Browser.remote(b.name);
|
|
820
1055
|
case "d1":
|
|
821
|
-
|
|
1056
|
+
// A `dev:` id belongs to a locally-emulated database (local D1
|
|
1057
|
+
// provider); a real id is a live database the dev worker proxies to
|
|
1058
|
+
// (e.g. the resource opted out of emulation via `Alchemy.remote()`).
|
|
1059
|
+
return isLocalId(b.databaseId)
|
|
1060
|
+
? D1.local({ binding: b.name, id: b.databaseId })
|
|
1061
|
+
: D1.remote(b.name, b.databaseId);
|
|
822
1062
|
case "data_blob":
|
|
823
1063
|
return Data.local(b.name, Buffer.from(b.part));
|
|
824
1064
|
case "dispatch_namespace":
|
|
@@ -846,20 +1086,58 @@ export const toRuntimeBinding = Effect.fn(function* (b: WorkerBinding) {
|
|
|
846
1086
|
case "json":
|
|
847
1087
|
return Json.local(b.name, b.json);
|
|
848
1088
|
case "kv_namespace":
|
|
849
|
-
|
|
1089
|
+
// A `dev:` id belongs to a locally-emulated namespace; a real id is
|
|
1090
|
+
// a live namespace the dev worker proxies to.
|
|
1091
|
+
return isLocalId(b.namespaceId)
|
|
1092
|
+
? KvNamespace.local({ binding: b.name, id: b.namespaceId })
|
|
1093
|
+
: KvNamespace.remote(b.name, b.namespaceId);
|
|
850
1094
|
case "mtls_certificate":
|
|
851
1095
|
return MtlsCertificate.remote(b.name, b.certificateId);
|
|
852
1096
|
case "pipelines":
|
|
853
1097
|
return Pipelines.remote(b.name, b.pipeline);
|
|
854
1098
|
case "plain_text":
|
|
855
1099
|
return Text.local(b.name, b.text);
|
|
856
|
-
case "queue":
|
|
1100
|
+
case "queue": {
|
|
1101
|
+
// A real queueId belongs to an `Alchemy.remote()` queue. Queue bindings
|
|
1102
|
+
// are NOT supported in Cloudflare's remote/preview sessions — a
|
|
1103
|
+
// platform limitation (cloudflare/workers-sdk#9929) — so live
|
|
1104
|
+
// production goes through the deployed shim worker registered at
|
|
1105
|
+
// eval time (see `Queues/QueueShim.ts`): the local binding targets a
|
|
1106
|
+
// forwarder service that relays the queue wire protocol to the shim
|
|
1107
|
+
// over HTTPS with a bearer token.
|
|
1108
|
+
if (b.queueId !== undefined && !isLocalId(b.queueId)) {
|
|
1109
|
+
const url = b.shim?.url;
|
|
1110
|
+
const token = b.shim?.token;
|
|
1111
|
+
if (url === undefined || token === undefined) {
|
|
1112
|
+
// Defensive: binding data produced by current eval always carries
|
|
1113
|
+
// the shim for this mode combination.
|
|
1114
|
+
return yield* new WorkerValidationError({
|
|
1115
|
+
message:
|
|
1116
|
+
`Queue binding "${b.name}" targets a live queue ` +
|
|
1117
|
+
"(Alchemy.remote()) but no producer shim was registered for it — " +
|
|
1118
|
+
"re-deploy, or remove remote() from the queue (local emulation).",
|
|
1119
|
+
value: b,
|
|
1120
|
+
});
|
|
1121
|
+
}
|
|
1122
|
+
return Queue.remote({
|
|
1123
|
+
binding: b.name,
|
|
1124
|
+
queueName: b.queueName,
|
|
1125
|
+
url,
|
|
1126
|
+
token: typeof token === "string" ? token : Redacted.value(token),
|
|
1127
|
+
});
|
|
1128
|
+
}
|
|
857
1129
|
return Queue.local({
|
|
858
1130
|
binding: b.name,
|
|
859
1131
|
queueName: b.queueName,
|
|
860
1132
|
});
|
|
1133
|
+
}
|
|
861
1134
|
case "r2_bucket":
|
|
862
|
-
|
|
1135
|
+
// A `dev:`-prefixed bucket name belongs to a locally-emulated bucket
|
|
1136
|
+
// (R2 has no opaque id — the name is the identity); a real name is a
|
|
1137
|
+
// live bucket the dev worker proxies to.
|
|
1138
|
+
return isLocalId(b.bucketName)
|
|
1139
|
+
? R2Bucket.local({ binding: b.name, id: b.bucketName })
|
|
1140
|
+
: R2Bucket.remote(b.name, b.bucketName, b.jurisdiction);
|
|
863
1141
|
case "ratelimit":
|
|
864
1142
|
return RateLimit.local({
|
|
865
1143
|
binding: b.name,
|
|
@@ -873,7 +1151,7 @@ export const toRuntimeBinding = Effect.fn(function* (b: WorkerBinding) {
|
|
|
873
1151
|
case "secrets_store_secret":
|
|
874
1152
|
return yield* unsupported();
|
|
875
1153
|
case "send_email":
|
|
876
|
-
return SendEmail
|
|
1154
|
+
return SendEmail[dev?.remote ? "remote" : "local"]({
|
|
877
1155
|
binding: b.name,
|
|
878
1156
|
destinationAddress: b.destinationAddress,
|
|
879
1157
|
allowedDestinationAddresses: b.allowedDestinationAddresses,
|
|
@@ -907,61 +1185,40 @@ export const toRuntimeBinding = Effect.fn(function* (b: WorkerBinding) {
|
|
|
907
1185
|
}
|
|
908
1186
|
});
|
|
909
1187
|
|
|
910
|
-
|
|
911
|
-
* Stable, collision-free structural signature used to decide whether a
|
|
912
|
-
* locally-running dev Worker needs to be torn down and restarted.
|
|
913
|
-
*
|
|
914
|
-
* We deliberately do NOT use `Hash.structure` here: Effect's structural
|
|
915
|
-
* hash folds sibling fields together with XOR, so when the *same* value
|
|
916
|
-
* change appears in two sibling subtrees the diffs cancel and the hash is
|
|
917
|
-
* unchanged. The Worker config mirrors `env` values into `bindings`
|
|
918
|
-
* (e.g. `DEV_MARKER`/an R2 bucket name appear in both `props.env` and the
|
|
919
|
-
* derived `bindings`), which is exactly the shape that collides — so an
|
|
920
|
-
* env-only or rebind change would be silently treated as "no change" and
|
|
921
|
-
* the dev Worker would never restart with the new bindings.
|
|
922
|
-
*
|
|
923
|
-
* A canonical JSON serialization (sorted keys, unwrapped `Redacted`,
|
|
924
|
-
* cycle-safe) gives an exact comparison instead of a lossy fingerprint. We
|
|
925
|
-
* hash that serialization with SHA-256 so each retained signature is a fixed
|
|
926
|
-
* 64-char digest rather than a copy of the whole props/bindings blob.
|
|
927
|
-
*/
|
|
928
|
-
const structuralSignature = (value: unknown): Effect.Effect<string> => {
|
|
929
|
-
const seen = new WeakSet<object>();
|
|
930
|
-
const normalize = (input: unknown): unknown => {
|
|
931
|
-
if (typeof input === "bigint") return `bigint:${input.toString()}`;
|
|
932
|
-
if (input === null || typeof input !== "object") return input;
|
|
933
|
-
if (Redacted.isRedacted(input)) {
|
|
934
|
-
return { __redacted: normalize(Redacted.value(input)) };
|
|
935
|
-
}
|
|
936
|
-
if (seen.has(input)) return "[circular]";
|
|
937
|
-
seen.add(input);
|
|
938
|
-
if (input instanceof Uint8Array) return { __bytes: Array.from(input) };
|
|
939
|
-
if (Array.isArray(input)) return input.map(normalize);
|
|
940
|
-
return Object.fromEntries(
|
|
941
|
-
Object.keys(input)
|
|
942
|
-
.sort()
|
|
943
|
-
.map((key) => [
|
|
944
|
-
key,
|
|
945
|
-
normalize((input as Record<string, unknown>)[key]),
|
|
946
|
-
]),
|
|
947
|
-
);
|
|
948
|
-
};
|
|
949
|
-
return sha256(JSON.stringify(normalize(value)));
|
|
950
|
-
};
|
|
951
|
-
|
|
952
|
-
const toRuntimeAssets = (
|
|
1188
|
+
const toRuntimeAssets = Effect.fn(function* (
|
|
953
1189
|
assets: WorkerAssetsConfig | undefined,
|
|
954
|
-
)
|
|
1190
|
+
) {
|
|
955
1191
|
if (!assets) return undefined;
|
|
1192
|
+
// Mirror the deploy path: the special `_headers` / `_redirects` files
|
|
1193
|
+
// in the assets directory carry the rules unless overridden by
|
|
1194
|
+
// explicit `headers` / `redirects` props. The local runtime parses
|
|
1195
|
+
// the raw string contents just like Cloudflare does.
|
|
1196
|
+
//
|
|
1197
|
+
// A Vite website's `assets` is config-only (`{ runWorkerFirst: true }`) —
|
|
1198
|
+
// the client output directory is the build's business, and in `dev` the
|
|
1199
|
+
// vite plugin serves assets from the dev server, so there is no directory
|
|
1200
|
+
// to read here.
|
|
1201
|
+
const directory: string | undefined =
|
|
1202
|
+
typeof assets === "string" ? assets : assets.directory;
|
|
1203
|
+
// An unreadable file just means no rules here — the assets plugin
|
|
1204
|
+
// reports directory problems itself.
|
|
1205
|
+
const files = yield* readAssetsConfigFiles(directory).pipe(
|
|
1206
|
+
Effect.orElseSucceed(() => ({
|
|
1207
|
+
_headers: undefined,
|
|
1208
|
+
_redirects: undefined,
|
|
1209
|
+
})),
|
|
1210
|
+
);
|
|
956
1211
|
if (typeof assets === "string") {
|
|
957
1212
|
return {
|
|
958
1213
|
directory: assets,
|
|
1214
|
+
headers: files._headers,
|
|
1215
|
+
redirects: files._redirects,
|
|
959
1216
|
};
|
|
960
1217
|
}
|
|
961
1218
|
return {
|
|
962
1219
|
directory: assets.directory,
|
|
963
|
-
headers: assets.headers,
|
|
964
|
-
redirects: assets.redirects,
|
|
1220
|
+
headers: assets.headers ?? files._headers,
|
|
1221
|
+
redirects: assets.redirects ?? files._redirects,
|
|
965
1222
|
// Distilled widened generated string enums to open unions (`string & {}`);
|
|
966
1223
|
// the API only ever returns the known variants here.
|
|
967
1224
|
htmlHandling: assets.htmlHandling as
|
|
@@ -978,7 +1235,7 @@ const toRuntimeAssets = (
|
|
|
978
1235
|
runWorkerFirst: assets.runWorkerFirst,
|
|
979
1236
|
serveDirectly: assets.serveDirectly,
|
|
980
1237
|
};
|
|
981
|
-
};
|
|
1238
|
+
});
|
|
982
1239
|
|
|
983
1240
|
const moduleTypeFromExtension = (ext: string): Module["type"] | "SourceMap" => {
|
|
984
1241
|
switch (ext) {
|