Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@dxos/broadcast

Package Overview
Dependencies
Maintainers
12
Versions
735
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@dxos/broadcast - npm Package Compare versions

Comparing version 2.33.9-dev.d70ac9ee to 2.33.9-dev.d9963f00

14

dist/src/broadcast.js

@@ -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.d70ac9ee",
"version": "2.33.9-dev.d9963f00",
"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.d70ac9ee",
"@dxos/codec-protobuf": "2.33.9-dev.d70ac9ee",
"@dxos/crypto": "2.33.9-dev.d70ac9ee",
"@dxos/async": "2.33.9-dev.d9963f00",
"@dxos/codec-protobuf": "2.33.9-dev.d9963f00",
"@dxos/crypto": "2.33.9-dev.d9963f00",
"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.d70ac9ee",
"@dxos/network-generator": "2.33.9-dev.d9963f00",
"@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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc