Skip to content

feat(deploy): CDN bundle sync script and self-hosting docs - #23

Open
Fiona2016 wants to merge 2 commits into
feat/rum-legacy-es5from
feat/cdn-sync-and-delivery-docs
Open

feat(deploy): CDN bundle sync script and self-hosting docs#23
Fiona2016 wants to merge 2 commits into
feat/rum-legacy-es5from
feat/cdn-sync-and-delivery-docs

Conversation

@Fiona2016

@Fiona2016 Fiona2016 commented Aug 18, 2026

Copy link
Copy Markdown
Collaborator

Stacked on #22 (the rum-legacy README this touches lands there); GitHub will retarget this PR to main automatically once #22 merges.

What

  • scripts/deploy/sync-bundles.js: downloads the deployed bundles from the CDN into a local directory, for serving them from another origin. Entry bundles are fetched by name; the hash-named chunk files of the standard RUM bundle are recovered from the chunk table webpack embeds in the entry bundle, so a synced directory is always complete and coherent. No credentials needed; any missing file fails the run loudly.
  • The bucket layout and entry filenames move into lib/deploymentUtils.js, shared by the upload (deploy-oss.js) and download sides so they cannot drift apart.
  • packages/rum-legacy/README.md: documents where released bundles live (CDN major-version directory), the self-hosting workflow, and updates the verification status — the claim that the package had never run on a real browser engine is no longer true.

Verified

Ran the script against the production CDN: all three released entry bundles plus both chunk files downloaded (chunk-table extraction confirmed against the deployed artifact), and the not-yet-released fc-rum-legacy.js was reported as HTTP 404 with a non-zero exit — both the success and the failure paths exercised.

Self-hosting environments need a complete, coherent copy of the deployed
bundles, and the standard RUM bundle references hash-named chunk files
that are error-prone to collect by hand. The script downloads every
entry bundle by name and recovers the chunk names from the chunk table
webpack embeds in each entry bundle, over plain HTTPS with no
credentials, and fails loudly when any file is missing.

The bucket layout and the entry filenames move into deploymentUtils.js
so the upload and download sides share one definition.
The README pointed at a placeholder static host without saying where
released bundles actually live, and still claimed the package had never
been verified on a real browser engine. Document the CDN layout and the
sync-bundles workflow for self-hosting, and record the real-browser
verification outcome: IE 9, 10 and 11 pass every check in the
verification page, and IE 6 and IE 8 degrade to a silent no-op.
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.

1 participant