feat(ssr-sidecar): add a Node 24 HTML embed sidecar - #292
Merged
Conversation
Publish the generic /health, /v1/render, and /purge process as @mapsight/ssr-sidecar (npm beta) and ghcr.io/open-mapsight/ssr-sidecar.
🦋 Changeset detectedLatest commit: ae95757 The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes using high effort and found 2 potential issues.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit f4cfbe5. Configure here.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Summary
@mapsight/ssr-sidecar, a generic Node 24 process withGET /health,POST /v1/render, andPOST /purge. There is noPOST /render.ghcr.io/open-mapsight/ssr-sidecar:betaalongside the npmbetadist-tag.render.js. The image does not bake a host bundle.Test plan
pnpm --filter @mapsight/ssr-sidecar typecheckpnpm --filter @mapsight/ssr-sidecar lintpnpm --filter @mapsight/ssr-sidecar test(18 tests, including HTTP 404 for/render)pnpm --filter @mapsight/ssr-sidecar buildpnpm run checkpnpm changeset status --since=origin/main—@mapsight/ssr-sidecarminor/health,/v1/render,/purge, and 404/rendernpm view @mapsight/ssr-sidecar dist-tagsincludesbetadocker pull ghcr.io/open-mapsight/ssr-sidecar:betaNote
Medium Risk
New network-facing SSR process and release-time GHCR publishing add operational surface area, though the design keeps host bundles out of the image and documents keeping the sidecar off public ingress.
Overview
Introduces
@mapsight/ssr-sidecar, a generic Node 24 HTTP process for Mapsight HTML embed SSR. Hosts runghcr.io/open-mapsight/ssr-sidecarand bind-mount their productrender.jsviaMAPSIGHT_SSR_MODULE; the image ships only the server plus a contract stub, not a host bundle.The public API is
GET /health,POST /v1/render(JSON{ v: 1, html, state, pageMeta, meta }), andPOST /purge. There is noPOST /render(404). The server dynamically loads the render module, supports optionalrenderEnvelope()/purge(), v1 error codes, body size limits, and env-driven HTTP proxy plus https→http origin rewrite for hairpin fetches.CI gains path classification for
ssr_sidecar, anssr-sidecar-imagejob (build package, Docker build, smoke/health,/v1/render,/purge, 404s), and on changesets publish pushesghcr.io/open-mapsight/ssr-sidecar:betaand a version tag. Docs (README,SSR_HYDRATION.md) now point CMS integrators atPOST /v1/renderand the published image.Reviewed by Cursor Bugbot for commit ae95757. Bugbot is set up for automated code reviews on this repo. Configure here.