just-bash 1.4.2 → 1.5.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.
@@ -0,0 +1,31 @@
1
+ import{a as z}from"./chunk-ZVV5VXYZ.js";import{a as w,b as $}from"./chunk-74CEPOFO.js";import"./chunk-2RUN43TJ.js";import{constants as x,gunzipSync as C,gzipSync as b}from"node:zlib";var I={name:"gzip",summary:"compress or expand files",usage:"gzip [OPTION]... [FILE]...",description:`Compress FILEs (by default, in-place).
2
+
3
+ When no FILE is given, or when FILE is -, read from standard input.
4
+
5
+ With -d, decompress instead.`,options:["-c, --stdout write to standard output, keep original files","-d, --decompress decompress","-f, --force force overwrite of output file","-k, --keep keep (don't delete) input files","-l, --list list compressed file contents","-n, --no-name do not save or restore the original name and timestamp","-N, --name save or restore the original file name and timestamp","-q, --quiet suppress all warnings","-r, --recursive operate recursively on directories","-S, --suffix=SUF use suffix SUF on compressed files (default: .gz)","-t, --test test compressed file integrity","-v, --verbose verbose mode","-1, --fast compress faster","-9, --best compress better"," --help display this help and exit"]},q={name:"gunzip",summary:"decompress files",usage:"gunzip [OPTION]... [FILE]...",description:`Decompress FILEs (by default, in-place).
6
+
7
+ When no FILE is given, or when FILE is -, read from standard input.`,options:["-c, --stdout write to standard output, keep original files","-f, --force force overwrite of output file","-k, --keep keep (don't delete) input files","-l, --list list compressed file contents","-n, --no-name do not restore the original name and timestamp","-N, --name restore the original file name and timestamp","-q, --quiet suppress all warnings","-r, --recursive operate recursively on directories","-S, --suffix=SUF use suffix SUF on compressed files (default: .gz)","-t, --test test compressed file integrity","-v, --verbose verbose mode"," --help display this help and exit"]},P={name:"zcat",summary:"decompress files to stdout",usage:"zcat [OPTION]... [FILE]...",description:`Decompress FILEs to standard output.
8
+
9
+ When no FILE is given, or when FILE is -, read from standard input.`,options:["-f, --force force; read compressed data even from a terminal","-l, --list list compressed file contents","-q, --quiet suppress all warnings","-S, --suffix=SUF use suffix SUF on compressed files (default: .gz)","-t, --test test compressed file integrity","-v, --verbose verbose mode"," --help display this help and exit"]},D={stdout:{short:"c",long:"stdout",type:"boolean"},toStdout:{long:"to-stdout",type:"boolean"},decompress:{short:"d",long:"decompress",type:"boolean"},uncompress:{long:"uncompress",type:"boolean"},force:{short:"f",long:"force",type:"boolean"},keep:{short:"k",long:"keep",type:"boolean"},list:{short:"l",long:"list",type:"boolean"},noName:{short:"n",long:"no-name",type:"boolean"},name:{short:"N",long:"name",type:"boolean"},quiet:{short:"q",long:"quiet",type:"boolean"},recursive:{short:"r",long:"recursive",type:"boolean"},suffix:{short:"S",long:"suffix",type:"string",default:".gz"},test:{short:"t",long:"test",type:"boolean"},verbose:{short:"v",long:"verbose",type:"boolean"},fast:{short:"1",long:"fast",type:"boolean"},level2:{short:"2",type:"boolean"},level3:{short:"3",type:"boolean"},level4:{short:"4",type:"boolean"},level5:{short:"5",type:"boolean"},level6:{short:"6",type:"boolean"},level7:{short:"7",type:"boolean"},level8:{short:"8",type:"boolean"},best:{short:"9",long:"best",type:"boolean"}};function F(e){return e.best?x.Z_BEST_COMPRESSION:e.level8?8:e.level7?7:e.level6?6:e.level5?5:e.level4?4:e.level3?3:e.level2?2:e.fast?x.Z_BEST_SPEED:x.Z_DEFAULT_COMPRESSION}function S(e){if(e.length<10)return{originalName:null,mtime:null,headerSize:0};if(e[0]!==31||e[1]!==139)return{originalName:null,mtime:null,headerSize:0};let t=e[3],o=e[4]|e[5]<<8|e[6]<<16|e[7]<<24,r=10;if(t&4){if(r+2>e.length)return{originalName:null,mtime:null,headerSize:0};let n=e[r]|e[r+1]<<8;r+=2+n}let s=null;if(t&8){let n=r;for(;r<e.length&&e[r]!==0;)r++;r<e.length&&(s=new TextDecoder().decode(e.slice(n,r)),r++)}if(t&16){for(;r<e.length&&e[r]!==0;)r++;r++}return t&2&&(r+=2),{originalName:s,mtime:o>0?new Date(o*1e3):null,headerSize:r}}function L(e){if(e.length<4)return 0;let t=e.length;return e[t-4]|e[t-3]<<8|e[t-2]<<16|e[t-1]<<24}function y(e){return e.length>=2&&e[0]===31&&e[1]===139}async function E(e,t,o,r,s,n){let u=o.suffix,c,p,d;if(t==="-"||t==="")if(d=new TextEncoder().encode(e.stdin),s){if(!y(d))return o.quiet?{stdout:"",stderr:"",exitCode:1}:{stdout:"",stderr:`${r}: stdin: not in gzip format
10
+ `,exitCode:1};try{let l=C(d);return{stdout:new TextDecoder().decode(l),stderr:"",exitCode:0}}catch(l){let i=l instanceof Error?l.message:"unknown error";return{stdout:"",stderr:`${r}: stdin: ${i}
11
+ `,exitCode:1}}}else{let l=F(o),i=b(d,{level:l});return{stdout:String.fromCharCode(...i),stderr:"",exitCode:0}}c=e.fs.resolvePath(e.cwd,t);try{if((await e.fs.stat(c)).isDirectory)return o.recursive?await k(e,c,o,r,s,n):o.quiet?{stdout:"",stderr:"",exitCode:1}:{stdout:"",stderr:`${r}: ${t}: is a directory -- ignored
12
+ `,exitCode:1}}catch{return{stdout:"",stderr:`${r}: ${t}: No such file or directory
13
+ `,exitCode:1}}try{d=await e.fs.readFileBuffer(c)}catch{return{stdout:"",stderr:`${r}: ${t}: No such file or directory
14
+ `,exitCode:1}}if(s){if(!t.endsWith(u))return o.quiet?{stdout:"",stderr:"",exitCode:1}:{stdout:"",stderr:`${r}: ${t}: unknown suffix -- ignored
15
+ `,exitCode:1};if(!y(d))return o.quiet?{stdout:"",stderr:"",exitCode:1}:{stdout:"",stderr:`${r}: ${t}: not in gzip format
16
+ `,exitCode:1};let l;try{l=C(d)}catch(i){let f=i instanceof Error?i.message:"unknown error";return{stdout:"",stderr:`${r}: ${t}: ${f}
17
+ `,exitCode:1}}if(n)return{stdout:new TextDecoder().decode(l),stderr:"",exitCode:0};if(o.name){let i=S(d);i.originalName?p=e.fs.resolvePath(e.cwd,i.originalName):p=c.slice(0,-u.length)}else p=c.slice(0,-u.length);if(!o.force)try{return await e.fs.stat(p),{stdout:"",stderr:`${r}: ${p} already exists; not overwritten
18
+ `,exitCode:1}}catch{}if(await e.fs.writeFile(p,l),!o.keep&&!n&&await e.fs.rm(c),o.verbose){let i=d.length>0?((1-d.length/l.length)*100).toFixed(1):"0.0";return{stdout:"",stderr:`${t}: ${i}% -- replaced with ${p.split("/").pop()}
19
+ `,exitCode:0}}return{stdout:"",stderr:"",exitCode:0}}else{if(t.endsWith(u))return o.quiet?{stdout:"",stderr:"",exitCode:1}:{stdout:"",stderr:`${r}: ${t} already has ${u} suffix -- unchanged
20
+ `,exitCode:1};let l=F(o),i;try{i=b(d,{level:l})}catch(f){let a=f instanceof Error?f.message:"unknown error";return{stdout:"",stderr:`${r}: ${t}: ${a}
21
+ `,exitCode:1}}if(n)return{stdout:String.fromCharCode(...i),stderr:"",exitCode:0};if(p=c+u,!o.force)try{return await e.fs.stat(p),{stdout:"",stderr:`${r}: ${p} already exists; not overwritten
22
+ `,exitCode:1}}catch{}if(await e.fs.writeFile(p,i),!o.keep&&!n&&await e.fs.rm(c),o.verbose){let f=d.length>0?((1-i.length/d.length)*100).toFixed(1):"0.0";return{stdout:"",stderr:`${t}: ${f}% -- replaced with ${p.split("/").pop()}
23
+ `,exitCode:0}}return{stdout:"",stderr:"",exitCode:0}}}async function k(e,t,o,r,s,n){let u=await e.fs.readdir(t),c="",p="",d=0;for(let l of u){let i=e.fs.resolvePath(t,l),f=await e.fs.stat(i);if(f.isDirectory){let a=await k(e,i,o,r,s,n);c+=a.stdout,p+=a.stderr,a.exitCode!==0&&(d=a.exitCode)}else if(f.isFile){let a=o.suffix;if(s&&!l.endsWith(a)||!s&&l.endsWith(a))continue;let m=i.startsWith(`${e.cwd}/`)?i.slice(e.cwd.length+1):i,g=await E(e,m,o,r,s,n);c+=g.stdout,p+=g.stderr,g.exitCode!==0&&(d=g.exitCode)}}return{stdout:c,stderr:p,exitCode:d}}async function T(e,t,o,r){let s;if(t==="-"||t==="")s=new TextEncoder().encode(e.stdin);else{let i=e.fs.resolvePath(e.cwd,t);try{s=await e.fs.readFileBuffer(i)}catch{return{stdout:"",stderr:`${r}: ${t}: No such file or directory
24
+ `,exitCode:1}}}if(!y(s))return o.quiet?{stdout:"",stderr:"",exitCode:1}:{stdout:"",stderr:`${r}: ${t}: not in gzip format
25
+ `,exitCode:1};let n=s.length,u=L(s),c=u>0?((1-n/u)*100).toFixed(1):"0.0",d=S(s).originalName||(t==="-"?"":t.replace(/\.gz$/,""));return{stdout:`${n.toString().padStart(10)} ${u.toString().padStart(10)} ${c.padStart(5)}% ${d}
26
+ `,stderr:"",exitCode:0}}async function O(e,t,o,r){let s;if(t==="-"||t==="")s=new TextEncoder().encode(e.stdin);else{let n=e.fs.resolvePath(e.cwd,t);try{s=await e.fs.readFileBuffer(n)}catch{return{stdout:"",stderr:`${r}: ${t}: No such file or directory
27
+ `,exitCode:1}}}if(!y(s))return o.quiet?{stdout:"",stderr:"",exitCode:1}:{stdout:"",stderr:`${r}: ${t}: not in gzip format
28
+ `,exitCode:1};try{return C(s),o.verbose?{stdout:"",stderr:`${t}: OK
29
+ `,exitCode:0}:{stdout:"",stderr:"",exitCode:0}}catch(n){let u=n instanceof Error?n.message:"invalid";return{stdout:"",stderr:`${r}: ${t}: ${u}
30
+ `,exitCode:1}}}async function v(e,t,o){let r=o==="zcat"?P:o==="gunzip"?q:I;if($(e))return w(r);let s=z(o,e,D);if(!s.ok)return s.error.stderr.includes("unrecognized option"),s.error;let n=s.result.flags,u=s.result.positional,c=o==="gunzip"||o==="zcat"||n.decompress||n.uncompress,p=o==="zcat"||n.stdout||n.toStdout;if(n.list){u.length===0&&(u=["-"]);let f=` compressed uncompressed ratio uncompressed_name
31
+ `,a="",m=0;for(let g of u){let h=await T(t,g,n,o);f+=h.stdout,a+=h.stderr,h.exitCode!==0&&(m=h.exitCode)}return{stdout:f,stderr:a,exitCode:m}}if(n.test){u.length===0&&(u=["-"]);let f="",a="",m=0;for(let g of u){let h=await O(t,g,n,o);f+=h.stdout,a+=h.stderr,h.exitCode!==0&&(m=h.exitCode)}return{stdout:f,stderr:a,exitCode:m}}u.length===0&&(u=["-"]);let d="",l="",i=0;for(let f of u){let a=await E(t,f,n,o,c,p);d+=a.stdout,l+=a.stderr,a.exitCode!==0&&(i=a.exitCode)}return{stdout:d,stderr:l,exitCode:i}}var H={name:"gzip",async execute(e,t){return v(e,t,"gzip")}},B={name:"gunzip",async execute(e,t){return v(e,t,"gunzip")}},G={name:"zcat",async execute(e,t){return v(e,t,"zcat")}};export{B as gunzipCommand,H as gzipCommand,G as zcatCommand};
@@ -1,4 +1,4 @@
1
- import{a as U,b as Y,c as G,d as te,e as J,f as k,g as W,h as ye,i as z,j as le,k as He}from"./chunks/chunk-CG2HXOFG.js";import{a as ce}from"./chunks/chunk-44UOCSGV.js";import"./chunks/chunk-2RUN43TJ.js";var St=[{name:"echo",load:async()=>(await import("./chunks/echo-WUKBESC7.js")).echoCommand},{name:"cat",load:async()=>(await import("./chunks/cat-47EP4IAV.js")).catCommand},{name:"printf",load:async()=>(await import("./chunks/printf-HBP44PXI.js")).printfCommand},{name:"ls",load:async()=>(await import("./chunks/ls-JGYJQA2Y.js")).lsCommand},{name:"mkdir",load:async()=>(await import("./chunks/mkdir-HA2FJX4O.js")).mkdirCommand},{name:"touch",load:async()=>(await import("./chunks/touch-FOE745V2.js")).touchCommand},{name:"rm",load:async()=>(await import("./chunks/rm-NF3FNLAY.js")).rmCommand},{name:"cp",load:async()=>(await import("./chunks/cp-37OVLNLD.js")).cpCommand},{name:"mv",load:async()=>(await import("./chunks/mv-7I62SB3I.js")).mvCommand},{name:"ln",load:async()=>(await import("./chunks/ln-XFYHBIFL.js")).lnCommand},{name:"chmod",load:async()=>(await import("./chunks/chmod-XJXFAD4M.js")).chmodCommand},{name:"pwd",load:async()=>(await import("./chunks/pwd-CEF235GL.js")).pwdCommand},{name:"readlink",load:async()=>(await import("./chunks/readlink-MQIMKDSA.js")).readlinkCommand},{name:"head",load:async()=>(await import("./chunks/head-6PAUYCDP.js")).headCommand},{name:"tail",load:async()=>(await import("./chunks/tail-QXKYHAML.js")).tailCommand},{name:"wc",load:async()=>(await import("./chunks/wc-GV5WUREX.js")).wcCommand},{name:"stat",load:async()=>(await import("./chunks/stat-FVFLDQGP.js")).statCommand},{name:"grep",load:async()=>(await import("./chunks/grep-ZJVDG3FA.js")).grepCommand},{name:"fgrep",load:async()=>(await import("./chunks/grep-ZJVDG3FA.js")).fgrepCommand},{name:"egrep",load:async()=>(await import("./chunks/grep-ZJVDG3FA.js")).egrepCommand},{name:"sed",load:async()=>(await import("./chunks/sed-H2RWPMTM.js")).sedCommand},{name:"awk",load:async()=>(await import("./chunks/awk2-QWBT4IFJ.js")).awkCommand2},{name:"sort",load:async()=>(await import("./chunks/sort-XODGFZC4.js")).sortCommand},{name:"uniq",load:async()=>(await import("./chunks/uniq-7PFWPNWK.js")).uniqCommand},{name:"comm",load:async()=>(await import("./chunks/comm-KSJ4BBRQ.js")).commCommand},{name:"cut",load:async()=>(await import("./chunks/cut-FIZRELKC.js")).cutCommand},{name:"paste",load:async()=>(await import("./chunks/paste-QBGVCQFT.js")).pasteCommand},{name:"tr",load:async()=>(await import("./chunks/tr-LMLGE4IE.js")).trCommand},{name:"tee",load:async()=>(await import("./chunks/tee-W5HCCBPO.js")).teeCommand},{name:"find",load:async()=>(await import("./chunks/find-GM7FJ4D3.js")).findCommand},{name:"basename",load:async()=>(await import("./chunks/basename-5UVU5RXR.js")).basenameCommand},{name:"dirname",load:async()=>(await import("./chunks/dirname-U2KVUSQY.js")).dirnameCommand},{name:"tree",load:async()=>(await import("./chunks/tree-WBUGLVP5.js")).treeCommand},{name:"du",load:async()=>(await import("./chunks/du-KRAFOIQK.js")).duCommand},{name:"env",load:async()=>(await import("./chunks/env-MSPSPGCD.js")).envCommand},{name:"printenv",load:async()=>(await import("./chunks/env-MSPSPGCD.js")).printenvCommand},{name:"alias",load:async()=>(await import("./chunks/alias-JFIUWFGE.js")).aliasCommand},{name:"unalias",load:async()=>(await import("./chunks/alias-JFIUWFGE.js")).unaliasCommand},{name:"history",load:async()=>(await import("./chunks/history-SG6VRATI.js")).historyCommand},{name:"xargs",load:async()=>(await import("./chunks/xargs-NQBNFMCT.js")).xargsCommand},{name:"true",load:async()=>(await import("./chunks/true-6LGCG4EY.js")).trueCommand},{name:"false",load:async()=>(await import("./chunks/true-6LGCG4EY.js")).falseCommand},{name:"clear",load:async()=>(await import("./chunks/clear-XD3TJRVQ.js")).clearCommand},{name:"bash",load:async()=>(await import("./chunks/bash-BASUPKHJ.js")).bashCommand},{name:"sh",load:async()=>(await import("./chunks/bash-BASUPKHJ.js")).shCommand},{name:"jq",load:async()=>(await import("./chunks/jq-PO3DWIV2.js")).jqCommand},{name:"base64",load:async()=>(await import("./chunks/base64-TUA2XORD.js")).base64Command},{name:"diff",load:async()=>(await import("./chunks/diff-GLRVCAKJ.js")).diffCommand},{name:"date",load:async()=>(await import("./chunks/date-NN5C354M.js")).dateCommand},{name:"sleep",load:async()=>(await import("./chunks/sleep-AFN3PHJW.js")).sleepCommand},{name:"timeout",load:async()=>(await import("./chunks/timeout-XAA3N7CF.js")).timeoutCommand},{name:"seq",load:async()=>(await import("./chunks/seq-VKYIUOPJ.js")).seqCommand},{name:"expr",load:async()=>(await import("./chunks/expr-HYOCSWK6.js")).exprCommand},{name:"md5sum",load:async()=>(await import("./chunks/md5sum-PIH6F3O3.js")).md5sumCommand},{name:"sha1sum",load:async()=>(await import("./chunks/sha1sum-HVHNZSEC.js")).sha1sumCommand},{name:"sha256sum",load:async()=>(await import("./chunks/sha256sum-REOOJORK.js")).sha256sumCommand},{name:"file",load:async()=>(await import("./chunks/file-LQXX6P4Y.js")).fileCommand},{name:"html-to-markdown",load:async()=>(await import("./chunks/html-to-markdown-ZSZ34PAN.js")).htmlToMarkdownCommand},{name:"help",load:async()=>(await import("./chunks/help-5E6PYJWQ.js")).helpCommand},{name:"which",load:async()=>(await import("./chunks/which-KHFYPBWW.js")).whichCommand},{name:"tac",load:async()=>(await import("./chunks/tac-VIFKNLII.js")).tac},{name:"hostname",load:async()=>(await import("./chunks/hostname-K4BA3P6X.js")).hostname},{name:"od",load:async()=>(await import("./chunks/od-SOCTFI2F.js")).od}],wr=[{name:"curl",load:async()=>(await import("./chunks/curl-C43O5WQS.js")).curlCommand}],Er=new Map;function gr(t){return{name:t.name,async execute(e,n){let r=Er.get(t.name);return r||(r=await t.load(),Er.set(t.name,r)),r.execute(e,n)}}}function Gn(){return St.map(t=>t.name)}function Vn(){return wr.map(t=>t.name)}function Ar(t){return(t?St.filter(n=>t.includes(n.name)):St).map(gr)}function xr(){return wr.map(gr)}function Sr(t){return"load"in t&&typeof t.load=="function"}function Hn(t,e){return{name:t,execute:e}}function br(t){let e=null;return{name:t.name,async execute(n,r){return e||(e=await t.load()),e.execute(n,r)}}}var jn=new TextEncoder,Zn=new TextDecoder;function re(t,e){if(t instanceof Uint8Array)return t;switch(e){case"base64":return Uint8Array.from(atob(t),n=>n.charCodeAt(0));case"hex":{let n=new Uint8Array(t.length/2);for(let r=0;r<t.length;r+=2)n[r/2]=parseInt(t.slice(r,r+2),16);return n}case"binary":case"latin1":return Uint8Array.from(t,n=>n.charCodeAt(0));default:return jn.encode(t)}}function be(t,e){switch(e){case"base64":return btoa(String.fromCharCode(...t));case"hex":return Array.from(t).map(n=>n.toString(16).padStart(2,"0")).join("");case"binary":case"latin1":return String.fromCharCode(...t);default:return Zn.decode(t)}}function Z(t){if(t!=null)return typeof t=="string"?t:t.encoding??void 0}var je=new TextEncoder;function qn(t){return typeof t=="object"&&t!==null&&!(t instanceof Uint8Array)&&"content"in t}var Ee=class{data=new Map;constructor(e){if(this.data.set("/",{type:"directory",mode:493,mtime:new Date}),e)for(let[n,r]of Object.entries(e))qn(r)?this.writeFileSync(n,r.content,void 0,{mode:r.mode,mtime:r.mtime}):this.writeFileSync(n,r)}normalizePath(e){if(!e||e==="/")return"/";let n=e.endsWith("/")&&e!=="/"?e.slice(0,-1):e;n.startsWith("/")||(n=`/${n}`);let r=n.split("/").filter(o=>o&&o!=="."),s=[];for(let o of r)o===".."?s.pop():s.push(o);return`/${s.join("/")}`||"/"}dirname(e){let n=this.normalizePath(e);if(n==="/")return"/";let r=n.lastIndexOf("/");return r===0?"/":n.slice(0,r)}ensureParentDirs(e){let n=this.dirname(e);n!=="/"&&(this.data.has(n)||(this.ensureParentDirs(n),this.data.set(n,{type:"directory",mode:493,mtime:new Date})))}writeFileSync(e,n,r,s){let o=this.normalizePath(e);this.ensureParentDirs(o);let i=Z(r),a=re(n,i);this.data.set(o,{type:"file",content:a,mode:s?.mode??420,mtime:s?.mtime??new Date})}async readFile(e,n){let r=await this.readFileBuffer(e),s=Z(n);return be(r,s)}async readFileBuffer(e){let n=this.normalizePath(e),r=this.data.get(n),s=n;if(!r)throw new Error(`ENOENT: no such file or directory, open '${e}'`);let o=new Set;for(;r&&r.type==="symlink";){if(o.has(s))throw new Error(`ELOOP: too many levels of symbolic links, open '${e}'`);o.add(s),s=this.resolveSymlink(s,r.target),r=this.data.get(s)}if(!r)throw new Error(`ENOENT: no such file or directory, open '${e}'`);if(r.type!=="file")throw new Error(`EISDIR: illegal operation on a directory, read '${e}'`);return r.content instanceof Uint8Array?r.content:je.encode(r.content)}async writeFile(e,n,r){this.writeFileSync(e,n,r)}async appendFile(e,n,r){let s=this.normalizePath(e),o=this.data.get(s);if(o&&o.type==="directory")throw new Error(`EISDIR: illegal operation on a directory, write '${e}'`);let i=Z(r),a=re(n,i);if(o?.type==="file"){let l=o.content instanceof Uint8Array?o.content:je.encode(o.content),c=new Uint8Array(l.length+a.length);c.set(l),c.set(a,l.length),this.data.set(s,{type:"file",content:c,mode:o.mode,mtime:new Date})}else this.writeFileSync(e,n,r)}async exists(e){return this.data.has(this.normalizePath(e))}async stat(e){let n=this.normalizePath(e),r=this.data.get(n);if(!r)throw new Error(`ENOENT: no such file or directory, stat '${e}'`);if(r.type==="symlink"){let o=this.resolveSymlink(n,r.target),i=this.data.get(o);if(!i)throw new Error(`ENOENT: no such file or directory, stat '${e}'`);r=i}let s=0;return r.type==="file"&&r.content&&(r.content instanceof Uint8Array?s=r.content.length:s=je.encode(r.content).length),{isFile:r.type==="file",isDirectory:r.type==="directory",isSymbolicLink:!1,mode:r.mode,size:s,mtime:r.mtime||new Date}}async lstat(e){let n=this.normalizePath(e),r=this.data.get(n);if(!r)throw new Error(`ENOENT: no such file or directory, lstat '${e}'`);if(r.type==="symlink")return{isFile:!1,isDirectory:!1,isSymbolicLink:!0,mode:r.mode,size:r.target.length,mtime:r.mtime||new Date};let s=0;return r.type==="file"&&r.content&&(r.content instanceof Uint8Array?s=r.content.length:s=je.encode(r.content).length),{isFile:r.type==="file",isDirectory:r.type==="directory",isSymbolicLink:!1,mode:r.mode,size:s,mtime:r.mtime||new Date}}resolveSymlink(e,n){if(n.startsWith("/"))return this.normalizePath(n);let r=this.dirname(e);return this.normalizePath(r==="/"?`/${n}`:`${r}/${n}`)}async mkdir(e,n){this.mkdirSync(e,n)}mkdirSync(e,n){let r=this.normalizePath(e);if(this.data.has(r)){if(this.data.get(r)?.type==="file")throw new Error(`EEXIST: file already exists, mkdir '${e}'`);if(!n?.recursive)throw new Error(`EEXIST: directory already exists, mkdir '${e}'`);return}let s=this.dirname(r);if(s!=="/"&&!this.data.has(s))if(n?.recursive)this.mkdirSync(s,{recursive:!0});else throw new Error(`ENOENT: no such file or directory, mkdir '${e}'`);this.data.set(r,{type:"directory",mode:493,mtime:new Date})}async readdir(e){let n=this.normalizePath(e),r=this.data.get(n);if(!r)throw new Error(`ENOENT: no such file or directory, scandir '${e}'`);if(r.type!=="directory")throw new Error(`ENOTDIR: not a directory, scandir '${e}'`);let s=n==="/"?"/":`${n}/`,o=[];for(let i of this.data.keys())if(i!==n&&i.startsWith(s)){let l=i.slice(s.length).split("/")[0];l&&!o.includes(l)&&o.push(l)}return o.sort()}async rm(e,n){let r=this.normalizePath(e),s=this.data.get(r);if(!s){if(n?.force)return;throw new Error(`ENOENT: no such file or directory, rm '${e}'`)}if(s.type==="directory"){let o=await this.readdir(r);if(o.length>0){if(!n?.recursive)throw new Error(`ENOTEMPTY: directory not empty, rm '${e}'`);for(let i of o){let a=r==="/"?`/${i}`:`${r}/${i}`;await this.rm(a,n)}}}this.data.delete(r)}async cp(e,n,r){let s=this.normalizePath(e),o=this.normalizePath(n),i=this.data.get(s);if(!i)throw new Error(`ENOENT: no such file or directory, cp '${e}'`);if(i.type==="file")this.ensureParentDirs(o),this.data.set(o,{...i});else if(i.type==="directory"){if(!r?.recursive)throw new Error(`EISDIR: is a directory, cp '${e}'`);await this.mkdir(o,{recursive:!0});let a=await this.readdir(s);for(let l of a){let c=s==="/"?`/${l}`:`${s}/${l}`,f=o==="/"?`/${l}`:`${o}/${l}`;await this.cp(c,f,r)}}}async mv(e,n){await this.cp(e,n,{recursive:!0}),await this.rm(e,{recursive:!0})}getAllPaths(){return Array.from(this.data.keys())}resolvePath(e,n){if(n.startsWith("/"))return this.normalizePath(n);let r=e==="/"?`/${n}`:`${e}/${n}`;return this.normalizePath(r)}async chmod(e,n){let r=this.normalizePath(e),s=this.data.get(r);if(!s)throw new Error(`ENOENT: no such file or directory, chmod '${e}'`);s.mode=n}async symlink(e,n){let r=this.normalizePath(n);if(this.data.has(r))throw new Error(`EEXIST: file already exists, symlink '${n}'`);this.ensureParentDirs(r),this.data.set(r,{type:"symlink",target:e,mode:511,mtime:new Date})}async link(e,n){let r=this.normalizePath(e),s=this.normalizePath(n),o=this.data.get(r);if(!o)throw new Error(`ENOENT: no such file or directory, link '${e}'`);if(o.type!=="file")throw new Error(`EPERM: operation not permitted, link '${e}'`);if(this.data.has(s))throw new Error(`EEXIST: file already exists, link '${n}'`);this.ensureParentDirs(s),this.data.set(s,{type:"file",content:o.content,mode:o.mode,mtime:o.mtime})}async readlink(e){let n=this.normalizePath(e),r=this.data.get(n);if(!r)throw new Error(`ENOENT: no such file or directory, readlink '${e}'`);if(r.type!=="symlink")throw new Error(`EINVAL: invalid argument, readlink '${e}'`);return r.target}};var Nr="5.1.0(1)-release",Cr="Linux version 5.15.0-generic (just-bash) #1 SMP PREEMPT";function Te(){return{pid:process.pid,ppid:process.ppid,uid:process.getuid?.()??1e3,gid:process.getgid?.()??1e3}}function $r(){let{pid:t,ppid:e,uid:n,gid:r}=Te();return`Name: bash
1
+ import{a as U,b as Y,c as G,d as te,e as J,f as k,g as W,h as ye,i as z,j as le,k as He}from"./chunks/chunk-CG2HXOFG.js";import{a as ce}from"./chunks/chunk-44UOCSGV.js";import"./chunks/chunk-2RUN43TJ.js";var St=[{name:"echo",load:async()=>(await import("./chunks/echo-WUKBESC7.js")).echoCommand},{name:"cat",load:async()=>(await import("./chunks/cat-47EP4IAV.js")).catCommand},{name:"printf",load:async()=>(await import("./chunks/printf-HBP44PXI.js")).printfCommand},{name:"ls",load:async()=>(await import("./chunks/ls-JGYJQA2Y.js")).lsCommand},{name:"mkdir",load:async()=>(await import("./chunks/mkdir-HA2FJX4O.js")).mkdirCommand},{name:"touch",load:async()=>(await import("./chunks/touch-FOE745V2.js")).touchCommand},{name:"rm",load:async()=>(await import("./chunks/rm-NF3FNLAY.js")).rmCommand},{name:"cp",load:async()=>(await import("./chunks/cp-37OVLNLD.js")).cpCommand},{name:"mv",load:async()=>(await import("./chunks/mv-7I62SB3I.js")).mvCommand},{name:"ln",load:async()=>(await import("./chunks/ln-XFYHBIFL.js")).lnCommand},{name:"chmod",load:async()=>(await import("./chunks/chmod-XJXFAD4M.js")).chmodCommand},{name:"pwd",load:async()=>(await import("./chunks/pwd-CEF235GL.js")).pwdCommand},{name:"readlink",load:async()=>(await import("./chunks/readlink-MQIMKDSA.js")).readlinkCommand},{name:"head",load:async()=>(await import("./chunks/head-6PAUYCDP.js")).headCommand},{name:"tail",load:async()=>(await import("./chunks/tail-QXKYHAML.js")).tailCommand},{name:"wc",load:async()=>(await import("./chunks/wc-GV5WUREX.js")).wcCommand},{name:"stat",load:async()=>(await import("./chunks/stat-FVFLDQGP.js")).statCommand},{name:"grep",load:async()=>(await import("./chunks/grep-ZJVDG3FA.js")).grepCommand},{name:"fgrep",load:async()=>(await import("./chunks/grep-ZJVDG3FA.js")).fgrepCommand},{name:"egrep",load:async()=>(await import("./chunks/grep-ZJVDG3FA.js")).egrepCommand},{name:"sed",load:async()=>(await import("./chunks/sed-H2RWPMTM.js")).sedCommand},{name:"awk",load:async()=>(await import("./chunks/awk2-QWBT4IFJ.js")).awkCommand2},{name:"sort",load:async()=>(await import("./chunks/sort-XODGFZC4.js")).sortCommand},{name:"uniq",load:async()=>(await import("./chunks/uniq-7PFWPNWK.js")).uniqCommand},{name:"comm",load:async()=>(await import("./chunks/comm-KSJ4BBRQ.js")).commCommand},{name:"cut",load:async()=>(await import("./chunks/cut-FIZRELKC.js")).cutCommand},{name:"paste",load:async()=>(await import("./chunks/paste-QBGVCQFT.js")).pasteCommand},{name:"tr",load:async()=>(await import("./chunks/tr-LMLGE4IE.js")).trCommand},{name:"tee",load:async()=>(await import("./chunks/tee-W5HCCBPO.js")).teeCommand},{name:"find",load:async()=>(await import("./chunks/find-GM7FJ4D3.js")).findCommand},{name:"basename",load:async()=>(await import("./chunks/basename-5UVU5RXR.js")).basenameCommand},{name:"dirname",load:async()=>(await import("./chunks/dirname-U2KVUSQY.js")).dirnameCommand},{name:"tree",load:async()=>(await import("./chunks/tree-WBUGLVP5.js")).treeCommand},{name:"du",load:async()=>(await import("./chunks/du-KRAFOIQK.js")).duCommand},{name:"env",load:async()=>(await import("./chunks/env-MSPSPGCD.js")).envCommand},{name:"printenv",load:async()=>(await import("./chunks/env-MSPSPGCD.js")).printenvCommand},{name:"alias",load:async()=>(await import("./chunks/alias-JFIUWFGE.js")).aliasCommand},{name:"unalias",load:async()=>(await import("./chunks/alias-JFIUWFGE.js")).unaliasCommand},{name:"history",load:async()=>(await import("./chunks/history-SG6VRATI.js")).historyCommand},{name:"xargs",load:async()=>(await import("./chunks/xargs-NQBNFMCT.js")).xargsCommand},{name:"true",load:async()=>(await import("./chunks/true-6LGCG4EY.js")).trueCommand},{name:"false",load:async()=>(await import("./chunks/true-6LGCG4EY.js")).falseCommand},{name:"clear",load:async()=>(await import("./chunks/clear-XD3TJRVQ.js")).clearCommand},{name:"bash",load:async()=>(await import("./chunks/bash-BASUPKHJ.js")).bashCommand},{name:"sh",load:async()=>(await import("./chunks/bash-BASUPKHJ.js")).shCommand},{name:"jq",load:async()=>(await import("./chunks/jq-PO3DWIV2.js")).jqCommand},{name:"base64",load:async()=>(await import("./chunks/base64-TUA2XORD.js")).base64Command},{name:"diff",load:async()=>(await import("./chunks/diff-GLRVCAKJ.js")).diffCommand},{name:"date",load:async()=>(await import("./chunks/date-NN5C354M.js")).dateCommand},{name:"sleep",load:async()=>(await import("./chunks/sleep-AFN3PHJW.js")).sleepCommand},{name:"timeout",load:async()=>(await import("./chunks/timeout-XAA3N7CF.js")).timeoutCommand},{name:"seq",load:async()=>(await import("./chunks/seq-VKYIUOPJ.js")).seqCommand},{name:"expr",load:async()=>(await import("./chunks/expr-HYOCSWK6.js")).exprCommand},{name:"md5sum",load:async()=>(await import("./chunks/md5sum-PIH6F3O3.js")).md5sumCommand},{name:"sha1sum",load:async()=>(await import("./chunks/sha1sum-HVHNZSEC.js")).sha1sumCommand},{name:"sha256sum",load:async()=>(await import("./chunks/sha256sum-REOOJORK.js")).sha256sumCommand},{name:"file",load:async()=>(await import("./chunks/file-LQXX6P4Y.js")).fileCommand},{name:"html-to-markdown",load:async()=>(await import("./chunks/html-to-markdown-ZSZ34PAN.js")).htmlToMarkdownCommand},{name:"help",load:async()=>(await import("./chunks/help-5E6PYJWQ.js")).helpCommand},{name:"which",load:async()=>(await import("./chunks/which-KHFYPBWW.js")).whichCommand},{name:"tac",load:async()=>(await import("./chunks/tac-VIFKNLII.js")).tac},{name:"hostname",load:async()=>(await import("./chunks/hostname-K4BA3P6X.js")).hostname},{name:"od",load:async()=>(await import("./chunks/od-SOCTFI2F.js")).od},{name:"gzip",load:async()=>(await import("./chunks/gzip-UQS7KRTV.js")).gzipCommand},{name:"gunzip",load:async()=>(await import("./chunks/gzip-UQS7KRTV.js")).gunzipCommand},{name:"zcat",load:async()=>(await import("./chunks/gzip-UQS7KRTV.js")).zcatCommand}],wr=[{name:"curl",load:async()=>(await import("./chunks/curl-C43O5WQS.js")).curlCommand}],Er=new Map;function gr(t){return{name:t.name,async execute(e,n){let r=Er.get(t.name);return r||(r=await t.load(),Er.set(t.name,r)),r.execute(e,n)}}}function Gn(){return St.map(t=>t.name)}function Vn(){return wr.map(t=>t.name)}function Ar(t){return(t?St.filter(n=>t.includes(n.name)):St).map(gr)}function xr(){return wr.map(gr)}function Sr(t){return"load"in t&&typeof t.load=="function"}function Hn(t,e){return{name:t,execute:e}}function br(t){let e=null;return{name:t.name,async execute(n,r){return e||(e=await t.load()),e.execute(n,r)}}}var jn=new TextEncoder,Zn=new TextDecoder;function re(t,e){if(t instanceof Uint8Array)return t;switch(e){case"base64":return Uint8Array.from(atob(t),n=>n.charCodeAt(0));case"hex":{let n=new Uint8Array(t.length/2);for(let r=0;r<t.length;r+=2)n[r/2]=parseInt(t.slice(r,r+2),16);return n}case"binary":case"latin1":return Uint8Array.from(t,n=>n.charCodeAt(0));default:return jn.encode(t)}}function be(t,e){switch(e){case"base64":return btoa(String.fromCharCode(...t));case"hex":return Array.from(t).map(n=>n.toString(16).padStart(2,"0")).join("");case"binary":case"latin1":return String.fromCharCode(...t);default:return Zn.decode(t)}}function Z(t){if(t!=null)return typeof t=="string"?t:t.encoding??void 0}var je=new TextEncoder;function qn(t){return typeof t=="object"&&t!==null&&!(t instanceof Uint8Array)&&"content"in t}var Ee=class{data=new Map;constructor(e){if(this.data.set("/",{type:"directory",mode:493,mtime:new Date}),e)for(let[n,r]of Object.entries(e))qn(r)?this.writeFileSync(n,r.content,void 0,{mode:r.mode,mtime:r.mtime}):this.writeFileSync(n,r)}normalizePath(e){if(!e||e==="/")return"/";let n=e.endsWith("/")&&e!=="/"?e.slice(0,-1):e;n.startsWith("/")||(n=`/${n}`);let r=n.split("/").filter(o=>o&&o!=="."),s=[];for(let o of r)o===".."?s.pop():s.push(o);return`/${s.join("/")}`||"/"}dirname(e){let n=this.normalizePath(e);if(n==="/")return"/";let r=n.lastIndexOf("/");return r===0?"/":n.slice(0,r)}ensureParentDirs(e){let n=this.dirname(e);n!=="/"&&(this.data.has(n)||(this.ensureParentDirs(n),this.data.set(n,{type:"directory",mode:493,mtime:new Date})))}writeFileSync(e,n,r,s){let o=this.normalizePath(e);this.ensureParentDirs(o);let i=Z(r),a=re(n,i);this.data.set(o,{type:"file",content:a,mode:s?.mode??420,mtime:s?.mtime??new Date})}async readFile(e,n){let r=await this.readFileBuffer(e),s=Z(n);return be(r,s)}async readFileBuffer(e){let n=this.normalizePath(e),r=this.data.get(n),s=n;if(!r)throw new Error(`ENOENT: no such file or directory, open '${e}'`);let o=new Set;for(;r&&r.type==="symlink";){if(o.has(s))throw new Error(`ELOOP: too many levels of symbolic links, open '${e}'`);o.add(s),s=this.resolveSymlink(s,r.target),r=this.data.get(s)}if(!r)throw new Error(`ENOENT: no such file or directory, open '${e}'`);if(r.type!=="file")throw new Error(`EISDIR: illegal operation on a directory, read '${e}'`);return r.content instanceof Uint8Array?r.content:je.encode(r.content)}async writeFile(e,n,r){this.writeFileSync(e,n,r)}async appendFile(e,n,r){let s=this.normalizePath(e),o=this.data.get(s);if(o&&o.type==="directory")throw new Error(`EISDIR: illegal operation on a directory, write '${e}'`);let i=Z(r),a=re(n,i);if(o?.type==="file"){let l=o.content instanceof Uint8Array?o.content:je.encode(o.content),c=new Uint8Array(l.length+a.length);c.set(l),c.set(a,l.length),this.data.set(s,{type:"file",content:c,mode:o.mode,mtime:new Date})}else this.writeFileSync(e,n,r)}async exists(e){return this.data.has(this.normalizePath(e))}async stat(e){let n=this.normalizePath(e),r=this.data.get(n);if(!r)throw new Error(`ENOENT: no such file or directory, stat '${e}'`);if(r.type==="symlink"){let o=this.resolveSymlink(n,r.target),i=this.data.get(o);if(!i)throw new Error(`ENOENT: no such file or directory, stat '${e}'`);r=i}let s=0;return r.type==="file"&&r.content&&(r.content instanceof Uint8Array?s=r.content.length:s=je.encode(r.content).length),{isFile:r.type==="file",isDirectory:r.type==="directory",isSymbolicLink:!1,mode:r.mode,size:s,mtime:r.mtime||new Date}}async lstat(e){let n=this.normalizePath(e),r=this.data.get(n);if(!r)throw new Error(`ENOENT: no such file or directory, lstat '${e}'`);if(r.type==="symlink")return{isFile:!1,isDirectory:!1,isSymbolicLink:!0,mode:r.mode,size:r.target.length,mtime:r.mtime||new Date};let s=0;return r.type==="file"&&r.content&&(r.content instanceof Uint8Array?s=r.content.length:s=je.encode(r.content).length),{isFile:r.type==="file",isDirectory:r.type==="directory",isSymbolicLink:!1,mode:r.mode,size:s,mtime:r.mtime||new Date}}resolveSymlink(e,n){if(n.startsWith("/"))return this.normalizePath(n);let r=this.dirname(e);return this.normalizePath(r==="/"?`/${n}`:`${r}/${n}`)}async mkdir(e,n){this.mkdirSync(e,n)}mkdirSync(e,n){let r=this.normalizePath(e);if(this.data.has(r)){if(this.data.get(r)?.type==="file")throw new Error(`EEXIST: file already exists, mkdir '${e}'`);if(!n?.recursive)throw new Error(`EEXIST: directory already exists, mkdir '${e}'`);return}let s=this.dirname(r);if(s!=="/"&&!this.data.has(s))if(n?.recursive)this.mkdirSync(s,{recursive:!0});else throw new Error(`ENOENT: no such file or directory, mkdir '${e}'`);this.data.set(r,{type:"directory",mode:493,mtime:new Date})}async readdir(e){let n=this.normalizePath(e),r=this.data.get(n);if(!r)throw new Error(`ENOENT: no such file or directory, scandir '${e}'`);if(r.type!=="directory")throw new Error(`ENOTDIR: not a directory, scandir '${e}'`);let s=n==="/"?"/":`${n}/`,o=[];for(let i of this.data.keys())if(i!==n&&i.startsWith(s)){let l=i.slice(s.length).split("/")[0];l&&!o.includes(l)&&o.push(l)}return o.sort()}async rm(e,n){let r=this.normalizePath(e),s=this.data.get(r);if(!s){if(n?.force)return;throw new Error(`ENOENT: no such file or directory, rm '${e}'`)}if(s.type==="directory"){let o=await this.readdir(r);if(o.length>0){if(!n?.recursive)throw new Error(`ENOTEMPTY: directory not empty, rm '${e}'`);for(let i of o){let a=r==="/"?`/${i}`:`${r}/${i}`;await this.rm(a,n)}}}this.data.delete(r)}async cp(e,n,r){let s=this.normalizePath(e),o=this.normalizePath(n),i=this.data.get(s);if(!i)throw new Error(`ENOENT: no such file or directory, cp '${e}'`);if(i.type==="file")this.ensureParentDirs(o),this.data.set(o,{...i});else if(i.type==="directory"){if(!r?.recursive)throw new Error(`EISDIR: is a directory, cp '${e}'`);await this.mkdir(o,{recursive:!0});let a=await this.readdir(s);for(let l of a){let c=s==="/"?`/${l}`:`${s}/${l}`,f=o==="/"?`/${l}`:`${o}/${l}`;await this.cp(c,f,r)}}}async mv(e,n){await this.cp(e,n,{recursive:!0}),await this.rm(e,{recursive:!0})}getAllPaths(){return Array.from(this.data.keys())}resolvePath(e,n){if(n.startsWith("/"))return this.normalizePath(n);let r=e==="/"?`/${n}`:`${e}/${n}`;return this.normalizePath(r)}async chmod(e,n){let r=this.normalizePath(e),s=this.data.get(r);if(!s)throw new Error(`ENOENT: no such file or directory, chmod '${e}'`);s.mode=n}async symlink(e,n){let r=this.normalizePath(n);if(this.data.has(r))throw new Error(`EEXIST: file already exists, symlink '${n}'`);this.ensureParentDirs(r),this.data.set(r,{type:"symlink",target:e,mode:511,mtime:new Date})}async link(e,n){let r=this.normalizePath(e),s=this.normalizePath(n),o=this.data.get(r);if(!o)throw new Error(`ENOENT: no such file or directory, link '${e}'`);if(o.type!=="file")throw new Error(`EPERM: operation not permitted, link '${e}'`);if(this.data.has(s))throw new Error(`EEXIST: file already exists, link '${n}'`);this.ensureParentDirs(s),this.data.set(s,{type:"file",content:o.content,mode:o.mode,mtime:o.mtime})}async readlink(e){let n=this.normalizePath(e),r=this.data.get(n);if(!r)throw new Error(`ENOENT: no such file or directory, readlink '${e}'`);if(r.type!=="symlink")throw new Error(`EINVAL: invalid argument, readlink '${e}'`);return r.target}};var Nr="5.1.0(1)-release",Cr="Linux version 5.15.0-generic (just-bash) #1 SMP PREEMPT";function Te(){return{pid:process.pid,ppid:process.ppid,uid:process.getuid?.()??1e3,gid:process.getgid?.()??1e3}}function $r(){let{pid:t,ppid:e,uid:n,gid:r}=Te();return`Name: bash
2
2
  State: R (running)
3
3
  Pid: ${t}
4
4
  PPid: ${e}
@@ -0,0 +1,9 @@
1
+ /**
2
+ * gzip - compress or expand files
3
+ *
4
+ * Also provides gunzip (decompress) and zcat (decompress to stdout) commands.
5
+ */
6
+ import type { Command } from "../../types.js";
7
+ export declare const gzipCommand: Command;
8
+ export declare const gunzipCommand: Command;
9
+ export declare const zcatCommand: Command;
@@ -1,6 +1,6 @@
1
1
  import type { Command } from "../types.js";
2
2
  /** All available built-in command names (excludes network commands like curl) */
3
- export type CommandName = "echo" | "cat" | "printf" | "ls" | "mkdir" | "touch" | "rm" | "cp" | "mv" | "ln" | "chmod" | "pwd" | "readlink" | "head" | "tail" | "wc" | "stat" | "grep" | "fgrep" | "egrep" | "sed" | "awk" | "sort" | "uniq" | "comm" | "cut" | "paste" | "tr" | "tee" | "find" | "basename" | "dirname" | "tree" | "du" | "env" | "printenv" | "alias" | "unalias" | "history" | "xargs" | "true" | "false" | "clear" | "bash" | "sh" | "jq" | "base64" | "diff" | "date" | "sleep" | "timeout" | "seq" | "expr" | "md5sum" | "sha1sum" | "sha256sum" | "file" | "html-to-markdown" | "help" | "which" | "tac" | "hostname" | "od";
3
+ export type CommandName = "echo" | "cat" | "printf" | "ls" | "mkdir" | "touch" | "rm" | "cp" | "mv" | "ln" | "chmod" | "pwd" | "readlink" | "head" | "tail" | "wc" | "stat" | "grep" | "fgrep" | "egrep" | "sed" | "awk" | "sort" | "uniq" | "comm" | "cut" | "paste" | "tr" | "tee" | "find" | "basename" | "dirname" | "tree" | "du" | "env" | "printenv" | "alias" | "unalias" | "history" | "xargs" | "true" | "false" | "clear" | "bash" | "sh" | "jq" | "base64" | "diff" | "date" | "sleep" | "timeout" | "seq" | "expr" | "md5sum" | "sha1sum" | "sha256sum" | "file" | "html-to-markdown" | "help" | "which" | "tac" | "hostname" | "od" | "gzip" | "gunzip" | "zcat";
4
4
  /** Network command names (only available when network is configured) */
5
5
  export type NetworkCommandName = "curl";
6
6
  /** All command names including network commands */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "just-bash",
3
- "version": "1.4.2",
3
+ "version": "1.5.3",
4
4
  "description": "A simulated bash environment with virtual filesystem",
5
5
  "repository": {
6
6
  "type": "git",
@@ -49,7 +49,8 @@
49
49
  "dist/parser/*.d.ts",
50
50
  "dist/sandbox/*.d.ts",
51
51
  "dist/utils/*.d.ts",
52
- "README.md"
52
+ "README.md",
53
+ "dist/AGENTS.md"
53
54
  ],
54
55
  "bin": {
55
56
  "just-bash": "./dist/bin/just-bash.js",
@@ -82,7 +83,7 @@
82
83
  },
83
84
  "packageManager": "pnpm@8.15.9+sha512.499434c9d8fdd1a2794ebf4552b3b25c0a633abcee5bb15e7b5de90f32f47b513aca98cd5cfd001c31f0db454bc3804edccd578501e4ca293a6816166bbd9f81",
84
85
  "scripts": {
85
- "build": "rm -rf dist && tsc && pnpm build:lib && pnpm build:ai && pnpm build:cli && pnpm build:shell && pnpm build:clean",
86
+ "build": "rm -rf dist && tsc && pnpm build:lib && pnpm build:ai && pnpm build:cli && pnpm build:shell && pnpm build:clean && sed '1,/^-->/d' AGENTS.npm.md > dist/AGENTS.md",
86
87
  "build:clean": "find dist -name '*.test.js' -delete && find dist -name '*.test.d.ts' -delete",
87
88
  "build:lib": "esbuild dist/index.js --bundle --splitting --platform=node --format=esm --minify --outdir=dist/bundle --chunk-names=chunks/[name]-[hash] --external:diff --external:minimatch --external:sprintf-js --external:turndown",
88
89
  "build:ai": "esbuild dist/ai/index.js --bundle --platform=node --format=esm --minify --outfile=dist/bundle/ai/index.js --external:ai --external:zod --external:diff --external:minimatch --external:sprintf-js --external:turndown",