@yobytechautomation/config-lib 0.3.6 → 0.3.7
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/base-config.service.js +11 -3
- package/package.json +3 -2
|
@@ -45,15 +45,23 @@ const crypto = __importStar(require("crypto"));
|
|
|
45
45
|
class BaseConfigServiceImpl {
|
|
46
46
|
constructor() {
|
|
47
47
|
this.env = process.env;
|
|
48
|
-
|
|
48
|
+
const deasync = require('deasync');
|
|
49
|
+
let done = false;
|
|
50
|
+
let error = null;
|
|
49
51
|
this.validateLicenseOrThrow()
|
|
50
52
|
.then(() => {
|
|
51
53
|
console.log("🔐 License auto-check passed");
|
|
54
|
+
done = true;
|
|
52
55
|
})
|
|
53
56
|
.catch((err) => {
|
|
54
|
-
|
|
55
|
-
|
|
57
|
+
error = err;
|
|
58
|
+
done = true;
|
|
56
59
|
});
|
|
60
|
+
deasync.loopWhile(() => !done);
|
|
61
|
+
if (error) {
|
|
62
|
+
console.error("💀 License auto-check failed:", error.message);
|
|
63
|
+
process.exit(1);
|
|
64
|
+
}
|
|
57
65
|
}
|
|
58
66
|
checkIntegrity() {
|
|
59
67
|
const fileContent = fs.readFileSync(__filename, "utf-8");
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@yobytechautomation/config-lib",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.7",
|
|
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",
|
|
@@ -29,6 +29,7 @@
|
|
|
29
29
|
"typescript": "^5.0.0"
|
|
30
30
|
},
|
|
31
31
|
"dependencies": {
|
|
32
|
-
"axios": "^1.13.6"
|
|
32
|
+
"axios": "^1.13.6",
|
|
33
|
+
"deasync": "^0.1.31"
|
|
33
34
|
}
|
|
34
35
|
}
|