core-maugli 1.2.7 → 1.2.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
CHANGED
@@ -9,7 +9,11 @@ const __dirname = path.dirname(__filename);
|
|
9
9
|
|
10
10
|
// Определяем корневые папки
|
11
11
|
const isInNodeModules = __dirname.includes('node_modules');
|
12
|
-
const isSourceProject = !isInNodeModules && (
|
12
|
+
const isSourceProject = !isInNodeModules && (
|
13
|
+
__dirname.includes('core-maugli-blog') ||
|
14
|
+
process.cwd().includes('core-maugli-blog') ||
|
15
|
+
__dirname.includes('core-maugli')
|
16
|
+
);
|
13
17
|
|
14
18
|
const packageRoot = isInNodeModules
|
15
19
|
? path.join(__dirname, '../../..', 'node_modules', 'core-maugli') // из node_modules
|
@@ -19,6 +23,14 @@ const userRoot = isInNodeModules
|
|
19
23
|
? path.join(__dirname, '../../..') // корень пользовательского проекта
|
20
24
|
: process.env.INIT_CWD || process.cwd(); // для разработки
|
21
25
|
|
26
|
+
console.log('🔍 Debug paths:');
|
27
|
+
console.log(' __dirname:', __dirname);
|
28
|
+
console.log(' isInNodeModules:', isInNodeModules);
|
29
|
+
console.log(' isSourceProject:', isSourceProject);
|
30
|
+
console.log(' packageRoot:', packageRoot);
|
31
|
+
console.log(' userRoot:', userRoot);
|
32
|
+
console.log(' packageRoot === userRoot:', packageRoot === userRoot);
|
33
|
+
|
22
34
|
// Список папок и файлов для полного обновления (перезаписи)
|
23
35
|
const FORCE_UPDATE_PATHS = [
|
24
36
|
'src/components',
|
@@ -106,6 +106,14 @@ function getPreviewImageSrc(imageSrc: string): string {
|
|
106
106
|
|
107
107
|
const imageSrc = image?.src || maugliConfig.defaultRubricImage;
|
108
108
|
const previewImageSrc = getPreviewImageSrc(imageSrc);
|
109
|
+
|
110
|
+
// Debug информация для разработки
|
111
|
+
console.log('RubricCard Debug:', {
|
112
|
+
title,
|
113
|
+
originalImageSrc: imageSrc,
|
114
|
+
previewImageSrc,
|
115
|
+
defaultRubricImage: maugliConfig.defaultRubricImage
|
116
|
+
});
|
109
117
|
---
|
110
118
|
|
111
119
|
<a href={`/tags/${slug}/`} class="block w-full">
|