fluxflow-cli 4.8.1 → 4.8.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.
|
@@ -1 +1 @@
|
|
|
1
|
-
import{$ as r,L as b,M as c,N as d,O as e,P as f,Q as g,R as h,S as i,T as j,U as k,V as l,W as m,X as n,Y as o,Z as p,_ as q}from"./chunk-
|
|
1
|
+
import{$ as r,L as b,M as c,N as d,O as e,P as f,Q as g,R as h,S as i,T as j,U as k,V as l,W as m,X as n,Y as o,Z as p,_ as q}from"./chunk-5YM6FBDD.js";import"./chunk-LXTPAZBK.js";import"./chunk-S27ZX6SS.js";import{c as a}from"./chunk-4C4RG42K.js";import"./chunk-SIINYZWE.js";import"./chunk-4TZKD2XR.js";import"./chunk-56EJGQU3.js";import"./chunk-GPHO47JC.js";export{c as RE_LEADING_THINK,o as compressHistory,b as convertChannelThinkTags,p as deleteChatSummary,e as findGenuineThinkClose,q as getAIStream,i as getCleanGroupedLength,l as getGoogleClient,f as getLeadingThinkBlock,n as initAI,d as isInsideBacktick,a as isModelMultimodal,k as isTerminationSignaled,m as runJanitorTask,r as runSubagent,j as signalTermination,g as stripLeadingThinking,h as stripNakedXmlTags};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{A as Ii,B as Ai,C as Li,D as cr,E as Oi,F as Pi,G as Ni,H as Fi,I as is,J as jo,K as ur,T as $i,W as Xi,X as On,Y as _i,Z as Hi,_ as Gi,a as yt,b as ht,c as ut,d as Mi,e as os,f as ns,g as In,h as Bi,i as ho,j as Ei,k as je,l as Qe,m as lr,n as An,o as rs,p as vi,q as an,r as Wt,s as Di,t as ar,u as ki,v as Ln,w as Ao,x as dn,y as dr,z as ss}from"./chunk-
|
|
1
|
+
import{A as Ii,B as Ai,C as Li,D as cr,E as Oi,F as Pi,G as Ni,H as Fi,I as is,J as jo,K as ur,T as $i,W as Xi,X as On,Y as _i,Z as Hi,_ as Gi,a as yt,b as ht,c as ut,d as Mi,e as os,f as ns,g as In,h as Bi,i as ho,j as Ei,k as je,l as Qe,m as lr,n as An,o as rs,p as vi,q as an,r as Wt,s as Di,t as ar,u as ki,v as Ln,w as Ao,x as dn,y as dr,z as ss}from"./chunk-5YM6FBDD.js";import{b as ln,c as Zr,k as Ti}from"./chunk-LXTPAZBK.js";import{b as ts}from"./chunk-IBEWFYB6.js";import{a as bi,b as yi,c as sr,d as ir,f as bt,g as Vo,h as es,l as Si}from"./chunk-S27ZX6SS.js";import{a as hi,b as xi,c as pi,e as Io,f as ro,g as wi,h as Rr,i as kt}from"./chunk-4C4RG42K.js";import{c as mi,d as gi,e as fi}from"./chunk-SIINYZWE.js";import{e as Ci}from"./chunk-7PJOF5I2.js";import{a as ko,b as kn,c as no,d as rr,e as zr,j as Jr}from"./chunk-4TZKD2XR.js";import{a as Ui}from"./chunk-56EJGQU3.js";import"./chunk-GPHO47JC.js";import Ds from"os";import e,{useState as Q,useEffect as ze,useRef as Ve,useMemo as fn}from"react";import{Box as u,Text as s,useInput as Bd,useStdout as Ed,Static as vd}from"ink";import Dd from"ink-spinner";import st from"fs-extra";import St from"path";import{exec as mo}from"child_process";import{fileURLToPath as kd}from"url";import Ut,{useState as mr,useEffect as ls,useMemo as Pn,useCallback as zl,useRef as xo}from"react";import{Box as Jl,Text as eo,useInput as Zl}from"ink";function Rl(t,f){return t.replace(/\t/g," ".repeat(f))}function gr(t){return t==null?"":t.replace(/\r\n/g,`
|
|
2
2
|
`).replace(/\r/g,`
|
|
3
3
|
`)}function Ko(t,f,x){let S=t,T=[...f].sort((i,E)=>i.start-E.start),w=0;for(let i of T){let E=i.start-w,m=gr(i.text).split(`
|
|
4
4
|
`).length,B=i.text.length,M=(m>3?`[Pasted ${m} lines]`:`[Pasted ${B} chars]`).length,$=E+M;if(t<=E)break;if(t<$){S=i.end;break}else{let v=i.text.length-M;S+=v,w+=v}}return Math.min(S,x.length)}function as(t,f,x,S,T=[]){let w=(t||"").slice(0,f),i=S(w).length,E=S(t||""),m=[...T].sort((O,L)=>L.start-O.start);for(let O of m){let L=S(t.slice(0,O.start)).length,X=S(O.text),te=L+X.length,le=gr(O.text).split(`
|
|
@@ -168,7 +168,7 @@ fluxflow [options]
|
|
|
168
168
|
* OLLAMA_HOST \u2192 Custom Ollama endpoint (default: http://127.0.0.1:11434)
|
|
169
169
|
* SHELL \u2192 Terminal shell executable
|
|
170
170
|
* HIGH_CONTEXT \u2192 Context window override (false or integer 32k..1M)
|
|
171
|
-
* ENABLE_9ROUTER \u2192
|
|
171
|
+
* ENABLE_9ROUTER \u2192 Enables 9Router provider. Can use OAuth subscription like Codex, Claude Code, GitHub Copilot etc. or use providers not natively in Fluxflow. Set ENV ENABLE_9ROUTER=true, needs 9router package installed (via npm/npx etc) & running
|
|
172
172
|
* 9ROUTER_BASE_URL \u2192 9Router base URL
|
|
173
173
|
|
|
174
174
|
## Diagnostic & Optimization Flags
|
|
@@ -368,7 +368,7 @@ Route sub-agent workloads to faster/cheaper models independently of the main age
|
|
|
368
368
|
|
|
369
369
|
* Models are shown for providers whose API key is used before in fluxflow
|
|
370
370
|
|
|
371
|
-
### 2. Environment Variables for Custom Sub-Agent models (.fluxflow
|
|
371
|
+
### 2. Environment Variables for Custom Sub-Agent models (.env.fluxflow or Shell)
|
|
372
372
|
* SUBAGENT_MODEL \u2192 Target model override
|
|
373
373
|
* SUBAGENT_PROVIDER \u2192 Target provider override
|
|
374
374
|
* Setting SubAgentModel=ENV in settings pulls directly from environment overrides
|
|
@@ -441,7 +441,7 @@ Route sub-agent workloads to faster/cheaper models independently of the main age
|
|
|
441
441
|
* Fluxflow has default model list for many providers, updated based on vibes. Can be overriden using /model <model-id>
|
|
442
442
|
|
|
443
443
|
## Setup: Local NVIDIA NIM (OpenAI-Compatible)
|
|
444
|
-
1. Environment Variables (.fluxflow
|
|
444
|
+
1. Environment Variables (.env.fluxflow or shell):
|
|
445
445
|
* NVIDIA_BASE_URL = http://<host>:<port>/v1/chat/completions (or custom OpenAI endpoint)
|
|
446
446
|
* NVIDIA_API_KEY = Optional API key (if NIM container requires authentication)
|
|
447
447
|
2. Switch Provider: Select NVIDIA in /settings \u2192 Providers
|
|
@@ -830,14 +830,14 @@ Stack: ${a.stack}`:"";return`ERROR: Failed to map file: ${i}${p}`}};import Qn fr
|
|
|
830
830
|
${l}`}return`SUCCESS: TASK LIST CREATED (${u} total)
|
|
831
831
|
${l}`}if(t==="append"){if(!o)return'ERROR: Missing "tasks" for append method.';let l=d(o);await ht.recordFileChange(i),Qn.appendFileSync(i,l,"utf8");let f=Qn.readFileSync(i,"utf8"),u=f.split(/\r?\n/).map(h=>h.trim()),m=u.filter(h=>h.startsWith("- [ ]")||h.startsWith("- [x]")||h.startsWith("- [X]")).length,g=u.filter(h=>h.startsWith("- [x]")||h.startsWith("- [X]")).length,y=l.split(/\r?\n/).map(h=>h.trim()).filter(h=>h.startsWith("- [ ]")||h.startsWith("- [x]")||h.startsWith("- [X]")).length;return`SUCCESS: TASK APPENDED (${g} completed, ${m-g} left, ${y} added)
|
|
832
832
|
${f}`}if(t==="get"){if(!Qn.existsSync(i))return"TODO GET: No task list found for this session.";let l=Qn.readFileSync(i,"utf8"),f=0;if(s){let h=c(l,s);h.markedCount>0&&(l=h.content,f=h.markedCount,await ht.recordFileChange(i),Qn.writeFileSync(i,l,"utf8"))}let u=l.split(/\r?\n/).map(h=>h.trim()),m=u.filter(h=>h.startsWith("- [ ]")||h.startsWith("- [x]")||h.startsWith("- [X]")).length,g=u.filter(h=>h.startsWith("- [x]")||h.startsWith("- [X]")).length;return`${f>0?`SUCCESS: ${f} TASK(S) MARKED DONE`:"TODO GET"}: ${g} Completed, ${m-g} left
|
|
833
|
-
${l}`}return`ERROR: Unknown method "${t}". Use create, append, or get.`}catch(l){return`ERROR: Todo tool failure: ${l instanceof Error?l.message:String(l)}`}};var Xr=async(e,n={})=>{let{runSubagent:t}=await import("./ai-
|
|
834
|
-
`),d}catch(d){let{isTerminationSignaled:c}=await import("./ai-
|
|
835
|
-
`)}return`ERROR: Subagent execution failed: ${d.message}`}};var Ha=async(e,n={})=>{let{runSubagent:t}=await import("./ai-
|
|
833
|
+
${l}`}return`ERROR: Unknown method "${t}". Use create, append, or get.`}catch(l){return`ERROR: Todo tool failure: ${l instanceof Error?l.message:String(l)}`}};var Xr=async(e,n={})=>{let{runSubagent:t}=await import("./ai-O2P2GKC7.js"),o=L(e),s=o.task||o.instruction||o.prompt,r=o.model||null,a=o.tools||null;if(!s)return'ERROR: Missing "task" argument for invokeSync.';let i=null;if(a)try{let d=a.trim();d.startsWith("[")&&d.endsWith("]")&&(d=d.substring(1,d.length-1)),i=d.split(",").map(c=>c.trim().replace(/^["']|["']$/g,"")).filter(Boolean)}catch{}let p=o.title||s.substring(0,30);try{n.onVisualFeedback&&n.onVisualFeedback(`\x1B[95mSubAgent\x1B[0m: \x1B[32mGeneralist\x1B[0m \u2192 ${p}`);let d=await t(s,n,r,i,50);return n.onVisualFeedback&&n.onVisualFeedback(`\x1B[95mSubAgent\x1B[0m: \x1B[32mGeneralist\x1B[0m \u2192 ${p} [COMPLETED]
|
|
834
|
+
`),d}catch(d){let{isTerminationSignaled:c}=await import("./ai-O2P2GKC7.js"),l=d.message==="Subagent task was cancelled by user."||c();if(n.onVisualFeedback){let f=l?"[CANCELLED]":"[FAILED]";n.onVisualFeedback(`\x1B[95mSubAgent\x1B[0m: \x1B[32mGeneralist\x1B[0m \u2192 ${p} ${f}
|
|
835
|
+
`)}return`ERROR: Subagent execution failed: ${d.message}`}};var Ha=async(e,n={})=>{let{runSubagent:t}=await import("./ai-O2P2GKC7.js"),o=L(e),s=o.task||o.instruction||o.prompt,r=o.model||null,a=o.title||null,i=o.tools||null;if(!s)return'ERROR: Missing "task" argument for invoke.';let p=null;if(i)try{let h=i.trim();h.startsWith("[")&&h.endsWith("]")&&(h=h.substring(1,h.length-1)),p=h.split(",").map(x=>x.trim().replace(/^["']|["']$/g,"")).filter(Boolean)}catch{}let d=`subagent-${Date.now()}-${Math.floor(Math.random()*1e3)}`,c=null,l=null,f=new Promise((h,x)=>{c=h,l=x}),u={id:d,title:a||s.substring(0,30),task:s,status:"running",startedAt:Date.now(),lastChunkTime:Date.now(),wps:0,questions:[],pendingSteerMessages:[],steer:h=>{h&&u.pendingSteerMessages.push(h)},completionPromise:f,_resolveCompletion:c,_rejectCompletion:l,progress:[]},m={chunks:[],totalWords:0};Qe.push(u),n.onSubagentUpdate&&n.onSubagentUpdate();let g=[],y={...n,taskId:d,onAskMain:async h=>{let x=`q-${Date.now()}-${Math.floor(Math.random()*1e3)}`,w=null,T=new Promise(S=>{w=S}),$={id:x,question:h,answered:!1,answer:null,askedAt:Date.now(),_resolve:w};return u.questions.push($),u.status="waiting",n.onSubagentUpdate&&n.onSubagentUpdate(),Rs(`[SYSTEM] Background subagent "${u.title}" is WAITING FOR YOUR INPUT: "${h}"
|
|
836
836
|
Respond using tool: [tool:functions.Answer(id="${d}", answer="...")]
|
|
837
837
|
[/SYSTEM]`),await T},onVisualFeedback:h=>{u.lastChunkTime=Date.now();let x=h.replace(/\x1b\[[0-9;]*m/g,""),w=x.match(/[✔✘✗✖🔍📖→➕↻•]\s*([A-Za-z0-9\s-]+)/);w?u.currentTool=w[1].trim():u.currentTool=x,n.onSubagentUpdate&&n.onSubagentUpdate()},onTokenChunk:(h,x)=>{let w=Date.now();if(u.lastChunkTime=w,u.currentTool="Thinking",typeof x=="number"&&x>0){m.totalWords+=x,m.chunks.push({time:w,words:x});let T=w-400;if(m.chunks=m.chunks.filter($=>$.time>=T),m.chunks.length>0){let $=m.chunks.reduce((k,_)=>k+_.words,0),R=m.chunks[0].time,S=Math.max(.4,(w-R)/1e3);u.wps=Math.round($/S*10)/10}}n.onSubagentUpdate&&n.onSubagentUpdate()}};return t(s,y,r,p,50,h=>{if(u.status==="cancelled")return;if(h.startsWith("[Subagent Turn")&&g.length>0&&(u.progress.push([...g]),g=[]),h.includes("[Executing Tool]")){let w=h.match(/\[Executing Tool\]\s*([a-zA-Z0-9_]+)/);w&&(!u.currentTool||u.currentTool==="Thinking")&&(u.currentTool=w[1])}let x=h;if(x.startsWith("[Tool Result]")){let w=x.split(`
|
|
838
838
|
`);w.length>5&&(x=w.slice(0,4).join(`
|
|
839
839
|
`)+`
|
|
840
|
-
... [Content/Diff Truncated from Logs] ...`)}g.push(x),n.onSubagentUpdate&&n.onSubagentUpdate()},!0).then(h=>{if(u.status==="cancelled"){u._resolveCompletion&&u._resolveCompletion(h);return}g.length>0&&(u.progress.push([...g]),g=[]),u.status="completed",u.finalAnswer=h,n.onSubagentUpdate&&n.onSubagentUpdate(),Rs(`[SYSTEM] Background subagent "${u.title}" (id: ${d}) has FINISHED. Call GetProgress(id="${d}") to see the final result. [/SYSTEM]`),u._resolveCompletion&&u._resolveCompletion(h)}).catch(async h=>{let{isTerminationSignaled:x}=await import("./ai-
|
|
840
|
+
... [Content/Diff Truncated from Logs] ...`)}g.push(x),n.onSubagentUpdate&&n.onSubagentUpdate()},!0).then(h=>{if(u.status==="cancelled"){u._resolveCompletion&&u._resolveCompletion(h);return}g.length>0&&(u.progress.push([...g]),g=[]),u.status="completed",u.finalAnswer=h,n.onSubagentUpdate&&n.onSubagentUpdate(),Rs(`[SYSTEM] Background subagent "${u.title}" (id: ${d}) has FINISHED. Call GetProgress(id="${d}") to see the final result. [/SYSTEM]`),u._resolveCompletion&&u._resolveCompletion(h)}).catch(async h=>{let{isTerminationSignaled:x}=await import("./ai-O2P2GKC7.js");if(h.message==="Subagent task was cancelled."||u.status==="cancelled"||x()){u.status="cancelled",g.push("[SUBAGENT CANCELLED] Task was cancelled."),u.progress.push([...g]),n.onSubagentUpdate&&n.onSubagentUpdate(),u._resolveCompletion&&u._resolveCompletion(null);return}g.push(`[SUBAGENT FAILURE] Error: ${h.message}`),u.progress.push([...g]),u.status="failed",u.error=h.message,n.onSubagentUpdate&&n.onSubagentUpdate(),Rs(`[SYSTEM] Background subagent "${u.title}" (id: ${d}) FAILED with error: ${h.message}. [/SYSTEM]`),u._rejectCompletion&&u._rejectCompletion(h)}),`SUCCESS: Background subagent started. Task ID: ${d}`};var Jr=async(e,n={})=>{let o=L(e).id;if(!o)return'ERROR: Missing "id" argument for getProgress.';let s=Qe.find(i=>i.id===o);if(!s)return`ERROR: Subagent task with ID [${o}] not found.`;let r=`Subagent Task Status: ${s.status.toUpperCase()}
|
|
841
841
|
`;if(r+=`Title: ${s.title}
|
|
842
842
|
`,r+=`Task: ${s.task}
|
|
843
843
|
`,s.startedAt){let i=Math.floor((Date.now()-s.startedAt)/1e3);r+=`Elapsed Time: ${i}s
|
package/dist/cli.js
CHANGED
|
@@ -63,4 +63,4 @@ Usage: fluxflow --export error`),process.exit(1)}if($&&(console.log(`v${g}`),pro
|
|
|
63
63
|
/docs View documentation
|
|
64
64
|
/fluxflow init Create FluxFlow.md template
|
|
65
65
|
/update check Check for new version
|
|
66
|
-
/update latest Install latest release`),process.exit(0)),R){let v=e[1]||"latest";if(v==="check"){let u=e[2]==="latest";try{let h=(await(await fetch("https://registry.npmjs.org/fluxflow-cli",{cache:"no-store"})).json())["dist-tags"]?.latest;h||(console.error("Error: Could not retrieve latest version."),process.exit(1)),console.log(u?`Latest version: v${h}`:h!==g?`A new version of FluxFlow is available: v${h} (current: v${g}). Run "fluxflow --update latest" to upgrade.`:`FluxFlow is up to date (v${g}).`)}catch(p){console.error("Error checking for updates:",p.message),process.exit(1)}process.exit(0)}else if(v==="latest"){console.log("Checking latest version and settings...");try{let i=(await(await fetch("https://registry.npmjs.org/fluxflow-cli",{cache:"no-store"})).json())["dist-tags"]?.latest;i||(console.error("Error: Could not retrieve latest version."),process.exit(1)),i===g&&(console.log(`FluxFlow is already up to date (v${g}).`),process.exit(0));let h=async()=>{let t=(await import("react")).default,{useState:L}=t,{render:K,Box:x,Text:y}=await import("ink"),Q=(await import("ink-select-input")).default,Z=(await import("ink-text-input")).default;return new Promise(ee=>{let oe=[{label:"NPM",value:"npm"},{label:"PNPM",value:"pnpm"},{label:"Yarn",value:"yarn"},{label:"Bun",value:"bun"},{label:"Custom Command",value:"custom"}],te=({label:b,isSelected:C})=>t.createElement(x,{width:"100%"},t.createElement(y,{bold:C},"\u2514\u2500 ",C?"\x1B[32m\u25CF\x1B[0m":"\u25CB"," ",b)),T,se=()=>{let[b,C]=L("select"),[ne,ae]=L(""),ie=F=>{F.value==="custom"?C("custom"):_({manager:F.value})},le=F=>{_({manager:"custom",customCommand:F})};return b==="custom"?t.createElement(x,{flexDirection:"column",marginY:1},t.createElement(x,{marginBottom:1},t.createElement(y,{color:"magenta",bold:!0},"\u{1F527} Enter custom update command:")),t.createElement(x,{flexDirection:"row"},t.createElement(y,{color:"cyan",bold:!0}," \u276F "),t.createElement(Z,{value:ne,onChange:ae,onSubmit:le})),t.createElement(x,{marginTop:1},t.createElement(y,{color:"gray",dimColor:!0,italic:!0}," (Press Enter to confirm)"))):t.createElement(x,{flexDirection:"column",marginY:1},t.createElement(x,{marginBottom:1},t.createElement(y,{color:"magenta",bold:!0},"\u{1F4E6} Select a package manager for the update:")),t.createElement(Q,{items:oe,onSelect:ie,itemComponent:te,indicatorComponent:()=>null}))},_=b=>{T&&T(),ee(b)},{unmount:re}=K(t.createElement(se,null));T=re})},d,O="",E;try{let{loadSettings:t}=await import("./chunks/settings-HTCI4KRJ.js");E=await t(),d=E?.systemSettings?.updateManager||E?.updateManager}catch{}if(!d){let t=await h();d=t.manager,O=t.customCommand}let f="";d==="pnpm"?f=`pnpm add -g fluxflow-cli@${i}`:d==="bun"?f=`bun add -g fluxflow-cli@${i}`:d==="yarn"?f=`yarn global add fluxflow-cli@${i}`:d==="custom"?f=O||E?.customUpdateCommand||`npm install -g fluxflow-cli@${i}`:f=`npm install -g fluxflow-cli@${i}`,console.log(`Updating FluxFlow to v${i} using ${d}...`),console.log(`Running: ${f}`);let{execSync:J}=await import("child_process");J(f,{stdio:"inherit"}),console.log(`\x1B[32m\u2705 Update successful! FluxFlow updated to v${i}.\x1B[0m`)}catch(u){console.error("\x1B[31m\u274C Update failed:\x1B[0m",u.message),process.exit(1)}process.exit(0)}else console.error("Unknown update command. Available options: --update, --update check, --update check latest, --update latest"),process.exit(1)}}let{default:G}=await import("react"),{render:Y}=await import("ink"),{default:W}=await import("./chunks/app-
|
|
66
|
+
/update latest Install latest release`),process.exit(0)),R){let v=e[1]||"latest";if(v==="check"){let u=e[2]==="latest";try{let h=(await(await fetch("https://registry.npmjs.org/fluxflow-cli",{cache:"no-store"})).json())["dist-tags"]?.latest;h||(console.error("Error: Could not retrieve latest version."),process.exit(1)),console.log(u?`Latest version: v${h}`:h!==g?`A new version of FluxFlow is available: v${h} (current: v${g}). Run "fluxflow --update latest" to upgrade.`:`FluxFlow is up to date (v${g}).`)}catch(p){console.error("Error checking for updates:",p.message),process.exit(1)}process.exit(0)}else if(v==="latest"){console.log("Checking latest version and settings...");try{let i=(await(await fetch("https://registry.npmjs.org/fluxflow-cli",{cache:"no-store"})).json())["dist-tags"]?.latest;i||(console.error("Error: Could not retrieve latest version."),process.exit(1)),i===g&&(console.log(`FluxFlow is already up to date (v${g}).`),process.exit(0));let h=async()=>{let t=(await import("react")).default,{useState:L}=t,{render:K,Box:x,Text:y}=await import("ink"),Q=(await import("ink-select-input")).default,Z=(await import("ink-text-input")).default;return new Promise(ee=>{let oe=[{label:"NPM",value:"npm"},{label:"PNPM",value:"pnpm"},{label:"Yarn",value:"yarn"},{label:"Bun",value:"bun"},{label:"Custom Command",value:"custom"}],te=({label:b,isSelected:C})=>t.createElement(x,{width:"100%"},t.createElement(y,{bold:C},"\u2514\u2500 ",C?"\x1B[32m\u25CF\x1B[0m":"\u25CB"," ",b)),T,se=()=>{let[b,C]=L("select"),[ne,ae]=L(""),ie=F=>{F.value==="custom"?C("custom"):_({manager:F.value})},le=F=>{_({manager:"custom",customCommand:F})};return b==="custom"?t.createElement(x,{flexDirection:"column",marginY:1},t.createElement(x,{marginBottom:1},t.createElement(y,{color:"magenta",bold:!0},"\u{1F527} Enter custom update command:")),t.createElement(x,{flexDirection:"row"},t.createElement(y,{color:"cyan",bold:!0}," \u276F "),t.createElement(Z,{value:ne,onChange:ae,onSubmit:le})),t.createElement(x,{marginTop:1},t.createElement(y,{color:"gray",dimColor:!0,italic:!0}," (Press Enter to confirm)"))):t.createElement(x,{flexDirection:"column",marginY:1},t.createElement(x,{marginBottom:1},t.createElement(y,{color:"magenta",bold:!0},"\u{1F4E6} Select a package manager for the update:")),t.createElement(Q,{items:oe,onSelect:ie,itemComponent:te,indicatorComponent:()=>null}))},_=b=>{T&&T(),ee(b)},{unmount:re}=K(t.createElement(se,null));T=re})},d,O="",E;try{let{loadSettings:t}=await import("./chunks/settings-HTCI4KRJ.js");E=await t(),d=E?.systemSettings?.updateManager||E?.updateManager}catch{}if(!d){let t=await h();d=t.manager,O=t.customCommand}let f="";d==="pnpm"?f=`pnpm add -g fluxflow-cli@${i}`:d==="bun"?f=`bun add -g fluxflow-cli@${i}`:d==="yarn"?f=`yarn global add fluxflow-cli@${i}`:d==="custom"?f=O||E?.customUpdateCommand||`npm install -g fluxflow-cli@${i}`:f=`npm install -g fluxflow-cli@${i}`,console.log(`Updating FluxFlow to v${i} using ${d}...`),console.log(`Running: ${f}`);let{execSync:J}=await import("child_process");J(f,{stdio:"inherit"}),console.log(`\x1B[32m\u2705 Update successful! FluxFlow updated to v${i}.\x1B[0m`)}catch(u){console.error("\x1B[31m\u274C Update failed:\x1B[0m",u.message),process.exit(1)}process.exit(0)}else console.error("Unknown update command. Available options: --update, --update check, --update check latest, --update latest"),process.exit(1)}}let{default:G}=await import("react"),{render:Y}=await import("ink"),{default:W}=await import("./chunks/app-QYLGGDG2.js");process.env.NODE_NO_WARNINGS="1";let H=["cuimp","Found existing binary","Binary verified","curl.exe not found","Falling back to .bat file","DeprecationWarning"],X=console.log,V=console.warn,z=console.error,A=o=>{let a=o.map(String).join(" ");return H.some(c=>a.includes(c))};console.log=(...o)=>!A(o)&&X(...o),console.warn=(...o)=>!A(o)&&V(...o),console.error=(...o)=>!A(o)&&z(...o);let k=e.findIndex(o=>o==="--cwd"||o==="--path");if(k!==-1&&k+1<e.length){let o=e[k+1],a=await import("path"),c=await import("fs-extra"),m=a.default.resolve(o);try{c.default.existsSync(m)&&c.default.statSync(m).isDirectory()?process.chdir(m):(console.error(`[ERROR] Directory not found: "${o}"`),process.exit(0))}catch(w){console.error(`[ERROR] Failed to change directory to "${o}": ${w.message}`),process.exit(0)}}process.stdout.write("\x1B[2J\x1B[3J\x1B[H"),process.stdout.isTTY&&(process.stdout.write("\x1B]0;FluxFlow\x07"),process.stdout.write("\x1B]633;P;TerminalTitle=FluxFlow\x07"),process.stdout.write("\x1B[?2004h"));let N=()=>{process.stdout.isTTY&&process.stdout.write("\x1B[?2004l")};if(process.on("exit",N),["SIGINT","SIGTERM","SIGHUP"].forEach(o=>{process.once(o,()=>{N(),process.exit(0)})}),e.includes("--playground")){let o=process.cwd();process.argv.push("--original-cwd",o);let{DATA_DIR:a}=await import("./chunks/paths-CHZDSDRF.js"),c=await import("path"),m=await import("fs-extra"),w=c.default.join(a,"playground");try{m.default.ensureDirSync(w),process.chdir(w)}catch{}}Y(G.createElement(W,{args:process.argv.slice(2)}),{exitOnCtrlC:!1})}
|
package/dist/package.json
CHANGED
package/package.json
CHANGED