alchemy 2.0.0-beta.84 → 2.0.0-beta.85
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/THIRD_PARTY_LICENSES.md +2 -2
- package/bin/cli.js +14 -6
- package/bin/register-oxc.js +16 -12
- package/lib/AdoptPolicy.d.ts +73 -0
- package/lib/AdoptPolicy.d.ts.map +1 -1
- package/lib/AdoptPolicy.js +54 -0
- package/lib/AdoptPolicy.js.map +1 -1
- package/lib/Alchemist/AuthRegistry.d.ts +31 -0
- package/lib/Alchemist/AuthRegistry.d.ts.map +1 -0
- package/lib/Alchemist/AuthRegistry.js +95 -0
- package/lib/Alchemist/AuthRegistry.js.map +1 -0
- package/lib/Alchemist/Drift.d.ts +70 -0
- package/lib/Alchemist/Drift.d.ts.map +1 -0
- package/lib/Alchemist/Drift.js +54 -0
- package/lib/Alchemist/Drift.js.map +1 -0
- package/lib/Alchemist/Entrypoint.d.ts +27 -3
- package/lib/Alchemist/Entrypoint.d.ts.map +1 -1
- package/lib/Alchemist/Entrypoint.js +34 -3
- package/lib/Alchemist/Entrypoint.js.map +1 -1
- package/lib/Alchemist/Errors.d.ts +1 -1
- package/lib/Alchemist/Errors.d.ts.map +1 -1
- package/lib/Alchemist/Errors.js +1 -1
- package/lib/Alchemist/Errors.js.map +1 -1
- package/lib/Alchemist/Logs.d.ts +46 -0
- package/lib/Alchemist/Logs.d.ts.map +1 -0
- package/lib/Alchemist/{routes/logs.js → Logs.js} +21 -26
- package/lib/Alchemist/Logs.js.map +1 -0
- package/lib/Alchemist/Nuke.d.ts +69 -0
- package/lib/Alchemist/Nuke.d.ts.map +1 -0
- package/lib/Alchemist/Nuke.js +35 -0
- package/lib/Alchemist/Nuke.js.map +1 -0
- package/lib/Alchemist/Operations.d.ts +168 -0
- package/lib/Alchemist/Operations.d.ts.map +1 -0
- package/lib/Alchemist/Operations.js +165 -0
- package/lib/Alchemist/Operations.js.map +1 -0
- package/lib/Alchemist/Profile.d.ts +132 -0
- package/lib/Alchemist/Profile.d.ts.map +1 -0
- package/lib/Alchemist/{routes/profile.js → Profile.js} +20 -21
- package/lib/Alchemist/Profile.js.map +1 -0
- package/lib/Alchemist/{routes/provider.d.ts → Provider.d.ts} +4 -4
- package/lib/Alchemist/Provider.d.ts.map +1 -0
- package/lib/Alchemist/{routes/provider.js → Provider.js} +7 -6
- package/lib/Alchemist/Provider.js.map +1 -0
- package/lib/Alchemist/Runtime.d.ts +10 -6
- package/lib/Alchemist/Runtime.d.ts.map +1 -1
- package/lib/Alchemist/Runtime.js +38 -2
- package/lib/Alchemist/Runtime.js.map +1 -1
- package/lib/Alchemist/{routes/state.d.ts → State.d.ts} +36 -16
- package/lib/Alchemist/State.d.ts.map +1 -0
- package/lib/Alchemist/{routes/state.js → State.js} +50 -15
- package/lib/Alchemist/State.js.map +1 -0
- package/lib/Alchemist/index.d.ts +11 -10
- package/lib/Alchemist/index.d.ts.map +1 -1
- package/lib/Alchemist/index.js +10 -9
- package/lib/Alchemist/index.js.map +1 -1
- package/lib/Apply.d.ts +2 -8
- package/lib/Apply.d.ts.map +1 -1
- package/lib/Apply.js +364 -184
- package/lib/Apply.js.map +1 -1
- package/lib/Auth/AuthProvider.d.ts +24 -11
- package/lib/Auth/AuthProvider.d.ts.map +1 -1
- package/lib/Auth/AuthProvider.js +28 -12
- package/lib/Auth/AuthProvider.js.map +1 -1
- package/lib/Auth/BrowserOAuth.d.ts +6 -8
- package/lib/Auth/BrowserOAuth.d.ts.map +1 -1
- package/lib/Auth/BrowserOAuth.js +25 -41
- package/lib/Auth/BrowserOAuth.js.map +1 -1
- package/lib/Auth/Credentials.d.ts.map +1 -1
- package/lib/Auth/Credentials.js +2 -2
- package/lib/Auth/Credentials.js.map +1 -1
- package/lib/Auth/Demand.d.ts +4 -4
- package/lib/Auth/Demand.d.ts.map +1 -1
- package/lib/Auth/Demand.js +16 -10
- package/lib/Auth/Demand.js.map +1 -1
- package/lib/Auth/Env.d.ts +2 -1
- package/lib/Auth/Env.d.ts.map +1 -1
- package/lib/Auth/Env.js +4 -2
- package/lib/Auth/Env.js.map +1 -1
- package/lib/Auth/Inspect.d.ts +2 -2
- package/lib/Auth/Inspect.d.ts.map +1 -1
- package/lib/Auth/Inspect.js +3 -1
- package/lib/Auth/Inspect.js.map +1 -1
- package/lib/Auth/Lock.d.ts.map +1 -1
- package/lib/Auth/Lock.js +4 -8
- package/lib/Auth/Lock.js.map +1 -1
- package/lib/Auth/OAuthFlow.d.ts +3 -12
- package/lib/Auth/OAuthFlow.d.ts.map +1 -1
- package/lib/Auth/OAuthFlow.js +7 -17
- package/lib/Auth/OAuthFlow.js.map +1 -1
- package/lib/Auth/Paths.d.ts +2 -1
- package/lib/Auth/Paths.d.ts.map +1 -1
- package/lib/Auth/Paths.js +3 -2
- package/lib/Auth/Paths.js.map +1 -1
- package/lib/Auth/Profile.d.ts +10 -0
- package/lib/Auth/Profile.d.ts.map +1 -1
- package/lib/Auth/Profile.js +19 -2
- package/lib/Auth/Profile.js.map +1 -1
- package/lib/Auth/Registry.d.ts +20 -0
- package/lib/Auth/Registry.d.ts.map +1 -0
- package/lib/Auth/Registry.js +17 -0
- package/lib/Auth/Registry.js.map +1 -0
- package/lib/Auth/Resolve.d.ts +34 -2
- package/lib/Auth/Resolve.d.ts.map +1 -1
- package/lib/Auth/Resolve.js +51 -3
- package/lib/Auth/Resolve.js.map +1 -1
- package/lib/Auth/StoredAuthProvider.d.ts +1 -1
- package/lib/Auth/StoredAuthProvider.d.ts.map +1 -1
- package/lib/Auth/StoredAuthProvider.js +1 -2
- package/lib/Auth/StoredAuthProvider.js.map +1 -1
- package/lib/Binding.d.ts.map +1 -1
- package/lib/Binding.js +3 -1
- package/lib/Binding.js.map +1 -1
- package/lib/Bundle/Bundle.d.ts +5 -0
- package/lib/Bundle/Bundle.d.ts.map +1 -1
- package/lib/Bundle/Bundle.js +36 -6
- package/lib/Bundle/Bundle.js.map +1 -1
- package/lib/Bundle/NamespaceImportPlugin.d.ts +55 -0
- package/lib/Bundle/NamespaceImportPlugin.d.ts.map +1 -0
- package/lib/Bundle/NamespaceImportPlugin.js +226 -0
- package/lib/Bundle/NamespaceImportPlugin.js.map +1 -0
- package/lib/Bundle/index.d.ts +1 -0
- package/lib/Bundle/index.d.ts.map +1 -1
- package/lib/Bundle/index.js +1 -0
- package/lib/Bundle/index.js.map +1 -1
- package/lib/Cli/Format.d.ts.map +1 -1
- package/lib/Cli/Format.js +2 -1
- package/lib/Cli/Format.js.map +1 -1
- package/lib/Cli/GlobalLog.d.ts +72 -26
- package/lib/Cli/GlobalLog.d.ts.map +1 -1
- package/lib/Cli/GlobalLog.js +151 -59
- package/lib/Cli/GlobalLog.js.map +1 -1
- package/lib/Cli/LoggingCli.d.ts.map +1 -1
- package/lib/Cli/LoggingCli.js +24 -18
- package/lib/Cli/LoggingCli.js.map +1 -1
- package/lib/Cli/PlainCliFormatter.d.ts.map +1 -1
- package/lib/Cli/PlainCliFormatter.js +4 -1
- package/lib/Cli/PlainCliFormatter.js.map +1 -1
- package/lib/Cli/Present.d.ts +14 -0
- package/lib/Cli/Present.d.ts.map +1 -0
- package/lib/Cli/Present.js +22 -0
- package/lib/Cli/Present.js.map +1 -0
- package/lib/Cli/SigilRenderer.d.ts +58 -0
- package/lib/Cli/SigilRenderer.d.ts.map +1 -0
- package/lib/Cli/SigilRenderer.js +39 -0
- package/lib/Cli/SigilRenderer.js.map +1 -0
- package/lib/Cli/checkVersion.d.ts +11 -14
- package/lib/Cli/checkVersion.d.ts.map +1 -1
- package/lib/Cli/checkVersion.js +19 -77
- package/lib/Cli/checkVersion.js.map +1 -1
- package/lib/Cli/commands/confirm.d.ts +2 -2
- package/lib/Cli/commands/confirm.d.ts.map +1 -1
- package/lib/Cli/commands/confirm.js +3 -3
- package/lib/Cli/commands/confirm.js.map +1 -1
- package/lib/Cli/commands/deploy.d.ts +4 -4
- package/lib/Cli/commands/deploy.d.ts.map +1 -1
- package/lib/Cli/commands/deploy.js +40 -39
- package/lib/Cli/commands/deploy.js.map +1 -1
- package/lib/Cli/commands/dev.d.ts.map +1 -1
- package/lib/Cli/commands/dev.js +41 -3
- package/lib/Cli/commands/dev.js.map +1 -1
- package/lib/Cli/commands/drift.d.ts +2 -2
- package/lib/Cli/commands/drift.d.ts.map +1 -1
- package/lib/Cli/commands/drift.js +14 -13
- package/lib/Cli/commands/drift.js.map +1 -1
- package/lib/Cli/commands/errors.d.ts.map +1 -1
- package/lib/Cli/commands/errors.js +2 -1
- package/lib/Cli/commands/errors.js.map +1 -1
- package/lib/Cli/commands/instrument.d.ts +15 -5
- package/lib/Cli/commands/instrument.d.ts.map +1 -1
- package/lib/Cli/commands/instrument.js +33 -8
- package/lib/Cli/commands/instrument.js.map +1 -1
- package/lib/Cli/commands/logs.d.ts +1 -1
- package/lib/Cli/commands/logs.d.ts.map +1 -1
- package/lib/Cli/commands/logs.js +22 -22
- 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 +19 -17
- package/lib/Cli/commands/nuke.js.map +1 -1
- package/lib/Cli/commands/profile/commands.d.ts +3 -2
- package/lib/Cli/commands/profile/commands.d.ts.map +1 -1
- package/lib/Cli/commands/profile/commands.js +26 -27
- package/lib/Cli/commands/profile/commands.js.map +1 -1
- package/lib/Cli/commands/profile/flows.d.ts +6 -5
- package/lib/Cli/commands/profile/flows.d.ts.map +1 -1
- package/lib/Cli/commands/profile/flows.js +19 -17
- package/lib/Cli/commands/profile/flows.js.map +1 -1
- package/lib/Cli/commands/profile/hub.d.ts +1 -2
- package/lib/Cli/commands/profile/hub.d.ts.map +1 -1
- package/lib/Cli/commands/profile/hub.js +15 -17
- package/lib/Cli/commands/profile/hub.js.map +1 -1
- package/lib/Cli/commands/provider.d.ts +3 -1
- package/lib/Cli/commands/provider.d.ts.map +1 -1
- package/lib/Cli/commands/provider.js +4 -4
- package/lib/Cli/commands/provider.js.map +1 -1
- package/lib/Cli/commands/render.d.ts +2 -4
- package/lib/Cli/commands/render.d.ts.map +1 -1
- package/lib/Cli/commands/render.js +33 -56
- package/lib/Cli/commands/render.js.map +1 -1
- package/lib/Cli/commands/state.d.ts +1 -2
- package/lib/Cli/commands/state.d.ts.map +1 -1
- package/lib/Cli/commands/state.js +74 -27
- package/lib/Cli/commands/state.js.map +1 -1
- package/lib/Cli/components/capabilities.d.ts +4 -0
- package/lib/Cli/components/capabilities.d.ts.map +1 -0
- package/lib/Cli/components/capabilities.js +18 -0
- package/lib/Cli/components/capabilities.js.map +1 -0
- package/lib/Cli/components/types.d.ts +2 -81
- package/lib/Cli/components/types.d.ts.map +1 -1
- package/lib/Cli/components/types.js +1 -3
- package/lib/Cli/components/types.js.map +1 -1
- package/lib/Cli/components/ui/Environment.d.ts +3 -3
- package/lib/Cli/components/ui/Environment.d.ts.map +1 -1
- package/lib/Cli/components/ui/Environment.js.map +1 -1
- package/lib/Cli/components/ui/Interactive.d.ts +17 -4
- package/lib/Cli/components/ui/Interactive.d.ts.map +1 -1
- package/lib/Cli/components/ui/Interactive.js +7 -11
- package/lib/Cli/components/ui/Interactive.js.map +1 -1
- package/lib/Cli/components/ui/Layout.d.ts +1 -1
- package/lib/Cli/components/ui/Layout.d.ts.map +1 -1
- package/lib/Cli/components/ui/Layout.js +1 -1
- package/lib/Cli/components/ui/Layout.js.map +1 -1
- package/lib/Cli/components/ui/Typography.d.ts +1 -1
- package/lib/Cli/components/ui/Typography.d.ts.map +1 -1
- package/lib/Cli/components/ui/Typography.js +1 -1
- package/lib/Cli/components/ui/Typography.js.map +1 -1
- package/lib/Cli/components/ui/index.d.ts +2 -2
- package/lib/Cli/components/ui/index.js +2 -2
- package/lib/Cli/components/view/ApprovePlan.d.ts +1 -1
- package/lib/Cli/components/view/ApprovePlan.d.ts.map +1 -1
- package/lib/Cli/components/view/ApprovePlan.js +2 -1
- package/lib/Cli/components/view/ApprovePlan.js.map +1 -1
- package/lib/Cli/components/view/Format.d.ts +5 -0
- package/lib/Cli/components/view/Format.d.ts.map +1 -0
- package/lib/Cli/components/view/Format.js +39 -0
- package/lib/Cli/components/view/Format.js.map +1 -0
- package/lib/Cli/components/view/Help.d.ts +2 -2
- package/lib/Cli/components/view/Help.d.ts.map +1 -1
- package/lib/Cli/components/view/Help.js +7 -5
- package/lib/Cli/components/view/Help.js.map +1 -1
- package/lib/Cli/components/view/Logo.js +1 -1
- package/lib/Cli/components/view/Logo.js.map +1 -1
- package/lib/Cli/components/view/Nuke.d.ts +8 -9
- package/lib/Cli/components/view/Nuke.d.ts.map +1 -1
- package/lib/Cli/components/view/Nuke.js +49 -52
- package/lib/Cli/components/view/Nuke.js.map +1 -1
- package/lib/Cli/components/view/PlanDecision.d.ts +1 -1
- package/lib/Cli/components/view/PlanDecision.d.ts.map +1 -1
- package/lib/Cli/components/view/PlanDecision.js +1 -1
- package/lib/Cli/components/view/PlanDecision.js.map +1 -1
- package/lib/Cli/components/view/PlanRow.js +1 -1
- package/lib/Cli/components/view/PlanRow.js.map +1 -1
- package/lib/Cli/components/view/PlanTree.d.ts +1 -1
- package/lib/Cli/components/view/PlanTree.d.ts.map +1 -1
- package/lib/Cli/components/view/PlanTree.js +1 -1
- package/lib/Cli/components/view/PlanView.js +1 -1
- package/lib/Cli/components/view/PlanView.js.map +1 -1
- package/lib/Cli/components/view/Profile.d.ts +1 -1
- package/lib/Cli/components/view/Profile.js +2 -2
- package/lib/Cli/components/view/Profile.js.map +1 -1
- package/lib/Cli/components/view/ProfileDashboard.d.ts +4 -4
- package/lib/Cli/components/view/ProfileDashboard.d.ts.map +1 -1
- package/lib/Cli/components/view/ProfileDashboard.js +9 -8
- package/lib/Cli/components/view/ProfileDashboard.js.map +1 -1
- package/lib/Cli/components/view/Prompts.d.ts +3 -3
- package/lib/Cli/components/view/Prompts.d.ts.map +1 -1
- package/lib/Cli/components/view/Prompts.js +11 -18
- package/lib/Cli/components/view/Prompts.js.map +1 -1
- package/lib/Cli/components/view/Runtime.d.ts +5 -5
- package/lib/Cli/components/view/Runtime.d.ts.map +1 -1
- package/lib/Cli/components/view/Runtime.js +136 -219
- package/lib/Cli/components/view/Runtime.js.map +1 -1
- package/lib/Cli/components/view/SigilCli.d.ts +2 -2
- package/lib/Cli/components/view/SigilCli.d.ts.map +1 -1
- package/lib/Cli/components/view/SigilCli.js +7 -7
- package/lib/Cli/components/view/SigilCli.js.map +1 -1
- package/lib/Cli/components/view/StateExplorer.d.ts +1 -1
- package/lib/Cli/components/view/StateExplorer.d.ts.map +1 -1
- package/lib/Cli/components/view/StateExplorer.js +2 -1
- package/lib/Cli/components/view/StateExplorer.js.map +1 -1
- package/lib/Cli/components/view/statusStyle.d.ts +2 -2
- package/lib/Cli/components/view/statusStyle.d.ts.map +1 -1
- package/lib/Cli/components/view/statusStyle.js +1 -1
- package/lib/Cli/components/view/statusStyle.js.map +1 -1
- package/lib/Cli/exec.d.ts +6 -1
- package/lib/Cli/exec.d.ts.map +1 -1
- package/lib/Cli/exec.js +29 -34
- package/lib/Cli/exec.js.map +1 -1
- package/lib/Cli/main.d.ts.map +1 -1
- package/lib/Cli/main.js +35 -26
- package/lib/Cli/main.js.map +1 -1
- package/lib/Cli/selectCli.d.ts +2 -2
- package/lib/Cli/selectCli.d.ts.map +1 -1
- package/lib/Cli/selectCli.js +2 -2
- package/lib/Cli/selectCli.js.map +1 -1
- package/lib/Command/Command.js +1 -1
- package/lib/Command/Command.js.map +1 -1
- package/lib/Command/Dev.d.ts +58 -4
- package/lib/Command/Dev.d.ts.map +1 -1
- package/lib/Command/Dev.js +87 -30
- package/lib/Command/Dev.js.map +1 -1
- package/lib/Command/Local.d.ts +1 -1
- package/lib/Command/Memo.js +1 -1
- package/lib/Command/Memo.js.map +1 -1
- package/lib/Command/Providers.d.ts +1 -1
- package/lib/Command/Providers.d.ts.map +1 -1
- package/lib/Contributions.d.ts +2 -3
- package/lib/Contributions.d.ts.map +1 -1
- package/lib/Contributions.js +38 -6
- package/lib/Contributions.js.map +1 -1
- package/lib/DNS/Adapter.d.ts +204 -0
- package/lib/DNS/Adapter.d.ts.map +1 -0
- package/lib/DNS/Adapter.js +112 -0
- package/lib/DNS/Adapter.js.map +1 -0
- package/lib/DNS/index.d.ts +2 -0
- package/lib/DNS/index.d.ts.map +1 -0
- package/lib/DNS/index.js +2 -0
- package/lib/DNS/index.js.map +1 -0
- package/lib/Deploy.d.ts +7 -2
- package/lib/Deploy.d.ts.map +1 -1
- package/lib/Deploy.js +8 -3
- package/lib/Deploy.js.map +1 -1
- package/lib/Destroy.d.ts +5 -8
- package/lib/Destroy.d.ts.map +1 -1
- package/lib/Destroy.js +10 -7
- package/lib/Destroy.js.map +1 -1
- package/lib/Diff.d.ts.map +1 -1
- package/lib/Diff.js +14 -4
- package/lib/Diff.js.map +1 -1
- package/lib/Drift.d.ts +7 -7
- package/lib/Drift.d.ts.map +1 -1
- package/lib/Drift.js +184 -101
- package/lib/Drift.js.map +1 -1
- package/lib/EvalStack.d.ts +23 -0
- package/lib/EvalStack.d.ts.map +1 -0
- package/lib/EvalStack.js +47 -0
- package/lib/EvalStack.js.map +1 -0
- package/lib/Events.d.ts +210 -0
- package/lib/Events.d.ts.map +1 -0
- package/lib/Events.js +244 -0
- package/lib/Events.js.map +1 -0
- package/lib/Interaction.d.ts +159 -48
- package/lib/Interaction.d.ts.map +1 -1
- package/lib/Interaction.js +139 -58
- package/lib/Interaction.js.map +1 -1
- package/lib/Local/LocalProvider.d.ts.map +1 -1
- package/lib/Local/LocalProvider.js +31 -9
- package/lib/Local/LocalProvider.js.map +1 -1
- package/lib/Local/RpcProvider.d.ts.map +1 -1
- package/lib/Local/RpcProvider.js +10 -1
- package/lib/Local/RpcProvider.js.map +1 -1
- package/lib/Local/RpcProviderProxy.d.ts +16 -0
- package/lib/Local/RpcProviderProxy.d.ts.map +1 -1
- package/lib/Local/RpcProviderProxy.js +19 -10
- package/lib/Local/RpcProviderProxy.js.map +1 -1
- package/lib/Local/RpcSerialization.d.ts +3 -2
- package/lib/Local/RpcSerialization.d.ts.map +1 -1
- package/lib/Local/RpcSerialization.js +13 -10
- package/lib/Local/RpcSerialization.js.map +1 -1
- package/lib/Local/RpcServer.d.ts +2 -1
- package/lib/Local/RpcServer.d.ts.map +1 -1
- package/lib/Local/RpcServer.js +19 -14
- package/lib/Local/RpcServer.js.map +1 -1
- package/lib/Local/RpcServerBun.d.ts.map +1 -1
- package/lib/Local/RpcServerBun.js +8 -4
- package/lib/Local/RpcServerBun.js.map +1 -1
- package/lib/Local/RpcServerEnvironment.d.ts +2 -3
- package/lib/Local/RpcServerEnvironment.d.ts.map +1 -1
- package/lib/Local/RpcServerEnvironment.js +2 -2
- package/lib/Local/RpcServerEnvironment.js.map +1 -1
- package/lib/Local/RpcServerNode.d.ts.map +1 -1
- package/lib/Local/RpcServerNode.js +5 -1
- package/lib/Local/RpcServerNode.js.map +1 -1
- package/lib/Local/RpcServerSession.d.ts +1 -1
- package/lib/Local/RpcServerSession.d.ts.map +1 -1
- package/lib/Local/RpcServerSession.js.map +1 -1
- package/lib/Local/RpcSpawner.d.ts +6 -8
- package/lib/Local/RpcSpawner.d.ts.map +1 -1
- package/lib/Local/RpcSpawner.js +45 -36
- package/lib/Local/RpcSpawner.js.map +1 -1
- package/lib/Local/Sidecar.d.ts +23 -0
- package/lib/Local/Sidecar.d.ts.map +1 -1
- package/lib/Local/Sidecar.js +14 -9
- package/lib/Local/Sidecar.js.map +1 -1
- package/lib/Nuke.d.ts +5 -23
- package/lib/Nuke.d.ts.map +1 -1
- package/lib/Nuke.js +48 -13
- package/lib/Nuke.js.map +1 -1
- package/lib/Output.d.ts +19 -1
- package/lib/Output.d.ts.map +1 -1
- package/lib/Output.js +96 -3
- package/lib/Output.js.map +1 -1
- package/lib/Plan.d.ts +5 -1
- package/lib/Plan.d.ts.map +1 -1
- package/lib/Plan.js +111 -33
- package/lib/Plan.js.map +1 -1
- package/lib/Platform.d.ts.map +1 -1
- package/lib/Platform.js +31 -7
- package/lib/Platform.js.map +1 -1
- package/lib/Provider.d.ts +45 -0
- package/lib/Provider.d.ts.map +1 -1
- package/lib/Provider.js +2 -2
- package/lib/Provider.js.map +1 -1
- package/lib/Report.d.ts +17 -195
- package/lib/Report.d.ts.map +1 -1
- package/lib/Report.js +39 -12
- package/lib/Report.js.map +1 -1
- package/lib/Runtime/ManagedHttpShutdown.d.ts +17 -0
- package/lib/Runtime/ManagedHttpShutdown.d.ts.map +1 -1
- package/lib/Runtime/ManagedHttpShutdown.js +11 -2
- package/lib/Runtime/ManagedHttpShutdown.js.map +1 -1
- package/lib/RuntimeContext.js +1 -1
- package/lib/RuntimeContext.js.map +1 -1
- package/lib/Stack.d.ts +49 -29
- package/lib/Stack.d.ts.map +1 -1
- package/lib/Stack.js +25 -31
- package/lib/Stack.js.map +1 -1
- package/lib/State/BucketState.d.ts.map +1 -1
- package/lib/State/BucketState.js +43 -14
- package/lib/State/BucketState.js.map +1 -1
- package/lib/State/LocalState.d.ts.map +1 -1
- package/lib/State/LocalState.js +3 -3
- package/lib/State/LocalState.js.map +1 -1
- package/lib/State/Provisioning.d.ts +5 -0
- package/lib/State/Provisioning.d.ts.map +1 -1
- package/lib/State/Provisioning.js +3 -1
- package/lib/State/Provisioning.js.map +1 -1
- package/lib/State/ResourceState.d.ts +2 -0
- package/lib/State/ResourceState.d.ts.map +1 -1
- package/lib/State/State.d.ts +26 -0
- package/lib/State/State.d.ts.map +1 -1
- package/lib/State/StateEncoding.d.ts +7 -0
- package/lib/State/StateEncoding.d.ts.map +1 -1
- package/lib/State/StateEncoding.js +19 -0
- package/lib/State/StateEncoding.js.map +1 -1
- package/lib/State/index.js +2 -2
- package/lib/State/index.js.map +1 -1
- package/lib/Telemetry/Layer.d.ts +2 -5
- package/lib/Telemetry/Layer.d.ts.map +1 -1
- package/lib/Telemetry/Layer.js +3 -23
- package/lib/Telemetry/Layer.js.map +1 -1
- package/lib/Telemetry/Metrics.d.ts +1 -1
- package/lib/Telemetry/Metrics.d.ts.map +1 -1
- package/lib/TelemetryRelay.js +1 -1
- package/lib/TelemetryRelay.js.map +1 -1
- package/lib/TelemetryRuntime.d.ts +1 -1
- package/lib/TelemetryRuntime.d.ts.map +1 -1
- package/lib/TelemetryRuntime.js +4 -3
- package/lib/TelemetryRuntime.js.map +1 -1
- package/lib/Util/ConsoleSink.d.ts +23 -2
- package/lib/Util/ConsoleSink.d.ts.map +1 -1
- package/lib/Util/ConsoleSink.js +54 -14
- package/lib/Util/ConsoleSink.js.map +1 -1
- package/lib/Util/LogAnnotation.d.ts +19 -0
- package/lib/Util/LogAnnotation.d.ts.map +1 -0
- package/lib/Util/LogAnnotation.js +19 -0
- package/lib/Util/LogAnnotation.js.map +1 -0
- package/lib/Util/LogRecord.d.ts +281 -0
- package/lib/Util/LogRecord.d.ts.map +1 -0
- package/lib/Util/LogRecord.js +267 -0
- package/lib/Util/LogRecord.js.map +1 -0
- package/lib/Util/Node.d.ts +9 -0
- package/lib/Util/Node.d.ts.map +1 -1
- package/lib/Util/Node.js +10 -6
- package/lib/Util/Node.js.map +1 -1
- package/lib/Util/PlatformServices.d.ts +3 -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 +18 -10
- package/lib/Util/ResourceOutput.d.ts.map +1 -1
- package/lib/Util/ResourceOutput.js +22 -23
- package/lib/Util/ResourceOutput.js.map +1 -1
- package/lib/Util/Shutdown.d.ts +10 -0
- package/lib/Util/Shutdown.d.ts.map +1 -0
- package/lib/Util/Shutdown.js +32 -0
- package/lib/Util/Shutdown.js.map +1 -0
- package/lib/Util/Terminal.d.ts +2 -4
- package/lib/Util/Terminal.d.ts.map +1 -1
- package/lib/Util/Terminal.js +3 -11
- package/lib/Util/Terminal.js.map +1 -1
- package/lib/Util/TraceParent.d.ts +32 -0
- package/lib/Util/TraceParent.d.ts.map +1 -0
- package/lib/Util/TraceParent.js +42 -0
- package/lib/Util/TraceParent.js.map +1 -0
- package/lib/Util/base64.d.ts +7 -0
- package/lib/Util/base64.d.ts.map +1 -0
- package/lib/Util/base64.js +24 -0
- package/lib/Util/base64.js.map +1 -0
- package/lib/Util/cached-function.d.ts +5 -0
- package/lib/Util/cached-function.d.ts.map +1 -1
- package/lib/Util/cached-function.js +13 -8
- package/lib/Util/cached-function.js.map +1 -1
- package/lib/Util/data.d.ts +1 -1
- package/lib/Util/data.d.ts.map +1 -1
- package/lib/Util/data.js +1 -1
- package/lib/Util/data.js.map +1 -1
- package/lib/Util/equal.d.ts.map +1 -1
- package/lib/Util/equal.js +3 -2
- package/lib/Util/equal.js.map +1 -1
- package/lib/Util/extraFiles.d.ts.map +1 -1
- package/lib/Util/extraFiles.js +5 -5
- package/lib/Util/extraFiles.js.map +1 -1
- package/lib/Util/interactive.js +1 -1
- package/lib/Website/AstroOutput.d.ts +42 -0
- package/lib/Website/AstroOutput.d.ts.map +1 -0
- package/lib/Website/AstroOutput.js +34 -0
- package/lib/Website/AstroOutput.js.map +1 -0
- package/lib/Website/FrontendCore.d.ts +1 -1
- package/lib/Workflows.d.ts +9 -0
- package/lib/Workflows.d.ts.map +1 -1
- package/lib/Workflows.js +8 -0
- package/lib/Workflows.js.map +1 -1
- package/lib/index.d.ts +1 -0
- package/lib/index.d.ts.map +1 -1
- package/lib/index.js +1 -0
- package/lib/index.js.map +1 -1
- package/package.json +21 -28
- package/src/AdoptPolicy.ts +76 -0
- package/src/Alchemist/AuthRegistry.ts +164 -0
- package/src/Alchemist/Drift.ts +103 -0
- package/src/Alchemist/Entrypoint.ts +51 -3
- package/src/Alchemist/Errors.ts +1 -1
- package/src/Alchemist/{routes/logs.ts → Logs.ts} +28 -30
- package/src/Alchemist/Nuke.ts +90 -0
- package/src/Alchemist/Operations.ts +309 -0
- package/src/Alchemist/{routes/profile.ts → Profile.ts} +22 -22
- package/src/Alchemist/{routes/provider.ts → Provider.ts} +7 -6
- package/src/Alchemist/Runtime.ts +46 -12
- package/src/Alchemist/{routes/state.ts → State.ts} +78 -21
- package/src/Alchemist/index.ts +32 -15
- package/src/Apply.ts +513 -274
- package/src/Auth/AuthProvider.ts +76 -23
- package/src/Auth/BrowserOAuth.ts +37 -60
- package/src/Auth/Credentials.ts +2 -4
- package/src/Auth/Demand.ts +27 -18
- package/src/Auth/Env.ts +13 -8
- package/src/Auth/Inspect.ts +5 -2
- package/src/Auth/Lock.ts +4 -8
- package/src/Auth/OAuthFlow.ts +12 -26
- package/src/Auth/Paths.ts +3 -2
- package/src/Auth/Profile.ts +30 -2
- package/src/Auth/Registry.ts +27 -0
- package/src/Auth/Resolve.ts +75 -3
- package/src/Auth/StoredAuthProvider.ts +1 -2
- package/src/Binding.ts +3 -4
- package/src/Bundle/Bundle.ts +58 -7
- package/src/Bundle/NamespaceImportPlugin.ts +259 -0
- package/src/Bundle/index.ts +1 -0
- package/src/Cli/Format.ts +2 -1
- package/src/Cli/GlobalLog.ts +206 -68
- package/src/Cli/LoggingCli.ts +33 -20
- package/src/Cli/PlainCliFormatter.ts +4 -1
- package/src/Cli/Present.ts +34 -0
- package/src/Cli/SigilRenderer.ts +75 -0
- package/src/Cli/checkVersion.ts +25 -78
- package/src/Cli/commands/confirm.ts +3 -3
- package/src/Cli/commands/deploy.ts +53 -44
- package/src/Cli/commands/dev.ts +65 -7
- package/src/Cli/commands/drift.ts +20 -16
- package/src/Cli/commands/errors.ts +2 -3
- package/src/Cli/commands/instrument.ts +39 -8
- package/src/Cli/commands/logs.ts +22 -30
- package/src/Cli/commands/nuke.ts +25 -26
- package/src/Cli/commands/profile/commands.ts +34 -34
- package/src/Cli/commands/profile/flows.ts +26 -20
- package/src/Cli/commands/profile/hub.ts +16 -18
- package/src/Cli/commands/provider.ts +4 -4
- package/src/Cli/commands/render.ts +43 -71
- package/src/Cli/commands/state.ts +113 -33
- package/src/Cli/components/capabilities.ts +20 -0
- package/src/Cli/components/types.ts +13 -99
- package/src/Cli/components/ui/Environment.tsx +5 -5
- package/src/Cli/components/ui/Interactive.tsx +24 -15
- package/src/Cli/components/ui/Layout.tsx +1 -1
- package/src/Cli/components/ui/Typography.tsx +1 -1
- package/src/Cli/components/ui/index.ts +2 -2
- package/src/Cli/components/view/ApprovePlan.tsx +2 -1
- package/src/Cli/components/view/Format.tsx +58 -0
- package/src/Cli/components/view/Help.tsx +14 -17
- package/src/Cli/components/view/Logo.tsx +1 -1
- package/src/Cli/components/view/Nuke.tsx +74 -49
- package/src/Cli/components/view/PlanDecision.tsx +1 -1
- package/src/Cli/components/view/PlanRow.tsx +1 -1
- package/src/Cli/components/view/PlanTree.ts +2 -2
- package/src/Cli/components/view/PlanView.tsx +2 -2
- package/src/Cli/components/view/Profile.tsx +2 -2
- package/src/Cli/components/view/ProfileDashboard.tsx +12 -11
- package/src/Cli/components/view/Prompts.tsx +37 -75
- package/src/Cli/components/view/Runtime.tsx +132 -238
- package/src/Cli/components/view/SigilCli.tsx +12 -12
- package/src/Cli/components/view/StateExplorer.tsx +2 -1
- package/src/Cli/components/view/statusStyle.ts +2 -2
- package/src/Cli/exec.ts +48 -41
- package/src/Cli/main.ts +52 -33
- package/src/Cli/selectCli.ts +3 -3
- package/src/Command/Command.ts +1 -1
- package/src/Command/Dev.ts +129 -36
- package/src/Command/Memo.ts +1 -1
- package/src/Contributions.ts +42 -8
- package/src/DNS/Adapter.ts +289 -0
- package/src/DNS/index.ts +1 -0
- package/src/Deploy.ts +11 -3
- package/src/Destroy.ts +19 -13
- package/src/Diff.ts +17 -4
- package/src/Drift.ts +256 -127
- package/src/EvalStack.ts +97 -0
- package/src/Events.ts +296 -0
- package/src/Interaction.ts +332 -97
- package/src/Local/LocalProvider.ts +40 -9
- package/src/Local/RpcProvider.ts +11 -1
- package/src/Local/RpcProviderProxy.ts +29 -21
- package/src/Local/RpcSerialization.ts +32 -17
- package/src/Local/RpcServer.ts +25 -17
- package/src/Local/RpcServerBun.ts +10 -6
- package/src/Local/RpcServerEnvironment.ts +2 -2
- package/src/Local/RpcServerNode.ts +8 -1
- package/src/Local/RpcServerSession.ts +2 -2
- package/src/Local/RpcSpawner.ts +61 -37
- package/src/Local/Sidecar.ts +10 -1
- package/src/Nuke.ts +66 -43
- package/src/Output.ts +120 -7
- package/src/Plan.ts +140 -52
- package/src/Platform.ts +47 -18
- package/src/Provider.ts +48 -3
- package/src/Report.ts +77 -275
- package/src/Runtime/ManagedHttpShutdown.ts +21 -4
- package/src/RuntimeContext.ts +1 -1
- package/src/Stack.ts +113 -135
- package/src/State/BucketState.ts +53 -21
- package/src/State/LocalState.ts +7 -9
- package/src/State/Provisioning.ts +8 -1
- package/src/State/ResourceState.ts +2 -0
- package/src/State/State.ts +30 -0
- package/src/State/StateEncoding.ts +22 -0
- package/src/State/index.ts +2 -2
- package/src/Telemetry/Layer.ts +3 -24
- package/src/Telemetry/Metrics.ts +1 -1
- package/src/TelemetryRelay.ts +1 -1
- package/src/TelemetryRuntime.ts +8 -8
- package/src/Util/ConsoleSink.ts +76 -13
- package/src/Util/LogAnnotation.ts +18 -0
- package/src/Util/LogRecord.ts +386 -0
- package/src/Util/Node.ts +20 -6
- package/src/Util/PlatformServices.ts +17 -4
- package/src/Util/ResourceOutput.ts +26 -25
- package/src/Util/Shutdown.ts +52 -0
- package/src/Util/Terminal.ts +3 -20
- package/src/Util/TraceParent.ts +70 -0
- package/src/Util/base64.ts +22 -0
- package/src/Util/cached-function.ts +30 -19
- package/src/Util/data.ts +2 -2
- package/src/Util/equal.ts +3 -2
- package/src/Util/extraFiles.ts +9 -8
- package/src/Util/interactive.ts +1 -1
- package/src/Website/AstroOutput.ts +83 -0
- package/src/Workflows.ts +11 -0
- package/src/index.ts +1 -0
- package/lib/Alchemist/Progress.d.ts +0 -16
- package/lib/Alchemist/Progress.d.ts.map +0 -1
- package/lib/Alchemist/Progress.js +0 -123
- package/lib/Alchemist/Progress.js.map +0 -1
- package/lib/Alchemist/Session.d.ts +0 -116
- package/lib/Alchemist/Session.d.ts.map +0 -1
- package/lib/Alchemist/Session.js +0 -212
- package/lib/Alchemist/Session.js.map +0 -1
- package/lib/Alchemist/routes/drift.d.ts +0 -55
- package/lib/Alchemist/routes/drift.d.ts.map +0 -1
- package/lib/Alchemist/routes/drift.js +0 -52
- package/lib/Alchemist/routes/drift.js.map +0 -1
- package/lib/Alchemist/routes/logs.d.ts +0 -41
- package/lib/Alchemist/routes/logs.d.ts.map +0 -1
- package/lib/Alchemist/routes/logs.js.map +0 -1
- package/lib/Alchemist/routes/nuke.d.ts +0 -46
- package/lib/Alchemist/routes/nuke.d.ts.map +0 -1
- package/lib/Alchemist/routes/nuke.js +0 -80
- package/lib/Alchemist/routes/nuke.js.map +0 -1
- package/lib/Alchemist/routes/profile.d.ts +0 -133
- package/lib/Alchemist/routes/profile.d.ts.map +0 -1
- package/lib/Alchemist/routes/profile.js.map +0 -1
- package/lib/Alchemist/routes/provider.d.ts.map +0 -1
- package/lib/Alchemist/routes/provider.js.map +0 -1
- package/lib/Alchemist/routes/stack.d.ts +0 -95
- package/lib/Alchemist/routes/stack.d.ts.map +0 -1
- package/lib/Alchemist/routes/stack.js +0 -73
- package/lib/Alchemist/routes/stack.js.map +0 -1
- package/lib/Alchemist/routes/state.d.ts.map +0 -1
- package/lib/Alchemist/routes/state.js.map +0 -1
- package/lib/Cli/CliKit/CliKit.d.ts +0 -92
- package/lib/Cli/CliKit/CliKit.d.ts.map +0 -1
- package/lib/Cli/CliKit/CliKit.js +0 -27
- package/lib/Cli/CliKit/CliKit.js.map +0 -1
- package/lib/Cli/CliKit/index.d.ts +0 -9
- package/lib/Cli/CliKit/index.d.ts.map +0 -1
- package/lib/Cli/CliKit/index.js +0 -9
- package/lib/Cli/CliKit/index.js.map +0 -1
- package/lib/Cli/CliKit/interaction.d.ts +0 -13
- package/lib/Cli/CliKit/interaction.d.ts.map +0 -1
- package/lib/Cli/CliKit/interaction.js +0 -17
- package/lib/Cli/CliKit/interaction.js.map +0 -1
- package/lib/Cli/CliKit/layer.d.ts +0 -7
- package/lib/Cli/CliKit/layer.d.ts.map +0 -1
- package/lib/Cli/CliKit/layer.js +0 -33
- package/lib/Cli/CliKit/layer.js.map +0 -1
- package/lib/Local/DevLog.d.ts +0 -32
- package/lib/Local/DevLog.d.ts.map +0 -1
- package/lib/Local/DevLog.js +0 -112
- package/lib/Local/DevLog.js.map +0 -1
- package/lib/Test/Alchemy.d.ts +0 -79
- package/lib/Test/Alchemy.d.ts.map +0 -1
- package/lib/Test/Alchemy.js +0 -193
- package/lib/Test/Alchemy.js.map +0 -1
- package/lib/Test/Bun.d.ts +0 -69
- package/lib/Test/Bun.d.ts.map +0 -1
- package/lib/Test/Bun.js +0 -126
- package/lib/Test/Bun.js.map +0 -1
- package/lib/Test/Core.d.ts +0 -277
- package/lib/Test/Core.d.ts.map +0 -1
- package/lib/Test/Core.js +0 -362
- package/lib/Test/Core.js.map +0 -1
- package/lib/Test/Http.d.ts +0 -109
- package/lib/Test/Http.d.ts.map +0 -1
- package/lib/Test/Http.js +0 -123
- package/lib/Test/Http.js.map +0 -1
- package/lib/Test/TestState.d.ts +0 -12
- package/lib/Test/TestState.d.ts.map +0 -1
- package/lib/Test/TestState.js +0 -15
- package/lib/Test/TestState.js.map +0 -1
- package/lib/Test/Vitest.d.ts +0 -60
- package/lib/Test/Vitest.d.ts.map +0 -1
- package/lib/Test/Vitest.js +0 -132
- package/lib/Test/Vitest.js.map +0 -1
- package/lib/Test/index.d.ts +0 -3
- package/lib/Test/index.d.ts.map +0 -1
- package/lib/Test/index.js +0 -3
- package/lib/Test/index.js.map +0 -1
- package/lib/Util/FileLogger.d.ts +0 -7
- package/lib/Util/FileLogger.d.ts.map +0 -1
- package/lib/Util/FileLogger.js +0 -16
- package/lib/Util/FileLogger.js.map +0 -1
- package/src/Alchemist/Progress.ts +0 -167
- package/src/Alchemist/Session.ts +0 -415
- package/src/Alchemist/routes/drift.ts +0 -87
- package/src/Alchemist/routes/nuke.ts +0 -131
- package/src/Alchemist/routes/stack.ts +0 -173
- package/src/Cli/CliKit/CliKit.ts +0 -159
- package/src/Cli/CliKit/index.ts +0 -41
- package/src/Cli/CliKit/interaction.ts +0 -19
- package/src/Cli/CliKit/layer.ts +0 -44
- package/src/Local/DevLog.ts +0 -122
- package/src/Test/Alchemy.ts +0 -334
- package/src/Test/Bun.ts +0 -230
- package/src/Test/Core.ts +0 -785
- package/src/Test/Http.ts +0 -201
- package/src/Test/TestState.ts +0 -35
- package/src/Test/Vitest.ts +0 -239
- package/src/Test/index.ts +0 -2
- package/src/Util/FileLogger.ts +0 -20
|
@@ -13,7 +13,7 @@ import { useEffect, useLayoutEffect, useRef, useState } from "@alchemy.run/sigil
|
|
|
13
13
|
import type { JSX, ReactNode } from "react";
|
|
14
14
|
import { copyToClipboard } from "../../../Util/Terminal.ts";
|
|
15
15
|
import { theme } from "../../../Util/Theme.ts";
|
|
16
|
-
import type {
|
|
16
|
+
import type { Choice, CycleChoice } from "../types.ts";
|
|
17
17
|
import { useCliEnvironment, useGlyphs, useKeyGlyphs } from "./Environment.tsx";
|
|
18
18
|
import { KeyBar, Spinner } from "./Feedback.tsx";
|
|
19
19
|
import { Box, overflowListWindow } from "./Layout.tsx";
|
|
@@ -393,7 +393,7 @@ export function TextField({
|
|
|
393
393
|
active,
|
|
394
394
|
ariaLabel,
|
|
395
395
|
}: TextFieldProps) {
|
|
396
|
-
// Prompts are serialized by the
|
|
396
|
+
// Prompts are serialized by the Sigil renderer, so an enabled field owns
|
|
397
397
|
// the input stream outright — no Sigil focus negotiation. (Coupling this to
|
|
398
398
|
// useFocus({autoFocus}) silently disabled the field whenever any other
|
|
399
399
|
// focusable was already mounted.)
|
|
@@ -593,7 +593,20 @@ export const useCycleNavigation = (stateCounts: ReadonlyArray<number>) => {
|
|
|
593
593
|
return { cursor, indices, move, setCursor, cycle } as const;
|
|
594
594
|
};
|
|
595
595
|
|
|
596
|
-
export interface
|
|
596
|
+
export interface BrowserLoginWaitProps {
|
|
597
|
+
readonly message: string;
|
|
598
|
+
readonly waitingLabel: string;
|
|
599
|
+
readonly url: string;
|
|
600
|
+
/** Short code the user confirms on the login page. */
|
|
601
|
+
readonly code?: string;
|
|
602
|
+
readonly openFailed?: boolean;
|
|
603
|
+
/** Open the login URL again from the waiting screen. */
|
|
604
|
+
readonly onOpen?: () => Promise<void>;
|
|
605
|
+
/** Allow Enter to switch to manual code entry. */
|
|
606
|
+
readonly allowManualInput: boolean;
|
|
607
|
+
readonly inputLabel?: string;
|
|
608
|
+
readonly placeholder?: string;
|
|
609
|
+
readonly validate?: (value: string) => string | Error | undefined;
|
|
597
610
|
readonly onSubmit: (value: string) => void;
|
|
598
611
|
readonly onCancel: () => void;
|
|
599
612
|
}
|
|
@@ -741,21 +754,21 @@ export function ChoiceGroup<Value>({
|
|
|
741
754
|
);
|
|
742
755
|
}
|
|
743
756
|
|
|
744
|
-
/** Browser
|
|
745
|
-
export function
|
|
757
|
+
/** Browser login waiting screen with URL controls and manual-entry fallback. */
|
|
758
|
+
export function BrowserLoginWait({
|
|
746
759
|
message,
|
|
747
760
|
waitingLabel,
|
|
748
761
|
url,
|
|
749
762
|
code,
|
|
750
763
|
openFailed = false,
|
|
751
764
|
onOpen,
|
|
752
|
-
allowManualInput
|
|
765
|
+
allowManualInput,
|
|
753
766
|
inputLabel,
|
|
754
767
|
placeholder,
|
|
755
768
|
validate,
|
|
756
769
|
onSubmit,
|
|
757
770
|
onCancel,
|
|
758
|
-
}:
|
|
771
|
+
}: BrowserLoginWaitProps) {
|
|
759
772
|
const { stdout } = useStdout();
|
|
760
773
|
const glyphs = useGlyphs();
|
|
761
774
|
const keyGlyphs = useKeyGlyphs();
|
|
@@ -787,7 +800,7 @@ export function ExternalWait({
|
|
|
787
800
|
else if (shortcut === "o" && onOpen !== undefined) {
|
|
788
801
|
setBrowserFailed(false);
|
|
789
802
|
void onOpen().catch(() => setBrowserFailed(true));
|
|
790
|
-
} else if (shortcut === "c"
|
|
803
|
+
} else if (shortcut === "c") {
|
|
791
804
|
copyToClipboard(url, stdout ?? process.stdout);
|
|
792
805
|
setCopied(true);
|
|
793
806
|
clearTimeout(copiedTimer.current);
|
|
@@ -831,12 +844,8 @@ export function ExternalWait({
|
|
|
831
844
|
message={message}
|
|
832
845
|
keys={[
|
|
833
846
|
...(allowManualInput ? ([[keyGlyphs.enter, "enter code manually"]] as const) : []),
|
|
834
|
-
...(
|
|
835
|
-
|
|
836
|
-
: ([
|
|
837
|
-
...(onOpen === undefined ? [] : ([["o", "open browser"]] as const)),
|
|
838
|
-
["c", copied ? `${glyphs.success} copied` : "copy URL"],
|
|
839
|
-
] as const)),
|
|
847
|
+
...(onOpen === undefined ? [] : ([["o", "open browser"]] as const)),
|
|
848
|
+
["c", copied ? `${glyphs.success} copied` : "copy URL"],
|
|
840
849
|
[keyGlyphs.escape, "cancel"],
|
|
841
850
|
]}
|
|
842
851
|
>
|
|
@@ -855,7 +864,7 @@ export function ExternalWait({
|
|
|
855
864
|
{glyphs.warning} Could not open the browser. Copy and open the URL manually.
|
|
856
865
|
</Text>
|
|
857
866
|
) : null}
|
|
858
|
-
|
|
867
|
+
<Link href={url}>{url}</Link>
|
|
859
868
|
</Box>
|
|
860
869
|
</PromptFrame>
|
|
861
870
|
);
|
|
@@ -19,7 +19,7 @@ export { VirtualList } from "@alchemy.run/sigil";
|
|
|
19
19
|
|
|
20
20
|
export type BoxProps = ComponentProps<typeof SigilBox>;
|
|
21
21
|
|
|
22
|
-
/** Theme-aware Sigil container used by
|
|
22
|
+
/** Theme-aware Sigil container used by CLI layouts. */
|
|
23
23
|
export const Box: ForwardRefExoticComponent<PropsWithoutRef<BoxProps> & RefAttributes<DOMElement>> =
|
|
24
24
|
forwardRef<DOMElement, BoxProps>(function Box(props, ref) {
|
|
25
25
|
const { colors } = useCliEnvironment();
|
|
@@ -21,7 +21,7 @@ export interface TextProps extends Omit<ComponentProps<typeof SigilText>, "color
|
|
|
21
21
|
readonly color?: ComponentProps<typeof SigilText>["color"];
|
|
22
22
|
}
|
|
23
23
|
|
|
24
|
-
/**
|
|
24
|
+
/** CLI typography primitive. Consumers never import Sigil directly. */
|
|
25
25
|
export function Text({
|
|
26
26
|
tone = "default",
|
|
27
27
|
color,
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Composable terminal layouts and interaction widgets.
|
|
3
3
|
*
|
|
4
|
-
*
|
|
5
|
-
*
|
|
4
|
+
* Kept apart from `Interaction` so importing the service does not eagerly
|
|
5
|
+
* load React, Sigil or Yoga.
|
|
6
6
|
*/
|
|
7
7
|
export {
|
|
8
8
|
CliEnvironment,
|
|
@@ -2,8 +2,9 @@
|
|
|
2
2
|
/** @jsxImportSource @alchemy.run/sigil */
|
|
3
3
|
import { useMemo, useState } from "@alchemy.run/sigil/react";
|
|
4
4
|
import type { JSX } from "react";
|
|
5
|
+
import { Screen, type ScreenController } from "../../../Interaction.ts";
|
|
5
6
|
import type { Plan as AlchemyPlan } from "../../../Plan.ts";
|
|
6
|
-
import {
|
|
7
|
+
import { theme } from "../../../Util/Theme.ts";
|
|
7
8
|
import {
|
|
8
9
|
ChoiceGroup,
|
|
9
10
|
Box,
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
/** @jsxRuntime automatic */
|
|
2
|
+
/** @jsxImportSource @alchemy.run/sigil */
|
|
3
|
+
import { stripVTControlCharacters } from "node:util";
|
|
4
|
+
import { renderToString } from "@alchemy.run/sigil";
|
|
5
|
+
import type { RenderOptions, TerminalCapabilities, View } from "../types.ts";
|
|
6
|
+
import { CliEnvironment } from "../ui/Environment.tsx";
|
|
7
|
+
import { Text } from "../ui/Typography.tsx";
|
|
8
|
+
|
|
9
|
+
export const normalizeView = (view: View): View => {
|
|
10
|
+
if (typeof view === "string" || typeof view === "number" || typeof view === "bigint") {
|
|
11
|
+
return <Text>{String(view)}</Text>;
|
|
12
|
+
}
|
|
13
|
+
// Contract: an array of primitives renders as ONE Text line with the
|
|
14
|
+
// elements concatenated (no separator) — matching how React renders
|
|
15
|
+
// adjacent text children. Callers wanting separators must join themselves.
|
|
16
|
+
if (
|
|
17
|
+
Array.isArray(view) &&
|
|
18
|
+
view.every(
|
|
19
|
+
(item) =>
|
|
20
|
+
item === null ||
|
|
21
|
+
item === undefined ||
|
|
22
|
+
typeof item === "boolean" ||
|
|
23
|
+
typeof item === "string" ||
|
|
24
|
+
typeof item === "number" ||
|
|
25
|
+
typeof item === "bigint",
|
|
26
|
+
)
|
|
27
|
+
) {
|
|
28
|
+
return (
|
|
29
|
+
<Text>
|
|
30
|
+
{view
|
|
31
|
+
.filter((item) => item !== null && item !== undefined && typeof item !== "boolean")
|
|
32
|
+
.map(String)
|
|
33
|
+
.join("")}
|
|
34
|
+
</Text>
|
|
35
|
+
);
|
|
36
|
+
}
|
|
37
|
+
return view;
|
|
38
|
+
};
|
|
39
|
+
|
|
40
|
+
/** Render a layout to a string without a live renderer (help, plain output, snapshots). */
|
|
41
|
+
export const formatView = (
|
|
42
|
+
view: View,
|
|
43
|
+
capabilities: TerminalCapabilities,
|
|
44
|
+
options: RenderOptions = {},
|
|
45
|
+
): string => {
|
|
46
|
+
const colors = options.colors ?? capabilities.colors;
|
|
47
|
+
// The renderer and the components must agree on the width: components size
|
|
48
|
+
// themselves from the environment's `columns`, so an explicit render width
|
|
49
|
+
// has to flow into the capabilities too, not only into renderToString.
|
|
50
|
+
const columns = options.columns ?? capabilities.columns;
|
|
51
|
+
const output = renderToString(
|
|
52
|
+
<CliEnvironment capabilities={{ ...capabilities, colors, columns }}>
|
|
53
|
+
{normalizeView(view)}
|
|
54
|
+
</CliEnvironment>,
|
|
55
|
+
{ columns, colorProfile: colors ? "truecolor" : "none" },
|
|
56
|
+
).replace(/[\s\n]+$/, "");
|
|
57
|
+
return colors ? output : stripVTControlCharacters(output);
|
|
58
|
+
};
|
|
@@ -7,17 +7,11 @@ import type { HelpDoc } from "effect/cli/HelpDoc";
|
|
|
7
7
|
import * as Option from "effect/Option";
|
|
8
8
|
import type { JSX } from "react";
|
|
9
9
|
import packageJson from "../../../../package.json" with { type: "json" };
|
|
10
|
-
import type {
|
|
11
|
-
import {
|
|
12
|
-
|
|
13
|
-
ANSI_DIM,
|
|
14
|
-
ansiFg,
|
|
15
|
-
glyphsFor,
|
|
16
|
-
paint,
|
|
17
|
-
truncate,
|
|
18
|
-
theme,
|
|
19
|
-
} from "../../CliKit/index.ts";
|
|
10
|
+
import type { Interaction } from "../../../Interaction.ts";
|
|
11
|
+
import { ANSI_BOLD, ANSI_DIM, ansiFg, paint, truncate } from "../../../Util/Terminal.ts";
|
|
12
|
+
import { glyphsFor, theme } from "../../../Util/Theme.ts";
|
|
20
13
|
import { Box, Heading, Text, useGlyphs } from "../ui/index.ts";
|
|
14
|
+
import { formatView } from "./Format.tsx";
|
|
21
15
|
import { Logo } from "./Logo.tsx";
|
|
22
16
|
|
|
23
17
|
const commandLabel = (command: { readonly name: string; readonly alias?: string | undefined }) =>
|
|
@@ -278,12 +272,13 @@ function SubHelp({ doc, root = false }: SubHelpProps): JSX.Element {
|
|
|
278
272
|
);
|
|
279
273
|
}
|
|
280
274
|
|
|
281
|
-
const formatSubHelp = (cli:
|
|
275
|
+
const formatSubHelp = (cli: Interaction["Service"], doc: HelpDoc) => {
|
|
282
276
|
const termCols = cli.terminal.columns;
|
|
283
|
-
return
|
|
277
|
+
return formatView(
|
|
284
278
|
<Box width={termCols}>
|
|
285
279
|
<SubHelp doc={doc} />
|
|
286
280
|
</Box>,
|
|
281
|
+
cli.terminal,
|
|
287
282
|
{ columns: termCols },
|
|
288
283
|
);
|
|
289
284
|
};
|
|
@@ -291,15 +286,16 @@ const formatSubHelp = (cli: CliKit["Service"], doc: HelpDoc) => {
|
|
|
291
286
|
/** Hide the logo entirely when it can't be at least this many columns wide. */
|
|
292
287
|
const MIN_LOGO_COLS = 20;
|
|
293
288
|
|
|
294
|
-
const formatRootHelp = (cli:
|
|
289
|
+
const formatRootHelp = (cli: Interaction["Service"], doc: HelpDoc) => {
|
|
295
290
|
const termCols = cli.terminal.columns;
|
|
296
291
|
|
|
297
292
|
// First pass: render the text alone to measure its exact footprint (post
|
|
298
293
|
// ANSI codes and wrapping), then size the logo into the leftover space.
|
|
299
|
-
const text =
|
|
294
|
+
const text = formatView(
|
|
300
295
|
<Box width={termCols}>
|
|
301
296
|
<SubHelp doc={doc} root />
|
|
302
297
|
</Box>,
|
|
298
|
+
cli.terminal,
|
|
303
299
|
{ columns: termCols },
|
|
304
300
|
);
|
|
305
301
|
|
|
@@ -318,7 +314,7 @@ const formatRootHelp = (cli: CliKit["Service"], doc: HelpDoc) => {
|
|
|
318
314
|
|
|
319
315
|
if (logoCols < MIN_LOGO_COLS) return text;
|
|
320
316
|
|
|
321
|
-
return
|
|
317
|
+
return formatView(
|
|
322
318
|
<Box flexDirection="row" width={termCols}>
|
|
323
319
|
<SubHelp doc={doc} root />
|
|
324
320
|
<Box flexGrow={1} flexDirection="column" justifyContent="center" alignItems="center">
|
|
@@ -333,17 +329,18 @@ const formatRootHelp = (cli: CliKit["Service"], doc: HelpDoc) => {
|
|
|
333
329
|
</Box>
|
|
334
330
|
</Box>
|
|
335
331
|
</Box>,
|
|
332
|
+
cli.terminal,
|
|
336
333
|
{ columns: termCols },
|
|
337
334
|
);
|
|
338
335
|
};
|
|
339
336
|
|
|
340
|
-
export const brandedCliFormatter = (cli:
|
|
337
|
+
export const brandedCliFormatter = (cli: Interaction["Service"]): CliOutput.Formatter => {
|
|
341
338
|
const fallback = CliOutput.defaultFormatter();
|
|
342
339
|
const glyphs = glyphsFor(cli.terminal.unicode);
|
|
343
340
|
const formatErrorLine = (message: string) =>
|
|
344
341
|
`${paint(ansiFg(theme.color.danger), `${glyphs.error} error:`)} ${message}`;
|
|
345
342
|
return {
|
|
346
|
-
|
|
343
|
+
formatCliError: fallback.formatCliError,
|
|
347
344
|
formatHelpDoc: (doc) =>
|
|
348
345
|
doc.usage.startsWith("alchemy <subcommand>")
|
|
349
346
|
? formatRootHelp(cli, doc)
|
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
*/
|
|
11
11
|
import { useMemo } from "@alchemy.run/sigil/react";
|
|
12
12
|
import type { JSX } from "react";
|
|
13
|
-
import { theme } from "
|
|
13
|
+
import { theme } from "../../../Util/Theme.ts";
|
|
14
14
|
import { Box, Text } from "../ui/index.ts";
|
|
15
15
|
|
|
16
16
|
const VIEWBOX = 24;
|
|
@@ -2,10 +2,14 @@
|
|
|
2
2
|
/** @jsxImportSource @alchemy.run/sigil */
|
|
3
3
|
import * as Effect from "effect/Effect";
|
|
4
4
|
import * as Exit from "effect/Exit";
|
|
5
|
+
import * as LogLevel from "effect/LogLevel";
|
|
6
|
+
import * as Match from "effect/Match";
|
|
7
|
+
import { onEvent, type Event } from "../../../Events.ts";
|
|
8
|
+
import { Interaction } from "../../../Interaction.ts";
|
|
5
9
|
import type { Result as NukeResult, Target } from "../../../Nuke.ts";
|
|
6
10
|
import type { ProviderMode } from "../../../ProviderMode.ts";
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
11
|
+
import { currentConsoleSettings } from "../../GlobalLog.ts";
|
|
12
|
+
import { present } from "../../Present.ts";
|
|
9
13
|
import {
|
|
10
14
|
LiveStore,
|
|
11
15
|
ProgressBar,
|
|
@@ -31,24 +35,25 @@ export class NukeProgressStore extends LiveStore<NukeProgressState> {
|
|
|
31
35
|
super({ total: 0, completed: 0, resources: 0, inFlight: [] });
|
|
32
36
|
}
|
|
33
37
|
|
|
34
|
-
emit(event:
|
|
35
|
-
this.update((state) =>
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
38
|
+
emit(event: Event) {
|
|
39
|
+
this.update((state) =>
|
|
40
|
+
Match.value(event).pipe(
|
|
41
|
+
Match.discriminators("type")({
|
|
42
|
+
"nuke.scan.started": (event) => ({ ...state, total: event.total }),
|
|
43
|
+
"nuke.scan.provider.started": (event) => ({
|
|
44
|
+
...state,
|
|
45
|
+
inFlight: [...state.inFlight, event.provider],
|
|
46
|
+
}),
|
|
47
|
+
"nuke.scan.provider.completed": (event) => ({
|
|
43
48
|
...state,
|
|
44
49
|
completed: state.completed + 1,
|
|
45
50
|
resources: state.resources + event.resources,
|
|
46
51
|
inFlight: state.inFlight.filter((id) => id !== event.provider),
|
|
47
|
-
}
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
+
}),
|
|
53
|
+
}),
|
|
54
|
+
Match.orElse(() => state),
|
|
55
|
+
),
|
|
56
|
+
);
|
|
52
57
|
}
|
|
53
58
|
}
|
|
54
59
|
|
|
@@ -92,31 +97,44 @@ export function NukeProgress({ store }: { store: NukeProgressStore }) {
|
|
|
92
97
|
);
|
|
93
98
|
}
|
|
94
99
|
|
|
95
|
-
const logNukeEvent = (event:
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
}
|
|
100
|
+
const logNukeEvent = (event: Event, interactive: boolean) =>
|
|
101
|
+
Match.value(event).pipe(
|
|
102
|
+
Match.discriminators("type")({
|
|
103
|
+
"nuke.scan.provider.completed": (event) =>
|
|
104
|
+
event.error !== undefined
|
|
105
|
+
? present(`${event.provider}: ${event.error}`, { level: "Warn" })
|
|
106
|
+
: interactive
|
|
107
|
+
? Effect.void
|
|
108
|
+
: present(`scanned ${event.provider} (${event.resources})`),
|
|
109
|
+
"nuke.resource.failed": (event) =>
|
|
110
|
+
present(`${event.provider} ${event.resource}: ${event.message}`, { level: "Warn" }),
|
|
111
|
+
"nuke.resource.deleted": (event) =>
|
|
112
|
+
interactive ? Effect.void : present(`deleted ${event.provider} ${event.resource}`),
|
|
113
|
+
}),
|
|
114
|
+
Match.orElse(() => Effect.void),
|
|
115
|
+
);
|
|
106
116
|
|
|
107
117
|
/** Scan progress stays separate until the inventory is ready to review. */
|
|
118
|
+
/**
|
|
119
|
+
* `--log-level debug` (or lower) streams debug records to the console; the
|
|
120
|
+
* live progress view would repaint over them, so it falls back to plain lines.
|
|
121
|
+
*/
|
|
122
|
+
const debugConsole = Effect.map(currentConsoleSettings, ({ floor }) =>
|
|
123
|
+
LogLevel.isLessThan(floor, "Info"),
|
|
124
|
+
);
|
|
125
|
+
|
|
108
126
|
export const renderNukeScan =
|
|
109
127
|
() =>
|
|
110
128
|
<A, E, R>(effect: Effect.Effect<A, E, R>) =>
|
|
111
129
|
Effect.gen(function* () {
|
|
112
|
-
const cli = yield*
|
|
130
|
+
const cli = yield* Interaction;
|
|
113
131
|
const store = new NukeProgressStore();
|
|
114
132
|
const live =
|
|
115
|
-
cli.terminal.input && !
|
|
116
|
-
? yield* cli.live
|
|
133
|
+
cli.terminal.input && !(yield* debugConsole)
|
|
134
|
+
? yield* cli.live(<NukeProgress store={store} />)
|
|
117
135
|
: undefined;
|
|
118
136
|
return yield* effect.pipe(
|
|
119
|
-
|
|
137
|
+
onEvent((event) =>
|
|
120
138
|
Effect.gen(function* () {
|
|
121
139
|
if (live) store.emit(event);
|
|
122
140
|
yield* logNukeEvent(event, live !== undefined);
|
|
@@ -128,28 +146,35 @@ export const renderNukeScan =
|
|
|
128
146
|
|
|
129
147
|
/** Drive the same resource rows used by the preview through their deletion lifecycle. */
|
|
130
148
|
export const renderNukeDelete =
|
|
131
|
-
(
|
|
149
|
+
(
|
|
150
|
+
targets: ReadonlyArray<Pick<Target, "key" | "providerId" | "displayName">>,
|
|
151
|
+
mode: ProviderMode,
|
|
152
|
+
) =>
|
|
132
153
|
<A extends NukeResult, E, R>(effect: Effect.Effect<A, E, R>) =>
|
|
133
154
|
Effect.gen(function* () {
|
|
134
|
-
const cli = yield*
|
|
155
|
+
const cli = yield* Interaction;
|
|
135
156
|
const tree = new PlanTree(nukePlan(targets, { mode }), {
|
|
136
157
|
mode: "apply",
|
|
137
158
|
label: "Deleting resources",
|
|
138
159
|
busy: true,
|
|
139
160
|
});
|
|
140
161
|
const live =
|
|
141
|
-
cli.terminal.input && !
|
|
142
|
-
? yield* cli.live
|
|
162
|
+
cli.terminal.input && !(yield* debugConsole)
|
|
163
|
+
? yield* cli.live(<Plan tree={tree} />, { persistOnClose: true })
|
|
143
164
|
: undefined;
|
|
144
165
|
return yield* effect.pipe(
|
|
145
|
-
|
|
146
|
-
Effect.
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
166
|
+
onEvent((event) =>
|
|
167
|
+
Effect.sync(() =>
|
|
168
|
+
Match.value(event).pipe(
|
|
169
|
+
Match.discriminators("type")({
|
|
170
|
+
"apply.resource.status": (event) => tree.emit(event),
|
|
171
|
+
"apply.resource.note": (event) => tree.emit(event),
|
|
172
|
+
"nuke.pass.started": (event) =>
|
|
173
|
+
tree.setLabel(`Deleting resources · pass ${event.pass}`),
|
|
174
|
+
}),
|
|
175
|
+
Match.orElse(() => undefined),
|
|
176
|
+
),
|
|
177
|
+
).pipe(Effect.andThen(logNukeEvent(event, live !== undefined))),
|
|
153
178
|
),
|
|
154
179
|
Effect.onExit((exit) =>
|
|
155
180
|
Effect.sync(() => {
|
|
@@ -170,13 +195,13 @@ export const renderNukeDelete =
|
|
|
170
195
|
|
|
171
196
|
/** Cloud inventory rows carry display identity only, never fabricated stack state. */
|
|
172
197
|
export const nukePlan = (
|
|
173
|
-
targets: ReadonlyArray<Pick<Target, "providerId" | "displayName">>,
|
|
198
|
+
targets: ReadonlyArray<Pick<Target, "key" | "providerId" | "displayName">>,
|
|
174
199
|
options: { mode: ProviderMode },
|
|
175
200
|
): PlanTreeData => ({
|
|
176
201
|
defaultMode: options.mode,
|
|
177
202
|
rows: targets
|
|
178
|
-
.map((target
|
|
179
|
-
key:
|
|
203
|
+
.map((target) => ({
|
|
204
|
+
key: target.key,
|
|
180
205
|
type: "resource" as const,
|
|
181
206
|
id: target.providerId,
|
|
182
207
|
resourceType: target.providerId,
|
|
@@ -203,14 +228,14 @@ export const nukePlan = (
|
|
|
203
228
|
});
|
|
204
229
|
|
|
205
230
|
export const reviewNuke = Effect.fn(function* (
|
|
206
|
-
targets: ReadonlyArray<Pick<Target, "providerId" | "displayName">>,
|
|
231
|
+
targets: ReadonlyArray<Pick<Target, "key" | "providerId" | "displayName">>,
|
|
207
232
|
options: {
|
|
208
233
|
mode: ProviderMode;
|
|
209
234
|
yes: boolean;
|
|
210
235
|
dryRun: boolean;
|
|
211
236
|
},
|
|
212
237
|
) {
|
|
213
|
-
const cli = yield*
|
|
238
|
+
const cli = yield* Interaction;
|
|
214
239
|
const plan = nukePlan(targets, options);
|
|
215
240
|
if (options.yes || options.dryRun) {
|
|
216
241
|
yield* cli.output.print(
|
|
@@ -226,7 +251,7 @@ export const reviewNuke = Effect.fn(function* (
|
|
|
226
251
|
);
|
|
227
252
|
return true;
|
|
228
253
|
}
|
|
229
|
-
return yield* cli.prompt.
|
|
254
|
+
return yield* cli.prompt.screen(
|
|
230
255
|
planDecisionScreen({
|
|
231
256
|
plan,
|
|
232
257
|
label: "Nuke",
|
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
/** @jsxImportSource @alchemy.run/sigil */
|
|
3
3
|
import { useMemo, useState } from "@alchemy.run/sigil/react";
|
|
4
4
|
import type { JSX } from "react";
|
|
5
|
+
import { Screen, type ScreenController } from "../../../Interaction.ts";
|
|
5
6
|
import type { Plan } from "../../../Plan.ts";
|
|
6
|
-
import { Screen, type ScreenController } from "../../CliKit/index.ts";
|
|
7
7
|
import { PromptFrame, ChoiceGroup, useKeyGlyphs, useTerminalInput } from "../ui/index.ts";
|
|
8
8
|
import type { PlanTreeData } from "./PlanTree.ts";
|
|
9
9
|
import { Plan as PlanComponent, PlanTree } from "./PlanView.tsx";
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
* namespaces through this component so they look like the same tree.
|
|
6
6
|
*/
|
|
7
7
|
import type { JSX } from "react";
|
|
8
|
-
import { theme } from "
|
|
8
|
+
import { theme } from "../../../Util/Theme.ts";
|
|
9
9
|
import { Row, Text, useGlyphs } from "../ui/index.ts";
|
|
10
10
|
import { actionStyle, type PlanAction } from "./statusStyle.ts";
|
|
11
11
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
+
import type { ApplyEvent, ApplyStatus, ResourceStatusChanged } from "../../../Events.ts";
|
|
1
2
|
import type { ActionApply, ActionDelete, CRUD, Plan } from "../../../Plan.ts";
|
|
2
3
|
import type { ProviderMode } from "../../../ProviderMode.ts";
|
|
3
|
-
import type { ApplyEvent, ApplyStatus, ResourceStatusChanged } from "../../../Report.ts";
|
|
4
4
|
import {
|
|
5
5
|
buildNamespaceTree,
|
|
6
6
|
buildPlanSummary,
|
|
@@ -313,7 +313,7 @@ export class PlanTree {
|
|
|
313
313
|
};
|
|
314
314
|
};
|
|
315
315
|
|
|
316
|
-
if (event.
|
|
316
|
+
if (event.type === "apply.resource.status") {
|
|
317
317
|
const current = tasks.get(key);
|
|
318
318
|
if (current) {
|
|
319
319
|
tasks.set(key, {
|
|
@@ -20,9 +20,9 @@
|
|
|
20
20
|
*/
|
|
21
21
|
import { useMemo, useSyncExternalStore } from "@alchemy.run/sigil/react";
|
|
22
22
|
import type { JSX, ReactNode } from "react";
|
|
23
|
+
import type { ApplyStatus } from "../../../Events.ts";
|
|
23
24
|
import type { Plan as AlchemyPlan } from "../../../Plan.ts";
|
|
24
|
-
import
|
|
25
|
-
import { theme } from "../../CliKit/index.ts";
|
|
25
|
+
import { theme } from "../../../Util/Theme.ts";
|
|
26
26
|
import { formatElapsed } from "../../Format.ts";
|
|
27
27
|
import { formatModeNote } from "../../ModeTag.ts";
|
|
28
28
|
import type { ActionVerb, PlanSummaryCounts } from "../../NamespaceTree.ts";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/** @jsxRuntime automatic */
|
|
2
2
|
/** @jsxImportSource @alchemy.run/sigil */
|
|
3
3
|
import type { JSX } from "react";
|
|
4
|
-
import { theme } from "
|
|
4
|
+
import { theme } from "../../../Util/Theme.ts";
|
|
5
5
|
import {
|
|
6
6
|
Box,
|
|
7
7
|
Gutter,
|
|
@@ -412,7 +412,7 @@ function CurrentProfile({
|
|
|
412
412
|
}
|
|
413
413
|
|
|
414
414
|
/**
|
|
415
|
-
* View builders consumed by `
|
|
415
|
+
* View builders consumed by `Interaction.output.print` and the interactive profile app.
|
|
416
416
|
*/
|
|
417
417
|
export const profileListNode = (profiles: ReadonlyArray<ProfileListDisplay>): JSX.Element => (
|
|
418
418
|
<ProfileList profiles={profiles} />
|
|
@@ -21,7 +21,8 @@ import * as Effect from "effect/Effect";
|
|
|
21
21
|
import * as Fiber from "effect/Fiber";
|
|
22
22
|
import * as Scheduler from "effect/Scheduler";
|
|
23
23
|
import type { JSX } from "react";
|
|
24
|
-
import {
|
|
24
|
+
import { Interaction, type NonInteractiveTerminal } from "../../../Interaction.ts";
|
|
25
|
+
import { theme } from "../../../Util/Theme.ts";
|
|
25
26
|
import {
|
|
26
27
|
Alert,
|
|
27
28
|
Box,
|
|
@@ -701,16 +702,16 @@ export interface DashboardSessionOptions<R> {
|
|
|
701
702
|
}
|
|
702
703
|
|
|
703
704
|
/**
|
|
704
|
-
* Runs the dashboard inside
|
|
705
|
-
* edit/refresh flows share the same frame, and the
|
|
705
|
+
* Runs the dashboard inside one Interaction session. Pure actions and
|
|
706
|
+
* edit/refresh flows share the same frame, and the session clears it on
|
|
706
707
|
* exit.
|
|
707
708
|
*/
|
|
708
709
|
export const runProfileDashboardSession = <R,>(
|
|
709
710
|
options: DashboardSessionOptions<R>,
|
|
710
|
-
): Effect.Effect<void, NonInteractiveTerminal, R |
|
|
711
|
-
Effect.flatMap(
|
|
712
|
-
cli.
|
|
713
|
-
// live
|
|
711
|
+
): Effect.Effect<void, NonInteractiveTerminal, R | Interaction> =>
|
|
712
|
+
Effect.flatMap(Interaction, (cli) =>
|
|
713
|
+
cli.session(
|
|
714
|
+
// live is Scope-bound; the session scope is its release backstop
|
|
714
715
|
// (the ensuring(live.close) below settles it on the normal path).
|
|
715
716
|
Effect.scoped(
|
|
716
717
|
Effect.gen(function* () {
|
|
@@ -760,7 +761,7 @@ export const runProfileDashboardSession = <R,>(
|
|
|
760
761
|
options.entries.findIndex((entry) => entry.name === options.selected),
|
|
761
762
|
);
|
|
762
763
|
|
|
763
|
-
const live = yield* cli.live
|
|
764
|
+
const live = yield* cli.live(
|
|
764
765
|
<Dashboard store={store} initialSelected={initialSelected} />,
|
|
765
766
|
{ placement: "beforeTranscript" },
|
|
766
767
|
);
|
|
@@ -812,10 +813,10 @@ export const runProfileDashboardSession = <R,>(
|
|
|
812
813
|
info: () => Effect.void,
|
|
813
814
|
success: () => Effect.void,
|
|
814
815
|
},
|
|
815
|
-
} satisfies
|
|
816
|
-
const result = yield* cli.
|
|
816
|
+
} satisfies Interaction["Service"];
|
|
817
|
+
const result = yield* cli.session(
|
|
817
818
|
action.kind === "refresh"
|
|
818
|
-
? flowEffect.pipe(Effect.provideService(
|
|
819
|
+
? flowEffect.pipe(Effect.provideService(Interaction, quietRefreshCli))
|
|
819
820
|
: flowEffect,
|
|
820
821
|
);
|
|
821
822
|
const entries = yield* options.reloadEntries;
|