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,836 @@
|
|
|
1
|
+
import * as Effect from "effect/Effect";
|
|
2
|
+
import * as Schedule from "effect/Schedule";
|
|
3
|
+
import { deepEqual, isResolved } from "../Diff.ts";
|
|
4
|
+
import * as Redacted from "effect/Redacted";
|
|
5
|
+
import { Unowned } from "../AdoptPolicy.ts";
|
|
6
|
+
import { createPhysicalName } from "../PhysicalName.ts";
|
|
7
|
+
import * as Provider from "../Provider.ts";
|
|
8
|
+
import { Resource } from "../Resource.ts";
|
|
9
|
+
import {
|
|
10
|
+
PrismaClient,
|
|
11
|
+
extractConnectionSecrets,
|
|
12
|
+
isConflict,
|
|
13
|
+
isNotFound,
|
|
14
|
+
type PrismaManagementClient,
|
|
15
|
+
} from "./Client.ts";
|
|
16
|
+
import type { Project } from "./Project.ts";
|
|
17
|
+
import {
|
|
18
|
+
hasCanonicalConnectionSecrets,
|
|
19
|
+
mergeConnectionSecrets,
|
|
20
|
+
recoverDatabaseConnectionSecrets,
|
|
21
|
+
} from "./Internal/DatabaseSecrets.ts";
|
|
22
|
+
import type { Providers } from "./Providers.ts";
|
|
23
|
+
import {
|
|
24
|
+
concreteIdsChanged,
|
|
25
|
+
isInputObject,
|
|
26
|
+
isPrismaDevId,
|
|
27
|
+
resolveProjectId,
|
|
28
|
+
unresolvedProjectIdOf,
|
|
29
|
+
} from "./Refs.ts";
|
|
30
|
+
import type {
|
|
31
|
+
Database as ApiDatabase,
|
|
32
|
+
DatabaseSourceInput,
|
|
33
|
+
PrismaDatabaseRegionId,
|
|
34
|
+
PrismaRegionId,
|
|
35
|
+
PrismaSecretConnection,
|
|
36
|
+
} from "./Types.ts";
|
|
37
|
+
|
|
38
|
+
export interface DatabaseDev {
|
|
39
|
+
/**
|
|
40
|
+
* Local provider used by `alchemy dev`.
|
|
41
|
+
*
|
|
42
|
+
* @default "@prisma/dev"
|
|
43
|
+
*/
|
|
44
|
+
provider?: "@prisma/dev";
|
|
45
|
+
/**
|
|
46
|
+
* Stable local server name.
|
|
47
|
+
*/
|
|
48
|
+
name?: string;
|
|
49
|
+
/**
|
|
50
|
+
* Local storage mode for the database server.
|
|
51
|
+
*
|
|
52
|
+
* @default "stateful"
|
|
53
|
+
*/
|
|
54
|
+
persistenceMode?: "stateless" | "stateful";
|
|
55
|
+
/**
|
|
56
|
+
* HTTP control port for the local server.
|
|
57
|
+
*/
|
|
58
|
+
port?: number;
|
|
59
|
+
/**
|
|
60
|
+
* Direct Postgres port for the local database.
|
|
61
|
+
*/
|
|
62
|
+
databasePort?: number;
|
|
63
|
+
/**
|
|
64
|
+
* Direct Postgres port for the local shadow database.
|
|
65
|
+
*/
|
|
66
|
+
shadowDatabasePort?: number;
|
|
67
|
+
/**
|
|
68
|
+
* Enable local provider debug logging.
|
|
69
|
+
*
|
|
70
|
+
* @default false
|
|
71
|
+
*/
|
|
72
|
+
debug?: boolean;
|
|
73
|
+
/**
|
|
74
|
+
* Connection timeout in milliseconds for pending database clients.
|
|
75
|
+
*/
|
|
76
|
+
databaseConnectTimeoutMillis?: number;
|
|
77
|
+
/**
|
|
78
|
+
* Idle timeout in milliseconds for active database clients.
|
|
79
|
+
*/
|
|
80
|
+
databaseIdleTimeoutMillis?: number;
|
|
81
|
+
/**
|
|
82
|
+
* Connection timeout in milliseconds for pending shadow database clients.
|
|
83
|
+
*/
|
|
84
|
+
shadowDatabaseConnectTimeoutMillis?: number;
|
|
85
|
+
/**
|
|
86
|
+
* Idle timeout in milliseconds for active shadow database clients.
|
|
87
|
+
*/
|
|
88
|
+
shadowDatabaseIdleTimeoutMillis?: number;
|
|
89
|
+
/**
|
|
90
|
+
* Optional shell command to run after the local database is ready.
|
|
91
|
+
*/
|
|
92
|
+
migrate?: string;
|
|
93
|
+
/**
|
|
94
|
+
* Working directory for the migration command.
|
|
95
|
+
*/
|
|
96
|
+
migrateCwd?: string;
|
|
97
|
+
/**
|
|
98
|
+
* Maximum time to wait for the migration command before terminating it.
|
|
99
|
+
* Must be a positive finite number.
|
|
100
|
+
*
|
|
101
|
+
* @default 900
|
|
102
|
+
*/
|
|
103
|
+
migrateTimeoutSeconds?: number;
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
export interface DatabaseProps {
|
|
107
|
+
/**
|
|
108
|
+
* Project ID or `project.projectId` output that owns this database.
|
|
109
|
+
*/
|
|
110
|
+
project: string | Project;
|
|
111
|
+
/**
|
|
112
|
+
* Database display name. If omitted, Alchemy generates a stable physical
|
|
113
|
+
* name so interrupted creates can be recovered without duplicating a
|
|
114
|
+
* database. Explicit names cannot be combined with branch attachment during
|
|
115
|
+
* initial creation because the Management API creates the database before it
|
|
116
|
+
* attaches the branch and exposes no idempotency key.
|
|
117
|
+
*/
|
|
118
|
+
name?: string;
|
|
119
|
+
/**
|
|
120
|
+
* Region for the database.
|
|
121
|
+
*
|
|
122
|
+
* @default "us-east-1"
|
|
123
|
+
*/
|
|
124
|
+
region?: PrismaDatabaseRegionId;
|
|
125
|
+
/**
|
|
126
|
+
* Standalone Prisma.Database resources cannot be the project's default
|
|
127
|
+
* database because the Management API cannot demote or promote an existing
|
|
128
|
+
* database, making the resource impossible to destroy safely. Use
|
|
129
|
+
* Prisma.Project to manage the project-owned default database.
|
|
130
|
+
*
|
|
131
|
+
* @default false
|
|
132
|
+
*/
|
|
133
|
+
isDefault?: false;
|
|
134
|
+
/**
|
|
135
|
+
* Optional source database/backup descriptor for clone or restore creation.
|
|
136
|
+
*/
|
|
137
|
+
source?: DatabaseSourceInput;
|
|
138
|
+
/**
|
|
139
|
+
* Branch ID to attach the database to. Mutually exclusive with branchGitName.
|
|
140
|
+
*/
|
|
141
|
+
branchId?: string | null;
|
|
142
|
+
/**
|
|
143
|
+
* Branch git name to attach the database to. Mutually exclusive with branchId.
|
|
144
|
+
*/
|
|
145
|
+
branchGitName?: string | null;
|
|
146
|
+
/**
|
|
147
|
+
* Local database settings for `alchemy dev`. Set to `false` to keep only
|
|
148
|
+
* placeholder IDs.
|
|
149
|
+
*/
|
|
150
|
+
dev?: false | DatabaseDev;
|
|
151
|
+
/**
|
|
152
|
+
* Rotate the adopted database's default connection to recover its one-time
|
|
153
|
+
* credentials. Rotation revokes the previous key and may interrupt existing
|
|
154
|
+
* consumers, so adoption leaves credentials unset unless explicitly opted in.
|
|
155
|
+
*
|
|
156
|
+
* @default false
|
|
157
|
+
*/
|
|
158
|
+
rotateCredentialsOnAdopt?: boolean;
|
|
159
|
+
}
|
|
160
|
+
|
|
161
|
+
export interface Database extends Resource<
|
|
162
|
+
"Prisma.Database",
|
|
163
|
+
DatabaseProps,
|
|
164
|
+
{
|
|
165
|
+
/**
|
|
166
|
+
* Prisma database ID.
|
|
167
|
+
*/
|
|
168
|
+
databaseId: string;
|
|
169
|
+
/**
|
|
170
|
+
* Prisma database display name.
|
|
171
|
+
*/
|
|
172
|
+
databaseName: string;
|
|
173
|
+
/**
|
|
174
|
+
* Project ID that owns the database.
|
|
175
|
+
*/
|
|
176
|
+
projectId: string;
|
|
177
|
+
/**
|
|
178
|
+
* Current Prisma database status.
|
|
179
|
+
*/
|
|
180
|
+
status: string;
|
|
181
|
+
/**
|
|
182
|
+
* Prisma Postgres region ID, when available.
|
|
183
|
+
*/
|
|
184
|
+
region: string | null;
|
|
185
|
+
/**
|
|
186
|
+
* Whether this is the project's default database.
|
|
187
|
+
*/
|
|
188
|
+
isDefault: boolean;
|
|
189
|
+
/**
|
|
190
|
+
* Branch ID attached to the database, or null when unassigned.
|
|
191
|
+
*/
|
|
192
|
+
branchId: string | null;
|
|
193
|
+
/**
|
|
194
|
+
* Default connection ID for the database.
|
|
195
|
+
*/
|
|
196
|
+
defaultConnectionId: string | null;
|
|
197
|
+
/**
|
|
198
|
+
* ISO timestamp when the database was created.
|
|
199
|
+
*/
|
|
200
|
+
createdAt: string;
|
|
201
|
+
/**
|
|
202
|
+
* Direct Postgres connection string, redacted in state.
|
|
203
|
+
*/
|
|
204
|
+
directConnectionString: Redacted.Redacted<string> | undefined;
|
|
205
|
+
/**
|
|
206
|
+
* Pooled Postgres connection string, redacted in state.
|
|
207
|
+
*/
|
|
208
|
+
pooledConnectionString: Redacted.Redacted<string> | undefined;
|
|
209
|
+
/**
|
|
210
|
+
* Accelerate connection string, redacted in state.
|
|
211
|
+
*/
|
|
212
|
+
accelerateConnectionString: Redacted.Redacted<string> | undefined;
|
|
213
|
+
/**
|
|
214
|
+
* Direct database host, when returned by Prisma.
|
|
215
|
+
*/
|
|
216
|
+
host: string | null | undefined;
|
|
217
|
+
/**
|
|
218
|
+
* Direct database username, when returned by Prisma.
|
|
219
|
+
*/
|
|
220
|
+
user: string | null | undefined;
|
|
221
|
+
/**
|
|
222
|
+
* Direct database password, redacted in state.
|
|
223
|
+
*/
|
|
224
|
+
password: Redacted.Redacted<string> | undefined;
|
|
225
|
+
},
|
|
226
|
+
never,
|
|
227
|
+
Providers
|
|
228
|
+
> {}
|
|
229
|
+
|
|
230
|
+
/**
|
|
231
|
+
* A Prisma Postgres database inside a Prisma project.
|
|
232
|
+
*
|
|
233
|
+
* @resource
|
|
234
|
+
* @section Creating a Database
|
|
235
|
+
* @example Database in a project
|
|
236
|
+
* ```typescript
|
|
237
|
+
* const project = yield* Prisma.Project("app", { createDatabase: false });
|
|
238
|
+
* const database = yield* Prisma.Database("db", {
|
|
239
|
+
* project: project.projectId,
|
|
240
|
+
* name: "production",
|
|
241
|
+
* region: "us-east-1",
|
|
242
|
+
* });
|
|
243
|
+
* ```
|
|
244
|
+
*/
|
|
245
|
+
export const Database = Resource<Database>("Prisma.Database");
|
|
246
|
+
|
|
247
|
+
const createName = (id: string, name: string | undefined) =>
|
|
248
|
+
name === undefined ? createPhysicalName({ id }) : Effect.succeed(name);
|
|
249
|
+
|
|
250
|
+
const findDatabaseByName = (
|
|
251
|
+
client: PrismaManagementClient,
|
|
252
|
+
projectId: string,
|
|
253
|
+
name: string,
|
|
254
|
+
) =>
|
|
255
|
+
client.listProjectDatabases(projectId, { limit: 100 }).pipe(
|
|
256
|
+
Effect.flatMap((databases) => {
|
|
257
|
+
const matches = databases.filter(
|
|
258
|
+
(database: ApiDatabase) => database.name === name,
|
|
259
|
+
);
|
|
260
|
+
return matches.length > 1
|
|
261
|
+
? Effect.fail(
|
|
262
|
+
new Error(
|
|
263
|
+
`Prisma project '${projectId}' has multiple databases named '${name}'; refusing to select one arbitrarily.`,
|
|
264
|
+
),
|
|
265
|
+
)
|
|
266
|
+
: Effect.succeed(matches[0]);
|
|
267
|
+
}),
|
|
268
|
+
);
|
|
269
|
+
|
|
270
|
+
class GeneratedDatabaseNotVisible extends Error {}
|
|
271
|
+
|
|
272
|
+
const generatedDatabaseRecoverySchedule = Schedule.max([
|
|
273
|
+
Schedule.exponential("250 millis"),
|
|
274
|
+
Schedule.recurs(6),
|
|
275
|
+
]);
|
|
276
|
+
|
|
277
|
+
const recoverGeneratedDatabaseAfterConflict = (
|
|
278
|
+
client: PrismaManagementClient,
|
|
279
|
+
projectId: string,
|
|
280
|
+
name: string,
|
|
281
|
+
) =>
|
|
282
|
+
findDatabaseByName(client, projectId, name).pipe(
|
|
283
|
+
Effect.flatMap((database) =>
|
|
284
|
+
database
|
|
285
|
+
? Effect.succeed(database)
|
|
286
|
+
: Effect.fail(
|
|
287
|
+
new GeneratedDatabaseNotVisible(
|
|
288
|
+
`Generated Prisma database '${name}' already exists but is not visible yet.`,
|
|
289
|
+
),
|
|
290
|
+
),
|
|
291
|
+
),
|
|
292
|
+
Effect.retry({
|
|
293
|
+
while: (error) => error instanceof GeneratedDatabaseNotVisible,
|
|
294
|
+
schedule: generatedDatabaseRecoverySchedule,
|
|
295
|
+
}),
|
|
296
|
+
);
|
|
297
|
+
|
|
298
|
+
const findDefaultDatabase = (
|
|
299
|
+
client: PrismaManagementClient,
|
|
300
|
+
projectId: string,
|
|
301
|
+
) =>
|
|
302
|
+
client.listProjectDatabases(projectId, { limit: 100 }).pipe(
|
|
303
|
+
Effect.flatMap((databases) => {
|
|
304
|
+
const matches = databases.filter(
|
|
305
|
+
(database: ApiDatabase) => database.isDefault,
|
|
306
|
+
);
|
|
307
|
+
return matches.length > 1
|
|
308
|
+
? Effect.fail(
|
|
309
|
+
new Error(
|
|
310
|
+
`Prisma project '${projectId}' has multiple default databases; refusing to select one arbitrarily.`,
|
|
311
|
+
),
|
|
312
|
+
)
|
|
313
|
+
: Effect.succeed(matches[0]);
|
|
314
|
+
}),
|
|
315
|
+
);
|
|
316
|
+
|
|
317
|
+
const resolveDatabaseRegion = Effect.fn(function* (
|
|
318
|
+
client: PrismaManagementClient,
|
|
319
|
+
projectId: string,
|
|
320
|
+
region: PrismaDatabaseRegionId | undefined,
|
|
321
|
+
) {
|
|
322
|
+
if (region !== "inherit") {
|
|
323
|
+
return (region ?? "us-east-1") as PrismaRegionId;
|
|
324
|
+
}
|
|
325
|
+
const database = yield* findDefaultDatabase(client, projectId);
|
|
326
|
+
const inherited = database?.region?.id;
|
|
327
|
+
if (inherited === undefined) {
|
|
328
|
+
return yield* Effect.fail(
|
|
329
|
+
new Error(
|
|
330
|
+
`Cannot resolve Prisma database region 'inherit' because project '${projectId}' has no default database region. Create or promote a default database first, or specify an explicit region.`,
|
|
331
|
+
),
|
|
332
|
+
);
|
|
333
|
+
}
|
|
334
|
+
return inherited as PrismaRegionId;
|
|
335
|
+
});
|
|
336
|
+
|
|
337
|
+
const stripDatabaseIdPrefix = (databaseId: string) =>
|
|
338
|
+
databaseId.startsWith("db_") ? databaseId.slice(3) : databaseId;
|
|
339
|
+
|
|
340
|
+
const normalizeDatabaseSource = (
|
|
341
|
+
source: ApiDatabase["source"] | DatabaseSourceInput | undefined,
|
|
342
|
+
) => {
|
|
343
|
+
if (source === undefined || source === null || source.type === "empty") {
|
|
344
|
+
return { type: "empty" as const };
|
|
345
|
+
}
|
|
346
|
+
return source.type === "database"
|
|
347
|
+
? {
|
|
348
|
+
type: "database" as const,
|
|
349
|
+
databaseId: stripDatabaseIdPrefix(source.databaseId),
|
|
350
|
+
}
|
|
351
|
+
: {
|
|
352
|
+
type: "backup" as const,
|
|
353
|
+
databaseId: stripDatabaseIdPrefix(source.databaseId),
|
|
354
|
+
backupId: source.backupId,
|
|
355
|
+
};
|
|
356
|
+
};
|
|
357
|
+
|
|
358
|
+
const sourceMatches = (
|
|
359
|
+
observed: ApiDatabase["source"],
|
|
360
|
+
desired: DatabaseSourceInput | undefined,
|
|
361
|
+
) =>
|
|
362
|
+
deepEqual(
|
|
363
|
+
normalizeDatabaseSource(observed),
|
|
364
|
+
normalizeDatabaseSource(desired),
|
|
365
|
+
);
|
|
366
|
+
|
|
367
|
+
const desiredSourcesMatch = (
|
|
368
|
+
left: DatabaseSourceInput | undefined,
|
|
369
|
+
right: DatabaseSourceInput | undefined,
|
|
370
|
+
) => deepEqual(normalizeDatabaseSource(left), normalizeDatabaseSource(right));
|
|
371
|
+
|
|
372
|
+
const branchIdForGitName = (
|
|
373
|
+
client: PrismaManagementClient,
|
|
374
|
+
projectId: string,
|
|
375
|
+
gitName: string,
|
|
376
|
+
) =>
|
|
377
|
+
client
|
|
378
|
+
.listBranches(projectId, { gitName, limit: 2 })
|
|
379
|
+
.pipe(
|
|
380
|
+
Effect.flatMap((branches) =>
|
|
381
|
+
branches.length > 1
|
|
382
|
+
? Effect.fail(
|
|
383
|
+
new Error(
|
|
384
|
+
`Prisma project '${projectId}' has multiple branches named '${gitName}'; refusing to select one arbitrarily.`,
|
|
385
|
+
),
|
|
386
|
+
)
|
|
387
|
+
: Effect.succeed(branches[0]?.id),
|
|
388
|
+
),
|
|
389
|
+
);
|
|
390
|
+
|
|
391
|
+
const attrsFrom = (
|
|
392
|
+
database: ApiDatabase,
|
|
393
|
+
secrets: PrismaSecretConnection,
|
|
394
|
+
): Database["Attributes"] => ({
|
|
395
|
+
databaseId: database.id,
|
|
396
|
+
databaseName: database.name,
|
|
397
|
+
projectId: database.project.id,
|
|
398
|
+
status: database.status,
|
|
399
|
+
region: database.region?.id ?? null,
|
|
400
|
+
isDefault: database.isDefault,
|
|
401
|
+
branchId: database.branchId,
|
|
402
|
+
defaultConnectionId: database.defaultConnectionId,
|
|
403
|
+
createdAt: database.createdAt,
|
|
404
|
+
directConnectionString: secrets.directConnectionString,
|
|
405
|
+
pooledConnectionString: secrets.pooledConnectionString,
|
|
406
|
+
accelerateConnectionString: secrets.accelerateConnectionString,
|
|
407
|
+
host: secrets.host,
|
|
408
|
+
user: secrets.user,
|
|
409
|
+
password: secrets.password,
|
|
410
|
+
});
|
|
411
|
+
|
|
412
|
+
const branchNeedsSync = Effect.fn(function* (
|
|
413
|
+
client: PrismaManagementClient,
|
|
414
|
+
projectId: string,
|
|
415
|
+
database: ApiDatabase,
|
|
416
|
+
props: DatabaseProps,
|
|
417
|
+
) {
|
|
418
|
+
if (props.branchId !== undefined && !isPrismaDevId(props.branchId)) {
|
|
419
|
+
return database.branchId !== props.branchId;
|
|
420
|
+
}
|
|
421
|
+
if (props.branchGitName === undefined) {
|
|
422
|
+
return database.branchId !== null;
|
|
423
|
+
}
|
|
424
|
+
if (props.branchGitName === null) {
|
|
425
|
+
return database.branchId !== null;
|
|
426
|
+
}
|
|
427
|
+
const branchId = yield* branchIdForGitName(
|
|
428
|
+
client,
|
|
429
|
+
projectId,
|
|
430
|
+
props.branchGitName,
|
|
431
|
+
);
|
|
432
|
+
return branchId === undefined || branchId !== database.branchId;
|
|
433
|
+
});
|
|
434
|
+
|
|
435
|
+
const branchAttachment = (props: DatabaseProps) =>
|
|
436
|
+
props.branchId !== undefined && !isPrismaDevId(props.branchId)
|
|
437
|
+
? {
|
|
438
|
+
branchId: props.branchId,
|
|
439
|
+
branchGitName: undefined,
|
|
440
|
+
}
|
|
441
|
+
: props.branchGitName !== undefined
|
|
442
|
+
? {
|
|
443
|
+
branchId: undefined,
|
|
444
|
+
branchGitName: props.branchGitName,
|
|
445
|
+
}
|
|
446
|
+
: {
|
|
447
|
+
branchId: undefined,
|
|
448
|
+
branchGitName: undefined,
|
|
449
|
+
};
|
|
450
|
+
|
|
451
|
+
const validateDatabaseProps = (props: DatabaseProps) =>
|
|
452
|
+
Effect.gen(function* () {
|
|
453
|
+
if ((props as { isDefault?: boolean }).isDefault === true) {
|
|
454
|
+
return yield* Effect.fail(
|
|
455
|
+
new Error(
|
|
456
|
+
"Prisma.Database cannot manage a default database because the Management API has no safe demotion or promote-existing operation, so the resource could never be destroyed. Use Prisma.Project for the project-owned default database.",
|
|
457
|
+
),
|
|
458
|
+
);
|
|
459
|
+
}
|
|
460
|
+
if (props.branchId !== undefined && props.branchGitName !== undefined) {
|
|
461
|
+
return yield* Effect.fail(
|
|
462
|
+
new Error("branchId and branchGitName are mutually exclusive."),
|
|
463
|
+
);
|
|
464
|
+
}
|
|
465
|
+
});
|
|
466
|
+
|
|
467
|
+
export const DatabaseProvider = () =>
|
|
468
|
+
Provider.effect(
|
|
469
|
+
Database,
|
|
470
|
+
Effect.gen(function* () {
|
|
471
|
+
const client = yield* PrismaClient;
|
|
472
|
+
return {
|
|
473
|
+
stables: ["databaseId"],
|
|
474
|
+
list: () =>
|
|
475
|
+
client.listDatabases().pipe(
|
|
476
|
+
Effect.map((databases) =>
|
|
477
|
+
// Default databases are project-owned and the API rejects
|
|
478
|
+
// direct deletion. Project.list/delete owns their teardown;
|
|
479
|
+
// exposing them here would make unsafe nuke retry forever.
|
|
480
|
+
databases
|
|
481
|
+
.filter((database) => !database.isDefault)
|
|
482
|
+
.map((database) => attrsFrom(database, {})),
|
|
483
|
+
),
|
|
484
|
+
),
|
|
485
|
+
diff: Effect.fn(function* ({ id, olds, news, output }) {
|
|
486
|
+
if (!isInputObject(news)) return undefined;
|
|
487
|
+
if (
|
|
488
|
+
isResolved(news.rotateCredentialsOnAdopt) &&
|
|
489
|
+
news.rotateCredentialsOnAdopt === true &&
|
|
490
|
+
olds.rotateCredentialsOnAdopt !== true
|
|
491
|
+
) {
|
|
492
|
+
return { action: "update" } as const;
|
|
493
|
+
}
|
|
494
|
+
if ((news as { isDefault?: unknown }).isDefault === true) {
|
|
495
|
+
return yield* Effect.fail(
|
|
496
|
+
new Error(
|
|
497
|
+
"Prisma.Database cannot manage a default database because the Management API has no safe demotion or promote-existing operation. Use Prisma.Project for the project-owned default database.",
|
|
498
|
+
),
|
|
499
|
+
);
|
|
500
|
+
}
|
|
501
|
+
if (isPrismaDevId(output?.databaseId)) {
|
|
502
|
+
return { action: "update" } as const;
|
|
503
|
+
}
|
|
504
|
+
const oldProjectId =
|
|
505
|
+
output?.projectId ?? unresolvedProjectIdOf(olds.project);
|
|
506
|
+
const newProjectId = isResolved(news.project)
|
|
507
|
+
? unresolvedProjectIdOf(news.project)
|
|
508
|
+
: undefined;
|
|
509
|
+
const desiredRegionInput = isResolved(news.region)
|
|
510
|
+
? (news.region ?? "us-east-1")
|
|
511
|
+
: undefined;
|
|
512
|
+
const regionProjectId = newProjectId ?? oldProjectId;
|
|
513
|
+
const desiredRegion =
|
|
514
|
+
desiredRegionInput === "inherit"
|
|
515
|
+
? regionProjectId
|
|
516
|
+
? yield* resolveDatabaseRegion(
|
|
517
|
+
client,
|
|
518
|
+
regionProjectId,
|
|
519
|
+
desiredRegionInput,
|
|
520
|
+
)
|
|
521
|
+
: undefined
|
|
522
|
+
: desiredRegionInput;
|
|
523
|
+
const observedRegion = output
|
|
524
|
+
? output.region
|
|
525
|
+
: (olds.region ?? "us-east-1");
|
|
526
|
+
const desiredIsDefault = isResolved(news.isDefault)
|
|
527
|
+
? (news.isDefault ?? false)
|
|
528
|
+
: undefined;
|
|
529
|
+
const observedIsDefault =
|
|
530
|
+
output?.isDefault ?? olds.isDefault ?? false;
|
|
531
|
+
|
|
532
|
+
// A default database cannot be deleted from its old project after a
|
|
533
|
+
// cross-project replacement. Block before creating anything until
|
|
534
|
+
// another database has been promoted in the original project.
|
|
535
|
+
if (
|
|
536
|
+
observedIsDefault &&
|
|
537
|
+
concreteIdsChanged(oldProjectId, newProjectId)
|
|
538
|
+
) {
|
|
539
|
+
return { action: "update" } as const;
|
|
540
|
+
}
|
|
541
|
+
|
|
542
|
+
// Prisma has no API operation that directly demotes the current
|
|
543
|
+
// default database. Do not schedule a doomed create-first
|
|
544
|
+
// replacement: reconcile will fail before mutation until another
|
|
545
|
+
// database has been promoted and this one is observed as nondefault.
|
|
546
|
+
if (desiredIsDefault === false && observedIsDefault) {
|
|
547
|
+
return { action: "update" } as const;
|
|
548
|
+
}
|
|
549
|
+
if (
|
|
550
|
+
concreteIdsChanged(oldProjectId, newProjectId) ||
|
|
551
|
+
(desiredRegion !== undefined && desiredRegion !== observedRegion) ||
|
|
552
|
+
(desiredIsDefault !== undefined &&
|
|
553
|
+
desiredIsDefault !== observedIsDefault) ||
|
|
554
|
+
(isResolved(news.source) &&
|
|
555
|
+
!desiredSourcesMatch(news.source, olds.source))
|
|
556
|
+
) {
|
|
557
|
+
return { action: "replace" } as const;
|
|
558
|
+
}
|
|
559
|
+
if (!isResolved(news.name)) return undefined;
|
|
560
|
+
const desiredName = yield* createName(id, news.name);
|
|
561
|
+
const observedName =
|
|
562
|
+
output?.databaseName ?? (yield* createName(id, olds.name));
|
|
563
|
+
let branchMismatch = false;
|
|
564
|
+
if (isResolved(news.branchId) && news.branchId !== undefined) {
|
|
565
|
+
branchMismatch =
|
|
566
|
+
!isPrismaDevId(news.branchId) &&
|
|
567
|
+
(output?.branchId ?? olds.branchId ?? null) !== news.branchId;
|
|
568
|
+
} else if (
|
|
569
|
+
isResolved(news.branchGitName) &&
|
|
570
|
+
news.branchGitName !== undefined
|
|
571
|
+
) {
|
|
572
|
+
if (news.branchGitName === null) {
|
|
573
|
+
branchMismatch =
|
|
574
|
+
(output?.branchId ?? olds.branchId ?? null) !== null;
|
|
575
|
+
} else if (output && newProjectId !== undefined) {
|
|
576
|
+
const desiredBranchId = yield* branchIdForGitName(
|
|
577
|
+
client,
|
|
578
|
+
newProjectId,
|
|
579
|
+
news.branchGitName,
|
|
580
|
+
);
|
|
581
|
+
branchMismatch =
|
|
582
|
+
desiredBranchId === undefined ||
|
|
583
|
+
desiredBranchId !== output.branchId;
|
|
584
|
+
} else {
|
|
585
|
+
branchMismatch = news.branchGitName !== olds.branchGitName;
|
|
586
|
+
}
|
|
587
|
+
} else if (
|
|
588
|
+
isResolved(news.branchId) &&
|
|
589
|
+
isResolved(news.branchGitName)
|
|
590
|
+
) {
|
|
591
|
+
branchMismatch =
|
|
592
|
+
(output?.branchId ?? olds.branchId ?? null) !== null;
|
|
593
|
+
}
|
|
594
|
+
if (desiredName !== observedName || branchMismatch) {
|
|
595
|
+
return { action: "update" } as const;
|
|
596
|
+
}
|
|
597
|
+
return undefined;
|
|
598
|
+
}),
|
|
599
|
+
read: Effect.fn(function* ({ id, output, olds }) {
|
|
600
|
+
const databaseId = isPrismaDevId(output?.databaseId)
|
|
601
|
+
? undefined
|
|
602
|
+
: output?.databaseId;
|
|
603
|
+
let generatedIdentityMatch = false;
|
|
604
|
+
let database = databaseId
|
|
605
|
+
? yield* client
|
|
606
|
+
.getDatabase(databaseId)
|
|
607
|
+
.pipe(
|
|
608
|
+
Effect.catchIf(isNotFound, () => Effect.succeed(undefined)),
|
|
609
|
+
)
|
|
610
|
+
: undefined;
|
|
611
|
+
if (!database && databaseId === undefined) {
|
|
612
|
+
const projectId = unresolvedProjectIdOf(olds.project);
|
|
613
|
+
if (projectId) {
|
|
614
|
+
const name = yield* createName(id, olds.name);
|
|
615
|
+
database = yield* findDatabaseByName(client, projectId, name);
|
|
616
|
+
generatedIdentityMatch =
|
|
617
|
+
database !== undefined && olds.name === undefined;
|
|
618
|
+
if (
|
|
619
|
+
!database &&
|
|
620
|
+
olds.name === undefined &&
|
|
621
|
+
(olds.isDefault ?? false)
|
|
622
|
+
) {
|
|
623
|
+
database = yield* findDefaultDatabase(client, projectId);
|
|
624
|
+
}
|
|
625
|
+
}
|
|
626
|
+
}
|
|
627
|
+
if (!database) return undefined;
|
|
628
|
+
if (
|
|
629
|
+
databaseId === undefined &&
|
|
630
|
+
!sourceMatches(database.source, olds.source)
|
|
631
|
+
) {
|
|
632
|
+
return yield* Effect.fail(
|
|
633
|
+
new Error(
|
|
634
|
+
`Prisma database '${database.name}' has immutable source ${JSON.stringify(database.source)} but ${JSON.stringify(olds.source ?? { type: "empty" })} was requested; refusing to adopt a database that cannot converge.`,
|
|
635
|
+
),
|
|
636
|
+
);
|
|
637
|
+
}
|
|
638
|
+
const cachedSecrets =
|
|
639
|
+
output?.databaseId === database.id ? output : undefined;
|
|
640
|
+
const attrs = attrsFrom(database, {
|
|
641
|
+
directConnectionString: cachedSecrets?.directConnectionString,
|
|
642
|
+
pooledConnectionString: cachedSecrets?.pooledConnectionString,
|
|
643
|
+
accelerateConnectionString:
|
|
644
|
+
cachedSecrets?.accelerateConnectionString,
|
|
645
|
+
host: cachedSecrets?.host,
|
|
646
|
+
user: cachedSecrets?.user,
|
|
647
|
+
password: cachedSecrets?.password,
|
|
648
|
+
});
|
|
649
|
+
return databaseId === undefined && !generatedIdentityMatch
|
|
650
|
+
? Unowned(attrs)
|
|
651
|
+
: attrs;
|
|
652
|
+
}),
|
|
653
|
+
reconcile: Effect.fn(function* ({ id, news, olds, output }) {
|
|
654
|
+
yield* validateDatabaseProps(news);
|
|
655
|
+
const projectId = yield* resolveProjectId(news.project);
|
|
656
|
+
const region = yield* resolveDatabaseRegion(
|
|
657
|
+
client,
|
|
658
|
+
projectId,
|
|
659
|
+
news.region,
|
|
660
|
+
);
|
|
661
|
+
const name = yield* createName(id, news.name);
|
|
662
|
+
const databaseId = isPrismaDevId(output?.databaseId)
|
|
663
|
+
? undefined
|
|
664
|
+
: output?.databaseId;
|
|
665
|
+
let database = databaseId
|
|
666
|
+
? yield* client
|
|
667
|
+
.getDatabase(databaseId)
|
|
668
|
+
.pipe(
|
|
669
|
+
Effect.catchIf(isNotFound, () => Effect.succeed(undefined)),
|
|
670
|
+
)
|
|
671
|
+
: undefined;
|
|
672
|
+
if (!database && news.name === undefined) {
|
|
673
|
+
database = yield* findDatabaseByName(client, projectId, name);
|
|
674
|
+
}
|
|
675
|
+
|
|
676
|
+
let secrets: PrismaSecretConnection = {};
|
|
677
|
+
let recoverCreateSecrets = false;
|
|
678
|
+
const attach = branchAttachment(news);
|
|
679
|
+
if (!database) {
|
|
680
|
+
if (
|
|
681
|
+
news.name !== undefined &&
|
|
682
|
+
(news.branchId !== undefined || news.branchGitName !== undefined)
|
|
683
|
+
) {
|
|
684
|
+
return yield* Effect.fail(
|
|
685
|
+
new Error(
|
|
686
|
+
`Cannot safely create explicitly named Prisma database '${name}' with a branch attachment. The Management API creates the database before attaching the branch and exposes no idempotency key, so a failed response cannot be distinguished from a foreign database. Omit name to use Alchemy's recoverable physical identity, or wait for an atomic Management API operation.`,
|
|
687
|
+
),
|
|
688
|
+
);
|
|
689
|
+
}
|
|
690
|
+
const result = yield* client
|
|
691
|
+
.createDatabase({
|
|
692
|
+
projectId,
|
|
693
|
+
name,
|
|
694
|
+
region,
|
|
695
|
+
isDefault: news.isDefault ?? false,
|
|
696
|
+
source: news.source,
|
|
697
|
+
branchId: attach.branchId,
|
|
698
|
+
branchGitName: attach.branchGitName,
|
|
699
|
+
})
|
|
700
|
+
.pipe(
|
|
701
|
+
Effect.map((database) => ({
|
|
702
|
+
database,
|
|
703
|
+
secrets: extractConnectionSecrets(database.connections[0]),
|
|
704
|
+
recoverSecrets: true,
|
|
705
|
+
})),
|
|
706
|
+
Effect.catchIf(isConflict, () =>
|
|
707
|
+
news.name === undefined
|
|
708
|
+
? recoverGeneratedDatabaseAfterConflict(
|
|
709
|
+
client,
|
|
710
|
+
projectId,
|
|
711
|
+
name,
|
|
712
|
+
).pipe(
|
|
713
|
+
Effect.map((database) => ({
|
|
714
|
+
database,
|
|
715
|
+
secrets: {},
|
|
716
|
+
// The generated physical name is owned by this
|
|
717
|
+
// resource instance. A conflict after the POST can
|
|
718
|
+
// be a lost successful response, so recover the
|
|
719
|
+
// write-only default credentials below.
|
|
720
|
+
recoverSecrets: true,
|
|
721
|
+
})),
|
|
722
|
+
)
|
|
723
|
+
: Effect.fail(
|
|
724
|
+
new Error(
|
|
725
|
+
`A Prisma database named '${name}' appeared after the adoption check. Refusing to take it over; rerun with adoption enabled if it is the intended database.`,
|
|
726
|
+
),
|
|
727
|
+
),
|
|
728
|
+
),
|
|
729
|
+
);
|
|
730
|
+
database = result.database;
|
|
731
|
+
secrets = result.secrets;
|
|
732
|
+
recoverCreateSecrets = result.recoverSecrets;
|
|
733
|
+
}
|
|
734
|
+
|
|
735
|
+
if (database.project.id !== projectId) {
|
|
736
|
+
return yield* Effect.fail(
|
|
737
|
+
new Error(
|
|
738
|
+
database.isDefault
|
|
739
|
+
? `Cannot move default Prisma database '${database.name}' from project '${database.project.id}' to '${projectId}' because the old default cannot be deleted. Promote another database in the original project first, then retry the move.`
|
|
740
|
+
: `Prisma database '${database.name}' belongs to project '${database.project.id}', not requested project '${projectId}'. Refusing to claim convergence; replace the database.`,
|
|
741
|
+
),
|
|
742
|
+
);
|
|
743
|
+
}
|
|
744
|
+
if (database.region?.id !== region) {
|
|
745
|
+
return yield* Effect.fail(
|
|
746
|
+
new Error(
|
|
747
|
+
`Prisma database '${database.name}' is in immutable region '${database.region?.id ?? "unknown"}', not requested region '${region}'. Refusing to claim convergence; replace the database.`,
|
|
748
|
+
),
|
|
749
|
+
);
|
|
750
|
+
}
|
|
751
|
+
if (!sourceMatches(database.source, news.source)) {
|
|
752
|
+
return yield* Effect.fail(
|
|
753
|
+
new Error(
|
|
754
|
+
`Prisma database '${database.name}' has immutable source ${JSON.stringify(database.source)}, not requested source ${JSON.stringify(news.source ?? { type: "empty" })}. Refusing to claim convergence; replace the database.`,
|
|
755
|
+
),
|
|
756
|
+
);
|
|
757
|
+
}
|
|
758
|
+
if (
|
|
759
|
+
database.isDefault === true &&
|
|
760
|
+
(news.isDefault ?? false) === false
|
|
761
|
+
) {
|
|
762
|
+
return yield* Effect.fail(
|
|
763
|
+
new Error(
|
|
764
|
+
`Cannot demote default Prisma database '${database.name}' directly because the Management API has no demotion operation. Promote another database in project '${projectId}' first, then retry this deployment.`,
|
|
765
|
+
),
|
|
766
|
+
);
|
|
767
|
+
}
|
|
768
|
+
|
|
769
|
+
const ownedGeneratedIdentity =
|
|
770
|
+
news.name === undefined && database.name === name;
|
|
771
|
+
|
|
772
|
+
const desired = { ...news, name };
|
|
773
|
+
const needsPatch =
|
|
774
|
+
database.name !== name ||
|
|
775
|
+
(yield* branchNeedsSync(client, projectId, database, desired));
|
|
776
|
+
if (needsPatch) {
|
|
777
|
+
const updateAttachment =
|
|
778
|
+
attach.branchId === undefined &&
|
|
779
|
+
attach.branchGitName === undefined
|
|
780
|
+
? { branchId: null, branchGitName: undefined }
|
|
781
|
+
: attach;
|
|
782
|
+
database = yield* client.updateDatabase(database.id, {
|
|
783
|
+
name,
|
|
784
|
+
branchId: updateAttachment.branchId,
|
|
785
|
+
branchGitName: updateAttachment.branchGitName,
|
|
786
|
+
});
|
|
787
|
+
}
|
|
788
|
+
|
|
789
|
+
const persistedSecrets =
|
|
790
|
+
output?.databaseId === database.id ? output : undefined;
|
|
791
|
+
const knownSecrets = mergeConnectionSecrets(secrets, {
|
|
792
|
+
directConnectionString: persistedSecrets?.directConnectionString,
|
|
793
|
+
pooledConnectionString: persistedSecrets?.pooledConnectionString,
|
|
794
|
+
accelerateConnectionString:
|
|
795
|
+
persistedSecrets?.accelerateConnectionString,
|
|
796
|
+
host: persistedSecrets?.host,
|
|
797
|
+
user: persistedSecrets?.user,
|
|
798
|
+
password: persistedSecrets?.password,
|
|
799
|
+
});
|
|
800
|
+
if (
|
|
801
|
+
recoverCreateSecrets ||
|
|
802
|
+
(ownedGeneratedIdentity &&
|
|
803
|
+
!hasCanonicalConnectionSecrets(knownSecrets)) ||
|
|
804
|
+
olds !== undefined ||
|
|
805
|
+
news.rotateCredentialsOnAdopt === true
|
|
806
|
+
) {
|
|
807
|
+
const recovered = yield* recoverDatabaseConnectionSecrets(
|
|
808
|
+
client,
|
|
809
|
+
database,
|
|
810
|
+
knownSecrets,
|
|
811
|
+
);
|
|
812
|
+
database = recovered.database;
|
|
813
|
+
return attrsFrom(database, recovered.secrets);
|
|
814
|
+
}
|
|
815
|
+
return attrsFrom(database, knownSecrets);
|
|
816
|
+
}),
|
|
817
|
+
delete: Effect.fn(function* ({ output }) {
|
|
818
|
+
if (isPrismaDevId(output.databaseId)) return;
|
|
819
|
+
const database = yield* client
|
|
820
|
+
.getDatabase(output.databaseId)
|
|
821
|
+
.pipe(Effect.catchIf(isNotFound, () => Effect.succeed(undefined)));
|
|
822
|
+
if (!database) return;
|
|
823
|
+
if (database.isDefault) {
|
|
824
|
+
return yield* Effect.fail(
|
|
825
|
+
new Error(
|
|
826
|
+
`Cannot delete default Prisma database '${database.name ?? output.databaseId}' directly. Promote another database first, or delete the owning Prisma.Project so the API can remove its project-owned default database.`,
|
|
827
|
+
),
|
|
828
|
+
);
|
|
829
|
+
}
|
|
830
|
+
yield* client
|
|
831
|
+
.deleteDatabase(output.databaseId)
|
|
832
|
+
.pipe(Effect.catchIf(isNotFound, () => Effect.void));
|
|
833
|
+
}),
|
|
834
|
+
};
|
|
835
|
+
}),
|
|
836
|
+
);
|