alchemy 2.0.0-beta.42 → 2.0.0-beta.44
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/cli.js +18 -5
- package/bin/exec.js +317 -242
- 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/Auth/Lock.js +2 -2
- package/lib/Auth/Lock.js.map +1 -1
- package/lib/Binding.d.ts +1 -1
- package/lib/Binding.d.ts.map +1 -1
- package/lib/Bundle/Bundle.d.ts +11 -0
- package/lib/Bundle/Bundle.d.ts.map +1 -1
- package/lib/Bundle/Bundle.js +19 -12
- package/lib/Bundle/Bundle.js.map +1 -1
- package/lib/Bundle/BundleAnalyzerPlugin.d.ts +25 -0
- package/lib/Bundle/BundleAnalyzerPlugin.d.ts.map +1 -0
- package/lib/Bundle/BundleAnalyzerPlugin.js +16 -0
- package/lib/Bundle/BundleAnalyzerPlugin.js.map +1 -0
- 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/Bundle/RawPlugin.d.ts +36 -0
- package/lib/Bundle/RawPlugin.d.ts.map +1 -0
- package/lib/Bundle/RawPlugin.js +80 -0
- package/lib/Bundle/RawPlugin.js.map +1 -0
- package/lib/Bundle/index.d.ts +2 -0
- package/lib/Bundle/index.d.ts.map +1 -1
- package/lib/Bundle/index.js +2 -0
- package/lib/Bundle/index.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/Cli/commands/dev.d.ts +3 -2
- package/lib/Cli/commands/dev.d.ts.map +1 -1
- package/lib/Cli/commands/dev.js +9 -1
- package/lib/Cli/commands/dev.js.map +1 -1
- package/lib/Cli/exec.d.ts.map +1 -1
- package/lib/Cli/exec.js +2 -1
- package/lib/Cli/exec.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/Local.d.ts +2 -0
- package/lib/Cloudflare/Local.d.ts.map +1 -0
- package/lib/Cloudflare/Local.js +9 -0
- package/lib/Cloudflare/Local.js.map +1 -0
- package/lib/Cloudflare/Providers.d.ts.map +1 -1
- package/lib/Cloudflare/Providers.js +3 -1
- package/lib/Cloudflare/Providers.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/DurableObjectBridge.d.ts.map +1 -1
- package/lib/Cloudflare/Workers/DurableObjectBridge.js +0 -1
- package/lib/Cloudflare/Workers/DurableObjectBridge.js.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/LocalWorkerProvider.d.ts +22 -3
- package/lib/Cloudflare/Workers/LocalWorkerProvider.d.ts.map +1 -1
- package/lib/Cloudflare/Workers/LocalWorkerProvider.js +413 -21
- package/lib/Cloudflare/Workers/LocalWorkerProvider.js.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 +9 -22
- package/lib/Cloudflare/Workers/Worker.d.ts.map +1 -1
- package/lib/Cloudflare/Workers/Worker.js +3 -4
- package/lib/Cloudflare/Workers/Worker.js.map +1 -1
- package/lib/Cloudflare/Workers/WorkerBridge.d.ts.map +1 -1
- package/lib/Cloudflare/Workers/WorkerBridge.js +3 -5
- package/lib/Cloudflare/Workers/WorkerBridge.js.map +1 -1
- package/lib/Cloudflare/Workers/WorkerBundle.d.ts +1 -2
- package/lib/Cloudflare/Workers/WorkerBundle.d.ts.map +1 -1
- package/lib/Cloudflare/Workers/WorkerBundle.js +3 -6
- package/lib/Cloudflare/Workers/WorkerBundle.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/Cloudflare/Zaraz/ZarazConfig.d.ts +184 -0
- package/lib/Cloudflare/Zaraz/ZarazConfig.d.ts.map +1 -0
- package/lib/Cloudflare/Zaraz/ZarazConfig.js +216 -0
- package/lib/Cloudflare/Zaraz/ZarazConfig.js.map +1 -0
- package/lib/Cloudflare/Zaraz/ZarazEventTypes.d.ts +188 -0
- package/lib/Cloudflare/Zaraz/ZarazEventTypes.d.ts.map +1 -0
- package/lib/Cloudflare/Zaraz/ZarazEventTypes.js +4 -0
- package/lib/Cloudflare/Zaraz/ZarazEventTypes.js.map +1 -0
- package/lib/Cloudflare/Zaraz/index.d.ts +3 -0
- package/lib/Cloudflare/Zaraz/index.d.ts.map +1 -0
- package/lib/Cloudflare/Zaraz/index.js +2 -0
- package/lib/Cloudflare/Zaraz/index.js.map +1 -0
- package/lib/Cloudflare/index.d.ts +1 -0
- package/lib/Cloudflare/index.d.ts.map +1 -1
- package/lib/Cloudflare/index.js +1 -0
- package/lib/Cloudflare/index.js.map +1 -1
- package/lib/Local/RpcProvider.d.ts +54 -0
- package/lib/Local/RpcProvider.d.ts.map +1 -0
- package/lib/Local/RpcProvider.js +57 -0
- package/lib/Local/RpcProvider.js.map +1 -0
- package/lib/Local/RpcProviderProxy.d.ts +19 -0
- package/lib/Local/RpcProviderProxy.d.ts.map +1 -0
- package/lib/Local/RpcProviderProxy.js +48 -0
- package/lib/Local/RpcProviderProxy.js.map +1 -0
- package/lib/Local/RpcSerialization.d.ts +34 -0
- package/lib/Local/RpcSerialization.d.ts.map +1 -0
- package/lib/Local/RpcSerialization.js +120 -0
- package/lib/Local/RpcSerialization.js.map +1 -0
- package/lib/Local/RpcServer.d.ts +63 -0
- package/lib/Local/RpcServer.d.ts.map +1 -0
- package/lib/Local/RpcServer.js +72 -0
- package/lib/Local/RpcServer.js.map +1 -0
- package/lib/Local/RpcServerBun.d.ts +3 -0
- package/lib/Local/RpcServerBun.d.ts.map +1 -0
- package/lib/Local/RpcServerBun.js +47 -0
- package/lib/Local/RpcServerBun.js.map +1 -0
- package/lib/Local/RpcServerEnvironment.d.ts +20 -0
- package/lib/Local/RpcServerEnvironment.d.ts.map +1 -0
- package/lib/Local/RpcServerEnvironment.js +22 -0
- package/lib/Local/RpcServerEnvironment.js.map +1 -0
- package/lib/Local/RpcServerNode.d.ts +3 -0
- package/lib/Local/RpcServerNode.d.ts.map +1 -0
- package/lib/Local/RpcServerNode.js +43 -0
- package/lib/Local/RpcServerNode.js.map +1 -0
- package/lib/Local/RpcServerSession.d.ts +27 -0
- package/lib/Local/RpcServerSession.d.ts.map +1 -0
- package/lib/Local/RpcServerSession.js +68 -0
- package/lib/Local/RpcServerSession.js.map +1 -0
- package/lib/Local/RpcSpawner.d.ts +21 -0
- package/lib/Local/RpcSpawner.d.ts.map +1 -0
- package/lib/Local/RpcSpawner.js +132 -0
- package/lib/Local/RpcSpawner.js.map +1 -0
- 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/Util/PlatformServices.d.ts +7 -0
- package/lib/Util/PlatformServices.d.ts.map +1 -1
- package/lib/Util/PlatformServices.js +22 -11
- package/lib/Util/PlatformServices.js.map +1 -1
- package/lib/Util/camel.d.ts.map +1 -1
- package/lib/Util/camel.js +2 -3
- package/lib/Util/camel.js.map +1 -1
- package/lib/Util/data.d.ts +5 -0
- package/lib/Util/data.d.ts.map +1 -1
- package/lib/Util/data.js +29 -0
- package/lib/Util/data.js.map +1 -1
- package/lib/Util/stable.d.ts.map +1 -1
- package/lib/Util/stable.js +3 -6
- package/lib/Util/stable.js.map +1 -1
- package/lib/tsconfig.test.tsbuildinfo +1 -1
- package/package.json +25 -13
- package/src/Auth/Lock.ts +2 -2
- package/src/Binding.ts +1 -1
- package/src/Bundle/Bundle.ts +35 -13
- package/src/Bundle/BundleAnalyzerPlugin.ts +33 -0
- package/src/Bundle/Docker.ts +12 -15
- package/src/Bundle/RawPlugin.ts +82 -0
- package/src/Bundle/index.ts +2 -0
- package/src/Cli/commands/deploy.ts +1 -0
- package/src/Cli/commands/dev.ts +51 -37
- package/src/Cli/exec.ts +12 -7
- 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/Local.ts +23 -0
- package/src/Cloudflare/Providers.ts +3 -0
- 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/DurableObjectBridge.ts +0 -1
- package/src/Cloudflare/Workers/DurableObjectNamespace.ts +6 -6
- package/src/Cloudflare/Workers/DynamicWorkerLoader.ts +4 -5
- package/src/Cloudflare/Workers/LocalWorkerProvider.ts +547 -21
- package/src/Cloudflare/Workers/RpcAsync.ts +55 -0
- package/src/Cloudflare/Workers/Worker.ts +18 -25
- package/src/Cloudflare/Workers/WorkerBridge.ts +3 -5
- package/src/Cloudflare/Workers/WorkerBundle.ts +4 -8
- package/src/Cloudflare/Workers/WorkerRuntimeContext.ts +2 -0
- package/src/Cloudflare/Workers/Workflow.ts +10 -11
- package/src/Cloudflare/Zaraz/ZarazConfig.ts +403 -0
- package/src/Cloudflare/Zaraz/ZarazEventTypes.ts +257 -0
- package/src/Cloudflare/Zaraz/index.ts +25 -0
- package/src/Cloudflare/index.ts +1 -0
- package/src/Local/RpcProvider.ts +102 -0
- package/src/Local/RpcProviderProxy.ts +86 -0
- package/src/Local/RpcSerialization.ts +225 -0
- package/src/Local/RpcServer.ts +138 -0
- package/src/Local/RpcServerBun.ts +59 -0
- package/src/Local/RpcServerEnvironment.ts +55 -0
- package/src/Local/RpcServerNode.ts +58 -0
- package/src/Local/RpcServerSession.ts +87 -0
- package/src/Local/RpcSpawner.ts +196 -0
- 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/src/Util/PlatformServices.ts +41 -27
- package/src/Util/camel.ts +3 -5
- package/src/Util/data.ts +38 -0
- package/src/Util/stable.ts +4 -10
- 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/Cloudflare/Local/Sidecar.d.ts +0 -63
- package/lib/Cloudflare/Local/Sidecar.d.ts.map +0 -1
- package/lib/Cloudflare/Local/Sidecar.js +0 -50
- package/lib/Cloudflare/Local/Sidecar.js.map +0 -1
- package/lib/Cloudflare/Local/SidecarHandlers.d.ts +0 -8
- package/lib/Cloudflare/Local/SidecarHandlers.d.ts.map +0 -1
- package/lib/Cloudflare/Local/SidecarHandlers.js +0 -381
- package/lib/Cloudflare/Local/SidecarHandlers.js.map +0 -1
- package/lib/Cloudflare/Local/SidecarServer.d.ts +0 -2
- package/lib/Cloudflare/Local/SidecarServer.d.ts.map +0 -1
- package/lib/Cloudflare/Local/SidecarServer.js +0 -34
- package/lib/Cloudflare/Local/SidecarServer.js.map +0 -1
- package/lib/Neon/SqlFile.d.ts.map +0 -1
- package/lib/Neon/SqlFile.js.map +0 -1
- package/lib/Sidecar/Lock.d.ts +0 -23
- package/lib/Sidecar/Lock.d.ts.map +0 -1
- package/lib/Sidecar/Lock.js +0 -39
- package/lib/Sidecar/Lock.js.map +0 -1
- package/lib/Sidecar/RpcClient.d.ts +0 -15
- package/lib/Sidecar/RpcClient.d.ts.map +0 -1
- package/lib/Sidecar/RpcClient.js +0 -78
- package/lib/Sidecar/RpcClient.js.map +0 -1
- package/lib/Sidecar/RpcHandler.d.ts +0 -51
- package/lib/Sidecar/RpcHandler.d.ts.map +0 -1
- package/lib/Sidecar/RpcHandler.js +0 -87
- package/lib/Sidecar/RpcHandler.js.map +0 -1
- package/lib/Sidecar/RpcPaths.d.ts +0 -19
- package/lib/Sidecar/RpcPaths.d.ts.map +0 -1
- package/lib/Sidecar/RpcPaths.js +0 -31
- package/lib/Sidecar/RpcPaths.js.map +0 -1
- package/lib/Sidecar/RpcServer.d.ts +0 -30
- package/lib/Sidecar/RpcServer.d.ts.map +0 -1
- package/lib/Sidecar/RpcServer.js +0 -105
- package/lib/Sidecar/RpcServer.js.map +0 -1
- package/lib/Sidecar/RpcServerBun.d.ts +0 -4
- package/lib/Sidecar/RpcServerBun.d.ts.map +0 -1
- package/lib/Sidecar/RpcServerBun.js +0 -28
- package/lib/Sidecar/RpcServerBun.js.map +0 -1
- package/lib/Sidecar/RpcServerNode.d.ts +0 -4
- package/lib/Sidecar/RpcServerNode.d.ts.map +0 -1
- package/lib/Sidecar/RpcServerNode.js +0 -39
- package/lib/Sidecar/RpcServerNode.js.map +0 -1
- package/lib/Sidecar/RpcServices.d.ts +0 -6
- package/lib/Sidecar/RpcServices.d.ts.map +0 -1
- package/lib/Sidecar/RpcServices.js +0 -29
- package/lib/Sidecar/RpcServices.js.map +0 -1
- package/src/Cloudflare/D1/D1SqlFile.ts +0 -55
- package/src/Cloudflare/Local/Sidecar.ts +0 -81
- package/src/Cloudflare/Local/SidecarHandlers.ts +0 -491
- package/src/Cloudflare/Local/SidecarServer.ts +0 -70
- package/src/Sidecar/Lock.ts +0 -66
- package/src/Sidecar/RpcClient.ts +0 -142
- package/src/Sidecar/RpcHandler.ts +0 -205
- package/src/Sidecar/RpcPaths.ts +0 -39
- package/src/Sidecar/RpcServer.ts +0 -153
- package/src/Sidecar/RpcServerBun.ts +0 -41
- package/src/Sidecar/RpcServerNode.ts +0 -51
- package/src/Sidecar/RpcServices.ts +0 -48
|
@@ -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 {
|
|
@@ -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 { KVNamespace } from "./KVNamespace.ts";
|
|
9
10
|
|
|
@@ -17,46 +18,46 @@ export interface KVNamespaceClient<Key extends string = string> {
|
|
|
17
18
|
get(
|
|
18
19
|
key: Key,
|
|
19
20
|
options?: Partial<KVNamespaceGetOptions<undefined>>,
|
|
20
|
-
): Effect.Effect<string | null, KVNamespaceError,
|
|
21
|
+
): Effect.Effect<string | null, KVNamespaceError, RuntimeContext>;
|
|
21
22
|
get(
|
|
22
23
|
key: Key,
|
|
23
24
|
type: "text",
|
|
24
|
-
): Effect.Effect<string | null, KVNamespaceError,
|
|
25
|
+
): Effect.Effect<string | null, KVNamespaceError, RuntimeContext>;
|
|
25
26
|
get<ExpectedValue = unknown>(
|
|
26
27
|
key: Key,
|
|
27
28
|
type: "json",
|
|
28
|
-
): Effect.Effect<ExpectedValue | null, KVNamespaceError,
|
|
29
|
+
): Effect.Effect<ExpectedValue | null, KVNamespaceError, RuntimeContext>;
|
|
29
30
|
get(
|
|
30
31
|
key: Key,
|
|
31
32
|
type: "arrayBuffer",
|
|
32
|
-
): Effect.Effect<ArrayBuffer | null, KVNamespaceError,
|
|
33
|
+
): Effect.Effect<ArrayBuffer | null, KVNamespaceError, RuntimeContext>;
|
|
33
34
|
get(
|
|
34
35
|
key: Key,
|
|
35
36
|
type: "stream",
|
|
36
|
-
): Effect.Effect<ReadableStream | null, KVNamespaceError,
|
|
37
|
+
): Effect.Effect<ReadableStream | null, KVNamespaceError, RuntimeContext>;
|
|
37
38
|
get(
|
|
38
39
|
key: Key,
|
|
39
40
|
options?: KVNamespaceGetOptions<"text">,
|
|
40
|
-
): Effect.Effect<string | null, KVNamespaceError,
|
|
41
|
+
): Effect.Effect<string | null, KVNamespaceError, RuntimeContext>;
|
|
41
42
|
get<ExpectedValue = unknown>(
|
|
42
43
|
key: Key,
|
|
43
44
|
options?: KVNamespaceGetOptions<"json">,
|
|
44
|
-
): Effect.Effect<ExpectedValue | null, KVNamespaceError,
|
|
45
|
+
): Effect.Effect<ExpectedValue | null, KVNamespaceError, RuntimeContext>;
|
|
45
46
|
get(
|
|
46
47
|
key: Key,
|
|
47
48
|
options?: KVNamespaceGetOptions<"arrayBuffer">,
|
|
48
|
-
): Effect.Effect<ArrayBuffer | null, KVNamespaceError,
|
|
49
|
+
): Effect.Effect<ArrayBuffer | null, KVNamespaceError, RuntimeContext>;
|
|
49
50
|
get(
|
|
50
51
|
key: Key,
|
|
51
52
|
options?: KVNamespaceGetOptions<"stream">,
|
|
52
|
-
): Effect.Effect<ReadableStream | null, KVNamespaceError,
|
|
53
|
+
): Effect.Effect<ReadableStream | null, KVNamespaceError, RuntimeContext>;
|
|
53
54
|
get(
|
|
54
55
|
key: Array<Key>,
|
|
55
56
|
type: "text",
|
|
56
57
|
): Effect.Effect<
|
|
57
58
|
Map<string, string | null>,
|
|
58
59
|
KVNamespaceError,
|
|
59
|
-
|
|
60
|
+
RuntimeContext
|
|
60
61
|
>;
|
|
61
62
|
get<ExpectedValue = unknown>(
|
|
62
63
|
key: Array<Key>,
|
|
@@ -64,7 +65,7 @@ export interface KVNamespaceClient<Key extends string = string> {
|
|
|
64
65
|
): Effect.Effect<
|
|
65
66
|
Map<string, ExpectedValue | null>,
|
|
66
67
|
KVNamespaceError,
|
|
67
|
-
|
|
68
|
+
RuntimeContext
|
|
68
69
|
>;
|
|
69
70
|
get(
|
|
70
71
|
key: Array<Key>,
|
|
@@ -72,7 +73,7 @@ export interface KVNamespaceClient<Key extends string = string> {
|
|
|
72
73
|
): Effect.Effect<
|
|
73
74
|
Map<string, string | null>,
|
|
74
75
|
KVNamespaceError,
|
|
75
|
-
|
|
76
|
+
RuntimeContext
|
|
76
77
|
>;
|
|
77
78
|
get(
|
|
78
79
|
key: Array<Key>,
|
|
@@ -80,7 +81,7 @@ export interface KVNamespaceClient<Key extends string = string> {
|
|
|
80
81
|
): Effect.Effect<
|
|
81
82
|
Map<string, string | null>,
|
|
82
83
|
KVNamespaceError,
|
|
83
|
-
|
|
84
|
+
RuntimeContext
|
|
84
85
|
>;
|
|
85
86
|
get<ExpectedValue = unknown>(
|
|
86
87
|
key: Array<Key>,
|
|
@@ -88,27 +89,27 @@ export interface KVNamespaceClient<Key extends string = string> {
|
|
|
88
89
|
): Effect.Effect<
|
|
89
90
|
Map<string, ExpectedValue | null>,
|
|
90
91
|
KVNamespaceError,
|
|
91
|
-
|
|
92
|
+
RuntimeContext
|
|
92
93
|
>;
|
|
93
94
|
list<Metadata = unknown>(
|
|
94
95
|
options?: KVNamespaceListOptions,
|
|
95
96
|
): Effect.Effect<
|
|
96
97
|
KVNamespaceListResult<Metadata, Key>,
|
|
97
98
|
KVNamespaceError,
|
|
98
|
-
|
|
99
|
+
RuntimeContext
|
|
99
100
|
>;
|
|
100
101
|
put(
|
|
101
102
|
key: Key,
|
|
102
103
|
value: string | ArrayBuffer | ArrayBufferView | ReadableStream,
|
|
103
104
|
options?: KVNamespacePutOptions,
|
|
104
|
-
): Effect.Effect<void, KVNamespaceError,
|
|
105
|
+
): Effect.Effect<void, KVNamespaceError, RuntimeContext>;
|
|
105
106
|
getWithMetadata<Metadata = unknown>(
|
|
106
107
|
key: Key,
|
|
107
108
|
options?: Partial<KVNamespaceGetOptions<undefined>>,
|
|
108
109
|
): Effect.Effect<
|
|
109
110
|
KVNamespaceGetWithMetadataResult<string, Metadata>,
|
|
110
111
|
KVNamespaceError,
|
|
111
|
-
|
|
112
|
+
RuntimeContext
|
|
112
113
|
>;
|
|
113
114
|
getWithMetadata<Metadata = unknown>(
|
|
114
115
|
key: Key,
|
|
@@ -116,7 +117,7 @@ export interface KVNamespaceClient<Key extends string = string> {
|
|
|
116
117
|
): Effect.Effect<
|
|
117
118
|
KVNamespaceGetWithMetadataResult<string, Metadata>,
|
|
118
119
|
KVNamespaceError,
|
|
119
|
-
|
|
120
|
+
RuntimeContext
|
|
120
121
|
>;
|
|
121
122
|
getWithMetadata<ExpectedValue = unknown, Metadata = unknown>(
|
|
122
123
|
key: Key,
|
|
@@ -124,7 +125,7 @@ export interface KVNamespaceClient<Key extends string = string> {
|
|
|
124
125
|
): Effect.Effect<
|
|
125
126
|
KVNamespaceGetWithMetadataResult<ExpectedValue, Metadata>,
|
|
126
127
|
KVNamespaceError,
|
|
127
|
-
|
|
128
|
+
RuntimeContext
|
|
128
129
|
>;
|
|
129
130
|
getWithMetadata<Metadata = unknown>(
|
|
130
131
|
key: Key,
|
|
@@ -132,7 +133,7 @@ export interface KVNamespaceClient<Key extends string = string> {
|
|
|
132
133
|
): Effect.Effect<
|
|
133
134
|
KVNamespaceGetWithMetadataResult<ArrayBuffer, Metadata>,
|
|
134
135
|
KVNamespaceError,
|
|
135
|
-
|
|
136
|
+
RuntimeContext
|
|
136
137
|
>;
|
|
137
138
|
getWithMetadata<Metadata = unknown>(
|
|
138
139
|
key: Key,
|
|
@@ -140,7 +141,7 @@ export interface KVNamespaceClient<Key extends string = string> {
|
|
|
140
141
|
): Effect.Effect<
|
|
141
142
|
KVNamespaceGetWithMetadataResult<ReadableStream, Metadata>,
|
|
142
143
|
KVNamespaceError,
|
|
143
|
-
|
|
144
|
+
RuntimeContext
|
|
144
145
|
>;
|
|
145
146
|
getWithMetadata<Metadata = unknown>(
|
|
146
147
|
key: Key,
|
|
@@ -148,7 +149,7 @@ export interface KVNamespaceClient<Key extends string = string> {
|
|
|
148
149
|
): Effect.Effect<
|
|
149
150
|
KVNamespaceGetWithMetadataResult<string, Metadata>,
|
|
150
151
|
KVNamespaceError,
|
|
151
|
-
|
|
152
|
+
RuntimeContext
|
|
152
153
|
>;
|
|
153
154
|
getWithMetadata<ExpectedValue = unknown, Metadata = unknown>(
|
|
154
155
|
key: Key,
|
|
@@ -156,7 +157,7 @@ export interface KVNamespaceClient<Key extends string = string> {
|
|
|
156
157
|
): Effect.Effect<
|
|
157
158
|
KVNamespaceGetWithMetadataResult<ExpectedValue, Metadata>,
|
|
158
159
|
KVNamespaceError,
|
|
159
|
-
|
|
160
|
+
RuntimeContext
|
|
160
161
|
>;
|
|
161
162
|
getWithMetadata<Metadata = unknown>(
|
|
162
163
|
key: Key,
|
|
@@ -164,7 +165,7 @@ export interface KVNamespaceClient<Key extends string = string> {
|
|
|
164
165
|
): Effect.Effect<
|
|
165
166
|
KVNamespaceGetWithMetadataResult<ArrayBuffer, Metadata>,
|
|
166
167
|
KVNamespaceError,
|
|
167
|
-
|
|
168
|
+
RuntimeContext
|
|
168
169
|
>;
|
|
169
170
|
getWithMetadata<Metadata = unknown>(
|
|
170
171
|
key: Key,
|
|
@@ -172,7 +173,7 @@ export interface KVNamespaceClient<Key extends string = string> {
|
|
|
172
173
|
): Effect.Effect<
|
|
173
174
|
KVNamespaceGetWithMetadataResult<ReadableStream, Metadata>,
|
|
174
175
|
KVNamespaceError,
|
|
175
|
-
|
|
176
|
+
RuntimeContext
|
|
176
177
|
>;
|
|
177
178
|
getWithMetadata<Metadata = unknown>(
|
|
178
179
|
key: Array<Key>,
|
|
@@ -180,7 +181,7 @@ export interface KVNamespaceClient<Key extends string = string> {
|
|
|
180
181
|
): Effect.Effect<
|
|
181
182
|
Map<string, KVNamespaceGetWithMetadataResult<string, Metadata>>,
|
|
182
183
|
KVNamespaceError,
|
|
183
|
-
|
|
184
|
+
RuntimeContext
|
|
184
185
|
>;
|
|
185
186
|
getWithMetadata<ExpectedValue = unknown, Metadata = unknown>(
|
|
186
187
|
key: Array<Key>,
|
|
@@ -188,7 +189,7 @@ export interface KVNamespaceClient<Key extends string = string> {
|
|
|
188
189
|
): Effect.Effect<
|
|
189
190
|
Map<string, KVNamespaceGetWithMetadataResult<ExpectedValue, Metadata>>,
|
|
190
191
|
KVNamespaceError,
|
|
191
|
-
|
|
192
|
+
RuntimeContext
|
|
192
193
|
>;
|
|
193
194
|
getWithMetadata<Metadata = unknown>(
|
|
194
195
|
key: Array<Key>,
|
|
@@ -196,7 +197,7 @@ export interface KVNamespaceClient<Key extends string = string> {
|
|
|
196
197
|
): Effect.Effect<
|
|
197
198
|
Map<string, KVNamespaceGetWithMetadataResult<string, Metadata>>,
|
|
198
199
|
KVNamespaceError,
|
|
199
|
-
|
|
200
|
+
RuntimeContext
|
|
200
201
|
>;
|
|
201
202
|
getWithMetadata<Metadata = unknown>(
|
|
202
203
|
key: Array<Key>,
|
|
@@ -204,7 +205,7 @@ export interface KVNamespaceClient<Key extends string = string> {
|
|
|
204
205
|
): Effect.Effect<
|
|
205
206
|
Map<string, KVNamespaceGetWithMetadataResult<string, Metadata>>,
|
|
206
207
|
KVNamespaceError,
|
|
207
|
-
|
|
208
|
+
RuntimeContext
|
|
208
209
|
>;
|
|
209
210
|
getWithMetadata<ExpectedValue = unknown, Metadata = unknown>(
|
|
210
211
|
key: Array<Key>,
|
|
@@ -212,9 +213,9 @@ export interface KVNamespaceClient<Key extends string = string> {
|
|
|
212
213
|
): Effect.Effect<
|
|
213
214
|
Map<string, KVNamespaceGetWithMetadataResult<ExpectedValue, Metadata>>,
|
|
214
215
|
KVNamespaceError,
|
|
215
|
-
|
|
216
|
+
RuntimeContext
|
|
216
217
|
>;
|
|
217
|
-
delete(key: Key): Effect.Effect<void, KVNamespaceError,
|
|
218
|
+
delete(key: Key): Effect.Effect<void, KVNamespaceError, RuntimeContext>;
|
|
218
219
|
}
|
|
219
220
|
|
|
220
221
|
export class KVNamespaceBinding extends Binding.Service<
|
|
@@ -226,15 +227,13 @@ export const KVNamespaceBindingLive = Layer.effect(
|
|
|
226
227
|
KVNamespaceBinding,
|
|
227
228
|
Effect.gen(function* () {
|
|
228
229
|
const bind = yield* KVNamespaceBindingPolicy;
|
|
230
|
+
const env = yield* WorkerEnvironment;
|
|
229
231
|
|
|
230
232
|
return Effect.fn(function* (bucket: KVNamespace) {
|
|
231
233
|
yield* bind(bucket);
|
|
232
|
-
const
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
(env) =>
|
|
236
|
-
(env as Record<string, runtime.KVNamespace>)[bucket.LogicalId],
|
|
237
|
-
),
|
|
234
|
+
const raw = Effect.sync(
|
|
235
|
+
// this must be lazy because the WorkerEnvironment is not available yet
|
|
236
|
+
() => (env as Record<string, runtime.KVNamespace>)[bucket.LogicalId],
|
|
238
237
|
);
|
|
239
238
|
const tryPromise = <T>(
|
|
240
239
|
fn: () => Promise<T>,
|
|
@@ -250,9 +249,10 @@ export const KVNamespaceBindingLive = Layer.effect(
|
|
|
250
249
|
|
|
251
250
|
const use = <T>(
|
|
252
251
|
fn: (raw: runtime.KVNamespace<string>) => Promise<T>,
|
|
253
|
-
): Effect.Effect<T, KVNamespaceError
|
|
252
|
+
): Effect.Effect<T, KVNamespaceError> =>
|
|
254
253
|
raw.pipe(Effect.flatMap((raw) => tryPromise(() => fn(raw))));
|
|
255
254
|
|
|
255
|
+
// @ts-expect-error
|
|
256
256
|
return {
|
|
257
257
|
raw: raw,
|
|
258
258
|
// @ts-expect-error
|