mediasoup 3.20.8 → 3.20.9
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/README.md +8 -2
- package/node/lib/WebRtcServer.d.ts.map +1 -1
- package/node/lib/WebRtcServer.js +0 -7
- package/node/lib/WebRtcServerTypes.d.ts +0 -5
- package/node/lib/WebRtcServerTypes.d.ts.map +1 -1
- package/node/lib/Worker.d.ts +1 -1
- package/node/lib/Worker.d.ts.map +1 -1
- package/node/lib/Worker.js +1 -11
- package/node/lib/WorkerTypes.d.ts +0 -9
- package/node/lib/WorkerTypes.d.ts.map +1 -1
- package/node/lib/fbs/plain-transport/connect-response.d.ts.map +1 -1
- package/node/lib/fbs/plain-transport/connect-response.js +0 -1
- package/node/lib/fbs/web-rtc-server/dump-response.d.ts +2 -9
- package/node/lib/fbs/web-rtc-server/dump-response.d.ts.map +1 -1
- package/node/lib/fbs/web-rtc-server/dump-response.js +5 -33
- package/node/lib/fbs/web-rtc-server.d.ts +0 -1
- package/node/lib/fbs/web-rtc-server.d.ts.map +1 -1
- package/node/lib/fbs/web-rtc-server.js +1 -4
- package/node/lib/fbs/worker/dump-response.d.ts +1 -5
- package/node/lib/fbs/worker/dump-response.d.ts.map +1 -1
- package/node/lib/fbs/worker/dump-response.js +3 -16
- package/node/lib/index.d.ts +1 -1
- package/node/lib/index.d.ts.map +1 -1
- package/node/lib/index.js +1 -2
- package/node/lib/test/test-PlainTransport.js +30 -0
- package/node/lib/test/test-WebRtcServer.js +0 -7
- package/node/lib/test/test-Worker.js +0 -1
- package/npm-scripts.mjs +132 -55
- package/package.json +6 -4
- package/worker/fbs/webRtcServer.fbs +0 -6
- package/worker/include/RTC/TransportTuple.hpp +70 -14
- package/worker/include/RTC/WebRtcServer.hpp +5 -2
- package/worker/include/Utils.hpp +6 -0
- package/worker/src/RTC/PortManager.cpp +16 -20
- package/worker/src/RTC/SeqManager.cpp +4 -1
- package/worker/src/RTC/TransportTuple.cpp +87 -50
- package/worker/src/RTC/WebRtcServer.cpp +20 -29
- package/worker/test/src/RTC/TestSeqManager.cpp +167 -62
- package/worker/test/src/RTC/TestTransportTuple.cpp +21 -14
- package/node/lib/fbs/data-consumer/binary.d.ts +0 -25
- package/node/lib/fbs/data-consumer/binary.d.ts.map +0 -1
- package/node/lib/fbs/data-consumer/binary.js +0 -110
- package/node/lib/fbs/data-consumer/data.d.ts +0 -10
- package/node/lib/fbs/data-consumer/data.d.ts.map +0 -1
- package/node/lib/fbs/data-consumer/data.js +0 -30
- package/node/lib/fbs/data-consumer/string.d.ts +0 -22
- package/node/lib/fbs/data-consumer/string.d.ts.map +0 -1
- package/node/lib/fbs/data-consumer/string.js +0 -92
- package/node/lib/fbs/data-producer/binary.d.ts +0 -25
- package/node/lib/fbs/data-producer/binary.d.ts.map +0 -1
- package/node/lib/fbs/data-producer/binary.js +0 -110
- package/node/lib/fbs/data-producer/data.d.ts +0 -10
- package/node/lib/fbs/data-producer/data.d.ts.map +0 -1
- package/node/lib/fbs/data-producer/data.js +0 -30
- package/node/lib/fbs/data-producer/string.d.ts +0 -22
- package/node/lib/fbs/data-producer/string.d.ts.map +0 -1
- package/node/lib/fbs/data-producer/string.js +0 -92
- package/node/lib/fbs/lib-uring/dump.d.ts +0 -27
- package/node/lib/fbs/lib-uring/dump.d.ts.map +0 -1
- package/node/lib/fbs/lib-uring/dump.js +0 -113
- package/node/lib/fbs/lib-uring.d.ts +0 -2
- package/node/lib/fbs/lib-uring.d.ts.map +0 -1
- package/node/lib/fbs/lib-uring.js +0 -8
- package/node/lib/fbs/message/type.d.ts +0 -7
- package/node/lib/fbs/message/type.d.ts.map +0 -1
- package/node/lib/fbs/message/type.js +0 -11
- package/node/lib/fbs/message-from-worker/body.d.ts +0 -12
- package/node/lib/fbs/message-from-worker/body.d.ts.map +0 -1
- package/node/lib/fbs/message-from-worker/body.js +0 -34
- package/node/lib/fbs/message-from-worker/message.d.ts +0 -30
- package/node/lib/fbs/message-from-worker/message.d.ts.map +0 -1
- package/node/lib/fbs/message-from-worker/message.js +0 -122
- package/node/lib/fbs/message-from-worker.d.ts +0 -3
- package/node/lib/fbs/message-from-worker.d.ts.map +0 -1
- package/node/lib/fbs/message-from-worker.js +0 -9
- package/node/lib/fbs/message-to-worker/body.d.ts +0 -10
- package/node/lib/fbs/message-to-worker/body.d.ts.map +0 -1
- package/node/lib/fbs/message-to-worker/body.js +0 -30
- package/node/lib/fbs/message-to-worker/message.d.ts +0 -29
- package/node/lib/fbs/message-to-worker/message.d.ts.map +0 -1
- package/node/lib/fbs/message-to-worker/message.js +0 -122
- package/node/lib/fbs/message-to-worker.d.ts +0 -3
- package/node/lib/fbs/message-to-worker.d.ts.map +0 -1
- package/node/lib/fbs/message-to-worker.js +0 -9
- package/node/lib/fbs/notification-from-worker/body.d.ts +0 -44
- package/node/lib/fbs/notification-from-worker/body.d.ts.map +0 -1
- package/node/lib/fbs/notification-from-worker/body.js +0 -98
- package/node/lib/fbs/notification-from-worker/event.d.ts +0 -31
- package/node/lib/fbs/notification-from-worker/event.d.ts.map +0 -1
- package/node/lib/fbs/notification-from-worker/event.js +0 -35
- package/node/lib/fbs/notification-from-worker/notification.d.ts +0 -52
- package/node/lib/fbs/notification-from-worker/notification.d.ts.map +0 -1
- package/node/lib/fbs/notification-from-worker/notification.js +0 -140
- package/node/lib/fbs/notification-from-worker.d.ts +0 -4
- package/node/lib/fbs/notification-from-worker.d.ts.map +0 -1
- package/node/lib/fbs/notification-from-worker.js +0 -11
- package/node/lib/fbs/notification-to-worker/body.d.ts +0 -12
- package/node/lib/fbs/notification-to-worker/body.d.ts.map +0 -1
- package/node/lib/fbs/notification-to-worker/body.js +0 -34
- package/node/lib/fbs/notification-to-worker/event.d.ts +0 -6
- package/node/lib/fbs/notification-to-worker/event.d.ts.map +0 -1
- package/node/lib/fbs/notification-to-worker/event.js +0 -10
- package/node/lib/fbs/notification-to-worker/notification.d.ts +0 -36
- package/node/lib/fbs/notification-to-worker/notification.d.ts.map +0 -1
- package/node/lib/fbs/notification-to-worker/notification.js +0 -140
- package/node/lib/fbs/notification-to-worker.d.ts +0 -4
- package/node/lib/fbs/notification-to-worker.d.ts.map +0 -1
- package/node/lib/fbs/notification-to-worker.js +0 -11
- package/node/lib/fbs/sctp-parameters/num-sctp-streams.d.ts +0 -24
- package/node/lib/fbs/sctp-parameters/num-sctp-streams.d.ts.map +0 -1
- package/node/lib/fbs/sctp-parameters/num-sctp-streams.js +0 -102
- package/node/lib/fbs/trace-events/fir-trace-info.d.ts +0 -21
- package/node/lib/fbs/trace-events/fir-trace-info.d.ts.map +0 -1
- package/node/lib/fbs/trace-events/fir-trace-info.js +0 -90
- package/node/lib/fbs/trace-events/key-frame-trace-info.d.ts +0 -25
- package/node/lib/fbs/trace-events/key-frame-trace-info.d.ts.map +0 -1
- package/node/lib/fbs/trace-events/key-frame-trace-info.js +0 -104
- package/node/lib/fbs/trace-events/pli-trace-info.d.ts +0 -21
- package/node/lib/fbs/trace-events/pli-trace-info.d.ts.map +0 -1
- package/node/lib/fbs/trace-events/pli-trace-info.js +0 -90
- package/node/lib/fbs/trace-events/rtp-trace-info.d.ts +0 -25
- package/node/lib/fbs/trace-events/rtp-trace-info.d.ts.map +0 -1
- package/node/lib/fbs/trace-events/rtp-trace-info.js +0 -104
- package/node/lib/fbs/trace-events/trace-event-type.d.ts +0 -8
- package/node/lib/fbs/trace-events/trace-event-type.d.ts.map +0 -1
- package/node/lib/fbs/trace-events/trace-event-type.js +0 -12
- package/node/lib/fbs/trace-events/trace-info.d.ts +0 -14
- package/node/lib/fbs/trace-events/trace-info.d.ts.map +0 -1
- package/node/lib/fbs/trace-events/trace-info.js +0 -38
- package/node/lib/fbs/trace-events.d.ts +0 -7
- package/node/lib/fbs/trace-events.d.ts.map +0 -1
- package/node/lib/fbs/trace-events.js +0 -20
- package/node/lib/fbs/web-rtc-server/tuple-hash.d.ts +0 -25
- package/node/lib/fbs/web-rtc-server/tuple-hash.d.ts.map +0 -1
- package/node/lib/fbs/web-rtc-server/tuple-hash.js +0 -104
|
@@ -67,6 +67,8 @@ SCENARIO("TransportTuple", "[transport-tuple]")
|
|
|
67
67
|
}
|
|
68
68
|
};
|
|
69
69
|
|
|
70
|
+
// We can only make sure that if key1 == key2 then hash(key1) == hash(key2). The opposite is not
|
|
71
|
+
// true since different keys may have the same hash.
|
|
70
72
|
SECTION("2 tuples with same local and remote IP:port have the same hash")
|
|
71
73
|
{
|
|
72
74
|
auto udpSocket = makeUdpSocket("0.0.0.0", 10000, 50000);
|
|
@@ -76,11 +78,14 @@ SCENARIO("TransportTuple", "[transport-tuple]")
|
|
|
76
78
|
RTC::TransportTuple udpTuple1(udpSocket.get(), udpRemoteAddr1.get());
|
|
77
79
|
RTC::TransportTuple udpTuple2(udpSocket.get(), udpRemoteAddr2.get());
|
|
78
80
|
|
|
79
|
-
REQUIRE(
|
|
81
|
+
REQUIRE(
|
|
82
|
+
RTC::TransportTuple::TupleKeyHash{}(udpTuple1.GetTupleKey()) ==
|
|
83
|
+
RTC::TransportTuple::TupleKeyHash{}(udpTuple2.GetTupleKey()));
|
|
84
|
+
REQUIRE(udpTuple1.GetTupleKey() == udpTuple2.GetTupleKey());
|
|
85
|
+
REQUIRE(udpTuple1.Compare(std::addressof(udpTuple2)));
|
|
80
86
|
}
|
|
81
87
|
|
|
82
|
-
SECTION(
|
|
83
|
-
"2 tuples with same local IP:port, same remote IP and different remote port have different hashes")
|
|
88
|
+
SECTION("2 tuples with same local IP:port, same remote IP and different remote port")
|
|
84
89
|
{
|
|
85
90
|
auto udpSocket = makeUdpSocket("0.0.0.0", 10000, 50000);
|
|
86
91
|
auto udpRemoteAddr1 = makeUdpSockAddr(AF_INET, "1.2.3.4", 10001);
|
|
@@ -89,7 +94,8 @@ SCENARIO("TransportTuple", "[transport-tuple]")
|
|
|
89
94
|
RTC::TransportTuple udpTuple1(udpSocket.get(), udpRemoteAddr1.get());
|
|
90
95
|
RTC::TransportTuple udpTuple2(udpSocket.get(), udpRemoteAddr2.get());
|
|
91
96
|
|
|
92
|
-
REQUIRE(udpTuple1.
|
|
97
|
+
REQUIRE(udpTuple1.GetTupleKey() != udpTuple2.GetTupleKey());
|
|
98
|
+
REQUIRE(!udpTuple1.Compare(std::addressof(udpTuple2)));
|
|
93
99
|
|
|
94
100
|
for (uint16_t remotePort{ 1 }; remotePort < 65535; ++remotePort)
|
|
95
101
|
{
|
|
@@ -103,12 +109,12 @@ SCENARIO("TransportTuple", "[transport-tuple]")
|
|
|
103
109
|
|
|
104
110
|
RTC::TransportTuple udpTuple3(udpSocket.get(), udpRemoteAddr3.get());
|
|
105
111
|
|
|
106
|
-
REQUIRE(udpTuple1.
|
|
112
|
+
REQUIRE(udpTuple1.GetTupleKey() != udpTuple3.GetTupleKey());
|
|
113
|
+
REQUIRE(!udpTuple1.Compare(std::addressof(udpTuple3)));
|
|
107
114
|
}
|
|
108
115
|
}
|
|
109
116
|
|
|
110
|
-
SECTION(
|
|
111
|
-
"2 tuples with same local IP:port, different remote IP and same remote port have different hashes")
|
|
117
|
+
SECTION("2 tuples with same local IP:port, different remote IP and same remote port")
|
|
112
118
|
{
|
|
113
119
|
auto udpSocket = makeUdpSocket("0.0.0.0", 10000, 50000);
|
|
114
120
|
auto udpRemoteAddr1 = makeUdpSockAddr(AF_INET, "1.2.3.4", 10001);
|
|
@@ -117,11 +123,11 @@ SCENARIO("TransportTuple", "[transport-tuple]")
|
|
|
117
123
|
RTC::TransportTuple udpTuple1(udpSocket.get(), udpRemoteAddr1.get());
|
|
118
124
|
RTC::TransportTuple udpTuple2(udpSocket.get(), udpRemoteAddr2.get());
|
|
119
125
|
|
|
120
|
-
REQUIRE(udpTuple1.
|
|
126
|
+
REQUIRE(udpTuple1.GetTupleKey() != udpTuple2.GetTupleKey());
|
|
127
|
+
REQUIRE(!udpTuple1.Compare(std::addressof(udpTuple2)));
|
|
121
128
|
}
|
|
122
129
|
|
|
123
|
-
SECTION(
|
|
124
|
-
"2 tuples with same remote IP:port, same local IP and different local port have different hashes")
|
|
130
|
+
SECTION("2 tuples with same remote IP:port, same local IP and different local port")
|
|
125
131
|
{
|
|
126
132
|
auto udpSocket1 = makeUdpSocket("0.0.0.0", 10000, 20000);
|
|
127
133
|
auto udpSocket2 = makeUdpSocket("0.0.0.0", 30000, 40000);
|
|
@@ -131,11 +137,11 @@ SCENARIO("TransportTuple", "[transport-tuple]")
|
|
|
131
137
|
RTC::TransportTuple udpTuple1(udpSocket1.get(), udpRemoteAddr1.get());
|
|
132
138
|
RTC::TransportTuple udpTuple2(udpSocket2.get(), udpRemoteAddr2.get());
|
|
133
139
|
|
|
134
|
-
REQUIRE(udpTuple1.
|
|
140
|
+
REQUIRE(udpTuple1.GetTupleKey() != udpTuple2.GetTupleKey());
|
|
141
|
+
REQUIRE(!udpTuple1.Compare(std::addressof(udpTuple2)));
|
|
135
142
|
}
|
|
136
143
|
|
|
137
|
-
SECTION(
|
|
138
|
-
"2 tuples with same local IP:port, same remote IP and different remote port have different hashes")
|
|
144
|
+
SECTION("2 tuples with same local IP:port, same remote IP and different remote port")
|
|
139
145
|
{
|
|
140
146
|
auto udpSocket = makeUdpSocket("0.0.0.0", 10000, 50000);
|
|
141
147
|
auto udpRemoteAddr1 = makeUdpSockAddr(AF_INET, "1.2.3.4", 40001);
|
|
@@ -144,6 +150,7 @@ SCENARIO("TransportTuple", "[transport-tuple]")
|
|
|
144
150
|
RTC::TransportTuple udpTuple1(udpSocket.get(), udpRemoteAddr1.get());
|
|
145
151
|
RTC::TransportTuple udpTuple2(udpSocket.get(), udpRemoteAddr2.get());
|
|
146
152
|
|
|
147
|
-
REQUIRE(udpTuple1.
|
|
153
|
+
REQUIRE(udpTuple1.GetTupleKey() != udpTuple2.GetTupleKey());
|
|
154
|
+
REQUIRE(!udpTuple1.Compare(std::addressof(udpTuple2)));
|
|
148
155
|
}
|
|
149
156
|
}
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
import * as flatbuffers from 'flatbuffers';
|
|
2
|
-
export declare class Binary implements flatbuffers.IUnpackableObject<BinaryT> {
|
|
3
|
-
bb: flatbuffers.ByteBuffer | null;
|
|
4
|
-
bb_pos: number;
|
|
5
|
-
__init(i: number, bb: flatbuffers.ByteBuffer): Binary;
|
|
6
|
-
static getRootAsBinary(bb: flatbuffers.ByteBuffer, obj?: Binary): Binary;
|
|
7
|
-
static getSizePrefixedRootAsBinary(bb: flatbuffers.ByteBuffer, obj?: Binary): Binary;
|
|
8
|
-
value(index: number): number | null;
|
|
9
|
-
valueLength(): number;
|
|
10
|
-
valueArray(): Uint8Array | null;
|
|
11
|
-
static startBinary(builder: flatbuffers.Builder): void;
|
|
12
|
-
static addValue(builder: flatbuffers.Builder, valueOffset: flatbuffers.Offset): void;
|
|
13
|
-
static createValueVector(builder: flatbuffers.Builder, data: number[] | Uint8Array): flatbuffers.Offset;
|
|
14
|
-
static startValueVector(builder: flatbuffers.Builder, numElems: number): void;
|
|
15
|
-
static endBinary(builder: flatbuffers.Builder): flatbuffers.Offset;
|
|
16
|
-
static createBinary(builder: flatbuffers.Builder, valueOffset: flatbuffers.Offset): flatbuffers.Offset;
|
|
17
|
-
unpack(): BinaryT;
|
|
18
|
-
unpackTo(_o: BinaryT): void;
|
|
19
|
-
}
|
|
20
|
-
export declare class BinaryT implements flatbuffers.IGeneratedObject {
|
|
21
|
-
value: (number)[];
|
|
22
|
-
constructor(value?: (number)[]);
|
|
23
|
-
pack(builder: flatbuffers.Builder): flatbuffers.Offset;
|
|
24
|
-
}
|
|
25
|
-
//# sourceMappingURL=binary.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"binary.d.ts","sourceRoot":"","sources":["../../../src/fbs/data-consumer/binary.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,WAAW,MAAM,aAAa,CAAC;AAI3C,qBAAa,MAAO,YAAW,WAAW,CAAC,iBAAiB,CAAC,OAAO,CAAC;IACnE,EAAE,EAAE,WAAW,CAAC,UAAU,GAAC,IAAI,CAAQ;IACvC,MAAM,SAAK;IACX,MAAM,CAAC,CAAC,EAAC,MAAM,EAAE,EAAE,EAAC,WAAW,CAAC,UAAU,GAAE,MAAM;IAMpD,MAAM,CAAC,eAAe,CAAC,EAAE,EAAC,WAAW,CAAC,UAAU,EAAE,GAAG,CAAC,EAAC,MAAM,GAAE,MAAM;IAIrE,MAAM,CAAC,2BAA2B,CAAC,EAAE,EAAC,WAAW,CAAC,UAAU,EAAE,GAAG,CAAC,EAAC,MAAM,GAAE,MAAM;IAKjF,KAAK,CAAC,KAAK,EAAE,MAAM,GAAE,MAAM,GAAC,IAAI;IAKhC,WAAW,IAAG,MAAM;IAKpB,UAAU,IAAG,UAAU,GAAC,IAAI;IAK5B,MAAM,CAAC,WAAW,CAAC,OAAO,EAAC,WAAW,CAAC,OAAO;IAI9C,MAAM,CAAC,QAAQ,CAAC,OAAO,EAAC,WAAW,CAAC,OAAO,EAAE,WAAW,EAAC,WAAW,CAAC,MAAM;IAI3E,MAAM,CAAC,iBAAiB,CAAC,OAAO,EAAC,WAAW,CAAC,OAAO,EAAE,IAAI,EAAC,MAAM,EAAE,GAAC,UAAU,GAAE,WAAW,CAAC,MAAM;IAQlG,MAAM,CAAC,gBAAgB,CAAC,OAAO,EAAC,WAAW,CAAC,OAAO,EAAE,QAAQ,EAAC,MAAM;IAIpE,MAAM,CAAC,SAAS,CAAC,OAAO,EAAC,WAAW,CAAC,OAAO,GAAE,WAAW,CAAC,MAAM;IAMhE,MAAM,CAAC,YAAY,CAAC,OAAO,EAAC,WAAW,CAAC,OAAO,EAAE,WAAW,EAAC,WAAW,CAAC,MAAM,GAAE,WAAW,CAAC,MAAM;IAMnG,MAAM,IAAI,OAAO;IAOjB,QAAQ,CAAC,EAAE,EAAE,OAAO,GAAG,IAAI;CAG1B;AAED,qBAAa,OAAQ,YAAW,WAAW,CAAC,gBAAgB;IAEnD,KAAK,EAAE,CAAC,MAAM,CAAC,EAAE;gBAAjB,KAAK,GAAE,CAAC,MAAM,CAAC,EAAO;IAI/B,IAAI,CAAC,OAAO,EAAC,WAAW,CAAC,OAAO,GAAG,WAAW,CAAC,MAAM;CAOpD"}
|
|
@@ -1,110 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
// automatically generated by the FlatBuffers compiler, do not modify
|
|
3
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
4
|
-
if (k2 === undefined) k2 = k;
|
|
5
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
6
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
7
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
8
|
-
}
|
|
9
|
-
Object.defineProperty(o, k2, desc);
|
|
10
|
-
}) : (function(o, m, k, k2) {
|
|
11
|
-
if (k2 === undefined) k2 = k;
|
|
12
|
-
o[k2] = m[k];
|
|
13
|
-
}));
|
|
14
|
-
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
15
|
-
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
16
|
-
}) : function(o, v) {
|
|
17
|
-
o["default"] = v;
|
|
18
|
-
});
|
|
19
|
-
var __importStar = (this && this.__importStar) || (function () {
|
|
20
|
-
var ownKeys = function(o) {
|
|
21
|
-
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
22
|
-
var ar = [];
|
|
23
|
-
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
24
|
-
return ar;
|
|
25
|
-
};
|
|
26
|
-
return ownKeys(o);
|
|
27
|
-
};
|
|
28
|
-
return function (mod) {
|
|
29
|
-
if (mod && mod.__esModule) return mod;
|
|
30
|
-
var result = {};
|
|
31
|
-
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
32
|
-
__setModuleDefault(result, mod);
|
|
33
|
-
return result;
|
|
34
|
-
};
|
|
35
|
-
})();
|
|
36
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
37
|
-
exports.BinaryT = exports.Binary = void 0;
|
|
38
|
-
const flatbuffers = __importStar(require("flatbuffers"));
|
|
39
|
-
class Binary {
|
|
40
|
-
bb = null;
|
|
41
|
-
bb_pos = 0;
|
|
42
|
-
__init(i, bb) {
|
|
43
|
-
this.bb_pos = i;
|
|
44
|
-
this.bb = bb;
|
|
45
|
-
return this;
|
|
46
|
-
}
|
|
47
|
-
static getRootAsBinary(bb, obj) {
|
|
48
|
-
return (obj || new Binary()).__init(bb.readInt32(bb.position()) + bb.position(), bb);
|
|
49
|
-
}
|
|
50
|
-
static getSizePrefixedRootAsBinary(bb, obj) {
|
|
51
|
-
bb.setPosition(bb.position() + flatbuffers.SIZE_PREFIX_LENGTH);
|
|
52
|
-
return (obj || new Binary()).__init(bb.readInt32(bb.position()) + bb.position(), bb);
|
|
53
|
-
}
|
|
54
|
-
value(index) {
|
|
55
|
-
const offset = this.bb.__offset(this.bb_pos, 4);
|
|
56
|
-
return offset ? this.bb.readUint8(this.bb.__vector(this.bb_pos + offset) + index) : 0;
|
|
57
|
-
}
|
|
58
|
-
valueLength() {
|
|
59
|
-
const offset = this.bb.__offset(this.bb_pos, 4);
|
|
60
|
-
return offset ? this.bb.__vector_len(this.bb_pos + offset) : 0;
|
|
61
|
-
}
|
|
62
|
-
valueArray() {
|
|
63
|
-
const offset = this.bb.__offset(this.bb_pos, 4);
|
|
64
|
-
return offset ? new Uint8Array(this.bb.bytes().buffer, this.bb.bytes().byteOffset + this.bb.__vector(this.bb_pos + offset), this.bb.__vector_len(this.bb_pos + offset)) : null;
|
|
65
|
-
}
|
|
66
|
-
static startBinary(builder) {
|
|
67
|
-
builder.startObject(1);
|
|
68
|
-
}
|
|
69
|
-
static addValue(builder, valueOffset) {
|
|
70
|
-
builder.addFieldOffset(0, valueOffset, 0);
|
|
71
|
-
}
|
|
72
|
-
static createValueVector(builder, data) {
|
|
73
|
-
builder.startVector(1, data.length, 1);
|
|
74
|
-
for (let i = data.length - 1; i >= 0; i--) {
|
|
75
|
-
builder.addInt8(data[i]);
|
|
76
|
-
}
|
|
77
|
-
return builder.endVector();
|
|
78
|
-
}
|
|
79
|
-
static startValueVector(builder, numElems) {
|
|
80
|
-
builder.startVector(1, numElems, 1);
|
|
81
|
-
}
|
|
82
|
-
static endBinary(builder) {
|
|
83
|
-
const offset = builder.endObject();
|
|
84
|
-
builder.requiredField(offset, 4); // value
|
|
85
|
-
return offset;
|
|
86
|
-
}
|
|
87
|
-
static createBinary(builder, valueOffset) {
|
|
88
|
-
Binary.startBinary(builder);
|
|
89
|
-
Binary.addValue(builder, valueOffset);
|
|
90
|
-
return Binary.endBinary(builder);
|
|
91
|
-
}
|
|
92
|
-
unpack() {
|
|
93
|
-
return new BinaryT(this.bb.createScalarList(this.value.bind(this), this.valueLength()));
|
|
94
|
-
}
|
|
95
|
-
unpackTo(_o) {
|
|
96
|
-
_o.value = this.bb.createScalarList(this.value.bind(this), this.valueLength());
|
|
97
|
-
}
|
|
98
|
-
}
|
|
99
|
-
exports.Binary = Binary;
|
|
100
|
-
class BinaryT {
|
|
101
|
-
value;
|
|
102
|
-
constructor(value = []) {
|
|
103
|
-
this.value = value;
|
|
104
|
-
}
|
|
105
|
-
pack(builder) {
|
|
106
|
-
const value = Binary.createValueVector(builder, this.value);
|
|
107
|
-
return Binary.createBinary(builder, value);
|
|
108
|
-
}
|
|
109
|
-
}
|
|
110
|
-
exports.BinaryT = BinaryT;
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { Binary } from '../../fbs/data-consumer/binary';
|
|
2
|
-
import { String } from '../../fbs/data-consumer/string';
|
|
3
|
-
export declare enum Data {
|
|
4
|
-
NONE = 0,
|
|
5
|
-
String = 1,
|
|
6
|
-
Binary = 2
|
|
7
|
-
}
|
|
8
|
-
export declare function unionToData(type: Data, accessor: (obj: Binary | String) => Binary | String | null): Binary | String | null;
|
|
9
|
-
export declare function unionListToData(type: Data, accessor: (index: number, obj: Binary | String) => Binary | String | null, index: number): Binary | String | null;
|
|
10
|
-
//# sourceMappingURL=data.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"data.d.ts","sourceRoot":"","sources":["../../../src/fbs/data-consumer/data.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,MAAM,EAAW,MAAM,gCAAgC,CAAC;AACjE,OAAO,EAAE,MAAM,EAAW,MAAM,gCAAgC,CAAC;AAGjE,oBAAY,IAAI;IACd,IAAI,IAAI;IACR,MAAM,IAAI;IACV,MAAM,IAAI;CACX;AAED,wBAAgB,WAAW,CACzB,IAAI,EAAE,IAAI,EACV,QAAQ,EAAE,CAAC,GAAG,EAAC,MAAM,GAAC,MAAM,KAAK,MAAM,GAAC,MAAM,GAAC,IAAI,GAClD,MAAM,GAAC,MAAM,GAAC,IAAI,CAOpB;AAED,wBAAgB,eAAe,CAC7B,IAAI,EAAE,IAAI,EACV,QAAQ,EAAE,CAAC,KAAK,EAAE,MAAM,EAAE,GAAG,EAAC,MAAM,GAAC,MAAM,KAAK,MAAM,GAAC,MAAM,GAAC,IAAI,EAClE,KAAK,EAAE,MAAM,GACZ,MAAM,GAAC,MAAM,GAAC,IAAI,CAOpB"}
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
// automatically generated by the FlatBuffers compiler, do not modify
|
|
3
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
-
exports.Data = void 0;
|
|
5
|
-
exports.unionToData = unionToData;
|
|
6
|
-
exports.unionListToData = unionListToData;
|
|
7
|
-
const binary_1 = require("../../fbs/data-consumer/binary");
|
|
8
|
-
const string_1 = require("../../fbs/data-consumer/string");
|
|
9
|
-
var Data;
|
|
10
|
-
(function (Data) {
|
|
11
|
-
Data[Data["NONE"] = 0] = "NONE";
|
|
12
|
-
Data[Data["String"] = 1] = "String";
|
|
13
|
-
Data[Data["Binary"] = 2] = "Binary";
|
|
14
|
-
})(Data || (exports.Data = Data = {}));
|
|
15
|
-
function unionToData(type, accessor) {
|
|
16
|
-
switch (Data[type]) {
|
|
17
|
-
case 'NONE': return null;
|
|
18
|
-
case 'String': return accessor(new string_1.String());
|
|
19
|
-
case 'Binary': return accessor(new binary_1.Binary());
|
|
20
|
-
default: return null;
|
|
21
|
-
}
|
|
22
|
-
}
|
|
23
|
-
function unionListToData(type, accessor, index) {
|
|
24
|
-
switch (Data[type]) {
|
|
25
|
-
case 'NONE': return null;
|
|
26
|
-
case 'String': return accessor(index, new string_1.String());
|
|
27
|
-
case 'Binary': return accessor(index, new binary_1.Binary());
|
|
28
|
-
default: return null;
|
|
29
|
-
}
|
|
30
|
-
}
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
import * as flatbuffers from 'flatbuffers';
|
|
2
|
-
export declare class String implements flatbuffers.IUnpackableObject<StringT> {
|
|
3
|
-
bb: flatbuffers.ByteBuffer | null;
|
|
4
|
-
bb_pos: number;
|
|
5
|
-
__init(i: number, bb: flatbuffers.ByteBuffer): String;
|
|
6
|
-
static getRootAsString(bb: flatbuffers.ByteBuffer, obj?: String): String;
|
|
7
|
-
static getSizePrefixedRootAsString(bb: flatbuffers.ByteBuffer, obj?: String): String;
|
|
8
|
-
value(): string | null;
|
|
9
|
-
value(optionalEncoding: flatbuffers.Encoding): string | Uint8Array | null;
|
|
10
|
-
static startString(builder: flatbuffers.Builder): void;
|
|
11
|
-
static addValue(builder: flatbuffers.Builder, valueOffset: flatbuffers.Offset): void;
|
|
12
|
-
static endString(builder: flatbuffers.Builder): flatbuffers.Offset;
|
|
13
|
-
static createString(builder: flatbuffers.Builder, valueOffset: flatbuffers.Offset): flatbuffers.Offset;
|
|
14
|
-
unpack(): StringT;
|
|
15
|
-
unpackTo(_o: StringT): void;
|
|
16
|
-
}
|
|
17
|
-
export declare class StringT implements flatbuffers.IGeneratedObject {
|
|
18
|
-
value: string | Uint8Array | null;
|
|
19
|
-
constructor(value?: string | Uint8Array | null);
|
|
20
|
-
pack(builder: flatbuffers.Builder): flatbuffers.Offset;
|
|
21
|
-
}
|
|
22
|
-
//# sourceMappingURL=string.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"string.d.ts","sourceRoot":"","sources":["../../../src/fbs/data-consumer/string.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,WAAW,MAAM,aAAa,CAAC;AAI3C,qBAAa,MAAO,YAAW,WAAW,CAAC,iBAAiB,CAAC,OAAO,CAAC;IACnE,EAAE,EAAE,WAAW,CAAC,UAAU,GAAC,IAAI,CAAQ;IACvC,MAAM,SAAK;IACX,MAAM,CAAC,CAAC,EAAC,MAAM,EAAE,EAAE,EAAC,WAAW,CAAC,UAAU,GAAE,MAAM;IAMpD,MAAM,CAAC,eAAe,CAAC,EAAE,EAAC,WAAW,CAAC,UAAU,EAAE,GAAG,CAAC,EAAC,MAAM,GAAE,MAAM;IAIrE,MAAM,CAAC,2BAA2B,CAAC,EAAE,EAAC,WAAW,CAAC,UAAU,EAAE,GAAG,CAAC,EAAC,MAAM,GAAE,MAAM;IAKjF,KAAK,IAAG,MAAM,GAAC,IAAI;IACnB,KAAK,CAAC,gBAAgB,EAAC,WAAW,CAAC,QAAQ,GAAE,MAAM,GAAC,UAAU,GAAC,IAAI;IAMnE,MAAM,CAAC,WAAW,CAAC,OAAO,EAAC,WAAW,CAAC,OAAO;IAI9C,MAAM,CAAC,QAAQ,CAAC,OAAO,EAAC,WAAW,CAAC,OAAO,EAAE,WAAW,EAAC,WAAW,CAAC,MAAM;IAI3E,MAAM,CAAC,SAAS,CAAC,OAAO,EAAC,WAAW,CAAC,OAAO,GAAE,WAAW,CAAC,MAAM;IAMhE,MAAM,CAAC,YAAY,CAAC,OAAO,EAAC,WAAW,CAAC,OAAO,EAAE,WAAW,EAAC,WAAW,CAAC,MAAM,GAAE,WAAW,CAAC,MAAM;IAMnG,MAAM,IAAI,OAAO;IAOjB,QAAQ,CAAC,EAAE,EAAE,OAAO,GAAG,IAAI;CAG1B;AAED,qBAAa,OAAQ,YAAW,WAAW,CAAC,gBAAgB;IAEnD,KAAK,EAAE,MAAM,GAAC,UAAU,GAAC,IAAI;gBAA7B,KAAK,GAAE,MAAM,GAAC,UAAU,GAAC,IAAW;IAI7C,IAAI,CAAC,OAAO,EAAC,WAAW,CAAC,OAAO,GAAG,WAAW,CAAC,MAAM;CAOpD"}
|
|
@@ -1,92 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
// automatically generated by the FlatBuffers compiler, do not modify
|
|
3
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
4
|
-
if (k2 === undefined) k2 = k;
|
|
5
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
6
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
7
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
8
|
-
}
|
|
9
|
-
Object.defineProperty(o, k2, desc);
|
|
10
|
-
}) : (function(o, m, k, k2) {
|
|
11
|
-
if (k2 === undefined) k2 = k;
|
|
12
|
-
o[k2] = m[k];
|
|
13
|
-
}));
|
|
14
|
-
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
15
|
-
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
16
|
-
}) : function(o, v) {
|
|
17
|
-
o["default"] = v;
|
|
18
|
-
});
|
|
19
|
-
var __importStar = (this && this.__importStar) || (function () {
|
|
20
|
-
var ownKeys = function(o) {
|
|
21
|
-
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
22
|
-
var ar = [];
|
|
23
|
-
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
24
|
-
return ar;
|
|
25
|
-
};
|
|
26
|
-
return ownKeys(o);
|
|
27
|
-
};
|
|
28
|
-
return function (mod) {
|
|
29
|
-
if (mod && mod.__esModule) return mod;
|
|
30
|
-
var result = {};
|
|
31
|
-
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
32
|
-
__setModuleDefault(result, mod);
|
|
33
|
-
return result;
|
|
34
|
-
};
|
|
35
|
-
})();
|
|
36
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
37
|
-
exports.StringT = exports.String = void 0;
|
|
38
|
-
const flatbuffers = __importStar(require("flatbuffers"));
|
|
39
|
-
class String {
|
|
40
|
-
bb = null;
|
|
41
|
-
bb_pos = 0;
|
|
42
|
-
__init(i, bb) {
|
|
43
|
-
this.bb_pos = i;
|
|
44
|
-
this.bb = bb;
|
|
45
|
-
return this;
|
|
46
|
-
}
|
|
47
|
-
static getRootAsString(bb, obj) {
|
|
48
|
-
return (obj || new String()).__init(bb.readInt32(bb.position()) + bb.position(), bb);
|
|
49
|
-
}
|
|
50
|
-
static getSizePrefixedRootAsString(bb, obj) {
|
|
51
|
-
bb.setPosition(bb.position() + flatbuffers.SIZE_PREFIX_LENGTH);
|
|
52
|
-
return (obj || new String()).__init(bb.readInt32(bb.position()) + bb.position(), bb);
|
|
53
|
-
}
|
|
54
|
-
value(optionalEncoding) {
|
|
55
|
-
const offset = this.bb.__offset(this.bb_pos, 4);
|
|
56
|
-
return offset ? this.bb.__string(this.bb_pos + offset, optionalEncoding) : null;
|
|
57
|
-
}
|
|
58
|
-
static startString(builder) {
|
|
59
|
-
builder.startObject(1);
|
|
60
|
-
}
|
|
61
|
-
static addValue(builder, valueOffset) {
|
|
62
|
-
builder.addFieldOffset(0, valueOffset, 0);
|
|
63
|
-
}
|
|
64
|
-
static endString(builder) {
|
|
65
|
-
const offset = builder.endObject();
|
|
66
|
-
builder.requiredField(offset, 4); // value
|
|
67
|
-
return offset;
|
|
68
|
-
}
|
|
69
|
-
static createString(builder, valueOffset) {
|
|
70
|
-
String.startString(builder);
|
|
71
|
-
String.addValue(builder, valueOffset);
|
|
72
|
-
return String.endString(builder);
|
|
73
|
-
}
|
|
74
|
-
unpack() {
|
|
75
|
-
return new StringT(this.value());
|
|
76
|
-
}
|
|
77
|
-
unpackTo(_o) {
|
|
78
|
-
_o.value = this.value();
|
|
79
|
-
}
|
|
80
|
-
}
|
|
81
|
-
exports.String = String;
|
|
82
|
-
class StringT {
|
|
83
|
-
value;
|
|
84
|
-
constructor(value = null) {
|
|
85
|
-
this.value = value;
|
|
86
|
-
}
|
|
87
|
-
pack(builder) {
|
|
88
|
-
const value = (this.value !== null ? builder.createString(this.value) : 0);
|
|
89
|
-
return String.createString(builder, value);
|
|
90
|
-
}
|
|
91
|
-
}
|
|
92
|
-
exports.StringT = StringT;
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
import * as flatbuffers from 'flatbuffers';
|
|
2
|
-
export declare class Binary implements flatbuffers.IUnpackableObject<BinaryT> {
|
|
3
|
-
bb: flatbuffers.ByteBuffer | null;
|
|
4
|
-
bb_pos: number;
|
|
5
|
-
__init(i: number, bb: flatbuffers.ByteBuffer): Binary;
|
|
6
|
-
static getRootAsBinary(bb: flatbuffers.ByteBuffer, obj?: Binary): Binary;
|
|
7
|
-
static getSizePrefixedRootAsBinary(bb: flatbuffers.ByteBuffer, obj?: Binary): Binary;
|
|
8
|
-
value(index: number): number | null;
|
|
9
|
-
valueLength(): number;
|
|
10
|
-
valueArray(): Uint8Array | null;
|
|
11
|
-
static startBinary(builder: flatbuffers.Builder): void;
|
|
12
|
-
static addValue(builder: flatbuffers.Builder, valueOffset: flatbuffers.Offset): void;
|
|
13
|
-
static createValueVector(builder: flatbuffers.Builder, data: number[] | Uint8Array): flatbuffers.Offset;
|
|
14
|
-
static startValueVector(builder: flatbuffers.Builder, numElems: number): void;
|
|
15
|
-
static endBinary(builder: flatbuffers.Builder): flatbuffers.Offset;
|
|
16
|
-
static createBinary(builder: flatbuffers.Builder, valueOffset: flatbuffers.Offset): flatbuffers.Offset;
|
|
17
|
-
unpack(): BinaryT;
|
|
18
|
-
unpackTo(_o: BinaryT): void;
|
|
19
|
-
}
|
|
20
|
-
export declare class BinaryT implements flatbuffers.IGeneratedObject {
|
|
21
|
-
value: (number)[];
|
|
22
|
-
constructor(value?: (number)[]);
|
|
23
|
-
pack(builder: flatbuffers.Builder): flatbuffers.Offset;
|
|
24
|
-
}
|
|
25
|
-
//# sourceMappingURL=binary.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"binary.d.ts","sourceRoot":"","sources":["../../../src/fbs/data-producer/binary.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,WAAW,MAAM,aAAa,CAAC;AAI3C,qBAAa,MAAO,YAAW,WAAW,CAAC,iBAAiB,CAAC,OAAO,CAAC;IACnE,EAAE,EAAE,WAAW,CAAC,UAAU,GAAC,IAAI,CAAQ;IACvC,MAAM,SAAK;IACX,MAAM,CAAC,CAAC,EAAC,MAAM,EAAE,EAAE,EAAC,WAAW,CAAC,UAAU,GAAE,MAAM;IAMpD,MAAM,CAAC,eAAe,CAAC,EAAE,EAAC,WAAW,CAAC,UAAU,EAAE,GAAG,CAAC,EAAC,MAAM,GAAE,MAAM;IAIrE,MAAM,CAAC,2BAA2B,CAAC,EAAE,EAAC,WAAW,CAAC,UAAU,EAAE,GAAG,CAAC,EAAC,MAAM,GAAE,MAAM;IAKjF,KAAK,CAAC,KAAK,EAAE,MAAM,GAAE,MAAM,GAAC,IAAI;IAKhC,WAAW,IAAG,MAAM;IAKpB,UAAU,IAAG,UAAU,GAAC,IAAI;IAK5B,MAAM,CAAC,WAAW,CAAC,OAAO,EAAC,WAAW,CAAC,OAAO;IAI9C,MAAM,CAAC,QAAQ,CAAC,OAAO,EAAC,WAAW,CAAC,OAAO,EAAE,WAAW,EAAC,WAAW,CAAC,MAAM;IAI3E,MAAM,CAAC,iBAAiB,CAAC,OAAO,EAAC,WAAW,CAAC,OAAO,EAAE,IAAI,EAAC,MAAM,EAAE,GAAC,UAAU,GAAE,WAAW,CAAC,MAAM;IAQlG,MAAM,CAAC,gBAAgB,CAAC,OAAO,EAAC,WAAW,CAAC,OAAO,EAAE,QAAQ,EAAC,MAAM;IAIpE,MAAM,CAAC,SAAS,CAAC,OAAO,EAAC,WAAW,CAAC,OAAO,GAAE,WAAW,CAAC,MAAM;IAMhE,MAAM,CAAC,YAAY,CAAC,OAAO,EAAC,WAAW,CAAC,OAAO,EAAE,WAAW,EAAC,WAAW,CAAC,MAAM,GAAE,WAAW,CAAC,MAAM;IAMnG,MAAM,IAAI,OAAO;IAOjB,QAAQ,CAAC,EAAE,EAAE,OAAO,GAAG,IAAI;CAG1B;AAED,qBAAa,OAAQ,YAAW,WAAW,CAAC,gBAAgB;IAEnD,KAAK,EAAE,CAAC,MAAM,CAAC,EAAE;gBAAjB,KAAK,GAAE,CAAC,MAAM,CAAC,EAAO;IAI/B,IAAI,CAAC,OAAO,EAAC,WAAW,CAAC,OAAO,GAAG,WAAW,CAAC,MAAM;CAOpD"}
|
|
@@ -1,110 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
// automatically generated by the FlatBuffers compiler, do not modify
|
|
3
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
4
|
-
if (k2 === undefined) k2 = k;
|
|
5
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
6
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
7
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
8
|
-
}
|
|
9
|
-
Object.defineProperty(o, k2, desc);
|
|
10
|
-
}) : (function(o, m, k, k2) {
|
|
11
|
-
if (k2 === undefined) k2 = k;
|
|
12
|
-
o[k2] = m[k];
|
|
13
|
-
}));
|
|
14
|
-
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
15
|
-
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
16
|
-
}) : function(o, v) {
|
|
17
|
-
o["default"] = v;
|
|
18
|
-
});
|
|
19
|
-
var __importStar = (this && this.__importStar) || (function () {
|
|
20
|
-
var ownKeys = function(o) {
|
|
21
|
-
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
22
|
-
var ar = [];
|
|
23
|
-
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
24
|
-
return ar;
|
|
25
|
-
};
|
|
26
|
-
return ownKeys(o);
|
|
27
|
-
};
|
|
28
|
-
return function (mod) {
|
|
29
|
-
if (mod && mod.__esModule) return mod;
|
|
30
|
-
var result = {};
|
|
31
|
-
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
32
|
-
__setModuleDefault(result, mod);
|
|
33
|
-
return result;
|
|
34
|
-
};
|
|
35
|
-
})();
|
|
36
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
37
|
-
exports.BinaryT = exports.Binary = void 0;
|
|
38
|
-
const flatbuffers = __importStar(require("flatbuffers"));
|
|
39
|
-
class Binary {
|
|
40
|
-
bb = null;
|
|
41
|
-
bb_pos = 0;
|
|
42
|
-
__init(i, bb) {
|
|
43
|
-
this.bb_pos = i;
|
|
44
|
-
this.bb = bb;
|
|
45
|
-
return this;
|
|
46
|
-
}
|
|
47
|
-
static getRootAsBinary(bb, obj) {
|
|
48
|
-
return (obj || new Binary()).__init(bb.readInt32(bb.position()) + bb.position(), bb);
|
|
49
|
-
}
|
|
50
|
-
static getSizePrefixedRootAsBinary(bb, obj) {
|
|
51
|
-
bb.setPosition(bb.position() + flatbuffers.SIZE_PREFIX_LENGTH);
|
|
52
|
-
return (obj || new Binary()).__init(bb.readInt32(bb.position()) + bb.position(), bb);
|
|
53
|
-
}
|
|
54
|
-
value(index) {
|
|
55
|
-
const offset = this.bb.__offset(this.bb_pos, 4);
|
|
56
|
-
return offset ? this.bb.readUint8(this.bb.__vector(this.bb_pos + offset) + index) : 0;
|
|
57
|
-
}
|
|
58
|
-
valueLength() {
|
|
59
|
-
const offset = this.bb.__offset(this.bb_pos, 4);
|
|
60
|
-
return offset ? this.bb.__vector_len(this.bb_pos + offset) : 0;
|
|
61
|
-
}
|
|
62
|
-
valueArray() {
|
|
63
|
-
const offset = this.bb.__offset(this.bb_pos, 4);
|
|
64
|
-
return offset ? new Uint8Array(this.bb.bytes().buffer, this.bb.bytes().byteOffset + this.bb.__vector(this.bb_pos + offset), this.bb.__vector_len(this.bb_pos + offset)) : null;
|
|
65
|
-
}
|
|
66
|
-
static startBinary(builder) {
|
|
67
|
-
builder.startObject(1);
|
|
68
|
-
}
|
|
69
|
-
static addValue(builder, valueOffset) {
|
|
70
|
-
builder.addFieldOffset(0, valueOffset, 0);
|
|
71
|
-
}
|
|
72
|
-
static createValueVector(builder, data) {
|
|
73
|
-
builder.startVector(1, data.length, 1);
|
|
74
|
-
for (let i = data.length - 1; i >= 0; i--) {
|
|
75
|
-
builder.addInt8(data[i]);
|
|
76
|
-
}
|
|
77
|
-
return builder.endVector();
|
|
78
|
-
}
|
|
79
|
-
static startValueVector(builder, numElems) {
|
|
80
|
-
builder.startVector(1, numElems, 1);
|
|
81
|
-
}
|
|
82
|
-
static endBinary(builder) {
|
|
83
|
-
const offset = builder.endObject();
|
|
84
|
-
builder.requiredField(offset, 4); // value
|
|
85
|
-
return offset;
|
|
86
|
-
}
|
|
87
|
-
static createBinary(builder, valueOffset) {
|
|
88
|
-
Binary.startBinary(builder);
|
|
89
|
-
Binary.addValue(builder, valueOffset);
|
|
90
|
-
return Binary.endBinary(builder);
|
|
91
|
-
}
|
|
92
|
-
unpack() {
|
|
93
|
-
return new BinaryT(this.bb.createScalarList(this.value.bind(this), this.valueLength()));
|
|
94
|
-
}
|
|
95
|
-
unpackTo(_o) {
|
|
96
|
-
_o.value = this.bb.createScalarList(this.value.bind(this), this.valueLength());
|
|
97
|
-
}
|
|
98
|
-
}
|
|
99
|
-
exports.Binary = Binary;
|
|
100
|
-
class BinaryT {
|
|
101
|
-
value;
|
|
102
|
-
constructor(value = []) {
|
|
103
|
-
this.value = value;
|
|
104
|
-
}
|
|
105
|
-
pack(builder) {
|
|
106
|
-
const value = Binary.createValueVector(builder, this.value);
|
|
107
|
-
return Binary.createBinary(builder, value);
|
|
108
|
-
}
|
|
109
|
-
}
|
|
110
|
-
exports.BinaryT = BinaryT;
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { Binary } from '../../fbs/data-producer/binary';
|
|
2
|
-
import { String } from '../../fbs/data-producer/string';
|
|
3
|
-
export declare enum Data {
|
|
4
|
-
NONE = 0,
|
|
5
|
-
String = 1,
|
|
6
|
-
Binary = 2
|
|
7
|
-
}
|
|
8
|
-
export declare function unionToData(type: Data, accessor: (obj: Binary | String) => Binary | String | null): Binary | String | null;
|
|
9
|
-
export declare function unionListToData(type: Data, accessor: (index: number, obj: Binary | String) => Binary | String | null, index: number): Binary | String | null;
|
|
10
|
-
//# sourceMappingURL=data.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"data.d.ts","sourceRoot":"","sources":["../../../src/fbs/data-producer/data.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,MAAM,EAAW,MAAM,gCAAgC,CAAC;AACjE,OAAO,EAAE,MAAM,EAAW,MAAM,gCAAgC,CAAC;AAGjE,oBAAY,IAAI;IACd,IAAI,IAAI;IACR,MAAM,IAAI;IACV,MAAM,IAAI;CACX;AAED,wBAAgB,WAAW,CACzB,IAAI,EAAE,IAAI,EACV,QAAQ,EAAE,CAAC,GAAG,EAAC,MAAM,GAAC,MAAM,KAAK,MAAM,GAAC,MAAM,GAAC,IAAI,GAClD,MAAM,GAAC,MAAM,GAAC,IAAI,CAOpB;AAED,wBAAgB,eAAe,CAC7B,IAAI,EAAE,IAAI,EACV,QAAQ,EAAE,CAAC,KAAK,EAAE,MAAM,EAAE,GAAG,EAAC,MAAM,GAAC,MAAM,KAAK,MAAM,GAAC,MAAM,GAAC,IAAI,EAClE,KAAK,EAAE,MAAM,GACZ,MAAM,GAAC,MAAM,GAAC,IAAI,CAOpB"}
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
// automatically generated by the FlatBuffers compiler, do not modify
|
|
3
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
-
exports.Data = void 0;
|
|
5
|
-
exports.unionToData = unionToData;
|
|
6
|
-
exports.unionListToData = unionListToData;
|
|
7
|
-
const binary_1 = require("../../fbs/data-producer/binary");
|
|
8
|
-
const string_1 = require("../../fbs/data-producer/string");
|
|
9
|
-
var Data;
|
|
10
|
-
(function (Data) {
|
|
11
|
-
Data[Data["NONE"] = 0] = "NONE";
|
|
12
|
-
Data[Data["String"] = 1] = "String";
|
|
13
|
-
Data[Data["Binary"] = 2] = "Binary";
|
|
14
|
-
})(Data || (exports.Data = Data = {}));
|
|
15
|
-
function unionToData(type, accessor) {
|
|
16
|
-
switch (Data[type]) {
|
|
17
|
-
case 'NONE': return null;
|
|
18
|
-
case 'String': return accessor(new string_1.String());
|
|
19
|
-
case 'Binary': return accessor(new binary_1.Binary());
|
|
20
|
-
default: return null;
|
|
21
|
-
}
|
|
22
|
-
}
|
|
23
|
-
function unionListToData(type, accessor, index) {
|
|
24
|
-
switch (Data[type]) {
|
|
25
|
-
case 'NONE': return null;
|
|
26
|
-
case 'String': return accessor(index, new string_1.String());
|
|
27
|
-
case 'Binary': return accessor(index, new binary_1.Binary());
|
|
28
|
-
default: return null;
|
|
29
|
-
}
|
|
30
|
-
}
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
import * as flatbuffers from 'flatbuffers';
|
|
2
|
-
export declare class String implements flatbuffers.IUnpackableObject<StringT> {
|
|
3
|
-
bb: flatbuffers.ByteBuffer | null;
|
|
4
|
-
bb_pos: number;
|
|
5
|
-
__init(i: number, bb: flatbuffers.ByteBuffer): String;
|
|
6
|
-
static getRootAsString(bb: flatbuffers.ByteBuffer, obj?: String): String;
|
|
7
|
-
static getSizePrefixedRootAsString(bb: flatbuffers.ByteBuffer, obj?: String): String;
|
|
8
|
-
value(): string | null;
|
|
9
|
-
value(optionalEncoding: flatbuffers.Encoding): string | Uint8Array | null;
|
|
10
|
-
static startString(builder: flatbuffers.Builder): void;
|
|
11
|
-
static addValue(builder: flatbuffers.Builder, valueOffset: flatbuffers.Offset): void;
|
|
12
|
-
static endString(builder: flatbuffers.Builder): flatbuffers.Offset;
|
|
13
|
-
static createString(builder: flatbuffers.Builder, valueOffset: flatbuffers.Offset): flatbuffers.Offset;
|
|
14
|
-
unpack(): StringT;
|
|
15
|
-
unpackTo(_o: StringT): void;
|
|
16
|
-
}
|
|
17
|
-
export declare class StringT implements flatbuffers.IGeneratedObject {
|
|
18
|
-
value: string | Uint8Array | null;
|
|
19
|
-
constructor(value?: string | Uint8Array | null);
|
|
20
|
-
pack(builder: flatbuffers.Builder): flatbuffers.Offset;
|
|
21
|
-
}
|
|
22
|
-
//# sourceMappingURL=string.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"string.d.ts","sourceRoot":"","sources":["../../../src/fbs/data-producer/string.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,WAAW,MAAM,aAAa,CAAC;AAI3C,qBAAa,MAAO,YAAW,WAAW,CAAC,iBAAiB,CAAC,OAAO,CAAC;IACnE,EAAE,EAAE,WAAW,CAAC,UAAU,GAAC,IAAI,CAAQ;IACvC,MAAM,SAAK;IACX,MAAM,CAAC,CAAC,EAAC,MAAM,EAAE,EAAE,EAAC,WAAW,CAAC,UAAU,GAAE,MAAM;IAMpD,MAAM,CAAC,eAAe,CAAC,EAAE,EAAC,WAAW,CAAC,UAAU,EAAE,GAAG,CAAC,EAAC,MAAM,GAAE,MAAM;IAIrE,MAAM,CAAC,2BAA2B,CAAC,EAAE,EAAC,WAAW,CAAC,UAAU,EAAE,GAAG,CAAC,EAAC,MAAM,GAAE,MAAM;IAKjF,KAAK,IAAG,MAAM,GAAC,IAAI;IACnB,KAAK,CAAC,gBAAgB,EAAC,WAAW,CAAC,QAAQ,GAAE,MAAM,GAAC,UAAU,GAAC,IAAI;IAMnE,MAAM,CAAC,WAAW,CAAC,OAAO,EAAC,WAAW,CAAC,OAAO;IAI9C,MAAM,CAAC,QAAQ,CAAC,OAAO,EAAC,WAAW,CAAC,OAAO,EAAE,WAAW,EAAC,WAAW,CAAC,MAAM;IAI3E,MAAM,CAAC,SAAS,CAAC,OAAO,EAAC,WAAW,CAAC,OAAO,GAAE,WAAW,CAAC,MAAM;IAMhE,MAAM,CAAC,YAAY,CAAC,OAAO,EAAC,WAAW,CAAC,OAAO,EAAE,WAAW,EAAC,WAAW,CAAC,MAAM,GAAE,WAAW,CAAC,MAAM;IAMnG,MAAM,IAAI,OAAO;IAOjB,QAAQ,CAAC,EAAE,EAAE,OAAO,GAAG,IAAI;CAG1B;AAED,qBAAa,OAAQ,YAAW,WAAW,CAAC,gBAAgB;IAEnD,KAAK,EAAE,MAAM,GAAC,UAAU,GAAC,IAAI;gBAA7B,KAAK,GAAE,MAAM,GAAC,UAAU,GAAC,IAAW;IAI7C,IAAI,CAAC,OAAO,EAAC,WAAW,CAAC,OAAO,GAAG,WAAW,CAAC,MAAM;CAOpD"}
|