@moontra/moonui-pro 3.3.5 → 3.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/package.json +2 -1
- package/scripts/postinstall.cjs +28 -10
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@moontra/moonui-pro",
|
|
3
|
-
"version": "3.3.
|
|
3
|
+
"version": "3.3.7",
|
|
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",
|
|
@@ -88,6 +88,7 @@
|
|
|
88
88
|
"react-dom": ">=18.0.0 || ^19.0.0"
|
|
89
89
|
},
|
|
90
90
|
"dependencies": {
|
|
91
|
+
"@moontra/moonui-pro": "^3.3.5",
|
|
91
92
|
"@radix-ui/react-accordion": "^1.2.11",
|
|
92
93
|
"@radix-ui/react-avatar": "^1.1.10",
|
|
93
94
|
"@radix-ui/react-checkbox": "^1.3.2",
|
package/scripts/postinstall.cjs
CHANGED
|
@@ -138,25 +138,43 @@ function saveLicenseToken(token) {
|
|
|
138
138
|
if (isVercelBuild || isNetlifyBuild) {
|
|
139
139
|
console.log('[MoonUI Pro] Detected build environment:', isVercelBuild ? 'Vercel' : 'Netlify');
|
|
140
140
|
|
|
141
|
-
//
|
|
142
|
-
// Instead, we'll set an environment variable that the build can use
|
|
141
|
+
// Token'ı hem environment variable'a hem de dosyaya kaydet
|
|
143
142
|
const tokenString = JSON.stringify(token);
|
|
144
143
|
const base64Token = Buffer.from(tokenString).toString('base64');
|
|
145
144
|
|
|
145
|
+
// 1. Environment variable (geçici - sadece PostInstall process'i için)
|
|
146
146
|
console.log('[MoonUI Pro] Setting MOONUI_PRO_TOKEN environment variable for build...');
|
|
147
147
|
process.env.MOONUI_PRO_TOKEN = base64Token;
|
|
148
148
|
|
|
149
|
-
//
|
|
149
|
+
// 2. Project root'a kalıcı dosya (next.config.ts build time'da okuyacak)
|
|
150
150
|
try {
|
|
151
|
-
|
|
152
|
-
|
|
151
|
+
// Vercel/Netlify'da process.cwd() zaten project root
|
|
152
|
+
// (npm install proje root'undan çalıştırılır)
|
|
153
|
+
const projectRoot = process.cwd();
|
|
154
|
+
const tokenFile = path.join(projectRoot, '.moonui-license-token');
|
|
155
|
+
|
|
156
|
+
console.log('[MoonUI Pro] Saving token to project root:', tokenFile);
|
|
157
|
+
console.log('[MoonUI Pro] Current working directory:', process.cwd());
|
|
158
|
+
fs.writeFileSync(tokenFile, base64Token, 'utf8');
|
|
159
|
+
console.log('[MoonUI Pro] ✓ Token saved to project root');
|
|
160
|
+
|
|
161
|
+
// Verify file was created
|
|
162
|
+
if (fs.existsSync(tokenFile)) {
|
|
163
|
+
console.log('[MoonUI Pro] ✓ Verified: Token file exists');
|
|
164
|
+
} else {
|
|
165
|
+
console.error('[MoonUI Pro] ❌ Error: Token file was not created!');
|
|
166
|
+
}
|
|
167
|
+
} catch (fileError) {
|
|
168
|
+
console.error('[MoonUI Pro] Failed to save token file:', fileError.message);
|
|
169
|
+
}
|
|
153
170
|
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
const
|
|
171
|
+
// 3. Temp location (fallback)
|
|
172
|
+
try {
|
|
173
|
+
const tempPath = process.env.VERCEL_ARTIFACTS_PATH || process.env.NETLIFY_BUILD_BASE || '/tmp';
|
|
174
|
+
const tempLicenseFile = path.join(tempPath, '.moonui-license-token');
|
|
157
175
|
|
|
158
|
-
fs.writeFileSync(tempLicenseFile,
|
|
159
|
-
console.log('[MoonUI Pro] Token saved to
|
|
176
|
+
fs.writeFileSync(tempLicenseFile, base64Token, 'utf8');
|
|
177
|
+
console.log('[MoonUI Pro] Token also saved to temp location:', tempLicenseFile);
|
|
160
178
|
} catch (tempError) {
|
|
161
179
|
console.log('[MoonUI Pro] Could not write to temp location (expected in some environments)');
|
|
162
180
|
}
|