@buka/nestjs-kit 4.1.3 → 4.1.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/CHANGELOG.md CHANGED
@@ -1,5 +1,12 @@
1
1
  # Changelog
2
2
 
3
+ ## [4.1.4](https://github.com/buka-ltd/npm.nestjs-kit/compare/v4.1.3...v4.1.4) (2026-05-21)
4
+
5
+
6
+ ### Bug Fixes
7
+
8
+ * 修复setTimeout溢出问题 ([ac82108](https://github.com/buka-ltd/npm.nestjs-kit/commit/ac82108f1d958cc436584bc86bd1db01f215830c))
9
+
3
10
  ## [4.1.3](https://github.com/buka-ltd/npm.nestjs-kit/compare/v4.1.2...v4.1.3) (2026-05-21)
4
11
 
5
12
 
package/dist/index.js CHANGED
@@ -3558,7 +3558,8 @@ let OpenBaoTokenManager = _OpenBaoTokenManager = class OpenBaoTokenManager {
3558
3558
  return;
3559
3559
  }
3560
3560
  const renewBuffer = this.config.renewBufferSeconds ?? 30;
3561
- const renewInMs = Math.max((this.leaseDuration - renewBuffer) * 1e3, 1e3);
3561
+ const maxCheckInterval = Math.min(10080 * 60 * 1e3, this.leaseDuration * .7 * 1e3);
3562
+ const renewInMs = Math.min(Math.max((this.leaseDuration - renewBuffer) * 1e3, 1e3), maxCheckInterval);
3562
3563
  this.renewalTimer = setTimeout(() => {
3563
3564
  this.renewToken();
3564
3565
  }, renewInMs);