@fireproof/core 0.20.4 → 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.
- package/apply-head-queue.d.ts +18 -0
- package/apply-head-queue.d.ts.map +1 -0
- package/apply-head-queue.js +47 -0
- package/apply-head-queue.js.map +1 -0
- package/blockstore/attachable-store.d.ts +19 -0
- package/blockstore/attachable-store.d.ts.map +1 -0
- package/blockstore/attachable-store.js +316 -0
- package/blockstore/attachable-store.js.map +1 -0
- package/blockstore/commit-queue.d.ts +17 -0
- package/blockstore/commit-queue.d.ts.map +1 -0
- package/blockstore/commit-queue.js +60 -0
- package/blockstore/commit-queue.js.map +1 -0
- package/blockstore/commitor.d.ts +21 -0
- package/blockstore/commitor.d.ts.map +1 -0
- package/blockstore/commitor.js +95 -0
- package/blockstore/commitor.js.map +1 -0
- package/blockstore/connect-raw.d.ts +2 -0
- package/blockstore/connect-raw.d.ts.map +1 -0
- package/blockstore/connect-raw.js +2 -0
- package/blockstore/connect-raw.js.map +1 -0
- package/blockstore/connection-base.d.ts +2 -0
- package/blockstore/connection-base.d.ts.map +1 -0
- package/blockstore/connection-base.js +2 -0
- package/blockstore/connection-base.js.map +1 -0
- package/blockstore/encrypt-helpers.d.ts +2 -0
- package/blockstore/encrypt-helpers.d.ts.map +1 -0
- package/blockstore/encrypt-helpers.js +2 -0
- package/blockstore/encrypt-helpers.js.map +1 -0
- package/blockstore/fp-envelope.d.ts +32 -0
- package/blockstore/fp-envelope.d.ts.map +1 -0
- package/blockstore/fp-envelope.js +14 -0
- package/blockstore/fp-envelope.js.map +1 -0
- package/blockstore/gateway.d.ts +20 -0
- package/blockstore/gateway.d.ts.map +1 -0
- package/blockstore/gateway.js +2 -0
- package/blockstore/gateway.js.map +1 -0
- package/blockstore/index.d.ts +16 -0
- package/blockstore/index.d.ts.map +1 -0
- package/blockstore/index.js +16 -0
- package/blockstore/index.js.map +1 -0
- package/blockstore/interceptor-gateway.d.ts +29 -0
- package/blockstore/interceptor-gateway.d.ts.map +1 -0
- package/blockstore/interceptor-gateway.js +137 -0
- package/blockstore/interceptor-gateway.js.map +1 -0
- package/blockstore/loader-helpers.d.ts +10 -0
- package/blockstore/loader-helpers.d.ts.map +1 -0
- package/blockstore/loader-helpers.js +115 -0
- package/blockstore/loader-helpers.js.map +1 -0
- package/blockstore/loader.d.ts +61 -0
- package/blockstore/loader.d.ts.map +1 -0
- package/blockstore/loader.js +494 -0
- package/blockstore/loader.js.map +1 -0
- package/blockstore/register-store-protocol.d.ts +22 -0
- package/blockstore/register-store-protocol.d.ts.map +1 -0
- package/blockstore/register-store-protocol.js +114 -0
- package/blockstore/register-store-protocol.js.map +1 -0
- package/blockstore/serde-gateway.d.ts +78 -0
- package/blockstore/serde-gateway.d.ts.map +1 -0
- package/blockstore/serde-gateway.js +2 -0
- package/blockstore/serde-gateway.js.map +1 -0
- package/blockstore/store-factory.d.ts +11 -0
- package/blockstore/store-factory.d.ts.map +1 -0
- package/blockstore/store-factory.js +104 -0
- package/blockstore/store-factory.js.map +1 -0
- package/blockstore/store-remote.d.ts +2 -0
- package/blockstore/store-remote.d.ts.map +1 -0
- package/blockstore/store-remote.js +2 -0
- package/blockstore/store-remote.js.map +1 -0
- package/blockstore/store.d.ts +86 -0
- package/blockstore/store.d.ts.map +1 -0
- package/blockstore/store.js +439 -0
- package/blockstore/store.js.map +1 -0
- package/blockstore/task-manager.d.ts +19 -0
- package/blockstore/task-manager.d.ts.map +1 -0
- package/blockstore/task-manager.js +50 -0
- package/blockstore/task-manager.js.map +1 -0
- package/blockstore/transaction.d.ts +62 -0
- package/blockstore/transaction.d.ts.map +1 -0
- package/blockstore/transaction.js +261 -0
- package/blockstore/transaction.js.map +1 -0
- package/blockstore/types.d.ts +508 -0
- package/blockstore/types.d.ts.map +1 -0
- package/blockstore/types.js +83 -0
- package/blockstore/types.js.map +1 -0
- package/blockstore/uri-interceptor.d.ts +19 -0
- package/blockstore/uri-interceptor.d.ts.map +1 -0
- package/blockstore/uri-interceptor.js +61 -0
- package/blockstore/uri-interceptor.js.map +1 -0
- package/bundle-not-impl.d.ts +2 -0
- package/bundle-not-impl.d.ts.map +1 -0
- package/bundle-not-impl.js +4 -0
- package/bundle-not-impl.js.map +1 -0
- package/cli/main.js +26616 -0
- package/crdt-clock.d.ts +27 -0
- package/crdt-clock.d.ts.map +1 -0
- package/crdt-clock.js +138 -0
- package/crdt-clock.js.map +1 -0
- package/crdt-helpers.d.ts +19 -0
- package/crdt-helpers.d.ts.map +1 -0
- package/crdt-helpers.js +332 -0
- package/crdt-helpers.js.map +1 -0
- package/crdt.d.ts +41 -0
- package/crdt.d.ts.map +1 -0
- package/crdt.js +164 -0
- package/crdt.js.map +1 -0
- package/database.d.ts +34 -0
- package/database.d.ts.map +1 -0
- package/database.js +124 -0
- package/database.js.map +1 -0
- package/deno.json +2 -2
- package/index.d.ts +15 -2741
- package/index.d.ts.map +1 -0
- package/index.js +14 -7274
- package/index.js.map +1 -1
- package/indexer-helpers.d.ts +69 -0
- package/indexer-helpers.d.ts.map +1 -0
- package/indexer-helpers.js +136 -0
- package/indexer-helpers.js.map +1 -0
- package/indexer.d.ts +24 -0
- package/indexer.d.ts.map +1 -0
- package/indexer.js +230 -0
- package/indexer.js.map +1 -0
- package/ledger.d.ts +55 -0
- package/ledger.d.ts.map +1 -0
- package/ledger.js +234 -0
- package/ledger.js.map +1 -0
- package/package.json +26 -17
- package/protocols/cloud/http-connection.d.ts +25 -0
- package/protocols/cloud/http-connection.d.ts.map +1 -0
- package/protocols/cloud/http-connection.js +153 -0
- package/protocols/cloud/http-connection.js.map +1 -0
- package/protocols/cloud/index.d.ts +10 -0
- package/protocols/cloud/index.d.ts.map +1 -0
- package/protocols/cloud/index.js +10 -0
- package/protocols/cloud/index.js.map +1 -0
- package/protocols/cloud/msg-raw-connection-base.d.ts +16 -0
- package/protocols/cloud/msg-raw-connection-base.d.ts.map +1 -0
- package/protocols/cloud/msg-raw-connection-base.js +22 -0
- package/protocols/cloud/msg-raw-connection-base.js.map +1 -0
- package/protocols/cloud/msg-types-data.d.ts +36 -0
- package/protocols/cloud/msg-types-data.d.ts.map +1 -0
- package/protocols/cloud/msg-types-data.js +38 -0
- package/protocols/cloud/msg-types-data.js.map +1 -0
- package/protocols/cloud/msg-types-meta.d.ts +41 -0
- package/protocols/cloud/msg-types-meta.d.ts.map +1 -0
- package/protocols/cloud/msg-types-meta.js +98 -0
- package/protocols/cloud/msg-types-meta.js.map +1 -0
- package/protocols/cloud/msg-types-wal.d.ts +33 -0
- package/protocols/cloud/msg-types-wal.d.ts.map +1 -0
- package/protocols/cloud/msg-types-wal.js +38 -0
- package/protocols/cloud/msg-types-wal.js.map +1 -0
- package/protocols/cloud/msg-types.d.ts +282 -0
- package/protocols/cloud/msg-types.d.ts.map +1 -0
- package/protocols/cloud/msg-types.js +278 -0
- package/protocols/cloud/msg-types.js.map +1 -0
- package/protocols/cloud/msger.d.ts +79 -0
- package/protocols/cloud/msger.d.ts.map +1 -0
- package/protocols/cloud/msger.js +198 -0
- package/protocols/cloud/msger.js.map +1 -0
- package/protocols/cloud/ws-connection.d.ts +29 -0
- package/protocols/cloud/ws-connection.d.ts.map +1 -0
- package/protocols/cloud/ws-connection.js +166 -0
- package/protocols/cloud/ws-connection.js.map +1 -0
- package/protocols/index.d.ts +2 -0
- package/protocols/index.d.ts.map +1 -0
- package/protocols/index.js +2 -0
- package/protocols/index.js.map +1 -0
- package/react/create-attach.d.ts +6 -0
- package/react/create-attach.d.ts.map +1 -0
- package/react/create-attach.js +75 -0
- package/react/create-attach.js.map +1 -0
- package/react/{index.d.cts → img-file.d.ts} +6 -53
- package/react/img-file.d.ts.map +1 -0
- package/react/img-file.js +57 -0
- package/react/img-file.js.map +1 -0
- package/react/index.d.ts +5 -336
- package/react/index.d.ts.map +1 -0
- package/react/index.js +4 -269
- package/react/index.js.map +1 -1
- package/react/types.d.ts +71 -0
- package/react/types.d.ts.map +1 -0
- package/react/types.js +2 -0
- package/react/types.js.map +1 -0
- package/react/use-all-docs.d.ts +4 -0
- package/react/use-all-docs.d.ts.map +1 -0
- package/react/use-all-docs.js +25 -0
- package/react/use-all-docs.js.map +1 -0
- package/react/use-attach.d.ts +6 -0
- package/react/use-attach.d.ts.map +1 -0
- package/react/use-attach.js +75 -0
- package/react/use-attach.js.map +1 -0
- package/react/use-changes.d.ts +4 -0
- package/react/use-changes.d.ts.map +1 -0
- package/react/use-changes.js +19 -0
- package/react/use-changes.js.map +1 -0
- package/react/use-document.d.ts +4 -0
- package/react/use-document.d.ts.map +1 -0
- package/react/use-document.js +109 -0
- package/react/use-document.js.map +1 -0
- package/react/use-fireproof.d.ts +6 -0
- package/react/use-fireproof.d.ts.map +1 -0
- package/react/use-fireproof.js +20 -0
- package/react/use-fireproof.js.map +1 -0
- package/react/use-live-query.d.ts +4 -0
- package/react/use-live-query.d.ts.map +1 -0
- package/react/use-live-query.js +27 -0
- package/react/use-live-query.js.map +1 -0
- package/runtime/files.d.ts +12 -0
- package/runtime/files.d.ts.map +1 -0
- package/runtime/files.js +29 -0
- package/runtime/files.js.map +1 -0
- package/runtime/gateways/cloud/gateway.d.ts +42 -0
- package/runtime/gateways/cloud/gateway.d.ts.map +1 -0
- package/runtime/gateways/cloud/gateway.js +528 -0
- package/runtime/gateways/cloud/gateway.js.map +1 -0
- package/runtime/gateways/cloud/index.d.ts +3 -0
- package/runtime/gateways/cloud/index.d.ts.map +1 -0
- package/runtime/gateways/cloud/index.js +3 -0
- package/runtime/gateways/cloud/index.js.map +1 -0
- package/runtime/gateways/cloud/to-cloud.d.ts +46 -0
- package/runtime/gateways/cloud/to-cloud.d.ts.map +1 -0
- package/runtime/gateways/cloud/to-cloud.js +159 -0
- package/runtime/gateways/cloud/to-cloud.js.map +1 -0
- package/runtime/gateways/def-serde-gateway.d.ts +18 -0
- package/runtime/gateways/def-serde-gateway.d.ts.map +1 -0
- package/runtime/gateways/def-serde-gateway.js +89 -0
- package/runtime/gateways/def-serde-gateway.js.map +1 -0
- package/runtime/gateways/file/deno/deno-filesystem.d.ts +27 -0
- package/runtime/gateways/file/deno/deno-filesystem.d.ts.map +1 -0
- package/runtime/gateways/file/deno/deno-filesystem.js +52 -0
- package/runtime/gateways/file/deno/deno-filesystem.js.map +1 -0
- package/runtime/gateways/file/deno/get-sys-file-system.d.ts +4 -0
- package/runtime/gateways/file/deno/get-sys-file-system.d.ts.map +1 -0
- package/runtime/gateways/file/deno/get-sys-file-system.js +11 -0
- package/runtime/gateways/file/deno/get-sys-file-system.js.map +1 -0
- package/runtime/gateways/file/deno/index.d.ts +2 -0
- package/runtime/gateways/file/deno/index.d.ts.map +1 -0
- package/runtime/gateways/file/deno/index.js +2 -0
- package/runtime/gateways/file/deno/index.js.map +1 -0
- package/runtime/gateways/file/gateway-impl.d.ts +18 -0
- package/runtime/gateways/file/gateway-impl.d.ts.map +1 -0
- package/runtime/gateways/file/gateway-impl.js +121 -0
- package/runtime/gateways/file/gateway-impl.js.map +1 -0
- package/runtime/gateways/file/index.d.ts +3 -0
- package/runtime/gateways/file/index.d.ts.map +1 -0
- package/runtime/gateways/file/index.js +3 -0
- package/runtime/gateways/file/index.js.map +1 -0
- package/runtime/gateways/file/key-bag-file.d.ts +19 -0
- package/runtime/gateways/file/key-bag-file.d.ts.map +1 -0
- package/runtime/gateways/file/key-bag-file.js +40 -0
- package/runtime/gateways/file/key-bag-file.js.map +1 -0
- package/runtime/gateways/file/node/get-sys-file-system.d.ts +4 -0
- package/runtime/gateways/file/node/get-sys-file-system.d.ts.map +1 -0
- package/runtime/gateways/file/node/get-sys-file-system.js +11 -0
- package/runtime/gateways/file/node/get-sys-file-system.js.map +1 -0
- package/runtime/gateways/file/node/index.d.ts +2 -0
- package/runtime/gateways/file/node/index.d.ts.map +1 -0
- package/runtime/gateways/file/node/index.js +2 -0
- package/runtime/gateways/file/node/index.js.map +1 -0
- package/runtime/gateways/file/node/node-filesystem.d.ts +32 -0
- package/runtime/gateways/file/node/node-filesystem.d.ts.map +1 -0
- package/runtime/gateways/file/node/node-filesystem.js +33 -0
- package/runtime/gateways/file/node/node-filesystem.js.map +1 -0
- package/runtime/gateways/file/node/to-array-buffer.d.ts +2 -0
- package/runtime/gateways/file/node/to-array-buffer.d.ts.map +1 -0
- package/runtime/gateways/file/node/to-array-buffer.js +12 -0
- package/runtime/gateways/file/node/to-array-buffer.js.map +1 -0
- package/runtime/gateways/file/sys-file-system-factory.d.ts +4 -0
- package/runtime/gateways/file/sys-file-system-factory.d.ts.map +1 -0
- package/runtime/gateways/file/sys-file-system-factory.js +13 -0
- package/runtime/gateways/file/sys-file-system-factory.js.map +1 -0
- package/runtime/gateways/file/utils.d.ts +5 -0
- package/runtime/gateways/file/utils.d.ts.map +1 -0
- package/runtime/gateways/file/utils.js +27 -0
- package/runtime/gateways/file/utils.js.map +1 -0
- package/runtime/gateways/file/version.d.ts +2 -0
- package/runtime/gateways/file/version.d.ts.map +1 -0
- package/runtime/gateways/file/version.js +2 -0
- package/runtime/gateways/file/version.js.map +1 -0
- package/runtime/gateways/fp-envelope-serialize.d.ts +50 -0
- package/runtime/gateways/fp-envelope-serialize.d.ts.map +1 -0
- package/runtime/gateways/fp-envelope-serialize.js +141 -0
- package/runtime/gateways/fp-envelope-serialize.js.map +1 -0
- package/runtime/gateways/index.d.ts +6 -0
- package/runtime/gateways/index.d.ts.map +1 -0
- package/runtime/gateways/index.js +6 -0
- package/runtime/gateways/index.js.map +1 -0
- package/runtime/gateways/indexeddb/gateway-impl.d.ts +22 -0
- package/runtime/gateways/indexeddb/gateway-impl.d.ts.map +1 -0
- package/runtime/gateways/indexeddb/gateway-impl.js +147 -0
- package/runtime/gateways/indexeddb/gateway-impl.js.map +1 -0
- package/runtime/gateways/indexeddb/index.d.ts +6 -0
- package/runtime/gateways/indexeddb/index.d.ts.map +1 -0
- package/runtime/gateways/indexeddb/index.js +6 -0
- package/runtime/gateways/indexeddb/index.js.map +1 -0
- package/runtime/gateways/indexeddb/key-bag-indexeddb.d.ts +15 -0
- package/runtime/gateways/indexeddb/key-bag-indexeddb.d.ts.map +1 -0
- package/runtime/gateways/indexeddb/key-bag-indexeddb.js +42 -0
- package/runtime/gateways/indexeddb/key-bag-indexeddb.js.map +1 -0
- package/runtime/gateways/indexeddb-version.d.ts +2 -0
- package/runtime/gateways/indexeddb-version.d.ts.map +1 -0
- package/runtime/gateways/indexeddb-version.js +2 -0
- package/runtime/gateways/indexeddb-version.js.map +1 -0
- package/runtime/gateways/memory/gateway.d.ts +18 -0
- package/runtime/gateways/memory/gateway.d.ts.map +1 -0
- package/runtime/gateways/memory/gateway.js +73 -0
- package/runtime/gateways/memory/gateway.js.map +1 -0
- package/runtime/gateways/memory/version.d.ts +2 -0
- package/runtime/gateways/memory/version.d.ts.map +1 -0
- package/runtime/gateways/memory/version.js +2 -0
- package/runtime/gateways/memory/version.js.map +1 -0
- package/runtime/index.d.ts +13 -0
- package/runtime/index.d.ts.map +1 -0
- package/runtime/index.js +13 -0
- package/runtime/index.js.map +1 -0
- package/runtime/key-bag-memory.d.ts +12 -0
- package/runtime/key-bag-memory.d.ts.map +1 -0
- package/runtime/key-bag-memory.js +23 -0
- package/runtime/key-bag-memory.js.map +1 -0
- package/runtime/key-bag.d.ts +85 -0
- package/runtime/key-bag.d.ts.map +1 -0
- package/runtime/key-bag.js +411 -0
- package/runtime/key-bag.js.map +1 -0
- package/runtime/keyed-crypto.d.ts +19 -0
- package/runtime/keyed-crypto.d.ts.map +1 -0
- package/runtime/keyed-crypto.js +192 -0
- package/runtime/keyed-crypto.js.map +1 -0
- package/runtime/memory-sys-container.d.ts +2 -0
- package/runtime/memory-sys-container.d.ts.map +1 -0
- package/runtime/memory-sys-container.js +2 -0
- package/runtime/memory-sys-container.js.map +1 -0
- package/runtime/meta-key-hack.d.ts +42 -0
- package/runtime/meta-key-hack.d.ts.map +1 -0
- package/runtime/meta-key-hack.js +201 -0
- package/runtime/meta-key-hack.js.map +1 -0
- package/runtime/sts-service/index.d.ts +40 -0
- package/runtime/sts-service/index.d.ts.map +1 -0
- package/runtime/sts-service/index.js +102 -0
- package/runtime/sts-service/index.js.map +1 -0
- package/runtime/sys-container.d.ts +2 -0
- package/runtime/sys-container.d.ts.map +1 -0
- package/runtime/sys-container.js +2 -0
- package/runtime/sys-container.js.map +1 -0
- package/runtime/wait-pr-multiformats/block.d.ts +47 -0
- package/runtime/wait-pr-multiformats/block.d.ts.map +1 -0
- package/runtime/wait-pr-multiformats/block.js +64 -0
- package/runtime/wait-pr-multiformats/block.js.map +1 -0
- package/runtime/wait-pr-multiformats/codec-interface.d.ts +29 -0
- package/runtime/wait-pr-multiformats/codec-interface.d.ts.map +1 -0
- package/runtime/wait-pr-multiformats/codec-interface.js +2 -0
- package/runtime/wait-pr-multiformats/codec-interface.js.map +1 -0
- package/runtime/wait-pr-multiformats/index.d.ts +3 -0
- package/runtime/wait-pr-multiformats/index.d.ts.map +1 -0
- package/runtime/wait-pr-multiformats/index.js +3 -0
- package/runtime/wait-pr-multiformats/index.js.map +1 -0
- package/tests/blockstore/interceptor-gateway.test.ts +10 -9
- package/tests/blockstore/keyed-crypto.test.ts +2 -2
- package/tests/blockstore/loader.test.ts +68 -51
- package/tests/blockstore/standalone.test.ts +152 -0
- package/tests/blockstore/store.test.ts +16 -9
- package/tests/blockstore/transaction.test.ts +19 -16
- package/tests/fireproof/all-gateway.test.ts +12 -27
- package/tests/fireproof/attachable.test.ts +426 -97
- package/tests/fireproof/crdt.test.ts +23 -0
- package/tests/fireproof/database.test.ts +13 -12
- package/tests/fireproof/fireproof.test.ts +2 -5
- package/tests/fireproof/indexer.test.ts +4 -0
- package/tests/helpers.ts +30 -14
- package/tests/react/img-file.test.tsx +0 -9
- package/tests/react/use-fireproof-stability.test.tsx +5 -5
- package/tests/react/use-fireproof.test.tsx +18 -13
- package/tests/runtime/meta-key-hack.test.ts +7 -6
- package/tests/setup.indexeddb.ts +0 -9
- package/types.d.ts +460 -0
- package/types.d.ts.map +1 -0
- package/types.js +60 -0
- package/types.js.map +1 -0
- package/use-fireproof/iframe-strategy.d.ts +13 -0
- package/use-fireproof/iframe-strategy.d.ts.map +1 -0
- package/use-fireproof/iframe-strategy.js +83 -0
- package/use-fireproof/iframe-strategy.js.map +1 -0
- package/use-fireproof/index.d.ts +10 -0
- package/use-fireproof/index.d.ts.map +1 -0
- package/use-fireproof/index.js +16 -0
- package/use-fireproof/index.js.map +1 -0
- package/use-fireproof/redirect-strategy.d.ts +8 -0
- package/use-fireproof/redirect-strategy.d.ts.map +1 -0
- package/use-fireproof/redirect-strategy.js +31 -0
- package/use-fireproof/redirect-strategy.js.map +1 -0
- package/utils.d.ts +45 -0
- package/utils.d.ts.map +1 -0
- package/utils.js +406 -0
- package/utils.js.map +1 -0
- package/version.d.ts +2 -0
- package/version.d.ts.map +1 -0
- package/version.js +4 -0
- package/version.js.map +1 -0
- package/write-queue.d.ts +9 -0
- package/write-queue.d.ts.map +1 -0
- package/write-queue.js +70 -0
- package/write-queue.js.map +1 -0
- package/deno/index.d.ts +0 -7
- package/deno/index.js +0 -66
- package/deno/index.js.map +0 -1
- package/deno/metafile-esm.json +0 -1
- package/index.cjs +0 -7275
- package/index.cjs.map +0 -1
- package/index.d.cts +0 -2741
- package/indexeddb/index.cjs +0 -218
- package/indexeddb/index.cjs.map +0 -1
- package/indexeddb/index.d.cts +0 -30
- package/indexeddb/index.d.ts +0 -30
- package/indexeddb/index.js +0 -195
- package/indexeddb/index.js.map +0 -1
- package/indexeddb/metafile-cjs.json +0 -1
- package/indexeddb/metafile-esm.json +0 -1
- package/metafile-cjs.json +0 -1
- package/metafile-esm.json +0 -1
- package/node/index.cjs +0 -97
- package/node/index.cjs.map +0 -1
- package/node/index.d.cts +0 -7
- package/node/index.d.ts +0 -7
- package/node/index.js +0 -64
- package/node/index.js.map +0 -1
- package/node/metafile-cjs.json +0 -1
- package/node/metafile-esm.json +0 -1
- package/react/index.cjs +0 -303
- package/react/index.cjs.map +0 -1
- package/react/metafile-cjs.json +0 -1
- package/react/metafile-esm.json +0 -1
- package/tests/www/gallery.html +0 -132
- package/tests/www/iife.html +0 -42
- package/tests/www/todo-aws.html +0 -232
- package/tests/www/todo-ipfs.html +0 -213
- package/tests/www/todo-local.html +0 -214
- package/tests/www/todo-netlify.html +0 -227
- package/tests/www/todo.html +0 -254
@@ -0,0 +1,261 @@
|
|
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
|
+
import { anyBlock2FPBlock } from "./loader-helpers.js";
|
20
|
+
import { CID } from "multiformats/cid";
|
21
|
+
export class CarTransactionImpl {
|
22
|
+
constructor(parent, opts = { add: true, noLoader: false }) {
|
23
|
+
_CarTransactionImpl_memblock.set(this, new Map());
|
24
|
+
_CarTransactionImpl_hackUnshift.set(this, void 0);
|
25
|
+
if (opts.add) {
|
26
|
+
parent.transactions.add(this);
|
27
|
+
}
|
28
|
+
this.parent = parent;
|
29
|
+
}
|
30
|
+
async get(cid) {
|
31
|
+
if (cid.toString() === "bafyreib5b6mxpp5dzrm4no2t5rzjwzq27dqjvft4zuappxzswxzmbidol4") {
|
32
|
+
cid = CID.parse(cid.toString());
|
33
|
+
}
|
34
|
+
const sg = await this.superGet(cid);
|
35
|
+
if (sg)
|
36
|
+
return sg;
|
37
|
+
return await this.parent.get(cid);
|
38
|
+
}
|
39
|
+
async superGet(cid) {
|
40
|
+
return __classPrivateFieldGet(this, _CarTransactionImpl_memblock, "f").get(cid.toString());
|
41
|
+
}
|
42
|
+
async put(fb) {
|
43
|
+
return this.putSync(fb);
|
44
|
+
}
|
45
|
+
putSync(fb) {
|
46
|
+
__classPrivateFieldGet(this, _CarTransactionImpl_memblock, "f").set(fb.cid.toString(), fb);
|
47
|
+
}
|
48
|
+
unshift(fb) {
|
49
|
+
if (__classPrivateFieldGet(this, _CarTransactionImpl_hackUnshift, "f")) {
|
50
|
+
throw new Error("unshift already called");
|
51
|
+
}
|
52
|
+
__classPrivateFieldSet(this, _CarTransactionImpl_hackUnshift, fb, "f");
|
53
|
+
}
|
54
|
+
async *entries() {
|
55
|
+
if (__classPrivateFieldGet(this, _CarTransactionImpl_hackUnshift, "f")) {
|
56
|
+
yield __classPrivateFieldGet(this, _CarTransactionImpl_hackUnshift, "f");
|
57
|
+
}
|
58
|
+
for await (const blk of __classPrivateFieldGet(this, _CarTransactionImpl_memblock, "f").values()) {
|
59
|
+
yield blk;
|
60
|
+
}
|
61
|
+
}
|
62
|
+
}
|
63
|
+
_CarTransactionImpl_memblock = new WeakMap(), _CarTransactionImpl_hackUnshift = new WeakMap();
|
64
|
+
export function defaultedBlockstoreRuntime(sthis, opts, component, ctx) {
|
65
|
+
const logger = ensureLogger(sthis, component, ctx);
|
66
|
+
return {
|
67
|
+
applyMeta: (meta, snap) => {
|
68
|
+
return Promise.resolve();
|
69
|
+
},
|
70
|
+
compact: async (blocks) => {
|
71
|
+
return {};
|
72
|
+
},
|
73
|
+
autoCompact: 100,
|
74
|
+
public: false,
|
75
|
+
threshold: 1000 * 1000,
|
76
|
+
...opts,
|
77
|
+
logger,
|
78
|
+
keyBag: opts.keyBag || {},
|
79
|
+
crypto: toCryptoRuntime(opts.crypto),
|
80
|
+
storeUrls: opts.storeUrls,
|
81
|
+
taskManager: {
|
82
|
+
removeAfter: 3,
|
83
|
+
retryTimeout: 50,
|
84
|
+
...opts.taskManager,
|
85
|
+
},
|
86
|
+
storeRuntime: toStoreRuntime(sthis, ensureStoreEnDeFile(opts.storeEnDeFile)),
|
87
|
+
};
|
88
|
+
}
|
89
|
+
export class BaseBlockstoreImpl {
|
90
|
+
ready() {
|
91
|
+
return Promise.resolve();
|
92
|
+
}
|
93
|
+
async close() {
|
94
|
+
}
|
95
|
+
async destroy() {
|
96
|
+
}
|
97
|
+
async compact() {
|
98
|
+
}
|
99
|
+
constructor(ebOpts, crdt) {
|
100
|
+
this.transactions = new Set();
|
101
|
+
this.sthis = ensureSuperThis(ebOpts);
|
102
|
+
this.crdtParent = crdt;
|
103
|
+
this.ebOpts = defaultedBlockstoreRuntime(this.sthis, ebOpts, "BaseBlockstore");
|
104
|
+
this.logger = this.ebOpts.logger;
|
105
|
+
this.loader = new Loader(this.sthis, ebOpts, this);
|
106
|
+
}
|
107
|
+
async get(cid) {
|
108
|
+
if (!cid)
|
109
|
+
throw this.logger.Error().Msg("required cid").AsError();
|
110
|
+
for (const f of this.transactions) {
|
111
|
+
const v = await f.superGet(cid);
|
112
|
+
if (v)
|
113
|
+
return v;
|
114
|
+
}
|
115
|
+
}
|
116
|
+
async put(fp) {
|
117
|
+
throw this.logger.Error().Msg("use a transaction to put").AsError();
|
118
|
+
}
|
119
|
+
async transaction(fn, _opts) {
|
120
|
+
this.logger.Debug().Msg("enter transaction");
|
121
|
+
const t = new CarTransactionImpl(this, _opts);
|
122
|
+
this.logger.Debug().Msg("post CarTransaction");
|
123
|
+
const done = await fn(t);
|
124
|
+
this.logger.Debug().Msg("post fn");
|
125
|
+
this.lastTxMeta = done;
|
126
|
+
return { t, meta: done };
|
127
|
+
}
|
128
|
+
openTransaction(opts = { add: true, noLoader: false }) {
|
129
|
+
return new CarTransactionImpl(this, opts);
|
130
|
+
}
|
131
|
+
async commitTransaction(t, done, opts) {
|
132
|
+
if (!this.loader)
|
133
|
+
throw this.logger.Error().Msg("loader required to commit").AsError();
|
134
|
+
const cars = await this.loader.commit(t, done, opts);
|
135
|
+
if (this.ebOpts.autoCompact && this.loader.carLog.length > this.ebOpts.autoCompact) {
|
136
|
+
setTimeout(() => void this.compact(), 10);
|
137
|
+
}
|
138
|
+
if (cars) {
|
139
|
+
this.transactions.delete(t);
|
140
|
+
return { meta: done, cars, t };
|
141
|
+
}
|
142
|
+
throw this.logger.Error().Msg("failed to commit car files").AsError();
|
143
|
+
}
|
144
|
+
async *entries() {
|
145
|
+
const seen = new Set();
|
146
|
+
for (const t of this.transactions) {
|
147
|
+
for await (const blk of t.entries()) {
|
148
|
+
if (seen.has(blk.cid.toString()))
|
149
|
+
continue;
|
150
|
+
seen.add(blk.cid.toString());
|
151
|
+
yield blk;
|
152
|
+
}
|
153
|
+
}
|
154
|
+
}
|
155
|
+
}
|
156
|
+
export class EncryptedBlockstore extends BaseBlockstoreImpl {
|
157
|
+
ready() {
|
158
|
+
return this.loader.ready();
|
159
|
+
}
|
160
|
+
close() {
|
161
|
+
return this.loader.close();
|
162
|
+
}
|
163
|
+
destroy() {
|
164
|
+
return this.loader.destroy();
|
165
|
+
}
|
166
|
+
constructor(sthis, ebOpts, crdt) {
|
167
|
+
super(ebOpts, crdt);
|
168
|
+
this.compacting = false;
|
169
|
+
this.logger = ensureLogger(this.sthis, "EncryptedBlockstore", {
|
170
|
+
this: 1,
|
171
|
+
});
|
172
|
+
}
|
173
|
+
async get(cid) {
|
174
|
+
const got = await super.get(cid);
|
175
|
+
if (got)
|
176
|
+
return got;
|
177
|
+
const ret = await this.loader.getBlock(cid, this.loader.attachedStores.local());
|
178
|
+
return ret;
|
179
|
+
}
|
180
|
+
async transaction(fn, opts = { noLoader: false }) {
|
181
|
+
this.logger.Debug().Msg("enter transaction");
|
182
|
+
const { t, meta: done } = await super.transaction(fn);
|
183
|
+
this.logger.Debug().Msg("post super.transaction");
|
184
|
+
const cars = await this.loader.commit(t, done, opts);
|
185
|
+
this.logger.Debug().Msg("post this.loader.commit");
|
186
|
+
if (this.ebOpts.autoCompact && this.loader.carLog.length > this.ebOpts.autoCompact) {
|
187
|
+
setTimeout(() => void this.compact(), 10);
|
188
|
+
}
|
189
|
+
if (cars) {
|
190
|
+
this.transactions.delete(t);
|
191
|
+
return { meta: done, cars, t };
|
192
|
+
}
|
193
|
+
throw this.logger.Error().Msg("failed to commit car files").AsError();
|
194
|
+
}
|
195
|
+
async getFile(car, cid) {
|
196
|
+
await this.ready();
|
197
|
+
if (!this.loader)
|
198
|
+
throw this.logger.Error().Msg("loader required to get file, ledger must be named").AsError();
|
199
|
+
const reader = await this.loader.loadFileCar(car, this.loader.attachedStores.local());
|
200
|
+
if (!isCarBlockItemReady(reader)) {
|
201
|
+
throw this.logger.Error().Str("cid", car.toString()).Msg("car not ready").AsError();
|
202
|
+
}
|
203
|
+
const block = await reader.item.value.car.blocks.find((i) => i.cid.equals(cid));
|
204
|
+
if (!block)
|
205
|
+
throw this.logger.Error().Str("cid", cid.toString()).Msg(`Missing block`).AsError();
|
206
|
+
return block.bytes;
|
207
|
+
}
|
208
|
+
async compact() {
|
209
|
+
await this.ready();
|
210
|
+
if (!this.loader)
|
211
|
+
throw this.logger.Error().Msg("loader required to compact").AsError();
|
212
|
+
if (this.loader.carLog.length < 2)
|
213
|
+
return;
|
214
|
+
const compactFn = this.ebOpts.compact || ((blocks) => this.defaultCompact(blocks, this.logger));
|
215
|
+
if (!compactFn || this.compacting)
|
216
|
+
return;
|
217
|
+
const blockLog = new CompactionFetcher(this);
|
218
|
+
this.compacting = true;
|
219
|
+
const meta = await compactFn(blockLog);
|
220
|
+
await this.loader.commit(blockLog.loggedBlocks, meta, {
|
221
|
+
compact: true,
|
222
|
+
noLoader: true,
|
223
|
+
});
|
224
|
+
this.compacting = false;
|
225
|
+
}
|
226
|
+
async defaultCompact(blocks, logger) {
|
227
|
+
if (!this.loader) {
|
228
|
+
throw logger.Error().Msg("no loader").AsError();
|
229
|
+
}
|
230
|
+
if (!this.lastTxMeta) {
|
231
|
+
throw logger.Error().Msg("no lastTxMeta").AsError();
|
232
|
+
}
|
233
|
+
for await (const blk of this.loader.entries(false)) {
|
234
|
+
blocks.loggedBlocks.putSync(blk);
|
235
|
+
}
|
236
|
+
for (const t of this.transactions) {
|
237
|
+
for await (const blk of t.entries()) {
|
238
|
+
blocks.loggedBlocks.putSync(blk);
|
239
|
+
}
|
240
|
+
}
|
241
|
+
return this.lastTxMeta;
|
242
|
+
}
|
243
|
+
async *entries() {
|
244
|
+
for await (const blk of this.loader.entries()) {
|
245
|
+
yield blk;
|
246
|
+
}
|
247
|
+
}
|
248
|
+
}
|
249
|
+
export class CompactionFetcher {
|
250
|
+
constructor(blocks) {
|
251
|
+
this.blockstore = blocks;
|
252
|
+
this.loggedBlocks = new CarTransactionImpl(blocks);
|
253
|
+
}
|
254
|
+
async get(cid) {
|
255
|
+
const block = await this.blockstore.get(cid);
|
256
|
+
if (block)
|
257
|
+
this.loggedBlocks.putSync(await anyBlock2FPBlock({ cid, bytes: block.bytes }));
|
258
|
+
return falsyToUndef(block);
|
259
|
+
}
|
260
|
+
}
|
261
|
+
//# sourceMappingURL=transaction.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"transaction.js","sourceRoot":"","sources":["../../../../src/blockstore/transaction.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,OAAO,EAUL,mBAAmB,GACpB,MAAM,YAAY,CAAC;A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