alchemy 2.0.0-beta.85 → 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/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
|
@@ -0,0 +1,195 @@
|
|
|
1
|
+
import type * as cf from "@cloudflare/workers-types";
|
|
2
|
+
import * as ConfigProvider from "effect/ConfigProvider";
|
|
3
|
+
import * as Context from "effect/Context";
|
|
4
|
+
import * as Effect from "effect/Effect";
|
|
5
|
+
import * as Layer from "effect/Layer";
|
|
6
|
+
import * as Logger from "effect/Logger";
|
|
7
|
+
import * as Option from "effect/Option";
|
|
8
|
+
import * as Scope from "effect/Scope";
|
|
9
|
+
import * as Tracer from "effect/Tracer";
|
|
10
|
+
import type { HttpEffect } from "../../Http.ts";
|
|
11
|
+
import * as Output from "../../Output.ts";
|
|
12
|
+
import type { FunctionContext, FunctionListener } from "../../Runtime/Function.ts";
|
|
13
|
+
import { packEnvValueKeepRedacted, RuntimeContext, unpackEnvValue } from "../../RuntimeContext.ts";
|
|
14
|
+
import { EventLifetime } from "../EventLifetime.ts";
|
|
15
|
+
import { WorkerEnvironment } from "../WorkerEnvironment.ts";
|
|
16
|
+
import { makeRequestEffect } from "./HttpServer.ts";
|
|
17
|
+
import { ExportedHandlerMethods, isWorkerEvent, type WorkerEvent } from "./WorkerEvent.ts";
|
|
18
|
+
|
|
19
|
+
/** Something a hosted class or capture exports onto its Worker's bundle. */
|
|
20
|
+
export interface WorkerExportLike {
|
|
21
|
+
readonly kind: string;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
/** The engine-specific half of a Worker runtime context. */
|
|
25
|
+
export interface WorkerRuntimeContextOptions {
|
|
26
|
+
/** The Worker resource type (e.g. `Cloudflare.Worker`). */
|
|
27
|
+
readonly type: string;
|
|
28
|
+
/** Services the host provides its init in every phase. */
|
|
29
|
+
readonly hostServices?: Layer.Layer<any, never, any> | undefined;
|
|
30
|
+
/**
|
|
31
|
+
* The engine's own per-event services (its execution context): the bridge
|
|
32
|
+
* provides them to each event, so a listener never keeps init's copy.
|
|
33
|
+
*/
|
|
34
|
+
readonly eventServices?: ReadonlyArray<Context.Key<any, any>> | undefined;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
const makeRequestHandler =
|
|
38
|
+
<Req = never>(handler: HttpEffect<Req> | Effect.Effect<HttpEffect<Req>>) =>
|
|
39
|
+
(event: any) =>
|
|
40
|
+
isWorkerEvent(event) && event.type === "fetch"
|
|
41
|
+
? makeRequestEffect(event.input, handler, event.context)
|
|
42
|
+
: undefined;
|
|
43
|
+
|
|
44
|
+
export interface WorkerRuntimeContext extends FunctionContext {
|
|
45
|
+
export(name: string, value: any): Effect.Effect<void>;
|
|
46
|
+
shape: () => Record<string, any>;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
export const makeWorkerRuntimeContext = (
|
|
50
|
+
id: string,
|
|
51
|
+
options: WorkerRuntimeContextOptions,
|
|
52
|
+
): WorkerRuntimeContext => {
|
|
53
|
+
const listeners: Effect.Effect<FunctionListener>[] = [];
|
|
54
|
+
const exports: Record<string, WorkerExportLike> = {};
|
|
55
|
+
const env: Record<string, any> = {};
|
|
56
|
+
let userShape: Record<string, unknown> | undefined;
|
|
57
|
+
|
|
58
|
+
const ctx = {
|
|
59
|
+
Type: options.type,
|
|
60
|
+
id,
|
|
61
|
+
env,
|
|
62
|
+
shape: () => userShape!,
|
|
63
|
+
get: (key: string) =>
|
|
64
|
+
Effect.serviceOption(WorkerEnvironment).pipe(
|
|
65
|
+
Effect.map(Option.getOrUndefined),
|
|
66
|
+
// Key is already canonical (see RuntimeContext.sanitizeKey). Read
|
|
67
|
+
// straight from `WorkerEnvironment` — see `unpackEnvValue` for why
|
|
68
|
+
// this must never resolve through `Config.String`.
|
|
69
|
+
Effect.map((env) => unpackEnvValue(env?.[key])),
|
|
70
|
+
) as any,
|
|
71
|
+
set: (key: string, output: Output.Output) =>
|
|
72
|
+
Effect.sync(() => {
|
|
73
|
+
// `packEnvValueKeepRedacted` keeps the Redacted wrapper on the
|
|
74
|
+
// outside so the put-worker loop can deploy secrets via
|
|
75
|
+
// `secret_text` instead of leaking them as `plain_text`, while the
|
|
76
|
+
// inner marker lets the runtime `get` accessor rebuild the wrapper
|
|
77
|
+
// after Cloudflare hands the binding back as a plain string.
|
|
78
|
+
env[key] = output.pipe(Output.map(packEnvValueKeepRedacted));
|
|
79
|
+
return key;
|
|
80
|
+
}),
|
|
81
|
+
serve: <Req = never>(
|
|
82
|
+
handler: HttpEffect<Req> | Effect.Effect<HttpEffect<Req>>,
|
|
83
|
+
options?: { shape?: Record<string, unknown> },
|
|
84
|
+
) => {
|
|
85
|
+
// Capture the user's full default-export shape so `exports` can
|
|
86
|
+
// expose any non-handler methods on it as RPC methods on the
|
|
87
|
+
// deployed `WorkerEntrypoint` subclass — see `__rpc__` below.
|
|
88
|
+
if (options?.shape) userShape = options.shape;
|
|
89
|
+
return ctx.listen(makeRequestHandler(handler));
|
|
90
|
+
},
|
|
91
|
+
listen: ((handler: FunctionListener | Effect.Effect<FunctionListener>) =>
|
|
92
|
+
Effect.gen(function* () {
|
|
93
|
+
// Listeners (`cron`, `email`, queue consumers, webhook routes) are
|
|
94
|
+
// registered inside the Worker's init effect, so their requirements
|
|
95
|
+
// are met by whatever init provided to itself. Capture that context
|
|
96
|
+
// and run each of the handler's events in it, minus what the bridge
|
|
97
|
+
// supplies per event. Init's `ConfigProvider` is Platform's config
|
|
98
|
+
// interceptor; handlers read config through the bridge's runtime
|
|
99
|
+
// provider.
|
|
100
|
+
const services = (yield* Effect.context<never>()).pipe(
|
|
101
|
+
Context.omit(
|
|
102
|
+
ConfigProvider.ConfigProvider,
|
|
103
|
+
EventLifetime,
|
|
104
|
+
Layer.CurrentMemoMap,
|
|
105
|
+
Logger.CurrentLoggers,
|
|
106
|
+
RuntimeContext,
|
|
107
|
+
Scope.Scope,
|
|
108
|
+
Tracer.ParentSpan,
|
|
109
|
+
Tracer.Tracer,
|
|
110
|
+
...(options.eventServices ?? []),
|
|
111
|
+
),
|
|
112
|
+
);
|
|
113
|
+
const withServices =
|
|
114
|
+
(listener: FunctionListener): FunctionListener =>
|
|
115
|
+
(event) => {
|
|
116
|
+
const eff = listener(event);
|
|
117
|
+
return Effect.isEffect(eff) ? Effect.provide(eff, services) : eff;
|
|
118
|
+
};
|
|
119
|
+
listeners.push(
|
|
120
|
+
Effect.isEffect(handler)
|
|
121
|
+
? Effect.map(Effect.provide(handler, services), withServices)
|
|
122
|
+
: Effect.succeed(withServices(handler)),
|
|
123
|
+
);
|
|
124
|
+
})) as any as FunctionContext["listen"],
|
|
125
|
+
export: (name: string, value: any) =>
|
|
126
|
+
Effect.sync(() => {
|
|
127
|
+
exports[name] = value;
|
|
128
|
+
}),
|
|
129
|
+
hostServices: options.hostServices,
|
|
130
|
+
planServices: Layer.mergeAll(Layer.succeed(WorkerEnvironment, {})),
|
|
131
|
+
exports: Effect.gen(function* () {
|
|
132
|
+
const handlers = yield* Effect.all(listeners, {
|
|
133
|
+
concurrency: "unbounded",
|
|
134
|
+
});
|
|
135
|
+
const services = yield* Effect.context();
|
|
136
|
+
|
|
137
|
+
const dispatch =
|
|
138
|
+
(type: WorkerEvent["type"]) =>
|
|
139
|
+
(request: any, env: unknown, context: cf.ExecutionContext) => {
|
|
140
|
+
const event: WorkerEvent = {
|
|
141
|
+
kind: "Cloudflare.Workers.WorkerEvent",
|
|
142
|
+
type,
|
|
143
|
+
input: request,
|
|
144
|
+
env,
|
|
145
|
+
context,
|
|
146
|
+
};
|
|
147
|
+
const effects: Effect.Effect<unknown>[] = [];
|
|
148
|
+
for (const handler of handlers) {
|
|
149
|
+
const eff = handler(event);
|
|
150
|
+
if (Effect.isEffect(eff)) {
|
|
151
|
+
effects.push(eff);
|
|
152
|
+
}
|
|
153
|
+
}
|
|
154
|
+
if (effects.length === 1) {
|
|
155
|
+
return [effects[0], services];
|
|
156
|
+
}
|
|
157
|
+
if (effects.length > 1) {
|
|
158
|
+
return [
|
|
159
|
+
Effect.all(effects, { concurrency: "unbounded" }).pipe(
|
|
160
|
+
Effect.map((results) => {
|
|
161
|
+
for (const result of results) {
|
|
162
|
+
if (result instanceof Response) return result;
|
|
163
|
+
}
|
|
164
|
+
return results[results.length - 1];
|
|
165
|
+
}),
|
|
166
|
+
),
|
|
167
|
+
services,
|
|
168
|
+
];
|
|
169
|
+
}
|
|
170
|
+
return [
|
|
171
|
+
Effect.die(new Error(`No event handler found for event type '${type}'`)),
|
|
172
|
+
services,
|
|
173
|
+
];
|
|
174
|
+
};
|
|
175
|
+
|
|
176
|
+
// RPC method dispatchers — one per non-handler method on the user's
|
|
177
|
+
// shape. Each dispatcher is invoked by the WorkerEntrypoint bridge
|
|
178
|
+
// as `dispatcher(args, ctx)`: `args` are the user-facing call args,
|
|
179
|
+
// `ctx` is the `this.ctx` that Cloudflare hands the bridge per RPC
|
|
180
|
+
// request. The dispatcher runs the user effect with the same runtime
|
|
181
|
+
// layer the fetch path uses, then envelope-encodes the result so
|
|
182
|
+
// `Effect.fail` round-trips as `RpcErrorEnvelope` and `Stream` as
|
|
183
|
+
// `RpcStreamEnvelope` (consumers wrap the binding with
|
|
184
|
+
// `toRpcAsync`/`bindWorker` to decode).
|
|
185
|
+
|
|
186
|
+
return {
|
|
187
|
+
...exports,
|
|
188
|
+
default: Object.fromEntries(
|
|
189
|
+
ExportedHandlerMethods.map((method) => [method, dispatch(method)]),
|
|
190
|
+
),
|
|
191
|
+
};
|
|
192
|
+
}),
|
|
193
|
+
};
|
|
194
|
+
return ctx;
|
|
195
|
+
};
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import type * as cf from "@cloudflare/workers-types";
|
|
2
|
+
import * as Effect from "effect/Effect";
|
|
3
|
+
import { ActiveStorageTransactions } from "../DurableObjectTransactionContext.ts";
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* Runs scheduler bookkeeping inside the calling fiber's transaction on
|
|
7
|
+
* `storage`, so a job scheduled in a transaction commits or rolls back with
|
|
8
|
+
* it. Otherwise it runs through `start`, which opens a new transaction, or
|
|
9
|
+
* fails when the caller holds a transaction it can no longer use.
|
|
10
|
+
*/
|
|
11
|
+
export const inStorageTransaction = <A, E, R, E2, R2>(
|
|
12
|
+
storage: cf.DurableObjectStorage,
|
|
13
|
+
effect: Effect.Effect<A, E, R>,
|
|
14
|
+
start: (effect: Effect.Effect<A, E, R>) => Effect.Effect<A, E | E2, R | R2>,
|
|
15
|
+
): Effect.Effect<A, E | E2, R | R2> =>
|
|
16
|
+
Effect.withFiber((fiber) => {
|
|
17
|
+
const owned = fiber.getRef(ActiveStorageTransactions).get(storage);
|
|
18
|
+
return owned !== undefined && owned.active && owned.owner === fiber && !owned.rolledBack
|
|
19
|
+
? effect
|
|
20
|
+
: start(effect);
|
|
21
|
+
});
|
|
@@ -0,0 +1,437 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The private wire format a workflow step uses to carry a typed Effect
|
|
3
|
+
* failure through the engine's native step retry/storage machinery, which
|
|
4
|
+
* keeps only an `Error`'s message. Shared by every Workflows engine that
|
|
5
|
+
* follows the Cloudflare Workflows API (Cloudflare today).
|
|
6
|
+
*
|
|
7
|
+
* @internal
|
|
8
|
+
*/
|
|
9
|
+
import * as Cause from "effect/Cause";
|
|
10
|
+
import * as Data from "effect/Data";
|
|
11
|
+
import * as Effect from "effect/Effect";
|
|
12
|
+
import { Base64, Base64Url } from "effect/encoding";
|
|
13
|
+
import * as Exit from "effect/Exit";
|
|
14
|
+
import * as FiberSet from "effect/FiberSet";
|
|
15
|
+
import * as Result from "effect/Result";
|
|
16
|
+
import * as Scope from "effect/Scope";
|
|
17
|
+
import { encodeRpcError } from "../Rpc.ts";
|
|
18
|
+
|
|
19
|
+
/** The raw value a native `step.do` rejected with, decoded back into a Cause below. */
|
|
20
|
+
class NativeStepRejection extends Data.TaggedError("NativeStepRejection")<{
|
|
21
|
+
readonly error: unknown;
|
|
22
|
+
}> {}
|
|
23
|
+
|
|
24
|
+
/** The workflow run a step failure belongs to. */
|
|
25
|
+
export interface WorkflowIdentity {
|
|
26
|
+
readonly workflow: string;
|
|
27
|
+
readonly instanceId: string;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
/** Build the engine's non-retryable error for a terminal failure message. */
|
|
31
|
+
export type TerminalFailure = (message: string) => Promise<Error>;
|
|
32
|
+
|
|
33
|
+
const failurePrefix = "[alchemy-workflow-failure:v1]";
|
|
34
|
+
const terminalPrefix = "[alchemy-workflow-terminal:v1]";
|
|
35
|
+
const maxFailureLength = 16_384;
|
|
36
|
+
|
|
37
|
+
/** The marked message of a terminal (non-retryable) step failure. */
|
|
38
|
+
export const terminalFailureMessage = (message: string): string => `${terminalPrefix}${message}`;
|
|
39
|
+
|
|
40
|
+
/**
|
|
41
|
+
* Encode a step's failure cause into the engine's native error (and decode
|
|
42
|
+
* it back on the run side), terminating with `terminalFailure` for defects,
|
|
43
|
+
* interruptions and unserializable failures.
|
|
44
|
+
*/
|
|
45
|
+
export const makeWorkflowFailureCodec = (terminalFailure: TerminalFailure) => {
|
|
46
|
+
const callbackFailure = async <E>(
|
|
47
|
+
cause: Cause.Cause<E>,
|
|
48
|
+
step: string,
|
|
49
|
+
identity: WorkflowIdentity | undefined,
|
|
50
|
+
): Promise<Error> => {
|
|
51
|
+
if (!Cause.hasDies(cause) && !Cause.hasInterrupts(cause)) {
|
|
52
|
+
try {
|
|
53
|
+
const budget = { nodes: 0, seen: new Set<object>() };
|
|
54
|
+
const errors = cause.reasons.map((reason) => {
|
|
55
|
+
if (reason._tag !== "Fail") throw new TypeError("Expected an application failure");
|
|
56
|
+
return encodeFailureValue(reason.error, new Set<object>(), budget);
|
|
57
|
+
});
|
|
58
|
+
const error = Cause.squash(cause);
|
|
59
|
+
const summary =
|
|
60
|
+
error instanceof Error
|
|
61
|
+
? error.message
|
|
62
|
+
: typeof error === "string"
|
|
63
|
+
? error
|
|
64
|
+
: "Workflow application failure";
|
|
65
|
+
const body = `${Base64Url.encode(
|
|
66
|
+
JSON.stringify({
|
|
67
|
+
workflow: identity?.workflow ?? null,
|
|
68
|
+
instanceId: identity?.instanceId ?? null,
|
|
69
|
+
step,
|
|
70
|
+
errors,
|
|
71
|
+
}),
|
|
72
|
+
)}\n${summary}`;
|
|
73
|
+
const message = `${failurePrefix}${await failureDigest(body)}:${body}`;
|
|
74
|
+
if (new TextEncoder().encode(message).byteLength > maxFailureLength)
|
|
75
|
+
throw new TypeError("encoded failure exceeds 16 KiB");
|
|
76
|
+
return new Error(message);
|
|
77
|
+
} catch (error) {
|
|
78
|
+
throw await terminalFailure(
|
|
79
|
+
`Workflow application failure is not serializable: ${error instanceof Error ? error.message : "unsupported value"}`,
|
|
80
|
+
);
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
const error = Cause.squash(cause);
|
|
84
|
+
return terminalFailure(
|
|
85
|
+
error instanceof Error
|
|
86
|
+
? error.message
|
|
87
|
+
: typeof error === "string"
|
|
88
|
+
? error
|
|
89
|
+
: "Workflow callback defect or interruption",
|
|
90
|
+
);
|
|
91
|
+
};
|
|
92
|
+
|
|
93
|
+
const decodeApplicationFailure = async <E>(
|
|
94
|
+
error: unknown,
|
|
95
|
+
step: string,
|
|
96
|
+
identity: WorkflowIdentity | undefined,
|
|
97
|
+
): Promise<Cause.Cause<E> | undefined> => {
|
|
98
|
+
if (
|
|
99
|
+
!identity?.workflow ||
|
|
100
|
+
!identity.instanceId ||
|
|
101
|
+
!(error instanceof Error) ||
|
|
102
|
+
error.name !== "Error" ||
|
|
103
|
+
!error.message.startsWith(failurePrefix)
|
|
104
|
+
)
|
|
105
|
+
return undefined;
|
|
106
|
+
try {
|
|
107
|
+
if (new TextEncoder().encode(error.message).byteLength > maxFailureLength)
|
|
108
|
+
throw new TypeError("encoded failure exceeds 16 KiB");
|
|
109
|
+
const encoded = error.message.slice(failurePrefix.length);
|
|
110
|
+
const separator = encoded.indexOf(":");
|
|
111
|
+
const digest = encoded.slice(0, separator);
|
|
112
|
+
const body = encoded.slice(separator + 1);
|
|
113
|
+
if (separator !== 43 || digest !== (await failureDigest(body)))
|
|
114
|
+
throw new TypeError("invalid failure checksum");
|
|
115
|
+
const end = body.indexOf("\n");
|
|
116
|
+
if (end < 1) throw new TypeError("invalid failure framing");
|
|
117
|
+
const json = Base64Url.decodeString(body.slice(0, end));
|
|
118
|
+
if (Result.isFailure(json)) throw new TypeError("invalid failure encoding");
|
|
119
|
+
const envelope: unknown = JSON.parse(json.success);
|
|
120
|
+
if (
|
|
121
|
+
!envelope ||
|
|
122
|
+
typeof envelope !== "object" ||
|
|
123
|
+
!("workflow" in envelope) ||
|
|
124
|
+
envelope.workflow !== identity.workflow ||
|
|
125
|
+
!("instanceId" in envelope) ||
|
|
126
|
+
envelope.instanceId !== identity.instanceId ||
|
|
127
|
+
!("step" in envelope) ||
|
|
128
|
+
envelope.step !== step ||
|
|
129
|
+
!("errors" in envelope) ||
|
|
130
|
+
!Array.isArray(envelope.errors) ||
|
|
131
|
+
envelope.errors.length === 0 ||
|
|
132
|
+
Object.keys(envelope).length !== 4
|
|
133
|
+
)
|
|
134
|
+
throw new TypeError("invalid failure envelope");
|
|
135
|
+
// Only the validated private transport restores E's data; prototypes and identity are invocation-local.
|
|
136
|
+
const errors = envelope.errors.map((value) => decodeFailureValue(value)) as E[];
|
|
137
|
+
return Cause.fromReasons(errors.map((value) => Cause.makeFailReason(value)));
|
|
138
|
+
} catch (cause) {
|
|
139
|
+
throw new TypeError("Invalid persisted Workflow application failure", { cause });
|
|
140
|
+
}
|
|
141
|
+
};
|
|
142
|
+
|
|
143
|
+
return { callbackFailure, decodeApplicationFailure };
|
|
144
|
+
};
|
|
145
|
+
|
|
146
|
+
const failureDigest = async (body: string): Promise<string> =>
|
|
147
|
+
Base64Url.encode(
|
|
148
|
+
new Uint8Array(await crypto.subtle.digest("SHA-256", new TextEncoder().encode(body))),
|
|
149
|
+
);
|
|
150
|
+
|
|
151
|
+
type FailureValue = null | boolean | string | number | FailureValue[];
|
|
152
|
+
|
|
153
|
+
const encodeFailureValue = (
|
|
154
|
+
value: unknown,
|
|
155
|
+
ancestors = new Set<object>(),
|
|
156
|
+
budget = { nodes: 0, seen: new Set<object>() },
|
|
157
|
+
): FailureValue => {
|
|
158
|
+
if (
|
|
159
|
+
++budget.nodes > maxFailureLength ||
|
|
160
|
+
(typeof value === "string" && value.length > maxFailureLength)
|
|
161
|
+
)
|
|
162
|
+
throw new TypeError("encoded failure exceeds 16 KiB");
|
|
163
|
+
if (value === null || typeof value === "boolean" || typeof value === "string") return value;
|
|
164
|
+
if (typeof value === "number")
|
|
165
|
+
return Number.isFinite(value) && !Object.is(value, -0)
|
|
166
|
+
? value
|
|
167
|
+
: ["number", Object.is(value, -0) ? "-0" : String(value)];
|
|
168
|
+
if (value === undefined) return ["undefined"];
|
|
169
|
+
if (typeof value === "bigint") return ["bigint", String(value)];
|
|
170
|
+
if (typeof value !== "object") throw new TypeError(`unsupported ${typeof value}`);
|
|
171
|
+
if (ancestors.has(value)) throw new TypeError("cyclic error data");
|
|
172
|
+
if (budget.seen.has(value)) throw new TypeError("shared references in error data");
|
|
173
|
+
budget.seen.add(value);
|
|
174
|
+
if (ancestors.size >= 64) throw new TypeError("error data exceeds 64 nesting levels");
|
|
175
|
+
ancestors.add(value);
|
|
176
|
+
try {
|
|
177
|
+
const encode = (item: unknown) => encodeFailureValue(item, ancestors, budget);
|
|
178
|
+
const symbols = Object.getOwnPropertySymbols(value).filter(
|
|
179
|
+
(key) => !(value instanceof Error && key === Symbol.for("effect/Data/Error/plainArgs")),
|
|
180
|
+
);
|
|
181
|
+
if (symbols.length) throw new TypeError("symbol-keyed error data");
|
|
182
|
+
if (
|
|
183
|
+
value instanceof Date ||
|
|
184
|
+
value instanceof Uint8Array ||
|
|
185
|
+
value instanceof ArrayBuffer ||
|
|
186
|
+
value instanceof Map ||
|
|
187
|
+
value instanceof Set
|
|
188
|
+
) {
|
|
189
|
+
const own = Object.getOwnPropertyNames(value);
|
|
190
|
+
if (own.some((key) => !(value instanceof Uint8Array && /^(0|[1-9]\d*)$/.test(key))))
|
|
191
|
+
throw new TypeError("custom properties on serialized built-in values");
|
|
192
|
+
if (value instanceof Date) return ["date", encode(Date.prototype.getTime.call(value))];
|
|
193
|
+
if (value instanceof Uint8Array) return ["bytes", Base64.encode(value)];
|
|
194
|
+
if (value instanceof ArrayBuffer) return ["buffer", Base64.encode(new Uint8Array(value))];
|
|
195
|
+
if (value instanceof Map)
|
|
196
|
+
return [
|
|
197
|
+
"map",
|
|
198
|
+
[...Map.prototype.entries.call(value)].map(([key, item]) => [encode(key), encode(item)]),
|
|
199
|
+
];
|
|
200
|
+
return ["set", [...Set.prototype.values.call(value)].map(encode)];
|
|
201
|
+
}
|
|
202
|
+
if (Array.isArray(value)) {
|
|
203
|
+
const descriptors = Object.getOwnPropertyDescriptors(value);
|
|
204
|
+
const keys = Object.keys(descriptors);
|
|
205
|
+
if (
|
|
206
|
+
keys.length !== value.length + 1 ||
|
|
207
|
+
keys.some(
|
|
208
|
+
(key) => key !== "length" && (!/^(0|[1-9]\d*)$/.test(key) || Number(key) >= value.length),
|
|
209
|
+
)
|
|
210
|
+
)
|
|
211
|
+
throw new TypeError("sparse arrays or custom array properties");
|
|
212
|
+
for (const descriptor of Object.values(descriptors)) {
|
|
213
|
+
if (!("value" in descriptor)) throw new TypeError("accessor error data");
|
|
214
|
+
}
|
|
215
|
+
return [
|
|
216
|
+
"array",
|
|
217
|
+
Array.from({ length: value.length }, (_, i) => encode(descriptors[i].value)),
|
|
218
|
+
];
|
|
219
|
+
}
|
|
220
|
+
const descriptors = Object.getOwnPropertyDescriptors(value);
|
|
221
|
+
let tag: string | undefined;
|
|
222
|
+
for (let owner: object | null = value; owner; owner = Object.getPrototypeOf(owner)) {
|
|
223
|
+
const descriptor = Object.getOwnPropertyDescriptor(owner, "_tag");
|
|
224
|
+
if (!descriptor) continue;
|
|
225
|
+
if (!("value" in descriptor)) throw new TypeError("accessor error data");
|
|
226
|
+
if (typeof descriptor.value === "string") tag = descriptor.value;
|
|
227
|
+
break;
|
|
228
|
+
}
|
|
229
|
+
const prototype = Object.getPrototypeOf(value);
|
|
230
|
+
if (
|
|
231
|
+
!(value instanceof Error) &&
|
|
232
|
+
prototype !== null &&
|
|
233
|
+
prototype !== Object.prototype &&
|
|
234
|
+
tag === undefined
|
|
235
|
+
)
|
|
236
|
+
throw new TypeError("unsupported class instance");
|
|
237
|
+
for (const [key, descriptor] of Object.entries(descriptors)) {
|
|
238
|
+
if (!("value" in descriptor) && !(value instanceof Error && key === "stack"))
|
|
239
|
+
throw new TypeError("accessor error data");
|
|
240
|
+
}
|
|
241
|
+
const fields = new Map<string, unknown>();
|
|
242
|
+
if (tag !== undefined) fields.set("_tag", tag);
|
|
243
|
+
if (value instanceof Error) {
|
|
244
|
+
for (const key of ["name", "message", "stack"]) {
|
|
245
|
+
let owner: object | null = value;
|
|
246
|
+
while (owner) {
|
|
247
|
+
const descriptor = Object.getOwnPropertyDescriptor(owner, key);
|
|
248
|
+
if (descriptor) {
|
|
249
|
+
if (!("value" in descriptor) && !(owner === value && key === "stack"))
|
|
250
|
+
throw new TypeError("accessor error data");
|
|
251
|
+
break;
|
|
252
|
+
}
|
|
253
|
+
owner = Object.getPrototypeOf(owner);
|
|
254
|
+
}
|
|
255
|
+
}
|
|
256
|
+
for (const [key, item] of Object.entries(encodeRpcError(value) as Record<string, unknown>))
|
|
257
|
+
fields.set(key, item);
|
|
258
|
+
fields.set("name", value.name);
|
|
259
|
+
fields.set("message", value.message);
|
|
260
|
+
}
|
|
261
|
+
for (const [key, descriptor] of Object.entries(descriptors)) {
|
|
262
|
+
if (!("value" in descriptor)) {
|
|
263
|
+
if (value instanceof Error && key === "stack") fields.set(key, value.stack);
|
|
264
|
+
else throw new TypeError("accessor error data");
|
|
265
|
+
} else fields.set(key, descriptor.value);
|
|
266
|
+
}
|
|
267
|
+
return [
|
|
268
|
+
value instanceof Error ? "error" : "object",
|
|
269
|
+
[...fields].map(([key, item]) => [key, encode(item)]),
|
|
270
|
+
];
|
|
271
|
+
} finally {
|
|
272
|
+
ancestors.delete(value);
|
|
273
|
+
}
|
|
274
|
+
};
|
|
275
|
+
|
|
276
|
+
const decodeFailureValue = (value: unknown, depth = 0): unknown => {
|
|
277
|
+
if (
|
|
278
|
+
value === null ||
|
|
279
|
+
typeof value === "boolean" ||
|
|
280
|
+
typeof value === "string" ||
|
|
281
|
+
(typeof value === "number" && Number.isFinite(value))
|
|
282
|
+
)
|
|
283
|
+
return value;
|
|
284
|
+
if (!Array.isArray(value)) throw new TypeError("invalid serialized error value");
|
|
285
|
+
const decode = (item: unknown) => decodeFailureValue(item, depth + 1);
|
|
286
|
+
const [tag, data] = value;
|
|
287
|
+
if (tag === "undefined" && value.length === 1) return undefined;
|
|
288
|
+
if (value.length !== 2) throw new TypeError("invalid serialized error tuple");
|
|
289
|
+
if (
|
|
290
|
+
tag === "number" &&
|
|
291
|
+
typeof data === "string" &&
|
|
292
|
+
["NaN", "Infinity", "-Infinity", "-0"].includes(data)
|
|
293
|
+
)
|
|
294
|
+
return Number(data);
|
|
295
|
+
if (tag === "bigint" && typeof data === "string" && /^-?(0|[1-9]\d*)$/.test(data))
|
|
296
|
+
return BigInt(data);
|
|
297
|
+
if (depth >= 64) throw new TypeError("invalid serialized error value");
|
|
298
|
+
if (tag === "date") {
|
|
299
|
+
const timestamp = decode(data);
|
|
300
|
+
if (typeof timestamp === "number") return new Date(timestamp);
|
|
301
|
+
}
|
|
302
|
+
if ((tag === "bytes" || tag === "buffer") && typeof data === "string") {
|
|
303
|
+
const bytes = Base64.decode(data);
|
|
304
|
+
if (Result.isSuccess(bytes) && Base64.encode(bytes.success) === data)
|
|
305
|
+
return tag === "bytes" ? bytes.success : bytes.success.buffer;
|
|
306
|
+
}
|
|
307
|
+
if (Array.isArray(data)) {
|
|
308
|
+
if (tag === "array") return data.map(decode);
|
|
309
|
+
if (tag === "set") return new Set(data.map(decode));
|
|
310
|
+
if (tag === "map")
|
|
311
|
+
return new Map(
|
|
312
|
+
data.map((pair) => {
|
|
313
|
+
if (!Array.isArray(pair) || pair.length !== 2)
|
|
314
|
+
throw new TypeError("invalid serialized map");
|
|
315
|
+
return [decode(pair[0]), decode(pair[1])];
|
|
316
|
+
}),
|
|
317
|
+
);
|
|
318
|
+
if (tag === "object" || tag === "error") {
|
|
319
|
+
const result = tag === "error" ? new Error() : {};
|
|
320
|
+
const keys = new Set<string>();
|
|
321
|
+
for (const pair of data) {
|
|
322
|
+
if (
|
|
323
|
+
!Array.isArray(pair) ||
|
|
324
|
+
pair.length !== 2 ||
|
|
325
|
+
typeof pair[0] !== "string" ||
|
|
326
|
+
keys.has(pair[0])
|
|
327
|
+
)
|
|
328
|
+
throw new TypeError("invalid serialized error fields");
|
|
329
|
+
keys.add(pair[0]);
|
|
330
|
+
Object.defineProperty(result, pair[0], {
|
|
331
|
+
value: decode(pair[1]),
|
|
332
|
+
enumerable: true,
|
|
333
|
+
writable: true,
|
|
334
|
+
configurable: true,
|
|
335
|
+
});
|
|
336
|
+
}
|
|
337
|
+
return result;
|
|
338
|
+
}
|
|
339
|
+
}
|
|
340
|
+
throw new TypeError("invalid serialized error value");
|
|
341
|
+
};
|
|
342
|
+
|
|
343
|
+
/**
|
|
344
|
+
* Run one durable workflow task through the engine's native step API,
|
|
345
|
+
* owning its native callbacks: a typed failure crosses the native step as
|
|
346
|
+
* an encoded error and is decoded back into the task's failure channel;
|
|
347
|
+
* interruption does not wait out native retry timers.
|
|
348
|
+
*/
|
|
349
|
+
export const runWorkflowTask = <A, E, C>(options: {
|
|
350
|
+
readonly name: string;
|
|
351
|
+
readonly identity?: WorkflowIdentity;
|
|
352
|
+
readonly terminalFailure: TerminalFailure;
|
|
353
|
+
/** The engine's own terminal errors, rethrown as-is. */
|
|
354
|
+
readonly isNativeTerminal?: (error: unknown) => error is Error;
|
|
355
|
+
readonly effect: (context: C) => Effect.Effect<A, E, Scope.Scope>;
|
|
356
|
+
readonly native: (
|
|
357
|
+
callback: (context: C) => Promise<A>,
|
|
358
|
+
run: <B, F>(effect: Effect.Effect<B, F, Scope.Scope>) => Promise<B>,
|
|
359
|
+
) => Promise<A>;
|
|
360
|
+
}): Effect.Effect<A, E> => {
|
|
361
|
+
const { callbackFailure, decodeApplicationFailure } = makeWorkflowFailureCodec(
|
|
362
|
+
options.terminalFailure,
|
|
363
|
+
);
|
|
364
|
+
const encode = async <F>(cause: Cause.Cause<F>) => {
|
|
365
|
+
const original = Cause.squash(cause);
|
|
366
|
+
return options.isNativeTerminal?.(original)
|
|
367
|
+
? original
|
|
368
|
+
: await callbackFailure(cause, options.name, options.identity);
|
|
369
|
+
};
|
|
370
|
+
return Effect.scoped(
|
|
371
|
+
Effect.gen(function* () {
|
|
372
|
+
const runPromise = yield* FiberSet.makeRuntimePromise<never>();
|
|
373
|
+
let failure: { message: string; cause: Cause.Cause<E> } | undefined;
|
|
374
|
+
const run = async <B, F>(effect: Effect.Effect<B, F, Scope.Scope>) => {
|
|
375
|
+
const exit = await runPromise(
|
|
376
|
+
Effect.yieldNow.pipe(Effect.andThen(effect), Effect.scoped, Effect.exit),
|
|
377
|
+
);
|
|
378
|
+
if (Exit.isSuccess(exit)) return exit.value;
|
|
379
|
+
throw await encode(exit.cause);
|
|
380
|
+
};
|
|
381
|
+
const callback = async (context: C) => {
|
|
382
|
+
// Register the fiber before callback effects can interrupt their owner.
|
|
383
|
+
const exit = await runPromise(
|
|
384
|
+
Effect.yieldNow.pipe(
|
|
385
|
+
Effect.andThen(Effect.suspend(() => options.effect(context))),
|
|
386
|
+
Effect.scoped,
|
|
387
|
+
Effect.exit,
|
|
388
|
+
),
|
|
389
|
+
);
|
|
390
|
+
if (Exit.isSuccess(exit)) return exit.value;
|
|
391
|
+
const error = await encode(exit.cause);
|
|
392
|
+
// Native persistence discards custom fields; only match this invocation's error.
|
|
393
|
+
if (!Cause.hasDies(exit.cause) && !Cause.hasInterrupts(exit.cause)) {
|
|
394
|
+
failure = { message: error.message, cause: exit.cause };
|
|
395
|
+
}
|
|
396
|
+
throw error;
|
|
397
|
+
};
|
|
398
|
+
return yield* Effect.tryPromise({
|
|
399
|
+
try: () => options.native(callback, run),
|
|
400
|
+
catch: (error) => new NativeStepRejection({ error }),
|
|
401
|
+
}).pipe(
|
|
402
|
+
Effect.catch(({ error }) =>
|
|
403
|
+
failure &&
|
|
404
|
+
error instanceof Error &&
|
|
405
|
+
error.name === "Error" &&
|
|
406
|
+
error.message === failure.message
|
|
407
|
+
? Effect.failCause(failure.cause)
|
|
408
|
+
: Effect.promise(() =>
|
|
409
|
+
decodeApplicationFailure<E>(error, options.name, options.identity),
|
|
410
|
+
).pipe(
|
|
411
|
+
Effect.flatMap((cause) => (cause ? Effect.failCause(cause) : Effect.die(error))),
|
|
412
|
+
),
|
|
413
|
+
),
|
|
414
|
+
);
|
|
415
|
+
}),
|
|
416
|
+
);
|
|
417
|
+
};
|
|
418
|
+
|
|
419
|
+
/** Close run resources with the original exit; cleanup cannot replace the result. */
|
|
420
|
+
export const withWorkflowScope = <A, E, R>(
|
|
421
|
+
effect: Effect.Effect<A, E, R | Scope.Scope>,
|
|
422
|
+
isEjected: (scope: Scope.Scope) => boolean = () => false,
|
|
423
|
+
): Effect.Effect<A, E, Exclude<R, Scope.Scope>> =>
|
|
424
|
+
Effect.uninterruptibleMask((restore) =>
|
|
425
|
+
Effect.gen(function* () {
|
|
426
|
+
const scope = yield* Scope.make();
|
|
427
|
+
const exit = yield* restore(effect.pipe(Effect.provideService(Scope.Scope, scope))).pipe(
|
|
428
|
+
Effect.exit,
|
|
429
|
+
);
|
|
430
|
+
if (!isEjected(scope)) {
|
|
431
|
+
yield* Scope.close(scope, exit).pipe(
|
|
432
|
+
Effect.ignoreCause({ log: "Warn", message: "Workflow run scope close failed" }),
|
|
433
|
+
);
|
|
434
|
+
}
|
|
435
|
+
return yield* exit;
|
|
436
|
+
}),
|
|
437
|
+
);
|
package/src/Workers.ts
ADDED
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The shared Durable Object and Worker runtime, for every engine that
|
|
3
|
+
* hosts one (Cloudflare, Rivet).
|
|
4
|
+
*
|
|
5
|
+
* ```ts
|
|
6
|
+
* import * as Workers from "alchemy/Workers";
|
|
7
|
+
*
|
|
8
|
+
* Effect.provide(Layer.mergeAll(Default, Workers.InputGate));
|
|
9
|
+
* ```
|
|
10
|
+
*
|
|
11
|
+
* @module
|
|
12
|
+
*/
|
|
13
|
+
export { InputGate } from "./Workers/InputGate.ts";
|