Skip to content

Releases: dever-labs/mockly

v0.10.0

22 Jun 00:12

Choose a tag to compare

What's Changed

🚀 Features

Path matching

  • Named path parameters{name} syntax captures a single path segment: path: /users/{id}, path: /regions/{region}/emails
  • Mid-segment wildcards* now matches one segment anywhere in a path, not just as a trailing prefix: /regions/*/emails
  • path_regex field — dedicated regex field on HTTP and CoAP mocks as an alternative to the re: inline prefix

Response templating

  • New {{.request.*}} namespace available in all response body and header templates
    • {{.request.params.id}} — named path parameter captured by {id}
    • {{.request.body.field}} — JSON field from the incoming request body
    • {{.request.method}}, {{.request.path}}, {{.request.query.foo}}, {{.request.headers.X-Foo}}

Cross-protocol improvements

  • MQTT{name} topic segment captures (e.g. devices/{device_id}/cmd) available in response payload templates and log entries
  • CoAP — named path params, path_regex field, and response payload templating
  • SIPuri_regex field and response body templating
  • WebSocketon_connect.send and on_message.respond now rendered as Go templates ({{.request.path}}, {{.request.body}})

Logs API

  • GET /api/logs?matched_id=<id> — filter log entries by mock ID
  • GET /api/logs/count — count all log entries
  • GET /api/logs/count?matched_id=<id> — per-mock hit count without fetching full log bodies

Full Changelog: v0.9.0...v0.10.0

v0.9.0

09 Jun 22:01

Choose a tag to compare

What's Changed

🚀 Features

  • HTTP fault injection: Added headers field to inject custom response headers (e.g. Retry-After, WWW-Authenticate) via direct faults and per-mock faults
  • HTTP fault injection: Added abort field — hijacks the TCP connection and sends a RST reset, simulating a crashed server before any response
  • HTTP fault injection: Added truncate_body field — writes headers with an inflated Content-Length then closes mid-transfer, simulating a partial response
  • HTTP fault injection: Support for any HTTP status code in faults (3xx, 4xx, 5xx) — 3xx redirects no longer incorrectly inject an error body
  • Fault API: GET /api/fault/{protocol}/effective — new endpoint returning the merged effective fault (direct injection + active scenario overrides)
  • Fault API: POST /api/fault/{protocol} now echoes back the stored fault in the response body (was {"status":"ok"})
  • Fault API: GET /api/fault/{protocol} and DELETE /api/fault/{protocol} now return 404 for unknown protocol names

🐛 Bug Fixes

  • Fixed: delay-only HTTP faults (delay set, no status/body) were incorrectly overriding the response with a 503
  • Fixed: mutating API endpoints (POST, PUT, DELETE, PATCH) for HTTP, WebSocket, gRPC, GraphQL, TCP, Redis, SMTP, and MQTT would panic with a nil pointer dereference when the protocol was not configured — now return 503
  • Fixed: all DELETE /api/mocks/{protocol}/{id} endpoints returned 200 even when the ID did not exist — now return 404
  • Fixed: PUT /api/scenarios/{id} silently upserted instead of returning 404 for unknown IDs
  • Fixed: DELETE /api/scenarios/{id}/activate (deactivate) always returned 200 even for non-existent scenario IDs — now returns 404
  • Fixed: POST /api/reset did not restore SNMP traps to their initial config values
  • Fixed: CORS allowed methods list was missing PATCH
  • Fixed: FTP root-level file listing bug — files at the root path were never listed

🔧 Dependency Updates

  • Bump github.com/go-chi/chi/v5 from 5.2.5 to 5.3.0
  • Bump @tailwindcss/vite, tailwindcss, vite, react-dom, @tanstack/react-query, typescript-eslint, eslint (UI)
  • Bump serde_json, reqwest (Rust client)
  • Bump actions/checkout, actions/setup-dotnet (CI)

Full Changelog: v0.8.1...v0.9.0

v0.8.1

22 May 20:04

Choose a tag to compare

What's Changed

🐛 Bug Fixes

  • Docker: Fixed build failure caused by Dockerfile using golang:1.24-alpine while go.mod requires Go 1.25.

Full Changelog: v0.8.0...v0.8.1

v0.8.0

21 May 23:43

Choose a tag to compare

What's Changed

🚀 Features

  • Add support for multiple protocols with corresponding server implementations (MQTT, SMTP, WebSocket, gRPC)
  • Add fault injection support for various protocols
  • Enhance CORS support with new configuration options
  • Add request body size limit configuration

🐛 Bug Fixes

  • Fix response handling optimization in handleGet method
  • Fix WebSocket server race condition by using initialMocks in Start method
  • Fix fault injection to use per-protocol endpoint for HTTP

🔧 Dependency Updates

  • Bump google.golang.org/grpc from 1.80.0 → 1.81.1
  • Bump react-dom from 19.2.5 → 19.2.6
  • Bump @types/node from 25.6.0 → 25.9.0
  • Bump @tanstack/react-query from 5.100.6 → 5.100.10
  • Bump vite from 8.0.10 → 8.0.13
  • Bump eslint from 10.2.1 → 10.4.0
  • Bump globals from 17.5.0 → 17.6.0
  • Bump typescript-eslint from 8.59.1 → 8.59.3
  • Bump @vitejs/plugin-react to 6.0.2 and react-router-dom to 7.15.1

Full Changelog: v0.7.0...v0.8.0

v0.7.0

03 May 14:06

Choose a tag to compare

What's New

Features

  • Add TLS support for HTTP, WebSocket, TCP, and GraphQL servers (+ management API server)
  • Add race-condition protection (sync.RWMutex) to WebSocket, Redis, SMTP, TCP, and GraphQL servers

Bug Fixes

  • Fix deadlock in tlsutil TLS handshake test

Tests

  • Add concurrency and TLS integration tests for all affected servers

Dependencies

  • Bump typescript-eslint, @tanstack/react-query, and batch dependency updates

v0.6.1

26 Apr 20:25

Choose a tag to compare

What's New

New Presets (41 mocks total)

  • Anthropic — 7 mocks: Messages API, list models, count tokens, and error states (unauthorized, rate limit, overloaded)
  • AWS S3 — 11 mocks: list/create/head buckets, list/get/put/delete/head/copy objects, XML error states
  • PagerDuty — 13 mocks: incidents CRUD + notes, services, users, escalation policies, unauthorized error state
  • Resend — 10 mocks: send/get/update/cancel email, batch send, domains, API keys, error states

All presets are available via the Management API GET /api/presets and can be loaded with POST /api/presets/{name}/load.

v0.6.0

26 Apr 20:14
566ac62

Choose a tag to compare

What's New

SNMP Protocol Support (#38)

Mockly now ships a full SNMP agent mock alongside HTTP, WebSocket, gRPC, GraphQL, TCP, Redis, SMTP, and MQTT.

Features:

  • SNMPv1 / v2c / v3 agent (USM auth: MD5/SHA; priv: DES/AES)
  • GET / GETNEXT / GETBULK / SET operations
  • Outbound TRAPs — send configured trap PDUs to any target via the management API
  • Dynamic reload — add/update/delete OID mocks at runtime without restarting
  • 7 new REST endpoints under /api/mocks/snmp and /api/snmp/traps
  • Default port 1161 (change to 161 in config for the standard SNMP port)
protocols:
  snmp:
    enabled: true
    port: 1161
    community: public
    mocks:
      - id: sys-descr
        oid: 1.3.6.1.2.1.1.1.0
        type: string
        value: "Mockly Virtual Device"

See the SNMP section in the README for the full configuration reference.


Full Changelog: v0.5.1...v0.6.0

v0.5.1

17 Apr 17:05
f1d0d6c

Choose a tag to compare

v0.5.1

Bug Fixes & Security

  • fix(security): Bump rustls-webpki to 0.103.12 in Rust client (fixes 2 low-severity name constraint advisories)
  • fix(ci): Correct Docker UI dist path (/app/ui/dist/app/assets/dist)
  • fix(ci): Use npm install instead of npm ci for main package publish to fix lock file sync

Maintenance

  • Added cargo ecosystem to Dependabot config for Rust client tracking
  • Bumped react-dom 19.2.4 → 19.2.5
  • Bumped typescript 6.0.2 → 6.0.3
  • Bumped eslint-plugin-react-hooks 7.0.1 → 7.1.0
  • Bumped @types/node 25.5.2 → 25.6.0
  • Bumped @tanstack/react-query 5.96.2 → 5.99.0

v0.5.0

17 Apr 16:48

Choose a tag to compare

v0.5.0

New Features

  • Query parameter support: HTTP mocks can now match on query parameters, enabling proper OAuth endpoint mocking
  • Template rendering in response headers: {{.query.foo}} and other template variables now work in response headers (not just body)
  • KV editor in UI: New key-value editor component for managing query params on mocks

Bug Fixes

  • Fixed Docker build copying UI dist from incorrect path
  • Fixed npm publish workflow lockfile sync issue

v0.4.7

05 Apr 19:38

Choose a tag to compare

Fixes

  • fix(ci): strip 'v' prefix from tag when passing version to \dotnet pack\ (NuGet does not accept 'v0.x.x' version strings)