ts-repo-utils 2.2.2 → 2.3.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.
@@ -23,9 +23,13 @@ export type GenIndexConfig = DeepReadonly<{
23
23
  /**
24
24
  * Generates index.mts files recursively in `config.targetDirectory`.
25
25
  * @param config - Configuration for index file generation
26
+ * @param options - Additional options
26
27
  * @throws Error if any step fails.
27
28
  */
28
- export const genIndex = async (config: GenIndexConfig): Promise<void> => {
29
+ export const genIndex = async (
30
+ config: GenIndexConfig,
31
+ options?: Readonly<{ silent?: boolean }>,
32
+ ): Promise<void> => {
29
33
  echo('Starting index file generation...\n');
30
34
 
31
35
  // Merge config with defaults
@@ -56,7 +60,9 @@ export const genIndex = async (config: GenIndexConfig): Promise<void> => {
56
60
 
57
61
  // Step 3: Format generated files
58
62
  echo('3. Formatting generated files...');
59
- const fmtResult = await $('npm run fmt');
63
+ const fmtResult = await $('npm run fmt', {
64
+ silent: options?.silent ?? false,
65
+ });
60
66
  if (Result.isErr(fmtResult)) {
61
67
  throw new Error(`Formatting failed: ${fmtResult.value.message}`);
62
68
  }