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.
- package/dist/functions/assert-path-exists.d.mts.map +1 -1
- package/dist/functions/assert-path-exists.mjs +1 -2
- package/dist/functions/assert-path-exists.mjs.map +1 -1
- package/dist/functions/assert-repo-is-dirty.d.mts +6 -2
- package/dist/functions/assert-repo-is-dirty.d.mts.map +1 -1
- package/dist/functions/assert-repo-is-dirty.mjs +15 -9
- package/dist/functions/assert-repo-is-dirty.mjs.map +1 -1
- package/dist/functions/diff.d.mts +4 -0
- package/dist/functions/diff.d.mts.map +1 -1
- package/dist/functions/diff.mjs +16 -14
- package/dist/functions/diff.mjs.map +1 -1
- package/dist/functions/exec-async.mjs +2 -2
- package/dist/functions/exec-async.mjs.map +1 -1
- package/dist/functions/format.d.mts +12 -3
- package/dist/functions/format.d.mts.map +1 -1
- package/dist/functions/format.mjs +64 -33
- package/dist/functions/format.mjs.map +1 -1
- package/dist/functions/gen-index.d.mts +4 -1
- package/dist/functions/gen-index.d.mts.map +1 -1
- package/dist/functions/gen-index.mjs +5 -2
- package/dist/functions/gen-index.mjs.map +1 -1
- package/dist/functions/index.mjs +1 -1
- package/dist/index.mjs +1 -1
- package/package.json +1 -1
- package/src/functions/assert-path-exists.mts +0 -1
- package/src/functions/assert-repo-is-dirty.mts +20 -8
- package/src/functions/diff.mts +24 -16
- package/src/functions/diff.test.mts +45 -32
- package/src/functions/exec-async.mts +2 -2
- package/src/functions/format.mts +76 -35
- package/src/functions/format.test.mts +28 -15
- package/src/functions/gen-index.mts +8 -2
|
@@ -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 (
|
|
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
|
}
|