lody 0.1.2 → 0.1.3

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 +1 -1
package/dist/index.js CHANGED
@@ -135,7 +135,7 @@ ${e}`;return Object.assign(new Error(r),t,{stack:i})}var F8=class extends sWe.Ev
135
135
  `:`
136
136
  `)+r,i=n+1,n=t.indexOf(`
137
137
  `,i)}while(n!==-1);return s+=t.slice(i),s}var{stdout:_M,stderr:yM}=pM,OC=Symbol("GENERATOR"),Fd=Symbol("STYLER"),$p=Symbol("IS_EMPTY"),vM=["ansi","ansi","ansi256","ansi16m"],Rd=Object.create(null),xhe=(t,e={})=>{if(e.level&&!(Number.isInteger(e.level)&&e.level>=0&&e.level<=3))throw new Error("The `level` option should be an integer from 0 to 3");let r=_M?_M.level:0;t.level=e.level===void 0?r:e.level};var Ehe=t=>{let e=(...r)=>r.join(" ");return xhe(e,t),Object.setPrototypeOf(e,Wp.prototype),e};function Wp(t){return Ehe(t)}Object.setPrototypeOf(Wp.prototype,Function.prototype);for(let[t,e]of Object.entries(co))Rd[t]={get(){let r=rv(this,RC(e.open,e.close,this[Fd]),this[$p]);return Object.defineProperty(this,t,{value:r}),r}};Rd.visible={get(){let t=rv(this,this[Fd],!0);return Object.defineProperty(this,"visible",{value:t}),t}};var FC=(t,e,r,...n)=>t==="rgb"?e==="ansi16m"?co[r].ansi16m(...n):e==="ansi256"?co[r].ansi256(co.rgbToAnsi256(...n)):co[r].ansi(co.rgbToAnsi(...n)):t==="hex"?FC("rgb",e,r,...co.hexToRgb(...n)):co[r][t](...n),whe=["rgb","hex","ansi256"];for(let t of whe){Rd[t]={get(){let{level:r}=this;return function(...n){let i=RC(FC(t,vM[r],"color",...n),co.color.close,this[Fd]);return rv(this,i,this[$p])}}};let e="bg"+t[0].toUpperCase()+t.slice(1);Rd[e]={get(){let{level:r}=this;return function(...n){let i=RC(FC(t,vM[r],"bgColor",...n),co.bgColor.close,this[Fd]);return rv(this,i,this[$p])}}}}var She=Object.defineProperties(()=>{},{...Rd,level:{enumerable:!0,get(){return this[OC].level},set(t){this[OC].level=t}}}),RC=(t,e,r)=>{let n,i;return r===void 0?(n=t,i=e):(n=r.openAll+t,i=e+r.closeAll),{open:t,close:e,openAll:n,closeAll:i,parent:r}},rv=(t,e,r)=>{let n=(...i)=>Dhe(n,i.length===1?""+i[0]:i.join(" "));return Object.setPrototypeOf(n,She),n[OC]=t,n[Fd]=e,n[$p]=r,n},Dhe=(t,e)=>{if(t.level<=0||!e)return t[$p]?"":e;let r=t[Fd];if(r===void 0)return e;let{openAll:n,closeAll:i}=r;if(e.includes("\x1B"))for(;r!==void 0;)e=gM(e,r.close,r.open),r=r.parent;let s=e.indexOf(`
138
- `);return s!==-1&&(e=mM(e,i,n,s)),n+e+i};Object.defineProperties(Wp.prototype,Rd);var Ahe=Wp(),DJe=Wp({level:yM?yM.level:0});var rt=Ahe;var xM="0.1.2";var EM={name:"lody",version:xM,description:"Lody Agent CLI tool for managing remote command execution",main:"dist/index.js",bin:{lody:"dist/index.js"},scripts:{dev:"tsx src/index.ts",build:"pnpm run clean && pnpm run typecheck && pnpm run build:bundle && pnpm run copy:wasm","build:watch":"pnpm run build:bundle -- --watch","build:bundle":"esbuild src/index.ts --bundle --platform=node --target=node18 --format=cjs --outfile=dist/index.js --minify --legal-comments=none --external:cpu-features --external:*.node","copy:wasm":"node scripts/copy-loro-wasm.js",clean:"rimraf dist",format:"prettier --write src/**/*.ts","format:check":"prettier --check src/**/*.ts",typecheck:"tsc --noEmit",test:"jest","test:watch":"jest --watch","test:coverage":"jest --coverage",prepublishOnly:"npm run clean && npm run build && node scripts/prepare-publish.js",postpublish:"node scripts/prepare-publish.js --restore","serve:dev":"NODE_ENV=development npm run dev serve","serve:prod":"NODE_ENV=production npm run dev serve"},keywords:["cli","typescript","command-line","agent","remote-execution"],author:"Leon Zhao",license:"MIT",engines:{node:">=18.0.0"},devDependencies:{"loro-mirror":"catalog:","loro-crdt":"catalog:","@modelcontextprotocol/sdk":"^1.17.0",chalk:"^5.3.0",commander:"^12.1.0",convex:"1.25.4",dockerode:"^4.0.7",dotenv:"^16.6.1",eventemitter3:"^5.0.1",express:"^4.21.2","fs-extra":"^11.2.0",inquirer:"^10.2.2","js-yaml":"^4.1.0",ora:"^8.1.1",uuid:"^13.0.0",winston:"^3.11.0","winston-daily-rotate-file":"^5.0.0",ws:"^8.18.3","@lody/types":"workspace:*","loro-websocket":"workspace:*","@types/dockerode":"^3.3.42","@types/express":"^5.0.0","@types/fs-extra":"^11.0.4","@types/inquirer":"^9.0.7","@types/jest":"^29.5.14","@types/js-yaml":"^4.0.9","@types/node":"catalog:","@types/uuid":"^9.0.8","@types/ws":"^8.18.1",jest:"^29.7.0",prettier:"^3.4.2",rimraf:"^6.0.1","ts-jest":"^29.2.5","ts-node":"^10.9.2",tsx:"^4.20.5",typescript:"catalog:",esbuild:"^0.24.0"},files:["dist","README.md","LICENSE"]};var zp=je(require("node:process"),1);var jC=je(require("node:process"),1);var Hp=je(require("node:process"),1);var Che=(t,e,r,n)=>{if(r==="length"||r==="prototype"||r==="arguments"||r==="caller")return;let i=Object.getOwnPropertyDescriptor(t,r),s=Object.getOwnPropertyDescriptor(e,r);!Ihe(i,s)&&n||Object.defineProperty(t,r,s)},Ihe=function(t,e){return t===void 0||t.configurable||t.writable===e.writable&&t.enumerable===e.enumerable&&t.configurable===e.configurable&&(t.writable||t.value===e.value)},khe=(t,e)=>{let r=Object.getPrototypeOf(e);r!==Object.getPrototypeOf(t)&&Object.setPrototypeOf(t,r)},The=(t,e)=>`/* Wrapped ${t}*/
138
+ `);return s!==-1&&(e=mM(e,i,n,s)),n+e+i};Object.defineProperties(Wp.prototype,Rd);var Ahe=Wp(),DJe=Wp({level:yM?yM.level:0});var rt=Ahe;var xM="0.1.3";var EM={name:"lody",version:xM,description:"Lody Agent CLI tool for managing remote command execution",main:"dist/index.js",bin:{lody:"dist/index.js"},scripts:{dev:"tsx src/index.ts",build:"pnpm run clean && pnpm run typecheck && pnpm run build:bundle && pnpm run copy:wasm","build:watch":"pnpm run build:bundle -- --watch","build:bundle":"esbuild src/index.ts --bundle --platform=node --target=node18 --format=cjs --outfile=dist/index.js --minify --legal-comments=none --external:cpu-features --external:*.node","copy:wasm":"node scripts/copy-loro-wasm.js",clean:"rimraf dist",format:"prettier --write src/**/*.ts","format:check":"prettier --check src/**/*.ts",typecheck:"tsc --noEmit",test:"jest","test:watch":"jest --watch","test:coverage":"jest --coverage",prepublishOnly:"npm run clean && npm run build && node scripts/prepare-publish.js",postpublish:"node scripts/prepare-publish.js --restore","serve:dev":"NODE_ENV=development npm run dev serve","serve:prod":"NODE_ENV=production npm run dev serve"},keywords:["cli","typescript","command-line","agent","remote-execution"],author:"Leon Zhao",license:"MIT",engines:{node:">=18.0.0"},devDependencies:{"loro-mirror":"catalog:","loro-crdt":"catalog:","@modelcontextprotocol/sdk":"^1.17.0",chalk:"^5.3.0",commander:"^12.1.0",convex:"1.25.4",dockerode:"^4.0.7",dotenv:"^16.6.1",eventemitter3:"^5.0.1",express:"^4.21.2","fs-extra":"^11.2.0",inquirer:"^10.2.2","js-yaml":"^4.1.0",ora:"^8.1.1",uuid:"^13.0.0",winston:"^3.11.0","winston-daily-rotate-file":"^5.0.0",ws:"^8.18.3","@lody/types":"workspace:*","loro-websocket":"workspace:*","@types/dockerode":"^3.3.42","@types/express":"^5.0.0","@types/fs-extra":"^11.0.4","@types/inquirer":"^9.0.7","@types/jest":"^29.5.14","@types/js-yaml":"^4.0.9","@types/node":"catalog:","@types/uuid":"^9.0.8","@types/ws":"^8.18.1",jest:"^29.7.0",prettier:"^3.4.2",rimraf:"^6.0.1","ts-jest":"^29.2.5","ts-node":"^10.9.2",tsx:"^4.20.5",typescript:"catalog:",esbuild:"^0.24.0"},files:["dist","README.md","LICENSE"]};var zp=je(require("node:process"),1);var jC=je(require("node:process"),1);var Hp=je(require("node:process"),1);var Che=(t,e,r,n)=>{if(r==="length"||r==="prototype"||r==="arguments"||r==="caller")return;let i=Object.getOwnPropertyDescriptor(t,r),s=Object.getOwnPropertyDescriptor(e,r);!Ihe(i,s)&&n||Object.defineProperty(t,r,s)},Ihe=function(t,e){return t===void 0||t.configurable||t.writable===e.writable&&t.enumerable===e.enumerable&&t.configurable===e.configurable&&(t.writable||t.value===e.value)},khe=(t,e)=>{let r=Object.getPrototypeOf(e);r!==Object.getPrototypeOf(t)&&Object.setPrototypeOf(t,r)},The=(t,e)=>`/* Wrapped ${t}*/
139
139
  ${e}`,Ohe=Object.getOwnPropertyDescriptor(Function.prototype,"toString"),Fhe=Object.getOwnPropertyDescriptor(Function.prototype.toString,"name"),Rhe=(t,e,r)=>{let n=r===""?"":`with ${r.trim()}() `,i=The.bind(null,n,e.toString());Object.defineProperty(i,"name",Fhe);let{writable:s,enumerable:o,configurable:a}=Ohe;Object.defineProperty(t,"toString",{value:i,writable:s,enumerable:o,configurable:a})};function PC(t,e,{ignoreNonConfigurable:r=!1}={}){let{name:n}=t;for(let i of Reflect.ownKeys(e))Che(t,e,i,r);return khe(t,e),Rhe(t,e,n),t}var nv=new WeakMap,wM=(t,e={})=>{if(typeof t!="function")throw new TypeError("Expected a function");let r,n=0,i=t.displayName||t.name||"<anonymous>",s=function(...o){if(nv.set(s,++n),n===1)r=t.apply(this,o),t=void 0;else if(e.throw===!0)throw new Error(`Function \`${i}\` can only be called once`);return r};return PC(s,t),nv.set(s,n),s};wM.callCount=t=>{if(!nv.has(t))throw new Error(`The given function \`${t.name}\` is not wrapped by the \`onetime\` package`);return nv.get(t)};var SM=wM;var $l=[];$l.push("SIGHUP","SIGINT","SIGTERM");process.platform!=="win32"&&$l.push("SIGALRM","SIGABRT","SIGVTALRM","SIGXCPU","SIGXFSZ","SIGUSR2","SIGTRAP","SIGSYS","SIGQUIT","SIGIOT");process.platform==="linux"&&$l.push("SIGIO","SIGPOLL","SIGPWR","SIGSTKFLT");var iv=t=>!!t&&typeof t=="object"&&typeof t.removeListener=="function"&&typeof t.emit=="function"&&typeof t.reallyExit=="function"&&typeof t.listeners=="function"&&typeof t.kill=="function"&&typeof t.pid=="number"&&typeof t.on=="function",BC=Symbol.for("signal-exit emitter"),NC=globalThis,Phe=Object.defineProperty.bind(Object),MC=class{emitted={afterExit:!1,exit:!1};listeners={afterExit:[],exit:[]};count=0;id=Math.random();constructor(){if(NC[BC])return NC[BC];Phe(NC,BC,{value:this,writable:!1,enumerable:!1,configurable:!1})}on(e,r){this.listeners[e].push(r)}removeListener(e,r){let n=this.listeners[e],i=n.indexOf(r);i!==-1&&(i===0&&n.length===1?n.length=0:n.splice(i,1))}emit(e,r,n){if(this.emitted[e])return!1;this.emitted[e]=!0;let i=!1;for(let s of this.listeners[e])i=s(r,n)===!0||i;return e==="exit"&&(i=this.emit("afterExit",r,n)||i),i}},sv=class{},Bhe=t=>({onExit(e,r){return t.onExit(e,r)},load(){return t.load()},unload(){return t.unload()}}),LC=class extends sv{onExit(){return()=>{}}load(){}unload(){}},qC=class extends sv{#n=UC.platform==="win32"?"SIGINT":"SIGHUP";#r=new MC;#e;#s;#d;#t={};#o=!1;constructor(e){super(),this.#e=e,this.#t={};for(let r of $l)this.#t[r]=()=>{let n=this.#e.listeners(r),{count:i}=this.#r,s=e;if(typeof s.__signal_exit_emitter__=="object"&&typeof s.__signal_exit_emitter__.count=="number"&&(i+=s.__signal_exit_emitter__.count),n.length===i){this.unload();let o=this.#r.emit("exit",null,r),a=r==="SIGHUP"?this.#n:r;o||e.kill(e.pid,a)}};this.#d=e.reallyExit,this.#s=e.emit}onExit(e,r){if(!iv(this.#e))return()=>{};this.#o===!1&&this.load();let n=r?.alwaysLast?"afterExit":"exit";return this.#r.on(n,e),()=>{this.#r.removeListener(n,e),this.#r.listeners.exit.length===0&&this.#r.listeners.afterExit.length===0&&this.unload()}}load(){if(!this.#o){this.#o=!0,this.#r.count+=1;for(let e of $l)try{let r=this.#t[e];r&&this.#e.on(e,r)}catch{}this.#e.emit=(e,...r)=>this.#h(e,...r),this.#e.reallyExit=e=>this.#i(e)}}unload(){this.#o&&(this.#o=!1,$l.forEach(e=>{let r=this.#t[e];if(!r)throw new Error("Listener not defined for signal: "+e);try{this.#e.removeListener(e,r)}catch{}}),this.#e.emit=this.#s,this.#e.reallyExit=this.#d,this.#r.count-=1)}#i(e){return iv(this.#e)?(this.#e.exitCode=e||0,this.#r.emit("exit",this.#e.exitCode,null),this.#d.call(this.#e,this.#e.exitCode)):0}#h(e,...r){let n=this.#s;if(e==="exit"&&iv(this.#e)){typeof r[0]=="number"&&(this.#e.exitCode=r[0]);let i=n.call(this.#e,e,...r);return this.#r.emit("exit",this.#e.exitCode,null),i}else return n.call(this.#e,e,...r)}},UC=globalThis.process,{onExit:ov,load:RJe,unload:PJe}=Bhe(iv(UC)?new qC(UC):new LC);var DM=Hp.default.stderr.isTTY?Hp.default.stderr:Hp.default.stdout.isTTY?Hp.default.stdout:void 0,Nhe=DM?SM(()=>{ov(()=>{DM.write("\x1B[?25h")},{alwaysLast:!0})}):()=>{},AM=Nhe;var av=!1,Pd={};Pd.show=(t=jC.default.stderr)=>{t.isTTY&&(av=!1,t.write("\x1B[?25h"))};Pd.hide=(t=jC.default.stderr)=>{t.isTTY&&(AM(),av=!0,t.write("\x1B[?25l"))};Pd.toggle=(t,e)=>{t!==void 0&&(av=t),av?Pd.show(e):Pd.hide(e)};var $C=Pd;var Yp=je(WC(),1);var ks=je(require("node:process"),1);function HC(){return ks.default.platform!=="win32"?ks.default.env.TERM!=="linux":!!ks.default.env.CI||!!ks.default.env.WT_SESSION||!!ks.default.env.TERMINUS_SUBLIME||ks.default.env.ConEmuTask==="{cmd::Cmder}"||ks.default.env.TERM_PROGRAM==="Terminus-Sublime"||ks.default.env.TERM_PROGRAM==="vscode"||ks.default.env.TERM==="xterm-256color"||ks.default.env.TERM==="alacritty"||ks.default.env.TERMINAL_EMULATOR==="JetBrains-JediTerm"}var Lhe={info:rt.blue("\u2139"),success:rt.green("\u2714"),warning:rt.yellow("\u26A0"),error:rt.red("\u2716")},qhe={info:rt.blue("i"),success:rt.green("\u221A"),warning:rt.yellow("\u203C"),error:rt.red("\xD7")},Uhe=HC()?Lhe:qhe,Vp=Uhe;function VC({onlyFirst:t=!1}={}){let i="(?:\\u001B\\][\\s\\S]*?(?:\\u0007|\\u001B\\u005C|\\u009C))|[\\u001B\\u009B][[\\]()#;?]*(?:\\d{1,4}(?:[;:]\\d{0,4})*)?[\\dA-PR-TZcf-nq-uy=><~]";return new RegExp(i,t?void 0:"g")}var jhe=VC();function Gp(t){if(typeof t!="string")throw new TypeError(`Expected a \`string\`, got \`${typeof t}\``);return t.replace(jhe,"")}function TM(t){return t===161||t===164||t===167||t===168||t===170||t===173||t===174||t>=176&&t<=180||t>=182&&t<=186||t>=188&&t<=191||t===198||t===208||t===215||t===216||t>=222&&t<=225||t===230||t>=232&&t<=234||t===236||t===237||t===240||t===242||t===243||t>=247&&t<=250||t===252||t===254||t===257||t===273||t===275||t===283||t===294||t===295||t===299||t>=305&&t<=307||t===312||t>=319&&t<=322||t===324||t>=328&&t<=331||t===333||t===338||t===339||t===358||t===359||t===363||t===462||t===464||t===466||t===468||t===470||t===472||t===474||t===476||t===593||t===609||t===708||t===711||t>=713&&t<=715||t===717||t===720||t>=728&&t<=731||t===733||t===735||t>=768&&t<=879||t>=913&&t<=929||t>=931&&t<=937||t>=945&&t<=961||t>=963&&t<=969||t===1025||t>=1040&&t<=1103||t===1105||t===8208||t>=8211&&t<=8214||t===8216||t===8217||t===8220||t===8221||t>=8224&&t<=8226||t>=8228&&t<=8231||t===8240||t===8242||t===8243||t===8245||t===8251||t===8254||t===8308||t===8319||t>=8321&&t<=8324||t===8364||t===8451||t===8453||t===8457||t===8467||t===8470||t===8481||t===8482||t===8486||t===8491||t===8531||t===8532||t>=8539&&t<=8542||t>=8544&&t<=8555||t>=8560&&t<=8569||t===8585||t>=8592&&t<=8601||t===8632||t===8633||t===8658||t===8660||t===8679||t===8704||t===8706||t===8707||t===8711||t===8712||t===8715||t===8719||t===8721||t===8725||t===8730||t>=8733&&t<=8736||t===8739||t===8741||t>=8743&&t<=8748||t===8750||t>=8756&&t<=8759||t===8764||t===8765||t===8776||t===8780||t===8786||t===8800||t===8801||t>=8804&&t<=8807||t===8810||t===8811||t===8814||t===8815||t===8834||t===8835||t===8838||t===8839||t===8853||t===8857||t===8869||t===8895||t===8978||t>=9312&&t<=9449||t>=9451&&t<=9547||t>=9552&&t<=9587||t>=9600&&t<=9615||t>=9618&&t<=9621||t===9632||t===9633||t>=9635&&t<=9641||t===9650||t===9651||t===9654||t===9655||t===9660||t===9661||t===9664||t===9665||t>=9670&&t<=9672||t===9675||t>=9678&&t<=9681||t>=9698&&t<=9701||t===9711||t===9733||t===9734||t===9737||t===9742||t===9743||t===9756||t===9758||t===9792||t===9794||t===9824||t===9825||t>=9827&&t<=9829||t>=9831&&t<=9834||t===9836||t===9837||t===9839||t===9886||t===9887||t===9919||t>=9926&&t<=9933||t>=9935&&t<=9939||t>=9941&&t<=9953||t===9955||t===9960||t===9961||t>=9963&&t<=9969||t===9972||t>=9974&&t<=9977||t===9979||t===9980||t===9982||t===9983||t===10045||t>=10102&&t<=10111||t>=11094&&t<=11097||t>=12872&&t<=12879||t>=57344&&t<=63743||t>=65024&&t<=65039||t===65533||t>=127232&&t<=127242||t>=127248&&t<=127277||t>=127280&&t<=127337||t>=127344&&t<=127373||t===127375||t===127376||t>=127387&&t<=127404||t>=917760&&t<=917999||t>=983040&&t<=1048573||t>=1048576&&t<=1114109}function OM(t){return t===12288||t>=65281&&t<=65376||t>=65504&&t<=65510}function FM(t){return t>=4352&&t<=4447||t===8986||t===8987||t===9001||t===9002||t>=9193&&t<=9196||t===9200||t===9203||t===9725||t===9726||t===9748||t===9749||t>=9776&&t<=9783||t>=9800&&t<=9811||t===9855||t>=9866&&t<=9871||t===9875||t===9889||t===9898||t===9899||t===9917||t===9918||t===9924||t===9925||t===9934||t===9940||t===9962||t===9970||t===9971||t===9973||t===9978||t===9981||t===9989||t===9994||t===9995||t===10024||t===10060||t===10062||t>=10067&&t<=10069||t===10071||t>=10133&&t<=10135||t===10160||t===10175||t===11035||t===11036||t===11088||t===11093||t>=11904&&t<=11929||t>=11931&&t<=12019||t>=12032&&t<=12245||t>=12272&&t<=12287||t>=12289&&t<=12350||t>=12353&&t<=12438||t>=12441&&t<=12543||t>=12549&&t<=12591||t>=12593&&t<=12686||t>=12688&&t<=12773||t>=12783&&t<=12830||t>=12832&&t<=12871||t>=12880&&t<=42124||t>=42128&&t<=42182||t>=43360&&t<=43388||t>=44032&&t<=55203||t>=63744&&t<=64255||t>=65040&&t<=65049||t>=65072&&t<=65106||t>=65108&&t<=65126||t>=65128&&t<=65131||t>=94176&&t<=94180||t===94192||t===94193||t>=94208&&t<=100343||t>=100352&&t<=101589||t>=101631&&t<=101640||t>=110576&&t<=110579||t>=110581&&t<=110587||t===110589||t===110590||t>=110592&&t<=110882||t===110898||t>=110928&&t<=110930||t===110933||t>=110948&&t<=110951||t>=110960&&t<=111355||t>=119552&&t<=119638||t>=119648&&t<=119670||t===126980||t===127183||t===127374||t>=127377&&t<=127386||t>=127488&&t<=127490||t>=127504&&t<=127547||t>=127552&&t<=127560||t===127568||t===127569||t>=127584&&t<=127589||t>=127744&&t<=127776||t>=127789&&t<=127797||t>=127799&&t<=127868||t>=127870&&t<=127891||t>=127904&&t<=127946||t>=127951&&t<=127955||t>=127968&&t<=127984||t===127988||t>=127992&&t<=128062||t===128064||t>=128066&&t<=128252||t>=128255&&t<=128317||t>=128331&&t<=128334||t>=128336&&t<=128359||t===128378||t===128405||t===128406||t===128420||t>=128507&&t<=128591||t>=128640&&t<=128709||t===128716||t>=128720&&t<=128722||t>=128725&&t<=128727||t>=128732&&t<=128735||t===128747||t===128748||t>=128756&&t<=128764||t>=128992&&t<=129003||t===129008||t>=129292&&t<=129338||t>=129340&&t<=129349||t>=129351&&t<=129535||t>=129648&&t<=129660||t>=129664&&t<=129673||t>=129679&&t<=129734||t>=129742&&t<=129756||t>=129759&&t<=129769||t>=129776&&t<=129784||t>=131072&&t<=196605||t>=196608&&t<=262141}function $he(t){if(!Number.isSafeInteger(t))throw new TypeError(`Expected a code point, got \`${typeof t}\`.`)}function RM(t,{ambiguousAsWide:e=!1}={}){return $he(t),OM(t)||FM(t)||e&&TM(t)?2:1}var NM=je(BM(),1),Whe=new Intl.Segmenter,Hhe=new RegExp("^\\p{Default_Ignorable_Code_Point}$","u");function GC(t,e={}){if(typeof t!="string"||t.length===0)return 0;let{ambiguousIsNarrow:r=!0,countAnsiEscapeCodes:n=!1}=e;if(n||(t=Gp(t)),t.length===0)return 0;let i=0,s={ambiguousAsWide:!r};for(let{segment:o}of Whe.segment(t)){let a=o.codePointAt(0);if(!(a<=31||a>=127&&a<=159)&&!(a>=8203&&a<=8207||a===65279)&&!(a>=768&&a<=879||a>=6832&&a<=6911||a>=7616&&a<=7679||a>=8400&&a<=8447||a>=65056&&a<=65071)&&!(a>=55296&&a<=57343)&&!(a>=65024&&a<=65039)&&!Hhe.test(o)){if((0,NM.default)().test(o)){i+=2;continue}i+=RM(a,s)}}return i}function zC({stream:t=process.stdout}={}){return!!(t&&t.isTTY&&process.env.TERM!=="dumb"&&!("CI"in process.env))}var YC=je(require("node:process"),1);function QC(){let{env:t}=YC.default,{TERM:e,TERM_PROGRAM:r}=t;return YC.default.platform!=="win32"?e!=="linux":!!t.WT_SESSION||!!t.TERMINUS_SUBLIME||t.ConEmuTask==="{cmd::Cmder}"||r==="Terminus-Sublime"||r==="vscode"||e==="xterm-256color"||e==="alacritty"||e==="rxvt-unicode"||e==="rxvt-unicode-256color"||t.TERMINAL_EMULATOR==="JetBrains-JediTerm"}var lo=je(require("node:process"),1),Vhe=3,KC=class{#n=0;start(){this.#n++,this.#n===1&&this.#r()}stop(){if(this.#n<=0)throw new Error("`stop` called more times than `start`");this.#n--,this.#n===0&&this.#e()}#r(){lo.default.platform==="win32"||!lo.default.stdin.isTTY||(lo.default.stdin.setRawMode(!0),lo.default.stdin.on("data",this.#s),lo.default.stdin.resume())}#e(){lo.default.stdin.isTTY&&(lo.default.stdin.off("data",this.#s),lo.default.stdin.pause(),lo.default.stdin.setRawMode(!1))}#s(e){e[0]===Vhe&&lo.default.emit("SIGINT")}},Ghe=new KC,JC=Ghe;var zhe=je(WC(),1),XC=class{#n=0;#r=!1;#e=0;#s=-1;#d=0;#t;#o;#i;#h;#g;#c;#l;#f;#m;#a;#u;color;constructor(e){typeof e=="string"&&(e={text:e}),this.#t={color:"cyan",stream:zp.default.stderr,discardStdin:!0,hideCursor:!0,...e},this.color=this.#t.color,this.spinner=this.#t.spinner,this.#g=this.#t.interval,this.#i=this.#t.stream,this.#c=typeof this.#t.isEnabled=="boolean"?this.#t.isEnabled:zC({stream:this.#i}),this.#l=typeof this.#t.isSilent=="boolean"?this.#t.isSilent:!1,this.text=this.#t.text,this.prefixText=this.#t.prefixText,this.suffixText=this.#t.suffixText,this.indent=this.#t.indent,zp.default.env.NODE_ENV==="test"&&(this._stream=this.#i,this._isEnabled=this.#c,Object.defineProperty(this,"_linesToClear",{get(){return this.#n},set(r){this.#n=r}}),Object.defineProperty(this,"_frameIndex",{get(){return this.#s}}),Object.defineProperty(this,"_lineCount",{get(){return this.#e}}))}get indent(){return this.#f}set indent(e=0){if(!(e>=0&&Number.isInteger(e)))throw new Error("The `indent` option must be an integer from 0 and up");this.#f=e,this.#p()}get interval(){return this.#g??this.#o.interval??100}get spinner(){return this.#o}set spinner(e){if(this.#s=-1,this.#g=void 0,typeof e=="object"){if(e.frames===void 0)throw new Error("The given spinner must have a `frames` property");this.#o=e}else if(!QC())this.#o=Yp.default.line;else if(e===void 0)this.#o=Yp.default.dots;else if(e!=="default"&&Yp.default[e])this.#o=Yp.default[e];else throw new Error(`There is no built-in spinner named '${e}'. See https://github.com/sindresorhus/cli-spinners/blob/main/spinners.json for a full list.`)}get text(){return this.#m}set text(e=""){this.#m=e,this.#p()}get prefixText(){return this.#a}set prefixText(e=""){this.#a=e,this.#p()}get suffixText(){return this.#u}set suffixText(e=""){this.#u=e,this.#p()}get isSpinning(){return this.#h!==void 0}#_(e=this.#a,r=" "){return typeof e=="string"&&e!==""?e+r:typeof e=="function"?e()+r:""}#y(e=this.#u,r=" "){return typeof e=="string"&&e!==""?r+e:typeof e=="function"?r+e():""}#p(){let e=this.#i.columns??80,r=this.#_(this.#a,"-"),n=this.#y(this.#u,"-"),i=" ".repeat(this.#f)+r+"--"+this.#m+"--"+n;this.#e=0;for(let s of Gp(i).split(`
140
140
  `))this.#e+=Math.max(1,Math.ceil(GC(s,{countAnsiEscapeCodes:!0})/e))}get isEnabled(){return this.#c&&!this.#l}set isEnabled(e){if(typeof e!="boolean")throw new TypeError("The `isEnabled` option must be a boolean");this.#c=e}get isSilent(){return this.#l}set isSilent(e){if(typeof e!="boolean")throw new TypeError("The `isSilent` option must be a boolean");this.#l=e}frame(){let e=Date.now();(this.#s===-1||e-this.#d>=this.interval)&&(this.#s=++this.#s%this.#o.frames.length,this.#d=e);let{frames:r}=this.#o,n=r[this.#s];this.color&&(n=rt[this.color](n));let i=typeof this.#a=="string"&&this.#a!==""?this.#a+" ":"",s=typeof this.text=="string"?" "+this.text:"",o=typeof this.#u=="string"&&this.#u!==""?" "+this.#u:"";return i+n+s+o}clear(){if(!this.#c||!this.#i.isTTY)return this;this.#i.cursorTo(0);for(let e=0;e<this.#n;e++)e>0&&this.#i.moveCursor(0,-1),this.#i.clearLine(1);return(this.#f||this.lastIndent!==this.#f)&&this.#i.cursorTo(this.#f),this.lastIndent=this.#f,this.#n=0,this}render(){return this.#l?this:(this.clear(),this.#i.write(this.frame()),this.#n=this.#e,this)}start(e){return e&&(this.text=e),this.#l?this:this.#c?this.isSpinning?this:(this.#t.hideCursor&&$C.hide(this.#i),this.#t.discardStdin&&zp.default.stdin.isTTY&&(this.#r=!0,JC.start()),this.render(),this.#h=setInterval(this.render.bind(this),this.interval),this):(this.text&&this.#i.write(`- ${this.text}
141
141
  `),this)}stop(){return this.#c?(clearInterval(this.#h),this.#h=void 0,this.#s=0,this.clear(),this.#t.hideCursor&&$C.show(this.#i),this.#t.discardStdin&&zp.default.stdin.isTTY&&this.#r&&(JC.stop(),this.#r=!1),this):this}succeed(e){return this.stopAndPersist({symbol:Vp.success,text:e})}fail(e){return this.stopAndPersist({symbol:Vp.error,text:e})}warn(e){return this.stopAndPersist({symbol:Vp.warning,text:e})}info(e){return this.stopAndPersist({symbol:Vp.info,text:e})}stopAndPersist(e={}){if(this.#l)return this;let r=e.prefixText??this.#a,n=this.#_(r," "),i=e.symbol??" ",s=e.text??this.text,a=typeof s=="string"?(i?" ":"")+s:"",u=e.suffixText??this.#u,c=this.#y(u," "),l=n+i+a+c+`
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lody",
3
- "version": "0.1.2",
3
+ "version": "0.1.3",
4
4
  "description": "Lody Agent CLI tool for managing remote command execution",
5
5
  "main": "dist/index.js",
6
6
  "bin": {