@jvittechs/j 1.0.50 → 1.0.51
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.js +21 -9
- package/dist/cli.js.map +1 -1
- package/package.json +1 -1
package/dist/cli.js
CHANGED
|
@@ -149,7 +149,7 @@ import { basename as basename5 } from "path";
|
|
|
149
149
|
// package.json
|
|
150
150
|
var package_default = {
|
|
151
151
|
name: "@jvittechs/j",
|
|
152
|
-
version: "1.0.
|
|
152
|
+
version: "1.0.51",
|
|
153
153
|
description: "A unified CLI tool for JV-IT TECHS developers to manage Jai1 Framework. Supports both `j` and `jai1` commands. Please contact TeamAI for usage instructions.",
|
|
154
154
|
type: "module",
|
|
155
155
|
bin: {
|
|
@@ -3642,19 +3642,31 @@ var IdeDetectionService = class {
|
|
|
3642
3642
|
}
|
|
3643
3643
|
}
|
|
3644
3644
|
/**
|
|
3645
|
-
* Count files with specific extension in a directory
|
|
3645
|
+
* Count files with specific extension in a directory (recursive)
|
|
3646
|
+
* Supports both flat files and files in subdirectories
|
|
3646
3647
|
*/
|
|
3647
3648
|
async countFiles(dirPath, extension, excludeKeywords = []) {
|
|
3648
3649
|
try {
|
|
3649
3650
|
const entries = await fs7.readdir(dirPath, { withFileTypes: true });
|
|
3650
|
-
|
|
3651
|
-
|
|
3652
|
-
if (
|
|
3653
|
-
|
|
3654
|
-
|
|
3651
|
+
let count = 0;
|
|
3652
|
+
for (const entry of entries) {
|
|
3653
|
+
if (entry.isDirectory()) {
|
|
3654
|
+
count += await this.countFiles(
|
|
3655
|
+
join4(dirPath, entry.name),
|
|
3656
|
+
extension,
|
|
3657
|
+
excludeKeywords
|
|
3658
|
+
);
|
|
3659
|
+
} else if (entry.isFile() && entry.name.endsWith(extension)) {
|
|
3660
|
+
if (excludeKeywords.length > 0) {
|
|
3661
|
+
const nameLower = entry.name.toLowerCase();
|
|
3662
|
+
if (excludeKeywords.some((kw) => nameLower.includes(kw))) {
|
|
3663
|
+
continue;
|
|
3664
|
+
}
|
|
3665
|
+
}
|
|
3666
|
+
count++;
|
|
3655
3667
|
}
|
|
3656
|
-
|
|
3657
|
-
|
|
3668
|
+
}
|
|
3669
|
+
return count;
|
|
3658
3670
|
} catch {
|
|
3659
3671
|
return 0;
|
|
3660
3672
|
}
|