vectify 2.1.0 → 2.1.2

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/dist/cli.mjs CHANGED
@@ -2,15 +2,15 @@
2
2
  import {
3
3
  generate,
4
4
  init,
5
+ source_default,
5
6
  watch
6
- } from "./chunk-5RWOYQAG.mjs";
7
- import "./chunk-CIKTK6HI.mjs";
7
+ } from "./chunk-2ITFHLOW.mjs";
8
+ import "./chunk-SYQXCPHN.mjs";
8
9
 
9
10
  // src/cli.ts
10
11
  import { readFileSync } from "fs";
11
12
  import { dirname, join } from "path";
12
13
  import { fileURLToPath } from "url";
13
- import chalk from "chalk";
14
14
  import { Command } from "commander";
15
15
  function getPackageJson() {
16
16
  let pkgPath;
@@ -30,15 +30,15 @@ program.command("init").description("Initialize a new configuration file").optio
30
30
  try {
31
31
  await init(options);
32
32
  } catch (error) {
33
- console.error(chalk.red(`Error: ${error.message}`));
33
+ console.error(source_default.red(`Error: ${error.message}`));
34
34
  process.exit(1);
35
35
  }
36
36
  });
37
- program.command("generate").description("Generate icon components from SVG files").option("-c, --config <path>", "Path to config file").option("--dry-run", "Preview what will be generated without writing files").action(async (options) => {
37
+ program.command("generate").description("Generate icon components from SVG files").option("-c, --config <path>", "Path to config file").option("--dry-run", "Preview what will be generated without writing files").option("--force", "Force full regeneration, ignoring cache").action(async (options) => {
38
38
  try {
39
39
  await generate(options);
40
40
  } catch (error) {
41
- console.error(chalk.red(`Error: ${error.message}`));
41
+ console.error(source_default.red(`Error: ${error.message}`));
42
42
  process.exit(1);
43
43
  }
44
44
  });
@@ -46,7 +46,7 @@ program.command("watch").description("Watch for changes and regenerate automatic
46
46
  try {
47
47
  await watch(options);
48
48
  } catch (error) {
49
- console.error(chalk.red(`Error: ${error.message}`));
49
+ console.error(source_default.red(`Error: ${error.message}`));
50
50
  process.exit(1);
51
51
  }
52
52
  });
@@ -10,7 +10,7 @@ import {
10
10
  toKebabCase,
11
11
  toPascalCase,
12
12
  writeFile
13
- } from "./chunk-CIKTK6HI.mjs";
13
+ } from "./chunk-SYQXCPHN.mjs";
14
14
  export {
15
15
  ensureDir,
16
16
  fileExists,
package/dist/index.d.mts CHANGED
@@ -1,6 +1,7 @@
1
1
  interface GenerateOptions {
2
2
  config?: string;
3
3
  dryRun?: boolean;
4
+ force?: boolean;
4
5
  }
5
6
  /**
6
7
  * Generate icon components
@@ -143,7 +144,7 @@ interface IconForgeConfig {
143
144
  /**
144
145
  * Custom name transformation function
145
146
  */
146
- transform?: (name: string) => string;
147
+ componentNameTransform?: (name: string) => string;
147
148
  /**
148
149
  * SVGO configuration
149
150
  */
@@ -177,6 +178,26 @@ interface IconForgeConfig {
177
178
  */
178
179
  cleanOutput?: boolean;
179
180
  };
181
+ /**
182
+ * Incremental generation settings
183
+ */
184
+ incremental?: {
185
+ /**
186
+ * Enable incremental generation
187
+ * @default true
188
+ */
189
+ enabled?: boolean;
190
+ /**
191
+ * Cache directory name (relative to output)
192
+ * @default '.vectify'
193
+ */
194
+ cacheDir?: string;
195
+ /**
196
+ * Force full regeneration (ignore cache)
197
+ * @default false
198
+ */
199
+ force?: boolean;
200
+ };
180
201
  /**
181
202
  * Watch mode settings
182
203
  */
@@ -195,6 +216,16 @@ interface IconForgeConfig {
195
216
  * @default 300
196
217
  */
197
218
  debounce?: number;
219
+ /**
220
+ * Minimum file size for valid SVG (in bytes)
221
+ * @default 20
222
+ */
223
+ minFileSize?: number;
224
+ /**
225
+ * Delay before retrying empty file (in milliseconds)
226
+ * @default 2000
227
+ */
228
+ emptyFileRetryDelay?: number;
198
229
  };
199
230
  /**
200
231
  * Format generated files after generation
package/dist/index.d.ts CHANGED
@@ -1,6 +1,7 @@
1
1
  interface GenerateOptions {
2
2
  config?: string;
3
3
  dryRun?: boolean;
4
+ force?: boolean;
4
5
  }
5
6
  /**
6
7
  * Generate icon components
@@ -143,7 +144,7 @@ interface IconForgeConfig {
143
144
  /**
144
145
  * Custom name transformation function
145
146
  */
146
- transform?: (name: string) => string;
147
+ componentNameTransform?: (name: string) => string;
147
148
  /**
148
149
  * SVGO configuration
149
150
  */
@@ -177,6 +178,26 @@ interface IconForgeConfig {
177
178
  */
178
179
  cleanOutput?: boolean;
179
180
  };
181
+ /**
182
+ * Incremental generation settings
183
+ */
184
+ incremental?: {
185
+ /**
186
+ * Enable incremental generation
187
+ * @default true
188
+ */
189
+ enabled?: boolean;
190
+ /**
191
+ * Cache directory name (relative to output)
192
+ * @default '.vectify'
193
+ */
194
+ cacheDir?: string;
195
+ /**
196
+ * Force full regeneration (ignore cache)
197
+ * @default false
198
+ */
199
+ force?: boolean;
200
+ };
180
201
  /**
181
202
  * Watch mode settings
182
203
  */
@@ -195,6 +216,16 @@ interface IconForgeConfig {
195
216
  * @default 300
196
217
  */
197
218
  debounce?: number;
219
+ /**
220
+ * Minimum file size for valid SVG (in bytes)
221
+ * @default 20
222
+ */
223
+ minFileSize?: number;
224
+ /**
225
+ * Delay before retrying empty file (in milliseconds)
226
+ * @default 2000
227
+ */
228
+ emptyFileRetryDelay?: number;
198
229
  };
199
230
  /**
200
231
  * Format generated files after generation