@jvittechs/j 1.0.48 → 1.0.50

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.48",
152
+ version: "1.0.50",
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: {
@@ -738,6 +738,7 @@ var IDE_MIGRATION_CONFIGS = {
738
738
  workflowsPath: "workflows",
739
739
  commandsPath: null,
740
740
  fileExtension: ".md",
741
+ flattenSubdirs: true,
741
742
  generateFrontmatter: (opts) => {
742
743
  let trigger;
743
744
  if (opts.trigger) {
@@ -763,6 +764,7 @@ trigger: ${trigger}
763
764
  workflowsPath: "workflows",
764
765
  commandsPath: null,
765
766
  fileExtension: ".md",
767
+ flattenSubdirs: true,
766
768
  generateFrontmatter: (opts) => {
767
769
  let trigger;
768
770
  if (opts.trigger) {
@@ -1116,7 +1118,8 @@ ${bodyContent}
1116
1118
  if (!contentPath) {
1117
1119
  return null;
1118
1120
  }
1119
- const filename = `${item.name}${extension}`;
1121
+ const itemName = config.flattenSubdirs ? item.name.replace(/\//g, ":") : item.name;
1122
+ const filename = `${itemName}${extension}`;
1120
1123
  return path.join(this.projectPath, config.basePath, contentPath, filename);
1121
1124
  }
1122
1125
  // Helper methods
@@ -3989,20 +3992,9 @@ import { Command as Command14 } from "commander";
3989
3992
  import chalk10 from "chalk";
3990
3993
  import { promises as fs8 } from "fs";
3991
3994
  import { join as join5 } from "path";
3992
- var CORE_FILES = [
3993
- "workflows/gen-project-overview.md",
3995
+ var CORE_FILES_FALLBACK = [
3994
3996
  "context/jv-it-context.md",
3995
- "rules/jai1.md",
3996
- "workflows/commit-it.md",
3997
- "workflows/develop-feature.md",
3998
- "workflows/develop-feature-from-conversation.md",
3999
- "workflows/plan.md",
4000
- "workflows/plan-from-conversation.md",
4001
- "workflows/fix-bug.md",
4002
- "workflows/analyze-impact.md",
4003
- "workflows/feedback.md",
4004
- "skills/gen-commit-message",
4005
- "skills/latest-version"
3997
+ "rules/jai1.md"
4006
3998
  ];
4007
3999
  function createDoctorCommand() {
4008
4000
  const cmd = new Command14("doctor").description("Chu\u1EA9n \u0111o\xE1n project hi\u1EC7n t\u1EA1i").option("--json", "Output as JSON").action(async (options) => {
@@ -4118,9 +4110,20 @@ async function checkCoreFiles(cliName) {
4118
4110
  suggestion: `Ch\u1EA1y "${cliName} apply core" \u0111\u1EC3 c\xE0i \u0111\u1EB7t core package.`
4119
4111
  };
4120
4112
  }
4113
+ let coreFiles = CORE_FILES_FALLBACK;
4114
+ try {
4115
+ const manifestPath = join5(jai1Dir, "manifest.json");
4116
+ const manifestContent = await fs8.readFile(manifestPath, "utf-8");
4117
+ const manifest = JSON.parse(manifestContent);
4118
+ const manifestFiles = Object.keys(manifest);
4119
+ if (manifestFiles.length > 0) {
4120
+ coreFiles = manifestFiles;
4121
+ }
4122
+ } catch {
4123
+ }
4121
4124
  const missing = [];
4122
4125
  const found = [];
4123
- for (const file of CORE_FILES) {
4126
+ for (const file of coreFiles) {
4124
4127
  const filePath = join5(jai1Dir, file);
4125
4128
  try {
4126
4129
  await fs8.access(filePath);
@@ -4133,21 +4136,21 @@ async function checkCoreFiles(cliName) {
4133
4136
  return {
4134
4137
  name: "Core Package",
4135
4138
  passed: true,
4136
- message: `\u0110\u1EA7y \u0111\u1EE7 ${CORE_FILES.length} core files`
4139
+ message: `\u0110\u1EA7y \u0111\u1EE7 ${coreFiles.length} core files`
4137
4140
  };
4138
4141
  }
4139
4142
  if (found.length === 0) {
4140
4143
  return {
4141
4144
  name: "Core Package",
4142
4145
  passed: false,
4143
- message: `Kh\xF4ng c\xF3 core file n\xE0o (0/${CORE_FILES.length})`,
4146
+ message: `Kh\xF4ng c\xF3 core file n\xE0o (0/${coreFiles.length})`,
4144
4147
  suggestion: `Ch\u1EA1y "${cliName} apply core" \u0111\u1EC3 c\xE0i \u0111\u1EB7t core package.`
4145
4148
  };
4146
4149
  }
4147
4150
  return {
4148
4151
  name: "Core Package",
4149
4152
  passed: false,
4150
- message: `Thi\u1EBFu ${missing.length}/${CORE_FILES.length} core files`,
4153
+ message: `Thi\u1EBFu ${missing.length}/${coreFiles.length} core files`,
4151
4154
  details: missing.map((f) => `Thi\u1EBFu: ${f}`),
4152
4155
  suggestion: `Ch\u1EA1y "${cliName} update" \u0111\u1EC3 c\u1EADp nh\u1EADt, ho\u1EB7c "${cliName} apply core" \u0111\u1EC3 c\xE0i l\u1EA1i.`
4153
4156
  };