alchemy 2.0.0-beta.85 → 2.0.0-beta.87
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/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.map +1 -1
- package/lib/AdoptPolicy.js.map +1 -1
- package/lib/Alchemist/AuthRegistry.d.ts +15 -1
- package/lib/Alchemist/AuthRegistry.d.ts.map +1 -1
- package/lib/Alchemist/AuthRegistry.js +47 -4
- package/lib/Alchemist/AuthRegistry.js.map +1 -1
- package/lib/Alchemist/Drift.d.ts +1 -1
- package/lib/Alchemist/Drift.d.ts.map +1 -1
- package/lib/Alchemist/Drift.js.map +1 -1
- package/lib/Alchemist/Entrypoint.d.ts.map +1 -1
- package/lib/Alchemist/Entrypoint.js +10 -1
- package/lib/Alchemist/Entrypoint.js.map +1 -1
- package/lib/Alchemist/Errors.d.ts.map +1 -1
- package/lib/Alchemist/Errors.js.map +1 -1
- package/lib/Alchemist/Logs.d.ts +2 -2
- package/lib/Alchemist/Logs.d.ts.map +1 -1
- package/lib/Alchemist/Logs.js.map +1 -1
- package/lib/Alchemist/Nuke.d.ts +1 -1
- package/lib/Alchemist/Nuke.d.ts.map +1 -1
- package/lib/Alchemist/Nuke.js.map +1 -1
- package/lib/Alchemist/Operations.d.ts.map +1 -1
- package/lib/Alchemist/Operations.js.map +1 -1
- package/lib/Alchemist/Profile.d.ts +1 -1
- package/lib/Alchemist/Profile.d.ts.map +1 -1
- package/lib/Alchemist/Profile.js.map +1 -1
- package/lib/Alchemist/Provider.d.ts.map +1 -1
- package/lib/Alchemist/Provider.js.map +1 -1
- package/lib/Alchemist/Runtime.d.ts.map +1 -1
- package/lib/Alchemist/Runtime.js.map +1 -1
- package/lib/Alchemist/State.d.ts +12 -14
- package/lib/Alchemist/State.d.ts.map +1 -1
- package/lib/Alchemist/State.js +31 -10
- package/lib/Alchemist/State.js.map +1 -1
- package/lib/Alchemist/index.d.ts.map +1 -1
- 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.map +1 -1
- package/lib/Apply.js +14 -34
- 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 +7 -2
- package/lib/Auth/AuthProvider.d.ts.map +1 -1
- package/lib/Auth/AuthProvider.js +9 -2
- package/lib/Auth/AuthProvider.js.map +1 -1
- package/lib/Auth/BrowserOAuth.d.ts.map +1 -1
- package/lib/Auth/BrowserOAuth.js.map +1 -1
- package/lib/Auth/Credentials.d.ts.map +1 -1
- 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.map +1 -1
- package/lib/Auth/Demand.js.map +1 -1
- package/lib/Auth/Env.d.ts.map +1 -1
- package/lib/Auth/Env.js.map +1 -1
- package/lib/Auth/Inspect.d.ts.map +1 -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 +3 -1
- package/lib/Auth/Lock.js.map +1 -1
- package/lib/Auth/OAuthFlow.d.ts +6 -0
- package/lib/Auth/OAuthFlow.d.ts.map +1 -1
- package/lib/Auth/OAuthFlow.js +28 -3
- 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.map +1 -1
- package/lib/Auth/Paths.js.map +1 -1
- package/lib/Auth/Profile.d.ts +2 -1
- package/lib/Auth/Profile.d.ts.map +1 -1
- package/lib/Auth/Profile.js +3 -1
- 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.map +1 -1
- package/lib/Auth/Registry.js.map +1 -1
- package/lib/Auth/Resolve.d.ts.map +1 -1
- 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.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.map +1 -1
- package/lib/Bundle/Bundle.d.ts.map +1 -1
- 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.map +1 -1
- package/lib/Bundle/NamespaceImportPlugin.js.map +1 -1
- 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.map +1 -1
- 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 +19 -11
- package/lib/Cli/Format.js.map +1 -1
- package/lib/Cli/GlobalLog.d.ts +1 -1
- package/lib/Cli/GlobalLog.d.ts.map +1 -1
- package/lib/Cli/GlobalLog.js +8 -5
- 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 +10 -10
- 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.map +1 -1
- package/lib/Cli/Present.d.ts.map +1 -1
- package/lib/Cli/Present.js.map +1 -1
- 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.map +1 -1
- package/lib/Cli/SigilRenderer.js +2 -2
- package/lib/Cli/SigilRenderer.js.map +1 -1
- package/lib/Cli/checkVersion.d.ts.map +1 -1
- 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.map +1 -1
- package/lib/Cli/commands/confirm.js.map +1 -1
- package/lib/Cli/commands/deploy.d.ts.map +1 -1
- 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 +4 -3
- package/lib/Cli/commands/dev.js.map +1 -1
- package/lib/Cli/commands/drift.d.ts +7 -0
- package/lib/Cli/commands/drift.d.ts.map +1 -1
- package/lib/Cli/commands/drift.js +15 -5
- 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 +5 -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.map +1 -1
- 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 +3 -2
- package/lib/Cli/commands/logs.js.map +1 -1
- package/lib/Cli/commands/nuke.d.ts.map +1 -1
- package/lib/Cli/commands/nuke.js +4 -2
- package/lib/Cli/commands/nuke.js.map +1 -1
- package/lib/Cli/commands/profile/commands.d.ts.map +1 -1
- package/lib/Cli/commands/profile/commands.js.map +1 -1
- package/lib/Cli/commands/profile/flows.d.ts.map +1 -1
- package/lib/Cli/commands/profile/flows.js.map +1 -1
- package/lib/Cli/commands/profile/hub.d.ts.map +1 -1
- 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.map +1 -1
- package/lib/Cli/commands/provider.js.map +1 -1
- package/lib/Cli/commands/render.d.ts.map +1 -1
- package/lib/Cli/commands/render.js.map +1 -1
- package/lib/Cli/commands/state.d.ts +32 -4
- package/lib/Cli/commands/state.d.ts.map +1 -1
- package/lib/Cli/commands/state.js +174 -49
- package/lib/Cli/commands/state.js.map +1 -1
- package/lib/Cli/components/capabilities.d.ts.map +1 -1
- package/lib/Cli/components/capabilities.js.map +1 -1
- package/lib/Cli/components/types.d.ts.map +1 -1
- 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.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 +10 -1
- package/lib/Cli/components/ui/Interactive.d.ts.map +1 -1
- package/lib/Cli/components/ui/Interactive.js +5 -3
- package/lib/Cli/components/ui/Interactive.js.map +1 -1
- package/lib/Cli/components/ui/Layout.d.ts.map +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.map +1 -1
- package/lib/Cli/components/ui/Typography.js.map +1 -1
- package/lib/Cli/components/ui/index.d.ts +1 -0
- package/lib/Cli/components/ui/index.d.ts.map +1 -1
- package/lib/Cli/components/ui/index.js +1 -0
- package/lib/Cli/components/ui/index.js.map +1 -1
- package/lib/Cli/components/view/ApprovePlan.d.ts.map +1 -1
- package/lib/Cli/components/view/ApprovePlan.js +2 -1
- package/lib/Cli/components/view/ApprovePlan.js.map +1 -1
- package/lib/Cli/components/view/Format.d.ts.map +1 -1
- package/lib/Cli/components/view/Format.js.map +1 -1
- package/lib/Cli/components/view/Help.d.ts.map +1 -1
- package/lib/Cli/components/view/Help.js +5 -4
- 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.map +1 -1
- package/lib/Cli/components/view/Nuke.d.ts.map +1 -1
- package/lib/Cli/components/view/Nuke.js.map +1 -1
- package/lib/Cli/components/view/PlanDecision.d.ts.map +1 -1
- package/lib/Cli/components/view/PlanDecision.js +1 -1
- package/lib/Cli/components/view/PlanDecision.js.map +1 -1
- package/lib/Cli/components/view/PlanRow.d.ts.map +1 -1
- package/lib/Cli/components/view/PlanRow.js.map +1 -1
- package/lib/Cli/components/view/PlanTree.d.ts +3 -1
- package/lib/Cli/components/view/PlanTree.d.ts.map +1 -1
- package/lib/Cli/components/view/PlanTree.js +3 -2
- 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 +4 -4
- package/lib/Cli/components/view/PlanView.js.map +1 -1
- package/lib/Cli/components/view/Profile.d.ts.map +1 -1
- package/lib/Cli/components/view/Profile.js.map +1 -1
- package/lib/Cli/components/view/ProfileDashboard.d.ts.map +1 -1
- package/lib/Cli/components/view/ProfileDashboard.js.map +1 -1
- package/lib/Cli/components/view/Prompts.d.ts.map +1 -1
- package/lib/Cli/components/view/Prompts.js.map +1 -1
- package/lib/Cli/components/view/Runtime.d.ts.map +1 -1
- package/lib/Cli/components/view/Runtime.js +10 -5
- package/lib/Cli/components/view/Runtime.js.map +1 -1
- package/lib/Cli/components/view/SigilCli.d.ts.map +1 -1
- package/lib/Cli/components/view/SigilCli.js +4 -3
- 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.map +1 -1
- package/lib/Cli/components/view/StateExplorer.js.map +1 -1
- package/lib/Cli/components/view/statusStyle.d.ts.map +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.map +1 -1
- package/lib/Cli/exec.js +6 -3
- 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 +11 -6
- 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.map +1 -1
- package/lib/Command/Dev.d.ts.map +1 -1
- 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.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.map +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 +81 -20
- package/lib/Contributions.d.ts.map +1 -1
- package/lib/Contributions.js +10 -2
- package/lib/Contributions.js.map +1 -1
- package/lib/DNS/Adapter.d.ts +2 -0
- package/lib/DNS/Adapter.d.ts.map +1 -1
- package/lib/DNS/Adapter.js.map +1 -1
- package/lib/DNS/index.d.ts.map +1 -1
- package/lib/DNS/index.js.map +1 -1
- package/lib/Dependencies.d.ts.map +1 -1
- package/lib/Dependencies.js.map +1 -1
- package/lib/Deploy.d.ts.map +1 -1
- package/lib/Deploy.js.map +1 -1
- package/lib/Destroy.d.ts.map +1 -1
- package/lib/Destroy.js.map +1 -1
- package/lib/Diff.d.ts.map +1 -1
- package/lib/Diff.js.map +1 -1
- package/lib/Drift.d.ts.map +1 -1
- package/lib/Drift.js +9 -1
- package/lib/Drift.js.map +1 -1
- package/lib/EvalStack.d.ts.map +1 -1
- package/lib/EvalStack.js.map +1 -1
- package/lib/Events.d.ts +10 -0
- package/lib/Events.d.ts.map +1 -1
- package/lib/Events.js +32 -0
- package/lib/Events.js.map +1 -1
- 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 +8 -1
- package/lib/Interaction.d.ts.map +1 -1
- package/lib/Interaction.js +24 -8
- 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.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.map +1 -1
- package/lib/Local/RpcProviderProxy.d.ts.map +1 -1
- package/lib/Local/RpcProviderProxy.js.map +1 -1
- package/lib/Local/RpcSerialization.d.ts.map +1 -1
- package/lib/Local/RpcSerialization.js +23 -1
- package/lib/Local/RpcSerialization.js.map +1 -1
- package/lib/Local/RpcServer.d.ts +6 -1
- package/lib/Local/RpcServer.d.ts.map +1 -1
- package/lib/Local/RpcServer.js +7 -1
- package/lib/Local/RpcServer.js.map +1 -1
- package/lib/Local/RpcServerBun.d.ts.map +1 -1
- package/lib/Local/RpcServerBun.js +8 -2
- package/lib/Local/RpcServerBun.js.map +1 -1
- package/lib/Local/RpcServerEnvironment.d.ts +2 -2
- package/lib/Local/RpcServerEnvironment.d.ts.map +1 -1
- package/lib/Local/RpcServerEnvironment.js.map +1 -1
- package/lib/Local/RpcServerNode.d.ts.map +1 -1
- package/lib/Local/RpcServerNode.js +18 -3
- package/lib/Local/RpcServerNode.js.map +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 +2 -0
- package/lib/Local/RpcSpawner.d.ts.map +1 -1
- package/lib/Local/RpcSpawner.js +22 -15
- 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.map +1 -1
- package/lib/Local/Sidecar.js +10 -1
- 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.map +1 -1
- package/lib/Nuke.js +1 -1
- package/lib/Nuke.js.map +1 -1
- package/lib/Output.d.ts +25 -2
- package/lib/Output.d.ts.map +1 -1
- package/lib/Output.js +48 -6
- 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 +18 -1
- package/lib/Plan.d.ts.map +1 -1
- package/lib/Plan.js +416 -158
- 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 +10 -3
- package/lib/Platform.js.map +1 -1
- package/lib/Provider.d.ts +40 -14
- package/lib/Provider.d.ts.map +1 -1
- 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.map +1 -1
- 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.map +1 -1
- 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 +4 -0
- 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.map +1 -1
- 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 +9 -7
- 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.map +1 -1
- package/lib/State/Provisioning.d.ts +4 -3
- package/lib/State/Provisioning.d.ts.map +1 -1
- package/lib/State/Provisioning.js +4 -1
- package/lib/State/Provisioning.js.map +1 -1
- package/lib/State/ResourceState.d.ts.map +1 -1
- package/lib/State/ResourceState.js.map +1 -1
- package/lib/State/State.d.ts.map +1 -1
- package/lib/State/State.js.map +1 -1
- package/lib/State/StateEncoding.d.ts.map +1 -1
- 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.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.map +1 -1
- package/lib/Telemetry/Layer.js.map +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.map +1 -1
- package/lib/TelemetryRuntime.d.ts.map +1 -1
- 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.map +1 -1
- package/lib/Util/ConsoleSink.js +8 -6
- 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.map +1 -1
- package/lib/Util/LogAnnotation.js.map +1 -1
- package/lib/Util/LogRecord.d.ts.map +1 -1
- package/lib/Util/LogRecord.js.map +1 -1
- package/lib/Util/Memoize.d.ts.map +1 -1
- package/lib/Util/Memoize.js.map +1 -1
- package/lib/Util/Node.d.ts.map +1 -1
- package/lib/Util/Node.js.map +1 -1
- package/lib/Util/PlatformServices.d.ts.map +1 -1
- package/lib/Util/PlatformServices.js +12 -1
- 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 +4 -1
- package/lib/Util/ResourceOutput.d.ts.map +1 -1
- package/lib/Util/ResourceOutput.js +6 -3
- package/lib/Util/ResourceOutput.js.map +1 -1
- package/lib/Util/Shutdown.d.ts.map +1 -1
- package/lib/Util/Shutdown.js.map +1 -1
- package/lib/Util/Stream.d.ts.map +1 -1
- package/lib/Util/Stream.js.map +1 -1
- package/lib/Util/Terminal.d.ts +21 -8
- package/lib/Util/Terminal.d.ts.map +1 -1
- package/lib/Util/Terminal.js +24 -35
- 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.map +1 -1
- package/lib/Util/TraceParent.js.map +1 -1
- package/lib/Util/base32.d.ts.map +1 -1
- package/lib/Util/base32.js.map +1 -1
- package/lib/Util/base64.d.ts.map +1 -1
- package/lib/Util/base64.js.map +1 -1
- package/lib/Util/cached-function.d.ts.map +1 -1
- 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.map +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.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.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.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.map +1 -1
- package/lib/Website/AstroOutput.js.map +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.map +1 -1
- package/lib/Workflows.js.map +1 -1
- package/lib/index.d.ts.map +1 -1
- package/lib/index.js.map +1 -1
- package/package.json +14 -13
- package/src/Alchemist/AuthRegistry.ts +65 -5
- package/src/Alchemist/Drift.ts +1 -1
- package/src/Alchemist/Nuke.ts +1 -1
- package/src/Alchemist/State.ts +52 -24
- package/src/Apply.ts +14 -36
- package/src/Artifacts.ts +14 -7
- package/src/Auth/AuthProvider.ts +45 -13
- package/src/Auth/Lock.ts +3 -1
- package/src/Auth/OAuthFlow.ts +38 -3
- package/src/Auth/Profile.ts +4 -1
- package/src/Cli/Format.ts +17 -12
- package/src/Cli/GlobalLog.ts +8 -5
- package/src/Cli/JsonConsole.ts +87 -0
- package/src/Cli/LoggingCli.ts +10 -10
- package/src/Cli/SigilRenderer.ts +2 -5
- package/src/Cli/commands/dev.ts +4 -3
- package/src/Cli/commands/drift.ts +17 -4
- package/src/Cli/commands/errors.ts +7 -15
- package/src/Cli/commands/flags.ts +3 -1
- package/src/Cli/commands/logs.ts +3 -2
- package/src/Cli/commands/nuke.ts +8 -2
- package/src/Cli/commands/state.ts +224 -77
- package/src/Cli/components/ui/Interactive.tsx +12 -0
- package/src/Cli/components/ui/Live.tsx +89 -10
- package/src/Cli/components/ui/ProgramStatus.ts +14 -0
- package/src/Cli/components/ui/index.ts +1 -0
- package/src/Cli/components/view/ApprovePlan.tsx +2 -0
- package/src/Cli/components/view/Help.tsx +5 -4
- package/src/Cli/components/view/PlanDecision.tsx +1 -0
- package/src/Cli/components/view/PlanTree.ts +10 -2
- package/src/Cli/components/view/PlanView.tsx +4 -1
- package/src/Cli/components/view/Runtime.tsx +12 -6
- package/src/Cli/components/view/SigilCli.tsx +14 -9
- package/src/Cli/components/view/StackOutputs.tsx +2 -2
- package/src/Cli/components/view/usePlanPresentation.ts +15 -1
- package/src/Cli/exec.ts +5 -2
- package/src/Cli/main.ts +10 -5
- package/src/Cli/selectCli.ts +58 -6
- package/src/Contributions.ts +100 -21
- package/src/DNS/Adapter.ts +2 -1
- package/src/Drift.ts +13 -1
- package/src/Events.ts +34 -0
- package/src/Interaction.ts +49 -19
- package/src/Local/RpcProvider.ts +15 -6
- package/src/Local/RpcSerialization.ts +34 -1
- package/src/Local/RpcServer.ts +13 -2
- package/src/Local/RpcServerBun.ts +8 -2
- package/src/Local/RpcServerNode.ts +18 -3
- package/src/Local/RpcSpawner.ts +28 -14
- package/src/Local/RpcToken.ts +63 -0
- package/src/Mount.ts +113 -0
- package/src/Nuke.ts +1 -1
- package/src/Output.ts +65 -10
- package/src/Phase.ts +2 -1
- package/src/Plan.ts +567 -175
- package/src/Platform.ts +35 -3
- package/src/Provider.ts +61 -17
- package/src/RemovalPolicy.ts +57 -4
- package/src/Resource.ts +124 -8
- package/src/Rpc.ts +70 -8
- package/src/Runtime/Bootstrap.ts +11 -15
- package/src/Runtime/Process.ts +40 -1
- package/src/RuntimeContext.ts +27 -0
- 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/State/BucketState.ts +9 -11
- package/src/State/Provisioning.ts +10 -4
- package/src/Telemetry/Attributes.ts +1 -0
- package/src/Util/AtomicFile.ts +3 -2
- package/src/Util/ConfigProvider.ts +1 -0
- package/src/Util/ConsoleSink.ts +8 -6
- package/src/Util/Ignore.ts +14 -8
- package/src/Util/PlatformServices.ts +14 -1
- package/src/Util/ResourceOutput.ts +7 -4
- package/src/Util/Terminal.ts +32 -39
- package/src/Util/scc.ts +18 -13
- package/src/Util/tarGzip.ts +3 -2
- 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/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/Util/proxy-chain.ts +0 -161
package/src/Plan.ts
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";
|
|
@@ -48,8 +47,10 @@ import {
|
|
|
48
47
|
type ProviderService,
|
|
49
48
|
} from "./Provider.ts";
|
|
50
49
|
import { defaultProviderMode, stampedMode, type ProviderMode } from "./ProviderMode.ts";
|
|
50
|
+
import { ProtectedResource } from "./RemovalPolicy.ts";
|
|
51
51
|
import {
|
|
52
52
|
isResource,
|
|
53
|
+
LookupOfManagedResourceError,
|
|
53
54
|
missingImplementation,
|
|
54
55
|
type ResourceBinding,
|
|
55
56
|
type ResourceLike,
|
|
@@ -81,7 +82,7 @@ import {
|
|
|
81
82
|
type UpdatingReourceState,
|
|
82
83
|
} from "./State/index.ts";
|
|
83
84
|
import { isPlainData, mapPlainData } from "./Util/data.ts";
|
|
84
|
-
import { findCycleMembers } from "./Util/scc.ts";
|
|
85
|
+
import { findCycleMembers, findCycles } from "./Util/scc.ts";
|
|
85
86
|
import { hashInput } from "./Util/sha256.ts";
|
|
86
87
|
|
|
87
88
|
export type PlanError = never;
|
|
@@ -385,24 +386,79 @@ const bindSameStackRefs = (
|
|
|
385
386
|
stack: StackSpec<any>,
|
|
386
387
|
resources: ReadonlyArray<ResourceLike>,
|
|
387
388
|
actions: ReadonlyArray<ActionLike>,
|
|
388
|
-
) => {
|
|
389
|
+
): ReadonlyArray<RefEdge> => {
|
|
389
390
|
const byFqn = new Map(resources.map((resource) => [resource.FQN, resource]));
|
|
390
391
|
const bind = (owner: string, value: unknown) => {
|
|
392
|
+
const edges: RefEdge[] = [];
|
|
391
393
|
for (const ref of Output.collectRefs(value)) {
|
|
392
394
|
if ((ref.stack ?? stack.name) !== stack.name) continue;
|
|
393
395
|
if ((ref.stage ?? stack.stage) !== stack.stage) continue;
|
|
394
396
|
if (ref.resourceId === owner) continue;
|
|
395
397
|
const target = byFqn.get(ref.resourceId);
|
|
396
|
-
if (target !== undefined)
|
|
398
|
+
if (target !== undefined) {
|
|
399
|
+
Output.bindRef(ref, target);
|
|
400
|
+
edges.push({ owner, target: target.FQN });
|
|
401
|
+
}
|
|
397
402
|
}
|
|
403
|
+
return edges;
|
|
398
404
|
};
|
|
405
|
+
const propEdges: RefEdge[] = [];
|
|
399
406
|
for (const resource of resources) {
|
|
400
|
-
bind(resource.FQN, resource.Props);
|
|
407
|
+
propEdges.push(...bind(resource.FQN, resource.Props));
|
|
401
408
|
bind(resource.FQN, stack.bindings[resource.FQN] ?? []);
|
|
402
409
|
}
|
|
403
410
|
for (const action of actions) {
|
|
404
411
|
bind(action.FQN, [action.Input, action.Captures]);
|
|
405
412
|
}
|
|
413
|
+
return propEdges;
|
|
414
|
+
};
|
|
415
|
+
|
|
416
|
+
/** A same-stack ref in `owner`'s props, bound to the declared `target`. */
|
|
417
|
+
interface RefEdge {
|
|
418
|
+
readonly owner: string;
|
|
419
|
+
readonly target: string;
|
|
420
|
+
}
|
|
421
|
+
|
|
422
|
+
/**
|
|
423
|
+
* A same-stack ref in a resource's props closes a cycle through props: the
|
|
424
|
+
* ref's target depends, through props, on the resource holding the ref. A
|
|
425
|
+
* direct reference can't form this cycle (it needs the declaration first),
|
|
426
|
+
* so only a ref can, and neither resource can resolve its props before the
|
|
427
|
+
* other. The plan fails instead of waiting forever or deploying a stale
|
|
428
|
+
* value. The fix belongs to the provider whose props carry the ref: keep in
|
|
429
|
+
* props only what the provider can't move into a binding.
|
|
430
|
+
*/
|
|
431
|
+
export class RefCycleError extends Data.TaggedError("RefCycleError")<{
|
|
432
|
+
message: string;
|
|
433
|
+
owner: string;
|
|
434
|
+
target: string;
|
|
435
|
+
}> {}
|
|
436
|
+
|
|
437
|
+
/**
|
|
438
|
+
* The first ref edge whose target reaches its owner through props, if any
|
|
439
|
+
* (see {@link RefCycleError}).
|
|
440
|
+
*/
|
|
441
|
+
const findRefCycle = (
|
|
442
|
+
edges: ReadonlyArray<RefEdge>,
|
|
443
|
+
upstream: { readonly [fqn: string]: ReadonlyArray<string> },
|
|
444
|
+
): { edge: RefEdge; path: string[] } | undefined => {
|
|
445
|
+
for (const edge of edges) {
|
|
446
|
+
// Depth-first from the target along prop dependencies, back to the owner.
|
|
447
|
+
const visited = new Set<string>();
|
|
448
|
+
const walk = (fqn: string, path: string[]): string[] | undefined => {
|
|
449
|
+
if (fqn === edge.owner) return path;
|
|
450
|
+
if (visited.has(fqn)) return undefined;
|
|
451
|
+
visited.add(fqn);
|
|
452
|
+
for (const next of upstream[fqn] ?? []) {
|
|
453
|
+
const found = walk(next, [...path, next]);
|
|
454
|
+
if (found) return found;
|
|
455
|
+
}
|
|
456
|
+
return undefined;
|
|
457
|
+
};
|
|
458
|
+
const path = walk(edge.target, [edge.target]);
|
|
459
|
+
if (path) return { edge, path: [edge.owner, ...path] };
|
|
460
|
+
}
|
|
461
|
+
return undefined;
|
|
406
462
|
};
|
|
407
463
|
|
|
408
464
|
const makePlan = <A>(
|
|
@@ -418,7 +474,7 @@ const makePlan = <A>(
|
|
|
418
474
|
const declaredResources = Object.values(stack.resources);
|
|
419
475
|
const declaredActions = Object.values(stack.actions ?? {});
|
|
420
476
|
const declared = [...declaredResources, ...declaredActions];
|
|
421
|
-
bindSameStackRefs(stack, declaredResources, declaredActions);
|
|
477
|
+
const refPropEdges = bindSameStackRefs(stack, declaredResources, declaredActions);
|
|
422
478
|
const upstream = (node: ResourceLike | ActionLike) =>
|
|
423
479
|
Object.keys(
|
|
424
480
|
Output.upstreamAny(
|
|
@@ -775,135 +831,296 @@ const makePlan = <A>(
|
|
|
775
831
|
// `cachedInScope`): a diff that fails or is cancelled must not take the
|
|
776
832
|
// resolution every other diff is waiting on down with it.
|
|
777
833
|
const memoScope = yield* Effect.scope;
|
|
778
|
-
const resolvedResources: Record<string, Effect.Effect<any>> = {};
|
|
779
834
|
|
|
780
|
-
|
|
835
|
+
/**
|
|
836
|
+
* How the members of a cycle resolve while one of them is resolved: to
|
|
837
|
+
* `exposures` once those are known, and until then to their first pass,
|
|
838
|
+
* which leaves the data bound to them out. A member cannot wait on what
|
|
839
|
+
* the rest of the plan sees of its peers, since that waits on the member.
|
|
840
|
+
*/
|
|
841
|
+
interface Peers {
|
|
842
|
+
readonly members: ReadonlySet<string>;
|
|
843
|
+
readonly exposures?: ReadonlyMap<string, unknown>;
|
|
844
|
+
}
|
|
845
|
+
|
|
846
|
+
/** What a node's outputs resolve to for the nodes that read them. */
|
|
847
|
+
interface Exposure {
|
|
848
|
+
readonly value: unknown;
|
|
849
|
+
/**
|
|
850
|
+
* How much of what the node last settled on `value` holds: all of it
|
|
851
|
+
* (`settled`), the attributes that survive its update, or `nothing`.
|
|
852
|
+
*/
|
|
853
|
+
readonly extent: string;
|
|
854
|
+
/**
|
|
855
|
+
* The persisted bindings of a settled resource, for comparing them once
|
|
856
|
+
* the peers of its cycle are known.
|
|
857
|
+
*/
|
|
858
|
+
readonly oldBindings?: ResourceBinding[];
|
|
859
|
+
/** The replacement its provider asked for. */
|
|
860
|
+
readonly replace?: ReplaceDiff;
|
|
861
|
+
}
|
|
862
|
+
|
|
863
|
+
const haveBindingsChanged = (olds: ResourceBinding[], news: ResourceBinding[]) =>
|
|
864
|
+
diffBindings(olds, news).some((binding) => binding.action !== "noop");
|
|
865
|
+
|
|
866
|
+
const exposeResource = (
|
|
781
867
|
resourceExpr: Output.ResourceExpr<any, any>,
|
|
782
|
-
|
|
868
|
+
peers: Peers | undefined,
|
|
869
|
+
): Effect.Effect<Exposure, Config.ConfigError | StateStoreError> =>
|
|
870
|
+
// @ts-expect-error
|
|
783
871
|
Effect.gen(function* () {
|
|
784
|
-
|
|
785
|
-
|
|
786
|
-
|
|
787
|
-
|
|
788
|
-
|
|
789
|
-
|
|
872
|
+
const resource = resourceExpr.src;
|
|
873
|
+
const nothing: Exposure = { value: resourceExpr, extent: "nothing" };
|
|
874
|
+
|
|
875
|
+
const { provider, mode } = yield* resolveProviderAndMode(resource);
|
|
876
|
+
const props = materializeStableRefs(yield* resolveInput(resource.Props, undefined, peers));
|
|
877
|
+
// Falls back to the row at a former FQN (`renamedFrom`) so a
|
|
878
|
+
// renamed resource's stable attributes keep flowing to
|
|
879
|
+
// downstream diffs across the migration.
|
|
880
|
+
const { row: oldState } = yield* getPersistedRow(resource);
|
|
881
|
+
|
|
882
|
+
if (!oldState || oldState.status === "creating") {
|
|
883
|
+
return nothing;
|
|
790
884
|
}
|
|
791
|
-
|
|
792
|
-
|
|
793
|
-
|
|
885
|
+
|
|
886
|
+
// The resource is switching provider modes (local ⇄ live):
|
|
887
|
+
// it will be replaced, so nothing about the persisted attrs
|
|
888
|
+
// is stable for downstream consumers.
|
|
889
|
+
if (hasModeSwitched(mode, oldState)) {
|
|
890
|
+
return nothing;
|
|
794
891
|
}
|
|
795
|
-
// @ts-expect-error
|
|
796
|
-
return yield* (resolvedResources[resourceExpr.src.FQN] ??= yield* cachedInScope(memoScope)(
|
|
797
|
-
Effect.gen(function* () {
|
|
798
|
-
const resource = resourceExpr.src;
|
|
799
892
|
|
|
800
|
-
|
|
801
|
-
|
|
802
|
-
|
|
803
|
-
|
|
804
|
-
|
|
805
|
-
|
|
893
|
+
const oldProps = oldState.status === "updating" ? oldState.old.props : oldState.props;
|
|
894
|
+
|
|
895
|
+
// Normalize both sides through `dedupeBindings` so the binding
|
|
896
|
+
// sets handed to `diff` are deduped AND sid-sorted — provider
|
|
897
|
+
// diffs that hash/compare the arrays never churn on
|
|
898
|
+
// registration-order flips (or on legacy unsorted state).
|
|
899
|
+
const oldBindings = dedupeBindings(oldState.bindings ?? []);
|
|
900
|
+
const bindings = stack.bindings[resource.FQN] ?? [];
|
|
901
|
+
// A cycle member's bindings hold its peers' outputs: they stay
|
|
902
|
+
// unresolved, and are left out of the comparison, until those are known.
|
|
903
|
+
const blind = peers !== undefined && peers.exposures === undefined;
|
|
904
|
+
const newBindings = dedupeBindings(
|
|
905
|
+
blind ? bindings : yield* resolveInput(bindings, undefined, peers),
|
|
906
|
+
);
|
|
806
907
|
|
|
807
|
-
|
|
808
|
-
|
|
809
|
-
|
|
908
|
+
const diff = yield* provider.diff
|
|
909
|
+
? provider
|
|
910
|
+
.diff({
|
|
911
|
+
id: resource.LogicalId,
|
|
912
|
+
fqn: resource.FQN,
|
|
913
|
+
olds: oldProps,
|
|
914
|
+
instanceId: oldState.instanceId,
|
|
915
|
+
news: props,
|
|
916
|
+
output: oldState.attr,
|
|
917
|
+
oldBindings,
|
|
918
|
+
newBindings,
|
|
919
|
+
})
|
|
920
|
+
.pipe(providePlanScope(resource, oldState.instanceId))
|
|
921
|
+
: Effect.undefined;
|
|
922
|
+
|
|
923
|
+
// A present `diff.stables` is authoritative for this update and
|
|
924
|
+
// overrides `provider.stables`. We only fall back to the
|
|
925
|
+
// provider-level "always stable" list when the diff does not
|
|
926
|
+
// return one (e.g. no diff fn, or a diff that omits `stables`).
|
|
927
|
+
const stables: string[] = diff?.stables ?? provider.stables ?? [];
|
|
928
|
+
|
|
929
|
+
const surviving: Exposure =
|
|
930
|
+
stables.length > 0
|
|
931
|
+
? {
|
|
932
|
+
value: new Output.ResourceExpr(
|
|
933
|
+
resourceExpr.src,
|
|
934
|
+
Object.fromEntries(stables.map((stable) => [stable, oldState.attr?.[stable]])),
|
|
935
|
+
),
|
|
936
|
+
extent: `stables:${[...stables].sort().join(",")}`,
|
|
937
|
+
}
|
|
938
|
+
: // if there are no stable properties, treat every property as changed
|
|
939
|
+
nothing;
|
|
810
940
|
|
|
811
|
-
|
|
812
|
-
|
|
813
|
-
|
|
814
|
-
|
|
815
|
-
|
|
816
|
-
|
|
941
|
+
if (diff == null) {
|
|
942
|
+
if (
|
|
943
|
+
havePropsChanged(oldProps, props) ||
|
|
944
|
+
(!blind && haveBindingsChanged(oldBindings, newBindings))
|
|
945
|
+
) {
|
|
946
|
+
// the props have changed but the provider did not provide any hints as to what is stable
|
|
947
|
+
// so we must assume everything has changed
|
|
948
|
+
return surviving;
|
|
949
|
+
}
|
|
950
|
+
} else if (diff.action === "update") {
|
|
951
|
+
return surviving;
|
|
952
|
+
} else if (diff.action === "replace") {
|
|
953
|
+
return { ...nothing, replace: diff };
|
|
954
|
+
}
|
|
955
|
+
// `--force` upgrades this resource's noop to an update (see the
|
|
956
|
+
// diff mapping in the resource-graph pass below), so its
|
|
957
|
+
// `reconcile` WILL re-run and may produce fresh attributes —
|
|
958
|
+
// that is the point of --force. Returning the persisted attr
|
|
959
|
+
// snapshot here would bake potentially-stale values into every
|
|
960
|
+
// consumer's plan props and binding data, so consumers would
|
|
961
|
+
// keep the stale attrs even though the upstream just
|
|
962
|
+
// re-reconciled. Expose only the stable attributes and let
|
|
963
|
+
// apply re-evaluate the rest against the forced reconcile's
|
|
964
|
+
// fresh output. A noop diff may carry `stables` for exactly this
|
|
965
|
+
// case (conditional stables such as a rename-mutable `name`);
|
|
966
|
+
// without them the forced upstream would only expose
|
|
967
|
+
// `provider.stables` and identity-sensitive consumers would
|
|
968
|
+
// falsely plan a replacement (#1832).
|
|
969
|
+
if (options.force) {
|
|
970
|
+
return surviving;
|
|
971
|
+
}
|
|
972
|
+
if (
|
|
973
|
+
oldState.status === "created" ||
|
|
974
|
+
oldState.status === "updated" ||
|
|
975
|
+
oldState.status === "replaced"
|
|
976
|
+
) {
|
|
977
|
+
// we can safely return the attributes if we know they have stabilized
|
|
978
|
+
return { value: oldState.attr, extent: "settled", oldBindings };
|
|
979
|
+
} else {
|
|
980
|
+
// we must assume the resource doesn't exist if it hasn't stabilized
|
|
981
|
+
return nothing;
|
|
982
|
+
}
|
|
983
|
+
});
|
|
817
984
|
|
|
818
|
-
|
|
985
|
+
const exposeAction = (
|
|
986
|
+
resourceExpr: Output.ResourceExpr<any, any>,
|
|
987
|
+
node: ActionRun | ActionNoop,
|
|
988
|
+
): Exposure =>
|
|
989
|
+
node.action === "noop"
|
|
990
|
+
? { value: node.state.output, extent: "settled" }
|
|
991
|
+
: { value: resourceExpr, extent: "nothing" };
|
|
992
|
+
|
|
993
|
+
// A node's exposure with the peers of its cycle, if it has one, at their
|
|
994
|
+
// own first pass.
|
|
995
|
+
const firstPasses: Record<
|
|
996
|
+
string,
|
|
997
|
+
Effect.Effect<Exposure, Config.ConfigError | StateStoreError>
|
|
998
|
+
> = {};
|
|
999
|
+
const firstPass = (
|
|
1000
|
+
resourceExpr: Output.ResourceExpr<any, any>,
|
|
1001
|
+
): Effect.Effect<Exposure, Config.ConfigError | StateStoreError> =>
|
|
1002
|
+
Effect.gen(function* () {
|
|
1003
|
+
const node = resourceExpr.src;
|
|
1004
|
+
return yield* (firstPasses[node.FQN] ??= yield* cachedInScope(memoScope)(
|
|
1005
|
+
isAction(node)
|
|
1006
|
+
? Effect.map(firstActionPlan(node), (plan) => exposeAction(resourceExpr, plan))
|
|
1007
|
+
: exposeResource(resourceExpr, peersOf(node.FQN)),
|
|
1008
|
+
));
|
|
1009
|
+
});
|
|
819
1010
|
|
|
820
|
-
|
|
821
|
-
|
|
822
|
-
|
|
823
|
-
|
|
824
|
-
|
|
825
|
-
|
|
826
|
-
|
|
827
|
-
|
|
1011
|
+
/**
|
|
1012
|
+
* The exposure of every member of a cycle.
|
|
1013
|
+
*
|
|
1014
|
+
* A member's first pass cannot see the data bound to it, since that holds
|
|
1015
|
+
* its peers' outputs. So a member that settled is compared again with its
|
|
1016
|
+
* peers known, and the ones that turn out to have changed stop exposing
|
|
1017
|
+
* what they persisted, which may in turn change the members that read
|
|
1018
|
+
* them, until nothing more does. Without this a pool whose bound env
|
|
1019
|
+
* changed keeps handing the env it persisted to the host that runs it.
|
|
1020
|
+
*/
|
|
1021
|
+
interface Settled {
|
|
1022
|
+
readonly exposures: ReadonlyMap<string, unknown>;
|
|
1023
|
+
/** Actions whose first pass reused an output an input of which changed. */
|
|
1024
|
+
readonly reruns: ReadonlySet<string>;
|
|
1025
|
+
}
|
|
1026
|
+
const settledCycles = new Map<
|
|
1027
|
+
ReadonlySet<string>,
|
|
1028
|
+
Effect.Effect<Settled, Config.ConfigError | StateStoreError>
|
|
1029
|
+
>();
|
|
1030
|
+
const settle = (
|
|
1031
|
+
members: ReadonlySet<string>,
|
|
1032
|
+
): Effect.Effect<Settled, Config.ConfigError | StateStoreError> =>
|
|
1033
|
+
Effect.gen(function* () {
|
|
1034
|
+
const cached = settledCycles.get(members);
|
|
1035
|
+
if (cached) return yield* cached;
|
|
1036
|
+
const settling = yield* cachedInScope(memoScope)(
|
|
1037
|
+
Effect.gen(function* () {
|
|
1038
|
+
const nodes = [...members].map(
|
|
1039
|
+
(fqn) => Output.of(nodesByFqn.get(fqn) as any) as Output.ResourceExpr<any, any>,
|
|
828
1040
|
);
|
|
829
|
-
|
|
830
|
-
const
|
|
831
|
-
|
|
832
|
-
|
|
833
|
-
|
|
834
|
-
|
|
835
|
-
|
|
836
|
-
|
|
837
|
-
|
|
838
|
-
|
|
839
|
-
|
|
840
|
-
|
|
841
|
-
|
|
842
|
-
|
|
843
|
-
|
|
844
|
-
|
|
845
|
-
|
|
846
|
-
|
|
847
|
-
|
|
848
|
-
|
|
849
|
-
|
|
850
|
-
|
|
851
|
-
|
|
852
|
-
|
|
853
|
-
|
|
854
|
-
|
|
855
|
-
|
|
856
|
-
|
|
857
|
-
|
|
858
|
-
|
|
859
|
-
|
|
860
|
-
|
|
861
|
-
|
|
862
|
-
|
|
863
|
-
|
|
864
|
-
|
|
865
|
-
|
|
866
|
-
|
|
867
|
-
|
|
868
|
-
|
|
869
|
-
|
|
870
|
-
|
|
871
|
-
|
|
872
|
-
|
|
873
|
-
|
|
874
|
-
|
|
875
|
-
|
|
876
|
-
|
|
877
|
-
|
|
878
|
-
|
|
879
|
-
|
|
880
|
-
|
|
881
|
-
|
|
882
|
-
// consumer's plan props and binding data, so consumers would
|
|
883
|
-
// keep the stale attrs even though the upstream just
|
|
884
|
-
// re-reconciled. Expose only the stable attributes and let
|
|
885
|
-
// apply re-evaluate the rest against the forced reconcile's
|
|
886
|
-
// fresh output. A noop diff may carry `stables` for exactly this
|
|
887
|
-
// case (conditional stables such as a rename-mutable `name`);
|
|
888
|
-
// without them the forced upstream would only expose
|
|
889
|
-
// `provider.stables` and identity-sensitive consumers would
|
|
890
|
-
// falsely plan a replacement (#1832).
|
|
891
|
-
if (options.force) {
|
|
892
|
-
return withStables(oldState?.attr);
|
|
893
|
-
}
|
|
894
|
-
if (
|
|
895
|
-
oldState.status === "created" ||
|
|
896
|
-
oldState.status === "updated" ||
|
|
897
|
-
oldState.status === "replaced"
|
|
898
|
-
) {
|
|
899
|
-
// we can safely return the attributes if we know they have stabilized
|
|
900
|
-
return oldState?.attr;
|
|
901
|
-
} else {
|
|
902
|
-
// we must assume the resource doesn't exist if it hasn't stabilized
|
|
903
|
-
return resourceExpr;
|
|
1041
|
+
const first = yield* Effect.forEach(nodes, firstPass, { concurrency: "unbounded" });
|
|
1042
|
+
const exposures = new Map<string, unknown>(
|
|
1043
|
+
nodes.map((node, i) => [node.src.FQN, first[i].value]),
|
|
1044
|
+
);
|
|
1045
|
+
const peers: Peers = { members, exposures };
|
|
1046
|
+
const extents = new Map<string, string>(
|
|
1047
|
+
nodes.map((node, i) => [node.src.FQN, first[i].extent]),
|
|
1048
|
+
);
|
|
1049
|
+
const reruns = new Set<string>();
|
|
1050
|
+
const expose = (node: Output.ResourceExpr<any, any>) =>
|
|
1051
|
+
isAction(node.src)
|
|
1052
|
+
? Effect.map(planAction(node.src, peers), (plan) => exposeAction(node, plan))
|
|
1053
|
+
: exposeResource(node, peers);
|
|
1054
|
+
// The members to look at again: first the ones whose bound data
|
|
1055
|
+
// differs from what they persisted, then the ones that read a
|
|
1056
|
+
// member that changed.
|
|
1057
|
+
let suspects = (yield* Effect.forEach(
|
|
1058
|
+
nodes,
|
|
1059
|
+
(node, i) => {
|
|
1060
|
+
const { oldBindings } = first[i];
|
|
1061
|
+
return oldBindings === undefined
|
|
1062
|
+
? Effect.succeed([])
|
|
1063
|
+
: resolveInput(stack.bindings[node.src.FQN] ?? [], undefined, peers).pipe(
|
|
1064
|
+
Effect.map((bindings) =>
|
|
1065
|
+
haveBindingsChanged(oldBindings, dedupeBindings(bindings)) ? [node] : [],
|
|
1066
|
+
),
|
|
1067
|
+
);
|
|
1068
|
+
},
|
|
1069
|
+
{ concurrency: "unbounded" },
|
|
1070
|
+
)).flat();
|
|
1071
|
+
// A member only ever exposes less, so this ends; the bound guards
|
|
1072
|
+
// a provider whose stable attributes come and go.
|
|
1073
|
+
for (let round = 0; suspects.length > 0 && round <= 2 * nodes.length; round++) {
|
|
1074
|
+
const exposed = yield* Effect.forEach(suspects, expose, {
|
|
1075
|
+
concurrency: "unbounded",
|
|
1076
|
+
});
|
|
1077
|
+
const changing = new Set<string>();
|
|
1078
|
+
suspects.forEach((node, i) => {
|
|
1079
|
+
const fqn: string = node.src.FQN;
|
|
1080
|
+
const { extent } = exposed[i];
|
|
1081
|
+
if (extent === extents.get(fqn)) return;
|
|
1082
|
+
extents.set(fqn, extent);
|
|
1083
|
+
exposures.set(fqn, exposed[i].value);
|
|
1084
|
+
changing.add(fqn);
|
|
1085
|
+
if (isAction(node.src)) reruns.add(fqn);
|
|
1086
|
+
});
|
|
1087
|
+
suspects = nodes.filter(
|
|
1088
|
+
(node) =>
|
|
1089
|
+
extents.get(node.src.FQN) !== "nothing" &&
|
|
1090
|
+
(allUpstreamDependencies[node.src.FQN] ?? []).some((upstream) =>
|
|
1091
|
+
changing.has(upstream),
|
|
1092
|
+
),
|
|
1093
|
+
);
|
|
904
1094
|
}
|
|
1095
|
+
return { exposures, reruns } satisfies Settled;
|
|
905
1096
|
}),
|
|
906
|
-
)
|
|
1097
|
+
);
|
|
1098
|
+
settledCycles.set(members, settling);
|
|
1099
|
+
return yield* settling;
|
|
1100
|
+
});
|
|
1101
|
+
|
|
1102
|
+
const resolveResource = (
|
|
1103
|
+
resourceExpr: Output.ResourceExpr<any, any>,
|
|
1104
|
+
peers?: Peers,
|
|
1105
|
+
): Effect.Effect<any, Config.ConfigError | StateStoreError> =>
|
|
1106
|
+
Effect.gen(function* () {
|
|
1107
|
+
const fqn: string = resourceExpr.src.FQN;
|
|
1108
|
+
if (selected && !selected.has(fqn)) {
|
|
1109
|
+
return yield* Effect.die(
|
|
1110
|
+
new UnsafeSelectionBoundary({
|
|
1111
|
+
message: `Output evaluation discovered unselected dependency '${fqn}'. Declare the dependency explicitly or run a full deployment.`,
|
|
1112
|
+
}),
|
|
1113
|
+
);
|
|
1114
|
+
}
|
|
1115
|
+
if (peers?.members.has(fqn)) {
|
|
1116
|
+
return peers.exposures
|
|
1117
|
+
? peers.exposures.get(fqn)
|
|
1118
|
+
: (yield* firstPass(resourceExpr)).value;
|
|
1119
|
+
}
|
|
1120
|
+
const cycle = combinedCycles.get(fqn);
|
|
1121
|
+
return cycle
|
|
1122
|
+
? (yield* settle(cycle)).exposures.get(fqn)
|
|
1123
|
+
: (yield* firstPass(resourceExpr)).value;
|
|
907
1124
|
});
|
|
908
1125
|
|
|
909
1126
|
/**
|
|
@@ -924,12 +1141,14 @@ const makePlan = <A>(
|
|
|
924
1141
|
// a shared visited-set) keeps legitimately-shared diamond references
|
|
925
1142
|
// intact and is race-free under `concurrency: "unbounded"` (#1082).
|
|
926
1143
|
ancestors: ReadonlySet<object> = new Set(),
|
|
1144
|
+
// The cycle being resolved, if any.
|
|
1145
|
+
peers?: Peers,
|
|
927
1146
|
): Effect.Effect<any, Config.ConfigError | StateStoreError> =>
|
|
928
1147
|
Effect.gen(function* () {
|
|
929
1148
|
if (!input) {
|
|
930
1149
|
return input;
|
|
931
1150
|
} else if (Output.isExpr(input)) {
|
|
932
|
-
return yield* resolveOutput(input);
|
|
1151
|
+
return yield* resolveOutput(input, peers);
|
|
933
1152
|
} else if (Config.isConfig(input)) {
|
|
934
1153
|
// Config is a lazy reference to the deploy environment. Resolve it
|
|
935
1154
|
// here so the concrete value flows into diffing/hashing (an opaque
|
|
@@ -937,27 +1156,27 @@ const makePlan = <A>(
|
|
|
937
1156
|
// providers receive a resolved value instead of a Config object.
|
|
938
1157
|
// `Config.Redacted` resolves to a `Redacted`, which stays opaque via
|
|
939
1158
|
// the branch below.
|
|
940
|
-
return yield* resolveInput(yield* input, ancestors);
|
|
1159
|
+
return yield* resolveInput(yield* input, ancestors, peers);
|
|
941
1160
|
} else if (isResource(input)) {
|
|
942
1161
|
// Resource objects have dynamic properties (path, hash, etc.) that are
|
|
943
1162
|
// created on-demand by a Proxy getter and aren't enumerable via Object.entries.
|
|
944
1163
|
// Resolve the ResourceExpr to get the actual resource output, then continue
|
|
945
1164
|
// resolving any nested outputs in the result.
|
|
946
1165
|
const resourceExpr = Output.of(input);
|
|
947
|
-
const resolved = yield* resolveOutput(resourceExpr);
|
|
1166
|
+
const resolved = yield* resolveOutput(resourceExpr, peers);
|
|
948
1167
|
if (Output.isResourceExpr(resolved)) {
|
|
949
1168
|
// Still-unresolved reference (creating, replacing, or updating
|
|
950
1169
|
// upstream) — keep it evaluable for Apply.
|
|
951
1170
|
return resolved;
|
|
952
1171
|
}
|
|
953
|
-
return yield* resolveInput(resolved, ancestors);
|
|
1172
|
+
return yield* resolveInput(resolved, ancestors, peers);
|
|
954
1173
|
} else if (isPlainData(input)) {
|
|
955
1174
|
if (ancestors.has(input)) {
|
|
956
1175
|
return undefined;
|
|
957
1176
|
}
|
|
958
1177
|
const nested = new Set(ancestors).add(input);
|
|
959
1178
|
if (Array.isArray(input)) {
|
|
960
|
-
return yield* Effect.forEach(input, (item) => resolveInput(item, nested), {
|
|
1179
|
+
return yield* Effect.forEach(input, (item) => resolveInput(item, nested, peers), {
|
|
961
1180
|
concurrency: "unbounded",
|
|
962
1181
|
});
|
|
963
1182
|
}
|
|
@@ -965,7 +1184,7 @@ const makePlan = <A>(
|
|
|
965
1184
|
yield* Effect.forEach(
|
|
966
1185
|
Object.entries(input),
|
|
967
1186
|
([key, value]) =>
|
|
968
|
-
resolveInput(value, nested).pipe(Effect.map((value) => [key, value])),
|
|
1187
|
+
resolveInput(value, nested, peers).pipe(Effect.map((value) => [key, value])),
|
|
969
1188
|
{ concurrency: "unbounded" },
|
|
970
1189
|
),
|
|
971
1190
|
);
|
|
@@ -1017,30 +1236,76 @@ const makePlan = <A>(
|
|
|
1017
1236
|
return mapPlainData(input, ancestors, (child) => materializeStableRefs(child, ancestors));
|
|
1018
1237
|
};
|
|
1019
1238
|
|
|
1239
|
+
// A lookup that finds a resource this stack manages would bind it with
|
|
1240
|
+
// no dependency edge. Detected by the provider's static `stables`, the
|
|
1241
|
+
// properties that identify a resource; providers without them go unchecked.
|
|
1242
|
+
const rejectManagedLookup = Effect.fn(function* (
|
|
1243
|
+
expr: Output.LookupExpr<any>,
|
|
1244
|
+
props: unknown,
|
|
1245
|
+
attrs: Record<string, unknown>,
|
|
1246
|
+
) {
|
|
1247
|
+
const provider = yield* tryFindProviderByType(expr.lookupType, "live");
|
|
1248
|
+
const stables = Option.getOrUndefined(provider)?.stables ?? [];
|
|
1249
|
+
if (stables.length === 0) return;
|
|
1250
|
+
for (const [fqn, row] of persistedRows) {
|
|
1251
|
+
if (row === undefined || isActionState(row) || row.resourceType !== expr.lookupType) {
|
|
1252
|
+
continue;
|
|
1253
|
+
}
|
|
1254
|
+
const attr = row.attr as Record<string, unknown> | undefined;
|
|
1255
|
+
// An optional stable (a zone id on an account-level resource) is
|
|
1256
|
+
// undefined on both sides and still matches; at least one stable
|
|
1257
|
+
// must be set so an empty row never matches everything.
|
|
1258
|
+
if (
|
|
1259
|
+
attr !== undefined &&
|
|
1260
|
+
stables.some((key) => attr[key] !== undefined) &&
|
|
1261
|
+
stables.every((key) => attr[key] === attrs[key])
|
|
1262
|
+
) {
|
|
1263
|
+
return yield* Effect.die(
|
|
1264
|
+
new LookupOfManagedResourceError({
|
|
1265
|
+
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.`,
|
|
1266
|
+
type: expr.lookupType,
|
|
1267
|
+
props,
|
|
1268
|
+
fqn,
|
|
1269
|
+
}),
|
|
1270
|
+
);
|
|
1271
|
+
}
|
|
1272
|
+
}
|
|
1273
|
+
});
|
|
1274
|
+
|
|
1020
1275
|
const resolveOutput = (
|
|
1021
1276
|
expr: Output.Expr<any>,
|
|
1277
|
+
// The cycle being resolved, if any.
|
|
1278
|
+
peers?: Peers,
|
|
1022
1279
|
): Effect.Effect<any, Config.ConfigError | StateStoreError> =>
|
|
1023
1280
|
Effect.gen(function* () {
|
|
1024
1281
|
if (Output.isResourceExpr(expr)) {
|
|
1025
|
-
return yield* resolveResource(expr);
|
|
1282
|
+
return yield* resolveResource(expr, peers);
|
|
1026
1283
|
} else if (Output.isPropExpr(expr)) {
|
|
1027
|
-
const upstream = yield* resolveOutput(expr.expr);
|
|
1284
|
+
const upstream = yield* resolveOutput(expr.expr, peers);
|
|
1028
1285
|
return upstream?.[expr.identifier];
|
|
1029
1286
|
} else if (Output.isApplyExpr(expr)) {
|
|
1030
|
-
const upstream = yield* resolveOutput(expr.expr);
|
|
1287
|
+
const upstream = yield* resolveOutput(expr.expr, peers);
|
|
1031
1288
|
return Output.hasOutputs(upstream) ? expr : expr.f(upstream);
|
|
1289
|
+
} else if (Output.isLookupExpr(expr)) {
|
|
1290
|
+
// Props that depend on a resource still being created resolve at
|
|
1291
|
+
// apply, like any other Output.
|
|
1292
|
+
const props = yield* resolveInput(expr.expr, undefined, peers);
|
|
1293
|
+
if (Output.hasOutputs(props)) return expr;
|
|
1294
|
+
const attrs = yield* expr.f(props);
|
|
1295
|
+
yield* rejectManagedLookup(expr, props, attrs);
|
|
1296
|
+
return attrs;
|
|
1032
1297
|
} else if (Output.isEffectExpr(expr)) {
|
|
1033
|
-
const upstream = yield* resolveOutput(expr.expr);
|
|
1298
|
+
const upstream = yield* resolveOutput(expr.expr, peers);
|
|
1034
1299
|
return Output.hasOutputs(upstream) ? expr : yield* expr.f(upstream);
|
|
1035
1300
|
} else if (Output.isFlatMapExpr(expr)) {
|
|
1036
|
-
const upstream = yield* resolveOutput(expr.expr);
|
|
1301
|
+
const upstream = yield* resolveOutput(expr.expr, peers);
|
|
1037
1302
|
// Source still unresolved -> keep the flatMap intact for a later pass.
|
|
1038
1303
|
// Otherwise run `f` to produce the next Output and resolve into it.
|
|
1039
1304
|
return Output.hasOutputs(upstream)
|
|
1040
1305
|
? expr
|
|
1041
|
-
: yield* resolveOutput(Output.asOutput(expr.f(upstream)) as Output.Expr<any
|
|
1306
|
+
: yield* resolveOutput(Output.asOutput(expr.f(upstream)) as Output.Expr<any>, peers);
|
|
1042
1307
|
} else if (Output.isAllExpr(expr)) {
|
|
1043
|
-
return yield* Effect.forEach(expr.outs, resolveOutput, {
|
|
1308
|
+
return yield* Effect.forEach(expr.outs, (out) => resolveOutput(out, peers), {
|
|
1044
1309
|
concurrency: "unbounded",
|
|
1045
1310
|
});
|
|
1046
1311
|
} else if (Output.isLiteralExpr(expr)) {
|
|
@@ -1052,6 +1317,7 @@ const makePlan = <A>(
|
|
|
1052
1317
|
if (target !== undefined) {
|
|
1053
1318
|
return yield* resolveResource(
|
|
1054
1319
|
Output.of(target as any) as Output.ResourceExpr<any, any>,
|
|
1320
|
+
peers,
|
|
1055
1321
|
);
|
|
1056
1322
|
}
|
|
1057
1323
|
const refStack = expr.stack ?? stackName;
|
|
@@ -1095,7 +1361,7 @@ const makePlan = <A>(
|
|
|
1095
1361
|
}
|
|
1096
1362
|
return output;
|
|
1097
1363
|
} else if (Output.isNamedExpr(expr)) {
|
|
1098
|
-
return yield* resolveOutput(expr.expr);
|
|
1364
|
+
return yield* resolveOutput(expr.expr, peers);
|
|
1099
1365
|
}
|
|
1100
1366
|
return yield* Effect.die(new Error("Not implemented yet" + (expr as any).kind));
|
|
1101
1367
|
});
|
|
@@ -1134,6 +1400,28 @@ const makePlan = <A>(
|
|
|
1134
1400
|
),
|
|
1135
1401
|
]);
|
|
1136
1402
|
|
|
1403
|
+
// Fail before resolving anything: a ref that closes a cycle through
|
|
1404
|
+
// props would leave both resources waiting on each other (#3112).
|
|
1405
|
+
const refCycle = findRefCycle(
|
|
1406
|
+
refPropEdges.filter((edge) => newResourceFqns.has(edge.owner)),
|
|
1407
|
+
newUpstreamDependencies,
|
|
1408
|
+
);
|
|
1409
|
+
if (refCycle !== undefined) {
|
|
1410
|
+
const { edge, path } = refCycle;
|
|
1411
|
+
return yield* Effect.die(
|
|
1412
|
+
new RefCycleError({
|
|
1413
|
+
message:
|
|
1414
|
+
`'${edge.owner}' references '${edge.target}' through a ref in its props, and ` +
|
|
1415
|
+
`'${edge.target}' depends on '${edge.owner}' through props ` +
|
|
1416
|
+
`(${path.join(" -> ")}). Neither can be planned before the other. ` +
|
|
1417
|
+
`Bind the reference instead of passing it as a prop, so the cycle runs ` +
|
|
1418
|
+
`through bindings.`,
|
|
1419
|
+
owner: edge.owner,
|
|
1420
|
+
target: edge.target,
|
|
1421
|
+
}),
|
|
1422
|
+
);
|
|
1423
|
+
}
|
|
1424
|
+
|
|
1137
1425
|
// Map FQN -> list of upstream FQNs from bindings
|
|
1138
1426
|
const bindingUpstreamDependencies: {
|
|
1139
1427
|
[fqn: string]: string[];
|
|
@@ -1184,7 +1472,15 @@ const makePlan = <A>(
|
|
|
1184
1472
|
// Resources that participate in a cycle when both prop and binding
|
|
1185
1473
|
// edges are considered. Used below to decide whether an acyclic
|
|
1186
1474
|
// binding edge should also become a downstream edge.
|
|
1187
|
-
const
|
|
1475
|
+
const combinedCycles = findCycles(allUpstreamDependencies);
|
|
1476
|
+
const combinedCycleMembers = new Set(combinedCycles.keys());
|
|
1477
|
+
const peersOf = (fqn: string): Peers | undefined => {
|
|
1478
|
+
const members = combinedCycles.get(fqn);
|
|
1479
|
+
return members && { members };
|
|
1480
|
+
};
|
|
1481
|
+
const nodesByFqn = new Map<string, ResourceLike | ActionLike>(
|
|
1482
|
+
[...resources, ...actions].map((node) => [node.FQN, node]),
|
|
1483
|
+
);
|
|
1188
1484
|
const inputCycleMembers = findCycleMembers({
|
|
1189
1485
|
...newUpstreamDependencies,
|
|
1190
1486
|
...Object.fromEntries(
|
|
@@ -1260,48 +1556,67 @@ const makePlan = <A>(
|
|
|
1260
1556
|
...actions.map((action) => [action.FQN, computeDownstream(action.FQN)] as const),
|
|
1261
1557
|
]);
|
|
1262
1558
|
|
|
1559
|
+
const planAction = Effect.fn(function* (action: ActionLike, peers: Peers | undefined) {
|
|
1560
|
+
const fqn = action.FQN;
|
|
1561
|
+
const downstream = newDownstreamDependencies[fqn] ?? [];
|
|
1562
|
+
const oldState = yield* state.get({ stack: stackName, stage, fqn });
|
|
1563
|
+
const prior = isActionState(oldState) ? oldState : undefined;
|
|
1564
|
+
const resolvedInput = inputCycleMembers.has(fqn)
|
|
1565
|
+
? action.Input
|
|
1566
|
+
: yield* resolveInput(action.Input, undefined, peers);
|
|
1567
|
+
// Actions are pure in their inputs. Only a completed, unforced run
|
|
1568
|
+
// with fully known, identical inputs has a reusable output.
|
|
1569
|
+
if (
|
|
1570
|
+
prior?.status === "ran" &&
|
|
1571
|
+
!options.force &&
|
|
1572
|
+
!inputCycleMembers.has(fqn) &&
|
|
1573
|
+
isResolved(resolvedInput) &&
|
|
1574
|
+
prior.inputHash === (yield* hashInput(resolvedInput))
|
|
1575
|
+
) {
|
|
1576
|
+
return {
|
|
1577
|
+
kind: "action",
|
|
1578
|
+
action: "noop",
|
|
1579
|
+
def: action,
|
|
1580
|
+
state: prior,
|
|
1581
|
+
downstream,
|
|
1582
|
+
} satisfies ActionNoop;
|
|
1583
|
+
}
|
|
1584
|
+
return {
|
|
1585
|
+
kind: "action",
|
|
1586
|
+
action: "run",
|
|
1587
|
+
def: action,
|
|
1588
|
+
input: action.Input,
|
|
1589
|
+
state: prior,
|
|
1590
|
+
downstream,
|
|
1591
|
+
forced: !!options.force,
|
|
1592
|
+
} satisfies ActionRun;
|
|
1593
|
+
});
|
|
1263
1594
|
const actionPlans: Record<
|
|
1264
1595
|
string,
|
|
1265
1596
|
Effect.Effect<ActionRun | ActionNoop, Config.ConfigError | StateStoreError>
|
|
1266
1597
|
> = {};
|
|
1267
|
-
|
|
1598
|
+
// An Action's plan with the peers of its cycle, if it has one, at their
|
|
1599
|
+
// first pass.
|
|
1600
|
+
const firstActionPlan = Effect.fn(function* (action: ActionLike) {
|
|
1268
1601
|
return yield* (actionPlans[action.FQN] ??= yield* cachedInScope(memoScope)(
|
|
1269
|
-
|
|
1270
|
-
|
|
1271
|
-
|
|
1272
|
-
|
|
1273
|
-
|
|
1274
|
-
|
|
1275
|
-
|
|
1276
|
-
|
|
1277
|
-
|
|
1278
|
-
// with fully known, identical inputs has a reusable output.
|
|
1279
|
-
if (
|
|
1280
|
-
prior?.status === "ran" &&
|
|
1281
|
-
!options.force &&
|
|
1282
|
-
!inputCycleMembers.has(fqn) &&
|
|
1283
|
-
isResolved(resolvedInput) &&
|
|
1284
|
-
prior.inputHash === (yield* hashInput(resolvedInput))
|
|
1285
|
-
) {
|
|
1286
|
-
return {
|
|
1287
|
-
kind: "action",
|
|
1288
|
-
action: "noop",
|
|
1289
|
-
def: action,
|
|
1290
|
-
state: prior,
|
|
1291
|
-
downstream,
|
|
1292
|
-
} satisfies ActionNoop;
|
|
1293
|
-
}
|
|
1294
|
-
return {
|
|
1602
|
+
planAction(action, peersOf(action.FQN)),
|
|
1603
|
+
));
|
|
1604
|
+
});
|
|
1605
|
+
const diffAction = Effect.fn("plan.diff.action")(function* (action: ActionLike) {
|
|
1606
|
+
const plan = yield* firstActionPlan(action);
|
|
1607
|
+
const cycle = combinedCycles.get(action.FQN);
|
|
1608
|
+
// An input of a cycle member can change with what is bound to a peer.
|
|
1609
|
+
return plan.action === "noop" && cycle && (yield* settle(cycle)).reruns.has(action.FQN)
|
|
1610
|
+
? ({
|
|
1295
1611
|
kind: "action",
|
|
1296
1612
|
action: "run",
|
|
1297
1613
|
def: action,
|
|
1298
1614
|
input: action.Input,
|
|
1299
|
-
state:
|
|
1300
|
-
downstream,
|
|
1301
|
-
forced:
|
|
1302
|
-
} satisfies ActionRun
|
|
1303
|
-
|
|
1304
|
-
));
|
|
1615
|
+
state: plan.state,
|
|
1616
|
+
downstream: plan.downstream,
|
|
1617
|
+
forced: false,
|
|
1618
|
+
} satisfies ActionRun)
|
|
1619
|
+
: plan;
|
|
1305
1620
|
});
|
|
1306
1621
|
|
|
1307
1622
|
const plannedCount = yield* Ref.make(0);
|
|
@@ -1643,6 +1958,14 @@ const makePlan = <A>(
|
|
|
1643
1958
|
// comparing props across runtimes is meaningless (and the new
|
|
1644
1959
|
// mode's provider has never seen the old mode's state). The
|
|
1645
1960
|
// action is a replacement by definition.
|
|
1961
|
+
// The props above hold what a cycle's members settle on, which a
|
|
1962
|
+
// member's own replacement can leave unresolved: the peers it reads
|
|
1963
|
+
// change because it does. A provider can't compare unresolved props, so
|
|
1964
|
+
// the replacement it asked for over its peers' first pass stands.
|
|
1965
|
+
const replace = combinedCycles.has(fqn)
|
|
1966
|
+
? (yield* firstPass(Output.of(resource) as Output.ResourceExpr<any, any>)).replace
|
|
1967
|
+
: undefined;
|
|
1968
|
+
|
|
1646
1969
|
const diff = modeSwitched
|
|
1647
1970
|
? ({
|
|
1648
1971
|
action: "replace",
|
|
@@ -1707,6 +2030,7 @@ const makePlan = <A>(
|
|
|
1707
2030
|
? ({ action: "update" } satisfies UpdateDiff)
|
|
1708
2031
|
: diff,
|
|
1709
2032
|
),
|
|
2033
|
+
Effect.map((diff) => (replace && diff.action !== "replace" ? replace : diff)),
|
|
1710
2034
|
);
|
|
1711
2035
|
|
|
1712
2036
|
if (oldState.status === "creating") {
|
|
@@ -2036,11 +2360,32 @@ const makePlan = <A>(
|
|
|
2036
2360
|
)) as ReadonlyArray<readonly [string, ActionApply]>,
|
|
2037
2361
|
) as Plan["actions"];
|
|
2038
2362
|
|
|
2039
|
-
// SCC membership of the
|
|
2040
|
-
//
|
|
2041
|
-
//
|
|
2042
|
-
//
|
|
2043
|
-
|
|
2363
|
+
// SCC membership of the graph Apply schedules. Apply uses it to decide
|
|
2364
|
+
// whether an update node must publish its prior attr early to break a
|
|
2365
|
+
// cycle, or can simply wait for upstreams like a DAG node (the common
|
|
2366
|
+
// case). The edges are the ones each node still carries — exactly what
|
|
2367
|
+
// Apply's `waitForDeps` waits on. A declared reference to an upstream's
|
|
2368
|
+
// stable attribute resolves to its value during planning and orders
|
|
2369
|
+
// nothing, so it cannot close a cycle: two updating Workers that bind
|
|
2370
|
+
// each other only by `workerName` are not a cycle, and a node that
|
|
2371
|
+
// still references a peer's changing attribute waits for it (#3103).
|
|
2372
|
+
const cycleMembers = findCycleMembers(
|
|
2373
|
+
Object.fromEntries([
|
|
2374
|
+
...Object.entries(resourceGraph).map(([fqn, node]): [string, string[]] => [
|
|
2375
|
+
fqn,
|
|
2376
|
+
[
|
|
2377
|
+
...new Set([
|
|
2378
|
+
...Object.keys(Output.resolveUpstream("props" in node ? node.props : undefined)),
|
|
2379
|
+
...Object.keys(Output.resolveUpstream(node.bindings)),
|
|
2380
|
+
]),
|
|
2381
|
+
].filter((dep) => newNodeFqns.has(dep)),
|
|
2382
|
+
]),
|
|
2383
|
+
...actions.map((action): [string, string[]] => [
|
|
2384
|
+
action.FQN,
|
|
2385
|
+
allUpstreamDependencies[action.FQN] ?? [],
|
|
2386
|
+
]),
|
|
2387
|
+
]),
|
|
2388
|
+
);
|
|
2044
2389
|
|
|
2045
2390
|
// Detect unsatisfiable dependency cycles among create/replace nodes.
|
|
2046
2391
|
// Update/noop nodes signal their Deferred before waitForDeps when in a
|
|
@@ -2289,6 +2634,7 @@ const makePlan = <A>(
|
|
|
2289
2634
|
FormerFqns: undefined,
|
|
2290
2635
|
RuntimeContext: undefined!,
|
|
2291
2636
|
Providers: undefined,
|
|
2637
|
+
Lookup: undefined as never,
|
|
2292
2638
|
} as ResourceLike,
|
|
2293
2639
|
downstream: [...downstream],
|
|
2294
2640
|
bindings: oldState.bindings.map((binding) => ({
|
|
@@ -2325,6 +2671,52 @@ const makePlan = <A>(
|
|
|
2325
2671
|
}
|
|
2326
2672
|
}
|
|
2327
2673
|
|
|
2674
|
+
// `RemovalPolicy.protect()`: refuse the whole plan, before anything is
|
|
2675
|
+
// applied, when it would start replacing or delete a protected resource. Both
|
|
2676
|
+
// the declaration and the persisted row count, so dropping `protect()`
|
|
2677
|
+
// in the same deploy as the replacement is refused too.
|
|
2678
|
+
yield* Effect.forEach(
|
|
2679
|
+
// An Action declared at a protected resource's FQN would overwrite its
|
|
2680
|
+
// row without ever planning a delete, abandoning the resource.
|
|
2681
|
+
persistedFqns.filter((fqn) => newActionFqns.has(fqn) && !newResourceFqns.has(fqn)),
|
|
2682
|
+
(fqn) =>
|
|
2683
|
+
state.get({ stack: stackName, stage, fqn }).pipe(Effect.map((row) => [fqn, row] as const)),
|
|
2684
|
+
{ concurrency: "unbounded" },
|
|
2685
|
+
).pipe(
|
|
2686
|
+
Effect.flatMap((takenOverByActions) => {
|
|
2687
|
+
const refused = [
|
|
2688
|
+
...Object.entries(resourceGraph).flatMap(([fqn, node]) =>
|
|
2689
|
+
node.action === "replace" &&
|
|
2690
|
+
// Finishing a `replaced` row's drain only deletes an old generation
|
|
2691
|
+
// the dependents already left; the current one is untouched.
|
|
2692
|
+
!(node.state.status === "replaced" && !node.restart) &&
|
|
2693
|
+
(node.resource.RemovalPolicy === "protect" || node.state.removalPolicy === "protect")
|
|
2694
|
+
? [{ fqn, action: "replace" as const }]
|
|
2695
|
+
: [],
|
|
2696
|
+
),
|
|
2697
|
+
...Object.entries(deletions).flatMap(([fqn, node]) =>
|
|
2698
|
+
node?.state.removalPolicy === "protect" ? [{ fqn, action: "delete" as const }] : [],
|
|
2699
|
+
),
|
|
2700
|
+
...takenOverByActions.flatMap(([fqn, row]) =>
|
|
2701
|
+
!isActionState(row) && (row as ResourceState | undefined)?.removalPolicy === "protect"
|
|
2702
|
+
? [{ fqn, action: "delete" as const }]
|
|
2703
|
+
: [],
|
|
2704
|
+
),
|
|
2705
|
+
];
|
|
2706
|
+
return refused.length === 0
|
|
2707
|
+
? Effect.void
|
|
2708
|
+
: Effect.fail(
|
|
2709
|
+
new ProtectedResource({
|
|
2710
|
+
message:
|
|
2711
|
+
`Refusing to ${refused.map((r) => `${r.action} '${r.fqn}'`).join(", ")}: ` +
|
|
2712
|
+
"protected by RemovalPolicy.protect(). Deploy it without protect() first " +
|
|
2713
|
+
"to replace or delete it deliberately.",
|
|
2714
|
+
resources: refused,
|
|
2715
|
+
}),
|
|
2716
|
+
);
|
|
2717
|
+
}),
|
|
2718
|
+
);
|
|
2719
|
+
|
|
2328
2720
|
return {
|
|
2329
2721
|
resources: resourceGraph,
|
|
2330
2722
|
actions: actionGraph,
|