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
|
@@ -0,0 +1,518 @@
|
|
|
1
|
+
/** @effect-diagnostics anyUnknownInErrorContext:off */
|
|
2
|
+
|
|
3
|
+
import * as Effect from "effect/Effect";
|
|
4
|
+
import * as Exit from "effect/Exit";
|
|
5
|
+
import * as Fiber from "effect/Fiber";
|
|
6
|
+
import * as Redacted from "effect/Redacted";
|
|
7
|
+
import * as Scope from "effect/Scope";
|
|
8
|
+
import * as Semaphore from "effect/Semaphore";
|
|
9
|
+
import type { ScopedPlanStatusSession } from "../Cli/Cli.ts";
|
|
10
|
+
import { isResolved, stripEffects, type Diff } from "../Diff.ts";
|
|
11
|
+
import type { Platform } from "../Platform.ts";
|
|
12
|
+
import type { ProviderService } from "../Provider.ts";
|
|
13
|
+
import type {
|
|
14
|
+
ResourceBinding,
|
|
15
|
+
ResourceClassLike,
|
|
16
|
+
ResourceLike,
|
|
17
|
+
} from "../Resource.ts";
|
|
18
|
+
import { sha256 } from "../Util/sha256.ts";
|
|
19
|
+
import * as RpcProvider from "./RpcProvider.ts";
|
|
20
|
+
|
|
21
|
+
/**
|
|
22
|
+
* # LocalProvider — the standard shape of a long-running local provider
|
|
23
|
+
*
|
|
24
|
+
* A local provider's "physical resource" is a running process (a spawned
|
|
25
|
+
* dev server, a workerd instance) that lives in the dev sidecar and is
|
|
26
|
+
* invisible to the state store: a state row can say `created` while the
|
|
27
|
+
* process is dead (the previous dev session ended), and a redundant
|
|
28
|
+
* reconcile can arrive while the process is healthy. Every local provider
|
|
29
|
+
* therefore needs the same machinery:
|
|
30
|
+
*
|
|
31
|
+
* - an **instance registry** answering "is something running for this
|
|
32
|
+
* resource right now?",
|
|
33
|
+
* - a **config comparison** answering "was it started with the config I'm
|
|
34
|
+
* being asked for?",
|
|
35
|
+
* - restart/teardown choreography that keeps the process alive across
|
|
36
|
+
* deploys (scopes forked from the provider root scope) and kills it on
|
|
37
|
+
* change or delete.
|
|
38
|
+
*
|
|
39
|
+
* {@link make} generates `diff` / `reconcile` / `delete` / `list` from that
|
|
40
|
+
* machinery; the provider author writes {@link LocalProviderSpec.start}
|
|
41
|
+
* (how to boot one instance) and optionally
|
|
42
|
+
* {@link LocalProviderSpec.resolveConfig} (what the restart-relevant config
|
|
43
|
+
* is) and {@link LocalProviderSpec.stop} (cleanup that outlives instance
|
|
44
|
+
* scopes).
|
|
45
|
+
*
|
|
46
|
+
* The produced layer wraps {@link RpcProvider.effect}, so during
|
|
47
|
+
* `alchemy dev` the provider (and its registry of running processes) lives
|
|
48
|
+
* in the sidecar process and survives user-code hot reloads.
|
|
49
|
+
*/
|
|
50
|
+
|
|
51
|
+
/** Inputs common to every generated lifecycle call. */
|
|
52
|
+
export interface LocalProviderInput<R extends ResourceLike> {
|
|
53
|
+
id: string;
|
|
54
|
+
fqn: string;
|
|
55
|
+
instanceId: string;
|
|
56
|
+
news: R["Props"];
|
|
57
|
+
bindings: ResourceBinding<R["Binding"]>[];
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
export interface StartContext<
|
|
61
|
+
R extends ResourceLike,
|
|
62
|
+
Config,
|
|
63
|
+
> extends LocalProviderInput<R> {
|
|
64
|
+
/**
|
|
65
|
+
* The value produced by {@link LocalProviderSpec.resolveConfig} for this
|
|
66
|
+
* reconcile — the same value whose canonical hash decided that a
|
|
67
|
+
* (re)start was needed, so "what changed?" and "what starts?" can never
|
|
68
|
+
* drift.
|
|
69
|
+
*/
|
|
70
|
+
config: Config;
|
|
71
|
+
session: ScopedPlanStatusSession;
|
|
72
|
+
/**
|
|
73
|
+
* Removes this instance from the running registry (a no-op if it has
|
|
74
|
+
* already been replaced), so the next `diff` reports `update` and the
|
|
75
|
+
* next reconcile boots a fresh instance. Fork this after the process's
|
|
76
|
+
* exit — e.g. `child.exitCode.pipe(Effect.exit, Effect.flatMap(() =>
|
|
77
|
+
* invalidate), Effect.forkScoped)` — for processes that can die on their
|
|
78
|
+
* own.
|
|
79
|
+
*/
|
|
80
|
+
invalidate: Effect.Effect<void>;
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
export interface StopContext {
|
|
84
|
+
id: string;
|
|
85
|
+
instanceId: string;
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
export interface StablesContext<
|
|
89
|
+
R extends ResourceLike,
|
|
90
|
+
Config,
|
|
91
|
+
> extends LocalProviderInput<R> {
|
|
92
|
+
config: Config;
|
|
93
|
+
output: R["Attributes"] | undefined;
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
/** The default restart-relevant config when `resolveConfig` is omitted. */
|
|
97
|
+
export interface DefaultLocalConfig<R extends ResourceLike> {
|
|
98
|
+
news: R["Props"];
|
|
99
|
+
bindings: ResourceBinding<R["Binding"]>[];
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
export interface LocalProviderSpec<
|
|
103
|
+
R extends ResourceLike,
|
|
104
|
+
Config = DefaultLocalConfig<R>,
|
|
105
|
+
StartR = never,
|
|
106
|
+
> {
|
|
107
|
+
/**
|
|
108
|
+
* Derive the restart-relevant desired config from resolved inputs.
|
|
109
|
+
*
|
|
110
|
+
* MUST return plain, canonically-serializable data (no closures, no
|
|
111
|
+
* Effects — `Redacted` values are unwrapped by the hasher) and must be
|
|
112
|
+
* cheap and side-effect-free: it runs inside `diff` on every plan. The
|
|
113
|
+
* helper canonically hashes the result for the noop-vs-restart decision,
|
|
114
|
+
* records it on the registry entry, and passes it to {@link start} so a
|
|
115
|
+
* restart consumes exactly what was compared.
|
|
116
|
+
*
|
|
117
|
+
* Lifecycle-scoped services (`Stack`, `Stage`, `InstanceId`, `Artifacts`)
|
|
118
|
+
* are available ambiently (e.g. for `createPhysicalName`); resolve
|
|
119
|
+
* anything else in the spec effect and close over it.
|
|
120
|
+
*
|
|
121
|
+
* @default `{ news: stripEffects(news), bindings }`
|
|
122
|
+
*/
|
|
123
|
+
resolveConfig?: (
|
|
124
|
+
ctx: LocalProviderInput<R>,
|
|
125
|
+
) => Effect.Effect<Config, any, any>;
|
|
126
|
+
/**
|
|
127
|
+
* Boot one instance: acquire the long-running process in the ambient
|
|
128
|
+
* `Scope` and return the resource's Attributes once it is *ready* (URL
|
|
129
|
+
* extracted, first serve succeeded, ...). The scope outlives the
|
|
130
|
+
* reconcile that started it — it is forked from the provider root scope
|
|
131
|
+
* and closed only when the instance is restarted (config change) or
|
|
132
|
+
* deleted. The returned Effect MAY complete after readiness; liveness is
|
|
133
|
+
* "registry entry with an open scope", not "unfinished fiber".
|
|
134
|
+
*
|
|
135
|
+
* Extra requirements beyond `Scope` (`StartR`) become requirements of
|
|
136
|
+
* the provider layer — they must be present at layer build so the
|
|
137
|
+
* lifecycle wrapper can hand them to `start` at runtime.
|
|
138
|
+
*/
|
|
139
|
+
start: (
|
|
140
|
+
ctx: StartContext<R, Config>,
|
|
141
|
+
) => Effect.Effect<R["Attributes"], any, Scope.Scope | StartR>;
|
|
142
|
+
/**
|
|
143
|
+
* Extra cleanup on delete, after the instance scope has closed — for
|
|
144
|
+
* state that intentionally spans restarts and therefore cannot live in
|
|
145
|
+
* the instance scope (proxy servers kept for URL stability, restart
|
|
146
|
+
* hooks, ...). NOT called on restarts: a restarting instance keeps that
|
|
147
|
+
* shared state. Must be idempotent; also called when nothing is running
|
|
148
|
+
* (e.g. cleaning up a local row during a live deploy).
|
|
149
|
+
*/
|
|
150
|
+
stop?: (ctx: StopContext) => Effect.Effect<void, any>;
|
|
151
|
+
/**
|
|
152
|
+
* Attributes that remain stable across the update the generated `diff`
|
|
153
|
+
* is about to report (see `Diff.stables`). Called only when the diff is
|
|
154
|
+
* an `update`.
|
|
155
|
+
*/
|
|
156
|
+
stables?: (
|
|
157
|
+
ctx: StablesContext<R, Config>,
|
|
158
|
+
) => Effect.Effect<
|
|
159
|
+
Extract<keyof R["Attributes"], string>[] | undefined,
|
|
160
|
+
any,
|
|
161
|
+
any
|
|
162
|
+
>;
|
|
163
|
+
precreate?: AnyReqProviderService<R>["precreate"];
|
|
164
|
+
tail?: AnyReqProviderService<R>["tail"];
|
|
165
|
+
logs?: AnyReqProviderService<R>["logs"];
|
|
166
|
+
/**
|
|
167
|
+
* Override the generated `list` (which joins every registered instance's
|
|
168
|
+
* fiber to its Attributes).
|
|
169
|
+
*/
|
|
170
|
+
list?: AnyReqProviderService<R>["list"];
|
|
171
|
+
}
|
|
172
|
+
|
|
173
|
+
/**
|
|
174
|
+
* {@link ProviderService} with every requirement channel widened to `any` —
|
|
175
|
+
* passthrough spec hooks may use lifecycle-scoped services (`Stack`,
|
|
176
|
+
* `InstanceId`, ...) that the RpcProvider wrapper provides per call.
|
|
177
|
+
*/
|
|
178
|
+
type AnyReqProviderService<R extends ResourceLike> = ProviderService<
|
|
179
|
+
R,
|
|
180
|
+
any,
|
|
181
|
+
any,
|
|
182
|
+
any,
|
|
183
|
+
any,
|
|
184
|
+
any,
|
|
185
|
+
any,
|
|
186
|
+
any,
|
|
187
|
+
any
|
|
188
|
+
>;
|
|
189
|
+
|
|
190
|
+
interface Instance<Attributes> {
|
|
191
|
+
/** Identity guard so a replaced generation's delete cannot kill its successor. */
|
|
192
|
+
instanceId: string;
|
|
193
|
+
/** The resolved config the running instance was started with (for diagnostics). */
|
|
194
|
+
config: unknown;
|
|
195
|
+
configHash: string;
|
|
196
|
+
fiber: Fiber.Fiber<Attributes, any>;
|
|
197
|
+
scope: Scope.Closeable;
|
|
198
|
+
/** Unique per start; guards invalidate/cleanup against racing restarts. */
|
|
199
|
+
token: object;
|
|
200
|
+
}
|
|
201
|
+
|
|
202
|
+
/**
|
|
203
|
+
* Canonical, collision-free hash of a plain-data value: SHA-256 over a
|
|
204
|
+
* canonical JSON serialization (sorted keys, unwrapped `Redacted`,
|
|
205
|
+
* `Uint8Array` and `bigint` encodings, cycle-safe).
|
|
206
|
+
*
|
|
207
|
+
* We deliberately do NOT use `Hash.structure`: Effect's structural hash
|
|
208
|
+
* folds sibling fields together with XOR, so the same value change
|
|
209
|
+
* appearing in two sibling subtrees cancels out and the hash is unchanged
|
|
210
|
+
* — exactly the shape of a Worker config that mirrors `env` values into
|
|
211
|
+
* derived `bindings`. An exact canonical serialization avoids the lossy
|
|
212
|
+
* fingerprint; SHA-256 keeps the retained signature a fixed 64-char digest.
|
|
213
|
+
*/
|
|
214
|
+
export const canonicalHash = (value: unknown): Effect.Effect<string> => {
|
|
215
|
+
const seen = new WeakSet<object>();
|
|
216
|
+
const normalize = (input: unknown): unknown => {
|
|
217
|
+
if (typeof input === "bigint") return `bigint:${input.toString()}`;
|
|
218
|
+
if (input === null || typeof input !== "object") return input;
|
|
219
|
+
if (Redacted.isRedacted(input)) {
|
|
220
|
+
return { __redacted: normalize(Redacted.value(input)) };
|
|
221
|
+
}
|
|
222
|
+
if (seen.has(input)) return "[circular]";
|
|
223
|
+
seen.add(input);
|
|
224
|
+
if (input instanceof Uint8Array) return { __bytes: Array.from(input) };
|
|
225
|
+
if (Array.isArray(input)) return input.map(normalize);
|
|
226
|
+
return Object.fromEntries(
|
|
227
|
+
Object.keys(input)
|
|
228
|
+
.sort()
|
|
229
|
+
.map((key) => [
|
|
230
|
+
key,
|
|
231
|
+
normalize((input as Record<string, unknown>)[key]),
|
|
232
|
+
]),
|
|
233
|
+
);
|
|
234
|
+
};
|
|
235
|
+
return sha256(JSON.stringify(normalize(value)));
|
|
236
|
+
};
|
|
237
|
+
|
|
238
|
+
/**
|
|
239
|
+
* Build a local provider layer from a {@link LocalProviderSpec}.
|
|
240
|
+
*
|
|
241
|
+
* Generated lifecycle:
|
|
242
|
+
*
|
|
243
|
+
* - **diff** — `undefined` while inputs are unresolved; otherwise resolve
|
|
244
|
+
* the config and compare its canonical hash against the running
|
|
245
|
+
* instance: running + equal → `noop`, anything else → `update`. This is
|
|
246
|
+
* what encodes "the process may or may not be running" — state alone can
|
|
247
|
+
* never answer it.
|
|
248
|
+
* - **reconcile** — same hash + running instance → join its fiber for the
|
|
249
|
+
* Attributes (redundant reconciles are free). Otherwise tear the old
|
|
250
|
+
* instance down and fork {@link LocalProviderSpec.start} in a fresh
|
|
251
|
+
* scope forked from the provider root scope, so the process outlives the
|
|
252
|
+
* deploy and dies with the sidecar.
|
|
253
|
+
* - **delete** — tear down only if the registered instance belongs to the
|
|
254
|
+
* deleted `instanceId` (create-first replacement safety), then run
|
|
255
|
+
* {@link LocalProviderSpec.stop}. Idempotent.
|
|
256
|
+
* - **list** — join every registered instance's fiber to its Attributes.
|
|
257
|
+
*
|
|
258
|
+
* All reconcile/delete work for one logical resource is serialized behind
|
|
259
|
+
* a per-id semaphore so restarts never interleave.
|
|
260
|
+
*
|
|
261
|
+
* @param cls - the resource class (or Platform) this provider serves.
|
|
262
|
+
* @param serverEntryUrl - sidecar entry module (see {@link RpcProvider.effect}).
|
|
263
|
+
* @param spec - Effect constructing the {@link LocalProviderSpec}; resolve
|
|
264
|
+
* the services your callbacks need here and close over them.
|
|
265
|
+
*/
|
|
266
|
+
export const make = <
|
|
267
|
+
R extends ResourceLike,
|
|
268
|
+
Config = DefaultLocalConfig<R>,
|
|
269
|
+
StartR = never,
|
|
270
|
+
Req = never,
|
|
271
|
+
>(
|
|
272
|
+
cls: ResourceClassLike<R> | Platform<R, any, any, any, any>,
|
|
273
|
+
serverEntryUrl: string,
|
|
274
|
+
spec: Effect.Effect<LocalProviderSpec<R, Config, StartR>, never, Req>,
|
|
275
|
+
) =>
|
|
276
|
+
RpcProvider.effect(
|
|
277
|
+
cls,
|
|
278
|
+
serverEntryUrl,
|
|
279
|
+
Effect.gen(function* () {
|
|
280
|
+
const {
|
|
281
|
+
resolveConfig = defaultResolveConfig<R, Config>,
|
|
282
|
+
start,
|
|
283
|
+
stop,
|
|
284
|
+
stables,
|
|
285
|
+
precreate,
|
|
286
|
+
tail,
|
|
287
|
+
logs,
|
|
288
|
+
list,
|
|
289
|
+
} = yield* spec;
|
|
290
|
+
|
|
291
|
+
// The provider layer scope: in the sidecar this closes at session
|
|
292
|
+
// shutdown, interrupting every registered instance and running its
|
|
293
|
+
// finalizers (killing the processes).
|
|
294
|
+
const rootScope = yield* Effect.scope;
|
|
295
|
+
|
|
296
|
+
// Keyed by logical id: a restart replaces the entry, a replacement's
|
|
297
|
+
// new generation overwrites it (and the old generation's delete is
|
|
298
|
+
// gated on `instanceId` so it cannot kill the successor).
|
|
299
|
+
const instances = new Map<string, Instance<R["Attributes"]>>();
|
|
300
|
+
|
|
301
|
+
// Serializes reconcile/delete per logical id so a restart can never
|
|
302
|
+
// interleave with another restart or a delete and leak a scope.
|
|
303
|
+
const locks = new Map<string, Semaphore.Semaphore>();
|
|
304
|
+
const lock = (id: string) => {
|
|
305
|
+
let semaphore = locks.get(id);
|
|
306
|
+
if (!semaphore) {
|
|
307
|
+
semaphore = Semaphore.makeUnsafe(1);
|
|
308
|
+
locks.set(id, semaphore);
|
|
309
|
+
}
|
|
310
|
+
return semaphore;
|
|
311
|
+
};
|
|
312
|
+
const withLock = <A, E, RR>(
|
|
313
|
+
id: string,
|
|
314
|
+
effect: Effect.Effect<A, E, RR>,
|
|
315
|
+
) => Semaphore.withPermits(lock(id), 1)(effect);
|
|
316
|
+
|
|
317
|
+
const resolveDesired = Effect.fn(function* (
|
|
318
|
+
input: LocalProviderInput<R>,
|
|
319
|
+
) {
|
|
320
|
+
const config = yield* resolveConfig(input);
|
|
321
|
+
const configHash = yield* canonicalHash(config);
|
|
322
|
+
return { config, configHash };
|
|
323
|
+
});
|
|
324
|
+
|
|
325
|
+
const teardown = Effect.fn(function* (
|
|
326
|
+
instance: Instance<R["Attributes"]>,
|
|
327
|
+
) {
|
|
328
|
+
yield* Fiber.interrupt(instance.fiber);
|
|
329
|
+
yield* Scope.close(instance.scope, Exit.void);
|
|
330
|
+
});
|
|
331
|
+
|
|
332
|
+
const startInstance = Effect.fn(function* (
|
|
333
|
+
input: LocalProviderInput<R>,
|
|
334
|
+
session: ScopedPlanStatusSession,
|
|
335
|
+
config: Config,
|
|
336
|
+
configHash: string,
|
|
337
|
+
) {
|
|
338
|
+
const token = {};
|
|
339
|
+
const invalidate = Effect.sync(() => {
|
|
340
|
+
if (instances.get(input.id)?.token === token) {
|
|
341
|
+
instances.delete(input.id);
|
|
342
|
+
}
|
|
343
|
+
});
|
|
344
|
+
const scope = yield* Scope.fork(rootScope);
|
|
345
|
+
const fiber = yield* start({
|
|
346
|
+
...input,
|
|
347
|
+
config,
|
|
348
|
+
session,
|
|
349
|
+
invalidate,
|
|
350
|
+
}).pipe(Effect.forkDetach, Scope.provide(scope));
|
|
351
|
+
instances.set(input.id, {
|
|
352
|
+
instanceId: input.instanceId,
|
|
353
|
+
config,
|
|
354
|
+
configHash,
|
|
355
|
+
fiber,
|
|
356
|
+
scope,
|
|
357
|
+
token,
|
|
358
|
+
});
|
|
359
|
+
return yield* Fiber.join(fiber).pipe(
|
|
360
|
+
Effect.onExit((exit) =>
|
|
361
|
+
exit._tag === "Failure"
|
|
362
|
+
? // A failed start must not linger as "running" — the next
|
|
363
|
+
// plan should report `update` and try again.
|
|
364
|
+
invalidate
|
|
365
|
+
: Effect.void,
|
|
366
|
+
),
|
|
367
|
+
);
|
|
368
|
+
});
|
|
369
|
+
|
|
370
|
+
const provider = {
|
|
371
|
+
list:
|
|
372
|
+
list ??
|
|
373
|
+
(() =>
|
|
374
|
+
Effect.forEach(
|
|
375
|
+
Array.from(instances.values()),
|
|
376
|
+
(instance) => Fiber.join(instance.fiber),
|
|
377
|
+
{ concurrency: "unbounded" },
|
|
378
|
+
)),
|
|
379
|
+
diff: Effect.fn(function* ({
|
|
380
|
+
id,
|
|
381
|
+
fqn,
|
|
382
|
+
instanceId,
|
|
383
|
+
news: rawNews,
|
|
384
|
+
newBindings,
|
|
385
|
+
output,
|
|
386
|
+
}: {
|
|
387
|
+
id: string;
|
|
388
|
+
fqn: string;
|
|
389
|
+
instanceId: string;
|
|
390
|
+
news: any;
|
|
391
|
+
newBindings: any;
|
|
392
|
+
output: R["Attributes"] | undefined;
|
|
393
|
+
}) {
|
|
394
|
+
// Effect-valued leaves (tagged Worker classes in `env`, ...) never
|
|
395
|
+
// resolve at plan time; their identity is carried by the resolved
|
|
396
|
+
// binding data. Strip them so the config-based diff still runs.
|
|
397
|
+
const news = stripEffects(rawNews);
|
|
398
|
+
if (!isResolved(news) || !isResolved(newBindings)) return undefined;
|
|
399
|
+
const input: LocalProviderInput<R> = {
|
|
400
|
+
id,
|
|
401
|
+
fqn,
|
|
402
|
+
instanceId,
|
|
403
|
+
news: news as R["Props"],
|
|
404
|
+
bindings: newBindings as ResourceBinding<R["Binding"]>[],
|
|
405
|
+
};
|
|
406
|
+
const { config, configHash } = yield* resolveDesired(input);
|
|
407
|
+
const existing = instances.get(id);
|
|
408
|
+
if (existing && existing.configHash === configHash) {
|
|
409
|
+
return { action: "noop" } satisfies Diff;
|
|
410
|
+
}
|
|
411
|
+
return {
|
|
412
|
+
action: "update",
|
|
413
|
+
stables: stables
|
|
414
|
+
? yield* stables({ ...input, config, output })
|
|
415
|
+
: undefined,
|
|
416
|
+
} satisfies Diff;
|
|
417
|
+
}),
|
|
418
|
+
reconcile: Effect.fn(function* ({
|
|
419
|
+
id,
|
|
420
|
+
fqn,
|
|
421
|
+
instanceId,
|
|
422
|
+
news,
|
|
423
|
+
bindings,
|
|
424
|
+
session,
|
|
425
|
+
}: {
|
|
426
|
+
id: string;
|
|
427
|
+
fqn: string;
|
|
428
|
+
instanceId: string;
|
|
429
|
+
news: R["Props"];
|
|
430
|
+
bindings: ResourceBinding<R["Binding"]>[];
|
|
431
|
+
session: ScopedPlanStatusSession;
|
|
432
|
+
}) {
|
|
433
|
+
return yield* withLock(
|
|
434
|
+
id,
|
|
435
|
+
Effect.gen(function* () {
|
|
436
|
+
const input: LocalProviderInput<R> = {
|
|
437
|
+
id,
|
|
438
|
+
fqn,
|
|
439
|
+
instanceId,
|
|
440
|
+
news: stripEffects(news) as R["Props"],
|
|
441
|
+
bindings,
|
|
442
|
+
};
|
|
443
|
+
const { config, configHash } = yield* resolveDesired(input);
|
|
444
|
+
const existing = instances.get(id);
|
|
445
|
+
if (existing) {
|
|
446
|
+
if (existing.configHash === configHash) {
|
|
447
|
+
yield* Effect.log(
|
|
448
|
+
`[${id}] No changes, using existing instance`,
|
|
449
|
+
);
|
|
450
|
+
// Adopt the newest instanceId so a later replacement's
|
|
451
|
+
// old-generation delete cannot tear this instance down.
|
|
452
|
+
existing.instanceId = instanceId;
|
|
453
|
+
return yield* Fiber.join(existing.fiber);
|
|
454
|
+
}
|
|
455
|
+
yield* Effect.log(
|
|
456
|
+
`[${id}] Changes detected, restarting instance`,
|
|
457
|
+
);
|
|
458
|
+
yield* teardown(existing);
|
|
459
|
+
instances.delete(id);
|
|
460
|
+
}
|
|
461
|
+
return yield* startInstance(input, session, config, configHash);
|
|
462
|
+
}),
|
|
463
|
+
);
|
|
464
|
+
}),
|
|
465
|
+
delete: Effect.fn(function* ({
|
|
466
|
+
id,
|
|
467
|
+
instanceId,
|
|
468
|
+
}: {
|
|
469
|
+
id: string;
|
|
470
|
+
instanceId: string;
|
|
471
|
+
}) {
|
|
472
|
+
yield* withLock(
|
|
473
|
+
id,
|
|
474
|
+
Effect.gen(function* () {
|
|
475
|
+
const existing = instances.get(id);
|
|
476
|
+
if (existing && existing.instanceId !== instanceId) {
|
|
477
|
+
// A replacement's new generation is registered under this
|
|
478
|
+
// logical id — the old generation's delete must not touch
|
|
479
|
+
// it (nor the cross-restart state `stop` would clean up).
|
|
480
|
+
return;
|
|
481
|
+
}
|
|
482
|
+
if (existing) {
|
|
483
|
+
yield* teardown(existing);
|
|
484
|
+
instances.delete(id);
|
|
485
|
+
}
|
|
486
|
+
// Runs even when nothing is registered: cross-restart state
|
|
487
|
+
// (proxies, restart hooks) and out-of-session cleanup (e.g.
|
|
488
|
+
// deleting a local row during a live deploy) still need it.
|
|
489
|
+
if (stop) {
|
|
490
|
+
yield* stop({ id, instanceId });
|
|
491
|
+
}
|
|
492
|
+
}),
|
|
493
|
+
);
|
|
494
|
+
}),
|
|
495
|
+
...(precreate ? { precreate } : {}),
|
|
496
|
+
...(tail ? { tail } : {}),
|
|
497
|
+
...(logs ? { logs } : {}),
|
|
498
|
+
};
|
|
499
|
+
|
|
500
|
+
return provider as any;
|
|
501
|
+
// `StartR` (start's requirements beyond Scope) is surfaced as a layer
|
|
502
|
+
// requirement: the RpcProvider wrapper captures the layer-build
|
|
503
|
+
// context and provides it to every lifecycle call, so services the
|
|
504
|
+
// layer demanded at build are available to `start` at runtime.
|
|
505
|
+
}) as Effect.Effect<
|
|
506
|
+
ProviderService<R>,
|
|
507
|
+
never,
|
|
508
|
+
Req | Exclude<StartR, Scope.Scope>
|
|
509
|
+
>,
|
|
510
|
+
);
|
|
511
|
+
|
|
512
|
+
const defaultResolveConfig = <R extends ResourceLike, Config>(
|
|
513
|
+
input: LocalProviderInput<R>,
|
|
514
|
+
): Effect.Effect<Config, any> =>
|
|
515
|
+
Effect.succeed({
|
|
516
|
+
news: stripEffects(input.news),
|
|
517
|
+
bindings: input.bindings,
|
|
518
|
+
} as Config);
|
|
@@ -1,24 +1,126 @@
|
|
|
1
1
|
/** @effect-diagnostics anyUnknownInErrorContext:off */
|
|
2
2
|
|
|
3
|
+
import * as Context from "effect/Context";
|
|
4
|
+
import * as Effect from "effect/Effect";
|
|
3
5
|
import * as Layer from "effect/Layer";
|
|
4
6
|
import { AlchemyContext } from "../AlchemyContext.ts";
|
|
7
|
+
import type { Platform } from "../Platform.ts";
|
|
8
|
+
import { Provider, type ProviderService } from "../Provider.ts";
|
|
9
|
+
import { defaultProviderMode, type ProviderMode } from "../ProviderMode.ts";
|
|
10
|
+
import type { ResourceClassLike, ResourceLike } from "../Resource.ts";
|
|
5
11
|
|
|
6
12
|
/**
|
|
7
|
-
*
|
|
13
|
+
* Registers a resource provider with both a **live** and a **local**
|
|
14
|
+
* implementation, making provider mode a first-class, per-run *and*
|
|
15
|
+
* per-resource concern:
|
|
16
|
+
*
|
|
17
|
+
* - The `Provider(type)` service placed in context is the variant for the
|
|
18
|
+
* run's default mode (`AlchemyContext.dev ? "local" : "live"`), so
|
|
19
|
+
* existing lookups keep working unchanged.
|
|
20
|
+
* - Both variants are additionally exposed via
|
|
21
|
+
* {@link ProviderService.modes} as lazy, memoized builders. The
|
|
22
|
+
* non-default variant (and its mode-specific dependency layers, composed
|
|
23
|
+
* inside the thunk) is only constructed when something actually demands
|
|
24
|
+
* it — e.g. deleting a `providerMode: "local"` state row during a live
|
|
25
|
+
* deploy.
|
|
26
|
+
*
|
|
27
|
+
* Laziness mechanics: the layer is a {@link Layer.fromBuildMemo}, so the
|
|
28
|
+
* build itself is memoized by layer identity (one provider instance — and
|
|
29
|
+
* one instance registry for local providers — per memo-map ancestry, i.e.
|
|
30
|
+
* shared across every stack build that forks the same root, exactly like
|
|
31
|
+
* ordinary layers). The build receives its `MemoMap` and `Scope`; variant
|
|
32
|
+
* layers are built with `Layer.buildWithMemoMap` against that same memo
|
|
33
|
+
* map and scope, which means:
|
|
34
|
+
*
|
|
35
|
+
* - dependency layers shared between different providers' local variants
|
|
36
|
+
* (e.g. Cloudflare's `localRuntimeServices()`) are constructed exactly
|
|
37
|
+
* once, provided the thunks share the layer *reference*;
|
|
38
|
+
* - lazily-built services live until the memoized entry's scope closes
|
|
39
|
+
* (when every borrowing scope has closed), like any eagerly-built
|
|
40
|
+
* provider.
|
|
41
|
+
*
|
|
42
|
+
* @example
|
|
43
|
+
* ```ts
|
|
44
|
+
* export const WorkerProvider = () =>
|
|
45
|
+
* ProviderLayer.dual(Worker, {
|
|
46
|
+
* live: () => LiveWorkerProvider(),
|
|
47
|
+
* local: () =>
|
|
48
|
+
* LocalWorkerProvider().pipe(Layer.provide(localRuntimeServices())),
|
|
49
|
+
* });
|
|
50
|
+
* ```
|
|
8
51
|
*/
|
|
9
|
-
export const
|
|
52
|
+
export const dual = <
|
|
53
|
+
R extends ResourceLike,
|
|
10
54
|
LayerLive extends Layer.Layer<any, any, any>,
|
|
11
55
|
LayerLocal extends Layer.Layer<any, any, any>,
|
|
12
|
-
>(
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
56
|
+
>(
|
|
57
|
+
// Only the resource type string is needed — a ResourceClass, a Platform,
|
|
58
|
+
// or a bare `{ Type }` (useful when importing the class would create a
|
|
59
|
+
// module cycle) all satisfy this.
|
|
60
|
+
cls:
|
|
61
|
+
| ResourceClassLike<R>
|
|
62
|
+
| Platform<R, any, any, any, any>
|
|
63
|
+
| { Type: R["Type"] },
|
|
64
|
+
input: {
|
|
65
|
+
live: () => LayerLive;
|
|
66
|
+
local: () => LayerLocal;
|
|
67
|
+
},
|
|
68
|
+
): Layer.Layer<
|
|
16
69
|
Layer.Success<LayerLive | LayerLocal>,
|
|
17
70
|
Layer.Error<LayerLive | LayerLocal>,
|
|
18
71
|
Layer.Services<LayerLive | LayerLocal> | AlchemyContext
|
|
19
72
|
> =>
|
|
20
|
-
Layer.
|
|
21
|
-
|
|
22
|
-
context
|
|
23
|
-
|
|
24
|
-
|
|
73
|
+
Layer.fromBuildMemo((memoMap, scope) =>
|
|
74
|
+
Effect.gen(function* () {
|
|
75
|
+
// The layer-build context contains everything provided to the
|
|
76
|
+
// provider stack (API clients, environments, ...). Captured here so
|
|
77
|
+
// lazily-built variants see the same services as an eager build.
|
|
78
|
+
const context = yield* Effect.context<never>();
|
|
79
|
+
const defaultMode = yield* defaultProviderMode;
|
|
80
|
+
|
|
81
|
+
const buildVariant = (mode: ProviderMode) =>
|
|
82
|
+
Layer.buildWithMemoMap(
|
|
83
|
+
(mode === "live" ? input.live() : input.local()).pipe(
|
|
84
|
+
Layer.provide(Layer.succeedContext(context)),
|
|
85
|
+
) as Layer.Layer<any, any, never>,
|
|
86
|
+
memoMap,
|
|
87
|
+
scope,
|
|
88
|
+
).pipe(
|
|
89
|
+
Effect.map(
|
|
90
|
+
(built): ProviderService<R> => ({
|
|
91
|
+
...(built.mapUnsafe.get(cls.Type) as ProviderService<R>),
|
|
92
|
+
mode,
|
|
93
|
+
}),
|
|
94
|
+
),
|
|
95
|
+
);
|
|
96
|
+
|
|
97
|
+
// Memoized so each variant is constructed at most once per stack
|
|
98
|
+
// build, no matter how many resources/deletes resolve it.
|
|
99
|
+
const cached = {
|
|
100
|
+
live: yield* Effect.cached(buildVariant("live")),
|
|
101
|
+
local: yield* Effect.cached(buildVariant("local")),
|
|
102
|
+
};
|
|
103
|
+
|
|
104
|
+
// Lazy accessors die on construction failure: a provider layer that
|
|
105
|
+
// cannot be built is fatal (Providers.ts pipes `Layer.orDie` around
|
|
106
|
+
// the eager path for the same reason).
|
|
107
|
+
const modes: {
|
|
108
|
+
readonly [M in ProviderMode]: Effect.Effect<ProviderService<R>>;
|
|
109
|
+
} = {
|
|
110
|
+
live: Effect.orDie(cached.live),
|
|
111
|
+
local: Effect.orDie(cached.local),
|
|
112
|
+
};
|
|
113
|
+
|
|
114
|
+
// The default-mode variant builds eagerly — matching today's cost
|
|
115
|
+
// profile (`select` built exactly this variant) and guaranteeing the
|
|
116
|
+
// registered service has real method presence (`provider.read`,
|
|
117
|
+
// `provider.precreate`, ...) for Plan's capability checks.
|
|
118
|
+
const defaultService = yield* cached[defaultMode];
|
|
119
|
+
|
|
120
|
+
return Context.make(Provider(cls.Type) as any, {
|
|
121
|
+
...defaultService,
|
|
122
|
+
mode: defaultMode,
|
|
123
|
+
modes,
|
|
124
|
+
} satisfies ProviderService<R>);
|
|
125
|
+
}),
|
|
126
|
+
) as any;
|
package/src/Local/RpcProvider.ts
CHANGED
|
@@ -254,16 +254,21 @@ export const providerServices = <ROut, E, RIn>(
|
|
|
254
254
|
* Conditionally constructs a layer for use by an RpcProvider.
|
|
255
255
|
* If the {@link RpcProviderProxy} is present in context, the layer is empty because it will not be used in this process.
|
|
256
256
|
* Otherwise, the given layer is returned.
|
|
257
|
+
*
|
|
258
|
+
* Note that unlike earlier versions this is no longer gated on
|
|
259
|
+
* `AlchemyContext.dev`: local providers are registered via
|
|
260
|
+
* `ProviderLayer.dual` and their dependency layers are composed inside the
|
|
261
|
+
* *lazily built* local variant, so in a live run these services are only
|
|
262
|
+
* constructed when the local provider is actually demanded (e.g. deleting a
|
|
263
|
+
* `providerMode: "local"` state row during `alchemy deploy`).
|
|
257
264
|
* @param self - An effect which returns a layer that is used by the RpcProvider.
|
|
258
265
|
*/
|
|
259
266
|
export const providerServicesEffect = <A, E1, R1, E, R>(
|
|
260
267
|
self: Effect.Effect<Layer.Layer<A, E1, R1>, E, R>,
|
|
261
268
|
): Layer.Layer<A, E | E1, R1 | Exclude<R, Scope> | AlchemyContext> =>
|
|
262
|
-
Effect.
|
|
263
|
-
Effect.flatMap((
|
|
264
|
-
|
|
265
|
-
? self
|
|
266
|
-
: (Effect.succeed(Layer.empty) as never),
|
|
269
|
+
Effect.serviceOption(RpcProviderProxy).pipe(
|
|
270
|
+
Effect.flatMap((client) =>
|
|
271
|
+
client._tag === "None" ? self : (Effect.succeed(Layer.empty) as never),
|
|
267
272
|
),
|
|
268
273
|
Layer.unwrap,
|
|
269
274
|
);
|
|
@@ -72,7 +72,10 @@ const make = Effect.fn(function* (spawnerUrl: string) {
|
|
|
72
72
|
RpcProxyApi["getProvider"]
|
|
73
73
|
>,
|
|
74
74
|
);
|
|
75
|
-
|
|
75
|
+
// The served shape omits the process-local `mode`/`modes` variant
|
|
76
|
+
// machinery (see RpcProviderService); the unwrapped stub is a plain
|
|
77
|
+
// (mode-agnostic) ProviderService.
|
|
78
|
+
return unwrapRpcHandlers(provider, ["tail"]) as ProviderService<any>;
|
|
76
79
|
}),
|
|
77
80
|
});
|
|
78
81
|
});
|