just-bash 2.13.1 → 2.14.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (110) hide show
  1. package/README.md +2 -0
  2. package/dist/AGENTS.md +2 -0
  3. package/dist/bin/chunks/{chunk-TKTKRRAL.js → chunk-3KAVXQP4.js} +1 -1
  4. package/dist/bin/chunks/{chunk-OQV5J23L.js → chunk-7G3MC56B.js} +1 -1
  5. package/dist/bin/chunks/{chunk-YX7OOTPO.js → chunk-AZ3RUDR2.js} +1 -1
  6. package/dist/bin/chunks/{chunk-UPUMZYZE.js → chunk-CM4532DS.js} +18 -18
  7. package/dist/bin/{shell/chunks/chunk-R2LDP472.js → chunks/chunk-EPPBDXOG.js} +1 -1
  8. package/dist/bin/{shell/chunks/chunk-LGF54XJQ.js → chunks/chunk-L2JBII6Z.js} +1 -1
  9. package/dist/bin/{shell/chunks/chunk-SYL34GE7.js → chunks/chunk-NAX7MTAR.js} +1 -1
  10. package/dist/bin/chunks/{chunk-EZS766DD.js → chunk-NLBRLRWD.js} +1 -1
  11. package/dist/bin/chunks/chunk-RLNOQILG.js +2 -0
  12. package/dist/bin/chunks/{chunk-VVFGRIJZ.js → chunk-RMQC3GS7.js} +1 -1
  13. package/dist/bin/{shell/chunks/chunk-GR23MPTT.js → chunks/chunk-VHUYNUT7.js} +1 -1
  14. package/dist/bin/chunks/chunk-VRUXUVWB.js +63 -0
  15. package/dist/bin/{shell/chunks/chunk-FBJJY4ZV.js → chunks/chunk-WXMBDX4P.js} +1 -1
  16. package/dist/bin/chunks/expr-4CJYC4LY.js +2 -0
  17. package/dist/bin/{shell/chunks/flag-coverage-A4G6STMS.js → chunks/flag-coverage-NSXW5TJP.js} +1 -1
  18. package/dist/bin/{shell/chunks/jq-V7FYGIKO.js → chunks/jq-FIV5Q5T4.js} +1 -1
  19. package/dist/bin/chunks/{js-exec-JORCTVUT.js → js-exec-BDQGEAU6.js} +8 -8
  20. package/dist/bin/chunks/{ln-VAOSD4HK.js → ln-EGC4HRXZ.js} +1 -1
  21. package/dist/bin/chunks/{mkdir-CH7JGW4N.js → mkdir-Z47OISSR.js} +1 -1
  22. package/dist/bin/chunks/python3-VCIXXAXF.js +12 -0
  23. package/dist/bin/chunks/{rm-GWYJO4W7.js → rm-L3NZOLLG.js} +1 -1
  24. package/dist/bin/chunks/{sed-3C6IBX5L.js → sed-HALRQZKY.js} +1 -1
  25. package/dist/bin/chunks/{sqlite3-TZEE4O7U.js → sqlite3-CVNFMP3Z.js} +1 -1
  26. package/dist/bin/{shell/chunks/tar-TOWX2TDU.js → chunks/tar-DNUNEW4Z.js} +1 -1
  27. package/dist/bin/chunks/time-5R4QWCYF.js +2 -0
  28. package/dist/bin/{shell/chunks/tr-LZF57GYP.js → chunks/tr-4FPGAEVB.js} +1 -1
  29. package/dist/bin/chunks/worker.js +19 -7
  30. package/dist/bin/chunks/{yq-JJLSDDST.js → yq-Q47JUWL6.js} +1 -1
  31. package/dist/bin/just-bash.js +62 -62
  32. package/dist/bin/shell/chunks/{chunk-TKTKRRAL.js → chunk-3KAVXQP4.js} +1 -1
  33. package/dist/bin/shell/chunks/{chunk-OQV5J23L.js → chunk-7G3MC56B.js} +1 -1
  34. package/dist/bin/shell/chunks/{chunk-YX7OOTPO.js → chunk-AZ3RUDR2.js} +1 -1
  35. package/dist/bin/shell/chunks/{chunk-UPUMZYZE.js → chunk-CM4532DS.js} +18 -18
  36. package/dist/bin/{chunks/chunk-R2LDP472.js → shell/chunks/chunk-EPPBDXOG.js} +1 -1
  37. package/dist/bin/{chunks/chunk-LGF54XJQ.js → shell/chunks/chunk-L2JBII6Z.js} +1 -1
  38. package/dist/bin/{chunks/chunk-SYL34GE7.js → shell/chunks/chunk-NAX7MTAR.js} +1 -1
  39. package/dist/bin/shell/chunks/{chunk-EZS766DD.js → chunk-NLBRLRWD.js} +1 -1
  40. package/dist/bin/shell/chunks/chunk-RLNOQILG.js +2 -0
  41. package/dist/bin/shell/chunks/{chunk-VVFGRIJZ.js → chunk-RMQC3GS7.js} +1 -1
  42. package/dist/bin/{chunks/chunk-GR23MPTT.js → shell/chunks/chunk-VHUYNUT7.js} +1 -1
  43. package/dist/bin/shell/chunks/chunk-VRUXUVWB.js +63 -0
  44. package/dist/bin/{chunks/chunk-FBJJY4ZV.js → shell/chunks/chunk-WXMBDX4P.js} +1 -1
  45. package/dist/bin/shell/chunks/expr-4CJYC4LY.js +2 -0
  46. package/dist/bin/{chunks/flag-coverage-A4G6STMS.js → shell/chunks/flag-coverage-NSXW5TJP.js} +1 -1
  47. package/dist/bin/{chunks/jq-V7FYGIKO.js → shell/chunks/jq-FIV5Q5T4.js} +1 -1
  48. package/dist/bin/shell/chunks/{js-exec-B6QNYHUL.js → js-exec-HPXZV7UJ.js} +8 -8
  49. package/dist/bin/shell/chunks/{ln-VAOSD4HK.js → ln-EGC4HRXZ.js} +1 -1
  50. package/dist/bin/shell/chunks/{mkdir-CH7JGW4N.js → mkdir-Z47OISSR.js} +1 -1
  51. package/dist/bin/shell/chunks/python3-KFZH67GD.js +12 -0
  52. package/dist/bin/shell/chunks/{rm-GWYJO4W7.js → rm-L3NZOLLG.js} +1 -1
  53. package/dist/bin/shell/chunks/{sed-3C6IBX5L.js → sed-HALRQZKY.js} +1 -1
  54. package/dist/bin/shell/chunks/{sqlite3-TZEE4O7U.js → sqlite3-CVNFMP3Z.js} +1 -1
  55. package/dist/bin/{chunks/tar-TOWX2TDU.js → shell/chunks/tar-DNUNEW4Z.js} +1 -1
  56. package/dist/bin/shell/chunks/time-5R4QWCYF.js +2 -0
  57. package/dist/bin/{chunks/tr-LZF57GYP.js → shell/chunks/tr-4FPGAEVB.js} +1 -1
  58. package/dist/bin/shell/chunks/{yq-JJLSDDST.js → yq-Q47JUWL6.js} +1 -1
  59. package/dist/bin/shell/shell.js +62 -62
  60. package/dist/bundle/browser.js +247 -247
  61. package/dist/bundle/chunks/chunk-3THT3N7L.js +1 -0
  62. package/dist/bundle/chunks/{chunk-XXZ46GOX.js → chunk-62RKD26F.js} +1 -1
  63. package/dist/bundle/chunks/chunk-BRGMQKJV.js +62 -0
  64. package/dist/bundle/chunks/{chunk-IUWCBQII.js → chunk-HWBSOZZR.js} +18 -18
  65. package/dist/bundle/chunks/{chunk-64CW2LGZ.js → chunk-MDDMCKUK.js} +1 -1
  66. package/dist/bundle/chunks/{chunk-IP7G3BNA.js → chunk-MIZPJHVH.js} +1 -1
  67. package/dist/bundle/chunks/{chunk-V3IEYMEA.js → chunk-OL3S66CO.js} +1 -1
  68. package/dist/bundle/chunks/{chunk-FGALERPA.js → chunk-PBXLG62G.js} +1 -1
  69. package/dist/bundle/chunks/{chunk-H2WXJGD7.js → chunk-S4EYC6T6.js} +1 -1
  70. package/dist/bundle/chunks/{chunk-O2DBFL6Z.js → chunk-XORM457F.js} +1 -1
  71. package/dist/bundle/chunks/{chunk-RUF7WQ7U.js → chunk-YCFVLTST.js} +1 -1
  72. package/dist/bundle/chunks/{chunk-RVT3MU3A.js → chunk-YFG2CMIF.js} +1 -1
  73. package/dist/bundle/chunks/{chunk-F5CMUULS.js → chunk-Z6LRHWXI.js} +1 -1
  74. package/dist/bundle/chunks/expr-5T3UU5KE.js +1 -0
  75. package/dist/bundle/chunks/{flag-coverage-G2R7PMYU.js → flag-coverage-QT4N2Z44.js} +1 -1
  76. package/dist/bundle/chunks/{jq-DIRZBOTX.js → jq-ODXZBPLY.js} +1 -1
  77. package/dist/bundle/chunks/{js-exec-YJSMH5AG.js → js-exec-4CW5N6RM.js} +8 -8
  78. package/dist/bundle/chunks/{ln-UJ6YJVBK.js → ln-4TRFBYAT.js} +1 -1
  79. package/dist/bundle/chunks/{mkdir-F6XHPXZC.js → mkdir-TDEMSB6C.js} +1 -1
  80. package/dist/bundle/chunks/python3-SG3DOKBZ.js +11 -0
  81. package/dist/bundle/chunks/{rm-FYNVTQIU.js → rm-RTZG23RL.js} +1 -1
  82. package/dist/bundle/chunks/{sed-DISNI47D.js → sed-VFTTATXJ.js} +1 -1
  83. package/dist/bundle/chunks/{sqlite3-7F22DOIP.js → sqlite3-56UMWEY3.js} +1 -1
  84. package/dist/bundle/chunks/{tar-232RCEFK.js → tar-ANUBEFJY.js} +1 -1
  85. package/dist/bundle/chunks/time-DEUO3QV2.js +1 -0
  86. package/dist/bundle/chunks/{tr-GVTWMRZB.js → tr-2HXZRDSW.js} +1 -1
  87. package/dist/bundle/chunks/worker.js +19 -7
  88. package/dist/bundle/chunks/{yq-XMVSIL6Z.js → yq-MJMAR36V.js} +1 -1
  89. package/dist/bundle/index.cjs +805 -805
  90. package/dist/bundle/index.js +157 -157
  91. package/dist/commands/tar/bzip2-compress.d.ts +17 -0
  92. package/dist/fs/sanitize-error.d.ts +9 -6
  93. package/dist/network/allow-list.d.ts +3 -2
  94. package/dist/network/types.d.ts +3 -0
  95. package/package.json +7 -7
  96. package/dist/bin/chunks/chunk-SYG3IW7P.js +0 -2
  97. package/dist/bin/chunks/chunk-WS6P4H4S.js +0 -63
  98. package/dist/bin/chunks/expr-VEFRBJT4.js +0 -2
  99. package/dist/bin/chunks/python3-PF7AHNQM.js +0 -12
  100. package/dist/bin/chunks/time-DDS6JJ23.js +0 -2
  101. package/dist/bin/shell/chunks/chunk-SYG3IW7P.js +0 -2
  102. package/dist/bin/shell/chunks/chunk-WS6P4H4S.js +0 -63
  103. package/dist/bin/shell/chunks/expr-VEFRBJT4.js +0 -2
  104. package/dist/bin/shell/chunks/python3-J7DP4JBQ.js +0 -12
  105. package/dist/bin/shell/chunks/time-DDS6JJ23.js +0 -2
  106. package/dist/bundle/chunks/chunk-CCNMISUL.js +0 -1
  107. package/dist/bundle/chunks/chunk-ZXL7TQLN.js +0 -62
  108. package/dist/bundle/chunks/expr-74QHYJL5.js +0 -1
  109. package/dist/bundle/chunks/python3-6HF56IYI.js +0 -11
  110. package/dist/bundle/chunks/time-YG5BMRIQ.js +0 -1
package/README.md CHANGED
@@ -192,6 +192,8 @@ const env = new Bash({ fs: rwfs });
192
192
  await env.exec('echo "hello" > file.txt'); // writes to real filesystem
193
193
  ```
194
194
 
195
+ Keep `ReadWriteFs` pointed at a workspace directory, not at the installed `just-bash` package or any other trusted runtime code. Guest-writable roots should stay separate from trusted code.
196
+
195
197
  **MountableFs** - Mount multiple filesystems at different paths. Combines read-only and read-write filesystems into a unified namespace:
196
198
 
197
199
  ```typescript
package/dist/AGENTS.md CHANGED
@@ -62,6 +62,8 @@ const result = await bash.exec("cat input.txt | grep pattern");
62
62
 
63
63
  4. **No binaries/WASM**: Only built-in commands work. You cannot run node, python, or other binaries.
64
64
 
65
+ 5. **ReadWriteFs root separation**: If you use `ReadWriteFs`, point it at a workspace directory, not at the installed `just-bash` package or other trusted runtime code.
66
+
65
67
  ## Available Commands
66
68
 
67
69
  **Text processing**: `awk`, `cat`, `column`, `comm`, `cut`, `egrep`, `expand`, `fgrep`, `fold`, `grep`, `head`, `join`, `nl`, `paste`, `rev`, `rg`, `sed`, `sort`, `strings`, `tac`, `tail`, `tr`, `unexpand`, `uniq`, `wc`, `xargs`
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
- import{a as F}from"./chunk-4OALHZXB.js";import{a as w,b as n}from"./chunk-LIYVQA3X.js";import{a as T,b as g}from"./chunk-OOJCYVYF.js";import{a as m}from"./chunk-SYG3IW7P.js";var h={NOOP:0,READ_FILE:1,WRITE_FILE:2,STAT:3,READDIR:4,MKDIR:5,RM:6,EXISTS:7,APPEND_FILE:8,SYMLINK:9,READLINK:10,LSTAT:11,CHMOD:12,REALPATH:13,RENAME:14,COPY_FILE:15,WRITE_STDOUT:100,WRITE_STDERR:101,EXIT:102,HTTP_REQUEST:200,EXEC_COMMAND:300},a={PENDING:0,READY:1,SUCCESS:2,ERROR:3},u={NONE:0,NOT_FOUND:1,IS_DIRECTORY:2,NOT_DIRECTORY:3,EXISTS:4,PERMISSION_DENIED:5,INVALID_PATH:6,IO_ERROR:7,TIMEOUT:8,NETWORK_ERROR:9,NETWORK_NOT_CONFIGURED:10},s={OP_CODE:0,STATUS:4,PATH_LENGTH:8,DATA_LENGTH:12,RESULT_LENGTH:16,ERROR_CODE:20,FLAGS:24,MODE:28,PATH_BUFFER:32,DATA_BUFFER:4128},E={CONTROL_REGION:32,PATH_BUFFER:4096,DATA_BUFFER:1048576,TOTAL:1052704},S={NONE:0,RECURSIVE:1,FORCE:2,MKDIR_RECURSIVE:1},l={IS_FILE:0,IS_DIRECTORY:1,IS_SYMLINK:2,MODE:4,SIZE:8,MTIME:16,TOTAL:24};function _(){return new w(E.TOTAL)}var R=class{int32View;uint8View;dataView;constructor(t){this.int32View=new Int32Array(t),this.uint8View=new Uint8Array(t),this.dataView=new DataView(t)}getOpCode(){return n.load(this.int32View,s.OP_CODE/4)}setOpCode(t){n.store(this.int32View,s.OP_CODE/4,t)}getStatus(){return n.load(this.int32View,s.STATUS/4)}setStatus(t){n.store(this.int32View,s.STATUS/4,t)}getPathLength(){return n.load(this.int32View,s.PATH_LENGTH/4)}setPathLength(t){n.store(this.int32View,s.PATH_LENGTH/4,t)}getDataLength(){return n.load(this.int32View,s.DATA_LENGTH/4)}setDataLength(t){n.store(this.int32View,s.DATA_LENGTH/4,t)}getResultLength(){return n.load(this.int32View,s.RESULT_LENGTH/4)}setResultLength(t){n.store(this.int32View,s.RESULT_LENGTH/4,t)}getErrorCode(){return n.load(this.int32View,s.ERROR_CODE/4)}setErrorCode(t){n.store(this.int32View,s.ERROR_CODE/4,t)}getFlags(){return n.load(this.int32View,s.FLAGS/4)}setFlags(t){n.store(this.int32View,s.FLAGS/4,t)}getMode(){return n.load(this.int32View,s.MODE/4)}setMode(t){n.store(this.int32View,s.MODE/4,t)}getPath(){let t=this.getPathLength(),e=this.uint8View.slice(s.PATH_BUFFER,s.PATH_BUFFER+t);return new TextDecoder().decode(e)}setPath(t){let e=new TextEncoder().encode(t);if(e.length>E.PATH_BUFFER)throw new Error(`Path too long: ${e.length} > ${E.PATH_BUFFER}`);this.uint8View.set(e,s.PATH_BUFFER),this.setPathLength(e.length)}getData(){let t=this.getDataLength();return this.uint8View.slice(s.DATA_BUFFER,s.DATA_BUFFER+t)}setData(t){if(t.length>E.DATA_BUFFER)throw new Error(`Data too large: ${t.length} > ${E.DATA_BUFFER}`);this.uint8View.set(t,s.DATA_BUFFER),this.setDataLength(t.length)}getDataAsString(){let t=this.getData();return new TextDecoder().decode(t)}setDataFromString(t){let e=new TextEncoder().encode(t);this.setData(e)}getResult(){let t=this.getResultLength();return this.uint8View.slice(s.DATA_BUFFER,s.DATA_BUFFER+t)}setResult(t){if(t.length>E.DATA_BUFFER)throw new Error(`Result too large: ${t.length} > ${E.DATA_BUFFER}`);this.uint8View.set(t,s.DATA_BUFFER),this.setResultLength(t.length)}getResultAsString(){let t=this.getResult();return new TextDecoder().decode(t)}setResultFromString(t){let e=new TextEncoder().encode(t);this.setResult(e)}encodeStat(t){this.uint8View[s.DATA_BUFFER+l.IS_FILE]=t.isFile?1:0,this.uint8View[s.DATA_BUFFER+l.IS_DIRECTORY]=t.isDirectory?1:0,this.uint8View[s.DATA_BUFFER+l.IS_SYMLINK]=t.isSymbolicLink?1:0,this.dataView.setInt32(s.DATA_BUFFER+l.MODE,t.mode,!0);let e=Math.min(t.size,Number.MAX_SAFE_INTEGER);this.dataView.setFloat64(s.DATA_BUFFER+l.SIZE,e,!0),this.dataView.setFloat64(s.DATA_BUFFER+l.MTIME,t.mtime.getTime(),!0),this.setResultLength(l.TOTAL)}decodeStat(){return{isFile:this.uint8View[s.DATA_BUFFER+l.IS_FILE]===1,isDirectory:this.uint8View[s.DATA_BUFFER+l.IS_DIRECTORY]===1,isSymbolicLink:this.uint8View[s.DATA_BUFFER+l.IS_SYMLINK]===1,mode:this.dataView.getInt32(s.DATA_BUFFER+l.MODE,!0),size:this.dataView.getFloat64(s.DATA_BUFFER+l.SIZE,!0),mtime:new Date(this.dataView.getFloat64(s.DATA_BUFFER+l.MTIME,!0))}}waitForReady(t){return n.wait(this.int32View,s.STATUS/4,a.PENDING,t)}waitForReadyAsync(t){return n.waitAsync(this.int32View,s.STATUS/4,a.PENDING,t)}async waitUntilReady(t){let e=Date.now();for(;;){let r=this.getStatus();if(r===a.READY)return!0;let o=Date.now()-e;if(o>=t)return!1;let i=t-o,c=n.waitAsync(this.int32View,s.STATUS/4,r,i);if(c.async&&await c.value==="timed-out")return!1}}waitForResult(t){return n.wait(this.int32View,s.STATUS/4,a.READY,t)}notify(){return n.notify(this.int32View,s.STATUS/4)}reset(){this.setOpCode(h.NOOP),this.setStatus(a.PENDING),this.setPathLength(0),this.setDataLength(0),this.setResultLength(0),this.setErrorCode(u.NONE),this.setFlags(S.NONE),this.setMode(0)}};var A=class{fs;cwd;commandName;secureFetch;maxOutputSize;exec;protocol;running=!1;output={stdout:"",stderr:"",exitCode:0};outputLimitExceeded=!1;startTime=0;timeoutMs=0;constructor(t,e,r,o,i=void 0,c=0,d=void 0){this.fs=e,this.cwd=r,this.commandName=o,this.secureFetch=i,this.maxOutputSize=c,this.exec=d,this.protocol=new R(t)}remainingMs(){return Math.max(0,this.timeoutMs-(Date.now()-this.startTime))}raceDeadline(t){let e=this.remainingMs();if(e<=0)return this.running=!1,this.output.exitCode=124,this.output.stderr+=`
2
+ import{a as F}from"./chunk-4OALHZXB.js";import{a as w,b as n}from"./chunk-LIYVQA3X.js";import{a as T,b as g}from"./chunk-OOJCYVYF.js";import{a as m}from"./chunk-RLNOQILG.js";var h={NOOP:0,READ_FILE:1,WRITE_FILE:2,STAT:3,READDIR:4,MKDIR:5,RM:6,EXISTS:7,APPEND_FILE:8,SYMLINK:9,READLINK:10,LSTAT:11,CHMOD:12,REALPATH:13,RENAME:14,COPY_FILE:15,WRITE_STDOUT:100,WRITE_STDERR:101,EXIT:102,HTTP_REQUEST:200,EXEC_COMMAND:300},a={PENDING:0,READY:1,SUCCESS:2,ERROR:3},u={NONE:0,NOT_FOUND:1,IS_DIRECTORY:2,NOT_DIRECTORY:3,EXISTS:4,PERMISSION_DENIED:5,INVALID_PATH:6,IO_ERROR:7,TIMEOUT:8,NETWORK_ERROR:9,NETWORK_NOT_CONFIGURED:10},s={OP_CODE:0,STATUS:4,PATH_LENGTH:8,DATA_LENGTH:12,RESULT_LENGTH:16,ERROR_CODE:20,FLAGS:24,MODE:28,PATH_BUFFER:32,DATA_BUFFER:4128},E={CONTROL_REGION:32,PATH_BUFFER:4096,DATA_BUFFER:1048576,TOTAL:1052704},S={NONE:0,RECURSIVE:1,FORCE:2,MKDIR_RECURSIVE:1},l={IS_FILE:0,IS_DIRECTORY:1,IS_SYMLINK:2,MODE:4,SIZE:8,MTIME:16,TOTAL:24};function _(){return new w(E.TOTAL)}var R=class{int32View;uint8View;dataView;constructor(t){this.int32View=new Int32Array(t),this.uint8View=new Uint8Array(t),this.dataView=new DataView(t)}getOpCode(){return n.load(this.int32View,s.OP_CODE/4)}setOpCode(t){n.store(this.int32View,s.OP_CODE/4,t)}getStatus(){return n.load(this.int32View,s.STATUS/4)}setStatus(t){n.store(this.int32View,s.STATUS/4,t)}getPathLength(){return n.load(this.int32View,s.PATH_LENGTH/4)}setPathLength(t){n.store(this.int32View,s.PATH_LENGTH/4,t)}getDataLength(){return n.load(this.int32View,s.DATA_LENGTH/4)}setDataLength(t){n.store(this.int32View,s.DATA_LENGTH/4,t)}getResultLength(){return n.load(this.int32View,s.RESULT_LENGTH/4)}setResultLength(t){n.store(this.int32View,s.RESULT_LENGTH/4,t)}getErrorCode(){return n.load(this.int32View,s.ERROR_CODE/4)}setErrorCode(t){n.store(this.int32View,s.ERROR_CODE/4,t)}getFlags(){return n.load(this.int32View,s.FLAGS/4)}setFlags(t){n.store(this.int32View,s.FLAGS/4,t)}getMode(){return n.load(this.int32View,s.MODE/4)}setMode(t){n.store(this.int32View,s.MODE/4,t)}getPath(){let t=this.getPathLength(),e=this.uint8View.slice(s.PATH_BUFFER,s.PATH_BUFFER+t);return new TextDecoder().decode(e)}setPath(t){let e=new TextEncoder().encode(t);if(e.length>E.PATH_BUFFER)throw new Error(`Path too long: ${e.length} > ${E.PATH_BUFFER}`);this.uint8View.set(e,s.PATH_BUFFER),this.setPathLength(e.length)}getData(){let t=this.getDataLength();return this.uint8View.slice(s.DATA_BUFFER,s.DATA_BUFFER+t)}setData(t){if(t.length>E.DATA_BUFFER)throw new Error(`Data too large: ${t.length} > ${E.DATA_BUFFER}`);this.uint8View.set(t,s.DATA_BUFFER),this.setDataLength(t.length)}getDataAsString(){let t=this.getData();return new TextDecoder().decode(t)}setDataFromString(t){let e=new TextEncoder().encode(t);this.setData(e)}getResult(){let t=this.getResultLength();return this.uint8View.slice(s.DATA_BUFFER,s.DATA_BUFFER+t)}setResult(t){if(t.length>E.DATA_BUFFER)throw new Error(`Result too large: ${t.length} > ${E.DATA_BUFFER}`);this.uint8View.set(t,s.DATA_BUFFER),this.setResultLength(t.length)}getResultAsString(){let t=this.getResult();return new TextDecoder().decode(t)}setResultFromString(t){let e=new TextEncoder().encode(t);this.setResult(e)}encodeStat(t){this.uint8View[s.DATA_BUFFER+l.IS_FILE]=t.isFile?1:0,this.uint8View[s.DATA_BUFFER+l.IS_DIRECTORY]=t.isDirectory?1:0,this.uint8View[s.DATA_BUFFER+l.IS_SYMLINK]=t.isSymbolicLink?1:0,this.dataView.setInt32(s.DATA_BUFFER+l.MODE,t.mode,!0);let e=Math.min(t.size,Number.MAX_SAFE_INTEGER);this.dataView.setFloat64(s.DATA_BUFFER+l.SIZE,e,!0),this.dataView.setFloat64(s.DATA_BUFFER+l.MTIME,t.mtime.getTime(),!0),this.setResultLength(l.TOTAL)}decodeStat(){return{isFile:this.uint8View[s.DATA_BUFFER+l.IS_FILE]===1,isDirectory:this.uint8View[s.DATA_BUFFER+l.IS_DIRECTORY]===1,isSymbolicLink:this.uint8View[s.DATA_BUFFER+l.IS_SYMLINK]===1,mode:this.dataView.getInt32(s.DATA_BUFFER+l.MODE,!0),size:this.dataView.getFloat64(s.DATA_BUFFER+l.SIZE,!0),mtime:new Date(this.dataView.getFloat64(s.DATA_BUFFER+l.MTIME,!0))}}waitForReady(t){return n.wait(this.int32View,s.STATUS/4,a.PENDING,t)}waitForReadyAsync(t){return n.waitAsync(this.int32View,s.STATUS/4,a.PENDING,t)}async waitUntilReady(t){let e=Date.now();for(;;){let r=this.getStatus();if(r===a.READY)return!0;let o=Date.now()-e;if(o>=t)return!1;let i=t-o,c=n.waitAsync(this.int32View,s.STATUS/4,r,i);if(c.async&&await c.value==="timed-out")return!1}}waitForResult(t){return n.wait(this.int32View,s.STATUS/4,a.READY,t)}notify(){return n.notify(this.int32View,s.STATUS/4)}reset(){this.setOpCode(h.NOOP),this.setStatus(a.PENDING),this.setPathLength(0),this.setDataLength(0),this.setResultLength(0),this.setErrorCode(u.NONE),this.setFlags(S.NONE),this.setMode(0)}};var A=class{fs;cwd;commandName;secureFetch;maxOutputSize;exec;protocol;running=!1;output={stdout:"",stderr:"",exitCode:0};outputLimitExceeded=!1;startTime=0;timeoutMs=0;constructor(t,e,r,o,i=void 0,c=0,d=void 0){this.fs=e,this.cwd=r,this.commandName=o,this.secureFetch=i,this.maxOutputSize=c,this.exec=d,this.protocol=new R(t)}remainingMs(){return Math.max(0,this.timeoutMs-(Date.now()-this.startTime))}raceDeadline(t){let e=this.remainingMs();if(e<=0)return this.running=!1,this.output.exitCode=124,this.output.stderr+=`
3
3
  ${this.commandName}: execution timeout exceeded
4
4
  `,Promise.reject(new Error("Operation timed out"));let r=t();return new Promise((o,i)=>{let c=T(()=>{this.running=!1,this.output.exitCode=124,this.output.stderr+=`
5
5
  ${this.commandName}: execution timeout exceeded
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
- import{a as f}from"./chunk-SYG3IW7P.js";import{a as d}from"./chunk-JBABAK44.js";import{a as l}from"./chunk-4VDEBYW7.js";var p={recursive:{short:"p",long:"parents",type:"boolean"},verbose:{short:"v",long:"verbose",type:"boolean"}},b={name:"mkdir",async execute(m,t){let e=d("mkdir",m,p);if(!e.ok)return e.error;let u=e.result.flags.recursive,g=e.result.flags.verbose,n=e.result.positional;if(n.length===0)return{stdout:"",stderr:`mkdir: missing operand
2
+ import{a as f}from"./chunk-RLNOQILG.js";import{a as d}from"./chunk-JBABAK44.js";import{a as l}from"./chunk-4VDEBYW7.js";var p={recursive:{short:"p",long:"parents",type:"boolean"},verbose:{short:"v",long:"verbose",type:"boolean"}},b={name:"mkdir",async execute(m,t){let e=d("mkdir",m,p);if(!e.ok)return e.error;let u=e.result.flags.recursive,g=e.result.flags.verbose,n=e.result.positional;if(n.length===0)return{stdout:"",stderr:`mkdir: missing operand
3
3
  `,exitCode:1};let a="",o="",c=0;for(let r of n)try{let i=t.fs.resolvePath(t.cwd,r);await t.fs.mkdir(i,{recursive:u}),g&&(a+=`mkdir: created directory '${r}'
4
4
  `)}catch(i){let s=l(i);s.includes("ENOENT")||s.includes("no such file")?o+=`mkdir: cannot create directory '${r}': No such file or directory
5
5
  `:s.includes("EEXIST")||s.includes("already exists")?o+=`mkdir: cannot create directory '${r}': File exists
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
- import{a as p}from"./chunk-SYG3IW7P.js";import{a as m,b as g,c as h}from"./chunk-GTNBSMZR.js";var y={name:"ln",summary:"make links between files",usage:"ln [OPTIONS] TARGET LINK_NAME",options:["-s create a symbolic link instead of a hard link","-f remove existing destination files","-n treat LINK_NAME as a normal file if it is a symbolic link to a directory","-v print name of each linked file"," --help display this help and exit"]},v={name:"ln",async execute(n,s){if(g(n))return m(y);let r=!1,a=!1,f=!1,t=0;for(;t<n.length&&n[t].startsWith("-");){let e=n[t];if(e==="-s"||e==="--symbolic")r=!0,t++;else if(e==="-f"||e==="--force")a=!0,t++;else if(e==="-v"||e==="--verbose")f=!0,t++;else if(e==="-n"||e==="--no-dereference")t++;else if(/^-[sfvn]+$/.test(e))e.includes("s")&&(r=!0),e.includes("f")&&(a=!0),e.includes("v")&&(f=!0),t++;else if(e==="--"){t++;break}else return h("ln",e)}let d=n.slice(t);if(d.length<2)return{stdout:"",stderr:`ln: missing file operand
2
+ import{a as p}from"./chunk-RLNOQILG.js";import{a as m,b as g,c as h}from"./chunk-GTNBSMZR.js";var y={name:"ln",summary:"make links between files",usage:"ln [OPTIONS] TARGET LINK_NAME",options:["-s create a symbolic link instead of a hard link","-f remove existing destination files","-n treat LINK_NAME as a normal file if it is a symbolic link to a directory","-v print name of each linked file"," --help display this help and exit"]},v={name:"ln",async execute(n,s){if(g(n))return m(y);let r=!1,a=!1,f=!1,t=0;for(;t<n.length&&n[t].startsWith("-");){let e=n[t];if(e==="-s"||e==="--symbolic")r=!0,t++;else if(e==="-f"||e==="--force")a=!0,t++;else if(e==="-v"||e==="--verbose")f=!0,t++;else if(e==="-n"||e==="--no-dereference")t++;else if(/^-[sfvn]+$/.test(e))e.includes("s")&&(r=!0),e.includes("f")&&(a=!0),e.includes("v")&&(f=!0),t++;else if(e==="--"){t++;break}else return h("ln",e)}let d=n.slice(t);if(d.length<2)return{stdout:"",stderr:`ln: missing file operand
3
3
  `,exitCode:1};let i=d[0],l=d[1],o=s.fs.resolvePath(s.cwd,l);if(await s.fs.exists(o))if(a)try{await s.fs.rm(o,{force:!0})}catch{return{stdout:"",stderr:`ln: cannot remove '${l}': Permission denied
4
4
  `,exitCode:1}}else return{stdout:"",stderr:`ln: failed to create ${r?"symbolic ":""}link '${l}': File exists
5
5
  `,exitCode:1};try{if(r)await s.fs.symlink(i,o);else{let e=s.fs.resolvePath(s.cwd,i);if(!await s.fs.exists(e))return{stdout:"",stderr:`ln: failed to access '${i}': No such file or directory
@@ -1,36 +1,36 @@
1
1
  #!/usr/bin/env node
2
- import{a as x,b as w}from"./chunk-OOJCYVYF.js";import{c as b}from"./chunk-MO4RPBN2.js";import{b as j}from"./chunk-YU6OGPZR.js";import{a as m}from"./chunk-SYG3IW7P.js";import{a as q,b as C}from"./chunk-GTNBSMZR.js";import{randomBytes as _}from"node:crypto";import{existsSync as E}from"node:fs";import{dirname as z,join as T}from"node:path";import{fileURLToPath as X}from"node:url";import{Worker as Y}from"node:worker_threads";import G from"sql.js";function V(e,t,r){switch(r.mode){case"list":return B(e,t,r);case"csv":return O(e,t,r);case"json":return I(e,t);case"line":return N(e,t,r);case"column":return R(e,t,r);case"table":return F(e,t,r);case"markdown":return Q(e,t,r);case"tabs":return U(e,t,r);case"box":return W(e,t,r);case"quote":return D(e,t,r);case"html":return H(e,t,r);case"ascii":return J(e,t,r)}}function f(e,t){return e==null?t:e instanceof Uint8Array||Buffer.isBuffer(e)?Buffer.from(e).toString("utf8"):typeof e=="number"&&!Number.isInteger(e)?e.toPrecision(17).replace(/\.?0+$/,""):String(e)}function B(e,t,r){let n=[];r.header&&e.length>0&&n.push(e.join(r.separator));for(let a of t)n.push(a.map(o=>f(o,r.nullValue)).join(r.separator));return n.length>0?`${n.join(r.newline)}${r.newline}`:""}function O(e,t,r){let n=[];r.header&&e.length>0&&n.push(e.map(L).join(","));for(let a of t)n.push(a.map(o=>L(f(o,r.nullValue))).join(","));return n.length>0?`${n.join(`
2
+ import{a as q,b as w}from"./chunk-OOJCYVYF.js";import{c as b}from"./chunk-MO4RPBN2.js";import{b as j}from"./chunk-YU6OGPZR.js";import{a as E,b as g}from"./chunk-RLNOQILG.js";import{a as C,b as M}from"./chunk-GTNBSMZR.js";import{randomBytes as z}from"node:crypto";import{existsSync as T}from"node:fs";import{dirname as X,join as x}from"node:path";import{fileURLToPath as Y}from"node:url";import{Worker as G}from"node:worker_threads";import K from"sql.js";function A(e,t,r){switch(r.mode){case"list":return O(e,t,r);case"csv":return P(e,t,r);case"json":return N(e,t);case"line":return R(e,t,r);case"column":return F(e,t,r);case"table":return Q(e,t,r);case"markdown":return U(e,t,r);case"tabs":return W(e,t,r);case"box":return D(e,t,r);case"quote":return H(e,t,r);case"html":return J(e,t,r);case"ascii":return _(e,t,r)}}function f(e,t){return e==null?t:e instanceof Uint8Array||Buffer.isBuffer(e)?Buffer.from(e).toString("utf8"):typeof e=="number"&&!Number.isInteger(e)?e.toPrecision(17).replace(/\.?0+$/,""):String(e)}function O(e,t,r){let n=[];r.header&&e.length>0&&n.push(e.join(r.separator));for(let a of t)n.push(a.map(o=>f(o,r.nullValue)).join(r.separator));return n.length>0?`${n.join(r.newline)}${r.newline}`:""}function P(e,t,r){let n=[];r.header&&e.length>0&&n.push(e.map(L).join(","));for(let a of t)n.push(a.map(o=>L(f(o,r.nullValue))).join(","));return n.length>0?`${n.join(`
3
3
  `)}
4
4
  `:""}function L(e){return e.includes(",")||e.includes('"')||e.includes("'")||e.includes(`
5
- `)?`"${e.replace(/"/g,'""')}"`:e}function A(e){return e.toPrecision(17).replace(/\.?0+$/,"")}function P(e){return e===null?"null":typeof e=="number"?Number.isInteger(e)?String(e):A(e):JSON.stringify(e)}function I(e,t){return t.length===0?"":`[${t.map(n=>`{${e.map((o,i)=>`${JSON.stringify(o)}:${P(n[i])}`).join(",")}}`).join(`,
5
+ `)?`"${e.replace(/"/g,'""')}"`:e}function B(e){return e.toPrecision(17).replace(/\.?0+$/,"")}function I(e){return e===null?"null":typeof e=="number"?Number.isInteger(e)?String(e):B(e):JSON.stringify(e)}function N(e,t){return t.length===0?"":`[${t.map(n=>`{${e.map((o,i)=>`${JSON.stringify(o)}:${I(n[i])}`).join(",")}}`).join(`,
6
6
  `)}]
7
- `}function N(e,t,r){if(e.length===0||t.length===0)return"";let n=Math.max(5,...e.map(o=>o.length)),a=[];for(let o of t)for(let i=0;i<e.length;i++){let s=e[i].padStart(n);a.push(`${s} = ${f(o[i],r.nullValue)}`)}return`${a.join(`
7
+ `}function R(e,t,r){if(e.length===0||t.length===0)return"";let n=Math.max(5,...e.map(o=>o.length)),a=[];for(let o of t)for(let i=0;i<e.length;i++){let s=e[i].padStart(n);a.push(`${s} = ${f(o[i],r.nullValue)}`)}return`${a.join(`
8
8
  `)}
9
- `}function R(e,t,r){if(e.length===0)return"";let n=e.map(o=>o.length);for(let o of t)for(let i=0;i<o.length;i++){let s=f(o[i],r.nullValue).length;s>n[i]&&(n[i]=s)}let a=[];r.header&&(a.push(e.map((o,i)=>o.padEnd(n[i])).join(" ")),a.push(n.map(o=>"-".repeat(o)).join(" ")));for(let o of t)a.push(o.map((i,s)=>f(i,r.nullValue).padEnd(n[s])).join(" "));return a.length>0?`${a.join(`
9
+ `}function F(e,t,r){if(e.length===0)return"";let n=e.map(o=>o.length);for(let o of t)for(let i=0;i<o.length;i++){let s=f(o[i],r.nullValue).length;s>n[i]&&(n[i]=s)}let a=[];r.header&&(a.push(e.map((o,i)=>o.padEnd(n[i])).join(" ")),a.push(n.map(o=>"-".repeat(o)).join(" ")));for(let o of t)a.push(o.map((i,s)=>f(i,r.nullValue).padEnd(n[s])).join(" "));return a.length>0?`${a.join(`
10
10
  `)}
11
- `:""}function F(e,t,r){if(e.length===0)return"";let n=e.map(i=>i.length);for(let i of t)for(let s=0;s<i.length;s++){let p=f(i[s],r.nullValue).length;p>n[s]&&(n[s]=p)}let a=[],o=`+${n.map(i=>"-".repeat(i+2)).join("+")}+`;a.push(o),r.header&&(a.push(`| ${e.map((i,s)=>i.padEnd(n[s])).join(" | ")} |`),a.push(o));for(let i of t)a.push(`| ${i.map((s,p)=>f(s,r.nullValue).padEnd(n[p])).join(" | ")} |`);return a.push(o),`${a.join(`
11
+ `:""}function Q(e,t,r){if(e.length===0)return"";let n=e.map(i=>i.length);for(let i of t)for(let s=0;s<i.length;s++){let m=f(i[s],r.nullValue).length;m>n[s]&&(n[s]=m)}let a=[],o=`+${n.map(i=>"-".repeat(i+2)).join("+")}+`;a.push(o),r.header&&(a.push(`| ${e.map((i,s)=>i.padEnd(n[s])).join(" | ")} |`),a.push(o));for(let i of t)a.push(`| ${i.map((s,m)=>f(s,r.nullValue).padEnd(n[m])).join(" | ")} |`);return a.push(o),`${a.join(`
12
12
  `)}
13
- `}function Q(e,t,r){if(e.length===0)return"";let n=[];r.header&&(n.push(`| ${e.join(" | ")} |`),n.push(`|${e.map(()=>"---").join("|")}|`));for(let a of t)n.push(`| ${a.map(o=>f(o,r.nullValue)).join(" | ")} |`);return n.length>0?`${n.join(`
13
+ `}function U(e,t,r){if(e.length===0)return"";let n=[];r.header&&(n.push(`| ${e.join(" | ")} |`),n.push(`|${e.map(()=>"---").join("|")}|`));for(let a of t)n.push(`| ${a.map(o=>f(o,r.nullValue)).join(" | ")} |`);return n.length>0?`${n.join(`
14
14
  `)}
15
- `:""}function U(e,t,r){let n=[];r.header&&e.length>0&&n.push(e.join(" "));for(let a of t)n.push(a.map(o=>f(o,r.nullValue)).join(" "));return n.length>0?`${n.join(r.newline)}${r.newline}`:""}function W(e,t,r){if(e.length===0)return"";let n=e.map(o=>o.length);for(let o of t)for(let i=0;i<o.length;i++){let s=f(o[i],r.nullValue).length;s>n[i]&&(n[i]=s)}let a=[];a.push(`\u250C${n.map(o=>"\u2500".repeat(o+2)).join("\u252C")}\u2510`),a.push(`\u2502 ${e.map((o,i)=>o.padEnd(n[i])).join(" \u2502 ")} \u2502`),a.push(`\u251C${n.map(o=>"\u2500".repeat(o+2)).join("\u253C")}\u2524`);for(let o of t)a.push(`\u2502 ${o.map((i,s)=>f(i,r.nullValue).padEnd(n[s])).join(" \u2502 ")} \u2502`);return a.push(`\u2514${n.map(o=>"\u2500".repeat(o+2)).join("\u2534")}\u2518`),`${a.join(`
15
+ `:""}function W(e,t,r){let n=[];r.header&&e.length>0&&n.push(e.join(" "));for(let a of t)n.push(a.map(o=>f(o,r.nullValue)).join(" "));return n.length>0?`${n.join(r.newline)}${r.newline}`:""}function D(e,t,r){if(e.length===0)return"";let n=e.map(o=>o.length);for(let o of t)for(let i=0;i<o.length;i++){let s=f(o[i],r.nullValue).length;s>n[i]&&(n[i]=s)}let a=[];a.push(`\u250C${n.map(o=>"\u2500".repeat(o+2)).join("\u252C")}\u2510`),a.push(`\u2502 ${e.map((o,i)=>o.padEnd(n[i])).join(" \u2502 ")} \u2502`),a.push(`\u251C${n.map(o=>"\u2500".repeat(o+2)).join("\u253C")}\u2524`);for(let o of t)a.push(`\u2502 ${o.map((i,s)=>f(i,r.nullValue).padEnd(n[s])).join(" \u2502 ")} \u2502`);return a.push(`\u2514${n.map(o=>"\u2500".repeat(o+2)).join("\u2534")}\u2518`),`${a.join(`
16
16
  `)}
17
- `}function D(e,t,r){let n=[];r.header&&e.length>0&&n.push(e.map(a=>`'${a}'`).join(","));for(let a of t)n.push(a.map(o=>o==null?"NULL":typeof o=="number"?Number.isInteger(o)?String(o):A(o):`'${String(o)}'`).join(","));return n.length>0?`${n.join(r.newline)}${r.newline}`:""}function H(e,t,r){let n=[];r.header&&e.length>0&&(n.push(`<TR>${e.map(a=>`<TH>${M(a)}</TH>`).join("")}`),n.push("</TR>"));for(let a of t)n.push(`<TR>${a.map(o=>`<TD>${M(f(o,r.nullValue))}</TD>`).join("")}`),n.push("</TR>");return n.length>0?`${n.join(`
17
+ `}function H(e,t,r){let n=[];r.header&&e.length>0&&n.push(e.map(a=>`'${a}'`).join(","));for(let a of t)n.push(a.map(o=>o==null?"NULL":typeof o=="number"?Number.isInteger(o)?String(o):B(o):`'${String(o)}'`).join(","));return n.length>0?`${n.join(r.newline)}${r.newline}`:""}function J(e,t,r){let n=[];r.header&&e.length>0&&(n.push(`<TR>${e.map(a=>`<TH>${V(a)}</TH>`).join("")}`),n.push("</TR>"));for(let a of t)n.push(`<TR>${a.map(o=>`<TD>${V(f(o,r.nullValue))}</TD>`).join("")}`),n.push("</TR>");return n.length>0?`${n.join(`
18
18
  `)}
19
- `:""}function M(e){return e.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;")}function J(e,t,r){let o=[];r.header&&e.length>0&&o.push(e.join(""));for(let i of t)o.push(i.map(s=>f(s,r.nullValue)).join(""));return o.length>0?o.join("")+"":""}var K=5e3,Z={name:"sqlite3",summary:"SQLite database CLI",usage:"sqlite3 [OPTIONS] DATABASE [SQL]",options:["-list output in list mode (default)","-csv output in CSV mode","-json output in JSON mode","-line output in line mode","-column output in column mode","-table output as ASCII table","-markdown output as markdown table","-tabs output in tab-separated mode","-box output in Unicode box mode","-quote output in SQL quote mode","-html output as HTML table","-ascii output in ASCII mode (control chars)","-header show column headers","-noheader hide column headers","-separator SEP field separator for list mode (default: |)","-newline SEP row separator (default: \\n)","-nullvalue TEXT text for NULL values (default: empty)","-readonly open database read-only (no writeback)","-bail stop on first error","-echo print SQL before execution","-cmd COMMAND run SQL command before main SQL","-version show SQLite version","-- end of options","--help show this help"],examples:['sqlite3 :memory: "CREATE TABLE t(x); INSERT INTO t VALUES(1); SELECT * FROM t"','sqlite3 -json data.db "SELECT * FROM users"','sqlite3 -csv -header data.db "SELECT id, name FROM products"','sqlite3 -box data.db "SELECT * FROM users"']};function v(e){let t={mode:"list",header:!1,separator:"|",newline:`
19
+ `:""}function V(e){return e.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;")}function _(e,t,r){let o=[];r.header&&e.length>0&&o.push(e.join(""));for(let i of t)o.push(i.map(s=>f(s,r.nullValue)).join(""));return o.length>0?o.join("")+"":""}var Z=5e3,v={name:"sqlite3",summary:"SQLite database CLI",usage:"sqlite3 [OPTIONS] DATABASE [SQL]",options:["-list output in list mode (default)","-csv output in CSV mode","-json output in JSON mode","-line output in line mode","-column output in column mode","-table output as ASCII table","-markdown output as markdown table","-tabs output in tab-separated mode","-box output in Unicode box mode","-quote output in SQL quote mode","-html output as HTML table","-ascii output in ASCII mode (control chars)","-header show column headers","-noheader hide column headers","-separator SEP field separator for list mode (default: |)","-newline SEP row separator (default: \\n)","-nullvalue TEXT text for NULL values (default: empty)","-readonly open database read-only (no writeback)","-bail stop on first error","-echo print SQL before execution","-cmd COMMAND run SQL command before main SQL","-version show SQLite version","-- end of options","--help show this help"],examples:['sqlite3 :memory: "CREATE TABLE t(x); INSERT INTO t VALUES(1); SELECT * FROM t"','sqlite3 -json data.db "SELECT * FROM users"','sqlite3 -csv -header data.db "SELECT id, name FROM products"','sqlite3 -box data.db "SELECT * FROM users"']};function ee(e){let t={mode:"list",header:!1,separator:"|",newline:`
20
20
  `,nullValue:"",readonly:!1,bail:!1,echo:!1,cmd:null},r=null,n=null,a=!1,o=!1;for(let i=0;i<e.length;i++){let s=e[i];if(o){r===null?r=s:n===null&&(n=s);continue}if(s==="--")o=!0;else if(s==="-version")a=!0;else if(s==="-list")t.mode="list";else if(s==="-csv")t.mode="csv";else if(s==="-json")t.mode="json";else if(s==="-line")t.mode="line";else if(s==="-column")t.mode="column";else if(s==="-table")t.mode="table";else if(s==="-markdown")t.mode="markdown";else if(s==="-tabs")t.mode="tabs";else if(s==="-box")t.mode="box";else if(s==="-quote")t.mode="quote";else if(s==="-html")t.mode="html";else if(s==="-ascii")t.mode="ascii";else if(s==="-header")t.header=!0;else if(s==="-noheader")t.header=!1;else if(s==="-readonly")t.readonly=!0;else if(s==="-bail")t.bail=!0;else if(s==="-echo")t.echo=!0;else if(s==="-separator"){if(i+1>=e.length)return{stdout:"",stderr:`sqlite3: Error: missing argument to -separator
21
21
  `,exitCode:1};t.separator=e[++i]}else if(s==="-newline"){if(i+1>=e.length)return{stdout:"",stderr:`sqlite3: Error: missing argument to -newline
22
22
  `,exitCode:1};t.newline=e[++i]}else if(s==="-nullvalue"){if(i+1>=e.length)return{stdout:"",stderr:`sqlite3: Error: missing argument to -nullvalue
23
23
  `,exitCode:1};t.nullValue=e[++i]}else if(s==="-cmd"){if(i+1>=e.length)return{stdout:"",stderr:`sqlite3: Error: missing argument to -cmd
24
24
  `,exitCode:1};t.cmd=e[++i]}else{if(s.startsWith("-"))return{stdout:"",stderr:`sqlite3: Error: unknown option: ${s.startsWith("--")?s.slice(1):s}
25
25
  Use -help for a list of options.
26
- `,exitCode:1};r===null?r=s:n===null&&(n=s)}}return{options:t,database:r,sql:n,showVersion:a}}async function ee(){let e=await j.runTrustedAsync(()=>G()),t=new e.Database;try{let r=t.exec("SELECT sqlite_version()");return r.length>0&&r[0].values.length>0?String(r[0].values[0][0]):"unknown"}finally{t.close()}}function re(){let e=z(X(import.meta.url)),t=T(e,"../../commands/sqlite3/worker.js");if(E(t))return t;let r=T(e,"worker.js");if(E(r))return r;let n=T(e,"../../../dist/commands/sqlite3/worker.js");if(E(n))return n;throw new Error("sqlite3 worker not found. Run 'pnpm build' to compile the worker.")}var te={createWorker(e,t){return new Y(e,{workerData:t})}};function ne(){return _(16).toString("hex")}function oe(e,t){if(!e||typeof e!="object")return{success:!1,error:"Malformed worker response"};let r=e;return typeof r.protocolToken!="string"||r.protocolToken!==t?{success:!1,error:"Malformed worker response: invalid protocol token"}:r.type==="security-violation"?{success:!1,error:`Security violation: ${typeof r.violation?.type=="string"?r.violation.type:"unknown"}`}:typeof r.success!="boolean"?{success:!1,error:"Malformed worker response: missing success flag"}:r.success?Array.isArray(r.results)?typeof r.hasModifications!="boolean"?{success:!1,error:"Malformed worker response: missing hasModifications flag"}:r.dbBuffer!==null&&r.dbBuffer!==void 0&&!(r.dbBuffer instanceof Uint8Array)?{success:!1,error:"Malformed worker response: invalid dbBuffer"}:{success:!0,results:r.results,hasModifications:r.hasModifications,dbBuffer:r.dbBuffer===void 0?null:r.dbBuffer,defenseStats:r.defenseStats}:{success:!1,error:"Malformed worker response: missing results array"}:{success:!1,error:typeof r.error=="string"&&r.error.length>0?r.error:"Worker execution failed"}}async function se(e,t,r){try{let n=re();return await new Promise((a,o)=>{let i=j.runTrusted(()=>te.createWorker(n,e)),s=b(r,"sqlite3","worker timeout callback",()=>{i.terminate(),a({success:!1,error:`Query timeout: execution exceeded ${t}ms limit`})}),c=x(()=>{try{s()}catch(u){let l=u instanceof Error?u.message:String(u);a({success:!1,error:m(l)})}},t),S=b(r,"sqlite3","worker message callback",u=>{w(c),a(oe(u,e.protocolToken))}),$=b(r,"sqlite3","worker error callback",u=>{w(c),o(u)}),y=b(r,"sqlite3","worker exit callback",u=>{w(c),u!==0&&a({success:!1,error:`Worker exited with code ${u}`})}),h=u=>{try{S(u)}catch(l){w(c);let d=l instanceof Error?l.message:String(l);a({success:!1,error:m(d)})}},k=u=>{try{$(u)}catch(l){w(c);let d=l instanceof Error?l.message:String(l);o(new Error(m(d)))}},g=u=>{try{y(u)}catch(l){w(c);let d=l instanceof Error?l.message:String(l);a({success:!1,error:m(d)})}};i.on("message",h),i.on("error",k),i.on("exit",g)})}catch(n){let a=m(n.message);throw new Error(`sqlite3 worker failed to load: ${a}`)}}var Se={name:"sqlite3",async execute(e,t){if(C(e)||e.includes("-help"))return q(Z);let r=v(e);if("exitCode"in r)return r;let{options:n,database:a,sql:o,showVersion:i}=r;if(i)return{stdout:`${await ee()}
26
+ `,exitCode:1};r===null?r=s:n===null&&(n=s)}}return{options:t,database:r,sql:n,showVersion:a}}async function re(){let e=await j.runTrustedAsync(()=>K()),t=new e.Database;try{let r=t.exec("SELECT sqlite_version()");return r.length>0&&r[0].values.length>0?String(r[0].values[0][0]):"unknown"}finally{t.close()}}function te(){let e=X(Y(import.meta.url)),t=x(e,"../../commands/sqlite3/worker.js");if(T(t))return t;let r=x(e,"worker.js");if(T(r))return r;let n=x(e,"../../../dist/commands/sqlite3/worker.js");if(T(n))return n;throw new Error("sqlite3 worker not found. Run 'pnpm build' to compile the worker.")}var ne={createWorker(e,t){return new G(e,{workerData:t})}};function oe(){return z(16).toString("hex")}function se(e,t){if(!e||typeof e!="object")return{success:!1,error:"Malformed worker response"};let r=e;return typeof r.protocolToken!="string"||r.protocolToken!==t?{success:!1,error:"Malformed worker response: invalid protocol token"}:r.type==="security-violation"?{success:!1,error:`Security violation: ${typeof r.violation?.type=="string"?r.violation.type:"unknown"}`}:typeof r.success!="boolean"?{success:!1,error:"Malformed worker response: missing success flag"}:r.success?Array.isArray(r.results)?typeof r.hasModifications!="boolean"?{success:!1,error:"Malformed worker response: missing hasModifications flag"}:r.dbBuffer!==null&&r.dbBuffer!==void 0&&!(r.dbBuffer instanceof Uint8Array)?{success:!1,error:"Malformed worker response: invalid dbBuffer"}:{success:!0,results:r.results,hasModifications:r.hasModifications,dbBuffer:r.dbBuffer===void 0?null:r.dbBuffer,defenseStats:r.defenseStats}:{success:!1,error:"Malformed worker response: missing results array"}:{success:!1,error:typeof r.error=="string"&&r.error.length>0?r.error:"Worker execution failed"}}async function ie(e,t,r){try{let n=te();return await new Promise((a,o)=>{let i=j.runTrusted(()=>ne.createWorker(n,e)),s=b(r,"sqlite3","worker timeout callback",()=>{i.terminate(),a({success:!1,error:`Query timeout: execution exceeded ${t}ms limit`})}),c=q(()=>{try{s()}catch(u){let l=u instanceof Error?u.message:String(u);a({success:!1,error:g(l)})}},t),S=b(r,"sqlite3","worker message callback",u=>{w(c),a(se(u,e.protocolToken))}),$=b(r,"sqlite3","worker error callback",u=>{w(c),o(u)}),y=b(r,"sqlite3","worker exit callback",u=>{w(c),u!==0&&a({success:!1,error:`Worker exited with code ${u}`})}),p=u=>{try{S(u)}catch(l){w(c);let d=l instanceof Error?l.message:String(l);a({success:!1,error:g(d)})}},k=u=>{try{$(u)}catch(l){w(c);let d=l instanceof Error?l.message:String(l);o(new Error(g(d)))}},h=u=>{try{y(u)}catch(l){w(c);let d=l instanceof Error?l.message:String(l);a({success:!1,error:g(d)})}};i.on("message",p),i.on("error",k),i.on("exit",h)})}catch(n){let a=g(n.message);throw new Error(`sqlite3 worker failed to load: ${a}`)}}var $e={name:"sqlite3",async execute(e,t){if(M(e)||e.includes("-help"))return C(v);let r=ee(e);if("exitCode"in r)return r;let{options:n,database:a,sql:o,showVersion:i}=r;if(i)return{stdout:`${await re()}
27
27
  `,stderr:"",exitCode:0};if(!a)return{stdout:"",stderr:`sqlite3: missing database argument
28
28
  `,exitCode:1};let s=o||t.stdin.trim();if(n.cmd&&(s=n.cmd+(s?`; ${s}`:"")),!s)return{stdout:"",stderr:`sqlite3: no SQL provided
29
- `,exitCode:1};let p=a===":memory:",c="",S=null;try{p||(c=t.fs.resolvePath(t.cwd,a),await t.fs.exists(c)&&(S=await t.fs.readFileBuffer(c)))}catch(l){let d=m(l.message);return{stdout:"",stderr:`sqlite3: unable to open database "${a}": ${d}
30
- `,exitCode:1}}let $=t.limits?.maxSqliteTimeoutMs??K,y={protocolToken:ne(),dbBuffer:S,sql:s,options:{bail:n.bail,echo:n.echo}},h;try{h=await se(y,$,t.requireDefenseContext)}catch(l){return{stdout:"",stderr:`sqlite3: worker error: ${m(l.message)}
31
- `,exitCode:1}}if(!h.success)return{stdout:"",stderr:`sqlite3: ${m(h.error)}
32
- `,exitCode:1};let k={mode:n.mode,header:n.header,separator:n.separator,newline:n.newline,nullValue:n.nullValue},g="";n.echo&&(g+=`${s}
33
- `);let u=!1;for(let l of h.results)if(l.type==="error"){if(n.bail)return{stdout:g,stderr:`Error: ${l.error}
34
- `,exitCode:1};g+=`Error: ${l.error}
35
- `,u=!0}else l.columns&&l.rows&&(l.rows.length>0||n.header)&&(g+=V(l.columns,l.rows,k));if(h.hasModifications&&!n.readonly&&!p&&c&&h.dbBuffer)try{await t.fs.writeFile(c,h.dbBuffer)}catch(l){let d=m(l.message);return{stdout:g,stderr:`sqlite3: failed to write database: ${d}
36
- `,exitCode:1}}return{stdout:g,stderr:"",exitCode:u&&n.bail?1:0}}},$e={name:"sqlite3",flags:[],needsArgs:!0};export{te as a,Se as b,$e as c};
29
+ `,exitCode:1};let m=a===":memory:",c="",S=null;try{m||(c=t.fs.resolvePath(t.cwd,a),await t.fs.exists(c)&&(S=await t.fs.readFileBuffer(c)))}catch(l){let d=E(l.message);return{stdout:"",stderr:`sqlite3: unable to open database "${a}": ${d}
30
+ `,exitCode:1}}let $=t.limits?.maxSqliteTimeoutMs??Z,y={protocolToken:oe(),dbBuffer:S,sql:s,options:{bail:n.bail,echo:n.echo}},p;try{p=await ie(y,$,t.requireDefenseContext)}catch(l){return{stdout:"",stderr:`sqlite3: worker error: ${g(l.message)}
31
+ `,exitCode:1}}if(!p.success)return{stdout:"",stderr:`sqlite3: ${g(p.error)}
32
+ `,exitCode:1};let k={mode:n.mode,header:n.header,separator:n.separator,newline:n.newline,nullValue:n.nullValue},h="";n.echo&&(h+=`${s}
33
+ `);let u=!1;for(let l of p.results)if(l.type==="error"){if(n.bail)return{stdout:h,stderr:`Error: ${l.error}
34
+ `,exitCode:1};h+=`Error: ${l.error}
35
+ `,u=!0}else l.columns&&l.rows&&(l.rows.length>0||n.header)&&(h+=A(l.columns,l.rows,k));if(p.hasModifications&&!n.readonly&&!m&&c&&p.dbBuffer)try{await t.fs.writeFile(c,p.dbBuffer)}catch(l){let d=E(l.message);return{stdout:h,stderr:`sqlite3: failed to write database: ${d}
36
+ `,exitCode:1}}return{stdout:h,stderr:"",exitCode:u&&n.bail?1:0}}},ye={name:"sqlite3",flags:[],needsArgs:!0};export{ne as a,$e as b,ye as c};
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
- import{a as p}from"./chunk-SYG3IW7P.js";import{a as m}from"./chunk-JBABAK44.js";import{a as u}from"./chunk-4VDEBYW7.js";var v={recursive:{short:"r",long:"recursive",type:"boolean"},recursiveUpper:{short:"R",type:"boolean"},force:{short:"f",long:"force",type:"boolean"},verbose:{short:"v",long:"verbose",type:"boolean"}},E={name:"rm",async execute(g,s){let e=m("rm",g,v);if(!e.ok)return e.error;let i=e.result.flags.recursive||e.result.flags.recursiveUpper,a=e.result.flags.force,d=e.result.flags.verbose,c=e.result.positional;if(c.length===0)return a?{stdout:"",stderr:"",exitCode:0}:{stdout:"",stderr:`rm: missing operand
2
+ import{a as p}from"./chunk-RLNOQILG.js";import{a as m}from"./chunk-JBABAK44.js";import{a as u}from"./chunk-4VDEBYW7.js";var v={recursive:{short:"r",long:"recursive",type:"boolean"},recursiveUpper:{short:"R",type:"boolean"},force:{short:"f",long:"force",type:"boolean"},verbose:{short:"v",long:"verbose",type:"boolean"}},E={name:"rm",async execute(g,s){let e=m("rm",g,v);if(!e.ok)return e.error;let i=e.result.flags.recursive||e.result.flags.recursiveUpper,a=e.result.flags.force,d=e.result.flags.verbose,c=e.result.positional;if(c.length===0)return a?{stdout:"",stderr:"",exitCode:0}:{stdout:"",stderr:`rm: missing operand
3
3
  `,exitCode:1};let f="",t="",l=0;for(let r of c)try{let n=s.fs.resolvePath(s.cwd,r);if((await s.fs.stat(n)).isDirectory&&!i){t+=`rm: cannot remove '${r}': Is a directory
4
4
  `,l=1;continue}await s.fs.rm(n,{recursive:i,force:a}),d&&(f+=`removed '${r}'
5
5
  `)}catch(n){if(!a){let o=u(n);o.includes("ENOENT")||o.includes("no such file")?t+=`rm: cannot remove '${r}': No such file or directory
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
- import{a as Qa}from"./chunk-QSDVMMYI.js";import{a as Pe,b as Li}from"./chunk-ZO5PSLKR.js";import{d as R}from"./chunk-V7ZOPVQS.js";import{a as Ii,b as Ci}from"./chunk-MO4RPBN2.js";import{a as Os}from"./chunk-YU6OGPZR.js";import{k as ks}from"./chunk-6KZRLMG3.js";import{a as qs}from"./chunk-SYG3IW7P.js";import{a as ki,b as qi,c as le}from"./chunk-GTNBSMZR.js";import{a as wt,c as b,e as Ts}from"./chunk-KGOUQS5A.js";var Xi=b((fp,Gi)=>{var{hasOwnProperty:_s}=Object.prototype,xs=(s,e={})=>{typeof e=="string"&&(e={section:e}),e.align=e.align===!0,e.newline=e.newline===!0,e.sort=e.sort===!0,e.whitespace=e.whitespace===!0||e.align===!0,e.platform=e.platform||typeof process<"u"&&process.platform,e.bracketedArray=e.bracketedArray!==!1;let t=e.platform==="win32"?`\r
2
+ import{a as Qa}from"./chunk-QSDVMMYI.js";import{a as Pe,b as Li}from"./chunk-ZO5PSLKR.js";import{d as R}from"./chunk-V7ZOPVQS.js";import{a as Ii,b as Ci}from"./chunk-MO4RPBN2.js";import{a as Os}from"./chunk-YU6OGPZR.js";import{k as ks}from"./chunk-6KZRLMG3.js";import{a as qs}from"./chunk-RLNOQILG.js";import{a as ki,b as qi,c as le}from"./chunk-GTNBSMZR.js";import{a as wt,c as b,e as Ts}from"./chunk-KGOUQS5A.js";var Xi=b((fp,Gi)=>{var{hasOwnProperty:_s}=Object.prototype,xs=(s,e={})=>{typeof e=="string"&&(e={section:e}),e.align=e.align===!0,e.newline=e.newline===!0,e.sort=e.sort===!0,e.whitespace=e.whitespace===!0||e.align===!0,e.platform=e.platform||typeof process<"u"&&process.platform,e.bracketedArray=e.bracketedArray!==!1;let t=e.platform==="win32"?`\r
3
3
  `:`
4
4
  `,n=e.whitespace?" = ":"=",i=[],r=e.sort?Object.keys(s).sort():Object.keys(s),o=0;e.align&&(o=X(r.filter(c=>s[c]===null||Array.isArray(s[c])||typeof s[c]!="object").map(c=>Array.isArray(s[c])?`${c}[]`:c).concat([""]).reduce((c,u)=>X(c).length>=X(u).length?c:u)).length);let a="",l=e.bracketedArray?"[]":"";for(let c of r){let u=s[c];if(u&&Array.isArray(u))for(let f of u)a+=X(`${c}${l}`).padEnd(o," ")+n+X(f)+t;else u&&typeof u=="object"?i.push(c):a+=X(c).padEnd(o," ")+n+X(u)+t}e.section&&a.length&&(a="["+X(e.section)+"]"+(e.newline?t+t:t)+a);for(let c of i){let u=Ji(c,".").join("\\."),f=(e.section?e.section+".":"")+u,d=xs(s[c],{...e,section:f});a.length&&d.length&&(a+=t),a+=d}return a};function Ji(s,e){var t=0,n=0,i=0,r=[];do if(i=s.indexOf(e,t),i!==-1){if(t=i+e.length,i>0&&s[i-1]==="\\")continue;r.push(s.slice(n,i)),n=i+e.length}while(i!==-1);return r.push(s.slice(n)),r}var Ui=(s,e={})=>{e.bracketedArray=e.bracketedArray!==!1;let t=Object.create(null),n=t,i=null,r=/^\[([^\]]*)\]\s*$|^([^=]+)(=(.*))?$/i,o=s.split(/[\r\n]+/g),a={};for(let c of o){if(!c||c.match(/^\s*[;#]/)||c.match(/^\s*$/))continue;let u=c.match(r);if(!u)continue;if(u[1]!==void 0){if(i=Et(u[1]),i==="__proto__"){n=Object.create(null);continue}n=t[i]=t[i]||Object.create(null);continue}let f=Et(u[2]),d;e.bracketedArray?d=f.length>2&&f.slice(-2)==="[]":(a[f]=(a?.[f]||0)+1,d=a[f]>1);let p=d&&f.endsWith("[]")?f.slice(0,-2):f;if(p==="__proto__")continue;let g=u[3]?Et(u[4]):!0,h=g==="true"||g==="false"||g==="null"?JSON.parse(g):g;d&&(_s.call(n,p)?Array.isArray(n[p])||(n[p]=[n[p]]):n[p]=[]),Array.isArray(n[p])?n[p].push(h):n[p]=h}let l=[];for(let c of Object.keys(t)){if(!_s.call(t,c)||typeof t[c]!="object"||Array.isArray(t[c]))continue;let u=Ji(c,".");n=t;let f=u.pop(),d=f.replace(/\\\./g,".");for(let p of u)p!=="__proto__"&&((!_s.call(n,p)||typeof n[p]!="object")&&(n[p]=Object.create(null)),n=n[p]);n===t&&d===f||(n[d]=t[c],l.push(c))}for(let c of l)delete t[c];return t},Wi=s=>s.startsWith('"')&&s.endsWith('"')||s.startsWith("'")&&s.endsWith("'"),X=s=>typeof s!="string"||s.match(/[=\r\n]/)||s.match(/^\[/)||s.length>1&&Wi(s)||s!==s.trim()?JSON.stringify(s):s.split(";").join("\\;").split("#").join("\\#"),Et=s=>{if(s=(s||"").trim(),Wi(s)){s.charAt(0)==="'"&&(s=s.slice(1,-1));try{s=JSON.parse(s)}catch{}}else{let e=!1,t="";for(let n=0,i=s.length;n<i;n++){let r=s.charAt(n);if(e)"\\;#".indexOf(r)!==-1?t+=r:t+="\\"+r,e=!1;else{if(";#".indexOf(r)!==-1)break;r==="\\"?e=!0:t+=r}}return e&&(t+="\\"),t.trim()}return s};Gi.exports={parse:Ui,decode:Ui,stringify:xs,encode:xs,safe:X,unsafe:Et}});var O=b($=>{"use strict";var Ks=Symbol.for("yaml.alias"),sr=Symbol.for("yaml.document"),qt=Symbol.for("yaml.map"),nr=Symbol.for("yaml.pair"),Rs=Symbol.for("yaml.scalar"),It=Symbol.for("yaml.seq"),D=Symbol.for("yaml.node.type"),Zl=s=>!!s&&typeof s=="object"&&s[D]===Ks,ec=s=>!!s&&typeof s=="object"&&s[D]===sr,tc=s=>!!s&&typeof s=="object"&&s[D]===qt,sc=s=>!!s&&typeof s=="object"&&s[D]===nr,ir=s=>!!s&&typeof s=="object"&&s[D]===Rs,nc=s=>!!s&&typeof s=="object"&&s[D]===It;function rr(s){if(s&&typeof s=="object")switch(s[D]){case qt:case It:return!0}return!1}function ic(s){if(s&&typeof s=="object")switch(s[D]){case Ks:case qt:case Rs:case It:return!0}return!1}var rc=s=>(ir(s)||rr(s))&&!!s.anchor;$.ALIAS=Ks;$.DOC=sr;$.MAP=qt;$.NODE_TYPE=D;$.PAIR=nr;$.SCALAR=Rs;$.SEQ=It;$.hasAnchor=rc;$.isAlias=Zl;$.isCollection=rr;$.isDocument=ec;$.isMap=tc;$.isNode=ic;$.isPair=sc;$.isScalar=ir;$.isSeq=nc});var Ke=b(Ys=>{"use strict";var M=O(),F=Symbol("break visit"),or=Symbol("skip children"),W=Symbol("remove node");function Ct(s,e){let t=ar(e);M.isDocument(s)?Ne(null,s.contents,t,Object.freeze([s]))===W&&(s.contents=null):Ne(null,s,t,Object.freeze([]))}Ct.BREAK=F;Ct.SKIP=or;Ct.REMOVE=W;function Ne(s,e,t,n){let i=lr(s,e,t,n);if(M.isNode(i)||M.isPair(i))return cr(s,n,i),Ne(s,i,t,n);if(typeof i!="symbol"){if(M.isCollection(e)){n=Object.freeze(n.concat(e));for(let r=0;r<e.items.length;++r){let o=Ne(r,e.items[r],t,n);if(typeof o=="number")r=o-1;else{if(o===F)return F;o===W&&(e.items.splice(r,1),r-=1)}}}else if(M.isPair(e)){n=Object.freeze(n.concat(e));let r=Ne("key",e.key,t,n);if(r===F)return F;r===W&&(e.key=null);let o=Ne("value",e.value,t,n);if(o===F)return F;o===W&&(e.value=null)}}return i}async function Lt(s,e){let t=ar(e);M.isDocument(s)?await Ee(null,s.contents,t,Object.freeze([s]))===W&&(s.contents=null):await Ee(null,s,t,Object.freeze([]))}Lt.BREAK=F;Lt.SKIP=or;Lt.REMOVE=W;async function Ee(s,e,t,n){let i=await lr(s,e,t,n);if(M.isNode(i)||M.isPair(i))return cr(s,n,i),Ee(s,i,t,n);if(typeof i!="symbol"){if(M.isCollection(e)){n=Object.freeze(n.concat(e));for(let r=0;r<e.items.length;++r){let o=await Ee(r,e.items[r],t,n);if(typeof o=="number")r=o-1;else{if(o===F)return F;o===W&&(e.items.splice(r,1),r-=1)}}}else if(M.isPair(e)){n=Object.freeze(n.concat(e));let r=await Ee("key",e.key,t,n);if(r===F)return F;r===W&&(e.key=null);let o=await Ee("value",e.value,t,n);if(o===F)return F;o===W&&(e.value=null)}}return i}function ar(s){return typeof s=="object"&&(s.Collection||s.Node||s.Value)?Object.assign({Alias:s.Node,Map:s.Node,Scalar:s.Node,Seq:s.Node},s.Value&&{Map:s.Value,Scalar:s.Value,Seq:s.Value},s.Collection&&{Map:s.Collection,Seq:s.Collection},s):s}function lr(s,e,t,n){if(typeof t=="function")return t(s,e,n);if(M.isMap(e))return t.Map?.(s,e,n);if(M.isSeq(e))return t.Seq?.(s,e,n);if(M.isPair(e))return t.Pair?.(s,e,n);if(M.isScalar(e))return t.Scalar?.(s,e,n);if(M.isAlias(e))return t.Alias?.(s,e,n)}function cr(s,e,t){let n=e[e.length-1];if(M.isCollection(n))n.items[s]=t;else if(M.isPair(n))s==="key"?n.key=t:n.value=t;else if(M.isDocument(n))n.contents=t;else{let i=M.isAlias(n)?"alias":"scalar";throw new Error(`Cannot replace node with ${i} parent`)}}Ys.visit=Ct;Ys.visitAsync=Lt});var Us=b(ur=>{"use strict";var fr=O(),oc=Ke(),ac={"!":"%21",",":"%2C","[":"%5B","]":"%5D","{":"%7B","}":"%7D"},lc=s=>s.replace(/[!,[\]{}]/g,e=>ac[e]),Re=class s{constructor(e,t){this.docStart=null,this.docEnd=!1,this.yaml=Object.assign({},s.defaultYaml,e),this.tags=Object.assign({},s.defaultTags,t)}clone(){let e=new s(this.yaml,this.tags);return e.docStart=this.docStart,e}atDocument(){let e=new s(this.yaml,this.tags);switch(this.yaml.version){case"1.1":this.atNextDocument=!0;break;case"1.2":this.atNextDocument=!1,this.yaml={explicit:s.defaultYaml.explicit,version:"1.2"},this.tags=Object.assign({},s.defaultTags);break}return e}add(e,t){this.atNextDocument&&(this.yaml={explicit:s.defaultYaml.explicit,version:"1.1"},this.tags=Object.assign({},s.defaultTags),this.atNextDocument=!1);let n=e.trim().split(/[ \t]+/),i=n.shift();switch(i){case"%TAG":{if(n.length!==2&&(t(0,"%TAG directive should contain exactly two parts"),n.length<2))return!1;let[r,o]=n;return this.tags[r]=o,!0}case"%YAML":{if(this.yaml.explicit=!0,n.length!==1)return t(0,"%YAML directive should contain exactly one part"),!1;let[r]=n;if(r==="1.1"||r==="1.2")return this.yaml.version=r,!0;{let o=/^\d+\.\d+$/.test(r);return t(6,`Unsupported YAML version ${r}`,o),!1}}default:return t(0,`Unknown directive ${i}`,!0),!1}}tagName(e,t){if(e==="!")return"!";if(e[0]!=="!")return t(`Not a valid tag: ${e}`),null;if(e[1]==="<"){let o=e.slice(2,-1);return o==="!"||o==="!!"?(t(`Verbatim tags aren't resolved, so ${e} is invalid.`),null):(e[e.length-1]!==">"&&t("Verbatim tags must end with a >"),o)}let[,n,i]=e.match(/^(.*!)([^!]*)$/s);i||t(`The ${e} tag has no suffix`);let r=this.tags[n];if(r)try{return r+decodeURIComponent(i)}catch(o){return t(String(o)),null}return n==="!"?e:(t(`Could not resolve tag: ${e}`),null)}tagString(e){for(let[t,n]of Object.entries(this.tags))if(e.startsWith(n))return t+lc(e.substring(n.length));return e[0]==="!"?e:`!<${e}>`}toString(e){let t=this.yaml.explicit?[`%YAML ${this.yaml.version||"1.2"}`]:[],n=Object.entries(this.tags),i;if(e&&n.length>0&&fr.isNode(e.contents)){let r={};oc.visit(e.contents,(o,a)=>{fr.isNode(a)&&a.tag&&(r[a.tag]=!0)}),i=Object.keys(r)}else i=[];for(let[r,o]of n)r==="!!"&&o==="tag:yaml.org,2002:"||(!e||i.some(a=>a.startsWith(o)))&&t.push(`%TAG ${r} ${o}`);return t.join(`
5
5
  `)}};Re.defaultYaml={explicit:!1,version:"1.2"};Re.defaultTags={"!!":"tag:yaml.org,2002:"};ur.Directives=Re});var Pt=b(Ye=>{"use strict";var dr=O(),cc=Ke();function fc(s){if(/[\x00-\x19\s,[\]{}]/.test(s)){let t=`Anchor must not contain whitespace or control characters: ${JSON.stringify(s)}`;throw new Error(t)}return!0}function hr(s){let e=new Set;return cc.visit(s,{Value(t,n){n.anchor&&e.add(n.anchor)}}),e}function pr(s,e){for(let t=1;;++t){let n=`${s}${t}`;if(!e.has(n))return n}}function uc(s,e){let t=[],n=new Map,i=null;return{onAnchor:r=>{t.push(r),i??(i=hr(s));let o=pr(e,i);return i.add(o),o},setAnchors:()=>{for(let r of t){let o=n.get(r);if(typeof o=="object"&&o.anchor&&(dr.isScalar(o.node)||dr.isCollection(o.node)))o.node.anchor=o.anchor;else{let a=new Error("Failed to resolve repeated object (this should not happen)");throw a.source=r,a}}},sourceObjects:n}}Ye.anchorIsValid=fc;Ye.anchorNames=hr;Ye.createNodeAnchors=uc;Ye.findNewAnchor=pr});var Js=b(mr=>{"use strict";function Ue(s,e,t,n){if(n&&typeof n=="object")if(Array.isArray(n))for(let i=0,r=n.length;i<r;++i){let o=n[i],a=Ue(s,n,String(i),o);a===void 0?delete n[i]:a!==o&&(n[i]=a)}else if(n instanceof Map)for(let i of Array.from(n.keys())){let r=n.get(i),o=Ue(s,n,i,r);o===void 0?n.delete(i):o!==r&&n.set(i,o)}else if(n instanceof Set)for(let i of Array.from(n)){let r=Ue(s,n,i,i);r===void 0?n.delete(i):r!==i&&(n.delete(i),n.add(r))}else for(let[i,r]of Object.entries(n)){let o=Ue(s,n,i,r);o===void 0?delete n[i]:o!==r&&(n[i]=o)}return s.call(e,t,n)}mr.applyReviver=Ue});var z=b(yr=>{"use strict";var dc=O();function gr(s,e,t){if(Array.isArray(s))return s.map((n,i)=>gr(n,String(i),t));if(s&&typeof s.toJSON=="function"){if(!t||!dc.hasAnchor(s))return s.toJSON(e,t);let n={aliasCount:0,count:1,res:void 0};t.anchors.set(s,n),t.onCreate=r=>{n.res=r,delete t.onCreate};let i=s.toJSON(e,t);return t.onCreate&&t.onCreate(i),i}return typeof s=="bigint"&&!t?.keep?Number(s):s}yr.toJS=gr});var Mt=b(wr=>{"use strict";var hc=Js(),br=O(),pc=z(),Ws=class{constructor(e){Object.defineProperty(this,br.NODE_TYPE,{value:e})}clone(){let e=Object.create(Object.getPrototypeOf(this),Object.getOwnPropertyDescriptors(this));return this.range&&(e.range=this.range.slice()),e}toJS(e,{mapAsMap:t,maxAliasCount:n,onAnchor:i,reviver:r}={}){if(!br.isDocument(e))throw new TypeError("A document argument is required");let o={anchors:new Map,doc:e,keep:!0,mapAsMap:t===!0,mapKeyWarned:!1,maxAliasCount:typeof n=="number"?n:100},a=pc.toJS(this,"",o);if(typeof i=="function")for(let{count:l,res:c}of o.anchors.values())i(c,l);return typeof r=="function"?hc.applyReviver(r,{"":a},"",a):a}};wr.NodeBase=Ws});var Je=b(Sr=>{"use strict";var mc=Pt(),gc=Ke(),ve=O(),yc=Mt(),bc=z(),Gs=class extends yc.NodeBase{constructor(e){super(ve.ALIAS),this.source=e,Object.defineProperty(this,"tag",{set(){throw new Error("Alias nodes cannot have tags")}})}resolve(e,t){let n;t?.aliasResolveCache?n=t.aliasResolveCache:(n=[],gc.visit(e,{Node:(r,o)=>{(ve.isAlias(o)||ve.hasAnchor(o))&&n.push(o)}}),t&&(t.aliasResolveCache=n));let i;for(let r of n){if(r===this)break;r.anchor===this.source&&(i=r)}return i}toJSON(e,t){if(!t)return{source:this.source};let{anchors:n,doc:i,maxAliasCount:r}=t,o=this.resolve(i,t);if(!o){let l=`Unresolved alias (the anchor must be set before the alias): ${this.source}`;throw new ReferenceError(l)}let a=n.get(o);if(a||(bc.toJS(o,null,t),a=n.get(o)),a?.res===void 0){let l="This should not happen: Alias anchor was not resolved?";throw new ReferenceError(l)}if(r>=0&&(a.count+=1,a.aliasCount===0&&(a.aliasCount=$t(i,o,n)),a.count*a.aliasCount>r)){let l="Excessive alias count indicates a resource exhaustion attack";throw new ReferenceError(l)}return a.res}toString(e,t,n){let i=`*${this.source}`;if(e){if(mc.anchorIsValid(this.source),e.options.verifyAliasOrder&&!e.anchors.has(this.source)){let r=`Unresolved alias (the anchor must be set before the alias): ${this.source}`;throw new Error(r)}if(e.implicitKey)return`${i} `}return i}};function $t(s,e,t){if(ve.isAlias(e)){let n=e.resolve(s),i=t&&n&&t.get(n);return i?i.count*i.aliasCount:0}else if(ve.isCollection(e)){let n=0;for(let i of e.items){let r=$t(s,i,t);r>n&&(n=r)}return n}else if(ve.isPair(e)){let n=$t(s,e.key,t),i=$t(s,e.value,t);return Math.max(n,i)}return 1}Sr.Alias=Gs});var C=b(Xs=>{"use strict";var wc=O(),Sc=Mt(),Nc=z(),Ec=s=>!s||typeof s!="function"&&typeof s!="object",Z=class extends Sc.NodeBase{constructor(e){super(wc.SCALAR),this.value=e}toJSON(e,t){return t?.keep?this.value:Nc.toJS(this.value,e,t)}toString(){return String(this.value)}};Z.BLOCK_FOLDED="BLOCK_FOLDED";Z.BLOCK_LITERAL="BLOCK_LITERAL";Z.PLAIN="PLAIN";Z.QUOTE_DOUBLE="QUOTE_DOUBLE";Z.QUOTE_SINGLE="QUOTE_SINGLE";Xs.Scalar=Z;Xs.isScalarValue=Ec});var We=b(Er=>{"use strict";var vc=Je(),ue=O(),Nr=C(),Ac="tag:yaml.org,2002:";function Tc(s,e,t){if(e){let n=t.filter(r=>r.tag===e),i=n.find(r=>!r.format)??n[0];if(!i)throw new Error(`Tag ${e} not found`);return i}return t.find(n=>n.identify?.(s)&&!n.format)}function Oc(s,e,t){if(ue.isDocument(s)&&(s=s.contents),ue.isNode(s))return s;if(ue.isPair(s)){let f=t.schema[ue.MAP].createNode?.(t.schema,null,t);return f.items.push(s),f}(s instanceof String||s instanceof Number||s instanceof Boolean||typeof BigInt<"u"&&s instanceof BigInt)&&(s=s.valueOf());let{aliasDuplicateObjects:n,onAnchor:i,onTagObj:r,schema:o,sourceObjects:a}=t,l;if(n&&s&&typeof s=="object"){if(l=a.get(s),l)return l.anchor??(l.anchor=i(s)),new vc.Alias(l.anchor);l={anchor:null,node:null},a.set(s,l)}e?.startsWith("!!")&&(e=Ac+e.slice(2));let c=Tc(s,e,o.tags);if(!c){if(s&&typeof s.toJSON=="function"&&(s=s.toJSON()),!s||typeof s!="object"){let f=new Nr.Scalar(s);return l&&(l.node=f),f}c=s instanceof Map?o[ue.MAP]:Symbol.iterator in Object(s)?o[ue.SEQ]:o[ue.MAP]}r&&(r(c),delete t.onTagObj);let u=c?.createNode?c.createNode(t.schema,s,t):typeof c?.nodeClass?.from=="function"?c.nodeClass.from(t.schema,s,t):new Nr.Scalar(s);return e?u.tag=e:c.default||(u.tag=c.tag),l&&(l.node=u),u}Er.createNode=Oc});var xt=b(_t=>{"use strict";var kc=We(),G=O(),qc=Mt();function Ds(s,e,t){let n=t;for(let i=e.length-1;i>=0;--i){let r=e[i];if(typeof r=="number"&&Number.isInteger(r)&&r>=0){let o=[];o[r]=n,n=o}else n=new Map([[r,n]])}return kc.createNode(n,void 0,{aliasDuplicateObjects:!1,keepUndefined:!1,onAnchor:()=>{throw new Error("This should not happen, please report a bug.")},schema:s,sourceObjects:new Map})}var vr=s=>s==null||typeof s=="object"&&!!s[Symbol.iterator]().next().done,Qs=class extends qc.NodeBase{constructor(e,t){super(e),Object.defineProperty(this,"schema",{value:t,configurable:!0,enumerable:!1,writable:!0})}clone(e){let t=Object.create(Object.getPrototypeOf(this),Object.getOwnPropertyDescriptors(this));return e&&(t.schema=e),t.items=t.items.map(n=>G.isNode(n)||G.isPair(n)?n.clone(e):n),this.range&&(t.range=this.range.slice()),t}addIn(e,t){if(vr(e))this.add(t);else{let[n,...i]=e,r=this.get(n,!0);if(G.isCollection(r))r.addIn(i,t);else if(r===void 0&&this.schema)this.set(n,Ds(this.schema,i,t));else throw new Error(`Expected YAML collection at ${n}. Remaining path: ${i}`)}}deleteIn(e){let[t,...n]=e;if(n.length===0)return this.delete(t);let i=this.get(t,!0);if(G.isCollection(i))return i.deleteIn(n);throw new Error(`Expected YAML collection at ${t}. Remaining path: ${n}`)}getIn(e,t){let[n,...i]=e,r=this.get(n,!0);return i.length===0?!t&&G.isScalar(r)?r.value:r:G.isCollection(r)?r.getIn(i,t):void 0}hasAllNullValues(e){return this.items.every(t=>{if(!G.isPair(t))return!1;let n=t.value;return n==null||e&&G.isScalar(n)&&n.value==null&&!n.commentBefore&&!n.comment&&!n.tag})}hasIn(e){let[t,...n]=e;if(n.length===0)return this.has(t);let i=this.get(t,!0);return G.isCollection(i)?i.hasIn(n):!1}setIn(e,t){let[n,...i]=e;if(i.length===0)this.set(n,t);else{let r=this.get(n,!0);if(G.isCollection(r))r.setIn(i,t);else if(r===void 0&&this.schema)this.set(n,Ds(this.schema,i,t));else throw new Error(`Expected YAML collection at ${n}. Remaining path: ${i}`)}}};_t.Collection=Qs;_t.collectionFromPath=Ds;_t.isEmptyPath=vr});var Ge=b(Bt=>{"use strict";var Ic=s=>s.replace(/^(?!$)(?: $)?/gm,"#");function Hs(s,e){return/^\n+$/.test(s)?s.substring(1):e?s.replace(/^(?! *$)/gm,e):s}var Cc=(s,e,t)=>s.endsWith(`
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
- import{a as y}from"./chunk-SYG3IW7P.js";import{a as C}from"./chunk-JBABAK44.js";import{a as u,b as m}from"./chunk-GTNBSMZR.js";var x={name:"tr",summary:"translate or delete characters",usage:"tr [OPTION]... SET1 [SET2]",options:["-c, -C, --complement use the complement of SET1","-d, --delete delete characters in SET1","-s, --squeeze-repeats squeeze repeated characters"," --help display this help and exit"],description:`SET syntax:
2
+ import{a as y}from"./chunk-RLNOQILG.js";import{a as C}from"./chunk-JBABAK44.js";import{a as u,b as m}from"./chunk-GTNBSMZR.js";var x={name:"tr",summary:"translate or delete characters",usage:"tr [OPTION]... SET1 [SET2]",options:["-c, -C, --complement use the complement of SET1","-d, --delete delete characters in SET1","-s, --squeeze-repeats squeeze repeated characters"," --help display this help and exit"],description:`SET syntax:
3
3
  a-z character range
4
4
  [:alnum:] all letters and digits
5
5
  [:alpha:] all letters
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
- import{a}from"./chunk-SE4C7FJY.js";import{a as d}from"./chunk-SYG3IW7P.js";var S={name:"expr",async execute(s,r){if(s.length===0)return{stdout:"",stderr:`expr: missing operand
2
+ import{a}from"./chunk-SE4C7FJY.js";import{a as d}from"./chunk-RLNOQILG.js";var S={name:"expr",async execute(s,r){if(s.length===0)return{stdout:"",stderr:`expr: missing operand
3
3
  `,exitCode:2};try{let c=x(s),h=c==="0"||c===""?1:0;return{stdout:`${c}
4
4
  `,stderr:"",exitCode:h}}catch(c){return{stdout:"",stderr:`expr: ${d(c.message)}
5
5
  `,exitCode:2}}}};function x(s){if(s.length===1)return s[0];let r=0;function c(){let e=h();for(;r<s.length&&s[r]==="|";){r++;let t=h();if(e!=="0"&&e!=="")return e;e=t}return e}function h(){let e=m();for(;r<s.length&&s[r]==="&";){r++;let t=m();(e==="0"||e===""||t==="0"||t==="")&&(e="0")}return e}function m(){let e=g();for(;r<s.length;){let t=s[r];if(["=","!=","<",">","<=",">="].includes(t)){r++;let o=g(),n=parseInt(e,10),i=parseInt(o,10),f=!Number.isNaN(n)&&!Number.isNaN(i),l;t==="="?l=f?n===i:e===o:t==="!="?l=f?n!==i:e!==o:t==="<"?l=f?n<i:e<o:t===">"?l=f?n>i:e>o:t==="<="?l=f?n<=i:e<=o:l=f?n>=i:e>=o,e=l?"1":"0"}else break}return e}function g(){let e=p();for(;r<s.length;){let t=s[r];if(t==="+"||t==="-"){r++;let o=p(),n=parseInt(e,10),i=parseInt(o,10);if(Number.isNaN(n)||Number.isNaN(i))throw new Error("non-integer argument");e=String(t==="+"?n+i:n-i)}else break}return e}function p(){let e=N();for(;r<s.length;){let t=s[r];if(t==="*"||t==="/"||t==="%"){r++;let o=N(),n=parseInt(e,10),i=parseInt(o,10);if(Number.isNaN(n)||Number.isNaN(i))throw new Error("non-integer argument");if((t==="/"||t==="%")&&i===0)throw new Error("division by zero");t==="*"?e=String(n*i):t==="/"?e=String(Math.trunc(n/i)):e=String(n%i)}else break}return e}function N(){let e=u();for(;r<s.length&&s[r]===":";){r++;let t=u(),n=a(`^${t}`).match(e);n?e=n[1]!==void 0?n[1]:String(n[0].length):e="0"}return e}function u(){if(r>=s.length)throw new Error("syntax error");let e=s[r];if(e==="match"){r++;let t=u(),o=u(),i=a(o).match(t);return i?i[1]!==void 0?i[1]:String(i[0].length):"0"}if(e==="substr"){r++;let t=u(),o=parseInt(u(),10),n=parseInt(u(),10);if(Number.isNaN(o)||Number.isNaN(n))throw new Error("non-integer argument");return t.substring(o-1,o-1+n)}if(e==="index"){r++;let t=u(),o=u();for(let n=0;n<t.length;n++)if(o.includes(t[n]))return String(n+1);return"0"}if(e==="length"){r++;let t=u();return String(t.length)}if(e==="("){r++;let t=c();if(r>=s.length||s[r]!==")")throw new Error("syntax error");return r++,t}return r++,e}return c()}var E={name:"expr",flags:[],needsArgs:!0};export{S as a,E as b};
@@ -0,0 +1,2 @@
1
+ #!/usr/bin/env node
2
+ function a(r,s,t){if(!r)return r;let e=r.replace(/\n\s+at\s.*/g,"");return t&&(e=e.replace(/\bfile:\/\/\/?[^\s'",)}\]:]+/g,"<path>")),e=e.replace(s?/(?:\/(?:Users|home|private|var|opt|Library|System|usr|etc|tmp|nix|snap|workspace|root|srv|mnt|app))\b[^\s'",)}\]:]*/g:/(?:\/(?:Users|home|private|var|opt|Library|System|usr|etc|tmp|nix|snap))\b[^\s'",)}\]:]*/g,"<path>"),e=e.replace(/node:internal\/[^\s'",)}\]:]+/g,"<internal>"),e=e.replace(/[A-Z]:\\[^\s'",)}\]:]+/g,"<path>"),t&&(e=e.replace(/\\\\[^\s\\]+\\[^\s'",)}\]:]+/g,"<path>")),e}function n(r){return a(r,!1,!1)}function i(r){return a(r,!0,!0)}export{n as a,i as b};
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
- import{a as W,b as U}from"./chunk-MO4RPBN2.js";import{a as I}from"./chunk-YU6OGPZR.js";import{a as A}from"./chunk-SE4C7FJY.js";import{k}from"./chunk-6KZRLMG3.js";import{a as L}from"./chunk-SYG3IW7P.js";import{a as ee,b as te,c as P}from"./chunk-GTNBSMZR.js";var z=new Map([["alnum","a-zA-Z0-9"],["alpha","a-zA-Z"],["ascii","\\x00-\\x7F"],["blank"," \\t"],["cntrl","\\x00-\\x1F\\x7F"],["digit","0-9"],["graph","!-~"],["lower","a-z"],["print"," -~"],["punct","!-/:-@\\[-`{-~"],["space"," \\t\\n\\r\\f\\v"],["upper","A-Z"],["word","a-zA-Z0-9_"],["xdigit","0-9A-Fa-f"]]);function H(i){let e="",t=0,n=!1;for(;t<i.length;){if(i[t]==="["&&!n){if(i[t+1]==="["&&i[t+2]===":"){let s=i.indexOf(":]]",t+3);if(s!==-1){let a=i.slice(t+3,s),r=z.get(a);if(r){e+=`[${r}]`,t=s+3;continue}}}if(i[t+1]==="^"&&i[t+2]==="["&&i[t+3]===":"){let s=i.indexOf(":]]",t+4);if(s!==-1){let a=i.slice(t+4,s),r=z.get(a);if(r){e+=`[^${r}]`,t=s+3;continue}}}e+="[",t++,n=!0,t<i.length&&i[t]==="^"&&(e+="^",t++),t<i.length&&i[t]==="]"&&(e+="\\]",t++);continue}if(n){if(i[t]==="]"){e+="]",t++,n=!1;continue}if(i[t]==="["&&i[t+1]===":"){let s=i.indexOf(":]",t+2);if(s!==-1){let a=i.slice(t+2,s),r=z.get(a);if(r){e+=r,t=s+2;continue}}}if(i[t]==="\\"&&t+1<i.length){e+=i[t]+i[t+1],t+=2;continue}e+=i[t],t++;continue}if(i[t]==="\\"&&t+1<i.length){let s=i[t+1];if(s==="+"||s==="?"||s==="|"){e+=s,t+=2;continue}if(s==="("||s===")"){e+=s,t+=2;continue}if(s==="{"||s==="}"){e+=s,t+=2;continue}if(s==="t"){e+=" ",t+=2;continue}if(s==="n"){e+=`
2
+ import{a as W,b as U}from"./chunk-MO4RPBN2.js";import{a as I}from"./chunk-YU6OGPZR.js";import{a as A}from"./chunk-SE4C7FJY.js";import{k}from"./chunk-6KZRLMG3.js";import{a as L}from"./chunk-RLNOQILG.js";import{a as ee,b as te,c as P}from"./chunk-GTNBSMZR.js";var z=new Map([["alnum","a-zA-Z0-9"],["alpha","a-zA-Z"],["ascii","\\x00-\\x7F"],["blank"," \\t"],["cntrl","\\x00-\\x1F\\x7F"],["digit","0-9"],["graph","!-~"],["lower","a-z"],["print"," -~"],["punct","!-/:-@\\[-`{-~"],["space"," \\t\\n\\r\\f\\v"],["upper","A-Z"],["word","a-zA-Z0-9_"],["xdigit","0-9A-Fa-f"]]);function H(i){let e="",t=0,n=!1;for(;t<i.length;){if(i[t]==="["&&!n){if(i[t+1]==="["&&i[t+2]===":"){let s=i.indexOf(":]]",t+3);if(s!==-1){let a=i.slice(t+3,s),r=z.get(a);if(r){e+=`[${r}]`,t=s+3;continue}}}if(i[t+1]==="^"&&i[t+2]==="["&&i[t+3]===":"){let s=i.indexOf(":]]",t+4);if(s!==-1){let a=i.slice(t+4,s),r=z.get(a);if(r){e+=`[^${r}]`,t=s+3;continue}}}e+="[",t++,n=!0,t<i.length&&i[t]==="^"&&(e+="^",t++),t<i.length&&i[t]==="]"&&(e+="\\]",t++);continue}if(n){if(i[t]==="]"){e+="]",t++,n=!1;continue}if(i[t]==="["&&i[t+1]===":"){let s=i.indexOf(":]",t+2);if(s!==-1){let a=i.slice(t+2,s),r=z.get(a);if(r){e+=r,t=s+2;continue}}}if(i[t]==="\\"&&t+1<i.length){e+=i[t]+i[t+1],t+=2;continue}e+=i[t],t++;continue}if(i[t]==="\\"&&t+1<i.length){let s=i[t+1];if(s==="+"||s==="?"||s==="|"){e+=s,t+=2;continue}if(s==="("||s===")"){e+=s,t+=2;continue}if(s==="{"||s==="}"){e+=s,t+=2;continue}if(s==="t"){e+=" ",t+=2;continue}if(s==="n"){e+=`
3
3
  `,t+=2;continue}if(s==="r"){e+="\r",t+=2;continue}e+=i[t]+s,t+=2;continue}if(i[t]==="+"||i[t]==="?"||i[t]==="|"||i[t]==="("||i[t]===")"){e+=`\\${i[t]}`,t++;continue}if(i[t]==="^"&&!(e===""||e.endsWith("("))){e+="\\^",t++;continue}if(i[t]==="$"){let s=t===i.length-1,a=t+2<i.length&&i[t+1]==="\\"&&i[t+2]===")";if(!s&&!a){e+="\\$",t++;continue}}e+=i[t],t++}return e}function V(i){let e="",t=!1;for(let n=0;n<i.length;n++)i[n]==="["&&!t?(t=!0,e+="[",n++,n<i.length&&i[n]==="^"&&(e+="^",n++),n<i.length&&i[n]==="]"&&(e+="]",n++),n--):i[n]==="]"&&t?(t=!1,e+="]"):!t&&i[n]==="{"&&i[n+1]===","?(e+="{0,",n++):e+=i[n];return e}function ne(i){let e="";for(let t=0;t<i.length;t++){let n=i[t],s=n.charCodeAt(0);n==="\\"?e+="\\\\":n===" "?e+="\\t":n===`
4
4
  `?e+=`$
5
5
  `:n==="\r"?e+="\\r":n==="\x07"?e+="\\a":n==="\b"?e+="\\b":n==="\f"?e+="\\f":n==="\v"?e+="\\v":s<32||s>=127?e+=`\\${s.toString(8).padStart(3,"0")}`:e+=n}return`${e}$`}var de=1e4;function se(i,e,t){return{patternSpace:"",holdSpace:"",lineNumber:0,totalLines:i,deleted:!1,printed:!1,quit:!1,quitSilent:!1,exitCode:void 0,errorMessage:void 0,appendBuffer:[],substitutionMade:!1,lineNumberOutput:[],nCommandOutput:[],restartCycle:!1,inDRestartedCycle:!1,currentFilename:e,pendingFileReads:[],pendingFileWrites:[],rangeStates:t||new Map,linesConsumedInCycle:0}}function pe(i){return typeof i=="object"&&"first"in i&&"step"in i}function me(i){return typeof i=="object"&&"offset"in i}function N(i,e,t,n,s){if(i==="$")return e===t;if(typeof i=="number")return e===i;if(pe(i)){let{first:a,step:r}=i;return r===0?e===a:(e-a)%r===0&&e>=a}if(typeof i=="object"&&"pattern"in i)try{let a=i.pattern;a===""&&s?.lastPattern?a=s.lastPattern:a!==""&&s&&(s.lastPattern=a);let r=V(H(a));return A(r).test(n)}catch{return!1}return!1}function X(i){let e=t=>t===void 0?"undefined":t==="$"?"$":typeof t=="number"?String(t):"pattern"in t?`/${t.pattern}/`:"first"in t?`${t.first}~${t.step}`:"unknown";return`${e(i.start)},${e(i.end)}`}function ge(i,e,t,n,s,a){if(!i||!i.start&&!i.end)return!0;let r=i.start,l=i.end;if(r!==void 0&&l===void 0)return N(r,e,t,n,a);if(r!==void 0&&l!==void 0){let c=typeof r=="object"&&"pattern"in r,f=typeof l=="object"&&"pattern"in l,p=me(l);if(p&&s){let g=X(i),d=s.get(g);if(d||(d={active:!1},s.set(g,d)),d.active){let E=d.startLine||e;return e>=E+l.offset&&(d.active=!1,s.set(g,d)),!0}else return N(r,e,t,n,a)?(d.active=!0,d.startLine=e,s.set(g,d),l.offset===0&&(d.active=!1,s.set(g,d)),!0):!1}if(!c&&!f&&!p){let g=typeof r=="number"?r:r==="$"?t:1,d=typeof l=="number"?l:t;if(g<=d)return e>=g&&e<=d;if(s){let E=X(i),u=s.get(E);return u||(u={active:!1},s.set(E,u)),!u.completed&&e>=g?(u.completed=!0,s.set(E,u),!0):!1}return!1}if(s){let g=X(i),d=s.get(g);if(d||(d={active:!1},s.set(g,d)),d.active)return N(l,e,t,n,a)&&(d.active=!1,typeof r=="number"&&(d.completed=!0),s.set(g,d)),!0;{if(d.completed)return!1;let E=!1;return typeof r=="number"?E=e>=r:E=N(r,e,t,n,a),E?(d.active=!0,d.startLine=e,s.set(g,d),N(l,e,t,n,a)&&(d.active=!1,typeof r=="number"&&(d.completed=!0),s.set(g,d)),!0):!1}}return N(r,e,t,n,a)}return!0}function w(i,e,t,n,s,a){let r=ge(i,e,t,n,s,a);return i?.negated?!r:r}function be(i,e,t,n){let s="",a=0,r=!1;for(;a<=i.length;){e.lastIndex=a;let l=e.exec(i);if(!l){s+=i.slice(a);break}if(l.index!==a){s+=i.slice(a,l.index),a=l.index,r=!1;continue}let c=l[0],f=l.slice(1);if(r&&c.length===0){if(a<i.length)s+=i[a],a++;else break;r=!1;continue}if(s+=n(c,f),r=!1,c.length===0)if(a<i.length)s+=i[a],a++;else break;else a+=c.length,r=!0}return s}function G(i,e,t){let n="",s=0;for(;s<i.length;){if(i[s]==="\\"&&s+1<i.length){let a=i[s+1];if(a==="&"){n+="&",s+=2;continue}if(a==="n"){n+=`
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
- import{a as C,b as L}from"./chunk-ZO5PSLKR.js";import{d as b}from"./chunk-V7ZOPVQS.js";import{a as F,b as z}from"./chunk-MO4RPBN2.js";import{a as J}from"./chunk-YU6OGPZR.js";import{a as D}from"./chunk-5WFYIUU2.js";import{k as $}from"./chunk-6KZRLMG3.js";import{a as E}from"./chunk-SYG3IW7P.js";import{a as I,b as k,c as O}from"./chunk-GTNBSMZR.js";function A(s){let r=[],t=0,l=s.length;for(;t<l;){for(;t<l&&/\s/.test(s[t]);)t++;if(t>=l)break;let u=t,n=s[t];if(n==="{"||n==="["){let i=n,a=n==="{"?"}":"]",c=1,p=!1,d=!1;for(t++;t<l&&c>0;){let h=s[t];d?d=!1:h==="\\"?d=!0:h==='"'?p=!p:p||(h===i?c++:h===a&&c--),t++}if(c!==0)throw new Error(`Unexpected end of JSON input at position ${t} (unclosed ${i})`);r.push(b(JSON.parse(s.slice(u,t))))}else if(n==='"'){let i=!1;for(t++;t<l;){let a=s[t];if(i)i=!1;else if(a==="\\")i=!0;else if(a==='"'){t++;break}t++}r.push(b(JSON.parse(s.slice(u,t))))}else if(n==="-"||n>="0"&&n<="9"){for(;t<l&&/[\d.eE+-]/.test(s[t]);)t++;r.push(b(JSON.parse(s.slice(u,t))))}else if(s.slice(t,t+4)==="true")r.push(!0),t+=4;else if(s.slice(t,t+5)==="false")r.push(!1),t+=5;else if(s.slice(t,t+4)==="null")r.push(null),t+=4;else{let i=s.slice(t,t+10);throw new Error(`Invalid JSON at position ${u}: unexpected '${i.split(/\s/)[0]}'`)}}return r}var W={name:"jq",summary:"command-line JSON processor",usage:"jq [OPTIONS] FILTER [FILE]",options:["-r, --raw-output output strings without quotes","-c, --compact compact output (no pretty printing)","-e, --exit-status set exit status based on output","-s, --slurp read entire input into array","-n, --null-input don't read any input","-j, --join-output don't print newlines after each output","-a, --ascii force ASCII output","-S, --sort-keys sort object keys","-C, --color colorize output (ignored)","-M, --monochrome monochrome output (ignored)"," --tab use tabs for indentation"," --help display this help and exit"]};function j(s,r,t,l,u,n=0){if(s===null||s===void 0)return"null";if(typeof s=="boolean")return String(s);if(typeof s=="number")return Number.isFinite(s)?String(s):"null";if(typeof s=="string")return t?s:JSON.stringify(s);let i=u?" ":" ";if(Array.isArray(s))return s.length===0?"[]":r?`[${s.map(c=>j(c,!0,!1,l,u)).join(",")}]`:`[
2
+ import{a as C,b as L}from"./chunk-ZO5PSLKR.js";import{d as b}from"./chunk-V7ZOPVQS.js";import{a as F,b as z}from"./chunk-MO4RPBN2.js";import{a as J}from"./chunk-YU6OGPZR.js";import{a as D}from"./chunk-5WFYIUU2.js";import{k as $}from"./chunk-6KZRLMG3.js";import{a as E}from"./chunk-RLNOQILG.js";import{a as I,b as k,c as O}from"./chunk-GTNBSMZR.js";function A(s){let r=[],t=0,l=s.length;for(;t<l;){for(;t<l&&/\s/.test(s[t]);)t++;if(t>=l)break;let u=t,n=s[t];if(n==="{"||n==="["){let i=n,a=n==="{"?"}":"]",c=1,p=!1,d=!1;for(t++;t<l&&c>0;){let h=s[t];d?d=!1:h==="\\"?d=!0:h==='"'?p=!p:p||(h===i?c++:h===a&&c--),t++}if(c!==0)throw new Error(`Unexpected end of JSON input at position ${t} (unclosed ${i})`);r.push(b(JSON.parse(s.slice(u,t))))}else if(n==='"'){let i=!1;for(t++;t<l;){let a=s[t];if(i)i=!1;else if(a==="\\")i=!0;else if(a==='"'){t++;break}t++}r.push(b(JSON.parse(s.slice(u,t))))}else if(n==="-"||n>="0"&&n<="9"){for(;t<l&&/[\d.eE+-]/.test(s[t]);)t++;r.push(b(JSON.parse(s.slice(u,t))))}else if(s.slice(t,t+4)==="true")r.push(!0),t+=4;else if(s.slice(t,t+5)==="false")r.push(!1),t+=5;else if(s.slice(t,t+4)==="null")r.push(null),t+=4;else{let i=s.slice(t,t+10);throw new Error(`Invalid JSON at position ${u}: unexpected '${i.split(/\s/)[0]}'`)}}return r}var W={name:"jq",summary:"command-line JSON processor",usage:"jq [OPTIONS] FILTER [FILE]",options:["-r, --raw-output output strings without quotes","-c, --compact compact output (no pretty printing)","-e, --exit-status set exit status based on output","-s, --slurp read entire input into array","-n, --null-input don't read any input","-j, --join-output don't print newlines after each output","-a, --ascii force ASCII output","-S, --sort-keys sort object keys","-C, --color colorize output (ignored)","-M, --monochrome monochrome output (ignored)"," --tab use tabs for indentation"," --help display this help and exit"]};function j(s,r,t,l,u,n=0){if(s===null||s===void 0)return"null";if(typeof s=="boolean")return String(s);if(typeof s=="number")return Number.isFinite(s)?String(s):"null";if(typeof s=="string")return t?s:JSON.stringify(s);let i=u?" ":" ";if(Array.isArray(s))return s.length===0?"[]":r?`[${s.map(c=>j(c,!0,!1,l,u)).join(",")}]`:`[
3
3
  ${s.map(c=>i.repeat(n+1)+j(c,!1,!1,l,u,n+1)).join(`,
4
4
  `)}
5
5
  ${i.repeat(n)}]`;if(typeof s=="object"){let a=Object.keys(s);return l&&(a=a.sort()),a.length===0?"{}":r?`{${a.map(p=>`${JSON.stringify(p)}:${j(s[p],!0,!1,l,u)}`).join(",")}}`:`{
@@ -0,0 +1,63 @@
1
+ #!/usr/bin/env node
2
+ import{a as ye}from"./chunk-YMMJLYIX.js";import{b as ee}from"./chunk-YU6OGPZR.js";import{a as O}from"./chunk-SE4C7FJY.js";import{a as we,b as Se,c as te}from"./chunk-GTNBSMZR.js";var ie="file",_e="link",Te="symlink",H="directory",Ve={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"},Je={0:ie,1:_e,2:Te,3:"character-device",4:"block-device",5:H,6:"fifo",x:"pax-header",g:"pax-global-header",L:"gnu-long-name",K:"gnu-long-link-name"},Qe=new Uint8Array(512),G=new Uint8Array(0),M=new TextEncoder,xe=new TextDecoder;function z(e,t,i,r){r&&M.encodeInto(r,e.subarray(t,t+i))}function B(e,t,i,r){if(r===void 0)return;let n=r.toString(8).padStart(i-1,"0");M.encodeInto(n,e.subarray(t,t+i-1))}function v(e,t,i){let r=e.indexOf(0,t),n=r===-1||r>t+i?t+i:r;return xe.decode(e.subarray(t,n))}function se(e,t,i){let r=0,n=t+i;for(let s=t;s<n;s++){let o=e[s];if(o===0)break;o!==32&&(r=r*8+(o-48))}return r}function D(e,t,i){if(e[t]&128){let r=0;r=e[t]&127;for(let n=1;n<i;n++)r=r*256+e[t+n];if(!Number.isSafeInteger(r))throw new Error("TAR number too large");return r}return se(e,t,i)}var Z=e=>e.type===H||e.type===Te||e.type===_e;async function Ce(e){if(e==null)return G;if(e instanceof Uint8Array)return e;if(typeof e=="string")return M.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 be(e,t){let{strip:i,filter:r,map:n}=t;if(!i&&!r&&!n)return e;let s={...e};if(i&&i>0){let a=s.name.split("/").filter(Boolean);if(i>=a.length)return null;let c=a.slice(i).join("/");if(s.name=s.type===H&&!c.endsWith("/")?`${c}/`:c,s.linkname?.startsWith("/")){let l=s.linkname.split("/").filter(Boolean);s.linkname=i>=l.length?"/":`/${l.slice(i).join("/")}`}}if(r?.(s)===!1)return null;let o=n?n(s):s;return o&&(!o.name||!o.name.trim()||o.name==="."||o.name==="/")?null:o}var ne=32,et=48;function tt(e){let t=se(e,148,8),i=0;for(let r=0;r<e.length;r++)r>=148&&r<156?i+=ne:i+=e[r];return t===i}function rt(e){e.fill(ne,148,156);let t=0;for(let i of e)t+=i;for(let i=153;i>=148;i--)e[i]=(t&7)+et,t>>=3;e[154]=0,e[155]=ne}function nt(e){let t={};e.name.length>100&&Ue(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 i=Object.entries(t);if(i.length===0)return null;let r=M.encode(i.map(([n,s])=>{let o=`${n}=${s}
3
+ `,a=M.encode(o).length+1,c=a+String(a).length;return c=a+String(c).length,`${c} ${o}`}).join(""));return{paxHeader:Ie({name:xe.decode(M.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 Ue(e){if(e.length<=100)return null;let t=e.length-100-1,i=e.lastIndexOf("/",155);return i>0&&i>=t?{prefix:e.slice(0,i),name:e.slice(i+1)}:null}function Ie(e){let t=new Uint8Array(512),i=Z(e)?0:e.size??0,r=e.name,n="";if(!e.pax?.path){let s=Ue(r);s&&(r=s.name,n=s.prefix)}return z(t,0,100,r),B(t,100,8,e.mode??(e.type===H?493:420)),B(t,108,8,e.uid??0),B(t,116,8,e.gid??0),B(t,124,12,i),B(t,136,12,Math.floor((e.mtime?.getTime()??Date.now())/1e3)),z(t,156,1,Ve[e.type??ie]),z(t,157,100,e.linkname),z(t,257,6,"ustar\0"),z(t,263,2,"00"),z(t,265,32,e.uname),z(t,297,32,e.gname),z(t,345,155,n),rt(t),t}function it(e,t){if(t&&!tt(e))throw new Error("Invalid tar header checksum.");let i=v(e,156,1),r={name:v(e,0,100),mode:se(e,100,8),uid:D(e,108,8),gid:D(e,116,8),size:D(e,124,12),mtime:new Date(D(e,136,12)*1e3),type:Je[i]||ie,linkname:v(e,157,100)},n=v(e,257,6);return n.trim()==="ustar"&&(r.uname=v(e,265,32),r.gname=v(e,297,32)),n==="ustar"&&(r.prefix=v(e,345,155)),r}var st={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 ot(e){let t=new TextDecoder("utf-8"),i={},r={},n=0;for(;n<e.length;){let s=e.indexOf(32,n);if(s===-1)break;let o=parseInt(t.decode(e.subarray(n,s)),10);if(Number.isNaN(o)||o===0)break;let a=n+o,[c,l]=t.decode(e.subarray(s+1,a-1)).split("=",2);if(c&&l!==void 0){r[c]=l;let f=st[c];if(f){let[u,w]=f,g=w(l);(typeof g=="string"||!Number.isNaN(g))&&(i[u]=g)}}n=a}return Object.keys(r).length>0&&(i.pax=r),i}function Ee(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 at(e){switch(e){case"pax-global-header":case"pax-header":return ot;case"gnu-long-name":return t=>({name:v(t,0,t.length)});case"gnu-long-link-name":return t=>({linkname:v(t,0,t.length)});default:return}}function ct(e){let t=Ie(e),i=nt(e);if(!i)return[t];let r=-i.paxBody.length&511,n=r>0?[Qe.subarray(0,r)]:[];return[i.paxHeader,i.paxBody,...n,t]}var lt=new Uint8Array(512*2);function ve(e,t,i){let r=null,n=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=Z(o)?0:o.size??0,c=ct({...o,size:a});for(let l of c)e(l);r={...o,size:a},n=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=n+o.length;if(a>r.size){let c=new Error(`"${r.name}" exceeds given size of ${r.size} bytes.`);throw t(c),c}try{n=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(n!==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,n=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(lt),s=!0,i&&i()}catch(o){t(o)}}}}var P=256;function ft(){let e=new Array(P),t=e.length-1,i=0,r=0,n=0,s=a=>{let c=e[i];a===c.length?(e[i]=G,i=i+1&t):e[i]=c.subarray(a),n-=a,n===0&&e.length>P&&(e=new Array(P),t=P-1,i=0,r=0)};function o(a,c){if(c){let g=0,h=Math.min(a,n);for(;h>0;){let p=e[i],m=Math.min(h,p.length),E=m===p.length?p:p.subarray(0,m);if(s(m),h-=m,g+=m,!c(E))break}return g}if(n<a)return null;if(a===0)return G;let l=e[i];if(l.length>=a){let g=l.length===a?l:l.subarray(0,a);return s(a),g}let f=new Uint8Array(a),u=0,w=a;for(;w>0;){let g=e[i],h=Math.min(w,g.length);f.set(h===g.length?g:g.subarray(0,h),u),u+=h,w-=h,s(h)}return f}return{push:a=>{if(a.length===0)return;let c=r+1&t;if(c===i){let l=e.length,f=l*2,u=new Array(f),w=r-i+l&l-1;if(i<r)for(let g=0;g<w;g++)u[g]=e[i+g];else if(w>0){let g=l-i;for(let h=0;h<g;h++)u[h]=e[i+h];for(let h=0;h<r;h++)u[g+h]=e[h]}e=u,t=f-1,i=0,r=w,c=r+1&t}e[r]=a,r=c,n+=a.length},available:()=>n,peek:a=>{if(n<a)return null;if(a===0)return G;let c=e[i];if(c.length>=a)return c.length===a?c:c.subarray(0,a);let l=new Uint8Array(a),f=0,u=i;for(;f<a;){let w=e[u],g=Math.min(a-f,w.length);g===w.length?l.set(w,f):l.set(w.subarray(0,g),f),f+=g,u=u+1&t}return l},discard:a=>{if(a>n)throw new Error("Too many bytes consumed");if(a===0)return;let c=a;for(;c>0;){let l=e[i],f=Math.min(c,l.length);s(f),c-=f}},pull:o}}var re=0,$=1,K=new Error("Tar archive is truncated.");function ke(e={}){let t=e.strict??!1,{available:i,peek:r,push:n,discard:s,pull:o}=ft(),a=re,c=!1,l=!1,f=!1,u=null,w={},g={},h={isEntryActive:()=>a===$,isBodyComplete:()=>!u||u.remaining===0,write(p){if(c)throw new Error("Archive already ended.");n(p)},end(){c=!0},readHeader(){if(a!==re)throw new Error("Cannot read header while an entry is active");if(!l)for(;!l;){if(i()<512){if(c){if(i()>0&&t)throw K;l=!0;return}return null}let p=r(512);if(Ae(p)){if(i()<512*2){if(c){if(t)throw K;l=!0;return}return null}if(Ae(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=it(p,t)}catch(b){if(t)throw b;s(512);continue}let E=at(m.type);if(E){let b=m.size+511&-512;if(i()<512+b){if(c&&t)throw K;return null}s(512);let A=E(o(b).subarray(0,m.size)),U=m.type==="pax-global-header"?w:g;for(let T in A)U[T]=A[T];continue}s(512);let y=m;return m.prefix&&(y.name=`${m.prefix}/${y.name}`),Ee(y,w),Ee(y,g),g={},u={header:y,remaining:y.size,padding:-y.size&511},a=$,y}},streamBody(p){if(a!==$||!u||u.remaining===0)return 0;let m=Math.min(u.remaining,i());if(m===0)return 0;let E=o(m,p);return u.remaining-=E,E},skipPadding(){if(a!==$||!u)return!0;if(u.remaining>0)throw new Error("Body not fully consumed");return i()<u.padding?!1:(s(u.padding),u=null,a=re,!0)},skipEntry(){if(a!==$||!u)return!0;let p=Math.min(u.remaining,i());return p>0&&(s(p),u.remaining-=p),u.remaining>0?!1:h.skipPadding()},validateEOF(){if(t){if(!f)throw K;if(i()>0&&o(i()).some(p=>p!==0))throw new Error("Invalid EOF.")}}};return h}function Ae(e){if(e.byteOffset%8===0){let t=new BigUint64Array(e.buffer,e.byteOffset,e.length/8);for(let i=0;i<t.length;i++)if(t[i]!==0n)return!1;return!0}for(let t=0;t<e.length;t++)if(e[t]!==0)return!1;return!0}function ze(){return new CompressionStream("gzip")}function Re(){return new DecompressionStream("gzip")}function ut(){let e,t;return{readable:new ReadableStream({start(i){e=i,t=ve(i.enqueue.bind(i),i.error.bind(i),i.close.bind(i))}}),controller:{add(i){let r=Z(i),n={...i};return r&&(n.size=0),t.add(n),r&&t.endEntry(),new WritableStream({write(s){t.write(s)},close(){r||t.endEntry()},abort(s){e.error(s)}})},finalize(){t.finalize()},error(i){e.error(i)}}}}async function Oe(e){let t=[],i=e.getReader(),r=0;try{for(;;){let{done:o,value:a}=await i.read();if(o)break;t.push(a),r+=a.length}let n=new Uint8Array(r),s=0;for(let o of t)n.set(o,s),s+=o.length;return n}finally{i.releaseLock()}}var Fe=e=>e.pipeTo(new WritableStream);function dt(e={}){let t=ke(e),i=null,r=!1,n=s=>{if(!r){r=!0;try{for(;;)if(t.isEntryActive()){if(i){if(t.streamBody(o=>(i.enqueue(o),!0))===0&&!t.isBodyComplete())break}else if(!t.skipEntry())break;if(t.isBodyComplete()){try{i?.close()}catch{}if(i=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():i=a},pull:()=>n(s),cancel(){i=null,n(s)}})})}}catch(o){try{i?.error(o)}catch{}throw i=null,o}finally{r=!1}}};return new TransformStream({transform(s,o){try{t.write(s),n(o)}catch(a){try{i?.error(a)}catch{}throw a}},flush(s){try{if(t.end(),n(s),t.validateEOF(),t.isEntryActive()&&!t.isBodyComplete())try{i?.close()}catch{}}catch(o){try{i?.error(o)}catch{}throw o}}},void 0,{highWaterMark:1})}async function Me(e){let{readable:t,controller:i}=ut();return await(async()=>{for(let r of e){let n=i.add(r.header),s="body"in r?r.body:r.data;if(!s){await n.close();continue}if(s instanceof ReadableStream)await s.pipeTo(n);else if(s instanceof Blob)await s.stream().pipeTo(n);else try{let o=await Ce(s);if(o.length>0){let a=n.getWriter();await a.write(o),await a.close()}else await n.close()}catch{throw new TypeError(`Unsupported content type for entry "${r.header.name}".`)}}})().then(()=>i.finalize()).catch(r=>i.error(r)),new Uint8Array(await Oe(t))}async function Be(e,t={}){let i=e instanceof ReadableStream?e:new ReadableStream({start(s){s.enqueue(e instanceof Uint8Array?e:new Uint8Array(e)),s.close()}}),r=[],n=i.pipeThrough(dt(t));for await(let s of n){let o;try{o=be(s.header,t)}catch(a){throw await s.body.cancel(),a}if(o===null){await Fe(s.body);continue}Z(o)?(await Fe(s.body),r.push({header:o})):r.push({header:o,data:await Oe(s.body)})}return r}import Tt from"seek-bzip";var mt=(()=>{let e=new Uint32Array(256);for(let t=0;t<256;t++){let i=t<<24;for(let r=0;r<8;r++)i=i&2147483648?i<<1^79764919:i<<1;e[t]=i>>>0}return e})();function ht(e,t){return(e<<8^mt[(e>>>24^t)&255])>>>0}var oe=class{buffer=[];current=0;bitCount=0;writeBits(t,i){for(let r=t-1;r>=0;r--)this.current=this.current<<1|i>>>r&1,this.bitCount++,this.bitCount===8&&(this.buffer.push(this.current),this.current=0,this.bitCount=0)}writeBit(t){this.current=this.current<<1|t&1,this.bitCount++,this.bitCount===8&&(this.buffer.push(this.current),this.current=0,this.bitCount=0)}finish(){return this.bitCount>0&&this.buffer.push(this.current<<8-this.bitCount),new Uint8Array(this.buffer)}};function pt(e){let t=[],i=0;for(;i<e.length;){let r=e[i],n=1;for(;i+n<e.length&&e[i+n]===r&&n<255;)n++;n>=4?(t.push(r,r,r,r),t.push(n-4),i+=n):(t.push(r),i++)}return new Uint8Array(t)}function gt(e){let t=e.length;if(t===0)return{transformed:new Uint8Array(0),pointer:0};let i=wt(e),r=new Uint8Array(t),n=0;for(let s=0;s<t;s++)i[s]===0?(n=s,r[s]=e[t-1]):r[s]=e[i[s]-1];return{transformed:r,pointer:n}}function wt(e){let t=e.length,i=new Int32Array(t),r=new Int32Array(t);for(let n=0;n<t;n++)i[n]=n,r[n]=e[n];for(let n=1;n<t;n*=2){let s=r.slice();i.sort((o,a)=>s[o]!==s[a]?s[o]-s[a]:s[(o+n)%t]-s[(a+n)%t]),r[i[0]]=0;for(let o=1;o<t;o++)s[i[o]]===s[i[o-1]]&&s[(i[o]+n)%t]===s[(i[o-1]+n)%t]?r[i[o]]=r[i[o-1]]:r[i[o]]=r[i[o-1]]+1;if(r[i[t-1]]===t-1)break}return i}function St(e,t){let i=[];for(let o=0;o<256;o++)t[o]&&i.push(o);let r=new Array(256).fill(-1);for(let o=0;o<i.length;o++)r[i[o]]=o;let n=new Uint16Array(e.length),s=i.slice();for(let o=0;o<e.length;o++){let a=e[o],c=0;for(;s[c]!==a;)c++;if(n[o]=c,c>0){let l=s[c];for(let f=c;f>0;f--)s[f]=s[f-1];s[0]=l}}return{encoded:n,length:e.length}}function yt(e,t,i){let s=i+1,o=[],a=0;for(;a<t;)if(e[a]===0){let l=0;for(;a<t&&e[a]===0;)l++,a++;let f=l;for(;f>0;)f--,f&1?o.push(1):o.push(0),f>>>=1}else o.push(e[a]+1),a++;o.push(s);let c=new Uint16Array(o.length);for(let l=0;l<o.length;l++)c[l]=o[l];return{symbols:c,length:o.length,eob:s}}function $e(e,t,i){if(t<=1){let l=new Array(e.length).fill(0);for(let f=0;f<e.length;f++)e[f]>0&&(l[f]=1);return{codeLengths:l,maxLen:1,minLen:1}}let r=[];for(let l=0;l<e.length;l++)e[l]>0&&r.push({freq:e[l],symbol:l,left:null,right:null});if(r.length===0)return{codeLengths:new Array(e.length).fill(0),maxLen:0,minLen:0};if(r.length===1){let l=new Array(e.length).fill(0);return l[r[0].symbol]=1,{codeLengths:l,maxLen:1,minLen:1}}for(;r.length>1;){r.sort((u,w)=>u.freq-w.freq);let l=r.shift(),f=r.shift();r.push({freq:l.freq+f.freq,symbol:-1,left:l,right:f})}let n=new Array(e.length).fill(0);function s(l,f){if(!l.left&&!l.right){n[l.symbol]=f;return}l.left&&s(l.left,f+1),l.right&&s(l.right,f+1)}s(r[0],0);let o=!0;for(;o;){o=!1;for(let l=0;l<n.length;l++)n[l]>i&&(n[l]=i,o=!0);if(o){let l=0;for(let f=0;f<n.length;f++)n[f]>0&&(l+=1/(1<<n[f]));if(l>1)for(let f=1;f<i&&l>1;f++)for(let u=0;u<n.length&&l>1;u++)n[u]===f&&(n[u]++,l-=1/(1<<f)-1/(1<<f+1));o=!1;for(let f=0;f<n.length;f++)if(n[f]>i){o=!0;break}}}let a=i,c=0;for(let l=0;l<n.length;l++)n[l]>0&&(n[l]<a&&(a=n[l]),n[l]>c&&(c=n[l]));return{codeLengths:n,maxLen:c,minLen:a}}function Et(e,t){let i=new Array(t).fill(0),r=e.slice(0,t),n=Math.max(...r,0),s=new Array(n+1).fill(0);for(let c=0;c<t;c++)r[c]>0&&s[r[c]]++;let o=new Array(n+1).fill(0),a=0;for(let c=1;c<=n;c++)a=a+s[c-1]<<1,o[c]=a;for(let c=0;c<t;c++)r[c]>0&&(i[c]=o[r[c]]++);return{codes:i,lengths:r}}function At(e,t,i){e.writeBits(24,3227993),e.writeBits(24,2511705),e.writeBits(32,i),e.writeBit(0);let r=pt(t),{transformed:n,pointer:s}=gt(r);e.writeBits(24,s);let o=new Array(256).fill(!1);for(let d=0;d<n.length;d++)o[n[d]]=!0;let a=new Array(16).fill(!1);for(let d=0;d<16;d++)for(let S=0;S<16;S++)if(o[d*16+S]){a[d]=!0;break}for(let d=0;d<16;d++)e.writeBit(a[d]?1:0);for(let d=0;d<16;d++)if(a[d])for(let S=0;S<16;S++)e.writeBit(o[d*16+S]?1:0);let c=0;for(let d=0;d<256;d++)o[d]&&c++;let{encoded:l,length:f}=St(n,o),{symbols:u,length:w}=yt(l,f,c),g=c+2,h=50,p=Math.ceil(w/h),m;w<200?m=2:w<600?m=3:w<1200?m=4:w<2400?m=5:m=6,m>p&&(m=Math.max(2,p));let E=[];for(let d=0;d<m;d++)E.push(new Array(g).fill(0));let y=new Int32Array(p);for(let d=0;d<p;d++)y[d]=d%m;for(let d=0;d<p;d++){let S=d*h,_=Math.min(S+h,w),I=y[d];for(let x=S;x<_;x++)E[I][u[x]]++}function b(d){for(let S=0;S<g;S++)d[S]<1&&(d[S]=1)}let A=[];for(let d=0;d<m;d++)b(E[d]),A.push($e(E[d],g,20));for(let d=0;d<4;d++){for(let S=0;S<m;S++)E[S].fill(0);for(let S=0;S<p;S++){let _=S*h,I=Math.min(_+h,w),x=0,L=1/0;for(let F=0;F<m;F++){let J=0;for(let Q=_;Q<I;Q++)J+=A[F].codeLengths[u[Q]]||20;J<L&&(L=J,x=F)}y[S]=x;for(let F=_;F<I;F++)E[x][u[F]]++}for(let S=0;S<m;S++)b(E[S]),A[S]=$e(E[S],g,20)}e.writeBits(3,m),e.writeBits(15,p);let U=[],T=[];for(let d=0;d<m;d++)T.push(d);for(let d=0;d<p;d++){let S=y[d],_=0;for(;T[_]!==S;)_++;if(U.push(_),_>0){let I=T[_];for(let x=_;x>0;x--)T[x]=T[x-1];T[0]=I}}for(let d=0;d<p;d++){for(let S=0;S<U[d];S++)e.writeBit(1);e.writeBit(0)}for(let d=0;d<m;d++){let S=A[d].codeLengths,_=S[0];e.writeBits(5,_);for(let I=0;I<g;I++){let x=S[I];for(;_<x;)e.writeBit(1),e.writeBit(0),_++;for(;_>x;)e.writeBit(1),e.writeBit(1),_--;e.writeBit(0)}}for(let d=0;d<m;d++){let{codes:S,lengths:_}=Et(A[d].codeLengths,g);A[d]=Object.assign(A[d],{_codes:S,_lengths:_})}let ge=0,N=0;for(let d=0;d<w;d++){(N===0||N>=h)&&(d>0&&ge++,N=0);let S=y[ge],_=A[S],I=u[d],x=_._lengths[I],L=_._codes[I];x>0&&e.writeBits(x,L),N++}}var _t=10*1024*1024;function Ze(e,t=9,i=_t){if(t<1||t>9)throw new Error("Block size level must be 1-9");if(e.length>i)throw new Error(`Input too large for bzip2 compression (${e.length} bytes, max ${i})`);let r=t*1e5,n=new oe;n.writeBits(8,66),n.writeBits(8,90),n.writeBits(8,104),n.writeBits(8,48+t);let s=0,o=0;for(;o<e.length;){let a=Math.min(o+r,e.length),c=e.subarray(o,a),l=4294967295;for(let f=0;f<c.length;f++)l=ht(l,c[f]);l=~l>>>0,s=(s<<1|s>>>31)>>>0,s=(s^l)>>>0,At(n,c,l),o=a}return n.writeBits(24,1536581),n.writeBits(24,3690640),n.writeBits(32,s),n.finish()}var W=null,X=null;async function De(){if(W)return W;if(X)throw X;try{return W=await ee.runTrustedAsync(()=>import("node-liblzma")),W}catch{throw X=new Error("xz compression requires node-liblzma which failed to load. Install liblzma-dev (apt) or xz (brew) and reinstall dependencies."),X}}var j=null,q=null;async function Pe(){if(j)return j;if(q)throw q;try{return j=await ee.runTrustedAsync(()=>import("@mongodb-js/zstd")),j}catch{throw q=new Error("zstd compression requires @mongodb-js/zstd which is not installed. Install it with: npm install @mongodb-js/zstd"),q}}var C=100*1024*1024,Ne=512,Le=1e4;function xt(e){let t="file";e.isDirectory?t="directory":e.isSymlink&&(t="symlink");let i=e.name;e.isDirectory&&!i.endsWith("/")&&(i+="/");let r;e.content!==void 0&&(typeof e.content=="string"?r=new TextEncoder().encode(e.content):r=e.content);let n=e.isDirectory||e.isSymlink?0:r?.length??0;return{header:{name:i,mode:e.mode??(e.isDirectory?493:420),uid:e.uid??0,gid:e.gid??0,size:n,mtime:e.mtime??new Date,type:t,linkname:e.linkTarget??"",uname:"user",gname:"user"},body:r}}async function R(e){let t=e.map(xt);return Me(t)}async function Ke(e){let t=await R(e),n=new ReadableStream({start(l){l.enqueue(t),l.close()}}).pipeThrough(ze()).getReader(),s=[];for(;;){let{done:l,value:f}=await n.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 k(e){if(e.length>C)return{entries:[],error:`Archive too large (max ${C} bytes)`};if(e.length<Ne||e.length%Ne!==0)return{entries:[],error:"Invalid tar archive format"};try{let t=await Be(e),i=[];for(let r of t){if(i.length>=Le)return{entries:i,error:`Too many entries (max ${Le})`};let n="file";switch(r.header.type){case"directory":n="directory";break;case"symlink":n="symlink";break;case"link":n="hardlink";break;case"file":n="file";break;default:n="other"}i.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:n,linkTarget:r.header.linkname||void 0,content:r.data??new Uint8Array(0)})}return{entries:i}}catch(t){let i=t instanceof Error?t.message:"Unknown error";return{entries:[],error:i}}}async function ae(e){if(e.length>C)return{entries:[],error:`Archive too large (max ${C} bytes)`};try{let r=new ReadableStream({start(c){c.enqueue(e),c.close()}}).pipeThrough(Re()).getReader(),n=[],s=0;for(;;){let{done:c,value:l}=await r.read();if(c)break;if(s+=l.length,s>C)return await r.cancel(),{entries:[],error:`Decompressed archive too large (max ${C} bytes)`};n.push(l)}let o=new Uint8Array(s),a=0;for(let c of n)o.set(c,a),a+=c.length;return k(o)}catch(t){let i=t instanceof Error?t.message:"Unknown error";return{entries:[],error:`Decompression failed: ${i}`}}}function ce(e){return e.length>=2&&e[0]===31&&e[1]===139}function le(e){return e.length>=3&&e[0]===66&&e[1]===90&&e[2]===104}function fe(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 Ct(e){let t=Tt.decode(Buffer.from(e));return new Uint8Array(t)}async function bt(e){return Ze(e,9)}async function Ut(e){let i=(await De()).unxzSync(Buffer.from(e));return new Uint8Array(i)}async function It(e){let i=(await De()).xzSync(Buffer.from(e));return new Uint8Array(i)}async function Ge(e){let t=await R(e);return bt(t)}async function He(e,t){if(!t?.allowNativeCodecs)throw new Error("xz compression is disabled by default (native codec risk). Pass { allowNativeCodecs: true } to opt in.");let i=await R(e);return It(i)}async function ue(e){if(e.length>C)return{entries:[],error:`Archive too large (max ${C} bytes)`};try{let t=await Ct(e);return t.length>C?{entries:[],error:`Decompressed archive too large (max ${C} bytes)`}:k(t)}catch(t){let i=t instanceof Error?t.message:"Unknown error";return{entries:[],error:i}}}async function de(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>C)return{entries:[],error:`Archive too large (max ${C} bytes)`};try{let i=await Ut(e);return i.length>C?{entries:[],error:`Decompressed archive too large (max ${C} bytes)`}:k(i)}catch(i){let r=i instanceof Error?i.message:"Unknown error";return{entries:[],error:r}}}function me(e){return e.length>=4&&e[0]===40&&e[1]===181&&e[2]===47&&e[3]===253}async function vt(e){let i=await(await Pe()).compress(Buffer.from(e),3);return new Uint8Array(i)}async function kt(e){let i=await(await Pe()).decompress(Buffer.from(e));return new Uint8Array(i)}async function We(e,t){if(!t?.allowNativeCodecs)throw new Error("zstd compression is disabled by default (native codec risk). Pass { allowNativeCodecs: true } to opt in.");let i=await R(e);return vt(i)}async function he(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>C)return{entries:[],error:`Archive too large (max ${C} bytes)`};try{let i=await kt(e);return i.length>C?{entries:[],error:`Decompressed archive too large (max ${C} bytes)`}:k(i)}catch(i){let r=i instanceof Error?i.message:"Unknown error";return{entries:[],error:r}}}function Xe(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},i=[],r=0;for(;r<e.length;){let n=e[r];if(n.startsWith("-")&&!n.startsWith("--")&&n.length>2){if(/^-\d+$/.test(n)){i.push(n),r++;continue}for(let s=1;s<n.length;s++){let o=n[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<n.length-1)t.file=n.substring(s+1),s=n.length;else{if(r++,r>=e.length)return{ok:!1,error:{stdout:"",stderr:`tar: option requires an argument -- 'f'
4
+ `,exitCode:2}};t.file=e[r]}break;case"C":if(s<n.length-1)t.directory=n.substring(s+1),s=n.length;else{if(r++,r>=e.length)return{ok:!1,error:{stdout:"",stderr:`tar: option requires an argument -- 'C'
5
+ `,exitCode:2}};t.directory=e[r]}break;case"T":if(s<n.length-1)t.filesFrom=n.substring(s+1),s=n.length;else{if(r++,r>=e.length)return{ok:!1,error:{stdout:"",stderr:`tar: option requires an argument -- 'T'
6
+ `,exitCode:2}};t.filesFrom=e[r]}break;case"X":if(s<n.length-1)t.excludeFrom=n.substring(s+1),s=n.length;else{if(r++,r>=e.length)return{ok:!1,error:{stdout:"",stderr:`tar: option requires an argument -- 'X'
7
+ `,exitCode:2}};t.excludeFrom=e[r]}break;default:return{ok:!1,error:te("tar",`-${o}`)}}}r++;continue}if(n==="-c"||n==="--create")t.create=!0;else if(n==="-r"||n==="--append")t.append=!0;else if(n==="-u"||n==="--update")t.update=!0;else if(n==="-x"||n==="--extract"||n==="--get")t.extract=!0;else if(n==="-t"||n==="--list")t.list=!0;else if(n==="-a"||n==="--auto-compress")t.autoCompress=!0;else if(n==="-z"||n==="--gzip"||n==="--gunzip")t.gzip=!0;else if(n==="-j"||n==="--bzip2")t.bzip2=!0;else if(n==="-J"||n==="--xz")t.xz=!0;else if(n==="--zstd")t.zstd=!0;else if(n==="-v"||n==="--verbose")t.verbose=!0;else if(n==="-O"||n==="--to-stdout")t.toStdout=!0;else if(n==="-k"||n==="--keep-old-files")t.keepOldFiles=!0;else if(n==="-m"||n==="--touch")t.touch=!0;else if(n==="--wildcards")t.wildcards=!0;else if(n==="-p"||n==="--preserve"||n==="--preserve-permissions")t.preserve=!0;else if(n==="-P"||n==="--absolute-names")t.absoluteNames=!0;else if(n==="-f"||n==="--file"){if(r++,r>=e.length)return{ok:!1,error:{stdout:"",stderr:`tar: option requires an argument -- 'f'
8
+ `,exitCode:2}};t.file=e[r]}else if(n.startsWith("--file="))t.file=n.substring(7);else if(n==="-C"||n==="--directory"){if(r++,r>=e.length)return{ok:!1,error:{stdout:"",stderr:`tar: option requires an argument -- 'C'
9
+ `,exitCode:2}};t.directory=e[r]}else if(n.startsWith("--directory="))t.directory=n.substring(12);else if(n.startsWith("--strip-components=")||n.startsWith("--strip=")){let s=n.includes("--strip-components=")?n.substring(19):n.substring(8),o=parseInt(s,10);if(Number.isNaN(o)||o<0)return{ok:!1,error:{stdout:"",stderr:`tar: invalid number for --strip: '${s}'
10
+ `,exitCode:2}};t.strip=o}else if(n.startsWith("--exclude="))t.exclude.push(n.substring(10));else if(n==="--exclude"){if(r++,r>=e.length)return{ok:!1,error:{stdout:"",stderr:`tar: option '--exclude' requires an argument
11
+ `,exitCode:2}};t.exclude.push(e[r])}else if(n==="-T"||n==="--files-from"){if(r++,r>=e.length)return{ok:!1,error:{stdout:"",stderr:`tar: option requires an argument -- 'T'
12
+ `,exitCode:2}};t.filesFrom=e[r]}else if(n.startsWith("--files-from="))t.filesFrom=n.substring(13);else if(n==="-X"||n==="--exclude-from"){if(r++,r>=e.length)return{ok:!1,error:{stdout:"",stderr:`tar: option requires an argument -- 'X'
13
+ `,exitCode:2}};t.excludeFrom=e[r]}else if(n.startsWith("--exclude-from="))t.excludeFrom=n.substring(15);else if(n==="--"){i.push(...e.slice(r+1));break}else{if(n.startsWith("-"))return{ok:!1,error:te("tar",n)};i.push(n)}r++}return{ok:!0,options:t,files:i}}var je=100,Ft={name:"tar",summary:"manipulate tape archives",usage:"tar [options] [file...]",description:["Create, extract, or list contents of tar archives.","","One of -c, -r, -u, -x, or -t is required to specify the operation."],options:["-c, --create create a new archive","-r, --append append files to the end of an archive","-u, --update only append files newer than copy in archive","-x, --extract extract files from an archive","-t, --list list contents of an archive","-f, --file=ARCHIVE use archive file ARCHIVE","-a, --auto-compress use archive suffix to determine compression","-z, --gzip filter archive through gzip","-j, --bzip2 filter archive through bzip2","-J, --xz filter archive through xz","--zstd filter archive through zstd","-v, --verbose verbosely list files processed","-O, --to-stdout extract files to standard output","-k, --keep-old-files don't replace existing files when extracting","-m, --touch don't extract file modified time","-C, --directory=DIR change to directory DIR before performing operations","-p, --preserve preserve permissions","-P, --absolute-names do not strip leading '/' or block '..' paths","-T, --files-from=FILE read files to extract/create from FILE","-X, --exclude-from=FILE read exclude patterns from FILE","--strip=N strip N leading path components on extraction","--exclude=PATTERN exclude files matching PATTERN","--wildcards use wildcards for pattern matching"," --help display this help and exit"],examples:["tar -cvf archive.tar file1 file2 Create archive from files","tar -czvf archive.tar.gz dir/ Create gzip-compressed archive","tar -cjvf archive.tar.bz2 dir/ Create bzip2-compressed archive","tar -rf archive.tar newfile.txt Append file to archive","tar -uf archive.tar dir/ Update archive with newer files","tar -xvf archive.tar Extract archive","tar -xvf archive.tar -C /tmp Extract to /tmp","tar -tvf archive.tar List archive contents","tar -xzf archive.tar.gz Extract gzip archive","tar -xf archive.tar file1.txt Extract specific file","tar -xOf archive.tar file.txt Extract file to stdout","tar -xf archive.tar --wildcards '*.txt' Extract matching files"]};function pe(e,t){let i=e.includes("/")?e.substring(e.lastIndexOf("/")+1):e;for(let r of t){let n=r.replace(/[.+^${}()|[\]\\]/g,"\\$&").replace(/\*\*/g,"<<<GLOBSTAR>>>").replace(/\*/g,"[^/]*").replace(/<<<GLOBSTAR>>>/g,".*").replace(/\?/g,".");if(O(`^${n}$`).test(e)||O(`^${n}/`).test(e)||!r.includes("/")&&O(`^${n}$`).test(i))return!0}return!1}function Y(e,t){let i=t.replace(/[.+^${}()|[\]\\]/g,"\\$&").replace(/\*\*/g,"<<<GLOBSTAR>>>").replace(/\*/g,"[^/]*").replace(/<<<GLOBSTAR>>>/g,".*").replace(/\?/g,"."),r=e.includes("/")?e.substring(e.lastIndexOf("/")+1):e;return O(`^${i}$`).test(e)||O(`^${i}$`).test(r)}function qe(e,t){if(t<=0)return e;let i=e.split("/").filter(r=>r!=="");return i.length<=t?"":i.slice(t).join("/")}function Ye(e){return e.split("/").some(t=>t==="..")}function zt(e,t){if(t)return{safePath:e};let i=e.replace(/^\/+/,"");return i.length===0?{safePath:""}:Ye(i)?{error:"Path contains '..'"}:{safePath:i}}function Rt(e){let i=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"][e.getMonth()],r=e.getDate().toString().padStart(2," "),n=e.getHours().toString().padStart(2,"0"),s=e.getMinutes().toString().padStart(2,"0");return`${i} ${r} ${n}:${s}`}async function V(e,t,i,r){let n=[],s=[],o=e.fs.resolvePath(t,i);try{let a=await e.fs.stat(o);if(pe(i,r))return{entries:n,errors:s};if(a.isDirectory){n.push({name:i,isDirectory:!0,mode:a.mode,mtime:a.mtime});let c=await e.fs.readdir(o);for(let l=0;l<c.length;l+=je){let f=c.slice(l,l+je),u=await Promise.all(f.map(w=>V(e,t,i?`${i}/${w}`:w,r)));for(let w of u)n.push(...w.entries),s.push(...w.errors)}}else if(a.isFile){let c=await e.fs.readFileBuffer(o);n.push({name:i,content:c,mode:a.mode,mtime:a.mtime})}else if(a.isSymbolicLink){let c=await e.fs.readlink(o);n.push({name:i,isSymlink:!0,linkTarget:c,mode:a.mode,mtime:a.mtime})}}catch(a){let c=a instanceof Error?a.message:"unknown error";s.push(`tar: ${i}: ${c}`)}return{entries:n,errors:s}}async function Ot(e,t,i){if(i.length===0)return{stdout:"",stderr:`tar: Cowardly refusing to create an empty archive
14
+ `,exitCode:2};let r=t.directory?e.fs.resolvePath(e.cwd,t.directory):e.cwd,n=[],s=[],o="";for(let f of i){let{entries:u,errors:w}=await V(e,r,f,t.exclude);if(n.push(...u),s.push(...w),t.verbose)for(let g of u)o+=`${g.name}${g.isDirectory?"/":""}
15
+ `}if(n.length===0&&s.length>0)return{stdout:"",stderr:`${s.join(`
16
+ `)}
17
+ `,exitCode:2};let a;try{t.gzip?a=await Ke(n):t.bzip2?a=await Ge(n):t.xz?a=await He(n):t.zstd?a=await We(n):a=await R(n)}catch(f){return{stdout:"",stderr:`tar: error creating archive: ${f instanceof Error?f.message:"unknown error"}
18
+ `,exitCode:2}}let c="";if(t.file&&t.file!=="-"){let f=e.fs.resolvePath(e.cwd,t.file);try{await e.fs.writeFile(f,a)}catch(u){let w=u instanceof Error?u.message:"unknown error";return{stdout:"",stderr:`tar: ${t.file}: ${w}
19
+ `,exitCode:2}}}else c=Buffer.from(a).toString("latin1");let l=o;return s.length>0&&(l+=`${s.join(`
20
+ `)}
21
+ `),{stdout:c,stderr:l,exitCode:s.length>0?2:0}}async function Mt(e,t,i){if(!t.file||t.file==="-")return{stdout:"",stderr:`tar: Cannot append to stdin/stdout
22
+ `,exitCode:2};if(i.length===0)return{stdout:"",stderr:`tar: Cowardly refusing to append nothing to archive
23
+ `,exitCode:2};let r=e.fs.resolvePath(e.cwd,t.file),n;try{n=await e.fs.readFileBuffer(r)}catch{return{stdout:"",stderr:`tar: ${t.file}: Cannot open: No such file or directory
24
+ `,exitCode:2}}let s=await k(n);if(s.error)return{stdout:"",stderr:`tar: ${s.error}
25
+ `,exitCode:2};let o=s.entries.map(h=>({name:h.name,content:h.content,mode:h.mode,mtime:h.mtime,isDirectory:h.type==="directory",isSymlink:h.type==="symlink",linkTarget:h.linkTarget,uid:h.uid,gid:h.gid})),a=t.directory?e.fs.resolvePath(e.cwd,t.directory):e.cwd,c=[],l=[],f="";for(let h of i){let{entries:p,errors:m}=await V(e,a,h,t.exclude);if(c.push(...p),l.push(...m),t.verbose)for(let E of p)f+=`${E.name}${E.isDirectory?"/":""}
26
+ `}let u=[...o,...c],w;try{w=await R(u)}catch(h){return{stdout:"",stderr:`tar: error creating archive: ${h instanceof Error?h.message:"unknown error"}
27
+ `,exitCode:2}}try{await e.fs.writeFile(r,w)}catch(h){let p=h instanceof Error?h.message:"unknown error";return{stdout:"",stderr:`tar: ${t.file}: ${p}
28
+ `,exitCode:2}}let g=f;return l.length>0&&(g+=`${l.join(`
29
+ `)}
30
+ `),{stdout:"",stderr:g,exitCode:l.length>0?2:0}}async function Bt(e,t,i){if(!t.file||t.file==="-")return{stdout:"",stderr:`tar: Cannot update stdin/stdout
31
+ `,exitCode:2};if(i.length===0)return{stdout:"",stderr:`tar: Cowardly refusing to update with nothing
32
+ `,exitCode:2};let r=e.fs.resolvePath(e.cwd,t.file),n;try{n=await e.fs.readFileBuffer(r)}catch{return{stdout:"",stderr:`tar: ${t.file}: Cannot open: No such file or directory
33
+ `,exitCode:2}}let s=await k(n);if(s.error)return{stdout:"",stderr:`tar: ${s.error}
34
+ `,exitCode:2};let o=new Map;for(let m of s.entries)o.set(m.name,m.mtime);let a=t.directory?e.fs.resolvePath(e.cwd,t.directory):e.cwd,c=[],l=[],f="";for(let m of i){let{entries:E,errors:y}=await V(e,a,m,t.exclude);l.push(...y);for(let b of E){let A=o.get(b.name);(!A||b.mtime&&b.mtime.getTime()>A.getTime())&&(c.push(b),t.verbose&&(f+=`${b.name}${b.isDirectory?"/":""}
35
+ `))}}if(c.length===0){let m="";return l.length>0&&(m=`${l.join(`
36
+ `)}
37
+ `),{stdout:"",stderr:m,exitCode:l.length>0?2:0}}let u=new Set(c.map(m=>m.name)),g=[...s.entries.filter(m=>!u.has(m.name)).map(m=>({name:m.name,content:m.content,mode:m.mode,mtime:m.mtime,isDirectory:m.type==="directory",isSymlink:m.type==="symlink",linkTarget:m.linkTarget,uid:m.uid,gid:m.gid})),...c],h;try{h=await R(g)}catch(m){return{stdout:"",stderr:`tar: error creating archive: ${m instanceof Error?m.message:"unknown error"}
38
+ `,exitCode:2}}try{await e.fs.writeFile(r,h)}catch(m){let E=m instanceof Error?m.message:"unknown error";return{stdout:"",stderr:`tar: ${t.file}: ${E}
39
+ `,exitCode:2}}let p=f;return l.length>0&&(p+=`${l.join(`
40
+ `)}
41
+ `),{stdout:"",stderr:p,exitCode:l.length>0?2:0}}async function $t(e,t,i){let r;if(t.file&&t.file!=="-"){let p=e.fs.resolvePath(e.cwd,t.file);try{r=await e.fs.readFileBuffer(p)}catch{return{stdout:"",stderr:`tar: ${t.file}: Cannot open: No such file or directory
42
+ `,exitCode:2}}}else r=Uint8Array.from(e.stdin,p=>p.charCodeAt(0));let n,s=t.gzip||ce(r),o=t.bzip2||le(r),a=t.xz||fe(r),c=t.zstd||me(r);if(s?n=await ae(r):o?n=await ue(r):a?n=await de(r):c?n=await he(r):n=await k(r),n.error)return{stdout:"",stderr:`tar: ${n.error}
43
+ `,exitCode:2};let l=t.directory?e.fs.resolvePath(e.cwd,t.directory):e.cwd,f=t.absoluteNames?i:i.map(p=>p.replace(/^\/+/,"")).filter(p=>p.length>0),u="",w="",g=[];if(t.directory&&!t.toStdout)try{await e.fs.mkdir(l,{recursive:!0})}catch{}for(let p of n.entries){let m=qe(p.name,t.strip);if(!m)continue;let E=zt(m,t.absoluteNames);if(E.error){g.push(`tar: ${m}: ${E.error}`);continue}let y=E.safePath??"";if(!y)continue;let b=y.endsWith("/")?y.slice(0,-1):y;if(f.length>0){let U;if(t.wildcards?U=f.some(T=>Y(y,T)||Y(b,T)||y.startsWith(`${T}/`)):U=f.some(T=>y===T||y.startsWith(`${T}/`)||b===T),!U)continue}if(pe(y,t.exclude))continue;let A=e.fs.resolvePath(l,y);try{if(p.type==="directory"){if(t.toStdout)continue;await e.fs.mkdir(A,{recursive:!0}),t.verbose&&(u+=`${y}
44
+ `)}else if(p.type==="file"){if(t.toStdout){w+=new TextDecoder().decode(p.content),t.verbose&&(u+=`${y}
45
+ `);continue}if(t.keepOldFiles)try{await e.fs.stat(A),t.verbose&&(u+=`${y}: not overwritten, file exists
46
+ `);continue}catch{}let U=A.substring(0,A.lastIndexOf("/"));if(U)try{await e.fs.mkdir(U,{recursive:!0})}catch{}if(await e.fs.writeFile(A,p.content),t.preserve&&p.mode)try{await e.fs.chmod(A,p.mode)}catch{}t.verbose&&(u+=`${y}
47
+ `)}else if(p.type==="symlink"&&p.linkTarget){if(t.toStdout)continue;if(!t.absoluteNames&&(p.linkTarget.startsWith("/")||Ye(p.linkTarget))){g.push(`tar: ${y}: unsafe symlink target`);continue}if(t.keepOldFiles)try{await e.fs.stat(A),t.verbose&&(u+=`${y}: not overwritten, file exists
48
+ `);continue}catch{}let U=A.substring(0,A.lastIndexOf("/"));if(U)try{await e.fs.mkdir(U,{recursive:!0})}catch{}try{await e.fs.symlink(p.linkTarget,A)}catch{}t.verbose&&(u+=`${y}
49
+ `)}}catch(U){let T=U instanceof Error?U.message:"unknown error";g.push(`tar: ${y}: ${T}`)}}let h=u;return g.length>0&&(h+=`${g.join(`
50
+ `)}
51
+ `),{stdout:w,stderr:h,exitCode:g.length>0?2:0}}async function Zt(e,t,i){let r;if(t.file&&t.file!=="-"){let f=e.fs.resolvePath(e.cwd,t.file);try{r=await e.fs.readFileBuffer(f)}catch{return{stdout:"",stderr:`tar: ${t.file}: Cannot open: No such file or directory
52
+ `,exitCode:2}}}else r=Uint8Array.from(e.stdin,f=>f.charCodeAt(0));let n,s=t.gzip||ce(r),o=t.bzip2||le(r),a=t.xz||fe(r),c=t.zstd||me(r);if(s?n=await ae(r):o?n=await ue(r):a?n=await de(r):c?n=await he(r):n=await k(r),n.error)return{stdout:"",stderr:`tar: ${n.error}
53
+ `,exitCode:2};let l="";for(let f of n.entries){let u=qe(f.name,t.strip);if(!u)continue;let w=u.endsWith("/")?u.slice(0,-1):u;if(i.length>0){let g;if(t.wildcards?g=i.some(h=>Y(u,h)||Y(w,h)||u.startsWith(`${h}/`)):g=i.some(h=>u===h||u.startsWith(`${h}/`)||w===h),!g)continue}if(!pe(u,t.exclude))if(t.verbose){let g=f.type==="directory",h=ye(f.mode,g),p=`${f.uid}/${f.gid}`,m=f.size.toString().padStart(8," "),E=Rt(f.mtime),y=`${h} ${p.padEnd(10)} ${m} ${E} ${u}`;f.type==="symlink"&&f.linkTarget&&(y+=` -> ${f.linkTarget}`),l+=`${y}
54
+ `}else l+=`${u}
55
+ `}return{stdout:l,stderr:"",exitCode:0}}var tr={name:"tar",async execute(e,t){if(Se(e))return we(Ft);let i=Xe(e);if(!i.ok)return i.error;let{options:r,files:n}=i,s=[r.create,r.append,r.update,r.extract,r.list].filter(Boolean).length;if(s===0)return{stdout:"",stderr:`tar: You must specify one of -c, -r, -u, -x, or -t
56
+ `,exitCode:2};if(s>1)return{stdout:"",stderr:`tar: You may not specify more than one of -c, -r, -u, -x, or -t
57
+ `,exitCode:2};if(r.autoCompress&&r.file&&r.create){let c=r.file.toLowerCase();c.endsWith(".tar.gz")||c.endsWith(".tgz")?r.gzip=!0:c.endsWith(".tar.bz2")||c.endsWith(".tbz2")?r.bzip2=!0:c.endsWith(".tar.xz")||c.endsWith(".txz")?r.xz=!0:(c.endsWith(".tar.zst")||c.endsWith(".tzst"))&&(r.zstd=!0)}let o=[r.gzip,r.bzip2,r.xz,r.zstd].filter(Boolean).length;if(o>1)return{stdout:"",stderr:`tar: You may not specify more than one compression option
58
+ `,exitCode:2};if((r.append||r.update)&&o>0)return{stdout:"",stderr:`tar: Cannot append/update compressed archives - decompress first
59
+ `,exitCode:2};let a=n;if(r.filesFrom){let c=t.fs.resolvePath(t.cwd,r.filesFrom);try{let f=(await t.fs.readFile(c)).split(`
60
+ `).map(u=>u.trim()).filter(u=>u.length>0&&!u.startsWith("#"));a=[...n,...f]}catch{return{stdout:"",stderr:`tar: ${r.filesFrom}: Cannot open: No such file or directory
61
+ `,exitCode:2}}}if(r.excludeFrom){let c=t.fs.resolvePath(t.cwd,r.excludeFrom);try{let f=(await t.fs.readFile(c)).split(`
62
+ `).map(u=>u.trim()).filter(u=>u.length>0&&!u.startsWith("#"));r.exclude.push(...f)}catch{return{stdout:"",stderr:`tar: ${r.excludeFrom}: Cannot open: No such file or directory
63
+ `,exitCode:2}}}return r.create?Ot(t,r,a):r.append?Mt(t,r,a):r.update?Bt(t,r,a):r.extract?$t(t,r,a):Zt(t,r,a)}},rr={name:"tar",flags:[{flag:"-c",type:"boolean"},{flag:"-x",type:"boolean"},{flag:"-t",type:"boolean"},{flag:"-f",type:"value",valueHint:"path"},{flag:"-z",type:"boolean"},{flag:"-j",type:"boolean"},{flag:"-v",type:"boolean"},{flag:"-C",type:"value",valueHint:"path"},{flag:"--strip-components",type:"value",valueHint:"number"},{flag:"--exclude",type:"value",valueHint:"pattern"}],needsArgs:!0};export{tr as a,rr as b};
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
- import{a as g}from"./chunk-4OALHZXB.js";import{c as u}from"./chunk-LIYVQA3X.js";import{a as h}from"./chunk-4PRVMER6.js";import{a as f}from"./chunk-SYG3IW7P.js";var v={name:"time",async execute(r,s){let a="%e %M",o=null,p=!1,c=!1,t=0;for(;t<r.length;){let e=r[t];if(e==="-f"||e==="--format"){if(t++,t>=r.length)return{stdout:"",stderr:`time: missing argument to '-f'
2
+ import{a as g}from"./chunk-4OALHZXB.js";import{c as u}from"./chunk-LIYVQA3X.js";import{a as h}from"./chunk-4PRVMER6.js";import{a as f}from"./chunk-RLNOQILG.js";var v={name:"time",async execute(r,s){let a="%e %M",o=null,p=!1,c=!1,t=0;for(;t<r.length;){let e=r[t];if(e==="-f"||e==="--format"){if(t++,t>=r.length)return{stdout:"",stderr:`time: missing argument to '-f'
3
3
  `,exitCode:1};a=r[t],t++}else if(e==="-o"||e==="--output"){if(t++,t>=r.length)return{stdout:"",stderr:`time: missing argument to '-o'
4
4
  `,exitCode:1};o=r[t],t++}else if(e==="-a"||e==="--append")p=!0,t++;else if(e==="-v"||e==="--verbose")a=`Command being timed: %C
5
5
  Elapsed (wall clock) time: %e seconds
@@ -0,0 +1,2 @@
1
+ #!/usr/bin/env node
2
+ import{a,b}from"./chunk-NLBRLRWD.js";import"./chunk-SE4C7FJY.js";import"./chunk-RLNOQILG.js";import"./chunk-KGOUQS5A.js";export{a as exprCommand,b as flagsForFuzzing};
@@ -1,2 +1,2 @@
1
1
  #!/usr/bin/env node
2
- import{b as yr}from"./chunk-WS6P4H4S.js";import{b as Ar}from"./chunk-LGF54XJQ.js";import{b as $r}from"./chunk-B3RU2PUI.js";import"./chunk-GZHFXDDO.js";import"./chunk-QSDVMMYI.js";import{c as Sr}from"./chunk-UPUMZYZE.js";import{b as wr}from"./chunk-XKPFI566.js";import{b as xr}from"./chunk-ORUYSLP4.js";import{b as vr}from"./chunk-IDGH4PGU.js";import{b as kr}from"./chunk-F3LGZXLQ.js";import{b as qr}from"./chunk-BYDV4VEF.js";import{b as Cr}from"./chunk-JLX6YWGA.js";import{b as br}from"./chunk-FLPVVSN5.js";import{d as Ir,e as Mr,f as jr}from"./chunk-54G6AE72.js";import{b as tr}from"./chunk-DOXYBGNA.js";import{b as lr}from"./chunk-FBJJY4ZV.js";import{b as ur}from"./chunk-THALLNXT.js";import{b as pr}from"./chunk-EZS766DD.js";import{b as er}from"./chunk-3Y32LPNT.js";import{b as dr}from"./chunk-7BORMNPQ.js";import{b as cr}from"./chunk-N43DJTSI.js";import"./chunk-OBI37ZY4.js";import{b as hr}from"./chunk-N5OTVT4F.js";import{c as or,d as ar}from"./chunk-MAVV76T4.js";import{b as sr}from"./chunk-JTF74J6E.js";import{c as ir,d as gr}from"./chunk-GO6FXSC4.js";import{b as mr}from"./chunk-GR23MPTT.js";import"./chunk-ZO5PSLKR.js";import{b as Fr}from"./chunk-GOJZHH3L.js";import{b as zr}from"./chunk-P6GNZPVW.js";import{b as fr}from"./chunk-LOJMXC4F.js";import{b as nr}from"./chunk-AXWFPG37.js";import"./chunk-YTIURC67.js";import{b as R}from"./chunk-PQNTKMH3.js";import{b as U}from"./chunk-PPBQJBC2.js";import{b as V}from"./chunk-NSUMEERA.js";import{b as W}from"./chunk-XY5HGZW5.js";import{c as X,d as Y}from"./chunk-AAW7UMPO.js";import{c as Z,d as _}from"./chunk-3MBAUIBB.js";import{b as N}from"./chunk-RT7TRQVZ.js";import{b as rr}from"./chunk-CQG2HEAL.js";import{b as G}from"./chunk-RJSAGJQJ.js";import{b as H}from"./chunk-YEKSVVRC.js";import{b as J}from"./chunk-26NO42TF.js";import{b as K}from"./chunk-LGJM5YFT.js";import{b as L}from"./chunk-LMK6G2HH.js";import{b as O}from"./chunk-ZKC5HQYO.js";import{b as P}from"./chunk-ROJPSS6N.js";import{b as Q}from"./chunk-THNL3XFF.js";import{b as y}from"./chunk-CGE2EHYP.js";import{b as A}from"./chunk-ZA4HUKJ3.js";import{b as $}from"./chunk-WWZVR5NN.js";import{b as S}from"./chunk-JQBC3FXE.js";import{b as T}from"./chunk-SYL34GE7.js";import{b as B}from"./chunk-5G2VOPPJ.js";import{b as D}from"./chunk-SGA7Y45Z.js";import{b as E}from"./chunk-EUXCM6C4.js";import{b as w}from"./chunk-YLE2OYY6.js";import{b as x}from"./chunk-S7OHMN3F.js";import{b as v}from"./chunk-YWZOGBFE.js";import"./chunk-YMMJLYIX.js";import{d as k,e as q,f as C}from"./chunk-YFPDB4PH.js";import"./chunk-SXB55JOI.js";import{b}from"./chunk-HJEHIH4P.js";import"./chunk-V7ZOPVQS.js";import"./chunk-4OALHZXB.js";import"./chunk-G43H2WGH.js";import{b as I}from"./chunk-VVFGRIJZ.js";import{b as M}from"./chunk-SDLWFYVT.js";import{b as j}from"./chunk-FA2CHD73.js";import{b as t}from"./chunk-R2LDP472.js";import{b as l}from"./chunk-PS4LOXE5.js";import{b as u}from"./chunk-VNER2XXL.js";import{b as p}from"./chunk-YX7OOTPO.js";import{b as e}from"./chunk-7ADG3DNO.js";import{b as d}from"./chunk-TEFXEYX3.js";import{b as c}from"./chunk-ZSVBYEY4.js";import{b as h}from"./chunk-SXRVLCZ4.js";import"./chunk-FSZWFMB4.js";import"./chunk-LIYVQA3X.js";import"./chunk-OOJCYVYF.js";import"./chunk-4PRVMER6.js";import"./chunk-MO4RPBN2.js";import"./chunk-YU6OGPZR.js";import"./chunk-SE4C7FJY.js";import{b as i}from"./chunk-LJKIWB5F.js";import{b as g}from"./chunk-MRP4ZCD7.js";import"./chunk-5WFYIUU2.js";import{b as m}from"./chunk-ND23BJUM.js";import"./chunk-D5WP4CKS.js";import"./chunk-6KZRLMG3.js";import{b as F}from"./chunk-MXVNCVD6.js";import"./chunk-OBH7XN5N.js";import{b as z}from"./chunk-OQV5J23L.js";import"./chunk-SYG3IW7P.js";import{b as f}from"./chunk-EJQKHROT.js";import"./chunk-JBABAK44.js";import{b as n}from"./chunk-ITA43A73.js";import"./chunk-4VDEBYW7.js";import"./chunk-GTNBSMZR.js";import"./chunk-KGOUQS5A.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};
2
+ import{b as yr}from"./chunk-VRUXUVWB.js";import{b as Ar}from"./chunk-L2JBII6Z.js";import{b as $r}from"./chunk-B3RU2PUI.js";import"./chunk-GZHFXDDO.js";import"./chunk-QSDVMMYI.js";import{c as Sr}from"./chunk-CM4532DS.js";import{b as wr}from"./chunk-XKPFI566.js";import{b as xr}from"./chunk-ORUYSLP4.js";import{b as vr}from"./chunk-IDGH4PGU.js";import{b as kr}from"./chunk-F3LGZXLQ.js";import{b as qr}from"./chunk-BYDV4VEF.js";import{b as Cr}from"./chunk-JLX6YWGA.js";import{b as br}from"./chunk-FLPVVSN5.js";import{d as Ir,e as Mr,f as jr}from"./chunk-54G6AE72.js";import{b as tr}from"./chunk-DOXYBGNA.js";import{b as lr}from"./chunk-WXMBDX4P.js";import{b as ur}from"./chunk-THALLNXT.js";import{b as pr}from"./chunk-NLBRLRWD.js";import{b as er}from"./chunk-3Y32LPNT.js";import{b as dr}from"./chunk-7BORMNPQ.js";import{b as cr}from"./chunk-N43DJTSI.js";import"./chunk-OBI37ZY4.js";import{b as hr}from"./chunk-N5OTVT4F.js";import{c as or,d as ar}from"./chunk-MAVV76T4.js";import{b as sr}from"./chunk-JTF74J6E.js";import{c as ir,d as gr}from"./chunk-GO6FXSC4.js";import{b as mr}from"./chunk-VHUYNUT7.js";import"./chunk-ZO5PSLKR.js";import{b as Fr}from"./chunk-GOJZHH3L.js";import{b as zr}from"./chunk-P6GNZPVW.js";import{b as fr}from"./chunk-LOJMXC4F.js";import{b as nr}from"./chunk-AXWFPG37.js";import"./chunk-YTIURC67.js";import{b as R}from"./chunk-PQNTKMH3.js";import{b as U}from"./chunk-PPBQJBC2.js";import{b as V}from"./chunk-NSUMEERA.js";import{b as W}from"./chunk-XY5HGZW5.js";import{c as X,d as Y}from"./chunk-AAW7UMPO.js";import{c as Z,d as _}from"./chunk-3MBAUIBB.js";import{b as N}from"./chunk-RT7TRQVZ.js";import{b as rr}from"./chunk-CQG2HEAL.js";import{b as G}from"./chunk-RJSAGJQJ.js";import{b as H}from"./chunk-YEKSVVRC.js";import{b as J}from"./chunk-26NO42TF.js";import{b as K}from"./chunk-LGJM5YFT.js";import{b as L}from"./chunk-LMK6G2HH.js";import{b as O}from"./chunk-ZKC5HQYO.js";import{b as P}from"./chunk-ROJPSS6N.js";import{b as Q}from"./chunk-THNL3XFF.js";import{b as y}from"./chunk-CGE2EHYP.js";import{b as A}from"./chunk-ZA4HUKJ3.js";import{b as $}from"./chunk-WWZVR5NN.js";import{b as S}from"./chunk-JQBC3FXE.js";import{b as T}from"./chunk-NAX7MTAR.js";import{b as B}from"./chunk-5G2VOPPJ.js";import{b as D}from"./chunk-SGA7Y45Z.js";import{b as E}from"./chunk-EUXCM6C4.js";import{b as w}from"./chunk-YLE2OYY6.js";import{b as x}from"./chunk-S7OHMN3F.js";import{b as v}from"./chunk-YWZOGBFE.js";import"./chunk-YMMJLYIX.js";import{d as k,e as q,f as C}from"./chunk-YFPDB4PH.js";import"./chunk-SXB55JOI.js";import{b}from"./chunk-HJEHIH4P.js";import"./chunk-V7ZOPVQS.js";import"./chunk-4OALHZXB.js";import"./chunk-G43H2WGH.js";import{b as I}from"./chunk-RMQC3GS7.js";import{b as M}from"./chunk-SDLWFYVT.js";import{b as j}from"./chunk-FA2CHD73.js";import{b as t}from"./chunk-EPPBDXOG.js";import{b as l}from"./chunk-PS4LOXE5.js";import{b as u}from"./chunk-VNER2XXL.js";import{b as p}from"./chunk-AZ3RUDR2.js";import{b as e}from"./chunk-7ADG3DNO.js";import{b as d}from"./chunk-TEFXEYX3.js";import{b as c}from"./chunk-ZSVBYEY4.js";import{b as h}from"./chunk-SXRVLCZ4.js";import"./chunk-FSZWFMB4.js";import"./chunk-LIYVQA3X.js";import"./chunk-OOJCYVYF.js";import"./chunk-4PRVMER6.js";import"./chunk-MO4RPBN2.js";import"./chunk-YU6OGPZR.js";import"./chunk-SE4C7FJY.js";import{b as i}from"./chunk-LJKIWB5F.js";import{b as g}from"./chunk-MRP4ZCD7.js";import"./chunk-5WFYIUU2.js";import{b as m}from"./chunk-ND23BJUM.js";import"./chunk-D5WP4CKS.js";import"./chunk-6KZRLMG3.js";import{b as F}from"./chunk-MXVNCVD6.js";import"./chunk-OBH7XN5N.js";import{b as z}from"./chunk-7G3MC56B.js";import"./chunk-RLNOQILG.js";import{b as f}from"./chunk-EJQKHROT.js";import"./chunk-JBABAK44.js";import{b as n}from"./chunk-ITA43A73.js";import"./chunk-4VDEBYW7.js";import"./chunk-GTNBSMZR.js";import"./chunk-KGOUQS5A.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,2 +1,2 @@
1
1
  #!/usr/bin/env node
2
- import{a,b}from"./chunk-GR23MPTT.js";import"./chunk-ZO5PSLKR.js";import"./chunk-V7ZOPVQS.js";import"./chunk-4PRVMER6.js";import"./chunk-MO4RPBN2.js";import"./chunk-YU6OGPZR.js";import"./chunk-SE4C7FJY.js";import"./chunk-5WFYIUU2.js";import"./chunk-6KZRLMG3.js";import"./chunk-OBH7XN5N.js";import"./chunk-SYG3IW7P.js";import"./chunk-GTNBSMZR.js";import"./chunk-KGOUQS5A.js";export{b as flagsForFuzzing,a as jqCommand};
2
+ import{a,b}from"./chunk-VHUYNUT7.js";import"./chunk-ZO5PSLKR.js";import"./chunk-V7ZOPVQS.js";import"./chunk-4PRVMER6.js";import"./chunk-MO4RPBN2.js";import"./chunk-YU6OGPZR.js";import"./chunk-SE4C7FJY.js";import"./chunk-5WFYIUU2.js";import"./chunk-6KZRLMG3.js";import"./chunk-OBH7XN5N.js";import"./chunk-RLNOQILG.js";import"./chunk-GTNBSMZR.js";import"./chunk-KGOUQS5A.js";export{b as flagsForFuzzing,a as jqCommand};