@jixo/cli 0.13.0 → 0.20.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/README.md +1 -1
- package/dist/cli.d.ts.map +1 -1
- package/dist/cli.js +18 -71
- package/dist/cli.js.map +1 -1
- package/dist/commands/apply.d.ts +9 -0
- package/dist/commands/apply.d.ts.map +1 -0
- package/dist/commands/apply.js +59 -0
- package/dist/commands/apply.js.map +1 -0
- package/dist/commands/gen.d.ts +9 -0
- package/dist/commands/gen.d.ts.map +1 -0
- package/dist/commands/gen.js +43 -0
- package/dist/commands/gen.js.map +1 -0
- package/dist/commands/google-aistudio.d.ts +8 -0
- package/dist/commands/google-aistudio.d.ts.map +1 -0
- package/dist/commands/google-aistudio.js +51 -0
- package/dist/commands/google-aistudio.js.map +1 -0
- package/dist/index.d.ts +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -4
- package/dist/index.js.map +1 -1
- package/package.json +4 -25
- package/dist/commands/daemon.d.ts +0 -5
- package/dist/commands/daemon.d.ts.map +0 -1
- package/dist/commands/daemon.js +0 -20
- package/dist/commands/daemon.js.map +0 -1
- package/dist/commands/doctor/config.d.ts +0 -3
- package/dist/commands/doctor/config.d.ts.map +0 -1
- package/dist/commands/doctor/config.js +0 -17
- package/dist/commands/doctor/config.js.map +0 -1
- package/dist/commands/doctor/doctor.d.ts +0 -3
- package/dist/commands/doctor/doctor.d.ts.map +0 -1
- package/dist/commands/doctor/doctor.js +0 -158
- package/dist/commands/doctor/doctor.js.map +0 -1
- package/dist/commands/doctor/doctor.test.d.ts +0 -2
- package/dist/commands/doctor/doctor.test.d.ts.map +0 -1
- package/dist/commands/doctor/doctor.test.js +0 -14
- package/dist/commands/doctor/doctor.test.js.map +0 -1
- package/dist/commands/doctor/index.d.ts +0 -2
- package/dist/commands/doctor/index.d.ts.map +0 -1
- package/dist/commands/doctor/index.js +0 -8
- package/dist/commands/doctor/index.js.map +0 -1
- package/dist/commands/doctor/types.d.ts +0 -45
- package/dist/commands/doctor/types.d.ts.map +0 -1
- package/dist/commands/doctor/types.js +0 -3
- package/dist/commands/doctor/types.js.map +0 -1
- package/dist/commands/init.d.ts +0 -2
- package/dist/commands/init.d.ts.map +0 -1
- package/dist/commands/init.js +0 -40
- package/dist/commands/init.js.map +0 -1
- package/dist/commands/prompts/list.d.ts +0 -2
- package/dist/commands/prompts/list.d.ts.map +0 -1
- package/dist/commands/prompts/list.js +0 -14
- package/dist/commands/prompts/list.js.map +0 -1
- package/dist/commands/prompts/upgrade.d.ts +0 -4
- package/dist/commands/prompts/upgrade.d.ts.map +0 -1
- package/dist/commands/prompts/upgrade.js +0 -17
- package/dist/commands/prompts/upgrade.js.map +0 -1
- package/dist/commands/tasks/AiTaskTui.d.ts +0 -22
- package/dist/commands/tasks/AiTaskTui.d.ts.map +0 -1
- package/dist/commands/tasks/AiTaskTui.js +0 -52
- package/dist/commands/tasks/AiTaskTui.js.map +0 -1
- package/dist/commands/tasks/ai-tasl-tui.d.ts +0 -22
- package/dist/commands/tasks/ai-tasl-tui.d.ts.map +0 -1
- package/dist/commands/tasks/ai-tasl-tui.js +0 -53
- package/dist/commands/tasks/ai-tasl-tui.js.map +0 -1
- package/dist/commands/tasks/ai-tools.d.ts +0 -804
- package/dist/commands/tasks/ai-tools.d.ts.map +0 -1
- package/dist/commands/tasks/ai-tools.js +0 -140
- package/dist/commands/tasks/ai-tools.js.map +0 -1
- package/dist/commands/tasks/model-providers.d.ts +0 -13
- package/dist/commands/tasks/model-providers.d.ts.map +0 -1
- package/dist/commands/tasks/model-providers.js +0 -84
- package/dist/commands/tasks/model-providers.js.map +0 -1
- package/dist/commands/tasks/run-ai-task.d.ts +0 -4
- package/dist/commands/tasks/run-ai-task.d.ts.map +0 -1
- package/dist/commands/tasks/run-ai-task.js +0 -348
- package/dist/commands/tasks/run-ai-task.js.map +0 -1
- package/dist/commands/tasks/run.d.ts +0 -10
- package/dist/commands/tasks/run.d.ts.map +0 -1
- package/dist/commands/tasks/run.js +0 -44
- package/dist/commands/tasks/run.js.map +0 -1
- package/dist/config.d.ts +0 -15
- package/dist/config.d.ts.map +0 -1
- package/dist/config.js +0 -23
- package/dist/config.js.map +0 -1
- package/dist/env.d.ts +0 -6
- package/dist/env.d.ts.map +0 -1
- package/dist/env.js +0 -16
- package/dist/env.js.map +0 -1
- package/dist/helper/ai-retry-error.d.ts +0 -3
- package/dist/helper/ai-retry-error.d.ts.map +0 -1
- package/dist/helper/ai-retry-error.js +0 -108
- package/dist/helper/ai-retry-error.js.map +0 -1
- package/dist/helper/find-changes.d.ts +0 -3
- package/dist/helper/find-changes.d.ts.map +0 -1
- package/dist/helper/find-changes.js +0 -113
- package/dist/helper/find-changes.js.map +0 -1
- package/dist/helper/find-changes.test.d.ts +0 -2
- package/dist/helper/find-changes.test.d.ts.map +0 -1
- package/dist/helper/find-changes.test.js +0 -22
- package/dist/helper/find-changes.test.js.map +0 -1
- package/dist/helper/handle-ai-error.d.ts +0 -5
- package/dist/helper/handle-ai-error.d.ts.map +0 -1
- package/dist/helper/handle-ai-error.js +0 -122
- package/dist/helper/handle-ai-error.js.map +0 -1
- package/dist/helper/logger.d.ts +0 -3
- package/dist/helper/logger.d.ts.map +0 -1
- package/dist/helper/logger.js +0 -26
- package/dist/helper/logger.js.map +0 -1
- package/dist/helper/parse-progress.d.ts +0 -2
- package/dist/helper/parse-progress.d.ts.map +0 -1
- package/dist/helper/parse-progress.js +0 -28
- package/dist/helper/parse-progress.js.map +0 -1
- package/dist/helper/prompts-loader.d.ts +0 -11
- package/dist/helper/prompts-loader.d.ts.map +0 -1
- package/dist/helper/prompts-loader.js +0 -28
- package/dist/helper/prompts-loader.js.map +0 -1
- package/dist/helper/resolve-ai-tasks.d.ts +0 -42
- package/dist/helper/resolve-ai-tasks.d.ts.map +0 -1
- package/dist/helper/resolve-ai-tasks.js +0 -162
- package/dist/helper/resolve-ai-tasks.js.map +0 -1
package/README.md
CHANGED
package/dist/cli.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cli.d.ts","sourceRoot":"","sources":["../src/cli.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"cli.d.ts","sourceRoot":"","sources":["../src/cli.ts"],"names":[],"mappings":"AAQA,eAAO,MAAM,MAAM,GAAU,OAAM,MAAM,EAAiB,kBAyBzD,CAAC"}
|
package/dist/cli.js
CHANGED
|
@@ -1,83 +1,30 @@
|
|
|
1
|
-
|
|
1
|
+
process.removeAllListeners("warning");
|
|
2
|
+
import fs from "node:fs";
|
|
3
|
+
import path from "node:path";
|
|
4
|
+
import { fileURLToPath } from "node:url";
|
|
2
5
|
import yargs from "yargs";
|
|
3
6
|
import { hideBin } from "yargs/helpers";
|
|
4
7
|
import packageJson from "../package.json" with { type: "json" };
|
|
5
|
-
import { restartDaemon, startDaemon, statusDaemon, stopDaemon } from "./commands/daemon.js";
|
|
6
|
-
import { doctor } from "./commands/doctor/index.js";
|
|
7
|
-
import { init } from "./commands/init.js";
|
|
8
|
-
import { run } from "./commands/tasks/run.js";
|
|
9
8
|
export const runCli = async (args = process.argv) => {
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
init(cwdResolver(argv.dir));
|
|
23
|
-
})
|
|
24
|
-
.command("run <goal>", "Run a JIXO job with a specific goal", (yargs) => {
|
|
25
|
-
return yargs
|
|
26
|
-
.positional("goal", {
|
|
27
|
-
describe: "The high-level goal for the job",
|
|
28
|
-
type: "string",
|
|
29
|
-
demandOption: true,
|
|
30
|
-
})
|
|
31
|
-
.option("dir", {
|
|
32
|
-
alias: "D",
|
|
33
|
-
type: "string",
|
|
34
|
-
description: "The project directory to run in",
|
|
35
|
-
default: process.cwd(),
|
|
36
|
-
})
|
|
37
|
-
.option("loop", {
|
|
38
|
-
alias: "L",
|
|
39
|
-
type: "number",
|
|
40
|
-
description: "The max loop times for the job",
|
|
41
|
-
default: 20,
|
|
42
|
-
});
|
|
43
|
-
}, (argv) => {
|
|
44
|
-
run({
|
|
45
|
-
jobGoal: argv.goal,
|
|
46
|
-
workDir: cwdResolver(argv.dir),
|
|
47
|
-
maxLoops: argv.loop,
|
|
48
|
-
});
|
|
49
|
-
})
|
|
50
|
-
.command("daemon <action>", "Manage the JIXO Core daemon", (yargs) => {
|
|
51
|
-
return yargs.positional("action", {
|
|
52
|
-
describe: "The action to perform on the daemon",
|
|
53
|
-
type: "string",
|
|
54
|
-
choices: ["start", "stop", "status", "restart"],
|
|
55
|
-
demandOption: true,
|
|
56
|
-
});
|
|
57
|
-
}, (argv) => {
|
|
58
|
-
switch (argv.action) {
|
|
59
|
-
case "start":
|
|
60
|
-
startDaemon();
|
|
61
|
-
break;
|
|
62
|
-
case "stop":
|
|
63
|
-
stopDaemon();
|
|
64
|
-
break;
|
|
65
|
-
case "status":
|
|
66
|
-
statusDaemon();
|
|
67
|
-
break;
|
|
68
|
-
case "restart":
|
|
69
|
-
restartDaemon();
|
|
70
|
-
break;
|
|
9
|
+
let cli = yargs(hideBin(args)).scriptName("jixo").version(packageJson.version).demandCommand(1, "You need at least one command before moving on").strict().help();
|
|
10
|
+
// 动态加载命令
|
|
11
|
+
const __dirname = path.dirname(fileURLToPath(import.meta.url));
|
|
12
|
+
const commandsDir = path.join(__dirname, "commands");
|
|
13
|
+
const commandFiles = fs.readdirSync(commandsDir).filter((file) => file.endsWith(".js") || file.endsWith(".ts"));
|
|
14
|
+
for (const file of commandFiles) {
|
|
15
|
+
const commandModule = await import(path.join(commandsDir, file));
|
|
16
|
+
// 假设每个模块导出一个或多个 yargs 命令模块
|
|
17
|
+
for (const key in commandModule) {
|
|
18
|
+
if (typeof commandModule[key] === "object" && commandModule[key].command) {
|
|
19
|
+
cli = cli.command(commandModule[key]);
|
|
20
|
+
}
|
|
71
21
|
}
|
|
72
|
-
}
|
|
73
|
-
.demandCommand(1, "You need at least one command before moving on")
|
|
74
|
-
.strict()
|
|
75
|
-
.help();
|
|
22
|
+
}
|
|
76
23
|
const argv = await cli.parse();
|
|
24
|
+
// 如果没有命令被执行,显示帮助信息
|
|
77
25
|
if (argv._.length === 0) {
|
|
78
26
|
cli.showHelp();
|
|
79
27
|
console.log(" " + "─".repeat(Math.max(4, process.stdout.columns - 2)));
|
|
80
|
-
await doctor();
|
|
81
28
|
}
|
|
82
29
|
};
|
|
83
30
|
//# sourceMappingURL=cli.js.map
|
package/dist/cli.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cli.js","sourceRoot":"","sources":["../src/cli.ts"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"cli.js","sourceRoot":"","sources":["../src/cli.ts"],"names":[],"mappings":"AAAA,OAAO,CAAC,kBAAkB,CAAC,SAAS,CAAC,CAAC;AACtC,OAAO,EAAE,MAAM,SAAS,CAAC;AACzB,OAAO,IAAI,MAAM,WAAW,CAAC;AAC7B,OAAO,EAAC,aAAa,EAAC,MAAM,UAAU,CAAC;AACvC,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAC,OAAO,EAAC,MAAM,eAAe,CAAC;AACtC,OAAO,WAAW,MAAM,iBAAiB,CAAC,OAAM,IAAI,EAAE,MAAM,EAAC,CAAC;AAE9D,MAAM,CAAC,MAAM,MAAM,GAAG,KAAK,EAAE,OAAiB,OAAO,CAAC,IAAI,EAAE,EAAE;IAC5D,IAAI,GAAG,GAAG,KAAK,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,UAAU,CAAC,MAAM,CAAC,CAAC,OAAO,CAAC,WAAW,CAAC,OAAO,CAAC,CAAC,aAAa,CAAC,CAAC,EAAE,gDAAgD,CAAC,CAAC,MAAM,EAAE,CAAC,IAAI,EAAE,CAAC;IAElK,SAAS;IACT,MAAM,SAAS,GAAG,IAAI,CAAC,OAAO,CAAC,aAAa,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC;IAC/D,MAAM,WAAW,GAAG,IAAI,CAAC,IAAI,CAAC,SAAS,EAAE,UAAU,CAAC,CAAC;IACrD,MAAM,YAAY,GAAG,EAAE,CAAC,WAAW,CAAC,WAAW,CAAC,CAAC,MAAM,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,CAAC,QAAQ,CAAC,KAAK,CAAC,IAAI,IAAI,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC,CAAC;IAEhH,KAAK,MAAM,IAAI,IAAI,YAAY,EAAE,CAAC;QAChC,MAAM,aAAa,GAAG,MAAM,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,WAAW,EAAE,IAAI,CAAC,CAAC,CAAC;QACjE,2BAA2B;QAC3B,KAAK,MAAM,GAAG,IAAI,aAAa,EAAE,CAAC;YAChC,IAAI,OAAO,aAAa,CAAC,GAAG,CAAC,KAAK,QAAQ,IAAI,aAAa,CAAC,GAAG,CAAC,CAAC,OAAO,EAAE,CAAC;gBACzE,GAAG,GAAG,GAAG,CAAC,OAAO,CAAC,aAAa,CAAC,GAAG,CAAC,CAAC,CAAC;YACxC,CAAC;QACH,CAAC;IACH,CAAC;IAED,MAAM,IAAI,GAAG,MAAM,GAAG,CAAC,KAAK,EAAE,CAAC;IAE/B,mBAAmB;IACnB,IAAI,IAAI,CAAC,CAAC,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;QACxB,GAAG,CAAC,QAAQ,EAAE,CAAC;QACf,OAAO,CAAC,GAAG,CAAC,GAAG,GAAG,GAAG,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,OAAO,CAAC,MAAM,CAAC,OAAO,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC;IACzE,CAAC;AACH,CAAC,CAAC","sourcesContent":["process.removeAllListeners(\"warning\");\nimport fs from \"node:fs\";\nimport path from \"node:path\";\nimport {fileURLToPath} from \"node:url\";\nimport yargs from \"yargs\";\nimport {hideBin} from \"yargs/helpers\";\nimport packageJson from \"../package.json\" with {type: \"json\"};\n\nexport const runCli = async (args: string[] = process.argv) => {\n let cli = yargs(hideBin(args)).scriptName(\"jixo\").version(packageJson.version).demandCommand(1, \"You need at least one command before moving on\").strict().help();\n\n // 动态加载命令\n const __dirname = path.dirname(fileURLToPath(import.meta.url));\n const commandsDir = path.join(__dirname, \"commands\");\n const commandFiles = fs.readdirSync(commandsDir).filter((file) => file.endsWith(\".js\") || file.endsWith(\".ts\"));\n\n for (const file of commandFiles) {\n const commandModule = await import(path.join(commandsDir, file));\n // 假设每个模块导出一个或多个 yargs 命令模块\n for (const key in commandModule) {\n if (typeof commandModule[key] === \"object\" && commandModule[key].command) {\n cli = cli.command(commandModule[key]);\n }\n }\n }\n\n const argv = await cli.parse();\n\n // 如果没有命令被执行,显示帮助信息\n if (argv._.length === 0) {\n cli.showHelp();\n console.log(\" \" + \"─\".repeat(Math.max(4, process.stdout.columns - 2)));\n }\n};\n"]}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { type ApplyOptions } from "@jixo/dev/apply-ai-response";
|
|
2
|
+
import type { CommandModule } from "yargs";
|
|
3
|
+
/**
|
|
4
|
+
* @jixo/cli apply
|
|
5
|
+
*
|
|
6
|
+
* Apply changes from AI-generated markdown file.
|
|
7
|
+
*/
|
|
8
|
+
export declare const applyCommand: CommandModule<object, ApplyOptions>;
|
|
9
|
+
//# sourceMappingURL=apply.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"apply.d.ts","sourceRoot":"","sources":["../../src/commands/apply.ts"],"names":[],"mappings":"AAAA,OAAO,EAAoB,KAAK,YAAY,EAAC,MAAM,6BAA6B,CAAC;AACjF,OAAO,KAAK,EAAY,aAAa,EAAC,MAAM,OAAO,CAAC;AAEpD;;;;GAIG;AACH,eAAO,MAAM,YAAY,EAAE,aAAa,CAAC,MAAM,EAAE,YAAY,CAoD5D,CAAC"}
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
import { doApplyAiResponse } from "@jixo/dev/apply-ai-response";
|
|
2
|
+
/**
|
|
3
|
+
* @jixo/cli apply
|
|
4
|
+
*
|
|
5
|
+
* Apply changes from AI-generated markdown file.
|
|
6
|
+
*/
|
|
7
|
+
export const applyCommand = {
|
|
8
|
+
command: "apply <files...>",
|
|
9
|
+
aliases: ["A"],
|
|
10
|
+
describe: "Apply changes from AI-generated markdown files",
|
|
11
|
+
builder: (yargs) => yargs
|
|
12
|
+
.positional("files", {
|
|
13
|
+
describe: "Paths or glob patterns to the markdown files",
|
|
14
|
+
type: "string",
|
|
15
|
+
demandOption: true,
|
|
16
|
+
array: true,
|
|
17
|
+
})
|
|
18
|
+
.option("yes", {
|
|
19
|
+
alias: "Y",
|
|
20
|
+
type: "boolean",
|
|
21
|
+
describe: "Skip confirmation prompt and apply all changes",
|
|
22
|
+
default: false,
|
|
23
|
+
})
|
|
24
|
+
.option("cwd", {
|
|
25
|
+
alias: "C",
|
|
26
|
+
type: "string",
|
|
27
|
+
describe: "Set the working directory",
|
|
28
|
+
default: process.cwd(),
|
|
29
|
+
})
|
|
30
|
+
.option("unsafe", {
|
|
31
|
+
type: "boolean",
|
|
32
|
+
describe: "Allow unsafe file paths (e.g., outside of project root)",
|
|
33
|
+
default: false,
|
|
34
|
+
})
|
|
35
|
+
.option("format", {
|
|
36
|
+
alias: "F",
|
|
37
|
+
type: "boolean",
|
|
38
|
+
describe: "Format code after applying changes",
|
|
39
|
+
default: true,
|
|
40
|
+
})
|
|
41
|
+
.option("gitCommit", {
|
|
42
|
+
alias: ["G", "git-commit"],
|
|
43
|
+
type: "boolean",
|
|
44
|
+
describe: "Automatically commit changes with the message from markdown",
|
|
45
|
+
default: false,
|
|
46
|
+
}),
|
|
47
|
+
handler: async (argv) => {
|
|
48
|
+
// yargs 的 argv 结构与 ApplyOptions 几乎完全兼容
|
|
49
|
+
// files 参数会被 yargs 正确处理为 string[]
|
|
50
|
+
await doApplyAiResponse(argv.files, {
|
|
51
|
+
yes: argv.yes,
|
|
52
|
+
cwd: argv.cwd,
|
|
53
|
+
unsafe: argv.unsafe,
|
|
54
|
+
format: argv.format,
|
|
55
|
+
gitCommit: argv.gitCommit,
|
|
56
|
+
});
|
|
57
|
+
},
|
|
58
|
+
};
|
|
59
|
+
//# sourceMappingURL=apply.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"apply.js","sourceRoot":"","sources":["../../src/commands/apply.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,iBAAiB,EAAoB,MAAM,6BAA6B,CAAC;AAGjF;;;;GAIG;AACH,MAAM,CAAC,MAAM,YAAY,GAAwC;IAC/D,OAAO,EAAE,kBAAkB;IAC3B,OAAO,EAAE,CAAC,GAAG,CAAC;IACd,QAAQ,EAAE,gDAAgD;IAC1D,OAAO,EAAE,CAAC,KAAK,EAAE,EAAE,CACjB,KAAK;SACF,UAAU,CAAC,OAAO,EAAE;QACnB,QAAQ,EAAE,8CAA8C;QACxD,IAAI,EAAE,QAAQ;QACd,YAAY,EAAE,IAAI;QAClB,KAAK,EAAE,IAAI;KACZ,CAAC;SACD,MAAM,CAAC,KAAK,EAAE;QACb,KAAK,EAAE,GAAG;QACV,IAAI,EAAE,SAAS;QACf,QAAQ,EAAE,gDAAgD;QAC1D,OAAO,EAAE,KAAK;KACf,CAAC;SACD,MAAM,CAAC,KAAK,EAAE;QACb,KAAK,EAAE,GAAG;QACV,IAAI,EAAE,QAAQ;QACd,QAAQ,EAAE,2BAA2B;QACrC,OAAO,EAAE,OAAO,CAAC,GAAG,EAAE;KACvB,CAAC;SACD,MAAM,CAAC,QAAQ,EAAE;QAChB,IAAI,EAAE,SAAS;QACf,QAAQ,EAAE,yDAAyD;QACnE,OAAO,EAAE,KAAK;KACf,CAAC;SACD,MAAM,CAAC,QAAQ,EAAE;QAChB,KAAK,EAAE,GAAG;QACV,IAAI,EAAE,SAAS;QACf,QAAQ,EAAE,oCAAoC;QAC9C,OAAO,EAAE,IAAI;KACd,CAAC;SACD,MAAM,CAAC,WAAW,EAAE;QACnB,KAAK,EAAE,CAAC,GAAG,EAAE,YAAY,CAAC;QAC1B,IAAI,EAAE,SAAS;QACf,QAAQ,EAAE,6DAA6D;QACvE,OAAO,EAAE,KAAK;KACf,CAAC;IACN,OAAO,EAAE,KAAK,EAAE,IAA6B,EAAE,EAAE;QAC/C,uCAAuC;QACvC,kCAAkC;QAClC,MAAM,iBAAiB,CAAC,IAAI,CAAC,KAAiB,EAAE;YAC9C,GAAG,EAAE,IAAI,CAAC,GAAG;YACb,GAAG,EAAE,IAAI,CAAC,GAAG;YACb,MAAM,EAAE,IAAI,CAAC,MAAM;YACnB,MAAM,EAAE,IAAI,CAAC,MAAM;YACnB,SAAS,EAAE,IAAI,CAAC,SAAS;SAC1B,CAAC,CAAC;IACL,CAAC;CACF,CAAC","sourcesContent":["import {doApplyAiResponse, type ApplyOptions} from \"@jixo/dev/apply-ai-response\";\nimport type {Arguments, CommandModule} from \"yargs\";\n\n/**\n * @jixo/cli apply\n *\n * Apply changes from AI-generated markdown file.\n */\nexport const applyCommand: CommandModule<object, ApplyOptions> = {\n command: \"apply <files...>\",\n aliases: [\"A\"],\n describe: \"Apply changes from AI-generated markdown files\",\n builder: (yargs) =>\n yargs\n .positional(\"files\", {\n describe: \"Paths or glob patterns to the markdown files\",\n type: \"string\",\n demandOption: true,\n array: true,\n })\n .option(\"yes\", {\n alias: \"Y\",\n type: \"boolean\",\n describe: \"Skip confirmation prompt and apply all changes\",\n default: false,\n })\n .option(\"cwd\", {\n alias: \"C\",\n type: \"string\",\n describe: \"Set the working directory\",\n default: process.cwd(),\n })\n .option(\"unsafe\", {\n type: \"boolean\",\n describe: \"Allow unsafe file paths (e.g., outside of project root)\",\n default: false,\n })\n .option(\"format\", {\n alias: \"F\",\n type: \"boolean\",\n describe: \"Format code after applying changes\",\n default: true,\n })\n .option(\"gitCommit\", {\n alias: [\"G\", \"git-commit\"],\n type: \"boolean\",\n describe: \"Automatically commit changes with the message from markdown\",\n default: false,\n }),\n handler: async (argv: Arguments<ApplyOptions>) => {\n // yargs 的 argv 结构与 ApplyOptions 几乎完全兼容\n // files 参数会被 yargs 正确处理为 string[]\n await doApplyAiResponse(argv.files as string[], {\n yes: argv.yes,\n cwd: argv.cwd,\n unsafe: argv.unsafe,\n format: argv.format,\n gitCommit: argv.gitCommit,\n });\n },\n};\n"]}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { type GenOptions } from "@jixo/dev/gen-prompt";
|
|
2
|
+
import type { CommandModule } from "yargs";
|
|
3
|
+
/**
|
|
4
|
+
* @jixo/cli gen
|
|
5
|
+
*
|
|
6
|
+
* Generate AI prompts from metadata files (*.meta.md).
|
|
7
|
+
*/
|
|
8
|
+
export declare const genCommand: CommandModule<object, GenOptions>;
|
|
9
|
+
//# sourceMappingURL=gen.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"gen.d.ts","sourceRoot":"","sources":["../../src/commands/gen.ts"],"names":[],"mappings":"AAAA,OAAO,EAAe,KAAK,UAAU,EAAC,MAAM,sBAAsB,CAAC;AACnE,OAAO,KAAK,EAAY,aAAa,EAAC,MAAM,OAAO,CAAC;AAEpD;;;;GAIG;AACH,eAAO,MAAM,UAAU,EAAE,aAAa,CAAC,MAAM,EAAE,UAAU,CAoCxD,CAAC"}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import { doGenPrompts } from "@jixo/dev/gen-prompt";
|
|
2
|
+
/**
|
|
3
|
+
* @jixo/cli gen
|
|
4
|
+
*
|
|
5
|
+
* Generate AI prompts from metadata files (*.meta.md).
|
|
6
|
+
*/
|
|
7
|
+
export const genCommand = {
|
|
8
|
+
command: "gen <inputs...>",
|
|
9
|
+
aliases: ["G"],
|
|
10
|
+
describe: "Generate AI prompts from metadata files (*.meta.md)",
|
|
11
|
+
builder: (yargs) => yargs
|
|
12
|
+
.positional("inputs", {
|
|
13
|
+
describe: "Input files, directories, or glob patterns",
|
|
14
|
+
type: "string",
|
|
15
|
+
demandOption: true,
|
|
16
|
+
array: true,
|
|
17
|
+
})
|
|
18
|
+
.option("outFile", {
|
|
19
|
+
alias: ["O", "out-file"],
|
|
20
|
+
type: "string",
|
|
21
|
+
describe: "Specify the output file path (for single file input only)",
|
|
22
|
+
})
|
|
23
|
+
.option("watch", {
|
|
24
|
+
alias: "W",
|
|
25
|
+
type: "boolean",
|
|
26
|
+
describe: "Watch for file changes and regenerate automatically",
|
|
27
|
+
default: false,
|
|
28
|
+
})
|
|
29
|
+
.option("cwd", {
|
|
30
|
+
type: "string",
|
|
31
|
+
describe: "Set the working directory for glob patterns",
|
|
32
|
+
})
|
|
33
|
+
.option("glob", {
|
|
34
|
+
type: "string",
|
|
35
|
+
describe: "Glob pattern for batch processing when an input is a directory",
|
|
36
|
+
default: "*.meta.md",
|
|
37
|
+
}),
|
|
38
|
+
handler: async (argv) => {
|
|
39
|
+
// 直接调用封装好的核心逻辑
|
|
40
|
+
await doGenPrompts(argv);
|
|
41
|
+
},
|
|
42
|
+
};
|
|
43
|
+
//# sourceMappingURL=gen.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"gen.js","sourceRoot":"","sources":["../../src/commands/gen.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,YAAY,EAAkB,MAAM,sBAAsB,CAAC;AAGnE;;;;GAIG;AACH,MAAM,CAAC,MAAM,UAAU,GAAsC;IAC3D,OAAO,EAAE,iBAAiB;IAC1B,OAAO,EAAE,CAAC,GAAG,CAAC;IACd,QAAQ,EAAE,qDAAqD;IAC/D,OAAO,EAAE,CAAC,KAAK,EAAE,EAAE,CACjB,KAAK;SACF,UAAU,CAAC,QAAQ,EAAE;QACpB,QAAQ,EAAE,4CAA4C;QACtD,IAAI,EAAE,QAAQ;QACd,YAAY,EAAE,IAAI;QAClB,KAAK,EAAE,IAAI;KACZ,CAAC;SACD,MAAM,CAAC,SAAS,EAAE;QACjB,KAAK,EAAE,CAAC,GAAG,EAAE,UAAU,CAAC;QACxB,IAAI,EAAE,QAAQ;QACd,QAAQ,EAAE,2DAA2D;KACtE,CAAC;SACD,MAAM,CAAC,OAAO,EAAE;QACf,KAAK,EAAE,GAAG;QACV,IAAI,EAAE,SAAS;QACf,QAAQ,EAAE,qDAAqD;QAC/D,OAAO,EAAE,KAAK;KACf,CAAC;SACD,MAAM,CAAC,KAAK,EAAE;QACb,IAAI,EAAE,QAAQ;QACd,QAAQ,EAAE,6CAA6C;KACxD,CAAC;SACD,MAAM,CAAC,MAAM,EAAE;QACd,IAAI,EAAE,QAAQ;QACd,QAAQ,EAAE,gEAAgE;QAC1E,OAAO,EAAE,WAAW;KACrB,CAAC;IACN,OAAO,EAAE,KAAK,EAAE,IAA2B,EAAE,EAAE;QAC7C,eAAe;QACf,MAAM,YAAY,CAAC,IAAI,CAAC,CAAC;IAC3B,CAAC;CACF,CAAC","sourcesContent":["import {doGenPrompts, type GenOptions} from \"@jixo/dev/gen-prompt\";\nimport type {Arguments, CommandModule} from \"yargs\";\n\n/**\n * @jixo/cli gen\n *\n * Generate AI prompts from metadata files (*.meta.md).\n */\nexport const genCommand: CommandModule<object, GenOptions> = {\n command: \"gen <inputs...>\",\n aliases: [\"G\"],\n describe: \"Generate AI prompts from metadata files (*.meta.md)\",\n builder: (yargs) =>\n yargs\n .positional(\"inputs\", {\n describe: \"Input files, directories, or glob patterns\",\n type: \"string\",\n demandOption: true,\n array: true,\n })\n .option(\"outFile\", {\n alias: [\"O\", \"out-file\"],\n type: \"string\",\n describe: \"Specify the output file path (for single file input only)\",\n })\n .option(\"watch\", {\n alias: \"W\",\n type: \"boolean\",\n describe: \"Watch for file changes and regenerate automatically\",\n default: false,\n })\n .option(\"cwd\", {\n type: \"string\",\n describe: \"Set the working directory for glob patterns\",\n })\n .option(\"glob\", {\n type: \"string\",\n describe: \"Glob pattern for batch processing when an input is a directory\",\n default: \"*.meta.md\",\n }),\n handler: async (argv: Arguments<GenOptions>) => {\n // 直接调用封装好的核心逻辑\n await doGenPrompts(argv);\n },\n};\n"]}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { CommandModule } from "yargs";
|
|
2
|
+
/**
|
|
3
|
+
* @jixo/cli google-aistudio
|
|
4
|
+
*
|
|
5
|
+
* Group of commands for interacting with Google AI Studio.
|
|
6
|
+
*/
|
|
7
|
+
export declare const googleAistudioCommand: CommandModule<object, object>;
|
|
8
|
+
//# sourceMappingURL=google-aistudio.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"google-aistudio.d.ts","sourceRoot":"","sources":["../../src/commands/google-aistudio.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAY,aAAa,EAAC,MAAM,OAAO,CAAC;AA4CpD;;;;GAIG;AACH,eAAO,MAAM,qBAAqB,EAAE,aAAa,CAAC,MAAM,EAAE,MAAM,CAU/D,CAAC"}
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import { doSync } from "@jixo/dev/google-aistudio";
|
|
2
|
+
// 定义 'sync' 子命令
|
|
3
|
+
const syncCommand = {
|
|
4
|
+
command: "sync [path]",
|
|
5
|
+
aliases: ["S"],
|
|
6
|
+
describe: "Sync with aistudio.google.com contents",
|
|
7
|
+
builder: (yargs) => yargs
|
|
8
|
+
.positional("path", {
|
|
9
|
+
describe: "Directory or file path to sync",
|
|
10
|
+
type: "string",
|
|
11
|
+
default: process.cwd(),
|
|
12
|
+
})
|
|
13
|
+
.option("watch", {
|
|
14
|
+
alias: "W",
|
|
15
|
+
type: "boolean",
|
|
16
|
+
describe: "Watch for file changes and sync automatically",
|
|
17
|
+
default: false,
|
|
18
|
+
})
|
|
19
|
+
.option("outDir", {
|
|
20
|
+
alias: "O",
|
|
21
|
+
type: "string",
|
|
22
|
+
describe: "Specify the output directory for generated markdown files",
|
|
23
|
+
}),
|
|
24
|
+
handler: async (argv) => {
|
|
25
|
+
// 将 yargs 的解析结果适配为 doSync 函数期望的格式。
|
|
26
|
+
// 关键是 yargs 的位置参数是命名好的 (argv.path),而 doSync
|
|
27
|
+
// 期望它在 `_` 数组的第一个位置。
|
|
28
|
+
const optionsForDoSync = {
|
|
29
|
+
...argv,
|
|
30
|
+
_: [argv.path],
|
|
31
|
+
};
|
|
32
|
+
doSync(optionsForDoSync);
|
|
33
|
+
},
|
|
34
|
+
};
|
|
35
|
+
/**
|
|
36
|
+
* @jixo/cli google-aistudio
|
|
37
|
+
*
|
|
38
|
+
* Group of commands for interacting with Google AI Studio.
|
|
39
|
+
*/
|
|
40
|
+
export const googleAistudioCommand = {
|
|
41
|
+
command: "google-aistudio <command>",
|
|
42
|
+
aliases: ["GO"],
|
|
43
|
+
describe: "Commands for Google AI Studio integration",
|
|
44
|
+
builder: (yargs) => {
|
|
45
|
+
// 将 syncCommand 注册为 google-aistudio 的子命令
|
|
46
|
+
return yargs.command(syncCommand).demandCommand(1, "You must provide a sub-command for 'google-aistudio'.");
|
|
47
|
+
},
|
|
48
|
+
// 这个 handler 理论上不会被执行,因为 yargs 会要求一个子命令
|
|
49
|
+
handler: () => { },
|
|
50
|
+
};
|
|
51
|
+
//# sourceMappingURL=google-aistudio.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"google-aistudio.js","sourceRoot":"","sources":["../../src/commands/google-aistudio.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,MAAM,EAAmB,MAAM,2BAA2B,CAAC;AAUnE,gBAAgB;AAChB,MAAM,WAAW,GAAoC;IACnD,OAAO,EAAE,aAAa;IACtB,OAAO,EAAE,CAAC,GAAG,CAAC;IACd,QAAQ,EAAE,wCAAwC;IAClD,OAAO,EAAE,CAAC,KAAK,EAAE,EAAE,CACjB,KAAK;SACF,UAAU,CAAC,MAAM,EAAE;QAClB,QAAQ,EAAE,gCAAgC;QAC1C,IAAI,EAAE,QAAQ;QACd,OAAO,EAAE,OAAO,CAAC,GAAG,EAAE;KACvB,CAAC;SACD,MAAM,CAAC,OAAO,EAAE;QACf,KAAK,EAAE,GAAG;QACV,IAAI,EAAE,SAAS;QACf,QAAQ,EAAE,+CAA+C;QACzD,OAAO,EAAE,KAAK;KACf,CAAC;SACD,MAAM,CAAC,QAAQ,EAAE;QAChB,KAAK,EAAE,GAAG;QACV,IAAI,EAAE,QAAQ;QACd,QAAQ,EAAE,2DAA2D;KACtE,CAAC;IACN,OAAO,EAAE,KAAK,EAAE,IAAyB,EAAE,EAAE;QAC3C,mCAAmC;QACnC,4CAA4C;QAC5C,qBAAqB;QACrB,MAAM,gBAAgB,GAAgB;YACpC,GAAG,IAAI;YACP,CAAC,EAAE,CAAC,IAAI,CAAC,IAAc,CAAC;SACzB,CAAC;QACF,MAAM,CAAC,gBAAgB,CAAC,CAAC;IAC3B,CAAC;CACF,CAAC;AAEF;;;;GAIG;AACH,MAAM,CAAC,MAAM,qBAAqB,GAAkC;IAClE,OAAO,EAAE,2BAA2B;IACpC,OAAO,EAAE,CAAC,IAAI,CAAC;IACf,QAAQ,EAAE,2CAA2C;IACrD,OAAO,EAAE,CAAC,KAAK,EAAE,EAAE;QACjB,yCAAyC;QACzC,OAAO,KAAK,CAAC,OAAO,CAAC,WAAW,CAAC,CAAC,aAAa,CAAC,CAAC,EAAE,uDAAuD,CAAC,CAAC;IAC9G,CAAC;IACD,wCAAwC;IACxC,OAAO,EAAE,GAAG,EAAE,GAAE,CAAC;CAClB,CAAC","sourcesContent":["import {doSync, type SyncOptions} from \"@jixo/dev/google-aistudio\";\nimport type {Arguments, CommandModule} from \"yargs\";\n\n// 定义 yargs builder 所需的参数接口\ninterface SyncArgs {\n path?: string;\n watch?: boolean;\n outDir?: string;\n}\n\n// 定义 'sync' 子命令\nconst syncCommand: CommandModule<object, SyncArgs> = {\n command: \"sync [path]\",\n aliases: [\"S\"],\n describe: \"Sync with aistudio.google.com contents\",\n builder: (yargs) =>\n yargs\n .positional(\"path\", {\n describe: \"Directory or file path to sync\",\n type: \"string\",\n default: process.cwd(),\n })\n .option(\"watch\", {\n alias: \"W\",\n type: \"boolean\",\n describe: \"Watch for file changes and sync automatically\",\n default: false,\n })\n .option(\"outDir\", {\n alias: \"O\",\n type: \"string\",\n describe: \"Specify the output directory for generated markdown files\",\n }),\n handler: async (argv: Arguments<SyncArgs>) => {\n // 将 yargs 的解析结果适配为 doSync 函数期望的格式。\n // 关键是 yargs 的位置参数是命名好的 (argv.path),而 doSync\n // 期望它在 `_` 数组的第一个位置。\n const optionsForDoSync: SyncOptions = {\n ...argv,\n _: [argv.path as string],\n };\n doSync(optionsForDoSync);\n },\n};\n\n/**\n * @jixo/cli google-aistudio\n *\n * Group of commands for interacting with Google AI Studio.\n */\nexport const googleAistudioCommand: CommandModule<object, object> = {\n command: \"google-aistudio <command>\",\n aliases: [\"GO\"],\n describe: \"Commands for Google AI Studio integration\",\n builder: (yargs) => {\n // 将 syncCommand 注册为 google-aistudio 的子命令\n return yargs.command(syncCommand).demandCommand(1, \"You must provide a sub-command for 'google-aistudio'.\");\n },\n // 这个 handler 理论上不会被执行,因为 yargs 会要求一个子命令\n handler: () => {},\n};\n"]}
|
package/dist/index.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export
|
|
1
|
+
export {};
|
|
2
2
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":""}
|
package/dist/index.js
CHANGED
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,MAAM,EAAC,MAAM,UAAU,CAAC;AAEhC,SAAS;AACT,MAAM,EAAE,CAAC","sourcesContent":["import {runCli} from \"./cli.js\";\n\n// 启动 CLI\nrunCli();\n"]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@jixo/cli",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.20.0",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"bin": {
|
|
6
6
|
"jixo": "./dist/index.js"
|
|
@@ -14,40 +14,19 @@
|
|
|
14
14
|
}
|
|
15
15
|
},
|
|
16
16
|
"dependencies": {
|
|
17
|
-
"@ai-sdk/anthropic": "alpha",
|
|
18
|
-
"@ai-sdk/deepinfra": "alpha",
|
|
19
|
-
"@ai-sdk/deepseek": "alpha",
|
|
20
|
-
"@ai-sdk/google": "alpha",
|
|
21
|
-
"@ai-sdk/openai": "alpha",
|
|
22
|
-
"@ai-sdk/provider": "alpha",
|
|
23
|
-
"@ai-sdk/xai": "alpha",
|
|
24
|
-
"@gaubee/node": "^0.2.2",
|
|
25
|
-
"@gaubee/nodekit": "^0.10.0",
|
|
26
|
-
"@gaubee/util": "^0.34.0",
|
|
27
|
-
"ai": "^4.3.16",
|
|
28
|
-
"commander": "^14.0.0",
|
|
29
|
-
"cosmiconfig": "^9.0.0",
|
|
30
|
-
"debug": "^4.4.1",
|
|
31
|
-
"defu": "^6.1.4",
|
|
32
|
-
"dotenv": "^17.0.0",
|
|
33
17
|
"import-meta-ponyfill": "^3.2.2",
|
|
34
|
-
"marked": "^16.0.0",
|
|
35
|
-
"ms": "^2.1.3",
|
|
36
|
-
"semver": "^7.7.2",
|
|
37
18
|
"ts-pattern": "^5.7.1",
|
|
38
19
|
"tslib": "^2.8.1",
|
|
39
|
-
"uuidv7": "^1.0.2",
|
|
40
20
|
"yargs": "^18.0.0",
|
|
41
|
-
"zod": "^3.25.
|
|
42
|
-
"@jixo/
|
|
43
|
-
"@jixo/mcp-pnpm": "^1.4.0"
|
|
21
|
+
"zod": "^3.25.76",
|
|
22
|
+
"@jixo/dev": "^1.11.4"
|
|
44
23
|
},
|
|
45
24
|
"devDependencies": {
|
|
46
25
|
"@parcel/watcher": "^2.5.1",
|
|
47
26
|
"@types/debug": "^4.1.12",
|
|
48
27
|
"@types/json-schema": "^7.0.15",
|
|
49
28
|
"@types/ms": "^2.1.0",
|
|
50
|
-
"@types/node": "^24.0.
|
|
29
|
+
"@types/node": "^24.0.12",
|
|
51
30
|
"@types/semver": "^7.7.0",
|
|
52
31
|
"@types/yargs": "^17.0.33"
|
|
53
32
|
},
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"daemon.d.ts","sourceRoot":"","sources":["../../src/commands/daemon.ts"],"names":[],"mappings":"AAKA,eAAO,MAAM,WAAW,YAGvB,CAAC;AAEF,eAAO,MAAM,UAAU,YAEtB,CAAC;AAEF,eAAO,MAAM,YAAY,YAGxB,CAAC;AAEF,eAAO,MAAM,aAAa,YAIzB,CAAC"}
|
package/dist/commands/daemon.js
DELETED
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import { green, red, yellow } from "@gaubee/nodekit";
|
|
2
|
-
// NOTE: This is a placeholder implementation. A robust solution would use
|
|
3
|
-
// libraries like 'pm2', 'forever', or manage PID files directly.
|
|
4
|
-
export const startDaemon = () => {
|
|
5
|
-
console.log(green("Starting JIXO Core service in the background... (stub)"));
|
|
6
|
-
console.log(yellow("In a real implementation, this would spawn the core service process."));
|
|
7
|
-
};
|
|
8
|
-
export const stopDaemon = () => {
|
|
9
|
-
console.log(red("Stopping JIXO Core service... (stub)"));
|
|
10
|
-
};
|
|
11
|
-
export const statusDaemon = () => {
|
|
12
|
-
console.log(yellow("Checking JIXO Core service status... (stub)"));
|
|
13
|
-
console.log("Service is not running (default stub response).");
|
|
14
|
-
};
|
|
15
|
-
export const restartDaemon = () => {
|
|
16
|
-
console.log(yellow("Restarting JIXO Core service... (stub)"));
|
|
17
|
-
stopDaemon();
|
|
18
|
-
startDaemon();
|
|
19
|
-
};
|
|
20
|
-
//# sourceMappingURL=daemon.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"daemon.js","sourceRoot":"","sources":["../../src/commands/daemon.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,KAAK,EAAE,GAAG,EAAE,MAAM,EAAC,MAAM,iBAAiB,CAAC;AAEnD,0EAA0E;AAC1E,iEAAiE;AAEjE,MAAM,CAAC,MAAM,WAAW,GAAG,GAAG,EAAE;IAC9B,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,wDAAwD,CAAC,CAAC,CAAC;IAC7E,OAAO,CAAC,GAAG,CAAC,MAAM,CAAC,sEAAsE,CAAC,CAAC,CAAC;AAC9F,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,UAAU,GAAG,GAAG,EAAE;IAC7B,OAAO,CAAC,GAAG,CAAC,GAAG,CAAC,sCAAsC,CAAC,CAAC,CAAC;AAC3D,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,YAAY,GAAG,GAAG,EAAE;IAC/B,OAAO,CAAC,GAAG,CAAC,MAAM,CAAC,6CAA6C,CAAC,CAAC,CAAC;IACnE,OAAO,CAAC,GAAG,CAAC,iDAAiD,CAAC,CAAC;AACjE,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,aAAa,GAAG,GAAG,EAAE;IAChC,OAAO,CAAC,GAAG,CAAC,MAAM,CAAC,wCAAwC,CAAC,CAAC,CAAC;IAC9D,UAAU,EAAE,CAAC;IACb,WAAW,EAAE,CAAC;AAChB,CAAC,CAAC","sourcesContent":["import {green, red, yellow} from \"@gaubee/nodekit\";\n\n// NOTE: This is a placeholder implementation. A robust solution would use\n// libraries like 'pm2', 'forever', or manage PID files directly.\n\nexport const startDaemon = () => {\n console.log(green(\"Starting JIXO Core service in the background... (stub)\"));\n console.log(yellow(\"In a real implementation, this would spawn the core service process.\"));\n};\n\nexport const stopDaemon = () => {\n console.log(red(\"Stopping JIXO Core service... (stub)\"));\n};\n\nexport const statusDaemon = () => {\n console.log(yellow(\"Checking JIXO Core service status... (stub)\"));\n console.log(\"Service is not running (default stub response).\");\n};\n\nexport const restartDaemon = () => {\n console.log(yellow(\"Restarting JIXO Core service... (stub)\"));\n stopDaemon();\n startDaemon();\n};\n"]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../../../src/commands/doctor/config.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAC,YAAY,EAAC,MAAM,YAAY,CAAC;AAE7C,eAAO,MAAM,cAAc,EAAE,YAc5B,CAAC"}
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import { blue, green } from "@gaubee/nodekit";
|
|
2
|
-
export const myDoctorConfig = [
|
|
3
|
-
{
|
|
4
|
-
id: "jixo-core-service",
|
|
5
|
-
displayName: "JIXO Core Service",
|
|
6
|
-
installationHint: `Ensure the JIXO Core service is running. You can start it with 'jixo daemon start'.`,
|
|
7
|
-
},
|
|
8
|
-
{
|
|
9
|
-
id: "pnpm",
|
|
10
|
-
displayName: "PNPM Package Manager",
|
|
11
|
-
versionCommand: "pnpm --version",
|
|
12
|
-
versionParseRegex: /(\d+\.\d+\.\d+)/, // Assumes pnpm --version outputs just the version or "X.Y.Z ..."
|
|
13
|
-
minVersion: "10.9.0",
|
|
14
|
-
installationHint: `Install pnpm via npm: ${green("npm install -g pnpm")}. Or visit ${blue("https://pnpm.io/installation")}`,
|
|
15
|
-
},
|
|
16
|
-
];
|
|
17
|
-
//# sourceMappingURL=config.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"config.js","sourceRoot":"","sources":["../../../src/commands/doctor/config.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,IAAI,EAAE,KAAK,EAAC,MAAM,iBAAiB,CAAC;AAG5C,MAAM,CAAC,MAAM,cAAc,GAAiB;IAC1C;QACE,EAAE,EAAE,mBAAmB;QACvB,WAAW,EAAE,mBAAmB;QAChC,gBAAgB,EAAE,qFAAqF;KACxG;IACD;QACE,EAAE,EAAE,MAAM;QACV,WAAW,EAAE,sBAAsB;QACnC,cAAc,EAAE,gBAAgB;QAChC,iBAAiB,EAAE,iBAAiB,EAAE,iEAAiE;QACvG,UAAU,EAAE,QAAQ;QACpB,gBAAgB,EAAE,yBAAyB,KAAK,CAAC,qBAAqB,CAAC,cAAc,IAAI,CAAC,8BAA8B,CAAC,EAAE;KAC5H;CACF,CAAC","sourcesContent":["import {blue, green} from \"@gaubee/nodekit\";\nimport type {DoctorConfig} from \"./types.js\";\n\nexport const myDoctorConfig: DoctorConfig = [\n {\n id: \"jixo-core-service\",\n displayName: \"JIXO Core Service\",\n installationHint: `Ensure the JIXO Core service is running. You can start it with 'jixo daemon start'.`,\n },\n {\n id: \"pnpm\",\n displayName: \"PNPM Package Manager\",\n versionCommand: \"pnpm --version\",\n versionParseRegex: /(\\d+\\.\\d+\\.\\d+)/, // Assumes pnpm --version outputs just the version or \"X.Y.Z ...\"\n minVersion: \"10.9.0\",\n installationHint: `Install pnpm via npm: ${green(\"npm install -g pnpm\")}. Or visit ${blue(\"https://pnpm.io/installation\")}`,\n },\n];\n"]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"doctor.d.ts","sourceRoot":"","sources":["../../../src/commands/doctor/doctor.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAC,YAAY,EAAE,YAAY,EAAkB,MAAM,YAAY,CAAC;AA4C5E,wBAAsB,SAAS,CAAC,MAAM,EAAE,YAAY,EAAE,SAAS,GAAE,OAAc,GAAG,OAAO,CAAC,YAAY,CAAC,CAkHtG"}
|