@moontra/moonui-pro 3.4.42 → 3.4.43
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/package.json +1 -1
- package/scripts/postinstall.cjs +6 -22
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@moontra/moonui-pro",
|
|
3
|
-
"version": "3.4.
|
|
3
|
+
"version": "3.4.43",
|
|
4
4
|
"description": "Premium React components for MoonUI - Advanced UI library with 50+ pro components including performance, interactive, and gesture components",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.mjs",
|
package/scripts/postinstall.cjs
CHANGED
|
@@ -7,7 +7,6 @@
|
|
|
7
7
|
|
|
8
8
|
const fs = require('fs');
|
|
9
9
|
const path = require('path');
|
|
10
|
-
const crypto = require('crypto');
|
|
11
10
|
const https = require('https');
|
|
12
11
|
|
|
13
12
|
// Configuration
|
|
@@ -41,27 +40,6 @@ function isProduction() {
|
|
|
41
40
|
);
|
|
42
41
|
}
|
|
43
42
|
|
|
44
|
-
// Encrypt token for storage
|
|
45
|
-
function encryptToken(token, key) {
|
|
46
|
-
const algorithm = 'aes-256-gcm';
|
|
47
|
-
const salt = crypto.randomBytes(16);
|
|
48
|
-
const derivedKey = crypto.pbkdf2Sync(key, salt, 100000, 32, 'sha256');
|
|
49
|
-
const iv = crypto.randomBytes(16);
|
|
50
|
-
const cipher = crypto.createCipheriv(algorithm, derivedKey, iv);
|
|
51
|
-
|
|
52
|
-
let encrypted = cipher.update(JSON.stringify(token), 'utf8', 'hex');
|
|
53
|
-
encrypted += cipher.final('hex');
|
|
54
|
-
|
|
55
|
-
const authTag = cipher.getAuthTag();
|
|
56
|
-
|
|
57
|
-
return {
|
|
58
|
-
encrypted,
|
|
59
|
-
salt: salt.toString('hex'),
|
|
60
|
-
iv: iv.toString('hex'),
|
|
61
|
-
authTag: authTag.toString('hex')
|
|
62
|
-
};
|
|
63
|
-
}
|
|
64
|
-
|
|
65
43
|
// Validate license with MoonUI API
|
|
66
44
|
async function validateLicense(licenseKey) {
|
|
67
45
|
return new Promise((resolve, reject) => {
|
|
@@ -121,6 +99,12 @@ async function validateLicense(licenseKey) {
|
|
|
121
99
|
reject(error);
|
|
122
100
|
});
|
|
123
101
|
|
|
102
|
+
// npm install'ı asmamak için sıkı timeout: API erişilemez/yavaşsa (down, ağ
|
|
103
|
+
// sorunu) isteği iptal et → main() catch'i Free plan ile devam eder, hang YOK.
|
|
104
|
+
req.setTimeout(15000, () => {
|
|
105
|
+
req.destroy(new Error('License validation request timed out after 15s'));
|
|
106
|
+
});
|
|
107
|
+
|
|
124
108
|
req.write(postData);
|
|
125
109
|
req.end();
|
|
126
110
|
});
|