Visitar URL original
feat(cloud-server): package handler for npm by caugner · Pull Request #552 · mdn/dex · GitHub
Skip to content

feat(cloud-server): package handler for npm - #552

Draft
caugner wants to merge 9 commits into
mainfrom
527-publish-cloud-server
Draft

caugner wants to merge 9 commits into
mainfrom
527-publish-cloud-server

Conversation

@caugner

@caugner caugner commented Sep 30, 2026

Copy link
Copy Markdown
Contributor

Description

Package the cloud function handler as @mdn/dex-cloud-server and add a dex-cloud-server executable. The published package includes the files needed to run the handler, but excludes canonical and redirect JSON data.

Motivation

Let consumers install and run the handler from npm while supplying canonical and redirect files through CANONICALS_FILE and REDIRECTS_FILE.

Additional details

Document npm and Google Cloud Function usage, including the required external file paths.

Related issues and pull requests

Part of #527.

Mark the CLI signal list with Node's signal types and exclude the development proxy and test helper from the published package. Skip unpublished-import checks for excluded tests and proxy code, and sync the lockfile's bin entry.
@caugner
caugner added this pull request to stack #554 September 30, 2026 14:11
The release workflow it describes does not exist yet; it lands together
with the workflow.
`build-canonicals.js` and `build-redirects.js` resolve the Dex checkout
root and read `client/build`, so they only work in-repo.
Set `FUNCTION_SOURCE`, `FUNCTION_TARGET`, and `IGNORED_ROUTES` as
defaults and import the framework CLI instead of spawning it. This drops
the signal and exit-code forwarding, and user flags such as `--port`
reach the framework instead of being discarded.
`path.join` prefixed absolute values with the working directory, so
only relative paths worked.
The consumer-oriented rewrite dropped the local quickstart, Rumba, and
Glean/HTTPS instructions that contributors still need.
The `http()` registration already exposes the function, and the
`exports` map keeps `src/index.js` out of the package's public API.
Point npm at the package folder within the monorepo.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants