alchemy 2.0.0-beta.84 → 2.0.0-beta.86
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/Action.d.ts.map +1 -1
- package/lib/Action.js.map +1 -1
- package/lib/ActionRuntimeContext.d.ts.map +1 -1
- package/lib/ActionRuntimeContext.js.map +1 -1
- 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 +45 -0
- package/lib/Alchemist/AuthRegistry.d.ts.map +1 -0
- package/lib/Alchemist/AuthRegistry.js +138 -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 +43 -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/State.d.ts +99 -0
- package/lib/Alchemist/State.d.ts.map +1 -0
- package/lib/Alchemist/State.js +172 -0
- 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/AlchemyContext.d.ts.map +1 -1
- package/lib/AlchemyContext.js.map +1 -1
- package/lib/Apply.d.ts +2 -8
- package/lib/Apply.d.ts.map +1 -1
- package/lib/Apply.js +372 -212
- package/lib/Apply.js.map +1 -1
- package/lib/Artifacts.d.ts.map +1 -1
- package/lib/Artifacts.js +7 -6
- package/lib/Artifacts.js.map +1 -1
- package/lib/Auth/AuthProvider.d.ts +31 -13
- package/lib/Auth/AuthProvider.d.ts.map +1 -1
- package/lib/Auth/AuthProvider.js +37 -14
- 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/CredentialsCache.d.ts.map +1 -1
- package/lib/Auth/CredentialsCache.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 +3 -2
- package/lib/Auth/Lock.d.ts.map +1 -1
- package/lib/Auth/Lock.js +7 -9
- package/lib/Auth/Lock.js.map +1 -1
- package/lib/Auth/OAuthFlow.d.ts +9 -12
- package/lib/Auth/OAuthFlow.d.ts.map +1 -1
- package/lib/Auth/OAuthFlow.js +35 -20
- package/lib/Auth/OAuthFlow.js.map +1 -1
- package/lib/Auth/OidcToken.d.ts.map +1 -1
- package/lib/Auth/OidcToken.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 +12 -1
- package/lib/Auth/Profile.d.ts.map +1 -1
- package/lib/Auth/Profile.js +22 -3
- package/lib/Auth/Profile.js.map +1 -1
- package/lib/Auth/ProfileMigrationV0.d.ts.map +1 -1
- package/lib/Auth/ProfileMigrationV0.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/Auth/index.d.ts.map +1 -1
- package/lib/Auth/index.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/BundleAnalyzerPlugin.d.ts.map +1 -1
- package/lib/Bundle/BundleAnalyzerPlugin.js.map +1 -1
- package/lib/Bundle/InstalledPackages.d.ts.map +1 -1
- package/lib/Bundle/InstalledPackages.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/PurePlugin.d.ts.map +1 -1
- package/lib/Bundle/PurePlugin.js.map +1 -1
- package/lib/Bundle/RawPlugin.d.ts.map +1 -1
- package/lib/Bundle/RawPlugin.js.map +1 -1
- package/lib/Bundle/TempRoot.d.ts.map +1 -1
- package/lib/Bundle/TempRoot.js.map +1 -1
- package/lib/Bundle/UnreachableChunksPlugin.d.ts.map +1 -1
- package/lib/Bundle/UnreachableChunksPlugin.js.map +1 -1
- package/lib/Bundle/Vite.d.ts.map +1 -1
- package/lib/Bundle/Vite.js.map +1 -1
- 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/Callback.d.ts.map +1 -1
- package/lib/Callback.js.map +1 -1
- package/lib/Cli/DevOptions.d.ts.map +1 -1
- package/lib/Cli/DevOptions.js.map +1 -1
- package/lib/Cli/Format.d.ts +3 -2
- package/lib/Cli/Format.d.ts.map +1 -1
- package/lib/Cli/Format.js +20 -11
- 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 +156 -61
- package/lib/Cli/GlobalLog.js.map +1 -1
- package/lib/Cli/JsonConsole.d.ts +12 -0
- package/lib/Cli/JsonConsole.d.ts.map +1 -0
- package/lib/Cli/JsonConsole.js +67 -0
- package/lib/Cli/JsonConsole.js.map +1 -0
- package/lib/Cli/LoggingCli.d.ts.map +1 -1
- package/lib/Cli/LoggingCli.js +32 -26
- package/lib/Cli/LoggingCli.js.map +1 -1
- package/lib/Cli/ModeTag.d.ts.map +1 -1
- package/lib/Cli/ModeTag.js.map +1 -1
- package/lib/Cli/NamespaceTree.d.ts.map +1 -1
- package/lib/Cli/NamespaceTree.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/PropertyDiff.d.ts.map +1 -1
- package/lib/Cli/PropertyDiff.js.map +1 -1
- package/lib/Cli/Reporter.d.ts.map +1 -1
- package/lib/Cli/Reporter.js.map +1 -1
- 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/compat.d.ts.map +1 -1
- package/lib/Cli/commands/compat.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 +45 -6
- package/lib/Cli/commands/dev.js.map +1 -1
- package/lib/Cli/commands/drift.d.ts +9 -2
- package/lib/Cli/commands/drift.d.ts.map +1 -1
- package/lib/Cli/commands/drift.js +28 -17
- 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 +6 -5
- package/lib/Cli/commands/errors.js.map +1 -1
- package/lib/Cli/commands/flags.d.ts.map +1 -1
- package/lib/Cli/commands/flags.js +3 -1
- package/lib/Cli/commands/flags.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 +23 -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 +23 -19
- 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/profile/index.d.ts.map +1 -1
- package/lib/Cli/commands/profile/index.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 +32 -5
- package/lib/Cli/commands/state.d.ts.map +1 -1
- package/lib/Cli/commands/state.js +230 -58
- 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/Data.d.ts.map +1 -1
- package/lib/Cli/components/ui/Data.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/Feedback.d.ts.map +1 -1
- package/lib/Cli/components/ui/Feedback.js.map +1 -1
- package/lib/Cli/components/ui/Interactive.d.ts +27 -5
- package/lib/Cli/components/ui/Interactive.d.ts.map +1 -1
- package/lib/Cli/components/ui/Interactive.js +12 -14
- 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/Live.d.ts +8 -1
- package/lib/Cli/components/ui/Live.d.ts.map +1 -1
- package/lib/Cli/components/ui/Live.js +46 -4
- package/lib/Cli/components/ui/Live.js.map +1 -1
- package/lib/Cli/components/ui/ProgramStatus.d.ts +13 -0
- package/lib/Cli/components/ui/ProgramStatus.d.ts.map +1 -0
- package/lib/Cli/components/ui/ProgramStatus.js +13 -0
- package/lib/Cli/components/ui/ProgramStatus.js.map +1 -0
- package/lib/Cli/components/ui/ProgressBar.d.ts.map +1 -1
- package/lib/Cli/components/ui/ProgressBar.js.map +1 -1
- package/lib/Cli/components/ui/Transcript.d.ts.map +1 -1
- package/lib/Cli/components/ui/Transcript.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 +3 -2
- package/lib/Cli/components/ui/index.d.ts.map +1 -1
- package/lib/Cli/components/ui/index.js +3 -2
- package/lib/Cli/components/ui/index.js.map +1 -1
- 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 +4 -2
- 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 +11 -8
- package/lib/Cli/components/view/Help.js.map +1 -1
- package/lib/Cli/components/view/Logo.d.ts.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 +2 -2
- package/lib/Cli/components/view/PlanDecision.js.map +1 -1
- package/lib/Cli/components/view/PlanRow.d.ts.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 +4 -2
- package/lib/Cli/components/view/PlanTree.d.ts.map +1 -1
- package/lib/Cli/components/view/PlanTree.js +4 -3
- package/lib/Cli/components/view/PlanTree.js.map +1 -1
- package/lib/Cli/components/view/PlanView.d.ts.map +1 -1
- package/lib/Cli/components/view/PlanView.js +5 -5
- 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.d.ts.map +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 +140 -218
- 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 +11 -10
- package/lib/Cli/components/view/SigilCli.js.map +1 -1
- package/lib/Cli/components/view/StackOutputs.d.ts.map +1 -1
- package/lib/Cli/components/view/StackOutputs.js +2 -2
- package/lib/Cli/components/view/StackOutputs.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/components/view/usePlanPresentation.d.ts.map +1 -1
- package/lib/Cli/components/view/usePlanPresentation.js +13 -1
- package/lib/Cli/components/view/usePlanPresentation.js.map +1 -1
- package/lib/Cli/components/view/usePlanViewport.d.ts.map +1 -1
- package/lib/Cli/components/view/usePlanViewport.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 +33 -35
- package/lib/Cli/exec.js.map +1 -1
- package/lib/Cli/index.d.ts.map +1 -1
- package/lib/Cli/index.js.map +1 -1
- package/lib/Cli/main.d.ts.map +1 -1
- package/lib/Cli/main.js +43 -29
- package/lib/Cli/main.js.map +1 -1
- package/lib/Cli/selectCli.d.ts +13 -3
- package/lib/Cli/selectCli.d.ts.map +1 -1
- package/lib/Cli/selectCli.js +39 -6
- package/lib/Cli/selectCli.js.map +1 -1
- package/lib/Command/Build.d.ts.map +1 -1
- package/lib/Command/Build.js.map +1 -1
- package/lib/Command/Command.d.ts.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/Exec.d.ts.map +1 -1
- package/lib/Command/Exec.js.map +1 -1
- package/lib/Command/Local.d.ts +1 -1
- package/lib/Command/Local.d.ts.map +1 -1
- package/lib/Command/Local.js.map +1 -1
- package/lib/Command/Memo.d.ts.map +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/Command/Providers.js.map +1 -1
- package/lib/Command/Redaction.d.ts.map +1 -1
- package/lib/Command/Redaction.js.map +1 -1
- package/lib/Command/index.d.ts.map +1 -1
- package/lib/Command/index.js.map +1 -1
- package/lib/Contributions.d.ts +83 -23
- package/lib/Contributions.d.ts.map +1 -1
- package/lib/Contributions.js +48 -8
- package/lib/Contributions.js.map +1 -1
- package/lib/DNS/Adapter.d.ts +206 -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/Dependencies.d.ts.map +1 -1
- package/lib/Dependencies.js.map +1 -1
- 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 +192 -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 +220 -0
- package/lib/Events.d.ts.map +1 -0
- package/lib/Events.js +276 -0
- package/lib/Events.js.map +1 -0
- package/lib/FQN.d.ts.map +1 -1
- package/lib/FQN.js.map +1 -1
- package/lib/Http.d.ts.map +1 -1
- package/lib/Http.js.map +1 -1
- package/lib/Input.d.ts.map +1 -1
- package/lib/Input.js.map +1 -1
- package/lib/InstanceId.d.ts.map +1 -1
- package/lib/InstanceId.js.map +1 -1
- package/lib/Interaction.d.ts +166 -48
- package/lib/Interaction.d.ts.map +1 -1
- package/lib/Interaction.js +160 -63
- package/lib/Interaction.js.map +1 -1
- package/lib/KeyPair.d.ts.map +1 -1
- package/lib/KeyPair.js.map +1 -1
- package/lib/Local/DockerHostGateway.d.ts.map +1 -1
- package/lib/Local/DockerHostGateway.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/ProviderLayer.d.ts.map +1 -1
- package/lib/Local/ProviderLayer.js.map +1 -1
- package/lib/Local/RpcProvider.d.ts +2 -2
- 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 +36 -11
- package/lib/Local/RpcSerialization.js.map +1 -1
- package/lib/Local/RpcServer.d.ts +8 -2
- package/lib/Local/RpcServer.d.ts.map +1 -1
- package/lib/Local/RpcServer.js +26 -15
- package/lib/Local/RpcServer.js.map +1 -1
- package/lib/Local/RpcServerBun.d.ts.map +1 -1
- package/lib/Local/RpcServerBun.js +16 -6
- 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 +23 -4
- 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 +8 -8
- package/lib/Local/RpcSpawner.d.ts.map +1 -1
- package/lib/Local/RpcSpawner.js +67 -51
- package/lib/Local/RpcSpawner.js.map +1 -1
- package/lib/Local/RpcToken.d.ts +24 -0
- package/lib/Local/RpcToken.d.ts.map +1 -0
- package/lib/Local/RpcToken.js +62 -0
- package/lib/Local/RpcToken.js.map +1 -0
- package/lib/Local/Sidecar.d.ts +23 -0
- package/lib/Local/Sidecar.d.ts.map +1 -1
- package/lib/Local/Sidecar.js +23 -9
- package/lib/Local/Sidecar.js.map +1 -1
- package/lib/Mount.d.ts +76 -0
- package/lib/Mount.d.ts.map +1 -0
- package/lib/Mount.js +43 -0
- package/lib/Mount.js.map +1 -0
- package/lib/Named.d.ts.map +1 -1
- package/lib/Named.js.map +1 -1
- package/lib/Namespace.d.ts.map +1 -1
- package/lib/Namespace.js.map +1 -1
- package/lib/Nuke.d.ts +5 -23
- package/lib/Nuke.d.ts.map +1 -1
- package/lib/Nuke.js +49 -14
- package/lib/Nuke.js.map +1 -1
- package/lib/Output.d.ts +44 -3
- package/lib/Output.d.ts.map +1 -1
- package/lib/Output.js +144 -9
- package/lib/Output.js.map +1 -1
- package/lib/Phase.d.ts +2 -1
- package/lib/Phase.d.ts.map +1 -1
- package/lib/Phase.js.map +1 -1
- package/lib/PhysicalName.d.ts.map +1 -1
- package/lib/PhysicalName.js.map +1 -1
- package/lib/Plan.d.ts +23 -2
- package/lib/Plan.d.ts.map +1 -1
- package/lib/Plan.js +519 -183
- package/lib/Plan.js.map +1 -1
- package/lib/Platform.d.ts +5 -1
- package/lib/Platform.d.ts.map +1 -1
- package/lib/Platform.js +41 -10
- package/lib/Platform.js.map +1 -1
- package/lib/Provider.d.ts +84 -13
- package/lib/Provider.d.ts.map +1 -1
- package/lib/Provider.js +2 -2
- package/lib/Provider.js.map +1 -1
- package/lib/ProviderMode.d.ts.map +1 -1
- package/lib/ProviderMode.js.map +1 -1
- package/lib/Random.d.ts +1 -1
- package/lib/Random.d.ts.map +1 -1
- package/lib/Random.js.map +1 -1
- package/lib/Ref.d.ts.map +1 -1
- package/lib/Ref.js.map +1 -1
- package/lib/RemovalPolicy.d.ts +53 -2
- package/lib/RemovalPolicy.d.ts.map +1 -1
- package/lib/RemovalPolicy.js +43 -1
- package/lib/RemovalPolicy.js.map +1 -1
- package/lib/Rename.d.ts.map +1 -1
- package/lib/Rename.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/Resource.d.ts +72 -7
- package/lib/Resource.d.ts.map +1 -1
- package/lib/Resource.js +60 -2
- package/lib/Resource.js.map +1 -1
- package/lib/ResourceContext.d.ts.map +1 -1
- package/lib/ResourceContext.js.map +1 -1
- package/lib/ResourceSelection.d.ts.map +1 -1
- package/lib/ResourceSelection.js.map +1 -1
- package/lib/Rpc.d.ts +19 -0
- package/lib/Rpc.d.ts.map +1 -1
- package/lib/Rpc.js +62 -8
- package/lib/Rpc.js.map +1 -1
- package/lib/Runtime/Bootstrap.d.ts +6 -7
- package/lib/Runtime/Bootstrap.d.ts.map +1 -1
- package/lib/Runtime/Bootstrap.js +6 -10
- package/lib/Runtime/Bootstrap.js.map +1 -1
- package/lib/Runtime/ExecutionMemo.d.ts.map +1 -1
- package/lib/Runtime/ExecutionMemo.js.map +1 -1
- package/lib/Runtime/Function.d.ts.map +1 -1
- package/lib/Runtime/Function.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/Runtime/Process.d.ts +5 -0
- package/lib/Runtime/Process.d.ts.map +1 -1
- package/lib/Runtime/Process.js +36 -1
- package/lib/Runtime/Process.js.map +1 -1
- package/lib/Runtime.d.ts.map +1 -1
- package/lib/Runtime.js.map +1 -1
- package/lib/RuntimeContext.d.ts +29 -0
- package/lib/RuntimeContext.d.ts.map +1 -1
- package/lib/RuntimeContext.js +5 -1
- package/lib/RuntimeContext.js.map +1 -1
- package/lib/Sandbox.d.ts +144 -0
- package/lib/Sandbox.d.ts.map +1 -0
- package/lib/Sandbox.js +14 -0
- package/lib/Sandbox.js.map +1 -0
- package/lib/SandboxAgent.d.ts +55 -0
- package/lib/SandboxAgent.d.ts.map +1 -0
- package/lib/SandboxAgent.js +385 -0
- package/lib/SandboxAgent.js.map +1 -0
- package/lib/SandboxAgentClient.d.ts +154 -0
- package/lib/SandboxAgentClient.d.ts.map +1 -0
- package/lib/SandboxAgentClient.js +174 -0
- package/lib/SandboxAgentClient.js.map +1 -0
- package/lib/Schema.d.ts.map +1 -1
- package/lib/Schema.js.map +1 -1
- package/lib/Secrets/DotEnv.d.ts.map +1 -1
- package/lib/Secrets/DotEnv.js.map +1 -1
- package/lib/Secrets/Log.d.ts.map +1 -1
- package/lib/Secrets/Log.js.map +1 -1
- package/lib/Secrets/ProcessEnv.d.ts.map +1 -1
- package/lib/Secrets/ProcessEnv.js.map +1 -1
- package/lib/Secrets/Provider.d.ts +2 -1
- package/lib/Secrets/Provider.d.ts.map +1 -1
- package/lib/Secrets/Provider.js.map +1 -1
- package/lib/Secrets/index.d.ts.map +1 -1
- package/lib/Secrets/index.js.map +1 -1
- package/lib/Self.d.ts.map +1 -1
- package/lib/Self.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/StackContext.d.ts.map +1 -1
- package/lib/StackContext.js.map +1 -1
- package/lib/Stage.d.ts.map +1 -1
- package/lib/Stage.js.map +1 -1
- package/lib/State/ActionState.d.ts.map +1 -1
- package/lib/State/ActionState.js.map +1 -1
- package/lib/State/BucketState.d.ts +2 -1
- package/lib/State/BucketState.d.ts.map +1 -1
- package/lib/State/BucketState.js +52 -21
- package/lib/State/BucketState.js.map +1 -1
- package/lib/State/Export.d.ts.map +1 -1
- package/lib/State/Export.js.map +1 -1
- package/lib/State/HttpStateApi.d.ts.map +1 -1
- package/lib/State/HttpStateApi.js.map +1 -1
- package/lib/State/HttpStateStore.d.ts.map +1 -1
- package/lib/State/HttpStateStore.js.map +1 -1
- package/lib/State/InMemoryState.d.ts.map +1 -1
- package/lib/State/InMemoryState.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 +7 -1
- package/lib/State/Provisioning.d.ts.map +1 -1
- package/lib/State/Provisioning.js +6 -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/ResourceState.js.map +1 -1
- package/lib/State/State.d.ts +26 -0
- package/lib/State/State.d.ts.map +1 -1
- package/lib/State/State.js.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/Sync.d.ts.map +1 -1
- package/lib/State/Sync.js.map +1 -1
- package/lib/State/Tree.d.ts.map +1 -1
- package/lib/State/Tree.js.map +1 -1
- package/lib/State/index.d.ts.map +1 -1
- package/lib/State/index.js +2 -2
- package/lib/State/index.js.map +1 -1
- package/lib/Tags.d.ts.map +1 -1
- package/lib/Tags.js.map +1 -1
- package/lib/Telemetry/Attributes.d.ts.map +1 -1
- package/lib/Telemetry/Attributes.js +1 -0
- package/lib/Telemetry/Attributes.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/Telemetry/Metrics.js.map +1 -1
- package/lib/Telemetry.d.ts.map +1 -1
- package/lib/Telemetry.js.map +1 -1
- package/lib/TelemetryRelay.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/UserFacingError.d.ts.map +1 -1
- package/lib/UserFacingError.js.map +1 -1
- package/lib/Util/AtomicFile.d.ts.map +1 -1
- package/lib/Util/AtomicFile.js +3 -2
- package/lib/Util/AtomicFile.js.map +1 -1
- package/lib/Util/BatchedSink.d.ts.map +1 -1
- package/lib/Util/BatchedSink.js.map +1 -1
- package/lib/Util/ConfigProvider.d.ts.map +1 -1
- package/lib/Util/ConfigProvider.js +1 -0
- package/lib/Util/ConfigProvider.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 +56 -14
- package/lib/Util/ConsoleSink.js.map +1 -1
- package/lib/Util/Duration.d.ts.map +1 -1
- package/lib/Util/Duration.js.map +1 -1
- package/lib/Util/Http1Dispatcher.d.ts.map +1 -1
- package/lib/Util/Http1Dispatcher.js.map +1 -1
- package/lib/Util/Ignore.d.ts +3 -1
- package/lib/Util/Ignore.d.ts.map +1 -1
- package/lib/Util/Ignore.js +20 -11
- package/lib/Util/Ignore.js.map +1 -1
- package/lib/Util/LineBuffer.d.ts.map +1 -1
- package/lib/Util/LineBuffer.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/Memoize.d.ts.map +1 -1
- package/lib/Util/Memoize.js.map +1 -1
- 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 +18 -3
- package/lib/Util/PlatformServices.js.map +1 -1
- package/lib/Util/Redaction.d.ts.map +1 -1
- package/lib/Util/Redaction.js.map +1 -1
- package/lib/Util/ResourceOutput.d.ts +22 -11
- package/lib/Util/ResourceOutput.d.ts.map +1 -1
- package/lib/Util/ResourceOutput.js +28 -26
- 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/Stream.d.ts.map +1 -1
- package/lib/Util/Stream.js.map +1 -1
- package/lib/Util/Terminal.d.ts +23 -12
- package/lib/Util/Terminal.d.ts.map +1 -1
- package/lib/Util/Terminal.js +26 -45
- package/lib/Util/Terminal.js.map +1 -1
- package/lib/Util/Theme.d.ts.map +1 -1
- package/lib/Util/Theme.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/base32.d.ts.map +1 -1
- package/lib/Util/base32.js.map +1 -1
- 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/camel.d.ts.map +1 -1
- package/lib/Util/camel.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/dedent.d.ts.map +1 -1
- package/lib/Util/dedent.js.map +1 -1
- package/lib/Util/effect.d.ts.map +1 -1
- package/lib/Util/effect.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/exec.d.ts.map +1 -1
- package/lib/Util/exec.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/index.d.ts.map +1 -1
- package/lib/Util/index.js.map +1 -1
- package/lib/Util/interactive.d.ts.map +1 -1
- package/lib/Util/interactive.js +1 -1
- package/lib/Util/interactive.js.map +1 -1
- package/lib/Util/ip-address.d.ts.map +1 -1
- package/lib/Util/ip-address.js.map +1 -1
- package/lib/Util/isPathWithin.d.ts.map +1 -1
- package/lib/Util/isPathWithin.js.map +1 -1
- package/lib/Util/layer-scoped.d.ts.map +1 -1
- package/lib/Util/layer-scoped.js.map +1 -1
- package/lib/Util/md5.d.ts.map +1 -1
- package/lib/Util/md5.js.map +1 -1
- package/lib/Util/poll.d.ts.map +1 -1
- package/lib/Util/poll.js.map +1 -1
- package/lib/Util/scc.d.ts +7 -1
- package/lib/Util/scc.d.ts.map +1 -1
- package/lib/Util/scc.js +16 -15
- package/lib/Util/scc.js.map +1 -1
- package/lib/Util/service.d.ts.map +1 -1
- package/lib/Util/service.js.map +1 -1
- package/lib/Util/sha256.d.ts.map +1 -1
- package/lib/Util/sha256.js.map +1 -1
- package/lib/Util/stable.d.ts.map +1 -1
- package/lib/Util/stable.js.map +1 -1
- package/lib/Util/tarGzip.d.ts +2 -1
- package/lib/Util/tarGzip.d.ts.map +1 -1
- package/lib/Util/tarGzip.js.map +1 -1
- package/lib/Util/type.d.ts.map +1 -1
- package/lib/Util/type.js.map +1 -1
- package/lib/Util/types.d.ts.map +1 -1
- package/lib/Util/types.js.map +1 -1
- package/lib/Util/unknown.d.ts.map +1 -1
- package/lib/Util/unknown.js.map +1 -1
- package/lib/Util/zip.d.ts.map +1 -1
- package/lib/Util/zip.js.map +1 -1
- package/lib/WebhookHost.d.ts.map +1 -1
- package/lib/WebhookHost.js.map +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/Website/FrontendCore.d.ts.map +1 -1
- package/lib/Website/FrontendCore.js.map +1 -1
- package/lib/Website/Server.d.ts.map +1 -1
- package/lib/Website/Server.js +11 -1
- package/lib/Website/Server.js.map +1 -1
- package/lib/Website/ServerLocal.d.ts.map +1 -1
- package/lib/Website/ServerLocal.js.map +1 -1
- package/lib/Website/assets.d.ts.map +1 -1
- package/lib/Website/assets.js.map +1 -1
- package/lib/Website/packExtraFiles.d.ts.map +1 -1
- package/lib/Website/packExtraFiles.js.map +1 -1
- package/lib/Workers/DurableObject.d.ts +118 -0
- package/lib/Workers/DurableObject.d.ts.map +1 -0
- package/lib/Workers/DurableObject.js +146 -0
- package/lib/Workers/DurableObject.js.map +1 -0
- package/lib/Workers/DurableObjectBridge.d.ts +100 -0
- package/lib/Workers/DurableObjectBridge.d.ts.map +1 -0
- package/lib/Workers/DurableObjectBridge.js +146 -0
- package/lib/Workers/DurableObjectBridge.js.map +1 -0
- package/lib/Workers/DurableObjectEngine.d.ts +51 -0
- package/lib/Workers/DurableObjectEngine.d.ts.map +1 -0
- package/lib/Workers/DurableObjectEngine.js +331 -0
- package/lib/Workers/DurableObjectEngine.js.map +1 -0
- package/lib/Workers/EffectRpc.d.ts +25 -0
- package/lib/Workers/EffectRpc.d.ts.map +1 -0
- package/lib/Workers/EffectRpc.js +25 -0
- package/lib/Workers/EffectRpc.js.map +1 -0
- package/lib/Workers/EventLifetime.d.ts +57 -0
- package/lib/Workers/EventLifetime.d.ts.map +1 -0
- package/lib/Workers/EventLifetime.js +73 -0
- package/lib/Workers/EventLifetime.js.map +1 -0
- package/lib/Workers/InputGate.d.ts +107 -0
- package/lib/Workers/InputGate.d.ts.map +1 -0
- package/lib/Workers/InputGate.js +183 -0
- package/lib/Workers/InputGate.js.map +1 -0
- package/lib/Workers/RpcWebSocketClient.d.ts +30 -0
- package/lib/Workers/RpcWebSocketClient.d.ts.map +1 -0
- package/lib/Workers/RpcWebSocketClient.js +25 -0
- package/lib/Workers/RpcWebSocketClient.js.map +1 -0
- package/lib/Workers/Worker.d.ts +80 -0
- package/lib/Workers/Worker.d.ts.map +1 -0
- package/lib/Workers/Worker.js +150 -0
- package/lib/Workers/Worker.js.map +1 -0
- package/lib/Workers/WorkerBridge.d.ts +70 -0
- package/lib/Workers/WorkerBridge.d.ts.map +1 -0
- package/lib/Workers/WorkerBridge.js +91 -0
- package/lib/Workers/WorkerBridge.js.map +1 -0
- package/lib/Workers/WorkerEnvironment.d.ts +10 -0
- package/lib/Workers/WorkerEnvironment.d.ts.map +1 -0
- package/lib/Workers/WorkerEnvironment.js +8 -0
- package/lib/Workers/WorkerEnvironment.js.map +1 -0
- package/lib/Workers/Workerd/AlarmCallback.d.ts +26 -0
- package/lib/Workers/Workerd/AlarmCallback.d.ts.map +1 -0
- package/lib/Workers/Workerd/AlarmCallback.js +343 -0
- package/lib/Workers/Workerd/AlarmCallback.js.map +1 -0
- package/lib/Workers/Workerd/Bundle.d.ts +82 -0
- package/lib/Workers/Workerd/Bundle.d.ts.map +1 -0
- package/lib/Workers/Workerd/Bundle.js +166 -0
- package/lib/Workers/Workerd/Bundle.js.map +1 -0
- package/lib/Workers/Workerd/DurableObjectAlarmStorage.d.ts +14 -0
- package/lib/Workers/Workerd/DurableObjectAlarmStorage.d.ts.map +1 -0
- package/lib/Workers/Workerd/DurableObjectAlarmStorage.js +84 -0
- package/lib/Workers/Workerd/DurableObjectAlarmStorage.js.map +1 -0
- package/lib/Workers/Workerd/DurableObjectBridge.d.ts +50 -0
- package/lib/Workers/Workerd/DurableObjectBridge.d.ts.map +1 -0
- package/lib/Workers/Workerd/DurableObjectBridge.js +77 -0
- package/lib/Workers/Workerd/DurableObjectBridge.js.map +1 -0
- package/lib/Workers/Workerd/DurableObjectState.d.ts +92 -0
- package/lib/Workers/Workerd/DurableObjectState.d.ts.map +1 -0
- package/lib/Workers/Workerd/DurableObjectState.js +39 -0
- package/lib/Workers/Workerd/DurableObjectState.js.map +1 -0
- package/lib/Workers/Workerd/DurableObjectStorage.d.ts +89 -0
- package/lib/Workers/Workerd/DurableObjectStorage.d.ts.map +1 -0
- package/lib/Workers/Workerd/DurableObjectStorage.js +248 -0
- package/lib/Workers/Workerd/DurableObjectStorage.js.map +1 -0
- package/lib/Workers/Workerd/DurableObjectTransactionContext.d.ts +13 -0
- package/lib/Workers/Workerd/DurableObjectTransactionContext.d.ts.map +1 -0
- package/lib/Workers/Workerd/DurableObjectTransactionContext.js +5 -0
- package/lib/Workers/Workerd/DurableObjectTransactionContext.js.map +1 -0
- package/lib/Workers/Workerd/HttpServer.d.ts +12 -0
- package/lib/Workers/Workerd/HttpServer.d.ts.map +1 -0
- package/lib/Workers/Workerd/HttpServer.js +104 -0
- package/lib/Workers/Workerd/HttpServer.js.map +1 -0
- package/lib/Workers/Workerd/Module.d.ts +14 -0
- package/lib/Workers/Workerd/Module.d.ts.map +1 -0
- package/lib/Workers/Workerd/Module.js +23 -0
- package/lib/Workers/Workerd/Module.js.map +1 -0
- package/lib/Workers/Workerd/Request.d.ts +6 -0
- package/lib/Workers/Workerd/Request.d.ts.map +1 -0
- package/lib/Workers/Workerd/Request.js +4 -0
- package/lib/Workers/Workerd/Request.js.map +1 -0
- package/lib/Workers/Workerd/RpcDurableObject.d.ts +18 -0
- package/lib/Workers/Workerd/RpcDurableObject.d.ts.map +1 -0
- package/lib/Workers/Workerd/RpcDurableObject.js +66 -0
- package/lib/Workers/Workerd/RpcDurableObject.js.map +1 -0
- package/lib/Workers/Workerd/RpcWebSocket.d.ts +25 -0
- package/lib/Workers/Workerd/RpcWebSocket.d.ts.map +1 -0
- package/lib/Workers/Workerd/RpcWebSocket.js +248 -0
- package/lib/Workers/Workerd/RpcWebSocket.js.map +1 -0
- package/lib/Workers/Workerd/ScheduledEvents.d.ts +22 -0
- package/lib/Workers/Workerd/ScheduledEvents.d.ts.map +1 -0
- package/lib/Workers/Workerd/ScheduledEvents.js +119 -0
- package/lib/Workers/Workerd/ScheduledEvents.js.map +1 -0
- package/lib/Workers/Workerd/WebSocket.d.ts +71 -0
- package/lib/Workers/Workerd/WebSocket.d.ts.map +1 -0
- package/lib/Workers/Workerd/WebSocket.js +66 -0
- package/lib/Workers/Workerd/WebSocket.js.map +1 -0
- package/lib/Workers/Workerd/WorkerBridge.d.ts +41 -0
- package/lib/Workers/Workerd/WorkerBridge.d.ts.map +1 -0
- package/lib/Workers/Workerd/WorkerBridge.js +80 -0
- package/lib/Workers/Workerd/WorkerBridge.js.map +1 -0
- package/lib/Workers/Workerd/WorkerEvent.d.ts +18 -0
- package/lib/Workers/Workerd/WorkerEvent.d.ts.map +1 -0
- package/lib/Workers/Workerd/WorkerEvent.js +12 -0
- package/lib/Workers/Workerd/WorkerEvent.js.map +1 -0
- package/lib/Workers/Workerd/WorkerModulePlugin.d.ts +23 -0
- package/lib/Workers/Workerd/WorkerModulePlugin.d.ts.map +1 -0
- package/lib/Workers/Workerd/WorkerModulePlugin.js +52 -0
- package/lib/Workers/Workerd/WorkerModulePlugin.js.map +1 -0
- package/lib/Workers/Workerd/WorkerRuntimeContext.d.ts +26 -0
- package/lib/Workers/Workerd/WorkerRuntimeContext.d.ts.map +1 -0
- package/lib/Workers/Workerd/WorkerRuntimeContext.js +129 -0
- package/lib/Workers/Workerd/WorkerRuntimeContext.js.map +1 -0
- package/lib/Workers/Workerd/internal/StorageTransaction.d.ts +10 -0
- package/lib/Workers/Workerd/internal/StorageTransaction.d.ts.map +1 -0
- package/lib/Workers/Workerd/internal/StorageTransaction.js +15 -0
- package/lib/Workers/Workerd/internal/StorageTransaction.js.map +1 -0
- package/lib/Workers/WorkflowFailure.d.ts +47 -0
- package/lib/Workers/WorkflowFailure.d.ts.map +1 -0
- package/lib/Workers/WorkflowFailure.js +363 -0
- package/lib/Workers/WorkflowFailure.js.map +1 -0
- package/lib/Workers.d.ts +14 -0
- package/lib/Workers.d.ts.map +1 -0
- package/lib/Workers.js +14 -0
- package/lib/Workers.js.map +1 -0
- package/lib/WorkflowEncoding.d.ts.map +1 -1
- package/lib/WorkflowEncoding.js.map +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 +25 -31
- package/src/AdoptPolicy.ts +76 -0
- package/src/Alchemist/AuthRegistry.ts +224 -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} +127 -42
- package/src/Alchemist/index.ts +32 -15
- package/src/Apply.ts +522 -305
- package/src/Artifacts.ts +14 -7
- package/src/Auth/AuthProvider.ts +121 -36
- 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 +7 -9
- package/src/Auth/OAuthFlow.ts +50 -29
- package/src/Auth/Paths.ts +3 -2
- package/src/Auth/Profile.ts +34 -3
- 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 +18 -12
- package/src/Cli/GlobalLog.ts +211 -70
- package/src/Cli/JsonConsole.ts +87 -0
- package/src/Cli/LoggingCli.ts +41 -28
- package/src/Cli/PlainCliFormatter.ts +4 -1
- package/src/Cli/Present.ts +34 -0
- package/src/Cli/SigilRenderer.ts +72 -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 +69 -10
- package/src/Cli/commands/drift.ts +36 -19
- package/src/Cli/commands/errors.ts +8 -17
- package/src/Cli/commands/flags.ts +3 -1
- package/src/Cli/commands/instrument.ts +39 -8
- package/src/Cli/commands/logs.ts +23 -30
- package/src/Cli/commands/nuke.ts +32 -27
- 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 +316 -89
- 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 +36 -15
- package/src/Cli/components/ui/Layout.tsx +1 -1
- package/src/Cli/components/ui/Live.tsx +89 -10
- package/src/Cli/components/ui/ProgramStatus.ts +14 -0
- package/src/Cli/components/ui/Typography.tsx +1 -1
- package/src/Cli/components/ui/index.ts +3 -2
- package/src/Cli/components/view/ApprovePlan.tsx +4 -1
- package/src/Cli/components/view/Format.tsx +58 -0
- package/src/Cli/components/view/Help.tsx +18 -20
- 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 +2 -1
- package/src/Cli/components/view/PlanRow.tsx +1 -1
- package/src/Cli/components/view/PlanTree.ts +12 -4
- package/src/Cli/components/view/PlanView.tsx +6 -3
- 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 +138 -238
- package/src/Cli/components/view/SigilCli.tsx +26 -21
- package/src/Cli/components/view/StackOutputs.tsx +2 -2
- package/src/Cli/components/view/StateExplorer.tsx +2 -1
- package/src/Cli/components/view/statusStyle.ts +2 -2
- package/src/Cli/components/view/usePlanPresentation.ts +15 -1
- package/src/Cli/exec.ts +52 -42
- package/src/Cli/main.ts +60 -36
- package/src/Cli/selectCli.ts +58 -6
- 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 +142 -29
- package/src/DNS/Adapter.ts +290 -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 +268 -127
- package/src/EvalStack.ts +97 -0
- package/src/Events.ts +330 -0
- package/src/Interaction.ts +370 -105
- package/src/Local/LocalProvider.ts +40 -9
- package/src/Local/RpcProvider.ts +26 -7
- package/src/Local/RpcProviderProxy.ts +29 -21
- package/src/Local/RpcSerialization.ts +66 -18
- package/src/Local/RpcServer.ts +38 -19
- package/src/Local/RpcServerBun.ts +18 -8
- package/src/Local/RpcServerEnvironment.ts +2 -2
- package/src/Local/RpcServerNode.ts +26 -4
- package/src/Local/RpcServerSession.ts +2 -2
- package/src/Local/RpcSpawner.ts +89 -51
- package/src/Local/RpcToken.ts +63 -0
- package/src/Local/Sidecar.ts +10 -1
- package/src/Mount.ts +113 -0
- package/src/Nuke.ts +67 -44
- package/src/Output.ts +185 -17
- package/src/Phase.ts +2 -1
- package/src/Plan.ts +700 -220
- package/src/Platform.ts +82 -21
- package/src/Provider.ts +108 -19
- package/src/RemovalPolicy.ts +57 -4
- package/src/Report.ts +77 -275
- package/src/Resource.ts +124 -8
- package/src/Rpc.ts +70 -8
- package/src/Runtime/Bootstrap.ts +11 -15
- package/src/Runtime/ManagedHttpShutdown.ts +21 -4
- package/src/Runtime/Process.ts +40 -1
- package/src/RuntimeContext.ts +28 -1
- package/src/Sandbox.ts +189 -0
- package/src/SandboxAgent.ts +585 -0
- package/src/SandboxAgentClient.ts +312 -0
- package/src/Secrets/Provider.ts +2 -0
- package/src/Stack.ts +113 -135
- package/src/State/BucketState.ts +62 -32
- package/src/State/LocalState.ts +7 -9
- package/src/State/Provisioning.ts +15 -2
- 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/Attributes.ts +1 -0
- 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/AtomicFile.ts +3 -2
- package/src/Util/ConfigProvider.ts +1 -0
- package/src/Util/ConsoleSink.ts +78 -13
- package/src/Util/Ignore.ts +14 -8
- 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 +31 -5
- package/src/Util/ResourceOutput.ts +33 -29
- package/src/Util/Shutdown.ts +52 -0
- package/src/Util/Terminal.ts +34 -58
- 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/Util/scc.ts +18 -13
- package/src/Util/tarGzip.ts +3 -2
- package/src/Website/AstroOutput.ts +83 -0
- package/src/Website/Server.ts +1 -0
- package/src/Workers/DurableObject.ts +307 -0
- package/src/Workers/DurableObjectBridge.ts +322 -0
- package/src/Workers/DurableObjectEngine.ts +609 -0
- package/src/Workers/EffectRpc.ts +53 -0
- package/src/Workers/EventLifetime.ts +84 -0
- package/src/Workers/InputGate.ts +249 -0
- package/src/Workers/RpcWebSocketClient.ts +67 -0
- package/src/Workers/Worker.ts +283 -0
- package/src/Workers/WorkerBridge.ts +173 -0
- package/src/Workers/WorkerEnvironment.ts +9 -0
- package/src/Workers/Workerd/AlarmCallback.ts +557 -0
- package/src/Workers/Workerd/Bundle.ts +282 -0
- package/src/Workers/Workerd/DurableObjectAlarmStorage.ts +102 -0
- package/src/Workers/Workerd/DurableObjectBridge.ts +159 -0
- package/src/Workers/Workerd/DurableObjectState.ts +153 -0
- package/src/Workers/Workerd/DurableObjectStorage.ts +559 -0
- package/src/Workers/Workerd/DurableObjectTransactionContext.ts +18 -0
- package/src/Workers/Workerd/HttpServer.ts +139 -0
- package/src/Workers/Workerd/Module.ts +35 -0
- package/src/Workers/Workerd/Request.ts +3 -0
- package/src/Workers/Workerd/RpcDurableObject.ts +121 -0
- package/src/Workers/Workerd/RpcWebSocket.ts +348 -0
- package/src/Workers/Workerd/ScheduledEvents.ts +191 -0
- package/src/Workers/Workerd/WebSocket.ts +154 -0
- package/src/Workers/Workerd/WorkerBridge.ts +149 -0
- package/src/Workers/Workerd/WorkerEvent.ts +33 -0
- package/src/Workers/Workerd/WorkerModulePlugin.ts +73 -0
- package/src/Workers/Workerd/WorkerRuntimeContext.ts +195 -0
- package/src/Workers/Workerd/internal/StorageTransaction.ts +21 -0
- package/src/Workers/WorkflowFailure.ts +437 -0
- package/src/Workers.ts +13 -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 +0 -81
- package/lib/Alchemist/routes/state.d.ts.map +0 -1
- package/lib/Alchemist/routes/state.js +0 -116
- 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/lib/Util/proxy-chain.d.ts +0 -36
- package/lib/Util/proxy-chain.d.ts.map +0 -1
- package/lib/Util/proxy-chain.js +0 -133
- package/lib/Util/proxy-chain.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/Util/proxy-chain.ts +0 -161
package/src/Apply.ts
CHANGED
|
@@ -3,7 +3,6 @@ import type { ConfigError } from "effect/Config";
|
|
|
3
3
|
import * as Data from "effect/Data";
|
|
4
4
|
import * as Deferred from "effect/Deferred";
|
|
5
5
|
import * as Effect from "effect/Effect";
|
|
6
|
-
import * as Exit from "effect/Exit";
|
|
7
6
|
import * as Layer from "effect/Layer";
|
|
8
7
|
import * as Option from "effect/Option";
|
|
9
8
|
import type { PlatformError } from "effect/PlatformError";
|
|
@@ -11,7 +10,13 @@ import * as Predicate from "effect/Predicate";
|
|
|
11
10
|
import type { Simplify } from "effect/Types";
|
|
12
11
|
import type { ActionLike } from "./Action.ts";
|
|
13
12
|
import { makeResolveContext } from "./ActionRuntimeContext.ts";
|
|
14
|
-
import {
|
|
13
|
+
import {
|
|
14
|
+
OwnedBySomeoneElse,
|
|
15
|
+
stripUnowned,
|
|
16
|
+
Unowned,
|
|
17
|
+
Unresolved,
|
|
18
|
+
UnverifiableReplacement,
|
|
19
|
+
} from "./AdoptPolicy.ts";
|
|
15
20
|
import { AlchemyContext } from "./AlchemyContext.ts";
|
|
16
21
|
import {
|
|
17
22
|
Artifacts,
|
|
@@ -26,26 +31,21 @@ import {
|
|
|
26
31
|
failCredentialsRequired,
|
|
27
32
|
demandPlanCredentials,
|
|
28
33
|
} from "./Auth/Demand.ts";
|
|
29
|
-
import { havePropsChanged, stripUnresolved } from "./Diff.ts";
|
|
34
|
+
import { havePropsChanged, isResolved, stripEffects, stripUnresolved } from "./Diff.ts";
|
|
35
|
+
import { captureEmit, failureMessage, type ApplyEvent, type ApplyStatus } from "./Events.ts";
|
|
30
36
|
import type { Input } from "./Input.ts";
|
|
31
37
|
import { generateInstanceId } from "./InstanceId.ts";
|
|
32
38
|
import * as Output from "./Output.ts";
|
|
33
39
|
import { type ActionApply, type Apply, type Delete, type Plan } from "./Plan.ts";
|
|
34
40
|
import {
|
|
35
41
|
type DeleteInProgress,
|
|
42
|
+
type ProviderService,
|
|
36
43
|
findProviderByType,
|
|
37
44
|
missingProviderError,
|
|
38
45
|
tryFindProviderByType,
|
|
39
46
|
} from "./Provider.ts";
|
|
40
47
|
import { stampedMode, type ProviderMode } from "./ProviderMode.ts";
|
|
41
|
-
import {
|
|
42
|
-
type PlanDisplayOptions,
|
|
43
|
-
type PlanStatusSession,
|
|
44
|
-
type ScopedPlanStatusSession,
|
|
45
|
-
Cli,
|
|
46
|
-
noopSession,
|
|
47
|
-
} from "./Report.ts";
|
|
48
|
-
import type { ApplyStatus } from "./Report.ts";
|
|
48
|
+
import { resourceSession } from "./Report.ts";
|
|
49
49
|
import type { ResourceBinding } from "./Resource.ts";
|
|
50
50
|
import { ResourceContext } from "./ResourceContext.ts";
|
|
51
51
|
import { RuntimeContext } from "./RuntimeContext.ts";
|
|
@@ -70,19 +70,20 @@ import {
|
|
|
70
70
|
StateStoreError,
|
|
71
71
|
} from "./State/index.ts";
|
|
72
72
|
import { type ResourceOp, recordResourceOp } from "./Telemetry/Metrics.ts";
|
|
73
|
+
import { LogAnnotation } from "./Util/LogAnnotation.ts";
|
|
73
74
|
import { hashInput } from "./Util/sha256.ts";
|
|
74
75
|
|
|
75
76
|
export type AppliedPlan<P extends Plan> = {
|
|
76
|
-
[id in keyof P["resources"]]: P["resources"][id] extends Delete | undefined
|
|
77
|
+
[id in keyof P["resources"]]: P["resources"][id] extends Delete | undefined
|
|
77
78
|
? never
|
|
78
79
|
: Simplify<P["resources"][id]["resource"]["attr"]>;
|
|
79
80
|
};
|
|
80
81
|
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
82
|
+
/**
|
|
83
|
+
* Where the engine reports apply progress. Every event goes out as a log
|
|
84
|
+
* record; renderers observe them with `onEvent`.
|
|
85
|
+
*/
|
|
86
|
+
type Reporter = (event: ApplyEvent) => Effect.Effect<void>;
|
|
86
87
|
|
|
87
88
|
interface ResourceTracker {
|
|
88
89
|
output: any;
|
|
@@ -107,6 +108,26 @@ const track = (
|
|
|
107
108
|
outputs[fqn] = entry.output;
|
|
108
109
|
};
|
|
109
110
|
|
|
111
|
+
/**
|
|
112
|
+
* Whether an attr-less checkpoint lost props to `stripUnresolved`. Its stored
|
|
113
|
+
* props no longer identify the physical resource it was creating (e.g. a
|
|
114
|
+
* stripped namespace makes a name match a different resource), so recovery
|
|
115
|
+
* must not look the resource up from them.
|
|
116
|
+
*
|
|
117
|
+
* Effect-valued props don't count: `Output.evaluate` passes them through
|
|
118
|
+
* untouched, so even fully resolved props carry them (a Function's runtime
|
|
119
|
+
* wiring). They never name a physical resource, and treating them as holes
|
|
120
|
+
* would mark every create of such a resource and orphan it on interruption.
|
|
121
|
+
*/
|
|
122
|
+
const propsIncomplete = (value: {
|
|
123
|
+
attr?: unknown;
|
|
124
|
+
props?: unknown;
|
|
125
|
+
propsIncomplete?: true;
|
|
126
|
+
}): true | undefined =>
|
|
127
|
+
value.attr === undefined && (value.propsIncomplete || !isResolved(stripEffects(value.props)))
|
|
128
|
+
? true
|
|
129
|
+
: undefined;
|
|
130
|
+
|
|
110
131
|
const provideLifecycleScope =
|
|
111
132
|
(resource: ResourceContext["Service"]) =>
|
|
112
133
|
<A, E, R>(effect: Effect.Effect<A, E, R>) =>
|
|
@@ -138,6 +159,8 @@ const instrumentLifecycle =
|
|
|
138
159
|
<A, E, R>(effect: Effect.Effect<A, E, R>) =>
|
|
139
160
|
effect.pipe(
|
|
140
161
|
provideLifecycleScope({ logicalId, fqn, instanceId, type: resourceType }),
|
|
162
|
+
// Every log a provider writes during the op carries its resource.
|
|
163
|
+
Effect.annotateLogs(LogAnnotation.fqn, fqn),
|
|
141
164
|
recordResourceOp(resourceType, op),
|
|
142
165
|
Effect.withSpan(`provider.${op}`, {
|
|
143
166
|
attributes: {
|
|
@@ -150,9 +173,92 @@ const instrumentLifecycle =
|
|
|
150
173
|
}),
|
|
151
174
|
);
|
|
152
175
|
|
|
176
|
+
type AdmissionNode = {
|
|
177
|
+
provider: Pick<ProviderService<any>, "observe" | "read">;
|
|
178
|
+
props: any;
|
|
179
|
+
deferredAdoption?: { adopt: boolean };
|
|
180
|
+
resource: { Type: string };
|
|
181
|
+
};
|
|
182
|
+
|
|
183
|
+
/**
|
|
184
|
+
* A dependency cycle precreates on raw props, before `read` can check
|
|
185
|
+
* ownership. Ask the provider's `observe` what exists at the identity
|
|
186
|
+
* precreate would claim, and refuse a foreign resource unless adoption is
|
|
187
|
+
* allowed. A provider without `observe` precreates `unchecked`; one whose
|
|
188
|
+
* identity has not resolved yet reports it `unresolved`, so the engine must
|
|
189
|
+
* check the resolved identity before reconcile claims it.
|
|
190
|
+
*/
|
|
191
|
+
const observeBeforePrecreate = Effect.fn(function* (
|
|
192
|
+
node: AdmissionNode,
|
|
193
|
+
news: any,
|
|
194
|
+
fqn: string,
|
|
195
|
+
logicalId: string,
|
|
196
|
+
instanceId: string,
|
|
197
|
+
previous?: any,
|
|
198
|
+
) {
|
|
199
|
+
if (node.provider.observe === undefined || node.deferredAdoption === undefined) {
|
|
200
|
+
return "unchecked" as const;
|
|
201
|
+
}
|
|
202
|
+
const observed = yield* node.provider
|
|
203
|
+
.observe({ id: logicalId, fqn, instanceId, news, previous })
|
|
204
|
+
.pipe(instrumentLifecycle("observe", fqn, node.resource.Type, logicalId, instanceId));
|
|
205
|
+
if (observed === Unresolved) return "unresolved" as const;
|
|
206
|
+
if (observed !== undefined && Unowned.is(observed) && !node.deferredAdoption.adopt) {
|
|
207
|
+
return yield* new OwnedBySomeoneElse({
|
|
208
|
+
message:
|
|
209
|
+
`Cannot pre-create resource '${fqn}' (${node.resource.Type}): ` +
|
|
210
|
+
"it exists in the cloud but is not owned by this " +
|
|
211
|
+
"stack/stage/logical-id. Re-run with `--adopt` (or " +
|
|
212
|
+
"wrap the effect in `adopt(true)`) to take it over.",
|
|
213
|
+
resourceType: node.resource.Type,
|
|
214
|
+
logicalId,
|
|
215
|
+
});
|
|
216
|
+
}
|
|
217
|
+
return "admitted" as const;
|
|
218
|
+
});
|
|
219
|
+
|
|
220
|
+
/** A provider's `observe` reported `Unresolved` for fully resolved props. */
|
|
221
|
+
class UnresolvedObservation extends Data.TaggedError("UnresolvedObservation")<{
|
|
222
|
+
message: string;
|
|
223
|
+
}> {}
|
|
224
|
+
|
|
225
|
+
/**
|
|
226
|
+
* Reports what exists at the resolved identity reconcile will claim: `read`
|
|
227
|
+
* when the provider implements it, `observe` otherwise. A replacement passes
|
|
228
|
+
* its `previous` generation's attributes, so the provider can recognize it.
|
|
229
|
+
*/
|
|
230
|
+
const observeResolved = Effect.fn(function* (
|
|
231
|
+
node: AdmissionNode,
|
|
232
|
+
news: Record<string, any>,
|
|
233
|
+
fqn: string,
|
|
234
|
+
logicalId: string,
|
|
235
|
+
instanceId: string,
|
|
236
|
+
previous?: any,
|
|
237
|
+
) {
|
|
238
|
+
if (node.provider.read) {
|
|
239
|
+
return yield* node.provider
|
|
240
|
+
.read({ id: logicalId, fqn, instanceId, olds: news, output: undefined, previous })
|
|
241
|
+
.pipe(instrumentLifecycle("read", fqn, node.resource.Type, logicalId, instanceId));
|
|
242
|
+
}
|
|
243
|
+
const observed = yield* node.provider.observe!({
|
|
244
|
+
id: logicalId,
|
|
245
|
+
fqn,
|
|
246
|
+
instanceId,
|
|
247
|
+
news,
|
|
248
|
+
previous,
|
|
249
|
+
}).pipe(instrumentLifecycle("observe", fqn, node.resource.Type, logicalId, instanceId));
|
|
250
|
+
if (observed === Unresolved) {
|
|
251
|
+
return yield* Effect.die(
|
|
252
|
+
new UnresolvedObservation({
|
|
253
|
+
message: `The provider for '${fqn}' (${node.resource.Type}) reported its identity as Unresolved, but its props are resolved.`,
|
|
254
|
+
}),
|
|
255
|
+
);
|
|
256
|
+
}
|
|
257
|
+
return observed;
|
|
258
|
+
});
|
|
259
|
+
|
|
153
260
|
export const apply = <P extends Plan>(
|
|
154
261
|
plan: P,
|
|
155
|
-
options: ApplyOptions = {},
|
|
156
262
|
): Effect.Effect<
|
|
157
263
|
Input.Resolve<P["output"]>,
|
|
158
264
|
| Output.InvalidReferenceError
|
|
@@ -181,144 +287,146 @@ export const apply = <P extends Plan>(
|
|
|
181
287
|
yield* demandPlanCredentials(plan);
|
|
182
288
|
}
|
|
183
289
|
|
|
184
|
-
|
|
185
|
-
//
|
|
186
|
-
//
|
|
187
|
-
const
|
|
188
|
-
|
|
189
|
-
(
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
.
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
renamedFrom.filter((formerFqn) => !migrationTargets.has(formerFqn)),
|
|
250
|
-
(formerFqn) => state.delete({ stack: stackName, stage, fqn: formerFqn }),
|
|
251
|
-
{ concurrency: "unbounded" },
|
|
252
|
-
);
|
|
253
|
-
});
|
|
254
|
-
},
|
|
255
|
-
{ concurrency: "unbounded" },
|
|
256
|
-
);
|
|
290
|
+
const emitEvent = yield* captureEmit;
|
|
291
|
+
// The last status each resource announced, so the post-convergence
|
|
292
|
+
// flush below re-emits only what is still unannounced (cycle members).
|
|
293
|
+
const announced = new Map<string, ApplyStatus>();
|
|
294
|
+
const reportEvent: Reporter = (event) => {
|
|
295
|
+
if (event.type === "apply.resource.status") announced.set(event.fqn, event.status);
|
|
296
|
+
return emitEvent(event);
|
|
297
|
+
};
|
|
298
|
+
// No Effect.scoped around apply: local dev providers start long-running
|
|
299
|
+
// processes in the AMBIENT scope during reconcile, which a scope here
|
|
300
|
+
// would kill when apply returns.
|
|
301
|
+
const state = yield* yield* State;
|
|
302
|
+
const stack = yield* Stack;
|
|
303
|
+
const stage = yield* Stage;
|
|
304
|
+
const stackName = stack.name;
|
|
305
|
+
|
|
306
|
+
const tracker: Record<string, ResourceTracker> = {};
|
|
307
|
+
const outputs: Record<string, any> = {};
|
|
308
|
+
const terminalStatuses = new Map<
|
|
309
|
+
string,
|
|
310
|
+
{
|
|
311
|
+
fqn: string;
|
|
312
|
+
id: string;
|
|
313
|
+
type: string;
|
|
314
|
+
status: Extract<ApplyStatus, "created" | "updated" | "adopted" | "ran" | "skipped">;
|
|
315
|
+
providerMode?: ProviderMode;
|
|
316
|
+
}
|
|
317
|
+
>();
|
|
318
|
+
|
|
319
|
+
// ── FQN migrations (renamedFrom) ──
|
|
320
|
+
// Persist renames before any lifecycle operation runs: a node whose row
|
|
321
|
+
// was found under a former FQN carries that row pre-remapped in
|
|
322
|
+
// `node.state` (see Plan's rename resolution). Commit it at the current
|
|
323
|
+
// FQN FIRST, then drop the former row — in that order, so an
|
|
324
|
+
// interruption leaves rows at both FQNs with the same instanceId, which
|
|
325
|
+
// the next plan recognizes as an in-flight migration (and never as an
|
|
326
|
+
// orphan to delete).
|
|
327
|
+
//
|
|
328
|
+
// In a same-deploy shift (A→B while B→C), C's former FQN `B` is
|
|
329
|
+
// simultaneously B's migration TARGET. C must NOT delete it: B's own
|
|
330
|
+
// `state.set` supersedes the stale copy, and the migrations run
|
|
331
|
+
// concurrently — the delete could land after B's write and destroy the
|
|
332
|
+
// freshly migrated row.
|
|
333
|
+
const migrationTargets = new Set(
|
|
334
|
+
Object.values(plan.resources)
|
|
335
|
+
.filter((node) => node.renamedFrom?.length && node.state !== undefined)
|
|
336
|
+
.map((node) => node.resource.FQN),
|
|
337
|
+
);
|
|
338
|
+
yield* Effect.forEach(
|
|
339
|
+
Object.values(plan.resources),
|
|
340
|
+
(node) => {
|
|
341
|
+
const { renamedFrom, state: row } = node;
|
|
342
|
+
return renamedFrom === undefined || renamedFrom.length === 0 || row === undefined
|
|
343
|
+
? Effect.void
|
|
344
|
+
: Effect.gen(function* () {
|
|
345
|
+
yield* state.set({ stack: stackName, stage, fqn: node.resource.FQN, value: row });
|
|
346
|
+
yield* Effect.forEach(
|
|
347
|
+
renamedFrom.filter((formerFqn) => !migrationTargets.has(formerFqn)),
|
|
348
|
+
(formerFqn) => state.delete({ stack: stackName, stage, fqn: formerFqn }),
|
|
349
|
+
{ concurrency: "unbounded" },
|
|
350
|
+
);
|
|
351
|
+
});
|
|
352
|
+
},
|
|
353
|
+
{ concurrency: "unbounded" },
|
|
354
|
+
);
|
|
257
355
|
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
356
|
+
yield* executePlan(
|
|
357
|
+
plan,
|
|
358
|
+
tracker,
|
|
359
|
+
outputs,
|
|
360
|
+
terminalStatuses,
|
|
361
|
+
reportEvent,
|
|
362
|
+
state,
|
|
363
|
+
stackName,
|
|
364
|
+
stage,
|
|
365
|
+
);
|
|
268
366
|
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
367
|
+
// TODO(sam): support roll back to previous state if errors occur during expansion
|
|
368
|
+
// -> RISK: some UPDATEs may not be reversible (i.e. trigger replacements)
|
|
369
|
+
// TODO(sam): should pivot be done separately? E.g shift traffic?
|
|
272
370
|
|
|
273
|
-
|
|
371
|
+
yield* collectGarbage(plan, reportEvent);
|
|
274
372
|
|
|
275
|
-
|
|
373
|
+
yield* converge(plan, tracker, outputs, terminalStatuses, reportEvent, state, stackName, stage);
|
|
276
374
|
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
{
|
|
282
|
-
)
|
|
375
|
+
// Cycle members hold their terminal status until `converge` settles
|
|
376
|
+
// it; everything else announced it as it finished.
|
|
377
|
+
yield* Effect.forEach(
|
|
378
|
+
Array.from(terminalStatuses.values()).filter(
|
|
379
|
+
({ fqn, status }) => announced.get(fqn) !== status,
|
|
380
|
+
),
|
|
381
|
+
({ fqn, id, type, status, providerMode }) =>
|
|
382
|
+
reportEvent({
|
|
383
|
+
type: "apply.resource.status",
|
|
384
|
+
fqn,
|
|
385
|
+
id,
|
|
386
|
+
resourceType: type,
|
|
387
|
+
status,
|
|
388
|
+
providerMode,
|
|
389
|
+
}),
|
|
390
|
+
{ concurrency: "unbounded" },
|
|
391
|
+
);
|
|
283
392
|
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
}
|
|
306
|
-
return undefined;
|
|
393
|
+
if (plan.destroy) {
|
|
394
|
+
// The destroy converged: every resource row was deleted above. Drop
|
|
395
|
+
// the rest of the stage's persisted state — notably the stack output
|
|
396
|
+
// record written by the last deploy — so `getOutput` returns
|
|
397
|
+
// undefined and `listStages` no longer reports the stage.
|
|
398
|
+
// https://github.com/alchemy-run/alchemy/issues/961
|
|
399
|
+
yield* state.deleteStack({ stack: stackName, stage });
|
|
400
|
+
// Invariant: a successful destroy leaves the stage EMPTY. If rows
|
|
401
|
+
// survive, this destroy session could not actually see (or delete)
|
|
402
|
+
// the stack's state — e.g. its plan listed an empty store while
|
|
403
|
+
// committed rows existed — and reporting success here would silently
|
|
404
|
+
// leak every cloud resource those rows track. Fail loudly instead so
|
|
405
|
+
// the leak surfaces in the run that caused it.
|
|
406
|
+
const remaining = yield* state.list({ stack: stackName, stage });
|
|
407
|
+
if (remaining.length > 0) {
|
|
408
|
+
return yield* new StateStoreError({
|
|
409
|
+
message:
|
|
410
|
+
`destroy of ${stackName}/${stage} reported success but ${remaining.length} ` +
|
|
411
|
+
`state row(s) remain (${remaining.join(", ")}) — the destroy session could ` +
|
|
412
|
+
`not see the stack's persisted state, so its cloud resources were NOT deleted`,
|
|
413
|
+
});
|
|
307
414
|
}
|
|
415
|
+
return undefined;
|
|
416
|
+
}
|
|
308
417
|
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
418
|
+
if (plan.selectedFqns !== undefined || !plan.output) {
|
|
419
|
+
return undefined;
|
|
420
|
+
}
|
|
312
421
|
|
|
313
|
-
|
|
422
|
+
const resolved = yield* Output.evaluate(plan.output, outputs);
|
|
314
423
|
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
424
|
+
// Persist the stack's evaluated outputs so cross-stack references
|
|
425
|
+
// (`yield* OtherStack` / `OtherStack.stage.<name>` / `Output.stackRef`)
|
|
426
|
+
// can read them back out of the state store.
|
|
427
|
+
yield* state.setOutput({ stack: stackName, stage, value: resolved });
|
|
319
428
|
|
|
320
|
-
|
|
321
|
-
}).pipe(Effect.onExit((exit) => session.done(Exit.isSuccess(exit) ? "success" : "failure")));
|
|
429
|
+
return resolved;
|
|
322
430
|
}).pipe(
|
|
323
431
|
ensureArtifactStore,
|
|
324
432
|
Effect.withSpan("apply", {
|
|
@@ -350,7 +458,7 @@ const executePlan = Effect.fn(function* (
|
|
|
350
458
|
providerMode?: ProviderMode;
|
|
351
459
|
}
|
|
352
460
|
>,
|
|
353
|
-
|
|
461
|
+
reportEvent: Reporter,
|
|
354
462
|
state: {
|
|
355
463
|
set: <V extends PersistedState>(req: {
|
|
356
464
|
stack: string;
|
|
@@ -368,10 +476,8 @@ const executePlan = Effect.fn(function* (
|
|
|
368
476
|
const allNodes: Record<string, Apply | ActionApply> = { ...plan.resources, ...plan.actions };
|
|
369
477
|
|
|
370
478
|
const ready = Object.fromEntries(
|
|
371
|
-
yield* Effect.
|
|
372
|
-
|
|
373
|
-
Effect.map(Deferred.make<void>(), (d) => [fqn, d] as const),
|
|
374
|
-
),
|
|
479
|
+
yield* Effect.forEach(Object.keys(allNodes), (fqn) =>
|
|
480
|
+
Effect.map(Deferred.make<void>(), (d) => [fqn, d] as const),
|
|
375
481
|
),
|
|
376
482
|
) as Record<string, Deferred.Deferred<void>>;
|
|
377
483
|
|
|
@@ -380,50 +486,48 @@ const executePlan = Effect.fn(function* (
|
|
|
380
486
|
// precreate stubs do NOT signal `readyStable`, so any consumer that
|
|
381
487
|
// requires stable inputs (e.g. Tasks) waits past the precreate phase.
|
|
382
488
|
const readyStable = Object.fromEntries(
|
|
383
|
-
yield* Effect.
|
|
384
|
-
|
|
385
|
-
Effect.map(Deferred.make<void>(), (d) => [fqn, d] as const),
|
|
386
|
-
),
|
|
489
|
+
yield* Effect.forEach(Object.keys(allNodes), (fqn) =>
|
|
490
|
+
Effect.map(Deferred.make<void>(), (d) => [fqn, d] as const),
|
|
387
491
|
),
|
|
388
492
|
) as Record<string, Deferred.Deferred<void>>;
|
|
389
493
|
|
|
390
494
|
const waitForDeps = (downstreamFqn: string, fqns: string[]) =>
|
|
391
|
-
Effect.
|
|
392
|
-
fqns
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
: Deferred.await(readyStable[fqn]),
|
|
413
|
-
),
|
|
495
|
+
Effect.forEach(
|
|
496
|
+
fqns.filter((fqn) => fqn in ready),
|
|
497
|
+
(fqn) =>
|
|
498
|
+
// Non-cycle upstreams must be observed at their TERMINAL output
|
|
499
|
+
// (`readyStable`), not their early precreate signal (`ready`). This
|
|
500
|
+
// is what makes a failed upstream actually interrupt its downstream:
|
|
501
|
+
// a resource with `precreate` resolves `ready` before its real
|
|
502
|
+
// `reconcile` runs, so a downstream waiting on `ready` would proceed
|
|
503
|
+
// (and even finish) even though the upstream's reconcile later
|
|
504
|
+
// failed. Waiting on `readyStable` means the downstream's
|
|
505
|
+
// `waitForDeps` short-circuits with the upstream's failure cause.
|
|
506
|
+
//
|
|
507
|
+
// Cycle members are the exception: peers in an SCC depend on each
|
|
508
|
+
// other, so they must rendezvous on the early `ready`/precreate
|
|
509
|
+
// signal to break the deadlock. Phase 3 (`converge`) re-runs them
|
|
510
|
+
// against final outputs once the cycle settles. A downstream
|
|
511
|
+
// outside the cycle must still wait for reconcile: e.g. a queue
|
|
512
|
+
// consumer cannot attach to a Worker's fetch-only precreate stub.
|
|
513
|
+
plan.cycleMembers.has(downstreamFqn) && plan.cycleMembers.has(fqn)
|
|
514
|
+
? Deferred.await(ready[fqn])
|
|
515
|
+
: Deferred.await(readyStable[fqn]),
|
|
414
516
|
{ concurrency: "unbounded" },
|
|
415
517
|
);
|
|
416
518
|
|
|
417
519
|
const waitForStableDeps = (fqns: string[]) =>
|
|
418
|
-
Effect.
|
|
419
|
-
fqns.filter((fqn) => fqn in readyStable)
|
|
520
|
+
Effect.forEach(
|
|
521
|
+
fqns.filter((fqn) => fqn in readyStable),
|
|
522
|
+
(fqn) => Deferred.await(readyStable[fqn]),
|
|
420
523
|
{ concurrency: "unbounded" },
|
|
421
524
|
);
|
|
422
525
|
|
|
423
526
|
const failures: LifecycleFailure[] = [];
|
|
424
527
|
|
|
425
|
-
yield* Effect.
|
|
426
|
-
Object.entries(allNodes)
|
|
528
|
+
yield* Effect.forEach(
|
|
529
|
+
Object.entries(allNodes),
|
|
530
|
+
([fqn, node]) =>
|
|
427
531
|
(node as ActionApply).kind === "action"
|
|
428
532
|
? executeActionNode(
|
|
429
533
|
fqn,
|
|
@@ -433,7 +537,7 @@ const executePlan = Effect.fn(function* (
|
|
|
433
537
|
ready,
|
|
434
538
|
readyStable,
|
|
435
539
|
terminalStatuses,
|
|
436
|
-
|
|
540
|
+
reportEvent,
|
|
437
541
|
state,
|
|
438
542
|
stackName,
|
|
439
543
|
stage,
|
|
@@ -448,15 +552,14 @@ const executePlan = Effect.fn(function* (
|
|
|
448
552
|
ready,
|
|
449
553
|
readyStable,
|
|
450
554
|
terminalStatuses as any,
|
|
451
|
-
|
|
555
|
+
reportEvent,
|
|
452
556
|
state,
|
|
453
557
|
stackName,
|
|
454
558
|
stage,
|
|
455
559
|
(fqns) => waitForDeps(fqn, fqns),
|
|
456
560
|
failures,
|
|
457
|
-
plan.cycleMembers
|
|
561
|
+
plan.cycleMembers,
|
|
458
562
|
),
|
|
459
|
-
),
|
|
460
563
|
{ concurrency: "unbounded" },
|
|
461
564
|
);
|
|
462
565
|
|
|
@@ -475,36 +578,6 @@ interface LifecycleFailure {
|
|
|
475
578
|
cause: Cause.Cause<unknown>;
|
|
476
579
|
}
|
|
477
580
|
|
|
478
|
-
/**
|
|
479
|
-
* First human-readable line of a lifecycle failure, for the per-resource
|
|
480
|
-
* `fail` status event. The full cause is still aggregated and raised when
|
|
481
|
-
* the whole apply settles — this exists so a failed row explains itself the
|
|
482
|
-
* moment it fails instead of only after every sibling has finished.
|
|
483
|
-
* `undefined` for interrupt-only causes (nothing failed, the run was
|
|
484
|
-
* cancelled).
|
|
485
|
-
*/
|
|
486
|
-
const failureMessage = (cause: Cause.Cause<unknown>): string | undefined => {
|
|
487
|
-
for (const reason of cause.reasons) {
|
|
488
|
-
const error = Cause.isFailReason(reason)
|
|
489
|
-
? reason.error
|
|
490
|
-
: Cause.isDieReason(reason)
|
|
491
|
-
? reason.defect
|
|
492
|
-
: undefined;
|
|
493
|
-
if (error === undefined) continue;
|
|
494
|
-
const tag =
|
|
495
|
-
Predicate.hasProperty(error, "_tag") && typeof error._tag === "string"
|
|
496
|
-
? error._tag
|
|
497
|
-
: undefined;
|
|
498
|
-
const message =
|
|
499
|
-
Predicate.hasProperty(error, "message") && typeof error.message === "string"
|
|
500
|
-
? error.message
|
|
501
|
-
: String(error);
|
|
502
|
-
const line = message.split("\n", 1)[0]!;
|
|
503
|
-
return tag !== undefined && !line.includes(tag) ? `${tag}: ${line}` : line;
|
|
504
|
-
}
|
|
505
|
-
return undefined;
|
|
506
|
-
};
|
|
507
|
-
|
|
508
581
|
const executeNode = (
|
|
509
582
|
fqn: string,
|
|
510
583
|
node: Apply,
|
|
@@ -522,7 +595,7 @@ const executeNode = (
|
|
|
522
595
|
providerMode?: ProviderMode;
|
|
523
596
|
}
|
|
524
597
|
>,
|
|
525
|
-
|
|
598
|
+
reportEvent: Reporter,
|
|
526
599
|
state: {
|
|
527
600
|
set: <V extends ResourceState>(req: {
|
|
528
601
|
stack: string;
|
|
@@ -535,9 +608,10 @@ const executeNode = (
|
|
|
535
608
|
stage: string,
|
|
536
609
|
waitForDeps: (fqns: string[]) => Effect.Effect<void[], never, never>,
|
|
537
610
|
failures: LifecycleFailure[],
|
|
538
|
-
|
|
611
|
+
cycleMembers: ReadonlySet<string>,
|
|
539
612
|
): Effect.Effect<void, never, never> =>
|
|
540
613
|
Effect.gen(function* () {
|
|
614
|
+
const inCycle = cycleMembers.has(fqn);
|
|
541
615
|
const logicalId = node.resource.LogicalId;
|
|
542
616
|
const namespace = node.resource.Namespace;
|
|
543
617
|
|
|
@@ -562,23 +636,14 @@ const executeNode = (
|
|
|
562
636
|
value: {
|
|
563
637
|
...value,
|
|
564
638
|
adoptionBlocked: value.adoptionBlocked ?? node.adoptionBlocked,
|
|
639
|
+
propsIncomplete: propsIncomplete(value),
|
|
565
640
|
props: stripUnresolved(value.props),
|
|
566
641
|
bindings: stripUnresolved(value.bindings),
|
|
567
642
|
namespace,
|
|
568
643
|
} as S,
|
|
569
644
|
});
|
|
570
645
|
|
|
571
|
-
const scopedSession =
|
|
572
|
-
...session,
|
|
573
|
-
note: (note, options?) =>
|
|
574
|
-
session.emit({
|
|
575
|
-
fqn,
|
|
576
|
-
id: logicalId,
|
|
577
|
-
_tag: "apply.resource.note",
|
|
578
|
-
message: note,
|
|
579
|
-
kind: options?.kind,
|
|
580
|
-
}),
|
|
581
|
-
} satisfies ScopedPlanStatusSession;
|
|
646
|
+
const scopedSession = resourceSession(reportEvent, fqn, logicalId);
|
|
582
647
|
|
|
583
648
|
// On a mode-switch replacement (local ⇄ live) surface the transition:
|
|
584
649
|
// the old generation's stamped mode → the mode resolved for this run.
|
|
@@ -591,11 +656,11 @@ const executeNode = (
|
|
|
591
656
|
: undefined;
|
|
592
657
|
|
|
593
658
|
const report = (status: ApplyStatus) =>
|
|
594
|
-
|
|
595
|
-
|
|
659
|
+
reportEvent({
|
|
660
|
+
type: "apply.resource.status",
|
|
596
661
|
fqn,
|
|
597
662
|
id: logicalId,
|
|
598
|
-
|
|
663
|
+
resourceType: node.resource.Type,
|
|
599
664
|
status,
|
|
600
665
|
providerMode: node.mode,
|
|
601
666
|
fromProviderMode,
|
|
@@ -633,11 +698,11 @@ const executeNode = (
|
|
|
633
698
|
// terminal status is known. Their final status is flushed from
|
|
634
699
|
// `terminalStatuses` after `converge` completes.
|
|
635
700
|
if (inCycle) return;
|
|
636
|
-
yield*
|
|
637
|
-
|
|
701
|
+
yield* reportEvent({
|
|
702
|
+
type: "apply.resource.status",
|
|
638
703
|
fqn,
|
|
639
704
|
id: logicalId,
|
|
640
|
-
|
|
705
|
+
resourceType: node.resource.Type,
|
|
641
706
|
status,
|
|
642
707
|
providerMode: node.mode,
|
|
643
708
|
});
|
|
@@ -712,6 +777,23 @@ const executeNode = (
|
|
|
712
777
|
return [...new Set([...propDeps, ...bindingDeps])];
|
|
713
778
|
};
|
|
714
779
|
|
|
780
|
+
// A cycle precreates before its peers reconcile. An upstream outside the
|
|
781
|
+
// cycle cannot depend on it, so wait for those upstreams and resolve the
|
|
782
|
+
// props they determine: only values derived from cycle peers stay
|
|
783
|
+
// unresolved when precreate and `observe` run.
|
|
784
|
+
const resolvePrecreateProps = Effect.gen(function* () {
|
|
785
|
+
const outside = allUpstreamFqns().filter((upstream) => !cycleMembers.has(upstream));
|
|
786
|
+
yield* waitForDeps(outside);
|
|
787
|
+
return yield* Output.evaluateAvailable(
|
|
788
|
+
node.props,
|
|
789
|
+
Object.fromEntries(
|
|
790
|
+
outside
|
|
791
|
+
.filter((upstream) => Object.hasOwn(outputs, upstream))
|
|
792
|
+
.map((upstream) => [upstream, outputs[upstream]]),
|
|
793
|
+
),
|
|
794
|
+
);
|
|
795
|
+
});
|
|
796
|
+
|
|
715
797
|
// ── instance ID ──
|
|
716
798
|
|
|
717
799
|
const resolveInstanceId = Effect.gen(function* () {
|
|
@@ -793,6 +875,8 @@ const executeNode = (
|
|
|
793
875
|
}
|
|
794
876
|
|
|
795
877
|
let attr: any = node.state?.attr;
|
|
878
|
+
// Whether the identity reconcile claims has passed the ownership check.
|
|
879
|
+
let admitted = node.deferredAdoption === undefined;
|
|
796
880
|
|
|
797
881
|
if (attr !== undefined) {
|
|
798
882
|
// Precreate/read may already have produced a usable output snapshot. Publish
|
|
@@ -806,6 +890,10 @@ const executeNode = (
|
|
|
806
890
|
// Durable Object classes are empty) can serve traffic while the real
|
|
807
891
|
// version propagates.
|
|
808
892
|
if (inCycle && node.provider.precreate && attr === undefined) {
|
|
893
|
+
const props = yield* resolvePrecreateProps;
|
|
894
|
+
// Without `observe`, precreate and reconcile claim the identity unchecked.
|
|
895
|
+
admitted =
|
|
896
|
+
(yield* observeBeforePrecreate(node, props, fqn, logicalId, instanceId)) !== "unresolved";
|
|
809
897
|
// Some resources need a placeholder physical resource before their real
|
|
810
898
|
// create can finish. Persist that stub so downstream evaluation can proceed.
|
|
811
899
|
yield* report("pre-creating");
|
|
@@ -813,7 +901,7 @@ const executeNode = (
|
|
|
813
901
|
.precreate({
|
|
814
902
|
id: logicalId,
|
|
815
903
|
fqn,
|
|
816
|
-
news:
|
|
904
|
+
news: props,
|
|
817
905
|
session: scopedSession,
|
|
818
906
|
instanceId,
|
|
819
907
|
bindings: excludeDeletedBindings(node.bindings),
|
|
@@ -826,7 +914,9 @@ const executeNode = (
|
|
|
826
914
|
instanceId,
|
|
827
915
|
resourceType: node.resource.Type,
|
|
828
916
|
props: node.props,
|
|
829
|
-
|
|
917
|
+
// A stub for an unresolved identity claims nothing. Leave the
|
|
918
|
+
// checkpoint without it, so a retry checks the identity again.
|
|
919
|
+
attr: admitted ? attr : undefined,
|
|
830
920
|
providerVersion: node.provider.version ?? 0,
|
|
831
921
|
bindings: excludeDeletedBindings(node.bindings),
|
|
832
922
|
downstream: node.downstream,
|
|
@@ -852,8 +942,8 @@ const executeNode = (
|
|
|
852
942
|
|
|
853
943
|
const bindingOutputs = excludeDeletedBindings(yield* Output.evaluate(node.bindings, outputs));
|
|
854
944
|
|
|
855
|
-
if (
|
|
856
|
-
const checkpoint = () =>
|
|
945
|
+
if (!admitted) {
|
|
946
|
+
const checkpoint = (attr: any) =>
|
|
857
947
|
commit<CreatingResourceState>({
|
|
858
948
|
status: "creating",
|
|
859
949
|
fqn,
|
|
@@ -869,13 +959,12 @@ const executeNode = (
|
|
|
869
959
|
providerMode: node.mode,
|
|
870
960
|
adoptionBlocked: node.adoptionBlocked,
|
|
871
961
|
});
|
|
872
|
-
// Refusal or interruption must retain identity, never foreign
|
|
873
|
-
|
|
874
|
-
|
|
875
|
-
|
|
876
|
-
.pipe(instrumentLifecycle("read", fqn, node.resource.Type, logicalId, instanceId));
|
|
962
|
+
// Refusal or interruption must retain identity, never foreign
|
|
963
|
+
// attributes, nor a stub for an identity not yet checked.
|
|
964
|
+
yield* checkpoint(undefined);
|
|
965
|
+
const observed = yield* observeResolved(node, news, fqn, logicalId, instanceId);
|
|
877
966
|
if (observed !== undefined) {
|
|
878
|
-
if (Unowned.is(observed) && !node.deferredAdoption
|
|
967
|
+
if (Unowned.is(observed) && !node.deferredAdoption?.adopt) {
|
|
879
968
|
return yield* new OwnedBySomeoneElse({
|
|
880
969
|
message:
|
|
881
970
|
`Cannot adopt resource '${fqn}' (${node.resource.Type}): ` +
|
|
@@ -886,9 +975,10 @@ const executeNode = (
|
|
|
886
975
|
logicalId,
|
|
887
976
|
});
|
|
888
977
|
}
|
|
889
|
-
|
|
978
|
+
// Reconcile keeps a precreated stub as its output.
|
|
979
|
+
attr ??= stripUnowned(observed);
|
|
890
980
|
// A creating checkpoint retains olds: undefined on retry.
|
|
891
|
-
yield* checkpoint();
|
|
981
|
+
yield* checkpoint(attr);
|
|
892
982
|
}
|
|
893
983
|
}
|
|
894
984
|
|
|
@@ -980,6 +1070,7 @@ const executeNode = (
|
|
|
980
1070
|
...node.state,
|
|
981
1071
|
attr: node.state.attr,
|
|
982
1072
|
props: news,
|
|
1073
|
+
removalPolicy: node.resource.RemovalPolicy,
|
|
983
1074
|
providerMode: node.mode,
|
|
984
1075
|
})
|
|
985
1076
|
: commit<UpdatingReourceState>({
|
|
@@ -1037,6 +1128,7 @@ const executeNode = (
|
|
|
1037
1128
|
props: news,
|
|
1038
1129
|
// Resolved payload, not raw `node.bindings` — see create commit.
|
|
1039
1130
|
bindings: bindingOutputs,
|
|
1131
|
+
removalPolicy: node.resource.RemovalPolicy,
|
|
1040
1132
|
providerMode: node.mode,
|
|
1041
1133
|
});
|
|
1042
1134
|
} else {
|
|
@@ -1089,6 +1181,14 @@ const executeNode = (
|
|
|
1089
1181
|
if (node.state.status === "replaced" && !node.restart) {
|
|
1090
1182
|
// The replacement already exists; this pass only needs GC to clean up
|
|
1091
1183
|
// older generations, so expose the current replacement and stop here.
|
|
1184
|
+
// Like the noop branch, persist a changed removal policy: this is the
|
|
1185
|
+
// only pass that sees it, and GC reads the row's policy.
|
|
1186
|
+
if (node.state.removalPolicy !== node.resource.RemovalPolicy) {
|
|
1187
|
+
yield* commit<ReplacedResourceState>({
|
|
1188
|
+
...node.state,
|
|
1189
|
+
removalPolicy: node.resource.RemovalPolicy,
|
|
1190
|
+
});
|
|
1191
|
+
}
|
|
1092
1192
|
track(tracker, outputs, fqn, {
|
|
1093
1193
|
output: node.state.attr,
|
|
1094
1194
|
props: node.state.props,
|
|
@@ -1173,15 +1273,99 @@ const executeNode = (
|
|
|
1173
1273
|
}
|
|
1174
1274
|
});
|
|
1175
1275
|
|
|
1176
|
-
|
|
1276
|
+
const deleteFirst = Effect.fn(function* () {
|
|
1177
1277
|
yield* scopedSession.note(
|
|
1178
1278
|
"Deleting previous resource before creating its replacement (deleteFirst)...",
|
|
1179
1279
|
);
|
|
1180
1280
|
yield* deleteOldGenerations(replState.old);
|
|
1181
|
-
}
|
|
1281
|
+
});
|
|
1182
1282
|
|
|
1183
1283
|
let attr: any = replState.attr;
|
|
1184
1284
|
|
|
1285
|
+
// ── replacement admission ──
|
|
1286
|
+
//
|
|
1287
|
+
// The replacement may resolve to a physical identity that already
|
|
1288
|
+
// exists and belongs to someone else (e.g. a renamed Worker pointing at
|
|
1289
|
+
// a foreign script). Read it before anything is mutated — before
|
|
1290
|
+
// precreate, reconcile, and delete-first cleanup of the previous
|
|
1291
|
+
// generation — and refuse an unowned target unless adoption is allowed,
|
|
1292
|
+
// exactly like a fresh create.
|
|
1293
|
+
let admitted = attr !== undefined || node.deferredAdoption === undefined;
|
|
1294
|
+
const admit = Effect.fn(function* (props: Record<string, any>) {
|
|
1295
|
+
admitted = true;
|
|
1296
|
+
const observed = yield* observeResolved(
|
|
1297
|
+
node,
|
|
1298
|
+
props,
|
|
1299
|
+
fqn,
|
|
1300
|
+
logicalId,
|
|
1301
|
+
instanceId,
|
|
1302
|
+
replState.old?.attr,
|
|
1303
|
+
);
|
|
1304
|
+
if (observed === undefined) return;
|
|
1305
|
+
if (Unowned.is(observed) && !node.deferredAdoption?.adopt) {
|
|
1306
|
+
return yield* new OwnedBySomeoneElse({
|
|
1307
|
+
message:
|
|
1308
|
+
`Cannot replace resource '${fqn}' (${node.resource.Type}): ` +
|
|
1309
|
+
"its replacement exists in the cloud but is not owned by this " +
|
|
1310
|
+
"stack/stage/logical-id. Re-run with `--adopt` (or " +
|
|
1311
|
+
"wrap the effect in `adopt(true)`) to take it over.",
|
|
1312
|
+
resourceType: node.resource.Type,
|
|
1313
|
+
logicalId,
|
|
1314
|
+
});
|
|
1315
|
+
}
|
|
1316
|
+
// A delete-first target may be the previous generation itself, which
|
|
1317
|
+
// is about to be deleted — never hand its attributes to reconcile.
|
|
1318
|
+
// Reconcile keeps a precreated stub as its output.
|
|
1319
|
+
if (!node.deleteFirst) attr ??= stripUnowned(observed);
|
|
1320
|
+
});
|
|
1321
|
+
|
|
1322
|
+
// A cycle precreates on the props its upstreams outside the cycle
|
|
1323
|
+
// determine; anything else waits for every upstream.
|
|
1324
|
+
const precreateProps = inCycle ? yield* resolvePrecreateProps : node.props;
|
|
1325
|
+
|
|
1326
|
+
if (!admitted && isResolved(precreateProps)) {
|
|
1327
|
+
yield* admit(precreateProps);
|
|
1328
|
+
}
|
|
1329
|
+
|
|
1330
|
+
// A cycle precreates before its props resolve, so `observe` admits the
|
|
1331
|
+
// identity precreate will claim — before delete-first, too. Without
|
|
1332
|
+
// `observe`, precreate and reconcile claim it unchecked. An unresolved
|
|
1333
|
+
// identity is admitted once it resolves, before reconcile.
|
|
1334
|
+
if (!admitted && inCycle) {
|
|
1335
|
+
const observation = yield* observeBeforePrecreate(
|
|
1336
|
+
node,
|
|
1337
|
+
precreateProps,
|
|
1338
|
+
fqn,
|
|
1339
|
+
logicalId,
|
|
1340
|
+
instanceId,
|
|
1341
|
+
replState.old?.attr,
|
|
1342
|
+
);
|
|
1343
|
+
admitted = observation !== "unresolved";
|
|
1344
|
+
if (!admitted && node.deleteFirst && !node.deferredAdoption?.adopt) {
|
|
1345
|
+
return yield* new UnverifiableReplacement({
|
|
1346
|
+
message:
|
|
1347
|
+
`Cannot replace resource '${fqn}' (${node.resource.Type}): ` +
|
|
1348
|
+
"it must be deleted before its replacement is pre-created, but " +
|
|
1349
|
+
"the replacement's identity depends on outputs that are not " +
|
|
1350
|
+
"resolved yet, so its ownership cannot be checked first. Re-run " +
|
|
1351
|
+
"with `--adopt` (or wrap the effect in `adopt(true)`) to replace it anyway.",
|
|
1352
|
+
resourceType: node.resource.Type,
|
|
1353
|
+
logicalId,
|
|
1354
|
+
});
|
|
1355
|
+
}
|
|
1356
|
+
}
|
|
1357
|
+
|
|
1358
|
+
// A cycle must delete before precreate claims the identity. Plan has
|
|
1359
|
+
// already refused one whose identity could not be admitted first
|
|
1360
|
+
// without `observe`; the check above refuses an unresolved one.
|
|
1361
|
+
// Otherwise the previous generation survives until reconcile is
|
|
1362
|
+
// about to run, so a failed upstream never leaves the resource missing.
|
|
1363
|
+
let deletedFirst = false;
|
|
1364
|
+
if (node.deleteFirst && inCycle) {
|
|
1365
|
+
yield* deleteFirst();
|
|
1366
|
+
deletedFirst = true;
|
|
1367
|
+
}
|
|
1368
|
+
|
|
1185
1369
|
if (attr !== undefined) {
|
|
1186
1370
|
// If precreate already ran, expose that intermediate output immediately so
|
|
1187
1371
|
// downstream resources can resolve against the same in-flight replacement.
|
|
@@ -1194,7 +1378,7 @@ const executeNode = (
|
|
|
1194
1378
|
.precreate({
|
|
1195
1379
|
id: logicalId,
|
|
1196
1380
|
fqn,
|
|
1197
|
-
news:
|
|
1381
|
+
news: precreateProps,
|
|
1198
1382
|
session: scopedSession,
|
|
1199
1383
|
instanceId,
|
|
1200
1384
|
bindings: excludeDeletedBindings(node.bindings),
|
|
@@ -1207,7 +1391,9 @@ const executeNode = (
|
|
|
1207
1391
|
instanceId,
|
|
1208
1392
|
resourceType: node.resource.Type,
|
|
1209
1393
|
props: node.props,
|
|
1210
|
-
|
|
1394
|
+
// A stub for an unresolved identity claims nothing. Leave the
|
|
1395
|
+
// checkpoint without it, so a retry checks the identity again.
|
|
1396
|
+
attr: admitted ? attr : undefined,
|
|
1211
1397
|
providerVersion: node.provider.version ?? 0,
|
|
1212
1398
|
bindings: excludeDeletedBindings(node.bindings),
|
|
1213
1399
|
downstream: node.downstream,
|
|
@@ -1233,6 +1419,13 @@ const executeNode = (
|
|
|
1233
1419
|
|
|
1234
1420
|
const bindingOutputs = excludeDeletedBindings(yield* Output.evaluate(node.bindings, outputs));
|
|
1235
1421
|
|
|
1422
|
+
if (!admitted) {
|
|
1423
|
+
yield* admit(news);
|
|
1424
|
+
}
|
|
1425
|
+
if (node.deleteFirst && !deletedFirst) {
|
|
1426
|
+
yield* deleteFirst();
|
|
1427
|
+
}
|
|
1428
|
+
|
|
1236
1429
|
attr = yield* node.provider
|
|
1237
1430
|
.reconcile({
|
|
1238
1431
|
id: logicalId,
|
|
@@ -1304,23 +1497,23 @@ const executeNode = (
|
|
|
1304
1497
|
return;
|
|
1305
1498
|
}
|
|
1306
1499
|
|
|
1307
|
-
return yield* Effect.die(`Unknown action: ${node.action}`);
|
|
1500
|
+
return yield* Effect.die(`Unknown action: ${(node as { action: string }).action}`);
|
|
1308
1501
|
}).pipe(
|
|
1309
1502
|
Effect.catchCause((cause) =>
|
|
1310
1503
|
// Record the failure, propagate it to any downstream resources waiting on
|
|
1311
1504
|
// our Deferred (so their waitForDeps short-circuits instead of deadlocking),
|
|
1312
|
-
// emit a "fail" status
|
|
1505
|
+
// emit a "fail" status, and resolve to void so Effect.all
|
|
1313
1506
|
// does not interrupt sibling fibers. The aggregated cause is raised at
|
|
1314
1507
|
// the end of executePlan.
|
|
1315
1508
|
Effect.gen(function* () {
|
|
1316
1509
|
failures.push({ fqn, logicalId: node.resource.LogicalId, type: node.resource.Type, cause });
|
|
1317
1510
|
yield* Deferred.failCause(ready[fqn], cause as Cause.Cause<never>);
|
|
1318
1511
|
yield* Deferred.failCause(readyStable[fqn], cause as Cause.Cause<never>);
|
|
1319
|
-
yield*
|
|
1320
|
-
|
|
1512
|
+
yield* reportEvent({
|
|
1513
|
+
type: "apply.resource.status",
|
|
1321
1514
|
fqn,
|
|
1322
1515
|
id: node.resource.LogicalId,
|
|
1323
|
-
|
|
1516
|
+
resourceType: node.resource.Type,
|
|
1324
1517
|
status: "fail",
|
|
1325
1518
|
message: failureMessage(cause),
|
|
1326
1519
|
providerMode: node.mode,
|
|
@@ -1380,7 +1573,7 @@ const executeActionNode = (
|
|
|
1380
1573
|
providerMode?: ProviderMode;
|
|
1381
1574
|
}
|
|
1382
1575
|
>,
|
|
1383
|
-
|
|
1576
|
+
reportEvent: Reporter,
|
|
1384
1577
|
state: {
|
|
1385
1578
|
set: <V extends PersistedState>(req: {
|
|
1386
1579
|
stack: string;
|
|
@@ -1403,7 +1596,13 @@ const executeActionNode = (
|
|
|
1403
1596
|
state.set({ stack: stackName, stage, fqn, value: { ...value, namespace } as S });
|
|
1404
1597
|
|
|
1405
1598
|
const report = (status: ApplyStatus) =>
|
|
1406
|
-
|
|
1599
|
+
reportEvent({
|
|
1600
|
+
type: "apply.resource.status",
|
|
1601
|
+
fqn,
|
|
1602
|
+
id: logicalId,
|
|
1603
|
+
resourceType: task.Type,
|
|
1604
|
+
status,
|
|
1605
|
+
});
|
|
1407
1606
|
|
|
1408
1607
|
const signalReady = Deferred.succeed(ready[fqn], void 0);
|
|
1409
1608
|
const signalReadyStable = Deferred.succeed(readyStable[fqn], void 0);
|
|
@@ -1494,11 +1693,11 @@ const executeActionNode = (
|
|
|
1494
1693
|
failures.push({ fqn, logicalId: node.def.LogicalId, type: node.def.Type, cause });
|
|
1495
1694
|
yield* Deferred.failCause(ready[fqn], cause as Cause.Cause<never>);
|
|
1496
1695
|
yield* Deferred.failCause(readyStable[fqn], cause as Cause.Cause<never>);
|
|
1497
|
-
yield*
|
|
1498
|
-
|
|
1696
|
+
yield* reportEvent({
|
|
1697
|
+
type: "apply.resource.status",
|
|
1499
1698
|
fqn,
|
|
1500
1699
|
id: node.def.LogicalId,
|
|
1501
|
-
|
|
1700
|
+
resourceType: node.def.Type,
|
|
1502
1701
|
status: "fail",
|
|
1503
1702
|
message: failureMessage(cause),
|
|
1504
1703
|
});
|
|
@@ -1537,7 +1736,7 @@ const converge = Effect.fn(function* (
|
|
|
1537
1736
|
providerMode?: ProviderMode;
|
|
1538
1737
|
}
|
|
1539
1738
|
>,
|
|
1540
|
-
|
|
1739
|
+
reportEvent: Reporter,
|
|
1541
1740
|
state: {
|
|
1542
1741
|
set: <V extends PersistedState>(req: {
|
|
1543
1742
|
stack: string;
|
|
@@ -1574,17 +1773,33 @@ const converge = Effect.fn(function* (
|
|
|
1574
1773
|
const namespace = node.resource.Namespace;
|
|
1575
1774
|
const instanceId = tracker[fqn].instanceId;
|
|
1576
1775
|
|
|
1577
|
-
const scopedSession =
|
|
1578
|
-
|
|
1579
|
-
|
|
1580
|
-
|
|
1581
|
-
|
|
1582
|
-
|
|
1583
|
-
|
|
1584
|
-
|
|
1585
|
-
|
|
1586
|
-
|
|
1587
|
-
|
|
1776
|
+
const scopedSession = resourceSession(reportEvent, fqn, logicalId);
|
|
1777
|
+
|
|
1778
|
+
// A cycle peer resolves against its peers' first outputs, so an
|
|
1779
|
+
// identity checked then may resolve differently now. Check the identity
|
|
1780
|
+
// these props resolve to before reconcile claims it.
|
|
1781
|
+
const deferredAdoption = "deferredAdoption" in node ? node.deferredAdoption : undefined;
|
|
1782
|
+
if (propsChanged && deferredAdoption !== undefined) {
|
|
1783
|
+
const observed = yield* observeResolved(
|
|
1784
|
+
node,
|
|
1785
|
+
newProps,
|
|
1786
|
+
fqn,
|
|
1787
|
+
logicalId,
|
|
1788
|
+
instanceId,
|
|
1789
|
+
tracker[fqn].output,
|
|
1790
|
+
);
|
|
1791
|
+
if (observed !== undefined && Unowned.is(observed) && !deferredAdoption.adopt) {
|
|
1792
|
+
return yield* new OwnedBySomeoneElse({
|
|
1793
|
+
message:
|
|
1794
|
+
`Cannot converge resource '${fqn}' (${node.resource.Type}): ` +
|
|
1795
|
+
"its final identity exists in the cloud but is not owned by this " +
|
|
1796
|
+
"stack/stage/logical-id. Re-run with `--adopt` (or " +
|
|
1797
|
+
"wrap the effect in `adopt(true)`) to take it over.",
|
|
1798
|
+
resourceType: node.resource.Type,
|
|
1799
|
+
logicalId,
|
|
1800
|
+
});
|
|
1801
|
+
}
|
|
1802
|
+
}
|
|
1588
1803
|
|
|
1589
1804
|
const attr = yield* node.provider
|
|
1590
1805
|
.reconcile({
|
|
@@ -1764,7 +1979,7 @@ export class DestroyError extends Data.TaggedError("DestroyError")<{
|
|
|
1764
1979
|
}
|
|
1765
1980
|
}
|
|
1766
1981
|
|
|
1767
|
-
const collectGarbage = Effect.fn(function* (plan: Plan,
|
|
1982
|
+
const collectGarbage = Effect.fn(function* (plan: Plan, reportEvent: Reporter) {
|
|
1768
1983
|
const state = yield* yield* State;
|
|
1769
1984
|
const stack = yield* Stack;
|
|
1770
1985
|
const stackName = stack.name;
|
|
@@ -1773,28 +1988,28 @@ const collectGarbage = Effect.fn(function* (plan: Plan, session: PlanStatusSessi
|
|
|
1773
1988
|
// Task deletions are pure state drops — no body is invoked. Run them in
|
|
1774
1989
|
// parallel before resource GC; tasks never have provider-side dependencies
|
|
1775
1990
|
// to wait on.
|
|
1776
|
-
yield* Effect.
|
|
1777
|
-
Object.entries(plan.actionDeletions ?? {})
|
|
1991
|
+
yield* Effect.forEach(
|
|
1992
|
+
Object.entries(plan.actionDeletions ?? {}),
|
|
1993
|
+
([fqn, node]) =>
|
|
1778
1994
|
node === undefined
|
|
1779
1995
|
? Effect.void
|
|
1780
1996
|
: Effect.gen(function* () {
|
|
1781
|
-
yield*
|
|
1782
|
-
|
|
1997
|
+
yield* reportEvent({
|
|
1998
|
+
type: "apply.resource.status",
|
|
1783
1999
|
fqn,
|
|
1784
2000
|
id: node.def.LogicalId,
|
|
1785
|
-
|
|
2001
|
+
resourceType: node.def.Type,
|
|
1786
2002
|
status: "deleting",
|
|
1787
2003
|
});
|
|
1788
2004
|
yield* state.delete({ stack: stackName, stage, fqn });
|
|
1789
|
-
yield*
|
|
1790
|
-
|
|
2005
|
+
yield* reportEvent({
|
|
2006
|
+
type: "apply.resource.status",
|
|
1791
2007
|
fqn,
|
|
1792
2008
|
id: node.def.LogicalId,
|
|
1793
|
-
|
|
2009
|
+
resourceType: node.def.Type,
|
|
1794
2010
|
status: "deleted",
|
|
1795
2011
|
});
|
|
1796
2012
|
}),
|
|
1797
|
-
),
|
|
1798
2013
|
{ concurrency: "unbounded" },
|
|
1799
2014
|
);
|
|
1800
2015
|
|
|
@@ -1897,6 +2112,9 @@ const collectGarbage = Effect.fn(function* (plan: Plan, session: PlanStatusSessi
|
|
|
1897
2112
|
const adoptionBlocked = isDeleteNode(node)
|
|
1898
2113
|
? node.state.adoptionBlocked
|
|
1899
2114
|
: generation.adoptionBlocked;
|
|
2115
|
+
const incompleteProps = isDeleteNode(node)
|
|
2116
|
+
? node.state.propsIncomplete
|
|
2117
|
+
: generation.propsIncomplete;
|
|
1900
2118
|
// Mutable: an attr-less row (interrupted create) may recover its
|
|
1901
2119
|
// attributes from `provider.read` below, right before deletion.
|
|
1902
2120
|
let attr = persistedAttr;
|
|
@@ -1921,27 +2139,18 @@ const collectGarbage = Effect.fn(function* (plan: Plan, session: PlanStatusSessi
|
|
|
1921
2139
|
} as S,
|
|
1922
2140
|
});
|
|
1923
2141
|
|
|
1924
|
-
const report = (status: ApplyStatus) =>
|
|
1925
|
-
|
|
1926
|
-
|
|
2142
|
+
const report = (status: ApplyStatus, message?: string) =>
|
|
2143
|
+
reportEvent({
|
|
2144
|
+
type: "apply.resource.status",
|
|
1927
2145
|
fqn,
|
|
1928
2146
|
id: logicalId,
|
|
1929
|
-
|
|
2147
|
+
resourceType,
|
|
1930
2148
|
status,
|
|
2149
|
+
message,
|
|
1931
2150
|
providerMode,
|
|
1932
2151
|
});
|
|
1933
2152
|
|
|
1934
|
-
const scopedSession =
|
|
1935
|
-
...session,
|
|
1936
|
-
note: (note, options?) =>
|
|
1937
|
-
session.emit({
|
|
1938
|
-
fqn,
|
|
1939
|
-
id: logicalId,
|
|
1940
|
-
_tag: "apply.resource.note",
|
|
1941
|
-
message: note,
|
|
1942
|
-
kind: options?.kind,
|
|
1943
|
-
}),
|
|
1944
|
-
} satisfies ScopedPlanStatusSession;
|
|
2153
|
+
const scopedSession = resourceSession(reportEvent, fqn, logicalId);
|
|
1945
2154
|
|
|
1946
2155
|
return yield* (deletions[fqn] ??= yield* Effect.cached(
|
|
1947
2156
|
Effect.gen(function* () {
|
|
@@ -1950,8 +2159,9 @@ const collectGarbage = Effect.fn(function* (plan: Plan, session: PlanStatusSessi
|
|
|
1950
2159
|
// this resource legitimately undeletable (dependency violation),
|
|
1951
2160
|
// so it is skipped with a "blocked by" note instead of surfacing
|
|
1952
2161
|
// a spurious second error.
|
|
1953
|
-
const dependents = yield* Effect.
|
|
1954
|
-
downstream
|
|
2162
|
+
const dependents = yield* Effect.forEach(
|
|
2163
|
+
downstream,
|
|
2164
|
+
(dep) =>
|
|
1955
2165
|
dep !== fqn && !ancestors.has(dep)
|
|
1956
2166
|
? dep in deletionGraph
|
|
1957
2167
|
? deleteResource(
|
|
@@ -1965,7 +2175,6 @@ const collectGarbage = Effect.fn(function* (plan: Plan, session: PlanStatusSessi
|
|
|
1965
2175
|
outcome: unresolved.has(dep) ? ("failed" as const) : ("deleted" as const),
|
|
1966
2176
|
}))
|
|
1967
2177
|
: Effect.succeed({ dep, outcome: "deleted" as const }),
|
|
1968
|
-
),
|
|
1969
2178
|
{ concurrency: "unbounded" },
|
|
1970
2179
|
);
|
|
1971
2180
|
|
|
@@ -1998,7 +2207,7 @@ const collectGarbage = Effect.fn(function* (plan: Plan, session: PlanStatusSessi
|
|
|
1998
2207
|
Effect.gen(function* () {
|
|
1999
2208
|
unresolved.add(fqn);
|
|
2000
2209
|
failures.push({ fqn, logicalId, resourceType, cause });
|
|
2001
|
-
yield* report("fail");
|
|
2210
|
+
yield* report("fail", failureMessage(cause));
|
|
2002
2211
|
return "failed" as const;
|
|
2003
2212
|
}),
|
|
2004
2213
|
),
|
|
@@ -2050,6 +2259,13 @@ const collectGarbage = Effect.fn(function* (plan: Plan, session: PlanStatusSessi
|
|
|
2050
2259
|
"migrated predecessor. Any interrupted new physical " +
|
|
2051
2260
|
"resource must be identified and cleaned up manually.",
|
|
2052
2261
|
);
|
|
2262
|
+
} else if (incompleteProps) {
|
|
2263
|
+
yield* scopedSession.note(
|
|
2264
|
+
"Skipping recovery: unresolved properties were omitted from " +
|
|
2265
|
+
"this interrupted create's state, so they cannot identify it. " +
|
|
2266
|
+
"Any interrupted physical resource must be identified and " +
|
|
2267
|
+
"cleaned up manually.",
|
|
2268
|
+
);
|
|
2053
2269
|
} else if (provider.read) {
|
|
2054
2270
|
const recovered = yield* provider
|
|
2055
2271
|
.read({ id: logicalId, fqn, instanceId, olds: props as never, output: undefined })
|
|
@@ -2111,6 +2327,7 @@ const collectGarbage = Effect.fn(function* (plan: Plan, session: PlanStatusSessi
|
|
|
2111
2327
|
removalPolicy: node.resource.RemovalPolicy,
|
|
2112
2328
|
providerMode,
|
|
2113
2329
|
adoptionBlocked,
|
|
2330
|
+
propsIncomplete: incompleteProps,
|
|
2114
2331
|
});
|
|
2115
2332
|
}
|
|
2116
2333
|
|
|
@@ -2181,6 +2398,7 @@ const collectGarbage = Effect.fn(function* (plan: Plan, session: PlanStatusSessi
|
|
|
2181
2398
|
bindings: excludeDeletedBindings(node.bindings),
|
|
2182
2399
|
removalPolicy: node.removalPolicy,
|
|
2183
2400
|
providerMode: node.providerMode,
|
|
2401
|
+
propsIncomplete: node.propsIncomplete,
|
|
2184
2402
|
});
|
|
2185
2403
|
}
|
|
2186
2404
|
yield* scopedSession.note(
|
|
@@ -2206,10 +2424,9 @@ const collectGarbage = Effect.fn(function* (plan: Plan, session: PlanStatusSessi
|
|
|
2206
2424
|
// retained) inside each node's delete effect — the effects resolve to
|
|
2207
2425
|
// outcomes and never fail, so one bad resource never interrupts sibling
|
|
2208
2426
|
// deletions mid-flight.
|
|
2209
|
-
yield* Effect.
|
|
2210
|
-
Object.values(deletionGraph)
|
|
2211
|
-
|
|
2212
|
-
.map((node) => deleteResource(node)),
|
|
2427
|
+
yield* Effect.forEach(
|
|
2428
|
+
Object.values(deletionGraph).filter((node) => node !== undefined),
|
|
2429
|
+
(node) => deleteResource(node),
|
|
2213
2430
|
{ concurrency: "unbounded" },
|
|
2214
2431
|
);
|
|
2215
2432
|
});
|