ts-repo-utils 5.1.0 → 5.2.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/dist/functions/assert-ext.d.mts +12 -7
- package/dist/functions/assert-ext.d.mts.map +1 -1
- package/dist/functions/assert-ext.mjs +4 -2
- package/dist/functions/assert-ext.mjs.map +1 -1
- package/dist/functions/assert-path-exists.d.mts +2 -0
- package/dist/functions/assert-path-exists.d.mts.map +1 -1
- package/dist/functions/assert-path-exists.mjs +2 -0
- package/dist/functions/assert-path-exists.mjs.map +1 -1
- package/dist/functions/assert-repo-is-clean.d.mts +3 -2
- package/dist/functions/assert-repo-is-clean.d.mts.map +1 -1
- package/dist/functions/assert-repo-is-clean.mjs +4 -2
- package/dist/functions/assert-repo-is-clean.mjs.map +1 -1
- package/dist/functions/diff.d.mts +2 -6
- package/dist/functions/diff.d.mts.map +1 -1
- package/dist/functions/diff.mjs +2 -6
- package/dist/functions/diff.mjs.map +1 -1
- package/dist/functions/exec-async.d.mts +1 -0
- package/dist/functions/exec-async.d.mts.map +1 -1
- package/dist/functions/exec-async.mjs +1 -0
- package/dist/functions/exec-async.mjs.map +1 -1
- package/dist/functions/format.d.mts +10 -3
- package/dist/functions/format.d.mts.map +1 -1
- package/dist/functions/format.mjs +10 -3
- package/dist/functions/format.mjs.map +1 -1
- package/dist/functions/gen-index.d.mts +18 -5
- package/dist/functions/gen-index.d.mts.map +1 -1
- package/dist/functions/gen-index.mjs +48 -32
- package/dist/functions/gen-index.mjs.map +1 -1
- package/dist/functions/should-run.d.mts +8 -5
- package/dist/functions/should-run.d.mts.map +1 -1
- package/dist/functions/should-run.mjs +8 -5
- package/dist/functions/should-run.mjs.map +1 -1
- package/dist/functions/workspace-utils/execute-parallel.d.mts +11 -6
- package/dist/functions/workspace-utils/execute-parallel.d.mts.map +1 -1
- package/dist/functions/workspace-utils/execute-parallel.mjs +40 -28
- package/dist/functions/workspace-utils/execute-parallel.mjs.map +1 -1
- package/dist/functions/workspace-utils/get-workspace-packages.d.mts +7 -4
- package/dist/functions/workspace-utils/get-workspace-packages.d.mts.map +1 -1
- package/dist/functions/workspace-utils/get-workspace-packages.mjs +7 -4
- package/dist/functions/workspace-utils/get-workspace-packages.mjs.map +1 -1
- package/dist/functions/workspace-utils/run-cmd-in-parallel.d.mts +7 -3
- package/dist/functions/workspace-utils/run-cmd-in-parallel.d.mts.map +1 -1
- package/dist/functions/workspace-utils/run-cmd-in-parallel.mjs +7 -3
- package/dist/functions/workspace-utils/run-cmd-in-parallel.mjs.map +1 -1
- package/dist/functions/workspace-utils/run-cmd-in-stages.d.mts +10 -6
- package/dist/functions/workspace-utils/run-cmd-in-stages.d.mts.map +1 -1
- package/dist/functions/workspace-utils/run-cmd-in-stages.mjs +10 -6
- package/dist/functions/workspace-utils/run-cmd-in-stages.mjs.map +1 -1
- package/package.json +3 -2
- package/src/functions/assert-ext.mts +13 -7
- package/src/functions/assert-path-exists.mts +2 -0
- package/src/functions/assert-repo-is-clean.mts +4 -2
- package/src/functions/diff.mts +2 -6
- package/src/functions/diff.test.mts +13 -13
- package/src/functions/exec-async.mts +1 -0
- package/src/functions/format.mts +10 -3
- package/src/functions/gen-index.mts +107 -48
- package/src/functions/should-run.mts +8 -5
- package/src/functions/workspace-utils/execute-parallel.mts +42 -29
- package/src/functions/workspace-utils/get-workspace-packages.mts +7 -4
- package/src/functions/workspace-utils/run-cmd-in-parallel.mts +7 -3
- package/src/functions/workspace-utils/run-cmd-in-stages.mts +10 -6
|
@@ -1,21 +1,26 @@
|
|
|
1
1
|
import '../node-global.mjs';
|
|
2
|
-
/**
|
|
3
|
-
* Configuration for directory extension checking.
|
|
4
|
-
*/
|
|
2
|
+
/** Configuration for directory extension checking. */
|
|
5
3
|
export type CheckExtConfig = DeepReadonly<{
|
|
6
4
|
/** Array of directory paths and their expected extensions */
|
|
7
5
|
directories: {
|
|
8
6
|
/** Directory path to check */
|
|
9
7
|
path: string;
|
|
10
|
-
/**
|
|
8
|
+
/**
|
|
9
|
+
* Expected file extension(s) (including the dot). Can be a single extension
|
|
10
|
+
* or an array of valid extensions
|
|
11
|
+
*/
|
|
11
12
|
extension: `.${string}` | `.${string}`[];
|
|
12
|
-
/**
|
|
13
|
+
/**
|
|
14
|
+
* Optional glob patterns to ignore (defaults to ['tsconfig.json',
|
|
15
|
+
* 'globals.d.*'])
|
|
16
|
+
*/
|
|
13
17
|
ignorePatterns?: string[];
|
|
14
18
|
}[];
|
|
15
19
|
}>;
|
|
16
20
|
/**
|
|
17
|
-
* Validates that all files in specified directories have the correct
|
|
18
|
-
* Exits with code 1 if any files have incorrect extensions.
|
|
21
|
+
* Validates that all files in specified directories have the correct
|
|
22
|
+
* extensions. Exits with code 1 if any files have incorrect extensions.
|
|
23
|
+
*
|
|
19
24
|
* @param config - Configuration specifying directories and expected extensions.
|
|
20
25
|
*/
|
|
21
26
|
export declare const assertExt: (config: CheckExtConfig) => Promise<void>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"assert-ext.d.mts","sourceRoot":"","sources":["../../src/functions/assert-ext.mts"],"names":[],"mappings":"AACA,OAAO,oBAAoB,CAAC;AAG5B
|
|
1
|
+
{"version":3,"file":"assert-ext.d.mts","sourceRoot":"","sources":["../../src/functions/assert-ext.mts"],"names":[],"mappings":"AACA,OAAO,oBAAoB,CAAC;AAG5B,sDAAsD;AACtD,MAAM,MAAM,cAAc,GAAG,YAAY,CAAC;IACxC,6DAA6D;IAC7D,WAAW,EAAE;QACX,8BAA8B;QAC9B,IAAI,EAAE,MAAM,CAAC;QAEb;;;WAGG;QACH,SAAS,EAAE,IAAI,MAAM,EAAE,GAAG,IAAI,MAAM,EAAE,EAAE,CAAC;QAEzC;;;WAGG;QACH,cAAc,CAAC,EAAE,MAAM,EAAE,CAAC;KAC3B,EAAE,CAAC;CACL,CAAC,CAAC;AAEH;;;;;GAKG;AACH,eAAO,MAAM,SAAS,GAAU,QAAQ,cAAc,KAAG,OAAO,CAAC,IAAI,CAuEpE,CAAC"}
|
|
@@ -3,8 +3,9 @@ import '../node-global.mjs';
|
|
|
3
3
|
import { assertPathExists } from './assert-path-exists.mjs';
|
|
4
4
|
|
|
5
5
|
/**
|
|
6
|
-
* Validates that all files in specified directories have the correct
|
|
7
|
-
* Exits with code 1 if any files have incorrect extensions.
|
|
6
|
+
* Validates that all files in specified directories have the correct
|
|
7
|
+
* extensions. Exits with code 1 if any files have incorrect extensions.
|
|
8
|
+
*
|
|
8
9
|
* @param config - Configuration specifying directories and expected extensions.
|
|
9
10
|
*/
|
|
10
11
|
const assertExt = async (config) => {
|
|
@@ -55,6 +56,7 @@ const assertExt = async (config) => {
|
|
|
55
56
|
};
|
|
56
57
|
/**
|
|
57
58
|
* Checks if all files in a directory have the expected extension.
|
|
59
|
+
*
|
|
58
60
|
* @param dir - The directory to check.
|
|
59
61
|
* @param expectedExtensions - The expected file extensions.
|
|
60
62
|
* @param ignorePatterns - Optional glob patterns to ignore.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"assert-ext.mjs","sources":["../../src/functions/assert-ext.mts"],"sourcesContent":[null],"names":[],"mappings":";;;;
|
|
1
|
+
{"version":3,"file":"assert-ext.mjs","sources":["../../src/functions/assert-ext.mts"],"sourcesContent":[null],"names":[],"mappings":";;;;AAyBA;;;;;AAKG;MACU,SAAS,GAAG,OAAO,MAAsB,KAAmB;;IAEvE,MAAM,OAAO,GAAG,MAAM,OAAO,CAAC,GAAG,CAC/B,MAAM,CAAC,WAAW,CAAC,GAAG,CAAC,OAAO,EAAE,IAAI,EAAE,GAAG,EAAE,SAAS,EAAE,cAAc,EAAE,KAAI;AACxE,QAAA,IAAI;YACF,OAAO,MAAM,8BAA8B,CACzC,GAAG,EACH,QAAQ,CAAC,SAAS,CAAC,GAAG,CAAC,SAAS,CAAC,GAAG,SAAS,EAC7C,cAAc,CACf;QACH;QAAE,OAAO,KAAK,EAAE;AACd,YAAA,OAAO,CAAC,KAAK,CAAC,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.
|
|
4
|
+
*
|
|
4
5
|
* @param filePath - The path to check.
|
|
5
6
|
* @returns True if the path exists.
|
|
6
7
|
*/
|
|
7
8
|
export declare const pathExists: (filePath: string) => Promise<boolean>;
|
|
8
9
|
/**
|
|
9
10
|
* Validates that a path exists and exits with code 1 if it doesn't.
|
|
11
|
+
*
|
|
10
12
|
* @param filePath - The path to validate.
|
|
11
13
|
* @param description - Description for error message (defaults to 'Path').
|
|
12
14
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"assert-path-exists.d.mts","sourceRoot":"","sources":["../../src/functions/assert-path-exists.mts"],"names":[],"mappings":"AAAA,OAAO,oBAAoB,CAAC;AAE5B
|
|
1
|
+
{"version":3,"file":"assert-path-exists.d.mts","sourceRoot":"","sources":["../../src/functions/assert-path-exists.mts"],"names":[],"mappings":"AAAA,OAAO,oBAAoB,CAAC;AAE5B;;;;;GAKG;AACH,eAAO,MAAM,UAAU,GAAU,UAAU,MAAM,KAAG,OAAO,CAAC,OAAO,CAOlE,CAAC;AAEF;;;;;GAKG;AACH,eAAO,MAAM,gBAAgB,GAC3B,UAAU,MAAM,EAChB,oBAAoB,KACnB,OAAO,CAAC,IAAI,CAKd,CAAC"}
|
|
@@ -2,6 +2,7 @@ import '../node-global.mjs';
|
|
|
2
2
|
|
|
3
3
|
/**
|
|
4
4
|
* Checks if a file or directory exists.
|
|
5
|
+
*
|
|
5
6
|
* @param filePath - The path to check.
|
|
6
7
|
* @returns True if the path exists.
|
|
7
8
|
*/
|
|
@@ -16,6 +17,7 @@ const pathExists = async (filePath) => {
|
|
|
16
17
|
};
|
|
17
18
|
/**
|
|
18
19
|
* Validates that a path exists and exits with code 1 if it doesn't.
|
|
20
|
+
*
|
|
19
21
|
* @param filePath - The path to validate.
|
|
20
22
|
* @param description - Description for error message (defaults to 'Path').
|
|
21
23
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"assert-path-exists.mjs","sources":["../../src/functions/assert-path-exists.mts"],"sourcesContent":[null],"names":[],"mappings":";;AAEA
|
|
1
|
+
{"version":3,"file":"assert-path-exists.mjs","sources":["../../src/functions/assert-path-exists.mts"],"sourcesContent":[null],"names":[],"mappings":";;AAEA;;;;;AAKG;MACU,UAAU,GAAG,OAAO,QAAgB,KAAsB;AACrE,IAAA,IAAI;AACF,QAAA,MAAM,EAAE,CAAC,MAAM,CAAC,QAAQ,CAAC;AACzB,QAAA,OAAO,IAAI;IACb;AAAE,IAAA,MAAM;AACN,QAAA,OAAO,KAAK;IACd;AACF;AAEA;;;;;AAKG;AACI,MAAM,gBAAgB,GAAG,OAC9B,QAAgB,EAChB,WAAW,GAAG,MAAM,KACH;IACjB,IAAI,EAAE,MAAM,UAAU,CAAC,QAAQ,CAAC,CAAC,EAAE;AACjC,QAAA,IAAI,CAAC,CAAA,EAAG,WAAW,oBAAoB,QAAQ,CAAA,CAAE,CAAC;AAClD,QAAA,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC;IACjB;AACF;;;;"}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import '../node-global.mjs';
|
|
2
2
|
/**
|
|
3
3
|
* Checks if the repository has uncommitted changes.
|
|
4
|
+
*
|
|
4
5
|
* @returns True if the repo is dirty, false otherwise.
|
|
5
6
|
* @throws Error if git command fails.
|
|
6
7
|
*/
|
|
@@ -8,8 +9,8 @@ export declare const repoIsDirty: (options?: Readonly<{
|
|
|
8
9
|
silent?: boolean;
|
|
9
10
|
}>) => Promise<boolean>;
|
|
10
11
|
/**
|
|
11
|
-
* Checks if the repository is clean and exits with code 1 if it is dirty.
|
|
12
|
-
*
|
|
12
|
+
* Checks if the repository is clean and exits with code 1 if it is dirty. Shows
|
|
13
|
+
* git status and diff output before exiting.
|
|
13
14
|
*/
|
|
14
15
|
export declare const assertRepoIsClean: (options?: Readonly<{
|
|
15
16
|
silent?: boolean;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"assert-repo-is-clean.d.mts","sourceRoot":"","sources":["../../src/functions/assert-repo-is-clean.mts"],"names":[],"mappings":"AACA,OAAO,oBAAoB,CAAC;AAE5B
|
|
1
|
+
{"version":3,"file":"assert-repo-is-clean.d.mts","sourceRoot":"","sources":["../../src/functions/assert-repo-is-clean.mts"],"names":[],"mappings":"AACA,OAAO,oBAAoB,CAAC;AAE5B;;;;;GAKG;AACH,eAAO,MAAM,WAAW,GACtB,UAAU,QAAQ,CAAC;IAAE,MAAM,CAAC,EAAE,OAAO,CAAA;CAAE,CAAC,KACvC,OAAO,CAAC,OAAO,CAGjB,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,iBAAiB,GAC5B,UAAU,QAAQ,CAAC;IAAE,MAAM,CAAC,EAAE,OAAO,CAAA;CAAE,CAAC,KACvC,OAAO,CAAC,IAAI,CAiCd,CAAC"}
|
|
@@ -3,6 +3,7 @@ import '../node-global.mjs';
|
|
|
3
3
|
|
|
4
4
|
/**
|
|
5
5
|
* Checks if the repository has uncommitted changes.
|
|
6
|
+
*
|
|
6
7
|
* @returns True if the repo is dirty, false otherwise.
|
|
7
8
|
* @throws Error if git command fails.
|
|
8
9
|
*/
|
|
@@ -11,8 +12,8 @@ const repoIsDirty = async (options) => {
|
|
|
11
12
|
return status.isDirty;
|
|
12
13
|
};
|
|
13
14
|
/**
|
|
14
|
-
* Checks if the repository is clean and exits with code 1 if it is dirty.
|
|
15
|
-
*
|
|
15
|
+
* Checks if the repository is clean and exits with code 1 if it is dirty. Shows
|
|
16
|
+
* git status and diff output before exiting.
|
|
16
17
|
*/
|
|
17
18
|
const assertRepoIsClean = async (options) => {
|
|
18
19
|
try {
|
|
@@ -46,6 +47,7 @@ const assertRepoIsClean = async (options) => {
|
|
|
46
47
|
};
|
|
47
48
|
/**
|
|
48
49
|
* Gets the git status of the repository.
|
|
50
|
+
*
|
|
49
51
|
* @returns An object containing status information.
|
|
50
52
|
*/
|
|
51
53
|
const getGitStatus = async (options) => {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"assert-repo-is-clean.mjs","sources":["../../src/functions/assert-repo-is-clean.mts"],"sourcesContent":[null],"names":[],"mappings":";;;AAGA
|
|
1
|
+
{"version":3,"file":"assert-repo-is-clean.mjs","sources":["../../src/functions/assert-repo-is-clean.mts"],"sourcesContent":[null],"names":[],"mappings":";;;AAGA;;;;;AAKG;MACU,WAAW,GAAG,OACzB,OAAwC,KACpB;AACpB,IAAA,MAAM,MAAM,GAAG,MAAM,YAAY,CAAC,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,IAAI,KAAK,EAAE,CAAC;IACvE,OAAO,MAAM,CAAC,OAAO;AACvB;AAEA;;;AAGG;MACU,iBAAiB,GAAG,OAC/B,OAAwC,KACvB;AACjB,IAAA,IAAI;AACF,QAAA,MAAM,MAAM,GAAG,MAAM,YAAY,CAAC,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,IAAI,KAAK,EAAE,CAAC;AAEvE,QAAA,IAAI,CAAC,MAAM,CAAC,OAAO,EAAE;YACnB,IAAI,CAAC,iBAAiB,CAAC;YACvB;QACF;QAEA,IAAI,CAAC,iBAAiB,CAAC;QACvB,IAAI,CAAC,kBAAkB,CAAC;AACxB,QAAA,IAAI,CAAC,MAAM,CAAC,MAAM,CAAC;;AAGnB,QAAA,MAAM,SAAS,GAAG,MAAM,CAAC,CAAC,cAAc,EAAE;AACxC,YAAA,MAAM,EAAE,OAAO,EAAE,MAAM,IAAI,KAAK;AACjC,SAAA,CAAC;AACF,QAAA,IAAI,MAAM,CAAC,KAAK,CAAC,SAAS,CAAC,EAAE;YAC3B,IAAI,CAAC,mDAAmD,CAAC;QAC3D;AAEA,QAAA,MAAM,UAAU,GAAG,MAAM,CAAC,CAAC,UAAU,EAAE;AACrC,YAAA,MAAM,EAAE,OAAO,EAAE,MAAM,IAAI,KAAK;AACjC,SAAA,CAAC;AACF,QAAA,IAAI,MAAM,CAAC,KAAK,CAAC,UAAU,CAAC,EAAE;YAC5B,IAAI,CAAC,gCAAgC,CAAC;QACxC;AAEA,QAAA,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC;IACjB;IAAE,OAAO,KAAK,EAAE;QACd,IAAI,CAAC,qCAAqC,MAAM,CAAC,KAAK,CAAC,CAAA,EAAA,CAAI,CAAC;AAC5D,QAAA,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC;IACjB;AACF;AAEA;;;;AAIG;AACH,MAAM,YAAY,GAAG,OACnB,OAAwC,KAIrC;AACH,IAAA,MAAM,GAAG,GAAG,MAAM,CAAC,CAAC,wBAAwB,EAAE;AAC5C,QAAA,MAAM,EAAE,OAAO,EAAE,MAAM,IAAI,KAAK;AACjC,KAAA,CAAC;AAEF,IAAA,IAAI,MAAM,CAAC,KAAK,CAAC,GAAG,CAAC,EAAE;QACrB,MAAM,IAAI,KAAK,CAAC,CAAA,0BAAA,EAA6B,GAAG,CAAC,KAAK,CAAC,OAAO,CAAA,CAAE,CAAC;IACnE;AAEA,IAAA,MAAM,EAAE,MAAM,EAAE,GAAG,GAAG,CAAC,KAAK;IAE5B,OAAO;AACL,QAAA,OAAO,EAAE,MAAM,CAAC,IAAI,EAAE,KAAK,EAAE;QAC7B,MAAM;KACP;AACH,CAAC;;;;"}
|
|
@@ -1,9 +1,7 @@
|
|
|
1
1
|
import { type ExecException } from 'node:child_process';
|
|
2
2
|
import { Result } from 'ts-data-forge';
|
|
3
3
|
import '../node-global.mjs';
|
|
4
|
-
/**
|
|
5
|
-
* Get files that have been changed (git status).
|
|
6
|
-
*/
|
|
4
|
+
/** Get files that have been changed (git status). */
|
|
7
5
|
export declare const getUntrackedFiles: (options?: Readonly<{
|
|
8
6
|
/** @default true */
|
|
9
7
|
excludeDeleted?: boolean;
|
|
@@ -12,9 +10,7 @@ export declare const getUntrackedFiles: (options?: Readonly<{
|
|
|
12
10
|
}>) => Promise<Result<readonly string[], ExecException | Readonly<{
|
|
13
11
|
message: string;
|
|
14
12
|
}>>>;
|
|
15
|
-
/**
|
|
16
|
-
* Get files that differ from the specified base branch or commit
|
|
17
|
-
*/
|
|
13
|
+
/** Get files that differ from the specified base branch or commit */
|
|
18
14
|
export declare const getDiffFrom: (base: string, options?: Readonly<{
|
|
19
15
|
/** @default true */
|
|
20
16
|
excludeDeleted?: boolean;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"diff.d.mts","sourceRoot":"","sources":["../../src/functions/diff.mts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,aAAa,EAAE,MAAM,oBAAoB,CAAC;AACxD,OAAO,EAAE,MAAM,EAAE,MAAM,eAAe,CAAC;AACvC,OAAO,oBAAoB,CAAC;AAE5B
|
|
1
|
+
{"version":3,"file":"diff.d.mts","sourceRoot":"","sources":["../../src/functions/diff.mts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,aAAa,EAAE,MAAM,oBAAoB,CAAC;AACxD,OAAO,EAAE,MAAM,EAAE,MAAM,eAAe,CAAC;AACvC,OAAO,oBAAoB,CAAC;AAE5B,qDAAqD;AACrD,eAAO,MAAM,iBAAiB,GAC5B,UAAU,QAAQ,CAAC;IACjB,oBAAoB;IACpB,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,qBAAqB;IACrB,MAAM,CAAC,EAAE,OAAO,CAAC;CAClB,CAAC,KACD,OAAO,CACR,MAAM,CAAC,SAAS,MAAM,EAAE,EAAE,aAAa,GAAG,QAAQ,CAAC;IAAE,OAAO,EAAE,MAAM,CAAA;CAAE,CAAC,CAAC,CA2BzE,CAAC;AAEF,qEAAqE;AACrE,eAAO,MAAM,WAAW,GACtB,MAAM,MAAM,EACZ,UAAU,QAAQ,CAAC;IACjB,oBAAoB;IACpB,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,qBAAqB;IACrB,MAAM,CAAC,EAAE,OAAO,CAAC;CAClB,CAAC,KACD,OAAO,CACR,MAAM,CAAC,SAAS,MAAM,EAAE,EAAE,aAAa,GAAG,QAAQ,CAAC;IAAE,OAAO,EAAE,MAAM,CAAA;CAAE,CAAC,CAAC,CA2BzE,CAAC"}
|
package/dist/functions/diff.mjs
CHANGED
|
@@ -1,9 +1,7 @@
|
|
|
1
1
|
import { Result } from 'ts-data-forge';
|
|
2
2
|
import '../node-global.mjs';
|
|
3
3
|
|
|
4
|
-
/**
|
|
5
|
-
* Get files that have been changed (git status).
|
|
6
|
-
*/
|
|
4
|
+
/** Get files that have been changed (git status). */
|
|
7
5
|
const getUntrackedFiles = async (options) => {
|
|
8
6
|
// Get changed files from git status
|
|
9
7
|
const result = await $([
|
|
@@ -24,9 +22,7 @@ const getUntrackedFiles = async (options) => {
|
|
|
24
22
|
.filter((s) => s !== '');
|
|
25
23
|
return Result.ok(files);
|
|
26
24
|
};
|
|
27
|
-
/**
|
|
28
|
-
* Get files that differ from the specified base branch or commit
|
|
29
|
-
*/
|
|
25
|
+
/** Get files that differ from the specified base branch or commit */
|
|
30
26
|
const getDiffFrom = async (base, options) => {
|
|
31
27
|
// Get files that differ from base branch/commit (excluding deleted files)
|
|
32
28
|
const result = await $([
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"diff.mjs","sources":["../../src/functions/diff.mts"],"sourcesContent":[null],"names":[],"mappings":";;;AAIA
|
|
1
|
+
{"version":3,"file":"diff.mjs","sources":["../../src/functions/diff.mts"],"sourcesContent":[null],"names":[],"mappings":";;;AAIA;MACa,iBAAiB,GAAG,OAC/B,OAKE,KAGA;;AAEF,IAAA,MAAM,MAAM,GAAG,MAAM,CAAC,CACpB;QACE,CAAA,wCAAA,CAA0C;;AAE1C,QAAA,CAAC,OAAO,EAAE,cAAc,IAAI,IAAI,IAAI,EAAE,GAAG,WAAW;AACrD;SACE,MAAM,CAAC,CAAC,CAAC,KAAK,CAAC,KAAK,EAAE;AACtB,SAAA,IAAI,CAAC,GAAG,CAAC,EACZ,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,IAAI,KAAK,EAAE,CACrC;AAED,IAAA,IAAI,MAAM,CAAC,KAAK,CAAC,MAAM,CAAC,EAAE;AACxB,QAAA,OAAO,MAAM;IACf;AAEA,IAAA,MAAM,EAAE,MAAM,EAAE,GAAG,MAAM,CAAC,KAAK;;IAG/B,MAAM,KAAK,GAAG;SACX,KAAK,CAAC,IAAI;SACV,GAAG,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,IAAI,EAAE;SACnB,MAAM,CAAC,CAAC,CAAC,KAAK,CAAC,KAAK,EAAE,CAAC;AAE1B,IAAA,OAAO,MAAM,CAAC,EAAE,CAAC,KAAK,CAAC;AACzB;AAEA;AACO,MAAM,WAAW,GAAG,OACzB,IAAY,EACZ,OAKE,KAGA;;AAEF,IAAA,MAAM,MAAM,GAAG,MAAM,CAAC,CACpB;QACE,CAAA,oBAAA,CAAsB;QACtB,IAAI;AACJ,QAAA,CAAC,OAAO,EAAE,cAAc,IAAI,IAAI,IAAI,iBAAiB,GAAG,EAAE;AAC3D;SACE,MAAM,CAAC,CAAC,CAAC,KAAK,CAAC,KAAK,EAAE;AACtB,SAAA,IAAI,CAAC,GAAG,CAAC,EACZ,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,IAAI,KAAK,EAAE,CACrC;AAED,IAAA,IAAI,MAAM,CAAC,KAAK,CAAC,MAAM,CAAC,EAAE;AACxB,QAAA,OAAO,MAAM;IACf;AAEA,IAAA,MAAM,EAAE,MAAM,EAAE,GAAG,MAAM,CAAC,KAAK;;IAG/B,MAAM,KAAK,GAAG;SACX,KAAK,CAAC,IAAI;SACV,GAAG,CAAC,CAAC,IAAI,KAAK,IAAI,CAAC,IAAI,EAAE;SACzB,MAAM,CAAC,CAAC,IAAI,KAAK,IAAI,KAAK,EAAE,CAAC;AAEhC,IAAA,OAAO,MAAM,CAAC,EAAE,CAAC,KAAK,CAAC;AACzB;;;;"}
|
|
@@ -2,6 +2,7 @@ import { type ExecException } from 'node:child_process';
|
|
|
2
2
|
import { Result } from 'ts-data-forge';
|
|
3
3
|
/**
|
|
4
4
|
* Executes a shell command asynchronously.
|
|
5
|
+
*
|
|
5
6
|
* @param cmd - The command to execute.
|
|
6
7
|
* @param options - Optional configuration for command execution.
|
|
7
8
|
* @returns A promise that resolves with the command result.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"exec-async.d.mts","sourceRoot":"","sources":["../../src/functions/exec-async.mts"],"names":[],"mappings":"AAAA,OAAO,EAAQ,KAAK,aAAa,EAAE,MAAM,oBAAoB,CAAC;AAC9D,OAAO,EAAE,MAAM,EAAE,MAAM,eAAe,CAAC;AAEvC
|
|
1
|
+
{"version":3,"file":"exec-async.d.mts","sourceRoot":"","sources":["../../src/functions/exec-async.mts"],"names":[],"mappings":"AAAA,OAAO,EAAQ,KAAK,aAAa,EAAE,MAAM,oBAAoB,CAAC;AAC9D,OAAO,EAAE,MAAM,EAAE,MAAM,eAAe,CAAC;AAEvC;;;;;;GAMG;AACH,eAAO,MAAM,CAAC,GACZ,KAAK,MAAM,EACX,UAAS,QAAQ,CAAC;IAAE,MAAM,CAAC,EAAE,OAAO,CAAC;IAAC,OAAO,CAAC,EAAE,MAAM,CAAA;CAAE,CAAM,KAC7D,OAAO,CACR,MAAM,CAAC,QAAQ,CAAC;IAAE,MAAM,EAAE,MAAM,CAAC;IAAC,MAAM,EAAE,MAAM,CAAA;CAAE,CAAC,EAAE,aAAa,CAAC,CA6BpE,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"exec-async.mjs","sources":["../../src/functions/exec-async.mts"],"sourcesContent":[null],"names":[],"mappings":";;;AAGA
|
|
1
|
+
{"version":3,"file":"exec-async.mjs","sources":["../../src/functions/exec-async.mts"],"sourcesContent":[null],"names":[],"mappings":";;;AAGA;;;;;;AAMG;AACI,MAAM,CAAC,GAAG,CACf,GAAW,EACX,OAAA,GAA4D,EAAE,KAG5D;IACF,MAAM,EAAE,MAAM,GAAG,KAAK,EAAE,OAAO,GAAG,KAAK,EAAE,GAAG,OAAO;IAEnD,IAAI,CAAC,MAAM,EAAE;AACX,QAAA,IAAI,CAAC,CAAA,EAAA,EAAK,GAAG,CAAA,CAAE,CAAC;IAClB;AAEA,IAAA,OAAO,IAAI,OAAO,CAAC,CAAC,OAAO,KAAI;AAC7B,QAAA,MAAM,WAAW,GAAG,EAAE,OAAO,EAAE;;AAG/B,QAAA,IAAI,CAAC,GAAG,EAAE,WAAW,EAAE,CAAC,KAAK,EAAE,MAAM,EAAE,MAAM,KAAI;YAC/C,IAAI,CAAC,MAAM,EAAE;AACX,gBAAA,IAAI,MAAM,KAAK,EAAE,EAAE;oBACjB,IAAI,CAAC,MAAM,CAAC;gBACd;AACA,gBAAA,IAAI,MAAM,KAAK,EAAE,EAAE;AACjB,oBAAA,OAAO,CAAC,KAAK,CAAC,MAAM,CAAC;gBACvB;YACF;AAEA,YAAA,IAAI,KAAK,KAAK,IAAI,EAAE;gBAClB,OAAO,CAAC,MAAM,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC;YAC5B;iBAAO;AACL,gBAAA,OAAO,CAAC,MAAM,CAAC,EAAE,CAAC,EAAE,MAAM,EAAE,MAAM,EAAE,CAAC,CAAC;YACxC;AACF,QAAA,CAAC,CAAC;AACJ,IAAA,CAAC,CAAC;AACJ;;;;"}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import '../node-global.mjs';
|
|
2
2
|
/**
|
|
3
3
|
* Format a list of files using Prettier
|
|
4
|
+
*
|
|
4
5
|
* @param files - Array of file paths to format
|
|
5
6
|
* @returns 'ok' if successful, 'err' if any errors occurred
|
|
6
7
|
*/
|
|
@@ -9,6 +10,7 @@ export declare const formatFilesList: (files: readonly string[], options?: Reado
|
|
|
9
10
|
}>) => Promise<"ok" | "err">;
|
|
10
11
|
/**
|
|
11
12
|
* Format files matching the given glob pattern using Prettier
|
|
13
|
+
*
|
|
12
14
|
* @param pathGlob - Glob pattern to match files
|
|
13
15
|
* @returns 'ok' if successful, 'err' if any errors occurred
|
|
14
16
|
*/
|
|
@@ -17,6 +19,7 @@ export declare const formatFiles: (pathGlob: string, options?: Readonly<{
|
|
|
17
19
|
}>) => Promise<"ok" | "err">;
|
|
18
20
|
/**
|
|
19
21
|
* Format only files that have been changed (git status)
|
|
22
|
+
*
|
|
20
23
|
* @param options - Options for formatting
|
|
21
24
|
* @returns 'ok' if successful, 'err' if any errors occurred
|
|
22
25
|
*/
|
|
@@ -25,10 +28,14 @@ export declare const formatUntracked: (options?: Readonly<{
|
|
|
25
28
|
}>) => Promise<"ok" | "err">;
|
|
26
29
|
/**
|
|
27
30
|
* Format only files that differ from the specified base branch or commit
|
|
28
|
-
*
|
|
31
|
+
*
|
|
32
|
+
* @param base - Base branch name or commit hash to compare against (defaults to
|
|
33
|
+
* 'main')
|
|
29
34
|
* @param options - Options for formatting
|
|
30
|
-
* @param options.includeUntracked - Include untracked files in addition to diff
|
|
31
|
-
*
|
|
35
|
+
* @param options.includeUntracked - Include untracked files in addition to diff
|
|
36
|
+
* files (default is true)
|
|
37
|
+
* @param options.silent - Silent mode to suppress command output (default is
|
|
38
|
+
* false)
|
|
32
39
|
* @returns 'ok' if successful, 'err' if any errors occurred
|
|
33
40
|
*/
|
|
34
41
|
export declare const formatDiffFrom: (base: string, options?: Readonly<{
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"format.d.mts","sourceRoot":"","sources":["../../src/functions/format.mts"],"names":[],"mappings":"AAEA,OAAO,oBAAoB,CAAC;AAG5B
|
|
1
|
+
{"version":3,"file":"format.d.mts","sourceRoot":"","sources":["../../src/functions/format.mts"],"names":[],"mappings":"AAEA,OAAO,oBAAoB,CAAC;AAG5B;;;;;GAKG;AACH,eAAO,MAAM,eAAe,GAC1B,OAAO,SAAS,MAAM,EAAE,EACxB,UAAU,QAAQ,CAAC;IAAE,MAAM,CAAC,EAAE,OAAO,CAAA;CAAE,CAAC,KACvC,OAAO,CAAC,IAAI,GAAG,KAAK,CA2DtB,CAAC;AAEF;;;;;GAKG;AACH,eAAO,MAAM,WAAW,GACtB,UAAU,MAAM,EAChB,UAAU,QAAQ,CAAC;IAAE,MAAM,CAAC,EAAE,OAAO,CAAA;CAAE,CAAC,KACvC,OAAO,CAAC,IAAI,GAAG,KAAK,CAuBtB,CAAC;AAEF;;;;;GAKG;AACH,eAAO,MAAM,eAAe,GAC1B,UAAU,QAAQ,CAAC;IAAE,MAAM,CAAC,EAAE,OAAO,CAAA;CAAE,CAAC,KACvC,OAAO,CAAC,IAAI,GAAG,KAAK,CAqDtB,CAAC;AAEF;;;;;;;;;;;GAWG;AACH,eAAO,MAAM,cAAc,GACzB,MAAM,MAAM,EACZ,UAAU,QAAQ,CAAC;IAAE,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAAC,MAAM,CAAC,EAAE,OAAO,CAAA;CAAE,CAAC,KACnE,OAAO,CAAC,IAAI,GAAG,KAAK,CA4DtB,CAAC"}
|
|
@@ -5,6 +5,7 @@ import { getUntrackedFiles, getDiffFrom } from './diff.mjs';
|
|
|
5
5
|
|
|
6
6
|
/**
|
|
7
7
|
* Format a list of files using Prettier
|
|
8
|
+
*
|
|
8
9
|
* @param files - Array of file paths to format
|
|
9
10
|
* @returns 'ok' if successful, 'err' if any errors occurred
|
|
10
11
|
*/
|
|
@@ -60,6 +61,7 @@ const formatFilesList = async (files, options) => {
|
|
|
60
61
|
};
|
|
61
62
|
/**
|
|
62
63
|
* Format files matching the given glob pattern using Prettier
|
|
64
|
+
*
|
|
63
65
|
* @param pathGlob - Glob pattern to match files
|
|
64
66
|
* @returns 'ok' if successful, 'err' if any errors occurred
|
|
65
67
|
*/
|
|
@@ -87,6 +89,7 @@ const formatFiles = async (pathGlob, options) => {
|
|
|
87
89
|
};
|
|
88
90
|
/**
|
|
89
91
|
* Format only files that have been changed (git status)
|
|
92
|
+
*
|
|
90
93
|
* @param options - Options for formatting
|
|
91
94
|
* @returns 'ok' if successful, 'err' if any errors occurred
|
|
92
95
|
*/
|
|
@@ -135,10 +138,14 @@ const formatUntracked = async (options) => {
|
|
|
135
138
|
};
|
|
136
139
|
/**
|
|
137
140
|
* Format only files that differ from the specified base branch or commit
|
|
138
|
-
*
|
|
141
|
+
*
|
|
142
|
+
* @param base - Base branch name or commit hash to compare against (defaults to
|
|
143
|
+
* 'main')
|
|
139
144
|
* @param options - Options for formatting
|
|
140
|
-
* @param options.includeUntracked - Include untracked files in addition to diff
|
|
141
|
-
*
|
|
145
|
+
* @param options.includeUntracked - Include untracked files in addition to diff
|
|
146
|
+
* files (default is true)
|
|
147
|
+
* @param options.silent - Silent mode to suppress command output (default is
|
|
148
|
+
* false)
|
|
142
149
|
* @returns 'ok' if successful, 'err' if any errors occurred
|
|
143
150
|
*/
|
|
144
151
|
const formatDiffFrom = async (base, options) => {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"format.mjs","sources":["../../src/functions/format.mts"],"sourcesContent":[null],"names":[],"mappings":";;;;;AAKA
|
|
1
|
+
{"version":3,"file":"format.mjs","sources":["../../src/functions/format.mts"],"sourcesContent":[null],"names":[],"mappings":";;;;;AAKA;;;;;AAKG;AACI,MAAM,eAAe,GAAG,OAC7B,KAAwB,EACxB,OAAwC,KACf;AACzB,IAAA,MAAM,MAAM,GAAG,OAAO,EAAE,MAAM,IAAI,KAAK;AAEvC,IAAA,IAAI,KAAK,CAAC,MAAM,KAAK,CAAC,EAAE;QACtB,IAAI,CAAC,MAAM,EAAE;YACX,IAAI,CAAC,oBAAoB,CAAC;QAC5B;AACA,QAAA,OAAO,IAAI;IACb;IAEA,IAAI,CAAC,MAAM,EAAE;AACX,QAAA,IAAI,CAAC,CAAA,WAAA,EAAc,KAAK,CAAC,MAAM,CAAA,SAAA,CAAW,CAAC;IAC7C;;AAGA,IAAA,MAAM,OAAO,GAAG,MAAM,OAAO,CAAC,UAAU,CACtC,KAAK,CAAC,GAAG,CAAC,OAAO,QAAQ,KAAI;AAC3B,QAAA,IAAI;;YAEF,MAAM,OAAO,GAAG,MAAM,EAAE,CAAC,QAAQ,CAAC,QAAQ,EAAE,MAAM,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C,IAAI,YAAY,GAAG,SAAS;;AAG5B,QAAA,IAAI,OAAO,EAAE,gBAAgB,IAAI,IAAI,EAAE;AACrC,YAAA,MAAM,oBAAoB,GAAG,MAAM,iBAAiB,CAAC;gBACnD,MAAM;AACP,aAAA,CAAC;AAEF,YAAA,IAAI,MAAM,CAAC,KAAK,CAAC,oBAAoB,CAAC,EAAE;gBACtC,OAAO,CAAC,KAAK,CACX,gCAAgC,EAChC,oBAAoB,CAAC,KAAK,CAC3B;AACD,gBAAA,OAAO,KAAK;YACd;AAEA,YAAA,MAAM,cAAc,GAAG,oBAAoB,CAAC,KAAK;;AAGjD,YAAA,YAAY,GAAG,GAAG,CAAC,IAAI,CAAC,CAAC,GAAG,SAAS,EAAE,GAAG,cAAc,CAAC,CAAC;YAE1D,IAAI,CAAC,MAAM,EAAE;AACX,gBAAA,IAAI,CACF,CAAA,kCAAA,EAAqC,IAAI,uBAAuB,EAChE,YAAY,CACb;YACH;QACF;aAAO;YACL,IAAI,CAAC,MAAM,EAAE;AACX,gBAAA,IAAI,CAAC,CAAA,kCAAA,EAAqC,IAAI,GAAG,EAAE,YAAY,CAAC;YAClE;QACF;AAEA,QAAA,IAAI,YAAY,CAAC,MAAM,KAAK,CAAC,EAAE;YAC7B,IAAI,CAAC,MAAM,EAAE;gBACX,IAAI,CAAC,CAAA,kBAAA,CAAoB,CAAC;YAC5B;AACA,YAAA,OAAO,IAAI;QACb;QAEA,OAAO,MAAM,eAAe,CAAC,YAAY,EAAE,EAAE,MAAM,EAAE,CAAC;IACxD;IAAE,OAAO,KAAK,EAAE;AACd,QAAA,OAAO,CAAC,KAAK,CAAC,0BAA0B,EAAE,KAAK,CAAC;AAChD,QAAA,OAAO,KAAK;IACd;AACF;;;;"}
|
|
@@ -1,11 +1,23 @@
|
|
|
1
1
|
import '../node-global.mjs';
|
|
2
|
-
/**
|
|
3
|
-
* Configuration for index file generation.
|
|
4
|
-
*/
|
|
2
|
+
/** Configuration for index file generation. */
|
|
5
3
|
export type GenIndexConfig = DeepReadonly<{
|
|
6
4
|
/** Target directories to generate index files for (string or array of strings) */
|
|
7
5
|
targetDirectory: string | readonly string[];
|
|
8
|
-
/**
|
|
6
|
+
/**
|
|
7
|
+
* Glob patterns of files or predicate function to exclude from exports
|
|
8
|
+
* (default: excludes `'**\/*.{test,spec}.?(c|m)[jt]s?(x)'`)
|
|
9
|
+
*/
|
|
10
|
+
exclude?: readonly string[] | ((args: Readonly<{
|
|
11
|
+
absolutePath: string;
|
|
12
|
+
relativePath: string;
|
|
13
|
+
fileName: string;
|
|
14
|
+
}>) => boolean);
|
|
15
|
+
/**
|
|
16
|
+
* Glob patterns of files or predicate function to exclude from exports
|
|
17
|
+
* (default: excludes `'**\/*.{test,spec}.?(c|m)[jt]s?(x)'`)
|
|
18
|
+
*
|
|
19
|
+
* @deprecated Use `exclude` instead.
|
|
20
|
+
*/
|
|
9
21
|
excludePatterns?: readonly string[];
|
|
10
22
|
/** File extensions of source files to export (default: ['.ts', '.tsx']) */
|
|
11
23
|
sourceExtensions?: readonly `.${string}`[];
|
|
@@ -13,13 +25,14 @@ export type GenIndexConfig = DeepReadonly<{
|
|
|
13
25
|
indexExtension?: `.${string}`;
|
|
14
26
|
/** File extension to use in export statements (default: '.js') */
|
|
15
27
|
exportExtension?: `.${string}` | 'none';
|
|
16
|
-
/** Command to run for formatting generated files (
|
|
28
|
+
/** Command to run for formatting generated files (optional) */
|
|
17
29
|
formatCommand?: string;
|
|
18
30
|
/** Whether to suppress output during execution (default: false) */
|
|
19
31
|
silent?: boolean;
|
|
20
32
|
}>;
|
|
21
33
|
/**
|
|
22
34
|
* Generates index.ts files recursively in `config.targetDirectory`.
|
|
35
|
+
*
|
|
23
36
|
* @param config - Configuration for index file generation
|
|
24
37
|
* @throws Error if any step fails.
|
|
25
38
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"gen-index.d.mts","sourceRoot":"","sources":["../../src/functions/gen-index.mts"],"names":[],"mappings":"AAEA,OAAO,oBAAoB,CAAC;AAG5B
|
|
1
|
+
{"version":3,"file":"gen-index.d.mts","sourceRoot":"","sources":["../../src/functions/gen-index.mts"],"names":[],"mappings":"AAEA,OAAO,oBAAoB,CAAC;AAG5B,+CAA+C;AAC/C,MAAM,MAAM,cAAc,GAAG,YAAY,CAAC;IACxC,kFAAkF;IAClF,eAAe,EAAE,MAAM,GAAG,SAAS,MAAM,EAAE,CAAC;IAE5C;;;OAGG;IACH,OAAO,CAAC,EACJ,SAAS,MAAM,EAAE,GACjB,CAAC,CACC,IAAI,EAAE,QAAQ,CAAC;QACb,YAAY,EAAE,MAAM,CAAC;QACrB,YAAY,EAAE,MAAM,CAAC;QACrB,QAAQ,EAAE,MAAM,CAAC;KAClB,CAAC,KACC,OAAO,CAAC,CAAC;IAElB;;;;;OAKG;IACH,eAAe,CAAC,EAAE,SAAS,MAAM,EAAE,CAAC;IAEpC,2EAA2E;IAC3E,gBAAgB,CAAC,EAAE,SAAS,IAAI,MAAM,EAAE,EAAE,CAAC;IAE3C,iEAAiE;IACjE,cAAc,CAAC,EAAE,IAAI,MAAM,EAAE,CAAC;IAE9B,kEAAkE;IAClE,eAAe,CAAC,EAAE,IAAI,MAAM,EAAE,GAAG,MAAM,CAAC;IAExC,+DAA+D;IAC/D,aAAa,CAAC,EAAE,MAAM,CAAC;IAEvB,mEAAmE;IACnE,MAAM,CAAC,EAAE,OAAO,CAAC;CAClB,CAAC,CAAC;AAkBH;;;;;GAKG;AACH,eAAO,MAAM,QAAQ,GAAU,QAAQ,cAAc,KAAG,OAAO,CAAC,IAAI,CA8CnE,CAAC"}
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
import micromatch from 'micromatch';
|
|
2
|
-
import { Result, ISet, Arr, isString } from 'ts-data-forge';
|
|
2
|
+
import { Result, ISet, pipe, Arr, isString } from 'ts-data-forge';
|
|
3
3
|
import '../node-global.mjs';
|
|
4
4
|
import { assertPathExists } from './assert-path-exists.mjs';
|
|
5
5
|
|
|
6
6
|
/**
|
|
7
7
|
* Generates index.ts files recursively in `config.targetDirectory`.
|
|
8
|
+
*
|
|
8
9
|
* @param config - Configuration for index file generation
|
|
9
10
|
* @throws Error if any step fails.
|
|
10
11
|
*/
|
|
@@ -49,17 +50,6 @@ const genIndex = async (config) => {
|
|
|
49
50
|
throw error;
|
|
50
51
|
}
|
|
51
52
|
};
|
|
52
|
-
/**
|
|
53
|
-
* Fills the configuration with default values.
|
|
54
|
-
* Default values:
|
|
55
|
-
* - sourceExtensions: ['.ts']
|
|
56
|
-
* - indexExtension: '.ts'
|
|
57
|
-
* - exportExtension: '.js'
|
|
58
|
-
* - excludePatterns: ['**\/*.{test,spec}.?(c|m)[jt]s?(x)']
|
|
59
|
-
* - silent: false
|
|
60
|
-
* @param config - The input configuration object.
|
|
61
|
-
* @returns The configuration object with all required properties filled with defaults.
|
|
62
|
-
*/
|
|
63
53
|
const fillConfig = (config) => {
|
|
64
54
|
const sourceExtensions = config.sourceExtensions ?? ['.ts'];
|
|
65
55
|
const exportExtension = config.exportExtension ?? '.js'; // For ESM imports, .mts resolves to .mjs
|
|
@@ -68,12 +58,23 @@ const fillConfig = (config) => {
|
|
|
68
58
|
targetDirectory: ISet.create(isString(config.targetDirectory)
|
|
69
59
|
? [config.targetDirectory]
|
|
70
60
|
: config.targetDirectory),
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
61
|
+
// eslint-disable-next-line @typescript-eslint/no-deprecated
|
|
62
|
+
exclude: pipe(config.exclude ?? config.excludePatterns).map((exclude) => typeof exclude === 'function'
|
|
63
|
+
? exclude
|
|
64
|
+
: pipe(ISet.create(Arr.generate(function* () {
|
|
65
|
+
if (exclude !== undefined && Array.isArray(exclude)) {
|
|
66
|
+
yield* exclude;
|
|
67
|
+
}
|
|
68
|
+
yield '**/*.{test,spec}.?(c|m)[jt]s?(x)';
|
|
69
|
+
}))).map((set) => ({ relativePath, fileName, }) => {
|
|
70
|
+
for (const pattern of set.values()) {
|
|
71
|
+
if (micromatch.isMatch(relativePath, pattern) ||
|
|
72
|
+
micromatch.isMatch(fileName, pattern)) {
|
|
73
|
+
return true;
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
return false;
|
|
77
|
+
}).value).value,
|
|
77
78
|
sourceExtensions: ISet.create(sourceExtensions),
|
|
78
79
|
indexExtension: config.indexExtension ?? '.ts',
|
|
79
80
|
exportExtension,
|
|
@@ -81,11 +82,13 @@ const fillConfig = (config) => {
|
|
|
81
82
|
};
|
|
82
83
|
};
|
|
83
84
|
/**
|
|
84
|
-
* Generates an index.ts file for the given directory.
|
|
85
|
-
*
|
|
85
|
+
* Generates an index.ts file for the given directory. Recursively calls itself
|
|
86
|
+
* for subdirectories.
|
|
87
|
+
*
|
|
86
88
|
* @param dirPath - The absolute path to the directory to process.
|
|
87
89
|
* @param config - The merged configuration object.
|
|
88
|
-
* @param baseDir - The base directory path for calculating relative paths
|
|
90
|
+
* @param baseDir - The base directory path for calculating relative paths
|
|
91
|
+
* (optional, defaults to dirPath).
|
|
89
92
|
* @throws Error if directory processing fails.
|
|
90
93
|
*/
|
|
91
94
|
const generateIndexFileForDir = async (dirPath, config, baseDir) => {
|
|
@@ -98,8 +101,11 @@ const generateIndexFileForDir = async (dirPath, config, baseDir) => {
|
|
|
98
101
|
const entryName = entry.name;
|
|
99
102
|
const entryPath = path.join(dirPath, entryName);
|
|
100
103
|
const relativePath = path.relative(actualBaseDir, entryPath);
|
|
101
|
-
if (config.
|
|
102
|
-
|
|
104
|
+
if (config.exclude({
|
|
105
|
+
absolutePath: entryPath,
|
|
106
|
+
relativePath,
|
|
107
|
+
fileName: entryName,
|
|
108
|
+
})) {
|
|
103
109
|
continue; // Skip excluded directories/files
|
|
104
110
|
}
|
|
105
111
|
if (entry.isDirectory()) {
|
|
@@ -108,7 +114,12 @@ const generateIndexFileForDir = async (dirPath, config, baseDir) => {
|
|
|
108
114
|
// eslint-disable-next-line no-await-in-loop
|
|
109
115
|
await generateIndexFileForDir(entryPath, config, actualBaseDir);
|
|
110
116
|
}
|
|
111
|
-
else if (entry.isFile() &&
|
|
117
|
+
else if (entry.isFile() &&
|
|
118
|
+
shouldExportFile({
|
|
119
|
+
absolutePath: entryPath,
|
|
120
|
+
filePath: relativePath,
|
|
121
|
+
config,
|
|
122
|
+
})) {
|
|
112
123
|
mut_filesToExport.push(entryName);
|
|
113
124
|
}
|
|
114
125
|
}
|
|
@@ -123,16 +134,19 @@ const generateIndexFileForDir = async (dirPath, config, baseDir) => {
|
|
|
123
134
|
};
|
|
124
135
|
const indexRegex = /^index\.[cm]?[jt]s[x]?$/u;
|
|
125
136
|
/**
|
|
126
|
-
* Determines if a file should be exported in the index file.
|
|
127
|
-
*
|
|
137
|
+
* Determines if a file should be exported in the index file. A file is exported
|
|
138
|
+
* if:
|
|
139
|
+
*
|
|
128
140
|
* - It has one of the configured source extensions
|
|
129
141
|
* - It's not an index file itself
|
|
130
142
|
* - It doesn't match any exclusion patterns
|
|
143
|
+
*
|
|
131
144
|
* @param filePath - The relative path to the file from the target directory.
|
|
145
|
+
* @param absolutePath - The absolute path to the file.
|
|
132
146
|
* @param config - The merged configuration object.
|
|
133
147
|
* @returns True if the file should be exported.
|
|
134
148
|
*/
|
|
135
|
-
const shouldExportFile = (filePath, config) => {
|
|
149
|
+
const shouldExportFile = ({ absolutePath, filePath, config, }) => {
|
|
136
150
|
const fileName = path.basename(filePath);
|
|
137
151
|
const ext = path.extname(fileName);
|
|
138
152
|
// Must have the correct source extension
|
|
@@ -145,16 +159,18 @@ const shouldExportFile = (filePath, config) => {
|
|
|
145
159
|
return false;
|
|
146
160
|
}
|
|
147
161
|
// Check against exclusion patterns
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
162
|
+
if (config.exclude({
|
|
163
|
+
absolutePath,
|
|
164
|
+
relativePath: filePath,
|
|
165
|
+
fileName,
|
|
166
|
+
})) {
|
|
167
|
+
return false;
|
|
153
168
|
}
|
|
154
169
|
return true;
|
|
155
170
|
};
|
|
156
171
|
/**
|
|
157
172
|
* Generates the content for an index file.
|
|
173
|
+
*
|
|
158
174
|
* @param subDirectories - Array of subdirectory names.
|
|
159
175
|
* @param filesToExport - Array of file names to export.
|
|
160
176
|
* @param config - The merged configuration object.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"gen-index.mjs","sources":["../../src/functions/gen-index.mts"],"sourcesContent":[null],"names":[],"mappings":";;;;;
|
|
1
|
+
{"version":3,"file":"gen-index.mjs","sources":["../../src/functions/gen-index.mts"],"sourcesContent":[null],"names":[],"mappings":";;;;;AAgEA;;;;;AAKG;MACU,QAAQ,GAAG,OAAO,MAAsB,KAAmB;IACtE,IAAI,CAAC,qCAAqC,CAAC;;AAG3C,IAAA,MAAM,YAAY,GAA2B,UAAU,CAAC,MAAM,CAAC;;AAG/D,IAAA,MAAM,UAAU,GACd,OAAO,MAAM,CAAC,eAAe,KAAK;AAChC,UAAE,CAAC,MAAM,CAAC,eAAe;AACzB,UAAE,MAAM,CAAC,eAAe;AAE5B,IAAA,IAAI;;AAEF,QAAA,KAAK,MAAM,GAAG,IAAI,UAAU,EAAE;YAC5B,MAAM,WAAW,GAAG,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC;;YAErC,MAAM,gBAAgB,CAAC,WAAW,EAAE,qBAAqB,GAAG,CAAA,CAAE,CAAC;QACjE;;QAGA,IAAI,CAAC,2BAA2B,CAAC;AACjC,QAAA,KAAK,MAAM,GAAG,IAAI,UAAU,EAAE;YAC5B,MAAM,WAAW,GAAG,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC;;AAErC,YAAA,MAAM,uBAAuB,CAAC,WAAW,EAAE,YAAY,CAAC;QAC1D;QACA,IAAI,CAAC,2BAA2B,CAAC;;AAGjC,QAAA,IAAI,YAAY,CAAC,aAAa,KAAK,SAAS,EAAE;YAC5C,IAAI,CAAC,+BAA+B,CAAC;YAC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