@dxtmisha/scripts 0.4.5 → 0.5.0
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/bin/ai-doc.ts +9 -0
- package/package.json +9 -7
- package/src/classes/Ai/AiAbstract.ts +94 -13
- package/src/classes/Ai/AiDoc.ts +62 -0
- package/src/classes/Ai/AiDocItem.ts +20 -0
- package/src/classes/Ai/AiDocItemAbstract.ts +198 -0
- package/src/classes/Ai/AiDocItemClasses.ts +20 -0
- package/src/classes/Ai/AiDocItemComposables.ts +13 -0
- package/src/classes/Ai/AiDocType.ts +45 -0
- package/src/classes/Ai/AiGoogle.ts +7 -29
- package/src/classes/Ai/AiGoogleCli.ts +24 -0
- package/src/classes/Ai/AiGoogleCliLite.ts +144 -0
- package/src/classes/Ai/AiGoogleLite.ts +77 -0
- package/src/classes/BuildItem.ts +176 -0
- package/src/classes/Component/ComponentCreator.ts +2 -0
- package/src/classes/Component/ComponentItem.ts +3 -1
- package/src/classes/Component/ComponentWiki.ts +107 -190
- package/src/classes/Component/ComponentWikiFile.ts +102 -15
- package/src/classes/Design/DesignCommand.ts +3 -1
- package/src/classes/Design/DesignComponent.ts +3 -1
- package/src/classes/Design/DesignConstructor.ts +3 -1
- package/src/classes/Design/DesignConstructors.ts +3 -1
- package/src/classes/Design/DesignReplace.ts +3 -1
- package/src/classes/Design/DesignStructure.ts +3 -1
- package/src/classes/Design/DesignStructureClasses.ts +3 -1
- package/src/classes/Design/DesignStructureItemAbstract.ts +2 -0
- package/src/classes/Design/DesignStructureRead.ts +3 -1
- package/src/classes/Design/DesignStructureStyles.ts +2 -0
- package/src/classes/Design/DesignTypescript.ts +1 -1
- package/src/classes/Design/DesignUi.ts +3 -1
- package/src/classes/Design/DesignWiki.ts +3 -1
- package/src/classes/Git/GitRead.ts +258 -0
- package/src/classes/Library/LibraryExport.ts +3 -1
- package/src/classes/Library/LibraryFlags.ts +3 -1
- package/src/classes/Library/LibraryItems.ts +3 -1
- package/src/classes/Library/LibraryMedia.ts +3 -1
- package/src/classes/Package/PackageInit.ts +2 -0
- package/src/classes/Package/PackageItem.ts +2 -0
- package/src/classes/Properties/Properties.ts +3 -1
- package/src/classes/Properties/PropertiesCache.ts +3 -1
- package/src/classes/Properties/PropertiesConfig.ts +21 -0
- package/src/classes/Properties/PropertiesConvector.ts +3 -1
- package/src/classes/Properties/PropertiesFile.ts +11 -1
- package/src/classes/Properties/PropertiesImport.ts +3 -1
- package/src/classes/Properties/PropertiesItems.ts +3 -1
- package/src/classes/Properties/PropertiesKeys.ts +3 -1
- package/src/classes/Properties/PropertiesMain.ts +3 -1
- package/src/classes/Properties/PropertiesPalette.ts +3 -1
- package/src/classes/Properties/PropertiesPath.ts +3 -1
- package/src/classes/Properties/PropertiesScss.ts +3 -1
- package/src/classes/Properties/PropertiesSeparator.ts +3 -1
- package/src/classes/Properties/PropertiesSettings.ts +3 -1
- package/src/classes/Properties/PropertiesStandard.ts +3 -1
- package/src/classes/Properties/PropertiesTool.ts +3 -1
- package/src/classes/Properties/PropertiesTypes.ts +3 -1
- package/src/classes/Properties/PropertiesValues.ts +2 -0
- package/src/classes/Properties/PropertiesWrap.ts +3 -1
- package/src/classes/Properties/convector/convectorColor.ts +2 -0
- package/src/classes/Properties/convector/convectorFontFamilies.ts +2 -0
- package/src/classes/Properties/convector/convectorShadow.ts +3 -1
- package/src/classes/Properties/convector/convectorTypography.ts +3 -1
- package/src/classes/Properties/to/PropertiesToAbstract.ts +2 -0
- package/src/classes/Properties/to/PropertiesToAnimate.ts +3 -1
- package/src/classes/Properties/to/PropertiesToClass.ts +2 -0
- package/src/classes/Properties/to/PropertiesToClone.ts +3 -1
- package/src/classes/Properties/to/PropertiesToComponent.ts +2 -0
- package/src/classes/Properties/to/PropertiesToDrag.ts +3 -1
- package/src/classes/Properties/to/PropertiesToDuplicate.ts +3 -1
- package/src/classes/Properties/to/PropertiesToFull.ts +2 -0
- package/src/classes/Properties/to/PropertiesToLink.ts +6 -3
- package/src/classes/Properties/to/PropertiesToMedia.ts +3 -1
- package/src/classes/Properties/to/PropertiesToMulti.ts +3 -1
- package/src/classes/Properties/to/PropertiesToNone.ts +3 -1
- package/src/classes/Properties/to/PropertiesToPalette.ts +3 -1
- package/src/classes/Properties/to/PropertiesToProperty.ts +3 -1
- package/src/classes/Properties/to/PropertiesToRemove.ts +3 -1
- package/src/classes/Properties/to/PropertiesToReplace.ts +2 -0
- package/src/classes/Properties/to/PropertiesToRoot.ts +2 -0
- package/src/classes/Properties/to/PropertiesToSimilar.ts +3 -1
- package/src/classes/Properties/to/PropertiesToSort.ts +3 -1
- package/src/classes/Properties/to/PropertiesToState.ts +3 -1
- package/src/classes/Properties/to/PropertiesToStyle.ts +3 -1
- package/src/classes/Properties/to/PropertiesToSub.ts +2 -0
- package/src/classes/Properties/to/PropertiesToSubclass.ts +2 -0
- package/src/classes/Properties/to/PropertiesToVar.ts +3 -1
- package/src/classes/Properties/to/PropertiesToVariable.ts +3 -1
- package/src/classes/Styles/Styles.ts +3 -1
- package/src/classes/Styles/StylesClasses.ts +3 -1
- package/src/classes/Styles/StylesProperties.ts +2 -0
- package/src/classes/Styles/StylesRoot.ts +2 -0
- package/src/classes/Styles/StylesTool.ts +3 -1
- package/src/classes/Styles/to/StylesToAbstract.ts +3 -1
- package/src/classes/Styles/to/StylesToAnimate.ts +2 -0
- package/src/classes/Styles/to/StylesToClass.ts +2 -0
- package/src/classes/Styles/to/StylesToClassFull.ts +2 -0
- package/src/classes/Styles/to/StylesToContainer.ts +2 -0
- package/src/classes/Styles/to/StylesToMedia.ts +2 -0
- package/src/classes/Styles/to/StylesToProperty.ts +3 -1
- package/src/classes/Styles/to/StylesToRoot.ts +2 -0
- package/src/classes/Styles/to/StylesToSelector.ts +3 -1
- package/src/classes/Styles/to/StylesToVar.ts +3 -1
- package/src/classes/Styles/to/StylesToVirtual.ts +2 -0
- package/src/composables/useAi.ts +3 -0
- package/src/config.ts +11 -0
- package/src/functions/getComponentPaths.ts +2 -0
- package/src/functions/getConfigAi.ts +13 -0
- package/src/functions/getConstructorProperties.ts +3 -1
- package/src/functions/getNameDirByPaths.ts +2 -0
- package/src/functions/toPathStandardSep.ts +2 -0
- package/src/library-ai.ts +3 -0
- package/src/library.ts +2 -89
- package/src/media/ai/ai-doc-types.ts +21 -0
- package/src/media/properties/css.ts +4 -1
- package/src/media/properties/listSort.ts +1 -1
- package/src/media/properties/style.ts +2 -0
- package/src/media/templates/component/DesignComponent.vue +1 -1
- package/src/media/templates/constructors/ConstructorsDesign.tsx +4 -2
- package/src/media/templates/packages/library/package.json +2 -1
- package/src/media/templates/prompts/aiDocClassPrompt.en.txt +66 -0
- package/src/media/templates/prompts/aiDocClassPrompt.ru.txt +64 -0
- package/src/media/templates/prompts/aiDocComposablePrompt.en.txt +67 -0
- package/src/media/templates/prompts/aiDocComposablePrompt.ru.txt +67 -0
- package/src/media/templates/prompts/aiDocFunctionPrompt.en.txt +57 -0
- package/src/media/templates/prompts/aiDocFunctionPrompt.ru.txt +57 -0
- package/src/media/templates/prompts/componentPrompt.en.txt +105 -0
- package/src/media/templates/prompts/componentPrompt.ru.txt +105 -0
- package/src/media/templates/prompts/demoClassEn.mdx +111 -0
- package/src/media/templates/prompts/demoClassRu.mdx +111 -0
- package/src/media/templates/prompts/demoComponentEn.mdx +282 -0
- package/src/media/templates/prompts/demoComponentRu.mdx +282 -0
- package/src/media/templates/prompts/demoComposableEn.mdx +103 -0
- package/src/media/templates/prompts/demoComposableRu.mdx +103 -0
- package/src/media/templates/prompts/demoDocEn.mdx +30 -0
- package/src/media/templates/prompts/demoDocRu.mdx +30 -0
- package/src/media/templates/viteComponentTemplateConfig.ts +1 -1
- package/src/types/aiTypes.ts +19 -0
- package/src/types/configTypes.ts +8 -2
- package/src/types/gitTypes.ts +59 -0
- package/src/media/templates/componentPrompt.en.txt +0 -447
- package/src/media/templates/componentPrompt.ru.txt +0 -449
|
@@ -0,0 +1,258 @@
|
|
|
1
|
+
import { execSync } from 'node:child_process'
|
|
2
|
+
import { Datetime, forEach, removeCommonPrefix } from '@dxtmisha/functional-basic'
|
|
3
|
+
|
|
4
|
+
import { PropertiesFile } from '../Properties/PropertiesFile'
|
|
5
|
+
|
|
6
|
+
import { type GitFileList, GitStatus } from '../../types/gitTypes'
|
|
7
|
+
|
|
8
|
+
/**
|
|
9
|
+
* Class for reading information from Git repository.
|
|
10
|
+
*
|
|
11
|
+
* Класс для чтения информации из Git репозитория.
|
|
12
|
+
*/
|
|
13
|
+
export class GitRead {
|
|
14
|
+
/**
|
|
15
|
+
* Gets list of files with their metadata.
|
|
16
|
+
*
|
|
17
|
+
* Получает список файлов с их метаданными.
|
|
18
|
+
* @param filter - file filter function / функция фильтрации файлов
|
|
19
|
+
*/
|
|
20
|
+
static getList(
|
|
21
|
+
filter?: (file: string) => boolean
|
|
22
|
+
): GitFileList {
|
|
23
|
+
const dir = this.getDirPrefix()
|
|
24
|
+
|
|
25
|
+
return forEach(
|
|
26
|
+
this.getFilesPath(),
|
|
27
|
+
(file) => {
|
|
28
|
+
if (
|
|
29
|
+
filter
|
|
30
|
+
&& !filter(file)
|
|
31
|
+
) {
|
|
32
|
+
return
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
const date = this.getDate(this.getFileDate(file))
|
|
36
|
+
|
|
37
|
+
return {
|
|
38
|
+
path: file,
|
|
39
|
+
pathByOS: this.splitPath(file),
|
|
40
|
+
pathFull: `${dir}${file}`,
|
|
41
|
+
date,
|
|
42
|
+
status: undefined
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
) as GitFileList
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
/**
|
|
49
|
+
* Gets list of files in porcelain format with their metadata.
|
|
50
|
+
*
|
|
51
|
+
* Получает список файлов в формате porcelain с их метаданными.
|
|
52
|
+
* @param filter - file filter function / функция фильтрации файлов
|
|
53
|
+
*/
|
|
54
|
+
static getListPorcelain(
|
|
55
|
+
filter?: (file: string) => boolean
|
|
56
|
+
): GitFileList {
|
|
57
|
+
const date = this.getDate()
|
|
58
|
+
const prefix = this.getDirPrefix()
|
|
59
|
+
|
|
60
|
+
return forEach(
|
|
61
|
+
this.getFilesPorcelain(),
|
|
62
|
+
(file) => {
|
|
63
|
+
const data = file.split(' ', 2)
|
|
64
|
+
|
|
65
|
+
const status = data[0] as GitStatus
|
|
66
|
+
const path: string = data[1] ?? ''
|
|
67
|
+
|
|
68
|
+
if (
|
|
69
|
+
filter
|
|
70
|
+
&& !filter(path)
|
|
71
|
+
) {
|
|
72
|
+
return
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
const pathCommonPrefix = removeCommonPrefix(path, prefix)
|
|
76
|
+
const pathByOS = this.splitPath(pathCommonPrefix)
|
|
77
|
+
const fileDate = PropertiesFile.getTime(pathByOS)
|
|
78
|
+
|
|
79
|
+
return {
|
|
80
|
+
path: pathCommonPrefix,
|
|
81
|
+
pathByOS,
|
|
82
|
+
pathFull: path,
|
|
83
|
+
date: fileDate ?? date,
|
|
84
|
+
status
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
) as GitFileList
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
/**
|
|
91
|
+
* Gets unique list of files from both standard and porcelain lists.
|
|
92
|
+
*
|
|
93
|
+
* Получает уникальный список файлов из обоих стандартных и porcelain списков.
|
|
94
|
+
* @param filter - file filter function / функция фильтрации файлов
|
|
95
|
+
*/
|
|
96
|
+
static getListUnique(
|
|
97
|
+
filter: (file: string) => boolean
|
|
98
|
+
): GitFileList {
|
|
99
|
+
return this.mergeUnique(
|
|
100
|
+
this.getListPorcelain(filter),
|
|
101
|
+
this.getList(filter)
|
|
102
|
+
)
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
/**
|
|
106
|
+
* Gets list of files by directory with .ts extension, excluding test files.
|
|
107
|
+
*
|
|
108
|
+
* Получает список файлов по директории с расширением .ts, исключая тестовые файлы.
|
|
109
|
+
* @param directory - directory path or regex / путь к директории или регулярное выражение
|
|
110
|
+
*/
|
|
111
|
+
static getListByDirectory(
|
|
112
|
+
directory: string | RegExp
|
|
113
|
+
) {
|
|
114
|
+
return this.getListUnique(
|
|
115
|
+
(file: string) => Boolean(
|
|
116
|
+
file.match(directory)
|
|
117
|
+
&& file.endsWith('.ts')
|
|
118
|
+
&& !file.endsWith('.test.ts')
|
|
119
|
+
)
|
|
120
|
+
)
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
/**
|
|
124
|
+
* Gets list of class files (*.ts in /classes/ directory).
|
|
125
|
+
*
|
|
126
|
+
* Получает список файлов классов (*.ts в директории /classes/).
|
|
127
|
+
*/
|
|
128
|
+
static getClassesList(): GitFileList {
|
|
129
|
+
return this.getListByDirectory('/classes/')
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
/**
|
|
133
|
+
* Gets list of class files (*.ts in /classes/ directory).
|
|
134
|
+
*
|
|
135
|
+
* Получает список файлов классов (*.ts в директории /classes/).
|
|
136
|
+
*/
|
|
137
|
+
static getFunctionsList(): GitFileList {
|
|
138
|
+
return this.getListByDirectory('/functions/')
|
|
139
|
+
}
|
|
140
|
+
|
|
141
|
+
/**
|
|
142
|
+
* Gets list of all file paths in repository.
|
|
143
|
+
*
|
|
144
|
+
* Получает список всех путей файлов в репозитории.
|
|
145
|
+
*/
|
|
146
|
+
static getFilesPath(): string[] {
|
|
147
|
+
return forEach(
|
|
148
|
+
this.exec('git ls-tree -r --name-only HEAD').split('\n'),
|
|
149
|
+
file => file.trim()
|
|
150
|
+
)
|
|
151
|
+
}
|
|
152
|
+
|
|
153
|
+
/**
|
|
154
|
+
* Gets list of files in porcelain format.
|
|
155
|
+
*
|
|
156
|
+
* Получает список файлов в формате porcelain.
|
|
157
|
+
*/
|
|
158
|
+
static getFilesPorcelain(): string[] {
|
|
159
|
+
return forEach(
|
|
160
|
+
this.exec('git status --porcelain').split('\n'),
|
|
161
|
+
file => file.trim()
|
|
162
|
+
)
|
|
163
|
+
}
|
|
164
|
+
|
|
165
|
+
/**
|
|
166
|
+
* Gets the date of the last commit for a file.
|
|
167
|
+
*
|
|
168
|
+
* Получает дату последнего коммита для файла.
|
|
169
|
+
* @param filePath - path to file / путь к файлу
|
|
170
|
+
*/
|
|
171
|
+
static getFileDate(filePath: string): string {
|
|
172
|
+
return this.exec(`git log -1 --format="%ci" -- "${filePath}"`)
|
|
173
|
+
}
|
|
174
|
+
|
|
175
|
+
/**
|
|
176
|
+
* Gets the directory prefix of the current Git repository.
|
|
177
|
+
*
|
|
178
|
+
* Получает префикс директории текущего Git репозитория.
|
|
179
|
+
*/
|
|
180
|
+
static getDirPrefix(): string {
|
|
181
|
+
return this.exec('git rev-parse --show-prefix')
|
|
182
|
+
}
|
|
183
|
+
|
|
184
|
+
/**
|
|
185
|
+
* Formats a date string to standard full format.
|
|
186
|
+
*
|
|
187
|
+
* Форматирует строку даты в стандартный полный формат.
|
|
188
|
+
* @param date - date string / строка даты
|
|
189
|
+
*/
|
|
190
|
+
static getDate(date?: string): string {
|
|
191
|
+
return new Datetime(date)
|
|
192
|
+
.setType('full')
|
|
193
|
+
.standard()
|
|
194
|
+
}
|
|
195
|
+
|
|
196
|
+
/**
|
|
197
|
+
* Filters a list of Git files by the current directory prefix.
|
|
198
|
+
*
|
|
199
|
+
* Фильтрует список файлов Git по префиксу текущей директории.
|
|
200
|
+
* @param list - list of Git files / список файлов Git
|
|
201
|
+
*/
|
|
202
|
+
static filterByDirectory(
|
|
203
|
+
list: GitFileList
|
|
204
|
+
): GitFileList {
|
|
205
|
+
const dir = this.getDirPrefix()
|
|
206
|
+
|
|
207
|
+
return list.filter(item => item.pathFull.startsWith(dir))
|
|
208
|
+
}
|
|
209
|
+
|
|
210
|
+
/**
|
|
211
|
+
* Merges two lists of Git files, ensuring uniqueness by file path.
|
|
212
|
+
*
|
|
213
|
+
* Объединяет два списка файлов Git, обеспечивая уникальность по пути файла.
|
|
214
|
+
* @param listA - first list to merge / первый список для объединения
|
|
215
|
+
* @param listB - lists to merge / списки для объединения
|
|
216
|
+
*/
|
|
217
|
+
static mergeUnique(
|
|
218
|
+
listA: GitFileList,
|
|
219
|
+
listB: GitFileList
|
|
220
|
+
): GitFileList {
|
|
221
|
+
const list: GitFileList = [...listA]
|
|
222
|
+
|
|
223
|
+
forEach(
|
|
224
|
+
listB,
|
|
225
|
+
(itemB) => {
|
|
226
|
+
const exists = list.find(
|
|
227
|
+
itemA => itemA.pathFull === itemB.pathFull
|
|
228
|
+
)
|
|
229
|
+
|
|
230
|
+
if (!exists) {
|
|
231
|
+
list.push(itemB)
|
|
232
|
+
}
|
|
233
|
+
}
|
|
234
|
+
)
|
|
235
|
+
|
|
236
|
+
return list
|
|
237
|
+
}
|
|
238
|
+
|
|
239
|
+
/**
|
|
240
|
+
* Splits a file path into its components.
|
|
241
|
+
*
|
|
242
|
+
* Разбивает путь файла на его компоненты.
|
|
243
|
+
* @param path - file path / путь к файлу
|
|
244
|
+
*/
|
|
245
|
+
static splitPath(path: string): string[] {
|
|
246
|
+
return path.split('/').filter(part => part.length > 0)
|
|
247
|
+
}
|
|
248
|
+
|
|
249
|
+
/**
|
|
250
|
+
* Executes Git command and returns result.
|
|
251
|
+
*
|
|
252
|
+
* Выполняет Git команду и возвращает результат.
|
|
253
|
+
* @param command - command to execute / команда для выполнения
|
|
254
|
+
*/
|
|
255
|
+
protected static exec(command: string): string {
|
|
256
|
+
return execSync(command, { encoding: 'utf8' }).trim()
|
|
257
|
+
}
|
|
258
|
+
}
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
// export:none
|
|
2
|
+
|
|
1
3
|
import { PropertiesFile } from '../Properties/PropertiesFile'
|
|
2
4
|
|
|
3
5
|
import type { LibraryFiles } from '../../types/libraryTypes'
|
|
@@ -48,7 +50,7 @@ export class LibraryExport {
|
|
|
48
50
|
* @param path filename/ имя файла
|
|
49
51
|
*/
|
|
50
52
|
protected isExport(path: string | string[]): boolean {
|
|
51
|
-
return !this.getFile(path).match(UI_FLAG_NOT_EXPORT)
|
|
53
|
+
return !PropertiesFile.joinPath(path).match('.test.') && !this.getFile(path).match(UI_FLAG_NOT_EXPORT)
|
|
52
54
|
}
|
|
53
55
|
|
|
54
56
|
/**
|
|
@@ -1,4 +1,6 @@
|
|
|
1
|
-
|
|
1
|
+
// export:none
|
|
2
|
+
|
|
3
|
+
import { forEach, toCamelCaseFirst, toKebabCase } from '@dxtmisha/functional-basic'
|
|
2
4
|
import flags from '@dxtmisha/media/flags'
|
|
3
5
|
|
|
4
6
|
import { LibraryItems } from './LibraryItems'
|
|
@@ -1,4 +1,6 @@
|
|
|
1
|
-
|
|
1
|
+
// export:none
|
|
2
|
+
|
|
3
|
+
import { toCamelCaseFirst, toKebabCase } from '@dxtmisha/functional-basic'
|
|
2
4
|
|
|
3
5
|
import { PropertiesConfig } from '../Properties/PropertiesConfig'
|
|
4
6
|
import { PropertiesFile } from '../Properties/PropertiesFile'
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
// export:none
|
|
2
|
+
|
|
1
3
|
import { toPathStandardSep } from '../../functions/toPathStandardSep'
|
|
2
4
|
|
|
3
5
|
import { PropertiesFile } from './PropertiesFile'
|
|
@@ -5,6 +7,7 @@ import { PropertiesFile } from './PropertiesFile'
|
|
|
5
7
|
import type { AiType, DesignUiConfig } from '../../types/configTypes'
|
|
6
8
|
|
|
7
9
|
import {
|
|
10
|
+
UI_AI_DOC_DIRECTORY, UI_AI_DOC_STORYBOOK,
|
|
8
11
|
UI_CONFIG_FILE
|
|
9
12
|
} from '../../config'
|
|
10
13
|
|
|
@@ -97,6 +100,24 @@ export class PropertiesConfig {
|
|
|
97
100
|
return this.config.aiKey ?? ''
|
|
98
101
|
}
|
|
99
102
|
|
|
103
|
+
/**
|
|
104
|
+
* Returns the directories for AI documentation generation.
|
|
105
|
+
*
|
|
106
|
+
* Возвращает каталоги для генерации AI документации.
|
|
107
|
+
*/
|
|
108
|
+
static getAiDocDirectory(): string[] {
|
|
109
|
+
return this.config.aiDocDirectory ?? UI_AI_DOC_DIRECTORY
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
/**
|
|
113
|
+
* Returns the Storybook path for AI documentation generation.
|
|
114
|
+
*
|
|
115
|
+
* Возвращает путь Storybook для генерации AI документации.
|
|
116
|
+
*/
|
|
117
|
+
static getAiDocStorybookPath(): string {
|
|
118
|
+
return this.config.aiDocStorybookPath ?? UI_AI_DOC_STORYBOOK
|
|
119
|
+
}
|
|
120
|
+
|
|
100
121
|
/**
|
|
101
122
|
* Recursively retrieves and merges extended configuration files.
|
|
102
123
|
*
|
|
@@ -1,4 +1,6 @@
|
|
|
1
|
-
|
|
1
|
+
// export:none
|
|
2
|
+
|
|
3
|
+
import { forEach, isObjectNotArray } from '@dxtmisha/functional-basic'
|
|
2
4
|
|
|
3
5
|
import { convectorColor } from './convector/convectorColor'
|
|
4
6
|
import { convectorShadow } from './convector/convectorShadow'
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { toArray, toKebabCase, transformation } from '@dxtmisha/functional'
|
|
1
|
+
import { Datetime, toArray, toKebabCase, transformation } from '@dxtmisha/functional-basic'
|
|
2
2
|
|
|
3
3
|
import requireFs from 'fs'
|
|
4
4
|
import requirePath from 'path'
|
|
@@ -216,6 +216,16 @@ export class PropertiesFile {
|
|
|
216
216
|
return undefined
|
|
217
217
|
}
|
|
218
218
|
|
|
219
|
+
/**
|
|
220
|
+
* Returns the time the file was last modified.
|
|
221
|
+
*
|
|
222
|
+
* Возвращает время последнего изменения файла.
|
|
223
|
+
* @param path path to the file/ путь к файлу
|
|
224
|
+
*/
|
|
225
|
+
static getTime(path: PropertiesFilePath): string | undefined {
|
|
226
|
+
return new Datetime(this.stat(path)?.mtimeMs, 'full').standard()
|
|
227
|
+
}
|
|
228
|
+
|
|
219
229
|
/**
|
|
220
230
|
* Reads the contents of the directory.
|
|
221
231
|
*
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
// export:none
|
|
2
|
+
|
|
1
3
|
import {
|
|
2
4
|
forEach,
|
|
3
5
|
getColumn,
|
|
@@ -5,7 +7,7 @@ import {
|
|
|
5
7
|
isObjectNotArray,
|
|
6
8
|
isSelected,
|
|
7
9
|
toCamelCase
|
|
8
|
-
} from '@dxtmisha/functional'
|
|
10
|
+
} from '@dxtmisha/functional-basic'
|
|
9
11
|
|
|
10
12
|
import { PropertiesCache } from './PropertiesCache'
|
|
11
13
|
|
|
@@ -1,4 +1,6 @@
|
|
|
1
|
-
|
|
1
|
+
// export:none
|
|
2
|
+
|
|
3
|
+
import { forEach, isFilled, isObjectNotArray } from '@dxtmisha/functional-basic'
|
|
2
4
|
|
|
3
5
|
import { PropertiesPath } from './PropertiesPath'
|
|
4
6
|
import { PropertiesTool } from './PropertiesTool'
|
|
@@ -1,4 +1,6 @@
|
|
|
1
|
-
|
|
1
|
+
// export:none
|
|
2
|
+
|
|
3
|
+
import { replaceRecursive, toKebabCase } from '@dxtmisha/functional-basic'
|
|
2
4
|
|
|
3
5
|
import { PropertiesConfig } from './PropertiesConfig'
|
|
4
6
|
import { PropertiesTool } from './PropertiesTool'
|
|
@@ -1,4 +1,6 @@
|
|
|
1
|
-
|
|
1
|
+
// export:none
|
|
2
|
+
|
|
3
|
+
import { forEach, isObjectNotArray } from '@dxtmisha/functional-basic'
|
|
2
4
|
|
|
3
5
|
import { PropertiesItems } from './PropertiesItems'
|
|
4
6
|
import { PropertiesPalette } from './PropertiesPalette'
|
|
@@ -1,4 +1,6 @@
|
|
|
1
|
-
|
|
1
|
+
// export:none
|
|
2
|
+
|
|
3
|
+
import { forEach, isObjectNotArray, replaceRecursive } from '@dxtmisha/functional-basic'
|
|
2
4
|
|
|
3
5
|
import { PropertiesConfig } from './PropertiesConfig'
|
|
4
6
|
import { PropertiesKeys } from './PropertiesKeys'
|
|
@@ -1,4 +1,6 @@
|
|
|
1
|
-
|
|
1
|
+
// export:none
|
|
2
|
+
|
|
3
|
+
import { isFilled, replaceRecursive, toKebabCase } from '@dxtmisha/functional-basic'
|
|
2
4
|
import { getConstructorProperties } from '../../functions/getConstructorProperties'
|
|
3
5
|
|
|
4
6
|
import { PropertiesConfig } from './PropertiesConfig'
|
|
@@ -1,4 +1,6 @@
|
|
|
1
|
-
|
|
1
|
+
// export:none
|
|
2
|
+
|
|
3
|
+
import { forEach, isFilled, isObjectNotArray, replaceRecursive } from '@dxtmisha/functional-basic'
|
|
2
4
|
|
|
3
5
|
import { PropertiesKeys } from './PropertiesKeys'
|
|
4
6
|
import { PropertiesTypes } from './PropertiesTypes'
|
|
@@ -1,4 +1,6 @@
|
|
|
1
|
-
|
|
1
|
+
// export:none
|
|
2
|
+
|
|
3
|
+
import { forEach, isFilled, isObjectNotArray } from '@dxtmisha/functional-basic'
|
|
2
4
|
|
|
3
5
|
import { PropertiesConfig } from '../PropertiesConfig'
|
|
4
6
|
import { PropertiesToAbstract } from './PropertiesToAbstract'
|
|
@@ -1,4 +1,6 @@
|
|
|
1
|
-
|
|
1
|
+
// export:none
|
|
2
|
+
|
|
3
|
+
import { forEach, getColumn, isObjectNotArray, toCamelCase } from '@dxtmisha/functional-basic'
|
|
2
4
|
|
|
3
5
|
import { PropertiesConfig } from '../PropertiesConfig'
|
|
4
6
|
import { PropertiesToAbstract } from './PropertiesToAbstract'
|
|
@@ -1,4 +1,6 @@
|
|
|
1
|
-
|
|
1
|
+
// export:none
|
|
2
|
+
|
|
3
|
+
import { isObjectNotArray, splice } from '@dxtmisha/functional-basic'
|
|
2
4
|
|
|
3
5
|
import { PropertiesToAbstract } from './PropertiesToAbstract'
|
|
4
6
|
import { PropertiesTypes } from '../PropertiesTypes'
|
|
@@ -114,8 +116,9 @@ export class PropertiesToLink extends PropertiesToAbstract {
|
|
|
114
116
|
this.addIgnore(data.value)
|
|
115
117
|
}
|
|
116
118
|
} else {
|
|
117
|
-
|
|
118
|
-
|
|
119
|
+
// TODO: зачем это надо?
|
|
120
|
+
// expect = true
|
|
121
|
+
// break
|
|
119
122
|
}
|
|
120
123
|
} else if (
|
|
121
124
|
isObjectNotArray(item.value)
|
|
@@ -1,4 +1,6 @@
|
|
|
1
|
-
|
|
1
|
+
// export:none
|
|
2
|
+
|
|
3
|
+
import { forEach, isObjectNotArray, toCamelCase } from '@dxtmisha/functional-basic'
|
|
2
4
|
|
|
3
5
|
import { PropertiesToAbstract } from './PropertiesToAbstract'
|
|
4
6
|
import { PropertiesItems } from '../PropertiesItems'
|