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/lib/Plan.js
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
/** @effect-diagnostics anyUnknownInErrorContext:off */
|
|
2
1
|
/** @effect-diagnostics missingEffectError:off */
|
|
3
2
|
import * as Cause from "effect/Cause";
|
|
4
3
|
import * as Config from "effect/Config";
|
|
@@ -10,18 +9,19 @@ import * as Option from "effect/Option";
|
|
|
10
9
|
import * as Ref from "effect/Ref";
|
|
11
10
|
import { asEffect } from ".//Util/types.js";
|
|
12
11
|
import { isAction } from "./Action.js";
|
|
13
|
-
import { AdoptPolicy, OwnedBySomeoneElse, stripUnowned, Unowned } from "./AdoptPolicy.js";
|
|
12
|
+
import { AdoptPolicy, OwnedBySomeoneElse, stripUnowned, Unowned, UnverifiableReplacement, } from "./AdoptPolicy.js";
|
|
14
13
|
import { AlchemyContext } from "./AlchemyContext.js";
|
|
15
14
|
import { Artifacts, ArtifactStore, createArtifactStore, ensureArtifactStore, makeScopedArtifacts, } from "./Artifacts.js";
|
|
16
15
|
import { demandRemoteCredentials, failCredentialsRequired } from "./Auth/Demand.js";
|
|
17
16
|
import { dedupeBindings, diffBindings, havePropsChanged, isResolved, } from "./Diff.js";
|
|
17
|
+
import { emit } from "./Events.js";
|
|
18
18
|
import { parseFqn } from "./FQN.js";
|
|
19
19
|
import { generateInstanceId } from "./InstanceId.js";
|
|
20
20
|
import * as Output from "./Output.js";
|
|
21
21
|
import { tryFindProviderRegistrationByType, missingProviderError, Provider, providerForMode, tryFindProviderByType, } from "./Provider.js";
|
|
22
22
|
import { defaultProviderMode, stampedMode } from "./ProviderMode.js";
|
|
23
|
-
import {
|
|
24
|
-
import { isResource, missingImplementation, } from "./Resource.js";
|
|
23
|
+
import { ProtectedResource } from "./RemovalPolicy.js";
|
|
24
|
+
import { isResource, LookupOfManagedResourceError, missingImplementation, } from "./Resource.js";
|
|
25
25
|
import { ResourceContext } from "./ResourceContext.js";
|
|
26
26
|
import { InvalidResourceSelection, UnsafeSelectionBoundary, selectResources, } from "./ResourceSelection.js";
|
|
27
27
|
import { capturedEnvKeys } from "./RuntimeContext.js";
|
|
@@ -30,7 +30,7 @@ export { InvalidResourceSelection, UnsafeSelectionBoundary } from "./ResourceSel
|
|
|
30
30
|
import {} from "./Stack.js";
|
|
31
31
|
import { isActionState, State, } from "./State/index.js";
|
|
32
32
|
import { isPlainData, mapPlainData } from "./Util/data.js";
|
|
33
|
-
import { findCycleMembers } from "./Util/scc.js";
|
|
33
|
+
import { findCycleMembers, findCycles } from "./Util/scc.js";
|
|
34
34
|
import { hashInput } from "./Util/sha256.js";
|
|
35
35
|
const describeBinding = (binding) => ({
|
|
36
36
|
sid: binding.sid,
|
|
@@ -75,16 +75,91 @@ export const describePlan = (plan) => ({
|
|
|
75
75
|
export function make(stack, options = {}) {
|
|
76
76
|
return makePlan(stack, options);
|
|
77
77
|
}
|
|
78
|
+
/**
|
|
79
|
+
* Bind every ref to a resource this program declares in its own stack and
|
|
80
|
+
* stage, so the ref is a dependency like a direct reference: the target is
|
|
81
|
+
* created first and deleted last, and the ref resolves to the target's fresh
|
|
82
|
+
* attributes (see `Output.bindRef`). A ref is matched by its id against the
|
|
83
|
+
* declared resource's FQN, which is what the ref reads from state. A
|
|
84
|
+
* resource's ref to itself stays unbound: it reads its own persisted state.
|
|
85
|
+
*/
|
|
86
|
+
const bindSameStackRefs = (stack, resources, actions) => {
|
|
87
|
+
const byFqn = new Map(resources.map((resource) => [resource.FQN, resource]));
|
|
88
|
+
const bind = (owner, value) => {
|
|
89
|
+
const edges = [];
|
|
90
|
+
for (const ref of Output.collectRefs(value)) {
|
|
91
|
+
if ((ref.stack ?? stack.name) !== stack.name)
|
|
92
|
+
continue;
|
|
93
|
+
if ((ref.stage ?? stack.stage) !== stack.stage)
|
|
94
|
+
continue;
|
|
95
|
+
if (ref.resourceId === owner)
|
|
96
|
+
continue;
|
|
97
|
+
const target = byFqn.get(ref.resourceId);
|
|
98
|
+
if (target !== undefined) {
|
|
99
|
+
Output.bindRef(ref, target);
|
|
100
|
+
edges.push({ owner, target: target.FQN });
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
return edges;
|
|
104
|
+
};
|
|
105
|
+
const propEdges = [];
|
|
106
|
+
for (const resource of resources) {
|
|
107
|
+
propEdges.push(...bind(resource.FQN, resource.Props));
|
|
108
|
+
bind(resource.FQN, stack.bindings[resource.FQN] ?? []);
|
|
109
|
+
}
|
|
110
|
+
for (const action of actions) {
|
|
111
|
+
bind(action.FQN, [action.Input, action.Captures]);
|
|
112
|
+
}
|
|
113
|
+
return propEdges;
|
|
114
|
+
};
|
|
115
|
+
/**
|
|
116
|
+
* A same-stack ref in a resource's props closes a cycle through props: the
|
|
117
|
+
* ref's target depends, through props, on the resource holding the ref. A
|
|
118
|
+
* direct reference can't form this cycle (it needs the declaration first),
|
|
119
|
+
* so only a ref can, and neither resource can resolve its props before the
|
|
120
|
+
* other. The plan fails instead of waiting forever or deploying a stale
|
|
121
|
+
* value. The fix belongs to the provider whose props carry the ref: keep in
|
|
122
|
+
* props only what the provider can't move into a binding.
|
|
123
|
+
*/
|
|
124
|
+
export class RefCycleError extends Data.TaggedError("RefCycleError") {
|
|
125
|
+
}
|
|
126
|
+
/**
|
|
127
|
+
* The first ref edge whose target reaches its owner through props, if any
|
|
128
|
+
* (see {@link RefCycleError}).
|
|
129
|
+
*/
|
|
130
|
+
const findRefCycle = (edges, upstream) => {
|
|
131
|
+
for (const edge of edges) {
|
|
132
|
+
// Depth-first from the target along prop dependencies, back to the owner.
|
|
133
|
+
const visited = new Set();
|
|
134
|
+
const walk = (fqn, path) => {
|
|
135
|
+
if (fqn === edge.owner)
|
|
136
|
+
return path;
|
|
137
|
+
if (visited.has(fqn))
|
|
138
|
+
return undefined;
|
|
139
|
+
visited.add(fqn);
|
|
140
|
+
for (const next of upstream[fqn] ?? []) {
|
|
141
|
+
const found = walk(next, [...path, next]);
|
|
142
|
+
if (found)
|
|
143
|
+
return found;
|
|
144
|
+
}
|
|
145
|
+
return undefined;
|
|
146
|
+
};
|
|
147
|
+
const path = walk(edge.target, [edge.target]);
|
|
148
|
+
if (path)
|
|
149
|
+
return { edge, path: [edge.owner, ...path] };
|
|
150
|
+
}
|
|
151
|
+
return undefined;
|
|
152
|
+
};
|
|
78
153
|
const makePlan = (stack, options = {}) =>
|
|
79
154
|
// @ts-expect-error
|
|
80
155
|
Effect.gen(function* () {
|
|
81
156
|
// Per-resource plan progress and phase markers are reported through
|
|
82
|
-
//
|
|
157
|
+
// events as the work happens, so a renderer can show
|
|
83
158
|
// plan computation while it runs. The default reporter is a no-op.
|
|
84
|
-
const reportPlanned = yield* Progress;
|
|
85
159
|
const declaredResources = Object.values(stack.resources);
|
|
86
160
|
const declaredActions = Object.values(stack.actions ?? {});
|
|
87
161
|
const declared = [...declaredResources, ...declaredActions];
|
|
162
|
+
const refPropEdges = bindSameStackRefs(stack, declaredResources, declaredActions);
|
|
88
163
|
const upstream = (node) => Object.keys(Output.upstreamAny(isAction(node)
|
|
89
164
|
? [node.Input, node.Captures]
|
|
90
165
|
: [node.Props, stack.bindings[node.FQN] ?? []]));
|
|
@@ -92,7 +167,7 @@ Effect.gen(function* () {
|
|
|
92
167
|
const resources = declaredResources.filter((node) => !selected || selected.has(node.FQN));
|
|
93
168
|
const actions = declaredActions.filter((node) => !selected || selected.has(node.FQN));
|
|
94
169
|
// Resolving the state service may bootstrap a remote store.
|
|
95
|
-
yield*
|
|
170
|
+
yield* emit({ type: "plan.phase", phase: "loading-state" });
|
|
96
171
|
const state = yield* yield* State;
|
|
97
172
|
// A bare platform tag yields a forward reference registered with
|
|
98
173
|
// `undefined` props (and `RequiresImplementation`); its `.make(props,
|
|
@@ -162,7 +237,7 @@ Effect.gen(function* () {
|
|
|
162
237
|
stack: stackName,
|
|
163
238
|
stage: stage,
|
|
164
239
|
});
|
|
165
|
-
const oldResources = yield* Effect.
|
|
240
|
+
const oldResources = yield* Effect.forEach(resourceFqns, (fqn) => state.get({ stack: stackName, stage: stage, fqn }), { concurrency: "unbounded" });
|
|
166
241
|
// Snapshot of every persisted row, keyed by FQN. The rename resolution
|
|
167
242
|
// below reads from this map instead of issuing per-FQN `state.get`s —
|
|
168
243
|
// every renamedFrom-decorated resource (each StaticSite carries one
|
|
@@ -213,7 +288,7 @@ Effect.gen(function* () {
|
|
|
213
288
|
if (remote.length > 0)
|
|
214
289
|
yield* demandRemoteCredentials(remote);
|
|
215
290
|
}
|
|
216
|
-
yield*
|
|
291
|
+
yield* emit({ type: "plan.phase", phase: "computing-plan" });
|
|
217
292
|
// ── FQN renames ──────────────────────────────────────────────────────
|
|
218
293
|
// Map every former FQN claimed via `renamedFrom(...)` to its claimant's
|
|
219
294
|
// current FQN. Two resources claiming the same former FQN is ambiguous
|
|
@@ -383,109 +458,184 @@ Effect.gen(function* () {
|
|
|
383
458
|
// `cachedInScope`): a diff that fails or is cancelled must not take the
|
|
384
459
|
// resolution every other diff is waiting on down with it.
|
|
385
460
|
const memoScope = yield* Effect.scope;
|
|
386
|
-
const
|
|
387
|
-
const
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
461
|
+
const haveBindingsChanged = (olds, news) => diffBindings(olds, news).some((binding) => binding.action !== "noop");
|
|
462
|
+
const exposeResource = (resourceExpr, peers) =>
|
|
463
|
+
// @ts-expect-error
|
|
464
|
+
Effect.gen(function* () {
|
|
465
|
+
const resource = resourceExpr.src;
|
|
466
|
+
const nothing = { value: resourceExpr, extent: "nothing" };
|
|
467
|
+
const { provider, mode } = yield* resolveProviderAndMode(resource);
|
|
468
|
+
const props = materializeStableRefs(yield* resolveInput(resource.Props, undefined, peers));
|
|
469
|
+
// Falls back to the row at a former FQN (`renamedFrom`) so a
|
|
470
|
+
// renamed resource's stable attributes keep flowing to
|
|
471
|
+
// downstream diffs across the migration.
|
|
472
|
+
const { row: oldState } = yield* getPersistedRow(resource);
|
|
473
|
+
if (!oldState || oldState.status === "creating") {
|
|
474
|
+
return nothing;
|
|
392
475
|
}
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
newBindings,
|
|
434
|
-
})
|
|
435
|
-
.pipe(providePlanScope(resource, oldState.instanceId))
|
|
436
|
-
: Effect.succeed(undefined);
|
|
437
|
-
// A present `diff.stables` is authoritative for this update and
|
|
438
|
-
// overrides `provider.stables`. We only fall back to the
|
|
439
|
-
// provider-level "always stable" list when the diff does not
|
|
440
|
-
// return one (e.g. no diff fn, or a diff that omits `stables`).
|
|
441
|
-
const stables = diff?.stables ?? provider.stables ?? [];
|
|
442
|
-
const withStables = (output) => stables.length > 0
|
|
443
|
-
? new Output.ResourceExpr(resourceExpr.src, Object.fromEntries(stables.map((stable) => [stable, output?.[stable]])))
|
|
444
|
-
: // if there are no stable properties, treat every property as changed
|
|
445
|
-
resourceExpr;
|
|
446
|
-
if (diff == null) {
|
|
447
|
-
if (havePropsChanged(oldProps, props) ||
|
|
448
|
-
(!combinedCycleMembers.has(resource.FQN) &&
|
|
449
|
-
diffBindings(oldBindings, newBindings).some((binding) => binding.action !== "noop"))) {
|
|
450
|
-
// the props have changed but the provider did not provide any hints as to what is stable
|
|
451
|
-
// so we must assume everything has changed
|
|
452
|
-
return withStables(oldState?.attr);
|
|
453
|
-
}
|
|
454
|
-
}
|
|
455
|
-
else if (diff.action === "update") {
|
|
456
|
-
return withStables(oldState?.attr);
|
|
457
|
-
}
|
|
458
|
-
else if (diff.action === "replace") {
|
|
459
|
-
return resourceExpr;
|
|
460
|
-
}
|
|
461
|
-
// `--force` upgrades this resource's noop to an update (see the
|
|
462
|
-
// diff mapping in the resource-graph pass below), so its
|
|
463
|
-
// `reconcile` WILL re-run and may produce fresh attributes —
|
|
464
|
-
// that is the point of --force. Returning the persisted attr
|
|
465
|
-
// snapshot here would bake potentially-stale values into every
|
|
466
|
-
// consumer's plan props and binding data, so consumers would
|
|
467
|
-
// keep the stale attrs even though the upstream just
|
|
468
|
-
// re-reconciled. Expose only the stable attributes and let
|
|
469
|
-
// apply re-evaluate the rest against the forced reconcile's
|
|
470
|
-
// fresh output. A noop diff may carry `stables` for exactly this
|
|
471
|
-
// case (conditional stables such as a rename-mutable `name`);
|
|
472
|
-
// without them the forced upstream would only expose
|
|
473
|
-
// `provider.stables` and identity-sensitive consumers would
|
|
474
|
-
// falsely plan a replacement (#1832).
|
|
475
|
-
if (options.force) {
|
|
476
|
-
return withStables(oldState?.attr);
|
|
476
|
+
// The resource is switching provider modes (local ⇄ live):
|
|
477
|
+
// it will be replaced, so nothing about the persisted attrs
|
|
478
|
+
// is stable for downstream consumers.
|
|
479
|
+
if (hasModeSwitched(mode, oldState)) {
|
|
480
|
+
return nothing;
|
|
481
|
+
}
|
|
482
|
+
const oldProps = oldState.status === "updating" ? oldState.old.props : oldState.props;
|
|
483
|
+
// Normalize both sides through `dedupeBindings` so the binding
|
|
484
|
+
// sets handed to `diff` are deduped AND sid-sorted — provider
|
|
485
|
+
// diffs that hash/compare the arrays never churn on
|
|
486
|
+
// registration-order flips (or on legacy unsorted state).
|
|
487
|
+
const oldBindings = dedupeBindings(oldState.bindings ?? []);
|
|
488
|
+
const bindings = stack.bindings[resource.FQN] ?? [];
|
|
489
|
+
// A cycle member's bindings hold its peers' outputs: they stay
|
|
490
|
+
// unresolved, and are left out of the comparison, until those are known.
|
|
491
|
+
const blind = peers !== undefined && peers.exposures === undefined;
|
|
492
|
+
const newBindings = dedupeBindings(blind ? bindings : yield* resolveInput(bindings, undefined, peers));
|
|
493
|
+
const diff = yield* provider.diff
|
|
494
|
+
? provider
|
|
495
|
+
.diff({
|
|
496
|
+
id: resource.LogicalId,
|
|
497
|
+
fqn: resource.FQN,
|
|
498
|
+
olds: oldProps,
|
|
499
|
+
instanceId: oldState.instanceId,
|
|
500
|
+
news: props,
|
|
501
|
+
output: oldState.attr,
|
|
502
|
+
oldBindings,
|
|
503
|
+
newBindings,
|
|
504
|
+
})
|
|
505
|
+
.pipe(providePlanScope(resource, oldState.instanceId))
|
|
506
|
+
: Effect.undefined;
|
|
507
|
+
// A present `diff.stables` is authoritative for this update and
|
|
508
|
+
// overrides `provider.stables`. We only fall back to the
|
|
509
|
+
// provider-level "always stable" list when the diff does not
|
|
510
|
+
// return one (e.g. no diff fn, or a diff that omits `stables`).
|
|
511
|
+
const stables = diff?.stables ?? provider.stables ?? [];
|
|
512
|
+
const surviving = stables.length > 0
|
|
513
|
+
? {
|
|
514
|
+
value: new Output.ResourceExpr(resourceExpr.src, Object.fromEntries(stables.map((stable) => [stable, oldState.attr?.[stable]]))),
|
|
515
|
+
extent: `stables:${[...stables].sort().join(",")}`,
|
|
477
516
|
}
|
|
478
|
-
if
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
517
|
+
: // if there are no stable properties, treat every property as changed
|
|
518
|
+
nothing;
|
|
519
|
+
if (diff == null) {
|
|
520
|
+
if (havePropsChanged(oldProps, props) ||
|
|
521
|
+
(!blind && haveBindingsChanged(oldBindings, newBindings))) {
|
|
522
|
+
// the props have changed but the provider did not provide any hints as to what is stable
|
|
523
|
+
// so we must assume everything has changed
|
|
524
|
+
return surviving;
|
|
483
525
|
}
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
|
|
526
|
+
}
|
|
527
|
+
else if (diff.action === "update") {
|
|
528
|
+
return surviving;
|
|
529
|
+
}
|
|
530
|
+
else if (diff.action === "replace") {
|
|
531
|
+
return { ...nothing, replace: diff };
|
|
532
|
+
}
|
|
533
|
+
// `--force` upgrades this resource's noop to an update (see the
|
|
534
|
+
// diff mapping in the resource-graph pass below), so its
|
|
535
|
+
// `reconcile` WILL re-run and may produce fresh attributes —
|
|
536
|
+
// that is the point of --force. Returning the persisted attr
|
|
537
|
+
// snapshot here would bake potentially-stale values into every
|
|
538
|
+
// consumer's plan props and binding data, so consumers would
|
|
539
|
+
// keep the stale attrs even though the upstream just
|
|
540
|
+
// re-reconciled. Expose only the stable attributes and let
|
|
541
|
+
// apply re-evaluate the rest against the forced reconcile's
|
|
542
|
+
// fresh output. A noop diff may carry `stables` for exactly this
|
|
543
|
+
// case (conditional stables such as a rename-mutable `name`);
|
|
544
|
+
// without them the forced upstream would only expose
|
|
545
|
+
// `provider.stables` and identity-sensitive consumers would
|
|
546
|
+
// falsely plan a replacement (#1832).
|
|
547
|
+
if (options.force) {
|
|
548
|
+
return surviving;
|
|
549
|
+
}
|
|
550
|
+
if (oldState.status === "created" ||
|
|
551
|
+
oldState.status === "updated" ||
|
|
552
|
+
oldState.status === "replaced") {
|
|
553
|
+
// we can safely return the attributes if we know they have stabilized
|
|
554
|
+
return { value: oldState.attr, extent: "settled", oldBindings };
|
|
555
|
+
}
|
|
556
|
+
else {
|
|
557
|
+
// we must assume the resource doesn't exist if it hasn't stabilized
|
|
558
|
+
return nothing;
|
|
559
|
+
}
|
|
560
|
+
});
|
|
561
|
+
const exposeAction = (resourceExpr, node) => node.action === "noop"
|
|
562
|
+
? { value: node.state.output, extent: "settled" }
|
|
563
|
+
: { value: resourceExpr, extent: "nothing" };
|
|
564
|
+
// A node's exposure with the peers of its cycle, if it has one, at their
|
|
565
|
+
// own first pass.
|
|
566
|
+
const firstPasses = {};
|
|
567
|
+
const firstPass = (resourceExpr) => Effect.gen(function* () {
|
|
568
|
+
const node = resourceExpr.src;
|
|
569
|
+
return yield* (firstPasses[node.FQN] ??= yield* cachedInScope(memoScope)(isAction(node)
|
|
570
|
+
? Effect.map(firstActionPlan(node), (plan) => exposeAction(resourceExpr, plan))
|
|
571
|
+
: exposeResource(resourceExpr, peersOf(node.FQN))));
|
|
572
|
+
});
|
|
573
|
+
const settledCycles = new Map();
|
|
574
|
+
const settle = (members) => Effect.gen(function* () {
|
|
575
|
+
const cached = settledCycles.get(members);
|
|
576
|
+
if (cached)
|
|
577
|
+
return yield* cached;
|
|
578
|
+
const settling = yield* cachedInScope(memoScope)(Effect.gen(function* () {
|
|
579
|
+
const nodes = [...members].map((fqn) => Output.of(nodesByFqn.get(fqn)));
|
|
580
|
+
const first = yield* Effect.forEach(nodes, firstPass, { concurrency: "unbounded" });
|
|
581
|
+
const exposures = new Map(nodes.map((node, i) => [node.src.FQN, first[i].value]));
|
|
582
|
+
const peers = { members, exposures };
|
|
583
|
+
const extents = new Map(nodes.map((node, i) => [node.src.FQN, first[i].extent]));
|
|
584
|
+
const reruns = new Set();
|
|
585
|
+
const expose = (node) => isAction(node.src)
|
|
586
|
+
? Effect.map(planAction(node.src, peers), (plan) => exposeAction(node, plan))
|
|
587
|
+
: exposeResource(node, peers);
|
|
588
|
+
// The members to look at again: first the ones whose bound data
|
|
589
|
+
// differs from what they persisted, then the ones that read a
|
|
590
|
+
// member that changed.
|
|
591
|
+
let suspects = (yield* Effect.forEach(nodes, (node, i) => {
|
|
592
|
+
const { oldBindings } = first[i];
|
|
593
|
+
return oldBindings === undefined
|
|
594
|
+
? Effect.succeed([])
|
|
595
|
+
: resolveInput(stack.bindings[node.src.FQN] ?? [], undefined, peers).pipe(Effect.map((bindings) => haveBindingsChanged(oldBindings, dedupeBindings(bindings)) ? [node] : []));
|
|
596
|
+
}, { concurrency: "unbounded" })).flat();
|
|
597
|
+
// A member only ever exposes less, so this ends; the bound guards
|
|
598
|
+
// a provider whose stable attributes come and go.
|
|
599
|
+
for (let round = 0; suspects.length > 0 && round <= 2 * nodes.length; round++) {
|
|
600
|
+
const exposed = yield* Effect.forEach(suspects, expose, {
|
|
601
|
+
concurrency: "unbounded",
|
|
602
|
+
});
|
|
603
|
+
const changing = new Set();
|
|
604
|
+
suspects.forEach((node, i) => {
|
|
605
|
+
const fqn = node.src.FQN;
|
|
606
|
+
const { extent } = exposed[i];
|
|
607
|
+
if (extent === extents.get(fqn))
|
|
608
|
+
return;
|
|
609
|
+
extents.set(fqn, extent);
|
|
610
|
+
exposures.set(fqn, exposed[i].value);
|
|
611
|
+
changing.add(fqn);
|
|
612
|
+
if (isAction(node.src))
|
|
613
|
+
reruns.add(fqn);
|
|
614
|
+
});
|
|
615
|
+
suspects = nodes.filter((node) => extents.get(node.src.FQN) !== "nothing" &&
|
|
616
|
+
(allUpstreamDependencies[node.src.FQN] ?? []).some((upstream) => changing.has(upstream)));
|
|
487
617
|
}
|
|
488
|
-
|
|
618
|
+
return { exposures, reruns };
|
|
619
|
+
}));
|
|
620
|
+
settledCycles.set(members, settling);
|
|
621
|
+
return yield* settling;
|
|
622
|
+
});
|
|
623
|
+
const resolveResource = (resourceExpr, peers) => Effect.gen(function* () {
|
|
624
|
+
const fqn = resourceExpr.src.FQN;
|
|
625
|
+
if (selected && !selected.has(fqn)) {
|
|
626
|
+
return yield* Effect.die(new UnsafeSelectionBoundary({
|
|
627
|
+
message: `Output evaluation discovered unselected dependency '${fqn}'. Declare the dependency explicitly or run a full deployment.`,
|
|
628
|
+
}));
|
|
629
|
+
}
|
|
630
|
+
if (peers?.members.has(fqn)) {
|
|
631
|
+
return peers.exposures
|
|
632
|
+
? peers.exposures.get(fqn)
|
|
633
|
+
: (yield* firstPass(resourceExpr)).value;
|
|
634
|
+
}
|
|
635
|
+
const cycle = combinedCycles.get(fqn);
|
|
636
|
+
return cycle
|
|
637
|
+
? (yield* settle(cycle)).exposures.get(fqn)
|
|
638
|
+
: (yield* firstPass(resourceExpr)).value;
|
|
489
639
|
});
|
|
490
640
|
/**
|
|
491
641
|
* Resolve an input value as far as *truth* permits, keeping everything
|
|
@@ -503,12 +653,14 @@ Effect.gen(function* () {
|
|
|
503
653
|
// never persist or serialize anyway); an immutable per-level set (not
|
|
504
654
|
// a shared visited-set) keeps legitimately-shared diamond references
|
|
505
655
|
// intact and is race-free under `concurrency: "unbounded"` (#1082).
|
|
506
|
-
ancestors = new Set()
|
|
656
|
+
ancestors = new Set(),
|
|
657
|
+
// The cycle being resolved, if any.
|
|
658
|
+
peers) => Effect.gen(function* () {
|
|
507
659
|
if (!input) {
|
|
508
660
|
return input;
|
|
509
661
|
}
|
|
510
662
|
else if (Output.isExpr(input)) {
|
|
511
|
-
return yield* resolveOutput(input);
|
|
663
|
+
return yield* resolveOutput(input, peers);
|
|
512
664
|
}
|
|
513
665
|
else if (Config.isConfig(input)) {
|
|
514
666
|
// Config is a lazy reference to the deploy environment. Resolve it
|
|
@@ -517,7 +669,7 @@ Effect.gen(function* () {
|
|
|
517
669
|
// providers receive a resolved value instead of a Config object.
|
|
518
670
|
// `Config.Redacted` resolves to a `Redacted`, which stays opaque via
|
|
519
671
|
// the branch below.
|
|
520
|
-
return yield* resolveInput(yield* input, ancestors);
|
|
672
|
+
return yield* resolveInput(yield* input, ancestors, peers);
|
|
521
673
|
}
|
|
522
674
|
else if (isResource(input)) {
|
|
523
675
|
// Resource objects have dynamic properties (path, hash, etc.) that are
|
|
@@ -525,13 +677,13 @@ Effect.gen(function* () {
|
|
|
525
677
|
// Resolve the ResourceExpr to get the actual resource output, then continue
|
|
526
678
|
// resolving any nested outputs in the result.
|
|
527
679
|
const resourceExpr = Output.of(input);
|
|
528
|
-
const resolved = yield* resolveOutput(resourceExpr);
|
|
680
|
+
const resolved = yield* resolveOutput(resourceExpr, peers);
|
|
529
681
|
if (Output.isResourceExpr(resolved)) {
|
|
530
682
|
// Still-unresolved reference (creating, replacing, or updating
|
|
531
683
|
// upstream) — keep it evaluable for Apply.
|
|
532
684
|
return resolved;
|
|
533
685
|
}
|
|
534
|
-
return yield* resolveInput(resolved, ancestors);
|
|
686
|
+
return yield* resolveInput(resolved, ancestors, peers);
|
|
535
687
|
}
|
|
536
688
|
else if (isPlainData(input)) {
|
|
537
689
|
if (ancestors.has(input)) {
|
|
@@ -539,9 +691,11 @@ Effect.gen(function* () {
|
|
|
539
691
|
}
|
|
540
692
|
const nested = new Set(ancestors).add(input);
|
|
541
693
|
if (Array.isArray(input)) {
|
|
542
|
-
return yield* Effect.
|
|
694
|
+
return yield* Effect.forEach(input, (item) => resolveInput(item, nested, peers), {
|
|
695
|
+
concurrency: "unbounded",
|
|
696
|
+
});
|
|
543
697
|
}
|
|
544
|
-
return Object.fromEntries(yield* Effect.
|
|
698
|
+
return Object.fromEntries(yield* Effect.forEach(Object.entries(input), ([key, value]) => resolveInput(value, nested, peers).pipe(Effect.map((value) => [key, value])), { concurrency: "unbounded" }));
|
|
545
699
|
}
|
|
546
700
|
// Everything else is an opaque leaf returned by identity: Duration,
|
|
547
701
|
// Redacted, Date, and effect runtime values (a Worker's `exports`
|
|
@@ -588,32 +742,72 @@ Effect.gen(function* () {
|
|
|
588
742
|
}
|
|
589
743
|
return mapPlainData(input, ancestors, (child) => materializeStableRefs(child, ancestors));
|
|
590
744
|
};
|
|
591
|
-
|
|
745
|
+
// A lookup that finds a resource this stack manages would bind it with
|
|
746
|
+
// no dependency edge. Detected by the provider's static `stables`, the
|
|
747
|
+
// properties that identify a resource; providers without them go unchecked.
|
|
748
|
+
const rejectManagedLookup = Effect.fn(function* (expr, props, attrs) {
|
|
749
|
+
const provider = yield* tryFindProviderByType(expr.lookupType, "live");
|
|
750
|
+
const stables = Option.getOrUndefined(provider)?.stables ?? [];
|
|
751
|
+
if (stables.length === 0)
|
|
752
|
+
return;
|
|
753
|
+
for (const [fqn, row] of persistedRows) {
|
|
754
|
+
if (row === undefined || isActionState(row) || row.resourceType !== expr.lookupType) {
|
|
755
|
+
continue;
|
|
756
|
+
}
|
|
757
|
+
const attr = row.attr;
|
|
758
|
+
// An optional stable (a zone id on an account-level resource) is
|
|
759
|
+
// undefined on both sides and still matches; at least one stable
|
|
760
|
+
// must be set so an empty row never matches everything.
|
|
761
|
+
if (attr !== undefined &&
|
|
762
|
+
stables.some((key) => attr[key] !== undefined) &&
|
|
763
|
+
stables.every((key) => attr[key] === attrs[key])) {
|
|
764
|
+
return yield* Effect.die(new LookupOfManagedResourceError({
|
|
765
|
+
message: `${expr.lookupType}.lookup(${JSON.stringify(props)}) found '${fqn}', which this stack manages. Reference the declared resource instead: a lookup would not stop this stack deleting or replacing it.`,
|
|
766
|
+
type: expr.lookupType,
|
|
767
|
+
props,
|
|
768
|
+
fqn,
|
|
769
|
+
}));
|
|
770
|
+
}
|
|
771
|
+
}
|
|
772
|
+
});
|
|
773
|
+
const resolveOutput = (expr,
|
|
774
|
+
// The cycle being resolved, if any.
|
|
775
|
+
peers) => Effect.gen(function* () {
|
|
592
776
|
if (Output.isResourceExpr(expr)) {
|
|
593
|
-
return yield* resolveResource(expr);
|
|
777
|
+
return yield* resolveResource(expr, peers);
|
|
594
778
|
}
|
|
595
779
|
else if (Output.isPropExpr(expr)) {
|
|
596
|
-
const upstream = yield* resolveOutput(expr.expr);
|
|
780
|
+
const upstream = yield* resolveOutput(expr.expr, peers);
|
|
597
781
|
return upstream?.[expr.identifier];
|
|
598
782
|
}
|
|
599
783
|
else if (Output.isApplyExpr(expr)) {
|
|
600
|
-
const upstream = yield* resolveOutput(expr.expr);
|
|
784
|
+
const upstream = yield* resolveOutput(expr.expr, peers);
|
|
601
785
|
return Output.hasOutputs(upstream) ? expr : expr.f(upstream);
|
|
602
786
|
}
|
|
787
|
+
else if (Output.isLookupExpr(expr)) {
|
|
788
|
+
// Props that depend on a resource still being created resolve at
|
|
789
|
+
// apply, like any other Output.
|
|
790
|
+
const props = yield* resolveInput(expr.expr, undefined, peers);
|
|
791
|
+
if (Output.hasOutputs(props))
|
|
792
|
+
return expr;
|
|
793
|
+
const attrs = yield* expr.f(props);
|
|
794
|
+
yield* rejectManagedLookup(expr, props, attrs);
|
|
795
|
+
return attrs;
|
|
796
|
+
}
|
|
603
797
|
else if (Output.isEffectExpr(expr)) {
|
|
604
|
-
const upstream = yield* resolveOutput(expr.expr);
|
|
798
|
+
const upstream = yield* resolveOutput(expr.expr, peers);
|
|
605
799
|
return Output.hasOutputs(upstream) ? expr : yield* expr.f(upstream);
|
|
606
800
|
}
|
|
607
801
|
else if (Output.isFlatMapExpr(expr)) {
|
|
608
|
-
const upstream = yield* resolveOutput(expr.expr);
|
|
802
|
+
const upstream = yield* resolveOutput(expr.expr, peers);
|
|
609
803
|
// Source still unresolved -> keep the flatMap intact for a later pass.
|
|
610
804
|
// Otherwise run `f` to produce the next Output and resolve into it.
|
|
611
805
|
return Output.hasOutputs(upstream)
|
|
612
806
|
? expr
|
|
613
|
-
: yield* resolveOutput(Output.asOutput(expr.f(upstream)));
|
|
807
|
+
: yield* resolveOutput(Output.asOutput(expr.f(upstream)), peers);
|
|
614
808
|
}
|
|
615
809
|
else if (Output.isAllExpr(expr)) {
|
|
616
|
-
return yield* Effect.
|
|
810
|
+
return yield* Effect.forEach(expr.outs, (out) => resolveOutput(out, peers), {
|
|
617
811
|
concurrency: "unbounded",
|
|
618
812
|
});
|
|
619
813
|
}
|
|
@@ -621,6 +815,12 @@ Effect.gen(function* () {
|
|
|
621
815
|
return expr.value;
|
|
622
816
|
}
|
|
623
817
|
else if (Output.isRefExpr(expr)) {
|
|
818
|
+
// A ref bound to a declared resource resolves like a direct
|
|
819
|
+
// reference: unknown while that resource is being created.
|
|
820
|
+
const target = Output.refTarget(expr);
|
|
821
|
+
if (target !== undefined) {
|
|
822
|
+
return yield* resolveResource(Output.of(target), peers);
|
|
823
|
+
}
|
|
624
824
|
const refStack = expr.stack ?? stackName;
|
|
625
825
|
const refStage = expr.stage ?? stage;
|
|
626
826
|
const refState = yield* state
|
|
@@ -660,7 +860,7 @@ Effect.gen(function* () {
|
|
|
660
860
|
return output;
|
|
661
861
|
}
|
|
662
862
|
else if (Output.isNamedExpr(expr)) {
|
|
663
|
-
return yield* resolveOutput(expr.expr);
|
|
863
|
+
return yield* resolveOutput(expr.expr, peers);
|
|
664
864
|
}
|
|
665
865
|
return yield* Effect.die(new Error("Not implemented yet" + expr.kind));
|
|
666
866
|
});
|
|
@@ -686,6 +886,21 @@ Effect.gen(function* () {
|
|
|
686
886
|
])),
|
|
687
887
|
]),
|
|
688
888
|
]);
|
|
889
|
+
// Fail before resolving anything: a ref that closes a cycle through
|
|
890
|
+
// props would leave both resources waiting on each other (#3112).
|
|
891
|
+
const refCycle = findRefCycle(refPropEdges.filter((edge) => newResourceFqns.has(edge.owner)), newUpstreamDependencies);
|
|
892
|
+
if (refCycle !== undefined) {
|
|
893
|
+
const { edge, path } = refCycle;
|
|
894
|
+
return yield* Effect.die(new RefCycleError({
|
|
895
|
+
message: `'${edge.owner}' references '${edge.target}' through a ref in its props, and ` +
|
|
896
|
+
`'${edge.target}' depends on '${edge.owner}' through props ` +
|
|
897
|
+
`(${path.join(" -> ")}). Neither can be planned before the other. ` +
|
|
898
|
+
`Bind the reference instead of passing it as a prop, so the cycle runs ` +
|
|
899
|
+
`through bindings.`,
|
|
900
|
+
owner: edge.owner,
|
|
901
|
+
target: edge.target,
|
|
902
|
+
}));
|
|
903
|
+
}
|
|
689
904
|
// Map FQN -> list of upstream FQNs from bindings
|
|
690
905
|
const bindingUpstreamDependencies = Object.fromEntries(resources.map((resource) => [
|
|
691
906
|
resource.FQN,
|
|
@@ -725,7 +940,13 @@ Effect.gen(function* () {
|
|
|
725
940
|
// Resources that participate in a cycle when both prop and binding
|
|
726
941
|
// edges are considered. Used below to decide whether an acyclic
|
|
727
942
|
// binding edge should also become a downstream edge.
|
|
728
|
-
const
|
|
943
|
+
const combinedCycles = findCycles(allUpstreamDependencies);
|
|
944
|
+
const combinedCycleMembers = new Set(combinedCycles.keys());
|
|
945
|
+
const peersOf = (fqn) => {
|
|
946
|
+
const members = combinedCycles.get(fqn);
|
|
947
|
+
return members && { members };
|
|
948
|
+
};
|
|
949
|
+
const nodesByFqn = new Map([...resources, ...actions].map((node) => [node.FQN, node]));
|
|
729
950
|
const inputCycleMembers = findCycleMembers({
|
|
730
951
|
...newUpstreamDependencies,
|
|
731
952
|
...Object.fromEntries(actions.map((action) => [
|
|
@@ -794,45 +1015,64 @@ Effect.gen(function* () {
|
|
|
794
1015
|
...resources.map((resource) => [resource.FQN, computeDownstream(resource.FQN)]),
|
|
795
1016
|
...actions.map((action) => [action.FQN, computeDownstream(action.FQN)]),
|
|
796
1017
|
]);
|
|
797
|
-
const
|
|
798
|
-
|
|
799
|
-
|
|
800
|
-
|
|
801
|
-
|
|
802
|
-
|
|
803
|
-
|
|
804
|
-
|
|
805
|
-
|
|
806
|
-
|
|
807
|
-
|
|
808
|
-
|
|
809
|
-
|
|
810
|
-
|
|
811
|
-
|
|
812
|
-
isResolved(resolvedInput) &&
|
|
813
|
-
prior.inputHash === (yield* hashInput(resolvedInput))) {
|
|
814
|
-
return {
|
|
815
|
-
kind: "action",
|
|
816
|
-
action: "noop",
|
|
817
|
-
def: action,
|
|
818
|
-
state: prior,
|
|
819
|
-
downstream,
|
|
820
|
-
};
|
|
821
|
-
}
|
|
1018
|
+
const planAction = Effect.fn(function* (action, peers) {
|
|
1019
|
+
const fqn = action.FQN;
|
|
1020
|
+
const downstream = newDownstreamDependencies[fqn] ?? [];
|
|
1021
|
+
const oldState = yield* state.get({ stack: stackName, stage, fqn });
|
|
1022
|
+
const prior = isActionState(oldState) ? oldState : undefined;
|
|
1023
|
+
const resolvedInput = inputCycleMembers.has(fqn)
|
|
1024
|
+
? action.Input
|
|
1025
|
+
: yield* resolveInput(action.Input, undefined, peers);
|
|
1026
|
+
// Actions are pure in their inputs. Only a completed, unforced run
|
|
1027
|
+
// with fully known, identical inputs has a reusable output.
|
|
1028
|
+
if (prior?.status === "ran" &&
|
|
1029
|
+
!options.force &&
|
|
1030
|
+
!inputCycleMembers.has(fqn) &&
|
|
1031
|
+
isResolved(resolvedInput) &&
|
|
1032
|
+
prior.inputHash === (yield* hashInput(resolvedInput))) {
|
|
822
1033
|
return {
|
|
823
1034
|
kind: "action",
|
|
824
|
-
action: "
|
|
1035
|
+
action: "noop",
|
|
825
1036
|
def: action,
|
|
826
|
-
input: action.Input,
|
|
827
1037
|
state: prior,
|
|
828
1038
|
downstream,
|
|
829
|
-
forced: !!options.force,
|
|
830
1039
|
};
|
|
831
|
-
}
|
|
1040
|
+
}
|
|
1041
|
+
return {
|
|
1042
|
+
kind: "action",
|
|
1043
|
+
action: "run",
|
|
1044
|
+
def: action,
|
|
1045
|
+
input: action.Input,
|
|
1046
|
+
state: prior,
|
|
1047
|
+
downstream,
|
|
1048
|
+
forced: !!options.force,
|
|
1049
|
+
};
|
|
1050
|
+
});
|
|
1051
|
+
const actionPlans = {};
|
|
1052
|
+
// An Action's plan with the peers of its cycle, if it has one, at their
|
|
1053
|
+
// first pass.
|
|
1054
|
+
const firstActionPlan = Effect.fn(function* (action) {
|
|
1055
|
+
return yield* (actionPlans[action.FQN] ??= yield* cachedInScope(memoScope)(planAction(action, peersOf(action.FQN))));
|
|
1056
|
+
});
|
|
1057
|
+
const diffAction = Effect.fn("plan.diff.action")(function* (action) {
|
|
1058
|
+
const plan = yield* firstActionPlan(action);
|
|
1059
|
+
const cycle = combinedCycles.get(action.FQN);
|
|
1060
|
+
// An input of a cycle member can change with what is bound to a peer.
|
|
1061
|
+
return plan.action === "noop" && cycle && (yield* settle(cycle)).reruns.has(action.FQN)
|
|
1062
|
+
? {
|
|
1063
|
+
kind: "action",
|
|
1064
|
+
action: "run",
|
|
1065
|
+
def: action,
|
|
1066
|
+
input: action.Input,
|
|
1067
|
+
state: plan.state,
|
|
1068
|
+
downstream: plan.downstream,
|
|
1069
|
+
forced: false,
|
|
1070
|
+
}
|
|
1071
|
+
: plan;
|
|
832
1072
|
});
|
|
833
1073
|
const plannedCount = yield* Ref.make(0);
|
|
834
|
-
const resourcePlanned = (node) => Ref.updateAndGet(plannedCount, (count) => count + 1).pipe(Effect.flatMap((completed) =>
|
|
835
|
-
|
|
1074
|
+
const resourcePlanned = (node) => Ref.updateAndGet(plannedCount, (count) => count + 1).pipe(Effect.flatMap((completed) => emit({
|
|
1075
|
+
type: "plan.resource.completed",
|
|
836
1076
|
...describeResource(node),
|
|
837
1077
|
completed,
|
|
838
1078
|
total: resources.length,
|
|
@@ -844,8 +1084,8 @@ Effect.gen(function* () {
|
|
|
844
1084
|
// Paired with the resource-planned completion below so renderers can
|
|
845
1085
|
// show what is actually in flight (diffs may read the cloud and run
|
|
846
1086
|
// concurrently — completions alone hide the slow tail).
|
|
847
|
-
yield*
|
|
848
|
-
|
|
1087
|
+
yield* emit({
|
|
1088
|
+
type: "plan.resource.started",
|
|
849
1089
|
fqn,
|
|
850
1090
|
logicalId: id,
|
|
851
1091
|
resourceType: resource.Type,
|
|
@@ -1032,11 +1272,16 @@ Effect.gen(function* () {
|
|
|
1032
1272
|
mode,
|
|
1033
1273
|
renamedFrom,
|
|
1034
1274
|
adoptionBlocked: reusesMigratedFqn ? "migrated-fqn" : undefined,
|
|
1035
|
-
deferredAdoption:
|
|
1036
|
-
provider.read &&
|
|
1275
|
+
deferredAdoption: (provider.read || provider.observe) &&
|
|
1037
1276
|
!reusesMigratedFqn &&
|
|
1038
|
-
|
|
1039
|
-
|
|
1277
|
+
// A replacement targets a new physical identity, which may belong
|
|
1278
|
+
// to someone else — admit it like a fresh create.
|
|
1279
|
+
(node.action === "replace" ||
|
|
1280
|
+
(node.action === "create" &&
|
|
1281
|
+
// Plan reads resolved props itself; without `read`, Apply
|
|
1282
|
+
// admits them through `observe`.
|
|
1283
|
+
((oldState === undefined && (!isResolved(news) || !provider.read)) ||
|
|
1284
|
+
(oldState?.status === "creating" && oldState.attr === undefined))))
|
|
1040
1285
|
? { adopt: adoptThis }
|
|
1041
1286
|
: undefined,
|
|
1042
1287
|
});
|
|
@@ -1062,7 +1307,14 @@ Effect.gen(function* () {
|
|
|
1062
1307
|
// `output` is undefined (as it is here), so handing them
|
|
1063
1308
|
// unresolved exprs crashes. Skip the probe — same behavior as
|
|
1064
1309
|
// a read that found nothing — and re-drive the create.
|
|
1065
|
-
|
|
1310
|
+
//
|
|
1311
|
+
// A checkpoint whose unresolved props were stripped (`propsIncomplete`)
|
|
1312
|
+
// can't identify the attempt at all: a lookup could match a different
|
|
1313
|
+
// resource. Skip it too and let the diff below decide.
|
|
1314
|
+
if (provider.read &&
|
|
1315
|
+
!reusesMigratedFqn &&
|
|
1316
|
+
!oldState.propsIncomplete &&
|
|
1317
|
+
isResolved(oldState.props)) {
|
|
1066
1318
|
const attr = yield* provider
|
|
1067
1319
|
.read({
|
|
1068
1320
|
id,
|
|
@@ -1122,6 +1374,13 @@ Effect.gen(function* () {
|
|
|
1122
1374
|
// comparing props across runtimes is meaningless (and the new
|
|
1123
1375
|
// mode's provider has never seen the old mode's state). The
|
|
1124
1376
|
// action is a replacement by definition.
|
|
1377
|
+
// The props above hold what a cycle's members settle on, which a
|
|
1378
|
+
// member's own replacement can leave unresolved: the peers it reads
|
|
1379
|
+
// change because it does. A provider can't compare unresolved props, so
|
|
1380
|
+
// the replacement it asked for over its peers' first pass stands.
|
|
1381
|
+
const replace = combinedCycles.has(fqn)
|
|
1382
|
+
? (yield* firstPass(Output.of(resource))).replace
|
|
1383
|
+
: undefined;
|
|
1125
1384
|
const diff = modeSwitched
|
|
1126
1385
|
? {
|
|
1127
1386
|
action: "replace",
|
|
@@ -1171,7 +1430,7 @@ Effect.gen(function* () {
|
|
|
1171
1430
|
// wrong physical resource.
|
|
1172
1431
|
Effect.map((diff) => (forceUpdateAfterAdoption || renameMoved) && diff.action === "noop"
|
|
1173
1432
|
? { action: "update" }
|
|
1174
|
-
: diff));
|
|
1433
|
+
: diff), Effect.map((diff) => (replace && diff.action !== "replace" ? replace : diff)));
|
|
1175
1434
|
if (oldState.status === "creating") {
|
|
1176
1435
|
if (diff.action === "noop") {
|
|
1177
1436
|
// we're in the creating state and props are un-changed
|
|
@@ -1346,7 +1605,7 @@ Effect.gen(function* () {
|
|
|
1346
1605
|
// interrupt-only for any other reason) that can be a bare interruption,
|
|
1347
1606
|
// hiding the InvalidReferenceError or provider error that actually
|
|
1348
1607
|
// broke the plan.
|
|
1349
|
-
const diffExits = yield* Effect.
|
|
1608
|
+
const diffExits = yield* Effect.forEach(resources, (resource) => Effect.exit(Effect.tap(diffResource(resource), resourcePlanned)), { concurrency: "unbounded" });
|
|
1350
1609
|
const diffFailures = diffExits.filter(Exit.isFailure);
|
|
1351
1610
|
if (diffFailures.length > 0) {
|
|
1352
1611
|
const reasons = diffFailures.flatMap((exit) => exit.cause.reasons);
|
|
@@ -1416,7 +1675,7 @@ Effect.gen(function* () {
|
|
|
1416
1675
|
// omitted from downstream. Evidence anywhere can involve this resource.
|
|
1417
1676
|
if (excluded && (bindingEvidence || incompleteHistory)) {
|
|
1418
1677
|
return yield* Effect.die(new UnsafeSelectionBoundary({
|
|
1419
|
-
message: `Cannot replace or collect old generations of '${fqn}' while '${excluded[0]}' is unselected. ${bindingEvidence ? `Historical binding-cycle dependencies recorded on '${bindingEvidence}'` : `Historical dependencies missing from '${incompleteHistory}'`} cannot be proven safe; run a full deployment.`,
|
|
1678
|
+
message: `Cannot replace or collect old generations of '${fqn}' while '${String(excluded[0])}' is unselected. ${bindingEvidence ? `Historical binding-cycle dependencies recorded on '${bindingEvidence}'` : `Historical dependencies missing from '${incompleteHistory}'`} cannot be proven safe; run a full deployment.`,
|
|
1420
1679
|
}));
|
|
1421
1680
|
}
|
|
1422
1681
|
const outside = unselectedConsumers(fqn);
|
|
@@ -1432,7 +1691,7 @@ Effect.gen(function* () {
|
|
|
1432
1691
|
return yield* Effect.die(new UnsafeSelectionBoundary({
|
|
1433
1692
|
message: `Cannot reconcile '${fqn}' with incomplete historical downstream metadata while persisted nodes are unselected: ${excludedRows
|
|
1434
1693
|
.map(([id]) => id)
|
|
1435
|
-
.sort()
|
|
1694
|
+
.sort((a, b) => (a < b ? -1 : a > b ? 1 : 0))
|
|
1436
1695
|
.join(", ")}. Select them or run a full deployment.`,
|
|
1437
1696
|
}));
|
|
1438
1697
|
}
|
|
@@ -1460,7 +1719,7 @@ Effect.gen(function* () {
|
|
|
1460
1719
|
return yield* Effect.die(new UnsafeSelectionBoundary({
|
|
1461
1720
|
message: `Cannot discard the last historical binding evidence while persisted nodes are unselected: ${excludedRows
|
|
1462
1721
|
.map(([fqn]) => fqn)
|
|
1463
|
-
.sort()
|
|
1722
|
+
.sort((a, b) => (a < b ? -1 : a > b ? 1 : 0))
|
|
1464
1723
|
.join(", ")}. Select them or run a full deployment.`,
|
|
1465
1724
|
}));
|
|
1466
1725
|
}
|
|
@@ -1469,18 +1728,37 @@ Effect.gen(function* () {
|
|
|
1469
1728
|
// ── Action plan nodes ────────────────────────────────────────────────
|
|
1470
1729
|
// Per-action plan progress, mirroring the resource pass.
|
|
1471
1730
|
const actionCount = yield* Ref.make(0);
|
|
1472
|
-
const actionPlanned = (entry) => Ref.updateAndGet(actionCount, (count) => count + 1).pipe(Effect.flatMap((completed) =>
|
|
1473
|
-
|
|
1731
|
+
const actionPlanned = (entry) => Ref.updateAndGet(actionCount, (count) => count + 1).pipe(Effect.flatMap((completed) => emit({
|
|
1732
|
+
type: "plan.action.completed",
|
|
1474
1733
|
...describeAction(entry[1]),
|
|
1475
1734
|
completed,
|
|
1476
1735
|
total: actions.length,
|
|
1477
1736
|
})));
|
|
1478
|
-
const actionGraph = Object.fromEntries((yield* Effect.
|
|
1479
|
-
// SCC membership of the
|
|
1480
|
-
//
|
|
1481
|
-
//
|
|
1482
|
-
//
|
|
1483
|
-
|
|
1737
|
+
const actionGraph = Object.fromEntries((yield* Effect.forEach(actions, (action) => diffAction(action).pipe(Effect.map((node) => [action.FQN, node]), Effect.tap(actionPlanned)), { concurrency: "unbounded" })));
|
|
1738
|
+
// SCC membership of the graph Apply schedules. Apply uses it to decide
|
|
1739
|
+
// whether an update node must publish its prior attr early to break a
|
|
1740
|
+
// cycle, or can simply wait for upstreams like a DAG node (the common
|
|
1741
|
+
// case). The edges are the ones each node still carries — exactly what
|
|
1742
|
+
// Apply's `waitForDeps` waits on. A declared reference to an upstream's
|
|
1743
|
+
// stable attribute resolves to its value during planning and orders
|
|
1744
|
+
// nothing, so it cannot close a cycle: two updating Workers that bind
|
|
1745
|
+
// each other only by `workerName` are not a cycle, and a node that
|
|
1746
|
+
// still references a peer's changing attribute waits for it (#3103).
|
|
1747
|
+
const cycleMembers = findCycleMembers(Object.fromEntries([
|
|
1748
|
+
...Object.entries(resourceGraph).map(([fqn, node]) => [
|
|
1749
|
+
fqn,
|
|
1750
|
+
[
|
|
1751
|
+
...new Set([
|
|
1752
|
+
...Object.keys(Output.resolveUpstream("props" in node ? node.props : undefined)),
|
|
1753
|
+
...Object.keys(Output.resolveUpstream(node.bindings)),
|
|
1754
|
+
]),
|
|
1755
|
+
].filter((dep) => newNodeFqns.has(dep)),
|
|
1756
|
+
]),
|
|
1757
|
+
...actions.map((action) => [
|
|
1758
|
+
action.FQN,
|
|
1759
|
+
allUpstreamDependencies[action.FQN] ?? [],
|
|
1760
|
+
]),
|
|
1761
|
+
]));
|
|
1484
1762
|
// Detect unsatisfiable dependency cycles among create/replace nodes.
|
|
1485
1763
|
// Update/noop nodes signal their Deferred before waitForDeps when in a
|
|
1486
1764
|
// cycle so they cannot deadlock. Create/replace nodes only signal
|
|
@@ -1521,6 +1799,33 @@ Effect.gen(function* () {
|
|
|
1521
1799
|
}
|
|
1522
1800
|
}
|
|
1523
1801
|
}
|
|
1802
|
+
// A delete-first replacement in a cycle deletes its previous generation
|
|
1803
|
+
// before precreate. Apply resolves the props that upstreams outside the
|
|
1804
|
+
// cycle determine first, so only props derived from a cycle peer are
|
|
1805
|
+
// still unresolved then, and only the provider's `observe` can check
|
|
1806
|
+
// ownership before that delete. Without it, refuse here — before apply
|
|
1807
|
+
// touches anything — unless adoption is allowed.
|
|
1808
|
+
for (const [fqn, node] of Object.entries(resourceGraph)) {
|
|
1809
|
+
if (node.action === "replace" &&
|
|
1810
|
+
node.deleteFirst &&
|
|
1811
|
+
cycleMembers.has(fqn) &&
|
|
1812
|
+
!node.provider.observe &&
|
|
1813
|
+
node.deferredAdoption?.adopt === false &&
|
|
1814
|
+
!isResolved(node.props) &&
|
|
1815
|
+
Object.keys(Output.resolveUpstream(node.props)).some((dep) => cycleMembers.has(dep)) &&
|
|
1816
|
+
// A resumed replacement already holds its precreated identity.
|
|
1817
|
+
!(node.state.status === "replacing" && !node.restart && node.state.attr !== undefined)) {
|
|
1818
|
+
return yield* new UnverifiableReplacement({
|
|
1819
|
+
message: `Cannot replace resource '${fqn}' (${node.resource.Type}): ` +
|
|
1820
|
+
"it must be deleted before its replacement is pre-created, but " +
|
|
1821
|
+
"the replacement's identity depends on outputs that are not " +
|
|
1822
|
+
"resolved yet, so its ownership cannot be checked first. Re-run " +
|
|
1823
|
+
"with `--adopt` (or wrap the effect in `adopt(true)`) to replace it anyway.",
|
|
1824
|
+
resourceType: node.resource.Type,
|
|
1825
|
+
logicalId: node.resource.LogicalId,
|
|
1826
|
+
});
|
|
1827
|
+
}
|
|
1828
|
+
}
|
|
1524
1829
|
// Both orphan passes (task rows below, resource rows further down)
|
|
1525
1830
|
// examine every persisted row of this stack instance.
|
|
1526
1831
|
const persistedFqns = selected ? [] : yield* state.list({ stack: stackName, stage });
|
|
@@ -1530,8 +1835,8 @@ Effect.gen(function* () {
|
|
|
1530
1835
|
const actionExaminedCount = yield* Ref.make(0);
|
|
1531
1836
|
const actionDeletionPlanned = (entry) => Ref.updateAndGet(actionExaminedCount, (count) => count + 1).pipe(Effect.flatMap((completed) => entry === undefined
|
|
1532
1837
|
? Effect.void
|
|
1533
|
-
:
|
|
1534
|
-
|
|
1838
|
+
: emit({
|
|
1839
|
+
type: "plan.action.completed",
|
|
1535
1840
|
...describeAction(entry[1]),
|
|
1536
1841
|
completed,
|
|
1537
1842
|
total: persistedFqns.length,
|
|
@@ -1571,7 +1876,7 @@ Effect.gen(function* () {
|
|
|
1571
1876
|
},
|
|
1572
1877
|
];
|
|
1573
1878
|
});
|
|
1574
|
-
const actionDeletions = Object.fromEntries((yield* Effect.
|
|
1879
|
+
const actionDeletions = Object.fromEntries((yield* Effect.forEach(persistedFqns, (fqn) => diffActionDeletion(fqn).pipe(Effect.tap((entry) => actionDeletionPlanned(entry ?? undefined))), { concurrency: "unbounded" })).filter((v) => !!v));
|
|
1575
1880
|
// Deletion progress mirrors the resource pass: every persisted row is
|
|
1576
1881
|
// examined, but only rows that actually become deletion nodes are
|
|
1577
1882
|
// reported — `completed` tracks examination so progress stays monotonic.
|
|
@@ -1579,8 +1884,8 @@ Effect.gen(function* () {
|
|
|
1579
1884
|
const examinedCount = yield* Ref.make(0);
|
|
1580
1885
|
const deletionPlanned = (entry) => Ref.updateAndGet(examinedCount, (count) => count + 1).pipe(Effect.flatMap((completed) => entry === undefined
|
|
1581
1886
|
? Effect.void
|
|
1582
|
-
:
|
|
1583
|
-
|
|
1887
|
+
: emit({
|
|
1888
|
+
type: "plan.resource.completed",
|
|
1584
1889
|
...describeResource(entry[1]),
|
|
1585
1890
|
completed,
|
|
1586
1891
|
total: deletionCandidates.length,
|
|
@@ -1665,6 +1970,7 @@ Effect.gen(function* () {
|
|
|
1665
1970
|
FormerFqns: undefined,
|
|
1666
1971
|
RuntimeContext: undefined,
|
|
1667
1972
|
Providers: undefined,
|
|
1973
|
+
Lookup: undefined,
|
|
1668
1974
|
},
|
|
1669
1975
|
downstream: [...downstream],
|
|
1670
1976
|
bindings: oldState.bindings.map((binding) => ({
|
|
@@ -1676,7 +1982,7 @@ Effect.gen(function* () {
|
|
|
1676
1982
|
];
|
|
1677
1983
|
}
|
|
1678
1984
|
});
|
|
1679
|
-
const deletions = Object.fromEntries((yield* Effect.
|
|
1985
|
+
const deletions = Object.fromEntries((yield* Effect.forEach(deletionCandidates, (fqn) => diffDeletion(fqn).pipe(Effect.tap((entry) => deletionPlanned(entry ?? undefined))), { concurrency: "unbounded" })).filter((v) => !!v));
|
|
1680
1986
|
for (const resourceFqn of Object.keys(deletions)) {
|
|
1681
1987
|
const dependencies = Object.entries(rawUpstreamDependencies)
|
|
1682
1988
|
.filter(([survivorFqn, upstream]) => survivorFqn in resourceGraph && upstream.includes(resourceFqn))
|
|
@@ -1689,6 +1995,36 @@ Effect.gen(function* () {
|
|
|
1689
1995
|
});
|
|
1690
1996
|
}
|
|
1691
1997
|
}
|
|
1998
|
+
// `RemovalPolicy.protect()`: refuse the whole plan, before anything is
|
|
1999
|
+
// applied, when it would start replacing or delete a protected resource. Both
|
|
2000
|
+
// the declaration and the persisted row count, so dropping `protect()`
|
|
2001
|
+
// in the same deploy as the replacement is refused too.
|
|
2002
|
+
yield* Effect.forEach(
|
|
2003
|
+
// An Action declared at a protected resource's FQN would overwrite its
|
|
2004
|
+
// row without ever planning a delete, abandoning the resource.
|
|
2005
|
+
persistedFqns.filter((fqn) => newActionFqns.has(fqn) && !newResourceFqns.has(fqn)), (fqn) => state.get({ stack: stackName, stage, fqn }).pipe(Effect.map((row) => [fqn, row])), { concurrency: "unbounded" }).pipe(Effect.flatMap((takenOverByActions) => {
|
|
2006
|
+
const refused = [
|
|
2007
|
+
...Object.entries(resourceGraph).flatMap(([fqn, node]) => node.action === "replace" &&
|
|
2008
|
+
// Finishing a `replaced` row's drain only deletes an old generation
|
|
2009
|
+
// the dependents already left; the current one is untouched.
|
|
2010
|
+
!(node.state.status === "replaced" && !node.restart) &&
|
|
2011
|
+
(node.resource.RemovalPolicy === "protect" || node.state.removalPolicy === "protect")
|
|
2012
|
+
? [{ fqn, action: "replace" }]
|
|
2013
|
+
: []),
|
|
2014
|
+
...Object.entries(deletions).flatMap(([fqn, node]) => node?.state.removalPolicy === "protect" ? [{ fqn, action: "delete" }] : []),
|
|
2015
|
+
...takenOverByActions.flatMap(([fqn, row]) => !isActionState(row) && row?.removalPolicy === "protect"
|
|
2016
|
+
? [{ fqn, action: "delete" }]
|
|
2017
|
+
: []),
|
|
2018
|
+
];
|
|
2019
|
+
return refused.length === 0
|
|
2020
|
+
? Effect.void
|
|
2021
|
+
: Effect.fail(new ProtectedResource({
|
|
2022
|
+
message: `Refusing to ${refused.map((r) => `${r.action} '${r.fqn}'`).join(", ")}: ` +
|
|
2023
|
+
"protected by RemovalPolicy.protect(). Deploy it without protect() first " +
|
|
2024
|
+
"to replace or delete it deliberately.",
|
|
2025
|
+
resources: refused,
|
|
2026
|
+
}));
|
|
2027
|
+
}));
|
|
1692
2028
|
return {
|
|
1693
2029
|
resources: resourceGraph,
|
|
1694
2030
|
actions: actionGraph,
|