@moontra/moonui-pro 3.3.7 → 3.3.8
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 +19 -4
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@moontra/moonui-pro",
|
|
3
|
-
"version": "3.3.
|
|
3
|
+
"version": "3.3.8",
|
|
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
|
@@ -148,13 +148,28 @@ function saveLicenseToken(token) {
|
|
|
148
148
|
|
|
149
149
|
// 2. Project root'a kalıcı dosya (next.config.ts build time'da okuyacak)
|
|
150
150
|
try {
|
|
151
|
-
//
|
|
152
|
-
//
|
|
153
|
-
|
|
151
|
+
// Find project root (where package.json is, 3 levels up from script in node_modules)
|
|
152
|
+
// Script location: /path/to/project/node_modules/@moontra/moonui-pro/scripts/postinstall.cjs
|
|
153
|
+
// Go up: scripts -> moonui-pro -> @moontra -> node_modules -> PROJECT ROOT
|
|
154
|
+
let projectRoot = process.cwd();
|
|
155
|
+
|
|
156
|
+
// If we're inside node_modules, go up to project root
|
|
157
|
+
if (projectRoot.includes('node_modules')) {
|
|
158
|
+
// From: /vercel/path0/node_modules/@moontra/moonui-pro
|
|
159
|
+
// To: /vercel/path0
|
|
160
|
+
const parts = projectRoot.split(path.sep);
|
|
161
|
+
const nodeModulesIndex = parts.lastIndexOf('node_modules');
|
|
162
|
+
if (nodeModulesIndex > 0) {
|
|
163
|
+
projectRoot = parts.slice(0, nodeModulesIndex).join(path.sep);
|
|
164
|
+
}
|
|
165
|
+
}
|
|
166
|
+
|
|
154
167
|
const tokenFile = path.join(projectRoot, '.moonui-license-token');
|
|
155
168
|
|
|
156
|
-
console.log('[MoonUI Pro] Saving token to project root:', tokenFile);
|
|
157
169
|
console.log('[MoonUI Pro] Current working directory:', process.cwd());
|
|
170
|
+
console.log('[MoonUI Pro] Calculated project root:', projectRoot);
|
|
171
|
+
console.log('[MoonUI Pro] Saving token to:', tokenFile);
|
|
172
|
+
|
|
158
173
|
fs.writeFileSync(tokenFile, base64Token, 'utf8');
|
|
159
174
|
console.log('[MoonUI Pro] ✓ Token saved to project root');
|
|
160
175
|
|