@jvittechs/j 1.0.50 → 1.0.52

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 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.50",
152
+ version: "1.0.52",
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: {
@@ -3371,6 +3371,8 @@ var IDE_FORMATS = {
3371
3371
  rulesPath: ".cursor/rules",
3372
3372
  workflowsPath: ".cursor/commands",
3373
3373
  fileExtension: ".mdc",
3374
+ workflowsFileExtension: ".md",
3375
+ // Commands use .md, not .mdc
3374
3376
  metadataFormat: "yaml-frontmatter",
3375
3377
  supportsReference: true
3376
3378
  },
@@ -3399,6 +3401,7 @@ var IDE_FORMATS = {
3399
3401
  name: "Claude Code",
3400
3402
  description: "Claude Code (.claude/rules/)",
3401
3403
  rulesPath: ".claude/rules",
3404
+ workflowsPath: ".claude/commands",
3402
3405
  fileExtension: ".md",
3403
3406
  metadataFormat: "yaml-frontmatter",
3404
3407
  supportsReference: true
@@ -3408,7 +3411,6 @@ var IDE_FORMATS = {
3408
3411
  name: "AGENTS.md",
3409
3412
  description: "Single AGENTS.md file",
3410
3413
  rulesPath: ".",
3411
- workflowsPath: void 0,
3412
3414
  fileExtension: ".md",
3413
3415
  metadataFormat: "none",
3414
3416
  supportsReference: false
@@ -3533,7 +3535,8 @@ var IdeDetectionService = class {
3533
3535
  const workflowsExist = await this.pathExists(workflowsPath);
3534
3536
  if (workflowsExist) {
3535
3537
  detection.hasWorkflows = true;
3536
- detection.workflowCount = await this.countFiles(workflowsPath, format.fileExtension);
3538
+ const wfExtension = format.workflowsFileExtension ?? format.fileExtension;
3539
+ detection.workflowCount = await this.countFiles(workflowsPath, wfExtension);
3537
3540
  if (detection.workflowCount > 0) {
3538
3541
  detection.detected = true;
3539
3542
  }
@@ -3642,19 +3645,31 @@ var IdeDetectionService = class {
3642
3645
  }
3643
3646
  }
3644
3647
  /**
3645
- * Count files with specific extension in a directory
3648
+ * Count files with specific extension in a directory (recursive)
3649
+ * Supports both flat files and files in subdirectories
3646
3650
  */
3647
3651
  async countFiles(dirPath, extension, excludeKeywords = []) {
3648
3652
  try {
3649
3653
  const entries = await fs7.readdir(dirPath, { withFileTypes: true });
3650
- return entries.filter((entry) => {
3651
- if (!entry.isFile() || !entry.name.endsWith(extension)) return false;
3652
- if (excludeKeywords.length > 0) {
3653
- const nameLower = entry.name.toLowerCase();
3654
- return !excludeKeywords.some((kw) => nameLower.includes(kw));
3654
+ let count = 0;
3655
+ for (const entry of entries) {
3656
+ if (entry.isDirectory()) {
3657
+ count += await this.countFiles(
3658
+ join4(dirPath, entry.name),
3659
+ extension,
3660
+ excludeKeywords
3661
+ );
3662
+ } else if (entry.isFile() && entry.name.endsWith(extension)) {
3663
+ if (excludeKeywords.length > 0) {
3664
+ const nameLower = entry.name.toLowerCase();
3665
+ if (excludeKeywords.some((kw) => nameLower.includes(kw))) {
3666
+ continue;
3667
+ }
3668
+ }
3669
+ count++;
3655
3670
  }
3656
- return true;
3657
- }).length;
3671
+ }
3672
+ return count;
3658
3673
  } catch {
3659
3674
  return 0;
3660
3675
  }