@dxos/echo-pipeline 0.1.30-next.a4f4fa5 → 0.1.30
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-L44NG4N6.mjs → chunk-QMDRF3NL.mjs} +72 -37
- package/dist/lib/browser/{chunk-L44NG4N6.mjs.map → chunk-QMDRF3NL.mjs.map} +3 -3
- package/dist/lib/browser/index.mjs +1 -1
- package/dist/lib/browser/meta.json +1 -1
- package/dist/lib/browser/testing/index.mjs +23 -14
- package/dist/lib/browser/testing/index.mjs.map +3 -3
- package/dist/lib/node/index.cjs +68 -33
- package/dist/lib/node/index.cjs.map +3 -3
- package/dist/lib/node/meta.json +1 -1
- package/dist/lib/node/testing/index.cjs +49 -43
- package/dist/lib/node/testing/index.cjs.map +3 -3
- package/dist/types/src/dbhost/data-service-host.d.ts.map +1 -1
- package/dist/types/src/dbhost/database-backend.d.ts +2 -2
- package/dist/types/src/dbhost/database-backend.d.ts.map +1 -1
- package/dist/types/src/space/genesis.d.ts.map +1 -1
- package/dist/types/src/testing/test-agent-builder.d.ts +4 -3
- package/dist/types/src/testing/test-agent-builder.d.ts.map +1 -1
- package/dist/types/src/testing/util.d.ts.map +1 -1
- package/package.json +29 -29
- package/src/dbhost/data-service-host.ts +19 -25
- package/src/dbhost/database-backend.ts +1 -1
- package/src/pipeline/pipeline.test.ts +12 -4
- package/src/space/data-pipeline-controller.ts +1 -1
- package/src/space/genesis.ts +47 -7
- package/src/space/space-protocol.browser.test.ts +8 -6
- package/src/space/space-protocol.test.ts +8 -6
- package/src/testing/database-test-rig.ts +1 -1
- package/src/testing/test-agent-builder.ts +13 -7
- package/src/testing/util.ts +11 -7
- package/src/tests/database-unit.test.ts +25 -0
- package/src/tests/database.test.ts +5 -5
|
@@ -1 +1 @@
|
|
|
1
|
-
{"inputs":{"packages/core/echo/echo-pipeline/src/errors/errors.ts":{"bytes":5163,"imports":[]},"packages/core/echo/echo-pipeline/src/errors/index.ts":{"bytes":370,"imports":[{"path":"packages/core/echo/echo-pipeline/src/errors/errors.ts","kind":"import-statement","original":"./errors"}]},"packages/core/echo/echo-pipeline/src/metadata/metadata-store.ts":{"bytes":17497,"imports":[{"path":"@dxos/node-std/assert","kind":"import-statement","external":true},{"path":"@dxos/async","kind":"import-statement","external":true},{"path":"@dxos/log","kind":"import-statement","external":true},{"path":"@dxos/protocols","kind":"import-statement","external":true}]},"packages/core/echo/echo-pipeline/src/metadata/index.ts":{"bytes":394,"imports":[{"path":"packages/core/echo/echo-pipeline/src/metadata/metadata-store.ts","kind":"import-statement","original":"./metadata-store"}]},"packages/core/echo/echo-pipeline/src/common/codec.ts":{"bytes":1539,"imports":[{"path":"@dxos/hypercore","kind":"import-statement","external":true},{"path":"@dxos/protocols","kind":"import-statement","external":true}]},"packages/core/echo/echo-pipeline/src/common/feeds.ts":{"bytes":1616,"imports":[{"path":"@dxos/node-std/assert","kind":"import-statement","external":true}]},"packages/core/echo/echo-pipeline/src/common/index.ts":{"bytes":450,"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"}]},"packages/core/echo/echo-pipeline/src/pipeline/message-selector.ts":{"bytes":3445,"imports":[{"path":"debug","kind":"import-statement","external":true},{"path":"@dxos/node-std/assert","kind":"import-statement","external":true}]},"packages/core/echo/echo-pipeline/src/pipeline/timeframe-clock.ts":{"bytes":7134,"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}]},"packages/core/echo/echo-pipeline/src/pipeline/pipeline.ts":{"bytes":24434,"imports":[{"path":"@dxos/node-std/assert","kind":"import-statement","external":true},{"path":"@dxos/async","kind":"import-statement","external":true},{"path":"@dxos/feed-store","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":"packages/core/echo/echo-pipeline/src/common/index.ts","kind":"import-statement","original":"../common"},{"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"}]},"packages/core/echo/echo-pipeline/src/pipeline/index.ts":{"bytes":620,"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"}]},"packages/core/echo/echo-pipeline/src/space/auth.ts":{"bytes":9584,"imports":[{"path":"@dxos/node-std/assert","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/log","kind":"import-statement","external":true},{"path":"@dxos/protocols","kind":"import-statement","external":true},{"path":"@dxos/teleport","kind":"import-statement","external":true}]},"packages/core/echo/echo-pipeline/src/space/control-pipeline.ts":{"bytes":12494,"imports":[{"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/util","kind":"import-statement","external":true},{"path":"packages/core/echo/echo-pipeline/src/pipeline/index.ts","kind":"import-statement","original":"../pipeline"}]},"packages/core/echo/echo-pipeline/src/space/space.ts":{"bytes":20255,"imports":[{"path":"@dxos/node-std/assert","kind":"import-statement","external":true},{"path":"@dxos/async","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/util","kind":"import-statement","external":true},{"path":"packages/core/echo/echo-pipeline/src/pipeline/index.ts","kind":"import-statement","original":"../pipeline"},{"path":"packages/core/echo/echo-pipeline/src/space/control-pipeline.ts","kind":"import-statement","original":"./control-pipeline"}]},"packages/core/echo/echo-pipeline/src/space/space-protocol.ts":{"bytes":21654,"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-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"}]},"packages/core/echo/echo-pipeline/src/space/space-manager.ts":{"bytes":9009,"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/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"}]},"packages/core/echo/echo-pipeline/src/space/genesis.ts":{"bytes":3658,"imports":[{"path":"@dxos/credentials","kind":"import-statement","external":true},{"path":"@dxos/debug","kind":"import-statement","external":true},{"path":"@dxos/protocols/proto/dxos/halo/credentials","kind":"import-statement","external":true}]},"packages/core/echo/echo-pipeline/src/dbhost/data-service-host.ts":{"bytes":10886,"imports":[{"path":"@dxos/node-std/assert","kind":"import-statement","external":true},{"path":"@dxos/codec-protobuf","kind":"import-statement","external":true},{"path":"@dxos/echo-db","kind":"import-statement","external":true},{"path":"@dxos/log","kind":"import-statement","external":true},{"path":"@dxos/util","kind":"import-statement","external":true}]},"packages/core/echo/echo-pipeline/src/dbhost/database-backend.ts":{"bytes":5569,"imports":[{"path":"@dxos/echo-db","kind":"import-statement","external":true},{"path":"packages/core/echo/echo-pipeline/src/dbhost/data-service-host.ts","kind":"import-statement","original":"./data-service-host"}]},"packages/core/echo/echo-pipeline/src/dbhost/snapshot-manager.ts":{"bytes":6969,"imports":[{"path":"@dxos/async","kind":"import-statement","external":true},{"path":"@dxos/protocols","kind":"import-statement","external":true},{"path":"@dxos/teleport-extension-object-sync","kind":"import-statement","external":true}]},"packages/core/echo/echo-pipeline/src/dbhost/snapshot-store.ts":{"bytes":4640,"imports":[{"path":"@dxos/crypto","kind":"import-statement","external":true},{"path":"@dxos/protocols","kind":"import-statement","external":true}]},"packages/core/echo/echo-pipeline/src/dbhost/data-service.ts":{"bytes":6382,"imports":[{"path":"@dxos/node-std/assert","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/util","kind":"import-statement","external":true}]},"packages/core/echo/echo-pipeline/src/dbhost/index.ts":{"bytes":823,"imports":[{"path":"packages/core/echo/echo-pipeline/src/dbhost/data-service-host.ts","kind":"import-statement","original":"./data-service-host"},{"path":"packages/core/echo/echo-pipeline/src/dbhost/database-backend.ts","kind":"import-statement","original":"./database-backend"},{"path":"packages/core/echo/echo-pipeline/src/dbhost/snapshot-manager.ts","kind":"import-statement","original":"./snapshot-manager"},{"path":"packages/core/echo/echo-pipeline/src/dbhost/snapshot-store.ts","kind":"import-statement","original":"./snapshot-store"},{"path":"packages/core/echo/echo-pipeline/src/dbhost/data-service.ts","kind":"import-statement","original":"./data-service"}]},"packages/core/echo/echo-pipeline/src/space/data-pipeline-controller.ts":{"bytes":25424,"imports":[{"path":"@dxos/node-std/assert","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/echo-db","kind":"import-statement","external":true},{"path":"@dxos/log","kind":"import-statement","external":true},{"path":"@dxos/timeframe","kind":"import-statement","external":true},{"path":"packages/core/echo/echo-pipeline/src/common/index.ts","kind":"import-statement","original":"../common"},{"path":"packages/core/echo/echo-pipeline/src/dbhost/index.ts","kind":"import-statement","original":"../dbhost"}]},"packages/core/echo/echo-pipeline/src/space/index.ts":{"bytes":867,"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/genesis.ts","kind":"import-statement","original":"./genesis"},{"path":"packages/core/echo/echo-pipeline/src/space/data-pipeline-controller.ts","kind":"import-statement","original":"./data-pipeline-controller"}]},"packages/core/echo/echo-pipeline/src/index.ts":{"bytes":795,"imports":[{"path":"packages/core/echo/echo-pipeline/src/errors/index.ts","kind":"import-statement","original":"./errors"},{"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"},{"path":"packages/core/echo/echo-pipeline/src/common/index.ts","kind":"import-statement","original":"./common"},{"path":"packages/core/echo/echo-pipeline/src/dbhost/index.ts","kind":"import-statement","original":"./dbhost"}]},"packages/core/echo/echo-pipeline/src/testing/test-feed-builder.ts":{"bytes":1362,"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"}]},"packages/core/echo/echo-pipeline/src/testing/test-agent-builder.ts":{"bytes":22766,"imports":[{"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/random-access-storage","kind":"import-statement","external":true},{"path":"@dxos/teleport-extension-presence","kind":"import-statement","external":true},{"path":"@dxos/util","kind":"import-statement","external":true},{"path":"packages/core/echo/echo-pipeline/src/dbhost/index.ts","kind":"import-statement","original":"../dbhost"},{"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"},{"path":"packages/core/echo/echo-pipeline/src/space/data-pipeline-controller.ts","kind":"import-statement","original":"../space/data-pipeline-controller"},{"path":"packages/core/echo/echo-pipeline/src/testing/test-feed-builder.ts","kind":"import-statement","original":"./test-feed-builder"}]},"packages/core/echo/echo-pipeline/src/testing/util.ts":{"bytes":8588,"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/dbhost/index.ts","kind":"import-statement","original":"../dbhost"}]},"packages/core/echo/echo-pipeline/src/testing/index.ts":{"bytes":591,"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"}]}},"outputs":{"packages/core/echo/echo-pipeline/dist/lib/browser/index.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":2710},"packages/core/echo/echo-pipeline/dist/lib/browser/index.mjs":{"imports":[{"path":"packages/core/echo/echo-pipeline/dist/lib/browser/chunk-L44NG4N6.mjs","kind":"import-statement"}],"exports":["AuthExtension","AuthStatus","DBError","DataPipelineControllerImpl","DataServiceHost","DataServiceImpl","DataServiceSubscriptions","DatabaseBackendHost","EntityNotFoundError","IdentityNotInitializedError","InvalidInvitationError","InvalidStorageVersionError","MOCK_AUTH_PROVIDER","MOCK_AUTH_VERIFIER","MetadataStore","NoopDataPipelineController","Pipeline","PipelineAccessor","STORAGE_VERSION","SnapshotManager","SnapshotStore","Space","SpaceManager","SpaceNotFoundError","SpaceProtocol","SpaceProtocolSession","TimeframeClock","UnknownModelError","codec","createMappedFeedWriter","mapFeedIndexesToTimeframe","mapTimeframeToFeedIndexes","spaceGenesis","valueEncoding"],"entryPoint":"packages/core/echo/echo-pipeline/src/index.ts","inputs":{"packages/core/echo/echo-pipeline/src/errors/errors.ts":{"bytesInOutput":1196},"packages/core/echo/echo-pipeline/src/errors/index.ts":{"bytesInOutput":0},"packages/core/echo/echo-pipeline/src/index.ts":{"bytesInOutput":0}},"bytes":2571},"packages/core/echo/echo-pipeline/dist/lib/browser/testing/index.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":17393},"packages/core/echo/echo-pipeline/dist/lib/browser/testing/index.mjs":{"imports":[{"path":"packages/core/echo/echo-pipeline/dist/lib/browser/chunk-L44NG4N6.mjs","kind":"import-statement"},{"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/random-access-storage","kind":"import-statement","external":true},{"path":"@dxos/teleport-extension-presence","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}],"exports":["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":5131},"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":2037}},"bytes":8189},"packages/core/echo/echo-pipeline/dist/lib/browser/chunk-L44NG4N6.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":94229},"packages/core/echo/echo-pipeline/dist/lib/browser/chunk-L44NG4N6.mjs":{"imports":[{"path":"@dxos/node-std/assert","kind":"import-statement","external":true},{"path":"@dxos/async","kind":"import-statement","external":true},{"path":"@dxos/log","kind":"import-statement","external":true},{"path":"@dxos/protocols","kind":"import-statement","external":true},{"path":"@dxos/hypercore","kind":"import-statement","external":true},{"path":"@dxos/protocols","kind":"import-statement","external":true},{"path":"@dxos/node-std/assert","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/node-std/assert","kind":"import-statement","external":true},{"path":"@dxos/async","kind":"import-statement","external":true},{"path":"@dxos/feed-store","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":"debug","kind":"import-statement","external":true},{"path":"@dxos/node-std/assert","kind":"import-statement","external":true},{"path":"@dxos/node-std/assert","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/log","kind":"import-statement","external":true},{"path":"@dxos/protocols","kind":"import-statement","external":true},{"path":"@dxos/teleport","kind":"import-statement","external":true},{"path":"@dxos/node-std/assert","kind":"import-statement","external":true},{"path":"@dxos/async","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/util","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/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-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/util","kind":"import-statement","external":true},{"path":"@dxos/credentials","kind":"import-statement","external":true},{"path":"@dxos/debug","kind":"import-statement","external":true},{"path":"@dxos/protocols/proto/dxos/halo/credentials","kind":"import-statement","external":true},{"path":"@dxos/node-std/assert","kind":"import-statement","external":true},{"path":"@dxos/codec-protobuf","kind":"import-statement","external":true},{"path":"@dxos/echo-db","kind":"import-statement","external":true},{"path":"@dxos/log","kind":"import-statement","external":true},{"path":"@dxos/util","kind":"import-statement","external":true},{"path":"@dxos/echo-db","kind":"import-statement","external":true},{"path":"@dxos/async","kind":"import-statement","external":true},{"path":"@dxos/protocols","kind":"import-statement","external":true},{"path":"@dxos/teleport-extension-object-sync","kind":"import-statement","external":true},{"path":"@dxos/crypto","kind":"import-statement","external":true},{"path":"@dxos/protocols","kind":"import-statement","external":true},{"path":"@dxos/node-std/assert","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/util","kind":"import-statement","external":true},{"path":"@dxos/node-std/assert","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/echo-db","kind":"import-statement","external":true},{"path":"@dxos/log","kind":"import-statement","external":true},{"path":"@dxos/timeframe","kind":"import-statement","external":true}],"exports":["AuthExtension","AuthStatus","DataPipelineControllerImpl","DataServiceHost","DataServiceImpl","DataServiceSubscriptions","DatabaseBackendHost","MOCK_AUTH_PROVIDER","MOCK_AUTH_VERIFIER","MetadataStore","NoopDataPipelineController","Pipeline","STORAGE_VERSION","SnapshotManager","SnapshotStore","Space","SpaceManager","SpaceProtocol","SpaceProtocolSession","TimeframeClock","codec","createMappedFeedWriter","mapFeedIndexesToTimeframe","mapTimeframeToFeedIndexes","spaceGenesis","valueEncoding"],"inputs":{"packages/core/echo/echo-pipeline/src/metadata/metadata-store.ts":{"bytesInOutput":5006},"packages/core/echo/echo-pipeline/src/metadata/index.ts":{"bytesInOutput":0},"packages/core/echo/echo-pipeline/src/common/codec.ts":{"bytesInOutput":223},"packages/core/echo/echo-pipeline/src/common/feeds.ts":{"bytesInOutput":219},"packages/core/echo/echo-pipeline/src/common/index.ts":{"bytesInOutput":0},"packages/core/echo/echo-pipeline/src/pipeline/timeframe-clock.ts":{"bytesInOutput":2223},"packages/core/echo/echo-pipeline/src/pipeline/pipeline.ts":{"bytesInOutput":5575},"packages/core/echo/echo-pipeline/src/pipeline/message-selector.ts":{"bytesInOutput":436},"packages/core/echo/echo-pipeline/src/pipeline/index.ts":{"bytesInOutput":0},"packages/core/echo/echo-pipeline/src/space/auth.ts":{"bytesInOutput":2582},"packages/core/echo/echo-pipeline/src/space/space.ts":{"bytesInOutput":5545},"packages/core/echo/echo-pipeline/src/space/control-pipeline.ts":{"bytesInOutput":3379},"packages/core/echo/echo-pipeline/src/space/space-protocol.ts":{"bytesInOutput":5851},"packages/core/echo/echo-pipeline/src/space/space-manager.ts":{"bytesInOutput":2328},"packages/core/echo/echo-pipeline/src/space/genesis.ts":{"bytesInOutput":880},"packages/core/echo/echo-pipeline/src/dbhost/data-service-host.ts":{"bytesInOutput":2530},"packages/core/echo/echo-pipeline/src/dbhost/database-backend.ts":{"bytesInOutput":983},"packages/core/echo/echo-pipeline/src/dbhost/snapshot-manager.ts":{"bytesInOutput":2094},"packages/core/echo/echo-pipeline/src/dbhost/snapshot-store.ts":{"bytesInOutput":1050},"packages/core/echo/echo-pipeline/src/dbhost/data-service.ts":{"bytesInOutput":1578},"packages/core/echo/echo-pipeline/src/dbhost/index.ts":{"bytesInOutput":0},"packages/core/echo/echo-pipeline/src/space/data-pipeline-controller.ts":{"bytesInOutput":6957},"packages/core/echo/echo-pipeline/src/space/index.ts":{"bytesInOutput":0}},"bytes":51321}}}
|
|
1
|
+
{"inputs":{"packages/core/echo/echo-pipeline/src/errors/errors.ts":{"bytes":5163,"imports":[]},"packages/core/echo/echo-pipeline/src/errors/index.ts":{"bytes":370,"imports":[{"path":"packages/core/echo/echo-pipeline/src/errors/errors.ts","kind":"import-statement","original":"./errors"}]},"packages/core/echo/echo-pipeline/src/metadata/metadata-store.ts":{"bytes":17497,"imports":[{"path":"@dxos/node-std/assert","kind":"import-statement","external":true},{"path":"@dxos/async","kind":"import-statement","external":true},{"path":"@dxos/log","kind":"import-statement","external":true},{"path":"@dxos/protocols","kind":"import-statement","external":true}]},"packages/core/echo/echo-pipeline/src/metadata/index.ts":{"bytes":394,"imports":[{"path":"packages/core/echo/echo-pipeline/src/metadata/metadata-store.ts","kind":"import-statement","original":"./metadata-store"}]},"packages/core/echo/echo-pipeline/src/common/codec.ts":{"bytes":1539,"imports":[{"path":"@dxos/hypercore","kind":"import-statement","external":true},{"path":"@dxos/protocols","kind":"import-statement","external":true}]},"packages/core/echo/echo-pipeline/src/common/feeds.ts":{"bytes":1616,"imports":[{"path":"@dxos/node-std/assert","kind":"import-statement","external":true}]},"packages/core/echo/echo-pipeline/src/common/index.ts":{"bytes":450,"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"}]},"packages/core/echo/echo-pipeline/src/pipeline/message-selector.ts":{"bytes":3445,"imports":[{"path":"debug","kind":"import-statement","external":true},{"path":"@dxos/node-std/assert","kind":"import-statement","external":true}]},"packages/core/echo/echo-pipeline/src/pipeline/timeframe-clock.ts":{"bytes":7134,"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}]},"packages/core/echo/echo-pipeline/src/pipeline/pipeline.ts":{"bytes":24434,"imports":[{"path":"@dxos/node-std/assert","kind":"import-statement","external":true},{"path":"@dxos/async","kind":"import-statement","external":true},{"path":"@dxos/feed-store","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":"packages/core/echo/echo-pipeline/src/common/index.ts","kind":"import-statement","original":"../common"},{"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"}]},"packages/core/echo/echo-pipeline/src/pipeline/index.ts":{"bytes":620,"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"}]},"packages/core/echo/echo-pipeline/src/space/auth.ts":{"bytes":9584,"imports":[{"path":"@dxos/node-std/assert","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/log","kind":"import-statement","external":true},{"path":"@dxos/protocols","kind":"import-statement","external":true},{"path":"@dxos/teleport","kind":"import-statement","external":true}]},"packages/core/echo/echo-pipeline/src/space/control-pipeline.ts":{"bytes":12494,"imports":[{"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/util","kind":"import-statement","external":true},{"path":"packages/core/echo/echo-pipeline/src/pipeline/index.ts","kind":"import-statement","original":"../pipeline"}]},"packages/core/echo/echo-pipeline/src/space/space.ts":{"bytes":20255,"imports":[{"path":"@dxos/node-std/assert","kind":"import-statement","external":true},{"path":"@dxos/async","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/util","kind":"import-statement","external":true},{"path":"packages/core/echo/echo-pipeline/src/pipeline/index.ts","kind":"import-statement","original":"../pipeline"},{"path":"packages/core/echo/echo-pipeline/src/space/control-pipeline.ts","kind":"import-statement","original":"./control-pipeline"}]},"packages/core/echo/echo-pipeline/src/space/space-protocol.ts":{"bytes":21654,"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-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"}]},"packages/core/echo/echo-pipeline/src/space/space-manager.ts":{"bytes":9009,"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/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"}]},"packages/core/echo/echo-pipeline/src/space/genesis.ts":{"bytes":7356,"imports":[{"path":"@dxos/credentials","kind":"import-statement","external":true},{"path":"@dxos/debug","kind":"import-statement","external":true},{"path":"@dxos/protocols/proto/dxos/halo/credentials","kind":"import-statement","external":true}]},"packages/core/echo/echo-pipeline/src/dbhost/data-service-host.ts":{"bytes":10295,"imports":[{"path":"@dxos/node-std/assert","kind":"import-statement","external":true},{"path":"@dxos/codec-protobuf","kind":"import-statement","external":true},{"path":"@dxos/echo-db","kind":"import-statement","external":true},{"path":"@dxos/log","kind":"import-statement","external":true},{"path":"@dxos/util","kind":"import-statement","external":true}]},"packages/core/echo/echo-pipeline/src/dbhost/database-backend.ts":{"bytes":5565,"imports":[{"path":"@dxos/echo-db","kind":"import-statement","external":true},{"path":"packages/core/echo/echo-pipeline/src/dbhost/data-service-host.ts","kind":"import-statement","original":"./data-service-host"}]},"packages/core/echo/echo-pipeline/src/dbhost/snapshot-manager.ts":{"bytes":6969,"imports":[{"path":"@dxos/async","kind":"import-statement","external":true},{"path":"@dxos/protocols","kind":"import-statement","external":true},{"path":"@dxos/teleport-extension-object-sync","kind":"import-statement","external":true}]},"packages/core/echo/echo-pipeline/src/dbhost/snapshot-store.ts":{"bytes":4640,"imports":[{"path":"@dxos/crypto","kind":"import-statement","external":true},{"path":"@dxos/protocols","kind":"import-statement","external":true}]},"packages/core/echo/echo-pipeline/src/dbhost/data-service.ts":{"bytes":6382,"imports":[{"path":"@dxos/node-std/assert","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/util","kind":"import-statement","external":true}]},"packages/core/echo/echo-pipeline/src/dbhost/index.ts":{"bytes":823,"imports":[{"path":"packages/core/echo/echo-pipeline/src/dbhost/data-service-host.ts","kind":"import-statement","original":"./data-service-host"},{"path":"packages/core/echo/echo-pipeline/src/dbhost/database-backend.ts","kind":"import-statement","original":"./database-backend"},{"path":"packages/core/echo/echo-pipeline/src/dbhost/snapshot-manager.ts","kind":"import-statement","original":"./snapshot-manager"},{"path":"packages/core/echo/echo-pipeline/src/dbhost/snapshot-store.ts","kind":"import-statement","original":"./snapshot-store"},{"path":"packages/core/echo/echo-pipeline/src/dbhost/data-service.ts","kind":"import-statement","original":"./data-service"}]},"packages/core/echo/echo-pipeline/src/space/data-pipeline-controller.ts":{"bytes":25424,"imports":[{"path":"@dxos/node-std/assert","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/echo-db","kind":"import-statement","external":true},{"path":"@dxos/log","kind":"import-statement","external":true},{"path":"@dxos/timeframe","kind":"import-statement","external":true},{"path":"packages/core/echo/echo-pipeline/src/common/index.ts","kind":"import-statement","original":"../common"},{"path":"packages/core/echo/echo-pipeline/src/dbhost/index.ts","kind":"import-statement","original":"../dbhost"}]},"packages/core/echo/echo-pipeline/src/space/index.ts":{"bytes":867,"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/genesis.ts","kind":"import-statement","original":"./genesis"},{"path":"packages/core/echo/echo-pipeline/src/space/data-pipeline-controller.ts","kind":"import-statement","original":"./data-pipeline-controller"}]},"packages/core/echo/echo-pipeline/src/index.ts":{"bytes":795,"imports":[{"path":"packages/core/echo/echo-pipeline/src/errors/index.ts","kind":"import-statement","original":"./errors"},{"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"},{"path":"packages/core/echo/echo-pipeline/src/common/index.ts","kind":"import-statement","original":"./common"},{"path":"packages/core/echo/echo-pipeline/src/dbhost/index.ts","kind":"import-statement","original":"./dbhost"}]},"packages/core/echo/echo-pipeline/src/testing/test-feed-builder.ts":{"bytes":1362,"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"}]},"packages/core/echo/echo-pipeline/src/testing/test-agent-builder.ts":{"bytes":23207,"imports":[{"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/random-access-storage","kind":"import-statement","external":true},{"path":"@dxos/teleport-extension-gossip","kind":"import-statement","external":true},{"path":"@dxos/util","kind":"import-statement","external":true},{"path":"packages/core/echo/echo-pipeline/src/dbhost/index.ts","kind":"import-statement","original":"../dbhost"},{"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"},{"path":"packages/core/echo/echo-pipeline/src/space/data-pipeline-controller.ts","kind":"import-statement","original":"../space/data-pipeline-controller"},{"path":"packages/core/echo/echo-pipeline/src/testing/test-feed-builder.ts","kind":"import-statement","original":"./test-feed-builder"}]},"packages/core/echo/echo-pipeline/src/testing/util.ts":{"bytes":8914,"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/dbhost/index.ts","kind":"import-statement","original":"../dbhost"}]},"packages/core/echo/echo-pipeline/src/testing/index.ts":{"bytes":591,"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"}]}},"outputs":{"packages/core/echo/echo-pipeline/dist/lib/browser/index.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":2710},"packages/core/echo/echo-pipeline/dist/lib/browser/index.mjs":{"imports":[{"path":"packages/core/echo/echo-pipeline/dist/lib/browser/chunk-QMDRF3NL.mjs","kind":"import-statement"}],"exports":["AuthExtension","AuthStatus","DBError","DataPipelineControllerImpl","DataServiceHost","DataServiceImpl","DataServiceSubscriptions","DatabaseBackendHost","EntityNotFoundError","IdentityNotInitializedError","InvalidInvitationError","InvalidStorageVersionError","MOCK_AUTH_PROVIDER","MOCK_AUTH_VERIFIER","MetadataStore","NoopDataPipelineController","Pipeline","PipelineAccessor","STORAGE_VERSION","SnapshotManager","SnapshotStore","Space","SpaceManager","SpaceNotFoundError","SpaceProtocol","SpaceProtocolSession","TimeframeClock","UnknownModelError","codec","createMappedFeedWriter","mapFeedIndexesToTimeframe","mapTimeframeToFeedIndexes","spaceGenesis","valueEncoding"],"entryPoint":"packages/core/echo/echo-pipeline/src/index.ts","inputs":{"packages/core/echo/echo-pipeline/src/errors/errors.ts":{"bytesInOutput":1196},"packages/core/echo/echo-pipeline/src/errors/index.ts":{"bytesInOutput":0},"packages/core/echo/echo-pipeline/src/index.ts":{"bytesInOutput":0}},"bytes":2571},"packages/core/echo/echo-pipeline/dist/lib/browser/testing/index.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":17777},"packages/core/echo/echo-pipeline/dist/lib/browser/testing/index.mjs":{"imports":[{"path":"packages/core/echo/echo-pipeline/dist/lib/browser/chunk-QMDRF3NL.mjs","kind":"import-statement"},{"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/random-access-storage","kind":"import-statement","external":true},{"path":"@dxos/teleport-extension-gossip","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}],"exports":["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":5248},"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":2115}},"bytes":8384},"packages/core/echo/echo-pipeline/dist/lib/browser/chunk-QMDRF3NL.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":95717},"packages/core/echo/echo-pipeline/dist/lib/browser/chunk-QMDRF3NL.mjs":{"imports":[{"path":"@dxos/node-std/assert","kind":"import-statement","external":true},{"path":"@dxos/async","kind":"import-statement","external":true},{"path":"@dxos/log","kind":"import-statement","external":true},{"path":"@dxos/protocols","kind":"import-statement","external":true},{"path":"@dxos/hypercore","kind":"import-statement","external":true},{"path":"@dxos/protocols","kind":"import-statement","external":true},{"path":"@dxos/node-std/assert","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/node-std/assert","kind":"import-statement","external":true},{"path":"@dxos/async","kind":"import-statement","external":true},{"path":"@dxos/feed-store","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":"debug","kind":"import-statement","external":true},{"path":"@dxos/node-std/assert","kind":"import-statement","external":true},{"path":"@dxos/node-std/assert","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/log","kind":"import-statement","external":true},{"path":"@dxos/protocols","kind":"import-statement","external":true},{"path":"@dxos/teleport","kind":"import-statement","external":true},{"path":"@dxos/node-std/assert","kind":"import-statement","external":true},{"path":"@dxos/async","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/util","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/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-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/util","kind":"import-statement","external":true},{"path":"@dxos/credentials","kind":"import-statement","external":true},{"path":"@dxos/debug","kind":"import-statement","external":true},{"path":"@dxos/protocols/proto/dxos/halo/credentials","kind":"import-statement","external":true},{"path":"@dxos/node-std/assert","kind":"import-statement","external":true},{"path":"@dxos/codec-protobuf","kind":"import-statement","external":true},{"path":"@dxos/echo-db","kind":"import-statement","external":true},{"path":"@dxos/log","kind":"import-statement","external":true},{"path":"@dxos/util","kind":"import-statement","external":true},{"path":"@dxos/echo-db","kind":"import-statement","external":true},{"path":"@dxos/async","kind":"import-statement","external":true},{"path":"@dxos/protocols","kind":"import-statement","external":true},{"path":"@dxos/teleport-extension-object-sync","kind":"import-statement","external":true},{"path":"@dxos/crypto","kind":"import-statement","external":true},{"path":"@dxos/protocols","kind":"import-statement","external":true},{"path":"@dxos/node-std/assert","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/util","kind":"import-statement","external":true},{"path":"@dxos/node-std/assert","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/echo-db","kind":"import-statement","external":true},{"path":"@dxos/log","kind":"import-statement","external":true},{"path":"@dxos/timeframe","kind":"import-statement","external":true}],"exports":["AuthExtension","AuthStatus","DataPipelineControllerImpl","DataServiceHost","DataServiceImpl","DataServiceSubscriptions","DatabaseBackendHost","MOCK_AUTH_PROVIDER","MOCK_AUTH_VERIFIER","MetadataStore","NoopDataPipelineController","Pipeline","STORAGE_VERSION","SnapshotManager","SnapshotStore","Space","SpaceManager","SpaceProtocol","SpaceProtocolSession","TimeframeClock","codec","createMappedFeedWriter","mapFeedIndexesToTimeframe","mapTimeframeToFeedIndexes","spaceGenesis","valueEncoding"],"inputs":{"packages/core/echo/echo-pipeline/src/metadata/metadata-store.ts":{"bytesInOutput":5006},"packages/core/echo/echo-pipeline/src/metadata/index.ts":{"bytesInOutput":0},"packages/core/echo/echo-pipeline/src/common/codec.ts":{"bytesInOutput":223},"packages/core/echo/echo-pipeline/src/common/feeds.ts":{"bytesInOutput":219},"packages/core/echo/echo-pipeline/src/common/index.ts":{"bytesInOutput":0},"packages/core/echo/echo-pipeline/src/pipeline/timeframe-clock.ts":{"bytesInOutput":2223},"packages/core/echo/echo-pipeline/src/pipeline/pipeline.ts":{"bytesInOutput":5575},"packages/core/echo/echo-pipeline/src/pipeline/message-selector.ts":{"bytesInOutput":436},"packages/core/echo/echo-pipeline/src/pipeline/index.ts":{"bytesInOutput":0},"packages/core/echo/echo-pipeline/src/space/auth.ts":{"bytesInOutput":2582},"packages/core/echo/echo-pipeline/src/space/space.ts":{"bytesInOutput":5545},"packages/core/echo/echo-pipeline/src/space/control-pipeline.ts":{"bytesInOutput":3379},"packages/core/echo/echo-pipeline/src/space/space-protocol.ts":{"bytesInOutput":5851},"packages/core/echo/echo-pipeline/src/space/space-manager.ts":{"bytesInOutput":2328},"packages/core/echo/echo-pipeline/src/space/genesis.ts":{"bytesInOutput":1931},"packages/core/echo/echo-pipeline/src/dbhost/data-service-host.ts":{"bytesInOutput":2393},"packages/core/echo/echo-pipeline/src/dbhost/database-backend.ts":{"bytesInOutput":983},"packages/core/echo/echo-pipeline/src/dbhost/snapshot-manager.ts":{"bytesInOutput":2094},"packages/core/echo/echo-pipeline/src/dbhost/snapshot-store.ts":{"bytesInOutput":1050},"packages/core/echo/echo-pipeline/src/dbhost/data-service.ts":{"bytesInOutput":1578},"packages/core/echo/echo-pipeline/src/dbhost/index.ts":{"bytesInOutput":0},"packages/core/echo/echo-pipeline/src/space/data-pipeline-controller.ts":{"bytesInOutput":6957},"packages/core/echo/echo-pipeline/src/space/index.ts":{"bytesInOutput":0}},"bytes":52235}}}
|
|
@@ -13,7 +13,7 @@ import {
|
|
|
13
13
|
SpaceManager,
|
|
14
14
|
SpaceProtocol,
|
|
15
15
|
valueEncoding
|
|
16
|
-
} from "../chunk-
|
|
16
|
+
} from "../chunk-QMDRF3NL.mjs";
|
|
17
17
|
|
|
18
18
|
// packages/core/echo/echo-pipeline/src/testing/test-agent-builder.ts
|
|
19
19
|
import { DocumentModel } from "@dxos/document-model";
|
|
@@ -22,7 +22,7 @@ import { MemorySignalManager, MemorySignalManagerContext, WebsocketSignalManager
|
|
|
22
22
|
import { ModelFactory } from "@dxos/model-factory";
|
|
23
23
|
import { createWebRTCTransportFactory, MemoryTransportFactory, NetworkManager } from "@dxos/network-manager";
|
|
24
24
|
import { createStorage, StorageType } from "@dxos/random-access-storage";
|
|
25
|
-
import { Presence } from "@dxos/teleport-extension-
|
|
25
|
+
import { Gossip, Presence } from "@dxos/teleport-extension-gossip";
|
|
26
26
|
import { ComplexMap } from "@dxos/util";
|
|
27
27
|
|
|
28
28
|
// packages/core/echo/echo-pipeline/src/testing/test-feed-builder.ts
|
|
@@ -140,7 +140,7 @@ var TestAgent = class {
|
|
|
140
140
|
dataPipelineController
|
|
141
141
|
];
|
|
142
142
|
}
|
|
143
|
-
createSpaceProtocol(topic,
|
|
143
|
+
createSpaceProtocol(topic, gossip) {
|
|
144
144
|
return new SpaceProtocol({
|
|
145
145
|
topic,
|
|
146
146
|
swarmIdentity: {
|
|
@@ -150,18 +150,23 @@ var TestAgent = class {
|
|
|
150
150
|
},
|
|
151
151
|
networkManager: this._networkManagerProvider(),
|
|
152
152
|
onSessionAuth: (session) => {
|
|
153
|
-
session.addExtension("dxos.mesh.teleport.
|
|
153
|
+
session.addExtension("dxos.mesh.teleport.gossip", (gossip != null ? gossip : this.createGossip()).createExtension({
|
|
154
154
|
remotePeerId: session.remotePeerId
|
|
155
155
|
}));
|
|
156
156
|
}
|
|
157
157
|
});
|
|
158
158
|
}
|
|
159
|
-
|
|
159
|
+
createGossip() {
|
|
160
|
+
return new Gossip({
|
|
161
|
+
localPeerId: this.deviceKey
|
|
162
|
+
});
|
|
163
|
+
}
|
|
164
|
+
createPresence(gossip) {
|
|
160
165
|
return new Presence({
|
|
161
|
-
localPeerId: this.deviceKey,
|
|
162
166
|
announceInterval: 30,
|
|
163
167
|
offlineTimeout: 200,
|
|
164
|
-
identityKey: this.identityKey
|
|
168
|
+
identityKey: this.identityKey,
|
|
169
|
+
gossip: gossip != null ? gossip : this.createGossip()
|
|
165
170
|
});
|
|
166
171
|
}
|
|
167
172
|
};
|
|
@@ -178,7 +183,7 @@ var createMemoryDatabase = async (modelFactory) => {
|
|
|
178
183
|
const feed = new MockFeedWriter();
|
|
179
184
|
const backend = new DatabaseBackendHost(feed, void 0);
|
|
180
185
|
feed.written.on(([data, meta]) => backend.echoProcessor({
|
|
181
|
-
|
|
186
|
+
batch: data.batch,
|
|
182
187
|
meta: {
|
|
183
188
|
...meta,
|
|
184
189
|
memberKey: PublicKey2.random(),
|
|
@@ -214,14 +219,18 @@ var testLocalDatabase = async (create, check = create) => {
|
|
|
214
219
|
var _a;
|
|
215
220
|
const objectId = PublicKey2.random().toHex();
|
|
216
221
|
await ((_a = create.databaseBackend.getWriteStream()) == null ? void 0 : _a.write({
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
+
batch: {
|
|
223
|
+
objects: [
|
|
224
|
+
{
|
|
225
|
+
objectId,
|
|
226
|
+
genesis: {
|
|
227
|
+
modelType: DocumentModel2.meta.type
|
|
228
|
+
}
|
|
229
|
+
}
|
|
230
|
+
]
|
|
222
231
|
}
|
|
223
232
|
}));
|
|
224
|
-
await asyncTimeout(check.
|
|
233
|
+
await asyncTimeout(check.databaseBackend._itemDemuxer.mutation.waitForCondition(() => check._itemManager.entities.has(objectId)), 500);
|
|
225
234
|
};
|
|
226
235
|
export {
|
|
227
236
|
MemoryNetworkManagerProvider,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../src/testing/test-agent-builder.ts", "../../../../src/testing/test-feed-builder.ts", "../../../../src/testing/util.ts"],
|
|
4
|
-
"sourcesContent": ["//\n// Copyright 2022 DXOS.org\n//\n\nimport { DocumentModel } from '@dxos/document-model';\nimport { FeedStore } from '@dxos/feed-store';\nimport { Keyring } from '@dxos/keyring';\nimport { PublicKey } from '@dxos/keys';\nimport { MemorySignalManager, MemorySignalManagerContext, WebsocketSignalManager } from '@dxos/messaging';\nimport { ModelFactory } from '@dxos/model-factory';\nimport { createWebRTCTransportFactory, MemoryTransportFactory, NetworkManager } from '@dxos/network-manager';\nimport type { FeedMessage } from '@dxos/protocols/proto/dxos/echo/feed';\nimport { createStorage, Storage, StorageType } from '@dxos/random-access-storage';\nimport { Presence } from '@dxos/teleport-extension-
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;AAIA,SAASA,qBAAqB;AAG9B,SAASC,iBAAiB;AAC1B,SAASC,qBAAqBC,4BAA4BC,8BAA8B;AACxF,SAASC,oBAAoB;AAC7B,SAASC,8BAA8BC,wBAAwBC,sBAAsB;AAErF,SAASC,eAAwBC,mBAAmB;AACpD,SAASC,gBAAgB;
|
|
6
|
-
"names": ["DocumentModel", "PublicKey", "MemorySignalManager", "MemorySignalManagerContext", "WebsocketSignalManager", "ModelFactory", "createWebRTCTransportFactory", "MemoryTransportFactory", "NetworkManager", "createStorage", "StorageType", "Presence", "ComplexMap", "TestBuilder", "TestFeedBuilder", "TestBuilder", "constructor", "valueEncoding", "MemoryNetworkManagerProvider", "signalContext", "NetworkManager", "signalManager", "MemorySignalManager", "transportFactory", "MemoryTransportFactory", "WebsocketNetworkManagerProvider", "signalUrl", "WebsocketSignalManager", "createWebRTCTransportFactory", "TestAgentBuilder", "constructor", "storage", "networkManagerProvider", "_agents", "ComplexMap", "PublicKey", "hash", "_storage", "createStorage", "type", "StorageType", "RAM", "_networkManagerProvider", "MemorySignalManagerContext", "close", "Promise", "all", "agents", "map", "agent", "Array", "from", "values", "getAgent", "deviceKey", "get", "createPeer", "feedBuilder", "TestFeedBuilder", "setStorage", "size", "identityKey", "keyring", "createKey", "TestAgent", "set", "_feedBuilder", "_spaces", "feedStore", "createFeedStore", "spaces", "space", "getSpace", "spaceKey", "createSpaceManager", "SpaceManager", "networkManager", "createSpace", "genesisKey", "dataFeedKey", "dataFeed", "openFeed", "writable", "controlFeedKey", "controlFeed", "genesisFeed", "snapshotManager", "SnapshotManager", "SnapshotStore", "createDirectory", "metadataStore", "MetadataStore", "addSpace", "key", "dataPipelineController", "DataPipelineControllerImpl", "modelFactory", "ModelFactory", "registerModel", "DocumentModel", "memberKey", "feedInfoProvider", "feedKey", "spaceState", "feeds", "snapshotId", "undefined", "Space", "protocol", "createSpaceProtocol", "feedProvider", "setControlFeed", "setDataFeed", "open", "initDataPipeline", "topic", "
|
|
4
|
+
"sourcesContent": ["//\n// Copyright 2022 DXOS.org\n//\n\nimport { DocumentModel } from '@dxos/document-model';\nimport { FeedStore } from '@dxos/feed-store';\nimport { Keyring } from '@dxos/keyring';\nimport { PublicKey } from '@dxos/keys';\nimport { MemorySignalManager, MemorySignalManagerContext, WebsocketSignalManager } from '@dxos/messaging';\nimport { ModelFactory } from '@dxos/model-factory';\nimport { createWebRTCTransportFactory, MemoryTransportFactory, NetworkManager } from '@dxos/network-manager';\nimport type { FeedMessage } from '@dxos/protocols/proto/dxos/echo/feed';\nimport { createStorage, Storage, StorageType } from '@dxos/random-access-storage';\nimport { Gossip, Presence } from '@dxos/teleport-extension-gossip';\nimport { ComplexMap } from '@dxos/util';\n\nimport { SnapshotManager, SnapshotStore } from '../dbhost';\nimport { MetadataStore } from '../metadata';\nimport { MOCK_AUTH_PROVIDER, MOCK_AUTH_VERIFIER, Space, SpaceManager, SpaceProtocol } from '../space';\nimport { DataPipelineControllerImpl } from '../space/data-pipeline-controller';\nimport { TestFeedBuilder } from './test-feed-builder';\n\nexport type NetworkManagerProvider = () => NetworkManager;\n\nexport const MemoryNetworkManagerProvider =\n (signalContext: MemorySignalManagerContext): NetworkManagerProvider =>\n () =>\n new NetworkManager({\n signalManager: new MemorySignalManager(signalContext),\n transportFactory: MemoryTransportFactory\n });\n\nexport const WebsocketNetworkManagerProvider =\n (signalUrl: string): NetworkManagerProvider =>\n () =>\n new NetworkManager({\n signalManager: new WebsocketSignalManager([signalUrl]),\n transportFactory: createWebRTCTransportFactory()\n });\n\nexport type TestAgentBuilderOptions = {\n storage?: Storage;\n networkManagerProvider?: NetworkManagerProvider;\n};\n\n/**\n * Factory for test agents.\n */\nexport class TestAgentBuilder {\n private readonly _agents = new ComplexMap<PublicKey, TestAgent>(PublicKey.hash);\n private readonly _storage: Storage;\n private readonly _networkManagerProvider: NetworkManagerProvider;\n\n constructor({ storage, networkManagerProvider }: TestAgentBuilderOptions = {}) {\n this._storage = storage ?? createStorage({ type: StorageType.RAM });\n this._networkManagerProvider =\n networkManagerProvider ?? MemoryNetworkManagerProvider(new MemorySignalManagerContext());\n }\n\n async close() {\n return Promise.all(this.agents.map((agent) => agent.close()));\n }\n\n get agents() {\n return Array.from(this._agents.values());\n }\n\n getAgent(deviceKey: PublicKey) {\n return this._agents.get(deviceKey);\n }\n\n async createPeer(): Promise<TestAgent> {\n // prettier-ignore\n const feedBuilder = new TestFeedBuilder()\n .setStorage(this._storage, `agent-${this._agents.size}`);\n\n const identityKey = await feedBuilder.keyring.createKey();\n const deviceKey = await feedBuilder.keyring.createKey();\n\n const agent = new TestAgent(this._networkManagerProvider, feedBuilder, identityKey, deviceKey);\n this._agents.set(deviceKey, agent);\n return agent;\n }\n}\n\n/**\n * Test agent that enables the creation and replication of multiple spaces.\n */\nexport class TestAgent {\n private readonly _spaces = new ComplexMap<PublicKey, Space>(PublicKey.hash);\n\n public readonly keyring: Keyring;\n public readonly feedStore: FeedStore<FeedMessage>;\n\n constructor(\n private readonly _networkManagerProvider: NetworkManagerProvider,\n private readonly _feedBuilder: TestFeedBuilder,\n public readonly identityKey: PublicKey,\n public readonly deviceKey: PublicKey\n ) {\n this.keyring = this._feedBuilder.keyring;\n this.feedStore = this._feedBuilder.createFeedStore();\n }\n\n async close() {\n return Promise.all([...this.spaces.map((space) => space.close())]);\n }\n\n get spaces() {\n return Array.from(this._spaces.values());\n }\n\n getSpace(spaceKey: PublicKey) {\n return this._spaces.get(spaceKey);\n }\n\n createSpaceManager() {\n return new SpaceManager({\n feedStore: this._feedBuilder.createFeedStore(),\n networkManager: this._networkManagerProvider()\n });\n }\n\n async createSpace(\n identityKey: PublicKey = this.identityKey,\n spaceKey?: PublicKey,\n genesisKey?: PublicKey\n ): Promise<[Space, DataPipelineControllerImpl]> {\n if (!spaceKey) {\n spaceKey = await this.keyring.createKey();\n }\n\n const dataFeedKey = await this.keyring.createKey();\n const dataFeed = await this.feedStore.openFeed(dataFeedKey, { writable: true });\n\n const controlFeedKey = await this.keyring.createKey();\n const controlFeed = await this.feedStore.openFeed(controlFeedKey, { writable: true });\n const genesisFeed = genesisKey ? await this.feedStore.openFeed(genesisKey) : controlFeed;\n const snapshotManager = new SnapshotManager(new SnapshotStore(createStorage().createDirectory('snapshots')));\n\n const metadataStore = new MetadataStore(createStorage().createDirectory('metadata'));\n await metadataStore.addSpace({ key: spaceKey });\n const dataPipelineController: DataPipelineControllerImpl = new DataPipelineControllerImpl({\n modelFactory: new ModelFactory().registerModel(DocumentModel),\n metadataStore,\n snapshotManager,\n memberKey: identityKey,\n spaceKey,\n feedInfoProvider: (feedKey) => space.spaceState.feeds.get(feedKey),\n snapshotId: undefined\n });\n const space = new Space({\n spaceKey,\n protocol: this.createSpaceProtocol(spaceKey),\n genesisFeed,\n feedProvider: (feedKey) => this.feedStore.openFeed(feedKey)\n })\n .setControlFeed(controlFeed)\n .setDataFeed(dataFeed);\n await space.open();\n await space.initDataPipeline(dataPipelineController);\n\n this._spaces.set(spaceKey, space);\n return [space, dataPipelineController];\n }\n\n createSpaceProtocol(topic: PublicKey, gossip?: Gossip) {\n return new SpaceProtocol({\n topic,\n swarmIdentity: {\n peerKey: this.deviceKey,\n credentialProvider: MOCK_AUTH_PROVIDER,\n credentialAuthenticator: MOCK_AUTH_VERIFIER\n },\n networkManager: this._networkManagerProvider(),\n onSessionAuth: (session) => {\n session.addExtension(\n 'dxos.mesh.teleport.gossip',\n (gossip ?? this.createGossip()).createExtension({ remotePeerId: session.remotePeerId })\n );\n }\n });\n }\n\n createGossip() {\n return new Gossip({\n localPeerId: this.deviceKey\n });\n }\n\n createPresence(gossip?: Gossip) {\n return new Presence({\n announceInterval: 30,\n offlineTimeout: 200,\n identityKey: this.identityKey,\n gossip: gossip ?? this.createGossip()\n });\n }\n}\n", "//\n// Copyright 2022 DXOS.org\n//\n\nimport { TestBuilder } from '@dxos/feed-store/testing';\nimport type { FeedMessage } from '@dxos/protocols/proto/dxos/echo/feed';\n\nimport { valueEncoding } from '../common';\n\n/**\n * Builder with default encoder and generator.\n */\nexport class TestFeedBuilder extends TestBuilder<FeedMessage> {\n constructor() {\n super({\n valueEncoding\n });\n }\n}\n", "//\n// Copyright 2021 DXOS.org\n//\n\nimport { asyncTimeout } from '@dxos/async';\nimport { DocumentModel } from '@dxos/document-model';\nimport { DatabaseBackendProxy, ItemManager } from '@dxos/echo-db';\nimport { MockFeedWriter } from '@dxos/feed-store/testing';\nimport { PublicKey } from '@dxos/keys';\nimport { ModelFactory } from '@dxos/model-factory';\nimport { DataMessage } from '@dxos/protocols/proto/dxos/echo/feed';\nimport { Timeframe } from '@dxos/timeframe';\n\nimport { DatabaseBackendHost, DataServiceHost, DataServiceImpl, DataServiceSubscriptions } from '../dbhost';\nimport { DataPipelineControllerImpl } from '../space';\n\nexport const createMemoryDatabase = async (modelFactory: ModelFactory) => {\n const feed = new MockFeedWriter<DataMessage>();\n const backend = new DatabaseBackendHost(feed, undefined);\n\n feed.written.on(([data, meta]) =>\n backend.echoProcessor({\n batch: data.batch,\n meta: {\n ...meta,\n memberKey: PublicKey.random(),\n timeframe: new Timeframe([[meta.feedKey, meta.seq]])\n }\n })\n );\n\n const itemManager = new ItemManager(modelFactory);\n await backend.open(itemManager, new ModelFactory().registerModel(DocumentModel));\n return {\n backend,\n itemManager\n };\n};\n\nexport const createRemoteDatabaseFromDataServiceHost = async (\n modelFactory: ModelFactory,\n dataServiceHost: DataServiceHost\n) => {\n const dataServiceSubscriptions = new DataServiceSubscriptions();\n const dataService = new DataServiceImpl(dataServiceSubscriptions);\n\n const spaceKey = PublicKey.random();\n dataServiceSubscriptions.registerSpace(spaceKey, dataServiceHost);\n\n const backend = new DatabaseBackendProxy(dataService, spaceKey);\n const itemManager = new ItemManager(modelFactory);\n await backend.open(itemManager, new ModelFactory().registerModel(DocumentModel));\n return {\n itemManager,\n backend\n };\n};\n\nexport const testLocalDatabase = async (\n create: DataPipelineControllerImpl,\n check: DataPipelineControllerImpl = create\n) => {\n const objectId = PublicKey.random().toHex();\n await create.databaseBackend!.getWriteStream()?.write({\n batch: {\n objects: [\n {\n objectId,\n genesis: {\n modelType: DocumentModel.meta.type\n }\n }\n ]\n }\n });\n\n await asyncTimeout(\n check.databaseBackend!._itemDemuxer.mutation.waitForCondition(() => check._itemManager.entities.has(objectId)),\n 500\n );\n};\n"],
|
|
5
|
+
"mappings": "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",
|
|
6
|
+
"names": ["DocumentModel", "PublicKey", "MemorySignalManager", "MemorySignalManagerContext", "WebsocketSignalManager", "ModelFactory", "createWebRTCTransportFactory", "MemoryTransportFactory", "NetworkManager", "createStorage", "StorageType", "Gossip", "Presence", "ComplexMap", "TestBuilder", "TestFeedBuilder", "TestBuilder", "constructor", "valueEncoding", "MemoryNetworkManagerProvider", "signalContext", "NetworkManager", "signalManager", "MemorySignalManager", "transportFactory", "MemoryTransportFactory", "WebsocketNetworkManagerProvider", "signalUrl", "WebsocketSignalManager", "createWebRTCTransportFactory", "TestAgentBuilder", "constructor", "storage", "networkManagerProvider", "_agents", "ComplexMap", "PublicKey", "hash", "_storage", "createStorage", "type", "StorageType", "RAM", "_networkManagerProvider", "MemorySignalManagerContext", "close", "Promise", "all", "agents", "map", "agent", "Array", "from", "values", "getAgent", "deviceKey", "get", "createPeer", "feedBuilder", "TestFeedBuilder", "setStorage", "size", "identityKey", "keyring", "createKey", "TestAgent", "set", "_feedBuilder", "_spaces", "feedStore", "createFeedStore", "spaces", "space", "getSpace", "spaceKey", "createSpaceManager", "SpaceManager", "networkManager", "createSpace", "genesisKey", "dataFeedKey", "dataFeed", "openFeed", "writable", "controlFeedKey", "controlFeed", "genesisFeed", "snapshotManager", "SnapshotManager", "SnapshotStore", "createDirectory", "metadataStore", "MetadataStore", "addSpace", "key", "dataPipelineController", "DataPipelineControllerImpl", "modelFactory", "ModelFactory", "registerModel", "DocumentModel", "memberKey", "feedInfoProvider", "feedKey", "spaceState", "feeds", "snapshotId", "undefined", "Space", "protocol", "createSpaceProtocol", "feedProvider", "setControlFeed", "setDataFeed", "open", "initDataPipeline", "topic", "gossip", "SpaceProtocol", "swarmIdentity", "peerKey", "credentialProvider", "MOCK_AUTH_PROVIDER", "credentialAuthenticator", "MOCK_AUTH_VERIFIER", "onSessionAuth", "session", "addExtension", "createGossip", "createExtension", "remotePeerId", "Gossip", "localPeerId", "createPresence", "Presence", "announceInterval", "offlineTimeout", "asyncTimeout", "DocumentModel", "DatabaseBackendProxy", "ItemManager", "MockFeedWriter", "PublicKey", "ModelFactory", "Timeframe", "createMemoryDatabase", "modelFactory", "feed", "MockFeedWriter", "backend", "DatabaseBackendHost", "undefined", "written", "on", "data", "meta", "echoProcessor", "batch", "memberKey", "PublicKey", "random", "timeframe", "Timeframe", "feedKey", "seq", "itemManager", "ItemManager", "open", "ModelFactory", "registerModel", "DocumentModel", "createRemoteDatabaseFromDataServiceHost", "dataServiceHost", "dataServiceSubscriptions", "DataServiceSubscriptions", "dataService", "DataServiceImpl", "spaceKey", "registerSpace", "DatabaseBackendProxy", "testLocalDatabase", "create", "check", "objectId", "toHex", "databaseBackend", "getWriteStream", "write", "objects", "genesis", "modelType", "type", "asyncTimeout", "_itemDemuxer", "mutation", "waitForCondition", "_itemManager", "entities", "has"]
|
|
7
7
|
}
|
package/dist/lib/node/index.cjs
CHANGED
|
@@ -1220,11 +1220,49 @@ var import_credentials4 = require("@dxos/credentials");
|
|
|
1220
1220
|
var import_debug4 = require("@dxos/debug");
|
|
1221
1221
|
var import_credentials5 = require("@dxos/protocols/proto/dxos/halo/credentials");
|
|
1222
1222
|
var spaceGenesis = async (keyring, signingContext, space) => {
|
|
1223
|
-
var _a, _b;
|
|
1224
|
-
const generator = new import_credentials4.CredentialGenerator(keyring, signingContext.identityKey, signingContext.deviceKey);
|
|
1223
|
+
var _a, _b, _c;
|
|
1225
1224
|
const credentials = [
|
|
1226
|
-
|
|
1227
|
-
|
|
1225
|
+
await (0, import_credentials4.createCredential)({
|
|
1226
|
+
signer: keyring,
|
|
1227
|
+
issuer: space.key,
|
|
1228
|
+
subject: space.key,
|
|
1229
|
+
assertion: {
|
|
1230
|
+
"@type": "dxos.halo.credentials.SpaceGenesis",
|
|
1231
|
+
spaceKey: space.key
|
|
1232
|
+
}
|
|
1233
|
+
}),
|
|
1234
|
+
await (0, import_credentials4.createCredential)({
|
|
1235
|
+
signer: keyring,
|
|
1236
|
+
issuer: space.key,
|
|
1237
|
+
subject: signingContext.identityKey,
|
|
1238
|
+
assertion: {
|
|
1239
|
+
"@type": "dxos.halo.credentials.SpaceMember",
|
|
1240
|
+
spaceKey: space.key,
|
|
1241
|
+
role: import_credentials5.SpaceMember.Role.ADMIN,
|
|
1242
|
+
profile: signingContext.profile,
|
|
1243
|
+
genesisFeedKey: (_a = space.controlFeedKey) != null ? _a : (0, import_debug4.failUndefined)()
|
|
1244
|
+
}
|
|
1245
|
+
}),
|
|
1246
|
+
await signingContext.credentialSigner.createCredential({
|
|
1247
|
+
subject: (_b = space.controlFeedKey) != null ? _b : (0, import_debug4.failUndefined)(),
|
|
1248
|
+
assertion: {
|
|
1249
|
+
"@type": "dxos.halo.credentials.AdmittedFeed",
|
|
1250
|
+
spaceKey: space.key,
|
|
1251
|
+
identityKey: signingContext.identityKey,
|
|
1252
|
+
deviceKey: signingContext.deviceKey,
|
|
1253
|
+
designation: import_credentials5.AdmittedFeed.Designation.CONTROL
|
|
1254
|
+
}
|
|
1255
|
+
}),
|
|
1256
|
+
await signingContext.credentialSigner.createCredential({
|
|
1257
|
+
subject: (_c = space.dataFeedKey) != null ? _c : (0, import_debug4.failUndefined)(),
|
|
1258
|
+
assertion: {
|
|
1259
|
+
"@type": "dxos.halo.credentials.AdmittedFeed",
|
|
1260
|
+
spaceKey: space.key,
|
|
1261
|
+
identityKey: signingContext.identityKey,
|
|
1262
|
+
deviceKey: signingContext.deviceKey,
|
|
1263
|
+
designation: import_credentials5.AdmittedFeed.Designation.DATA
|
|
1264
|
+
}
|
|
1265
|
+
})
|
|
1228
1266
|
];
|
|
1229
1267
|
for (const credential of credentials) {
|
|
1230
1268
|
await space.controlPipeline.writer.write({
|
|
@@ -1269,56 +1307,53 @@ var DataServiceHost = class {
|
|
|
1269
1307
|
objects
|
|
1270
1308
|
}
|
|
1271
1309
|
});
|
|
1272
|
-
this._itemDemuxer.mutation.on(ctx, (
|
|
1310
|
+
this._itemDemuxer.mutation.on(ctx, (message) => {
|
|
1273
1311
|
var _a;
|
|
1312
|
+
const { batch, meta } = message;
|
|
1274
1313
|
(0, import_log9.log)("Object update", {
|
|
1275
|
-
|
|
1314
|
+
batch,
|
|
1315
|
+
meta
|
|
1276
1316
|
}, {
|
|
1277
1317
|
file: "data-service-host.ts",
|
|
1278
|
-
line:
|
|
1318
|
+
line: 50,
|
|
1279
1319
|
scope: this,
|
|
1280
1320
|
callSite: (f, a) => f(...a)
|
|
1281
1321
|
});
|
|
1282
1322
|
const clientTag = this._clientTagMap.get([
|
|
1283
|
-
|
|
1284
|
-
|
|
1323
|
+
message.meta.feedKey,
|
|
1324
|
+
message.meta.seq
|
|
1285
1325
|
]);
|
|
1286
|
-
|
|
1287
|
-
|
|
1288
|
-
|
|
1289
|
-
...mutation.data,
|
|
1290
|
-
mutations: (_a = mutation.data.mutations) == null ? void 0 : _a.map((m, mutationIdx) => ({
|
|
1291
|
-
...m,
|
|
1292
|
-
meta: mutation.meta
|
|
1293
|
-
})),
|
|
1294
|
-
meta: mutation.meta
|
|
1295
|
-
}
|
|
1296
|
-
]
|
|
1297
|
-
};
|
|
1326
|
+
(_a = batch.objects) == null ? void 0 : _a.forEach((object) => {
|
|
1327
|
+
(0, import_echo_db.setMetadataOnObject)(object, meta);
|
|
1328
|
+
});
|
|
1298
1329
|
if (clientTag) {
|
|
1299
1330
|
(0, import_echo_db.tagMutationsInBatch)(batch, clientTag);
|
|
1300
1331
|
}
|
|
1301
1332
|
next({
|
|
1302
1333
|
clientTag,
|
|
1303
|
-
feedKey:
|
|
1304
|
-
seq:
|
|
1334
|
+
feedKey: message.meta.feedKey,
|
|
1335
|
+
seq: message.meta.seq,
|
|
1305
1336
|
batch
|
|
1306
1337
|
});
|
|
1307
1338
|
});
|
|
1308
1339
|
});
|
|
1309
1340
|
}
|
|
1310
1341
|
async write(request) {
|
|
1311
|
-
var _a
|
|
1342
|
+
var _a;
|
|
1312
1343
|
(0, import_node_assert7.default)(this._writeStream, "Cannot write mutations in readonly mode");
|
|
1313
|
-
(0, import_node_assert7.default)(((_a = request.batch.objects) == null ? void 0 : _a.length) === 1, "Only single object mutations are supported");
|
|
1314
1344
|
const receipt = await this._writeStream.write({
|
|
1315
|
-
|
|
1316
|
-
|
|
1317
|
-
|
|
1318
|
-
|
|
1319
|
-
|
|
1320
|
-
|
|
1321
|
-
|
|
1345
|
+
batch: {
|
|
1346
|
+
objects: (_a = request.batch.objects) == null ? void 0 : _a.map((object) => {
|
|
1347
|
+
var _a2;
|
|
1348
|
+
return {
|
|
1349
|
+
...object,
|
|
1350
|
+
mutations: (_a2 = object.mutations) == null ? void 0 : _a2.map((m) => ({
|
|
1351
|
+
...m,
|
|
1352
|
+
meta: void 0
|
|
1353
|
+
})),
|
|
1354
|
+
meta: void 0
|
|
1355
|
+
};
|
|
1356
|
+
})
|
|
1322
1357
|
}
|
|
1323
1358
|
});
|
|
1324
1359
|
if (request.clientTag) {
|
|
@@ -1670,7 +1705,7 @@ var DataPipelineControllerImpl = class DataPipelineControllerImpl2 {
|
|
|
1670
1705
|
continue;
|
|
1671
1706
|
}
|
|
1672
1707
|
await this.databaseBackend.echoProcessor({
|
|
1673
|
-
|
|
1708
|
+
batch: data.payload.data.batch,
|
|
1674
1709
|
meta: {
|
|
1675
1710
|
feedKey,
|
|
1676
1711
|
seq,
|