@dxtmisha/scripts 1.0.0 → 1.1.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/CHANGELOG.md CHANGED
@@ -2,6 +2,26 @@
2
2
 
3
3
  All notable changes to this project will be documented in this file.
4
4
 
5
+ ## [1.1.0] - 2026-09-07
6
+
7
+ ### Added
8
+ - **`GitIgnore` Helper**:
9
+ - Implemented `GitIgnore` class (`src/classes/Git/GitIgnore.ts`) for parsing, querying, and synchronizing `.gitignore` files across monorepo packages.
10
+ - Added automated `.gitignore` synchronization during package builds.
11
+ - **`BuildPackages` Enhancements**:
12
+ - Added support for custom build code execution (`customCode`) before and after package compilation.
13
+ - Added support for custom log files (`fileLog`) to capture build outputs.
14
+ - **AI Prompt Generation & Configurations**:
15
+ - Added `promptInclude` and `promptPackageOnly` configuration options in `DesignUiConfigPackagePrompt`.
16
+ - Added Russian AI prompt templates (`aiCodeGlobalPrompt.ru.md`, `aiDescriptionGeneration.ru.md`, `aiPromptMetadata.ru.md`, `aiTypeOptimization.ru.md`).
17
+ - Added prompt exclusions support (`promptExclude`).
18
+ - **Storybook Documentation**:
19
+ - Added Storybook guides for `GitIgnore`, `LibraryAiPrompt`, `PropertiesConfig`, and `BuildPackages` in `src/storybook/`.
20
+
21
+ ### Changed
22
+ - **Dependencies**: Updated workspace package dependencies to explicit `>=` semver ranges.
23
+ - **Error Handling**: Improved error diagnostics and recovery in `DesignTypes` pipeline.
24
+
5
25
  ## [1.0.0] - 2026-08-30
6
26
 
7
27
  ### Added
@@ -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
- new BuildPackages()
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)
@@ -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)
@@ -1,4 +1,4 @@
1
- import { t as e } from "./PropertiesConfig-ChizwW5y.js";
1
+ import { t as e } from "./PropertiesConfig-BKZz_FWW.js";
2
2
  import { forEach as t, random as n, sleep as r } from "@dxtmisha/functional-basic";
3
3
  //#region src/classes/Ai/AiAbstract.ts
4
4
  var i = class {
@@ -132,39 +132,60 @@ var m = d.dirname(f(import.meta.url)), h = class {
132
132
  }
133
133
  }, g = class {
134
134
  static config;
135
- static getProjectName() {
136
- return this.config?.project ?? "ui";
135
+ static isPromptPackageOnly() {
136
+ return !!this.config?.promptPackageOnly;
137
137
  }
138
- static getDesignName() {
139
- return this.config?.name ?? "ui";
138
+ static isTypesWithoutVue() {
139
+ return !!this.config?.typesWithoutVue;
140
140
  }
141
- static getDesignAlternativeName() {
142
- return this.config?.alternativeName;
141
+ static getAiConfig() {
142
+ return this.config?.aiConfig ?? {};
143
143
  }
144
- static getPackagePrefix() {
145
- return this.config?.packagePrefix ?? void 0;
144
+ static getAiKey() {
145
+ return this.config?.aiKey ?? "";
146
146
  }
147
- static getTypesTemporaryDirectory() {
148
- return this.config?.typesDir ?? "ai-types-temp";
147
+ static getAiModel() {
148
+ return this.config?.aiModel ?? "";
149
149
  }
150
- static getTypesPaths() {
151
- return this.config?.typesPaths;
150
+ static getAiResourcesDir() {
151
+ return this.config?.aiResourcesDir ?? "ai-resources";
152
152
  }
153
- static getTypesMatch() {
154
- return this.config?.typesMatch;
153
+ static getAiType() {
154
+ return this.config?.aiType ?? "gemini";
155
155
  }
156
- static getTypesExclude() {
157
- return this.config?.typesExclude;
156
+ static getAiTypesConcurrency() {
157
+ return this.config?.aiTypesConcurrency ?? 8;
158
158
  }
159
- static getTypesWithoutVue() {
160
- return this.config?.typesWithoutVue;
159
+ static getDesignAlternativeName() {
160
+ return this.config?.alternativeName;
161
161
  }
162
- static isTypesWithoutVue() {
163
- return !!this.config?.typesWithoutVue;
162
+ static getDesignName() {
163
+ return this.config?.name ?? "ui";
164
164
  }
165
165
  static getDistDir() {
166
166
  return this.config?.distDir ?? "dist";
167
167
  }
168
+ static getFigmaToken() {
169
+ return this.config?.figmaToken ?? "";
170
+ }
171
+ static getPackagePrefix() {
172
+ return this.config?.packagePrefix ?? void 0;
173
+ }
174
+ static getProjectName() {
175
+ return this.config?.project ?? "ui";
176
+ }
177
+ static getPromptExclude() {
178
+ return Array.isArray(this.config?.promptExclude) ? this.config.promptExclude : this.config?.promptExclude ? [this.config.promptExclude] : [];
179
+ }
180
+ static getPromptInclude() {
181
+ return Array.isArray(this.config?.promptInclude) ? this.config.promptInclude : this.config?.promptInclude ? [this.config.promptInclude] : [];
182
+ }
183
+ static getPromptPackageOnly() {
184
+ return this.config?.promptPackageOnly;
185
+ }
186
+ static getPromptScanDepth() {
187
+ return this.config?.promptScanDepth ?? 6;
188
+ }
168
189
  static getSeparator() {
169
190
  return this.config?.separator ?? "/";
170
191
  }
@@ -174,32 +195,23 @@ var m = d.dirname(f(import.meta.url)), h = class {
174
195
  static getSeparatorLimit() {
175
196
  return this.config?.separatorLimit ?? 6;
176
197
  }
177
- static getWikiLanguage() {
178
- return this.config?.wikiLanguage ?? "en";
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";
198
+ static getTypesExclude() {
199
+ return this.config?.typesExclude;
188
200
  }
189
- static getAiModel() {
190
- return this.config?.aiModel ?? "";
201
+ static getTypesMatch() {
202
+ return this.config?.typesMatch;
191
203
  }
192
- static getAiKey() {
193
- return this.config?.aiKey ?? "";
204
+ static getTypesPaths() {
205
+ return this.config?.typesPaths;
194
206
  }
195
- static getAiConfig() {
196
- return this.config?.aiConfig ?? {};
207
+ static getTypesTemporaryDirectory() {
208
+ return this.config?.typesDir ?? "ai-types-temp";
197
209
  }
198
- static getAiTypesConcurrency() {
199
- return this.config?.aiTypesConcurrency ?? 8;
210
+ static getTypesWithoutVue() {
211
+ return this.config?.typesWithoutVue;
200
212
  }
201
- static getFigmaToken() {
202
- return this.config?.figmaToken ?? "";
213
+ static getWikiLanguage() {
214
+ return this.config?.wikiLanguage ?? "en";
203
215
  }
204
216
  static getExtends(e, t = []) {
205
217
  let n = [...t, p(e)], r = this.getLocalPath(n), i = h.readFile(n), a = h.readFile(r), o = a?.extends ?? i?.extends;
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", f = "ai-types-temp", p = "resources", m = "components", h = "constructors", g = "structure", _ = "wiki", v = "temporary", y = "dist", b = "dist-temporary", x = "prompt", S = "packages", C = [
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
- ], w = ["src", "media"], T = [...w, "icons"], E = ["src", m], D = ["src", h], O = ["src", "styles"], k = ["src", "library"], A = ["src", _], ee = ["src", "library.ts"], j = [
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
- ], M = "package.json", N = "properties.json", P = "ai-description.md", F = "ai-doc.md", I = "ai-instruction.md", L = "ai-prompt.md", R = "ai-types.md", z = "ai-developer.md", B = "flags", V = "media", H = "design", U = "plugin", W = "style", G = "wiki", K = "vite.config.ts", q = "vite-workers.config.ts", J = "index.ts", Y = "ai-types.md", X = "ai-description.md", Z = "ai-mcp-resources.json", Q = "ai-mcp-all-resources.json", $ = "ai-mcp-all-resources.ts", te = "style.scss", ne = "ui-properties.scss", re = "scss", ie = "classes", ae = [
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, C as UI_DIRS_AI_WIKI, E as UI_DIRS_COMPONENTS, D as UI_DIRS_CONSTRUCTOR, ee as UI_DIRS_FILE_EXPORT, T as UI_DIRS_ICONS, k as UI_DIRS_LIBRARY, j as UI_DIRS_LIST_EXPORT, O as UI_DIRS_STYLES, w as UI_DIRS_TOKENS, A as UI_DIRS_WIKI, l as UI_DIR_AI, u as UI_DIR_AI_PROMPT_SCREENSHOT, d as UI_DIR_AI_TYPES_LIST, f as UI_DIR_AI_TYPES_TEMPORARY, m as UI_DIR_COMPONENTS, h as UI_DIR_CONSTRUCTOR, y as UI_DIR_DIST, b as UI_DIR_DIST_TEMPORARY, c as UI_DIR_IN, S as UI_DIR_PACKAGES, x as UI_DIR_PROMPT, p as UI_DIR_RESOURCES, g as UI_DIR_STRUCTURE, v as UI_DIR_TEMPORARY, _ as UI_DIR_WIKI, re as UI_EXTENSION_STYLE, X as UI_FILE_AI_DESCRIPTION, Z as UI_FILE_AI_MCP, Q as UI_FILE_AI_MCP_ALL, $ as UI_FILE_AI_MCP_ALL_TS, P as UI_FILE_AI_PROMPT_DESCRIPTION, z as UI_FILE_AI_PROMPT_DEVELOPER, F as UI_FILE_AI_PROMPT_INFO, I as UI_FILE_AI_PROMPT_INSTRUCTION, L as UI_FILE_AI_PROMPT_PROMPT, R as UI_FILE_AI_PROMPT_TYPES, Y as UI_FILE_AI_TYPES, J as UI_FILE_INDEX, H as UI_FILE_NAME_DESIGN, B as UI_FILE_NAME_FLAGS, V as UI_FILE_NAME_MEDIA, U as UI_FILE_NAME_PLUGIN, W as UI_FILE_NAME_STYLE, K as UI_FILE_NAME_VITE, q as UI_FILE_NAME_VITE_WORKERS, G as UI_FILE_NAME_WIKI, M as UI_FILE_PACKAGE, N as UI_FILE_PROPERTY, ne as UI_FILE_STYLE_PROPERTIES, te 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, ae as UI_PROPERTY_FOR_PROPS, ie as UI_STRUCTURE_CLASSES };
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 };
@@ -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-x3CInynJ.js";
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-BiLAcdFy.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 };
@@ -1,4 +1,4 @@
1
- import { t as e } from "./PropertiesConfig-ChizwW5y.js";
1
+ import { t as e } from "./PropertiesConfig-BKZz_FWW.js";
2
2
  import { n as t, t as n } from "./figmaApiTypes-CArSsNW8.js";
3
3
  //#region src/classes/FigmaApi.ts
4
4
  var r = class {
@@ -1,6 +1,6 @@
1
- import { n as e, t } from "./PropertiesConfig-ChizwW5y.js";
1
+ import { n as e, t } from "./PropertiesConfig-BKZz_FWW.js";
2
2
  import { UI_DIRS_COMPONENTS as n, UI_DIRS_CONSTRUCTOR as r, UI_DIRS_ICONS as i, UI_DIRS_LIBRARY as a, UI_DIRS_STYLES as o, UI_DIRS_TOKENS as s, UI_DIRS_WIKI as c, UI_DIR_COMPONENTS as l, UI_DIR_CONSTRUCTOR as u, UI_DIR_DIST as d, UI_DIR_STRUCTURE as f, UI_EXTENSION_STYLE as p, UI_FILE_NAME_DESIGN as ee, UI_FILE_NAME_MEDIA as te, UI_FILE_NAME_PLUGIN as ne, UI_FILE_NAME_STYLE as re, UI_FILE_NAME_WIKI as ie, UI_FILE_PACKAGE as ae, UI_FILE_PROPERTY as oe, UI_FILE_STYLE_PROPERTIES as se, UI_FILE_STYLE_SCSS as ce, UI_KEY_CUSTOM as le, UI_PROJECT_CONSTRUCTOR_FULL_NAME as ue, UI_PROJECT_CONSTRUCTOR_NAME as m, UI_PROPERTY_FOR_PROPS as de, UI_STRUCTURE_CLASSES as fe } from "./config.js";
3
- import { a as h, i as pe, n as g, r as _, t as v } from "./propertyTypes-DflziKuR.js";
3
+ import { a as h, i as pe, n as g, r as _, t as v } from "./propertyTypes-C64u6rT3.js";
4
4
  import { ServerStorage as me, copyObject as he, forEach as y, getColumn as b, isFilled as x, isNull as ge, isObject as _e, isObjectNotArray as S, isSelected as C, isString as ve, replaceComponentName as ye, replaceRecursive as w, splice as be, strFill as xe, toArray as T, toCamelCase as E, toCamelCaseFirst as D, toKebabCase as O, uniqueArray as Se } from "@dxtmisha/functional-basic";
5
5
  import k from "typescript";
6
6
  import * as Ce from "sass";
@@ -3017,7 +3017,7 @@ ${Un}--${e.name} {
3017
3017
  let t = [];
3018
3018
  return e.stories.forEach((e) => {
3019
3019
  e.components && e.components.forEach((e) => {
3020
- t.push(e);
3020
+ t.includes(e) || t.push(e);
3021
3021
  });
3022
3022
  }), t;
3023
3023
  }