@keyban/cli 0.1.1 → 0.1.3
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/index.mjs +9 -3
- package/dist/index.mjs.map +4 -4
- package/package.json +2 -2
package/dist/index.mjs
CHANGED
|
@@ -158938,6 +158938,7 @@ function parserFor(schema) {
|
|
|
158938
158938
|
try {
|
|
158939
158939
|
return JSON.parse(value);
|
|
158940
158940
|
} catch {
|
|
158941
|
+
if (type === "array") return value.split(",");
|
|
158941
158942
|
throw new Error(`expected JSON, got "${value}"`);
|
|
158942
158943
|
}
|
|
158943
158944
|
};
|
|
@@ -158961,7 +158962,7 @@ function commandFor(tool, document) {
|
|
|
158961
158962
|
const description = [
|
|
158962
158963
|
schema.description ?? "",
|
|
158963
158964
|
required2.has(field) ? "(required)" : "",
|
|
158964
|
-
|
|
158965
|
+
type === "array" ? "(a,b or JSON)" : type === "object" ? "(JSON)" : ""
|
|
158965
158966
|
].filter(Boolean).join(" ");
|
|
158966
158967
|
const option = new Option(isBoolean ? `--${flag}` : `--${flag} <value>`, description);
|
|
158967
158968
|
if (parse3) option.argParser(parse3);
|
|
@@ -174302,6 +174303,11 @@ function bootstrapWallet() {
|
|
|
174302
174303
|
return { tools, instructions, configured: !unconfigured };
|
|
174303
174304
|
}
|
|
174304
174305
|
|
|
174306
|
+
// src/lib/command-line.ts
|
|
174307
|
+
async function parseCommandLine(program2, argv = process.argv) {
|
|
174308
|
+
return program2.parseAsync(argv, { from: "node" });
|
|
174309
|
+
}
|
|
174310
|
+
|
|
174305
174311
|
// src/mcp.ts
|
|
174306
174312
|
init_mcp();
|
|
174307
174313
|
import { createServer as createServer3 } from "node:http";
|
|
@@ -176730,7 +176736,7 @@ ${wallet.instructions}`;
|
|
|
176730
176736
|
}
|
|
176731
176737
|
|
|
176732
176738
|
// src/index.ts
|
|
176733
|
-
var VERSION = true ? "0.1.
|
|
176739
|
+
var VERSION = true ? "0.1.3" : "0.0.0";
|
|
176734
176740
|
if (process.argv[2] !== "mcp" && !process.env.MCP_LOG_LEVEL) logger.setMinLevel("error");
|
|
176735
176741
|
function typedArgv(argv) {
|
|
176736
176742
|
if (argv[2] !== "__complete") return argv;
|
|
@@ -176747,7 +176753,7 @@ async function main() {
|
|
|
176747
176753
|
program2.addCommand(walletCommand(wallet));
|
|
176748
176754
|
program2.addCommand(await adminCommand(typedArgv(process.argv)));
|
|
176749
176755
|
addCompletion(program2);
|
|
176750
|
-
await program2
|
|
176756
|
+
await parseCommandLine(program2);
|
|
176751
176757
|
}
|
|
176752
176758
|
main().catch((error3) => {
|
|
176753
176759
|
logger.error("Fatal error", error3);
|