alchemy 2.0.0-beta.51 → 2.0.0-beta.53
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bin/exec.js +24 -30
- package/bin/exec.js.map +1 -1
- package/lib/AWS/ACM/Certificate.d.ts +1 -1
- package/lib/AWS/ApiGateway/Account.d.ts +1 -1
- package/lib/AWS/ApiGateway/ApiKey.d.ts +2 -2
- package/lib/AWS/ApiGateway/ApiKey.d.ts.map +1 -1
- package/lib/AWS/ApiGateway/ApiKey.js +3 -3
- package/lib/AWS/ApiGateway/ApiKey.js.map +1 -1
- package/lib/AWS/ApiGateway/Authorizer.d.ts +1 -1
- package/lib/AWS/ApiGateway/BasePathMapping.d.ts +1 -1
- package/lib/AWS/ApiGateway/Deployment.d.ts +1 -1
- package/lib/AWS/ApiGateway/DomainName.d.ts +1 -1
- package/lib/AWS/ApiGateway/GatewayResource.d.ts +1 -1
- package/lib/AWS/ApiGateway/GatewayResponse.d.ts +1 -1
- package/lib/AWS/ApiGateway/Method.d.ts +1 -1
- package/lib/AWS/ApiGateway/RestApi.d.ts +2 -2
- package/lib/AWS/ApiGateway/RestApi.d.ts.map +1 -1
- package/lib/AWS/ApiGateway/RestApi.js +4 -4
- package/lib/AWS/ApiGateway/RestApi.js.map +1 -1
- package/lib/AWS/ApiGateway/Stage.d.ts +2 -2
- package/lib/AWS/ApiGateway/Stage.d.ts.map +1 -1
- package/lib/AWS/ApiGateway/Stage.js +3 -3
- package/lib/AWS/ApiGateway/Stage.js.map +1 -1
- package/lib/AWS/ApiGateway/UsagePlan.d.ts +2 -2
- package/lib/AWS/ApiGateway/UsagePlan.d.ts.map +1 -1
- package/lib/AWS/ApiGateway/UsagePlan.js +3 -3
- package/lib/AWS/ApiGateway/UsagePlan.js.map +1 -1
- package/lib/AWS/ApiGateway/UsagePlanKey.d.ts +1 -1
- package/lib/AWS/ApiGateway/VpcLink.d.ts +2 -2
- package/lib/AWS/ApiGateway/VpcLink.d.ts.map +1 -1
- package/lib/AWS/ApiGateway/VpcLink.js +3 -3
- package/lib/AWS/ApiGateway/VpcLink.js.map +1 -1
- package/lib/AWS/ApiGateway/common.d.ts +1 -1
- package/lib/AWS/Assets.d.ts +21 -12
- package/lib/AWS/Assets.d.ts.map +1 -1
- package/lib/AWS/Assets.js +95 -70
- package/lib/AWS/Assets.js.map +1 -1
- package/lib/AWS/AuthProvider.d.ts +12 -6
- package/lib/AWS/AuthProvider.d.ts.map +1 -1
- package/lib/AWS/AuthProvider.js +120 -75
- package/lib/AWS/AuthProvider.js.map +1 -1
- package/lib/AWS/AutoScaling/AutoScalingGroup.d.ts +1 -1
- package/lib/AWS/AutoScaling/LaunchTemplate.d.ts +1 -2
- package/lib/AWS/AutoScaling/LaunchTemplate.d.ts.map +1 -1
- package/lib/AWS/AutoScaling/LaunchTemplate.js +21 -27
- package/lib/AWS/AutoScaling/LaunchTemplate.js.map +1 -1
- package/lib/AWS/AutoScaling/ScalingPolicy.d.ts +1 -1
- package/lib/AWS/Bootstrap.d.ts +2 -14
- package/lib/AWS/Bootstrap.d.ts.map +1 -1
- package/lib/AWS/Bootstrap.js +46 -133
- package/lib/AWS/Bootstrap.js.map +1 -1
- package/lib/AWS/CloudFront/CachePolicy.d.ts +1 -1
- package/lib/AWS/CloudFront/Distribution.d.ts +1 -1
- package/lib/AWS/CloudFront/Function.d.ts +1 -1
- package/lib/AWS/CloudFront/Invalidation.d.ts +1 -1
- package/lib/AWS/CloudFront/KeyGroup.d.ts +1 -1
- package/lib/AWS/CloudFront/KeyValueStore.d.ts +1 -1
- package/lib/AWS/CloudFront/OriginAccessControl.d.ts +1 -1
- package/lib/AWS/CloudFront/OriginRequestPolicy.d.ts +1 -1
- package/lib/AWS/CloudFront/PublicKey.d.ts +1 -1
- package/lib/AWS/CloudFront/ResponseHeadersPolicy.d.ts +1 -1
- package/lib/AWS/CloudFront/common.d.ts +1 -1
- package/lib/AWS/CloudWatch/Alarm.d.ts +2 -3
- package/lib/AWS/CloudWatch/Alarm.d.ts.map +1 -1
- package/lib/AWS/CloudWatch/Alarm.js +3 -6
- package/lib/AWS/CloudWatch/Alarm.js.map +1 -1
- package/lib/AWS/CloudWatch/AlarmMuteRule.d.ts +2 -3
- package/lib/AWS/CloudWatch/AlarmMuteRule.d.ts.map +1 -1
- package/lib/AWS/CloudWatch/AlarmMuteRule.js +2 -5
- package/lib/AWS/CloudWatch/AlarmMuteRule.js.map +1 -1
- package/lib/AWS/CloudWatch/AnomalyDetector.d.ts +1 -1
- package/lib/AWS/CloudWatch/CompositeAlarm.d.ts +2 -3
- package/lib/AWS/CloudWatch/CompositeAlarm.d.ts.map +1 -1
- package/lib/AWS/CloudWatch/CompositeAlarm.js +3 -6
- package/lib/AWS/CloudWatch/CompositeAlarm.js.map +1 -1
- package/lib/AWS/CloudWatch/Dashboard.d.ts +2 -2
- package/lib/AWS/CloudWatch/Dashboard.d.ts.map +1 -1
- package/lib/AWS/CloudWatch/Dashboard.js +3 -4
- package/lib/AWS/CloudWatch/Dashboard.js.map +1 -1
- package/lib/AWS/CloudWatch/DescribeAlarmContributors.d.ts +1 -1
- package/lib/AWS/CloudWatch/DescribeAlarmHistory.d.ts +1 -1
- package/lib/AWS/CloudWatch/DescribeAlarms.d.ts +1 -1
- package/lib/AWS/CloudWatch/DescribeAlarmsForMetric.d.ts +1 -1
- package/lib/AWS/CloudWatch/DescribeAnomalyDetectors.d.ts +1 -1
- package/lib/AWS/CloudWatch/DescribeInsightRules.d.ts +1 -1
- package/lib/AWS/CloudWatch/DisableAlarmActions.d.ts +1 -1
- package/lib/AWS/CloudWatch/DisableInsightRules.d.ts +1 -1
- package/lib/AWS/CloudWatch/EnableAlarmActions.d.ts +1 -1
- package/lib/AWS/CloudWatch/GetAlarmMuteRule.d.ts +1 -1
- package/lib/AWS/CloudWatch/GetDashboard.d.ts +1 -1
- package/lib/AWS/CloudWatch/GetInsightRuleReport.d.ts +1 -1
- package/lib/AWS/CloudWatch/GetMetricData.d.ts +1 -1
- package/lib/AWS/CloudWatch/GetMetricStatistics.d.ts +1 -1
- package/lib/AWS/CloudWatch/GetMetricStream.d.ts +1 -1
- package/lib/AWS/CloudWatch/GetMetricWidgetImage.d.ts +1 -1
- package/lib/AWS/CloudWatch/InsightRule.d.ts +2 -3
- package/lib/AWS/CloudWatch/InsightRule.d.ts.map +1 -1
- package/lib/AWS/CloudWatch/InsightRule.js +4 -7
- package/lib/AWS/CloudWatch/InsightRule.js.map +1 -1
- package/lib/AWS/CloudWatch/ListAlarmMuteRules.d.ts +1 -1
- package/lib/AWS/CloudWatch/ListDashboards.d.ts +1 -1
- package/lib/AWS/CloudWatch/ListManagedInsightRules.d.ts +1 -1
- package/lib/AWS/CloudWatch/ListMetricStreams.d.ts +1 -1
- package/lib/AWS/CloudWatch/ListMetrics.d.ts +1 -1
- package/lib/AWS/CloudWatch/ListTagsForResource.d.ts +1 -1
- package/lib/AWS/CloudWatch/MetricStream.d.ts +2 -3
- package/lib/AWS/CloudWatch/MetricStream.d.ts.map +1 -1
- package/lib/AWS/CloudWatch/MetricStream.js +3 -6
- package/lib/AWS/CloudWatch/MetricStream.js.map +1 -1
- package/lib/AWS/CloudWatch/PutMetricData.d.ts +1 -1
- package/lib/AWS/CloudWatch/SetAlarmState.d.ts +1 -1
- package/lib/AWS/CloudWatch/common.d.ts +2 -2
- package/lib/AWS/Credentials.d.ts.map +1 -1
- package/lib/AWS/Credentials.js +4 -1
- package/lib/AWS/Credentials.js.map +1 -1
- package/lib/AWS/DynamoDB/BatchExecuteStatement.d.ts +1 -1
- package/lib/AWS/DynamoDB/BatchGetItem.d.ts +1 -1
- package/lib/AWS/DynamoDB/BatchWriteItem.d.ts +1 -1
- package/lib/AWS/DynamoDB/DeleteItem.d.ts +1 -1
- package/lib/AWS/DynamoDB/DescribeTable.d.ts +1 -1
- package/lib/AWS/DynamoDB/DescribeTimeToLive.d.ts +1 -1
- package/lib/AWS/DynamoDB/ExecuteStatement.d.ts +1 -1
- package/lib/AWS/DynamoDB/ExecuteTransaction.d.ts +1 -1
- package/lib/AWS/DynamoDB/GetItem.d.ts +1 -1
- package/lib/AWS/DynamoDB/ListTables.d.ts +1 -1
- package/lib/AWS/DynamoDB/ListTagsOfResource.d.ts +1 -1
- package/lib/AWS/DynamoDB/PutItem.d.ts +1 -1
- package/lib/AWS/DynamoDB/Query.d.ts +1 -1
- package/lib/AWS/DynamoDB/RestoreTableToPointInTime.d.ts +1 -1
- package/lib/AWS/DynamoDB/Scan.d.ts +1 -1
- package/lib/AWS/DynamoDB/Table.d.ts +1 -1
- package/lib/AWS/DynamoDB/TransactGetItems.d.ts +1 -1
- package/lib/AWS/DynamoDB/TransactWriteItems.d.ts +1 -1
- package/lib/AWS/DynamoDB/UpdateItem.d.ts +1 -1
- package/lib/AWS/DynamoDB/UpdateTimeToLive.d.ts +1 -1
- package/lib/AWS/EC2/EIP.d.ts +2 -3
- package/lib/AWS/EC2/EIP.d.ts.map +1 -1
- package/lib/AWS/EC2/EIP.js +2 -3
- package/lib/AWS/EC2/EIP.js.map +1 -1
- package/lib/AWS/EC2/EgressOnlyInternetGateway.d.ts +2 -3
- package/lib/AWS/EC2/EgressOnlyInternetGateway.d.ts.map +1 -1
- package/lib/AWS/EC2/EgressOnlyInternetGateway.js +5 -8
- package/lib/AWS/EC2/EgressOnlyInternetGateway.js.map +1 -1
- package/lib/AWS/EC2/Image.d.ts +6 -6
- package/lib/AWS/EC2/Instance.d.ts +2 -2
- package/lib/AWS/EC2/Instance.d.ts.map +1 -1
- package/lib/AWS/EC2/Instance.js +30 -36
- package/lib/AWS/EC2/Instance.js.map +1 -1
- package/lib/AWS/EC2/InternetGateway.d.ts +2 -4
- package/lib/AWS/EC2/InternetGateway.d.ts.map +1 -1
- package/lib/AWS/EC2/InternetGateway.js +2 -4
- package/lib/AWS/EC2/InternetGateway.js.map +1 -1
- package/lib/AWS/EC2/NatGateway.d.ts +2 -3
- package/lib/AWS/EC2/NatGateway.d.ts.map +1 -1
- package/lib/AWS/EC2/NatGateway.js +6 -8
- package/lib/AWS/EC2/NatGateway.js.map +1 -1
- package/lib/AWS/EC2/Network.d.ts +2 -2
- package/lib/AWS/EC2/Network.d.ts.map +1 -1
- package/lib/AWS/EC2/Network.js +2 -2
- package/lib/AWS/EC2/Network.js.map +1 -1
- package/lib/AWS/EC2/NetworkAcl.d.ts +2 -3
- package/lib/AWS/EC2/NetworkAcl.d.ts.map +1 -1
- package/lib/AWS/EC2/NetworkAcl.js +36 -36
- package/lib/AWS/EC2/NetworkAcl.js.map +1 -1
- package/lib/AWS/EC2/NetworkAclAssociation.d.ts +1 -1
- package/lib/AWS/EC2/NetworkAclEntry.d.ts +1 -1
- package/lib/AWS/EC2/Route.d.ts +1 -1
- package/lib/AWS/EC2/RouteTable.d.ts +2 -3
- package/lib/AWS/EC2/RouteTable.d.ts.map +1 -1
- package/lib/AWS/EC2/RouteTable.js +2 -4
- package/lib/AWS/EC2/RouteTable.js.map +1 -1
- package/lib/AWS/EC2/RouteTableAssociation.d.ts +1 -1
- package/lib/AWS/EC2/SecurityGroup.d.ts +2 -3
- package/lib/AWS/EC2/SecurityGroup.d.ts.map +1 -1
- package/lib/AWS/EC2/SecurityGroup.js +40 -40
- package/lib/AWS/EC2/SecurityGroup.js.map +1 -1
- package/lib/AWS/EC2/SecurityGroupRule.d.ts +1 -1
- package/lib/AWS/EC2/Subnet.d.ts +1 -1
- package/lib/AWS/EC2/Vpc.d.ts +2 -3
- package/lib/AWS/EC2/Vpc.d.ts.map +1 -1
- package/lib/AWS/EC2/Vpc.js +1 -3
- package/lib/AWS/EC2/Vpc.js.map +1 -1
- package/lib/AWS/EC2/VpcEndpoint.d.ts +1 -2
- package/lib/AWS/EC2/VpcEndpoint.d.ts.map +1 -1
- package/lib/AWS/EC2/VpcEndpoint.js +44 -43
- package/lib/AWS/EC2/VpcEndpoint.js.map +1 -1
- package/lib/AWS/EC2/hosted.d.ts +3 -6
- package/lib/AWS/EC2/hosted.d.ts.map +1 -1
- package/lib/AWS/EC2/hosted.js +17 -18
- package/lib/AWS/EC2/hosted.js.map +1 -1
- package/lib/AWS/ECR/Repository.d.ts +1 -1
- package/lib/AWS/ECS/CapacityProvider.d.ts +1 -2
- package/lib/AWS/ECS/CapacityProvider.d.ts.map +1 -1
- package/lib/AWS/ECS/CapacityProvider.js +1 -3
- package/lib/AWS/ECS/CapacityProvider.js.map +1 -1
- package/lib/AWS/ECS/Cluster.d.ts +2 -3
- package/lib/AWS/ECS/Cluster.d.ts.map +1 -1
- package/lib/AWS/ECS/Cluster.js +1 -3
- package/lib/AWS/ECS/Cluster.js.map +1 -1
- package/lib/AWS/ECS/DescribeTasks.d.ts +1 -1
- package/lib/AWS/ECS/ListTasks.d.ts +1 -1
- package/lib/AWS/ECS/RunTask.d.ts +1 -1
- package/lib/AWS/ECS/Service.d.ts +1 -1
- package/lib/AWS/ECS/StopTask.d.ts +1 -1
- package/lib/AWS/ECS/Task.d.ts +2 -2
- package/lib/AWS/ECS/Task.d.ts.map +1 -1
- package/lib/AWS/ECS/Task.js +2 -2
- package/lib/AWS/ECS/Task.js.map +1 -1
- package/lib/AWS/EKS/AccessEntry.d.ts +1 -1
- package/lib/AWS/EKS/Addon.d.ts +1 -1
- package/lib/AWS/EKS/Cluster.d.ts +1 -1
- package/lib/AWS/EKS/Cluster.d.ts.map +1 -1
- package/lib/AWS/EKS/PodIdentityAssociation.d.ts +1 -1
- package/lib/AWS/ELBv2/Listener.d.ts +1 -1
- package/lib/AWS/ELBv2/LoadBalancer.d.ts +1 -1
- package/lib/AWS/ELBv2/TargetGroup.d.ts +1 -1
- package/lib/AWS/Endpoint.d.ts.map +1 -1
- package/lib/AWS/Endpoint.js +5 -2
- package/lib/AWS/Endpoint.js.map +1 -1
- package/lib/AWS/Environment.d.ts +6 -50
- package/lib/AWS/Environment.d.ts.map +1 -1
- package/lib/AWS/Environment.js +11 -80
- package/lib/AWS/Environment.js.map +1 -1
- package/lib/AWS/EventBridge/DescribeEventBus.d.ts +1 -1
- package/lib/AWS/EventBridge/DescribeRule.d.ts +1 -1
- package/lib/AWS/EventBridge/EventBus.d.ts +2 -3
- package/lib/AWS/EventBridge/EventBus.d.ts.map +1 -1
- package/lib/AWS/EventBridge/EventBus.js +1 -3
- package/lib/AWS/EventBridge/EventBus.js.map +1 -1
- package/lib/AWS/EventBridge/ListEventBuses.d.ts +1 -1
- package/lib/AWS/EventBridge/ListRules.d.ts +2 -3
- package/lib/AWS/EventBridge/ListRules.d.ts.map +1 -1
- package/lib/AWS/EventBridge/ListRules.js +2 -3
- package/lib/AWS/EventBridge/ListRules.js.map +1 -1
- package/lib/AWS/EventBridge/ListTargetsByRule.d.ts +1 -1
- package/lib/AWS/EventBridge/Permission.d.ts +1 -1
- package/lib/AWS/EventBridge/PutEvents.d.ts +2 -3
- package/lib/AWS/EventBridge/PutEvents.d.ts.map +1 -1
- package/lib/AWS/EventBridge/PutEvents.js +2 -3
- package/lib/AWS/EventBridge/PutEvents.js.map +1 -1
- package/lib/AWS/EventBridge/Rule.d.ts +2 -3
- package/lib/AWS/EventBridge/Rule.d.ts.map +1 -1
- package/lib/AWS/EventBridge/Rule.js +2 -3
- package/lib/AWS/EventBridge/Rule.js.map +1 -1
- package/lib/AWS/EventBridge/TestEventPattern.d.ts +1 -1
- package/lib/AWS/IAM/AccessKey.d.ts +1 -1
- package/lib/AWS/IAM/AccountAlias.d.ts +1 -1
- package/lib/AWS/IAM/AccountPasswordPolicy.d.ts +1 -1
- package/lib/AWS/IAM/Group.d.ts +1 -1
- package/lib/AWS/IAM/GroupMembership.d.ts +1 -1
- package/lib/AWS/IAM/InstanceProfile.d.ts +1 -1
- package/lib/AWS/IAM/LoginProfile.d.ts +1 -1
- package/lib/AWS/IAM/OpenIDConnectProvider.d.ts +1 -1
- package/lib/AWS/IAM/OpenIDConnectProvider.d.ts.map +1 -1
- package/lib/AWS/IAM/OpenIDConnectProvider.js +5 -4
- package/lib/AWS/IAM/OpenIDConnectProvider.js.map +1 -1
- package/lib/AWS/IAM/Policy.d.ts +1 -1
- package/lib/AWS/IAM/Policy.d.ts.map +1 -1
- package/lib/AWS/IAM/Policy.js +1 -1
- package/lib/AWS/IAM/Policy.js.map +1 -1
- package/lib/AWS/IAM/Role.d.ts +2 -2
- package/lib/AWS/IAM/Role.d.ts.map +1 -1
- package/lib/AWS/IAM/Role.js +1 -1
- package/lib/AWS/IAM/Role.js.map +1 -1
- package/lib/AWS/IAM/SAMLProvider.d.ts +2 -2
- package/lib/AWS/IAM/SAMLProvider.d.ts.map +1 -1
- package/lib/AWS/IAM/SAMLProvider.js +2 -2
- package/lib/AWS/IAM/SAMLProvider.js.map +1 -1
- package/lib/AWS/IAM/SSHPublicKey.d.ts +1 -1
- package/lib/AWS/IAM/ServerCertificate.d.ts +1 -1
- package/lib/AWS/IAM/ServiceSpecificCredential.d.ts +1 -1
- package/lib/AWS/IAM/SigningCertificate.d.ts +1 -1
- package/lib/AWS/IAM/User.d.ts +1 -1
- package/lib/AWS/IAM/VirtualMFADevice.d.ts +1 -1
- package/lib/AWS/IdentityCenter/AccountAssignment.d.ts +1 -1
- package/lib/AWS/IdentityCenter/Group.d.ts +1 -1
- package/lib/AWS/IdentityCenter/Instance.d.ts +1 -1
- package/lib/AWS/IdentityCenter/PermissionSet.d.ts +1 -1
- package/lib/AWS/IdentityCenter/common.d.ts +4 -4
- package/lib/AWS/Kinesis/DescribeAccountSettings.d.ts +1 -1
- package/lib/AWS/Kinesis/DescribeLimits.d.ts +1 -1
- package/lib/AWS/Kinesis/DescribeStream.d.ts +1 -1
- package/lib/AWS/Kinesis/DescribeStreamConsumer.d.ts +1 -1
- package/lib/AWS/Kinesis/DescribeStreamSummary.d.ts +1 -1
- package/lib/AWS/Kinesis/GetRecords.d.ts +1 -1
- package/lib/AWS/Kinesis/GetResourcePolicy.d.ts +1 -1
- package/lib/AWS/Kinesis/GetShardIterator.d.ts +1 -1
- package/lib/AWS/Kinesis/ListShards.d.ts +1 -1
- package/lib/AWS/Kinesis/ListStreamConsumers.d.ts +1 -1
- package/lib/AWS/Kinesis/ListStreams.d.ts +1 -1
- package/lib/AWS/Kinesis/ListTagsForResource.d.ts +1 -1
- package/lib/AWS/Kinesis/PutRecord.d.ts +1 -1
- package/lib/AWS/Kinesis/PutRecords.d.ts +1 -1
- package/lib/AWS/Kinesis/Stream.d.ts +2 -3
- package/lib/AWS/Kinesis/Stream.d.ts.map +1 -1
- package/lib/AWS/Kinesis/Stream.js +1 -3
- package/lib/AWS/Kinesis/Stream.js.map +1 -1
- package/lib/AWS/Kinesis/StreamConsumer.d.ts +1 -1
- package/lib/AWS/Kinesis/SubscribeToShard.d.ts +1 -1
- package/lib/AWS/Lambda/EventSourceMapping.d.ts +2 -3
- package/lib/AWS/Lambda/EventSourceMapping.d.ts.map +1 -1
- package/lib/AWS/Lambda/EventSourceMapping.js +1 -3
- package/lib/AWS/Lambda/EventSourceMapping.js.map +1 -1
- package/lib/AWS/Lambda/Function.d.ts +2 -2
- package/lib/AWS/Lambda/Function.d.ts.map +1 -1
- package/lib/AWS/Lambda/Function.js +9 -7
- package/lib/AWS/Lambda/Function.js.map +1 -1
- package/lib/AWS/Lambda/InvokeFunction.d.ts +1 -1
- package/lib/AWS/Lambda/Permission.d.ts +2 -2
- package/lib/AWS/Lambda/Permission.js +1 -1
- package/lib/AWS/Logs/LogGroup.d.ts +2 -3
- package/lib/AWS/Logs/LogGroup.d.ts.map +1 -1
- package/lib/AWS/Logs/LogGroup.js +1 -3
- package/lib/AWS/Logs/LogGroup.js.map +1 -1
- package/lib/AWS/Organizations/Account.d.ts +1 -1
- package/lib/AWS/Organizations/DelegatedAdministrator.d.ts +1 -1
- package/lib/AWS/Organizations/Organization.d.ts +1 -1
- package/lib/AWS/Organizations/OrganizationResourcePolicy.d.ts +1 -1
- package/lib/AWS/Organizations/OrganizationalUnit.d.ts +1 -1
- package/lib/AWS/Organizations/Policy.d.ts +1 -1
- package/lib/AWS/Organizations/PolicyAttachment.d.ts +1 -1
- package/lib/AWS/Organizations/Root.d.ts +1 -1
- package/lib/AWS/Organizations/RootPolicyType.d.ts +1 -1
- package/lib/AWS/Organizations/TrustedServiceAccess.d.ts +1 -1
- package/lib/AWS/Organizations/common.d.ts +2 -2
- package/lib/AWS/Providers.d.ts +3 -2
- package/lib/AWS/Providers.d.ts.map +1 -1
- package/lib/AWS/Providers.js +2 -2
- package/lib/AWS/Providers.js.map +1 -1
- package/lib/AWS/RDS/Connect.d.ts +1 -1
- package/lib/AWS/RDS/DBCluster.d.ts +1 -1
- package/lib/AWS/RDS/DBClusterEndpoint.d.ts +1 -1
- package/lib/AWS/RDS/DBClusterParameterGroup.d.ts +1 -1
- package/lib/AWS/RDS/DBInstance.d.ts +1 -1
- package/lib/AWS/RDS/DBParameterGroup.d.ts +1 -1
- package/lib/AWS/RDS/DBProxy.d.ts +1 -1
- package/lib/AWS/RDS/DBProxyEndpoint.d.ts +1 -1
- package/lib/AWS/RDS/DBProxyTargetGroup.d.ts +1 -1
- package/lib/AWS/RDS/DBSubnetGroup.d.ts +1 -1
- package/lib/AWS/RDSData/BatchExecuteStatement.d.ts +1 -1
- package/lib/AWS/RDSData/BeginTransaction.d.ts +1 -1
- package/lib/AWS/RDSData/CommitTransaction.d.ts +1 -1
- package/lib/AWS/RDSData/ExecuteSql.d.ts +1 -1
- package/lib/AWS/RDSData/ExecuteStatement.d.ts +1 -1
- package/lib/AWS/RDSData/RollbackTransaction.d.ts +1 -1
- package/lib/AWS/Region.d.ts +2 -0
- package/lib/AWS/Region.d.ts.map +1 -1
- package/lib/AWS/Region.js +8 -3
- package/lib/AWS/Region.js.map +1 -1
- package/lib/AWS/Route53/Record.d.ts +1 -1
- package/lib/AWS/S3/AbortMultipartUpload.d.ts +1 -1
- package/lib/AWS/S3/Bucket.d.ts +6 -3
- package/lib/AWS/S3/Bucket.d.ts.map +1 -1
- package/lib/AWS/S3/Bucket.js +3 -4
- package/lib/AWS/S3/Bucket.js.map +1 -1
- package/lib/AWS/S3/CompleteMultipartUpload.d.ts +1 -1
- package/lib/AWS/S3/CopyObject.d.ts +1 -1
- package/lib/AWS/S3/CreateMultipartUpload.d.ts +1 -1
- package/lib/AWS/S3/DeleteObject.d.ts +1 -1
- package/lib/AWS/S3/GetObject.d.ts +1 -1
- package/lib/AWS/S3/HeadObject.d.ts +1 -1
- package/lib/AWS/S3/ListObjectsV2.d.ts +1 -1
- package/lib/AWS/S3/PutObject.d.ts +1 -1
- package/lib/AWS/S3/UploadPart.d.ts +1 -1
- package/lib/AWS/SNS/AddPermission.d.ts +1 -1
- package/lib/AWS/SNS/ConfirmSubscription.d.ts +1 -1
- package/lib/AWS/SNS/GetDataProtectionPolicy.d.ts +1 -1
- package/lib/AWS/SNS/GetSubscriptionAttributes.d.ts +1 -1
- package/lib/AWS/SNS/GetTopicAttributes.d.ts +1 -1
- package/lib/AWS/SNS/ListSubscriptions.d.ts +1 -1
- package/lib/AWS/SNS/ListSubscriptionsByTopic.d.ts +1 -1
- package/lib/AWS/SNS/ListTagsForResource.d.ts +1 -1
- package/lib/AWS/SNS/ListTopics.d.ts +1 -1
- package/lib/AWS/SNS/Publish.d.ts +1 -1
- package/lib/AWS/SNS/PublishBatch.d.ts +1 -1
- package/lib/AWS/SNS/PutDataProtectionPolicy.d.ts +1 -1
- package/lib/AWS/SNS/RemovePermission.d.ts +1 -1
- package/lib/AWS/SNS/SetSubscriptionAttributes.d.ts +1 -1
- package/lib/AWS/SNS/SetTopicAttributes.d.ts +1 -1
- package/lib/AWS/SNS/Subscription.d.ts +1 -1
- package/lib/AWS/SNS/TagResource.d.ts +1 -1
- package/lib/AWS/SNS/Topic.d.ts +1 -1
- package/lib/AWS/SNS/UntagResource.d.ts +1 -1
- package/lib/AWS/SQS/DeleteMessage.d.ts +1 -1
- package/lib/AWS/SQS/DeleteMessageBatch.d.ts +1 -1
- package/lib/AWS/SQS/Queue.d.ts +1 -2
- package/lib/AWS/SQS/Queue.d.ts.map +1 -1
- package/lib/AWS/SQS/Queue.js +2 -3
- package/lib/AWS/SQS/Queue.js.map +1 -1
- package/lib/AWS/SQS/ReceiveMessage.d.ts +1 -1
- package/lib/AWS/SQS/SendMessage.d.ts +1 -1
- package/lib/AWS/SQS/SendMessageBatch.d.ts +1 -1
- package/lib/AWS/Scheduler/Schedule.d.ts +1 -1
- package/lib/AWS/Scheduler/ScheduleGroup.d.ts +1 -1
- package/lib/AWS/SecretsManager/DescribeSecret.d.ts +1 -1
- package/lib/AWS/SecretsManager/GetRandomPassword.d.ts +1 -1
- package/lib/AWS/SecretsManager/GetSecretValue.d.ts +1 -1
- package/lib/AWS/SecretsManager/ListSecrets.d.ts +1 -1
- package/lib/AWS/SecretsManager/PutSecretValue.d.ts +1 -1
- package/lib/AWS/SecretsManager/Secret.d.ts +1 -1
- package/lib/AWS/Website/AssetDeployment.d.ts +1 -1
- package/lib/AWS/index.d.ts +0 -1
- package/lib/AWS/index.d.ts.map +1 -1
- package/lib/AWS/index.js +0 -1
- package/lib/AWS/index.js.map +1 -1
- package/lib/Apply.js +15 -3
- package/lib/Apply.js.map +1 -1
- package/lib/Auth/AuthProvider.js +1 -1
- package/lib/Auth/AuthProvider.js.map +1 -1
- package/lib/Auth/Profile.d.ts +10 -10
- package/lib/Auth/Profile.d.ts.map +1 -1
- package/lib/Auth/Profile.js +4 -4
- package/lib/Auth/Profile.js.map +1 -1
- package/lib/Axiom/Credentials.d.ts +2 -3
- package/lib/Axiom/Credentials.d.ts.map +1 -1
- package/lib/Axiom/Credentials.js +3 -3
- package/lib/Axiom/Credentials.js.map +1 -1
- package/lib/Axiom/Dataset.js +1 -1
- package/lib/Axiom/Dataset.js.map +1 -1
- package/lib/Axiom/Providers.d.ts +1 -1
- package/lib/Axiom/Providers.d.ts.map +1 -1
- package/lib/Axiom/Providers.js +1 -1
- package/lib/Axiom/Providers.js.map +1 -1
- package/lib/Binding.d.ts +2 -2
- package/lib/Binding.d.ts.map +1 -1
- package/lib/Binding.js +12 -8
- package/lib/Binding.js.map +1 -1
- package/lib/Build/DevServer.d.ts +113 -0
- package/lib/Build/DevServer.d.ts.map +1 -0
- package/lib/Build/DevServer.js +212 -0
- package/lib/Build/DevServer.js.map +1 -0
- package/lib/Build/Local.d.ts +2 -0
- package/lib/Build/Local.d.ts.map +1 -0
- package/lib/Build/Local.js +4 -0
- package/lib/Build/Local.js.map +1 -0
- package/lib/Bundle/Bundle.js +1 -1
- package/lib/Bundle/Bundle.js.map +1 -1
- package/lib/Cli/commands/_shared.d.ts +3 -3
- package/lib/Cli/commands/_shared.d.ts.map +1 -1
- package/lib/Cli/commands/_shared.js.map +1 -1
- package/lib/Cli/commands/aws.d.ts +1 -1
- package/lib/Cli/commands/aws.d.ts.map +1 -1
- package/lib/Cli/commands/aws.js +3 -3
- package/lib/Cli/commands/aws.js.map +1 -1
- package/lib/Cli/commands/cloudflare.js +1 -1
- package/lib/Cli/commands/cloudflare.js.map +1 -1
- package/lib/Cli/commands/deploy.d.ts +4 -4
- package/lib/Cli/commands/deploy.d.ts.map +1 -1
- package/lib/Cli/commands/login.d.ts +2 -3
- package/lib/Cli/commands/login.d.ts.map +1 -1
- package/lib/Cli/commands/login.js +6 -15
- package/lib/Cli/commands/login.js.map +1 -1
- package/lib/Cli/commands/logs.d.ts +1 -1
- package/lib/Cli/commands/logs.d.ts.map +1 -1
- package/lib/Cli/commands/profile.js +3 -3
- package/lib/Cli/commands/profile.js.map +1 -1
- package/lib/Cli/commands/tail.d.ts +1 -1
- package/lib/Cli/commands/tail.d.ts.map +1 -1
- package/lib/Cloudflare/Access.js +1 -1
- package/lib/Cloudflare/Access.js.map +1 -1
- package/lib/Cloudflare/AiGateway/AiGateway.d.ts +1 -1
- package/lib/Cloudflare/AiGateway/AiGateway.d.ts.map +1 -1
- package/lib/Cloudflare/AiGateway/AiGateway.js +186 -181
- package/lib/Cloudflare/AiGateway/AiGateway.js.map +1 -1
- package/lib/Cloudflare/ApiToken/AccountApiToken.d.ts.map +1 -1
- package/lib/Cloudflare/ApiToken/AccountApiToken.js +103 -102
- package/lib/Cloudflare/ApiToken/AccountApiToken.js.map +1 -1
- package/lib/Cloudflare/ApiToken/UserApiToken.d.ts.map +1 -1
- package/lib/Cloudflare/ApiToken/UserApiToken.js +77 -81
- package/lib/Cloudflare/ApiToken/UserApiToken.js.map +1 -1
- package/lib/Cloudflare/Browser/Browser.d.ts +84 -12
- package/lib/Cloudflare/Browser/Browser.d.ts.map +1 -1
- package/lib/Cloudflare/Browser/Browser.js +80 -9
- package/lib/Cloudflare/Browser/Browser.js.map +1 -1
- package/lib/Cloudflare/Browser/BrowserBinding.d.ts +90 -16
- package/lib/Cloudflare/Browser/BrowserBinding.d.ts.map +1 -1
- package/lib/Cloudflare/Browser/BrowserBinding.js +41 -6
- package/lib/Cloudflare/Browser/BrowserBinding.js.map +1 -1
- package/lib/Cloudflare/Browser/index.d.ts +1 -1
- package/lib/Cloudflare/Browser/index.d.ts.map +1 -1
- package/lib/Cloudflare/Browser/index.js.map +1 -1
- package/lib/Cloudflare/CloudflareEnvironment.d.ts +4 -3
- package/lib/Cloudflare/CloudflareEnvironment.d.ts.map +1 -1
- package/lib/Cloudflare/CloudflareEnvironment.js +3 -4
- package/lib/Cloudflare/CloudflareEnvironment.js.map +1 -1
- package/lib/Cloudflare/Container/ContainerApplication.d.ts.map +1 -1
- package/lib/Cloudflare/Container/ContainerApplication.js +18 -18
- package/lib/Cloudflare/Container/ContainerApplication.js.map +1 -1
- package/lib/Cloudflare/Container/ContainerBinding.d.ts.map +1 -1
- package/lib/Cloudflare/Container/ContainerBinding.js +2 -4
- package/lib/Cloudflare/Container/ContainerBinding.js.map +1 -1
- package/lib/Cloudflare/Credentials.d.ts +2 -2
- package/lib/Cloudflare/Credentials.d.ts.map +1 -1
- package/lib/Cloudflare/Credentials.js +2 -2
- package/lib/Cloudflare/Credentials.js.map +1 -1
- package/lib/Cloudflare/D1/D1Database.d.ts +3 -1
- package/lib/Cloudflare/D1/D1Database.d.ts.map +1 -1
- package/lib/Cloudflare/D1/D1Database.js +205 -201
- package/lib/Cloudflare/D1/D1Database.js.map +1 -1
- package/lib/Cloudflare/EdgeSession.d.ts.map +1 -1
- package/lib/Cloudflare/EdgeSession.js +6 -5
- package/lib/Cloudflare/EdgeSession.js.map +1 -1
- package/lib/Cloudflare/Email/EmailAddress.d.ts.map +1 -1
- package/lib/Cloudflare/Email/EmailAddress.js +69 -61
- package/lib/Cloudflare/Email/EmailAddress.js.map +1 -1
- package/lib/Cloudflare/Email/EmailRouting.d.ts.map +1 -1
- package/lib/Cloudflare/Email/EmailRouting.js +63 -56
- package/lib/Cloudflare/Email/EmailRouting.js.map +1 -1
- package/lib/Cloudflare/Email/EmailRule.d.ts.map +1 -1
- package/lib/Cloudflare/Email/EmailRule.js +67 -63
- package/lib/Cloudflare/Email/EmailRule.js.map +1 -1
- package/lib/Cloudflare/Hyperdrive/Hyperdrive.d.ts.map +1 -1
- package/lib/Cloudflare/Hyperdrive/Hyperdrive.js +139 -137
- package/lib/Cloudflare/Hyperdrive/Hyperdrive.js.map +1 -1
- package/lib/Cloudflare/Images/Images.d.ts +4 -3
- package/lib/Cloudflare/Images/Images.d.ts.map +1 -1
- package/lib/Cloudflare/Images/Images.js.map +1 -1
- package/lib/Cloudflare/KV/KVNamespace.d.ts.map +1 -1
- package/lib/Cloudflare/KV/KVNamespace.js +115 -108
- package/lib/Cloudflare/KV/KVNamespace.js.map +1 -1
- package/lib/Cloudflare/Providers.d.ts +1 -1
- package/lib/Cloudflare/Providers.d.ts.map +1 -1
- package/lib/Cloudflare/Providers.js +4 -1
- package/lib/Cloudflare/Providers.js.map +1 -1
- package/lib/Cloudflare/Queue/Queue.d.ts.map +1 -1
- package/lib/Cloudflare/Queue/Queue.js +109 -101
- package/lib/Cloudflare/Queue/Queue.js.map +1 -1
- package/lib/Cloudflare/Queue/QueueConsumer.d.ts.map +1 -1
- package/lib/Cloudflare/Queue/QueueConsumer.js +260 -250
- package/lib/Cloudflare/Queue/QueueConsumer.js.map +1 -1
- package/lib/Cloudflare/R2/R2Bucket.d.ts.map +1 -1
- package/lib/Cloudflare/R2/R2Bucket.js +101 -66
- package/lib/Cloudflare/R2/R2Bucket.js.map +1 -1
- package/lib/Cloudflare/RateLimit/RateLimit.d.ts +4 -3
- package/lib/Cloudflare/RateLimit/RateLimit.d.ts.map +1 -1
- package/lib/Cloudflare/RateLimit/RateLimit.js.map +1 -1
- package/lib/Cloudflare/Ruleset/Ruleset.d.ts.map +1 -1
- package/lib/Cloudflare/Ruleset/Ruleset.js +81 -81
- package/lib/Cloudflare/Ruleset/Ruleset.js.map +1 -1
- package/lib/Cloudflare/SecretsStore/Secret.d.ts.map +1 -1
- package/lib/Cloudflare/SecretsStore/Secret.js +144 -143
- package/lib/Cloudflare/SecretsStore/Secret.js.map +1 -1
- package/lib/Cloudflare/SecretsStore/SecretsStore.d.ts.map +1 -1
- package/lib/Cloudflare/SecretsStore/SecretsStore.js +74 -75
- package/lib/Cloudflare/SecretsStore/SecretsStore.js.map +1 -1
- package/lib/Cloudflare/StateStore/State.d.ts +1 -1
- package/lib/Cloudflare/StateStore/State.d.ts.map +1 -1
- package/lib/Cloudflare/StateStore/State.js +3 -3
- package/lib/Cloudflare/StateStore/State.js.map +1 -1
- package/lib/Cloudflare/Tunnel/Tunnel.d.ts.map +1 -1
- package/lib/Cloudflare/Tunnel/Tunnel.js +166 -158
- package/lib/Cloudflare/Tunnel/Tunnel.js.map +1 -1
- package/lib/Cloudflare/Tunnel/TunnelBinding.d.ts +2 -2
- package/lib/Cloudflare/Tunnel/TunnelBinding.d.ts.map +1 -1
- package/lib/Cloudflare/Tunnel/TunnelBinding.js +10 -11
- package/lib/Cloudflare/Tunnel/TunnelBinding.js.map +1 -1
- package/lib/Cloudflare/Tunnel/TunnelRead.d.ts +4 -3
- package/lib/Cloudflare/Tunnel/TunnelRead.d.ts.map +1 -1
- package/lib/Cloudflare/Tunnel/TunnelRead.js.map +1 -1
- package/lib/Cloudflare/Tunnel/TunnelReadWrite.d.ts +4 -3
- package/lib/Cloudflare/Tunnel/TunnelReadWrite.d.ts.map +1 -1
- package/lib/Cloudflare/Tunnel/TunnelReadWrite.js.map +1 -1
- package/lib/Cloudflare/Tunnel/TunnelWrite.d.ts +4 -3
- package/lib/Cloudflare/Tunnel/TunnelWrite.d.ts.map +1 -1
- package/lib/Cloudflare/Tunnel/TunnelWrite.js.map +1 -1
- package/lib/Cloudflare/Vectorize/VectorizeIndex.d.ts.map +1 -1
- package/lib/Cloudflare/Vectorize/VectorizeIndex.js +79 -75
- package/lib/Cloudflare/Vectorize/VectorizeIndex.js.map +1 -1
- package/lib/Cloudflare/Vectorize/VectorizeMetadataIndex.d.ts.map +1 -1
- package/lib/Cloudflare/Vectorize/VectorizeMetadataIndex.js +85 -82
- package/lib/Cloudflare/Vectorize/VectorizeMetadataIndex.js.map +1 -1
- package/lib/Cloudflare/VpcService/VpcService.d.ts.map +1 -1
- package/lib/Cloudflare/VpcService/VpcService.js +112 -106
- package/lib/Cloudflare/VpcService/VpcService.js.map +1 -1
- package/lib/Cloudflare/VpcService/VpcServiceRef.js +1 -1
- package/lib/Cloudflare/VpcService/VpcServiceRef.js.map +1 -1
- package/lib/Cloudflare/Website/StaticSite.d.ts +64 -12
- package/lib/Cloudflare/Website/StaticSite.d.ts.map +1 -1
- package/lib/Cloudflare/Website/StaticSite.js +80 -30
- package/lib/Cloudflare/Website/StaticSite.js.map +1 -1
- package/lib/Cloudflare/Website/Vite.d.ts +36 -7
- package/lib/Cloudflare/Website/Vite.d.ts.map +1 -1
- package/lib/Cloudflare/Website/Vite.js +26 -8
- package/lib/Cloudflare/Website/Vite.js.map +1 -1
- package/lib/Cloudflare/Workers/Assets.d.ts +10 -4
- package/lib/Cloudflare/Workers/Assets.d.ts.map +1 -1
- package/lib/Cloudflare/Workers/Assets.js +8 -8
- package/lib/Cloudflare/Workers/Assets.js.map +1 -1
- package/lib/Cloudflare/Workers/DynamicWorkerLoader.d.ts +4 -4
- package/lib/Cloudflare/Workers/InferEnv.d.ts +1 -1
- package/lib/Cloudflare/Workers/InferEnv.d.ts.map +1 -1
- package/lib/Cloudflare/Workers/LocalWorkerProvider.d.ts +1 -1
- package/lib/Cloudflare/Workers/LocalWorkerProvider.d.ts.map +1 -1
- package/lib/Cloudflare/Workers/LocalWorkerProvider.js +48 -13
- package/lib/Cloudflare/Workers/LocalWorkerProvider.js.map +1 -1
- package/lib/Cloudflare/Workers/RpcDurableObjectNamespace.d.ts +5 -4
- package/lib/Cloudflare/Workers/RpcDurableObjectNamespace.d.ts.map +1 -1
- package/lib/Cloudflare/Workers/RpcDurableObjectNamespace.js +4 -2
- package/lib/Cloudflare/Workers/RpcDurableObjectNamespace.js.map +1 -1
- package/lib/Cloudflare/Workers/RpcWorker.d.ts +3 -2
- package/lib/Cloudflare/Workers/RpcWorker.d.ts.map +1 -1
- package/lib/Cloudflare/Workers/RpcWorker.js +5 -3
- package/lib/Cloudflare/Workers/RpcWorker.js.map +1 -1
- package/lib/Cloudflare/Workers/VersionMetadata.d.ts +99 -0
- package/lib/Cloudflare/Workers/VersionMetadata.d.ts.map +1 -0
- package/lib/Cloudflare/Workers/VersionMetadata.js +65 -0
- package/lib/Cloudflare/Workers/VersionMetadata.js.map +1 -0
- package/lib/Cloudflare/Workers/VersionMetadataBinding.d.ts +35 -0
- package/lib/Cloudflare/Workers/VersionMetadataBinding.d.ts.map +1 -0
- package/lib/Cloudflare/Workers/VersionMetadataBinding.js +31 -0
- package/lib/Cloudflare/Workers/VersionMetadataBinding.js.map +1 -0
- package/lib/Cloudflare/Workers/Worker.d.ts +19 -19
- package/lib/Cloudflare/Workers/Worker.d.ts.map +1 -1
- package/lib/Cloudflare/Workers/Worker.js +134 -98
- package/lib/Cloudflare/Workers/Worker.js.map +1 -1
- package/lib/Cloudflare/Workers/WorkerAsyncBindings.d.ts.map +1 -1
- package/lib/Cloudflare/Workers/WorkerAsyncBindings.js +9 -14
- package/lib/Cloudflare/Workers/WorkerAsyncBindings.js.map +1 -1
- package/lib/Cloudflare/Workers/WorkerBinding.d.ts +2 -1
- package/lib/Cloudflare/Workers/WorkerBinding.d.ts.map +1 -1
- package/lib/Cloudflare/Workers/WorkerBinding.js.map +1 -1
- package/lib/Cloudflare/Workers/Workflow.d.ts +8 -1
- package/lib/Cloudflare/Workers/Workflow.d.ts.map +1 -1
- package/lib/Cloudflare/Workers/Workflow.js +7 -6
- package/lib/Cloudflare/Workers/Workflow.js.map +1 -1
- package/lib/Cloudflare/Workers/WorkflowBridge.d.ts.map +1 -1
- package/lib/Cloudflare/Workers/WorkflowBridge.js +31 -2
- package/lib/Cloudflare/Workers/WorkflowBridge.js.map +1 -1
- package/lib/Cloudflare/Workers/index.d.ts +2 -0
- package/lib/Cloudflare/Workers/index.d.ts.map +1 -1
- package/lib/Cloudflare/Workers/index.js +2 -0
- package/lib/Cloudflare/Workers/index.js.map +1 -1
- package/lib/Cloudflare/Zaraz/ZarazConfig.d.ts.map +1 -1
- package/lib/Cloudflare/Zaraz/ZarazConfig.js +68 -75
- package/lib/Cloudflare/Zaraz/ZarazConfig.js.map +1 -1
- package/lib/Cloudflare/Zone/Zone.d.ts.map +1 -1
- package/lib/Cloudflare/Zone/Zone.js +18 -13
- package/lib/Cloudflare/Zone/Zone.js.map +1 -1
- package/lib/Diff.d.ts.map +1 -1
- package/lib/Diff.js +7 -0
- package/lib/Diff.js.map +1 -1
- package/lib/Drizzle/Postgres.d.ts +13 -12
- package/lib/Drizzle/Postgres.d.ts.map +1 -1
- package/lib/Drizzle/Postgres.js +13 -12
- package/lib/Drizzle/Postgres.js.map +1 -1
- package/lib/Drizzle/Schema.d.ts +1 -1
- package/lib/Drizzle/Schema.d.ts.map +1 -1
- package/lib/Drizzle/Schema.js +14 -6
- package/lib/Drizzle/Schema.js.map +1 -1
- package/lib/GitHub/Comment.d.ts +1 -6
- package/lib/GitHub/Comment.d.ts.map +1 -1
- package/lib/GitHub/Comment.js +3 -9
- package/lib/GitHub/Comment.js.map +1 -1
- package/lib/GitHub/Credentials.d.ts +4 -3
- package/lib/GitHub/Credentials.d.ts.map +1 -1
- package/lib/GitHub/Credentials.js +5 -5
- package/lib/GitHub/Credentials.js.map +1 -1
- package/lib/GitHub/Octokit.d.ts +5 -0
- package/lib/GitHub/Octokit.d.ts.map +1 -0
- package/lib/GitHub/Octokit.js +7 -0
- package/lib/GitHub/Octokit.js.map +1 -0
- package/lib/GitHub/Providers.d.ts +1 -1
- package/lib/GitHub/Providers.d.ts.map +1 -1
- package/lib/GitHub/Secret.d.ts +1 -2
- package/lib/GitHub/Secret.d.ts.map +1 -1
- package/lib/GitHub/Secret.js +8 -12
- package/lib/GitHub/Secret.js.map +1 -1
- package/lib/GitHub/Variable.d.ts +1 -2
- package/lib/GitHub/Variable.d.ts.map +1 -1
- package/lib/GitHub/Variable.js +3 -7
- package/lib/GitHub/Variable.js.map +1 -1
- package/lib/Kubernetes/client.d.ts +11 -11
- package/lib/Kubernetes/client.d.ts.map +1 -1
- package/lib/Kubernetes/client.js +2 -2
- package/lib/Kubernetes/client.js.map +1 -1
- package/lib/Local/RpcSerialization.js +5 -2
- package/lib/Local/RpcSerialization.js.map +1 -1
- package/lib/Local/RpcServerEnvironment.d.ts +2 -2
- package/lib/Local/RpcServerEnvironment.d.ts.map +1 -1
- package/lib/Neon/AuthProvider.d.ts +2 -2
- package/lib/Neon/AuthProvider.d.ts.map +1 -1
- package/lib/Neon/AuthProvider.js +2 -2
- package/lib/Neon/AuthProvider.js.map +1 -1
- package/lib/Neon/Branch.d.ts.map +1 -1
- package/lib/Neon/Branch.js +213 -215
- package/lib/Neon/Branch.js.map +1 -1
- package/lib/Neon/Credentials.d.ts +2 -3
- package/lib/Neon/Credentials.d.ts.map +1 -1
- package/lib/Neon/Credentials.js +3 -3
- package/lib/Neon/Credentials.js.map +1 -1
- package/lib/Neon/Project.d.ts +22 -22
- package/lib/Neon/Project.d.ts.map +1 -1
- package/lib/Neon/Project.js +263 -266
- package/lib/Neon/Project.js.map +1 -1
- package/lib/Neon/Providers.d.ts +2 -4
- package/lib/Neon/Providers.d.ts.map +1 -1
- package/lib/Neon/Providers.js +1 -3
- package/lib/Neon/Providers.js.map +1 -1
- package/lib/Neon/index.d.ts +0 -1
- package/lib/Neon/index.d.ts.map +1 -1
- package/lib/Neon/index.js +0 -1
- package/lib/Neon/index.js.map +1 -1
- package/lib/Output.d.ts +2 -1
- package/lib/Output.d.ts.map +1 -1
- package/lib/Output.js +7 -3
- package/lib/Output.js.map +1 -1
- package/lib/Plan.d.ts.map +1 -1
- package/lib/Plan.js +14 -6
- package/lib/Plan.js.map +1 -1
- package/lib/Planetscale/Branch.d.ts +1 -2
- package/lib/Planetscale/Branch.d.ts.map +1 -1
- package/lib/Planetscale/Branch.js +230 -235
- package/lib/Planetscale/Branch.js.map +1 -1
- package/lib/Planetscale/Credentials.d.ts +2 -3
- package/lib/Planetscale/Credentials.d.ts.map +1 -1
- package/lib/Planetscale/Credentials.js +6 -6
- package/lib/Planetscale/Credentials.js.map +1 -1
- package/lib/Planetscale/MySQL/MySQLBranch.d.ts +1 -1
- package/lib/Planetscale/MySQL/MySQLBranch.d.ts.map +1 -1
- package/lib/Planetscale/MySQL/MySQLClusterSize.d.ts +2 -2
- package/lib/Planetscale/MySQL/MySQLClusterSize.d.ts.map +1 -1
- package/lib/Planetscale/MySQL/MySQLDatabase.d.ts +1 -1
- package/lib/Planetscale/MySQL/MySQLDatabase.d.ts.map +1 -1
- package/lib/Planetscale/MySQL/MySQLDatabase.js +215 -215
- package/lib/Planetscale/MySQL/MySQLDatabase.js.map +1 -1
- package/lib/Planetscale/MySQL/MySQLMigrations.d.ts +2 -2
- package/lib/Planetscale/MySQL/MySQLMigrations.d.ts.map +1 -1
- package/lib/Planetscale/MySQL/MySQLPassword.d.ts.map +1 -1
- package/lib/Planetscale/MySQL/MySQLPassword.js +145 -145
- package/lib/Planetscale/MySQL/MySQLPassword.js.map +1 -1
- package/lib/Planetscale/Postgres/PostgresBranch.d.ts +1 -1
- package/lib/Planetscale/Postgres/PostgresBranch.d.ts.map +1 -1
- package/lib/Planetscale/Postgres/PostgresClusterSize.d.ts +3 -2
- package/lib/Planetscale/Postgres/PostgresClusterSize.d.ts.map +1 -1
- package/lib/Planetscale/Postgres/PostgresClusterSize.js +4 -4
- package/lib/Planetscale/Postgres/PostgresClusterSize.js.map +1 -1
- package/lib/Planetscale/Postgres/PostgresDatabase.d.ts +1 -1
- package/lib/Planetscale/Postgres/PostgresDatabase.d.ts.map +1 -1
- package/lib/Planetscale/Postgres/PostgresDatabase.js +220 -218
- package/lib/Planetscale/Postgres/PostgresDatabase.js.map +1 -1
- package/lib/Planetscale/Postgres/PostgresDefaultRole.d.ts.map +1 -1
- package/lib/Planetscale/Postgres/PostgresDefaultRole.js +123 -121
- package/lib/Planetscale/Postgres/PostgresDefaultRole.js.map +1 -1
- package/lib/Planetscale/Postgres/PostgresMigrations.d.ts +2 -2
- package/lib/Planetscale/Postgres/PostgresMigrations.d.ts.map +1 -1
- package/lib/Planetscale/Postgres/PostgresRole.d.ts.map +1 -1
- package/lib/Planetscale/Postgres/PostgresRole.js +159 -160
- package/lib/Planetscale/Postgres/PostgresRole.js.map +1 -1
- package/lib/Planetscale/Providers.d.ts +1 -2
- package/lib/Planetscale/Providers.d.ts.map +1 -1
- package/lib/Planetscale/Providers.js.map +1 -1
- package/lib/Planetscale/Util.d.ts +2 -2
- package/lib/Planetscale/Util.d.ts.map +1 -1
- package/lib/Platform.d.ts.map +1 -1
- package/lib/Platform.js +27 -25
- package/lib/Platform.js.map +1 -1
- package/lib/Resource.d.ts +1 -1
- package/lib/Resource.d.ts.map +1 -1
- package/lib/Resource.js +9 -12
- package/lib/Resource.js.map +1 -1
- package/lib/Runtime.d.ts +1 -1
- package/lib/Runtime.d.ts.map +1 -1
- package/lib/Runtime.js +3 -4
- package/lib/Runtime.js.map +1 -1
- package/lib/Server/S3BucketEventSource.d.ts +1 -1
- package/lib/Server/S3BucketEventSource.d.ts.map +1 -1
- package/lib/Server/SQSQueueEventSource.d.ts +2 -2
- package/lib/Server/SQSQueueEventSource.d.ts.map +1 -1
- package/lib/Server/SQSQueueEventSource.js +3 -2
- package/lib/Server/SQSQueueEventSource.js.map +1 -1
- package/lib/Stack.d.ts +4 -4
- package/lib/Stack.d.ts.map +1 -1
- package/lib/Stack.js +1 -1
- package/lib/Stack.js.map +1 -1
- package/lib/Util/effect.d.ts.map +1 -1
- package/lib/Util/effect.js +13 -15
- package/lib/Util/effect.js.map +1 -1
- package/lib/Util/poll.d.ts +0 -1
- package/lib/Util/poll.d.ts.map +1 -1
- package/lib/Util/poll.js +2 -2
- package/lib/Util/poll.js.map +1 -1
- package/lib/tsconfig.test.tsbuildinfo +1 -1
- package/package.json +22 -21
- package/src/AWS/ApiGateway/ApiKey.ts +4 -5
- package/src/AWS/ApiGateway/RestApi.ts +5 -6
- package/src/AWS/ApiGateway/Stage.ts +4 -5
- package/src/AWS/ApiGateway/UsagePlan.ts +4 -5
- package/src/AWS/ApiGateway/VpcLink.ts +4 -6
- package/src/AWS/Assets.ts +161 -108
- package/src/AWS/AuthProvider.ts +221 -124
- package/src/AWS/AutoScaling/LaunchTemplate.ts +31 -32
- package/src/AWS/Bootstrap.ts +66 -195
- package/src/AWS/CloudWatch/Alarm.ts +9 -8
- package/src/AWS/CloudWatch/AlarmMuteRule.ts +8 -7
- package/src/AWS/CloudWatch/CompositeAlarm.ts +9 -8
- package/src/AWS/CloudWatch/Dashboard.ts +9 -6
- package/src/AWS/CloudWatch/InsightRule.ts +10 -9
- package/src/AWS/CloudWatch/MetricStream.ts +9 -7
- package/src/AWS/Credentials.ts +4 -1
- package/src/AWS/EC2/EIP.ts +5 -5
- package/src/AWS/EC2/EgressOnlyInternetGateway.ts +20 -17
- package/src/AWS/EC2/Instance.ts +42 -41
- package/src/AWS/EC2/InternetGateway.ts +4 -8
- package/src/AWS/EC2/NatGateway.ts +10 -11
- package/src/AWS/EC2/Network.ts +2 -2
- package/src/AWS/EC2/NetworkAcl.ts +38 -39
- package/src/AWS/EC2/RouteTable.ts +3 -6
- package/src/AWS/EC2/SecurityGroup.ts +43 -44
- package/src/AWS/EC2/Vpc.ts +2 -5
- package/src/AWS/EC2/VpcEndpoint.ts +47 -47
- package/src/AWS/EC2/hosted.ts +19 -33
- package/src/AWS/ECS/CapacityProvider.ts +1 -3
- package/src/AWS/ECS/Cluster.ts +2 -5
- package/src/AWS/ECS/Task.ts +4 -3
- package/src/AWS/Endpoint.ts +12 -6
- package/src/AWS/Environment.ts +22 -120
- package/src/AWS/EventBridge/EventBus.ts +2 -5
- package/src/AWS/EventBridge/ListRules.ts +2 -5
- package/src/AWS/EventBridge/PutEvents.ts +2 -3
- package/src/AWS/EventBridge/Rule.ts +3 -5
- package/src/AWS/IAM/OpenIDConnectProvider.ts +10 -4
- package/src/AWS/IAM/Policy.ts +1 -2
- package/src/AWS/IAM/Role.ts +2 -2
- package/src/AWS/IAM/SAMLProvider.ts +3 -3
- package/src/AWS/Kinesis/Stream.ts +2 -5
- package/src/AWS/Lambda/EventSourceMapping.ts +2 -5
- package/src/AWS/Lambda/Function.ts +10 -8
- package/src/AWS/Lambda/Permission.ts +1 -1
- package/src/AWS/Logs/LogGroup.ts +2 -5
- package/src/AWS/Providers.ts +2 -2
- package/src/AWS/Region.ts +15 -3
- package/src/AWS/S3/Bucket.ts +15 -15
- package/src/AWS/SQS/Queue.ts +2 -3
- package/src/AWS/index.ts +0 -1
- package/src/Apply.ts +22 -3
- package/src/Auth/AuthProvider.ts +1 -1
- package/src/Auth/Profile.ts +13 -12
- package/src/Axiom/Credentials.ts +4 -2
- package/src/Axiom/Dataset.ts +1 -1
- package/src/Axiom/Providers.ts +1 -1
- package/src/Binding.ts +47 -43
- package/src/Build/DevServer.ts +330 -0
- package/src/Build/Local.ts +4 -0
- package/src/Bundle/Bundle.ts +1 -1
- package/src/Cli/commands/_shared.ts +2 -2
- package/src/Cli/commands/aws.ts +12 -9
- package/src/Cli/commands/cloudflare.ts +1 -1
- package/src/Cli/commands/login.ts +6 -22
- package/src/Cli/commands/profile.ts +3 -3
- package/src/Cloudflare/Access.ts +1 -1
- package/src/Cloudflare/AiGateway/AiGateway.ts +220 -219
- package/src/Cloudflare/ApiToken/AccountApiToken.ts +142 -153
- package/src/Cloudflare/ApiToken/UserApiToken.ts +105 -121
- package/src/Cloudflare/Browser/Browser.ts +84 -12
- package/src/Cloudflare/Browser/BrowserBinding.ts +205 -33
- package/src/Cloudflare/Browser/index.ts +15 -2
- package/src/Cloudflare/CloudflareEnvironment.ts +10 -5
- package/src/Cloudflare/Container/ContainerApplication.ts +32 -29
- package/src/Cloudflare/Container/ContainerBinding.ts +5 -10
- package/src/Cloudflare/Credentials.ts +2 -2
- package/src/Cloudflare/D1/D1Database.ts +268 -263
- package/src/Cloudflare/EdgeSession.ts +6 -5
- package/src/Cloudflare/Email/EmailAddress.ts +74 -71
- package/src/Cloudflare/Email/EmailRouting.ts +73 -75
- package/src/Cloudflare/Email/EmailRule.ts +79 -80
- package/src/Cloudflare/Hyperdrive/Hyperdrive.ts +155 -158
- package/src/Cloudflare/Images/Images.ts +4 -3
- package/src/Cloudflare/KV/KVNamespace.ts +139 -138
- package/src/Cloudflare/Providers.ts +5 -0
- package/src/Cloudflare/Queue/Queue.ts +122 -119
- package/src/Cloudflare/Queue/QueueConsumer.ts +334 -330
- package/src/Cloudflare/R2/R2Bucket.ts +200 -165
- package/src/Cloudflare/RateLimit/RateLimit.ts +4 -3
- package/src/Cloudflare/Ruleset/Ruleset.ts +93 -98
- package/src/Cloudflare/SecretsStore/Secret.ts +187 -194
- package/src/Cloudflare/SecretsStore/SecretsStore.ts +82 -87
- package/src/Cloudflare/StateStore/State.ts +5 -3
- package/src/Cloudflare/Tunnel/Tunnel.ts +187 -186
- package/src/Cloudflare/Tunnel/TunnelBinding.ts +16 -9
- package/src/Cloudflare/Tunnel/TunnelRead.ts +3 -2
- package/src/Cloudflare/Tunnel/TunnelReadWrite.ts +7 -2
- package/src/Cloudflare/Tunnel/TunnelWrite.ts +3 -2
- package/src/Cloudflare/Vectorize/VectorizeIndex.ts +98 -98
- package/src/Cloudflare/Vectorize/VectorizeMetadataIndex.ts +97 -109
- package/src/Cloudflare/VpcService/VpcService.ts +126 -125
- package/src/Cloudflare/VpcService/VpcServiceRef.ts +1 -1
- package/src/Cloudflare/Website/StaticSite.ts +154 -41
- package/src/Cloudflare/Website/Vite.ts +73 -25
- package/src/Cloudflare/Workers/Assets.ts +12 -10
- package/src/Cloudflare/Workers/DynamicWorkerLoader.ts +4 -4
- package/src/Cloudflare/Workers/InferEnv.ts +14 -12
- package/src/Cloudflare/Workers/LocalWorkerProvider.ts +57 -15
- package/src/Cloudflare/Workers/RpcDurableObjectNamespace.ts +11 -8
- package/src/Cloudflare/Workers/RpcWorker.ts +8 -7
- package/src/Cloudflare/Workers/VersionMetadata.ts +129 -0
- package/src/Cloudflare/Workers/VersionMetadataBinding.ts +82 -0
- package/src/Cloudflare/Workers/Worker.ts +382 -349
- package/src/Cloudflare/Workers/WorkerAsyncBindings.ts +13 -21
- package/src/Cloudflare/Workers/WorkerBinding.ts +2 -0
- package/src/Cloudflare/Workers/Workflow.ts +20 -9
- package/src/Cloudflare/Workers/WorkflowBridge.ts +47 -6
- package/src/Cloudflare/Workers/index.ts +2 -0
- package/src/Cloudflare/Zaraz/ZarazConfig.ts +87 -99
- package/src/Cloudflare/Zone/Zone.ts +36 -33
- package/src/Diff.ts +7 -0
- package/src/Drizzle/Postgres.ts +13 -12
- package/src/Drizzle/Schema.ts +16 -6
- package/src/GitHub/Comment.ts +3 -20
- package/src/GitHub/Credentials.ts +9 -5
- package/src/GitHub/Octokit.ts +9 -0
- package/src/GitHub/Secret.ts +8 -21
- package/src/GitHub/Variable.ts +3 -8
- package/src/Kubernetes/client.ts +2 -2
- package/src/Local/RpcSerialization.ts +5 -2
- package/src/Neon/AuthProvider.ts +2 -2
- package/src/Neon/Branch.ts +264 -272
- package/src/Neon/Credentials.ts +4 -2
- package/src/Neon/Project.ts +372 -378
- package/src/Neon/Providers.ts +0 -6
- package/src/Neon/index.ts +0 -1
- package/src/Output.ts +8 -4
- package/src/Plan.ts +15 -7
- package/src/Planetscale/Branch.ts +311 -321
- package/src/Planetscale/Credentials.ts +20 -15
- package/src/Planetscale/MySQL/MySQLDatabase.ts +269 -280
- package/src/Planetscale/MySQL/MySQLPassword.ts +161 -168
- package/src/Planetscale/Postgres/PostgresClusterSize.ts +4 -4
- package/src/Planetscale/Postgres/PostgresDatabase.ts +287 -296
- package/src/Planetscale/Postgres/PostgresDefaultRole.ts +143 -146
- package/src/Planetscale/Postgres/PostgresRole.ts +188 -195
- package/src/Planetscale/Providers.ts +2 -7
- package/src/Platform.ts +36 -32
- package/src/Resource.ts +12 -13
- package/src/Runtime.ts +3 -7
- package/src/Server/SQSQueueEventSource.ts +3 -2
- package/src/Stack.ts +3 -3
- package/src/Util/effect.ts +13 -17
- package/src/Util/poll.ts +3 -3
- package/bin/alchemy.sh +0 -15
- package/lib/AWS/Context.d.ts +0 -8
- package/lib/AWS/Context.d.ts.map +0 -1
- package/lib/AWS/Context.js +0 -16
- package/lib/AWS/Context.js.map +0 -1
- package/lib/Neon/NeonEnvironment.d.ts +0 -11
- package/lib/Neon/NeonEnvironment.d.ts.map +0 -1
- package/lib/Neon/NeonEnvironment.js +0 -18
- package/lib/Neon/NeonEnvironment.js.map +0 -1
- package/src/AWS/Context.ts +0 -30
- package/src/Neon/NeonEnvironment.ts +0 -32
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import { Credentials } from "@distilled.cloud/planetscale/Credentials";
|
|
2
|
-
import * as
|
|
2
|
+
import * as planetscale from "@distilled.cloud/planetscale/Operations";
|
|
3
3
|
import * as Effect from "effect/Effect";
|
|
4
4
|
import * as Redacted from "effect/Redacted";
|
|
5
5
|
import { deepEqual, isResolved } from "../../Diff.ts";
|
|
6
|
+
import { createPhysicalName } from "../../PhysicalName.ts";
|
|
6
7
|
import * as Provider from "../../Provider.ts";
|
|
7
8
|
import { Resource } from "../../Resource.ts";
|
|
8
9
|
import type { Providers } from "../Providers.ts";
|
|
@@ -14,7 +15,6 @@ import {
|
|
|
14
15
|
import type { PostgresBranch } from "./PostgresBranch.ts";
|
|
15
16
|
import type { PostgresDatabase } from "./PostgresDatabase.ts";
|
|
16
17
|
import type { PostgresOrigin } from "./PostgresOrigin.ts";
|
|
17
|
-
import { createPhysicalName } from "../../PhysicalName.ts";
|
|
18
18
|
|
|
19
19
|
/**
|
|
20
20
|
* Built-in PostgreSQL roles that can be inherited from. Custom role names
|
|
@@ -171,6 +171,192 @@ export type PostgresRole = Resource<
|
|
|
171
171
|
|
|
172
172
|
export const PostgresRole = Resource<PostgresRole>("Planetscale.PostgresRole");
|
|
173
173
|
|
|
174
|
+
export const PostgresRoleProvider = () =>
|
|
175
|
+
Provider.succeed(PostgresRole, {
|
|
176
|
+
stables: ["id"],
|
|
177
|
+
|
|
178
|
+
diff: Effect.fn(function* ({ id, news, olds, output }) {
|
|
179
|
+
if (!isResolved(news)) return undefined;
|
|
180
|
+
|
|
181
|
+
// Successor is the only updatable property — everything else
|
|
182
|
+
// requires replacement.
|
|
183
|
+
if (news.ttl !== olds.ttl) {
|
|
184
|
+
return { action: "replace" } as const;
|
|
185
|
+
}
|
|
186
|
+
const newDb = resolveDatabaseName(news.database);
|
|
187
|
+
const oldDb = olds.database
|
|
188
|
+
? resolveDatabaseName(olds.database)
|
|
189
|
+
: undefined;
|
|
190
|
+
if (oldDb && newDb !== oldDb) {
|
|
191
|
+
return { action: "replace" } as const;
|
|
192
|
+
}
|
|
193
|
+
const newBranch = resolveBranchName(news.branch);
|
|
194
|
+
const oldBranch = resolveBranchName(olds.branch);
|
|
195
|
+
if (newBranch !== oldBranch) {
|
|
196
|
+
return { action: "replace" } as const;
|
|
197
|
+
}
|
|
198
|
+
const newRoles = resolveInheritedRoles(news.inheritedRoles);
|
|
199
|
+
const oldRoles = output?.inheritedRoles ?? [];
|
|
200
|
+
if (!deepEqual(newRoles, oldRoles)) {
|
|
201
|
+
return { action: "replace" } as const;
|
|
202
|
+
}
|
|
203
|
+
const oldName = output?.name ?? (yield* resolveName(id, olds?.name));
|
|
204
|
+
const newName = yield* resolveName(id, news.name);
|
|
205
|
+
|
|
206
|
+
if (newName !== oldName) {
|
|
207
|
+
return { action: "update" } as const;
|
|
208
|
+
}
|
|
209
|
+
|
|
210
|
+
return undefined;
|
|
211
|
+
}),
|
|
212
|
+
|
|
213
|
+
read: Effect.fn(function* ({ output }) {
|
|
214
|
+
if (!output?.id) return undefined;
|
|
215
|
+
|
|
216
|
+
return yield* planetscale
|
|
217
|
+
.getRole({
|
|
218
|
+
branch: output.branch,
|
|
219
|
+
database: output.database,
|
|
220
|
+
organization: output.organization,
|
|
221
|
+
id: output.id,
|
|
222
|
+
})
|
|
223
|
+
.pipe(
|
|
224
|
+
Effect.map((token) =>
|
|
225
|
+
buildAttributes(token, output.password, {
|
|
226
|
+
inheritedRoles: token.inherited_roles as InheritedRole[],
|
|
227
|
+
successor: output.successor,
|
|
228
|
+
organization: output.organization,
|
|
229
|
+
database: output.database,
|
|
230
|
+
branch: token.branch.name,
|
|
231
|
+
}),
|
|
232
|
+
),
|
|
233
|
+
Effect.catchTag("Forbidden", () => Effect.succeed(undefined)),
|
|
234
|
+
Effect.catchTag("NotFound", () => Effect.succeed(undefined)),
|
|
235
|
+
);
|
|
236
|
+
}),
|
|
237
|
+
|
|
238
|
+
reconcile: Effect.fn(function* ({ id, news, output }) {
|
|
239
|
+
const { organization: envOrg } = yield* yield* Credentials;
|
|
240
|
+
const organization = resolveDatabaseOrg(news.database) ?? envOrg;
|
|
241
|
+
const databaseName = resolveDatabaseName(news.database);
|
|
242
|
+
const branchName = resolveBranchName(news.branch);
|
|
243
|
+
const inheritedRoles = resolveInheritedRoles(news.inheritedRoles);
|
|
244
|
+
const successor = resolveSuccessorName(news.successor);
|
|
245
|
+
const desiredName = yield* resolveName(id, news.name);
|
|
246
|
+
|
|
247
|
+
// 1. Observe — fetch live state if we know the role id. Roles
|
|
248
|
+
// can only be looked up by id; without a cached id there is
|
|
249
|
+
// no way to find the live role, so we fall through to ensure.
|
|
250
|
+
const observed = output?.id
|
|
251
|
+
? yield* planetscale
|
|
252
|
+
.getRole({
|
|
253
|
+
id: output.id,
|
|
254
|
+
branch: branchName,
|
|
255
|
+
organization,
|
|
256
|
+
database: databaseName,
|
|
257
|
+
})
|
|
258
|
+
.pipe(Effect.catchTag("NotFound", () => Effect.succeed(undefined)))
|
|
259
|
+
: undefined;
|
|
260
|
+
|
|
261
|
+
// 2. Ensure — create if missing. Single branch covers both
|
|
262
|
+
// greenfield (no output) and out-of-band-deletion (output
|
|
263
|
+
// cached but cloud lost it). The latter is structurally a
|
|
264
|
+
// rotation: the new role has fresh id/host/username/plaintext
|
|
265
|
+
// that propagate downstream through the dependency graph.
|
|
266
|
+
// There is no path to recover the original plaintext, so
|
|
267
|
+
// recreating is the only way to converge.
|
|
268
|
+
//
|
|
269
|
+
// Planetscale returns the plaintext password value exactly
|
|
270
|
+
// once on create; on an observe-hit we re-use the cached
|
|
271
|
+
// plaintext from output (which is why adoption requires
|
|
272
|
+
// pre-existing state — see `read`).
|
|
273
|
+
let live: planetscale.GetRoleOutput | planetscale.CreateRoleOutput;
|
|
274
|
+
let plaintext: Redacted.Redacted<string>;
|
|
275
|
+
if (observed) {
|
|
276
|
+
live = observed;
|
|
277
|
+
plaintext = output!.password;
|
|
278
|
+
} else {
|
|
279
|
+
const branchInfo = yield* planetscale.getBranch({
|
|
280
|
+
organization,
|
|
281
|
+
database: databaseName,
|
|
282
|
+
branch: branchName,
|
|
283
|
+
});
|
|
284
|
+
if (branchInfo.kind !== "postgresql") {
|
|
285
|
+
return yield* Effect.fail(
|
|
286
|
+
new PlanetscaleConflict({
|
|
287
|
+
message: `Cannot create a Role on MySQL database "${databaseName}". Roles are only supported on PostgreSQL. Use Password for MySQL.`,
|
|
288
|
+
}),
|
|
289
|
+
);
|
|
290
|
+
}
|
|
291
|
+
if (!branchInfo.ready) {
|
|
292
|
+
yield* waitForBranchReady(organization, databaseName, branchName);
|
|
293
|
+
}
|
|
294
|
+
const created = yield* planetscale.createRole({
|
|
295
|
+
name: desiredName,
|
|
296
|
+
branch: branchName,
|
|
297
|
+
organization,
|
|
298
|
+
database: databaseName,
|
|
299
|
+
ttl: news.ttl,
|
|
300
|
+
inherited_roles: inheritedRoles as SDKInheritedRole[],
|
|
301
|
+
});
|
|
302
|
+
if (!created.password) {
|
|
303
|
+
return yield* Effect.die(
|
|
304
|
+
`Planetscale did not return a password for Role "${desiredName}".`,
|
|
305
|
+
);
|
|
306
|
+
}
|
|
307
|
+
plaintext = created.password;
|
|
308
|
+
live = created;
|
|
309
|
+
}
|
|
310
|
+
|
|
311
|
+
// 3. Sync — only `name` is mutable in place; diff observed
|
|
312
|
+
// against desired and skip the API call when nothing
|
|
313
|
+
// changed. Everything else triggers a replace via diff().
|
|
314
|
+
if (live.name !== desiredName) {
|
|
315
|
+
live = yield* planetscale.updateRole({
|
|
316
|
+
id: live.id,
|
|
317
|
+
branch: branchName,
|
|
318
|
+
organization,
|
|
319
|
+
database: databaseName,
|
|
320
|
+
name: desiredName,
|
|
321
|
+
});
|
|
322
|
+
}
|
|
323
|
+
|
|
324
|
+
// 4. Return — fresh attrs sourced from observed cloud state,
|
|
325
|
+
// with cached or freshly-issued plaintext.
|
|
326
|
+
return buildAttributes(live, plaintext, {
|
|
327
|
+
inheritedRoles: live.inherited_roles as InheritedRole[],
|
|
328
|
+
successor,
|
|
329
|
+
organization,
|
|
330
|
+
database: databaseName,
|
|
331
|
+
branch: branchName,
|
|
332
|
+
});
|
|
333
|
+
}),
|
|
334
|
+
|
|
335
|
+
delete: Effect.fn(function* ({ output }) {
|
|
336
|
+
yield* planetscale
|
|
337
|
+
.deleteRole({
|
|
338
|
+
organization: output.organization,
|
|
339
|
+
database: output.database,
|
|
340
|
+
branch: output.branch,
|
|
341
|
+
id: output.id,
|
|
342
|
+
successor: output.successor,
|
|
343
|
+
})
|
|
344
|
+
.pipe(
|
|
345
|
+
Effect.catchTag("NotFound", () => Effect.void),
|
|
346
|
+
// 422 (UnprocessableEntity): role is still referenced. Log a
|
|
347
|
+
// warning rather than failing — the role will be cleaned up
|
|
348
|
+
// when the database/branch is deleted.
|
|
349
|
+
Effect.catchIf(
|
|
350
|
+
isKnownError(
|
|
351
|
+
"UnprocessableEntity",
|
|
352
|
+
"Role is still referenced and cannot be dropped.",
|
|
353
|
+
),
|
|
354
|
+
() => Effect.void,
|
|
355
|
+
),
|
|
356
|
+
);
|
|
357
|
+
}),
|
|
358
|
+
});
|
|
359
|
+
|
|
174
360
|
// Structural shapes for runtime-resolved Resource references — see notes
|
|
175
361
|
// in Password.ts.
|
|
176
362
|
type DatabaseRef = string | { name: string; organization?: string };
|
|
@@ -274,196 +460,3 @@ const buildAttributes = (
|
|
|
274
460
|
ttl: role.ttl,
|
|
275
461
|
};
|
|
276
462
|
};
|
|
277
|
-
|
|
278
|
-
export const PostgresRoleProvider = () =>
|
|
279
|
-
Provider.effect(
|
|
280
|
-
PostgresRole,
|
|
281
|
-
Effect.gen(function* () {
|
|
282
|
-
const createRole = yield* ops.createRole;
|
|
283
|
-
const deleteRole = yield* ops.deleteRole;
|
|
284
|
-
const updateRole = yield* ops.updateRole;
|
|
285
|
-
const getRole = yield* ops.getRole;
|
|
286
|
-
const getBranch = yield* ops.getBranch;
|
|
287
|
-
|
|
288
|
-
return {
|
|
289
|
-
stables: ["id"],
|
|
290
|
-
|
|
291
|
-
diff: Effect.fn(function* ({ id, news, olds, output }) {
|
|
292
|
-
if (!isResolved(news)) return undefined;
|
|
293
|
-
|
|
294
|
-
// Successor is the only updatable property — everything else
|
|
295
|
-
// requires replacement.
|
|
296
|
-
if (news.ttl !== olds.ttl) {
|
|
297
|
-
return { action: "replace" } as const;
|
|
298
|
-
}
|
|
299
|
-
const newDb = resolveDatabaseName(news.database);
|
|
300
|
-
const oldDb = olds.database
|
|
301
|
-
? resolveDatabaseName(olds.database)
|
|
302
|
-
: undefined;
|
|
303
|
-
if (oldDb && newDb !== oldDb) {
|
|
304
|
-
return { action: "replace" } as const;
|
|
305
|
-
}
|
|
306
|
-
const newBranch = resolveBranchName(news.branch);
|
|
307
|
-
const oldBranch = resolveBranchName(olds.branch);
|
|
308
|
-
if (newBranch !== oldBranch) {
|
|
309
|
-
return { action: "replace" } as const;
|
|
310
|
-
}
|
|
311
|
-
const newRoles = resolveInheritedRoles(news.inheritedRoles);
|
|
312
|
-
const oldRoles = output?.inheritedRoles ?? [];
|
|
313
|
-
if (!deepEqual(newRoles, oldRoles)) {
|
|
314
|
-
return { action: "replace" } as const;
|
|
315
|
-
}
|
|
316
|
-
const oldName = output?.name ?? (yield* resolveName(id, olds?.name));
|
|
317
|
-
const newName = yield* resolveName(id, news.name);
|
|
318
|
-
|
|
319
|
-
if (newName !== oldName) {
|
|
320
|
-
return { action: "update" } as const;
|
|
321
|
-
}
|
|
322
|
-
|
|
323
|
-
return undefined;
|
|
324
|
-
}),
|
|
325
|
-
|
|
326
|
-
read: Effect.fn(function* ({ output }) {
|
|
327
|
-
if (!output?.id) return undefined;
|
|
328
|
-
|
|
329
|
-
return yield* getRole({
|
|
330
|
-
branch: output.branch,
|
|
331
|
-
database: output.database,
|
|
332
|
-
organization: output.organization,
|
|
333
|
-
id: output.id,
|
|
334
|
-
}).pipe(
|
|
335
|
-
Effect.map((token) =>
|
|
336
|
-
buildAttributes(token, output.password, {
|
|
337
|
-
inheritedRoles: token.inherited_roles as InheritedRole[],
|
|
338
|
-
successor: output.successor,
|
|
339
|
-
organization: output.organization,
|
|
340
|
-
database: output.database,
|
|
341
|
-
branch: token.branch.name,
|
|
342
|
-
}),
|
|
343
|
-
),
|
|
344
|
-
Effect.catchTag("Forbidden", () => Effect.succeed(undefined)),
|
|
345
|
-
Effect.catchTag("NotFound", () => Effect.succeed(undefined)),
|
|
346
|
-
);
|
|
347
|
-
}),
|
|
348
|
-
|
|
349
|
-
reconcile: Effect.fn(function* ({ id, news, output }) {
|
|
350
|
-
const { organization: envOrg } = yield* Credentials;
|
|
351
|
-
const organization = resolveDatabaseOrg(news.database) ?? envOrg;
|
|
352
|
-
const databaseName = resolveDatabaseName(news.database);
|
|
353
|
-
const branchName = resolveBranchName(news.branch);
|
|
354
|
-
const inheritedRoles = resolveInheritedRoles(news.inheritedRoles);
|
|
355
|
-
const successor = resolveSuccessorName(news.successor);
|
|
356
|
-
const desiredName = yield* resolveName(id, news.name);
|
|
357
|
-
|
|
358
|
-
// 1. Observe — fetch live state if we know the role id. Roles
|
|
359
|
-
// can only be looked up by id; without a cached id there is
|
|
360
|
-
// no way to find the live role, so we fall through to ensure.
|
|
361
|
-
const observed = output?.id
|
|
362
|
-
? yield* getRole({
|
|
363
|
-
id: output.id,
|
|
364
|
-
branch: branchName,
|
|
365
|
-
organization,
|
|
366
|
-
database: databaseName,
|
|
367
|
-
}).pipe(
|
|
368
|
-
Effect.catchTag("NotFound", () => Effect.succeed(undefined)),
|
|
369
|
-
)
|
|
370
|
-
: undefined;
|
|
371
|
-
|
|
372
|
-
// 2. Ensure — create if missing. Single branch covers both
|
|
373
|
-
// greenfield (no output) and out-of-band-deletion (output
|
|
374
|
-
// cached but cloud lost it). The latter is structurally a
|
|
375
|
-
// rotation: the new role has fresh id/host/username/plaintext
|
|
376
|
-
// that propagate downstream through the dependency graph.
|
|
377
|
-
// There is no path to recover the original plaintext, so
|
|
378
|
-
// recreating is the only way to converge.
|
|
379
|
-
//
|
|
380
|
-
// Planetscale returns the plaintext password value exactly
|
|
381
|
-
// once on create; on an observe-hit we re-use the cached
|
|
382
|
-
// plaintext from output (which is why adoption requires
|
|
383
|
-
// pre-existing state — see `read`).
|
|
384
|
-
let live: ops.GetRoleOutput | ops.CreateRoleOutput;
|
|
385
|
-
let plaintext: Redacted.Redacted<string>;
|
|
386
|
-
if (observed) {
|
|
387
|
-
live = observed;
|
|
388
|
-
plaintext = output!.password;
|
|
389
|
-
} else {
|
|
390
|
-
const branchInfo = yield* getBranch({
|
|
391
|
-
organization,
|
|
392
|
-
database: databaseName,
|
|
393
|
-
branch: branchName,
|
|
394
|
-
});
|
|
395
|
-
if (branchInfo.kind !== "postgresql") {
|
|
396
|
-
return yield* Effect.fail(
|
|
397
|
-
new PlanetscaleConflict({
|
|
398
|
-
message: `Cannot create a Role on MySQL database "${databaseName}". Roles are only supported on PostgreSQL. Use Password for MySQL.`,
|
|
399
|
-
}),
|
|
400
|
-
);
|
|
401
|
-
}
|
|
402
|
-
if (!branchInfo.ready) {
|
|
403
|
-
yield* waitForBranchReady(organization, databaseName, branchName);
|
|
404
|
-
}
|
|
405
|
-
const created = yield* createRole({
|
|
406
|
-
name: desiredName,
|
|
407
|
-
branch: branchName,
|
|
408
|
-
organization,
|
|
409
|
-
database: databaseName,
|
|
410
|
-
ttl: news.ttl,
|
|
411
|
-
inherited_roles: inheritedRoles as SDKInheritedRole[],
|
|
412
|
-
});
|
|
413
|
-
if (!created.password) {
|
|
414
|
-
return yield* Effect.die(
|
|
415
|
-
`Planetscale did not return a password for Role "${desiredName}".`,
|
|
416
|
-
);
|
|
417
|
-
}
|
|
418
|
-
plaintext = created.password;
|
|
419
|
-
live = created;
|
|
420
|
-
}
|
|
421
|
-
|
|
422
|
-
// 3. Sync — only `name` is mutable in place; diff observed
|
|
423
|
-
// against desired and skip the API call when nothing
|
|
424
|
-
// changed. Everything else triggers a replace via diff().
|
|
425
|
-
if (live.name !== desiredName) {
|
|
426
|
-
live = yield* updateRole({
|
|
427
|
-
id: live.id,
|
|
428
|
-
branch: branchName,
|
|
429
|
-
organization,
|
|
430
|
-
database: databaseName,
|
|
431
|
-
name: desiredName,
|
|
432
|
-
});
|
|
433
|
-
}
|
|
434
|
-
|
|
435
|
-
// 4. Return — fresh attrs sourced from observed cloud state,
|
|
436
|
-
// with cached or freshly-issued plaintext.
|
|
437
|
-
return buildAttributes(live, plaintext, {
|
|
438
|
-
inheritedRoles: live.inherited_roles as InheritedRole[],
|
|
439
|
-
successor,
|
|
440
|
-
organization,
|
|
441
|
-
database: databaseName,
|
|
442
|
-
branch: branchName,
|
|
443
|
-
});
|
|
444
|
-
}),
|
|
445
|
-
|
|
446
|
-
delete: Effect.fn(function* ({ output }) {
|
|
447
|
-
yield* deleteRole({
|
|
448
|
-
organization: output.organization,
|
|
449
|
-
database: output.database,
|
|
450
|
-
branch: output.branch,
|
|
451
|
-
id: output.id,
|
|
452
|
-
successor: output.successor,
|
|
453
|
-
}).pipe(
|
|
454
|
-
Effect.catchTag("NotFound", () => Effect.void),
|
|
455
|
-
// 422 (UnprocessableEntity): role is still referenced. Log a
|
|
456
|
-
// warning rather than failing — the role will be cleaned up
|
|
457
|
-
// when the database/branch is deleted.
|
|
458
|
-
Effect.catchIf(
|
|
459
|
-
isKnownError(
|
|
460
|
-
"UnprocessableEntity",
|
|
461
|
-
"Role is still referenced and cannot be dropped.",
|
|
462
|
-
),
|
|
463
|
-
() => Effect.void,
|
|
464
|
-
),
|
|
465
|
-
);
|
|
466
|
-
}),
|
|
467
|
-
};
|
|
468
|
-
}),
|
|
469
|
-
);
|
|
@@ -3,7 +3,6 @@ import * as FetchHttpClient from "effect/unstable/http/FetchHttpClient";
|
|
|
3
3
|
import { CredentialsStoreLive } from "../Auth/Credentials.ts";
|
|
4
4
|
import { ProfileLive } from "../Auth/Profile.ts";
|
|
5
5
|
import * as Provider from "../Provider.ts";
|
|
6
|
-
import type { StackServices } from "../Stack.ts";
|
|
7
6
|
import { PlanetscaleAuth } from "./AuthProvider.ts";
|
|
8
7
|
import * as Credentials from "./Credentials.ts";
|
|
9
8
|
import { MySQLBranch, MySQLBranchProvider } from "./MySQL/MySQLBranch.ts";
|
|
@@ -43,11 +42,7 @@ export type ProviderRequirements = Layer.Services<ReturnType<typeof providers>>;
|
|
|
43
42
|
* Effect.provide(Planetscale.providers())
|
|
44
43
|
* ```
|
|
45
44
|
*/
|
|
46
|
-
export const providers = ()
|
|
47
|
-
Providers | Credentials.Credentials,
|
|
48
|
-
never,
|
|
49
|
-
StackServices
|
|
50
|
-
> =>
|
|
45
|
+
export const providers = () =>
|
|
51
46
|
Layer.effect(
|
|
52
47
|
Providers,
|
|
53
48
|
Provider.collection([
|
|
@@ -77,4 +72,4 @@ export const providers = (): Layer.Layer<
|
|
|
77
72
|
Layer.provideMerge(ProfileLive),
|
|
78
73
|
Layer.provideMerge(CredentialsStoreLive),
|
|
79
74
|
Layer.orDie,
|
|
80
|
-
)
|
|
75
|
+
);
|
package/src/Platform.ts
CHANGED
|
@@ -2,13 +2,12 @@ import * as ConfigError from "effect/Config";
|
|
|
2
2
|
import * as ConfigProvider from "effect/ConfigProvider";
|
|
3
3
|
import * as Context from "effect/Context";
|
|
4
4
|
import * as Effect from "effect/Effect";
|
|
5
|
-
import
|
|
5
|
+
import * as Effectable from "effect/Effectable";
|
|
6
6
|
import * as Layer from "effect/Layer";
|
|
7
7
|
import * as Option from "effect/Option";
|
|
8
8
|
import * as Redacted from "effect/Redacted";
|
|
9
9
|
import type { Scope } from "effect/Scope";
|
|
10
10
|
import type { HttpClient } from "effect/unstable/http/HttpClient";
|
|
11
|
-
import { SingleShotGen } from "effect/Utils";
|
|
12
11
|
import type { PolicyLike } from "./Binding.ts";
|
|
13
12
|
import type { Dependencies } from "./Dependencies.ts";
|
|
14
13
|
import type { ExecutionContext } from "./ExecutionContext.ts";
|
|
@@ -225,7 +224,7 @@ export const Platform = <
|
|
|
225
224
|
constructor(id, props, impl, true);
|
|
226
225
|
} else if (!impl) {
|
|
227
226
|
const cls = makeClass(id, props);
|
|
228
|
-
const
|
|
227
|
+
const evaluate = () =>
|
|
229
228
|
(!isTag
|
|
230
229
|
? // this is a non-tagged resource yielded without providing an implementation
|
|
231
230
|
// e.g.
|
|
@@ -272,7 +271,7 @@ export const Platform = <
|
|
|
272
271
|
);
|
|
273
272
|
return Object.assign(
|
|
274
273
|
function (impl: Impl) {
|
|
275
|
-
return cls.
|
|
274
|
+
return cls.Self.pipe(Effect.provide(cls.make(impl)));
|
|
276
275
|
},
|
|
277
276
|
// we splice in the Effect so this can be yielded to indicate a non-Effect native instance
|
|
278
277
|
// e.g. here, we yield it - in this case we don't want to provide an implementation
|
|
@@ -280,42 +279,29 @@ export const Platform = <
|
|
|
280
279
|
// main: "./src/worker.ts"
|
|
281
280
|
// });
|
|
282
281
|
cls,
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
282
|
+
// Spread the Effect prototype LAST so it overrides the evaluate copied
|
|
283
|
+
// from `cls`: yielding this no-impl form bridges to the (possibly
|
|
284
|
+
// non-Effect-native) resource rather than resolving the Self tag.
|
|
285
|
+
Effectable.Prototype({
|
|
286
|
+
label: `${type}<${id}>`,
|
|
287
|
+
evaluate,
|
|
288
|
+
}),
|
|
289
289
|
);
|
|
290
290
|
} else {
|
|
291
291
|
// impl was provided inline, this is a non-tagged eager instance
|
|
292
292
|
// e.g.
|
|
293
293
|
// export default Cloudflare.Worker("id", { main: "./src/worker.ts" }, Effect.gen(function* () { .. })
|
|
294
294
|
const cls = makeClass(id, props);
|
|
295
|
-
return cls.
|
|
295
|
+
return cls.Self.pipe(Effect.provide(cls.make(impl)), effectClass);
|
|
296
296
|
}
|
|
297
297
|
};
|
|
298
298
|
|
|
299
299
|
const makeClass = (id: string, props: Props) => {
|
|
300
|
-
|
|
300
|
+
class Platform {
|
|
301
301
|
static readonly Self = Self(`${type}<${id}>`);
|
|
302
302
|
static readonly Platform = Context.Service<Platform, Platform>(
|
|
303
303
|
`Platform<${type}<${id}>>`,
|
|
304
304
|
);
|
|
305
|
-
static [Symbol.iterator](): Iterator<
|
|
306
|
-
Effect.Effect<void, never, Self>,
|
|
307
|
-
Resource,
|
|
308
|
-
void
|
|
309
|
-
> {
|
|
310
|
-
return new SingleShotGen(this.asEffect()) as any;
|
|
311
|
-
}
|
|
312
|
-
static asEffect() {
|
|
313
|
-
return this.Self;
|
|
314
|
-
}
|
|
315
|
-
static pipe(...args: any[]) {
|
|
316
|
-
// @ts-expect-error
|
|
317
|
-
return pipe(this, ...args);
|
|
318
|
-
}
|
|
319
305
|
static of = (shape: any) => shape;
|
|
320
306
|
static make = (impl: Impl) => {
|
|
321
307
|
// build the Layer once for the root Self
|
|
@@ -460,13 +446,31 @@ export const Platform = <
|
|
|
460
446
|
SelfLayer,
|
|
461
447
|
);
|
|
462
448
|
};
|
|
463
|
-
}
|
|
449
|
+
}
|
|
450
|
+
// Make the platform class itself a real Effect: `yield* MyWorker` resolves
|
|
451
|
+
// the Self tag. Replaces the hand-rolled asEffect/pipe/[Symbol.iterator].
|
|
452
|
+
return Object.assign(
|
|
453
|
+
Platform,
|
|
454
|
+
Effectable.Prototype({
|
|
455
|
+
label: `${type}<${id}>`,
|
|
456
|
+
evaluate: () => Platform.Self,
|
|
457
|
+
}),
|
|
458
|
+
);
|
|
464
459
|
};
|
|
465
460
|
|
|
466
|
-
const instance = Object.assign(
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
461
|
+
const instance = Object.assign(
|
|
462
|
+
constructor,
|
|
463
|
+
resource,
|
|
464
|
+
// Spread the Effect prototype LAST so it overrides any evaluate inherited
|
|
465
|
+
// from `resource`; `yield* Cloudflare.Worker` resolves the resource Self.
|
|
466
|
+
Effectable.Prototype({
|
|
467
|
+
label: `${type}`,
|
|
468
|
+
evaluate: () => resource.Self,
|
|
469
|
+
}),
|
|
470
|
+
{
|
|
471
|
+
Platform: Platform,
|
|
472
|
+
...methods,
|
|
473
|
+
},
|
|
474
|
+
) as any;
|
|
471
475
|
return instance;
|
|
472
476
|
};
|
package/src/Resource.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as Effect from "effect/Effect";
|
|
2
|
+
import * as Effectable from "effect/Effectable";
|
|
2
3
|
import * as Option from "effect/Option";
|
|
3
|
-
import {
|
|
4
|
-
import { SingleShotGen } from "effect/Utils";
|
|
4
|
+
import type { Pipeable } from "effect/Pipeable";
|
|
5
5
|
import { AdoptPolicy } from "./AdoptPolicy.ts";
|
|
6
6
|
import { toFqn } from "./FQN.ts";
|
|
7
7
|
import type { Input, InputProps } from "./Input.ts";
|
|
@@ -287,17 +287,6 @@ export function Resource<R extends ResourceLike>(
|
|
|
287
287
|
const ProviderTag = Provider(type);
|
|
288
288
|
|
|
289
289
|
const Service = {
|
|
290
|
-
[Symbol.iterator]() {
|
|
291
|
-
return new SingleShotGen(this.asEffect());
|
|
292
|
-
},
|
|
293
|
-
pipe() {
|
|
294
|
-
return pipeArguments(this, arguments);
|
|
295
|
-
},
|
|
296
|
-
asEffect() {
|
|
297
|
-
return Effect.succeed((id: string, props: R["Props"]) =>
|
|
298
|
-
constructor(id, props),
|
|
299
|
-
);
|
|
300
|
-
},
|
|
301
290
|
/**
|
|
302
291
|
* Build a typed reference to a deployed instance of this resource
|
|
303
292
|
* — in the current stack/stage by default, or in another via
|
|
@@ -323,6 +312,16 @@ export function Resource<R extends ResourceLike>(
|
|
|
323
312
|
? Object.assign(ResourceClass, args[0])
|
|
324
313
|
: constructor(...(args as [string, R["Props"]])),
|
|
325
314
|
Service,
|
|
315
|
+
// Make the constructor itself a real Effect: `yield* MyResource` resolves
|
|
316
|
+
// to the constructor function (same as the old `asEffect()`), and
|
|
317
|
+
// `Effect.isEffect(MyResource)` is now true so `Effect.all`/`forEach` work.
|
|
318
|
+
Effectable.Prototype({
|
|
319
|
+
label: `Resource<${type}>`,
|
|
320
|
+
evaluate: () =>
|
|
321
|
+
Effect.succeed((id: string, props: R["Props"]) =>
|
|
322
|
+
constructor(id, props),
|
|
323
|
+
),
|
|
324
|
+
}),
|
|
326
325
|
) as any;
|
|
327
326
|
|
|
328
327
|
return ResourceClass;
|
package/src/Runtime.ts
CHANGED
|
@@ -7,6 +7,7 @@
|
|
|
7
7
|
*/
|
|
8
8
|
|
|
9
9
|
import * as Layer from "effect/Layer";
|
|
10
|
+
import { asEffect } from "./Util/types.ts";
|
|
10
11
|
|
|
11
12
|
/**
|
|
12
13
|
* Resolve the user's default-export entrypoint into a `Layer` for the
|
|
@@ -14,7 +15,7 @@ import * as Layer from "effect/Layer";
|
|
|
14
15
|
*
|
|
15
16
|
* `entrypoint` may be any of:
|
|
16
17
|
* - a `Layer` factory (`{ build: (...) => ... }`) — used as-is
|
|
17
|
-
* - an
|
|
18
|
+
* - an Alchemy `Platform`/`Worker` construct (now a real `Effect`)
|
|
18
19
|
* - a plain `Effect`
|
|
19
20
|
*
|
|
20
21
|
* Centralized so the inline ternary doesn't have to be re-emitted into
|
|
@@ -29,10 +30,5 @@ export const makeEntrypointLayer = (
|
|
|
29
30
|
if (typeof entrypoint?.build === "function") {
|
|
30
31
|
return entrypoint;
|
|
31
32
|
}
|
|
32
|
-
return Layer.effect(
|
|
33
|
-
tag,
|
|
34
|
-
typeof entrypoint?.asEffect === "function"
|
|
35
|
-
? entrypoint.asEffect()
|
|
36
|
-
: entrypoint,
|
|
37
|
-
);
|
|
33
|
+
return Layer.effect(tag, asEffect(entrypoint));
|
|
38
34
|
};
|
|
@@ -2,7 +2,7 @@ import * as Effect from "effect/Effect";
|
|
|
2
2
|
import * as Layer from "effect/Layer";
|
|
3
3
|
import * as Stream from "effect/Stream";
|
|
4
4
|
|
|
5
|
-
import {
|
|
5
|
+
import { AWSEnvironment } from "../AWS/Environment.ts";
|
|
6
6
|
import * as SQS from "../AWS/SQS/index.ts";
|
|
7
7
|
import { ServerHost } from "./Process.ts";
|
|
8
8
|
|
|
@@ -10,7 +10,7 @@ export const SQSQueueEventSource = Layer.effect(
|
|
|
10
10
|
SQS.QueueEventSource,
|
|
11
11
|
Effect.gen(function* () {
|
|
12
12
|
const { run } = yield* ServerHost;
|
|
13
|
-
const
|
|
13
|
+
const env = yield* AWSEnvironment;
|
|
14
14
|
|
|
15
15
|
const ReceiveMessage = yield* SQS.ReceiveMessage;
|
|
16
16
|
const DeleteMessageBatch = yield* SQS.DeleteMessageBatch;
|
|
@@ -23,6 +23,7 @@ export const SQSQueueEventSource = Layer.effect(
|
|
|
23
23
|
) => Effect.Effect<void, never, Req | StreamReq>,
|
|
24
24
|
) {
|
|
25
25
|
const QueueArn = yield* queue.queueArn;
|
|
26
|
+
const { region } = yield* env;
|
|
26
27
|
|
|
27
28
|
const receiveMessage = yield* ReceiveMessage(queue);
|
|
28
29
|
const deleteMessageBatch = yield* DeleteMessageBatch(queue);
|
package/src/Stack.ts
CHANGED
|
@@ -16,7 +16,7 @@ import { AlchemyContext, AlchemyContextLive } from "./AlchemyContext.ts";
|
|
|
16
16
|
import { provideFreshArtifactStore } from "./Artifacts.ts";
|
|
17
17
|
import { AuthProviders } from "./Auth/AuthProvider.ts";
|
|
18
18
|
import { CredentialsStore, CredentialsStoreLive } from "./Auth/Credentials.ts";
|
|
19
|
-
import {
|
|
19
|
+
import { AlchemyProfile, ProfileLive } from "./Auth/Profile.ts";
|
|
20
20
|
import { Cli } from "./Cli/Cli.ts";
|
|
21
21
|
import type { Input, InputProps } from "./Input.ts";
|
|
22
22
|
import * as Output from "./Output.ts";
|
|
@@ -38,7 +38,7 @@ export type StackServices =
|
|
|
38
38
|
| HttpClient
|
|
39
39
|
| ChildProcessSpawner
|
|
40
40
|
| AuthProviders
|
|
41
|
-
|
|
|
41
|
+
| AlchemyProfile
|
|
42
42
|
| CredentialsStore
|
|
43
43
|
| Cli;
|
|
44
44
|
|
|
@@ -51,7 +51,7 @@ export type StackEffect<A, Err = never, Req = never> = Effect.Effect<
|
|
|
51
51
|
| AuthProviders
|
|
52
52
|
| AlchemyContext
|
|
53
53
|
| Cli
|
|
54
|
-
|
|
|
54
|
+
| AlchemyProfile
|
|
55
55
|
| CredentialsStore
|
|
56
56
|
| State
|
|
57
57
|
| Req
|