@dxos/hypercore 0.6.13 → 0.6.14-main.2b6a0f3
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/dist/lib/browser/meta.json +1 -1
- package/dist/lib/node/index.cjs +27 -41
- package/dist/lib/node/index.cjs.map +2 -2
- package/dist/lib/node-esm/index.mjs +9944 -0
- package/dist/lib/node-esm/index.mjs.map +7 -0
- package/dist/lib/node-esm/meta.json +1 -0
- package/package.json +18 -16
- package/src/hypercore-factory.test.ts +1 -2
- package/src/hypercore-protocol.test.ts +1 -2
- package/src/hypercore.test.ts +1 -2
- package/src/iterator.test.ts +1 -1
- package/src/replicate.test.ts +123 -126
- package/src/streams.test.ts +1 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"inputs":{"node_modules/.pnpm/last-one-wins@1.0.4/node_modules/last-one-wins/index.js":{"bytes":712,"imports":[],"format":"cjs"},"node_modules/.pnpm/unordered-array-remove@1.0.2/node_modules/unordered-array-remove/index.js":{"bytes":212,"imports":[],"format":"cjs"},"node_modules/.pnpm/unordered-set@2.0.1/node_modules/unordered-set/index.js":{"bytes":677,"imports":[],"format":"cjs"},"node_modules/.pnpm/flat-tree@1.9.0/node_modules/flat-tree/index.js":{"bytes":5856,"imports":[],"format":"cjs"},"node_modules/.pnpm/merkle-tree-stream@4.0.0/node_modules/merkle-tree-stream/generator.js":{"bytes":1621,"imports":[{"path":"node_modules/.pnpm/flat-tree@1.9.0/node_modules/flat-tree/index.js","kind":"require-call","original":"flat-tree"}],"format":"cjs"},"node_modules/.pnpm/codecs@2.2.0/node_modules/codecs/index.js":{"bytes":1956,"imports":[],"format":"cjs"},"node_modules/.pnpm/atomic-batcher@1.0.2/node_modules/atomic-batcher/index.js":{"bytes":1230,"imports":[],"format":"cjs"},"node_modules/.pnpm/inherits@2.0.4/node_modules/inherits/inherits_browser.js":{"bytes":753,"imports":[],"format":"cjs"},"node_modules/.pnpm/inherits@2.0.4/node_modules/inherits/inherits.js":{"bytes":250,"imports":[{"path":"node:util","kind":"require-call","external":true},{"path":"node_modules/.pnpm/inherits@2.0.4/node_modules/inherits/inherits_browser.js","kind":"require-call","original":"./inherits_browser.js"}],"format":"cjs"},"node_modules/.pnpm/varint@4.0.1/node_modules/varint/encode.js":{"bytes":452,"imports":[],"format":"cjs"},"node_modules/.pnpm/varint@4.0.1/node_modules/varint/decode.js":{"bytes":515,"imports":[],"format":"cjs"},"node_modules/.pnpm/varint@4.0.1/node_modules/varint/length.js":{"bytes":471,"imports":[],"format":"cjs"},"node_modules/.pnpm/varint@4.0.1/node_modules/varint/index.js":{"bytes":134,"imports":[{"path":"node_modules/.pnpm/varint@4.0.1/node_modules/varint/encode.js","kind":"require-call","original":"./encode.js"},{"path":"node_modules/.pnpm/varint@4.0.1/node_modules/varint/decode.js","kind":"require-call","original":"./decode.js"},{"path":"node_modules/.pnpm/varint@4.0.1/node_modules/varint/length.js","kind":"require-call","original":"./length.js"}],"format":"cjs"},"node_modules/.pnpm/buffer-alloc-unsafe@1.1.0/node_modules/buffer-alloc-unsafe/index.js":{"bytes":356,"imports":[],"format":"cjs"},"node_modules/.pnpm/bitfield-rle@2.2.1/node_modules/bitfield-rle/index.js":{"bytes":4094,"imports":[{"path":"node_modules/.pnpm/varint@4.0.1/node_modules/varint/index.js","kind":"require-call","original":"varint"},{"path":"node_modules/.pnpm/buffer-alloc-unsafe@1.1.0/node_modules/buffer-alloc-unsafe/index.js","kind":"require-call","original":"buffer-alloc-unsafe"}],"format":"cjs"},"node_modules/.pnpm/memory-pager@1.5.0/node_modules/memory-pager/index.js":{"bytes":3731,"imports":[],"format":"cjs"},"node_modules/.pnpm/sparse-bitfield@3.0.3/node_modules/sparse-bitfield/index.js":{"bytes":2303,"imports":[{"path":"node_modules/.pnpm/memory-pager@1.5.0/node_modules/memory-pager/index.js","kind":"require-call","original":"memory-pager"}],"format":"cjs"},"node_modules/.pnpm/hypercore@9.12.0/node_modules/hypercore/lib/bitfield.js":{"bytes":8371,"imports":[{"path":"node_modules/.pnpm/flat-tree@1.9.0/node_modules/flat-tree/index.js","kind":"require-call","original":"flat-tree"},{"path":"node_modules/.pnpm/bitfield-rle@2.2.1/node_modules/bitfield-rle/index.js","kind":"require-call","original":"bitfield-rle"},{"path":"node_modules/.pnpm/memory-pager@1.5.0/node_modules/memory-pager/index.js","kind":"require-call","original":"memory-pager"},{"path":"node_modules/.pnpm/sparse-bitfield@3.0.3/node_modules/sparse-bitfield/index.js","kind":"require-call","original":"sparse-bitfield"}],"format":"cjs"},"node_modules/.pnpm/hypercore@9.12.0/node_modules/hypercore/lib/tree-index.js":{"bytes":4624,"imports":[{"path":"node_modules/.pnpm/flat-tree@1.9.0/node_modules/flat-tree/index.js","kind":"require-call","original":"flat-tree"},{"path":"node_modules/.pnpm/sparse-bitfield@3.0.3/node_modules/sparse-bitfield/index.js","kind":"require-call","original":"sparse-bitfield"}],"format":"cjs"},"node_modules/.pnpm/buffer-fill@1.0.0/node_modules/buffer-fill/index.js":{"bytes":2433,"imports":[],"format":"cjs"},"node_modules/.pnpm/buffer-alloc@1.2.0/node_modules/buffer-alloc/index.js":{"bytes":664,"imports":[{"path":"node_modules/.pnpm/buffer-fill@1.0.0/node_modules/buffer-fill/index.js","kind":"require-call","original":"buffer-fill"},{"path":"node_modules/.pnpm/buffer-alloc-unsafe@1.1.0/node_modules/buffer-alloc-unsafe/index.js","kind":"require-call","original":"buffer-alloc-unsafe"}],"format":"cjs"},"node_modules/.pnpm/uint64be@2.0.2/node_modules/uint64be/index.js":{"bytes":637,"imports":[{"path":"node_modules/.pnpm/buffer-alloc@1.2.0/node_modules/buffer-alloc/index.js","kind":"require-call","original":"buffer-alloc"}],"format":"cjs"},"node_modules/.pnpm/hypercore-cache@1.0.2/node_modules/hypercore-cache/index.js":{"bytes":2818,"imports":[],"format":"cjs"},"node_modules/.pnpm/hypercore@9.12.0/node_modules/hypercore/lib/cache.js":{"bytes":777,"imports":[{"path":"node_modules/.pnpm/hypercore-cache@1.0.2/node_modules/hypercore-cache/index.js","kind":"require-call","original":"hypercore-cache"}],"format":"cjs"},"node_modules/.pnpm/hypercore@9.12.0/node_modules/hypercore/lib/storage.js":{"bytes":10122,"imports":[{"path":"node_modules/.pnpm/uint64be@2.0.2/node_modules/uint64be/index.js","kind":"require-call","original":"uint64be"},{"path":"node_modules/.pnpm/flat-tree@1.9.0/node_modules/flat-tree/index.js","kind":"require-call","original":"flat-tree"},{"path":"node_modules/.pnpm/hypercore@9.12.0/node_modules/hypercore/lib/cache.js","kind":"require-call","original":"./cache"}],"format":"cjs"},"node_modules/.pnpm/uint64be@3.0.0/node_modules/uint64be/index.js":{"bytes":611,"imports":[],"format":"cjs"},"node_modules/.pnpm/hypercore-crypto@2.3.2/node_modules/hypercore-crypto/index.js":{"bytes":4243,"imports":[{"path":"sodium-universal","kind":"require-call","external":true},{"path":"node_modules/.pnpm/uint64be@3.0.0/node_modules/uint64be/index.js","kind":"require-call","original":"uint64be"}],"format":"cjs"},"node_modules/.pnpm/inspect-custom-symbol@1.1.1/node_modules/inspect-custom-symbol/index.js":{"bytes":129,"imports":[{"path":"node:util","kind":"require-call","external":true}],"format":"cjs"},"node_modules/.pnpm/pretty-hash@1.0.1/node_modules/pretty-hash/index.js":{"bytes":219,"imports":[],"format":"cjs"},"node_modules/.pnpm/nanoguard@1.3.0/node_modules/nanoguard/index.js":{"bytes":1199,"imports":[],"format":"cjs"},"node_modules/.pnpm/hypercore@9.12.0/node_modules/hypercore/lib/safe-buffer-equals.js":{"bytes":185,"imports":[],"format":"cjs"},"node_modules/.pnpm/nanoassert@2.0.0/node_modules/nanoassert/index.js":{"bytes":438,"imports":[],"format":"cjs"},"node_modules/.pnpm/clone@2.1.2/node_modules/clone/clone.js":{"bytes":7293,"imports":[],"format":"cjs"},"node_modules/.pnpm/noise-protocol@3.0.1/node_modules/noise-protocol/cipher.js":{"bytes":2722,"imports":[{"path":"sodium-universal/memory","kind":"require-call","external":true},{"path":"sodium-universal/crypto_aead","kind":"require-call","external":true},{"path":"node_modules/.pnpm/nanoassert@2.0.0/node_modules/nanoassert/index.js","kind":"require-call","original":"nanoassert"}],"format":"cjs"},"node_modules/.pnpm/noise-protocol@3.0.1/node_modules/noise-protocol/cipher-state.js":{"bytes":3101,"imports":[{"path":"sodium-universal/memory","kind":"require-call","external":true},{"path":"sodium-universal/helpers","kind":"require-call","external":true},{"path":"node_modules/.pnpm/nanoassert@2.0.0/node_modules/nanoassert/index.js","kind":"require-call","original":"nanoassert"},{"path":"node_modules/.pnpm/noise-protocol@3.0.1/node_modules/noise-protocol/cipher.js","kind":"require-call","original":"./cipher"}],"format":"cjs"},"node_modules/.pnpm/nanoassert@1.1.0/node_modules/nanoassert/index.js":{"bytes":396,"imports":[],"format":"cjs"},"node_modules/.pnpm/hmac-blake2b@2.0.0/node_modules/hmac-blake2b/index.js":{"bytes":1520,"imports":[{"path":"sodium-universal/memory","kind":"require-call","external":true},{"path":"sodium-universal/crypto_generichash","kind":"require-call","external":true},{"path":"node_modules/.pnpm/nanoassert@1.1.0/node_modules/nanoassert/index.js","kind":"require-call","original":"nanoassert"}],"format":"cjs"},"node_modules/.pnpm/noise-protocol@3.0.1/node_modules/noise-protocol/dh.js":{"bytes":1092,"imports":[{"path":"sodium-universal/crypto_kx","kind":"require-call","external":true},{"path":"sodium-universal/crypto_scalarmult","kind":"require-call","external":true},{"path":"node_modules/.pnpm/nanoassert@2.0.0/node_modules/nanoassert/index.js","kind":"require-call","original":"nanoassert"}],"format":"cjs"},"node_modules/.pnpm/noise-protocol@3.0.1/node_modules/noise-protocol/hash.js":{"bytes":1482,"imports":[{"path":"sodium-universal/memory","kind":"require-call","external":true},{"path":"sodium-universal/crypto_generichash","kind":"require-call","external":true},{"path":"node_modules/.pnpm/nanoassert@2.0.0/node_modules/nanoassert/index.js","kind":"require-call","original":"nanoassert"},{"path":"node_modules/.pnpm/hmac-blake2b@2.0.0/node_modules/hmac-blake2b/index.js","kind":"require-call","original":"hmac-blake2b"},{"path":"node_modules/.pnpm/noise-protocol@3.0.1/node_modules/noise-protocol/dh.js","kind":"require-call","original":"./dh"}],"format":"cjs"},"node_modules/.pnpm/noise-protocol@3.0.1/node_modules/noise-protocol/symmetric-state.js":{"bytes":4758,"imports":[{"path":"sodium-universal/memory","kind":"require-call","external":true},{"path":"node_modules/.pnpm/nanoassert@2.0.0/node_modules/nanoassert/index.js","kind":"require-call","original":"nanoassert"},{"path":"node_modules/.pnpm/noise-protocol@3.0.1/node_modules/noise-protocol/cipher-state.js","kind":"require-call","original":"./cipher-state"},{"path":"node_modules/.pnpm/noise-protocol@3.0.1/node_modules/noise-protocol/hash.js","kind":"require-call","original":"./hash"}],"format":"cjs"},"node_modules/.pnpm/noise-protocol@3.0.1/node_modules/noise-protocol/handshake-state.js":{"bytes":12735,"imports":[{"path":"sodium-universal/memory","kind":"require-call","external":true},{"path":"node_modules/.pnpm/nanoassert@2.0.0/node_modules/nanoassert/index.js","kind":"require-call","original":"nanoassert"},{"path":"node_modules/.pnpm/clone@2.1.2/node_modules/clone/clone.js","kind":"require-call","original":"clone"},{"path":"node_modules/.pnpm/noise-protocol@3.0.1/node_modules/noise-protocol/symmetric-state.js","kind":"require-call","original":"./symmetric-state"},{"path":"node_modules/.pnpm/noise-protocol@3.0.1/node_modules/noise-protocol/cipher-state.js","kind":"require-call","original":"./cipher-state"},{"path":"node_modules/.pnpm/noise-protocol@3.0.1/node_modules/noise-protocol/dh.js","kind":"require-call","original":"./dh"}],"format":"cjs"},"node_modules/.pnpm/noise-protocol@3.0.1/node_modules/noise-protocol/index.js":{"bytes":46,"imports":[{"path":"node_modules/.pnpm/noise-protocol@3.0.1/node_modules/noise-protocol/handshake-state.js","kind":"require-call","original":"./handshake-state"}],"format":"cjs"},"node_modules/.pnpm/simple-handshake@3.0.0/node_modules/simple-handshake/index.js":{"bytes":4170,"imports":[{"path":"node_modules/.pnpm/noise-protocol@3.0.1/node_modules/noise-protocol/index.js","kind":"require-call","original":"noise-protocol"},{"path":"node_modules/.pnpm/noise-protocol@3.0.1/node_modules/noise-protocol/symmetric-state.js","kind":"require-call","original":"noise-protocol/symmetric-state"},{"path":"node_modules/.pnpm/noise-protocol@3.0.1/node_modules/noise-protocol/hash.js","kind":"require-call","original":"noise-protocol/hash"},{"path":"node_modules/.pnpm/nanoassert@2.0.0/node_modules/nanoassert/index.js","kind":"require-call","original":"nanoassert"}],"format":"cjs"},"node_modules/.pnpm/varint@5.0.2/node_modules/varint/encode.js":{"bytes":452,"imports":[],"format":"cjs"},"node_modules/.pnpm/varint@5.0.2/node_modules/varint/decode.js":{"bytes":508,"imports":[],"format":"cjs"},"node_modules/.pnpm/varint@5.0.2/node_modules/varint/length.js":{"bytes":471,"imports":[],"format":"cjs"},"node_modules/.pnpm/varint@5.0.2/node_modules/varint/index.js":{"bytes":134,"imports":[{"path":"node_modules/.pnpm/varint@5.0.2/node_modules/varint/encode.js","kind":"require-call","original":"./encode.js"},{"path":"node_modules/.pnpm/varint@5.0.2/node_modules/varint/decode.js","kind":"require-call","original":"./decode.js"},{"path":"node_modules/.pnpm/varint@5.0.2/node_modules/varint/length.js","kind":"require-call","original":"./length.js"}],"format":"cjs"},"node_modules/.pnpm/simple-hypercore-protocol@2.1.2/node_modules/simple-hypercore-protocol/lib/handshake.js":{"bytes":3605,"imports":[{"path":"node_modules/.pnpm/simple-handshake@3.0.0/node_modules/simple-handshake/index.js","kind":"require-call","original":"simple-handshake"},{"path":"node_modules/.pnpm/noise-protocol@3.0.1/node_modules/noise-protocol/dh.js","kind":"require-call","original":"noise-protocol/dh"},{"path":"node_modules/.pnpm/hypercore-crypto@2.3.2/node_modules/hypercore-crypto/index.js","kind":"require-call","original":"hypercore-crypto"},{"path":"node_modules/.pnpm/varint@5.0.2/node_modules/varint/index.js","kind":"require-call","original":"varint"}],"format":"cjs"},"node_modules/.pnpm/varint@5.0.0/node_modules/varint/encode.js":{"bytes":452,"imports":[],"format":"cjs"},"node_modules/.pnpm/varint@5.0.0/node_modules/varint/decode.js":{"bytes":508,"imports":[],"format":"cjs"},"node_modules/.pnpm/varint@5.0.0/node_modules/varint/length.js":{"bytes":471,"imports":[],"format":"cjs"},"node_modules/.pnpm/varint@5.0.0/node_modules/varint/index.js":{"bytes":134,"imports":[{"path":"node_modules/.pnpm/varint@5.0.0/node_modules/varint/encode.js","kind":"require-call","original":"./encode.js"},{"path":"node_modules/.pnpm/varint@5.0.0/node_modules/varint/decode.js","kind":"require-call","original":"./decode.js"},{"path":"node_modules/.pnpm/varint@5.0.0/node_modules/varint/length.js","kind":"require-call","original":"./length.js"}],"format":"cjs"},"node_modules/.pnpm/signed-varint@2.0.1/node_modules/signed-varint/index.js":{"bytes":435,"imports":[{"path":"node_modules/.pnpm/varint@5.0.2/node_modules/varint/index.js","kind":"require-call","original":"varint"}],"format":"cjs"},"node_modules/.pnpm/b4a@1.6.0/node_modules/b4a/index.js":{"bytes":3179,"imports":[],"format":"cjs"},"node_modules/.pnpm/protocol-buffers-encodings@1.2.0/node_modules/protocol-buffers-encodings/index.js":{"bytes":6489,"imports":[{"path":"node_modules/.pnpm/varint@5.0.0/node_modules/varint/index.js","kind":"require-call","original":"varint"},{"path":"node_modules/.pnpm/signed-varint@2.0.1/node_modules/signed-varint/index.js","kind":"require-call","original":"signed-varint"},{"path":"node_modules/.pnpm/b4a@1.6.0/node_modules/b4a/index.js","kind":"require-call","original":"b4a"}],"format":"cjs"},"node_modules/.pnpm/simple-hypercore-protocol@2.1.2/node_modules/simple-hypercore-protocol/messages.js":{"bytes":30739,"imports":[{"path":"node_modules/.pnpm/protocol-buffers-encodings@1.2.0/node_modules/protocol-buffers-encodings/index.js","kind":"require-call","original":"protocol-buffers-encodings"}],"format":"cjs"},"node_modules/.pnpm/xsalsa20-universal@1.0.0/node_modules/xsalsa20-universal/index.js":{"bytes":450,"imports":[{"path":"sodium-native","kind":"require-call","external":true}],"format":"cjs"},"node_modules/.pnpm/simple-hypercore-protocol@2.1.2/node_modules/simple-hypercore-protocol/lib/xor.js":{"bytes":609,"imports":[{"path":"node_modules/.pnpm/xsalsa20-universal@1.0.0/node_modules/xsalsa20-universal/index.js","kind":"require-call","original":"xsalsa20-universal"},{"path":"node_modules/.pnpm/hypercore-crypto@2.3.2/node_modules/hypercore-crypto/index.js","kind":"require-call","original":"hypercore-crypto"}],"format":"cjs"},"node_modules/.pnpm/simple-message-channels@1.2.1/node_modules/simple-message-channels/index.js":{"bytes":5278,"imports":[{"path":"node_modules/.pnpm/varint@5.0.2/node_modules/varint/index.js","kind":"require-call","original":"varint"}],"format":"cjs"},"node_modules/.pnpm/simple-hypercore-protocol@2.1.2/node_modules/simple-hypercore-protocol/index.js":{"bytes":7913,"imports":[{"path":"node_modules/.pnpm/simple-hypercore-protocol@2.1.2/node_modules/simple-hypercore-protocol/lib/handshake.js","kind":"require-call","original":"./lib/handshake"},{"path":"node_modules/.pnpm/simple-hypercore-protocol@2.1.2/node_modules/simple-hypercore-protocol/messages.js","kind":"require-call","original":"./messages"},{"path":"node_modules/.pnpm/simple-hypercore-protocol@2.1.2/node_modules/simple-hypercore-protocol/lib/xor.js","kind":"require-call","original":"./lib/xor"},{"path":"node_modules/.pnpm/simple-message-channels@1.2.1/node_modules/simple-message-channels/index.js","kind":"require-call","original":"simple-message-channels"},{"path":"node_modules/.pnpm/hypercore-crypto@2.3.2/node_modules/hypercore-crypto/index.js","kind":"require-call","original":"hypercore-crypto"},{"path":"node_modules/.pnpm/varint@5.0.2/node_modules/varint/index.js","kind":"require-call","original":"varint"}],"format":"cjs"},"node_modules/.pnpm/timeout-refresh@1.0.3/node_modules/timeout-refresh/refresh.js":{"bytes":578,"imports":[],"format":"cjs"},"node_modules/.pnpm/timeout-refresh@1.0.3/node_modules/timeout-refresh/browser.js":{"bytes":620,"imports":[],"format":"cjs"},"node_modules/.pnpm/timeout-refresh@1.0.3/node_modules/timeout-refresh/timers.js":{"bytes":739,"imports":[{"path":"node:timers","kind":"require-call","external":true}],"format":"cjs"},"node_modules/.pnpm/timeout-refresh@1.0.3/node_modules/timeout-refresh/index.js":{"bytes":190,"imports":[{"path":"node_modules/.pnpm/timeout-refresh@1.0.3/node_modules/timeout-refresh/refresh.js","kind":"require-call","original":"./refresh"},{"path":"node_modules/.pnpm/timeout-refresh@1.0.3/node_modules/timeout-refresh/browser.js","kind":"require-call","original":"./browser"},{"path":"node_modules/.pnpm/timeout-refresh@1.0.3/node_modules/timeout-refresh/timers.js","kind":"require-call","original":"./timers"}],"format":"cjs"},"node_modules/.pnpm/abstract-extension@3.1.1/node_modules/abstract-extension/index.js":{"bytes":3630,"imports":[{"path":"node_modules/.pnpm/codecs@2.2.0/node_modules/codecs/index.js","kind":"require-call","original":"codecs"}],"format":"cjs"},"node_modules/.pnpm/ms@2.1.2/node_modules/ms/index.js":{"bytes":3023,"imports":[],"format":"cjs"},"node_modules/.pnpm/debug@4.3.4/node_modules/debug/src/common.js":{"bytes":6289,"imports":[{"path":"node_modules/.pnpm/ms@2.1.2/node_modules/ms/index.js","kind":"require-call","original":"ms"}],"format":"cjs"},"node_modules/.pnpm/debug@4.3.4/node_modules/debug/src/browser.js":{"bytes":6010,"imports":[{"path":"node_modules/.pnpm/debug@4.3.4/node_modules/debug/src/common.js","kind":"require-call","original":"./common"}],"format":"cjs"},"node_modules/.pnpm/has-flag@4.0.0/node_modules/has-flag/index.js":{"bytes":330,"imports":[],"format":"cjs"},"node_modules/.pnpm/supports-color@8.1.1/node_modules/supports-color/index.js":{"bytes":3065,"imports":[{"path":"node:os","kind":"require-call","external":true},{"path":"node:tty","kind":"require-call","external":true},{"path":"node_modules/.pnpm/has-flag@4.0.0/node_modules/has-flag/index.js","kind":"require-call","original":"has-flag"}],"format":"cjs"},"node_modules/.pnpm/debug@4.3.4/node_modules/debug/src/node.js":{"bytes":4685,"imports":[{"path":"node:tty","kind":"require-call","external":true},{"path":"node:util","kind":"require-call","external":true},{"path":"node_modules/.pnpm/supports-color@8.1.1/node_modules/supports-color/index.js","kind":"require-call","original":"supports-color"},{"path":"node_modules/.pnpm/debug@4.3.4/node_modules/debug/src/common.js","kind":"require-call","original":"./common"}],"format":"cjs"},"node_modules/.pnpm/debug@4.3.4/node_modules/debug/src/index.js":{"bytes":314,"imports":[{"path":"node_modules/.pnpm/debug@4.3.4/node_modules/debug/src/browser.js","kind":"require-call","original":"./browser.js"},{"path":"node_modules/.pnpm/debug@4.3.4/node_modules/debug/src/node.js","kind":"require-call","original":"./node.js"}],"format":"cjs"},"node_modules/.pnpm/hypercore-protocol@8.0.7/node_modules/hypercore-protocol/index.js":{"bytes":15546,"imports":[{"path":"node_modules/.pnpm/simple-hypercore-protocol@2.1.2/node_modules/simple-hypercore-protocol/index.js","kind":"require-call","original":"simple-hypercore-protocol"},{"path":"node_modules/.pnpm/hypercore-crypto@2.3.2/node_modules/hypercore-crypto/index.js","kind":"require-call","original":"hypercore-crypto"},{"path":"node_modules/.pnpm/timeout-refresh@1.0.3/node_modules/timeout-refresh/index.js","kind":"require-call","original":"timeout-refresh"},{"path":"node_modules/.pnpm/inspect-custom-symbol@1.1.1/node_modules/inspect-custom-symbol/index.js","kind":"require-call","original":"inspect-custom-symbol"},{"path":"node_modules/.pnpm/nanoguard@1.3.0/node_modules/nanoguard/index.js","kind":"require-call","original":"nanoguard"},{"path":"node_modules/.pnpm/pretty-hash@1.0.1/node_modules/pretty-hash/index.js","kind":"require-call","original":"pretty-hash"},{"path":"node_modules/.pnpm/abstract-extension@3.1.1/node_modules/abstract-extension/index.js","kind":"require-call","original":"abstract-extension"},{"path":"streamx","kind":"require-call","external":true},{"path":"node_modules/.pnpm/debug@4.3.4/node_modules/debug/src/index.js","kind":"require-call","original":"debug"}],"format":"cjs"},"node_modules/.pnpm/count-trailing-zeros@1.0.1/node_modules/count-trailing-zeros/ctz.js":{"bytes":226,"imports":[],"format":"cjs"},"node_modules/.pnpm/fast-bitfield@1.2.2/node_modules/fast-bitfield/index.js":{"bytes":10700,"imports":[{"path":"node_modules/.pnpm/count-trailing-zeros@1.0.1/node_modules/count-trailing-zeros/ctz.js","kind":"require-call","original":"count-trailing-zeros"}],"format":"cjs"},"node_modules/.pnpm/hypercore@9.12.0/node_modules/hypercore/lib/replicate.js":{"bytes":23715,"imports":[{"path":"node_modules/.pnpm/hypercore-protocol@8.0.7/node_modules/hypercore-protocol/index.js","kind":"require-call","original":"hypercore-protocol"},{"path":"node_modules/.pnpm/timeout-refresh@1.0.3/node_modules/timeout-refresh/index.js","kind":"require-call","original":"timeout-refresh"},{"path":"node_modules/.pnpm/fast-bitfield@1.2.2/node_modules/fast-bitfield/index.js","kind":"require-call","original":"fast-bitfield"},{"path":"node_modules/.pnpm/unordered-set@2.0.1/node_modules/unordered-set/index.js","kind":"require-call","original":"unordered-set"},{"path":"node_modules/.pnpm/bitfield-rle@2.2.1/node_modules/bitfield-rle/index.js","kind":"require-call","original":"bitfield-rle"},{"path":"node_modules/.pnpm/hypercore@9.12.0/node_modules/hypercore/lib/tree-index.js","kind":"require-call","original":"./tree-index"}],"format":"cjs"},"node_modules/.pnpm/nanoresource@1.3.0/node_modules/nanoresource/emitter.js":{"bytes":3204,"imports":[{"path":"node:events","kind":"require-call","external":true},{"path":"node_modules/.pnpm/inherits@2.0.4/node_modules/inherits/inherits.js","kind":"require-call","original":"inherits"}],"format":"cjs"},"packages/common/hypercore/src/empty.ts":{"bytes":1223,"imports":[],"format":"cjs"},"node_modules/.pnpm/hypercore-streams@1.0.1/node_modules/hypercore-streams/index.js":{"bytes":1970,"imports":[{"path":"streamx","kind":"require-call","external":true}],"format":"cjs"},"node_modules/.pnpm/hypercore@9.12.0/node_modules/hypercore/index.js":{"bytes":50005,"imports":[{"path":"node_modules/.pnpm/last-one-wins@1.0.4/node_modules/last-one-wins/index.js","kind":"require-call","original":"last-one-wins"},{"path":"node_modules/.pnpm/unordered-array-remove@1.0.2/node_modules/unordered-array-remove/index.js","kind":"require-call","original":"unordered-array-remove"},{"path":"node_modules/.pnpm/unordered-set@2.0.1/node_modules/unordered-set/index.js","kind":"require-call","original":"unordered-set"},{"path":"node_modules/.pnpm/merkle-tree-stream@4.0.0/node_modules/merkle-tree-stream/generator.js","kind":"require-call","original":"merkle-tree-stream/generator"},{"path":"node_modules/.pnpm/flat-tree@1.9.0/node_modules/flat-tree/index.js","kind":"require-call","original":"flat-tree"},{"path":"node_modules/.pnpm/codecs@2.2.0/node_modules/codecs/index.js","kind":"require-call","original":"codecs"},{"path":"node_modules/.pnpm/atomic-batcher@1.0.2/node_modules/atomic-batcher/index.js","kind":"require-call","original":"atomic-batcher"},{"path":"node_modules/.pnpm/inherits@2.0.4/node_modules/inherits/inherits.js","kind":"require-call","original":"inherits"},{"path":"node_modules/.pnpm/hypercore@9.12.0/node_modules/hypercore/lib/bitfield.js","kind":"require-call","original":"./lib/bitfield"},{"path":"node_modules/.pnpm/sparse-bitfield@3.0.3/node_modules/sparse-bitfield/index.js","kind":"require-call","original":"sparse-bitfield"},{"path":"node_modules/.pnpm/hypercore@9.12.0/node_modules/hypercore/lib/tree-index.js","kind":"require-call","original":"./lib/tree-index"},{"path":"node_modules/.pnpm/hypercore@9.12.0/node_modules/hypercore/lib/storage.js","kind":"require-call","original":"./lib/storage"},{"path":"node_modules/.pnpm/hypercore-crypto@2.3.2/node_modules/hypercore-crypto/index.js","kind":"require-call","original":"hypercore-crypto"},{"path":"node_modules/.pnpm/inspect-custom-symbol@1.1.1/node_modules/inspect-custom-symbol/index.js","kind":"require-call","original":"inspect-custom-symbol"},{"path":"node_modules/.pnpm/pretty-hash@1.0.1/node_modules/pretty-hash/index.js","kind":"require-call","original":"pretty-hash"},{"path":"node_modules/.pnpm/nanoguard@1.3.0/node_modules/nanoguard/index.js","kind":"require-call","original":"nanoguard"},{"path":"node_modules/.pnpm/hypercore@9.12.0/node_modules/hypercore/lib/safe-buffer-equals.js","kind":"require-call","original":"./lib/safe-buffer-equals"},{"path":"node_modules/.pnpm/hypercore@9.12.0/node_modules/hypercore/lib/replicate.js","kind":"require-call","original":"./lib/replicate"},{"path":"node_modules/.pnpm/hypercore-protocol@8.0.7/node_modules/hypercore-protocol/index.js","kind":"require-call","original":"hypercore-protocol"},{"path":"node_modules/.pnpm/abstract-extension@3.1.1/node_modules/abstract-extension/index.js","kind":"require-call","original":"abstract-extension"},{"path":"node_modules/.pnpm/nanoresource@1.3.0/node_modules/nanoresource/emitter.js","kind":"require-call","original":"nanoresource/emitter"},{"path":"packages/common/hypercore/src/empty.ts","kind":"require-call","original":"hypercore-default-storage"},{"path":"node_modules/.pnpm/hypercore-streams@1.0.1/node_modules/hypercore-streams/index.js","kind":"require-call","original":"hypercore-streams"}],"format":"cjs"},"packages/common/hypercore/src/crypto.ts":{"bytes":5023,"imports":[{"path":"node:util","kind":"import-statement","external":true},{"path":"@dxos/crypto","kind":"import-statement","external":true},{"path":"@dxos/invariant","kind":"import-statement","external":true},{"path":"@dxos/util","kind":"import-statement","external":true}],"format":"esm"},"packages/common/hypercore/src/defaults.ts":{"bytes":3798,"imports":[],"format":"esm"},"packages/common/hypercore/src/util.ts":{"bytes":833,"imports":[{"path":"node:util","kind":"import-statement","external":true}],"format":"esm"},"packages/common/hypercore/src/hypercore-factory.ts":{"bytes":5248,"imports":[{"path":"node_modules/.pnpm/hypercore@9.12.0/node_modules/hypercore/index.js","kind":"import-statement","original":"hypercore"},{"path":"@dxos/invariant","kind":"import-statement","external":true},{"path":"@dxos/random-access-storage","kind":"import-statement","external":true},{"path":"packages/common/hypercore/src/util.ts","kind":"import-statement","original":"./util"}],"format":"esm"},"packages/common/hypercore/src/iterator.ts":{"bytes":4037,"imports":[{"path":"readable-stream","kind":"import-statement","external":true}],"format":"esm"},"packages/common/hypercore/src/index.ts":{"bytes":1114,"imports":[{"path":"node_modules/.pnpm/hypercore@9.12.0/node_modules/hypercore/index.js","kind":"import-statement","original":"hypercore"},{"path":"packages/common/hypercore/src/crypto.ts","kind":"import-statement","original":"./crypto"},{"path":"packages/common/hypercore/src/defaults.ts","kind":"import-statement","original":"./defaults"},{"path":"packages/common/hypercore/src/hypercore-factory.ts","kind":"import-statement","original":"./hypercore-factory"},{"path":"packages/common/hypercore/src/iterator.ts","kind":"import-statement","original":"./iterator"}],"format":"esm"}},"outputs":{"packages/common/hypercore/dist/lib/node-esm/index.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":559695},"packages/common/hypercore/dist/lib/node-esm/index.mjs":{"imports":[{"path":"node:util","kind":"require-call","external":true},{"path":"sodium-universal","kind":"require-call","external":true},{"path":"node:util","kind":"require-call","external":true},{"path":"sodium-universal/memory","kind":"require-call","external":true},{"path":"sodium-universal/crypto_aead","kind":"require-call","external":true},{"path":"sodium-universal/memory","kind":"require-call","external":true},{"path":"sodium-universal/helpers","kind":"require-call","external":true},{"path":"sodium-universal/memory","kind":"require-call","external":true},{"path":"sodium-universal/crypto_generichash","kind":"require-call","external":true},{"path":"sodium-universal/crypto_kx","kind":"require-call","external":true},{"path":"sodium-universal/crypto_scalarmult","kind":"require-call","external":true},{"path":"sodium-universal/memory","kind":"require-call","external":true},{"path":"sodium-universal/crypto_generichash","kind":"require-call","external":true},{"path":"sodium-universal/memory","kind":"require-call","external":true},{"path":"sodium-universal/memory","kind":"require-call","external":true},{"path":"sodium-native","kind":"require-call","external":true},{"path":"node:timers","kind":"require-call","external":true},{"path":"node:os","kind":"require-call","external":true},{"path":"node:tty","kind":"require-call","external":true},{"path":"node:tty","kind":"require-call","external":true},{"path":"node:util","kind":"require-call","external":true},{"path":"streamx","kind":"require-call","external":true},{"path":"node:events","kind":"require-call","external":true},{"path":"streamx","kind":"require-call","external":true},{"path":"node:util","kind":"import-statement","external":true},{"path":"@dxos/crypto","kind":"import-statement","external":true},{"path":"@dxos/invariant","kind":"import-statement","external":true},{"path":"@dxos/util","kind":"import-statement","external":true},{"path":"@dxos/invariant","kind":"import-statement","external":true},{"path":"@dxos/random-access-storage","kind":"import-statement","external":true},{"path":"node:util","kind":"import-statement","external":true},{"path":"readable-stream","kind":"import-statement","external":true}],"exports":["HypercoreFactory","createAsyncIterator","createCodecEncoding","createCrypto","createReadable","defaultFeedOptions","defaultReadStreamOptions","defaultReplicateOptions","defaultWriteStreamOptions","hypercore"],"entryPoint":"packages/common/hypercore/src/index.ts","inputs":{"node_modules/.pnpm/last-one-wins@1.0.4/node_modules/last-one-wins/index.js":{"bytesInOutput":1024},"node_modules/.pnpm/unordered-array-remove@1.0.2/node_modules/unordered-array-remove/index.js":{"bytesInOutput":435},"node_modules/.pnpm/unordered-set@2.0.1/node_modules/unordered-set/index.js":{"bytesInOutput":946},"node_modules/.pnpm/flat-tree@1.9.0/node_modules/flat-tree/index.js":{"bytesInOutput":6841},"node_modules/.pnpm/merkle-tree-stream@4.0.0/node_modules/merkle-tree-stream/generator.js":{"bytesInOutput":1752},"node_modules/.pnpm/codecs@2.2.0/node_modules/codecs/index.js":{"bytesInOutput":2379},"node_modules/.pnpm/atomic-batcher@1.0.2/node_modules/atomic-batcher/index.js":{"bytesInOutput":1587},"node_modules/.pnpm/inherits@2.0.4/node_modules/inherits/inherits_browser.js":{"bytesInOutput":928},"node_modules/.pnpm/inherits@2.0.4/node_modules/inherits/inherits.js":{"bytesInOutput":370},"node_modules/.pnpm/varint@4.0.1/node_modules/varint/encode.js":{"bytesInOutput":663},"node_modules/.pnpm/varint@4.0.1/node_modules/varint/decode.js":{"bytesInOutput":663},"node_modules/.pnpm/varint@4.0.1/node_modules/varint/length.js":{"bytesInOutput":612},"node_modules/.pnpm/varint@4.0.1/node_modules/varint/index.js":{"bytesInOutput":259},"node_modules/.pnpm/buffer-alloc-unsafe@1.1.0/node_modules/buffer-alloc-unsafe/index.js":{"bytesInOutput":578},"node_modules/.pnpm/bitfield-rle@2.2.1/node_modules/bitfield-rle/index.js":{"bytesInOutput":4746},"node_modules/.pnpm/memory-pager@1.5.0/node_modules/memory-pager/index.js":{"bytesInOutput":4423},"node_modules/.pnpm/sparse-bitfield@3.0.3/node_modules/sparse-bitfield/index.js":{"bytesInOutput":2753},"node_modules/.pnpm/hypercore@9.12.0/node_modules/hypercore/lib/bitfield.js":{"bytesInOutput":9529},"node_modules/.pnpm/hypercore@9.12.0/node_modules/hypercore/lib/tree-index.js":{"bytesInOutput":4945},"node_modules/.pnpm/buffer-fill@1.0.0/node_modules/buffer-fill/index.js":{"bytesInOutput":2787},"node_modules/.pnpm/buffer-alloc@1.2.0/node_modules/buffer-alloc/index.js":{"bytesInOutput":898},"node_modules/.pnpm/uint64be@2.0.2/node_modules/uint64be/index.js":{"bytesInOutput":855},"node_modules/.pnpm/hypercore-cache@1.0.2/node_modules/hypercore-cache/index.js":{"bytesInOutput":3279},"node_modules/.pnpm/hypercore@9.12.0/node_modules/hypercore/lib/cache.js":{"bytesInOutput":994},"node_modules/.pnpm/hypercore@9.12.0/node_modules/hypercore/lib/storage.js":{"bytesInOutput":11134},"node_modules/.pnpm/uint64be@3.0.0/node_modules/uint64be/index.js":{"bytesInOutput":825},"node_modules/.pnpm/hypercore-crypto@2.3.2/node_modules/hypercore-crypto/index.js":{"bytesInOutput":4810},"node_modules/.pnpm/inspect-custom-symbol@1.1.1/node_modules/inspect-custom-symbol/index.js":{"bytesInOutput":323},"node_modules/.pnpm/pretty-hash@1.0.1/node_modules/pretty-hash/index.js":{"bytesInOutput":391},"node_modules/.pnpm/nanoguard@1.3.0/node_modules/nanoguard/index.js":{"bytesInOutput":1559},"node_modules/.pnpm/hypercore@9.12.0/node_modules/hypercore/lib/safe-buffer-equals.js":{"bytesInOutput":315},"node_modules/.pnpm/nanoassert@2.0.0/node_modules/nanoassert/index.js":{"bytesInOutput":468},"node_modules/.pnpm/clone@2.1.2/node_modules/clone/clone.js":{"bytesInOutput":6744},"node_modules/.pnpm/noise-protocol@3.0.1/node_modules/noise-protocol/cipher.js":{"bytesInOutput":3084},"node_modules/.pnpm/noise-protocol@3.0.1/node_modules/noise-protocol/cipher-state.js":{"bytesInOutput":3670},"node_modules/.pnpm/nanoassert@1.1.0/node_modules/nanoassert/index.js":{"bytesInOutput":543},"node_modules/.pnpm/hmac-blake2b@2.0.0/node_modules/hmac-blake2b/index.js":{"bytesInOutput":1622},"node_modules/.pnpm/noise-protocol@3.0.1/node_modules/noise-protocol/dh.js":{"bytesInOutput":1351},"node_modules/.pnpm/noise-protocol@3.0.1/node_modules/noise-protocol/hash.js":{"bytesInOutput":1740},"node_modules/.pnpm/noise-protocol@3.0.1/node_modules/noise-protocol/symmetric-state.js":{"bytesInOutput":5120},"node_modules/.pnpm/noise-protocol@3.0.1/node_modules/noise-protocol/handshake-state.js":{"bytesInOutput":14408},"node_modules/.pnpm/noise-protocol@3.0.1/node_modules/noise-protocol/index.js":{"bytesInOutput":198},"node_modules/.pnpm/simple-handshake@3.0.0/node_modules/simple-handshake/index.js":{"bytesInOutput":4281},"node_modules/.pnpm/varint@5.0.2/node_modules/varint/encode.js":{"bytesInOutput":664},"node_modules/.pnpm/varint@5.0.2/node_modules/varint/decode.js":{"bytesInOutput":668},"node_modules/.pnpm/varint@5.0.2/node_modules/varint/length.js":{"bytesInOutput":613},"node_modules/.pnpm/varint@5.0.2/node_modules/varint/index.js":{"bytesInOutput":263},"node_modules/.pnpm/simple-hypercore-protocol@2.1.2/node_modules/simple-hypercore-protocol/lib/handshake.js":{"bytesInOutput":3989},"node_modules/.pnpm/varint@5.0.0/node_modules/varint/encode.js":{"bytesInOutput":664},"node_modules/.pnpm/varint@5.0.0/node_modules/varint/decode.js":{"bytesInOutput":668},"node_modules/.pnpm/varint@5.0.0/node_modules/varint/length.js":{"bytesInOutput":613},"node_modules/.pnpm/varint@5.0.0/node_modules/varint/index.js":{"bytesInOutput":263},"node_modules/.pnpm/signed-varint@2.0.1/node_modules/signed-varint/index.js":{"bytesInOutput":652},"node_modules/.pnpm/b4a@1.6.0/node_modules/b4a/index.js":{"bytesInOutput":3747},"node_modules/.pnpm/protocol-buffers-encodings@1.2.0/node_modules/protocol-buffers-encodings/index.js":{"bytesInOutput":7692},"node_modules/.pnpm/simple-hypercore-protocol@2.1.2/node_modules/simple-hypercore-protocol/messages.js":{"bytesInOutput":35822},"node_modules/.pnpm/xsalsa20-universal@1.0.0/node_modules/xsalsa20-universal/index.js":{"bytesInOutput":674},"node_modules/.pnpm/simple-hypercore-protocol@2.1.2/node_modules/simple-hypercore-protocol/lib/xor.js":{"bytesInOutput":870},"node_modules/.pnpm/simple-message-channels@1.2.1/node_modules/simple-message-channels/index.js":{"bytesInOutput":6042},"node_modules/.pnpm/simple-hypercore-protocol@2.1.2/node_modules/simple-hypercore-protocol/index.js":{"bytesInOutput":8900},"node_modules/.pnpm/timeout-refresh@1.0.3/node_modules/timeout-refresh/refresh.js":{"bytesInOutput":821},"node_modules/.pnpm/timeout-refresh@1.0.3/node_modules/timeout-refresh/browser.js":{"bytesInOutput":863},"node_modules/.pnpm/timeout-refresh@1.0.3/node_modules/timeout-refresh/timers.js":{"bytesInOutput":1013},"node_modules/.pnpm/timeout-refresh@1.0.3/node_modules/timeout-refresh/index.js":{"bytesInOutput":345},"node_modules/.pnpm/abstract-extension@3.1.1/node_modules/abstract-extension/index.js":{"bytesInOutput":4320},"node_modules/.pnpm/ms@2.1.2/node_modules/ms/index.js":{"bytesInOutput":2909},"node_modules/.pnpm/debug@4.3.4/node_modules/debug/src/common.js":{"bytesInOutput":5493},"node_modules/.pnpm/debug@4.3.4/node_modules/debug/src/browser.js":{"bytesInOutput":4689},"node_modules/.pnpm/has-flag@4.0.0/node_modules/has-flag/index.js":{"bytesInOutput":491},"node_modules/.pnpm/supports-color@8.1.1/node_modules/supports-color/index.js":{"bytesInOutput":3572},"node_modules/.pnpm/debug@4.3.4/node_modules/debug/src/node.js":{"bytesInOutput":4334},"node_modules/.pnpm/debug@4.3.4/node_modules/debug/src/index.js":{"bytesInOutput":345},"node_modules/.pnpm/hypercore-protocol@8.0.7/node_modules/hypercore-protocol/index.js":{"bytesInOutput":17201},"node_modules/.pnpm/count-trailing-zeros@1.0.1/node_modules/count-trailing-zeros/ctz.js":{"bytesInOutput":420},"node_modules/.pnpm/fast-bitfield@1.2.2/node_modules/fast-bitfield/index.js":{"bytesInOutput":11740},"node_modules/.pnpm/hypercore@9.12.0/node_modules/hypercore/lib/replicate.js":{"bytesInOutput":24245},"node_modules/.pnpm/nanoresource@1.3.0/node_modules/nanoresource/emitter.js":{"bytesInOutput":3775},"packages/common/hypercore/src/empty.ts":{"bytesInOutput":241},"node_modules/.pnpm/hypercore-streams@1.0.1/node_modules/hypercore-streams/index.js":{"bytesInOutput":2433},"node_modules/.pnpm/hypercore@9.12.0/node_modules/hypercore/index.js":{"bytesInOutput":52213},"packages/common/hypercore/src/index.ts":{"bytesInOutput":54},"packages/common/hypercore/src/crypto.ts":{"bytesInOutput":1124},"packages/common/hypercore/src/defaults.ts":{"bytesInOutput":426},"packages/common/hypercore/src/hypercore-factory.ts":{"bytesInOutput":1336},"packages/common/hypercore/src/util.ts":{"bytesInOutput":82},"packages/common/hypercore/src/iterator.ts":{"bytesInOutput":230}},"bytes":343072}}}
|
package/package.json
CHANGED
|
@@ -1,16 +1,18 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dxos/hypercore",
|
|
3
|
-
"version": "0.6.
|
|
3
|
+
"version": "0.6.14-main.2b6a0f3",
|
|
4
4
|
"description": "Hypercore wrapper and utils.",
|
|
5
5
|
"homepage": "https://dxos.org",
|
|
6
6
|
"bugs": "https://github.com/dxos/dxos/issues",
|
|
7
7
|
"license": "MIT",
|
|
8
8
|
"author": "DXOS.org",
|
|
9
|
+
"sideEffects": false,
|
|
9
10
|
"exports": {
|
|
10
11
|
".": {
|
|
11
12
|
"browser": "./dist/lib/browser/index.mjs",
|
|
12
13
|
"node": {
|
|
13
|
-
"
|
|
14
|
+
"require": "./dist/lib/node/index.cjs",
|
|
15
|
+
"default": "./dist/lib/node-esm/index.mjs"
|
|
14
16
|
},
|
|
15
17
|
"types": "./dist/types/src/index.d.ts"
|
|
16
18
|
}
|
|
@@ -28,16 +30,16 @@
|
|
|
28
30
|
"sodium-native": "^3.2.0",
|
|
29
31
|
"sodium-universal": "^3.0.2",
|
|
30
32
|
"streamx": "^2.12.5",
|
|
31
|
-
"@dxos/async": "0.6.
|
|
32
|
-
"@dxos/
|
|
33
|
-
"@dxos/
|
|
34
|
-
"@dxos/debug": "0.6.
|
|
35
|
-
"@dxos/
|
|
36
|
-
"@dxos/
|
|
37
|
-
"@dxos/
|
|
38
|
-
"@dxos/
|
|
39
|
-
"@dxos/
|
|
40
|
-
"@dxos/
|
|
33
|
+
"@dxos/async": "0.6.14-main.2b6a0f3",
|
|
34
|
+
"@dxos/codec-protobuf": "0.6.14-main.2b6a0f3",
|
|
35
|
+
"@dxos/crypto": "0.6.14-main.2b6a0f3",
|
|
36
|
+
"@dxos/debug": "0.6.14-main.2b6a0f3",
|
|
37
|
+
"@dxos/invariant": "0.6.14-main.2b6a0f3",
|
|
38
|
+
"@dxos/keys": "0.6.14-main.2b6a0f3",
|
|
39
|
+
"@dxos/node-std": "0.6.14-main.2b6a0f3",
|
|
40
|
+
"@dxos/random-access-storage": "0.6.14-main.2b6a0f3",
|
|
41
|
+
"@dxos/typings": "0.6.14-main.2b6a0f3",
|
|
42
|
+
"@dxos/util": "0.6.14-main.2b6a0f3"
|
|
41
43
|
},
|
|
42
44
|
"devDependencies": {
|
|
43
45
|
"@types/randombytes": "^2.0.0",
|
|
@@ -46,10 +48,10 @@
|
|
|
46
48
|
"hypercore-protocol": "^8.0.7",
|
|
47
49
|
"noise-protocol": "3.0.1",
|
|
48
50
|
"random-access-memory": "^4.1.0",
|
|
49
|
-
"@dxos/log": "0.6.
|
|
50
|
-
"@dxos/random": "0.6.
|
|
51
|
-
"@dxos/
|
|
52
|
-
"@dxos/
|
|
51
|
+
"@dxos/log": "0.6.14-main.2b6a0f3",
|
|
52
|
+
"@dxos/random": "0.6.14-main.2b6a0f3",
|
|
53
|
+
"@dxos/tracing": "0.6.14-main.2b6a0f3",
|
|
54
|
+
"@dxos/util": "0.6.14-main.2b6a0f3"
|
|
53
55
|
},
|
|
54
56
|
"publishConfig": {
|
|
55
57
|
"access": "public"
|
|
@@ -2,11 +2,10 @@
|
|
|
2
2
|
// Copyright 2019 DXOS.org
|
|
3
3
|
//
|
|
4
4
|
|
|
5
|
-
import { expect } from '
|
|
5
|
+
import { describe, expect, test } from 'vitest';
|
|
6
6
|
|
|
7
7
|
import { createKeyPair } from '@dxos/crypto';
|
|
8
8
|
import { faker } from '@dxos/random';
|
|
9
|
-
import { describe, test } from '@dxos/test';
|
|
10
9
|
|
|
11
10
|
import { HypercoreFactory } from './hypercore-factory';
|
|
12
11
|
import { createDataItem } from './testing';
|
|
@@ -2,15 +2,14 @@
|
|
|
2
2
|
// Copyright 2020 DXOS.org
|
|
3
3
|
//
|
|
4
4
|
|
|
5
|
-
import { expect } from 'chai';
|
|
6
5
|
import ProtocolStream from 'hypercore-protocol';
|
|
6
|
+
import { describe, expect, test } from 'vitest';
|
|
7
7
|
|
|
8
8
|
import { latch } from '@dxos/async';
|
|
9
9
|
import { createKeyPair } from '@dxos/crypto';
|
|
10
10
|
import { PublicKey } from '@dxos/keys';
|
|
11
11
|
import { log } from '@dxos/log';
|
|
12
12
|
import { faker } from '@dxos/random';
|
|
13
|
-
import { describe, test } from '@dxos/test';
|
|
14
13
|
|
|
15
14
|
import { HypercoreFactory } from './hypercore-factory';
|
|
16
15
|
|
package/src/hypercore.test.ts
CHANGED
|
@@ -2,13 +2,12 @@
|
|
|
2
2
|
// Copyright 2019 DXOS.org
|
|
3
3
|
//
|
|
4
4
|
|
|
5
|
-
import { expect } from 'chai';
|
|
6
5
|
import { type AbstractValueEncoding } from 'hypercore';
|
|
7
6
|
import util from 'node:util';
|
|
7
|
+
import { describe, expect, test } from 'vitest';
|
|
8
8
|
|
|
9
9
|
import { type Codec } from '@dxos/codec-protobuf';
|
|
10
10
|
import { createKeyPair } from '@dxos/crypto';
|
|
11
|
-
import { describe, test } from '@dxos/test';
|
|
12
11
|
|
|
13
12
|
import { createCodecEncoding } from './crypto';
|
|
14
13
|
import { HypercoreFactory } from './hypercore-factory';
|
package/src/iterator.test.ts
CHANGED
|
@@ -3,11 +3,11 @@
|
|
|
3
3
|
//
|
|
4
4
|
|
|
5
5
|
import util from 'node:util';
|
|
6
|
+
import { describe, test } from 'vitest';
|
|
6
7
|
|
|
7
8
|
import { latch } from '@dxos/async';
|
|
8
9
|
import { createKeyPair } from '@dxos/crypto';
|
|
9
10
|
import { log } from '@dxos/log';
|
|
10
|
-
import { describe, test } from '@dxos/test';
|
|
11
11
|
|
|
12
12
|
import { HypercoreFactory } from './hypercore-factory';
|
|
13
13
|
import { createAsyncIterator, createReadable } from './iterator';
|
package/src/replicate.test.ts
CHANGED
|
@@ -2,14 +2,13 @@
|
|
|
2
2
|
// Copyright 2019 DXOS.org
|
|
3
3
|
//
|
|
4
4
|
|
|
5
|
-
import { expect } from '
|
|
5
|
+
import { describe, expect, test } from 'vitest';
|
|
6
6
|
|
|
7
7
|
import { latch, sleep, Trigger } from '@dxos/async';
|
|
8
8
|
import { createKeyPair } from '@dxos/crypto';
|
|
9
9
|
import { log } from '@dxos/log';
|
|
10
10
|
import { faker } from '@dxos/random';
|
|
11
11
|
import { createStorage, StorageType } from '@dxos/random-access-storage';
|
|
12
|
-
import { describe, test } from '@dxos/test';
|
|
13
12
|
import { TRACE_PROCESSOR } from '@dxos/tracing';
|
|
14
13
|
import { range, sum } from '@dxos/util';
|
|
15
14
|
|
|
@@ -208,7 +207,7 @@ describe('Replication', () => {
|
|
|
208
207
|
expect(core1.stats.totals.uploadedBlocks).to.eq(numBlocks);
|
|
209
208
|
expect(core2.stats.totals.downloadedBlocks).to.eq(numBlocks);
|
|
210
209
|
}
|
|
211
|
-
})
|
|
210
|
+
});
|
|
212
211
|
|
|
213
212
|
test('replicates feeds with read stream', async () => {
|
|
214
213
|
const numBlocks = 10;
|
|
@@ -278,148 +277,146 @@ describe('Replication', () => {
|
|
|
278
277
|
}
|
|
279
278
|
|
|
280
279
|
await done();
|
|
281
|
-
})
|
|
280
|
+
});
|
|
282
281
|
|
|
283
|
-
test
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
const linear = false;
|
|
282
|
+
test.skip('replication bench', { timeout: 500_000 }, async () => {
|
|
283
|
+
const numBlocks = 1_000;
|
|
284
|
+
const maxRequests = 1024;
|
|
285
|
+
const sparse = true;
|
|
286
|
+
const eagerUpdate = false;
|
|
287
|
+
const linear = false;
|
|
290
288
|
|
|
291
|
-
|
|
289
|
+
const { publicKey, secretKey } = createKeyPair();
|
|
292
290
|
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
291
|
+
const core1 = factory1.createFeed(publicKey, { secretKey, writable: true, sparse, eagerUpdate });
|
|
292
|
+
core1.on('error', (err) => {
|
|
293
|
+
console.error(err);
|
|
294
|
+
});
|
|
295
|
+
// console.log('create')
|
|
296
|
+
// await new Promise((resolve, reject) => core1.open(err => err ? reject(err) : resolve));
|
|
297
|
+
// console.log('OPENED')
|
|
298
|
+
|
|
299
|
+
// Write.
|
|
300
|
+
console.log('begin append');
|
|
301
|
+
const appendChunk = 100;
|
|
302
|
+
for (let i = 0; i < numBlocks / appendChunk; i++) {
|
|
303
|
+
const blocks = range(appendChunk).map((x) => `test-${i * appendChunk + x}`);
|
|
304
|
+
await new Promise((resolve) => core1.append(blocks, resolve));
|
|
305
|
+
}
|
|
306
|
+
expect(core1.length).to.eq(numBlocks);
|
|
307
|
+
console.log('end append');
|
|
300
308
|
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
for (let i = 0; i < numBlocks / appendChunk; i++) {
|
|
305
|
-
const blocks = range(appendChunk).map((x) => `test-${i * appendChunk + x}`);
|
|
306
|
-
await new Promise((resolve) => core1.append(blocks, resolve));
|
|
307
|
-
}
|
|
308
|
-
expect(core1.length).to.eq(numBlocks);
|
|
309
|
-
console.log('end append');
|
|
310
|
-
|
|
311
|
-
console.log('begin wait');
|
|
312
|
-
await sleep(1_000);
|
|
313
|
-
console.log('end wait');
|
|
314
|
-
|
|
315
|
-
let lastHeartbeat = performance.now();
|
|
316
|
-
const heartbeat = setInterval(() => {
|
|
317
|
-
const now = performance.now();
|
|
318
|
-
console.log(`heartbeat dt=${now - lastHeartbeat}ms time=${now}`);
|
|
319
|
-
lastHeartbeat = now;
|
|
320
|
-
}, 500);
|
|
321
|
-
|
|
322
|
-
const core2 = factory2.createFeed(publicKey, { sparse, eagerUpdate });
|
|
323
|
-
core2.on('error', (err) => {
|
|
324
|
-
console.error(err);
|
|
325
|
-
});
|
|
326
|
-
// await new Promise(resolve => core2.open(resolve));
|
|
309
|
+
console.log('begin wait');
|
|
310
|
+
await sleep(1_000);
|
|
311
|
+
console.log('end wait');
|
|
327
312
|
|
|
328
|
-
|
|
313
|
+
let lastHeartbeat = performance.now();
|
|
314
|
+
const heartbeat = setInterval(() => {
|
|
315
|
+
const now = performance.now();
|
|
316
|
+
console.log(`heartbeat dt=${now - lastHeartbeat}ms time=${now}`);
|
|
317
|
+
lastHeartbeat = now;
|
|
318
|
+
}, 500);
|
|
329
319
|
|
|
330
|
-
|
|
331
|
-
|
|
320
|
+
const core2 = factory2.createFeed(publicKey, { sparse, eagerUpdate });
|
|
321
|
+
core2.on('error', (err) => {
|
|
322
|
+
console.error(err);
|
|
323
|
+
});
|
|
324
|
+
// await new Promise(resolve => core2.open(resolve));
|
|
332
325
|
|
|
333
|
-
|
|
334
|
-
{
|
|
335
|
-
console.log('begin replication');
|
|
336
|
-
const reporter = setInterval(() => {
|
|
337
|
-
console.log(core2.stats);
|
|
338
|
-
}, 1000);
|
|
339
|
-
|
|
340
|
-
// console.log("BEGIN replication")
|
|
341
|
-
const stream1 = core1.replicate(true, {
|
|
342
|
-
live: true,
|
|
343
|
-
noise: false,
|
|
344
|
-
encrypted: false,
|
|
345
|
-
maxRequests,
|
|
346
|
-
});
|
|
347
|
-
const stream2 = core2.replicate(false, {
|
|
348
|
-
live: true,
|
|
349
|
-
noise: false,
|
|
350
|
-
encrypted: false,
|
|
351
|
-
maxRequests,
|
|
352
|
-
});
|
|
326
|
+
const begin = performance.now();
|
|
353
327
|
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
if (err && !err.message.includes('Writable stream closed prematurely')) {
|
|
357
|
-
console.error(err);
|
|
358
|
-
}
|
|
359
|
-
};
|
|
360
|
-
stream1.pipe(stream2, onClose).pipe(stream1, onClose);
|
|
328
|
+
const done = new Trigger();
|
|
329
|
+
core2.download({ start: 0, end: core1.length, linear }, () => done.wake());
|
|
361
330
|
|
|
362
|
-
|
|
363
|
-
|
|
331
|
+
// Replicate.
|
|
332
|
+
{
|
|
333
|
+
console.log('begin replication');
|
|
334
|
+
const reporter = setInterval(() => {
|
|
335
|
+
console.log(core2.stats);
|
|
336
|
+
}, 1000);
|
|
337
|
+
|
|
338
|
+
// console.log("BEGIN replication")
|
|
339
|
+
const stream1 = core1.replicate(true, {
|
|
340
|
+
live: true,
|
|
341
|
+
noise: false,
|
|
342
|
+
encrypted: false,
|
|
343
|
+
maxRequests,
|
|
344
|
+
});
|
|
345
|
+
const stream2 = core2.replicate(false, {
|
|
346
|
+
live: true,
|
|
347
|
+
noise: false,
|
|
348
|
+
encrypted: false,
|
|
349
|
+
maxRequests,
|
|
350
|
+
});
|
|
364
351
|
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
352
|
+
const onClose = (err: any) => {
|
|
353
|
+
console.log('onclose');
|
|
354
|
+
if (err && !err.message.includes('Writable stream closed prematurely')) {
|
|
355
|
+
console.error(err);
|
|
356
|
+
}
|
|
357
|
+
};
|
|
358
|
+
stream1.pipe(stream2, onClose).pipe(stream1, onClose);
|
|
371
359
|
|
|
372
|
-
|
|
373
|
-
|
|
360
|
+
// expect(core1.stats.peers).to.have.lengthOf(1);
|
|
361
|
+
// expect(core2.stats.peers).to.have.lengthOf(1);
|
|
374
362
|
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
363
|
+
// Wait for complete sync.
|
|
364
|
+
core2.on('sync', () => {
|
|
365
|
+
// console.log('SYNC')
|
|
366
|
+
// stream1.end();
|
|
367
|
+
// stream2.end();
|
|
368
|
+
});
|
|
378
369
|
|
|
379
|
-
|
|
370
|
+
await done.wait();
|
|
371
|
+
// await streamsClosed();
|
|
380
372
|
|
|
381
|
-
|
|
382
|
-
await
|
|
373
|
+
clearInterval(reporter);
|
|
374
|
+
console.log(await core2.stats);
|
|
375
|
+
}
|
|
383
376
|
|
|
384
|
-
|
|
377
|
+
const end = performance.now();
|
|
385
378
|
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
// ...r.data.metrics!.map(m => [m.name, m.timeSeries!.tracks![0].total])
|
|
389
|
-
// ])), false, null, true)
|
|
390
|
-
const totalFlushes = sum(
|
|
391
|
-
TRACE_PROCESSOR.findResourcesByClassName('WebFile').map(
|
|
392
|
-
(resource) => resource.getMetric('_flushes')!.timeSeries!.tracks![0].total,
|
|
393
|
-
),
|
|
394
|
-
);
|
|
379
|
+
// Make sure flushes are counted.
|
|
380
|
+
await sleep(1000);
|
|
395
381
|
|
|
396
|
-
|
|
397
|
-
timeMs: end - begin,
|
|
398
|
-
numBlocks,
|
|
399
|
-
maxRequests,
|
|
400
|
-
storage: storage.type,
|
|
401
|
-
sparse,
|
|
402
|
-
eagerUpdate,
|
|
403
|
-
linear,
|
|
404
|
-
totalFlushes,
|
|
405
|
-
});
|
|
382
|
+
TRACE_PROCESSOR.refresh();
|
|
406
383
|
|
|
407
|
-
|
|
384
|
+
// console.log(inspect(TRACE_PROCESSOR.findResourcesByClassName('WebFile').map(r => [
|
|
385
|
+
// r.data.info._fileName,
|
|
386
|
+
// ...r.data.metrics!.map(m => [m.name, m.timeSeries!.tracks![0].total])
|
|
387
|
+
// ])), false, null, true)
|
|
388
|
+
const totalFlushes = sum(
|
|
389
|
+
TRACE_PROCESSOR.findResourcesByClassName('WebFile').map(
|
|
390
|
+
(resource) => resource.getMetric('_flushes')!.timeSeries!.tracks![0].total,
|
|
391
|
+
),
|
|
392
|
+
);
|
|
408
393
|
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
394
|
+
log.info('time', {
|
|
395
|
+
timeMs: end - begin,
|
|
396
|
+
numBlocks,
|
|
397
|
+
maxRequests,
|
|
398
|
+
storage: storage.type,
|
|
399
|
+
sparse,
|
|
400
|
+
eagerUpdate,
|
|
401
|
+
linear,
|
|
402
|
+
totalFlushes,
|
|
403
|
+
});
|
|
418
404
|
|
|
419
|
-
|
|
405
|
+
expect(await core2.has(0, numBlocks)).to.eq(true);
|
|
420
406
|
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
407
|
+
// Close.
|
|
408
|
+
{
|
|
409
|
+
const [closed, close] = latch({ count: 2 });
|
|
410
|
+
core1.on('close', close);
|
|
411
|
+
core2.on('close', close);
|
|
412
|
+
core1.close();
|
|
413
|
+
core2.close();
|
|
414
|
+
await closed();
|
|
415
|
+
}
|
|
416
|
+
|
|
417
|
+
clearInterval(heartbeat);
|
|
418
|
+
|
|
419
|
+
// expect(core1.stats.totals.uploadedBlocks).to.eq(numBlocks);
|
|
420
|
+
// expect(core2.stats.totals.downloadedBlocks).to.eq(numBlocks);
|
|
421
|
+
});
|
|
425
422
|
});
|
package/src/streams.test.ts
CHANGED
|
@@ -4,11 +4,11 @@
|
|
|
4
4
|
|
|
5
5
|
import util from 'node:util';
|
|
6
6
|
import { Writable } from 'streamx';
|
|
7
|
+
import { describe, test } from 'vitest';
|
|
7
8
|
|
|
8
9
|
import { latch } from '@dxos/async';
|
|
9
10
|
import { createKeyPair } from '@dxos/crypto';
|
|
10
11
|
import { log } from '@dxos/log';
|
|
11
|
-
import { describe, test } from '@dxos/test';
|
|
12
12
|
|
|
13
13
|
import { HypercoreFactory } from './hypercore-factory';
|
|
14
14
|
|