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
package/src/Report.ts
CHANGED
|
@@ -1,277 +1,19 @@
|
|
|
1
|
+
import * as Cause from "effect/Cause";
|
|
1
2
|
import * as Context from "effect/Context";
|
|
2
3
|
import * as Effect from "effect/Effect";
|
|
4
|
+
import * as Exit from "effect/Exit";
|
|
5
|
+
import * as Option from "effect/Option";
|
|
6
|
+
import * as Scope from "effect/Scope";
|
|
7
|
+
import { onEvent, type ApplyEvent, type NoteKind } from "./Events.ts";
|
|
3
8
|
import type { NonInteractiveTerminal } from "./Interaction.ts";
|
|
4
9
|
import type { Plan } from "./Plan.ts";
|
|
5
|
-
import type { ProviderMode } from "./ProviderMode.ts";
|
|
6
10
|
|
|
7
|
-
// The
|
|
8
|
-
//
|
|
9
|
-
//
|
|
10
|
-
//
|
|
11
|
-
|
|
12
|
-
export type ApplyStatus =
|
|
13
|
-
| "attaching"
|
|
14
|
-
| "post-attach"
|
|
15
|
-
| "pending"
|
|
16
|
-
| "pre-creating"
|
|
17
|
-
| "creating"
|
|
18
|
-
| "creating replacement"
|
|
19
|
-
| "created"
|
|
20
|
-
| "updating"
|
|
21
|
-
| "updated"
|
|
22
|
-
| "adopting"
|
|
23
|
-
| "adopted"
|
|
24
|
-
| "deleting"
|
|
25
|
-
| "deleted"
|
|
26
|
-
| "orphaning"
|
|
27
|
-
| "orphaned"
|
|
28
|
-
| "replacing"
|
|
29
|
-
| "replaced"
|
|
30
|
-
// Action lifecycle (see {@link Action})
|
|
31
|
-
| "running"
|
|
32
|
-
| "ran"
|
|
33
|
-
| "skipped"
|
|
34
|
-
| "fail";
|
|
35
|
-
|
|
36
|
-
export type ApplyEvent = ResourceAnnotated | ResourceStatusChanged;
|
|
37
|
-
|
|
38
|
-
/**
|
|
39
|
-
* How append-only renderers surface a note (the interactive view treats every
|
|
40
|
-
* kind the same): `"status"` is transient spinner text that plain mode folds
|
|
41
|
-
* into the settle line's suffix, `"output"` is verbatim tool output streamed
|
|
42
|
-
* line by line, and `undefined` is a one-shot informational note.
|
|
43
|
-
*/
|
|
44
|
-
export type NoteKind = "status" | "output";
|
|
45
|
-
|
|
46
|
-
export interface ResourceAnnotated {
|
|
47
|
-
_tag: "apply.resource.note";
|
|
48
|
-
/** Fully-qualified resource or action name used to target its plan row. */
|
|
49
|
-
fqn: string;
|
|
50
|
-
id: string;
|
|
51
|
-
message: string;
|
|
52
|
-
kind?: NoteKind;
|
|
53
|
-
}
|
|
54
|
-
|
|
55
|
-
export interface ResourceStatusChanged {
|
|
56
|
-
_tag: "apply.resource.status";
|
|
57
|
-
/** Fully-qualified resource or action name used to target its plan row. */
|
|
58
|
-
fqn: string;
|
|
59
|
-
id: string; // resource id (e.g. "messages", "api")
|
|
60
|
-
type: string; // resource type (e.g. "AWS::Lambda::Function", "Cloudflare::Worker")
|
|
61
|
-
status: ApplyStatus;
|
|
62
|
-
message?: string; // optional details
|
|
63
|
-
/**
|
|
64
|
-
* The {@link ProviderMode} this node's provider was resolved for.
|
|
65
|
-
* `undefined` for mode-agnostic providers (a single implementation serves
|
|
66
|
-
* both dev and deploy) and for actions — renderers show nothing special.
|
|
67
|
-
*/
|
|
68
|
-
providerMode?: ProviderMode;
|
|
69
|
-
/**
|
|
70
|
-
* Set only on mode-switch replacements (local ⇄ live): the mode the OLD
|
|
71
|
-
* generation was created with, so renderers can annotate the transition
|
|
72
|
-
* (e.g. `local → live`). Always differs from `providerMode` when set.
|
|
73
|
-
*/
|
|
74
|
-
fromProviderMode?: ProviderMode;
|
|
75
|
-
}
|
|
76
|
-
|
|
77
|
-
/** One binding row on a planned resource. */
|
|
78
|
-
export interface PlannedBinding {
|
|
79
|
-
readonly sid: string;
|
|
80
|
-
readonly action: "create" | "update" | "delete" | "noop";
|
|
81
|
-
}
|
|
82
|
-
|
|
83
|
-
/** Serializable view of one resource row in a plan. */
|
|
84
|
-
export interface PlannedResource {
|
|
85
|
-
readonly fqn: string;
|
|
86
|
-
readonly logicalId: string;
|
|
87
|
-
readonly resourceType: string;
|
|
88
|
-
/** The action the plan decided for this resource. */
|
|
89
|
-
readonly action: "create" | "update" | "adopted" | "replace" | "delete" | "orphaned" | "noop";
|
|
90
|
-
/** Binding rows the node carries; empty when the resource has none. */
|
|
91
|
-
readonly bindings: ReadonlyArray<PlannedBinding>;
|
|
92
|
-
/** Mode the node's provider resolved for; absent for mode-agnostic providers. */
|
|
93
|
-
readonly providerMode?: ProviderMode;
|
|
94
|
-
/** On mode-switch replacements: the mode the old generation was created with. */
|
|
95
|
-
readonly fromProviderMode?: ProviderMode;
|
|
96
|
-
}
|
|
97
|
-
|
|
98
|
-
/** Serializable view of one stack-action row in a plan. */
|
|
99
|
-
export interface PlannedAction {
|
|
100
|
-
readonly fqn: string;
|
|
101
|
-
readonly logicalId: string;
|
|
102
|
-
readonly actionType: string;
|
|
103
|
-
readonly action: "run" | "delete" | "noop";
|
|
104
|
-
}
|
|
105
|
-
|
|
106
|
-
/**
|
|
107
|
-
* Emitted as a resource's diff begins. Diffs run with unbounded concurrency
|
|
108
|
-
* and may read the cloud (refresh, adoption), so a renderer that only sees
|
|
109
|
-
* completions freezes on the last *finished* node while the slow tail is
|
|
110
|
-
* still working — pairing starts with {@link ResourcePlanned} lets it show
|
|
111
|
-
* what is actually in flight.
|
|
112
|
-
*/
|
|
113
|
-
export interface ResourceDiffStarted {
|
|
114
|
-
readonly _tag: "plan.resource.started";
|
|
115
|
-
readonly fqn: string;
|
|
116
|
-
readonly logicalId: string;
|
|
117
|
-
readonly resourceType: string;
|
|
118
|
-
readonly total: number;
|
|
119
|
-
}
|
|
120
|
-
|
|
121
|
-
/** Emitted as the planner finishes diffing one resource. */
|
|
122
|
-
export interface ResourcePlanned extends PlannedResource {
|
|
123
|
-
readonly _tag: "plan.resource.completed";
|
|
124
|
-
/** How many of `total` resources have been diffed so far. */
|
|
125
|
-
readonly completed: number;
|
|
126
|
-
readonly total: number;
|
|
127
|
-
}
|
|
128
|
-
|
|
129
|
-
/** Emitted as the planner decides one stack action. */
|
|
130
|
-
export interface ActionPlanned extends PlannedAction {
|
|
131
|
-
readonly _tag: "plan.action.completed";
|
|
132
|
-
readonly completed: number;
|
|
133
|
-
readonly total: number;
|
|
134
|
-
}
|
|
135
|
-
|
|
136
|
-
/** Phases a stack plan moves through before it is ready. */
|
|
137
|
-
export type PlanningPhase =
|
|
138
|
-
| "importing-module"
|
|
139
|
-
| "resolving-services"
|
|
140
|
-
| "loading-state"
|
|
141
|
-
| "computing-plan"
|
|
142
|
-
| "plan-ready";
|
|
143
|
-
|
|
144
|
-
/**
|
|
145
|
-
* Emitted as the planning pipeline crosses a work boundary, by whoever owns
|
|
146
|
-
* that boundary: the session emits `importing-module`/`resolving-services`
|
|
147
|
-
* around the module import and service build, the engine emits
|
|
148
|
-
* `loading-state` (before the state service resolves — which may bootstrap
|
|
149
|
-
* a remote store — and the persisted rows are read) and `computing-plan`
|
|
150
|
-
* (once diffing begins), and the route emits `plan-ready`. Carries no
|
|
151
|
-
* display text — wording is the renderer's job.
|
|
152
|
-
*/
|
|
153
|
-
export interface PlanPhaseChanged {
|
|
154
|
-
readonly _tag: "plan.phase";
|
|
155
|
-
readonly phase: PlanningPhase;
|
|
156
|
-
}
|
|
157
|
-
|
|
158
|
-
/** A per-node planning event (one resource or action diffed). */
|
|
159
|
-
export type PlanNodeEvent = ResourceDiffStarted | ResourcePlanned | ActionPlanned;
|
|
160
|
-
|
|
161
|
-
export type PlanEvent = PlanPhaseChanged | PlanNodeEvent;
|
|
162
|
-
|
|
163
|
-
/**
|
|
164
|
-
* Emitted around a state-store bootstrap or upgrade (e.g. deploying the
|
|
165
|
-
* Cloudflare state-store worker on first use). Bootstrap happens lazily
|
|
166
|
-
* inside "loading state", can take many seconds, and would otherwise be
|
|
167
|
-
* invisible to renderers and traces.
|
|
168
|
-
*/
|
|
169
|
-
export interface StateBootstrapStarted {
|
|
170
|
-
readonly _tag: "state.bootstrap.started";
|
|
171
|
-
/** The store being bootstrapped (e.g. the worker script name). */
|
|
172
|
-
readonly store: string;
|
|
173
|
-
}
|
|
174
|
-
|
|
175
|
-
export interface StateBootstrapCompleted {
|
|
176
|
-
readonly _tag: "state.bootstrap.completed";
|
|
177
|
-
readonly store: string;
|
|
178
|
-
}
|
|
179
|
-
|
|
180
|
-
export type StateEvent = StateBootstrapStarted | StateBootstrapCompleted;
|
|
181
|
-
|
|
182
|
-
export interface NukeScanStarted {
|
|
183
|
-
readonly _tag: "nuke.scan.started";
|
|
184
|
-
readonly total: number;
|
|
185
|
-
}
|
|
186
|
-
|
|
187
|
-
export interface NukeProviderScanStarted {
|
|
188
|
-
readonly _tag: "nuke.scan.provider.started";
|
|
189
|
-
readonly provider: string;
|
|
190
|
-
}
|
|
191
|
-
|
|
192
|
-
export interface NukePassStarted {
|
|
193
|
-
readonly _tag: "nuke.pass.started";
|
|
194
|
-
readonly pass: number;
|
|
195
|
-
}
|
|
196
|
-
|
|
197
|
-
/** Emitted as a nuke scan finishes enumerating one provider's resources. */
|
|
198
|
-
export interface NukeProviderScanned {
|
|
199
|
-
readonly _tag: "nuke.scan.provider.completed";
|
|
200
|
-
readonly provider: string;
|
|
201
|
-
/** Resources found for this provider (0 when the listing failed). */
|
|
202
|
-
readonly resources: number;
|
|
203
|
-
/** Listing failure, reported immediately when this provider settles. */
|
|
204
|
-
readonly error?: string;
|
|
205
|
-
}
|
|
206
|
-
|
|
207
|
-
export interface NukeResourceDeleted {
|
|
208
|
-
readonly _tag: "nuke.resource.deleted";
|
|
209
|
-
readonly provider: string;
|
|
210
|
-
/** Display name of the deleted resource. */
|
|
211
|
-
readonly resource: string;
|
|
212
|
-
}
|
|
213
|
-
|
|
214
|
-
/** Emitted when a nuke deletion attempt fails (the run keeps going). */
|
|
215
|
-
export interface NukeResourceFailed {
|
|
216
|
-
readonly _tag: "nuke.resource.failed";
|
|
217
|
-
readonly provider: string;
|
|
218
|
-
readonly resource: string;
|
|
219
|
-
readonly message: string;
|
|
220
|
-
}
|
|
221
|
-
|
|
222
|
-
export type NukeEvent =
|
|
223
|
-
| NukeScanStarted
|
|
224
|
-
| NukeProviderScanStarted
|
|
225
|
-
| NukePassStarted
|
|
226
|
-
| NukeProviderScanned
|
|
227
|
-
| NukeResourceDeleted
|
|
228
|
-
| NukeResourceFailed;
|
|
229
|
-
|
|
230
|
-
export interface ProviderConfigureStarted {
|
|
231
|
-
readonly _tag: "provider.configure.started";
|
|
232
|
-
readonly provider: string;
|
|
233
|
-
}
|
|
234
|
-
|
|
235
|
-
export interface ProviderConfigureCompleted {
|
|
236
|
-
readonly _tag: "provider.configure.completed";
|
|
237
|
-
readonly provider: string;
|
|
238
|
-
}
|
|
239
|
-
|
|
240
|
-
export interface ProviderRefreshStarted {
|
|
241
|
-
readonly _tag: "provider.refresh.started";
|
|
242
|
-
readonly provider: string;
|
|
243
|
-
}
|
|
244
|
-
|
|
245
|
-
export interface ProviderRefreshCompleted {
|
|
246
|
-
readonly _tag: "provider.refresh.completed";
|
|
247
|
-
readonly provider: string;
|
|
248
|
-
}
|
|
249
|
-
|
|
250
|
-
export type ProviderEvent =
|
|
251
|
-
| ProviderConfigureStarted
|
|
252
|
-
| ProviderConfigureCompleted
|
|
253
|
-
| ProviderRefreshStarted
|
|
254
|
-
| ProviderRefreshCompleted;
|
|
255
|
-
|
|
256
|
-
/**
|
|
257
|
-
* Every progress event the engine and the Alchemist routes can report — one
|
|
258
|
-
* flat union, one `_tag` discriminator, tags namespaced `domain.subject.verb`.
|
|
259
|
-
*/
|
|
260
|
-
export type ProgressEvent = PlanEvent | ApplyEvent | StateEvent | NukeEvent | ProviderEvent;
|
|
261
|
-
|
|
262
|
-
export type ProgressReporter = (event: ProgressEvent) => Effect.Effect<void>;
|
|
263
|
-
|
|
264
|
-
/**
|
|
265
|
-
* The one ambient progress channel. Everything long-running — the planner's
|
|
266
|
-
* phase/node events, state-store bootstrap, nuke scans and deletions,
|
|
267
|
-
* provider configure/refresh — reports through it. Defaults to a no-op, so
|
|
268
|
-
* a caller that only wants the result provides nothing; a renderer provides
|
|
269
|
-
* its own handler for the events it wants to observe.
|
|
270
|
-
*/
|
|
271
|
-
export const Progress = Context.Reference<ProgressReporter>("alchemy/Progress", {
|
|
272
|
-
defaultValue: (): ProgressReporter => () => Effect.void,
|
|
273
|
-
});
|
|
11
|
+
// The presentation contract: the renderer interfaces a presentation layer
|
|
12
|
+
// (the bundled CLI, a custom renderer, tests) implements, and `renderApply`,
|
|
13
|
+
// which feeds a plan's apply events to the ambient one. The engine only
|
|
14
|
+
// emits events (Events.ts); nothing in here knows about terminals.
|
|
274
15
|
|
|
16
|
+
/** A renderer drawing one plan's apply, fed by {@link renderApply}. */
|
|
275
17
|
export interface PlanStatusSession {
|
|
276
18
|
emit: (event: ApplyEvent) => Effect.Effect<void>;
|
|
277
19
|
done: (outcome: "success" | "failure") => Effect.Effect<void>;
|
|
@@ -285,12 +27,6 @@ export interface PlanStatusSession {
|
|
|
285
27
|
close?: Effect.Effect<void>;
|
|
286
28
|
}
|
|
287
29
|
|
|
288
|
-
/** A session that drops everything — the default when no renderer is ambient. */
|
|
289
|
-
export const noopSession: PlanStatusSession = {
|
|
290
|
-
emit: () => Effect.void,
|
|
291
|
-
done: () => Effect.void,
|
|
292
|
-
};
|
|
293
|
-
|
|
294
30
|
export interface PlanningStatusSession {
|
|
295
31
|
update: (
|
|
296
32
|
label: string,
|
|
@@ -310,10 +46,29 @@ export interface PlanningStatusSession {
|
|
|
310
46
|
close: Effect.Effect<void>;
|
|
311
47
|
}
|
|
312
48
|
|
|
313
|
-
|
|
49
|
+
/**
|
|
50
|
+
* What a provider's lifecycle operation gets to report progress on its
|
|
51
|
+
* resource: each note is an `apply.resource.note` event.
|
|
52
|
+
*/
|
|
53
|
+
export interface ScopedPlanStatusSession {
|
|
314
54
|
note: (note: string, options?: { readonly kind?: NoteKind }) => Effect.Effect<void>;
|
|
315
55
|
}
|
|
316
56
|
|
|
57
|
+
/** The session for one resource: its notes go to `report` as events. */
|
|
58
|
+
export const resourceSession = (
|
|
59
|
+
report: (event: ApplyEvent) => Effect.Effect<void>,
|
|
60
|
+
fqn: string,
|
|
61
|
+
id: string,
|
|
62
|
+
): ScopedPlanStatusSession => ({
|
|
63
|
+
note: (message, options) =>
|
|
64
|
+
report({ type: "apply.resource.note", fqn, id, message, kind: options?.kind }),
|
|
65
|
+
});
|
|
66
|
+
|
|
67
|
+
/** A session that drops its notes, for calling a provider outside apply. */
|
|
68
|
+
export const noopSession: ScopedPlanStatusSession = {
|
|
69
|
+
note: () => Effect.void,
|
|
70
|
+
};
|
|
71
|
+
|
|
317
72
|
export interface PlanDisplayOptions {
|
|
318
73
|
/** Show declared resource inputs as structured YAML. */
|
|
319
74
|
detailed?: boolean;
|
|
@@ -341,3 +96,50 @@ export interface CLIService {
|
|
|
341
96
|
}
|
|
342
97
|
|
|
343
98
|
export class Cli extends Context.Service<Cli, CLIService>()("CLI") {}
|
|
99
|
+
|
|
100
|
+
/**
|
|
101
|
+
* Draw `effect`'s apply events through the ambient {@link Cli} renderer:
|
|
102
|
+
* plan rows, per-resource status and notes, then the outcome. Without a
|
|
103
|
+
* renderer the effect runs as-is; its events are still log records.
|
|
104
|
+
*/
|
|
105
|
+
export const renderApply =
|
|
106
|
+
(plan: Plan, options?: PlanDisplayOptions) =>
|
|
107
|
+
<A, E, R>(effect: Effect.Effect<A, E, R>) =>
|
|
108
|
+
Effect.flatMap(
|
|
109
|
+
Effect.serviceOption(Cli),
|
|
110
|
+
Option.match({
|
|
111
|
+
onNone: () => effect,
|
|
112
|
+
onSome: (cli) =>
|
|
113
|
+
Effect.gen(function* () {
|
|
114
|
+
const session = yield* cli.startApplySession(plan, options);
|
|
115
|
+
// Dev keeps the widget mounted after apply settles and parks in the
|
|
116
|
+
// ambient scope; bind the widget's teardown to that scope so a reload
|
|
117
|
+
// or Ctrl+C removes it instead of stacking it under the next one.
|
|
118
|
+
if (options?.dev && session.close !== undefined) {
|
|
119
|
+
const scope = yield* Effect.serviceOption(Scope.Scope);
|
|
120
|
+
if (Option.isSome(scope)) {
|
|
121
|
+
yield* Scope.addFinalizer(scope.value, session.close);
|
|
122
|
+
}
|
|
123
|
+
}
|
|
124
|
+
return yield* effect.pipe(
|
|
125
|
+
onEvent((event) =>
|
|
126
|
+
event.type === "apply.resource.status" || event.type === "apply.resource.note"
|
|
127
|
+
? session.emit(event)
|
|
128
|
+
: Effect.void,
|
|
129
|
+
),
|
|
130
|
+
Effect.tap((value) =>
|
|
131
|
+
options?.dev && session.setOutput !== undefined
|
|
132
|
+
? session.setOutput(value)
|
|
133
|
+
: Effect.void,
|
|
134
|
+
),
|
|
135
|
+
Effect.onExit((exit) =>
|
|
136
|
+
Exit.isSuccess(exit)
|
|
137
|
+
? session.done("success")
|
|
138
|
+
: Cause.hasInterruptsOnly(exit.cause)
|
|
139
|
+
? Effect.void
|
|
140
|
+
: session.done("failure"),
|
|
141
|
+
),
|
|
142
|
+
);
|
|
143
|
+
}),
|
|
144
|
+
}),
|
|
145
|
+
);
|
|
@@ -1,12 +1,27 @@
|
|
|
1
1
|
import type { Server } from "node:http";
|
|
2
2
|
import * as Cause from "effect/Cause";
|
|
3
3
|
import * as Context from "effect/Context";
|
|
4
|
+
import * as Data from "effect/Data";
|
|
4
5
|
import * as Deferred from "effect/Deferred";
|
|
5
6
|
import * as Effect from "effect/Effect";
|
|
6
7
|
import * as Exit from "effect/Exit";
|
|
7
8
|
import * as Fiber from "effect/Fiber";
|
|
8
9
|
import * as Scope from "effect/Scope";
|
|
9
10
|
|
|
11
|
+
export class ManagedHttpShutdownInvalidProps extends Data.TaggedError(
|
|
12
|
+
"ManagedHttpShutdownInvalidProps",
|
|
13
|
+
)<{
|
|
14
|
+
readonly message: string;
|
|
15
|
+
readonly cause?: unknown;
|
|
16
|
+
}> {}
|
|
17
|
+
|
|
18
|
+
export class ManagedHttpShutdownOperationFailed extends Data.TaggedError(
|
|
19
|
+
"ManagedHttpShutdownOperationFailed",
|
|
20
|
+
)<{
|
|
21
|
+
readonly message: string;
|
|
22
|
+
readonly cause?: unknown;
|
|
23
|
+
}> {}
|
|
24
|
+
|
|
10
25
|
/** Internal HTTP and dependency lifetimes, separate from managed run fibers. */
|
|
11
26
|
export class ManagedHttpShutdown extends Context.Service<
|
|
12
27
|
ManagedHttpShutdown,
|
|
@@ -59,9 +74,9 @@ export const withManagedHttpShutdown = (
|
|
|
59
74
|
) =>
|
|
60
75
|
Effect.gen(function* () {
|
|
61
76
|
if (!Number.isSafeInteger(timeoutMs) || timeoutMs <= 0 || timeoutMs > 300_000) {
|
|
62
|
-
return yield*
|
|
63
|
-
|
|
64
|
-
);
|
|
77
|
+
return yield* new ManagedHttpShutdownInvalidProps({
|
|
78
|
+
message: "ALCHEMY_FLY_SHUTDOWN_TIMEOUT_MS must be a positive integer at most 300000",
|
|
79
|
+
});
|
|
65
80
|
}
|
|
66
81
|
|
|
67
82
|
const signal = yield* Deferred.make<void>();
|
|
@@ -181,7 +196,9 @@ export const withManagedHttpShutdown = (
|
|
|
181
196
|
}
|
|
182
197
|
if (failures.length > 0) return yield* Effect.failCause(failures[0]!);
|
|
183
198
|
if (timedOut) {
|
|
184
|
-
return yield*
|
|
199
|
+
return yield* new ManagedHttpShutdownOperationFailed({
|
|
200
|
+
message: "Managed process drain deadline exceeded",
|
|
201
|
+
});
|
|
185
202
|
}
|
|
186
203
|
return interrupted;
|
|
187
204
|
}).pipe(Effect.scoped);
|
package/src/RuntimeContext.ts
CHANGED
|
@@ -143,7 +143,7 @@ export const packEnvValueKeepRedacted = (value: unknown): string | Redacted.Reda
|
|
|
143
143
|
Redacted.isRedacted(value) ? value.pipe(packEnvValue, Redacted.make) : packEnvValue(value);
|
|
144
144
|
|
|
145
145
|
// Only JSON's four whitespace characters may precede a valid JSON value.
|
|
146
|
-
const possibleJson = /^[\x20\t\r\n]*["{
|
|
146
|
+
const possibleJson = /^[\x20\t\r\n]*["{[0-9tfn-]/;
|
|
147
147
|
|
|
148
148
|
/**
|
|
149
149
|
* Parse an env-var string produced by {@link packEnvValue} back into its
|