@fireproof/core 0.21.0-dev-preview-6 → 0.22.0-dev-preview

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 (428) hide show
  1. package/index.d.ts +2 -16
  2. package/index.js +2 -15
  3. package/index.js.map +1 -1
  4. package/index.ts +2 -0
  5. package/package.json +11 -70
  6. package/tsconfig.json +18 -0
  7. package/README.md +0 -269
  8. package/apply-head-queue.d.ts +0 -18
  9. package/apply-head-queue.d.ts.map +0 -1
  10. package/apply-head-queue.js +0 -47
  11. package/apply-head-queue.js.map +0 -1
  12. package/blockstore/attachable-store.d.ts +0 -19
  13. package/blockstore/attachable-store.d.ts.map +0 -1
  14. package/blockstore/attachable-store.js +0 -317
  15. package/blockstore/attachable-store.js.map +0 -1
  16. package/blockstore/commit-queue.d.ts +0 -17
  17. package/blockstore/commit-queue.d.ts.map +0 -1
  18. package/blockstore/commit-queue.js +0 -60
  19. package/blockstore/commit-queue.js.map +0 -1
  20. package/blockstore/commitor.d.ts +0 -21
  21. package/blockstore/commitor.d.ts.map +0 -1
  22. package/blockstore/commitor.js +0 -95
  23. package/blockstore/commitor.js.map +0 -1
  24. package/blockstore/connect-raw.d.ts +0 -2
  25. package/blockstore/connect-raw.d.ts.map +0 -1
  26. package/blockstore/connect-raw.js +0 -2
  27. package/blockstore/connect-raw.js.map +0 -1
  28. package/blockstore/connection-base.d.ts +0 -2
  29. package/blockstore/connection-base.d.ts.map +0 -1
  30. package/blockstore/connection-base.js +0 -2
  31. package/blockstore/connection-base.js.map +0 -1
  32. package/blockstore/encrypt-helpers.d.ts +0 -2
  33. package/blockstore/encrypt-helpers.d.ts.map +0 -1
  34. package/blockstore/encrypt-helpers.js +0 -2
  35. package/blockstore/encrypt-helpers.js.map +0 -1
  36. package/blockstore/fp-envelope.d.ts +0 -32
  37. package/blockstore/fp-envelope.d.ts.map +0 -1
  38. package/blockstore/fp-envelope.js +0 -14
  39. package/blockstore/fp-envelope.js.map +0 -1
  40. package/blockstore/gateway.d.ts +0 -20
  41. package/blockstore/gateway.d.ts.map +0 -1
  42. package/blockstore/gateway.js +0 -2
  43. package/blockstore/gateway.js.map +0 -1
  44. package/blockstore/index.d.ts +0 -16
  45. package/blockstore/index.d.ts.map +0 -1
  46. package/blockstore/index.js +0 -16
  47. package/blockstore/index.js.map +0 -1
  48. package/blockstore/interceptor-gateway.d.ts +0 -29
  49. package/blockstore/interceptor-gateway.d.ts.map +0 -1
  50. package/blockstore/interceptor-gateway.js +0 -137
  51. package/blockstore/interceptor-gateway.js.map +0 -1
  52. package/blockstore/loader-helpers.d.ts +0 -10
  53. package/blockstore/loader-helpers.d.ts.map +0 -1
  54. package/blockstore/loader-helpers.js +0 -115
  55. package/blockstore/loader-helpers.js.map +0 -1
  56. package/blockstore/loader.d.ts +0 -61
  57. package/blockstore/loader.d.ts.map +0 -1
  58. package/blockstore/loader.js +0 -493
  59. package/blockstore/loader.js.map +0 -1
  60. package/blockstore/register-store-protocol.d.ts +0 -22
  61. package/blockstore/register-store-protocol.d.ts.map +0 -1
  62. package/blockstore/register-store-protocol.js +0 -125
  63. package/blockstore/register-store-protocol.js.map +0 -1
  64. package/blockstore/serde-gateway.d.ts +0 -78
  65. package/blockstore/serde-gateway.d.ts.map +0 -1
  66. package/blockstore/serde-gateway.js +0 -2
  67. package/blockstore/serde-gateway.js.map +0 -1
  68. package/blockstore/store-factory.d.ts +0 -11
  69. package/blockstore/store-factory.d.ts.map +0 -1
  70. package/blockstore/store-factory.js +0 -104
  71. package/blockstore/store-factory.js.map +0 -1
  72. package/blockstore/store-remote.d.ts +0 -2
  73. package/blockstore/store-remote.d.ts.map +0 -1
  74. package/blockstore/store-remote.js +0 -2
  75. package/blockstore/store-remote.js.map +0 -1
  76. package/blockstore/store.d.ts +0 -86
  77. package/blockstore/store.d.ts.map +0 -1
  78. package/blockstore/store.js +0 -437
  79. package/blockstore/store.js.map +0 -1
  80. package/blockstore/task-manager.d.ts +0 -19
  81. package/blockstore/task-manager.d.ts.map +0 -1
  82. package/blockstore/task-manager.js +0 -50
  83. package/blockstore/task-manager.js.map +0 -1
  84. package/blockstore/transaction.d.ts +0 -62
  85. package/blockstore/transaction.d.ts.map +0 -1
  86. package/blockstore/transaction.js +0 -256
  87. package/blockstore/transaction.js.map +0 -1
  88. package/blockstore/types.d.ts +0 -510
  89. package/blockstore/types.d.ts.map +0 -1
  90. package/blockstore/types.js +0 -83
  91. package/blockstore/types.js.map +0 -1
  92. package/blockstore/uri-interceptor.d.ts +0 -19
  93. package/blockstore/uri-interceptor.d.ts.map +0 -1
  94. package/blockstore/uri-interceptor.js +0 -61
  95. package/blockstore/uri-interceptor.js.map +0 -1
  96. package/bundle-not-impl.d.ts +0 -2
  97. package/bundle-not-impl.d.ts.map +0 -1
  98. package/bundle-not-impl.js +0 -4
  99. package/bundle-not-impl.js.map +0 -1
  100. package/cli/main.js +0 -26613
  101. package/crdt-clock.d.ts +0 -26
  102. package/crdt-clock.d.ts.map +0 -1
  103. package/crdt-clock.js +0 -133
  104. package/crdt-clock.js.map +0 -1
  105. package/crdt-helpers.d.ts +0 -19
  106. package/crdt-helpers.d.ts.map +0 -1
  107. package/crdt-helpers.js +0 -332
  108. package/crdt-helpers.js.map +0 -1
  109. package/crdt.d.ts +0 -41
  110. package/crdt.d.ts.map +0 -1
  111. package/crdt.js +0 -164
  112. package/crdt.js.map +0 -1
  113. package/database.d.ts +0 -34
  114. package/database.d.ts.map +0 -1
  115. package/database.js +0 -133
  116. package/database.js.map +0 -1
  117. package/deno.json +0 -20
  118. package/index.d.ts.map +0 -1
  119. package/indexer-helpers.d.ts +0 -68
  120. package/indexer-helpers.d.ts.map +0 -1
  121. package/indexer-helpers.js +0 -157
  122. package/indexer-helpers.js.map +0 -1
  123. package/indexer.d.ts +0 -24
  124. package/indexer.d.ts.map +0 -1
  125. package/indexer.js +0 -239
  126. package/indexer.js.map +0 -1
  127. package/ledger.d.ts +0 -55
  128. package/ledger.d.ts.map +0 -1
  129. package/ledger.js +0 -240
  130. package/ledger.js.map +0 -1
  131. package/protocols/cloud/http-connection.d.ts +0 -25
  132. package/protocols/cloud/http-connection.d.ts.map +0 -1
  133. package/protocols/cloud/http-connection.js +0 -153
  134. package/protocols/cloud/http-connection.js.map +0 -1
  135. package/protocols/cloud/index.d.ts +0 -10
  136. package/protocols/cloud/index.d.ts.map +0 -1
  137. package/protocols/cloud/index.js +0 -10
  138. package/protocols/cloud/index.js.map +0 -1
  139. package/protocols/cloud/msg-raw-connection-base.d.ts +0 -16
  140. package/protocols/cloud/msg-raw-connection-base.d.ts.map +0 -1
  141. package/protocols/cloud/msg-raw-connection-base.js +0 -22
  142. package/protocols/cloud/msg-raw-connection-base.js.map +0 -1
  143. package/protocols/cloud/msg-types-data.d.ts +0 -36
  144. package/protocols/cloud/msg-types-data.d.ts.map +0 -1
  145. package/protocols/cloud/msg-types-data.js +0 -38
  146. package/protocols/cloud/msg-types-data.js.map +0 -1
  147. package/protocols/cloud/msg-types-meta.d.ts +0 -41
  148. package/protocols/cloud/msg-types-meta.d.ts.map +0 -1
  149. package/protocols/cloud/msg-types-meta.js +0 -98
  150. package/protocols/cloud/msg-types-meta.js.map +0 -1
  151. package/protocols/cloud/msg-types-wal.d.ts +0 -33
  152. package/protocols/cloud/msg-types-wal.d.ts.map +0 -1
  153. package/protocols/cloud/msg-types-wal.js +0 -38
  154. package/protocols/cloud/msg-types-wal.js.map +0 -1
  155. package/protocols/cloud/msg-types.d.ts +0 -296
  156. package/protocols/cloud/msg-types.d.ts.map +0 -1
  157. package/protocols/cloud/msg-types.js +0 -296
  158. package/protocols/cloud/msg-types.js.map +0 -1
  159. package/protocols/cloud/msger.d.ts +0 -79
  160. package/protocols/cloud/msger.d.ts.map +0 -1
  161. package/protocols/cloud/msger.js +0 -198
  162. package/protocols/cloud/msger.js.map +0 -1
  163. package/protocols/cloud/ws-connection.d.ts +0 -29
  164. package/protocols/cloud/ws-connection.d.ts.map +0 -1
  165. package/protocols/cloud/ws-connection.js +0 -166
  166. package/protocols/cloud/ws-connection.js.map +0 -1
  167. package/protocols/index.d.ts +0 -2
  168. package/protocols/index.d.ts.map +0 -1
  169. package/protocols/index.js +0 -2
  170. package/protocols/index.js.map +0 -1
  171. package/react/img-file.d.ts +0 -303
  172. package/react/img-file.d.ts.map +0 -1
  173. package/react/img-file.js +0 -92
  174. package/react/img-file.js.map +0 -1
  175. package/react/index.d.ts +0 -5
  176. package/react/index.d.ts.map +0 -1
  177. package/react/index.js +0 -5
  178. package/react/index.js.map +0 -1
  179. package/react/types.d.ts +0 -71
  180. package/react/types.d.ts.map +0 -1
  181. package/react/types.js +0 -2
  182. package/react/types.js.map +0 -1
  183. package/react/use-all-docs.d.ts +0 -4
  184. package/react/use-all-docs.d.ts.map +0 -1
  185. package/react/use-all-docs.js +0 -25
  186. package/react/use-all-docs.js.map +0 -1
  187. package/react/use-attach.d.ts +0 -6
  188. package/react/use-attach.d.ts.map +0 -1
  189. package/react/use-attach.js +0 -75
  190. package/react/use-attach.js.map +0 -1
  191. package/react/use-changes.d.ts +0 -4
  192. package/react/use-changes.d.ts.map +0 -1
  193. package/react/use-changes.js +0 -19
  194. package/react/use-changes.js.map +0 -1
  195. package/react/use-document.d.ts +0 -4
  196. package/react/use-document.d.ts.map +0 -1
  197. package/react/use-document.js +0 -109
  198. package/react/use-document.js.map +0 -1
  199. package/react/use-fireproof.d.ts +0 -6
  200. package/react/use-fireproof.d.ts.map +0 -1
  201. package/react/use-fireproof.js +0 -20
  202. package/react/use-fireproof.js.map +0 -1
  203. package/react/use-live-query.d.ts +0 -4
  204. package/react/use-live-query.d.ts.map +0 -1
  205. package/react/use-live-query.js +0 -24
  206. package/react/use-live-query.js.map +0 -1
  207. package/runtime/files.d.ts +0 -12
  208. package/runtime/files.d.ts.map +0 -1
  209. package/runtime/files.js +0 -29
  210. package/runtime/files.js.map +0 -1
  211. package/runtime/gateways/cloud/gateway.d.ts +0 -41
  212. package/runtime/gateways/cloud/gateway.d.ts.map +0 -1
  213. package/runtime/gateways/cloud/gateway.js +0 -512
  214. package/runtime/gateways/cloud/gateway.js.map +0 -1
  215. package/runtime/gateways/cloud/index.d.ts +0 -3
  216. package/runtime/gateways/cloud/index.d.ts.map +0 -1
  217. package/runtime/gateways/cloud/index.js +0 -3
  218. package/runtime/gateways/cloud/index.js.map +0 -1
  219. package/runtime/gateways/cloud/to-cloud.d.ts +0 -46
  220. package/runtime/gateways/cloud/to-cloud.d.ts.map +0 -1
  221. package/runtime/gateways/cloud/to-cloud.js +0 -159
  222. package/runtime/gateways/cloud/to-cloud.js.map +0 -1
  223. package/runtime/gateways/def-serde-gateway.d.ts +0 -18
  224. package/runtime/gateways/def-serde-gateway.d.ts.map +0 -1
  225. package/runtime/gateways/def-serde-gateway.js +0 -92
  226. package/runtime/gateways/def-serde-gateway.js.map +0 -1
  227. package/runtime/gateways/file/deno/deno-filesystem.d.ts +0 -27
  228. package/runtime/gateways/file/deno/deno-filesystem.d.ts.map +0 -1
  229. package/runtime/gateways/file/deno/deno-filesystem.js +0 -52
  230. package/runtime/gateways/file/deno/deno-filesystem.js.map +0 -1
  231. package/runtime/gateways/file/deno/get-sys-file-system.d.ts +0 -4
  232. package/runtime/gateways/file/deno/get-sys-file-system.d.ts.map +0 -1
  233. package/runtime/gateways/file/deno/get-sys-file-system.js +0 -11
  234. package/runtime/gateways/file/deno/get-sys-file-system.js.map +0 -1
  235. package/runtime/gateways/file/deno/index.d.ts +0 -2
  236. package/runtime/gateways/file/deno/index.d.ts.map +0 -1
  237. package/runtime/gateways/file/deno/index.js +0 -2
  238. package/runtime/gateways/file/deno/index.js.map +0 -1
  239. package/runtime/gateways/file/gateway-impl.d.ts +0 -18
  240. package/runtime/gateways/file/gateway-impl.d.ts.map +0 -1
  241. package/runtime/gateways/file/gateway-impl.js +0 -121
  242. package/runtime/gateways/file/gateway-impl.js.map +0 -1
  243. package/runtime/gateways/file/index.d.ts +0 -3
  244. package/runtime/gateways/file/index.d.ts.map +0 -1
  245. package/runtime/gateways/file/index.js +0 -3
  246. package/runtime/gateways/file/index.js.map +0 -1
  247. package/runtime/gateways/file/key-bag-file.d.ts +0 -19
  248. package/runtime/gateways/file/key-bag-file.d.ts.map +0 -1
  249. package/runtime/gateways/file/key-bag-file.js +0 -40
  250. package/runtime/gateways/file/key-bag-file.js.map +0 -1
  251. package/runtime/gateways/file/node/get-sys-file-system.d.ts +0 -4
  252. package/runtime/gateways/file/node/get-sys-file-system.d.ts.map +0 -1
  253. package/runtime/gateways/file/node/get-sys-file-system.js +0 -11
  254. package/runtime/gateways/file/node/get-sys-file-system.js.map +0 -1
  255. package/runtime/gateways/file/node/index.d.ts +0 -2
  256. package/runtime/gateways/file/node/index.d.ts.map +0 -1
  257. package/runtime/gateways/file/node/index.js +0 -2
  258. package/runtime/gateways/file/node/index.js.map +0 -1
  259. package/runtime/gateways/file/node/node-filesystem.d.ts +0 -32
  260. package/runtime/gateways/file/node/node-filesystem.d.ts.map +0 -1
  261. package/runtime/gateways/file/node/node-filesystem.js +0 -33
  262. package/runtime/gateways/file/node/node-filesystem.js.map +0 -1
  263. package/runtime/gateways/file/node/to-array-buffer.d.ts +0 -2
  264. package/runtime/gateways/file/node/to-array-buffer.d.ts.map +0 -1
  265. package/runtime/gateways/file/node/to-array-buffer.js +0 -12
  266. package/runtime/gateways/file/node/to-array-buffer.js.map +0 -1
  267. package/runtime/gateways/file/sys-file-system-factory.d.ts +0 -4
  268. package/runtime/gateways/file/sys-file-system-factory.d.ts.map +0 -1
  269. package/runtime/gateways/file/sys-file-system-factory.js +0 -13
  270. package/runtime/gateways/file/sys-file-system-factory.js.map +0 -1
  271. package/runtime/gateways/file/utils.d.ts +0 -5
  272. package/runtime/gateways/file/utils.d.ts.map +0 -1
  273. package/runtime/gateways/file/utils.js +0 -27
  274. package/runtime/gateways/file/utils.js.map +0 -1
  275. package/runtime/gateways/file/version.d.ts +0 -2
  276. package/runtime/gateways/file/version.d.ts.map +0 -1
  277. package/runtime/gateways/file/version.js +0 -2
  278. package/runtime/gateways/file/version.js.map +0 -1
  279. package/runtime/gateways/fp-envelope-serialize.d.ts +0 -50
  280. package/runtime/gateways/fp-envelope-serialize.d.ts.map +0 -1
  281. package/runtime/gateways/fp-envelope-serialize.js +0 -141
  282. package/runtime/gateways/fp-envelope-serialize.js.map +0 -1
  283. package/runtime/gateways/index.d.ts +0 -6
  284. package/runtime/gateways/index.d.ts.map +0 -1
  285. package/runtime/gateways/index.js +0 -6
  286. package/runtime/gateways/index.js.map +0 -1
  287. package/runtime/gateways/indexeddb/gateway-impl.d.ts +0 -22
  288. package/runtime/gateways/indexeddb/gateway-impl.d.ts.map +0 -1
  289. package/runtime/gateways/indexeddb/gateway-impl.js +0 -147
  290. package/runtime/gateways/indexeddb/gateway-impl.js.map +0 -1
  291. package/runtime/gateways/indexeddb/index.d.ts +0 -6
  292. package/runtime/gateways/indexeddb/index.d.ts.map +0 -1
  293. package/runtime/gateways/indexeddb/index.js +0 -6
  294. package/runtime/gateways/indexeddb/index.js.map +0 -1
  295. package/runtime/gateways/indexeddb/key-bag-indexeddb.d.ts +0 -15
  296. package/runtime/gateways/indexeddb/key-bag-indexeddb.d.ts.map +0 -1
  297. package/runtime/gateways/indexeddb/key-bag-indexeddb.js +0 -42
  298. package/runtime/gateways/indexeddb/key-bag-indexeddb.js.map +0 -1
  299. package/runtime/gateways/indexeddb-version.d.ts +0 -2
  300. package/runtime/gateways/indexeddb-version.d.ts.map +0 -1
  301. package/runtime/gateways/indexeddb-version.js +0 -2
  302. package/runtime/gateways/indexeddb-version.js.map +0 -1
  303. package/runtime/gateways/memory/gateway.d.ts +0 -18
  304. package/runtime/gateways/memory/gateway.d.ts.map +0 -1
  305. package/runtime/gateways/memory/gateway.js +0 -73
  306. package/runtime/gateways/memory/gateway.js.map +0 -1
  307. package/runtime/gateways/memory/version.d.ts +0 -2
  308. package/runtime/gateways/memory/version.d.ts.map +0 -1
  309. package/runtime/gateways/memory/version.js +0 -2
  310. package/runtime/gateways/memory/version.js.map +0 -1
  311. package/runtime/index.d.ts +0 -13
  312. package/runtime/index.d.ts.map +0 -1
  313. package/runtime/index.js +0 -13
  314. package/runtime/index.js.map +0 -1
  315. package/runtime/key-bag-memory.d.ts +0 -12
  316. package/runtime/key-bag-memory.d.ts.map +0 -1
  317. package/runtime/key-bag-memory.js +0 -23
  318. package/runtime/key-bag-memory.js.map +0 -1
  319. package/runtime/key-bag.d.ts +0 -85
  320. package/runtime/key-bag.d.ts.map +0 -1
  321. package/runtime/key-bag.js +0 -411
  322. package/runtime/key-bag.js.map +0 -1
  323. package/runtime/keyed-crypto.d.ts +0 -19
  324. package/runtime/keyed-crypto.d.ts.map +0 -1
  325. package/runtime/keyed-crypto.js +0 -192
  326. package/runtime/keyed-crypto.js.map +0 -1
  327. package/runtime/memory-sys-container.d.ts +0 -2
  328. package/runtime/memory-sys-container.d.ts.map +0 -1
  329. package/runtime/memory-sys-container.js +0 -2
  330. package/runtime/memory-sys-container.js.map +0 -1
  331. package/runtime/meta-key-hack.d.ts +0 -42
  332. package/runtime/meta-key-hack.d.ts.map +0 -1
  333. package/runtime/meta-key-hack.js +0 -201
  334. package/runtime/meta-key-hack.js.map +0 -1
  335. package/runtime/sts-service/index.d.ts +0 -40
  336. package/runtime/sts-service/index.d.ts.map +0 -1
  337. package/runtime/sts-service/index.js +0 -108
  338. package/runtime/sts-service/index.js.map +0 -1
  339. package/runtime/sys-container.d.ts +0 -2
  340. package/runtime/sys-container.d.ts.map +0 -1
  341. package/runtime/sys-container.js +0 -2
  342. package/runtime/sys-container.js.map +0 -1
  343. package/runtime/wait-pr-multiformats/block.d.ts +0 -47
  344. package/runtime/wait-pr-multiformats/block.d.ts.map +0 -1
  345. package/runtime/wait-pr-multiformats/block.js +0 -64
  346. package/runtime/wait-pr-multiformats/block.js.map +0 -1
  347. package/runtime/wait-pr-multiformats/codec-interface.d.ts +0 -29
  348. package/runtime/wait-pr-multiformats/codec-interface.d.ts.map +0 -1
  349. package/runtime/wait-pr-multiformats/codec-interface.js +0 -2
  350. package/runtime/wait-pr-multiformats/codec-interface.js.map +0 -1
  351. package/runtime/wait-pr-multiformats/index.d.ts +0 -3
  352. package/runtime/wait-pr-multiformats/index.d.ts.map +0 -1
  353. package/runtime/wait-pr-multiformats/index.js +0 -3
  354. package/runtime/wait-pr-multiformats/index.js.map +0 -1
  355. package/tests/blockstore/fp-envelope.test.ts-off +0 -65
  356. package/tests/blockstore/fragment-gateway.test.ts-off +0 -106
  357. package/tests/blockstore/interceptor-gateway.test.ts +0 -254
  358. package/tests/blockstore/keyed-crypto-indexeddb-file.test.ts +0 -128
  359. package/tests/blockstore/keyed-crypto.test.ts +0 -526
  360. package/tests/blockstore/loader.test.ts +0 -297
  361. package/tests/blockstore/standalone.test.ts +0 -152
  362. package/tests/blockstore/store.test.ts +0 -192
  363. package/tests/blockstore/transaction.test.ts +0 -130
  364. package/tests/fireproof/all-gateway.test.ts +0 -461
  365. package/tests/fireproof/attachable.test.ts +0 -686
  366. package/tests/fireproof/cars/bafkreidxwt2nhvbl4fnqfw3ctlt6zbrir4kqwmjo5im6rf4q5si27kgo2i.car +0 -0
  367. package/tests/fireproof/cars/bafkreidxwt2nhvbl4fnqfw3ctlt6zbrir4kqwmjo5im6rf4q5si27kgo2i.ts +0 -324
  368. package/tests/fireproof/charwise-boolean.test.ts +0 -66
  369. package/tests/fireproof/crdt.test.ts +0 -570
  370. package/tests/fireproof/database.test.ts +0 -779
  371. package/tests/fireproof/deleted-docs-handling.test.ts +0 -111
  372. package/tests/fireproof/fireproof.test.fixture.ts +0 -133
  373. package/tests/fireproof/fireproof.test.ts +0 -777
  374. package/tests/fireproof/hello.test.ts +0 -74
  375. package/tests/fireproof/indexer.test.ts +0 -458
  376. package/tests/fireproof/multiple-ledger.test.ts +0 -65
  377. package/tests/fireproof/query-docs.test.ts +0 -116
  378. package/tests/fireproof/query-limit-issue.test.ts +0 -147
  379. package/tests/fireproof/query-property-inconsistency.test.ts +0 -89
  380. package/tests/fireproof/query-result-properties.test.ts +0 -42
  381. package/tests/fireproof/stable-cid.test.ts +0 -69
  382. package/tests/fireproof/utils.test.ts +0 -135
  383. package/tests/gateway/file/loader-config.test.ts +0 -307
  384. package/tests/gateway/indexeddb/loader-config.test.ts +0 -79
  385. package/tests/helpers.ts +0 -174
  386. package/tests/react/img-file.test.tsx +0 -190
  387. package/tests/react/use-all-docs.test.tsx +0 -173
  388. package/tests/react/use-document-with-nonexistent-id.test.tsx +0 -96
  389. package/tests/react/use-fireproof-db-switch.test.tsx +0 -91
  390. package/tests/react/use-fireproof-stability.test.tsx +0 -145
  391. package/tests/react/use-fireproof.test.tsx +0 -645
  392. package/tests/runtime/fp-envelope-serialize.test.ts +0 -254
  393. package/tests/runtime/meta-key-hack.test.ts +0 -95
  394. package/tests/setup.file.ts +0 -1
  395. package/tests/setup.indexeddb.ts +0 -0
  396. package/tests/setup.memory.ts +0 -2
  397. package/tests/utils.test.ts +0 -192
  398. package/tests/vitest.file.config.ts +0 -14
  399. package/tests/vitest.indexeddb.config.ts +0 -37
  400. package/tests/vitest.memory.config.ts +0 -25
  401. package/types.d.ts +0 -462
  402. package/types.d.ts.map +0 -1
  403. package/types.js +0 -60
  404. package/types.js.map +0 -1
  405. package/use-fireproof/iframe-strategy.d.ts +0 -13
  406. package/use-fireproof/iframe-strategy.d.ts.map +0 -1
  407. package/use-fireproof/iframe-strategy.js +0 -83
  408. package/use-fireproof/iframe-strategy.js.map +0 -1
  409. package/use-fireproof/index.d.ts +0 -10
  410. package/use-fireproof/index.d.ts.map +0 -1
  411. package/use-fireproof/index.js +0 -16
  412. package/use-fireproof/index.js.map +0 -1
  413. package/use-fireproof/redirect-strategy.d.ts +0 -8
  414. package/use-fireproof/redirect-strategy.d.ts.map +0 -1
  415. package/use-fireproof/redirect-strategy.js +0 -31
  416. package/use-fireproof/redirect-strategy.js.map +0 -1
  417. package/utils.d.ts +0 -49
  418. package/utils.d.ts.map +0 -1
  419. package/utils.js +0 -454
  420. package/utils.js.map +0 -1
  421. package/version.d.ts +0 -2
  422. package/version.d.ts.map +0 -1
  423. package/version.js +0 -4
  424. package/version.js.map +0 -1
  425. package/write-queue.d.ts +0 -9
  426. package/write-queue.d.ts.map +0 -1
  427. package/write-queue.js +0 -70
  428. package/write-queue.js.map +0 -1
@@ -1,256 +0,0 @@
1
- var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (receiver, state, kind, f) {
2
- if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter");
3
- if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
4
- return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
5
- };
6
- var __classPrivateFieldSet = (this && this.__classPrivateFieldSet) || function (receiver, state, value, kind, f) {
7
- if (kind === "m") throw new TypeError("Private method is not writable");
8
- if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter");
9
- if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it");
10
- return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;
11
- };
12
- var _CarTransactionImpl_memblock, _CarTransactionImpl_hackUnshift;
13
- import { isCarBlockItemReady, } from "./types.js";
14
- import { Loader } from "./loader.js";
15
- import { falsyToUndef } from "../types.js";
16
- import { ensureStoreEnDeFile, toStoreRuntime } from "./store-factory.js";
17
- import { toCryptoRuntime } from "@adviser/cement";
18
- import { ensureLogger, ensureSuperThis } from "../utils.js";
19
- export class CarTransactionImpl {
20
- constructor(parent, opts = { add: true, noLoader: false }) {
21
- _CarTransactionImpl_memblock.set(this, new Map());
22
- _CarTransactionImpl_hackUnshift.set(this, void 0);
23
- if (opts.add) {
24
- parent.transactions.add(this);
25
- }
26
- this.parent = parent;
27
- }
28
- async get(cid) {
29
- const sg = await this.superGet(cid);
30
- if (sg)
31
- return sg;
32
- return await this.parent.get(cid);
33
- }
34
- async superGet(cid) {
35
- return __classPrivateFieldGet(this, _CarTransactionImpl_memblock, "f").get(cid.toString());
36
- }
37
- async put(fb) {
38
- return this.putSync(fb);
39
- }
40
- putSync(fb) {
41
- __classPrivateFieldGet(this, _CarTransactionImpl_memblock, "f").set(fb.cid.toString(), fb);
42
- }
43
- unshift(fb) {
44
- if (__classPrivateFieldGet(this, _CarTransactionImpl_hackUnshift, "f")) {
45
- throw new Error("unshift already called");
46
- }
47
- __classPrivateFieldSet(this, _CarTransactionImpl_hackUnshift, fb, "f");
48
- }
49
- async *entries() {
50
- if (__classPrivateFieldGet(this, _CarTransactionImpl_hackUnshift, "f")) {
51
- yield __classPrivateFieldGet(this, _CarTransactionImpl_hackUnshift, "f");
52
- }
53
- for await (const blk of __classPrivateFieldGet(this, _CarTransactionImpl_memblock, "f").values()) {
54
- yield blk;
55
- }
56
- }
57
- }
58
- _CarTransactionImpl_memblock = new WeakMap(), _CarTransactionImpl_hackUnshift = new WeakMap();
59
- export function defaultedBlockstoreRuntime(sthis, opts, component, ctx) {
60
- const logger = ensureLogger(sthis, component, ctx);
61
- return {
62
- applyMeta: (meta, snap) => {
63
- return Promise.resolve();
64
- },
65
- compact: async (blocks) => {
66
- return {};
67
- },
68
- autoCompact: 100,
69
- public: false,
70
- threshold: 1000 * 1000,
71
- ...opts,
72
- logger,
73
- keyBag: opts.keyBag || {},
74
- crypto: toCryptoRuntime(opts.crypto),
75
- storeUrls: opts.storeUrls,
76
- taskManager: {
77
- removeAfter: 3,
78
- retryTimeout: 50,
79
- ...opts.taskManager,
80
- },
81
- storeRuntime: toStoreRuntime(sthis, ensureStoreEnDeFile(opts.storeEnDeFile)),
82
- };
83
- }
84
- export class BaseBlockstoreImpl {
85
- ready() {
86
- return Promise.resolve();
87
- }
88
- async close() {
89
- }
90
- async destroy() {
91
- }
92
- async compact() {
93
- }
94
- constructor(ebOpts, crdt) {
95
- this.transactions = new Set();
96
- this.sthis = ensureSuperThis(ebOpts);
97
- this.crdtParent = crdt;
98
- this.ebOpts = defaultedBlockstoreRuntime(this.sthis, ebOpts, "BaseBlockstore");
99
- this.logger = this.ebOpts.logger;
100
- this.loader = new Loader(this.sthis, ebOpts, this);
101
- }
102
- async get(cid) {
103
- if (!cid)
104
- throw this.logger.Error().Msg("required cid").AsError();
105
- for (const f of this.transactions) {
106
- const v = await f.superGet(cid);
107
- if (v)
108
- return v;
109
- }
110
- }
111
- async put(fp) {
112
- throw this.logger.Error().Msg("use a transaction to put").AsError();
113
- }
114
- async transaction(fn, _opts) {
115
- this.logger.Debug().Msg("enter transaction");
116
- const t = new CarTransactionImpl(this, _opts);
117
- this.logger.Debug().Msg("post CarTransaction");
118
- const done = await fn(t);
119
- this.logger.Debug().Msg("post fn");
120
- this.lastTxMeta = done;
121
- return { t, meta: done };
122
- }
123
- openTransaction(opts = { add: true, noLoader: false }) {
124
- return new CarTransactionImpl(this, opts);
125
- }
126
- async commitTransaction(t, done, opts) {
127
- if (!this.loader)
128
- throw this.logger.Error().Msg("loader required to commit").AsError();
129
- const cars = await this.loader.commit(t, done, opts);
130
- if (this.ebOpts.autoCompact && this.loader.carLog.length > this.ebOpts.autoCompact) {
131
- setTimeout(() => void this.compact(), 10);
132
- }
133
- if (cars) {
134
- this.transactions.delete(t);
135
- return { meta: done, cars, t };
136
- }
137
- throw this.logger.Error().Msg("failed to commit car files").AsError();
138
- }
139
- async *entries() {
140
- const seen = new Set();
141
- for (const t of this.transactions) {
142
- for await (const blk of t.entries()) {
143
- if (seen.has(blk.cid.toString()))
144
- continue;
145
- seen.add(blk.cid.toString());
146
- yield blk;
147
- }
148
- }
149
- }
150
- }
151
- export class EncryptedBlockstore extends BaseBlockstoreImpl {
152
- ready() {
153
- return this.loader.ready();
154
- }
155
- close() {
156
- return this.loader.close();
157
- }
158
- destroy() {
159
- return this.loader.destroy();
160
- }
161
- constructor(sthis, ebOpts, crdt) {
162
- super(ebOpts, crdt);
163
- this.compacting = false;
164
- this.logger = ensureLogger(this.sthis, "EncryptedBlockstore", {
165
- this: 1,
166
- });
167
- }
168
- async get(cid) {
169
- const got = await super.get(cid);
170
- if (got)
171
- return got;
172
- const ret = await this.loader.getBlock(cid, this.loader.attachedStores.local());
173
- return ret;
174
- }
175
- async transaction(fn, opts = { noLoader: false }) {
176
- this.logger.Debug().Msg("enter transaction");
177
- const { t, meta: done } = await super.transaction(fn);
178
- this.logger.Debug().Msg("post super.transaction");
179
- const cars = await this.loader.commit(t, done, opts);
180
- this.logger.Debug().Msg("post this.loader.commit");
181
- if (this.ebOpts.autoCompact && this.loader.carLog.length > this.ebOpts.autoCompact) {
182
- setTimeout(() => void this.compact(), 10);
183
- }
184
- if (cars) {
185
- this.transactions.delete(t);
186
- return { meta: done, cars, t };
187
- }
188
- throw this.logger.Error().Msg("failed to commit car files").AsError();
189
- }
190
- async getFile(car, cid) {
191
- await this.ready();
192
- if (!this.loader)
193
- throw this.logger.Error().Msg("loader required to get file, ledger must be named").AsError();
194
- const reader = await this.loader.loadFileCar(car, this.loader.attachedStores.local());
195
- if (!isCarBlockItemReady(reader)) {
196
- throw this.logger.Error().Str("cid", car.toString()).Msg("car not ready").AsError();
197
- }
198
- const block = await reader.item.value.car.blocks.find((i) => i.cid.equals(cid));
199
- if (!block)
200
- throw this.logger.Error().Str("cid", cid.toString()).Msg(`Missing block`).AsError();
201
- return block.bytes;
202
- }
203
- async compact() {
204
- await this.ready();
205
- if (!this.loader)
206
- throw this.logger.Error().Msg("loader required to compact").AsError();
207
- if (this.loader.carLog.length < 2)
208
- return;
209
- const compactFn = this.ebOpts.compact || ((blocks) => this.defaultCompact(blocks, this.logger));
210
- if (!compactFn || this.compacting)
211
- return;
212
- const blockLog = new CompactionFetcher(this);
213
- this.compacting = true;
214
- const meta = await compactFn(blockLog);
215
- await this.loader.commit(blockLog.loggedBlocks, meta, {
216
- compact: true,
217
- noLoader: true,
218
- });
219
- this.compacting = false;
220
- }
221
- async defaultCompact(blocks, logger) {
222
- if (!this.loader) {
223
- throw logger.Error().Msg("no loader").AsError();
224
- }
225
- if (!this.lastTxMeta) {
226
- throw logger.Error().Msg("no lastTxMeta").AsError();
227
- }
228
- for await (const blk of this.loader.entries(false)) {
229
- blocks.loggedBlocks.putSync(blk);
230
- }
231
- for (const t of this.transactions) {
232
- for await (const blk of t.entries()) {
233
- blocks.loggedBlocks.putSync(blk);
234
- }
235
- }
236
- return this.lastTxMeta;
237
- }
238
- async *entries() {
239
- for await (const blk of this.loader.entries()) {
240
- yield blk;
241
- }
242
- }
243
- }
244
- export class CompactionFetcher {
245
- constructor(blocks) {
246
- this.blockstore = blocks;
247
- this.loggedBlocks = new CarTransactionImpl(blocks);
248
- }
249
- async get(cid) {
250
- const block = await this.blockstore.get(cid);
251
- if (block)
252
- this.loggedBlocks.putSync(block);
253
- return falsyToUndef(block);
254
- }
255
- }
256
- //# sourceMappingURL=transaction.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"transaction.js","sourceRoot":"","sources":["../../../../src/blockstore/transaction.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,OAAO,EAUL,mBAAmB,GACpB,MAAM,YAAY,CAAC;AACpB,OAAO,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AACrC,OAAO,EAA+C,YAAY,EAAa,MAAM,aAAa,CAAC;AACnG,OAAO,EAAE,mBAAmB,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AACzE,OAAO,EAAU,eAAe,EAAE,MAAM,iBAAiB,CAAC;AAC1D,OAAO,EAAE,YAAY,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AAO5D,MAAM,OAAO,kBAAkB;IAK7B,YAAY,MAAsB,EAAE,OAA2B,EAAE,GAAG,EAAE,IAAI,EAAE,QAAQ,EAAE,KAAK,EAAE;QAHpF,uCAAY,IAAI,GAAG,EAAmB,EAAC;QAChD,kDAAuB;QAIrB,IAAI,IAAI,CAAC,GAAG,EAAE,CAAC;YACb,MAAM,CAAC,YAAY,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC;QAChC,CA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