@thexjs/core@1.2.0
Minor Changes
-
fbd5e29: Extract the platform-agnostic adapter pipeline (build-manifest resolution,
per-file transpile, standalone render-function bundling, entry generation)
into@thexjs/core/adapteras a documented Adapter SDK.@thexjs/adapter-vercel
now composes the SDK (adding only its Node<->Web Request/Response bridge and
Build Output API v3.vercel/outputtree), so third-party adapters (Node,
Cloudflare, ...) reuse the same build core instead of reverse-engineering it.@thexjs/adapter-vercelnow requires@thexjs/core@^1.2.0(the release that
introduces the@thexjs/core/adaptersubpath) so consumers can never resolve
the adapter against an older core that lacks the SDK export.Also hardened the generated Vercel entry: forwarded headers (
x-forwarded-proto
/x-forwarded-host) are validated instead of blindly trusted, streamed
responses honor socket backpressure and cancel on client disconnect, the error
path guards against already-sent headers, generated paths are project-relative,
and non-JSON-serializable runtime options fail the build instead of silently
dropping (keeping the deployed function aligned withx start). -
58aa123: Add production-grade observability metrics:
createInMemoryMetrics()(an in-process registry serving/metricsin Prometheus text format),createOtlpMetricsReporter()(forwards counters/histograms to an OpenTelemetry meter), andwithRequestMetrics(). When passed asobservability.metricstocreateApp, every request recordsx_http_requests_total,x_http_request_duration_ms, andx_http_errors_total(plusx_rate_limit_rejections_total), and a/metricsendpoint is served ahead of routing when the reporter exposes one.