Repository navigation
feat!: command provider - #673
Merged
Merged
Conversation
Contributor
|
Install the packages built from this commit: alchemy bun add alchemy@https://pkg.ing/alchemy/9e4dfb7@alchemy.run/better-auth bun add @alchemy.run/better-auth@https://pkg.ing/@alchemy.run/better-auth/9e4dfb7@alchemy.run/pr-package bun add @alchemy.run/pr-package@https://pkg.ing/@alchemy.run/pr-package/9e4dfb7 |
john-royal
marked this pull request as ready for review
June 23, 2026 16:40
AmanVarshney01
added a commit
to AmanVarshney01/alchemy-effect
that referenced
this pull request
Jul 8, 2026
…PI surface - rework ConnectionBinding to the single binding convention (alchemy-run#690): combined tag/callable + Binding.Host dispatch inside ConnectionBindingLive, drop Binding.Policy machinery and its Providers registrations - replace the removed Build/Command helper (alchemy-run#673) with a local spawner-based runBuildCommand in ComputeBuild - update shape-typed class forms to the id-only + .make(props, impl) Platform API - add the /v1/apps, /v1/deployments, and build-logs surface to the client, operation helpers, and route-parity tests (96-route coverage) - add ScmInstallation.connected/connectedAt, the connected list filter, and connectScmInstallation for the new SCM connect endpoint; unreleased routes are allowlisted until they ship to the production OpenAPI doc
DavidJFelix
pushed a commit
to DavidJFelix/alchemy-effect
that referenced
this pull request
Aug 7, 2026
Mkassabov
added a commit
that referenced
this pull request
Sep 29, 2026
BlankParticle
pushed a commit
that referenced
this pull request
Sep 29, 2026
BlankParticle
pushed a commit
that referenced
this pull request
Sep 29, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #538, #599, and #612.
Summary
Replaces the
Buildmodule with a unifiedCommandmodule that models running shell commands as first-class resources. The oldBuild.Command/Build.DevServerpair is split into three focused resources sharing a common executor, and a dedicatedCommand.Execresource is added for effectful commands that produce no artifact (the gap tracked in #599).What changed
New
Commandmodule (src/Command/)Command.Build— runs a shell command that produces an output asset (outdir) and tracks it in state. Inputs/outputs are content-hashed (opt-in viamemo) so unchanged projects skip the rebuild. Output shape is now{ outdir, hash: { input, output } }.Command.Exec— runs a command purely for its side effects (migrations, codegen, seeding). No output contract: it succeeds as long as the command exits0. Memoization is supported so it only re-runs when inputs change. (closes Build.Command's required outdir forces an artifact contract on effectful commands (no v2 Exec equivalent) #599)Command.Dev— long-lived dev-server process (formerlyBuild.DevServer), scoped to the stack instance, runs in the dev sidecar so it survives user-code HMR, mirrors stdout/stderr, and extracts the firsthttp(s)://URL as itsurloutput. No-op duringalchemy deploy.CommandExecutor— a shared service (Command.ts) exposingspawn(returns a child-process handle) andrun(collects exit code + stdout/stderr). Command output is piped live viasession.note.CommandError— a typed error extending Effect'sPlatformErrorreasons (SystemError,BadArgument) withUnexpectedExitandOutputNotFound, plus anisCommandErrorguard.Wiring
Command.providers()provides all three providers withCommandExecutorLive(src/Command/Providers.ts);src/Command/Local.tslaunches the localDevprovider in the RPC sidecar.AWS/Providers.tsandCloudflare/Providers.ts.Consumers updated
AWS.Website.StaticSite,Cloudflare.Website.StaticSite, andCloudflare.Workers.Workernow consumeCommand.Build/Command.Dev.llms.txtregenerated.Breaking changes
Build.Command→Command.Build,Build.DevServer→Command.Dev. Existing state referencing the old IDs will not match.Buildmodule (src/Build/*) is removed; import fromalchemy'sCommandmodule instead.Command.Buildoutput shape changed from{ outdir, hash: string }to{ outdir, hash: { input, output } };memonow also accepts a boolean.Test plan
Command/Build.test.ts,Command/Command.test.ts,Command/Dev.test.tspassStaticSitesmoke tests passbun tsc -bcleanalchemy devcorrectly starts/reuses theCommand.Devserver and surfaces its URL