@dxos/echo-pipeline 0.3.8-main.152ec6f → 0.3.8-main.1b6c849
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/{chunk-KD6OVLI6.mjs → chunk-MPEQ7BV3.mjs} +70 -33
- package/dist/lib/browser/chunk-MPEQ7BV3.mjs.map +7 -0
- package/dist/lib/browser/index.mjs +1 -1
- package/dist/lib/browser/meta.json +1 -1
- package/dist/lib/browser/testing/index.mjs +1 -1
- package/dist/lib/node/{chunk-SZA2O5BZ.cjs → chunk-YJAADRTG.cjs} +73 -36
- package/dist/lib/node/chunk-YJAADRTG.cjs.map +7 -0
- package/dist/lib/node/index.cjs +25 -25
- package/dist/lib/node/index.cjs.map +1 -1
- package/dist/lib/node/meta.json +1 -1
- package/dist/lib/node/testing/index.cjs +14 -14
- package/dist/types/src/db-host/data-service-host.d.ts +3 -1
- package/dist/types/src/db-host/data-service-host.d.ts.map +1 -1
- package/dist/types/src/db-host/data-service.d.ts +3 -1
- package/dist/types/src/db-host/data-service.d.ts.map +1 -1
- package/dist/types/src/space/data-pipeline.d.ts.map +1 -1
- package/package.json +51 -35
- package/src/db-host/data-service-host.ts +15 -1
- package/src/db-host/data-service.ts +10 -0
- package/src/space/data-pipeline.ts +39 -2
- package/dist/lib/browser/chunk-KD6OVLI6.mjs.map +0 -7
- package/dist/lib/node/chunk-SZA2O5BZ.cjs.map +0 -7
- package/testing.d.ts +0 -11
- package/testing.js +0 -5
package/dist/lib/node/meta.json
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"inputs":{"packages/core/echo/echo-pipeline/src/common/codec.ts":{"bytes":1650,"imports":[{"path":"@dxos/hypercore","kind":"import-statement","external":true},{"path":"@dxos/protocols","kind":"import-statement","external":true}],"format":"esm"},"packages/core/echo/echo-pipeline/src/common/feeds.ts":{"bytes":2138,"imports":[{"path":"@dxos/invariant","kind":"import-statement","external":true}],"format":"esm"},"packages/core/echo/echo-pipeline/src/common/index.ts":{"bytes":553,"imports":[{"path":"packages/core/echo/echo-pipeline/src/common/codec.ts","kind":"import-statement","original":"./codec"},{"path":"packages/core/echo/echo-pipeline/src/common/feeds.ts","kind":"import-statement","original":"./feeds"}],"format":"esm"},"packages/core/echo/echo-pipeline/src/db-host/data-service-host.ts":{"bytes":24441,"imports":[{"path":"@dxos/async","kind":"import-statement","external":true},{"path":"@dxos/codec-protobuf","kind":"import-statement","external":true},{"path":"@dxos/context","kind":"import-statement","external":true},{"path":"@dxos/echo-db","kind":"import-statement","external":true},{"path":"@dxos/invariant","kind":"import-statement","external":true},{"path":"@dxos/log","kind":"import-statement","external":true},{"path":"@dxos/protocols/proto/dxos/echo/service","kind":"import-statement","external":true},{"path":"@dxos/util","kind":"import-statement","external":true}],"format":"esm"},"packages/core/echo/echo-pipeline/src/db-host/database-host.ts":{"bytes":5700,"imports":[{"path":"@dxos/echo-db","kind":"import-statement","external":true},{"path":"packages/core/echo/echo-pipeline/src/db-host/data-service-host.ts","kind":"import-statement","original":"./data-service-host"}],"format":"esm"},"packages/core/echo/echo-pipeline/src/db-host/snapshot-manager.ts":{"bytes":6328,"imports":[{"path":"@dxos/context","kind":"import-statement","external":true},{"path":"@dxos/keys","kind":"import-statement","external":true},{"path":"@dxos/protocols","kind":"import-statement","external":true},{"path":"@dxos/protocols/proto/dxos/echo/blob","kind":"import-statement","external":true}],"format":"esm"},"packages/core/echo/echo-pipeline/src/db-host/snapshot-store.ts":{"bytes":6063,"imports":[{"path":"@dxos/crypto","kind":"import-statement","external":true},{"path":"@dxos/protocols","kind":"import-statement","external":true}],"format":"esm"},"packages/core/echo/echo-pipeline/src/db-host/data-service.ts":{"bytes":8990,"imports":[{"path":"@dxos/debug","kind":"import-statement","external":true},{"path":"@dxos/invariant","kind":"import-statement","external":true},{"path":"@dxos/keys","kind":"import-statement","external":true},{"path":"@dxos/log","kind":"import-statement","external":true},{"path":"@dxos/util","kind":"import-statement","external":true}],"format":"esm"},"packages/core/echo/echo-pipeline/src/db-host/index.ts":{"bytes":920,"imports":[{"path":"packages/core/echo/echo-pipeline/src/db-host/data-service-host.ts","kind":"import-statement","original":"./data-service-host"},{"path":"packages/core/echo/echo-pipeline/src/db-host/database-host.ts","kind":"import-statement","original":"./database-host"},{"path":"packages/core/echo/echo-pipeline/src/db-host/snapshot-manager.ts","kind":"import-statement","original":"./snapshot-manager"},{"path":"packages/core/echo/echo-pipeline/src/db-host/snapshot-store.ts","kind":"import-statement","original":"./snapshot-store"},{"path":"packages/core/echo/echo-pipeline/src/db-host/data-service.ts","kind":"import-statement","original":"./data-service"}],"format":"esm"},"packages/core/echo/echo-pipeline/src/metadata/metadata-store.ts":{"bytes":33172,"imports":[{"path":"crc-32","kind":"import-statement","external":true},{"path":"@dxos/async","kind":"import-statement","external":true},{"path":"@dxos/invariant","kind":"import-statement","external":true},{"path":"@dxos/keys","kind":"import-statement","external":true},{"path":"@dxos/log","kind":"import-statement","external":true},{"path":"@dxos/protocols","kind":"import-statement","external":true},{"path":"@dxos/protocols/proto/dxos/client/services","kind":"import-statement","external":true},{"path":"@dxos/util","kind":"import-statement","external":true}],"format":"esm"},"packages/core/echo/echo-pipeline/src/metadata/index.ts":{"bytes":499,"imports":[{"path":"packages/core/echo/echo-pipeline/src/metadata/metadata-store.ts","kind":"import-statement","original":"./metadata-store"}],"format":"esm"},"packages/core/echo/echo-pipeline/src/pipeline/message-selector.ts":{"bytes":3785,"imports":[{"path":"@dxos/invariant","kind":"import-statement","external":true},{"path":"@dxos/log","kind":"import-statement","external":true}],"format":"esm"},"packages/core/echo/echo-pipeline/src/pipeline/timeframe-clock.ts":{"bytes":9610,"imports":[{"path":"@dxos/async","kind":"import-statement","external":true},{"path":"@dxos/debug","kind":"import-statement","external":true},{"path":"@dxos/log","kind":"import-statement","external":true},{"path":"@dxos/timeframe","kind":"import-statement","external":true}],"format":"esm"},"packages/core/echo/echo-pipeline/src/pipeline/pipeline.ts":{"bytes":46618,"imports":[{"path":"@dxos/async","kind":"import-statement","external":true},{"path":"@dxos/context","kind":"import-statement","external":true},{"path":"@dxos/debug","kind":"import-statement","external":true},{"path":"@dxos/feed-store","kind":"import-statement","external":true},{"path":"@dxos/invariant","kind":"import-statement","external":true},{"path":"@dxos/keys","kind":"import-statement","external":true},{"path":"@dxos/log","kind":"import-statement","external":true},{"path":"@dxos/timeframe","kind":"import-statement","external":true},{"path":"@dxos/util","kind":"import-statement","external":true},{"path":"packages/core/echo/echo-pipeline/src/pipeline/message-selector.ts","kind":"import-statement","original":"./message-selector"},{"path":"packages/core/echo/echo-pipeline/src/pipeline/timeframe-clock.ts","kind":"import-statement","original":"./timeframe-clock"},{"path":"packages/core/echo/echo-pipeline/src/common/index.ts","kind":"import-statement","original":"../common"}],"format":"esm"},"packages/core/echo/echo-pipeline/src/pipeline/index.ts":{"bytes":675,"imports":[{"path":"packages/core/echo/echo-pipeline/src/pipeline/pipeline.ts","kind":"import-statement","original":"./pipeline"},{"path":"packages/core/echo/echo-pipeline/src/pipeline/timeframe-clock.ts","kind":"import-statement","original":"./timeframe-clock"}],"format":"esm"},"packages/core/echo/echo-pipeline/src/space/auth.ts":{"bytes":10475,"imports":[{"path":"@dxos/async","kind":"import-statement","external":true},{"path":"@dxos/context","kind":"import-statement","external":true},{"path":"@dxos/crypto","kind":"import-statement","external":true},{"path":"@dxos/invariant","kind":"import-statement","external":true},{"path":"@dxos/log","kind":"import-statement","external":true},{"path":"@dxos/protocols","kind":"import-statement","external":true},{"path":"@dxos/teleport","kind":"import-statement","external":true}],"format":"esm"},"packages/core/echo/echo-pipeline/src/space/control-pipeline.ts":{"bytes":27877,"imports":[{"path":"@dxos/async","kind":"import-statement","external":true},{"path":"@dxos/context","kind":"import-statement","external":true},{"path":"@dxos/credentials","kind":"import-statement","external":true},{"path":"@dxos/keys","kind":"import-statement","external":true},{"path":"@dxos/log","kind":"import-statement","external":true},{"path":"@dxos/protocols/proto/dxos/halo/credentials","kind":"import-statement","external":true},{"path":"@dxos/timeframe","kind":"import-statement","external":true},{"path":"@dxos/tracing","kind":"import-statement","external":true},{"path":"@dxos/util","kind":"import-statement","external":true},{"path":"packages/core/echo/echo-pipeline/src/pipeline/index.ts","kind":"import-statement","original":"../pipeline"}],"format":"esm"},"packages/core/echo/echo-pipeline/src/space/data-pipeline.ts":{"bytes":47692,"imports":[{"path":"@dxos/async","kind":"import-statement","external":true},{"path":"@dxos/context","kind":"import-statement","external":true},{"path":"@dxos/credentials","kind":"import-statement","external":true},{"path":"@dxos/echo-db","kind":"import-statement","external":true},{"path":"@dxos/invariant","kind":"import-statement","external":true},{"path":"@dxos/log","kind":"import-statement","external":true},{"path":"@dxos/protocols","kind":"import-statement","external":true},{"path":"@dxos/timeframe","kind":"import-statement","external":true},{"path":"@dxos/tracing","kind":"import-statement","external":true},{"path":"@dxos/util","kind":"import-statement","external":true},{"path":"packages/core/echo/echo-pipeline/src/db-host/index.ts","kind":"import-statement","original":"../db-host"},{"path":"packages/core/echo/echo-pipeline/src/pipeline/index.ts","kind":"import-statement","original":"../pipeline"}],"format":"esm"},"packages/core/echo/echo-pipeline/src/space/space.ts":{"bytes":27247,"imports":[{"path":"@dxos/async","kind":"import-statement","external":true},{"path":"@dxos/invariant","kind":"import-statement","external":true},{"path":"@dxos/log","kind":"import-statement","external":true},{"path":"@dxos/protocols/proto/dxos/halo/credentials","kind":"import-statement","external":true},{"path":"@dxos/tracing","kind":"import-statement","external":true},{"path":"@dxos/util","kind":"import-statement","external":true},{"path":"packages/core/echo/echo-pipeline/src/space/control-pipeline.ts","kind":"import-statement","original":"./control-pipeline"},{"path":"packages/core/echo/echo-pipeline/src/space/data-pipeline.ts","kind":"import-statement","original":"./data-pipeline"}],"format":"esm"},"packages/core/echo/echo-pipeline/src/space/space-protocol.ts":{"bytes":25843,"imports":[{"path":"@dxos/crypto","kind":"import-statement","external":true},{"path":"@dxos/keys","kind":"import-statement","external":true},{"path":"@dxos/log","kind":"import-statement","external":true},{"path":"@dxos/network-manager","kind":"import-statement","external":true},{"path":"@dxos/teleport","kind":"import-statement","external":true},{"path":"@dxos/teleport-extension-object-sync","kind":"import-statement","external":true},{"path":"@dxos/teleport-extension-replicator","kind":"import-statement","external":true},{"path":"@dxos/util","kind":"import-statement","external":true},{"path":"packages/core/echo/echo-pipeline/src/space/auth.ts","kind":"import-statement","original":"./auth"}],"format":"esm"},"packages/core/echo/echo-pipeline/src/space/space-manager.ts":{"bytes":13247,"imports":[{"path":"@dxos/async","kind":"import-statement","external":true},{"path":"@dxos/debug","kind":"import-statement","external":true},{"path":"@dxos/keys","kind":"import-statement","external":true},{"path":"@dxos/log","kind":"import-statement","external":true},{"path":"@dxos/protocols","kind":"import-statement","external":true},{"path":"@dxos/util","kind":"import-statement","external":true},{"path":"packages/core/echo/echo-pipeline/src/space/space.ts","kind":"import-statement","original":"./space"},{"path":"packages/core/echo/echo-pipeline/src/space/space-protocol.ts","kind":"import-statement","original":"./space-protocol"},{"path":"packages/core/echo/echo-pipeline/src/db-host/index.ts","kind":"import-statement","original":"../db-host"}],"format":"esm"},"packages/core/echo/echo-pipeline/src/space/index.ts":{"bytes":859,"imports":[{"path":"packages/core/echo/echo-pipeline/src/space/auth.ts","kind":"import-statement","original":"./auth"},{"path":"packages/core/echo/echo-pipeline/src/space/space.ts","kind":"import-statement","original":"./space"},{"path":"packages/core/echo/echo-pipeline/src/space/space-manager.ts","kind":"import-statement","original":"./space-manager"},{"path":"packages/core/echo/echo-pipeline/src/space/space-protocol.ts","kind":"import-statement","original":"./space-protocol"},{"path":"packages/core/echo/echo-pipeline/src/space/data-pipeline.ts","kind":"import-statement","original":"./data-pipeline"}],"format":"esm"},"packages/core/echo/echo-pipeline/src/index.ts":{"bytes":810,"imports":[{"path":"packages/core/echo/echo-pipeline/src/common/index.ts","kind":"import-statement","original":"./common"},{"path":"packages/core/echo/echo-pipeline/src/db-host/index.ts","kind":"import-statement","original":"./db-host"},{"path":"packages/core/echo/echo-pipeline/src/metadata/index.ts","kind":"import-statement","original":"./metadata"},{"path":"packages/core/echo/echo-pipeline/src/pipeline/index.ts","kind":"import-statement","original":"./pipeline"},{"path":"packages/core/echo/echo-pipeline/src/space/index.ts","kind":"import-statement","original":"./space"}],"format":"esm"},"packages/core/echo/echo-pipeline/src/testing/test-feed-builder.ts":{"bytes":1474,"imports":[{"path":"@dxos/feed-store/testing","kind":"import-statement","external":true},{"path":"packages/core/echo/echo-pipeline/src/common/index.ts","kind":"import-statement","original":"../common"}],"format":"esm"},"packages/core/echo/echo-pipeline/src/testing/test-agent-builder.ts":{"bytes":29146,"imports":[{"path":"@dxos/context","kind":"import-statement","external":true},{"path":"@dxos/credentials","kind":"import-statement","external":true},{"path":"@dxos/document-model","kind":"import-statement","external":true},{"path":"@dxos/keys","kind":"import-statement","external":true},{"path":"@dxos/messaging","kind":"import-statement","external":true},{"path":"@dxos/model-factory","kind":"import-statement","external":true},{"path":"@dxos/network-manager","kind":"import-statement","external":true},{"path":"@dxos/protocols/proto/dxos/halo/credentials","kind":"import-statement","external":true},{"path":"@dxos/random-access-storage","kind":"import-statement","external":true},{"path":"@dxos/teleport-extension-gossip","kind":"import-statement","external":true},{"path":"@dxos/teleport-extension-object-sync","kind":"import-statement","external":true},{"path":"@dxos/util","kind":"import-statement","external":true},{"path":"packages/core/echo/echo-pipeline/src/testing/test-feed-builder.ts","kind":"import-statement","original":"./test-feed-builder"},{"path":"packages/core/echo/echo-pipeline/src/db-host/index.ts","kind":"import-statement","original":"../db-host"},{"path":"packages/core/echo/echo-pipeline/src/metadata/index.ts","kind":"import-statement","original":"../metadata"},{"path":"packages/core/echo/echo-pipeline/src/space/index.ts","kind":"import-statement","original":"../space"}],"format":"esm"},"packages/core/echo/echo-pipeline/src/testing/util.ts":{"bytes":9005,"imports":[{"path":"@dxos/async","kind":"import-statement","external":true},{"path":"@dxos/document-model","kind":"import-statement","external":true},{"path":"@dxos/echo-db","kind":"import-statement","external":true},{"path":"@dxos/feed-store/testing","kind":"import-statement","external":true},{"path":"@dxos/keys","kind":"import-statement","external":true},{"path":"@dxos/model-factory","kind":"import-statement","external":true},{"path":"@dxos/timeframe","kind":"import-statement","external":true},{"path":"packages/core/echo/echo-pipeline/src/db-host/index.ts","kind":"import-statement","original":"../db-host"}],"format":"esm"},"packages/core/echo/echo-pipeline/src/testing/database-test-rig.ts":{"bytes":30647,"imports":[{"path":"@dxos/async","kind":"import-statement","external":true},{"path":"@dxos/document-model","kind":"import-statement","external":true},{"path":"@dxos/echo-db","kind":"import-statement","external":true},{"path":"@dxos/invariant","kind":"import-statement","external":true},{"path":"@dxos/keys","kind":"import-statement","external":true},{"path":"@dxos/model-factory","kind":"import-statement","external":true},{"path":"@dxos/protocols","kind":"import-statement","external":true},{"path":"@dxos/text-model","kind":"import-statement","external":true},{"path":"@dxos/timeframe","kind":"import-statement","external":true},{"path":"@dxos/util","kind":"import-statement","external":true},{"path":"packages/core/echo/echo-pipeline/src/db-host/index.ts","kind":"import-statement","original":"../db-host"}],"format":"esm"},"packages/core/echo/echo-pipeline/src/testing/index.ts":{"bytes":808,"imports":[{"path":"packages/core/echo/echo-pipeline/src/testing/test-agent-builder.ts","kind":"import-statement","original":"./test-agent-builder"},{"path":"packages/core/echo/echo-pipeline/src/testing/test-feed-builder.ts","kind":"import-statement","original":"./test-feed-builder"},{"path":"packages/core/echo/echo-pipeline/src/testing/util.ts","kind":"import-statement","original":"./util"},{"path":"packages/core/echo/echo-pipeline/src/testing/database-test-rig.ts","kind":"import-statement","original":"./database-test-rig"}],"format":"esm"}},"outputs":{"packages/core/echo/echo-pipeline/dist/lib/node/index.cjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":93},"packages/core/echo/echo-pipeline/dist/lib/node/index.cjs":{"imports":[{"path":"packages/core/echo/echo-pipeline/dist/lib/node/chunk-SZA2O5BZ.cjs","kind":"import-statement"}],"exports":["AuthExtension","AuthStatus","DataPipeline","DataServiceHost","DataServiceImpl","DataServiceSubscriptions","DatabaseHost","MOCK_AUTH_PROVIDER","MOCK_AUTH_VERIFIER","MetadataStore","Pipeline","SnapshotManager","SnapshotStore","Space","SpaceManager","SpaceProtocol","SpaceProtocolSession","TimeframeClock","codec","createMappedFeedWriter","mapFeedIndexesToTimeframe","mapTimeframeToFeedIndexes","startAfter","valueEncoding"],"entryPoint":"packages/core/echo/echo-pipeline/src/index.ts","inputs":{"packages/core/echo/echo-pipeline/src/index.ts":{"bytesInOutput":0}},"bytes":977},"packages/core/echo/echo-pipeline/dist/lib/node/testing/index.cjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":35476},"packages/core/echo/echo-pipeline/dist/lib/node/testing/index.cjs":{"imports":[{"path":"packages/core/echo/echo-pipeline/dist/lib/node/chunk-SZA2O5BZ.cjs","kind":"import-statement"},{"path":"@dxos/context","kind":"import-statement","external":true},{"path":"@dxos/credentials","kind":"import-statement","external":true},{"path":"@dxos/document-model","kind":"import-statement","external":true},{"path":"@dxos/keys","kind":"import-statement","external":true},{"path":"@dxos/messaging","kind":"import-statement","external":true},{"path":"@dxos/model-factory","kind":"import-statement","external":true},{"path":"@dxos/network-manager","kind":"import-statement","external":true},{"path":"@dxos/protocols/proto/dxos/halo/credentials","kind":"import-statement","external":true},{"path":"@dxos/random-access-storage","kind":"import-statement","external":true},{"path":"@dxos/teleport-extension-gossip","kind":"import-statement","external":true},{"path":"@dxos/teleport-extension-object-sync","kind":"import-statement","external":true},{"path":"@dxos/util","kind":"import-statement","external":true},{"path":"@dxos/feed-store/testing","kind":"import-statement","external":true},{"path":"@dxos/async","kind":"import-statement","external":true},{"path":"@dxos/document-model","kind":"import-statement","external":true},{"path":"@dxos/echo-db","kind":"import-statement","external":true},{"path":"@dxos/feed-store/testing","kind":"import-statement","external":true},{"path":"@dxos/keys","kind":"import-statement","external":true},{"path":"@dxos/model-factory","kind":"import-statement","external":true},{"path":"@dxos/timeframe","kind":"import-statement","external":true},{"path":"@dxos/async","kind":"import-statement","external":true},{"path":"@dxos/document-model","kind":"import-statement","external":true},{"path":"@dxos/echo-db","kind":"import-statement","external":true},{"path":"@dxos/invariant","kind":"import-statement","external":true},{"path":"@dxos/keys","kind":"import-statement","external":true},{"path":"@dxos/model-factory","kind":"import-statement","external":true},{"path":"@dxos/protocols","kind":"import-statement","external":true},{"path":"@dxos/text-model","kind":"import-statement","external":true},{"path":"@dxos/timeframe","kind":"import-statement","external":true},{"path":"@dxos/util","kind":"import-statement","external":true}],"exports":["DatabaseTestBuilder","DatabaseTestPeer","MemoryNetworkManagerProvider","TestAgent","TestAgentBuilder","TestFeedBuilder","WebsocketNetworkManagerProvider","createMemoryDatabase","createRemoteDatabaseFromDataServiceHost","testLocalDatabase"],"entryPoint":"packages/core/echo/echo-pipeline/src/testing/index.ts","inputs":{"packages/core/echo/echo-pipeline/src/testing/test-agent-builder.ts":{"bytesInOutput":6533},"packages/core/echo/echo-pipeline/src/testing/test-feed-builder.ts":{"bytesInOutput":171},"packages/core/echo/echo-pipeline/src/testing/index.ts":{"bytesInOutput":0},"packages/core/echo/echo-pipeline/src/testing/util.ts":{"bytesInOutput":2091},"packages/core/echo/echo-pipeline/src/testing/database-test-rig.ts":{"bytesInOutput":7622}},"bytes":17283},"packages/core/echo/echo-pipeline/dist/lib/node/chunk-SZA2O5BZ.cjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":142126},"packages/core/echo/echo-pipeline/dist/lib/node/chunk-SZA2O5BZ.cjs":{"imports":[{"path":"@dxos/hypercore","kind":"import-statement","external":true},{"path":"@dxos/protocols","kind":"import-statement","external":true},{"path":"@dxos/invariant","kind":"import-statement","external":true},{"path":"@dxos/async","kind":"import-statement","external":true},{"path":"@dxos/codec-protobuf","kind":"import-statement","external":true},{"path":"@dxos/context","kind":"import-statement","external":true},{"path":"@dxos/echo-db","kind":"import-statement","external":true},{"path":"@dxos/invariant","kind":"import-statement","external":true},{"path":"@dxos/log","kind":"import-statement","external":true},{"path":"@dxos/protocols/proto/dxos/echo/service","kind":"import-statement","external":true},{"path":"@dxos/util","kind":"import-statement","external":true},{"path":"@dxos/echo-db","kind":"import-statement","external":true},{"path":"@dxos/context","kind":"import-statement","external":true},{"path":"@dxos/keys","kind":"import-statement","external":true},{"path":"@dxos/protocols","kind":"import-statement","external":true},{"path":"@dxos/protocols/proto/dxos/echo/blob","kind":"import-statement","external":true},{"path":"@dxos/crypto","kind":"import-statement","external":true},{"path":"@dxos/protocols","kind":"import-statement","external":true},{"path":"@dxos/debug","kind":"import-statement","external":true},{"path":"@dxos/invariant","kind":"import-statement","external":true},{"path":"@dxos/keys","kind":"import-statement","external":true},{"path":"@dxos/log","kind":"import-statement","external":true},{"path":"@dxos/util","kind":"import-statement","external":true},{"path":"crc-32","kind":"import-statement","external":true},{"path":"@dxos/async","kind":"import-statement","external":true},{"path":"@dxos/invariant","kind":"import-statement","external":true},{"path":"@dxos/keys","kind":"import-statement","external":true},{"path":"@dxos/log","kind":"import-statement","external":true},{"path":"@dxos/protocols","kind":"import-statement","external":true},{"path":"@dxos/protocols/proto/dxos/client/services","kind":"import-statement","external":true},{"path":"@dxos/util","kind":"import-statement","external":true},{"path":"@dxos/async","kind":"import-statement","external":true},{"path":"@dxos/debug","kind":"import-statement","external":true},{"path":"@dxos/log","kind":"import-statement","external":true},{"path":"@dxos/timeframe","kind":"import-statement","external":true},{"path":"@dxos/async","kind":"import-statement","external":true},{"path":"@dxos/context","kind":"import-statement","external":true},{"path":"@dxos/debug","kind":"import-statement","external":true},{"path":"@dxos/feed-store","kind":"import-statement","external":true},{"path":"@dxos/invariant","kind":"import-statement","external":true},{"path":"@dxos/keys","kind":"import-statement","external":true},{"path":"@dxos/log","kind":"import-statement","external":true},{"path":"@dxos/timeframe","kind":"import-statement","external":true},{"path":"@dxos/util","kind":"import-statement","external":true},{"path":"@dxos/invariant","kind":"import-statement","external":true},{"path":"@dxos/log","kind":"import-statement","external":true},{"path":"@dxos/async","kind":"import-statement","external":true},{"path":"@dxos/context","kind":"import-statement","external":true},{"path":"@dxos/crypto","kind":"import-statement","external":true},{"path":"@dxos/invariant","kind":"import-statement","external":true},{"path":"@dxos/log","kind":"import-statement","external":true},{"path":"@dxos/protocols","kind":"import-statement","external":true},{"path":"@dxos/teleport","kind":"import-statement","external":true},{"path":"@dxos/async","kind":"import-statement","external":true},{"path":"@dxos/context","kind":"import-statement","external":true},{"path":"@dxos/credentials","kind":"import-statement","external":true},{"path":"@dxos/echo-db","kind":"import-statement","external":true},{"path":"@dxos/invariant","kind":"import-statement","external":true},{"path":"@dxos/log","kind":"import-statement","external":true},{"path":"@dxos/protocols","kind":"import-statement","external":true},{"path":"@dxos/timeframe","kind":"import-statement","external":true},{"path":"@dxos/tracing","kind":"import-statement","external":true},{"path":"@dxos/util","kind":"import-statement","external":true},{"path":"@dxos/async","kind":"import-statement","external":true},{"path":"@dxos/invariant","kind":"import-statement","external":true},{"path":"@dxos/log","kind":"import-statement","external":true},{"path":"@dxos/protocols/proto/dxos/halo/credentials","kind":"import-statement","external":true},{"path":"@dxos/tracing","kind":"import-statement","external":true},{"path":"@dxos/util","kind":"import-statement","external":true},{"path":"@dxos/async","kind":"import-statement","external":true},{"path":"@dxos/context","kind":"import-statement","external":true},{"path":"@dxos/credentials","kind":"import-statement","external":true},{"path":"@dxos/keys","kind":"import-statement","external":true},{"path":"@dxos/log","kind":"import-statement","external":true},{"path":"@dxos/protocols/proto/dxos/halo/credentials","kind":"import-statement","external":true},{"path":"@dxos/timeframe","kind":"import-statement","external":true},{"path":"@dxos/tracing","kind":"import-statement","external":true},{"path":"@dxos/util","kind":"import-statement","external":true},{"path":"@dxos/crypto","kind":"import-statement","external":true},{"path":"@dxos/keys","kind":"import-statement","external":true},{"path":"@dxos/log","kind":"import-statement","external":true},{"path":"@dxos/network-manager","kind":"import-statement","external":true},{"path":"@dxos/teleport","kind":"import-statement","external":true},{"path":"@dxos/teleport-extension-object-sync","kind":"import-statement","external":true},{"path":"@dxos/teleport-extension-replicator","kind":"import-statement","external":true},{"path":"@dxos/util","kind":"import-statement","external":true},{"path":"@dxos/async","kind":"import-statement","external":true},{"path":"@dxos/debug","kind":"import-statement","external":true},{"path":"@dxos/keys","kind":"import-statement","external":true},{"path":"@dxos/log","kind":"import-statement","external":true},{"path":"@dxos/protocols","kind":"import-statement","external":true},{"path":"@dxos/util","kind":"import-statement","external":true}],"exports":["AuthExtension","AuthStatus","DataPipeline","DataServiceHost","DataServiceImpl","DataServiceSubscriptions","DatabaseHost","MOCK_AUTH_PROVIDER","MOCK_AUTH_VERIFIER","MetadataStore","Pipeline","SnapshotManager","SnapshotStore","Space","SpaceManager","SpaceProtocol","SpaceProtocolSession","TimeframeClock","codec","createMappedFeedWriter","mapFeedIndexesToTimeframe","mapTimeframeToFeedIndexes","startAfter","valueEncoding"],"inputs":{"packages/core/echo/echo-pipeline/src/common/codec.ts":{"bytesInOutput":211},"packages/core/echo/echo-pipeline/src/common/feeds.ts":{"bytesInOutput":548},"packages/core/echo/echo-pipeline/src/common/index.ts":{"bytesInOutput":0},"packages/core/echo/echo-pipeline/src/db-host/data-service-host.ts":{"bytesInOutput":6170},"packages/core/echo/echo-pipeline/src/db-host/database-host.ts":{"bytesInOutput":871},"packages/core/echo/echo-pipeline/src/db-host/snapshot-manager.ts":{"bytesInOutput":1298},"packages/core/echo/echo-pipeline/src/db-host/snapshot-store.ts":{"bytesInOutput":1292},"packages/core/echo/echo-pipeline/src/db-host/data-service.ts":{"bytesInOutput":2612},"packages/core/echo/echo-pipeline/src/db-host/index.ts":{"bytesInOutput":0},"packages/core/echo/echo-pipeline/src/metadata/metadata-store.ts":{"bytesInOutput":9432},"packages/core/echo/echo-pipeline/src/metadata/index.ts":{"bytesInOutput":0},"packages/core/echo/echo-pipeline/src/pipeline/timeframe-clock.ts":{"bytesInOutput":2919},"packages/core/echo/echo-pipeline/src/pipeline/pipeline.ts":{"bytesInOutput":12601},"packages/core/echo/echo-pipeline/src/pipeline/message-selector.ts":{"bytesInOutput":769},"packages/core/echo/echo-pipeline/src/pipeline/index.ts":{"bytesInOutput":0},"packages/core/echo/echo-pipeline/src/space/auth.ts":{"bytesInOutput":3001},"packages/core/echo/echo-pipeline/src/space/data-pipeline.ts":{"bytesInOutput":13115},"packages/core/echo/echo-pipeline/src/space/space.ts":{"bytesInOutput":7410},"packages/core/echo/echo-pipeline/src/space/control-pipeline.ts":{"bytesInOutput":8084},"packages/core/echo/echo-pipeline/src/space/space-protocol.ts":{"bytesInOutput":6613},"packages/core/echo/echo-pipeline/src/space/space-manager.ts":{"bytesInOutput":3440},"packages/core/echo/echo-pipeline/src/space/index.ts":{"bytesInOutput":0}},"bytes":82096}}}
|
|
1
|
+
{"inputs":{"packages/core/echo/echo-pipeline/src/common/codec.ts":{"bytes":1650,"imports":[{"path":"@dxos/hypercore","kind":"import-statement","external":true},{"path":"@dxos/protocols","kind":"import-statement","external":true}],"format":"esm"},"packages/core/echo/echo-pipeline/src/common/feeds.ts":{"bytes":2138,"imports":[{"path":"@dxos/invariant","kind":"import-statement","external":true}],"format":"esm"},"packages/core/echo/echo-pipeline/src/common/index.ts":{"bytes":553,"imports":[{"path":"packages/core/echo/echo-pipeline/src/common/codec.ts","kind":"import-statement","original":"./codec"},{"path":"packages/core/echo/echo-pipeline/src/common/feeds.ts","kind":"import-statement","original":"./feeds"}],"format":"esm"},"packages/core/echo/echo-pipeline/src/db-host/data-service-host.ts":{"bytes":25204,"imports":[{"path":"@dxos/async","kind":"import-statement","external":true},{"path":"@dxos/codec-protobuf","kind":"import-statement","external":true},{"path":"@dxos/context","kind":"import-statement","external":true},{"path":"@dxos/echo-db","kind":"import-statement","external":true},{"path":"@dxos/invariant","kind":"import-statement","external":true},{"path":"@dxos/log","kind":"import-statement","external":true},{"path":"@dxos/protocols/proto/dxos/echo/service","kind":"import-statement","external":true},{"path":"@dxos/util","kind":"import-statement","external":true}],"format":"esm"},"packages/core/echo/echo-pipeline/src/db-host/database-host.ts":{"bytes":5700,"imports":[{"path":"@dxos/echo-db","kind":"import-statement","external":true},{"path":"packages/core/echo/echo-pipeline/src/db-host/data-service-host.ts","kind":"import-statement","original":"./data-service-host"}],"format":"esm"},"packages/core/echo/echo-pipeline/src/db-host/snapshot-manager.ts":{"bytes":6328,"imports":[{"path":"@dxos/context","kind":"import-statement","external":true},{"path":"@dxos/keys","kind":"import-statement","external":true},{"path":"@dxos/protocols","kind":"import-statement","external":true},{"path":"@dxos/protocols/proto/dxos/echo/blob","kind":"import-statement","external":true}],"format":"esm"},"packages/core/echo/echo-pipeline/src/db-host/snapshot-store.ts":{"bytes":6063,"imports":[{"path":"@dxos/crypto","kind":"import-statement","external":true},{"path":"@dxos/protocols","kind":"import-statement","external":true}],"format":"esm"},"packages/core/echo/echo-pipeline/src/db-host/data-service.ts":{"bytes":9729,"imports":[{"path":"@dxos/debug","kind":"import-statement","external":true},{"path":"@dxos/invariant","kind":"import-statement","external":true},{"path":"@dxos/keys","kind":"import-statement","external":true},{"path":"@dxos/log","kind":"import-statement","external":true},{"path":"@dxos/util","kind":"import-statement","external":true}],"format":"esm"},"packages/core/echo/echo-pipeline/src/db-host/index.ts":{"bytes":920,"imports":[{"path":"packages/core/echo/echo-pipeline/src/db-host/data-service-host.ts","kind":"import-statement","original":"./data-service-host"},{"path":"packages/core/echo/echo-pipeline/src/db-host/database-host.ts","kind":"import-statement","original":"./database-host"},{"path":"packages/core/echo/echo-pipeline/src/db-host/snapshot-manager.ts","kind":"import-statement","original":"./snapshot-manager"},{"path":"packages/core/echo/echo-pipeline/src/db-host/snapshot-store.ts","kind":"import-statement","original":"./snapshot-store"},{"path":"packages/core/echo/echo-pipeline/src/db-host/data-service.ts","kind":"import-statement","original":"./data-service"}],"format":"esm"},"packages/core/echo/echo-pipeline/src/metadata/metadata-store.ts":{"bytes":33172,"imports":[{"path":"crc-32","kind":"import-statement","external":true},{"path":"@dxos/async","kind":"import-statement","external":true},{"path":"@dxos/invariant","kind":"import-statement","external":true},{"path":"@dxos/keys","kind":"import-statement","external":true},{"path":"@dxos/log","kind":"import-statement","external":true},{"path":"@dxos/protocols","kind":"import-statement","external":true},{"path":"@dxos/protocols/proto/dxos/client/services","kind":"import-statement","external":true},{"path":"@dxos/util","kind":"import-statement","external":true}],"format":"esm"},"packages/core/echo/echo-pipeline/src/metadata/index.ts":{"bytes":499,"imports":[{"path":"packages/core/echo/echo-pipeline/src/metadata/metadata-store.ts","kind":"import-statement","original":"./metadata-store"}],"format":"esm"},"packages/core/echo/echo-pipeline/src/pipeline/message-selector.ts":{"bytes":3785,"imports":[{"path":"@dxos/invariant","kind":"import-statement","external":true},{"path":"@dxos/log","kind":"import-statement","external":true}],"format":"esm"},"packages/core/echo/echo-pipeline/src/pipeline/timeframe-clock.ts":{"bytes":9610,"imports":[{"path":"@dxos/async","kind":"import-statement","external":true},{"path":"@dxos/debug","kind":"import-statement","external":true},{"path":"@dxos/log","kind":"import-statement","external":true},{"path":"@dxos/timeframe","kind":"import-statement","external":true}],"format":"esm"},"packages/core/echo/echo-pipeline/src/pipeline/pipeline.ts":{"bytes":46618,"imports":[{"path":"@dxos/async","kind":"import-statement","external":true},{"path":"@dxos/context","kind":"import-statement","external":true},{"path":"@dxos/debug","kind":"import-statement","external":true},{"path":"@dxos/feed-store","kind":"import-statement","external":true},{"path":"@dxos/invariant","kind":"import-statement","external":true},{"path":"@dxos/keys","kind":"import-statement","external":true},{"path":"@dxos/log","kind":"import-statement","external":true},{"path":"@dxos/timeframe","kind":"import-statement","external":true},{"path":"@dxos/util","kind":"import-statement","external":true},{"path":"packages/core/echo/echo-pipeline/src/pipeline/message-selector.ts","kind":"import-statement","original":"./message-selector"},{"path":"packages/core/echo/echo-pipeline/src/pipeline/timeframe-clock.ts","kind":"import-statement","original":"./timeframe-clock"},{"path":"packages/core/echo/echo-pipeline/src/common/index.ts","kind":"import-statement","original":"../common"}],"format":"esm"},"packages/core/echo/echo-pipeline/src/pipeline/index.ts":{"bytes":675,"imports":[{"path":"packages/core/echo/echo-pipeline/src/pipeline/pipeline.ts","kind":"import-statement","original":"./pipeline"},{"path":"packages/core/echo/echo-pipeline/src/pipeline/timeframe-clock.ts","kind":"import-statement","original":"./timeframe-clock"}],"format":"esm"},"packages/core/echo/echo-pipeline/src/space/auth.ts":{"bytes":10475,"imports":[{"path":"@dxos/async","kind":"import-statement","external":true},{"path":"@dxos/context","kind":"import-statement","external":true},{"path":"@dxos/crypto","kind":"import-statement","external":true},{"path":"@dxos/invariant","kind":"import-statement","external":true},{"path":"@dxos/log","kind":"import-statement","external":true},{"path":"@dxos/protocols","kind":"import-statement","external":true},{"path":"@dxos/teleport","kind":"import-statement","external":true}],"format":"esm"},"packages/core/echo/echo-pipeline/src/space/control-pipeline.ts":{"bytes":27877,"imports":[{"path":"@dxos/async","kind":"import-statement","external":true},{"path":"@dxos/context","kind":"import-statement","external":true},{"path":"@dxos/credentials","kind":"import-statement","external":true},{"path":"@dxos/keys","kind":"import-statement","external":true},{"path":"@dxos/log","kind":"import-statement","external":true},{"path":"@dxos/protocols/proto/dxos/halo/credentials","kind":"import-statement","external":true},{"path":"@dxos/timeframe","kind":"import-statement","external":true},{"path":"@dxos/tracing","kind":"import-statement","external":true},{"path":"@dxos/util","kind":"import-statement","external":true},{"path":"packages/core/echo/echo-pipeline/src/pipeline/index.ts","kind":"import-statement","original":"../pipeline"}],"format":"esm"},"packages/core/echo/echo-pipeline/src/space/data-pipeline.ts":{"bytes":50704,"imports":[{"path":"@dxos/async","kind":"import-statement","external":true},{"path":"@dxos/context","kind":"import-statement","external":true},{"path":"@dxos/credentials","kind":"import-statement","external":true},{"path":"@dxos/echo-db","kind":"import-statement","external":true},{"path":"@dxos/invariant","kind":"import-statement","external":true},{"path":"@dxos/log","kind":"import-statement","external":true},{"path":"@dxos/protocols","kind":"import-statement","external":true},{"path":"@dxos/timeframe","kind":"import-statement","external":true},{"path":"@dxos/tracing","kind":"import-statement","external":true},{"path":"@dxos/util","kind":"import-statement","external":true},{"path":"packages/core/echo/echo-pipeline/src/db-host/index.ts","kind":"import-statement","original":"../db-host"},{"path":"packages/core/echo/echo-pipeline/src/pipeline/index.ts","kind":"import-statement","original":"../pipeline"}],"format":"esm"},"packages/core/echo/echo-pipeline/src/space/space.ts":{"bytes":27247,"imports":[{"path":"@dxos/async","kind":"import-statement","external":true},{"path":"@dxos/invariant","kind":"import-statement","external":true},{"path":"@dxos/log","kind":"import-statement","external":true},{"path":"@dxos/protocols/proto/dxos/halo/credentials","kind":"import-statement","external":true},{"path":"@dxos/tracing","kind":"import-statement","external":true},{"path":"@dxos/util","kind":"import-statement","external":true},{"path":"packages/core/echo/echo-pipeline/src/space/control-pipeline.ts","kind":"import-statement","original":"./control-pipeline"},{"path":"packages/core/echo/echo-pipeline/src/space/data-pipeline.ts","kind":"import-statement","original":"./data-pipeline"}],"format":"esm"},"packages/core/echo/echo-pipeline/src/space/space-protocol.ts":{"bytes":25843,"imports":[{"path":"@dxos/crypto","kind":"import-statement","external":true},{"path":"@dxos/keys","kind":"import-statement","external":true},{"path":"@dxos/log","kind":"import-statement","external":true},{"path":"@dxos/network-manager","kind":"import-statement","external":true},{"path":"@dxos/teleport","kind":"import-statement","external":true},{"path":"@dxos/teleport-extension-object-sync","kind":"import-statement","external":true},{"path":"@dxos/teleport-extension-replicator","kind":"import-statement","external":true},{"path":"@dxos/util","kind":"import-statement","external":true},{"path":"packages/core/echo/echo-pipeline/src/space/auth.ts","kind":"import-statement","original":"./auth"}],"format":"esm"},"packages/core/echo/echo-pipeline/src/space/space-manager.ts":{"bytes":13247,"imports":[{"path":"@dxos/async","kind":"import-statement","external":true},{"path":"@dxos/debug","kind":"import-statement","external":true},{"path":"@dxos/keys","kind":"import-statement","external":true},{"path":"@dxos/log","kind":"import-statement","external":true},{"path":"@dxos/protocols","kind":"import-statement","external":true},{"path":"@dxos/util","kind":"import-statement","external":true},{"path":"packages/core/echo/echo-pipeline/src/space/space.ts","kind":"import-statement","original":"./space"},{"path":"packages/core/echo/echo-pipeline/src/space/space-protocol.ts","kind":"import-statement","original":"./space-protocol"},{"path":"packages/core/echo/echo-pipeline/src/db-host/index.ts","kind":"import-statement","original":"../db-host"}],"format":"esm"},"packages/core/echo/echo-pipeline/src/space/index.ts":{"bytes":859,"imports":[{"path":"packages/core/echo/echo-pipeline/src/space/auth.ts","kind":"import-statement","original":"./auth"},{"path":"packages/core/echo/echo-pipeline/src/space/space.ts","kind":"import-statement","original":"./space"},{"path":"packages/core/echo/echo-pipeline/src/space/space-manager.ts","kind":"import-statement","original":"./space-manager"},{"path":"packages/core/echo/echo-pipeline/src/space/space-protocol.ts","kind":"import-statement","original":"./space-protocol"},{"path":"packages/core/echo/echo-pipeline/src/space/data-pipeline.ts","kind":"import-statement","original":"./data-pipeline"}],"format":"esm"},"packages/core/echo/echo-pipeline/src/index.ts":{"bytes":810,"imports":[{"path":"packages/core/echo/echo-pipeline/src/common/index.ts","kind":"import-statement","original":"./common"},{"path":"packages/core/echo/echo-pipeline/src/db-host/index.ts","kind":"import-statement","original":"./db-host"},{"path":"packages/core/echo/echo-pipeline/src/metadata/index.ts","kind":"import-statement","original":"./metadata"},{"path":"packages/core/echo/echo-pipeline/src/pipeline/index.ts","kind":"import-statement","original":"./pipeline"},{"path":"packages/core/echo/echo-pipeline/src/space/index.ts","kind":"import-statement","original":"./space"}],"format":"esm"},"packages/core/echo/echo-pipeline/src/testing/test-feed-builder.ts":{"bytes":1474,"imports":[{"path":"@dxos/feed-store/testing","kind":"import-statement","external":true},{"path":"packages/core/echo/echo-pipeline/src/common/index.ts","kind":"import-statement","original":"../common"}],"format":"esm"},"packages/core/echo/echo-pipeline/src/testing/test-agent-builder.ts":{"bytes":29146,"imports":[{"path":"@dxos/context","kind":"import-statement","external":true},{"path":"@dxos/credentials","kind":"import-statement","external":true},{"path":"@dxos/document-model","kind":"import-statement","external":true},{"path":"@dxos/keys","kind":"import-statement","external":true},{"path":"@dxos/messaging","kind":"import-statement","external":true},{"path":"@dxos/model-factory","kind":"import-statement","external":true},{"path":"@dxos/network-manager","kind":"import-statement","external":true},{"path":"@dxos/protocols/proto/dxos/halo/credentials","kind":"import-statement","external":true},{"path":"@dxos/random-access-storage","kind":"import-statement","external":true},{"path":"@dxos/teleport-extension-gossip","kind":"import-statement","external":true},{"path":"@dxos/teleport-extension-object-sync","kind":"import-statement","external":true},{"path":"@dxos/util","kind":"import-statement","external":true},{"path":"packages/core/echo/echo-pipeline/src/testing/test-feed-builder.ts","kind":"import-statement","original":"./test-feed-builder"},{"path":"packages/core/echo/echo-pipeline/src/db-host/index.ts","kind":"import-statement","original":"../db-host"},{"path":"packages/core/echo/echo-pipeline/src/metadata/index.ts","kind":"import-statement","original":"../metadata"},{"path":"packages/core/echo/echo-pipeline/src/space/index.ts","kind":"import-statement","original":"../space"}],"format":"esm"},"packages/core/echo/echo-pipeline/src/testing/util.ts":{"bytes":9005,"imports":[{"path":"@dxos/async","kind":"import-statement","external":true},{"path":"@dxos/document-model","kind":"import-statement","external":true},{"path":"@dxos/echo-db","kind":"import-statement","external":true},{"path":"@dxos/feed-store/testing","kind":"import-statement","external":true},{"path":"@dxos/keys","kind":"import-statement","external":true},{"path":"@dxos/model-factory","kind":"import-statement","external":true},{"path":"@dxos/timeframe","kind":"import-statement","external":true},{"path":"packages/core/echo/echo-pipeline/src/db-host/index.ts","kind":"import-statement","original":"../db-host"}],"format":"esm"},"packages/core/echo/echo-pipeline/src/testing/database-test-rig.ts":{"bytes":30647,"imports":[{"path":"@dxos/async","kind":"import-statement","external":true},{"path":"@dxos/document-model","kind":"import-statement","external":true},{"path":"@dxos/echo-db","kind":"import-statement","external":true},{"path":"@dxos/invariant","kind":"import-statement","external":true},{"path":"@dxos/keys","kind":"import-statement","external":true},{"path":"@dxos/model-factory","kind":"import-statement","external":true},{"path":"@dxos/protocols","kind":"import-statement","external":true},{"path":"@dxos/text-model","kind":"import-statement","external":true},{"path":"@dxos/timeframe","kind":"import-statement","external":true},{"path":"@dxos/util","kind":"import-statement","external":true},{"path":"packages/core/echo/echo-pipeline/src/db-host/index.ts","kind":"import-statement","original":"../db-host"}],"format":"esm"},"packages/core/echo/echo-pipeline/src/testing/index.ts":{"bytes":808,"imports":[{"path":"packages/core/echo/echo-pipeline/src/testing/test-agent-builder.ts","kind":"import-statement","original":"./test-agent-builder"},{"path":"packages/core/echo/echo-pipeline/src/testing/test-feed-builder.ts","kind":"import-statement","original":"./test-feed-builder"},{"path":"packages/core/echo/echo-pipeline/src/testing/util.ts","kind":"import-statement","original":"./util"},{"path":"packages/core/echo/echo-pipeline/src/testing/database-test-rig.ts","kind":"import-statement","original":"./database-test-rig"}],"format":"esm"}},"outputs":{"packages/core/echo/echo-pipeline/dist/lib/node/index.cjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":93},"packages/core/echo/echo-pipeline/dist/lib/node/index.cjs":{"imports":[{"path":"packages/core/echo/echo-pipeline/dist/lib/node/chunk-YJAADRTG.cjs","kind":"import-statement"}],"exports":["AuthExtension","AuthStatus","DataPipeline","DataServiceHost","DataServiceImpl","DataServiceSubscriptions","DatabaseHost","MOCK_AUTH_PROVIDER","MOCK_AUTH_VERIFIER","MetadataStore","Pipeline","SnapshotManager","SnapshotStore","Space","SpaceManager","SpaceProtocol","SpaceProtocolSession","TimeframeClock","codec","createMappedFeedWriter","mapFeedIndexesToTimeframe","mapTimeframeToFeedIndexes","startAfter","valueEncoding"],"entryPoint":"packages/core/echo/echo-pipeline/src/index.ts","inputs":{"packages/core/echo/echo-pipeline/src/index.ts":{"bytesInOutput":0}},"bytes":977},"packages/core/echo/echo-pipeline/dist/lib/node/testing/index.cjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":35476},"packages/core/echo/echo-pipeline/dist/lib/node/testing/index.cjs":{"imports":[{"path":"packages/core/echo/echo-pipeline/dist/lib/node/chunk-YJAADRTG.cjs","kind":"import-statement"},{"path":"@dxos/context","kind":"import-statement","external":true},{"path":"@dxos/credentials","kind":"import-statement","external":true},{"path":"@dxos/document-model","kind":"import-statement","external":true},{"path":"@dxos/keys","kind":"import-statement","external":true},{"path":"@dxos/messaging","kind":"import-statement","external":true},{"path":"@dxos/model-factory","kind":"import-statement","external":true},{"path":"@dxos/network-manager","kind":"import-statement","external":true},{"path":"@dxos/protocols/proto/dxos/halo/credentials","kind":"import-statement","external":true},{"path":"@dxos/random-access-storage","kind":"import-statement","external":true},{"path":"@dxos/teleport-extension-gossip","kind":"import-statement","external":true},{"path":"@dxos/teleport-extension-object-sync","kind":"import-statement","external":true},{"path":"@dxos/util","kind":"import-statement","external":true},{"path":"@dxos/feed-store/testing","kind":"import-statement","external":true},{"path":"@dxos/async","kind":"import-statement","external":true},{"path":"@dxos/document-model","kind":"import-statement","external":true},{"path":"@dxos/echo-db","kind":"import-statement","external":true},{"path":"@dxos/feed-store/testing","kind":"import-statement","external":true},{"path":"@dxos/keys","kind":"import-statement","external":true},{"path":"@dxos/model-factory","kind":"import-statement","external":true},{"path":"@dxos/timeframe","kind":"import-statement","external":true},{"path":"@dxos/async","kind":"import-statement","external":true},{"path":"@dxos/document-model","kind":"import-statement","external":true},{"path":"@dxos/echo-db","kind":"import-statement","external":true},{"path":"@dxos/invariant","kind":"import-statement","external":true},{"path":"@dxos/keys","kind":"import-statement","external":true},{"path":"@dxos/model-factory","kind":"import-statement","external":true},{"path":"@dxos/protocols","kind":"import-statement","external":true},{"path":"@dxos/text-model","kind":"import-statement","external":true},{"path":"@dxos/timeframe","kind":"import-statement","external":true},{"path":"@dxos/util","kind":"import-statement","external":true}],"exports":["DatabaseTestBuilder","DatabaseTestPeer","MemoryNetworkManagerProvider","TestAgent","TestAgentBuilder","TestFeedBuilder","WebsocketNetworkManagerProvider","createMemoryDatabase","createRemoteDatabaseFromDataServiceHost","testLocalDatabase"],"entryPoint":"packages/core/echo/echo-pipeline/src/testing/index.ts","inputs":{"packages/core/echo/echo-pipeline/src/testing/test-agent-builder.ts":{"bytesInOutput":6533},"packages/core/echo/echo-pipeline/src/testing/test-feed-builder.ts":{"bytesInOutput":171},"packages/core/echo/echo-pipeline/src/testing/index.ts":{"bytesInOutput":0},"packages/core/echo/echo-pipeline/src/testing/util.ts":{"bytesInOutput":2091},"packages/core/echo/echo-pipeline/src/testing/database-test-rig.ts":{"bytesInOutput":7622}},"bytes":17283},"packages/core/echo/echo-pipeline/dist/lib/node/chunk-YJAADRTG.cjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":144584},"packages/core/echo/echo-pipeline/dist/lib/node/chunk-YJAADRTG.cjs":{"imports":[{"path":"@dxos/hypercore","kind":"import-statement","external":true},{"path":"@dxos/protocols","kind":"import-statement","external":true},{"path":"@dxos/invariant","kind":"import-statement","external":true},{"path":"@dxos/async","kind":"import-statement","external":true},{"path":"@dxos/codec-protobuf","kind":"import-statement","external":true},{"path":"@dxos/context","kind":"import-statement","external":true},{"path":"@dxos/echo-db","kind":"import-statement","external":true},{"path":"@dxos/invariant","kind":"import-statement","external":true},{"path":"@dxos/log","kind":"import-statement","external":true},{"path":"@dxos/protocols/proto/dxos/echo/service","kind":"import-statement","external":true},{"path":"@dxos/util","kind":"import-statement","external":true},{"path":"@dxos/echo-db","kind":"import-statement","external":true},{"path":"@dxos/context","kind":"import-statement","external":true},{"path":"@dxos/keys","kind":"import-statement","external":true},{"path":"@dxos/protocols","kind":"import-statement","external":true},{"path":"@dxos/protocols/proto/dxos/echo/blob","kind":"import-statement","external":true},{"path":"@dxos/crypto","kind":"import-statement","external":true},{"path":"@dxos/protocols","kind":"import-statement","external":true},{"path":"@dxos/debug","kind":"import-statement","external":true},{"path":"@dxos/invariant","kind":"import-statement","external":true},{"path":"@dxos/keys","kind":"import-statement","external":true},{"path":"@dxos/log","kind":"import-statement","external":true},{"path":"@dxos/util","kind":"import-statement","external":true},{"path":"crc-32","kind":"import-statement","external":true},{"path":"@dxos/async","kind":"import-statement","external":true},{"path":"@dxos/invariant","kind":"import-statement","external":true},{"path":"@dxos/keys","kind":"import-statement","external":true},{"path":"@dxos/log","kind":"import-statement","external":true},{"path":"@dxos/protocols","kind":"import-statement","external":true},{"path":"@dxos/protocols/proto/dxos/client/services","kind":"import-statement","external":true},{"path":"@dxos/util","kind":"import-statement","external":true},{"path":"@dxos/async","kind":"import-statement","external":true},{"path":"@dxos/debug","kind":"import-statement","external":true},{"path":"@dxos/log","kind":"import-statement","external":true},{"path":"@dxos/timeframe","kind":"import-statement","external":true},{"path":"@dxos/async","kind":"import-statement","external":true},{"path":"@dxos/context","kind":"import-statement","external":true},{"path":"@dxos/debug","kind":"import-statement","external":true},{"path":"@dxos/feed-store","kind":"import-statement","external":true},{"path":"@dxos/invariant","kind":"import-statement","external":true},{"path":"@dxos/keys","kind":"import-statement","external":true},{"path":"@dxos/log","kind":"import-statement","external":true},{"path":"@dxos/timeframe","kind":"import-statement","external":true},{"path":"@dxos/util","kind":"import-statement","external":true},{"path":"@dxos/invariant","kind":"import-statement","external":true},{"path":"@dxos/log","kind":"import-statement","external":true},{"path":"@dxos/async","kind":"import-statement","external":true},{"path":"@dxos/context","kind":"import-statement","external":true},{"path":"@dxos/crypto","kind":"import-statement","external":true},{"path":"@dxos/invariant","kind":"import-statement","external":true},{"path":"@dxos/log","kind":"import-statement","external":true},{"path":"@dxos/protocols","kind":"import-statement","external":true},{"path":"@dxos/teleport","kind":"import-statement","external":true},{"path":"@dxos/async","kind":"import-statement","external":true},{"path":"@dxos/context","kind":"import-statement","external":true},{"path":"@dxos/credentials","kind":"import-statement","external":true},{"path":"@dxos/echo-db","kind":"import-statement","external":true},{"path":"@dxos/invariant","kind":"import-statement","external":true},{"path":"@dxos/log","kind":"import-statement","external":true},{"path":"@dxos/protocols","kind":"import-statement","external":true},{"path":"@dxos/timeframe","kind":"import-statement","external":true},{"path":"@dxos/tracing","kind":"import-statement","external":true},{"path":"@dxos/util","kind":"import-statement","external":true},{"path":"@dxos/async","kind":"import-statement","external":true},{"path":"@dxos/invariant","kind":"import-statement","external":true},{"path":"@dxos/log","kind":"import-statement","external":true},{"path":"@dxos/protocols/proto/dxos/halo/credentials","kind":"import-statement","external":true},{"path":"@dxos/tracing","kind":"import-statement","external":true},{"path":"@dxos/util","kind":"import-statement","external":true},{"path":"@dxos/async","kind":"import-statement","external":true},{"path":"@dxos/context","kind":"import-statement","external":true},{"path":"@dxos/credentials","kind":"import-statement","external":true},{"path":"@dxos/keys","kind":"import-statement","external":true},{"path":"@dxos/log","kind":"import-statement","external":true},{"path":"@dxos/protocols/proto/dxos/halo/credentials","kind":"import-statement","external":true},{"path":"@dxos/timeframe","kind":"import-statement","external":true},{"path":"@dxos/tracing","kind":"import-statement","external":true},{"path":"@dxos/util","kind":"import-statement","external":true},{"path":"@dxos/crypto","kind":"import-statement","external":true},{"path":"@dxos/keys","kind":"import-statement","external":true},{"path":"@dxos/log","kind":"import-statement","external":true},{"path":"@dxos/network-manager","kind":"import-statement","external":true},{"path":"@dxos/teleport","kind":"import-statement","external":true},{"path":"@dxos/teleport-extension-object-sync","kind":"import-statement","external":true},{"path":"@dxos/teleport-extension-replicator","kind":"import-statement","external":true},{"path":"@dxos/util","kind":"import-statement","external":true},{"path":"@dxos/async","kind":"import-statement","external":true},{"path":"@dxos/debug","kind":"import-statement","external":true},{"path":"@dxos/keys","kind":"import-statement","external":true},{"path":"@dxos/log","kind":"import-statement","external":true},{"path":"@dxos/protocols","kind":"import-statement","external":true},{"path":"@dxos/util","kind":"import-statement","external":true}],"exports":["AuthExtension","AuthStatus","DataPipeline","DataServiceHost","DataServiceImpl","DataServiceSubscriptions","DatabaseHost","MOCK_AUTH_PROVIDER","MOCK_AUTH_VERIFIER","MetadataStore","Pipeline","SnapshotManager","SnapshotStore","Space","SpaceManager","SpaceProtocol","SpaceProtocolSession","TimeframeClock","codec","createMappedFeedWriter","mapFeedIndexesToTimeframe","mapTimeframeToFeedIndexes","startAfter","valueEncoding"],"inputs":{"packages/core/echo/echo-pipeline/src/common/codec.ts":{"bytesInOutput":211},"packages/core/echo/echo-pipeline/src/common/feeds.ts":{"bytesInOutput":548},"packages/core/echo/echo-pipeline/src/common/index.ts":{"bytesInOutput":0},"packages/core/echo/echo-pipeline/src/db-host/data-service-host.ts":{"bytesInOutput":6325},"packages/core/echo/echo-pipeline/src/db-host/database-host.ts":{"bytesInOutput":871},"packages/core/echo/echo-pipeline/src/db-host/snapshot-manager.ts":{"bytesInOutput":1298},"packages/core/echo/echo-pipeline/src/db-host/snapshot-store.ts":{"bytesInOutput":1292},"packages/core/echo/echo-pipeline/src/db-host/data-service.ts":{"bytesInOutput":2767},"packages/core/echo/echo-pipeline/src/db-host/index.ts":{"bytesInOutput":0},"packages/core/echo/echo-pipeline/src/metadata/metadata-store.ts":{"bytesInOutput":9432},"packages/core/echo/echo-pipeline/src/metadata/index.ts":{"bytesInOutput":0},"packages/core/echo/echo-pipeline/src/pipeline/timeframe-clock.ts":{"bytesInOutput":2919},"packages/core/echo/echo-pipeline/src/pipeline/pipeline.ts":{"bytesInOutput":12601},"packages/core/echo/echo-pipeline/src/pipeline/message-selector.ts":{"bytesInOutput":769},"packages/core/echo/echo-pipeline/src/pipeline/index.ts":{"bytesInOutput":0},"packages/core/echo/echo-pipeline/src/space/auth.ts":{"bytesInOutput":3001},"packages/core/echo/echo-pipeline/src/space/data-pipeline.ts":{"bytesInOutput":13724},"packages/core/echo/echo-pipeline/src/space/space.ts":{"bytesInOutput":7410},"packages/core/echo/echo-pipeline/src/space/control-pipeline.ts":{"bytesInOutput":8084},"packages/core/echo/echo-pipeline/src/space/space-protocol.ts":{"bytesInOutput":6613},"packages/core/echo/echo-pipeline/src/space/space-manager.ts":{"bytesInOutput":3440},"packages/core/echo/echo-pipeline/src/space/index.ts":{"bytesInOutput":0}},"bytes":83015}}}
|
|
@@ -30,7 +30,7 @@ __export(testing_exports, {
|
|
|
30
30
|
testLocalDatabase: () => testLocalDatabase
|
|
31
31
|
});
|
|
32
32
|
module.exports = __toCommonJS(testing_exports);
|
|
33
|
-
var
|
|
33
|
+
var import_chunk_YJAADRTG = require("../chunk-YJAADRTG.cjs");
|
|
34
34
|
var import_context = require("@dxos/context");
|
|
35
35
|
var import_credentials = require("@dxos/credentials");
|
|
36
36
|
var import_document_model = require("@dxos/document-model");
|
|
@@ -64,7 +64,7 @@ var import_util2 = require("@dxos/util");
|
|
|
64
64
|
var TestFeedBuilder = class extends import_testing.TestBuilder {
|
|
65
65
|
constructor() {
|
|
66
66
|
super({
|
|
67
|
-
valueEncoding:
|
|
67
|
+
valueEncoding: import_chunk_YJAADRTG.valueEncoding
|
|
68
68
|
});
|
|
69
69
|
}
|
|
70
70
|
};
|
|
@@ -108,10 +108,10 @@ var TestAgentBuilder = class {
|
|
|
108
108
|
};
|
|
109
109
|
var TestAgent = class {
|
|
110
110
|
get metadataStore() {
|
|
111
|
-
return this._metadataStore ??= new
|
|
111
|
+
return this._metadataStore ??= new import_chunk_YJAADRTG.MetadataStore(this.storage.createDirectory("metadata"));
|
|
112
112
|
}
|
|
113
113
|
get snapshotStore() {
|
|
114
|
-
return this._snapshotStore ??= new
|
|
114
|
+
return this._snapshotStore ??= new import_chunk_YJAADRTG.SnapshotStore(this.storage.createDirectory("snapshots"));
|
|
115
115
|
}
|
|
116
116
|
get blobStore() {
|
|
117
117
|
return this._blobStore ??= new import_teleport_extension_object_sync.BlobStore(this.storage.createDirectory("blobs"));
|
|
@@ -139,7 +139,7 @@ var TestAgent = class {
|
|
|
139
139
|
return this._spaces.get(spaceKey);
|
|
140
140
|
}
|
|
141
141
|
get spaceManager() {
|
|
142
|
-
return this._spaceManager ??= new
|
|
142
|
+
return this._spaceManager ??= new import_chunk_YJAADRTG.SpaceManager({
|
|
143
143
|
feedStore: this.feedStore,
|
|
144
144
|
networkManager: this._networkManagerProvider(),
|
|
145
145
|
modelFactory: this.modelFactory,
|
|
@@ -177,8 +177,8 @@ var TestAgent = class {
|
|
|
177
177
|
metadata,
|
|
178
178
|
swarmIdentity: {
|
|
179
179
|
peerKey: this.deviceKey,
|
|
180
|
-
credentialProvider:
|
|
181
|
-
credentialAuthenticator:
|
|
180
|
+
credentialProvider: import_chunk_YJAADRTG.MOCK_AUTH_PROVIDER,
|
|
181
|
+
credentialAuthenticator: import_chunk_YJAADRTG.MOCK_AUTH_VERIFIER
|
|
182
182
|
},
|
|
183
183
|
memberKey: identityKey,
|
|
184
184
|
onNetworkConnection: (session) => {
|
|
@@ -194,12 +194,12 @@ var TestAgent = class {
|
|
|
194
194
|
return space;
|
|
195
195
|
}
|
|
196
196
|
createSpaceProtocol(topic, gossip) {
|
|
197
|
-
return new
|
|
197
|
+
return new import_chunk_YJAADRTG.SpaceProtocol({
|
|
198
198
|
topic,
|
|
199
199
|
swarmIdentity: {
|
|
200
200
|
peerKey: this.deviceKey,
|
|
201
|
-
credentialProvider:
|
|
202
|
-
credentialAuthenticator:
|
|
201
|
+
credentialProvider: import_chunk_YJAADRTG.MOCK_AUTH_PROVIDER,
|
|
202
|
+
credentialAuthenticator: import_chunk_YJAADRTG.MOCK_AUTH_VERIFIER
|
|
203
203
|
},
|
|
204
204
|
networkManager: this._networkManagerProvider(),
|
|
205
205
|
blobStore: this.blobStore,
|
|
@@ -241,7 +241,7 @@ var TestAgent = class {
|
|
|
241
241
|
};
|
|
242
242
|
var createMemoryDatabase = async (modelFactory) => {
|
|
243
243
|
const feed = new import_testing2.MockFeedWriter();
|
|
244
|
-
const backend = new
|
|
244
|
+
const backend = new import_chunk_YJAADRTG.DatabaseHost(feed, async () => {
|
|
245
245
|
});
|
|
246
246
|
feed.written.on(([data, meta]) => backend.echoProcessor({
|
|
247
247
|
batch: data.batch,
|
|
@@ -264,8 +264,8 @@ var createMemoryDatabase = async (modelFactory) => {
|
|
|
264
264
|
};
|
|
265
265
|
};
|
|
266
266
|
var createRemoteDatabaseFromDataServiceHost = async (modelFactory, dataServiceHost) => {
|
|
267
|
-
const dataServiceSubscriptions = new
|
|
268
|
-
const dataService = new
|
|
267
|
+
const dataServiceSubscriptions = new import_chunk_YJAADRTG.DataServiceSubscriptions();
|
|
268
|
+
const dataService = new import_chunk_YJAADRTG.DataServiceImpl(dataServiceSubscriptions);
|
|
269
269
|
const spaceKey = import_keys2.PublicKey.random();
|
|
270
270
|
await dataServiceSubscriptions.registerSpace(spaceKey, dataServiceHost);
|
|
271
271
|
const itemManager = new import_echo_db.ItemManager(modelFactory);
|
|
@@ -324,7 +324,7 @@ var DatabaseTestPeer = class {
|
|
|
324
324
|
}
|
|
325
325
|
async open() {
|
|
326
326
|
this.hostItems = new import_echo_db2.ItemManager(this.modelFactory);
|
|
327
|
-
this.host = new
|
|
327
|
+
this.host = new import_chunk_YJAADRTG.DatabaseHost({
|
|
328
328
|
write: async (message, { afterWrite }) => {
|
|
329
329
|
const seq = this.feedMessages.push({
|
|
330
330
|
timeframe: this.timeframe,
|
|
@@ -2,7 +2,7 @@ import { Stream } from '@dxos/codec-protobuf';
|
|
|
2
2
|
import { type ItemDemuxer, type ItemManager } from '@dxos/echo-db';
|
|
3
3
|
import { type FeedWriter } from '@dxos/feed-store';
|
|
4
4
|
import { type DataMessage } from '@dxos/protocols/proto/dxos/echo/feed';
|
|
5
|
-
import { EchoEvent, type MutationReceipt, type WriteRequest } from '@dxos/protocols/proto/dxos/echo/service';
|
|
5
|
+
import { EchoEvent, type SyncRepoRequest, type MutationReceipt, type WriteRequest, type SyncRepoResponse } from '@dxos/protocols/proto/dxos/echo/service';
|
|
6
6
|
export type DataServiceHostOptions = {
|
|
7
7
|
/**
|
|
8
8
|
* @default true
|
|
@@ -31,5 +31,7 @@ export declare class DataServiceHost {
|
|
|
31
31
|
subscribe(): Stream<EchoEvent>;
|
|
32
32
|
write(request: WriteRequest): Promise<MutationReceipt>;
|
|
33
33
|
flush(): Promise<void>;
|
|
34
|
+
syncRepo(request: SyncRepoRequest): Stream<SyncRepoResponse>;
|
|
35
|
+
sendSyncMessage(request: SyncRepoRequest): Promise<void>;
|
|
34
36
|
}
|
|
35
37
|
//# sourceMappingURL=data-service-host.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"data-service-host.d.ts","sourceRoot":"","sources":["../../../../src/db-host/data-service-host.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,MAAM,EAAE,MAAM,sBAAsB,CAAC;AAE9C,OAAO,EAAuB,KAAK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AI;IAEJ,KAAK;IAIX,OAAO,KAAK,YAAY,GAEvB;IAED;;OAEG;IACH,SAAS,IAAI,MAAM,CAAC,SAAS,CAAC;IAmHxB,KAAK,CAAC,OAAO,EAAE,YAAY,GAAG,OAAO,CAAC,eAAe,CAAC;IAsBtD,KAAK,IAAI,OAAO,CAAC,IAAI,CAAC;IAI5B,QAAQ,CAAC,OAAO,EAAE,eAAe,GAAG,MAAM,CAAC,gBAAgB,CAAC;IAI5D,eAAe,CAAC,OAAO,EAAE,eAAe,GAAG,OAAO,CAAC,IAAI,CAAC;CAGzD"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { type Stream } from '@dxos/codec-protobuf';
|
|
2
2
|
import { PublicKey } from '@dxos/keys';
|
|
3
|
-
import { type DataService, type MutationReceipt, type SubscribeRequest, type EchoEvent, type WriteRequest, type FlushRequest } from '@dxos/protocols/proto/dxos/echo/service';
|
|
3
|
+
import { type DataService, type MutationReceipt, type SubscribeRequest, type EchoEvent, type WriteRequest, type FlushRequest, type SyncRepoRequest, type SyncRepoResponse } from '@dxos/protocols/proto/dxos/echo/service';
|
|
4
4
|
import { type DataServiceHost } from './data-service-host';
|
|
5
5
|
export declare class DataServiceSubscriptions {
|
|
6
6
|
private readonly _spaces;
|
|
@@ -18,5 +18,7 @@ export declare class DataServiceImpl implements DataService {
|
|
|
18
18
|
subscribe(request: SubscribeRequest): Stream<EchoEvent>;
|
|
19
19
|
write(request: WriteRequest): Promise<MutationReceipt>;
|
|
20
20
|
flush(request: FlushRequest): Promise<void>;
|
|
21
|
+
syncRepo(request: SyncRepoRequest): Stream<SyncRepoResponse>;
|
|
22
|
+
sendSyncMessage(request: SyncRepoRequest): Promise<void>;
|
|
21
23
|
}
|
|
22
24
|
//# sourceMappingURL=data-service.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"data-service.d.ts","sourceRoot":"","sources":["../../../../src/db-host/data-service.ts"],"names":[],"mappings":"AAIA,OAAO,E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AAC,CAAwB;IAEjD,OAAO,CAAC,+BAA+B,CAAmB;IAC1D,OAAO,CAAC,OAAO,CAAS;IAExB,OAAO,CAAC,sBAAsB,CAAK;IACnC,OAAO,CAAC,qBAAqB,CAAK;IAClC,OAAO,CAAC,mBAAmB,CAAM;IACjC,OAAO,CAAC,SAAS,CAAC,CAAU;IAG5B,OAAO,CAAC,MAAM,CAA0B;IAGxC,OAAO,CAAC,UAAU,CAA2B;IAEtC,YAAY,CAAC,EAAE,YAAY,CAAC;IAE5B,WAAW,EAAG,WAAW,CAAC;IAEjC;;OAEG;IACI,YAAY,CAAC,EAAE,kBAAkB,CAAC,KAAK,CAAC,CAAa;IAE5D;;OAEG;IACI,YAAY,CAAC,EAAE,kBAAkB,CAAC,KAAK,CAAC,CAAa;IAE5D,SAAgB,UAAU,oBAA2B;gBAExB,OAAO,EAAE,kBAAkB;IAExD,IAAI,MAAM,YAET;IAED,IAAI,QAAQ,yBAEX;IAED,IAAI,aAAa,6DAEhB;IAED,kBAAkB,CAAC,SAAS,EAAE,SAAS;IAKjC,iBAAiB,CAAC,UAAU,EAAE,UAAU;IAaxC,IAAI;IAuCJ,KAAK;YAiCG,gBAAgB;IA8D9B,OAAO,CAAC,eAAe;YAST,oBAAoB;YAMpB,UAAU;YAsBV,wBAAwB;YAqBxB,2BAA2B;YA4B3B,aAAa;IAiBrB,kBAAkB,CAAC,SAAS,EAAE,SAAS;IAMvC,WAAW,IAAI,OAAO,CAAC,KAAK,CAAC;IAqB7B,sBAAsB;YAId,MAAM;CAYrB"}
|
package/package.json
CHANGED
|
@@ -1,17 +1,33 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dxos/echo-pipeline",
|
|
3
|
-
"version": "0.3.8-main.
|
|
3
|
+
"version": "0.3.8-main.1b6c849",
|
|
4
4
|
"description": "ECHO database.",
|
|
5
5
|
"homepage": "https://dxos.org",
|
|
6
6
|
"bugs": "https://github.com/dxos/dxos/issues",
|
|
7
7
|
"license": "MIT",
|
|
8
8
|
"author": "info@dxos.org",
|
|
9
|
-
"
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
9
|
+
"exports": {
|
|
10
|
+
".": {
|
|
11
|
+
"browser": "./dist/lib/browser/index.mjs",
|
|
12
|
+
"import": "./dist/lib/browser/index.mjs",
|
|
13
|
+
"require": "./dist/lib/node/index.cjs",
|
|
14
|
+
"node": "./dist/lib/node/index.cjs"
|
|
15
|
+
},
|
|
16
|
+
"./testing": {
|
|
17
|
+
"browser": "./dist/lib/browser/testing/index.mjs",
|
|
18
|
+
"import": "./dist/lib/browser/testing/index.mjs",
|
|
19
|
+
"require": "./dist/lib/node/testing/index.cjs",
|
|
20
|
+
"node": "./dist/lib/node/testing/index.cjs"
|
|
21
|
+
}
|
|
13
22
|
},
|
|
14
23
|
"types": "dist/types/src/index.d.ts",
|
|
24
|
+
"typesVersions": {
|
|
25
|
+
"*": {
|
|
26
|
+
"testing": [
|
|
27
|
+
"dist/types/src/testing/index.d.ts"
|
|
28
|
+
]
|
|
29
|
+
}
|
|
30
|
+
},
|
|
15
31
|
"files": [
|
|
16
32
|
"testing.d.ts",
|
|
17
33
|
"testing.js",
|
|
@@ -20,36 +36,36 @@
|
|
|
20
36
|
],
|
|
21
37
|
"dependencies": {
|
|
22
38
|
"crc-32": "^1.2.2",
|
|
23
|
-
"@dxos/
|
|
24
|
-
"@dxos/
|
|
25
|
-
"@dxos/context": "0.3.8-main.
|
|
26
|
-
"@dxos/credentials": "0.3.8-main.
|
|
27
|
-
"@dxos/
|
|
28
|
-
"@dxos/document-model": "0.3.8-main.
|
|
29
|
-
"@dxos/
|
|
30
|
-
"@dxos/
|
|
31
|
-
"@dxos/
|
|
32
|
-
"@dxos/
|
|
33
|
-
"@dxos/
|
|
34
|
-
"@dxos/
|
|
35
|
-
"@dxos/keys": "0.3.8-main.
|
|
36
|
-
"@dxos/log": "0.3.8-main.
|
|
37
|
-
"@dxos/messaging": "0.3.8-main.
|
|
38
|
-
"@dxos/model-factory": "0.3.8-main.
|
|
39
|
-
"@dxos/
|
|
40
|
-
"@dxos/protocols": "0.3.8-main.
|
|
41
|
-
"@dxos/
|
|
42
|
-
"@dxos/
|
|
43
|
-
"@dxos/
|
|
44
|
-
"@dxos/teleport": "0.3.8-main.
|
|
45
|
-
"@dxos/
|
|
46
|
-
"@dxos/teleport-extension-object-sync": "0.3.8-main.
|
|
47
|
-
"@dxos/
|
|
48
|
-
"@dxos/
|
|
49
|
-
"@dxos/timeframe": "0.3.8-main.
|
|
50
|
-
"@dxos/
|
|
51
|
-
"@dxos/
|
|
52
|
-
"@dxos/util": "0.3.8-main.
|
|
39
|
+
"@dxos/async": "0.3.8-main.1b6c849",
|
|
40
|
+
"@dxos/codec-protobuf": "0.3.8-main.1b6c849",
|
|
41
|
+
"@dxos/context": "0.3.8-main.1b6c849",
|
|
42
|
+
"@dxos/credentials": "0.3.8-main.1b6c849",
|
|
43
|
+
"@dxos/debug": "0.3.8-main.1b6c849",
|
|
44
|
+
"@dxos/document-model": "0.3.8-main.1b6c849",
|
|
45
|
+
"@dxos/crypto": "0.3.8-main.1b6c849",
|
|
46
|
+
"@dxos/feed-store": "0.3.8-main.1b6c849",
|
|
47
|
+
"@dxos/echo-db": "0.3.8-main.1b6c849",
|
|
48
|
+
"@dxos/hypercore": "0.3.8-main.1b6c849",
|
|
49
|
+
"@dxos/keyring": "0.3.8-main.1b6c849",
|
|
50
|
+
"@dxos/invariant": "0.3.8-main.1b6c849",
|
|
51
|
+
"@dxos/keys": "0.3.8-main.1b6c849",
|
|
52
|
+
"@dxos/log": "0.3.8-main.1b6c849",
|
|
53
|
+
"@dxos/messaging": "0.3.8-main.1b6c849",
|
|
54
|
+
"@dxos/model-factory": "0.3.8-main.1b6c849",
|
|
55
|
+
"@dxos/node-std": "0.3.8-main.1b6c849",
|
|
56
|
+
"@dxos/protocols": "0.3.8-main.1b6c849",
|
|
57
|
+
"@dxos/network-manager": "0.3.8-main.1b6c849",
|
|
58
|
+
"@dxos/random-access-storage": "0.3.8-main.1b6c849",
|
|
59
|
+
"@dxos/teleport": "0.3.8-main.1b6c849",
|
|
60
|
+
"@dxos/teleport-extension-gossip": "0.3.8-main.1b6c849",
|
|
61
|
+
"@dxos/rpc": "0.3.8-main.1b6c849",
|
|
62
|
+
"@dxos/teleport-extension-object-sync": "0.3.8-main.1b6c849",
|
|
63
|
+
"@dxos/text-model": "0.3.8-main.1b6c849",
|
|
64
|
+
"@dxos/teleport-extension-replicator": "0.3.8-main.1b6c849",
|
|
65
|
+
"@dxos/timeframe": "0.3.8-main.1b6c849",
|
|
66
|
+
"@dxos/typings": "0.3.8-main.1b6c849",
|
|
67
|
+
"@dxos/tracing": "0.3.8-main.1b6c849",
|
|
68
|
+
"@dxos/util": "0.3.8-main.1b6c849"
|
|
53
69
|
},
|
|
54
70
|
"devDependencies": {
|
|
55
71
|
"fast-check": "~3.3.0",
|
|
@@ -12,7 +12,13 @@ import { type PublicKey } from '@dxos/keys';
|
|
|
12
12
|
import { log } from '@dxos/log';
|
|
13
13
|
import { type DataMessage } from '@dxos/protocols/proto/dxos/echo/feed';
|
|
14
14
|
import { type EchoObject, type EchoObjectBatch } from '@dxos/protocols/proto/dxos/echo/object';
|
|
15
|
-
import {
|
|
15
|
+
import {
|
|
16
|
+
EchoEvent,
|
|
17
|
+
type SyncRepoRequest,
|
|
18
|
+
type MutationReceipt,
|
|
19
|
+
type WriteRequest,
|
|
20
|
+
type SyncRepoResponse,
|
|
21
|
+
} from '@dxos/protocols/proto/dxos/echo/service';
|
|
16
22
|
import { ComplexMap } from '@dxos/util';
|
|
17
23
|
|
|
18
24
|
// After this limit the incremental object updates will be replaced with the full snapshot of the object.
|
|
@@ -198,6 +204,14 @@ export class DataServiceHost {
|
|
|
198
204
|
async flush(): Promise<void> {
|
|
199
205
|
await this._flush();
|
|
200
206
|
}
|
|
207
|
+
|
|
208
|
+
syncRepo(request: SyncRepoRequest): Stream<SyncRepoResponse> {
|
|
209
|
+
throw new Error('Method not implemented.');
|
|
210
|
+
}
|
|
211
|
+
|
|
212
|
+
sendSyncMessage(request: SyncRepoRequest): Promise<void> {
|
|
213
|
+
throw new Error('Method not implemented.');
|
|
214
|
+
}
|
|
201
215
|
}
|
|
202
216
|
|
|
203
217
|
const createDataMessage = (batch: EchoObjectBatch) => ({
|
|
@@ -14,6 +14,8 @@ import {
|
|
|
14
14
|
type EchoEvent,
|
|
15
15
|
type WriteRequest,
|
|
16
16
|
type FlushRequest,
|
|
17
|
+
type SyncRepoRequest,
|
|
18
|
+
type SyncRepoResponse,
|
|
17
19
|
} from '@dxos/protocols/proto/dxos/echo/service';
|
|
18
20
|
import { ComplexMap } from '@dxos/util';
|
|
19
21
|
|
|
@@ -74,4 +76,12 @@ export class DataServiceImpl implements DataService {
|
|
|
74
76
|
this._subscriptions.getDataService(request.spaceKey) ?? raise(new Error(`space not found: ${request.spaceKey}`));
|
|
75
77
|
return host.flush();
|
|
76
78
|
}
|
|
79
|
+
|
|
80
|
+
syncRepo(request: SyncRepoRequest): Stream<SyncRepoResponse> {
|
|
81
|
+
throw new Error('Method not implemented.');
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
sendSyncMessage(request: SyncRepoRequest): Promise<void> {
|
|
85
|
+
throw new Error('Method not implemented.');
|
|
86
|
+
}
|
|
77
87
|
}
|
|
@@ -217,6 +217,7 @@ export class DataPipeline implements CredentialProcessor {
|
|
|
217
217
|
await waitForOneEpoch;
|
|
218
218
|
}
|
|
219
219
|
|
|
220
|
+
// CPU bottleneck control.
|
|
220
221
|
let messageCounter = 0;
|
|
221
222
|
|
|
222
223
|
invariant(this._pipeline, 'Pipeline is not initialized.');
|
|
@@ -263,10 +264,10 @@ export class DataPipeline implements CredentialProcessor {
|
|
|
263
264
|
|
|
264
265
|
span.end();
|
|
265
266
|
|
|
266
|
-
if (++messageCounter >
|
|
267
|
+
if (++messageCounter > 100) {
|
|
267
268
|
messageCounter = 0;
|
|
268
269
|
// Allow other tasks to process.
|
|
269
|
-
await
|
|
270
|
+
await idle(1_000);
|
|
270
271
|
}
|
|
271
272
|
}
|
|
272
273
|
}
|
|
@@ -418,3 +419,39 @@ export class DataPipeline implements CredentialProcessor {
|
|
|
418
419
|
await this._params.metadataStore.flush();
|
|
419
420
|
}
|
|
420
421
|
}
|
|
422
|
+
|
|
423
|
+
/**
|
|
424
|
+
* Waits up to `timeout` ms for the browser to be idle.
|
|
425
|
+
*/
|
|
426
|
+
const idle = async (timeout?: number) => {
|
|
427
|
+
if (!('scheduler' in globalThis && typeof (globalThis as any).scheduler.postTask === 'function')) {
|
|
428
|
+
await sleep(1);
|
|
429
|
+
return;
|
|
430
|
+
}
|
|
431
|
+
|
|
432
|
+
await new Promise<void>((resolve) => {
|
|
433
|
+
// const beginTime = performance.now();
|
|
434
|
+
const cleanup = () => {
|
|
435
|
+
clearTimeout(timer);
|
|
436
|
+
controller.abort();
|
|
437
|
+
// log.warn('yielded for', { ms: performance.now() - beginTime });
|
|
438
|
+
};
|
|
439
|
+
|
|
440
|
+
const controller = new AbortController();
|
|
441
|
+
|
|
442
|
+
void (globalThis as any).scheduler
|
|
443
|
+
.postTask(
|
|
444
|
+
() => {
|
|
445
|
+
cleanup();
|
|
446
|
+
resolve();
|
|
447
|
+
},
|
|
448
|
+
{ priority: 'background', signal: controller.signal },
|
|
449
|
+
)
|
|
450
|
+
.catch(() => {});
|
|
451
|
+
|
|
452
|
+
const timer = setTimeout(() => {
|
|
453
|
+
cleanup();
|
|
454
|
+
resolve();
|
|
455
|
+
}, timeout);
|
|
456
|
+
});
|
|
457
|
+
};
|