@fireproof/core 0.20.5-dev-preview-1 → 0.20.5-dev-preview-3

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 (437) hide show
  1. package/apply-head-queue.d.ts +18 -0
  2. package/apply-head-queue.d.ts.map +1 -0
  3. package/apply-head-queue.js +47 -0
  4. package/apply-head-queue.js.map +1 -0
  5. package/blockstore/attachable-store.d.ts +19 -0
  6. package/blockstore/attachable-store.d.ts.map +1 -0
  7. package/blockstore/attachable-store.js +316 -0
  8. package/blockstore/attachable-store.js.map +1 -0
  9. package/blockstore/commit-queue.d.ts +17 -0
  10. package/blockstore/commit-queue.d.ts.map +1 -0
  11. package/blockstore/commit-queue.js +60 -0
  12. package/blockstore/commit-queue.js.map +1 -0
  13. package/blockstore/commitor.d.ts +21 -0
  14. package/blockstore/commitor.d.ts.map +1 -0
  15. package/blockstore/commitor.js +95 -0
  16. package/blockstore/commitor.js.map +1 -0
  17. package/blockstore/connect-raw.d.ts +2 -0
  18. package/blockstore/connect-raw.d.ts.map +1 -0
  19. package/blockstore/connect-raw.js +2 -0
  20. package/blockstore/connect-raw.js.map +1 -0
  21. package/blockstore/connection-base.d.ts +2 -0
  22. package/blockstore/connection-base.d.ts.map +1 -0
  23. package/blockstore/connection-base.js +2 -0
  24. package/blockstore/connection-base.js.map +1 -0
  25. package/blockstore/encrypt-helpers.d.ts +2 -0
  26. package/blockstore/encrypt-helpers.d.ts.map +1 -0
  27. package/blockstore/encrypt-helpers.js +2 -0
  28. package/blockstore/encrypt-helpers.js.map +1 -0
  29. package/blockstore/fp-envelope.d.ts +32 -0
  30. package/blockstore/fp-envelope.d.ts.map +1 -0
  31. package/blockstore/fp-envelope.js +14 -0
  32. package/blockstore/fp-envelope.js.map +1 -0
  33. package/blockstore/gateway.d.ts +20 -0
  34. package/blockstore/gateway.d.ts.map +1 -0
  35. package/blockstore/gateway.js +2 -0
  36. package/blockstore/gateway.js.map +1 -0
  37. package/blockstore/index.d.ts +16 -0
  38. package/blockstore/index.d.ts.map +1 -0
  39. package/blockstore/index.js +16 -0
  40. package/blockstore/index.js.map +1 -0
  41. package/blockstore/interceptor-gateway.d.ts +29 -0
  42. package/blockstore/interceptor-gateway.d.ts.map +1 -0
  43. package/blockstore/interceptor-gateway.js +137 -0
  44. package/blockstore/interceptor-gateway.js.map +1 -0
  45. package/blockstore/loader-helpers.d.ts +10 -0
  46. package/blockstore/loader-helpers.d.ts.map +1 -0
  47. package/blockstore/loader-helpers.js +115 -0
  48. package/blockstore/loader-helpers.js.map +1 -0
  49. package/blockstore/loader.d.ts +61 -0
  50. package/blockstore/loader.d.ts.map +1 -0
  51. package/blockstore/loader.js +494 -0
  52. package/blockstore/loader.js.map +1 -0
  53. package/blockstore/register-store-protocol.d.ts +22 -0
  54. package/blockstore/register-store-protocol.d.ts.map +1 -0
  55. package/blockstore/register-store-protocol.js +114 -0
  56. package/blockstore/register-store-protocol.js.map +1 -0
  57. package/blockstore/serde-gateway.d.ts +78 -0
  58. package/blockstore/serde-gateway.d.ts.map +1 -0
  59. package/blockstore/serde-gateway.js +2 -0
  60. package/blockstore/serde-gateway.js.map +1 -0
  61. package/blockstore/store-factory.d.ts +11 -0
  62. package/blockstore/store-factory.d.ts.map +1 -0
  63. package/blockstore/store-factory.js +104 -0
  64. package/blockstore/store-factory.js.map +1 -0
  65. package/blockstore/store-remote.d.ts +2 -0
  66. package/blockstore/store-remote.d.ts.map +1 -0
  67. package/blockstore/store-remote.js +2 -0
  68. package/blockstore/store-remote.js.map +1 -0
  69. package/blockstore/store.d.ts +86 -0
  70. package/blockstore/store.d.ts.map +1 -0
  71. package/blockstore/store.js +439 -0
  72. package/blockstore/store.js.map +1 -0
  73. package/blockstore/task-manager.d.ts +19 -0
  74. package/blockstore/task-manager.d.ts.map +1 -0
  75. package/blockstore/task-manager.js +50 -0
  76. package/blockstore/task-manager.js.map +1 -0
  77. package/blockstore/transaction.d.ts +62 -0
  78. package/blockstore/transaction.d.ts.map +1 -0
  79. package/blockstore/transaction.js +261 -0
  80. package/blockstore/transaction.js.map +1 -0
  81. package/blockstore/types.d.ts +508 -0
  82. package/blockstore/types.d.ts.map +1 -0
  83. package/blockstore/types.js +83 -0
  84. package/blockstore/types.js.map +1 -0
  85. package/blockstore/uri-interceptor.d.ts +19 -0
  86. package/blockstore/uri-interceptor.d.ts.map +1 -0
  87. package/blockstore/uri-interceptor.js +61 -0
  88. package/blockstore/uri-interceptor.js.map +1 -0
  89. package/bundle-not-impl.d.ts +2 -0
  90. package/bundle-not-impl.d.ts.map +1 -0
  91. package/bundle-not-impl.js +4 -0
  92. package/bundle-not-impl.js.map +1 -0
  93. package/cli/main.js +26616 -0
  94. package/crdt-clock.d.ts +27 -0
  95. package/crdt-clock.d.ts.map +1 -0
  96. package/crdt-clock.js +138 -0
  97. package/crdt-clock.js.map +1 -0
  98. package/crdt-helpers.d.ts +19 -0
  99. package/crdt-helpers.d.ts.map +1 -0
  100. package/crdt-helpers.js +332 -0
  101. package/crdt-helpers.js.map +1 -0
  102. package/crdt.d.ts +41 -0
  103. package/crdt.d.ts.map +1 -0
  104. package/crdt.js +164 -0
  105. package/crdt.js.map +1 -0
  106. package/database.d.ts +34 -0
  107. package/database.d.ts.map +1 -0
  108. package/database.js +124 -0
  109. package/database.js.map +1 -0
  110. package/deno.json +2 -2
  111. package/index.d.ts +15 -2741
  112. package/index.d.ts.map +1 -0
  113. package/index.js +14 -7274
  114. package/index.js.map +1 -1
  115. package/indexer-helpers.d.ts +69 -0
  116. package/indexer-helpers.d.ts.map +1 -0
  117. package/indexer-helpers.js +136 -0
  118. package/indexer-helpers.js.map +1 -0
  119. package/indexer.d.ts +24 -0
  120. package/indexer.d.ts.map +1 -0
  121. package/indexer.js +230 -0
  122. package/indexer.js.map +1 -0
  123. package/ledger.d.ts +55 -0
  124. package/ledger.d.ts.map +1 -0
  125. package/ledger.js +234 -0
  126. package/ledger.js.map +1 -0
  127. package/package.json +26 -17
  128. package/protocols/cloud/http-connection.d.ts +25 -0
  129. package/protocols/cloud/http-connection.d.ts.map +1 -0
  130. package/protocols/cloud/http-connection.js +153 -0
  131. package/protocols/cloud/http-connection.js.map +1 -0
  132. package/protocols/cloud/index.d.ts +10 -0
  133. package/protocols/cloud/index.d.ts.map +1 -0
  134. package/protocols/cloud/index.js +10 -0
  135. package/protocols/cloud/index.js.map +1 -0
  136. package/protocols/cloud/msg-raw-connection-base.d.ts +16 -0
  137. package/protocols/cloud/msg-raw-connection-base.d.ts.map +1 -0
  138. package/protocols/cloud/msg-raw-connection-base.js +22 -0
  139. package/protocols/cloud/msg-raw-connection-base.js.map +1 -0
  140. package/protocols/cloud/msg-types-data.d.ts +36 -0
  141. package/protocols/cloud/msg-types-data.d.ts.map +1 -0
  142. package/protocols/cloud/msg-types-data.js +38 -0
  143. package/protocols/cloud/msg-types-data.js.map +1 -0
  144. package/protocols/cloud/msg-types-meta.d.ts +41 -0
  145. package/protocols/cloud/msg-types-meta.d.ts.map +1 -0
  146. package/protocols/cloud/msg-types-meta.js +98 -0
  147. package/protocols/cloud/msg-types-meta.js.map +1 -0
  148. package/protocols/cloud/msg-types-wal.d.ts +33 -0
  149. package/protocols/cloud/msg-types-wal.d.ts.map +1 -0
  150. package/protocols/cloud/msg-types-wal.js +38 -0
  151. package/protocols/cloud/msg-types-wal.js.map +1 -0
  152. package/protocols/cloud/msg-types.d.ts +282 -0
  153. package/protocols/cloud/msg-types.d.ts.map +1 -0
  154. package/protocols/cloud/msg-types.js +278 -0
  155. package/protocols/cloud/msg-types.js.map +1 -0
  156. package/protocols/cloud/msger.d.ts +79 -0
  157. package/protocols/cloud/msger.d.ts.map +1 -0
  158. package/protocols/cloud/msger.js +198 -0
  159. package/protocols/cloud/msger.js.map +1 -0
  160. package/protocols/cloud/ws-connection.d.ts +29 -0
  161. package/protocols/cloud/ws-connection.d.ts.map +1 -0
  162. package/protocols/cloud/ws-connection.js +166 -0
  163. package/protocols/cloud/ws-connection.js.map +1 -0
  164. package/protocols/index.d.ts +2 -0
  165. package/protocols/index.d.ts.map +1 -0
  166. package/protocols/index.js +2 -0
  167. package/protocols/index.js.map +1 -0
  168. package/react/create-attach.d.ts +6 -0
  169. package/react/create-attach.d.ts.map +1 -0
  170. package/react/create-attach.js +75 -0
  171. package/react/create-attach.js.map +1 -0
  172. package/react/{index.d.cts → img-file.d.ts} +6 -53
  173. package/react/img-file.d.ts.map +1 -0
  174. package/react/img-file.js +57 -0
  175. package/react/img-file.js.map +1 -0
  176. package/react/index.d.ts +5 -336
  177. package/react/index.d.ts.map +1 -0
  178. package/react/index.js +4 -358
  179. package/react/index.js.map +1 -1
  180. package/react/types.d.ts +71 -0
  181. package/react/types.d.ts.map +1 -0
  182. package/react/types.js +2 -0
  183. package/react/types.js.map +1 -0
  184. package/react/use-all-docs.d.ts +4 -0
  185. package/react/use-all-docs.d.ts.map +1 -0
  186. package/react/use-all-docs.js +25 -0
  187. package/react/use-all-docs.js.map +1 -0
  188. package/react/use-attach.d.ts +6 -0
  189. package/react/use-attach.d.ts.map +1 -0
  190. package/react/use-attach.js +75 -0
  191. package/react/use-attach.js.map +1 -0
  192. package/react/use-changes.d.ts +4 -0
  193. package/react/use-changes.d.ts.map +1 -0
  194. package/react/use-changes.js +19 -0
  195. package/react/use-changes.js.map +1 -0
  196. package/react/use-document.d.ts +4 -0
  197. package/react/use-document.d.ts.map +1 -0
  198. package/react/use-document.js +109 -0
  199. package/react/use-document.js.map +1 -0
  200. package/react/use-fireproof.d.ts +6 -0
  201. package/react/use-fireproof.d.ts.map +1 -0
  202. package/react/use-fireproof.js +20 -0
  203. package/react/use-fireproof.js.map +1 -0
  204. package/react/use-live-query.d.ts +4 -0
  205. package/react/use-live-query.d.ts.map +1 -0
  206. package/react/use-live-query.js +27 -0
  207. package/react/use-live-query.js.map +1 -0
  208. package/runtime/files.d.ts +12 -0
  209. package/runtime/files.d.ts.map +1 -0
  210. package/runtime/files.js +29 -0
  211. package/runtime/files.js.map +1 -0
  212. package/runtime/gateways/cloud/gateway.d.ts +42 -0
  213. package/runtime/gateways/cloud/gateway.d.ts.map +1 -0
  214. package/runtime/gateways/cloud/gateway.js +528 -0
  215. package/runtime/gateways/cloud/gateway.js.map +1 -0
  216. package/runtime/gateways/cloud/index.d.ts +3 -0
  217. package/runtime/gateways/cloud/index.d.ts.map +1 -0
  218. package/runtime/gateways/cloud/index.js +3 -0
  219. package/runtime/gateways/cloud/index.js.map +1 -0
  220. package/runtime/gateways/cloud/to-cloud.d.ts +46 -0
  221. package/runtime/gateways/cloud/to-cloud.d.ts.map +1 -0
  222. package/runtime/gateways/cloud/to-cloud.js +159 -0
  223. package/runtime/gateways/cloud/to-cloud.js.map +1 -0
  224. package/runtime/gateways/def-serde-gateway.d.ts +18 -0
  225. package/runtime/gateways/def-serde-gateway.d.ts.map +1 -0
  226. package/runtime/gateways/def-serde-gateway.js +89 -0
  227. package/runtime/gateways/def-serde-gateway.js.map +1 -0
  228. package/runtime/gateways/file/deno/deno-filesystem.d.ts +27 -0
  229. package/runtime/gateways/file/deno/deno-filesystem.d.ts.map +1 -0
  230. package/runtime/gateways/file/deno/deno-filesystem.js +52 -0
  231. package/runtime/gateways/file/deno/deno-filesystem.js.map +1 -0
  232. package/runtime/gateways/file/deno/get-sys-file-system.d.ts +4 -0
  233. package/runtime/gateways/file/deno/get-sys-file-system.d.ts.map +1 -0
  234. package/runtime/gateways/file/deno/get-sys-file-system.js +11 -0
  235. package/runtime/gateways/file/deno/get-sys-file-system.js.map +1 -0
  236. package/runtime/gateways/file/deno/index.d.ts +2 -0
  237. package/runtime/gateways/file/deno/index.d.ts.map +1 -0
  238. package/runtime/gateways/file/deno/index.js +2 -0
  239. package/runtime/gateways/file/deno/index.js.map +1 -0
  240. package/runtime/gateways/file/gateway-impl.d.ts +18 -0
  241. package/runtime/gateways/file/gateway-impl.d.ts.map +1 -0
  242. package/runtime/gateways/file/gateway-impl.js +121 -0
  243. package/runtime/gateways/file/gateway-impl.js.map +1 -0
  244. package/runtime/gateways/file/index.d.ts +3 -0
  245. package/runtime/gateways/file/index.d.ts.map +1 -0
  246. package/runtime/gateways/file/index.js +3 -0
  247. package/runtime/gateways/file/index.js.map +1 -0
  248. package/runtime/gateways/file/key-bag-file.d.ts +19 -0
  249. package/runtime/gateways/file/key-bag-file.d.ts.map +1 -0
  250. package/runtime/gateways/file/key-bag-file.js +40 -0
  251. package/runtime/gateways/file/key-bag-file.js.map +1 -0
  252. package/runtime/gateways/file/node/get-sys-file-system.d.ts +4 -0
  253. package/runtime/gateways/file/node/get-sys-file-system.d.ts.map +1 -0
  254. package/runtime/gateways/file/node/get-sys-file-system.js +11 -0
  255. package/runtime/gateways/file/node/get-sys-file-system.js.map +1 -0
  256. package/runtime/gateways/file/node/index.d.ts +2 -0
  257. package/runtime/gateways/file/node/index.d.ts.map +1 -0
  258. package/runtime/gateways/file/node/index.js +2 -0
  259. package/runtime/gateways/file/node/index.js.map +1 -0
  260. package/runtime/gateways/file/node/node-filesystem.d.ts +32 -0
  261. package/runtime/gateways/file/node/node-filesystem.d.ts.map +1 -0
  262. package/runtime/gateways/file/node/node-filesystem.js +33 -0
  263. package/runtime/gateways/file/node/node-filesystem.js.map +1 -0
  264. package/runtime/gateways/file/node/to-array-buffer.d.ts +2 -0
  265. package/runtime/gateways/file/node/to-array-buffer.d.ts.map +1 -0
  266. package/runtime/gateways/file/node/to-array-buffer.js +12 -0
  267. package/runtime/gateways/file/node/to-array-buffer.js.map +1 -0
  268. package/runtime/gateways/file/sys-file-system-factory.d.ts +4 -0
  269. package/runtime/gateways/file/sys-file-system-factory.d.ts.map +1 -0
  270. package/runtime/gateways/file/sys-file-system-factory.js +13 -0
  271. package/runtime/gateways/file/sys-file-system-factory.js.map +1 -0
  272. package/runtime/gateways/file/utils.d.ts +5 -0
  273. package/runtime/gateways/file/utils.d.ts.map +1 -0
  274. package/runtime/gateways/file/utils.js +27 -0
  275. package/runtime/gateways/file/utils.js.map +1 -0
  276. package/runtime/gateways/file/version.d.ts +2 -0
  277. package/runtime/gateways/file/version.d.ts.map +1 -0
  278. package/runtime/gateways/file/version.js +2 -0
  279. package/runtime/gateways/file/version.js.map +1 -0
  280. package/runtime/gateways/fp-envelope-serialize.d.ts +50 -0
  281. package/runtime/gateways/fp-envelope-serialize.d.ts.map +1 -0
  282. package/runtime/gateways/fp-envelope-serialize.js +141 -0
  283. package/runtime/gateways/fp-envelope-serialize.js.map +1 -0
  284. package/runtime/gateways/index.d.ts +6 -0
  285. package/runtime/gateways/index.d.ts.map +1 -0
  286. package/runtime/gateways/index.js +6 -0
  287. package/runtime/gateways/index.js.map +1 -0
  288. package/runtime/gateways/indexeddb/gateway-impl.d.ts +22 -0
  289. package/runtime/gateways/indexeddb/gateway-impl.d.ts.map +1 -0
  290. package/runtime/gateways/indexeddb/gateway-impl.js +147 -0
  291. package/runtime/gateways/indexeddb/gateway-impl.js.map +1 -0
  292. package/runtime/gateways/indexeddb/index.d.ts +6 -0
  293. package/runtime/gateways/indexeddb/index.d.ts.map +1 -0
  294. package/runtime/gateways/indexeddb/index.js +6 -0
  295. package/runtime/gateways/indexeddb/index.js.map +1 -0
  296. package/runtime/gateways/indexeddb/key-bag-indexeddb.d.ts +15 -0
  297. package/runtime/gateways/indexeddb/key-bag-indexeddb.d.ts.map +1 -0
  298. package/runtime/gateways/indexeddb/key-bag-indexeddb.js +42 -0
  299. package/runtime/gateways/indexeddb/key-bag-indexeddb.js.map +1 -0
  300. package/runtime/gateways/indexeddb-version.d.ts +2 -0
  301. package/runtime/gateways/indexeddb-version.d.ts.map +1 -0
  302. package/runtime/gateways/indexeddb-version.js +2 -0
  303. package/runtime/gateways/indexeddb-version.js.map +1 -0
  304. package/runtime/gateways/memory/gateway.d.ts +18 -0
  305. package/runtime/gateways/memory/gateway.d.ts.map +1 -0
  306. package/runtime/gateways/memory/gateway.js +73 -0
  307. package/runtime/gateways/memory/gateway.js.map +1 -0
  308. package/runtime/gateways/memory/version.d.ts +2 -0
  309. package/runtime/gateways/memory/version.d.ts.map +1 -0
  310. package/runtime/gateways/memory/version.js +2 -0
  311. package/runtime/gateways/memory/version.js.map +1 -0
  312. package/runtime/index.d.ts +13 -0
  313. package/runtime/index.d.ts.map +1 -0
  314. package/runtime/index.js +13 -0
  315. package/runtime/index.js.map +1 -0
  316. package/runtime/key-bag-memory.d.ts +12 -0
  317. package/runtime/key-bag-memory.d.ts.map +1 -0
  318. package/runtime/key-bag-memory.js +23 -0
  319. package/runtime/key-bag-memory.js.map +1 -0
  320. package/runtime/key-bag.d.ts +85 -0
  321. package/runtime/key-bag.d.ts.map +1 -0
  322. package/runtime/key-bag.js +411 -0
  323. package/runtime/key-bag.js.map +1 -0
  324. package/runtime/keyed-crypto.d.ts +19 -0
  325. package/runtime/keyed-crypto.d.ts.map +1 -0
  326. package/runtime/keyed-crypto.js +192 -0
  327. package/runtime/keyed-crypto.js.map +1 -0
  328. package/runtime/memory-sys-container.d.ts +2 -0
  329. package/runtime/memory-sys-container.d.ts.map +1 -0
  330. package/runtime/memory-sys-container.js +2 -0
  331. package/runtime/memory-sys-container.js.map +1 -0
  332. package/runtime/meta-key-hack.d.ts +42 -0
  333. package/runtime/meta-key-hack.d.ts.map +1 -0
  334. package/runtime/meta-key-hack.js +201 -0
  335. package/runtime/meta-key-hack.js.map +1 -0
  336. package/runtime/sts-service/index.d.ts +40 -0
  337. package/runtime/sts-service/index.d.ts.map +1 -0
  338. package/runtime/sts-service/index.js +102 -0
  339. package/runtime/sts-service/index.js.map +1 -0
  340. package/runtime/sys-container.d.ts +2 -0
  341. package/runtime/sys-container.d.ts.map +1 -0
  342. package/runtime/sys-container.js +2 -0
  343. package/runtime/sys-container.js.map +1 -0
  344. package/runtime/wait-pr-multiformats/block.d.ts +47 -0
  345. package/runtime/wait-pr-multiformats/block.d.ts.map +1 -0
  346. package/runtime/wait-pr-multiformats/block.js +64 -0
  347. package/runtime/wait-pr-multiformats/block.js.map +1 -0
  348. package/runtime/wait-pr-multiformats/codec-interface.d.ts +29 -0
  349. package/runtime/wait-pr-multiformats/codec-interface.d.ts.map +1 -0
  350. package/runtime/wait-pr-multiformats/codec-interface.js +2 -0
  351. package/runtime/wait-pr-multiformats/codec-interface.js.map +1 -0
  352. package/runtime/wait-pr-multiformats/index.d.ts +3 -0
  353. package/runtime/wait-pr-multiformats/index.d.ts.map +1 -0
  354. package/runtime/wait-pr-multiformats/index.js +3 -0
  355. package/runtime/wait-pr-multiformats/index.js.map +1 -0
  356. package/tests/blockstore/interceptor-gateway.test.ts +10 -9
  357. package/tests/blockstore/keyed-crypto.test.ts +2 -2
  358. package/tests/blockstore/loader.test.ts +68 -51
  359. package/tests/blockstore/standalone.test.ts +152 -0
  360. package/tests/blockstore/store.test.ts +16 -9
  361. package/tests/blockstore/transaction.test.ts +19 -16
  362. package/tests/fireproof/all-gateway.test.ts +12 -27
  363. package/tests/fireproof/attachable.test.ts +426 -97
  364. package/tests/fireproof/crdt.test.ts +23 -0
  365. package/tests/fireproof/database.test.ts +13 -12
  366. package/tests/fireproof/fireproof.test.ts +2 -5
  367. package/tests/fireproof/indexer.test.ts +4 -0
  368. package/tests/helpers.ts +30 -14
  369. package/tests/react/img-file.test.tsx +0 -9
  370. package/tests/react/use-fireproof-stability.test.tsx +5 -5
  371. package/tests/react/use-fireproof.test.tsx +18 -13
  372. package/tests/runtime/meta-key-hack.test.ts +7 -6
  373. package/tests/setup.indexeddb.ts +0 -9
  374. package/types.d.ts +460 -0
  375. package/types.d.ts.map +1 -0
  376. package/types.js +60 -0
  377. package/types.js.map +1 -0
  378. package/use-fireproof/iframe-strategy.d.ts +13 -0
  379. package/use-fireproof/iframe-strategy.d.ts.map +1 -0
  380. package/use-fireproof/iframe-strategy.js +83 -0
  381. package/use-fireproof/iframe-strategy.js.map +1 -0
  382. package/use-fireproof/index.d.ts +10 -0
  383. package/use-fireproof/index.d.ts.map +1 -0
  384. package/use-fireproof/index.js +16 -0
  385. package/use-fireproof/index.js.map +1 -0
  386. package/use-fireproof/redirect-strategy.d.ts +8 -0
  387. package/use-fireproof/redirect-strategy.d.ts.map +1 -0
  388. package/use-fireproof/redirect-strategy.js +31 -0
  389. package/use-fireproof/redirect-strategy.js.map +1 -0
  390. package/utils.d.ts +45 -0
  391. package/utils.d.ts.map +1 -0
  392. package/utils.js +406 -0
  393. package/utils.js.map +1 -0
  394. package/version.d.ts +2 -0
  395. package/version.d.ts.map +1 -0
  396. package/version.js +4 -0
  397. package/version.js.map +1 -0
  398. package/write-queue.d.ts +9 -0
  399. package/write-queue.d.ts.map +1 -0
  400. package/write-queue.js +70 -0
  401. package/write-queue.js.map +1 -0
  402. package/deno/index.d.ts +0 -7
  403. package/deno/index.js +0 -67
  404. package/deno/index.js.map +0 -1
  405. package/deno/metafile-esm.json +0 -1
  406. package/index.cjs +0 -7275
  407. package/index.cjs.map +0 -1
  408. package/index.d.cts +0 -2741
  409. package/indexeddb/index.cjs +0 -218
  410. package/indexeddb/index.cjs.map +0 -1
  411. package/indexeddb/index.d.cts +0 -30
  412. package/indexeddb/index.d.ts +0 -30
  413. package/indexeddb/index.js +0 -195
  414. package/indexeddb/index.js.map +0 -1
  415. package/indexeddb/metafile-cjs.json +0 -1
  416. package/indexeddb/metafile-esm.json +0 -1
  417. package/metafile-cjs.json +0 -1
  418. package/metafile-esm.json +0 -1
  419. package/node/index.cjs +0 -93
  420. package/node/index.cjs.map +0 -1
  421. package/node/index.d.cts +0 -7
  422. package/node/index.d.ts +0 -7
  423. package/node/index.js +0 -60
  424. package/node/index.js.map +0 -1
  425. package/node/metafile-cjs.json +0 -1
  426. package/node/metafile-esm.json +0 -1
  427. package/react/index.cjs +0 -392
  428. package/react/index.cjs.map +0 -1
  429. package/react/metafile-cjs.json +0 -1
  430. package/react/metafile-esm.json +0 -1
  431. package/tests/www/gallery.html +0 -132
  432. package/tests/www/iife.html +0 -42
  433. package/tests/www/todo-aws.html +0 -232
  434. package/tests/www/todo-ipfs.html +0 -213
  435. package/tests/www/todo-local.html +0 -214
  436. package/tests/www/todo-netlify.html +0 -227
  437. package/tests/www/todo.html +0 -254
@@ -0,0 +1 @@
1
+ {"version":3,"file":"msg-types-data.d.ts","sourceRoot":"","sources":["../../../../../src/protocols/cloud/msg-types-data.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,iBAAiB,CAAC;AAC9C,OAAO,EACL,YAAY,EACZ,MAAM,EACN,OAAO,EACP,YAAY,EACZ,YAAY,EAEZ,iBAAiB,EAEjB,KAAK,EAEL,WAAW,EACX,eAAe,EACf,YAAY,EACb,MAAM,gBAAgB,CAAC;AAExB,MAAM,WAAW,UAAW,SAAQ,YAAY;IAC9C,QAAQ,CAAC,IAAI,EAAE,YAAY,CAAC;CAC7B;AAED,wBAAgB,eAAe,CAAC,KAAK,EAAE,MAAM,EAAE,GAAG,EAAE,iBAAiB,EAAE,GAAG,EAAE,KAAK,GAAG,UAAU,CAE7F;AAED,wBAAgB,eAAe,CAAC,GAAG,EAAE,OAAO,GAAG,GAAG,IAAI,UAAU,CAE/D;AAED,MAAM,WAAW,UAAW,SAAQ,YAAY;IAC9C,QAAQ,CAAC,IAAI,EAAE,YAAY,CAAC;CAE7B;AAED,wBAAgB,eAAe,CAAC,GAAG,EAAE,OAAO,GAAG,GAAG,IAAI,UAAU,CAE/D;AAED,MAAM,WAAW,qBAAqB;IACpC,qBAAqB,CAAC,GAAG,EAAE,WAAW,EAAE,CAAC,EAAE,YAAY,GAAG,OAAO,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC;CAChF;AAED,wBAAgB,eAAe,CAC7B,MAAM,EAAE,WAAW,EACnB,GAAG,EAAE,eAAe,CAAC,UAAU,CAAC,EAChC,GAAG,EAAE,qBAAqB,GACzB,OAAO,CAAC,YAAY,CAAC,UAAU,CAAC,CAAC,CAQnC;AAED,MAAM,WAAW,UAAW,SAAQ,YAAY;IAC9C,QAAQ,CAAC,IAAI,EAAE,YAAY,CAAC;CAE7B;AAED,wBAAgB,eAAe,CAAC,G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"reqGetData", sup, ctx);
4
+ }
5
+ export function MsgIsReqGetData(msg) {
6
+ return msg.type === "reqGetData";
7
+ }
8
+ export function MsgIsResGetData(msg) {
9
+ return msg.type === "resGetData" && MsgIsTenantLedger(msg);
10
+ }
11
+ export function buildResGetData(msgCtx, req, ctx) {
12
+ return buildRes({ method: "GET", store: req.methodParam.store }, "resGetData", msgCtx, req, ctx);
13
+ }
14
+ export function MsgIsReqPutData(msg) {
15
+ return msg.type === "reqPutData";
16
+ }
17
+ export function buildReqPutData(sthis, sup, ctx) {
18
+ return buildReqSignedUrl(sthis, "reqPutData", sup, ctx);
19
+ }
20
+ export function MsgIsResPutData(msg) {
21
+ return msg.type === "resPutData";
22
+ }
23
+ export function buildResPutData(msgCtx, req, ctx) {
24
+ return buildRes({ method: "PUT", store: req.methodParam.store }, "resPutData", msgCtx, req, ctx);
25
+ }
26
+ export function MsgIsReqDelData(msg) {
27
+ return msg.type === "reqDelData";
28
+ }
29
+ export function buildReqDelData(sthis, sup, ctx) {
30
+ return buildReqSignedUrl(sthis, "reqDelData", sup, ctx);
31
+ }
32
+ export function MsgIsResDelData(msg) {
33
+ return msg.type === "resDelData";
34
+ }
35
+ export function buildResDelData(msgCtx, req, ctx) {
36
+ return buildRes({ method: "DELETE", store: req.methodParam.store }, "resDelData", msgCtx, req, ctx);
37
+ }
38
+ //# sourceMappingURL=msg-types-data.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"msg-types-data.js","sourceRoot":"","sources":["../../../../../src/protocols/cloud/msg-types-data.ts"],"names":[],"mappings":"AACA,OAAO,EAML,QAAQ,EAER,iBAAiB,EAEjB,iBAAiB,GAIlB,MAAM,gBAAgB,CAAC;AAMxB,MAAM,UAAU,eAAe,CAAC,KAAa,EAAE,GAAsB,EAAE,GAAU;IAC/E,OAAO,iBAAiB,CAAa,KAAK,EAAE,YAAY,EAAE,GAAG,EAAE,GAAG,CAAC,CAAC;AACtE,CAAC;AAED,MAAM,UAAU,eAAe,CAAC,GA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GAAG,EAAE,GAAG,CAAC,CAAC;AACtE,CAAC;AAMD,MAAM,UAAU,eAAe,CAAC,GAAY;IAC1C,OAAO,GAAG,CAAC,IAAI,KAAK,YAAY,CAAC;AACnC,CAAC;AAED,MAAM,UAAU,eAAe,CAC7B,MAAmB,EACnB,GAAgC,EAChC,GAA0B;IAE1B,OAAO,QAAQ,CACb,EAAE,MAAM,EAAE,QAAQ,EAAE,KAAK,EAAE,GAAG,CAAC,WAAW,CAAC,KAAK,EAAE,EAClD,YAAY,EACZ,MAAM,EACN,GAAG,EACH,GAAG,CACJ,CAAC;AACJ,CAAC"}
@@ -0,0 +1,41 @@
1
+ import { AuthType, GwCtx, MsgBase, MsgWithTenantLedger, NextId, ResOptionalSignedUrl, MsgTypesCtx, MsgWithConnAuth, SignedUrlParam, MethodSignedUrlParam, ResSignedUrl, ReqSignedUrl, MethodSignedUrlParams } from "./msg-types.js";
2
+ import { V2SerializedMetaKey } from "../../runtime/meta-key-hack.js";
3
+ export interface ReqPutMeta extends MsgWithTenantLedger<MsgWithConnAuth> {
4
+ readonly type: "reqPutMeta";
5
+ readonly methodParam: MethodSignedUrlParam;
6
+ readonly urlParam: SignedUrlParam;
7
+ readonly meta: V2SerializedMetaKey;
8
+ }
9
+ export interface ResPutMetaVal {
10
+ readonly type: "resPutMeta";
11
+ readonly meta: V2SerializedMetaKey;
12
+ }
13
+ export type ResPutMeta = ResPutMetaVal & ResSignedUrl & MsgWithTenantLedger<MsgWithConnAuth>;
14
+ export declare function buildReqPutMeta(sthis: NextId, auth: AuthType, signedUrlParam: SignedUrlParam, meta: V2SerializedMetaKey, gwCtx: GwCtx): ReqPutMeta;
15
+ export declare function MsgIsReqPutMeta(msg: MsgBase): msg is ReqPutMeta;
16
+ export declare function buildResPutMeta(_msgCtx: MsgTypesCtx, req: MsgWithTenantLedger<MsgWithConnAuth<ReqPutMeta>>, meta: V2SerializedMetaKey, signedUrl: string): ResPutMeta;
17
+ export declare function MsgIsResPutMeta(qs: MsgBase): qs is ResPutMeta;
18
+ export interface BindGetMeta extends MsgWithTenantLedger<MsgWithConnAuth & ReqSignedUrl> {
19
+ readonly type: "bindGetMeta";
20
+ }
21
+ export declare function MsgIsBindGetMeta(msg: MsgBase): msg is BindGetMeta;
22
+ export interface EventGetMeta extends MsgWithTenantLedger<MsgWithConnAuth>, ResSignedUrl {
23
+ readonly type: "eventGetMeta";
24
+ readonly meta: V2SerializedMetaKey;
25
+ }
26
+ export declare function buildBindGetMeta(sthis: NextId, auth: AuthType, msp: MethodSignedUrlParams, gwCtx: GwCtx): BindGetMeta;
27
+ export declare function buildEventGetMeta(_msgCtx: MsgTypesCtx, req: MsgWithTenantLedger<MsgWithConnAuth<ReqSignedUrl>>, meta: V2SerializedMetaKey, gwCtx: GwCtx, signedUrl: string): EventGetMeta;
28
+ export declare function MsgIsEventGetMeta(qs: MsgBase): qs is EventGetMeta;
29
+ export interface ReqDelMeta extends MsgWithTenantLedger<MsgWithConnAuth> {
30
+ readonly type: "reqDelMeta";
31
+ readonly urlParam: SignedUrlParam;
32
+ readonly meta?: V2SerializedMetaKey;
33
+ }
34
+ export declare function buildReqDelMeta(sthis: NextId, auth: AuthType, param: SignedUrlParam, gwCtx: GwCtx, meta?: V2SerializedMetaKey): ReqDelMeta;
35
+ export declare function MsgIsReqDelMeta(msg: MsgBase): msg is ReqDelMeta;
36
+ export interface ResDelMeta extends MsgWithTenantLedger<MsgWithConnAuth>, ResOptionalSignedUrl {
37
+ readonly type: "resDelMeta";
38
+ }
39
+ export declare function buildResDelMeta(req: MsgWithTenantLedger<MsgWithConnAuth<ReqDelMeta>>, param: SignedUrlParam, signedUrl?: string): ResDelMeta;
40
+ export declare function MsgIsResDelMeta(qs: MsgBase): qs is ResDelMeta;
41
+ //# sourceMappingURL=msg-types-meta.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"msg-types-meta.d.ts","sourceRoot":"","sources":["../../../../../src/protocols/cloud/msg-types-meta.ts"],"names":[],"mappings":"AAA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,CAAC,EAAE,oBAAoB;IAC5F,QAAQ,CAAC,IAAI,EAAE,YAAY,CAAC;CAC7B;AAED,wBAAgB,eAAe,CAE7B,GAAG,EAAE,mBAAmB,CAAC,eAAe,CAAC,UAAU,CAAC,CAAC,EACrD,KAAK,EAAE,cAAc,EACrB,SAAS,CAAC,EAAE,MAAM,GACjB,UAAU,CAaZ;AAED,wBAAgB,eAAe,CAAC,EAAE,EAAE,OAAO,GAAG,EAAE,IAAI,UAAU,CAE7D"}
@@ -0,0 +1,98 @@
1
+ import { VERSION, } from "./msg-types.js";
2
+ export function buildReqPutMeta(sthis, auth, signedUrlParam, meta, gwCtx) {
3
+ return {
4
+ auth,
5
+ tid: sthis.nextId().str,
6
+ type: "reqPutMeta",
7
+ ...gwCtx,
8
+ version: VERSION,
9
+ methodParam: {
10
+ method: "PUT",
11
+ store: "meta",
12
+ },
13
+ urlParam: signedUrlParam,
14
+ meta,
15
+ };
16
+ }
17
+ export function MsgIsReqPutMeta(msg) {
18
+ return msg.type === "reqPutMeta";
19
+ }
20
+ export function buildResPutMeta(_msgCtx, req, meta, signedUrl) {
21
+ return {
22
+ meta,
23
+ tid: req.tid,
24
+ conn: req.conn,
25
+ auth: req.auth,
26
+ methodParam: req.methodParam,
27
+ urlParam: req.urlParam,
28
+ tenant: req.tenant,
29
+ type: "resPutMeta",
30
+ signedUrl,
31
+ version: VERSION,
32
+ };
33
+ }
34
+ export function MsgIsResPutMeta(qs) {
35
+ return qs.type === "resPutMeta";
36
+ }
37
+ export function MsgIsBindGetMeta(msg) {
38
+ return msg.type === "bindGetMeta";
39
+ }
40
+ export function buildBindGetMeta(sthis, auth, msp, gwCtx) {
41
+ return {
42
+ auth,
43
+ ...gwCtx,
44
+ tid: gwCtx.tid ?? sthis.nextId().str,
45
+ type: "bindGetMeta",
46
+ version: VERSION,
47
+ ...msp,
48
+ };
49
+ }
50
+ export function buildEventGetMeta(_msgCtx, req, meta, gwCtx, signedUrl) {
51
+ return {
52
+ conn: gwCtx.conn,
53
+ tenant: req.tenant,
54
+ auth: req.auth,
55
+ tid: req.tid,
56
+ meta,
57
+ signedUrl,
58
+ type: "eventGetMeta",
59
+ urlParam: req.urlParam,
60
+ methodParam: { method: "GET", store: "meta" },
61
+ version: VERSION,
62
+ };
63
+ }
64
+ export function MsgIsEventGetMeta(qs) {
65
+ return qs.type === "eventGetMeta";
66
+ }
67
+ export function buildReqDelMeta(sthis, auth, param, gwCtx, meta) {
68
+ return {
69
+ auth,
70
+ tid: sthis.nextId().str,
71
+ tenant: gwCtx.tenant,
72
+ conn: gwCtx.conn,
73
+ urlParam: param,
74
+ meta,
75
+ type: "reqDelMeta",
76
+ version: VERSION,
77
+ };
78
+ }
79
+ export function MsgIsReqDelMeta(msg) {
80
+ return msg.type === "reqDelMeta";
81
+ }
82
+ export function buildResDelMeta(req, param, signedUrl) {
83
+ return {
84
+ auth: req.auth,
85
+ methodParam: { method: "DELETE", store: "meta" },
86
+ urlParam: param,
87
+ signedUrl,
88
+ tid: req.tid,
89
+ conn: req.conn,
90
+ tenant: req.tenant,
91
+ type: "resDelMeta",
92
+ version: VERSION,
93
+ };
94
+ }
95
+ export function MsgIsResDelMeta(qs) {
96
+ return qs.type === "resDelMeta";
97
+ }
98
+ //# sourceMappingURL=msg-types-meta.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"msg-types-meta.js","sourceRoot":"","sources":["../../../../../src/protocols/cloud/msg-types-meta.ts"],"names":[],"mappings":"AAAA,OAAO,EAYL,OAAO,GAGR,MAAM,gBAAgB,CAAC;AAkBxB,MAAM,UAAU,eAAe,CAC7B,KAAa,EACb,IAAc,EACd,cAA8B,EAC9B,IAAyB,EACzB,KAAY;IAEZ,OAAO;QACL,IAAI;QACJ,GAAG,EAAE,KAAK,CAAC,MAAM,EAAE,CAAC,GAAG;QACvB,IAAI,EAAE,YAAY;QAClB,GAAG,KAAK;QACR,OAAO,EAAE,OAAO;QAChB,WAAW,EAAE;YACX,MAAM,EAAE,KAAK;YAC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U,eAAe,CAAC,EAAW;IACzC,OAAO,EAAE,CAAC,IAAI,KAAK,YAAY,CAAC;AAClC,CAAC"}
@@ -0,0 +1,33 @@
1
+ import { MsgBase, MsgWithError, NextId, ReqSignedUrl, ResSignedUrl, ReqSignedUrlParam, GwCtx, MsgWithTenantLedger, MsgTypesCtx, MsgWithConnAuth } from "./msg-types.js";
2
+ import { CalculatePreSignedUrl } from "./msg-types-data.js";
3
+ export interface ReqGetWAL extends ReqSignedUrl {
4
+ readonly type: "reqGetWAL";
5
+ }
6
+ export declare function MsgIsReqGetWAL(msg: MsgBase): msg is ReqGetWAL;
7
+ export declare function buildReqGetWAL(sthis: NextId, sup: ReqSignedUrlParam, ctx: GwCtx): ReqGetWAL;
8
+ export interface ResGetWAL extends ResSignedUrl {
9
+ readonly type: "resGetWAL";
10
+ }
11
+ export declare function MsgIsResGetWAL(msg: MsgBase): msg is ResGetWAL;
12
+ export declare function buildResGetWAL(msgCtx: MsgTypesCtx, req: MsgWithTenantLedger<MsgWithConnAuth<ReqGetWAL>>, ctx: CalculatePreSignedUrl): Promise<MsgWithError<ResGetWAL>>;
13
+ export interface ReqPutWAL extends Omit<ReqSignedUrl, "type"> {
14
+ readonly type: "reqPutWAL";
15
+ }
16
+ export declare function MsgIsReqPutWAL(msg: MsgBase): msg is ReqPutWAL;
17
+ export declare function buildReqPutWAL(sthis: NextId, sup: ReqSignedUrlParam, ctx: GwCtx): ReqPutWAL;
18
+ export interface ResPutWAL extends Omit<ResSignedUrl, "type"> {
19
+ readonly type: "resPutWAL";
20
+ }
21
+ export declare function MsgIsResPutWAL(msg: MsgBase): msg is ResPutWAL;
22
+ export declare function buildResPutWAL(msgCtx: MsgTypesCtx, req: MsgWithTenantLedger<MsgWithConnAuth<ReqPutWAL>>, ctx: CalculatePreSignedUrl): Promise<MsgWithError<ResPutWAL>>;
23
+ export interface ReqDelWAL extends Omit<ReqSignedUrl, "type"> {
24
+ readonly type: "reqDelWAL";
25
+ }
26
+ export declare function MsgIsReqDelWAL(msg: MsgBase): msg is ReqDelWAL;
27
+ export declare function buildReqDelWAL(sthis: NextId, sup: ReqSignedUrlParam, ctx: GwCtx): ReqDelWAL;
28
+ export interface ResDelWAL extends Omit<ResSignedUrl, "type"> {
29
+ readonly type: "resDelWAL";
30
+ }
31
+ export declare function MsgIsResDelWAL(msg: MsgBase): msg is ResDelWAL;
32
+ export declare function buildResDelWAL(msgCtx: MsgTypesCtx, req: MsgWithTenantLedger<MsgWithConnAuth<ReqDelWAL>>, ctx: CalculatePreSignedUrl): Promise<MsgWithError<ResDelWAL>>;
33
+ //# sourceMappingURL=msg-types-wal.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"msg-types-wal.d.ts","sourceRoot":"","sources":["../../../../../src/protocols/cloud/msg-types-wal.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,OAAO,EACP,YAAY,EAEZ,MAAM,EACN,YAAY,EACZ,YAAY,EACZ,iBAAiB,EAEjB,KAAK,EAEL,mBAAmB,EACnB,WAAW,EACX,eAAe,EAChB,MAAM,gBAAgB,CAAC;AACxB,OAAO,EAAE,qBAAqB,EAAE,MAAM,qBAAqB,CAAC;AAE5D,MAAM,WAAW,SAAU,SAAQ,YAAY;IAC7C,QAAQ,CAAC,IAAI,EAAE,WAAW,CAAC;CAC5B;AAED,wBAAgB,cAAc,CAAC,GAAG,EAAE,OAAO,GAAG,GAAG,IAAI,SAAS,CAE7D;AAED,wBAAgB,cAAc,CAAC,KAAK,EAAE,MAAM,EAAE,GAAG,EAAE,iBAAiB,EAAE,GAAG,EAAE,KAAK,GAAG,SAAS,CAE3F;AAED,MAAM,WAAW,SAAU,SAAQ,YAAY;IAC7C,QAAQ,CAAC,IAAI,EAAE,WAAW,CAAC;CAE5B;AAED,wBAAgB,cAAc,CAAC,GAAG,EAAE,OAAO,GAAG,GAAG,IAAI,SAAS,CAE7D;AAED,wBAAgB,cAAc,CAC5B,MAAM,EAAE,WAAW,EACnB,GAAG,EAAE,mBAAm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AED,wBAAgB,cAAc,CAAC,GAAG,EAAE,OAAO,GAAG,GAAG,IAAI,SAAS,CAE7D;AAED,wBAAgB,cAAc,CAC5B,MAAM,EAAE,WAAW,EACnB,GAAG,EAAE,mBAAmB,CAAC,eAAe,CAAC,SAAS,CAAC,CAAC,EACpD,GAAG,EAAE,qBAAqB,GACzB,OAAO,CAAC,YAAY,CAAC,SAAS,CAAC,CAAC,CAQlC"}
@@ -0,0 +1,38 @@
1
+ import { buildRes, buildReqSignedUrl, MsgIsTenantLedger, } from "./msg-types.js";
2
+ export function MsgIsReqGetWAL(msg) {
3
+ return msg.type === "reqGetWAL";
4
+ }
5
+ export function buildReqGetWAL(sthis, sup, ctx) {
6
+ return buildReqSignedUrl(sthis, "reqGetWAL", sup, ctx);
7
+ }
8
+ export function MsgIsResGetWAL(msg) {
9
+ return msg.type === "resGetWAL";
10
+ }
11
+ export function buildResGetWAL(msgCtx, req, ctx) {
12
+ return buildRes({ method: "GET", store: "wal" }, "resGetWAL", msgCtx, req, ctx);
13
+ }
14
+ export function MsgIsReqPutWAL(msg) {
15
+ return msg.type === "reqPutWAL";
16
+ }
17
+ export function buildReqPutWAL(sthis, sup, ctx) {
18
+ return buildReqSignedUrl(sthis, "reqPutWAL", sup, ctx);
19
+ }
20
+ export function MsgIsResPutWAL(msg) {
21
+ return msg.type === "resPutWAL";
22
+ }
23
+ export function buildResPutWAL(msgCtx, req, ctx) {
24
+ return buildRes({ method: "PUT", store: "wal" }, "resPutWAL", msgCtx, req, ctx);
25
+ }
26
+ export function MsgIsReqDelWAL(msg) {
27
+ return msg.type === "reqDelWAL";
28
+ }
29
+ export function buildReqDelWAL(sthis, sup, ctx) {
30
+ return buildReqSignedUrl(sthis, "reqDelWAL", sup, ctx);
31
+ }
32
+ export function MsgIsResDelWAL(msg) {
33
+ return msg.type === "resDelWAL" && MsgIsTenantLedger(msg);
34
+ }
35
+ export function buildResDelWAL(msgCtx, req, ctx) {
36
+ return buildRes({ method: "DELETE", store: "wal" }, "resDelWAL", msgCtx, req, ctx);
37
+ }
38
+ //# sourceMappingURL=msg-types-wal.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"msg-types-wal.js","sourceRoot":"","sources":["../../../../../src/protocols/cloud/msg-types-wal.ts"],"names":[],"mappings":"AAAA,OAAO,EAGL,QAAQ,EAKR,iBAAiB,EAEjB,iBAAiB,GAIlB,MAAM,gBAAgB,CAAC;AAOxB,MAAM,UAAU,cAAc,CAAC,GAAY;IACzC,OAAO,GAAG,CAAC,IAAI,KAAK,WAAW,CAAC;AAClC,CAAC;AAED,MAAM,UAAU,cAAc,CAAC,KAAa,EAAE,GAAsB,EAAE,GAAU;IAC9E,OAAO,iBAAiB,CAAY,KAAK,EAAE,WAAW,EAAE,GAAG,EAAE,GAAG,CAAC,CAAC;AACpE,CAAC;AAOD,MAAM,UAAU,cAAc,CAAC,GAAY;IACzC,OAAO,GAAG,CAAC,IAAI,KAAK,WAAW,CAAC;AAClC,CAAC;AAED,MAAM,UAAU,cAAc,CAC5B,MAAmB,EACnB,GAAoD,EACpD,GAA0B;IAE1B,OAAO,QAAQ,CACb,EAAE,MAAM,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,EAC/B,WAAW,EACX,MAAM,EACN,GAAG,EACH,GAAG,CACJ,CAAC;AACJ,CAAC;AAOD,MAAM,UAAU,cAAc,CAAC,GAAY;IACzC,OAAO,GAAG,CAAC,IAAI,KAAK,WAAW,CAAC;AAClC,CAAC;AAED,MAAM,UAAU,cAAc,CAAC,KAAa,EAAE,GAAsB,EAAE,GAAU;IAC9E,OAAO,iBAAiB,CAAY,KAAK,EAAE,WAAW,EAAE,GAAG,EAAE,GAAG,CAAC,CAAC;AACpE,CAAC;AAMD,MAAM,UAAU,cAAc,CAAC,GAAY;IACzC,OAAO,GAAG,CAAC,IAAI,KAAK,WAAW,CAAC;AAClC,CAAC;AAED,MAAM,UAAU,cAAc,CAC5B,MAAmB,EACnB,GAAoD,EACpD,GAA0B;IAE1B,OAAO,QAAQ,CACb,EAAE,MAAM,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,EAC/B,WAAW,EACX,MAAM,EACN,GAAG,EACH,GAAG,CACJ,CAAC;AACJ,CAAC;AAMD,MAAM,UAAU,cAAc,CAAC,GAAY;IACzC,OAAO,GAAG,CAAC,IAAI,KAAK,WAAW,CAAC;AAClC,CAAC;AAED,MAAM,UAAU,cAAc,CAAC,KAAa,EAAE,GAAsB,EAAE,GAAU;IAC9E,OAAO,iBAAiB,CAAY,KAAK,EAAE,WAAW,EAAE,GAAG,EAAE,GAAG,CAAC,CAAC;AACpE,CAAC;AAMD,MAAM,UAAU,cAAc,CAAC,GAAY;IACzC,OAAO,GAAG,CAAC,IAAI,KAAK,WAAW,IAAI,iBAAiB,CAAC,GAAG,CAAC,CAAC;AAC5D,CAAC;AAED,MAAM,UAAU,cAAc,CAC5B,MAAmB,EACnB,GAAoD,EACpD,GAA0B;IAE1B,OAAO,QAAQ,CACb,EAAE,MAAM,EAAE,QAAQ,EAAE,KAAK,EAAE,KAAK,EAAE,EAClC,WAAW,EACX,MAAM,EACN,GAAG,EACH,GAAG,CACJ,CAAC;AACJ,CAAC"}
@@ -0,0 +1,282 @@
1
+ import { Future, Logger, Result } from "@adviser/cement";
2
+ import { SuperThis } from "@fireproof/core";
3
+ import { CalculatePreSignedUrl } from "./msg-types-data.js";
4
+ import type { JWTPayload } from "jose";
5
+ export declare const VERSION = "FP-MSG-1.0";
6
+ export interface BaseTokenParam {
7
+ readonly alg: string;
8
+ readonly issuer: string;
9
+ readonly audience: string;
10
+ readonly validFor: number;
11
+ }
12
+ export interface FPCloudClaim extends JWTPayload {
13
+ readonly userId: string;
14
+ readonly tenants: {
15
+ readonly id: string;
16
+ readonly role: string;
17
+ }[];
18
+ readonly ledgers: {
19
+ readonly id: string;
20
+ readonly role: string;
21
+ readonly right: string;
22
+ }[];
23
+ }
24
+ export type TokenForParam = FPCloudClaim & Partial<BaseTokenParam>;
25
+ export type MsgWithError<T extends MsgBase> = T | ErrorMsg;
26
+ export interface PreSignedMsg extends MsgWithTenantLedger<MsgWithConnAuth> {
27
+ readonly methodParam: MethodSignedUrlParam;
28
+ readonly urlParam: SignedUrlParam;
29
+ }
30
+ export interface RequestOpts {
31
+ readonly waitFor: (msg: MsgBase) => boolean;
32
+ readonly pollInterval?: number;
33
+ readonly timeout?: number;
34
+ }
35
+ export interface EnDeCoder {
36
+ encode<T>(node: T): Uint8Array;
37
+ decode<T>(data: Uint8Array): T;
38
+ }
39
+ export interface WaitForTid {
40
+ readonly tid: string;
41
+ readonly future: Future<MsgBase>;
42
+ readonly timeout?: number;
43
+ readonly waitFor: (msg: MsgBase) => boolean;
44
+ }
45
+ export interface NextId {
46
+ readonly nextId: SuperThis["nextId"];
47
+ }
48
+ export interface AuthType {
49
+ readonly type: "ucan" | "error" | "fp-cloud-jwk" | "fp-cloud";
50
+ }
51
+ export declare function isAuthTypeFPCloudJWK(a: AuthType): a is FPJWKCloudAuthType;
52
+ export declare function isAuthTypeFPCloud(a: AuthType): a is FPCloudAuthType;
53
+ export interface UCanAuth extends AuthType {
54
+ readonly type: "ucan";
55
+ readonly params: {
56
+ readonly tbd: string;
57
+ };
58
+ }
59
+ export interface FPJWKCloudAuthType extends AuthType {
60
+ readonly type: "fp-cloud-jwk";
61
+ readonly params: {
62
+ readonly jwk: string;
63
+ };
64
+ }
65
+ export interface FPCloudAuthType extends AuthType {
66
+ readonly type: "fp-cloud";
67
+ readonly params: {
68
+ readonly claim: TokenForParam;
69
+ readonly jwk: string;
70
+ };
71
+ }
72
+ export type AuthFactory = (tp?: Partial<TokenForParam>) => Promise<Result<AuthType>>;
73
+ export interface TenantLedger {
74
+ readonly tenant: string;
75
+ readonly ledger: string;
76
+ }
77
+ export declare function keyTenantLedger(t: TenantLedger): string;
78
+ export interface QSId {
79
+ readonly reqId: string;
80
+ readonly resId: string;
81
+ }
82
+ export declare function qsidEqual(a: QSId, b: QSId): boolean;
83
+ export declare function qsidKey(qsid: QSId): string;
84
+ export interface MsgBase {
85
+ readonly tid: string;
86
+ readonly type: string;
87
+ readonly version: string;
88
+ readonly auth: AuthType;
89
+ }
90
+ export declare function MsgIsTid(msg: MsgBase, tid: string): boolean;
91
+ type MsgWithConn<T extends MsgBase = MsgBase> = T & {
92
+ readonly conn: QSId;
93
+ };
94
+ export type MsgWithConnAuth<T extends MsgBase = MsgBase> = MsgWithConn<T> & {
95
+ readonly auth: AuthType;
96
+ };
97
+ export type MsgWithTenantLedger<T extends MsgWithConnAuth> = T & {
98
+ readonly tenant: TenantLedger;
99
+ };
100
+ export interface ErrorMsg extends MsgBase {
101
+ readonly type: "error";
102
+ readonly src: unknown;
103
+ readonly message: string;
104
+ readonly body?: string;
105
+ readonly stack?: string[];
106
+ }
107
+ export declare function MsgIsError(rq: MsgBase): rq is ErrorMsg;
108
+ export declare function MsgIsQSError(rq: ReqRes<MsgBase, MsgBase>): rq is ReqRes<ErrorMsg, ErrorMsg>;
109
+ export type HttpMethods = "GET" | "PUT" | "DELETE";
110
+ export type FPStoreTypes = "meta" | "car" | "wal" | "file";
111
+ export declare function coerceFPStoreTypes(s?: string): FPStoreTypes;
112
+ export type ProtocolCapabilities = "reqRes" | "stream";
113
+ export declare function isProtocolCapabilities(s: string): s is ProtocolCapabilities;
114
+ export interface Gestalt {
115
+ readonly storeTypes: FPStoreTypes[];
116
+ readonly id: string;
117
+ readonly protocolCapabilities: ProtocolCapabilities[];
118
+ readonly httpEndpoints: string[];
119
+ readonly wsEndpoints: string[];
120
+ readonly encodings: ("JSON" | "CBOR")[];
121
+ readonly auth: AuthType[];
122
+ readonly requiresAuth: boolean;
123
+ readonly data?: {
124
+ readonly inband: boolean;
125
+ readonly outband: boolean;
126
+ };
127
+ readonly meta?: {
128
+ readonly inband: true;
129
+ readonly outband: boolean;
130
+ };
131
+ readonly wal?: {
132
+ readonly inband: boolean;
133
+ readonly outband: boolean;
134
+ };
135
+ readonly reqTypes: string[];
136
+ readonly resTypes: string[];
137
+ readonly eventTypes: string[];
138
+ }
139
+ export interface MsgerParams {
140
+ readonly mime: string;
141
+ readonly auth?: AuthType;
142
+ readonly hasPersistent?: boolean;
143
+ readonly protocolCapabilities?: ProtocolCapabilities[];
144
+ readonly timeout: number;
145
+ }
146
+ export type GestaltParam = Partial<Gestalt> & {
147
+ readonly id: string;
148
+ };
149
+ export declare function defaultGestalt(msgP: MsgerParams, gestalt: GestaltParam): Gestalt;
150
+ export interface ReqChat extends MsgWithConn {
151
+ readonly type: "reqChat";
152
+ readonly message: string;
153
+ readonly targets: QSId[];
154
+ }
155
+ export interface ResChat extends MsgWithConn {
156
+ readonly type: "resChat";
157
+ readonly message: string;
158
+ readonly targets: QSId[];
159
+ }
160
+ export declare function buildReqChat(sthis: NextId, auth: AuthType, conn: QSId, message: string, targets?: QSId[]): ReqChat;
161
+ export declare function buildResChat(req: ReqChat, conn?: QSId, message?: string, targets?: QSId[], auth?: AuthType): ResChat;
162
+ export declare function MsgIsReqChat(msg: MsgBase): msg is ReqChat;
163
+ export declare function MsgIsResChat(msg: MsgBase): msg is ResChat;
164
+ export interface ReqGestalt extends MsgBase {
165
+ readonly type: "reqGestalt";
166
+ readonly gestalt: Gestalt;
167
+ readonly publish?: boolean;
168
+ }
169
+ export declare function MsgIsReqGestalt(msg: MsgBase): msg is ReqGestalt;
170
+ export declare function buildReqGestalt(sthis: NextId, auth: AuthType, gestalt: Gestalt, publish?: boolean): ReqGestalt;
171
+ export interface ConnInfo {
172
+ readonly connIds: string[];
173
+ }
174
+ export interface ResGestalt extends MsgBase {
175
+ readonly type: "resGestalt";
176
+ readonly gestalt: Gestalt;
177
+ }
178
+ export declare function buildResGestalt(req: ReqGestalt, gestalt: Gestalt, auth: AuthType): ResGestalt | ErrorMsg;
179
+ export declare function MsgIsResGestalt(msg: MsgBase): msg is ResGestalt;
180
+ export interface ReqOpenConnection {
181
+ readonly reqId?: string;
182
+ readonly resId?: string;
183
+ }
184
+ export interface ReqOpenConn {
185
+ readonly reqId: string;
186
+ readonly resId?: string;
187
+ }
188
+ export interface ReqOpen extends MsgBase {
189
+ readonly type: "reqOpen";
190
+ readonly conn: ReqOpenConn;
191
+ }
192
+ export declare function buildReqOpen(sthis: NextId, auth: AuthType, conn: ReqOpenConnection): ReqOpen;
193
+ export declare function MsgIsReqOpen(imsg: MsgBase): imsg is MsgWithConn<ReqOpen>;
194
+ export interface ResOpen extends MsgBase {
195
+ readonly type: "resOpen";
196
+ readonly conn: QSId;
197
+ }
198
+ export declare function MsgIsWithConn<T extends MsgBase>(msg: T): msg is MsgWithConn<T>;
199
+ export declare function MsgIsWithConnAuth<T extends MsgBase>(msg: T): msg is MsgWithConnAuth<T>;
200
+ export declare function MsgIsConnected<T extends MsgBase>(msg: T, qsid: QSId): msg is MsgWithConn<T>;
201
+ export declare function buildResOpen(sthis: NextId, req: ReqOpen, resStreamId?: string): ResOpen;
202
+ export declare function MsgIsResOpen(msg: MsgBase): msg is ResOpen;
203
+ export interface ReqClose extends MsgWithConn {
204
+ readonly type: "reqClose";
205
+ }
206
+ export declare function MsgIsReqClose(msg: MsgBase): msg is ReqClose;
207
+ export interface ResClose extends MsgWithConn {
208
+ readonly type: "resClose";
209
+ }
210
+ export declare function MsgIsResClose(msg: MsgBase): msg is ResClose;
211
+ export declare function buildResClose(req: ReqClose, conn: QSId): ResClose;
212
+ export declare function buildReqClose(sthis: NextId, auth: AuthType, conn: QSId): ReqClose;
213
+ export interface SignedUrlParam {
214
+ readonly path?: string;
215
+ readonly key: string;
216
+ readonly expires?: number;
217
+ readonly index?: string;
218
+ }
219
+ export interface MethodSignedUrlParam {
220
+ readonly method: HttpMethods;
221
+ readonly store: FPStoreTypes;
222
+ }
223
+ export interface ReqSignedUrlParam {
224
+ readonly auth: AuthType;
225
+ readonly methodParam: MethodSignedUrlParam;
226
+ readonly urlParam: SignedUrlParam;
227
+ }
228
+ export interface UpdateReqRes<Q extends MsgBase, S extends MsgBase> {
229
+ req: Q;
230
+ res: S;
231
+ }
232
+ export type ReqRes<Q extends MsgBase, S extends MsgBase> = Readonly<UpdateReqRes<Q, S>>;
233
+ export declare function buildErrorMsg(msgCtx: {
234
+ readonly logger: Logger;
235
+ readonly sthis: SuperThis;
236
+ }, base: Partial<MsgBase & {
237
+ ref?: unknown;
238
+ }>, error: Error, body?: string, stack?: string[]): ErrorMsg;
239
+ export declare function MsgIsTenantLedger<T extends MsgBase>(msg: T): msg is MsgWithTenantLedger<MsgWithConnAuth<T>>;
240
+ export interface MethodParams {
241
+ readonly methodParam: MethodSignedUrlParam;
242
+ }
243
+ export interface SignedUrlParams {
244
+ readonly urlParam: SignedUrlParam;
245
+ }
246
+ export type MethodSignedUrlParams = MethodParams & SignedUrlParams;
247
+ export type ReqSignedUrlWithoutMethodParams = SignedUrlParams & MsgWithTenantLedger<MsgWithConnAuth>;
248
+ export type ReqSignedUrl = MethodSignedUrlParams & MsgWithTenantLedger<MsgWithConnAuth>;
249
+ export interface GwCtx {
250
+ readonly tid?: string;
251
+ readonly conn: QSId;
252
+ readonly tenant: TenantLedger;
253
+ }
254
+ export interface GwCtxConn {
255
+ readonly tid?: string;
256
+ readonly conn: QSId;
257
+ readonly tenant: TenantLedger;
258
+ }
259
+ export declare function buildReqSignedUrl<T extends ReqSignedUrl>(sthis: NextId, type: string, rparam: ReqSignedUrlParam, gwCtx: GwCtx): T;
260
+ export interface ResSignedUrl extends MsgWithTenantLedger<MsgWithConn> {
261
+ readonly methodParam: MethodSignedUrlParam;
262
+ readonly urlParam: SignedUrlParam;
263
+ readonly signedUrl: string;
264
+ }
265
+ export interface ResOptionalSignedUrl extends MsgWithTenantLedger<MsgWithConn> {
266
+ readonly urlParam: SignedUrlParam;
267
+ readonly methodParam: MethodSignedUrlParam;
268
+ readonly signedUrl?: string;
269
+ }
270
+ export interface MsgTypesCtx {
271
+ readonly sthis: SuperThis;
272
+ readonly logger: Logger;
273
+ }
274
+ export interface MsgTypesCtxSync {
275
+ readonly sthis: SuperThis;
276
+ readonly logger: Logger;
277
+ readonly auth: AuthType;
278
+ }
279
+ export declare function resAuth(msg: MsgBase): Promise<AuthType>;
280
+ export declare function buildRes<Q extends MsgWithTenantLedger<MsgWithConn<ReqSignedUrlWithoutMethodParams>>, S extends ResSignedUrl>(methodParam: MethodSignedUrlParam, type: string, msgCtx: MsgTypesCtx, req: Q, ctx: CalculatePreSignedUrl): Promise<MsgWithError<S>>;
281
+ export {};
282
+ //# sourceMappingURL=msg-types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"msg-types.d.ts","sourceRoot":"","sources":["../../../../../src/protocols/cloud/msg-types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,iBAAiB,CAAC;AACzD,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAC5C,OAAO,EAAE,qBAAqB,EAAE,MAAM,qBAAqB,CAAC;AAC5D,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,MAAM,CAAC;AAGvC,eAAO,MAAM,OAAO,eAAe,CAAC;AAEpC,MAAM,WAAW,cAAc;IAC7B,QAAQ,CAAC,GAAG,EAAE,MAAM,CAAC;IACrB,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IACxB,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;IAC1B,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;CAC3B;AAED,MAAM,WAAW,YAAa,SAAQ,UAAU;IAC9C,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IACxB,QAAQ,CAAC,OAAO,EAAE;QAAE,QAAQ,CAAC,EAAE,EAAE,MAAM,CAAC;QAAC,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAA;KAAE,EAAE,CAAC;IACnE,QAAQ,CAAC,OAAO,EAAE;QAAE,QAAQ,CAAC,EAAE,EAAE,MAAM,CAAC;QAAC,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;QAAC,QAAQ,CAAC,K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