@yobytechautomation/config-lib 0.2.8 → 0.2.9
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.
|
@@ -105,10 +105,12 @@ class BaseConfigServiceImpl {
|
|
|
105
105
|
const part3 = 'LmluL2xpY2Vuc2UvY2hlY2s=';
|
|
106
106
|
const url = Buffer.from(part1 + part2 + part3, 'base64').toString('utf-8');
|
|
107
107
|
const secret = process.env.LICENSE_SECRET;
|
|
108
|
+
const machineId = os.hostname();
|
|
108
109
|
const res = await axios_1.default.get(url, {
|
|
109
110
|
headers: {
|
|
110
111
|
'x-api-key': apiKey,
|
|
111
112
|
'x-license-secret': secret,
|
|
113
|
+
'x-machine-id': machineId,
|
|
112
114
|
},
|
|
113
115
|
timeout: 5000,
|
|
114
116
|
});
|
|
@@ -116,10 +118,10 @@ class BaseConfigServiceImpl {
|
|
|
116
118
|
if (status !== 'active') {
|
|
117
119
|
throw new Error(`License ${status}. Please contact vendor.`);
|
|
118
120
|
}
|
|
119
|
-
const
|
|
121
|
+
const machineId2 = os.hostname();
|
|
120
122
|
fs.writeFileSync(cachePath, JSON.stringify({
|
|
121
123
|
lastValidated: new Date().toISOString(),
|
|
122
|
-
machineId,
|
|
124
|
+
machineId: machineId2,
|
|
123
125
|
}));
|
|
124
126
|
console.log('✅ License validated (online)');
|
|
125
127
|
}
|