Skip to content

@thexjs/core@1.2.0

Choose a tag to compare

@github-actions github-actions released this 09 Aug 03:34
· 33 commits to main since this release
06b7d89

Minor Changes

  • fbd5e29: Extract the platform-agnostic adapter pipeline (build-manifest resolution,
    per-file transpile, standalone render-function bundling, entry generation)
    into @thexjs/core/adapter as 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/output tree), so third-party adapters (Node,
    Cloudflare, ...) reuse the same build core instead of reverse-engineering it.

    @thexjs/adapter-vercel now requires @thexjs/core@^1.2.0 (the release that
    introduces the @thexjs/core/adapter subpath) 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 with x start).

  • 58aa123: Add production-grade observability metrics: createInMemoryMetrics() (an in-process registry serving /metrics in Prometheus text format), createOtlpMetricsReporter() (forwards counters/histograms to an OpenTelemetry meter), and withRequestMetrics(). When passed as observability.metrics to createApp, every request records x_http_requests_total, x_http_request_duration_ms, and x_http_errors_total (plus x_rate_limit_rejections_total), and a /metrics endpoint is served ahead of routing when the reporter exposes one.