Skip to content

feat: versioned CDN auto-update for embedding sites#88

Merged
PAMulligan merged 1 commit into
chore/release-pleasefrom
chore/cdn-auto-update
May 26, 2026
Merged

feat: versioned CDN auto-update for embedding sites#88
PAMulligan merged 1 commit into
chore/release-pleasefrom
chore/cdn-auto-update

Conversation

@PAMulligan
Copy link
Copy Markdown
Contributor

Summary

Lets embedding sites auto-update Claudius instead of hand-copying the bundle. Stacked on #87 (base is chore/release-please); it'll retarget to main when #87 merges.

  • Tracked cdn/ bundle (claudius.iife.js + claudius.css). Sites embed https://cdn.jsdelivr.net/gh/PMDevSolutions/Claudius@1/cdn/claudius.iife.js (+ .css). @1 resolves the latest v1.x release, so patches/minors flow automatically; a new major never lands silently. (jsDelivr caches the range ~12h.)
  • Release bridge: the release-please workflow now rebuilds the embed and commits the fresh 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.
  • Version stamp: the embed build injects window.ClaudiusWidgetVersion (verified 1.1.0 in this build) so "what's live?" is answerable from the console.
  • README/DEPLOY document the CDN snippet + the cdn.jsdelivr.net CSP requirement. Self-hosting remains supported.

Caveats

  • Bootstrap: v1.1.0 is already tagged without cdn/, so gh@1 only starts resolving once the first release cut by the new workflow lands (this PR's feat: will drive that — e.g. v1.2.0).
  • The seeded cdn/ bundle is the v1.1.0 build (now version-stamped); the workflow keeps it current on each release.

Verification

  • widget: typecheck, lint, format:check, 220 tests, build:embed all pass; version stamp confirmed in the built bundle.

- 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>
@PAMulligan PAMulligan self-assigned this May 26, 2026
@PAMulligan PAMulligan added enhancement New feature or request widget Chat widget UI and embed functionality backend Cloudflare Workers API and AI integration security Security hardening and auditing labels May 26, 2026
@PAMulligan PAMulligan added this to the v1.1.0 milestone May 26, 2026
@PAMulligan PAMulligan merged commit c243b72 into chore/release-please May 26, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backend Cloudflare Workers API and AI integration enhancement New feature or request security Security hardening and auditing widget Chat widget UI and embed functionality

Projects

Development

Successfully merging this pull request may close these issues.

1 participant