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
|
@@ -22,7 +22,6 @@ import { Resource, type ResourceBinding } from "../../Resource.ts";
|
|
|
22
22
|
import { Stack } from "../../Stack.ts";
|
|
23
23
|
import { CloudflareEnvironment } from "../CloudflareEnvironment.ts";
|
|
24
24
|
import type { HyperdriveDevOrigin } from "../Hyperdrive/Hyperdrive.ts";
|
|
25
|
-
import { SidecarLive } from "../Local/Sidecar.ts";
|
|
26
25
|
import { CloudflareLogs } from "../Logs.ts";
|
|
27
26
|
import type { Providers } from "../Providers.ts";
|
|
28
27
|
import {
|
|
@@ -34,7 +33,10 @@ import {
|
|
|
34
33
|
} from "./Assets.ts";
|
|
35
34
|
import { getCompatibility } from "./Compatibility.ts";
|
|
36
35
|
import { isDurableObjectExport } from "./DurableObjectNamespace.ts";
|
|
37
|
-
import {
|
|
36
|
+
import {
|
|
37
|
+
LocalWorkerProvider,
|
|
38
|
+
localRuntimeServices,
|
|
39
|
+
} from "./LocalWorkerProvider.ts";
|
|
38
40
|
import { Request } from "./Request.ts";
|
|
39
41
|
import * as Vite from "./Vite.ts";
|
|
40
42
|
import {
|
|
@@ -136,9 +138,13 @@ export const ExportedHandlerMethods = [
|
|
|
136
138
|
"queue",
|
|
137
139
|
] as const satisfies (keyof cf.ExportedHandler)[];
|
|
138
140
|
|
|
139
|
-
export type WorkerServices =
|
|
141
|
+
export type WorkerServices =
|
|
142
|
+
| Worker
|
|
143
|
+
| Request
|
|
144
|
+
| WorkerExecutionContext
|
|
145
|
+
| WorkerEnvironment;
|
|
140
146
|
|
|
141
|
-
export type WorkerShape = Main<WorkerServices
|
|
147
|
+
export type WorkerShape = Main<WorkerServices>;
|
|
142
148
|
|
|
143
149
|
export type WorkerEnv = Record<
|
|
144
150
|
string,
|
|
@@ -239,24 +245,11 @@ export interface WorkerProps<
|
|
|
239
245
|
* already exist in the account.
|
|
240
246
|
*/
|
|
241
247
|
domain?: string | string[];
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
metafile?: boolean;
|
|
248
|
-
/**
|
|
249
|
-
* Configures the {@link Bundle.purePlugin} which annotates top-level
|
|
250
|
-
* call/new expressions in matching packages with `/*#__PURE__*\/`
|
|
251
|
-
* so rolldown can tree-shake them.
|
|
252
|
-
*
|
|
253
|
-
* - `undefined` (default): plugin is enabled with default packages
|
|
254
|
-
* (`effect`, `@effect/*`).
|
|
255
|
-
* - `PurePluginOptions`: plugin is enabled with the provided options.
|
|
256
|
-
* - `false`: plugin is disabled.
|
|
257
|
-
*/
|
|
258
|
-
pure?: Bundle.BundleExtraOptions["pure"];
|
|
259
|
-
};
|
|
248
|
+
/**
|
|
249
|
+
* Extra bundler options applied on top of the standard rolldown input/output
|
|
250
|
+
* options used to build this Worker. See {@link Bundle.BundleExtraOptions}.
|
|
251
|
+
*/
|
|
252
|
+
build?: Bundle.BundleExtraOptions;
|
|
260
253
|
}
|
|
261
254
|
|
|
262
255
|
export type Worker<Bindings extends WorkerBindings = any> = Resource<
|
|
@@ -658,7 +651,7 @@ export const Worker: Platform<
|
|
|
658
651
|
>(
|
|
659
652
|
id: string,
|
|
660
653
|
props:
|
|
661
|
-
| WorkerProps<Bindings, Env, Assets
|
|
654
|
+
| InputProps<WorkerProps<Bindings, Env, Assets>>
|
|
662
655
|
| Effect.Effect<
|
|
663
656
|
InputProps<WorkerProps<Bindings, Env, Assets>>,
|
|
664
657
|
never,
|
|
@@ -720,7 +713,7 @@ const selectLayer = <
|
|
|
720
713
|
export const WorkerProvider = () =>
|
|
721
714
|
selectLayer({
|
|
722
715
|
live: LiveWorkerProvider,
|
|
723
|
-
dev: () => Layer.provide(LocalWorkerProvider(),
|
|
716
|
+
dev: () => Layer.provide(LocalWorkerProvider(), localRuntimeServices()),
|
|
724
717
|
});
|
|
725
718
|
|
|
726
719
|
export const LiveWorkerProvider = () =>
|
|
@@ -1117,7 +1110,7 @@ export const LiveWorkerProvider = () =>
|
|
|
1117
1110
|
exports: (props.exports ?? {}) as any,
|
|
1118
1111
|
},
|
|
1119
1112
|
stack: { name: stack.name, stage: stack.stage },
|
|
1120
|
-
|
|
1113
|
+
extraOptions: props.build,
|
|
1121
1114
|
})
|
|
1122
1115
|
.pipe(Artifacts.cached("build"));
|
|
1123
1116
|
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import type * as cf from "@cloudflare/workers-types";
|
|
2
|
-
import
|
|
2
|
+
import * as NodeServices from "@effect/platform-node/NodeServices";
|
|
3
3
|
import type { DurableObject, WorkerEntrypoint } from "cloudflare:workers";
|
|
4
|
-
import { Stream } from "effect";
|
|
5
4
|
import * as Cause from "effect/Cause";
|
|
6
5
|
import * as ConfigProvider from "effect/ConfigProvider";
|
|
7
6
|
import * as Context from "effect/Context";
|
|
@@ -12,7 +11,8 @@ import * as Layer from "effect/Layer";
|
|
|
12
11
|
import * as Logger from "effect/Logger";
|
|
13
12
|
import { MinimumLogLevel } from "effect/References";
|
|
14
13
|
import * as Scope from "effect/Scope";
|
|
15
|
-
import
|
|
14
|
+
import * as Stream from "effect/Stream";
|
|
15
|
+
import * as FetchHttpClient from "effect/unstable/http/FetchHttpClient";
|
|
16
16
|
import { ExecutionContext } from "../../ExecutionContext.ts";
|
|
17
17
|
import { makeEntrypointLayer } from "../../Runtime.ts";
|
|
18
18
|
import { Self } from "../../Self.ts";
|
|
@@ -138,7 +138,6 @@ export const makeWorkerBridge = (
|
|
|
138
138
|
),
|
|
139
139
|
);
|
|
140
140
|
}
|
|
141
|
-
console.log("dispatcher", dispatcher.toString());
|
|
142
141
|
return Effect.succeed([
|
|
143
142
|
dispatcher(...args) as Effect.Effect<any>,
|
|
144
143
|
Context.empty(),
|
|
@@ -272,7 +271,6 @@ export const makeRpcProxy = (
|
|
|
272
271
|
),
|
|
273
272
|
);
|
|
274
273
|
}
|
|
275
|
-
console.log("dispatcher", dispatcher.toString());
|
|
276
274
|
return dispatcher(...args) as Effect.Effect<any>;
|
|
277
275
|
}),
|
|
278
276
|
processEvent,
|
|
@@ -6,14 +6,12 @@ import type * as Path from "effect/Path";
|
|
|
6
6
|
import * as Stream from "effect/Stream";
|
|
7
7
|
import { fileURLToPath } from "node:url";
|
|
8
8
|
import type * as rolldown from "rolldown";
|
|
9
|
-
import Sonda from "sonda/rolldown";
|
|
10
9
|
import * as Bundle from "../../Bundle/Bundle.ts";
|
|
11
10
|
import { findCwdForBundle } from "../../Bundle/TempRoot.ts";
|
|
12
11
|
import {
|
|
13
12
|
isDurableObjectExport,
|
|
14
13
|
type DurableObjectExport,
|
|
15
14
|
} from "./DurableObjectNamespace.ts";
|
|
16
|
-
import type { WorkerProps } from "./Worker.ts";
|
|
17
15
|
import { isWorkflowExport, type WorkflowExport } from "./Workflow.ts";
|
|
18
16
|
|
|
19
17
|
export interface WorkerBundleOptions {
|
|
@@ -32,7 +30,7 @@ export interface WorkerBundleOptions {
|
|
|
32
30
|
exports: Record<string, DurableObjectExport | WorkflowExport>;
|
|
33
31
|
};
|
|
34
32
|
stack: { name: string; stage: string };
|
|
35
|
-
|
|
33
|
+
extraOptions: Bundle.BundleExtraOptions | undefined;
|
|
36
34
|
}
|
|
37
35
|
|
|
38
36
|
export const WorkerBundle = Effect.gen(function* () {
|
|
@@ -74,11 +72,12 @@ export const WorkerBundle = Effect.gen(function* () {
|
|
|
74
72
|
),
|
|
75
73
|
]
|
|
76
74
|
: undefined,
|
|
77
|
-
...(options.userOptions?.metafile ? [Sonda({ open: false })] : []),
|
|
78
75
|
],
|
|
79
76
|
checks: {
|
|
80
77
|
// Suppress unresolved import warnings for unrelated AWS packages
|
|
81
78
|
unresolvedImport: false,
|
|
79
|
+
// Suppress warning caused by static import of `@effect/platform-node/NodeServices` in `WorkerBridge.ts`
|
|
80
|
+
ineffectiveDynamicImport: false,
|
|
82
81
|
},
|
|
83
82
|
};
|
|
84
83
|
const outputOptions: rolldown.OutputOptions = {
|
|
@@ -88,10 +87,7 @@ export const WorkerBundle = Effect.gen(function* () {
|
|
|
88
87
|
keepNames: true,
|
|
89
88
|
dir: `.alchemy/bundles/${options.id}`,
|
|
90
89
|
};
|
|
91
|
-
|
|
92
|
-
pure: options.userOptions?.pure,
|
|
93
|
-
};
|
|
94
|
-
return { inputOptions, outputOptions, extraOptions };
|
|
90
|
+
return { inputOptions, outputOptions, extraOptions: options.extraOptions };
|
|
95
91
|
});
|
|
96
92
|
|
|
97
93
|
const sanitizeMain = (main: string) =>
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import type * as cf from "@cloudflare/workers-types";
|
|
2
2
|
import * as Effect from "effect/Effect";
|
|
3
|
+
import * as Layer from "effect/Layer";
|
|
3
4
|
import * as Option from "effect/Option";
|
|
4
5
|
import * as Redacted from "effect/Redacted";
|
|
5
6
|
import type { HttpEffect } from "../../Http.ts";
|
|
@@ -112,6 +113,7 @@ export const makeWorkerRuntimeContext = (id: string): WorkerRuntimeContext => {
|
|
|
112
113
|
Effect.sync(() => {
|
|
113
114
|
exports[name] = value;
|
|
114
115
|
}),
|
|
116
|
+
planServices: Layer.succeed(WorkerEnvironment, {}),
|
|
115
117
|
exports: Effect.gen(function* () {
|
|
116
118
|
const handlers = yield* Effect.all(listeners, {
|
|
117
119
|
concurrency: "unbounded",
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as workflows from "@distilled.cloud/cloudflare/workflows";
|
|
2
2
|
import * as Context from "effect/Context";
|
|
3
3
|
import * as Effect from "effect/Effect";
|
|
4
|
-
import
|
|
4
|
+
import { ALCHEMY_PHASE } from "../../Phase.ts";
|
|
5
5
|
import type { PlatformServices } from "../../Platform.ts";
|
|
6
6
|
import * as Provider from "../../Provider.ts";
|
|
7
7
|
import { Resource } from "../../Resource.ts";
|
|
@@ -99,12 +99,9 @@ export const sleepUntil = (
|
|
|
99
99
|
* reflect that or `yield* WorkerEnvironment` fails to type-check inside a
|
|
100
100
|
* body even though it succeeds at runtime.
|
|
101
101
|
*/
|
|
102
|
-
export type WorkflowRunServices =
|
|
103
|
-
| WorkflowEvent
|
|
104
|
-
| WorkflowStep
|
|
105
|
-
| WorkerEnvironment;
|
|
102
|
+
export type WorkflowRunServices = WorkflowEvent | WorkflowStep | WorkerServices;
|
|
106
103
|
|
|
107
|
-
export type WorkflowServices =
|
|
104
|
+
export type WorkflowServices = WorkflowRunServices | PlatformServices;
|
|
108
105
|
|
|
109
106
|
/**
|
|
110
107
|
* Metadata stored in the worker export map to distinguish workflow exports
|
|
@@ -122,7 +119,7 @@ export interface WorkflowExport {
|
|
|
122
119
|
*/
|
|
123
120
|
export type WorkflowImpl<Input = unknown, Result = unknown> = (
|
|
124
121
|
input: Input,
|
|
125
|
-
) => Effect.Effect<Result, never,
|
|
122
|
+
) => Effect.Effect<Result, never, WorkflowServices>;
|
|
126
123
|
|
|
127
124
|
export const isWorkflowExport = (value: unknown): value is WorkflowExport =>
|
|
128
125
|
typeof value === "object" &&
|
|
@@ -391,10 +388,12 @@ export const Workflow: WorkflowClass = taggedFunction(WorkflowScope, ((
|
|
|
391
388
|
const services =
|
|
392
389
|
yield* Effect.context<Effect.Services<typeof impl>>();
|
|
393
390
|
|
|
394
|
-
const binding = yield* Effect.
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
391
|
+
const binding = yield* Effect.all([
|
|
392
|
+
WorkerEnvironment,
|
|
393
|
+
ALCHEMY_PHASE,
|
|
394
|
+
]).pipe(
|
|
395
|
+
Effect.flatMap(([env, phase]) => {
|
|
396
|
+
if (env === undefined || phase === "plan") {
|
|
398
397
|
return Effect.succeed(undefined as any);
|
|
399
398
|
}
|
|
400
399
|
const wf = env[name];
|
|
@@ -0,0 +1,403 @@
|
|
|
1
|
+
import * as zaraz from "@distilled.cloud/cloudflare/zaraz";
|
|
2
|
+
import * as Effect from "effect/Effect";
|
|
3
|
+
import { deepEqual, isResolved } from "../../Diff.ts";
|
|
4
|
+
import * as Provider from "../../Provider.ts";
|
|
5
|
+
import { Resource } from "../../Resource.ts";
|
|
6
|
+
import {
|
|
7
|
+
stripNullFields,
|
|
8
|
+
stripUndefinedFields,
|
|
9
|
+
unwrapRedacted,
|
|
10
|
+
} from "../../Util/data.ts";
|
|
11
|
+
import { CloudflareEnvironment } from "../CloudflareEnvironment.ts";
|
|
12
|
+
import type { Providers } from "../Providers.ts";
|
|
13
|
+
import { resolveZoneId, type ZoneReference } from "../Zone.ts";
|
|
14
|
+
import { defineZarazEvents } from "./ZarazEventTypes.ts";
|
|
15
|
+
|
|
16
|
+
export type ZarazWorkflow = zaraz.GetWorkflowResponse;
|
|
17
|
+
export type ZarazSettings = zaraz.PutConfigRequest["settings"];
|
|
18
|
+
export type ZarazAnalytics = NonNullable<zaraz.PutConfigRequest["analytics"]>;
|
|
19
|
+
export type ZarazConsent = NonNullable<zaraz.PutConfigRequest["consent"]>;
|
|
20
|
+
|
|
21
|
+
export type ZarazConfigProps = {
|
|
22
|
+
/**
|
|
23
|
+
* Zone whose Zaraz config should be managed. Accepts a zone id, a zone name
|
|
24
|
+
* (`example.com`), or a `{ zoneId, name? }` object.
|
|
25
|
+
*/
|
|
26
|
+
zone: ZoneReference;
|
|
27
|
+
/**
|
|
28
|
+
* Data layer compatibility mode.
|
|
29
|
+
*/
|
|
30
|
+
dataLayer?: boolean;
|
|
31
|
+
/**
|
|
32
|
+
* Key used for Zaraz debug mode. Defaults to the current zone config value.
|
|
33
|
+
*/
|
|
34
|
+
debugKey?: string;
|
|
35
|
+
/**
|
|
36
|
+
* Zaraz settings to merge into the current zone config.
|
|
37
|
+
*/
|
|
38
|
+
settings?: Partial<ZarazSettings>;
|
|
39
|
+
/**
|
|
40
|
+
* Zaraz tools keyed by tool id. When omitted, existing tools are retained.
|
|
41
|
+
*/
|
|
42
|
+
tools?: Record<string, unknown>;
|
|
43
|
+
/**
|
|
44
|
+
* Zaraz triggers keyed by trigger id. When omitted, existing triggers are
|
|
45
|
+
* retained.
|
|
46
|
+
*/
|
|
47
|
+
triggers?: Record<string, unknown>;
|
|
48
|
+
/**
|
|
49
|
+
* Zaraz variables keyed by variable id. When omitted, existing variables are
|
|
50
|
+
* retained. Secret variable values are not returned by Cloudflare reads.
|
|
51
|
+
*/
|
|
52
|
+
variables?: Record<string, unknown>;
|
|
53
|
+
/**
|
|
54
|
+
* Cloudflare Monitoring settings.
|
|
55
|
+
*/
|
|
56
|
+
analytics?: ZarazAnalytics;
|
|
57
|
+
/**
|
|
58
|
+
* Zaraz consent management configuration.
|
|
59
|
+
*/
|
|
60
|
+
consent?: ZarazConsent;
|
|
61
|
+
/**
|
|
62
|
+
* Single Page Application support.
|
|
63
|
+
*/
|
|
64
|
+
historyChange?: boolean;
|
|
65
|
+
/**
|
|
66
|
+
* Zaraz workflow mode. When omitted, the current workflow is retained.
|
|
67
|
+
*/
|
|
68
|
+
workflow?: ZarazWorkflow;
|
|
69
|
+
/**
|
|
70
|
+
* Whether destroy should restore Cloudflare's default Zaraz config.
|
|
71
|
+
*
|
|
72
|
+
* By default, destroy only removes this resource from Alchemy state and keeps
|
|
73
|
+
* the current zone-level Zaraz config intact.
|
|
74
|
+
* If `workflow` is set, `delete: true` restores the workflow to real-time
|
|
75
|
+
* mode, Cloudflare's default.
|
|
76
|
+
* @default false
|
|
77
|
+
*/
|
|
78
|
+
delete?: boolean;
|
|
79
|
+
};
|
|
80
|
+
|
|
81
|
+
export type ZarazConfig = Resource<
|
|
82
|
+
"Cloudflare.ZarazConfig",
|
|
83
|
+
ZarazConfigProps,
|
|
84
|
+
ZarazConfigAttributes,
|
|
85
|
+
never,
|
|
86
|
+
Providers
|
|
87
|
+
>;
|
|
88
|
+
|
|
89
|
+
export type ZarazConfigAttributes = {
|
|
90
|
+
/**
|
|
91
|
+
* Cloudflare zone id.
|
|
92
|
+
*/
|
|
93
|
+
zoneId: string;
|
|
94
|
+
/**
|
|
95
|
+
* Data layer compatibility mode.
|
|
96
|
+
*/
|
|
97
|
+
dataLayer: boolean;
|
|
98
|
+
/**
|
|
99
|
+
* Key used for Zaraz debug mode.
|
|
100
|
+
*/
|
|
101
|
+
debugKey: string;
|
|
102
|
+
/**
|
|
103
|
+
* General Zaraz settings.
|
|
104
|
+
*/
|
|
105
|
+
settings: zaraz.GetConfigResponse["settings"];
|
|
106
|
+
/**
|
|
107
|
+
* Zaraz tools keyed by tool id.
|
|
108
|
+
*/
|
|
109
|
+
tools: Record<string, unknown>;
|
|
110
|
+
/**
|
|
111
|
+
* Zaraz triggers keyed by trigger id.
|
|
112
|
+
*/
|
|
113
|
+
triggers: Record<string, unknown>;
|
|
114
|
+
/**
|
|
115
|
+
* Zaraz variables keyed by variable id.
|
|
116
|
+
*/
|
|
117
|
+
variables: Record<string, unknown>;
|
|
118
|
+
/**
|
|
119
|
+
* Zaraz internal version of the config.
|
|
120
|
+
*/
|
|
121
|
+
zarazVersion: number;
|
|
122
|
+
/**
|
|
123
|
+
* Cloudflare Monitoring settings.
|
|
124
|
+
*/
|
|
125
|
+
analytics?: zaraz.GetConfigResponse["analytics"];
|
|
126
|
+
/**
|
|
127
|
+
* Consent management configuration.
|
|
128
|
+
*/
|
|
129
|
+
consent?: zaraz.GetConfigResponse["consent"];
|
|
130
|
+
/**
|
|
131
|
+
* Single Page Application support.
|
|
132
|
+
*/
|
|
133
|
+
historyChange?: boolean | null;
|
|
134
|
+
/**
|
|
135
|
+
* Current Zaraz workflow mode.
|
|
136
|
+
*/
|
|
137
|
+
workflow: ZarazWorkflow;
|
|
138
|
+
};
|
|
139
|
+
|
|
140
|
+
/**
|
|
141
|
+
* A Cloudflare Zaraz zone configuration.
|
|
142
|
+
*
|
|
143
|
+
* Cloudflare Zaraz is an edge-managed third-party tool manager and analytics
|
|
144
|
+
* event pipeline. See the
|
|
145
|
+
* {@link https://developers.cloudflare.com/zaraz/ | Cloudflare Zaraz docs} and
|
|
146
|
+
* {@link https://developers.cloudflare.com/zaraz/web-api/ | Web API docs}.
|
|
147
|
+
*
|
|
148
|
+
* Zaraz is a zone-level singleton. This resource reconciles the current zone
|
|
149
|
+
* config and workflow to the desired values while retaining existing settings
|
|
150
|
+
* for fields omitted from props.
|
|
151
|
+
*
|
|
152
|
+
* Destroy keeps the current Zaraz config by default to avoid wiping unrelated
|
|
153
|
+
* zone-level analytics setup. Set `delete: true` to restore Cloudflare's
|
|
154
|
+
* default Zaraz config on destroy.
|
|
155
|
+
*
|
|
156
|
+
* @section Managing Zaraz
|
|
157
|
+
* @example Enable data layer compatibility
|
|
158
|
+
* ```typescript
|
|
159
|
+
* const zaraz = yield* Cloudflare.ZarazConfig("Analytics", {
|
|
160
|
+
* zone: "example.com",
|
|
161
|
+
* dataLayer: true,
|
|
162
|
+
* });
|
|
163
|
+
* ```
|
|
164
|
+
*
|
|
165
|
+
* @example Update Zaraz settings
|
|
166
|
+
* ```typescript
|
|
167
|
+
* const zaraz = yield* Cloudflare.ZarazConfig("Analytics", {
|
|
168
|
+
* zone: "example.com",
|
|
169
|
+
* settings: {
|
|
170
|
+
* autoInjectScript: true,
|
|
171
|
+
* hideIPAddress: true,
|
|
172
|
+
* },
|
|
173
|
+
* });
|
|
174
|
+
* ```
|
|
175
|
+
*
|
|
176
|
+
* @example Enable preview workflow
|
|
177
|
+
* ```typescript
|
|
178
|
+
* const zaraz = yield* Cloudflare.ZarazConfig("Analytics", {
|
|
179
|
+
* zone: "example.com",
|
|
180
|
+
* workflow: "preview",
|
|
181
|
+
* });
|
|
182
|
+
* ```
|
|
183
|
+
*/
|
|
184
|
+
export const ZarazConfig = Object.assign(
|
|
185
|
+
Resource<ZarazConfig>("Cloudflare.ZarazConfig"),
|
|
186
|
+
{
|
|
187
|
+
/**
|
|
188
|
+
* Define a type-only contract for the events sent through this Zaraz config.
|
|
189
|
+
*
|
|
190
|
+
* The returned value carries only types. Browser code should use
|
|
191
|
+
* Cloudflare's injected `window.zaraz` API at runtime.
|
|
192
|
+
*/
|
|
193
|
+
events: defineZarazEvents,
|
|
194
|
+
},
|
|
195
|
+
);
|
|
196
|
+
|
|
197
|
+
type ConfigResponse =
|
|
198
|
+
| zaraz.GetConfigResponse
|
|
199
|
+
| zaraz.PutConfigResponse
|
|
200
|
+
| zaraz.GetDefaultResponse;
|
|
201
|
+
|
|
202
|
+
const toAttributes = (
|
|
203
|
+
zoneId: string,
|
|
204
|
+
config: ConfigResponse,
|
|
205
|
+
workflow: ZarazWorkflow,
|
|
206
|
+
): ZarazConfig["Attributes"] => ({
|
|
207
|
+
zoneId,
|
|
208
|
+
dataLayer: config.dataLayer,
|
|
209
|
+
debugKey: config.debugKey,
|
|
210
|
+
settings: config.settings,
|
|
211
|
+
tools: config.tools,
|
|
212
|
+
triggers: config.triggers,
|
|
213
|
+
variables: config.variables,
|
|
214
|
+
zarazVersion: config.zarazVersion,
|
|
215
|
+
analytics: config.analytics,
|
|
216
|
+
consent: config.consent,
|
|
217
|
+
historyChange: config.historyChange,
|
|
218
|
+
workflow,
|
|
219
|
+
});
|
|
220
|
+
|
|
221
|
+
const fromAttributes = (attrs: ZarazConfigAttributes): ConfigResponse => ({
|
|
222
|
+
dataLayer: attrs.dataLayer,
|
|
223
|
+
debugKey: attrs.debugKey,
|
|
224
|
+
settings: attrs.settings,
|
|
225
|
+
tools: attrs.tools,
|
|
226
|
+
triggers: attrs.triggers,
|
|
227
|
+
variables: attrs.variables,
|
|
228
|
+
zarazVersion: attrs.zarazVersion,
|
|
229
|
+
analytics: attrs.analytics,
|
|
230
|
+
consent: attrs.consent,
|
|
231
|
+
historyChange: attrs.historyChange,
|
|
232
|
+
});
|
|
233
|
+
|
|
234
|
+
const desiredConfig = (
|
|
235
|
+
observed: ConfigResponse,
|
|
236
|
+
props: ZarazConfigProps,
|
|
237
|
+
): ConfigResponse => ({
|
|
238
|
+
dataLayer: props.dataLayer ?? observed.dataLayer,
|
|
239
|
+
debugKey: props.debugKey ?? observed.debugKey,
|
|
240
|
+
settings: {
|
|
241
|
+
...stripNullFields(observed.settings),
|
|
242
|
+
...props.settings,
|
|
243
|
+
},
|
|
244
|
+
tools: props.tools ?? observed.tools,
|
|
245
|
+
triggers: props.triggers ?? observed.triggers,
|
|
246
|
+
variables: props.variables ?? observed.variables,
|
|
247
|
+
zarazVersion: observed.zarazVersion,
|
|
248
|
+
analytics:
|
|
249
|
+
props.analytics ??
|
|
250
|
+
(observed.analytics ? stripNullFields(observed.analytics) : undefined),
|
|
251
|
+
consent:
|
|
252
|
+
props.consent ??
|
|
253
|
+
(observed.consent ? stripNullFields(observed.consent) : undefined),
|
|
254
|
+
historyChange: props.historyChange ?? observed.historyChange,
|
|
255
|
+
});
|
|
256
|
+
|
|
257
|
+
const toPutConfig = (
|
|
258
|
+
zoneId: string,
|
|
259
|
+
config: ConfigResponse,
|
|
260
|
+
): zaraz.PutConfigRequest =>
|
|
261
|
+
stripUndefinedFields({
|
|
262
|
+
zoneId,
|
|
263
|
+
dataLayer: config.dataLayer,
|
|
264
|
+
debugKey: config.debugKey,
|
|
265
|
+
settings: stripNullFields(config.settings) as ZarazSettings,
|
|
266
|
+
tools: unwrapRedacted(config.tools) as Record<string, unknown>,
|
|
267
|
+
triggers: unwrapRedacted(config.triggers) as Record<string, unknown>,
|
|
268
|
+
variables: unwrapRedacted(config.variables) as Record<string, unknown>,
|
|
269
|
+
zarazVersion: config.zarazVersion,
|
|
270
|
+
analytics: config.analytics
|
|
271
|
+
? (stripNullFields(config.analytics) as ZarazAnalytics)
|
|
272
|
+
: undefined,
|
|
273
|
+
consent: config.consent
|
|
274
|
+
? (stripNullFields(config.consent) as ZarazConsent)
|
|
275
|
+
: undefined,
|
|
276
|
+
historyChange: config.historyChange ?? undefined,
|
|
277
|
+
}) as zaraz.PutConfigRequest;
|
|
278
|
+
|
|
279
|
+
const comparableConfig = (config: ConfigResponse) => {
|
|
280
|
+
const { zoneId: _, ...request } = toPutConfig("", config);
|
|
281
|
+
return request;
|
|
282
|
+
};
|
|
283
|
+
|
|
284
|
+
const configForCompare = (
|
|
285
|
+
observed: ConfigResponse,
|
|
286
|
+
oldProps: ZarazConfigProps | undefined,
|
|
287
|
+
props: ZarazConfigProps,
|
|
288
|
+
): ConfigResponse => {
|
|
289
|
+
if (
|
|
290
|
+
props.variables === undefined ||
|
|
291
|
+
oldProps?.variables === undefined ||
|
|
292
|
+
!deepEqual(oldProps.variables, props.variables)
|
|
293
|
+
) {
|
|
294
|
+
return observed;
|
|
295
|
+
}
|
|
296
|
+
|
|
297
|
+
// If props already requested these variables in the previous state, compare
|
|
298
|
+
// against props instead of Cloudflare's readback because secret variable
|
|
299
|
+
// values are intentionally write-only in the Zaraz API.
|
|
300
|
+
return {
|
|
301
|
+
...observed,
|
|
302
|
+
variables: props.variables,
|
|
303
|
+
};
|
|
304
|
+
};
|
|
305
|
+
|
|
306
|
+
export const ZarazConfigProvider = () =>
|
|
307
|
+
Provider.effect(
|
|
308
|
+
ZarazConfig,
|
|
309
|
+
Effect.gen(function* () {
|
|
310
|
+
const { accountId } = yield* CloudflareEnvironment;
|
|
311
|
+
const getConfig = yield* zaraz.getConfig;
|
|
312
|
+
const putConfig = yield* zaraz.putConfig;
|
|
313
|
+
const getDefault = yield* zaraz.getDefault;
|
|
314
|
+
const getWorkflow = yield* zaraz.getWorkflow;
|
|
315
|
+
// Cloudflare's OpenAPI operation name is `putZaraz`, but the endpoint
|
|
316
|
+
// updates the zone's Zaraz workflow mode.
|
|
317
|
+
const putWorkflow = yield* zaraz.putZaraz;
|
|
318
|
+
|
|
319
|
+
const resolve = (zone: ZoneReference) =>
|
|
320
|
+
resolveZoneId({
|
|
321
|
+
accountId,
|
|
322
|
+
zone,
|
|
323
|
+
hostname: typeof zone === "string" ? zone : (zone.name ?? ""),
|
|
324
|
+
});
|
|
325
|
+
|
|
326
|
+
const observe = (zoneId: string) =>
|
|
327
|
+
Effect.all({
|
|
328
|
+
config: getConfig({ zoneId }),
|
|
329
|
+
workflow: getWorkflow({ zoneId }),
|
|
330
|
+
}).pipe(
|
|
331
|
+
Effect.map(({ config, workflow }) =>
|
|
332
|
+
toAttributes(zoneId, config, workflow),
|
|
333
|
+
),
|
|
334
|
+
);
|
|
335
|
+
|
|
336
|
+
return {
|
|
337
|
+
stables: ["zoneId"],
|
|
338
|
+
diff: Effect.fn(function* ({ olds, news, output }) {
|
|
339
|
+
if (!output) return undefined;
|
|
340
|
+
if (!isResolved(news)) return undefined;
|
|
341
|
+
|
|
342
|
+
const zoneId = yield* resolve(news.zone);
|
|
343
|
+
if (zoneId !== output.zoneId) {
|
|
344
|
+
return { action: "replace" } as const;
|
|
345
|
+
}
|
|
346
|
+
|
|
347
|
+
const outputConfig = fromAttributes(output);
|
|
348
|
+
const comparableOutput = configForCompare(outputConfig, olds, news);
|
|
349
|
+
const desired = desiredConfig(outputConfig, news);
|
|
350
|
+
const desiredWorkflow = news.workflow ?? output.workflow;
|
|
351
|
+
if (
|
|
352
|
+
desiredWorkflow !== output.workflow ||
|
|
353
|
+
!deepEqual(
|
|
354
|
+
comparableConfig(comparableOutput),
|
|
355
|
+
comparableConfig(desired),
|
|
356
|
+
)
|
|
357
|
+
) {
|
|
358
|
+
return { action: "update" } as const;
|
|
359
|
+
}
|
|
360
|
+
}),
|
|
361
|
+
read: Effect.fn(function* ({ olds, output }) {
|
|
362
|
+
const zoneId =
|
|
363
|
+
output?.zoneId ?? (olds ? yield* resolve(olds.zone) : undefined);
|
|
364
|
+
if (!zoneId) return undefined;
|
|
365
|
+
return yield* observe(zoneId);
|
|
366
|
+
}),
|
|
367
|
+
reconcile: Effect.fn(function* ({ news, output }) {
|
|
368
|
+
const zoneId = output?.zoneId ?? (yield* resolve(news.zone));
|
|
369
|
+
const observed = yield* observe(zoneId);
|
|
370
|
+
const observedConfig = fromAttributes(observed);
|
|
371
|
+
const desired = desiredConfig(observedConfig, news);
|
|
372
|
+
const desiredWorkflow = news.workflow ?? observed.workflow;
|
|
373
|
+
|
|
374
|
+
const updatedConfig = deepEqual(
|
|
375
|
+
comparableConfig(observedConfig),
|
|
376
|
+
comparableConfig(desired),
|
|
377
|
+
)
|
|
378
|
+
? observedConfig
|
|
379
|
+
: yield* putConfig(toPutConfig(zoneId, desired));
|
|
380
|
+
const updatedWorkflow =
|
|
381
|
+
desiredWorkflow === observed.workflow
|
|
382
|
+
? observed.workflow
|
|
383
|
+
: yield* putWorkflow({
|
|
384
|
+
zoneId,
|
|
385
|
+
workflow: desiredWorkflow,
|
|
386
|
+
});
|
|
387
|
+
|
|
388
|
+
return toAttributes(zoneId, updatedConfig, updatedWorkflow);
|
|
389
|
+
}),
|
|
390
|
+
delete: Effect.fn(function* ({ output, olds }) {
|
|
391
|
+
if (olds.delete !== true) return;
|
|
392
|
+
const defaults = yield* getDefault({ zoneId: output.zoneId });
|
|
393
|
+
yield* putConfig(toPutConfig(output.zoneId, defaults));
|
|
394
|
+
if (olds.workflow !== undefined) {
|
|
395
|
+
yield* putWorkflow({
|
|
396
|
+
zoneId: output.zoneId,
|
|
397
|
+
workflow: "realtime",
|
|
398
|
+
});
|
|
399
|
+
}
|
|
400
|
+
}),
|
|
401
|
+
};
|
|
402
|
+
}),
|
|
403
|
+
);
|