@jixo/cli 0.23.7 → 0.24.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/assets/bundle/google-aistudio.browser.js +342 -80
- package/assets/bundle/groq.browser.js +3714 -0
- package/assets/prompt.json +1 -4
- package/bundle/external-CS43xY0F.js +285 -0
- package/bundle/file-replacer-cUUAxJ6b.js +19525 -0
- package/bundle/file-replacer-nbB4NnrU.js +3 -0
- package/bundle/gen-prompt-BxI7DHUD.js +4 -0
- package/bundle/gen-prompt-qt1W8jAy.js +18145 -0
- package/bundle/index.js +24850 -58304
- package/dist/commands/groq.d.ts +8 -0
- package/dist/commands/groq.d.ts.map +1 -0
- package/dist/commands/groq.js +70 -0
- package/dist/commands/groq.js.map +1 -0
- package/dist/runCli.d.ts.map +1 -1
- package/dist/runCli.js +3 -1
- package/dist/runCli.js.map +1 -1
- package/package.json +3 -3
- /package/bundle/{acorn-BoNAepQd.js → acorn-CU7YmuGp.js} +0 -0
- /package/bundle/{angular-pDmFHCFc.js → angular-BZFEnvyh.js} +0 -0
- /package/bundle/{babel-CxK7_76E.js → babel-BC5Ty8sN.js} +0 -0
- /package/bundle/{estree-CfdzwKX-.js → estree-DZTSfOv_.js} +0 -0
- /package/bundle/{flow-CGeR1fbg.js → flow-CNTeHoxv.js} +0 -0
- /package/bundle/{glimmer-CX3iu1jj.js → glimmer-DYkbcawC.js} +0 -0
- /package/bundle/{graphql-C32NbEjQ.js → graphql-fCaNVuM0.js} +0 -0
- /package/bundle/{html-BYSSlHHY.js → html-Bb8ztcZq.js} +0 -0
- /package/bundle/{markdown-DiTmrgL1.js → markdown-ChusAllR.js} +0 -0
- /package/bundle/{meriyah-DM8jkzWU.js → meriyah-9NeL3We4.js} +0 -0
- /package/bundle/{postcss-Au71UEeZ.js → postcss-DXCUuMfC.js} +0 -0
- /package/bundle/{typescript-Dn4uCwAY.js → typescript-C2HFEnMP.js} +0 -0
- /package/bundle/{yaml-D6G3z4bP.js → yaml-ByEZ6gmG.js} +0 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"groq.d.ts","sourceRoot":"","sources":["../../src/commands/groq.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAC,aAAa,EAAC,MAAM,OAAO,CAAC;AA+DzC;;;;GAIG;AACH,eAAO,MAAM,WAAW,EAAE,aAAa,CAAC,MAAM,EAAE,MAAM,CAerD,CAAC"}
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
import { prompts } from "@gaubee/nodekit";
|
|
2
|
+
import { doInit, startServe } from "@jixo/dev/groq";
|
|
3
|
+
const openaiApiCommand = {
|
|
4
|
+
command: "openai [dir]",
|
|
5
|
+
aliases: ["ai", "A"],
|
|
6
|
+
describe: "openai-api by console.groq.com",
|
|
7
|
+
builder: (yargs) => yargs
|
|
8
|
+
.positional("dir", {
|
|
9
|
+
describe: "Directory for aistudio output contents",
|
|
10
|
+
type: "string",
|
|
11
|
+
default: process.cwd(),
|
|
12
|
+
})
|
|
13
|
+
.option("port", {
|
|
14
|
+
alias: "P",
|
|
15
|
+
type: "number",
|
|
16
|
+
describe: "Watch for browser response automatically",
|
|
17
|
+
default: 18333,
|
|
18
|
+
}),
|
|
19
|
+
handler: async (argv) => {
|
|
20
|
+
startServe({ dir: argv.dir, port: argv.port });
|
|
21
|
+
},
|
|
22
|
+
};
|
|
23
|
+
const initCommand = {
|
|
24
|
+
command: "init [dir]",
|
|
25
|
+
aliases: ["i", "I"],
|
|
26
|
+
describe: "init an browser-kit directory for aistudio.google.com",
|
|
27
|
+
builder: (yargs) => yargs
|
|
28
|
+
.positional("dir", {
|
|
29
|
+
describe: "Directory for aistudio input/output contents",
|
|
30
|
+
type: "string",
|
|
31
|
+
})
|
|
32
|
+
.option("force", {
|
|
33
|
+
alias: "F",
|
|
34
|
+
type: "boolean",
|
|
35
|
+
describe: "override exits files",
|
|
36
|
+
}),
|
|
37
|
+
handler: async (argv) => {
|
|
38
|
+
let { dir } = argv;
|
|
39
|
+
if (dir == null) {
|
|
40
|
+
dir = await prompts.input({
|
|
41
|
+
message: "No directory specified. Do you want to use the default '.ai' directory?",
|
|
42
|
+
default: ".ai", // 默认值为 Yes
|
|
43
|
+
});
|
|
44
|
+
}
|
|
45
|
+
doInit({
|
|
46
|
+
...argv,
|
|
47
|
+
dir,
|
|
48
|
+
});
|
|
49
|
+
},
|
|
50
|
+
};
|
|
51
|
+
/**
|
|
52
|
+
* @jixo/cli google-aistudio
|
|
53
|
+
*
|
|
54
|
+
* Group of commands for interacting with Google AI Studio.
|
|
55
|
+
*/
|
|
56
|
+
export const groqCommand = {
|
|
57
|
+
command: "groq <command>",
|
|
58
|
+
aliases: [],
|
|
59
|
+
describe: "Commands for Groq Playground integration",
|
|
60
|
+
builder: (yargs) => {
|
|
61
|
+
// 将 syncCommand 注册为 google-aistudio 的子命令
|
|
62
|
+
return (yargs
|
|
63
|
+
.command(openaiApiCommand)
|
|
64
|
+
//
|
|
65
|
+
.demandCommand(1, "You must provide a sub-command for 'groq'."));
|
|
66
|
+
},
|
|
67
|
+
// 这个 handler 理论上不会被执行,因为 yargs 会要求一个子命令
|
|
68
|
+
handler: () => { },
|
|
69
|
+
};
|
|
70
|
+
//# sourceMappingURL=groq.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"groq.js","sourceRoot":"","sources":["../../src/commands/groq.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,OAAO,EAAC,MAAM,iBAAiB,CAAC;AACxC,OAAO,EAAC,MAAM,EAAE,UAAU,EAAC,MAAM,gBAAgB,CAAC;AASlD,MAAM,gBAAgB,GAAuC;IAC3D,OAAO,EAAE,cAAc;IACvB,OAAO,EAAE,CAAC,IAAI,EAAE,GAAG,CAAC;IACpB,QAAQ,EAAE,gCAAgC;IAC1C,OAAO,EAAE,CAAC,KAAK,EAAE,EAAE,CACjB,KAAK;SACF,UAAU,CAAC,KAAK,EAAE;QACjB,QAAQ,EAA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;IACzB,OAAO,EAAE,EAAE;IACX,QAAQ,EAAE,0CAA0C;IACpD,OAAO,EAAE,CAAC,KAAK,EAAE,EAAE;QACjB,yCAAyC;QACzC,OAAO,CACL,KAAK;aACF,OAAO,CAAC,gBAAgB,CAAC;YAC1B,EAAE;aACD,aAAa,CAAC,CAAC,EAAE,4CAA4C,CAAC,CAClE,CAAC;IACJ,CAAC;IACD,wCAAwC;IACxC,OAAO,EAAE,GAAG,EAAE,GAAE,CAAC;CAClB,CAAC","sourcesContent":["import {prompts} from \"@gaubee/nodekit\";\nimport {doInit, startServe} from \"@jixo/dev/groq\";\nimport type {CommandModule} from \"yargs\";\n\n// 定义 yargs builder 所需的参数接口\n\ninterface BrowserArgs {\n dir?: string;\n}\n\nconst openaiApiCommand: CommandModule<object, BrowserArgs> = {\n command: \"openai [dir]\",\n aliases: [\"ai\", \"A\"],\n describe: \"openai-api by console.groq.com\",\n builder: (yargs) =>\n yargs\n .positional(\"dir\", {\n describe: \"Directory for aistudio output contents\",\n type: \"string\",\n default: process.cwd(),\n })\n .option(\"port\", {\n alias: \"P\",\n type: \"number\",\n describe: \"Watch for browser response automatically\",\n default: 18333,\n }),\n handler: async (argv) => {\n startServe({dir: argv.dir!, port: argv.port as number});\n },\n};\ninterface InitOptions {\n dir?: string;\n force?: boolean;\n}\nconst initCommand: CommandModule<object, InitOptions> = {\n command: \"init [dir]\",\n aliases: [\"i\", \"I\"],\n describe: \"init an browser-kit directory for aistudio.google.com\",\n builder: (yargs) =>\n yargs\n .positional(\"dir\", {\n describe: \"Directory for aistudio input/output contents\",\n type: \"string\",\n })\n .option(\"force\", {\n alias: \"F\",\n type: \"boolean\",\n describe: \"override exits files\",\n }),\n handler: async (argv) => {\n let {dir} = argv;\n if (dir == null) {\n dir = await prompts.input({\n message: \"No directory specified. Do you want to use the default '.ai' directory?\",\n default: \".ai\", // 默认值为 Yes\n });\n }\n doInit({\n ...argv,\n dir,\n });\n },\n};\n\n/**\n * @jixo/cli google-aistudio\n *\n * Group of commands for interacting with Google AI Studio.\n */\nexport const groqCommand: CommandModule<object, object> = {\n command: \"groq <command>\",\n aliases: [],\n describe: \"Commands for Groq Playground integration\",\n builder: (yargs) => {\n // 将 syncCommand 注册为 google-aistudio 的子命令\n return (\n yargs\n .command(openaiApiCommand)\n //\n .demandCommand(1, \"You must provide a sub-command for 'groq'.\")\n );\n },\n // 这个 handler 理论上不会被执行,因为 yargs 会要求一个子命令\n handler: () => {},\n};\n"]}
|
package/dist/runCli.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"runCli.d.ts","sourceRoot":"","sources":["../src/runCli.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"runCli.d.ts","sourceRoot":"","sources":["../src/runCli.ts"],"names":[],"mappings":"AASA,eAAO,MAAM,MAAM,GAAU,OAAM,MAAM,EAAiB,kBAoBzD,CAAC"}
|
package/dist/runCli.js
CHANGED
|
@@ -5,6 +5,7 @@ import packageJson from "../package.json" with { type: "json" };
|
|
|
5
5
|
import { applyCommand } from "./commands/apply.js";
|
|
6
6
|
import { genCommand } from "./commands/gen.js";
|
|
7
7
|
import { googleAistudioCommand } from "./commands/google-aistudio.js";
|
|
8
|
+
import { groqCommand } from "./commands/groq.js";
|
|
8
9
|
export const runCli = async (args = process.argv) => {
|
|
9
10
|
let cli = yargs(hideBin(args))
|
|
10
11
|
// jixo cli
|
|
@@ -15,7 +16,8 @@ export const runCli = async (args = process.argv) => {
|
|
|
15
16
|
.help()
|
|
16
17
|
.command(applyCommand)
|
|
17
18
|
.command(genCommand)
|
|
18
|
-
.command(googleAistudioCommand)
|
|
19
|
+
.command(googleAistudioCommand)
|
|
20
|
+
.command(groqCommand);
|
|
19
21
|
const argv = await cli.parse();
|
|
20
22
|
// 如果没有命令被执行,显示帮助信息
|
|
21
23
|
if (argv._.length === 0) {
|
package/dist/runCli.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"runCli.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,CAAC,YAAY,CAAC;SACrB,OAAO,CAAC,UAAU,CAAC;SACnB,OAAO,CAAC,qBAAqB,CAAC;SAC9B,OAAO,CAAC,WAAW,CAAC,CAAC;IAExB,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 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\";\nimport {groqCommand} from \"./commands/groq.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 .command(groqCommand);\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"]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@jixo/cli",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.24.1",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"bin": {
|
|
6
6
|
"jixo": "./bundle/index.js"
|
|
@@ -26,7 +26,7 @@
|
|
|
26
26
|
"tslib": "^2.8.1",
|
|
27
27
|
"yargs": "^18.0.0",
|
|
28
28
|
"zod": "^4.0.0",
|
|
29
|
-
"@jixo/dev": "^1.
|
|
29
|
+
"@jixo/dev": "^1.15.1"
|
|
30
30
|
},
|
|
31
31
|
"peerDependenciesMeta": {
|
|
32
32
|
"@jixo/dev": {
|
|
@@ -60,7 +60,7 @@
|
|
|
60
60
|
"tslib": "^2.8.1",
|
|
61
61
|
"yargs": "^18.0.0",
|
|
62
62
|
"zod": "^4.0.0",
|
|
63
|
-
"@jixo/dev": "^1.
|
|
63
|
+
"@jixo/dev": "^1.15.1"
|
|
64
64
|
},
|
|
65
65
|
"scripts": {
|
|
66
66
|
"build": "pnpm run \"/^b\\:.*/\"",
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|