@wvdsh/sdk-js 1.3.0 → 1.3.1

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/dist/index.d.ts CHANGED
@@ -871,9 +871,11 @@ declare class WavedashSDK extends EventTarget {
871
871
  overlayManager: OverlayManager;
872
872
  private gameplayJwt;
873
873
  private gameplayJwtPromise;
874
+ private setupWarningTimeout;
874
875
  ugcHost: string;
875
876
  uploadsHost: string;
876
877
  constructor(sdkConfig: SDKConfig);
878
+ private clearSetupWarning;
877
879
  init(config?: WavedashConfig): boolean;
878
880
  /**
879
881
  * Signal that the game is ready to receive events (LobbyJoined, LobbyMessage, etc).
package/dist/index.js CHANGED
@@ -3261,6 +3261,7 @@ var WavedashSDK = class extends EventTarget {
3261
3261
  this.engineInstance = null;
3262
3262
  this.gameplayJwt = null;
3263
3263
  this.gameplayJwtPromise = null;
3264
+ this.setupWarningTimeout = null;
3264
3265
  // ==============
3265
3266
  // Event listening
3266
3267
  // ==============
@@ -3300,6 +3301,12 @@ var WavedashSDK = class extends EventTarget {
3300
3301
  ]);
3301
3302
  this.setupSessionEndListeners();
3302
3303
  this.launchParams = sdkConfig.launchParams ?? {};
3304
+ this.setupWarningTimeout = setTimeout(() => {
3305
+ this.setupWarningTimeout = null;
3306
+ this.logger.warn(
3307
+ "Wavedash.init(), Wavedash.loadComplete(), or Wavedash.updateLoadProgressZeroToOne() not called yet"
3308
+ );
3309
+ }, 1e4);
3303
3310
  }
3304
3311
  get initialized() {
3305
3312
  return this._initialized;
@@ -3307,6 +3314,12 @@ var WavedashSDK = class extends EventTarget {
3307
3314
  get eventsReady() {
3308
3315
  return this._eventsReady;
3309
3316
  }
3317
+ clearSetupWarning() {
3318
+ if (this.setupWarningTimeout !== null) {
3319
+ clearTimeout(this.setupWarningTimeout);
3320
+ this.setupWarningTimeout = null;
3321
+ }
3322
+ }
3310
3323
  // =============
3311
3324
  // Setup methods
3312
3325
  // =============
@@ -3409,11 +3422,13 @@ var WavedashSDK = class extends EventTarget {
3409
3422
  [["progress", vNumber]],
3410
3423
  [progress]
3411
3424
  );
3425
+ this.clearSetupWarning();
3412
3426
  iframeMessenger.postToParent(IFRAME_MESSAGE_TYPE5.PROGRESS_UPDATE, {
3413
3427
  progress
3414
3428
  });
3415
3429
  }
3416
3430
  loadComplete() {
3431
+ this.clearSetupWarning();
3417
3432
  if (this.gameFinishedLoading) return;
3418
3433
  this.gameFinishedLoading = true;
3419
3434
  this.heartbeatManager.start();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wvdsh/sdk-js",
3
- "version": "1.3.0",
3
+ "version": "1.3.1",
4
4
  "type": "module",
5
5
  "description": "Wavedash JavaScript SDK",
6
6
  "main": "./dist/client.js",