@tstdl/base 0.93.91 → 0.93.92

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.
@@ -380,7 +380,7 @@ let AuthenticationClientService = class AuthenticationClientService {
380
380
  if (isUndefined(token)) {
381
381
  // Wait for login or dispose.
382
382
  // We ignore forceRefreshToken here because we can't refresh without a token.
383
- await firstValueFrom(race([this.definedToken$, this.disposeToken]));
383
+ await firstValueFrom(race([this.definedToken$, this.disposeToken]), { defaultValue: undefined });
384
384
  continue;
385
385
  }
386
386
  const now = this.estimatedServerTimestampSeconds();
@@ -401,7 +401,7 @@ let AuthenticationClientService = class AuthenticationClientService {
401
401
  if (!lockAcquired) {
402
402
  // Lock held by another instance, wait 5 seconds or until state/token changes.
403
403
  // We ignore forceRefreshToken here to avoid a busy loop if it is already set.
404
- await firstValueFrom(race([timer(5000), this.disposeToken, this.token$.pipe(filter((t) => t !== token))]));
404
+ await firstValueFrom(race([timer(5000), this.disposeToken, this.token$.pipe(filter((t) => t !== token))]), { defaultValue: undefined });
405
405
  continue;
406
406
  }
407
407
  }
@@ -414,16 +414,15 @@ let AuthenticationClientService = class AuthenticationClientService {
414
414
  wakeUpSignals.push(this.forceRefreshToken);
415
415
  }
416
416
  if (delay > 0) {
417
- await firstValueFrom(race([timer(delay), ...wakeUpSignals]));
417
+ await firstValueFrom(race([timer(delay), ...wakeUpSignals]), { defaultValue: undefined });
418
418
  }
419
419
  else {
420
- // If expired (or within buffer) and we didn't refresh (e.g. refresh failed or lock contention), wait a bit to avoid tight loop
421
- await firstValueFrom(race([timer(5000), ...wakeUpSignals]));
420
+ await firstValueFrom(race([timer(5000), ...wakeUpSignals]), { defaultValue: undefined });
422
421
  }
423
422
  }
424
423
  catch (error) {
425
424
  this.logger.error(error);
426
- await firstValueFrom(race([timer(5000), this.disposeToken, this.token$.pipe(filter((t) => t !== this.token()))]));
425
+ await firstValueFrom(race([timer(5000), this.disposeToken, this.token$.pipe(filter((t) => t !== this.token()))]), { defaultValue: undefined });
427
426
  }
428
427
  }
429
428
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tstdl/base",
3
- "version": "0.93.91",
3
+ "version": "0.93.92",
4
4
  "author": "Patrick Hein",
5
5
  "publishConfig": {
6
6
  "access": "public"