feat: versioned CDN auto-update for embedding sites#88
Merged
Conversation
- Add tracked cdn/ bundle (claudius.iife.js + claudius.css), served by jsDelivr at gh@<major>; the release workflow rebuilds and commits it onto the release PR so the tagged commit carries the served bytes, and uploads it to the GitHub Release. - Stamp the build version into the bundle as window.ClaudiusWidgetVersion. - Document the CDN embed snippet and CSP requirement in README and DEPLOY. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
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
Lets embedding sites auto-update Claudius instead of hand-copying the bundle. Stacked on #87 (base is
chore/release-please); it'll retarget tomainwhen #87 merges.cdn/bundle (claudius.iife.js+claudius.css). Sites embedhttps://cdn.jsdelivr.net/gh/PMDevSolutions/Claudius@1/cdn/claudius.iife.js(+.css).@1resolves the latestv1.xrelease, so patches/minors flow automatically; a new major never lands silently. (jsDelivr caches the range ~12h.)cdn/artifacts onto the release PR branch, so the tagged merge commit carries the exact bytes jsDelivr serves — and uploads them to the GitHub Release too.window.ClaudiusWidgetVersion(verified1.1.0in this build) so "what's live?" is answerable from the console.cdn.jsdelivr.netCSP requirement. Self-hosting remains supported.Caveats
v1.1.0is already tagged withoutcdn/, sogh@1only starts resolving once the first release cut by the new workflow lands (this PR'sfeat:will drive that — e.g.v1.2.0).cdn/bundle is the v1.1.0 build (now version-stamped); the workflow keeps it current on each release.Verification
format:check, 220 tests,build:embedall pass; version stamp confirmed in the built bundle.