fluxflow-cli 4.27.1 → 4.27.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.
|
@@ -121,7 +121,7 @@ import{A as ll,a as Yi,b as Je,c as nt,d as Cr,e as vr,f as zi,g as Ms,h as Jo,i
|
|
|
121
121
|
\u2022 Spent (Last 1hr): ${Number((a.totalSpent*1e3).toFixed(0))} credits
|
|
122
122
|
\u2022 Remaining: ${Number((a.remaining*1e3).toFixed(0))} credits
|
|
123
123
|
\u2022 Requests (Last 1hr): ${a.activeCallsCount} requests
|
|
124
|
-
`+(a.nextResetMin>0?`\u2022 Refreshes in: ${a.nextResetMin}m`:""),isMeta:!0}]))}catch{O(p=>(X(p.length+1),[...p,{id:Date.now(),role:"system",text:"[SYSTEM] Failed to load image quota stats.",isMeta:!0}]))}}else if(m[1]?.toLowerCase()==="setup")if(m[2]?.toLowerCase()==="key")if(m[3]){let c=["default","custom"].find(a=>a===m[3].toLowerCase());if(c){let a=c==="default"?"Default":"Custom";sr(B=>({...B,keyType:a}));let p=nt(2);O(B=>(X(B.length+1),[...B,{id:Date.now(),role:"system",text:`[SYSTEM] Image key strategy set to ${a}`,isMeta:!0}])),a==="Custom"&&(Qt({label:"Enter Pollinations API key (starting with sk_):",note:"Get a key from https://enter.pollinations.ai",key:"imageSettings",subKey:"apiKey",value:ko.apiKey||"",returnView:"chat"}),z("input"))}else{let a=nt(2);O(p=>(X(p.length+1),[...p,{id:Date.now(),role:"system",text:"[SYSTEM] Invalid key option. Choose: Default or Custom.",isMeta:!0}]))}}else{let c=nt(2);O(a=>(X(a.length+1),[...a,{id:Date.now(),role:"system",text:"[SYSTEM] Usage: /image setup Key <Default|Custom>",isMeta:!0}]))}else if(m[2]?.toLowerCase()==="quality")if(m[3]){let c=["low","low-high","medium","medium-high","high","ultra","premium"].find(a=>a===m[3].toLowerCase());if(c){let p={low:"Low","low-high":"Low-High",medium:"Medium","medium-high":"Medium-High",high:"High",ultra:"Ultra",premium:"Premium"}[c];sr(F=>({...F,quality:p}));let B=nt(2);O(F=>(X(F.length+1),[...F,{id:Date.now(),role:"system",text:`[SYSTEM] Image quality set to ${p}`,isMeta:!0}]))}else{let a=nt(2);O(p=>(X(p.length+1),[...p,{id:Date.now(),role:"system",text:"[SYSTEM] Invalid quality level. Choose from: Low, Low-High, Medium, Medium-High, High, Ultra, Premium.",isMeta:!0}]))}}else{let c=nt(2);O(a=>(X(a.length+1),[...a,{id:Date.now(),role:"system",text:"[SYSTEM] Usage: /image setup Quality <Low|Low-High|Medium|Medium-High|High|Ultra>",isMeta:!0}]))}else{let c=nt(2);O(a=>(X(a.length+1),[...a,{id:Date.now(),role:"system",text:"[SYSTEM] Usage: /image setup <Key|Quality> ...",isMeta:!0}]))}else{let c=nt(2);O(a=>(X(a.length+1),[...a,{id:Date.now(),role:"system",text:"[SYSTEM] Usage: /image setup <Key|Quality> ...",isMeta:!0}]))}break}case"/thinking":{let c;if(m[1]){let a=m.slice(1),p=a.includes("--bypass"),B=a.includes("--force"),F=a.findIndex(Y=>Y==="--map"||Y==="-m");if(F!==-1){let Y=a.slice(0,F).join(" ").trim(),q=a.slice(F+1).join(" ").trim(),W=["fast","low","medium","standard","high","xhigh","custom","max"];if(!Y||!q)O($=>(X($.length+1),[...$,{id:Date.now(),role:"system",text:`\u2726 \x1B[31mINVALID USAGE\x1B[0m
|
|
124
|
+
`+(a.nextResetMin>0?`\u2022 Refreshes in: ${a.nextResetMin}m`:""),isMeta:!0}]))}catch{O(p=>(X(p.length+1),[...p,{id:Date.now(),role:"system",text:"[SYSTEM] Failed to load image quota stats.",isMeta:!0}]))}}else if(m[1]?.toLowerCase()==="setup")if(m[2]?.toLowerCase()==="key")if(m[3]){let c=["default","custom"].find(a=>a===m[3].toLowerCase());if(c){let a=c==="default"?"Default":"Custom";sr(B=>({...B,keyType:a}));let p=nt(2);O(B=>(X(B.length+1),[...B,{id:Date.now(),role:"system",text:`[SYSTEM] Image key strategy set to ${a}`,isMeta:!0}])),a==="Custom"&&(Qt({label:"Enter Pollinations API key (starting with sk_):",note:"Get a key from https://enter.pollinations.ai",key:"imageSettings",subKey:"apiKey",value:ko.apiKey||"",returnView:"chat"}),z("input"))}else{let a=nt(2);O(p=>(X(p.length+1),[...p,{id:Date.now(),role:"system",text:"[SYSTEM] Invalid key option. Choose: Default or Custom.",isMeta:!0}]))}}else{let c=nt(2);O(a=>(X(a.length+1),[...a,{id:Date.now(),role:"system",text:"[SYSTEM] Usage: /image setup Key <Default|Custom>",isMeta:!0}]))}else if(m[2]?.toLowerCase()==="quality")if(m[3]){let c=["low","low-high","medium","medium-high","high","ultra","premium"].find(a=>a===m[3].toLowerCase());if(c){let p={low:"Low","low-high":"Low-High",medium:"Medium","medium-high":"Medium-High",high:"High",ultra:"Ultra",premium:"Premium"}[c];sr(F=>({...F,quality:p}));let B=nt(2);O(F=>(X(F.length+1),[...F,{id:Date.now(),role:"system",text:`[SYSTEM] Image quality set to ${p}`,isMeta:!0}]))}else{let a=nt(2);O(p=>(X(p.length+1),[...p,{id:Date.now(),role:"system",text:"[SYSTEM] Invalid quality level. Choose from: Low, Low-High, Medium, Medium-High, High, Ultra, Premium.",isMeta:!0}]))}}else{let c=nt(2);O(a=>(X(a.length+1),[...a,{id:Date.now(),role:"system",text:"[SYSTEM] Usage: /image setup Quality <Low|Low-High|Medium|Medium-High|High|Ultra>",isMeta:!0}]))}else{let c=nt(2);O(a=>(X(a.length+1),[...a,{id:Date.now(),role:"system",text:"[SYSTEM] Usage: /image setup <Key|Quality> ...",isMeta:!0}]))}else{let c=nt(2);O(a=>(X(a.length+1),[...a,{id:Date.now(),role:"system",text:"[SYSTEM] Usage: /image setup <Key|Quality> ...",isMeta:!0}]))}break}case"/thinking":{let c;if(m[1]){let a=m.slice(1),p=a.includes("--bypass")||a.includes("-b"),B=a.includes("--force")||a.includes("-f"),F=a.findIndex(Y=>Y==="--map"||Y==="-m");if(F!==-1){let Y=a.slice(0,F).join(" ").trim(),q=a.slice(F+1).join(" ").trim(),W=["fast","low","medium","standard","high","xhigh","custom","max"];if(!Y||!q)O($=>(X($.length+1),[...$,{id:Date.now(),role:"system",text:`\u2726 \x1B[31mINVALID USAGE\x1B[0m
|
|
125
125
|
\u2800\u2800\x1B[2m\u2514\u2500\x1B[22m Usage: \x1B[36m/thinking <level> --map <target_value>\x1B[0m (e.g. \x1B[33m/thinking Custom --map high\x1B[0m)
|
|
126
126
|
\u2800`,isMeta:!0}]));else if(!W.includes(Y.toLowerCase()))O($=>(X($.length+1),[...$,{id:Date.now(),role:"system",text:`\u2726 \x1B[31mUNKNOWN LEVEL\x1B[0m
|
|
127
127
|
\u2800\u2800\x1B[2m\u2514\u2500\x1B[22m Unknown level "\x1B[33m${Y}\x1B[0m" to map. Available: \x1B[36mLow, Medium, High, Custom\x1B[0m.
|
package/dist/cli.js
CHANGED
|
@@ -66,7 +66,7 @@ Usage: fluxflow --export error`),process.exit(1)}if(Q&&(console.log(`v${n}`),pro
|
|
|
66
66
|
/docs View documentation
|
|
67
67
|
/fluxflow init Create FluxFlow.md template
|
|
68
68
|
/update check Check for new version
|
|
69
|
-
/update latest Install latest release`),process.exit(0)),Z){let C=t[1]||"latest";if(C==="check"){let g=t[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(g?`Latest version: v${h}`:h!==n?`A new version of FluxFlow is available: v${h} (current: v${n}). Run "fluxflow --update latest" to upgrade.`:`FluxFlow is up to date (v${n}).`)}catch(l){console.error("Error checking for updates:",l.message),process.exit(1)}process.exit(0)}else if(C==="latest"){console.log("Checking latest version and settings...");try{let c=(await(await fetch("https://registry.npmjs.org/fluxflow-cli",{cache:"no-store"})).json())["dist-tags"]?.latest;c||(console.error("Error: Could not retrieve latest version."),process.exit(1)),c===n&&(console.log(`FluxFlow is already up to date (v${n}).`),process.exit(0));let h=async()=>{let s=(await import("react")).default,{useState:N}=s,{render:_,Box:y,Text:S}=await import("ink"),D=(await import("ink-select-input")).default,E=(await import("ink-text-input")).default;return new Promise(W=>{let M=[{label:"NPM",value:"npm"},{label:"PNPM",value:"pnpm"},{label:"Yarn",value:"yarn"},{label:"Bun",value:"bun"},{label:"Custom Command",value:"custom"}],H=({label:k,isSelected:F})=>s.createElement(y,{width:"100%"},s.createElement(S,{bold:F},"\u2514\u2500 ",F?"\x1B[32m\u25CF\x1B[0m":"\u25CB"," ",k)),O,X=()=>{let[k,F]=N("select"),[z,J]=N(""),P=e=>{e.value==="custom"?F("custom"):B({manager:e.value})},L=e=>{B({manager:"custom",customCommand:e})};return k==="custom"?s.createElement(y,{flexDirection:"column",marginY:1},s.createElement(y,{marginBottom:1},s.createElement(S,{color:"magenta",bold:!0},"\u{1F527} Enter custom update command:")),s.createElement(y,{flexDirection:"row"},s.createElement(S,{color:"cyan",bold:!0}," \u276F "),s.createElement(E,{value:z,onChange:J,onSubmit:L})),s.createElement(y,{marginTop:1},s.createElement(S,{color:"gray",dimColor:!0,italic:!0}," (Press Enter to confirm)"))):s.createElement(y,{flexDirection:"column",marginY:1},s.createElement(y,{marginBottom:1},s.createElement(S,{color:"magenta",bold:!0},"\u{1F4E6} Select a package manager for the update:")),s.createElement(D,{items:M,onSelect:P,itemComponent:H,indicatorComponent:()=>null}))},B=k=>{O&&O(),W(k)},{unmount:V}=_(s.createElement(X,null));O=V})},i,$="",A;try{let{loadSettings:s}=await import("./chunks/settings-RB45GKVI.js");A=await s(),i=A?.systemSettings?.updateManager||A?.updateManager}catch{}if(!i){let s=await h();i=s.manager,$=s.customCommand}let p="";i==="pnpm"?p=`pnpm add -g fluxflow-cli@${c}`:i==="bun"?p=`bun add -g fluxflow-cli@${c}`:i==="yarn"?p=`yarn global add fluxflow-cli@${c}`:i==="custom"?p=$||A?.customUpdateCommand||`npm install -g fluxflow-cli@${c}`:p=`npm install -g fluxflow-cli@${c}`,console.log(`Updating FluxFlow to v${c} using ${i}...`),console.log(`Running: ${p}`);let{execSync:v}=await import("child_process");v(p,{stdio:"inherit"}),console.log(`\x1B[32m\u2705 Update successful! FluxFlow updated to v${c}.\x1B[0m`)}catch(g){console.error("\x1B[31m\u274C Update failed:\x1B[0m",g.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:ae}=await import("react"),{render:le}=await import("ink"),{default:ce}=await import("./chunks/app-
|
|
69
|
+
/update latest Install latest release`),process.exit(0)),Z){let C=t[1]||"latest";if(C==="check"){let g=t[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(g?`Latest version: v${h}`:h!==n?`A new version of FluxFlow is available: v${h} (current: v${n}). Run "fluxflow --update latest" to upgrade.`:`FluxFlow is up to date (v${n}).`)}catch(l){console.error("Error checking for updates:",l.message),process.exit(1)}process.exit(0)}else if(C==="latest"){console.log("Checking latest version and settings...");try{let c=(await(await fetch("https://registry.npmjs.org/fluxflow-cli",{cache:"no-store"})).json())["dist-tags"]?.latest;c||(console.error("Error: Could not retrieve latest version."),process.exit(1)),c===n&&(console.log(`FluxFlow is already up to date (v${n}).`),process.exit(0));let h=async()=>{let s=(await import("react")).default,{useState:N}=s,{render:_,Box:y,Text:S}=await import("ink"),D=(await import("ink-select-input")).default,E=(await import("ink-text-input")).default;return new Promise(W=>{let M=[{label:"NPM",value:"npm"},{label:"PNPM",value:"pnpm"},{label:"Yarn",value:"yarn"},{label:"Bun",value:"bun"},{label:"Custom Command",value:"custom"}],H=({label:k,isSelected:F})=>s.createElement(y,{width:"100%"},s.createElement(S,{bold:F},"\u2514\u2500 ",F?"\x1B[32m\u25CF\x1B[0m":"\u25CB"," ",k)),O,X=()=>{let[k,F]=N("select"),[z,J]=N(""),P=e=>{e.value==="custom"?F("custom"):B({manager:e.value})},L=e=>{B({manager:"custom",customCommand:e})};return k==="custom"?s.createElement(y,{flexDirection:"column",marginY:1},s.createElement(y,{marginBottom:1},s.createElement(S,{color:"magenta",bold:!0},"\u{1F527} Enter custom update command:")),s.createElement(y,{flexDirection:"row"},s.createElement(S,{color:"cyan",bold:!0}," \u276F "),s.createElement(E,{value:z,onChange:J,onSubmit:L})),s.createElement(y,{marginTop:1},s.createElement(S,{color:"gray",dimColor:!0,italic:!0}," (Press Enter to confirm)"))):s.createElement(y,{flexDirection:"column",marginY:1},s.createElement(y,{marginBottom:1},s.createElement(S,{color:"magenta",bold:!0},"\u{1F4E6} Select a package manager for the update:")),s.createElement(D,{items:M,onSelect:P,itemComponent:H,indicatorComponent:()=>null}))},B=k=>{O&&O(),W(k)},{unmount:V}=_(s.createElement(X,null));O=V})},i,$="",A;try{let{loadSettings:s}=await import("./chunks/settings-RB45GKVI.js");A=await s(),i=A?.systemSettings?.updateManager||A?.updateManager}catch{}if(!i){let s=await h();i=s.manager,$=s.customCommand}let p="";i==="pnpm"?p=`pnpm add -g fluxflow-cli@${c}`:i==="bun"?p=`bun add -g fluxflow-cli@${c}`:i==="yarn"?p=`yarn global add fluxflow-cli@${c}`:i==="custom"?p=$||A?.customUpdateCommand||`npm install -g fluxflow-cli@${c}`:p=`npm install -g fluxflow-cli@${c}`,console.log(`Updating FluxFlow to v${c} using ${i}...`),console.log(`Running: ${p}`);let{execSync:v}=await import("child_process");v(p,{stdio:"inherit"}),console.log(`\x1B[32m\u2705 Update successful! FluxFlow updated to v${c}.\x1B[0m`)}catch(g){console.error("\x1B[31m\u274C Update failed:\x1B[0m",g.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:ae}=await import("react"),{render:le}=await import("ink"),{default:ce}=await import("./chunks/app-MUOV5KOQ.js");process.env.NODE_NO_WARNINGS="1";let pe=["cuimp","Found existing binary","Binary verified","curl.exe not found","Falling back to .bat file","DeprecationWarning"],me=console.log,de=console.warn,ue=console.error,G=o=>{let m=o.map(String).join(" ");return pe.some(r=>m.includes(r))};console.log=(...o)=>!G(o)&&me(...o),console.warn=(...o)=>!G(o)&&de(...o),console.error=(...o)=>!G(o)&&ue(...o);let Y=t.findIndex(o=>o==="--cwd"||o==="--path");if(Y!==-1&&Y+1<t.length){let o=t[Y+1],m=await import("path"),r=await import("fs-extra"),d=m.default.resolve(o);try{r.default.existsSync(d)&&r.default.statSync(d).isDirectory()?process.chdir(d):(console.error(`[ERROR] Directory not found: "${o}"`),process.exit(0))}catch(x){console.error(`[ERROR] Failed to change directory to "${o}": ${x.message}`),process.exit(0)}}let I=t.includes("--commit_8f4a2b9c"),q=t.findIndex(o=>o==="-p"||o==="--prompt");if(q!==-1||I){let o=t.includes("--new")||t.includes("-n"),r=(q!==-1?t.slice(q+1).filter(e=>e!=="-n"&&e!=="--new"):[])[0];if(I)try{let{execSync:e}=await import("child_process"),a=e("git diff --cached",{encoding:"utf8",stdio:["ignore","pipe","pipe"]}).trim();a||process.exit(0),r=`Git Staged Diff:
|
|
70
70
|
${a}
|
|
71
71
|
---
|
|
72
72
|
|
package/dist/package.json
CHANGED