nolo-cli 0.108.0-alpha.1 → 0.108.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 (608) hide show
  1. package/README.md +1 -1
  2. package/{_executeModel-GTYLDSJW.js → _executeModel-RVAKYU4J.js} +128 -83
  3. package/action-RHUT4OHH.js +23 -0
  4. package/{addContentAction-MB2HHMDZ.js → addContentAction-BQ3LJLUW.js} +19 -13
  5. package/{addDialogAgentAction-MCEABSBA.js → addDialogAgentAction-B6X7BXR4.js} +24 -20
  6. package/{agentDeleteCommand-OWYHN6D6.js → agentDeleteCommand-T5MDAOE7.js} +154 -67
  7. package/{agentEmailCommands-C6J2KUL2.js → agentEmailCommands-UWBQSKLI.js} +125 -104
  8. package/{agentGrantCommands-M3XFO6EN.js → agentGrantCommands-HOJ3JBBQ.js} +3 -3
  9. package/agentListCommands-2Q456VYS.js +800 -0
  10. package/{agentMachineCommands-UDEXV472.js → agentMachineCommands-FPJJ4DCF.js} +54 -57
  11. package/{agentProviderCommands-GNPTL5XR.js → agentProviderCommands-7PCGR77I.js} +97 -2
  12. package/{agentPullCommand-O5MPVJ5E.js → agentPullCommand-7GCDM4BK.js} +7 -7
  13. package/agentRecordCommands-3JGDR4NN.js +149 -0
  14. package/agentRunCommand-3NQOP3SD.js +179 -0
  15. package/{agentRunControl-AVJR4JW4.js → agentRunControl-2CDZNHXV.js} +10 -2
  16. package/{agentRuntimeLocal-KCMC2TBD.js → agentRuntimeLocal-SQUDRZWE.js} +42 -46
  17. package/{agentSlice-TNH7BSUC.js → agentSlice-R4W6MCEW.js} +22 -16
  18. package/{appDeleteCommands-JEPA3EWE.js → appDeleteCommands-CLLYGEBC.js} +55 -55
  19. package/{appDeployCommands-UTB76XFM.js → appDeployCommands-HY2NBNDQ.js} +64 -59
  20. package/{appDeployStatusCommands-LGHF2SBD.js → appDeployStatusCommands-SGO5GEXH.js} +53 -52
  21. package/{appGetCommands-PX2BFHOB.js → appGetCommands-ZPYK2N5D.js} +53 -52
  22. package/{appListCommands-BSMPTWKC.js → appListCommands-O2BHIMKS.js} +54 -55
  23. package/{authCommand-YW42YZA4.js → authCommand-GUIREPHK.js} +213 -72
  24. package/{authCommands-RGOGCPP6.js → authCommands-K3BDSTJ4.js} +10 -7
  25. package/{builtinSkillRegistry-FUAVTRVZ.js → builtinSkillRegistry-MUOUTRNJ.js} +13 -10
  26. package/{chromeCommands-FZYAU75D.js → chromeCommands-Z2WRJB7O.js} +290 -38
  27. package/{chromeOpsCommands-62P2Q2YB.js → chromeOpsCommands-YWYXZTIR.js} +157 -23
  28. package/{chunk-RRPWH4LX.js → chunk-26UZ2Y4Z.js} +26 -31
  29. package/{chunk-2F7RJC6L.js → chunk-2C47W7IJ.js} +1 -1
  30. package/{chunk-VLTIYV3X.js → chunk-2ECUZDEL.js} +37 -11
  31. package/{chunk-ALXHV7NK.js → chunk-2GGXHQIW.js} +43 -4
  32. package/{chunk-AHAHBQMU.js → chunk-2OMUAIKR.js} +2 -2
  33. package/{chunk-DHDMC6FO.js → chunk-3CZM6HGQ.js} +53 -23
  34. package/{chunk-BNGW5ASC.js → chunk-3LI5UCTU.js} +23 -3
  35. package/{chunk-FDTR4QJ6.js → chunk-3MZAGMYY.js} +48 -1
  36. package/chunk-3PVYUPXK.js +40 -0
  37. package/chunk-3SK3J3IF.js +929 -0
  38. package/chunk-4LCOCOR5.js +50 -0
  39. package/{chunk-V7E4PXQD.js → chunk-4MSYSHZD.js} +15 -7
  40. package/{chunk-2GRGFCF6.js → chunk-4VJAC32I.js} +2 -1
  41. package/{chunk-MP64VFGD.js → chunk-4XEYAFLY.js} +60 -18
  42. package/chunk-4YRTZIVN.js +871 -0
  43. package/{chunk-MC4XLIJ7.js → chunk-523DITKR.js} +1 -1
  44. package/{chunk-N7J63Q6C.js → chunk-56GBUMO5.js} +10 -1
  45. package/chunk-5MMAK75Q.js +15 -0
  46. package/{chunk-XT35TTFG.js → chunk-5WLADF62.js} +90 -36
  47. package/chunk-5XN3OSCT.js +164 -0
  48. package/chunk-6CCAXGFK.js +1712 -0
  49. package/{chunk-42V6BK2E.js → chunk-6MXDOUMH.js} +18 -36
  50. package/{chunk-QOKAKDPE.js → chunk-6Q7UTJKR.js} +6 -94
  51. package/{chunk-J4MOO56S.js → chunk-6VRWNU5J.js} +10 -2
  52. package/{chunk-GEPUP7OO.js → chunk-726TCFLQ.js} +5 -5
  53. package/chunk-7DPNBQSV.js +9 -0
  54. package/chunk-7YVPCIEN.js +1858 -0
  55. package/{chunk-AEOE4Z6Q.js → chunk-A337PRRR.js} +41 -17
  56. package/chunk-AGIM7IMJ.js +147 -0
  57. package/{chunk-ABQYVJBJ.js → chunk-AIZE5TDM.js} +3 -3
  58. package/{chunk-GPCZ7UXG.js → chunk-ALKCVCA5.js} +4 -4
  59. package/{chunk-5UTFL4QJ.js → chunk-APO5TOXO.js} +1 -1
  60. package/{chunk-E4MARS3Q.js → chunk-AU7AXHUL.js} +1 -1
  61. package/{chunk-PBA4UJBK.js → chunk-BFYDNHYW.js} +12 -12
  62. package/{chunk-QTGQ2LTL.js → chunk-BIAETTOB.js} +5 -9
  63. package/{chunk-OIVSQH2O.js → chunk-CGEK73JN.js} +311 -12
  64. package/chunk-CHOZJMJS.js +78 -0
  65. package/{chunk-GBRG75BQ.js → chunk-D2MDMY2M.js} +1 -0
  66. package/chunk-DGDGNYI5.js +593 -0
  67. package/{chunk-TRV2MIDW.js → chunk-EXAJ6DCR.js} +1 -0
  68. package/{chunk-PVZT43MU.js → chunk-EXR4XCFE.js} +17 -15
  69. package/chunk-EYLGAEB4.js +784 -0
  70. package/{chunk-3BMYXEUW.js → chunk-F2UJW3EK.js} +1 -1
  71. package/{chunk-P5EVSOPA.js → chunk-FWY6BHIJ.js} +363 -248
  72. package/{chunk-4MK3I7Y4.js → chunk-G23MQWLJ.js} +7 -128
  73. package/chunk-G6OOUQWJ.js +417 -0
  74. package/{chunk-WV42OMV7.js → chunk-GHZ2H2HJ.js} +11 -15
  75. package/chunk-GMZLP5DV.js +82 -0
  76. package/chunk-I42VC5KR.js +15 -0
  77. package/{chunk-GO3Z72MT.js → chunk-IFALJPEX.js} +71 -99
  78. package/{chunk-O6OSWFZQ.js → chunk-IHPDK6UD.js} +6 -0
  79. package/{chunk-UKWGR5SS.js → chunk-IJERIUXS.js} +242 -1146
  80. package/chunk-IRG4OKY6.js +843 -0
  81. package/{chunk-TYYSADX4.js → chunk-IUTHWIZQ.js} +269 -141
  82. package/{chunk-QDSINZM3.js → chunk-IXH3HKY2.js} +1 -22
  83. package/chunk-JJM3WS6W.js +132 -0
  84. package/{chunk-R7RHOSZU.js → chunk-KN6MKCS5.js} +1733 -465
  85. package/{chunk-SH43IESU.js → chunk-KQ7DAEZ7.js} +202 -32
  86. package/{chunk-6OZ36FXI.js → chunk-KY6GPQ7O.js} +36 -12
  87. package/{chunk-MRIHM22T.js → chunk-LAVSW2C2.js} +77 -144
  88. package/{chunk-NA35QHCF.js → chunk-LNEKN523.js} +10 -7
  89. package/chunk-LWLNLZC5.js +265 -0
  90. package/{chunk-I3TQJXQ7.js → chunk-MHD5JBSS.js} +131 -10
  91. package/{chunk-KQ4ONNQD.js → chunk-MW533QT3.js} +190 -8
  92. package/{chunk-62CATUYY.js → chunk-NLEJWKF5.js} +10532 -9444
  93. package/{chunk-BFU6C242.js → chunk-NMFV26UG.js} +1 -1
  94. package/{chunk-GQBOR3G6.js → chunk-NN4UUYGB.js} +18 -4
  95. package/{chunk-FZGV4FGK.js → chunk-NUHHBEJC.js} +378 -187
  96. package/chunk-OKARGYFT.js +15 -0
  97. package/{chunk-KQHGZWSV.js → chunk-OXME3PEE.js} +1 -1
  98. package/{chunk-53HEEOTT.js → chunk-OYBAT7RT.js} +113 -17
  99. package/chunk-P3SFAHIL.js +134 -0
  100. package/{chunk-7U6P3PHS.js → chunk-P6KLYCL3.js} +310 -95
  101. package/{chunk-XD2MJFUG.js → chunk-PBGO5AFD.js} +1 -1
  102. package/{chunk-EYAQT56M.js → chunk-PFEK4SA2.js} +13 -10
  103. package/{chunk-Z77CRGTW.js → chunk-PHHFVGOJ.js} +1 -1
  104. package/{chunk-3VNWWVKB.js → chunk-PJNFNEJE.js} +114 -28
  105. package/{chunk-RRM7AJ3M.js → chunk-PS6XSDHW.js} +35 -30
  106. package/{chunk-HVURBGF3.js → chunk-PWRS2SU2.js} +27 -9
  107. package/chunk-QFEW2ULV.js +42 -0
  108. package/chunk-QH2QSBGP.js +7546 -0
  109. package/{chunk-IIVGDG4I.js → chunk-QLQ573SU.js} +124 -77
  110. package/chunk-QQ56R7KS.js +88 -0
  111. package/chunk-QYPE3TS3.js +43 -0
  112. package/{chunk-VMFTFOWF.js → chunk-RLRYVSCD.js} +31 -14
  113. package/{chunk-VRTTFDBM.js → chunk-RNNWTMKT.js} +56 -63
  114. package/chunk-ROXFUKKL.js +13941 -0
  115. package/{chunk-DUK4OQNO.js → chunk-RRPT5CGT.js} +124 -703
  116. package/{chunk-JRQFUXY7.js → chunk-RRQQAG7W.js} +93 -24
  117. package/chunk-SJ3QFSQS.js +1147 -0
  118. package/chunk-SP4WCECG.js +95 -0
  119. package/{chunk-Q67DOFOO.js → chunk-SZC4REES.js} +212 -105
  120. package/{chunk-BYMV6QZG.js → chunk-TNIX77YM.js} +4 -0
  121. package/{chunk-UZGQNTVW.js → chunk-TSBCYK5F.js} +10 -8
  122. package/chunk-TY3TIUJK.js +89 -0
  123. package/chunk-U4STABYN.js +81 -0
  124. package/chunk-UEILX4EV.js +15 -0
  125. package/{chunk-YYLHWIW6.js → chunk-UKZX3NHN.js} +1 -1
  126. package/{chunk-EEGDMATE.js → chunk-UPFOOGHU.js} +90 -79
  127. package/{chunk-7S4YWN7P.js → chunk-V2UPLOXT.js} +4 -4
  128. package/{chunk-PQFHGD77.js → chunk-V5DCOM6G.js} +185 -16
  129. package/{chunk-LS2ZANRJ.js → chunk-V6WXGTUJ.js} +1 -1
  130. package/{chunk-6YTOJY35.js → chunk-VBG7GWWR.js} +253 -8
  131. package/{chunk-DVINR3PL.js → chunk-VEA7H5FG.js} +3 -3
  132. package/chunk-VIWDGTDA.js +8 -0
  133. package/chunk-VJVNU77E.js +83 -0
  134. package/{chunk-EADNWBAZ.js → chunk-VP3BINY7.js} +13 -0
  135. package/{chunk-HKNXJGEC.js → chunk-VSPO4S33.js} +47 -192
  136. package/{chunk-ETI2NYVF.js → chunk-W2N3ZC4P.js} +7 -7
  137. package/{chunk-EOARMOVD.js → chunk-W4S6OTSC.js} +6 -3
  138. package/{chunk-6Z7MY3V7.js → chunk-WCQNEMXG.js} +3 -3
  139. package/chunk-WJZOQR2J.js +151 -0
  140. package/{chunk-L7OXGGBN.js → chunk-WVES4PHL.js} +69 -57
  141. package/{chunk-BFDFRLLQ.js → chunk-WW2USJ3C.js} +3 -3
  142. package/{chunk-QWL5QZGU.js → chunk-X2VPXJZC.js} +20 -11
  143. package/chunk-X5BIY654.js +29 -0
  144. package/{chunk-Q554LLSI.js → chunk-XETG4RIX.js} +5 -5
  145. package/{chunk-3L2WKC3W.js → chunk-XPWGOTBQ.js} +8 -1
  146. package/{chunk-JEDZAO7L.js → chunk-YBNHPX4S.js} +257 -37
  147. package/{chunk-JPGCXHNM.js → chunk-YLMMECCH.js} +1 -1
  148. package/{chunk-CSC3CU4K.js → chunk-YSZQSZR2.js} +61 -11
  149. package/{chunk-6D6VBVEW.js → chunk-YVTZMLXZ.js} +96 -25
  150. package/{chunk-AG2AZ6GX.js → chunk-YZZLKXCQ.js} +1449 -1094
  151. package/chunk-ZRAU6T47.js +56 -0
  152. package/{chunk-ONXOABJR.js → chunk-ZWQUWF6W.js} +36 -1
  153. package/{cliExecutor-HG3S345O.js → cliExecutor-AWYR3T33.js} +1 -1
  154. package/commandRegistry-C25O2ARU.js +839 -0
  155. package/contentThunks-UWODFKX6.js +83 -0
  156. package/{cooldownCommands-REAWYVTY.js → cooldownCommands-JFKTYS2D.js} +2 -2
  157. package/{createAgentAutomationAction-OBH7GPW5.js → createAgentAutomationAction-SA4IA4CR.js} +51 -43
  158. package/createDialogAction-EDK5IMRG.js +75 -0
  159. package/{createPageAction-JJ7UUTWC.js → createPageAction-VYVF5EIZ.js} +60 -51
  160. package/{chunk-BVGTK7MR.js → cursorProvider-YGGNMVWX.js} +2751 -10185
  161. package/{dbSlice-A6C6H32X.js → dbSlice-JQFBMJ55.js} +18 -12
  162. package/{deleteFile-YG6QMJLU.js → deleteFile-6JWDDRVP.js} +9 -5
  163. package/dialogCommands-K734RXEQ.js +108 -0
  164. package/{dialogSlice-6Z2BPC3T.js → dialogSlice-EEDP6PJ3.js} +66 -41
  165. package/{dist-VODFSGNG.js → dist-NJC2W7I4.js} +61 -54
  166. package/{docCreateCommands-WRG2JLGM.js → docCreateCommands-N3KPGP4A.js} +51 -53
  167. package/{docDeleteCommands-SHWJIBJS.js → docDeleteCommands-4CR4TXZ7.js} +53 -54
  168. package/{docReadCommands-WJN3WT6O.js → docReadCommands-62XK57VS.js} +50 -52
  169. package/{docStore-7WUS6XXX.js → docStore-RB7YBD4Y.js} +24 -15
  170. package/{docUpdateCommands-IE32IL6O.js → docUpdateCommands-DRAAWIDC.js} +51 -53
  171. package/{fetchMessages-EIU7UFFK.js → fetchMessages-LM6OMMQQ.js} +5 -4
  172. package/{getPricing-LUSEABA6.js → getPricing-XDF4OLTC.js} +6 -6
  173. package/handleSendMessageAction-TYDPIC6O.js +1849 -0
  174. package/index.js +91 -884
  175. package/{lib-FRRS27KN.js → lib-PU2G2MSO.js} +523 -191
  176. package/{localDialogRead-BTFJ4V2I.js → localDialogRead-BOETO2TD.js} +2 -2
  177. package/localRuntimeAdapter-VYB2QTU3.js +239 -0
  178. package/{localRuntimeAuthority-6IR6BBXE.js → localRuntimeAuthority-YSE6NH7B.js} +12 -9
  179. package/{localRuntimeDb-SYQGUF4U.js → localRuntimeDb-7FBKDEQY.js} +1 -1
  180. package/{machineCommands-KSN4COGR.js → machineCommands-IQRRLSYP.js} +493 -151
  181. package/machineWsRunDispatch-LIMM5CYE.js +164 -0
  182. package/{memberThunks-P2ECUJ56.js → memberThunks-Y3Q7GZTG.js} +24 -17
  183. package/{models-T3SG6MJ5.js → models-6V4ZCHEE.js} +2 -2
  184. package/node_modules/abstract-level/CHANGELOG.md +150 -0
  185. package/node_modules/abstract-level/LICENSE +21 -0
  186. package/node_modules/abstract-level/README.md +1957 -0
  187. package/node_modules/abstract-level/UPGRADING.md +669 -0
  188. package/node_modules/abstract-level/abstract-chained-batch.js +397 -0
  189. package/node_modules/abstract-level/abstract-iterator.js +404 -0
  190. package/node_modules/abstract-level/abstract-level.js +1127 -0
  191. package/node_modules/abstract-level/abstract-snapshot.js +84 -0
  192. package/node_modules/abstract-level/index.d.ts +52 -0
  193. package/node_modules/abstract-level/index.js +9 -0
  194. package/node_modules/abstract-level/lib/abstract-sublevel-iterator.js +141 -0
  195. package/node_modules/abstract-level/lib/abstract-sublevel.js +290 -0
  196. package/node_modules/abstract-level/lib/common.js +33 -0
  197. package/node_modules/abstract-level/lib/default-chained-batch.js +29 -0
  198. package/node_modules/abstract-level/lib/default-kv-iterator.js +74 -0
  199. package/node_modules/abstract-level/lib/deferred-iterator.js +110 -0
  200. package/node_modules/abstract-level/lib/deferred-queue.js +84 -0
  201. package/node_modules/abstract-level/lib/errors.js +21 -0
  202. package/node_modules/abstract-level/lib/event-monitor.js +30 -0
  203. package/node_modules/abstract-level/lib/hooks.js +78 -0
  204. package/node_modules/abstract-level/lib/prefixes.js +21 -0
  205. package/node_modules/abstract-level/lib/prewrite-batch.js +96 -0
  206. package/node_modules/abstract-level/lib/range-options.js +26 -0
  207. package/node_modules/abstract-level/package.json +66 -0
  208. package/node_modules/abstract-level/test/async-iterator-test.js +132 -0
  209. package/node_modules/abstract-level/test/batch-test.js +214 -0
  210. package/node_modules/abstract-level/test/chained-batch-test.js +315 -0
  211. package/node_modules/abstract-level/test/clear-range-test.js +262 -0
  212. package/node_modules/abstract-level/test/clear-test.js +110 -0
  213. package/node_modules/abstract-level/test/common.js +90 -0
  214. package/node_modules/abstract-level/test/deferred-open-test.js +209 -0
  215. package/node_modules/abstract-level/test/del-test.js +65 -0
  216. package/node_modules/abstract-level/test/encoding-buffer-test.js +336 -0
  217. package/node_modules/abstract-level/test/encoding-custom-test.js +92 -0
  218. package/node_modules/abstract-level/test/encoding-decode-error-test.js +85 -0
  219. package/node_modules/abstract-level/test/encoding-json-test.js +75 -0
  220. package/node_modules/abstract-level/test/encoding-test.js +130 -0
  221. package/node_modules/abstract-level/test/events/write.js +132 -0
  222. package/node_modules/abstract-level/test/factory-test.js +36 -0
  223. package/node_modules/abstract-level/test/get-many-test.js +157 -0
  224. package/node_modules/abstract-level/test/get-sync-test.js +61 -0
  225. package/node_modules/abstract-level/test/get-test.js +83 -0
  226. package/node_modules/abstract-level/test/has-many-test.js +144 -0
  227. package/node_modules/abstract-level/test/has-test.js +81 -0
  228. package/node_modules/abstract-level/test/hooks/newsub.js +57 -0
  229. package/node_modules/abstract-level/test/hooks/postopen.js +229 -0
  230. package/node_modules/abstract-level/test/hooks/prewrite.js +816 -0
  231. package/node_modules/abstract-level/test/hooks/shared.js +38 -0
  232. package/node_modules/abstract-level/test/index.js +86 -0
  233. package/node_modules/abstract-level/test/iterator-explicit-snapshot-test.js +393 -0
  234. package/node_modules/abstract-level/test/iterator-no-snapshot-test.js +49 -0
  235. package/node_modules/abstract-level/test/iterator-range-test.js +277 -0
  236. package/node_modules/abstract-level/test/iterator-seek-test.js +335 -0
  237. package/node_modules/abstract-level/test/iterator-snapshot-test.js +56 -0
  238. package/node_modules/abstract-level/test/iterator-test.js +621 -0
  239. package/node_modules/abstract-level/test/manifest-test.js +21 -0
  240. package/node_modules/abstract-level/test/open-create-if-missing-test.js +39 -0
  241. package/node_modules/abstract-level/test/open-error-if-exists-test.js +25 -0
  242. package/node_modules/abstract-level/test/open-test.js +263 -0
  243. package/node_modules/abstract-level/test/put-get-del-test.js +97 -0
  244. package/node_modules/abstract-level/test/put-test.js +70 -0
  245. package/node_modules/abstract-level/test/self/abstract-iterator-test.js +182 -0
  246. package/node_modules/abstract-level/test/self/async-iterator-test.js +242 -0
  247. package/node_modules/abstract-level/test/self/attach-resource-test.js +74 -0
  248. package/node_modules/abstract-level/test/self/defer-test.js +140 -0
  249. package/node_modules/abstract-level/test/self/deferred-iterator-test.js +314 -0
  250. package/node_modules/abstract-level/test/self/deferred-operations-test.js +86 -0
  251. package/node_modules/abstract-level/test/self/deferred-queue-test.js +93 -0
  252. package/node_modules/abstract-level/test/self/encoding-test.js +391 -0
  253. package/node_modules/abstract-level/test/self/errors-test.js +11 -0
  254. package/node_modules/abstract-level/test/self/iterator-test.js +1050 -0
  255. package/node_modules/abstract-level/test/self/sublevel-test.js +1039 -0
  256. package/node_modules/abstract-level/test/self.js +905 -0
  257. package/node_modules/abstract-level/test/sublevel-test.js +209 -0
  258. package/node_modules/abstract-level/test/traits/closed.js +42 -0
  259. package/node_modules/abstract-level/test/traits/index.js +4 -0
  260. package/node_modules/abstract-level/test/traits/open.js +62 -0
  261. package/node_modules/abstract-level/test/util.js +275 -0
  262. package/node_modules/abstract-level/types/abstract-chained-batch.d.ts +124 -0
  263. package/node_modules/abstract-level/types/abstract-iterator.d.ts +241 -0
  264. package/node_modules/abstract-level/types/abstract-level.d.ts +636 -0
  265. package/node_modules/abstract-level/types/abstract-snapshot.d.ts +30 -0
  266. package/node_modules/abstract-level/types/abstract-sublevel.d.ts +76 -0
  267. package/node_modules/abstract-level/types/interfaces.d.ts +43 -0
  268. package/node_modules/base64-js/LICENSE +21 -0
  269. package/node_modules/base64-js/README.md +34 -0
  270. package/node_modules/base64-js/base64js.min.js +1 -0
  271. package/node_modules/base64-js/index.d.ts +3 -0
  272. package/node_modules/base64-js/index.js +150 -0
  273. package/node_modules/base64-js/package.json +47 -0
  274. package/node_modules/browser-level/CHANGELOG.md +44 -0
  275. package/node_modules/browser-level/LICENSE +21 -0
  276. package/node_modules/browser-level/README.md +124 -0
  277. package/node_modules/browser-level/UPGRADING.md +143 -0
  278. package/node_modules/browser-level/index.d.ts +108 -0
  279. package/node_modules/browser-level/index.js +323 -0
  280. package/node_modules/browser-level/iterator.js +239 -0
  281. package/node_modules/browser-level/package.json +48 -0
  282. package/node_modules/browser-level/util/clear.js +38 -0
  283. package/node_modules/browser-level/util/deserialize.js +17 -0
  284. package/node_modules/browser-level/util/key-range.js +20 -0
  285. package/node_modules/buffer/AUTHORS.md +73 -0
  286. package/node_modules/buffer/LICENSE +21 -0
  287. package/node_modules/buffer/README.md +410 -0
  288. package/node_modules/buffer/index.d.ts +194 -0
  289. package/node_modules/buffer/index.js +2106 -0
  290. package/node_modules/buffer/package.json +93 -0
  291. package/node_modules/classic-level/CHANGELOG.md +115 -0
  292. package/node_modules/classic-level/LICENSE +21 -0
  293. package/node_modules/classic-level/README.md +274 -0
  294. package/node_modules/classic-level/UPGRADING.md +131 -0
  295. package/node_modules/classic-level/binding.cc +2652 -0
  296. package/node_modules/classic-level/binding.gyp +71 -0
  297. package/node_modules/classic-level/binding.js +1 -0
  298. package/node_modules/classic-level/chained-batch.js +35 -0
  299. package/node_modules/classic-level/deps/leveldb/leveldb-1.20/LICENSE +27 -0
  300. package/node_modules/classic-level/deps/leveldb/leveldb-1.20/Makefile +424 -0
  301. package/node_modules/classic-level/deps/leveldb/leveldb-1.20/build_detect_platform +256 -0
  302. package/node_modules/classic-level/deps/leveldb/leveldb-1.20/db/autocompact_test.cc +118 -0
  303. package/node_modules/classic-level/deps/leveldb/leveldb-1.20/db/builder.cc +88 -0
  304. package/node_modules/classic-level/deps/leveldb/leveldb-1.20/db/builder.h +34 -0
  305. package/node_modules/classic-level/deps/leveldb/leveldb-1.20/db/c.cc +595 -0
  306. package/node_modules/classic-level/deps/leveldb/leveldb-1.20/db/c_test.c +390 -0
  307. package/node_modules/classic-level/deps/leveldb/leveldb-1.20/db/corruption_test.cc +374 -0
  308. package/node_modules/classic-level/deps/leveldb/leveldb-1.20/db/db_bench.cc +1020 -0
  309. package/node_modules/classic-level/deps/leveldb/leveldb-1.20/db/db_impl.cc +1568 -0
  310. package/node_modules/classic-level/deps/leveldb/leveldb-1.20/db/db_impl.h +212 -0
  311. package/node_modules/classic-level/deps/leveldb/leveldb-1.20/db/db_iter.cc +317 -0
  312. package/node_modules/classic-level/deps/leveldb/leveldb-1.20/db/db_iter.h +28 -0
  313. package/node_modules/classic-level/deps/leveldb/leveldb-1.20/db/db_test.cc +2158 -0
  314. package/node_modules/classic-level/deps/leveldb/leveldb-1.20/db/dbformat.cc +140 -0
  315. package/node_modules/classic-level/deps/leveldb/leveldb-1.20/db/dbformat.h +230 -0
  316. package/node_modules/classic-level/deps/leveldb/leveldb-1.20/db/dbformat_test.cc +112 -0
  317. package/node_modules/classic-level/deps/leveldb/leveldb-1.20/db/dumpfile.cc +225 -0
  318. package/node_modules/classic-level/deps/leveldb/leveldb-1.20/db/fault_injection_test.cc +554 -0
  319. package/node_modules/classic-level/deps/leveldb/leveldb-1.20/db/filename.cc +144 -0
  320. package/node_modules/classic-level/deps/leveldb/leveldb-1.20/db/filename.h +85 -0
  321. package/node_modules/classic-level/deps/leveldb/leveldb-1.20/db/filename_test.cc +123 -0
  322. package/node_modules/classic-level/deps/leveldb/leveldb-1.20/db/leveldbutil.cc +64 -0
  323. package/node_modules/classic-level/deps/leveldb/leveldb-1.20/db/log_format.h +35 -0
  324. package/node_modules/classic-level/deps/leveldb/leveldb-1.20/db/log_reader.cc +284 -0
  325. package/node_modules/classic-level/deps/leveldb/leveldb-1.20/db/log_reader.h +113 -0
  326. package/node_modules/classic-level/deps/leveldb/leveldb-1.20/db/log_test.cc +591 -0
  327. package/node_modules/classic-level/deps/leveldb/leveldb-1.20/db/log_writer.cc +112 -0
  328. package/node_modules/classic-level/deps/leveldb/leveldb-1.20/db/log_writer.h +54 -0
  329. package/node_modules/classic-level/deps/leveldb/leveldb-1.20/db/memtable.cc +145 -0
  330. package/node_modules/classic-level/deps/leveldb/leveldb-1.20/db/memtable.h +89 -0
  331. package/node_modules/classic-level/deps/leveldb/leveldb-1.20/db/recovery_test.cc +324 -0
  332. package/node_modules/classic-level/deps/leveldb/leveldb-1.20/db/repair.cc +461 -0
  333. package/node_modules/classic-level/deps/leveldb/leveldb-1.20/db/skiplist.h +384 -0
  334. package/node_modules/classic-level/deps/leveldb/leveldb-1.20/db/skiplist_test.cc +378 -0
  335. package/node_modules/classic-level/deps/leveldb/leveldb-1.20/db/snapshot.h +67 -0
  336. package/node_modules/classic-level/deps/leveldb/leveldb-1.20/db/table_cache.cc +127 -0
  337. package/node_modules/classic-level/deps/leveldb/leveldb-1.20/db/table_cache.h +61 -0
  338. package/node_modules/classic-level/deps/leveldb/leveldb-1.20/db/version_edit.cc +266 -0
  339. package/node_modules/classic-level/deps/leveldb/leveldb-1.20/db/version_edit.h +107 -0
  340. package/node_modules/classic-level/deps/leveldb/leveldb-1.20/db/version_edit_test.cc +46 -0
  341. package/node_modules/classic-level/deps/leveldb/leveldb-1.20/db/version_set.cc +1535 -0
  342. package/node_modules/classic-level/deps/leveldb/leveldb-1.20/db/version_set.h +399 -0
  343. package/node_modules/classic-level/deps/leveldb/leveldb-1.20/db/version_set_test.cc +179 -0
  344. package/node_modules/classic-level/deps/leveldb/leveldb-1.20/db/write_batch.cc +147 -0
  345. package/node_modules/classic-level/deps/leveldb/leveldb-1.20/db/write_batch_internal.h +50 -0
  346. package/node_modules/classic-level/deps/leveldb/leveldb-1.20/db/write_batch_test.cc +120 -0
  347. package/node_modules/classic-level/deps/leveldb/leveldb-1.20/helpers/memenv/memenv.cc +398 -0
  348. package/node_modules/classic-level/deps/leveldb/leveldb-1.20/helpers/memenv/memenv.h +20 -0
  349. package/node_modules/classic-level/deps/leveldb/leveldb-1.20/helpers/memenv/memenv_test.cc +241 -0
  350. package/node_modules/classic-level/deps/leveldb/leveldb-1.20/include/leveldb/c.h +290 -0
  351. package/node_modules/classic-level/deps/leveldb/leveldb-1.20/include/leveldb/cache.h +110 -0
  352. package/node_modules/classic-level/deps/leveldb/leveldb-1.20/include/leveldb/comparator.h +63 -0
  353. package/node_modules/classic-level/deps/leveldb/leveldb-1.20/include/leveldb/db.h +164 -0
  354. package/node_modules/classic-level/deps/leveldb/leveldb-1.20/include/leveldb/dumpfile.h +25 -0
  355. package/node_modules/classic-level/deps/leveldb/leveldb-1.20/include/leveldb/env.h +351 -0
  356. package/node_modules/classic-level/deps/leveldb/leveldb-1.20/include/leveldb/filter_policy.h +70 -0
  357. package/node_modules/classic-level/deps/leveldb/leveldb-1.20/include/leveldb/iterator.h +100 -0
  358. package/node_modules/classic-level/deps/leveldb/leveldb-1.20/include/leveldb/options.h +213 -0
  359. package/node_modules/classic-level/deps/leveldb/leveldb-1.20/include/leveldb/slice.h +109 -0
  360. package/node_modules/classic-level/deps/leveldb/leveldb-1.20/include/leveldb/status.h +112 -0
  361. package/node_modules/classic-level/deps/leveldb/leveldb-1.20/include/leveldb/table.h +85 -0
  362. package/node_modules/classic-level/deps/leveldb/leveldb-1.20/include/leveldb/table_builder.h +92 -0
  363. package/node_modules/classic-level/deps/leveldb/leveldb-1.20/include/leveldb/value_sink.h +26 -0
  364. package/node_modules/classic-level/deps/leveldb/leveldb-1.20/include/leveldb/write_batch.h +64 -0
  365. package/node_modules/classic-level/deps/leveldb/leveldb-1.20/issues/issue178_test.cc +92 -0
  366. package/node_modules/classic-level/deps/leveldb/leveldb-1.20/issues/issue200_test.cc +59 -0
  367. package/node_modules/classic-level/deps/leveldb/leveldb-1.20/port/atomic_pointer.h +242 -0
  368. package/node_modules/classic-level/deps/leveldb/leveldb-1.20/port/port.h +21 -0
  369. package/node_modules/classic-level/deps/leveldb/leveldb-1.20/port/port_example.h +141 -0
  370. package/node_modules/classic-level/deps/leveldb/leveldb-1.20/port/port_posix.cc +53 -0
  371. package/node_modules/classic-level/deps/leveldb/leveldb-1.20/port/port_posix.h +156 -0
  372. package/node_modules/classic-level/deps/leveldb/leveldb-1.20/port/port_posix_sse.cc +129 -0
  373. package/node_modules/classic-level/deps/leveldb/leveldb-1.20/port/thread_annotations.h +60 -0
  374. package/node_modules/classic-level/deps/leveldb/leveldb-1.20/port/win/stdint.h +24 -0
  375. package/node_modules/classic-level/deps/leveldb/leveldb-1.20/table/block.cc +268 -0
  376. package/node_modules/classic-level/deps/leveldb/leveldb-1.20/table/block.h +44 -0
  377. package/node_modules/classic-level/deps/leveldb/leveldb-1.20/table/block_builder.cc +109 -0
  378. package/node_modules/classic-level/deps/leveldb/leveldb-1.20/table/block_builder.h +57 -0
  379. package/node_modules/classic-level/deps/leveldb/leveldb-1.20/table/filter_block.cc +111 -0
  380. package/node_modules/classic-level/deps/leveldb/leveldb-1.20/table/filter_block.h +68 -0
  381. package/node_modules/classic-level/deps/leveldb/leveldb-1.20/table/filter_block_test.cc +128 -0
  382. package/node_modules/classic-level/deps/leveldb/leveldb-1.20/table/format.cc +144 -0
  383. package/node_modules/classic-level/deps/leveldb/leveldb-1.20/table/format.h +108 -0
  384. package/node_modules/classic-level/deps/leveldb/leveldb-1.20/table/iterator.cc +67 -0
  385. package/node_modules/classic-level/deps/leveldb/leveldb-1.20/table/iterator_wrapper.h +66 -0
  386. package/node_modules/classic-level/deps/leveldb/leveldb-1.20/table/merger.cc +197 -0
  387. package/node_modules/classic-level/deps/leveldb/leveldb-1.20/table/merger.h +26 -0
  388. package/node_modules/classic-level/deps/leveldb/leveldb-1.20/table/table.cc +285 -0
  389. package/node_modules/classic-level/deps/leveldb/leveldb-1.20/table/table_builder.cc +270 -0
  390. package/node_modules/classic-level/deps/leveldb/leveldb-1.20/table/table_test.cc +876 -0
  391. package/node_modules/classic-level/deps/leveldb/leveldb-1.20/table/two_level_iterator.cc +182 -0
  392. package/node_modules/classic-level/deps/leveldb/leveldb-1.20/table/two_level_iterator.h +34 -0
  393. package/node_modules/classic-level/deps/leveldb/leveldb-1.20/util/arena.cc +68 -0
  394. package/node_modules/classic-level/deps/leveldb/leveldb-1.20/util/arena.h +68 -0
  395. package/node_modules/classic-level/deps/leveldb/leveldb-1.20/util/arena_test.cc +68 -0
  396. package/node_modules/classic-level/deps/leveldb/leveldb-1.20/util/bloom.cc +95 -0
  397. package/node_modules/classic-level/deps/leveldb/leveldb-1.20/util/bloom_test.cc +162 -0
  398. package/node_modules/classic-level/deps/leveldb/leveldb-1.20/util/cache.cc +405 -0
  399. package/node_modules/classic-level/deps/leveldb/leveldb-1.20/util/cache_test.cc +226 -0
  400. package/node_modules/classic-level/deps/leveldb/leveldb-1.20/util/coding.cc +194 -0
  401. package/node_modules/classic-level/deps/leveldb/leveldb-1.20/util/coding.h +104 -0
  402. package/node_modules/classic-level/deps/leveldb/leveldb-1.20/util/coding_test.cc +196 -0
  403. package/node_modules/classic-level/deps/leveldb/leveldb-1.20/util/comparator.cc +81 -0
  404. package/node_modules/classic-level/deps/leveldb/leveldb-1.20/util/crc32c.cc +350 -0
  405. package/node_modules/classic-level/deps/leveldb/leveldb-1.20/util/crc32c.h +45 -0
  406. package/node_modules/classic-level/deps/leveldb/leveldb-1.20/util/crc32c_test.cc +72 -0
  407. package/node_modules/classic-level/deps/leveldb/leveldb-1.20/util/env.cc +100 -0
  408. package/node_modules/classic-level/deps/leveldb/leveldb-1.20/util/env_posix.cc +695 -0
  409. package/node_modules/classic-level/deps/leveldb/leveldb-1.20/util/env_posix_test.cc +66 -0
  410. package/node_modules/classic-level/deps/leveldb/leveldb-1.20/util/env_posix_test_helper.h +28 -0
  411. package/node_modules/classic-level/deps/leveldb/leveldb-1.20/util/env_test.cc +106 -0
  412. package/node_modules/classic-level/deps/leveldb/leveldb-1.20/util/filter_policy.cc +11 -0
  413. package/node_modules/classic-level/deps/leveldb/leveldb-1.20/util/hash.cc +52 -0
  414. package/node_modules/classic-level/deps/leveldb/leveldb-1.20/util/hash.h +19 -0
  415. package/node_modules/classic-level/deps/leveldb/leveldb-1.20/util/hash_test.cc +54 -0
  416. package/node_modules/classic-level/deps/leveldb/leveldb-1.20/util/histogram.cc +139 -0
  417. package/node_modules/classic-level/deps/leveldb/leveldb-1.20/util/histogram.h +42 -0
  418. package/node_modules/classic-level/deps/leveldb/leveldb-1.20/util/logging.cc +72 -0
  419. package/node_modules/classic-level/deps/leveldb/leveldb-1.20/util/logging.h +43 -0
  420. package/node_modules/classic-level/deps/leveldb/leveldb-1.20/util/mutexlock.h +41 -0
  421. package/node_modules/classic-level/deps/leveldb/leveldb-1.20/util/options.cc +30 -0
  422. package/node_modules/classic-level/deps/leveldb/leveldb-1.20/util/posix_logger.h +98 -0
  423. package/node_modules/classic-level/deps/leveldb/leveldb-1.20/util/random.h +64 -0
  424. package/node_modules/classic-level/deps/leveldb/leveldb-1.20/util/status.cc +75 -0
  425. package/node_modules/classic-level/deps/leveldb/leveldb-1.20/util/testharness.cc +77 -0
  426. package/node_modules/classic-level/deps/leveldb/leveldb-1.20/util/testharness.h +138 -0
  427. package/node_modules/classic-level/deps/leveldb/leveldb-1.20/util/testutil.cc +51 -0
  428. package/node_modules/classic-level/deps/leveldb/leveldb-1.20/util/testutil.h +63 -0
  429. package/node_modules/classic-level/deps/leveldb/leveldb.gyp +282 -0
  430. package/node_modules/classic-level/deps/leveldb/patches/001-value-sink.patch +164 -0
  431. package/node_modules/classic-level/deps/leveldb/port-libuv/atomic_pointer_win.h +48 -0
  432. package/node_modules/classic-level/deps/leveldb/port-libuv/env_win.cc +692 -0
  433. package/node_modules/classic-level/deps/leveldb/port-libuv/port_uv.cc +36 -0
  434. package/node_modules/classic-level/deps/leveldb/port-libuv/port_uv.h +157 -0
  435. package/node_modules/classic-level/deps/leveldb/port-libuv/port_uv.h.bak +153 -0
  436. package/node_modules/classic-level/deps/leveldb/port-libuv/stdint-msvc2008.h +247 -0
  437. package/node_modules/classic-level/deps/leveldb/port-libuv/uv_condvar.h +45 -0
  438. package/node_modules/classic-level/deps/leveldb/port-libuv/uv_condvar_posix.cc +139 -0
  439. package/node_modules/classic-level/deps/leveldb/port-libuv/win_logger.cc +79 -0
  440. package/node_modules/classic-level/deps/leveldb/port-libuv/win_logger.h +28 -0
  441. package/node_modules/classic-level/deps/snappy/freebsd/config.h +135 -0
  442. package/node_modules/classic-level/deps/snappy/freebsd/snappy-stubs-public.h +100 -0
  443. package/node_modules/classic-level/deps/snappy/linux/config.h +135 -0
  444. package/node_modules/classic-level/deps/snappy/linux/snappy-stubs-public.h +100 -0
  445. package/node_modules/classic-level/deps/snappy/mac/config.h +137 -0
  446. package/node_modules/classic-level/deps/snappy/mac/snappy-stubs-public.h +100 -0
  447. package/node_modules/classic-level/deps/snappy/openbsd/config.h +135 -0
  448. package/node_modules/classic-level/deps/snappy/openbsd/snappy-stubs-public.h +100 -0
  449. package/node_modules/classic-level/deps/snappy/snappy/COPYING +54 -0
  450. package/node_modules/classic-level/deps/snappy/snappy/cmake/SnappyConfig.cmake +1 -0
  451. package/node_modules/classic-level/deps/snappy/snappy/cmake/config.h.in +62 -0
  452. package/node_modules/classic-level/deps/snappy/snappy/snappy-c.cc +90 -0
  453. package/node_modules/classic-level/deps/snappy/snappy/snappy-c.h +138 -0
  454. package/node_modules/classic-level/deps/snappy/snappy/snappy-internal.h +224 -0
  455. package/node_modules/classic-level/deps/snappy/snappy/snappy-sinksource.cc +104 -0
  456. package/node_modules/classic-level/deps/snappy/snappy/snappy-sinksource.h +182 -0
  457. package/node_modules/classic-level/deps/snappy/snappy/snappy-stubs-internal.cc +42 -0
  458. package/node_modules/classic-level/deps/snappy/snappy/snappy-stubs-internal.h +561 -0
  459. package/node_modules/classic-level/deps/snappy/snappy/snappy-stubs-public.h.in +94 -0
  460. package/node_modules/classic-level/deps/snappy/snappy/snappy-test.cc +612 -0
  461. package/node_modules/classic-level/deps/snappy/snappy/snappy-test.h +573 -0
  462. package/node_modules/classic-level/deps/snappy/snappy/snappy.cc +1515 -0
  463. package/node_modules/classic-level/deps/snappy/snappy/snappy.h +203 -0
  464. package/node_modules/classic-level/deps/snappy/snappy/snappy_unittest.cc +1410 -0
  465. package/node_modules/classic-level/deps/snappy/snappy.gyp +119 -0
  466. package/node_modules/classic-level/deps/snappy/solaris/config.h +135 -0
  467. package/node_modules/classic-level/deps/snappy/solaris/snappy-stubs-public.h +100 -0
  468. package/node_modules/classic-level/deps/snappy/win32/config.h +29 -0
  469. package/node_modules/classic-level/deps/snappy/win32/snappy-stubs-public.h +100 -0
  470. package/node_modules/classic-level/index.d.ts +343 -0
  471. package/node_modules/classic-level/index.js +311 -0
  472. package/node_modules/classic-level/iterator.js +122 -0
  473. package/node_modules/classic-level/package.json +70 -0
  474. package/node_modules/classic-level/prebuilds/android-arm/classic-level.armv7.node +0 -0
  475. package/node_modules/classic-level/prebuilds/android-arm64/classic-level.armv8.node +0 -0
  476. package/node_modules/classic-level/prebuilds/darwin-x64+arm64/classic-level.node +0 -0
  477. package/node_modules/classic-level/prebuilds/linux-arm/classic-level.armv6.node +0 -0
  478. package/node_modules/classic-level/prebuilds/linux-arm/classic-level.armv7.node +0 -0
  479. package/node_modules/classic-level/prebuilds/linux-arm64/classic-level.armv8.node +0 -0
  480. package/node_modules/classic-level/prebuilds/linux-x64/classic-level.musl.node +0 -0
  481. package/node_modules/classic-level/prebuilds/linux-x64/classic-level.node +0 -0
  482. package/node_modules/classic-level/prebuilds/win32-ia32/classic-level.node +0 -0
  483. package/node_modules/classic-level/prebuilds/win32-x64/classic-level.node +0 -0
  484. package/node_modules/ieee754/LICENSE +11 -0
  485. package/node_modules/ieee754/README.md +51 -0
  486. package/node_modules/ieee754/index.d.ts +10 -0
  487. package/node_modules/ieee754/index.js +85 -0
  488. package/node_modules/ieee754/package.json +52 -0
  489. package/node_modules/is-buffer/LICENSE +21 -0
  490. package/node_modules/is-buffer/README.md +54 -0
  491. package/node_modules/is-buffer/index.d.ts +2 -0
  492. package/node_modules/is-buffer/index.js +11 -0
  493. package/node_modules/is-buffer/package.json +65 -0
  494. package/node_modules/level/CHANGELOG.md +532 -0
  495. package/node_modules/level/LICENSE +21 -0
  496. package/node_modules/level/README.md +107 -0
  497. package/node_modules/level/UPGRADING.md +413 -0
  498. package/node_modules/level/browser.js +1 -0
  499. package/node_modules/level/index.d.ts +75 -0
  500. package/node_modules/level/index.js +1 -0
  501. package/node_modules/level/package.json +62 -0
  502. package/node_modules/level-supports/CHANGELOG.md +140 -0
  503. package/node_modules/level-supports/LICENSE +21 -0
  504. package/node_modules/level-supports/README.md +276 -0
  505. package/node_modules/level-supports/index.d.ts +137 -0
  506. package/node_modules/level-supports/index.js +26 -0
  507. package/node_modules/level-supports/package.json +46 -0
  508. package/node_modules/level-supports/test/cloneable.js +26 -0
  509. package/node_modules/level-supports/test/index.js +24 -0
  510. package/node_modules/level-supports/test/self.js +86 -0
  511. package/node_modules/level-supports/test/shape.js +23 -0
  512. package/node_modules/level-transcoder/CHANGELOG.md +15 -0
  513. package/node_modules/level-transcoder/LICENSE +21 -0
  514. package/node_modules/level-transcoder/README.md +214 -0
  515. package/node_modules/level-transcoder/UPGRADING.md +13 -0
  516. package/node_modules/level-transcoder/index.d.ts +27 -0
  517. package/node_modules/level-transcoder/index.js +158 -0
  518. package/node_modules/level-transcoder/lib/encoding.d.ts +158 -0
  519. package/node_modules/level-transcoder/lib/encoding.js +105 -0
  520. package/node_modules/level-transcoder/lib/encodings.d.ts +9 -0
  521. package/node_modules/level-transcoder/lib/encodings.js +135 -0
  522. package/node_modules/level-transcoder/lib/formats.d.ts +13 -0
  523. package/node_modules/level-transcoder/lib/formats.js +111 -0
  524. package/node_modules/level-transcoder/lib/text-endec.d.ts +6 -0
  525. package/node_modules/level-transcoder/lib/text-endec.js +19 -0
  526. package/node_modules/level-transcoder/package.json +46 -0
  527. package/node_modules/maybe-combine-errors/LICENSE.md +21 -0
  528. package/node_modules/maybe-combine-errors/README.md +94 -0
  529. package/node_modules/maybe-combine-errors/index.js +60 -0
  530. package/node_modules/maybe-combine-errors/package.json +33 -0
  531. package/node_modules/module-error/CHANGELOG.md +23 -0
  532. package/node_modules/module-error/LICENSE +21 -0
  533. package/node_modules/module-error/README.md +89 -0
  534. package/node_modules/module-error/index.d.ts +18 -0
  535. package/node_modules/module-error/index.js +22 -0
  536. package/node_modules/module-error/package.json +36 -0
  537. package/node_modules/napi-macros/LICENSE +21 -0
  538. package/node_modules/napi-macros/README.md +277 -0
  539. package/node_modules/napi-macros/index.js +1 -0
  540. package/node_modules/napi-macros/napi-macros.h +255 -0
  541. package/node_modules/napi-macros/package.json +22 -0
  542. package/node_modules/node-gyp-build/LICENSE +21 -0
  543. package/node_modules/node-gyp-build/README.md +58 -0
  544. package/node_modules/node-gyp-build/SECURITY.md +5 -0
  545. package/node_modules/node-gyp-build/bin.js +84 -0
  546. package/node_modules/node-gyp-build/build-test.js +19 -0
  547. package/node_modules/node-gyp-build/index.js +6 -0
  548. package/node_modules/node-gyp-build/node-gyp-build.js +207 -0
  549. package/node_modules/node-gyp-build/optional.js +7 -0
  550. package/node_modules/node-gyp-build/package.json +43 -0
  551. package/oauthTokenStore-PADKLNOC.js +23 -0
  552. package/package.json +6 -3
  553. package/processSpawn-SOAV3FEV.js +11 -0
  554. package/profileConfig-ZGOFORWV.js +43 -0
  555. package/{providerPresetApply-FG6NZ57W.js → providerPresetApply-HIPK67DU.js} +9 -9
  556. package/{providerRegistry-757OWH3O.js → providerRegistry-AI4U2FNM.js} +13 -9
  557. package/{read-COE3ZYR6.js → read-RNUQ7F34.js} +11 -7
  558. package/{readDocTool-5USN4A6V.js → readDocTool-6WIZHE6O.js} +5 -3
  559. package/{readlineWorkspace-HO62DKCG.js → readlineWorkspace-P3I7ZJUP.js} +6948 -3879
  560. package/{removeDialogAgentAction-J6X5QMTA.js → removeDialogAgentAction-EFQ4O2IQ.js} +27 -26
  561. package/{runAgentClientLoop-JLRJIF3F.js → runAgentClientLoop-AYNL3KMJ.js} +150 -90
  562. package/{runtimeDoctorCommands-X6WDBEQX.js → runtimeDoctorCommands-5CIWJEZ3.js} +36 -8
  563. package/runtimeModeArgs-2Y7BALTO.js +31 -0
  564. package/setDialogExtraReferencesAction-MXAH2KPV.js +37 -0
  565. package/{setPrimaryDialogAgentAction-FN22THHT.js → setPrimaryDialogAgentAction-7OPVNK4M.js} +28 -27
  566. package/{chunk-GP5LKBUZ.js → settingThunks-GHVLHABJ.js} +240 -945
  567. package/{skillDiscovery-CYUCJMAG.js → skillDiscovery-QC35EQY4.js} +3 -3
  568. package/{slateUtils-RIZES3PV.js → slateUtils-NGV2NMKM.js} +1 -1
  569. package/{spaceCommands-5GLCWZPO.js → spaceCommands-WZCLRGBO.js} +56 -55
  570. package/{streamAgentChatTurn-DZ3PP7ZH.js → streamAgentChatTurn-O5T3B4B3.js} +325 -1557
  571. package/{switchDialogAgentAction-LVTEV3FR.js → switchDialogAgentAction-4PANDG3L.js} +24 -20
  572. package/{tableCommands-O6NWHFKV.js → tableCommands-U3QDY4L6.js} +19 -17
  573. package/{toolApiClient-QVJ6HDNN.js → toolApiClient-54CXTU7C.js} +5 -4
  574. package/tools-UMU2DYQX.js +122 -0
  575. package/{tuiSummaryLlmCaller-OHHFTHMG.js → tuiSummaryLlmCaller-ISODIW2O.js} +15 -29
  576. package/{updateCommands-2M74UL7P.js → updateCommands-NQXAGFM7.js} +3 -3
  577. package/{updateDialogTitleAction-VWZT4J6J.js → updateDialogTitleAction-TIS2SETN.js} +101 -57
  578. package/action-P4TNFGAD.js +0 -31
  579. package/agentListCommands-B2V4YAC4.js +0 -410
  580. package/agentRecordCommands-XBVDEYVC.js +0 -128
  581. package/agentRunCommand-V6RTNFRH.js +0 -156
  582. package/browser-image-compression-MFDTD7K6.js +0 -1763
  583. package/chatQueueReduxAdapter-XMFWRG3P.js +0 -186
  584. package/chunk-ACTMNVHM.js +0 -93
  585. package/chunk-CQ3WA2NE.js +0 -299
  586. package/chunk-M76ECQRD.js +0 -13658
  587. package/chunk-MEYIRKDN.js +0 -8967
  588. package/chunk-N4G4PKQ6.js +0 -23
  589. package/chunk-PUOC4YRO.js +0 -394
  590. package/chunk-Q5FJJ6XI.js +0 -103
  591. package/chunk-QQWJUHSL.js +0 -34
  592. package/chunk-S7Z2HMCN.js +0 -25
  593. package/chunk-TWQWYIMJ.js +0 -21409
  594. package/chunk-Y5GCAMGP.js +0 -9
  595. package/chunk-YPREESF4.js +0 -225
  596. package/contentThunks-3Z6NAUW6.js +0 -73
  597. package/createDialogAction-7XW3RX2A.js +0 -65
  598. package/dialogCommands-H7FPUYUQ.js +0 -99
  599. package/handleSendMessageAction-GUBOMCGM.js +0 -633
  600. package/machineWsRunDispatch-AAG6PDBY.js +0 -144
  601. package/setDialogExtraReferencesAction-WX5VTY6O.js +0 -30
  602. package/settingSlice-P4ZW7K5X.js +0 -204
  603. package/syncMapping-N6RGXGBW.js +0 -437
  604. package/tools-XA4ZWLH4.js +0 -110
  605. package/{chunk-SV5IJK6K.js → chunk-NBTY7YJF.js} +3 -3
  606. package/{chunk-X7HHHIOZ.js → chunk-Y6ROFCZO.js} +0 -0
  607. package/{db-WK5MDZVN.js → db-VQSAOWAO.js} +1 -1
  608. package/{offlineMarxistsAgentCommand-HGXZV4XJ.js → offlineMarxistsAgentCommand-2QTHJCHV.js} +4 -4
@@ -0,0 +1,905 @@
1
+ 'use strict'
2
+
3
+ const test = require('tape')
4
+ const isBuffer = require('is-buffer')
5
+ const { Buffer } = require('buffer')
6
+ const { AbstractLevel, AbstractChainedBatch } = require('..')
7
+ const { MinimalLevel, createSpy } = require('./util')
8
+ const getRangeOptions = require('../lib/range-options')
9
+
10
+ const testCommon = require('./common')({
11
+ test,
12
+ factory () {
13
+ return new AbstractLevel({ encodings: { utf8: true } })
14
+ }
15
+ })
16
+
17
+ const rangeOptions = ['gt', 'gte', 'lt', 'lte']
18
+
19
+ function implement (ctor, methods) {
20
+ class Test extends ctor {}
21
+
22
+ for (const k in methods) {
23
+ Test.prototype[k] = methods[k]
24
+ }
25
+
26
+ return Test
27
+ }
28
+
29
+ /**
30
+ * Extensibility
31
+ */
32
+
33
+ test('test core extensibility', function (t) {
34
+ const Test = implement(AbstractLevel)
35
+ const test = new Test({ encodings: { utf8: true } })
36
+ t.is(test.status, 'opening', 'status is opening')
37
+ t.end()
38
+ })
39
+
40
+ test('manifest is required', function (t) {
41
+ t.plan(3 * 2)
42
+
43
+ const Test = implement(AbstractLevel)
44
+
45
+ for (const args of [[], [null], [123]]) {
46
+ try {
47
+ // eslint-disable-next-line no-new
48
+ new Test(...args)
49
+ } catch (err) {
50
+ t.is(err.name, 'TypeError')
51
+ t.is(err.message, "The first argument 'manifest' must be an object")
52
+ }
53
+ }
54
+ })
55
+
56
+ test('test open() extensibility when new', async function (t) {
57
+ const spy = createSpy(async function () {})
58
+ const expectedOptions = { createIfMissing: true, errorIfExists: false }
59
+ const Test = implement(AbstractLevel, { _open: spy })
60
+ const test = new Test({ encodings: { utf8: true } })
61
+
62
+ await test.open()
63
+
64
+ t.is(spy.callCount, 1, 'got _open() call')
65
+ t.is(spy.getCall(0).thisValue, test, '`this` on _open() was correct')
66
+ t.is(spy.getCall(0).args.length, 1, 'got one argument')
67
+ t.same(spy.getCall(0).args[0], expectedOptions, 'got default options argument')
68
+
69
+ const test2 = new Test({ encodings: { utf8: true } })
70
+ await test2.open({ options: 1 })
71
+
72
+ expectedOptions.options = 1
73
+
74
+ t.is(spy.callCount, 2, 'got _open() call')
75
+ t.is(spy.getCall(1).thisValue, test2, '`this` on _open() was correct')
76
+ t.is(spy.getCall(1).args.length, 1, 'got one argument')
77
+ t.same(spy.getCall(1).args[0], expectedOptions, 'got expected options argument')
78
+ })
79
+
80
+ test('test open() extensibility when open', function (t) {
81
+ t.plan(2)
82
+
83
+ const spy = createSpy(async function () {})
84
+ const Test = implement(AbstractLevel, { _open: spy })
85
+ const test = new Test({ encodings: { utf8: true } })
86
+
87
+ test.once('open', function () {
88
+ t.is(spy.callCount, 1, 'got _open() call')
89
+
90
+ test.open().then(function () {
91
+ t.is(spy.callCount, 1, 'did not get second _open() call')
92
+ })
93
+ })
94
+ })
95
+
96
+ test('test opening explicitly gives a chance to capture an error', async function (t) {
97
+ t.plan(3)
98
+
99
+ const spy = createSpy(async function (options) { throw new Error('_open error') })
100
+ const Test = implement(AbstractLevel, { _open: spy })
101
+ const test = new Test({ encodings: { utf8: true } })
102
+
103
+ try {
104
+ await test.open()
105
+ } catch (err) {
106
+ t.is(spy.callCount, 1, 'got _open() call')
107
+ t.is(err.code, 'LEVEL_DATABASE_NOT_OPEN')
108
+ t.is(err.cause.message, '_open error')
109
+ }
110
+ })
111
+
112
+ test('test constructor options are forwarded to open()', async function (t) {
113
+ const spy = createSpy(async function (options) { })
114
+ const Test = implement(AbstractLevel, { _open: spy })
115
+ const test = new Test({ encodings: { utf8: true } }, {
116
+ passive: true,
117
+ keyEncoding: 'json',
118
+ valueEncoding: 'json',
119
+ createIfMissing: false,
120
+ foo: 123
121
+ })
122
+
123
+ await test.open()
124
+
125
+ t.is(spy.callCount, 1, 'got _open() call')
126
+ t.same(spy.getCall(0).args[0], {
127
+ foo: 123,
128
+ createIfMissing: false,
129
+ errorIfExists: false
130
+ }, 'does not forward passive, keyEncoding and valueEncoding options')
131
+ })
132
+
133
+ test('test close() extensibility when open', async function (t) {
134
+ const spy = createSpy(async function () {})
135
+ const Test = implement(AbstractLevel, { _close: spy })
136
+ const test = new Test({ encodings: { utf8: true } })
137
+
138
+ await test.open()
139
+ await test.close()
140
+
141
+ t.is(spy.callCount, 1, 'got _close() call')
142
+ t.is(spy.getCall(0).thisValue, test, '`this` on _close() was correct')
143
+ t.is(spy.getCall(0).args.length, 0, 'got 0 arguments')
144
+ })
145
+
146
+ test('test close() extensibility when new', async function (t) {
147
+ const spy = createSpy(async function () {})
148
+ const Test = implement(AbstractLevel, { _close: spy })
149
+ const test = new Test({ encodings: { utf8: true } })
150
+
151
+ await test.close()
152
+ t.is(spy.callCount, 0, 'not called because _open was never called')
153
+ })
154
+
155
+ test('test open(), close(), open() with twice failed open', function (t) {
156
+ t.plan(7)
157
+
158
+ const db = testCommon.factory()
159
+ const order = []
160
+
161
+ let opens = 0
162
+
163
+ db.on('open', t.fail.bind(t))
164
+ db.on('closed', t.fail.bind(t))
165
+
166
+ db._open = async function (options) {
167
+ t.pass('called')
168
+ throw new Error('test' + (++opens))
169
+ }
170
+
171
+ db._close = async function () {
172
+ t.fail('should not be called')
173
+ }
174
+
175
+ db.open().then(t.fail.bind(t), function (err) {
176
+ t.is(err.code, 'LEVEL_DATABASE_NOT_OPEN')
177
+ t.is(err.cause && err.cause.message, 'test1')
178
+ order.push('A')
179
+ })
180
+
181
+ db.close().then(function () {
182
+ order.push('B')
183
+ })
184
+
185
+ db.open().then(t.fail.bind(t), function (err) {
186
+ t.is(err.code, 'LEVEL_DATABASE_NOT_OPEN')
187
+ t.is(err.cause && err.cause.message, 'test2')
188
+ order.push('C')
189
+ t.same(order, ['A', 'B', 'C'], 'order is ok')
190
+ })
191
+ })
192
+
193
+ test('test open(), close(), open() with first failed open', function (t) {
194
+ t.plan(6)
195
+
196
+ const db = testCommon.factory()
197
+ const order = []
198
+
199
+ let opens = 0
200
+
201
+ db.on('open', () => { order.push('open event') })
202
+ db.on('closed', t.fail.bind(t, 'should not emit closed'))
203
+
204
+ db._open = async function (options) {
205
+ t.pass('called')
206
+ if (!opens++) throw new Error('test')
207
+ }
208
+
209
+ db.open().then(t.fail.bind(t, 'should not open'), function (err) {
210
+ t.is(err.code, 'LEVEL_DATABASE_NOT_OPEN')
211
+ t.is(db.status, 'closed')
212
+ order.push('A')
213
+ })
214
+
215
+ db.close().then(function () {
216
+ // Status is actually 'opening' due to the parallel open() call, which starts
217
+ // its work after close() finished but before this then() handler. Can't be helped.
218
+ // t.is(db.status, 'closed')
219
+
220
+ order.push('B')
221
+ })
222
+
223
+ db.open().then(function () {
224
+ t.is(db.status, 'open')
225
+ order.push('C')
226
+ t.same(order, ['A', 'B', 'open event', 'C'], 'order is ok')
227
+ })
228
+ })
229
+
230
+ test('test open(), close(), open() with second failed open', function (t) {
231
+ t.plan(8)
232
+
233
+ const db = testCommon.factory()
234
+ const order = []
235
+
236
+ let opens = 0
237
+
238
+ db.on('open', () => order.push('open event'))
239
+ db.on('closed', () => order.push('closed event'))
240
+
241
+ db._open = async function (options) {
242
+ t.pass('called')
243
+ if (opens++) throw new Error('test')
244
+ }
245
+
246
+ db.open().then(function () {
247
+ t.is(db.status, 'open')
248
+ order.push('A')
249
+ })
250
+
251
+ db.close().then(function () {
252
+ t.is(db.status, 'closed')
253
+ order.push('B')
254
+ })
255
+
256
+ db.open().then(t.fail.bind(t, 'should not open'), function (err) {
257
+ t.is(err.code, 'LEVEL_DATABASE_NOT_OPEN')
258
+ t.is(err.cause.message, 'test')
259
+ t.is(db.status, 'closed')
260
+ order.push('C')
261
+ t.same(order, ['open event', 'A', 'closed event', 'B', 'C'], 'order is ok')
262
+ })
263
+ })
264
+
265
+ test('open() error is combined with resource error', async function (t) {
266
+ t.plan(4)
267
+
268
+ const db = testCommon.factory()
269
+ const resource = db.iterator()
270
+
271
+ db._open = async function (options) {
272
+ throw new Error('error from open')
273
+ }
274
+
275
+ resource.close = async function () {
276
+ throw new Error('error from resource')
277
+ }
278
+
279
+ try {
280
+ await db.open()
281
+ } catch (err) {
282
+ t.is(db.status, 'closed')
283
+ t.is(err.code, 'LEVEL_DATABASE_NOT_OPEN')
284
+ t.is(err.cause.name, 'CombinedError')
285
+ t.is(err.cause.message, 'error from open; error from resource')
286
+ }
287
+ })
288
+
289
+ test('test get() extensibility', async function (t) {
290
+ const spy = createSpy(async function () {})
291
+ const expectedOptions = { keyEncoding: 'utf8', valueEncoding: 'utf8' }
292
+ const expectedKey = 'a key'
293
+ const Test = implement(AbstractLevel, { _get: spy })
294
+ const test = new Test({ encodings: { utf8: true } }, { keyEncoding: 'utf8' })
295
+
296
+ await test.open()
297
+ await test.get(expectedKey)
298
+
299
+ t.is(spy.callCount, 1, 'got _get() call')
300
+ t.is(spy.getCall(0).thisValue, test, '`this` on _get() was correct')
301
+ t.is(spy.getCall(0).args.length, 2, 'got 2 arguments')
302
+ t.is(spy.getCall(0).args[0], expectedKey, 'got expected key argument')
303
+ t.same(spy.getCall(0).args[1], expectedOptions, 'got default options argument')
304
+
305
+ await test.get(expectedKey, { options: 1 })
306
+ expectedOptions.options = 1
307
+
308
+ t.is(spy.callCount, 2, 'got _get() call')
309
+ t.is(spy.getCall(1).thisValue, test, '`this` on _get() was correct')
310
+ t.is(spy.getCall(1).args.length, 2, 'got 2 arguments')
311
+ t.is(spy.getCall(1).args[0], expectedKey, 'got expected key argument')
312
+ t.same(spy.getCall(1).args[1], expectedOptions, 'got expected options argument')
313
+ })
314
+
315
+ test('test getMany() extensibility', async function (t) {
316
+ const spy = createSpy(async () => ['x'])
317
+ const expectedOptions = { keyEncoding: 'utf8', valueEncoding: 'utf8' }
318
+ const expectedKey = 'a key'
319
+ const Test = implement(AbstractLevel, { _getMany: spy })
320
+ const test = new Test({ encodings: { utf8: true } })
321
+
322
+ await test.open()
323
+ await test.getMany([expectedKey])
324
+
325
+ t.is(spy.callCount, 1, 'got _getMany() call')
326
+ t.is(spy.getCall(0).thisValue, test, '`this` on _getMany() was correct')
327
+ t.is(spy.getCall(0).args.length, 2, 'got 2 arguments')
328
+ t.same(spy.getCall(0).args[0], [expectedKey], 'got expected keys argument')
329
+ t.same(spy.getCall(0).args[1], expectedOptions, 'got default options argument')
330
+
331
+ await test.getMany([expectedKey], { options: 1 })
332
+ expectedOptions.options = 1
333
+
334
+ t.is(spy.callCount, 2, 'got _getMany() call')
335
+ t.is(spy.getCall(1).thisValue, test, '`this` on _getMany() was correct')
336
+ t.is(spy.getCall(1).args.length, 2, 'got 2 arguments')
337
+ t.same(spy.getCall(1).args[0], [expectedKey], 'got expected key argument')
338
+ t.same(spy.getCall(1).args[1], expectedOptions, 'got expected options argument')
339
+ })
340
+
341
+ test('test del() extensibility', async function (t) {
342
+ const spy = createSpy(async function () {})
343
+ const expectedOptions = { options: 1, keyEncoding: 'utf8' }
344
+ const expectedKey = 'a key'
345
+ const Test = implement(AbstractLevel, { _del: spy })
346
+ const test = new Test({ encodings: { utf8: true } })
347
+
348
+ await test.open()
349
+ await test.del(expectedKey)
350
+
351
+ t.is(spy.callCount, 1, 'got _del() call')
352
+ t.is(spy.getCall(0).thisValue, test, '`this` on _del() was correct')
353
+ t.is(spy.getCall(0).args.length, 2, 'got 2 arguments')
354
+ t.is(spy.getCall(0).args[0], expectedKey, 'got expected key argument')
355
+ t.same(spy.getCall(0).args[1], { keyEncoding: 'utf8' }, 'got blank options argument')
356
+
357
+ await test.del(expectedKey, expectedOptions)
358
+
359
+ t.is(spy.callCount, 2, 'got _del() call')
360
+ t.is(spy.getCall(1).thisValue, test, '`this` on _del() was correct')
361
+ t.is(spy.getCall(1).args.length, 2, 'got 2 arguments')
362
+ t.is(spy.getCall(1).args[0], expectedKey, 'got expected key argument')
363
+ t.same(spy.getCall(1).args[1], expectedOptions, 'got expected options argument')
364
+ })
365
+
366
+ test('test put() extensibility', async function (t) {
367
+ const spy = createSpy(async function () {})
368
+ const expectedOptions = { options: 1, keyEncoding: 'utf8', valueEncoding: 'utf8' }
369
+ const expectedKey = 'a key'
370
+ const expectedValue = 'a value'
371
+ const Test = implement(AbstractLevel, { _put: spy })
372
+ const test = new Test({ encodings: { utf8: true } })
373
+
374
+ await test.open()
375
+ await test.put(expectedKey, expectedValue)
376
+
377
+ t.is(spy.callCount, 1, 'got _put() call')
378
+ t.is(spy.getCall(0).thisValue, test, '`this` on _put() was correct')
379
+ t.is(spy.getCall(0).args.length, 3, 'got 3 arguments')
380
+ t.is(spy.getCall(0).args[0], expectedKey, 'got expected key argument')
381
+ t.is(spy.getCall(0).args[1], expectedValue, 'got expected value argument')
382
+ t.same(spy.getCall(0).args[2], { keyEncoding: 'utf8', valueEncoding: 'utf8' }, 'got default options argument')
383
+
384
+ await test.put(expectedKey, expectedValue, expectedOptions)
385
+
386
+ t.is(spy.callCount, 2, 'got _put() call')
387
+ t.is(spy.getCall(1).thisValue, test, '`this` on _put() was correct')
388
+ t.is(spy.getCall(1).args.length, 3, 'got 3 arguments')
389
+ t.is(spy.getCall(1).args[0], expectedKey, 'got expected key argument')
390
+ t.is(spy.getCall(1).args[1], expectedValue, 'got expected value argument')
391
+ t.same(spy.getCall(1).args[2], expectedOptions, 'got expected options argument')
392
+ })
393
+
394
+ test('batch([]) extensibility', async function (t) {
395
+ const spy = createSpy(async function () {})
396
+ const expectedOptions = { options: 1 }
397
+ const expectedArray = [
398
+ { type: 'put', key: '1', value: '1', keyEncoding: 'utf8', valueEncoding: 'utf8' },
399
+ { type: 'del', key: '2', keyEncoding: 'utf8' }
400
+ ]
401
+ const Test = implement(AbstractLevel, { _batch: spy })
402
+ const test = new Test({ encodings: { utf8: true } })
403
+
404
+ await test.open()
405
+ await test.batch(expectedArray)
406
+
407
+ t.is(spy.callCount, 1, 'got _batch() call')
408
+ t.is(spy.getCall(0).thisValue, test, '`this` on _batch() was correct')
409
+ t.is(spy.getCall(0).args.length, 2, 'got 2 arguments')
410
+ t.same(spy.getCall(0).args[0], expectedArray, 'got expected array argument')
411
+ t.same(spy.getCall(0).args[1], {}, 'got expected options argument')
412
+
413
+ await test.batch(expectedArray, expectedOptions)
414
+
415
+ t.is(spy.callCount, 2, 'got _batch() call')
416
+ t.is(spy.getCall(1).thisValue, test, '`this` on _batch() was correct')
417
+ t.is(spy.getCall(1).args.length, 2, 'got 2 arguments')
418
+ t.same(spy.getCall(1).args[0], expectedArray.map(o => ({ ...expectedOptions, ...o })), 'got expected array argument')
419
+ t.same(spy.getCall(1).args[1], expectedOptions, 'got expected options argument')
420
+
421
+ await test.batch(expectedArray, null)
422
+
423
+ t.is(spy.callCount, 3, 'got _batch() call')
424
+ t.is(spy.getCall(2).thisValue, test, '`this` on _batch() was correct')
425
+ t.is(spy.getCall(2).args.length, 2, 'got 2 arguments')
426
+ t.same(spy.getCall(2).args[0], expectedArray, 'got expected array argument')
427
+ t.ok(spy.getCall(2).args[1], 'options should not be null')
428
+ })
429
+
430
+ test('batch([]) with empty array is a noop', function (t) {
431
+ t.plan(1)
432
+
433
+ const spy = createSpy()
434
+ const Test = implement(AbstractLevel, { _batch: spy })
435
+ const test = new Test({ encodings: { utf8: true } })
436
+
437
+ test.once('open', function () {
438
+ test.batch([]).then(function () {
439
+ t.is(spy.callCount, 0, '_batch() call was bypassed')
440
+ })
441
+ })
442
+ })
443
+
444
+ test('test chained batch() extensibility', async function (t) {
445
+ const spy = createSpy(async function () {})
446
+ const expectedOptions = { options: 1 }
447
+ const Test = implement(AbstractLevel, { _batch: spy })
448
+ const test = new Test({ encodings: { utf8: true } })
449
+
450
+ await test.open()
451
+ await test.batch().put('foo', 'bar').del('bang').write()
452
+
453
+ t.is(spy.callCount, 1, 'got _batch() call')
454
+ t.is(spy.getCall(0).thisValue, test, '`this` on _batch() was correct')
455
+ t.is(spy.getCall(0).args.length, 2, 'got 2 arguments')
456
+ t.is(spy.getCall(0).args[0].length, 2, 'got expected array argument')
457
+ t.same(spy.getCall(0).args[0][0], { keyEncoding: 'utf8', valueEncoding: 'utf8', type: 'put', key: 'foo', value: 'bar' }, 'got expected array argument[0]')
458
+ t.same(spy.getCall(0).args[0][1], { keyEncoding: 'utf8', type: 'del', key: 'bang' }, 'got expected array argument[1]')
459
+ t.same(spy.getCall(0).args[1], {}, 'got expected options argument')
460
+
461
+ await test.batch().put('foo', 'bar', expectedOptions).del('bang', expectedOptions).write(expectedOptions)
462
+
463
+ t.is(spy.callCount, 2, 'got _batch() call')
464
+ t.is(spy.getCall(1).thisValue, test, '`this` on _batch() was correct')
465
+ t.is(spy.getCall(1).args.length, 2, 'got 2 arguments')
466
+ t.is(spy.getCall(1).args[0].length, 2, 'got expected array argument')
467
+ t.same(spy.getCall(1).args[0][0], { keyEncoding: 'utf8', valueEncoding: 'utf8', type: 'put', key: 'foo', value: 'bar', options: 1 }, 'got expected array argument[0]')
468
+ t.same(spy.getCall(1).args[0][1], { keyEncoding: 'utf8', type: 'del', key: 'bang', options: 1 }, 'got expected array argument[1]')
469
+ t.same(spy.getCall(1).args[1], { options: 1 }, 'got expected options argument')
470
+ })
471
+
472
+ test('test chained batch() with no operations is a noop', function (t) {
473
+ t.plan(1)
474
+
475
+ const spy = createSpy(async function () {})
476
+ const Test = implement(AbstractLevel, { _batch: spy })
477
+ const test = new Test({ encodings: { utf8: true } })
478
+
479
+ test.once('open', function () {
480
+ test.batch().write().then(function () {
481
+ t.is(spy.callCount, 0, '_batch() call was bypassed')
482
+ })
483
+ })
484
+ })
485
+
486
+ test('test chained batch() (custom _chainedBatch) extensibility', async function (t) {
487
+ const spy = createSpy()
488
+ const Test = implement(AbstractLevel, { _chainedBatch: spy })
489
+ const test = new Test({ encodings: { utf8: true } })
490
+
491
+ await test.open()
492
+
493
+ test.batch()
494
+
495
+ t.is(spy.callCount, 1, 'got _chainedBatch() call')
496
+ t.is(spy.getCall(0).thisValue, test, '`this` on _chainedBatch() was correct')
497
+
498
+ test.batch()
499
+
500
+ t.is(spy.callCount, 2, 'got _chainedBatch() call')
501
+ t.is(spy.getCall(1).thisValue, test, '`this` on _chainedBatch() was correct')
502
+ })
503
+
504
+ test('test AbstractChainedBatch extensibility', async function (t) {
505
+ const Batch = implement(AbstractChainedBatch)
506
+ const db = testCommon.factory()
507
+ await db.open()
508
+ const test = new Batch(db)
509
+ t.ok(test.db === db, 'instance has db reference')
510
+ })
511
+
512
+ test('test AbstractChainedBatch expects a db', function (t) {
513
+ t.plan(1)
514
+
515
+ const Test = implement(AbstractChainedBatch)
516
+
517
+ try {
518
+ // eslint-disable-next-line no-new
519
+ new Test()
520
+ } catch (err) {
521
+ t.is(err.message, 'The first argument must be an abstract-level database, received undefined')
522
+ }
523
+ })
524
+
525
+ test('test AbstractChainedBatch#write() extensibility', async function (t) {
526
+ t.plan(2)
527
+
528
+ const Test = implement(AbstractChainedBatch, {
529
+ async _write (options) {
530
+ t.same(options, {})
531
+ t.is(this, batch, 'thisArg on _write() is correct')
532
+ }
533
+ })
534
+
535
+ const db = testCommon.factory()
536
+ await db.open()
537
+ const batch = new Test(db)
538
+
539
+ // Without any operations, _write isn't called
540
+ batch.put('foo', 'bar')
541
+ return batch.write()
542
+ })
543
+
544
+ test('test AbstractChainedBatch#write() extensibility with null options', async function (t) {
545
+ t.plan(2)
546
+
547
+ const Test = implement(AbstractChainedBatch, {
548
+ async _write (options) {
549
+ t.same(options, {})
550
+ t.is(this, batch, 'thisArg on _write() is correct')
551
+ }
552
+ })
553
+
554
+ const db = testCommon.factory()
555
+ await db.open()
556
+ const batch = new Test(db)
557
+
558
+ // Without any operations, _write isn't called
559
+ batch.put('foo', 'bar')
560
+ return batch.write(null)
561
+ })
562
+
563
+ test('test AbstractChainedBatch#write() extensibility with options', async function (t) {
564
+ t.plan(2)
565
+
566
+ const Test = implement(AbstractChainedBatch, {
567
+ async _write (options) {
568
+ t.same(options, { test: true })
569
+ t.is(this, batch, 'thisArg on _write() is correct')
570
+ }
571
+ })
572
+
573
+ const db = testCommon.factory()
574
+ await db.open()
575
+ const batch = new Test(db)
576
+
577
+ // Without any operations, _write isn't called
578
+ batch.put('foo', 'bar')
579
+ return batch.write({ test: true })
580
+ })
581
+
582
+ test('test AbstractChainedBatch#put() extensibility', function (t) {
583
+ t.plan(8)
584
+
585
+ const spy = createSpy()
586
+ const expectedKey = 'key'
587
+ const expectedValue = 'value'
588
+ const Test = implement(AbstractChainedBatch, { _put: spy })
589
+ const db = testCommon.factory()
590
+
591
+ db.once('open', function () {
592
+ const test = new Test(db)
593
+ const returnValue = test.put(expectedKey, expectedValue)
594
+
595
+ t.is(spy.callCount, 1, 'got _put call')
596
+ t.is(spy.getCall(0).thisValue, test, '`this` on _put() was correct')
597
+ t.is(spy.getCall(0).args.length, 3, 'got 3 arguments')
598
+ t.is(spy.getCall(0).args[0], expectedKey, 'got expected key argument')
599
+ t.is(spy.getCall(0).args[1], expectedValue, 'got expected value argument')
600
+
601
+ // May contain more options, just because it's cheaper to not remove them
602
+ t.is(spy.getCall(0).args[2].keyEncoding, 'utf8', 'got expected keyEncoding option')
603
+ t.is(spy.getCall(0).args[2].valueEncoding, 'utf8', 'got expected valueEncoding option')
604
+
605
+ t.is(returnValue, test, 'get expected return value')
606
+ })
607
+ })
608
+
609
+ test('test AbstractChainedBatch#del() extensibility', function (t) {
610
+ t.plan(6)
611
+
612
+ const spy = createSpy()
613
+ const expectedKey = 'key'
614
+ const Test = implement(AbstractChainedBatch, { _del: spy })
615
+ const db = testCommon.factory()
616
+
617
+ db.once('open', function () {
618
+ const test = new Test(db)
619
+ const returnValue = test.del(expectedKey)
620
+
621
+ t.is(spy.callCount, 1, 'got _del call')
622
+ t.is(spy.getCall(0).thisValue, test, '`this` on _del() was correct')
623
+ t.is(spy.getCall(0).args.length, 2, 'got 2 arguments')
624
+ t.is(spy.getCall(0).args[0], expectedKey, 'got expected key argument')
625
+
626
+ // May contain more options, just because it's cheaper to not remove them
627
+ t.is(spy.getCall(0).args[1].keyEncoding, 'utf8', 'got expected keyEncoding option')
628
+
629
+ t.is(returnValue, test, 'get expected return value')
630
+ })
631
+ })
632
+
633
+ test('test AbstractChainedBatch#clear() extensibility', function (t) {
634
+ t.plan(4)
635
+
636
+ const spy = createSpy()
637
+ const Test = implement(AbstractChainedBatch, { _clear: spy })
638
+ const db = testCommon.factory()
639
+
640
+ db.once('open', function () {
641
+ const test = new Test(db)
642
+ const returnValue = test.clear()
643
+
644
+ t.is(spy.callCount, 1, 'got _clear call')
645
+ t.is(spy.getCall(0).thisValue, test, '`this` on _clear() was correct')
646
+ t.is(spy.getCall(0).args.length, 0, 'got zero arguments')
647
+ t.is(returnValue, test, 'get expected return value')
648
+ })
649
+ })
650
+
651
+ test('test clear() extensibility', async function (t) {
652
+ t.plan((7 * 4) - 3)
653
+
654
+ const spy = createSpy()
655
+ const Test = implement(AbstractLevel, { _clear: spy })
656
+ const db = new Test({ encodings: { utf8: true } })
657
+
658
+ await db.open()
659
+
660
+ call([], { keyEncoding: 'utf8', reverse: false, limit: -1 })
661
+ call([null], { keyEncoding: 'utf8', reverse: false, limit: -1 })
662
+ call([undefined], { keyEncoding: 'utf8', reverse: false, limit: -1 })
663
+ call([{ custom: 1 }], { custom: 1, keyEncoding: 'utf8', reverse: false, limit: -1 })
664
+ call([{ reverse: true, limit: 0 }], { keyEncoding: 'utf8', reverse: true, limit: 0 }, true)
665
+ call([{ reverse: 1 }], { keyEncoding: 'utf8', reverse: true, limit: -1 })
666
+ call([{ reverse: null }], { keyEncoding: 'utf8', reverse: false, limit: -1 })
667
+
668
+ function call (args, expectedOptions, shouldSkipCall) {
669
+ db.clear.apply(db, args).catch(t.fail.bind(t))
670
+
671
+ t.is(spy.callCount, shouldSkipCall ? 0 : 1, 'got _clear() call')
672
+
673
+ if (!shouldSkipCall) {
674
+ t.is(spy.getCall(0).thisValue, db, '`this` on _clear() was correct')
675
+ t.is(spy.getCall(0).args.length, 1, 'got 1 argument')
676
+ t.same(spy.getCall(0).args[0], expectedOptions, 'got expected options argument')
677
+ }
678
+
679
+ spy.resetHistory()
680
+ }
681
+ })
682
+
683
+ // TODO: replace with encoding test
684
+ test.skip('test serialization extensibility (batch array is not mutated)', function (t) {
685
+ t.plan(7)
686
+
687
+ const spy = createSpy()
688
+ const Test = implement(AbstractLevel, {
689
+ _batch: spy,
690
+ _serializeKey: function (key) {
691
+ t.is(key, 'no')
692
+ return 'foo'
693
+ },
694
+ _serializeValue: function (value) {
695
+ t.is(value, 'nope')
696
+ return 'bar'
697
+ }
698
+ })
699
+
700
+ const test = new Test({ encodings: { utf8: true } })
701
+
702
+ test.once('open', function () {
703
+ const op = { type: 'put', key: 'no', value: 'nope' }
704
+
705
+ test.batch([op], function () {})
706
+
707
+ t.is(spy.callCount, 1, 'got _batch() call')
708
+ t.is(spy.getCall(0).args[0][0].key, 'foo', 'got expected key')
709
+ t.is(spy.getCall(0).args[0][0].value, 'bar', 'got expected value')
710
+
711
+ t.is(op.key, 'no', 'did not mutate input key')
712
+ t.is(op.value, 'nope', 'did not mutate input value')
713
+ })
714
+ })
715
+
716
+ test('clear() does not delete empty or nullish range options', function (t) {
717
+ const rangeValues = [Uint8Array.from([]), '', null, undefined]
718
+
719
+ t.plan(rangeOptions.length * rangeValues.length)
720
+
721
+ rangeValues.forEach(function (value) {
722
+ const Test = implement(AbstractLevel, {
723
+ async _clear (options) {
724
+ rangeOptions.forEach(function (key) {
725
+ t.ok(key in options, key + ' option should not be deleted')
726
+ })
727
+ }
728
+ })
729
+
730
+ const db = new Test({ encodings: { utf8: true } })
731
+ const options = {}
732
+
733
+ rangeOptions.forEach(function (key) {
734
+ options[key] = value
735
+ })
736
+
737
+ db.once('open', function () {
738
+ db.clear(options).catch(t.fail.bind(t))
739
+ })
740
+ })
741
+ })
742
+
743
+ test('open error', function (t) {
744
+ t.plan(3)
745
+
746
+ const Test = implement(AbstractLevel, {
747
+ async _open (options) {
748
+ throw new Error('_open error')
749
+ }
750
+ })
751
+
752
+ const test = new Test({ encodings: { utf8: true } })
753
+
754
+ test.open().then(t.fail.bind(t), function (err) {
755
+ t.is(err.code, 'LEVEL_DATABASE_NOT_OPEN')
756
+ t.is(err.cause && err.cause.message, '_open error')
757
+ t.is(test.status, 'closed')
758
+ })
759
+ })
760
+
761
+ test('close error', function (t) {
762
+ t.plan(3)
763
+
764
+ const Test = implement(AbstractLevel, {
765
+ async _close () {
766
+ throw new Error('_close error')
767
+ }
768
+ })
769
+
770
+ const test = new Test({ encodings: { utf8: true } })
771
+ test.open().then(function () {
772
+ test.close().then(t.fail.bind(t), function (err) {
773
+ t.is(err.code, 'LEVEL_DATABASE_NOT_CLOSED')
774
+ t.is(err.cause && err.cause.message, '_close error')
775
+ t.is(test.status, 'open')
776
+ })
777
+ })
778
+ })
779
+
780
+ test('rangeOptions', function (t) {
781
+ const keys = rangeOptions.slice()
782
+ const db = new AbstractLevel({
783
+ encodings: {
784
+ utf8: true, buffer: true, view: true
785
+ }
786
+ })
787
+
788
+ function setupOptions (create) {
789
+ const options = {}
790
+ for (const key of keys) {
791
+ options[key] = create()
792
+ }
793
+ return options
794
+ }
795
+
796
+ function verifyOptions (t, options) {
797
+ for (const key of keys) {
798
+ t.ok(key in options, key + ' option should not be deleted')
799
+ }
800
+ t.end()
801
+ }
802
+
803
+ t.plan(10)
804
+ t.test('setup', async (t) => db.open())
805
+
806
+ t.test('default options', function (t) {
807
+ t.same(getRangeOptions(undefined, db.keyEncoding('utf8')), {
808
+ reverse: false,
809
+ limit: -1
810
+ }, 'correct defaults')
811
+ t.end()
812
+ })
813
+
814
+ t.test('set options', function (t) {
815
+ t.same(getRangeOptions({ reverse: false, limit: 20 }, db.keyEncoding('utf8')), {
816
+ reverse: false,
817
+ limit: 20
818
+ }, 'options set correctly')
819
+ t.end()
820
+ })
821
+
822
+ t.test('ignores invalid limit', function (t) {
823
+ // Infinity is valid but is normalized to -1 for use in private API
824
+ for (const limit of [Number.POSITIVE_INFINITY, Number.NEGATIVE_INFINITY, NaN, -2, 5.5]) {
825
+ t.same(getRangeOptions({ limit }, db.keyEncoding('utf8')).limit, -1)
826
+ }
827
+ t.end()
828
+ })
829
+
830
+ t.test('ignores not-own property', function (t) {
831
+ class Options {}
832
+ Options.prototype.limit = 20
833
+ const options = new Options()
834
+
835
+ t.is(options.limit, 20)
836
+ t.same(getRangeOptions(options, db.keyEncoding('utf8')), {
837
+ reverse: false,
838
+ limit: -1
839
+ })
840
+ t.end()
841
+ })
842
+
843
+ t.test('does not delete empty buffers', function (t) {
844
+ const options = setupOptions(() => Buffer.alloc(0))
845
+ keys.forEach(function (key) {
846
+ t.is(isBuffer(options[key]), true, 'should be buffer')
847
+ t.is(options[key].byteLength, 0, 'should be empty')
848
+ })
849
+ verifyOptions(t, getRangeOptions(options, db.keyEncoding('buffer')))
850
+ })
851
+
852
+ t.test('does not delete empty views', function (t) {
853
+ const options = setupOptions(() => Uint8Array.from([]))
854
+ keys.forEach(function (key) {
855
+ t.is(options[key] instanceof Uint8Array, true, 'should be Uint8Array')
856
+ t.is(options[key].byteLength, 0, 'should be empty')
857
+ })
858
+ verifyOptions(t, getRangeOptions(options, db.keyEncoding('view')))
859
+ })
860
+
861
+ t.test('does not delete empty strings', function (t) {
862
+ const options = setupOptions(() => '')
863
+ keys.forEach(function (key) {
864
+ t.is(typeof options[key], 'string', 'should be string')
865
+ t.is(options[key].length, 0, 'should be empty')
866
+ })
867
+ verifyOptions(t, getRangeOptions(options, db.keyEncoding('utf8')))
868
+ })
869
+
870
+ t.test('does not delete null', function (t) {
871
+ const options = setupOptions(() => null)
872
+ keys.forEach(function (key) {
873
+ t.is(options[key], null)
874
+ })
875
+ verifyOptions(t, getRangeOptions(options, db.keyEncoding('utf8')))
876
+ })
877
+
878
+ t.test('does not delete undefined', function (t) {
879
+ const options = setupOptions(() => undefined)
880
+ keys.forEach(function (key) {
881
+ t.is(options[key], undefined)
882
+ })
883
+ verifyOptions(t, getRangeOptions(options, db.keyEncoding('utf8')))
884
+ })
885
+ })
886
+
887
+ require('./self/deferred-queue-test')
888
+ require('./self/errors-test')
889
+ require('./self/defer-test')
890
+ require('./self/attach-resource-test')
891
+ require('./self/abstract-iterator-test')
892
+ require('./self/iterator-test')
893
+ require('./self/deferred-iterator-test')
894
+ require('./self/deferred-operations-test')
895
+ require('./self/async-iterator-test')
896
+ require('./self/encoding-test')
897
+ require('./self/sublevel-test')
898
+
899
+ // Test the abstract test suite using a minimal implementation
900
+ require('./index')({
901
+ test,
902
+ factory (options) {
903
+ return new MinimalLevel(options)
904
+ }
905
+ })