@jixo/cli 0.21.2 → 0.21.4

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.
@@ -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,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,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,5 @@
1
+ import { import_meta_ponyfill } from "import-meta-ponyfill";
2
+ export * from "./runCli.js";
3
+ export type AnyImportMeta = typeof import_meta_ponyfill extends (x: infer T) => any ? T : never;
4
+ export declare const tryRunCli: (importMeta: AnyImportMeta, args?: string[]) => void;
5
+ //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,UAAU,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAC,oBAAoB,EAAC,MAAM,sBAAsB,CAAC;AAE1D,cAAc,aAAa,CAAC;AAE5B,MAAM,MAAM,aAAa,GAAG,OAAO,oBAAoB,SAAS,CAAC,CAAC,EAAE,MAAM,CAAC,KAAK,GAAG,GAAG,CAAC,GAAG,KAAK,CAAC;AAChG,eAAO,MAAM,SAAS,GAAI,YAAY,aAAa,EAAE,OAAO,MAAM,EAAE,SAInE,CAAC"}
package/dist/index.js CHANGED
@@ -1,2 +1,11 @@
1
- export * from "./cli.js";
1
+ process.removeAllListeners("warning");
2
+ import { import_meta_ponyfill } from "import-meta-ponyfill";
3
+ import { runCli } from "./runCli.js";
4
+ export * from "./runCli.js";
5
+ export const tryRunCli = (importMeta, args) => {
6
+ if (import_meta_ponyfill(importMeta).main) {
7
+ runCli(args);
8
+ }
9
+ };
10
+ tryRunCli(import.meta);
2
11
  //# sourceMappingURL=index.js.map
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,UAAU,CAAC","sourcesContent":["export * from \"./cli.js\";\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,CAAC,kBAAkB,CAAC,SAAS,CAAC,CAAC;AACtC,OAAO,EAAC,oBAAoB,EAAC,MAAM,sBAAsB,CAAC;AAC1D,OAAO,EAAC,MAAM,EAAC,MAAM,aAAa,CAAC;AACnC,cAAc,aAAa,CAAC;AAG5B,MAAM,CAAC,MAAM,SAAS,GAAG,CAAC,UAAyB,EAAE,IAAe,EAAE,EAAE;IACtE,IAAI,oBAAoB,CAAC,UAAU,CAAC,CAAC,IAAI,EAAE,CAAC;QAC1C,MAAM,CAAC,IAAI,CAAC,CAAC;IACf,CAAC;AACH,CAAC,CAAC;AAEF,SAAS,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC","sourcesContent":["process.removeAllListeners(\"warning\");\nimport {import_meta_ponyfill} from \"import-meta-ponyfill\";\nimport {runCli} from \"./runCli.js\";\nexport * from \"./runCli.js\";\n\nexport type AnyImportMeta = typeof import_meta_ponyfill extends (x: infer T) => any ? T : never;\nexport const tryRunCli = (importMeta: AnyImportMeta, args?: string[]) => {\n if (import_meta_ponyfill(importMeta).main) {\n runCli(args);\n }\n};\n\ntryRunCli(import.meta);\n"]}
@@ -0,0 +1,6 @@
1
+ import { import_meta_ponyfill } from "import-meta-ponyfill";
2
+ export declare const runCli: (args?: string[]) => Promise<void>;
3
+ type AnyImportMeta = typeof import_meta_ponyfill extends (x: infer T) => any ? T : never;
4
+ export declare const tryRunCli: (importMeta: AnyImportMeta, args?: string[]) => void;
5
+ export {};
6
+ //# sourceMappingURL=runCli.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"runCli.d.ts","sourceRoot":"","sources":["../src/runCli.ts"],"names":[],"mappings":"AACA,OAAO,EAAC,oBAAoB,EAAC,MAAM,sBAAsB,CAAC;AAQ1D,eAAO,MAAM,MAAM,GAAU,OAAM,MAAM,EAAiB,kBAmBzD,CAAC;AACF,KAAK,aAAa,GAAG,OAAO,oBAAoB,SAAS,CAAC,CAAC,EAAE,MAAM,CAAC,KAAK,GAAG,GAAG,CAAC,GAAG,KAAK,CAAC;AACzF,eAAO,MAAM,SAAS,GAAI,YAAY,aAAa,EAAE,OAAO,MAAM,EAAE,SAInE,CAAC"}
@@ -24,7 +24,10 @@ export const runCli = async (args = process.argv) => {
24
24
  console.log(" " + "─".repeat(Math.max(4, process.stdout.columns - 2)));
25
25
  }
26
26
  };
27
- if (import_meta_ponyfill(import.meta).main) {
28
- runCli();
29
- }
30
- //# sourceMappingURL=cli.js.map
27
+ export const tryRunCli = (importMeta, args) => {
28
+ if (import_meta_ponyfill(importMeta).main) {
29
+ runCli(args);
30
+ }
31
+ };
32
+ tryRunCli(import.meta);
33
+ //# sourceMappingURL=runCli.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"runCli.js","sourceRoot":"","sources":["../src/runCli.ts"],"names":[],"mappings":"AAAA,OAAO,CAAC,kBAAkB,CAAC,SAAS,CAAC,CAAC;AACtC,O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E,IAAI,oBAAoB,CAAC,UAAU,CAAC,CAAC,IAAI,EAAE,CAAC;QAC1C,MAAM,CAAC,IAAI,CAAC,CAAC;IACf,CAAC;AACH,CAAC,CAAC;AAEF,SAAS,CAAC,MAAM,CAAC,IAAI,CAAC,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};\ntype AnyImportMeta = typeof import_meta_ponyfill extends (x: infer T) => any ? T : never;\nexport const tryRunCli = (importMeta: AnyImportMeta, args?: string[]) => {\n if (import_meta_ponyfill(importMeta).main) {\n runCli(args);\n }\n};\n\ntryRunCli(import.meta);\n"]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jixo/cli",
3
- "version": "0.21.2",
3
+ "version": "0.21.4",
4
4
  "type": "module",
5
5
  "bin": {
6
6
  "jixo": "./bundle/index.js"
@@ -10,9 +10,13 @@
10
10
  "dist"
11
11
  ],
12
12
  "exports": {
13
- ".": "./dist/index.js"
13
+ ".": {
14
+ "types": "./dist/index.d.ts",
15
+ "default": "./bundle/index.js"
16
+ },
17
+ "./dev": "./dist/index.js"
14
18
  },
15
- "dependencies": {
19
+ "peerDependencies": {
16
20
  "import-meta-ponyfill": "^3.2.2",
17
21
  "ts-pattern": "^5.7.1",
18
22
  "tslib": "^2.8.1",
@@ -20,14 +24,40 @@
20
24
  "zod": "^4.0.0",
21
25
  "@jixo/dev": "^1.12.0"
22
26
  },
27
+ "peerDependenciesMeta": {
28
+ "@jixo/dev": {
29
+ "optional": true
30
+ },
31
+ "import-meta-ponyfill": {
32
+ "optional": true
33
+ },
34
+ "ts-pattern": {
35
+ "optional": true
36
+ },
37
+ "tslib": {
38
+ "optional": true
39
+ },
40
+ "yargs": {
41
+ "optional": true
42
+ },
43
+ "zod": {
44
+ "optional": true
45
+ }
46
+ },
23
47
  "devDependencies": {
48
+ "import-meta-ponyfill": "^3.2.2",
49
+ "ts-pattern": "^5.7.1",
50
+ "tslib": "^2.8.1",
51
+ "yargs": "^18.0.0",
52
+ "zod": "^4.0.0",
24
53
  "@parcel/watcher": "^2.5.1",
25
54
  "@types/debug": "^4.1.12",
26
55
  "@types/json-schema": "^7.0.15",
27
56
  "@types/ms": "^2.1.0",
28
57
  "@types/node": "^24.1.0",
29
58
  "@types/semver": "^7.7.0",
30
- "@types/yargs": "^17.0.33"
59
+ "@types/yargs": "^17.0.33",
60
+ "@jixo/dev": "^1.12.0"
31
61
  },
32
62
  "scripts": {
33
63
  "build": "pnpm run '/^b\\:.*/'",
package/dist/cli.d.ts.map DELETED
@@ -1 +0,0 @@
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.map DELETED
@@ -1 +0,0 @@
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,CA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ill} 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"]}