@stacksjs/cli 0.70.342 → 0.70.343

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 Gj from"process";async function Ij(j,D={silent:!0}){let J=D.packageManage
4
4
  `);throw Error(`Command failed with exit code ${Q.exitCode}: ${J.join(" ")}
5
5
  ${q}`)}return X}function Mj(j,D,J,Q,X){if(A.debug(`exitHandler: ${j}, exitCode: ${J}, signalCode: ${Q}`),X)A.debug("Process error:",X.message)}import{handleError as Q0}from"@stacksjs/error-handling";import{log as A}from"@stacksjs/logging";import{ExitCode as Rj}from"@stacksjs/types";import{collect as sj}from"@stacksjs/collections";var $=!process.env.NO_COLOR&&(process.env.FORCE_COLOR?process.env.FORCE_COLOR!=="0":!!process.stdout?.isTTY),P={reset:$?"\x1B[0m":"",black:$?"\x1B[30m":"",red:$?"\x1B[31m":"",green:$?"\x1B[32m":"",yellow:$?"\x1B[33m":"",blue:$?"\x1B[34m":"",magenta:$?"\x1B[35m":"",cyan:$?"\x1B[36m":"",white:$?"\x1B[37m":"",gray:$?"\x1B[90m":"",lightRed:$?"\x1B[91m":"",lightGreen:$?"\x1B[92m":"",lightYellow:$?"\x1B[93m":"",lightBlue:$?"\x1B[94m":"",lightMagenta:$?"\x1B[95m":"",lightCyan:$?"\x1B[96m":"",lightGray:$?"\x1B[37m":"",bgBlack:$?"\x1B[40m":"",bgRed:$?"\x1B[41m":"",bgGreen:$?"\x1B[42m":"",bgYellow:$?"\x1B[43m":"",bgBlue:$?"\x1B[44m":"",bgMagenta:$?"\x1B[45m":"",bgCyan:$?"\x1B[46m":"",bgWhite:$?"\x1B[47m":"",bgGray:$?"\x1B[100m":"",bgLightRed:$?"\x1B[101m":"",bgLightGreen:$?"\x1B[102m":"",bgLightYellow:$?"\x1B[103m":"",bgLightBlue:$?"\x1B[104m":"",bgLightMagenta:$?"\x1B[105m":"",bgLightCyan:$?"\x1B[106m":"",bgLightGray:$?"\x1B[47m":"",bold:$?"\x1B[1m":"",dim:$?"\x1B[2m":"",italic:$?"\x1B[3m":"",underline:$?"\x1B[4m":"",inverse:$?"\x1B[7m":"",hidden:$?"\x1B[8m":"",strikethrough:$?"\x1B[9m":""},y="\x1B[",tj="\x1B]8;;",ij="\x1B]8;;\x07",Lj=(j)=>String(j);function Y(j,D,J){return Math.min(Math.max(Math.floor(j),D),J)}function _(j,D=P.reset){return(J)=>{if(!$)return String(J);return`${j}${String(J)}${D}`}}function ej(j){return j.replace(/\x1B\]8;;[^\x07]*(?:\x07|\x1B\\)/g,"").replace(/\x1B\]8;;(?:\x07|\x1B\\)/g,"")}function l(j){return ej(j).replace(/\x1B\[[0-?]*[ -/]*[@-~]/g,"")}var Oj=l;function wj(j){return Array.from(l(j)).length}var p=_(P.black),a=_(P.red),V=_(P.green),r=_(P.yellow),s=_(P.blue),t=_(P.magenta),E=_(P.cyan),i=_(P.white),F=_(P.gray),e=_(P.lightRed),n=_(P.lightGreen),o=_(P.lightYellow),jj=_(P.lightBlue),Dj=_(P.lightMagenta),Jj=_(P.lightCyan),S=_(P.lightGray),Qj=_(P.bgBlack),Xj=_(P.bgRed),Zj=_(P.bgGreen),_j=_(P.bgYellow),$j=_(P.bgBlue),qj=_(P.bgMagenta),k=_(P.bgCyan),Pj=_(P.bgWhite),Hj=_(P.bgGray),Kj=_(P.bgLightRed),Nj=_(P.bgLightGreen),Aj=_(P.bgLightYellow),Tj=_(P.bgLightBlue),Uj=_(P.bgLightMagenta),zj=_(P.bgLightCyan),C=_(P.bgLightGray),U=_(P.bold),B=_(P.dim),N=_(P.italic),Yj=_(P.underline),Fj=_(P.inverse),Bj=_(P.hidden),Vj=_(P.strikethrough),Ej=_(P.reset,"");function Sj(j){return _(`${y}38;5;${Y(j,0,255)}m`)}function Cj(j){return _(`${y}48;5;${Y(j,0,255)}m`)}function yj(j,D,J){return _(`${y}38;2;${Y(j,0,255)};${Y(D,0,255)};${Y(J,0,255)}m`)}function bj(j,D,J){return _(`${y}48;2;${Y(j,0,255)};${Y(D,0,255)};${Y(J,0,255)}m`)}function vj(j,D){let J=(X,Z)=>{let q=String(X);if(!$)return q;return`${tj}${Z}\x07${q}${ij}`};if(typeof D==="string")return J(j,D);let Q=String(j);return(X)=>J(X,Q)}var nj={black:p,red:a,green:V,yellow:r,blue:s,magenta:t,cyan:E,white:i,gray:F,lightRed:e,lightGreen:n,lightYellow:o,lightBlue:jj,lightMagenta:Dj,lightCyan:Jj,lightGray:S,bgBlack:Qj,bgRed:Xj,bgGreen:Zj,bgYellow:_j,bgBlue:$j,bgMagenta:qj,bgCyan:k,bgWhite:Pj,bgGray:Hj,bgLightRed:Kj,bgLightGreen:Nj,bgLightYellow:Aj,bgLightBlue:Tj,bgLightMagenta:Uj,bgLightCyan:zj,bgLightGray:C,bold:U,dim:B,italic:N,underline:Yj,inverse:Fj,hidden:Bj,strikethrough:Vj,reset:Ej};function xj(j){return nj[j]??Lj}function x0(j,D){if(typeof D==="function")return D(j);return xj(D)(j)}function oj(){return $}var h0={black:p,red:a,green:V,yellow:r,blue:s,magenta:t,cyan:E,white:i,gray:F,lightRed:e,lightGreen:n,lightYellow:o,lightBlue:jj,lightMagenta:Dj,lightCyan:Jj,lightGray:S,bgBlack:Qj,bgRed:Xj,bgGreen:Zj,bgYellow:_j,bgBlue:$j,bgMagenta:qj,bgCyan:k,bgWhite:Pj,bgGray:Hj,bgLightRed:Kj,bgLightGreen:Nj,bgLightYellow:Aj,bgLightBlue:Tj,bgLightMagenta:Uj,bgLightCyan:zj,bgLightGray:C,bold:U,dim:B,italic:N,underline:Yj,inverse:Fj,hidden:Bj,strikethrough:Vj,reset:Ej,ansi256:Sj,ansi256Bg:Cj,trueColor:yj,trueColorBg:bj,link:vj,stripColors:Oj},u0={black:p,red:a,green:V,yellow:r,blue:s,magenta:t,cyan:E,white:i,gray:F,lightRed:e,lightGreen:n,lightYellow:o,lightBlue:jj,lightMagenta:Dj,lightCyan:Jj,lightGray:S,bgBlack:Qj,bgRed:Xj,bgGreen:Zj,bgYellow:_j,bgBlue:$j,bgMagenta:qj,bgCyan:k,bgWhite:Pj,bgGray:Hj,bgLightRed:Kj,bgLightGreen:Nj,bgLightYellow:Aj,bgLightBlue:Tj,bgLightMagenta:Uj,bgLightCyan:zj,bgLightGray:C,bold:U,dim:B,italic:N,underline:Yj,inverse:Fj,hidden:Bj,strikethrough:Vj,reset:Ej,ansi256:Sj,ansi256Bg:Cj,trueColor:yj,trueColorBg:bj,link:vj,stripColors:Oj,grey:F,lightGrey:S,bgLightGrey:C,supportsColor:oj};function j0(j,D,J,Q){let X=wj(j);if(X>=D)return j;let Z=Q[0]||" ",q=D-X;if(J==="right")return`${Z.repeat(q)}${j}`;if(J==="center"){let H=Math.floor(q/2),K=q-H;return`${Z.repeat(H)}${j}${Z.repeat(K)}`}return`${j}${Z.repeat(q)}`}function b(j){return Math.max(0,...j.map(wj))}function v(j,D,J="left"){let Q=String(j).split(/\r?\n/),X=typeof D==="object"?D:void 0,Z=typeof D==="number"?D:X?.width??b(Q),q=X?.align??J,H=X?.padChar??" ";return Q.map((K)=>j0(K,Math.max(0,Z),q,H)).join(`
6
6
  `)}function m0(j,D){return v(j,D,"left")}function c0(j,D){let J=String(j).split(/\r?\n/);return v(j,D??process.stdout?.columns??b(J),"right")}function d0(j,D){let J=String(j).split(/\r?\n/);return v(j,D??process.stdout?.columns??b(J),"center")}var D0={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 g0(j,D={}){let J=String(j).split(/\r?\n/),Q=D0[D.borderStyle??"single"],X=Math.max(0,D.padding??1),Z=Math.max(0,D.margin??0),q=D.align??"left",H=b(J),K=H+X*2,z=typeof D.borderColor==="function"?D.borderColor:D.borderColor?xj(D.borderColor):Lj,u=z((()=>{if(!D.title)return`${Q.topLeft}${Q.horizontal.repeat(K)}${Q.topRight}`;let M=` ${l(String(D.title))} `.slice(0,K),c=Q.horizontal.repeat(Math.max(0,K-M.length));return`${Q.topLeft}${M}${c}${Q.topRight}`})()),m=z(`${Q.bottomLeft}${Q.horizontal.repeat(K)}${Q.bottomRight}`),lj=J.map((f)=>{let M=v(f,{align:q,width:H}),c=`${" ".repeat(X)}${M}${" ".repeat(X)}`;return`${z(Q.vertical)}${c}${z(Q.vertical)}`}),pj=" ".repeat(Z);return[u,...lj,m].map((f)=>`${pj}${f}`).join(`
7
- `)}var l0=sj(["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 hj="0.70.342";async function n0(j,D){return new Promise((J)=>{if(D?.quiet===!1)console.log(),console.log(E(U("Stacks CLI"))+B(` v${hj}`)),console.log();if(A.info(`Running ${k(N(U(` ${j} `)))}`),D?.showPerformance===!1||D?.quiet)return J(0);return J(performance.now())})}function o0(j,D,J){let Q={type:"success",useSeconds:!0,...D};return Q.message=D?.message||j,new Promise((X)=>{if(J)return Q0(J),X(Rj.FatalError);if(Q?.startTime){let Z=performance.now()-Q.startTime;if(Q.useSeconds)Z=Z/1000,Z=Math.round(Z*100)/100;if(Q.quiet===!0)return X(Rj.Success);if(J)A.error(`[${Z.toFixed(2)}${Q.useSeconds?"s":"ms"}] Failed`);else if(Q.type==="info")A.info(`${B(F(`[${Z.toFixed(2)}${Q.useSeconds?"s":"ms"}]`))} ${Q.message??"Complete"}`);else A.success(`${B(F(U(`[${Z.toFixed(2)}${Q.useSeconds?"s":"ms"}]`)))} ${U(V(Q.message??"Complete"))}`)}else if(Q?.type==="info")A.info(j);else if(Q?.type==="success"&&Q?.quiet!==!0)A.success(j);return X(Rj.Success)})}import x from"process";function uj(j){if(!j)return!1;return j.startsWith("--")}function X0(j){return j.startsWith("-")&&!uj(j)}function Wj(j){if(j==="true")return!0;if(j==="false")return!1;let D=Number.parseFloat(j);if(!Number.isNaN(D))return D;return j.replace(/"/g,"")}function Z0(j,D,J,Q){let[X,Z]=j.slice(2).split("=");if(Z!==void 0)Q[X]=Wj(Z);else if(J+1<D.length&&!D[J+1]?.startsWith("-"))Q[X]=D[J+1],J++;else Q[X]=!0;return J}function _0(j,D,J,Q){let[X,Z]=j.slice(1).split("=");if(X===void 0)return J;if(Z!==void 0&&X!==void 0)for(let q=0;q<X.length;q++)Q[X[q]]=Wj(Z);else for(let q=0;q<X.length;q++)if(J+1<D.length&&q===X.length-1&&!D[J+1]?.startsWith("-"))Q[X[q]]=Wj(D[J+1]),J++;else Q[X[q]]=!0;return J}function $0(j){if(j===void 0)j=x.argv.slice(2);let D=[],J={};for(let Q=0;Q<j.length;Q++){let X=j[Q];if(!X)continue;if(uj(X))Q=Z0(X,j,Q,J);else if(X0(X))Q=_0(X,j,Q,J);else D.push(X)}return{args:D,options:J}}function Q2(j){if(j===void 0)j=x.argv.slice(2);return $0(j).args}function X2(j){j=j||{};let D={dryRun:!1,quiet:!1,verbose:!1},J=x.argv.slice(2);for(let Q=0;Q<J.length;Q++){let X=J[Q];if(X?.startsWith("--")){let q=X.substring(2).replace(/-([a-z])/gi,(H)=>H[1]?H[1].toUpperCase():"");if(Q+1<J.length&&!J?.[Q+1]?.startsWith("--"))if(J?.[Q+1]==="true"||J?.[Q+1]==="false")j[q]=J[Q+1]==="true",Q++;else j[q]=J[Q+1],Q++;else j[q]=!0}}if(Object.keys(j).length===0)return{};return{...D,...j}}function q0(j){if(Array.isArray(j)){if(j=Array.from(new Set(j)),Array.isArray(j)&&j[0]&&!j[0].startsWith("-"))j.shift();return j.join(" ")}if(typeof j==="object"&&j!==null)return Object.entries(j).filter(([D,J])=>D!=="--"&&D!=="_"&&J!==!1&&J!==void 0&&J!==null).map(([D,J])=>{if(J===!0)return`--${D}`;return`--${D} ${J}`}).join(" ");return q0(x.argv.slice(2))}import T from"process";import{createInterface as P0}from"readline";var q2=T.stdin.destroy;T.stdin.destroy=function(j){if(j)this.emit("error",j);return this};T.on("SIGINT",()=>{console.log(`
7
+ `)}var l0=sj(["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 hj="0.70.343";async function n0(j,D){return new Promise((J)=>{if(D?.quiet===!1)console.log(),console.log(E(U("Stacks CLI"))+B(` v${hj}`)),console.log();if(A.info(`Running ${k(N(U(` ${j} `)))}`),D?.showPerformance===!1||D?.quiet)return J(0);return J(performance.now())})}function o0(j,D,J){let Q={type:"success",useSeconds:!0,...D};return Q.message=D?.message||j,new Promise((X)=>{if(J)return Q0(J),X(Rj.FatalError);if(Q?.startTime){let Z=performance.now()-Q.startTime;if(Q.useSeconds)Z=Z/1000,Z=Math.round(Z*100)/100;if(Q.quiet===!0)return X(Rj.Success);if(J)A.error(`[${Z.toFixed(2)}${Q.useSeconds?"s":"ms"}] Failed`);else if(Q.type==="info")A.info(`${B(F(`[${Z.toFixed(2)}${Q.useSeconds?"s":"ms"}]`))} ${Q.message??"Complete"}`);else A.success(`${B(F(U(`[${Z.toFixed(2)}${Q.useSeconds?"s":"ms"}]`)))} ${U(V(Q.message??"Complete"))}`)}else if(Q?.type==="info")A.info(j);else if(Q?.type==="success"&&Q?.quiet!==!0)A.success(j);return X(Rj.Success)})}import x from"process";function uj(j){if(!j)return!1;return j.startsWith("--")}function X0(j){return j.startsWith("-")&&!uj(j)}function Wj(j){if(j==="true")return!0;if(j==="false")return!1;let D=Number.parseFloat(j);if(!Number.isNaN(D))return D;return j.replace(/"/g,"")}function Z0(j,D,J,Q){let[X,Z]=j.slice(2).split("=");if(Z!==void 0)Q[X]=Wj(Z);else if(J+1<D.length&&!D[J+1]?.startsWith("-"))Q[X]=D[J+1],J++;else Q[X]=!0;return J}function _0(j,D,J,Q){let[X,Z]=j.slice(1).split("=");if(X===void 0)return J;if(Z!==void 0&&X!==void 0)for(let q=0;q<X.length;q++)Q[X[q]]=Wj(Z);else for(let q=0;q<X.length;q++)if(J+1<D.length&&q===X.length-1&&!D[J+1]?.startsWith("-"))Q[X[q]]=Wj(D[J+1]),J++;else Q[X[q]]=!0;return J}function $0(j){if(j===void 0)j=x.argv.slice(2);let D=[],J={};for(let Q=0;Q<j.length;Q++){let X=j[Q];if(!X)continue;if(uj(X))Q=Z0(X,j,Q,J);else if(X0(X))Q=_0(X,j,Q,J);else D.push(X)}return{args:D,options:J}}function Q2(j){if(j===void 0)j=x.argv.slice(2);return $0(j).args}function X2(j){j=j||{};let D={dryRun:!1,quiet:!1,verbose:!1},J=x.argv.slice(2);for(let Q=0;Q<J.length;Q++){let X=J[Q];if(X?.startsWith("--")){let q=X.substring(2).replace(/-([a-z])/gi,(H)=>H[1]?H[1].toUpperCase():"");if(Q+1<J.length&&!J?.[Q+1]?.startsWith("--"))if(J?.[Q+1]==="true"||J?.[Q+1]==="false")j[q]=J[Q+1]==="true",Q++;else j[q]=J[Q+1],Q++;else j[q]=!0}}if(Object.keys(j).length===0)return{};return{...D,...j}}function q0(j){if(Array.isArray(j)){if(j=Array.from(new Set(j)),Array.isArray(j)&&j[0]&&!j[0].startsWith("-"))j.shift();return j.join(" ")}if(typeof j==="object"&&j!==null)return Object.entries(j).filter(([D,J])=>D!=="--"&&D!=="_"&&J!==!1&&J!==void 0&&J!==null).map(([D,J])=>{if(J===!0)return`--${D}`;return`--${D} ${J}`}).join(" ");return q0(x.argv.slice(2))}import T from"process";import{createInterface as P0}from"readline";var q2=T.stdin.destroy;T.stdin.destroy=function(j){if(j)this.emit("error",j);return this};T.on("SIGINT",()=>{console.log(`
8
8
  `),T.exit(130)});var R=null;function H0(){if(!R){let j=T.stdin.isTTY&&T.stdout.isTTY;if(R=P0({input:T.stdin,output:T.stdout,terminal:j}),j&&typeof T.stdin.setRawMode==="function")R.on("SIGINT",()=>{T.emit("SIGINT")});R.once("close",()=>{R=null})}return R}var h=Symbol("stdin-eof");function mj(j){return new Promise((D)=>{let J=H0(),Q=!1,X=(q)=>{if(Q)return;Q=!0,J.off("close",Z),D(q)},Z=()=>X(h);J.once("close",Z);try{J.question(j,X)}catch{X(h)}})}async function G(j){let D=await mj(j);return D===h?"":D}function cj(j,D){let J=j.toLowerCase().trim();if(!J)return D;if(J==="y"||J==="yes")return!0;if(J==="n"||J==="no")return!1;return D}async function P2(j){let D=typeof j==="string"?{message:j}:j,J=D.initial??!1,Q=J?" (Y/n) ":" (y/N) ",X=await mj(`${D.message}${Q}`);if(X===h)return null;return cj(X,J)}async function K0(j){let D=typeof j==="string"?{message:j}:j,J=D.initial??!1,Q=J?" (Y/n) ":" (y/N) ",X=await G(`${D.message}${Q}`);return cj(X,J)}async function N0(j){let D=typeof j==="string"?{message:j}:j,J=D.placeholder||D.initial||"",Q=J?` (${J}) `:" ";return(await G(`${D.message}${Q}`)).trim()||D.initial||""}async function A0(j){console.log(j.message),j.choices.forEach((X,Z)=>{let q=Z===(j.initial??0)?">":" ";console.log(`${q} ${Z+1}. ${X.label}`)});let D=await G("Select (number): "),J=Number.parseInt(D.trim(),10)-1,Q=j.choices[J]??j.choices[j.initial??0];if(!Q)throw Error("select prompt: no choices available");return Q.value}async function T0(j){console.log(j.message),console.log("(Enter numbers separated by commas)"),j.choices.forEach((X,Z)=>{console.log(` ${Z+1}. ${X.label}`)});let J=(await G("Select (e.g., 1,3,4): ")).split(",").map((X)=>Number.parseInt(X.trim(),10)-1),Q=[];for(let X of J){let Z=j.choices[X];if(Z)Q.push(Z.value)}return Q}async function U0(j){return(await G(`${(typeof j==="string"?{message:j}:j).message} `)).trim()}var H2={text:N0,confirm:K0,select:A0,multiselect:T0,password:U0};import{handleError as z0}from"@stacksjs/error-handling";async function Y0(j,D){let J={...D,stdin:D?.stdin??"inherit",verbose:D?.verbose??!1};return await g(j,J)}async function T2(j,D){let J={...D,stdio:[D?.stdin??"inherit","pipe","pipe"],verbose:D?.verbose??!1};return await g(j,J)}async function U2(j,D){let J={...D,stdio:[D?.stdin??"inherit","pipe","pipe"],verbose:D?.verbose??!1};return await fj(j,J)}async function z2(j,D){let J=[];for(let Q of j){let X=await Y0(Q,D);if(X.isErr)throw z0("Error during runCommands",X.error),X.error;J.push(X)}return J}import F0 from"process";var B0=["SIGINT","SIGTERM","SIGHUP"],W=new Map,dj=!1;function V0(){if(dj)return;dj=!0;for(let j of B0)F0.on(j,async()=>{for(let[D,J]of W)try{await J()}catch(Q){console.error(`[signals] cleanup '${D}' threw:`,Q)}})}function B2(j,D){return V0(),W.set(j,D),()=>{if(W.get(j)===D)W.delete(j)}}function V2(j){W.delete(j)}function E2(){return[...W.keys()]}var gj=["\u280B","\u2819","\u2839","\u2838","\u283C","\u2834","\u2826","\u2827","\u2807","\u280F"],I=process.stdout.isTTY&&!process.env.CI;function E0(j){let D=j||"",J=0,Q=null,X=!1,Z=()=>{if(I)process.stdout.write("\r\x1B[K")},q=()=>{if(!I)return;Z();let H=gj[J];process.stdout.write(`${H} ${D}`),J=(J+1)%gj.length};return{start(H){if(H)D=H;if(X)return;if(X=!0,I)q(),Q=setInterval(q,80);else if(D)console.log(` ${D}`)},stop(H){if(X=!1,Q)clearInterval(Q),Q=null;if(Z(),H)console.log(H)},update(H){if(D=H,!I&&X)console.log(` ${H}`)},succeed(H){let K=H||D;if(X=!1,Q)clearInterval(Q),Q=null;Z(),console.log(`\u2713 ${K}`)},fail(H){let K=H||D;if(X=!1,Q)clearInterval(Q),Q=null;Z(),console.error(`\u2717 ${K}`)},get text(){return D},set text(H){if(D=H,I&&X)q()},get isSpinning(){return X}}}async function W2(j,D,J){let Q=E0(j);Q.start();try{let X=await D();return Q.succeed(J?.successMessage||j),X}catch(X){throw Q.fail(J?.failMessage||`Failed: ${j}`),X}}export{r as yellow,W2 as withSpinner,i as white,Yj as underline,bj as trueColorBg,yj as trueColor,N0 as text,Oj as stripColors,l as stripAnsi,Vj as strikethrough,E0 as spinner,A0 as select,T2 as runProcess,z2 as runCommands,U2 as runCommandSync,Y0 as runCommand,c0 as rightAlign,Ej as reset,a as red,l0 as quotes,H2 as prompts,U0 as password,X2 as parseOptions,$0 as parseArgv,Q2 as parseArgs,o0 as outro,M0 as onUnknownSubcommand,B2 as onSignal,V2 as offSignal,T0 as multiselect,t as magenta,A as log,E2 as listSignalHandlers,vj as link,o as lightYellow,e as lightRed,Dj as lightMagenta,n as lightGreen,S as lightGray,Jj as lightCyan,jj as lightBlue,m0 as leftAlign,u0 as kolorist,N as italic,Fj as inverse,n0 as intro,k0 as installStack,W0 as installPackage,Bj as hidden,V as green,F as gray,xj as getColor,fj as execSync,g as exec,B as dim,E as cyan,P2 as confirmOrNull,K0 as confirm,h0 as colors,x0 as colorize,L0 as cli,d0 as centerAlign,q0 as buddyOptions,g0 as box,U as bold,s as blue,p as black,_j as bgYellow,Pj as bgWhite,Xj as bgRed,qj as bgMagenta,Aj as bgLightYellow,Kj as bgLightRed,Uj as bgLightMagenta,Nj as bgLightGreen,C as bgLightGray,zj as bgLightCyan,Tj as bgLightBlue,Zj as bgGreen,Hj as bgGray,k as bgCyan,$j as bgBlue,Qj as bgBlack,Cj as ansi256Bg,Sj as ansi256,v as align,f0 as CLI};
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "@stacksjs/cli",
3
3
  "type": "module",
4
4
  "sideEffects": false,
5
- "version": "0.70.342",
5
+ "version": "0.70.343",
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.70.342",
75
- "@stacksjs/config": "0.70.342",
74
+ "@stacksjs/collections": "0.70.343",
75
+ "@stacksjs/config": "0.70.343",
76
76
  "better-dx": "^0.2.17",
77
- "@stacksjs/error-handling": "0.70.342",
78
- "@stacksjs/logging": "0.70.342",
79
- "@stacksjs/path": "0.70.342",
80
- "@stacksjs/types": "0.70.342",
81
- "@stacksjs/utils": "0.70.342",
82
- "@stacksjs/validation": "0.70.342"
77
+ "@stacksjs/error-handling": "0.70.343",
78
+ "@stacksjs/logging": "0.70.343",
79
+ "@stacksjs/path": "0.70.343",
80
+ "@stacksjs/types": "0.70.343",
81
+ "@stacksjs/utils": "0.70.343",
82
+ "@stacksjs/validation": "0.70.343"
83
83
  }
84
84
  }