@dxos/network-manager 0.8.4-main.fd6878d → 0.8.4-main.fffef41
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-JUVDHWW4.mjs → chunk-E3P563GT.mjs} +77 -122
- package/dist/lib/browser/{chunk-JUVDHWW4.mjs.map → chunk-E3P563GT.mjs.map} +2 -2
- package/dist/lib/browser/index.mjs +1 -1
- package/dist/lib/browser/meta.json +1 -1
- package/dist/lib/browser/testing/index.mjs +42 -50
- package/dist/lib/browser/testing/index.mjs.map +2 -2
- package/dist/lib/node-esm/{chunk-HUSU3OKQ.mjs → chunk-PKBROUZV.mjs} +77 -122
- package/dist/lib/node-esm/{chunk-HUSU3OKQ.mjs.map → chunk-PKBROUZV.mjs.map} +2 -2
- package/dist/lib/node-esm/index.mjs +1 -1
- package/dist/lib/node-esm/meta.json +1 -1
- package/dist/lib/node-esm/testing/index.mjs +42 -50
- package/dist/lib/node-esm/testing/index.mjs.map +2 -2
- package/dist/lib/node-esm/transport/tcp/index.mjs +7 -14
- package/dist/lib/node-esm/transport/tcp/index.mjs.map +2 -2
- package/dist/types/tsconfig.tsbuildinfo +1 -1
- package/package.json +19 -29
- package/src/swarm/connection.test.ts +2 -1
- package/src/swarm/swarm.test.ts +2 -1
- package/src/tests/webrtc-transport.test.ts +4 -2
- package/src/transport/webrtc/rtc-transport-proxy.test.ts +2 -1
- package/src/transport/webrtc/rtc-transport.test.ts +2 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"inputs":{"src/swarm/connection.ts":{"bytes":55658,"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/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}],"format":"esm"},"src/signal/ice.ts":{"bytes":4538,"imports":[{"path":"@dxos/async","kind":"import-statement","external":true},{"path":"@dxos/log","kind":"import-statement","external":true},{"path":"@dxos/util","kind":"import-statement","external":true}],"format":"esm"},"src/signal/swarm-messenger.ts":{"bytes":22177,"imports":[{"path":"@dxos/context","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","kind":"import-statement","external":true},{"path":"@dxos/util","kind":"import-statement","external":true}],"format":"esm"},"src/signal/index.ts":{"bytes":678,"imports":[{"path":"src/signal/ice.ts","kind":"import-statement","original":"./ice"},{"path":"src/signal/swarm-messenger.ts","kind":"import-statement","original":"./swarm-messenger"}],"format":"esm"},"src/swarm/peer.ts":{"bytes":47308,"imports":[{"path":"@dxos/async","kind":"import-statement","external":true},{"path":"@dxos/context","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":"src/swarm/connection.ts","kind":"import-statement","original":"./connection"}],"format":"esm"},"src/swarm/swarm.ts":{"bytes":55244,"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/invariant","kind":"import-statement","external":true},{"path":"@dxos/keys","kind":"import-statement","external":true},{"path":"@dxos/log","kind":"import-statement","external":true},{"path":"@dxos/messaging","kind":"import-statement","external":true},{"path":"@dxos/protocols","kind":"import-statement","external":true},{"path":"@dxos/util","kind":"import-statement","external":true},{"path":"src/signal/index.ts","kind":"import-statement","original":"../signal"},{"path":"src/swarm/connection.ts","kind":"import-statement","original":"./connection"},{"path":"src/swarm/peer.ts","kind":"import-statement","original":"./peer"}],"format":"esm"},"src/swarm/swarm-mapper.ts":{"bytes":12240,"imports":[{"path":"@dxos/async","kind":"import-statement","external":true},{"path":"@dxos/keys","kind":"import-statement","external":true},{"path":"@dxos/log","kind":"import-statement","external":true},{"path":"@dxos/messaging","kind":"import-statement","external":true},{"path":"@dxos/util","kind":"import-statement","external":true}],"format":"esm"},"src/swarm/connection-limiter.ts":{"bytes":8455,"imports":[{"path":"@dxos/async","kind":"import-statement","external":true},{"path":"@dxos/context","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/util","kind":"import-statement","external":true}],"format":"esm"},"src/swarm/index.ts":{"bytes":768,"imports":[{"path":"src/swarm/connection.ts","kind":"import-statement","original":"./connection"},{"path":"src/swarm/swarm.ts","kind":"import-statement","original":"./swarm"},{"path":"src/swarm/swarm-mapper.ts","kind":"import-statement","original":"./swarm-mapper"},{"path":"src/swarm/connection-limiter.ts","kind":"import-statement","original":"./connection-limiter"}],"format":"esm"},"src/connection-log.ts":{"bytes":16208,"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/util","kind":"import-statement","external":true},{"path":"src/swarm/index.ts","kind":"import-statement","original":"./swarm"}],"format":"esm"},"src/network-manager.ts":{"bytes":27172,"imports":[{"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/messaging","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":"src/connection-log.ts","kind":"import-statement","original":"./connection-log"},{"path":"src/swarm/index.ts","kind":"import-statement","original":"./swarm"}],"format":"esm"},"src/topology/fully-connected-topology.ts":{"bytes":3536,"imports":[{"path":"@dxos/invariant","kind":"import-statement","external":true}],"format":"esm"},"src/topology/mmst-topology.ts":{"bytes":20376,"imports":[{"path":"@dxos/invariant","kind":"import-statement","external":true},{"path":"@dxos/log","kind":"import-statement","external":true}],"format":"esm"},"src/topology/star-topology.ts":{"bytes":8007,"imports":[{"path":"@dxos/invariant","kind":"import-statement","external":true},{"path":"@dxos/log","kind":"import-statement","external":true}],"format":"esm"},"src/topology/index.ts":{"bytes":760,"imports":[{"path":"src/topology/fully-connected-topology.ts","kind":"import-statement","original":"./fully-connected-topology"},{"path":"src/topology/mmst-topology.ts","kind":"import-statement","original":"./mmst-topology"},{"path":"src/topology/star-topology.ts","kind":"import-statement","original":"./star-topology"}],"format":"esm"},"src/transport/memory-transport.ts":{"bytes":23275,"imports":[{"path":"node:stream","kind":"import-statement","external":true},{"path":"@dxos/async","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}],"format":"esm"},"src/transport/transport.ts":{"bytes":3009,"imports":[],"format":"esm"},"src/transport/webrtc/rtc-connection-factory.ts":{"bytes":8665,"imports":[{"path":"@dxos/async","kind":"import-statement","external":true},{"path":"#node-datachannel","kind":"dynamic-import","external":true},{"path":"#node-datachannel/polyfill","kind":"dynamic-import","external":true}],"format":"esm"},"src/transport/webrtc/rtc-transport-stats.ts":{"bytes":7336,"imports":[],"format":"esm"},"src/transport/webrtc/rtc-transport-channel.ts":{"bytes":22841,"imports":[{"path":"node:stream","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/invariant","kind":"import-statement","external":true},{"path":"@dxos/log","kind":"import-statement","external":true},{"path":"@dxos/protocols","kind":"import-statement","external":true},{"path":"src/transport/webrtc/rtc-transport-stats.ts","kind":"import-statement","original":"./rtc-transport-stats"}],"format":"esm"},"src/transport/webrtc/utils.ts":{"bytes":3889,"imports":[],"format":"esm"},"src/transport/webrtc/rtc-peer-connection.ts":{"bytes":64174,"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","kind":"import-statement","external":true},{"path":"@dxos/tracing","kind":"import-statement","external":true},{"path":"src/transport/webrtc/rtc-transport-channel.ts","kind":"import-statement","original":"./rtc-transport-channel"},{"path":"src/transport/webrtc/utils.ts","kind":"import-statement","original":"./utils"}],"format":"esm"},"src/transport/webrtc/rtc-transport-factory.ts":{"bytes":3420,"imports":[{"path":"src/transport/webrtc/rtc-connection-factory.ts","kind":"import-statement","original":"./rtc-connection-factory"},{"path":"src/transport/webrtc/rtc-peer-connection.ts","kind":"import-statement","original":"./rtc-peer-connection"}],"format":"esm"},"src/transport/webrtc/rtc-transport-proxy.ts":{"bytes":29211,"imports":[{"path":"node:stream","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/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/mesh/bridge","kind":"import-statement","external":true},{"path":"@dxos/util","kind":"import-statement","external":true}],"format":"esm"},"src/transport/webrtc/rtc-transport-service.ts":{"bytes":21443,"imports":[{"path":"node:stream","kind":"import-statement","external":true},{"path":"@dxos/codec-protobuf/stream","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/proto/dxos/mesh/bridge","kind":"import-statement","external":true},{"path":"@dxos/util","kind":"import-statement","external":true},{"path":"src/transport/webrtc/rtc-transport-factory.ts","kind":"import-statement","original":"./rtc-transport-factory"}],"format":"esm"},"src/transport/webrtc/index.ts":{"bytes":751,"imports":[{"path":"src/transport/webrtc/rtc-transport-factory.ts","kind":"import-statement","original":"./rtc-transport-factory"},{"path":"src/transport/webrtc/rtc-transport-proxy.ts","kind":"import-statement","original":"./rtc-transport-proxy"},{"path":"src/transport/webrtc/rtc-transport-service.ts","kind":"import-statement","original":"./rtc-transport-service"}],"format":"esm"},"src/transport/index.ts":{"bytes":666,"imports":[{"path":"src/transport/memory-transport.ts","kind":"import-statement","original":"./memory-transport"},{"path":"src/transport/transport.ts","kind":"import-statement","original":"./transport"},{"path":"src/transport/webrtc/index.ts","kind":"import-statement","original":"./webrtc"}],"format":"esm"},"src/wire-protocol.ts":{"bytes":4254,"imports":[{"path":"@dxos/teleport","kind":"import-statement","external":true}],"format":"esm"},"src/index.ts":{"bytes":1071,"imports":[{"path":"src/connection-log.ts","kind":"import-statement","original":"./connection-log"},{"path":"src/network-manager.ts","kind":"import-statement","original":"./network-manager"},{"path":"src/signal/index.ts","kind":"import-statement","original":"./signal"},{"path":"src/swarm/index.ts","kind":"import-statement","original":"./swarm"},{"path":"src/topology/index.ts","kind":"import-statement","original":"./topology"},{"path":"src/transport/index.ts","kind":"import-statement","original":"./transport"},{"path":"src/wire-protocol.ts","kind":"import-statement","original":"./wire-protocol"}],"format":"esm"},"src/testing/test-wire-protocol.ts":{"bytes":12949,"imports":[{"path":"@dxos/async","kind":"import-statement","external":true},{"path":"@dxos/keys","kind":"import-statement","external":true},{"path":"@dxos/log","kind":"import-statement","external":true},{"path":"@dxos/teleport","kind":"import-statement","external":true},{"path":"@dxos/util","kind":"import-statement","external":true},{"path":"src/wire-protocol.ts","kind":"import-statement","original":"../wire-protocol"}],"format":"esm"},"src/testing/test-builder.ts":{"bytes":26007,"imports":[{"path":"@dxos/keys","kind":"import-statement","external":true},{"path":"@dxos/log","kind":"import-statement","external":true},{"path":"@dxos/messaging","kind":"import-statement","external":true},{"path":"@dxos/protocols/proto","kind":"import-statement","external":true},{"path":"@dxos/protocols/proto/dxos/client/services","kind":"import-statement","external":true},{"path":"@dxos/rpc","kind":"import-statement","external":true},{"path":"@dxos/util","kind":"import-statement","external":true},{"path":"#tcp-transport","kind":"import-statement","external":true},{"path":"src/network-manager.ts","kind":"import-statement","original":"../network-manager"},{"path":"src/topology/index.ts","kind":"import-statement","original":"../topology"},{"path":"src/transport/index.ts","kind":"import-statement","original":"../transport"},{"path":"src/testing/test-wire-protocol.ts","kind":"import-statement","original":"./test-wire-protocol"}],"format":"esm"},"src/testing/index.ts":{"bytes":481,"imports":[{"path":"src/testing/test-builder.ts","kind":"import-statement","original":"./test-builder"}],"format":"esm"},"src/transport/tcp/tcp-transport.ts":{"bytes":14437,"imports":[{"path":"node:net","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":"node:net","kind":"dynamic-import","external":true}],"format":"esm"},"src/transport/tcp/index.ts":{"bytes":492,"imports":[{"path":"src/transport/tcp/tcp-transport.ts","kind":"import-statement","original":"./tcp-transport"}],"format":"esm"}},"outputs":{"dist/lib/node-esm/index.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":93},"dist/lib/node-esm/index.mjs":{"imports":[{"path":"dist/lib/node-esm/chunk-HUSU3OKQ.mjs","kind":"import-statement"}],"exports":["Connection","ConnectionLimiter","ConnectionLog","ConnectionState","EventType","FullyConnectedTopology","MAX_CONCURRENT_INITIATING_CONNECTIONS","MMSTTopology","MemoryTransport","MemoryTransportFactory","RtcTransportProxy","RtcTransportProxyFactory","RtcTransportService","StarTopology","Swarm","SwarmMapper","SwarmMessenger","SwarmNetworkManager","TransportKind","createIceProvider","createRtcTransportFactory","createTeleportProtocolFactory"],"entryPoint":"src/index.ts","inputs":{"src/index.ts":{"bytesInOutput":0}},"bytes":1107},"dist/lib/node-esm/testing/index.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":19209},"dist/lib/node-esm/testing/index.mjs":{"imports":[{"path":"dist/lib/node-esm/chunk-HUSU3OKQ.mjs","kind":"import-statement"},{"path":"@dxos/keys","kind":"import-statement","external":true},{"path":"@dxos/log","kind":"import-statement","external":true},{"path":"@dxos/messaging","kind":"import-statement","external":true},{"path":"@dxos/protocols/proto","kind":"import-statement","external":true},{"path":"@dxos/protocols/proto/dxos/client/services","kind":"import-statement","external":true},{"path":"@dxos/rpc","kind":"import-statement","external":true},{"path":"@dxos/util","kind":"import-statement","external":true},{"path":"#tcp-transport","kind":"import-statement","external":true},{"path":"@dxos/async","kind":"import-statement","external":true},{"path":"@dxos/keys","kind":"import-statement","external":true},{"path":"@dxos/log","kind":"import-statement","external":true},{"path":"@dxos/teleport","kind":"import-statement","external":true},{"path":"@dxos/util","kind":"import-statement","external":true}],"exports":["TEST_SIGNAL_HOSTS","TestBuilder","TestPeer","TestSwarmConnection"],"entryPoint":"src/testing/index.ts","inputs":{"src/testing/test-builder.ts":{"bytesInOutput":6240},"src/testing/test-wire-protocol.ts":{"bytesInOutput":3400},"src/testing/index.ts":{"bytesInOutput":0}},"bytes":10196},"dist/lib/node-esm/chunk-HUSU3OKQ.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":216555},"dist/lib/node-esm/chunk-HUSU3OKQ.mjs":{"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/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/async","kind":"import-statement","external":true},{"path":"@dxos/log","kind":"import-statement","external":true},{"path":"@dxos/util","kind":"import-statement","external":true},{"path":"@dxos/context","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","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/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/messaging","kind":"import-statement","external":true},{"path":"@dxos/protocols","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/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/async","kind":"import-statement","external":true},{"path":"@dxos/keys","kind":"import-statement","external":true},{"path":"@dxos/log","kind":"import-statement","external":true},{"path":"@dxos/messaging","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/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/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/util","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/messaging","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/invariant","kind":"import-statement","external":true},{"path":"@dxos/invariant","kind":"import-statement","external":true},{"path":"@dxos/log","kind":"import-statement","external":true},{"path":"@dxos/invariant","kind":"import-statement","external":true},{"path":"@dxos/log","kind":"import-statement","external":true},{"path":"node:stream","kind":"import-statement","external":true},{"path":"@dxos/async","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":"@dxos/async","kind":"import-statement","external":true},{"path":"#node-datachannel","kind":"dynamic-import","external":true},{"path":"#node-datachannel/polyfill","kind":"dynamic-import","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","kind":"import-statement","external":true},{"path":"@dxos/tracing","kind":"import-statement","external":true},{"path":"node:stream","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/invariant","kind":"import-statement","external":true},{"path":"@dxos/log","kind":"import-statement","external":true},{"path":"@dxos/protocols","kind":"import-statement","external":true},{"path":"node:stream","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/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/mesh/bridge","kind":"import-statement","external":true},{"path":"@dxos/util","kind":"import-statement","external":true},{"path":"node:stream","kind":"import-statement","external":true},{"path":"@dxos/codec-protobuf/stream","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/proto/dxos/mesh/bridge","kind":"import-statement","external":true},{"path":"@dxos/util","kind":"import-statement","external":true},{"path":"@dxos/teleport","kind":"import-statement","external":true}],"exports":["Connection","ConnectionLimiter","ConnectionLog","ConnectionState","EventType","FullyConnectedTopology","MAX_CONCURRENT_INITIATING_CONNECTIONS","MMSTTopology","MemoryTransport","MemoryTransportFactory","RtcTransportProxy","RtcTransportProxyFactory","RtcTransportService","StarTopology","Swarm","SwarmMapper","SwarmMessenger","SwarmNetworkManager","TransportKind","createIceProvider","createRtcTransportFactory","createTeleportProtocolFactory"],"inputs":{"src/swarm/connection.ts":{"bytesInOutput":16831},"src/signal/ice.ts":{"bytesInOutput":1085},"src/signal/swarm-messenger.ts":{"bytesInOutput":6293},"src/signal/index.ts":{"bytesInOutput":0},"src/swarm/swarm.ts":{"bytesInOutput":16820},"src/swarm/peer.ts":{"bytesInOutput":14044},"src/swarm/swarm-mapper.ts":{"bytesInOutput":2331},"src/swarm/connection-limiter.ts":{"bytesInOutput":2575},"src/swarm/index.ts":{"bytesInOutput":0},"src/connection-log.ts":{"bytesInOutput":3407},"src/network-manager.ts":{"bytesInOutput":7433},"src/topology/fully-connected-topology.ts":{"bytesInOutput":967},"src/topology/mmst-topology.ts":{"bytesInOutput":6025},"src/topology/star-topology.ts":{"bytesInOutput":2507},"src/topology/index.ts":{"bytesInOutput":0},"src/transport/memory-transport.ts":{"bytesInOutput":6352},"src/transport/transport.ts":{"bytesInOutput":261},"src/transport/webrtc/rtc-connection-factory.ts":{"bytesInOutput":1521},"src/transport/webrtc/rtc-peer-connection.ts":{"bytesInOutput":19446},"src/transport/webrtc/rtc-transport-channel.ts":{"bytesInOutput":6186},"src/transport/webrtc/rtc-transport-stats.ts":{"bytesInOutput":1668},"src/transport/webrtc/utils.ts":{"bytesInOutput":718},"src/transport/webrtc/rtc-transport-factory.ts":{"bytesInOutput":528},"src/transport/webrtc/rtc-transport-proxy.ts":{"bytesInOutput":7945},"src/transport/webrtc/rtc-transport-service.ts":{"bytesInOutput":6066},"src/transport/index.ts":{"bytesInOutput":0},"src/transport/webrtc/index.ts":{"bytesInOutput":0},"src/wire-protocol.ts":{"bytesInOutput":537}},"bytes":133114},"dist/lib/node-esm/transport/tcp/index.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":6750},"dist/lib/node-esm/transport/tcp/index.mjs":{"imports":[{"path":"node:net","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":"node:net","kind":"dynamic-import","external":true}],"exports":["TcpTransport","TcpTransportFactory"],"entryPoint":"src/transport/tcp/index.ts","inputs":{"src/transport/tcp/tcp-transport.ts":{"bytesInOutput":3843},"src/transport/tcp/index.ts":{"bytesInOutput":0}},"bytes":4059}}}
|
|
1
|
+
{"inputs":{"src/swarm/connection.ts":{"bytes":55115,"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/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}],"format":"esm"},"src/signal/ice.ts":{"bytes":4538,"imports":[{"path":"@dxos/async","kind":"import-statement","external":true},{"path":"@dxos/log","kind":"import-statement","external":true},{"path":"@dxos/util","kind":"import-statement","external":true}],"format":"esm"},"src/signal/swarm-messenger.ts":{"bytes":22177,"imports":[{"path":"@dxos/context","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","kind":"import-statement","external":true},{"path":"@dxos/util","kind":"import-statement","external":true}],"format":"esm"},"src/signal/index.ts":{"bytes":678,"imports":[{"path":"src/signal/ice.ts","kind":"import-statement","original":"./ice"},{"path":"src/signal/swarm-messenger.ts","kind":"import-statement","original":"./swarm-messenger"}],"format":"esm"},"src/swarm/peer.ts":{"bytes":47065,"imports":[{"path":"@dxos/async","kind":"import-statement","external":true},{"path":"@dxos/context","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":"src/swarm/connection.ts","kind":"import-statement","original":"./connection"}],"format":"esm"},"src/swarm/swarm.ts":{"bytes":54941,"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/invariant","kind":"import-statement","external":true},{"path":"@dxos/keys","kind":"import-statement","external":true},{"path":"@dxos/log","kind":"import-statement","external":true},{"path":"@dxos/messaging","kind":"import-statement","external":true},{"path":"@dxos/protocols","kind":"import-statement","external":true},{"path":"@dxos/util","kind":"import-statement","external":true},{"path":"src/signal/index.ts","kind":"import-statement","original":"../signal"},{"path":"src/swarm/connection.ts","kind":"import-statement","original":"./connection"},{"path":"src/swarm/peer.ts","kind":"import-statement","original":"./peer"}],"format":"esm"},"src/swarm/swarm-mapper.ts":{"bytes":12086,"imports":[{"path":"@dxos/async","kind":"import-statement","external":true},{"path":"@dxos/keys","kind":"import-statement","external":true},{"path":"@dxos/log","kind":"import-statement","external":true},{"path":"@dxos/messaging","kind":"import-statement","external":true},{"path":"@dxos/util","kind":"import-statement","external":true}],"format":"esm"},"src/swarm/connection-limiter.ts":{"bytes":8455,"imports":[{"path":"@dxos/async","kind":"import-statement","external":true},{"path":"@dxos/context","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/util","kind":"import-statement","external":true}],"format":"esm"},"src/swarm/index.ts":{"bytes":768,"imports":[{"path":"src/swarm/connection.ts","kind":"import-statement","original":"./connection"},{"path":"src/swarm/swarm.ts","kind":"import-statement","original":"./swarm"},{"path":"src/swarm/swarm-mapper.ts","kind":"import-statement","original":"./swarm-mapper"},{"path":"src/swarm/connection-limiter.ts","kind":"import-statement","original":"./connection-limiter"}],"format":"esm"},"src/connection-log.ts":{"bytes":16208,"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/util","kind":"import-statement","external":true},{"path":"src/swarm/index.ts","kind":"import-statement","original":"./swarm"}],"format":"esm"},"src/network-manager.ts":{"bytes":27172,"imports":[{"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/messaging","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":"src/connection-log.ts","kind":"import-statement","original":"./connection-log"},{"path":"src/swarm/index.ts","kind":"import-statement","original":"./swarm"}],"format":"esm"},"src/topology/fully-connected-topology.ts":{"bytes":3536,"imports":[{"path":"@dxos/invariant","kind":"import-statement","external":true}],"format":"esm"},"src/topology/mmst-topology.ts":{"bytes":20376,"imports":[{"path":"@dxos/invariant","kind":"import-statement","external":true},{"path":"@dxos/log","kind":"import-statement","external":true}],"format":"esm"},"src/topology/star-topology.ts":{"bytes":8007,"imports":[{"path":"@dxos/invariant","kind":"import-statement","external":true},{"path":"@dxos/log","kind":"import-statement","external":true}],"format":"esm"},"src/topology/index.ts":{"bytes":760,"imports":[{"path":"src/topology/fully-connected-topology.ts","kind":"import-statement","original":"./fully-connected-topology"},{"path":"src/topology/mmst-topology.ts","kind":"import-statement","original":"./mmst-topology"},{"path":"src/topology/star-topology.ts","kind":"import-statement","original":"./star-topology"}],"format":"esm"},"src/transport/memory-transport.ts":{"bytes":23009,"imports":[{"path":"node:stream","kind":"import-statement","external":true},{"path":"@dxos/async","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}],"format":"esm"},"src/transport/transport.ts":{"bytes":3009,"imports":[],"format":"esm"},"src/transport/webrtc/rtc-connection-factory.ts":{"bytes":8665,"imports":[{"path":"@dxos/async","kind":"import-statement","external":true},{"path":"#node-datachannel","kind":"dynamic-import","external":true},{"path":"#node-datachannel/polyfill","kind":"dynamic-import","external":true}],"format":"esm"},"src/transport/webrtc/rtc-transport-stats.ts":{"bytes":7336,"imports":[],"format":"esm"},"src/transport/webrtc/rtc-transport-channel.ts":{"bytes":22671,"imports":[{"path":"node:stream","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/invariant","kind":"import-statement","external":true},{"path":"@dxos/log","kind":"import-statement","external":true},{"path":"@dxos/protocols","kind":"import-statement","external":true},{"path":"src/transport/webrtc/rtc-transport-stats.ts","kind":"import-statement","original":"./rtc-transport-stats"}],"format":"esm"},"src/transport/webrtc/utils.ts":{"bytes":3889,"imports":[],"format":"esm"},"src/transport/webrtc/rtc-peer-connection.ts":{"bytes":63948,"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","kind":"import-statement","external":true},{"path":"@dxos/tracing","kind":"import-statement","external":true},{"path":"src/transport/webrtc/rtc-transport-channel.ts","kind":"import-statement","original":"./rtc-transport-channel"},{"path":"src/transport/webrtc/utils.ts","kind":"import-statement","original":"./utils"}],"format":"esm"},"src/transport/webrtc/rtc-transport-factory.ts":{"bytes":3420,"imports":[{"path":"src/transport/webrtc/rtc-connection-factory.ts","kind":"import-statement","original":"./rtc-connection-factory"},{"path":"src/transport/webrtc/rtc-peer-connection.ts","kind":"import-statement","original":"./rtc-peer-connection"}],"format":"esm"},"src/transport/webrtc/rtc-transport-proxy.ts":{"bytes":29114,"imports":[{"path":"node:stream","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/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/mesh/bridge","kind":"import-statement","external":true},{"path":"@dxos/util","kind":"import-statement","external":true}],"format":"esm"},"src/transport/webrtc/rtc-transport-service.ts":{"bytes":21401,"imports":[{"path":"node:stream","kind":"import-statement","external":true},{"path":"@dxos/codec-protobuf/stream","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/proto/dxos/mesh/bridge","kind":"import-statement","external":true},{"path":"@dxos/util","kind":"import-statement","external":true},{"path":"src/transport/webrtc/rtc-transport-factory.ts","kind":"import-statement","original":"./rtc-transport-factory"}],"format":"esm"},"src/transport/webrtc/index.ts":{"bytes":751,"imports":[{"path":"src/transport/webrtc/rtc-transport-factory.ts","kind":"import-statement","original":"./rtc-transport-factory"},{"path":"src/transport/webrtc/rtc-transport-proxy.ts","kind":"import-statement","original":"./rtc-transport-proxy"},{"path":"src/transport/webrtc/rtc-transport-service.ts","kind":"import-statement","original":"./rtc-transport-service"}],"format":"esm"},"src/transport/index.ts":{"bytes":666,"imports":[{"path":"src/transport/memory-transport.ts","kind":"import-statement","original":"./memory-transport"},{"path":"src/transport/transport.ts","kind":"import-statement","original":"./transport"},{"path":"src/transport/webrtc/index.ts","kind":"import-statement","original":"./webrtc"}],"format":"esm"},"src/wire-protocol.ts":{"bytes":4254,"imports":[{"path":"@dxos/teleport","kind":"import-statement","external":true}],"format":"esm"},"src/index.ts":{"bytes":1071,"imports":[{"path":"src/connection-log.ts","kind":"import-statement","original":"./connection-log"},{"path":"src/network-manager.ts","kind":"import-statement","original":"./network-manager"},{"path":"src/signal/index.ts","kind":"import-statement","original":"./signal"},{"path":"src/swarm/index.ts","kind":"import-statement","original":"./swarm"},{"path":"src/topology/index.ts","kind":"import-statement","original":"./topology"},{"path":"src/transport/index.ts","kind":"import-statement","original":"./transport"},{"path":"src/wire-protocol.ts","kind":"import-statement","original":"./wire-protocol"}],"format":"esm"},"src/testing/test-wire-protocol.ts":{"bytes":12575,"imports":[{"path":"@dxos/async","kind":"import-statement","external":true},{"path":"@dxos/keys","kind":"import-statement","external":true},{"path":"@dxos/log","kind":"import-statement","external":true},{"path":"@dxos/teleport","kind":"import-statement","external":true},{"path":"@dxos/util","kind":"import-statement","external":true},{"path":"src/wire-protocol.ts","kind":"import-statement","original":"../wire-protocol"}],"format":"esm"},"src/testing/test-builder.ts":{"bytes":25936,"imports":[{"path":"@dxos/keys","kind":"import-statement","external":true},{"path":"@dxos/log","kind":"import-statement","external":true},{"path":"@dxos/messaging","kind":"import-statement","external":true},{"path":"@dxos/protocols/proto","kind":"import-statement","external":true},{"path":"@dxos/protocols/proto/dxos/client/services","kind":"import-statement","external":true},{"path":"@dxos/rpc","kind":"import-statement","external":true},{"path":"@dxos/util","kind":"import-statement","external":true},{"path":"#tcp-transport","kind":"import-statement","external":true},{"path":"src/network-manager.ts","kind":"import-statement","original":"../network-manager"},{"path":"src/topology/index.ts","kind":"import-statement","original":"../topology"},{"path":"src/transport/index.ts","kind":"import-statement","original":"../transport"},{"path":"src/testing/test-wire-protocol.ts","kind":"import-statement","original":"./test-wire-protocol"}],"format":"esm"},"src/testing/index.ts":{"bytes":481,"imports":[{"path":"src/testing/test-builder.ts","kind":"import-statement","original":"./test-builder"}],"format":"esm"},"src/transport/tcp/tcp-transport.ts":{"bytes":14208,"imports":[{"path":"node:net","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":"node:net","kind":"dynamic-import","external":true}],"format":"esm"},"src/transport/tcp/index.ts":{"bytes":492,"imports":[{"path":"src/transport/tcp/tcp-transport.ts","kind":"import-statement","original":"./tcp-transport"}],"format":"esm"}},"outputs":{"dist/lib/node-esm/index.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":93},"dist/lib/node-esm/index.mjs":{"imports":[{"path":"dist/lib/node-esm/chunk-PKBROUZV.mjs","kind":"import-statement"}],"exports":["Connection","ConnectionLimiter","ConnectionLog","ConnectionState","EventType","FullyConnectedTopology","MAX_CONCURRENT_INITIATING_CONNECTIONS","MMSTTopology","MemoryTransport","MemoryTransportFactory","RtcTransportProxy","RtcTransportProxyFactory","RtcTransportService","StarTopology","Swarm","SwarmMapper","SwarmMessenger","SwarmNetworkManager","TransportKind","createIceProvider","createRtcTransportFactory","createTeleportProtocolFactory"],"entryPoint":"src/index.ts","inputs":{"src/index.ts":{"bytesInOutput":0}},"bytes":1107},"dist/lib/node-esm/testing/index.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":19154},"dist/lib/node-esm/testing/index.mjs":{"imports":[{"path":"dist/lib/node-esm/chunk-PKBROUZV.mjs","kind":"import-statement"},{"path":"@dxos/keys","kind":"import-statement","external":true},{"path":"@dxos/log","kind":"import-statement","external":true},{"path":"@dxos/messaging","kind":"import-statement","external":true},{"path":"@dxos/protocols/proto","kind":"import-statement","external":true},{"path":"@dxos/protocols/proto/dxos/client/services","kind":"import-statement","external":true},{"path":"@dxos/rpc","kind":"import-statement","external":true},{"path":"@dxos/util","kind":"import-statement","external":true},{"path":"#tcp-transport","kind":"import-statement","external":true},{"path":"@dxos/async","kind":"import-statement","external":true},{"path":"@dxos/keys","kind":"import-statement","external":true},{"path":"@dxos/log","kind":"import-statement","external":true},{"path":"@dxos/teleport","kind":"import-statement","external":true},{"path":"@dxos/util","kind":"import-statement","external":true}],"exports":["TEST_SIGNAL_HOSTS","TestBuilder","TestPeer","TestSwarmConnection"],"entryPoint":"src/testing/index.ts","inputs":{"src/testing/test-builder.ts":{"bytesInOutput":6197},"src/testing/test-wire-protocol.ts":{"bytesInOutput":3194},"src/testing/index.ts":{"bytesInOutput":0}},"bytes":9947},"dist/lib/node-esm/chunk-PKBROUZV.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":216150},"dist/lib/node-esm/chunk-PKBROUZV.mjs":{"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/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/async","kind":"import-statement","external":true},{"path":"@dxos/log","kind":"import-statement","external":true},{"path":"@dxos/util","kind":"import-statement","external":true},{"path":"@dxos/context","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","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/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/messaging","kind":"import-statement","external":true},{"path":"@dxos/protocols","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/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/async","kind":"import-statement","external":true},{"path":"@dxos/keys","kind":"import-statement","external":true},{"path":"@dxos/log","kind":"import-statement","external":true},{"path":"@dxos/messaging","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/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/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/util","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/messaging","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/invariant","kind":"import-statement","external":true},{"path":"@dxos/invariant","kind":"import-statement","external":true},{"path":"@dxos/log","kind":"import-statement","external":true},{"path":"@dxos/invariant","kind":"import-statement","external":true},{"path":"@dxos/log","kind":"import-statement","external":true},{"path":"node:stream","kind":"import-statement","external":true},{"path":"@dxos/async","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":"@dxos/async","kind":"import-statement","external":true},{"path":"#node-datachannel","kind":"dynamic-import","external":true},{"path":"#node-datachannel/polyfill","kind":"dynamic-import","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","kind":"import-statement","external":true},{"path":"@dxos/tracing","kind":"import-statement","external":true},{"path":"node:stream","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/invariant","kind":"import-statement","external":true},{"path":"@dxos/log","kind":"import-statement","external":true},{"path":"@dxos/protocols","kind":"import-statement","external":true},{"path":"node:stream","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/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/mesh/bridge","kind":"import-statement","external":true},{"path":"@dxos/util","kind":"import-statement","external":true},{"path":"node:stream","kind":"import-statement","external":true},{"path":"@dxos/codec-protobuf/stream","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/proto/dxos/mesh/bridge","kind":"import-statement","external":true},{"path":"@dxos/util","kind":"import-statement","external":true},{"path":"@dxos/teleport","kind":"import-statement","external":true}],"exports":["Connection","ConnectionLimiter","ConnectionLog","ConnectionState","EventType","FullyConnectedTopology","MAX_CONCURRENT_INITIATING_CONNECTIONS","MMSTTopology","MemoryTransport","MemoryTransportFactory","RtcTransportProxy","RtcTransportProxyFactory","RtcTransportService","StarTopology","Swarm","SwarmMapper","SwarmMessenger","SwarmNetworkManager","TransportKind","createIceProvider","createRtcTransportFactory","createTeleportProtocolFactory"],"inputs":{"src/swarm/connection.ts":{"bytesInOutput":16494},"src/signal/ice.ts":{"bytesInOutput":1085},"src/signal/swarm-messenger.ts":{"bytesInOutput":6293},"src/signal/index.ts":{"bytesInOutput":0},"src/swarm/swarm.ts":{"bytesInOutput":16647},"src/swarm/peer.ts":{"bytesInOutput":13895},"src/swarm/swarm-mapper.ts":{"bytesInOutput":2233},"src/swarm/connection-limiter.ts":{"bytesInOutput":2575},"src/swarm/index.ts":{"bytesInOutput":0},"src/connection-log.ts":{"bytesInOutput":3409},"src/network-manager.ts":{"bytesInOutput":7433},"src/topology/fully-connected-topology.ts":{"bytesInOutput":967},"src/topology/mmst-topology.ts":{"bytesInOutput":6025},"src/topology/star-topology.ts":{"bytesInOutput":2507},"src/topology/index.ts":{"bytesInOutput":0},"src/transport/memory-transport.ts":{"bytesInOutput":6190},"src/transport/transport.ts":{"bytesInOutput":263},"src/transport/webrtc/rtc-connection-factory.ts":{"bytesInOutput":1521},"src/transport/webrtc/rtc-peer-connection.ts":{"bytesInOutput":19296},"src/transport/webrtc/rtc-transport-channel.ts":{"bytesInOutput":6076},"src/transport/webrtc/rtc-transport-stats.ts":{"bytesInOutput":1668},"src/transport/webrtc/utils.ts":{"bytesInOutput":718},"src/transport/webrtc/rtc-transport-factory.ts":{"bytesInOutput":528},"src/transport/webrtc/rtc-transport-proxy.ts":{"bytesInOutput":7888},"src/transport/webrtc/rtc-transport-service.ts":{"bytesInOutput":6040},"src/transport/index.ts":{"bytesInOutput":0},"src/transport/webrtc/index.ts":{"bytesInOutput":0},"src/wire-protocol.ts":{"bytesInOutput":537}},"bytes":131856},"dist/lib/node-esm/transport/tcp/index.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":6704},"dist/lib/node-esm/transport/tcp/index.mjs":{"imports":[{"path":"node:net","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":"node:net","kind":"dynamic-import","external":true}],"exports":["TcpTransport","TcpTransportFactory"],"entryPoint":"src/transport/tcp/index.ts","inputs":{"src/transport/tcp/tcp-transport.ts":{"bytesInOutput":3714},"src/transport/tcp/index.ts":{"bytesInOutput":0}},"bytes":3930}}}
|
|
@@ -8,7 +8,7 @@ import {
|
|
|
8
8
|
TransportKind,
|
|
9
9
|
createRtcTransportFactory,
|
|
10
10
|
createTeleportProtocolFactory
|
|
11
|
-
} from "../chunk-
|
|
11
|
+
} from "../chunk-PKBROUZV.mjs";
|
|
12
12
|
|
|
13
13
|
// src/testing/test-builder.ts
|
|
14
14
|
import { PublicKey as PublicKey2 } from "@dxos/keys";
|
|
@@ -29,55 +29,49 @@ import { ComplexMap } from "@dxos/util";
|
|
|
29
29
|
var __dxlog_file = "/__w/dxos/dxos/packages/core/mesh/network-manager/src/testing/test-wire-protocol.ts";
|
|
30
30
|
var TestWireProtocol = class {
|
|
31
31
|
_extensionFactory;
|
|
32
|
-
connections;
|
|
33
|
-
streamConnections;
|
|
34
|
-
connected;
|
|
35
|
-
disconnected;
|
|
36
|
-
otherConnections;
|
|
32
|
+
connections = new ComplexMap(PublicKey.hash);
|
|
33
|
+
streamConnections = new ComplexMap(PublicKey.hash);
|
|
34
|
+
connected = new Event();
|
|
35
|
+
disconnected = new Event();
|
|
36
|
+
otherConnections = new ComplexMap(({ remotePeerId, extension }) => remotePeerId.toHex() + extension);
|
|
37
37
|
constructor(_extensionFactory = () => []) {
|
|
38
38
|
this._extensionFactory = _extensionFactory;
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
this.connected.emit(teleport.remotePeerId);
|
|
64
|
-
const streamExtension = new TestExtensionWithStreams({
|
|
65
|
-
onClose: async () => {
|
|
66
|
-
this.streamConnections.delete(teleport.remotePeerId);
|
|
67
|
-
}
|
|
68
|
-
});
|
|
69
|
-
this.streamConnections.set(teleport.remotePeerId, streamExtension);
|
|
70
|
-
teleport.addExtension("test-stream", streamExtension);
|
|
71
|
-
for (const { name, extension: extension2 } of this._extensionFactory()) {
|
|
72
|
-
this.otherConnections.set({
|
|
73
|
-
remotePeerId: teleport.remotePeerId,
|
|
74
|
-
extension: name
|
|
75
|
-
}, extension2);
|
|
76
|
-
teleport.addExtension(name, extension2);
|
|
39
|
+
}
|
|
40
|
+
factory = createTeleportProtocolFactory(async (teleport) => {
|
|
41
|
+
log("create", {
|
|
42
|
+
remotePeerId: teleport.remotePeerId
|
|
43
|
+
}, {
|
|
44
|
+
F: __dxlog_file,
|
|
45
|
+
L: 35,
|
|
46
|
+
S: this,
|
|
47
|
+
C: (f, a) => f(...a)
|
|
48
|
+
});
|
|
49
|
+
const handleDisconnect = () => {
|
|
50
|
+
this.connections.delete(teleport.remotePeerId);
|
|
51
|
+
this.disconnected.emit(teleport.remotePeerId);
|
|
52
|
+
};
|
|
53
|
+
const extension = new TestExtension({
|
|
54
|
+
onClose: async () => handleDisconnect(),
|
|
55
|
+
onAbort: async () => handleDisconnect()
|
|
56
|
+
});
|
|
57
|
+
this.connections.set(teleport.remotePeerId, extension);
|
|
58
|
+
teleport.addExtension("test", extension);
|
|
59
|
+
this.connected.emit(teleport.remotePeerId);
|
|
60
|
+
const streamExtension = new TestExtensionWithStreams({
|
|
61
|
+
onClose: async () => {
|
|
62
|
+
this.streamConnections.delete(teleport.remotePeerId);
|
|
77
63
|
}
|
|
78
64
|
});
|
|
79
|
-
|
|
80
|
-
|
|
65
|
+
this.streamConnections.set(teleport.remotePeerId, streamExtension);
|
|
66
|
+
teleport.addExtension("test-stream", streamExtension);
|
|
67
|
+
for (const { name, extension: extension2 } of this._extensionFactory()) {
|
|
68
|
+
this.otherConnections.set({
|
|
69
|
+
remotePeerId: teleport.remotePeerId,
|
|
70
|
+
extension: name
|
|
71
|
+
}, extension2);
|
|
72
|
+
teleport.addExtension(name, extension2);
|
|
73
|
+
}
|
|
74
|
+
});
|
|
81
75
|
async waitForConnection(peerId) {
|
|
82
76
|
if (this.connections.has(peerId)) {
|
|
83
77
|
return this.connections.get(peerId);
|
|
@@ -127,10 +121,9 @@ var TEST_SIGNAL_HOSTS = [
|
|
|
127
121
|
];
|
|
128
122
|
var TestBuilder = class {
|
|
129
123
|
options;
|
|
130
|
-
_signalContext;
|
|
124
|
+
_signalContext = new MemorySignalManagerContext();
|
|
131
125
|
constructor(options = {}) {
|
|
132
126
|
this.options = options;
|
|
133
|
-
this._signalContext = new MemorySignalManagerContext();
|
|
134
127
|
}
|
|
135
128
|
createSignalManager() {
|
|
136
129
|
if (this.options.signalHosts) {
|
|
@@ -146,7 +139,7 @@ var TestPeer = class {
|
|
|
146
139
|
testBuilder;
|
|
147
140
|
peerId;
|
|
148
141
|
transport;
|
|
149
|
-
_swarms;
|
|
142
|
+
_swarms = new ComplexMap2(PublicKey2.hash);
|
|
150
143
|
/**
|
|
151
144
|
* @internal
|
|
152
145
|
*/
|
|
@@ -161,7 +154,6 @@ var TestPeer = class {
|
|
|
161
154
|
this.testBuilder = testBuilder;
|
|
162
155
|
this.peerId = peerId;
|
|
163
156
|
this.transport = transport;
|
|
164
|
-
this._swarms = new ComplexMap2(PublicKey2.hash);
|
|
165
157
|
this._signalManager = this.testBuilder.createSignalManager();
|
|
166
158
|
this._networkManager = this.createNetworkManager(this.transport);
|
|
167
159
|
this._networkManager.setPeerInfo({
|
|
@@ -2,6 +2,6 @@
|
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../src/testing/test-builder.ts", "../../../../src/testing/test-wire-protocol.ts"],
|
|
4
4
|
"sourcesContent": ["//\n// Copyright 2022 DXOS.org\n//\n\nimport { PublicKey } from '@dxos/keys';\nimport { log } from '@dxos/log';\nimport {\n MemorySignalManager,\n MemorySignalManagerContext,\n type SignalManager,\n WebsocketSignalManager,\n} from '@dxos/messaging';\nimport { schema } from '@dxos/protocols/proto';\nimport { ConnectionState } from '@dxos/protocols/proto/dxos/client/services';\nimport { type Runtime } from '@dxos/protocols/proto/dxos/config';\nimport { type ProtoRpcPeer, createLinkedPorts, createProtoRpcPeer } from '@dxos/rpc';\nimport { ComplexMap } from '@dxos/util';\n\nimport { TcpTransportFactory } from '#tcp-transport';\n\nimport { SwarmNetworkManager } from '../network-manager';\nimport { FullyConnectedTopology } from '../topology';\nimport {\n MemoryTransportFactory,\n RtcTransportProxyFactory,\n RtcTransportService,\n type TransportFactory,\n TransportKind,\n createRtcTransportFactory,\n} from '../transport';\n\nimport { type TestTeleportExtensionFactory, TestWireProtocol } from './test-wire-protocol';\n\n// Signal server will be started by the setup script.\nconst port = process.env.SIGNAL_PORT ?? 4000;\nexport const TEST_SIGNAL_HOSTS: Runtime.Services.Signal[] = [\n { server: `ws://localhost:${port}/.well-known/dx/signal` },\n];\n\nexport type TestBuilderOptions = {\n signalHosts?: Runtime.Services.Signal[];\n bridge?: boolean;\n transport?: TransportKind;\n};\n\n/**\n * Builder used to construct networks and peers.\n */\nexport class TestBuilder {\n private _signalContext = new MemorySignalManagerContext();\n\n constructor(public readonly options: TestBuilderOptions = {}) {}\n\n createSignalManager(): WebsocketSignalManager | MemorySignalManager {\n if (this.options.signalHosts) {\n return new WebsocketSignalManager(this.options.signalHosts);\n }\n\n return new MemorySignalManager(this._signalContext);\n }\n\n createPeer(peerId: PublicKey = PublicKey.random()): TestPeer {\n return new TestPeer(this, peerId, this.options.transport);\n }\n}\n\n/**\n * Testing network peer.\n */\nexport class TestPeer {\n private readonly _swarms = new ComplexMap<PublicKey, TestSwarmConnection>(PublicKey.hash);\n\n /**\n * @internal\n */\n readonly _signalManager: SignalManager;\n\n /**\n * @internal\n */\n readonly _networkManager: SwarmNetworkManager;\n\n private _proxy?: ProtoRpcPeer<any>;\n private _service?: ProtoRpcPeer<any>;\n\n constructor(\n private readonly testBuilder: TestBuilder,\n public readonly peerId: PublicKey,\n public readonly transport: TransportKind = testBuilder.options.signalHosts\n ? TransportKind.WEB_RTC\n : TransportKind.MEMORY,\n ) {\n this._signalManager = this.testBuilder.createSignalManager();\n this._networkManager = this.createNetworkManager(this.transport);\n this._networkManager.setPeerInfo({ identityKey: peerId.toHex(), peerKey: peerId.toHex() });\n }\n\n // TODO(burdon): Move to TestBuilder.\n createNetworkManager(transport: TransportKind): SwarmNetworkManager {\n let transportFactory: TransportFactory;\n if (this.testBuilder.options.signalHosts) {\n log.info(`using ${transport} transport with signal server.`);\n switch (transport) {\n case TransportKind.MEMORY:\n throw new Error('Memory transport not supported with signal server.');\n case TransportKind.TCP:\n transportFactory = TcpTransportFactory;\n break;\n case TransportKind.WEB_RTC:\n transportFactory = createRtcTransportFactory();\n break;\n case TransportKind.WEB_RTC_PROXY:\n {\n // Simulates bridge to shared worker.\n const [proxyPort, servicePort] = createLinkedPorts();\n\n this._proxy = createProtoRpcPeer({\n port: proxyPort,\n requested: {\n BridgeService: schema.getService('dxos.mesh.bridge.BridgeService'),\n },\n noHandshake: true,\n encodingOptions: {\n preserveAny: true,\n },\n });\n\n this._service = createProtoRpcPeer({\n port: servicePort,\n exposed: {\n BridgeService: schema.getService('dxos.mesh.bridge.BridgeService'),\n },\n handlers: { BridgeService: new RtcTransportService() },\n noHandshake: true,\n encodingOptions: {\n preserveAny: true,\n },\n });\n\n transportFactory = new RtcTransportProxyFactory().setBridgeService(this._proxy.rpc.BridgeService);\n }\n break;\n default:\n throw new Error(`Unsupported transport: ${transport}`);\n }\n } else {\n if (transport !== TransportKind.MEMORY && transport !== TransportKind.TCP) {\n log.warn(`specified transport ${transport} but no signalling configured, using memory transport instead`);\n }\n log.info(`using ${transport} transport without signal server.`);\n transportFactory = MemoryTransportFactory;\n }\n\n return new SwarmNetworkManager({\n signalManager: this._signalManager,\n transportFactory,\n });\n }\n\n async open(): Promise<void> {\n await this._networkManager.open();\n await this._proxy?.open();\n await this._service?.open();\n }\n\n async close(): Promise<void> {\n await Promise.all(Array.from(this._swarms.values()).map((swarm) => swarm.leave()));\n this._swarms.clear();\n\n await this._proxy?.close();\n await this._service?.close();\n await this._networkManager.close();\n }\n\n getSwarm(topic: PublicKey): TestSwarmConnection {\n const swarm = this._swarms.get(topic);\n if (!swarm) {\n throw new Error(`Swarm not found for topic: ${topic}`);\n }\n\n return swarm;\n }\n\n createSwarm(topic: PublicKey, extensionFactory: TestTeleportExtensionFactory = () => []): TestSwarmConnection {\n // TODO(burdon): Multiple.\n // if (this._swarms.get(topic)) {\n // throw new Error(`Swarm already exists for topic: ${topic.truncate()}`);\n // }\n\n const swarm = new TestSwarmConnection(this, topic, extensionFactory);\n this._swarms.set(topic, swarm);\n return swarm;\n }\n\n async goOffline(): Promise<void> {\n await this._networkManager.setConnectionState(ConnectionState.OFFLINE);\n }\n\n async goOnline(): Promise<void> {\n await this._networkManager.setConnectionState(ConnectionState.ONLINE);\n }\n}\n\n// TODO(burdon): Reconcile with new Swarm concept.\nexport class TestSwarmConnection {\n protocol: TestWireProtocol;\n\n constructor(\n readonly peer: TestPeer,\n readonly topic: PublicKey,\n readonly extensionFactory: TestTeleportExtensionFactory,\n ) {\n // TODO(burdon): Configure plugins.\n // TODO(burdon): Prevent reuse?\n this.protocol = new TestWireProtocol(this.extensionFactory);\n }\n\n // TODO(burdon): Need to create new plugin instance per swarm?\n // If so, then perhaps joinSwarm should return swarm object with access to plugins.\n async join(topology = new FullyConnectedTopology()): Promise<this> {\n await this.peer._networkManager.joinSwarm({\n topic: this.topic,\n peerInfo: { peerKey: this.peer.peerId.toHex(), identityKey: this.peer.peerId.toHex() },\n protocolProvider: this.protocol.factory,\n topology,\n });\n\n return this;\n }\n\n async leave(): Promise<this> {\n await this.peer._networkManager.leaveSwarm(this.topic);\n return this;\n }\n}\n", "//\n// Copyright 2022 DXOS.org\n//\n\nimport { Event, asyncTimeout } from '@dxos/async';\nimport { PublicKey } from '@dxos/keys';\nimport { log } from '@dxos/log';\nimport { TestExtension, TestExtensionWithStreams } from '@dxos/teleport';\nimport type { TeleportExtension, TestStreamStats } from '@dxos/teleport';\nimport { ComplexMap } from '@dxos/util';\n\nimport { createTeleportProtocolFactory } from '../wire-protocol';\n\nexport type TestTeleportExtension = {\n name: string;\n extension: TeleportExtension;\n};\n\nexport type TestTeleportExtensionFactory = () => TestTeleportExtension[];\n\nexport class TestWireProtocol {\n public readonly connections = new ComplexMap<PublicKey, TestExtension>(PublicKey.hash);\n public readonly streamConnections = new ComplexMap<PublicKey, TestExtensionWithStreams>(PublicKey.hash);\n\n public readonly connected = new Event<PublicKey>();\n public readonly disconnected = new Event<PublicKey>();\n\n public readonly otherConnections = new ComplexMap<{ remotePeerId: PublicKey; extension: string }, TeleportExtension>(\n ({ remotePeerId, extension }) => remotePeerId.toHex() + extension,\n );\n\n constructor(private readonly _extensionFactory: TestTeleportExtensionFactory = () => []) {}\n\n readonly factory = createTeleportProtocolFactory(async (teleport) => {\n log('create', { remotePeerId: teleport.remotePeerId });\n const handleDisconnect = () => {\n this.connections.delete(teleport.remotePeerId);\n this.disconnected.emit(teleport.remotePeerId);\n };\n const extension = new TestExtension({\n onClose: async () => handleDisconnect(),\n onAbort: async () => handleDisconnect(),\n });\n this.connections.set(teleport.remotePeerId, extension);\n teleport.addExtension('test', extension);\n this.connected.emit(teleport.remotePeerId);\n\n const streamExtension = new TestExtensionWithStreams({\n onClose: async () => {\n this.streamConnections.delete(teleport.remotePeerId);\n },\n });\n this.streamConnections.set(teleport.remotePeerId, streamExtension);\n teleport.addExtension('test-stream', streamExtension);\n\n for (const { name, extension } of this._extensionFactory()) {\n this.otherConnections.set({ remotePeerId: teleport.remotePeerId, extension: name }, extension);\n teleport.addExtension(name, extension);\n }\n });\n\n async waitForConnection(peerId: PublicKey): Promise<TestExtension> {\n if (this.connections.has(peerId)) {\n return this.connections.get(peerId)!;\n }\n log('waitForConnection', { peerId });\n await asyncTimeout(\n this.connected.waitFor((connectedId) => connectedId.equals(peerId)),\n // TODO(nf): Make this configurable.\n 10_000,\n );\n return this.connections.get(peerId)!;\n }\n\n async testConnection(peerId: PublicKey, message?: string): Promise<void> {\n const connection = await this.waitForConnection(peerId);\n await connection.test(message);\n }\n\n async openStream(\n peerId: PublicKey,\n streamTag: string,\n streamLoadInterval: number,\n streamLoadChunkSize: number,\n ): Promise<string> {\n if (!this.streamConnections.has(peerId)) {\n throw new Error('Connection does not exist.');\n }\n const connection = this.streamConnections.get(peerId)!;\n return connection.addNewStream(streamLoadInterval, streamLoadChunkSize, streamTag);\n }\n\n async closeStream(peerId: PublicKey, streamTag: string): Promise<TestStreamStats> {\n if (!this.streamConnections.has(peerId)) {\n throw new Error('Connection does not exist.');\n }\n const connection = this.streamConnections.get(peerId)!;\n return connection.closeStream(streamTag);\n }\n}\n"],
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;AAIA,SAASA,aAAAA,kBAAiB;AAC1B,SAASC,OAAAA,YAAW;AACpB,SACEC,qBACAC,4BAEAC,8BACK;AACP,SAASC,cAAc;AACvB,SAASC,uBAAuB;AAEhC,SAA4BC,mBAAmBC,0BAA0B;AACzE,SAASC,cAAAA,mBAAkB;AAE3B,SAASC,2BAA2B;;;ACdpC,SAASC,OAAOC,oBAAoB;AACpC,SAASC,iBAAiB;AAC1B,SAASC,WAAW;AACpB,SAASC,eAAeC,gCAAgC;AAExD,SAASC,kBAAkB;;AAWpB,IAAMC,mBAAN,MAAMA;;EACKC
|
|
6
|
-
"names": ["PublicKey", "log", "MemorySignalManager", "MemorySignalManagerContext", "WebsocketSignalManager", "schema", "ConnectionState", "createLinkedPorts", "createProtoRpcPeer", "ComplexMap", "TcpTransportFactory", "Event", "asyncTimeout", "PublicKey", "log", "TestExtension", "TestExtensionWithStreams", "ComplexMap", "TestWireProtocol", "connections", "
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;AAIA,SAASA,aAAAA,kBAAiB;AAC1B,SAASC,OAAAA,YAAW;AACpB,SACEC,qBACAC,4BAEAC,8BACK;AACP,SAASC,cAAc;AACvB,SAASC,uBAAuB;AAEhC,SAA4BC,mBAAmBC,0BAA0B;AACzE,SAASC,cAAAA,mBAAkB;AAE3B,SAASC,2BAA2B;;;ACdpC,SAASC,OAAOC,oBAAoB;AACpC,SAASC,iBAAiB;AAC1B,SAASC,WAAW;AACpB,SAASC,eAAeC,gCAAgC;AAExD,SAASC,kBAAkB;;AAWpB,IAAMC,mBAAN,MAAMA;;EACKC,cAAc,IAAIC,WAAqCC,UAAUC,IAAI;EACrEC,oBAAoB,IAAIH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8D,IAAIL,OAAOJ,KAAAA;AACxB,WAAOA;EACT;EAEA,MAAMU,YAA2B;AAC/B,UAAM,KAAK3D,gBAAgB4D,mBAAmBC,gBAAgBC,OAAO;EACvE;EAEA,MAAMC,WAA0B;AAC9B,UAAM,KAAK/D,gBAAgB4D,mBAAmBC,gBAAgBG,MAAM;EACtE;AACF;AAGO,IAAMP,sBAAN,MAAMA;;;;EACXQ;EAEA,YACWC,MACAb,OACAG,kBACT;SAHSU,OAAAA;SACAb,QAAAA;SACAG,mBAAAA;AAIT,SAAKS,WAAW,IAAIE,iBAAiB,KAAKX,gBAAgB;EAC5D;;;EAIA,MAAMY,KAAKC,WAAW,IAAIC,uBAAAA,GAAyC;AACjE,UAAM,KAAKJ,KAAKlE,gBAAgBuE,UAAU;MACxClB,OAAO,KAAKA;MACZmB,UAAU;QAAE7D,SAAS,KAAKuD,KAAK3E,OAAOmB,MAAK;QAAID,aAAa,KAAKyD,KAAK3E,OAAOmB,MAAK;MAAG;MACrF+D,kBAAkB,KAAKR,SAASS;MAChCL;IACF,CAAA;AAEA,WAAO;EACT;EAEA,MAAMnB,QAAuB;AAC3B,UAAM,KAAKgB,KAAKlE,gBAAgB2E,WAAW,KAAKtB,KAAK;AACrD,WAAO;EACT;AACF;",
|
|
6
|
+
"names": ["PublicKey", "log", "MemorySignalManager", "MemorySignalManagerContext", "WebsocketSignalManager", "schema", "ConnectionState", "createLinkedPorts", "createProtoRpcPeer", "ComplexMap", "TcpTransportFactory", "Event", "asyncTimeout", "PublicKey", "log", "TestExtension", "TestExtensionWithStreams", "ComplexMap", "TestWireProtocol", "connections", "ComplexMap", "PublicKey", "hash", "streamConnections", "connected", "Event", "disconnected", "otherConnections", "remotePeerId", "extension", "toHex", "_extensionFactory", "factory", "createTeleportProtocolFactory", "teleport", "log", "handleDisconnect", "delete", "emit", "TestExtension", "onClose", "onAbort", "set", "addExtension", "streamExtension", "TestExtensionWithStreams", "name", "waitForConnection", "peerId", "has", "get", "asyncTimeout", "waitFor", "connectedId", "equals", "testConnection", "message", "connection", "test", "openStream", "streamTag", "streamLoadInterval", "streamLoadChunkSize", "Error", "addNewStream", "closeStream", "port", "process", "env", "SIGNAL_PORT", "TEST_SIGNAL_HOSTS", "server", "TestBuilder", "_signalContext", "MemorySignalManagerContext", "options", "createSignalManager", "signalHosts", "WebsocketSignalManager", "MemorySignalManager", "createPeer", "peerId", "PublicKey", "random", "TestPeer", "transport", "_swarms", "ComplexMap", "hash", "_signalManager", "_networkManager", "_proxy", "_service", "testBuilder", "TransportKind", "WEB_RTC", "MEMORY", "createNetworkManager", "setPeerInfo", "identityKey", "toHex", "peerKey", "transportFactory", "log", "info", "Error", "TCP", "TcpTransportFactory", "createRtcTransportFactory", "WEB_RTC_PROXY", "proxyPort", "servicePort", "createLinkedPorts", "createProtoRpcPeer", "requested", "BridgeService", "schema", "getService", "noHandshake", "encodingOptions", "preserveAny", "exposed", "handlers", "RtcTransportService", "RtcTransportProxyFactory", "setBridgeService", "rpc", "warn", "MemoryTransportFactory", "SwarmNetworkManager", "signalManager", "open", "close", "Promise", "all", "Array", "from", "values", "map", "swarm", "leave", "clear", "getSwarm", "topic", "get", "createSwarm", "extensionFactory", "TestSwarmConnection", "set", "goOffline", "setConnectionState", "ConnectionState", "OFFLINE", "goOnline", "ONLINE", "protocol", "peer", "TestWireProtocol", "join", "topology", "FullyConnectedTopology", "joinSwarm", "peerInfo", "protocolProvider", "factory", "leaveSwarm"]
|
|
7
7
|
}
|
|
@@ -11,22 +11,15 @@ var TcpTransportFactory = {
|
|
|
11
11
|
};
|
|
12
12
|
var TcpTransport = class {
|
|
13
13
|
options;
|
|
14
|
-
_server;
|
|
15
|
-
_socket;
|
|
16
|
-
_connected;
|
|
17
|
-
_closed;
|
|
18
|
-
closed;
|
|
19
|
-
connected;
|
|
20
|
-
errors;
|
|
14
|
+
_server = void 0;
|
|
15
|
+
_socket = void 0;
|
|
16
|
+
_connected = false;
|
|
17
|
+
_closed = false;
|
|
18
|
+
closed = new Event();
|
|
19
|
+
connected = new Event();
|
|
20
|
+
errors = new ErrorStream();
|
|
21
21
|
constructor(options) {
|
|
22
22
|
this.options = options;
|
|
23
|
-
this._server = void 0;
|
|
24
|
-
this._socket = void 0;
|
|
25
|
-
this._connected = false;
|
|
26
|
-
this._closed = false;
|
|
27
|
-
this.closed = new Event();
|
|
28
|
-
this.connected = new Event();
|
|
29
|
-
this.errors = new ErrorStream();
|
|
30
23
|
}
|
|
31
24
|
get isOpen() {
|
|
32
25
|
return this._connected && !this._closed;
|
|
@@ -2,6 +2,6 @@
|
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../../src/transport/tcp/tcp-transport.ts"],
|
|
4
4
|
"sourcesContent": ["//\n// Copyright 2020 DXOS.org\n//\n\nimport { type AddressInfo, type Server, Socket } from 'node:net';\n\nimport { Event } from '@dxos/async';\nimport { ErrorStream } from '@dxos/debug';\nimport { log } from '@dxos/log';\nimport { type Signal } from '@dxos/protocols/proto/dxos/mesh/swarm';\n\nimport { type Transport, type TransportFactory, type TransportOptions, type TransportStats } from '../transport';\n\nexport const TcpTransportFactory: TransportFactory = {\n createTransport: (options) => new TcpTransport(options),\n};\n\n/**\n * Fake transport.\n */\nexport class TcpTransport implements Transport {\n private _server?: Server = undefined;\n private _socket?: Socket = undefined;\n\n private _connected = false;\n private _closed = false;\n\n public readonly closed = new Event<void>();\n public readonly connected = new Event<void>();\n public readonly errors = new ErrorStream();\n\n constructor(private readonly options: TransportOptions) {}\n\n get isOpen() {\n return this._connected && !this._closed;\n }\n\n async open(): Promise<this> {\n log('opening');\n\n // Initiator will send a signal, the receiver will receive the unique ID and connect the streams.\n if (this.options.initiator) {\n // TODO(burdon): Why timeout?\n setTimeout(async () => {\n const { Server } = await import('node:net');\n this._server = new Server((socket) => {\n log('new connection');\n if (this._connected) {\n socket.destroy();\n }\n this._handleSocket(socket);\n });\n\n this._server.on('listening', () => {\n const { port } = this._server!.address() as AddressInfo;\n log('listening', { port });\n void this.options\n .sendSignal({\n payload: { port },\n })\n .catch((err) => {\n if (!this._closed) {\n this.errors.raise(err);\n }\n });\n });\n\n this._server.on('error', (err) => {\n this.errors.raise(err);\n });\n\n this._server.listen(0);\n });\n }\n return this;\n }\n\n async close(): Promise<this> {\n log('closing');\n this._socket?.destroy();\n this._server?.close();\n this._closed = true;\n return this;\n }\n\n async onSignal({ payload }: Signal): Promise<void> {\n log('received signal', { payload });\n if (this.options.initiator || this._connected) {\n return;\n }\n\n const socket = new Socket();\n this._handleSocket(socket);\n socket.connect({ port: payload.port, host: 'localhost' });\n }\n\n async getDetails(): Promise<string> {\n if (this.options.initiator) {\n const { port, address } = this._server?.address() as AddressInfo;\n return `LISTEN ${address}:${port}`;\n }\n\n const { port, address } = this._socket?.address() as AddressInfo;\n return `ACCEPT ${address}:${port}`;\n }\n\n async getStats(): Promise<TransportStats> {\n return {\n bytesSent: 0,\n bytesReceived: 0,\n packetsSent: 0,\n packetsReceived: 0,\n };\n }\n\n private _handleSocket(socket: Socket): void {\n log('handling socket', { remotePort: socket.remotePort, localPort: socket.localPort });\n this._socket = socket;\n\n this._socket.on('connect', () => {\n log('connected to', { port: this._socket?.remotePort });\n this._connected = true;\n });\n\n this._socket.on('error', (err) => {\n this.errors.raise(err);\n });\n\n this._socket.on('close', () => {\n this.closed.emit();\n });\n\n this.connected.emit();\n this.options.stream.pipe(this._socket!).pipe(this.options.stream);\n }\n}\n"],
|
|
5
|
-
"mappings": ";;;AAIA,SAAwCA,cAAc;AAEtD,SAASC,aAAa;AACtB,SAASC,mBAAmB;AAC5B,SAASC,WAAW;;AAKb,IAAMC,sBAAwC;EACnDC,iBAAiB,CAACC,YAAY,IAAIC,aAAaD,OAAAA;AACjD;AAKO,IAAMC,eAAN,MAAMA;;EACHC
|
|
6
|
-
"names": ["Socket", "Event", "ErrorStream", "log", "TcpTransportFactory", "createTransport", "options", "TcpTransport", "_server", "_socket", "_connected", "_closed", "closed", "connected", "errors", "
|
|
5
|
+
"mappings": ";;;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AAQc,GAAG,SAAS,MAAA;AACvB,WAAKX,OAAOgC,KAAI;IAClB,CAAA;AAEA,SAAK/B,UAAU+B,KAAI;AACnB,SAAKvC,QAAQwC,OAAOC,KAAK,KAAKrC,OAAO,EAAGqC,KAAK,KAAKzC,QAAQwC,MAAM;EAClE;AACF;",
|
|
6
|
+
"names": ["Socket", "Event", "ErrorStream", "log", "TcpTransportFactory", "createTransport", "options", "TcpTransport", "_server", "undefined", "_socket", "_connected", "_closed", "closed", "connected", "errors", "isOpen", "open", "initiator", "setTimeout", "Server", "socket", "destroy", "_handleSocket", "on", "port", "address", "sendSignal", "payload", "catch", "err", "raise", "listen", "close", "onSignal", "connect", "host", "getDetails", "getStats", "bytesSent", "bytesReceived", "packetsSent", "packetsReceived", "remotePort", "localPort", "emit", "stream", "pipe"]
|
|
7
7
|
}
|