alchemy-effect 0.5.0 → 0.6.2
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/alchemy-effect.js +7155 -17689
- package/bin/alchemy-effect.js.map +1 -1
- package/bin/alchemy-effect.sh +14 -0
- package/bin/alchemy-effect.ts +644 -130
- package/bin/process-manager.ts +10 -0
- package/lib/cli/index.d.ts +207 -378
- package/lib/cli/index.d.ts.map +1 -1
- package/lib/cli/index.js +4134 -985
- package/lib/cli/index.js.map +1 -1
- package/package.json +165 -103
- package/src/AWS/ACM/Certificate.ts +502 -0
- package/src/AWS/ACM/index.ts +1 -0
- package/src/AWS/AGENTS.md +505 -0
- package/src/AWS/Account.ts +56 -0
- package/src/AWS/Assets.ts +182 -0
- package/src/AWS/AutoScaling/AutoScalingGroup.ts +440 -0
- package/src/AWS/AutoScaling/LaunchTemplate.ts +535 -0
- package/src/AWS/AutoScaling/ScalingPolicy.ts +232 -0
- package/src/AWS/AutoScaling/index.ts +3 -0
- package/src/AWS/Bootstrap.ts +281 -0
- package/src/AWS/CloudFront/Distribution.ts +952 -0
- package/src/AWS/CloudFront/Function.ts +374 -0
- package/src/AWS/CloudFront/Invalidation.ts +202 -0
- package/src/AWS/CloudFront/KeyValueStore.ts +216 -0
- package/src/AWS/CloudFront/KvEntries.ts +250 -0
- package/src/AWS/CloudFront/KvRoutesUpdate.ts +301 -0
- package/src/AWS/CloudFront/ManagedPolicies.ts +20 -0
- package/src/AWS/CloudFront/OriginAccessControl.ts +266 -0
- package/src/AWS/CloudFront/common.ts +55 -0
- package/src/AWS/CloudFront/index.ts +15 -0
- package/src/AWS/CloudWatch/Alarm.ts +198 -0
- package/src/AWS/CloudWatch/AlarmMuteRule.ts +183 -0
- package/src/AWS/CloudWatch/AnomalyDetector.ts +242 -0
- package/src/AWS/CloudWatch/CompositeAlarm.ts +198 -0
- package/src/AWS/CloudWatch/Dashboard.ts +262 -0
- package/src/AWS/CloudWatch/DescribeAlarmContributors.ts +79 -0
- package/src/AWS/CloudWatch/DescribeAlarmHistory.ts +66 -0
- package/src/AWS/CloudWatch/DescribeAlarms.ts +94 -0
- package/src/AWS/CloudWatch/DescribeAlarmsForMetric.ts +66 -0
- package/src/AWS/CloudWatch/DescribeAnomalyDetectors.ts +68 -0
- package/src/AWS/CloudWatch/DescribeInsightRules.ts +66 -0
- package/src/AWS/CloudWatch/DisableAlarmActions.ts +74 -0
- package/src/AWS/CloudWatch/DisableInsightRules.ts +74 -0
- package/src/AWS/CloudWatch/EnableAlarmActions.ts +74 -0
- package/src/AWS/CloudWatch/GetAlarmMuteRule.ts +75 -0
- package/src/AWS/CloudWatch/GetDashboard.ts +75 -0
- package/src/AWS/CloudWatch/GetInsightRuleReport.ts +76 -0
- package/src/AWS/CloudWatch/GetMetricData.ts +62 -0
- package/src/AWS/CloudWatch/GetMetricStatistics.ts +64 -0
- package/src/AWS/CloudWatch/GetMetricStream.ts +75 -0
- package/src/AWS/CloudWatch/GetMetricWidgetImage.ts +66 -0
- package/src/AWS/CloudWatch/InsightRule.ts +277 -0
- package/src/AWS/CloudWatch/ListAlarmMuteRules.ts +64 -0
- package/src/AWS/CloudWatch/ListDashboards.ts +62 -0
- package/src/AWS/CloudWatch/ListManagedInsightRules.ts +68 -0
- package/src/AWS/CloudWatch/ListMetricStreams.ts +64 -0
- package/src/AWS/CloudWatch/ListMetrics.ts +62 -0
- package/src/AWS/CloudWatch/ListTagsForResource.ts +79 -0
- package/src/AWS/CloudWatch/MetricStream.ts +262 -0
- package/src/AWS/CloudWatch/PutMetricData.ts +62 -0
- package/src/AWS/CloudWatch/SetAlarmState.ts +73 -0
- package/src/AWS/CloudWatch/alarmStateChanges.ts +24 -0
- package/src/AWS/CloudWatch/binding-common.ts +42 -0
- package/src/AWS/CloudWatch/common.ts +168 -0
- package/src/AWS/CloudWatch/index.ts +32 -0
- package/src/AWS/Context.ts +30 -0
- package/src/AWS/Credentials.ts +52 -0
- package/src/AWS/DynamoDB/AttributeValue.ts +250 -0
- package/src/AWS/DynamoDB/BatchExecuteStatement.ts +113 -0
- package/src/AWS/DynamoDB/BatchGetItem.ts +138 -0
- package/src/AWS/DynamoDB/BatchWriteItem.ts +144 -0
- package/src/AWS/DynamoDB/DeleteItem.ts +67 -0
- package/src/AWS/DynamoDB/DescribeTable.ts +69 -0
- package/src/AWS/DynamoDB/DescribeTimeToLive.ts +72 -0
- package/src/AWS/DynamoDB/ExecuteStatement.ts +91 -0
- package/src/AWS/DynamoDB/ExecuteTransaction.ts +77 -0
- package/src/AWS/DynamoDB/GetItem.ts +85 -0
- package/src/AWS/DynamoDB/ListTables.ts +56 -0
- package/src/AWS/DynamoDB/ListTagsOfResource.ts +72 -0
- package/src/AWS/DynamoDB/ProjectionExpression.ts +159 -0
- package/src/AWS/DynamoDB/PutItem.ts +67 -0
- package/src/AWS/DynamoDB/Query.ts +68 -0
- package/src/AWS/DynamoDB/RestoreTableToPointInTime.ts +94 -0
- package/src/AWS/DynamoDB/Scan.ts +68 -0
- package/src/AWS/DynamoDB/Stream.ts +94 -0
- package/src/AWS/DynamoDB/Table.ts +1175 -0
- package/src/AWS/DynamoDB/TransactGetItems.ts +154 -0
- package/src/AWS/DynamoDB/TransactWriteItems.ts +216 -0
- package/src/AWS/DynamoDB/UpdateItem.ts +67 -0
- package/src/AWS/DynamoDB/UpdateTimeToLive.ts +71 -0
- package/src/AWS/DynamoDB/index.ts +24 -0
- package/src/AWS/EC2/EIP.ts +285 -0
- package/src/AWS/EC2/EgressOnlyInternetGateway.ts +248 -0
- package/src/AWS/EC2/Image.ts +108 -0
- package/src/AWS/EC2/Instance.ts +877 -0
- package/src/AWS/EC2/InternetGateway.ts +382 -0
- package/src/AWS/EC2/NatGateway.ts +474 -0
- package/src/AWS/EC2/Network.ts +459 -0
- package/src/AWS/EC2/NetworkAcl.ts +247 -0
- package/src/AWS/EC2/NetworkAclAssociation.ts +206 -0
- package/src/AWS/EC2/NetworkAclEntry.ts +300 -0
- package/src/AWS/EC2/Route.ts +323 -0
- package/src/AWS/EC2/RouteTable.ts +448 -0
- package/src/AWS/EC2/RouteTableAssociation.ts +274 -0
- package/src/AWS/EC2/SecurityGroup.ts +552 -0
- package/src/AWS/EC2/SecurityGroupRule.ts +395 -0
- package/src/AWS/EC2/Subnet.ts +583 -0
- package/src/AWS/EC2/Vpc.ts +455 -0
- package/src/AWS/EC2/VpcEndpoint.ts +657 -0
- package/src/AWS/EC2/hosted.ts +891 -0
- package/src/AWS/EC2/index.ts +18 -0
- package/src/AWS/ECR/Repository.ts +254 -0
- package/src/AWS/ECR/index.ts +1 -0
- package/src/AWS/ECS/Cluster.ts +257 -0
- package/src/AWS/ECS/DescribeTasks.ts +67 -0
- package/src/AWS/ECS/ListTasks.ts +67 -0
- package/src/AWS/ECS/RunTask.ts +82 -0
- package/src/AWS/ECS/Schedule.ts +115 -0
- package/src/AWS/ECS/Service.ts +572 -0
- package/src/AWS/ECS/StopTask.ts +64 -0
- package/src/AWS/ECS/Task.ts +981 -0
- package/src/AWS/ECS/index.ts +28 -0
- package/src/AWS/EKS/AccessEntry.ts +382 -0
- package/src/AWS/EKS/Addon.ts +385 -0
- package/src/AWS/EKS/AutoCluster.ts +288 -0
- package/src/AWS/EKS/Cluster.ts +655 -0
- package/src/AWS/EKS/LoadBalancedWorkload.ts +76 -0
- package/src/AWS/EKS/PodIdentityAssociation.ts +354 -0
- package/src/AWS/EKS/PodIdentityServiceAccount.ts +156 -0
- package/src/AWS/EKS/PodIdentityWorkload.ts +185 -0
- package/src/AWS/EKS/Workload.ts +145 -0
- package/src/AWS/EKS/index.ts +9 -0
- package/src/AWS/ELBv2/Listener.ts +139 -0
- package/src/AWS/ELBv2/LoadBalancer.ts +227 -0
- package/src/AWS/ELBv2/TargetGroup.ts +209 -0
- package/src/AWS/ELBv2/index.ts +3 -0
- package/src/AWS/Endpoint.ts +16 -0
- package/src/AWS/EventBridge/DescribeEventBus.ts +71 -0
- package/src/AWS/EventBridge/DescribeRule.ts +73 -0
- package/src/AWS/EventBridge/EventBus.ts +273 -0
- package/src/AWS/EventBridge/EventSource.ts +146 -0
- package/src/AWS/EventBridge/ListEventBuses.ts +60 -0
- package/src/AWS/EventBridge/ListRules.ts +87 -0
- package/src/AWS/EventBridge/ListTargetsByRule.ts +76 -0
- package/src/AWS/EventBridge/Permission.ts +151 -0
- package/src/AWS/EventBridge/PutEvents.ts +91 -0
- package/src/AWS/EventBridge/Rule.ts +620 -0
- package/src/AWS/EventBridge/TestEventPattern.ts +60 -0
- package/src/AWS/EventBridge/ToEcsTask.ts +118 -0
- package/src/AWS/EventBridge/ToLambda.ts +87 -0
- package/src/AWS/EventBridge/ToQueue.ts +97 -0
- package/src/AWS/EventBridge/index.ts +14 -0
- package/src/AWS/IAM/AccessKey.ts +142 -0
- package/src/AWS/IAM/AccountAlias.ts +96 -0
- package/src/AWS/IAM/AccountPasswordPolicy.ts +64 -0
- package/src/AWS/IAM/Group.ts +357 -0
- package/src/AWS/IAM/GroupMembership.ts +142 -0
- package/src/AWS/IAM/InstanceProfile.ts +285 -0
- package/src/AWS/IAM/LoginProfile.ts +137 -0
- package/src/AWS/IAM/OpenIDConnectProvider.ts +192 -0
- package/src/AWS/IAM/Policy.ts +387 -0
- package/src/AWS/IAM/Role.ts +500 -0
- package/src/AWS/IAM/SAMLProvider.ts +165 -0
- package/src/AWS/IAM/SSHPublicKey.ts +148 -0
- package/src/AWS/IAM/ServerCertificate.ts +261 -0
- package/src/AWS/IAM/ServiceSpecificCredential.ts +172 -0
- package/src/AWS/IAM/SigningCertificate.ts +137 -0
- package/src/AWS/IAM/User.ts +436 -0
- package/src/AWS/IAM/VirtualMFADevice.ts +259 -0
- package/src/AWS/IAM/common.ts +89 -0
- package/src/AWS/IAM/index.ts +40 -0
- package/src/AWS/IdentityCenter/AccountAssignment.ts +290 -0
- package/src/AWS/IdentityCenter/Group.ts +211 -0
- package/src/AWS/IdentityCenter/Instance.ts +190 -0
- package/src/AWS/IdentityCenter/PermissionSet.ts +235 -0
- package/src/AWS/IdentityCenter/common.ts +117 -0
- package/src/AWS/IdentityCenter/index.ts +4 -0
- package/src/AWS/Kinesis/DescribeAccountSettings.ts +63 -0
- package/src/AWS/Kinesis/DescribeLimits.ts +59 -0
- package/src/AWS/Kinesis/DescribeStream.ts +69 -0
- package/src/AWS/Kinesis/DescribeStreamConsumer.ts +72 -0
- package/src/AWS/Kinesis/DescribeStreamSummary.ts +72 -0
- package/src/AWS/Kinesis/GetRecords.ts +59 -0
- package/src/AWS/Kinesis/GetResourcePolicy.ts +72 -0
- package/src/AWS/Kinesis/GetShardIterator.ts +71 -0
- package/src/AWS/Kinesis/ListShards.ts +66 -0
- package/src/AWS/Kinesis/ListStreamConsumers.ts +72 -0
- package/src/AWS/Kinesis/ListStreams.ts +56 -0
- package/src/AWS/Kinesis/ListTagsForResource.ts +78 -0
- package/src/AWS/Kinesis/PutRecord.ts +67 -0
- package/src/AWS/Kinesis/PutRecords.ts +67 -0
- package/src/AWS/Kinesis/Stream.ts +731 -0
- package/src/AWS/Kinesis/StreamConsumer.ts +325 -0
- package/src/AWS/Kinesis/StreamEventSource.ts +106 -0
- package/src/AWS/Kinesis/StreamSink.ts +68 -0
- package/src/AWS/Kinesis/SubscribeToShard.ts +71 -0
- package/src/AWS/Kinesis/index.ts +19 -0
- package/src/AWS/Lambda/BucketEventSource.ts +146 -0
- package/src/AWS/Lambda/EventBridgeEventSource.ts +183 -0
- package/src/AWS/Lambda/EventSourceMapping.ts +438 -0
- package/src/AWS/Lambda/Function.ts +1185 -0
- package/src/AWS/Lambda/HttpServer.ts +125 -0
- package/src/AWS/Lambda/InvokeFunction.ts +67 -0
- package/src/AWS/Lambda/Permission.ts +217 -0
- package/src/AWS/Lambda/QueueEventSource.ts +96 -0
- package/src/AWS/Lambda/StreamEventSource.ts +123 -0
- package/src/AWS/Lambda/TableEventSource.ts +156 -0
- package/src/AWS/Lambda/TopicEventSource.ts +105 -0
- package/src/AWS/Lambda/index.ts +13 -0
- package/src/AWS/Logs/LogGroup.ts +209 -0
- package/src/AWS/Logs/index.ts +1 -0
- package/src/AWS/Organizations/Account.ts +328 -0
- package/src/AWS/Organizations/DelegatedAdministrator.ts +158 -0
- package/src/AWS/Organizations/Organization.ts +179 -0
- package/src/AWS/Organizations/OrganizationResourcePolicy.ts +108 -0
- package/src/AWS/Organizations/OrganizationalUnit.ts +268 -0
- package/src/AWS/Organizations/Policy.ts +241 -0
- package/src/AWS/Organizations/PolicyAttachment.ts +130 -0
- package/src/AWS/Organizations/Root.ts +151 -0
- package/src/AWS/Organizations/RootPolicyType.ts +130 -0
- package/src/AWS/Organizations/TenantRoot.ts +506 -0
- package/src/AWS/Organizations/TrustedServiceAccess.ts +107 -0
- package/src/AWS/Organizations/common.ts +130 -0
- package/src/AWS/Organizations/index.ts +11 -0
- package/src/AWS/Profile.ts +5 -0
- package/src/AWS/Providers.ts +324 -0
- package/src/AWS/RDS/Aurora.ts +499 -0
- package/src/AWS/RDS/Connect.ts +127 -0
- package/src/AWS/RDS/DBCluster.ts +361 -0
- package/src/AWS/RDS/DBClusterEndpoint.ts +226 -0
- package/src/AWS/RDS/DBClusterParameterGroup.ts +195 -0
- package/src/AWS/RDS/DBInstance.ts +274 -0
- package/src/AWS/RDS/DBParameterGroup.ts +190 -0
- package/src/AWS/RDS/DBProxy.ts +257 -0
- package/src/AWS/RDS/DBProxyEndpoint.ts +255 -0
- package/src/AWS/RDS/DBProxyTargetGroup.ts +243 -0
- package/src/AWS/RDS/DBSubnetGroup.ts +208 -0
- package/src/AWS/RDS/index.ts +11 -0
- package/src/AWS/RDSData/BatchExecuteStatement.ts +103 -0
- package/src/AWS/RDSData/BeginTransaction.ts +97 -0
- package/src/AWS/RDSData/CommitTransaction.ts +102 -0
- package/src/AWS/RDSData/ExecuteSql.ts +98 -0
- package/src/AWS/RDSData/ExecuteStatement.ts +99 -0
- package/src/AWS/RDSData/RollbackTransaction.ts +105 -0
- package/src/AWS/RDSData/index.ts +6 -0
- package/src/AWS/Region.ts +77 -0
- package/src/AWS/Route53/Record.ts +342 -0
- package/src/AWS/Route53/index.ts +1 -0
- package/src/AWS/S3/AbortMultipartUpload.ts +73 -0
- package/src/AWS/S3/Bucket.ts +550 -0
- package/src/AWS/S3/BucketEventSource.ts +26 -0
- package/src/AWS/S3/BucketNotifications.ts +77 -0
- package/src/AWS/S3/CompleteMultipartUpload.ts +73 -0
- package/src/AWS/S3/CopyObject.ts +68 -0
- package/src/AWS/S3/CreateMultipartUpload.ts +73 -0
- package/src/AWS/S3/DeleteObject.ts +67 -0
- package/src/AWS/S3/GetObject.ts +74 -0
- package/src/AWS/S3/HeadObject.ts +67 -0
- package/src/AWS/S3/ListObjectsV2.ts +67 -0
- package/src/AWS/S3/PutObject.ts +83 -0
- package/src/AWS/S3/S3Event.ts +43 -0
- package/src/AWS/S3/UploadPart.ts +67 -0
- package/src/AWS/S3/index.ts +14 -0
- package/src/AWS/SNS/AddPermission.ts +66 -0
- package/src/AWS/SNS/ConfirmSubscription.ts +72 -0
- package/src/AWS/SNS/GetDataProtectionPolicy.ts +72 -0
- package/src/AWS/SNS/GetSubscriptionAttributes.ts +72 -0
- package/src/AWS/SNS/GetTopicAttributes.ts +70 -0
- package/src/AWS/SNS/ListSubscriptions.ts +60 -0
- package/src/AWS/SNS/ListSubscriptionsByTopic.ts +72 -0
- package/src/AWS/SNS/ListTagsForResource.ts +72 -0
- package/src/AWS/SNS/ListTopics.ts +56 -0
- package/src/AWS/SNS/Publish.ts +66 -0
- package/src/AWS/SNS/PublishBatch.ts +66 -0
- package/src/AWS/SNS/PutDataProtectionPolicy.ts +72 -0
- package/src/AWS/SNS/RemovePermission.ts +66 -0
- package/src/AWS/SNS/SetSubscriptionAttributes.ts +72 -0
- package/src/AWS/SNS/SetTopicAttributes.ts +70 -0
- package/src/AWS/SNS/Subscription.ts +305 -0
- package/src/AWS/SNS/TagResource.ts +66 -0
- package/src/AWS/SNS/Topic.ts +363 -0
- package/src/AWS/SNS/TopicEventSource.ts +42 -0
- package/src/AWS/SNS/TopicSink.ts +61 -0
- package/src/AWS/SNS/UntagResource.ts +66 -0
- package/src/AWS/SNS/index.ts +21 -0
- package/src/AWS/SQS/DeleteMessage.ts +67 -0
- package/src/AWS/SQS/DeleteMessageBatch.ts +72 -0
- package/src/AWS/SQS/Queue.ts +210 -0
- package/src/AWS/SQS/QueueEventSource.ts +57 -0
- package/src/AWS/SQS/QueueSink.ts +62 -0
- package/src/AWS/SQS/ReceiveMessage.ts +68 -0
- package/src/AWS/SQS/SendMessage.ts +69 -0
- package/src/AWS/SQS/SendMessageBatch.ts +67 -0
- package/src/AWS/SQS/index.ts +8 -0
- package/src/AWS/Scheduler/Schedule.ts +296 -0
- package/src/AWS/Scheduler/ScheduleGroup.ts +186 -0
- package/src/AWS/Scheduler/builders.ts +229 -0
- package/src/AWS/Scheduler/index.ts +3 -0
- package/src/AWS/SecretsManager/DescribeSecret.ts +66 -0
- package/src/AWS/SecretsManager/GetRandomPassword.ts +65 -0
- package/src/AWS/SecretsManager/GetSecretValue.ts +78 -0
- package/src/AWS/SecretsManager/ListSecrets.ts +62 -0
- package/src/AWS/SecretsManager/PutSecretValue.ts +78 -0
- package/src/AWS/SecretsManager/Secret.ts +318 -0
- package/src/AWS/SecretsManager/index.ts +6 -0
- package/src/AWS/StageConfig.ts +44 -0
- package/src/AWS/Website/AssetDeployment.ts +348 -0
- package/src/AWS/Website/Router.ts +384 -0
- package/src/AWS/Website/SsrSite.ts +393 -0
- package/src/AWS/Website/StaticSite.ts +611 -0
- package/src/AWS/Website/cfcode.ts +180 -0
- package/src/AWS/Website/index.ts +5 -0
- package/src/AWS/Website/shared.ts +223 -0
- package/src/AWS/index.ts +37 -0
- package/src/AdoptPolicy.ts +25 -0
- package/src/Agent/Agent.ts +26 -0
- package/src/Agent/Aspect.ts +173 -0
- package/src/Agent/AspectGraph.ts +98 -0
- package/src/Agent/ContextPlugin.ts +18 -0
- package/src/Agent/Plugin.ts +29 -0
- package/src/Agent/chat/channel.ts +26 -0
- package/src/Agent/chat/event.ts +43 -0
- package/src/Agent/chat/message.ts +35 -0
- package/src/Agent/chat/service.ts +133 -0
- package/src/Agent/chat/thread.ts +17 -0
- package/src/Agent/coding/bash.ts +198 -0
- package/src/Agent/coding/edit.ts +152 -0
- package/src/Agent/coding/glob.ts +97 -0
- package/src/Agent/coding/grep.ts +144 -0
- package/src/Agent/coding/index.ts +7 -0
- package/src/Agent/coding/read.ts +119 -0
- package/src/Agent/coding/readlints.ts +78 -0
- package/src/Agent/coding/write.ts +79 -0
- package/src/Agent/fs/file.ts +22 -0
- package/src/Agent/fs/folder.ts +16 -0
- package/src/Agent/index.ts +9 -0
- package/src/Agent/llm/error.ts +330 -0
- package/src/Agent/llm/index.ts +4 -0
- package/src/Agent/llm/llm.ts +131 -0
- package/src/Agent/llm/stream-collectors.ts +58 -0
- package/src/Agent/llm/stream-text-part.ts +7 -0
- package/src/Agent/lsp/client.ts +293 -0
- package/src/Agent/lsp/diagnostics.ts +64 -0
- package/src/Agent/lsp/jsonrpc.ts +317 -0
- package/src/Agent/lsp/manager.ts +213 -0
- package/src/Agent/lsp/servers.ts +37 -0
- package/src/Agent/process/driver.ts +168 -0
- package/src/Agent/process/issue-service.ts +48 -0
- package/src/Agent/process/issue-tools.ts +33 -0
- package/src/Agent/process/issue.ts +22 -0
- package/src/Agent/process/organization.ts +16 -0
- package/src/Agent/process/process.ts +16 -0
- package/src/Agent/process/reply.ts +21 -0
- package/src/Agent/process/task.ts +34 -0
- package/src/Agent/tool/index.ts +3 -0
- package/src/Agent/tool/parameter.ts +35 -0
- package/src/Agent/tool/result.ts +51 -0
- package/src/Agent/tool/tool.ts +74 -0
- package/src/Agent/util/command-validator.ts +98 -0
- package/src/Agent/util/exec.ts +18 -0
- package/src/Agent/util/parser.ts +39 -0
- package/src/Agent/util/replace.ts +559 -0
- package/src/Agent/util/ripgrep.ts +256 -0
- package/src/Apply.ts +1074 -0
- package/src/Binding.ts +193 -0
- package/src/Build/Command.ts +322 -0
- package/src/Build/index.ts +1 -0
- package/src/Bundle/Bundle.ts +215 -0
- package/src/Bundle/Docker.ts +213 -0
- package/src/Bundle/TempRoot.ts +104 -0
- package/src/Bundle/index.ts +3 -0
- package/src/Cli/Cli.ts +23 -0
- package/src/Cli/Event.ts +32 -0
- package/src/Cli/InkCLI.tsx +60 -0
- package/src/Cli/NamespaceTree.ts +199 -0
- package/src/Cli/Reporter.ts +8 -0
- package/src/Cli/components/ApprovePlan.tsx +44 -0
- package/src/Cli/components/Plan.tsx +148 -0
- package/src/Cli/components/PlanProgress.tsx +325 -0
- package/src/Cli/index.ts +2 -0
- package/src/Cloudflare/Account.ts +38 -0
- package/src/Cloudflare/Container.ts +1345 -0
- package/src/Cloudflare/KV/Delete.ts +38 -0
- package/src/Cloudflare/KV/Get.ts +40 -0
- package/src/Cloudflare/KV/GetWithMetadata.ts +54 -0
- package/src/Cloudflare/KV/List.ts +45 -0
- package/src/Cloudflare/KV/Namespace.ts +150 -0
- package/src/Cloudflare/KV/NamespaceBinding.ts +25 -0
- package/src/Cloudflare/KV/Put.ts +59 -0
- package/src/Cloudflare/KV/index.ts +6 -0
- package/src/Cloudflare/Logs.ts +139 -0
- package/src/Cloudflare/Providers.ts +75 -0
- package/src/Cloudflare/R2/Bucket.ts +173 -0
- package/src/Cloudflare/R2/BucketBinding.ts +31 -0
- package/src/Cloudflare/R2/CreateMultipartUpload.ts +59 -0
- package/src/Cloudflare/R2/DeleteObject.ts +41 -0
- package/src/Cloudflare/R2/GetObject.ts +47 -0
- package/src/Cloudflare/R2/HeadObject.ts +41 -0
- package/src/Cloudflare/R2/ListObjects.ts +45 -0
- package/src/Cloudflare/R2/MultipartUploadClient.ts +40 -0
- package/src/Cloudflare/R2/PutObject.ts +55 -0
- package/src/Cloudflare/R2/ResumeMultipartUpload.ts +48 -0
- package/src/Cloudflare/R2/UploadValue.ts +10 -0
- package/src/Cloudflare/R2/index.ts +9 -0
- package/src/Cloudflare/StageConfig.ts +8 -0
- package/src/Cloudflare/Website/StaticSite.ts +35 -0
- package/src/Cloudflare/Website/TanstackStart.ts +14 -0
- package/src/Cloudflare/Website/index.ts +2 -0
- package/src/Cloudflare/Workers/Assets.ts +286 -0
- package/src/Cloudflare/Workers/ConfigProvider.ts +9 -0
- package/src/Cloudflare/Workers/DurableObject.ts +558 -0
- package/src/Cloudflare/Workers/DynamicWorker.ts +144 -0
- package/src/Cloudflare/Workers/Fetch.ts +142 -0
- package/src/Cloudflare/Workers/Fetcher.ts +280 -0
- package/src/Cloudflare/Workers/HttpServer.ts +159 -0
- package/src/Cloudflare/Workers/Rpc.ts +472 -0
- package/src/Cloudflare/Workers/WebSocket.ts +44 -0
- package/src/Cloudflare/Workers/Worker.ts +1222 -0
- package/src/Cloudflare/Workers/Workflow.ts +400 -0
- package/src/Cloudflare/Workers/cloudflare_workers.ts +25 -0
- package/src/Cloudflare/Workers/index.ts +10 -0
- package/src/Cloudflare/index.ts +7 -0
- package/src/Cloudflare/stream.ts +20 -0
- package/src/Config.ts +31 -0
- package/src/Construct.ts +75 -0
- package/src/Daemon/Client.ts +112 -0
- package/src/Daemon/Config.ts +28 -0
- package/src/Daemon/Errors.ts +32 -0
- package/src/Daemon/Lock.ts +162 -0
- package/src/Daemon/ProcessRegistry.ts +284 -0
- package/src/Daemon/RpcSchema.ts +43 -0
- package/src/Daemon/RpcServer.ts +231 -0
- package/src/Daemon/index.ts +25 -0
- package/src/Destroy.ts +15 -0
- package/src/Diff.ts +142 -0
- package/src/ExecutionContext.ts +30 -0
- package/src/FQN.ts +94 -0
- package/src/Http.ts +105 -0
- package/src/Input.ts +91 -0
- package/src/InstanceId.ts +19 -0
- package/src/Kubernetes/ConfigMap.ts +59 -0
- package/src/Kubernetes/Deployment.ts +123 -0
- package/src/Kubernetes/Job.ts +82 -0
- package/src/Kubernetes/Namespace.ts +49 -0
- package/src/Kubernetes/Object.ts +99 -0
- package/src/Kubernetes/Service.ts +78 -0
- package/src/Kubernetes/ServiceAccount.ts +49 -0
- package/src/Kubernetes/client.ts +298 -0
- package/src/Kubernetes/common.ts +23 -0
- package/src/Kubernetes/index.ts +11 -0
- package/src/Kubernetes/types.ts +177 -0
- package/src/Namespace.ts +64 -0
- package/src/Observability.ts +0 -0
- package/src/Output.ts +584 -0
- package/src/Phase.ts +5 -0
- package/src/PhysicalName.ts +62 -0
- package/src/Plan.ts +899 -0
- package/src/Platform.ts +398 -0
- package/src/Provider.ts +156 -0
- package/src/Ref.ts +46 -0
- package/src/RemovalPolicy.ts +51 -0
- package/src/Resource.ts +387 -0
- package/src/SQLite/BunSQLite.ts +132 -0
- package/src/SQLite/SQLite.ts +19 -0
- package/src/SQLite/SQLiteConnection.ts +55 -0
- package/src/SQLite/SQLiteError.ts +904 -0
- package/src/SQLite/SQLiteStatement.ts +24 -0
- package/src/SQLite/index.ts +6 -0
- package/src/SQLite/libSQL.ts +194 -0
- package/src/Schema.ts +333 -0
- package/src/Self.ts +10 -0
- package/src/Server/Process.ts +30 -0
- package/src/Server/S3BucketEventSource.ts +100 -0
- package/src/Server/SQSQueueEventSource.ts +77 -0
- package/src/Server/index.ts +3 -0
- package/src/Serverless/Function.ts +18 -0
- package/src/Serverless/index.ts +1 -0
- package/src/Spawn.ts +23 -0
- package/src/Stack.ts +84 -0
- package/src/Stage.ts +3 -0
- package/src/State/InMemoryState.ts +86 -0
- package/src/State/LocalState.ts +120 -0
- package/src/State/ResourceState.ts +121 -0
- package/src/State/State.ts +72 -0
- package/src/State/index.ts +4 -0
- package/src/Tags.ts +104 -0
- package/src/Test/TestCli.ts +21 -0
- package/src/Test/TestState.ts +37 -0
- package/src/Test/Vitest.ts +503 -0
- package/src/Test/index.ts +3 -0
- package/src/Trait.ts +105 -0
- package/src/Util/base32.ts +44 -0
- package/src/Util/camel.ts +23 -0
- package/src/Util/class.ts +7 -0
- package/src/Util/effect.ts +57 -0
- package/src/Util/index.ts +15 -0
- package/src/Util/instance.ts +9 -0
- package/src/Util/pointer.ts +5 -0
- package/src/Util/schema-to-type.ts +456 -0
- package/src/Util/service.ts +16 -0
- package/src/Util/sha256.ts +27 -0
- package/src/Util/stable.ts +41 -0
- package/src/Util/todo.ts +4 -0
- package/src/Util/types.ts +25 -0
- package/src/Util/unknown.ts +19 -0
- package/src/Util/zip.ts +27 -0
- package/src/index.ts +29 -26
- package/README.md +0 -179
- package/lib/$.d.ts +0 -5
- package/lib/$.d.ts.map +0 -1
- package/lib/$.js +0 -9
- package/lib/$.js.map +0 -1
- package/lib/app.d.ts +0 -15
- package/lib/app.d.ts.map +0 -1
- package/lib/app.js +0 -7
- package/lib/app.js.map +0 -1
- package/lib/apply.d.ts +0 -18
- package/lib/apply.d.ts.map +0 -1
- package/lib/apply.js +0 -567
- package/lib/apply.js.map +0 -1
- package/lib/assert-never.d.ts +0 -12
- package/lib/assert-never.d.ts.map +0 -1
- package/lib/assert-never.js +0 -11
- package/lib/assert-never.js.map +0 -1
- package/lib/aws/account.d.ts +0 -27
- package/lib/aws/account.d.ts.map +0 -1
- package/lib/aws/account.js +0 -33
- package/lib/aws/account.js.map +0 -1
- package/lib/aws/arn.d.ts +0 -2
- package/lib/aws/arn.d.ts.map +0 -1
- package/lib/aws/arn.js +0 -1
- package/lib/aws/arn.js.map +0 -1
- package/lib/aws/assets.d.ts +0 -8
- package/lib/aws/assets.d.ts.map +0 -1
- package/lib/aws/assets.js +0 -4
- package/lib/aws/assets.js.map +0 -1
- package/lib/aws/bundle.d.ts +0 -4
- package/lib/aws/bundle.d.ts.map +0 -1
- package/lib/aws/bundle.js +0 -4
- package/lib/aws/bundle.js.map +0 -1
- package/lib/aws/client.d.ts +0 -8
- package/lib/aws/client.d.ts.map +0 -1
- package/lib/aws/client.js +0 -27
- package/lib/aws/client.js.map +0 -1
- package/lib/aws/config.d.ts +0 -15
- package/lib/aws/config.d.ts.map +0 -1
- package/lib/aws/config.js +0 -1
- package/lib/aws/config.js.map +0 -1
- package/lib/aws/credentials.d.ts +0 -156
- package/lib/aws/credentials.d.ts.map +0 -1
- package/lib/aws/credentials.js +0 -196
- package/lib/aws/credentials.js.map +0 -1
- package/lib/aws/dynamodb/attribute-value.d.ts +0 -20
- package/lib/aws/dynamodb/attribute-value.d.ts.map +0 -1
- package/lib/aws/dynamodb/attribute-value.js +0 -217
- package/lib/aws/dynamodb/attribute-value.js.map +0 -1
- package/lib/aws/dynamodb/client.d.ts +0 -12
- package/lib/aws/dynamodb/client.d.ts.map +0 -1
- package/lib/aws/dynamodb/client.js +0 -11
- package/lib/aws/dynamodb/client.js.map +0 -1
- package/lib/aws/dynamodb/expr.d.ts +0 -41
- package/lib/aws/dynamodb/expr.d.ts.map +0 -1
- package/lib/aws/dynamodb/expr.js +0 -1
- package/lib/aws/dynamodb/expr.js.map +0 -1
- package/lib/aws/dynamodb/index.d.ts +0 -10
- package/lib/aws/dynamodb/index.d.ts.map +0 -1
- package/lib/aws/dynamodb/index.js +0 -9
- package/lib/aws/dynamodb/index.js.map +0 -1
- package/lib/aws/dynamodb/projection.d.ts +0 -25
- package/lib/aws/dynamodb/projection.d.ts.map +0 -1
- package/lib/aws/dynamodb/projection.js +0 -1
- package/lib/aws/dynamodb/projection.js.map +0 -1
- package/lib/aws/dynamodb/secondary-index.d.ts +0 -26
- package/lib/aws/dynamodb/secondary-index.d.ts.map +0 -1
- package/lib/aws/dynamodb/secondary-index.js +0 -4
- package/lib/aws/dynamodb/secondary-index.js.map +0 -1
- package/lib/aws/dynamodb/table.d.ts +0 -59
- package/lib/aws/dynamodb/table.d.ts.map +0 -1
- package/lib/aws/dynamodb/table.get-item.d.ts +0 -57
- package/lib/aws/dynamodb/table.get-item.d.ts.map +0 -1
- package/lib/aws/dynamodb/table.get-item.js +0 -77
- package/lib/aws/dynamodb/table.get-item.js.map +0 -1
- package/lib/aws/dynamodb/table.js +0 -4
- package/lib/aws/dynamodb/table.js.map +0 -1
- package/lib/aws/dynamodb/table.provider.d.ts +0 -7
- package/lib/aws/dynamodb/table.provider.d.ts.map +0 -1
- package/lib/aws/dynamodb/table.provider.js +0 -196
- package/lib/aws/dynamodb/table.provider.js.map +0 -1
- package/lib/aws/ec2/client.d.ts +0 -12
- package/lib/aws/ec2/client.d.ts.map +0 -1
- package/lib/aws/ec2/client.js +0 -11
- package/lib/aws/ec2/client.js.map +0 -1
- package/lib/aws/ec2/index.d.ts +0 -15
- package/lib/aws/ec2/index.d.ts.map +0 -1
- package/lib/aws/ec2/index.js +0 -15
- package/lib/aws/ec2/index.js.map +0 -1
- package/lib/aws/ec2/internet-gateway.d.ts +0 -65
- package/lib/aws/ec2/internet-gateway.d.ts.map +0 -1
- package/lib/aws/ec2/internet-gateway.js +0 -4
- package/lib/aws/ec2/internet-gateway.js.map +0 -1
- package/lib/aws/ec2/internet-gateway.provider.d.ts +0 -6
- package/lib/aws/ec2/internet-gateway.provider.d.ts.map +0 -1
- package/lib/aws/ec2/internet-gateway.provider.js +0 -193
- package/lib/aws/ec2/internet-gateway.provider.js.map +0 -1
- package/lib/aws/ec2/route-table-association.d.ts +0 -63
- package/lib/aws/ec2/route-table-association.d.ts.map +0 -1
- package/lib/aws/ec2/route-table-association.js +0 -4
- package/lib/aws/ec2/route-table-association.js.map +0 -1
- package/lib/aws/ec2/route-table-association.provider.d.ts +0 -4
- package/lib/aws/ec2/route-table-association.provider.d.ts.map +0 -1
- package/lib/aws/ec2/route-table-association.provider.js +0 -121
- package/lib/aws/ec2/route-table-association.provider.js.map +0 -1
- package/lib/aws/ec2/route-table.d.ts +0 -159
- package/lib/aws/ec2/route-table.d.ts.map +0 -1
- package/lib/aws/ec2/route-table.js +0 -4
- package/lib/aws/ec2/route-table.js.map +0 -1
- package/lib/aws/ec2/route-table.provider.d.ts +0 -6
- package/lib/aws/ec2/route-table.provider.d.ts.map +0 -1
- package/lib/aws/ec2/route-table.provider.js +0 -213
- package/lib/aws/ec2/route-table.provider.js.map +0 -1
- package/lib/aws/ec2/route.d.ts +0 -155
- package/lib/aws/ec2/route.d.ts.map +0 -1
- package/lib/aws/ec2/route.js +0 -3
- package/lib/aws/ec2/route.js.map +0 -1
- package/lib/aws/ec2/route.provider.d.ts +0 -4
- package/lib/aws/ec2/route.provider.d.ts.map +0 -1
- package/lib/aws/ec2/route.provider.js +0 -166
- package/lib/aws/ec2/route.provider.js.map +0 -1
- package/lib/aws/ec2/subnet.d.ts +0 -175
- package/lib/aws/ec2/subnet.d.ts.map +0 -1
- package/lib/aws/ec2/subnet.js +0 -4
- package/lib/aws/ec2/subnet.js.map +0 -1
- package/lib/aws/ec2/subnet.provider.d.ts +0 -4
- package/lib/aws/ec2/subnet.provider.d.ts.map +0 -1
- package/lib/aws/ec2/subnet.provider.js +0 -250
- package/lib/aws/ec2/subnet.provider.js.map +0 -1
- package/lib/aws/ec2/vpc.d.ts +0 -136
- package/lib/aws/ec2/vpc.d.ts.map +0 -1
- package/lib/aws/ec2/vpc.js +0 -4
- package/lib/aws/ec2/vpc.js.map +0 -1
- package/lib/aws/ec2/vpc.provider.d.ts +0 -6
- package/lib/aws/ec2/vpc.provider.d.ts.map +0 -1
- package/lib/aws/ec2/vpc.provider.js +0 -205
- package/lib/aws/ec2/vpc.provider.js.map +0 -1
- package/lib/aws/iam.d.ts +0 -23
- package/lib/aws/iam.d.ts.map +0 -1
- package/lib/aws/iam.js +0 -7
- package/lib/aws/iam.js.map +0 -1
- package/lib/aws/index.d.ts +0 -28
- package/lib/aws/index.d.ts.map +0 -1
- package/lib/aws/index.js +0 -21
- package/lib/aws/index.js.map +0 -1
- package/lib/aws/lambda/client.d.ts +0 -8
- package/lib/aws/lambda/client.d.ts.map +0 -1
- package/lib/aws/lambda/client.js +0 -7
- package/lib/aws/lambda/client.js.map +0 -1
- package/lib/aws/lambda/consume.d.ts +0 -16
- package/lib/aws/lambda/consume.d.ts.map +0 -1
- package/lib/aws/lambda/consume.js +0 -30
- package/lib/aws/lambda/consume.js.map +0 -1
- package/lib/aws/lambda/function.d.ts +0 -41
- package/lib/aws/lambda/function.d.ts.map +0 -1
- package/lib/aws/lambda/function.handler.d.ts +0 -7
- package/lib/aws/lambda/function.handler.d.ts.map +0 -1
- package/lib/aws/lambda/function.handler.js +0 -8
- package/lib/aws/lambda/function.handler.js.map +0 -1
- package/lib/aws/lambda/function.invoke.d.ts +0 -12
- package/lib/aws/lambda/function.invoke.d.ts.map +0 -1
- package/lib/aws/lambda/function.invoke.js +0 -33
- package/lib/aws/lambda/function.invoke.js.map +0 -1
- package/lib/aws/lambda/function.js +0 -3
- package/lib/aws/lambda/function.js.map +0 -1
- package/lib/aws/lambda/function.provider.d.ts +0 -10
- package/lib/aws/lambda/function.provider.d.ts.map +0 -1
- package/lib/aws/lambda/function.provider.js +0 -464
- package/lib/aws/lambda/function.provider.js.map +0 -1
- package/lib/aws/lambda/index.d.ts +0 -9
- package/lib/aws/lambda/index.d.ts.map +0 -1
- package/lib/aws/lambda/index.js +0 -10
- package/lib/aws/lambda/index.js.map +0 -1
- package/lib/aws/lambda/serve.d.ts +0 -12
- package/lib/aws/lambda/serve.d.ts.map +0 -1
- package/lib/aws/lambda/serve.js +0 -7
- package/lib/aws/lambda/serve.js.map +0 -1
- package/lib/aws/parse-ini.d.ts +0 -4
- package/lib/aws/parse-ini.d.ts.map +0 -1
- package/lib/aws/parse-ini.js +0 -67
- package/lib/aws/parse-ini.js.map +0 -1
- package/lib/aws/profile.d.ts +0 -6
- package/lib/aws/profile.d.ts.map +0 -1
- package/lib/aws/profile.js +0 -4
- package/lib/aws/profile.js.map +0 -1
- package/lib/aws/region.d.ts +0 -31
- package/lib/aws/region.d.ts.map +0 -1
- package/lib/aws/region.js +0 -46
- package/lib/aws/region.js.map +0 -1
- package/lib/aws/s3.d.ts +0 -8
- package/lib/aws/s3.d.ts.map +0 -1
- package/lib/aws/s3.js +0 -7
- package/lib/aws/s3.js.map +0 -1
- package/lib/aws/sqs/client.d.ts +0 -12
- package/lib/aws/sqs/client.d.ts.map +0 -1
- package/lib/aws/sqs/client.js +0 -11
- package/lib/aws/sqs/client.js.map +0 -1
- package/lib/aws/sqs/index.d.ts +0 -8
- package/lib/aws/sqs/index.d.ts.map +0 -1
- package/lib/aws/sqs/index.js +0 -8
- package/lib/aws/sqs/index.js.map +0 -1
- package/lib/aws/sqs/queue.consume.d.ts +0 -12
- package/lib/aws/sqs/queue.consume.d.ts.map +0 -1
- package/lib/aws/sqs/queue.consume.js +0 -2
- package/lib/aws/sqs/queue.consume.js.map +0 -1
- package/lib/aws/sqs/queue.d.ts +0 -81
- package/lib/aws/sqs/queue.d.ts.map +0 -1
- package/lib/aws/sqs/queue.event-source.d.ts +0 -22
- package/lib/aws/sqs/queue.event-source.d.ts.map +0 -1
- package/lib/aws/sqs/queue.event-source.js +0 -130
- package/lib/aws/sqs/queue.event-source.js.map +0 -1
- package/lib/aws/sqs/queue.js +0 -3
- package/lib/aws/sqs/queue.js.map +0 -1
- package/lib/aws/sqs/queue.provider.d.ts +0 -6
- package/lib/aws/sqs/queue.provider.d.ts.map +0 -1
- package/lib/aws/sqs/queue.provider.js +0 -87
- package/lib/aws/sqs/queue.provider.js.map +0 -1
- package/lib/aws/sqs/queue.send-message.d.ts +0 -13
- package/lib/aws/sqs/queue.send-message.d.ts.map +0 -1
- package/lib/aws/sqs/queue.send-message.js +0 -34
- package/lib/aws/sqs/queue.send-message.js.map +0 -1
- package/lib/aws/sts.d.ts +0 -8
- package/lib/aws/sts.d.ts.map +0 -1
- package/lib/aws/sts.js +0 -7
- package/lib/aws/sts.js.map +0 -1
- package/lib/aws/zip.d.ts +0 -3
- package/lib/aws/zip.d.ts.map +0 -1
- package/lib/aws/zip.js +0 -12
- package/lib/aws/zip.js.map +0 -1
- package/lib/binding.d.ts +0 -106
- package/lib/binding.d.ts.map +0 -1
- package/lib/binding.js +0 -27
- package/lib/binding.js.map +0 -1
- package/lib/capability.d.ts +0 -49
- package/lib/capability.d.ts.map +0 -1
- package/lib/capability.js +0 -1
- package/lib/capability.js.map +0 -1
- package/lib/cli/components/ApprovePlan.d.ts +0 -8
- package/lib/cli/components/ApprovePlan.d.ts.map +0 -1
- package/lib/cli/components/ApprovePlan.js +0 -30
- package/lib/cli/components/ApprovePlan.js.map +0 -1
- package/lib/cli/components/Plan.d.ts +0 -7
- package/lib/cli/components/Plan.d.ts.map +0 -1
- package/lib/cli/components/Plan.js +0 -100
- package/lib/cli/components/Plan.js.map +0 -1
- package/lib/cli/components/PlanProgress.d.ts +0 -13
- package/lib/cli/components/PlanProgress.d.ts.map +0 -1
- package/lib/cli/components/PlanProgress.js +0 -176
- package/lib/cli/components/PlanProgress.js.map +0 -1
- package/lib/cli/ink-service.d.ts +0 -4
- package/lib/cli/ink-service.d.ts.map +0 -1
- package/lib/cli/ink-service.js +0 -43
- package/lib/cli/ink-service.js.map +0 -1
- package/lib/cli/service.d.ts +0 -21
- package/lib/cli/service.d.ts.map +0 -1
- package/lib/cli/service.js +0 -5
- package/lib/cli/service.js.map +0 -1
- package/lib/cloudflare/account.d.ts +0 -10
- package/lib/cloudflare/account.d.ts.map +0 -1
- package/lib/cloudflare/account.js +0 -24
- package/lib/cloudflare/account.js.map +0 -1
- package/lib/cloudflare/api.d.ts +0 -36
- package/lib/cloudflare/api.d.ts.map +0 -1
- package/lib/cloudflare/api.js +0 -100
- package/lib/cloudflare/api.js.map +0 -1
- package/lib/cloudflare/config.d.ts +0 -9
- package/lib/cloudflare/config.d.ts.map +0 -1
- package/lib/cloudflare/config.js +0 -1
- package/lib/cloudflare/config.js.map +0 -1
- package/lib/cloudflare/context.d.ts +0 -27
- package/lib/cloudflare/context.d.ts.map +0 -1
- package/lib/cloudflare/context.js +0 -24
- package/lib/cloudflare/context.js.map +0 -1
- package/lib/cloudflare/index.d.ts +0 -8
- package/lib/cloudflare/index.d.ts.map +0 -1
- package/lib/cloudflare/index.js +0 -8
- package/lib/cloudflare/index.js.map +0 -1
- package/lib/cloudflare/kv/index.d.ts +0 -4
- package/lib/cloudflare/kv/index.d.ts.map +0 -1
- package/lib/cloudflare/kv/index.js +0 -4
- package/lib/cloudflare/kv/index.js.map +0 -1
- package/lib/cloudflare/kv/namespace.binding.d.ts +0 -10
- package/lib/cloudflare/kv/namespace.binding.d.ts.map +0 -1
- package/lib/cloudflare/kv/namespace.binding.js +0 -15
- package/lib/cloudflare/kv/namespace.binding.js.map +0 -1
- package/lib/cloudflare/kv/namespace.client.d.ts +0 -11
- package/lib/cloudflare/kv/namespace.client.d.ts.map +0 -1
- package/lib/cloudflare/kv/namespace.client.js +0 -31
- package/lib/cloudflare/kv/namespace.client.js.map +0 -1
- package/lib/cloudflare/kv/namespace.d.ts +0 -24
- package/lib/cloudflare/kv/namespace.d.ts.map +0 -1
- package/lib/cloudflare/kv/namespace.js +0 -3
- package/lib/cloudflare/kv/namespace.js.map +0 -1
- package/lib/cloudflare/kv/namespace.provider.d.ts +0 -6
- package/lib/cloudflare/kv/namespace.provider.d.ts.map +0 -1
- package/lib/cloudflare/kv/namespace.provider.js +0 -87
- package/lib/cloudflare/kv/namespace.provider.js.map +0 -1
- package/lib/cloudflare/live.d.ts +0 -11
- package/lib/cloudflare/live.d.ts.map +0 -1
- package/lib/cloudflare/live.js +0 -15
- package/lib/cloudflare/live.js.map +0 -1
- package/lib/cloudflare/r2/bucket.binding.d.ts +0 -10
- package/lib/cloudflare/r2/bucket.binding.d.ts.map +0 -1
- package/lib/cloudflare/r2/bucket.binding.js +0 -18
- package/lib/cloudflare/r2/bucket.binding.js.map +0 -1
- package/lib/cloudflare/r2/bucket.client.d.ts +0 -8
- package/lib/cloudflare/r2/bucket.client.d.ts.map +0 -1
- package/lib/cloudflare/r2/bucket.client.js +0 -9
- package/lib/cloudflare/r2/bucket.client.js.map +0 -1
- package/lib/cloudflare/r2/bucket.d.ts +0 -33
- package/lib/cloudflare/r2/bucket.d.ts.map +0 -1
- package/lib/cloudflare/r2/bucket.del.d.ts +0 -4
- package/lib/cloudflare/r2/bucket.del.d.ts.map +0 -1
- package/lib/cloudflare/r2/bucket.del.js +0 -7
- package/lib/cloudflare/r2/bucket.del.js.map +0 -1
- package/lib/cloudflare/r2/bucket.get.d.ts +0 -5
- package/lib/cloudflare/r2/bucket.get.d.ts.map +0 -1
- package/lib/cloudflare/r2/bucket.get.js +0 -7
- package/lib/cloudflare/r2/bucket.get.js.map +0 -1
- package/lib/cloudflare/r2/bucket.head.d.ts +0 -4
- package/lib/cloudflare/r2/bucket.head.d.ts.map +0 -1
- package/lib/cloudflare/r2/bucket.head.js +0 -7
- package/lib/cloudflare/r2/bucket.head.js.map +0 -1
- package/lib/cloudflare/r2/bucket.js +0 -3
- package/lib/cloudflare/r2/bucket.js.map +0 -1
- package/lib/cloudflare/r2/bucket.list.d.ts +0 -5
- package/lib/cloudflare/r2/bucket.list.d.ts.map +0 -1
- package/lib/cloudflare/r2/bucket.list.js +0 -7
- package/lib/cloudflare/r2/bucket.list.js.map +0 -1
- package/lib/cloudflare/r2/bucket.multipart.d.ts +0 -19
- package/lib/cloudflare/r2/bucket.multipart.d.ts.map +0 -1
- package/lib/cloudflare/r2/bucket.multipart.js +0 -25
- package/lib/cloudflare/r2/bucket.multipart.js.map +0 -1
- package/lib/cloudflare/r2/bucket.provider.d.ts +0 -5
- package/lib/cloudflare/r2/bucket.provider.d.ts.map +0 -1
- package/lib/cloudflare/r2/bucket.provider.js +0 -78
- package/lib/cloudflare/r2/bucket.provider.js.map +0 -1
- package/lib/cloudflare/r2/bucket.put.d.ts +0 -6
- package/lib/cloudflare/r2/bucket.put.d.ts.map +0 -1
- package/lib/cloudflare/r2/bucket.put.js +0 -8
- package/lib/cloudflare/r2/bucket.put.js.map +0 -1
- package/lib/cloudflare/r2/index.d.ts +0 -10
- package/lib/cloudflare/r2/index.d.ts.map +0 -1
- package/lib/cloudflare/r2/index.js +0 -10
- package/lib/cloudflare/r2/index.js.map +0 -1
- package/lib/cloudflare/stream.d.ts +0 -10
- package/lib/cloudflare/stream.d.ts.map +0 -1
- package/lib/cloudflare/stream.js +0 -16
- package/lib/cloudflare/stream.js.map +0 -1
- package/lib/cloudflare/worker/assets.fetch.d.ts +0 -9
- package/lib/cloudflare/worker/assets.fetch.d.ts.map +0 -1
- package/lib/cloudflare/worker/assets.fetch.js +0 -12
- package/lib/cloudflare/worker/assets.fetch.js.map +0 -1
- package/lib/cloudflare/worker/assets.provider.d.ts +0 -66
- package/lib/cloudflare/worker/assets.provider.d.ts.map +0 -1
- package/lib/cloudflare/worker/assets.provider.js +0 -145
- package/lib/cloudflare/worker/assets.provider.js.map +0 -1
- package/lib/cloudflare/worker/index.d.ts +0 -5
- package/lib/cloudflare/worker/index.d.ts.map +0 -1
- package/lib/cloudflare/worker/index.js +0 -5
- package/lib/cloudflare/worker/index.js.map +0 -1
- package/lib/cloudflare/worker/worker.d.ts +0 -66
- package/lib/cloudflare/worker/worker.d.ts.map +0 -1
- package/lib/cloudflare/worker/worker.handler.d.ts +0 -11
- package/lib/cloudflare/worker/worker.handler.d.ts.map +0 -1
- package/lib/cloudflare/worker/worker.handler.js +0 -15
- package/lib/cloudflare/worker/worker.handler.js.map +0 -1
- package/lib/cloudflare/worker/worker.js +0 -4
- package/lib/cloudflare/worker/worker.js.map +0 -1
- package/lib/cloudflare/worker/worker.provider.d.ts +0 -10
- package/lib/cloudflare/worker/worker.provider.d.ts.map +0 -1
- package/lib/cloudflare/worker/worker.provider.js +0 -225
- package/lib/cloudflare/worker/worker.provider.js.map +0 -1
- package/lib/cloudflare/worker/worker.serve.d.ts +0 -39
- package/lib/cloudflare/worker/worker.serve.d.ts.map +0 -1
- package/lib/cloudflare/worker/worker.serve.js +0 -4
- package/lib/cloudflare/worker/worker.serve.js.map +0 -1
- package/lib/data.d.ts +0 -3
- package/lib/data.d.ts.map +0 -1
- package/lib/data.js +0 -8
- package/lib/data.js.map +0 -1
- package/lib/destroy.d.ts +0 -2
- package/lib/destroy.d.ts.map +0 -1
- package/lib/destroy.js +0 -3
- package/lib/destroy.js.map +0 -1
- package/lib/diff.d.ts +0 -18
- package/lib/diff.d.ts.map +0 -1
- package/lib/diff.js +0 -22
- package/lib/diff.js.map +0 -1
- package/lib/dot-alchemy.d.ts +0 -10
- package/lib/dot-alchemy.d.ts.map +0 -1
- package/lib/dot-alchemy.js +0 -15
- package/lib/dot-alchemy.js.map +0 -1
- package/lib/env.d.ts +0 -9
- package/lib/env.d.ts.map +0 -1
- package/lib/env.js +0 -19
- package/lib/env.js.map +0 -1
- package/lib/esbuild.d.ts +0 -28
- package/lib/esbuild.d.ts.map +0 -1
- package/lib/esbuild.js +0 -63
- package/lib/esbuild.js.map +0 -1
- package/lib/event.d.ts +0 -16
- package/lib/event.d.ts.map +0 -1
- package/lib/event.js +0 -1
- package/lib/event.js.map +0 -1
- package/lib/exports.d.ts +0 -9
- package/lib/exports.d.ts.map +0 -1
- package/lib/exports.js +0 -13
- package/lib/exports.js.map +0 -1
- package/lib/index.d.ts +0 -27
- package/lib/index.d.ts.map +0 -1
- package/lib/index.js +0 -27
- package/lib/index.js.map +0 -1
- package/lib/input.d.ts +0 -32
- package/lib/input.d.ts.map +0 -1
- package/lib/input.js +0 -1
- package/lib/input.js.map +0 -1
- package/lib/instance-id.d.ts +0 -12
- package/lib/instance-id.d.ts.map +0 -1
- package/lib/instance-id.js +0 -16
- package/lib/instance-id.js.map +0 -1
- package/lib/output.d.ts +0 -145
- package/lib/output.d.ts.map +0 -1
- package/lib/output.js +0 -283
- package/lib/output.js.map +0 -1
- package/lib/phase.d.ts +0 -2
- package/lib/phase.d.ts.map +0 -1
- package/lib/phase.js +0 -1
- package/lib/phase.js.map +0 -1
- package/lib/physical-name.d.ts +0 -28
- package/lib/physical-name.d.ts.map +0 -1
- package/lib/physical-name.js +0 -55
- package/lib/physical-name.js.map +0 -1
- package/lib/plan.d.ts +0 -135
- package/lib/plan.d.ts.map +0 -1
- package/lib/plan.js +0 -686
- package/lib/plan.js.map +0 -1
- package/lib/policy.d.ts +0 -54
- package/lib/policy.d.ts.map +0 -1
- package/lib/policy.js +0 -24
- package/lib/policy.js.map +0 -1
- package/lib/provider.d.ts +0 -71
- package/lib/provider.d.ts.map +0 -1
- package/lib/provider.js +0 -11
- package/lib/provider.js.map +0 -1
- package/lib/ref.d.ts +0 -14
- package/lib/ref.d.ts.map +0 -1
- package/lib/ref.js +0 -21
- package/lib/ref.js.map +0 -1
- package/lib/reporter.d.ts +0 -8
- package/lib/reporter.d.ts.map +0 -1
- package/lib/reporter.js +0 -4
- package/lib/reporter.js.map +0 -1
- package/lib/resource.d.ts +0 -36
- package/lib/resource.d.ts.map +0 -1
- package/lib/resource.js +0 -26
- package/lib/resource.js.map +0 -1
- package/lib/runtime.d.ts +0 -40
- package/lib/runtime.d.ts.map +0 -1
- package/lib/runtime.js +0 -54
- package/lib/runtime.js.map +0 -1
- package/lib/schema.d.ts +0 -37
- package/lib/schema.d.ts.map +0 -1
- package/lib/schema.js +0 -61
- package/lib/schema.js.map +0 -1
- package/lib/service.d.ts +0 -36
- package/lib/service.d.ts.map +0 -1
- package/lib/service.js +0 -4
- package/lib/service.js.map +0 -1
- package/lib/sha256.d.ts +0 -5
- package/lib/sha256.d.ts.map +0 -1
- package/lib/sha256.js +0 -16
- package/lib/sha256.js.map +0 -1
- package/lib/stack.d.ts +0 -60
- package/lib/stack.d.ts.map +0 -1
- package/lib/stack.js +0 -11
- package/lib/stack.js.map +0 -1
- package/lib/stage.d.ts +0 -39
- package/lib/stage.d.ts.map +0 -1
- package/lib/stage.js +0 -32
- package/lib/stage.js.map +0 -1
- package/lib/state.d.ts +0 -157
- package/lib/state.d.ts.map +0 -1
- package/lib/state.js +0 -71
- package/lib/state.js.map +0 -1
- package/lib/tags.d.ts +0 -32
- package/lib/tags.d.ts.map +0 -1
- package/lib/tags.js +0 -49
- package/lib/tags.js.map +0 -1
- package/lib/test.d.ts +0 -35
- package/lib/test.d.ts.map +0 -1
- package/lib/test.js +0 -68
- package/lib/test.js.map +0 -1
- package/lib/todo.d.ts +0 -3
- package/lib/todo.d.ts.map +0 -1
- package/lib/todo.js +0 -3
- package/lib/todo.js.map +0 -1
- package/lib/tsconfig.test.tsbuildinfo +0 -1
- package/lib/type.d.ts +0 -6
- package/lib/type.d.ts.map +0 -1
- package/lib/type.js +0 -3
- package/lib/type.js.map +0 -1
- package/lib/unknown.d.ts +0 -4
- package/lib/unknown.d.ts.map +0 -1
- package/lib/unknown.js +0 -4
- package/lib/unknown.js.map +0 -1
- package/lib/user.d.ts +0 -3
- package/lib/user.d.ts.map +0 -1
- package/lib/user.js +0 -3
- package/lib/user.js.map +0 -1
- package/lib/util.d.ts +0 -6
- package/lib/util.d.ts.map +0 -1
- package/lib/util.js +0 -9
- package/lib/util.js.map +0 -1
- package/src/$.ts +0 -17
- package/src/app.ts +0 -15
- package/src/apply.ts +0 -858
- package/src/aws/account.ts +0 -57
- package/src/aws/assets.ts +0 -8
- package/src/aws/bundle.ts +0 -5
- package/src/aws/client.ts +0 -46
- package/src/aws/config.ts +0 -16
- package/src/aws/credentials.ts +0 -444
- package/src/aws/dynamodb/attribute-value.ts +0 -240
- package/src/aws/dynamodb/client.ts +0 -20
- package/src/aws/dynamodb/index.ts +0 -12
- package/src/aws/dynamodb/projection.ts +0 -159
- package/src/aws/dynamodb/secondary-index.ts +0 -45
- package/src/aws/dynamodb/table.get-item.ts +0 -173
- package/src/aws/dynamodb/table.provider.ts +0 -288
- package/src/aws/dynamodb/table.ts +0 -101
- package/src/aws/ec2/client.ts +0 -20
- package/src/aws/ec2/index.ts +0 -15
- package/src/aws/ec2/internet-gateway.provider.ts +0 -316
- package/src/aws/ec2/internet-gateway.ts +0 -79
- package/src/aws/ec2/route-table-association.provider.ts +0 -214
- package/src/aws/ec2/route-table-association.ts +0 -82
- package/src/aws/ec2/route-table.provider.ts +0 -306
- package/src/aws/ec2/route-table.ts +0 -175
- package/src/aws/ec2/route.provider.ts +0 -213
- package/src/aws/ec2/route.ts +0 -192
- package/src/aws/ec2/subnet.provider.ts +0 -358
- package/src/aws/ec2/subnet.ts +0 -213
- package/src/aws/ec2/vpc.provider.ts +0 -294
- package/src/aws/ec2/vpc.ts +0 -165
- package/src/aws/iam.ts +0 -30
- package/src/aws/index.ts +0 -63
- package/src/aws/lambda/client.ts +0 -14
- package/src/aws/lambda/consume.ts +0 -64
- package/src/aws/lambda/function.handler.ts +0 -30
- package/src/aws/lambda/function.invoke.ts +0 -44
- package/src/aws/lambda/function.provider.ts +0 -675
- package/src/aws/lambda/function.ts +0 -48
- package/src/aws/lambda/index.ts +0 -11
- package/src/aws/lambda/serve.ts +0 -29
- package/src/aws/parse-ini.ts +0 -80
- package/src/aws/profile.ts +0 -3
- package/src/aws/region.ts +0 -76
- package/src/aws/s3.ts +0 -10
- package/src/aws/sqs/client.ts +0 -20
- package/src/aws/sqs/index.ts +0 -8
- package/src/aws/sqs/queue.consume.ts +0 -13
- package/src/aws/sqs/queue.event-source.ts +0 -227
- package/src/aws/sqs/queue.provider.ts +0 -108
- package/src/aws/sqs/queue.send-message.ts +0 -48
- package/src/aws/sqs/queue.ts +0 -91
- package/src/aws/sts.ts +0 -13
- package/src/aws/zip.ts +0 -17
- package/src/binding.ts +0 -240
- package/src/capability.ts +0 -63
- package/src/cli/components/ApprovePlan.tsx +0 -44
- package/src/cli/components/Plan.tsx +0 -155
- package/src/cli/components/PlanProgress.tsx +0 -224
- package/src/cli/index.ts +0 -2
- package/src/cli/ink-service.tsx +0 -61
- package/src/cli/service.ts +0 -23
- package/src/cloudflare/account.ts +0 -37
- package/src/cloudflare/api.ts +0 -156
- package/src/cloudflare/config.ts +0 -7
- package/src/cloudflare/context.ts +0 -49
- package/src/cloudflare/index.ts +0 -8
- package/src/cloudflare/kv/index.ts +0 -3
- package/src/cloudflare/kv/namespace.binding.ts +0 -27
- package/src/cloudflare/kv/namespace.client.ts +0 -70
- package/src/cloudflare/kv/namespace.provider.ts +0 -105
- package/src/cloudflare/kv/namespace.ts +0 -30
- package/src/cloudflare/live.ts +0 -32
- package/src/cloudflare/r2/bucket.binding.ts +0 -29
- package/src/cloudflare/r2/bucket.client.ts +0 -22
- package/src/cloudflare/r2/bucket.del.ts +0 -11
- package/src/cloudflare/r2/bucket.get.ts +0 -13
- package/src/cloudflare/r2/bucket.head.ts +0 -11
- package/src/cloudflare/r2/bucket.list.ts +0 -12
- package/src/cloudflare/r2/bucket.multipart.ts +0 -55
- package/src/cloudflare/r2/bucket.provider.ts +0 -94
- package/src/cloudflare/r2/bucket.put.ts +0 -17
- package/src/cloudflare/r2/bucket.ts +0 -44
- package/src/cloudflare/r2/index.ts +0 -9
- package/src/cloudflare/stream.ts +0 -21
- package/src/cloudflare/worker/assets.fetch.ts +0 -29
- package/src/cloudflare/worker/assets.provider.ts +0 -249
- package/src/cloudflare/worker/index.ts +0 -4
- package/src/cloudflare/worker/worker.handler.ts +0 -39
- package/src/cloudflare/worker/worker.provider.ts +0 -279
- package/src/cloudflare/worker/worker.serve.ts +0 -22
- package/src/cloudflare/worker/worker.ts +0 -77
- package/src/destroy.ts +0 -3
- package/src/diff.ts +0 -48
- package/src/dot-alchemy.ts +0 -18
- package/src/env.ts +0 -39
- package/src/esbuild.ts +0 -98
- package/src/event.ts +0 -33
- package/src/exports.ts +0 -21
- package/src/input.ts +0 -81
- package/src/instance-id.ts +0 -20
- package/src/output.ts +0 -542
- package/src/phase.ts +0 -1
- package/src/physical-name.ts +0 -84
- package/src/plan.ts +0 -1123
- package/src/policy.ts +0 -128
- package/src/provider.ts +0 -112
- package/src/ref.ts +0 -48
- package/src/reporter.ts +0 -8
- package/src/resource.ts +0 -140
- package/src/runtime.ts +0 -152
- package/src/schema.ts +0 -102
- package/src/service.ts +0 -59
- package/src/sha256.ts +0 -23
- package/src/stack.ts +0 -116
- package/src/stage.ts +0 -85
- package/src/state.ts +0 -390
- package/src/tags.ts +0 -69
- package/src/test.ts +0 -172
- package/src/todo.ts +0 -4
- package/src/unknown.ts +0 -6
- package/src/user.ts +0 -4
- package/src/util.ts +0 -21
- /package/src/{aws/arn.ts → AWS/Arn.ts} +0 -0
- /package/src/{aws/dynamodb/expr.ts → AWS/DynamoDB/Expr.ts} +0 -0
- /package/src/{assert-never.ts → Util/assert-never.ts} +0 -0
- /package/src/{data.ts → Util/data.ts} +0 -0
- /package/src/{type.ts → Util/type.ts} +0 -0
package/lib/cli/index.d.ts
CHANGED
|
@@ -1,39 +1,100 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import * as Effect$1 from "effect/Effect";
|
|
3
|
-
import { Effect } from "effect/Effect";
|
|
4
|
-
import * as
|
|
3
|
+
import { Effect, Yieldable } from "effect/Effect";
|
|
4
|
+
import * as ServiceMap from "effect/ServiceMap";
|
|
5
5
|
import * as Layer from "effect/Layer";
|
|
6
|
+
import * as Stream from "effect/Stream";
|
|
6
7
|
import * as S from "effect/Schema";
|
|
7
|
-
import {
|
|
8
|
-
import "
|
|
9
|
-
import "
|
|
8
|
+
import { Pipeable } from "effect/Pipeable";
|
|
9
|
+
import { Scope } from "effect/Scope";
|
|
10
|
+
import { HttpBodyError } from "effect/unstable/http/HttpBody";
|
|
11
|
+
import { HttpServerError } from "effect/unstable/http/HttpServerError";
|
|
12
|
+
import { HttpServerRequest } from "effect/unstable/http/HttpServerRequest";
|
|
13
|
+
import * as HttpServerResponse from "effect/unstable/http/HttpServerResponse";
|
|
14
|
+
import "effect/FileSystem";
|
|
15
|
+
import "effect/Path";
|
|
10
16
|
|
|
11
|
-
//#region src/
|
|
12
|
-
type
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
17
|
+
//#region src/Util/data.d.ts
|
|
18
|
+
type Primitive = never | undefined | null | boolean | number | string | bigint | symbol;
|
|
19
|
+
//#endregion
|
|
20
|
+
//#region src/Http.d.ts
|
|
21
|
+
type HttpEffect<Req$1 = never> = Effect$1.Effect<HttpServerResponse.HttpServerResponse, HttpServerError | HttpBodyError, HttpServerRequest | Scope | Req$1>;
|
|
22
|
+
//#endregion
|
|
23
|
+
//#region src/ExecutionContext.d.ts
|
|
24
|
+
interface BaseExecutionContext {
|
|
25
|
+
Type: string;
|
|
26
|
+
id: string;
|
|
27
|
+
env: Record<string, any>;
|
|
28
|
+
get<T>(key: string): Effect$1.Effect<T>;
|
|
29
|
+
set(id: string, output: Output): Effect$1.Effect<string>;
|
|
30
|
+
exports?: Effect$1.Effect<Record<string, any>>;
|
|
31
|
+
serve?<Req$1 = never>(handler: HttpEffect<Req$1>): Effect$1.Effect<void, never, Req$1>;
|
|
32
|
+
}
|
|
33
|
+
interface ExecutionContext<Ctx extends BaseExecutionContext = BaseExecutionContext> extends ServiceMap.Service<`ExecutionContext<${Ctx["Type"]}>`, Ctx> {}
|
|
34
|
+
declare const ExecutionContext: ExecutionContext<BaseExecutionContext> & (<Ctx extends BaseExecutionContext>(type: Ctx["Type"]) => ExecutionContext<Ctx>);
|
|
35
|
+
//#endregion
|
|
36
|
+
//#region src/Namespace.d.ts
|
|
37
|
+
interface NamespaceNode {
|
|
38
|
+
Id: string;
|
|
39
|
+
Parent?: NamespaceNode;
|
|
16
40
|
}
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
41
|
+
//#endregion
|
|
42
|
+
//#region src/RemovalPolicy.d.ts
|
|
43
|
+
declare const RemovalPolicy_base: ServiceMap.ServiceClass<RemovalPolicy, "RemovalPolicy", "retain" | "destroy">;
|
|
44
|
+
declare class RemovalPolicy extends RemovalPolicy_base {}
|
|
45
|
+
//#endregion
|
|
46
|
+
//#region src/Resource.d.ts
|
|
47
|
+
type LogicalId = string;
|
|
48
|
+
interface ResourceBinding<Data = any> {
|
|
49
|
+
sid: string;
|
|
50
|
+
data: Data;
|
|
21
51
|
}
|
|
22
|
-
interface
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
52
|
+
interface ResourceLike<Type extends string = string, Props$2 extends object | undefined = any, Attributes$1 extends object = object, Binding = any> {
|
|
53
|
+
/**
|
|
54
|
+
* Namespace containing this Resource.
|
|
55
|
+
*/
|
|
56
|
+
Namespace: NamespaceNode | undefined;
|
|
57
|
+
/**
|
|
58
|
+
* Fully Qualified Name (namespace path + logical ID).
|
|
59
|
+
* Used as the unique key for state storage.
|
|
60
|
+
*/
|
|
61
|
+
FQN: string;
|
|
62
|
+
/**
|
|
63
|
+
* Type of the Resource (e.g. AWS.Lambda.Function)
|
|
64
|
+
*/
|
|
65
|
+
Type: Type;
|
|
66
|
+
/**
|
|
67
|
+
* Logical ID of the Resource (e.g. MyFunction)
|
|
68
|
+
*/
|
|
69
|
+
LogicalId: LogicalId;
|
|
70
|
+
/**
|
|
71
|
+
* Properties of the Resource.
|
|
72
|
+
*/
|
|
73
|
+
Props: Props$2;
|
|
74
|
+
/**
|
|
75
|
+
* Removal Policy of the Resource.
|
|
76
|
+
*/
|
|
77
|
+
RemovalPolicy: RemovalPolicy["Service"];
|
|
78
|
+
/** @internal phantom */
|
|
79
|
+
Attributes: Attributes$1;
|
|
80
|
+
/** @internal phantom */
|
|
81
|
+
Binding: Binding;
|
|
26
82
|
}
|
|
27
83
|
//#endregion
|
|
28
|
-
//#region src/
|
|
29
|
-
type
|
|
30
|
-
//#endregion
|
|
31
|
-
//#region src/state.d.ts
|
|
84
|
+
//#region src/State/ResourceState.d.ts
|
|
85
|
+
type ResourceState = CreatingResourceState | CreatedResourceState | UpdatingReourceState | UpdatedResourceState | DeletingResourceState | ReplacingResourceState | ReplacedResourceState;
|
|
32
86
|
type Props$1 = Record<string, any>;
|
|
33
87
|
type Attr = Record<string, any>;
|
|
34
88
|
type ResourceStatus = ResourceState["status"];
|
|
89
|
+
type ReplacementResourceState = ReplacingResourceState | ReplacedResourceState;
|
|
90
|
+
type ReplacementOldResourceState = CreatingResourceState | CreatedResourceState | UpdatingReourceState | UpdatedResourceState | DeletingResourceState | ReplacementResourceState;
|
|
35
91
|
interface BaseResourceState {
|
|
92
|
+
/** Type of the Resource (e.g. AWS.Lambda.Function) */
|
|
36
93
|
resourceType: string;
|
|
94
|
+
/** Namespace of the Resource */
|
|
95
|
+
namespace: NamespaceNode | undefined;
|
|
96
|
+
/** Fully Qualified Name (namespace path + logical ID) */
|
|
97
|
+
fqn: string;
|
|
37
98
|
/** Logical ID of the Resource (stable across creates, updates, deletes and replaces) */
|
|
38
99
|
logicalId: string;
|
|
39
100
|
/** A unique randomly generated token used to seed ID generation (only changes when replaced) */
|
|
@@ -42,14 +103,16 @@ interface BaseResourceState {
|
|
|
42
103
|
providerVersion: number;
|
|
43
104
|
/** Current status of the logical Resource */
|
|
44
105
|
status: ResourceStatus;
|
|
45
|
-
/** List of
|
|
106
|
+
/** List of FQNs of resources that depend on this resource */
|
|
46
107
|
downstream: string[];
|
|
47
108
|
/** List of Bindings attached to this Resource */
|
|
48
|
-
bindings
|
|
109
|
+
bindings: ResourceBinding[];
|
|
49
110
|
/** Desired state (input props) of this Resource */
|
|
50
111
|
props?: Props$1;
|
|
51
112
|
/** The output attributes of this Resource (if it has been created) */
|
|
52
113
|
attr?: Attr;
|
|
114
|
+
/** The removal policy of the resource */
|
|
115
|
+
removalPolicy?: RemovalPolicy["Service"];
|
|
53
116
|
}
|
|
54
117
|
interface CreatingResourceState extends BaseResourceState {
|
|
55
118
|
status: "creating";
|
|
@@ -70,6 +133,8 @@ interface UpdatingReourceState extends BaseResourceState {
|
|
|
70
133
|
old: {
|
|
71
134
|
/** The old resource properties that have been successfully applied. */
|
|
72
135
|
props: Props$1;
|
|
136
|
+
/** List of Bindings attached to this Resource */
|
|
137
|
+
bindings: any[];
|
|
73
138
|
/** The old output properties that have been successfully applied. */
|
|
74
139
|
attr: Attr;
|
|
75
140
|
};
|
|
@@ -91,7 +156,7 @@ interface ReplacingResourceState extends BaseResourceState {
|
|
|
91
156
|
/** Desired properties of the new resource (the replacement) */
|
|
92
157
|
props: Props$1;
|
|
93
158
|
/** Reference to the state of the old resource (the one being replaced) */
|
|
94
|
-
old:
|
|
159
|
+
old: ReplacementOldResourceState;
|
|
95
160
|
/** Whether the resource should be deleted before or after replacements */
|
|
96
161
|
deleteFirst: boolean;
|
|
97
162
|
}
|
|
@@ -102,439 +167,203 @@ interface ReplacedResourceState extends BaseResourceState {
|
|
|
102
167
|
/** Output attributes of the new resource (the replacement) */
|
|
103
168
|
attr: Attr;
|
|
104
169
|
/** Reference to the state of the old resource (the one being replaced) */
|
|
105
|
-
old:
|
|
170
|
+
old: ReplacementOldResourceState;
|
|
106
171
|
/** Whether the resource should be deleted before or after replacements */
|
|
107
172
|
deleteFirst: boolean;
|
|
108
173
|
}
|
|
109
|
-
type ResourceState = CreatingResourceState | CreatedResourceState | UpdatingReourceState | UpdatedResourceState | DeletingResourceState | ReplacingResourceState | ReplacedResourceState;
|
|
110
174
|
//#endregion
|
|
111
|
-
//#region src/
|
|
112
|
-
interface Output<A = any,
|
|
175
|
+
//#region src/Output.d.ts
|
|
176
|
+
interface Output<A = any, Req$1 = any> extends Pipeable {
|
|
177
|
+
/** @internal phantom */
|
|
113
178
|
readonly kind: string;
|
|
114
|
-
|
|
179
|
+
/** @internal phantom */
|
|
180
|
+
readonly A: A;
|
|
181
|
+
/** @internal phantom */
|
|
115
182
|
readonly req: Req$1;
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
type Of<A, Src$1 extends Resource = any, Req$1 = never> = [Extract<A, object>] extends [never] ? Output<A, Src$1, Req$1> : [Extract<A, any[]>] extends [never] ? Object$1<{ [attr in keyof A]: A[attr] }, Src$1, Req$1> : Array<Extract<A, any[]>, Src$1, Req$1>;
|
|
183
|
+
/** @internal phantom */
|
|
184
|
+
[Symbol.iterator](): Iterator<Yieldable<any, void, never, Req$1>, Accessor<A>, void>;
|
|
185
|
+
bind(id: string): Effect$1.Effect<Effect$1.Effect<A>, never, ExecutionContext>;
|
|
186
|
+
asEffect(): Effect$1.Effect<Accessor<A>, never, Req$1>;
|
|
121
187
|
}
|
|
122
|
-
|
|
123
|
-
type Array<A extends any[], Src$1 extends Resource, Req$1 = any> = Output<A, Src$1, Req$1> & { [i in Extract<keyof A, number>]: Output.Of<A[i], Src$1, Req$1> };
|
|
188
|
+
interface Accessor<A> extends Effect$1.Effect<A> {}
|
|
124
189
|
//#endregion
|
|
125
|
-
//#region src/
|
|
190
|
+
//#region src/Input.d.ts
|
|
126
191
|
type Function = (...args: any[]) => any;
|
|
127
192
|
type Constructor = new (...args: any[]) => any;
|
|
128
193
|
type PolicyLike = {
|
|
129
194
|
kind: "alchemy/Policy";
|
|
130
195
|
};
|
|
131
|
-
type Input<T> = T | (T extends S.Schema<any> ? never : Output<T, any
|
|
196
|
+
type Input<T> = T | Output<T> | Effect<T, any, any> | (T extends S.Schema<any> ? never : Output<T, any> | (T extends Primitive ? never : T extends any[] ? number extends T["length"] ? Input<T[number]>[] : Inputs<T> : T extends object ? { [K in keyof T]: Input<T[K]> } : never));
|
|
132
197
|
declare namespace Input {
|
|
133
|
-
type Resolve<T> = T extends
|
|
198
|
+
type Resolve<T> = T extends {
|
|
199
|
+
Type: string;
|
|
200
|
+
Attributes: infer Attributes;
|
|
201
|
+
} ? { [K in keyof Attributes]: Resolve<Attributes[K]> } : T extends Output<infer U> ? U : T extends Primitive | Constructor | Function | S.Schema<any> | PolicyLike ? T : T extends any[] ? ResolveArray<T> : T extends Record<string, any> ? { [k in keyof T]: Input.Resolve<T[k]> } : never;
|
|
134
202
|
type ResolveArray<T extends any[]> = number extends T["length"] ? Resolve<T[number]>[] : ResolveTuple<T>;
|
|
135
203
|
type ResolveTuple<T extends any[], Accum extends any[] = []> = T extends [infer H, ...infer Tail] ? ResolveTuple<Tail, [...Accum, Input.Resolve<H>]> : Accum;
|
|
136
204
|
type ResolveProps<Props$2 extends Record<string, any>> = { [k in keyof Props$2]: Input.Resolve<Props$2[k]> };
|
|
137
205
|
type ResolveOpaque<T> = true extends IsOut<T> ? ResolveOut<T> : Resolve<T>;
|
|
138
|
-
type IsOut<T> = T extends Output<infer
|
|
206
|
+
type IsOut<T> = T extends Output<infer _U> ? true : never;
|
|
139
207
|
type ResolveOut<T> = T extends Output<infer U> ? U : never;
|
|
140
208
|
}
|
|
141
209
|
type Inputs<T extends any[], Out extends any[] = []> = T extends [infer H, ...infer T] ? Inputs<T, [...Out, Input<H>]> : Out;
|
|
142
210
|
//#endregion
|
|
143
|
-
//#region src/
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
/**
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
*/
|
|
160
|
-
handler: Effect<(...inputs: Parameters<Handler>) => Effect<Effect.Success<ReturnType<Handler>>, Effect.Error<ReturnType<Handler>>, never>, never, Exclude<Effect.Context<ReturnType<Handler>>, Capability>>;
|
|
161
|
-
props: Props$2;
|
|
162
|
-
/** @internal phantom type of this resource's output attributes */
|
|
163
|
-
attr: Attr$1;
|
|
164
|
-
/** @internal phantom type of this resource's parent */
|
|
165
|
-
parent: unknown;
|
|
166
|
-
new (): Service<ID$1, F, Handler, Props$2, Attr$1, Base>;
|
|
167
|
-
}
|
|
168
|
-
interface Service<ID$1 extends string = string, F extends IRuntime = IRuntime, Handler extends RuntimeHandler = RuntimeHandler, Props$2 extends RuntimeProps<F, any> = RuntimeProps<F, any>, Attr$1 = (F & {
|
|
169
|
-
props: Props$2;
|
|
170
|
-
})["attr"], Base = unknown> extends IService<ID$1, F, Handler, Props$2, Attr$1, Base> {}
|
|
211
|
+
//#region src/Diff.d.ts
|
|
212
|
+
type Diff = NoopDiff | UpdateDiff | ReplaceDiff;
|
|
213
|
+
interface NoopDiff {
|
|
214
|
+
action: "noop";
|
|
215
|
+
stables?: undefined;
|
|
216
|
+
}
|
|
217
|
+
interface UpdateDiff {
|
|
218
|
+
action: "update";
|
|
219
|
+
/** properties that won't change as part of this update */
|
|
220
|
+
stables?: string[];
|
|
221
|
+
}
|
|
222
|
+
interface ReplaceDiff {
|
|
223
|
+
action: "replace";
|
|
224
|
+
deleteFirst?: boolean;
|
|
225
|
+
stables?: undefined;
|
|
226
|
+
}
|
|
171
227
|
//#endregion
|
|
172
|
-
//#region src/
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
228
|
+
//#region src/Provider.d.ts
|
|
229
|
+
type BindingData<Res extends ResourceLike> = [Res] extends [{
|
|
230
|
+
Binding: infer B;
|
|
231
|
+
}] ? ResourceBinding<B>[] : any[];
|
|
232
|
+
type Props<Res extends ResourceLike> = keyof Res["Props"] extends never ? Res["Props"] | undefined : Res["Props"];
|
|
233
|
+
interface LogLine {
|
|
234
|
+
timestamp: Date;
|
|
235
|
+
message: string;
|
|
236
|
+
}
|
|
237
|
+
interface LogsInput {
|
|
238
|
+
since?: Date;
|
|
239
|
+
limit?: number;
|
|
240
|
+
}
|
|
241
|
+
interface ProviderService<Res extends ResourceLike = ResourceLike, ReadReq = never, DiffReq = never, PrecreateReq = never, CreateReq = never, UpdateReq = never, DeleteReq = never, TailReq = never, LogsReq = never> {
|
|
177
242
|
/**
|
|
178
243
|
* The version of the provider.
|
|
179
244
|
*
|
|
180
245
|
* @default 0
|
|
181
246
|
*/
|
|
182
247
|
version?: number;
|
|
248
|
+
/**
|
|
249
|
+
* Returns a stream of log lines for a deployed resource.
|
|
250
|
+
* Used by `alchemy tail` to stream real-time logs.
|
|
251
|
+
*/
|
|
252
|
+
tail?(input: {
|
|
253
|
+
id: string;
|
|
254
|
+
instanceId: string;
|
|
255
|
+
props: Props<Res>;
|
|
256
|
+
output: Res["Attributes"];
|
|
257
|
+
}): Stream.Stream<LogLine, any, TailReq>;
|
|
258
|
+
/**
|
|
259
|
+
* Queries historical logs for a deployed resource.
|
|
260
|
+
* Used by `alchemy logs` to fetch past log entries.
|
|
261
|
+
*/
|
|
262
|
+
logs?(input: {
|
|
263
|
+
id: string;
|
|
264
|
+
instanceId: string;
|
|
265
|
+
props: Props<Res>;
|
|
266
|
+
output: Res["Attributes"];
|
|
267
|
+
options: LogsInput;
|
|
268
|
+
}): Effect$1.Effect<LogLine[], any, LogsReq>;
|
|
183
269
|
read?(input: {
|
|
184
270
|
id: string;
|
|
185
271
|
instanceId: string;
|
|
186
|
-
olds: Props<Res
|
|
187
|
-
output: Res["
|
|
188
|
-
|
|
189
|
-
}): Effect$1.Effect<Res["attr"] | undefined, any, ReadReq>;
|
|
272
|
+
olds: Props<Res>;
|
|
273
|
+
output: Res["Attributes"] | undefined;
|
|
274
|
+
}): Effect$1.Effect<Res["Attributes"] | undefined, any, ReadReq>;
|
|
190
275
|
/**
|
|
191
276
|
* Properties that are always stable across any update.
|
|
192
277
|
*/
|
|
193
|
-
stables?: Extract<keyof Res["
|
|
278
|
+
stables?: Extract<keyof Res["Attributes"], string>[];
|
|
194
279
|
diff?(input: {
|
|
195
280
|
id: string;
|
|
196
|
-
olds: Props<Res>;
|
|
197
281
|
instanceId: string;
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
282
|
+
olds: Props<Res>;
|
|
283
|
+
news: Input<Props<Res>>;
|
|
284
|
+
oldBindings: BindingData<Res>;
|
|
285
|
+
newBindings: Input<BindingData<Res>>;
|
|
286
|
+
output: Res["Attributes"] | undefined;
|
|
287
|
+
}): Effect$1.Effect<Diff | void, any, DiffReq>;
|
|
201
288
|
precreate?(input: {
|
|
202
289
|
id: string;
|
|
203
290
|
news: Props<Res>;
|
|
204
291
|
instanceId: string;
|
|
205
292
|
session: ScopedPlanStatusSession;
|
|
206
|
-
}): Effect$1.Effect<Res["
|
|
293
|
+
}): Effect$1.Effect<Res["Attributes"], any, PrecreateReq>;
|
|
207
294
|
create(input: {
|
|
208
295
|
id: string;
|
|
209
296
|
instanceId: string;
|
|
210
297
|
news: Props<Res>;
|
|
211
298
|
session: ScopedPlanStatusSession;
|
|
212
299
|
bindings: BindingData<Res>;
|
|
213
|
-
|
|
300
|
+
output?: Res["Attributes"];
|
|
301
|
+
}): Effect$1.Effect<Res["Attributes"], any, CreateReq>;
|
|
214
302
|
update(input: {
|
|
215
303
|
id: string;
|
|
216
304
|
instanceId: string;
|
|
217
305
|
news: Props<Res>;
|
|
218
306
|
olds: Props<Res>;
|
|
219
|
-
output: Res["
|
|
307
|
+
output: Res["Attributes"];
|
|
220
308
|
session: ScopedPlanStatusSession;
|
|
221
309
|
bindings: BindingData<Res>;
|
|
222
|
-
}): Effect$1.Effect<Res["
|
|
310
|
+
}): Effect$1.Effect<Res["Attributes"], any, UpdateReq>;
|
|
223
311
|
delete(input: {
|
|
224
312
|
id: string;
|
|
225
313
|
instanceId: string;
|
|
226
314
|
olds: Props<Res>;
|
|
227
|
-
output: Res["
|
|
315
|
+
output: Res["Attributes"];
|
|
228
316
|
session: ScopedPlanStatusSession;
|
|
229
317
|
bindings: BindingData<Res>;
|
|
230
318
|
}): Effect$1.Effect<void, any, DeleteReq>;
|
|
231
319
|
}
|
|
232
320
|
//#endregion
|
|
233
|
-
//#region src/
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
interface
|
|
241
|
-
id: ID$1;
|
|
242
|
-
type: Type;
|
|
243
|
-
Props: unknown;
|
|
244
|
-
props: Props$2;
|
|
245
|
-
base: Base;
|
|
246
|
-
/** @internal phantom */
|
|
247
|
-
attr: Attrs;
|
|
248
|
-
}
|
|
249
|
-
interface Resource<Type extends string = string, ID$1 extends string = string, Props$2 = unknown, Attrs = unknown, Base = unknown> extends IResource<Type, ID$1, Props$2, Attrs, Base> {
|
|
250
|
-
new (): Resource<Type, ID$1, Props$2, Attrs, Base>;
|
|
251
|
-
}
|
|
252
|
-
interface ResourceTags<R extends Resource<string, string, any, any>> {
|
|
253
|
-
of<S$1 extends ProviderService<R>>(service: S$1): S$1;
|
|
254
|
-
tag: Provider<R>;
|
|
255
|
-
effect<Err, Req$1, ReadReq = never, DiffReq = never, PrecreateReq = never, CreateReq = never, UpdateReq = never, DeleteReq = never>(eff: Effect<ProviderService<R, ReadReq, DiffReq, PrecreateReq, CreateReq, UpdateReq, DeleteReq>, Err, Req$1>): Layer.Layer<Provider<R>, Err, Exclude<Req$1 | ReadReq | DiffReq | PrecreateReq | CreateReq | UpdateReq | DeleteReq, InstanceId>>;
|
|
256
|
-
succeed<ReadReq = never, DiffReq = never, PrecreateReq = never, CreateReq = never, UpdateReq = never, DeleteReq = never>(service: ProviderService<R, ReadReq, DiffReq, PrecreateReq, CreateReq, UpdateReq, DeleteReq>): Layer.Layer<Provider<R>, never, Exclude<ReadReq | DiffReq | PrecreateReq | CreateReq | UpdateReq | DeleteReq, InstanceId>>;
|
|
257
|
-
}
|
|
258
|
-
declare const Resource: <Ctor extends (id: string, props: any) => Resource>(type: ReturnType<Ctor>["type"]) => Ctor & {
|
|
259
|
-
new (): ReturnType<Ctor> & {
|
|
260
|
-
parent: ReturnType<Ctor>;
|
|
261
|
-
};
|
|
262
|
-
type: ReturnType<Ctor>["type"];
|
|
263
|
-
parent: ReturnType<Ctor>;
|
|
264
|
-
provider: ResourceTags<ReturnType<Ctor>>;
|
|
265
|
-
} & {
|
|
266
|
-
type: ReturnType<Ctor>["type"];
|
|
267
|
-
provider: ResourceTags<ReturnType<Ctor>>;
|
|
268
|
-
};
|
|
269
|
-
//#endregion
|
|
270
|
-
//#region src/runtime.d.ts
|
|
271
|
-
type RuntimeHandler<Inputs$1 extends any[] = any[], Output$1 = any, Err = any, Req$1 = any> = (...inputs: Inputs$1) => Effect$1.Effect<Output$1, Err, Req$1>;
|
|
272
|
-
declare namespace RuntimeHandler {
|
|
273
|
-
type Caps<H$1 extends RuntimeHandler | unknown> = Extract<Effect$1.Effect.Context<ReturnType<Extract<H$1, RuntimeHandler>>>, Capability>;
|
|
274
|
-
}
|
|
275
|
-
declare namespace Runtime {
|
|
276
|
-
type Binding<F, Cap> = F extends {
|
|
277
|
-
readonly Binding: unknown;
|
|
278
|
-
} ? (F & {
|
|
279
|
-
readonly cap: Cap;
|
|
280
|
-
})["Binding"] : {
|
|
281
|
-
readonly F: F;
|
|
282
|
-
readonly cap: Types.Contravariant<Cap>;
|
|
283
|
-
};
|
|
284
|
-
}
|
|
285
|
-
interface RuntimeProps<Run extends IRuntime, Req$1> {
|
|
286
|
-
bindings: Policy<Run, Extract<Req$1, Capability>, unknown>;
|
|
287
|
-
}
|
|
288
|
-
interface IRuntime<Type extends string = string, Handler = unknown, Props$2 = unknown> extends IResource<Type, string, Props$2> {
|
|
289
|
-
type: Type;
|
|
290
|
-
props: Props$2;
|
|
291
|
-
handler: Handler;
|
|
292
|
-
binding: unknown;
|
|
293
|
-
/** @internal phantom */
|
|
294
|
-
capability: unknown;
|
|
295
|
-
}
|
|
296
|
-
interface Runtime<Type extends string = string, Handler = unknown, Props$2 = unknown> extends IRuntime<Type, Handler, Props$2>, Resource<Type, string, Props$2> {
|
|
297
|
-
provider: ResourceTags<this>;
|
|
298
|
-
<const ID$1 extends string, Inputs$1 extends any[], Output$1, Err, Req$1, Handler extends RuntimeHandler<Inputs$1, Output$1, Err, Req$1>>(id: ID$1, {
|
|
299
|
-
handle
|
|
300
|
-
}: {
|
|
301
|
-
handle: Handler;
|
|
302
|
-
}): <const Props$2 extends this["props"]>(props: Props$2) => Service<ID$1, this, Handler, Props$2>;
|
|
303
|
-
}
|
|
304
|
-
declare const Runtime: <const Type extends string>(type: Type) => <Self extends Runtime>() => Self;
|
|
305
|
-
//#endregion
|
|
306
|
-
//#region src/policy.d.ts
|
|
307
|
-
/**
|
|
308
|
-
* A Policy binds a set of Capbilities (e.g SQS.SendMessage, SQS.Consume, etc.) to a
|
|
309
|
-
* specific Runtime (e.g. AWS Lambda Function, Cloudflare Worker, etc.).
|
|
310
|
-
*
|
|
311
|
-
* It brings with it a set of upstream Tags containing the required Provider services
|
|
312
|
-
* to deploy the infrastructure, e.g. (BindingTag<AWS.Lambda.Function, SendMessage<Queue>>)
|
|
313
|
-
*
|
|
314
|
-
* A Policy is invariant over the set of Capabilities to ensure least-privilege.
|
|
315
|
-
*/
|
|
316
|
-
interface Policy<F extends IRuntime, in out Capabilities, Tags = unknown> {
|
|
317
|
-
readonly kind: "alchemy/Policy";
|
|
318
|
-
readonly runtime: F;
|
|
319
|
-
readonly tags: Tags[];
|
|
320
|
-
readonly capabilities: Capabilities[];
|
|
321
|
-
/** Add more Capabilities to a Policy */
|
|
322
|
-
and<B extends AnyBinding[]>(...bindings: B): Policy<F, B[number]["capability"] | Capabilities, BindingTags<B[number]> | Exclude<Tags, unknown>>;
|
|
323
|
-
}
|
|
324
|
-
type BindingTags<B extends AnyBinding> = B extends any ? Bind<B["runtime"], B["capability"], Extract<B["tag"], string>> : never;
|
|
325
|
-
declare function Policy<F extends Runtime>(): Policy<F, never, never>;
|
|
326
|
-
declare function Policy<B extends AnyBinding[]>(...capabilities: B): Policy<B[number]["runtime"], B[number]["capability"], BindingTags<B[number]>>;
|
|
327
|
-
declare namespace Policy {
|
|
328
|
-
export interface AnyOf<in out T> {
|
|
329
|
-
readonly anyOf: T[];
|
|
330
|
-
}
|
|
331
|
-
type Generalize<T> = T extends S.Schema<infer U> ? U : T;
|
|
332
|
-
export const anyOf: <const T>(...anyOf: T[]) => AnyOf<Generalize<T>>;
|
|
333
|
-
export const join: <const Strings extends readonly string[], const Delimiter extends string>(strings: Strings, delimiter: Delimiter) => Join<Strings, Delimiter>;
|
|
334
|
-
type Join<T extends readonly string[], Delimiter extends string> = T extends readonly [infer First extends string] ? First : T extends readonly [infer First extends string, ...infer Rest extends readonly string[]] ? `${First}${Delimiter}${Join<Rest, Delimiter>}` : T extends string[] ? string : "";
|
|
335
|
-
export type Constraint<T> = Pick<T, { [k in keyof T]: T[k] extends never ? never : T[k] extends AnyOf<never> ? never : k }[keyof T]>;
|
|
336
|
-
export const infer: <T>() => T;
|
|
337
|
-
export {};
|
|
338
|
-
}
|
|
339
|
-
//#endregion
|
|
340
|
-
//#region src/capability.d.ts
|
|
341
|
-
interface ICapability<Type extends string = string, Resource$1 = unknown, Constraint = unknown> {
|
|
342
|
-
type: Type;
|
|
343
|
-
resource: Resource$1;
|
|
344
|
-
constraint: Constraint;
|
|
345
|
-
sid: string;
|
|
346
|
-
label: string;
|
|
347
|
-
}
|
|
348
|
-
interface Capability<Type extends string = string, Resource$1 = unknown, Constraint = unknown> extends ICapability<Type, Resource$1, Constraint> {
|
|
349
|
-
new (): {};
|
|
350
|
-
}
|
|
351
|
-
declare namespace Capability {
|
|
352
|
-
type Simplify<C> = [C] extends [{
|
|
353
|
-
Constructor: {
|
|
354
|
-
Reduce: any;
|
|
355
|
-
};
|
|
356
|
-
}] ? _Simplify<C> : C;
|
|
357
|
-
type _Simplify<C> = [C] extends [infer c extends {
|
|
358
|
-
Constructor: any;
|
|
359
|
-
resource: any;
|
|
360
|
-
constraint: any;
|
|
361
|
-
}] ? (c["Constructor"] & {
|
|
362
|
-
resource: c["resource"];
|
|
363
|
-
constraint: Constraint.Simplify<c["constraint"]>;
|
|
364
|
-
})["Reduce"] : never;
|
|
365
|
-
type KeysWithNever<T> = { [K in keyof T]: T[K$1] extends never | Policy.AnyOf<never> ? K$1 : never }[keyof T];
|
|
366
|
-
type DropIrrelevant<T> = T extends any ? { [k in keyof Omit<T, KeysWithNever<T>>]: Omit<T, KeysWithNever<T>>[k] } : never;
|
|
367
|
-
type Get<T, K$1 extends string | number | symbol> = T extends { [k in K$1]: infer V } ? V : never;
|
|
368
|
-
type Keys<T> = T extends any ? keyof T : never;
|
|
369
|
-
type BoxPolicy<T> = [T] extends [{
|
|
370
|
-
anyOf: (infer U)[];
|
|
371
|
-
}] ? Policy.AnyOf<U> : never;
|
|
372
|
-
namespace Constraint {
|
|
373
|
-
type Simplify<Constraint> = { [k in Keys<DropIrrelevant<Constraint>>]: BoxPolicy<Get<Constraint, k>> };
|
|
374
|
-
}
|
|
375
|
-
}
|
|
376
|
-
//#endregion
|
|
377
|
-
//#region src/binding.d.ts
|
|
378
|
-
type AnyBinding<F extends IRuntime = any> = Binding<F, any, any, any, string, boolean>;
|
|
379
|
-
interface Binding<Run extends IRuntime<any, any, any>, Cap extends Capability = Capability, Props$2 = any, Attr$1 extends Run["binding"] = any, Tag extends string = Cap["type"], IsCustom extends boolean = (Cap["type"] extends Tag ? false : true)> {
|
|
380
|
-
runtime: Run;
|
|
381
|
-
capability: Cap;
|
|
382
|
-
tag: Tag;
|
|
383
|
-
props: Props$2;
|
|
384
|
-
attr: Attr$1;
|
|
385
|
-
isCustom: IsCustom;
|
|
386
|
-
}
|
|
387
|
-
/** Tag for a Service that can bind a Capability to a Runtime */
|
|
388
|
-
interface Bind<F extends IRuntime, Cap extends Capability, Tag extends string> extends Context.Tag<`${F["type"]}(${Cap["type"]}, ${Tag})`, BindingService<F, Extract<Extract<Cap["resource"], Resource>["base"], Resource>, F["props"]>> {
|
|
389
|
-
/** @internal phantom */
|
|
390
|
-
name: Tag;
|
|
391
|
-
}
|
|
392
|
-
declare const Binding: {
|
|
393
|
-
<F extends (resource: any, props?: any) => AnyBinding & {
|
|
394
|
-
isCustom: true;
|
|
395
|
-
}>(runtime: ReturnType<F>["runtime"], type: ReturnType<F>["capability"]["type"], tag: ReturnType<F>["tag"]): F & BindingDeclaration<ReturnType<F>["runtime"], F>;
|
|
396
|
-
<F extends (resource: any, props?: any) => AnyBinding & {
|
|
397
|
-
isCustom: false;
|
|
398
|
-
}>(runtime: ReturnType<F>["runtime"], type: ReturnType<F>["capability"]["type"]): F & BindingDeclaration<ReturnType<F>["runtime"], F>;
|
|
399
|
-
};
|
|
400
|
-
interface BindingDeclaration<Run extends IRuntime, F extends (target: any, props?: any) => AnyBinding<Run>, Tag extends string = ReturnType<F>["tag"], Cap extends Capability = ReturnType<F>["capability"]> {
|
|
401
|
-
provider: {
|
|
402
|
-
effect<Err, Req$1>(eff: Effect<BindingService<Run, Parameters<F>[0], Parameters<F>[1], ReturnType<F>["attr"]>, Err, Req$1>): Layer.Layer<Bind<Run, Cap, Tag>, Err, Req$1>;
|
|
403
|
-
succeed(service: BindingService<Run, Parameters<F>[0], Parameters<F>[1], ReturnType<F>["attr"]>): Layer.Layer<Bind<Run, Cap, Tag>>;
|
|
404
|
-
};
|
|
405
|
-
}
|
|
406
|
-
interface BindingDiffProps<Source extends IResource = IResource, Target extends IResource = IResource, Props$2 = any, Attr$1 = any> {
|
|
407
|
-
source: {
|
|
408
|
-
id: string;
|
|
409
|
-
props: Source["props"];
|
|
410
|
-
oldProps?: Source["props"];
|
|
411
|
-
oldAttr?: Source["attr"];
|
|
412
|
-
};
|
|
413
|
-
props: Props$2;
|
|
414
|
-
attr: Attr$1 | undefined;
|
|
415
|
-
target: {
|
|
416
|
-
id: string;
|
|
417
|
-
props: Target["props"];
|
|
418
|
-
oldProps?: Target["props"];
|
|
419
|
-
oldAttr?: Target["attr"];
|
|
420
|
-
};
|
|
421
|
-
}
|
|
422
|
-
interface BindingAttachProps<Source extends IResource, Target extends IResource, Props$2, Attr$1> {
|
|
423
|
-
source: {
|
|
424
|
-
id: string;
|
|
425
|
-
attr: Source["attr"];
|
|
426
|
-
props: Source["props"];
|
|
427
|
-
};
|
|
428
|
-
props: Props$2;
|
|
429
|
-
attr: Attr$1 | undefined;
|
|
430
|
-
target: {
|
|
431
|
-
id: string;
|
|
432
|
-
props: Target["props"];
|
|
433
|
-
attr: Target["attr"];
|
|
434
|
-
};
|
|
435
|
-
}
|
|
436
|
-
interface BindingReattachProps<Source extends IResource, Target extends IResource, Props$2, Attr$1> {
|
|
437
|
-
source: {
|
|
438
|
-
id: string;
|
|
439
|
-
attr: Source["attr"];
|
|
440
|
-
props: Source["props"];
|
|
441
|
-
};
|
|
442
|
-
props: Props$2;
|
|
443
|
-
attr: Attr$1;
|
|
444
|
-
target: {
|
|
445
|
-
id: string;
|
|
446
|
-
props: Target["props"];
|
|
447
|
-
attr: Target["attr"];
|
|
448
|
-
};
|
|
449
|
-
}
|
|
450
|
-
interface BindingDetachProps<Source extends IResource, Target extends IResource, Props$2, Attr$1> {
|
|
451
|
-
source: {
|
|
452
|
-
id: string;
|
|
453
|
-
attr: Source["attr"];
|
|
454
|
-
props: Source["props"];
|
|
455
|
-
};
|
|
456
|
-
props: Props$2;
|
|
457
|
-
attr: Attr$1 | undefined;
|
|
458
|
-
target: {
|
|
459
|
-
id: string;
|
|
460
|
-
props: Target["props"];
|
|
461
|
-
attr: Target["attr"];
|
|
462
|
-
};
|
|
463
|
-
}
|
|
464
|
-
type BindingService<Target extends IRuntime = any, Source extends IResource = IResource, Props$2 = any, Attr$1 extends Target["binding"] = any, DiffReq = never, PreReattachReq = never, AttachReq = never, ReattachReq = never, DetachReq = never, PostAttachReq = never> = {
|
|
465
|
-
diff?: (props: BindingDiffProps<Source, Target, Props$2>) => Effect<Diff, never, DiffReq>;
|
|
466
|
-
preattach?: (props: BindingAttachProps<Source, Target, Props$2, Attr$1>) => Effect<Partial<Target["attr"]>, never, PreReattachReq>;
|
|
467
|
-
attach: (props: BindingAttachProps<Source, Target, Props$2, Attr$1>) => Effect<Attr$1, never, AttachReq> | Attr$1;
|
|
468
|
-
postattach?: (props: BindingAttachProps<Source, Target, Props$2, Attr$1>) => Effect<Omit<Attr$1, keyof Target["binding"]>, never, PostAttachReq>;
|
|
469
|
-
reattach?: (props: BindingReattachProps<Source, Target, Props$2, Attr$1>) => Effect<Attr$1, never, ReattachReq> | Attr$1;
|
|
470
|
-
detach?: (props: BindingDetachProps<Source, Target, Props$2, Attr$1>) => Effect<void, never, DetachReq> | void;
|
|
471
|
-
};
|
|
472
|
-
//#endregion
|
|
473
|
-
//#region src/plan.d.ts
|
|
474
|
-
/**
|
|
475
|
-
* A node in the plan that represents a binding operation acting on a resource.
|
|
476
|
-
*/
|
|
477
|
-
type BindNode<B extends AnyBinding = AnyBinding> = Attach<B> | Reattach<B> | Detach<B> | NoopBind<B>;
|
|
478
|
-
type Attach<B extends AnyBinding = AnyBinding> = {
|
|
479
|
-
action: "attach";
|
|
480
|
-
binding: B;
|
|
481
|
-
olds: BindNode | undefined;
|
|
482
|
-
attr: B["attr"] | undefined;
|
|
483
|
-
};
|
|
484
|
-
type Reattach<B extends AnyBinding = AnyBinding> = {
|
|
485
|
-
action: "reattach";
|
|
486
|
-
binding: B;
|
|
487
|
-
olds: BindNode;
|
|
488
|
-
attr: B["attr"];
|
|
489
|
-
};
|
|
490
|
-
type Detach<B extends AnyBinding = AnyBinding> = {
|
|
491
|
-
action: "detach";
|
|
492
|
-
binding: B;
|
|
493
|
-
attr: B["attr"] | undefined;
|
|
494
|
-
};
|
|
495
|
-
type NoopBind<B extends AnyBinding = AnyBinding> = {
|
|
496
|
-
action: "noop";
|
|
497
|
-
binding: B;
|
|
498
|
-
attr: B["attr"];
|
|
499
|
-
};
|
|
500
|
-
type Apply<R extends Resource = AnyResource> = Create<R> | Update<R> | Replace<R> | NoopUpdate<R>;
|
|
501
|
-
interface BaseNode<R extends Resource = AnyResource> {
|
|
321
|
+
//#region src/Plan.d.ts
|
|
322
|
+
type Apply<R extends ResourceLike = ResourceLike> = Create<R> | Update<R> | Replace<R> | NoopUpdate<R>;
|
|
323
|
+
type BindingAction = "create" | "update" | "delete" | "noop";
|
|
324
|
+
interface BindingNode<Data = any> extends ResourceBinding {
|
|
325
|
+
action: BindingAction;
|
|
326
|
+
data: Data;
|
|
327
|
+
}
|
|
328
|
+
interface BaseNode<R extends ResourceLike<string> = ResourceLike<string>> {
|
|
502
329
|
resource: R;
|
|
503
330
|
provider: ProviderService<R>;
|
|
504
|
-
bindings: BindNode[];
|
|
505
331
|
downstream: string[];
|
|
332
|
+
bindings: BindingNode<R["Binding"]>[];
|
|
506
333
|
}
|
|
507
|
-
interface Create<R extends
|
|
334
|
+
interface Create<R extends ResourceLike = ResourceLike> extends BaseNode<R> {
|
|
508
335
|
action: "create";
|
|
509
|
-
props:
|
|
336
|
+
props: R["Props"];
|
|
510
337
|
state: CreatingResourceState | undefined;
|
|
511
338
|
}
|
|
512
|
-
interface Update<R extends
|
|
339
|
+
interface Update<R extends ResourceLike = ResourceLike> extends BaseNode<R> {
|
|
513
340
|
action: "update";
|
|
514
|
-
props:
|
|
341
|
+
props: R["Props"];
|
|
515
342
|
state: CreatedResourceState | UpdatedResourceState | UpdatingReourceState | ReplacedResourceState;
|
|
516
343
|
}
|
|
517
|
-
interface Delete<R extends
|
|
344
|
+
interface Delete<R extends ResourceLike = ResourceLike> extends BaseNode<R> {
|
|
518
345
|
action: "delete";
|
|
519
346
|
state: ResourceState;
|
|
520
347
|
}
|
|
521
|
-
interface NoopUpdate<R extends
|
|
348
|
+
interface NoopUpdate<R extends ResourceLike = ResourceLike> extends BaseNode<R> {
|
|
522
349
|
action: "noop";
|
|
523
350
|
state: CreatedResourceState | UpdatedResourceState;
|
|
524
351
|
}
|
|
525
|
-
interface Replace<R extends
|
|
352
|
+
interface Replace<R extends ResourceLike = ResourceLike> extends BaseNode<R> {
|
|
526
353
|
action: "replace";
|
|
527
354
|
props: any;
|
|
528
355
|
deleteFirst: boolean;
|
|
356
|
+
restart?: boolean;
|
|
529
357
|
state: CreatingResourceState | CreatedResourceState | UpdatingReourceState | UpdatedResourceState | ReplacingResourceState | ReplacedResourceState;
|
|
530
358
|
}
|
|
531
|
-
type
|
|
359
|
+
type Plan<Output$1 = any> = {
|
|
532
360
|
resources: { [id in string]: Apply<any> };
|
|
533
|
-
deletions: { [id in string]?: Delete<
|
|
361
|
+
deletions: { [id in string]?: Delete<ResourceLike> };
|
|
362
|
+
output: Output$1;
|
|
534
363
|
};
|
|
535
364
|
//#endregion
|
|
536
|
-
//#region src/
|
|
537
|
-
type ApplyStatus = "attaching" | "post-attach" | "pending" | "pre-creating" | "creating" | "creating replacement" | "created" | "updating" | "updated" | "deleting" | "deleted" | "replacing" | "replaced" | "
|
|
365
|
+
//#region src/Cli/Event.d.ts
|
|
366
|
+
type ApplyStatus = "attaching" | "post-attach" | "pending" | "pre-creating" | "creating" | "creating replacement" | "created" | "updating" | "updated" | "deleting" | "deleted" | "replacing" | "replaced" | "fail";
|
|
538
367
|
type ApplyEvent = AnnotateEvent | StatusChangeEvent;
|
|
539
368
|
interface AnnotateEvent {
|
|
540
369
|
kind: "annotate";
|
|
@@ -550,7 +379,7 @@ interface StatusChangeEvent {
|
|
|
550
379
|
bindingId?: string;
|
|
551
380
|
}
|
|
552
381
|
//#endregion
|
|
553
|
-
//#region src/
|
|
382
|
+
//#region src/Cli/Cli.d.ts
|
|
554
383
|
interface PlanStatusSession {
|
|
555
384
|
emit: (event: ApplyEvent) => Effect$1.Effect<void>;
|
|
556
385
|
done: () => Effect$1.Effect<void>;
|
|
@@ -559,15 +388,15 @@ interface ScopedPlanStatusSession extends PlanStatusSession {
|
|
|
559
388
|
note: (note: string) => Effect$1.Effect<void>;
|
|
560
389
|
}
|
|
561
390
|
interface CLIService {
|
|
562
|
-
approvePlan: <P$1 extends
|
|
563
|
-
displayPlan: <P$1 extends
|
|
564
|
-
startApplySession: <P$1 extends
|
|
391
|
+
approvePlan: <P$1 extends Plan>(plan: P$1) => Effect$1.Effect<boolean>;
|
|
392
|
+
displayPlan: <P$1 extends Plan>(plan: P$1) => Effect$1.Effect<void>;
|
|
393
|
+
startApplySession: <P$1 extends Plan>(plan: P$1) => Effect$1.Effect<PlanStatusSession>;
|
|
565
394
|
}
|
|
566
|
-
declare const
|
|
567
|
-
declare class
|
|
395
|
+
declare const Cli_base: ServiceMap.ServiceClass<Cli, "CLI", CLIService>;
|
|
396
|
+
declare class Cli extends Cli_base {}
|
|
568
397
|
//#endregion
|
|
569
|
-
//#region src/
|
|
570
|
-
declare const inkCLI: () => Layer.Layer<
|
|
398
|
+
//#region src/Cli/InkCLI.d.ts
|
|
399
|
+
declare const inkCLI: () => Layer.Layer<Cli, never, never>;
|
|
571
400
|
//#endregion
|
|
572
|
-
export {
|
|
401
|
+
export { CLIService, Cli, PlanStatusSession, ScopedPlanStatusSession, inkCLI };
|
|
573
402
|
//# sourceMappingURL=index.d.ts.map
|