@jixo/cli 0.20.0 → 0.21.1
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/bundle/index.js +401 -0
- package/dist/cli.d.ts.map +1 -1
- package/dist/cli.js +17 -17
- package/dist/cli.js.map +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -3
- package/dist/index.js.map +1 -1
- package/package.json +9 -8
- package/dist/cli.d.ts +0 -2
- package/dist/commands/apply.d.ts +0 -9
- package/dist/commands/gen.d.ts +0 -9
- package/dist/commands/google-aistudio.d.ts +0 -8
- package/dist/index.d.ts +0 -2
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":"AASA,eAAO,MAAM,MAAM,GAAU,OAAM,MAAM,EAAiB,kBAmBzD,CAAC"}
|
package/dist/cli.js
CHANGED
|
@@ -1,25 +1,22 @@
|
|
|
1
1
|
process.removeAllListeners("warning");
|
|
2
|
-
import
|
|
3
|
-
import path from "node:path";
|
|
4
|
-
import { fileURLToPath } from "node:url";
|
|
2
|
+
import { import_meta_ponyfill } from "import-meta-ponyfill";
|
|
5
3
|
import yargs from "yargs";
|
|
6
4
|
import { hideBin } from "yargs/helpers";
|
|
7
5
|
import packageJson from "../package.json" with { type: "json" };
|
|
6
|
+
import { applyCommand } from "./commands/apply.js";
|
|
7
|
+
import { genCommand } from "./commands/gen.js";
|
|
8
|
+
import { googleAistudioCommand } from "./commands/google-aistudio.js";
|
|
8
9
|
export const runCli = async (args = process.argv) => {
|
|
9
|
-
let cli = yargs(hideBin(args))
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
cli = cli.command(commandModule[key]);
|
|
20
|
-
}
|
|
21
|
-
}
|
|
22
|
-
}
|
|
10
|
+
let cli = yargs(hideBin(args))
|
|
11
|
+
// jixo cli
|
|
12
|
+
.scriptName("jixo")
|
|
13
|
+
.version(packageJson.version)
|
|
14
|
+
.demandCommand(1, "You need at least one command before moving on")
|
|
15
|
+
.strict()
|
|
16
|
+
.help()
|
|
17
|
+
.command(applyCommand)
|
|
18
|
+
.command(genCommand)
|
|
19
|
+
.command(googleAistudioCommand);
|
|
23
20
|
const argv = await cli.parse();
|
|
24
21
|
// 如果没有命令被执行,显示帮助信息
|
|
25
22
|
if (argv._.length === 0) {
|
|
@@ -27,4 +24,7 @@ export const runCli = async (args = process.argv) => {
|
|
|
27
24
|
console.log(" " + "─".repeat(Math.max(4, process.stdout.columns - 2)));
|
|
28
25
|
}
|
|
29
26
|
};
|
|
27
|
+
if (import_meta_ponyfill(import.meta).main) {
|
|
28
|
+
runCli();
|
|
29
|
+
}
|
|
30
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,CAAC,kBAAkB,CAAC,SAAS,CAAC,CAAC;AACtC,OAAO,
|
|
1
|
+
{"version":3,"file":"cli.js","sourceRoot":"","sources":["../src/cli.ts"],"names":[],"mappings":"AAAA,OAAO,CAAC,kBAAkB,CAAC,SAAS,CAAC,CAAC;AACtC,OAAO,EAAC,oBAAoB,EAAC,MAAM,sBAAsB,CAAC;AAC1D,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;AAC9D,OAAO,EAAC,YAAY,EAAC,MAAM,qBAAqB,CAAC;AACjD,OAAO,EAAC,UAAU,EAAC,MAAM,mBAAmB,CAAC;AAC7C,OAAO,EAAC,qBAAqB,EAAC,MAAM,+BAA+B,CAAC;AAEpE,MAAM,CAAC,MAAM,MAAM,GAAG,KAAK,EAAE,OAAiB,OAAO,CAAC,IAAI,EAAE,EAAE;IAC5D,IAAI,GAAG,GAAG,KAAK,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC;QAC5B,WAAW;SACV,UAAU,CAAC,MAAM,CAAC;SAClB,OAAO,CAAC,WAAW,CAAC,OAAO,CAAC;SAC5B,aAAa,CAAC,CAAC,EAAE,gDAAgD,CAAC;SAClE,MAAM,EAAE;SACR,IAAI,EAAE;SACN,OAAO,CAAC,YAAY,CAAC;SACrB,OAAO,CAAC,UAAU,CAAC;SACnB,OAAO,CAAC,qBAAqB,CAAC,CAAC;IAElC,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;AAEF,IAAI,oBAAoB,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC,IAAI,EAAE,CAAC;IAC3C,MAAM,EAAE,CAAC;AACX,CAAC","sourcesContent":["process.removeAllListeners(\"warning\");\nimport {import_meta_ponyfill} from \"import-meta-ponyfill\";\nimport yargs from \"yargs\";\nimport {hideBin} from \"yargs/helpers\";\nimport packageJson from \"../package.json\" with {type: \"json\"};\nimport {applyCommand} from \"./commands/apply.js\";\nimport {genCommand} from \"./commands/gen.js\";\nimport {googleAistudioCommand} from \"./commands/google-aistudio.js\";\n\nexport const runCli = async (args: string[] = process.argv) => {\n let cli = yargs(hideBin(args))\n // jixo cli\n .scriptName(\"jixo\")\n .version(packageJson.version)\n .demandCommand(1, \"You need at least one command before moving on\")\n .strict()\n .help()\n .command(applyCommand)\n .command(genCommand)\n .command(googleAistudioCommand);\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\nif (import_meta_ponyfill(import.meta).main) {\n runCli();\n}\n"]}
|
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":"AAAA,cAAc,UAAU,CAAC"}
|
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,cAAc,UAAU,CAAC","sourcesContent":["export * from \"./cli.js\";\n"]}
|
package/package.json
CHANGED
|
@@ -1,36 +1,37 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@jixo/cli",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.21.1",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"bin": {
|
|
6
|
-
"jixo": "./
|
|
6
|
+
"jixo": "./bundle/index.js"
|
|
7
7
|
},
|
|
8
8
|
"files": [
|
|
9
9
|
"dist"
|
|
10
10
|
],
|
|
11
11
|
"exports": {
|
|
12
|
-
".":
|
|
13
|
-
"default": "./dist/index.js"
|
|
14
|
-
}
|
|
12
|
+
".": "./dist/index.js"
|
|
15
13
|
},
|
|
16
14
|
"dependencies": {
|
|
17
15
|
"import-meta-ponyfill": "^3.2.2",
|
|
18
16
|
"ts-pattern": "^5.7.1",
|
|
19
17
|
"tslib": "^2.8.1",
|
|
20
18
|
"yargs": "^18.0.0",
|
|
21
|
-
"zod": "^
|
|
22
|
-
"@jixo/dev": "^1.
|
|
19
|
+
"zod": "^4.0.0",
|
|
20
|
+
"@jixo/dev": "^1.12.0"
|
|
23
21
|
},
|
|
24
22
|
"devDependencies": {
|
|
25
23
|
"@parcel/watcher": "^2.5.1",
|
|
26
24
|
"@types/debug": "^4.1.12",
|
|
27
25
|
"@types/json-schema": "^7.0.15",
|
|
28
26
|
"@types/ms": "^2.1.0",
|
|
29
|
-
"@types/node": "^24.0
|
|
27
|
+
"@types/node": "^24.1.0",
|
|
30
28
|
"@types/semver": "^7.7.0",
|
|
31
29
|
"@types/yargs": "^17.0.33"
|
|
32
30
|
},
|
|
33
31
|
"scripts": {
|
|
32
|
+
"build": "pnpm run '/^b\\:.*/'",
|
|
33
|
+
"b:ts": "tsc --build",
|
|
34
|
+
"b:bundle": "tsdown",
|
|
34
35
|
"gen-prompts": "node ./scripts/gen-prompts.ts"
|
|
35
36
|
}
|
|
36
37
|
}
|
package/dist/cli.d.ts
DELETED
package/dist/commands/apply.d.ts
DELETED
|
@@ -1,9 +0,0 @@
|
|
|
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
|
package/dist/commands/gen.d.ts
DELETED
|
@@ -1,9 +0,0 @@
|
|
|
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
|
|
@@ -1,8 +0,0 @@
|
|
|
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
|
package/dist/index.d.ts
DELETED