@wscsports/blaze-web-sdk 0.31.2 → 0.31.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wscsports/blaze-web-sdk",
3
- "version": "0.31.2",
3
+ "version": "0.31.4",
4
4
  "main": "publish/index",
5
5
  "types": "publish/index",
6
6
  "files": [
@@ -16,9 +16,13 @@
16
16
  "publish:latest": "npm run build:prod && npm publish --access public --tag latest",
17
17
  "publish:beta": "npm run build:prod && npm publish --access public --tag beta",
18
18
  "version-download": "node ./version-downloader.js",
19
+ "test:unit": "jest",
20
+ "test:unit:watch": "jest --watch",
21
+ "test:unit:coverage": "jest --coverage",
19
22
  "test": "node ./node_modules/@playwright/test/cli.js test --project='Desktop Chrome'",
20
23
  "test:desktop": "node ./node_modules/@playwright/test/cli.js test --project='Desktop Chrome' --project='Desktop Firefox' --project='Desktop Safari'",
21
24
  "test:desktop:stories": "node ./node_modules/@playwright/test/cli.js test --project='Desktop Chrome' --project='Desktop Safari' e2e-tests/tests/stories",
25
+ "test:desktop:stories:vast-ad": "node ./node_modules/@playwright/test/cli.js test --project='Desktop Chrome' --project='Desktop Firefox' --project='Desktop Safari' tests/stories/playback/story-playback-ad-vast.spec.ts --workers=1",
22
26
  "test:desktop:moments": "node ./node_modules/@playwright/test/cli.js test --project='Desktop Chrome' --project='Desktop Safari' e2e-tests/tests/moments",
23
27
  "test:desktop:long-form": "node ./node_modules/@playwright/test/cli.js test --project='Desktop Chrome' --project='Desktop Safari' e2e-tests/tests/video-longform",
24
28
  "test:mobile": "node ./node_modules/@playwright/test/cli.js test --project='iOS Safari 13' --project='Android Chrome'",
@@ -33,6 +37,7 @@
33
37
  "@types/animejs": "^3.1.7",
34
38
  "@types/google_interactive_media_ads_types": "^1.20241219.0",
35
39
  "@types/hammerjs": "^2.0.45",
40
+ "@types/jest": "^30.0.0",
36
41
  "@types/node": "^24.7.0",
37
42
  "@types/ua-parser-js": "^0.7.36",
38
43
  "@types/uuid": "^10.0.0",
@@ -44,11 +49,14 @@
44
49
  "html-webpack-plugin": "^5.5.3",
45
50
  "intersection-observer": "^0.12.2",
46
51
  "javascript-obfuscator": "^4.0.2",
52
+ "jest": "^30.2.0",
53
+ "jest-environment-jsdom": "^30.2.0",
47
54
  "media-captions": "^0.0.18",
48
55
  "npm-registry-fetch": "^16.0.0",
49
56
  "playwright-chromium": "^1.56.0",
50
57
  "playwright-webkit": "^1.56.0",
51
58
  "style-loader": "^3.3.3",
59
+ "ts-jest": "^29.4.6",
52
60
  "ts-loader": "^9.4.4",
53
61
  "typescript": "^5.4.2",
54
62
  "videojs-vtt.js": "^0.15.5",
@@ -387,20 +387,6 @@ export type BlazeAbTestType = {
387
387
  id: string;
388
388
  variant: string;
389
389
  };
390
- export type BlazeSourceType = "labels" | "ids" | "recommendations" | "text";
391
- export type AdvancedOrdering = "LiveFirst";
392
- export interface BlazeDataSourceType {
393
- sourceType: BlazeSourceType;
394
- labels?: string | string[] | BlazeWidgetLabel;
395
- labelsPriority?: string | string[] | BlazeWidgetLabel[];
396
- ids?: string[];
397
- orderType?: OrderType;
398
- maxItems?: number;
399
- advancedOrdering?: AdvancedOrdering;
400
- personalized?: BlazePersonalized;
401
- recommendations?: BlazeRecommendations;
402
- text?: string;
403
- }
404
390
  export interface IBlazeWidgetLabel {
405
391
  readonly _type: "BlazeWidgetLabel";
406
392
  value: string;
@@ -422,6 +408,20 @@ declare class BlazeWidgetLabel implements IBlazeWidgetLabel {
422
408
  private static validateAndProceed;
423
409
  private static isValidLabelFormat;
424
410
  }
411
+ export type BlazeSourceType = "labels" | "ids" | "recommendations" | "text";
412
+ export type AdvancedOrdering = "LiveFirst";
413
+ export interface BlazeDataSourceType {
414
+ sourceType: BlazeSourceType;
415
+ labels?: string | string[] | BlazeWidgetLabel;
416
+ labelsPriority?: string | string[] | BlazeWidgetLabel[];
417
+ ids?: string[];
418
+ orderType?: OrderType;
419
+ maxItems?: number;
420
+ advancedOrdering?: AdvancedOrdering;
421
+ personalized?: BlazePersonalized;
422
+ recommendations?: BlazeRecommendations;
423
+ text?: string;
424
+ }
425
425
  export type LocaleDirectionType = "LTR" | "RTL";
426
426
  export type OrderType = "Manual" | "AtoZ" | "ZtoA" | "RecentlyUpdatedFirst" | "RecentlyUpdatedLast" | "RecentlyCreatedFirst" | "RecentlyCreatedLast" | "Random";
427
427
  export type ContentOrderType = "LIVE_CHIP" | "STORY_TITLE" | "PUBLISHED_DATE";
@@ -548,7 +548,9 @@ export type RecommendationsType = {
548
548
  export type BlazeRecommendationsForYou = RecommendationsType & {
549
549
  promotedLabels?: string[];
550
550
  };
551
- export type BlazeRecommendationsTrending = RecommendationsType;
551
+ export type BlazeRecommendationsTrending = RecommendationsType & {
552
+ promotedLabels?: string[];
553
+ };
552
554
  export type BlazeRecommendations = {
553
555
  forYou?: BlazeRecommendationsForYou;
554
556
  trending?: BlazeRecommendationsTrending;