just-bash 2.5.5 → 2.7.0

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 (292) hide show
  1. package/README.md +3 -3
  2. package/dist/AGENTS.md +3 -3
  3. package/dist/ast/types.d.ts +100 -11
  4. package/dist/bin/chunks/alias-EGIS5LUE.js +7 -0
  5. package/dist/bin/chunks/awk2-GFEJOWML.js +21 -0
  6. package/dist/bin/chunks/bash-PGDTHIM2.js +6 -0
  7. package/dist/bin/chunks/chmod-TYLTHXFR.js +9 -0
  8. package/dist/bin/chunks/chunk-D5WP4CKS.js +3 -0
  9. package/dist/bin/chunks/chunk-FSAGDARS.js +74 -0
  10. package/dist/bin/chunks/chunk-FSZWFMB4.js +16 -0
  11. package/dist/bin/chunks/chunk-IRUD2E3M.js +17 -0
  12. package/dist/bin/chunks/chunk-K5IXNHO5.js +8 -0
  13. package/dist/bin/chunks/chunk-KD3EODLB.js +6 -0
  14. package/dist/bin/{shell/chunks/echo-WSKTON6U.js → chunks/echo-7I42V66Q.js} +2 -2
  15. package/dist/bin/chunks/env-7A4MH7BJ.js +9 -0
  16. package/dist/bin/chunks/expansion-BOR3ELLC.js +2 -0
  17. package/dist/bin/{shell/chunks/find-CBEJ35BR.js → chunks/find-PHDZK64M.js} +1 -1
  18. package/dist/bin/{shell/chunks/grep-IIVQXFNI.js → chunks/grep-VX7MJMVN.js} +2 -2
  19. package/dist/bin/chunks/{head-DYK37Z24.js → head-TJHLLIMR.js} +1 -1
  20. package/dist/bin/{shell/chunks/jq-XXZPU5CA.js → chunks/jq-RGZHJNXC.js} +1 -1
  21. package/dist/bin/chunks/od-KRKGC2U3.js +5 -0
  22. package/dist/bin/chunks/printf-YPXD4CRE.js +15 -0
  23. package/dist/bin/chunks/pwd-L26WH2K4.js +3 -0
  24. package/dist/bin/chunks/python3-JGT65AEB.js +14 -0
  25. package/dist/bin/{shell/chunks/rg-Q4OTJOEF.js → chunks/rg-RSDLLECO.js} +1 -1
  26. package/dist/bin/chunks/rmdir-GOODLY5W.js +14 -0
  27. package/dist/bin/chunks/sed-JPDTWF4W.js +100 -0
  28. package/dist/bin/{shell/chunks/tail-BES27CZT.js → chunks/tail-YAUIERGN.js} +1 -1
  29. package/dist/bin/{shell/chunks/tar-C27YYUAS.js → chunks/tar-LFENC54A.js} +7 -7
  30. package/dist/bin/chunks/time-37F5EBPK.js +14 -0
  31. package/dist/bin/chunks/touch-IBPHJBM3.js +7 -0
  32. package/dist/bin/chunks/wc-SAOHEZYP.js +6 -0
  33. package/dist/bin/chunks/{which-73KOOLC6.js → which-FCDFBOMN.js} +1 -1
  34. package/dist/bin/chunks/whoami-JVLUNKSG.js +3 -0
  35. package/dist/bin/chunks/worker.js +1038 -0
  36. package/dist/bin/{shell/chunks/xan-6K2NGTHM.js → chunks/xan-5HNHTFMB.js} +19 -19
  37. package/dist/bin/chunks/{yq-MF2SNFGL.js → yq-PFV4T2PV.js} +1 -1
  38. package/dist/bin/just-bash.js +659 -135
  39. package/dist/bin/shell/chunks/alias-EGIS5LUE.js +7 -0
  40. package/dist/bin/shell/chunks/awk2-GFEJOWML.js +21 -0
  41. package/dist/bin/shell/chunks/bash-PGDTHIM2.js +6 -0
  42. package/dist/bin/shell/chunks/chmod-TYLTHXFR.js +9 -0
  43. package/dist/bin/shell/chunks/chunk-D5WP4CKS.js +3 -0
  44. package/dist/bin/shell/chunks/chunk-FSAGDARS.js +74 -0
  45. package/dist/bin/shell/chunks/chunk-FSZWFMB4.js +16 -0
  46. package/dist/bin/shell/chunks/chunk-IRUD2E3M.js +17 -0
  47. package/dist/bin/shell/chunks/chunk-K5IXNHO5.js +8 -0
  48. package/dist/bin/shell/chunks/chunk-KD3EODLB.js +6 -0
  49. package/dist/bin/{chunks/echo-WSKTON6U.js → shell/chunks/echo-7I42V66Q.js} +2 -2
  50. package/dist/bin/shell/chunks/env-7A4MH7BJ.js +9 -0
  51. package/dist/bin/shell/chunks/expansion-BOR3ELLC.js +2 -0
  52. package/dist/bin/{chunks/find-CBEJ35BR.js → shell/chunks/find-PHDZK64M.js} +1 -1
  53. package/dist/bin/{chunks/grep-IIVQXFNI.js → shell/chunks/grep-VX7MJMVN.js} +2 -2
  54. package/dist/bin/shell/chunks/{head-DYK37Z24.js → head-TJHLLIMR.js} +1 -1
  55. package/dist/bin/{chunks/jq-XXZPU5CA.js → shell/chunks/jq-RGZHJNXC.js} +1 -1
  56. package/dist/bin/shell/chunks/od-KRKGC2U3.js +5 -0
  57. package/dist/bin/shell/chunks/printf-YPXD4CRE.js +15 -0
  58. package/dist/bin/shell/chunks/pwd-L26WH2K4.js +3 -0
  59. package/dist/bin/shell/chunks/python3-JGT65AEB.js +14 -0
  60. package/dist/bin/{chunks/rg-Q4OTJOEF.js → shell/chunks/rg-RSDLLECO.js} +1 -1
  61. package/dist/bin/shell/chunks/rmdir-GOODLY5W.js +14 -0
  62. package/dist/bin/shell/chunks/sed-JPDTWF4W.js +100 -0
  63. package/dist/bin/{chunks/tail-BES27CZT.js → shell/chunks/tail-YAUIERGN.js} +1 -1
  64. package/dist/bin/{chunks/tar-C27YYUAS.js → shell/chunks/tar-LFENC54A.js} +7 -7
  65. package/dist/bin/shell/chunks/time-37F5EBPK.js +14 -0
  66. package/dist/bin/shell/chunks/touch-IBPHJBM3.js +7 -0
  67. package/dist/bin/shell/chunks/wc-SAOHEZYP.js +6 -0
  68. package/dist/bin/shell/chunks/{which-73KOOLC6.js → which-FCDFBOMN.js} +1 -1
  69. package/dist/bin/shell/chunks/whoami-JVLUNKSG.js +3 -0
  70. package/dist/bin/{chunks/xan-6K2NGTHM.js → shell/chunks/xan-5HNHTFMB.js} +19 -19
  71. package/dist/bin/shell/chunks/{yq-MF2SNFGL.js → yq-PFV4T2PV.js} +1 -1
  72. package/dist/bin/shell/shell.js +664 -140
  73. package/dist/bundle/browser.js +1251 -606
  74. package/dist/bundle/chunks/alias-ATFBB6D2.js +6 -0
  75. package/dist/bundle/chunks/awk2-6FBZTP57.js +20 -0
  76. package/dist/bundle/chunks/bash-OLRNM52U.js +5 -0
  77. package/dist/bundle/chunks/chmod-ODWUR7E6.js +8 -0
  78. package/dist/bundle/chunks/chunk-3AWP5CWK.js +73 -0
  79. package/dist/bundle/chunks/chunk-CXEWLFNE.js +16 -0
  80. package/dist/bundle/chunks/chunk-CZPA5RBA.js +5 -0
  81. package/dist/bundle/chunks/chunk-EEXR5ZDP.js +2 -0
  82. package/dist/bundle/chunks/chunk-HDQ56CKY.js +15 -0
  83. package/dist/bundle/chunks/chunk-PSW6BMXW.js +7 -0
  84. package/dist/bundle/chunks/{echo-VUHWYV6L.js → echo-6S7WE7XB.js} +2 -2
  85. package/dist/bundle/chunks/env-2UI6XINU.js +8 -0
  86. package/dist/bundle/chunks/expansion-RIGCFEMA.js +1 -0
  87. package/dist/bundle/chunks/{find-ACOAWALE.js → find-YGMSVGUV.js} +1 -1
  88. package/dist/bundle/chunks/{grep-ACVE42JK.js → grep-NIC6JNLH.js} +2 -2
  89. package/dist/bundle/chunks/{head-FZ6IQHYW.js → head-SA7P5NJ7.js} +1 -1
  90. package/dist/bundle/chunks/{jq-3YU5HRKE.js → jq-RLRYRPOJ.js} +1 -1
  91. package/dist/bundle/chunks/od-3FPDPLWJ.js +4 -0
  92. package/dist/bundle/chunks/printf-66XGXFCD.js +14 -0
  93. package/dist/bundle/chunks/pwd-S4NVAMC4.js +2 -0
  94. package/dist/bundle/chunks/python3-3OP7EKER.js +13 -0
  95. package/dist/bundle/chunks/{rg-YLZJWCEJ.js → rg-SRMB7L6G.js} +1 -1
  96. package/dist/bundle/chunks/rmdir-XFQE4ZYV.js +13 -0
  97. package/dist/bundle/chunks/sed-IV6HLDXU.js +99 -0
  98. package/dist/bundle/chunks/{tail-PD4RZR6J.js → tail-52LRAWXT.js} +1 -1
  99. package/dist/bundle/chunks/{tar-QWBXMF7K.js → tar-LWIHPMT6.js} +7 -7
  100. package/dist/bundle/chunks/time-UWXBG6CS.js +13 -0
  101. package/dist/bundle/chunks/touch-TDTEBHHI.js +6 -0
  102. package/dist/bundle/chunks/wc-HE5XARI4.js +5 -0
  103. package/dist/bundle/chunks/{which-M5MQ6QXQ.js → which-UBLRBDHN.js} +1 -1
  104. package/dist/bundle/chunks/whoami-YUDAIS32.js +2 -0
  105. package/dist/bundle/chunks/worker.js +1038 -0
  106. package/dist/bundle/chunks/{xan-2R2APJJ4.js → xan-A6VPI4HJ.js} +19 -19
  107. package/dist/bundle/chunks/{yq-KANM4MD2.js → yq-L665QPQU.js} +1 -1
  108. package/dist/bundle/index.js +657 -133
  109. package/dist/commands/awk/ast.d.ts +1 -0
  110. package/dist/commands/awk/interpreter/context.d.ts +14 -0
  111. package/dist/commands/awk/interpreter/interpreter.d.ts +2 -0
  112. package/dist/commands/awk/interpreter/{helpers.d.ts → type-coercion.d.ts} +4 -1
  113. package/dist/commands/awk/parser2-print.d.ts +35 -0
  114. package/dist/commands/awk/parser2.d.ts +42 -34
  115. package/dist/commands/printf/strftime.d.ts +9 -0
  116. package/dist/commands/python3/fs-bridge-handler.d.ts +50 -0
  117. package/dist/commands/python3/protocol.d.ts +138 -0
  118. package/dist/commands/python3/python3.d.ts +11 -0
  119. package/dist/commands/python3/sync-fs-backend.d.ts +59 -0
  120. package/dist/commands/python3/worker.d.ts +16 -0
  121. package/dist/commands/query-engine/builtins/array-builtins.d.ts +20 -0
  122. package/dist/commands/query-engine/builtins/control-builtins.d.ts +18 -0
  123. package/dist/commands/query-engine/builtins/date-builtins.d.ts +15 -0
  124. package/dist/commands/query-engine/builtins/format-builtins.d.ts +11 -0
  125. package/dist/commands/query-engine/builtins/index-builtins.d.ts +16 -0
  126. package/dist/commands/query-engine/builtins/index.d.ts +17 -0
  127. package/dist/commands/query-engine/builtins/math-builtins.d.ts +15 -0
  128. package/dist/commands/query-engine/builtins/navigation-builtins.d.ts +18 -0
  129. package/dist/commands/query-engine/builtins/object-builtins.d.ts +15 -0
  130. package/dist/commands/query-engine/builtins/path-builtins.d.ts +20 -0
  131. package/dist/commands/query-engine/builtins/sql-builtins.d.ts +16 -0
  132. package/dist/commands/query-engine/builtins/string-builtins.d.ts +15 -0
  133. package/dist/commands/query-engine/builtins/type-builtins.d.ts +11 -0
  134. package/dist/commands/query-engine/evaluator.d.ts +10 -2
  135. package/dist/commands/query-engine/parser-types.d.ts +171 -0
  136. package/dist/commands/query-engine/parser.d.ts +2 -132
  137. package/dist/commands/query-engine/path-operations.d.ts +15 -0
  138. package/dist/commands/query-engine/value-operations.d.ts +39 -0
  139. package/dist/commands/registry.d.ts +1 -1
  140. package/dist/commands/rmdir/rmdir.d.ts +2 -0
  141. package/dist/commands/sed/lexer.d.ts +12 -0
  142. package/dist/commands/sed/parser.d.ts +9 -0
  143. package/dist/commands/sed/sed-regex.d.ts +23 -0
  144. package/dist/commands/sed/types.d.ts +13 -1
  145. package/dist/commands/tar/tar-options.d.ts +36 -0
  146. package/dist/commands/time/time.d.ts +25 -0
  147. package/dist/commands/whoami/whoami.d.ts +9 -0
  148. package/dist/commands/xan/moonblade-tokenizer.d.ts +25 -0
  149. package/dist/fs/in-memory-fs/in-memory-fs.d.ts +12 -0
  150. package/dist/fs/interface.d.ts +16 -0
  151. package/dist/fs/mountable-fs/mountable-fs.d.ts +12 -0
  152. package/dist/fs/overlay-fs/overlay-fs.d.ts +13 -1
  153. package/dist/fs/read-write-fs/read-write-fs.d.ts +13 -1
  154. package/dist/interpreter/alias-expansion.d.ts +23 -0
  155. package/dist/interpreter/arithmetic.d.ts +1 -6
  156. package/dist/interpreter/assignment-expansion.d.ts +24 -0
  157. package/dist/interpreter/builtin-dispatch.d.ts +39 -0
  158. package/dist/interpreter/builtins/compgen.d.ts +26 -0
  159. package/dist/interpreter/builtins/complete.d.ts +17 -0
  160. package/dist/interpreter/builtins/compopt.d.ts +28 -0
  161. package/dist/interpreter/builtins/declare-array-parsing.d.ts +14 -0
  162. package/dist/interpreter/builtins/declare-print.d.ts +39 -0
  163. package/dist/interpreter/builtins/declare.d.ts +10 -4
  164. package/dist/interpreter/builtins/dirs.d.ts +29 -0
  165. package/dist/interpreter/builtins/eval.d.ts +1 -1
  166. package/dist/interpreter/builtins/export.d.ts +1 -0
  167. package/dist/interpreter/builtins/getopts.d.ts +18 -0
  168. package/dist/interpreter/builtins/hash.d.ts +19 -0
  169. package/dist/interpreter/builtins/help.d.ts +12 -0
  170. package/dist/interpreter/builtins/index.d.ts +9 -1
  171. package/dist/interpreter/builtins/local.d.ts +1 -1
  172. package/dist/interpreter/builtins/read.d.ts +1 -1
  173. package/dist/interpreter/builtins/set.d.ts +3 -0
  174. package/dist/interpreter/builtins/shift.d.ts +3 -0
  175. package/dist/interpreter/builtins/shopt.d.ts +7 -0
  176. package/dist/interpreter/builtins/unset.d.ts +5 -1
  177. package/dist/interpreter/builtins/variable-assignment.d.ts +66 -0
  178. package/dist/interpreter/command-resolution.d.ts +43 -0
  179. package/dist/interpreter/conditionals.d.ts +1 -1
  180. package/dist/interpreter/errors.d.ts +36 -1
  181. package/dist/interpreter/expansion/analysis.d.ts +15 -17
  182. package/dist/interpreter/expansion/arith-text-expansion.d.ts +20 -0
  183. package/dist/interpreter/expansion/array-pattern-ops.d.ts +21 -0
  184. package/dist/interpreter/expansion/array-prefix-suffix.d.ts +46 -0
  185. package/dist/interpreter/expansion/array-slice-transform.d.ts +36 -0
  186. package/dist/interpreter/expansion/array-word-expansion.d.ts +39 -0
  187. package/dist/interpreter/expansion/command-substitution.d.ts +23 -0
  188. package/dist/interpreter/expansion/glob-escape.d.ts +32 -0
  189. package/dist/interpreter/expansion/indirect-expansion.d.ts +42 -0
  190. package/dist/interpreter/expansion/parameter-ops.d.ts +113 -0
  191. package/dist/interpreter/expansion/pattern-expansion.d.ts +23 -0
  192. package/dist/interpreter/expansion/pattern-removal.d.ts +18 -0
  193. package/dist/interpreter/expansion/pattern.d.ts +2 -1
  194. package/dist/interpreter/expansion/positional-params.d.ts +59 -0
  195. package/dist/interpreter/expansion/prompt.d.ts +39 -0
  196. package/dist/interpreter/expansion/quoting.d.ts +13 -0
  197. package/dist/interpreter/expansion/tilde.d.ts +12 -0
  198. package/dist/interpreter/expansion/unquoted-expansion.d.ts +76 -0
  199. package/dist/interpreter/expansion/variable-attrs.d.ts +19 -0
  200. package/dist/interpreter/expansion/variable.d.ts +10 -1
  201. package/dist/interpreter/expansion/word-glob-expansion.d.ts +33 -0
  202. package/dist/interpreter/expansion/word-split.d.ts +11 -6
  203. package/dist/interpreter/expansion.d.ts +30 -4
  204. package/dist/interpreter/functions.d.ts +1 -1
  205. package/dist/interpreter/helpers/array.d.ts +20 -0
  206. package/dist/interpreter/helpers/ifs.d.ts +66 -5
  207. package/dist/interpreter/helpers/nameref.d.ts +65 -0
  208. package/dist/interpreter/helpers/quoting.d.ts +24 -0
  209. package/dist/interpreter/helpers/readonly.d.ts +28 -4
  210. package/dist/interpreter/helpers/shell-constants.d.ts +25 -0
  211. package/dist/interpreter/helpers/shellopts.d.ts +28 -0
  212. package/dist/interpreter/helpers/string-compare.d.ts +3 -1
  213. package/dist/interpreter/helpers/tilde.d.ts +13 -0
  214. package/dist/interpreter/helpers/variable-tests.d.ts +1 -1
  215. package/dist/interpreter/helpers/word-matching.d.ts +26 -0
  216. package/dist/interpreter/helpers/xtrace.d.ts +18 -0
  217. package/dist/interpreter/interpreter.d.ts +13 -14
  218. package/dist/interpreter/pipeline-execution.d.ts +16 -0
  219. package/dist/interpreter/redirections.d.ts +38 -1
  220. package/dist/interpreter/simple-command-assignments.d.ts +29 -0
  221. package/dist/interpreter/subshell-group.d.ts +32 -0
  222. package/dist/interpreter/type-command.d.ts +37 -0
  223. package/dist/interpreter/types.d.ts +255 -21
  224. package/dist/limits.d.ts +2 -0
  225. package/dist/parser/arithmetic-parser.d.ts +2 -4
  226. package/dist/parser/arithmetic-primaries.d.ts +45 -0
  227. package/dist/parser/compound-parser.d.ts +21 -7
  228. package/dist/parser/expansion-parser.d.ts +7 -1
  229. package/dist/parser/lexer.d.ts +57 -0
  230. package/dist/parser/parser-substitution.d.ts +62 -0
  231. package/dist/parser/parser.d.ts +39 -2
  232. package/dist/parser/types.d.ts +1 -0
  233. package/dist/types.d.ts +17 -0
  234. package/package.json +10 -5
  235. package/dist/bin/chunks/alias-PCMLRCRW.js +0 -7
  236. package/dist/bin/chunks/awk2-D2US2LMM.js +0 -20
  237. package/dist/bin/chunks/bash-UT3MT5UU.js +0 -7
  238. package/dist/bin/chunks/chmod-3DIKREF7.js +0 -9
  239. package/dist/bin/chunks/chunk-ACRTDIBO.js +0 -6
  240. package/dist/bin/chunks/chunk-DV5HL4K2.js +0 -17
  241. package/dist/bin/chunks/chunk-J7BCMQDI.js +0 -16
  242. package/dist/bin/chunks/chunk-NWWB2XRE.js +0 -6
  243. package/dist/bin/chunks/chunk-PM2DS2YW.js +0 -3
  244. package/dist/bin/chunks/env-YLLSNZZN.js +0 -9
  245. package/dist/bin/chunks/od-SLM7SRWU.js +0 -7
  246. package/dist/bin/chunks/printf-HWUQKYUM.js +0 -14
  247. package/dist/bin/chunks/pwd-53KG2MCJ.js +0 -3
  248. package/dist/bin/chunks/sed-5LQMJYRJ.js +0 -80
  249. package/dist/bin/chunks/touch-TSNAXMZ2.js +0 -4
  250. package/dist/bin/chunks/wc-QSBRKIF5.js +0 -6
  251. package/dist/bin/shell/chunks/alias-PCMLRCRW.js +0 -7
  252. package/dist/bin/shell/chunks/awk2-D2US2LMM.js +0 -20
  253. package/dist/bin/shell/chunks/bash-UT3MT5UU.js +0 -7
  254. package/dist/bin/shell/chunks/chmod-3DIKREF7.js +0 -9
  255. package/dist/bin/shell/chunks/chunk-ACRTDIBO.js +0 -6
  256. package/dist/bin/shell/chunks/chunk-DV5HL4K2.js +0 -17
  257. package/dist/bin/shell/chunks/chunk-J7BCMQDI.js +0 -16
  258. package/dist/bin/shell/chunks/chunk-NWWB2XRE.js +0 -6
  259. package/dist/bin/shell/chunks/chunk-PM2DS2YW.js +0 -3
  260. package/dist/bin/shell/chunks/env-YLLSNZZN.js +0 -9
  261. package/dist/bin/shell/chunks/od-SLM7SRWU.js +0 -7
  262. package/dist/bin/shell/chunks/printf-HWUQKYUM.js +0 -14
  263. package/dist/bin/shell/chunks/pwd-53KG2MCJ.js +0 -3
  264. package/dist/bin/shell/chunks/sed-5LQMJYRJ.js +0 -80
  265. package/dist/bin/shell/chunks/touch-TSNAXMZ2.js +0 -4
  266. package/dist/bin/shell/chunks/wc-QSBRKIF5.js +0 -6
  267. package/dist/bundle/chunks/alias-4UGRF4DM.js +0 -6
  268. package/dist/bundle/chunks/awk2-46RTIZKB.js +0 -19
  269. package/dist/bundle/chunks/bash-ZILV3VHA.js +0 -6
  270. package/dist/bundle/chunks/chmod-FBHLEIY6.js +0 -8
  271. package/dist/bundle/chunks/chunk-4JO5BKO4.js +0 -5
  272. package/dist/bundle/chunks/chunk-BOJ3OAZB.js +0 -16
  273. package/dist/bundle/chunks/chunk-CG2HXOFG.js +0 -5
  274. package/dist/bundle/chunks/chunk-NWEGHOXL.js +0 -2
  275. package/dist/bundle/chunks/chunk-W2EKKAIL.js +0 -15
  276. package/dist/bundle/chunks/env-EG5SQSAQ.js +0 -8
  277. package/dist/bundle/chunks/od-ECWXNUB4.js +0 -6
  278. package/dist/bundle/chunks/printf-VG2POOXB.js +0 -13
  279. package/dist/bundle/chunks/pwd-AC4P3JKI.js +0 -2
  280. package/dist/bundle/chunks/sed-ZKODWZ6F.js +0 -79
  281. package/dist/bundle/chunks/touch-MVQSKQKT.js +0 -3
  282. package/dist/bundle/chunks/wc-DFQKWSIZ.js +0 -5
  283. package/dist/interpreter/builtins/variable-helpers.d.ts +0 -30
  284. /package/dist/bin/chunks/{curl-LCMREE7R.js → curl-TH7YRBSA.js} +0 -0
  285. /package/dist/bin/chunks/{file-LNCFDPQZ.js → file-6PCTL3MH.js} +0 -0
  286. /package/dist/bin/shell/chunks/{curl-LCMREE7R.js → curl-TH7YRBSA.js} +0 -0
  287. /package/dist/bin/shell/chunks/{file-LNCFDPQZ.js → file-6PCTL3MH.js} +0 -0
  288. /package/dist/bundle/chunks/{curl-TVZH24MD.js → curl-XLP4VABU.js} +0 -0
  289. /package/dist/bundle/chunks/{file-XPA6O6H2.js → file-NQP3CKRV.js} +0 -0
  290. /package/dist/commands/curl/{utils.d.ts → response-formatting.d.ts} +0 -0
  291. /package/dist/commands/xan/{xan-utils.d.ts → column-selection.d.ts} +0 -0
  292. /package/dist/fs/{utils.d.ts → encoding.d.ts} +0 -0
@@ -82,6 +82,7 @@ export interface AwkGetline {
82
82
  type: "getline";
83
83
  variable?: string;
84
84
  file?: AwkExpr;
85
+ command?: AwkExpr;
85
86
  }
86
87
  export interface AwkTuple {
87
88
  type: "tuple";
@@ -9,6 +9,7 @@ export interface AwkRuntimeContext {
9
9
  FS: string;
10
10
  OFS: string;
11
11
  ORS: string;
12
+ OFMT: string;
12
13
  NR: number;
13
14
  NF: number;
14
15
  FNR: number;
@@ -20,8 +21,10 @@ export interface AwkRuntimeContext {
20
21
  line: string;
21
22
  vars: Record<string, AwkValue>;
22
23
  arrays: Record<string, Record<string, AwkValue>>;
24
+ arrayAliases: Map<string, string>;
23
25
  ARGC: number;
24
26
  ARGV: Record<string, string>;
27
+ ENVIRON: Record<string, string>;
25
28
  functions: Map<string, AwkFunctionDef>;
26
29
  lines?: string[];
27
30
  lineIndex?: number;
@@ -37,11 +40,17 @@ export interface AwkRuntimeContext {
37
40
  loopContinue: boolean;
38
41
  returnValue?: AwkValue;
39
42
  hasReturn: boolean;
43
+ inEndBlock: boolean;
40
44
  output: string;
41
45
  fs?: AwkFileSystem;
42
46
  cwd?: string;
43
47
  openedFiles: Set<string>;
44
48
  random?: () => number;
49
+ exec?: (cmd: string) => Promise<{
50
+ stdout: string;
51
+ stderr: string;
52
+ exitCode: number;
53
+ }>;
45
54
  }
46
55
  export interface CreateContextOptions {
47
56
  fieldSep?: RegExp;
@@ -49,5 +58,10 @@ export interface CreateContextOptions {
49
58
  maxRecursionDepth?: number;
50
59
  fs?: AwkFileSystem;
51
60
  cwd?: string;
61
+ exec?: (cmd: string) => Promise<{
62
+ stdout: string;
63
+ stderr: string;
64
+ exitCode: number;
65
+ }>;
52
66
  }
53
67
  export declare function createRuntimeContext(options?: CreateContextOptions): AwkRuntimeContext;
@@ -25,6 +25,8 @@ export declare class AwkInterpreter {
25
25
  executeLine(line: string): Promise<void>;
26
26
  /**
27
27
  * Execute all END blocks.
28
+ * END blocks run even after exit is called, but exit from within
29
+ * an END block stops further END block execution.
28
30
  */
29
31
  executeEnd(): Promise<void>;
30
32
  /**
@@ -6,7 +6,10 @@
6
6
  import type { AwkValue } from "./types.js";
7
7
  /**
8
8
  * Check if a value is truthy in AWK.
9
- * Numbers are truthy if non-zero, strings if non-empty.
9
+ * - Numbers: truthy if non-zero
10
+ * - Empty string: falsy
11
+ * - String "0": falsy (canonical string representation of zero)
12
+ * - All other non-empty strings: truthy (including "00", "0.0", etc.)
10
13
  */
11
14
  export declare function isTruthy(val: AwkValue): boolean;
12
15
  /**
@@ -0,0 +1,35 @@
1
+ /**
2
+ * AWK Parser Print Context Helpers
3
+ *
4
+ * Handles parsing in print/printf context where > and >> are redirection
5
+ * operators rather than comparison operators.
6
+ */
7
+ import type { AwkExpr, AwkStmt } from "./ast.js";
8
+ import type { Token, TokenType } from "./lexer.js";
9
+ /**
10
+ * Interface for parser methods needed by print parsing helpers.
11
+ * Used to avoid circular dependencies.
12
+ */
13
+ export interface PrintParserContext {
14
+ tokens: Token[];
15
+ pos: number;
16
+ current(): Token;
17
+ advance(): Token;
18
+ match(...types: TokenType[]): boolean;
19
+ check(type: TokenType): boolean;
20
+ expect(type: TokenType, message?: string): Token;
21
+ skipNewlines(): void;
22
+ parseExpression(): AwkExpr;
23
+ parseTernary(): AwkExpr;
24
+ parsePrimary(): AwkExpr;
25
+ parseAddSub(): AwkExpr;
26
+ setPos(pos: number): void;
27
+ }
28
+ /**
29
+ * Parse a print statement.
30
+ */
31
+ export declare function parsePrintStatement(p: PrintParserContext): AwkStmt;
32
+ /**
33
+ * Parse a printf statement.
34
+ */
35
+ export declare function parsePrintfStatement(p: PrintParserContext): AwkStmt;
@@ -3,17 +3,19 @@
3
3
  *
4
4
  * Recursive descent parser that builds an AST from tokens.
5
5
  */
6
- import type { AwkProgram } from "./ast.js";
6
+ import type { AwkExpr, AwkProgram } from "./ast.js";
7
+ import { type Token, TokenType } from "./lexer.js";
7
8
  export declare class AwkParser {
8
- private tokens;
9
- private pos;
9
+ tokens: Token[];
10
+ pos: number;
10
11
  parse(input: string): AwkProgram;
11
- private current;
12
- private advance;
13
- private match;
14
- private check;
15
- private expect;
16
- private skipNewlines;
12
+ setPos(newPos: number): void;
13
+ current(): Token;
14
+ advance(): Token;
15
+ match(...types: TokenType[]): boolean;
16
+ check(type: TokenType): boolean;
17
+ expect(type: TokenType, message?: string): Token;
18
+ skipNewlines(): void;
17
19
  private skipTerminators;
18
20
  private parseProgram;
19
21
  private parseFunction;
@@ -24,29 +26,14 @@ export declare class AwkParser {
24
26
  private parseWhile;
25
27
  private parseDoWhile;
26
28
  private parseFor;
27
- private parsePrint;
28
- /**
29
- * Parse a print argument - same as ternary but treats > and >> at the TOP LEVEL
30
- * (not inside ternary) as redirection rather than comparison operators.
31
- */
32
- private parsePrintArg;
33
- /**
34
- * Look ahead to see if there's a ternary ? operator before the next statement terminator.
35
- * This tells us whether > is comparison (in ternary condition) or redirection.
36
- */
37
- private lookAheadForTernary;
38
- private parsePrintOr;
39
- private parsePrintAnd;
40
- private parsePrintIn;
41
- private parsePrintMatch;
29
+ parseExpression(): AwkExpr;
30
+ private parseAssignment;
31
+ parseTernary(): AwkExpr;
42
32
  /**
43
- * Like parseComparison but doesn't consume > and >> (for print redirection)
33
+ * Parse command pipe getline: "cmd" | getline [var]
34
+ * This has lower precedence than logical OR but higher than ternary.
44
35
  */
45
- private parsePrintComparison;
46
- private parsePrintf;
47
- private parseExpression;
48
- private parseAssignment;
49
- private parseTernary;
36
+ private parsePipeGetline;
50
37
  private parseOr;
51
38
  /**
52
39
  * Continue parsing a logical OR/AND expression from a given left-hand side.
@@ -59,15 +46,36 @@ export declare class AwkParser {
59
46
  private parseLogicalAndRest;
60
47
  private parseAnd;
61
48
  private parseIn;
49
+ private parseConcatenation;
62
50
  private parseMatch;
63
51
  private parseComparison;
64
- private parseConcatenation;
65
52
  private canStartExpression;
66
- private isComparisonOrHigherOp;
67
- private parseAddSub;
53
+ /**
54
+ * Check if the current token terminates a concatenation.
55
+ * These are tokens that indicate we've reached a higher-level operator
56
+ * or end of expression.
57
+ */
58
+ private isConcatTerminator;
59
+ parseAddSub(): AwkExpr;
68
60
  private parseMulDiv;
69
61
  private parseUnary;
70
62
  private parsePower;
71
63
  private parsePostfix;
72
- private parsePrimary;
64
+ /**
65
+ * Parse a field index expression. This is like parseUnary but does NOT allow
66
+ * postfix operators, so that $i++ parses as ($i)++ rather than $(i++).
67
+ * Allows: $1, $i, $++i, $--i, $(expr), $-1
68
+ * Does NOT consume postfix ++ or -- (those apply to the field, not the index)
69
+ */
70
+ private parseFieldIndex;
71
+ /**
72
+ * Parse power expression for field index (no postfix on base)
73
+ */
74
+ private parseFieldIndexPower;
75
+ /**
76
+ * Parse primary expression for field index - like parsePrimary but returns
77
+ * without checking for postfix operators
78
+ */
79
+ private parseFieldIndexPrimary;
80
+ parsePrimary(): AwkExpr;
73
81
  }
@@ -0,0 +1,9 @@
1
+ /**
2
+ * Strftime Formatting Functions
3
+ *
4
+ * Handles date/time formatting for printf's %(...)T directive.
5
+ */
6
+ /**
7
+ * Format a timestamp using strftime-like format string.
8
+ */
9
+ export declare function formatStrftime(format: string, timestamp: number, tz?: string): string;
@@ -0,0 +1,50 @@
1
+ /**
2
+ * Main thread filesystem bridge handler
3
+ *
4
+ * Runs on the main thread and processes filesystem requests from the worker thread.
5
+ * Uses SharedArrayBuffer + Atomics for synchronization.
6
+ */
7
+ import type { IFileSystem } from "../../fs/interface.js";
8
+ import type { SecureFetch } from "../../network/fetch.js";
9
+ export interface FsBridgeOutput {
10
+ stdout: string;
11
+ stderr: string;
12
+ exitCode: number;
13
+ }
14
+ /**
15
+ * Handles filesystem requests from the worker thread.
16
+ */
17
+ export declare class FsBridgeHandler {
18
+ private fs;
19
+ private cwd;
20
+ private secureFetch;
21
+ private protocol;
22
+ private running;
23
+ private output;
24
+ constructor(sharedBuffer: SharedArrayBuffer, fs: IFileSystem, cwd: string, secureFetch?: SecureFetch | undefined);
25
+ /**
26
+ * Run the handler loop until EXIT operation or timeout.
27
+ */
28
+ run(timeoutMs: number): Promise<FsBridgeOutput>;
29
+ stop(): void;
30
+ private handleOperation;
31
+ private resolvePath;
32
+ private handleReadFile;
33
+ private handleWriteFile;
34
+ private handleStat;
35
+ private handleLstat;
36
+ private handleReaddir;
37
+ private handleMkdir;
38
+ private handleRm;
39
+ private handleExists;
40
+ private handleAppendFile;
41
+ private handleSymlink;
42
+ private handleReadlink;
43
+ private handleChmod;
44
+ private handleRealpath;
45
+ private handleWriteStdout;
46
+ private handleWriteStderr;
47
+ private handleExit;
48
+ private handleHttpRequest;
49
+ private setErrorFromException;
50
+ }
@@ -0,0 +1,138 @@
1
+ /**
2
+ * SharedArrayBuffer protocol for synchronous filesystem bridge
3
+ *
4
+ * This protocol enables synchronous filesystem access from a worker thread
5
+ * (where Pyodide/Python runs) to the main thread (which has async IFileSystem).
6
+ */
7
+ declare global {
8
+ interface Atomics {
9
+ waitAsync(typedArray: Int32Array, index: number, value: number, timeout?: number): {
10
+ async: false;
11
+ value: "not-equal" | "timed-out";
12
+ } | {
13
+ async: true;
14
+ value: Promise<"ok" | "timed-out">;
15
+ };
16
+ }
17
+ }
18
+ /** Operation codes */
19
+ export declare const OpCode: {
20
+ readonly NOOP: 0;
21
+ readonly READ_FILE: 1;
22
+ readonly WRITE_FILE: 2;
23
+ readonly STAT: 3;
24
+ readonly READDIR: 4;
25
+ readonly MKDIR: 5;
26
+ readonly RM: 6;
27
+ readonly EXISTS: 7;
28
+ readonly APPEND_FILE: 8;
29
+ readonly SYMLINK: 9;
30
+ readonly READLINK: 10;
31
+ readonly LSTAT: 11;
32
+ readonly CHMOD: 12;
33
+ readonly REALPATH: 13;
34
+ readonly WRITE_STDOUT: 100;
35
+ readonly WRITE_STDERR: 101;
36
+ readonly EXIT: 102;
37
+ readonly HTTP_REQUEST: 200;
38
+ };
39
+ export type OpCodeType = (typeof OpCode)[keyof typeof OpCode];
40
+ /** Status codes for synchronization */
41
+ export declare const Status: {
42
+ readonly PENDING: 0;
43
+ readonly READY: 1;
44
+ readonly SUCCESS: 2;
45
+ readonly ERROR: 3;
46
+ };
47
+ export type StatusType = (typeof Status)[keyof typeof Status];
48
+ /** Error codes */
49
+ export declare const ErrorCode: {
50
+ readonly NONE: 0;
51
+ readonly NOT_FOUND: 1;
52
+ readonly IS_DIRECTORY: 2;
53
+ readonly NOT_DIRECTORY: 3;
54
+ readonly EXISTS: 4;
55
+ readonly PERMISSION_DENIED: 5;
56
+ readonly INVALID_PATH: 6;
57
+ readonly IO_ERROR: 7;
58
+ readonly TIMEOUT: 8;
59
+ readonly NETWORK_ERROR: 9;
60
+ readonly NETWORK_NOT_CONFIGURED: 10;
61
+ };
62
+ export type ErrorCodeType = (typeof ErrorCode)[keyof typeof ErrorCode];
63
+ /** Flags for operations */
64
+ export declare const Flags: {
65
+ readonly NONE: 0;
66
+ readonly RECURSIVE: 1;
67
+ readonly FORCE: 2;
68
+ readonly MKDIR_RECURSIVE: 1;
69
+ };
70
+ /** Create a new SharedArrayBuffer for the protocol */
71
+ export declare function createSharedBuffer(): SharedArrayBuffer;
72
+ /**
73
+ * Helper class for reading/writing protocol data
74
+ */
75
+ export declare class ProtocolBuffer {
76
+ private int32View;
77
+ private uint8View;
78
+ private dataView;
79
+ constructor(buffer: SharedArrayBuffer);
80
+ getOpCode(): OpCodeType;
81
+ setOpCode(code: OpCodeType): void;
82
+ getStatus(): StatusType;
83
+ setStatus(status: StatusType): void;
84
+ getPathLength(): number;
85
+ setPathLength(length: number): void;
86
+ getDataLength(): number;
87
+ setDataLength(length: number): void;
88
+ getResultLength(): number;
89
+ setResultLength(length: number): void;
90
+ getErrorCode(): ErrorCodeType;
91
+ setErrorCode(code: ErrorCodeType): void;
92
+ getFlags(): number;
93
+ setFlags(flags: number): void;
94
+ getMode(): number;
95
+ setMode(mode: number): void;
96
+ getPath(): string;
97
+ setPath(path: string): void;
98
+ getData(): Uint8Array;
99
+ setData(data: Uint8Array): void;
100
+ getDataAsString(): string;
101
+ setDataFromString(str: string): void;
102
+ getResult(): Uint8Array;
103
+ setResult(data: Uint8Array): void;
104
+ getResultAsString(): string;
105
+ setResultFromString(str: string): void;
106
+ encodeStat(stat: {
107
+ isFile: boolean;
108
+ isDirectory: boolean;
109
+ isSymbolicLink: boolean;
110
+ mode: number;
111
+ size: number;
112
+ mtime: Date;
113
+ }): void;
114
+ decodeStat(): {
115
+ isFile: boolean;
116
+ isDirectory: boolean;
117
+ isSymbolicLink: boolean;
118
+ mode: number;
119
+ size: number;
120
+ mtime: Date;
121
+ };
122
+ waitForReady(timeout?: number): "ok" | "timed-out" | "not-equal";
123
+ waitForReadyAsync(timeout?: number): {
124
+ async: false;
125
+ value: "not-equal" | "timed-out";
126
+ } | {
127
+ async: true;
128
+ value: Promise<"ok" | "timed-out">;
129
+ };
130
+ /**
131
+ * Wait for status to become READY.
132
+ * Returns immediately if status is already READY, or waits until it changes.
133
+ */
134
+ waitUntilReady(timeout: number): Promise<boolean>;
135
+ waitForResult(timeout?: number): "ok" | "timed-out" | "not-equal";
136
+ notify(): number;
137
+ reset(): void;
138
+ }
@@ -0,0 +1,11 @@
1
+ /**
2
+ * python3 - Execute Python code via Pyodide (Python in WebAssembly)
3
+ *
4
+ * Runs Python code in an isolated worker thread with access to the
5
+ * virtual filesystem via SharedArrayBuffer bridge.
6
+ *
7
+ * This command is Node.js only (uses worker_threads).
8
+ */
9
+ import type { Command } from "../../types.js";
10
+ export declare const python3Command: Command;
11
+ export declare const pythonCommand: Command;
@@ -0,0 +1,59 @@
1
+ /**
2
+ * Worker-side synchronous filesystem backend
3
+ *
4
+ * Runs in the worker thread and makes synchronous calls to the main thread
5
+ * via SharedArrayBuffer + Atomics.
6
+ */
7
+ /**
8
+ * Synchronous filesystem backend for Pyodide worker.
9
+ */
10
+ export declare class SyncFsBackend {
11
+ private protocol;
12
+ constructor(sharedBuffer: SharedArrayBuffer);
13
+ private execSync;
14
+ readFile(path: string): Uint8Array;
15
+ writeFile(path: string, data: Uint8Array): void;
16
+ stat(path: string): {
17
+ isFile: boolean;
18
+ isDirectory: boolean;
19
+ isSymbolicLink: boolean;
20
+ mode: number;
21
+ size: number;
22
+ mtime: Date;
23
+ };
24
+ lstat(path: string): {
25
+ isFile: boolean;
26
+ isDirectory: boolean;
27
+ isSymbolicLink: boolean;
28
+ mode: number;
29
+ size: number;
30
+ mtime: Date;
31
+ };
32
+ readdir(path: string): string[];
33
+ mkdir(path: string, recursive?: boolean): void;
34
+ rm(path: string, recursive?: boolean, force?: boolean): void;
35
+ exists(path: string): boolean;
36
+ appendFile(path: string, data: Uint8Array): void;
37
+ symlink(target: string, linkPath: string): void;
38
+ readlink(path: string): string;
39
+ chmod(path: string, mode: number): void;
40
+ realpath(path: string): string;
41
+ writeStdout(data: string): void;
42
+ writeStderr(data: string): void;
43
+ exit(code: number): void;
44
+ /**
45
+ * Make an HTTP request through the main thread's secureFetch.
46
+ * Returns the response as a parsed object.
47
+ */
48
+ httpRequest(url: string, options?: {
49
+ method?: string;
50
+ headers?: Record<string, string>;
51
+ body?: string;
52
+ }): {
53
+ status: number;
54
+ statusText: string;
55
+ headers: Record<string, string>;
56
+ body: string;
57
+ url: string;
58
+ };
59
+ }
@@ -0,0 +1,16 @@
1
+ /**
2
+ * Worker thread for Python execution via Pyodide.
3
+ * Keeps Pyodide loaded and handles multiple execution requests.
4
+ */
5
+ export interface WorkerInput {
6
+ sharedBuffer: SharedArrayBuffer;
7
+ pythonCode: string;
8
+ cwd: string;
9
+ env: Record<string, string>;
10
+ args: string[];
11
+ scriptPath?: string;
12
+ }
13
+ export interface WorkerOutput {
14
+ success: boolean;
15
+ error?: string;
16
+ }
@@ -0,0 +1,20 @@
1
+ /**
2
+ * Array-related jq builtins
3
+ *
4
+ * Handles array manipulation functions like sort, sort_by, group_by, max, min, add, etc.
5
+ */
6
+ import type { EvalContext } from "../evaluator.js";
7
+ import type { AstNode } from "../parser.js";
8
+ import type { QueryValue } from "../value-operations.js";
9
+ type EvalFn = (value: QueryValue, ast: AstNode, ctx: EvalContext) => QueryValue[];
10
+ type EvalWithPartialFn = (value: QueryValue, ast: AstNode, ctx: EvalContext) => QueryValue[];
11
+ type CompareFn = (a: QueryValue, b: QueryValue) => number;
12
+ type IsTruthyFn = (v: QueryValue) => boolean;
13
+ type ContainsDeepFn = (a: QueryValue, b: QueryValue) => boolean;
14
+ type ExecutionLimitErrorClass = new (message: string, kind: "recursion" | "commands" | "iterations") => Error;
15
+ /**
16
+ * Handle array builtins that need evaluate function for arguments.
17
+ * Returns null if the builtin name is not an array builtin handled here.
18
+ */
19
+ export declare function evalArrayBuiltin(value: QueryValue, name: string, args: AstNode[], ctx: EvalContext, evaluate: EvalFn, evaluateWithPartialResults: EvalWithPartialFn, compareJq: CompareFn, isTruthy: IsTruthyFn, containsDeep: ContainsDeepFn, ExecutionLimitError: ExecutionLimitErrorClass): QueryValue[] | null;
20
+ export {};
@@ -0,0 +1,18 @@
1
+ /**
2
+ * Control flow jq builtins
3
+ *
4
+ * Handles first, last, nth, range, limit, isempty, isvalid, skip, until, while, repeat.
5
+ */
6
+ import type { EvalContext } from "../evaluator.js";
7
+ import type { AstNode } from "../parser.js";
8
+ import type { QueryValue } from "../value-operations.js";
9
+ type EvalFn = (value: QueryValue, ast: AstNode, ctx: EvalContext) => QueryValue[];
10
+ type EvalWithPartialFn = (value: QueryValue, ast: AstNode, ctx: EvalContext) => QueryValue[];
11
+ type IsTruthyFn = (v: QueryValue) => boolean;
12
+ type ExecutionLimitErrorClass = new (message: string, kind: "recursion" | "commands" | "iterations") => Error;
13
+ /**
14
+ * Handle control flow builtins.
15
+ * Returns null if the builtin name is not a control builtin handled here.
16
+ */
17
+ export declare function evalControlBuiltin(value: QueryValue, name: string, args: AstNode[], ctx: EvalContext, evaluate: EvalFn, evaluateWithPartialResults: EvalWithPartialFn, isTruthy: IsTruthyFn, ExecutionLimitError: ExecutionLimitErrorClass): QueryValue[] | null;
18
+ export {};
@@ -0,0 +1,15 @@
1
+ /**
2
+ * Date/time-related jq builtins
3
+ *
4
+ * Handles date and time functions like now, gmtime, mktime, strftime, strptime, etc.
5
+ */
6
+ import type { EvalContext } from "../evaluator.js";
7
+ import type { AstNode } from "../parser.js";
8
+ import type { QueryValue } from "../value-operations.js";
9
+ type EvalFn = (value: QueryValue, ast: AstNode, ctx: EvalContext) => QueryValue[];
10
+ /**
11
+ * Handle date builtins that need evaluate function for arguments.
12
+ * Returns null if the builtin name is not a date builtin handled here.
13
+ */
14
+ export declare function evalDateBuiltin(value: QueryValue, name: string, args: AstNode[], ctx: EvalContext, evaluate: EvalFn): QueryValue[] | null;
15
+ export {};
@@ -0,0 +1,11 @@
1
+ /**
2
+ * Format-related jq builtins (@ prefixed)
3
+ *
4
+ * Handles encoding/formatting functions like @base64, @uri, @csv, @json, etc.
5
+ */
6
+ import type { QueryValue } from "../value-operations.js";
7
+ /**
8
+ * Handle format builtins (those starting with @).
9
+ * Returns null if the builtin name is not a format builtin handled here.
10
+ */
11
+ export declare function evalFormatBuiltin(value: QueryValue, name: string, maxDepth?: number): QueryValue[] | null;
@@ -0,0 +1,16 @@
1
+ /**
2
+ * Index-related jq builtins
3
+ *
4
+ * Handles index, rindex, and indices functions for finding positions in arrays/strings.
5
+ */
6
+ import type { EvalContext } from "../evaluator.js";
7
+ import type { AstNode } from "../parser.js";
8
+ import type { QueryValue } from "../value-operations.js";
9
+ type EvalFn = (value: QueryValue, ast: AstNode, ctx: EvalContext) => QueryValue[];
10
+ type DeepEqualFn = (a: QueryValue, b: QueryValue) => boolean;
11
+ /**
12
+ * Handle index builtins that need evaluate function for arguments.
13
+ * Returns null if the builtin name is not an index builtin handled here.
14
+ */
15
+ export declare function evalIndexBuiltin(value: QueryValue, name: string, args: AstNode[], ctx: EvalContext, evaluate: EvalFn, deepEqual: DeepEqualFn): QueryValue[] | null;
16
+ export {};
@@ -0,0 +1,17 @@
1
+ /**
2
+ * jq builtin functions index
3
+ *
4
+ * Re-exports all builtin handlers from category-specific modules.
5
+ */
6
+ export { evalArrayBuiltin } from "./array-builtins.js";
7
+ export { evalControlBuiltin } from "./control-builtins.js";
8
+ export { evalDateBuiltin } from "./date-builtins.js";
9
+ export { evalFormatBuiltin } from "./format-builtins.js";
10
+ export { evalIndexBuiltin } from "./index-builtins.js";
11
+ export { evalMathBuiltin } from "./math-builtins.js";
12
+ export { evalNavigationBuiltin } from "./navigation-builtins.js";
13
+ export { evalObjectBuiltin } from "./object-builtins.js";
14
+ export { evalPathBuiltin } from "./path-builtins.js";
15
+ export { evalSqlBuiltin } from "./sql-builtins.js";
16
+ export { evalStringBuiltin } from "./string-builtins.js";
17
+ export { evalTypeBuiltin } from "./type-builtins.js";
@@ -0,0 +1,15 @@
1
+ /**
2
+ * Math-related jq builtins
3
+ *
4
+ * Handles mathematical functions like abs, pow, exp, trig functions, etc.
5
+ */
6
+ import type { EvalContext } from "../evaluator.js";
7
+ import type { AstNode } from "../parser.js";
8
+ import type { QueryValue } from "../value-operations.js";
9
+ type EvalFn = (value: QueryValue, ast: AstNode, ctx: EvalContext) => QueryValue[];
10
+ /**
11
+ * Handle math builtins that need evaluate function for arguments.
12
+ * Returns null if the builtin name is not a math builtin handled here.
13
+ */
14
+ export declare function evalMathBuiltin(value: QueryValue, name: string, args: AstNode[], ctx: EvalContext, evaluate: EvalFn): QueryValue[] | null;
15
+ export {};
@@ -0,0 +1,18 @@
1
+ /**
2
+ * Navigation and traversal jq builtins
3
+ *
4
+ * Handles recurse, recurse_down, walk, transpose, combinations, parent, parents, root.
5
+ */
6
+ import type { EvalContext } from "../evaluator.js";
7
+ import type { AstNode } from "../parser.js";
8
+ import type { QueryValue } from "../value-operations.js";
9
+ type EvalFn = (value: QueryValue, ast: AstNode, ctx: EvalContext) => QueryValue[];
10
+ type IsTruthyFn = (v: QueryValue) => boolean;
11
+ type GetValueAtPathFn = (obj: QueryValue, path: (string | number)[]) => QueryValue;
12
+ type EvalBuiltinFn = (value: QueryValue, name: string, args: AstNode[], ctx: EvalContext) => QueryValue[];
13
+ /**
14
+ * Handle navigation builtins that need evaluate function for arguments.
15
+ * Returns null if the builtin name is not a navigation builtin handled here.
16
+ */
17
+ export declare function evalNavigationBuiltin(value: QueryValue, name: string, args: AstNode[], ctx: EvalContext, evaluate: EvalFn, isTruthy: IsTruthyFn, getValueAtPath: GetValueAtPathFn, evalBuiltin: EvalBuiltinFn): QueryValue[] | null;
18
+ export {};
@@ -0,0 +1,15 @@
1
+ /**
2
+ * Object-related jq builtins
3
+ *
4
+ * Handles object manipulation functions like keys, to_entries, from_entries, etc.
5
+ */
6
+ import type { EvalContext } from "../evaluator.js";
7
+ import type { AstNode } from "../parser.js";
8
+ import { type QueryValue } from "../value-operations.js";
9
+ type EvalFn = (value: QueryValue, ast: AstNode, ctx: EvalContext) => QueryValue[];
10
+ /**
11
+ * Handle object builtins that need evaluate function for arguments.
12
+ * Returns null if the builtin name is not an object builtin handled here.
13
+ */
14
+ export declare function evalObjectBuiltin(value: QueryValue, name: string, args: AstNode[], ctx: EvalContext, evaluate: EvalFn): QueryValue[] | null;
15
+ export {};