alchemy 2.0.0-beta.76 → 2.0.0-beta.77
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/README.md +1 -1
- package/THIRD_PARTY_LICENSES.md +11 -11
- package/bin/cli.js +88 -11
- package/bin/exec.js +11828 -5720
- package/bin/exec.js.map +1 -1
- package/bin/register-oxc.js +27 -0
- package/lib/AWS/AMP/Scraper.js +1 -1
- package/lib/AWS/AMP/Scraper.js.map +1 -1
- package/lib/AWS/AppRunner/Service.d.ts +11 -27
- package/lib/AWS/AppRunner/Service.d.ts.map +1 -1
- package/lib/AWS/AppRunner/Service.js +7 -21
- package/lib/AWS/AppRunner/Service.js.map +1 -1
- package/lib/AWS/Assets.d.ts +1 -1
- package/lib/AWS/Assets.js +2 -2
- package/lib/AWS/Assets.js.map +1 -1
- package/lib/AWS/AuthProvider.d.ts +40 -53
- package/lib/AWS/AuthProvider.d.ts.map +1 -1
- package/lib/AWS/AuthProvider.js +480 -215
- package/lib/AWS/AuthProvider.js.map +1 -1
- package/lib/AWS/Batch/JobDefinition.d.ts +11 -27
- package/lib/AWS/Batch/JobDefinition.d.ts.map +1 -1
- package/lib/AWS/Batch/JobDefinition.js +7 -21
- package/lib/AWS/Batch/JobDefinition.js.map +1 -1
- package/lib/AWS/EC2/GetAmi.d.ts +2 -0
- package/lib/AWS/EC2/GetAmi.d.ts.map +1 -1
- package/lib/AWS/EC2/Instance.d.ts +11 -27
- package/lib/AWS/EC2/Instance.d.ts.map +1 -1
- package/lib/AWS/EC2/Instance.js +7 -21
- package/lib/AWS/EC2/Instance.js.map +1 -1
- package/lib/AWS/EC2/hosted.d.ts +5 -6
- package/lib/AWS/EC2/hosted.d.ts.map +1 -1
- package/lib/AWS/EC2/hosted.js.map +1 -1
- package/lib/AWS/ECR/Image.d.ts +1 -1
- package/lib/AWS/ECR/ImageSource.d.ts +4 -5
- package/lib/AWS/ECR/ImageSource.d.ts.map +1 -1
- package/lib/AWS/ECR/ImageSource.js.map +1 -1
- package/lib/AWS/ECS/Service.d.ts +7 -21
- package/lib/AWS/ECS/Service.d.ts.map +1 -1
- package/lib/AWS/ECS/Service.js +7 -21
- package/lib/AWS/ECS/Service.js.map +1 -1
- package/lib/AWS/ECS/Task.d.ts +7 -21
- package/lib/AWS/ECS/Task.d.ts.map +1 -1
- package/lib/AWS/ECS/Task.js +7 -21
- package/lib/AWS/ECS/Task.js.map +1 -1
- package/lib/AWS/ElastiCache/CacheCluster.d.ts +60 -0
- package/lib/AWS/ElastiCache/CacheCluster.d.ts.map +1 -0
- package/lib/AWS/ElastiCache/CacheCluster.js +199 -0
- package/lib/AWS/ElastiCache/CacheCluster.js.map +1 -0
- package/lib/AWS/ElastiCache/ConnectCacheCluster.d.ts +46 -0
- package/lib/AWS/ElastiCache/ConnectCacheCluster.d.ts.map +1 -0
- package/lib/AWS/ElastiCache/ConnectCacheCluster.js +5 -0
- package/lib/AWS/ElastiCache/ConnectCacheCluster.js.map +1 -0
- package/lib/AWS/ElastiCache/ConnectCacheClusterHttp.d.ts +4 -0
- package/lib/AWS/ElastiCache/ConnectCacheClusterHttp.d.ts.map +1 -0
- package/lib/AWS/ElastiCache/ConnectCacheClusterHttp.js +52 -0
- package/lib/AWS/ElastiCache/ConnectCacheClusterHttp.js.map +1 -0
- package/lib/AWS/ElastiCache/ConnectReplicationGroup.d.ts +47 -0
- package/lib/AWS/ElastiCache/ConnectReplicationGroup.d.ts.map +1 -0
- package/lib/AWS/ElastiCache/ConnectReplicationGroup.js +5 -0
- package/lib/AWS/ElastiCache/ConnectReplicationGroup.js.map +1 -0
- package/lib/AWS/ElastiCache/ConnectReplicationGroupHttp.d.ts +4 -0
- package/lib/AWS/ElastiCache/ConnectReplicationGroupHttp.d.ts.map +1 -0
- package/lib/AWS/ElastiCache/ConnectReplicationGroupHttp.js +77 -0
- package/lib/AWS/ElastiCache/ConnectReplicationGroupHttp.js.map +1 -0
- package/lib/AWS/ElastiCache/ReplicationGroup.d.ts +95 -0
- package/lib/AWS/ElastiCache/ReplicationGroup.d.ts.map +1 -0
- package/lib/AWS/ElastiCache/ReplicationGroup.js +383 -0
- package/lib/AWS/ElastiCache/ReplicationGroup.js.map +1 -0
- package/lib/AWS/ElastiCache/SubnetGroup.d.ts +39 -0
- package/lib/AWS/ElastiCache/SubnetGroup.d.ts.map +1 -0
- package/lib/AWS/ElastiCache/SubnetGroup.js +136 -0
- package/lib/AWS/ElastiCache/SubnetGroup.js.map +1 -0
- package/lib/AWS/ElastiCache/index.d.ts +7 -0
- package/lib/AWS/ElastiCache/index.d.ts.map +1 -1
- package/lib/AWS/ElastiCache/index.js +7 -0
- package/lib/AWS/ElastiCache/index.js.map +1 -1
- package/lib/AWS/ElastiCache/internal.d.ts +13 -0
- package/lib/AWS/ElastiCache/internal.d.ts.map +1 -0
- package/lib/AWS/ElastiCache/internal.js +19 -0
- package/lib/AWS/ElastiCache/internal.js.map +1 -0
- package/lib/AWS/Environment.d.ts +2 -3
- package/lib/AWS/Environment.d.ts.map +1 -1
- package/lib/AWS/Environment.js +11 -41
- package/lib/AWS/Environment.js.map +1 -1
- package/lib/AWS/IAM/actions.generated.js +1 -1
- package/lib/AWS/IAM/actions.generated.js.map +1 -1
- package/lib/AWS/IdentityCenter/AccountAssignment.js +6 -0
- package/lib/AWS/IdentityCenter/AccountAssignment.js.map +1 -1
- package/lib/AWS/Lambda/Function.d.ts +14 -23
- package/lib/AWS/Lambda/Function.d.ts.map +1 -1
- package/lib/AWS/Lambda/Function.js +15 -20
- package/lib/AWS/Lambda/Function.js.map +1 -1
- package/lib/AWS/Lambda/MicrovmImage.d.ts +12 -28
- package/lib/AWS/Lambda/MicrovmImage.d.ts.map +1 -1
- package/lib/AWS/Lambda/MicrovmImage.js +8 -22
- package/lib/AWS/Lambda/MicrovmImage.js.map +1 -1
- package/lib/AWS/Local/DevWatchProvider.d.ts.map +1 -1
- package/lib/AWS/Local/DevWatchProvider.js +10 -1
- package/lib/AWS/Local/DevWatchProvider.js.map +1 -1
- package/lib/AWS/Organizations/Account.d.ts +2 -2
- package/lib/AWS/Organizations/Account.d.ts.map +1 -1
- package/lib/AWS/Organizations/Account.js +16 -8
- package/lib/AWS/Organizations/Account.js.map +1 -1
- package/lib/AWS/Organizations/DelegatedAdministrator.d.ts +2 -3
- package/lib/AWS/Organizations/DelegatedAdministrator.d.ts.map +1 -1
- package/lib/AWS/Organizations/DelegatedAdministrator.js +5 -5
- package/lib/AWS/Organizations/DelegatedAdministrator.js.map +1 -1
- package/lib/AWS/Organizations/Organization.d.ts +1 -1
- package/lib/AWS/Organizations/Organization.d.ts.map +1 -1
- package/lib/AWS/Organizations/Organization.js +2 -2
- package/lib/AWS/Organizations/Organization.js.map +1 -1
- package/lib/AWS/Organizations/common.d.ts +9 -0
- package/lib/AWS/Organizations/common.d.ts.map +1 -1
- package/lib/AWS/Organizations/common.js +13 -0
- package/lib/AWS/Organizations/common.js.map +1 -1
- package/lib/AWS/Providers.d.ts.map +1 -1
- package/lib/AWS/Providers.js +4 -1
- package/lib/AWS/Providers.js.map +1 -1
- package/lib/AWS/StateStore/State.d.ts +1 -1
- package/lib/AWS/StateStore/State.d.ts.map +1 -1
- package/lib/Alchemist/Errors.d.ts +31 -0
- package/lib/Alchemist/Errors.d.ts.map +1 -0
- package/lib/Alchemist/Errors.js +19 -0
- package/lib/Alchemist/Errors.js.map +1 -0
- package/lib/Alchemist/Progress.d.ts +16 -0
- package/lib/Alchemist/Progress.d.ts.map +1 -0
- package/lib/Alchemist/Progress.js +129 -0
- package/lib/Alchemist/Progress.js.map +1 -0
- package/lib/Alchemist/Runtime.d.ts +22 -0
- package/lib/Alchemist/Runtime.d.ts.map +1 -0
- package/lib/Alchemist/Runtime.js +28 -0
- package/lib/Alchemist/Runtime.js.map +1 -0
- package/lib/Alchemist/Session.d.ts +124 -0
- package/lib/Alchemist/Session.d.ts.map +1 -0
- package/lib/Alchemist/Session.js +223 -0
- package/lib/Alchemist/Session.js.map +1 -0
- package/lib/Alchemist/index.d.ts +15 -0
- package/lib/Alchemist/index.d.ts.map +1 -0
- package/lib/Alchemist/index.js +15 -0
- package/lib/Alchemist/index.js.map +1 -0
- package/lib/Alchemist/routes/aws.d.ts +21 -0
- package/lib/Alchemist/routes/aws.d.ts.map +1 -0
- package/lib/Alchemist/routes/aws.js +54 -0
- package/lib/Alchemist/routes/aws.js.map +1 -0
- package/lib/Alchemist/routes/cloudflare.d.ts +63 -0
- package/lib/Alchemist/routes/cloudflare.d.ts.map +1 -0
- package/lib/Alchemist/routes/cloudflare.js +113 -0
- package/lib/Alchemist/routes/cloudflare.js.map +1 -0
- package/lib/Alchemist/routes/cloudflareToken.d.ts +93 -0
- package/lib/Alchemist/routes/cloudflareToken.d.ts.map +1 -0
- package/lib/Alchemist/routes/cloudflareToken.js +111 -0
- package/lib/Alchemist/routes/cloudflareToken.js.map +1 -0
- package/lib/Alchemist/routes/drift.d.ts +55 -0
- package/lib/Alchemist/routes/drift.d.ts.map +1 -0
- package/lib/Alchemist/routes/drift.js +52 -0
- package/lib/Alchemist/routes/drift.js.map +1 -0
- package/lib/Alchemist/routes/logs.d.ts +41 -0
- package/lib/Alchemist/routes/logs.d.ts.map +1 -0
- package/lib/Alchemist/routes/logs.js +112 -0
- package/lib/Alchemist/routes/logs.js.map +1 -0
- package/lib/Alchemist/routes/nuke.d.ts +46 -0
- package/lib/Alchemist/routes/nuke.d.ts.map +1 -0
- package/lib/Alchemist/routes/nuke.js +80 -0
- package/lib/Alchemist/routes/nuke.js.map +1 -0
- package/lib/Alchemist/routes/profile.d.ts +133 -0
- package/lib/Alchemist/routes/profile.d.ts.map +1 -0
- package/lib/Alchemist/routes/profile.js +257 -0
- package/lib/Alchemist/routes/profile.js.map +1 -0
- package/lib/Alchemist/routes/provider.d.ts +33 -0
- package/lib/Alchemist/routes/provider.d.ts.map +1 -0
- package/lib/Alchemist/routes/provider.js +65 -0
- package/lib/Alchemist/routes/provider.js.map +1 -0
- package/lib/Alchemist/routes/stack.d.ts +78 -0
- package/lib/Alchemist/routes/stack.d.ts.map +1 -0
- package/lib/Alchemist/routes/stack.js +67 -0
- package/lib/Alchemist/routes/stack.js.map +1 -0
- package/lib/Alchemist/routes/state.d.ts +35 -0
- package/lib/Alchemist/routes/state.d.ts.map +1 -0
- package/lib/Alchemist/routes/state.js +42 -0
- package/lib/Alchemist/routes/state.js.map +1 -0
- package/lib/Apply.d.ts +8 -6
- package/lib/Apply.d.ts.map +1 -1
- package/lib/Apply.js +209 -103
- package/lib/Apply.js.map +1 -1
- package/lib/Auth/AuthProvider.d.ts +201 -25
- package/lib/Auth/AuthProvider.d.ts.map +1 -1
- package/lib/Auth/AuthProvider.js +180 -40
- package/lib/Auth/AuthProvider.js.map +1 -1
- package/lib/Auth/BrowserOAuth.d.ts +27 -0
- package/lib/Auth/BrowserOAuth.d.ts.map +1 -0
- package/lib/Auth/BrowserOAuth.js +41 -0
- package/lib/Auth/BrowserOAuth.js.map +1 -0
- package/lib/Auth/Credentials.d.ts +11 -6
- package/lib/Auth/Credentials.d.ts.map +1 -1
- package/lib/Auth/Credentials.js +62 -23
- package/lib/Auth/Credentials.js.map +1 -1
- package/lib/Auth/CredentialsCache.d.ts +15 -0
- package/lib/Auth/CredentialsCache.d.ts.map +1 -0
- package/lib/Auth/CredentialsCache.js +34 -0
- package/lib/Auth/CredentialsCache.js.map +1 -0
- package/lib/Auth/Demand.d.ts +59 -34
- package/lib/Auth/Demand.d.ts.map +1 -1
- package/lib/Auth/Demand.js +150 -60
- package/lib/Auth/Demand.js.map +1 -1
- package/lib/Auth/Env.d.ts +4 -4
- package/lib/Auth/Env.d.ts.map +1 -1
- package/lib/Auth/Env.js +18 -9
- package/lib/Auth/Env.js.map +1 -1
- package/lib/Auth/Inspect.d.ts +33 -0
- package/lib/Auth/Inspect.d.ts.map +1 -0
- package/lib/Auth/Inspect.js +67 -0
- package/lib/Auth/Inspect.js.map +1 -0
- package/lib/Auth/Lock.d.ts +6 -0
- package/lib/Auth/Lock.d.ts.map +1 -1
- package/lib/Auth/Lock.js +22 -11
- package/lib/Auth/Lock.js.map +1 -1
- package/lib/Auth/OAuthFlow.d.ts +119 -0
- package/lib/Auth/OAuthFlow.d.ts.map +1 -0
- package/lib/Auth/OAuthFlow.js +314 -0
- package/lib/Auth/OAuthFlow.js.map +1 -0
- package/lib/Auth/Paths.d.ts +18 -0
- package/lib/Auth/Paths.d.ts.map +1 -0
- package/lib/Auth/Paths.js +20 -0
- package/lib/Auth/Paths.js.map +1 -0
- package/lib/Auth/Profile.d.ts +91 -67
- package/lib/Auth/Profile.d.ts.map +1 -1
- package/lib/Auth/Profile.js +449 -92
- package/lib/Auth/Profile.js.map +1 -1
- package/lib/Auth/Resolve.d.ts +42 -0
- package/lib/Auth/Resolve.d.ts.map +1 -0
- package/lib/Auth/Resolve.js +90 -0
- package/lib/Auth/Resolve.js.map +1 -0
- package/lib/Auth/StoredAuthProvider.d.ts +84 -0
- package/lib/Auth/StoredAuthProvider.d.ts.map +1 -0
- package/lib/Auth/StoredAuthProvider.js +179 -0
- package/lib/Auth/StoredAuthProvider.js.map +1 -0
- package/lib/Auth/index.d.ts +1 -0
- package/lib/Auth/index.d.ts.map +1 -1
- package/lib/Auth/index.js +1 -0
- package/lib/Auth/index.js.map +1 -1
- package/lib/Axiom/AuthProvider.d.ts +17 -26
- package/lib/Axiom/AuthProvider.d.ts.map +1 -1
- package/lib/Axiom/AuthProvider.js +89 -172
- package/lib/Axiom/AuthProvider.js.map +1 -1
- package/lib/Axiom/Credentials.d.ts +2 -4
- package/lib/Axiom/Credentials.d.ts.map +1 -1
- package/lib/Axiom/Credentials.js +5 -10
- package/lib/Axiom/Credentials.js.map +1 -1
- package/lib/Axiom/Providers.d.ts +2 -2
- package/lib/Axiom/Providers.d.ts.map +1 -1
- package/lib/Axiom/Providers.js +3 -3
- package/lib/Axiom/Providers.js.map +1 -1
- package/lib/Bundle/Bundle.d.ts +3 -5
- package/lib/Bundle/Bundle.d.ts.map +1 -1
- package/lib/Bundle/Bundle.js.map +1 -1
- package/lib/Cli/CliKit/CliKit.d.ts +92 -0
- package/lib/Cli/CliKit/CliKit.d.ts.map +1 -0
- package/lib/Cli/CliKit/CliKit.js +27 -0
- package/lib/Cli/CliKit/CliKit.js.map +1 -0
- package/lib/Cli/CliKit/index.d.ts +9 -0
- package/lib/Cli/CliKit/index.d.ts.map +1 -0
- package/lib/Cli/CliKit/index.js +9 -0
- package/lib/Cli/CliKit/index.js.map +1 -0
- package/lib/Cli/CliKit/interaction.d.ts +13 -0
- package/lib/Cli/CliKit/interaction.d.ts.map +1 -0
- package/lib/Cli/CliKit/interaction.js +17 -0
- package/lib/Cli/CliKit/interaction.js.map +1 -0
- package/lib/Cli/CliKit/layer.d.ts +7 -0
- package/lib/Cli/CliKit/layer.d.ts.map +1 -0
- package/lib/Cli/CliKit/layer.js +34 -0
- package/lib/Cli/CliKit/layer.js.map +1 -0
- package/lib/Cli/DevOptions.d.ts +17 -0
- package/lib/Cli/DevOptions.d.ts.map +1 -0
- package/lib/Cli/DevOptions.js +16 -0
- package/lib/Cli/DevOptions.js.map +1 -0
- package/lib/Cli/Format.d.ts +5 -0
- package/lib/Cli/Format.d.ts.map +1 -0
- package/lib/Cli/Format.js +27 -0
- package/lib/Cli/Format.js.map +1 -0
- package/lib/Cli/GlobalLog.d.ts +41 -0
- package/lib/Cli/GlobalLog.d.ts.map +1 -0
- package/lib/Cli/GlobalLog.js +112 -0
- package/lib/Cli/GlobalLog.js.map +1 -0
- package/lib/Cli/LoggingCli.d.ts +4 -3
- package/lib/Cli/LoggingCli.d.ts.map +1 -1
- package/lib/Cli/LoggingCli.js +240 -100
- package/lib/Cli/LoggingCli.js.map +1 -1
- package/lib/Cli/ModeTag.d.ts +1 -1
- package/lib/Cli/ModeTag.js +1 -1
- package/lib/Cli/NamespaceTree.d.ts +18 -8
- package/lib/Cli/NamespaceTree.d.ts.map +1 -1
- package/lib/Cli/NamespaceTree.js +52 -11
- package/lib/Cli/NamespaceTree.js.map +1 -1
- package/lib/Cli/PlainCliFormatter.d.ts +11 -0
- package/lib/Cli/PlainCliFormatter.d.ts.map +1 -0
- package/lib/Cli/PlainCliFormatter.js +70 -0
- package/lib/Cli/PlainCliFormatter.js.map +1 -0
- package/lib/Cli/PropertyDiff.d.ts +37 -0
- package/lib/Cli/PropertyDiff.d.ts.map +1 -0
- package/lib/Cli/PropertyDiff.js +162 -0
- package/lib/Cli/PropertyDiff.js.map +1 -0
- package/lib/Cli/checkVersion.d.ts.map +1 -1
- package/lib/Cli/checkVersion.js +10 -6
- package/lib/Cli/checkVersion.js.map +1 -1
- package/lib/Cli/commands/aws.d.ts +2 -4
- package/lib/Cli/commands/aws.d.ts.map +1 -1
- package/lib/Cli/commands/aws.js +43 -55
- package/lib/Cli/commands/aws.js.map +1 -1
- package/lib/Cli/commands/cloudflare.d.ts +6 -7
- package/lib/Cli/commands/cloudflare.d.ts.map +1 -1
- package/lib/Cli/commands/cloudflare.js +149 -307
- package/lib/Cli/commands/cloudflare.js.map +1 -1
- package/lib/Cli/commands/compat.d.ts +11 -0
- package/lib/Cli/commands/compat.d.ts.map +1 -0
- package/lib/Cli/commands/compat.js +19 -0
- package/lib/Cli/commands/compat.js.map +1 -0
- package/lib/Cli/commands/confirm.d.ts +33 -0
- package/lib/Cli/commands/confirm.d.ts.map +1 -0
- package/lib/Cli/commands/confirm.js +39 -0
- package/lib/Cli/commands/confirm.js.map +1 -0
- package/lib/Cli/commands/deploy.d.ts +20 -32
- package/lib/Cli/commands/deploy.d.ts.map +1 -1
- package/lib/Cli/commands/deploy.js +140 -140
- package/lib/Cli/commands/deploy.js.map +1 -1
- package/lib/Cli/commands/dev.d.ts +5 -4
- package/lib/Cli/commands/dev.d.ts.map +1 -1
- package/lib/Cli/commands/dev.js +52 -26
- package/lib/Cli/commands/dev.js.map +1 -1
- package/lib/Cli/commands/drift.d.ts +12 -0
- package/lib/Cli/commands/drift.d.ts.map +1 -0
- package/lib/Cli/commands/drift.js +68 -0
- package/lib/Cli/commands/drift.js.map +1 -0
- package/lib/Cli/commands/errors.d.ts +35 -0
- package/lib/Cli/commands/errors.d.ts.map +1 -0
- package/lib/Cli/commands/errors.js +106 -0
- package/lib/Cli/commands/errors.js.map +1 -0
- package/lib/Cli/commands/flags.d.ts +46 -0
- package/lib/Cli/commands/flags.d.ts.map +1 -0
- package/lib/Cli/commands/flags.js +98 -0
- package/lib/Cli/commands/flags.js.map +1 -0
- package/lib/Cli/commands/instrument.d.ts +3 -0
- package/lib/Cli/commands/instrument.d.ts.map +1 -0
- package/lib/Cli/commands/instrument.js +6 -0
- package/lib/Cli/commands/instrument.js.map +1 -0
- package/lib/Cli/commands/logs.d.ts +5 -4
- package/lib/Cli/commands/logs.d.ts.map +1 -1
- package/lib/Cli/commands/logs.js +63 -88
- package/lib/Cli/commands/logs.js.map +1 -1
- package/lib/Cli/commands/nuke.d.ts +3 -2
- package/lib/Cli/commands/nuke.d.ts.map +1 -1
- package/lib/Cli/commands/nuke.js +89 -588
- package/lib/Cli/commands/nuke.js.map +1 -1
- package/lib/Cli/commands/profile/commands.d.ts +9 -0
- package/lib/Cli/commands/profile/commands.d.ts.map +1 -0
- package/lib/Cli/commands/profile/commands.js +276 -0
- package/lib/Cli/commands/profile/commands.js.map +1 -0
- package/lib/Cli/commands/profile/flows.d.ts +36 -0
- package/lib/Cli/commands/profile/flows.d.ts.map +1 -0
- package/lib/Cli/commands/profile/flows.js +155 -0
- package/lib/Cli/commands/profile/flows.js.map +1 -0
- package/lib/Cli/commands/profile/hub.d.ts +8 -0
- package/lib/Cli/commands/profile/hub.d.ts.map +1 -0
- package/lib/Cli/commands/profile/hub.js +154 -0
- package/lib/Cli/commands/profile/hub.js.map +1 -0
- package/lib/Cli/commands/profile/index.d.ts +2 -0
- package/lib/Cli/commands/profile/index.d.ts.map +1 -0
- package/lib/Cli/commands/profile/index.js +2 -0
- package/lib/Cli/commands/profile/index.js.map +1 -0
- package/lib/Cli/commands/provider.d.ts +17 -0
- package/lib/Cli/commands/provider.d.ts.map +1 -0
- package/lib/Cli/commands/provider.js +44 -0
- package/lib/Cli/commands/provider.js.map +1 -0
- package/lib/Cli/commands/render.d.ts +12 -0
- package/lib/Cli/commands/render.d.ts.map +1 -0
- package/lib/Cli/commands/render.js +82 -0
- package/lib/Cli/commands/render.js.map +1 -0
- package/lib/Cli/commands/state.d.ts +8 -1
- package/lib/Cli/commands/state.d.ts.map +1 -1
- package/lib/Cli/commands/state.js +125 -248
- package/lib/Cli/commands/state.js.map +1 -1
- package/lib/Cli/components/types.d.ts +104 -0
- package/lib/Cli/components/types.d.ts.map +1 -0
- package/lib/Cli/components/types.js +4 -0
- package/lib/Cli/components/types.js.map +1 -0
- package/lib/Cli/components/ui/Data.d.ts +15 -0
- package/lib/Cli/components/ui/Data.d.ts.map +1 -0
- package/lib/Cli/components/ui/Data.js +8 -0
- package/lib/Cli/components/ui/Data.js.map +1 -0
- package/lib/Cli/components/ui/Environment.d.ts +45 -0
- package/lib/Cli/components/ui/Environment.d.ts.map +1 -0
- package/lib/Cli/components/ui/Environment.js +38 -0
- package/lib/Cli/components/ui/Environment.js.map +1 -0
- package/lib/Cli/components/ui/Feedback.d.ts +57 -0
- package/lib/Cli/components/ui/Feedback.d.ts.map +1 -0
- package/lib/Cli/components/ui/Feedback.js +83 -0
- package/lib/Cli/components/ui/Feedback.js.map +1 -0
- package/lib/Cli/components/ui/Interactive.d.ts +157 -0
- package/lib/Cli/components/ui/Interactive.d.ts.map +1 -0
- package/lib/Cli/components/ui/Interactive.js +527 -0
- package/lib/Cli/components/ui/Interactive.js.map +1 -0
- package/lib/Cli/components/ui/Layout.d.ts +74 -0
- package/lib/Cli/components/ui/Layout.d.ts.map +1 -0
- package/lib/Cli/components/ui/Layout.js +91 -0
- package/lib/Cli/components/ui/Layout.js.map +1 -0
- package/lib/Cli/components/ui/Live.d.ts +49 -0
- package/lib/Cli/components/ui/Live.d.ts.map +1 -0
- package/lib/Cli/components/ui/Live.js +43 -0
- package/lib/Cli/components/ui/Live.js.map +1 -0
- package/lib/Cli/components/ui/ProgressBar.d.ts +16 -0
- package/lib/Cli/components/ui/ProgressBar.d.ts.map +1 -0
- package/lib/Cli/components/ui/ProgressBar.js +17 -0
- package/lib/Cli/components/ui/ProgressBar.js.map +1 -0
- package/lib/Cli/components/ui/Transcript.d.ts +12 -0
- package/lib/Cli/components/ui/Transcript.d.ts.map +1 -0
- package/lib/Cli/components/ui/Transcript.js +14 -0
- package/lib/Cli/components/ui/Transcript.js.map +1 -0
- package/lib/Cli/components/ui/Typography.d.ts +17 -0
- package/lib/Cli/components/ui/Typography.d.ts.map +1 -0
- package/lib/Cli/components/ui/Typography.js +21 -0
- package/lib/Cli/components/ui/Typography.js.map +1 -0
- package/lib/Cli/components/ui/index.d.ts +16 -0
- package/lib/Cli/components/ui/index.d.ts.map +1 -0
- package/lib/Cli/components/ui/index.js +16 -0
- package/lib/Cli/components/ui/index.js.map +1 -0
- package/lib/Cli/components/view/ApprovePlan.d.ts +17 -0
- package/lib/Cli/components/view/ApprovePlan.d.ts.map +1 -0
- package/lib/Cli/components/view/ApprovePlan.js +59 -0
- package/lib/Cli/components/view/ApprovePlan.js.map +1 -0
- package/lib/Cli/components/view/Help.d.ts +4 -0
- package/lib/Cli/components/view/Help.d.ts.map +1 -0
- package/lib/Cli/components/view/Help.js +116 -0
- package/lib/Cli/components/view/Help.js.map +1 -0
- package/lib/Cli/components/view/Logo.d.ts +7 -0
- package/lib/Cli/components/view/Logo.d.ts.map +1 -0
- package/lib/Cli/components/view/Logo.js +118 -0
- package/lib/Cli/components/view/Logo.js.map +1 -0
- package/lib/Cli/components/view/Nuke.d.ts +36 -0
- package/lib/Cli/components/view/Nuke.d.ts.map +1 -0
- package/lib/Cli/components/view/Nuke.js +148 -0
- package/lib/Cli/components/view/Nuke.js.map +1 -0
- package/lib/Cli/components/view/PlanDecision.d.ts +15 -0
- package/lib/Cli/components/view/PlanDecision.d.ts.map +1 -0
- package/lib/Cli/components/view/PlanDecision.js +26 -0
- package/lib/Cli/components/view/PlanDecision.js.map +1 -0
- package/lib/Cli/components/view/PlanRow.d.ts +17 -0
- package/lib/Cli/components/view/PlanRow.d.ts.map +1 -0
- package/lib/Cli/components/view/PlanRow.js +14 -0
- package/lib/Cli/components/view/PlanRow.js.map +1 -0
- package/lib/Cli/components/view/PlanTree.d.ts +116 -0
- package/lib/Cli/components/view/PlanTree.d.ts.map +1 -0
- package/lib/Cli/components/view/PlanTree.js +207 -0
- package/lib/Cli/components/view/PlanTree.js.map +1 -0
- package/lib/Cli/components/view/PlanView.d.ts +42 -0
- package/lib/Cli/components/view/PlanView.d.ts.map +1 -0
- package/lib/Cli/components/view/PlanView.js +310 -0
- package/lib/Cli/components/view/PlanView.js.map +1 -0
- package/lib/Cli/components/view/Profile.d.ts +130 -0
- package/lib/Cli/components/view/Profile.d.ts.map +1 -0
- package/lib/Cli/components/view/Profile.js +147 -0
- package/lib/Cli/components/view/Profile.js.map +1 -0
- package/lib/Cli/components/view/ProfileDashboard.d.ts +152 -0
- package/lib/Cli/components/view/ProfileDashboard.d.ts.map +1 -0
- package/lib/Cli/components/view/ProfileDashboard.js +485 -0
- package/lib/Cli/components/view/ProfileDashboard.js.map +1 -0
- package/lib/Cli/components/view/Prompts.d.ts +10 -0
- package/lib/Cli/components/view/Prompts.d.ts.map +1 -0
- package/lib/Cli/components/view/Prompts.js +440 -0
- package/lib/Cli/components/view/Prompts.js.map +1 -0
- package/lib/Cli/components/view/Runtime.d.ts +8 -0
- package/lib/Cli/components/view/Runtime.d.ts.map +1 -0
- package/lib/Cli/components/view/Runtime.js +670 -0
- package/lib/Cli/components/view/Runtime.js.map +1 -0
- package/lib/Cli/components/view/SigilCli.d.ts +5 -0
- package/lib/Cli/components/view/SigilCli.d.ts.map +1 -0
- package/lib/Cli/components/view/SigilCli.js +134 -0
- package/lib/Cli/components/view/SigilCli.js.map +1 -0
- package/lib/Cli/components/view/StackOutputs.d.ts +10 -0
- package/lib/Cli/components/view/StackOutputs.d.ts.map +1 -0
- package/lib/Cli/components/view/StackOutputs.js +14 -0
- package/lib/Cli/components/view/StackOutputs.js.map +1 -0
- package/lib/Cli/components/view/StateExplorer.d.ts +118 -0
- package/lib/Cli/components/view/StateExplorer.d.ts.map +1 -0
- package/lib/Cli/components/view/StateExplorer.js +664 -0
- package/lib/Cli/components/view/StateExplorer.js.map +1 -0
- package/lib/Cli/components/view/statusStyle.d.ts +18 -0
- package/lib/Cli/components/view/statusStyle.d.ts.map +1 -0
- package/lib/Cli/components/view/statusStyle.js +69 -0
- package/lib/Cli/components/view/statusStyle.js.map +1 -0
- package/lib/Cli/components/view/usePlanPresentation.d.ts +25 -0
- package/lib/Cli/components/view/usePlanPresentation.d.ts.map +1 -0
- package/lib/Cli/components/view/usePlanPresentation.js +54 -0
- package/lib/Cli/components/view/usePlanPresentation.js.map +1 -0
- package/lib/Cli/components/view/usePlanViewport.d.ts +31 -0
- package/lib/Cli/components/view/usePlanViewport.d.ts.map +1 -0
- package/lib/Cli/components/view/usePlanViewport.js +113 -0
- package/lib/Cli/components/view/usePlanViewport.js.map +1 -0
- package/lib/Cli/exec.d.ts +5 -1
- package/lib/Cli/exec.d.ts.map +1 -1
- package/lib/Cli/exec.js +173 -19
- package/lib/Cli/exec.js.map +1 -1
- package/lib/Cli/main.d.ts +4 -1
- package/lib/Cli/main.d.ts.map +1 -1
- package/lib/Cli/main.js +129 -38
- package/lib/Cli/main.js.map +1 -1
- package/lib/Cli/selectCli.d.ts +5 -3
- package/lib/Cli/selectCli.d.ts.map +1 -1
- package/lib/Cli/selectCli.js +16 -9
- package/lib/Cli/selectCli.js.map +1 -1
- package/lib/Cloudflare/ApiToken/UserApiToken.d.ts +1 -1
- package/lib/Cloudflare/ApiToken/UserApiToken.js +1 -1
- package/lib/Cloudflare/Auth/AuthConfig.d.ts +60 -0
- package/lib/Cloudflare/Auth/AuthConfig.d.ts.map +1 -0
- package/lib/Cloudflare/Auth/AuthConfig.js +68 -0
- package/lib/Cloudflare/Auth/AuthConfig.js.map +1 -0
- package/lib/Cloudflare/Auth/AuthProvider.d.ts +2 -142
- package/lib/Cloudflare/Auth/AuthProvider.d.ts.map +1 -1
- package/lib/Cloudflare/Auth/AuthProvider.js +473 -327
- package/lib/Cloudflare/Auth/AuthProvider.js.map +1 -1
- package/lib/Cloudflare/Auth/OAuthClient.d.ts +16 -48
- package/lib/Cloudflare/Auth/OAuthClient.d.ts.map +1 -1
- package/lib/Cloudflare/Auth/OAuthClient.js +25 -260
- package/lib/Cloudflare/Auth/OAuthClient.js.map +1 -1
- package/lib/Cloudflare/Auth/OAuthScopes.d.ts +88 -0
- package/lib/Cloudflare/Auth/OAuthScopes.d.ts.map +1 -0
- package/lib/Cloudflare/Auth/OAuthScopes.js +887 -0
- package/lib/Cloudflare/Auth/OAuthScopes.js.map +1 -0
- package/lib/Cloudflare/Auth/TokenPolicy.d.ts +34 -0
- package/lib/Cloudflare/Auth/TokenPolicy.d.ts.map +1 -0
- package/lib/Cloudflare/Auth/TokenPolicy.js +51 -0
- package/lib/Cloudflare/Auth/TokenPolicy.js.map +1 -0
- package/lib/Cloudflare/CloudflareEnvironment.d.ts +2 -3
- package/lib/Cloudflare/CloudflareEnvironment.d.ts.map +1 -1
- package/lib/Cloudflare/CloudflareEnvironment.js +7 -11
- package/lib/Cloudflare/CloudflareEnvironment.js.map +1 -1
- package/lib/Cloudflare/Containers/Container.d.ts +10 -25
- package/lib/Cloudflare/Containers/Container.d.ts.map +1 -1
- package/lib/Cloudflare/Containers/Container.js +9 -23
- package/lib/Cloudflare/Containers/Container.js.map +1 -1
- package/lib/Cloudflare/Containers/ContainerApplication.d.ts +12 -27
- package/lib/Cloudflare/Containers/ContainerApplication.d.ts.map +1 -1
- package/lib/Cloudflare/Containers/ContainerApplication.js.map +1 -1
- package/lib/Cloudflare/Containers/StartContainer.d.ts +1 -1
- package/lib/Cloudflare/Containers/StartContainer.d.ts.map +1 -1
- package/lib/Cloudflare/Credentials.d.ts +6 -20
- package/lib/Cloudflare/Credentials.d.ts.map +1 -1
- package/lib/Cloudflare/Credentials.js +12 -54
- package/lib/Cloudflare/Credentials.js.map +1 -1
- package/lib/Cloudflare/D1/ImportDatabase.d.ts +1 -1
- package/lib/Cloudflare/D1/ImportDatabase.d.ts.map +1 -1
- package/lib/Cloudflare/EdgeSession.d.ts +1 -1
- package/lib/Cloudflare/EdgeSession.d.ts.map +1 -1
- package/lib/Cloudflare/EdgeSession.js +1 -1
- package/lib/Cloudflare/EdgeSession.js.map +1 -1
- package/lib/Cloudflare/Logs.d.ts.map +1 -1
- package/lib/Cloudflare/Logs.js +10 -6
- package/lib/Cloudflare/Logs.js.map +1 -1
- package/lib/Cloudflare/Pages/Project.d.ts +1 -1
- package/lib/Cloudflare/Pages/Project.js +1 -1
- package/lib/Cloudflare/Providers.d.ts +2 -2
- package/lib/Cloudflare/Providers.d.ts.map +1 -1
- package/lib/Cloudflare/Providers.js +2 -2
- package/lib/Cloudflare/Providers.js.map +1 -1
- package/lib/Cloudflare/StateStore/Api.d.ts +3 -0
- package/lib/Cloudflare/StateStore/Api.d.ts.map +1 -1
- package/lib/Cloudflare/StateStore/Api.js +2 -2
- package/lib/Cloudflare/StateStore/Api.js.map +1 -1
- package/lib/Cloudflare/StateStore/CredentialsFile.d.ts +10 -6
- package/lib/Cloudflare/StateStore/CredentialsFile.d.ts.map +1 -1
- package/lib/Cloudflare/StateStore/CredentialsFile.js +23 -1
- package/lib/Cloudflare/StateStore/CredentialsFile.js.map +1 -1
- package/lib/Cloudflare/StateStore/State.d.ts +9 -5
- package/lib/Cloudflare/StateStore/State.d.ts.map +1 -1
- package/lib/Cloudflare/StateStore/State.js +132 -99
- package/lib/Cloudflare/StateStore/State.js.map +1 -1
- package/lib/Cloudflare/Vectorize/SearchIndexHttpClient.js +1 -1
- package/lib/Cloudflare/Vectorize/SearchIndexHttpClient.js.map +1 -1
- package/lib/Cloudflare/Website/Nextjs.d.ts.map +1 -1
- package/lib/Cloudflare/Website/Nextjs.js +4 -12
- package/lib/Cloudflare/Website/Nextjs.js.map +1 -1
- package/lib/Cloudflare/Website/Vocs.d.ts +1 -1
- package/lib/Cloudflare/Website/Vocs.d.ts.map +1 -1
- package/lib/Cloudflare/Website/Vocs.js +3 -7
- package/lib/Cloudflare/Website/Vocs.js.map +1 -1
- package/lib/Cloudflare/Workers/Assets.d.ts +2 -2
- package/lib/Cloudflare/Workers/Assets.d.ts.map +1 -1
- package/lib/Cloudflare/Workers/Assets.js +74 -26
- package/lib/Cloudflare/Workers/Assets.js.map +1 -1
- package/lib/Cloudflare/Workers/BrowserHttpClient.d.ts +2 -2
- package/lib/Cloudflare/Workers/BrowserHttpClient.d.ts.map +1 -1
- package/lib/Cloudflare/Workers/BrowserHttpClient.js +10 -3
- package/lib/Cloudflare/Workers/BrowserHttpClient.js.map +1 -1
- package/lib/Cloudflare/Workers/CloudflareTracer.d.ts +9 -0
- package/lib/Cloudflare/Workers/CloudflareTracer.d.ts.map +1 -0
- package/lib/Cloudflare/Workers/CloudflareTracer.js +87 -0
- package/lib/Cloudflare/Workers/CloudflareTracer.js.map +1 -0
- package/lib/Cloudflare/Workers/Compatibility.d.ts +13 -0
- package/lib/Cloudflare/Workers/Compatibility.d.ts.map +1 -1
- package/lib/Cloudflare/Workers/Compatibility.js +31 -6
- package/lib/Cloudflare/Workers/Compatibility.js.map +1 -1
- package/lib/Cloudflare/Workers/DurableObject.d.ts +50 -4
- package/lib/Cloudflare/Workers/DurableObject.d.ts.map +1 -1
- package/lib/Cloudflare/Workers/DurableObject.js +44 -3
- package/lib/Cloudflare/Workers/DurableObject.js.map +1 -1
- package/lib/Cloudflare/Workers/DurableObjectBridge.d.ts.map +1 -1
- package/lib/Cloudflare/Workers/DurableObjectBridge.js +4 -0
- package/lib/Cloudflare/Workers/DurableObjectBridge.js.map +1 -1
- package/lib/Cloudflare/Workers/DurableObjectState.d.ts +25 -2
- package/lib/Cloudflare/Workers/DurableObjectState.d.ts.map +1 -1
- package/lib/Cloudflare/Workers/DurableObjectState.js +7 -2
- package/lib/Cloudflare/Workers/DurableObjectState.js.map +1 -1
- package/lib/Cloudflare/Workers/DurableObjectStorage.d.ts +7 -1
- package/lib/Cloudflare/Workers/DurableObjectStorage.d.ts.map +1 -1
- package/lib/Cloudflare/Workers/DurableObjectStorage.js +6 -1
- package/lib/Cloudflare/Workers/DurableObjectStorage.js.map +1 -1
- package/lib/Cloudflare/Workers/LocalWorkerProvider.d.ts.map +1 -1
- package/lib/Cloudflare/Workers/LocalWorkerProvider.js +125 -58
- package/lib/Cloudflare/Workers/LocalWorkerProvider.js.map +1 -1
- package/lib/Cloudflare/Workers/RpcWorker.d.ts +12 -5
- package/lib/Cloudflare/Workers/RpcWorker.d.ts.map +1 -1
- package/lib/Cloudflare/Workers/RpcWorker.js +8 -2
- package/lib/Cloudflare/Workers/RpcWorker.js.map +1 -1
- package/lib/Cloudflare/Workers/Source.d.ts +3 -0
- package/lib/Cloudflare/Workers/Source.d.ts.map +1 -1
- package/lib/Cloudflare/Workers/Source.js +3 -1
- package/lib/Cloudflare/Workers/Source.js.map +1 -1
- package/lib/Cloudflare/Workers/Sources/Python.d.ts +2 -0
- package/lib/Cloudflare/Workers/Sources/Python.d.ts.map +1 -1
- package/lib/Cloudflare/Workers/Sources/Python.js +16 -12
- package/lib/Cloudflare/Workers/Sources/Python.js.map +1 -1
- package/lib/Cloudflare/Workers/Sources/Rolldown.js +1 -1
- package/lib/Cloudflare/Workers/Sources/Rolldown.js.map +1 -1
- package/lib/Cloudflare/Workers/Sources/Vite.d.ts +1 -1
- package/lib/Cloudflare/Workers/Sources/Vite.d.ts.map +1 -1
- package/lib/Cloudflare/Workers/Sources/Vite.js +6 -4
- package/lib/Cloudflare/Workers/Sources/Vite.js.map +1 -1
- package/lib/Cloudflare/Workers/Telemetry.d.ts +113 -0
- package/lib/Cloudflare/Workers/Telemetry.d.ts.map +1 -0
- package/lib/Cloudflare/Workers/Telemetry.js +129 -0
- package/lib/Cloudflare/Workers/Telemetry.js.map +1 -0
- package/lib/Cloudflare/Workers/ViteBuildChildRunner.js +6 -1
- package/lib/Cloudflare/Workers/ViteBuildChildRunner.js.map +1 -1
- package/lib/Cloudflare/Workers/ViteChild.d.ts +2 -2
- package/lib/Cloudflare/Workers/ViteChild.d.ts.map +1 -1
- package/lib/Cloudflare/Workers/ViteChild.js +19 -17
- package/lib/Cloudflare/Workers/ViteChild.js.map +1 -1
- package/lib/Cloudflare/Workers/ViteChild.shared.d.ts +1 -0
- package/lib/Cloudflare/Workers/ViteChild.shared.d.ts.map +1 -1
- package/lib/Cloudflare/Workers/ViteChild.shared.js.map +1 -1
- package/lib/Cloudflare/Workers/ViteChildRunner.js +2 -1
- package/lib/Cloudflare/Workers/ViteChildRunner.js.map +1 -1
- package/lib/Cloudflare/Workers/Worker.d.ts +101 -52
- package/lib/Cloudflare/Workers/Worker.d.ts.map +1 -1
- package/lib/Cloudflare/Workers/Worker.js +91 -50
- package/lib/Cloudflare/Workers/Worker.js.map +1 -1
- package/lib/Cloudflare/Workers/WorkerAsyncBindings.d.ts +9 -1
- package/lib/Cloudflare/Workers/WorkerAsyncBindings.d.ts.map +1 -1
- package/lib/Cloudflare/Workers/WorkerAsyncBindings.js +23 -0
- package/lib/Cloudflare/Workers/WorkerAsyncBindings.js.map +1 -1
- package/lib/Cloudflare/Workers/WorkerBinding.d.ts +6 -0
- package/lib/Cloudflare/Workers/WorkerBinding.d.ts.map +1 -1
- package/lib/Cloudflare/Workers/WorkerLoader.d.ts +30 -4
- package/lib/Cloudflare/Workers/WorkerLoader.d.ts.map +1 -1
- package/lib/Cloudflare/Workers/WorkerLoader.js +36 -5
- package/lib/Cloudflare/Workers/WorkerLoader.js.map +1 -1
- package/lib/Cloudflare/Workers/WorkerProvider.d.ts.map +1 -1
- package/lib/Cloudflare/Workers/WorkerProvider.js +52 -45
- package/lib/Cloudflare/Workers/WorkerProvider.js.map +1 -1
- package/lib/Cloudflare/Workers/cloudflare_workers.d.ts.map +1 -1
- package/lib/Cloudflare/Workers/cloudflare_workers.js +4 -1
- package/lib/Cloudflare/Workers/cloudflare_workers.js.map +1 -1
- package/lib/Cloudflare/Workers/index.d.ts +1 -0
- package/lib/Cloudflare/Workers/index.d.ts.map +1 -1
- package/lib/Cloudflare/Workers/index.js +1 -0
- package/lib/Cloudflare/Workers/index.js.map +1 -1
- package/lib/Cloudflare/Workflows/Workflow.d.ts +84 -0
- package/lib/Cloudflare/Workflows/Workflow.d.ts.map +1 -1
- package/lib/Cloudflare/Workflows/Workflow.js +47 -0
- package/lib/Cloudflare/Workflows/Workflow.js.map +1 -1
- package/lib/Cloudflare/Workflows/WorkflowBridge.js +7 -4
- package/lib/Cloudflare/Workflows/WorkflowBridge.js.map +1 -1
- package/lib/Command/Command.d.ts +1 -1
- package/lib/Command/Command.d.ts.map +1 -1
- package/lib/Command/Command.js +2 -2
- package/lib/Command/Command.js.map +1 -1
- package/lib/Command/Dev.d.ts +5 -2
- package/lib/Command/Dev.d.ts.map +1 -1
- package/lib/Command/Dev.js +31 -7
- package/lib/Command/Dev.js.map +1 -1
- package/lib/Command/Providers.d.ts +1 -1
- package/lib/Command/Providers.d.ts.map +1 -1
- package/lib/Deploy.d.ts +1 -1
- package/lib/Deploy.d.ts.map +1 -1
- package/lib/Destroy.d.ts +1 -1
- package/lib/Destroy.d.ts.map +1 -1
- package/lib/Docker/BuildHash.d.ts +13 -0
- package/lib/Docker/BuildHash.d.ts.map +1 -1
- package/lib/Docker/BuildHash.js +53 -3
- package/lib/Docker/BuildHash.js.map +1 -1
- package/lib/Docker/Docker.d.ts +1 -1
- package/lib/Docker/Docker.d.ts.map +1 -1
- package/lib/Docker/Docker.js +1 -1
- package/lib/Docker/Docker.js.map +1 -1
- package/lib/Docker/Service.d.ts +7 -21
- package/lib/Docker/Service.d.ts.map +1 -1
- package/lib/Docker/Service.js +7 -21
- package/lib/Docker/Service.js.map +1 -1
- package/lib/Docker/ServiceImage.d.ts +4 -5
- package/lib/Docker/ServiceImage.d.ts.map +1 -1
- package/lib/Docker/ServiceImage.js.map +1 -1
- package/lib/Drift.d.ts +91 -0
- package/lib/Drift.d.ts.map +1 -0
- package/lib/{Sync.js → Drift.js} +98 -29
- package/lib/Drift.js.map +1 -0
- package/lib/Drizzle/Schema.d.ts.map +1 -1
- package/lib/Drizzle/Schema.js +5 -5
- package/lib/Drizzle/Schema.js.map +1 -1
- package/lib/Fly/App.d.ts +1 -1
- package/lib/Fly/App.d.ts.map +1 -1
- package/lib/Fly/AuthProvider.d.ts +6 -20
- package/lib/Fly/AuthProvider.d.ts.map +1 -1
- package/lib/Fly/AuthProvider.js +32 -124
- package/lib/Fly/AuthProvider.js.map +1 -1
- package/lib/Fly/Bucket.d.ts +1 -1
- package/lib/Fly/Bucket.d.ts.map +1 -1
- package/lib/Fly/Catalog.d.ts +1 -1
- package/lib/Fly/Catalog.d.ts.map +1 -1
- package/lib/Fly/CheckpointHttp.d.ts.map +1 -1
- package/lib/Fly/CheckpointHttp.js +2 -2
- package/lib/Fly/CheckpointHttp.js.map +1 -1
- package/lib/Fly/Credentials.d.ts +15 -6
- package/lib/Fly/Credentials.d.ts.map +1 -1
- package/lib/Fly/Credentials.js +25 -13
- package/lib/Fly/Credentials.js.map +1 -1
- package/lib/Fly/DecryptHttp.d.ts.map +1 -1
- package/lib/Fly/DecryptHttp.js +2 -2
- package/lib/Fly/DecryptHttp.js.map +1 -1
- package/lib/Fly/EncryptHttp.d.ts.map +1 -1
- package/lib/Fly/EncryptHttp.js +2 -2
- package/lib/Fly/EncryptHttp.js.map +1 -1
- package/lib/Fly/Environment.d.ts +1 -1
- package/lib/Fly/Environment.d.ts.map +1 -1
- package/lib/Fly/ExecHttp.d.ts.map +1 -1
- package/lib/Fly/ExecHttp.js +2 -2
- package/lib/Fly/ExecHttp.js.map +1 -1
- package/lib/Fly/GetSecretHttp.d.ts.map +1 -1
- package/lib/Fly/GetSecretHttp.js +2 -2
- package/lib/Fly/GetSecretHttp.js.map +1 -1
- package/lib/Fly/ListSecretsHttp.d.ts.map +1 -1
- package/lib/Fly/ListSecretsHttp.js +2 -2
- package/lib/Fly/ListSecretsHttp.js.map +1 -1
- package/lib/Fly/Machine.d.ts +65 -0
- package/lib/Fly/Machine.d.ts.map +1 -1
- package/lib/Fly/Machine.js +34 -19
- package/lib/Fly/Machine.js.map +1 -1
- package/lib/Fly/Postgres.d.ts +1 -1
- package/lib/Fly/Postgres.d.ts.map +1 -1
- package/lib/Fly/Providers.d.ts +1 -1
- package/lib/Fly/Providers.d.ts.map +1 -1
- package/lib/Fly/Providers.js +2 -2
- package/lib/Fly/Providers.js.map +1 -1
- package/lib/Fly/Redis.d.ts +1 -1
- package/lib/Fly/Redis.d.ts.map +1 -1
- package/lib/Fly/Service.d.ts +43 -0
- package/lib/Fly/Service.d.ts.map +1 -1
- package/lib/Fly/Service.js +44 -19
- package/lib/Fly/Service.js.map +1 -1
- package/lib/Fly/SignHttp.d.ts.map +1 -1
- package/lib/Fly/SignHttp.js +2 -2
- package/lib/Fly/SignHttp.js.map +1 -1
- package/lib/Fly/VerifyHttp.d.ts.map +1 -1
- package/lib/Fly/VerifyHttp.js +2 -2
- package/lib/Fly/VerifyHttp.js.map +1 -1
- package/lib/Fly/Volume.d.ts +8 -8
- package/lib/Fly/Volume.d.ts.map +1 -1
- package/lib/Fly/WriteSecretHttp.d.ts.map +1 -1
- package/lib/Fly/WriteSecretHttp.js +2 -2
- package/lib/Fly/WriteSecretHttp.js.map +1 -1
- package/lib/Fly/replicas.d.ts +12 -10
- package/lib/Fly/replicas.d.ts.map +1 -1
- package/lib/Fly/replicas.js +35 -0
- package/lib/Fly/replicas.js.map +1 -1
- package/lib/GitHub/AuthProvider.d.ts +20 -29
- package/lib/GitHub/AuthProvider.d.ts.map +1 -1
- package/lib/GitHub/AuthProvider.js +141 -75
- package/lib/GitHub/AuthProvider.js.map +1 -1
- package/lib/GitHub/Credentials.d.ts +2 -3
- package/lib/GitHub/Credentials.d.ts.map +1 -1
- package/lib/GitHub/Credentials.js +6 -10
- package/lib/GitHub/Credentials.js.map +1 -1
- package/lib/GitHub/Providers.d.ts +3 -3
- package/lib/GitHub/Providers.d.ts.map +1 -1
- package/lib/GitHub/Providers.js +4 -4
- package/lib/GitHub/Providers.js.map +1 -1
- package/lib/Hetzner/AuthProvider.d.ts +7 -20
- package/lib/Hetzner/AuthProvider.d.ts.map +1 -1
- package/lib/Hetzner/AuthProvider.js +42 -130
- package/lib/Hetzner/AuthProvider.js.map +1 -1
- package/lib/Hetzner/Catalog.d.ts +5 -5
- package/lib/Hetzner/Catalog.d.ts.map +1 -1
- package/lib/Hetzner/Credentials.d.ts +1 -3
- package/lib/Hetzner/Credentials.d.ts.map +1 -1
- package/lib/Hetzner/Credentials.js +4 -9
- package/lib/Hetzner/Credentials.js.map +1 -1
- package/lib/Hetzner/PlacementGroup.d.ts +1 -1
- package/lib/Hetzner/PlacementGroup.d.ts.map +1 -1
- package/lib/Hetzner/Providers.d.ts +1 -1
- package/lib/Hetzner/Providers.d.ts.map +1 -1
- package/lib/Hetzner/Providers.js +2 -2
- package/lib/Hetzner/Providers.js.map +1 -1
- package/lib/Hetzner/hosted.d.ts +1 -1
- package/lib/Interaction.d.ts +186 -0
- package/lib/Interaction.d.ts.map +1 -0
- package/lib/Interaction.js +149 -0
- package/lib/Interaction.js.map +1 -0
- package/lib/Kubernetes/ClusterAdapter.d.ts +4 -5
- package/lib/Kubernetes/ClusterAdapter.d.ts.map +1 -1
- package/lib/Kubernetes/ClusterAdapter.js.map +1 -1
- package/lib/Kubernetes/Deployment.d.ts +7 -21
- package/lib/Kubernetes/Deployment.d.ts.map +1 -1
- package/lib/Kubernetes/Deployment.js +7 -21
- package/lib/Kubernetes/Deployment.js.map +1 -1
- package/lib/Kubernetes/Job.d.ts +7 -21
- package/lib/Kubernetes/Job.d.ts.map +1 -1
- package/lib/Kubernetes/Job.js +7 -21
- package/lib/Kubernetes/Job.js.map +1 -1
- package/lib/Local/DevLog.d.ts +32 -0
- package/lib/Local/DevLog.d.ts.map +1 -0
- package/lib/Local/DevLog.js +114 -0
- package/lib/Local/DevLog.js.map +1 -0
- package/lib/Local/LocalProvider.d.ts +1 -1
- package/lib/Local/LocalProvider.d.ts.map +1 -1
- package/lib/Local/LocalProvider.js +2 -2
- package/lib/Local/LocalProvider.js.map +1 -1
- package/lib/Local/RpcServer.d.ts.map +1 -1
- package/lib/Local/RpcServer.js +10 -1
- package/lib/Local/RpcServer.js.map +1 -1
- package/lib/Local/RpcServerEnvironment.d.ts +2 -2
- package/lib/Local/RpcServerEnvironment.d.ts.map +1 -1
- package/lib/Local/RpcServerEnvironment.js +3 -2
- package/lib/Local/RpcServerEnvironment.js.map +1 -1
- package/lib/Local/RpcSpawner.d.ts +14 -5
- package/lib/Local/RpcSpawner.d.ts.map +1 -1
- package/lib/Local/RpcSpawner.js +105 -38
- package/lib/Local/RpcSpawner.js.map +1 -1
- package/lib/Neon/AuthProvider.d.ts +4 -13
- package/lib/Neon/AuthProvider.d.ts.map +1 -1
- package/lib/Neon/AuthProvider.js +24 -107
- package/lib/Neon/AuthProvider.js.map +1 -1
- package/lib/Neon/Credentials.d.ts +1 -3
- package/lib/Neon/Credentials.d.ts.map +1 -1
- package/lib/Neon/Credentials.js +4 -9
- package/lib/Neon/Credentials.js.map +1 -1
- package/lib/Neon/Providers.d.ts +1 -1
- package/lib/Neon/Providers.d.ts.map +1 -1
- package/lib/Neon/Providers.js +2 -2
- package/lib/Neon/Providers.js.map +1 -1
- package/lib/Nuke.d.ts +89 -0
- package/lib/Nuke.d.ts.map +1 -0
- package/lib/Nuke.js +265 -0
- package/lib/Nuke.js.map +1 -0
- package/lib/Plan.d.ts +27 -5
- package/lib/Plan.d.ts.map +1 -1
- package/lib/Plan.js +167 -21
- package/lib/Plan.js.map +1 -1
- package/lib/Planetscale/AuthProvider.d.ts +25 -37
- package/lib/Planetscale/AuthProvider.d.ts.map +1 -1
- package/lib/Planetscale/AuthProvider.js +267 -150
- package/lib/Planetscale/AuthProvider.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 +16 -13
- package/lib/Planetscale/Credentials.js.map +1 -1
- package/lib/Planetscale/OAuthClient.d.ts +8 -52
- package/lib/Planetscale/OAuthClient.d.ts.map +1 -1
- package/lib/Planetscale/OAuthClient.js +18 -240
- package/lib/Planetscale/OAuthClient.js.map +1 -1
- package/lib/Planetscale/Providers.d.ts +1 -1
- package/lib/Planetscale/Providers.d.ts.map +1 -1
- package/lib/Planetscale/Providers.js +2 -2
- package/lib/Planetscale/Providers.js.map +1 -1
- package/lib/Planetscale/Util.d.ts +1 -1
- package/lib/Planetscale/Util.d.ts.map +1 -1
- package/lib/Prisma/AuthProvider.d.ts +7 -15
- package/lib/Prisma/AuthProvider.d.ts.map +1 -1
- package/lib/Prisma/AuthProvider.js +54 -121
- package/lib/Prisma/AuthProvider.js.map +1 -1
- package/lib/Prisma/Compute.d.ts +7 -21
- package/lib/Prisma/Compute.d.ts.map +1 -1
- package/lib/Prisma/Compute.js +7 -21
- package/lib/Prisma/Compute.js.map +1 -1
- package/lib/Prisma/PrismaEnvironment.d.ts +1 -2
- package/lib/Prisma/PrismaEnvironment.d.ts.map +1 -1
- package/lib/Prisma/PrismaEnvironment.js +3 -8
- package/lib/Prisma/PrismaEnvironment.js.map +1 -1
- package/lib/Prisma/Providers.d.ts +3 -3
- package/lib/Prisma/Providers.d.ts.map +1 -1
- package/lib/Prisma/Providers.js +7 -7
- package/lib/Prisma/Providers.js.map +1 -1
- package/lib/Provider.d.ts +10 -2
- package/lib/Provider.d.ts.map +1 -1
- package/lib/Provider.js +9 -10
- package/lib/Provider.js.map +1 -1
- package/lib/Railway/AuditLog.d.ts +2 -2
- package/lib/Railway/AuditLog.d.ts.map +1 -1
- package/lib/Railway/AuthProvider.d.ts +19 -19
- package/lib/Railway/AuthProvider.d.ts.map +1 -1
- package/lib/Railway/AuthProvider.js +193 -127
- package/lib/Railway/AuthProvider.js.map +1 -1
- package/lib/Railway/Bucket.js +2 -2
- package/lib/Railway/CloudAgent.js +2 -2
- package/lib/Railway/Credentials.d.ts +2 -5
- package/lib/Railway/Credentials.d.ts.map +1 -1
- package/lib/Railway/Credentials.js +5 -11
- package/lib/Railway/Credentials.js.map +1 -1
- package/lib/Railway/CustomDomain.js +3 -3
- package/lib/Railway/Function.js +6 -6
- package/lib/Railway/Group.js +2 -2
- package/lib/Railway/LoginSession.d.ts +3 -3
- package/lib/Railway/LoginSession.js +5 -5
- package/lib/Railway/Mongo.js +13 -13
- package/lib/Railway/MySQL.js +13 -13
- package/lib/Railway/Postgres.js +13 -13
- package/lib/Railway/PrivateNetwork.js +2 -2
- package/lib/Railway/Project.d.ts +3 -3
- package/lib/Railway/Project.d.ts.map +1 -1
- package/lib/Railway/Project.js +3 -3
- package/lib/Railway/ProjectEnvironment.js +3 -3
- package/lib/Railway/Providers.d.ts +1 -1
- package/lib/Railway/Providers.d.ts.map +1 -1
- package/lib/Railway/Providers.js +2 -2
- package/lib/Railway/Providers.js.map +1 -1
- package/lib/Railway/Redis.js +5 -5
- package/lib/Railway/Sandbox.d.ts +6 -6
- package/lib/Railway/Sandbox.js +5 -5
- package/lib/Railway/Service.d.ts +72 -1
- package/lib/Railway/Service.d.ts.map +1 -1
- package/lib/Railway/Service.js +42 -0
- package/lib/Railway/Service.js.map +1 -1
- package/lib/Railway/ServiceDomain.d.ts +28 -2
- package/lib/Railway/ServiceDomain.d.ts.map +1 -1
- package/lib/Railway/ServiceDomain.js +134 -17
- package/lib/Railway/ServiceDomain.js.map +1 -1
- package/lib/Railway/ServiceProvider.d.ts +2 -10
- package/lib/Railway/ServiceProvider.d.ts.map +1 -1
- package/lib/Railway/ServiceProvider.js +170 -64
- package/lib/Railway/ServiceProvider.js.map +1 -1
- package/lib/Railway/TcpProxy.js +2 -2
- package/lib/Railway/Template.js +2 -2
- package/lib/Railway/Usage.js +2 -2
- package/lib/Railway/Variable.js +2 -2
- package/lib/Railway/Volume.d.ts +1 -1
- package/lib/Railway/Volume.d.ts.map +1 -1
- package/lib/Railway/Volume.js +4 -4
- package/lib/Railway/VolumeBackup.d.ts +2 -2
- package/lib/Railway/VolumeBackup.js +8 -8
- package/lib/Railway/local-context.d.ts +125 -0
- package/lib/Railway/local-context.d.ts.map +1 -0
- package/lib/Railway/local-context.js +254 -0
- package/lib/Railway/local-context.js.map +1 -0
- package/lib/Report.d.ts +248 -0
- package/lib/Report.d.ts.map +1 -0
- package/lib/Report.js +18 -0
- package/lib/Report.js.map +1 -0
- package/lib/Stack.d.ts +7 -6
- package/lib/Stack.d.ts.map +1 -1
- package/lib/Stack.js +2 -4
- package/lib/Stack.js.map +1 -1
- package/lib/State/Export.d.ts +6 -4
- package/lib/State/Export.d.ts.map +1 -1
- package/lib/State/Export.js +13 -18
- package/lib/State/Export.js.map +1 -1
- package/lib/State/HttpStateStore.d.ts +1 -1
- package/lib/State/HttpStateStore.d.ts.map +1 -1
- package/lib/State/HttpStateStore.js +10 -6
- package/lib/State/HttpStateStore.js.map +1 -1
- package/lib/State/LocalState.d.ts.map +1 -1
- package/lib/State/LocalState.js +6 -13
- package/lib/State/LocalState.js.map +1 -1
- package/lib/State/Tree.d.ts +62 -0
- package/lib/State/Tree.d.ts.map +1 -0
- package/lib/State/Tree.js +166 -0
- package/lib/State/Tree.js.map +1 -0
- package/lib/State/index.d.ts +1 -0
- package/lib/State/index.d.ts.map +1 -1
- package/lib/State/index.js +1 -0
- package/lib/State/index.js.map +1 -1
- package/lib/Telemetry/Layer.d.ts +6 -0
- package/lib/Telemetry/Layer.d.ts.map +1 -1
- package/lib/Telemetry/Layer.js +16 -5
- package/lib/Telemetry/Layer.js.map +1 -1
- package/lib/Telemetry.d.ts +5 -0
- package/lib/Telemetry.d.ts.map +1 -1
- package/lib/Telemetry.js +6 -1
- package/lib/Telemetry.js.map +1 -1
- package/lib/Test/Core.d.ts +4 -3
- package/lib/Test/Core.d.ts.map +1 -1
- package/lib/Test/Core.js +5 -3
- package/lib/Test/Core.js.map +1 -1
- package/lib/UserFacingError.d.ts +26 -0
- package/lib/UserFacingError.d.ts.map +1 -0
- package/lib/UserFacingError.js +25 -0
- package/lib/UserFacingError.js.map +1 -0
- package/lib/Util/AtomicFile.d.ts +19 -0
- package/lib/Util/AtomicFile.d.ts.map +1 -0
- package/lib/Util/AtomicFile.js +22 -0
- package/lib/Util/AtomicFile.js.map +1 -0
- package/lib/Util/ConsoleSink.d.ts +4 -0
- package/lib/Util/ConsoleSink.d.ts.map +1 -0
- package/lib/Util/ConsoleSink.js +24 -0
- package/lib/Util/ConsoleSink.js.map +1 -0
- package/lib/Util/LineBuffer.d.ts +9 -0
- package/lib/Util/LineBuffer.d.ts.map +1 -0
- package/lib/Util/LineBuffer.js +23 -0
- package/lib/Util/LineBuffer.js.map +1 -0
- package/lib/Util/Memoize.d.ts +20 -0
- package/lib/Util/Memoize.d.ts.map +1 -0
- package/lib/Util/Memoize.js +38 -0
- package/lib/Util/Memoize.js.map +1 -0
- package/lib/Util/Node.d.ts +22 -5
- package/lib/Util/Node.d.ts.map +1 -1
- package/lib/Util/Node.js +30 -10
- package/lib/Util/Node.js.map +1 -1
- package/lib/Util/PlatformServices.d.ts +6 -2
- package/lib/Util/PlatformServices.d.ts.map +1 -1
- package/lib/Util/PlatformServices.js +6 -2
- package/lib/Util/PlatformServices.js.map +1 -1
- package/lib/Util/ResourceOutput.d.ts +30 -0
- package/lib/Util/ResourceOutput.d.ts.map +1 -0
- package/lib/Util/ResourceOutput.js +60 -0
- package/lib/Util/ResourceOutput.js.map +1 -0
- package/lib/Util/Terminal.d.ts +23 -0
- package/lib/Util/Terminal.d.ts.map +1 -0
- package/lib/Util/Terminal.js +57 -0
- package/lib/Util/Terminal.js.map +1 -0
- package/lib/Util/Theme.d.ts +123 -0
- package/lib/Util/Theme.d.ts.map +1 -0
- package/lib/Util/Theme.js +133 -0
- package/lib/Util/Theme.js.map +1 -0
- package/lib/Util/interactive.d.ts +17 -12
- package/lib/Util/interactive.d.ts.map +1 -1
- package/lib/Util/interactive.js +81 -13
- package/lib/Util/interactive.js.map +1 -1
- package/lib/Util/scc.d.ts +11 -3
- package/lib/Util/scc.d.ts.map +1 -1
- package/lib/Util/scc.js +35 -22
- package/lib/Util/scc.js.map +1 -1
- package/lib/Util/tarGzip.d.ts +3 -1
- package/lib/Util/tarGzip.d.ts.map +1 -1
- package/lib/Util/tarGzip.js +15 -5
- package/lib/Util/tarGzip.js.map +1 -1
- package/lib/index.d.ts +4 -2
- package/lib/index.d.ts.map +1 -1
- package/lib/index.js +4 -2
- package/lib/index.js.map +1 -1
- package/package.json +40 -38
- package/src/AWS/AGENTS.md +1 -1
- package/src/AWS/AMP/Scraper.ts +1 -1
- package/src/AWS/AppRunner/Service.ts +11 -27
- package/src/AWS/Assets.ts +2 -2
- package/src/AWS/AuthProvider.ts +748 -429
- package/src/AWS/Batch/JobDefinition.ts +11 -27
- package/src/AWS/EC2/Instance.ts +12 -28
- package/src/AWS/EC2/InternetGateway.ts +1 -1
- package/src/AWS/EC2/NatGateway.ts +1 -1
- package/src/AWS/EC2/NetworkInterface.ts +1 -1
- package/src/AWS/EC2/NetworkInterfaceAttachment.ts +1 -1
- package/src/AWS/EC2/RouteTable.ts +1 -1
- package/src/AWS/EC2/RouteTableAssociation.ts +1 -1
- package/src/AWS/EC2/Snapshot.ts +1 -1
- package/src/AWS/EC2/Subnet.ts +1 -1
- package/src/AWS/EC2/Volume.ts +1 -1
- package/src/AWS/EC2/VolumeAttachment.ts +1 -1
- package/src/AWS/EC2/Vpc.ts +1 -1
- package/src/AWS/EC2/VpcEndpoint.ts +1 -1
- package/src/AWS/EC2/hosted.ts +5 -6
- package/src/AWS/ECR/ImageSource.ts +4 -5
- package/src/AWS/ECS/Service.ts +7 -21
- package/src/AWS/ECS/Task.ts +7 -21
- package/src/AWS/ElastiCache/CacheCluster.ts +323 -0
- package/src/AWS/ElastiCache/ConnectCacheCluster.ts +58 -0
- package/src/AWS/ElastiCache/ConnectCacheClusterHttp.ts +77 -0
- package/src/AWS/ElastiCache/ConnectReplicationGroup.ts +62 -0
- package/src/AWS/ElastiCache/ConnectReplicationGroupHttp.ts +110 -0
- package/src/AWS/ElastiCache/ReplicationGroup.ts +594 -0
- package/src/AWS/ElastiCache/SubnetGroup.ts +208 -0
- package/src/AWS/ElastiCache/index.ts +7 -0
- package/src/AWS/ElastiCache/internal.ts +36 -0
- package/src/AWS/Environment.ts +15 -48
- package/src/AWS/IAM/actions.generated.ts +1 -1
- package/src/AWS/IdentityCenter/AccountAssignment.ts +7 -0
- package/src/AWS/Lambda/Function.ts +26 -28
- package/src/AWS/Lambda/MicrovmImage.ts +12 -28
- package/src/AWS/Lambda/MicrovmProvider.ts +1 -1
- package/src/AWS/Lambda/NetworkConnector.ts +1 -1
- package/src/AWS/Local/DevWatchProvider.ts +10 -1
- package/src/AWS/Organizations/Account.ts +18 -10
- package/src/AWS/Organizations/DelegatedAdministrator.ts +7 -7
- package/src/AWS/Organizations/Organization.ts +3 -5
- package/src/AWS/Organizations/common.ts +17 -0
- package/src/AWS/Providers.ts +12 -0
- package/src/AWS/S3/Bucket.ts +1 -1
- package/src/Alchemist/Errors.ts +36 -0
- package/src/Alchemist/Progress.ts +175 -0
- package/src/Alchemist/Runtime.ts +40 -0
- package/src/Alchemist/Session.ts +460 -0
- package/src/Alchemist/index.ts +24 -0
- package/src/Alchemist/routes/aws.ts +88 -0
- package/src/Alchemist/routes/cloudflare.ts +188 -0
- package/src/Alchemist/routes/cloudflareToken.ts +215 -0
- package/src/Alchemist/routes/drift.ts +94 -0
- package/src/Alchemist/routes/logs.ts +185 -0
- package/src/Alchemist/routes/nuke.ts +146 -0
- package/src/Alchemist/routes/profile.ts +427 -0
- package/src/Alchemist/routes/provider.ts +107 -0
- package/src/Alchemist/routes/stack.ts +137 -0
- package/src/Alchemist/routes/state.ts +77 -0
- package/src/Apply.ts +312 -173
- package/src/Auth/AuthProvider.ts +416 -158
- package/src/Auth/BrowserOAuth.ts +68 -0
- package/src/Auth/Credentials.ts +155 -46
- package/src/Auth/CredentialsCache.ts +57 -0
- package/src/Auth/Demand.ts +208 -83
- package/src/Auth/Env.ts +38 -14
- package/src/Auth/Inspect.ts +129 -0
- package/src/Auth/Lock.ts +26 -11
- package/src/Auth/OAuthFlow.ts +551 -0
- package/src/Auth/Paths.ts +30 -0
- package/src/Auth/Profile.ts +768 -164
- package/src/Auth/Resolve.ts +136 -0
- package/src/Auth/StoredAuthProvider.ts +291 -0
- package/src/Auth/index.ts +1 -0
- package/src/Axiom/AuthProvider.ts +112 -314
- package/src/Axiom/Credentials.ts +5 -13
- package/src/Axiom/Providers.ts +3 -3
- package/src/Bundle/Bundle.ts +3 -5
- package/src/Cli/CliKit/CliKit.ts +183 -0
- package/src/Cli/CliKit/index.ts +50 -0
- package/src/Cli/CliKit/interaction.ts +19 -0
- package/src/Cli/CliKit/layer.ts +50 -0
- package/src/Cli/DevOptions.ts +19 -0
- package/src/Cli/Format.ts +31 -0
- package/src/Cli/GlobalLog.ts +147 -0
- package/src/Cli/LoggingCli.ts +312 -108
- package/src/Cli/ModeTag.ts +1 -1
- package/src/Cli/NamespaceTree.ts +94 -21
- package/src/Cli/PlainCliFormatter.ts +75 -0
- package/src/Cli/PropertyDiff.ts +229 -0
- package/src/Cli/checkVersion.ts +19 -6
- package/src/Cli/commands/aws.ts +67 -100
- package/src/Cli/commands/cloudflare.ts +195 -435
- package/src/Cli/commands/compat.ts +25 -0
- package/src/Cli/commands/confirm.ts +46 -0
- package/src/Cli/commands/deploy.ts +225 -212
- package/src/Cli/commands/dev.ts +72 -34
- package/src/Cli/commands/drift.ts +107 -0
- package/src/Cli/commands/errors.ts +162 -0
- package/src/Cli/commands/flags.ts +199 -0
- package/src/Cli/commands/instrument.ts +18 -0
- package/src/Cli/commands/logs.ts +125 -143
- package/src/Cli/commands/nuke.ts +138 -811
- package/src/Cli/commands/profile/commands.ts +482 -0
- package/src/Cli/commands/profile/flows.ts +218 -0
- package/src/Cli/commands/profile/hub.ts +191 -0
- package/src/Cli/commands/profile/index.ts +1 -0
- package/src/Cli/commands/provider.ts +63 -0
- package/src/Cli/commands/render.ts +121 -0
- package/src/Cli/commands/state.ts +250 -387
- package/src/Cli/components/types.ts +141 -0
- package/src/Cli/components/ui/Data.tsx +44 -0
- package/src/Cli/components/ui/Environment.tsx +86 -0
- package/src/Cli/components/ui/Feedback.tsx +269 -0
- package/src/Cli/components/ui/Interactive.tsx +1062 -0
- package/src/Cli/components/ui/Layout.tsx +252 -0
- package/src/Cli/components/ui/Live.tsx +131 -0
- package/src/Cli/components/ui/ProgressBar.tsx +57 -0
- package/src/Cli/components/ui/Transcript.tsx +42 -0
- package/src/Cli/components/ui/Typography.tsx +83 -0
- package/src/Cli/components/ui/index.ts +68 -0
- package/src/Cli/components/view/ApprovePlan.tsx +101 -0
- package/src/Cli/components/view/Help.tsx +381 -0
- package/src/Cli/components/view/Logo.tsx +168 -0
- package/src/Cli/components/view/Nuke.tsx +258 -0
- package/src/Cli/components/view/PlanDecision.tsx +80 -0
- package/src/Cli/components/view/PlanRow.tsx +39 -0
- package/src/Cli/components/view/PlanTree.ts +354 -0
- package/src/Cli/components/view/PlanView.tsx +825 -0
- package/src/Cli/components/view/Profile.tsx +446 -0
- package/src/Cli/components/view/ProfileDashboard.tsx +929 -0
- package/src/Cli/components/view/Prompts.tsx +793 -0
- package/src/Cli/components/view/Runtime.tsx +975 -0
- package/src/Cli/components/view/SigilCli.tsx +186 -0
- package/src/Cli/components/view/StackOutputs.tsx +38 -0
- package/src/Cli/components/view/StateExplorer.tsx +1179 -0
- package/src/Cli/components/view/statusStyle.ts +97 -0
- package/src/Cli/components/view/usePlanPresentation.ts +82 -0
- package/src/Cli/components/view/usePlanViewport.ts +172 -0
- package/src/Cli/exec.ts +278 -32
- package/src/Cli/main.ts +189 -42
- package/src/Cli/selectCli.ts +30 -15
- package/src/Cloudflare/ApiToken/UserApiToken.ts +1 -1
- package/src/Cloudflare/Auth/AuthConfig.ts +117 -0
- package/src/Cloudflare/Auth/AuthProvider.ts +712 -608
- package/src/Cloudflare/Auth/OAuthClient.ts +40 -366
- package/src/Cloudflare/Auth/OAuthScopes.ts +921 -0
- package/src/Cloudflare/Auth/TokenPolicy.ts +79 -0
- package/src/Cloudflare/CloudflareEnvironment.ts +7 -17
- package/src/Cloudflare/Containers/Container.ts +12 -24
- package/src/Cloudflare/Containers/ContainerApplication.ts +12 -27
- package/src/Cloudflare/Credentials.ts +18 -72
- package/src/Cloudflare/EdgeSession.ts +2 -3
- package/src/Cloudflare/Logs.ts +16 -10
- package/src/Cloudflare/Pages/Project.ts +1 -1
- package/src/Cloudflare/Providers.ts +2 -2
- package/src/Cloudflare/StateStore/Api.ts +2 -2
- package/src/Cloudflare/StateStore/CredentialsFile.ts +11 -6
- package/src/Cloudflare/StateStore/State.ts +247 -194
- package/src/Cloudflare/Vectorize/SearchIndexHttpClient.ts +2 -2
- package/src/Cloudflare/Website/Nextjs.ts +4 -15
- package/src/Cloudflare/Website/Vocs.ts +3 -7
- package/src/Cloudflare/Workers/Assets.ts +106 -38
- package/src/Cloudflare/Workers/BrowserHttpClient.ts +10 -3
- package/src/Cloudflare/Workers/CloudflareTracer.ts +113 -0
- package/src/Cloudflare/Workers/Compatibility.ts +37 -7
- package/src/Cloudflare/Workers/DurableObject.ts +50 -4
- package/src/Cloudflare/Workers/DurableObjectBridge.ts +8 -0
- package/src/Cloudflare/Workers/DurableObjectState.ts +46 -9
- package/src/Cloudflare/Workers/DurableObjectStorage.ts +25 -12
- package/src/Cloudflare/Workers/LocalWorkerProvider.ts +172 -58
- package/src/Cloudflare/Workers/RpcWorker.ts +44 -18
- package/src/Cloudflare/Workers/Source.ts +9 -1
- package/src/Cloudflare/Workers/Sources/Python.ts +18 -12
- package/src/Cloudflare/Workers/Sources/Rolldown.ts +1 -1
- package/src/Cloudflare/Workers/Sources/Vite.ts +42 -34
- package/src/Cloudflare/Workers/Telemetry.ts +170 -0
- package/src/Cloudflare/Workers/ViteBuildChildRunner.ts +6 -1
- package/src/Cloudflare/Workers/ViteChild.shared.ts +1 -0
- package/src/Cloudflare/Workers/ViteChild.ts +21 -19
- package/src/Cloudflare/Workers/ViteChildRunner.ts +2 -1
- package/src/Cloudflare/Workers/Worker.ts +101 -50
- package/src/Cloudflare/Workers/WorkerAsyncBindings.ts +29 -0
- package/src/Cloudflare/Workers/WorkerLoader.ts +40 -8
- package/src/Cloudflare/Workers/WorkerProvider.ts +64 -29
- package/src/Cloudflare/Workers/cloudflare_workers.ts +5 -1
- package/src/Cloudflare/Workers/index.ts +1 -0
- package/src/Cloudflare/Workflows/Workflow.ts +105 -0
- package/src/Cloudflare/Workflows/WorkflowBridge.ts +5 -3
- package/src/Command/Command.ts +11 -3
- package/src/Command/Dev.ts +33 -8
- package/src/Docker/BuildHash.ts +75 -8
- package/src/Docker/Docker.ts +7 -2
- package/src/Docker/Service.ts +7 -21
- package/src/Docker/ServiceImage.ts +4 -5
- package/src/{Sync.ts → Drift.ts} +161 -59
- package/src/Drizzle/Schema.ts +5 -7
- package/src/Fly/AuthProvider.ts +44 -232
- package/src/Fly/CheckpointHttp.ts +5 -2
- package/src/Fly/Credentials.ts +29 -16
- package/src/Fly/DecryptHttp.ts +5 -2
- package/src/Fly/EncryptHttp.ts +5 -2
- package/src/Fly/ExecHttp.ts +5 -2
- package/src/Fly/GetSecretHttp.ts +5 -2
- package/src/Fly/ListSecretsHttp.ts +5 -2
- package/src/Fly/Machine.ts +67 -20
- package/src/Fly/Providers.ts +2 -2
- package/src/Fly/Service.ts +44 -20
- package/src/Fly/SignHttp.ts +5 -2
- package/src/Fly/VerifyHttp.ts +5 -2
- package/src/Fly/WriteSecretHttp.ts +5 -2
- package/src/Fly/replicas.ts +47 -1
- package/src/GitHub/AuthProvider.ts +225 -143
- package/src/GitHub/Credentials.ts +6 -13
- package/src/GitHub/Providers.ts +4 -4
- package/src/Hetzner/AuthProvider.ts +50 -238
- package/src/Hetzner/Credentials.ts +4 -12
- package/src/Hetzner/Providers.ts +2 -2
- package/src/Interaction.ts +354 -0
- package/src/Kubernetes/ClusterAdapter.ts +4 -5
- package/src/Kubernetes/Deployment.ts +7 -21
- package/src/Kubernetes/Job.ts +7 -21
- package/src/Local/DevLog.ts +135 -0
- package/src/Local/LocalProvider.ts +3 -3
- package/src/Local/RpcServer.ts +11 -0
- package/src/Local/RpcServerEnvironment.ts +3 -2
- package/src/Local/RpcSpawner.ts +161 -78
- package/src/Neon/AuthProvider.ts +31 -203
- package/src/Neon/Credentials.ts +4 -12
- package/src/Neon/Providers.ts +2 -2
- package/src/Nuke.ts +463 -0
- package/src/Plan.ts +920 -708
- package/src/Planetscale/AuthProvider.ts +397 -324
- package/src/Planetscale/Credentials.ts +21 -19
- package/src/Planetscale/OAuthClient.ts +34 -328
- package/src/Planetscale/Providers.ts +2 -2
- package/src/Planetscale/Util.ts +1 -1
- package/src/Prisma/AuthProvider.ts +62 -240
- package/src/Prisma/Compute.ts +7 -21
- package/src/Prisma/PrismaEnvironment.ts +6 -14
- package/src/Prisma/Providers.ts +7 -7
- package/src/Provider.ts +12 -13
- package/src/Railway/AuthProvider.ts +291 -235
- package/src/Railway/Bucket.ts +6 -6
- package/src/Railway/CloudAgent.ts +4 -4
- package/src/Railway/Credentials.ts +5 -14
- package/src/Railway/CustomDomain.ts +5 -5
- package/src/Railway/Function.ts +10 -10
- package/src/Railway/Group.ts +2 -2
- package/src/Railway/LoginSession.ts +5 -5
- package/src/Railway/Mongo.ts +19 -19
- package/src/Railway/MySQL.ts +19 -19
- package/src/Railway/Postgres.ts +19 -19
- package/src/Railway/PrivateNetwork.ts +2 -2
- package/src/Railway/Project.ts +7 -7
- package/src/Railway/ProjectEnvironment.ts +7 -7
- package/src/Railway/Providers.ts +2 -2
- package/src/Railway/Redis.ts +9 -9
- package/src/Railway/Sandbox.ts +10 -10
- package/src/Railway/Service.ts +72 -1
- package/src/Railway/ServiceDomain.ts +253 -27
- package/src/Railway/ServiceProvider.ts +234 -87
- package/src/Railway/TcpProxy.ts +4 -4
- package/src/Railway/Template.ts +12 -12
- package/src/Railway/Usage.ts +2 -2
- package/src/Railway/Variable.ts +2 -2
- package/src/Railway/Volume.ts +4 -4
- package/src/Railway/VolumeBackup.ts +11 -11
- package/src/Railway/local-context.ts +333 -0
- package/src/Report.ts +365 -0
- package/src/Stack.ts +12 -8
- package/src/State/Export.ts +28 -47
- package/src/State/HttpStateStore.ts +15 -8
- package/src/State/LocalState.ts +6 -16
- package/src/State/Tree.ts +277 -0
- package/src/State/index.ts +1 -0
- package/src/Telemetry/Layer.ts +16 -5
- package/src/Telemetry.ts +6 -1
- package/src/Test/Core.ts +10 -4
- package/src/UserFacingError.ts +35 -0
- package/src/Util/AtomicFile.ts +36 -0
- package/src/Util/ConsoleSink.ts +23 -0
- package/src/Util/LineBuffer.ts +20 -0
- package/src/Util/Memoize.ts +48 -0
- package/src/Util/Node.ts +35 -14
- package/src/Util/PlatformServices.ts +11 -1
- package/src/Util/ResourceOutput.ts +77 -0
- package/src/Util/Terminal.ts +81 -0
- package/src/Util/Theme.ts +150 -0
- package/src/Util/interactive.ts +103 -16
- package/src/Util/scc.ts +43 -23
- package/src/Util/tarGzip.ts +33 -5
- package/src/index.ts +4 -2
- package/lib/Cli/Cli.d.ts +0 -21
- package/lib/Cli/Cli.d.ts.map +0 -1
- package/lib/Cli/Cli.js +0 -5
- package/lib/Cli/Cli.js.map +0 -1
- package/lib/Cli/Event.d.ts +0 -29
- package/lib/Cli/Event.d.ts.map +0 -1
- package/lib/Cli/Event.js +0 -1
- package/lib/Cli/Event.js.map +0 -1
- package/lib/Cli/commands/_shared.d.ts +0 -138
- package/lib/Cli/commands/_shared.d.ts.map +0 -1
- package/lib/Cli/commands/_shared.js +0 -298
- package/lib/Cli/commands/_shared.js.map +0 -1
- package/lib/Cli/commands/login.d.ts +0 -14
- package/lib/Cli/commands/login.d.ts.map +0 -1
- package/lib/Cli/commands/login.js +0 -115
- package/lib/Cli/commands/login.js.map +0 -1
- package/lib/Cli/commands/profile.d.ts +0 -25
- package/lib/Cli/commands/profile.d.ts.map +0 -1
- package/lib/Cli/commands/profile.js +0 -83
- package/lib/Cli/commands/profile.js.map +0 -1
- package/lib/Cli/commands/sync.d.ts +0 -22
- package/lib/Cli/commands/sync.d.ts.map +0 -1
- package/lib/Cli/commands/sync.js +0 -64
- package/lib/Cli/commands/sync.js.map +0 -1
- package/lib/Cli/commands/tail.d.ts +0 -9
- package/lib/Cli/commands/tail.d.ts.map +0 -1
- package/lib/Cli/commands/tail.js +0 -97
- package/lib/Cli/commands/tail.js.map +0 -1
- package/lib/Cli/tui/InkCLI.d.ts +0 -4
- package/lib/Cli/tui/InkCLI.d.ts.map +0 -1
- package/lib/Cli/tui/InkCLI.js +0 -53
- package/lib/Cli/tui/InkCLI.js.map +0 -1
- package/lib/Cli/tui/components/ApprovePlan.d.ts +0 -9
- package/lib/Cli/tui/components/ApprovePlan.d.ts.map +0 -1
- package/lib/Cli/tui/components/ApprovePlan.js +0 -21
- package/lib/Cli/tui/components/ApprovePlan.js.map +0 -1
- package/lib/Cli/tui/components/Nuke.d.ts +0 -36
- package/lib/Cli/tui/components/Nuke.d.ts.map +0 -1
- package/lib/Cli/tui/components/Nuke.js +0 -132
- package/lib/Cli/tui/components/Nuke.js.map +0 -1
- package/lib/Cli/tui/components/Plan.d.ts +0 -8
- package/lib/Cli/tui/components/Plan.d.ts.map +0 -1
- package/lib/Cli/tui/components/Plan.js +0 -87
- package/lib/Cli/tui/components/Plan.js.map +0 -1
- package/lib/Cli/tui/components/PlanProgress.d.ts +0 -55
- package/lib/Cli/tui/components/PlanProgress.d.ts.map +0 -1
- package/lib/Cli/tui/components/PlanProgress.js +0 -292
- package/lib/Cli/tui/components/PlanProgress.js.map +0 -1
- package/lib/Sync.d.ts +0 -109
- package/lib/Sync.d.ts.map +0 -1
- package/lib/Sync.js.map +0 -1
- package/lib/Util/Clank.d.ts +0 -45
- package/lib/Util/Clank.d.ts.map +0 -1
- package/lib/Util/Clank.js +0 -79
- package/lib/Util/Clank.js.map +0 -1
- package/src/Cli/Cli.ts +0 -23
- package/src/Cli/Event.ts +0 -51
- package/src/Cli/commands/_shared.ts +0 -498
- package/src/Cli/commands/login.ts +0 -169
- package/src/Cli/commands/profile.ts +0 -132
- package/src/Cli/commands/sync.ts +0 -123
- package/src/Cli/commands/tail.ts +0 -155
- package/src/Cli/tui/InkCLI.tsx +0 -69
- package/src/Cli/tui/components/ApprovePlan.tsx +0 -44
- package/src/Cli/tui/components/Nuke.tsx +0 -273
- package/src/Cli/tui/components/Plan.tsx +0 -211
- package/src/Cli/tui/components/PlanProgress.tsx +0 -455
- package/src/Util/Clank.ts +0 -103
|
@@ -0,0 +1,975 @@
|
|
|
1
|
+
/** @jsxImportSource react */
|
|
2
|
+
import { stripVTControlCharacters } from "node:util";
|
|
3
|
+
import * as Cause from "effect/Cause";
|
|
4
|
+
import * as Context from "effect/Context";
|
|
5
|
+
import * as Effect from "effect/Effect";
|
|
6
|
+
import * as Exit from "effect/Exit";
|
|
7
|
+
import * as Semaphore from "effect/Semaphore";
|
|
8
|
+
import type * as Scope from "effect/Scope";
|
|
9
|
+
import {
|
|
10
|
+
AnsiText,
|
|
11
|
+
Box,
|
|
12
|
+
render,
|
|
13
|
+
renderToString,
|
|
14
|
+
Static,
|
|
15
|
+
useTitle,
|
|
16
|
+
} from "@alchemy.run/sigil";
|
|
17
|
+
import { type ReactNode, useSyncExternalStore } from "react";
|
|
18
|
+
import { Spinner, Status } from "../ui/Feedback.tsx";
|
|
19
|
+
import { CliEnvironment } from "../ui/Environment.tsx";
|
|
20
|
+
import { useTerminalInput } from "../ui/Interactive.tsx";
|
|
21
|
+
import { LiveStore, useLiveStore } from "../ui/Live.tsx";
|
|
22
|
+
import { CancelledPrompt } from "../ui/Transcript.tsx";
|
|
23
|
+
import { Text } from "../ui/Typography.tsx";
|
|
24
|
+
import {
|
|
25
|
+
NonInteractiveTerminal,
|
|
26
|
+
TerminalCancelled,
|
|
27
|
+
} from "../../../Interaction.ts";
|
|
28
|
+
import {
|
|
29
|
+
confirmScreen,
|
|
30
|
+
cycleSelectScreen,
|
|
31
|
+
awaitExternalScreen,
|
|
32
|
+
menuScreen,
|
|
33
|
+
multiSelectScreen,
|
|
34
|
+
passwordScreen,
|
|
35
|
+
selectScreen,
|
|
36
|
+
textScreen,
|
|
37
|
+
} from "./Prompts.tsx";
|
|
38
|
+
import { ApplicationPresentation, CliKit } from "../../CliKit/CliKit.ts";
|
|
39
|
+
import { setNativeProgress } from "../../../Util/Terminal.ts";
|
|
40
|
+
import type {
|
|
41
|
+
ProgressHandle,
|
|
42
|
+
ProgressOptions,
|
|
43
|
+
RenderOptions,
|
|
44
|
+
Screen,
|
|
45
|
+
MenuOptions,
|
|
46
|
+
CliKitCapabilities,
|
|
47
|
+
CliKitOptions,
|
|
48
|
+
InteractionError,
|
|
49
|
+
LiveViewHandle,
|
|
50
|
+
LiveViewOptions,
|
|
51
|
+
View,
|
|
52
|
+
} from "../types.ts";
|
|
53
|
+
|
|
54
|
+
const InApplication = Context.Reference<boolean>(
|
|
55
|
+
"Alchemy::CliKit/InApplication",
|
|
56
|
+
{
|
|
57
|
+
defaultValue: () => false,
|
|
58
|
+
},
|
|
59
|
+
);
|
|
60
|
+
|
|
61
|
+
/**
|
|
62
|
+
* One rendered block. Views are immutable once mounted — dynamic content
|
|
63
|
+
* flows through caller-owned stores (`LiveStore` + `useLiveStore`) that the
|
|
64
|
+
* view component subscribes to, never through the runtime.
|
|
65
|
+
*/
|
|
66
|
+
interface Item {
|
|
67
|
+
readonly key: number;
|
|
68
|
+
readonly view: View;
|
|
69
|
+
readonly placement?: LiveViewOptions["placement"];
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
const normalizeView = (view: View): View => {
|
|
73
|
+
if (
|
|
74
|
+
typeof view === "string" ||
|
|
75
|
+
typeof view === "number" ||
|
|
76
|
+
typeof view === "bigint"
|
|
77
|
+
) {
|
|
78
|
+
return <Text>{String(view)}</Text>;
|
|
79
|
+
}
|
|
80
|
+
// Contract: an array of primitives renders as ONE Text line with the
|
|
81
|
+
// elements concatenated (no separator) — matching how React renders
|
|
82
|
+
// adjacent text children. Callers wanting separators must join themselves.
|
|
83
|
+
if (
|
|
84
|
+
Array.isArray(view) &&
|
|
85
|
+
view.every(
|
|
86
|
+
(item) =>
|
|
87
|
+
item === null ||
|
|
88
|
+
item === undefined ||
|
|
89
|
+
typeof item === "boolean" ||
|
|
90
|
+
typeof item === "string" ||
|
|
91
|
+
typeof item === "number" ||
|
|
92
|
+
typeof item === "bigint",
|
|
93
|
+
)
|
|
94
|
+
) {
|
|
95
|
+
return (
|
|
96
|
+
<Text>
|
|
97
|
+
{view
|
|
98
|
+
.filter(
|
|
99
|
+
(item) =>
|
|
100
|
+
item !== null && item !== undefined && typeof item !== "boolean",
|
|
101
|
+
)
|
|
102
|
+
.map(String)
|
|
103
|
+
.join("")}
|
|
104
|
+
</Text>
|
|
105
|
+
);
|
|
106
|
+
}
|
|
107
|
+
return view;
|
|
108
|
+
};
|
|
109
|
+
|
|
110
|
+
const formatStaticView = (
|
|
111
|
+
view: ReactNode,
|
|
112
|
+
options: RenderOptions,
|
|
113
|
+
capabilities: CliKitCapabilities,
|
|
114
|
+
): string => {
|
|
115
|
+
const colors = options.colors ?? capabilities.colors;
|
|
116
|
+
// The renderer and the components must agree on the width: components size
|
|
117
|
+
// themselves from the environment's `columns`, so an explicit render width
|
|
118
|
+
// has to flow into the capabilities too, not only into renderToString.
|
|
119
|
+
const columns = options.columns ?? capabilities.columns;
|
|
120
|
+
const output = renderToString(
|
|
121
|
+
<CliEnvironment capabilities={{ ...capabilities, colors, columns }}>
|
|
122
|
+
{view}
|
|
123
|
+
</CliEnvironment>,
|
|
124
|
+
{ columns },
|
|
125
|
+
).replace(/[\s\n]+$/, "");
|
|
126
|
+
return colors ? output : stripVTControlCharacters(output);
|
|
127
|
+
};
|
|
128
|
+
|
|
129
|
+
interface StoreState {
|
|
130
|
+
readonly staticItems: Item[];
|
|
131
|
+
readonly transcript: ReadonlyArray<Item>;
|
|
132
|
+
readonly live: ReadonlyArray<Item>;
|
|
133
|
+
readonly active?: Item;
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
/**
|
|
137
|
+
* The single external store the React root syncs from. It only tracks WHICH
|
|
138
|
+
* blocks are mounted and in what region (static scrollback, in-application
|
|
139
|
+
* transcript, live region, active prompt) — block content never changes
|
|
140
|
+
* after mount, so there is no update surface here.
|
|
141
|
+
*/
|
|
142
|
+
class TerminalStore {
|
|
143
|
+
private state: StoreState = { staticItems: [], transcript: [], live: [] };
|
|
144
|
+
private readonly listeners = new Set<() => void>();
|
|
145
|
+
private nextKey = 0;
|
|
146
|
+
|
|
147
|
+
readonly subscribe = (listener: () => void) => {
|
|
148
|
+
this.listeners.add(listener);
|
|
149
|
+
return () => this.listeners.delete(listener);
|
|
150
|
+
};
|
|
151
|
+
readonly snapshot = () => this.state;
|
|
152
|
+
|
|
153
|
+
private commit(state: StoreState) {
|
|
154
|
+
this.state = state;
|
|
155
|
+
for (const listener of this.listeners) listener();
|
|
156
|
+
}
|
|
157
|
+
|
|
158
|
+
alloc() {
|
|
159
|
+
return this.nextKey++;
|
|
160
|
+
}
|
|
161
|
+
|
|
162
|
+
append(view: View) {
|
|
163
|
+
this.commit({
|
|
164
|
+
...this.state,
|
|
165
|
+
transcript: [...this.state.transcript, { key: this.alloc(), view }],
|
|
166
|
+
});
|
|
167
|
+
}
|
|
168
|
+
|
|
169
|
+
appendStatic(view: View) {
|
|
170
|
+
this.commit({
|
|
171
|
+
...this.state,
|
|
172
|
+
staticItems: [...this.state.staticItems, { key: this.alloc(), view }],
|
|
173
|
+
});
|
|
174
|
+
}
|
|
175
|
+
|
|
176
|
+
addLive(
|
|
177
|
+
key: number,
|
|
178
|
+
view: View,
|
|
179
|
+
placement: LiveViewOptions["placement"] = "afterTranscript",
|
|
180
|
+
) {
|
|
181
|
+
this.commit({
|
|
182
|
+
...this.state,
|
|
183
|
+
live: [...this.state.live, { key, view, placement }],
|
|
184
|
+
});
|
|
185
|
+
}
|
|
186
|
+
|
|
187
|
+
removeLive(key: number) {
|
|
188
|
+
this.commit({
|
|
189
|
+
...this.state,
|
|
190
|
+
live: this.state.live.filter((entry) => entry.key !== key),
|
|
191
|
+
});
|
|
192
|
+
}
|
|
193
|
+
|
|
194
|
+
/**
|
|
195
|
+
* Move a live block into scrollback (its component renders one final time
|
|
196
|
+
* from its store's final state). No-op when the row was already cleared.
|
|
197
|
+
*/
|
|
198
|
+
completeLive(key: number, destination: "staticItems" | "transcript") {
|
|
199
|
+
const item = this.state.live.find((entry) => entry.key === key);
|
|
200
|
+
if (item === undefined) return;
|
|
201
|
+
this.commit({
|
|
202
|
+
...this.state,
|
|
203
|
+
[destination]: [
|
|
204
|
+
...this.state[destination],
|
|
205
|
+
{ key: this.alloc(), view: item.view },
|
|
206
|
+
],
|
|
207
|
+
live: this.state.live.filter((entry) => entry.key !== key),
|
|
208
|
+
});
|
|
209
|
+
}
|
|
210
|
+
|
|
211
|
+
activate(view: View) {
|
|
212
|
+
this.commit({ ...this.state, active: { key: this.alloc(), view } });
|
|
213
|
+
}
|
|
214
|
+
|
|
215
|
+
deactivate() {
|
|
216
|
+
if (this.state.active !== undefined)
|
|
217
|
+
this.commit({ ...this.state, active: undefined });
|
|
218
|
+
}
|
|
219
|
+
|
|
220
|
+
clear() {
|
|
221
|
+
this.commit({ ...this.state, transcript: [], live: [] });
|
|
222
|
+
}
|
|
223
|
+
|
|
224
|
+
clearStatic() {
|
|
225
|
+
if (this.state.staticItems.length > 0) {
|
|
226
|
+
this.commit({ ...this.state, staticItems: [] });
|
|
227
|
+
}
|
|
228
|
+
}
|
|
229
|
+
|
|
230
|
+
clearTranscript() {
|
|
231
|
+
if (this.state.transcript.length > 0) {
|
|
232
|
+
this.commit({ ...this.state, transcript: [] });
|
|
233
|
+
}
|
|
234
|
+
}
|
|
235
|
+
|
|
236
|
+
get idle() {
|
|
237
|
+
return this.state.active === undefined && this.state.live.length === 0;
|
|
238
|
+
}
|
|
239
|
+
}
|
|
240
|
+
|
|
241
|
+
/**
|
|
242
|
+
* Always-on Ctrl+C handler wrapped around every screen by `run`. Screens no
|
|
243
|
+
* longer need their own Ctrl+C wiring (a screen that forgot it used to make
|
|
244
|
+
* the CLI unkillable, since Sigil runs with `exitOnCtrlC: false` in raw mode);
|
|
245
|
+
* they only handle Escape, whose semantics differ per screen.
|
|
246
|
+
*/
|
|
247
|
+
type ScreenCancelGuardProps = {
|
|
248
|
+
readonly onCancel: () => void;
|
|
249
|
+
readonly children?: ReactNode;
|
|
250
|
+
};
|
|
251
|
+
|
|
252
|
+
function ScreenCancelGuard({ onCancel, children }: ScreenCancelGuardProps) {
|
|
253
|
+
useTerminalInput(
|
|
254
|
+
(input, key) => {
|
|
255
|
+
if (key.ctrl && input === "c") onCancel();
|
|
256
|
+
},
|
|
257
|
+
{ active: true },
|
|
258
|
+
);
|
|
259
|
+
return <>{children}</>;
|
|
260
|
+
}
|
|
261
|
+
|
|
262
|
+
type ItemViewProps = { readonly item: Item };
|
|
263
|
+
|
|
264
|
+
function ItemView({ item }: ItemViewProps) {
|
|
265
|
+
return <Box flexDirection="column">{item.view}</Box>;
|
|
266
|
+
}
|
|
267
|
+
|
|
268
|
+
type TerminalRootProps = {
|
|
269
|
+
readonly store: TerminalStore;
|
|
270
|
+
};
|
|
271
|
+
|
|
272
|
+
function TerminalRoot({ store }: TerminalRootProps) {
|
|
273
|
+
const state = useSyncExternalStore(store.subscribe, store.snapshot);
|
|
274
|
+
useTerminalInput(
|
|
275
|
+
(input, key) => {
|
|
276
|
+
if (!key.ctrl || input !== "c") return;
|
|
277
|
+
process.kill(process.pid, "SIGINT");
|
|
278
|
+
},
|
|
279
|
+
{ active: state.active === undefined },
|
|
280
|
+
);
|
|
281
|
+
const beforeTranscript = state.live.filter(
|
|
282
|
+
(item) => item.placement === "beforeTranscript",
|
|
283
|
+
);
|
|
284
|
+
const afterTranscript = state.live.filter(
|
|
285
|
+
(item) => item.placement !== "beforeTranscript",
|
|
286
|
+
);
|
|
287
|
+
return (
|
|
288
|
+
<Box flexDirection="column">
|
|
289
|
+
<Static items={state.staticItems}>
|
|
290
|
+
{(item) => <ItemView key={item.key} item={item} />}
|
|
291
|
+
</Static>
|
|
292
|
+
{beforeTranscript.map((item) => (
|
|
293
|
+
<ItemView key={item.key} item={item} />
|
|
294
|
+
))}
|
|
295
|
+
{state.transcript.map((item) => (
|
|
296
|
+
<ItemView key={item.key} item={item} />
|
|
297
|
+
))}
|
|
298
|
+
{afterTranscript.map((item) => (
|
|
299
|
+
<ItemView key={item.key} item={item} />
|
|
300
|
+
))}
|
|
301
|
+
{state.active === undefined ? null : (
|
|
302
|
+
<Box marginTop={state.transcript.length > 0 ? 1 : 0}>
|
|
303
|
+
<ItemView key={state.active.key} item={state.active} />
|
|
304
|
+
</Box>
|
|
305
|
+
)}
|
|
306
|
+
</Box>
|
|
307
|
+
);
|
|
308
|
+
}
|
|
309
|
+
|
|
310
|
+
/** Progress rows are ordinary live views over a runtime-owned store. */
|
|
311
|
+
interface ProgressState {
|
|
312
|
+
readonly options: ProgressOptions;
|
|
313
|
+
readonly final?: {
|
|
314
|
+
readonly variant: "success" | "error";
|
|
315
|
+
readonly message?: string;
|
|
316
|
+
};
|
|
317
|
+
}
|
|
318
|
+
|
|
319
|
+
type ProgressViewProps = {
|
|
320
|
+
readonly store: LiveStore<ProgressState>;
|
|
321
|
+
};
|
|
322
|
+
|
|
323
|
+
function ProgressView({ store }: ProgressViewProps) {
|
|
324
|
+
const state = useLiveStore(store);
|
|
325
|
+
useTitle(state.options.title);
|
|
326
|
+
return state.final !== undefined ? (
|
|
327
|
+
<Status variant={state.final.variant}>
|
|
328
|
+
{state.final.message ?? state.options.label}
|
|
329
|
+
</Status>
|
|
330
|
+
) : state.options.spinning === false ? (
|
|
331
|
+
<Status variant="info" detail={state.options.detail}>
|
|
332
|
+
{state.options.label}
|
|
333
|
+
</Status>
|
|
334
|
+
) : (
|
|
335
|
+
<Spinner label={state.options.label} detail={state.options.detail} />
|
|
336
|
+
);
|
|
337
|
+
}
|
|
338
|
+
|
|
339
|
+
export interface CliKitRuntime {
|
|
340
|
+
readonly service: CliKit["Service"];
|
|
341
|
+
readonly dispose: () => Promise<void>;
|
|
342
|
+
}
|
|
343
|
+
|
|
344
|
+
export const makeRuntime = (
|
|
345
|
+
options: CliKitOptions,
|
|
346
|
+
capabilities: CliKitCapabilities,
|
|
347
|
+
): CliKitRuntime => {
|
|
348
|
+
const stdin = options.stdin ?? process.stdin;
|
|
349
|
+
const stdout = options.stdout ?? process.stdout;
|
|
350
|
+
const stderr = options.stderr ?? process.stderr;
|
|
351
|
+
const store = new TerminalStore();
|
|
352
|
+
const rendererGate = Semaphore.makeUnsafe(1);
|
|
353
|
+
const promptGate = Semaphore.makeUnsafe(1);
|
|
354
|
+
|
|
355
|
+
interface Mounted {
|
|
356
|
+
readonly sigil: ReturnType<typeof render>;
|
|
357
|
+
readonly alternate: boolean;
|
|
358
|
+
/** Settles when the instance exits; render crashes are routed out, never rethrown. */
|
|
359
|
+
exit: Promise<void>;
|
|
360
|
+
/**
|
|
361
|
+
* Flush any partial captured line into the Static transcript — called at
|
|
362
|
+
* unmount so trailing output without a newline still lands. Lives on the
|
|
363
|
+
* instance because it closes over this mount's capture buffers and must
|
|
364
|
+
* die with it.
|
|
365
|
+
*/
|
|
366
|
+
readonly flushDirectStdio?: () => void;
|
|
367
|
+
}
|
|
368
|
+
// Lifecycle state. `mounted` and `unmounting` deliberately overlap: during
|
|
369
|
+
// teardown the instance stays in `mounted` until re-validation passes, so
|
|
370
|
+
// prints/live views racing the drain still see a live renderer (and can
|
|
371
|
+
// abort the teardown). `applicationMounted` is an orthogonal axis — an
|
|
372
|
+
// `app()` region pins the renderer regardless of store idleness — and
|
|
373
|
+
// `disposed` is a terminal one-way latch.
|
|
374
|
+
let mounted: Mounted | undefined;
|
|
375
|
+
let unmounting: Promise<void> | undefined;
|
|
376
|
+
let applicationMounted = false;
|
|
377
|
+
let disposed = false;
|
|
378
|
+
/**
|
|
379
|
+
* Fails the active interaction when a screen component throws during
|
|
380
|
+
* render. Without this the prompt's callback would never resume and the
|
|
381
|
+
* CLI would hang with a dead renderer.
|
|
382
|
+
*/
|
|
383
|
+
let failActive: ((error: unknown) => void) | undefined;
|
|
384
|
+
/**
|
|
385
|
+
* The single failure channel for renderer errors: route into the active
|
|
386
|
+
* interaction when a prompt is waiting, otherwise surface on stderr. Every
|
|
387
|
+
* async failure path (the exit promise, fire-and-forget mounts) funnels
|
|
388
|
+
* here so no rejection ever escapes unhandled.
|
|
389
|
+
*/
|
|
390
|
+
const failRenderer = (error: unknown) => {
|
|
391
|
+
if (failActive !== undefined) failActive(error);
|
|
392
|
+
else stderr.write(`CliKit renderer error: ${String(error)}\n`);
|
|
393
|
+
};
|
|
394
|
+
|
|
395
|
+
const mount = async (alternateScreen = false): Promise<void> => {
|
|
396
|
+
// Never overlap a new Sigil root with one that is still tearing down —
|
|
397
|
+
// Sigil keys instances by stdout and two live roots corrupt the output.
|
|
398
|
+
while (unmounting !== undefined) await unmounting;
|
|
399
|
+
if (disposed || mounted !== undefined) return;
|
|
400
|
+
const captureDirectStdio = options.captureConsole !== false;
|
|
401
|
+
// Process output lives in the renderer's Static zone above every inline
|
|
402
|
+
// view. Adding a static row commits it to scrollback and naturally moves
|
|
403
|
+
// the live UI down, avoiding log-update's erase/restore path and its
|
|
404
|
+
// render artifacts. `patchConsole: "stdio"` captures console, Node
|
|
405
|
+
// warnings, and direct stream writes from tools such as Floci (the
|
|
406
|
+
// renderer's own frames go through passthrough facades and bypass the
|
|
407
|
+
// capture); `onCapturedOutput` takes ownership of each raw chunk so the
|
|
408
|
+
// Static transcript renders it instead of the built-in splicing. The
|
|
409
|
+
// renderer restores console and stream writes itself on unmount.
|
|
410
|
+
const buffers = { stdout: "", stderr: "" };
|
|
411
|
+
// A captured write that ends mid-line parks its tail here waiting for
|
|
412
|
+
// the rest of the line. A real terminal would display the partial
|
|
413
|
+
// immediately — so when no continuation arrives promptly, flush the
|
|
414
|
+
// tail as its own row instead of holding it until unmount. Without the
|
|
415
|
+
// deadline, a writer whose final chunk lacks a trailing newline (e.g.
|
|
416
|
+
// a pretty-printed cause written raw to stderr) has its last line
|
|
417
|
+
// appear only when the process exits. One timer PER STREAM: a chatty
|
|
418
|
+
// stdout must not keep resetting the deadline of a parked stderr tail.
|
|
419
|
+
const partialFlushTimers: {
|
|
420
|
+
[Stream in keyof typeof buffers]?: ReturnType<typeof setTimeout>;
|
|
421
|
+
} = {};
|
|
422
|
+
const clearPartialFlush = (stream: keyof typeof buffers) => {
|
|
423
|
+
const timer = partialFlushTimers[stream];
|
|
424
|
+
if (timer !== undefined) {
|
|
425
|
+
clearTimeout(timer);
|
|
426
|
+
partialFlushTimers[stream] = undefined;
|
|
427
|
+
}
|
|
428
|
+
};
|
|
429
|
+
const flushPartialLine = (stream: keyof typeof buffers) => {
|
|
430
|
+
partialFlushTimers[stream] = undefined;
|
|
431
|
+
if (buffers[stream] !== "") {
|
|
432
|
+
store.appendStatic(<AnsiText wrap="none">{buffers[stream]}</AnsiText>);
|
|
433
|
+
buffers[stream] = "";
|
|
434
|
+
}
|
|
435
|
+
};
|
|
436
|
+
const appendLines = (stream: keyof typeof buffers, data: string) => {
|
|
437
|
+
const parts = `${buffers[stream]}${data}`.split(/\r?\n/);
|
|
438
|
+
buffers[stream] = parts.pop() ?? "";
|
|
439
|
+
for (const line of parts) {
|
|
440
|
+
store.appendStatic(<AnsiText wrap="none">{line || " "}</AnsiText>);
|
|
441
|
+
}
|
|
442
|
+
clearPartialFlush(stream);
|
|
443
|
+
if (buffers[stream] !== "") {
|
|
444
|
+
const timer = setTimeout(() => flushPartialLine(stream), 50);
|
|
445
|
+
timer.unref?.();
|
|
446
|
+
partialFlushTimers[stream] = timer;
|
|
447
|
+
}
|
|
448
|
+
};
|
|
449
|
+
const sigil = render(
|
|
450
|
+
<CliEnvironment capabilities={capabilities} observeWindow>
|
|
451
|
+
<TerminalRoot store={store} />
|
|
452
|
+
</CliEnvironment>,
|
|
453
|
+
{
|
|
454
|
+
stdin,
|
|
455
|
+
stdout,
|
|
456
|
+
stderr,
|
|
457
|
+
exitOnCtrlC: false,
|
|
458
|
+
interactive: capabilities.input,
|
|
459
|
+
alternateScreen: alternateScreen,
|
|
460
|
+
colorProfile: capabilities.colors ? "truecolor" : "none",
|
|
461
|
+
...(captureDirectStdio
|
|
462
|
+
? {
|
|
463
|
+
patchConsole: "stdio" as const,
|
|
464
|
+
onCapturedOutput: (stream: "stdout" | "stderr", data: string) => {
|
|
465
|
+
appendLines(stream, data);
|
|
466
|
+
return true;
|
|
467
|
+
},
|
|
468
|
+
}
|
|
469
|
+
: { patchConsole: false as const }),
|
|
470
|
+
},
|
|
471
|
+
);
|
|
472
|
+
const current: Mounted = {
|
|
473
|
+
sigil,
|
|
474
|
+
alternate: alternateScreen,
|
|
475
|
+
exit: Promise.resolve(),
|
|
476
|
+
flushDirectStdio: captureDirectStdio
|
|
477
|
+
? () => {
|
|
478
|
+
// AnsiText, matching the line and deadline paths: a trailing
|
|
479
|
+
// fragment must not render color-stripped just because teardown
|
|
480
|
+
// won the race against the 50ms deadline.
|
|
481
|
+
for (const stream of ["stdout", "stderr"] as const) {
|
|
482
|
+
clearPartialFlush(stream);
|
|
483
|
+
if (buffers[stream] !== "") {
|
|
484
|
+
store.appendStatic(
|
|
485
|
+
<AnsiText wrap="none">{buffers[stream]}</AnsiText>,
|
|
486
|
+
);
|
|
487
|
+
buffers[stream] = "";
|
|
488
|
+
}
|
|
489
|
+
}
|
|
490
|
+
}
|
|
491
|
+
: undefined,
|
|
492
|
+
};
|
|
493
|
+
// Capture the exit promise at mount time: Sigil registers its process
|
|
494
|
+
// `beforeExit` listener on the first `waitUntilExit()` call and `unmount`
|
|
495
|
+
// only removes a listener that already exists, so waiting only after
|
|
496
|
+
// unmount leaks one process listener per mount cycle. A rejection means a
|
|
497
|
+
// component threw during render — Sigil has already unmounted itself, so
|
|
498
|
+
// drop the dead instance and surface the error instead of hanging.
|
|
499
|
+
current.exit = sigil.waitUntilExit().then(
|
|
500
|
+
() => undefined,
|
|
501
|
+
(error: unknown) => {
|
|
502
|
+
// The crashed instance is dropped without the unmount path, so
|
|
503
|
+
// disarm any pending partial-flush timer here too.
|
|
504
|
+
current.flushDirectStdio?.();
|
|
505
|
+
if (mounted === current) mounted = undefined;
|
|
506
|
+
failRenderer(error);
|
|
507
|
+
},
|
|
508
|
+
);
|
|
509
|
+
mounted = current;
|
|
510
|
+
};
|
|
511
|
+
|
|
512
|
+
const ensureMounted = () => Effect.promise(() => mount());
|
|
513
|
+
|
|
514
|
+
const waitForRender = () =>
|
|
515
|
+
mounted?.sigil.waitUntilRenderFlush().catch(() => undefined) ??
|
|
516
|
+
Promise.resolve();
|
|
517
|
+
|
|
518
|
+
/**
|
|
519
|
+
* Tear down the renderer. Total (never rejects) and re-validated across its
|
|
520
|
+
* awaits: output printed or live views opened while the final frame flushes
|
|
521
|
+
* abort the teardown instead of being destroyed with it. `force` skips the
|
|
522
|
+
* re-validation for dispose and presentation switches.
|
|
523
|
+
*/
|
|
524
|
+
const unmount = (force = false): Promise<void> => {
|
|
525
|
+
if (unmounting !== undefined) return unmounting;
|
|
526
|
+
const current = mounted;
|
|
527
|
+
if (current === undefined) return Promise.resolve();
|
|
528
|
+
unmounting = (async () => {
|
|
529
|
+
try {
|
|
530
|
+
current.flushDirectStdio?.();
|
|
531
|
+
// Drain: keep flushing until no new static output arrives between
|
|
532
|
+
// flushes, so a `print` racing the teardown reaches the terminal.
|
|
533
|
+
// Unbounded by design — the bound is the renderer's convergence: the
|
|
534
|
+
// loop exits as soon as producers go quiet for one full flush.
|
|
535
|
+
let staticCount;
|
|
536
|
+
do {
|
|
537
|
+
staticCount = store.snapshot().staticItems.length;
|
|
538
|
+
await current.sigil.waitUntilRenderFlush();
|
|
539
|
+
} while (store.snapshot().staticItems.length !== staticCount);
|
|
540
|
+
// Re-validate: a prompt or live view may have re-armed the renderer
|
|
541
|
+
// while the frame flushed. Their output would be destroyed by the
|
|
542
|
+
// teardown, so leave the instance mounted for them instead.
|
|
543
|
+
if (!force && (applicationMounted || !store.idle)) return;
|
|
544
|
+
// A captured chunk that arrived DURING the drain may have parked a
|
|
545
|
+
// partial line and armed a flush timer. Flush and disarm now —
|
|
546
|
+
// otherwise the timer fires after `clearStatic()` below and the
|
|
547
|
+
// stale fragment replays at the top of the next mount.
|
|
548
|
+
current.flushDirectStdio?.();
|
|
549
|
+
mounted = undefined;
|
|
550
|
+
// unmount restores the patched console and stream writes.
|
|
551
|
+
current.sigil.unmount();
|
|
552
|
+
await current.exit;
|
|
553
|
+
current.sigil.cleanup();
|
|
554
|
+
// Static output has been handed off to the terminal. Do not replay
|
|
555
|
+
// it when a later live session mounts a fresh Sigil root.
|
|
556
|
+
store.clearStatic();
|
|
557
|
+
} catch {
|
|
558
|
+
// Teardown must be total: a crashed instance still ends up unmounted
|
|
559
|
+
// with console/stream patches restored — and with no armed partial
|
|
560
|
+
// flush timer left to poke the store after clearStatic.
|
|
561
|
+
if (mounted === current) mounted = undefined;
|
|
562
|
+
try {
|
|
563
|
+
current.flushDirectStdio?.();
|
|
564
|
+
current.sigil.unmount();
|
|
565
|
+
} catch {
|
|
566
|
+
// Already unmounted (or unmount itself is what threw above).
|
|
567
|
+
}
|
|
568
|
+
}
|
|
569
|
+
})().finally(() => {
|
|
570
|
+
unmounting = undefined;
|
|
571
|
+
});
|
|
572
|
+
return unmounting;
|
|
573
|
+
};
|
|
574
|
+
|
|
575
|
+
const releaseIfIdle = () =>
|
|
576
|
+
Effect.suspend(() =>
|
|
577
|
+
applicationMounted || !store.idle
|
|
578
|
+
? Effect.void
|
|
579
|
+
: Effect.promise(() => unmount()),
|
|
580
|
+
);
|
|
581
|
+
|
|
582
|
+
const formatView = (view: View, renderOptions: RenderOptions = {}) =>
|
|
583
|
+
formatStaticView(normalizeView(view), renderOptions, {
|
|
584
|
+
...capabilities,
|
|
585
|
+
// Re-read the width at render time — the boot-time snapshot goes stale
|
|
586
|
+
// the moment the user resizes the terminal.
|
|
587
|
+
columns: stdout.columns ?? capabilities.columns,
|
|
588
|
+
});
|
|
589
|
+
|
|
590
|
+
const renderView = (view: View, renderOptions: RenderOptions = {}) =>
|
|
591
|
+
Effect.sync(() => formatView(view, renderOptions));
|
|
592
|
+
|
|
593
|
+
const print = (view: View, renderOptions: RenderOptions = {}) =>
|
|
594
|
+
Effect.gen(function* () {
|
|
595
|
+
const inApplication = yield* InApplication;
|
|
596
|
+
view = normalizeView(view);
|
|
597
|
+
if (inApplication) {
|
|
598
|
+
yield* Effect.sync(() => store.append(view));
|
|
599
|
+
} else if (mounted !== undefined) {
|
|
600
|
+
yield* Effect.sync(() => store.appendStatic(view));
|
|
601
|
+
} else {
|
|
602
|
+
const output = yield* renderView(view, renderOptions);
|
|
603
|
+
if (output !== "")
|
|
604
|
+
yield* Effect.sync(() => stdout.write(`${output}\n`));
|
|
605
|
+
}
|
|
606
|
+
});
|
|
607
|
+
|
|
608
|
+
const messageOptions = (
|
|
609
|
+
message: string | { message: string; detail?: string },
|
|
610
|
+
) => (typeof message === "string" ? { message } : message);
|
|
611
|
+
|
|
612
|
+
const log =
|
|
613
|
+
(variant: "info" | "success" | "warning" | "error") =>
|
|
614
|
+
(message: string | { message: string; detail?: string }) => {
|
|
615
|
+
const options = messageOptions(message);
|
|
616
|
+
return print(
|
|
617
|
+
<Status variant={variant} detail={options.detail}>
|
|
618
|
+
{options.message}
|
|
619
|
+
</Status>,
|
|
620
|
+
);
|
|
621
|
+
};
|
|
622
|
+
|
|
623
|
+
const run = <Value,>(screen: Screen<Value>) => {
|
|
624
|
+
if (!capabilities.input) {
|
|
625
|
+
return Effect.fail(
|
|
626
|
+
new NonInteractiveTerminal({
|
|
627
|
+
operation: screen.name,
|
|
628
|
+
message: `Cannot run ${screen.name} without an interactive terminal. Provide the equivalent command flags instead.`,
|
|
629
|
+
}),
|
|
630
|
+
);
|
|
631
|
+
}
|
|
632
|
+
return Effect.gen(function* () {
|
|
633
|
+
const inApplication = yield* InApplication;
|
|
634
|
+
const interaction = promptGate.withPermits(1)(
|
|
635
|
+
Effect.gen(function* () {
|
|
636
|
+
let completedView: View | undefined;
|
|
637
|
+
return yield* Effect.callback<Value, TerminalCancelled>((resume) => {
|
|
638
|
+
let settled = false;
|
|
639
|
+
const finish = (
|
|
640
|
+
result: Effect.Effect<Value, TerminalCancelled>,
|
|
641
|
+
resultView?: View,
|
|
642
|
+
) => {
|
|
643
|
+
if (settled) return;
|
|
644
|
+
settled = true;
|
|
645
|
+
failActive = undefined;
|
|
646
|
+
store.deactivate();
|
|
647
|
+
if (resultView !== undefined) {
|
|
648
|
+
if (inApplication) store.append(normalizeView(resultView));
|
|
649
|
+
else completedView = resultView;
|
|
650
|
+
}
|
|
651
|
+
resume(result);
|
|
652
|
+
};
|
|
653
|
+
const cancel = () =>
|
|
654
|
+
finish(
|
|
655
|
+
Effect.fail(new TerminalCancelled()),
|
|
656
|
+
<CancelledPrompt message={screen.name} />,
|
|
657
|
+
);
|
|
658
|
+
// A screen that throws during render unmounts Sigil with the error;
|
|
659
|
+
// without this hook the callback would never resume and the CLI
|
|
660
|
+
// would hang forever on a dead renderer.
|
|
661
|
+
failActive = (error) => finish(Effect.die(error));
|
|
662
|
+
store.activate(
|
|
663
|
+
<ScreenCancelGuard onCancel={cancel}>
|
|
664
|
+
{screen.render({
|
|
665
|
+
submit: (value, summary) =>
|
|
666
|
+
finish(Effect.succeed(value), summary),
|
|
667
|
+
cancel,
|
|
668
|
+
})}
|
|
669
|
+
</ScreenCancelGuard>,
|
|
670
|
+
);
|
|
671
|
+
// Not awaited (Effect.callback's register is synchronous), but
|
|
672
|
+
// never fire-and-forget: a mount failure — e.g. a synchronous
|
|
673
|
+
// throw from Sigil's render() — routes through `failRenderer`,
|
|
674
|
+
// which fails this very interaction via the `failActive` hook
|
|
675
|
+
// installed above instead of escaping as an unhandled rejection.
|
|
676
|
+
mount().catch(failRenderer);
|
|
677
|
+
// Interruption cleanup: deactivate the screen and let the caller's
|
|
678
|
+
// finalizers release the renderer.
|
|
679
|
+
return Effect.sync(() => {
|
|
680
|
+
if (!settled) {
|
|
681
|
+
settled = true;
|
|
682
|
+
failActive = undefined;
|
|
683
|
+
store.deactivate();
|
|
684
|
+
}
|
|
685
|
+
});
|
|
686
|
+
}).pipe(
|
|
687
|
+
Effect.ensuring(
|
|
688
|
+
Effect.suspend(() =>
|
|
689
|
+
inApplication
|
|
690
|
+
? Effect.void
|
|
691
|
+
: releaseIfIdle().pipe(
|
|
692
|
+
Effect.andThen(
|
|
693
|
+
completedView === undefined
|
|
694
|
+
? Effect.void
|
|
695
|
+
: print(completedView),
|
|
696
|
+
),
|
|
697
|
+
),
|
|
698
|
+
),
|
|
699
|
+
),
|
|
700
|
+
);
|
|
701
|
+
}),
|
|
702
|
+
);
|
|
703
|
+
return yield* inApplication
|
|
704
|
+
? interaction
|
|
705
|
+
: rendererGate.withPermits(1)(interaction);
|
|
706
|
+
});
|
|
707
|
+
};
|
|
708
|
+
|
|
709
|
+
const menu = <Value,>(
|
|
710
|
+
options: MenuOptions<Value>,
|
|
711
|
+
): Effect.Effect<Value, InteractionError> =>
|
|
712
|
+
Effect.gen(function* () {
|
|
713
|
+
if (yield* InApplication) yield* Effect.sync(() => store.clear());
|
|
714
|
+
return yield* run(menuScreen(options));
|
|
715
|
+
});
|
|
716
|
+
|
|
717
|
+
const app = <A, E, R>(
|
|
718
|
+
effect: Effect.Effect<A, E, R>,
|
|
719
|
+
): Effect.Effect<A, E | NonInteractiveTerminal, R> =>
|
|
720
|
+
!capabilities.input
|
|
721
|
+
? Effect.fail(
|
|
722
|
+
new NonInteractiveTerminal({
|
|
723
|
+
operation: "application",
|
|
724
|
+
message:
|
|
725
|
+
"Cannot run a CLI application without terminal input. Provide the equivalent command flags instead.",
|
|
726
|
+
}),
|
|
727
|
+
)
|
|
728
|
+
: Effect.gen(function* () {
|
|
729
|
+
if (yield* InApplication) return yield* effect;
|
|
730
|
+
const presentation = yield* ApplicationPresentation;
|
|
731
|
+
const alternate =
|
|
732
|
+
presentation === "alternate" && capabilities.alternateScreen;
|
|
733
|
+
return yield* rendererGate.withPermits(1)(
|
|
734
|
+
Effect.acquireUseRelease(
|
|
735
|
+
Effect.promise(async () => {
|
|
736
|
+
applicationMounted = true;
|
|
737
|
+
store.clear();
|
|
738
|
+
// Sigil cannot change `alternateScreen` on a live instance: if
|
|
739
|
+
// an inline renderer (say an earlier progress row) is still
|
|
740
|
+
// mounted with the wrong presentation, remount with the
|
|
741
|
+
// requested one instead of silently ignoring it.
|
|
742
|
+
if (mounted !== undefined && mounted.alternate !== alternate) {
|
|
743
|
+
await unmount(true);
|
|
744
|
+
}
|
|
745
|
+
await mount(alternate);
|
|
746
|
+
}),
|
|
747
|
+
() => effect.pipe(Effect.provideService(InApplication, true)),
|
|
748
|
+
() =>
|
|
749
|
+
Effect.promise(async () => {
|
|
750
|
+
applicationMounted = false;
|
|
751
|
+
store.clear();
|
|
752
|
+
// Let the empty frame replace the application, then erase
|
|
753
|
+
// that frame explicitly. Unmount can now restore terminal
|
|
754
|
+
// modes without leaving the empty frame's newline behind.
|
|
755
|
+
const current = mounted;
|
|
756
|
+
if (current !== undefined) {
|
|
757
|
+
await current.sigil.waitUntilRenderFlush();
|
|
758
|
+
current.sigil.clear();
|
|
759
|
+
}
|
|
760
|
+
await unmount();
|
|
761
|
+
}),
|
|
762
|
+
),
|
|
763
|
+
);
|
|
764
|
+
});
|
|
765
|
+
|
|
766
|
+
// A wizard owns the renderer when invoked standalone and reuses the
|
|
767
|
+
// current application renderer when nested. Prompt serialization remains
|
|
768
|
+
// centralized in `run`, so nested profile/OAuth flows suspend cleanly.
|
|
769
|
+
const wizard = <A, E, R>(
|
|
770
|
+
effect: Effect.Effect<A, E, R>,
|
|
771
|
+
): Effect.Effect<A, E | NonInteractiveTerminal, R> =>
|
|
772
|
+
Effect.gen(function* () {
|
|
773
|
+
if (!(yield* InApplication)) return yield* app(effect);
|
|
774
|
+
return yield* effect.pipe(
|
|
775
|
+
Effect.ensuring(Effect.sync(() => store.clearTranscript())),
|
|
776
|
+
);
|
|
777
|
+
});
|
|
778
|
+
|
|
779
|
+
const makeLive = (
|
|
780
|
+
initial: View,
|
|
781
|
+
options: LiveViewOptions = {},
|
|
782
|
+
): Effect.Effect<LiveViewHandle> =>
|
|
783
|
+
Effect.gen(function* () {
|
|
784
|
+
if (!capabilities.input) {
|
|
785
|
+
yield* print(initial);
|
|
786
|
+
return { close: Effect.void };
|
|
787
|
+
}
|
|
788
|
+
const inApplication = yield* InApplication;
|
|
789
|
+
const key = store.alloc();
|
|
790
|
+
let closed = false;
|
|
791
|
+
yield* Effect.sync(() =>
|
|
792
|
+
store.addLive(key, normalizeView(initial), options.placement),
|
|
793
|
+
);
|
|
794
|
+
yield* ensureMounted();
|
|
795
|
+
return {
|
|
796
|
+
close: Effect.suspend(() => {
|
|
797
|
+
if (closed) return Effect.void;
|
|
798
|
+
closed = true;
|
|
799
|
+
// removeLive/completeLive no-op when the row was already cleared
|
|
800
|
+
// by a menu loop or application boundary.
|
|
801
|
+
if (options.persistOnClose)
|
|
802
|
+
store.completeLive(
|
|
803
|
+
key,
|
|
804
|
+
inApplication ? "transcript" : "staticItems",
|
|
805
|
+
);
|
|
806
|
+
else store.removeLive(key);
|
|
807
|
+
return Effect.promise(waitForRender).pipe(
|
|
808
|
+
Effect.andThen(releaseIfIdle()),
|
|
809
|
+
);
|
|
810
|
+
}),
|
|
811
|
+
};
|
|
812
|
+
});
|
|
813
|
+
|
|
814
|
+
/**
|
|
815
|
+
* Scope-bound: the enclosing scope closes the view as a backstop, so an
|
|
816
|
+
* interrupted caller can never leave an orphaned row keeping the renderer
|
|
817
|
+
* mounted (and the process alive) forever.
|
|
818
|
+
*/
|
|
819
|
+
const live = (
|
|
820
|
+
initial: View,
|
|
821
|
+
options: LiveViewOptions = {},
|
|
822
|
+
): Effect.Effect<LiveViewHandle, never, Scope.Scope> =>
|
|
823
|
+
Effect.acquireRelease(makeLive(initial, options), (handle) => handle.close);
|
|
824
|
+
|
|
825
|
+
/**
|
|
826
|
+
* A progress row is just a live view over a runtime-owned store — the
|
|
827
|
+
* handle mutates the store, React re-renders. Settling swaps the store to
|
|
828
|
+
* its final state and commits the block to scrollback.
|
|
829
|
+
*/
|
|
830
|
+
const makeProgress = (
|
|
831
|
+
initial: ProgressOptions,
|
|
832
|
+
): Effect.Effect<ProgressHandle> =>
|
|
833
|
+
Effect.gen(function* () {
|
|
834
|
+
const dynamic =
|
|
835
|
+
capabilities.input && ((yield* InApplication) || stdout.isTTY === true);
|
|
836
|
+
if (!dynamic) {
|
|
837
|
+
let current = initial;
|
|
838
|
+
let closed = false;
|
|
839
|
+
yield* print(
|
|
840
|
+
<Status variant="info" detail={initial.detail}>
|
|
841
|
+
{initial.label}
|
|
842
|
+
</Status>,
|
|
843
|
+
);
|
|
844
|
+
const settle = (variant: "success" | "error", message?: string) =>
|
|
845
|
+
Effect.suspend(() => {
|
|
846
|
+
if (closed) return Effect.void;
|
|
847
|
+
closed = true;
|
|
848
|
+
return print(
|
|
849
|
+
<Status variant={variant}>{message ?? current.label}</Status>,
|
|
850
|
+
);
|
|
851
|
+
});
|
|
852
|
+
return {
|
|
853
|
+
update: (next) =>
|
|
854
|
+
Effect.sync(() => {
|
|
855
|
+
if (!closed) current = next;
|
|
856
|
+
}),
|
|
857
|
+
succeed: (message) => settle("success", message),
|
|
858
|
+
fail: (message) => settle("error", message),
|
|
859
|
+
close: Effect.sync(() => {
|
|
860
|
+
closed = true;
|
|
861
|
+
}),
|
|
862
|
+
} satisfies ProgressHandle;
|
|
863
|
+
}
|
|
864
|
+
const inApplication = yield* InApplication;
|
|
865
|
+
const progressStore = new LiveStore<ProgressState>({ options: initial });
|
|
866
|
+
const key = store.alloc();
|
|
867
|
+
yield* Effect.sync(() =>
|
|
868
|
+
store.addLive(key, <ProgressView store={progressStore} />),
|
|
869
|
+
);
|
|
870
|
+
yield* ensureMounted();
|
|
871
|
+
let settled = false;
|
|
872
|
+
const finishRow = (persist: boolean) =>
|
|
873
|
+
Effect.suspend(() => {
|
|
874
|
+
if (settled) return Effect.void;
|
|
875
|
+
settled = true;
|
|
876
|
+
// completeLive/removeLive no-op when the row was already cleared
|
|
877
|
+
// by a menu loop or application boundary.
|
|
878
|
+
if (persist)
|
|
879
|
+
store.completeLive(
|
|
880
|
+
key,
|
|
881
|
+
inApplication ? "transcript" : "staticItems",
|
|
882
|
+
);
|
|
883
|
+
else store.removeLive(key);
|
|
884
|
+
return Effect.promise(waitForRender).pipe(
|
|
885
|
+
Effect.andThen(releaseIfIdle()),
|
|
886
|
+
);
|
|
887
|
+
});
|
|
888
|
+
const settle = (variant: "success" | "error", message?: string) =>
|
|
889
|
+
Effect.suspend(() => {
|
|
890
|
+
if (settled) return Effect.void;
|
|
891
|
+
progressStore.update((state) => ({
|
|
892
|
+
...state,
|
|
893
|
+
final: { variant, message },
|
|
894
|
+
}));
|
|
895
|
+
return finishRow(true);
|
|
896
|
+
});
|
|
897
|
+
return {
|
|
898
|
+
update: (next) =>
|
|
899
|
+
Effect.sync(() => {
|
|
900
|
+
if (!settled) progressStore.set({ options: next });
|
|
901
|
+
}),
|
|
902
|
+
succeed: (message) => settle("success", message),
|
|
903
|
+
fail: (message) => settle("error", message),
|
|
904
|
+
// An unsettled close abandons the row rather than committing it.
|
|
905
|
+
close: finishRow(false),
|
|
906
|
+
} satisfies ProgressHandle;
|
|
907
|
+
});
|
|
908
|
+
|
|
909
|
+
const progress = (
|
|
910
|
+
initial: ProgressOptions,
|
|
911
|
+
): Effect.Effect<ProgressHandle, never, Scope.Scope> =>
|
|
912
|
+
Effect.acquireRelease(makeProgress(initial), (handle) => handle.close);
|
|
913
|
+
|
|
914
|
+
const service: CliKit["Service"] = {
|
|
915
|
+
terminal: capabilities,
|
|
916
|
+
nativeProgress: {
|
|
917
|
+
set: (state, value) =>
|
|
918
|
+
Effect.sync(() => {
|
|
919
|
+
if (mounted !== undefined) mounted.sigil.setProgress(state, value);
|
|
920
|
+
else setNativeProgress(state, value, stdout);
|
|
921
|
+
}),
|
|
922
|
+
},
|
|
923
|
+
output: {
|
|
924
|
+
print,
|
|
925
|
+
format: formatView,
|
|
926
|
+
render: renderView,
|
|
927
|
+
info: log("info"),
|
|
928
|
+
success: log("success"),
|
|
929
|
+
warning: log("warning"),
|
|
930
|
+
error: log("error"),
|
|
931
|
+
},
|
|
932
|
+
prompt: {
|
|
933
|
+
text: (inputOptions) => run(textScreen(inputOptions)),
|
|
934
|
+
password: (inputOptions) => run(passwordScreen(inputOptions)),
|
|
935
|
+
confirm: (confirmOptions) => run(confirmScreen(confirmOptions)),
|
|
936
|
+
select: (selectOptions) => run(selectScreen(selectOptions)),
|
|
937
|
+
multiSelect: (selectOptions) => run(multiSelectScreen(selectOptions)),
|
|
938
|
+
cycle: (selectOptions) => run(cycleSelectScreen(selectOptions)),
|
|
939
|
+
awaitExternal: (externalOptions) =>
|
|
940
|
+
run(awaitExternalScreen(externalOptions)),
|
|
941
|
+
menu,
|
|
942
|
+
custom: run,
|
|
943
|
+
},
|
|
944
|
+
wizard,
|
|
945
|
+
application: app,
|
|
946
|
+
live: { progress, open: live },
|
|
947
|
+
task: (taskOptions, effect) =>
|
|
948
|
+
Effect.scoped(
|
|
949
|
+
Effect.gen(function* () {
|
|
950
|
+
const handle = yield* progress(taskOptions);
|
|
951
|
+
return yield* effect.pipe(
|
|
952
|
+
Effect.onExit((exit) =>
|
|
953
|
+
Exit.isSuccess(exit)
|
|
954
|
+
? handle.succeed()
|
|
955
|
+
: // Interruption (Ctrl+C) is not a failure — remove the row
|
|
956
|
+
// instead of painting a red error status.
|
|
957
|
+
Cause.hasInterruptsOnly(exit.cause)
|
|
958
|
+
? handle.close
|
|
959
|
+
: handle.fail(),
|
|
960
|
+
),
|
|
961
|
+
);
|
|
962
|
+
}),
|
|
963
|
+
),
|
|
964
|
+
};
|
|
965
|
+
|
|
966
|
+
return {
|
|
967
|
+
service,
|
|
968
|
+
dispose: async () => {
|
|
969
|
+
// After dispose the runtime must never mount again; force teardown even
|
|
970
|
+
// if stray live rows were leaked.
|
|
971
|
+
disposed = true;
|
|
972
|
+
await unmount(true);
|
|
973
|
+
},
|
|
974
|
+
};
|
|
975
|
+
};
|