@moontra/moonui-pro 3.3.5 → 3.3.6

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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@moontra/moonui-pro",
3
- "version": "3.3.5",
3
+ "version": "3.3.6",
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",
@@ -138,25 +138,34 @@ function saveLicenseToken(token) {
138
138
  if (isVercelBuild || isNetlifyBuild) {
139
139
  console.log('[MoonUI Pro] Detected build environment:', isVercelBuild ? 'Vercel' : 'Netlify');
140
140
 
141
- // In Vercel/Netlify, we can't write files persistently
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
- // Also try to write to a temp location that might be available during build
149
+ // 2. Project root'a kalıcı dosya (next.config.ts build time'da okuyacak)
150
150
  try {
151
- const tempPath = process.env.VERCEL_ARTIFACTS_PATH || process.env.NETLIFY_BUILD_BASE || '/tmp';
152
- const tempLicenseFile = path.join(tempPath, LICENSE_FILE);
151
+ // Project root'u bul (node_modules'dan 2 seviye yukarı)
152
+ const projectRoot = path.resolve(process.cwd(), '../..');
153
+ const tokenFile = path.join(projectRoot, '.moonui-license-token');
154
+
155
+ console.log('[MoonUI Pro] Saving token to project root:', tokenFile);
156
+ fs.writeFileSync(tokenFile, base64Token, 'utf8');
157
+ console.log('[MoonUI Pro] ✓ Token saved to project root');
158
+ } catch (fileError) {
159
+ console.error('[MoonUI Pro] Failed to save token file:', fileError.message);
160
+ }
153
161
 
154
- // Encrypt token with a deterministic key based on environment
155
- const encryptionKey = process.env.MOONUI_LICENSE_KEY || 'default-key';
156
- const encryptedData = encryptToken(token, encryptionKey);
162
+ // 3. Temp location (fallback)
163
+ try {
164
+ const tempPath = process.env.VERCEL_ARTIFACTS_PATH || process.env.NETLIFY_BUILD_BASE || '/tmp';
165
+ const tempLicenseFile = path.join(tempPath, '.moonui-license-token');
157
166
 
158
- fs.writeFileSync(tempLicenseFile, JSON.stringify(encryptedData, null, 2));
159
- console.log('[MoonUI Pro] Token saved to temporary location:', tempLicenseFile);
167
+ fs.writeFileSync(tempLicenseFile, base64Token, 'utf8');
168
+ console.log('[MoonUI Pro] Token also saved to temp location:', tempLicenseFile);
160
169
  } catch (tempError) {
161
170
  console.log('[MoonUI Pro] Could not write to temp location (expected in some environments)');
162
171
  }