alchemy 2.0.0-beta.65 → 2.0.0-beta.67
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 +578 -224
- 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/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 +132 -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/Deployment.d.ts.map +1 -1
- package/lib/AWS/EKS/Deployment.js +10 -2
- package/lib/AWS/EKS/Deployment.js.map +1 -1
- package/lib/AWS/EKS/Job.d.ts.map +1 -1
- package/lib/AWS/EKS/Job.js +10 -2
- package/lib/AWS/EKS/Job.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 +67 -29
- 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 +6 -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/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 +1 -1
- package/lib/Bundle/PurePlugin.d.ts.map +1 -1
- package/lib/Bundle/PurePlugin.js +15 -7
- 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/_shared.d.ts.map +1 -1
- package/lib/Cli/commands/_shared.js +2 -1
- package/lib/Cli/commands/_shared.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/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/DNS/Record.d.ts +3 -1
- package/lib/Cloudflare/DNS/Record.d.ts.map +1 -1
- package/lib/Cloudflare/DNS/Record.js +23 -4
- package/lib/Cloudflare/DNS/Record.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 +31 -2
- 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/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 +483 -298
- package/lib/Cloudflare/Workers/LocalWorkerProvider.js.map +1 -1
- package/lib/Cloudflare/Workers/Worker.d.ts +612 -13
- package/lib/Cloudflare/Workers/Worker.d.ts.map +1 -1
- package/lib/Cloudflare/Workers/Worker.js +222 -1
- 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.map +1 -1
- package/lib/Cloudflare/Workers/WorkerBundle.js +4 -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 +1765 -236
- package/lib/Cloudflare/Workers/WorkerProvider.js.map +1 -1
- package/lib/Cloudflare/Workflows/WorkflowBridge.d.ts +7 -1
- package/lib/Cloudflare/Workflows/WorkflowBridge.d.ts.map +1 -1
- package/lib/Cloudflare/Workflows/WorkflowBridge.js +14 -4
- package/lib/Cloudflare/Workflows/WorkflowBridge.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 +15 -1
- package/lib/Docker/Container.d.ts.map +1 -1
- package/lib/Docker/Container.js +34 -11
- 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 +190 -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/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 +93 -0
- package/lib/Prisma/App.d.ts.map +1 -0
- package/lib/Prisma/App.js +251 -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 +96 -0
- package/lib/Prisma/Branch.d.ts.map +1 -0
- package/lib/Prisma/Branch.js +236 -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 +585 -0
- package/lib/Prisma/Compute.d.ts.map +1 -0
- package/lib/Prisma/Compute.js +1545 -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 +122 -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 +219 -0
- package/lib/Prisma/Connection.d.ts.map +1 -0
- package/lib/Prisma/Connection.js +360 -0
- package/lib/Prisma/Connection.js.map +1 -0
- package/lib/Prisma/CustomDomain.d.ts +91 -0
- package/lib/Prisma/CustomDomain.d.ts.map +1 -0
- package/lib/Prisma/CustomDomain.js +184 -0
- package/lib/Prisma/CustomDomain.js.map +1 -0
- package/lib/Prisma/Database.d.ts +222 -0
- package/lib/Prisma/Database.d.ts.map +1 -0
- package/lib/Prisma/Database.js +418 -0
- package/lib/Prisma/Database.js.map +1 -0
- package/lib/Prisma/Deployment.d.ts +141 -0
- package/lib/Prisma/Deployment.d.ts.map +1 -0
- package/lib/Prisma/Deployment.js +353 -0
- package/lib/Prisma/Deployment.js.map +1 -0
- package/lib/Prisma/EnvironmentVariable.d.ts +105 -0
- package/lib/Prisma/EnvironmentVariable.d.ts.map +1 -0
- package/lib/Prisma/EnvironmentVariable.js +229 -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 +25 -0
- package/lib/Prisma/Postgres.d.ts.map +1 -0
- package/lib/Prisma/Postgres.js +24 -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 +123 -0
- package/lib/Prisma/Project.d.ts.map +1 -0
- package/lib/Prisma/Project.js +366 -0
- package/lib/Prisma/Project.js.map +1 -0
- package/lib/Prisma/Providers.d.ts +63 -0
- package/lib/Prisma/Providers.d.ts.map +1 -0
- package/lib/Prisma/Providers.js +306 -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 +127 -0
- package/lib/Prisma/SourceRepository.d.ts.map +1 -0
- package/lib/Prisma/SourceRepository.js +239 -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 +57 -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/Resource.d.ts +8 -0
- 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/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/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.map +1 -1
- package/lib/Test/Alchemy.js +3 -1
- 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/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/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 +46 -13
- 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/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/Deployment.ts +10 -2
- package/src/AWS/EKS/Job.ts +10 -2
- package/src/AWS/Lambda/Function.ts +101 -43
- 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 +10 -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/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 +19 -9
- package/src/Cli/checkVersion.ts +102 -16
- package/src/Cli/commands/_shared.ts +2 -0
- package/src/Cli/commands/deploy.ts +3 -14
- package/src/Cli/commands/logs.ts +6 -1
- 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 +169 -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/DNS/Record.ts +30 -4
- 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/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 +619 -401
- package/src/Cloudflare/Workers/Worker.ts +676 -28
- 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 +6 -1
- package/src/Cloudflare/Workers/WorkerProvider.ts +2269 -277
- package/src/Cloudflare/Workflows/WorkflowBridge.ts +31 -13
- 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 +55 -15
- package/src/Docker/Context.ts +236 -0
- package/src/Docker/Docker.ts +393 -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/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 +433 -0
- package/src/Prisma/AuthProvider.ts +260 -0
- package/src/Prisma/Branch.ts +417 -0
- package/src/Prisma/Client.ts +1337 -0
- package/src/Prisma/Compute.ts +2878 -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 +433 -0
- package/src/Prisma/Connection.ts +643 -0
- package/src/Prisma/CustomDomain.ts +373 -0
- package/src/Prisma/Database.ts +850 -0
- package/src/Prisma/Deployment.ts +661 -0
- package/src/Prisma/EnvironmentVariable.ts +417 -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 +25 -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 +687 -0
- package/src/Prisma/Providers.ts +471 -0
- package/src/Prisma/Refs.ts +69 -0
- package/src/Prisma/SourceRepository.ts +455 -0
- package/src/Prisma/Types.ts +611 -0
- package/src/Prisma/index.ts +24 -0
- package/src/Provider.ts +155 -39
- package/src/ProviderMode.ts +123 -0
- package/src/Resource.ts +46 -0
- package/src/RuntimeContext.ts +7 -0
- 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 +3 -1
- package/src/Test/Core.ts +1 -8
- package/src/Util/Clank.ts +37 -11
- package/src/Util/zip.ts +39 -0
- package/src/index.ts +3 -0
package/bin/exec.js
CHANGED
|
@@ -392,14 +392,15 @@ var init_FQN = __esm({ "lib/FQN.js": (() => {
|
|
|
392
392
|
|
|
393
393
|
//#endregion
|
|
394
394
|
//#region lib/Provider.js
|
|
395
|
-
var Provider, isProviderCollectionService, isProviderService, findProviderByType, MissingProviderError, missingProviderError, tryFindProviderByType;
|
|
395
|
+
var Provider, isProviderCollectionService, isProviderService, providerForMode, findProviderByType, MissingProviderError, missingProviderError, tryFindProviderByType;
|
|
396
396
|
var init_Provider = __esm({ "lib/Provider.js": (() => {
|
|
397
397
|
Provider = (type) => EffectContext.Service()(type);
|
|
398
398
|
isProviderCollectionService = (value) => {
|
|
399
399
|
return typeof value === "object" && value !== null && "kind" in value && value.kind === "ProviderCollection";
|
|
400
400
|
};
|
|
401
401
|
isProviderService = (value) => typeof value === "object" && value !== null && "reconcile" in value && typeof value.reconcile === "function" && "delete" in value && typeof value.delete === "function";
|
|
402
|
-
|
|
402
|
+
providerForMode = (service, mode) => mode !== void 0 && service.modes !== void 0 ? service.modes[mode] : Effect.succeed(service);
|
|
403
|
+
findProviderByType = ((type, mode) => tryFindProviderByType(type, mode).pipe(Effect.flatMap(Option.match({
|
|
403
404
|
onNone: () => Effect.die(`Provider not found for ${type}`),
|
|
404
405
|
onSome: (provider) => Effect.succeed(provider)
|
|
405
406
|
}))));
|
|
@@ -409,19 +410,39 @@ var init_Provider = __esm({ "lib/Provider.js": (() => {
|
|
|
409
410
|
resourceType,
|
|
410
411
|
fqn
|
|
411
412
|
});
|
|
412
|
-
tryFindProviderByType = Effect.fn(function* (resourceType) {
|
|
413
|
-
const
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
const
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
for (const
|
|
423
|
-
|
|
424
|
-
|
|
413
|
+
tryFindProviderByType = Effect.fn(function* (resourceType, mode) {
|
|
414
|
+
const found = yield* Effect.gen(function* () {
|
|
415
|
+
const Tag = Provider(resourceType);
|
|
416
|
+
const direct = yield* Effect.serviceOption(Tag);
|
|
417
|
+
if (Option.isSome(direct)) return direct;
|
|
418
|
+
const context = yield* Effect.context();
|
|
419
|
+
for (const value of context.mapUnsafe.values()) if (isProviderCollectionService(value)) {
|
|
420
|
+
const provider = value.get(resourceType);
|
|
421
|
+
if (provider) return Option.some(provider);
|
|
422
|
+
}
|
|
423
|
+
for (const value of context.mapUnsafe.values()) if (isProviderCollectionService(value)) {
|
|
424
|
+
for (const provider of Object.values(value.providers)) if (provider.aliases?.includes(resourceType)) return Option.some(provider);
|
|
425
|
+
} else if (isProviderService(value) && value.aliases?.includes(resourceType)) return Option.some(value);
|
|
426
|
+
return Option.none();
|
|
427
|
+
});
|
|
428
|
+
if (Option.isNone(found)) return found;
|
|
429
|
+
return Option.some(yield* providerForMode(found.value, mode));
|
|
430
|
+
});
|
|
431
|
+
}) });
|
|
432
|
+
|
|
433
|
+
//#endregion
|
|
434
|
+
//#region lib/ProviderMode.js
|
|
435
|
+
var ProviderModePolicy, defaultProviderMode;
|
|
436
|
+
var init_ProviderMode = __esm({ "lib/ProviderMode.js": (() => {
|
|
437
|
+
init_AlchemyContext();
|
|
438
|
+
ProviderModePolicy = EffectContext.Reference("ProviderModePolicy", { defaultValue: () => void 0 });
|
|
439
|
+
defaultProviderMode = Effect.gen(function* () {
|
|
440
|
+
if (yield* ProviderModePolicy) return "live";
|
|
441
|
+
const ctx = yield* Effect.serviceOption(AlchemyContext);
|
|
442
|
+
return Option.match(ctx, {
|
|
443
|
+
onNone: () => "live",
|
|
444
|
+
onSome: (c$1) => c$1.dev ? "local" : "live"
|
|
445
|
+
});
|
|
425
446
|
});
|
|
426
447
|
}) });
|
|
427
448
|
|
|
@@ -688,7 +709,7 @@ var init_Output = __esm({ "lib/Output.js": (() => {
|
|
|
688
709
|
return `stackRef(${this.stack}${this.stage ? `, { stage: ${this.stage} }` : ""})`;
|
|
689
710
|
}
|
|
690
711
|
};
|
|
691
|
-
stackRef = (stack, options$
|
|
712
|
+
stackRef = (stack, options$7 = {}) => Effect.succeed(new StackRefExpr(stack, options$7.stage));
|
|
692
713
|
MissingSourceError = class extends Data.TaggedError("MissingSourceError") {};
|
|
693
714
|
InvalidReferenceError = class extends Data.TaggedError("InvalidReferenceError") {};
|
|
694
715
|
evaluate = (expr, upstream$1) => Effect.gen(function* () {
|
|
@@ -853,9 +874,9 @@ var init_PlatformServices = __esm({ "lib/Util/PlatformServices.js": (() => {
|
|
|
853
874
|
return Layer.merge(NodeServices.layer, NodeSocket.layerWebSocketConstructor);
|
|
854
875
|
}
|
|
855
876
|
});
|
|
856
|
-
runMain = (effect, options$
|
|
857
|
-
if (isBun) import("@effect/platform-bun/BunRuntime").then((BunRuntime) => BunRuntime.runMain(effect, options$
|
|
858
|
-
else import("@effect/platform-node/NodeRuntime").then((NodeRuntime) => NodeRuntime.runMain(effect, options$
|
|
877
|
+
runMain = (effect, options$7) => {
|
|
878
|
+
if (isBun) import("@effect/platform-bun/BunRuntime").then((BunRuntime) => BunRuntime.runMain(effect, options$7));
|
|
879
|
+
else import("@effect/platform-node/NodeRuntime").then((NodeRuntime) => NodeRuntime.runMain(effect, options$7));
|
|
859
880
|
};
|
|
860
881
|
}) });
|
|
861
882
|
|
|
@@ -870,31 +891,31 @@ var init_Stack = __esm({ "lib/Stack.js": (() => {
|
|
|
870
891
|
init_effect();
|
|
871
892
|
init_FileLogger();
|
|
872
893
|
init_PlatformServices();
|
|
873
|
-
Stack = Object.assign(taggedFunction(EffectContext.Service()("Stack"), (stackName, options$
|
|
894
|
+
Stack = Object.assign(taggedFunction(EffectContext.Service()("Stack"), (stackName, options$7, eff) => {
|
|
874
895
|
if (!stackName) return (stackName$1) => Object.assign(stackRef(stackName$1).pipe(effectClass), {
|
|
875
896
|
stackName: stackName$1,
|
|
876
897
|
stage: createStageProxy(stackName$1),
|
|
877
|
-
state: options$
|
|
878
|
-
providers: options$
|
|
879
|
-
make: (options$
|
|
898
|
+
state: options$7?.state,
|
|
899
|
+
providers: options$7?.providers,
|
|
900
|
+
make: (options$8, eff$1) => Stack(stackName$1, options$8, eff$1)
|
|
880
901
|
});
|
|
881
902
|
return eff.pipe(make$2({
|
|
882
903
|
name: stackName,
|
|
883
|
-
...options$
|
|
904
|
+
...options$7
|
|
884
905
|
}), (eff$1) => Object.assign(eff$1, {
|
|
885
906
|
stackName,
|
|
886
907
|
stage: createStageProxy(stackName),
|
|
887
|
-
state: options$
|
|
888
|
-
providers: options$
|
|
908
|
+
state: options$7?.state,
|
|
909
|
+
providers: options$7?.providers
|
|
889
910
|
}));
|
|
890
911
|
}));
|
|
891
912
|
createStageProxy = (stackName) => new Proxy({}, { get: (_, stage$1) => stackRef(stackName, { stage: stage$1 }) });
|
|
892
913
|
StackName = Stack.use((stack) => Effect.succeed(stack.name));
|
|
893
|
-
make$2 = (options$
|
|
894
|
-
if (options$
|
|
895
|
-
if (options$
|
|
896
|
-
return options$
|
|
897
|
-
name: options$
|
|
914
|
+
make$2 = (options$7) => (effect) => Effect.scope.pipe(Effect.flatMap((scope) => {
|
|
915
|
+
if (options$7.state == null) return Effect.die(/* @__PURE__ */ new Error(`Stack "${options$7.name}" is missing a state store. Add a \`state\` layer to the stack options, e.g.:\n Alchemy.Stack("${options$7.name}", {\n providers: Cloudflare.providers(),\n state: Cloudflare.state(), // <-- required\n }, ...)\nSee https://alchemy.run/state-store for available state stores.`));
|
|
916
|
+
if (options$7.providers == null) return Effect.die(/* @__PURE__ */ new Error(`Stack "${options$7.name}" is missing a providers layer. Add a \`providers\` layer to the stack options, e.g.:\n Alchemy.Stack("${options$7.name}", {\n providers: Cloudflare.providers(), // <-- required\n state: Cloudflare.state(),\n }, ...)`));
|
|
917
|
+
return options$7.providers.pipe(Layer.provideMerge(options$7.state), Layer.provideMerge(Layer.effect(Stack, Stage.pipe(Effect.map((stage$1) => options$7.stack ?? {
|
|
918
|
+
name: options$7.name,
|
|
898
919
|
stage: stage$1,
|
|
899
920
|
resources: {},
|
|
900
921
|
bindings: {},
|
|
@@ -1314,9 +1335,10 @@ init_Artifacts();
|
|
|
1314
1335
|
init_FQN();
|
|
1315
1336
|
init_Output();
|
|
1316
1337
|
init_Provider();
|
|
1338
|
+
init_ProviderMode();
|
|
1317
1339
|
init_Resource();
|
|
1318
1340
|
init_sha256();
|
|
1319
|
-
const make = (stack, options$
|
|
1341
|
+
const make = (stack, options$7 = {}) => Effect.gen(function* () {
|
|
1320
1342
|
const state = yield* yield* State;
|
|
1321
1343
|
const resources = Object.values(stack.resources);
|
|
1322
1344
|
const actions = Object.values(stack.actions ?? {});
|
|
@@ -1331,6 +1353,32 @@ const make = (stack, options$6 = {}) => Effect.gen(function* () {
|
|
|
1331
1353
|
onSome: (c$1) => c$1.adopt
|
|
1332
1354
|
});
|
|
1333
1355
|
});
|
|
1356
|
+
const runDefaultMode = yield* defaultProviderMode;
|
|
1357
|
+
/**
|
|
1358
|
+
* Resolve the effective provider mode and the concrete provider
|
|
1359
|
+
* service for a resource.
|
|
1360
|
+
*
|
|
1361
|
+
* The mode only "sticks" when the provider actually distinguishes
|
|
1362
|
+
* modes (registered via `ProviderLayer.dual`). Mode-agnostic providers
|
|
1363
|
+
* satisfy any requested mode with their single implementation — in a
|
|
1364
|
+
* dev run, a construct that mixes emulatable resources with live-only
|
|
1365
|
+
* ones (e.g. R2 buckets) just works.
|
|
1366
|
+
*/
|
|
1367
|
+
const resolveProviderAndMode = Effect.fn(function* (resource) {
|
|
1368
|
+
const base$1 = yield* findProviderByType(resource.Type);
|
|
1369
|
+
const mode = base$1.modes !== void 0 ? resource.Mode ?? runDefaultMode : void 0;
|
|
1370
|
+
return {
|
|
1371
|
+
provider: yield* providerForMode(base$1, mode),
|
|
1372
|
+
mode
|
|
1373
|
+
};
|
|
1374
|
+
});
|
|
1375
|
+
/**
|
|
1376
|
+
* Has this resource switched provider modes since it was last
|
|
1377
|
+
* reconciled? Rows without a persisted mode (legacy rows, or rows
|
|
1378
|
+
* written by a mode-agnostic provider) are assumed to already be in
|
|
1379
|
+
* the current run's mode — no replacement churn.
|
|
1380
|
+
*/
|
|
1381
|
+
const hasModeSwitched = (mode, oldState) => mode !== void 0 && oldState?.providerMode !== void 0 && oldState.providerMode !== mode;
|
|
1334
1382
|
const resourceFqns = yield* state.list({
|
|
1335
1383
|
stack: stackName,
|
|
1336
1384
|
stage: stage$1
|
|
@@ -1345,7 +1393,7 @@ const make = (stack, options$6 = {}) => Effect.gen(function* () {
|
|
|
1345
1393
|
if (isAction(resourceExpr.src)) return resourceExpr;
|
|
1346
1394
|
return yield* resolvedResources[resourceExpr.src.FQN] ??= yield* Effect.cached(Effect.gen(function* () {
|
|
1347
1395
|
const resource = resourceExpr.src;
|
|
1348
|
-
const provider = yield*
|
|
1396
|
+
const { provider, mode } = yield* resolveProviderAndMode(resource);
|
|
1349
1397
|
const props = yield* resolveInput(resource.Props);
|
|
1350
1398
|
const persisted = yield* state.get({
|
|
1351
1399
|
stack: stackName,
|
|
@@ -1354,6 +1402,7 @@ const make = (stack, options$6 = {}) => Effect.gen(function* () {
|
|
|
1354
1402
|
});
|
|
1355
1403
|
const oldState = isActionState(persisted) ? void 0 : persisted;
|
|
1356
1404
|
if (!oldState || oldState.status === "creating") return resourceExpr;
|
|
1405
|
+
if (hasModeSwitched(mode, oldState)) return resourceExpr;
|
|
1357
1406
|
const oldProps = oldState.status === "updating" ? oldState.old.props : oldState.props;
|
|
1358
1407
|
const oldBindings = dedupeBindings(oldState.bindings ?? []);
|
|
1359
1408
|
const newBindings = dedupeBindings(stack.bindings[resource.FQN] ?? []);
|
|
@@ -1373,7 +1422,7 @@ const make = (stack, options$6 = {}) => Effect.gen(function* () {
|
|
|
1373
1422
|
if (havePropsChanged(oldProps, props)) return withStables(oldState?.attr);
|
|
1374
1423
|
} else if (diff.action === "update") return withStables(oldState?.attr);
|
|
1375
1424
|
else if (diff.action === "replace") return resourceExpr;
|
|
1376
|
-
if (options$
|
|
1425
|
+
if (options$7.force) return withStables(oldState?.attr);
|
|
1377
1426
|
if (oldState.status === "created" || oldState.status === "updated" || oldState.status === "replaced") return oldState?.attr;
|
|
1378
1427
|
else return resourceExpr;
|
|
1379
1428
|
}));
|
|
@@ -1476,7 +1525,7 @@ const make = (stack, options$6 = {}) => Effect.gen(function* () {
|
|
|
1476
1525
|
};
|
|
1477
1526
|
const newDownstreamDependencies = Object.fromEntries([...resources.map((resource) => [resource.FQN, computeDownstream(resource.FQN)]), ...actions.map((action) => [action.FQN, computeDownstream(action.FQN)])]);
|
|
1478
1527
|
const resourceGraph = Object.fromEntries((yield* Effect.all(resources.map(Effect.fn("plan.diff.resource")(function* (resource) {
|
|
1479
|
-
const provider = yield*
|
|
1528
|
+
const { provider, mode } = yield* resolveProviderAndMode(resource);
|
|
1480
1529
|
const id = resource.LogicalId;
|
|
1481
1530
|
const fqn = resource.FQN;
|
|
1482
1531
|
const news = yield* resolveInput(resource.Props);
|
|
@@ -1518,26 +1567,29 @@ const make = (stack, options$6 = {}) => Effect.gen(function* () {
|
|
|
1518
1567
|
providerVersion: provider.version ?? 0,
|
|
1519
1568
|
bindings: [],
|
|
1520
1569
|
downstream,
|
|
1521
|
-
removalPolicy: resource.RemovalPolicy
|
|
1570
|
+
removalPolicy: resource.RemovalPolicy,
|
|
1571
|
+
providerMode: mode
|
|
1522
1572
|
};
|
|
1523
1573
|
forceUpdateAfterAdoption = true;
|
|
1524
1574
|
}
|
|
1525
1575
|
}
|
|
1526
1576
|
const oldBindings = dedupeBindings(oldState?.bindings ?? []);
|
|
1527
1577
|
const bindingDiffs = diffBindings(oldBindings, newBindings);
|
|
1578
|
+
const modeSwitched = hasModeSwitched(mode, oldState);
|
|
1528
1579
|
const Node = (node) => ({
|
|
1529
1580
|
...node,
|
|
1530
1581
|
provider,
|
|
1531
1582
|
resource,
|
|
1532
1583
|
bindings: bindingDiffs,
|
|
1533
|
-
downstream
|
|
1584
|
+
downstream,
|
|
1585
|
+
mode
|
|
1534
1586
|
});
|
|
1535
1587
|
if (oldState === void 0) return Node({
|
|
1536
1588
|
action: "create",
|
|
1537
1589
|
props: news,
|
|
1538
1590
|
state: oldState
|
|
1539
1591
|
});
|
|
1540
|
-
else if (oldState.status === "creating" && oldState.attr === void 0) {
|
|
1592
|
+
else if (!modeSwitched && oldState.status === "creating" && oldState.attr === void 0) {
|
|
1541
1593
|
if (provider.read && isResolved(oldState.props)) {
|
|
1542
1594
|
const attr = yield* provider.read({
|
|
1543
1595
|
id,
|
|
@@ -1546,7 +1598,7 @@ const make = (stack, options$6 = {}) => Effect.gen(function* () {
|
|
|
1546
1598
|
olds: oldState.props,
|
|
1547
1599
|
output: oldState.attr
|
|
1548
1600
|
}).pipe(providePlanScope(fqn, oldState.instanceId));
|
|
1549
|
-
if (attr) {
|
|
1601
|
+
if (attr !== void 0) {
|
|
1550
1602
|
if (Unowned.is(attr)) {
|
|
1551
1603
|
if (!(resource.Adopt ?? (yield* shouldAdopt))) return yield* new OwnedBySomeoneElse({
|
|
1552
1604
|
message: `Cannot resume creating resource '${fqn}' (${resource.Type}): a resource with its physical identity exists in the cloud but is not owned by this stack/stage/logical-id. Re-run with \`--adopt\` (or wrap the effect in \`adopt(true)\`) to take it over.`,
|
|
@@ -1554,19 +1606,18 @@ const make = (stack, options$6 = {}) => Effect.gen(function* () {
|
|
|
1554
1606
|
logicalId: id
|
|
1555
1607
|
});
|
|
1556
1608
|
}
|
|
1557
|
-
|
|
1558
|
-
|
|
1559
|
-
|
|
1560
|
-
|
|
1561
|
-
...oldState,
|
|
1562
|
-
attr: stripUnowned(attr)
|
|
1563
|
-
}
|
|
1564
|
-
});
|
|
1609
|
+
oldState = {
|
|
1610
|
+
...oldState,
|
|
1611
|
+
attr: stripUnowned(attr)
|
|
1612
|
+
};
|
|
1565
1613
|
}
|
|
1566
1614
|
}
|
|
1567
1615
|
}
|
|
1568
1616
|
const oldProps = oldState.props;
|
|
1569
|
-
const diff =
|
|
1617
|
+
const diff = modeSwitched ? {
|
|
1618
|
+
action: "replace",
|
|
1619
|
+
deleteFirst: false
|
|
1620
|
+
} : yield* asEffect(provider?.diff?.({
|
|
1570
1621
|
id,
|
|
1571
1622
|
fqn,
|
|
1572
1623
|
olds: oldProps,
|
|
@@ -1575,7 +1626,7 @@ const make = (stack, options$6 = {}) => Effect.gen(function* () {
|
|
|
1575
1626
|
news,
|
|
1576
1627
|
oldBindings,
|
|
1577
1628
|
newBindings
|
|
1578
|
-
}).pipe(providePlanScope(fqn, oldState.instanceId))).pipe(Effect.map((diff$1) => diff$1 ?? { action: havePropsChanged(oldProps, news) || bindingDiffs.some((b) => b.action !== "noop") ? "update" : "noop" }), Effect.map((diff$1) => options$
|
|
1629
|
+
}).pipe(providePlanScope(fqn, oldState.instanceId))).pipe(Effect.map((diff$1) => diff$1 ?? { action: havePropsChanged(oldProps, news) || bindingDiffs.some((b) => b.action !== "noop") ? "update" : "noop" }), Effect.map((diff$1) => options$7.force && diff$1.action === "noop" ? { action: "update" } : diff$1), Effect.map((diff$1) => forceUpdateAfterAdoption && diff$1.action === "noop" ? { action: "update" } : diff$1));
|
|
1579
1630
|
if (oldState.status === "creating") if (diff.action === "noop") return Node({
|
|
1580
1631
|
action: "create",
|
|
1581
1632
|
props: news,
|
|
@@ -1651,6 +1702,7 @@ const make = (stack, options$6 = {}) => Effect.gen(function* () {
|
|
|
1651
1702
|
});
|
|
1652
1703
|
else if (diff.action === "update") return Node({
|
|
1653
1704
|
action: "update",
|
|
1705
|
+
adopting: forceUpdateAfterAdoption,
|
|
1654
1706
|
props: news,
|
|
1655
1707
|
state: oldState
|
|
1656
1708
|
});
|
|
@@ -1684,7 +1736,7 @@ const make = (stack, options$6 = {}) => Effect.gen(function* () {
|
|
|
1684
1736
|
forced: false
|
|
1685
1737
|
}];
|
|
1686
1738
|
const prior = oldState;
|
|
1687
|
-
if (prior?.status === "ran" && prior.inputHash === inputHash && !options$
|
|
1739
|
+
if (prior?.status === "ran" && prior.inputHash === inputHash && !options$7.force) return [fqn, {
|
|
1688
1740
|
kind: "action",
|
|
1689
1741
|
action: "noop",
|
|
1690
1742
|
def: action,
|
|
@@ -1698,7 +1750,7 @@ const make = (stack, options$6 = {}) => Effect.gen(function* () {
|
|
|
1698
1750
|
input: action.Input,
|
|
1699
1751
|
state: prior,
|
|
1700
1752
|
downstream,
|
|
1701
|
-
forced: !!options$
|
|
1753
|
+
forced: !!options$7.force
|
|
1702
1754
|
}];
|
|
1703
1755
|
})), { concurrency: "unbounded" }));
|
|
1704
1756
|
const cycleMembers = combinedCycleMembers;
|
|
@@ -1774,12 +1826,13 @@ const make = (stack, options$6 = {}) => Effect.gen(function* () {
|
|
|
1774
1826
|
if (oldState) {
|
|
1775
1827
|
const { logicalId } = parseFqn(fqn);
|
|
1776
1828
|
const resourceType = oldState.resourceType;
|
|
1777
|
-
const providerOption = yield* tryFindProviderByType(resourceType);
|
|
1829
|
+
const providerOption = yield* tryFindProviderByType(resourceType, oldState.providerMode);
|
|
1778
1830
|
if (Option.isNone(providerOption)) return yield* Effect.die(missingProviderError(resourceType, fqn));
|
|
1779
1831
|
return [fqn, {
|
|
1780
1832
|
action: "delete",
|
|
1781
1833
|
state: oldState,
|
|
1782
1834
|
provider: providerOption.value,
|
|
1835
|
+
mode: oldState.providerMode,
|
|
1783
1836
|
resource: {
|
|
1784
1837
|
Namespace: oldState.namespace,
|
|
1785
1838
|
FQN: fqn,
|
|
@@ -1791,6 +1844,7 @@ const make = (stack, options$6 = {}) => Effect.gen(function* () {
|
|
|
1791
1844
|
Provider: Provider(resourceType),
|
|
1792
1845
|
RemovalPolicy: oldState.removalPolicy,
|
|
1793
1846
|
Adopt: void 0,
|
|
1847
|
+
Mode: oldState.providerMode,
|
|
1794
1848
|
RuntimeContext: void 0,
|
|
1795
1849
|
Providers: void 0
|
|
1796
1850
|
},
|
|
@@ -1823,8 +1877,31 @@ const make = (stack, options$6 = {}) => Effect.gen(function* () {
|
|
|
1823
1877
|
"alchemy.stack": stack.name,
|
|
1824
1878
|
"alchemy.stage": stack.stage,
|
|
1825
1879
|
"alchemy.resources.count": Object.keys(stack.resources).length,
|
|
1826
|
-
"alchemy.force": !!options$
|
|
1880
|
+
"alchemy.force": !!options$7.force
|
|
1827
1881
|
} }));
|
|
1882
|
+
/**
|
|
1883
|
+
* Build the plan that destroys every resource of `(stack.name, stack.stage)`.
|
|
1884
|
+
*
|
|
1885
|
+
* The spec is emptied out so every persisted resource becomes an orphan
|
|
1886
|
+
* deletion, and `output` is left undefined so `apply` does not overwrite the
|
|
1887
|
+
* last deploy's persisted stack output with an empty husk. `apply` recognizes
|
|
1888
|
+
* the `destroy` marker and deletes the stage's remaining persisted state (the
|
|
1889
|
+
* stack output record) once the destroy has converged, so `state.getOutput`
|
|
1890
|
+
* and `state.listStages` agree the stage is gone.
|
|
1891
|
+
*
|
|
1892
|
+
* @see https://github.com/alchemy-run/alchemy/issues/961
|
|
1893
|
+
*/
|
|
1894
|
+
const destroy = (stack) => make({
|
|
1895
|
+
name: stack.name,
|
|
1896
|
+
stage: stack.stage,
|
|
1897
|
+
resources: {},
|
|
1898
|
+
bindings: {},
|
|
1899
|
+
actions: {},
|
|
1900
|
+
output: void 0
|
|
1901
|
+
}).pipe(Effect.map((plan) => ({
|
|
1902
|
+
...plan,
|
|
1903
|
+
destroy: true
|
|
1904
|
+
})));
|
|
1828
1905
|
const providePlanScope = (fqn, instanceId) => (effect) => Effect.serviceOption(ArtifactStore).pipe(Effect.map(Option.getOrElse(createArtifactStore)), Effect.flatMap((store) => effect.pipe(Effect.provideService(Artifacts, makeScopedArtifacts(store, fqn)), Effect.provideService(InstanceId, instanceId))));
|
|
1829
1906
|
var DeleteResourceHasDownstreamDependencies = class extends Data.TaggedError("DeleteResourceHasDownstreamDependencies") {};
|
|
1830
1907
|
var UnsatisfiedResourceCycle = class extends Data.TaggedError("UnsatisfiedResourceCycle") {};
|
|
@@ -1876,6 +1953,13 @@ const apply = (plan) => Effect.gen(function* () {
|
|
|
1876
1953
|
status
|
|
1877
1954
|
}), { concurrency: "unbounded" });
|
|
1878
1955
|
yield* session.done();
|
|
1956
|
+
if (plan.destroy) {
|
|
1957
|
+
yield* state.deleteStack({
|
|
1958
|
+
stack: stackName,
|
|
1959
|
+
stage: stage$1
|
|
1960
|
+
});
|
|
1961
|
+
return;
|
|
1962
|
+
}
|
|
1879
1963
|
if (!plan.output) return;
|
|
1880
1964
|
const outputs = Object.fromEntries(Object.entries(tracker).map(([fqn, t]) => [fqn, t.output]));
|
|
1881
1965
|
const resolved = yield* evaluate(plan.output, outputs);
|
|
@@ -1983,7 +2067,8 @@ const executeNode = (fqn, node, tracker, ready, readyStable, terminalStatuses, s
|
|
|
1983
2067
|
providerVersion: node.provider.version ?? 0,
|
|
1984
2068
|
resourceType: node.resource.Type,
|
|
1985
2069
|
bindings: excludeDeletedBindings(node.bindings),
|
|
1986
|
-
removalPolicy: node.resource.RemovalPolicy
|
|
2070
|
+
removalPolicy: node.resource.RemovalPolicy,
|
|
2071
|
+
providerMode: node.mode
|
|
1987
2072
|
});
|
|
1988
2073
|
return id;
|
|
1989
2074
|
} else if (node.action === "replace") {
|
|
@@ -2001,7 +2086,8 @@ const executeNode = (fqn, node, tracker, ready, readyStable, terminalStatuses, s
|
|
|
2001
2086
|
bindings: excludeDeletedBindings(node.bindings),
|
|
2002
2087
|
old: node.state,
|
|
2003
2088
|
deleteFirst: node.deleteFirst,
|
|
2004
|
-
removalPolicy: node.resource.RemovalPolicy
|
|
2089
|
+
removalPolicy: node.resource.RemovalPolicy,
|
|
2090
|
+
providerMode: node.mode
|
|
2005
2091
|
});
|
|
2006
2092
|
return id;
|
|
2007
2093
|
} else if (node.state?.instanceId) return node.state.instanceId;
|
|
@@ -2020,7 +2106,8 @@ const executeNode = (fqn, node, tracker, ready, readyStable, terminalStatuses, s
|
|
|
2020
2106
|
providerVersion: node.provider.version ?? 0,
|
|
2021
2107
|
bindings: excludeDeletedBindings(node.bindings),
|
|
2022
2108
|
downstream: node.downstream,
|
|
2023
|
-
removalPolicy: node.resource.RemovalPolicy
|
|
2109
|
+
removalPolicy: node.resource.RemovalPolicy,
|
|
2110
|
+
providerMode: node.mode
|
|
2024
2111
|
});
|
|
2025
2112
|
let attr = node.state?.attr;
|
|
2026
2113
|
if (attr !== void 0) yield* storeAndSignal({
|
|
@@ -2050,7 +2137,8 @@ const executeNode = (fqn, node, tracker, ready, readyStable, terminalStatuses, s
|
|
|
2050
2137
|
providerVersion: node.provider.version ?? 0,
|
|
2051
2138
|
bindings: excludeDeletedBindings(node.bindings),
|
|
2052
2139
|
downstream: node.downstream,
|
|
2053
|
-
removalPolicy: node.resource.RemovalPolicy
|
|
2140
|
+
removalPolicy: node.resource.RemovalPolicy,
|
|
2141
|
+
providerMode: node.mode
|
|
2054
2142
|
});
|
|
2055
2143
|
yield* storeAndSignal({
|
|
2056
2144
|
output: attr,
|
|
@@ -2086,7 +2174,8 @@ const executeNode = (fqn, node, tracker, ready, readyStable, terminalStatuses, s
|
|
|
2086
2174
|
bindings: bindingOutputs,
|
|
2087
2175
|
providerVersion: node.provider.version ?? 0,
|
|
2088
2176
|
downstream: node.downstream,
|
|
2089
|
-
removalPolicy: node.resource.RemovalPolicy
|
|
2177
|
+
removalPolicy: node.resource.RemovalPolicy,
|
|
2178
|
+
providerMode: node.mode
|
|
2090
2179
|
});
|
|
2091
2180
|
tracker[fqn] = {
|
|
2092
2181
|
output: attr,
|
|
@@ -2110,10 +2199,12 @@ const executeNode = (fqn, node, tracker, ready, readyStable, terminalStatuses, s
|
|
|
2110
2199
|
yield* waitForDeps(allUpstreamFqns());
|
|
2111
2200
|
const outputs = getOutputs();
|
|
2112
2201
|
const news = yield* evaluate(node.props, outputs);
|
|
2202
|
+
const adopting = node.adopting === true || node.state.status === "updating" && node.state.adopting === true;
|
|
2113
2203
|
yield* node.state.status === "replaced" ? commit({
|
|
2114
2204
|
...node.state,
|
|
2115
2205
|
attr: node.state.attr,
|
|
2116
|
-
props: news
|
|
2206
|
+
props: news,
|
|
2207
|
+
providerMode: node.mode
|
|
2117
2208
|
}) : commit({
|
|
2118
2209
|
status: "updating",
|
|
2119
2210
|
fqn,
|
|
@@ -2126,10 +2217,12 @@ const executeNode = (fqn, node, tracker, ready, readyStable, terminalStatuses, s
|
|
|
2126
2217
|
bindings: excludeDeletedBindings(node.bindings),
|
|
2127
2218
|
downstream: node.downstream,
|
|
2128
2219
|
old: node.state.status === "updating" ? node.state.old : node.state,
|
|
2129
|
-
|
|
2220
|
+
adopting: adopting ? true : void 0,
|
|
2221
|
+
removalPolicy: node.resource.RemovalPolicy,
|
|
2222
|
+
providerMode: node.mode
|
|
2130
2223
|
});
|
|
2131
2224
|
yield* report("updating");
|
|
2132
|
-
const previousProps = node.state.status === "created" || node.state.status === "updated" || node.state.status === "replaced" ? node.state.props : node.state.old.props;
|
|
2225
|
+
const previousProps = adopting ? void 0 : node.state.status === "created" || node.state.status === "updated" || node.state.status === "replaced" ? node.state.props : node.state.old.props;
|
|
2133
2226
|
const bindingOutputs = excludeDeletedBindings(yield* evaluate(node.bindings, outputs));
|
|
2134
2227
|
const attr = yield* node.provider.reconcile({
|
|
2135
2228
|
id: logicalId,
|
|
@@ -2144,7 +2237,8 @@ const executeNode = (fqn, node, tracker, ready, readyStable, terminalStatuses, s
|
|
|
2144
2237
|
if (node.state.status === "replaced") yield* commit({
|
|
2145
2238
|
...node.state,
|
|
2146
2239
|
attr,
|
|
2147
|
-
props: news
|
|
2240
|
+
props: news,
|
|
2241
|
+
providerMode: node.mode
|
|
2148
2242
|
});
|
|
2149
2243
|
else yield* commit({
|
|
2150
2244
|
status: "updated",
|
|
@@ -2157,7 +2251,8 @@ const executeNode = (fqn, node, tracker, ready, readyStable, terminalStatuses, s
|
|
|
2157
2251
|
bindings: bindingOutputs,
|
|
2158
2252
|
providerVersion: node.provider.version ?? 0,
|
|
2159
2253
|
downstream: node.downstream,
|
|
2160
|
-
removalPolicy: node.resource.RemovalPolicy
|
|
2254
|
+
removalPolicy: node.resource.RemovalPolicy,
|
|
2255
|
+
providerMode: node.mode
|
|
2161
2256
|
});
|
|
2162
2257
|
tracker[fqn] = {
|
|
2163
2258
|
output: attr,
|
|
@@ -2197,12 +2292,13 @@ const executeNode = (fqn, node, tracker, ready, readyStable, terminalStatuses, s
|
|
|
2197
2292
|
deleteFirst: node.deleteFirst,
|
|
2198
2293
|
old: node.state,
|
|
2199
2294
|
downstream: node.downstream,
|
|
2200
|
-
removalPolicy: node.resource.RemovalPolicy
|
|
2295
|
+
removalPolicy: node.resource.RemovalPolicy,
|
|
2296
|
+
providerMode: node.mode
|
|
2201
2297
|
});
|
|
2202
2298
|
else replState = node.state;
|
|
2203
2299
|
const deleteOldGenerations = (old) => Effect.gen(function* () {
|
|
2204
2300
|
const retain = node.resource.RemovalPolicy === "retain";
|
|
2205
|
-
if (old.attr !== void 0 && !retain) yield* node.
|
|
2301
|
+
if (old.attr !== void 0 && !retain) yield* (yield* findProviderByType(node.resource.Type, old.providerMode)).delete({
|
|
2206
2302
|
id: logicalId,
|
|
2207
2303
|
fqn,
|
|
2208
2304
|
instanceId: old.instanceId,
|
|
@@ -2247,7 +2343,8 @@ const executeNode = (fqn, node, tracker, ready, readyStable, terminalStatuses, s
|
|
|
2247
2343
|
downstream: node.downstream,
|
|
2248
2344
|
old: replState.old,
|
|
2249
2345
|
deleteFirst: node.deleteFirst,
|
|
2250
|
-
removalPolicy: node.resource.RemovalPolicy
|
|
2346
|
+
removalPolicy: node.resource.RemovalPolicy,
|
|
2347
|
+
providerMode: node.mode
|
|
2251
2348
|
});
|
|
2252
2349
|
yield* storeAndSignal({
|
|
2253
2350
|
output: attr,
|
|
@@ -2283,7 +2380,8 @@ const executeNode = (fqn, node, tracker, ready, readyStable, terminalStatuses, s
|
|
|
2283
2380
|
providerVersion: node.provider.version ?? 0,
|
|
2284
2381
|
bindings: bindingOutputs,
|
|
2285
2382
|
downstream: node.downstream,
|
|
2286
|
-
removalPolicy: node.resource.RemovalPolicy
|
|
2383
|
+
removalPolicy: node.resource.RemovalPolicy,
|
|
2384
|
+
providerMode: node.mode
|
|
2287
2385
|
});
|
|
2288
2386
|
else yield* commit({
|
|
2289
2387
|
status: "replaced",
|
|
@@ -2298,7 +2396,8 @@ const executeNode = (fqn, node, tracker, ready, readyStable, terminalStatuses, s
|
|
|
2298
2396
|
downstream: node.downstream,
|
|
2299
2397
|
old: replState.old,
|
|
2300
2398
|
deleteFirst: node.deleteFirst,
|
|
2301
|
-
removalPolicy: node.resource.RemovalPolicy
|
|
2399
|
+
removalPolicy: node.resource.RemovalPolicy,
|
|
2400
|
+
providerMode: node.mode
|
|
2302
2401
|
});
|
|
2303
2402
|
tracker[fqn] = {
|
|
2304
2403
|
output: attr,
|
|
@@ -2503,7 +2602,8 @@ const converge = Effect.fn(function* (plan, tracker, terminalStatuses, session,
|
|
|
2503
2602
|
bindings: stripUnresolved(newBindings),
|
|
2504
2603
|
downstream: node.downstream,
|
|
2505
2604
|
namespace,
|
|
2506
|
-
removalPolicy: node.resource.RemovalPolicy
|
|
2605
|
+
removalPolicy: node.resource.RemovalPolicy,
|
|
2606
|
+
providerMode: node.mode
|
|
2507
2607
|
}
|
|
2508
2608
|
});
|
|
2509
2609
|
terminalStatuses.set(fqn, {
|
|
@@ -2571,18 +2671,24 @@ const converge = Effect.fn(function* (plan, tracker, terminalStatuses, session,
|
|
|
2571
2671
|
}
|
|
2572
2672
|
});
|
|
2573
2673
|
/**
|
|
2574
|
-
*
|
|
2575
|
-
* resource
|
|
2576
|
-
*
|
|
2577
|
-
*
|
|
2578
|
-
* the next destroy retries the whole chain.
|
|
2674
|
+
* Aggregate raised at the end of the deletion phase when one or more
|
|
2675
|
+
* resource deletes failed. Every resource whose delete did not depend on a
|
|
2676
|
+
* failed one was still attempted — a single failure no longer strands
|
|
2677
|
+
* unrelated siblings.
|
|
2579
2678
|
*/
|
|
2580
|
-
var
|
|
2679
|
+
var DestroyError = class extends Data.TaggedError("DestroyError") {
|
|
2680
|
+
get message() {
|
|
2681
|
+
return [
|
|
2682
|
+
`Failed to delete ${this.failures.length} resource(s)` + (this.blocked.length > 0 ? ` (${this.blocked.length} more skipped because a dependent's delete failed)` : "") + ":",
|
|
2683
|
+
...this.failures.map((f) => ` ✗ ${f.fqn} (${f.resourceType}): ${Cause.pretty(f.cause)}`),
|
|
2684
|
+
...this.blocked.map((b) => ` ⊘ ${b.fqn} (${b.resourceType}): skipped — blocked by failed delete of ${b.blockedBy.join(", ")}`)
|
|
2685
|
+
].join("\n");
|
|
2686
|
+
}
|
|
2687
|
+
};
|
|
2581
2688
|
const collectGarbage = Effect.fn(function* (plan, session) {
|
|
2582
2689
|
const state = yield* yield* State;
|
|
2583
2690
|
const stackName = (yield* Stack).name;
|
|
2584
2691
|
const stage$1 = yield* Stage;
|
|
2585
|
-
const failures = [];
|
|
2586
2692
|
yield* Effect.all(Object.entries(plan.actionDeletions ?? {}).map(([fqn, node]) => node === void 0 ? Effect.void : Effect.gen(function* () {
|
|
2587
2693
|
yield* session.emit({
|
|
2588
2694
|
kind: "status-change",
|
|
@@ -2602,11 +2708,14 @@ const collectGarbage = Effect.fn(function* (plan, session) {
|
|
|
2602
2708
|
status: "deleted"
|
|
2603
2709
|
});
|
|
2604
2710
|
})), { concurrency: "unbounded" });
|
|
2711
|
+
const failures = [];
|
|
2712
|
+
const blockedDeletes = [];
|
|
2713
|
+
const unresolved = /* @__PURE__ */ new Set();
|
|
2605
2714
|
const deleteGraph = Effect.fn(function* (deletionGraph) {
|
|
2606
2715
|
const deletions = {};
|
|
2607
2716
|
const deleteResource = (node, ancestors = /* @__PURE__ */ new Set()) => Effect.gen(function* () {
|
|
2608
2717
|
const isDeleteNode = (node$1) => "action" in node$1;
|
|
2609
|
-
const { fqn, logicalId, namespace, resourceType, instanceId, downstream, props, attr: persistedAttr, provider } = isDeleteNode(node) ? {
|
|
2718
|
+
const { fqn, logicalId, namespace, resourceType, instanceId, downstream, props, attr: persistedAttr, provider, providerMode } = isDeleteNode(node) ? {
|
|
2610
2719
|
fqn: node.resource.FQN,
|
|
2611
2720
|
logicalId: node.resource.LogicalId,
|
|
2612
2721
|
namespace: node.resource.Namespace,
|
|
@@ -2615,7 +2724,8 @@ const collectGarbage = Effect.fn(function* (plan, session) {
|
|
|
2615
2724
|
downstream: node.downstream,
|
|
2616
2725
|
props: node.state.props,
|
|
2617
2726
|
attr: node.state.attr,
|
|
2618
|
-
provider: node.provider
|
|
2727
|
+
provider: node.provider,
|
|
2728
|
+
providerMode: node.state.providerMode
|
|
2619
2729
|
} : {
|
|
2620
2730
|
fqn: node.fqn,
|
|
2621
2731
|
logicalId: node.logicalId,
|
|
@@ -2625,10 +2735,11 @@ const collectGarbage = Effect.fn(function* (plan, session) {
|
|
|
2625
2735
|
downstream: node.old.downstream,
|
|
2626
2736
|
props: node.old.props,
|
|
2627
2737
|
attr: node.old.attr,
|
|
2628
|
-
provider: yield* tryFindProviderByType(node.old.resourceType).pipe(Effect.flatMap(Option.match({
|
|
2738
|
+
provider: yield* tryFindProviderByType(node.old.resourceType, node.old.providerMode).pipe(Effect.flatMap(Option.match({
|
|
2629
2739
|
onNone: () => Effect.die(missingProviderError(node.old.resourceType, node.fqn)),
|
|
2630
2740
|
onSome: Effect.succeed
|
|
2631
|
-
})))
|
|
2741
|
+
}))),
|
|
2742
|
+
providerMode: node.old.providerMode
|
|
2632
2743
|
};
|
|
2633
2744
|
let attr = persistedAttr;
|
|
2634
2745
|
const nextAncestors = new Set(ancestors).add(fqn);
|
|
@@ -2658,121 +2769,154 @@ const collectGarbage = Effect.fn(function* (plan, session) {
|
|
|
2658
2769
|
})
|
|
2659
2770
|
};
|
|
2660
2771
|
return yield* deletions[fqn] ??= yield* Effect.cached(Effect.gen(function* () {
|
|
2661
|
-
yield* Effect.all(downstream.map((dep) => dep !== fqn &&
|
|
2662
|
-
|
|
2663
|
-
|
|
2664
|
-
|
|
2665
|
-
|
|
2666
|
-
|
|
2667
|
-
|
|
2668
|
-
|
|
2669
|
-
|
|
2670
|
-
|
|
2671
|
-
|
|
2672
|
-
|
|
2673
|
-
|
|
2674
|
-
const retainOldGeneration = !isDeleteNode(node) && node.removalPolicy === "retain";
|
|
2675
|
-
if (retainOldGeneration) yield* scopedSession.note("Retaining replaced resource (removal policy: retain)...");
|
|
2676
|
-
if (attr === void 0 && !retainOldGeneration) if (provider.read) {
|
|
2677
|
-
const recovered = yield* provider.read({
|
|
2678
|
-
id: logicalId,
|
|
2772
|
+
const blockedBy = (yield* Effect.all(downstream.map((dep) => dep !== fqn && !ancestors.has(dep) ? dep in deletionGraph ? deleteResource(deletionGraph[dep], nextAncestors).pipe(Effect.map((outcome) => ({
|
|
2773
|
+
dep,
|
|
2774
|
+
outcome
|
|
2775
|
+
}))) : Effect.sync(() => ({
|
|
2776
|
+
dep,
|
|
2777
|
+
outcome: unresolved.has(dep) ? "failed" : "deleted"
|
|
2778
|
+
})) : Effect.succeed({
|
|
2779
|
+
dep,
|
|
2780
|
+
outcome: "deleted"
|
|
2781
|
+
})), { concurrency: "unbounded" })).filter(({ outcome }) => outcome !== "deleted").map(({ dep }) => dep);
|
|
2782
|
+
if (blockedBy.length > 0) {
|
|
2783
|
+
unresolved.add(fqn);
|
|
2784
|
+
blockedDeletes.push({
|
|
2679
2785
|
fqn,
|
|
2680
|
-
|
|
2681
|
-
|
|
2682
|
-
|
|
2683
|
-
}).pipe(instrumentLifecycle("read", fqn, resourceType, logicalId, instanceId));
|
|
2684
|
-
if (recovered !== void 0) if (Unowned.is(recovered)) yield* scopedSession.note("Resource exists in the cloud but is not owned by this stack — leaving it in place (re-deploy with --adopt to take ownership, then destroy).");
|
|
2685
|
-
else attr = stripUnowned(recovered);
|
|
2686
|
-
} else yield* scopedSession.note("No attributes were recorded for this resource (its create was interrupted) and the provider does not implement `read` — if a physical resource was created, it must be cleaned up manually.");
|
|
2687
|
-
if (isDeleteNode(node)) yield* commit({
|
|
2688
|
-
status: "deleting",
|
|
2689
|
-
fqn,
|
|
2690
|
-
logicalId,
|
|
2691
|
-
instanceId,
|
|
2692
|
-
resourceType,
|
|
2693
|
-
props,
|
|
2694
|
-
attr,
|
|
2695
|
-
downstream,
|
|
2696
|
-
providerVersion: provider.version ?? 0,
|
|
2697
|
-
bindings: excludeDeletedBindings(node.bindings),
|
|
2698
|
-
removalPolicy: node.resource.RemovalPolicy
|
|
2699
|
-
});
|
|
2700
|
-
if (attr !== void 0 && !retainOldGeneration) yield* provider.delete({
|
|
2701
|
-
id: logicalId,
|
|
2702
|
-
fqn,
|
|
2703
|
-
instanceId,
|
|
2704
|
-
olds: props,
|
|
2705
|
-
output: attr,
|
|
2706
|
-
session: scopedSession,
|
|
2707
|
-
bindings: []
|
|
2708
|
-
}).pipe(instrumentLifecycle("delete", fqn, resourceType, logicalId, instanceId));
|
|
2709
|
-
if (isDeleteNode(node)) {
|
|
2710
|
-
yield* state.delete({
|
|
2711
|
-
stack: stackName,
|
|
2712
|
-
stage: stage$1,
|
|
2713
|
-
fqn
|
|
2786
|
+
logicalId,
|
|
2787
|
+
resourceType,
|
|
2788
|
+
blockedBy
|
|
2714
2789
|
});
|
|
2715
|
-
yield*
|
|
2716
|
-
|
|
2717
|
-
|
|
2718
|
-
|
|
2719
|
-
|
|
2790
|
+
yield* scopedSession.note(`Skipping delete — blocked by failed delete of ${blockedBy.join(", ")}.`);
|
|
2791
|
+
yield* report("skipped");
|
|
2792
|
+
return "blocked";
|
|
2793
|
+
}
|
|
2794
|
+
return yield* deleteResourceBody().pipe(Effect.catchCause((cause) => Effect.gen(function* () {
|
|
2795
|
+
unresolved.add(fqn);
|
|
2796
|
+
failures.push({
|
|
2720
2797
|
fqn,
|
|
2721
|
-
logicalId
|
|
2722
|
-
|
|
2723
|
-
|
|
2724
|
-
props: node.props,
|
|
2725
|
-
attr: node.attr,
|
|
2726
|
-
providerVersion: node.providerVersion,
|
|
2727
|
-
downstream: node.downstream,
|
|
2728
|
-
bindings: excludeDeletedBindings(node.bindings),
|
|
2729
|
-
old: node.old.old,
|
|
2730
|
-
deleteFirst: node.deleteFirst,
|
|
2731
|
-
removalPolicy: node.removalPolicy
|
|
2798
|
+
logicalId,
|
|
2799
|
+
resourceType,
|
|
2800
|
+
cause
|
|
2732
2801
|
});
|
|
2733
|
-
|
|
2734
|
-
|
|
2802
|
+
yield* report("fail");
|
|
2803
|
+
return "failed";
|
|
2804
|
+
})));
|
|
2805
|
+
}));
|
|
2806
|
+
function deleteResourceBody() {
|
|
2807
|
+
return Effect.gen(function* () {
|
|
2808
|
+
if (isDeleteNode(node)) {
|
|
2809
|
+
yield* report("deleting");
|
|
2810
|
+
if (node.resource.RemovalPolicy === "retain") {
|
|
2811
|
+
yield* state.delete({
|
|
2812
|
+
stack: stackName,
|
|
2813
|
+
stage: stage$1,
|
|
2814
|
+
fqn
|
|
2815
|
+
});
|
|
2816
|
+
yield* report("retained");
|
|
2817
|
+
return "deleted";
|
|
2818
|
+
}
|
|
2819
|
+
}
|
|
2820
|
+
const retainOldGeneration = !isDeleteNode(node) && node.removalPolicy === "retain";
|
|
2821
|
+
if (retainOldGeneration) yield* scopedSession.note("Retaining replaced resource (removal policy: retain)...");
|
|
2822
|
+
if (attr === void 0 && !retainOldGeneration) if (provider.read) {
|
|
2823
|
+
const recovered = yield* provider.read({
|
|
2824
|
+
id: logicalId,
|
|
2825
|
+
fqn,
|
|
2826
|
+
instanceId,
|
|
2827
|
+
olds: props,
|
|
2828
|
+
output: void 0
|
|
2829
|
+
}).pipe(instrumentLifecycle("read", fqn, resourceType, logicalId, instanceId));
|
|
2830
|
+
if (recovered !== void 0) if (Unowned.is(recovered)) yield* scopedSession.note("Resource exists in the cloud but is not owned by this stack — leaving it in place (re-deploy with --adopt to take ownership, then destroy).");
|
|
2831
|
+
else attr = stripUnowned(recovered);
|
|
2832
|
+
} else yield* scopedSession.note("No attributes were recorded for this resource (its create was interrupted) and the provider does not implement `read` — if a physical resource was created, it must be cleaned up manually.");
|
|
2833
|
+
if (isDeleteNode(node)) yield* commit({
|
|
2834
|
+
status: "deleting",
|
|
2735
2835
|
fqn,
|
|
2736
|
-
logicalId
|
|
2737
|
-
instanceId
|
|
2738
|
-
resourceType
|
|
2739
|
-
props
|
|
2740
|
-
attr
|
|
2741
|
-
|
|
2742
|
-
|
|
2836
|
+
logicalId,
|
|
2837
|
+
instanceId,
|
|
2838
|
+
resourceType,
|
|
2839
|
+
props,
|
|
2840
|
+
attr,
|
|
2841
|
+
downstream,
|
|
2842
|
+
providerVersion: provider.version ?? 0,
|
|
2743
2843
|
bindings: excludeDeletedBindings(node.bindings),
|
|
2744
|
-
removalPolicy: node.
|
|
2844
|
+
removalPolicy: node.resource.RemovalPolicy,
|
|
2845
|
+
providerMode
|
|
2745
2846
|
});
|
|
2746
|
-
|
|
2747
|
-
|
|
2748
|
-
|
|
2749
|
-
|
|
2750
|
-
|
|
2751
|
-
|
|
2752
|
-
|
|
2753
|
-
|
|
2847
|
+
if (attr !== void 0 && !retainOldGeneration) yield* provider.delete({
|
|
2848
|
+
id: logicalId,
|
|
2849
|
+
fqn,
|
|
2850
|
+
instanceId,
|
|
2851
|
+
olds: props,
|
|
2852
|
+
output: attr,
|
|
2853
|
+
session: scopedSession,
|
|
2854
|
+
bindings: []
|
|
2855
|
+
}).pipe(instrumentLifecycle("delete", fqn, resourceType, logicalId, instanceId));
|
|
2856
|
+
if (isDeleteNode(node)) {
|
|
2857
|
+
yield* state.delete({
|
|
2858
|
+
stack: stackName,
|
|
2859
|
+
stage: stage$1,
|
|
2860
|
+
fqn
|
|
2861
|
+
});
|
|
2862
|
+
yield* report("deleted");
|
|
2863
|
+
} else {
|
|
2864
|
+
if (!retainOldGeneration) yield* scopedSession.note("Cleaning up replaced resource...");
|
|
2865
|
+
if (node.old.status === "replacing" || node.old.status === "replaced") yield* commit({
|
|
2866
|
+
status: "replaced",
|
|
2867
|
+
fqn,
|
|
2868
|
+
logicalId: node.logicalId,
|
|
2869
|
+
instanceId: node.instanceId,
|
|
2870
|
+
resourceType: node.resourceType,
|
|
2871
|
+
props: node.props,
|
|
2872
|
+
attr: node.attr,
|
|
2873
|
+
providerVersion: node.providerVersion,
|
|
2874
|
+
downstream: node.downstream,
|
|
2875
|
+
bindings: excludeDeletedBindings(node.bindings),
|
|
2876
|
+
old: node.old.old,
|
|
2877
|
+
deleteFirst: node.deleteFirst,
|
|
2878
|
+
removalPolicy: node.removalPolicy,
|
|
2879
|
+
providerMode: node.providerMode
|
|
2880
|
+
});
|
|
2881
|
+
else yield* commit({
|
|
2882
|
+
status: "created",
|
|
2883
|
+
fqn,
|
|
2884
|
+
logicalId: node.logicalId,
|
|
2885
|
+
instanceId: node.instanceId,
|
|
2886
|
+
resourceType: node.resourceType,
|
|
2887
|
+
props: node.props,
|
|
2888
|
+
attr: node.attr,
|
|
2889
|
+
providerVersion: node.providerVersion,
|
|
2890
|
+
downstream: node.downstream,
|
|
2891
|
+
bindings: excludeDeletedBindings(node.bindings),
|
|
2892
|
+
removalPolicy: node.removalPolicy,
|
|
2893
|
+
providerMode: node.providerMode
|
|
2894
|
+
});
|
|
2895
|
+
yield* scopedSession.note(retainOldGeneration ? "Replaced resource retained." : "Replaced resource cleanup complete.");
|
|
2896
|
+
}
|
|
2897
|
+
return "deleted";
|
|
2754
2898
|
});
|
|
2755
|
-
|
|
2756
|
-
return yield* Effect.failCause(cause);
|
|
2757
|
-
}))));
|
|
2899
|
+
}
|
|
2758
2900
|
});
|
|
2759
|
-
yield* Effect.all(Object.values(deletionGraph).filter((node) => node !== void 0).map((node) => deleteResource(node)
|
|
2901
|
+
yield* Effect.all(Object.values(deletionGraph).filter((node) => node !== void 0).map((node) => deleteResource(node)), { concurrency: "unbounded" });
|
|
2760
2902
|
});
|
|
2761
2903
|
let first = true;
|
|
2762
2904
|
while (true) {
|
|
2763
|
-
const remainingReplacedResources = yield* state.getReplacedResources({
|
|
2905
|
+
const remainingReplacedResources = (yield* state.getReplacedResources({
|
|
2764
2906
|
stack: stackName,
|
|
2765
2907
|
stage: stage$1
|
|
2766
|
-
});
|
|
2908
|
+
})).filter((replaced) => !unresolved.has(replaced.fqn));
|
|
2767
2909
|
if (!first && remainingReplacedResources.length === 0) break;
|
|
2768
2910
|
yield* deleteGraph({
|
|
2769
2911
|
...first ? plan.deletions : {},
|
|
2770
2912
|
...Object.fromEntries(remainingReplacedResources.map((replaced) => [replaced.fqn, replaced]))
|
|
2771
2913
|
});
|
|
2772
2914
|
first = false;
|
|
2773
|
-
if (failures.length > 0) break;
|
|
2774
2915
|
}
|
|
2775
|
-
if (failures.length > 0) return yield* Effect.
|
|
2916
|
+
if (failures.length > 0) return yield* Effect.fail(new DestroyError({
|
|
2917
|
+
failures,
|
|
2918
|
+
blocked: blockedDeletes
|
|
2919
|
+
}));
|
|
2776
2920
|
});
|
|
2777
2921
|
const excludeDeletedBindings = (bindings) => bindings.flatMap(({ action, sid, data }) => action === "delete" ? [] : [{
|
|
2778
2922
|
sid,
|
|
@@ -2789,13 +2933,12 @@ const retryIfCancelled = Effect.retry({ while: (e) => e instanceof PromptCancell
|
|
|
2789
2933
|
*
|
|
2790
2934
|
* Returns `undefined` if the user cancels (Ctrl+C / Escape).
|
|
2791
2935
|
*
|
|
2792
|
-
* Uses `Effect.callback` so fiber interruption propagates
|
|
2793
|
-
*
|
|
2794
|
-
* to resolve — its result is ignored after interruption.
|
|
2936
|
+
* Uses `Effect.callback` so fiber interruption propagates to the clack
|
|
2937
|
+
* prompt through its abort signal, releasing stdin and restoring the cursor.
|
|
2795
2938
|
*/
|
|
2796
2939
|
const prompt = (fn) => Effect.callback((resume, signal) => {
|
|
2797
2940
|
let settled = false;
|
|
2798
|
-
fn().then((result) => {
|
|
2941
|
+
fn(signal).then((result) => {
|
|
2799
2942
|
if (settled || signal.aborted) return;
|
|
2800
2943
|
settled = true;
|
|
2801
2944
|
if (p.isCancel(result)) resume(Effect.fail(new PromptCancelled()));
|
|
@@ -2809,11 +2952,34 @@ const prompt = (fn) => Effect.callback((resume, signal) => {
|
|
|
2809
2952
|
const success = (str) => Effect.sync(() => p.log.success(str));
|
|
2810
2953
|
const warn = (str) => Effect.sync(() => p.log.warn(str));
|
|
2811
2954
|
const info = (str) => Effect.sync(() => p.log.info(str));
|
|
2812
|
-
const text = (opts) =>
|
|
2813
|
-
const
|
|
2814
|
-
|
|
2815
|
-
|
|
2816
|
-
|
|
2955
|
+
const text = (opts) => {
|
|
2956
|
+
const validate = opts.validate;
|
|
2957
|
+
return prompt((signal) => p.text({
|
|
2958
|
+
...opts,
|
|
2959
|
+
signal,
|
|
2960
|
+
validate: validate === void 0 ? void 0 : (value) => validate(value ?? "")
|
|
2961
|
+
}));
|
|
2962
|
+
};
|
|
2963
|
+
const password = (opts) => {
|
|
2964
|
+
const validate = opts.validate;
|
|
2965
|
+
return prompt((signal) => p.password({
|
|
2966
|
+
...opts,
|
|
2967
|
+
signal,
|
|
2968
|
+
validate: validate === void 0 ? void 0 : (value) => validate(value ?? "")
|
|
2969
|
+
}));
|
|
2970
|
+
};
|
|
2971
|
+
const select = (opts) => prompt((signal) => p.select({
|
|
2972
|
+
...opts,
|
|
2973
|
+
signal
|
|
2974
|
+
}));
|
|
2975
|
+
const confirm = (opts) => prompt((signal) => p.confirm({
|
|
2976
|
+
...opts,
|
|
2977
|
+
signal
|
|
2978
|
+
}));
|
|
2979
|
+
const multiselect = (opts) => prompt((signal) => p.multiselect({
|
|
2980
|
+
...opts,
|
|
2981
|
+
signal
|
|
2982
|
+
}));
|
|
2817
2983
|
/**
|
|
2818
2984
|
* Open a URL in the user's default browser.
|
|
2819
2985
|
*
|
|
@@ -2882,7 +3048,7 @@ const fromEnvironment = Layer.effect(Region.Region, Effect.gen(function* () {
|
|
|
2882
3048
|
init_AuthProvider();
|
|
2883
3049
|
init_Credentials();
|
|
2884
3050
|
const AWS_AUTH_PROVIDER_NAME = "AWS";
|
|
2885
|
-
const options$
|
|
3051
|
+
const options$6 = [
|
|
2886
3052
|
{
|
|
2887
3053
|
value: "sso",
|
|
2888
3054
|
label: "SSO",
|
|
@@ -2957,7 +3123,7 @@ const AwsAuth = AuthProviderLayer()(AWS_AUTH_PROVIDER_NAME, Effect.gen(function*
|
|
|
2957
3123
|
});
|
|
2958
3124
|
const configureInteractive = (profileName) => select({
|
|
2959
3125
|
message: "AWS authentication method",
|
|
2960
|
-
options: options$
|
|
3126
|
+
options: options$6
|
|
2961
3127
|
}).pipe(Effect.flatMap((method) => Match.value(method).pipe(Match.when("env", () => Effect.succeed({ method: "env" })), Match.when("sso", () => Effect.gen(function* () {
|
|
2962
3128
|
const config = {
|
|
2963
3129
|
method: "sso",
|
|
@@ -3104,7 +3270,7 @@ const clearDistilledSsoCache = (ssoProfile) => Effect.gen(function* () {
|
|
|
3104
3270
|
init_AuthProvider();
|
|
3105
3271
|
init_Credentials();
|
|
3106
3272
|
const STORAGE_KEY = "axiom-stored";
|
|
3107
|
-
const options$
|
|
3273
|
+
const options$5 = [{
|
|
3108
3274
|
value: "env",
|
|
3109
3275
|
label: "Environment Variables",
|
|
3110
3276
|
hint: "AXIOM_TOKEN (or AXIOM_API_KEY) + optional AXIOM_ORG_ID, AXIOM_URL"
|
|
@@ -3184,7 +3350,7 @@ const AxiomAuth = AuthProviderLayer()(AXIOM_AUTH_PROVIDER_NAME, Effect.gen(funct
|
|
|
3184
3350
|
});
|
|
3185
3351
|
const configureInteractive = (profileName) => select({
|
|
3186
3352
|
message: "Axiom authentication method",
|
|
3187
|
-
options: options$
|
|
3353
|
+
options: options$5
|
|
3188
3354
|
}).pipe(Effect.flatMap((method) => Match.value(method).pipe(Match.when("env", () => Effect.succeed({ method: "env" })), Match.when("stored", () => loginStored(profileName)), Match.exhaustive)));
|
|
3189
3355
|
const configureCredentials = (profileName, ctx) => Effect.gen(function* () {
|
|
3190
3356
|
if (ctx.ci) return { method: "env" };
|
|
@@ -3388,13 +3554,42 @@ const revoke = (credentials) => Effect.gen(function* () {
|
|
|
3388
3554
|
});
|
|
3389
3555
|
});
|
|
3390
3556
|
/**
|
|
3557
|
+
* Exchange a code copied from the hosted relay page, or extract the code from
|
|
3558
|
+
* either the hosted or loopback callback URL.
|
|
3559
|
+
*/
|
|
3560
|
+
const exchangeCallbackInput$1 = (input, authorization) => Effect.gen(function* () {
|
|
3561
|
+
const value = input.trim();
|
|
3562
|
+
let code = value;
|
|
3563
|
+
let state = null;
|
|
3564
|
+
try {
|
|
3565
|
+
const url = new URL(value);
|
|
3566
|
+
code = url.searchParams.get("code") ?? "";
|
|
3567
|
+
state = url.searchParams.get("state");
|
|
3568
|
+
} catch {
|
|
3569
|
+
const separator = value.lastIndexOf("#");
|
|
3570
|
+
if (separator >= 0) {
|
|
3571
|
+
code = value.slice(0, separator);
|
|
3572
|
+
state = value.slice(separator + 1);
|
|
3573
|
+
}
|
|
3574
|
+
}
|
|
3575
|
+
if (!code) return yield* new OAuthError$1({
|
|
3576
|
+
error: "invalid_request",
|
|
3577
|
+
errorDescription: "The authorization code is missing."
|
|
3578
|
+
});
|
|
3579
|
+
if (state !== null && state !== authorization.state) return yield* new OAuthError$1({
|
|
3580
|
+
error: "invalid_request",
|
|
3581
|
+
errorDescription: "The authorization state does not match."
|
|
3582
|
+
});
|
|
3583
|
+
return yield* exchange$1(code, authorization.verifier);
|
|
3584
|
+
});
|
|
3585
|
+
/**
|
|
3391
3586
|
* Start a local HTTP server to listen for the OAuth callback, exchange
|
|
3392
3587
|
* the authorization code, and return the credentials.
|
|
3393
3588
|
*
|
|
3394
3589
|
* Times out after 5 minutes.
|
|
3395
3590
|
*/
|
|
3396
3591
|
const callback$1 = (authorization) => Effect.tryPromise({
|
|
3397
|
-
try: () => callbackPromise$1(authorization),
|
|
3592
|
+
try: (signal) => callbackPromise$1(authorization, signal),
|
|
3398
3593
|
catch: (err) => {
|
|
3399
3594
|
if (err instanceof OAuthError$1) return err;
|
|
3400
3595
|
return new OAuthError$1({
|
|
@@ -3403,11 +3598,21 @@ const callback$1 = (authorization) => Effect.tryPromise({
|
|
|
3403
3598
|
});
|
|
3404
3599
|
}
|
|
3405
3600
|
});
|
|
3406
|
-
function callbackPromise$1(authorization) {
|
|
3407
|
-
const { pathname, port } = new URL(
|
|
3601
|
+
function callbackPromise$1(authorization, signal) {
|
|
3602
|
+
const { pathname, port } = new URL(OAUTH_LOCAL_CALLBACK_URI$1);
|
|
3408
3603
|
return new Promise((resolve, reject) => {
|
|
3409
3604
|
const server = http.createServer(async (req, res) => {
|
|
3410
3605
|
const url = new URL(req.url ?? "/", `http://${req.headers.host}`);
|
|
3606
|
+
if (url.pathname === "/auth/ping") {
|
|
3607
|
+
res.writeHead(req.method === "OPTIONS" ? 204 : 200, {
|
|
3608
|
+
"Access-Control-Allow-Origin": new URL(OAUTH_REDIRECT_URI$1).origin,
|
|
3609
|
+
"Access-Control-Allow-Methods": "GET, OPTIONS",
|
|
3610
|
+
"Access-Control-Allow-Private-Network": "true",
|
|
3611
|
+
"Cache-Control": "no-store"
|
|
3612
|
+
});
|
|
3613
|
+
res.end();
|
|
3614
|
+
return;
|
|
3615
|
+
}
|
|
3411
3616
|
if (url.pathname !== pathname) {
|
|
3412
3617
|
res.statusCode = 404;
|
|
3413
3618
|
res.end("Not Found");
|
|
@@ -3469,8 +3674,10 @@ function callbackPromise$1(authorization) {
|
|
|
3469
3674
|
}, 300 * 1e3);
|
|
3470
3675
|
function cleanup() {
|
|
3471
3676
|
clearTimeout(timeout);
|
|
3677
|
+
signal.removeEventListener("abort", cleanup);
|
|
3472
3678
|
server.close();
|
|
3473
3679
|
}
|
|
3680
|
+
signal.addEventListener("abort", cleanup, { once: true });
|
|
3474
3681
|
server.on("error", (err) => {
|
|
3475
3682
|
cleanup();
|
|
3476
3683
|
reject(new OAuthError$1({
|
|
@@ -3486,7 +3693,7 @@ function callbackPromise$1(authorization) {
|
|
|
3486
3693
|
//#region lib/Cloudflare/Auth/AuthProvider.js
|
|
3487
3694
|
init_AuthProvider();
|
|
3488
3695
|
init_Credentials();
|
|
3489
|
-
const options$
|
|
3696
|
+
const options$4 = [
|
|
3490
3697
|
{
|
|
3491
3698
|
value: "oauth",
|
|
3492
3699
|
label: "OAuth",
|
|
@@ -3573,8 +3780,12 @@ const CloudflareAuth = AuthProviderLayer()(CLOUDFLARE_AUTH_PROVIDER_NAME, Effect
|
|
|
3573
3780
|
yield* info("Cloudflare: opening browser for OAuth login...");
|
|
3574
3781
|
yield* info(authorization.url);
|
|
3575
3782
|
yield* openUrl(authorization.url).pipe(Effect.catch(() => warn("Cloudflare: could not open browser automatically. Please open the URL above manually.")));
|
|
3576
|
-
yield* info("Cloudflare: waiting for authorization (up to 5 minutes)
|
|
3577
|
-
const credentials = yield* callback$1(authorization)
|
|
3783
|
+
yield* info("Cloudflare: waiting for authorization (up to 5 minutes).");
|
|
3784
|
+
const credentials = yield* Effect.raceFirst(callback$1(authorization), text({
|
|
3785
|
+
message: "Paste the authorization code or callback URL",
|
|
3786
|
+
placeholder: "The browser will complete this automatically when local",
|
|
3787
|
+
validate: (value) => value.trim().length > 0 ? void 0 : "Paste a code or URL"
|
|
3788
|
+
}).pipe(Effect.flatMap((input) => exchangeCallbackInput$1(input, authorization))));
|
|
3578
3789
|
yield* store.write(profileName, "cf-oauth", credentials);
|
|
3579
3790
|
yield* success("Cloudflare: OAuth credentials saved.");
|
|
3580
3791
|
return credentials;
|
|
@@ -3643,7 +3854,7 @@ const CloudflareAuth = AuthProviderLayer()(CLOUDFLARE_AUTH_PROVIDER_NAME, Effect
|
|
|
3643
3854
|
});
|
|
3644
3855
|
const configureInteractive = (profileName) => select({
|
|
3645
3856
|
message: "Cloudflare authentication method",
|
|
3646
|
-
options: options$
|
|
3857
|
+
options: options$4
|
|
3647
3858
|
}).pipe(Effect.flatMap((method) => Match.value(method).pipe(Match.when("env", () => Effect.succeed({ method: "env" })), Match.when("oauth", () => configureOAuth(profileName)), Match.when("stored", () => loginStored(profileName)), Match.exhaustive)));
|
|
3648
3859
|
const configureCredentials = (profileName, ctx) => Effect.gen(function* () {
|
|
3649
3860
|
const config = ctx.ci ? { method: "env" } : yield* configureInteractive(profileName);
|
|
@@ -3852,7 +4063,8 @@ const DEFAULT_SCOPES = [
|
|
|
3852
4063
|
"zone:read"
|
|
3853
4064
|
];
|
|
3854
4065
|
const OAUTH_CLIENT_ID$1 = "6d8c2255-0773-45f6-b376-2914632e6f91";
|
|
3855
|
-
const OAUTH_REDIRECT_URI$1 = "
|
|
4066
|
+
const OAUTH_REDIRECT_URI$1 = "https://alchemy.run/auth/callback";
|
|
4067
|
+
const OAUTH_LOCAL_CALLBACK_URI$1 = "http://localhost:9976/auth/callback";
|
|
3856
4068
|
const OAUTH_ENDPOINTS$1 = {
|
|
3857
4069
|
authorize: "https://dash.cloudflare.com/oauth2/authorize",
|
|
3858
4070
|
token: "https://dash.cloudflare.com/oauth2/token",
|
|
@@ -3918,7 +4130,7 @@ const resolveGitHubBaseUrlFromEnv = Effect.gen(function* () {
|
|
|
3918
4130
|
//#region lib/GitHub/AuthProvider.js
|
|
3919
4131
|
init_AuthProvider();
|
|
3920
4132
|
init_Credentials();
|
|
3921
|
-
const options$
|
|
4133
|
+
const options$3 = [
|
|
3922
4134
|
{
|
|
3923
4135
|
value: "gh-cli",
|
|
3924
4136
|
label: "GitHub CLI",
|
|
@@ -4019,7 +4231,7 @@ const makeGitHubAuth = (authOptions) => AuthProviderLayer()(GITHUB_AUTH_PROVIDER
|
|
|
4019
4231
|
const configureInteractive = (profileName) => Effect.gen(function* () {
|
|
4020
4232
|
const method = yield* select({
|
|
4021
4233
|
message: "GitHub authentication method",
|
|
4022
|
-
options: options$
|
|
4234
|
+
options: options$3
|
|
4023
4235
|
});
|
|
4024
4236
|
const baseUrl = fixed !== void 0 ? void 0 : yield* promptBaseUrl;
|
|
4025
4237
|
const verifyHost = fixed !== void 0 ? fixed.baseUrl : baseUrl;
|
|
@@ -4095,7 +4307,7 @@ init_AuthProvider();
|
|
|
4095
4307
|
init_Credentials();
|
|
4096
4308
|
init_Profile();
|
|
4097
4309
|
const NEON_AUTH_PROVIDER_NAME = "Neon";
|
|
4098
|
-
const options$
|
|
4310
|
+
const options$2 = [{
|
|
4099
4311
|
value: "env",
|
|
4100
4312
|
label: "Environment Variable",
|
|
4101
4313
|
hint: "NEON_API_KEY"
|
|
@@ -4125,7 +4337,7 @@ const NeonAuth = AuthProviderLayer()(NEON_AUTH_PROVIDER_NAME, Effect.gen(functio
|
|
|
4125
4337
|
});
|
|
4126
4338
|
const configureInteractive = (profileName) => select({
|
|
4127
4339
|
message: "Neon authentication method",
|
|
4128
|
-
options: options$
|
|
4340
|
+
options: options$2
|
|
4129
4341
|
}).pipe(Effect.flatMap((method) => Match.value(method).pipe(Match.when("env", () => Effect.succeed({ method: "env" })), Match.when("stored", () => loginStored(profileName)), Match.exhaustive)));
|
|
4130
4342
|
const configureCredentials = (profileName, ctx) => Effect.gen(function* () {
|
|
4131
4343
|
if (ctx.ci) return { method: "env" };
|
|
@@ -4198,7 +4410,8 @@ var OAuthError = class extends Data.TaggedError("OAuthError") {};
|
|
|
4198
4410
|
*/
|
|
4199
4411
|
const OAUTH_CLIENT_ID = "pscale_app_aa12e3938baebb788aac443f66e422da";
|
|
4200
4412
|
const OAUTH_CLIENT_SECRET = "pscale_app_secret_yyZ3Q8oe99GP9_yA5wrA5er6RuN6Lz9dC66Bj1OJzpg";
|
|
4201
|
-
const OAUTH_REDIRECT_URI = "
|
|
4413
|
+
const OAUTH_REDIRECT_URI = "https://alchemy.run/auth/callback";
|
|
4414
|
+
const OAUTH_LOCAL_CALLBACK_URI = "http://localhost:9976/auth/callback";
|
|
4202
4415
|
const OAUTH_ENDPOINTS = {
|
|
4203
4416
|
authorize: "https://app.planetscale.com/oauth/authorize",
|
|
4204
4417
|
token: "https://auth.planetscale.com/oauth/token"
|
|
@@ -4288,13 +4501,42 @@ const refresh = (credentials) => tokenRequest({
|
|
|
4288
4501
|
client_secret: OAUTH_CLIENT_SECRET
|
|
4289
4502
|
});
|
|
4290
4503
|
/**
|
|
4504
|
+
* Exchange a code copied from the hosted relay page, or extract the code from
|
|
4505
|
+
* either the hosted or loopback callback URL.
|
|
4506
|
+
*/
|
|
4507
|
+
const exchangeCallbackInput = (input, authorization) => Effect.gen(function* () {
|
|
4508
|
+
const value = input.trim();
|
|
4509
|
+
let code = value;
|
|
4510
|
+
let state = null;
|
|
4511
|
+
try {
|
|
4512
|
+
const url = new URL(value);
|
|
4513
|
+
code = url.searchParams.get("code") ?? "";
|
|
4514
|
+
state = url.searchParams.get("state");
|
|
4515
|
+
} catch {
|
|
4516
|
+
const separator = value.lastIndexOf("#");
|
|
4517
|
+
if (separator >= 0) {
|
|
4518
|
+
code = value.slice(0, separator);
|
|
4519
|
+
state = value.slice(separator + 1);
|
|
4520
|
+
}
|
|
4521
|
+
}
|
|
4522
|
+
if (!code) return yield* new OAuthError({
|
|
4523
|
+
error: "invalid_request",
|
|
4524
|
+
errorDescription: "The authorization code is missing."
|
|
4525
|
+
});
|
|
4526
|
+
if (state !== null && state !== authorization.state) return yield* new OAuthError({
|
|
4527
|
+
error: "invalid_request",
|
|
4528
|
+
errorDescription: "The authorization state does not match."
|
|
4529
|
+
});
|
|
4530
|
+
return yield* exchange(code);
|
|
4531
|
+
});
|
|
4532
|
+
/**
|
|
4291
4533
|
* Start a local HTTP server to listen for the OAuth callback, exchange
|
|
4292
4534
|
* the authorization code, and return the credentials.
|
|
4293
4535
|
*
|
|
4294
4536
|
* Times out after 5 minutes.
|
|
4295
4537
|
*/
|
|
4296
4538
|
const callback = (authorization) => Effect.tryPromise({
|
|
4297
|
-
try: () => callbackPromise(authorization),
|
|
4539
|
+
try: (signal) => callbackPromise(authorization, signal),
|
|
4298
4540
|
catch: (err) => {
|
|
4299
4541
|
if (err instanceof OAuthError) return err;
|
|
4300
4542
|
return new OAuthError({
|
|
@@ -4303,11 +4545,21 @@ const callback = (authorization) => Effect.tryPromise({
|
|
|
4303
4545
|
});
|
|
4304
4546
|
}
|
|
4305
4547
|
});
|
|
4306
|
-
function callbackPromise(authorization) {
|
|
4307
|
-
const { pathname, port } = new URL(
|
|
4548
|
+
function callbackPromise(authorization, signal) {
|
|
4549
|
+
const { pathname, port } = new URL(OAUTH_LOCAL_CALLBACK_URI);
|
|
4308
4550
|
return new Promise((resolve, reject) => {
|
|
4309
4551
|
const server = http.createServer(async (req, res) => {
|
|
4310
4552
|
const url = new URL(req.url ?? "/", `http://${req.headers.host}`);
|
|
4553
|
+
if (url.pathname === "/auth/ping") {
|
|
4554
|
+
res.writeHead(req.method === "OPTIONS" ? 204 : 200, {
|
|
4555
|
+
"Access-Control-Allow-Origin": new URL(OAUTH_REDIRECT_URI).origin,
|
|
4556
|
+
"Access-Control-Allow-Methods": "GET, OPTIONS",
|
|
4557
|
+
"Access-Control-Allow-Private-Network": "true",
|
|
4558
|
+
"Cache-Control": "no-store"
|
|
4559
|
+
});
|
|
4560
|
+
res.end();
|
|
4561
|
+
return;
|
|
4562
|
+
}
|
|
4311
4563
|
if (url.pathname !== pathname) {
|
|
4312
4564
|
res.statusCode = 404;
|
|
4313
4565
|
res.end("Not Found");
|
|
@@ -4369,8 +4621,10 @@ function callbackPromise(authorization) {
|
|
|
4369
4621
|
}, 300 * 1e3);
|
|
4370
4622
|
function cleanup() {
|
|
4371
4623
|
clearTimeout(timeout);
|
|
4624
|
+
signal.removeEventListener("abort", cleanup);
|
|
4372
4625
|
server.close();
|
|
4373
4626
|
}
|
|
4627
|
+
signal.addEventListener("abort", cleanup, { once: true });
|
|
4374
4628
|
server.on("error", (err) => {
|
|
4375
4629
|
cleanup();
|
|
4376
4630
|
reject(new OAuthError({
|
|
@@ -4426,7 +4680,7 @@ const selectOrganization = (accessToken) => Effect.gen(function* () {
|
|
|
4426
4680
|
}))
|
|
4427
4681
|
}).pipe(retryOnce);
|
|
4428
4682
|
}).pipe((e) => withOAuthCredentials(accessToken, e));
|
|
4429
|
-
const options = [
|
|
4683
|
+
const options$1 = [
|
|
4430
4684
|
{
|
|
4431
4685
|
value: "env",
|
|
4432
4686
|
label: "Environment Variables",
|
|
@@ -4462,8 +4716,12 @@ const PlanetscaleAuth = AuthProviderLayer()(PLANETSCALE_AUTH_PROVIDER_NAME, Effe
|
|
|
4462
4716
|
yield* info("Planetscale: opening browser for OAuth login...");
|
|
4463
4717
|
yield* info(authorization.url);
|
|
4464
4718
|
yield* openUrl(authorization.url).pipe(Effect.catch(() => warn("Planetscale: could not open browser automatically. Please open the URL above manually.")));
|
|
4465
|
-
yield* info("Planetscale: waiting for authorization (up to 5 minutes)
|
|
4466
|
-
const credentials = yield* callback(authorization)
|
|
4719
|
+
yield* info("Planetscale: waiting for authorization (up to 5 minutes).");
|
|
4720
|
+
const credentials = yield* Effect.raceFirst(callback(authorization), text({
|
|
4721
|
+
message: "Paste the authorization code or callback URL",
|
|
4722
|
+
placeholder: "The browser will complete this automatically when local",
|
|
4723
|
+
validate: (value) => value.trim().length > 0 ? void 0 : "Paste a code or URL"
|
|
4724
|
+
}).pipe(Effect.flatMap((input) => exchangeCallbackInput(input, authorization))));
|
|
4467
4725
|
yield* store.write(profileName, "planetscale-oauth", credentials);
|
|
4468
4726
|
yield* success("Planetscale: OAuth credentials saved.");
|
|
4469
4727
|
return credentials;
|
|
@@ -4504,7 +4762,7 @@ const PlanetscaleAuth = AuthProviderLayer()(PLANETSCALE_AUTH_PROVIDER_NAME, Effe
|
|
|
4504
4762
|
});
|
|
4505
4763
|
const configureInteractive = (profileName) => select({
|
|
4506
4764
|
message: "Planetscale authentication method",
|
|
4507
|
-
options
|
|
4765
|
+
options: options$1
|
|
4508
4766
|
}).pipe(Effect.flatMap((method) => Match.value(method).pipe(Match.when("env", () => Effect.succeed({ method: "env" })), Match.when("oauth", () => configureOAuth(profileName)), Match.when("stored", () => loginStored(profileName)), Match.exhaustive)));
|
|
4509
4767
|
const configureCredentials = (profileName, ctx) => Effect.gen(function* () {
|
|
4510
4768
|
if (ctx.ci) return { method: "env" };
|
|
@@ -4589,6 +4847,108 @@ const PlanetscaleAuth = AuthProviderLayer()(PLANETSCALE_AUTH_PROVIDER_NAME, Effe
|
|
|
4589
4847
|
};
|
|
4590
4848
|
}));
|
|
4591
4849
|
|
|
4850
|
+
//#endregion
|
|
4851
|
+
//#region lib/Prisma/AuthProvider.js
|
|
4852
|
+
init_AuthProvider();
|
|
4853
|
+
init_Credentials();
|
|
4854
|
+
init_Profile();
|
|
4855
|
+
const PRISMA_AUTH_PROVIDER_NAME = "Prisma";
|
|
4856
|
+
const PRISMA_SERVICE_TOKEN_ENV = "PRISMA_SERVICE_TOKEN";
|
|
4857
|
+
const PRISMA_API_TOKEN_ENV = "PRISMA_API_TOKEN";
|
|
4858
|
+
const options = [{
|
|
4859
|
+
value: "env",
|
|
4860
|
+
label: "Environment Variable",
|
|
4861
|
+
hint: `${PRISMA_SERVICE_TOKEN_ENV} or ${PRISMA_API_TOKEN_ENV}`
|
|
4862
|
+
}, {
|
|
4863
|
+
value: "stored",
|
|
4864
|
+
label: "Service Token",
|
|
4865
|
+
hint: "enter interactively, stored in ~/.alchemy/credentials"
|
|
4866
|
+
}];
|
|
4867
|
+
const nonEmptyToken = (token) => token !== void 0 && Redacted.value(token).trim().length > 0;
|
|
4868
|
+
const validStoredCredentials = (credentials) => credentials?.type === "serviceToken" && credentials.serviceToken.trim().length > 0;
|
|
4869
|
+
const trimToken = (token) => Redacted.make(Redacted.value(token).trim());
|
|
4870
|
+
const readEnvServiceToken = Effect.fnUntraced(function* () {
|
|
4871
|
+
const serviceToken = yield* getEnvRedacted(PRISMA_SERVICE_TOKEN_ENV);
|
|
4872
|
+
if (nonEmptyToken(serviceToken)) return {
|
|
4873
|
+
serviceToken: trimToken(serviceToken),
|
|
4874
|
+
envName: PRISMA_SERVICE_TOKEN_ENV
|
|
4875
|
+
};
|
|
4876
|
+
const apiToken = yield* getEnvRedacted(PRISMA_API_TOKEN_ENV);
|
|
4877
|
+
if (nonEmptyToken(apiToken)) return {
|
|
4878
|
+
serviceToken: trimToken(apiToken),
|
|
4879
|
+
envName: PRISMA_API_TOKEN_ENV
|
|
4880
|
+
};
|
|
4881
|
+
});
|
|
4882
|
+
/**
|
|
4883
|
+
* Layer that registers the Prisma Management API auth provider.
|
|
4884
|
+
*/
|
|
4885
|
+
const PrismaAuth = AuthProviderLayer()(PRISMA_AUTH_PROVIDER_NAME, Effect.gen(function* () {
|
|
4886
|
+
const profiles = yield* AlchemyProfile;
|
|
4887
|
+
const store = yield* CredentialsStore;
|
|
4888
|
+
const loginStored = Effect.fnUntraced(function* (profileName) {
|
|
4889
|
+
const serviceToken = yield* password({
|
|
4890
|
+
message: "Prisma Service Token",
|
|
4891
|
+
validate: (v) => v.trim().length === 0 ? "Required" : void 0
|
|
4892
|
+
}).pipe(retryOnce);
|
|
4893
|
+
yield* store.write(profileName, "prisma-stored", {
|
|
4894
|
+
type: "serviceToken",
|
|
4895
|
+
serviceToken: serviceToken.trim()
|
|
4896
|
+
});
|
|
4897
|
+
yield* success("Prisma: credentials saved.");
|
|
4898
|
+
return { method: "stored" };
|
|
4899
|
+
});
|
|
4900
|
+
const configureInteractive = (profileName) => select({
|
|
4901
|
+
message: "Prisma authentication method",
|
|
4902
|
+
options
|
|
4903
|
+
}).pipe(Effect.flatMap((method) => Match.value(method).pipe(Match.when("env", () => Effect.succeed({ method: "env" })), Match.when("stored", () => loginStored(profileName)), Match.exhaustive)));
|
|
4904
|
+
const configure = (profileName, ctx) => Effect.gen(function* () {
|
|
4905
|
+
if (ctx.ci) return { method: "env" };
|
|
4906
|
+
return yield* configureInteractive(profileName);
|
|
4907
|
+
}).pipe(Effect.mapError((e) => new AuthError({
|
|
4908
|
+
message: "failed to configure credentials",
|
|
4909
|
+
cause: e
|
|
4910
|
+
})));
|
|
4911
|
+
const read = (profileName, config) => Match.value(config).pipe(Match.when({ method: "env" }, Effect.fnUntraced(function* () {
|
|
4912
|
+
const envToken = yield* readEnvServiceToken();
|
|
4913
|
+
if (!envToken) return yield* new AuthError({ message: `Prisma env credentials not found. Set ${PRISMA_SERVICE_TOKEN_ENV} or ${PRISMA_API_TOKEN_ENV}.` });
|
|
4914
|
+
return {
|
|
4915
|
+
type: "serviceToken",
|
|
4916
|
+
serviceToken: envToken.serviceToken,
|
|
4917
|
+
source: {
|
|
4918
|
+
type: "env",
|
|
4919
|
+
details: envToken.envName
|
|
4920
|
+
}
|
|
4921
|
+
};
|
|
4922
|
+
})), Match.when({ method: "stored" }, () => store.read(profileName, "prisma-stored").pipe(Effect.flatMap((creds) => !validStoredCredentials(creds) ? Effect.fail(new AuthError({ message: creds == null ? "Prisma stored credentials not found. Run: alchemy login --configure" : "Prisma stored credentials are invalid. Run: alchemy login --configure" })) : Effect.succeed({
|
|
4923
|
+
type: "serviceToken",
|
|
4924
|
+
serviceToken: Redacted.make(creds.serviceToken.trim()),
|
|
4925
|
+
source: { type: "stored" }
|
|
4926
|
+
})))), Match.exhaustive);
|
|
4927
|
+
const login = (profileName, config) => Match.value(config).pipe(Match.when({ method: "env" }, () => readEnvServiceToken().pipe(Effect.flatMap((envToken) => envToken ? Effect.void : Effect.gen(function* () {
|
|
4928
|
+
const next = yield* configureInteractive(profileName);
|
|
4929
|
+
const existing = yield* profiles.getProfile(profileName);
|
|
4930
|
+
yield* profiles.setProfile(profileName, {
|
|
4931
|
+
...existing,
|
|
4932
|
+
[PRISMA_AUTH_PROVIDER_NAME]: next
|
|
4933
|
+
});
|
|
4934
|
+
})))), Match.when({ method: "stored" }, () => store.read(profileName, "prisma-stored").pipe(Effect.flatMap((creds) => validStoredCredentials(creds) ? Effect.void : loginStored(profileName)))), Match.exhaustive).pipe(Effect.mapError((e) => new AuthError({
|
|
4935
|
+
message: "login failed",
|
|
4936
|
+
cause: e
|
|
4937
|
+
})));
|
|
4938
|
+
const logout = (profileName, config) => Match.value(config).pipe(Match.when({ method: "env" }, () => Effect.void), Match.when({ method: "stored" }, () => store.delete(profileName, "prisma-stored").pipe(Effect.andThen(success("Prisma: stored credentials removed")))), Match.exhaustive);
|
|
4939
|
+
const prettyPrint = (profileName, config) => read(profileName, config).pipe(Effect.tap((creds) => {
|
|
4940
|
+
const source = creds.source.details ? `${creds.source.type} - ${creds.source.details}` : creds.source.type;
|
|
4941
|
+
return Effect.all([Console.log(` serviceToken: ${displayRedacted(creds.serviceToken, 9)}`), Console.log(` source: ${source}`)]);
|
|
4942
|
+
}), Effect.catch((e) => Console.error(` Failed to retrieve credentials: ${e}`)));
|
|
4943
|
+
return {
|
|
4944
|
+
configure,
|
|
4945
|
+
login,
|
|
4946
|
+
logout,
|
|
4947
|
+
prettyPrint,
|
|
4948
|
+
read
|
|
4949
|
+
};
|
|
4950
|
+
}));
|
|
4951
|
+
|
|
4592
4952
|
//#endregion
|
|
4593
4953
|
//#region lib/Cli/commands/_shared.js
|
|
4594
4954
|
init_AuthProvider();
|
|
@@ -4704,13 +5064,13 @@ const placeholderStack = (name) => ({
|
|
|
4704
5064
|
* entrypoint is fatal (login / nuke let it propagate) or best-effort
|
|
4705
5065
|
* (profile show wraps the call in `Effect.catchCause`).
|
|
4706
5066
|
*/
|
|
4707
|
-
const buildStackProviders = Effect.fn("buildStackProviders")(function* (options$
|
|
4708
|
-
const authProviders = options$
|
|
4709
|
-
const stackEffect = yield* importStack(options$
|
|
4710
|
-
const configProvider = withProfileOverride(yield* loadConfigProvider(options$
|
|
5067
|
+
const buildStackProviders = Effect.fn("buildStackProviders")(function* (options$7) {
|
|
5068
|
+
const authProviders = options$7.registry ?? {};
|
|
5069
|
+
const stackEffect = yield* importStack(options$7.main);
|
|
5070
|
+
const configProvider = withProfileOverride(yield* loadConfigProvider(options$7.envFile), options$7.profile);
|
|
4711
5071
|
return {
|
|
4712
5072
|
authProviders,
|
|
4713
|
-
context: yield* Layer.build((stackEffect.providers ?? Layer.empty).pipe(Layer.provideMerge(stackEffect.state ?? Layer.empty), Layer.provideMerge(Layer.mergeAll(Layer.succeed(AuthProviders, authProviders), ConfigProvider.layer(configProvider), options$
|
|
5073
|
+
context: yield* Layer.build((stackEffect.providers ?? Layer.empty).pipe(Layer.provideMerge(stackEffect.state ?? Layer.empty), Layer.provideMerge(Layer.mergeAll(Layer.succeed(AuthProviders, authProviders), ConfigProvider.layer(configProvider), options$7.logger ?? Logger.layer([fileLogger("out")], { mergeWithExisting: true }), Layer.succeed(Stage, "placeholder"), Layer.succeed(Stack, placeholderStack(stackEffect.stackName)), options$7.extra ?? Layer.empty)))),
|
|
4714
5074
|
stackEffect
|
|
4715
5075
|
};
|
|
4716
5076
|
});
|
|
@@ -4720,14 +5080,14 @@ const buildStackProviders = Effect.fn("buildStackProviders")(function* (options$
|
|
|
4720
5080
|
* `alchemy profile show` can pretty-print any provider a profile mentions,
|
|
4721
5081
|
* even one the current stack doesn't wire up.
|
|
4722
5082
|
*/
|
|
4723
|
-
const builtinAuth = Layer.mergeAll(AwsAuth, AxiomAuth, CloudflareAuth, GitHubAuth, NeonAuth, PlanetscaleAuth);
|
|
5083
|
+
const builtinAuth = Layer.mergeAll(AwsAuth, AxiomAuth, CloudflareAuth, GitHubAuth, NeonAuth, PlanetscaleAuth, PrismaAuth);
|
|
4724
5084
|
/**
|
|
4725
5085
|
* Build {@link builtinAuth} against `registry` so every built-in auth
|
|
4726
5086
|
* provider registers itself, without importing any stack entrypoint.
|
|
4727
5087
|
*/
|
|
4728
|
-
const buildBuiltinAuthProviders = Effect.fn("buildBuiltinAuthProviders")(function* (options$
|
|
4729
|
-
const authProviders = options$
|
|
4730
|
-
yield* Layer.build(Layer.provide(builtinAuth, Layer.mergeAll(Layer.succeed(AuthProviders, authProviders), ConfigProvider.layer(withProfileOverride(yield* loadConfigProvider(options$
|
|
5088
|
+
const buildBuiltinAuthProviders = Effect.fn("buildBuiltinAuthProviders")(function* (options$7) {
|
|
5089
|
+
const authProviders = options$7.registry ?? {};
|
|
5090
|
+
yield* Layer.build(Layer.provide(builtinAuth, Layer.mergeAll(Layer.succeed(AuthProviders, authProviders), ConfigProvider.layer(withProfileOverride(yield* loadConfigProvider(options$7.envFile), options$7.profile)), Logger.layer([fileLogger("out")], { mergeWithExisting: true }))));
|
|
4731
5091
|
return authProviders;
|
|
4732
5092
|
});
|
|
4733
5093
|
|
|
@@ -4765,7 +5125,7 @@ const stackSpanAttrs = (args) => ({
|
|
|
4765
5125
|
"alchemy.adopt": !!args.adopt
|
|
4766
5126
|
});
|
|
4767
5127
|
const adopt = Flag.boolean("adopt").pipe(Flag.withDescription("Adopt pre-existing cloud resources that conflict with this stack instead of failing. Useful for re-importing infrastructure into a fresh state store."), Flag.withDefault(false));
|
|
4768
|
-
const execStack = Effect.fn(function* ({ main, stage: stage$1, envFile: envFile$1, profile: profile$1, dryRun: dryRun$1 = false, force: force$1 = false, yes: yes$1 = false, destroy = false, dev = false, adopt: adopt$1 = false }) {
|
|
5128
|
+
const execStack = Effect.fn(function* ({ main, stage: stage$1, envFile: envFile$1, profile: profile$1, dryRun: dryRun$1 = false, force: force$1 = false, yes: yes$1 = false, destroy: destroy$1 = false, dev = false, adopt: adopt$1 = false }) {
|
|
4769
5129
|
const stackEffect = yield* importStack(main);
|
|
4770
5130
|
const services$1 = Layer.mergeAll(Layer.effect(AlchemyContext, AlchemyContext.pipe(Effect.map((ctx) => ({
|
|
4771
5131
|
...ctx,
|
|
@@ -4777,13 +5137,7 @@ const execStack = Effect.fn(function* ({ main, stage: stage$1, envFile: envFile$
|
|
|
4777
5137
|
const cli = yield* Cli;
|
|
4778
5138
|
const stack = yield* stackEffect;
|
|
4779
5139
|
yield* Effect.gen(function* () {
|
|
4780
|
-
const updatePlan = yield* make(
|
|
4781
|
-
...stack,
|
|
4782
|
-
resources: {},
|
|
4783
|
-
bindings: {},
|
|
4784
|
-
actions: {},
|
|
4785
|
-
output: {}
|
|
4786
|
-
} : stack, { force: force$1 });
|
|
5140
|
+
const updatePlan = destroy$1 ? yield* destroy(stack) : yield* make(stack, { force: force$1 });
|
|
4787
5141
|
if (dryRun$1) yield* cli.displayPlan(updatePlan);
|
|
4788
5142
|
else {
|
|
4789
5143
|
const hasChanges = Object.keys(updatePlan.deletions).length > 0 || Object.values(updatePlan.resources).some((node) => node.action !== "noop" || node.bindings.some((b) => b.action !== "noop"));
|