@lzg14/deepseek-cli 0.1.1 → 0.1.2
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/ds.js +3 -3
- package/package.json +1 -1
package/dist/ds.js
CHANGED
|
@@ -80,8 +80,8 @@ ${n("Examples:")}
|
|
|
80
80
|
\x1B[1merror:\x1B[0m ${String(t)}
|
|
81
81
|
`),process.exit(w.UNKNOWN)}$();P();process.on("SIGINT",()=>{process.stderr.write(`
|
|
82
82
|
Interrupted. Exiting.
|
|
83
|
-
`),process.
|
|
83
|
+
`),process.exitCode=130});process.stdout.on("error",()=>{});process.stderr.on("error",()=>{});var Ce=[["auth","logout"],["config","show"],["config","set"],["models"]];async function ke(){let t=process.argv.slice(2);if(t.includes("--version")||t.includes("-v")){console.log(`ds ${N}`),process.exitCode=0;return}let e=W(t,A),o=y(),n=process.env.HTTPS_PROXY||process.env.https_proxy||process.env.HTTP_PROXY||process.env.http_proxy||o.proxy;if(t.includes("--help")||t.includes("-h")){S.printHelp(e,process.stderr),process.exitCode=0;return}if(e.length===0){if(S.printHelp([],process.stderr),!!o.apiKey){let{command:p}=S.resolve(["balance"]),g=O(t,[...A]),k=R(g);await p.execute(k,g)}else process.stderr.write(` Not logged in.
|
|
84
84
|
`),process.stderr.write(` ds auth login Login with your ds API key
|
|
85
85
|
|
|
86
|
-
`);process.
|
|
87
|
-
`),process.
|
|
86
|
+
`);process.exitCode=0;return}let{command:r,extra:s}=S.resolve(e),a=t.slice(e.length),i=O(a,[...A,...r.options??[]]);s.length>0&&(i._positional=s);let m=R(i);if(!Ce.some(l=>l.every((p,g)=>e[g]===p))&&!m.apiKey){let l=process.env.ds_API_KEY;if(!l){process.stderr.write(`Error: No API key found. Run "ds auth login" or set ds_API_KEY env var.
|
|
87
|
+
`),process.exitCode=1;return}m.apiKey=l}await r.execute(m,i)}ke().catch(de);
|