feat(audience): add CDN bundle, demo page, and README#2827
Draft
ImmutableJeffrey wants to merge 3 commits intomainfrom
Draft
feat(audience): add CDN bundle, demo page, and README#2827ImmutableJeffrey wants to merge 3 commits intomainfrom
ImmutableJeffrey wants to merge 3 commits intomainfrom
Conversation
68de603 to
d72536d
Compare
50d982f to
15797da
Compare
|
View your CI Pipeline Execution ↗ for commit 5ba92bc
☁️ Nx Cloud last updated this comment at |
d72536d to
2ed1923
Compare
15797da to
5f06b06
Compare
c7592b3 to
6cc1921
Compare
5f06b06 to
47c2df3
Compare
6cc1921 to
a830608
Compare
00ff187 to
f015514
Compare
a830608 to
b5964c5
Compare
f015514 to
781137c
Compare
b5964c5 to
16ecf2d
Compare
781137c to
b7bbd2b
Compare
82b1a90 to
0375ff4
Compare
2779dd6 to
872fdd8
Compare
8fb34be to
37bcb3d
Compare
68b8dd9 to
0e52e4f
Compare
37bcb3d to
7cccbb2
Compare
0e52e4f to
11599a2
Compare
7cccbb2 to
0df2286
Compare
0df2286 to
ac5ad0d
Compare
11599a2 to
e7836e4
Compare
ac5ad0d to
9bfbb9d
Compare
1a289c0 to
d66a682
Compare
9bfbb9d to
97fc84b
Compare
23ed51b to
85bb9da
Compare
97fc84b to
1074bb8
Compare
85bb9da to
d166e1e
Compare
1074bb8 to
0bf0c0b
Compare
d166e1e to
9256a4e
Compare
Adds the consent state machine and documents the shared SDK config type. ConsentManager: owns the three-tier consent model (none/anonymous/full) and transition semantics. Platform-specific I/O is injected via ConsentTransport interface and ConsentCallbacks — pure composition, no abstract base classes. Web SDK provides fetch transport; future game SDKs plug in platform HTTP clients. AudienceSDKConfig: base config type with JSDoc on every field. Surface SDKs extend this (e.g. WebSDKConfig adds consentSource). Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
19d7d12 to
312c6c2
Compare
…ssion lifecycle Adds @imtbl/audience-web-sdk at packages/audience/web/ — the explicit, typed tracking surface for game studios on web. Architecture (core → sdk → web): - ConsentManager + DebugLogger imported from @imtbl/audience-sdk - WebSDKConfig extends AudienceSDKConfig (adds consentSource) - Web provides fetch-based ConsentTransport and cookie-clearing callbacks - Deleted sdk/context.ts wrapper — calls core collectContext directly API: init, track, page, identify, alias, setConsent, reset, flush, shutdown Design: - Attribution stored in wire format (snake_case) from parse to send. TRACKED_PARAMS constant is the single source of truth. - Message factory (baseMessage + enqueue) eliminates repeated boilerplate. - Event names (SESSION_START, SESSION_END) are named constants. - All public interfaces have JSDoc on every field. - identify() type guard rejects null and arrays, truncates once. - Helpers: isTrackingDisabled(), effectiveUserId(), startSession(), renewSession() — each method reads as intent, not mechanics. - Multi-instance warning on double init without prior shutdown. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
312c6c2 to
5d003f8
Compare
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
9256a4e to
5ba92bc
Compare
70cccb1 to
fcf6063
Compare
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
Adds CDN distribution, demo page, and documentation.
Stacked on: #2826 (SDK class + attribution)
tsup.cdn.js, assignswindow.ImmutableWebSDKTest plan
cd packages/audience/web && pnpm build— ESM + CJS + CDN IIFE all buildpnpm demo→ http://localhost:3456/web/demo/index.html loads and SDK initializes🤖 Generated with Claude Code