@dxtmisha/scripts 1.0.0 → 1.1.1
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 +32 -0
- package/bin/build-packages.ts +24 -3
- package/bin/design-prompt.ts +7 -2
- package/dist/{AiZAi-x3CInynJ.js → AiZAi-P-St-CZL.js} +1 -1
- package/dist/{PropertiesConfig-ChizwW5y.js → PropertiesConfig-BBsuNndv.js} +67 -52
- package/dist/config.d.ts +6 -0
- package/dist/config.js +5 -5
- package/dist/library-ai.js +1 -1
- package/dist/library-figma.js +1 -1
- package/dist/library-ui.js +648 -637
- package/dist/library.d.ts +262 -21
- package/dist/library.js +317 -185
- package/dist/{propertyTypes-DflziKuR.js → propertyTypes-CstobYcc.js} +2 -2
- package/package.json +18 -18
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,38 @@
|
|
|
2
2
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
|
|
5
|
+
## [1.1.1] - 2026-09-07
|
|
6
|
+
|
|
7
|
+
### Added
|
|
8
|
+
- **`PropertiesFile.toUrl` Helper**:
|
|
9
|
+
- Added static `PropertiesFile.toUrl()` method for resolving paths to absolute file URLs for ESM dynamic imports.
|
|
10
|
+
- Added unit test suite in `src/classes/Properties/__tests__/PropertiesFile.test.ts` and updated Storybook documentation (EN, RU, VI).
|
|
11
|
+
|
|
12
|
+
### Fixed
|
|
13
|
+
- **Web-Types Generation (`DesignWikiStormItem`)**:
|
|
14
|
+
- Fixed type formatting in `web-types.json`: string enum options from `getOptions()` are now properly quoted as literal string unions (`'sm' | 'md' | 'lg' | 'auto'`), while interfaces, generics, and function types retain clean TypeScript syntax without invalid outer quotes.
|
|
15
|
+
- Improved `cleanType()` to remove redundant enclosing parentheses and trailing `| undefined`.
|
|
16
|
+
|
|
17
|
+
## [1.1.0] - 2026-09-07
|
|
18
|
+
|
|
19
|
+
### Added
|
|
20
|
+
- **`GitIgnore` Helper**:
|
|
21
|
+
- Implemented `GitIgnore` class (`src/classes/Git/GitIgnore.ts`) for parsing, querying, and synchronizing `.gitignore` files across monorepo packages.
|
|
22
|
+
- Added automated `.gitignore` synchronization during package builds.
|
|
23
|
+
- **`BuildPackages` Enhancements**:
|
|
24
|
+
- Added support for custom build code execution (`customCode`) before and after package compilation.
|
|
25
|
+
- Added support for custom log files (`fileLog`) to capture build outputs.
|
|
26
|
+
- **AI Prompt Generation & Configurations**:
|
|
27
|
+
- Added `promptInclude` and `promptPackageOnly` configuration options in `DesignUiConfigPackagePrompt`.
|
|
28
|
+
- Added Russian AI prompt templates (`aiCodeGlobalPrompt.ru.md`, `aiDescriptionGeneration.ru.md`, `aiPromptMetadata.ru.md`, `aiTypeOptimization.ru.md`).
|
|
29
|
+
- Added prompt exclusions support (`promptExclude`).
|
|
30
|
+
- **Storybook Documentation**:
|
|
31
|
+
- Added Storybook guides for `GitIgnore`, `LibraryAiPrompt`, `PropertiesConfig`, and `BuildPackages` in `src/storybook/`.
|
|
32
|
+
|
|
33
|
+
### Changed
|
|
34
|
+
- **Dependencies**: Updated workspace package dependencies to explicit `>=` semver ranges.
|
|
35
|
+
- **Error Handling**: Improved error diagnostics and recovery in `DesignTypes` pipeline.
|
|
36
|
+
|
|
5
37
|
## [1.0.0] - 2026-08-30
|
|
6
38
|
|
|
7
39
|
### Added
|
package/bin/build-packages.ts
CHANGED
|
@@ -4,12 +4,33 @@ import process from 'node:process'
|
|
|
4
4
|
import { parseCliArguments } from './arguments'
|
|
5
5
|
import { BuildPackages } from '../dist/library.js'
|
|
6
6
|
|
|
7
|
-
parseCliArguments(
|
|
7
|
+
const { values } = parseCliArguments(
|
|
8
8
|
'Scans, sorts, and builds monorepo packages managing build order by priorities.',
|
|
9
|
-
'Usage: dxt-build-packages'
|
|
9
|
+
'Usage: dxt-build-packages [--code CODE] [--dir DIR] [--log LOG]',
|
|
10
|
+
{
|
|
11
|
+
code: {
|
|
12
|
+
type: 'string',
|
|
13
|
+
short: 'c',
|
|
14
|
+
description: 'Custom build command or script name to execute'
|
|
15
|
+
},
|
|
16
|
+
dir: {
|
|
17
|
+
type: 'string',
|
|
18
|
+
short: 'd',
|
|
19
|
+
description: 'Packages directory path'
|
|
20
|
+
},
|
|
21
|
+
log: {
|
|
22
|
+
type: 'string',
|
|
23
|
+
short: 'l',
|
|
24
|
+
description: 'Custom build log file name or path'
|
|
25
|
+
}
|
|
26
|
+
}
|
|
10
27
|
)
|
|
11
28
|
|
|
12
|
-
|
|
29
|
+
const dir = typeof values.dir === 'string' ? values.dir : undefined
|
|
30
|
+
const code = typeof values.code === 'string' ? values.code : undefined
|
|
31
|
+
const log = typeof values.log === 'string' ? values.log : undefined
|
|
32
|
+
|
|
33
|
+
new BuildPackages(dir, code, log)
|
|
13
34
|
.make()
|
|
14
35
|
.catch((error) => {
|
|
15
36
|
console.error('dxt-build-packages failed:', error)
|
package/bin/design-prompt.ts
CHANGED
|
@@ -6,19 +6,24 @@ import { LibraryAiPrompt } from '../dist/library.js'
|
|
|
6
6
|
|
|
7
7
|
const { values } = parseCliArguments(
|
|
8
8
|
'Generates the consolidated AI prompt file ai-prompt.md for the project.',
|
|
9
|
-
'Usage: dxt-prompt [--mcp]',
|
|
9
|
+
'Usage: dxt-prompt [--mcp] [--vue]',
|
|
10
10
|
{
|
|
11
11
|
mcp: {
|
|
12
12
|
type: 'boolean',
|
|
13
13
|
short: 'm',
|
|
14
14
|
default: false,
|
|
15
15
|
description: 'Also generate the MCP configuration files'
|
|
16
|
+
},
|
|
17
|
+
vue: {
|
|
18
|
+
type: 'boolean',
|
|
19
|
+
default: false,
|
|
20
|
+
description: 'Include Vue component prompt rules'
|
|
16
21
|
}
|
|
17
22
|
}
|
|
18
23
|
)
|
|
19
24
|
|
|
20
25
|
try {
|
|
21
|
-
new LibraryAiPrompt([], values.mcp === true).make()
|
|
26
|
+
new LibraryAiPrompt([], values.mcp === true, values.vue !== false).make()
|
|
22
27
|
process.exit(0)
|
|
23
28
|
} catch (error) {
|
|
24
29
|
console.error('dxt-prompt failed:', error)
|
|
@@ -3,14 +3,14 @@ import { Datetime as i, forEach as a, toArray as o, toKebabCase as s, transforma
|
|
|
3
3
|
import l from "path";
|
|
4
4
|
import u from "node:fs";
|
|
5
5
|
import d from "node:path";
|
|
6
|
-
import { fileURLToPath as f } from "node:url";
|
|
6
|
+
import { fileURLToPath as f, pathToFileURL as p } from "node:url";
|
|
7
7
|
//#region src/functions/toPathStandardSep.ts
|
|
8
|
-
function
|
|
8
|
+
function m(e) {
|
|
9
9
|
return e.replace(/\//g, l.sep);
|
|
10
10
|
}
|
|
11
11
|
//#endregion
|
|
12
12
|
//#region src/classes/Properties/PropertiesFile.ts
|
|
13
|
-
var
|
|
13
|
+
var h = d.dirname(f(import.meta.url)), g = class {
|
|
14
14
|
static root;
|
|
15
15
|
static module;
|
|
16
16
|
static is(e) {
|
|
@@ -69,6 +69,9 @@ var m = d.dirname(f(import.meta.url)), h = class {
|
|
|
69
69
|
static toSep(e) {
|
|
70
70
|
return this.sep() === "/" ? e : e.replace("/", this.sep());
|
|
71
71
|
}
|
|
72
|
+
static toUrl(e) {
|
|
73
|
+
return p(d.resolve(this.root, this.joinPath(e))).href;
|
|
74
|
+
}
|
|
72
75
|
static readDir(e) {
|
|
73
76
|
return this.is(e) ? u.readdirSync(this.joinPath(e)) : [];
|
|
74
77
|
}
|
|
@@ -128,43 +131,64 @@ var m = d.dirname(f(import.meta.url)), h = class {
|
|
|
128
131
|
return this.joinPath(e).replace(`${this.root}${d.sep}`, "").replace(`${this.root}`, "");
|
|
129
132
|
}
|
|
130
133
|
static {
|
|
131
|
-
this.module = !!
|
|
134
|
+
this.module = !!h.match("node_modules"), this.root = process.cwd();
|
|
132
135
|
}
|
|
133
|
-
},
|
|
136
|
+
}, _ = class {
|
|
134
137
|
static config;
|
|
135
|
-
static
|
|
136
|
-
return this.config?.
|
|
138
|
+
static isPromptPackageOnly() {
|
|
139
|
+
return !!this.config?.promptPackageOnly;
|
|
137
140
|
}
|
|
138
|
-
static
|
|
139
|
-
return this.config?.
|
|
141
|
+
static isTypesWithoutVue() {
|
|
142
|
+
return !!this.config?.typesWithoutVue;
|
|
140
143
|
}
|
|
141
|
-
static
|
|
142
|
-
return this.config?.
|
|
144
|
+
static getAiConfig() {
|
|
145
|
+
return this.config?.aiConfig ?? {};
|
|
143
146
|
}
|
|
144
|
-
static
|
|
145
|
-
return this.config?.
|
|
147
|
+
static getAiKey() {
|
|
148
|
+
return this.config?.aiKey ?? "";
|
|
146
149
|
}
|
|
147
|
-
static
|
|
148
|
-
return this.config?.
|
|
150
|
+
static getAiModel() {
|
|
151
|
+
return this.config?.aiModel ?? "";
|
|
149
152
|
}
|
|
150
|
-
static
|
|
151
|
-
return this.config?.
|
|
153
|
+
static getAiResourcesDir() {
|
|
154
|
+
return this.config?.aiResourcesDir ?? "ai-resources";
|
|
152
155
|
}
|
|
153
|
-
static
|
|
154
|
-
return this.config?.
|
|
156
|
+
static getAiType() {
|
|
157
|
+
return this.config?.aiType ?? "gemini";
|
|
155
158
|
}
|
|
156
|
-
static
|
|
157
|
-
return this.config?.
|
|
159
|
+
static getAiTypesConcurrency() {
|
|
160
|
+
return this.config?.aiTypesConcurrency ?? 8;
|
|
158
161
|
}
|
|
159
|
-
static
|
|
160
|
-
return this.config?.
|
|
162
|
+
static getDesignAlternativeName() {
|
|
163
|
+
return this.config?.alternativeName;
|
|
161
164
|
}
|
|
162
|
-
static
|
|
163
|
-
return
|
|
165
|
+
static getDesignName() {
|
|
166
|
+
return this.config?.name ?? "ui";
|
|
164
167
|
}
|
|
165
168
|
static getDistDir() {
|
|
166
169
|
return this.config?.distDir ?? "dist";
|
|
167
170
|
}
|
|
171
|
+
static getFigmaToken() {
|
|
172
|
+
return this.config?.figmaToken ?? "";
|
|
173
|
+
}
|
|
174
|
+
static getPackagePrefix() {
|
|
175
|
+
return this.config?.packagePrefix ?? void 0;
|
|
176
|
+
}
|
|
177
|
+
static getProjectName() {
|
|
178
|
+
return this.config?.project ?? "ui";
|
|
179
|
+
}
|
|
180
|
+
static getPromptExclude() {
|
|
181
|
+
return Array.isArray(this.config?.promptExclude) ? this.config.promptExclude : this.config?.promptExclude ? [this.config.promptExclude] : [];
|
|
182
|
+
}
|
|
183
|
+
static getPromptInclude() {
|
|
184
|
+
return Array.isArray(this.config?.promptInclude) ? this.config.promptInclude : this.config?.promptInclude ? [this.config.promptInclude] : [];
|
|
185
|
+
}
|
|
186
|
+
static getPromptPackageOnly() {
|
|
187
|
+
return this.config?.promptPackageOnly;
|
|
188
|
+
}
|
|
189
|
+
static getPromptScanDepth() {
|
|
190
|
+
return this.config?.promptScanDepth ?? 6;
|
|
191
|
+
}
|
|
168
192
|
static getSeparator() {
|
|
169
193
|
return this.config?.separator ?? "/";
|
|
170
194
|
}
|
|
@@ -174,37 +198,28 @@ var m = d.dirname(f(import.meta.url)), h = class {
|
|
|
174
198
|
static getSeparatorLimit() {
|
|
175
199
|
return this.config?.separatorLimit ?? 6;
|
|
176
200
|
}
|
|
177
|
-
static
|
|
178
|
-
return this.config?.
|
|
179
|
-
}
|
|
180
|
-
static getAiResourcesDir() {
|
|
181
|
-
return this.config?.aiResourcesDir ?? "ai-resources";
|
|
182
|
-
}
|
|
183
|
-
static getPromptScanDepth() {
|
|
184
|
-
return this.config?.promptScanDepth ?? 6;
|
|
185
|
-
}
|
|
186
|
-
static getAiType() {
|
|
187
|
-
return this.config?.aiType ?? "gemini";
|
|
201
|
+
static getTypesExclude() {
|
|
202
|
+
return this.config?.typesExclude;
|
|
188
203
|
}
|
|
189
|
-
static
|
|
190
|
-
return this.config?.
|
|
204
|
+
static getTypesMatch() {
|
|
205
|
+
return this.config?.typesMatch;
|
|
191
206
|
}
|
|
192
|
-
static
|
|
193
|
-
return this.config?.
|
|
207
|
+
static getTypesPaths() {
|
|
208
|
+
return this.config?.typesPaths;
|
|
194
209
|
}
|
|
195
|
-
static
|
|
196
|
-
return this.config?.
|
|
210
|
+
static getTypesTemporaryDirectory() {
|
|
211
|
+
return this.config?.typesDir ?? "ai-types-temp";
|
|
197
212
|
}
|
|
198
|
-
static
|
|
199
|
-
return this.config?.
|
|
213
|
+
static getTypesWithoutVue() {
|
|
214
|
+
return this.config?.typesWithoutVue;
|
|
200
215
|
}
|
|
201
|
-
static
|
|
202
|
-
return this.config?.
|
|
216
|
+
static getWikiLanguage() {
|
|
217
|
+
return this.config?.wikiLanguage ?? "en";
|
|
203
218
|
}
|
|
204
219
|
static getExtends(e, t = []) {
|
|
205
|
-
let n = [...t,
|
|
220
|
+
let n = [...t, m(e)], r = this.getLocalPath(n), i = g.readFile(n), a = g.readFile(r), o = a?.extends ?? i?.extends;
|
|
206
221
|
return o ? {
|
|
207
|
-
...this.getExtends(o, [
|
|
222
|
+
...this.getExtends(o, [g.getPathDir(n)]),
|
|
208
223
|
...i,
|
|
209
224
|
...a
|
|
210
225
|
} : {
|
|
@@ -224,12 +239,12 @@ var m = d.dirname(f(import.meta.url)), h = class {
|
|
|
224
239
|
let t = [];
|
|
225
240
|
for (let n = 0; n < 32; n++) {
|
|
226
241
|
let n = [...t, e], r = this.getLocalPath(n);
|
|
227
|
-
if (
|
|
228
|
-
let e =
|
|
242
|
+
if (g.is(n) || g.is(r)) {
|
|
243
|
+
let e = g.readFile(n), t = g.readFile(r);
|
|
229
244
|
if (e || t) {
|
|
230
245
|
let r = t?.extends ?? e?.extends;
|
|
231
246
|
return r ? {
|
|
232
|
-
...this.getExtends(r, [
|
|
247
|
+
...this.getExtends(r, [g.getPathDir(n)]),
|
|
233
248
|
...e,
|
|
234
249
|
...t
|
|
235
250
|
} : {
|
|
@@ -247,4 +262,4 @@ var m = d.dirname(f(import.meta.url)), h = class {
|
|
|
247
262
|
}
|
|
248
263
|
};
|
|
249
264
|
//#endregion
|
|
250
|
-
export {
|
|
265
|
+
export { g as n, _ as t };
|
package/dist/config.d.ts
CHANGED
|
@@ -7,6 +7,9 @@ export declare const UI_DIR_AI = "ai";
|
|
|
7
7
|
/** Screenshot folder name for AI / Название папки со снимками экрана для AI */
|
|
8
8
|
export declare const UI_DIR_AI_PROMPT_SCREENSHOT = "ai-screenshot";
|
|
9
9
|
|
|
10
|
+
/** AI types directory name in root / Название директории типов AI в корне */
|
|
11
|
+
export declare const UI_DIR_AI_TYPES = "ai-packages-types";
|
|
12
|
+
|
|
10
13
|
/** AI types list directory name / Название директории со списком типов AI */
|
|
11
14
|
export declare const UI_DIR_AI_TYPES_LIST = "ai-types-list";
|
|
12
15
|
|
|
@@ -112,6 +115,9 @@ export declare const UI_FILE_AI_PROMPT_TYPES = "ai-types.md";
|
|
|
112
115
|
/** AI types file name / Название файла с типами AI */
|
|
113
116
|
export declare const UI_FILE_AI_TYPES = "ai-types.md";
|
|
114
117
|
|
|
118
|
+
/** Gitignore file name / Название файла .gitignore */
|
|
119
|
+
export declare const UI_FILE_GITIGNORE = ".gitignore";
|
|
120
|
+
|
|
115
121
|
/** Index file name / Название файла index */
|
|
116
122
|
export declare const UI_FILE_INDEX = "index.ts";
|
|
117
123
|
|
package/dist/config.js
CHANGED
|
@@ -1,20 +1,20 @@
|
|
|
1
1
|
//#region src/config.ts
|
|
2
|
-
var e = "design.config.json", t = "@dxtmisha", n = "constructor", r = `${t}/${n}`, i = "node_modules", a = "d", o = "custom", s = /\/\/ *export:none/, c = "src", l = "ai", u = "ai-screenshot", d = "ai-types-list",
|
|
2
|
+
var e = "design.config.json", t = "@dxtmisha", n = "constructor", r = `${t}/${n}`, i = "node_modules", a = "d", o = "custom", s = /\/\/ *export:none/, c = "src", l = "ai", u = "ai-screenshot", d = "ai-packages-types", f = "ai-types-list", p = "ai-types-temp", m = "resources", h = "components", g = "constructors", _ = "structure", v = "wiki", y = "temporary", b = "dist", x = "dist-temporary", S = "prompt", C = "packages", w = [
|
|
3
3
|
"src",
|
|
4
|
-
|
|
4
|
+
v,
|
|
5
5
|
"ai"
|
|
6
|
-
],
|
|
6
|
+
], T = ["src", "media"], E = [...T, "icons"], D = ["src", h], O = ["src", g], k = ["src", "styles"], A = ["src", "library"], ee = ["src", v], j = ["src", "library.ts"], M = [
|
|
7
7
|
"classes",
|
|
8
8
|
"components",
|
|
9
9
|
"composables",
|
|
10
10
|
"functions",
|
|
11
11
|
"global",
|
|
12
12
|
"types"
|
|
13
|
-
],
|
|
13
|
+
], N = ".gitignore", P = "package.json", F = "properties.json", I = "ai-description.md", L = "ai-doc.md", R = "ai-instruction.md", z = "ai-prompt.md", B = "ai-types.md", V = "ai-developer.md", H = "flags", U = "media", W = "design", G = "plugin", K = "style", q = "wiki", J = "vite.config.ts", Y = "vite-workers.config.ts", X = "index.ts", Z = "ai-types.md", Q = "ai-description.md", $ = "ai-mcp-resources.json", te = "ai-mcp-all-resources.json", ne = "ai-mcp-all-resources.ts", re = "style.scss", ie = "ui-properties.scss", ae = "scss", oe = "classes", se = [
|
|
14
14
|
"disabled",
|
|
15
15
|
"focus",
|
|
16
16
|
"readonly",
|
|
17
17
|
"read-only"
|
|
18
18
|
];
|
|
19
19
|
//#endregion
|
|
20
|
-
export { e as UI_CONFIG_FILE,
|
|
20
|
+
export { e as UI_CONFIG_FILE, w as UI_DIRS_AI_WIKI, D as UI_DIRS_COMPONENTS, O as UI_DIRS_CONSTRUCTOR, j as UI_DIRS_FILE_EXPORT, E as UI_DIRS_ICONS, A as UI_DIRS_LIBRARY, M as UI_DIRS_LIST_EXPORT, k as UI_DIRS_STYLES, T as UI_DIRS_TOKENS, ee as UI_DIRS_WIKI, l as UI_DIR_AI, u as UI_DIR_AI_PROMPT_SCREENSHOT, d as UI_DIR_AI_TYPES, f as UI_DIR_AI_TYPES_LIST, p as UI_DIR_AI_TYPES_TEMPORARY, h as UI_DIR_COMPONENTS, g as UI_DIR_CONSTRUCTOR, b as UI_DIR_DIST, x as UI_DIR_DIST_TEMPORARY, c as UI_DIR_IN, C as UI_DIR_PACKAGES, S as UI_DIR_PROMPT, m as UI_DIR_RESOURCES, _ as UI_DIR_STRUCTURE, y as UI_DIR_TEMPORARY, v as UI_DIR_WIKI, ae as UI_EXTENSION_STYLE, Q as UI_FILE_AI_DESCRIPTION, $ as UI_FILE_AI_MCP, te as UI_FILE_AI_MCP_ALL, ne as UI_FILE_AI_MCP_ALL_TS, I as UI_FILE_AI_PROMPT_DESCRIPTION, V as UI_FILE_AI_PROMPT_DEVELOPER, L as UI_FILE_AI_PROMPT_INFO, R as UI_FILE_AI_PROMPT_INSTRUCTION, z as UI_FILE_AI_PROMPT_PROMPT, B as UI_FILE_AI_PROMPT_TYPES, Z as UI_FILE_AI_TYPES, N as UI_FILE_GITIGNORE, X as UI_FILE_INDEX, W as UI_FILE_NAME_DESIGN, H as UI_FILE_NAME_FLAGS, U as UI_FILE_NAME_MEDIA, G as UI_FILE_NAME_PLUGIN, K as UI_FILE_NAME_STYLE, J as UI_FILE_NAME_VITE, Y as UI_FILE_NAME_VITE_WORKERS, q as UI_FILE_NAME_WIKI, P as UI_FILE_PACKAGE, F as UI_FILE_PROPERTY, ie as UI_FILE_STYLE_PROPERTIES, re as UI_FILE_STYLE_SCSS, s as UI_FLAG_NOT_EXPORT, a as UI_KEY_CONSTRUCTOR, o as UI_KEY_CUSTOM, i as UI_MODULES, r as UI_PROJECT_CONSTRUCTOR_FULL_NAME, n as UI_PROJECT_CONSTRUCTOR_NAME, t as UI_PROJECT_NAME, se as UI_PROPERTY_FOR_PROPS, oe as UI_STRUCTURE_CLASSES };
|
package/dist/library-ai.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { a as e, c as t, i as n, n as r, o as i, r as a, s as o, t as s, u as c } from "./AiZAi-
|
|
1
|
+
import { a as e, c as t, i as n, n as r, o as i, r as a, s as o, t as s, u as c } from "./AiZAi-P-St-CZL.js";
|
|
2
2
|
export { c as AiAbstract, o as AiClaude, t as AiClaudeLite, e as AiGoogle, i as AiGoogleLite, a as AiOpenAi, n as AiOpenAiLite, s as AiZAi, r as AiZAiLite };
|
package/dist/library-figma.js
CHANGED