Skip to content

v0.3.0

Choose a tag to compare

@Swahjak Swahjak released this 02 Mar 07:57
· 4 commits to main since this release

Breaking Changes

This release introduces a new multi-resource project model. The v1 manifest format (singular resource fields, extends inheritance) is no longer supported.

Migration required

  • Singular → plural arrays: "source": {...} becomes "sources": [{...}]; same for destinations, transformations, connections
  • extends removed: Replace file inheritance with a hookdeck.project.jsonc project root
  • name required: Every resource must have an explicit name field
  • Environment overrides: Move from manifest-level env_override to per-resource env maps (or env_overrides for transformations)

New Features

Project model (hookdeck.project.jsonc)

A project root file marks the boundary of a multi-file project:

{
  "version": "2",
  "env": {
    "staging": { "profile": "staging" },
    "production": { "profile": "production" }
  }
}

All hookdeck.jsonc files under this root are automatically discovered and loaded as resource manifests.

Multi-resource manifests

Each manifest can now define any combination of resource types:

{
  "sources": [{ "name": "webhook-src", "type": "Stripe" }],
  "destinations": [{ "name": "api-dest", "url": "https://api.example.com" }],
  "connections": [{ "name": "webhook-to-api", "source": "webhook-src", "destination": "api-dest" }]
}

Reference validation

The CLI validates all cross-resource references before deploying:

  • Naming collision detection within each resource type
  • Broken reference detection (connection → source/destination/transformation)
  • Clear error messages with file locations and available resources

Project-wide deployment

# Deploy entire project (discovers hookdeck.project.jsonc in CWD)
hookdeck-deploy deploy -e staging

# Explicit project path
hookdeck-deploy deploy -e staging --project ./path/to/hookdeck.project.jsonc

# Single-file deploy still works
hookdeck-deploy deploy -f ./hookdeck.jsonc

Resources are deployed in dependency order: sources, transformations, and destinations first; connections last.

Per-resource environment overrides

{
  "destinations": [{
    "name": "backend",
    "url": "https://dev.example.com/webhook",
    "env": {
      "staging": { "url": "https://staging.example.com/webhook" },
      "production": { "url": "https://api.example.com/webhook", "rate_limit": 50 }
    }
  }]
}

New JSON schema

  • Updated hookdeck-deploy.schema.json for plural resource format
  • New hookdeck-project.schema.json for project root files
  • hookdeck-deploy schema --project outputs the project schema

Internal

  • New pkg/project package with discovery, registry, and validation
  • Removed pkg/manifest/merge.go (extends/inheritance)
  • Simplified pkg/manifest/loader.go to LoadFile() only
  • Per-resource env resolution: ResolveSourceEnv, ResolveDestinationEnv, ResolveTransformationEnv
  • Multi-transformation ID resolution in deploy (each transformation gets its own resolved ID)
  • 60+ tests across 7 packages