wao 0.11.1 → 0.12.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 (574) hide show
  1. package/cjs/aoconnect-base.js +1 -1
  2. package/cjs/armem-base.js +89 -69
  3. package/cjs/armem-web.js +2 -3
  4. package/cjs/armem.js +1 -2
  5. package/cjs/bar.js +37 -28
  6. package/cjs/compress.js +0 -1
  7. package/cjs/lua/weavedb_mock.lua +3 -2
  8. package/cjs/waosm/waosm.js +19 -48
  9. package/cjs/waosm-node/waosm_bg.js +19 -48
  10. package/cjs/weavedb.js +138 -66
  11. package/esm/.db/100040/data/1/123.json +1 -0
  12. package/esm/.db/103252/data/0/13315.json +1 -0
  13. package/esm/.db/103252/data/1/120.json +1 -0
  14. package/esm/.db/103252/data/1/123.json +1 -0
  15. package/esm/.db/105470/data/0/0.json +1 -0
  16. package/esm/.db/105470/data/1/120.json +1 -0
  17. package/esm/.db/105470/data/1/123.json +1 -0
  18. package/esm/.db/105470/data/3/104.json +1 -0
  19. package/esm/.db/105667/data/ppl/bob.json +1 -0
  20. package/esm/.db/105869/data/1/120.json +1 -0
  21. package/esm/.db/105869/data/1/123.json +1 -0
  22. package/esm/.db/113125/data/1/example.json +1 -0
  23. package/esm/.db/116234/data/1/123.json +1 -0
  24. package/esm/.db/119911/data/1/120.json +1 -0
  25. package/esm/.db/119911/data/1/123.json +1 -0
  26. package/esm/.db/122989/data/0/0.json +1 -0
  27. package/esm/.db/122989/data/1/120.json +1 -0
  28. package/esm/.db/122989/data/1/123.json +1 -0
  29. package/esm/.db/125755/data/1/123.json +1 -0
  30. package/esm/.db/126241/data/1/123.json +1 -0
  31. package/esm/.db/129099/data/1/123.json +1 -0
  32. package/esm/.db/129781/data/0/14083.json +1 -0
  33. package/esm/.db/129781/data/1/120.json +1 -0
  34. package/esm/.db/129781/data/1/123.json +1 -0
  35. package/esm/.db/129781/data/15/0.json +1 -0
  36. package/esm/.db/132860/data/0/13315.json +1 -0
  37. package/esm/.db/132860/data/1/120.json +1 -0
  38. package/esm/.db/132860/data/1/123.json +1 -0
  39. package/esm/.db/134721/data/1/123.json +1 -0
  40. package/esm/.db/137408/data/ppl/bob.json +1 -0
  41. package/esm/.db/137556/data/1/123.json +1 -0
  42. package/esm/.db/143417/data/1/123.json +1 -0
  43. package/esm/.db/143799/data/1/123.json +1 -0
  44. package/esm/.db/146558/data/0/0.json +1 -0
  45. package/esm/.db/146558/data/1/120.json +1 -0
  46. package/esm/.db/146558/data/1/123.json +1 -0
  47. package/esm/.db/153145/data/1/123.json +1 -0
  48. package/esm/.db/153912/data/1/example.json +1 -0
  49. package/esm/.db/154536/data/0/13315.json +1 -0
  50. package/esm/.db/154536/data/1/120.json +1 -0
  51. package/esm/.db/154536/data/1/123.json +1 -0
  52. package/esm/.db/158777/data/1/123.json +1 -0
  53. package/esm/.db/170678/data/0/13315.json +1 -0
  54. package/esm/.db/170678/data/1/120.json +1 -0
  55. package/esm/.db/170678/data/1/123.json +1 -0
  56. package/esm/.db/17434/data/1/123.json +1 -0
  57. package/esm/.db/176113/data/1/123.json +1 -0
  58. package/esm/.db/179669/data/0/13315.json +1 -0
  59. package/esm/.db/179669/data/1/120.json +1 -0
  60. package/esm/.db/179669/data/1/123.json +1 -0
  61. package/esm/.db/183368/data/1/120.json +1 -0
  62. package/esm/.db/183368/data/1/123.json +1 -0
  63. package/esm/.db/188491/data/0/14083.json +1 -0
  64. package/esm/.db/188491/data/1/120.json +1 -0
  65. package/esm/.db/188491/data/1/123.json +1 -0
  66. package/esm/.db/188491/data/15/0.json +1 -0
  67. package/esm/.db/189189/data/ppl/bob.json +1 -0
  68. package/esm/.db/195025/data/1/120.json +1 -0
  69. package/esm/.db/195025/data/1/123.json +1 -0
  70. package/esm/.db/19852/data/1/123.json +1 -0
  71. package/esm/.db/204968/data/1/123.json +1 -0
  72. package/esm/.db/207069/data/0/0.json +1 -0
  73. package/esm/.db/207069/data/1/120.json +1 -0
  74. package/esm/.db/207069/data/1/123.json +1 -0
  75. package/esm/.db/211038/data/1/120.json +1 -0
  76. package/esm/.db/211038/data/1/123.json +1 -0
  77. package/esm/.db/211580/data/1/120.json +1 -0
  78. package/esm/.db/211580/data/1/123.json +1 -0
  79. package/esm/.db/214305/data/0/0.json +1 -0
  80. package/esm/.db/214305/data/1/120.json +1 -0
  81. package/esm/.db/214305/data/1/123.json +1 -0
  82. package/esm/.db/214712/data/0/13315.json +1 -0
  83. package/esm/.db/214712/data/1/120.json +1 -0
  84. package/esm/.db/214712/data/1/123.json +1 -0
  85. package/esm/.db/218886/data/0/14083.json +1 -0
  86. package/esm/.db/218886/data/1/120.json +1 -0
  87. package/esm/.db/218886/data/1/123.json +1 -0
  88. package/esm/.db/218886/data/15/0.json +1 -0
  89. package/esm/.db/221009/data/1/123.json +1 -0
  90. package/esm/.db/221818/data/1/120.json +1 -0
  91. package/esm/.db/221818/data/1/123.json +1 -0
  92. package/esm/.db/226668/data/0/13315.json +1 -0
  93. package/esm/.db/226668/data/1/120.json +1 -0
  94. package/esm/.db/226668/data/1/123.json +1 -0
  95. package/esm/.db/226981/data/0/123.json +1 -0
  96. package/esm/.db/235331/data/0/13315.json +1 -0
  97. package/esm/.db/235331/data/1/120.json +1 -0
  98. package/esm/.db/235331/data/1/123.json +1 -0
  99. package/esm/.db/247863/data/1/123.json +1 -0
  100. package/esm/.db/247918/data/0/0.json +1 -0
  101. package/esm/.db/247918/data/1/120.json +1 -0
  102. package/esm/.db/247918/data/1/123.json +1 -0
  103. package/esm/.db/247918/data/3/104.json +1 -0
  104. package/esm/.db/250384/data/1/123.json +1 -0
  105. package/esm/.db/253205/data/1/120.json +1 -0
  106. package/esm/.db/253205/data/1/123.json +1 -0
  107. package/esm/.db/26452/data/1/120.json +1 -0
  108. package/esm/.db/26452/data/1/123.json +1 -0
  109. package/esm/.db/265430/data/1/120.json +1 -0
  110. package/esm/.db/265430/data/1/123.json +1 -0
  111. package/esm/.db/269049/data/0/0.json +1 -0
  112. package/esm/.db/269049/data/1/120.json +1 -0
  113. package/esm/.db/269049/data/1/123.json +1 -0
  114. package/esm/.db/273652/data/0/0.json +1 -0
  115. package/esm/.db/273652/data/1/120.json +1 -0
  116. package/esm/.db/273652/data/1/123.json +1 -0
  117. package/esm/.db/281035/data/0/0.json +1 -0
  118. package/esm/.db/281035/data/1/120.json +1 -0
  119. package/esm/.db/281035/data/1/123.json +1 -0
  120. package/esm/.db/281140/data/0/13315.json +1 -0
  121. package/esm/.db/281140/data/1/120.json +1 -0
  122. package/esm/.db/281140/data/1/123.json +1 -0
  123. package/esm/.db/295732/data/ppl/bob.json +1 -0
  124. package/esm/.db/296113/data/1/123.json +1 -0
  125. package/esm/.db/297154/data/0/13315.json +1 -0
  126. package/esm/.db/297154/data/1/120.json +1 -0
  127. package/esm/.db/297154/data/1/123.json +1 -0
  128. package/esm/.db/304770/data/1/120.json +1 -0
  129. package/esm/.db/304770/data/1/123.json +1 -0
  130. package/esm/.db/3081/data/0/0.json +1 -0
  131. package/esm/.db/3081/data/1/120.json +1 -0
  132. package/esm/.db/3081/data/1/123.json +1 -0
  133. package/esm/.db/310793/data/1/120.json +1 -0
  134. package/esm/.db/310793/data/1/123.json +1 -0
  135. package/esm/.db/317310/data/1/123.json +1 -0
  136. package/esm/.db/317819/data/1/example.json +1 -0
  137. package/esm/.db/319464/data/0/0.json +1 -0
  138. package/esm/.db/319464/data/1/120.json +1 -0
  139. package/esm/.db/319464/data/1/123.json +1 -0
  140. package/esm/.db/32053/data/1/120.json +1 -0
  141. package/esm/.db/32053/data/1/123.json +1 -0
  142. package/esm/.db/322473/data/ppl/bob.json +1 -0
  143. package/esm/.db/323300/data/1/123.json +1 -0
  144. package/esm/.db/323840/data/0/0.json +1 -0
  145. package/esm/.db/323840/data/1/120.json +1 -0
  146. package/esm/.db/323840/data/1/123.json +1 -0
  147. package/esm/.db/328731/data/0/0.json +1 -0
  148. package/esm/.db/328731/data/1/120.json +1 -0
  149. package/esm/.db/328731/data/1/123.json +1 -0
  150. package/esm/.db/334158/data/1/example.json +1 -0
  151. package/esm/.db/334577/data/1/example.json +1 -0
  152. package/esm/.db/339914/data/1/123.json +1 -0
  153. package/esm/.db/34265/data/0/0.json +1 -0
  154. package/esm/.db/34265/data/1/120.json +1 -0
  155. package/esm/.db/34265/data/1/123.json +1 -0
  156. package/esm/.db/346364/data/1/123.json +1 -0
  157. package/esm/.db/349791/data/0/14083.json +1 -0
  158. package/esm/.db/349791/data/1/120.json +1 -0
  159. package/esm/.db/349791/data/1/123.json +1 -0
  160. package/esm/.db/349791/data/15/0.json +1 -0
  161. package/esm/.db/350767/data/ppl/bob.json +1 -0
  162. package/esm/.db/352310/data/0/13315.json +1 -0
  163. package/esm/.db/352310/data/1/120.json +1 -0
  164. package/esm/.db/352310/data/1/123.json +1 -0
  165. package/esm/.db/35438/data/1/123.json +1 -0
  166. package/esm/.db/354670/data/0/13315.json +1 -0
  167. package/esm/.db/354670/data/1/120.json +1 -0
  168. package/esm/.db/354670/data/1/123.json +1 -0
  169. package/esm/.db/354805/data/0/0.json +1 -0
  170. package/esm/.db/354805/data/1/120.json +1 -0
  171. package/esm/.db/354805/data/1/123.json +1 -0
  172. package/esm/.db/358368/data/1/example.json +1 -0
  173. package/esm/.db/358831/data/1/123.json +1 -0
  174. package/esm/.db/360133/data/0/0.json +1 -0
  175. package/esm/.db/360133/data/1/120.json +1 -0
  176. package/esm/.db/360133/data/1/123.json +1 -0
  177. package/esm/.db/367925/data/0/13315.json +1 -0
  178. package/esm/.db/367925/data/1/120.json +1 -0
  179. package/esm/.db/367925/data/1/123.json +1 -0
  180. package/esm/.db/369638/data/1/123.json +1 -0
  181. package/esm/.db/3700/data/1/120.json +1 -0
  182. package/esm/.db/3700/data/1/123.json +1 -0
  183. package/esm/.db/374988/data/0/0.json +1 -0
  184. package/esm/.db/374988/data/1/120.json +1 -0
  185. package/esm/.db/374988/data/1/123.json +1 -0
  186. package/esm/.db/380018/data/1/123.json +1 -0
  187. package/esm/.db/380021/data/1/123.json +1 -0
  188. package/esm/.db/386761/data/1/123.json +1 -0
  189. package/esm/.db/387217/data/0/13315.json +1 -0
  190. package/esm/.db/387217/data/1/120.json +1 -0
  191. package/esm/.db/387217/data/1/123.json +1 -0
  192. package/esm/.db/392652/data/1/123.json +1 -0
  193. package/esm/.db/392692/data/0/13315.json +1 -0
  194. package/esm/.db/392692/data/1/120.json +1 -0
  195. package/esm/.db/392692/data/1/123.json +1 -0
  196. package/esm/.db/396339/data/1/123.json +1 -0
  197. package/esm/.db/404348/data/1/123.json +1 -0
  198. package/esm/.db/405894/data/0/14083.json +1 -0
  199. package/esm/.db/405894/data/1/120.json +1 -0
  200. package/esm/.db/405894/data/1/123.json +1 -0
  201. package/esm/.db/405894/data/15/0.json +1 -0
  202. package/esm/.db/406165/data/1/example.json +1 -0
  203. package/esm/.db/407316/data/ppl/bob.json +1 -0
  204. package/esm/.db/407987/data/1/123.json +1 -0
  205. package/esm/.db/410181/data/1/123.json +1 -0
  206. package/esm/.db/411981/data/1/120.json +1 -0
  207. package/esm/.db/411981/data/1/123.json +1 -0
  208. package/esm/.db/416278/data/1/120.json +1 -0
  209. package/esm/.db/416278/data/1/123.json +1 -0
  210. package/esm/.db/418449/data/1/123.json +1 -0
  211. package/esm/.db/425620/data/1/120.json +1 -0
  212. package/esm/.db/425620/data/1/123.json +1 -0
  213. package/esm/.db/429727/data/1/123.json +1 -0
  214. package/esm/.db/435030/data/1/123.json +1 -0
  215. package/esm/.db/444362/data/1/120.json +1 -0
  216. package/esm/.db/444362/data/1/123.json +1 -0
  217. package/esm/.db/446985/data/1/123.json +1 -0
  218. package/esm/.db/451355/data/1/120.json +1 -0
  219. package/esm/.db/451355/data/1/123.json +1 -0
  220. package/esm/.db/45640/data/1/123.json +1 -0
  221. package/esm/.db/46155/data/0/0.json +1 -0
  222. package/esm/.db/46155/data/0/13315.json +1 -0
  223. package/esm/.db/46155/data/1/120.json +1 -0
  224. package/esm/.db/46155/data/1/123.json +1 -0
  225. package/esm/.db/46528/data/1/123.json +1 -0
  226. package/esm/.db/466476/data/1/123.json +1 -0
  227. package/esm/.db/467578/data/0/0.json +1 -0
  228. package/esm/.db/467578/data/1/120.json +1 -0
  229. package/esm/.db/467578/data/1/123.json +1 -0
  230. package/esm/.db/472245/data/1/123.json +1 -0
  231. package/esm/.db/474238/data/1/example.json +1 -0
  232. package/esm/.db/477291/data/1/123.json +1 -0
  233. package/esm/.db/477375/data/1/120.json +1 -0
  234. package/esm/.db/477375/data/1/123.json +1 -0
  235. package/esm/.db/479960/data/1/123.json +1 -0
  236. package/esm/.db/482327/data/1/123.json +1 -0
  237. package/esm/.db/487117/data/1/example.json +1 -0
  238. package/esm/.db/495075/data/1/123.json +1 -0
  239. package/esm/.db/498660/data/1/123.json +1 -0
  240. package/esm/.db/510578/data/1/123.json +1 -0
  241. package/esm/.db/514521/data/1/123.json +1 -0
  242. package/esm/.db/524536/data/1/120.json +1 -0
  243. package/esm/.db/524536/data/1/123.json +1 -0
  244. package/esm/.db/52751/data/1/example.json +1 -0
  245. package/esm/.db/530599/data/ppl/bob.json +1 -0
  246. package/esm/.db/536579/data/1/123.json +1 -0
  247. package/esm/.db/539183/data/1/123.json +1 -0
  248. package/esm/.db/539222/data/1/example.json +1 -0
  249. package/esm/.db/542071/data/0/0.json +1 -0
  250. package/esm/.db/542071/data/0/13315.json +1 -0
  251. package/esm/.db/542071/data/1/120.json +1 -0
  252. package/esm/.db/542071/data/1/123.json +1 -0
  253. package/esm/.db/542939/data/ppl/bob.json +1 -0
  254. package/esm/.db/547077/data/1/123.json +1 -0
  255. package/esm/.db/548947/data/ppl/bob.json +1 -0
  256. package/esm/.db/551385/data/0/0.json +1 -0
  257. package/esm/.db/551385/data/1/120.json +1 -0
  258. package/esm/.db/551385/data/1/123.json +1 -0
  259. package/esm/.db/553486/data/0/0.json +1 -0
  260. package/esm/.db/553486/data/1/120.json +1 -0
  261. package/esm/.db/553486/data/1/123.json +1 -0
  262. package/esm/.db/554578/data/1/123.json +1 -0
  263. package/esm/.db/555963/data/1/123.json +1 -0
  264. package/esm/.db/556201/data/1/123.json +1 -0
  265. package/esm/.db/572000/data/1/123.json +1 -0
  266. package/esm/.db/572151/data/1/123.json +1 -0
  267. package/esm/.db/573301/data/1/123.json +1 -0
  268. package/esm/.db/579648/data/0/0.json +1 -0
  269. package/esm/.db/579648/data/1/120.json +1 -0
  270. package/esm/.db/579648/data/1/123.json +1 -0
  271. package/esm/.db/579648/data/3/104.json +1 -0
  272. package/esm/.db/582311/data/1/example.json +1 -0
  273. package/esm/.db/587351/data/0/14083.json +1 -0
  274. package/esm/.db/587351/data/1/120.json +1 -0
  275. package/esm/.db/587351/data/1/123.json +1 -0
  276. package/esm/.db/587351/data/15/0.json +1 -0
  277. package/esm/.db/588867/data/0/0.json +1 -0
  278. package/esm/.db/588867/data/1/120.json +1 -0
  279. package/esm/.db/588867/data/1/123.json +1 -0
  280. package/esm/.db/589730/data/1/123.json +1 -0
  281. package/esm/.db/591738/data/0/13315.json +1 -0
  282. package/esm/.db/591738/data/1/120.json +1 -0
  283. package/esm/.db/591738/data/1/123.json +1 -0
  284. package/esm/.db/593460/data/1/123.json +1 -0
  285. package/esm/.db/595304/data/1/123.json +1 -0
  286. package/esm/.db/595772/data/0/13315.json +1 -0
  287. package/esm/.db/595772/data/1/120.json +1 -0
  288. package/esm/.db/595772/data/1/123.json +1 -0
  289. package/esm/.db/596051/data/0/0.json +1 -0
  290. package/esm/.db/596051/data/1/120.json +1 -0
  291. package/esm/.db/596051/data/1/123.json +1 -0
  292. package/esm/.db/601728/data/1/120.json +1 -0
  293. package/esm/.db/601728/data/1/123.json +1 -0
  294. package/esm/.db/619154/data/1/123.json +1 -0
  295. package/esm/.db/620185/data/1/123.json +1 -0
  296. package/esm/.db/623179/data/1/123.json +1 -0
  297. package/esm/.db/623265/data/1/123.json +1 -0
  298. package/esm/.db/630002/data/1/120.json +1 -0
  299. package/esm/.db/630002/data/1/123.json +1 -0
  300. package/esm/.db/631961/data/1/123.json +1 -0
  301. package/esm/.db/635637/data/0/14083.json +1 -0
  302. package/esm/.db/635637/data/1/120.json +1 -0
  303. package/esm/.db/635637/data/1/123.json +1 -0
  304. package/esm/.db/635637/data/15/0.json +1 -0
  305. package/esm/.db/636670/data/1/example.json +1 -0
  306. package/esm/.db/640527/data/0/0.json +1 -0
  307. package/esm/.db/640527/data/1/120.json +1 -0
  308. package/esm/.db/640527/data/1/123.json +1 -0
  309. package/esm/.db/644020/data/0/13315.json +1 -0
  310. package/esm/.db/644020/data/1/120.json +1 -0
  311. package/esm/.db/644020/data/1/123.json +1 -0
  312. package/esm/.db/64462/data/0/14083.json +1 -0
  313. package/esm/.db/64462/data/1/120.json +1 -0
  314. package/esm/.db/64462/data/1/123.json +1 -0
  315. package/esm/.db/64462/data/15/0.json +1 -0
  316. package/esm/.db/646266/data/1/123.json +1 -0
  317. package/esm/.db/650764/data/1/120.json +1 -0
  318. package/esm/.db/650764/data/1/123.json +1 -0
  319. package/esm/.db/654655/data/0/0.json +1 -0
  320. package/esm/.db/654655/data/1/120.json +1 -0
  321. package/esm/.db/654655/data/1/123.json +1 -0
  322. package/esm/.db/658164/data/1/120.json +1 -0
  323. package/esm/.db/658164/data/1/123.json +1 -0
  324. package/esm/.db/65937/data/1/123.json +1 -0
  325. package/esm/.db/659738/data/0/13315.json +1 -0
  326. package/esm/.db/659738/data/1/120.json +1 -0
  327. package/esm/.db/659738/data/1/123.json +1 -0
  328. package/esm/.db/660517/data/0/13315.json +1 -0
  329. package/esm/.db/660517/data/1/120.json +1 -0
  330. package/esm/.db/660517/data/1/123.json +1 -0
  331. package/esm/.db/664564/data/1/123.json +1 -0
  332. package/esm/.db/672001/data/1/example.json +1 -0
  333. package/esm/.db/674620/data/1/123.json +1 -0
  334. package/esm/.db/67532/data/1/123.json +1 -0
  335. package/esm/.db/675670/data/1/120.json +1 -0
  336. package/esm/.db/675670/data/1/123.json +1 -0
  337. package/esm/.db/686538/data/1/123.json +1 -0
  338. package/esm/.db/691017/data/1/123.json +1 -0
  339. package/esm/.db/691716/data/1/120.json +1 -0
  340. package/esm/.db/691716/data/1/123.json +1 -0
  341. package/esm/.db/693105/data/0/14083.json +1 -0
  342. package/esm/.db/693105/data/1/120.json +1 -0
  343. package/esm/.db/693105/data/1/123.json +1 -0
  344. package/esm/.db/693105/data/15/0.json +1 -0
  345. package/esm/.db/694486/data/1/123.json +1 -0
  346. package/esm/.db/702106/data/1/120.json +1 -0
  347. package/esm/.db/702106/data/1/123.json +1 -0
  348. package/esm/.db/7047/data/1/123.json +1 -0
  349. package/esm/.db/705954/data/0/13315.json +1 -0
  350. package/esm/.db/705954/data/1/120.json +1 -0
  351. package/esm/.db/705954/data/1/123.json +1 -0
  352. package/esm/.db/710967/data/1/120.json +1 -0
  353. package/esm/.db/710967/data/1/123.json +1 -0
  354. package/esm/.db/715883/data/0/13315.json +1 -0
  355. package/esm/.db/715883/data/1/120.json +1 -0
  356. package/esm/.db/715883/data/1/123.json +1 -0
  357. package/esm/.db/717358/data/1/120.json +1 -0
  358. package/esm/.db/717358/data/1/123.json +1 -0
  359. package/esm/.db/71999/data/0/13315.json +1 -0
  360. package/esm/.db/71999/data/1/120.json +1 -0
  361. package/esm/.db/71999/data/1/123.json +1 -0
  362. package/esm/.db/720364/data/1/123.json +1 -0
  363. package/esm/.db/727249/data/1/120.json +1 -0
  364. package/esm/.db/727249/data/1/123.json +1 -0
  365. package/esm/.db/728258/data/1/example.json +1 -0
  366. package/esm/.db/728986/data/0/13315.json +1 -0
  367. package/esm/.db/728986/data/1/120.json +1 -0
  368. package/esm/.db/728986/data/1/123.json +1 -0
  369. package/esm/.db/732768/data/1/120.json +1 -0
  370. package/esm/.db/732768/data/1/123.json +1 -0
  371. package/esm/.db/733885/data/1/123.json +1 -0
  372. package/esm/.db/736192/data/0/0.json +1 -0
  373. package/esm/.db/736192/data/1/120.json +1 -0
  374. package/esm/.db/736192/data/1/123.json +1 -0
  375. package/esm/.db/73856/data/0/0.json +1 -0
  376. package/esm/.db/73856/data/1/120.json +1 -0
  377. package/esm/.db/73856/data/1/123.json +1 -0
  378. package/esm/.db/738577/data/1/123.json +1 -0
  379. package/esm/.db/744844/data/1/123.json +1 -0
  380. package/esm/.db/745738/data/1/123.json +1 -0
  381. package/esm/.db/747240/data/1/123.json +1 -0
  382. package/esm/.db/749115/data/0/0.json +1 -0
  383. package/esm/.db/749115/data/1/120.json +1 -0
  384. package/esm/.db/749115/data/1/123.json +1 -0
  385. package/esm/.db/749514/data/0/0.json +1 -0
  386. package/esm/.db/749514/data/1/120.json +1 -0
  387. package/esm/.db/749514/data/1/123.json +1 -0
  388. package/esm/.db/754982/data/1/123.json +1 -0
  389. package/esm/.db/765281/data/0/13315.json +1 -0
  390. package/esm/.db/765281/data/1/120.json +1 -0
  391. package/esm/.db/765281/data/1/123.json +1 -0
  392. package/esm/.db/765521/data/0/14083.json +1 -0
  393. package/esm/.db/765521/data/1/120.json +1 -0
  394. package/esm/.db/765521/data/1/123.json +1 -0
  395. package/esm/.db/765521/data/15/0.json +1 -0
  396. package/esm/.db/766864/data/1/123.json +1 -0
  397. package/esm/.db/770788/data/0/14083.json +1 -0
  398. package/esm/.db/770788/data/1/120.json +1 -0
  399. package/esm/.db/770788/data/1/123.json +1 -0
  400. package/esm/.db/770788/data/15/0.json +1 -0
  401. package/esm/.db/774499/data/1/example.json +1 -0
  402. package/esm/.db/774617/data/ppl/bob.json +1 -0
  403. package/esm/.db/775617/data/1/123.json +1 -0
  404. package/esm/.db/779782/data/1/123.json +1 -0
  405. package/esm/.db/779921/data/1/123.json +1 -0
  406. package/esm/.db/782910/data/1/123.json +1 -0
  407. package/esm/.db/783279/data/0/13315.json +1 -0
  408. package/esm/.db/783279/data/1/120.json +1 -0
  409. package/esm/.db/783279/data/1/123.json +1 -0
  410. package/esm/.db/785515/data/1/123.json +1 -0
  411. package/esm/.db/791284/data/0/0.json +1 -0
  412. package/esm/.db/791284/data/1/120.json +1 -0
  413. package/esm/.db/791284/data/1/123.json +1 -0
  414. package/esm/.db/791361/data/0/14083.json +1 -0
  415. package/esm/.db/791361/data/1/120.json +1 -0
  416. package/esm/.db/791361/data/1/123.json +1 -0
  417. package/esm/.db/791361/data/15/0.json +1 -0
  418. package/esm/.db/791754/data/1/120.json +1 -0
  419. package/esm/.db/791754/data/1/123.json +1 -0
  420. package/esm/.db/792232/data/0/13315.json +1 -0
  421. package/esm/.db/792232/data/1/120.json +1 -0
  422. package/esm/.db/792232/data/1/123.json +1 -0
  423. package/esm/.db/792777/data/0/13315.json +1 -0
  424. package/esm/.db/792777/data/1/120.json +1 -0
  425. package/esm/.db/792777/data/1/123.json +1 -0
  426. package/esm/.db/793249/data/0/123.json +1 -0
  427. package/esm/.db/795512/data/0/0.json +1 -0
  428. package/esm/.db/795512/data/1/120.json +1 -0
  429. package/esm/.db/795512/data/1/123.json +1 -0
  430. package/esm/.db/795512/data/3/104.json +1 -0
  431. package/esm/.db/796663/data/1/123.json +1 -0
  432. package/esm/.db/797304/data/0/0.json +1 -0
  433. package/esm/.db/797304/data/1/120.json +1 -0
  434. package/esm/.db/797304/data/1/123.json +1 -0
  435. package/esm/.db/797304/data/3/104.json +1 -0
  436. package/esm/.db/800834/data/1/123.json +1 -0
  437. package/esm/.db/806421/data/1/120.json +1 -0
  438. package/esm/.db/806421/data/1/123.json +1 -0
  439. package/esm/.db/81623/data/0/14083.json +1 -0
  440. package/esm/.db/81623/data/1/120.json +1 -0
  441. package/esm/.db/81623/data/1/123.json +1 -0
  442. package/esm/.db/81623/data/15/0.json +1 -0
  443. package/esm/.db/81941/data/1/120.json +1 -0
  444. package/esm/.db/81941/data/1/123.json +1 -0
  445. package/esm/.db/820340/data/0/0.json +1 -0
  446. package/esm/.db/820340/data/1/120.json +1 -0
  447. package/esm/.db/820340/data/1/123.json +1 -0
  448. package/esm/.db/821932/data/1/120.json +1 -0
  449. package/esm/.db/821932/data/1/123.json +1 -0
  450. package/esm/.db/823440/data/1/123.json +1 -0
  451. package/esm/.db/823889/data/1/120.json +1 -0
  452. package/esm/.db/823889/data/1/123.json +1 -0
  453. package/esm/.db/823896/data/1/123.json +1 -0
  454. package/esm/.db/836077/data/0/14083.json +1 -0
  455. package/esm/.db/836077/data/1/120.json +1 -0
  456. package/esm/.db/836077/data/1/123.json +1 -0
  457. package/esm/.db/836077/data/15/0.json +1 -0
  458. package/esm/.db/837341/data/1/123.json +1 -0
  459. package/esm/.db/844882/data/1/123.json +1 -0
  460. package/esm/.db/847654/data/1/example.json +1 -0
  461. package/esm/.db/856010/data/0/13315.json +1 -0
  462. package/esm/.db/856010/data/1/120.json +1 -0
  463. package/esm/.db/856010/data/1/123.json +1 -0
  464. package/esm/.db/856047/data/1/120.json +1 -0
  465. package/esm/.db/856047/data/1/123.json +1 -0
  466. package/esm/.db/856820/data/1/123.json +1 -0
  467. package/esm/.db/857266/data/1/123.json +1 -0
  468. package/esm/.db/86017/data/0/13315.json +1 -0
  469. package/esm/.db/86017/data/1/120.json +1 -0
  470. package/esm/.db/86017/data/1/123.json +1 -0
  471. package/esm/.db/862600/data/1/120.json +1 -0
  472. package/esm/.db/862600/data/1/123.json +1 -0
  473. package/esm/.db/871866/data/0/13315.json +1 -0
  474. package/esm/.db/871866/data/1/120.json +1 -0
  475. package/esm/.db/871866/data/1/123.json +1 -0
  476. package/esm/.db/875359/data/0/0.json +1 -0
  477. package/esm/.db/875359/data/1/120.json +1 -0
  478. package/esm/.db/875359/data/1/123.json +1 -0
  479. package/esm/.db/875359/data/3/104.json +1 -0
  480. package/esm/.db/876330/data/1/example.json +1 -0
  481. package/esm/.db/880182/data/1/123.json +1 -0
  482. package/esm/.db/882138/data/0/0.json +1 -0
  483. package/esm/.db/882138/data/1/120.json +1 -0
  484. package/esm/.db/882138/data/1/123.json +1 -0
  485. package/esm/.db/882722/data/1/example.json +1 -0
  486. package/esm/.db/893417/data/1/example.json +1 -0
  487. package/esm/.db/897575/data/1/example.json +1 -0
  488. package/esm/.db/897832/data/0/13315.json +1 -0
  489. package/esm/.db/897832/data/1/120.json +1 -0
  490. package/esm/.db/897832/data/1/123.json +1 -0
  491. package/esm/.db/898043/data/0/0.json +1 -0
  492. package/esm/.db/898043/data/1/120.json +1 -0
  493. package/esm/.db/898043/data/1/123.json +1 -0
  494. package/esm/.db/898201/data/ppl/bob.json +1 -0
  495. package/esm/.db/900442/data/1/123.json +1 -0
  496. package/esm/.db/900800/data/0/0.json +1 -0
  497. package/esm/.db/900800/data/1/120.json +1 -0
  498. package/esm/.db/900800/data/1/123.json +1 -0
  499. package/esm/.db/910535/data/1/120.json +1 -0
  500. package/esm/.db/910535/data/1/123.json +1 -0
  501. package/esm/.db/911132/data/1/120.json +1 -0
  502. package/esm/.db/911132/data/1/123.json +1 -0
  503. package/esm/.db/913152/data/1/120.json +1 -0
  504. package/esm/.db/913152/data/1/123.json +1 -0
  505. package/esm/.db/91378/data/1/123.json +1 -0
  506. package/esm/.db/918654/data/1/example.json +1 -0
  507. package/esm/.db/932648/data/1/123.json +1 -0
  508. package/esm/.db/936016/data/1/example.json +1 -0
  509. package/esm/.db/936843/data/1/123.json +1 -0
  510. package/esm/.db/940099/data/1/example.json +1 -0
  511. package/esm/.db/941807/data/1/120.json +1 -0
  512. package/esm/.db/941807/data/1/123.json +1 -0
  513. package/esm/.db/941934/data/0/14083.json +1 -0
  514. package/esm/.db/941934/data/1/120.json +1 -0
  515. package/esm/.db/941934/data/1/123.json +1 -0
  516. package/esm/.db/941934/data/15/0.json +1 -0
  517. package/esm/.db/943744/data/1/120.json +1 -0
  518. package/esm/.db/943744/data/1/123.json +1 -0
  519. package/esm/.db/955716/data/1/123.json +1 -0
  520. package/esm/.db/956030/data/1/123.json +1 -0
  521. package/esm/.db/956395/data/1/120.json +1 -0
  522. package/esm/.db/956395/data/1/123.json +1 -0
  523. package/esm/.db/956498/data/1/123.json +1 -0
  524. package/esm/.db/957435/data/1/123.json +1 -0
  525. package/esm/.db/960302/data/1/example.json +1 -0
  526. package/esm/.db/964149/data/0/0.json +1 -0
  527. package/esm/.db/964149/data/1/120.json +1 -0
  528. package/esm/.db/964149/data/1/123.json +1 -0
  529. package/esm/.db/965213/data/0/13315.json +1 -0
  530. package/esm/.db/965213/data/1/120.json +1 -0
  531. package/esm/.db/965213/data/1/123.json +1 -0
  532. package/esm/.db/966774/data/1/120.json +1 -0
  533. package/esm/.db/966774/data/1/123.json +1 -0
  534. package/esm/.db/972484/data/1/123.json +1 -0
  535. package/esm/.db/973155/data/1/123.json +1 -0
  536. package/esm/.db/973642/data/1/123.json +1 -0
  537. package/esm/.db/975603/data/0/0.json +1 -0
  538. package/esm/.db/975603/data/1/120.json +1 -0
  539. package/esm/.db/975603/data/1/123.json +1 -0
  540. package/esm/.db/979812/data/0/13315.json +1 -0
  541. package/esm/.db/979812/data/1/120.json +1 -0
  542. package/esm/.db/979812/data/1/123.json +1 -0
  543. package/esm/.db/985666/data/1/example.json +1 -0
  544. package/esm/.db/986784/data/0/0.json +1 -0
  545. package/esm/.db/986784/data/1/120.json +1 -0
  546. package/esm/.db/986784/data/1/123.json +1 -0
  547. package/esm/.db/988463/data/1/120.json +1 -0
  548. package/esm/.db/988463/data/1/123.json +1 -0
  549. package/esm/.db/990386/data/1/120.json +1 -0
  550. package/esm/.db/990386/data/1/123.json +1 -0
  551. package/esm/.db/994488/data/0/0.json +1 -0
  552. package/esm/.db/994488/data/1/120.json +1 -0
  553. package/esm/.db/994488/data/1/123.json +1 -0
  554. package/esm/.db/999130/data/ppl/bob.json +1 -0
  555. package/esm/aoconnect-base.js +1 -1
  556. package/esm/armem-base.js +24 -9
  557. package/esm/armem-web.js +3 -3
  558. package/esm/armem.js +2 -2
  559. package/esm/bar.js +15 -3
  560. package/esm/compress.js +0 -1
  561. package/esm/lua/weavedb_mock.lua +3 -2
  562. package/esm/waosm/README.md +10 -8
  563. package/esm/waosm/waosm.d.ts +6 -12
  564. package/esm/waosm/waosm.js +11 -35
  565. package/esm/waosm/waosm_bg.wasm +0 -0
  566. package/esm/waosm/waosm_bg.wasm.d.ts +4 -6
  567. package/esm/waosm-node/README.md +10 -8
  568. package/esm/waosm-node/waosm.d.ts +2 -6
  569. package/esm/waosm-node/waosm_bg.js +11 -35
  570. package/esm/waosm-node/waosm_bg.wasm +0 -0
  571. package/esm/waosm-node/waosm_bg.wasm.d.ts +4 -6
  572. package/esm/weavedb.js +92 -12
  573. package/package.json +2 -1
  574. package/esm/waosm/package.json +0 -14
@@ -1301,7 +1301,7 @@ var _default = exports["default"] = function _default() {
1301
1301
  break;
1302
1302
  }
1303
1303
  _context11.next = 25;
1304
- return mem.getWasm(p.modulea);
1304
+ return mem.getWasm(p.module);
1305
1305
  case 25:
1306
1306
  _yield$mem$getWasm3 = _context11.sent;
1307
1307
  format = _yield$mem$getWasm3.format;
package/cjs/armem-base.js CHANGED
@@ -25,6 +25,27 @@ function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r),
25
25
  function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
26
26
  function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
27
27
  var Arweave = (_Arweave$default = _arweave["default"]["default"]) !== null && _Arweave$default !== void 0 ? _Arweave$default : _arweave["default"];
28
+ function eq(buf1, buf2) {
29
+ var chunkSize = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 1024 * 1024;
30
+ if (buf1.byteLength !== buf2.byteLength) return false;
31
+ var view1 = new Uint8Array(buf1);
32
+ var view2 = new Uint8Array(buf2);
33
+ var _loop = function _loop() {
34
+ var slice1 = view1.subarray(i, i + chunkSize);
35
+ var slice2 = view2.subarray(i, i + chunkSize);
36
+ if (!slice1.every(function (val, idx) {
37
+ return val === slice2[idx];
38
+ })) return {
39
+ v: false
40
+ };
41
+ },
42
+ _ret;
43
+ for (var i = 0; i < buf1.byteLength; i += chunkSize) {
44
+ _ret = _loop();
45
+ if (_ret) return _ret.v;
46
+ }
47
+ return true;
48
+ }
28
49
  var ArMemBase = exports["default"] = /*#__PURE__*/function () {
29
50
  function ArMemBase() {
30
51
  var _this = this;
@@ -36,13 +57,11 @@ var ArMemBase = exports["default"] = /*#__PURE__*/function () {
36
57
  scheduler = _ref.scheduler,
37
58
  cache = _ref.cache,
38
59
  init = _ref.init,
39
- Compressor = _ref.Compressor,
40
- Decompressor = _ref.Decompressor;
60
+ Waosm = _ref.Waosm;
41
61
  _classCallCheck(this, ArMemBase);
42
62
  this.__type__ = "mem";
43
63
  this._init = init;
44
- this.Compressor = Compressor;
45
- this.Decompressor = Decompressor;
64
+ this.Waosm = Waosm;
46
65
  this.isInit = false;
47
66
  this.keyInit = false;
48
67
  this.keys = {};
@@ -139,35 +158,36 @@ var ArMemBase = exports["default"] = /*#__PURE__*/function () {
139
158
  _context3.next = 7;
140
159
  return this.db.put("".concat(key), this[key]);
141
160
  case 7:
142
- _context3.next = 21;
161
+ _context3.next = 22;
143
162
  break;
144
163
  case 9:
145
164
  (_this$key2 = this[key]) !== null && _this$key2 !== void 0 ? _this$key2 : this[key] = {};
146
165
  this[key][field] = val;
147
166
  if (!this.db) {
148
- _context3.next = 21;
167
+ _context3.next = 22;
149
168
  break;
150
169
  }
151
170
  if (!(key === "env")) {
152
- _context3.next = 19;
171
+ _context3.next = 20;
153
172
  break;
154
173
  }
155
174
  memory = val.memory;
156
175
  try {
157
- memory = Array.from(this.compressor.compress(val.memory));
176
+ memory = this.waosm.compress(val.memory);
158
177
  } catch (e) {
159
178
  console.log(e);
160
179
  memory = (0, _compress.compress)(val.memory);
161
180
  }
162
- _context3.next = 17;
181
+ this[key][field].original_size = val.memory.length;
182
+ _context3.next = 18;
163
183
  return this.db.put("".concat(key, ".").concat(field), (0, _ramda.assoc)("memory", memory, this[key][field]));
164
- case 17:
165
- _context3.next = 21;
184
+ case 18:
185
+ _context3.next = 22;
166
186
  break;
167
- case 19:
168
- _context3.next = 21;
187
+ case 20:
188
+ _context3.next = 22;
169
189
  return this.db.put("".concat(key, ".").concat(field), this[key][field]);
170
- case 21:
190
+ case 22:
171
191
  case "end":
172
192
  return _context3.stop();
173
193
  }
@@ -310,136 +330,136 @@ var ArMemBase = exports["default"] = /*#__PURE__*/function () {
310
330
  _context5.next = 6;
311
331
  return this._init();
312
332
  case 6:
313
- this.compressor = new this.Compressor();
314
- this.decompressor = new this.Decompressor();
333
+ this.waosm = new this.Waosm();
315
334
  if (!this.db) {
316
- _context5.next = 59;
335
+ _context5.next = 58;
317
336
  break;
318
337
  }
319
338
  _i = 0, _arr = ["height", "blocks"];
320
- case 10:
339
+ case 9:
321
340
  if (!(_i < _arr.length)) {
322
- _context5.next = 18;
341
+ _context5.next = 17;
323
342
  break;
324
343
  }
325
344
  v = _arr[_i];
326
- _context5.next = 14;
345
+ _context5.next = 13;
327
346
  return this.get(v);
328
- case 14:
347
+ case 13:
329
348
  this[v] = _context5.sent;
330
- case 15:
349
+ case 14:
331
350
  _i++;
332
- _context5.next = 10;
351
+ _context5.next = 9;
333
352
  break;
334
- case 18:
353
+ case 17:
335
354
  _i2 = 0, _arr2 = ["items", "txs", "env", "modules", "wasms", "addrmap", "blockmap", "modmap", "msgs"];
336
- case 19:
355
+ case 18:
337
356
  if (!(_i2 < _arr2.length)) {
338
- _context5.next = 57;
357
+ _context5.next = 56;
339
358
  break;
340
359
  }
341
360
  _v = _arr2[_i2];
342
361
  (_this$_v = this[_v]) !== null && _this$_v !== void 0 ? _this$_v : this[_v] = {};
343
- _context5.next = 24;
362
+ _context5.next = 23;
344
363
  return this.db.getKeys({
345
364
  start: _v,
346
365
  end: _v + "a"
347
366
  });
348
- case 24:
367
+ case 23:
349
368
  items = _context5.sent;
350
369
  _iterator = _createForOfIteratorHelper(items || []);
351
- _context5.prev = 26;
370
+ _context5.prev = 25;
352
371
  _iterator.s();
353
- case 28:
372
+ case 27:
354
373
  if ((_step = _iterator.n()).done) {
355
- _context5.next = 46;
374
+ _context5.next = 45;
356
375
  break;
357
376
  }
358
377
  v2 = _step.value;
359
378
  key = v2.split(".")[0];
360
379
  field = v2.split(".")[1];
361
380
  if (!(key === _v)) {
362
- _context5.next = 44;
381
+ _context5.next = 43;
363
382
  break;
364
383
  }
365
384
  if (!key.match(/^env/)) {
366
- _context5.next = 41;
385
+ _context5.next = 40;
367
386
  break;
368
387
  }
369
- _context5.next = 36;
388
+ _context5.next = 35;
370
389
  return this.db.get(v2);
371
- case 36:
390
+ case 35:
372
391
  v3 = _context5.sent;
373
- if ((0, _ramda.is)(Array, v3.memory)) {
392
+ if ((0, _ramda.is)(Uint8Array, v3.memory)) {
374
393
  try {
375
- v3.memory = this.decompressor.decompress(v3.memory);
394
+ v3.memory = this.waosm.decompress(v3.memory, v3.original_size);
395
+ console.log(v3);
376
396
  } catch (e) {
377
397
  console.log(e);
378
398
  v3.memory = (0, _compress.decompress)(v3.memory);
379
399
  }
380
400
  }
381
401
  this[_v][field] = v3;
382
- _context5.next = 44;
383
- break;
384
- case 41:
385
402
  _context5.next = 43;
403
+ break;
404
+ case 40:
405
+ _context5.next = 42;
386
406
  return this.db.get(v2);
387
- case 43:
407
+ case 42:
388
408
  this[_v][field] = _context5.sent;
389
- case 44:
390
- _context5.next = 28;
409
+ case 43:
410
+ _context5.next = 27;
391
411
  break;
392
- case 46:
393
- _context5.next = 51;
412
+ case 45:
413
+ _context5.next = 50;
394
414
  break;
395
- case 48:
396
- _context5.prev = 48;
397
- _context5.t0 = _context5["catch"](26);
415
+ case 47:
416
+ _context5.prev = 47;
417
+ _context5.t0 = _context5["catch"](25);
398
418
  _iterator.e(_context5.t0);
399
- case 51:
400
- _context5.prev = 51;
419
+ case 50:
420
+ _context5.prev = 50;
401
421
  _iterator.f();
402
- return _context5.finish(51);
403
- case 54:
422
+ return _context5.finish(50);
423
+ case 53:
404
424
  _i2++;
405
- _context5.next = 19;
425
+ _context5.next = 18;
406
426
  break;
407
- case 57:
408
- _context5.next = 75;
427
+ case 56:
428
+ _context5.next = 74;
409
429
  break;
410
- case 59:
430
+ case 58:
411
431
  _i3 = 0, _arr3 = ["height", "blocks"];
412
- case 60:
432
+ case 59:
413
433
  if (!(_i3 < _arr3.length)) {
414
- _context5.next = 67;
434
+ _context5.next = 66;
415
435
  break;
416
436
  }
417
437
  _v2 = _arr3[_i3];
418
- _context5.next = 64;
438
+ _context5.next = 63;
419
439
  return this.set(this[_v2], _v2);
420
- case 64:
440
+ case 63:
421
441
  _i3++;
422
- _context5.next = 60;
442
+ _context5.next = 59;
423
443
  break;
424
- case 67:
444
+ case 66:
425
445
  _i4 = 0, _arr4 = ["modules", "wasms", "addrmap", "blockmap"];
426
- case 68:
446
+ case 67:
427
447
  if (!(_i4 < _arr4.length)) {
428
- _context5.next = 75;
448
+ _context5.next = 74;
429
449
  break;
430
450
  }
431
451
  _v3 = _arr4[_i4];
432
- _context5.next = 72;
452
+ _context5.next = 71;
433
453
  return this.putAll(_v3);
434
- case 72:
454
+ case 71:
435
455
  _i4++;
436
- _context5.next = 68;
456
+ _context5.next = 67;
437
457
  break;
438
- case 75:
458
+ case 74:
439
459
  case "end":
440
460
  return _context5.stop();
441
461
  }
442
- }, _callee5, this, [[26, 48, 51, 54]]);
462
+ }, _callee5, this, [[25, 47, 50, 53]]);
443
463
  }));
444
464
  function init() {
445
465
  return _init.apply(this, arguments);
package/cjs/armem-web.js CHANGED
@@ -37,10 +37,9 @@ var ArMem = exports["default"] = /*#__PURE__*/function (_Base) {
37
37
  _classCallCheck(this, ArMem);
38
38
  _this = _callSuper(this, ArMem, [_objectSpread(_objectSpread({}, args), {}, {
39
39
  init: _waosm["default"],
40
- Compressor: _waosm.Compressor,
41
- Decompressor: _waosm.Decompressor
40
+ Waosm: _waosm.Waosm
42
41
  })]);
43
- //this.db = db(this)
42
+ _this.db = (0, _lfdb["default"])(_this);
44
43
  _this.initSync();
45
44
  return _this;
46
45
  }
package/cjs/armem.js CHANGED
@@ -39,8 +39,7 @@ var ArMem = exports["default"] = /*#__PURE__*/function (_Base) {
39
39
  _classCallCheck(this, ArMem);
40
40
  var cache = args.cache;
41
41
  _this = _callSuper(this, ArMem, [_objectSpread(_objectSpread({}, args), {}, {
42
- Compressor: _waosmNode.Compressor,
43
- Decompressor: _waosmNode.Decompressor
42
+ Waosm: _waosmNode.Waosm
44
43
  })]);
45
44
  if (cache) _this.db = (0, _lmdb.open)({
46
45
  path: cache,
package/cjs/bar.js CHANGED
@@ -202,7 +202,7 @@ var AR = /*#__PURE__*/function (_MAR) {
202
202
  key: "postItems",
203
203
  value: function () {
204
204
  var _postItems = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee4(items, jwk) {
205
- var err, _yield$this$checkWall2, _items, _iterator2, _step2, di, data_size, data_type, _iterator3, _step3, _t, owner, data, _item, bundle, tx;
205
+ var err, _yield$this$checkWall2, _items, _iterator2, _step2, di, data_size, data_type, _iterator3, _step3, _t, owner, _item, bundle, tx;
206
206
  return _regeneratorRuntime().wrap(function _callee4$(_context4) {
207
207
  while (1) switch (_context4.prev = _context4.next) {
208
208
  case 0:
@@ -230,7 +230,7 @@ var AR = /*#__PURE__*/function (_MAR) {
230
230
  _iterator2.s();
231
231
  case 13:
232
232
  if ((_step2 = _iterator2.n()).done) {
233
- _context4.next = 50;
233
+ _context4.next = 49;
234
234
  break;
235
235
  }
236
236
  di = _step2.value;
@@ -261,7 +261,6 @@ var AR = /*#__PURE__*/function (_MAR) {
261
261
  address: owner
262
262
  }, "addrmap", owner);
263
263
  case 27:
264
- data = di.data;
265
264
  _context4.t0 = {
266
265
  size: data_size,
267
266
  type: data_type
@@ -269,14 +268,14 @@ var AR = /*#__PURE__*/function (_MAR) {
269
268
  _context4.t1 = di.anchor;
270
269
  _context4.t2 = di.signature;
271
270
  _context4.t3 = di.target;
272
- _context4.next = 34;
271
+ _context4.next = 33;
273
272
  return di.id;
274
- case 34:
273
+ case 33:
275
274
  _context4.t4 = _context4.sent;
276
275
  _context4.t5 = di;
277
276
  _context4.t6 = owner;
278
277
  _context4.t7 = di.tags;
279
- _context4.t8 = data;
278
+ _context4.t8 = di.data;
280
279
  _item = {
281
280
  _data: _context4.t0,
282
281
  anchor: _context4.t1,
@@ -290,50 +289,50 @@ var AR = /*#__PURE__*/function (_MAR) {
290
289
  };
291
290
  _context4.t9 = this.mem;
292
291
  _context4.t10 = _item;
293
- _context4.next = 44;
292
+ _context4.next = 43;
294
293
  return di.id;
295
- case 44:
294
+ case 43:
296
295
  _context4.t11 = _context4.sent;
297
- _context4.next = 47;
296
+ _context4.next = 46;
298
297
  return _context4.t9.set.call(_context4.t9, _context4.t10, "txs", _context4.t11);
299
- case 47:
298
+ case 46:
300
299
  _items.push(_item);
301
- case 48:
300
+ case 47:
302
301
  _context4.next = 13;
303
302
  break;
304
- case 50:
305
- _context4.next = 55;
303
+ case 49:
304
+ _context4.next = 54;
306
305
  break;
307
- case 52:
308
- _context4.prev = 52;
306
+ case 51:
307
+ _context4.prev = 51;
309
308
  _context4.t12 = _context4["catch"](11);
310
309
  _iterator2.e(_context4.t12);
311
- case 55:
312
- _context4.prev = 55;
310
+ case 54:
311
+ _context4.prev = 54;
313
312
  _iterator2.f();
314
- return _context4.finish(55);
315
- case 58:
316
- _context4.next = 60;
313
+ return _context4.finish(54);
314
+ case 57:
315
+ _context4.next = 59;
317
316
  return (0, _arbundles.bundleAndSignData)(items, new _arbundles.ArweaveSigner(jwk));
318
- case 60:
317
+ case 59:
319
318
  bundle = _context4.sent;
320
- _context4.next = 63;
319
+ _context4.next = 62;
321
320
  return this.mem.arweave.createTransaction({
322
321
  data: bundle.binary
323
322
  }, jwk);
324
- case 63:
323
+ case 62:
325
324
  tx = _context4.sent;
326
325
  tx.addTag("Bundle-Format", "binary");
327
326
  tx.addTag("Bundle-Version", "2.0.0");
328
- _context4.next = 68;
327
+ _context4.next = 67;
329
328
  return this.postTx(tx, jwk, _items);
330
- case 68:
329
+ case 67:
331
330
  return _context4.abrupt("return", _context4.sent);
332
- case 69:
331
+ case 68:
333
332
  case "end":
334
333
  return _context4.stop();
335
334
  }
336
- }, _callee4, this, [[11, 52, 55, 58]]);
335
+ }, _callee4, this, [[11, 51, 54, 57]]);
337
336
  }));
338
337
  function postItems(_x4, _x5) {
339
338
  return _postItems.apply(this, arguments);
@@ -642,7 +641,12 @@ var AR = /*#__PURE__*/function (_MAR) {
642
641
  if ((tx === null || tx === void 0 ? void 0 : tx.format) === 2 && _data) {
643
642
  _data = Buffer.from(_data, "base64");
644
643
  } else if (_data) {
645
- _data = Buffer.from(_base64url["default"].decode(_data));
644
+ // need to check production
645
+ if (tx._data.type === "") {
646
+ _data = tobuff(_data);
647
+ } else {
648
+ _data = Buffer.from(_base64url["default"].decode(_data));
649
+ }
646
650
  }
647
651
  isBuf = (0, _ramda.is)(Uint8Array, _data) || (0, _ramda.is)(ArrayBuffer, _data);
648
652
  isStr = (0, _ramda.is)(String, _data);
@@ -679,4 +683,9 @@ var AR = /*#__PURE__*/function (_MAR) {
679
683
  }()
680
684
  }]);
681
685
  }(_ar["default"]);
686
+ function tobuff(base64url) {
687
+ var base64 = base64url.replace(/-/g, "+").replace(/_/g, "/");
688
+ var paddedBase64 = base64.padEnd(base64.length + (4 - base64.length % 4) % 4, "=");
689
+ return Buffer.from(paddedBase64, "base64");
690
+ }
682
691
  var _default = exports["default"] = AR;
package/cjs/compress.js CHANGED
@@ -135,7 +135,6 @@ var decompress = exports.decompress = function decompress(d) {
135
135
  nums.push(third);
136
136
  elm = second - 1;
137
137
  } else elm = second;
138
- console.log(flag, first, second, third, elm, nums);
139
138
  } else if (sum === 0) {
140
139
  elm -= 1;
141
140
  nums.push(v);
@@ -1,10 +1,11 @@
1
1
  local json = require("json")
2
+
2
3
  function rollup (id)
3
4
  local file = io.open("/rollup/" .. id)
4
5
  local data = nil
5
6
  if file then data = file:read(file:seek('end')) end
6
7
  file:close()
7
- return data
8
+ return true
8
9
  end
9
10
 
10
11
  function get (col, doc)
@@ -27,7 +28,7 @@ Handlers.add(
27
28
  "Finalize",
28
29
  "Finalize",
29
30
  function (msg)
30
- local data = json.decode(rollup(msg.TXID))
31
+ rollup(msg.TXID)
31
32
  msg.reply({ Data = "finalized!" })
32
33
  end
33
34
  )
@@ -3,7 +3,7 @@
3
3
  Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
- exports["default"] = exports.Decompressor = exports.Compressor = void 0;
6
+ exports["default"] = exports.Waosm = void 0;
7
7
  exports.initSync = initSync;
8
8
  function _regeneratorRuntime() { "use strict"; /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */ _regeneratorRuntime = function _regeneratorRuntime() { return e; }; var t, e = {}, r = Object.prototype, n = r.hasOwnProperty, o = Object.defineProperty || function (t, e, r) { t[e] = r.value; }, i = "function" == typeof Symbol ? Symbol : {}, a = i.iterator || "@@iterator", c = i.asyncIterator || "@@asyncIterator", u = i.toStringTag || "@@toStringTag"; function define(t, e, r) { return Object.defineProperty(t, e, { value: r, enumerable: !0, configurable: !0, writable: !0 }), t[e]; } try { define({}, ""); } catch (t) { define = function define(t, e, r) { return t[e] = r; }; } function wrap(t, e, r, n) { var i = e && e.prototype instanceof Generator ? e : Generator, a = Object.create(i.prototype), c = new Context(n || []); return o(a, "_invoke", { value: makeInvokeMethod(t, r, c) }), a; } function tryCatch(t, e, r) { try { return { type: "normal", arg: t.call(e, r) }; } catch (t) { return { type: "throw", arg: t }; } } e.wrap = wrap; var h = "suspendedStart", l = "suspendedYield", f = "executing", s = "completed", y = {}; function Generator() {} function GeneratorFunction() {} function GeneratorFunctionPrototype() {} var p = {}; define(p, a, function () { return this; }); var d = Object.getPrototypeOf, v = d && d(d(values([]))); v && v !== r && n.call(v, a) && (p = v); var g = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(p); function defineIteratorMethods(t) { ["next", "throw", "return"].forEach(function (e) { define(t, e, function (t) { return this._invoke(e, t); }); }); } function AsyncIterator(t, e) { function invoke(r, o, i, a) { var c = tryCatch(t[r], t, o); if ("throw" !== c.type) { var u = c.arg, h = u.value; return h && "object" == _typeof(h) && n.call(h, "__await") ? e.resolve(h.__await).then(function (t) { invoke("next", t, i, a); }, function (t) { invoke("throw", t, i, a); }) : e.resolve(h).then(function (t) { u.value = t, i(u); }, function (t) { return invoke("throw", t, i, a); }); } a(c.arg); } var r; o(this, "_invoke", { value: function value(t, n) { function callInvokeWithMethodAndArg() { return new e(function (e, r) { invoke(t, n, e, r); }); } return r = r ? r.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg(); } }); } function makeInvokeMethod(e, r, n) { var o = h; return function (i, a) { if (o === f) throw Error("Generator is already running"); if (o === s) { if ("throw" === i) throw a; return { value: t, done: !0 }; } for (n.method = i, n.arg = a;;) { var c = n.delegate; if (c) { var u = maybeInvokeDelegate(c, n); if (u) { if (u === y) continue; return u; } } if ("next" === n.method) n.sent = n._sent = n.arg;else if ("throw" === n.method) { if (o === h) throw o = s, n.arg; n.dispatchException(n.arg); } else "return" === n.method && n.abrupt("return", n.arg); o = f; var p = tryCatch(e, r, n); if ("normal" === p.type) { if (o = n.done ? s : l, p.arg === y) continue; return { value: p.arg, done: n.done }; } "throw" === p.type && (o = s, n.method = "throw", n.arg = p.arg); } }; } function maybeInvokeDelegate(e, r) { var n = r.method, o = e.iterator[n]; if (o === t) return r.delegate = null, "throw" === n && e.iterator["return"] && (r.method = "return", r.arg = t, maybeInvokeDelegate(e, r), "throw" === r.method) || "return" !== n && (r.method = "throw", r.arg = new TypeError("The iterator does not provide a '" + n + "' method")), y; var i = tryCatch(o, e.iterator, r.arg); if ("throw" === i.type) return r.method = "throw", r.arg = i.arg, r.delegate = null, y; var a = i.arg; return a ? a.done ? (r[e.resultName] = a.value, r.next = e.nextLoc, "return" !== r.method && (r.method = "next", r.arg = t), r.delegate = null, y) : a : (r.method = "throw", r.arg = new TypeError("iterator result is not an object"), r.delegate = null, y); } function pushTryEntry(t) { var e = { tryLoc: t[0] }; 1 in t && (e.catchLoc = t[1]), 2 in t && (e.finallyLoc = t[2], e.afterLoc = t[3]), this.tryEntries.push(e); } function resetTryEntry(t) { var e = t.completion || {}; e.type = "normal", delete e.arg, t.completion = e; } function Context(t) { this.tryEntries = [{ tryLoc: "root" }], t.forEach(pushTryEntry, this), this.reset(!0); } function values(e) { if (e || "" === e) { var r = e[a]; if (r) return r.call(e); if ("function" == typeof e.next) return e; if (!isNaN(e.length)) { var o = -1, i = function next() { for (; ++o < e.length;) if (n.call(e, o)) return next.value = e[o], next.done = !1, next; return next.value = t, next.done = !0, next; }; return i.next = i; } } throw new TypeError(_typeof(e) + " is not iterable"); } return GeneratorFunction.prototype = GeneratorFunctionPrototype, o(g, "constructor", { value: GeneratorFunctionPrototype, configurable: !0 }), o(GeneratorFunctionPrototype, "constructor", { value: GeneratorFunction, configurable: !0 }), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, u, "GeneratorFunction"), e.isGeneratorFunction = function (t) { var e = "function" == typeof t && t.constructor; return !!e && (e === GeneratorFunction || "GeneratorFunction" === (e.displayName || e.name)); }, e.mark = function (t) { return Object.setPrototypeOf ? Object.setPrototypeOf(t, GeneratorFunctionPrototype) : (t.__proto__ = GeneratorFunctionPrototype, define(t, u, "GeneratorFunction")), t.prototype = Object.create(g), t; }, e.awrap = function (t) { return { __await: t }; }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, c, function () { return this; }), e.AsyncIterator = AsyncIterator, e.async = function (t, r, n, o, i) { void 0 === i && (i = Promise); var a = new AsyncIterator(wrap(t, r, n, o), i); return e.isGeneratorFunction(r) ? a : a.next().then(function (t) { return t.done ? t.value : a.next(); }); }, defineIteratorMethods(g), define(g, u, "Generator"), define(g, a, function () { return this; }), define(g, "toString", function () { return "[object Generator]"; }), e.keys = function (t) { var e = Object(t), r = []; for (var n in e) r.push(n); return r.reverse(), function next() { for (; r.length;) { var t = r.pop(); if (t in e) return next.value = t, next.done = !1, next; } return next.done = !0, next; }; }, e.values = values, Context.prototype = { constructor: Context, reset: function reset(e) { if (this.prev = 0, this.next = 0, this.sent = this._sent = t, this.done = !1, this.delegate = null, this.method = "next", this.arg = t, this.tryEntries.forEach(resetTryEntry), !e) for (var r in this) "t" === r.charAt(0) && n.call(this, r) && !isNaN(+r.slice(1)) && (this[r] = t); }, stop: function stop() { this.done = !0; var t = this.tryEntries[0].completion; if ("throw" === t.type) throw t.arg; return this.rval; }, dispatchException: function dispatchException(e) { if (this.done) throw e; var r = this; function handle(n, o) { return a.type = "throw", a.arg = e, r.next = n, o && (r.method = "next", r.arg = t), !!o; } for (var o = this.tryEntries.length - 1; o >= 0; --o) { var i = this.tryEntries[o], a = i.completion; if ("root" === i.tryLoc) return handle("end"); if (i.tryLoc <= this.prev) { var c = n.call(i, "catchLoc"), u = n.call(i, "finallyLoc"); if (c && u) { if (this.prev < i.catchLoc) return handle(i.catchLoc, !0); if (this.prev < i.finallyLoc) return handle(i.finallyLoc); } else if (c) { if (this.prev < i.catchLoc) return handle(i.catchLoc, !0); } else { if (!u) throw Error("try statement without catch or finally"); if (this.prev < i.finallyLoc) return handle(i.finallyLoc); } } } }, abrupt: function abrupt(t, e) { for (var r = this.tryEntries.length - 1; r >= 0; --r) { var o = this.tryEntries[r]; if (o.tryLoc <= this.prev && n.call(o, "finallyLoc") && this.prev < o.finallyLoc) { var i = o; break; } } i && ("break" === t || "continue" === t) && i.tryLoc <= e && e <= i.finallyLoc && (i = null); var a = i ? i.completion : {}; return a.type = t, a.arg = e, i ? (this.method = "next", this.next = i.finallyLoc, y) : this.complete(a); }, complete: function complete(t, e) { if ("throw" === t.type) throw t.arg; return "break" === t.type || "continue" === t.type ? this.next = t.arg : "return" === t.type ? (this.rval = this.arg = t.arg, this.method = "return", this.next = "end") : "normal" === t.type && e && (this.next = e), y; }, finish: function finish(t) { for (var e = this.tryEntries.length - 1; e >= 0; --e) { var r = this.tryEntries[e]; if (r.finallyLoc === t) return this.complete(r.completion, r.afterLoc), resetTryEntry(r), y; } }, "catch": function _catch(t) { for (var e = this.tryEntries.length - 1; e >= 0; --e) { var r = this.tryEntries[e]; if (r.tryLoc === t) { var n = r.completion; if ("throw" === n.type) { var o = n.arg; resetTryEntry(r); } return o; } } throw Error("illegal catch attempt"); }, delegateYield: function delegateYield(e, r, n) { return this.delegate = { iterator: values(e), resultName: r, nextLoc: n }, "next" === this.method && (this.arg = t), y; } }, e; }
9
9
  function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
@@ -68,86 +68,57 @@ function passArray8ToWasm0(arg, malloc) {
68
68
  WASM_VECTOR_LEN = arg.length;
69
69
  return ptr;
70
70
  }
71
- var CompressorFinalization = typeof FinalizationRegistry === 'undefined' ? {
71
+ var WaosmFinalization = typeof FinalizationRegistry === 'undefined' ? {
72
72
  register: function register() {},
73
73
  unregister: function unregister() {}
74
74
  } : new FinalizationRegistry(function (ptr) {
75
- return wasm.__wbg_compressor_free(ptr >>> 0, 1);
75
+ return wasm.__wbg_waosm_free(ptr >>> 0, 1);
76
76
  });
77
- var Compressor = exports.Compressor = /*#__PURE__*/function () {
78
- function Compressor() {
79
- _classCallCheck(this, Compressor);
80
- var ret = wasm.compressor_new();
77
+ var Waosm = exports.Waosm = /*#__PURE__*/function () {
78
+ function Waosm() {
79
+ _classCallCheck(this, Waosm);
80
+ var ret = wasm.waosm_new();
81
81
  this.__wbg_ptr = ret >>> 0;
82
- CompressorFinalization.register(this, this.__wbg_ptr, this);
82
+ WaosmFinalization.register(this, this.__wbg_ptr, this);
83
83
  return this;
84
84
  }
85
85
  /**
86
86
  * @param {Uint8Array} data
87
87
  * @returns {Uint8Array}
88
88
  */
89
- return _createClass(Compressor, [{
89
+ return _createClass(Waosm, [{
90
90
  key: "__destroy_into_raw",
91
91
  value: function __destroy_into_raw() {
92
92
  var ptr = this.__wbg_ptr;
93
93
  this.__wbg_ptr = 0;
94
- CompressorFinalization.unregister(this);
94
+ WaosmFinalization.unregister(this);
95
95
  return ptr;
96
96
  }
97
97
  }, {
98
98
  key: "free",
99
99
  value: function free() {
100
100
  var ptr = this.__destroy_into_raw();
101
- wasm.__wbg_compressor_free(ptr, 0);
101
+ wasm.__wbg_waosm_free(ptr, 0);
102
102
  }
103
103
  }, {
104
104
  key: "compress",
105
105
  value: function compress(data) {
106
106
  var ptr0 = passArray8ToWasm0(data, wasm.__wbindgen_malloc);
107
107
  var len0 = WASM_VECTOR_LEN;
108
- var ret = wasm.compressor_compress(this.__wbg_ptr, ptr0, len0);
108
+ var ret = wasm.waosm_compress(this.__wbg_ptr, ptr0, len0);
109
109
  return takeObject(ret);
110
110
  }
111
- }]);
112
- }();
113
- var DecompressorFinalization = typeof FinalizationRegistry === 'undefined' ? {
114
- register: function register() {},
115
- unregister: function unregister() {}
116
- } : new FinalizationRegistry(function (ptr) {
117
- return wasm.__wbg_decompressor_free(ptr >>> 0, 1);
118
- });
119
- var Decompressor = exports.Decompressor = /*#__PURE__*/function () {
120
- function Decompressor() {
121
- _classCallCheck(this, Decompressor);
122
- var ret = wasm.compressor_new();
123
- this.__wbg_ptr = ret >>> 0;
124
- DecompressorFinalization.register(this, this.__wbg_ptr, this);
125
- return this;
126
- }
127
- /**
128
- * @param {Uint8Array} data
129
- * @returns {Uint8Array}
130
- */
131
- return _createClass(Decompressor, [{
132
- key: "__destroy_into_raw",
133
- value: function __destroy_into_raw() {
134
- var ptr = this.__wbg_ptr;
135
- this.__wbg_ptr = 0;
136
- DecompressorFinalization.unregister(this);
137
- return ptr;
138
- }
139
- }, {
140
- key: "free",
141
- value: function free() {
142
- var ptr = this.__destroy_into_raw();
143
- wasm.__wbg_decompressor_free(ptr, 0);
144
- }
111
+ /**
112
+ * @param {Uint8Array} data
113
+ * @param {number} decompressed_size
114
+ * @returns {Uint8Array}
115
+ */
145
116
  }, {
146
117
  key: "decompress",
147
- value: function decompress(data) {
118
+ value: function decompress(data, decompressed_size) {
148
119
  var ptr0 = passArray8ToWasm0(data, wasm.__wbindgen_malloc);
149
120
  var len0 = WASM_VECTOR_LEN;
150
- var ret = wasm.decompressor_decompress(this.__wbg_ptr, ptr0, len0);
121
+ var ret = wasm.waosm_decompress(this.__wbg_ptr, ptr0, len0, decompressed_size);
151
122
  return takeObject(ret);
152
123
  }
153
124
  }]);