@yobytechautomation/config-lib 0.2.3 → 0.2.5

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.
@@ -75,7 +75,7 @@ class BaseConfigServiceImpl {
75
75
  var _a;
76
76
  const cachePath = path.join(process.cwd(), '.license-cache.json');
77
77
  const apiKey = this.env.LICENSE_KEY;
78
- if (!apiKey || apiKey.length < 10) {
78
+ if (!apiKey) {
79
79
  throw new Error('LICENSE_KEY missing');
80
80
  }
81
81
  try {
@@ -108,8 +108,9 @@ class BaseConfigServiceImpl {
108
108
  const last = new Date(data.lastValidated);
109
109
  const now = new Date();
110
110
  const diffHours = (now.getTime() - last.getTime()) / (1000 * 60 * 60);
111
- if (diffHours <= 24) {
112
- console.log('✅ Using cached license (offline)');
111
+ const MAX_OFFLINE_HOURS = 0.5; // 30 minutes
112
+ if (diffHours <= MAX_OFFLINE_HOURS) {
113
+ console.log('⚠️ Using cached license (temporary offline)');
113
114
  return;
114
115
  }
115
116
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@yobytechautomation/config-lib",
3
- "version": "0.2.3",
3
+ "version": "0.2.5",
4
4
  "description": "Shared multi-environment configuration helpers for SDC NestJS services",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",