refactor(CDN)!: Use an object for the constructor (#10978)

BREAKING CHANGE: The CDN class requires an object to construct.
This commit is contained in:
Jiralite
2025-07-11 15:44:25 +01:00
committed by GitHub
parent 35cc57ab92
commit 1f0fe39156
3 changed files with 28 additions and 6 deletions

View File

@@ -8,7 +8,7 @@ const hash = 'abcdef';
const animatedHash = 'a_bcdef';
const defaultAvatar = 1_234 % 5;
const cdn = new CDN(baseCDN, baseMedia);
const cdn = new CDN({ cdn: baseCDN, mediaProxy: baseMedia });
test('appAsset default', () => {
expect(cdn.appAsset(id, hash)).toEqual(`${baseCDN}/app-assets/${id}/${hash}.webp`);