@dxtmisha/scripts 0.11.5 → 0.11.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/CHANGELOG.md +19 -0
- package/package.json +1 -1
- package/src/classes/Design/DesignTypes.ts +5 -1
- package/src/classes/Design/DesignTypesDescription.ts +10 -0
- package/src/media/templates/componentDoc/subcomponents/_.gitignore.txt +0 -0
- package/src/media/templates/componentDoc/wiki/prompt.md +6 -0
- package/src/media/templates/packages/figma/_.gitignore.txt +29 -0
- package/src/media/templates/packages/nitro/_.gitignore.txt +28 -0
- package/src/media/templates/packages/nitro/src/assets/_.gitignore.txt +0 -0
- package/src/media/templates/packages/nitro/src/components/_.gitignore.txt +0 -0
- package/src/media/templates/packages/nitro/src/composables/_.gitignore.txt +0 -0
- package/src/media/templates/packages/project/_.gitignore.txt +4 -0
- package/src/media/templates/componentDoc/wiki/run.ts +0 -22
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,25 @@
|
|
|
2
2
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
|
|
5
|
+
## [0.11.7] - 2026-08-19
|
|
6
|
+
|
|
7
|
+
### Changed
|
|
8
|
+
- **AI Types Save Workflow (`dxt-types-save`)**:
|
|
9
|
+
- Added existence check for `ai-description.md` (`this.description.is()`) before invoking AI description generation in `DesignTypes.makeSave()`. Description generation will now execute only when the file does not already exist, preventing redundant AI API calls during quick type saves.
|
|
10
|
+
- Added `is()` method to `DesignTypesDescription` to verify the presence of `ai-description.md`.
|
|
11
|
+
|
|
12
|
+
## [0.11.6] - 2026-08-19
|
|
13
|
+
|
|
14
|
+
### Changed
|
|
15
|
+
- **Component Documentation Prompt (`prompt.md`)**:
|
|
16
|
+
- Added requirement for `*.stories.ts` to append a concise short description of the component (2–4 words) to the `meta.title` property after the component name separated by a dash.
|
|
17
|
+
- Added a strict prohibition against defining or adding `argTypes` to `meta` or stories in `*.stories.ts`.
|
|
18
|
+
- **Project Template (`.gitignore`)**:
|
|
19
|
+
- Added `ai-types.md`, `ai-description.md`, and `ai-mcp-resources.json` to the project package template's `_.gitignore.txt`.
|
|
20
|
+
- **Template Cleanups**:
|
|
21
|
+
- Renamed template `.gitignore` files to `_.gitignore.txt` across scaffolding templates.
|
|
22
|
+
- Removed deprecated `run.ts` script from the `componentDoc/wiki/` template.
|
|
23
|
+
|
|
5
24
|
## [0.11.5] - 2026-08-19
|
|
6
25
|
|
|
7
26
|
### Changed
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dxtmisha/scripts",
|
|
3
3
|
"private": false,
|
|
4
|
-
"version": "0.11.
|
|
4
|
+
"version": "0.11.7",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"description": "CLI tools, AI integration scripts, and automation utilities for DXT UI — automated component scaffolding, Figma layout generation, library packaging, documentation building, screenshot captures, and AI prompt processing.",
|
|
7
7
|
"keywords": [
|
|
@@ -80,7 +80,11 @@ export class DesignTypes {
|
|
|
80
80
|
console.log('DesignTypes: saving AI types from list...')
|
|
81
81
|
|
|
82
82
|
this.makeTypes.makeSave()
|
|
83
|
-
|
|
83
|
+
|
|
84
|
+
if (!this.description.is()) {
|
|
85
|
+
await this.description.make()
|
|
86
|
+
}
|
|
87
|
+
|
|
84
88
|
await this.mcp.make()
|
|
85
89
|
|
|
86
90
|
console.log('DesignTypes: AI types saved.')
|
|
@@ -30,6 +30,16 @@ export class DesignTypesDescription {
|
|
|
30
30
|
protected readonly isRaw: boolean = false
|
|
31
31
|
) { }
|
|
32
32
|
|
|
33
|
+
/**
|
|
34
|
+
* Checks if the AI description file exists.
|
|
35
|
+
*
|
|
36
|
+
* Проверяет, существует ли файл описания ИИ.
|
|
37
|
+
* @returns true if description file exists / true, если файл описания существует
|
|
38
|
+
*/
|
|
39
|
+
is(): boolean {
|
|
40
|
+
return PropertiesFile.is(UI_FILE_AI_DESCRIPTION)
|
|
41
|
+
}
|
|
42
|
+
|
|
33
43
|
/**
|
|
34
44
|
* Returns the generated full description content.
|
|
35
45
|
*
|
|
File without changes
|
|
@@ -23,6 +23,12 @@ You must save your changes in the correct target locations:
|
|
|
23
23
|
- **Documentation & Playground changes** (including MDX files and `stories.ts` playground configurations) must be saved inside this current directory (the `wiki` folder).
|
|
24
24
|
- **Component source changes** (including Vue SFC and typings/properties files) must be saved inside the parent directory (one level up from this current directory).
|
|
25
25
|
|
|
26
|
+
- **Storybook Stories Configuration (`*.stories.ts`)**:
|
|
27
|
+
- In the `meta` object of `*.stories.ts`, you MUST append a concise short description of the component (2–4 words) to the `title` field after the component name separated by a dash:
|
|
28
|
+
`title: '[project]/[ComponentName] - [short description of 2-4 words]'` (e.g. `'d1/Button - Interactive action trigger'` or `'d1/Button - Интерактивная кнопка действия'`).
|
|
29
|
+
- The short description must capture the primary purpose of the component in 2–4 words in the target documentation language ([wikiLanguage]).
|
|
30
|
+
- **No `argTypes`**: Adding `argTypes` to the `meta` configuration object or anywhere in `*.stories.ts` is **STRICTLY FORBIDDEN**.
|
|
31
|
+
|
|
26
32
|
> [!IMPORTANT]
|
|
27
33
|
> **Ignore Output Separation Rules in componentPrompt:**
|
|
28
34
|
> You must completely ignore any instructions or constraints in `componentPrompt.en.txt`/`componentPrompt.ru.txt` regarding how the final result/output should be returned or structured (specifically ignore rules 5-8, the requirement to split the response into 5 parts separated by "#########", and the prohibition on writing or modifying files).
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
# Logs
|
|
2
|
+
logs
|
|
3
|
+
*.log
|
|
4
|
+
npm-debug.log*
|
|
5
|
+
yarn-debug.log*
|
|
6
|
+
yarn-error.log*
|
|
7
|
+
pnpm-debug.log*
|
|
8
|
+
lerna-debug.log*
|
|
9
|
+
|
|
10
|
+
node_modules
|
|
11
|
+
dist-ssr
|
|
12
|
+
*.local
|
|
13
|
+
|
|
14
|
+
/ai.config.ts
|
|
15
|
+
|
|
16
|
+
ai-types.md
|
|
17
|
+
ai-description.md
|
|
18
|
+
ai-mcp-resources.json
|
|
19
|
+
|
|
20
|
+
# Editor directories and files
|
|
21
|
+
.vscode/*
|
|
22
|
+
!.vscode/extensions.json
|
|
23
|
+
.idea
|
|
24
|
+
.DS_Store
|
|
25
|
+
*.suo
|
|
26
|
+
*.ntvs*
|
|
27
|
+
*.njsproj
|
|
28
|
+
*.sln
|
|
29
|
+
*.sw?
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
# Logs
|
|
2
|
+
logs
|
|
3
|
+
*.log
|
|
4
|
+
npm-debug.log*
|
|
5
|
+
yarn-debug.log*
|
|
6
|
+
yarn-error.log*
|
|
7
|
+
pnpm-debug.log*
|
|
8
|
+
lerna-debug.log*
|
|
9
|
+
|
|
10
|
+
node_modules
|
|
11
|
+
dist-ssr
|
|
12
|
+
*.local
|
|
13
|
+
.output
|
|
14
|
+
|
|
15
|
+
ai-types.md
|
|
16
|
+
ai-description.md
|
|
17
|
+
ai-mcp-resources.json
|
|
18
|
+
|
|
19
|
+
# Editor directories and files
|
|
20
|
+
.vscode/*
|
|
21
|
+
!.vscode/extensions.json
|
|
22
|
+
.idea
|
|
23
|
+
.DS_Store
|
|
24
|
+
*.suo
|
|
25
|
+
*.ntvs*
|
|
26
|
+
*.njsproj
|
|
27
|
+
*.sln
|
|
28
|
+
*.sw?
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env vite-node
|
|
2
|
-
/// <reference types="node" />
|
|
3
|
-
|
|
4
|
-
import { spawn } from 'node:child_process'
|
|
5
|
-
import { readFileSync } from 'node:fs'
|
|
6
|
-
|
|
7
|
-
;(async () => {
|
|
8
|
-
try {
|
|
9
|
-
// You can add prompt generation logic here
|
|
10
|
-
const prompt = readFileSync(new URL('./prompt.md', import.meta.url), 'utf-8')
|
|
11
|
-
|
|
12
|
-
const child = spawn(
|
|
13
|
-
'npx',
|
|
14
|
-
['dxt-component-wiki', '[path]', prompt],
|
|
15
|
-
{ stdio: 'inherit' }
|
|
16
|
-
)
|
|
17
|
-
|
|
18
|
-
child.on('exit', code => console.log('End:', code))
|
|
19
|
-
} catch (error) {
|
|
20
|
-
console.error('Error:', error)
|
|
21
|
-
}
|
|
22
|
-
})()
|