Simulator first commit

This commit is contained in:
2019-09-18 11:11:16 +03:00
commit 6e1686be67
5028 changed files with 985331 additions and 0 deletions

12
node_modules/protobufjs/tests/PingExample.proto generated vendored Normal file
View File

@ -0,0 +1,12 @@
message Message {
optional Ping ping = 1;
optional Pong pong = 2;
message Ping {
required uint32 time = 1;
}
message Pong {
required uint32 time = 1;
}
}

4
node_modules/protobufjs/tests/T139.proto generated vendored Normal file
View File

@ -0,0 +1,4 @@
message T139 {
required int32 a = 1;
required uint32 b = 2;
}

13
node_modules/protobufjs/tests/T263.proto generated vendored Normal file
View File

@ -0,0 +1,13 @@
package services;
message resume {
message Resume {
repeated string experience = 1;
}
}
message profile {
message Profile {
optional services.resume.Resume resume = 1;
}
}

29
node_modules/protobufjs/tests/annotations.proto generated vendored Normal file
View File

@ -0,0 +1,29 @@
// Copyright (c) 2015, Google Inc.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
syntax = "proto3";
package google.api;
// import "google/api/http.proto";
// import "google/protobuf/descriptor.proto";
option java_multiple_files = true;
option java_outer_classname = "AnnotationsProto";
option java_package = "com.google.api";
extend google.protobuf.MethodOptions {
// See `HttpRule`.
HttpRule http = 72295728;
}

48
node_modules/protobufjs/tests/bench.js generated vendored Normal file
View File

@ -0,0 +1,48 @@
var ProtoBuf = require("../index.js");
var sample = {
id: 1,
name: "John123",
password: "helloworld"
};
console.log("Sample: `"+JSON.stringify(sample, null, 4));
console.log("\n");
var proto = " message Sample {" +
"required uint32 id = 1;" +
"required string name = 2;" +
"required string password = 3;" +
"}";
var builder = ProtoBuf.loadProto(proto, "bench.proto"),
Sample = builder.build("Sample");
// Compare size
console.log("Encoding size");
console.log("-------------");
var jsonData = new Buffer(JSON.stringify(sample), "utf8"),
protoData = new Sample(sample).toBuffer();
console.log("* Encoded sample size as JSON: "+jsonData.length+" bytes");
console.log("* Encoded sample size as protocol buffer: "+protoData.length+" bytes");
console.log("");
// Compare encoding speed
console.log("Encoding speed");
console.log("--------------");
(function() {
// Assuming that a receive buffer is used
var buf = ProtoBuf.ByteBuffer.allocate(64);
var protoSample = new Sample(sample),
n = 100000, k = (n/1000)+'k';
console.time("* ProtoBuf encode "+k);
for (var i=0; i<n; ++i)
protoSample.encode(buf, true),
buf.flip();
console.timeEnd("* ProtoBuf encode "+k);
console.time("* ProtoBuf decode "+k);
for (var i=0; i<n; ++i)
Sample.decode(buf),
buf.flip();
console.timeEnd("* ProtoBuf decode "+k);
})();

373
node_modules/protobufjs/tests/bench.txt generated vendored Normal file
View File

@ -0,0 +1,373 @@
Statistical profiling result from v8.log, (1544 ticks, 944 unaccounted, 0 excluded).
[Unknown]:
ticks total nonlib name
944 61.1%
[Shared libraries]:
ticks total nonlib name
[JavaScript]:
ticks total nonlib name
248 16.1% 16.1% LazyCompile: *Buffer.write buffer.js:315
190 12.3% 12.3% LazyCompile: *Message x:\public\ProtoBuf\dist\ProtoBuf.js:1629
189 12.2% 12.2% LazyCompile: ProtoBuf.Reflect.Message.decode x:\public\ProtoBuf\dist\ProtoBuf.js:2325
188 12.2% 12.2% LazyCompile: *module.exports.ByteBuffer.writeVString x:\public\ProtoBuf\node_modules\bytebuffer\dist\ByteBufferNB.js:1893
142 9.2% 9.2% LazyCompile: *Buffer.toString buffer.js:392
84 5.4% 5.4% LazyCompile: ProtoBuf.Reflect.Field.encodeValue x:\public\ProtoBuf\dist\ProtoBuf.js:2703
62 4.0% 4.0% LazyCompile: *toLowerCase native string.js:739
47 3.0% 3.0% LazyCompile: ProtoBuf.Reflect.Field.decode x:\public\ProtoBuf\dist\ProtoBuf.js:2919
38 2.5% 2.5% LazyCompile: *module.exports.ByteBuffer.writeVarint32 x:\public\ProtoBuf\node_modules\bytebuffer\dist\ByteBufferNB.js:1193
36 2.3% 2.3% LazyCompile: *ProtoBuf.Reflect.Message.encode x:\public\ProtoBuf\dist\ProtoBuf.js:2233
27 1.7% 1.7% LazyCompile: ProtoBuf.Reflect.Field.encode x:\public\ProtoBuf\dist\ProtoBuf.js:2651
25 1.6% 1.6% LazyCompile: *module.exports.ByteBuffer.readVarint32 x:\public\ProtoBuf\node_modules\bytebuffer\dist\ByteBufferNB.js:1272
25 1.6% 1.6% Builtin: A builtin from the snapshot
24 1.6% 1.6% Stub: CompareICStub
15 1.0% 1.0% Stub: CEntryStub
15 1.0% 1.0% LazyCompile: <anonymous> native string.js:36
15 1.0% 1.0% LazyCompile: *module.exports.ByteBuffer.readVString x:\public\ProtoBuf\node_modules\bytebuffer\dist\ByteBufferNB.js:1932
11 0.7% 0.7% Stub: InstanceofStub
11 0.7% 0.7% LazyCompile: *<anonymous> x:\public\ProtoBuf\tests\bench.js:33
11 0.7% 0.7% KeyedLoadIC: A keyed load IC from the snapshot
10 0.6% 0.6% LazyCompile: Message.decode x:\public\ProtoBuf\dist\ProtoBuf.js:2083
9 0.6% 0.6% LazyCompile: Message.encode x:\public\ProtoBuf\dist\ProtoBuf.js:1870
9 0.6% 0.6% LazyCompile: *module.exports.ByteBuffer.flip x:\public\ProtoBuf\node_modules\bytebuffer\dist\ByteBufferNB.js:2252
8 0.5% 0.5% LazyCompile: ~NativeModule.compile node.js:892
7 0.5% 0.5% Stub: KeyedLoadElementStub
6 0.4% 0.4% Stub: CompareICStub {2}
6 0.4% 0.4% LazyCompile: *module.exports.ByteBuffer.LE x:\public\ProtoBuf\node_modules\bytebuffer\dist\ByteBufferNB.js:2299
6 0.4% 0.4% LazyCompile: *isFinite native v8natives.js:103
5 0.3% 0.3% Stub: ToBooleanStub_UndefinedSpecObject
5 0.3% 0.3% LazyCompile: ~Module._compile module.js:374
5 0.3% 0.3% Builtin: A builtin from the snapshot {3}
4 0.3% 0.3% Stub: ToBooleanStub
4 0.3% 0.3% Stub: KeyedLoadElementStub {1}
4 0.3% 0.3% LazyCompile: *module.exports.ByteBuffer.remaining x:\public\ProtoBuf\node_modules\bytebuffer\dist\ByteBufferNB.js:2397
3 0.2% 0.2% KeyedStoreIC: A keyed store IC from the snapshot
2 0.1% 0.1% Stub: BinaryOpStub_SHR_Alloc_SMI
2 0.1% 0.1% Stub: BinaryOpStub_SHL_Alloc_SMI
2 0.1% 0.1% LazyCompile: ~ProtoBuf.Reflect.Message.encode x:\public\ProtoBuf\dist\ProtoBuf.js:2233
2 0.1% 0.1% Function: ~<anonymous> x:\public\ProtoBuf\tests\bench.js:33
2 0.1% 0.1% Function: ~<anonymous> x:\public\ProtoBuf\node_modules\bytebuffer\dist\ByteBufferAB.js:23
2 0.1% 0.1% Function: ~<anonymous> x:\public\ProtoBuf\dist\ProtoBuf.js:22
2 0.1% 0.1% Function: ~<anonymous> net.js:1
1 0.1% 0.1% Stub: ToBooleanStub {1}
1 0.1% 0.1% Stub: CompareICStub {1}
1 0.1% 0.1% Stub: CallConstructStub
1 0.1% 0.1% Stub: BinaryOpStub_MUL_Alloc_SMI
1 0.1% 0.1% Stub: BinaryOpStub_BIT_OR_OverwriteLeft_SMI
1 0.1% 0.1% LazyCompile: ~tryFile module.js:138
1 0.1% 0.1% LazyCompile: ~nextTick node.js:334
1 0.1% 0.1% LazyCompile: ~module.exports.ByteBuffer.writeVString x:\public\ProtoBuf\node_modules\bytebuffer\dist\ByteBufferNB.js:1893
1 0.1% 0.1% LazyCompile: ~join native array.js:410
1 0.1% 0.1% LazyCompile: ~fs.statSync fs.js:687
1 0.1% 0.1% LazyCompile: ~fs.openSync fs.js:429
1 0.1% 0.1% LazyCompile: ~fs.fstatSync fs.js:678
1 0.1% 0.1% LazyCompile: ~filter native array.js:1036
1 0.1% 0.1% LazyCompile: ~exec native regexp.js:168
1 0.1% 0.1% LazyCompile: ~createWriteReq net.js:658
1 0.1% 0.1% LazyCompile: ~createWritableStdioStream node.js:550
1 0.1% 0.1% LazyCompile: ~bind native v8natives.js:1578
1 0.1% 0.1% LazyCompile: ~StringSplitOnRegExp native string.js:591
1 0.1% 0.1% LazyCompile: ~ProtoBuf.Reflect.Message.decode x:\public\ProtoBuf\dist\ProtoBuf.js:2325
1 0.1% 0.1% LazyCompile: ~ProtoBuf.Reflect.Field.decode x:\public\ProtoBuf\dist\ProtoBuf.js:2919
1 0.1% 0.1% LazyCompile: ~ProtoBuf.Reflect.Field x:\public\ProtoBuf\dist\ProtoBuf.js:2401
1 0.1% 0.1% LazyCompile: ~ProtoBuf.DotProto.Parser._parseId x:\public\ProtoBuf\dist\ProtoBuf.js:724
1 0.1% 0.1% LazyCompile: ~Message x:\public\ProtoBuf\dist\ProtoBuf.js:1629
1 0.1% 0.1% LazyCompile: ~Buffer.write buffer.js:315
1 0.1% 0.1% LazyCompile: ~Buffer buffer.js:156
1 0.1% 0.1% LazyCompile: statPath module.js:88
1 0.1% 0.1% KeyedLoadIC: args_count: 0
1 0.1% 0.1% Function: ~<anonymous> x:\public\ProtoBuf\tests\bench.js:1
1 0.1% 0.1% Function: ~<anonymous> x:\public\ProtoBuf\node_modules\bytebuffer\node_modules\long\dist\Long.js:23
1 0.1% 0.1% Function: ~<anonymous> fs.js:1
1 0.1% 0.1% Builtin: A builtin from the snapshot {2}
1 0.1% 0.1% Builtin: A builtin from the snapshot {1}
[C++]:
ticks total nonlib name
[GC]:
ticks total nonlib name
2 0.1%
[Bottom up (heavy) profile]:
Note: percentage shows a share of a particular caller in the total
amount of its parent calls.
Callers occupying less than 2.0% are not shown.
ticks parent name
248 16.1% LazyCompile: *Buffer.write buffer.js:315
247 99.6% LazyCompile: *module.exports.ByteBuffer.writeVString x:\public\ProtoBuf\node_modules\bytebuffer\dist\ByteBufferNB.js:1893
247 100.0% LazyCompile: ProtoBuf.Reflect.Field.encodeValue x:\public\ProtoBuf\dist\ProtoBuf.js:2703
247 100.0% LazyCompile: ProtoBuf.Reflect.Field.encode x:\public\ProtoBuf\dist\ProtoBuf.js:2651
247 100.0% LazyCompile: *ProtoBuf.Reflect.Message.encode x:\public\ProtoBuf\dist\ProtoBuf.js:2233
247 100.0% LazyCompile: Message.encode x:\public\ProtoBuf\dist\ProtoBuf.js:1870
190 12.3% LazyCompile: *Message x:\public\ProtoBuf\dist\ProtoBuf.js:1629
190 100.0% LazyCompile: ProtoBuf.Reflect.Message.decode x:\public\ProtoBuf\dist\ProtoBuf.js:2325
190 100.0% LazyCompile: Message.decode x:\public\ProtoBuf\dist\ProtoBuf.js:2083
182 95.8% LazyCompile: *<anonymous> x:\public\ProtoBuf\tests\bench.js:33
182 100.0% Function: ~<anonymous> x:\public\ProtoBuf\tests\bench.js:1
182 100.0% LazyCompile: ~Module._compile module.js:374
8 4.2% Function: ~<anonymous> x:\public\ProtoBuf\tests\bench.js:33
8 100.0% Function: ~<anonymous> x:\public\ProtoBuf\tests\bench.js:1
8 100.0% LazyCompile: ~Module._compile module.js:374
189 12.2% LazyCompile: ProtoBuf.Reflect.Message.decode x:\public\ProtoBuf\dist\ProtoBuf.js:2325
189 100.0% LazyCompile: Message.decode x:\public\ProtoBuf\dist\ProtoBuf.js:2083
183 96.8% LazyCompile: *<anonymous> x:\public\ProtoBuf\tests\bench.js:33
183 100.0% Function: ~<anonymous> x:\public\ProtoBuf\tests\bench.js:1
183 100.0% LazyCompile: ~Module._compile module.js:374
183 100.0% LazyCompile: ~Module._extensions..js module.js:472
6 3.2% Function: ~<anonymous> x:\public\ProtoBuf\tests\bench.js:33
6 100.0% Function: ~<anonymous> x:\public\ProtoBuf\tests\bench.js:1
6 100.0% LazyCompile: ~Module._compile module.js:374
6 100.0% LazyCompile: ~Module._extensions..js module.js:472
188 12.2% LazyCompile: *module.exports.ByteBuffer.writeVString x:\public\ProtoBuf\node_modules\bytebuffer\dist\ByteBufferNB.js:1893
188 100.0% LazyCompile: ProtoBuf.Reflect.Field.encodeValue x:\public\ProtoBuf\dist\ProtoBuf.js:2703
188 100.0% LazyCompile: ProtoBuf.Reflect.Field.encode x:\public\ProtoBuf\dist\ProtoBuf.js:2651
187 99.5% LazyCompile: *ProtoBuf.Reflect.Message.encode x:\public\ProtoBuf\dist\ProtoBuf.js:2233
187 100.0% LazyCompile: Message.encode x:\public\ProtoBuf\dist\ProtoBuf.js:1870
178 95.2% LazyCompile: *<anonymous> x:\public\ProtoBuf\tests\bench.js:33
9 4.8% Function: ~<anonymous> x:\public\ProtoBuf\tests\bench.js:33
142 9.2% LazyCompile: *Buffer.toString buffer.js:392
142 100.0% LazyCompile: *module.exports.ByteBuffer.readVString x:\public\ProtoBuf\node_modules\bytebuffer\dist\ByteBufferNB.js:1932
141 99.3% LazyCompile: ProtoBuf.Reflect.Field.decode x:\public\ProtoBuf\dist\ProtoBuf.js:2919
141 100.0% LazyCompile: ProtoBuf.Reflect.Message.decode x:\public\ProtoBuf\dist\ProtoBuf.js:2325
141 100.0% LazyCompile: Message.decode x:\public\ProtoBuf\dist\ProtoBuf.js:2083
132 93.6% LazyCompile: *<anonymous> x:\public\ProtoBuf\tests\bench.js:33
9 6.4% Function: ~<anonymous> x:\public\ProtoBuf\tests\bench.js:33
84 5.4% LazyCompile: ProtoBuf.Reflect.Field.encodeValue x:\public\ProtoBuf\dist\ProtoBuf.js:2703
82 97.6% LazyCompile: ProtoBuf.Reflect.Field.encode x:\public\ProtoBuf\dist\ProtoBuf.js:2651
82 100.0% LazyCompile: *ProtoBuf.Reflect.Message.encode x:\public\ProtoBuf\dist\ProtoBuf.js:2233
82 100.0% LazyCompile: Message.encode x:\public\ProtoBuf\dist\ProtoBuf.js:1870
79 96.3% LazyCompile: *<anonymous> x:\public\ProtoBuf\tests\bench.js:33
79 100.0% Function: ~<anonymous> x:\public\ProtoBuf\tests\bench.js:1
3 3.7% Function: ~<anonymous> x:\public\ProtoBuf\tests\bench.js:33
3 100.0% Function: ~<anonymous> x:\public\ProtoBuf\tests\bench.js:1
2 2.4% LazyCompile: *ProtoBuf.Reflect.Message.encode x:\public\ProtoBuf\dist\ProtoBuf.js:2233
2 100.0% LazyCompile: Message.encode x:\public\ProtoBuf\dist\ProtoBuf.js:1870
2 100.0% LazyCompile: *<anonymous> x:\public\ProtoBuf\tests\bench.js:33
2 100.0% Function: ~<anonymous> x:\public\ProtoBuf\tests\bench.js:1
2 100.0% LazyCompile: ~Module._compile module.js:374
62 4.0% LazyCompile: *toLowerCase native string.js:739
36 58.1% LazyCompile: *Buffer.write buffer.js:315
36 100.0% LazyCompile: *module.exports.ByteBuffer.writeVString x:\public\ProtoBuf\node_modules\bytebuffer\dist\ByteBufferNB.js:1893
36 100.0% LazyCompile: ProtoBuf.Reflect.Field.encodeValue x:\public\ProtoBuf\dist\ProtoBuf.js:2703
36 100.0% LazyCompile: ProtoBuf.Reflect.Field.encode x:\public\ProtoBuf\dist\ProtoBuf.js:2651
36 100.0% LazyCompile: *ProtoBuf.Reflect.Message.encode x:\public\ProtoBuf\dist\ProtoBuf.js:2233
23 37.1% LazyCompile: *Buffer.toString buffer.js:392
23 100.0% LazyCompile: *module.exports.ByteBuffer.readVString x:\public\ProtoBuf\node_modules\bytebuffer\dist\ByteBufferNB.js:1932
23 100.0% LazyCompile: ProtoBuf.Reflect.Field.decode x:\public\ProtoBuf\dist\ProtoBuf.js:2919
23 100.0% LazyCompile: ProtoBuf.Reflect.Message.decode x:\public\ProtoBuf\dist\ProtoBuf.js:2325
23 100.0% LazyCompile: Message.decode x:\public\ProtoBuf\dist\ProtoBuf.js:2083
2 3.2% LazyCompile: *module.exports.ByteBuffer.writeVString x:\public\ProtoBuf\node_modules\bytebuffer\dist\ByteBufferNB.js:1893
2 100.0% LazyCompile: ProtoBuf.Reflect.Field.encodeValue x:\public\ProtoBuf\dist\ProtoBuf.js:2703
2 100.0% LazyCompile: ProtoBuf.Reflect.Field.encode x:\public\ProtoBuf\dist\ProtoBuf.js:2651
2 100.0% LazyCompile: *ProtoBuf.Reflect.Message.encode x:\public\ProtoBuf\dist\ProtoBuf.js:2233
2 100.0% LazyCompile: Message.encode x:\public\ProtoBuf\dist\ProtoBuf.js:1870
47 3.0% LazyCompile: ProtoBuf.Reflect.Field.decode x:\public\ProtoBuf\dist\ProtoBuf.js:2919
46 97.9% LazyCompile: ProtoBuf.Reflect.Message.decode x:\public\ProtoBuf\dist\ProtoBuf.js:2325
46 100.0% LazyCompile: Message.decode x:\public\ProtoBuf\dist\ProtoBuf.js:2083
44 95.7% LazyCompile: *<anonymous> x:\public\ProtoBuf\tests\bench.js:33
44 100.0% Function: ~<anonymous> x:\public\ProtoBuf\tests\bench.js:1
44 100.0% LazyCompile: ~Module._compile module.js:374
2 4.3% Function: ~<anonymous> x:\public\ProtoBuf\tests\bench.js:33
2 100.0% Function: ~<anonymous> x:\public\ProtoBuf\tests\bench.js:1
2 100.0% LazyCompile: ~Module._compile module.js:374
38 2.5% LazyCompile: *module.exports.ByteBuffer.writeVarint32 x:\public\ProtoBuf\node_modules\bytebuffer\dist\ByteBufferNB.js:1193
26 68.4% LazyCompile: ProtoBuf.Reflect.Field.encode x:\public\ProtoBuf\dist\ProtoBuf.js:2651
26 100.0% LazyCompile: *ProtoBuf.Reflect.Message.encode x:\public\ProtoBuf\dist\ProtoBuf.js:2233
26 100.0% LazyCompile: Message.encode x:\public\ProtoBuf\dist\ProtoBuf.js:1870
26 100.0% LazyCompile: *<anonymous> x:\public\ProtoBuf\tests\bench.js:33
26 100.0% Function: ~<anonymous> x:\public\ProtoBuf\tests\bench.js:1
6 15.8% LazyCompile: ProtoBuf.Reflect.Field.encodeValue x:\public\ProtoBuf\dist\ProtoBuf.js:2703
6 100.0% LazyCompile: ProtoBuf.Reflect.Field.encode x:\public\ProtoBuf\dist\ProtoBuf.js:2651
6 100.0% LazyCompile: *ProtoBuf.Reflect.Message.encode x:\public\ProtoBuf\dist\ProtoBuf.js:2233
6 100.0% LazyCompile: Message.encode x:\public\ProtoBuf\dist\ProtoBuf.js:1870
6 100.0% LazyCompile: *<anonymous> x:\public\ProtoBuf\tests\bench.js:33
6 15.8% LazyCompile: *module.exports.ByteBuffer.writeVString x:\public\ProtoBuf\node_modules\bytebuffer\dist\ByteBufferNB.js:1893
6 100.0% LazyCompile: ProtoBuf.Reflect.Field.encodeValue x:\public\ProtoBuf\dist\ProtoBuf.js:2703
6 100.0% LazyCompile: ProtoBuf.Reflect.Field.encode x:\public\ProtoBuf\dist\ProtoBuf.js:2651
6 100.0% LazyCompile: *ProtoBuf.Reflect.Message.encode x:\public\ProtoBuf\dist\ProtoBuf.js:2233
6 100.0% LazyCompile: Message.encode x:\public\ProtoBuf\dist\ProtoBuf.js:1870
36 2.3% LazyCompile: *ProtoBuf.Reflect.Message.encode x:\public\ProtoBuf\dist\ProtoBuf.js:2233
35 97.2% LazyCompile: Message.encode x:\public\ProtoBuf\dist\ProtoBuf.js:1870
32 91.4% LazyCompile: *<anonymous> x:\public\ProtoBuf\tests\bench.js:33
32 100.0% Function: ~<anonymous> x:\public\ProtoBuf\tests\bench.js:1
32 100.0% LazyCompile: ~Module._compile module.js:374
32 100.0% LazyCompile: ~Module._extensions..js module.js:472
3 8.6% Function: ~<anonymous> x:\public\ProtoBuf\tests\bench.js:33
3 100.0% Function: ~<anonymous> x:\public\ProtoBuf\tests\bench.js:1
3 100.0% LazyCompile: ~Module._compile module.js:374
3 100.0% LazyCompile: ~Module._extensions..js module.js:472
[Top down (heavy) profile]:
Note: callees occupying less than 0.1% are not shown.
inclusive self name
ticks total ticks total
1533 99.3% 0 0.0% Function: ~<anonymous> node.js:27
1533 99.3% 0 0.0% LazyCompile: ~startup node.js:30
1527 98.9% 0 0.0% LazyCompile: ~Module.runMain module.js:495
1527 98.9% 0 0.0% LazyCompile: Module._load module.js:275
1524 98.7% 0 0.0% LazyCompile: ~Module.load module.js:346
1523 98.6% 0 0.0% LazyCompile: ~Module._extensions..js module.js:472
1523 98.6% 0 0.0% LazyCompile: ~Module._compile module.js:374
1523 98.6% 1 0.1% Function: ~<anonymous> x:\public\ProtoBuf\tests\bench.js:1
1413 91.5% 11 0.7% LazyCompile: *<anonymous> x:\public\ProtoBuf\tests\bench.js:33
701 45.4% 9 0.6% LazyCompile: Message.encode x:\public\ProtoBuf\dist\ProtoBuf.js:1870
681 44.1% 32 2.1% LazyCompile: *ProtoBuf.Reflect.Message.encode x:\public\ProtoBuf\dist\ProtoBuf.js:2233
631 40.9% 22 1.4% LazyCompile: ProtoBuf.Reflect.Field.encode x:\public\ProtoBuf\dist\ProtoBuf.js:2651
576 37.3% 79 5.1% LazyCompile: ProtoBuf.Reflect.Field.encodeValue x:\public\ProtoBuf\dist\ProtoBuf.js:2703
473 30.6% 178 11.5% LazyCompile: *module.exports.ByteBuffer.writeVString x:\public\ProtoBuf\node_modules\bytebuffer\dist\ByteBufferNB.js:1893
286 18.5% 236 15.3% LazyCompile: *Buffer.write buffer.js:315
37 2.4% 35 2.3% LazyCompile: *toLowerCase native string.js:739
2 0.1% 2 0.1% Stub: CEntryStub
5 0.3% 5 0.3% LazyCompile: *isFinite native v8natives.js:103
3 0.2% 3 0.2% Stub: CompareICStub {2}
3 0.2% 2 0.1% LazyCompile: <anonymous> native string.js:36
6 0.4% 6 0.4% LazyCompile: *module.exports.ByteBuffer.writeVarint32 x:\public\ProtoBuf\node_modules\bytebuffer\dist\ByteBufferNB.js:1193
2 0.1% 2 0.1% LazyCompile: *toLowerCase native string.js:739
13 0.8% 13 0.8% Stub: CompareICStub
6 0.4% 6 0.4% LazyCompile: *module.exports.ByteBuffer.writeVarint32 x:\public\ProtoBuf\node_modules\bytebuffer\dist\ByteBufferNB.js:1193
4 0.3% 4 0.3% Builtin: A builtin from the snapshot
26 1.7% 26 1.7% LazyCompile: *module.exports.ByteBuffer.writeVarint32 x:\public\ProtoBuf\node_modules\bytebuffer\dist\ByteBufferNB.js:1193
3 0.2% 3 0.2% Builtin: A builtin from the snapshot
2 0.1% 2 0.1% Stub: BinaryOpStub_SHL_Alloc_SMI
8 0.5% 8 0.5% Stub: InstanceofStub
6 0.4% 6 0.4% KeyedLoadIC: A keyed load IC from the snapshot
2 0.1% 2 0.1% Stub: CEntryStub
2 0.1% 2 0.1% LazyCompile: ProtoBuf.Reflect.Field.encodeValue x:\public\ProtoBuf\dist\ProtoBuf.js:2703
5 0.3% 5 0.3% Stub: ToBooleanStub_UndefinedSpecObject
3 0.2% 3 0.2% LazyCompile: *module.exports.ByteBuffer.LE x:\public\ProtoBuf\node_modules\bytebuffer\dist\ByteBufferNB.js:2299
2 0.1% 2 0.1% Stub: ToBooleanStub
697 45.1% 10 0.6% LazyCompile: Message.decode x:\public\ProtoBuf\dist\ProtoBuf.js:2083
679 44.0% 183 11.9% LazyCompile: ProtoBuf.Reflect.Message.decode x:\public\ProtoBuf\dist\ProtoBuf.js:2325
257 16.6% 44 2.8% LazyCompile: ProtoBuf.Reflect.Field.decode x:\public\ProtoBuf\dist\ProtoBuf.js:2919
199 12.9% 15 1.0% LazyCompile: *module.exports.ByteBuffer.readVString x:\public\ProtoBuf\node_modules\bytebuffer\dist\ByteBufferNB.js:1932
173 11.2% 132 8.5% LazyCompile: *Buffer.toString buffer.js:392
23 1.5% 21 1.4% LazyCompile: *toLowerCase native string.js:739
2 0.1% 2 0.1% Stub: CEntryStub
13 0.8% 13 0.8% LazyCompile: <anonymous> native string.js:36
3 0.2% 3 0.2% Stub: CompareICStub {2}
10 0.6% 10 0.6% LazyCompile: *module.exports.ByteBuffer.readVarint32 x:\public\ProtoBuf\node_modules\bytebuffer\dist\ByteBufferNB.js:1272
9 0.6% 9 0.6% Stub: CompareICStub
3 0.2% 3 0.2% Builtin: A builtin from the snapshot
183 11.9% 182 11.8% LazyCompile: *Message x:\public\ProtoBuf\dist\ProtoBuf.js:1629
14 0.9% 14 0.9% LazyCompile: *module.exports.ByteBuffer.readVarint32 x:\public\ProtoBuf\node_modules\bytebuffer\dist\ByteBufferNB.js:1272
8 0.5% 8 0.5% Builtin: A builtin from the snapshot
7 0.5% 7 0.5% Stub: KeyedLoadElementStub
5 0.3% 5 0.3% Builtin: A builtin from the snapshot {3}
4 0.3% 4 0.3% Stub: KeyedLoadElementStub {1}
4 0.3% 4 0.3% Stub: CEntryStub
4 0.3% 4 0.3% LazyCompile: *module.exports.ByteBuffer.remaining x:\public\ProtoBuf\node_modules\bytebuffer\dist\ByteBufferNB.js:2397
4 0.3% 4 0.3% KeyedLoadIC: A keyed load IC from the snapshot
2 0.1% 2 0.1% KeyedStoreIC: A keyed store IC from the snapshot
3 0.2% 3 0.2% Stub: InstanceofStub
3 0.2% 3 0.2% Builtin: A builtin from the snapshot
2 0.1% 2 0.1% LazyCompile: *module.exports.ByteBuffer.LE x:\public\ProtoBuf\node_modules\bytebuffer\dist\ByteBufferNB.js:2299
3 0.2% 3 0.2% LazyCompile: *module.exports.ByteBuffer.flip x:\public\ProtoBuf\node_modules\bytebuffer\dist\ByteBufferNB.js:2252
77 5.0% 2 0.1% Function: ~<anonymous> x:\public\ProtoBuf\tests\bench.js:33
37 2.4% 0 0.0% LazyCompile: Message.encode x:\public\ProtoBuf\dist\ProtoBuf.js:1870
32 2.1% 3 0.2% LazyCompile: *ProtoBuf.Reflect.Message.encode x:\public\ProtoBuf\dist\ProtoBuf.js:2233
29 1.9% 4 0.3% LazyCompile: ProtoBuf.Reflect.Field.encode x:\public\ProtoBuf\dist\ProtoBuf.js:2651
25 1.6% 3 0.2% LazyCompile: ProtoBuf.Reflect.Field.encodeValue x:\public\ProtoBuf\dist\ProtoBuf.js:2703
21 1.4% 9 0.6% LazyCompile: *module.exports.ByteBuffer.writeVString x:\public\ProtoBuf\node_modules\bytebuffer\dist\ByteBufferNB.js:1893
12 0.8% 11 0.7% LazyCompile: *Buffer.write buffer.js:315
5 0.3% 1 0.1% LazyCompile: ~ProtoBuf.Reflect.Message.encode x:\public\ProtoBuf\dist\ProtoBuf.js:2233
4 0.3% 0 0.0% LazyCompile: ProtoBuf.Reflect.Field.encode x:\public\ProtoBuf\dist\ProtoBuf.js:2651
2 0.1% 0 0.0% LazyCompile: ProtoBuf.Reflect.Field.encodeValue x:\public\ProtoBuf\dist\ProtoBuf.js:2703
37 2.4% 0 0.0% LazyCompile: Message.decode x:\public\ProtoBuf\dist\ProtoBuf.js:2083
34 2.2% 6 0.4% LazyCompile: ProtoBuf.Reflect.Message.decode x:\public\ProtoBuf\dist\ProtoBuf.js:2325
16 1.0% 2 0.1% LazyCompile: ProtoBuf.Reflect.Field.decode x:\public\ProtoBuf\dist\ProtoBuf.js:2919
12 0.8% 0 0.0% LazyCompile: *module.exports.ByteBuffer.readVString x:\public\ProtoBuf\node_modules\bytebuffer\dist\ByteBufferNB.js:1932
12 0.8% 9 0.6% LazyCompile: *Buffer.toString buffer.js:392
3 0.2% 2 0.1% LazyCompile: *toLowerCase native string.js:739
9 0.6% 8 0.5% LazyCompile: *Message x:\public\ProtoBuf\dist\ProtoBuf.js:1629
2 0.1% 1 0.1% LazyCompile: ~ProtoBuf.Reflect.Message.decode x:\public\ProtoBuf\dist\ProtoBuf.js:2325
17 1.1% 0 0.0% LazyCompile: ~require module.js:379
17 1.1% 0 0.0% LazyCompile: ~Module.require module.js:361
17 1.1% 0 0.0% LazyCompile: Module._load module.js:275
17 1.1% 0 0.0% LazyCompile: ~Module.load module.js:346
17 1.1% 0 0.0% LazyCompile: ~Module._extensions..js module.js:472
17 1.1% 0 0.0% LazyCompile: ~Module._compile module.js:374
17 1.1% 0 0.0% Function: ~<anonymous> x:\public\ProtoBuf\index.js:1
17 1.1% 0 0.0% LazyCompile: ~require module.js:379
17 1.1% 0 0.0% LazyCompile: ~Module.require module.js:361
17 1.1% 0 0.0% LazyCompile: Module._load module.js:275
17 1.1% 0 0.0% LazyCompile: ~Module.load module.js:346
17 1.1% 0 0.0% LazyCompile: ~Module._extensions..js module.js:472
16 1.0% 2 0.1% LazyCompile: ~Module._compile module.js:374
14 0.9% 0 0.0% Function: ~<anonymous> x:\public\ProtoBuf\dist\ProtoBuf.js:1
14 0.9% 2 0.1% Function: ~<anonymous> x:\public\ProtoBuf\dist\ProtoBuf.js:22
12 0.8% 0 0.0% LazyCompile: ~require module.js:379
12 0.8% 0 0.0% LazyCompile: ~Module.require module.js:361
12 0.8% 0 0.0% LazyCompile: Module._load module.js:275
11 0.7% 0 0.0% LazyCompile: ~Module.load module.js:346
11 0.7% 0 0.0% LazyCompile: ~Module._extensions..js module.js:472
11 0.7% 0 0.0% LazyCompile: ~Module._compile module.js:374
11 0.7% 0 0.0% Function: ~<anonymous> x:\public\ProtoBuf\node_modules\bytebuffer\index.js:1
11 0.7% 0 0.0% LazyCompile: ~require module.js:379
11 0.7% 0 0.0% LazyCompile: ~Module.require module.js:361
11 0.7% 0 0.0% LazyCompile: Module._load module.js:275
10 0.6% 0 0.0% LazyCompile: ~Module.load module.js:346
10 0.6% 0 0.0% LazyCompile: ~Module._extensions..js module.js:472
9 0.6% 3 0.2% LazyCompile: ~Module._compile module.js:374
4 0.3% 0 0.0% Function: ~<anonymous> x:\public\ProtoBuf\node_modules\bytebuffer\dist\ByteBufferNB.js:1
4 0.3% 0 0.0% Function: <anonymous> x:\public\ProtoBuf\node_modules\bytebuffer\dist\ByteBufferNB.js:23
4 0.3% 0 0.0% LazyCompile: ~require module.js:379
4 0.3% 0 0.0% LazyCompile: ~Module.require module.js:361
4 0.3% 0 0.0% LazyCompile: Module._load module.js:275
3 0.2% 0 0.0% LazyCompile: ~Module._resolveFilename module.js:323
3 0.2% 0 0.0% LazyCompile: ~Module._findPath module.js:160
2 0.1% 0 0.0% LazyCompile: ~tryExtensions module.js:148
2 0.1% 0 0.0% LazyCompile: ~tryFile module.js:138
2 0.1% 1 0.1% LazyCompile: statPath module.js:88
2 0.1% 0 0.0% Function: ~<anonymous> x:\public\ProtoBuf\node_modules\bytebuffer\dist\ByteBufferAB.js:1
2 0.1% 2 0.1% Function: ~<anonymous> x:\public\ProtoBuf\node_modules\bytebuffer\dist\ByteBufferAB.js:23
6 0.4% 0 0.0% LazyCompile: ~<anonymous> node.js:204
6 0.4% 0 0.0% LazyCompile: ~NativeModule.require node.js:847
6 0.4% 1 0.1% LazyCompile: ~NativeModule.compile node.js:892
5 0.3% 0 0.0% Function: ~<anonymous> console.js:1
4 0.3% 0 0.0% LazyCompile: ~<anonymous> node.js:615
4 0.3% 1 0.1% LazyCompile: ~createWritableStdioStream node.js:550
3 0.2% 0 0.0% LazyCompile: ~NativeModule.require node.js:847
3 0.2% 0 0.0% LazyCompile: ~NativeModule.compile node.js:892
3 0.2% 0 0.0% Function: ~<anonymous> tty.js:1
3 0.2% 0 0.0% LazyCompile: ~NativeModule.require node.js:847
3 0.2% 1 0.1% LazyCompile: ~NativeModule.compile node.js:892
2 0.1% 2 0.1% Function: ~<anonymous> net.js:1
2 0.1% 0 0.0% LazyCompile: ~b native v8natives.js:1582
2 0.1% 0 0.0% LazyCompile: ~Console.log console.js:52
2 0.1% 0 0.0% LazyCompile: ~Socket.write net.js:612
2 0.1% 0 0.0% LazyCompile: ~Writable.write _stream_writable.js:162
2 0.1% 0 0.0% LazyCompile: ~writeOrBuffer _stream_writable.js:199
2 0.1% 0 0.0% LazyCompile: ~doWrite _stream_writable.js:220
2 0.1% 0 0.0% LazyCompile: ~Socket._write net.js:619
2 0.1% 0 0.0% LazyCompile: ~ProtoBuf.loadProto x:\public\ProtoBuf\dist\ProtoBuf.js:3983
2 0.1% 2 0.1% LazyCompile: *module.exports.ByteBuffer.flip x:\public\ProtoBuf\node_modules\bytebuffer\dist\ByteBufferNB.js:2252
2 0.1% 2 0.1% Builtin: A builtin from the snapshot
3 0.2% 0 0.0% LazyCompile: ~Module._resolveFilename module.js:323
3 0.2% 0 0.0% LazyCompile: ~Module._findPath module.js:160
3 0.2% 0 0.0% LazyCompile: ~tryFile module.js:138
3 0.2% 0 0.0% LazyCompile: ~NativeModule.require node.js:847
3 0.2% 1 0.1% LazyCompile: ~NativeModule.compile node.js:892
2 0.1% 1 0.1% Function: ~<anonymous> fs.js:1
3 0.2% 0 0.0% LazyCompile: ~NativeModule.require node.js:847
3 0.2% 2 0.1% LazyCompile: ~NativeModule.compile node.js:892
2 0.1% 0 0.0% LazyCompile: ~startup.globalVariables node.js:160
2 0.1% 0 0.0% LazyCompile: ~NativeModule.require node.js:847
2 0.1% 1 0.1% LazyCompile: ~NativeModule.compile node.js:892
3 0.2% 3 0.2% LazyCompile: *module.exports.ByteBuffer.flip x:\public\ProtoBuf\node_modules\bytebuffer\dist\ByteBufferNB.js:2252

14
node_modules/protobufjs/tests/camelcase.proto generated vendored Normal file
View File

@ -0,0 +1,14 @@
message Test {
// Case 1: Revert 1st
required int32 some_field = 1; // -> someField, reverted
required int32 someField = 2; // kept
// Case 2: Revert 2nd
required int32 aField = 3; // kept
required int32 a_field = 4; // -> aField, reverted
// No revert
required int32 its_a_field = 5; // -> itsAField
}

10
node_modules/protobufjs/tests/comments.proto generated vendored Normal file
View File

@ -0,0 +1,10 @@
// single line comment
/**
* Naranjas.
*/
message TestC { // one more
required /***** uncommon block ****/int32 a = 1; // another more
}
// the end.

114
node_modules/protobufjs/tests/complex.json generated vendored Normal file
View File

@ -0,0 +1,114 @@
{
"package": "Game.Cars",
"syntax": "proto2",
"messages": [
{
"name": "Car",
"syntax": "proto2",
"fields": [
{
"rule": "required",
"type": "string",
"name": "model",
"id": 1
},
{
"rule": "required",
"type": "Vendor",
"name": "vendor",
"id": 2
},
{
"rule": "optional",
"type": "Speed",
"name": "speed",
"id": 3,
"options": {
"default": "FAST"
}
}
],
"messages": [
{
"name": "Vendor",
"syntax": "proto2",
"fields": [
{
"rule": "required",
"type": "string",
"name": "name",
"id": 1
},
{
"rule": "optional",
"type": "Address",
"name": "address",
"id": 2
},
{
"rule": "repeated",
"type": "string",
"name": "models",
"id": 3
}
],
"messages": [
{
"name": "Address",
"syntax": "proto2",
"fields": [
{
"rule": "required",
"type": "string",
"name": "country",
"id": 1
}
]
}
]
},
{
"name": "Holder",
"syntax": "proto2",
"fields": [
{
"rule": "optional",
"type": "string",
"name": "first_name",
"id": 1
},
{
"rule": "required",
"type": "string",
"name": "last_name",
"id": 2
},
{
"rule": "optional",
"type": "Vendor.Address",
"name": "address",
"id": 3
}
]
}
],
"enums": [
{
"name": "Speed",
"syntax": "proto2",
"values": [
{
"name": "FAST",
"id": 1
},
{
"name": "SUPERFAST",
"id": 2
}
]
}
]
}
],
"isNamespace": true
}

35
node_modules/protobufjs/tests/complex.proto generated vendored Normal file
View File

@ -0,0 +1,35 @@
package Game.Cars;
// Car
message Car {
// Car Vendor
message Vendor {
required string name = 1;
// Car Vendor Address
message Address {
required string country = 1;
}
optional Address address = 2;
repeated string models = 3; // The models sold here.
}
required string model = 1; // Model name
required Vendor vendor = 2; // Vendor information
optional Speed speed = 3 [default=FAST]; // Car speed
// Car speed enum
enum Speed {
FAST = 1;
SUPERFAST = 2;
}
// Car Holder
message Holder {
optional string first_name = 1;
required string last_name = 2;
optional Vendor.Address address = 3;
}
}

169
node_modules/protobufjs/tests/custom-options.json generated vendored Normal file
View File

@ -0,0 +1,169 @@
{
"package": null,
"messages": [
{
"ref": "google.protobuf.FileOptions",
"fields": [
{
"rule": "optional",
"options": {},
"type": "string",
"name": "my_file_option",
"id": 50000
}
]
},
{
"ref": "google.protobuf.MessageOptions",
"fields": [
{
"rule": "optional",
"options": {},
"type": "int32",
"name": "my_message_option",
"id": 50001
}
]
},
{
"ref": "google.protobuf.FieldOptions",
"fields": [
{
"rule": "optional",
"options": {},
"type": "float",
"name": "my_field_option",
"id": 50002
}
]
},
{
"ref": "google.protobuf.EnumOptions",
"fields": [
{
"rule": "optional",
"options": {},
"type": "bool",
"name": "my_enum_option",
"id": 50003
}
]
},
{
"ref": "google.protobuf.EnumValueOptions",
"fields": [
{
"rule": "optional",
"options": {},
"type": "uint32",
"name": "my_enum_value_option",
"id": 50004
}
]
},
{
"ref": "google.protobuf.ServiceOptions",
"fields": [
{
"rule": "optional",
"options": {},
"type": "MyEnum",
"name": "my_service_option",
"id": 50005
}
]
},
{
"ref": "google.protobuf.MethodOptions",
"fields": [
{
"rule": "optional",
"options": {},
"type": "MyMessage",
"name": "my_method_option",
"id": 50006
}
]
},
{
"name": "MyMessage",
"fields": [
{
"rule": "optional",
"options": {
"(my_field_option)": 4.5
},
"type": "int32",
"name": "foo",
"id": 1
},
{
"rule": "optional",
"options": {},
"type": "string",
"name": "bar",
"id": 2
}
],
"enums": [],
"messages": [],
"options": {
"(my_message_option)": 1234
}
},
{
"name": "RequestType",
"fields": [],
"enums": [],
"messages": [],
"options": {}
},
{
"name": "ResponseType",
"fields": [],
"enums": [],
"messages": [],
"options": {}
}
],
"enums": [
{
"name": "MyEnum",
"values": [
{
"name": "FOO",
"id": 1
},
{
"name": "BAR",
"id": 2
}
],
"options": {
"(my_enum_option)": true
}
}
],
"imports": [],
"options": {
"(my_file_option)": "Hello world!"
},
"services": [
{
"name": "MyService",
"rpc": {
"MyMethod": {
"request": "RequestType",
"response": "ResponseType",
"options": {
"(my_method_option).foo": 567,
"(my_method_option).bar": "Some string"
}
}
},
"options": {
"(my_service_option)": "FOO"
}
}
]
}

53
node_modules/protobufjs/tests/custom-options.proto generated vendored Normal file
View File

@ -0,0 +1,53 @@
import "google/protobuf/descriptor.proto";
extend google.protobuf.FileOptions {
optional string my_file_option = 50000;
}
extend google.protobuf.MessageOptions {
optional int32 my_message_option = 50001;
}
extend google.protobuf.FieldOptions {
optional float my_field_option = 50002;
}
extend google.protobuf.EnumOptions {
optional bool my_enum_option = 50003;
}
extend google.protobuf.EnumValueOptions {
optional uint32 my_enum_value_option = 50004;
}
extend google.protobuf.ServiceOptions {
optional MyEnum my_service_option = 50005;
}
extend google.protobuf.MethodOptions {
optional MyMessage my_method_option = 50006;
}
option (my_file_option) = "Hello world!";
message MyMessage {
option (my_message_option) = 1234;
optional int32 foo = 1 [(my_field_option) = 4.5];
optional string bar = 2;
}
enum MyEnum {
option (my_enum_option) = true;
FOO = 1 [(my_enum_value_option) = 321];
BAR = 2;
}
message RequestType {}
message ResponseType {}
service MyService {
option (my_service_option) = FOO;
rpc MyMethod(RequestType) returns(ResponseType) {
// Note: my_method_option has type MyMessage. We can set each field
// within it using a separate "option" line.
option (my_method_option).foo = 567;
option (my_method_option).bar = "Some string";
}
}

5
node_modules/protobufjs/tests/dupimport/common.proto generated vendored Normal file
View File

@ -0,0 +1,5 @@
package main;
message Common {
optional string commonField = 1;
}

7
node_modules/protobufjs/tests/dupimport/dep1.proto generated vendored Normal file
View File

@ -0,0 +1,7 @@
package main;
import "common.proto";
message Dep1 {
optional main.Common test1 = 1;
}

8
node_modules/protobufjs/tests/dupimport/dep2.proto generated vendored Normal file
View File

@ -0,0 +1,8 @@
package main;
import "dep1.proto";
message Dep2 {
optional main.Dep1 test1 = 1;
optional main.Common test2 = 2;
}

11
node_modules/protobufjs/tests/dupimport/main.proto generated vendored Normal file
View File

@ -0,0 +1,11 @@
package main;
import "dep1.proto";
import "dep2.proto";
import "common.proto";
message MainMessage {
optional main.Dep1 test1 = 1;
optional main.Dep2 test2 = 2;
optional main.Common test3 = 3;
}

5
node_modules/protobufjs/tests/example1.proto generated vendored Normal file
View File

@ -0,0 +1,5 @@
message Test1 {
required int32 a = 1;
}
// Test1 should encode to "08 96 01" with Test1#a=150

3
node_modules/protobufjs/tests/example1u.proto generated vendored Normal file
View File

@ -0,0 +1,3 @@
message Test1u {
required uint32 a = 1;
}

5
node_modules/protobufjs/tests/example2.proto generated vendored Normal file
View File

@ -0,0 +1,5 @@
message Test2 {
required string b = 2;
}
// Test2 should encode to "12 07 74 65 73 74 69 6e 67" with Test2#b="testing"

9
node_modules/protobufjs/tests/example3.proto generated vendored Normal file
View File

@ -0,0 +1,9 @@
message Test1 {
required int32 a = 1;
}
message Test3 {
required Test1 c = 3;
}
// Test3 should encode to "1a 03 08 96 01" with Test1#a=150

5
node_modules/protobufjs/tests/example4.proto generated vendored Normal file
View File

@ -0,0 +1,5 @@
message Test4 {
repeated int32 d = 4 [packed=true];
}
// Test4 should encode to "<22 06 03 8E 02 9E A7 05>" with d=[3, 270, 86942]

29
node_modules/protobufjs/tests/example5.proto generated vendored Normal file
View File

@ -0,0 +1,29 @@
package Datastore;
message LookupRequest {
repeated string key = 1;
}
message LookupResponse {
repeated string results = 1;
}
message RunQueryRequest {
required string query = 1;
}
message RunQueryResponse {
repeated string results = 1;
}
service LookupService {
// Look up some entities by key.
rpc Lookup(LookupRequest) returns (LookupResponse) {
}
}
service RunQueryService {
// Query for entities.
rpc RunQuery(RunQueryRequest) returns (RunQueryResponse) {
};
}

71
node_modules/protobufjs/tests/extend.json generated vendored Normal file
View File

@ -0,0 +1,71 @@
{
"package": null,
"messages": [
{
"ref": "google.protobuf.MessageOptions",
"fields": [
{
"rule": "optional",
"options": {},
"type": "int32",
"name": "foo",
"id": 1001
}
]
},
{
"name": "Foo",
"fields": [],
"enums": [],
"messages": [],
"options": {},
"extensions": [
2,
536870911
]
},
{
"ref": "Foo",
"fields": [
{
"rule": "optional",
"options": {},
"type": "string",
"name": "bar",
"id": 2
}
]
},
{
"name": "Bar",
"fields": [],
"enums": [],
"messages": [
{
"name": "Foo",
"fields": [],
"enums": [],
"messages": [],
"options": {}
},
{
"ref": "Foo",
"fields": [
{
"rule": "optional",
"options": {},
"type": "Foo",
"name": "foo",
"id": 3
}
]
}
],
"options": {}
}
],
"enums": [],
"imports": [],
"options": {},
"services": []
}

23
node_modules/protobufjs/tests/extend.proto generated vendored Normal file
View File

@ -0,0 +1,23 @@
import "google/protobuf/descriptor.proto"; // Ignored
// import "./google/protobuf/descriptor.proto"; // Not ignored
extend google.protobuf.MessageOptions {
optional int32 foo = 1001;
}
message Foo {
extensions 2 to max;
}
extend Foo {
optional string bar = 2;
}
message Bar {
message Foo {
}
extend .Foo {
optional Foo foo = 3; // references Bar.Foo
}
}

View File

@ -0,0 +1,7 @@
package main;
import "sub.proto";
message MainMessage {
optional main.sub.Sub sub = 1;
}

View File

@ -0,0 +1,5 @@
package main.sub;
message Sub {
optional string test1 = 1;
}

View File

@ -0,0 +1,620 @@
// Protocol Buffers - Google's data interchange format
// Copyright 2008 Google Inc. All rights reserved.
// http://code.google.com/p/protobuf/
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are
// met:
//
// * Redistributions of source code must retain the above copyright
// notice, this list of conditions and the following disclaimer.
// * Redistributions in binary form must reproduce the above
// copyright notice, this list of conditions and the following disclaimer
// in the documentation and/or other materials provided with the
// distribution.
// * Neither the name of Google Inc. nor the names of its
// contributors may be used to endorse or promote products derived from
// this software without specific prior written permission.
//
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
// Author: kenton@google.com (Kenton Varda)
// Based on original Protocol Buffers design by
// Sanjay Ghemawat, Jeff Dean, and others.
//
// The messages in this file describe the definitions found in .proto files.
// A valid .proto file can be translated directly to a FileDescriptorProto
// without any other information (e.g. without reading its imports).
package google.protobuf;
option java_package = "com.google.protobuf";
option java_outer_classname = "DescriptorProtos";
// descriptor.proto must be optimized for speed because reflection-based
// algorithms don't work during bootstrapping.
option optimize_for = SPEED;
// The protocol compiler can output a FileDescriptorSet containing the .proto
// files it parses.
message FileDescriptorSet {
repeated FileDescriptorProto file = 1;
}
// Describes a complete .proto file.
message FileDescriptorProto {
optional string name = 1; // file name, relative to root of source tree
optional string package = 2; // e.g. "foo", "foo.bar", etc.
// Names of files imported by this file.
repeated string dependency = 3;
// Indexes of the public imported files in the dependency list above.
repeated int32 public_dependency = 10;
// Indexes of the weak imported files in the dependency list.
// For Google-internal migration only. Do not use.
repeated int32 weak_dependency = 11;
// All top-level definitions in this file.
repeated DescriptorProto message_type = 4;
repeated EnumDescriptorProto enum_type = 5;
repeated ServiceDescriptorProto service = 6;
repeated FieldDescriptorProto extension = 7;
optional FileOptions options = 8;
// This field contains optional information about the original source code.
// You may safely remove this entire field whithout harming runtime
// functionality of the descriptors -- the information is needed only by
// development tools.
optional SourceCodeInfo source_code_info = 9;
}
// Describes a message type.
message DescriptorProto {
optional string name = 1;
repeated FieldDescriptorProto field = 2;
repeated FieldDescriptorProto extension = 6;
repeated DescriptorProto nested_type = 3;
repeated EnumDescriptorProto enum_type = 4;
message ExtensionRange {
optional int32 start = 1;
optional int32 end = 2;
}
repeated ExtensionRange extension_range = 5;
optional MessageOptions options = 7;
}
// Describes a field within a message.
message FieldDescriptorProto {
enum Type {
// 0 is reserved for errors.
// Order is weird for historical reasons.
TYPE_DOUBLE = 1;
TYPE_FLOAT = 2;
// Not ZigZag encoded. Negative numbers take 10 bytes. Use TYPE_SINT64 if
// negative values are likely.
TYPE_INT64 = 3;
TYPE_UINT64 = 4;
// Not ZigZag encoded. Negative numbers take 10 bytes. Use TYPE_SINT32 if
// negative values are likely.
TYPE_INT32 = 5;
TYPE_FIXED64 = 6;
TYPE_FIXED32 = 7;
TYPE_BOOL = 8;
TYPE_STRING = 9;
TYPE_GROUP = 10; // Tag-delimited aggregate.
TYPE_MESSAGE = 11; // Length-delimited aggregate.
// New in version 2.
TYPE_BYTES = 12;
TYPE_UINT32 = 13;
TYPE_ENUM = 14;
TYPE_SFIXED32 = 15;
TYPE_SFIXED64 = 16;
TYPE_SINT32 = 17; // Uses ZigZag encoding.
TYPE_SINT64 = 18; // Uses ZigZag encoding.
};
enum Label {
// 0 is reserved for errors
LABEL_OPTIONAL = 1;
LABEL_REQUIRED = 2;
LABEL_REPEATED = 3;
// TODO(sanjay): Should we add LABEL_MAP?
};
optional string name = 1;
optional int32 number = 3;
optional Label label = 4;
// If type_name is set, this need not be set. If both this and type_name
// are set, this must be either TYPE_ENUM or TYPE_MESSAGE.
optional Type type = 5;
// For message and enum types, this is the name of the type. If the name
// starts with a '.', it is fully-qualified. Otherwise, C++-like scoping
// rules are used to find the type (i.e. first the nested types within this
// message are searched, then within the parent, on up to the root
// namespace).
optional string type_name = 6;
// For extensions, this is the name of the type being extended. It is
// resolved in the same manner as type_name.
optional string extendee = 2;
// For numeric types, contains the original text representation of the value.
// For booleans, "true" or "false".
// For strings, contains the default text contents (not escaped in any way).
// For bytes, contains the C escaped value. All bytes >= 128 are escaped.
// TODO(kenton): Base-64 encode?
optional string default_value = 7;
optional FieldOptions options = 8;
}
// Describes an enum type.
message EnumDescriptorProto {
optional string name = 1;
repeated EnumValueDescriptorProto value = 2;
optional EnumOptions options = 3;
}
// Describes a value within an enum.
message EnumValueDescriptorProto {
optional string name = 1;
optional int32 number = 2;
optional EnumValueOptions options = 3;
}
// Describes a service.
message ServiceDescriptorProto {
optional string name = 1;
repeated MethodDescriptorProto method = 2;
optional ServiceOptions options = 3;
}
// Describes a method of a service.
message MethodDescriptorProto {
optional string name = 1;
// Input and output type names. These are resolved in the same way as
// FieldDescriptorProto.type_name, but must refer to a message type.
optional string input_type = 2;
optional string output_type = 3;
optional MethodOptions options = 4;
}
// ===================================================================
// Options
// Each of the definitions above may have "options" attached. These are
// just annotations which may cause code to be generated slightly differently
// or may contain hints for code that manipulates protocol messages.
//
// Clients may define custom options as extensions of the *Options messages.
// These extensions may not yet be known at parsing time, so the parser cannot
// store the values in them. Instead it stores them in a field in the *Options
// message called uninterpreted_option. This field must have the same name
// across all *Options messages. We then use this field to populate the
// extensions when we build a descriptor, at which point all protos have been
// parsed and so all extensions are known.
//
// Extension numbers for custom options may be chosen as follows:
// * For options which will only be used within a single application or
// organization, or for experimental options, use field numbers 50000
// through 99999. It is up to you to ensure that you do not use the
// same number for multiple options.
// * For options which will be published and used publicly by multiple
// independent entities, e-mail protobuf-global-extension-registry@google.com
// to reserve extension numbers. Simply provide your project name (e.g.
// Object-C plugin) and your porject website (if available) -- there's no need
// to explain how you intend to use them. Usually you only need one extension
// number. You can declare multiple options with only one extension number by
// putting them in a sub-message. See the Custom Options section of the docs
// for examples:
// http://code.google.com/apis/protocolbuffers/docs/proto.html#options
// If this turns out to be popular, a web service will be set up
// to automatically assign option numbers.
message FileOptions {
// Sets the Java package where classes generated from this .proto will be
// placed. By default, the proto package is used, but this is often
// inappropriate because proto packages do not normally start with backwards
// domain names.
optional string java_package = 1;
// If set, all the classes from the .proto file are wrapped in a single
// outer class with the given name. This applies to both Proto1
// (equivalent to the old "--one_java_file" option) and Proto2 (where
// a .proto always translates to a single class, but you may want to
// explicitly choose the class name).
optional string java_outer_classname = 8;
// If set true, then the Java code generator will generate a separate .java
// file for each top-level message, enum, and service defined in the .proto
// file. Thus, these types will *not* be nested inside the outer class
// named by java_outer_classname. However, the outer class will still be
// generated to contain the file's getDescriptor() method as well as any
// top-level extensions defined in the file.
optional bool java_multiple_files = 10 [default=false];
// If set true, then the Java code generator will generate equals() and
// hashCode() methods for all messages defined in the .proto file. This is
// purely a speed optimization, as the AbstractMessage base class includes
// reflection-based implementations of these methods.
optional bool java_generate_equals_and_hash = 20 [default=false];
// Generated classes can be optimized for speed or code size.
enum OptimizeMode {
SPEED = 1; // Generate complete code for parsing, serialization,
// etc.
CODE_SIZE = 2; // Use ReflectionOps to implement these methods.
LITE_RUNTIME = 3; // Generate code using MessageLite and the lite runtime.
}
optional OptimizeMode optimize_for = 9 [default=SPEED];
// Sets the Go package where structs generated from this .proto will be
// placed. There is no default.
optional string go_package = 11;
// Should generic services be generated in each language? "Generic" services
// are not specific to any particular RPC system. They are generated by the
// main code generators in each language (without additional plugins).
// Generic services were the only kind of service generation supported by
// early versions of proto2.
//
// Generic services are now considered deprecated in favor of using plugins
// that generate code specific to your particular RPC system. Therefore,
// these default to false. Old code which depends on generic services should
// explicitly set them to true.
optional bool cc_generic_services = 16 [default=false];
optional bool java_generic_services = 17 [default=false];
optional bool py_generic_services = 18 [default=false];
// The parser stores options it doesn't recognize here. See above.
repeated UninterpretedOption uninterpreted_option = 999;
// Clients can define custom options in extensions of this message. See above.
extensions 1000 to max;
}
message MessageOptions {
// Set true to use the old proto1 MessageSet wire format for extensions.
// This is provided for backwards-compatibility with the MessageSet wire
// format. You should not use this for any other reason: It's less
// efficient, has fewer features, and is more complicated.
//
// The message must be defined exactly as follows:
// message Foo {
// option message_set_wire_format = true;
// extensions 4 to max;
// }
// Note that the message cannot have any defined fields; MessageSets only
// have extensions.
//
// All extensions of your type must be singular messages; e.g. they cannot
// be int32s, enums, or repeated messages.
//
// Because this is an option, the above two restrictions are not enforced by
// the protocol compiler.
optional bool message_set_wire_format = 1 [default=false];
// Disables the generation of the standard "descriptor()" accessor, which can
// conflict with a field of the same name. This is meant to make migration
// from proto1 easier; new code should avoid fields named "descriptor".
optional bool no_standard_descriptor_accessor = 2 [default=false];
// The parser stores options it doesn't recognize here. See above.
repeated UninterpretedOption uninterpreted_option = 999;
// Clients can define custom options in extensions of this message. See above.
extensions 1000 to max;
}
message FieldOptions {
// The ctype option instructs the C++ code generator to use a different
// representation of the field than it normally would. See the specific
// options below. This option is not yet implemented in the open source
// release -- sorry, we'll try to include it in a future version!
optional CType ctype = 1 [default = STRING];
enum CType {
// Default mode.
STRING = 0;
CORD = 1;
STRING_PIECE = 2;
}
// The packed option can be enabled for repeated primitive fields to enable
// a more efficient representation on the wire. Rather than repeatedly
// writing the tag and type for each element, the entire array is encoded as
// a single length-delimited blob.
optional bool packed = 2;
// Should this field be parsed lazily? Lazy applies only to message-type
// fields. It means that when the outer message is initially parsed, the
// inner message's contents will not be parsed but instead stored in encoded
// form. The inner message will actually be parsed when it is first accessed.
//
// This is only a hint. Implementations are free to choose whether to use
// eager or lazy parsing regardless of the value of this option. However,
// setting this option true suggests that the protocol author believes that
// using lazy parsing on this field is worth the additional bookkeeping
// overhead typically needed to implement it.
//
// This option does not affect the public interface of any generated code;
// all method signatures remain the same. Furthermore, thread-safety of the
// interface is not affected by this option; const methods remain safe to
// call from multiple threads concurrently, while non-const methods continue
// to require exclusive access.
//
//
// Note that implementations may choose not to check required fields within
// a lazy sub-message. That is, calling IsInitialized() on the outher message
// may return true even if the inner message has missing required fields.
// This is necessary because otherwise the inner message would have to be
// parsed in order to perform the check, defeating the purpose of lazy
// parsing. An implementation which chooses not to check required fields
// must be consistent about it. That is, for any particular sub-message, the
// implementation must either *always* check its required fields, or *never*
// check its required fields, regardless of whether or not the message has
// been parsed.
optional bool lazy = 5 [default=false];
// Is this field deprecated?
// Depending on the target platform, this can emit Deprecated annotations
// for accessors, or it will be completely ignored; in the very least, this
// is a formalization for deprecating fields.
optional bool deprecated = 3 [default=false];
// EXPERIMENTAL. DO NOT USE.
// For "map" fields, the name of the field in the enclosed type that
// is the key for this map. For example, suppose we have:
// message Item {
// required string name = 1;
// required string value = 2;
// }
// message Config {
// repeated Item items = 1 [experimental_map_key="name"];
// }
// In this situation, the map key for Item will be set to "name".
// TODO: Fully-implement this, then remove the "experimental_" prefix.
optional string experimental_map_key = 9;
// For Google-internal migration only. Do not use.
optional bool weak = 10 [default=false];
// The parser stores options it doesn't recognize here. See above.
repeated UninterpretedOption uninterpreted_option = 999;
// Clients can define custom options in extensions of this message. See above.
extensions 1000 to max;
}
message EnumOptions {
// Set this option to false to disallow mapping different tag names to a same
// value.
optional bool allow_alias = 2 [default=true];
// The parser stores options it doesn't recognize here. See above.
repeated UninterpretedOption uninterpreted_option = 999;
// Clients can define custom options in extensions of this message. See above.
extensions 1000 to max;
}
message EnumValueOptions {
// The parser stores options it doesn't recognize here. See above.
repeated UninterpretedOption uninterpreted_option = 999;
// Clients can define custom options in extensions of this message. See above.
extensions 1000 to max;
}
message ServiceOptions {
// Note: Field numbers 1 through 32 are reserved for Google's internal RPC
// framework. We apologize for hoarding these numbers to ourselves, but
// we were already using them long before we decided to release Protocol
// Buffers.
// The parser stores options it doesn't recognize here. See above.
repeated UninterpretedOption uninterpreted_option = 999;
// Clients can define custom options in extensions of this message. See above.
extensions 1000 to max;
}
message MethodOptions {
// Note: Field numbers 1 through 32 are reserved for Google's internal RPC
// framework. We apologize for hoarding these numbers to ourselves, but
// we were already using them long before we decided to release Protocol
// Buffers.
// The parser stores options it doesn't recognize here. See above.
repeated UninterpretedOption uninterpreted_option = 999;
// Clients can define custom options in extensions of this message. See above.
extensions 1000 to max;
}
// A message representing a option the parser does not recognize. This only
// appears in options protos created by the compiler::Parser class.
// DescriptorPool resolves these when building Descriptor objects. Therefore,
// options protos in descriptor objects (e.g. returned by Descriptor::options(),
// or produced by Descriptor::CopyTo()) will never have UninterpretedOptions
// in them.
message UninterpretedOption {
// The name of the uninterpreted option. Each string represents a segment in
// a dot-separated name. is_extension is true iff a segment represents an
// extension (denoted with parentheses in options specs in .proto files).
// E.g.,{ ["foo", false], ["bar.baz", true], ["qux", false] } represents
// "foo.(bar.baz).qux".
message NamePart {
required string name_part = 1;
required bool is_extension = 2;
}
repeated NamePart name = 2;
// The value of the uninterpreted option, in whatever type the tokenizer
// identified it as during parsing. Exactly one of these should be set.
optional string identifier_value = 3;
optional uint64 positive_int_value = 4;
optional int64 negative_int_value = 5;
optional double double_value = 6;
optional bytes string_value = 7;
optional string aggregate_value = 8;
}
// ===================================================================
// Optional source code info
// Encapsulates information about the original source file from which a
// FileDescriptorProto was generated.
message SourceCodeInfo {
// A Location identifies a piece of source code in a .proto file which
// corresponds to a particular definition. This information is intended
// to be useful to IDEs, code indexers, documentation generators, and similar
// tools.
//
// For example, say we have a file like:
// message Foo {
// optional string foo = 1;
// }
// Let's look at just the field definition:
// optional string foo = 1;
// ^ ^^ ^^ ^ ^^^
// a bc de f ghi
// We have the following locations:
// span path represents
// [a,i) [ 4, 0, 2, 0 ] The whole field definition.
// [a,b) [ 4, 0, 2, 0, 4 ] The label (optional).
// [c,d) [ 4, 0, 2, 0, 5 ] The type (string).
// [e,f) [ 4, 0, 2, 0, 1 ] The name (foo).
// [g,h) [ 4, 0, 2, 0, 3 ] The number (1).
//
// Notes:
// - A location may refer to a repeated field itself (i.e. not to any
// particular index within it). This is used whenever a set of elements are
// logically enclosed in a single code segment. For example, an entire
// extend block (possibly containing multiple extension definitions) will
// have an outer location whose path refers to the "extensions" repeated
// field without an index.
// - Multiple locations may have the same path. This happens when a single
// logical declaration is spread out across multiple places. The most
// obvious example is the "extend" block again -- there may be multiple
// extend blocks in the same scope, each of which will have the same path.
// - A location's span is not always a subset of its parent's span. For
// example, the "extendee" of an extension declaration appears at the
// beginning of the "extend" block and is shared by all extensions within
// the block.
// - Just because a location's span is a subset of some other location's span
// does not mean that it is a descendent. For example, a "group" defines
// both a type and a field in a single declaration. Thus, the locations
// corresponding to the type and field and their components will overlap.
// - Code which tries to interpret locations should probably be designed to
// ignore those that it doesn't understand, as more types of locations could
// be recorded in the future.
repeated Location location = 1;
message Location {
// Identifies which part of the FileDescriptorProto was defined at this
// location.
//
// Each element is a field number or an index. They form a path from
// the root FileDescriptorProto to the place where the definition. For
// example, this path:
// [ 4, 3, 2, 7, 1 ]
// refers to:
// file.message_type(3) // 4, 3
// .field(7) // 2, 7
// .name() // 1
// This is because FileDescriptorProto.message_type has field number 4:
// repeated DescriptorProto message_type = 4;
// and DescriptorProto.field has field number 2:
// repeated FieldDescriptorProto field = 2;
// and FieldDescriptorProto.name has field number 1:
// optional string name = 1;
//
// Thus, the above path gives the location of a field name. If we removed
// the last element:
// [ 4, 3, 2, 7 ]
// this path refers to the whole field declaration (from the beginning
// of the label to the terminating semicolon).
repeated int32 path = 1 [packed=true];
// Always has exactly three or four elements: start line, start column,
// end line (optional, otherwise assumed same as start line), end column.
// These are packed into a single field for efficiency. Note that line
// and column numbers are zero-based -- typically you will want to add
// 1 to each before displaying to a user.
repeated int32 span = 2 [packed=true];
// If this SourceCodeInfo represents a complete declaration, these are any
// comments appearing before and after the declaration which appear to be
// attached to the declaration.
//
// A series of line comments appearing on consecutive lines, with no other
// tokens appearing on those lines, will be treated as a single comment.
//
// Only the comment content is provided; comment markers (e.g. //) are
// stripped out. For block comments, leading whitespace and an asterisk
// will be stripped from the beginning of each line other than the first.
// Newlines are included in the output.
//
// Examples:
//
// optional int32 foo = 1; // Comment attached to foo.
// // Comment attached to bar.
// optional int32 bar = 2;
//
// optional string baz = 3;
// // Comment attached to baz.
// // Another line attached to baz.
//
// // Comment attached to qux.
// //
// // Another line attached to qux.
// optional double qux = 4;
//
// optional string corge = 5;
// /* Block comment attached
// * to corge. Leading asterisks
// * will be removed. */
// /* Block comment attached to
// * grault. */
// optional int32 grault = 6;
optional string leading_comments = 3;
optional string trailing_comments = 4;
}
}

13
node_modules/protobufjs/tests/groups.proto generated vendored Normal file
View File

@ -0,0 +1,13 @@
message Outer {
required string before = 1;
repeated group MyInner = 2 [deprecated=true] {
required string a = 3;
}
required string after = 4;
optional MyInner myInner2 = 5;
}
message OuterSparse {
required string before = 1;
required string after = 4;
}

1
node_modules/protobufjs/tests/importRoot/file1.proto generated vendored Normal file
View File

@ -0,0 +1 @@
import "importRoot/file2.proto";

1
node_modules/protobufjs/tests/importRoot/file2.proto generated vendored Normal file
View File

@ -0,0 +1 @@
import "importRoot/file3.proto";

1
node_modules/protobufjs/tests/importRoot/file3.proto generated vendored Normal file
View File

@ -0,0 +1 @@
message Test {}

5
node_modules/protobufjs/tests/import_a.proto generated vendored Normal file
View File

@ -0,0 +1,5 @@
import "import_common.proto";
message A {
optional Common common = 1;
}

View File

@ -0,0 +1,5 @@
import 'import_common.proto';
message A {
optional Common common = 1;
}

5
node_modules/protobufjs/tests/import_b.proto generated vendored Normal file
View File

@ -0,0 +1,5 @@
import "import_common.proto";
message B {
optional Common common = 1;
}

2
node_modules/protobufjs/tests/import_common.proto generated vendored Normal file
View File

@ -0,0 +1,2 @@
message Common {
}

13
node_modules/protobufjs/tests/imports-toplevel.proto generated vendored Normal file
View File

@ -0,0 +1,13 @@
import "toplevel.proto";
package My;
enum MyEnum1 {
ONE = 1;
TWO = 2;
}
message Test1 {
required MyEnum num = 1 [default=ONE];
required MyEnum1 num1 = 2 [default=ONE];
}

7
node_modules/protobufjs/tests/imports-weak.proto generated vendored Normal file
View File

@ -0,0 +1,7 @@
package My;
import weak "example1.proto";
message Test2 {
required Test1 test1 = 1;
}

83
node_modules/protobufjs/tests/imports.json generated vendored Normal file
View File

@ -0,0 +1,83 @@
{
"package": "My",
"messages": [
{
"name": "Test3",
"fields": [
{
"rule": "required",
"options": {},
"type": "Test1",
"name": "test1",
"id": 1
},
{
"rule": "required",
"options": {},
"type": ".Test2",
"name": "test2",
"id": 2
}
],
"enums": [],
"messages": [],
"options": {},
"oneofs": {}
}
],
"enums": [],
"imports": [
{
"package": null,
"messages": [
{
"name": "Test1",
"fields": [
{
"rule": "required",
"options": {},
"type": "int32",
"name": "a",
"id": 1
}
],
"enums": [],
"messages": [],
"options": {},
"oneofs": {}
}
],
"enums": [],
"imports": [],
"options": {},
"services": []
},
{
"package": null,
"messages": [
{
"name": "Test2",
"fields": [
{
"rule": "required",
"options": {},
"type": "string",
"name": "b",
"id": 2
}
],
"enums": [],
"messages": [],
"options": {},
"oneofs": {}
}
],
"enums": [],
"imports": [],
"options": {},
"services": []
}
],
"options": {},
"services": []
}

9
node_modules/protobufjs/tests/imports.proto generated vendored Normal file
View File

@ -0,0 +1,9 @@
package My;
import public "example1.proto";
import "example2.proto";
message Test3 {
required Test1 test1 = 1;
required .Test2 test2 = 2;
}

10
node_modules/protobufjs/tests/inner.proto generated vendored Normal file
View File

@ -0,0 +1,10 @@
message Foo {
required Bar bar = 1;
required Baz baz = 2;
}
message Bar {
required string blah = 1;
}
message Baz {
required string blah = 1;
}

9
node_modules/protobufjs/tests/negid.proto generated vendored Normal file
View File

@ -0,0 +1,9 @@
message Test {
required LobbyType type = 1 [default=INVALID];
enum LobbyType {
INVALID = -1;
MATCH = 0;
PRACTICE = 1;
}
}

19
node_modules/protobufjs/tests/nodeunit-browser/LICENSE generated vendored Normal file
View File

@ -0,0 +1,19 @@
Copyright (c) 2010 Caolan McMahon
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.

View File

@ -0,0 +1,70 @@
/*!
* Styles taken from qunit.css
*/
h1#nodeunit-header, h1.nodeunit-header {
padding: 15px;
font-size: large;
background-color: #06b;
color: white;
font-family: 'trebuchet ms', verdana, arial;
margin: 0;
}
h1#nodeunit-header a {
color: white;
}
h2#nodeunit-banner {
height: 2em;
border-bottom: 1px solid white;
background-color: #eee;
margin: 0;
font-family: 'trebuchet ms', verdana, arial;
}
h2#nodeunit-banner.pass {
background-color: green;
}
h2#nodeunit-banner.fail {
background-color: red;
}
h2#nodeunit-userAgent, h2.nodeunit-userAgent {
padding: 10px;
background-color: #eee;
color: black;
margin: 0;
font-size: small;
font-weight: normal;
font-family: 'trebuchet ms', verdana, arial;
font-size: 10pt;
}
div#nodeunit-testrunner-toolbar {
background: #eee;
border-top: 1px solid black;
padding: 10px;
font-family: 'trebuchet ms', verdana, arial;
margin: 0;
font-size: 10pt;
}
ol#nodeunit-tests {
font-family: 'trebuchet ms', verdana, arial;
font-size: 10pt;
}
ol#nodeunit-tests li strong {
cursor:pointer;
}
ol#nodeunit-tests .pass {
color: green;
}
ol#nodeunit-tests .fail {
color: red;
}
p#nodeunit-testresult {
margin-left: 1em;
font-size: 10pt;
font-family: 'trebuchet ms', verdana, arial;
}

File diff suppressed because it is too large Load Diff

18
node_modules/protobufjs/tests/numberformats.proto generated vendored Normal file
View File

@ -0,0 +1,18 @@
enum Formats {
DEC = 1;
HEX = 0x1F;
OCT = 017;
}
message Msg {
required int32 dec = 1 [default=-1];
required int32 hex = 2 [default=-0x1F];
required int32 oct = 3 [default=-017];
required double exp = 4 [default=0.1e5];
required double nod = 5 [default=1.];
required double exn = 6 [default=1e8];
required double sp1 = 7 [default=inf];
required double sp2 = 8 [default=-inf];
required double sp3 = 9 [default=nan];
required int32 hexUC = 10 [default=0X209];
}

6
node_modules/protobufjs/tests/oneof.proto generated vendored Normal file
View File

@ -0,0 +1,6 @@
message MyOneOf {
oneof my_oneof {
uint32 id = 1;
string name = 2;
}
}

12
node_modules/protobufjs/tests/optional.proto generated vendored Normal file
View File

@ -0,0 +1,12 @@
message Test1 {
optional int32 a = 1;
optional Test2 b = 2;
}
message Test2 {
optional int32 c = 1;
optional Test3 d = 2;
}
message Test3 {
}

32
node_modules/protobufjs/tests/options.json generated vendored Normal file
View File

@ -0,0 +1,32 @@
{
"package": "My",
"messages": [
{
"name": "Test",
"fields": [
{
"rule": "optional",
"options": {
"default": "Max"
},
"type": "string",
"name": "name",
"id": 1
}
],
"enums": [],
"messages": [],
"options": {
"(inmessage)": "My.Test",
"(foo.my_option).bar": false
}
}
],
"enums": [],
"imports": [],
"options": {
"(toplevel_1)": 10,
"(toplevel_2)": "Hello world!"
},
"services": []
}

13
node_modules/protobufjs/tests/options.proto generated vendored Normal file
View File

@ -0,0 +1,13 @@
option (toplevel_1) = 10;
package My;
option (toplevel_2) = "Hello world!";
message Test {
optional string name = 1 [default="Max"];
optional string desc1 = 2 [default="Shouldn't mix quotes"];
optional string desc2 = 3 [default='Shouldn"t mix quotes'];
optional string desc3 = 4 [(foo_options) = { opt1: 123 opt2: "baz" }];
optional string desc4 = 5 [(foo_options) = {options { opt1: 1234 opt2: "baz" } options { opt1: 4321 opt2: "foo" }} ];
option (inmessage) = My.Test;
option (foo.my_option).bar = false;
}

4
node_modules/protobufjs/tests/packed.proto generated vendored Normal file
View File

@ -0,0 +1,4 @@
message Message {
repeated int32 a = 1 [packed = true];
repeated int32 b = 2;
}

46
node_modules/protobufjs/tests/proto2js/Bar.json generated vendored Normal file
View File

@ -0,0 +1,46 @@
{
"package": null,
"messages": [
{
"ref": "Foo",
"fields": [
{
"rule": "required",
"type": "string",
"name": "buzz",
"id": 2,
"options": {}
}
]
}
],
"enums": [],
"imports": [
{
"package": null,
"messages": [
{
"name": "Foo",
"fields": [
{
"rule": "required",
"type": "string",
"name": "fizz",
"id": 1,
"options": {}
}
],
"enums": [],
"messages": [],
"options": {}
}
],
"enums": [],
"imports": [],
"options": {},
"services": []
}
],
"options": {},
"services": []
}

7
node_modules/protobufjs/tests/proto2js/Bar.proto generated vendored Normal file
View File

@ -0,0 +1,7 @@
// Bar.proto
import "Foo.proto";
// really extend Bar but that produces an empty constructor.
extend Foo {
required string buzz = 2;
}

4
node_modules/protobufjs/tests/proto2js/Foo.proto generated vendored Normal file
View File

@ -0,0 +1,4 @@
// Foo.proto
message Foo {
required string fizz = 1;
}

7
node_modules/protobufjs/tests/proto3.proto generated vendored Normal file
View File

@ -0,0 +1,7 @@
syntax = "proto3";
package test;
message Foo {
int32 optional_int32 = 1;
}

19
node_modules/protobufjs/tests/protobufnet.proto generated vendored Normal file
View File

@ -0,0 +1,19 @@
message IMeshImp {
}
message Mesh {
optional IMeshImp _meshImp = 1;
repeated float3 _vertices = 2;
repeated uint32 _colors = 3;
repeated float3 _normals = 4;
repeated float2 _uvs = 5;
repeated int32 _triangles = 6;
}
message float2 {
optional float x = 1 [default = 0];
optional float y = 2 [default = 0];
}
message float3 {
optional float x = 1 [default = 0];
optional float y = 2 [default = 0];
optional float z = 3 [default = 0];
}

12
node_modules/protobufjs/tests/repeated.proto generated vendored Normal file
View File

@ -0,0 +1,12 @@
message Outer {
// As of: https://developers.google.com/protocol-buffers/docs/encoding#optional
repeated Inner inner = 1;
// "If your message definition has repeated elements (without the [packed=true] option), the encoded message has
// zero or more key-value pairs with the same tag number."
}
message Inner {
optional uint32 inner_value = 1;
}

39
node_modules/protobufjs/tests/services.js generated vendored Normal file
View File

@ -0,0 +1,39 @@
var root = require("..").newBuilder({
"convertFieldsToCamelCase": true,
"populateAccessors": false
})['import']({
"package": "my.namespace",
"messages": [
{
"name": "something",
"fields": [],
"messages": [
{
"name": "v1",
"fields": [],
"messages": [
{
"name": "GetRequest",
"fields": []
},
{
"name": "GetResponse",
"fields": []
}
],
"enums": [],
"services": [{
"name": "SomeService",
"rpc": {
"get": {
"request": "GetRequest",
"response": "GetResponse"
}
}
}]
}
]
}
]
}).build();
console.log(require("util").inspect(root, { depth: 10}));

7
node_modules/protobufjs/tests/setarray.proto generated vendored Normal file
View File

@ -0,0 +1,7 @@
message Outer {
repeated Inner inners = 4;
}
message Inner {
required string str = 1;
}

View File

@ -0,0 +1,3 @@
message TestSingleQuoteString {
required string a = 1 [ default = 'hello world' ];
}

16
node_modules/protobufjs/tests/suite.html generated vendored Normal file
View File

@ -0,0 +1,16 @@
<!DOCTYPE html>
<html>
<head>
<title>ProtoBuf.js Test Suite</title>
<link rel="stylesheet" href="nodeunit-browser/nodeunit.css" type="text/css" />
<script src="nodeunit-browser/nodeunit.js"></script>
<script src="https://raw.github.com/dcodeIO/Long.js/master/Long.min.js"></script>
<script src="https://raw.github.com/dcodeIO/ByteBuffer.js/master/ByteBuffer.min.js"></script>
<script src="../ProtoBuf.min.js"></script>
<script src="suite.js"></script>
</head>
<body>
<h1 id="nodeunit-header">ProtoBuf.js Test Suite</h1>
<script>nodeunit.run({ "suite": suite });</script>
</body>
</html>

2267
node_modules/protobufjs/tests/suite.js generated vendored Normal file

File diff suppressed because it is too large Load Diff

10
node_modules/protobufjs/tests/toplevel.proto generated vendored Normal file
View File

@ -0,0 +1,10 @@
package My;
enum MyEnum {
ONE = 1;
TWO = 2;
}
message Test {
required MyEnum num = 1 [default=ONE];
}

10
node_modules/protobufjs/tests/x64.proto generated vendored Normal file
View File

@ -0,0 +1,10 @@
message Test {
required sfixed64 val = 1 [default=-1];
required fixed64 uval = 2 [default=1];
}
message Test2 {
required int64 val = 1 [default=-1];
required uint64 uval = 2 [default=1];
required sint64 sval = 3 [default=-2];
}