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
|
@@ -11,6 +11,7 @@ import { type MemoOptions } from "../../Command/Memo.ts";
|
|
|
11
11
|
import type { Dependencies } from "../../Dependencies.ts";
|
|
12
12
|
import type { InputProps } from "../../Input.ts";
|
|
13
13
|
import type { Named, Tag } from "../../Named.ts";
|
|
14
|
+
import type * as Output from "../../Output.ts";
|
|
14
15
|
import {
|
|
15
16
|
Platform,
|
|
16
17
|
type Main,
|
|
@@ -278,6 +279,13 @@ export type WorkerBindingProps = {
|
|
|
278
279
|
| Effect.Effect<WorkerBindingResource, any, any>;
|
|
279
280
|
};
|
|
280
281
|
|
|
282
|
+
type Unwrap<T> = T extends Output.Output<infer A, infer _Req> ? A : T;
|
|
283
|
+
|
|
284
|
+
// NOTE: `Worker<NormalizedBindings<...>>` must provably satisfy the
|
|
285
|
+
// `WorkerBindings` constraint for *generic* `Bindings`, which restricts the
|
|
286
|
+
// shapes usable here: conditional checks on the naked parameter `T` and an
|
|
287
|
+
// outermost `Extract<..., WorkerBindingResource>` are provable; e.g.
|
|
288
|
+
// `Unwrap<T> extends ...` as a check type is not.
|
|
281
289
|
export type NormalizedBindings<
|
|
282
290
|
Bindings extends WorkerBindingProps = {},
|
|
283
291
|
AssetsConfig extends WorkerAssetsConfig | undefined = undefined,
|
|
@@ -287,14 +295,71 @@ export type NormalizedBindings<
|
|
|
287
295
|
any,
|
|
288
296
|
any
|
|
289
297
|
>
|
|
290
|
-
? T extends Redacted.Redacted<infer
|
|
291
|
-
?
|
|
292
|
-
: T
|
|
293
|
-
: Extract<Bindings[B]
|
|
298
|
+
? T extends Redacted.Redacted<infer V> | Config.Config<infer V>
|
|
299
|
+
? V
|
|
300
|
+
: Unwrap<T>
|
|
301
|
+
: Extract<Unwrap<Bindings[B]>, WorkerBindingResource>;
|
|
294
302
|
} & (undefined extends AssetsConfig ? {} : { ASSETS: Assets });
|
|
295
303
|
|
|
296
304
|
export type WorkerAssetsConfig = string | AssetsProps | AssetsWithHash;
|
|
297
305
|
|
|
306
|
+
/**
|
|
307
|
+
* Fine-grained control over the Worker's `workers.dev` surface. The two
|
|
308
|
+
* toggles are independent on the Cloudflare API.
|
|
309
|
+
*/
|
|
310
|
+
export interface WorkersDevConfig {
|
|
311
|
+
/**
|
|
312
|
+
* Serve the Worker at its stable `workers.dev` URL
|
|
313
|
+
* (`https://<worker-name>.<account-subdomain>.workers.dev`).
|
|
314
|
+
* @default true
|
|
315
|
+
*/
|
|
316
|
+
enabled?: boolean;
|
|
317
|
+
/**
|
|
318
|
+
* Enable version preview URLs — a distinct
|
|
319
|
+
* `https://<version-prefix>-<worker-name>.<account-subdomain>.workers.dev`
|
|
320
|
+
* URL per uploaded version, plus stable aliased preview URLs
|
|
321
|
+
* (`https://<alias>-...`) for versions uploaded with an alias.
|
|
322
|
+
*
|
|
323
|
+
* When previews are enabled but {@link enabled} is `false`, the current
|
|
324
|
+
* version's preview URL becomes the Worker's primary `url` output.
|
|
325
|
+
* @default true
|
|
326
|
+
*/
|
|
327
|
+
previewsEnabled?: boolean;
|
|
328
|
+
}
|
|
329
|
+
|
|
330
|
+
/**
|
|
331
|
+
* The Worker's custom-domain configuration: one canonical hostname, plus
|
|
332
|
+
* optional aliases that also serve the Worker and redirect hostnames that
|
|
333
|
+
* 301 to the canonical name.
|
|
334
|
+
*/
|
|
335
|
+
export interface WorkerDomainConfig {
|
|
336
|
+
/**
|
|
337
|
+
* The canonical hostname (e.g. `"example.com"`). Attached to the Worker
|
|
338
|
+
* as a Cloudflare custom domain — DNS record and edge certificate are
|
|
339
|
+
* managed automatically. The Cloudflare zone is inferred from the
|
|
340
|
+
* hostname and must already exist in the account.
|
|
341
|
+
*
|
|
342
|
+
* When set, `https://<name>` is the Worker's primary `url` output.
|
|
343
|
+
*/
|
|
344
|
+
name: string;
|
|
345
|
+
/**
|
|
346
|
+
* Additional hostnames that serve the Worker (e.g. `"www.example.com"`,
|
|
347
|
+
* `"api.example.com"`). Each is attached as its own custom domain.
|
|
348
|
+
* Order matters: aliases follow `name` in the `urls` output.
|
|
349
|
+
*/
|
|
350
|
+
aliases?: string[];
|
|
351
|
+
/**
|
|
352
|
+
* Hostnames that permanently redirect (HTTP 301, path and query
|
|
353
|
+
* preserved) to {@link name} — e.g. `"old.example.com"`. Each is
|
|
354
|
+
* attached as a custom domain (for DNS + TLS) with a redirect rule in
|
|
355
|
+
* the zone's `http_request_dynamic_redirect` phase, which runs before
|
|
356
|
+
* the Worker — redirected requests never invoke it. Redirect hostnames
|
|
357
|
+
* serve no content, so they appear in the `domain` output but never in
|
|
358
|
+
* `urls`.
|
|
359
|
+
*/
|
|
360
|
+
redirects?: string[];
|
|
361
|
+
}
|
|
362
|
+
|
|
298
363
|
export interface WorkerRouteConfig {
|
|
299
364
|
/**
|
|
300
365
|
* URL pattern to match incoming requests against, e.g.
|
|
@@ -317,6 +382,187 @@ export interface WorkerRouteConfig {
|
|
|
317
382
|
zone?: ZoneReference;
|
|
318
383
|
}
|
|
319
384
|
|
|
385
|
+
/**
|
|
386
|
+
* Version-affinity configuration — keeps each user on one version for the
|
|
387
|
+
* duration of a gradual rollout.
|
|
388
|
+
*
|
|
389
|
+
* Percentages route each request independently, so one user can bounce
|
|
390
|
+
* between versions mid-rollout. Cloudflare pins a request to a version
|
|
391
|
+
* deterministically when it carries a `Cloudflare-Workers-Version-Key`
|
|
392
|
+
* header: the key is hashed and assigned a version from the current
|
|
393
|
+
* percentages, so equal keys always land on the same version, and pinned
|
|
394
|
+
* users only move forward as percentages rise.
|
|
395
|
+
*
|
|
396
|
+
* Setting `affinity` provisions that header as infrastructure: a `rewrite`
|
|
397
|
+
* Transform Rule in the `http_request_late_transform` phase of every zone
|
|
398
|
+
* the Worker serves on (custom domains and zone routes), scoped to the
|
|
399
|
+
* Worker's hostnames, filling the header from the configured source. The
|
|
400
|
+
* rule is updated in place as the config changes and removed when
|
|
401
|
+
* `affinity` is removed or the Worker is destroyed; other rules in the
|
|
402
|
+
* zone's shared entrypoint are left untouched.
|
|
403
|
+
*
|
|
404
|
+
* Exactly one of {@link cookie}, {@link header}, or {@link key} may be
|
|
405
|
+
* set; {@link ip} combines with `cookie`/`header` as a fallback or stands
|
|
406
|
+
* alone as the sole source.
|
|
407
|
+
*
|
|
408
|
+
* Transform Rules only see **zone traffic** — the Worker must have a
|
|
409
|
+
* `domain` or `routes` (or, with `version.parent`, the parent must).
|
|
410
|
+
* A workers.dev-only Worker fails the deploy with
|
|
411
|
+
* `WorkerVersionConfigError`; on the bare workers.dev URL clients must
|
|
412
|
+
* send the header themselves.
|
|
413
|
+
*/
|
|
414
|
+
export interface WorkerVersionAffinity {
|
|
415
|
+
/**
|
|
416
|
+
* Pin by the value of this request cookie (e.g. a session id). Requests
|
|
417
|
+
* without the cookie fall back to {@link ip} when set, otherwise they
|
|
418
|
+
* route independently by percentage.
|
|
419
|
+
*/
|
|
420
|
+
cookie?: string;
|
|
421
|
+
/**
|
|
422
|
+
* Pin by the value of this request header (e.g. a tenant or user id
|
|
423
|
+
* your edge already stamps, or a stable auth claim forwarded as a
|
|
424
|
+
* header). Requests without the header fall back to {@link ip} when
|
|
425
|
+
* set, otherwise they route independently by percentage.
|
|
426
|
+
*/
|
|
427
|
+
header?: string;
|
|
428
|
+
/**
|
|
429
|
+
* Pin by client IP. On its own (`{ ip: true }`) every request is keyed
|
|
430
|
+
* by `ip.src`; combined with {@link cookie} or {@link header} it is the
|
|
431
|
+
* fallback for requests missing the primary source (e.g. sticky by
|
|
432
|
+
* session cookie, falling back to sticky IP before the cookie is set).
|
|
433
|
+
*/
|
|
434
|
+
ip?: boolean;
|
|
435
|
+
/**
|
|
436
|
+
* Escape hatch: a raw [Rules-language](https://developers.cloudflare.com/ruleset-engine/rules-language/)
|
|
437
|
+
* expression that computes the version key — e.g. a JWT claim via API
|
|
438
|
+
* Shield's `http.request.jwt.claims`, or any composite of request
|
|
439
|
+
* fields. Applied to every request on the Worker's hostnames; cannot be
|
|
440
|
+
* combined with the other sources.
|
|
441
|
+
*/
|
|
442
|
+
key?: string;
|
|
443
|
+
}
|
|
444
|
+
|
|
445
|
+
/**
|
|
446
|
+
* Versioning configuration for a Worker deploy — controls Worker
|
|
447
|
+
* [versions and gradual deployments](https://developers.cloudflare.com/workers/configuration/versions-and-deployments/).
|
|
448
|
+
*
|
|
449
|
+
* Two modes, selected by {@link parent}:
|
|
450
|
+
*
|
|
451
|
+
* - **Version worker** (`parent` set): instead of creating its own script,
|
|
452
|
+
* this Worker uploads an immutable *version* to the referenced parent
|
|
453
|
+
* Worker's script. With `traffic: 0` (the default) the parent's live
|
|
454
|
+
* deployment is untouched and the version is reachable only at its
|
|
455
|
+
* preview URL (`<version-prefix>-<name>.<subdomain>.workers.dev`) —
|
|
456
|
+
* the PR-preview use case. With `traffic > 0` the version becomes a
|
|
457
|
+
* canary taking that percentage of the parent's traffic.
|
|
458
|
+
* - **Gradual rollout** (`parent` omitted): when this Worker deploys
|
|
459
|
+
* itself, the newly uploaded version receives {@link traffic} percent
|
|
460
|
+
* and the currently-live version keeps the remainder, instead of the
|
|
461
|
+
* default 100% cutover.
|
|
462
|
+
*
|
|
463
|
+
* A gradual rollout carries only what a version can: code, bindings,
|
|
464
|
+
* compatibility settings, and cache configuration. Workers with static
|
|
465
|
+
* assets cannot roll out gradually (the versions API cannot carry assets),
|
|
466
|
+
* a deploy that changes Durable Object class migrations must go out at
|
|
467
|
+
* 100% (migrations cannot ride a rollout), and script-level settings
|
|
468
|
+
* (tags, observability, limits, placement, logpush) keep their live
|
|
469
|
+
* values until the next full deploy.
|
|
470
|
+
*/
|
|
471
|
+
export interface WorkerVersionOptions {
|
|
472
|
+
/**
|
|
473
|
+
* The Worker that owns the script this version is uploaded to. Accepts a
|
|
474
|
+
* Worker reference — typically `yield* Cloudflare.Worker.ref(id, { stage,
|
|
475
|
+
* stack })` for a Worker deployed in another stage/stack, or a
|
|
476
|
+
* locally-declared Worker — or a literal script name as an escape hatch.
|
|
477
|
+
*
|
|
478
|
+
* When set, this resource does not create a script of its own: it
|
|
479
|
+
* uploads a version (code + bindings + compatibility settings) to the
|
|
480
|
+
* parent's script. Script-level settings apply immediately to *all*
|
|
481
|
+
* versions of the parent, so they cannot be set on a version worker —
|
|
482
|
+
* `name`, `assets`, `namespace`, `crons`, `domain`, `routes`, `tags`,
|
|
483
|
+
* `logpush`, `observability`, `placement`, `limits`, and `subdomain` are
|
|
484
|
+
* rejected, as are locally-hosted Durable Object or Workflow classes
|
|
485
|
+
* (their migrations would mutate the parent).
|
|
486
|
+
*
|
|
487
|
+
* Changing the parent replaces the resource (a version belongs to
|
|
488
|
+
* exactly one script).
|
|
489
|
+
*/
|
|
490
|
+
parent?: string | Worker;
|
|
491
|
+
/**
|
|
492
|
+
* Percentage of traffic (0–100) the newly uploaded version receives; the
|
|
493
|
+
* currently-live version keeps the remainder. Cloudflare deployments
|
|
494
|
+
* split between at most two versions, so one canary can be active per
|
|
495
|
+
* script at a time.
|
|
496
|
+
*
|
|
497
|
+
* With {@link parent} set, defaults to `0`: the version is
|
|
498
|
+
* preview-URL-only and the parent's live deployment is untouched.
|
|
499
|
+
* Without `parent`, defaults to `100` (today's full cutover); `0` means
|
|
500
|
+
* "upload the version without deploying it" (the equivalent of
|
|
501
|
+
* `wrangler versions upload`).
|
|
502
|
+
*
|
|
503
|
+
* Percentages replace the previous deployment, they never add. Each
|
|
504
|
+
* versioned deploy splits its new version against the *stable* version —
|
|
505
|
+
* the majority holder of the current deployment — so deploying at 10 and
|
|
506
|
+
* then at 20 yields the second version at 20% against the stable version
|
|
507
|
+
* at 80%, with the earlier 10% version dropped from routing entirely
|
|
508
|
+
* (still uploaded, but unreachable even via a version-override header).
|
|
509
|
+
* With unchanged code that replacement is exactly a ramp; with changed
|
|
510
|
+
* code it swaps canaries. The first deploy of a script always goes to
|
|
511
|
+
* 100%, since there is no previous version to split with.
|
|
512
|
+
*
|
|
513
|
+
* Note that a subsequent full deploy of the parent (or of this Worker
|
|
514
|
+
* itself, at the default 100) resets traffic to 100% of its own new
|
|
515
|
+
* version.
|
|
516
|
+
*/
|
|
517
|
+
traffic?: number;
|
|
518
|
+
/**
|
|
519
|
+
* Preview-URL alias for the uploaded version. Aliased preview URLs
|
|
520
|
+
* (`<alias>-<name>.<subdomain>.workers.dev`) are stable — each upload
|
|
521
|
+
* with the same alias re-points the URL at the new version — which is
|
|
522
|
+
* what makes them useful as shareable PR-preview links and lets
|
|
523
|
+
* `Worker.URL` resolve before the version exists.
|
|
524
|
+
*
|
|
525
|
+
* For a version worker ({@link parent} set) an alias is derived
|
|
526
|
+
* automatically from the stack, stage, and logical id, so every version
|
|
527
|
+
* worker gets a stable preview URL out of the box; set this to override
|
|
528
|
+
* it. Must start with a lowercase letter, contain only lowercase
|
|
529
|
+
* letters, digits, and dashes, and `<alias>-<worker-name>` must fit in
|
|
530
|
+
* 63 characters (a DNS label).
|
|
531
|
+
*/
|
|
532
|
+
alias?: string;
|
|
533
|
+
/**
|
|
534
|
+
* Keep each user on one version for the duration of the rollout by
|
|
535
|
+
* pinning them to a stable request property — a session cookie, a
|
|
536
|
+
* header, the client IP, or a raw Rules-language expression:
|
|
537
|
+
*
|
|
538
|
+
* ```typescript
|
|
539
|
+
* version: {
|
|
540
|
+
* traffic: 10,
|
|
541
|
+
* // sticky by session cookie, falling back to sticky IP
|
|
542
|
+
* affinity: { cookie: "session_id", ip: true },
|
|
543
|
+
* }
|
|
544
|
+
* ```
|
|
545
|
+
*
|
|
546
|
+
* Provisions a Transform Rule that fills the
|
|
547
|
+
* `Cloudflare-Workers-Version-Key` header on the zones the Worker
|
|
548
|
+
* serves on — the Worker (or, with {@link parent}, the parent) must
|
|
549
|
+
* have a `domain` or `routes`. With `parent` set, the rule lands on the
|
|
550
|
+
* parent's zones, pinning users across the canary split. See
|
|
551
|
+
* {@link WorkerVersionAffinity}.
|
|
552
|
+
*/
|
|
553
|
+
affinity?: WorkerVersionAffinity;
|
|
554
|
+
/**
|
|
555
|
+
* Human-readable annotation attached to the uploaded version, shown in
|
|
556
|
+
* the Cloudflare dashboard and `wrangler versions list`.
|
|
557
|
+
*/
|
|
558
|
+
message?: string;
|
|
559
|
+
/**
|
|
560
|
+
* Machine-readable tag annotation attached to the uploaded version
|
|
561
|
+
* (e.g. a git commit SHA or PR number).
|
|
562
|
+
*/
|
|
563
|
+
tag?: string;
|
|
564
|
+
}
|
|
565
|
+
|
|
320
566
|
export interface WorkerProps<
|
|
321
567
|
Bindings extends WorkerBindingProps = any,
|
|
322
568
|
Assets extends WorkerAssetsConfig | undefined =
|
|
@@ -350,21 +596,38 @@ export interface WorkerProps<
|
|
|
350
596
|
*/
|
|
351
597
|
namespace?: string | DispatchNamespace;
|
|
352
598
|
/**
|
|
353
|
-
*
|
|
599
|
+
* Worker versions & gradual deployments. Set `version.parent` to upload
|
|
600
|
+
* this Worker as a preview/canary *version* of another Worker's script
|
|
601
|
+
* instead of creating its own; set `version.traffic` below 100 to
|
|
602
|
+
* gradually roll out a deploy of this Worker's own script. See
|
|
603
|
+
* {@link WorkerVersionOptions}.
|
|
604
|
+
*/
|
|
605
|
+
version?: WorkerVersionOptions;
|
|
606
|
+
/**
|
|
607
|
+
* Controls the Worker's `workers.dev` surface.
|
|
608
|
+
*
|
|
609
|
+
* - `true` (the default) — serve the Worker at its stable `workers.dev`
|
|
610
|
+
* URL and enable version preview URLs.
|
|
611
|
+
* - `false` — no `workers.dev` URLs at all.
|
|
612
|
+
* - An object — toggle the stable URL and version previews independently,
|
|
613
|
+
* e.g. `{ enabled: false, previewsEnabled: true }` keeps the stable URL
|
|
614
|
+
* off while each deployed version stays reachable at its preview URL.
|
|
615
|
+
*
|
|
354
616
|
* @default true
|
|
355
617
|
*/
|
|
356
|
-
|
|
618
|
+
workersDev?: boolean | WorkersDevConfig;
|
|
357
619
|
/**
|
|
358
620
|
* Static assets to serve. Can be:
|
|
359
621
|
* - A string path to the assets directory
|
|
360
622
|
* - An AssetsProps object with directory and config
|
|
361
623
|
* - An object with path and hash (e.g., from a Build resource)
|
|
624
|
+
*
|
|
625
|
+
* When neither {@link main} nor {@link script} is provided, the Worker is
|
|
626
|
+
* deployed **assets-only**: no script is uploaded at all and Cloudflare's
|
|
627
|
+
* asset layer serves every request, applying `htmlHandling` /
|
|
628
|
+
* `notFoundHandling` (including single-page-application fallback) itself.
|
|
362
629
|
*/
|
|
363
630
|
assets?: Assets;
|
|
364
|
-
subdomain?: {
|
|
365
|
-
enabled?: boolean;
|
|
366
|
-
previewsEnabled?: boolean;
|
|
367
|
-
};
|
|
368
631
|
/** @internal used by Cloudflare.Website.Vite resource */
|
|
369
632
|
vite?: ViteOptions;
|
|
370
633
|
logpush?: boolean;
|
|
@@ -401,7 +664,8 @@ export interface WorkerProps<
|
|
|
401
664
|
tags?: string[];
|
|
402
665
|
/**
|
|
403
666
|
* Path to the Worker's entry module. Bundled with rolldown before
|
|
404
|
-
* upload. Mutually exclusive with {@link script} — provide
|
|
667
|
+
* upload. Mutually exclusive with {@link script} — provide at most one.
|
|
668
|
+
* Omit both (with {@link assets} set) to deploy an assets-only Worker.
|
|
405
669
|
*
|
|
406
670
|
* A `.py` entry deploys a Python Worker instead: no bundling runs — the
|
|
407
671
|
* entry plus every sibling `.py` file upload as Python modules, the
|
|
@@ -444,6 +708,11 @@ export interface WorkerProps<
|
|
|
444
708
|
* [Secrets & env](/cloudflare/security/secrets-env).
|
|
445
709
|
* - Literal values — routed by shape: `Redacted<string>` →
|
|
446
710
|
* `secret_text`, `string` → `plain_text`, anything else → `json`.
|
|
711
|
+
* - `Output` values that resolve to a plain env value (e.g.
|
|
712
|
+
* `Alchemy.makeRandom`) — classified at deploy time by their
|
|
713
|
+
* resolved value using the literal rules above. Whole-resource
|
|
714
|
+
* Outputs (`Output.of(bucket)`) are rejected at deploy time; bind
|
|
715
|
+
* the resource itself instead.
|
|
447
716
|
*
|
|
448
717
|
* In Effect-native Workers you can alternatively `yield*` a
|
|
449
718
|
* `Config` in the Init phase to register the binding implicitly;
|
|
@@ -464,11 +733,20 @@ export interface WorkerProps<
|
|
|
464
733
|
*/
|
|
465
734
|
crons?: string[];
|
|
466
735
|
/**
|
|
467
|
-
*
|
|
468
|
-
*
|
|
469
|
-
*
|
|
736
|
+
* The Worker's custom domain: one canonical hostname, plus optional
|
|
737
|
+
* `aliases` that also serve the Worker and `redirects` that 301 to the
|
|
738
|
+
* canonical name. A bare string is shorthand for `{ name }`. The
|
|
739
|
+
* Cloudflare zone is inferred from each hostname — the zone must already
|
|
740
|
+
* exist in the account.
|
|
741
|
+
*
|
|
742
|
+
* When set, `https://<name>` becomes the Worker's primary `url` output,
|
|
743
|
+
* ranking above the `workers.dev` URL. See {@link WorkerDomainConfig}.
|
|
744
|
+
*
|
|
745
|
+
* Omitting the prop leaves custom domains unmanaged — attachments made
|
|
746
|
+
* outside Alchemy are preserved. Pass `null` to explicitly detach every
|
|
747
|
+
* custom domain (and remove their redirect rules).
|
|
470
748
|
*/
|
|
471
|
-
domain?: string |
|
|
749
|
+
domain?: string | WorkerDomainConfig | null;
|
|
472
750
|
/**
|
|
473
751
|
* Zone routes that map URL patterns to this Worker. Equivalent to Wrangler's
|
|
474
752
|
* `routes` array — provide `zoneName` or `zoneId` (or `zone`) alongside each
|
|
@@ -549,6 +827,22 @@ export interface WorkerProps<
|
|
|
549
827
|
* @default false
|
|
550
828
|
*/
|
|
551
829
|
strictPort?: boolean;
|
|
830
|
+
/**
|
|
831
|
+
* Whether the local runtime's Cache API simulator
|
|
832
|
+
* (`caches.default` / `caches.open()`) stores responses. Set
|
|
833
|
+
* `false` to make every cache operation a no-op — matching
|
|
834
|
+
* production behaviour on `workers.dev` subdomains, where the
|
|
835
|
+
* Cache API silently does nothing.
|
|
836
|
+
* @default true
|
|
837
|
+
*/
|
|
838
|
+
cache?: boolean;
|
|
839
|
+
/**
|
|
840
|
+
* Override the `request.cf` blob served to this Worker locally.
|
|
841
|
+
* Defaults to a static placeholder (Miniflare's Austin/DFW blob);
|
|
842
|
+
* pass e.g. `{ colo: "LHR", country: "GB" }` to simulate a
|
|
843
|
+
* different edge location.
|
|
844
|
+
*/
|
|
845
|
+
cf?: Record<string, unknown>;
|
|
552
846
|
}
|
|
553
847
|
| {
|
|
554
848
|
/**
|
|
@@ -646,13 +940,75 @@ export type Worker<Bindings extends WorkerBindings = any> = Resource<
|
|
|
646
940
|
*/
|
|
647
941
|
namespace: string | undefined;
|
|
648
942
|
logpush: boolean | undefined;
|
|
943
|
+
/**
|
|
944
|
+
* The most significant URL the Worker is reachable at — always
|
|
945
|
+
* `urls[0]`, or `undefined` when the Worker is not reachable at any
|
|
946
|
+
* URL (e.g. a dispatch-namespace user worker). Ranking: the canonical
|
|
947
|
+
* custom domain, then aliases, then the stable `workers.dev` URL; a
|
|
948
|
+
* version worker's `url` is its aliased preview URL; under
|
|
949
|
+
* `alchemy dev` it is the local dev server's URL.
|
|
950
|
+
*/
|
|
649
951
|
url: string | undefined;
|
|
952
|
+
/**
|
|
953
|
+
* Every URL that serves this Worker, most significant first —
|
|
954
|
+
* `[https://<domain.name>?, ...aliases, <workers.dev URL>?,
|
|
955
|
+
* <version preview URLs>?]`, or the local dev server's
|
|
956
|
+
* `[localhost, ...LAN]` URLs under `alchemy dev`. Redirect hostnames
|
|
957
|
+
* never appear (they don't serve the Worker). Useful wholesale, e.g.
|
|
958
|
+
* as a CORS allow-list.
|
|
959
|
+
*/
|
|
960
|
+
urls: string[];
|
|
961
|
+
/**
|
|
962
|
+
* The Worker's resolved custom-domain configuration — canonical
|
|
963
|
+
* `name`, `aliases`, and `redirects` as deployed — or `undefined`
|
|
964
|
+
* when no custom domain is configured.
|
|
965
|
+
*/
|
|
966
|
+
domain:
|
|
967
|
+
| { name: string; aliases: string[]; redirects: string[] }
|
|
968
|
+
| undefined;
|
|
650
969
|
tags: string[] | undefined;
|
|
651
970
|
durableObjectNamespaces: Record<string, string>;
|
|
652
971
|
accountId: string;
|
|
653
|
-
domains: string[];
|
|
654
972
|
routes: { id: string; pattern: string; zoneId: string }[];
|
|
655
973
|
crons: string[];
|
|
974
|
+
/**
|
|
975
|
+
* The parent script name this Worker uploads versions to, when this
|
|
976
|
+
* resource is a version worker (`version.parent` set). `undefined` for
|
|
977
|
+
* a Worker that owns its own script — including one deploying with a
|
|
978
|
+
* gradual rollout. This is the discriminator `read`/`delete` use to
|
|
979
|
+
* avoid treating the parent's script as this resource's own.
|
|
980
|
+
*/
|
|
981
|
+
versionOf?: string | undefined;
|
|
982
|
+
/**
|
|
983
|
+
* The id of the version uploaded by the most recent deploy. Only set
|
|
984
|
+
* when versioning is in play: always for a version worker
|
|
985
|
+
* (`version.parent`), and for a self-owned Worker when a gradual
|
|
986
|
+
* rollout (`version.traffic` < 100) deployed via the versions API.
|
|
987
|
+
*/
|
|
988
|
+
versionId?: string | undefined;
|
|
989
|
+
/**
|
|
990
|
+
* The preview-URL alias attached to the uploaded version — the
|
|
991
|
+
* user-provided `version.alias`, or the auto-derived stable alias for
|
|
992
|
+
* a version worker. The aliased preview URL
|
|
993
|
+
* (`<alias>-<name>.<subdomain>.workers.dev`) is stable across
|
|
994
|
+
* deploys and is the version worker's primary `url`.
|
|
995
|
+
*/
|
|
996
|
+
versionAlias?: string | undefined;
|
|
997
|
+
/**
|
|
998
|
+
* The id of the deployment created by the most recent deploy, when the
|
|
999
|
+
* deploy created one through the deployments API (a version with
|
|
1000
|
+
* `traffic > 0`). Preview-only versions (`traffic: 0`) have no
|
|
1001
|
+
* deployment.
|
|
1002
|
+
*/
|
|
1003
|
+
deploymentId?: string | undefined;
|
|
1004
|
+
/**
|
|
1005
|
+
* The zone ids currently holding this resource's version-affinity
|
|
1006
|
+
* Transform Rules (`version.affinity`) — the cleanup list consulted
|
|
1007
|
+
* when affinity is removed or the resource is deleted. For a version
|
|
1008
|
+
* worker these are the *parent's* zones. `undefined` when no affinity
|
|
1009
|
+
* rules are deployed.
|
|
1010
|
+
*/
|
|
1011
|
+
affinityZoneIds?: string[] | undefined;
|
|
656
1012
|
hash?: {
|
|
657
1013
|
assets: string | undefined;
|
|
658
1014
|
bundle: string | undefined;
|
|
@@ -677,10 +1033,91 @@ export type Worker<Bindings extends WorkerBindings = any> = Resource<
|
|
|
677
1033
|
containers?: { className: string; dev: DevContainerImage | undefined }[];
|
|
678
1034
|
crons?: string[];
|
|
679
1035
|
hyperdrives?: Record<string, Required<DevOrigin>>;
|
|
1036
|
+
dev?: { remote?: boolean };
|
|
680
1037
|
},
|
|
681
1038
|
Providers
|
|
682
1039
|
>;
|
|
683
1040
|
|
|
1041
|
+
/** The env key the resolved URL is injected under when `yield*`-ed. */
|
|
1042
|
+
const SELF_URL_BINDING_NAME = "WORKER_URL";
|
|
1043
|
+
|
|
1044
|
+
/**
|
|
1045
|
+
* Effect-native accessor for the Worker's own URL. The value is injected as an
|
|
1046
|
+
* env binding that only exists at the *exec* phase on the deployed Worker, so
|
|
1047
|
+
* reading it is deferred behind an Effect that requires {@link RuntimeContext}.
|
|
1048
|
+
* Yield it inside a handler to obtain the URL string.
|
|
1049
|
+
*/
|
|
1050
|
+
export type URLAccessor = Effect.Effect<string, never, RuntimeContext>;
|
|
1051
|
+
|
|
1052
|
+
/**
|
|
1053
|
+
* The type of {@link URL} (`Worker.URL`).
|
|
1054
|
+
*
|
|
1055
|
+
* It is a real `Effect` — `yield* Worker.URL` inside a Worker init attaches
|
|
1056
|
+
* the binding and resolves the deferred {@link URLAccessor} — but it also
|
|
1057
|
+
* carries the `~alchemy/Kind` marker statically, so when it is declared on a
|
|
1058
|
+
* Worker's `env` the binding machinery recognises it as a `self_url` binding
|
|
1059
|
+
* (`isSelfUrl`) instead of running it.
|
|
1060
|
+
*
|
|
1061
|
+
* Defined in this module (not its own file): the effect closes over the
|
|
1062
|
+
* `Worker` tag and `WorkerEnvironment`, and a separate module would form a
|
|
1063
|
+
* value cycle with Worker.ts that the deploy bundler's scope hoisting turns
|
|
1064
|
+
* into a startup crash.
|
|
1065
|
+
*/
|
|
1066
|
+
export interface URLEffect extends Effect.Effect<
|
|
1067
|
+
URLAccessor,
|
|
1068
|
+
never,
|
|
1069
|
+
WorkerEnvironment | Worker
|
|
1070
|
+
> {
|
|
1071
|
+
"~alchemy/Kind": "Cloudflare.Workers.URL";
|
|
1072
|
+
}
|
|
1073
|
+
|
|
1074
|
+
/**
|
|
1075
|
+
* A Worker's own public URL, injected as a binding on that same Worker. At
|
|
1076
|
+
* deploy time Alchemy resolves the URL the Worker will be served at (its first
|
|
1077
|
+
* custom domain if any, otherwise its `workers.dev` URL) and injects it as a
|
|
1078
|
+
* plain-text env binding, so the running Worker knows its own public address.
|
|
1079
|
+
*
|
|
1080
|
+
* Declare it on a Worker's `env` (it flows through `InferEnv` → `string`) or
|
|
1081
|
+
* `yield*` it inside an Effect-native Worker to attach the binding and obtain
|
|
1082
|
+
* a deferred {@link URLAccessor}. It is also exposed as
|
|
1083
|
+
* `Cloudflare.Worker.URL`.
|
|
1084
|
+
*
|
|
1085
|
+
* Because the URL is resolved *before* the bundle is built, a `VITE_`-prefixed
|
|
1086
|
+
* env key holding `Worker.URL` is inlined into the client bundle as
|
|
1087
|
+
* `import.meta.env.VITE_*` — the canonical way to give a Vite frontend its own
|
|
1088
|
+
* public URL.
|
|
1089
|
+
*/
|
|
1090
|
+
export const URL: URLEffect = Object.assign(
|
|
1091
|
+
Effect.gen(function* () {
|
|
1092
|
+
// Deploy-time only: register the binding on the host Worker. The provider
|
|
1093
|
+
// lowers the `self_url` sentinel into a plain-text binding holding the
|
|
1094
|
+
// resolved URL just before upload.
|
|
1095
|
+
if (!globalThis.__ALCHEMY_RUNTIME__) {
|
|
1096
|
+
yield* (yield* Worker).bind`${SELF_URL_BINDING_NAME}`({
|
|
1097
|
+
bindings: [{ type: "self_url", name: SELF_URL_BINDING_NAME }],
|
|
1098
|
+
});
|
|
1099
|
+
}
|
|
1100
|
+
// Captured at init; the deferred read only runs at exec phase (the
|
|
1101
|
+
// accessor is colored with RuntimeContext), where env is populated.
|
|
1102
|
+
const env = yield* WorkerEnvironment;
|
|
1103
|
+
return Effect.sync(
|
|
1104
|
+
() => (env as Record<string, string>)[SELF_URL_BINDING_NAME]!,
|
|
1105
|
+
) as URLAccessor;
|
|
1106
|
+
}),
|
|
1107
|
+
{ "~alchemy/Kind": "Cloudflare.Workers.URL" as const },
|
|
1108
|
+
);
|
|
1109
|
+
|
|
1110
|
+
/**
|
|
1111
|
+
* Returns true when the value is the `Worker.URL` binding (keyed on the
|
|
1112
|
+
* static `~alchemy/Kind` marker — the value is a real Effect, so every
|
|
1113
|
+
* env-resolution site must check this before `Effect.isEffect`).
|
|
1114
|
+
*/
|
|
1115
|
+
export const isSelfUrl = (value: unknown): value is URLEffect =>
|
|
1116
|
+
typeof value === "object" &&
|
|
1117
|
+
value !== null &&
|
|
1118
|
+
"~alchemy/Kind" in value &&
|
|
1119
|
+
(value as URLEffect)["~alchemy/Kind"] === "Cloudflare.Workers.URL";
|
|
1120
|
+
|
|
684
1121
|
/**
|
|
685
1122
|
* A Cloudflare Worker host with deploy-time binding support and runtime export
|
|
686
1123
|
* collection.
|
|
@@ -921,6 +1358,22 @@ export type Worker<Bindings extends WorkerBindings = any> = Resource<
|
|
|
921
1358
|
* }
|
|
922
1359
|
* ```
|
|
923
1360
|
*
|
|
1361
|
+
* @example Assets-only Worker (static site)
|
|
1362
|
+
* Omit `main` and `script` entirely to deploy a static site: no Worker
|
|
1363
|
+
* code is uploaded — Cloudflare's asset layer serves every request and
|
|
1364
|
+
* applies `htmlHandling` / `notFoundHandling` (including SPA fallback)
|
|
1365
|
+
* itself, exactly like an assets-only `wrangler deploy`.
|
|
1366
|
+
* ```typescript
|
|
1367
|
+
* const site = yield* Cloudflare.Worker("Site", {
|
|
1368
|
+
* assets: {
|
|
1369
|
+
* directory: "./public",
|
|
1370
|
+
* htmlHandling: "drop-trailing-slash",
|
|
1371
|
+
* notFoundHandling: "404-page",
|
|
1372
|
+
* },
|
|
1373
|
+
* domain: "static.example.com",
|
|
1374
|
+
* });
|
|
1375
|
+
* ```
|
|
1376
|
+
*
|
|
924
1377
|
* @example Zone routes
|
|
925
1378
|
* ```typescript
|
|
926
1379
|
* {
|
|
@@ -947,6 +1400,170 @@ export type Worker<Bindings extends WorkerBindings = any> = Resource<
|
|
|
947
1400
|
* }
|
|
948
1401
|
* ```
|
|
949
1402
|
*
|
|
1403
|
+
* @section URLs & Domains
|
|
1404
|
+
* Every URL that serves the Worker is collected in `worker.urls`, most
|
|
1405
|
+
* significant first, and `worker.url` is always `urls[0]`. The ranking:
|
|
1406
|
+
* the canonical custom domain (`domain.name`), then aliases in declared
|
|
1407
|
+
* order, then the stable `workers.dev` URL, then version preview URLs.
|
|
1408
|
+
* Under `alchemy dev`, `urls` is the local dev server's
|
|
1409
|
+
* `[localhost, ...LAN]` addresses instead. Redirect hostnames never
|
|
1410
|
+
* appear in `urls` — they serve no content.
|
|
1411
|
+
*
|
|
1412
|
+
* The `workersDev` prop controls the `workers.dev` surface (`true` by
|
|
1413
|
+
* default = stable URL + version previews; `false` = neither; object form
|
|
1414
|
+
* toggles independently), and the `domain` prop attaches custom domains —
|
|
1415
|
+
* DNS records and edge certificates are managed automatically.
|
|
1416
|
+
*
|
|
1417
|
+
* @example Custom domain with aliases and redirects
|
|
1418
|
+
* ```typescript
|
|
1419
|
+
* const worker = yield* Cloudflare.Worker("Api", {
|
|
1420
|
+
* main: "./src/api.ts",
|
|
1421
|
+
* domain: {
|
|
1422
|
+
* name: "example.com",
|
|
1423
|
+
* aliases: ["www.example.com"],
|
|
1424
|
+
* redirects: ["old.example.com"], // 301 → https://example.com
|
|
1425
|
+
* },
|
|
1426
|
+
* });
|
|
1427
|
+
* // worker.url === "https://example.com"
|
|
1428
|
+
* // worker.urls === ["https://example.com", "https://www.example.com",
|
|
1429
|
+
* // "https://<name>.<account>.workers.dev"]
|
|
1430
|
+
* ```
|
|
1431
|
+
*
|
|
1432
|
+
* @example workers.dev toggles
|
|
1433
|
+
* ```typescript
|
|
1434
|
+
* // No workers.dev URLs at all:
|
|
1435
|
+
* { main: "./src/api.ts", workersDev: false, domain: "api.example.com" }
|
|
1436
|
+
*
|
|
1437
|
+
* // Previews only — each deploy's version preview URL becomes worker.url:
|
|
1438
|
+
* { main: "./src/api.ts", workersDev: { enabled: false, previewsEnabled: true } }
|
|
1439
|
+
* ```
|
|
1440
|
+
*
|
|
1441
|
+
* @example All URLs as a CORS allow-list
|
|
1442
|
+
* ```typescript
|
|
1443
|
+
* const site = yield* Cloudflare.Worker("Site", {
|
|
1444
|
+
* main: "./src/site.ts",
|
|
1445
|
+
* domain: { name: "example.com", aliases: ["www.example.com"] },
|
|
1446
|
+
* });
|
|
1447
|
+
* const api = yield* Cloudflare.Worker("Api", {
|
|
1448
|
+
* main: "./src/api.ts",
|
|
1449
|
+
* env: { ALLOWED_ORIGINS: site.urls },
|
|
1450
|
+
* });
|
|
1451
|
+
* ```
|
|
1452
|
+
*
|
|
1453
|
+
* @section Versions & Gradual Deployments
|
|
1454
|
+
* The `version` prop maps Cloudflare's
|
|
1455
|
+
* [versions and gradual deployments](https://developers.cloudflare.com/workers/configuration/versions-and-deployments/)
|
|
1456
|
+
* onto Alchemy stages. A Worker with `version.parent` set uploads an
|
|
1457
|
+
* immutable *version* to the parent Worker's script instead of creating its
|
|
1458
|
+
* own — by default with no traffic, reachable only at its preview URL
|
|
1459
|
+
* (`worker.url`), which is the PR-preview workflow. Give it `traffic` to
|
|
1460
|
+
* run it as a canary, or use `version.traffic` on a normal Worker to roll
|
|
1461
|
+
* out its own deploys gradually.
|
|
1462
|
+
*
|
|
1463
|
+
* A version worker's `url` is its *aliased* preview URL
|
|
1464
|
+
* (`<alias>-<name>.<subdomain>.workers.dev`) — the alias is derived from
|
|
1465
|
+
* the stack, stage, and logical id (override with `version.alias`), so the
|
|
1466
|
+
* URL is stable across deploys and always points at the latest uploaded
|
|
1467
|
+
* version. The per-version URL (`<version-prefix>-...`) is also returned
|
|
1468
|
+
* in `domains`. Because the aliased URL is known before the version
|
|
1469
|
+
* exists, `Worker.URL` works on version workers and resolves to it.
|
|
1470
|
+
*
|
|
1471
|
+
* A version carries code, bindings, and compatibility settings. Script-level
|
|
1472
|
+
* settings (routes, domains, crons, tags, observability, …) belong to the
|
|
1473
|
+
* parent and are rejected on version workers, as are locally-hosted Durable
|
|
1474
|
+
* Object or Workflow classes. Preview URLs require the parent's workers.dev
|
|
1475
|
+
* subdomain to be enabled (the default).
|
|
1476
|
+
*
|
|
1477
|
+
* @example PR preview: a version of another stage's Worker
|
|
1478
|
+
* ```typescript
|
|
1479
|
+
* // The staging stage deploys the real Worker; a PR stage uploads its
|
|
1480
|
+
* // code as a zero-traffic version of staging's script and gets back a
|
|
1481
|
+
* // stable preview URL.
|
|
1482
|
+
* const parent = yield* Cloudflare.Worker.ref("MyWorker", {
|
|
1483
|
+
* stage: "staging",
|
|
1484
|
+
* });
|
|
1485
|
+
* const preview = yield* Cloudflare.Worker("MyWorker", {
|
|
1486
|
+
* main: "./src/worker.ts",
|
|
1487
|
+
* version: { parent, message: `PR #${process.env.PR_NUMBER}` },
|
|
1488
|
+
* });
|
|
1489
|
+
* // preview.url -> https://<alias>-<name>.<subdomain>.workers.dev
|
|
1490
|
+
* // (stable across deploys; re-points at each newly uploaded version)
|
|
1491
|
+
* ```
|
|
1492
|
+
*
|
|
1493
|
+
* @example Canary: send 10% of the parent's traffic to a version
|
|
1494
|
+
* ```typescript
|
|
1495
|
+
* const parent = yield* Cloudflare.Worker.ref("MyWorker", { stage: "prod" });
|
|
1496
|
+
* yield* Cloudflare.Worker("MyWorker", {
|
|
1497
|
+
* main: "./src/worker.ts",
|
|
1498
|
+
* version: { parent, traffic: 10 },
|
|
1499
|
+
* });
|
|
1500
|
+
* ```
|
|
1501
|
+
*
|
|
1502
|
+
* @example Gradual rollout of a Worker's own deploy
|
|
1503
|
+
* ```typescript
|
|
1504
|
+
* // The new version takes 25% of traffic; the previously-live version
|
|
1505
|
+
* // keeps 75%. Bump traffic (or remove the prop) and re-deploy to promote.
|
|
1506
|
+
* yield* Cloudflare.Worker("MyWorker", {
|
|
1507
|
+
* main: "./src/worker.ts",
|
|
1508
|
+
* version: { traffic: 25 },
|
|
1509
|
+
* });
|
|
1510
|
+
* ```
|
|
1511
|
+
*
|
|
1512
|
+
* @example Keep users on one version during the rollout
|
|
1513
|
+
* ```typescript
|
|
1514
|
+
* // Percentages route each request independently; affinity pins users by
|
|
1515
|
+
* // filling the Cloudflare-Workers-Version-Key header on zone traffic —
|
|
1516
|
+
* // here from the session cookie, falling back to the client IP. Requires
|
|
1517
|
+
* // a `domain` or `routes` (with `parent`, the parent's).
|
|
1518
|
+
* yield* Cloudflare.Worker("MyWorker", {
|
|
1519
|
+
* main: "./src/worker.ts",
|
|
1520
|
+
* domain: "api.example.com",
|
|
1521
|
+
* version: {
|
|
1522
|
+
* traffic: 25,
|
|
1523
|
+
* affinity: { cookie: "session_id", ip: true },
|
|
1524
|
+
* },
|
|
1525
|
+
* });
|
|
1526
|
+
* ```
|
|
1527
|
+
*
|
|
1528
|
+
* @section The Worker's own URL
|
|
1529
|
+
* `Worker.URL` injects the URL a Worker is served at as a binding on that
|
|
1530
|
+
* same Worker — the first custom `domain` if one is configured, otherwise
|
|
1531
|
+
* its `workers.dev` URL, always equal to the resource's `url` attribute.
|
|
1532
|
+
* Under `alchemy dev` it resolves to the local dev server's URL.
|
|
1533
|
+
*
|
|
1534
|
+
* @example Read the Worker's own URL inside a handler
|
|
1535
|
+
* ```typescript
|
|
1536
|
+
* Cloudflare.Worker(
|
|
1537
|
+
* "Api",
|
|
1538
|
+
* { main: import.meta.url },
|
|
1539
|
+
* Effect.gen(function* () {
|
|
1540
|
+
* // Attaches the binding and returns a deferred accessor.
|
|
1541
|
+
* const url = yield* Cloudflare.Worker.URL;
|
|
1542
|
+
*
|
|
1543
|
+
* return {
|
|
1544
|
+
* fetch: Effect.gen(function* () {
|
|
1545
|
+
* const publicUrl = yield* url;
|
|
1546
|
+
* return Response.json({ url: publicUrl });
|
|
1547
|
+
* }),
|
|
1548
|
+
* };
|
|
1549
|
+
* }).pipe(Effect.provide(Cloudflare.Workers.URLBinding)),
|
|
1550
|
+
* );
|
|
1551
|
+
* ```
|
|
1552
|
+
*
|
|
1553
|
+
* @example Inject the URL into an async Worker's env
|
|
1554
|
+
* `InferEnv` types the entry as `string`. A `VITE_`-prefixed key on a
|
|
1555
|
+
* vite-built Worker is additionally inlined into the client bundle as
|
|
1556
|
+
* `import.meta.env.VITE_PUBLIC_URL` at build time.
|
|
1557
|
+
* ```typescript
|
|
1558
|
+
* export const Worker = Cloudflare.Worker("Worker", {
|
|
1559
|
+
* main: "./src/worker.ts",
|
|
1560
|
+
* env: { PUBLIC_URL: Cloudflare.Worker.URL },
|
|
1561
|
+
* });
|
|
1562
|
+
*
|
|
1563
|
+
* export type WorkerEnv = Cloudflare.InferEnv<typeof Worker>;
|
|
1564
|
+
* // { PUBLIC_URL: string }
|
|
1565
|
+
* ```
|
|
1566
|
+
*
|
|
950
1567
|
* @section Observability
|
|
951
1568
|
* Cloudflare Workers Observability is on by default — `logs.enabled` and
|
|
952
1569
|
* `logs.invocationLogs` are turned on if you don't pass an `observability`
|
|
@@ -1282,6 +1899,26 @@ export const Worker: ResourceClassLike<Worker> &
|
|
|
1282
1899
|
Named<Id> & {
|
|
1283
1900
|
new (): MakeShape<Shape, WorkerShape> & Named<Id> & Tag;
|
|
1284
1901
|
};
|
|
1902
|
+
/**
|
|
1903
|
+
* Class form without an implementation — an external Worker (a plain
|
|
1904
|
+
* bundled `main`, a raw `script`, or an assets-only Worker with no
|
|
1905
|
+
* script at all):
|
|
1906
|
+
*
|
|
1907
|
+
* ```typescript
|
|
1908
|
+
* export class Site extends Cloudflare.Worker<Site>()("Site", {
|
|
1909
|
+
* assets: { directory: "./public" },
|
|
1910
|
+
* }) {}
|
|
1911
|
+
* ```
|
|
1912
|
+
*/
|
|
1913
|
+
<const Id extends string, Req = never>(
|
|
1914
|
+
id: Id,
|
|
1915
|
+
props:
|
|
1916
|
+
| InputProps<WorkerProps>
|
|
1917
|
+
| Effect.Effect<InputProps<WorkerProps>, ConfigError, Req>,
|
|
1918
|
+
): Effect.Effect<Worker & Rpc<{}>, never, Req | Providers> &
|
|
1919
|
+
Named<Id> & {
|
|
1920
|
+
new (): Named<Id> & Tag;
|
|
1921
|
+
};
|
|
1285
1922
|
};
|
|
1286
1923
|
<
|
|
1287
1924
|
const Bindings extends WorkerBindingProps = {},
|
|
@@ -1324,15 +1961,26 @@ export const Worker: ResourceClassLike<Worker> &
|
|
|
1324
1961
|
Extract<Req, Container.Application<any>> | Providers
|
|
1325
1962
|
> &
|
|
1326
1963
|
Named<Id>;
|
|
1327
|
-
|
|
1328
|
-
|
|
1329
|
-
|
|
1330
|
-
|
|
1331
|
-
|
|
1332
|
-
|
|
1333
|
-
|
|
1334
|
-
|
|
1335
|
-
|
|
1336
|
-
|
|
1337
|
-
|
|
1338
|
-
|
|
1964
|
+
/**
|
|
1965
|
+
* The Worker's own public URL, injected as a binding on that same Worker.
|
|
1966
|
+
* Declare it on `env` (`env: { VITE_PUBLIC_URL: Worker.URL }`) or
|
|
1967
|
+
* `yield*` it inside an Effect-native Worker to obtain a deferred
|
|
1968
|
+
* accessor. See {@link URLEffect}.
|
|
1969
|
+
*/
|
|
1970
|
+
readonly URL: URLEffect;
|
|
1971
|
+
} = Platform(
|
|
1972
|
+
WorkerTypeId,
|
|
1973
|
+
{
|
|
1974
|
+
// Both hooks are wrapped in arrows so the imported references are resolved
|
|
1975
|
+
// at call time rather than at module-load time. Worker.ts forms import
|
|
1976
|
+
// cycles with both WorkerAsyncBindings.ts (which imports `isWorker` here)
|
|
1977
|
+
// and WorkerRuntimeContext.ts (which imports `WorkerTypeId`/`WorkerEnvironment`
|
|
1978
|
+
// here). Reading either binding eagerly here hits TDZ when Bun loads the
|
|
1979
|
+
// package from node_modules in a different module-init order than the local
|
|
1980
|
+
// workspace.
|
|
1981
|
+
onCreate: (resource, props) =>
|
|
1982
|
+
bindWorkerAsyncBindings(resource as Worker, props),
|
|
1983
|
+
createRuntimeContext: (id) => makeWorkerRuntimeContext(id),
|
|
1984
|
+
},
|
|
1985
|
+
{ URL },
|
|
1986
|
+
);
|