alchemy 2.0.0-beta.41 → 2.0.0-beta.43
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 +2 -9
- package/bin/exec.js.map +1 -1
- package/lib/AWS/CloudWatch/DescribeAlarmContributors.d.ts +1 -1
- package/lib/AWS/CloudWatch/DescribeAlarmContributors.d.ts.map +1 -1
- package/lib/AWS/CloudWatch/DescribeAlarmHistory.d.ts +1 -1
- package/lib/AWS/CloudWatch/DescribeAlarmHistory.d.ts.map +1 -1
- package/lib/AWS/CloudWatch/DescribeAlarms.d.ts +1 -1
- package/lib/AWS/CloudWatch/DescribeAlarms.d.ts.map +1 -1
- package/lib/AWS/CloudWatch/DescribeAlarmsForMetric.d.ts +1 -1
- package/lib/AWS/CloudWatch/DescribeAlarmsForMetric.d.ts.map +1 -1
- package/lib/AWS/CloudWatch/DescribeAnomalyDetectors.d.ts +1 -1
- package/lib/AWS/CloudWatch/DescribeAnomalyDetectors.d.ts.map +1 -1
- package/lib/AWS/CloudWatch/DescribeInsightRules.d.ts +1 -1
- package/lib/AWS/CloudWatch/DescribeInsightRules.d.ts.map +1 -1
- package/lib/AWS/CloudWatch/DisableAlarmActions.d.ts +1 -1
- package/lib/AWS/CloudWatch/DisableAlarmActions.d.ts.map +1 -1
- package/lib/AWS/CloudWatch/DisableInsightRules.d.ts +1 -1
- package/lib/AWS/CloudWatch/DisableInsightRules.d.ts.map +1 -1
- package/lib/AWS/CloudWatch/EnableAlarmActions.d.ts +1 -1
- package/lib/AWS/CloudWatch/EnableAlarmActions.d.ts.map +1 -1
- package/lib/AWS/CloudWatch/GetAlarmMuteRule.d.ts +1 -1
- package/lib/AWS/CloudWatch/GetAlarmMuteRule.d.ts.map +1 -1
- package/lib/AWS/CloudWatch/GetDashboard.d.ts +1 -1
- package/lib/AWS/CloudWatch/GetDashboard.d.ts.map +1 -1
- package/lib/AWS/CloudWatch/GetInsightRuleReport.d.ts +1 -1
- package/lib/AWS/CloudWatch/GetInsightRuleReport.d.ts.map +1 -1
- package/lib/AWS/CloudWatch/GetMetricData.d.ts +1 -1
- package/lib/AWS/CloudWatch/GetMetricData.d.ts.map +1 -1
- package/lib/AWS/CloudWatch/GetMetricStatistics.d.ts +1 -1
- package/lib/AWS/CloudWatch/GetMetricStatistics.d.ts.map +1 -1
- package/lib/AWS/CloudWatch/GetMetricStream.d.ts +1 -1
- package/lib/AWS/CloudWatch/GetMetricStream.d.ts.map +1 -1
- package/lib/AWS/CloudWatch/GetMetricWidgetImage.d.ts +1 -1
- package/lib/AWS/CloudWatch/GetMetricWidgetImage.d.ts.map +1 -1
- package/lib/AWS/CloudWatch/ListAlarmMuteRules.d.ts +1 -1
- package/lib/AWS/CloudWatch/ListAlarmMuteRules.d.ts.map +1 -1
- package/lib/AWS/CloudWatch/ListDashboards.d.ts +1 -1
- package/lib/AWS/CloudWatch/ListDashboards.d.ts.map +1 -1
- package/lib/AWS/CloudWatch/ListManagedInsightRules.d.ts +1 -1
- package/lib/AWS/CloudWatch/ListManagedInsightRules.d.ts.map +1 -1
- package/lib/AWS/CloudWatch/ListMetricStreams.d.ts +1 -1
- package/lib/AWS/CloudWatch/ListMetricStreams.d.ts.map +1 -1
- package/lib/AWS/CloudWatch/ListMetrics.d.ts +1 -1
- package/lib/AWS/CloudWatch/ListMetrics.d.ts.map +1 -1
- package/lib/AWS/CloudWatch/ListTagsForResource.d.ts +1 -1
- package/lib/AWS/CloudWatch/ListTagsForResource.d.ts.map +1 -1
- package/lib/AWS/CloudWatch/PutMetricData.d.ts +1 -1
- package/lib/AWS/CloudWatch/PutMetricData.d.ts.map +1 -1
- package/lib/AWS/CloudWatch/SetAlarmState.d.ts +1 -1
- package/lib/AWS/CloudWatch/SetAlarmState.d.ts.map +1 -1
- package/lib/AWS/DynamoDB/BatchExecuteStatement.d.ts +1 -1
- package/lib/AWS/DynamoDB/BatchExecuteStatement.d.ts.map +1 -1
- package/lib/AWS/DynamoDB/BatchGetItem.d.ts +1 -1
- package/lib/AWS/DynamoDB/BatchGetItem.d.ts.map +1 -1
- package/lib/AWS/DynamoDB/BatchWriteItem.d.ts +1 -1
- package/lib/AWS/DynamoDB/BatchWriteItem.d.ts.map +1 -1
- package/lib/AWS/DynamoDB/DeleteItem.d.ts +1 -1
- package/lib/AWS/DynamoDB/DeleteItem.d.ts.map +1 -1
- package/lib/AWS/DynamoDB/DescribeTable.d.ts +1 -1
- package/lib/AWS/DynamoDB/DescribeTable.d.ts.map +1 -1
- package/lib/AWS/DynamoDB/DescribeTimeToLive.d.ts +1 -1
- package/lib/AWS/DynamoDB/DescribeTimeToLive.d.ts.map +1 -1
- package/lib/AWS/DynamoDB/ExecuteStatement.d.ts +1 -1
- package/lib/AWS/DynamoDB/ExecuteStatement.d.ts.map +1 -1
- package/lib/AWS/DynamoDB/ExecuteTransaction.d.ts +1 -1
- package/lib/AWS/DynamoDB/ExecuteTransaction.d.ts.map +1 -1
- package/lib/AWS/DynamoDB/GetItem.d.ts +1 -1
- package/lib/AWS/DynamoDB/GetItem.d.ts.map +1 -1
- package/lib/AWS/DynamoDB/ListTables.d.ts +1 -1
- package/lib/AWS/DynamoDB/ListTables.d.ts.map +1 -1
- package/lib/AWS/DynamoDB/ListTagsOfResource.d.ts +1 -1
- package/lib/AWS/DynamoDB/ListTagsOfResource.d.ts.map +1 -1
- package/lib/AWS/DynamoDB/PutItem.d.ts +1 -1
- package/lib/AWS/DynamoDB/PutItem.d.ts.map +1 -1
- package/lib/AWS/DynamoDB/Query.d.ts +1 -1
- package/lib/AWS/DynamoDB/Query.d.ts.map +1 -1
- package/lib/AWS/DynamoDB/RestoreTableToPointInTime.d.ts +1 -1
- package/lib/AWS/DynamoDB/RestoreTableToPointInTime.d.ts.map +1 -1
- package/lib/AWS/DynamoDB/Scan.d.ts +1 -1
- package/lib/AWS/DynamoDB/Scan.d.ts.map +1 -1
- package/lib/AWS/DynamoDB/TransactGetItems.d.ts +1 -1
- package/lib/AWS/DynamoDB/TransactGetItems.d.ts.map +1 -1
- package/lib/AWS/DynamoDB/TransactWriteItems.d.ts +1 -1
- package/lib/AWS/DynamoDB/TransactWriteItems.d.ts.map +1 -1
- package/lib/AWS/DynamoDB/UpdateItem.d.ts +1 -1
- package/lib/AWS/DynamoDB/UpdateItem.d.ts.map +1 -1
- package/lib/AWS/DynamoDB/UpdateTimeToLive.d.ts +1 -1
- package/lib/AWS/DynamoDB/UpdateTimeToLive.d.ts.map +1 -1
- package/lib/AWS/ECS/DescribeTasks.d.ts +1 -1
- package/lib/AWS/ECS/DescribeTasks.d.ts.map +1 -1
- package/lib/AWS/ECS/ListTasks.d.ts +1 -1
- package/lib/AWS/ECS/ListTasks.d.ts.map +1 -1
- package/lib/AWS/ECS/RunTask.d.ts +1 -1
- package/lib/AWS/ECS/RunTask.d.ts.map +1 -1
- package/lib/AWS/ECS/StopTask.d.ts +1 -1
- package/lib/AWS/ECS/StopTask.d.ts.map +1 -1
- package/lib/AWS/EventBridge/DescribeEventBus.d.ts +1 -1
- package/lib/AWS/EventBridge/DescribeEventBus.d.ts.map +1 -1
- package/lib/AWS/EventBridge/DescribeRule.d.ts +1 -1
- package/lib/AWS/EventBridge/DescribeRule.d.ts.map +1 -1
- package/lib/AWS/EventBridge/EventSource.d.ts +2 -2
- package/lib/AWS/EventBridge/ListEventBuses.d.ts +1 -1
- package/lib/AWS/EventBridge/ListEventBuses.d.ts.map +1 -1
- package/lib/AWS/EventBridge/ListRules.d.ts +1 -1
- package/lib/AWS/EventBridge/ListRules.d.ts.map +1 -1
- package/lib/AWS/EventBridge/ListTargetsByRule.d.ts +1 -1
- package/lib/AWS/EventBridge/ListTargetsByRule.d.ts.map +1 -1
- package/lib/AWS/EventBridge/PutEvents.d.ts +1 -1
- package/lib/AWS/EventBridge/PutEvents.d.ts.map +1 -1
- package/lib/AWS/EventBridge/TestEventPattern.d.ts +1 -1
- package/lib/AWS/EventBridge/TestEventPattern.d.ts.map +1 -1
- package/lib/AWS/EventBridge/ToLambda.d.ts +1 -1
- package/lib/AWS/EventBridge/ToLambda.d.ts.map +1 -1
- package/lib/AWS/EventBridge/ToQueue.d.ts +1 -1
- package/lib/AWS/EventBridge/ToQueue.d.ts.map +1 -1
- package/lib/AWS/Kinesis/DescribeAccountSettings.d.ts +1 -1
- package/lib/AWS/Kinesis/DescribeAccountSettings.d.ts.map +1 -1
- package/lib/AWS/Kinesis/DescribeLimits.d.ts +1 -1
- package/lib/AWS/Kinesis/DescribeLimits.d.ts.map +1 -1
- package/lib/AWS/Kinesis/DescribeStream.d.ts +1 -1
- package/lib/AWS/Kinesis/DescribeStream.d.ts.map +1 -1
- package/lib/AWS/Kinesis/DescribeStreamConsumer.d.ts +1 -1
- package/lib/AWS/Kinesis/DescribeStreamConsumer.d.ts.map +1 -1
- package/lib/AWS/Kinesis/DescribeStreamSummary.d.ts +1 -1
- package/lib/AWS/Kinesis/DescribeStreamSummary.d.ts.map +1 -1
- package/lib/AWS/Kinesis/GetRecords.d.ts +1 -1
- package/lib/AWS/Kinesis/GetRecords.d.ts.map +1 -1
- package/lib/AWS/Kinesis/GetResourcePolicy.d.ts +1 -1
- package/lib/AWS/Kinesis/GetResourcePolicy.d.ts.map +1 -1
- package/lib/AWS/Kinesis/GetShardIterator.d.ts +1 -1
- package/lib/AWS/Kinesis/GetShardIterator.d.ts.map +1 -1
- package/lib/AWS/Kinesis/ListShards.d.ts +1 -1
- package/lib/AWS/Kinesis/ListShards.d.ts.map +1 -1
- package/lib/AWS/Kinesis/ListStreamConsumers.d.ts +1 -1
- package/lib/AWS/Kinesis/ListStreamConsumers.d.ts.map +1 -1
- package/lib/AWS/Kinesis/ListStreams.d.ts +1 -1
- package/lib/AWS/Kinesis/ListStreams.d.ts.map +1 -1
- package/lib/AWS/Kinesis/ListTagsForResource.d.ts +1 -1
- package/lib/AWS/Kinesis/ListTagsForResource.d.ts.map +1 -1
- package/lib/AWS/Kinesis/PutRecord.d.ts +1 -1
- package/lib/AWS/Kinesis/PutRecord.d.ts.map +1 -1
- package/lib/AWS/Kinesis/PutRecords.d.ts +1 -1
- package/lib/AWS/Kinesis/PutRecords.d.ts.map +1 -1
- package/lib/AWS/Kinesis/StreamSink.d.ts +1 -1
- package/lib/AWS/Kinesis/StreamSink.d.ts.map +1 -1
- package/lib/AWS/Kinesis/SubscribeToShard.d.ts +1 -1
- package/lib/AWS/Kinesis/SubscribeToShard.d.ts.map +1 -1
- package/lib/AWS/Lambda/BucketEventSource.d.ts +2 -1
- package/lib/AWS/Lambda/BucketEventSource.d.ts.map +1 -1
- package/lib/AWS/Lambda/EventBridgeEventSource.d.ts +2 -1
- package/lib/AWS/Lambda/EventBridgeEventSource.d.ts.map +1 -1
- package/lib/AWS/Lambda/InvokeFunction.d.ts +1 -1
- package/lib/AWS/Lambda/InvokeFunction.d.ts.map +1 -1
- package/lib/AWS/Lambda/QueueEventSource.d.ts +2 -1
- package/lib/AWS/Lambda/QueueEventSource.d.ts.map +1 -1
- package/lib/AWS/Lambda/StreamEventSource.d.ts +2 -1
- package/lib/AWS/Lambda/StreamEventSource.d.ts.map +1 -1
- package/lib/AWS/Lambda/TableEventSource.d.ts +2 -1
- package/lib/AWS/Lambda/TableEventSource.d.ts.map +1 -1
- package/lib/AWS/Lambda/TopicEventSource.d.ts +2 -1
- package/lib/AWS/Lambda/TopicEventSource.d.ts.map +1 -1
- package/lib/AWS/RDS/Connect.d.ts +1 -1
- package/lib/AWS/RDS/Connect.d.ts.map +1 -1
- package/lib/AWS/RDSData/BatchExecuteStatement.d.ts +1 -1
- package/lib/AWS/RDSData/BatchExecuteStatement.d.ts.map +1 -1
- package/lib/AWS/RDSData/BeginTransaction.d.ts +1 -1
- package/lib/AWS/RDSData/BeginTransaction.d.ts.map +1 -1
- package/lib/AWS/RDSData/CommitTransaction.d.ts +1 -1
- package/lib/AWS/RDSData/CommitTransaction.d.ts.map +1 -1
- package/lib/AWS/RDSData/ExecuteSql.d.ts +1 -1
- package/lib/AWS/RDSData/ExecuteSql.d.ts.map +1 -1
- package/lib/AWS/RDSData/ExecuteStatement.d.ts +1 -1
- package/lib/AWS/RDSData/ExecuteStatement.d.ts.map +1 -1
- package/lib/AWS/RDSData/RollbackTransaction.d.ts +1 -1
- package/lib/AWS/RDSData/RollbackTransaction.d.ts.map +1 -1
- package/lib/AWS/S3/AbortMultipartUpload.d.ts +1 -1
- package/lib/AWS/S3/AbortMultipartUpload.d.ts.map +1 -1
- package/lib/AWS/S3/CompleteMultipartUpload.d.ts +1 -1
- package/lib/AWS/S3/CompleteMultipartUpload.d.ts.map +1 -1
- package/lib/AWS/S3/CopyObject.d.ts +1 -1
- package/lib/AWS/S3/CopyObject.d.ts.map +1 -1
- package/lib/AWS/S3/CreateMultipartUpload.d.ts +1 -1
- package/lib/AWS/S3/CreateMultipartUpload.d.ts.map +1 -1
- package/lib/AWS/S3/DeleteObject.d.ts +1 -1
- package/lib/AWS/S3/DeleteObject.d.ts.map +1 -1
- package/lib/AWS/S3/GetObject.d.ts +1 -1
- package/lib/AWS/S3/GetObject.d.ts.map +1 -1
- package/lib/AWS/S3/HeadObject.d.ts +1 -1
- package/lib/AWS/S3/HeadObject.d.ts.map +1 -1
- package/lib/AWS/S3/ListObjectsV2.d.ts +1 -1
- package/lib/AWS/S3/ListObjectsV2.d.ts.map +1 -1
- package/lib/AWS/S3/PutObject.d.ts +1 -1
- package/lib/AWS/S3/PutObject.d.ts.map +1 -1
- package/lib/AWS/S3/UploadPart.d.ts +1 -1
- package/lib/AWS/S3/UploadPart.d.ts.map +1 -1
- package/lib/AWS/SNS/AddPermission.d.ts +1 -1
- package/lib/AWS/SNS/AddPermission.d.ts.map +1 -1
- package/lib/AWS/SNS/ConfirmSubscription.d.ts +1 -1
- package/lib/AWS/SNS/ConfirmSubscription.d.ts.map +1 -1
- package/lib/AWS/SNS/GetDataProtectionPolicy.d.ts +1 -1
- package/lib/AWS/SNS/GetDataProtectionPolicy.d.ts.map +1 -1
- package/lib/AWS/SNS/GetSubscriptionAttributes.d.ts +1 -1
- package/lib/AWS/SNS/GetSubscriptionAttributes.d.ts.map +1 -1
- package/lib/AWS/SNS/GetTopicAttributes.d.ts +1 -1
- package/lib/AWS/SNS/GetTopicAttributes.d.ts.map +1 -1
- package/lib/AWS/SNS/ListSubscriptions.d.ts +1 -1
- package/lib/AWS/SNS/ListSubscriptions.d.ts.map +1 -1
- package/lib/AWS/SNS/ListSubscriptionsByTopic.d.ts +1 -1
- package/lib/AWS/SNS/ListSubscriptionsByTopic.d.ts.map +1 -1
- package/lib/AWS/SNS/ListTagsForResource.d.ts +1 -1
- package/lib/AWS/SNS/ListTagsForResource.d.ts.map +1 -1
- package/lib/AWS/SNS/ListTopics.d.ts +1 -1
- package/lib/AWS/SNS/ListTopics.d.ts.map +1 -1
- package/lib/AWS/SNS/Publish.d.ts +1 -1
- package/lib/AWS/SNS/Publish.d.ts.map +1 -1
- package/lib/AWS/SNS/PublishBatch.d.ts +1 -1
- package/lib/AWS/SNS/PublishBatch.d.ts.map +1 -1
- package/lib/AWS/SNS/PutDataProtectionPolicy.d.ts +1 -1
- package/lib/AWS/SNS/PutDataProtectionPolicy.d.ts.map +1 -1
- package/lib/AWS/SNS/RemovePermission.d.ts +1 -1
- package/lib/AWS/SNS/RemovePermission.d.ts.map +1 -1
- package/lib/AWS/SNS/SetSubscriptionAttributes.d.ts +1 -1
- package/lib/AWS/SNS/SetSubscriptionAttributes.d.ts.map +1 -1
- package/lib/AWS/SNS/SetTopicAttributes.d.ts +1 -1
- package/lib/AWS/SNS/SetTopicAttributes.d.ts.map +1 -1
- package/lib/AWS/SNS/TagResource.d.ts +1 -1
- package/lib/AWS/SNS/TagResource.d.ts.map +1 -1
- package/lib/AWS/SNS/TopicSink.d.ts +1 -1
- package/lib/AWS/SNS/TopicSink.d.ts.map +1 -1
- package/lib/AWS/SNS/UntagResource.d.ts +1 -1
- package/lib/AWS/SNS/UntagResource.d.ts.map +1 -1
- package/lib/AWS/SQS/DeleteMessage.d.ts +1 -1
- package/lib/AWS/SQS/DeleteMessage.d.ts.map +1 -1
- package/lib/AWS/SQS/DeleteMessageBatch.d.ts +1 -1
- package/lib/AWS/SQS/DeleteMessageBatch.d.ts.map +1 -1
- package/lib/AWS/SQS/QueueSink.d.ts +1 -1
- package/lib/AWS/SQS/QueueSink.d.ts.map +1 -1
- package/lib/AWS/SQS/ReceiveMessage.d.ts +1 -1
- package/lib/AWS/SQS/ReceiveMessage.d.ts.map +1 -1
- package/lib/AWS/SQS/SendMessage.d.ts +1 -1
- package/lib/AWS/SQS/SendMessage.d.ts.map +1 -1
- package/lib/AWS/SQS/SendMessageBatch.d.ts +1 -1
- package/lib/AWS/SQS/SendMessageBatch.d.ts.map +1 -1
- package/lib/AWS/SecretsManager/DescribeSecret.d.ts +1 -1
- package/lib/AWS/SecretsManager/DescribeSecret.d.ts.map +1 -1
- package/lib/AWS/SecretsManager/GetRandomPassword.d.ts +1 -1
- package/lib/AWS/SecretsManager/GetRandomPassword.d.ts.map +1 -1
- package/lib/AWS/SecretsManager/GetSecretValue.d.ts +1 -1
- package/lib/AWS/SecretsManager/GetSecretValue.d.ts.map +1 -1
- package/lib/AWS/SecretsManager/ListSecrets.d.ts +1 -1
- package/lib/AWS/SecretsManager/ListSecrets.d.ts.map +1 -1
- package/lib/AWS/SecretsManager/PutSecretValue.d.ts +1 -1
- package/lib/AWS/SecretsManager/PutSecretValue.d.ts.map +1 -1
- package/lib/Binding.d.ts +1 -1
- package/lib/Binding.d.ts.map +1 -1
- package/lib/Bundle/Docker.d.ts.map +1 -1
- package/lib/Bundle/Docker.js +12 -13
- package/lib/Bundle/Docker.js.map +1 -1
- package/lib/Cli/commands/deploy.d.ts.map +1 -1
- package/lib/Cli/commands/deploy.js +1 -0
- package/lib/Cli/commands/deploy.js.map +1 -1
- package/lib/Cloudflare/AiGateway/AiGatewayBinding.d.ts +8 -7
- package/lib/Cloudflare/AiGateway/AiGatewayBinding.d.ts.map +1 -1
- package/lib/Cloudflare/AiGateway/AiGatewayBinding.js +2 -6
- package/lib/Cloudflare/AiGateway/AiGatewayBinding.js.map +1 -1
- package/lib/Cloudflare/AnalyticsEngine/AnalyticsEngineDatasetBinding.d.ts +4 -3
- package/lib/Cloudflare/AnalyticsEngine/AnalyticsEngineDatasetBinding.d.ts.map +1 -1
- package/lib/Cloudflare/AnalyticsEngine/AnalyticsEngineDatasetBinding.js +2 -1
- package/lib/Cloudflare/AnalyticsEngine/AnalyticsEngineDatasetBinding.js.map +1 -1
- package/lib/Cloudflare/Artifacts/ArtifactsBinding.d.ts +8 -7
- package/lib/Cloudflare/Artifacts/ArtifactsBinding.d.ts.map +1 -1
- package/lib/Cloudflare/Artifacts/ArtifactsBinding.js +2 -2
- package/lib/Cloudflare/Artifacts/ArtifactsBinding.js.map +1 -1
- package/lib/Cloudflare/D1/D1Connection.d.ts +12 -10
- package/lib/Cloudflare/D1/D1Connection.d.ts.map +1 -1
- package/lib/Cloudflare/D1/D1Connection.js +2 -2
- package/lib/Cloudflare/D1/D1Connection.js.map +1 -1
- package/lib/Cloudflare/D1/D1Database.js +1 -1
- package/lib/Cloudflare/D1/D1Database.js.map +1 -1
- package/lib/Cloudflare/D1/D1Migrations.d.ts +2 -2
- package/lib/Cloudflare/D1/D1Migrations.d.ts.map +1 -1
- package/lib/Cloudflare/Email/SendEmailBinding.d.ts +5 -4
- package/lib/Cloudflare/Email/SendEmailBinding.d.ts.map +1 -1
- package/lib/Cloudflare/Email/SendEmailBinding.js +2 -1
- package/lib/Cloudflare/Email/SendEmailBinding.js.map +1 -1
- package/lib/Cloudflare/Hyperdrive/HyperdriveBinding.d.ts +10 -8
- package/lib/Cloudflare/Hyperdrive/HyperdriveBinding.d.ts.map +1 -1
- package/lib/Cloudflare/Hyperdrive/HyperdriveBinding.js +2 -2
- package/lib/Cloudflare/Hyperdrive/HyperdriveBinding.js.map +1 -1
- package/lib/Cloudflare/Images/ImagesBinding.d.ts +5 -4
- package/lib/Cloudflare/Images/ImagesBinding.d.ts.map +1 -1
- package/lib/Cloudflare/Images/ImagesBinding.js +4 -2
- package/lib/Cloudflare/Images/ImagesBinding.js.map +1 -1
- package/lib/Cloudflare/KV/KVNamespaceBinding.d.ts +33 -32
- package/lib/Cloudflare/KV/KVNamespaceBinding.d.ts.map +1 -1
- package/lib/Cloudflare/KV/KVNamespaceBinding.js +5 -2
- package/lib/Cloudflare/KV/KVNamespaceBinding.js.map +1 -1
- package/lib/Cloudflare/Queue/QueueBinding.d.ts +5 -4
- package/lib/Cloudflare/Queue/QueueBinding.d.ts.map +1 -1
- package/lib/Cloudflare/Queue/QueueBinding.js +2 -2
- package/lib/Cloudflare/Queue/QueueBinding.js.map +1 -1
- package/lib/Cloudflare/Queue/QueueEventSource.d.ts +1 -2
- package/lib/Cloudflare/Queue/QueueEventSource.d.ts.map +1 -1
- package/lib/Cloudflare/R2/R2BucketBinding.d.ts +13 -12
- package/lib/Cloudflare/R2/R2BucketBinding.d.ts.map +1 -1
- package/lib/Cloudflare/R2/R2BucketBinding.js +2 -2
- package/lib/Cloudflare/R2/R2BucketBinding.js.map +1 -1
- package/lib/Cloudflare/SecretsStore/SecretBinding.d.ts +5 -4
- package/lib/Cloudflare/SecretsStore/SecretBinding.d.ts.map +1 -1
- package/lib/Cloudflare/SecretsStore/SecretBinding.js +2 -2
- package/lib/Cloudflare/SecretsStore/SecretBinding.js.map +1 -1
- package/lib/Cloudflare/StateStore/Api.d.ts +1 -1
- package/lib/Cloudflare/Workers/CronEventSource.d.ts +1 -2
- package/lib/Cloudflare/Workers/CronEventSource.d.ts.map +1 -1
- package/lib/Cloudflare/Workers/DurableObjectNamespace.d.ts.map +1 -1
- package/lib/Cloudflare/Workers/DurableObjectNamespace.js +6 -3
- package/lib/Cloudflare/Workers/DurableObjectNamespace.js.map +1 -1
- package/lib/Cloudflare/Workers/DynamicWorkerLoader.d.ts.map +1 -1
- package/lib/Cloudflare/Workers/DynamicWorkerLoader.js +3 -3
- package/lib/Cloudflare/Workers/DynamicWorkerLoader.js.map +1 -1
- package/lib/Cloudflare/Workers/Fetch.d.ts +1 -1
- package/lib/Cloudflare/Workers/Fetch.d.ts.map +1 -1
- package/lib/Cloudflare/Workers/RpcAsync.d.ts +55 -0
- package/lib/Cloudflare/Workers/RpcAsync.d.ts.map +1 -1
- package/lib/Cloudflare/Workers/RpcAsync.js +55 -0
- package/lib/Cloudflare/Workers/RpcAsync.js.map +1 -1
- package/lib/Cloudflare/Workers/Worker.d.ts +3 -3
- package/lib/Cloudflare/Workers/Worker.d.ts.map +1 -1
- package/lib/Cloudflare/Workers/Worker.js +9 -2
- package/lib/Cloudflare/Workers/Worker.js.map +1 -1
- package/lib/Cloudflare/Workers/WorkerRuntimeContext.d.ts.map +1 -1
- package/lib/Cloudflare/Workers/WorkerRuntimeContext.js +2 -0
- package/lib/Cloudflare/Workers/WorkerRuntimeContext.js.map +1 -1
- package/lib/Cloudflare/Workers/Workflow.d.ts +4 -4
- package/lib/Cloudflare/Workers/Workflow.d.ts.map +1 -1
- package/lib/Cloudflare/Workers/Workflow.js +6 -3
- package/lib/Cloudflare/Workers/Workflow.js.map +1 -1
- package/lib/Neon/Branch.js +1 -1
- package/lib/Neon/Branch.js.map +1 -1
- package/lib/Neon/Migrations.d.ts +1 -1
- package/lib/Neon/Migrations.d.ts.map +1 -1
- package/lib/Neon/Project.d.ts.map +1 -1
- package/lib/Neon/Project.js +1 -15
- package/lib/Neon/Project.js.map +1 -1
- package/lib/Phase.d.ts +2 -2
- package/lib/Phase.d.ts.map +1 -1
- package/lib/Phase.js +2 -1
- package/lib/Phase.js.map +1 -1
- package/lib/Planetscale/AuthProvider.d.ts +59 -0
- package/lib/Planetscale/AuthProvider.d.ts.map +1 -0
- package/lib/Planetscale/AuthProvider.js +131 -0
- package/lib/Planetscale/AuthProvider.js.map +1 -0
- package/lib/Planetscale/Branch.d.ts +113 -0
- package/lib/Planetscale/Branch.d.ts.map +1 -0
- package/lib/Planetscale/Branch.js +287 -0
- package/lib/Planetscale/Branch.js.map +1 -0
- package/lib/Planetscale/Credentials.d.ts +35 -0
- package/lib/Planetscale/Credentials.d.ts.map +1 -0
- package/lib/Planetscale/Credentials.js +56 -0
- package/lib/Planetscale/Credentials.js.map +1 -0
- package/lib/Planetscale/Database.d.ts +117 -0
- package/lib/Planetscale/Database.d.ts.map +1 -0
- package/lib/Planetscale/Database.js +1 -0
- package/lib/Planetscale/Database.js.map +1 -0
- package/lib/Planetscale/MySQL/MySQLBranch.d.ts +86 -0
- package/lib/Planetscale/MySQL/MySQLBranch.d.ts.map +1 -0
- package/lib/Planetscale/MySQL/MySQLBranch.js +14 -0
- package/lib/Planetscale/MySQL/MySQLBranch.js.map +1 -0
- package/lib/Planetscale/MySQL/MySQLClusterSize.d.ts +23 -0
- package/lib/Planetscale/MySQL/MySQLClusterSize.d.ts.map +1 -0
- package/lib/Planetscale/MySQL/MySQLClusterSize.js +44 -0
- package/lib/Planetscale/MySQL/MySQLClusterSize.js.map +1 -0
- package/lib/Planetscale/MySQL/MySQLDatabase.d.ts +119 -0
- package/lib/Planetscale/MySQL/MySQLDatabase.d.ts.map +1 -0
- package/lib/Planetscale/MySQL/MySQLDatabase.js +237 -0
- package/lib/Planetscale/MySQL/MySQLDatabase.js.map +1 -0
- package/lib/Planetscale/MySQL/MySQLMigrations.d.ts +18 -0
- package/lib/Planetscale/MySQL/MySQLMigrations.d.ts.map +1 -0
- package/lib/Planetscale/MySQL/MySQLMigrations.js +157 -0
- package/lib/Planetscale/MySQL/MySQLMigrations.js.map +1 -0
- package/lib/Planetscale/MySQL/MySQLOrigin.d.ts +15 -0
- package/lib/Planetscale/MySQL/MySQLOrigin.d.ts.map +1 -0
- package/lib/Planetscale/MySQL/MySQLOrigin.js +2 -0
- package/lib/Planetscale/MySQL/MySQLOrigin.js.map +1 -0
- package/lib/Planetscale/MySQL/MySQLPassword.d.ts +115 -0
- package/lib/Planetscale/MySQL/MySQLPassword.d.ts.map +1 -0
- package/lib/Planetscale/MySQL/MySQLPassword.js +197 -0
- package/lib/Planetscale/MySQL/MySQLPassword.js.map +1 -0
- package/lib/Planetscale/MySQL/index.d.ts +6 -0
- package/lib/Planetscale/MySQL/index.d.ts.map +1 -0
- package/lib/Planetscale/MySQL/index.js +6 -0
- package/lib/Planetscale/MySQL/index.js.map +1 -0
- package/lib/Planetscale/Postgres/PostgresBranch.d.ts +67 -0
- package/lib/Planetscale/Postgres/PostgresBranch.d.ts.map +1 -0
- package/lib/Planetscale/Postgres/PostgresBranch.js +14 -0
- package/lib/Planetscale/Postgres/PostgresBranch.js.map +1 -0
- package/lib/Planetscale/Postgres/PostgresClusterSize.d.ts +44 -0
- package/lib/Planetscale/Postgres/PostgresClusterSize.d.ts.map +1 -0
- package/lib/Planetscale/Postgres/PostgresClusterSize.js +72 -0
- package/lib/Planetscale/Postgres/PostgresClusterSize.js.map +1 -0
- package/lib/Planetscale/Postgres/PostgresDatabase.d.ts +73 -0
- package/lib/Planetscale/Postgres/PostgresDatabase.d.ts.map +1 -0
- package/lib/Planetscale/Postgres/PostgresDatabase.js +241 -0
- package/lib/Planetscale/Postgres/PostgresDatabase.js.map +1 -0
- package/lib/Planetscale/Postgres/PostgresDefaultRole.d.ts +85 -0
- package/lib/Planetscale/Postgres/PostgresDefaultRole.d.ts.map +1 -0
- package/lib/Planetscale/Postgres/PostgresDefaultRole.js +142 -0
- package/lib/Planetscale/Postgres/PostgresDefaultRole.js.map +1 -0
- package/lib/Planetscale/Postgres/PostgresMigrations.d.ts +18 -0
- package/lib/Planetscale/Postgres/PostgresMigrations.d.ts.map +1 -0
- package/lib/Planetscale/Postgres/PostgresMigrations.js +148 -0
- package/lib/Planetscale/Postgres/PostgresMigrations.js.map +1 -0
- package/lib/Planetscale/Postgres/PostgresOrigin.d.ts +15 -0
- package/lib/Planetscale/Postgres/PostgresOrigin.d.ts.map +1 -0
- package/lib/Planetscale/Postgres/PostgresOrigin.js +2 -0
- package/lib/Planetscale/Postgres/PostgresOrigin.js.map +1 -0
- package/lib/Planetscale/Postgres/PostgresRole.d.ts +121 -0
- package/lib/Planetscale/Postgres/PostgresRole.d.ts.map +1 -0
- package/lib/Planetscale/Postgres/PostgresRole.js +228 -0
- package/lib/Planetscale/Postgres/PostgresRole.js.map +1 -0
- package/lib/Planetscale/Postgres/index.d.ts +7 -0
- package/lib/Planetscale/Postgres/index.d.ts.map +1 -0
- package/lib/Planetscale/Postgres/index.js +7 -0
- package/lib/Planetscale/Postgres/index.js.map +1 -0
- package/lib/Planetscale/Providers.d.ts +25 -0
- package/lib/Planetscale/Providers.d.ts.map +1 -0
- package/lib/Planetscale/Providers.js +40 -0
- package/lib/Planetscale/Providers.js.map +1 -0
- package/lib/Planetscale/Util.d.ts +182 -0
- package/lib/Planetscale/Util.d.ts.map +1 -0
- package/lib/Planetscale/Util.js +98 -0
- package/lib/Planetscale/Util.js.map +1 -0
- package/lib/Planetscale/index.d.ts +9 -0
- package/lib/Planetscale/index.d.ts.map +1 -0
- package/lib/Planetscale/index.js +9 -0
- package/lib/Planetscale/index.js.map +1 -0
- package/lib/Platform.d.ts.map +1 -1
- package/lib/Platform.js +7 -2
- package/lib/Platform.js.map +1 -1
- package/lib/RuntimeContext.d.ts +7 -3
- package/lib/RuntimeContext.d.ts.map +1 -1
- package/lib/RuntimeContext.js +3 -2
- package/lib/RuntimeContext.js.map +1 -1
- package/lib/Server/S3BucketEventSource.d.ts +1 -1
- package/lib/Server/S3BucketEventSource.d.ts.map +1 -1
- package/lib/{Neon → Sql}/SqlFile.d.ts +2 -0
- package/lib/Sql/SqlFile.d.ts.map +1 -0
- package/lib/{Neon → Sql}/SqlFile.js +14 -0
- package/lib/Sql/SqlFile.js.map +1 -0
- package/lib/Sql/index.d.ts +2 -0
- package/lib/Sql/index.d.ts.map +1 -0
- package/lib/Sql/index.js +2 -0
- package/lib/Sql/index.js.map +1 -0
- package/lib/tsconfig.test.tsbuildinfo +1 -1
- package/package.json +20 -6
- package/src/Binding.ts +1 -1
- package/src/Bundle/Docker.ts +12 -15
- package/src/Cli/commands/deploy.ts +1 -0
- package/src/Cloudflare/AiGateway/AiGatewayBinding.ts +11 -16
- package/src/Cloudflare/AnalyticsEngine/AnalyticsEngineDatasetBinding.ts +7 -9
- package/src/Cloudflare/Artifacts/ArtifactsBinding.ts +11 -22
- package/src/Cloudflare/D1/D1Connection.ts +31 -18
- package/src/Cloudflare/D1/D1Database.ts +1 -1
- package/src/Cloudflare/D1/D1Migrations.ts +2 -2
- package/src/Cloudflare/Email/SendEmailBinding.ts +7 -5
- package/src/Cloudflare/Hyperdrive/HyperdriveBinding.ts +16 -12
- package/src/Cloudflare/Images/ImagesBinding.ts +8 -8
- package/src/Cloudflare/KV/KVNamespaceBinding.ts +38 -38
- package/src/Cloudflare/Queue/QueueBinding.ts +7 -6
- package/src/Cloudflare/R2/R2BucketBinding.ts +16 -19
- package/src/Cloudflare/SecretsStore/SecretBinding.ts +11 -13
- package/src/Cloudflare/Workers/DurableObjectNamespace.ts +6 -6
- package/src/Cloudflare/Workers/DynamicWorkerLoader.ts +4 -5
- package/src/Cloudflare/Workers/RpcAsync.ts +55 -0
- package/src/Cloudflare/Workers/Worker.ts +17 -5
- package/src/Cloudflare/Workers/WorkerRuntimeContext.ts +2 -0
- package/src/Cloudflare/Workers/Workflow.ts +10 -11
- package/src/Neon/Branch.ts +1 -1
- package/src/Neon/Migrations.ts +1 -1
- package/src/Neon/Project.ts +6 -20
- package/src/Phase.ts +2 -0
- package/src/Planetscale/AuthProvider.ts +285 -0
- package/src/Planetscale/Branch.ts +508 -0
- package/src/Planetscale/Credentials.ts +96 -0
- package/src/Planetscale/Database.ts +129 -0
- package/src/Planetscale/MySQL/MySQLBranch.ts +112 -0
- package/src/Planetscale/MySQL/MySQLClusterSize.ts +102 -0
- package/src/Planetscale/MySQL/MySQLDatabase.ts +446 -0
- package/src/Planetscale/MySQL/MySQLMigrations.ts +271 -0
- package/src/Planetscale/MySQL/MySQLOrigin.ts +15 -0
- package/src/Planetscale/MySQL/MySQLPassword.ts +387 -0
- package/src/Planetscale/MySQL/index.ts +5 -0
- package/src/Planetscale/Postgres/PostgresBranch.ts +97 -0
- package/src/Planetscale/Postgres/PostgresClusterSize.ts +125 -0
- package/src/Planetscale/Postgres/PostgresDatabase.ts +404 -0
- package/src/Planetscale/Postgres/PostgresDefaultRole.ts +270 -0
- package/src/Planetscale/Postgres/PostgresMigrations.ts +256 -0
- package/src/Planetscale/Postgres/PostgresOrigin.ts +15 -0
- package/src/Planetscale/Postgres/PostgresRole.ts +469 -0
- package/src/Planetscale/Postgres/index.ts +6 -0
- package/src/Planetscale/Providers.ts +80 -0
- package/src/Planetscale/Util.ts +160 -0
- package/src/Planetscale/index.ts +18 -0
- package/src/Platform.ts +13 -1
- package/src/RuntimeContext.ts +7 -8
- package/src/{Neon → Sql}/SqlFile.ts +22 -0
- package/src/Sql/index.ts +1 -0
- package/lib/Cloudflare/D1/D1SqlFile.d.ts +0 -20
- package/lib/Cloudflare/D1/D1SqlFile.d.ts.map +0 -1
- package/lib/Cloudflare/D1/D1SqlFile.js +0 -46
- package/lib/Cloudflare/D1/D1SqlFile.js.map +0 -1
- package/lib/Neon/SqlFile.d.ts.map +0 -1
- package/lib/Neon/SqlFile.js.map +0 -1
- package/src/Cloudflare/D1/D1SqlFile.ts +0 -55
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "alchemy",
|
|
3
|
-
"version": "2.0.0-beta.
|
|
3
|
+
"version": "2.0.0-beta.43",
|
|
4
4
|
"homepage": "https://alchemy.run",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"author": "Sam Goodwin <sam@alchemy.run>",
|
|
@@ -196,6 +196,18 @@
|
|
|
196
196
|
"worker": "./src/Output.ts",
|
|
197
197
|
"import": "./lib/Output.js"
|
|
198
198
|
},
|
|
199
|
+
"./Planetscale": {
|
|
200
|
+
"types": "./lib/Planetscale/index.d.ts",
|
|
201
|
+
"bun": "./src/Planetscale/index.ts",
|
|
202
|
+
"worker": "./src/Planetscale/index.ts",
|
|
203
|
+
"import": "./lib/Planetscale/index.js"
|
|
204
|
+
},
|
|
205
|
+
"./Planetscale/*": {
|
|
206
|
+
"types": "./lib/Planetscale/*/index.d.ts",
|
|
207
|
+
"bun": "./src/Planetscale/*/index.ts",
|
|
208
|
+
"worker": "./src/Planetscale/*/index.ts",
|
|
209
|
+
"import": "./lib/Planetscale/*/index.js"
|
|
210
|
+
},
|
|
199
211
|
"./Runtime": {
|
|
200
212
|
"types": "./lib/Runtime.d.ts",
|
|
201
213
|
"bun": "./src/Runtime.ts",
|
|
@@ -279,14 +291,15 @@
|
|
|
279
291
|
"@alchemy.run/node-utils": "0.0.2",
|
|
280
292
|
"@aws-sdk/credential-providers": "^3.0.0",
|
|
281
293
|
"@clack/prompts": "^0.11.0",
|
|
282
|
-
"@distilled.cloud/aws": "^0.21.
|
|
283
|
-
"@distilled.cloud/axiom": "^0.21.
|
|
284
|
-
"@distilled.cloud/cloudflare": "^0.21.
|
|
294
|
+
"@distilled.cloud/aws": "^0.21.3",
|
|
295
|
+
"@distilled.cloud/axiom": "^0.21.3",
|
|
296
|
+
"@distilled.cloud/cloudflare": "^0.21.3",
|
|
285
297
|
"@distilled.cloud/cloudflare-rolldown-plugin": "0.5.4",
|
|
286
298
|
"@distilled.cloud/cloudflare-runtime": "0.5.4",
|
|
287
299
|
"@distilled.cloud/cloudflare-vite-plugin": "0.5.4",
|
|
288
|
-
"@distilled.cloud/core": "^0.21.
|
|
289
|
-
"@distilled.cloud/
|
|
300
|
+
"@distilled.cloud/core": "^0.21.3",
|
|
301
|
+
"@distilled.cloud/planetscale": "^0.21.3",
|
|
302
|
+
"@distilled.cloud/neon": "^0.21.3",
|
|
290
303
|
"@effect/vitest": ">=4.0.0-beta.66 || >=4.0.0",
|
|
291
304
|
"@libsql/client": "^0.17.0",
|
|
292
305
|
"@octokit/rest": "^22.0.1",
|
|
@@ -303,6 +316,7 @@
|
|
|
303
316
|
"jszip": "^3.10.1",
|
|
304
317
|
"libsodium-wrappers": "^0.8.3",
|
|
305
318
|
"magic-string": "^0.30.21",
|
|
319
|
+
"mysql2": "^3.15.3",
|
|
306
320
|
"pathe": "^2.0.3",
|
|
307
321
|
"pg": "^8.13.0",
|
|
308
322
|
"picomatch": "^4.0.4",
|
package/src/Binding.ts
CHANGED
|
@@ -90,7 +90,7 @@ export interface Policy<
|
|
|
90
90
|
in out Self,
|
|
91
91
|
in out Identifier extends string,
|
|
92
92
|
in out Shape extends (...args: any[]) => Effect.Effect<any, any, any>,
|
|
93
|
-
> extends Effect.Effect<Shape, never, Self
|
|
93
|
+
> extends Effect.Effect<Shape, never, Self> {
|
|
94
94
|
readonly key: Identifier;
|
|
95
95
|
new (_: never): PolicyShape<Identifier, Shape>;
|
|
96
96
|
layer: {
|
package/src/Bundle/Docker.ts
CHANGED
|
@@ -2,6 +2,7 @@ import * as Data from "effect/Data";
|
|
|
2
2
|
import * as Effect from "effect/Effect";
|
|
3
3
|
import * as FileSystem from "effect/FileSystem";
|
|
4
4
|
import * as Path from "effect/Path";
|
|
5
|
+
import * as Stream from "effect/Stream";
|
|
5
6
|
import { ChildProcess } from "effect/unstable/process";
|
|
6
7
|
import { exec } from "../Util/exec.ts";
|
|
7
8
|
|
|
@@ -66,8 +67,6 @@ export const writeContextFiles = Effect.fn(function* (
|
|
|
66
67
|
}
|
|
67
68
|
});
|
|
68
69
|
|
|
69
|
-
const shellQuote = (value: string) => `'${value.replaceAll("'", `'\\''`)}'`;
|
|
70
|
-
|
|
71
70
|
export const runDockerCommand = Effect.fn(function* (
|
|
72
71
|
args: ReadonlyArray<string>,
|
|
73
72
|
options?: {
|
|
@@ -77,24 +76,22 @@ export const runDockerCommand = Effect.fn(function* (
|
|
|
77
76
|
stdin?: string;
|
|
78
77
|
},
|
|
79
78
|
) {
|
|
80
|
-
const command = `docker ${args.
|
|
81
|
-
const
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
? {}
|
|
90
|
-
: { ALCHEMY_DOCKER_STDIN: options.stdin }),
|
|
79
|
+
const command = `docker ${args.join(" ")}`;
|
|
80
|
+
const env = { ...process.env, ...options?.env };
|
|
81
|
+
const commandOptions: ChildProcess.CommandOptions = {
|
|
82
|
+
env,
|
|
83
|
+
...(options?.stdin !== undefined
|
|
84
|
+
? {
|
|
85
|
+
stdin: Stream.succeed(new TextEncoder().encode(options.stdin)),
|
|
86
|
+
}
|
|
87
|
+
: {}),
|
|
91
88
|
};
|
|
92
89
|
const child = options?.cwd
|
|
93
90
|
? ChildProcess.setCwd(
|
|
94
|
-
ChildProcess.make(
|
|
91
|
+
ChildProcess.make("docker", args, commandOptions),
|
|
95
92
|
options.cwd,
|
|
96
93
|
)
|
|
97
|
-
: ChildProcess.make(
|
|
94
|
+
: ChildProcess.make("docker", args, commandOptions);
|
|
98
95
|
|
|
99
96
|
const { stdout, stderr, exitCode } = yield* exec(child).pipe(
|
|
100
97
|
Effect.catch((e) =>
|
|
@@ -3,9 +3,9 @@
|
|
|
3
3
|
import * as Data from "effect/Data";
|
|
4
4
|
import * as Effect from "effect/Effect";
|
|
5
5
|
import * as Layer from "effect/Layer";
|
|
6
|
-
import * as Option from "effect/Option";
|
|
7
6
|
import * as Binding from "../../Binding.ts";
|
|
8
7
|
import type { ResourceLike } from "../../Resource.ts";
|
|
8
|
+
import type { RuntimeContext } from "../../RuntimeContext.ts";
|
|
9
9
|
import { isWorker, WorkerEnvironment } from "../Workers/Worker.ts";
|
|
10
10
|
import type { AiGateway as AiGatewayResource } from "./AiGateway.ts";
|
|
11
11
|
|
|
@@ -34,37 +34,37 @@ export interface AiGatewayClient {
|
|
|
34
34
|
/**
|
|
35
35
|
* Effect resolving to the raw Workers AI binding.
|
|
36
36
|
*/
|
|
37
|
-
raw: Effect.Effect<Ai, never,
|
|
37
|
+
raw: Effect.Effect<Ai, never, RuntimeContext>;
|
|
38
38
|
/**
|
|
39
39
|
* Effect resolving to the raw AI Gateway runtime binding.
|
|
40
40
|
*/
|
|
41
|
-
gateway: Effect.Effect<AiGateway, never,
|
|
41
|
+
gateway: Effect.Effect<AiGateway, never, RuntimeContext>;
|
|
42
42
|
/**
|
|
43
43
|
* Update metadata on an existing AI Gateway log entry.
|
|
44
44
|
*/
|
|
45
45
|
patchLog(
|
|
46
46
|
logId: string,
|
|
47
47
|
data: Parameters<AiGateway["patchLog"]>[1],
|
|
48
|
-
): Effect.Effect<void, AiGatewayError,
|
|
48
|
+
): Effect.Effect<void, AiGatewayError, RuntimeContext>;
|
|
49
49
|
/**
|
|
50
50
|
* Read an AI Gateway log entry by ID.
|
|
51
51
|
*/
|
|
52
52
|
getLog(
|
|
53
53
|
logId: string,
|
|
54
|
-
): Effect.Effect<AiGatewayLog, AiGatewayError,
|
|
54
|
+
): Effect.Effect<AiGatewayLog, AiGatewayError, RuntimeContext>;
|
|
55
55
|
/**
|
|
56
56
|
* Build a provider URL routed through this gateway.
|
|
57
57
|
*/
|
|
58
58
|
getUrl(
|
|
59
59
|
provider?: Parameters<AiGateway["getUrl"]>[0],
|
|
60
|
-
): Effect.Effect<string, AiGatewayError,
|
|
60
|
+
): Effect.Effect<string, AiGatewayError, RuntimeContext>;
|
|
61
61
|
/**
|
|
62
62
|
* Run an AI Gateway request through the Cloudflare runtime binding.
|
|
63
63
|
*/
|
|
64
64
|
run(
|
|
65
65
|
data: Parameters<AiGateway["run"]>[0],
|
|
66
66
|
options?: Parameters<AiGateway["run"]>[1],
|
|
67
|
-
): Effect.Effect<Response, AiGatewayError,
|
|
67
|
+
): Effect.Effect<Response, AiGatewayError, RuntimeContext>;
|
|
68
68
|
}
|
|
69
69
|
|
|
70
70
|
/**
|
|
@@ -106,18 +106,13 @@ export const AiGatewayBindingLive = Layer.effect(
|
|
|
106
106
|
AiGatewayBinding,
|
|
107
107
|
Effect.gen(function* () {
|
|
108
108
|
const Policy = yield* AiGatewayBindingPolicy;
|
|
109
|
+
const env = yield* WorkerEnvironment;
|
|
109
110
|
|
|
110
111
|
return Effect.fn(function* (gateway: AiGatewayResource) {
|
|
111
112
|
yield* Policy(gateway);
|
|
112
|
-
// Capture the gatewayId accessor (which requires WorkerEnvironment) but
|
|
113
|
-
// don't resolve it here — that happens lazily at runtime when each
|
|
114
|
-
// method is invoked. Resolving eagerly would require WorkerEnvironment
|
|
115
|
-
// at deploy time, where it's intentionally not provided.
|
|
116
113
|
const gatewayIdAccessor = yield* gateway.gatewayId;
|
|
117
|
-
const ai =
|
|
118
|
-
|
|
119
|
-
Effect.map((env) => env?.[gateway.LogicalId]! as Ai),
|
|
120
|
-
Effect.cached,
|
|
114
|
+
const ai = Effect.sync(
|
|
115
|
+
() => (env as Record<string, Ai>)[gateway.LogicalId]!,
|
|
121
116
|
);
|
|
122
117
|
const runtimeGateway = yield* Effect.zip(ai, gatewayIdAccessor).pipe(
|
|
123
118
|
Effect.map(([ai, gatewayId]) => ai.gateway(gatewayId)),
|
|
@@ -126,7 +121,7 @@ export const AiGatewayBindingLive = Layer.effect(
|
|
|
126
121
|
|
|
127
122
|
const use = <T>(
|
|
128
123
|
fn: (gateway: AiGateway) => Promise<T>,
|
|
129
|
-
): Effect.Effect<T, AiGatewayError
|
|
124
|
+
): Effect.Effect<T, AiGatewayError> =>
|
|
130
125
|
runtimeGateway.pipe(
|
|
131
126
|
Effect.flatMap((gateway) => tryPromise(() => fn(gateway))),
|
|
132
127
|
);
|
|
@@ -3,6 +3,7 @@ import * as Effect from "effect/Effect";
|
|
|
3
3
|
import * as Layer from "effect/Layer";
|
|
4
4
|
import * as Binding from "../../Binding.ts";
|
|
5
5
|
import type { ResourceLike } from "../../Resource.ts";
|
|
6
|
+
import type { RuntimeContext } from "../../RuntimeContext.ts";
|
|
6
7
|
import { isWorker, WorkerEnvironment } from "../Workers/Worker.ts";
|
|
7
8
|
import type { AnalyticsEngineDataset as AnalyticsEngineDatasetLike } from "./AnalyticsEngineDataset.ts";
|
|
8
9
|
|
|
@@ -24,10 +25,10 @@ export class AnalyticsEngineDatasetError extends Data.TaggedError(
|
|
|
24
25
|
}> {}
|
|
25
26
|
|
|
26
27
|
export interface AnalyticsEngineDatasetClient {
|
|
27
|
-
raw: Effect.Effect<RuntimeAnalyticsEngineDataset, never,
|
|
28
|
+
raw: Effect.Effect<RuntimeAnalyticsEngineDataset, never, RuntimeContext>;
|
|
28
29
|
writeDataPoint(
|
|
29
30
|
dataPoint: AnalyticsEngineDataPoint,
|
|
30
|
-
): Effect.Effect<void, AnalyticsEngineDatasetError,
|
|
31
|
+
): Effect.Effect<void, AnalyticsEngineDatasetError, RuntimeContext>;
|
|
31
32
|
}
|
|
32
33
|
|
|
33
34
|
export class AnalyticsEngineDatasetBinding extends Binding.Service<
|
|
@@ -41,17 +42,14 @@ export const AnalyticsEngineDatasetBindingLive = Layer.effect(
|
|
|
41
42
|
AnalyticsEngineDatasetBinding,
|
|
42
43
|
Effect.gen(function* () {
|
|
43
44
|
const bind = yield* AnalyticsEngineDatasetBindingPolicy;
|
|
45
|
+
const env = yield* WorkerEnvironment;
|
|
44
46
|
|
|
45
47
|
return Effect.fnUntraced(function* (dataset: AnalyticsEngineDatasetLike) {
|
|
46
48
|
yield* bind(dataset);
|
|
47
49
|
|
|
48
|
-
const raw =
|
|
49
|
-
|
|
50
|
-
(env)
|
|
51
|
-
(env as Record<string, RuntimeAnalyticsEngineDataset>)[
|
|
52
|
-
dataset.name
|
|
53
|
-
]!,
|
|
54
|
-
),
|
|
50
|
+
const raw = Effect.sync(
|
|
51
|
+
() =>
|
|
52
|
+
(env as Record<string, RuntimeAnalyticsEngineDataset>)[dataset.name]!,
|
|
55
53
|
);
|
|
56
54
|
|
|
57
55
|
return {
|
|
@@ -3,6 +3,7 @@ import * as Effect from "effect/Effect";
|
|
|
3
3
|
import * as Layer from "effect/Layer";
|
|
4
4
|
import * as Binding from "../../Binding.ts";
|
|
5
5
|
import type { ResourceLike } from "../../Resource.ts";
|
|
6
|
+
import type { RuntimeContext } from "../../RuntimeContext.ts";
|
|
6
7
|
import { isWorker, WorkerEnvironment } from "../Workers/Worker.ts";
|
|
7
8
|
import { type Artifacts as ArtifactsLike } from "./Artifacts.ts";
|
|
8
9
|
|
|
@@ -66,32 +67,22 @@ export interface ArtifactsRepoClient {
|
|
|
66
67
|
*/
|
|
67
68
|
export interface ArtifactsClient {
|
|
68
69
|
/** Effect resolving to the raw Cloudflare runtime binding. */
|
|
69
|
-
raw: Effect.Effect<Artifacts, never,
|
|
70
|
+
raw: Effect.Effect<Artifacts, never, RuntimeContext>;
|
|
70
71
|
create(
|
|
71
72
|
name: string,
|
|
72
73
|
opts?: ArtifactsCreateOptions,
|
|
73
|
-
): Effect.Effect<
|
|
74
|
-
ArtifactsCreateRepoResult,
|
|
75
|
-
ArtifactsError,
|
|
76
|
-
WorkerEnvironment
|
|
77
|
-
>;
|
|
74
|
+
): Effect.Effect<ArtifactsCreateRepoResult, ArtifactsError, RuntimeContext>;
|
|
78
75
|
/** Look up an existing repo by name. Fails with `ArtifactsError` if missing. */
|
|
79
76
|
get(
|
|
80
77
|
name: string,
|
|
81
|
-
): Effect.Effect<ArtifactsRepoClient, ArtifactsError,
|
|
78
|
+
): Effect.Effect<ArtifactsRepoClient, ArtifactsError, RuntimeContext>;
|
|
82
79
|
list(
|
|
83
80
|
opts?: ArtifactsListOptions,
|
|
84
|
-
): Effect.Effect<ArtifactsRepoListResult, ArtifactsError,
|
|
85
|
-
delete(
|
|
86
|
-
name: string,
|
|
87
|
-
): Effect.Effect<boolean, ArtifactsError, WorkerEnvironment>;
|
|
81
|
+
): Effect.Effect<ArtifactsRepoListResult, ArtifactsError, RuntimeContext>;
|
|
82
|
+
delete(name: string): Effect.Effect<boolean, ArtifactsError, RuntimeContext>;
|
|
88
83
|
import(
|
|
89
84
|
opts: ArtifactsImportOptions,
|
|
90
|
-
): Effect.Effect<
|
|
91
|
-
ArtifactsCreateRepoResult,
|
|
92
|
-
ArtifactsError,
|
|
93
|
-
WorkerEnvironment
|
|
94
|
-
>;
|
|
85
|
+
): Effect.Effect<ArtifactsCreateRepoResult, ArtifactsError, RuntimeContext>;
|
|
95
86
|
}
|
|
96
87
|
|
|
97
88
|
export class ArtifactsBinding extends Binding.Service<
|
|
@@ -103,19 +94,17 @@ export const ArtifactsBindingLive = Layer.effect(
|
|
|
103
94
|
ArtifactsBinding,
|
|
104
95
|
Effect.gen(function* () {
|
|
105
96
|
const Policy = yield* ArtifactsBindingPolicy;
|
|
97
|
+
const env = yield* WorkerEnvironment;
|
|
106
98
|
|
|
107
99
|
return Effect.fn(function* (artifacts: ArtifactsLike) {
|
|
108
100
|
yield* Policy(artifacts);
|
|
109
|
-
const
|
|
110
|
-
|
|
111
|
-
Effect.map(
|
|
112
|
-
(env) => (env as Record<string, Artifacts>)[artifacts.name]!,
|
|
113
|
-
),
|
|
101
|
+
const raw = Effect.sync(
|
|
102
|
+
() => (env as Record<string, Artifacts>)[artifacts.name]!,
|
|
114
103
|
);
|
|
115
104
|
|
|
116
105
|
const use = <T>(
|
|
117
106
|
fn: (raw: Artifacts) => Promise<T>,
|
|
118
|
-
): Effect.Effect<T, ArtifactsError
|
|
107
|
+
): Effect.Effect<T, ArtifactsError> =>
|
|
119
108
|
raw.pipe(Effect.flatMap((raw) => tryPromise(() => fn(raw))));
|
|
120
109
|
|
|
121
110
|
return {
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import type * as runtime from "@cloudflare/workers-types";
|
|
2
2
|
import * as Effect from "effect/Effect";
|
|
3
3
|
import * as Layer from "effect/Layer";
|
|
4
|
-
import * as Option from "effect/Option";
|
|
5
4
|
import * as Binding from "../../Binding.ts";
|
|
5
|
+
import type { RuntimeContext } from "../../RuntimeContext.ts";
|
|
6
6
|
import { WorkerEnvironment } from "../Workers/Worker.ts";
|
|
7
7
|
import type { D1Database } from "./D1Database.ts";
|
|
8
8
|
import { DatabaseBinding } from "./D1DatabaseBinding.ts";
|
|
@@ -33,32 +33,44 @@ export class D1PreparedStatement {
|
|
|
33
33
|
}
|
|
34
34
|
|
|
35
35
|
/** Run the query and return all matching rows. */
|
|
36
|
-
all<T = unknown>(): Effect.Effect<
|
|
36
|
+
all<T = unknown>(): Effect.Effect<
|
|
37
|
+
runtime.D1Result<T>,
|
|
38
|
+
never,
|
|
39
|
+
RuntimeContext
|
|
40
|
+
> {
|
|
37
41
|
return this.withRuntime((stmt) => stmt.all<T>());
|
|
38
42
|
}
|
|
39
43
|
|
|
40
44
|
/** Run the query and return the first row, or `null` if no rows. */
|
|
41
|
-
first<T = unknown>(): Effect.Effect<T | null>;
|
|
42
|
-
first<T = unknown>(
|
|
43
|
-
|
|
45
|
+
first<T = unknown>(): Effect.Effect<T | null, never, RuntimeContext>;
|
|
46
|
+
first<T = unknown>(
|
|
47
|
+
column: string,
|
|
48
|
+
): Effect.Effect<T | null, never, RuntimeContext>;
|
|
49
|
+
first<T = unknown>(
|
|
50
|
+
column?: string,
|
|
51
|
+
): Effect.Effect<T | null, never, RuntimeContext> {
|
|
44
52
|
return this.withRuntime((stmt) =>
|
|
45
53
|
column !== undefined ? stmt.first<T>(column) : stmt.first<T>(),
|
|
46
54
|
);
|
|
47
55
|
}
|
|
48
56
|
|
|
49
57
|
/** Run the query as a mutation; returns row metadata. */
|
|
50
|
-
run<T = unknown>(): Effect.Effect<
|
|
58
|
+
run<T = unknown>(): Effect.Effect<
|
|
59
|
+
runtime.D1Result<T>,
|
|
60
|
+
never,
|
|
61
|
+
RuntimeContext
|
|
62
|
+
> {
|
|
51
63
|
return this.withRuntime((stmt) => stmt.run<T>());
|
|
52
64
|
}
|
|
53
65
|
|
|
54
66
|
/** Run the query and return rows as flat arrays. */
|
|
55
|
-
raw<T = unknown[]>(): Effect.Effect<T[]>;
|
|
67
|
+
raw<T = unknown[]>(): Effect.Effect<T[], never, RuntimeContext>;
|
|
56
68
|
raw<T = unknown[]>(options: {
|
|
57
69
|
columnNames: true;
|
|
58
|
-
}): Effect.Effect<[string[], ...T[]]>;
|
|
70
|
+
}): Effect.Effect<[string[], ...T[]], never, RuntimeContext>;
|
|
59
71
|
raw<T = unknown[]>(options?: {
|
|
60
72
|
columnNames: true;
|
|
61
|
-
}): Effect.Effect<T[] | [string[], ...T[]]> {
|
|
73
|
+
}): Effect.Effect<T[] | [string[], ...T[]], never, RuntimeContext> {
|
|
62
74
|
return this.withRuntime((stmt) =>
|
|
63
75
|
options
|
|
64
76
|
? stmt.raw<T>(options)
|
|
@@ -80,10 +92,10 @@ export class D1PreparedStatement {
|
|
|
80
92
|
|
|
81
93
|
private withRuntime<A>(
|
|
82
94
|
fn: (stmt: runtime.D1PreparedStatement) => Promise<A>,
|
|
83
|
-
): Effect.Effect<A> {
|
|
95
|
+
): Effect.Effect<A, never, RuntimeContext> {
|
|
84
96
|
return Effect.flatMap(this.rawEff, (raw) =>
|
|
85
97
|
Effect.promise(() => fn(this._build(raw))),
|
|
86
|
-
)
|
|
98
|
+
) as Effect.Effect<A, never, RuntimeContext>;
|
|
87
99
|
}
|
|
88
100
|
}
|
|
89
101
|
|
|
@@ -92,7 +104,7 @@ export interface D1ConnectionClient {
|
|
|
92
104
|
* An Effect that resolves to the raw underlying Cloudflare D1Database binding.
|
|
93
105
|
* Use this when you need direct access for libraries like Better Auth.
|
|
94
106
|
*/
|
|
95
|
-
raw: Effect.Effect<runtime.D1Database>;
|
|
107
|
+
raw: Effect.Effect<runtime.D1Database, never, RuntimeContext>;
|
|
96
108
|
/**
|
|
97
109
|
* Prepare a SQL statement. Returns synchronously — the network
|
|
98
110
|
* round-trip happens when you yield one of the statement's
|
|
@@ -102,14 +114,16 @@ export interface D1ConnectionClient {
|
|
|
102
114
|
/**
|
|
103
115
|
* Execute raw SQL without prepared statements.
|
|
104
116
|
*/
|
|
105
|
-
exec: (
|
|
117
|
+
exec: (
|
|
118
|
+
query: string,
|
|
119
|
+
) => Effect.Effect<runtime.D1ExecResult, never, RuntimeContext>;
|
|
106
120
|
/**
|
|
107
121
|
* Send multiple prepared statements in a single call.
|
|
108
122
|
* Statements execute sequentially and are rolled back on failure.
|
|
109
123
|
*/
|
|
110
124
|
batch: <T = unknown>(
|
|
111
125
|
statements: D1PreparedStatement[],
|
|
112
|
-
) => Effect.Effect<runtime.D1Result<T>[]>;
|
|
126
|
+
) => Effect.Effect<runtime.D1Result<T>[], never, RuntimeContext>;
|
|
113
127
|
}
|
|
114
128
|
|
|
115
129
|
export class D1Connection extends Binding.Service<
|
|
@@ -121,13 +135,12 @@ export const D1ConnectionLive = Layer.effect(
|
|
|
121
135
|
D1Connection,
|
|
122
136
|
Effect.gen(function* () {
|
|
123
137
|
const Policy = yield* D1ConnectionPolicy;
|
|
138
|
+
const env = yield* WorkerEnvironment;
|
|
124
139
|
|
|
125
140
|
return Effect.fn(function* (database: D1Database) {
|
|
126
141
|
yield* Policy(database);
|
|
127
|
-
const rawEff =
|
|
128
|
-
|
|
129
|
-
Effect.map((env) => env?.[database.LogicalId]! as runtime.D1Database),
|
|
130
|
-
Effect.cached,
|
|
142
|
+
const rawEff = Effect.sync(
|
|
143
|
+
() => (env as Record<string, runtime.D1Database>)[database.LogicalId]!,
|
|
131
144
|
);
|
|
132
145
|
|
|
133
146
|
return {
|
|
@@ -10,7 +10,7 @@ import type { Providers } from "../Providers.ts";
|
|
|
10
10
|
import { cloneD1Database } from "./D1Clone.ts";
|
|
11
11
|
import { importD1Database } from "./D1Import.ts";
|
|
12
12
|
import { applyMigrations } from "./D1Migrations.ts";
|
|
13
|
-
import { listSqlFiles, readSqlFile } from "
|
|
13
|
+
import { listSqlFiles, readSqlFile } from "../../Sql/SqlFile.ts";
|
|
14
14
|
|
|
15
15
|
export type Jurisdiction = "default" | "eu" | "fedramp";
|
|
16
16
|
export type PrimaryLocationHint =
|
|
@@ -2,13 +2,13 @@ import * as d1 from "@distilled.cloud/cloudflare/d1";
|
|
|
2
2
|
import * as Effect from "effect/Effect";
|
|
3
3
|
import type * as HttpClient from "effect/unstable/http/HttpClient";
|
|
4
4
|
import type { Credentials } from "@distilled.cloud/cloudflare/Credentials";
|
|
5
|
-
import type {
|
|
5
|
+
import type { SqlFile } from "../../Sql/SqlFile.ts";
|
|
6
6
|
|
|
7
7
|
export interface ApplyMigrationsOptions {
|
|
8
8
|
accountId: string;
|
|
9
9
|
databaseId: string;
|
|
10
10
|
migrationsTable: string;
|
|
11
|
-
migrationsFiles: ReadonlyArray<
|
|
11
|
+
migrationsFiles: ReadonlyArray<SqlFile>;
|
|
12
12
|
}
|
|
13
13
|
|
|
14
14
|
interface TableColumn {
|
|
@@ -4,6 +4,7 @@ import * as Effect from "effect/Effect";
|
|
|
4
4
|
import * as Layer from "effect/Layer";
|
|
5
5
|
import * as Binding from "../../Binding.ts";
|
|
6
6
|
import type { ResourceLike } from "../../Resource.ts";
|
|
7
|
+
import type { RuntimeContext } from "../../RuntimeContext.ts";
|
|
7
8
|
import { isWorker, WorkerEnvironment } from "../Workers/Worker.ts";
|
|
8
9
|
import type { SendEmail } from "./SendEmail.ts";
|
|
9
10
|
|
|
@@ -35,20 +36,20 @@ export interface SendEmailClient {
|
|
|
35
36
|
* access to the Cloudflare object (e.g. to send a pre-built
|
|
36
37
|
* `EmailMessage` from `cloudflare:email`).
|
|
37
38
|
*/
|
|
38
|
-
raw: Effect.Effect<runtime.SendEmail, never,
|
|
39
|
+
raw: Effect.Effect<runtime.SendEmail, never, RuntimeContext>;
|
|
39
40
|
/**
|
|
40
41
|
* Send an email using the builder form. Equivalent to calling
|
|
41
42
|
* `env.<name>.send({ from, to, subject, text, html, ... })`.
|
|
42
43
|
*/
|
|
43
44
|
send(
|
|
44
45
|
message: SendEmailMessage,
|
|
45
|
-
): Effect.Effect<runtime.EmailSendResult, SendEmailError,
|
|
46
|
+
): Effect.Effect<runtime.EmailSendResult, SendEmailError, RuntimeContext>;
|
|
46
47
|
/**
|
|
47
48
|
* Send a raw `EmailMessage` (constructed via `cloudflare:email`).
|
|
48
49
|
*/
|
|
49
50
|
sendRaw(
|
|
50
51
|
message: runtime.EmailMessage,
|
|
51
|
-
): Effect.Effect<runtime.EmailSendResult, SendEmailError,
|
|
52
|
+
): Effect.Effect<runtime.EmailSendResult, SendEmailError, RuntimeContext>;
|
|
52
53
|
}
|
|
53
54
|
|
|
54
55
|
/**
|
|
@@ -65,12 +66,13 @@ export const SendEmailBindingLive = Layer.effect(
|
|
|
65
66
|
SendEmailBinding,
|
|
66
67
|
Effect.gen(function* () {
|
|
67
68
|
const bind = yield* SendEmailBindingPolicy;
|
|
69
|
+
const env = yield* WorkerEnvironment;
|
|
68
70
|
|
|
69
71
|
return Effect.fnUntraced(function* (sender: SendEmail) {
|
|
70
72
|
yield* bind(sender);
|
|
71
73
|
|
|
72
|
-
const raw =
|
|
73
|
-
(
|
|
74
|
+
const raw = Effect.sync(
|
|
75
|
+
() => (env as Record<string, runtime.SendEmail>)[sender.name]!,
|
|
74
76
|
);
|
|
75
77
|
|
|
76
78
|
const tryPromise = <T>(
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import type * as runtime from "@cloudflare/workers-types";
|
|
2
2
|
import * as Effect from "effect/Effect";
|
|
3
3
|
import * as Layer from "effect/Layer";
|
|
4
|
-
import * as Option from "effect/Option";
|
|
5
4
|
import * as Redacted from "effect/Redacted";
|
|
6
5
|
import { AlchemyContext } from "../../AlchemyContext.ts";
|
|
7
6
|
import * as Binding from "../../Binding.ts";
|
|
8
7
|
import * as Output from "../../Output.ts";
|
|
9
8
|
import type { ResourceLike } from "../../Resource.ts";
|
|
9
|
+
import type { RuntimeContext } from "../../RuntimeContext.ts";
|
|
10
10
|
import { isWorker, WorkerEnvironment } from "../Workers/Worker.ts";
|
|
11
11
|
import type { Hyperdrive } from "./Hyperdrive.ts";
|
|
12
12
|
import { defaultPort, type HyperdriveDevOrigin } from "./Hyperdrive.ts";
|
|
@@ -16,32 +16,36 @@ export interface HyperdriveBindingClient {
|
|
|
16
16
|
* The raw runtime `Hyperdrive` binding. Use this when integrating with a
|
|
17
17
|
* driver that wants direct access to the Cloudflare object.
|
|
18
18
|
*/
|
|
19
|
-
raw: Effect.Effect<runtime.Hyperdrive>;
|
|
19
|
+
raw: Effect.Effect<runtime.Hyperdrive, never, RuntimeContext>;
|
|
20
20
|
/**
|
|
21
21
|
* A valid DB connection string for use with a driver/ORM.
|
|
22
22
|
*/
|
|
23
|
-
connectionString: Effect.Effect<
|
|
23
|
+
connectionString: Effect.Effect<
|
|
24
|
+
Redacted.Redacted<string>,
|
|
25
|
+
never,
|
|
26
|
+
RuntimeContext
|
|
27
|
+
>;
|
|
24
28
|
/**
|
|
25
29
|
* Hostname valid only within the current Worker invocation.
|
|
26
30
|
*/
|
|
27
|
-
host: Effect.Effect<string>;
|
|
31
|
+
host: Effect.Effect<string, never, RuntimeContext>;
|
|
28
32
|
/**
|
|
29
33
|
* Port to pair with `host`.
|
|
30
34
|
*/
|
|
31
|
-
port: Effect.Effect<number>;
|
|
35
|
+
port: Effect.Effect<number, never, RuntimeContext>;
|
|
32
36
|
/**
|
|
33
37
|
* Database user.
|
|
34
38
|
*/
|
|
35
|
-
user: Effect.Effect<string>;
|
|
39
|
+
user: Effect.Effect<string, never, RuntimeContext>;
|
|
36
40
|
/**
|
|
37
41
|
* Randomly generated password valid only within the current Worker
|
|
38
42
|
* invocation.
|
|
39
43
|
*/
|
|
40
|
-
password: Effect.Effect<Redacted.Redacted<string
|
|
44
|
+
password: Effect.Effect<Redacted.Redacted<string>, never, RuntimeContext>;
|
|
41
45
|
/**
|
|
42
46
|
* Database name.
|
|
43
47
|
*/
|
|
44
|
-
database: Effect.Effect<string>;
|
|
48
|
+
database: Effect.Effect<string, never, RuntimeContext>;
|
|
45
49
|
}
|
|
46
50
|
|
|
47
51
|
/**
|
|
@@ -67,13 +71,13 @@ export const HyperdriveBindingLive = Layer.effect(
|
|
|
67
71
|
HyperdriveBinding,
|
|
68
72
|
Effect.gen(function* () {
|
|
69
73
|
const Policy = yield* HyperdriveBindingPolicy;
|
|
74
|
+
const env = yield* WorkerEnvironment;
|
|
70
75
|
|
|
71
76
|
return Effect.fn(function* (hyperdrive: Hyperdrive) {
|
|
72
77
|
yield* Policy(hyperdrive);
|
|
73
|
-
const hd =
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
Effect.cached,
|
|
78
|
+
const hd = Effect.sync(
|
|
79
|
+
() =>
|
|
80
|
+
(env as Record<string, runtime.Hyperdrive>)[hyperdrive.LogicalId]!,
|
|
77
81
|
);
|
|
78
82
|
|
|
79
83
|
return {
|
|
@@ -5,6 +5,7 @@ import * as Layer from "effect/Layer";
|
|
|
5
5
|
import * as Stream from "effect/Stream";
|
|
6
6
|
import * as Binding from "../../Binding.ts";
|
|
7
7
|
import type { ResourceLike } from "../../Resource.ts";
|
|
8
|
+
import type { RuntimeContext } from "../../RuntimeContext.ts";
|
|
8
9
|
import { isWorker, WorkerEnvironment } from "../Workers/Worker.ts";
|
|
9
10
|
import { type Images as ImagesLike } from "./Images.ts";
|
|
10
11
|
|
|
@@ -55,7 +56,7 @@ export interface ImageTransformerClient {
|
|
|
55
56
|
*/
|
|
56
57
|
export interface ImagesClient {
|
|
57
58
|
/** Effect resolving to the raw Cloudflare runtime binding. */
|
|
58
|
-
raw: Effect.Effect<cf.ImagesBinding, never,
|
|
59
|
+
raw: Effect.Effect<cf.ImagesBinding, never, RuntimeContext>;
|
|
59
60
|
/**
|
|
60
61
|
* Read image format and dimensions from a stream of bytes.
|
|
61
62
|
* Fails with {@link ImagesError} (code 9412) if the input is not
|
|
@@ -64,7 +65,7 @@ export interface ImagesClient {
|
|
|
64
65
|
info<E = never, R = never>(
|
|
65
66
|
stream: Stream.Stream<Uint8Array, E, R>,
|
|
66
67
|
options?: cf.ImageInputOptions,
|
|
67
|
-
): Effect.Effect<cf.ImageInfoResponse, ImagesError,
|
|
68
|
+
): Effect.Effect<cf.ImageInfoResponse, ImagesError, RuntimeContext | R>;
|
|
68
69
|
/**
|
|
69
70
|
* Begin a transformation pipeline. Subsequent `.transform()` /
|
|
70
71
|
* `.draw()` calls are pure; `.output(opts)` runs the pipeline.
|
|
@@ -72,7 +73,7 @@ export interface ImagesClient {
|
|
|
72
73
|
input<E = never, R = never>(
|
|
73
74
|
stream: Stream.Stream<Uint8Array, E, R>,
|
|
74
75
|
options?: cf.ImageInputOptions,
|
|
75
|
-
): Effect.Effect<ImageTransformerClient, never,
|
|
76
|
+
): Effect.Effect<ImageTransformerClient, never, RuntimeContext | R>;
|
|
76
77
|
}
|
|
77
78
|
|
|
78
79
|
export class ImagesBinding extends Binding.Service<
|
|
@@ -84,14 +85,13 @@ export const ImagesBindingLive = Layer.effect(
|
|
|
84
85
|
ImagesBinding,
|
|
85
86
|
Effect.gen(function* () {
|
|
86
87
|
const Policy = yield* ImagesBindingPolicy;
|
|
88
|
+
const env = yield* WorkerEnvironment;
|
|
87
89
|
|
|
88
90
|
return Effect.fn(function* (images: ImagesLike) {
|
|
89
91
|
yield* Policy(images);
|
|
90
|
-
const
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
(env) => (env as Record<string, cf.ImagesBinding>)[images.name]!,
|
|
94
|
-
),
|
|
92
|
+
const raw = Effect.sync(
|
|
93
|
+
// this must be lazy because the WorkerEnvironment is not available yet
|
|
94
|
+
() => (env as Record<string, cf.ImagesBinding>)[images.name]!,
|
|
95
95
|
);
|
|
96
96
|
|
|
97
97
|
return {
|