@elaraai/east 0.0.1-beta.8 → 1.0.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 (410) hide show
  1. package/LICENSE.md +15 -666
  2. package/README.md +113 -88
  3. package/dist/src/analyze.d.ts +3 -0
  4. package/dist/src/analyze.d.ts.map +1 -1
  5. package/dist/src/analyze.js +223 -111
  6. package/dist/src/analyze.js.map +1 -1
  7. package/dist/src/analyze.spec.d.ts +2 -0
  8. package/dist/src/analyze.spec.d.ts.map +1 -0
  9. package/dist/src/analyze.spec.js +445 -0
  10. package/dist/src/analyze.spec.js.map +1 -0
  11. package/dist/src/ast.d.ts +54 -35
  12. package/dist/src/ast.d.ts.map +1 -1
  13. package/dist/src/ast_to_ir.coerce_to.spec.d.ts +15 -0
  14. package/dist/src/ast_to_ir.coerce_to.spec.d.ts.map +1 -0
  15. package/dist/src/ast_to_ir.coerce_to.spec.js +420 -0
  16. package/dist/src/ast_to_ir.coerce_to.spec.js.map +1 -0
  17. package/dist/src/ast_to_ir.d.ts +18 -4
  18. package/dist/src/ast_to_ir.d.ts.map +1 -1
  19. package/dist/src/ast_to_ir.js +233 -178
  20. package/dist/src/ast_to_ir.js.map +1 -1
  21. package/dist/src/builtins.d.ts +1 -1
  22. package/dist/src/builtins.d.ts.map +1 -1
  23. package/dist/src/builtins.js +194 -2
  24. package/dist/src/builtins.js.map +1 -1
  25. package/dist/src/comparison.d.ts +2 -2
  26. package/dist/src/comparison.d.ts.map +1 -1
  27. package/dist/src/comparison.js +115 -40
  28. package/dist/src/comparison.js.map +1 -1
  29. package/dist/src/comparison.spec.d.ts +2 -0
  30. package/dist/src/comparison.spec.d.ts.map +1 -0
  31. package/dist/src/comparison.spec.js +1200 -0
  32. package/dist/src/comparison.spec.js.map +1 -0
  33. package/dist/src/compile.d.ts +31 -9
  34. package/dist/src/compile.d.ts.map +1 -1
  35. package/dist/src/compile.js +1048 -548
  36. package/dist/src/compile.js.map +1 -1
  37. package/dist/src/containers/matrix.d.ts +15 -0
  38. package/dist/src/containers/matrix.d.ts.map +1 -0
  39. package/dist/src/containers/matrix.js +15 -0
  40. package/dist/src/containers/matrix.js.map +1 -0
  41. package/dist/src/containers/ref.d.ts.map +1 -1
  42. package/dist/src/containers/ref.js +1 -1
  43. package/dist/src/containers/ref.js.map +1 -1
  44. package/dist/src/containers/sortedmap.spec.d.ts +2 -0
  45. package/dist/src/containers/sortedmap.spec.d.ts.map +1 -0
  46. package/dist/src/containers/sortedmap.spec.js +180 -0
  47. package/dist/src/containers/sortedmap.spec.js.map +1 -0
  48. package/dist/src/containers/sortedset.spec.d.ts +2 -0
  49. package/dist/src/containers/sortedset.spec.d.ts.map +1 -0
  50. package/dist/src/containers/sortedset.spec.js +228 -0
  51. package/dist/src/containers/sortedset.spec.js.map +1 -0
  52. package/dist/src/containers/variant.d.ts.map +1 -1
  53. package/dist/src/containers/variant.js +1 -1
  54. package/dist/src/containers/variant.js.map +1 -1
  55. package/dist/src/containers/variant.spec.d.ts +2 -0
  56. package/dist/src/containers/variant.spec.d.ts.map +1 -0
  57. package/dist/src/containers/variant.spec.js +217 -0
  58. package/dist/src/containers/variant.spec.js.map +1 -0
  59. package/dist/src/datetime_format/parse.spec.d.ts +6 -0
  60. package/dist/src/datetime_format/parse.spec.d.ts.map +1 -0
  61. package/dist/src/datetime_format/parse.spec.js +379 -0
  62. package/dist/src/datetime_format/parse.spec.js.map +1 -0
  63. package/dist/src/datetime_format/print.spec.d.ts +6 -0
  64. package/dist/src/datetime_format/print.spec.d.ts.map +1 -0
  65. package/dist/src/datetime_format/print.spec.js +257 -0
  66. package/dist/src/datetime_format/print.spec.js.map +1 -0
  67. package/dist/src/datetime_format/tokenize.spec.d.ts +2 -0
  68. package/dist/src/datetime_format/tokenize.spec.d.ts.map +1 -0
  69. package/dist/src/datetime_format/tokenize.spec.js +508 -0
  70. package/dist/src/datetime_format/tokenize.spec.js.map +1 -0
  71. package/dist/src/datetime_format/types.d.ts +23 -23
  72. package/dist/src/default.d.ts.map +1 -1
  73. package/dist/src/default.js +33 -0
  74. package/dist/src/default.js.map +1 -1
  75. package/dist/src/default.spec.d.ts +2 -0
  76. package/dist/src/default.spec.d.ts.map +1 -0
  77. package/dist/src/default.spec.js +178 -0
  78. package/dist/src/default.spec.js.map +1 -0
  79. package/dist/src/eastir.d.ts +7 -0
  80. package/dist/src/eastir.d.ts.map +1 -1
  81. package/dist/src/eastir.js +55 -7
  82. package/dist/src/eastir.js.map +1 -1
  83. package/dist/src/error.d.ts +14 -4
  84. package/dist/src/error.d.ts.map +1 -1
  85. package/dist/src/error.js +28 -3
  86. package/dist/src/error.js.map +1 -1
  87. package/dist/src/example.d.ts +87 -0
  88. package/dist/src/example.d.ts.map +1 -0
  89. package/dist/src/example.js +18 -0
  90. package/dist/src/example.js.map +1 -0
  91. package/dist/src/expr/array.d.ts +43 -1
  92. package/dist/src/expr/array.d.ts.map +1 -1
  93. package/dist/src/expr/array.js +103 -53
  94. package/dist/src/expr/array.js.map +1 -1
  95. package/dist/src/expr/ast.d.ts +1 -1
  96. package/dist/src/expr/ast.d.ts.map +1 -1
  97. package/dist/src/expr/ast.js +112 -54
  98. package/dist/src/expr/ast.js.map +1 -1
  99. package/dist/src/expr/asyncfunction.d.ts.map +1 -1
  100. package/dist/src/expr/asyncfunction.js +6 -4
  101. package/dist/src/expr/asyncfunction.js.map +1 -1
  102. package/dist/src/expr/blob.d.ts +48 -0
  103. package/dist/src/expr/blob.d.ts.map +1 -1
  104. package/dist/src/expr/blob.js +63 -8
  105. package/dist/src/expr/blob.js.map +1 -1
  106. package/dist/src/expr/block.d.ts +213 -12
  107. package/dist/src/expr/block.d.ts.map +1 -1
  108. package/dist/src/expr/block.js +796 -293
  109. package/dist/src/expr/block.js.map +1 -1
  110. package/dist/src/expr/boolean.d.ts +44 -0
  111. package/dist/src/expr/boolean.d.ts.map +1 -1
  112. package/dist/src/expr/boolean.js +58 -6
  113. package/dist/src/expr/boolean.js.map +1 -1
  114. package/dist/src/expr/datetime.d.ts +135 -0
  115. package/dist/src/expr/datetime.d.ts.map +1 -1
  116. package/dist/src/expr/datetime.js +184 -34
  117. package/dist/src/expr/datetime.js.map +1 -1
  118. package/dist/src/expr/dict.d.ts +47 -2
  119. package/dist/src/expr/dict.d.ts.map +1 -1
  120. package/dist/src/expr/dict.js +122 -61
  121. package/dist/src/expr/dict.js.map +1 -1
  122. package/dist/src/expr/expr.d.ts +3 -1
  123. package/dist/src/expr/expr.d.ts.map +1 -1
  124. package/dist/src/expr/expr.js +4 -3
  125. package/dist/src/expr/expr.js.map +1 -1
  126. package/dist/src/expr/float.d.ts +153 -0
  127. package/dist/src/expr/float.d.ts.map +1 -1
  128. package/dist/src/expr/float.js +191 -17
  129. package/dist/src/expr/float.js.map +1 -1
  130. package/dist/src/expr/function.d.ts +7 -2
  131. package/dist/src/expr/function.d.ts.map +1 -1
  132. package/dist/src/expr/function.js +6 -4
  133. package/dist/src/expr/function.js.map +1 -1
  134. package/dist/src/expr/index.d.ts +186 -2
  135. package/dist/src/expr/index.d.ts.map +1 -1
  136. package/dist/src/expr/index.js +183 -2
  137. package/dist/src/expr/index.js.map +1 -1
  138. package/dist/src/expr/integer.d.ts +180 -0
  139. package/dist/src/expr/integer.d.ts.map +1 -1
  140. package/dist/src/expr/integer.js +189 -18
  141. package/dist/src/expr/integer.js.map +1 -1
  142. package/dist/src/expr/libs/array.js +3 -3
  143. package/dist/src/expr/libs/array.js.map +1 -1
  144. package/dist/src/expr/libs/blob.js +3 -3
  145. package/dist/src/expr/libs/blob.js.map +1 -1
  146. package/dist/src/expr/libs/dict.js +1 -1
  147. package/dist/src/expr/libs/dict.js.map +1 -1
  148. package/dist/src/expr/libs/matrix.d.ts +17 -0
  149. package/dist/src/expr/libs/matrix.d.ts.map +1 -0
  150. package/dist/src/expr/libs/matrix.js +60 -0
  151. package/dist/src/expr/libs/matrix.js.map +1 -0
  152. package/dist/src/expr/libs/set.js +1 -1
  153. package/dist/src/expr/libs/set.js.map +1 -1
  154. package/dist/src/expr/libs/string.d.ts.map +1 -1
  155. package/dist/src/expr/libs/string.js +2 -1
  156. package/dist/src/expr/libs/string.js.map +1 -1
  157. package/dist/src/expr/libs/vector.d.ts +16 -0
  158. package/dist/src/expr/libs/vector.d.ts.map +1 -0
  159. package/dist/src/expr/libs/vector.js +44 -0
  160. package/dist/src/expr/libs/vector.js.map +1 -0
  161. package/dist/src/expr/matrix.d.ts +109 -0
  162. package/dist/src/expr/matrix.d.ts.map +1 -0
  163. package/dist/src/expr/matrix.js +224 -0
  164. package/dist/src/expr/matrix.js.map +1 -0
  165. package/dist/src/expr/recursive.d.ts +83 -0
  166. package/dist/src/expr/recursive.d.ts.map +1 -0
  167. package/dist/src/expr/recursive.js +99 -0
  168. package/dist/src/expr/recursive.js.map +1 -0
  169. package/dist/src/expr/ref.js +5 -5
  170. package/dist/src/expr/ref.js.map +1 -1
  171. package/dist/src/expr/set.d.ts +44 -2
  172. package/dist/src/expr/set.d.ts.map +1 -1
  173. package/dist/src/expr/set.js +102 -52
  174. package/dist/src/expr/set.js.map +1 -1
  175. package/dist/src/expr/string.d.ts +134 -0
  176. package/dist/src/expr/string.d.ts.map +1 -1
  177. package/dist/src/expr/string.js +173 -23
  178. package/dist/src/expr/string.js.map +1 -1
  179. package/dist/src/expr/struct.d.ts +1 -1
  180. package/dist/src/expr/struct.d.ts.map +1 -1
  181. package/dist/src/expr/struct.js +2 -2
  182. package/dist/src/expr/struct.js.map +1 -1
  183. package/dist/src/expr/types.d.ts +12 -9
  184. package/dist/src/expr/types.d.ts.map +1 -1
  185. package/dist/src/expr/variant.d.ts +108 -11
  186. package/dist/src/expr/variant.d.ts.map +1 -1
  187. package/dist/src/expr/variant.js +76 -38
  188. package/dist/src/expr/variant.js.map +1 -1
  189. package/dist/src/expr/vector.d.ts +102 -0
  190. package/dist/src/expr/vector.d.ts.map +1 -0
  191. package/dist/src/expr/vector.js +202 -0
  192. package/dist/src/expr/vector.js.map +1 -0
  193. package/dist/src/fuzz.d.ts +36 -2
  194. package/dist/src/fuzz.d.ts.map +1 -1
  195. package/dist/src/fuzz.js +409 -77
  196. package/dist/src/fuzz.js.map +1 -1
  197. package/dist/src/index.d.ts +4 -0
  198. package/dist/src/index.d.ts.map +1 -1
  199. package/dist/src/index.js +4 -0
  200. package/dist/src/index.js.map +1 -1
  201. package/dist/src/internal.d.ts +12 -2
  202. package/dist/src/internal.d.ts.map +1 -1
  203. package/dist/src/internal.js +13 -2
  204. package/dist/src/internal.js.map +1 -1
  205. package/dist/src/ir.d.ts +1754 -1484
  206. package/dist/src/ir.d.ts.map +1 -1
  207. package/dist/src/ir.js +51 -34
  208. package/dist/src/ir.js.map +1 -1
  209. package/dist/src/ir.spec.d.ts +2 -0
  210. package/dist/src/ir.spec.d.ts.map +1 -0
  211. package/dist/src/ir.spec.js +35 -0
  212. package/dist/src/ir.spec.js.map +1 -0
  213. package/dist/src/location.d.ts +56 -17
  214. package/dist/src/location.d.ts.map +1 -1
  215. package/dist/src/location.js +226 -29
  216. package/dist/src/location.js.map +1 -1
  217. package/dist/src/location.spec.d.ts +2 -0
  218. package/dist/src/location.spec.d.ts.map +1 -0
  219. package/dist/src/location.spec.js +102 -0
  220. package/dist/src/location.spec.js.map +1 -0
  221. package/dist/src/patch/apply.d.ts +15 -0
  222. package/dist/src/patch/apply.d.ts.map +1 -0
  223. package/dist/src/patch/apply.js +352 -0
  224. package/dist/src/patch/apply.js.map +1 -0
  225. package/dist/src/patch/compose.d.ts +15 -0
  226. package/dist/src/patch/compose.d.ts.map +1 -0
  227. package/dist/src/patch/compose.js +448 -0
  228. package/dist/src/patch/compose.js.map +1 -0
  229. package/dist/src/patch/diff.d.ts +15 -0
  230. package/dist/src/patch/diff.d.ts.map +1 -0
  231. package/dist/src/patch/diff.js +347 -0
  232. package/dist/src/patch/diff.js.map +1 -0
  233. package/dist/src/patch/fuzz.d.ts +73 -0
  234. package/dist/src/patch/fuzz.d.ts.map +1 -0
  235. package/dist/src/patch/fuzz.js +159 -0
  236. package/dist/src/patch/fuzz.js.map +1 -0
  237. package/dist/src/patch/index.d.ts +32 -0
  238. package/dist/src/patch/index.d.ts.map +1 -0
  239. package/dist/src/patch/index.js +48 -0
  240. package/dist/src/patch/index.js.map +1 -0
  241. package/dist/src/patch/invert.d.ts +15 -0
  242. package/dist/src/patch/invert.d.ts.map +1 -0
  243. package/dist/src/patch/invert.js +284 -0
  244. package/dist/src/patch/invert.js.map +1 -0
  245. package/dist/src/patch/merge.d.ts +56 -0
  246. package/dist/src/patch/merge.d.ts.map +1 -0
  247. package/dist/src/patch/merge.js +586 -0
  248. package/dist/src/patch/merge.js.map +1 -0
  249. package/dist/src/patch/merge.spec.d.ts +2 -0
  250. package/dist/src/patch/merge.spec.d.ts.map +1 -0
  251. package/dist/src/patch/merge.spec.js +1139 -0
  252. package/dist/src/patch/merge.spec.js.map +1 -0
  253. package/dist/src/patch/patch.spec.d.ts +2 -0
  254. package/dist/src/patch/patch.spec.d.ts.map +1 -0
  255. package/dist/src/patch/patch.spec.js +452 -0
  256. package/dist/src/patch/patch.spec.js.map +1 -0
  257. package/dist/src/patch/path.d.ts +115 -0
  258. package/dist/src/patch/path.d.ts.map +1 -0
  259. package/dist/src/patch/path.js +192 -0
  260. package/dist/src/patch/path.js.map +1 -0
  261. package/dist/src/patch/path.spec.d.ts +6 -0
  262. package/dist/src/patch/path.spec.d.ts.map +1 -0
  263. package/dist/src/patch/path.spec.js +322 -0
  264. package/dist/src/patch/path.spec.js.map +1 -0
  265. package/dist/src/patch/prune.d.ts +77 -0
  266. package/dist/src/patch/prune.d.ts.map +1 -0
  267. package/dist/src/patch/prune.js +115 -0
  268. package/dist/src/patch/prune.js.map +1 -0
  269. package/dist/src/patch/prune.spec.d.ts +6 -0
  270. package/dist/src/patch/prune.spec.d.ts.map +1 -0
  271. package/dist/src/patch/prune.spec.js +473 -0
  272. package/dist/src/patch/prune.spec.js.map +1 -0
  273. package/dist/src/patch/type_of_patch.d.ts +25 -0
  274. package/dist/src/patch/type_of_patch.d.ts.map +1 -0
  275. package/dist/src/patch/type_of_patch.js +144 -0
  276. package/dist/src/patch/type_of_patch.js.map +1 -0
  277. package/dist/src/patch/types.d.ts +220 -0
  278. package/dist/src/patch/types.d.ts.map +1 -0
  279. package/dist/src/patch/types.js +62 -0
  280. package/dist/src/patch/types.js.map +1 -0
  281. package/dist/src/patch/validate.d.ts +44 -0
  282. package/dist/src/patch/validate.d.ts.map +1 -0
  283. package/dist/src/patch/validate.js +190 -0
  284. package/dist/src/patch/validate.js.map +1 -0
  285. package/dist/src/patch/validate.spec.d.ts +6 -0
  286. package/dist/src/patch/validate.spec.d.ts.map +1 -0
  287. package/dist/src/patch/validate.spec.js +225 -0
  288. package/dist/src/patch/validate.spec.js.map +1 -0
  289. package/dist/src/patch/walk.d.ts +121 -0
  290. package/dist/src/patch/walk.d.ts.map +1 -0
  291. package/dist/src/patch/walk.js +385 -0
  292. package/dist/src/patch/walk.js.map +1 -0
  293. package/dist/src/patch/walk.spec.d.ts +6 -0
  294. package/dist/src/patch/walk.spec.d.ts.map +1 -0
  295. package/dist/src/patch/walk.spec.js +621 -0
  296. package/dist/src/patch/walk.spec.js.map +1 -0
  297. package/dist/src/platform.d.ts +6 -0
  298. package/dist/src/platform.d.ts.map +1 -1
  299. package/dist/src/platform.spec.d.ts +2 -0
  300. package/dist/src/platform.spec.d.ts.map +1 -0
  301. package/dist/src/platform.spec.js +330 -0
  302. package/dist/src/platform.spec.js.map +1 -0
  303. package/dist/src/serialization/beast.d.ts.map +1 -1
  304. package/dist/src/serialization/beast.js +12 -0
  305. package/dist/src/serialization/beast.js.map +1 -1
  306. package/dist/src/serialization/beast.spec.d.ts +6 -0
  307. package/dist/src/serialization/beast.spec.d.ts.map +1 -0
  308. package/dist/src/serialization/beast.spec.js +406 -0
  309. package/dist/src/serialization/beast.spec.js.map +1 -0
  310. package/dist/src/serialization/beast2/index.d.ts +50 -0
  311. package/dist/src/serialization/beast2/index.d.ts.map +1 -0
  312. package/dist/src/serialization/beast2/index.js +756 -0
  313. package/dist/src/serialization/beast2/index.js.map +1 -0
  314. package/dist/src/serialization/beast2/index.spec.d.ts +6 -0
  315. package/dist/src/serialization/beast2/index.spec.d.ts.map +1 -0
  316. package/dist/src/serialization/beast2/index.spec.js +528 -0
  317. package/dist/src/serialization/beast2/index.spec.js.map +1 -0
  318. package/dist/src/serialization/beast2/sourcemap-table.d.ts +29 -0
  319. package/dist/src/serialization/beast2/sourcemap-table.d.ts.map +1 -0
  320. package/dist/src/serialization/beast2/sourcemap-table.js +82 -0
  321. package/dist/src/serialization/beast2/sourcemap-table.js.map +1 -0
  322. package/dist/src/serialization/beast2/string-table.d.ts +16 -0
  323. package/dist/src/serialization/beast2/string-table.d.ts.map +1 -0
  324. package/dist/src/serialization/beast2/string-table.js +38 -0
  325. package/dist/src/serialization/beast2/string-table.js.map +1 -0
  326. package/dist/src/serialization/beast2/type-table.d.ts +86 -0
  327. package/dist/src/serialization/beast2/type-table.d.ts.map +1 -0
  328. package/dist/src/serialization/beast2/type-table.js +618 -0
  329. package/dist/src/serialization/beast2/type-table.js.map +1 -0
  330. package/dist/src/serialization/beast2/value-table.d.ts +40 -0
  331. package/dist/src/serialization/beast2/value-table.d.ts.map +1 -0
  332. package/dist/src/serialization/beast2/value-table.js +157 -0
  333. package/dist/src/serialization/beast2/value-table.js.map +1 -0
  334. package/dist/src/serialization/binary-utils.d.ts +33 -0
  335. package/dist/src/serialization/binary-utils.d.ts.map +1 -1
  336. package/dist/src/serialization/binary-utils.js +157 -0
  337. package/dist/src/serialization/binary-utils.js.map +1 -1
  338. package/dist/src/serialization/csv.d.ts +17 -17
  339. package/dist/src/serialization/csv.d.ts.map +1 -1
  340. package/dist/src/serialization/csv.js +10 -8
  341. package/dist/src/serialization/csv.js.map +1 -1
  342. package/dist/src/serialization/csv.spec.d.ts +2 -0
  343. package/dist/src/serialization/csv.spec.d.ts.map +1 -0
  344. package/dist/src/serialization/csv.spec.js +556 -0
  345. package/dist/src/serialization/csv.spec.js.map +1 -0
  346. package/dist/src/serialization/east-inferred.spec.d.ts +2 -0
  347. package/dist/src/serialization/east-inferred.spec.d.ts.map +1 -0
  348. package/dist/src/serialization/east-inferred.spec.js +322 -0
  349. package/dist/src/serialization/east-inferred.spec.js.map +1 -0
  350. package/dist/src/serialization/east.d.ts +1 -1
  351. package/dist/src/serialization/east.d.ts.map +1 -1
  352. package/dist/src/serialization/east.js +178 -26
  353. package/dist/src/serialization/east.js.map +1 -1
  354. package/dist/src/serialization/east.spec.d.ts +2 -0
  355. package/dist/src/serialization/east.spec.d.ts.map +1 -0
  356. package/dist/src/serialization/east.spec.js +1548 -0
  357. package/dist/src/serialization/east.spec.js.map +1 -0
  358. package/dist/src/serialization/index.d.ts +1 -2
  359. package/dist/src/serialization/index.d.ts.map +1 -1
  360. package/dist/src/serialization/index.js +1 -2
  361. package/dist/src/serialization/index.js.map +1 -1
  362. package/dist/src/serialization/json.d.ts +1 -1
  363. package/dist/src/serialization/json.d.ts.map +1 -1
  364. package/dist/src/serialization/json.js +123 -24
  365. package/dist/src/serialization/json.js.map +1 -1
  366. package/dist/src/serialization/json.spec.d.ts +2 -0
  367. package/dist/src/serialization/json.spec.d.ts.map +1 -0
  368. package/dist/src/serialization/json.spec.js +1297 -0
  369. package/dist/src/serialization/json.spec.js.map +1 -0
  370. package/dist/src/type_of_type.d.ts +72 -35
  371. package/dist/src/type_of_type.d.ts.map +1 -1
  372. package/dist/src/type_of_type.is_data.spec.d.ts +6 -0
  373. package/dist/src/type_of_type.is_data.spec.d.ts.map +1 -0
  374. package/dist/src/type_of_type.is_data.spec.js +221 -0
  375. package/dist/src/type_of_type.is_data.spec.js.map +1 -0
  376. package/dist/src/type_of_type.js +355 -80
  377. package/dist/src/type_of_type.js.map +1 -1
  378. package/dist/src/type_of_type.to_etv.spec.d.ts +6 -0
  379. package/dist/src/type_of_type.to_etv.spec.d.ts.map +1 -0
  380. package/dist/src/type_of_type.to_etv.spec.js +263 -0
  381. package/dist/src/type_of_type.to_etv.spec.js.map +1 -0
  382. package/dist/src/types.d.ts +82 -12
  383. package/dist/src/types.d.ts.map +1 -1
  384. package/dist/src/types.error.spec.d.ts +2 -0
  385. package/dist/src/types.error.spec.d.ts.map +1 -0
  386. package/dist/src/types.error.spec.js +665 -0
  387. package/dist/src/types.error.spec.js.map +1 -0
  388. package/dist/src/types.js +663 -156
  389. package/dist/src/types.js.map +1 -1
  390. package/dist/src/types.spec.d.ts +2 -0
  391. package/dist/src/types.spec.d.ts.map +1 -0
  392. package/dist/src/types.spec.js +946 -0
  393. package/dist/src/types.spec.js.map +1 -0
  394. package/dist/src/walker.d.ts +65 -0
  395. package/dist/src/walker.d.ts.map +1 -0
  396. package/dist/src/walker.js +165 -0
  397. package/dist/src/walker.js.map +1 -0
  398. package/dist/src/walker.spec.d.ts +6 -0
  399. package/dist/src/walker.spec.d.ts.map +1 -0
  400. package/dist/src/walker.spec.js +109 -0
  401. package/dist/src/walker.spec.js.map +1 -0
  402. package/package.json +16 -38
  403. package/dist/src/serialization/beast2-stream.d.ts +0 -38
  404. package/dist/src/serialization/beast2-stream.d.ts.map +0 -1
  405. package/dist/src/serialization/beast2-stream.js +0 -670
  406. package/dist/src/serialization/beast2-stream.js.map +0 -1
  407. package/dist/src/serialization/beast2.d.ts +0 -41
  408. package/dist/src/serialization/beast2.d.ts.map +0 -1
  409. package/dist/src/serialization/beast2.js +0 -495
  410. package/dist/src/serialization/beast2.js.map +0 -1
@@ -0,0 +1,556 @@
1
+ /**
2
+ * Copyright (c) 2025 Elara AI Pty Ltd
3
+ * Dual-licensed under AGPL-3.0 and commercial license. See LICENSE for details.
4
+ */
5
+ import { describe, test } from "node:test";
6
+ import assert from "node:assert/strict";
7
+ import { decodeCsvFor, encodeCsvFor, csvParseOptionsToValue, csvSerializeOptionsToValue, CsvError, } from './csv.js';
8
+ import { StructType, StringType, IntegerType, FloatType, BooleanType, DateTimeType, BlobType, OptionType, } from '../types.js';
9
+ import { some, none } from '../containers/variant.js';
10
+ import { SortedMap } from '../containers/sortedmap.js';
11
+ const encoder = new TextEncoder();
12
+ const decoder = new TextDecoder();
13
+ // =============================================================================
14
+ // decodeCsvFor tests
15
+ // =============================================================================
16
+ describe('decodeCsvFor', () => {
17
+ describe('basic parsing', () => {
18
+ test('should parse simple CSV with header', () => {
19
+ const PersonType = StructType({ name: StringType, age: IntegerType });
20
+ const decode = decodeCsvFor(PersonType);
21
+ const csv = encoder.encode("name,age\nAlice,30\nBob,25");
22
+ const result = decode(csv);
23
+ assert.deepEqual(result, [
24
+ { name: "Alice", age: 30n },
25
+ { name: "Bob", age: 25n },
26
+ ]);
27
+ });
28
+ test('should parse CSV without header when hasHeader is false', () => {
29
+ const PersonType = StructType({ name: StringType, age: IntegerType });
30
+ const config = csvParseOptionsToValue({ hasHeader: false });
31
+ const decode = decodeCsvFor(PersonType, config);
32
+ const csv = encoder.encode("Alice,30\nBob,25");
33
+ const result = decode(csv);
34
+ assert.deepEqual(result, [
35
+ { name: "Alice", age: 30n },
36
+ { name: "Bob", age: 25n },
37
+ ]);
38
+ });
39
+ test('should handle empty CSV', () => {
40
+ const PersonType = StructType({ name: StringType });
41
+ const decode = decodeCsvFor(PersonType);
42
+ const csv = encoder.encode("name\n");
43
+ const result = decode(csv);
44
+ assert.deepEqual(result, []);
45
+ });
46
+ test('should skip UTF-8 BOM', () => {
47
+ const PersonType = StructType({ name: StringType });
48
+ const decode = decodeCsvFor(PersonType);
49
+ // UTF-8 BOM + "name\nAlice"
50
+ const csv = new Uint8Array([0xEF, 0xBB, 0xBF, ...encoder.encode("name\nAlice")]);
51
+ const result = decode(csv);
52
+ assert.deepEqual(result, [{ name: "Alice" }]);
53
+ });
54
+ });
55
+ describe('field types', () => {
56
+ test('should parse string fields', () => {
57
+ const T = StructType({ value: StringType });
58
+ const decode = decodeCsvFor(T);
59
+ const csv = encoder.encode("value\nhello\nworld");
60
+ const result = decode(csv);
61
+ assert.deepEqual(result, [{ value: "hello" }, { value: "world" }]);
62
+ });
63
+ test('should parse integer fields', () => {
64
+ const T = StructType({ value: IntegerType });
65
+ const decode = decodeCsvFor(T);
66
+ const csv = encoder.encode("value\n42\n-123\n0");
67
+ const result = decode(csv);
68
+ assert.deepEqual(result, [{ value: 42n }, { value: -123n }, { value: 0n }]);
69
+ });
70
+ test('should parse float fields', () => {
71
+ const T = StructType({ value: FloatType });
72
+ const decode = decodeCsvFor(T);
73
+ const csv = encoder.encode("value\n3.14\n-2.5\nInfinity\n-Infinity\nNaN");
74
+ const result = decode(csv);
75
+ assert.equal(result.length, 5);
76
+ assert.equal(result[0].value, 3.14);
77
+ assert.equal(result[1].value, -2.5);
78
+ assert.equal(result[2].value, Infinity);
79
+ assert.equal(result[3].value, -Infinity);
80
+ assert.ok(Number.isNaN(result[4].value));
81
+ });
82
+ test('should parse boolean fields', () => {
83
+ const T = StructType({ value: BooleanType });
84
+ const decode = decodeCsvFor(T);
85
+ const csv = encoder.encode("value\ntrue\nfalse");
86
+ const result = decode(csv);
87
+ assert.deepEqual(result, [{ value: true }, { value: false }]);
88
+ });
89
+ test('should parse datetime fields', () => {
90
+ const T = StructType({ value: DateTimeType });
91
+ const decode = decodeCsvFor(T);
92
+ const csv = encoder.encode("value\n2025-01-15T10:30:00.000Z");
93
+ const result = decode(csv);
94
+ assert.equal(result.length, 1);
95
+ assert.ok(result[0].value instanceof Date);
96
+ assert.equal(result[0].value.getUTCFullYear(), 2025);
97
+ assert.equal(result[0].value.getUTCMonth(), 0);
98
+ assert.equal(result[0].value.getUTCDate(), 15);
99
+ });
100
+ test('should parse blob fields as hex', () => {
101
+ const T = StructType({ value: BlobType });
102
+ const decode = decodeCsvFor(T);
103
+ const csv = encoder.encode("value\n0x48656c6c6f");
104
+ const result = decode(csv);
105
+ assert.equal(result.length, 1);
106
+ assert.ok(result[0].value instanceof Uint8Array);
107
+ assert.deepEqual([...result[0].value], [0x48, 0x65, 0x6c, 0x6c, 0x6f]);
108
+ });
109
+ });
110
+ describe('optional fields', () => {
111
+ test('should parse optional string as some when present', () => {
112
+ const T = StructType({ value: OptionType(StringType) });
113
+ const decode = decodeCsvFor(T);
114
+ const csv = encoder.encode("value\nhello");
115
+ const result = decode(csv);
116
+ assert.deepEqual(result, [{ value: some("hello") }]);
117
+ });
118
+ test('should parse optional string as none when empty', () => {
119
+ const T = StructType({ value: OptionType(StringType) });
120
+ const config = csvParseOptionsToValue({ skipEmptyLines: false });
121
+ const decode = decodeCsvFor(T, config);
122
+ // Two newlines: header row, then a data row with empty field
123
+ const csv = encoder.encode("value\n\n");
124
+ const result = decode(csv);
125
+ assert.deepEqual(result, [{ value: none }]);
126
+ });
127
+ test('should use custom nullStrings', () => {
128
+ const T = StructType({ value: OptionType(StringType) });
129
+ const config = csvParseOptionsToValue({ nullStrings: ["", "NULL", "N/A"] });
130
+ const decode = decodeCsvFor(T, config);
131
+ const csv = encoder.encode("value\nhello\nNULL\nN/A");
132
+ const result = decode(csv);
133
+ assert.deepEqual(result, [
134
+ { value: some("hello") },
135
+ { value: none },
136
+ { value: none },
137
+ ]);
138
+ });
139
+ test('should handle missing optional columns', () => {
140
+ const T = StructType({ name: StringType, age: OptionType(IntegerType) });
141
+ const decode = decodeCsvFor(T);
142
+ // CSV only has 'name' column, 'age' is missing
143
+ const csv = encoder.encode("name\nAlice");
144
+ const result = decode(csv);
145
+ assert.deepEqual(result, [{ name: "Alice", age: none }]);
146
+ });
147
+ });
148
+ describe('delimiters and quoting', () => {
149
+ test('should use custom delimiter', () => {
150
+ const T = StructType({ a: StringType, b: StringType });
151
+ const config = csvParseOptionsToValue({ delimiter: ";" });
152
+ const decode = decodeCsvFor(T, config);
153
+ const csv = encoder.encode("a;b\nhello;world");
154
+ const result = decode(csv);
155
+ assert.deepEqual(result, [{ a: "hello", b: "world" }]);
156
+ });
157
+ test('should handle quoted fields', () => {
158
+ const T = StructType({ value: StringType });
159
+ const decode = decodeCsvFor(T);
160
+ const csv = encoder.encode('value\n"hello, world"\n"with ""quotes"""\n"multi\nline"');
161
+ const result = decode(csv);
162
+ assert.deepEqual(result, [
163
+ { value: "hello, world" },
164
+ { value: 'with "quotes"' },
165
+ { value: "multi\nline" },
166
+ ]);
167
+ });
168
+ test('should use custom quote character', () => {
169
+ const T = StructType({ value: StringType });
170
+ const config = csvParseOptionsToValue({ quoteChar: "'" });
171
+ const decode = decodeCsvFor(T, config);
172
+ const csv = encoder.encode("value\n'hello, world'");
173
+ const result = decode(csv);
174
+ assert.deepEqual(result, [{ value: "hello, world" }]);
175
+ });
176
+ });
177
+ describe('line endings', () => {
178
+ test('should handle CRLF line endings', () => {
179
+ const T = StructType({ value: StringType });
180
+ const decode = decodeCsvFor(T);
181
+ const csv = encoder.encode("value\r\nhello\r\nworld");
182
+ const result = decode(csv);
183
+ assert.deepEqual(result, [{ value: "hello" }, { value: "world" }]);
184
+ });
185
+ test('should handle LF line endings', () => {
186
+ const T = StructType({ value: StringType });
187
+ const decode = decodeCsvFor(T);
188
+ const csv = encoder.encode("value\nhello\nworld");
189
+ const result = decode(csv);
190
+ assert.deepEqual(result, [{ value: "hello" }, { value: "world" }]);
191
+ });
192
+ test('should handle CR line endings', () => {
193
+ const T = StructType({ value: StringType });
194
+ const decode = decodeCsvFor(T);
195
+ const csv = encoder.encode("value\rhello\rworld");
196
+ const result = decode(csv);
197
+ assert.deepEqual(result, [{ value: "hello" }, { value: "world" }]);
198
+ });
199
+ });
200
+ describe('trimming and empty lines', () => {
201
+ test('should skip empty lines by default', () => {
202
+ const T = StructType({ value: StringType });
203
+ const decode = decodeCsvFor(T);
204
+ const csv = encoder.encode("value\n\nhello\n\nworld\n");
205
+ const result = decode(csv);
206
+ assert.deepEqual(result, [{ value: "hello" }, { value: "world" }]);
207
+ });
208
+ test('should not skip empty lines when skipEmptyLines is false', () => {
209
+ const T = StructType({ value: OptionType(StringType) });
210
+ const config = csvParseOptionsToValue({ skipEmptyLines: false });
211
+ const decode = decodeCsvFor(T, config);
212
+ const csv = encoder.encode("value\nhello\n\nworld");
213
+ const result = decode(csv);
214
+ // Empty line becomes a row with empty field -> none
215
+ assert.equal(result.length, 3);
216
+ });
217
+ test('should trim fields when trimFields is true', () => {
218
+ const T = StructType({ value: StringType });
219
+ const config = csvParseOptionsToValue({ trimFields: true });
220
+ const decode = decodeCsvFor(T, config);
221
+ const csv = encoder.encode("value\n hello \n world ");
222
+ const result = decode(csv);
223
+ assert.deepEqual(result, [{ value: "hello" }, { value: "world" }]);
224
+ });
225
+ });
226
+ describe('column mapping', () => {
227
+ test('should map CSV headers to struct fields', () => {
228
+ const T = StructType({ firstName: StringType, lastName: StringType });
229
+ const config = csvParseOptionsToValue({
230
+ columnMapping: new Map([["First Name", "firstName"], ["Last Name", "lastName"]])
231
+ });
232
+ const decode = decodeCsvFor(T, config);
233
+ const csv = encoder.encode("First Name,Last Name\nAlice,Smith");
234
+ const result = decode(csv);
235
+ assert.deepEqual(result, [{ firstName: "Alice", lastName: "Smith" }]);
236
+ });
237
+ });
238
+ describe('strict mode', () => {
239
+ test('should error on extra columns in strict mode', () => {
240
+ const T = StructType({ name: StringType });
241
+ const config = csvParseOptionsToValue({ strict: true });
242
+ const decode = decodeCsvFor(T, config);
243
+ const csv = encoder.encode("name,extra\nAlice,foo");
244
+ assert.throws(() => decode(csv), (e) => {
245
+ return e instanceof CsvError && e.message.includes("unexpected column");
246
+ });
247
+ });
248
+ test('should not error on extra columns when not in strict mode', () => {
249
+ const T = StructType({ name: StringType });
250
+ const decode = decodeCsvFor(T);
251
+ const csv = encoder.encode("name,extra\nAlice,foo");
252
+ const result = decode(csv);
253
+ assert.deepEqual(result, [{ name: "Alice" }]);
254
+ });
255
+ });
256
+ describe('error handling', () => {
257
+ test('should error on missing required column', () => {
258
+ const T = StructType({ name: StringType, age: IntegerType });
259
+ const decode = decodeCsvFor(T);
260
+ const csv = encoder.encode("name\nAlice");
261
+ assert.throws(() => decode(csv), (e) => {
262
+ return e instanceof CsvError && e.message.includes("missing required column");
263
+ });
264
+ });
265
+ test('should error on null value for required field', () => {
266
+ const T = StructType({ name: StringType });
267
+ const config = csvParseOptionsToValue({ skipEmptyLines: false });
268
+ const decode = decodeCsvFor(T, config);
269
+ // Header followed by empty data row (two newlines)
270
+ const csv = encoder.encode("name\n\n");
271
+ assert.throws(() => decode(csv), (e) => {
272
+ return e instanceof CsvError && e.message.includes("null value for required field");
273
+ });
274
+ });
275
+ test('should error on invalid integer', () => {
276
+ const T = StructType({ value: IntegerType });
277
+ const decode = decodeCsvFor(T);
278
+ const csv = encoder.encode("value\nabc");
279
+ assert.throws(() => decode(csv), (e) => {
280
+ return e instanceof CsvError && e.message.includes("expected integer");
281
+ });
282
+ });
283
+ test('should error on invalid boolean', () => {
284
+ const T = StructType({ value: BooleanType });
285
+ const decode = decodeCsvFor(T);
286
+ const csv = encoder.encode("value\nyes");
287
+ assert.throws(() => decode(csv), (e) => {
288
+ return e instanceof CsvError && e.message.includes("expected 'true' or 'false'");
289
+ });
290
+ });
291
+ test('should error on unclosed quote', () => {
292
+ const T = StructType({ value: StringType });
293
+ const decode = decodeCsvFor(T);
294
+ const csv = encoder.encode('value\n"unclosed');
295
+ assert.throws(() => decode(csv), (e) => {
296
+ return e instanceof CsvError && e.message.includes("unclosed quote");
297
+ });
298
+ });
299
+ test('should include location in error message', () => {
300
+ const T = StructType({ value: IntegerType });
301
+ const decode = decodeCsvFor(T);
302
+ const csv = encoder.encode("value\n123\nabc");
303
+ assert.throws(() => decode(csv), (e) => {
304
+ return e instanceof CsvError && e.message.includes("row 2");
305
+ });
306
+ });
307
+ });
308
+ describe('frozen output', () => {
309
+ test('should freeze output when frozen is true', () => {
310
+ const T = StructType({ name: StringType });
311
+ const decode = decodeCsvFor(T, undefined, true);
312
+ const csv = encoder.encode("name\nAlice");
313
+ const result = decode(csv);
314
+ assert.ok(Object.isFrozen(result));
315
+ assert.ok(Object.isFrozen(result[0]));
316
+ });
317
+ });
318
+ });
319
+ // =============================================================================
320
+ // encodeCsvFor tests
321
+ // =============================================================================
322
+ describe('encodeCsvFor', () => {
323
+ describe('basic encoding', () => {
324
+ test('should encode simple struct array', () => {
325
+ const T = StructType({ name: StringType, age: IntegerType });
326
+ const encode = encodeCsvFor(T);
327
+ const result = encode([
328
+ { name: "Alice", age: 30n },
329
+ { name: "Bob", age: 25n },
330
+ ]);
331
+ assert.equal(decoder.decode(result), "name,age\r\nAlice,30\r\nBob,25");
332
+ });
333
+ test('should encode empty array', () => {
334
+ const T = StructType({ name: StringType });
335
+ const encode = encodeCsvFor(T);
336
+ const result = encode([]);
337
+ assert.equal(decoder.decode(result), "name");
338
+ });
339
+ test('should omit header when includeHeader is false', () => {
340
+ const T = StructType({ name: StringType });
341
+ const config = csvSerializeOptionsToValue({ includeHeader: false });
342
+ const encode = encodeCsvFor(T, config);
343
+ const result = encode([{ name: "Alice" }]);
344
+ assert.equal(decoder.decode(result), "Alice");
345
+ });
346
+ });
347
+ describe('field types', () => {
348
+ test('should encode string fields', () => {
349
+ const T = StructType({ value: StringType });
350
+ const encode = encodeCsvFor(T);
351
+ const result = encode([{ value: "hello" }]);
352
+ assert.equal(decoder.decode(result), "value\r\nhello");
353
+ });
354
+ test('should encode integer fields', () => {
355
+ const T = StructType({ value: IntegerType });
356
+ const encode = encodeCsvFor(T);
357
+ const result = encode([{ value: 42n }, { value: -123n }]);
358
+ assert.equal(decoder.decode(result), "value\r\n42\r\n-123");
359
+ });
360
+ test('should encode float fields including special values', () => {
361
+ const T = StructType({ value: FloatType });
362
+ const encode = encodeCsvFor(T);
363
+ const result = encode([
364
+ { value: 3.14 },
365
+ { value: Infinity },
366
+ { value: -Infinity },
367
+ { value: NaN },
368
+ ]);
369
+ assert.equal(decoder.decode(result), "value\r\n3.14\r\nInfinity\r\n-Infinity\r\nNaN");
370
+ });
371
+ test('should encode boolean fields', () => {
372
+ const T = StructType({ value: BooleanType });
373
+ const encode = encodeCsvFor(T);
374
+ const result = encode([{ value: true }, { value: false }]);
375
+ assert.equal(decoder.decode(result), "value\r\ntrue\r\nfalse");
376
+ });
377
+ test('should encode datetime fields as ISO', () => {
378
+ const T = StructType({ value: DateTimeType });
379
+ const encode = encodeCsvFor(T);
380
+ const result = encode([{ value: new Date("2025-01-15T10:30:00.000Z") }]);
381
+ assert.equal(decoder.decode(result), "value\r\n2025-01-15T10:30:00.000");
382
+ });
383
+ test('should encode blob fields as hex', () => {
384
+ const T = StructType({ value: BlobType });
385
+ const encode = encodeCsvFor(T);
386
+ const result = encode([{ value: new Uint8Array([0x48, 0x65, 0x6c, 0x6c, 0x6f]) }]);
387
+ assert.equal(decoder.decode(result), "value\r\n0x48656c6c6f");
388
+ });
389
+ });
390
+ describe('optional fields', () => {
391
+ test('should encode some values', () => {
392
+ const T = StructType({ value: OptionType(StringType) });
393
+ const encode = encodeCsvFor(T);
394
+ const result = encode([{ value: some("hello") }]);
395
+ assert.equal(decoder.decode(result), "value\r\nhello");
396
+ });
397
+ test('should encode none values as nullString', () => {
398
+ const T = StructType({ value: OptionType(StringType) });
399
+ const encode = encodeCsvFor(T);
400
+ const result = encode([{ value: none }]);
401
+ assert.equal(decoder.decode(result), "value\r\n");
402
+ });
403
+ test('should use custom nullString', () => {
404
+ const T = StructType({ value: OptionType(StringType) });
405
+ const config = csvSerializeOptionsToValue({ nullString: "NULL" });
406
+ const encode = encodeCsvFor(T, config);
407
+ const result = encode([{ value: none }]);
408
+ assert.equal(decoder.decode(result), "value\r\nNULL");
409
+ });
410
+ });
411
+ describe('quoting', () => {
412
+ test('should quote fields containing delimiter', () => {
413
+ const T = StructType({ value: StringType });
414
+ const encode = encodeCsvFor(T);
415
+ const result = encode([{ value: "hello, world" }]);
416
+ assert.equal(decoder.decode(result), 'value\r\n"hello, world"');
417
+ });
418
+ test('should quote fields containing newlines', () => {
419
+ const T = StructType({ value: StringType });
420
+ const encode = encodeCsvFor(T);
421
+ const result = encode([{ value: "hello\nworld" }]);
422
+ assert.equal(decoder.decode(result), 'value\r\n"hello\nworld"');
423
+ });
424
+ test('should escape quotes within fields', () => {
425
+ const T = StructType({ value: StringType });
426
+ const encode = encodeCsvFor(T);
427
+ const result = encode([{ value: 'say "hello"' }]);
428
+ assert.equal(decoder.decode(result), 'value\r\n"say ""hello"""');
429
+ });
430
+ test('should always quote when alwaysQuote is true', () => {
431
+ const T = StructType({ value: StringType });
432
+ const config = csvSerializeOptionsToValue({ alwaysQuote: true });
433
+ const encode = encodeCsvFor(T, config);
434
+ const result = encode([{ value: "hello" }]);
435
+ assert.equal(decoder.decode(result), '"value"\r\n"hello"');
436
+ });
437
+ });
438
+ describe('custom options', () => {
439
+ test('should use custom delimiter', () => {
440
+ const T = StructType({ a: StringType, b: StringType });
441
+ const config = csvSerializeOptionsToValue({ delimiter: ";" });
442
+ const encode = encodeCsvFor(T, config);
443
+ const result = encode([{ a: "hello", b: "world" }]);
444
+ assert.equal(decoder.decode(result), "a;b\r\nhello;world");
445
+ });
446
+ test('should use custom newline', () => {
447
+ const T = StructType({ value: StringType });
448
+ const config = csvSerializeOptionsToValue({ newline: "\n" });
449
+ const encode = encodeCsvFor(T, config);
450
+ const result = encode([{ value: "a" }, { value: "b" }]);
451
+ assert.equal(decoder.decode(result), "value\na\nb");
452
+ });
453
+ test('should use custom quote character', () => {
454
+ const T = StructType({ value: StringType });
455
+ const config = csvSerializeOptionsToValue({ quoteChar: "'", alwaysQuote: true });
456
+ const encode = encodeCsvFor(T, config);
457
+ const result = encode([{ value: "hello" }]);
458
+ assert.equal(decoder.decode(result), "'value'\r\n'hello'");
459
+ });
460
+ });
461
+ });
462
+ // =============================================================================
463
+ // Round-trip tests
464
+ // =============================================================================
465
+ describe('CSV round-trip', () => {
466
+ test('should round-trip simple data', () => {
467
+ const T = StructType({ name: StringType, age: IntegerType, active: BooleanType });
468
+ const encode = encodeCsvFor(T);
469
+ const decode = decodeCsvFor(T);
470
+ const original = [
471
+ { name: "Alice", age: 30n, active: true },
472
+ { name: "Bob", age: 25n, active: false },
473
+ ];
474
+ const encoded = encode(original);
475
+ const decoded = decode(encoded);
476
+ assert.deepEqual(decoded, original);
477
+ });
478
+ test('should round-trip optional fields', () => {
479
+ const T = StructType({ name: StringType, nickname: OptionType(StringType) });
480
+ const encode = encodeCsvFor(T);
481
+ const decode = decodeCsvFor(T);
482
+ const original = [
483
+ { name: "Alice", nickname: some("Ali") },
484
+ { name: "Bob", nickname: none },
485
+ ];
486
+ const encoded = encode(original);
487
+ const decoded = decode(encoded);
488
+ assert.deepEqual(decoded, original);
489
+ });
490
+ test('should round-trip with special characters', () => {
491
+ const T = StructType({ value: StringType });
492
+ const encode = encodeCsvFor(T);
493
+ const decode = decodeCsvFor(T);
494
+ const original = [
495
+ { value: "hello, world" },
496
+ { value: 'with "quotes"' },
497
+ { value: "multi\nline" },
498
+ ];
499
+ const encoded = encode(original);
500
+ const decoded = decode(encoded);
501
+ assert.deepEqual(decoded, original);
502
+ });
503
+ });
504
+ // =============================================================================
505
+ // Config conversion tests
506
+ // =============================================================================
507
+ describe('csvParseOptionsToValue', () => {
508
+ test('should convert empty options to all none', () => {
509
+ const result = csvParseOptionsToValue({});
510
+ assert.equal(result.delimiter.type, "none");
511
+ assert.equal(result.quoteChar.type, "none");
512
+ assert.equal(result.hasHeader.type, "none");
513
+ });
514
+ test('should convert provided options to some', () => {
515
+ const result = csvParseOptionsToValue({
516
+ delimiter: ";",
517
+ hasHeader: false,
518
+ nullStrings: ["", "NULL"],
519
+ });
520
+ assert.equal(result.delimiter.type, "some");
521
+ assert.equal(result.delimiter.value, ";");
522
+ assert.equal(result.hasHeader.type, "some");
523
+ assert.equal(result.hasHeader.value, false);
524
+ assert.equal(result.nullStrings.type, "some");
525
+ assert.deepEqual(result.nullStrings.value, ["", "NULL"]);
526
+ });
527
+ test('should convert columnMapping Map to SortedMap', () => {
528
+ const result = csvParseOptionsToValue({
529
+ columnMapping: new Map([["a", "b"]]),
530
+ });
531
+ assert.equal(result.columnMapping.type, "some");
532
+ assert.ok(result.columnMapping.value instanceof SortedMap);
533
+ });
534
+ });
535
+ describe('csvSerializeOptionsToValue', () => {
536
+ test('should convert empty options to all none', () => {
537
+ const result = csvSerializeOptionsToValue({});
538
+ assert.equal(result.delimiter.type, "none");
539
+ assert.equal(result.quoteChar.type, "none");
540
+ assert.equal(result.includeHeader.type, "none");
541
+ });
542
+ test('should convert provided options to some', () => {
543
+ const result = csvSerializeOptionsToValue({
544
+ delimiter: "\t",
545
+ includeHeader: false,
546
+ nullString: "N/A",
547
+ });
548
+ assert.equal(result.delimiter.type, "some");
549
+ assert.equal(result.delimiter.value, "\t");
550
+ assert.equal(result.includeHeader.type, "some");
551
+ assert.equal(result.includeHeader.value, false);
552
+ assert.equal(result.nullString.type, "some");
553
+ assert.equal(result.nullString.value, "N/A");
554
+ });
555
+ });
556
+ //# sourceMappingURL=csv.spec.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"csv.spec.js","sourceRoot":"","sources":["../../../src/serialization/csv.spec.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,OAAO,EAAE,QAAQ,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AAC3C,OAAO,MAAM,MAAM,oBAAoB,CAAC;AAExC,OAAO,EACL,YAAY,EACZ,YAAY,EACZ,sBAAsB,EACtB,0BAA0B,EAC1B,QAAQ,GACT,MAAM,UAAU,CAAC;AAClB,OAAO,EACL,UAAU,EACV,UAAU,EACV,WAAW,EACX,SAAS,EACT,WAAW,EACX,YAAY,EACZ,QAAQ,EACR,UAAU,GACX,MAAM,aAAa,CAAC;AACrB,OAAO,EAAE,IAAI,EAAE,IAAI,EAAE,MAAM,0BAA0B,CAAC;AACtD,OAAO,EAAE,SAAS,EAAE,MAAM,4BAA4B,CAAC;AAEvD,MAAM,OAAO,GAAG,IAAI,WAAW,EAAE,CAAC;AAClC,MAAM,OAAO,GAAG,IAAI,WAAW,EAAE,CAAC;AAElC,gFAAgF;AAChF,qBAAqB;AACrB,gFAAgF;AAEhF,QAAQ,CAAC,cAAc,EAAE,GAAG,EAAE;IAC5B,QAAQ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AAK,EAAE,KAAK,CAAC,CAAC;QACzD,MAAM,CAAC,KAAK,CAAC,MAAM,CAAC,UAAU,CAAC,IAAI,EAAE,MAAM,CAAC,CAAC;QAC7C,MAAM,CAAC,KAAK,CAAE,MAAM,CAAC,UAAkB,CAAC,KAAK,EAAE,KAAK,CAAC,CAAC;IACxD,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=east-inferred.spec.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"east-inferred.spec.d.ts","sourceRoot":"","sources":["../../../src/serialization/east-inferred.spec.ts"],"names":[],"mappings":""}