Skip to main content

materialise_deploy_state

Function materialise_deploy_state 

Source
pub fn materialise_deploy_state(
    project_root: &Path,
    worker: &str,
    config: &Path,
    environment: &str,
) -> Result<bool, String>
Expand description

Fill a generated worker configuration from the committed deploy ledger. This is shared with bynk dev -- --remote; local dev leaves placeholders alone because Miniflare does not read the Cloudflare namespace id.

environment (slice 4, #837 review): before --env existed every real deploy recorded into "default" regardless, so hardcoding it here always matched. A project deployed only under a non-default --env now has nothing under "default" — reading the wrong section would misreport a provisioned project as never deployed, so this reads whichever section bynk dev --env NAME -- --remote names (default "default", unchanged).