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,1062 @@
|
|
|
1
|
+
/** @jsxImportSource react */
|
|
2
|
+
import {
|
|
3
|
+
measureElement,
|
|
4
|
+
useCursor,
|
|
5
|
+
useInput,
|
|
6
|
+
usePaste,
|
|
7
|
+
useStdout,
|
|
8
|
+
type DOMElement,
|
|
9
|
+
} from "@alchemy.run/sigil";
|
|
10
|
+
import {
|
|
11
|
+
type JSX,
|
|
12
|
+
type ReactNode,
|
|
13
|
+
useEffect,
|
|
14
|
+
useLayoutEffect,
|
|
15
|
+
useRef,
|
|
16
|
+
useState,
|
|
17
|
+
} from "react";
|
|
18
|
+
import stringWidth from "string-width";
|
|
19
|
+
import type { AwaitExternalOptions, Choice, CycleChoice } from "../types.ts";
|
|
20
|
+
import { theme } from "../../../Util/Theme.ts";
|
|
21
|
+
import { copyToClipboard, truncate } from "../../../Util/Terminal.ts";
|
|
22
|
+
import { useCliEnvironment, useGlyphs, useKeyGlyphs } from "./Environment.tsx";
|
|
23
|
+
import { KeyBar, Spinner } from "./Feedback.tsx";
|
|
24
|
+
import { Box, overflowListWindow } from "./Layout.tsx";
|
|
25
|
+
import { Link, Text } from "./Typography.tsx";
|
|
26
|
+
|
|
27
|
+
export interface TerminalKey {
|
|
28
|
+
readonly up: boolean;
|
|
29
|
+
readonly down: boolean;
|
|
30
|
+
readonly left: boolean;
|
|
31
|
+
readonly right: boolean;
|
|
32
|
+
readonly home: boolean;
|
|
33
|
+
readonly end: boolean;
|
|
34
|
+
readonly pageUp: boolean;
|
|
35
|
+
readonly pageDown: boolean;
|
|
36
|
+
readonly enter: boolean;
|
|
37
|
+
readonly escape: boolean;
|
|
38
|
+
readonly backspace: boolean;
|
|
39
|
+
readonly delete: boolean;
|
|
40
|
+
readonly tab: boolean;
|
|
41
|
+
readonly shift: boolean;
|
|
42
|
+
readonly ctrl: boolean;
|
|
43
|
+
readonly meta: boolean;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
/** Backend facade for custom screens; callers never need to import Sigil. */
|
|
47
|
+
export const useTerminalInput = (
|
|
48
|
+
handler: (input: string, key: TerminalKey) => void,
|
|
49
|
+
options?: { readonly active?: boolean },
|
|
50
|
+
) => {
|
|
51
|
+
return useInput(
|
|
52
|
+
(input, key) =>
|
|
53
|
+
handler(input, {
|
|
54
|
+
up: key.upArrow,
|
|
55
|
+
down: key.downArrow,
|
|
56
|
+
left: key.leftArrow,
|
|
57
|
+
right: key.rightArrow,
|
|
58
|
+
home: key.home,
|
|
59
|
+
end: key.end,
|
|
60
|
+
pageUp: key.pageUp,
|
|
61
|
+
pageDown: key.pageDown,
|
|
62
|
+
enter: key.return,
|
|
63
|
+
escape: key.escape,
|
|
64
|
+
backspace: key.backspace,
|
|
65
|
+
delete: key.delete,
|
|
66
|
+
tab: key.tab,
|
|
67
|
+
shift: key.shift,
|
|
68
|
+
ctrl: key.ctrl,
|
|
69
|
+
meta: key.meta,
|
|
70
|
+
}),
|
|
71
|
+
{ isActive: options?.active ?? true },
|
|
72
|
+
);
|
|
73
|
+
};
|
|
74
|
+
|
|
75
|
+
/** Bracketed-paste input scoped the same way as {@link useTerminalInput}. */
|
|
76
|
+
export const useTerminalPaste = (
|
|
77
|
+
handler: (text: string) => void,
|
|
78
|
+
options?: { readonly active?: boolean },
|
|
79
|
+
) => {
|
|
80
|
+
usePaste(handler, { isActive: options?.active ?? true });
|
|
81
|
+
};
|
|
82
|
+
|
|
83
|
+
export const useTerminalSize = () => {
|
|
84
|
+
const { columns, rows } = useCliEnvironment();
|
|
85
|
+
return { columns, rows };
|
|
86
|
+
};
|
|
87
|
+
|
|
88
|
+
export const useListNavigation = (length: number, initialIndex = 0) => {
|
|
89
|
+
const [cursor, setCursor] = useState(initialIndex);
|
|
90
|
+
const clamped = Math.max(0, Math.min(cursor, Math.max(0, length - 1)));
|
|
91
|
+
const move = (delta: number) =>
|
|
92
|
+
setCursor((current) => {
|
|
93
|
+
if (length === 0) return 0;
|
|
94
|
+
// Clamp before wrapping: after a filter shrinks the list the raw state
|
|
95
|
+
// can point past the end, and wrapping from there jumps arbitrarily.
|
|
96
|
+
const base = Math.max(0, Math.min(current, length - 1));
|
|
97
|
+
return (((base + delta) % length) + length) % length;
|
|
98
|
+
});
|
|
99
|
+
return { cursor: clamped, move, setCursor } as const;
|
|
100
|
+
};
|
|
101
|
+
|
|
102
|
+
/** Step `delta` rows from `cursor`, wrapping and skipping disabled rows. */
|
|
103
|
+
export const moveSkippingDisabled = (
|
|
104
|
+
disabled: ReadonlyArray<boolean>,
|
|
105
|
+
cursor: number,
|
|
106
|
+
delta: number,
|
|
107
|
+
): number => {
|
|
108
|
+
const length = disabled.length;
|
|
109
|
+
if (length === 0) return 0;
|
|
110
|
+
for (let offset = 1; offset <= length; offset++) {
|
|
111
|
+
const next = (((cursor + delta * offset) % length) + length) % length;
|
|
112
|
+
if (!disabled[next]) return next;
|
|
113
|
+
}
|
|
114
|
+
return cursor;
|
|
115
|
+
};
|
|
116
|
+
|
|
117
|
+
/**
|
|
118
|
+
* Jump to `target` (clamped, no wrap), settling on the nearest enabled row in
|
|
119
|
+
* the jump direction and falling back to the other direction. Used for
|
|
120
|
+
* Home/End and PageUp/PageDown in list prompts.
|
|
121
|
+
*/
|
|
122
|
+
export const jumpSkippingDisabled = (
|
|
123
|
+
disabled: ReadonlyArray<boolean>,
|
|
124
|
+
cursor: number,
|
|
125
|
+
target: number,
|
|
126
|
+
): number => {
|
|
127
|
+
const clamped = Math.max(0, Math.min(disabled.length - 1, target));
|
|
128
|
+
if (!disabled[clamped]) return clamped;
|
|
129
|
+
const direction = clamped >= cursor ? 1 : -1;
|
|
130
|
+
for (
|
|
131
|
+
let next = clamped + direction;
|
|
132
|
+
next >= 0 && next < disabled.length;
|
|
133
|
+
next += direction
|
|
134
|
+
) {
|
|
135
|
+
if (!disabled[next]) return next;
|
|
136
|
+
}
|
|
137
|
+
for (
|
|
138
|
+
let next = clamped - direction;
|
|
139
|
+
next >= 0 && next < disabled.length;
|
|
140
|
+
next -= direction
|
|
141
|
+
) {
|
|
142
|
+
if (!disabled[next]) return next;
|
|
143
|
+
}
|
|
144
|
+
return cursor;
|
|
145
|
+
};
|
|
146
|
+
|
|
147
|
+
/** "↑ N more" / "↓ N more" indicator row shared by windowed prompt lists. */
|
|
148
|
+
function OverflowRow({
|
|
149
|
+
direction,
|
|
150
|
+
count,
|
|
151
|
+
}: {
|
|
152
|
+
readonly direction: "up" | "down";
|
|
153
|
+
readonly count: number;
|
|
154
|
+
}) {
|
|
155
|
+
const glyphs = useGlyphs();
|
|
156
|
+
if (count <= 0) return null;
|
|
157
|
+
return (
|
|
158
|
+
<Text tone="muted">
|
|
159
|
+
{" "}
|
|
160
|
+
{direction === "up" ? glyphs.overflowUp : glyphs.overflowDown} {count}{" "}
|
|
161
|
+
more
|
|
162
|
+
</Text>
|
|
163
|
+
);
|
|
164
|
+
}
|
|
165
|
+
|
|
166
|
+
/**
|
|
167
|
+
* List-cursor column shared by every focusable row (prompt lists, the
|
|
168
|
+
* edit-accounts list, the profile dashboard): the focused row carries the
|
|
169
|
+
* pointer glyph, every other row a same-width blank so labels stay aligned.
|
|
170
|
+
* Focus is a shape, not a tint, so it survives ASCII and no-colour terminals.
|
|
171
|
+
*/
|
|
172
|
+
export function Pointer({ focused }: { readonly focused: boolean }) {
|
|
173
|
+
const glyphs = useGlyphs();
|
|
174
|
+
return (
|
|
175
|
+
<Text color={theme.paint.focus} bold>
|
|
176
|
+
{focused ? glyphs.pointer : " "}
|
|
177
|
+
</Text>
|
|
178
|
+
);
|
|
179
|
+
}
|
|
180
|
+
|
|
181
|
+
/**
|
|
182
|
+
* Focused rows paint their label in the same brand colour as the pointer so
|
|
183
|
+
* the cursor reads as one block; unfocused labels stay the plain foreground,
|
|
184
|
+
* leaving green to status glyphs alone.
|
|
185
|
+
*/
|
|
186
|
+
const focusedLabelColor = (focused: boolean): string | undefined =>
|
|
187
|
+
focused ? theme.paint.focus : undefined;
|
|
188
|
+
|
|
189
|
+
/**
|
|
190
|
+
* Width of the label column when descriptions sit beside labels: the widest
|
|
191
|
+
* label plus one cell, so every description starts in the same column
|
|
192
|
+
* (labels and descriptions read as two columns rather than a ragged sentence).
|
|
193
|
+
* Sticky/heading rows are excluded — they never carry a description.
|
|
194
|
+
*/
|
|
195
|
+
const labelColumnWidth = (
|
|
196
|
+
labels: ReadonlyArray<{ readonly label: string; readonly sticky?: boolean }>,
|
|
197
|
+
): number =>
|
|
198
|
+
Math.max(
|
|
199
|
+
0,
|
|
200
|
+
...labels.map(({ label, sticky }) => (sticky ? 0 : stringWidth(label))),
|
|
201
|
+
) + 1;
|
|
202
|
+
|
|
203
|
+
export interface MenuProps<Value> {
|
|
204
|
+
readonly choices: ReadonlyArray<Choice<Value>>;
|
|
205
|
+
readonly cursor: number;
|
|
206
|
+
readonly selected?: ReadonlySet<number>;
|
|
207
|
+
readonly visibleCount?: number;
|
|
208
|
+
readonly empty?: string;
|
|
209
|
+
readonly descriptionPlacement?: "below" | "inline";
|
|
210
|
+
}
|
|
211
|
+
|
|
212
|
+
/** Pure menu presentation used by select prompts and custom applications. */
|
|
213
|
+
export function Menu<Value>({
|
|
214
|
+
choices,
|
|
215
|
+
cursor,
|
|
216
|
+
selected,
|
|
217
|
+
visibleCount = 12,
|
|
218
|
+
empty = "No choices.",
|
|
219
|
+
descriptionPlacement = "inline",
|
|
220
|
+
}: MenuProps<Value>): JSX.Element {
|
|
221
|
+
const glyphs = useGlyphs();
|
|
222
|
+
if (choices.length === 0) return <Text tone="muted">{empty}</Text>;
|
|
223
|
+
// A sticky heading renders outside the window, in addition to the overflow
|
|
224
|
+
// rows the shared windowing already reserves.
|
|
225
|
+
const { start, end } = overflowListWindow(
|
|
226
|
+
choices.length,
|
|
227
|
+
cursor,
|
|
228
|
+
visibleCount,
|
|
229
|
+
);
|
|
230
|
+
const stickyIndex =
|
|
231
|
+
start === 0
|
|
232
|
+
? -1
|
|
233
|
+
: choices.findLastIndex(
|
|
234
|
+
(choice, index) => index < start && choice.sticky,
|
|
235
|
+
);
|
|
236
|
+
const visible = [
|
|
237
|
+
...(stickyIndex === -1 ? [] : [stickyIndex]),
|
|
238
|
+
...Array.from({ length: end - start }, (_, offset) => start + offset),
|
|
239
|
+
];
|
|
240
|
+
const alignDescriptions =
|
|
241
|
+
descriptionPlacement === "inline" &&
|
|
242
|
+
choices.some((choice) => choice.description !== undefined);
|
|
243
|
+
const labelWidth = alignDescriptions ? labelColumnWidth(choices) : undefined;
|
|
244
|
+
return (
|
|
245
|
+
<Box
|
|
246
|
+
flexDirection="column"
|
|
247
|
+
aria-role="listbox"
|
|
248
|
+
aria-state={{ multiselectable: selected !== undefined }}
|
|
249
|
+
>
|
|
250
|
+
<OverflowRow direction="up" count={start} />
|
|
251
|
+
{visible.map((index) => {
|
|
252
|
+
const choice = choices[index];
|
|
253
|
+
if (choice === undefined) return null;
|
|
254
|
+
const focused = index === cursor;
|
|
255
|
+
const checked = selected?.has(index);
|
|
256
|
+
const disabled =
|
|
257
|
+
choice.disabled !== undefined && choice.disabled !== false;
|
|
258
|
+
const previous = choices[index - 1];
|
|
259
|
+
const showGroup =
|
|
260
|
+
choice.group !== undefined &&
|
|
261
|
+
(index === start || previous?.group !== choice.group);
|
|
262
|
+
return (
|
|
263
|
+
<Box
|
|
264
|
+
key={index}
|
|
265
|
+
flexDirection="column"
|
|
266
|
+
marginTop={showGroup && index !== visible[0] ? 1 : 0}
|
|
267
|
+
>
|
|
268
|
+
{showGroup ? (
|
|
269
|
+
<Box paddingLeft={theme.space.indent}>
|
|
270
|
+
<Text bold tone="muted">
|
|
271
|
+
{choice.group.toUpperCase()}
|
|
272
|
+
</Text>
|
|
273
|
+
</Box>
|
|
274
|
+
) : null}
|
|
275
|
+
<Box
|
|
276
|
+
gap={1}
|
|
277
|
+
paddingRight={1}
|
|
278
|
+
paddingLeft={choice.indent ?? 0}
|
|
279
|
+
aria-role="option"
|
|
280
|
+
aria-label={choice.label}
|
|
281
|
+
aria-state={{
|
|
282
|
+
disabled,
|
|
283
|
+
selected: selected === undefined ? focused : checked,
|
|
284
|
+
}}
|
|
285
|
+
>
|
|
286
|
+
<Pointer focused={focused} />
|
|
287
|
+
{selected === undefined ? null : (
|
|
288
|
+
<Text
|
|
289
|
+
color={checked ? theme.color.success : theme.color.muted}
|
|
290
|
+
dimColor={disabled}
|
|
291
|
+
>
|
|
292
|
+
{checked ? glyphs.checked : glyphs.unchecked}
|
|
293
|
+
</Text>
|
|
294
|
+
)}
|
|
295
|
+
<Box
|
|
296
|
+
flexDirection={
|
|
297
|
+
descriptionPlacement === "inline" ? "row" : "column"
|
|
298
|
+
}
|
|
299
|
+
flexGrow={1}
|
|
300
|
+
gap={descriptionPlacement === "inline" ? 1 : 0}
|
|
301
|
+
>
|
|
302
|
+
<Box
|
|
303
|
+
width={choice.sticky ? undefined : labelWidth}
|
|
304
|
+
flexShrink={0}
|
|
305
|
+
>
|
|
306
|
+
<Text
|
|
307
|
+
bold={focused || choice.sticky || checked}
|
|
308
|
+
color={
|
|
309
|
+
focusedLabelColor(focused) ??
|
|
310
|
+
(choice.tone === "info" ? theme.color.info : undefined)
|
|
311
|
+
}
|
|
312
|
+
dimColor={disabled}
|
|
313
|
+
>
|
|
314
|
+
{choice.label}
|
|
315
|
+
</Text>
|
|
316
|
+
</Box>
|
|
317
|
+
{choice.description === undefined ? null : (
|
|
318
|
+
<Text tone="muted" wrap="truncate-end">
|
|
319
|
+
{choice.description}
|
|
320
|
+
</Text>
|
|
321
|
+
)}
|
|
322
|
+
</Box>
|
|
323
|
+
{typeof choice.disabled === "string" ? (
|
|
324
|
+
<Text tone="muted">{choice.disabled}</Text>
|
|
325
|
+
) : null}
|
|
326
|
+
</Box>
|
|
327
|
+
</Box>
|
|
328
|
+
);
|
|
329
|
+
})}
|
|
330
|
+
<OverflowRow direction="down" count={choices.length - end} />
|
|
331
|
+
</Box>
|
|
332
|
+
);
|
|
333
|
+
}
|
|
334
|
+
|
|
335
|
+
export interface TextFieldProps {
|
|
336
|
+
readonly placeholder?: string;
|
|
337
|
+
readonly initialValue?: string;
|
|
338
|
+
readonly value?: string;
|
|
339
|
+
readonly mask?: string;
|
|
340
|
+
readonly onSubmit: (value: string) => void;
|
|
341
|
+
readonly onChange?: (value: string) => void;
|
|
342
|
+
readonly onCancel?: () => void;
|
|
343
|
+
readonly active?: boolean;
|
|
344
|
+
readonly ariaLabel?: string;
|
|
345
|
+
}
|
|
346
|
+
|
|
347
|
+
const graphemeSegmenter = new Intl.Segmenter();
|
|
348
|
+
|
|
349
|
+
/**
|
|
350
|
+
* Split into user-perceived characters so cursor movement and deletion never
|
|
351
|
+
* land inside a surrogate pair or emoji cluster.
|
|
352
|
+
*/
|
|
353
|
+
const toGraphemes = (value: string): ReadonlyArray<string> =>
|
|
354
|
+
Array.from(graphemeSegmenter.segment(value), (segment) => segment.segment);
|
|
355
|
+
|
|
356
|
+
/**
|
|
357
|
+
* Normalize text before inserting it into a single-line field. Sigil reports
|
|
358
|
+
* bracketed paste separately, but pasted content can still contain newlines,
|
|
359
|
+
* tabs or other control characters that do not belong in the value.
|
|
360
|
+
*/
|
|
361
|
+
export const sanitizeTextInsert = (input: string): string =>
|
|
362
|
+
// eslint-disable-next-line no-control-regex
|
|
363
|
+
input.replace(/[\u0000-\u001f\u007f]/g, "");
|
|
364
|
+
|
|
365
|
+
/** Readline-style whitespace word boundary to the left of `cursor`. */
|
|
366
|
+
const wordBoundaryLeft = (
|
|
367
|
+
chars: ReadonlyArray<string>,
|
|
368
|
+
cursor: number,
|
|
369
|
+
): number => {
|
|
370
|
+
let index = cursor;
|
|
371
|
+
while (index > 0 && chars[index - 1] === " ") index--;
|
|
372
|
+
while (index > 0 && chars[index - 1] !== " ") index--;
|
|
373
|
+
return index;
|
|
374
|
+
};
|
|
375
|
+
|
|
376
|
+
/** Readline-style whitespace word boundary to the right of `cursor`. */
|
|
377
|
+
const wordBoundaryRight = (
|
|
378
|
+
chars: ReadonlyArray<string>,
|
|
379
|
+
cursor: number,
|
|
380
|
+
): number => {
|
|
381
|
+
let index = cursor;
|
|
382
|
+
while (index < chars.length && chars[index] === " ") index++;
|
|
383
|
+
while (index < chars.length && chars[index] !== " ") index++;
|
|
384
|
+
return index;
|
|
385
|
+
};
|
|
386
|
+
|
|
387
|
+
/**
|
|
388
|
+
* Horizontal scroll window for a single-line field: which grapheme range fits
|
|
389
|
+
* in `avail` display cells while keeping the cursor visible. One cell is
|
|
390
|
+
* reserved for the cursor sitting past the last character.
|
|
391
|
+
*/
|
|
392
|
+
const visibleWindow = (
|
|
393
|
+
chars: ReadonlyArray<string>,
|
|
394
|
+
cursor: number,
|
|
395
|
+
avail: number,
|
|
396
|
+
): { readonly start: number; readonly end: number } => {
|
|
397
|
+
const budget = Math.max(1, avail - 1);
|
|
398
|
+
const widths = chars.map((char) => stringWidth(char));
|
|
399
|
+
let before = 0;
|
|
400
|
+
for (let index = 0; index < cursor; index++) before += widths[index] ?? 0;
|
|
401
|
+
let start = 0;
|
|
402
|
+
if (before > budget) {
|
|
403
|
+
// Scrolled: pin the cursor near the right edge of the window.
|
|
404
|
+
let used = 0;
|
|
405
|
+
while (start < cursor && before - used > budget) {
|
|
406
|
+
used += widths[start] ?? 0;
|
|
407
|
+
start++;
|
|
408
|
+
}
|
|
409
|
+
}
|
|
410
|
+
let end = start;
|
|
411
|
+
let total = 0;
|
|
412
|
+
while (end < chars.length && total + (widths[end] ?? 0) <= budget) {
|
|
413
|
+
total += widths[end] ?? 0;
|
|
414
|
+
end++;
|
|
415
|
+
}
|
|
416
|
+
return { start, end };
|
|
417
|
+
};
|
|
418
|
+
|
|
419
|
+
/**
|
|
420
|
+
* Single-line editor with insertion, deletion, home/end, word-wise movement
|
|
421
|
+
* and the common readline kill bindings (Ctrl+U/K/W, Alt+Backspace). Long
|
|
422
|
+
* values scroll horizontally instead of wrapping, so the terminal cursor
|
|
423
|
+
* always sits on the field's own row.
|
|
424
|
+
*/
|
|
425
|
+
export function TextField({
|
|
426
|
+
placeholder,
|
|
427
|
+
initialValue = "",
|
|
428
|
+
value: controlledValue,
|
|
429
|
+
mask,
|
|
430
|
+
onSubmit,
|
|
431
|
+
onChange,
|
|
432
|
+
onCancel,
|
|
433
|
+
active,
|
|
434
|
+
ariaLabel,
|
|
435
|
+
}: TextFieldProps) {
|
|
436
|
+
// Prompts are serialized by the CliKit runtime, so an enabled field owns
|
|
437
|
+
// the input stream outright — no Sigil focus negotiation. (Coupling this to
|
|
438
|
+
// useFocus({autoFocus}) silently disabled the field whenever any other
|
|
439
|
+
// focusable was already mounted.)
|
|
440
|
+
const inputActive = active ?? true;
|
|
441
|
+
const [internalValue, setInternalValue] = useState(initialValue);
|
|
442
|
+
const value = controlledValue ?? internalValue;
|
|
443
|
+
const chars = toGraphemes(value);
|
|
444
|
+
const [cursor, setCursor] = useState(
|
|
445
|
+
() => toGraphemes(controlledValue ?? initialValue).length,
|
|
446
|
+
);
|
|
447
|
+
const fieldRef = useRef<DOMElement>(null);
|
|
448
|
+
const [metrics, setMetrics] = useState({ x: 0, y: 0, measured: false });
|
|
449
|
+
const { setCursorPosition } = useCursor();
|
|
450
|
+
const { columns } = useCliEnvironment();
|
|
451
|
+
useEffect(() => {
|
|
452
|
+
setCursor((current) => Math.min(current, toGraphemes(value).length));
|
|
453
|
+
}, [value]);
|
|
454
|
+
const update = (nextChars: ReadonlyArray<string>, nextCursor: number) => {
|
|
455
|
+
const next = nextChars.join("");
|
|
456
|
+
if (controlledValue === undefined) setInternalValue(next);
|
|
457
|
+
setCursor(Math.max(0, Math.min(nextChars.length, nextCursor)));
|
|
458
|
+
onChange?.(next);
|
|
459
|
+
};
|
|
460
|
+
useTerminalInput(
|
|
461
|
+
(input, key) => {
|
|
462
|
+
if (key.enter) onSubmit(value);
|
|
463
|
+
else if (key.escape) onCancel?.();
|
|
464
|
+
else if (key.left)
|
|
465
|
+
setCursor(
|
|
466
|
+
key.ctrl || key.meta
|
|
467
|
+
? wordBoundaryLeft(chars, cursor)
|
|
468
|
+
: Math.max(0, cursor - 1),
|
|
469
|
+
);
|
|
470
|
+
else if (key.right)
|
|
471
|
+
setCursor(
|
|
472
|
+
key.ctrl || key.meta
|
|
473
|
+
? wordBoundaryRight(chars, cursor)
|
|
474
|
+
: Math.min(chars.length, cursor + 1),
|
|
475
|
+
);
|
|
476
|
+
// Sigil distinguishes physical Backspace from Delete.
|
|
477
|
+
else if (key.backspace && cursor > 0) {
|
|
478
|
+
const target = key.meta ? wordBoundaryLeft(chars, cursor) : cursor - 1;
|
|
479
|
+
update([...chars.slice(0, target), ...chars.slice(cursor)], target);
|
|
480
|
+
} else if (key.delete && cursor < chars.length)
|
|
481
|
+
update([...chars.slice(0, cursor), ...chars.slice(cursor + 1)], cursor);
|
|
482
|
+
else if (key.ctrl && input === "d" && cursor < chars.length)
|
|
483
|
+
update([...chars.slice(0, cursor), ...chars.slice(cursor + 1)], cursor);
|
|
484
|
+
else if (key.ctrl && input === "w" && cursor > 0) {
|
|
485
|
+
const target = wordBoundaryLeft(chars, cursor);
|
|
486
|
+
update([...chars.slice(0, target), ...chars.slice(cursor)], target);
|
|
487
|
+
} else if (key.ctrl && input === "u") update(chars.slice(cursor), 0);
|
|
488
|
+
else if (key.ctrl && input === "k")
|
|
489
|
+
update(chars.slice(0, cursor), cursor);
|
|
490
|
+
else if (key.home || (key.ctrl && input === "a")) setCursor(0);
|
|
491
|
+
else if (key.end || (key.ctrl && input === "e")) setCursor(chars.length);
|
|
492
|
+
else if (key.meta && input === "b")
|
|
493
|
+
setCursor(wordBoundaryLeft(chars, cursor));
|
|
494
|
+
else if (key.meta && input === "f")
|
|
495
|
+
setCursor(wordBoundaryRight(chars, cursor));
|
|
496
|
+
else if (!key.ctrl && !key.meta && !key.tab) {
|
|
497
|
+
const inserted = toGraphemes(sanitizeTextInsert(input));
|
|
498
|
+
if (inserted.length > 0) {
|
|
499
|
+
update(
|
|
500
|
+
[...chars.slice(0, cursor), ...inserted, ...chars.slice(cursor)],
|
|
501
|
+
cursor + inserted.length,
|
|
502
|
+
);
|
|
503
|
+
}
|
|
504
|
+
}
|
|
505
|
+
},
|
|
506
|
+
{ active: inputActive },
|
|
507
|
+
);
|
|
508
|
+
useTerminalPaste(
|
|
509
|
+
(pasted) => {
|
|
510
|
+
const inserted = toGraphemes(sanitizeTextInsert(pasted));
|
|
511
|
+
if (inserted.length === 0) return;
|
|
512
|
+
update(
|
|
513
|
+
[...chars.slice(0, cursor), ...inserted, ...chars.slice(cursor)],
|
|
514
|
+
cursor + inserted.length,
|
|
515
|
+
);
|
|
516
|
+
},
|
|
517
|
+
{ active: inputActive },
|
|
518
|
+
);
|
|
519
|
+
const shownChars = mask === undefined ? chars : chars.map(() => mask);
|
|
520
|
+
// Available width = terminal width minus the field's left offset. The box's
|
|
521
|
+
// own measured width is useless here: it shrinks to its content (flexGrow
|
|
522
|
+
// only affects height in a column parent), so using it collapses the scroll
|
|
523
|
+
// window to whatever is currently typed.
|
|
524
|
+
const avail = Math.max(4, columns - (metrics.measured ? metrics.x : 0) - 1);
|
|
525
|
+
const { start, end } = visibleWindow(shownChars, cursor, avail);
|
|
526
|
+
const display =
|
|
527
|
+
shownChars.length === 0
|
|
528
|
+
? (placeholder ?? " ")
|
|
529
|
+
: `${shownChars.slice(start, end).join("")}${cursor === shownChars.length ? " " : ""}`;
|
|
530
|
+
// Cursor placement must happen DURING render: useCursor only records the
|
|
531
|
+
// position in a ref and propagates it to the renderer from an insertion
|
|
532
|
+
// effect, which runs BEFORE layout effects in the same commit. Setting the
|
|
533
|
+
// position from a layout effect therefore paints every frame with the
|
|
534
|
+
// previous keystroke's cursor (off by one while typing and erasing). The
|
|
535
|
+
// ref write is render-safe — propagation is commit-gated, so abandoned
|
|
536
|
+
// concurrent renders never reach the terminal.
|
|
537
|
+
setCursorPosition(
|
|
538
|
+
inputActive && metrics.measured
|
|
539
|
+
? {
|
|
540
|
+
x: metrics.x + stringWidth(shownChars.slice(start, cursor).join("")),
|
|
541
|
+
y: metrics.y,
|
|
542
|
+
}
|
|
543
|
+
: undefined,
|
|
544
|
+
);
|
|
545
|
+
// Measuring stays post-layout: the Box ref only exists after mutation.
|
|
546
|
+
// A metrics change re-renders, which re-runs the render-time cursor
|
|
547
|
+
// placement above with the fresh offsets.
|
|
548
|
+
useLayoutEffect(() => {
|
|
549
|
+
if (fieldRef.current === null) return;
|
|
550
|
+
const { x, y } = measureElement(fieldRef.current);
|
|
551
|
+
setMetrics((current) =>
|
|
552
|
+
current.measured && current.x === x && current.y === y
|
|
553
|
+
? current
|
|
554
|
+
: { x, y, measured: true },
|
|
555
|
+
);
|
|
556
|
+
});
|
|
557
|
+
return (
|
|
558
|
+
<Box ref={fieldRef} aria-role="textbox" aria-label={ariaLabel}>
|
|
559
|
+
<Text
|
|
560
|
+
tone={shownChars.length === 0 ? "muted" : "default"}
|
|
561
|
+
wrap="truncate-end"
|
|
562
|
+
>
|
|
563
|
+
{display}
|
|
564
|
+
</Text>
|
|
565
|
+
</Box>
|
|
566
|
+
);
|
|
567
|
+
}
|
|
568
|
+
|
|
569
|
+
export interface CycleListProps<State> {
|
|
570
|
+
readonly choices: ReadonlyArray<CycleChoice<State>>;
|
|
571
|
+
readonly cursor: number;
|
|
572
|
+
readonly indices: ReadonlyArray<number>;
|
|
573
|
+
readonly visibleCount?: number;
|
|
574
|
+
}
|
|
575
|
+
|
|
576
|
+
const stateColor = (
|
|
577
|
+
variant: CycleChoice<unknown>["states"][number]["variant"],
|
|
578
|
+
) =>
|
|
579
|
+
variant === undefined || variant === "neutral"
|
|
580
|
+
? undefined
|
|
581
|
+
: theme.color[variant === "error" ? "danger" : variant];
|
|
582
|
+
|
|
583
|
+
export function CycleList<State>({
|
|
584
|
+
choices,
|
|
585
|
+
cursor,
|
|
586
|
+
indices,
|
|
587
|
+
visibleCount = 12,
|
|
588
|
+
}: CycleListProps<State>) {
|
|
589
|
+
const glyphs = useGlyphs();
|
|
590
|
+
const { start, end } = overflowListWindow(
|
|
591
|
+
choices.length,
|
|
592
|
+
cursor,
|
|
593
|
+
visibleCount,
|
|
594
|
+
);
|
|
595
|
+
const labelWidth = labelColumnWidth(choices);
|
|
596
|
+
// The state word ("add", "remove", …) gets its own column too, so the
|
|
597
|
+
// descriptions line up whether or not a row's current state carries one.
|
|
598
|
+
const stateWidth = Math.max(
|
|
599
|
+
0,
|
|
600
|
+
...choices.flatMap((choice) =>
|
|
601
|
+
choice.states.map((state) =>
|
|
602
|
+
state.label === undefined ? 0 : stringWidth(state.label),
|
|
603
|
+
),
|
|
604
|
+
),
|
|
605
|
+
);
|
|
606
|
+
return (
|
|
607
|
+
<Box flexDirection="column">
|
|
608
|
+
<OverflowRow direction="up" count={start} />
|
|
609
|
+
{choices.slice(start, end).map((choice, offset) => {
|
|
610
|
+
const index = start + offset;
|
|
611
|
+
const state = choice.states[indices[index] ?? 0];
|
|
612
|
+
const focused = index === cursor;
|
|
613
|
+
const color = stateColor(state?.variant);
|
|
614
|
+
return (
|
|
615
|
+
<Box key={index} gap={1} paddingRight={1}>
|
|
616
|
+
<Pointer focused={focused} />
|
|
617
|
+
<Text color={color} dimColor={color === undefined}>
|
|
618
|
+
{state?.icon ?? glyphs.bullet}
|
|
619
|
+
</Text>
|
|
620
|
+
<Box width={labelWidth} flexShrink={0}>
|
|
621
|
+
<Text bold color={focusedLabelColor(focused)}>
|
|
622
|
+
{choice.label}
|
|
623
|
+
</Text>
|
|
624
|
+
</Box>
|
|
625
|
+
{stateWidth === 0 ? null : (
|
|
626
|
+
<Box width={stateWidth} flexShrink={0}>
|
|
627
|
+
{state?.label === undefined ? null : (
|
|
628
|
+
<Text color={color}>{state.label}</Text>
|
|
629
|
+
)}
|
|
630
|
+
</Box>
|
|
631
|
+
)}
|
|
632
|
+
{choice.description === undefined ? null : (
|
|
633
|
+
<Text tone="muted">{choice.description}</Text>
|
|
634
|
+
)}
|
|
635
|
+
</Box>
|
|
636
|
+
);
|
|
637
|
+
})}
|
|
638
|
+
<OverflowRow direction="down" count={choices.length - end} />
|
|
639
|
+
</Box>
|
|
640
|
+
);
|
|
641
|
+
}
|
|
642
|
+
|
|
643
|
+
export const useCycleNavigation = (stateCounts: ReadonlyArray<number>) => {
|
|
644
|
+
const { cursor, move, setCursor } = useListNavigation(stateCounts.length);
|
|
645
|
+
const [indices, setIndices] = useState<ReadonlyArray<number>>(() =>
|
|
646
|
+
stateCounts.map(() => 0),
|
|
647
|
+
);
|
|
648
|
+
const cycle = (delta: number) =>
|
|
649
|
+
setIndices((current) =>
|
|
650
|
+
current.map((value, index) => {
|
|
651
|
+
if (index !== cursor) return value;
|
|
652
|
+
const count = stateCounts[index] ?? 0;
|
|
653
|
+
return count <= 0 ? 0 : (value + delta + count) % count;
|
|
654
|
+
}),
|
|
655
|
+
);
|
|
656
|
+
return { cursor, indices, move, setCursor, cycle } as const;
|
|
657
|
+
};
|
|
658
|
+
|
|
659
|
+
export interface ExternalWaitProps extends AwaitExternalOptions {
|
|
660
|
+
readonly onSubmit: (value: string) => void;
|
|
661
|
+
readonly onCancel: () => void;
|
|
662
|
+
}
|
|
663
|
+
|
|
664
|
+
/**
|
|
665
|
+
* Yes/no keyboard handling shared by `InlineConfirm` and the confirm prompt
|
|
666
|
+
* screen: arrows/tab toggle, Enter commits, y/n answer directly.
|
|
667
|
+
*/
|
|
668
|
+
export const useConfirmKeys = ({
|
|
669
|
+
initialValue = false,
|
|
670
|
+
active,
|
|
671
|
+
onSubmit,
|
|
672
|
+
onCancel,
|
|
673
|
+
}: {
|
|
674
|
+
readonly initialValue?: boolean;
|
|
675
|
+
readonly active?: boolean;
|
|
676
|
+
readonly onSubmit: (value: boolean) => void;
|
|
677
|
+
readonly onCancel?: () => void;
|
|
678
|
+
}): boolean => {
|
|
679
|
+
const [value, setValue] = useState(initialValue);
|
|
680
|
+
useTerminalInput(
|
|
681
|
+
(input, key) => {
|
|
682
|
+
if (key.escape) onCancel?.();
|
|
683
|
+
else if (key.left || key.right || key.tab || key.up || key.down)
|
|
684
|
+
setValue((current) => !current);
|
|
685
|
+
else if (key.enter) onSubmit(value);
|
|
686
|
+
else if (key.ctrl || key.meta) return;
|
|
687
|
+
else if (input.toLowerCase() === "y") onSubmit(true);
|
|
688
|
+
else if (input.toLowerCase() === "n") onSubmit(false);
|
|
689
|
+
},
|
|
690
|
+
{ active: active ?? true },
|
|
691
|
+
);
|
|
692
|
+
return value;
|
|
693
|
+
};
|
|
694
|
+
|
|
695
|
+
type InlineConfirmProps = {
|
|
696
|
+
readonly message: string;
|
|
697
|
+
readonly initialValue?: boolean;
|
|
698
|
+
readonly confirmLabel?: string;
|
|
699
|
+
readonly cancelLabel?: string;
|
|
700
|
+
readonly active?: boolean;
|
|
701
|
+
readonly onSubmit: (value: boolean) => void;
|
|
702
|
+
readonly onCancel?: () => void;
|
|
703
|
+
};
|
|
704
|
+
|
|
705
|
+
export function InlineConfirm({
|
|
706
|
+
message,
|
|
707
|
+
initialValue = false,
|
|
708
|
+
confirmLabel = "Yes",
|
|
709
|
+
cancelLabel = "No",
|
|
710
|
+
active,
|
|
711
|
+
onSubmit,
|
|
712
|
+
onCancel,
|
|
713
|
+
}: InlineConfirmProps) {
|
|
714
|
+
const keys = useKeyGlyphs();
|
|
715
|
+
const value = useConfirmKeys({ initialValue, active, onSubmit, onCancel });
|
|
716
|
+
return (
|
|
717
|
+
<Box flexDirection="column" gap={1}>
|
|
718
|
+
<Text bold color={theme.color.brand}>
|
|
719
|
+
{message}
|
|
720
|
+
</Text>
|
|
721
|
+
<ChoiceGroup
|
|
722
|
+
value={value}
|
|
723
|
+
choices={[
|
|
724
|
+
{ value: true, label: confirmLabel },
|
|
725
|
+
{ value: false, label: cancelLabel },
|
|
726
|
+
]}
|
|
727
|
+
/>
|
|
728
|
+
<KeyBar
|
|
729
|
+
marginTop={0}
|
|
730
|
+
keys={[
|
|
731
|
+
[
|
|
732
|
+
confirmLabel === "Yes" && cancelLabel === "No"
|
|
733
|
+
? keys.yesNo
|
|
734
|
+
: keys.leftRight,
|
|
735
|
+
"choose",
|
|
736
|
+
],
|
|
737
|
+
[keys.enter, "confirm"],
|
|
738
|
+
[keys.escape, "cancel"],
|
|
739
|
+
]}
|
|
740
|
+
/>
|
|
741
|
+
</Box>
|
|
742
|
+
);
|
|
743
|
+
}
|
|
744
|
+
|
|
745
|
+
export interface ChoiceGroupProps<Value> {
|
|
746
|
+
readonly choices: ReadonlyArray<{
|
|
747
|
+
readonly value: Value;
|
|
748
|
+
readonly label: string;
|
|
749
|
+
readonly description?: string;
|
|
750
|
+
}>;
|
|
751
|
+
readonly value: Value;
|
|
752
|
+
readonly orientation?: "horizontal" | "vertical";
|
|
753
|
+
readonly active?: boolean;
|
|
754
|
+
readonly onChange?: (value: Value) => void;
|
|
755
|
+
}
|
|
756
|
+
|
|
757
|
+
export function ChoiceGroup<Value>({
|
|
758
|
+
choices,
|
|
759
|
+
value,
|
|
760
|
+
orientation = "horizontal",
|
|
761
|
+
active = true,
|
|
762
|
+
onChange,
|
|
763
|
+
}: ChoiceGroupProps<Value>) {
|
|
764
|
+
const selected = Math.max(
|
|
765
|
+
0,
|
|
766
|
+
choices.findIndex((choice) => choice.value === value),
|
|
767
|
+
);
|
|
768
|
+
useTerminalInput(
|
|
769
|
+
(_input, key) => {
|
|
770
|
+
if (onChange === undefined || choices.length === 0) return;
|
|
771
|
+
const previous =
|
|
772
|
+
key.tab && key.shift
|
|
773
|
+
? true
|
|
774
|
+
: orientation === "horizontal"
|
|
775
|
+
? key.left
|
|
776
|
+
: key.up;
|
|
777
|
+
const next =
|
|
778
|
+
key.tab || (orientation === "horizontal" ? key.right : key.down);
|
|
779
|
+
if (!previous && !next) return;
|
|
780
|
+
const delta = previous ? -1 : 1;
|
|
781
|
+
const index = (selected + delta + choices.length) % choices.length;
|
|
782
|
+
onChange(choices[index]!.value);
|
|
783
|
+
},
|
|
784
|
+
{ active: active && onChange !== undefined },
|
|
785
|
+
);
|
|
786
|
+
return (
|
|
787
|
+
<Box
|
|
788
|
+
gap={orientation === "horizontal" ? 1 : 0}
|
|
789
|
+
paddingLeft={theme.space.indent}
|
|
790
|
+
flexDirection={orientation === "horizontal" ? "row" : "column"}
|
|
791
|
+
aria-role="radiogroup"
|
|
792
|
+
>
|
|
793
|
+
{choices.map((choice) => {
|
|
794
|
+
const selected = choice.value === value;
|
|
795
|
+
return (
|
|
796
|
+
<Box
|
|
797
|
+
key={choice.label}
|
|
798
|
+
paddingX={1}
|
|
799
|
+
backgroundColor={selected ? theme.paint.interactive : undefined}
|
|
800
|
+
aria-role="radio"
|
|
801
|
+
aria-label={choice.label}
|
|
802
|
+
aria-state={{ checked: selected }}
|
|
803
|
+
>
|
|
804
|
+
<Text
|
|
805
|
+
bold={selected}
|
|
806
|
+
color={selected ? theme.color.onAccent : undefined}
|
|
807
|
+
>
|
|
808
|
+
{choice.label}
|
|
809
|
+
</Text>
|
|
810
|
+
{choice.description === undefined ? null : (
|
|
811
|
+
<Text tone="muted"> · {choice.description}</Text>
|
|
812
|
+
)}
|
|
813
|
+
</Box>
|
|
814
|
+
);
|
|
815
|
+
})}
|
|
816
|
+
</Box>
|
|
817
|
+
);
|
|
818
|
+
}
|
|
819
|
+
|
|
820
|
+
/** Browser/OAuth waiting screen with URL controls and manual-entry fallback. */
|
|
821
|
+
export function ExternalWait({
|
|
822
|
+
message,
|
|
823
|
+
waitingLabel,
|
|
824
|
+
url,
|
|
825
|
+
code,
|
|
826
|
+
openFailed = false,
|
|
827
|
+
onOpen,
|
|
828
|
+
allowManualInput = true,
|
|
829
|
+
inputLabel,
|
|
830
|
+
placeholder,
|
|
831
|
+
validate,
|
|
832
|
+
onSubmit,
|
|
833
|
+
onCancel,
|
|
834
|
+
}: ExternalWaitProps) {
|
|
835
|
+
const { stdout } = useStdout();
|
|
836
|
+
const glyphs = useGlyphs();
|
|
837
|
+
const keyGlyphs = useKeyGlyphs();
|
|
838
|
+
const [manual, setManual] = useState(false);
|
|
839
|
+
const [showFull, setShowFull] = useState(false);
|
|
840
|
+
const [copied, setCopied] = useState(false);
|
|
841
|
+
const [browserFailed, setBrowserFailed] = useState(openFailed);
|
|
842
|
+
const [error, setError] = useState<string>();
|
|
843
|
+
const copiedTimer = useRef<ReturnType<typeof setTimeout> | undefined>(
|
|
844
|
+
undefined,
|
|
845
|
+
);
|
|
846
|
+
useEffect(
|
|
847
|
+
() => () => {
|
|
848
|
+
clearTimeout(copiedTimer.current);
|
|
849
|
+
},
|
|
850
|
+
[],
|
|
851
|
+
);
|
|
852
|
+
const { columns } = useTerminalSize();
|
|
853
|
+
// Ctrl+C is handled centrally by the screen runner (SigilRuntime.run).
|
|
854
|
+
useTerminalInput((input, key) => {
|
|
855
|
+
if (manual) {
|
|
856
|
+
if (key.escape) {
|
|
857
|
+
setError(undefined);
|
|
858
|
+
setManual(false);
|
|
859
|
+
}
|
|
860
|
+
return;
|
|
861
|
+
}
|
|
862
|
+
const shortcut = input.toLowerCase();
|
|
863
|
+
if (key.enter && allowManualInput) setManual(true);
|
|
864
|
+
else if (key.escape) onCancel();
|
|
865
|
+
// Ctrl+C must fall through to the runner's cancel guard, not copy the URL.
|
|
866
|
+
else if (key.ctrl || key.meta) return;
|
|
867
|
+
else if (shortcut === "u") setShowFull((current) => !current);
|
|
868
|
+
else if (shortcut === "o" && onOpen !== undefined) {
|
|
869
|
+
setBrowserFailed(false);
|
|
870
|
+
void onOpen().catch(() => setBrowserFailed(true));
|
|
871
|
+
} else if (shortcut === "c" && (code ?? url) !== undefined) {
|
|
872
|
+
copyToClipboard(code ?? url!, stdout ?? process.stdout);
|
|
873
|
+
setCopied(true);
|
|
874
|
+
clearTimeout(copiedTimer.current);
|
|
875
|
+
copiedTimer.current = setTimeout(() => setCopied(false), 2000);
|
|
876
|
+
}
|
|
877
|
+
});
|
|
878
|
+
if (manual) {
|
|
879
|
+
const manualInputLabel =
|
|
880
|
+
inputLabel ?? "Paste the authorization code or callback URL";
|
|
881
|
+
return (
|
|
882
|
+
<PromptFrame
|
|
883
|
+
message={manualInputLabel}
|
|
884
|
+
layout="inline"
|
|
885
|
+
error={error}
|
|
886
|
+
keys={[
|
|
887
|
+
[keyGlyphs.enter, "confirm"],
|
|
888
|
+
[keyGlyphs.escape, "back to waiting"],
|
|
889
|
+
]}
|
|
890
|
+
>
|
|
891
|
+
<TextField
|
|
892
|
+
placeholder={placeholder}
|
|
893
|
+
ariaLabel={manualInputLabel}
|
|
894
|
+
onCancel={() => {
|
|
895
|
+
setError(undefined);
|
|
896
|
+
setManual(false);
|
|
897
|
+
}}
|
|
898
|
+
onChange={() => setError(undefined)}
|
|
899
|
+
onSubmit={(value) => {
|
|
900
|
+
const problem = validate?.(value);
|
|
901
|
+
if (problem !== undefined) {
|
|
902
|
+
setError(problem instanceof Error ? problem.message : problem);
|
|
903
|
+
} else {
|
|
904
|
+
onSubmit(value);
|
|
905
|
+
}
|
|
906
|
+
}}
|
|
907
|
+
/>
|
|
908
|
+
</PromptFrame>
|
|
909
|
+
);
|
|
910
|
+
}
|
|
911
|
+
return (
|
|
912
|
+
<PromptFrame
|
|
913
|
+
message={message}
|
|
914
|
+
keys={[
|
|
915
|
+
...(allowManualInput
|
|
916
|
+
? ([[keyGlyphs.enter, "enter code manually"]] as const)
|
|
917
|
+
: []),
|
|
918
|
+
...(url === undefined
|
|
919
|
+
? []
|
|
920
|
+
: ([
|
|
921
|
+
...(onOpen === undefined
|
|
922
|
+
? []
|
|
923
|
+
: ([["o", "open browser"]] as const)),
|
|
924
|
+
[
|
|
925
|
+
"c",
|
|
926
|
+
copied
|
|
927
|
+
? `${glyphs.success} copied`
|
|
928
|
+
: code === undefined
|
|
929
|
+
? "copy URL"
|
|
930
|
+
: "copy code",
|
|
931
|
+
],
|
|
932
|
+
["u", showFull ? "collapse URL" : "full URL"],
|
|
933
|
+
] as const)),
|
|
934
|
+
[keyGlyphs.escape, "cancel"],
|
|
935
|
+
]}
|
|
936
|
+
>
|
|
937
|
+
<Box flexDirection="column" gap={1}>
|
|
938
|
+
<Spinner label={waitingLabel} />
|
|
939
|
+
{code === undefined ? null : (
|
|
940
|
+
<Box gap={1}>
|
|
941
|
+
<Text tone="muted">Code</Text>
|
|
942
|
+
<Text bold color={theme.color.accentBright}>
|
|
943
|
+
{code}
|
|
944
|
+
</Text>
|
|
945
|
+
</Box>
|
|
946
|
+
)}
|
|
947
|
+
{browserFailed ? (
|
|
948
|
+
<Text tone="warning">
|
|
949
|
+
{glyphs.warning} Could not open the browser. Copy and open the URL
|
|
950
|
+
manually.
|
|
951
|
+
</Text>
|
|
952
|
+
) : null}
|
|
953
|
+
{url === undefined ? null : (
|
|
954
|
+
<Link href={url}>
|
|
955
|
+
{showFull ? url : truncate(url, Math.max(24, columns - 8))}
|
|
956
|
+
</Link>
|
|
957
|
+
)}
|
|
958
|
+
</Box>
|
|
959
|
+
</PromptFrame>
|
|
960
|
+
);
|
|
961
|
+
}
|
|
962
|
+
|
|
963
|
+
export type PromptFrameProps = {
|
|
964
|
+
readonly message: string;
|
|
965
|
+
readonly description?: ReactNode;
|
|
966
|
+
readonly children: JSX.Element;
|
|
967
|
+
readonly layout?: "inline" | "stacked";
|
|
968
|
+
readonly error?: string;
|
|
969
|
+
readonly keys?: ReadonlyArray<readonly [string, string]>;
|
|
970
|
+
};
|
|
971
|
+
|
|
972
|
+
export function PromptFrame({
|
|
973
|
+
message,
|
|
974
|
+
description,
|
|
975
|
+
children,
|
|
976
|
+
layout = "stacked",
|
|
977
|
+
error,
|
|
978
|
+
keys,
|
|
979
|
+
}: PromptFrameProps) {
|
|
980
|
+
const glyphs = useGlyphs();
|
|
981
|
+
// The active-step glyph shares the heading's brand colour: `◆ question` is
|
|
982
|
+
// the step being answered, `✓ question` (AnsweredPrompt) one that is done.
|
|
983
|
+
const heading = (suffix = "") => (
|
|
984
|
+
<Text>
|
|
985
|
+
<Text bold color={theme.color.brand}>
|
|
986
|
+
{glyphs.active} {message}
|
|
987
|
+
{suffix}
|
|
988
|
+
</Text>
|
|
989
|
+
</Text>
|
|
990
|
+
);
|
|
991
|
+
return (
|
|
992
|
+
<Box flexDirection="column">
|
|
993
|
+
{layout === "inline" ? (
|
|
994
|
+
<Box flexDirection="column">
|
|
995
|
+
<Box gap={1}>
|
|
996
|
+
{heading(":")}
|
|
997
|
+
<Box flexGrow={1}>{children}</Box>
|
|
998
|
+
</Box>
|
|
999
|
+
{description === undefined ? null : (
|
|
1000
|
+
<Box paddingLeft={theme.space.indent}>
|
|
1001
|
+
<Text tone="muted">{description}</Text>
|
|
1002
|
+
</Box>
|
|
1003
|
+
)}
|
|
1004
|
+
</Box>
|
|
1005
|
+
) : (
|
|
1006
|
+
<>
|
|
1007
|
+
{heading()}
|
|
1008
|
+
{description === undefined ? null : (
|
|
1009
|
+
<Box paddingLeft={theme.space.indent}>
|
|
1010
|
+
<Text tone="muted">{description}</Text>
|
|
1011
|
+
</Box>
|
|
1012
|
+
)}
|
|
1013
|
+
{/* Children sit directly under the heading, indented like the
|
|
1014
|
+
answered lines' text; grouping is carried by indentation, not
|
|
1015
|
+
by a rail. */}
|
|
1016
|
+
<Box paddingLeft={theme.space.indent} flexDirection="column">
|
|
1017
|
+
{children}
|
|
1018
|
+
</Box>
|
|
1019
|
+
</>
|
|
1020
|
+
)}
|
|
1021
|
+
{error === undefined ? null : (
|
|
1022
|
+
<Box marginTop={1} paddingLeft={2}>
|
|
1023
|
+
<Text color={theme.color.danger}>
|
|
1024
|
+
{glyphs.error} {error}
|
|
1025
|
+
</Text>
|
|
1026
|
+
</Box>
|
|
1027
|
+
)}
|
|
1028
|
+
{keys === undefined ? null : <KeyBar keys={keys} />}
|
|
1029
|
+
</Box>
|
|
1030
|
+
);
|
|
1031
|
+
}
|
|
1032
|
+
|
|
1033
|
+
export const filterChoices = <Value,>(
|
|
1034
|
+
choices: ReadonlyArray<Choice<Value>>,
|
|
1035
|
+
query: string,
|
|
1036
|
+
) => {
|
|
1037
|
+
const normalized = query.trim().toLowerCase();
|
|
1038
|
+
const indexed = choices.map((choice, index) => ({ choice, index }));
|
|
1039
|
+
return normalized === ""
|
|
1040
|
+
? indexed
|
|
1041
|
+
: indexed.filter(({ choice }) =>
|
|
1042
|
+
`${choice.group ?? ""} ${choice.label} ${choice.description ?? ""}`
|
|
1043
|
+
.toLowerCase()
|
|
1044
|
+
.includes(normalized),
|
|
1045
|
+
);
|
|
1046
|
+
};
|
|
1047
|
+
|
|
1048
|
+
/** Stable selected-index set for multiselect widgets. */
|
|
1049
|
+
export const useSelectedChoices = <Value,>(
|
|
1050
|
+
choices: ReadonlyArray<Choice<Value>>,
|
|
1051
|
+
initialValues: ReadonlyArray<Value>,
|
|
1052
|
+
) => {
|
|
1053
|
+
return useState<ReadonlySet<number>>(
|
|
1054
|
+
() =>
|
|
1055
|
+
new Set(
|
|
1056
|
+
initialValues.flatMap((value) => {
|
|
1057
|
+
const index = choices.findIndex((choice) => choice.value === value);
|
|
1058
|
+
return index === -1 || choices[index]?.disabled ? [] : [index];
|
|
1059
|
+
}),
|
|
1060
|
+
),
|
|
1061
|
+
);
|
|
1062
|
+
};
|