v0.3.0
Minor Changes
-
a1763eb: Netlify Functions 2.0 support + observability lineage fix (surfaced by the hoprides v2 migration).
Add
netlifyV2BackgroundPlatform— the modern Netlify v2(Request, Context) → Response
shape for a function declaredexport const config = { background: true }(no-background
filename suffix). It reusesnetlifyV2Platform's Web-Request plumbing but runs as a
deferred-response platform:deferredResponse: true(blocks result-drivenrespondmodules),
a ~15-minute default budget, and a202Response. Import fromhopdrive-eventkit/platforms.Fix orphaned observability origins — the plugin buffered a job's
job_executionrow in the
parent invocation's memory and only flushed it at invocation end. A long-running job's DB
write-backs spawned child invocations (in separate processes) that hit the sink before the
parent flushed, so theirsource_job_idFK failed and the sink's graceful-degrade silently
dropped the link — rendering them as false extra "origins" in the console flow graph. The job's
row is now persisted (statusrunning) duringonJobStart, before the job body runs (the
runtime awaitsonJobStart), so the parent row is durable before any side effect can spawn a
child. Idempotent (sink upserts); gated by a newpersistJobsAtStartoption (default true).Preserve
rawBodyon the v2 platforms (surfaced by the sparkserv migration) — the webhook
source's HMACverifyneeds the exact request bytes, butnetlifyV2Platform/
netlifyV2BackgroundPlatformconsumed the body viareq.json()and never exposedrawBody, so
signature verification always failed on v2. The adapters now read the WebRequestbody once as
text, cache the exact bytes (WeakMap, no mutation of the Request), return the parsed JSON as the
payload, and expose the bytes asrequest.meta.rawBody. Backward-compatible (rawBody was simply
absent before); JSON parsing tolerates a non-JSON body (returns the raw string).Drop the
uuiddependency (surfaced by the event-handlers migration) — the runtime used
it only for v4 generation, and uuid v14 is ESM-only: the CJS build carried a nested copy that
require()refuses at runtime (ERR_REQUIRE_ESM under netlify dev) and Jest consumers cannot
parse without a moduleNameMapper.crypto.randomUUID()(built into Node ≥20, browsers, and
workers) replaces it; eventkit now has zero runtime dependencies.