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
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.44",
|
|
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",
|
|
@@ -276,17 +288,18 @@
|
|
|
276
288
|
"access": "public"
|
|
277
289
|
},
|
|
278
290
|
"dependencies": {
|
|
279
|
-
"@alchemy.run/node-utils": "0.0.
|
|
291
|
+
"@alchemy.run/node-utils": "0.0.4",
|
|
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.
|
|
285
|
-
"@distilled.cloud/cloudflare-rolldown-plugin": "0.
|
|
286
|
-
"@distilled.cloud/cloudflare-runtime": "0.
|
|
287
|
-
"@distilled.cloud/cloudflare-vite-plugin": "0.
|
|
288
|
-
"@distilled.cloud/core": "^0.21.
|
|
289
|
-
"@distilled.cloud/neon": "^0.21.
|
|
294
|
+
"@distilled.cloud/aws": "^0.21.5",
|
|
295
|
+
"@distilled.cloud/axiom": "^0.21.5",
|
|
296
|
+
"@distilled.cloud/cloudflare": "^0.21.5",
|
|
297
|
+
"@distilled.cloud/cloudflare-rolldown-plugin": "0.6.3",
|
|
298
|
+
"@distilled.cloud/cloudflare-runtime": "0.6.3",
|
|
299
|
+
"@distilled.cloud/cloudflare-vite-plugin": "0.6.3",
|
|
300
|
+
"@distilled.cloud/core": "^0.21.5",
|
|
301
|
+
"@distilled.cloud/neon": "^0.21.5",
|
|
302
|
+
"@distilled.cloud/planetscale": "^0.21.5",
|
|
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",
|
|
@@ -298,17 +311,16 @@
|
|
|
298
311
|
"capnweb": "^0.6.1",
|
|
299
312
|
"fast-glob": "^3.3.2",
|
|
300
313
|
"fast-xml-parser": "^5.3.4",
|
|
301
|
-
"foreground-child": "^4.0.3",
|
|
302
314
|
"ink": "^6.3.1",
|
|
303
315
|
"jszip": "^3.10.1",
|
|
304
316
|
"libsodium-wrappers": "^0.8.3",
|
|
305
317
|
"magic-string": "^0.30.21",
|
|
318
|
+
"mysql2": "^3.15.3",
|
|
306
319
|
"pathe": "^2.0.3",
|
|
307
320
|
"pg": "^8.13.0",
|
|
308
321
|
"picomatch": "^4.0.4",
|
|
309
322
|
"react": "^19.2.0",
|
|
310
|
-
"rolldown": "1.0.
|
|
311
|
-
"sonda": "^0.11.1",
|
|
323
|
+
"rolldown": "1.0.1",
|
|
312
324
|
"undici": "^7.16.0",
|
|
313
325
|
"yaml": "^2.0.0"
|
|
314
326
|
},
|
package/src/Auth/Lock.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { lock } from "@alchemy.run/node-utils/lockfile";
|
|
2
2
|
import * as Effect from "effect/Effect";
|
|
3
3
|
import * as fs from "node:fs/promises";
|
|
4
4
|
import * as path from "pathe";
|
|
@@ -24,7 +24,7 @@ export const withLock = <A, E, R>(
|
|
|
24
24
|
return Effect.acquireUseRelease(
|
|
25
25
|
Effect.promise(async () => {
|
|
26
26
|
await fs.mkdir(lockDir, { recursive: true });
|
|
27
|
-
return await
|
|
27
|
+
return await lock(lockPath, {
|
|
28
28
|
retries: { retries: 600, minTimeout: 50, maxTimeout: 50 },
|
|
29
29
|
stale: 5_000,
|
|
30
30
|
realpath: false,
|
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/Bundle.ts
CHANGED
|
@@ -6,7 +6,12 @@ import * as Stream from "effect/Stream";
|
|
|
6
6
|
import assert from "node:assert";
|
|
7
7
|
import * as rolldown from "rolldown";
|
|
8
8
|
import { sha256, sha256Object } from "../Util/sha256.ts";
|
|
9
|
+
import {
|
|
10
|
+
bundleAnalyzerPlugin,
|
|
11
|
+
type BundleAnalyzerPluginOptions,
|
|
12
|
+
} from "./BundleAnalyzerPlugin.ts";
|
|
9
13
|
import { purePlugin, type PurePluginOptions } from "./PurePlugin.ts";
|
|
14
|
+
import { rawPlugin } from "./RawPlugin.ts";
|
|
10
15
|
|
|
11
16
|
/**
|
|
12
17
|
* Extra options accepted by {@link build} / {@link watch} on top of the
|
|
@@ -24,6 +29,16 @@ export interface BundleExtraOptions {
|
|
|
24
29
|
* - `false`: plugin is disabled.
|
|
25
30
|
*/
|
|
26
31
|
readonly pure?: PurePluginOptions | false;
|
|
32
|
+
/**
|
|
33
|
+
* Configures the {@link bundleAnalyzerPlugin} which emits a bundle analysis
|
|
34
|
+
* report alongside the bundle output, describing chunks, modules, and the
|
|
35
|
+
* import graph reachable from each entry point.
|
|
36
|
+
*
|
|
37
|
+
* - `undefined` / `false` (default): plugin is disabled.
|
|
38
|
+
* - `true`: plugin is enabled with default options.
|
|
39
|
+
* - `BundleAnalyzerPluginOptions`: plugin is enabled with the provided options.
|
|
40
|
+
*/
|
|
41
|
+
readonly bundleAnalyzer?: BundleAnalyzerPluginOptions | boolean;
|
|
27
42
|
}
|
|
28
43
|
|
|
29
44
|
export interface BundleOutput {
|
|
@@ -86,7 +101,7 @@ export const build = (
|
|
|
86
101
|
try: async () => {
|
|
87
102
|
const bundle = await rolldown.rolldown({
|
|
88
103
|
...inputOptions,
|
|
89
|
-
plugins:
|
|
104
|
+
plugins: [inputOptions.plugins, builtInPlugins(extra)],
|
|
90
105
|
optimization: inputOptions.optimization ?? {
|
|
91
106
|
inlineConst: {
|
|
92
107
|
mode: "smart",
|
|
@@ -94,7 +109,7 @@ export const build = (
|
|
|
94
109
|
},
|
|
95
110
|
},
|
|
96
111
|
});
|
|
97
|
-
const result = await bundle.
|
|
112
|
+
const result = await bundle.write(outputOptions);
|
|
98
113
|
await bundle.close();
|
|
99
114
|
return result.output;
|
|
100
115
|
},
|
|
@@ -128,7 +143,8 @@ export const watch = (
|
|
|
128
143
|
const watcher = rolldown.watch({
|
|
129
144
|
...inputOptions,
|
|
130
145
|
plugins: [
|
|
131
|
-
|
|
146
|
+
inputOptions.plugins,
|
|
147
|
+
builtInPlugins(extra),
|
|
132
148
|
// The watcher event listener does not receive the bundle output, so we grab it using a plugin.
|
|
133
149
|
{
|
|
134
150
|
name: "alchemy:watch-bundle",
|
|
@@ -266,19 +282,25 @@ export function bundleOutputFromRolldownOutputBundle(
|
|
|
266
282
|
}
|
|
267
283
|
|
|
268
284
|
/**
|
|
269
|
-
*
|
|
270
|
-
* {@link
|
|
285
|
+
* Returns the built-in plugins appended after the user-provided plugin chain,
|
|
286
|
+
* configured by {@link BundleExtraOptions}.
|
|
271
287
|
*
|
|
272
|
-
*
|
|
273
|
-
*
|
|
274
|
-
*
|
|
288
|
+
* These run LAST so they see module ids that have already been resolved into
|
|
289
|
+
* `node_modules/<pkg>/...` by upstream resolver plugins such as
|
|
290
|
+
* `@distilled.cloud/cloudflare-rolldown-plugin`.
|
|
275
291
|
*/
|
|
276
|
-
function
|
|
277
|
-
|
|
278
|
-
pure: PurePluginOptions | false | undefined,
|
|
292
|
+
function builtInPlugins(
|
|
293
|
+
extra?: BundleExtraOptions,
|
|
279
294
|
): rolldown.RolldownPluginOption {
|
|
280
|
-
|
|
281
|
-
|
|
295
|
+
return [
|
|
296
|
+
extra?.bundleAnalyzer
|
|
297
|
+
? bundleAnalyzerPlugin(
|
|
298
|
+
extra.bundleAnalyzer === true ? {} : extra.bundleAnalyzer,
|
|
299
|
+
)
|
|
300
|
+
: undefined,
|
|
301
|
+
extra?.pure !== false ? purePlugin(extra?.pure ?? {}) : undefined,
|
|
302
|
+
rawPlugin(),
|
|
303
|
+
];
|
|
282
304
|
}
|
|
283
305
|
|
|
284
306
|
function bundleErrorFromUnknown(error: unknown): BundleError {
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import type { Plugin } from "rolldown";
|
|
2
|
+
import { bundleAnalyzerPlugin as rolldownBundleAnalyzerPlugin } from "rolldown/experimental";
|
|
3
|
+
|
|
4
|
+
export interface BundleAnalyzerPluginOptions {
|
|
5
|
+
/**
|
|
6
|
+
* The filename of the bundle analysis data.
|
|
7
|
+
* @default "analyze-data.md"
|
|
8
|
+
*/
|
|
9
|
+
readonly fileName?: string;
|
|
10
|
+
/**
|
|
11
|
+
* The format of the bundle analysis data.
|
|
12
|
+
* @default "md"
|
|
13
|
+
*/
|
|
14
|
+
readonly format?: "json" | "md";
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
/**
|
|
18
|
+
* Wraps rolldown's experimental bundle analyzer plugin, which emits a report
|
|
19
|
+
* describing the composition of the bundle.
|
|
20
|
+
*
|
|
21
|
+
* The report includes:
|
|
22
|
+
* - all chunks and their relationships
|
|
23
|
+
* - the modules bundled into each chunk
|
|
24
|
+
* - import dependencies between chunks
|
|
25
|
+
* - the modules reachable from each entry point
|
|
26
|
+
*/
|
|
27
|
+
export const bundleAnalyzerPlugin = (
|
|
28
|
+
options: BundleAnalyzerPluginOptions = {},
|
|
29
|
+
): Plugin =>
|
|
30
|
+
rolldownBundleAnalyzerPlugin({
|
|
31
|
+
fileName: options.fileName,
|
|
32
|
+
format: options.format ?? "md",
|
|
33
|
+
});
|
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) =>
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
import type * as rolldown from "rolldown";
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Matches `?raw` or `&raw` query suffixes, mirroring Vite's `rawRE`
|
|
5
|
+
* (see `vite/src/node/utils.ts`). Used to gate both `resolveId` and
|
|
6
|
+
* `load` so the plugin only inspects ids that opt in.
|
|
7
|
+
*/
|
|
8
|
+
export const RAW_RE: RegExp = /(\?|&)raw(?:&|$)/;
|
|
9
|
+
|
|
10
|
+
/**
|
|
11
|
+
* Rolldown plugin that adds Vite-style `?raw` import support to the
|
|
12
|
+
* Alchemy bundler.
|
|
13
|
+
*
|
|
14
|
+
* Importing a file with the `?raw` suffix inlines its contents as the
|
|
15
|
+
* default export of a JS module:
|
|
16
|
+
*
|
|
17
|
+
* ```ts
|
|
18
|
+
* import sql from "./schema.sql?raw";
|
|
19
|
+
* // ^ string — the file contents read as UTF-8
|
|
20
|
+
* ```
|
|
21
|
+
*
|
|
22
|
+
* This plugin only implements `?raw`. Vite's `?url` and `?inline`
|
|
23
|
+
* variants both rely on a browser asset pipeline (URL serving / `data:`
|
|
24
|
+
* fallback) that has no analogue in the server-side bundles produced
|
|
25
|
+
* here (Cloudflare Workers, AWS Lambda), so they are intentionally
|
|
26
|
+
* omitted.
|
|
27
|
+
*/
|
|
28
|
+
export const rawPlugin = (): rolldown.Plugin => ({
|
|
29
|
+
name: "alchemy:raw",
|
|
30
|
+
resolveId: {
|
|
31
|
+
filter: { id: RAW_RE },
|
|
32
|
+
async handler(source, importer) {
|
|
33
|
+
const [base, query] = splitFileAndPostfix(source);
|
|
34
|
+
const resolved = await this.resolve(base, importer, { skipSelf: true });
|
|
35
|
+
if (!resolved || resolved.external) return null;
|
|
36
|
+
return { id: resolved.id + query, moduleSideEffects: false };
|
|
37
|
+
},
|
|
38
|
+
},
|
|
39
|
+
load: {
|
|
40
|
+
filter: { id: RAW_RE },
|
|
41
|
+
async handler(id) {
|
|
42
|
+
const file = id.replace(/[?#].*$/, "");
|
|
43
|
+
const contents = await this.fs.readFile(file, { encoding: "utf8" });
|
|
44
|
+
return {
|
|
45
|
+
code: `export default ${JSON.stringify(contents)};`,
|
|
46
|
+
// Empty mappings = "this module has no meaningful source map".
|
|
47
|
+
// The generated code is a synthetic `export default "..."` that
|
|
48
|
+
// doesn't correspond line-for-line to any source file (the
|
|
49
|
+
// underlying file isn't JS), so there's nothing to map. Supplying
|
|
50
|
+
// `{ mappings: "" }` (rather than omitting `map`) opts the module
|
|
51
|
+
// out of source-map generation without making rolldown synthesize
|
|
52
|
+
// a default one from the loaded code.
|
|
53
|
+
map: { mappings: "" },
|
|
54
|
+
// NOTE: matches Vite — avoids a double `export default` if the
|
|
55
|
+
// file extension would otherwise be picked up by another loader
|
|
56
|
+
// (e.g. `?raw&.json`).
|
|
57
|
+
moduleType: "js",
|
|
58
|
+
};
|
|
59
|
+
},
|
|
60
|
+
},
|
|
61
|
+
});
|
|
62
|
+
|
|
63
|
+
/**
|
|
64
|
+
* Splits an id into its file portion and the query/hash postfix (kept
|
|
65
|
+
* with the leading `?` / `#`). Matches Vite's `splitFileAndPostfix`.
|
|
66
|
+
*
|
|
67
|
+
* @example
|
|
68
|
+
* splitFileAndPostfix("./foo.txt?raw") // => ["./foo.txt", "?raw"]
|
|
69
|
+
* splitFileAndPostfix("./foo.txt") // => ["./foo.txt", ""]
|
|
70
|
+
*/
|
|
71
|
+
export function splitFileAndPostfix(id: string): [string, string] {
|
|
72
|
+
const queryIdx = id.indexOf("?");
|
|
73
|
+
const hashIdx = id.indexOf("#");
|
|
74
|
+
const idx =
|
|
75
|
+
queryIdx === -1
|
|
76
|
+
? hashIdx
|
|
77
|
+
: hashIdx === -1
|
|
78
|
+
? queryIdx
|
|
79
|
+
: Math.min(queryIdx, hashIdx);
|
|
80
|
+
if (idx === -1) return [id, ""];
|
|
81
|
+
return [id.slice(0, idx), id.slice(idx)];
|
|
82
|
+
}
|
package/src/Bundle/index.ts
CHANGED
package/src/Cli/commands/dev.ts
CHANGED
|
@@ -1,8 +1,11 @@
|
|
|
1
1
|
import * as Effect from "effect/Effect";
|
|
2
|
+
import * as Option from "effect/Option";
|
|
2
3
|
import * as Schema from "effect/Schema";
|
|
3
4
|
import * as Command from "effect/unstable/cli/Command";
|
|
4
5
|
import * as ChildProcess from "effect/unstable/process/ChildProcess";
|
|
5
6
|
import { fileURLToPath } from "node:url";
|
|
7
|
+
import { SPAWNER_URL_ENV_KEY } from "../../Local/RpcProviderProxy.ts";
|
|
8
|
+
import * as RpcSpawner from "../../Local/RpcSpawner.ts";
|
|
6
9
|
import { envFile, force, profile, script, stage } from "./_shared.ts";
|
|
7
10
|
import { ExecStackOptions } from "./deploy.ts";
|
|
8
11
|
|
|
@@ -15,41 +18,52 @@ export const devCommand = Command.make(
|
|
|
15
18
|
stage,
|
|
16
19
|
profile,
|
|
17
20
|
},
|
|
18
|
-
Effect.fn(
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
21
|
+
Effect.fn(
|
|
22
|
+
function* (args) {
|
|
23
|
+
const options = yield* Schema.encodeEffect(ExecStackOptions)({
|
|
24
|
+
...args,
|
|
25
|
+
yes: true,
|
|
26
|
+
dev: true,
|
|
27
|
+
});
|
|
28
|
+
const spawner = yield* RpcSpawner.RpcSpawner;
|
|
29
|
+
// We no longer force Bun in development because this prevents us from testing in Node.
|
|
30
|
+
const command =
|
|
31
|
+
typeof globalThis.Bun !== "undefined"
|
|
32
|
+
? [
|
|
33
|
+
"bun",
|
|
34
|
+
"run",
|
|
35
|
+
...process.execArgv,
|
|
36
|
+
"--watch",
|
|
37
|
+
"--no-clear-screen",
|
|
38
|
+
fileURLToPath(import.meta.resolve("alchemy/bin/exec.ts")),
|
|
39
|
+
]
|
|
40
|
+
: [
|
|
41
|
+
"node",
|
|
42
|
+
...process.execArgv,
|
|
43
|
+
"--experimental-transform-types",
|
|
44
|
+
"--watch",
|
|
45
|
+
"--watch-preserve-output",
|
|
46
|
+
fileURLToPath(import.meta.resolve("alchemy/bin/exec.js")),
|
|
47
|
+
];
|
|
48
|
+
const child = yield* ChildProcess.make(command[0], command.slice(1), {
|
|
49
|
+
stdin: "inherit",
|
|
50
|
+
stdout: "inherit",
|
|
51
|
+
stderr: "inherit",
|
|
52
|
+
env: {
|
|
53
|
+
ALCHEMY_EXEC_OPTIONS: JSON.stringify(options),
|
|
54
|
+
[SPAWNER_URL_ENV_KEY]: spawner.url,
|
|
55
|
+
},
|
|
56
|
+
extendEnv: true,
|
|
57
|
+
detached: false,
|
|
58
|
+
});
|
|
59
|
+
yield* child.exitCode;
|
|
60
|
+
},
|
|
61
|
+
(effect, args) =>
|
|
62
|
+
Effect.provide(
|
|
63
|
+
RpcSpawner.layerServer({
|
|
64
|
+
profile: args.profile,
|
|
65
|
+
envFile: Option.getOrUndefined(args.envFile),
|
|
66
|
+
}),
|
|
67
|
+
)(effect),
|
|
68
|
+
),
|
|
55
69
|
);
|
package/src/Cli/exec.ts
CHANGED
|
@@ -7,17 +7,22 @@ import * as FetchHttpClient from "effect/unstable/http/FetchHttpClient";
|
|
|
7
7
|
import { AlchemyContextLive } from "../AlchemyContext.ts";
|
|
8
8
|
import { CredentialsStoreLive } from "../Auth/Credentials.ts";
|
|
9
9
|
import { ProfileLive } from "../Auth/Profile.ts";
|
|
10
|
+
import * as RpcProviderProxy from "../Local/RpcProviderProxy.ts";
|
|
10
11
|
import { PlatformServices } from "../Util/PlatformServices.ts";
|
|
11
12
|
import { execStack, ExecStackOptions } from "./commands/deploy.ts";
|
|
12
13
|
import { selectCli } from "./selectCli.ts";
|
|
13
14
|
|
|
14
|
-
const services = Layer.
|
|
15
|
-
Layer.provideMerge(
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
15
|
+
const services = Layer.merge(selectCli(), RpcProviderProxy.fromEnv()).pipe(
|
|
16
|
+
Layer.provideMerge(
|
|
17
|
+
Layer.mergeAll(AlchemyContextLive, ProfileLive, CredentialsStoreLive),
|
|
18
|
+
),
|
|
19
|
+
Layer.provideMerge(
|
|
20
|
+
Layer.mergeAll(
|
|
21
|
+
PlatformServices,
|
|
22
|
+
FetchHttpClient.layer,
|
|
23
|
+
ConfigProvider.layer(ConfigProvider.fromEnv()),
|
|
24
|
+
),
|
|
25
|
+
),
|
|
21
26
|
);
|
|
22
27
|
|
|
23
28
|
export const exec = () =>
|
|
@@ -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 {
|