mcard-js 2.1.41 → 2.1.43

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 (388) hide show
  1. package/dist/{CardCollection-MXTUJV4J.js → CardCollection-7DKJWKAG.js} +3 -2
  2. package/dist/CardCollection-S4RE3RXP.js +10 -0
  3. package/dist/CardCollection-VPN7AAAX.js +10 -0
  4. package/dist/{IndexedDBEngine-2G5KCISA.js → IndexedDBEngine-7JOGM2MM.js} +3 -2
  5. package/dist/IndexedDBEngine-BGZHJK5L.js +12 -0
  6. package/dist/IndexedDBEngine-ZJ442GI7.js +12 -0
  7. package/dist/{LLMRuntime-GIGDMDEZ.js → LLMRuntime-OZNVAPXJ.js} +4 -3
  8. package/dist/{LLMRuntime-LBWUJ7ON.js → LLMRuntime-UPSEDSIK.js} +2 -2
  9. package/dist/{LambdaRuntime-B6D6IQKZ.js → LambdaRuntime-JZ4Q56TI.js} +6 -5
  10. package/dist/LambdaRuntime-PM3OUFHU.js +19 -0
  11. package/dist/LambdaRuntime-WBEK37AF.js +19 -0
  12. package/dist/LambdaRuntime-YKSBAT65.js +19 -0
  13. package/dist/{Loader-3LSJXJQG.js → Loader-7HQVYDPA.js} +2 -2
  14. package/dist/{Loader-BM56B2TX.js → Loader-NYWTV7CQ.js} +4 -3
  15. package/dist/{Loader-CYLAA4XU.js → Loader-OLKPY6HT.js} +3 -3
  16. package/dist/{MCard-H56VOJLR.js → MCard-OYI73CUI.js} +1 -1
  17. package/dist/{MCard-5LIREV2B.js → MCard-XHG3BZC7.js} +2 -2
  18. package/dist/{NetworkRuntime-IAFHPQSX.js → NetworkRuntime-VYCC5HSY.js} +16 -11
  19. package/dist/{NetworkRuntime-JNGKW3DY.js → NetworkRuntime-XQX3LDDI.js} +61 -33
  20. package/dist/{NetworkRuntime-CXPKIAOQ.js → NetworkRuntime-XZR733M5.js} +17 -12
  21. package/dist/{OllamaProvider-QPX2JXL2.js → OllamaProvider-FBZ5WW72.js} +1 -1
  22. package/dist/OllamaProvider-W6TPZNHD.js +9 -0
  23. package/dist/chunk-2NFGZ6PA.js +170 -0
  24. package/dist/{chunk-VXV35I5J.js → chunk-4TYRTQ4V.js} +48 -17
  25. package/dist/chunk-4VWWTGRW.js +497 -0
  26. package/dist/{chunk-4PDYHPR6.js → chunk-5GHZP7E5.js} +4 -2
  27. package/dist/{chunk-42VF42KH.js → chunk-5HZNWJFT.js} +4 -2
  28. package/dist/{chunk-DEYMHG5A.js → chunk-6MG5ZHAP.js} +58 -22
  29. package/dist/{chunk-7V37AAPK.js → chunk-7B4PABOL.js} +16 -7
  30. package/dist/chunk-A5S2PI37.js +47 -0
  31. package/dist/chunk-BFD4WSWU.js +497 -0
  32. package/dist/chunk-BSEFN25Q.js +32 -0
  33. package/dist/{chunk-3LPY36OG.js → chunk-CBEVE7RG.js} +20 -15
  34. package/dist/{chunk-A5AB4WQN.js → chunk-DPA3ZK4Q.js} +30 -21
  35. package/dist/{chunk-5FA54AMM.js → chunk-EJHX3VZL.js} +54 -21
  36. package/dist/{chunk-QXPHMSPA.js → chunk-GNF4WAPV.js} +22 -9
  37. package/dist/{chunk-XPG6B5IW.js → chunk-JHIA2BQK.js} +26 -13
  38. package/dist/{chunk-4I5IZILN.js → chunk-KGPICAQW.js} +10 -7
  39. package/dist/{chunk-4WBJPHZP.js → chunk-MST5AZXJ.js} +17 -8
  40. package/dist/{chunk-K35KFTEA.js → chunk-N6KDHCBC.js} +58 -33
  41. package/dist/{chunk-2R4ESMZB.js → chunk-NFO5NU6B.js} +5 -3
  42. package/dist/chunk-OKWBHCKC.js +170 -0
  43. package/dist/{chunk-FIE4LAJG.js → chunk-OX3K6UZJ.js} +5 -3
  44. package/dist/{chunk-6SEX42H2.js → chunk-R3K7DG7O.js} +21 -16
  45. package/dist/chunk-RB35Z35T.js +44 -0
  46. package/dist/{chunk-AWGFLRLI.js → chunk-SP4YPKPR.js} +51 -318
  47. package/dist/chunk-U7TSFDKX.js +217 -0
  48. package/dist/chunk-UP3SQX56.js +112 -0
  49. package/dist/{chunk-4EUEU4SM.js → chunk-VGIRC3HX.js} +13 -110
  50. package/dist/chunk-WGG7526Z.js +112 -0
  51. package/dist/{chunk-3JBSRALP.js → chunk-WNKP66IR.js} +10 -7
  52. package/dist/{chunk-DOC55MPG.js → chunk-WR6ISHCS.js} +11 -3
  53. package/dist/{chunk-52UNWVOD.js → chunk-ZVOPQ5BM.js} +54 -21
  54. package/dist/chunk-ZZMOPQER.js +217 -0
  55. package/dist/index.browser.cjs +79 -1454
  56. package/dist/index.browser.d.cts +2 -17
  57. package/dist/index.browser.d.ts +2 -17
  58. package/dist/index.browser.js +7 -6
  59. package/dist/index.cjs +306 -1631
  60. package/dist/index.d.cts +3 -1
  61. package/dist/index.d.ts +3 -1
  62. package/dist/index.js +49 -35
  63. package/dist/storage/SqliteNodeEngine.cjs +59 -1335
  64. package/dist/storage/SqliteNodeEngine.js +4 -3
  65. package/dist/storage/SqliteWasmEngine.cjs +57 -1335
  66. package/dist/storage/SqliteWasmEngine.js +4 -3
  67. package/package.json +12 -8
  68. package/dist/CardCollection-4OFJ6XQJ.js +0 -9
  69. package/dist/CardCollection-7PDWM24F.js +0 -9
  70. package/dist/CardCollection-CEFQ5PA6.js +0 -9
  71. package/dist/CardCollection-GUEYGN2Y.js +0 -9
  72. package/dist/CardCollection-KDO4CQ4B.js +0 -9
  73. package/dist/CardCollection-PB7ZY73E.js +0 -9
  74. package/dist/CardCollection-RK4DVH63.js +0 -9
  75. package/dist/CardCollection-T376E3TS.js +0 -9
  76. package/dist/CardCollection-WGCKKUOD.js +0 -9
  77. package/dist/CardCollection-XON2IWDU.js +0 -9
  78. package/dist/CardCollection-ZEI6FMP3.js +0 -9
  79. package/dist/EventProducer-MW6QF4IO.js +0 -47
  80. package/dist/EventProducer-V7RY2KKR.js +0 -47
  81. package/dist/FileIO.d.ts +0 -44
  82. package/dist/FileIO.d.ts.map +0 -1
  83. package/dist/FileIO.js +0 -203
  84. package/dist/FileIO.js.map +0 -1
  85. package/dist/IndexedDBEngine-7JI2CL32.js +0 -10
  86. package/dist/IndexedDBEngine-7OHQIRTI.js +0 -10
  87. package/dist/IndexedDBEngine-E5YJQG4U.js +0 -10
  88. package/dist/IndexedDBEngine-NV625E7L.js +0 -10
  89. package/dist/IndexedDBEngine-RPQS7ILF.js +0 -10
  90. package/dist/IndexedDBEngine-S3ZWCSI7.js +0 -10
  91. package/dist/IndexedDBEngine-T7OC5GRR.js +0 -10
  92. package/dist/LLMRuntime-BKB3CLXM.js +0 -16
  93. package/dist/LLMRuntime-BQUUFLAB.js +0 -16
  94. package/dist/LLMRuntime-TNBC4JCB.js +0 -16
  95. package/dist/LambdaRuntime-4YILF3G7.js +0 -15
  96. package/dist/LambdaRuntime-53TPVENI.js +0 -16
  97. package/dist/LambdaRuntime-73BSWP2G.js +0 -16
  98. package/dist/LambdaRuntime-AL5SBDCA.js +0 -17
  99. package/dist/LambdaRuntime-BYBUI7H5.js +0 -17
  100. package/dist/LambdaRuntime-JDZP3HIQ.js +0 -17
  101. package/dist/LambdaRuntime-JEI7RVWG.js +0 -16
  102. package/dist/LambdaRuntime-LCTHBYMV.js +0 -17
  103. package/dist/LambdaRuntime-LDA3G7IR.js +0 -16
  104. package/dist/LambdaRuntime-LF4FR6YA.js +0 -16
  105. package/dist/LambdaRuntime-O7JBVHO2.js +0 -16
  106. package/dist/LambdaRuntime-OFOTT464.js +0 -17
  107. package/dist/LambdaRuntime-Q6ISCHAD.js +0 -16
  108. package/dist/LambdaRuntime-TCZ42XCB.js +0 -16
  109. package/dist/LambdaRuntime-UKUOKJIW.js +0 -17
  110. package/dist/LambdaRuntime-VKLON4IB.js +0 -17
  111. package/dist/LambdaRuntime-WNYDBTS6.js +0 -16
  112. package/dist/LambdaRuntime-WPTX76CX.js +0 -17
  113. package/dist/Loader-4P7PEBCL.js +0 -11
  114. package/dist/Loader-HQ3QKMYM.js +0 -11
  115. package/dist/Loader-NCATGB67.js +0 -11
  116. package/dist/Loader-NRHGDQBD.js +0 -11
  117. package/dist/Loader-RT4NI6AT.js +0 -11
  118. package/dist/Loader-SSRY57SS.js +0 -11
  119. package/dist/Loader-W72QZ3T7.js +0 -11
  120. package/dist/Loader-WECRIXQW.js +0 -11
  121. package/dist/Loader-XFBIHCQF.js +0 -11
  122. package/dist/Loader.d.ts +0 -34
  123. package/dist/Loader.d.ts.map +0 -1
  124. package/dist/Loader.js +0 -190
  125. package/dist/Loader.js.map +0 -1
  126. package/dist/MCard-4J6WSBRF.js +0 -8
  127. package/dist/MCard-E3MRPTJF.js +0 -8
  128. package/dist/MCard-FCOIB6BP.js +0 -8
  129. package/dist/MCard-G4HUWHY5.js +0 -8
  130. package/dist/MCard-HFL7AFIH.js +0 -8
  131. package/dist/MCard-JOW6RBSO.js +0 -8
  132. package/dist/MCard-M4LKN4U2.js +0 -8
  133. package/dist/MCard-VB7UDUTN.js +0 -8
  134. package/dist/MCard-WOHE6SX6.js +0 -8
  135. package/dist/NetworkRuntime-2H7AQITA.js +0 -1571
  136. package/dist/NetworkRuntime-3MIUBNOF.js +0 -1571
  137. package/dist/NetworkRuntime-AOE2EJIM.js +0 -1571
  138. package/dist/NetworkRuntime-BQMDBUDO.js +0 -1570
  139. package/dist/NetworkRuntime-GMANLCAB.js +0 -1542
  140. package/dist/NetworkRuntime-L7P4VCGK.js +0 -1542
  141. package/dist/NetworkRuntime-LC7SUAOF.js +0 -1542
  142. package/dist/NetworkRuntime-OJWCWPBI.js +0 -1570
  143. package/dist/NetworkRuntime-ZJ3B4T3A.js +0 -1542
  144. package/dist/OllamaProvider-32RC36HD.js +0 -8
  145. package/dist/OllamaProvider-MQXSXLCA.js +0 -8
  146. package/dist/OllamaProvider-Q45BMOVN.js +0 -8
  147. package/dist/SqliteNodeEngine-WKVFWBNH.js +0 -9
  148. package/dist/StorageAdapter-DdDUiIvH.d.cts +0 -391
  149. package/dist/StorageAdapter-DdDUiIvH.d.ts +0 -391
  150. package/dist/StorageAdapter-Dw1BeOam.d.cts +0 -380
  151. package/dist/StorageAdapter-Dw1BeOam.d.ts +0 -380
  152. package/dist/chunk-23GCCCXB.js +0 -402
  153. package/dist/chunk-2ECISK2I.js +0 -354
  154. package/dist/chunk-2MRBTM72.js +0 -354
  155. package/dist/chunk-2THXO6FH.js +0 -2313
  156. package/dist/chunk-2VNRWIBZ.js +0 -389
  157. package/dist/chunk-2VOQRXWH.js +0 -296
  158. package/dist/chunk-34AYBZRO.js +0 -920
  159. package/dist/chunk-37EEYISR.js +0 -372
  160. package/dist/chunk-3E2TKOCZ.js +0 -354
  161. package/dist/chunk-3MMMJ7NH.js +0 -1068
  162. package/dist/chunk-437JTYVP.js +0 -292
  163. package/dist/chunk-4MQINOOG.js +0 -1218
  164. package/dist/chunk-4UIWXZHY.js +0 -1049
  165. package/dist/chunk-53S2EZCY.js +0 -290
  166. package/dist/chunk-5BIDGXA6.js +0 -987
  167. package/dist/chunk-5HXLTWYN.js +0 -296
  168. package/dist/chunk-5W2FDGUF.js +0 -371
  169. package/dist/chunk-6R4ERZMG.js +0 -1136
  170. package/dist/chunk-74YSNHEM.js +0 -2309
  171. package/dist/chunk-7H2BQZDK.js +0 -270
  172. package/dist/chunk-7KEWCCES.js +0 -1136
  173. package/dist/chunk-7PN2BUYF.js +0 -371
  174. package/dist/chunk-A2ZJA2EV.js +0 -389
  175. package/dist/chunk-ARPIBGRP.js +0 -1236
  176. package/dist/chunk-ATHNEEAG.js +0 -2309
  177. package/dist/chunk-AVXJOPUE.js +0 -354
  178. package/dist/chunk-B7VEU4S2.js +0 -204
  179. package/dist/chunk-C2TKISBR.js +0 -1213
  180. package/dist/chunk-CBH4YKB4.js +0 -2309
  181. package/dist/chunk-DP7HBRDL.js +0 -2309
  182. package/dist/chunk-DV7ZSH4W.js +0 -2309
  183. package/dist/chunk-DWXNZ5AJ.js +0 -642
  184. package/dist/chunk-EFKMZTT2.js +0 -270
  185. package/dist/chunk-FXJYXHG6.js +0 -266
  186. package/dist/chunk-G466I6RT.js +0 -229
  187. package/dist/chunk-GATPBTHL.js +0 -1142
  188. package/dist/chunk-GMQAHPBC.js +0 -292
  189. package/dist/chunk-GMWA2IJJ.js +0 -1105
  190. package/dist/chunk-GVX5LDLH.js +0 -371
  191. package/dist/chunk-HGENNKOJ.js +0 -355
  192. package/dist/chunk-HM2NBYHU.js +0 -292
  193. package/dist/chunk-IZWB5GCG.js +0 -389
  194. package/dist/chunk-J4HOFUKM.js +0 -2309
  195. package/dist/chunk-JIK2G3EH.js +0 -2313
  196. package/dist/chunk-JRXNWGSW.js +0 -1136
  197. package/dist/chunk-KRKK3KP6.js +0 -1081
  198. package/dist/chunk-KYXZHRUG.js +0 -389
  199. package/dist/chunk-L36L2VDL.js +0 -371
  200. package/dist/chunk-L5PZCES6.js +0 -204
  201. package/dist/chunk-L5U77ZEM.js +0 -1142
  202. package/dist/chunk-LQEKGX2T.js +0 -204
  203. package/dist/chunk-LWMUDMMQ.js +0 -1144
  204. package/dist/chunk-MLKGABMK.js +0 -9
  205. package/dist/chunk-NZ6OQ7UT.js +0 -92
  206. package/dist/chunk-O2UMNZGF.js +0 -903
  207. package/dist/chunk-OFHDMLNM.js +0 -355
  208. package/dist/chunk-PDBMNUMB.js +0 -316
  209. package/dist/chunk-PW4XS7M3.js +0 -850
  210. package/dist/chunk-QA2XQMMJ.js +0 -2313
  211. package/dist/chunk-QL2JFNA7.js +0 -389
  212. package/dist/chunk-QPZ2HNSU.js +0 -912
  213. package/dist/chunk-QVGVU6OS.js +0 -296
  214. package/dist/chunk-RCEU7PFH.js +0 -270
  215. package/dist/chunk-RSTKX7WM.js +0 -907
  216. package/dist/chunk-RXL2CW64.js +0 -266
  217. package/dist/chunk-RXUF6Y43.js +0 -2309
  218. package/dist/chunk-SIAA4J6H.js +0 -21
  219. package/dist/chunk-SOJ2UMO2.js +0 -986
  220. package/dist/chunk-T3AG6DXY.js +0 -296
  221. package/dist/chunk-TPCNKMGZ.js +0 -355
  222. package/dist/chunk-TPT3S5AX.js +0 -204
  223. package/dist/chunk-TXWGIEVH.js +0 -2313
  224. package/dist/chunk-TZFI54AU.js +0 -2313
  225. package/dist/chunk-U3FWUPD3.js +0 -717
  226. package/dist/chunk-UFW2VW2D.js +0 -266
  227. package/dist/chunk-UTAOS5Y7.js +0 -2313
  228. package/dist/chunk-V7VX5OJ6.js +0 -389
  229. package/dist/chunk-W2XGNMYB.js +0 -355
  230. package/dist/chunk-W3M4HJ4U.js +0 -2309
  231. package/dist/chunk-WMJGGREP.js +0 -296
  232. package/dist/chunk-WTNVQ5WS.js +0 -732
  233. package/dist/chunk-WVFWNVT2.js +0 -1050
  234. package/dist/chunk-WY7EYSYC.js +0 -1236
  235. package/dist/chunk-X42F7DE3.js +0 -373
  236. package/dist/chunk-XC7Y4I7L.js +0 -290
  237. package/dist/chunk-YFULZTKP.js +0 -270
  238. package/dist/chunk-YSVHXKSZ.js +0 -373
  239. package/dist/chunk-YWGVK5OS.js +0 -292
  240. package/dist/chunk-Z4BRNTO5.js +0 -2313
  241. package/dist/chunk-ZDUXDKPD.js +0 -292
  242. package/dist/chunk-ZXQ2W7LO.js +0 -355
  243. package/dist/chunk-ZXQELXXO.js +0 -378
  244. package/dist/index.browser.d.ts.map +0 -1
  245. package/dist/index.browser.js.map +0 -1
  246. package/dist/index.d.ts.map +0 -1
  247. package/dist/index.js.map +0 -1
  248. package/dist/lib-4XS34IPZ.js +0 -778
  249. package/dist/model/CardCollection.d.ts +0 -147
  250. package/dist/model/CardCollection.d.ts.map +0 -1
  251. package/dist/model/CardCollection.js +0 -272
  252. package/dist/model/CardCollection.js.map +0 -1
  253. package/dist/model/ContentTypeInterpreter.d.ts +0 -28
  254. package/dist/model/ContentTypeInterpreter.d.ts.map +0 -1
  255. package/dist/model/ContentTypeInterpreter.js +0 -147
  256. package/dist/model/ContentTypeInterpreter.js.map +0 -1
  257. package/dist/model/EventProducer.d.ts +0 -10
  258. package/dist/model/EventProducer.d.ts.map +0 -1
  259. package/dist/model/EventProducer.js +0 -46
  260. package/dist/model/EventProducer.js.map +0 -1
  261. package/dist/model/GTime.d.ts +0 -44
  262. package/dist/model/GTime.d.ts.map +0 -1
  263. package/dist/model/GTime.js +0 -91
  264. package/dist/model/GTime.js.map +0 -1
  265. package/dist/model/Handle.d.ts +0 -37
  266. package/dist/model/Handle.d.ts.map +0 -1
  267. package/dist/model/Handle.js +0 -90
  268. package/dist/model/Handle.js.map +0 -1
  269. package/dist/model/MCard.d.ts +0 -145
  270. package/dist/model/MCard.d.ts.map +0 -1
  271. package/dist/model/MCard.js +0 -180
  272. package/dist/model/MCard.js.map +0 -1
  273. package/dist/model/PCard.d.ts +0 -271
  274. package/dist/model/PCard.d.ts.map +0 -1
  275. package/dist/model/PCard.js +0 -558
  276. package/dist/model/PCard.js.map +0 -1
  277. package/dist/model/VCard.d.ts +0 -277
  278. package/dist/model/VCard.d.ts.map +0 -1
  279. package/dist/model/VCard.js +0 -573
  280. package/dist/model/VCard.js.map +0 -1
  281. package/dist/model/constants.d.ts +0 -45
  282. package/dist/model/constants.d.ts.map +0 -1
  283. package/dist/model/constants.js +0 -27
  284. package/dist/model/constants.js.map +0 -1
  285. package/dist/model/vcard_vocabulary.d.ts +0 -174
  286. package/dist/model/vcard_vocabulary.d.ts.map +0 -1
  287. package/dist/model/vcard_vocabulary.js +0 -187
  288. package/dist/model/vcard_vocabulary.js.map +0 -1
  289. package/dist/monads/Either.d.ts +0 -51
  290. package/dist/monads/Either.d.ts.map +0 -1
  291. package/dist/monads/Either.js +0 -82
  292. package/dist/monads/Either.js.map +0 -1
  293. package/dist/monads/IO.d.ts +0 -38
  294. package/dist/monads/IO.d.ts.map +0 -1
  295. package/dist/monads/IO.js +0 -66
  296. package/dist/monads/IO.js.map +0 -1
  297. package/dist/monads/Maybe.d.ts +0 -45
  298. package/dist/monads/Maybe.d.ts.map +0 -1
  299. package/dist/monads/Maybe.js +0 -73
  300. package/dist/monads/Maybe.js.map +0 -1
  301. package/dist/monads/Reader.d.ts +0 -29
  302. package/dist/monads/Reader.d.ts.map +0 -1
  303. package/dist/monads/Reader.js +0 -44
  304. package/dist/monads/Reader.js.map +0 -1
  305. package/dist/monads/State.d.ts +0 -33
  306. package/dist/monads/State.d.ts.map +0 -1
  307. package/dist/monads/State.js +0 -50
  308. package/dist/monads/State.js.map +0 -1
  309. package/dist/monads/Writer.d.ts +0 -29
  310. package/dist/monads/Writer.d.ts.map +0 -1
  311. package/dist/monads/Writer.js +0 -46
  312. package/dist/monads/Writer.js.map +0 -1
  313. package/dist/ptr/Bridgelet.d.ts +0 -180
  314. package/dist/ptr/Bridgelet.d.ts.map +0 -1
  315. package/dist/ptr/Bridgelet.js +0 -296
  316. package/dist/ptr/Bridgelet.js.map +0 -1
  317. package/dist/ptr/CLMIntrospection.d.ts +0 -169
  318. package/dist/ptr/CLMIntrospection.d.ts.map +0 -1
  319. package/dist/ptr/CLMIntrospection.js +0 -329
  320. package/dist/ptr/CLMIntrospection.js.map +0 -1
  321. package/dist/ptr/FaroSidecar.d.ts +0 -56
  322. package/dist/ptr/FaroSidecar.d.ts.map +0 -1
  323. package/dist/ptr/FaroSidecar.js +0 -102
  324. package/dist/ptr/FaroSidecar.js.map +0 -1
  325. package/dist/ptr/LensProtocol.d.ts +0 -84
  326. package/dist/ptr/LensProtocol.d.ts.map +0 -1
  327. package/dist/ptr/LensProtocol.js +0 -98
  328. package/dist/ptr/LensProtocol.js.map +0 -1
  329. package/dist/ptr/OpenTelemetrySidecar.d.ts +0 -144
  330. package/dist/ptr/OpenTelemetrySidecar.d.ts.map +0 -1
  331. package/dist/ptr/OpenTelemetrySidecar.js +0 -232
  332. package/dist/ptr/OpenTelemetrySidecar.js.map +0 -1
  333. package/dist/ptr/SandboxWorker.d.ts +0 -79
  334. package/dist/ptr/SandboxWorker.d.ts.map +0 -1
  335. package/dist/ptr/SandboxWorker.js +0 -298
  336. package/dist/ptr/SandboxWorker.js.map +0 -1
  337. package/dist/ptr/common_types.d.ts +0 -39
  338. package/dist/ptr/common_types.d.ts.map +0 -1
  339. package/dist/ptr/common_types.js +0 -12
  340. package/dist/ptr/common_types.js.map +0 -1
  341. package/dist/rag/GraphRAGEngine.d.ts +0 -26
  342. package/dist/rag/GraphRAGEngine.d.ts.map +0 -1
  343. package/dist/rag/GraphRAGEngine.js +0 -166
  344. package/dist/rag/GraphRAGEngine.js.map +0 -1
  345. package/dist/rag/HandleVectorStore.d.ts +0 -201
  346. package/dist/rag/HandleVectorStore.d.ts.map +0 -1
  347. package/dist/rag/HandleVectorStore.js +0 -527
  348. package/dist/rag/HandleVectorStore.js.map +0 -1
  349. package/dist/rag/PersistentIndexer.d.ts +0 -148
  350. package/dist/rag/PersistentIndexer.d.ts.map +0 -1
  351. package/dist/rag/PersistentIndexer.js +0 -302
  352. package/dist/rag/PersistentIndexer.js.map +0 -1
  353. package/dist/rag/index.d.ts +0 -20
  354. package/dist/rag/index.d.ts.map +0 -1
  355. package/dist/rag/index.js +0 -26
  356. package/dist/rag/index.js.map +0 -1
  357. package/dist/rag/semanticVersioning.d.ts +0 -187
  358. package/dist/rag/semanticVersioning.d.ts.map +0 -1
  359. package/dist/rag/semanticVersioning.js +0 -253
  360. package/dist/rag/semanticVersioning.js.map +0 -1
  361. package/dist/storage/IndexedDBEngine.d.ts +0 -33
  362. package/dist/storage/IndexedDBEngine.d.ts.map +0 -1
  363. package/dist/storage/IndexedDBEngine.js +0 -198
  364. package/dist/storage/IndexedDBEngine.js.map +0 -1
  365. package/dist/storage/SqliteNodeEngine.d.ts.map +0 -1
  366. package/dist/storage/SqliteNodeEngine.js.map +0 -1
  367. package/dist/storage/SqliteWasmEngine.d.ts.map +0 -1
  368. package/dist/storage/SqliteWasmEngine.js.map +0 -1
  369. package/dist/storage/StorageAdapter.d.ts +0 -42
  370. package/dist/storage/StorageAdapter.d.ts.map +0 -1
  371. package/dist/storage/StorageAdapter.js +0 -2
  372. package/dist/storage/StorageAdapter.js.map +0 -1
  373. package/dist/storage/VectorStore.d.ts +0 -202
  374. package/dist/storage/VectorStore.d.ts.map +0 -1
  375. package/dist/storage/VectorStore.js +0 -557
  376. package/dist/storage/VectorStore.js.map +0 -1
  377. package/dist/storage/schema.d.ts +0 -162
  378. package/dist/storage/schema.d.ts.map +0 -1
  379. package/dist/storage/schema.js +0 -335
  380. package/dist/storage/schema.js.map +0 -1
  381. package/dist/storage/schema_constants.d.ts +0 -7
  382. package/dist/storage/schema_constants.d.ts.map +0 -1
  383. package/dist/storage/schema_constants.js +0 -415
  384. package/dist/storage/schema_constants.js.map +0 -1
  385. package/dist/types/dots.d.ts +0 -206
  386. package/dist/types/dots.d.ts.map +0 -1
  387. package/dist/types/dots.js +0 -201
  388. package/dist/types/dots.js.map +0 -1
@@ -1,778 +0,0 @@
1
- import {
2
- __commonJS,
3
- __require
4
- } from "./chunk-SIAA4J6H.js";
5
-
6
- // node_modules/better-sqlite3/lib/util.js
7
- var require_util = __commonJS({
8
- "node_modules/better-sqlite3/lib/util.js"(exports) {
9
- "use strict";
10
- exports.getBooleanOption = (options, key) => {
11
- let value = false;
12
- if (key in options && typeof (value = options[key]) !== "boolean") {
13
- throw new TypeError(`Expected the "${key}" option to be a boolean`);
14
- }
15
- return value;
16
- };
17
- exports.cppdb = /* @__PURE__ */ Symbol();
18
- exports.inspect = /* @__PURE__ */ Symbol.for("nodejs.util.inspect.custom");
19
- }
20
- });
21
-
22
- // node_modules/better-sqlite3/lib/sqlite-error.js
23
- var require_sqlite_error = __commonJS({
24
- "node_modules/better-sqlite3/lib/sqlite-error.js"(exports, module) {
25
- "use strict";
26
- var descriptor = { value: "SqliteError", writable: true, enumerable: false, configurable: true };
27
- function SqliteError(message, code) {
28
- if (new.target !== SqliteError) {
29
- return new SqliteError(message, code);
30
- }
31
- if (typeof code !== "string") {
32
- throw new TypeError("Expected second argument to be a string");
33
- }
34
- Error.call(this, message);
35
- descriptor.value = "" + message;
36
- Object.defineProperty(this, "message", descriptor);
37
- Error.captureStackTrace(this, SqliteError);
38
- this.code = code;
39
- }
40
- Object.setPrototypeOf(SqliteError, Error);
41
- Object.setPrototypeOf(SqliteError.prototype, Error.prototype);
42
- Object.defineProperty(SqliteError.prototype, "name", descriptor);
43
- module.exports = SqliteError;
44
- }
45
- });
46
-
47
- // node_modules/file-uri-to-path/index.js
48
- var require_file_uri_to_path = __commonJS({
49
- "node_modules/file-uri-to-path/index.js"(exports, module) {
50
- "use strict";
51
- var sep = __require("path").sep || "/";
52
- module.exports = fileUriToPath;
53
- function fileUriToPath(uri) {
54
- if ("string" != typeof uri || uri.length <= 7 || "file://" != uri.substring(0, 7)) {
55
- throw new TypeError("must pass in a file:// URI to convert to a file path");
56
- }
57
- var rest = decodeURI(uri.substring(7));
58
- var firstSlash = rest.indexOf("/");
59
- var host = rest.substring(0, firstSlash);
60
- var path = rest.substring(firstSlash + 1);
61
- if ("localhost" == host) host = "";
62
- if (host) {
63
- host = sep + sep + host;
64
- }
65
- path = path.replace(/^(.+)\|/, "$1:");
66
- if (sep == "\\") {
67
- path = path.replace(/\//g, "\\");
68
- }
69
- if (/^.+\:/.test(path)) {
70
- } else {
71
- path = sep + path;
72
- }
73
- return host + path;
74
- }
75
- }
76
- });
77
-
78
- // node_modules/bindings/bindings.js
79
- var require_bindings = __commonJS({
80
- "node_modules/bindings/bindings.js"(exports, module) {
81
- "use strict";
82
- var fs = __require("fs");
83
- var path = __require("path");
84
- var fileURLToPath = require_file_uri_to_path();
85
- var join = path.join;
86
- var dirname = path.dirname;
87
- var exists = fs.accessSync && function(path2) {
88
- try {
89
- fs.accessSync(path2);
90
- } catch (e) {
91
- return false;
92
- }
93
- return true;
94
- } || fs.existsSync || path.existsSync;
95
- var defaults = {
96
- arrow: process.env.NODE_BINDINGS_ARROW || " \u2192 ",
97
- compiled: process.env.NODE_BINDINGS_COMPILED_DIR || "compiled",
98
- platform: process.platform,
99
- arch: process.arch,
100
- nodePreGyp: "node-v" + process.versions.modules + "-" + process.platform + "-" + process.arch,
101
- version: process.versions.node,
102
- bindings: "bindings.node",
103
- try: [
104
- // node-gyp's linked version in the "build" dir
105
- ["module_root", "build", "bindings"],
106
- // node-waf and gyp_addon (a.k.a node-gyp)
107
- ["module_root", "build", "Debug", "bindings"],
108
- ["module_root", "build", "Release", "bindings"],
109
- // Debug files, for development (legacy behavior, remove for node v0.9)
110
- ["module_root", "out", "Debug", "bindings"],
111
- ["module_root", "Debug", "bindings"],
112
- // Release files, but manually compiled (legacy behavior, remove for node v0.9)
113
- ["module_root", "out", "Release", "bindings"],
114
- ["module_root", "Release", "bindings"],
115
- // Legacy from node-waf, node <= 0.4.x
116
- ["module_root", "build", "default", "bindings"],
117
- // Production "Release" buildtype binary (meh...)
118
- ["module_root", "compiled", "version", "platform", "arch", "bindings"],
119
- // node-qbs builds
120
- ["module_root", "addon-build", "release", "install-root", "bindings"],
121
- ["module_root", "addon-build", "debug", "install-root", "bindings"],
122
- ["module_root", "addon-build", "default", "install-root", "bindings"],
123
- // node-pre-gyp path ./lib/binding/{node_abi}-{platform}-{arch}
124
- ["module_root", "lib", "binding", "nodePreGyp", "bindings"]
125
- ]
126
- };
127
- function bindings(opts) {
128
- if (typeof opts == "string") {
129
- opts = { bindings: opts };
130
- } else if (!opts) {
131
- opts = {};
132
- }
133
- Object.keys(defaults).map(function(i2) {
134
- if (!(i2 in opts)) opts[i2] = defaults[i2];
135
- });
136
- if (!opts.module_root) {
137
- opts.module_root = exports.getRoot(exports.getFileName());
138
- }
139
- if (path.extname(opts.bindings) != ".node") {
140
- opts.bindings += ".node";
141
- }
142
- var requireFunc = typeof __webpack_require__ === "function" ? __non_webpack_require__ : __require;
143
- var tries = [], i = 0, l = opts.try.length, n, b, err;
144
- for (; i < l; i++) {
145
- n = join.apply(
146
- null,
147
- opts.try[i].map(function(p) {
148
- return opts[p] || p;
149
- })
150
- );
151
- tries.push(n);
152
- try {
153
- b = opts.path ? requireFunc.resolve(n) : requireFunc(n);
154
- if (!opts.path) {
155
- b.path = n;
156
- }
157
- return b;
158
- } catch (e) {
159
- if (e.code !== "MODULE_NOT_FOUND" && e.code !== "QUALIFIED_PATH_RESOLUTION_FAILED" && !/not find/i.test(e.message)) {
160
- throw e;
161
- }
162
- }
163
- }
164
- err = new Error(
165
- "Could not locate the bindings file. Tried:\n" + tries.map(function(a) {
166
- return opts.arrow + a;
167
- }).join("\n")
168
- );
169
- err.tries = tries;
170
- throw err;
171
- }
172
- module.exports = exports = bindings;
173
- exports.getFileName = function getFileName(calling_file) {
174
- var origPST = Error.prepareStackTrace, origSTL = Error.stackTraceLimit, dummy = {}, fileName;
175
- Error.stackTraceLimit = 10;
176
- Error.prepareStackTrace = function(e, st) {
177
- for (var i = 0, l = st.length; i < l; i++) {
178
- fileName = st[i].getFileName();
179
- if (fileName !== __filename) {
180
- if (calling_file) {
181
- if (fileName !== calling_file) {
182
- return;
183
- }
184
- } else {
185
- return;
186
- }
187
- }
188
- }
189
- };
190
- Error.captureStackTrace(dummy);
191
- dummy.stack;
192
- Error.prepareStackTrace = origPST;
193
- Error.stackTraceLimit = origSTL;
194
- var fileSchema = "file://";
195
- if (fileName.indexOf(fileSchema) === 0) {
196
- fileName = fileURLToPath(fileName);
197
- }
198
- return fileName;
199
- };
200
- exports.getRoot = function getRoot(file) {
201
- var dir = dirname(file), prev;
202
- while (true) {
203
- if (dir === ".") {
204
- dir = process.cwd();
205
- }
206
- if (exists(join(dir, "package.json")) || exists(join(dir, "node_modules"))) {
207
- return dir;
208
- }
209
- if (prev === dir) {
210
- throw new Error(
211
- 'Could not find module root given file: "' + file + '". Do you have a `package.json` file? '
212
- );
213
- }
214
- prev = dir;
215
- dir = join(dir, "..");
216
- }
217
- };
218
- }
219
- });
220
-
221
- // node_modules/better-sqlite3/lib/methods/wrappers.js
222
- var require_wrappers = __commonJS({
223
- "node_modules/better-sqlite3/lib/methods/wrappers.js"(exports) {
224
- "use strict";
225
- var { cppdb } = require_util();
226
- exports.prepare = function prepare(sql) {
227
- return this[cppdb].prepare(sql, this, false);
228
- };
229
- exports.exec = function exec(sql) {
230
- this[cppdb].exec(sql);
231
- return this;
232
- };
233
- exports.close = function close() {
234
- this[cppdb].close();
235
- return this;
236
- };
237
- exports.loadExtension = function loadExtension(...args) {
238
- this[cppdb].loadExtension(...args);
239
- return this;
240
- };
241
- exports.defaultSafeIntegers = function defaultSafeIntegers(...args) {
242
- this[cppdb].defaultSafeIntegers(...args);
243
- return this;
244
- };
245
- exports.unsafeMode = function unsafeMode(...args) {
246
- this[cppdb].unsafeMode(...args);
247
- return this;
248
- };
249
- exports.getters = {
250
- name: {
251
- get: function name() {
252
- return this[cppdb].name;
253
- },
254
- enumerable: true
255
- },
256
- open: {
257
- get: function open() {
258
- return this[cppdb].open;
259
- },
260
- enumerable: true
261
- },
262
- inTransaction: {
263
- get: function inTransaction() {
264
- return this[cppdb].inTransaction;
265
- },
266
- enumerable: true
267
- },
268
- readonly: {
269
- get: function readonly() {
270
- return this[cppdb].readonly;
271
- },
272
- enumerable: true
273
- },
274
- memory: {
275
- get: function memory() {
276
- return this[cppdb].memory;
277
- },
278
- enumerable: true
279
- }
280
- };
281
- }
282
- });
283
-
284
- // node_modules/better-sqlite3/lib/methods/transaction.js
285
- var require_transaction = __commonJS({
286
- "node_modules/better-sqlite3/lib/methods/transaction.js"(exports, module) {
287
- "use strict";
288
- var { cppdb } = require_util();
289
- var controllers = /* @__PURE__ */ new WeakMap();
290
- module.exports = function transaction(fn) {
291
- if (typeof fn !== "function") throw new TypeError("Expected first argument to be a function");
292
- const db = this[cppdb];
293
- const controller = getController(db, this);
294
- const { apply } = Function.prototype;
295
- const properties = {
296
- default: { value: wrapTransaction(apply, fn, db, controller.default) },
297
- deferred: { value: wrapTransaction(apply, fn, db, controller.deferred) },
298
- immediate: { value: wrapTransaction(apply, fn, db, controller.immediate) },
299
- exclusive: { value: wrapTransaction(apply, fn, db, controller.exclusive) },
300
- database: { value: this, enumerable: true }
301
- };
302
- Object.defineProperties(properties.default.value, properties);
303
- Object.defineProperties(properties.deferred.value, properties);
304
- Object.defineProperties(properties.immediate.value, properties);
305
- Object.defineProperties(properties.exclusive.value, properties);
306
- return properties.default.value;
307
- };
308
- var getController = (db, self) => {
309
- let controller = controllers.get(db);
310
- if (!controller) {
311
- const shared = {
312
- commit: db.prepare("COMMIT", self, false),
313
- rollback: db.prepare("ROLLBACK", self, false),
314
- savepoint: db.prepare("SAVEPOINT ` _bs3. `", self, false),
315
- release: db.prepare("RELEASE ` _bs3. `", self, false),
316
- rollbackTo: db.prepare("ROLLBACK TO ` _bs3. `", self, false)
317
- };
318
- controllers.set(db, controller = {
319
- default: Object.assign({ begin: db.prepare("BEGIN", self, false) }, shared),
320
- deferred: Object.assign({ begin: db.prepare("BEGIN DEFERRED", self, false) }, shared),
321
- immediate: Object.assign({ begin: db.prepare("BEGIN IMMEDIATE", self, false) }, shared),
322
- exclusive: Object.assign({ begin: db.prepare("BEGIN EXCLUSIVE", self, false) }, shared)
323
- });
324
- }
325
- return controller;
326
- };
327
- var wrapTransaction = (apply, fn, db, { begin, commit, rollback, savepoint, release, rollbackTo }) => function sqliteTransaction() {
328
- let before, after, undo;
329
- if (db.inTransaction) {
330
- before = savepoint;
331
- after = release;
332
- undo = rollbackTo;
333
- } else {
334
- before = begin;
335
- after = commit;
336
- undo = rollback;
337
- }
338
- before.run();
339
- try {
340
- const result = apply.call(fn, this, arguments);
341
- if (result && typeof result.then === "function") {
342
- throw new TypeError("Transaction function cannot return a promise");
343
- }
344
- after.run();
345
- return result;
346
- } catch (ex) {
347
- if (db.inTransaction) {
348
- undo.run();
349
- if (undo !== rollback) after.run();
350
- }
351
- throw ex;
352
- }
353
- };
354
- }
355
- });
356
-
357
- // node_modules/better-sqlite3/lib/methods/pragma.js
358
- var require_pragma = __commonJS({
359
- "node_modules/better-sqlite3/lib/methods/pragma.js"(exports, module) {
360
- "use strict";
361
- var { getBooleanOption, cppdb } = require_util();
362
- module.exports = function pragma(source, options) {
363
- if (options == null) options = {};
364
- if (typeof source !== "string") throw new TypeError("Expected first argument to be a string");
365
- if (typeof options !== "object") throw new TypeError("Expected second argument to be an options object");
366
- const simple = getBooleanOption(options, "simple");
367
- const stmt = this[cppdb].prepare(`PRAGMA ${source}`, this, true);
368
- return simple ? stmt.pluck().get() : stmt.all();
369
- };
370
- }
371
- });
372
-
373
- // node_modules/better-sqlite3/lib/methods/backup.js
374
- var require_backup = __commonJS({
375
- "node_modules/better-sqlite3/lib/methods/backup.js"(exports, module) {
376
- "use strict";
377
- var fs = __require("fs");
378
- var path = __require("path");
379
- var { promisify } = __require("util");
380
- var { cppdb } = require_util();
381
- var fsAccess = promisify(fs.access);
382
- module.exports = async function backup(filename, options) {
383
- if (options == null) options = {};
384
- if (typeof filename !== "string") throw new TypeError("Expected first argument to be a string");
385
- if (typeof options !== "object") throw new TypeError("Expected second argument to be an options object");
386
- filename = filename.trim();
387
- const attachedName = "attached" in options ? options.attached : "main";
388
- const handler = "progress" in options ? options.progress : null;
389
- if (!filename) throw new TypeError("Backup filename cannot be an empty string");
390
- if (filename === ":memory:") throw new TypeError('Invalid backup filename ":memory:"');
391
- if (typeof attachedName !== "string") throw new TypeError('Expected the "attached" option to be a string');
392
- if (!attachedName) throw new TypeError('The "attached" option cannot be an empty string');
393
- if (handler != null && typeof handler !== "function") throw new TypeError('Expected the "progress" option to be a function');
394
- await fsAccess(path.dirname(filename)).catch(() => {
395
- throw new TypeError("Cannot save backup because the directory does not exist");
396
- });
397
- const isNewFile = await fsAccess(filename).then(() => false, () => true);
398
- return runBackup(this[cppdb].backup(this, attachedName, filename, isNewFile), handler || null);
399
- };
400
- var runBackup = (backup, handler) => {
401
- let rate = 0;
402
- let useDefault = true;
403
- return new Promise((resolve, reject) => {
404
- setImmediate(function step() {
405
- try {
406
- const progress = backup.transfer(rate);
407
- if (!progress.remainingPages) {
408
- backup.close();
409
- resolve(progress);
410
- return;
411
- }
412
- if (useDefault) {
413
- useDefault = false;
414
- rate = 100;
415
- }
416
- if (handler) {
417
- const ret = handler(progress);
418
- if (ret !== void 0) {
419
- if (typeof ret === "number" && ret === ret) rate = Math.max(0, Math.min(2147483647, Math.round(ret)));
420
- else throw new TypeError("Expected progress callback to return a number or undefined");
421
- }
422
- }
423
- setImmediate(step);
424
- } catch (err) {
425
- backup.close();
426
- reject(err);
427
- }
428
- });
429
- });
430
- };
431
- }
432
- });
433
-
434
- // node_modules/better-sqlite3/lib/methods/serialize.js
435
- var require_serialize = __commonJS({
436
- "node_modules/better-sqlite3/lib/methods/serialize.js"(exports, module) {
437
- "use strict";
438
- var { cppdb } = require_util();
439
- module.exports = function serialize(options) {
440
- if (options == null) options = {};
441
- if (typeof options !== "object") throw new TypeError("Expected first argument to be an options object");
442
- const attachedName = "attached" in options ? options.attached : "main";
443
- if (typeof attachedName !== "string") throw new TypeError('Expected the "attached" option to be a string');
444
- if (!attachedName) throw new TypeError('The "attached" option cannot be an empty string');
445
- return this[cppdb].serialize(attachedName);
446
- };
447
- }
448
- });
449
-
450
- // node_modules/better-sqlite3/lib/methods/function.js
451
- var require_function = __commonJS({
452
- "node_modules/better-sqlite3/lib/methods/function.js"(exports, module) {
453
- "use strict";
454
- var { getBooleanOption, cppdb } = require_util();
455
- module.exports = function defineFunction(name, options, fn) {
456
- if (options == null) options = {};
457
- if (typeof options === "function") {
458
- fn = options;
459
- options = {};
460
- }
461
- if (typeof name !== "string") throw new TypeError("Expected first argument to be a string");
462
- if (typeof fn !== "function") throw new TypeError("Expected last argument to be a function");
463
- if (typeof options !== "object") throw new TypeError("Expected second argument to be an options object");
464
- if (!name) throw new TypeError("User-defined function name cannot be an empty string");
465
- const safeIntegers = "safeIntegers" in options ? +getBooleanOption(options, "safeIntegers") : 2;
466
- const deterministic = getBooleanOption(options, "deterministic");
467
- const directOnly = getBooleanOption(options, "directOnly");
468
- const varargs = getBooleanOption(options, "varargs");
469
- let argCount = -1;
470
- if (!varargs) {
471
- argCount = fn.length;
472
- if (!Number.isInteger(argCount) || argCount < 0) throw new TypeError("Expected function.length to be a positive integer");
473
- if (argCount > 100) throw new RangeError("User-defined functions cannot have more than 100 arguments");
474
- }
475
- this[cppdb].function(fn, name, argCount, safeIntegers, deterministic, directOnly);
476
- return this;
477
- };
478
- }
479
- });
480
-
481
- // node_modules/better-sqlite3/lib/methods/aggregate.js
482
- var require_aggregate = __commonJS({
483
- "node_modules/better-sqlite3/lib/methods/aggregate.js"(exports, module) {
484
- "use strict";
485
- var { getBooleanOption, cppdb } = require_util();
486
- module.exports = function defineAggregate(name, options) {
487
- if (typeof name !== "string") throw new TypeError("Expected first argument to be a string");
488
- if (typeof options !== "object" || options === null) throw new TypeError("Expected second argument to be an options object");
489
- if (!name) throw new TypeError("User-defined function name cannot be an empty string");
490
- const start = "start" in options ? options.start : null;
491
- const step = getFunctionOption(options, "step", true);
492
- const inverse = getFunctionOption(options, "inverse", false);
493
- const result = getFunctionOption(options, "result", false);
494
- const safeIntegers = "safeIntegers" in options ? +getBooleanOption(options, "safeIntegers") : 2;
495
- const deterministic = getBooleanOption(options, "deterministic");
496
- const directOnly = getBooleanOption(options, "directOnly");
497
- const varargs = getBooleanOption(options, "varargs");
498
- let argCount = -1;
499
- if (!varargs) {
500
- argCount = Math.max(getLength(step), inverse ? getLength(inverse) : 0);
501
- if (argCount > 0) argCount -= 1;
502
- if (argCount > 100) throw new RangeError("User-defined functions cannot have more than 100 arguments");
503
- }
504
- this[cppdb].aggregate(start, step, inverse, result, name, argCount, safeIntegers, deterministic, directOnly);
505
- return this;
506
- };
507
- var getFunctionOption = (options, key, required) => {
508
- const value = key in options ? options[key] : null;
509
- if (typeof value === "function") return value;
510
- if (value != null) throw new TypeError(`Expected the "${key}" option to be a function`);
511
- if (required) throw new TypeError(`Missing required option "${key}"`);
512
- return null;
513
- };
514
- var getLength = ({ length }) => {
515
- if (Number.isInteger(length) && length >= 0) return length;
516
- throw new TypeError("Expected function.length to be a positive integer");
517
- };
518
- }
519
- });
520
-
521
- // node_modules/better-sqlite3/lib/methods/table.js
522
- var require_table = __commonJS({
523
- "node_modules/better-sqlite3/lib/methods/table.js"(exports, module) {
524
- "use strict";
525
- var { cppdb } = require_util();
526
- module.exports = function defineTable(name, factory) {
527
- if (typeof name !== "string") throw new TypeError("Expected first argument to be a string");
528
- if (!name) throw new TypeError("Virtual table module name cannot be an empty string");
529
- let eponymous = false;
530
- if (typeof factory === "object" && factory !== null) {
531
- eponymous = true;
532
- factory = defer(parseTableDefinition(factory, "used", name));
533
- } else {
534
- if (typeof factory !== "function") throw new TypeError("Expected second argument to be a function or a table definition object");
535
- factory = wrapFactory(factory);
536
- }
537
- this[cppdb].table(factory, name, eponymous);
538
- return this;
539
- };
540
- function wrapFactory(factory) {
541
- return function virtualTableFactory(moduleName, databaseName, tableName, ...args) {
542
- const thisObject = {
543
- module: moduleName,
544
- database: databaseName,
545
- table: tableName
546
- };
547
- const def = apply.call(factory, thisObject, args);
548
- if (typeof def !== "object" || def === null) {
549
- throw new TypeError(`Virtual table module "${moduleName}" did not return a table definition object`);
550
- }
551
- return parseTableDefinition(def, "returned", moduleName);
552
- };
553
- }
554
- function parseTableDefinition(def, verb, moduleName) {
555
- if (!hasOwnProperty.call(def, "rows")) {
556
- throw new TypeError(`Virtual table module "${moduleName}" ${verb} a table definition without a "rows" property`);
557
- }
558
- if (!hasOwnProperty.call(def, "columns")) {
559
- throw new TypeError(`Virtual table module "${moduleName}" ${verb} a table definition without a "columns" property`);
560
- }
561
- const rows = def.rows;
562
- if (typeof rows !== "function" || Object.getPrototypeOf(rows) !== GeneratorFunctionPrototype) {
563
- throw new TypeError(`Virtual table module "${moduleName}" ${verb} a table definition with an invalid "rows" property (should be a generator function)`);
564
- }
565
- let columns = def.columns;
566
- if (!Array.isArray(columns) || !(columns = [...columns]).every((x) => typeof x === "string")) {
567
- throw new TypeError(`Virtual table module "${moduleName}" ${verb} a table definition with an invalid "columns" property (should be an array of strings)`);
568
- }
569
- if (columns.length !== new Set(columns).size) {
570
- throw new TypeError(`Virtual table module "${moduleName}" ${verb} a table definition with duplicate column names`);
571
- }
572
- if (!columns.length) {
573
- throw new RangeError(`Virtual table module "${moduleName}" ${verb} a table definition with zero columns`);
574
- }
575
- let parameters;
576
- if (hasOwnProperty.call(def, "parameters")) {
577
- parameters = def.parameters;
578
- if (!Array.isArray(parameters) || !(parameters = [...parameters]).every((x) => typeof x === "string")) {
579
- throw new TypeError(`Virtual table module "${moduleName}" ${verb} a table definition with an invalid "parameters" property (should be an array of strings)`);
580
- }
581
- } else {
582
- parameters = inferParameters(rows);
583
- }
584
- if (parameters.length !== new Set(parameters).size) {
585
- throw new TypeError(`Virtual table module "${moduleName}" ${verb} a table definition with duplicate parameter names`);
586
- }
587
- if (parameters.length > 32) {
588
- throw new RangeError(`Virtual table module "${moduleName}" ${verb} a table definition with more than the maximum number of 32 parameters`);
589
- }
590
- for (const parameter of parameters) {
591
- if (columns.includes(parameter)) {
592
- throw new TypeError(`Virtual table module "${moduleName}" ${verb} a table definition with column "${parameter}" which was ambiguously defined as both a column and parameter`);
593
- }
594
- }
595
- let safeIntegers = 2;
596
- if (hasOwnProperty.call(def, "safeIntegers")) {
597
- const bool = def.safeIntegers;
598
- if (typeof bool !== "boolean") {
599
- throw new TypeError(`Virtual table module "${moduleName}" ${verb} a table definition with an invalid "safeIntegers" property (should be a boolean)`);
600
- }
601
- safeIntegers = +bool;
602
- }
603
- let directOnly = false;
604
- if (hasOwnProperty.call(def, "directOnly")) {
605
- directOnly = def.directOnly;
606
- if (typeof directOnly !== "boolean") {
607
- throw new TypeError(`Virtual table module "${moduleName}" ${verb} a table definition with an invalid "directOnly" property (should be a boolean)`);
608
- }
609
- }
610
- const columnDefinitions = [
611
- ...parameters.map(identifier).map((str) => `${str} HIDDEN`),
612
- ...columns.map(identifier)
613
- ];
614
- return [
615
- `CREATE TABLE x(${columnDefinitions.join(", ")});`,
616
- wrapGenerator(rows, new Map(columns.map((x, i) => [x, parameters.length + i])), moduleName),
617
- parameters,
618
- safeIntegers,
619
- directOnly
620
- ];
621
- }
622
- function wrapGenerator(generator, columnMap, moduleName) {
623
- return function* virtualTable(...args) {
624
- const output = args.map((x) => Buffer.isBuffer(x) ? Buffer.from(x) : x);
625
- for (let i = 0; i < columnMap.size; ++i) {
626
- output.push(null);
627
- }
628
- for (const row of generator(...args)) {
629
- if (Array.isArray(row)) {
630
- extractRowArray(row, output, columnMap.size, moduleName);
631
- yield output;
632
- } else if (typeof row === "object" && row !== null) {
633
- extractRowObject(row, output, columnMap, moduleName);
634
- yield output;
635
- } else {
636
- throw new TypeError(`Virtual table module "${moduleName}" yielded something that isn't a valid row object`);
637
- }
638
- }
639
- };
640
- }
641
- function extractRowArray(row, output, columnCount, moduleName) {
642
- if (row.length !== columnCount) {
643
- throw new TypeError(`Virtual table module "${moduleName}" yielded a row with an incorrect number of columns`);
644
- }
645
- const offset = output.length - columnCount;
646
- for (let i = 0; i < columnCount; ++i) {
647
- output[i + offset] = row[i];
648
- }
649
- }
650
- function extractRowObject(row, output, columnMap, moduleName) {
651
- let count = 0;
652
- for (const key of Object.keys(row)) {
653
- const index = columnMap.get(key);
654
- if (index === void 0) {
655
- throw new TypeError(`Virtual table module "${moduleName}" yielded a row with an undeclared column "${key}"`);
656
- }
657
- output[index] = row[key];
658
- count += 1;
659
- }
660
- if (count !== columnMap.size) {
661
- throw new TypeError(`Virtual table module "${moduleName}" yielded a row with missing columns`);
662
- }
663
- }
664
- function inferParameters({ length }) {
665
- if (!Number.isInteger(length) || length < 0) {
666
- throw new TypeError("Expected function.length to be a positive integer");
667
- }
668
- const params = [];
669
- for (let i = 0; i < length; ++i) {
670
- params.push(`$${i + 1}`);
671
- }
672
- return params;
673
- }
674
- var { hasOwnProperty } = Object.prototype;
675
- var { apply } = Function.prototype;
676
- var GeneratorFunctionPrototype = Object.getPrototypeOf(function* () {
677
- });
678
- var identifier = (str) => `"${str.replace(/"/g, '""')}"`;
679
- var defer = (x) => () => x;
680
- }
681
- });
682
-
683
- // node_modules/better-sqlite3/lib/methods/inspect.js
684
- var require_inspect = __commonJS({
685
- "node_modules/better-sqlite3/lib/methods/inspect.js"(exports, module) {
686
- "use strict";
687
- var DatabaseInspection = function Database() {
688
- };
689
- module.exports = function inspect(depth, opts) {
690
- return Object.assign(new DatabaseInspection(), this);
691
- };
692
- }
693
- });
694
-
695
- // node_modules/better-sqlite3/lib/database.js
696
- var require_database = __commonJS({
697
- "node_modules/better-sqlite3/lib/database.js"(exports, module) {
698
- "use strict";
699
- var fs = __require("fs");
700
- var path = __require("path");
701
- var util = require_util();
702
- var SqliteError = require_sqlite_error();
703
- var DEFAULT_ADDON;
704
- function Database(filenameGiven, options) {
705
- if (new.target == null) {
706
- return new Database(filenameGiven, options);
707
- }
708
- let buffer;
709
- if (Buffer.isBuffer(filenameGiven)) {
710
- buffer = filenameGiven;
711
- filenameGiven = ":memory:";
712
- }
713
- if (filenameGiven == null) filenameGiven = "";
714
- if (options == null) options = {};
715
- if (typeof filenameGiven !== "string") throw new TypeError("Expected first argument to be a string");
716
- if (typeof options !== "object") throw new TypeError("Expected second argument to be an options object");
717
- if ("readOnly" in options) throw new TypeError('Misspelled option "readOnly" should be "readonly"');
718
- if ("memory" in options) throw new TypeError('Option "memory" was removed in v7.0.0 (use ":memory:" filename instead)');
719
- const filename = filenameGiven.trim();
720
- const anonymous = filename === "" || filename === ":memory:";
721
- const readonly = util.getBooleanOption(options, "readonly");
722
- const fileMustExist = util.getBooleanOption(options, "fileMustExist");
723
- const timeout = "timeout" in options ? options.timeout : 5e3;
724
- const verbose = "verbose" in options ? options.verbose : null;
725
- const nativeBinding = "nativeBinding" in options ? options.nativeBinding : null;
726
- if (readonly && anonymous && !buffer) throw new TypeError("In-memory/temporary databases cannot be readonly");
727
- if (!Number.isInteger(timeout) || timeout < 0) throw new TypeError('Expected the "timeout" option to be a positive integer');
728
- if (timeout > 2147483647) throw new RangeError('Option "timeout" cannot be greater than 2147483647');
729
- if (verbose != null && typeof verbose !== "function") throw new TypeError('Expected the "verbose" option to be a function');
730
- if (nativeBinding != null && typeof nativeBinding !== "string" && typeof nativeBinding !== "object") throw new TypeError('Expected the "nativeBinding" option to be a string or addon object');
731
- let addon;
732
- if (nativeBinding == null) {
733
- addon = DEFAULT_ADDON || (DEFAULT_ADDON = require_bindings()("better_sqlite3.node"));
734
- } else if (typeof nativeBinding === "string") {
735
- const requireFunc = typeof __non_webpack_require__ === "function" ? __non_webpack_require__ : __require;
736
- addon = requireFunc(path.resolve(nativeBinding).replace(/(\.node)?$/, ".node"));
737
- } else {
738
- addon = nativeBinding;
739
- }
740
- if (!addon.isInitialized) {
741
- addon.setErrorConstructor(SqliteError);
742
- addon.isInitialized = true;
743
- }
744
- if (!anonymous && !fs.existsSync(path.dirname(filename))) {
745
- throw new TypeError("Cannot open database because the directory does not exist");
746
- }
747
- Object.defineProperties(this, {
748
- [util.cppdb]: { value: new addon.Database(filename, filenameGiven, anonymous, readonly, fileMustExist, timeout, verbose || null, buffer || null) },
749
- ...wrappers.getters
750
- });
751
- }
752
- var wrappers = require_wrappers();
753
- Database.prototype.prepare = wrappers.prepare;
754
- Database.prototype.transaction = require_transaction();
755
- Database.prototype.pragma = require_pragma();
756
- Database.prototype.backup = require_backup();
757
- Database.prototype.serialize = require_serialize();
758
- Database.prototype.function = require_function();
759
- Database.prototype.aggregate = require_aggregate();
760
- Database.prototype.table = require_table();
761
- Database.prototype.loadExtension = wrappers.loadExtension;
762
- Database.prototype.exec = wrappers.exec;
763
- Database.prototype.close = wrappers.close;
764
- Database.prototype.defaultSafeIntegers = wrappers.defaultSafeIntegers;
765
- Database.prototype.unsafeMode = wrappers.unsafeMode;
766
- Database.prototype[util.inspect] = require_inspect();
767
- module.exports = Database;
768
- }
769
- });
770
-
771
- // node_modules/better-sqlite3/lib/index.js
772
- var require_lib = __commonJS({
773
- "node_modules/better-sqlite3/lib/index.js"(exports, module) {
774
- module.exports = require_database();
775
- module.exports.SqliteError = require_sqlite_error();
776
- }
777
- });
778
- export default require_lib();