just-binary 3.0.1 → 3.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/dist/AGENTS.md +1 -1
- package/dist/bin/chunks/chunk-H7TGYILF.js +3 -0
- package/dist/bin/chunks/chunk-XSBNCA43.js +7 -0
- package/dist/bin/chunks/flag-coverage-O3TGZMW3.js +2 -0
- package/dist/bin/{shell/chunks/seq-6C6VEGIG.js → chunks/seq-IDAAUGIL.js} +1 -1
- package/dist/bin/chunks/yes-A2LPETVU.js +2 -0
- package/dist/bin/just-bash.js +1 -1
- package/dist/bin/shell/chunks/chunk-H7TGYILF.js +3 -0
- package/dist/bin/shell/chunks/chunk-XSBNCA43.js +7 -0
- package/dist/bin/shell/chunks/flag-coverage-O3TGZMW3.js +2 -0
- package/dist/bin/{chunks/seq-6C6VEGIG.js → shell/chunks/seq-IDAAUGIL.js} +1 -1
- package/dist/bin/shell/chunks/yes-A2LPETVU.js +2 -0
- package/dist/bin/shell/shell.js +1 -1
- package/dist/bundle/browser.js +580 -579
- package/dist/bundle/chunks/chunk-6RAG3BOS.js +2 -0
- package/dist/bundle/chunks/chunk-R7SSLDTN.js +6 -0
- package/dist/bundle/chunks/flag-coverage-33IDWH3V.js +1 -0
- package/dist/bundle/chunks/{seq-UCWX6HDA.js → seq-SXS6YKWX.js} +1 -1
- package/dist/bundle/chunks/yes-2J55KNKF.js +1 -0
- package/dist/bundle/index.js +1 -1
- package/dist/commands/registry.d.ts +1 -1
- package/dist/commands/seq/seq.d.ts +5 -0
- package/dist/commands/yes/yes.d.ts +14 -0
- package/package.json +1 -1
- package/dist/bin/chunks/chunk-HT4IVOYZ.js +0 -7
- package/dist/bin/chunks/flag-coverage-JBJRZ3PO.js +0 -2
- package/dist/bin/shell/chunks/chunk-HT4IVOYZ.js +0 -7
- package/dist/bin/shell/chunks/flag-coverage-JBJRZ3PO.js +0 -2
- package/dist/bundle/chunks/chunk-OYIATQ5V.js +0 -6
- package/dist/bundle/chunks/flag-coverage-FK7Z2EY4.js +0 -1
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{b as c}from"./chunk-7USKQKOT.js";import{k as r}from"./chunk-DEQBZDPB.js";var h={name:"yes",async execute(a){let n=r(a),d=`${n.length===0?"y":n.join(" ")}
|
|
2
|
+
`,t=new TextEncoder().encode(d),l=16*1024,o=Math.max(1,Math.floor(l/t.length)),m=t.length*o,s=new Uint8Array(m);for(let e=0;e<o;e++)s.set(t,e*t.length);return{stdout:new ReadableStream({pull(e){e.enqueue(s)}}),stderr:c(),exitCode:0}}},p={name:"yes",flags:[]};export{h as a,p as b};
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import{b as a,e as g}from"./chunk-7USKQKOT.js";import{k as v}from"./chunk-DEQBZDPB.js";var V={name:"seq",async execute(u){let s=v(u),l=`
|
|
2
|
+
`,f=!1,r=[],t=0;for(;t<s.length;){let e=s[t];if(e==="-s"&&t+1<s.length){l=s[t+1],t+=2;continue}if(e==="-w"){f=!0,t++;continue}if(e==="--"){t++;break}if(e.startsWith("-")&&e!=="-"){if(e.startsWith("-s")&&e.length>2){l=e.slice(2),t++;continue}if((e==="-ws"||e==="-sw")&&(f=!0,t+1<s.length)){l=s[t+1],t+=2;continue}}r.push(e),t++}for(;t<s.length;)r.push(s[t]),t++;if(r.length===0)return{stdout:a(),stderr:g(`seq: missing operand
|
|
3
|
+
`),exitCode:1};let o=1,d=1,i;if(r.length===1?i=parseFloat(r[0]):r.length===2?(o=parseFloat(r[0]),i=parseFloat(r[1])):(o=parseFloat(r[0]),d=parseFloat(r[1]),i=parseFloat(r[2])),Number.isNaN(o)||Number.isNaN(d)||Number.isNaN(i)){let e=r.find(n=>Number.isNaN(parseFloat(n)));return{stdout:a(),stderr:g(`seq: invalid floating point argument: '${e}'
|
|
4
|
+
`),exitCode:1}}if(d===0)return{stdout:a(),stderr:g(`seq: invalid Zero increment value: '0'
|
|
5
|
+
`),exitCode:1};let m=Math.max(b(o),b(d),b(i)),q=0;if(f){let e=w(o,m).replace(/^-/,""),n=w(i,m).replace(/^-/,"");q=Math.max(e.length,n.length)}let y=e=>{let n=w(e,m);if(!f)return n;let N=n.startsWith("-"),C=(N?n.slice(1):n).padStart(q,"0");return N?`-${C}`:C},h=d>0;if(h&&o>i)return{stdout:a(),stderr:a(),exitCode:0};if(!h&&o<i)return{stdout:a(),stderr:a(),exitCode:0};let S=16*1024,c=o,p=!0,x=!1,W=new TextEncoder;return{stdout:new ReadableStream({pull(e){if(x){e.close();return}let n="";for(;n.length<S;){if(h?c>i+1e-10:c<i-1e-10){x=!0,p||(n+=`
|
|
6
|
+
`);break}let F=y(c);p?(n+=F,p=!1):n+=l+F,c+=d}n.length>0?e.enqueue(W.encode(n)):x&&e.close()}}),stderr:a(),exitCode:0}}};function b(u){let s=String(u),l=s.indexOf(".");return l===-1?0:s.length-l-1}function w(u,s){return s>0?u.toFixed(s):String(Math.round(u))}var A={name:"seq",flags:[{flag:"-s",type:"value",valueHint:"string"},{flag:"-w",type:"boolean"}],needsArgs:!0};export{V as a,A as b};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{b as yr}from"./chunk-VKPVP3LD.js";import{d as Ir,e as Mr,f as jr}from"./chunk-M5Z2PSET.js";import{b as Ar}from"./chunk-MOCB6GPI.js";import{b as $r}from"./chunk-BXVXYDEI.js";import{b as Sr}from"./chunk-YZPQ2W3A.js";import"./chunk-53I2XH4A.js";import"./chunk-SPETXYUM.js";import{b as Tr}from"./chunk-W4YQKIRV.js";import{b as hr}from"./chunk-GNXHG75U.js";import{b as wr}from"./chunk-BJQMZYH3.js";import{b as xr}from"./chunk-KRXVUD4L.js";import{b as vr}from"./chunk-2WN53CVO.js";import{b as kr}from"./chunk-ZEHOKNGQ.js";import{b as qr}from"./chunk-WMCZEPWH.js";import{b as Cr}from"./chunk-PEPBD26Q.js";import{b as br}from"./chunk-C44B5265.js";import{b as nr}from"./chunk-KM46TYGR.js";import{b as tr}from"./chunk-IAFRFK2O.js";import{b as lr}from"./chunk-2AMXQD57.js";import{b as ur}from"./chunk-5PIFIDMP.js";import{b as pr}from"./chunk-R7SSLDTN.js";import{b as er}from"./chunk-ZILSBZZ6.js";import{b as dr}from"./chunk-5BF5Z7CI.js";import{b as cr}from"./chunk-YR4NQYT4.js";import"./chunk-K374E7Q4.js";import{b as rr}from"./chunk-5J57FRET.js";import{c as or,d as ar}from"./chunk-SMOO4IXI.js";import{b as sr}from"./chunk-6V537K6X.js";import{b as ir}from"./chunk-6RAG3BOS.js";import{c as gr,d as mr}from"./chunk-INJTM5VR.js";import{b as Fr}from"./chunk-PLMPLLOW.js";import"./chunk-3ANOKDIL.js";import"./chunk-7MKBHGLS.js";import{b as zr}from"./chunk-5PV2QBWC.js";import{b as fr}from"./chunk-LBJIRX7Z.js";import{b as Q}from"./chunk-WVUVOYGQ.js";import{b as R}from"./chunk-72YPFG2Z.js";import{b as U}from"./chunk-QOFUETQV.js";import{b as V}from"./chunk-QPHABKP3.js";import{b as W}from"./chunk-ULK572PS.js";import{c as X,d as Y}from"./chunk-ATPJVO6F.js";import{c as Z,d as _}from"./chunk-D4LWWAJ2.js";import{b as N}from"./chunk-DNPCEBCN.js";import{b as E}from"./chunk-U5Z7TJRO.js";import{b as G}from"./chunk-2OIUNVMP.js";import{b as H}from"./chunk-OZ76IUC5.js";import{b as J}from"./chunk-TOK4OQFP.js";import{b as K}from"./chunk-PES2WOIM.js";import{b as L}from"./chunk-C325X4RB.js";import{b as O}from"./chunk-JJ5E4XJI.js";import{b as P}from"./chunk-SF2462OV.js";import{b as M}from"./chunk-XZZ3XIZH.js";import{b as j}from"./chunk-KBCEHRTU.js";import{b as A}from"./chunk-Z6DABRIE.js";import{b as $}from"./chunk-URMOT4S7.js";import{b as S}from"./chunk-RZ4GSKWY.js";import{b as T}from"./chunk-2V4QPJXQ.js";import{b as B}from"./chunk-SJ7F47VW.js";import{b as D}from"./chunk-GMCBEP44.js";import{b as h}from"./chunk-BTTTDUMD.js";import{b as w}from"./chunk-JMFP263D.js";import"./chunk-YJHMB6QD.js";import{b as x}from"./chunk-SYTEZ2Y4.js";import{b as v}from"./chunk-EHY6GWKP.js";import{d as k,e as q,f as C}from"./chunk-GET3OC3O.js";import"./chunk-IJXFPKNC.js";import{b}from"./chunk-NDPSDM3Q.js";import"./chunk-D3IE6KOV.js";import{b as y}from"./chunk-BQFHZOZH.js";import{b as I}from"./chunk-WTT2UCIA.js";import{b as n}from"./chunk-H5X25CTO.js";import{b as t}from"./chunk-F77E6PCM.js";import{b as l}from"./chunk-XZMBEDQL.js";import{b as u}from"./chunk-26VNLF3H.js";import{b as p}from"./chunk-PUUP54QP.js";import{b as e}from"./chunk-4PFDHMBC.js";import{b as d}from"./chunk-USGCTFXK.js";import{b as c}from"./chunk-K7ZRPFN6.js";import"./chunk-MIFIRXNI.js";import"./chunk-UBLR5ACC.js";import"./chunk-YNYSPYQ5.js";import{b as i}from"./chunk-3P5XOPF6.js";import{b as g}from"./chunk-Q5XZ24VX.js";import"./chunk-J7YL5K5B.js";import{b as m}from"./chunk-XXS34VJC.js";import"./chunk-BMKJMOWP.js";import"./chunk-JSLN56GJ.js";import{b as F}from"./chunk-26DNZXYZ.js";import"./chunk-NUFRM6SI.js";import{b as z}from"./chunk-RTGKIAVM.js";import{b as f}from"./chunk-EHRCEDXN.js";import"./chunk-44UOCSGV.js";import"./chunk-GQSJJXDG.js";import"./chunk-PQPG4QOY.js";import"./chunk-7USKQKOT.js";import"./chunk-DEQBZDPB.js";var Gr=[i,g,m,F,z,f,n,t,l,u,p,e,d,c,h,w,x,v,k,q,C,b,y,I,M,j,A,$,S,T,B,D,E,G,H,J,K,L,O,P,Q,R,U,V,W,X,Y,Z,_,N,rr,or,ar,sr,gr,mr,Fr,zr,fr,nr,tr,lr,ur,pr,er,dr,cr,hr,wr,xr,vr,kr,qr,Cr,br,yr,Ir,Mr,jr,Ar,$r,ir,Sr,Tr];function Br(){return Gr}var Dr=new Map;for(let r of Br())Dr.set(r.name,new Set(r.flags.map(o=>o.flag)));function fa(r,o,Er){let a=Dr.get(o);if(!(!a||a.size===0))for(let s of Er)a.has(s)&&r.hit(`cmd:flag:${o}:${s}`)}export{fa as emitFlagCoverage};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a,b}from"./chunk-
|
|
1
|
+
import{a,b}from"./chunk-R7SSLDTN.js";import"./chunk-7USKQKOT.js";import"./chunk-DEQBZDPB.js";export{b as flagsForFuzzing,a as seqCommand};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a,b}from"./chunk-6RAG3BOS.js";import"./chunk-7USKQKOT.js";import"./chunk-DEQBZDPB.js";export{b as flagsForFuzzing,a as yesCommand};
|
package/dist/bundle/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{A as bs,C as Fr,D as Lr,E as ge,F as Ze,G as oe,H as xe,I as Mt,J as zr,K as V,L as Wr,M as Vr,N as Ie,O as Es,P as Ft,Q as tt,R as K,a as Cr,b as ms,c as xr,d as Tr,e as It,f as re,g as q,h as Ne,i as le,j as Oe,k as je,l as ys,m as Rt,n as Nr,o as gs,p as Or,q as ye,r as Le,s as Dr,t as Ir,u as ws,v as vs,w as De,x as Rr,y as Mr,z as Ce}from"./chunks/chunk-U6GF4IJH.js";import{a as _r}from"./chunks/chunk-MIFIRXNI.js";import{a as Be,b as _e}from"./chunks/chunk-UBLR5ACC.js";import{a as vt}from"./chunks/chunk-YNYSPYQ5.js";import{a as Ee,b as Se,c as me,d as Ae,e as Ar,f as X,g as qe,h as Nt,i as Ot,j as kr,k as de,l as Ve,m as Dt,n as ke}from"./chunks/chunk-JSLN56GJ.js";import"./chunks/chunk-NUFRM6SI.js";import{a as Fe}from"./chunks/chunk-44UOCSGV.js";import{a as et,b as w,c as te,d as he,e as C,f as U,g as Ge,h as O,i as Tt,j as ps,k as Pi,l as Ai,m as ki}from"./chunks/chunk-7USKQKOT.js";import{a as wt,g as F,h as B,i as j,j as $r,k as Je,l as N,m as g,n as Pr}from"./chunks/chunk-DEQBZDPB.js";var Xe=[{name:"echo",load:async()=>(await import("./chunks/echo-ZPFMTGPQ.js")).echoCommand},{name:"cat",load:async()=>(await import("./chunks/cat-KHANCARN.js")).catCommand},{name:"printf",load:async()=>(await import("./chunks/printf-223LFYZL.js")).printfCommand},{name:"ls",load:async()=>(await import("./chunks/ls-JAO4QNWZ.js")).lsCommand},{name:"mkdir",load:async()=>(await import("./chunks/mkdir-O74MZREV.js")).mkdirCommand},{name:"rmdir",load:async()=>(await import("./chunks/rmdir-LGJXG7S3.js")).rmdirCommand},{name:"touch",load:async()=>(await import("./chunks/touch-7BNOFP74.js")).touchCommand},{name:"rm",load:async()=>(await import("./chunks/rm-NIZVTCU7.js")).rmCommand},{name:"cp",load:async()=>(await import("./chunks/cp-FD6I3O6B.js")).cpCommand},{name:"mv",load:async()=>(await import("./chunks/mv-66ALAQRO.js")).mvCommand},{name:"ln",load:async()=>(await import("./chunks/ln-N3OWFM3J.js")).lnCommand},{name:"chmod",load:async()=>(await import("./chunks/chmod-A3HCFC4L.js")).chmodCommand},{name:"pwd",load:async()=>(await import("./chunks/pwd-BP6H5JPD.js")).pwdCommand},{name:"readlink",load:async()=>(await import("./chunks/readlink-JL7TKP5U.js")).readlinkCommand},{name:"head",load:async()=>(await import("./chunks/head-CIKXFGO5.js")).headCommand},{name:"tail",load:async()=>(await import("./chunks/tail-GJ536HFQ.js")).tailCommand},{name:"wc",load:async()=>(await import("./chunks/wc-PWYVRT3X.js")).wcCommand},{name:"stat",load:async()=>(await import("./chunks/stat-2CKLARLN.js")).statCommand},{name:"grep",load:async()=>(await import("./chunks/grep-KLQ4A2OH.js")).grepCommand},{name:"fgrep",load:async()=>(await import("./chunks/grep-KLQ4A2OH.js")).fgrepCommand},{name:"egrep",load:async()=>(await import("./chunks/grep-KLQ4A2OH.js")).egrepCommand},{name:"rg",load:async()=>(await import("./chunks/rg-RA3U4BVJ.js")).rgCommand},{name:"sed",load:async()=>(await import("./chunks/sed-JJ3WRWYT.js")).sedCommand},{name:"awk",load:async()=>(await import("./chunks/awk2-LA5EZ6UJ.js")).awkCommand2},{name:"sort",load:async()=>(await import("./chunks/sort-BNPU2P3T.js")).sortCommand},{name:"uniq",load:async()=>(await import("./chunks/uniq-ZHYLWEFM.js")).uniqCommand},{name:"comm",load:async()=>(await import("./chunks/comm-47FVEMHB.js")).commCommand},{name:"cut",load:async()=>(await import("./chunks/cut-LQZW2NZP.js")).cutCommand},{name:"paste",load:async()=>(await import("./chunks/paste-Y7CG4TKC.js")).pasteCommand},{name:"tr",load:async()=>(await import("./chunks/tr-TB6CSIUV.js")).trCommand},{name:"rev",load:async()=>(await import("./chunks/rev-UN4ZHPP5.js")).rev},{name:"nl",load:async()=>(await import("./chunks/nl-JSPXHHOM.js")).nl},{name:"fold",load:async()=>(await import("./chunks/fold-6O4H3AW4.js")).fold},{name:"expand",load:async()=>(await import("./chunks/expand-Y7EMR5BJ.js")).expand},{name:"unexpand",load:async()=>(await import("./chunks/unexpand-LDC3OTY4.js")).unexpand},{name:"strings",load:async()=>(await import("./chunks/strings-LG7URPXR.js")).strings},{name:"split",load:async()=>(await import("./chunks/split-SVMZIFGF.js")).split},{name:"column",load:async()=>(await import("./chunks/column-OUJRIWLX.js")).column},{name:"join",load:async()=>(await import("./chunks/join-CFMKSF44.js")).join},{name:"tee",load:async()=>(await import("./chunks/tee-PJ6B6JJF.js")).teeCommand},{name:"find",load:async()=>(await import("./chunks/find-BYG3GTNV.js")).findCommand},{name:"basename",load:async()=>(await import("./chunks/basename-NCIQLNXY.js")).basenameCommand},{name:"dirname",load:async()=>(await import("./chunks/dirname-IVA4YYRE.js")).dirnameCommand},{name:"tree",load:async()=>(await import("./chunks/tree-4XRVONUX.js")).treeCommand},{name:"du",load:async()=>(await import("./chunks/du-H4GJHM4R.js")).duCommand},{name:"env",load:async()=>(await import("./chunks/env-ZCKP6263.js")).envCommand},{name:"printenv",load:async()=>(await import("./chunks/env-ZCKP6263.js")).printenvCommand},{name:"alias",load:async()=>(await import("./chunks/alias-JHV3WNPA.js")).aliasCommand},{name:"unalias",load:async()=>(await import("./chunks/alias-JHV3WNPA.js")).unaliasCommand},{name:"history",load:async()=>(await import("./chunks/history-N2VRLHEO.js")).historyCommand},{name:"xargs",load:async()=>(await import("./chunks/xargs-CB3LOKW5.js")).xargsCommand},{name:"true",load:async()=>(await import("./chunks/true-4UI5ZW75.js")).trueCommand},{name:"false",load:async()=>(await import("./chunks/true-4UI5ZW75.js")).falseCommand},{name:"clear",load:async()=>(await import("./chunks/clear-7SIFUXVD.js")).clearCommand},{name:"bash",load:async()=>(await import("./chunks/bash-CN3UUJ3N.js")).bashCommand},{name:"sh",load:async()=>(await import("./chunks/bash-CN3UUJ3N.js")).shCommand},{name:"jq",load:async()=>(await import("./chunks/jq-BE76GAFF.js")).jqCommand},{name:"base64",load:async()=>(await import("./chunks/base64-DP3BVL7J.js")).base64Command},{name:"diff",load:async()=>(await import("./chunks/diff-7ZYMEVUP.js")).diffCommand},{name:"date",load:async()=>(await import("./chunks/date-MHLQVLQZ.js")).dateCommand},{name:"sleep",load:async()=>(await import("./chunks/sleep-YQMDXMVK.js")).sleepCommand},{name:"timeout",load:async()=>(await import("./chunks/timeout-SXUKTL7R.js")).timeoutCommand},{name:"time",load:async()=>(await import("./chunks/time-IENYNVU4.js")).timeCommand},{name:"seq",load:async()=>(await import("./chunks/seq-UCWX6HDA.js")).seqCommand},{name:"expr",load:async()=>(await import("./chunks/expr-WDFXVU43.js")).exprCommand},{name:"md5sum",load:async()=>(await import("./chunks/md5sum-ZK2D5HMO.js")).md5sumCommand},{name:"sha1sum",load:async()=>(await import("./chunks/sha1sum-BB464H3H.js")).sha1sumCommand},{name:"sha256sum",load:async()=>(await import("./chunks/sha256sum-PPJUHZ6A.js")).sha256sumCommand},{name:"file",load:async()=>(await import("./chunks/file-7WSECN2B.js")).fileCommand},{name:"html-to-markdown",load:async()=>(await import("./chunks/html-to-markdown-ZDG5GHHM.js")).htmlToMarkdownCommand},{name:"help",load:async()=>(await import("./chunks/help-B2UCSYQN.js")).helpCommand},{name:"which",load:async()=>(await import("./chunks/which-EIT2IJGG.js")).whichCommand},{name:"tac",load:async()=>(await import("./chunks/tac-NXGTFB5T.js")).tac},{name:"hostname",load:async()=>(await import("./chunks/hostname-W7U3GOEK.js")).hostname},{name:"whoami",load:async()=>(await import("./chunks/whoami-QZJHAL2R.js")).whoami},{name:"od",load:async()=>(await import("./chunks/od-NUINXLUX.js")).od},{name:"gzip",load:async()=>(await import("./chunks/gzip-BYGAV4XY.js")).gzipCommand},{name:"gunzip",load:async()=>(await import("./chunks/gzip-BYGAV4XY.js")).gunzipCommand},{name:"zcat",load:async()=>(await import("./chunks/gzip-BYGAV4XY.js")).zcatCommand}];(typeof __BROWSER__>"u"||!__BROWSER__)&&(Xe.push({name:"tar",load:async()=>(await import("./chunks/tar-3KCFO6WZ.js")).tarCommand}),Xe.push({name:"yq",load:async()=>(await import("./chunks/yq-JFXSVU6G.js")).yqCommand}),Xe.push({name:"xan",load:async()=>(await import("./chunks/xan-JDD2TEQH.js")).xanCommand}),Xe.push({name:"sqlite3",load:async()=>(await import("./chunks/sqlite3-PZGLI6XB.js")).sqlite3Command}));var Lt=[];(typeof __BROWSER__>"u"||!__BROWSER__)&&(Lt.push({name:"python3",load:async()=>(await import("./chunks/python3-2KEMASKS.js")).python3Command}),Lt.push({name:"python",load:async()=>(await import("./chunks/python3-2KEMASKS.js")).pythonCommand}));var jr=[{name:"curl",load:async()=>(await import("./chunks/curl-3MHMRKXA.js")).curlCommand}],Br=new Map;function Ss(e){return{name:e.name,async execute(t,s){let r=Br.get(e.name);if(r||(r=await e.load(),Br.set(e.name,r)),s.coverage&&(typeof __BROWSER__>"u"||!__BROWSER__)){let{emitFlagCoverage:n}=await import("./chunks/flag-coverage-FK7Z2EY4.js"),{decodeArgs:i}=await import("./chunks/bytes-JUNATFIO.js");n(s.coverage,e.name,i(t))}return r.execute(t,s)}}}function _i(){return Xe.map(e=>e.name)}function Ci(){return jr.map(e=>e.name)}function Hr(e){return(e?Xe.filter(s=>e.includes(s.name)):Xe).map(Ss)}function Ur(){return jr.map(Ss)}function xi(){return Lt.map(e=>e.name)}function Gr(){return Lt.map(Ss)}function qr(e){return"load"in e&&typeof e.load=="function"}function Ti(e,t){return{name:e,async execute(s,r){let n={...r,env:Pr(r.env)},i=await t(Je(s),n);return typeof i.stdout=="string"?{stdout:C(i.stdout),stderr:C(i.stderr),exitCode:i.exitCode}:i}}}function Zr(e){let t=null;return{name:e.name,async execute(s,r){return t||(t=await e.load()),t.execute(s,r)}}}var Ni=new TextEncoder;function Oi(e){return typeof e=="object"&&e!==null&&typeof e.getReader=="function"}function Di(e,t){if(e instanceof Uint8Array)return e;if(t==="base64")return Uint8Array.from(atob(e),s=>s.charCodeAt(0));if(t==="hex"){let s=new Uint8Array(e.length/2);for(let r=0;r<e.length;r+=2)s[r/2]=parseInt(e.slice(r,r+2),16);return s}if(t==="binary"||t==="latin1"){if(e.length<=65536)return Uint8Array.from(e,n=>n.charCodeAt(0));let r=new Uint8Array(e.length);for(let n=0;n<e.length;n++)r[n]=e.charCodeAt(n);return r}return Ni.encode(e)}function Yr(e){if(e.length===0)return[];if(e.length<=et)return[e];let t=[];for(let s=0;s<e.length;s+=et)t.push(e.subarray(s,Math.min(s+et,e.length)));return t}function st(e,t){let s=Di(e,t);return{chunks:Yr(s),size:s.length}}async function ze(e,t){if(Oi(e)){let s=[],r=0;for await(let n of ps(e))if(n.length<=et)s.push(n),r+=n.length;else for(let i of Yr(n))s.push(i),r+=i.length;return{chunks:s,size:r}}return st(e,t)}function zt(e,t){if(t==="base64")return btoa(_r(Xr(e)));if(t==="hex"){let n="";for(let i of e)for(let o=0;o<i.length;o++)n+=i[o].toString(16).padStart(2,"0");return n}if(t==="binary"||t==="latin1"){if(typeof Buffer<"u")return Buffer.from(Xr(e)).toString(t);let n=65536,i="";for(let o of e)if(o.length<=n)i+=String.fromCharCode(...o);else for(let a=0;a<o.length;a+=n){let l=o.subarray(a,a+n);i+=String.fromCharCode(...l)}return i}let s=new TextDecoder,r="";for(let n of e)n.length>0&&(r+=s.decode(n,{stream:!0}));return r+=s.decode(),r}function Xr(e){let t=0;for(let n of e)t+=n.length;if(t===0)return new Uint8Array(0);if(e.length===1)return e[0];let s=new Uint8Array(t),r=0;for(let n of e)s.set(n,r),r+=n.length;return s}function $e(e){if(e!=null)return typeof e=="string"?e:e.encoding??void 0}function Ii(e){return typeof e=="object"&&e!==null&&!(e instanceof Uint8Array)&&!(e instanceof ReadableStream)&&"content"in e}function ae(e,t){if(e.includes("\0"))throw new Error(`ENOENT: path contains null byte, ${t} '${e}'`)}var We=class{data=new Map;constructor(t){if(this.data.set("/",{type:"directory",mode:493,mtime:new Date}),t)for(let[s,r]of Object.entries(t))if(Ii(r)){if(r.content instanceof ReadableStream)throw new Error("InMemoryFs: streams not supported in InitialFiles; use writeFile() after construction");this.writeFileSync(s,r.content,void 0,{mode:r.mode,mtime:r.mtime})}else{if(r instanceof ReadableStream)throw new Error("InMemoryFs: streams not supported in InitialFiles; use writeFile() after construction");this.writeFileSync(s,r)}}normalizePath(t){if(!t||t==="/")return"/";let s=t.endsWith("/")&&t!=="/"?t.slice(0,-1):t;s.startsWith("/")||(s=`/${s}`);let r=s.split("/").filter(i=>i&&i!=="."),n=[];for(let i of r)i===".."?n.pop():n.push(i);return`/${n.join("/")}`||"/"}dirname(t){let s=this.normalizePath(t);if(s==="/")return"/";let r=s.lastIndexOf("/");return r===0?"/":s.slice(0,r)}ensureParentDirs(t){let s=this.dirname(t);s!=="/"&&(this.data.has(s)||(this.ensureParentDirs(s),this.data.set(s,{type:"directory",mode:493,mtime:new Date})))}writeFileSync(t,s,r,n){ae(t,"write");let i=this.normalizePath(t);this.ensureParentDirs(i);let o=$e(r),{chunks:a,size:l}=st(s,o);this.data.set(i,{type:"file",chunks:a,size:l,mode:n?.mode??420,mtime:n?.mtime??new Date})}async readFile(t){ae(t,"open");let s=this.resolvePathWithSymlinks(t),r=this.data.get(s);if(!r)throw new Error(`ENOENT: no such file or directory, open '${t}'`);if(r.type!=="file")throw new Error(`EISDIR: illegal operation on a directory, read '${t}'`);return he(r.chunks)}async readFileText(t,s){ae(t,"open");let r=this.resolvePathWithSymlinks(t),n=this.data.get(r);if(!n)throw new Error(`ENOENT: no such file or directory, open '${t}'`);if(n.type!=="file")throw new Error(`EISDIR: illegal operation on a directory, read '${t}'`);let i=$e(s);return zt(n.chunks,i)}async writeFile(t,s,r){ae(t,"write");let n=this.normalizePath(t);this.ensureParentDirs(n);let i=$e(r),{chunks:o,size:a}=await ze(s,i);this.data.set(n,{type:"file",chunks:o,size:a,mode:420,mtime:new Date})}async appendFile(t,s,r){ae(t,"append");let n=this.normalizePath(t),i=this.data.get(n);if(i&&i.type==="directory")throw new Error(`EISDIR: illegal operation on a directory, write '${t}'`);let o=$e(r),{chunks:a,size:l}=await ze(s,o);i?.type==="file"?this.data.set(n,{type:"file",chunks:[...i.chunks,...a],size:i.size+l,mode:i.mode,mtime:new Date}):(this.ensureParentDirs(n),this.data.set(n,{type:"file",chunks:a,size:l,mode:420,mtime:new Date}))}async exists(t){if(t.includes("\0"))return!1;try{let s=this.resolvePathWithSymlinks(t);return this.data.has(s)}catch{return!1}}async stat(t){ae(t,"stat");let s=this.resolvePathWithSymlinks(t),r=this.data.get(s);if(!r)throw new Error(`ENOENT: no such file or directory, stat '${t}'`);let n=0;return r.type==="file"&&(n=r.size),{isFile:r.type==="file",isDirectory:r.type==="directory",isSymbolicLink:!1,mode:r.mode,size:n,mtime:r.mtime||new Date}}async lstat(t){ae(t,"lstat");let s=this.resolveIntermediateSymlinks(t),r=this.data.get(s);if(!r)throw new Error(`ENOENT: no such file or directory, lstat '${t}'`);if(r.type==="symlink")return{isFile:!1,isDirectory:!1,isSymbolicLink:!0,mode:r.mode,size:r.target.length,mtime:r.mtime||new Date};let n=0;return r.type==="file"&&(n=r.size),{isFile:r.type==="file",isDirectory:r.type==="directory",isSymbolicLink:!1,mode:r.mode,size:n,mtime:r.mtime||new Date}}resolveSymlink(t,s){if(s.startsWith("/"))return this.normalizePath(s);let r=this.dirname(t);return this.normalizePath(r==="/"?`/${s}`:`${r}/${s}`)}resolveIntermediateSymlinks(t){let s=this.normalizePath(t);if(s==="/")return"/";let r=s.slice(1).split("/");if(r.length<=1)return s;let n="",i=new Set;for(let o=0;o<r.length-1;o++){let a=r[o];n=`${n}/${a}`;let l=this.data.get(n),u=0,c=40;for(;l&&l.type==="symlink"&&u<c;){if(i.has(n))throw new Error(`ELOOP: too many levels of symbolic links, lstat '${t}'`);i.add(n),n=this.resolveSymlink(n,l.target),l=this.data.get(n),u++}if(u>=c)throw new Error(`ELOOP: too many levels of symbolic links, lstat '${t}'`)}return`${n}/${r[r.length-1]}`}resolvePathWithSymlinks(t){let s=this.normalizePath(t);if(s==="/")return"/";let r=s.slice(1).split("/"),n="",i=new Set;for(let o of r){n=`${n}/${o}`;let a=this.data.get(n),l=0,u=40;for(;a&&a.type==="symlink"&&l<u;){if(i.has(n))throw new Error(`ELOOP: too many levels of symbolic links, open '${t}'`);i.add(n),n=this.resolveSymlink(n,a.target),a=this.data.get(n),l++}if(l>=u)throw new Error(`ELOOP: too many levels of symbolic links, open '${t}'`)}return n}async mkdir(t,s){this.mkdirSync(t,s)}mkdirSync(t,s){ae(t,"mkdir");let r=this.normalizePath(t);if(this.data.has(r)){if(this.data.get(r)?.type==="file")throw new Error(`EEXIST: file already exists, mkdir '${t}'`);if(!s?.recursive)throw new Error(`EEXIST: directory already exists, mkdir '${t}'`);return}let n=this.dirname(r);if(n!=="/"&&!this.data.has(n))if(s?.recursive)this.mkdirSync(n,{recursive:!0});else throw new Error(`ENOENT: no such file or directory, mkdir '${t}'`);this.data.set(r,{type:"directory",mode:493,mtime:new Date})}async readdir(t){return(await this.readdirWithFileTypes(t)).map(r=>r.name)}async readdirWithFileTypes(t){ae(t,"scandir");let s=this.normalizePath(t),r=this.data.get(s);if(!r)throw new Error(`ENOENT: no such file or directory, scandir '${t}'`);let n=new Set;for(;r&&r.type==="symlink";){if(n.has(s))throw new Error(`ELOOP: too many levels of symbolic links, scandir '${t}'`);n.add(s),s=this.resolveSymlink(s,r.target),r=this.data.get(s)}if(!r)throw new Error(`ENOENT: no such file or directory, scandir '${t}'`);if(r.type!=="directory")throw new Error(`ENOTDIR: not a directory, scandir '${t}'`);let i=s==="/"?"/":`${s}/`,o=new Map;for(let[a,l]of this.data.entries())if(a!==s&&a.startsWith(i)){let u=a.slice(i.length),c=u.split("/")[0];c&&!u.includes("/",c.length)&&!o.has(c)&&o.set(c,{name:c,isFile:l.type==="file",isDirectory:l.type==="directory",isSymbolicLink:l.type==="symlink"})}return Array.from(o.values()).sort((a,l)=>a.name<l.name?-1:a.name>l.name?1:0)}async rm(t,s){ae(t,"rm");let r=this.normalizePath(t),n=this.data.get(r);if(!n){if(s?.force)return;throw new Error(`ENOENT: no such file or directory, rm '${t}'`)}if(n.type==="directory"){let i=await this.readdir(r);if(i.length>0){if(!s?.recursive)throw new Error(`ENOTEMPTY: directory not empty, rm '${t}'`);for(let o of i){let a=r==="/"?`/${o}`:`${r}/${o}`;await this.rm(a,s)}}}this.data.delete(r)}async cp(t,s,r){ae(t,"cp"),ae(s,"cp");let n=this.normalizePath(t),i=this.normalizePath(s),o=this.data.get(n);if(!o)throw new Error(`ENOENT: no such file or directory, cp '${t}'`);if(o.type==="file")this.ensureParentDirs(i),this.data.set(i,{type:"file",chunks:[...o.chunks],size:o.size,mode:o.mode,mtime:o.mtime});else if(o.type==="directory"){if(!r?.recursive)throw new Error(`EISDIR: is a directory, cp '${t}'`);await this.mkdir(i,{recursive:!0});let a=await this.readdir(n);for(let l of a){let u=n==="/"?`/${l}`:`${n}/${l}`,c=i==="/"?`/${l}`:`${i}/${l}`;await this.cp(u,c,r)}}}async mv(t,s){await this.cp(t,s,{recursive:!0}),await this.rm(t,{recursive:!0})}getAllPaths(){return Array.from(this.data.keys())}resolvePath(t,s){if(s.startsWith("/"))return this.normalizePath(s);let r=t==="/"?`/${s}`:`${t}/${s}`;return this.normalizePath(r)}async chmod(t,s){ae(t,"chmod");let r=this.normalizePath(t),n=this.data.get(r);if(!n)throw new Error(`ENOENT: no such file or directory, chmod '${t}'`);n.mode=s}async symlink(t,s){ae(s,"symlink");let r=this.normalizePath(s);if(this.data.has(r))throw new Error(`EEXIST: file already exists, symlink '${s}'`);this.ensureParentDirs(r),this.data.set(r,{type:"symlink",target:t,mode:511,mtime:new Date})}async link(t,s){ae(t,"link"),ae(s,"link");let r=this.normalizePath(t),n=this.normalizePath(s),i=this.data.get(r);if(!i)throw new Error(`ENOENT: no such file or directory, link '${t}'`);if(i.type!=="file")throw new Error(`EPERM: operation not permitted, link '${t}'`);if(this.data.has(n))throw new Error(`EEXIST: file already exists, link '${s}'`);this.ensureParentDirs(n),this.data.set(n,{type:"file",chunks:[...i.chunks],size:i.size,mode:i.mode,mtime:i.mtime})}async readlink(t){ae(t,"readlink");let s=this.normalizePath(t),r=this.data.get(s);if(!r)throw new Error(`ENOENT: no such file or directory, readlink '${t}'`);if(r.type!=="symlink")throw new Error(`EINVAL: invalid argument, readlink '${t}'`);return r.target}async realpath(t){ae(t,"realpath");let s=this.resolvePathWithSymlinks(t);if(!this.data.has(s))throw new Error(`ENOENT: no such file or directory, realpath '${t}'`);return s}async utimes(t,s,r){ae(t,"utimes");let n=this.normalizePath(t),i=this.resolvePathWithSymlinks(n),o=this.data.get(i);if(!o)throw new Error(`ENOENT: no such file or directory, utimes '${t}'`);o.mtime=r}};function Ri(e){let t=e;return typeof t.mkdirSync=="function"&&typeof t.writeFileSync=="function"}function Mi(e,t){e.mkdirSync("/bin",{recursive:!0}),e.mkdirSync("/usr/bin",{recursive:!0}),t&&(e.mkdirSync("/home/user",{recursive:!0}),e.mkdirSync("/tmp",{recursive:!0}))}function Fi(e){e.mkdirSync("/dev",{recursive:!0}),e.writeFileSync("/dev/null",""),e.writeFileSync("/dev/zero",new Uint8Array(0)),e.writeFileSync("/dev/stdin",""),e.writeFileSync("/dev/stdout",""),e.writeFileSync("/dev/stderr","")}function Li(e){e.mkdirSync("/proc/self/fd",{recursive:!0}),e.writeFileSync("/proc/version",`${Cr}
|
|
1
|
+
import{A as bs,C as Fr,D as Lr,E as ge,F as Ze,G as oe,H as xe,I as Mt,J as zr,K as V,L as Wr,M as Vr,N as Ie,O as Es,P as Ft,Q as tt,R as K,a as Cr,b as ms,c as xr,d as Tr,e as It,f as re,g as q,h as Ne,i as le,j as Oe,k as je,l as ys,m as Rt,n as Nr,o as gs,p as Or,q as ye,r as Le,s as Dr,t as Ir,u as ws,v as vs,w as De,x as Rr,y as Mr,z as Ce}from"./chunks/chunk-U6GF4IJH.js";import{a as _r}from"./chunks/chunk-MIFIRXNI.js";import{a as Be,b as _e}from"./chunks/chunk-UBLR5ACC.js";import{a as vt}from"./chunks/chunk-YNYSPYQ5.js";import{a as Ee,b as Se,c as me,d as Ae,e as Ar,f as X,g as qe,h as Nt,i as Ot,j as kr,k as de,l as Ve,m as Dt,n as ke}from"./chunks/chunk-JSLN56GJ.js";import"./chunks/chunk-NUFRM6SI.js";import{a as Fe}from"./chunks/chunk-44UOCSGV.js";import{a as et,b as w,c as te,d as he,e as C,f as U,g as Ge,h as O,i as Tt,j as ps,k as Pi,l as Ai,m as ki}from"./chunks/chunk-7USKQKOT.js";import{a as wt,g as F,h as B,i as j,j as $r,k as Je,l as N,m as g,n as Pr}from"./chunks/chunk-DEQBZDPB.js";var Xe=[{name:"echo",load:async()=>(await import("./chunks/echo-ZPFMTGPQ.js")).echoCommand},{name:"cat",load:async()=>(await import("./chunks/cat-KHANCARN.js")).catCommand},{name:"printf",load:async()=>(await import("./chunks/printf-223LFYZL.js")).printfCommand},{name:"ls",load:async()=>(await import("./chunks/ls-JAO4QNWZ.js")).lsCommand},{name:"mkdir",load:async()=>(await import("./chunks/mkdir-O74MZREV.js")).mkdirCommand},{name:"rmdir",load:async()=>(await import("./chunks/rmdir-LGJXG7S3.js")).rmdirCommand},{name:"touch",load:async()=>(await import("./chunks/touch-7BNOFP74.js")).touchCommand},{name:"rm",load:async()=>(await import("./chunks/rm-NIZVTCU7.js")).rmCommand},{name:"cp",load:async()=>(await import("./chunks/cp-FD6I3O6B.js")).cpCommand},{name:"mv",load:async()=>(await import("./chunks/mv-66ALAQRO.js")).mvCommand},{name:"ln",load:async()=>(await import("./chunks/ln-N3OWFM3J.js")).lnCommand},{name:"chmod",load:async()=>(await import("./chunks/chmod-A3HCFC4L.js")).chmodCommand},{name:"pwd",load:async()=>(await import("./chunks/pwd-BP6H5JPD.js")).pwdCommand},{name:"readlink",load:async()=>(await import("./chunks/readlink-JL7TKP5U.js")).readlinkCommand},{name:"head",load:async()=>(await import("./chunks/head-CIKXFGO5.js")).headCommand},{name:"tail",load:async()=>(await import("./chunks/tail-GJ536HFQ.js")).tailCommand},{name:"wc",load:async()=>(await import("./chunks/wc-PWYVRT3X.js")).wcCommand},{name:"stat",load:async()=>(await import("./chunks/stat-2CKLARLN.js")).statCommand},{name:"grep",load:async()=>(await import("./chunks/grep-KLQ4A2OH.js")).grepCommand},{name:"fgrep",load:async()=>(await import("./chunks/grep-KLQ4A2OH.js")).fgrepCommand},{name:"egrep",load:async()=>(await import("./chunks/grep-KLQ4A2OH.js")).egrepCommand},{name:"rg",load:async()=>(await import("./chunks/rg-RA3U4BVJ.js")).rgCommand},{name:"sed",load:async()=>(await import("./chunks/sed-JJ3WRWYT.js")).sedCommand},{name:"awk",load:async()=>(await import("./chunks/awk2-LA5EZ6UJ.js")).awkCommand2},{name:"sort",load:async()=>(await import("./chunks/sort-BNPU2P3T.js")).sortCommand},{name:"uniq",load:async()=>(await import("./chunks/uniq-ZHYLWEFM.js")).uniqCommand},{name:"comm",load:async()=>(await import("./chunks/comm-47FVEMHB.js")).commCommand},{name:"cut",load:async()=>(await import("./chunks/cut-LQZW2NZP.js")).cutCommand},{name:"paste",load:async()=>(await import("./chunks/paste-Y7CG4TKC.js")).pasteCommand},{name:"tr",load:async()=>(await import("./chunks/tr-TB6CSIUV.js")).trCommand},{name:"rev",load:async()=>(await import("./chunks/rev-UN4ZHPP5.js")).rev},{name:"nl",load:async()=>(await import("./chunks/nl-JSPXHHOM.js")).nl},{name:"fold",load:async()=>(await import("./chunks/fold-6O4H3AW4.js")).fold},{name:"expand",load:async()=>(await import("./chunks/expand-Y7EMR5BJ.js")).expand},{name:"unexpand",load:async()=>(await import("./chunks/unexpand-LDC3OTY4.js")).unexpand},{name:"strings",load:async()=>(await import("./chunks/strings-LG7URPXR.js")).strings},{name:"split",load:async()=>(await import("./chunks/split-SVMZIFGF.js")).split},{name:"column",load:async()=>(await import("./chunks/column-OUJRIWLX.js")).column},{name:"join",load:async()=>(await import("./chunks/join-CFMKSF44.js")).join},{name:"tee",load:async()=>(await import("./chunks/tee-PJ6B6JJF.js")).teeCommand},{name:"find",load:async()=>(await import("./chunks/find-BYG3GTNV.js")).findCommand},{name:"basename",load:async()=>(await import("./chunks/basename-NCIQLNXY.js")).basenameCommand},{name:"dirname",load:async()=>(await import("./chunks/dirname-IVA4YYRE.js")).dirnameCommand},{name:"tree",load:async()=>(await import("./chunks/tree-4XRVONUX.js")).treeCommand},{name:"du",load:async()=>(await import("./chunks/du-H4GJHM4R.js")).duCommand},{name:"env",load:async()=>(await import("./chunks/env-ZCKP6263.js")).envCommand},{name:"printenv",load:async()=>(await import("./chunks/env-ZCKP6263.js")).printenvCommand},{name:"alias",load:async()=>(await import("./chunks/alias-JHV3WNPA.js")).aliasCommand},{name:"unalias",load:async()=>(await import("./chunks/alias-JHV3WNPA.js")).unaliasCommand},{name:"history",load:async()=>(await import("./chunks/history-N2VRLHEO.js")).historyCommand},{name:"xargs",load:async()=>(await import("./chunks/xargs-CB3LOKW5.js")).xargsCommand},{name:"true",load:async()=>(await import("./chunks/true-4UI5ZW75.js")).trueCommand},{name:"false",load:async()=>(await import("./chunks/true-4UI5ZW75.js")).falseCommand},{name:"clear",load:async()=>(await import("./chunks/clear-7SIFUXVD.js")).clearCommand},{name:"yes",load:async()=>(await import("./chunks/yes-2J55KNKF.js")).yesCommand},{name:"bash",load:async()=>(await import("./chunks/bash-CN3UUJ3N.js")).bashCommand},{name:"sh",load:async()=>(await import("./chunks/bash-CN3UUJ3N.js")).shCommand},{name:"jq",load:async()=>(await import("./chunks/jq-BE76GAFF.js")).jqCommand},{name:"base64",load:async()=>(await import("./chunks/base64-DP3BVL7J.js")).base64Command},{name:"diff",load:async()=>(await import("./chunks/diff-7ZYMEVUP.js")).diffCommand},{name:"date",load:async()=>(await import("./chunks/date-MHLQVLQZ.js")).dateCommand},{name:"sleep",load:async()=>(await import("./chunks/sleep-YQMDXMVK.js")).sleepCommand},{name:"timeout",load:async()=>(await import("./chunks/timeout-SXUKTL7R.js")).timeoutCommand},{name:"time",load:async()=>(await import("./chunks/time-IENYNVU4.js")).timeCommand},{name:"seq",load:async()=>(await import("./chunks/seq-SXS6YKWX.js")).seqCommand},{name:"expr",load:async()=>(await import("./chunks/expr-WDFXVU43.js")).exprCommand},{name:"md5sum",load:async()=>(await import("./chunks/md5sum-ZK2D5HMO.js")).md5sumCommand},{name:"sha1sum",load:async()=>(await import("./chunks/sha1sum-BB464H3H.js")).sha1sumCommand},{name:"sha256sum",load:async()=>(await import("./chunks/sha256sum-PPJUHZ6A.js")).sha256sumCommand},{name:"file",load:async()=>(await import("./chunks/file-7WSECN2B.js")).fileCommand},{name:"html-to-markdown",load:async()=>(await import("./chunks/html-to-markdown-ZDG5GHHM.js")).htmlToMarkdownCommand},{name:"help",load:async()=>(await import("./chunks/help-B2UCSYQN.js")).helpCommand},{name:"which",load:async()=>(await import("./chunks/which-EIT2IJGG.js")).whichCommand},{name:"tac",load:async()=>(await import("./chunks/tac-NXGTFB5T.js")).tac},{name:"hostname",load:async()=>(await import("./chunks/hostname-W7U3GOEK.js")).hostname},{name:"whoami",load:async()=>(await import("./chunks/whoami-QZJHAL2R.js")).whoami},{name:"od",load:async()=>(await import("./chunks/od-NUINXLUX.js")).od},{name:"gzip",load:async()=>(await import("./chunks/gzip-BYGAV4XY.js")).gzipCommand},{name:"gunzip",load:async()=>(await import("./chunks/gzip-BYGAV4XY.js")).gunzipCommand},{name:"zcat",load:async()=>(await import("./chunks/gzip-BYGAV4XY.js")).zcatCommand}];(typeof __BROWSER__>"u"||!__BROWSER__)&&(Xe.push({name:"tar",load:async()=>(await import("./chunks/tar-3KCFO6WZ.js")).tarCommand}),Xe.push({name:"yq",load:async()=>(await import("./chunks/yq-JFXSVU6G.js")).yqCommand}),Xe.push({name:"xan",load:async()=>(await import("./chunks/xan-JDD2TEQH.js")).xanCommand}),Xe.push({name:"sqlite3",load:async()=>(await import("./chunks/sqlite3-PZGLI6XB.js")).sqlite3Command}));var Lt=[];(typeof __BROWSER__>"u"||!__BROWSER__)&&(Lt.push({name:"python3",load:async()=>(await import("./chunks/python3-2KEMASKS.js")).python3Command}),Lt.push({name:"python",load:async()=>(await import("./chunks/python3-2KEMASKS.js")).pythonCommand}));var jr=[{name:"curl",load:async()=>(await import("./chunks/curl-3MHMRKXA.js")).curlCommand}],Br=new Map;function Ss(e){return{name:e.name,async execute(t,s){let r=Br.get(e.name);if(r||(r=await e.load(),Br.set(e.name,r)),s.coverage&&(typeof __BROWSER__>"u"||!__BROWSER__)){let{emitFlagCoverage:n}=await import("./chunks/flag-coverage-33IDWH3V.js"),{decodeArgs:i}=await import("./chunks/bytes-JUNATFIO.js");n(s.coverage,e.name,i(t))}return r.execute(t,s)}}}function _i(){return Xe.map(e=>e.name)}function Ci(){return jr.map(e=>e.name)}function Hr(e){return(e?Xe.filter(s=>e.includes(s.name)):Xe).map(Ss)}function Ur(){return jr.map(Ss)}function xi(){return Lt.map(e=>e.name)}function Gr(){return Lt.map(Ss)}function qr(e){return"load"in e&&typeof e.load=="function"}function Ti(e,t){return{name:e,async execute(s,r){let n={...r,env:Pr(r.env)},i=await t(Je(s),n);return typeof i.stdout=="string"?{stdout:C(i.stdout),stderr:C(i.stderr),exitCode:i.exitCode}:i}}}function Zr(e){let t=null;return{name:e.name,async execute(s,r){return t||(t=await e.load()),t.execute(s,r)}}}var Ni=new TextEncoder;function Oi(e){return typeof e=="object"&&e!==null&&typeof e.getReader=="function"}function Di(e,t){if(e instanceof Uint8Array)return e;if(t==="base64")return Uint8Array.from(atob(e),s=>s.charCodeAt(0));if(t==="hex"){let s=new Uint8Array(e.length/2);for(let r=0;r<e.length;r+=2)s[r/2]=parseInt(e.slice(r,r+2),16);return s}if(t==="binary"||t==="latin1"){if(e.length<=65536)return Uint8Array.from(e,n=>n.charCodeAt(0));let r=new Uint8Array(e.length);for(let n=0;n<e.length;n++)r[n]=e.charCodeAt(n);return r}return Ni.encode(e)}function Yr(e){if(e.length===0)return[];if(e.length<=et)return[e];let t=[];for(let s=0;s<e.length;s+=et)t.push(e.subarray(s,Math.min(s+et,e.length)));return t}function st(e,t){let s=Di(e,t);return{chunks:Yr(s),size:s.length}}async function ze(e,t){if(Oi(e)){let s=[],r=0;for await(let n of ps(e))if(n.length<=et)s.push(n),r+=n.length;else for(let i of Yr(n))s.push(i),r+=i.length;return{chunks:s,size:r}}return st(e,t)}function zt(e,t){if(t==="base64")return btoa(_r(Xr(e)));if(t==="hex"){let n="";for(let i of e)for(let o=0;o<i.length;o++)n+=i[o].toString(16).padStart(2,"0");return n}if(t==="binary"||t==="latin1"){if(typeof Buffer<"u")return Buffer.from(Xr(e)).toString(t);let n=65536,i="";for(let o of e)if(o.length<=n)i+=String.fromCharCode(...o);else for(let a=0;a<o.length;a+=n){let l=o.subarray(a,a+n);i+=String.fromCharCode(...l)}return i}let s=new TextDecoder,r="";for(let n of e)n.length>0&&(r+=s.decode(n,{stream:!0}));return r+=s.decode(),r}function Xr(e){let t=0;for(let n of e)t+=n.length;if(t===0)return new Uint8Array(0);if(e.length===1)return e[0];let s=new Uint8Array(t),r=0;for(let n of e)s.set(n,r),r+=n.length;return s}function $e(e){if(e!=null)return typeof e=="string"?e:e.encoding??void 0}function Ii(e){return typeof e=="object"&&e!==null&&!(e instanceof Uint8Array)&&!(e instanceof ReadableStream)&&"content"in e}function ae(e,t){if(e.includes("\0"))throw new Error(`ENOENT: path contains null byte, ${t} '${e}'`)}var We=class{data=new Map;constructor(t){if(this.data.set("/",{type:"directory",mode:493,mtime:new Date}),t)for(let[s,r]of Object.entries(t))if(Ii(r)){if(r.content instanceof ReadableStream)throw new Error("InMemoryFs: streams not supported in InitialFiles; use writeFile() after construction");this.writeFileSync(s,r.content,void 0,{mode:r.mode,mtime:r.mtime})}else{if(r instanceof ReadableStream)throw new Error("InMemoryFs: streams not supported in InitialFiles; use writeFile() after construction");this.writeFileSync(s,r)}}normalizePath(t){if(!t||t==="/")return"/";let s=t.endsWith("/")&&t!=="/"?t.slice(0,-1):t;s.startsWith("/")||(s=`/${s}`);let r=s.split("/").filter(i=>i&&i!=="."),n=[];for(let i of r)i===".."?n.pop():n.push(i);return`/${n.join("/")}`||"/"}dirname(t){let s=this.normalizePath(t);if(s==="/")return"/";let r=s.lastIndexOf("/");return r===0?"/":s.slice(0,r)}ensureParentDirs(t){let s=this.dirname(t);s!=="/"&&(this.data.has(s)||(this.ensureParentDirs(s),this.data.set(s,{type:"directory",mode:493,mtime:new Date})))}writeFileSync(t,s,r,n){ae(t,"write");let i=this.normalizePath(t);this.ensureParentDirs(i);let o=$e(r),{chunks:a,size:l}=st(s,o);this.data.set(i,{type:"file",chunks:a,size:l,mode:n?.mode??420,mtime:n?.mtime??new Date})}async readFile(t){ae(t,"open");let s=this.resolvePathWithSymlinks(t),r=this.data.get(s);if(!r)throw new Error(`ENOENT: no such file or directory, open '${t}'`);if(r.type!=="file")throw new Error(`EISDIR: illegal operation on a directory, read '${t}'`);return he(r.chunks)}async readFileText(t,s){ae(t,"open");let r=this.resolvePathWithSymlinks(t),n=this.data.get(r);if(!n)throw new Error(`ENOENT: no such file or directory, open '${t}'`);if(n.type!=="file")throw new Error(`EISDIR: illegal operation on a directory, read '${t}'`);let i=$e(s);return zt(n.chunks,i)}async writeFile(t,s,r){ae(t,"write");let n=this.normalizePath(t);this.ensureParentDirs(n);let i=$e(r),{chunks:o,size:a}=await ze(s,i);this.data.set(n,{type:"file",chunks:o,size:a,mode:420,mtime:new Date})}async appendFile(t,s,r){ae(t,"append");let n=this.normalizePath(t),i=this.data.get(n);if(i&&i.type==="directory")throw new Error(`EISDIR: illegal operation on a directory, write '${t}'`);let o=$e(r),{chunks:a,size:l}=await ze(s,o);i?.type==="file"?this.data.set(n,{type:"file",chunks:[...i.chunks,...a],size:i.size+l,mode:i.mode,mtime:new Date}):(this.ensureParentDirs(n),this.data.set(n,{type:"file",chunks:a,size:l,mode:420,mtime:new Date}))}async exists(t){if(t.includes("\0"))return!1;try{let s=this.resolvePathWithSymlinks(t);return this.data.has(s)}catch{return!1}}async stat(t){ae(t,"stat");let s=this.resolvePathWithSymlinks(t),r=this.data.get(s);if(!r)throw new Error(`ENOENT: no such file or directory, stat '${t}'`);let n=0;return r.type==="file"&&(n=r.size),{isFile:r.type==="file",isDirectory:r.type==="directory",isSymbolicLink:!1,mode:r.mode,size:n,mtime:r.mtime||new Date}}async lstat(t){ae(t,"lstat");let s=this.resolveIntermediateSymlinks(t),r=this.data.get(s);if(!r)throw new Error(`ENOENT: no such file or directory, lstat '${t}'`);if(r.type==="symlink")return{isFile:!1,isDirectory:!1,isSymbolicLink:!0,mode:r.mode,size:r.target.length,mtime:r.mtime||new Date};let n=0;return r.type==="file"&&(n=r.size),{isFile:r.type==="file",isDirectory:r.type==="directory",isSymbolicLink:!1,mode:r.mode,size:n,mtime:r.mtime||new Date}}resolveSymlink(t,s){if(s.startsWith("/"))return this.normalizePath(s);let r=this.dirname(t);return this.normalizePath(r==="/"?`/${s}`:`${r}/${s}`)}resolveIntermediateSymlinks(t){let s=this.normalizePath(t);if(s==="/")return"/";let r=s.slice(1).split("/");if(r.length<=1)return s;let n="",i=new Set;for(let o=0;o<r.length-1;o++){let a=r[o];n=`${n}/${a}`;let l=this.data.get(n),u=0,c=40;for(;l&&l.type==="symlink"&&u<c;){if(i.has(n))throw new Error(`ELOOP: too many levels of symbolic links, lstat '${t}'`);i.add(n),n=this.resolveSymlink(n,l.target),l=this.data.get(n),u++}if(u>=c)throw new Error(`ELOOP: too many levels of symbolic links, lstat '${t}'`)}return`${n}/${r[r.length-1]}`}resolvePathWithSymlinks(t){let s=this.normalizePath(t);if(s==="/")return"/";let r=s.slice(1).split("/"),n="",i=new Set;for(let o of r){n=`${n}/${o}`;let a=this.data.get(n),l=0,u=40;for(;a&&a.type==="symlink"&&l<u;){if(i.has(n))throw new Error(`ELOOP: too many levels of symbolic links, open '${t}'`);i.add(n),n=this.resolveSymlink(n,a.target),a=this.data.get(n),l++}if(l>=u)throw new Error(`ELOOP: too many levels of symbolic links, open '${t}'`)}return n}async mkdir(t,s){this.mkdirSync(t,s)}mkdirSync(t,s){ae(t,"mkdir");let r=this.normalizePath(t);if(this.data.has(r)){if(this.data.get(r)?.type==="file")throw new Error(`EEXIST: file already exists, mkdir '${t}'`);if(!s?.recursive)throw new Error(`EEXIST: directory already exists, mkdir '${t}'`);return}let n=this.dirname(r);if(n!=="/"&&!this.data.has(n))if(s?.recursive)this.mkdirSync(n,{recursive:!0});else throw new Error(`ENOENT: no such file or directory, mkdir '${t}'`);this.data.set(r,{type:"directory",mode:493,mtime:new Date})}async readdir(t){return(await this.readdirWithFileTypes(t)).map(r=>r.name)}async readdirWithFileTypes(t){ae(t,"scandir");let s=this.normalizePath(t),r=this.data.get(s);if(!r)throw new Error(`ENOENT: no such file or directory, scandir '${t}'`);let n=new Set;for(;r&&r.type==="symlink";){if(n.has(s))throw new Error(`ELOOP: too many levels of symbolic links, scandir '${t}'`);n.add(s),s=this.resolveSymlink(s,r.target),r=this.data.get(s)}if(!r)throw new Error(`ENOENT: no such file or directory, scandir '${t}'`);if(r.type!=="directory")throw new Error(`ENOTDIR: not a directory, scandir '${t}'`);let i=s==="/"?"/":`${s}/`,o=new Map;for(let[a,l]of this.data.entries())if(a!==s&&a.startsWith(i)){let u=a.slice(i.length),c=u.split("/")[0];c&&!u.includes("/",c.length)&&!o.has(c)&&o.set(c,{name:c,isFile:l.type==="file",isDirectory:l.type==="directory",isSymbolicLink:l.type==="symlink"})}return Array.from(o.values()).sort((a,l)=>a.name<l.name?-1:a.name>l.name?1:0)}async rm(t,s){ae(t,"rm");let r=this.normalizePath(t),n=this.data.get(r);if(!n){if(s?.force)return;throw new Error(`ENOENT: no such file or directory, rm '${t}'`)}if(n.type==="directory"){let i=await this.readdir(r);if(i.length>0){if(!s?.recursive)throw new Error(`ENOTEMPTY: directory not empty, rm '${t}'`);for(let o of i){let a=r==="/"?`/${o}`:`${r}/${o}`;await this.rm(a,s)}}}this.data.delete(r)}async cp(t,s,r){ae(t,"cp"),ae(s,"cp");let n=this.normalizePath(t),i=this.normalizePath(s),o=this.data.get(n);if(!o)throw new Error(`ENOENT: no such file or directory, cp '${t}'`);if(o.type==="file")this.ensureParentDirs(i),this.data.set(i,{type:"file",chunks:[...o.chunks],size:o.size,mode:o.mode,mtime:o.mtime});else if(o.type==="directory"){if(!r?.recursive)throw new Error(`EISDIR: is a directory, cp '${t}'`);await this.mkdir(i,{recursive:!0});let a=await this.readdir(n);for(let l of a){let u=n==="/"?`/${l}`:`${n}/${l}`,c=i==="/"?`/${l}`:`${i}/${l}`;await this.cp(u,c,r)}}}async mv(t,s){await this.cp(t,s,{recursive:!0}),await this.rm(t,{recursive:!0})}getAllPaths(){return Array.from(this.data.keys())}resolvePath(t,s){if(s.startsWith("/"))return this.normalizePath(s);let r=t==="/"?`/${s}`:`${t}/${s}`;return this.normalizePath(r)}async chmod(t,s){ae(t,"chmod");let r=this.normalizePath(t),n=this.data.get(r);if(!n)throw new Error(`ENOENT: no such file or directory, chmod '${t}'`);n.mode=s}async symlink(t,s){ae(s,"symlink");let r=this.normalizePath(s);if(this.data.has(r))throw new Error(`EEXIST: file already exists, symlink '${s}'`);this.ensureParentDirs(r),this.data.set(r,{type:"symlink",target:t,mode:511,mtime:new Date})}async link(t,s){ae(t,"link"),ae(s,"link");let r=this.normalizePath(t),n=this.normalizePath(s),i=this.data.get(r);if(!i)throw new Error(`ENOENT: no such file or directory, link '${t}'`);if(i.type!=="file")throw new Error(`EPERM: operation not permitted, link '${t}'`);if(this.data.has(n))throw new Error(`EEXIST: file already exists, link '${s}'`);this.ensureParentDirs(n),this.data.set(n,{type:"file",chunks:[...i.chunks],size:i.size,mode:i.mode,mtime:i.mtime})}async readlink(t){ae(t,"readlink");let s=this.normalizePath(t),r=this.data.get(s);if(!r)throw new Error(`ENOENT: no such file or directory, readlink '${t}'`);if(r.type!=="symlink")throw new Error(`EINVAL: invalid argument, readlink '${t}'`);return r.target}async realpath(t){ae(t,"realpath");let s=this.resolvePathWithSymlinks(t);if(!this.data.has(s))throw new Error(`ENOENT: no such file or directory, realpath '${t}'`);return s}async utimes(t,s,r){ae(t,"utimes");let n=this.normalizePath(t),i=this.resolvePathWithSymlinks(n),o=this.data.get(i);if(!o)throw new Error(`ENOENT: no such file or directory, utimes '${t}'`);o.mtime=r}};function Ri(e){let t=e;return typeof t.mkdirSync=="function"&&typeof t.writeFileSync=="function"}function Mi(e,t){e.mkdirSync("/bin",{recursive:!0}),e.mkdirSync("/usr/bin",{recursive:!0}),t&&(e.mkdirSync("/home/user",{recursive:!0}),e.mkdirSync("/tmp",{recursive:!0}))}function Fi(e){e.mkdirSync("/dev",{recursive:!0}),e.writeFileSync("/dev/null",""),e.writeFileSync("/dev/zero",new Uint8Array(0)),e.writeFileSync("/dev/stdin",""),e.writeFileSync("/dev/stdout",""),e.writeFileSync("/dev/stderr","")}function Li(e){e.mkdirSync("/proc/self/fd",{recursive:!0}),e.writeFileSync("/proc/version",`${Cr}
|
|
2
2
|
`),e.writeFileSync("/proc/self/exe","/bin/bash"),e.writeFileSync("/proc/self/cmdline","bash\0"),e.writeFileSync("/proc/self/comm",`bash
|
|
3
3
|
`),e.writeFileSync("/proc/self/status",xr()),e.writeFileSync("/proc/self/fd/0","/dev/stdin"),e.writeFileSync("/proc/self/fd/1","/dev/stdout"),e.writeFileSync("/proc/self/fd/2","/dev/stderr")}function Kr(e,t){Ri(e)&&(Mi(e,t),Fi(e),Li(e))}var zi=["allexport","errexit","noglob","noclobber","noexec","nounset","pipefail","posix","verbose","xtrace"],Wi=["braceexpand","hashall","interactive-comments"];function $s(e){let t=[],s=[...Wi.map(r=>({name:r,enabled:!0})),...zi.map(r=>({name:r,enabled:e[r]}))].sort((r,n)=>r.name.localeCompare(n.name));for(let r of s)r.enabled&&t.push(r.name);return t.join(":")}function rt(e){g(e.state.env,"SHELLOPTS",$s(e.state.options))}var Vi=["dotglob","expand_aliases","extglob","failglob","globskipdots","globstar","lastpipe","nocaseglob","nocasematch","nullglob","xpg_echo"];function Ps(e){let t=[];for(let s of Vi)e[s]&&t.push(s);return t.join(":")}function As(e){g(e.state.env,"BASHOPTS",Ps(e.state.shoptOptions))}var Bi="BASH_ALIAS_";function Qr(e){return e.parts.length!==1?!1:e.parts[0].type==="Literal"}function Jr(e){if(e.parts.length!==1)return null;let t=e.parts[0];return t.type==="Literal"?t.value:null}function en(e,t){let s=e.env.get(`${Bi}${t}`);return s!==void 0?j(s):void 0}function ks(e,t,s){if(!t.name||!Qr(t.name))return t;let r=Jr(t.name);if(!r)return t;let n=en(e,r);if(!n||s.has(r))return t;try{s.add(r);let i=new q,o=n,a=n.endsWith(" ");if(!a)for(let f of t.args){let h=sn(f);o+=` ${h}`}let l;try{l=i.parse(o)}catch(f){if(f instanceof It)throw f;return t}if(l.statements.length!==1||l.statements[0].pipelines.length!==1||l.statements[0].pipelines[0].commands.length!==1)return tn(t,n);let u=l.statements[0].pipelines[0].commands[0];if(u.type!=="SimpleCommand")return tn(t,n);let c={...u,assignments:[...t.assignments,...u.assignments],redirections:[...u.redirections,...t.redirections],line:t.line};if(a&&t.args.length>0&&(c={...c,args:[...c.args,...t.args]},c.args.length>0)){let f=c.args[0];if(Qr(f)){let h=Jr(f);if(h&&en(e,h)){let d={type:"SimpleCommand",name:f,args:c.args.slice(1),assignments:[],redirections:[]},m=ks(e,d,s);m!==d&&(c={...c,name:m.name,args:[...m.args]})}}}return c}catch(i){throw s.delete(r),i}}function tn(e,t){let s=t;for(let o of e.args){let a=sn(o);s+=` ${a}`}let r=new q,n=r.parseWordFromString("eval",!1,!1),i=r.parseWordFromString(`'${s.replace(/'/g,"'\\''")}'`,!1,!1);return{type:"SimpleCommand",name:n,args:[i],assignments:e.assignments,redirections:e.redirections,line:e.line}}function sn(e){let t="";for(let s of e.parts)switch(s.type){case"Literal":t+=s.value.replace(/([\s"'$`\\*?[\]{}()<>|&;#!])/g,"\\$1");break;case"SingleQuoted":t+=`'${s.value}'`;break;case"DoubleQuoted":t+=`"${s.parts.map(r=>r.type==="Literal"?r.value:`$${r.type}`).join("")}"`;break;case"ParameterExpansion":t+=`\${${s.parameter}}`;break;case"CommandSubstitution":t+="$(...)";break;case"ArithmeticExpansion":t+=`$((${s.expression}))`;break;case"Glob":t+=s.pattern;break;default:break}return t}async function rn(e,t){let s=t.parts.map(c=>c.type==="Literal"?c.value:"\0").join(""),r=s.match(/^([a-zA-Z_][a-zA-Z0-9_]*)=\(/);if(!r||!s.endsWith(")"))return null;let n=r[1],i=[],o=!1,a="",l=!1;for(let c of t.parts)if(c.type==="Literal"){let f=c.value;if(!o){let h=f.indexOf("=(");h!==-1&&(o=!0,f=f.slice(h+2))}if(o){f.endsWith(")")&&(f=f.slice(0,-1));let h=f.split(/(\s+)/);for(let d of h)/^\s+$/.test(d)?(a||l)&&(i.push(a),a="",l=!1):d&&(a+=d)}}else if(o)if(c.type==="BraceExpansion")if(/^\[.+\]=/.test(a))a+=Rt({type:"Word",parts:[c]});else{(a||l)&&(i.push(a),a="",l=!1);let h=await Ie(e,{type:"Word",parts:[c]});i.push(...h.values)}else{(c.type==="SingleQuoted"||c.type==="DoubleQuoted"||c.type==="Escaped")&&(l=!0);let f=await V(e,{type:"Word",parts:[c]});a+=f}(a||l)&&i.push(a);let u=i.map(c=>/^\[.+\]=/.test(c)?c:c===""?"''":/[\s"'\\$`!*?[\]{}|&;<>()]/.test(c)&&!c.startsWith("'")&&!c.startsWith('"')?`'${c.replace(/'/g,"'\\''")}'`:c);return`${n}=(${u.join(" ")})`}async function nn(e,t){let s=-1,r=-1,n=!1;for(let p=0;p<t.parts.length;p++){let v=t.parts[p];if(v.type==="Literal"){let y=v.value.indexOf("+=");if(y!==-1){let A=v.value.slice(0,y);if(/^[a-zA-Z_][a-zA-Z0-9_]*$/.test(A)){s=p,r=y,n=!0;break}if(/^[a-zA-Z_][a-zA-Z0-9_]*\[[^\]]+\]$/.test(A)){s=p,r=y,n=!0;break}}let S=v.value.indexOf("=");if(S!==-1&&(S===0||v.value[S-1]!=="+")){let A=v.value.slice(0,S);if(/^[a-zA-Z_][a-zA-Z0-9_]*$/.test(A)||/^[a-zA-Z_][a-zA-Z0-9_]*\[[^\]]+\]$/.test(A)){s=p,r=S;break}}}}if(s===-1)return null;let i=t.parts.slice(0,s),o=t.parts[s];if(o.type!=="Literal")return null;let a=n?2:1,l=o.value.slice(0,r),u=o.value.slice(r+a),c=t.parts.slice(s+1),f="";for(let p of i)f+=await V(e,{type:"Word",parts:[p]});f+=l;let h={type:"Word",parts:u!==""?[{type:"Literal",value:u},...c]:c},d=h.parts.length>0?await V(e,h):"";return`${f}${n?"+=":"="}${d}`}var ji=["tar","yq","xan","sqlite3","python3","python"];function on(e){return ji.includes(e)}function H(){return{stdout:w(),stderr:w(),exitCode:0}}var nt={get stdout(){return w()},get stderr(){return w()},exitCode:0};function Pe(e=w()){return{stdout:e,stderr:w(),exitCode:0}}function Z(e){return{stdout:C(e),stderr:w(),exitCode:0}}function k(e,t=1){return{stdout:w(),stderr:C(e),exitCode:t}}function R(e,t,s){return{stdout:e instanceof Uint8Array?te(e):e,stderr:t instanceof Uint8Array?te(t):t,exitCode:s}}function se(e){return{stdout:w(),stderr:w(),exitCode:e?0:1}}function Te(e,t,s,r){let n=s===void 0?w():s instanceof Uint8Array?te(s):s,i=r===void 0?void 0:r instanceof Uint8Array?te(r):r;throw new de(e,t,n,i)}function _s(e,t){if(e.state.loopDepth===0){if(e.state.parentHasLoopContext)throw new Ve;return H()}if(t.length>1)throw new X(1,w(),C(`bash: break: too many arguments
|
|
4
4
|
`));let s=1;if(t.length>0){let r=Number.parseInt(t[0],10);if(Number.isNaN(r)||r<1)throw new X(128,w(),C(`bash: break: ${t[0]}: numeric argument required
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { Command } from "../types.js";
|
|
2
2
|
/** All available built-in command names (excludes network commands) */
|
|
3
|
-
export type CommandName = "echo" | "cat" | "printf" | "ls" | "mkdir" | "rmdir" | "touch" | "rm" | "cp" | "mv" | "ln" | "chmod" | "pwd" | "readlink" | "head" | "tail" | "wc" | "stat" | "grep" | "fgrep" | "egrep" | "rg" | "sed" | "awk" | "sort" | "uniq" | "comm" | "cut" | "paste" | "tr" | "rev" | "nl" | "fold" | "expand" | "unexpand" | "strings" | "split" | "column" | "join" | "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" | "tar" | "yq" | "xan" | "sqlite3" | "time" | "whoami";
|
|
3
|
+
export type CommandName = "echo" | "cat" | "printf" | "ls" | "mkdir" | "rmdir" | "touch" | "rm" | "cp" | "mv" | "ln" | "chmod" | "pwd" | "readlink" | "head" | "tail" | "wc" | "stat" | "grep" | "fgrep" | "egrep" | "rg" | "sed" | "awk" | "sort" | "uniq" | "comm" | "cut" | "paste" | "tr" | "rev" | "nl" | "fold" | "expand" | "unexpand" | "strings" | "split" | "column" | "join" | "tee" | "find" | "basename" | "dirname" | "tree" | "du" | "env" | "printenv" | "alias" | "unalias" | "history" | "xargs" | "true" | "false" | "clear" | "yes" | "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" | "tar" | "yq" | "xan" | "sqlite3" | "time" | "whoami";
|
|
4
4
|
/** Network command names (only available when network is configured) */
|
|
5
5
|
export type NetworkCommandName = "curl";
|
|
6
6
|
/** Python command names (only available when python is explicitly enabled) */
|
|
@@ -10,6 +10,11 @@ import type { Command } from "../../types.js";
|
|
|
10
10
|
* Options:
|
|
11
11
|
* -s STRING use STRING to separate numbers (default: newline)
|
|
12
12
|
* -w equalize width by padding with leading zeros
|
|
13
|
+
*
|
|
14
|
+
* Implementation: pull-based stream. We emit ~16 KiB of output per pull
|
|
15
|
+
* so memory stays O(1) regardless of the sequence length, and a downstream
|
|
16
|
+
* consumer that closes early (e.g. `seq 1 1000000000 | head -c 5`) will
|
|
17
|
+
* cancel us after a single chunk.
|
|
13
18
|
*/
|
|
14
19
|
export declare const seqCommand: Command;
|
|
15
20
|
import type { CommandFuzzInfo } from "../fuzz-flags-types.js";
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import type { Command } from "../../types.js";
|
|
2
|
+
/**
|
|
3
|
+
* yes - output a string repeatedly until killed
|
|
4
|
+
*
|
|
5
|
+
* Usage: yes [STRING]
|
|
6
|
+
*
|
|
7
|
+
* Streams the repeated line via a pull-based ReadableStream so memory stays
|
|
8
|
+
* O(1) regardless of how long the consumer reads for. A downstream consumer
|
|
9
|
+
* that closes early (e.g. `yes | head -c 100`) cancels us after a single
|
|
10
|
+
* pull.
|
|
11
|
+
*/
|
|
12
|
+
export declare const yesCommand: Command;
|
|
13
|
+
import type { CommandFuzzInfo } from "../fuzz-flags-types.js";
|
|
14
|
+
export declare const flagsForFuzzing: CommandFuzzInfo;
|
package/package.json
CHANGED
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
import{b as d,e as c}from"./chunk-RAUBS6MJ.js";import{k as b}from"./chunk-463VWH7H.js";var S={name:"seq",async execute(q){let i=b(q),f=`
|
|
3
|
-
`,m=!1,s=[],e=0;for(;e<i.length;){let t=i[e];if(t==="-s"&&e+1<i.length){f=i[e+1],e+=2;continue}if(t==="-w"){m=!0,e++;continue}if(t==="--"){e++;break}if(t.startsWith("-")&&t!=="-"){if(t.startsWith("-s")&&t.length>2){f=t.slice(2),e++;continue}if((t==="-ws"||t==="-sw")&&(m=!0,e+1<i.length)){f=i[e+1],e+=2;continue}}s.push(t),e++}for(;e<i.length;)s.push(i[e]),e++;if(s.length===0)return{stdout:d(),stderr:c(`seq: missing operand
|
|
4
|
-
`),exitCode:1};let l=1,o=1,a;if(s.length===1?a=parseFloat(s[0]):s.length===2?(l=parseFloat(s[0]),a=parseFloat(s[1])):(l=parseFloat(s[0]),o=parseFloat(s[1]),a=parseFloat(s[2])),Number.isNaN(l)||Number.isNaN(o)||Number.isNaN(a)){let t=s.find(n=>Number.isNaN(parseFloat(n)));return{stdout:d(),stderr:c(`seq: invalid floating point argument: '${t}'
|
|
5
|
-
`),exitCode:1}}if(o===0)return{stdout:d(),stderr:c(`seq: invalid Zero increment value: '0'
|
|
6
|
-
`),exitCode:1};let r=[],p=t=>{let n=String(t),u=n.indexOf(".");return u===-1?0:n.length-u-1},g=Math.max(p(l),p(o),p(a)),h=1e5,x=0;if(o>0)for(let t=l;t<=a+1e-10&&!(x++>h);t+=o)r.push(g>0?t.toFixed(g):String(Math.round(t)));else for(let t=l;t>=a-1e-10&&!(x++>h);t+=o)r.push(g>0?t.toFixed(g):String(Math.round(t)));if(m&&r.length>0){let t=Math.max(...r.map(n=>n.replace("-","").length));for(let n=0;n<r.length;n++){let u=r[n].startsWith("-"),F=(u?r[n].slice(1):r[n]).padStart(t,"0");r[n]=u?`-${F}`:F}}let N=r.join(f);return{stdout:c(N?`${N}
|
|
7
|
-
`:""),stderr:d(),exitCode:0}}},y={name:"seq",flags:[{flag:"-s",type:"value",valueHint:"string"},{flag:"-w",type:"boolean"}],needsArgs:!0};export{S as a,y as b};
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
import{d as Ir,e as Mr,f as jr}from"./chunk-ASU2EQWZ.js";import{b as yr}from"./chunk-4W52T6KS.js";import{b as Ar}from"./chunk-23CC4423.js";import{b as $r}from"./chunk-7YOACDUK.js";import"./chunk-23EV7RYO.js";import"./chunk-TACNCKUC.js";import{b as Sr}from"./chunk-EHJW6FCX.js";import{b as hr}from"./chunk-SDTTNNEH.js";import{b as wr}from"./chunk-5KQNIOZS.js";import{b as xr}from"./chunk-Z73LISDU.js";import{b as vr}from"./chunk-5IL5CXJC.js";import{b as kr}from"./chunk-V3N6H3L5.js";import{b as qr}from"./chunk-KAWPUEQM.js";import{b as Cr}from"./chunk-PRQYRYWV.js";import{b as br}from"./chunk-YG67AAKF.js";import{b as nr}from"./chunk-HY6WUGWS.js";import{b as tr}from"./chunk-7J7OY2YE.js";import{b as lr}from"./chunk-HEO6EBJ2.js";import{b as ur}from"./chunk-HT4IVOYZ.js";import{b as pr}from"./chunk-WXI44VNZ.js";import{b as er}from"./chunk-NNVWOCET.js";import{b as dr}from"./chunk-YER5PEKD.js";import{b as cr}from"./chunk-GUZJZK5O.js";import"./chunk-I2N72LXH.js";import{b as rr}from"./chunk-3VDZW42W.js";import{c as or,d as ar}from"./chunk-SZM4GZ4H.js";import{b as sr}from"./chunk-VWJBSJYM.js";import{c as ir,d as gr}from"./chunk-RFIBBYTO.js";import{b as mr}from"./chunk-YGAHXCGB.js";import"./chunk-N7P3SUNH.js";import"./chunk-UYBH3FNE.js";import{b as Fr}from"./chunk-D44C6YVE.js";import{b as zr}from"./chunk-RIV3HSPK.js";import{b as fr}from"./chunk-ECBMSCPX.js";import{b as Q}from"./chunk-QXOUI5BS.js";import{b as R}from"./chunk-44ROJVH3.js";import{b as U}from"./chunk-UAZICDKU.js";import{b as V}from"./chunk-AN2KBMAK.js";import{b as W}from"./chunk-444WPTN5.js";import{c as X,d as Y}from"./chunk-67SBKZZD.js";import{c as Z,d as _}from"./chunk-D34QBGQ3.js";import{b as N}from"./chunk-XB426ZI7.js";import{b as E}from"./chunk-2IOUIOWE.js";import{b as G}from"./chunk-U4LP6WPJ.js";import{b as H}from"./chunk-Q2BKN6MV.js";import{b as J}from"./chunk-AZQ66C5R.js";import{b as K}from"./chunk-6U6CK6V4.js";import{b as L}from"./chunk-IAUA3FL7.js";import{b as O}from"./chunk-ZZPPBMHW.js";import{b as P}from"./chunk-SL4D2YES.js";import{b as j}from"./chunk-GIVPKQT5.js";import{b as y}from"./chunk-LVSKOXVG.js";import{b as A}from"./chunk-X7PEK6W7.js";import{b as $}from"./chunk-MPX22C7Y.js";import{b as S}from"./chunk-4VVLCPRH.js";import{b as T}from"./chunk-B4GXMUCA.js";import{b as B}from"./chunk-RUNWFUUE.js";import{b as D}from"./chunk-JU5KTPFP.js";import{b as h}from"./chunk-IQY3I4OH.js";import{b as w}from"./chunk-66PXNTAV.js";import"./chunk-RZ6FAJ25.js";import{b as x}from"./chunk-DMTOGHTU.js";import{b as v}from"./chunk-RX4PT2U7.js";import{d as k,e as q,f as C}from"./chunk-CE2ILL65.js";import"./chunk-GIFF636B.js";import{b}from"./chunk-4Y3GINAY.js";import"./chunk-BXOX2H2G.js";import{b as I}from"./chunk-EXCMJ23H.js";import{b as M}from"./chunk-FVFLR7NF.js";import{b as n}from"./chunk-XRZNW2KP.js";import{b as t}from"./chunk-NSSLXYEG.js";import{b as l}from"./chunk-HZM5PBQF.js";import{b as u}from"./chunk-CD3NCHIB.js";import{b as p}from"./chunk-QKQUVK53.js";import{b as e}from"./chunk-446TXLPR.js";import{b as d}from"./chunk-OH3VVXF7.js";import{b as c}from"./chunk-QFPJQSDK.js";import"./chunk-RUESYAVK.js";import"./chunk-CAXM2HMK.js";import"./chunk-SE4C7FJY.js";import{b as i}from"./chunk-PZ46XEZ4.js";import{b as g}from"./chunk-PKKBPSVJ.js";import"./chunk-Z72PSRMX.js";import{b as m}from"./chunk-L2KFCEBW.js";import"./chunk-K2K4KPOQ.js";import"./chunk-XILOLP4K.js";import{b as F}from"./chunk-RMG637UR.js";import"./chunk-OBH7XN5N.js";import{b as z}from"./chunk-RAL2LVDX.js";import{b as f}from"./chunk-IPWJZ22H.js";import"./chunk-4VDEBYW7.js";import"./chunk-7VWUKGDV.js";import"./chunk-DFAHK2EQ.js";import"./chunk-RAUBS6MJ.js";import"./chunk-463VWH7H.js";var Er=[i,g,m,F,z,f,n,t,l,u,p,e,d,c,h,w,x,v,k,q,C,b,I,M,j,y,A,$,S,T,B,D,E,G,H,J,K,L,O,P,Q,R,U,V,W,X,Y,Z,_,N,rr,or,ar,sr,ir,gr,mr,Fr,zr,fr,nr,tr,lr,ur,pr,er,dr,cr,hr,wr,xr,vr,kr,qr,Cr,br,Ir,Mr,jr,yr,Ar,$r,Sr];function Tr(){return Er}var Br=new Map;for(let r of Tr())Br.set(r.name,new Set(r.flags.map(o=>o.flag)));function Fa(r,o,Dr){let a=Br.get(o);if(!(!a||a.size===0))for(let s of Dr)a.has(s)&&r.hit(`cmd:flag:${o}:${s}`)}export{Fa as emitFlagCoverage};
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
import{b as d,e as c}from"./chunk-RAUBS6MJ.js";import{k as b}from"./chunk-463VWH7H.js";var S={name:"seq",async execute(q){let i=b(q),f=`
|
|
3
|
-
`,m=!1,s=[],e=0;for(;e<i.length;){let t=i[e];if(t==="-s"&&e+1<i.length){f=i[e+1],e+=2;continue}if(t==="-w"){m=!0,e++;continue}if(t==="--"){e++;break}if(t.startsWith("-")&&t!=="-"){if(t.startsWith("-s")&&t.length>2){f=t.slice(2),e++;continue}if((t==="-ws"||t==="-sw")&&(m=!0,e+1<i.length)){f=i[e+1],e+=2;continue}}s.push(t),e++}for(;e<i.length;)s.push(i[e]),e++;if(s.length===0)return{stdout:d(),stderr:c(`seq: missing operand
|
|
4
|
-
`),exitCode:1};let l=1,o=1,a;if(s.length===1?a=parseFloat(s[0]):s.length===2?(l=parseFloat(s[0]),a=parseFloat(s[1])):(l=parseFloat(s[0]),o=parseFloat(s[1]),a=parseFloat(s[2])),Number.isNaN(l)||Number.isNaN(o)||Number.isNaN(a)){let t=s.find(n=>Number.isNaN(parseFloat(n)));return{stdout:d(),stderr:c(`seq: invalid floating point argument: '${t}'
|
|
5
|
-
`),exitCode:1}}if(o===0)return{stdout:d(),stderr:c(`seq: invalid Zero increment value: '0'
|
|
6
|
-
`),exitCode:1};let r=[],p=t=>{let n=String(t),u=n.indexOf(".");return u===-1?0:n.length-u-1},g=Math.max(p(l),p(o),p(a)),h=1e5,x=0;if(o>0)for(let t=l;t<=a+1e-10&&!(x++>h);t+=o)r.push(g>0?t.toFixed(g):String(Math.round(t)));else for(let t=l;t>=a-1e-10&&!(x++>h);t+=o)r.push(g>0?t.toFixed(g):String(Math.round(t)));if(m&&r.length>0){let t=Math.max(...r.map(n=>n.replace("-","").length));for(let n=0;n<r.length;n++){let u=r[n].startsWith("-"),F=(u?r[n].slice(1):r[n]).padStart(t,"0");r[n]=u?`-${F}`:F}}let N=r.join(f);return{stdout:c(N?`${N}
|
|
7
|
-
`:""),stderr:d(),exitCode:0}}},y={name:"seq",flags:[{flag:"-s",type:"value",valueHint:"string"},{flag:"-w",type:"boolean"}],needsArgs:!0};export{S as a,y as b};
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
import{d as Ir,e as Mr,f as jr}from"./chunk-ASU2EQWZ.js";import{b as yr}from"./chunk-4W52T6KS.js";import{b as Ar}from"./chunk-23CC4423.js";import{b as $r}from"./chunk-7YOACDUK.js";import"./chunk-23EV7RYO.js";import"./chunk-TACNCKUC.js";import{b as Sr}from"./chunk-EHJW6FCX.js";import{b as hr}from"./chunk-SDTTNNEH.js";import{b as wr}from"./chunk-5KQNIOZS.js";import{b as xr}from"./chunk-Z73LISDU.js";import{b as vr}from"./chunk-5IL5CXJC.js";import{b as kr}from"./chunk-V3N6H3L5.js";import{b as qr}from"./chunk-KAWPUEQM.js";import{b as Cr}from"./chunk-PRQYRYWV.js";import{b as br}from"./chunk-YG67AAKF.js";import{b as nr}from"./chunk-HY6WUGWS.js";import{b as tr}from"./chunk-7J7OY2YE.js";import{b as lr}from"./chunk-HEO6EBJ2.js";import{b as ur}from"./chunk-HT4IVOYZ.js";import{b as pr}from"./chunk-WXI44VNZ.js";import{b as er}from"./chunk-NNVWOCET.js";import{b as dr}from"./chunk-YER5PEKD.js";import{b as cr}from"./chunk-GUZJZK5O.js";import"./chunk-I2N72LXH.js";import{b as rr}from"./chunk-3VDZW42W.js";import{c as or,d as ar}from"./chunk-SZM4GZ4H.js";import{b as sr}from"./chunk-VWJBSJYM.js";import{c as ir,d as gr}from"./chunk-RFIBBYTO.js";import{b as mr}from"./chunk-YGAHXCGB.js";import"./chunk-N7P3SUNH.js";import"./chunk-UYBH3FNE.js";import{b as Fr}from"./chunk-D44C6YVE.js";import{b as zr}from"./chunk-RIV3HSPK.js";import{b as fr}from"./chunk-ECBMSCPX.js";import{b as Q}from"./chunk-QXOUI5BS.js";import{b as R}from"./chunk-44ROJVH3.js";import{b as U}from"./chunk-UAZICDKU.js";import{b as V}from"./chunk-AN2KBMAK.js";import{b as W}from"./chunk-444WPTN5.js";import{c as X,d as Y}from"./chunk-67SBKZZD.js";import{c as Z,d as _}from"./chunk-D34QBGQ3.js";import{b as N}from"./chunk-XB426ZI7.js";import{b as E}from"./chunk-2IOUIOWE.js";import{b as G}from"./chunk-U4LP6WPJ.js";import{b as H}from"./chunk-Q2BKN6MV.js";import{b as J}from"./chunk-AZQ66C5R.js";import{b as K}from"./chunk-6U6CK6V4.js";import{b as L}from"./chunk-IAUA3FL7.js";import{b as O}from"./chunk-ZZPPBMHW.js";import{b as P}from"./chunk-SL4D2YES.js";import{b as j}from"./chunk-GIVPKQT5.js";import{b as y}from"./chunk-LVSKOXVG.js";import{b as A}from"./chunk-X7PEK6W7.js";import{b as $}from"./chunk-MPX22C7Y.js";import{b as S}from"./chunk-4VVLCPRH.js";import{b as T}from"./chunk-B4GXMUCA.js";import{b as B}from"./chunk-RUNWFUUE.js";import{b as D}from"./chunk-JU5KTPFP.js";import{b as h}from"./chunk-IQY3I4OH.js";import{b as w}from"./chunk-66PXNTAV.js";import"./chunk-RZ6FAJ25.js";import{b as x}from"./chunk-DMTOGHTU.js";import{b as v}from"./chunk-RX4PT2U7.js";import{d as k,e as q,f as C}from"./chunk-CE2ILL65.js";import"./chunk-GIFF636B.js";import{b}from"./chunk-4Y3GINAY.js";import"./chunk-BXOX2H2G.js";import{b as I}from"./chunk-EXCMJ23H.js";import{b as M}from"./chunk-FVFLR7NF.js";import{b as n}from"./chunk-XRZNW2KP.js";import{b as t}from"./chunk-NSSLXYEG.js";import{b as l}from"./chunk-HZM5PBQF.js";import{b as u}from"./chunk-CD3NCHIB.js";import{b as p}from"./chunk-QKQUVK53.js";import{b as e}from"./chunk-446TXLPR.js";import{b as d}from"./chunk-OH3VVXF7.js";import{b as c}from"./chunk-QFPJQSDK.js";import"./chunk-RUESYAVK.js";import"./chunk-CAXM2HMK.js";import"./chunk-SE4C7FJY.js";import{b as i}from"./chunk-PZ46XEZ4.js";import{b as g}from"./chunk-PKKBPSVJ.js";import"./chunk-Z72PSRMX.js";import{b as m}from"./chunk-L2KFCEBW.js";import"./chunk-K2K4KPOQ.js";import"./chunk-XILOLP4K.js";import{b as F}from"./chunk-RMG637UR.js";import"./chunk-OBH7XN5N.js";import{b as z}from"./chunk-RAL2LVDX.js";import{b as f}from"./chunk-IPWJZ22H.js";import"./chunk-4VDEBYW7.js";import"./chunk-7VWUKGDV.js";import"./chunk-DFAHK2EQ.js";import"./chunk-RAUBS6MJ.js";import"./chunk-463VWH7H.js";var Er=[i,g,m,F,z,f,n,t,l,u,p,e,d,c,h,w,x,v,k,q,C,b,I,M,j,y,A,$,S,T,B,D,E,G,H,J,K,L,O,P,Q,R,U,V,W,X,Y,Z,_,N,rr,or,ar,sr,ir,gr,mr,Fr,zr,fr,nr,tr,lr,ur,pr,er,dr,cr,hr,wr,xr,vr,kr,qr,Cr,br,Ir,Mr,jr,yr,Ar,$r,Sr];function Tr(){return Er}var Br=new Map;for(let r of Tr())Br.set(r.name,new Set(r.flags.map(o=>o.flag)));function Fa(r,o,Dr){let a=Br.get(o);if(!(!a||a.size===0))for(let s of Dr)a.has(s)&&r.hit(`cmd:flag:${o}:${s}`)}export{Fa as emitFlagCoverage};
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import{b as d,e as c}from"./chunk-7USKQKOT.js";import{k as b}from"./chunk-DEQBZDPB.js";var S={name:"seq",async execute(q){let i=b(q),f=`
|
|
2
|
-
`,m=!1,s=[],e=0;for(;e<i.length;){let t=i[e];if(t==="-s"&&e+1<i.length){f=i[e+1],e+=2;continue}if(t==="-w"){m=!0,e++;continue}if(t==="--"){e++;break}if(t.startsWith("-")&&t!=="-"){if(t.startsWith("-s")&&t.length>2){f=t.slice(2),e++;continue}if((t==="-ws"||t==="-sw")&&(m=!0,e+1<i.length)){f=i[e+1],e+=2;continue}}s.push(t),e++}for(;e<i.length;)s.push(i[e]),e++;if(s.length===0)return{stdout:d(),stderr:c(`seq: missing operand
|
|
3
|
-
`),exitCode:1};let l=1,o=1,a;if(s.length===1?a=parseFloat(s[0]):s.length===2?(l=parseFloat(s[0]),a=parseFloat(s[1])):(l=parseFloat(s[0]),o=parseFloat(s[1]),a=parseFloat(s[2])),Number.isNaN(l)||Number.isNaN(o)||Number.isNaN(a)){let t=s.find(n=>Number.isNaN(parseFloat(n)));return{stdout:d(),stderr:c(`seq: invalid floating point argument: '${t}'
|
|
4
|
-
`),exitCode:1}}if(o===0)return{stdout:d(),stderr:c(`seq: invalid Zero increment value: '0'
|
|
5
|
-
`),exitCode:1};let r=[],p=t=>{let n=String(t),u=n.indexOf(".");return u===-1?0:n.length-u-1},g=Math.max(p(l),p(o),p(a)),h=1e5,x=0;if(o>0)for(let t=l;t<=a+1e-10&&!(x++>h);t+=o)r.push(g>0?t.toFixed(g):String(Math.round(t)));else for(let t=l;t>=a-1e-10&&!(x++>h);t+=o)r.push(g>0?t.toFixed(g):String(Math.round(t)));if(m&&r.length>0){let t=Math.max(...r.map(n=>n.replace("-","").length));for(let n=0;n<r.length;n++){let u=r[n].startsWith("-"),F=(u?r[n].slice(1):r[n]).padStart(t,"0");r[n]=u?`-${F}`:F}}let N=r.join(f);return{stdout:c(N?`${N}
|
|
6
|
-
`:""),stderr:d(),exitCode:0}}},y={name:"seq",flags:[{flag:"-s",type:"value",valueHint:"string"},{flag:"-w",type:"boolean"}],needsArgs:!0};export{S as a,y as b};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{d as Ir,e as Mr,f as jr}from"./chunk-M5Z2PSET.js";import{b as yr}from"./chunk-MOCB6GPI.js";import{b as Ar}from"./chunk-BXVXYDEI.js";import{b as $r}from"./chunk-YZPQ2W3A.js";import"./chunk-53I2XH4A.js";import"./chunk-SPETXYUM.js";import{b as Sr}from"./chunk-W4YQKIRV.js";import{b as hr}from"./chunk-BJQMZYH3.js";import{b as wr}from"./chunk-KRXVUD4L.js";import{b as xr}from"./chunk-2WN53CVO.js";import{b as vr}from"./chunk-ZEHOKNGQ.js";import{b as kr}from"./chunk-WMCZEPWH.js";import{b as qr}from"./chunk-PEPBD26Q.js";import{b as Cr}from"./chunk-C44B5265.js";import{b as br}from"./chunk-VKPVP3LD.js";import{b as nr}from"./chunk-IAFRFK2O.js";import{b as tr}from"./chunk-2AMXQD57.js";import{b as lr}from"./chunk-5PIFIDMP.js";import{b as ur}from"./chunk-OYIATQ5V.js";import{b as pr}from"./chunk-ZILSBZZ6.js";import{b as er}from"./chunk-5BF5Z7CI.js";import{b as dr}from"./chunk-YR4NQYT4.js";import{b as cr}from"./chunk-GNXHG75U.js";import"./chunk-K374E7Q4.js";import{b as rr}from"./chunk-5J57FRET.js";import{c as or,d as ar}from"./chunk-SMOO4IXI.js";import{b as sr}from"./chunk-6V537K6X.js";import{c as ir,d as gr}from"./chunk-INJTM5VR.js";import{b as mr}from"./chunk-PLMPLLOW.js";import"./chunk-3ANOKDIL.js";import"./chunk-7MKBHGLS.js";import{b as Fr}from"./chunk-5PV2QBWC.js";import{b as zr}from"./chunk-LBJIRX7Z.js";import{b as fr}from"./chunk-KM46TYGR.js";import{b as Q}from"./chunk-WVUVOYGQ.js";import{b as R}from"./chunk-72YPFG2Z.js";import{b as U}from"./chunk-QOFUETQV.js";import{b as V}from"./chunk-QPHABKP3.js";import{b as W}from"./chunk-ULK572PS.js";import{c as X,d as Y}from"./chunk-ATPJVO6F.js";import{c as Z,d as _}from"./chunk-D4LWWAJ2.js";import{b as N}from"./chunk-DNPCEBCN.js";import{b as E}from"./chunk-U5Z7TJRO.js";import{b as G}from"./chunk-2OIUNVMP.js";import{b as H}from"./chunk-OZ76IUC5.js";import{b as J}from"./chunk-TOK4OQFP.js";import{b as K}from"./chunk-PES2WOIM.js";import{b as L}from"./chunk-C325X4RB.js";import{b as O}from"./chunk-JJ5E4XJI.js";import{b as P}from"./chunk-SF2462OV.js";import{b as j}from"./chunk-XZZ3XIZH.js";import{b as y}from"./chunk-KBCEHRTU.js";import{b as A}from"./chunk-Z6DABRIE.js";import{b as $}from"./chunk-URMOT4S7.js";import{b as S}from"./chunk-RZ4GSKWY.js";import{b as T}from"./chunk-2V4QPJXQ.js";import{b as B}from"./chunk-SJ7F47VW.js";import{b as D}from"./chunk-GMCBEP44.js";import{b as h}from"./chunk-BTTTDUMD.js";import{b as w}from"./chunk-JMFP263D.js";import"./chunk-YJHMB6QD.js";import{b as x}from"./chunk-SYTEZ2Y4.js";import{b as v}from"./chunk-EHY6GWKP.js";import{d as k,e as q,f as C}from"./chunk-GET3OC3O.js";import"./chunk-IJXFPKNC.js";import{b}from"./chunk-NDPSDM3Q.js";import"./chunk-D3IE6KOV.js";import{b as I}from"./chunk-BQFHZOZH.js";import{b as M}from"./chunk-WTT2UCIA.js";import{b as n}from"./chunk-H5X25CTO.js";import{b as t}from"./chunk-F77E6PCM.js";import{b as l}from"./chunk-XZMBEDQL.js";import{b as u}from"./chunk-26VNLF3H.js";import{b as p}from"./chunk-PUUP54QP.js";import{b as e}from"./chunk-4PFDHMBC.js";import{b as d}from"./chunk-USGCTFXK.js";import{b as c}from"./chunk-K7ZRPFN6.js";import"./chunk-MIFIRXNI.js";import"./chunk-UBLR5ACC.js";import"./chunk-YNYSPYQ5.js";import{b as i}from"./chunk-3P5XOPF6.js";import{b as g}from"./chunk-Q5XZ24VX.js";import"./chunk-J7YL5K5B.js";import{b as m}from"./chunk-XXS34VJC.js";import"./chunk-BMKJMOWP.js";import"./chunk-JSLN56GJ.js";import{b as F}from"./chunk-26DNZXYZ.js";import"./chunk-NUFRM6SI.js";import{b as z}from"./chunk-RTGKIAVM.js";import{b as f}from"./chunk-EHRCEDXN.js";import"./chunk-44UOCSGV.js";import"./chunk-GQSJJXDG.js";import"./chunk-PQPG4QOY.js";import"./chunk-7USKQKOT.js";import"./chunk-DEQBZDPB.js";var Er=[i,g,m,F,z,f,n,t,l,u,p,e,d,c,h,w,x,v,k,q,C,b,I,M,j,y,A,$,S,T,B,D,E,G,H,J,K,L,O,P,Q,R,U,V,W,X,Y,Z,_,N,rr,or,ar,sr,ir,gr,mr,Fr,zr,fr,nr,tr,lr,ur,pr,er,dr,cr,hr,wr,xr,vr,kr,qr,Cr,br,Ir,Mr,jr,yr,Ar,$r,Sr];function Tr(){return Er}var Br=new Map;for(let r of Tr())Br.set(r.name,new Set(r.flags.map(o=>o.flag)));function Fa(r,o,Dr){let a=Br.get(o);if(!(!a||a.size===0))for(let s of Dr)a.has(s)&&r.hit(`cmd:flag:${o}:${s}`)}export{Fa as emitFlagCoverage};
|