@stacksjs/cli 0.72.74 → 0.72.76

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.
Files changed (2) hide show
  1. package/dist/index.js +1 -1
  2. package/package.json +9 -9
package/dist/index.js CHANGED
@@ -4,5 +4,5 @@ import Se from"process";async function Le(e,t={silent:!0}){let r=t.packageManage
4
4
  `);throw Error(`Command failed with exit code ${n.exitCode}: ${r.join(" ")}
5
5
  ${a}`)}return o}function Oe(e,t,r,n,o){if(d.debug(`exitHandler: ${e}, exitCode: ${r}, signalCode: ${n}`),o)d.debug("Process error:",o.message)}import{handleError as ot}from"@stacksjs/error-handling";import{log as d}from"@stacksjs/logging";import{ExitCode as Fe}from"@stacksjs/types";import{collect as Ue}from"@stacksjs/collections";var l=!process.env.NO_COLOR&&(process.env.FORCE_COLOR?process.env.FORCE_COLOR!=="0":!!process.stdout?.isTTY),g={reset:l?"\x1B[0m":"",black:l?"\x1B[30m":"",red:l?"\x1B[31m":"",green:l?"\x1B[32m":"",yellow:l?"\x1B[33m":"",blue:l?"\x1B[34m":"",magenta:l?"\x1B[35m":"",cyan:l?"\x1B[36m":"",white:l?"\x1B[37m":"",gray:l?"\x1B[90m":"",lightRed:l?"\x1B[91m":"",lightGreen:l?"\x1B[92m":"",lightYellow:l?"\x1B[93m":"",lightBlue:l?"\x1B[94m":"",lightMagenta:l?"\x1B[95m":"",lightCyan:l?"\x1B[96m":"",lightGray:l?"\x1B[37m":"",bgBlack:l?"\x1B[40m":"",bgRed:l?"\x1B[41m":"",bgGreen:l?"\x1B[42m":"",bgYellow:l?"\x1B[43m":"",bgBlue:l?"\x1B[44m":"",bgMagenta:l?"\x1B[45m":"",bgCyan:l?"\x1B[46m":"",bgWhite:l?"\x1B[47m":"",bgGray:l?"\x1B[100m":"",bgLightRed:l?"\x1B[101m":"",bgLightGreen:l?"\x1B[102m":"",bgLightYellow:l?"\x1B[103m":"",bgLightBlue:l?"\x1B[104m":"",bgLightMagenta:l?"\x1B[105m":"",bgLightCyan:l?"\x1B[106m":"",bgLightGray:l?"\x1B[47m":"",bold:l?"\x1B[1m":"",dim:l?"\x1B[2m":"",italic:l?"\x1B[3m":"",underline:l?"\x1B[4m":"",inverse:l?"\x1B[7m":"",hidden:l?"\x1B[8m":"",strikethrough:l?"\x1B[9m":""},E="\x1B[",Je="\x1B]8;;",Qe="\x1B]8;;\x07",Re=(e)=>String(e);function b(e,t,r){return Math.min(Math.max(Math.floor(e),t),r)}function s(e,t=g.reset){return(r)=>{if(!l)return String(r);return`${e}${String(r)}${t}`}}function Xe(e){return e.replace(/\x1B\]8;;[^\x07]*(?:\x07|\x1B\\)/g,"").replace(/\x1B\]8;;(?:\x07|\x1B\\)/g,"")}function D(e){return Xe(e).replace(/\x1B\[[0-?]*[ -/]*[@-~]/g,"")}var Ge=D;function Ie(e){return Array.from(D(e)).length}var H=s(g.black),K=s(g.red),x=s(g.green),V=s(g.yellow),U=s(g.blue),J=s(g.magenta),w=s(g.cyan),Q=s(g.white),y=s(g.gray),X=s(g.lightRed),Z=s(g.lightGreen),ee=s(g.lightYellow),te=s(g.lightBlue),re=s(g.lightMagenta),ne=s(g.lightCyan),M=s(g.lightGray),oe=s(g.bgBlack),ie=s(g.bgRed),se=s(g.bgGreen),le=s(g.bgYellow),ae=s(g.bgBlue),ge=s(g.bgMagenta),B=s(g.bgCyan),ce=s(g.bgWhite),ue=s(g.bgGray),pe=s(g.bgLightRed),de=s(g.bgLightGreen),me=s(g.bgLightYellow),fe=s(g.bgLightBlue),he=s(g.bgLightMagenta),be=s(g.bgLightCyan),j=s(g.bgLightGray),f=s(g.bold),C=s(g.dim),p=s(g.italic),ye=s(g.underline),Ce=s(g.inverse),xe=s(g.hidden),we=s(g.strikethrough),ke=s(g.reset,"");function Me(e){return s(`${E}38;5;${b(e,0,255)}m`)}function je(e){return s(`${E}48;5;${b(e,0,255)}m`)}function Ee(e,t,r){return s(`${E}38;2;${b(e,0,255)};${b(t,0,255)};${b(r,0,255)}m`)}function Pe(e,t,r){return s(`${E}48;2;${b(e,0,255)};${b(t,0,255)};${b(r,0,255)}m`)}function Ae(e,t){let r=(o,i)=>{let a=String(o);if(!l)return a;return`${Je}${i}\x07${a}${Qe}`};if(typeof t==="string")return r(e,t);let n=String(e);return(o)=>r(o,n)}var Ze={black:H,red:K,green:x,yellow:V,blue:U,magenta:J,cyan:w,white:Q,gray:y,lightRed:X,lightGreen:Z,lightYellow:ee,lightBlue:te,lightMagenta:re,lightCyan:ne,lightGray:M,bgBlack:oe,bgRed:ie,bgGreen:se,bgYellow:le,bgBlue:ae,bgMagenta:ge,bgCyan:B,bgWhite:ce,bgGray:ue,bgLightRed:pe,bgLightGreen:de,bgLightYellow:me,bgLightBlue:fe,bgLightMagenta:he,bgLightCyan:be,bgLightGray:j,bold:f,dim:C,italic:p,underline:ye,inverse:Ce,hidden:xe,strikethrough:we,reset:ke};function Te(e){return Ze[e]??Re}function Tt(e,t){if(typeof t==="function")return t(e);return Te(t)(e)}function et(){return l}var Yt={black:H,red:K,green:x,yellow:V,blue:U,magenta:J,cyan:w,white:Q,gray:y,lightRed:X,lightGreen:Z,lightYellow:ee,lightBlue:te,lightMagenta:re,lightCyan:ne,lightGray:M,bgBlack:oe,bgRed:ie,bgGreen:se,bgYellow:le,bgBlue:ae,bgMagenta:ge,bgCyan:B,bgWhite:ce,bgGray:ue,bgLightRed:pe,bgLightGreen:de,bgLightYellow:me,bgLightBlue:fe,bgLightMagenta:he,bgLightCyan:be,bgLightGray:j,bold:f,dim:C,italic:p,underline:ye,inverse:Ce,hidden:xe,strikethrough:we,reset:ke,ansi256:Me,ansi256Bg:je,trueColor:Ee,trueColorBg:Pe,link:Ae,stripColors:Ge},Wt={black:H,red:K,green:x,yellow:V,blue:U,magenta:J,cyan:w,white:Q,gray:y,lightRed:X,lightGreen:Z,lightYellow:ee,lightBlue:te,lightMagenta:re,lightCyan:ne,lightGray:M,bgBlack:oe,bgRed:ie,bgGreen:se,bgYellow:le,bgBlue:ae,bgMagenta:ge,bgCyan:B,bgWhite:ce,bgGray:ue,bgLightRed:pe,bgLightGreen:de,bgLightYellow:me,bgLightBlue:fe,bgLightMagenta:he,bgLightCyan:be,bgLightGray:j,bold:f,dim:C,italic:p,underline:ye,inverse:Ce,hidden:xe,strikethrough:we,reset:ke,ansi256:Me,ansi256Bg:je,trueColor:Ee,trueColorBg:Pe,link:Ae,stripColors:Ge,grey:y,lightGrey:M,bgLightGrey:j,supportsColor:et};function tt(e,t,r,n){let o=Ie(e);if(o>=t)return e;let i=n[0]||" ",a=t-o;if(r==="right")return`${i.repeat(a)}${e}`;if(r==="center"){let c=Math.floor(a/2),u=a-c;return`${i.repeat(c)}${e}${i.repeat(u)}`}return`${e}${i.repeat(a)}`}function P(e){return Math.max(0,...e.map(Ie))}function A(e,t,r="left"){let n=String(e).split(/\r?\n/),o=typeof t==="object"?t:void 0,i=typeof t==="number"?t:o?.width??P(n),a=o?.align??r,c=o?.padChar??" ";return n.map((u)=>tt(u,Math.max(0,i),a,c)).join(`
6
6
  `)}function Nt(e,t){return A(e,t,"left")}function zt(e,t){let r=String(e).split(/\r?\n/);return A(e,t??process.stdout?.columns??P(r),"right")}function qt(e,t){let r=String(e).split(/\r?\n/);return A(e,t??process.stdout?.columns??P(r),"center")}var rt={single:{topLeft:"\u250C",topRight:"\u2510",bottomLeft:"\u2514",bottomRight:"\u2518",horizontal:"\u2500",vertical:"\u2502"},double:{topLeft:"\u2554",topRight:"\u2557",bottomLeft:"\u255A",bottomRight:"\u255D",horizontal:"\u2550",vertical:"\u2551"},round:{topLeft:"\u256D",topRight:"\u256E",bottomLeft:"\u2570",bottomRight:"\u256F",horizontal:"\u2500",vertical:"\u2502"}};function _t(e,t={}){let r=String(e).split(/\r?\n/),n=rt[t.borderStyle??"single"],o=Math.max(0,t.padding??1),i=Math.max(0,t.margin??0),a=t.align??"left",c=P(r),u=c+o*2,h=typeof t.borderColor==="function"?t.borderColor:t.borderColor?Te(t.borderColor):Re,W=h((()=>{if(!t.title)return`${n.topLeft}${n.horizontal.repeat(u)}${n.topRight}`;let O=` ${D(String(t.title))} `.slice(0,u),z=n.horizontal.repeat(Math.max(0,u-O.length));return`${n.topLeft}${O}${z}${n.topRight}`})()),N=h(`${n.bottomLeft}${n.horizontal.repeat(u)}${n.bottomRight}`),De=r.map((v)=>{let O=A(v,{align:a,width:c}),z=`${" ".repeat(o)}${O}${" ".repeat(o)}`;return`${h(n.vertical)}${z}${h(n.vertical)}`}),He=" ".repeat(i);return[W,...De,N].map((v)=>`${He}${v}`).join(`
7
- `)}var Dt=Ue(["The best way to get started is to quit talking and begin doing.","The pessimist sees difficulty in every opportunity. The optimist sees opportunity in every difficulty.","Don\u2019t let yesterday take up too much of today.","You learn more from failure than from success. Don\u2019t let it stop you. Failure builds character.","It\u2019s not whether you get knocked down, it\u2019s whether you get up.","If you are working on something that you really care about, you don\u2019t have to be pushed. The vision pulls you.","People who are crazy enough to think they can change the world, are the ones who do.","Failure will never overtake me if my determination to succeed is strong enough.","Entrepreneurs are great at dealing with uncertainty and also very good at minimizing risk. That\u2019s the classic entrepreneur.","We may encounter many defeats but we must not be defeated.","Knowing is not enough; we must apply. Wishing is not enough; we must do.","Imagine your life is perfect in every respect; what would it look like?","We generate fears while we sit. We overcome them by action.","Whether you think you can or think you can\u2019t, you\u2019re right.","Security is mostly a superstition. Life is either a daring adventure or nothing."]);var Ye="0.72.74";async function Zt(e,t){return new Promise((r)=>{if(t?.quiet===!1)console.log(),console.log(w(f("Stacks CLI"))+C(` v${Ye}`)),console.log();if(d.info(`Running ${B(p(f(` ${e} `)))}`),t?.showPerformance===!1||t?.quiet)return r(0);return r(performance.now())})}function er(e,t,r){let n={type:"success",useSeconds:!0,...t};return n.message=t?.message||e,new Promise((o)=>{if(r)return ot(r),o(Fe.FatalError);if(n?.startTime){let i=performance.now()-n.startTime;if(n.useSeconds)i=i/1000,i=Math.round(i*100)/100;if(n.quiet===!0)return o(Fe.Success);if(r)d.error(`[${i.toFixed(2)}${n.useSeconds?"s":"ms"}] Failed`);else if(n.type==="info")d.info(`${C(y(`[${i.toFixed(2)}${n.useSeconds?"s":"ms"}]`))} ${n.message??"Complete"}`);else d.success(`${C(y(f(`[${i.toFixed(2)}${n.useSeconds?"s":"ms"}]`)))} ${f(x(n.message??"Complete"))}`)}else if(n?.type==="info")d.info(e);else if(n?.type==="success"&&n?.quiet!==!0)d.success(e);d.flush().catch(()=>{}).then(()=>o(Fe.Success))})}import T from"process";function We(e){if(!e)return!1;return e.startsWith("--")}function it(e){return e.startsWith("-")&&!We(e)}function $e(e){if(e==="true")return!0;if(e==="false")return!1;let t=Number.parseFloat(e);if(!Number.isNaN(t))return t;return e.replace(/"/g,"")}function st(e,t,r,n){let[o,i]=e.slice(2).split("=");if(i!==void 0)n[o]=$e(i);else if(r+1<t.length&&!t[r+1]?.startsWith("-"))n[o]=t[r+1],r++;else n[o]=!0;return r}function lt(e,t,r,n){let[o,i]=e.slice(1).split("=");if(o===void 0)return r;if(i!==void 0&&o!==void 0)for(let a=0;a<o.length;a++)n[o[a]]=$e(i);else for(let a=0;a<o.length;a++)if(r+1<t.length&&a===o.length-1&&!t[r+1]?.startsWith("-"))n[o[a]]=$e(t[r+1]),r++;else n[o[a]]=!0;return r}function at(e){if(e===void 0)e=T.argv.slice(2);let t=[],r={};for(let n=0;n<e.length;n++){let o=e[n];if(!o)continue;if(We(o))n=st(o,e,n,r);else if(it(o))n=lt(o,e,n,r);else t.push(o)}return{args:t,options:r}}function or(e){if(e===void 0)e=T.argv.slice(2);return at(e).args}function ir(e){e=e||{};let t={dryRun:!1,quiet:!1,verbose:!1},r=T.argv.slice(2);for(let n=0;n<r.length;n++){let o=r[n];if(o?.startsWith("--")){let a=o.substring(2).replace(/-([a-z])/gi,(c)=>c[1]?c[1].toUpperCase():"");if(n+1<r.length&&!r?.[n+1]?.startsWith("--"))if(r?.[n+1]==="true"||r?.[n+1]==="false")e[a]=r[n+1]==="true",n++;else e[a]=r[n+1],n++;else e[a]=!0}}if(Object.keys(e).length===0)return{};return{...t,...e}}function gt(e){if(Array.isArray(e)){if(e=Array.from(new Set(e)),Array.isArray(e)&&e[0]&&!e[0].startsWith("-"))e.shift();return e.join(" ")}if(typeof e==="object"&&e!==null)return Object.entries(e).filter(([t,r])=>t!=="--"&&t!=="_"&&r!==!1&&r!==void 0&&r!==null).map(([t,r])=>{if(r===!0)return`--${t}`;return`--${t} ${r}`}).join(" ");return gt(T.argv.slice(2))}import m from"process";import{createInterface as ct}from"readline";var gr=m.stdin.destroy;m.stdin.destroy=function(e){if(e)this.emit("error",e);return this};m.on("SIGINT",()=>{console.log(`
7
+ `)}var Dt=Ue(["The best way to get started is to quit talking and begin doing.","The pessimist sees difficulty in every opportunity. The optimist sees opportunity in every difficulty.","Don\u2019t let yesterday take up too much of today.","You learn more from failure than from success. Don\u2019t let it stop you. Failure builds character.","It\u2019s not whether you get knocked down, it\u2019s whether you get up.","If you are working on something that you really care about, you don\u2019t have to be pushed. The vision pulls you.","People who are crazy enough to think they can change the world, are the ones who do.","Failure will never overtake me if my determination to succeed is strong enough.","Entrepreneurs are great at dealing with uncertainty and also very good at minimizing risk. That\u2019s the classic entrepreneur.","We may encounter many defeats but we must not be defeated.","Knowing is not enough; we must apply. Wishing is not enough; we must do.","Imagine your life is perfect in every respect; what would it look like?","We generate fears while we sit. We overcome them by action.","Whether you think you can or think you can\u2019t, you\u2019re right.","Security is mostly a superstition. Life is either a daring adventure or nothing."]);var Ye="0.72.76";async function Zt(e,t){return new Promise((r)=>{if(t?.quiet===!1)console.log(),console.log(w(f("Stacks CLI"))+C(` v${Ye}`)),console.log();if(d.info(`Running ${B(p(f(` ${e} `)))}`),t?.showPerformance===!1||t?.quiet)return r(0);return r(performance.now())})}function er(e,t,r){let n={type:"success",useSeconds:!0,...t};return n.message=t?.message||e,new Promise((o)=>{if(r)return ot(r),o(Fe.FatalError);if(n?.startTime){let i=performance.now()-n.startTime;if(n.useSeconds)i=i/1000,i=Math.round(i*100)/100;if(n.quiet===!0)return o(Fe.Success);if(r)d.error(`[${i.toFixed(2)}${n.useSeconds?"s":"ms"}] Failed`);else if(n.type==="info")d.info(`${C(y(`[${i.toFixed(2)}${n.useSeconds?"s":"ms"}]`))} ${n.message??"Complete"}`);else d.success(`${C(y(f(`[${i.toFixed(2)}${n.useSeconds?"s":"ms"}]`)))} ${f(x(n.message??"Complete"))}`)}else if(n?.type==="info")d.info(e);else if(n?.type==="success"&&n?.quiet!==!0)d.success(e);d.flush().catch(()=>{}).then(()=>o(Fe.Success))})}import T from"process";function We(e){if(!e)return!1;return e.startsWith("--")}function it(e){return e.startsWith("-")&&!We(e)}function $e(e){if(e==="true")return!0;if(e==="false")return!1;let t=Number.parseFloat(e);if(!Number.isNaN(t))return t;return e.replace(/"/g,"")}function st(e,t,r,n){let[o,i]=e.slice(2).split("=");if(i!==void 0)n[o]=$e(i);else if(r+1<t.length&&!t[r+1]?.startsWith("-"))n[o]=t[r+1],r++;else n[o]=!0;return r}function lt(e,t,r,n){let[o,i]=e.slice(1).split("=");if(o===void 0)return r;if(i!==void 0&&o!==void 0)for(let a=0;a<o.length;a++)n[o[a]]=$e(i);else for(let a=0;a<o.length;a++)if(r+1<t.length&&a===o.length-1&&!t[r+1]?.startsWith("-"))n[o[a]]=$e(t[r+1]),r++;else n[o[a]]=!0;return r}function at(e){if(e===void 0)e=T.argv.slice(2);let t=[],r={};for(let n=0;n<e.length;n++){let o=e[n];if(!o)continue;if(We(o))n=st(o,e,n,r);else if(it(o))n=lt(o,e,n,r);else t.push(o)}return{args:t,options:r}}function or(e){if(e===void 0)e=T.argv.slice(2);return at(e).args}function ir(e){e=e||{};let t={dryRun:!1,quiet:!1,verbose:!1},r=T.argv.slice(2);for(let n=0;n<r.length;n++){let o=r[n];if(o?.startsWith("--")){let a=o.substring(2).replace(/-([a-z])/gi,(c)=>c[1]?c[1].toUpperCase():"");if(n+1<r.length&&!r?.[n+1]?.startsWith("--"))if(r?.[n+1]==="true"||r?.[n+1]==="false")e[a]=r[n+1]==="true",n++;else e[a]=r[n+1],n++;else e[a]=!0}}if(Object.keys(e).length===0)return{};return{...t,...e}}function gt(e){if(Array.isArray(e)){if(e=Array.from(new Set(e)),Array.isArray(e)&&e[0]&&!e[0].startsWith("-"))e.shift();return e.join(" ")}if(typeof e==="object"&&e!==null)return Object.entries(e).filter(([t,r])=>t!=="--"&&t!=="_"&&r!==!1&&r!==void 0&&r!==null).map(([t,r])=>{if(r===!0)return`--${t}`;return`--${t} ${r}`}).join(" ");return gt(T.argv.slice(2))}import m from"process";import{createInterface as ct}from"readline";var gr=m.stdin.destroy;m.stdin.destroy=function(e){if(e)this.emit("error",e);return this};m.on("SIGINT",()=>{console.log(`
8
8
  `),m.exit(130)});var k=null;function ut(){if(!k){let e=m.stdin.isTTY&&m.stdout.isTTY;if(k=ct({input:m.stdin,output:m.stdout,terminal:e}),e&&typeof m.stdin.setRawMode==="function")k.on("SIGINT",()=>{m.emit("SIGINT")});k.once("close",()=>{k=null})}return k}var Y=Symbol("stdin-eof");function Ne(e){return new Promise((t)=>{let r=ut(),n=!1,o=(a)=>{if(n)return;n=!0,r.off("close",i),t(a)},i=()=>o(Y);r.once("close",i);try{r.question(e,o)}catch{o(Y)}})}async function S(e){let t=await Ne(e);return t===Y?"":t}function ze(e,t){let r=e.toLowerCase().trim();if(!r)return t;if(r==="y"||r==="yes")return!0;if(r==="n"||r==="no")return!1;return t}async function cr(e){let t=typeof e==="string"?{message:e}:e,r=t.initial??!1,n=r?" (Y/n) ":" (y/N) ",o=await Ne(`${t.message}${n}`);if(o===Y)return null;return ze(o,r)}async function pt(e){let t=typeof e==="string"?{message:e}:e,r=t.initial??!1,n=r?" (Y/n) ":" (y/N) ",o=await S(`${t.message}${n}`);return ze(o,r)}async function dt(e){let t=typeof e==="string"?{message:e}:e,r=t.placeholder||t.initial||"",n=r?` (${r}) `:" ";return(await S(`${t.message}${n}`)).trim()||t.initial||""}async function mt(e){console.log(e.message),e.choices.forEach((o,i)=>{let a=i===(e.initial??0)?">":" ";console.log(`${a} ${i+1}. ${o.label}`)});let t=await S("Select (number): "),r=Number.parseInt(t.trim(),10)-1,n=e.choices[r]??e.choices[e.initial??0];if(!n)throw Error("select prompt: no choices available");return n.value}async function ft(e){console.log(e.message),console.log("(Enter numbers separated by commas)"),e.choices.forEach((o,i)=>{console.log(` ${i+1}. ${o.label}`)});let r=(await S("Select (e.g., 1,3,4): ")).split(",").map((o)=>Number.parseInt(o.trim(),10)-1),n=[];for(let o of r){let i=e.choices[o];if(i)n.push(i.value)}return n}async function ht(e){return(await S(`${(typeof e==="string"?{message:e}:e).message} `)).trim()}var ur={text:dt,confirm:pt,select:mt,multiselect:ft,password:ht};import{handleError as bt}from"@stacksjs/error-handling";async function yt(e,t){let r={...t,stdin:t?.stdin??"inherit",verbose:t?.verbose??!1};return await _(e,r)}async function fr(e,t){let r={...t,stdio:[t?.stdin??"inherit","pipe","pipe"],verbose:t?.verbose??!1};return await _(e,r)}async function hr(e,t){let r={...t,stdio:[t?.stdin??"inherit","pipe","pipe"],verbose:t?.verbose??!1};return await ve(e,r)}async function br(e,t){let r=[];for(let n of e){let o=await yt(n,t);if(o.isErr)throw bt("Error during runCommands",o.error),o.error;r.push(o)}return r}import Ct from"process";var xt=["SIGINT","SIGTERM","SIGHUP"],F=new Map,qe=!1;function wt(){if(qe)return;qe=!0;for(let e of xt)Ct.on(e,async()=>{for(let[t,r]of F)try{await r()}catch(n){console.error(`[signals] cleanup '${t}' threw:`,n)}})}function xr(e,t){return wt(),F.set(e,t),()=>{if(F.get(e)===t)F.delete(e)}}function wr(e){F.delete(e)}function kr(){return[...F.keys()]}var _e=["\u280B","\u2819","\u2839","\u2838","\u283C","\u2834","\u2826","\u2827","\u2807","\u280F"],L=process.stdout.isTTY&&!process.env.CI;function kt(e){let t=e||"",r=0,n=null,o=!1,i=()=>{if(L)process.stdout.write("\r\x1B[K")},a=()=>{if(!L)return;i();let c=_e[r];process.stdout.write(`${c} ${t}`),r=(r+1)%_e.length};return{start(c){if(c)t=c;if(o)return;if(o=!0,L)a(),n=setInterval(a,80);else if(t)console.log(` ${t}`)},stop(c){if(o=!1,n)clearInterval(n),n=null;if(i(),c)console.log(c)},update(c){if(t=c,!L&&o)console.log(` ${c}`)},succeed(c){let u=c||t;if(o=!1,n)clearInterval(n),n=null;i(),console.log(`\u2713 ${u}`)},fail(c){let u=c||t;if(o=!1,n)clearInterval(n),n=null;i(),console.error(`\u2717 ${u}`)},get text(){return t},set text(c){if(t=c,L&&o)a()},get isSpinning(){return o}}}async function $r(e,t,r){let n=kt(e);n.start();try{let o=await t();return n.succeed(r?.successMessage||e),o}catch(o){throw n.fail(r?.failMessage||`Failed: ${e}`),o}}export{vt as CLI,A as align,Me as ansi256,je as ansi256Bg,oe as bgBlack,ae as bgBlue,B as bgCyan,ue as bgGray,se as bgGreen,fe as bgLightBlue,be as bgLightCyan,j as bgLightGray,de as bgLightGreen,he as bgLightMagenta,pe as bgLightRed,me as bgLightYellow,ge as bgMagenta,ie as bgRed,ce as bgWhite,le as bgYellow,H as black,U as blue,f as bold,_t as box,gt as buddyOptions,qt as centerAlign,Rt as cli,Tt as colorize,Yt as colors,pt as confirm,cr as confirmOrNull,w as cyan,C as dim,_ as exec,ve as execSync,Te as getColor,y as gray,x as green,xe as hidden,$t as installPackage,Bt as installStack,Zt as intro,Ce as inverse,p as italic,Wt as kolorist,Nt as leftAlign,te as lightBlue,ne as lightCyan,M as lightGray,Z as lightGreen,re as lightMagenta,X as lightRed,ee as lightYellow,Ae as link,kr as listSignalHandlers,d as log,J as magenta,ft as multiselect,wr as offSignal,xr as onSignal,Ot as onUnknownSubcommand,er as outro,or as parseArgs,at as parseArgv,ir as parseOptions,ht as password,ur as prompts,Dt as quotes,K as red,ke as reset,zt as rightAlign,yt as runCommand,hr as runCommandSync,br as runCommands,fr as runProcess,mt as select,kt as spinner,we as strikethrough,D as stripAnsi,Ge as stripColors,dt as text,Ee as trueColor,Pe as trueColorBg,ye as underline,Q as white,$r as withSpinner,V as yellow};
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "@stacksjs/cli",
3
3
  "type": "module",
4
4
  "sideEffects": false,
5
- "version": "0.72.74",
5
+ "version": "0.72.76",
6
6
  "description": "TypeScript framework for CLI artisans. Build beautiful console apps with ease.",
7
7
  "author": "Chris Breuer",
8
8
  "contributors": [
@@ -71,14 +71,14 @@
71
71
  "@stacksjs/clapp": "^0.2.12"
72
72
  },
73
73
  "devDependencies": {
74
- "@stacksjs/collections": "0.72.74",
75
- "@stacksjs/config": "0.72.74",
74
+ "@stacksjs/collections": "0.72.76",
75
+ "@stacksjs/config": "0.72.76",
76
76
  "better-dx": "^0.2.24",
77
- "@stacksjs/error-handling": "0.72.74",
78
- "@stacksjs/logging": "0.72.74",
79
- "@stacksjs/path": "0.72.74",
80
- "@stacksjs/types": "0.72.74",
81
- "@stacksjs/utils": "0.72.74",
82
- "@stacksjs/validation": "0.72.74"
77
+ "@stacksjs/error-handling": "0.72.76",
78
+ "@stacksjs/logging": "0.72.76",
79
+ "@stacksjs/path": "0.72.76",
80
+ "@stacksjs/types": "0.72.76",
81
+ "@stacksjs/utils": "0.72.76",
82
+ "@stacksjs/validation": "0.72.76"
83
83
  }
84
84
  }