diff --git a/package.json b/package.json index b06976b3..85dc9601 100644 --- a/package.json +++ b/package.json @@ -21,13 +21,13 @@ "lint": "aegir lint", "build": "aegir build", "build:proto": "npm run build:proto:circuit && npm run build:proto:identify && npm run build:proto:plaintext && npm run build:proto:address-book && npm run build:proto:proto-book && npm run build:proto:peer-record && npm run build:proto:envelope", - "build:proto:circuit": "pbjs -t static-module -w commonjs --force-number --no-verify --no-delimited --no-create --no-beautify --no-defaults --lint eslint-disable -o src/circuit/protocol/index.js ./src/circuit/protocol/index.proto", - "build:proto:identify": "pbjs -t static-module -w commonjs --force-number --no-verify --no-delimited --no-create --no-beautify --no-defaults --lint eslint-disable -o src/identify/message.js ./src/identify/message.proto", - "build:proto:plaintext": "pbjs -t static-module -w commonjs --force-number --no-verify --no-delimited --no-create --no-beautify --no-defaults --lint eslint-disable -o src/insecure/proto.js ./src/insecure/proto.proto", - "build:proto:address-book": "pbjs -t static-module -w commonjs --force-number --no-verify --no-delimited --no-create --no-beautify --no-defaults --lint eslint-disable -o src/peer-store/persistent/pb/address-book.js ./src/peer-store/persistent/pb/address-book.proto", - "build:proto:proto-book": "pbjs -t static-module -w commonjs --force-number --no-verify --no-delimited --no-create --no-beautify --no-defaults --lint eslint-disable -o src/peer-store/persistent/pb/proto-book.js ./src/peer-store/persistent/pb/proto-book.proto", - "build:proto:peer-record": "pbjs -t static-module -w commonjs --force-number --no-verify --no-delimited --no-create --no-beautify --no-defaults --lint eslint-disable -o src/record/peer-record/peer-record.js ./src/record/peer-record/peer-record.proto", - "build:proto:envelope": "pbjs -t static-module -w commonjs --force-number --no-verify --no-delimited --no-create --no-beautify --no-defaults --lint eslint-disable -o src/record/envelope/envelope.js ./src/record/envelope/envelope.proto", + "build:proto:circuit": "pbjs -t static-module -w commonjs -r libp2p-circuit --force-number --no-verify --no-delimited --no-create --no-beautify --no-defaults --lint eslint-disable -o src/circuit/protocol/index.js ./src/circuit/protocol/index.proto", + "build:proto:identify": "pbjs -t static-module -w commonjs -r libp2p-identify --force-number --no-verify --no-delimited --no-create --no-beautify --no-defaults --lint eslint-disable -o src/identify/message.js ./src/identify/message.proto", + "build:proto:plaintext": "pbjs -t static-module -w commonjs -r libp2p-plaintext --force-number --no-verify --no-delimited --no-create --no-beautify --no-defaults --lint eslint-disable -o src/insecure/proto.js ./src/insecure/proto.proto", + "build:proto:address-book": "pbjs -t static-module -w commonjs -r libp2p-address-book --force-number --no-verify --no-delimited --no-create --no-beautify --no-defaults --lint eslint-disable -o src/peer-store/persistent/pb/address-book.js ./src/peer-store/persistent/pb/address-book.proto", + "build:proto:proto-book": "pbjs -t static-module -w commonjs -r libp2p-proto-book --force-number --no-verify --no-delimited --no-create --no-beautify --no-defaults --lint eslint-disable -o src/peer-store/persistent/pb/proto-book.js ./src/peer-store/persistent/pb/proto-book.proto", + "build:proto:peer-record": "pbjs -t static-module -w commonjs -r libp2p-peer-record --force-number --no-verify --no-delimited --no-create --no-beautify --no-defaults --lint eslint-disable -o src/record/peer-record/peer-record.js ./src/record/peer-record/peer-record.proto", + "build:proto:envelope": "pbjs -t static-module -w commonjs -r libp2p-envelope --force-number --no-verify --no-delimited --no-create --no-beautify --no-defaults --lint eslint-disable -o src/record/envelope/envelope.js ./src/record/envelope/envelope.proto", "build:proto-types": "npm run build:proto-types:circuit && npm run build:proto-types:identify && npm run build:proto-types:plaintext && npm run build:proto-types:address-book && npm run build:proto-types:proto-book && npm run build:proto-types:peer-record && npm run build:proto-types:envelope", "build:proto-types:circuit": "pbts -o src/circuit/protocol/index.d.ts src/circuit/protocol/index.js", "build:proto-types:identify": "pbts -o src/identify/message.d.ts src/identify/message.js", diff --git a/src/circuit/protocol/index.js b/src/circuit/protocol/index.js index be12eb9b..d929debc 100644 --- a/src/circuit/protocol/index.js +++ b/src/circuit/protocol/index.js @@ -7,7 +7,7 @@ var $protobuf = require("protobufjs/minimal"); var $Reader = $protobuf.Reader, $Writer = $protobuf.Writer, $util = $protobuf.util; // Exported root namespace -var $root = $protobuf.roots["default"] || ($protobuf.roots["default"] = {}); +var $root = $protobuf.roots["libp2p-circuit"] || ($protobuf.roots["libp2p-circuit"] = {}); $root.CircuitRelay = (function() { diff --git a/src/identify/message.js b/src/identify/message.js index 9f4d6e4e..f4f04feb 100644 --- a/src/identify/message.js +++ b/src/identify/message.js @@ -7,7 +7,7 @@ var $protobuf = require("protobufjs/minimal"); var $Reader = $protobuf.Reader, $Writer = $protobuf.Writer, $util = $protobuf.util; // Exported root namespace -var $root = $protobuf.roots["default"] || ($protobuf.roots["default"] = {}); +var $root = $protobuf.roots["libp2p-identify"] || ($protobuf.roots["libp2p-identify"] = {}); $root.Identify = (function() { diff --git a/src/insecure/proto.js b/src/insecure/proto.js index 7c0161f6..ab43d4a9 100644 --- a/src/insecure/proto.js +++ b/src/insecure/proto.js @@ -7,7 +7,7 @@ var $protobuf = require("protobufjs/minimal"); var $Reader = $protobuf.Reader, $Writer = $protobuf.Writer, $util = $protobuf.util; // Exported root namespace -var $root = $protobuf.roots["default"] || ($protobuf.roots["default"] = {}); +var $root = $protobuf.roots["libp2p-plaintext"] || ($protobuf.roots["libp2p-plaintext"] = {}); $root.Exchange = (function() { diff --git a/src/peer-store/persistent/pb/address-book.js b/src/peer-store/persistent/pb/address-book.js index 489a36ca..f45bc942 100644 --- a/src/peer-store/persistent/pb/address-book.js +++ b/src/peer-store/persistent/pb/address-book.js @@ -7,7 +7,7 @@ var $protobuf = require("protobufjs/minimal"); var $Reader = $protobuf.Reader, $Writer = $protobuf.Writer, $util = $protobuf.util; // Exported root namespace -var $root = $protobuf.roots["default"] || ($protobuf.roots["default"] = {}); +var $root = $protobuf.roots["libp2p-address-book"] || ($protobuf.roots["libp2p-address-book"] = {}); $root.Addresses = (function() { diff --git a/src/peer-store/persistent/pb/proto-book.js b/src/peer-store/persistent/pb/proto-book.js index fea33f99..fc3633dd 100644 --- a/src/peer-store/persistent/pb/proto-book.js +++ b/src/peer-store/persistent/pb/proto-book.js @@ -7,7 +7,7 @@ var $protobuf = require("protobufjs/minimal"); var $Reader = $protobuf.Reader, $Writer = $protobuf.Writer, $util = $protobuf.util; // Exported root namespace -var $root = $protobuf.roots["default"] || ($protobuf.roots["default"] = {}); +var $root = $protobuf.roots["libp2p-proto-book"] || ($protobuf.roots["libp2p-proto-book"] = {}); $root.Protocols = (function() { diff --git a/src/record/envelope/envelope.js b/src/record/envelope/envelope.js index ff102b24..8741154e 100644 --- a/src/record/envelope/envelope.js +++ b/src/record/envelope/envelope.js @@ -7,7 +7,7 @@ var $protobuf = require("protobufjs/minimal"); var $Reader = $protobuf.Reader, $Writer = $protobuf.Writer, $util = $protobuf.util; // Exported root namespace -var $root = $protobuf.roots["default"] || ($protobuf.roots["default"] = {}); +var $root = $protobuf.roots["libp2p-envelope"] || ($protobuf.roots["libp2p-envelope"] = {}); $root.Envelope = (function() { diff --git a/src/record/peer-record/peer-record.js b/src/record/peer-record/peer-record.js index e851b146..9f956670 100644 --- a/src/record/peer-record/peer-record.js +++ b/src/record/peer-record/peer-record.js @@ -7,7 +7,7 @@ var $protobuf = require("protobufjs/minimal"); var $Reader = $protobuf.Reader, $Writer = $protobuf.Writer, $util = $protobuf.util; // Exported root namespace -var $root = $protobuf.roots["default"] || ($protobuf.roots["default"] = {}); +var $root = $protobuf.roots["libp2p-peer-record"] || ($protobuf.roots["libp2p-peer-record"] = {}); $root.PeerRecord = (function() {