@dxos/broadcast
Advanced tools
Comparing version 2.33.9-dev.7d11f506 to 2.33.9-dev.b6f4ca19
@@ -10,4 +10,4 @@ "use strict"; | ||
exports.Broadcast = void 0; | ||
const assert_1 = __importDefault(require("assert")); | ||
const debug_1 = __importDefault(require("debug")); | ||
const node_assert_1 = __importDefault(require("node:assert")); | ||
const tiny_lru_1 = __importDefault(require("tiny-lru")); | ||
@@ -31,5 +31,5 @@ const async_1 = require("@dxos/async"); | ||
this.subscribeError = new async_1.Event(); | ||
(0, assert_1.default)(middleware); | ||
(0, assert_1.default)(middleware.send); | ||
(0, assert_1.default)(middleware.subscribe); | ||
(0, node_assert_1.default)(middleware); | ||
(0, node_assert_1.default)(middleware.send); | ||
(0, node_assert_1.default)(middleware.subscribe); | ||
const { id = (0, crypto_1.randomBytes)(32), maxAge = 10 * 1000, maxSize = 1000 } = options; | ||
@@ -49,4 +49,4 @@ this._id = id; | ||
const { seqno = (0, crypto_1.randomBytes)(32) } = options; | ||
(0, assert_1.default)(Buffer.isBuffer(data)); | ||
(0, assert_1.default)(Buffer.isBuffer(seqno)); | ||
(0, node_assert_1.default)(Buffer.isBuffer(data)); | ||
(0, node_assert_1.default)(Buffer.isBuffer(seqno)); | ||
return this._publish({ | ||
@@ -62,3 +62,3 @@ seqno, | ||
updatePeers(peers) { | ||
(0, assert_1.default)(peers.every(peer => Buffer.isBuffer(peer.id)), 'Peer ID is expected to be a buffer.'); | ||
(0, node_assert_1.default)(peers.every(peer => Buffer.isBuffer(peer.id)), 'Peer ID is expected to be a buffer.'); | ||
this._peers = peers; | ||
@@ -65,0 +65,0 @@ } |
{ | ||
"name": "@dxos/broadcast", | ||
"version": "2.33.9-dev.7d11f506", | ||
"version": "2.33.9-dev.b6f4ca19", | ||
"description": "Abstract module to send broadcast messages.", | ||
@@ -13,2 +13,5 @@ "repository": { | ||
"types": "dist/src/index.d.ts", | ||
"browser": { | ||
"node:assert": "assert" | ||
}, | ||
"files": [ | ||
@@ -19,5 +22,6 @@ "srd", | ||
"dependencies": { | ||
"@dxos/async": "2.33.9-dev.7d11f506", | ||
"@dxos/codec-protobuf": "2.33.9-dev.7d11f506", | ||
"@dxos/crypto": "2.33.9-dev.7d11f506", | ||
"@dxos/async": "2.33.9-dev.b6f4ca19", | ||
"@dxos/codec-protobuf": "2.33.9-dev.b6f4ca19", | ||
"@dxos/crypto": "2.33.9-dev.b6f4ca19", | ||
"assert": "^2.0.0", | ||
"debug": "^4.3.3", | ||
@@ -28,6 +32,6 @@ "tiny-lru": "^7.0.6" | ||
"@dxos/eslint-plugin": "~1.0.34", | ||
"@dxos/network-generator": "2.33.9-dev.7d11f506", | ||
"@dxos/network-generator": "2.33.9-dev.b6f4ca19", | ||
"@dxos/protocols-toolchain": "2.33.8", | ||
"@types/debug": "^4.1.7", | ||
"@types/jest": "^26.0.7", | ||
"@types/jest": "^28.1.6", | ||
"@types/node": "^16.11.27", | ||
@@ -34,0 +38,0 @@ "eslint": "^7.12.1", |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
75469
6
+ Addedassert@^2.0.0
+ Added@dxos/async@2.33.9-dev.b6f4ca19(transitive)
+ Added@dxos/codec-protobuf@2.33.9-dev.b6f4ca19(transitive)
+ Added@dxos/crypto@2.33.9-dev.b6f4ca19(transitive)
+ Added@dxos/debug@2.33.9-dev.b6f4ca19(transitive)
+ Added@dxos/protocols@2.33.9-dev.b6f4ca19(transitive)
+ Addedevents@3.3.0(transitive)
- Removed@dxos/async@2.33.9-dev.7d11f506(transitive)
- Removed@dxos/codec-protobuf@2.33.9-dev.7d11f506(transitive)
- Removed@dxos/crypto@2.33.9-dev.7d11f506(transitive)
- Removed@dxos/debug@2.33.9-dev.7d11f506(transitive)
- Removed@dxos/protocols@2.33.9-dev.7d11f506(transitive)