@jvittechs/j 1.0.49 → 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 +18 -18
- 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.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: {
|
|
@@ -3992,20 +3992,9 @@ import { Command as Command14 } from "commander";
|
|
|
3992
3992
|
import chalk10 from "chalk";
|
|
3993
3993
|
import { promises as fs8 } from "fs";
|
|
3994
3994
|
import { join as join5 } from "path";
|
|
3995
|
-
var
|
|
3996
|
-
"workflows/gen-project-overview.md",
|
|
3995
|
+
var CORE_FILES_FALLBACK = [
|
|
3997
3996
|
"context/jv-it-context.md",
|
|
3998
|
-
"rules/jai1.md"
|
|
3999
|
-
"workflows/commit-it.md",
|
|
4000
|
-
"workflows/develop-feature.md",
|
|
4001
|
-
"workflows/develop-feature-from-conversation.md",
|
|
4002
|
-
"workflows/plan.md",
|
|
4003
|
-
"workflows/plan-from-conversation.md",
|
|
4004
|
-
"workflows/fix-bug.md",
|
|
4005
|
-
"workflows/analyze-impact.md",
|
|
4006
|
-
"workflows/feedback.md",
|
|
4007
|
-
"skills/gen-commit-message",
|
|
4008
|
-
"skills/latest-version"
|
|
3997
|
+
"rules/jai1.md"
|
|
4009
3998
|
];
|
|
4010
3999
|
function createDoctorCommand() {
|
|
4011
4000
|
const cmd = new Command14("doctor").description("Chu\u1EA9n \u0111o\xE1n project hi\u1EC7n t\u1EA1i").option("--json", "Output as JSON").action(async (options) => {
|
|
@@ -4121,9 +4110,20 @@ async function checkCoreFiles(cliName) {
|
|
|
4121
4110
|
suggestion: `Ch\u1EA1y "${cliName} apply core" \u0111\u1EC3 c\xE0i \u0111\u1EB7t core package.`
|
|
4122
4111
|
};
|
|
4123
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
|
+
}
|
|
4124
4124
|
const missing = [];
|
|
4125
4125
|
const found = [];
|
|
4126
|
-
for (const file of
|
|
4126
|
+
for (const file of coreFiles) {
|
|
4127
4127
|
const filePath = join5(jai1Dir, file);
|
|
4128
4128
|
try {
|
|
4129
4129
|
await fs8.access(filePath);
|
|
@@ -4136,21 +4136,21 @@ async function checkCoreFiles(cliName) {
|
|
|
4136
4136
|
return {
|
|
4137
4137
|
name: "Core Package",
|
|
4138
4138
|
passed: true,
|
|
4139
|
-
message: `\u0110\u1EA7y \u0111\u1EE7 ${
|
|
4139
|
+
message: `\u0110\u1EA7y \u0111\u1EE7 ${coreFiles.length} core files`
|
|
4140
4140
|
};
|
|
4141
4141
|
}
|
|
4142
4142
|
if (found.length === 0) {
|
|
4143
4143
|
return {
|
|
4144
4144
|
name: "Core Package",
|
|
4145
4145
|
passed: false,
|
|
4146
|
-
message: `Kh\xF4ng c\xF3 core file n\xE0o (0/${
|
|
4146
|
+
message: `Kh\xF4ng c\xF3 core file n\xE0o (0/${coreFiles.length})`,
|
|
4147
4147
|
suggestion: `Ch\u1EA1y "${cliName} apply core" \u0111\u1EC3 c\xE0i \u0111\u1EB7t core package.`
|
|
4148
4148
|
};
|
|
4149
4149
|
}
|
|
4150
4150
|
return {
|
|
4151
4151
|
name: "Core Package",
|
|
4152
4152
|
passed: false,
|
|
4153
|
-
message: `Thi\u1EBFu ${missing.length}/${
|
|
4153
|
+
message: `Thi\u1EBFu ${missing.length}/${coreFiles.length} core files`,
|
|
4154
4154
|
details: missing.map((f) => `Thi\u1EBFu: ${f}`),
|
|
4155
4155
|
suggestion: `Ch\u1EA1y "${cliName} update" \u0111\u1EC3 c\u1EADp nh\u1EADt, ho\u1EB7c "${cliName} apply core" \u0111\u1EC3 c\xE0i l\u1EA1i.`
|
|
4156
4156
|
};
|