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,1337 @@
|
|
|
1
|
+
import * as Data from "effect/Data";
|
|
2
|
+
import * as Context from "effect/Context";
|
|
3
|
+
import * as Duration from "effect/Duration";
|
|
4
|
+
import * as Effect from "effect/Effect";
|
|
5
|
+
import * as Layer from "effect/Layer";
|
|
6
|
+
import * as Redacted from "effect/Redacted";
|
|
7
|
+
import * as Schedule from "effect/Schedule";
|
|
8
|
+
import * as Stream from "effect/Stream";
|
|
9
|
+
import * as HttpClient from "effect/unstable/http/HttpClient";
|
|
10
|
+
import * as HttpClientError from "effect/unstable/http/HttpClientError";
|
|
11
|
+
import * as HttpClientRequest from "effect/unstable/http/HttpClientRequest";
|
|
12
|
+
import { PrismaEnvironment } from "./PrismaEnvironment.ts";
|
|
13
|
+
import type {
|
|
14
|
+
App,
|
|
15
|
+
AccelerateRegion,
|
|
16
|
+
AppCreateInput,
|
|
17
|
+
AppDeploymentTarget,
|
|
18
|
+
AppUpdateInput,
|
|
19
|
+
BackupListResponse,
|
|
20
|
+
Branch,
|
|
21
|
+
BranchCreateInput,
|
|
22
|
+
BranchUpdateInput,
|
|
23
|
+
BuildLogsQuery,
|
|
24
|
+
BuildLogsRequest,
|
|
25
|
+
ConnectionCreateInput,
|
|
26
|
+
CurrentPrincipal,
|
|
27
|
+
CustomDomain,
|
|
28
|
+
CustomDomainCreateInput,
|
|
29
|
+
CustomDomainCreateResult,
|
|
30
|
+
DataResponse,
|
|
31
|
+
Database,
|
|
32
|
+
DatabaseConnection,
|
|
33
|
+
DatabaseConnectionCreateInput,
|
|
34
|
+
DatabaseConnectionWithOptionalSecrets,
|
|
35
|
+
DatabaseConnectionWithSecrets,
|
|
36
|
+
DatabaseCreateInput,
|
|
37
|
+
DatabaseUpdateInput,
|
|
38
|
+
DatabaseUsage,
|
|
39
|
+
Deployment,
|
|
40
|
+
DeploymentCreateInput,
|
|
41
|
+
DeploymentCreateResult,
|
|
42
|
+
DeploymentListItem,
|
|
43
|
+
DeploymentLogsQuery,
|
|
44
|
+
DeploymentLogsRequest,
|
|
45
|
+
EnvironmentVariable,
|
|
46
|
+
EnvironmentVariableCreateInput,
|
|
47
|
+
EnvironmentVariableUpdateInput,
|
|
48
|
+
Integration,
|
|
49
|
+
ListResponse,
|
|
50
|
+
PrismaBranchIdFilter,
|
|
51
|
+
PrismaSecretConnection,
|
|
52
|
+
Project,
|
|
53
|
+
ProjectCreateInput,
|
|
54
|
+
ProjectDatabaseCreateInput,
|
|
55
|
+
ProjectTransferInput,
|
|
56
|
+
ProjectUpdateInput,
|
|
57
|
+
PostgresRegion,
|
|
58
|
+
PromoteAppResult,
|
|
59
|
+
RollbackAppResult,
|
|
60
|
+
Region,
|
|
61
|
+
RestoreDatabaseInput,
|
|
62
|
+
RestoredDatabase,
|
|
63
|
+
ScmInstallIntent,
|
|
64
|
+
ScmInstallIntentCreateInput,
|
|
65
|
+
ScmInstallation,
|
|
66
|
+
ScmRepository,
|
|
67
|
+
SourceRepository,
|
|
68
|
+
SourceRepositoryCreateInput,
|
|
69
|
+
StartDeploymentResult,
|
|
70
|
+
Workspace,
|
|
71
|
+
} from "./Types.ts";
|
|
72
|
+
|
|
73
|
+
type Method = "GET" | "POST" | "PATCH" | "DELETE";
|
|
74
|
+
|
|
75
|
+
export class PrismaApiError extends Data.TaggedError("PrismaApiError")<{
|
|
76
|
+
method: Method;
|
|
77
|
+
path: string;
|
|
78
|
+
status: number;
|
|
79
|
+
message: string;
|
|
80
|
+
/** Raw response bodies may contain credentials and are always redacted. */
|
|
81
|
+
body?: Redacted.Redacted<string>;
|
|
82
|
+
}> {}
|
|
83
|
+
|
|
84
|
+
export class PrismaApiDecodeError extends Data.TaggedError(
|
|
85
|
+
"PrismaApiDecodeError",
|
|
86
|
+
)<{
|
|
87
|
+
method: Method;
|
|
88
|
+
path: string;
|
|
89
|
+
/** Byte length is retained for diagnostics without retaining response data. */
|
|
90
|
+
bodyLength: number;
|
|
91
|
+
message: string;
|
|
92
|
+
}> {}
|
|
93
|
+
|
|
94
|
+
interface RequestOptions {
|
|
95
|
+
query?: object;
|
|
96
|
+
body?: unknown;
|
|
97
|
+
headers?: Record<string, string>;
|
|
98
|
+
timeout?: Duration.Input;
|
|
99
|
+
onSuccessfulBodyLength?: (
|
|
100
|
+
bodyLength: number,
|
|
101
|
+
) => Effect.Effect<void, PrismaApiDecodeError>;
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
export interface PrismaManagementClient {
|
|
105
|
+
listWorkspaces(
|
|
106
|
+
query?: PaginationQuery,
|
|
107
|
+
): Effect.Effect<Workspace[], PrismaApiError | PrismaApiDecodeError>;
|
|
108
|
+
getWorkspace(
|
|
109
|
+
id: string,
|
|
110
|
+
): Effect.Effect<Workspace, PrismaApiError | PrismaApiDecodeError>;
|
|
111
|
+
getCurrentPrincipal(): Effect.Effect<
|
|
112
|
+
CurrentPrincipal,
|
|
113
|
+
PrismaApiError | PrismaApiDecodeError
|
|
114
|
+
>;
|
|
115
|
+
listRegions(
|
|
116
|
+
query?: RegionListQuery,
|
|
117
|
+
): Effect.Effect<Region[], PrismaApiError | PrismaApiDecodeError>;
|
|
118
|
+
listPostgresRegions(): Effect.Effect<
|
|
119
|
+
PostgresRegion[],
|
|
120
|
+
PrismaApiError | PrismaApiDecodeError
|
|
121
|
+
>;
|
|
122
|
+
listAccelerateRegions(): Effect.Effect<
|
|
123
|
+
AccelerateRegion[],
|
|
124
|
+
PrismaApiError | PrismaApiDecodeError
|
|
125
|
+
>;
|
|
126
|
+
listProjects(
|
|
127
|
+
query?: PaginationQuery,
|
|
128
|
+
): Effect.Effect<Project[], PrismaApiError | PrismaApiDecodeError>;
|
|
129
|
+
getProject(
|
|
130
|
+
id: string,
|
|
131
|
+
): Effect.Effect<Project, PrismaApiError | PrismaApiDecodeError>;
|
|
132
|
+
createProject(
|
|
133
|
+
input: ProjectCreateInput,
|
|
134
|
+
): Effect.Effect<ProjectCreateResult, PrismaApiError | PrismaApiDecodeError>;
|
|
135
|
+
updateProject(
|
|
136
|
+
id: string,
|
|
137
|
+
input: ProjectUpdateInput,
|
|
138
|
+
): Effect.Effect<Project, PrismaApiError | PrismaApiDecodeError>;
|
|
139
|
+
deleteProject(
|
|
140
|
+
id: string,
|
|
141
|
+
): Effect.Effect<void, PrismaApiError | PrismaApiDecodeError>;
|
|
142
|
+
transferProject(
|
|
143
|
+
id: string,
|
|
144
|
+
input: ProjectTransferInput,
|
|
145
|
+
): Effect.Effect<void, PrismaApiError | PrismaApiDecodeError>;
|
|
146
|
+
listDatabases(
|
|
147
|
+
query?: DatabaseListQuery,
|
|
148
|
+
): Effect.Effect<Database[], PrismaApiError | PrismaApiDecodeError>;
|
|
149
|
+
listProjectDatabases(
|
|
150
|
+
projectId: string,
|
|
151
|
+
query?: PaginationQuery,
|
|
152
|
+
): Effect.Effect<Database[], PrismaApiError | PrismaApiDecodeError>;
|
|
153
|
+
getDatabase(
|
|
154
|
+
id: string,
|
|
155
|
+
): Effect.Effect<Database, PrismaApiError | PrismaApiDecodeError>;
|
|
156
|
+
createDatabase(
|
|
157
|
+
input: DatabaseCreateInput,
|
|
158
|
+
): Effect.Effect<DatabaseCreateResult, PrismaApiError | PrismaApiDecodeError>;
|
|
159
|
+
createProjectDatabase(
|
|
160
|
+
projectId: string,
|
|
161
|
+
input: ProjectDatabaseCreateInput,
|
|
162
|
+
): Effect.Effect<
|
|
163
|
+
ProjectDatabaseCreateResult,
|
|
164
|
+
PrismaApiError | PrismaApiDecodeError
|
|
165
|
+
>;
|
|
166
|
+
updateDatabase(
|
|
167
|
+
id: string,
|
|
168
|
+
input: DatabaseUpdateInput,
|
|
169
|
+
): Effect.Effect<Database, PrismaApiError | PrismaApiDecodeError>;
|
|
170
|
+
deleteDatabase(
|
|
171
|
+
id: string,
|
|
172
|
+
): Effect.Effect<void, PrismaApiError | PrismaApiDecodeError>;
|
|
173
|
+
listBackups(
|
|
174
|
+
databaseId: string,
|
|
175
|
+
query?: BackupListQuery,
|
|
176
|
+
): Effect.Effect<BackupListResponse, PrismaApiError | PrismaApiDecodeError>;
|
|
177
|
+
restoreDatabase(
|
|
178
|
+
targetDatabaseId: string,
|
|
179
|
+
input: RestoreDatabaseInput,
|
|
180
|
+
): Effect.Effect<RestoredDatabase, PrismaApiError | PrismaApiDecodeError>;
|
|
181
|
+
getDatabaseUsage(
|
|
182
|
+
databaseId: string,
|
|
183
|
+
query?: DatabaseUsageQuery,
|
|
184
|
+
): Effect.Effect<DatabaseUsage, PrismaApiError | PrismaApiDecodeError>;
|
|
185
|
+
listConnections(
|
|
186
|
+
query?: ConnectionListQuery,
|
|
187
|
+
): Effect.Effect<DatabaseConnection[], PrismaApiError | PrismaApiDecodeError>;
|
|
188
|
+
listDatabaseConnections(
|
|
189
|
+
databaseId: string,
|
|
190
|
+
query?: PaginationQuery,
|
|
191
|
+
): Effect.Effect<DatabaseConnection[], PrismaApiError | PrismaApiDecodeError>;
|
|
192
|
+
getConnection(
|
|
193
|
+
id: string,
|
|
194
|
+
): Effect.Effect<DatabaseConnection, PrismaApiError | PrismaApiDecodeError>;
|
|
195
|
+
createConnection(
|
|
196
|
+
input: ConnectionCreateInput,
|
|
197
|
+
): Effect.Effect<
|
|
198
|
+
DatabaseConnectionWithSecrets,
|
|
199
|
+
PrismaApiError | PrismaApiDecodeError
|
|
200
|
+
>;
|
|
201
|
+
createDatabaseConnection(
|
|
202
|
+
databaseId: string,
|
|
203
|
+
input: DatabaseConnectionCreateInput,
|
|
204
|
+
): Effect.Effect<
|
|
205
|
+
DatabaseConnectionWithSecrets,
|
|
206
|
+
PrismaApiError | PrismaApiDecodeError
|
|
207
|
+
>;
|
|
208
|
+
deleteConnection(
|
|
209
|
+
id: string,
|
|
210
|
+
): Effect.Effect<void, PrismaApiError | PrismaApiDecodeError>;
|
|
211
|
+
rotateConnection(
|
|
212
|
+
id: string,
|
|
213
|
+
): Effect.Effect<
|
|
214
|
+
DatabaseConnectionWithSecrets,
|
|
215
|
+
PrismaApiError | PrismaApiDecodeError
|
|
216
|
+
>;
|
|
217
|
+
listBranches(
|
|
218
|
+
projectId: string,
|
|
219
|
+
query?: BranchListQuery,
|
|
220
|
+
): Effect.Effect<Branch[], PrismaApiError | PrismaApiDecodeError>;
|
|
221
|
+
getBranch(
|
|
222
|
+
id: string,
|
|
223
|
+
): Effect.Effect<Branch, PrismaApiError | PrismaApiDecodeError>;
|
|
224
|
+
createBranch(
|
|
225
|
+
projectId: string,
|
|
226
|
+
input: BranchCreateInput,
|
|
227
|
+
): Effect.Effect<Branch, PrismaApiError | PrismaApiDecodeError>;
|
|
228
|
+
updateBranch(
|
|
229
|
+
id: string,
|
|
230
|
+
input: BranchUpdateInput,
|
|
231
|
+
): Effect.Effect<Branch, PrismaApiError | PrismaApiDecodeError>;
|
|
232
|
+
deleteBranch(
|
|
233
|
+
id: string,
|
|
234
|
+
): Effect.Effect<void, PrismaApiError | PrismaApiDecodeError>;
|
|
235
|
+
getCustomDomain(
|
|
236
|
+
id: string,
|
|
237
|
+
): Effect.Effect<CustomDomain, PrismaApiError | PrismaApiDecodeError>;
|
|
238
|
+
deleteCustomDomain(
|
|
239
|
+
id: string,
|
|
240
|
+
): Effect.Effect<void, PrismaApiError | PrismaApiDecodeError>;
|
|
241
|
+
retryCustomDomain(
|
|
242
|
+
id: string,
|
|
243
|
+
): Effect.Effect<CustomDomain, PrismaApiError | PrismaApiDecodeError>;
|
|
244
|
+
listApps(
|
|
245
|
+
query?: AppListQuery,
|
|
246
|
+
): Effect.Effect<App[], PrismaApiError | PrismaApiDecodeError>;
|
|
247
|
+
getApp(id: string): Effect.Effect<App, PrismaApiError | PrismaApiDecodeError>;
|
|
248
|
+
createApp(
|
|
249
|
+
input: AppCreateInput,
|
|
250
|
+
): Effect.Effect<App, PrismaApiError | PrismaApiDecodeError>;
|
|
251
|
+
updateApp(
|
|
252
|
+
id: string,
|
|
253
|
+
input: AppUpdateInput,
|
|
254
|
+
): Effect.Effect<App, PrismaApiError | PrismaApiDecodeError>;
|
|
255
|
+
deleteApp(
|
|
256
|
+
id: string,
|
|
257
|
+
): Effect.Effect<void, PrismaApiError | PrismaApiDecodeError>;
|
|
258
|
+
promoteApp(
|
|
259
|
+
id: string,
|
|
260
|
+
target: AppDeploymentTarget,
|
|
261
|
+
): Effect.Effect<PromoteAppResult, PrismaApiError | PrismaApiDecodeError>;
|
|
262
|
+
rollbackApp(
|
|
263
|
+
id: string,
|
|
264
|
+
target: AppDeploymentTarget,
|
|
265
|
+
): Effect.Effect<RollbackAppResult, PrismaApiError | PrismaApiDecodeError>;
|
|
266
|
+
listAppDomains(
|
|
267
|
+
appId: string,
|
|
268
|
+
): Effect.Effect<CustomDomain[], PrismaApiError | PrismaApiDecodeError>;
|
|
269
|
+
createAppDomain(
|
|
270
|
+
appId: string,
|
|
271
|
+
input: CustomDomainCreateInput,
|
|
272
|
+
): Effect.Effect<
|
|
273
|
+
CustomDomainCreateResult,
|
|
274
|
+
PrismaApiError | PrismaApiDecodeError
|
|
275
|
+
>;
|
|
276
|
+
listAppDeployments(
|
|
277
|
+
appId: string,
|
|
278
|
+
query?: PaginationQuery,
|
|
279
|
+
): Effect.Effect<DeploymentListItem[], PrismaApiError | PrismaApiDecodeError>;
|
|
280
|
+
createAppDeployment(
|
|
281
|
+
appId: string,
|
|
282
|
+
input?: DeploymentCreateInput,
|
|
283
|
+
): Effect.Effect<
|
|
284
|
+
DeploymentCreateResult,
|
|
285
|
+
PrismaApiError | PrismaApiDecodeError
|
|
286
|
+
>;
|
|
287
|
+
getDeployment(
|
|
288
|
+
id: string,
|
|
289
|
+
): Effect.Effect<Deployment, PrismaApiError | PrismaApiDecodeError>;
|
|
290
|
+
deleteDeployment(
|
|
291
|
+
id: string,
|
|
292
|
+
): Effect.Effect<void, PrismaApiError | PrismaApiDecodeError>;
|
|
293
|
+
startDeployment(
|
|
294
|
+
id: string,
|
|
295
|
+
): Effect.Effect<
|
|
296
|
+
StartDeploymentResult,
|
|
297
|
+
PrismaApiError | PrismaApiDecodeError
|
|
298
|
+
>;
|
|
299
|
+
stopDeployment(
|
|
300
|
+
id: string,
|
|
301
|
+
): Effect.Effect<void, PrismaApiError | PrismaApiDecodeError>;
|
|
302
|
+
getDeploymentLogsRequest(
|
|
303
|
+
id: string,
|
|
304
|
+
query?: DeploymentLogsQuery,
|
|
305
|
+
): Effect.Effect<DeploymentLogsRequest, PrismaApiError>;
|
|
306
|
+
getBuildLogsRequest(
|
|
307
|
+
buildId: string,
|
|
308
|
+
query?: BuildLogsQuery,
|
|
309
|
+
): Effect.Effect<BuildLogsRequest, PrismaApiError>;
|
|
310
|
+
listEnvironmentVariables(
|
|
311
|
+
query?: EnvironmentVariableListQuery,
|
|
312
|
+
): Effect.Effect<
|
|
313
|
+
EnvironmentVariable[],
|
|
314
|
+
PrismaApiError | PrismaApiDecodeError
|
|
315
|
+
>;
|
|
316
|
+
getEnvironmentVariable(
|
|
317
|
+
id: string,
|
|
318
|
+
): Effect.Effect<EnvironmentVariable, PrismaApiError | PrismaApiDecodeError>;
|
|
319
|
+
createEnvironmentVariable(
|
|
320
|
+
input: EnvironmentVariableCreateInput,
|
|
321
|
+
): Effect.Effect<EnvironmentVariable, PrismaApiError | PrismaApiDecodeError>;
|
|
322
|
+
updateEnvironmentVariable(
|
|
323
|
+
id: string,
|
|
324
|
+
input: EnvironmentVariableUpdateInput,
|
|
325
|
+
): Effect.Effect<EnvironmentVariable, PrismaApiError | PrismaApiDecodeError>;
|
|
326
|
+
deleteEnvironmentVariable(
|
|
327
|
+
id: string,
|
|
328
|
+
): Effect.Effect<void, PrismaApiError | PrismaApiDecodeError>;
|
|
329
|
+
listIntegrations(
|
|
330
|
+
query: IntegrationListQuery,
|
|
331
|
+
): Effect.Effect<Integration[], PrismaApiError | PrismaApiDecodeError>;
|
|
332
|
+
listWorkspaceIntegrations(
|
|
333
|
+
workspaceId: string,
|
|
334
|
+
query?: PaginationQuery,
|
|
335
|
+
): Effect.Effect<Integration[], PrismaApiError | PrismaApiDecodeError>;
|
|
336
|
+
getIntegration(
|
|
337
|
+
id: string,
|
|
338
|
+
): Effect.Effect<Integration, PrismaApiError | PrismaApiDecodeError>;
|
|
339
|
+
deleteIntegration(
|
|
340
|
+
id: string,
|
|
341
|
+
): Effect.Effect<void, PrismaApiError | PrismaApiDecodeError>;
|
|
342
|
+
revokeWorkspaceIntegration(
|
|
343
|
+
workspaceId: string,
|
|
344
|
+
clientId: string,
|
|
345
|
+
): Effect.Effect<void, PrismaApiError | PrismaApiDecodeError>;
|
|
346
|
+
listScmInstallations(query: {
|
|
347
|
+
workspaceId: string;
|
|
348
|
+
cursor?: string | null;
|
|
349
|
+
limit?: number;
|
|
350
|
+
}): Effect.Effect<ScmInstallation[], PrismaApiError | PrismaApiDecodeError>;
|
|
351
|
+
createScmInstallIntent(
|
|
352
|
+
input: ScmInstallIntentCreateInput,
|
|
353
|
+
): Effect.Effect<ScmInstallIntent, PrismaApiError | PrismaApiDecodeError>;
|
|
354
|
+
listScmInstallationRepositories(
|
|
355
|
+
installationId: string,
|
|
356
|
+
query?: PaginationQuery,
|
|
357
|
+
): Effect.Effect<ScmRepository[], PrismaApiError | PrismaApiDecodeError>;
|
|
358
|
+
listSourceRepositories(
|
|
359
|
+
query: SourceRepositoryListQuery,
|
|
360
|
+
): Effect.Effect<SourceRepository[], PrismaApiError | PrismaApiDecodeError>;
|
|
361
|
+
getSourceRepository(
|
|
362
|
+
id: string,
|
|
363
|
+
): Effect.Effect<SourceRepository, PrismaApiError | PrismaApiDecodeError>;
|
|
364
|
+
createSourceRepository(
|
|
365
|
+
input: SourceRepositoryCreateInput,
|
|
366
|
+
): Effect.Effect<SourceRepository, PrismaApiError | PrismaApiDecodeError>;
|
|
367
|
+
deleteSourceRepository(
|
|
368
|
+
id: string,
|
|
369
|
+
): Effect.Effect<void, PrismaApiError | PrismaApiDecodeError>;
|
|
370
|
+
}
|
|
371
|
+
|
|
372
|
+
export class PrismaClient extends Context.Service<
|
|
373
|
+
PrismaClient,
|
|
374
|
+
PrismaManagementClient
|
|
375
|
+
>()("Prisma::PrismaClient") {}
|
|
376
|
+
|
|
377
|
+
export interface PaginationQuery {
|
|
378
|
+
cursor?: string | null;
|
|
379
|
+
limit?: number;
|
|
380
|
+
}
|
|
381
|
+
|
|
382
|
+
export interface BackupListQuery {
|
|
383
|
+
limit?: number;
|
|
384
|
+
}
|
|
385
|
+
|
|
386
|
+
export interface DatabaseUsageQuery {
|
|
387
|
+
startDate?: string;
|
|
388
|
+
endDate?: string;
|
|
389
|
+
}
|
|
390
|
+
|
|
391
|
+
export interface RegionListQuery {
|
|
392
|
+
product?: "postgres" | "accelerate";
|
|
393
|
+
}
|
|
394
|
+
|
|
395
|
+
export interface DatabaseListQuery extends PaginationQuery {
|
|
396
|
+
projectId?: string;
|
|
397
|
+
branchId?: PrismaBranchIdFilter;
|
|
398
|
+
branchGitName?: string;
|
|
399
|
+
}
|
|
400
|
+
|
|
401
|
+
export interface ConnectionListQuery extends PaginationQuery {
|
|
402
|
+
databaseId?: string;
|
|
403
|
+
}
|
|
404
|
+
|
|
405
|
+
export interface BranchListQuery extends PaginationQuery {
|
|
406
|
+
gitName?: string;
|
|
407
|
+
gitNameContains?: string;
|
|
408
|
+
}
|
|
409
|
+
|
|
410
|
+
export interface AppListQuery extends PaginationQuery {
|
|
411
|
+
projectId?: string;
|
|
412
|
+
branchId?: PrismaBranchIdFilter;
|
|
413
|
+
branchGitName?: string;
|
|
414
|
+
}
|
|
415
|
+
|
|
416
|
+
export type {
|
|
417
|
+
BuildLogsQuery,
|
|
418
|
+
BuildLogsRequest,
|
|
419
|
+
DeploymentLogsQuery,
|
|
420
|
+
DeploymentLogsRequest,
|
|
421
|
+
};
|
|
422
|
+
|
|
423
|
+
export interface EnvironmentVariableListQuery extends PaginationQuery {
|
|
424
|
+
projectId?: string;
|
|
425
|
+
class?: "production" | "preview";
|
|
426
|
+
key?: string;
|
|
427
|
+
branchId?: string;
|
|
428
|
+
}
|
|
429
|
+
|
|
430
|
+
export interface IntegrationListQuery extends PaginationQuery {
|
|
431
|
+
workspaceId: string;
|
|
432
|
+
}
|
|
433
|
+
|
|
434
|
+
export interface SourceRepositoryListQuery extends PaginationQuery {
|
|
435
|
+
projectId: string;
|
|
436
|
+
}
|
|
437
|
+
|
|
438
|
+
/** Response from the flat `POST /v1/databases` operation. */
|
|
439
|
+
export interface DatabaseCreateResult extends Omit<Database, "connections"> {
|
|
440
|
+
connections: DatabaseConnectionWithOptionalSecrets[];
|
|
441
|
+
}
|
|
442
|
+
|
|
443
|
+
/** Response from `POST /v1/projects/{projectId}/databases`. */
|
|
444
|
+
export interface ProjectDatabaseCreateResult extends Omit<
|
|
445
|
+
DatabaseCreateResult,
|
|
446
|
+
"region" | "status"
|
|
447
|
+
> {
|
|
448
|
+
status: "provisioning" | "ready";
|
|
449
|
+
region: { id: string; name: string };
|
|
450
|
+
}
|
|
451
|
+
|
|
452
|
+
export interface ProjectCreateDatabaseResult extends Omit<
|
|
453
|
+
ProjectDatabaseCreateResult,
|
|
454
|
+
"project"
|
|
455
|
+
> {}
|
|
456
|
+
|
|
457
|
+
export interface ProjectCreateResult extends Project {
|
|
458
|
+
database: ProjectCreateDatabaseResult | null;
|
|
459
|
+
}
|
|
460
|
+
|
|
461
|
+
export const isNotFound = (error: unknown): boolean =>
|
|
462
|
+
error instanceof PrismaApiError && error.status === 404;
|
|
463
|
+
|
|
464
|
+
export const isConflict = (error: unknown): boolean =>
|
|
465
|
+
error instanceof PrismaApiError && error.status === 409;
|
|
466
|
+
|
|
467
|
+
const redactedString = (
|
|
468
|
+
value: unknown,
|
|
469
|
+
): Redacted.Redacted<string> | undefined =>
|
|
470
|
+
typeof value === "string" ? Redacted.make(value) : undefined;
|
|
471
|
+
|
|
472
|
+
const decodeUrlComponent = (value: string) => {
|
|
473
|
+
try {
|
|
474
|
+
return decodeURIComponent(value);
|
|
475
|
+
} catch {
|
|
476
|
+
return value;
|
|
477
|
+
}
|
|
478
|
+
};
|
|
479
|
+
|
|
480
|
+
export const extractConnectionSecrets = (
|
|
481
|
+
connection:
|
|
482
|
+
| DatabaseConnection
|
|
483
|
+
| DatabaseConnectionWithOptionalSecrets
|
|
484
|
+
| DatabaseConnectionWithSecrets
|
|
485
|
+
| undefined
|
|
486
|
+
| null,
|
|
487
|
+
): PrismaSecretConnection => {
|
|
488
|
+
if (!connection) return {};
|
|
489
|
+
const withSecrets = connection as DatabaseConnectionWithOptionalSecrets;
|
|
490
|
+
const direct = withSecrets.endpoints?.direct?.connectionString;
|
|
491
|
+
const pooled = withSecrets.endpoints?.pooled?.connectionString;
|
|
492
|
+
const accelerate = withSecrets.endpoints?.accelerate?.connectionString;
|
|
493
|
+
const directUrl = (() => {
|
|
494
|
+
if (!direct) return undefined;
|
|
495
|
+
try {
|
|
496
|
+
return new URL(direct);
|
|
497
|
+
} catch {
|
|
498
|
+
return undefined;
|
|
499
|
+
}
|
|
500
|
+
})();
|
|
501
|
+
return {
|
|
502
|
+
directConnectionString: redactedString(direct),
|
|
503
|
+
pooledConnectionString: redactedString(pooled),
|
|
504
|
+
accelerateConnectionString: redactedString(accelerate),
|
|
505
|
+
host: directUrl?.hostname ?? withSecrets.endpoints?.direct?.host ?? null,
|
|
506
|
+
user: directUrl?.username ? decodeUrlComponent(directUrl.username) : null,
|
|
507
|
+
password: directUrl?.password
|
|
508
|
+
? redactedString(decodeUrlComponent(directUrl.password))
|
|
509
|
+
: undefined,
|
|
510
|
+
};
|
|
511
|
+
};
|
|
512
|
+
|
|
513
|
+
export const requestBody = <T>(response: DataResponse<T>): T => response.data;
|
|
514
|
+
|
|
515
|
+
const isRetryableStatus = (status: number) =>
|
|
516
|
+
status === 0 || status === 408 || status === 429 || status >= 500;
|
|
517
|
+
|
|
518
|
+
const REQUEST_AND_BODY_TIMEOUT = "10 seconds" as const;
|
|
519
|
+
const MAX_SUCCESS_BODY_BYTES = 4 * 1024 * 1024;
|
|
520
|
+
const MAX_ERROR_BODY_BYTES = 64 * 1024;
|
|
521
|
+
const MAX_PAGINATION_PAGES = 1_000;
|
|
522
|
+
const MAX_PAGINATION_ITEMS = 100_000;
|
|
523
|
+
const MAX_PAGINATION_BODY_BYTES = 64 * 1024 * 1024;
|
|
524
|
+
const PAGINATION_TIMEOUT = "2 minutes" as const;
|
|
525
|
+
const ROLLBACK_REQUEST_TIMEOUT = "30 seconds" as const;
|
|
526
|
+
const PROVISIONING_REQUEST_TIMEOUT = "2 minutes" as const;
|
|
527
|
+
const INVALID_PATH_SEGMENT = "__alchemy_invalid_prisma_path_segment__";
|
|
528
|
+
|
|
529
|
+
const pathSegment = (value: string): string => {
|
|
530
|
+
if (
|
|
531
|
+
value.length === 0 ||
|
|
532
|
+
value === "." ||
|
|
533
|
+
value === ".." ||
|
|
534
|
+
value === INVALID_PATH_SEGMENT ||
|
|
535
|
+
/[\\/?#%]/.test(value) ||
|
|
536
|
+
value.includes("\0")
|
|
537
|
+
) {
|
|
538
|
+
return INVALID_PATH_SEGMENT;
|
|
539
|
+
}
|
|
540
|
+
try {
|
|
541
|
+
return encodeURIComponent(value);
|
|
542
|
+
} catch {
|
|
543
|
+
return INVALID_PATH_SEGMENT;
|
|
544
|
+
}
|
|
545
|
+
};
|
|
546
|
+
|
|
547
|
+
const isRetryablePost = (path: string) =>
|
|
548
|
+
path.endsWith("/start") ||
|
|
549
|
+
path.endsWith("/stop") ||
|
|
550
|
+
path.endsWith("/promote") ||
|
|
551
|
+
path.endsWith("/rollback");
|
|
552
|
+
|
|
553
|
+
const isRetryableRequest = (method: Method, path: string) =>
|
|
554
|
+
method === "GET" ||
|
|
555
|
+
method === "DELETE" ||
|
|
556
|
+
method === "PATCH" ||
|
|
557
|
+
(method === "POST" && isRetryablePost(path));
|
|
558
|
+
|
|
559
|
+
const retryTransient = <A, E, R>(
|
|
560
|
+
method: Method,
|
|
561
|
+
path: string,
|
|
562
|
+
effect: Effect.Effect<A, E, R>,
|
|
563
|
+
) =>
|
|
564
|
+
effect.pipe(
|
|
565
|
+
Effect.retry({
|
|
566
|
+
while: (e) =>
|
|
567
|
+
e instanceof PrismaApiError &&
|
|
568
|
+
isRetryableRequest(method, path) &&
|
|
569
|
+
isRetryableStatus(e.status),
|
|
570
|
+
schedule: Schedule.max([
|
|
571
|
+
Schedule.exponential("100 millis"),
|
|
572
|
+
Schedule.recurs(4),
|
|
573
|
+
]),
|
|
574
|
+
}),
|
|
575
|
+
);
|
|
576
|
+
|
|
577
|
+
function makePrismaClient(): Effect.Effect<
|
|
578
|
+
PrismaManagementClient,
|
|
579
|
+
never,
|
|
580
|
+
PrismaEnvironment | HttpClient.HttpClient
|
|
581
|
+
> {
|
|
582
|
+
return Effect.gen(function* () {
|
|
583
|
+
const env = yield* PrismaEnvironment;
|
|
584
|
+
const http = yield* HttpClient.HttpClient;
|
|
585
|
+
|
|
586
|
+
function isValidApiPath(path: string): boolean {
|
|
587
|
+
if (
|
|
588
|
+
(path !== "/v1" && !path.startsWith("/v1/")) ||
|
|
589
|
+
path.startsWith("//") ||
|
|
590
|
+
path.includes("\\") ||
|
|
591
|
+
path.includes("?") ||
|
|
592
|
+
path.includes("#") ||
|
|
593
|
+
path.includes(INVALID_PATH_SEGMENT)
|
|
594
|
+
) {
|
|
595
|
+
return false;
|
|
596
|
+
}
|
|
597
|
+
try {
|
|
598
|
+
const base = new URL(env.baseUrl);
|
|
599
|
+
const resolved = new URL(path, base);
|
|
600
|
+
return (
|
|
601
|
+
resolved.origin === base.origin &&
|
|
602
|
+
(resolved.pathname === "/v1" || resolved.pathname.startsWith("/v1/"))
|
|
603
|
+
);
|
|
604
|
+
} catch {
|
|
605
|
+
return false;
|
|
606
|
+
}
|
|
607
|
+
}
|
|
608
|
+
|
|
609
|
+
const buildUrl = (
|
|
610
|
+
path: string,
|
|
611
|
+
query?: object,
|
|
612
|
+
): Effect.Effect<string, PrismaApiError> => {
|
|
613
|
+
if (!isValidApiPath(path)) {
|
|
614
|
+
return Effect.fail(
|
|
615
|
+
new PrismaApiError({
|
|
616
|
+
method: "GET",
|
|
617
|
+
path,
|
|
618
|
+
status: 0,
|
|
619
|
+
message: "Refused an invalid Prisma Management API path parameter",
|
|
620
|
+
}),
|
|
621
|
+
);
|
|
622
|
+
}
|
|
623
|
+
return Effect.sync(() => {
|
|
624
|
+
const url = new URL(path, env.baseUrl);
|
|
625
|
+
for (const [key, value] of Object.entries(query ?? {})) {
|
|
626
|
+
if (value === undefined || value === null) continue;
|
|
627
|
+
if (Array.isArray(value)) {
|
|
628
|
+
for (const item of value) {
|
|
629
|
+
url.searchParams.append(key, String(item));
|
|
630
|
+
}
|
|
631
|
+
} else {
|
|
632
|
+
url.searchParams.set(key, String(value));
|
|
633
|
+
}
|
|
634
|
+
}
|
|
635
|
+
return url.toString();
|
|
636
|
+
});
|
|
637
|
+
};
|
|
638
|
+
|
|
639
|
+
const buildWebSocketUrl = (path: string, query?: object) =>
|
|
640
|
+
buildUrl(path, query).pipe(
|
|
641
|
+
Effect.map((value) => {
|
|
642
|
+
const url = new URL(value);
|
|
643
|
+
if (url.protocol === "https:") url.protocol = "wss:";
|
|
644
|
+
if (url.protocol === "http:") url.protocol = "ws:";
|
|
645
|
+
return url.toString();
|
|
646
|
+
}),
|
|
647
|
+
);
|
|
648
|
+
|
|
649
|
+
const logsQuery = (
|
|
650
|
+
query: DeploymentLogsQuery | undefined,
|
|
651
|
+
): Record<string, unknown> | undefined => {
|
|
652
|
+
if (!query) return undefined;
|
|
653
|
+
const { fromStart, ...rest } = query;
|
|
654
|
+
return {
|
|
655
|
+
...rest,
|
|
656
|
+
from_start: fromStart === undefined ? undefined : String(fromStart),
|
|
657
|
+
};
|
|
658
|
+
};
|
|
659
|
+
|
|
660
|
+
const makeRequest = (
|
|
661
|
+
method: Method,
|
|
662
|
+
url: string,
|
|
663
|
+
options: RequestOptions | undefined,
|
|
664
|
+
) => {
|
|
665
|
+
const init =
|
|
666
|
+
method === "GET"
|
|
667
|
+
? HttpClientRequest.get(url)
|
|
668
|
+
: method === "POST"
|
|
669
|
+
? HttpClientRequest.post(url)
|
|
670
|
+
: method === "PATCH"
|
|
671
|
+
? HttpClientRequest.patch(url)
|
|
672
|
+
: HttpClientRequest.delete(url);
|
|
673
|
+
const request = init.pipe(
|
|
674
|
+
HttpClientRequest.bearerToken(Redacted.value(env.serviceToken)),
|
|
675
|
+
HttpClientRequest.setHeaders({
|
|
676
|
+
Accept: "application/json",
|
|
677
|
+
"User-Agent": "alchemy-prisma/1.0",
|
|
678
|
+
...options?.headers,
|
|
679
|
+
}),
|
|
680
|
+
);
|
|
681
|
+
return options?.body === undefined
|
|
682
|
+
? request
|
|
683
|
+
: request.pipe(HttpClientRequest.bodyJsonUnsafe(options.body));
|
|
684
|
+
};
|
|
685
|
+
|
|
686
|
+
const requestWithStatus = <T>(
|
|
687
|
+
method: Method,
|
|
688
|
+
path: string,
|
|
689
|
+
options?: RequestOptions,
|
|
690
|
+
): Effect.Effect<
|
|
691
|
+
{ status: number; body: T },
|
|
692
|
+
PrismaApiError | PrismaApiDecodeError
|
|
693
|
+
> => {
|
|
694
|
+
if (!isValidApiPath(path)) {
|
|
695
|
+
return Effect.fail(
|
|
696
|
+
new PrismaApiError({
|
|
697
|
+
method,
|
|
698
|
+
path,
|
|
699
|
+
status: 0,
|
|
700
|
+
message:
|
|
701
|
+
"Refused an invalid Prisma Management API path or path parameter outside the configured /v1 origin",
|
|
702
|
+
}),
|
|
703
|
+
);
|
|
704
|
+
}
|
|
705
|
+
return retryTransient(
|
|
706
|
+
method,
|
|
707
|
+
path,
|
|
708
|
+
Effect.gen(function* () {
|
|
709
|
+
const url = yield* buildUrl(path, options?.query);
|
|
710
|
+
const req = makeRequest(method, url, options);
|
|
711
|
+
const response = Effect.gen(function* () {
|
|
712
|
+
const res = yield* http.execute(req).pipe(
|
|
713
|
+
Effect.mapError(
|
|
714
|
+
(e) =>
|
|
715
|
+
new PrismaApiError({
|
|
716
|
+
method,
|
|
717
|
+
path,
|
|
718
|
+
status: 0,
|
|
719
|
+
message: e instanceof Error ? e.message : String(e),
|
|
720
|
+
}),
|
|
721
|
+
),
|
|
722
|
+
);
|
|
723
|
+
|
|
724
|
+
const maxBodyBytes =
|
|
725
|
+
res.status >= 200 && res.status < 300
|
|
726
|
+
? MAX_SUCCESS_BODY_BYTES
|
|
727
|
+
: MAX_ERROR_BODY_BYTES;
|
|
728
|
+
const bodyTooLarge = (bodyLength: number) =>
|
|
729
|
+
res.status >= 200 && res.status < 300
|
|
730
|
+
? new PrismaApiDecodeError({
|
|
731
|
+
method,
|
|
732
|
+
path,
|
|
733
|
+
bodyLength,
|
|
734
|
+
message: `Prisma Management API response exceeded the ${maxBodyBytes} byte safety limit`,
|
|
735
|
+
})
|
|
736
|
+
: new PrismaApiError({
|
|
737
|
+
method,
|
|
738
|
+
path,
|
|
739
|
+
status: res.status,
|
|
740
|
+
message: `Prisma Management API error response exceeded the ${maxBodyBytes} byte safety limit`,
|
|
741
|
+
});
|
|
742
|
+
const declaredLength = Number(res.headers["content-length"]);
|
|
743
|
+
if (
|
|
744
|
+
Number.isSafeInteger(declaredLength) &&
|
|
745
|
+
declaredLength > maxBodyBytes
|
|
746
|
+
) {
|
|
747
|
+
return yield* bodyTooLarge(declaredLength);
|
|
748
|
+
}
|
|
749
|
+
|
|
750
|
+
const collected = yield* Stream.runFoldEffect(
|
|
751
|
+
res.stream,
|
|
752
|
+
() => ({ chunks: [] as Uint8Array[], bytes: 0 }),
|
|
753
|
+
(state, chunk) => {
|
|
754
|
+
const bytes = state.bytes + chunk.byteLength;
|
|
755
|
+
if (bytes > maxBodyBytes) {
|
|
756
|
+
return Effect.fail(bodyTooLarge(bytes));
|
|
757
|
+
}
|
|
758
|
+
state.chunks.push(chunk);
|
|
759
|
+
state.bytes = bytes;
|
|
760
|
+
return Effect.succeed(state);
|
|
761
|
+
},
|
|
762
|
+
).pipe(
|
|
763
|
+
Effect.catch((error) => {
|
|
764
|
+
if (
|
|
765
|
+
error instanceof PrismaApiError ||
|
|
766
|
+
error instanceof PrismaApiDecodeError
|
|
767
|
+
) {
|
|
768
|
+
return Effect.fail(error);
|
|
769
|
+
}
|
|
770
|
+
if (
|
|
771
|
+
HttpClientError.isHttpClientError(error) &&
|
|
772
|
+
error.reason._tag === "EmptyBodyError"
|
|
773
|
+
) {
|
|
774
|
+
return Effect.succeed({
|
|
775
|
+
chunks: [] as Uint8Array[],
|
|
776
|
+
bytes: 0,
|
|
777
|
+
});
|
|
778
|
+
}
|
|
779
|
+
return Effect.fail(
|
|
780
|
+
new PrismaApiError({
|
|
781
|
+
method,
|
|
782
|
+
path,
|
|
783
|
+
status: 0,
|
|
784
|
+
message: `Failed to read Prisma Management API response: ${
|
|
785
|
+
error instanceof Error ? error.message : String(error)
|
|
786
|
+
}`,
|
|
787
|
+
}),
|
|
788
|
+
);
|
|
789
|
+
}),
|
|
790
|
+
);
|
|
791
|
+
const bytes = new Uint8Array(collected.bytes);
|
|
792
|
+
let offset = 0;
|
|
793
|
+
for (const chunk of collected.chunks) {
|
|
794
|
+
bytes.set(chunk, offset);
|
|
795
|
+
offset += chunk.byteLength;
|
|
796
|
+
}
|
|
797
|
+
const text = new TextDecoder().decode(bytes);
|
|
798
|
+
return { status: res.status, text, bodyLength: collected.bytes };
|
|
799
|
+
});
|
|
800
|
+
const { status, text, bodyLength } = yield* response;
|
|
801
|
+
if (status < 200 || status >= 300) {
|
|
802
|
+
return yield* new PrismaApiError({
|
|
803
|
+
method,
|
|
804
|
+
path,
|
|
805
|
+
status,
|
|
806
|
+
message: formatErrorMessage(status, text),
|
|
807
|
+
body: text.length === 0 ? undefined : Redacted.make(text),
|
|
808
|
+
});
|
|
809
|
+
}
|
|
810
|
+
if (options?.onSuccessfulBodyLength !== undefined) {
|
|
811
|
+
yield* options.onSuccessfulBodyLength(bodyLength);
|
|
812
|
+
}
|
|
813
|
+
if (status === 204 || text.length === 0) {
|
|
814
|
+
return { status, body: undefined as T };
|
|
815
|
+
}
|
|
816
|
+
const body = yield* Effect.try({
|
|
817
|
+
try: () => JSON.parse(text) as T,
|
|
818
|
+
catch: () =>
|
|
819
|
+
new PrismaApiDecodeError({
|
|
820
|
+
method,
|
|
821
|
+
path,
|
|
822
|
+
bodyLength: new TextEncoder().encode(text).byteLength,
|
|
823
|
+
message: "Prisma Management API returned invalid JSON",
|
|
824
|
+
}),
|
|
825
|
+
});
|
|
826
|
+
return { status, body };
|
|
827
|
+
}),
|
|
828
|
+
).pipe(
|
|
829
|
+
// The deadline covers the complete operation, including transient
|
|
830
|
+
// retries and streaming the response body. A per-attempt timeout would
|
|
831
|
+
// multiply the advertised deadline and can leave a hung peer tying up
|
|
832
|
+
// a deployment for every retry slot.
|
|
833
|
+
Effect.timeoutOrElse({
|
|
834
|
+
duration: options?.timeout ?? REQUEST_AND_BODY_TIMEOUT,
|
|
835
|
+
orElse: () =>
|
|
836
|
+
Effect.fail(
|
|
837
|
+
new PrismaApiError({
|
|
838
|
+
method,
|
|
839
|
+
path,
|
|
840
|
+
status: 0,
|
|
841
|
+
message:
|
|
842
|
+
options?.timeout === undefined
|
|
843
|
+
? `Prisma Management API request timed out after ${REQUEST_AND_BODY_TIMEOUT}`
|
|
844
|
+
: "Prisma Management API request timed out at the operation-specific deadline",
|
|
845
|
+
}),
|
|
846
|
+
),
|
|
847
|
+
}),
|
|
848
|
+
);
|
|
849
|
+
};
|
|
850
|
+
|
|
851
|
+
const request = <T>(
|
|
852
|
+
method: Method,
|
|
853
|
+
path: string,
|
|
854
|
+
options?: RequestOptions,
|
|
855
|
+
): Effect.Effect<T, PrismaApiError | PrismaApiDecodeError> =>
|
|
856
|
+
requestWithStatus<T>(method, path, options).pipe(
|
|
857
|
+
Effect.map(({ body }) => body),
|
|
858
|
+
);
|
|
859
|
+
|
|
860
|
+
const dataWithStatus = <T>(
|
|
861
|
+
method: Method,
|
|
862
|
+
path: string,
|
|
863
|
+
options?: RequestOptions,
|
|
864
|
+
) =>
|
|
865
|
+
requestWithStatus<unknown>(method, path, options).pipe(
|
|
866
|
+
Effect.flatMap(({ status, body: response }) =>
|
|
867
|
+
response !== null &&
|
|
868
|
+
typeof response === "object" &&
|
|
869
|
+
Object.hasOwn(response, "data")
|
|
870
|
+
? Effect.succeed({
|
|
871
|
+
status,
|
|
872
|
+
data: requestBody(response as DataResponse<T>),
|
|
873
|
+
})
|
|
874
|
+
: Effect.fail(
|
|
875
|
+
new PrismaApiDecodeError({
|
|
876
|
+
method,
|
|
877
|
+
path,
|
|
878
|
+
bodyLength: 0,
|
|
879
|
+
message:
|
|
880
|
+
"Prisma Management API response did not contain a data envelope",
|
|
881
|
+
}),
|
|
882
|
+
),
|
|
883
|
+
),
|
|
884
|
+
);
|
|
885
|
+
|
|
886
|
+
const data = <T>(method: Method, path: string, options?: RequestOptions) =>
|
|
887
|
+
dataWithStatus<T>(method, path, options).pipe(
|
|
888
|
+
Effect.map(({ data }) => data),
|
|
889
|
+
);
|
|
890
|
+
|
|
891
|
+
const list = <T>(
|
|
892
|
+
path: string,
|
|
893
|
+
query?: object,
|
|
894
|
+
onSuccessfulBodyLength?: RequestOptions["onSuccessfulBodyLength"],
|
|
895
|
+
) =>
|
|
896
|
+
request<ListResponse<T>>("GET", path, {
|
|
897
|
+
query,
|
|
898
|
+
onSuccessfulBodyLength,
|
|
899
|
+
});
|
|
900
|
+
|
|
901
|
+
const paginate = <T>(path: string, query?: object) =>
|
|
902
|
+
Effect.suspend(() => {
|
|
903
|
+
let observedPages = 0;
|
|
904
|
+
let observedItems = 0;
|
|
905
|
+
let observedBodyBytes = 0;
|
|
906
|
+
let observedCursor = false;
|
|
907
|
+
return Effect.gen(function* () {
|
|
908
|
+
const items: T[] = [];
|
|
909
|
+
const queryRecord = query as { cursor?: unknown } | undefined;
|
|
910
|
+
let cursor =
|
|
911
|
+
typeof queryRecord?.cursor === "string"
|
|
912
|
+
? queryRecord.cursor
|
|
913
|
+
: undefined;
|
|
914
|
+
const seenCursors = new Set<string>();
|
|
915
|
+
if (cursor !== undefined) seenCursors.add(cursor);
|
|
916
|
+
observedCursor = cursor !== undefined;
|
|
917
|
+
|
|
918
|
+
const protocolError = (message: string) =>
|
|
919
|
+
new PrismaApiDecodeError({
|
|
920
|
+
method: "GET",
|
|
921
|
+
path,
|
|
922
|
+
bodyLength: 0,
|
|
923
|
+
message: `Invalid Prisma Management API pagination response: ${message}`,
|
|
924
|
+
});
|
|
925
|
+
const accountForBody = (bodyLength: number) => {
|
|
926
|
+
const aggregateBodyLength = observedBodyBytes + bodyLength;
|
|
927
|
+
if (aggregateBodyLength > MAX_PAGINATION_BODY_BYTES) {
|
|
928
|
+
return Effect.fail(
|
|
929
|
+
new PrismaApiDecodeError({
|
|
930
|
+
method: "GET",
|
|
931
|
+
path,
|
|
932
|
+
bodyLength: aggregateBodyLength,
|
|
933
|
+
message: `Invalid Prisma Management API pagination response: exceeded the ${MAX_PAGINATION_BODY_BYTES} aggregate response byte safety limit`,
|
|
934
|
+
}),
|
|
935
|
+
);
|
|
936
|
+
}
|
|
937
|
+
observedBodyBytes = aggregateBodyLength;
|
|
938
|
+
return Effect.void;
|
|
939
|
+
};
|
|
940
|
+
|
|
941
|
+
while (true) {
|
|
942
|
+
if (observedPages >= MAX_PAGINATION_PAGES) {
|
|
943
|
+
return yield* protocolError(
|
|
944
|
+
`exceeded the ${MAX_PAGINATION_PAGES} page safety limit`,
|
|
945
|
+
);
|
|
946
|
+
}
|
|
947
|
+
const page = yield* list<T>(
|
|
948
|
+
path,
|
|
949
|
+
{ ...query, cursor },
|
|
950
|
+
accountForBody,
|
|
951
|
+
);
|
|
952
|
+
observedPages += 1;
|
|
953
|
+
|
|
954
|
+
if (
|
|
955
|
+
page === null ||
|
|
956
|
+
typeof page !== "object" ||
|
|
957
|
+
!Array.isArray(page.data) ||
|
|
958
|
+
page.pagination === null ||
|
|
959
|
+
typeof page.pagination !== "object" ||
|
|
960
|
+
typeof page.pagination.hasMore !== "boolean"
|
|
961
|
+
) {
|
|
962
|
+
return yield* protocolError(
|
|
963
|
+
"expected data[] and pagination.hasMore",
|
|
964
|
+
);
|
|
965
|
+
}
|
|
966
|
+
if (page.data.length > MAX_PAGINATION_ITEMS - items.length) {
|
|
967
|
+
return yield* protocolError(
|
|
968
|
+
`exceeded the ${MAX_PAGINATION_ITEMS} item safety limit`,
|
|
969
|
+
);
|
|
970
|
+
}
|
|
971
|
+
items.push(...page.data);
|
|
972
|
+
observedItems = items.length;
|
|
973
|
+
|
|
974
|
+
if (!page.pagination.hasMore) return items;
|
|
975
|
+
const nextCursor = page.pagination.nextCursor;
|
|
976
|
+
if (typeof nextCursor !== "string" || nextCursor.length === 0) {
|
|
977
|
+
return yield* protocolError(
|
|
978
|
+
"hasMore was true without a non-empty nextCursor",
|
|
979
|
+
);
|
|
980
|
+
}
|
|
981
|
+
if (seenCursors.has(nextCursor)) {
|
|
982
|
+
return yield* protocolError("nextCursor repeated");
|
|
983
|
+
}
|
|
984
|
+
seenCursors.add(nextCursor);
|
|
985
|
+
cursor = nextCursor;
|
|
986
|
+
observedCursor = true;
|
|
987
|
+
}
|
|
988
|
+
}).pipe(
|
|
989
|
+
Effect.timeoutOrElse({
|
|
990
|
+
duration: PAGINATION_TIMEOUT,
|
|
991
|
+
orElse: () =>
|
|
992
|
+
Effect.fail(
|
|
993
|
+
new PrismaApiError({
|
|
994
|
+
method: "GET",
|
|
995
|
+
path,
|
|
996
|
+
status: 0,
|
|
997
|
+
message: `Prisma Management API pagination timed out after ${PAGINATION_TIMEOUT} (${observedPages} pages, ${observedItems} items, ${observedBodyBytes} response bytes, cursor ${observedCursor ? "present" : "absent"})`,
|
|
998
|
+
}),
|
|
999
|
+
),
|
|
1000
|
+
}),
|
|
1001
|
+
);
|
|
1002
|
+
});
|
|
1003
|
+
|
|
1004
|
+
const service = {
|
|
1005
|
+
listWorkspaces: (query) => paginate<Workspace>("/v1/workspaces", query),
|
|
1006
|
+
getWorkspace: (id) =>
|
|
1007
|
+
data<Workspace>("GET", `/v1/workspaces/${pathSegment(id)}`),
|
|
1008
|
+
getCurrentPrincipal: () => data<CurrentPrincipal>("GET", "/v1/me"),
|
|
1009
|
+
listRegions: (query) => data<Region[]>("GET", "/v1/regions", { query }),
|
|
1010
|
+
listPostgresRegions: () =>
|
|
1011
|
+
data<PostgresRegion[]>("GET", "/v1/regions/postgres"),
|
|
1012
|
+
listAccelerateRegions: () =>
|
|
1013
|
+
data<AccelerateRegion[]>("GET", "/v1/regions/accelerate"),
|
|
1014
|
+
|
|
1015
|
+
listProjects: (query) => paginate<Project>("/v1/projects", query),
|
|
1016
|
+
getProject: (id) =>
|
|
1017
|
+
data<Project>("GET", `/v1/projects/${pathSegment(id)}`),
|
|
1018
|
+
createProject: (input) =>
|
|
1019
|
+
data<ProjectCreateResult>("POST", "/v1/projects", {
|
|
1020
|
+
body: input,
|
|
1021
|
+
timeout: PROVISIONING_REQUEST_TIMEOUT,
|
|
1022
|
+
}),
|
|
1023
|
+
updateProject: (id, input) =>
|
|
1024
|
+
data<Project>("PATCH", `/v1/projects/${pathSegment(id)}`, {
|
|
1025
|
+
body: input,
|
|
1026
|
+
}),
|
|
1027
|
+
deleteProject: (id) =>
|
|
1028
|
+
request<void>("DELETE", `/v1/projects/${pathSegment(id)}`, {
|
|
1029
|
+
timeout: PROVISIONING_REQUEST_TIMEOUT,
|
|
1030
|
+
}),
|
|
1031
|
+
transferProject: (id, input) =>
|
|
1032
|
+
request<void>("POST", `/v1/projects/${pathSegment(id)}/transfer`, {
|
|
1033
|
+
body: input,
|
|
1034
|
+
}),
|
|
1035
|
+
|
|
1036
|
+
listDatabases: (query) => paginate<Database>("/v1/databases", query),
|
|
1037
|
+
listProjectDatabases: (projectId, query) =>
|
|
1038
|
+
paginate<Database>(
|
|
1039
|
+
`/v1/projects/${pathSegment(projectId)}/databases`,
|
|
1040
|
+
query,
|
|
1041
|
+
),
|
|
1042
|
+
getDatabase: (id) =>
|
|
1043
|
+
data<Database>("GET", `/v1/databases/${pathSegment(id)}`),
|
|
1044
|
+
createDatabase: (input) =>
|
|
1045
|
+
data<DatabaseCreateResult>("POST", "/v1/databases", {
|
|
1046
|
+
body: input,
|
|
1047
|
+
timeout: PROVISIONING_REQUEST_TIMEOUT,
|
|
1048
|
+
}),
|
|
1049
|
+
createProjectDatabase: (projectId, input) =>
|
|
1050
|
+
data<ProjectDatabaseCreateResult>(
|
|
1051
|
+
"POST",
|
|
1052
|
+
`/v1/projects/${pathSegment(projectId)}/databases`,
|
|
1053
|
+
{ body: input, timeout: PROVISIONING_REQUEST_TIMEOUT },
|
|
1054
|
+
),
|
|
1055
|
+
updateDatabase: (id, input) =>
|
|
1056
|
+
data<Database>("PATCH", `/v1/databases/${pathSegment(id)}`, {
|
|
1057
|
+
body: input,
|
|
1058
|
+
}),
|
|
1059
|
+
deleteDatabase: (id) =>
|
|
1060
|
+
request<void>("DELETE", `/v1/databases/${pathSegment(id)}`, {
|
|
1061
|
+
timeout: PROVISIONING_REQUEST_TIMEOUT,
|
|
1062
|
+
}),
|
|
1063
|
+
listBackups: (databaseId, query) =>
|
|
1064
|
+
request<BackupListResponse>(
|
|
1065
|
+
"GET",
|
|
1066
|
+
`/v1/databases/${pathSegment(databaseId)}/backups`,
|
|
1067
|
+
{ query },
|
|
1068
|
+
),
|
|
1069
|
+
restoreDatabase: (targetDatabaseId, input) =>
|
|
1070
|
+
data<RestoredDatabase>(
|
|
1071
|
+
"POST",
|
|
1072
|
+
`/v1/databases/${pathSegment(targetDatabaseId)}/restore`,
|
|
1073
|
+
{ body: input, timeout: PROVISIONING_REQUEST_TIMEOUT },
|
|
1074
|
+
),
|
|
1075
|
+
getDatabaseUsage: (databaseId, query) =>
|
|
1076
|
+
request<DatabaseUsage>(
|
|
1077
|
+
"GET",
|
|
1078
|
+
`/v1/databases/${pathSegment(databaseId)}/usage`,
|
|
1079
|
+
{ query },
|
|
1080
|
+
),
|
|
1081
|
+
|
|
1082
|
+
listConnections: (query) =>
|
|
1083
|
+
paginate<DatabaseConnection>("/v1/connections", query),
|
|
1084
|
+
listDatabaseConnections: (databaseId, query) =>
|
|
1085
|
+
paginate<DatabaseConnection>(
|
|
1086
|
+
`/v1/databases/${pathSegment(databaseId)}/connections`,
|
|
1087
|
+
query,
|
|
1088
|
+
),
|
|
1089
|
+
getConnection: (id) =>
|
|
1090
|
+
data<DatabaseConnection>("GET", `/v1/connections/${pathSegment(id)}`),
|
|
1091
|
+
createConnection: (input) =>
|
|
1092
|
+
data<DatabaseConnectionWithSecrets>("POST", "/v1/connections", {
|
|
1093
|
+
body: input,
|
|
1094
|
+
}),
|
|
1095
|
+
createDatabaseConnection: (databaseId, input) =>
|
|
1096
|
+
data<DatabaseConnectionWithSecrets>(
|
|
1097
|
+
"POST",
|
|
1098
|
+
`/v1/databases/${pathSegment(databaseId)}/connections`,
|
|
1099
|
+
{ body: input },
|
|
1100
|
+
),
|
|
1101
|
+
deleteConnection: (id) =>
|
|
1102
|
+
request<void>("DELETE", `/v1/connections/${pathSegment(id)}`),
|
|
1103
|
+
rotateConnection: (id) =>
|
|
1104
|
+
data<DatabaseConnectionWithSecrets>(
|
|
1105
|
+
"POST",
|
|
1106
|
+
`/v1/connections/${pathSegment(id)}/rotate`,
|
|
1107
|
+
),
|
|
1108
|
+
|
|
1109
|
+
listBranches: (projectId, query) =>
|
|
1110
|
+
paginate<Branch>(
|
|
1111
|
+
`/v1/projects/${pathSegment(projectId)}/branches`,
|
|
1112
|
+
query,
|
|
1113
|
+
),
|
|
1114
|
+
getBranch: (id) => data<Branch>("GET", `/v1/branches/${pathSegment(id)}`),
|
|
1115
|
+
createBranch: (projectId, input) =>
|
|
1116
|
+
data<Branch>(
|
|
1117
|
+
"POST",
|
|
1118
|
+
`/v1/projects/${pathSegment(projectId)}/branches`,
|
|
1119
|
+
{
|
|
1120
|
+
body: input,
|
|
1121
|
+
},
|
|
1122
|
+
),
|
|
1123
|
+
updateBranch: (id, input) =>
|
|
1124
|
+
data<Branch>("PATCH", `/v1/branches/${pathSegment(id)}`, {
|
|
1125
|
+
body: input,
|
|
1126
|
+
}),
|
|
1127
|
+
deleteBranch: (id) =>
|
|
1128
|
+
request<void>("DELETE", `/v1/branches/${pathSegment(id)}`),
|
|
1129
|
+
|
|
1130
|
+
getCustomDomain: (id) =>
|
|
1131
|
+
data<CustomDomain>("GET", `/v1/domains/${pathSegment(id)}`),
|
|
1132
|
+
deleteCustomDomain: (id) =>
|
|
1133
|
+
request<void>("DELETE", `/v1/domains/${pathSegment(id)}`),
|
|
1134
|
+
retryCustomDomain: (id) =>
|
|
1135
|
+
data<CustomDomain>("POST", `/v1/domains/${pathSegment(id)}/retry`),
|
|
1136
|
+
|
|
1137
|
+
listApps: (query) => paginate<App>("/v1/apps", query),
|
|
1138
|
+
getApp: (id) => data<App>("GET", `/v1/apps/${pathSegment(id)}`),
|
|
1139
|
+
createApp: (input) =>
|
|
1140
|
+
data<App>("POST", "/v1/apps", {
|
|
1141
|
+
body: input,
|
|
1142
|
+
timeout: PROVISIONING_REQUEST_TIMEOUT,
|
|
1143
|
+
}),
|
|
1144
|
+
updateApp: (id, input) =>
|
|
1145
|
+
data<App>("PATCH", `/v1/apps/${pathSegment(id)}`, { body: input }),
|
|
1146
|
+
deleteApp: (id) =>
|
|
1147
|
+
request<void>("DELETE", `/v1/apps/${pathSegment(id)}`, {
|
|
1148
|
+
timeout: PROVISIONING_REQUEST_TIMEOUT,
|
|
1149
|
+
}),
|
|
1150
|
+
promoteApp: (id, target) =>
|
|
1151
|
+
data<PromoteAppResult>("POST", `/v1/apps/${pathSegment(id)}/promote`, {
|
|
1152
|
+
body: target,
|
|
1153
|
+
}),
|
|
1154
|
+
rollbackApp: (id, target) =>
|
|
1155
|
+
data<RollbackAppResult>(
|
|
1156
|
+
"POST",
|
|
1157
|
+
`/v1/apps/${pathSegment(id)}/rollback`,
|
|
1158
|
+
{
|
|
1159
|
+
body: target,
|
|
1160
|
+
timeout: ROLLBACK_REQUEST_TIMEOUT,
|
|
1161
|
+
},
|
|
1162
|
+
),
|
|
1163
|
+
listAppDomains: (appId) =>
|
|
1164
|
+
paginate<CustomDomain>(`/v1/apps/${pathSegment(appId)}/domains`),
|
|
1165
|
+
createAppDomain: (appId, input) => {
|
|
1166
|
+
const path = `/v1/apps/${pathSegment(appId)}/domains`;
|
|
1167
|
+
return dataWithStatus<CustomDomain>("POST", path, {
|
|
1168
|
+
body: input,
|
|
1169
|
+
}).pipe(
|
|
1170
|
+
Effect.flatMap(({ status, data: domain }) =>
|
|
1171
|
+
status === 200 || status === 201
|
|
1172
|
+
? Effect.succeed({ status, domain })
|
|
1173
|
+
: Effect.fail(
|
|
1174
|
+
new PrismaApiDecodeError({
|
|
1175
|
+
method: "POST",
|
|
1176
|
+
path,
|
|
1177
|
+
bodyLength: 0,
|
|
1178
|
+
message: `Prisma Management API returned unexpected HTTP ${status} for custom-domain creation`,
|
|
1179
|
+
}),
|
|
1180
|
+
),
|
|
1181
|
+
),
|
|
1182
|
+
);
|
|
1183
|
+
},
|
|
1184
|
+
listAppDeployments: (appId, query) =>
|
|
1185
|
+
paginate<DeploymentListItem>(
|
|
1186
|
+
`/v1/apps/${pathSegment(appId)}/deployments`,
|
|
1187
|
+
query,
|
|
1188
|
+
),
|
|
1189
|
+
createAppDeployment: (appId, input) =>
|
|
1190
|
+
data<DeploymentCreateResult>(
|
|
1191
|
+
"POST",
|
|
1192
|
+
`/v1/apps/${pathSegment(appId)}/deployments`,
|
|
1193
|
+
input === undefined ? undefined : { body: input },
|
|
1194
|
+
),
|
|
1195
|
+
getDeployment: (id) =>
|
|
1196
|
+
data<Deployment>("GET", `/v1/deployments/${pathSegment(id)}`),
|
|
1197
|
+
deleteDeployment: (id) =>
|
|
1198
|
+
request<void>("DELETE", `/v1/deployments/${pathSegment(id)}`),
|
|
1199
|
+
startDeployment: (id) =>
|
|
1200
|
+
data<StartDeploymentResult>(
|
|
1201
|
+
"POST",
|
|
1202
|
+
`/v1/deployments/${pathSegment(id)}/start`,
|
|
1203
|
+
),
|
|
1204
|
+
stopDeployment: (id) =>
|
|
1205
|
+
request<void>("POST", `/v1/deployments/${pathSegment(id)}/stop`),
|
|
1206
|
+
getDeploymentLogsRequest: (id, query) =>
|
|
1207
|
+
buildWebSocketUrl(
|
|
1208
|
+
`/v1/deployments/${pathSegment(id)}/logs`,
|
|
1209
|
+
logsQuery(query),
|
|
1210
|
+
).pipe(
|
|
1211
|
+
Effect.map(
|
|
1212
|
+
(url): DeploymentLogsRequest => ({
|
|
1213
|
+
url,
|
|
1214
|
+
headers: {
|
|
1215
|
+
Authorization: Redacted.make(
|
|
1216
|
+
`Bearer ${Redacted.value(env.serviceToken)}`,
|
|
1217
|
+
),
|
|
1218
|
+
},
|
|
1219
|
+
}),
|
|
1220
|
+
),
|
|
1221
|
+
),
|
|
1222
|
+
getBuildLogsRequest: (buildId, query) =>
|
|
1223
|
+
buildUrl(`/v1/builds/${pathSegment(buildId)}/logs`, query).pipe(
|
|
1224
|
+
Effect.map(
|
|
1225
|
+
(url): BuildLogsRequest => ({
|
|
1226
|
+
url,
|
|
1227
|
+
headers: {
|
|
1228
|
+
Authorization: Redacted.make(
|
|
1229
|
+
`Bearer ${Redacted.value(env.serviceToken)}`,
|
|
1230
|
+
),
|
|
1231
|
+
Accept: "application/x-ndjson",
|
|
1232
|
+
},
|
|
1233
|
+
}),
|
|
1234
|
+
),
|
|
1235
|
+
),
|
|
1236
|
+
|
|
1237
|
+
listEnvironmentVariables: (query) =>
|
|
1238
|
+
paginate<EnvironmentVariable>("/v1/environment-variables", query),
|
|
1239
|
+
getEnvironmentVariable: (id) =>
|
|
1240
|
+
data<EnvironmentVariable>(
|
|
1241
|
+
"GET",
|
|
1242
|
+
`/v1/environment-variables/${pathSegment(id)}`,
|
|
1243
|
+
),
|
|
1244
|
+
createEnvironmentVariable: (input) =>
|
|
1245
|
+
data<EnvironmentVariable>("POST", "/v1/environment-variables", {
|
|
1246
|
+
body: input,
|
|
1247
|
+
}),
|
|
1248
|
+
updateEnvironmentVariable: (id, input) =>
|
|
1249
|
+
data<EnvironmentVariable>(
|
|
1250
|
+
"PATCH",
|
|
1251
|
+
`/v1/environment-variables/${pathSegment(id)}`,
|
|
1252
|
+
{ body: input },
|
|
1253
|
+
),
|
|
1254
|
+
deleteEnvironmentVariable: (id) =>
|
|
1255
|
+
request<void>("DELETE", `/v1/environment-variables/${pathSegment(id)}`),
|
|
1256
|
+
|
|
1257
|
+
listIntegrations: (query) =>
|
|
1258
|
+
paginate<Integration>("/v1/integrations", query),
|
|
1259
|
+
listWorkspaceIntegrations: (workspaceId, query) =>
|
|
1260
|
+
paginate<Integration>(
|
|
1261
|
+
`/v1/workspaces/${pathSegment(workspaceId)}/integrations`,
|
|
1262
|
+
query,
|
|
1263
|
+
),
|
|
1264
|
+
getIntegration: (id) =>
|
|
1265
|
+
data<Integration>("GET", `/v1/integrations/${pathSegment(id)}`),
|
|
1266
|
+
deleteIntegration: (id) =>
|
|
1267
|
+
request<void>("DELETE", `/v1/integrations/${pathSegment(id)}`),
|
|
1268
|
+
revokeWorkspaceIntegration: (workspaceId, clientId) =>
|
|
1269
|
+
request<void>(
|
|
1270
|
+
"DELETE",
|
|
1271
|
+
`/v1/workspaces/${pathSegment(workspaceId)}/integrations/${pathSegment(clientId)}`,
|
|
1272
|
+
),
|
|
1273
|
+
|
|
1274
|
+
listScmInstallations: (query) =>
|
|
1275
|
+
paginate<ScmInstallation>("/v1/scm-installations", query),
|
|
1276
|
+
createScmInstallIntent: (input) =>
|
|
1277
|
+
data<ScmInstallIntent>(
|
|
1278
|
+
"POST",
|
|
1279
|
+
"/v1/scm-installations/install-intents",
|
|
1280
|
+
{
|
|
1281
|
+
body: input,
|
|
1282
|
+
},
|
|
1283
|
+
),
|
|
1284
|
+
listScmInstallationRepositories: (installationId, query) =>
|
|
1285
|
+
paginate<ScmRepository>(
|
|
1286
|
+
`/v1/scm-installations/${pathSegment(installationId)}/repositories`,
|
|
1287
|
+
query,
|
|
1288
|
+
),
|
|
1289
|
+
|
|
1290
|
+
listSourceRepositories: (query) =>
|
|
1291
|
+
paginate<SourceRepository>("/v1/source-repositories", query),
|
|
1292
|
+
getSourceRepository: (id) =>
|
|
1293
|
+
data<SourceRepository>(
|
|
1294
|
+
"GET",
|
|
1295
|
+
`/v1/source-repositories/${pathSegment(id)}`,
|
|
1296
|
+
),
|
|
1297
|
+
createSourceRepository: (input) =>
|
|
1298
|
+
data<SourceRepository>("POST", "/v1/source-repositories", {
|
|
1299
|
+
body: input,
|
|
1300
|
+
}),
|
|
1301
|
+
deleteSourceRepository: (id) =>
|
|
1302
|
+
request<void>("DELETE", `/v1/source-repositories/${pathSegment(id)}`),
|
|
1303
|
+
} satisfies PrismaManagementClient;
|
|
1304
|
+
return service;
|
|
1305
|
+
});
|
|
1306
|
+
}
|
|
1307
|
+
|
|
1308
|
+
const SAFE_ERROR_CODE = /^[a-zA-Z0-9][a-zA-Z0-9:._-]{0,127}$/;
|
|
1309
|
+
|
|
1310
|
+
const parseErrorCode = (body: string): string | undefined => {
|
|
1311
|
+
if (body.length === 0) return undefined;
|
|
1312
|
+
try {
|
|
1313
|
+
const json = JSON.parse(body) as {
|
|
1314
|
+
code?: unknown;
|
|
1315
|
+
error?: unknown;
|
|
1316
|
+
};
|
|
1317
|
+
const nested =
|
|
1318
|
+
json.error !== null && typeof json.error === "object"
|
|
1319
|
+
? (json.error as { code?: unknown }).code
|
|
1320
|
+
: undefined;
|
|
1321
|
+
const code = json.code ?? nested;
|
|
1322
|
+
return typeof code === "string" && SAFE_ERROR_CODE.test(code)
|
|
1323
|
+
? code
|
|
1324
|
+
: undefined;
|
|
1325
|
+
} catch {
|
|
1326
|
+
return undefined;
|
|
1327
|
+
}
|
|
1328
|
+
};
|
|
1329
|
+
|
|
1330
|
+
const formatErrorMessage = (status: number, body: string): string => {
|
|
1331
|
+
const code = parseErrorCode(body);
|
|
1332
|
+
return code === undefined
|
|
1333
|
+
? `HTTP ${status}`
|
|
1334
|
+
: `Prisma Management API request failed (${code})`;
|
|
1335
|
+
};
|
|
1336
|
+
|
|
1337
|
+
export const PrismaClientLive = Layer.effect(PrismaClient, makePrismaClient());
|