just-bash 2.12.5 → 2.12.6
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/dist/banned-patterns-test.d.ts +0 -7
- package/dist/bin/chunks/{awk2-4MK3F3NZ.js → awk2-EB5SCHVW.js} +1 -1
- package/dist/bin/{shell/chunks/chunk-ZRRNCS7N.js → chunks/chunk-5MUD3WB2.js} +1 -1
- package/dist/bin/chunks/{chunk-EMSJEY2U.js → chunk-BBRVF6XE.js} +1 -1
- package/dist/bin/chunks/chunk-DHFZMFUW.js +36 -0
- package/dist/bin/{shell/chunks/chunk-5ATRLST6.js → chunks/chunk-IRCLOW32.js} +1 -1
- package/dist/bin/{shell/chunks/chunk-UT6LUTWP.js → chunks/chunk-JX6YLHDX.js} +1 -1
- package/dist/bin/chunks/chunk-NTKUVXEL.js +5 -0
- package/dist/bin/chunks/{chunk-RDGXTKIB.js → chunk-OLN6BSO3.js} +1 -1
- package/dist/bin/chunks/chunk-PIBXJ3VX.js +13 -0
- package/dist/bin/chunks/chunk-PLKGKTIS.js +6 -0
- package/dist/bin/{shell/chunks/chunk-WWVVJW3F.js → chunks/chunk-QTII62YM.js} +1 -1
- package/dist/bin/chunks/{chunk-RS2PRILS.js → chunk-ROMKUVHI.js} +1 -1
- package/dist/bin/chunks/{chunk-2HDH5VPF.js → chunk-VCKKRS7V.js} +1 -1
- package/dist/bin/chunks/chunk-ZJGIBTWD.js +2 -0
- package/dist/bin/{shell/chunks/chunk-6W7JTG6A.js → chunks/chunk-ZNPXCE5B.js} +99 -99
- package/dist/bin/{shell/chunks/curl-GIQ5S66Y.js → chunks/curl-3GMIPMCI.js} +1 -1
- package/dist/bin/{shell/chunks/flag-coverage-NDF6MQAO.js → chunks/flag-coverage-7GOZYXJT.js} +1 -1
- package/dist/bin/{shell/chunks/jq-F7FJ46VM.js → chunks/jq-P457LMHU.js} +1 -1
- package/dist/bin/chunks/{python3-QBGIYRFR.js → python3-45TMCI4M.js} +7 -7
- package/dist/bin/{shell/chunks/sed-ENUQOCBB.js → chunks/sed-UV2LTNVK.js} +1 -1
- package/dist/bin/chunks/sleep-3WHM7JMW.js +2 -0
- package/dist/bin/{shell/chunks/sqlite3-4SBQACEE.js → chunks/sqlite3-B3P3OMPI.js} +1 -1
- package/dist/bin/chunks/tar-SO3XDDIW.js +2 -0
- package/dist/bin/chunks/timeout-BYB3L2JA.js +2 -0
- package/dist/bin/chunks/worker.js +155 -14
- package/dist/bin/chunks/xan-FZB7FHX3.js +2 -0
- package/dist/bin/chunks/yq-H7D2U3HS.js +2 -0
- package/dist/bin/just-bash.js +1 -1
- package/dist/bin/shell/chunks/{awk2-4MK3F3NZ.js → awk2-EB5SCHVW.js} +1 -1
- package/dist/bin/{chunks/chunk-ZRRNCS7N.js → shell/chunks/chunk-5MUD3WB2.js} +1 -1
- package/dist/bin/shell/chunks/{chunk-EMSJEY2U.js → chunk-BBRVF6XE.js} +1 -1
- package/dist/bin/shell/chunks/chunk-DHFZMFUW.js +36 -0
- package/dist/bin/{chunks/chunk-5ATRLST6.js → shell/chunks/chunk-IRCLOW32.js} +1 -1
- package/dist/bin/{chunks/chunk-UT6LUTWP.js → shell/chunks/chunk-JX6YLHDX.js} +1 -1
- package/dist/bin/shell/chunks/chunk-NTKUVXEL.js +5 -0
- package/dist/bin/shell/chunks/{chunk-RDGXTKIB.js → chunk-OLN6BSO3.js} +1 -1
- package/dist/bin/shell/chunks/chunk-PIBXJ3VX.js +13 -0
- package/dist/bin/shell/chunks/chunk-PLKGKTIS.js +6 -0
- package/dist/bin/{chunks/chunk-WWVVJW3F.js → shell/chunks/chunk-QTII62YM.js} +1 -1
- package/dist/bin/shell/chunks/{chunk-RS2PRILS.js → chunk-ROMKUVHI.js} +1 -1
- package/dist/bin/shell/chunks/{chunk-2HDH5VPF.js → chunk-VCKKRS7V.js} +1 -1
- package/dist/bin/shell/chunks/chunk-ZJGIBTWD.js +2 -0
- package/dist/bin/{chunks/chunk-6W7JTG6A.js → shell/chunks/chunk-ZNPXCE5B.js} +99 -99
- package/dist/bin/{chunks/curl-GIQ5S66Y.js → shell/chunks/curl-3GMIPMCI.js} +1 -1
- package/dist/bin/{chunks/flag-coverage-NDF6MQAO.js → shell/chunks/flag-coverage-7GOZYXJT.js} +1 -1
- package/dist/bin/{chunks/jq-F7FJ46VM.js → shell/chunks/jq-P457LMHU.js} +1 -1
- package/dist/bin/shell/chunks/{python3-XN7O5X3A.js → python3-IV3DBMHM.js} +7 -7
- package/dist/bin/{chunks/sed-ENUQOCBB.js → shell/chunks/sed-UV2LTNVK.js} +1 -1
- package/dist/bin/shell/chunks/sleep-3WHM7JMW.js +2 -0
- package/dist/bin/{chunks/sqlite3-4SBQACEE.js → shell/chunks/sqlite3-B3P3OMPI.js} +1 -1
- package/dist/bin/shell/chunks/tar-SO3XDDIW.js +2 -0
- package/dist/bin/shell/chunks/timeout-BYB3L2JA.js +2 -0
- package/dist/bin/shell/chunks/xan-FZB7FHX3.js +2 -0
- package/dist/bin/shell/chunks/yq-H7D2U3HS.js +2 -0
- package/dist/bin/shell/shell.js +1 -1
- package/dist/bundle/browser.js +503 -503
- package/dist/bundle/chunks/{awk2-ID6QVUYU.js → awk2-VPBKDCSO.js} +1 -1
- package/dist/bundle/chunks/{chunk-CBAJ47B3.js → chunk-4YPFHVJJ.js} +1 -1
- package/dist/bundle/chunks/{chunk-3ZBKQKTX.js → chunk-6HBBXB3L.js} +1 -1
- package/dist/bundle/chunks/chunk-72EQZSVH.js +4 -0
- package/dist/bundle/chunks/{chunk-SJ5LXPUH.js → chunk-7YDOWJ75.js} +1 -1
- package/dist/bundle/chunks/chunk-AUD37QB3.js +35 -0
- package/dist/bundle/chunks/{chunk-TVHAURH5.js → chunk-BED5HSP2.js} +1 -1
- package/dist/bundle/chunks/{chunk-3J4BCKUH.js → chunk-C7ZTXK5C.js} +99 -99
- package/dist/bundle/chunks/chunk-DZZS6SJP.js +1 -0
- package/dist/bundle/chunks/chunk-KZ7BI7TV.js +5 -0
- package/dist/bundle/chunks/chunk-U5FWK6IA.js +12 -0
- package/dist/bundle/chunks/{chunk-HOFSUCIB.js → chunk-VBF2GWEM.js} +1 -1
- package/dist/bundle/chunks/{chunk-AYQ5FKKK.js → chunk-VSWTMNI3.js} +1 -1
- package/dist/bundle/chunks/{chunk-L75XCEQX.js → chunk-X36DXRVC.js} +1 -1
- package/dist/bundle/chunks/{chunk-2OZNLYX4.js → chunk-X3CVFNQZ.js} +1 -1
- package/dist/bundle/chunks/{curl-743M564K.js → curl-KM2ZAUR6.js} +1 -1
- package/dist/bundle/chunks/{flag-coverage-4M54QHNZ.js → flag-coverage-NT32EG6Q.js} +1 -1
- package/dist/bundle/chunks/{jq-5FRYP6YP.js → jq-NLRWI2Q6.js} +1 -1
- package/dist/bundle/chunks/{python3-WANWDR22.js → python3-G2ZUJAQL.js} +7 -7
- package/dist/bundle/chunks/{sed-TS7M7I25.js → sed-2BILOGNL.js} +1 -1
- package/dist/bundle/chunks/sleep-IUBP5GMH.js +1 -0
- package/dist/bundle/chunks/{sqlite3-IH5QMEIK.js → sqlite3-VEDNWJL6.js} +1 -1
- package/dist/bundle/chunks/tar-LKO7DKAK.js +1 -0
- package/dist/bundle/chunks/timeout-TL4Q5YKZ.js +1 -0
- package/dist/bundle/chunks/worker.js +155 -14
- package/dist/bundle/chunks/xan-KSDYKKEK.js +1 -0
- package/dist/bundle/chunks/yq-HIQ4WMDY.js +1 -0
- package/dist/bundle/index.cjs +717 -717
- package/dist/bundle/index.js +1 -1
- package/dist/commands/python3/worker.d.ts +1 -0
- package/dist/commands/query-engine/safe-object.d.ts +13 -0
- package/dist/commands/sqlite3/worker.d.ts +1 -0
- package/package.json +34 -34
- package/vendor/cpython-emscripten/python.wasm +0 -0
- package/dist/bin/chunks/chunk-DERQIX2O.js +0 -36
- package/dist/bin/chunks/chunk-LWKIHJ5L.js +0 -13
- package/dist/bin/chunks/chunk-Q5MYEU7X.js +0 -5
- package/dist/bin/chunks/chunk-UYBH3FNE.js +0 -2
- package/dist/bin/chunks/chunk-W752QGNZ.js +0 -6
- package/dist/bin/chunks/sleep-5T34UFNF.js +0 -2
- package/dist/bin/chunks/tar-3UIZ4IRM.js +0 -2
- package/dist/bin/chunks/timeout-7ECKKPNP.js +0 -2
- package/dist/bin/chunks/xan-5QTBTP4U.js +0 -2
- package/dist/bin/chunks/yq-O5RSLLA3.js +0 -2
- package/dist/bin/shell/chunks/chunk-DERQIX2O.js +0 -36
- package/dist/bin/shell/chunks/chunk-LWKIHJ5L.js +0 -13
- package/dist/bin/shell/chunks/chunk-Q5MYEU7X.js +0 -5
- package/dist/bin/shell/chunks/chunk-UYBH3FNE.js +0 -2
- package/dist/bin/shell/chunks/chunk-W752QGNZ.js +0 -6
- package/dist/bin/shell/chunks/sleep-5T34UFNF.js +0 -2
- package/dist/bin/shell/chunks/tar-3UIZ4IRM.js +0 -2
- package/dist/bin/shell/chunks/timeout-7ECKKPNP.js +0 -2
- package/dist/bin/shell/chunks/xan-5QTBTP4U.js +0 -2
- package/dist/bin/shell/chunks/yq-O5RSLLA3.js +0 -2
- package/dist/bundle/chunks/chunk-7MKBHGLS.js +0 -1
- package/dist/bundle/chunks/chunk-C764MECG.js +0 -35
- package/dist/bundle/chunks/chunk-FD7SFJNJ.js +0 -4
- package/dist/bundle/chunks/chunk-QI4EPYAT.js +0 -5
- package/dist/bundle/chunks/chunk-R5XRHEZH.js +0 -12
- package/dist/bundle/chunks/sleep-RRZXXEW2.js +0 -1
- package/dist/bundle/chunks/tar-JCULQ5J2.js +0 -1
- package/dist/bundle/chunks/timeout-DNGO7OHT.js +0 -1
- package/dist/bundle/chunks/xan-LAW2EMOM.js +0 -1
- package/dist/bundle/chunks/yq-MFJEXB7R.js +0 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import{a as oe}from"./chunk-YMMJLYIX.js";import{b as G}from"./chunk-
|
|
2
|
+
import{a as oe}from"./chunk-YMMJLYIX.js";import{b as G}from"./chunk-NTKUVXEL.js";import{a as I}from"./chunk-SE4C7FJY.js";import{a as se,b as ae,c as H}from"./chunk-GTNBSMZR.js";import Ue from"compressjs";var j="file",ue="link",fe="symlink",Z="directory",Be={file:"0",link:"1",symlink:"2","character-device":"3","block-device":"4",directory:"5",fifo:"6","pax-header":"x","pax-global-header":"g","gnu-long-name":"L","gnu-long-link-name":"K"},Ne={0:j,1:ue,2:fe,3:"character-device",4:"block-device",5:Z,6:"fifo",x:"pax-header",g:"pax-global-header",L:"gnu-long-name",K:"gnu-long-link-name"},De=new Uint8Array(512),$=new Uint8Array(0),F=new TextEncoder,de=new TextDecoder;function v(e,t,n,r){r&&F.encodeInto(r,e.subarray(t,t+n))}function z(e,t,n,r){if(r===void 0)return;let i=r.toString(8).padStart(n-1,"0");F.encodeInto(i,e.subarray(t,t+n-1))}function C(e,t,n){let r=e.indexOf(0,t),i=r===-1||r>t+n?t+n:r;return de.decode(e.subarray(t,i))}function q(e,t,n){let r=0,i=t+n;for(let s=t;s<i;s++){let o=e[s];if(o===0)break;o!==32&&(r=r*8+(o-48))}return r}function R(e,t,n){if(e[t]&128){let r=0;r=e[t]&127;for(let i=1;i<n;i++)r=r*256+e[t+i];if(!Number.isSafeInteger(r))throw new Error("TAR number too large");return r}return q(e,t,n)}var b=e=>e.type===Z||e.type===fe||e.type===ue;async function me(e){if(e==null)return $;if(e instanceof Uint8Array)return e;if(typeof e=="string")return F.encode(e);if(e instanceof ArrayBuffer)return new Uint8Array(e);if(e instanceof Blob)return new Uint8Array(await e.arrayBuffer());throw new TypeError("Unsupported content type for entry body.")}function pe(e,t){let{strip:n,filter:r,map:i}=t;if(!n&&!r&&!i)return e;let s={...e};if(n&&n>0){let a=s.name.split("/").filter(Boolean);if(n>=a.length)return null;let c=a.slice(n).join("/");if(s.name=s.type===Z&&!c.endsWith("/")?`${c}/`:c,s.linkname?.startsWith("/")){let l=s.linkname.split("/").filter(Boolean);s.linkname=n>=l.length?"/":`/${l.slice(n).join("/")}`}}if(r?.(s)===!1)return null;let o=i?i(s):s;return o&&(!o.name||!o.name.trim()||o.name==="."||o.name==="/")?null:o}var X=32,Le=48;function Pe(e){let t=q(e,148,8),n=0;for(let r=0;r<e.length;r++)r>=148&&r<156?n+=X:n+=e[r];return t===n}function Ke(e){e.fill(X,148,156);let t=0;for(let n of e)t+=n;for(let n=153;n>=148;n--)e[n]=(t&7)+Le,t>>=3;e[154]=0,e[155]=X}function Ge(e){let t={};e.name.length>100&&he(e.name)===null&&(t.path=e.name),e.linkname&&e.linkname.length>100&&(t.linkpath=e.linkname),e.uname&&e.uname.length>32&&(t.uname=e.uname),e.gname&&e.gname.length>32&&(t.gname=e.gname),e.uid!=null&&e.uid>2097151&&(t.uid=String(e.uid)),e.gid!=null&&e.gid>2097151&&(t.gid=String(e.gid)),e.size!=null&&e.size>8589934591&&(t.size=String(e.size)),e.pax&&Object.assign(t,e.pax);let n=Object.entries(t);if(n.length===0)return null;let r=F.encode(n.map(([i,s])=>{let o=`${i}=${s}
|
|
3
3
|
`,a=F.encode(o).length+1,c=a+String(a).length;return c=a+String(c).length,`${c} ${o}`}).join(""));return{paxHeader:ge({name:de.decode(F.encode(`PaxHeader/${e.name}`).slice(0,100)),size:r.length,type:"pax-header",mode:420,mtime:e.mtime,uname:e.uname,gname:e.gname,uid:e.uid,gid:e.gid}),paxBody:r}}function he(e){if(e.length<=100)return null;let t=e.length-100-1,n=e.lastIndexOf("/",155);return n>0&&n>=t?{prefix:e.slice(0,n),name:e.slice(n+1)}:null}function ge(e){let t=new Uint8Array(512),n=b(e)?0:e.size??0,r=e.name,i="";if(!e.pax?.path){let s=he(r);s&&(r=s.name,i=s.prefix)}return v(t,0,100,r),z(t,100,8,e.mode??(e.type===Z?493:420)),z(t,108,8,e.uid??0),z(t,116,8,e.gid??0),z(t,124,12,n),z(t,136,12,Math.floor((e.mtime?.getTime()??Date.now())/1e3)),v(t,156,1,Be[e.type??j]),v(t,157,100,e.linkname),v(t,257,6,"ustar\0"),v(t,263,2,"00"),v(t,265,32,e.uname),v(t,297,32,e.gname),v(t,345,155,i),Ke(t),t}function He(e,t){if(t&&!Pe(e))throw new Error("Invalid tar header checksum.");let n=C(e,156,1),r={name:C(e,0,100),mode:q(e,100,8),uid:R(e,108,8),gid:R(e,116,8),size:R(e,124,12),mtime:new Date(R(e,136,12)*1e3),type:Ne[n]||j,linkname:C(e,157,100)},i=C(e,257,6);return i.trim()==="ustar"&&(r.uname=C(e,265,32),r.gname=C(e,297,32)),i==="ustar"&&(r.prefix=C(e,345,155)),r}var We={path:["name",e=>e],linkpath:["linkname",e=>e],size:["size",e=>parseInt(e,10)],mtime:["mtime",parseFloat],uid:["uid",e=>parseInt(e,10)],gid:["gid",e=>parseInt(e,10)],uname:["uname",e=>e],gname:["gname",e=>e]};function Xe(e){let t=new TextDecoder("utf-8"),n={},r={},i=0;for(;i<e.length;){let s=e.indexOf(32,i);if(s===-1)break;let o=parseInt(t.decode(e.subarray(i,s)),10);if(Number.isNaN(o)||o===0)break;let a=i+o,[c,l]=t.decode(e.subarray(s+1,a-1)).split("=",2);if(c&&l!==void 0){r[c]=l;let f=We[c];if(f){let[u,g]=f,p=g(l);(typeof p=="string"||!Number.isNaN(p))&&(n[u]=p)}}i=a}return Object.keys(r).length>0&&(n.pax=r),n}function ce(e,t){t.name!==void 0&&(e.name=t.name),t.linkname!==void 0&&(e.linkname=t.linkname),t.size!==void 0&&(e.size=t.size),t.mtime!==void 0&&(e.mtime=new Date(t.mtime*1e3)),t.uid!==void 0&&(e.uid=t.uid),t.gid!==void 0&&(e.gid=t.gid),t.uname!==void 0&&(e.uname=t.uname),t.gname!==void 0&&(e.gname=t.gname),t.pax&&(e.pax=Object.assign({},e.pax??{},t.pax))}function je(e){switch(e){case"pax-global-header":case"pax-header":return Xe;case"gnu-long-name":return t=>({name:C(t,0,t.length)});case"gnu-long-link-name":return t=>({linkname:C(t,0,t.length)});default:return}}function qe(e){let t=ge(e),n=Ge(e);if(!n)return[t];let r=-n.paxBody.length&511,i=r>0?[De.subarray(0,r)]:[];return[n.paxHeader,n.paxBody,...i,t]}var Ye=new Uint8Array(512*2);function Se(e,t,n){let r=null,i=0,s=!1;return{add(o){if(s){let a=new Error("No new tar entries after finalize.");throw t(a),a}if(r!==null){let a=new Error("Previous entry must be completed before adding a new one");throw t(a),a}try{let a=b(o)?0:o.size??0,c=qe({...o,size:a});for(let l of c)e(l);r={...o,size:a},i=0}catch(a){t(a)}},write(o){if(!r){let c=new Error("No active tar entry.");throw t(c),c}if(s){let c=new Error("Cannot write data after finalize.");throw t(c),c}let a=i+o.length;if(a>r.size){let c=new Error(`"${r.name}" exceeds given size of ${r.size} bytes.`);throw t(c),c}try{i=a,e(o)}catch(c){t(c)}},endEntry(){if(!r){let o=new Error("No active entry to end.");throw t(o),o}if(s){let o=new Error("Cannot end entry after finalize.");throw t(o),o}try{if(i!==r.size){let a=new Error(`Size mismatch for "${r.name}".`);throw t(a),a}let o=-r.size&511;o>0&&e(new Uint8Array(o)),r=null,i=0}catch(o){throw t(o),o}},finalize(){if(s){let o=new Error("Archive has already been finalized");throw t(o),o}if(r!==null){let o=new Error("Cannot finalize while an entry is still active");throw t(o),o}try{e(Ye),s=!0,n&&n()}catch(o){t(o)}}}}var O=256;function Ve(){let e=new Array(O),t=e.length-1,n=0,r=0,i=0,s=a=>{let c=e[n];a===c.length?(e[n]=$,n=n+1&t):e[n]=c.subarray(a),i-=a,i===0&&e.length>O&&(e=new Array(O),t=O-1,n=0,r=0)};function o(a,c){if(c){let p=0,d=Math.min(a,i);for(;d>0;){let h=e[n],m=Math.min(d,h.length),E=m===h.length?h:h.subarray(0,m);if(s(m),d-=m,p+=m,!c(E))break}return p}if(i<a)return null;if(a===0)return $;let l=e[n];if(l.length>=a){let p=l.length===a?l:l.subarray(0,a);return s(a),p}let f=new Uint8Array(a),u=0,g=a;for(;g>0;){let p=e[n],d=Math.min(g,p.length);f.set(d===p.length?p:p.subarray(0,d),u),u+=d,g-=d,s(d)}return f}return{push:a=>{if(a.length===0)return;let c=r+1&t;if(c===n){let l=e.length,f=l*2,u=new Array(f),g=r-n+l&l-1;if(n<r)for(let p=0;p<g;p++)u[p]=e[n+p];else if(g>0){let p=l-n;for(let d=0;d<p;d++)u[d]=e[n+d];for(let d=0;d<r;d++)u[p+d]=e[d]}e=u,t=f-1,n=0,r=g,c=r+1&t}e[r]=a,r=c,i+=a.length},available:()=>i,peek:a=>{if(i<a)return null;if(a===0)return $;let c=e[n];if(c.length>=a)return c.length===a?c:c.subarray(0,a);let l=new Uint8Array(a),f=0,u=n;for(;f<a;){let g=e[u],p=Math.min(a-f,g.length);p===g.length?l.set(g,f):l.set(g.subarray(0,p),f),f+=p,u=u+1&t}return l},discard:a=>{if(a>i)throw new Error("Too many bytes consumed");if(a===0)return;let c=a;for(;c>0;){let l=e[n],f=Math.min(c,l.length);s(f),c-=f}},pull:o}}var W=0,k=1,M=new Error("Tar archive is truncated.");function Ee(e={}){let t=e.strict??!1,{available:n,peek:r,push:i,discard:s,pull:o}=Ve(),a=W,c=!1,l=!1,f=!1,u=null,g={},p={},d={isEntryActive:()=>a===k,isBodyComplete:()=>!u||u.remaining===0,write(h){if(c)throw new Error("Archive already ended.");i(h)},end(){c=!0},readHeader(){if(a!==W)throw new Error("Cannot read header while an entry is active");if(!l)for(;!l;){if(n()<512){if(c){if(n()>0&&t)throw M;l=!0;return}return null}let h=r(512);if(le(h)){if(n()<512*2){if(c){if(t)throw M;l=!0;return}return null}if(le(r(512*2).subarray(512))){s(512*2),l=!0,f=!0;return}if(t)throw new Error("Invalid tar header.");s(512);continue}let m;try{m=He(h,t)}catch(A){if(t)throw A;s(512);continue}let E=je(m.type);if(E){let A=m.size+511&-512;if(n()<512+A){if(c&&t)throw M;return null}s(512);let w=E(o(A).subarray(0,m.size)),_=m.type==="pax-global-header"?g:p;for(let T in w)_[T]=w[T];continue}s(512);let S=m;return m.prefix&&(S.name=`${m.prefix}/${S.name}`),ce(S,g),ce(S,p),p={},u={header:S,remaining:S.size,padding:-S.size&511},a=k,S}},streamBody(h){if(a!==k||!u||u.remaining===0)return 0;let m=Math.min(u.remaining,n());if(m===0)return 0;let E=o(m,h);return u.remaining-=E,E},skipPadding(){if(a!==k||!u)return!0;if(u.remaining>0)throw new Error("Body not fully consumed");return n()<u.padding?!1:(s(u.padding),u=null,a=W,!0)},skipEntry(){if(a!==k||!u)return!0;let h=Math.min(u.remaining,n());return h>0&&(s(h),u.remaining-=h),u.remaining>0?!1:d.skipPadding()},validateEOF(){if(t){if(!f)throw M;if(n()>0&&o(n()).some(h=>h!==0))throw new Error("Invalid EOF.")}}};return d}function le(e){if(e.byteOffset%8===0){let t=new BigUint64Array(e.buffer,e.byteOffset,e.length/8);for(let n=0;n<t.length;n++)if(t[n]!==0n)return!1;return!0}for(let t=0;t<e.length;t++)if(e[t]!==0)return!1;return!0}function we(){return new CompressionStream("gzip")}function Ae(){return new DecompressionStream("gzip")}function Je(){let e,t;return{readable:new ReadableStream({start(n){e=n,t=Se(n.enqueue.bind(n),n.error.bind(n),n.close.bind(n))}}),controller:{add(n){let r=b(n),i={...n};return r&&(i.size=0),t.add(i),r&&t.endEntry(),new WritableStream({write(s){t.write(s)},close(){r||t.endEntry()},abort(s){e.error(s)}})},finalize(){t.finalize()},error(n){e.error(n)}}}}async function _e(e){let t=[],n=e.getReader(),r=0;try{for(;;){let{done:o,value:a}=await n.read();if(o)break;t.push(a),r+=a.length}let i=new Uint8Array(r),s=0;for(let o of t)i.set(o,s),s+=o.length;return i}finally{n.releaseLock()}}var ye=e=>e.pipeTo(new WritableStream);function Qe(e={}){let t=Ee(e),n=null,r=!1,i=s=>{if(!r){r=!0;try{for(;;)if(t.isEntryActive()){if(n){if(t.streamBody(o=>(n.enqueue(o),!0))===0&&!t.isBodyComplete())break}else if(!t.skipEntry())break;if(t.isBodyComplete()){try{n?.close()}catch{}if(n=null,!t.skipPadding())break}}else{let o=t.readHeader();if(o==null)break;s.enqueue({header:o,body:new ReadableStream({start(a){o.size===0?a.close():n=a},pull:()=>i(s),cancel(){n=null,i(s)}})})}}catch(o){try{n?.error(o)}catch{}throw n=null,o}finally{r=!1}}};return new TransformStream({transform(s,o){try{t.write(s),i(o)}catch(a){try{n?.error(a)}catch{}throw a}},flush(s){try{if(t.end(),i(s),t.validateEOF(),t.isEntryActive()&&!t.isBodyComplete())try{n?.close()}catch{}}catch(o){try{n?.error(o)}catch{}throw o}}},void 0,{highWaterMark:1})}async function Te(e){let{readable:t,controller:n}=Je();return await(async()=>{for(let r of e){let i=n.add(r.header),s="body"in r?r.body:r.data;if(!s){await i.close();continue}if(s instanceof ReadableStream)await s.pipeTo(i);else if(s instanceof Blob)await s.stream().pipeTo(i);else try{let o=await me(s);if(o.length>0){let a=i.getWriter();await a.write(o),await a.close()}else await i.close()}catch{throw new TypeError(`Unsupported content type for entry "${r.header.name}".`)}}})().then(()=>n.finalize()).catch(r=>n.error(r)),new Uint8Array(await _e(t))}async function Ce(e,t={}){let n=e instanceof ReadableStream?e:new ReadableStream({start(s){s.enqueue(e instanceof Uint8Array?e:new Uint8Array(e)),s.close()}}),r=[],i=n.pipeThrough(Qe(t));for await(let s of i){let o;try{o=pe(s.header,t)}catch(a){throw await s.body.cancel(),a}if(o===null){await ye(s.body);continue}b(o)?(await ye(s.body),r.push({header:o})):r.push({header:o,data:await _e(s.body)})}return r}var B=null,N=null;async function Ie(){if(B)return B;if(N)throw N;try{return B=await G.runTrustedAsync(()=>import("node-liblzma")),B}catch{throw N=new Error("xz compression requires node-liblzma which failed to load. Install liblzma-dev (apt) or xz (brew) and reinstall dependencies."),N}}var D=null,L=null;async function Fe(){if(D)return D;if(L)throw L;try{return D=await G.runTrustedAsync(()=>import("@mongodb-js/zstd")),D}catch{throw L=new Error("zstd compression requires @mongodb-js/zstd which is not installed. Install it with: npm install @mongodb-js/zstd"),L}}var y=100*1024*1024,xe=512,ve=1e4;function et(e){let t="file";e.isDirectory?t="directory":e.isSymlink&&(t="symlink");let n=e.name;e.isDirectory&&!n.endsWith("/")&&(n+="/");let r;e.content!==void 0&&(typeof e.content=="string"?r=new TextEncoder().encode(e.content):r=e.content);let i=e.isDirectory||e.isSymlink?0:r?.length??0;return{header:{name:n,mode:e.mode??(e.isDirectory?493:420),uid:e.uid??0,gid:e.gid??0,size:i,mtime:e.mtime??new Date,type:t,linkname:e.linkTarget??"",uname:"user",gname:"user"},body:r}}async function U(e){let t=e.map(et);return Te(t)}async function ze(e){let t=await U(e),i=new ReadableStream({start(l){l.enqueue(t),l.close()}}).pipeThrough(we()).getReader(),s=[];for(;;){let{done:l,value:f}=await i.read();if(l)break;s.push(f)}let o=s.reduce((l,f)=>l+f.length,0),a=new Uint8Array(o),c=0;for(let l of s)a.set(l,c),c+=l.length;return a}async function x(e){if(e.length>y)return{entries:[],error:`Archive too large (max ${y} bytes)`};if(e.length<xe||e.length%xe!==0)return{entries:[],error:"Invalid tar archive format"};try{let t=await Ce(e),n=[];for(let r of t){if(n.length>=ve)return{entries:n,error:`Too many entries (max ${ve})`};let i="file";switch(r.header.type){case"directory":i="directory";break;case"symlink":i="symlink";break;case"link":i="hardlink";break;case"file":i="file";break;default:i="other"}n.push({name:r.header.name,mode:r.header.mode??420,uid:r.header.uid??0,gid:r.header.gid??0,size:r.header.size,mtime:r.header.mtime??new Date,type:i,linkTarget:r.header.linkname||void 0,content:r.data??new Uint8Array(0)})}return{entries:n}}catch(t){let n=t instanceof Error?t.message:"Unknown error";return{entries:[],error:n}}}async function Y(e){if(e.length>y)return{entries:[],error:`Archive too large (max ${y} bytes)`};try{let r=new ReadableStream({start(c){c.enqueue(e),c.close()}}).pipeThrough(Ae()).getReader(),i=[],s=0;for(;;){let{done:c,value:l}=await r.read();if(c)break;if(s+=l.length,s>y)return await r.cancel(),{entries:[],error:`Decompressed archive too large (max ${y} bytes)`};i.push(l)}let o=new Uint8Array(s),a=0;for(let c of i)o.set(c,a),a+=c.length;return x(o)}catch(t){let n=t instanceof Error?t.message:"Unknown error";return{entries:[],error:`Decompression failed: ${n}`}}}function V(e){return e.length>=2&&e[0]===31&&e[1]===139}function J(e){return e.length>=3&&e[0]===66&&e[1]===90&&e[2]===104}function Q(e){return e.length>=6&&e[0]===253&&e[1]===55&&e[2]===122&&e[3]===88&&e[4]===90&&e[5]===0}async function tt(e){let n=Ue.Bzip2.decompressFile(Array.from(e));return new Uint8Array(n)}async function rt(e){let t=Ue.Bzip2,n=[];return t.compressFile(Array.from(e),n,9),new Uint8Array(n)}async function nt(e){let n=(await Ie()).unxzSync(Buffer.from(e));return new Uint8Array(n)}async function it(e){let n=(await Ie()).xzSync(Buffer.from(e));return new Uint8Array(n)}async function ke(e){let t=await U(e);return rt(t)}async function be(e,t){if(!t?.allowNativeCodecs)throw new Error("xz compression is disabled by default (native codec risk). Pass { allowNativeCodecs: true } to opt in.");let n=await U(e);return it(n)}async function ee(e){if(e.length>y)return{entries:[],error:`Archive too large (max ${y} bytes)`};try{let t=await tt(e);return t.length>y?{entries:[],error:`Decompressed archive too large (max ${y} bytes)`}:x(t)}catch(t){let n=t instanceof Error?t.message:"Unknown error";return{entries:[],error:n}}}async function te(e,t){if(!t?.allowNativeCodecs)return{entries:[],error:"xz decompression is disabled by default (native codec risk). Pass { allowNativeCodecs: true } to opt in, or decompress the archive externally before extraction."};if(e.length>y)return{entries:[],error:`Archive too large (max ${y} bytes)`};try{let n=await nt(e);return n.length>y?{entries:[],error:`Decompressed archive too large (max ${y} bytes)`}:x(n)}catch(n){let r=n instanceof Error?n.message:"Unknown error";return{entries:[],error:r}}}function re(e){return e.length>=4&&e[0]===40&&e[1]===181&&e[2]===47&&e[3]===253}async function st(e){let n=await(await Fe()).compress(Buffer.from(e),3);return new Uint8Array(n)}async function at(e){let n=await(await Fe()).decompress(Buffer.from(e));return new Uint8Array(n)}async function Re(e,t){if(!t?.allowNativeCodecs)throw new Error("zstd compression is disabled by default (native codec risk). Pass { allowNativeCodecs: true } to opt in.");let n=await U(e);return st(n)}async function ne(e,t){if(!t?.allowNativeCodecs)return{entries:[],error:"zstd decompression is disabled by default (native codec risk). Pass { allowNativeCodecs: true } to opt in, or decompress the archive externally before extraction."};if(e.length>y)return{entries:[],error:`Archive too large (max ${y} bytes)`};try{let n=await at(e);return n.length>y?{entries:[],error:`Decompressed archive too large (max ${y} bytes)`}:x(n)}catch(n){let r=n instanceof Error?n.message:"Unknown error";return{entries:[],error:r}}}function Oe(e){let t={create:!1,append:!1,update:!1,extract:!1,list:!1,file:"",autoCompress:!1,gzip:!1,bzip2:!1,xz:!1,zstd:!1,verbose:!1,toStdout:!1,keepOldFiles:!1,touch:!1,directory:"",preserve:!1,absoluteNames:!1,strip:0,exclude:[],filesFrom:"",excludeFrom:"",wildcards:!1},n=[],r=0;for(;r<e.length;){let i=e[r];if(i.startsWith("-")&&!i.startsWith("--")&&i.length>2){if(/^-\d+$/.test(i)){n.push(i),r++;continue}for(let s=1;s<i.length;s++){let o=i[s];switch(o){case"c":t.create=!0;break;case"r":t.append=!0;break;case"u":t.update=!0;break;case"x":t.extract=!0;break;case"t":t.list=!0;break;case"a":t.autoCompress=!0;break;case"z":t.gzip=!0;break;case"j":t.bzip2=!0;break;case"J":t.xz=!0;break;case"v":t.verbose=!0;break;case"O":t.toStdout=!0;break;case"k":t.keepOldFiles=!0;break;case"m":t.touch=!0;break;case"p":t.preserve=!0;break;case"P":t.absoluteNames=!0;break;case"f":if(s<i.length-1)t.file=i.substring(s+1),s=i.length;else{if(r++,r>=e.length)return{ok:!1,error:{stdout:"",stderr:`tar: option requires an argument -- 'f'
|
|
4
4
|
`,exitCode:2}};t.file=e[r]}break;case"C":if(s<i.length-1)t.directory=i.substring(s+1),s=i.length;else{if(r++,r>=e.length)return{ok:!1,error:{stdout:"",stderr:`tar: option requires an argument -- 'C'
|
|
5
5
|
`,exitCode:2}};t.directory=e[r]}break;case"T":if(s<i.length-1)t.filesFrom=i.substring(s+1),s=i.length;else{if(r++,r>=e.length)return{ok:!1,error:{stdout:"",stderr:`tar: option requires an argument -- 'T'
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import{a as d}from"./chunk-YTIURC67.js";import{a as n,b as i}from"./chunk-
|
|
2
|
+
import{a as d}from"./chunk-YTIURC67.js";import{a as n,b as i}from"./chunk-JX6YLHDX.js";import{a,b as l}from"./chunk-GTNBSMZR.js";var u={name:"sleep",summary:"delay for a specified amount of time",usage:"sleep NUMBER[SUFFIX]",description:`Pause for NUMBER seconds. SUFFIX may be:
|
|
3
3
|
s - seconds (default)
|
|
4
4
|
m - minutes
|
|
5
5
|
h - hours
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import{a as x}from"./chunk-YTIURC67.js";import{a as O}from"./chunk-4OALHZXB.js";import{a as c,b as p}from"./chunk-
|
|
2
|
+
import{a as x}from"./chunk-YTIURC67.js";import{a as O}from"./chunk-4OALHZXB.js";import{a as c,b as p}from"./chunk-JX6YLHDX.js";import{a as h,b as A,c as l}from"./chunk-GTNBSMZR.js";var y={name:"timeout",summary:"run a command with a time limit",usage:"timeout [OPTION] DURATION COMMAND [ARG]...",description:`Start COMMAND, and kill it if still running after DURATION.
|
|
3
3
|
|
|
4
4
|
DURATION is a number with optional suffix:
|
|
5
5
|
s - seconds (default)
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
var i=new Set(["__proto__","constructor","prototype"]),p=new Set([...i,"__defineGetter__","__defineSetter__","__lookupGetter__","__lookupSetter__","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"]);function a(e,n){if(Array.isArray(e))throw new TypeError(`${n}: expected object, got array`);if(Object.getPrototypeOf(e)!==null)throw new TypeError(`${n}: expected null-prototype object, got prototypal object`)}function u(e){return!i.has(e)}function l(e,n,o){a(e,"safeSet"),u(n)&&(e[n]=o)}function y(e,n){return a(e,"safeHasOwn"),Object.hasOwn(e,n)}function O(e){let n=new WeakMap,o=t=>{if(t===null||typeof t!="object"||t instanceof Date)return t;let f=n.get(t);if(f!==void 0)return f;if(Array.isArray(t)){let r=[];n.set(t,r);for(let c of t)r.push(o(c));return r}let s=Object.create(null);n.set(t,s);for(let r of Object.keys(t))s[r]=o(t[r]);return s};return o(e)}function _(e){return e!==null&&typeof e=="object"&&!Array.isArray(e)?e:null}function S(e){return Object.assign(Object.create(null),e)}function d(...e){return Object.assign(Object.create(null),...e)}export{u as a,l as b,y as c,O as d,_ as e,S as f,d as g};
|