@moqtap/codec 0.7.0 → 0.8.0
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 +24 -0
- package/dist/{chunk-Y4FRXYX6.cjs → chunk-BQHLUT37.cjs} +50 -52
- package/dist/{chunk-DORX55MO.js → chunk-JJEN2VG5.js} +50 -52
- package/dist/{codec-B1snaM9L.d.cts → codec-BnamSx7L.d.cts} +1 -1
- package/dist/{codec-D49OofBr.d.ts → codec-CFhUGTu2.d.ts} +1 -1
- package/dist/draft14-session.d.cts +1 -1
- package/dist/draft14-session.d.ts +1 -1
- package/dist/draft14.cjs +2 -2
- package/dist/draft14.d.cts +3 -3
- package/dist/draft14.d.ts +3 -3
- package/dist/draft14.js +1 -1
- package/dist/index.cjs +56 -4
- package/dist/index.d.cts +73 -3
- package/dist/index.d.ts +73 -3
- package/dist/index.js +54 -2
- package/dist/session.d.cts +1 -1
- package/dist/session.d.ts +1 -1
- package/dist/{types-DjmrHp_s.d.cts → types-CVeKIk7A.d.cts} +29 -21
- package/dist/{types-DjmrHp_s.d.ts → types-CVeKIk7A.d.ts} +29 -21
- package/package.json +1 -1
- package/src/core/accessors.ts +120 -0
- package/src/drafts/draft14/codec.ts +50 -52
- package/src/drafts/draft14/types.ts +31 -23
- package/src/index.ts +8 -0
package/README.md
CHANGED
|
@@ -82,6 +82,30 @@ import { createDraft17Codec } from '@moqtap/codec/draft17'
|
|
|
82
82
|
import { createDraft17SessionState } from '@moqtap/codec/draft17/session'
|
|
83
83
|
```
|
|
84
84
|
|
|
85
|
+
## Reading Across Drafts
|
|
86
|
+
|
|
87
|
+
Each draft gets its own message model, because the drafts genuinely differ — a
|
|
88
|
+
track alias travels in SUBSCRIBE through draft-11 and in SUBSCRIBE_OK from
|
|
89
|
+
draft-12; a request is a `subscribe_id` through draft-10 and a `request_id`
|
|
90
|
+
after it. Code that spans drafts can ask for the answer instead of tracking
|
|
91
|
+
where each version keeps it:
|
|
92
|
+
|
|
93
|
+
```typescript
|
|
94
|
+
import { joiningRequestIdOf, requestIdOf, trackAliasOf, trackOf } from '@moqtap/codec'
|
|
95
|
+
|
|
96
|
+
const decoded = codec.decodeMessage(bytes)
|
|
97
|
+
if (decoded.ok) {
|
|
98
|
+
requestIdOf(decoded.value) // bigint, whichever name this draft uses
|
|
99
|
+
trackAliasOf(decoded.value) // bigint, or undefined if not assigned yet
|
|
100
|
+
trackOf(decoded.value) // { namespace, name }, or undefined if none is named
|
|
101
|
+
joiningRequestIdOf(decoded.value) // for a joining FETCH: the request it continues
|
|
102
|
+
}
|
|
103
|
+
```
|
|
104
|
+
|
|
105
|
+
Each returns `undefined` when the message does not carry the field, including
|
|
106
|
+
when the draft has not assigned it yet — `trackAliasOf` on a draft-14 SUBSCRIBE
|
|
107
|
+
is `undefined` because the publisher chooses the alias in SUBSCRIBE_OK.
|
|
108
|
+
|
|
85
109
|
## Session State Machine
|
|
86
110
|
|
|
87
111
|
Validate protocol message sequences without transport coupling:
|
|
@@ -1029,8 +1029,8 @@ function encodeSubscribePayload(msg, w) {
|
|
|
1029
1029
|
w.writeVarInt(msg.request_id);
|
|
1030
1030
|
w.writeTuple(msg.track_namespace);
|
|
1031
1031
|
w.writeString(msg.track_name);
|
|
1032
|
-
w.writeUint8(
|
|
1033
|
-
w.writeUint8(
|
|
1032
|
+
w.writeUint8(msg.subscriber_priority);
|
|
1033
|
+
w.writeUint8(msg.group_order);
|
|
1034
1034
|
w.writeVarInt(msg.forward);
|
|
1035
1035
|
w.writeVarInt(msg.filter_type);
|
|
1036
1036
|
const ft = msg.filter_type;
|
|
@@ -1047,7 +1047,7 @@ function encodeSubscribeOkPayload(msg, w) {
|
|
|
1047
1047
|
w.writeVarInt(msg.request_id);
|
|
1048
1048
|
w.writeVarInt(msg.track_alias);
|
|
1049
1049
|
w.writeVarInt(msg.expires);
|
|
1050
|
-
w.writeUint8(
|
|
1050
|
+
w.writeUint8(msg.group_order);
|
|
1051
1051
|
w.writeVarInt(msg.content_exists);
|
|
1052
1052
|
if (msg.content_exists === 1n) {
|
|
1053
1053
|
w.writeVarInt(msg.largest_location.group);
|
|
@@ -1061,7 +1061,7 @@ function encodeSubscribeUpdatePayload(msg, w) {
|
|
|
1061
1061
|
w.writeVarInt(msg.start_group);
|
|
1062
1062
|
w.writeVarInt(msg.start_object);
|
|
1063
1063
|
w.writeVarInt(msg.end_group);
|
|
1064
|
-
w.writeUint8(
|
|
1064
|
+
w.writeUint8(msg.subscriber_priority);
|
|
1065
1065
|
w.writeVarInt(msg.forward);
|
|
1066
1066
|
encodeMessageParams(msg.parameters, w);
|
|
1067
1067
|
}
|
|
@@ -1078,7 +1078,7 @@ function encodePublishPayload(msg, w) {
|
|
|
1078
1078
|
w.writeTuple(msg.track_namespace);
|
|
1079
1079
|
w.writeString(msg.track_name);
|
|
1080
1080
|
w.writeVarInt(msg.track_alias);
|
|
1081
|
-
w.writeUint8(
|
|
1081
|
+
w.writeUint8(msg.group_order);
|
|
1082
1082
|
w.writeVarInt(msg.content_exists);
|
|
1083
1083
|
if (msg.content_exists === 1n) {
|
|
1084
1084
|
w.writeVarInt(msg.largest_location.group);
|
|
@@ -1090,8 +1090,8 @@ function encodePublishPayload(msg, w) {
|
|
|
1090
1090
|
function encodePublishOkPayload(msg, w) {
|
|
1091
1091
|
w.writeVarInt(msg.request_id);
|
|
1092
1092
|
w.writeVarInt(msg.forward);
|
|
1093
|
-
w.writeUint8(
|
|
1094
|
-
w.writeUint8(
|
|
1093
|
+
w.writeUint8(msg.subscriber_priority);
|
|
1094
|
+
w.writeUint8(msg.group_order);
|
|
1095
1095
|
w.writeVarInt(msg.filter_type);
|
|
1096
1096
|
const ft = msg.filter_type;
|
|
1097
1097
|
if (ft >= FilterType.AbsoluteStart) {
|
|
@@ -1155,26 +1155,26 @@ function encodeUnsubscribeNamespacePayload(msg, w) {
|
|
|
1155
1155
|
}
|
|
1156
1156
|
function encodeFetchPayload(msg, w) {
|
|
1157
1157
|
w.writeVarInt(msg.request_id);
|
|
1158
|
-
w.writeUint8(
|
|
1159
|
-
w.writeUint8(
|
|
1158
|
+
w.writeUint8(msg.subscriber_priority);
|
|
1159
|
+
w.writeUint8(msg.group_order);
|
|
1160
1160
|
w.writeVarInt(msg.fetch_type);
|
|
1161
1161
|
const ft = msg.fetch_type;
|
|
1162
|
-
if (ft === FetchType.Standalone) {
|
|
1163
|
-
w.writeTuple(msg.track_namespace);
|
|
1164
|
-
w.writeString(msg.track_name);
|
|
1165
|
-
w.writeVarInt(msg.start_group);
|
|
1166
|
-
w.writeVarInt(msg.start_object);
|
|
1167
|
-
w.writeVarInt(msg.end_group);
|
|
1168
|
-
w.writeVarInt(msg.end_object);
|
|
1169
|
-
} else {
|
|
1170
|
-
w.writeVarInt(msg.joining_request_id);
|
|
1171
|
-
w.writeVarInt(msg.joining_start);
|
|
1162
|
+
if (ft === FetchType.Standalone && msg.standalone) {
|
|
1163
|
+
w.writeTuple(msg.standalone.track_namespace);
|
|
1164
|
+
w.writeString(msg.standalone.track_name);
|
|
1165
|
+
w.writeVarInt(msg.standalone.start_group);
|
|
1166
|
+
w.writeVarInt(msg.standalone.start_object);
|
|
1167
|
+
w.writeVarInt(msg.standalone.end_group);
|
|
1168
|
+
w.writeVarInt(msg.standalone.end_object);
|
|
1169
|
+
} else if (msg.joining) {
|
|
1170
|
+
w.writeVarInt(msg.joining.joining_request_id);
|
|
1171
|
+
w.writeVarInt(msg.joining.joining_start);
|
|
1172
1172
|
}
|
|
1173
1173
|
encodeMessageParams(msg.parameters, w);
|
|
1174
1174
|
}
|
|
1175
1175
|
function encodeFetchOkPayload(msg, w) {
|
|
1176
1176
|
w.writeVarInt(msg.request_id);
|
|
1177
|
-
w.writeUint8(
|
|
1177
|
+
w.writeUint8(msg.group_order);
|
|
1178
1178
|
w.writeVarInt(msg.end_of_track);
|
|
1179
1179
|
w.writeVarInt(msg.end_location.group);
|
|
1180
1180
|
w.writeVarInt(msg.end_location.object);
|
|
@@ -1192,8 +1192,8 @@ function encodeTrackStatusPayload(msg, w) {
|
|
|
1192
1192
|
w.writeVarInt(msg.request_id);
|
|
1193
1193
|
w.writeTuple(msg.track_namespace);
|
|
1194
1194
|
w.writeString(msg.track_name);
|
|
1195
|
-
w.writeUint8(
|
|
1196
|
-
w.writeUint8(
|
|
1195
|
+
w.writeUint8(msg.subscriber_priority);
|
|
1196
|
+
w.writeUint8(msg.group_order);
|
|
1197
1197
|
w.writeVarInt(msg.forward);
|
|
1198
1198
|
w.writeVarInt(msg.filter_type);
|
|
1199
1199
|
const ft = msg.filter_type;
|
|
@@ -1207,7 +1207,7 @@ function encodeTrackStatusOkPayload(msg, w) {
|
|
|
1207
1207
|
w.writeVarInt(msg.request_id);
|
|
1208
1208
|
w.writeVarInt(msg.track_alias);
|
|
1209
1209
|
w.writeVarInt(msg.expires);
|
|
1210
|
-
w.writeUint8(
|
|
1210
|
+
w.writeUint8(msg.group_order);
|
|
1211
1211
|
w.writeVarInt(msg.content_exists);
|
|
1212
1212
|
if (msg.content_exists === 1n) {
|
|
1213
1213
|
w.writeVarInt(msg.largest_location.group);
|
|
@@ -1254,8 +1254,8 @@ function decodeSubscribePayload(r) {
|
|
|
1254
1254
|
const request_id = r.readVarInt();
|
|
1255
1255
|
const track_namespace = r.readTuple();
|
|
1256
1256
|
const track_name = r.readString();
|
|
1257
|
-
const subscriber_priority =
|
|
1258
|
-
const group_order =
|
|
1257
|
+
const subscriber_priority = r.readUint8();
|
|
1258
|
+
const group_order = r.readUint8();
|
|
1259
1259
|
const forward = r.readVarInt();
|
|
1260
1260
|
const filter_type = r.readVarInt();
|
|
1261
1261
|
if (filter_type < FilterType.NextGroupStart || filter_type > FilterType.AbsoluteRange) {
|
|
@@ -1292,7 +1292,7 @@ function decodeSubscribeOkPayload(r) {
|
|
|
1292
1292
|
const request_id = r.readVarInt();
|
|
1293
1293
|
const track_alias = r.readVarInt();
|
|
1294
1294
|
const expires = r.readVarInt();
|
|
1295
|
-
const group_order =
|
|
1295
|
+
const group_order = r.readUint8();
|
|
1296
1296
|
const content_exists = r.readVarInt();
|
|
1297
1297
|
let largest_location;
|
|
1298
1298
|
if (content_exists === 1n) {
|
|
@@ -1319,7 +1319,7 @@ function decodeSubscribeUpdatePayload(r) {
|
|
|
1319
1319
|
const start_group = r.readVarInt();
|
|
1320
1320
|
const start_object = r.readVarInt();
|
|
1321
1321
|
const end_group = r.readVarInt();
|
|
1322
|
-
const subscriber_priority =
|
|
1322
|
+
const subscriber_priority = r.readUint8();
|
|
1323
1323
|
const forward = r.readVarInt();
|
|
1324
1324
|
const parameters = decodeMessageParams(r);
|
|
1325
1325
|
return {
|
|
@@ -1349,7 +1349,7 @@ function decodePublishPayload(r) {
|
|
|
1349
1349
|
const track_namespace = r.readTuple();
|
|
1350
1350
|
const track_name = r.readString();
|
|
1351
1351
|
const track_alias = r.readVarInt();
|
|
1352
|
-
const group_order =
|
|
1352
|
+
const group_order = r.readUint8();
|
|
1353
1353
|
const content_exists = r.readVarInt();
|
|
1354
1354
|
let largest_location;
|
|
1355
1355
|
if (content_exists === 1n) {
|
|
@@ -1376,8 +1376,8 @@ function decodePublishPayload(r) {
|
|
|
1376
1376
|
function decodePublishOkPayload(r) {
|
|
1377
1377
|
const request_id = r.readVarInt();
|
|
1378
1378
|
const forward = r.readVarInt();
|
|
1379
|
-
const subscriber_priority =
|
|
1380
|
-
const group_order =
|
|
1379
|
+
const subscriber_priority = r.readUint8();
|
|
1380
|
+
const group_order = r.readUint8();
|
|
1381
1381
|
const filter_type = r.readVarInt();
|
|
1382
1382
|
let start_group;
|
|
1383
1383
|
let start_object;
|
|
@@ -1493,19 +1493,21 @@ function decodeUnsubscribeNamespacePayload(r) {
|
|
|
1493
1493
|
}
|
|
1494
1494
|
function decodeFetchPayload(r) {
|
|
1495
1495
|
const request_id = r.readVarInt();
|
|
1496
|
-
const subscriber_priority =
|
|
1497
|
-
const group_order =
|
|
1496
|
+
const subscriber_priority = r.readUint8();
|
|
1497
|
+
const group_order = r.readUint8();
|
|
1498
1498
|
const fetch_type = r.readVarInt();
|
|
1499
1499
|
if (fetch_type < FetchType.Standalone || fetch_type > FetchType.AbsoluteJoining) {
|
|
1500
1500
|
throw new (0, _chunk4XLYCT5Qcjs.DecodeError)("CONSTRAINT_VIOLATION", `Invalid fetch_type: ${fetch_type}`, r.offset);
|
|
1501
1501
|
}
|
|
1502
1502
|
if (fetch_type === FetchType.Standalone) {
|
|
1503
|
-
const
|
|
1504
|
-
|
|
1505
|
-
|
|
1506
|
-
|
|
1507
|
-
|
|
1508
|
-
|
|
1503
|
+
const standalone = {
|
|
1504
|
+
track_namespace: r.readTuple(),
|
|
1505
|
+
track_name: r.readString(),
|
|
1506
|
+
start_group: r.readVarInt(),
|
|
1507
|
+
start_object: r.readVarInt(),
|
|
1508
|
+
end_group: r.readVarInt(),
|
|
1509
|
+
end_object: r.readVarInt()
|
|
1510
|
+
};
|
|
1509
1511
|
const parameters = decodeMessageParams(r);
|
|
1510
1512
|
return {
|
|
1511
1513
|
type: "fetch",
|
|
@@ -1513,17 +1515,14 @@ function decodeFetchPayload(r) {
|
|
|
1513
1515
|
subscriber_priority,
|
|
1514
1516
|
group_order,
|
|
1515
1517
|
fetch_type,
|
|
1516
|
-
|
|
1517
|
-
track_name,
|
|
1518
|
-
start_group,
|
|
1519
|
-
start_object,
|
|
1520
|
-
end_group,
|
|
1521
|
-
end_object,
|
|
1518
|
+
standalone,
|
|
1522
1519
|
parameters
|
|
1523
1520
|
};
|
|
1524
1521
|
} else {
|
|
1525
|
-
const
|
|
1526
|
-
|
|
1522
|
+
const joining = {
|
|
1523
|
+
joining_request_id: r.readVarInt(),
|
|
1524
|
+
joining_start: r.readVarInt()
|
|
1525
|
+
};
|
|
1527
1526
|
const parameters = decodeMessageParams(r);
|
|
1528
1527
|
return {
|
|
1529
1528
|
type: "fetch",
|
|
@@ -1531,15 +1530,14 @@ function decodeFetchPayload(r) {
|
|
|
1531
1530
|
subscriber_priority,
|
|
1532
1531
|
group_order,
|
|
1533
1532
|
fetch_type,
|
|
1534
|
-
|
|
1535
|
-
joining_start,
|
|
1533
|
+
joining,
|
|
1536
1534
|
parameters
|
|
1537
1535
|
};
|
|
1538
1536
|
}
|
|
1539
1537
|
}
|
|
1540
1538
|
function decodeFetchOkPayload(r) {
|
|
1541
1539
|
const request_id = r.readVarInt();
|
|
1542
|
-
const group_order =
|
|
1540
|
+
const group_order = r.readUint8();
|
|
1543
1541
|
const end_of_track = r.readVarInt();
|
|
1544
1542
|
const end_location = {
|
|
1545
1543
|
group: r.readVarInt(),
|
|
@@ -1569,8 +1567,8 @@ function decodeTrackStatusPayload(r) {
|
|
|
1569
1567
|
const request_id = r.readVarInt();
|
|
1570
1568
|
const track_namespace = r.readTuple();
|
|
1571
1569
|
const track_name = r.readString();
|
|
1572
|
-
const subscriber_priority =
|
|
1573
|
-
const group_order =
|
|
1570
|
+
const subscriber_priority = r.readUint8();
|
|
1571
|
+
const group_order = r.readUint8();
|
|
1574
1572
|
const forward = r.readVarInt();
|
|
1575
1573
|
const filter_type = r.readVarInt();
|
|
1576
1574
|
let start_group;
|
|
@@ -1599,7 +1597,7 @@ function decodeTrackStatusOkPayload(r) {
|
|
|
1599
1597
|
const request_id = r.readVarInt();
|
|
1600
1598
|
const track_alias = r.readVarInt();
|
|
1601
1599
|
const expires = r.readVarInt();
|
|
1602
|
-
const group_order =
|
|
1600
|
+
const group_order = r.readUint8();
|
|
1603
1601
|
const content_exists = r.readVarInt();
|
|
1604
1602
|
let largest_location;
|
|
1605
1603
|
if (content_exists === 1n) {
|
|
@@ -1029,8 +1029,8 @@ function encodeSubscribePayload(msg, w) {
|
|
|
1029
1029
|
w.writeVarInt(msg.request_id);
|
|
1030
1030
|
w.writeTuple(msg.track_namespace);
|
|
1031
1031
|
w.writeString(msg.track_name);
|
|
1032
|
-
w.writeUint8(
|
|
1033
|
-
w.writeUint8(
|
|
1032
|
+
w.writeUint8(msg.subscriber_priority);
|
|
1033
|
+
w.writeUint8(msg.group_order);
|
|
1034
1034
|
w.writeVarInt(msg.forward);
|
|
1035
1035
|
w.writeVarInt(msg.filter_type);
|
|
1036
1036
|
const ft = msg.filter_type;
|
|
@@ -1047,7 +1047,7 @@ function encodeSubscribeOkPayload(msg, w) {
|
|
|
1047
1047
|
w.writeVarInt(msg.request_id);
|
|
1048
1048
|
w.writeVarInt(msg.track_alias);
|
|
1049
1049
|
w.writeVarInt(msg.expires);
|
|
1050
|
-
w.writeUint8(
|
|
1050
|
+
w.writeUint8(msg.group_order);
|
|
1051
1051
|
w.writeVarInt(msg.content_exists);
|
|
1052
1052
|
if (msg.content_exists === 1n) {
|
|
1053
1053
|
w.writeVarInt(msg.largest_location.group);
|
|
@@ -1061,7 +1061,7 @@ function encodeSubscribeUpdatePayload(msg, w) {
|
|
|
1061
1061
|
w.writeVarInt(msg.start_group);
|
|
1062
1062
|
w.writeVarInt(msg.start_object);
|
|
1063
1063
|
w.writeVarInt(msg.end_group);
|
|
1064
|
-
w.writeUint8(
|
|
1064
|
+
w.writeUint8(msg.subscriber_priority);
|
|
1065
1065
|
w.writeVarInt(msg.forward);
|
|
1066
1066
|
encodeMessageParams(msg.parameters, w);
|
|
1067
1067
|
}
|
|
@@ -1078,7 +1078,7 @@ function encodePublishPayload(msg, w) {
|
|
|
1078
1078
|
w.writeTuple(msg.track_namespace);
|
|
1079
1079
|
w.writeString(msg.track_name);
|
|
1080
1080
|
w.writeVarInt(msg.track_alias);
|
|
1081
|
-
w.writeUint8(
|
|
1081
|
+
w.writeUint8(msg.group_order);
|
|
1082
1082
|
w.writeVarInt(msg.content_exists);
|
|
1083
1083
|
if (msg.content_exists === 1n) {
|
|
1084
1084
|
w.writeVarInt(msg.largest_location.group);
|
|
@@ -1090,8 +1090,8 @@ function encodePublishPayload(msg, w) {
|
|
|
1090
1090
|
function encodePublishOkPayload(msg, w) {
|
|
1091
1091
|
w.writeVarInt(msg.request_id);
|
|
1092
1092
|
w.writeVarInt(msg.forward);
|
|
1093
|
-
w.writeUint8(
|
|
1094
|
-
w.writeUint8(
|
|
1093
|
+
w.writeUint8(msg.subscriber_priority);
|
|
1094
|
+
w.writeUint8(msg.group_order);
|
|
1095
1095
|
w.writeVarInt(msg.filter_type);
|
|
1096
1096
|
const ft = msg.filter_type;
|
|
1097
1097
|
if (ft >= FilterType.AbsoluteStart) {
|
|
@@ -1155,26 +1155,26 @@ function encodeUnsubscribeNamespacePayload(msg, w) {
|
|
|
1155
1155
|
}
|
|
1156
1156
|
function encodeFetchPayload(msg, w) {
|
|
1157
1157
|
w.writeVarInt(msg.request_id);
|
|
1158
|
-
w.writeUint8(
|
|
1159
|
-
w.writeUint8(
|
|
1158
|
+
w.writeUint8(msg.subscriber_priority);
|
|
1159
|
+
w.writeUint8(msg.group_order);
|
|
1160
1160
|
w.writeVarInt(msg.fetch_type);
|
|
1161
1161
|
const ft = msg.fetch_type;
|
|
1162
|
-
if (ft === FetchType.Standalone) {
|
|
1163
|
-
w.writeTuple(msg.track_namespace);
|
|
1164
|
-
w.writeString(msg.track_name);
|
|
1165
|
-
w.writeVarInt(msg.start_group);
|
|
1166
|
-
w.writeVarInt(msg.start_object);
|
|
1167
|
-
w.writeVarInt(msg.end_group);
|
|
1168
|
-
w.writeVarInt(msg.end_object);
|
|
1169
|
-
} else {
|
|
1170
|
-
w.writeVarInt(msg.joining_request_id);
|
|
1171
|
-
w.writeVarInt(msg.joining_start);
|
|
1162
|
+
if (ft === FetchType.Standalone && msg.standalone) {
|
|
1163
|
+
w.writeTuple(msg.standalone.track_namespace);
|
|
1164
|
+
w.writeString(msg.standalone.track_name);
|
|
1165
|
+
w.writeVarInt(msg.standalone.start_group);
|
|
1166
|
+
w.writeVarInt(msg.standalone.start_object);
|
|
1167
|
+
w.writeVarInt(msg.standalone.end_group);
|
|
1168
|
+
w.writeVarInt(msg.standalone.end_object);
|
|
1169
|
+
} else if (msg.joining) {
|
|
1170
|
+
w.writeVarInt(msg.joining.joining_request_id);
|
|
1171
|
+
w.writeVarInt(msg.joining.joining_start);
|
|
1172
1172
|
}
|
|
1173
1173
|
encodeMessageParams(msg.parameters, w);
|
|
1174
1174
|
}
|
|
1175
1175
|
function encodeFetchOkPayload(msg, w) {
|
|
1176
1176
|
w.writeVarInt(msg.request_id);
|
|
1177
|
-
w.writeUint8(
|
|
1177
|
+
w.writeUint8(msg.group_order);
|
|
1178
1178
|
w.writeVarInt(msg.end_of_track);
|
|
1179
1179
|
w.writeVarInt(msg.end_location.group);
|
|
1180
1180
|
w.writeVarInt(msg.end_location.object);
|
|
@@ -1192,8 +1192,8 @@ function encodeTrackStatusPayload(msg, w) {
|
|
|
1192
1192
|
w.writeVarInt(msg.request_id);
|
|
1193
1193
|
w.writeTuple(msg.track_namespace);
|
|
1194
1194
|
w.writeString(msg.track_name);
|
|
1195
|
-
w.writeUint8(
|
|
1196
|
-
w.writeUint8(
|
|
1195
|
+
w.writeUint8(msg.subscriber_priority);
|
|
1196
|
+
w.writeUint8(msg.group_order);
|
|
1197
1197
|
w.writeVarInt(msg.forward);
|
|
1198
1198
|
w.writeVarInt(msg.filter_type);
|
|
1199
1199
|
const ft = msg.filter_type;
|
|
@@ -1207,7 +1207,7 @@ function encodeTrackStatusOkPayload(msg, w) {
|
|
|
1207
1207
|
w.writeVarInt(msg.request_id);
|
|
1208
1208
|
w.writeVarInt(msg.track_alias);
|
|
1209
1209
|
w.writeVarInt(msg.expires);
|
|
1210
|
-
w.writeUint8(
|
|
1210
|
+
w.writeUint8(msg.group_order);
|
|
1211
1211
|
w.writeVarInt(msg.content_exists);
|
|
1212
1212
|
if (msg.content_exists === 1n) {
|
|
1213
1213
|
w.writeVarInt(msg.largest_location.group);
|
|
@@ -1254,8 +1254,8 @@ function decodeSubscribePayload(r) {
|
|
|
1254
1254
|
const request_id = r.readVarInt();
|
|
1255
1255
|
const track_namespace = r.readTuple();
|
|
1256
1256
|
const track_name = r.readString();
|
|
1257
|
-
const subscriber_priority =
|
|
1258
|
-
const group_order =
|
|
1257
|
+
const subscriber_priority = r.readUint8();
|
|
1258
|
+
const group_order = r.readUint8();
|
|
1259
1259
|
const forward = r.readVarInt();
|
|
1260
1260
|
const filter_type = r.readVarInt();
|
|
1261
1261
|
if (filter_type < FilterType.NextGroupStart || filter_type > FilterType.AbsoluteRange) {
|
|
@@ -1292,7 +1292,7 @@ function decodeSubscribeOkPayload(r) {
|
|
|
1292
1292
|
const request_id = r.readVarInt();
|
|
1293
1293
|
const track_alias = r.readVarInt();
|
|
1294
1294
|
const expires = r.readVarInt();
|
|
1295
|
-
const group_order =
|
|
1295
|
+
const group_order = r.readUint8();
|
|
1296
1296
|
const content_exists = r.readVarInt();
|
|
1297
1297
|
let largest_location;
|
|
1298
1298
|
if (content_exists === 1n) {
|
|
@@ -1319,7 +1319,7 @@ function decodeSubscribeUpdatePayload(r) {
|
|
|
1319
1319
|
const start_group = r.readVarInt();
|
|
1320
1320
|
const start_object = r.readVarInt();
|
|
1321
1321
|
const end_group = r.readVarInt();
|
|
1322
|
-
const subscriber_priority =
|
|
1322
|
+
const subscriber_priority = r.readUint8();
|
|
1323
1323
|
const forward = r.readVarInt();
|
|
1324
1324
|
const parameters = decodeMessageParams(r);
|
|
1325
1325
|
return {
|
|
@@ -1349,7 +1349,7 @@ function decodePublishPayload(r) {
|
|
|
1349
1349
|
const track_namespace = r.readTuple();
|
|
1350
1350
|
const track_name = r.readString();
|
|
1351
1351
|
const track_alias = r.readVarInt();
|
|
1352
|
-
const group_order =
|
|
1352
|
+
const group_order = r.readUint8();
|
|
1353
1353
|
const content_exists = r.readVarInt();
|
|
1354
1354
|
let largest_location;
|
|
1355
1355
|
if (content_exists === 1n) {
|
|
@@ -1376,8 +1376,8 @@ function decodePublishPayload(r) {
|
|
|
1376
1376
|
function decodePublishOkPayload(r) {
|
|
1377
1377
|
const request_id = r.readVarInt();
|
|
1378
1378
|
const forward = r.readVarInt();
|
|
1379
|
-
const subscriber_priority =
|
|
1380
|
-
const group_order =
|
|
1379
|
+
const subscriber_priority = r.readUint8();
|
|
1380
|
+
const group_order = r.readUint8();
|
|
1381
1381
|
const filter_type = r.readVarInt();
|
|
1382
1382
|
let start_group;
|
|
1383
1383
|
let start_object;
|
|
@@ -1493,19 +1493,21 @@ function decodeUnsubscribeNamespacePayload(r) {
|
|
|
1493
1493
|
}
|
|
1494
1494
|
function decodeFetchPayload(r) {
|
|
1495
1495
|
const request_id = r.readVarInt();
|
|
1496
|
-
const subscriber_priority =
|
|
1497
|
-
const group_order =
|
|
1496
|
+
const subscriber_priority = r.readUint8();
|
|
1497
|
+
const group_order = r.readUint8();
|
|
1498
1498
|
const fetch_type = r.readVarInt();
|
|
1499
1499
|
if (fetch_type < FetchType.Standalone || fetch_type > FetchType.AbsoluteJoining) {
|
|
1500
1500
|
throw new DecodeError("CONSTRAINT_VIOLATION", `Invalid fetch_type: ${fetch_type}`, r.offset);
|
|
1501
1501
|
}
|
|
1502
1502
|
if (fetch_type === FetchType.Standalone) {
|
|
1503
|
-
const
|
|
1504
|
-
|
|
1505
|
-
|
|
1506
|
-
|
|
1507
|
-
|
|
1508
|
-
|
|
1503
|
+
const standalone = {
|
|
1504
|
+
track_namespace: r.readTuple(),
|
|
1505
|
+
track_name: r.readString(),
|
|
1506
|
+
start_group: r.readVarInt(),
|
|
1507
|
+
start_object: r.readVarInt(),
|
|
1508
|
+
end_group: r.readVarInt(),
|
|
1509
|
+
end_object: r.readVarInt()
|
|
1510
|
+
};
|
|
1509
1511
|
const parameters = decodeMessageParams(r);
|
|
1510
1512
|
return {
|
|
1511
1513
|
type: "fetch",
|
|
@@ -1513,17 +1515,14 @@ function decodeFetchPayload(r) {
|
|
|
1513
1515
|
subscriber_priority,
|
|
1514
1516
|
group_order,
|
|
1515
1517
|
fetch_type,
|
|
1516
|
-
|
|
1517
|
-
track_name,
|
|
1518
|
-
start_group,
|
|
1519
|
-
start_object,
|
|
1520
|
-
end_group,
|
|
1521
|
-
end_object,
|
|
1518
|
+
standalone,
|
|
1522
1519
|
parameters
|
|
1523
1520
|
};
|
|
1524
1521
|
} else {
|
|
1525
|
-
const
|
|
1526
|
-
|
|
1522
|
+
const joining = {
|
|
1523
|
+
joining_request_id: r.readVarInt(),
|
|
1524
|
+
joining_start: r.readVarInt()
|
|
1525
|
+
};
|
|
1527
1526
|
const parameters = decodeMessageParams(r);
|
|
1528
1527
|
return {
|
|
1529
1528
|
type: "fetch",
|
|
@@ -1531,15 +1530,14 @@ function decodeFetchPayload(r) {
|
|
|
1531
1530
|
subscriber_priority,
|
|
1532
1531
|
group_order,
|
|
1533
1532
|
fetch_type,
|
|
1534
|
-
|
|
1535
|
-
joining_start,
|
|
1533
|
+
joining,
|
|
1536
1534
|
parameters
|
|
1537
1535
|
};
|
|
1538
1536
|
}
|
|
1539
1537
|
}
|
|
1540
1538
|
function decodeFetchOkPayload(r) {
|
|
1541
1539
|
const request_id = r.readVarInt();
|
|
1542
|
-
const group_order =
|
|
1540
|
+
const group_order = r.readUint8();
|
|
1543
1541
|
const end_of_track = r.readVarInt();
|
|
1544
1542
|
const end_location = {
|
|
1545
1543
|
group: r.readVarInt(),
|
|
@@ -1569,8 +1567,8 @@ function decodeTrackStatusPayload(r) {
|
|
|
1569
1567
|
const request_id = r.readVarInt();
|
|
1570
1568
|
const track_namespace = r.readTuple();
|
|
1571
1569
|
const track_name = r.readString();
|
|
1572
|
-
const subscriber_priority =
|
|
1573
|
-
const group_order =
|
|
1570
|
+
const subscriber_priority = r.readUint8();
|
|
1571
|
+
const group_order = r.readUint8();
|
|
1574
1572
|
const forward = r.readVarInt();
|
|
1575
1573
|
const filter_type = r.readVarInt();
|
|
1576
1574
|
let start_group;
|
|
@@ -1599,7 +1597,7 @@ function decodeTrackStatusOkPayload(r) {
|
|
|
1599
1597
|
const request_id = r.readVarInt();
|
|
1600
1598
|
const track_alias = r.readVarInt();
|
|
1601
1599
|
const expires = r.readVarInt();
|
|
1602
|
-
const group_order =
|
|
1600
|
+
const group_order = r.readUint8();
|
|
1603
1601
|
const content_exists = r.readVarInt();
|
|
1604
1602
|
let largest_location;
|
|
1605
1603
|
if (content_exists === 1n) {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { B as BaseCodec, b as DecodeResult } from './types-CdCSIfvI.cjs';
|
|
2
|
-
import { D as Draft14Message, f as SubgroupStream, d as DatagramObject, e as FetchStream, c as Draft14DataStream, S as SubgroupStreamHeader, O as ObjectPayload, F as FetchStreamHeader, b as DataStreamEvent } from './types-
|
|
2
|
+
import { D as Draft14Message, f as SubgroupStream, d as DatagramObject, e as FetchStream, c as Draft14DataStream, S as SubgroupStreamHeader, O as ObjectPayload, F as FetchStreamHeader, b as DataStreamEvent } from './types-CVeKIk7A.cjs';
|
|
3
3
|
|
|
4
4
|
/**
|
|
5
5
|
* Encode a draft-14 control message with type(varint) + length(uint16 BE) + payload.
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { B as BaseCodec, b as DecodeResult } from './types-CdCSIfvI.js';
|
|
2
|
-
import { D as Draft14Message, f as SubgroupStream, d as DatagramObject, e as FetchStream, c as Draft14DataStream, S as SubgroupStreamHeader, O as ObjectPayload, F as FetchStreamHeader, b as DataStreamEvent } from './types-
|
|
2
|
+
import { D as Draft14Message, f as SubgroupStream, d as DatagramObject, e as FetchStream, c as Draft14DataStream, S as SubgroupStreamHeader, O as ObjectPayload, F as FetchStreamHeader, b as DataStreamEvent } from './types-CVeKIk7A.js';
|
|
3
3
|
|
|
4
4
|
/**
|
|
5
5
|
* Encode a draft-14 control message with type(varint) + length(uint16 BE) + payload.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { k as SessionStateOptionsRole, a as SessionState } from './session-types-KsqyVp6y.cjs';
|
|
2
2
|
export { F as FetchPhase, c as FetchState, P as ProtocolViolation, d as ProtocolViolationCode, e as PublishPhase, f as PublishState, g as SessionPhase, h as SideEffect, i as SubscriptionPhase, j as SubscriptionState, T as TransitionResult, V as ValidationResult } from './session-types-KsqyVp6y.cjs';
|
|
3
|
-
import { D as Draft14Message, a as Draft14MessageType } from './types-
|
|
3
|
+
import { D as Draft14Message, a as Draft14MessageType } from './types-CVeKIk7A.cjs';
|
|
4
4
|
import './types-CdCSIfvI.cjs';
|
|
5
5
|
|
|
6
6
|
declare function createDraft14SessionState(role: SessionStateOptionsRole): SessionState<Draft14Message, Draft14MessageType>;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { k as SessionStateOptionsRole, a as SessionState } from './session-types-C0l_-Ups.js';
|
|
2
2
|
export { F as FetchPhase, c as FetchState, P as ProtocolViolation, d as ProtocolViolationCode, e as PublishPhase, f as PublishState, g as SessionPhase, h as SideEffect, i as SubscriptionPhase, j as SubscriptionState, T as TransitionResult, V as ValidationResult } from './session-types-C0l_-Ups.js';
|
|
3
|
-
import { D as Draft14Message, a as Draft14MessageType } from './types-
|
|
3
|
+
import { D as Draft14Message, a as Draft14MessageType } from './types-CVeKIk7A.js';
|
|
4
4
|
import './types-CdCSIfvI.js';
|
|
5
5
|
|
|
6
6
|
declare function createDraft14SessionState(role: SessionStateOptionsRole): SessionState<Draft14Message, Draft14MessageType>;
|
package/dist/draft14.cjs
CHANGED
|
@@ -52,7 +52,7 @@
|
|
|
52
52
|
|
|
53
53
|
|
|
54
54
|
|
|
55
|
-
var
|
|
55
|
+
var _chunkBQHLUT37cjs = require('./chunk-BQHLUT37.cjs');
|
|
56
56
|
|
|
57
57
|
|
|
58
58
|
|
|
@@ -130,4 +130,4 @@ var DRAFT_VERSION = 0xff00000en;
|
|
|
130
130
|
|
|
131
131
|
|
|
132
132
|
|
|
133
|
-
exports.BIDIRECTIONAL_MESSAGES = _chunkE65QKRSNcjs.BIDIRECTIONAL_MESSAGES; exports.CLIENT_ONLY_MESSAGES = _chunkE65QKRSNcjs.CLIENT_ONLY_MESSAGES; exports.CONTROL_MESSAGES = _chunkE65QKRSNcjs.CONTROL_MESSAGES; exports.DRAFT_VERSION = DRAFT_VERSION; exports.Draft14SessionFSM = _chunkE65QKRSNcjs.Draft14SessionFSM; exports.FetchType =
|
|
133
|
+
exports.BIDIRECTIONAL_MESSAGES = _chunkE65QKRSNcjs.BIDIRECTIONAL_MESSAGES; exports.CLIENT_ONLY_MESSAGES = _chunkE65QKRSNcjs.CLIENT_ONLY_MESSAGES; exports.CONTROL_MESSAGES = _chunkE65QKRSNcjs.CONTROL_MESSAGES; exports.DRAFT_VERSION = DRAFT_VERSION; exports.Draft14SessionFSM = _chunkE65QKRSNcjs.Draft14SessionFSM; exports.FetchType = _chunkBQHLUT37cjs.FetchType; exports.FilterType = _chunkBQHLUT37cjs.FilterType; exports.GroupOrder = _chunkBQHLUT37cjs.GroupOrder; exports.MESSAGE_ID_MAP = _chunkBQHLUT37cjs.MESSAGE_ID_MAP; exports.MESSAGE_TYPE_MAP = _chunkBQHLUT37cjs.MESSAGE_TYPE_MAP; exports.MSG_CLIENT_SETUP = _chunkBQHLUT37cjs.MSG_CLIENT_SETUP; exports.MSG_FETCH = _chunkBQHLUT37cjs.MSG_FETCH; exports.MSG_FETCH_CANCEL = _chunkBQHLUT37cjs.MSG_FETCH_CANCEL; exports.MSG_FETCH_ERROR = _chunkBQHLUT37cjs.MSG_FETCH_ERROR; exports.MSG_FETCH_OK = _chunkBQHLUT37cjs.MSG_FETCH_OK; exports.MSG_GOAWAY = _chunkBQHLUT37cjs.MSG_GOAWAY; exports.MSG_MAX_REQUEST_ID = _chunkBQHLUT37cjs.MSG_MAX_REQUEST_ID; exports.MSG_PUBLISH = _chunkBQHLUT37cjs.MSG_PUBLISH; exports.MSG_PUBLISH_DONE = _chunkBQHLUT37cjs.MSG_PUBLISH_DONE; exports.MSG_PUBLISH_ERROR = _chunkBQHLUT37cjs.MSG_PUBLISH_ERROR; exports.MSG_PUBLISH_NAMESPACE = _chunkBQHLUT37cjs.MSG_PUBLISH_NAMESPACE; exports.MSG_PUBLISH_NAMESPACE_CANCEL = _chunkBQHLUT37cjs.MSG_PUBLISH_NAMESPACE_CANCEL; exports.MSG_PUBLISH_NAMESPACE_DONE = _chunkBQHLUT37cjs.MSG_PUBLISH_NAMESPACE_DONE; exports.MSG_PUBLISH_NAMESPACE_ERROR = _chunkBQHLUT37cjs.MSG_PUBLISH_NAMESPACE_ERROR; exports.MSG_PUBLISH_NAMESPACE_OK = _chunkBQHLUT37cjs.MSG_PUBLISH_NAMESPACE_OK; exports.MSG_PUBLISH_OK = _chunkBQHLUT37cjs.MSG_PUBLISH_OK; exports.MSG_REQUESTS_BLOCKED = _chunkBQHLUT37cjs.MSG_REQUESTS_BLOCKED; exports.MSG_SERVER_SETUP = _chunkBQHLUT37cjs.MSG_SERVER_SETUP; exports.MSG_SUBSCRIBE = _chunkBQHLUT37cjs.MSG_SUBSCRIBE; exports.MSG_SUBSCRIBE_ERROR = _chunkBQHLUT37cjs.MSG_SUBSCRIBE_ERROR; exports.MSG_SUBSCRIBE_NAMESPACE = _chunkBQHLUT37cjs.MSG_SUBSCRIBE_NAMESPACE; exports.MSG_SUBSCRIBE_NAMESPACE_ERROR = _chunkBQHLUT37cjs.MSG_SUBSCRIBE_NAMESPACE_ERROR; exports.MSG_SUBSCRIBE_NAMESPACE_OK = _chunkBQHLUT37cjs.MSG_SUBSCRIBE_NAMESPACE_OK; exports.MSG_SUBSCRIBE_OK = _chunkBQHLUT37cjs.MSG_SUBSCRIBE_OK; exports.MSG_SUBSCRIBE_UPDATE = _chunkBQHLUT37cjs.MSG_SUBSCRIBE_UPDATE; exports.MSG_TRACK_STATUS = _chunkBQHLUT37cjs.MSG_TRACK_STATUS; exports.MSG_TRACK_STATUS_ERROR = _chunkBQHLUT37cjs.MSG_TRACK_STATUS_ERROR; exports.MSG_TRACK_STATUS_OK = _chunkBQHLUT37cjs.MSG_TRACK_STATUS_OK; exports.MSG_UNSUBSCRIBE = _chunkBQHLUT37cjs.MSG_UNSUBSCRIBE; exports.MSG_UNSUBSCRIBE_NAMESPACE = _chunkBQHLUT37cjs.MSG_UNSUBSCRIBE_NAMESPACE; exports.PARAM_MAX_REQUEST_ID = _chunkBQHLUT37cjs.PARAM_MAX_REQUEST_ID; exports.PARAM_MOQT_IMPLEMENTATION = _chunkBQHLUT37cjs.PARAM_MOQT_IMPLEMENTATION; exports.PARAM_PATH = _chunkBQHLUT37cjs.PARAM_PATH; exports.PARAM_ROLE = _chunkBQHLUT37cjs.PARAM_ROLE; exports.SERVER_ONLY_MESSAGES = _chunkE65QKRSNcjs.SERVER_ONLY_MESSAGES; exports.createDataStreamDecoder = _chunkBQHLUT37cjs.createDataStreamDecoder; exports.createDraft14Codec = _chunkBQHLUT37cjs.createDraft14Codec; exports.createDraft14SessionState = _chunkE65QKRSNcjs.createDraft14SessionState; exports.createFetchStreamDecoder = _chunkBQHLUT37cjs.createFetchStreamDecoder; exports.createStreamDecoder = _chunkBQHLUT37cjs.createStreamDecoder; exports.createSubgroupStreamDecoder = _chunkBQHLUT37cjs.createSubgroupStreamDecoder; exports.decodeDataStream = _chunkBQHLUT37cjs.decodeDataStream; exports.decodeDatagram = _chunkBQHLUT37cjs.decodeDatagram; exports.decodeFetchStream = _chunkBQHLUT37cjs.decodeFetchStream; exports.decodeMessage = _chunkBQHLUT37cjs.decodeMessage; exports.decodeSubgroupStream = _chunkBQHLUT37cjs.decodeSubgroupStream; exports.encodeDatagram = _chunkBQHLUT37cjs.encodeDatagram; exports.encodeFetchStream = _chunkBQHLUT37cjs.encodeFetchStream; exports.encodeMessage = _chunkBQHLUT37cjs.encodeMessage; exports.encodeSubgroupStream = _chunkBQHLUT37cjs.encodeSubgroupStream; exports.getLegalIncoming = _chunkE65QKRSNcjs.getLegalIncoming; exports.getLegalOutgoing = _chunkE65QKRSNcjs.getLegalOutgoing;
|
package/dist/draft14.d.cts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
export { D as Draft14Codec, c as createDraft14Codec, a as createStreamDecoder, d as decodeMessage, e as encodeMessage } from './codec-
|
|
2
|
-
import { b as DataStreamEvent, F as FetchStreamHeader, O as ObjectPayload, S as SubgroupStreamHeader, c as Draft14DataStream, d as DatagramObject, e as FetchStream, f as SubgroupStream, a as Draft14MessageType, D as Draft14Message } from './types-
|
|
3
|
-
export { A as AuthorizationToken, g as DataStreamHeader, h as Draft14BaseMessage, i as Draft14ClientSetup, j as Draft14Fetch, k as Draft14FetchCancel, l as Draft14FetchError, m as Draft14FetchOk, n as Draft14GoAway, o as Draft14MaxRequestId, p as Draft14Params, q as Draft14Publish, r as Draft14PublishDone, s as Draft14PublishError, t as Draft14PublishNamespace, u as Draft14PublishNamespaceCancel, v as Draft14PublishNamespaceDone, w as Draft14PublishNamespaceError, x as Draft14PublishNamespaceOk, y as Draft14PublishOk, z as Draft14RequestsBlocked, B as Draft14ServerSetup, C as Draft14Subscribe, E as Draft14SubscribeError, G as Draft14SubscribeNamespace, H as Draft14SubscribeNamespaceError, I as Draft14SubscribeNamespaceOk, J as Draft14SubscribeOk, K as Draft14SubscribeUpdate, L as Draft14TrackStatus, M as Draft14TrackStatusError, N as Draft14TrackStatusOk, P as Draft14Unsubscribe, Q as Draft14UnsubscribeNamespace, R as FetchObjectPayload, T as FetchType, U as FetchTypeValue, V as FilterType, W as FilterTypeValue, X as GroupOrder, Y as GroupOrderValue, Z as Location, _ as UnknownParam } from './types-
|
|
1
|
+
export { D as Draft14Codec, c as createDraft14Codec, a as createStreamDecoder, d as decodeMessage, e as encodeMessage } from './codec-BnamSx7L.cjs';
|
|
2
|
+
import { b as DataStreamEvent, F as FetchStreamHeader, O as ObjectPayload, S as SubgroupStreamHeader, c as Draft14DataStream, d as DatagramObject, e as FetchStream, f as SubgroupStream, a as Draft14MessageType, D as Draft14Message } from './types-CVeKIk7A.cjs';
|
|
3
|
+
export { A as AuthorizationToken, g as DataStreamHeader, h as Draft14BaseMessage, i as Draft14ClientSetup, j as Draft14Fetch, k as Draft14FetchCancel, l as Draft14FetchError, m as Draft14FetchOk, n as Draft14GoAway, o as Draft14MaxRequestId, p as Draft14Params, q as Draft14Publish, r as Draft14PublishDone, s as Draft14PublishError, t as Draft14PublishNamespace, u as Draft14PublishNamespaceCancel, v as Draft14PublishNamespaceDone, w as Draft14PublishNamespaceError, x as Draft14PublishNamespaceOk, y as Draft14PublishOk, z as Draft14RequestsBlocked, B as Draft14ServerSetup, C as Draft14Subscribe, E as Draft14SubscribeError, G as Draft14SubscribeNamespace, H as Draft14SubscribeNamespaceError, I as Draft14SubscribeNamespaceOk, J as Draft14SubscribeOk, K as Draft14SubscribeUpdate, L as Draft14TrackStatus, M as Draft14TrackStatusError, N as Draft14TrackStatusOk, P as Draft14Unsubscribe, Q as Draft14UnsubscribeNamespace, R as FetchObjectPayload, T as FetchType, U as FetchTypeValue, V as FilterType, W as FilterTypeValue, X as GroupOrder, Y as GroupOrderValue, Z as Location, _ as UnknownParam } from './types-CVeKIk7A.cjs';
|
|
4
4
|
export { createDraft14SessionState } from './draft14-session.cjs';
|
|
5
5
|
import { g as SessionPhase, j as SubscriptionState, b as AnnounceState, f as PublishState, c as FetchState, V as ValidationResult, T as TransitionResult } from './session-types-KsqyVp6y.cjs';
|
|
6
6
|
export { F as FetchPhase, P as ProtocolViolation, d as ProtocolViolationCode, e as PublishPhase, a as SessionState, h as SideEffect, i as SubscriptionPhase } from './session-types-KsqyVp6y.cjs';
|
package/dist/draft14.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
export { D as Draft14Codec, c as createDraft14Codec, a as createStreamDecoder, d as decodeMessage, e as encodeMessage } from './codec-
|
|
2
|
-
import { b as DataStreamEvent, F as FetchStreamHeader, O as ObjectPayload, S as SubgroupStreamHeader, c as Draft14DataStream, d as DatagramObject, e as FetchStream, f as SubgroupStream, a as Draft14MessageType, D as Draft14Message } from './types-
|
|
3
|
-
export { A as AuthorizationToken, g as DataStreamHeader, h as Draft14BaseMessage, i as Draft14ClientSetup, j as Draft14Fetch, k as Draft14FetchCancel, l as Draft14FetchError, m as Draft14FetchOk, n as Draft14GoAway, o as Draft14MaxRequestId, p as Draft14Params, q as Draft14Publish, r as Draft14PublishDone, s as Draft14PublishError, t as Draft14PublishNamespace, u as Draft14PublishNamespaceCancel, v as Draft14PublishNamespaceDone, w as Draft14PublishNamespaceError, x as Draft14PublishNamespaceOk, y as Draft14PublishOk, z as Draft14RequestsBlocked, B as Draft14ServerSetup, C as Draft14Subscribe, E as Draft14SubscribeError, G as Draft14SubscribeNamespace, H as Draft14SubscribeNamespaceError, I as Draft14SubscribeNamespaceOk, J as Draft14SubscribeOk, K as Draft14SubscribeUpdate, L as Draft14TrackStatus, M as Draft14TrackStatusError, N as Draft14TrackStatusOk, P as Draft14Unsubscribe, Q as Draft14UnsubscribeNamespace, R as FetchObjectPayload, T as FetchType, U as FetchTypeValue, V as FilterType, W as FilterTypeValue, X as GroupOrder, Y as GroupOrderValue, Z as Location, _ as UnknownParam } from './types-
|
|
1
|
+
export { D as Draft14Codec, c as createDraft14Codec, a as createStreamDecoder, d as decodeMessage, e as encodeMessage } from './codec-CFhUGTu2.js';
|
|
2
|
+
import { b as DataStreamEvent, F as FetchStreamHeader, O as ObjectPayload, S as SubgroupStreamHeader, c as Draft14DataStream, d as DatagramObject, e as FetchStream, f as SubgroupStream, a as Draft14MessageType, D as Draft14Message } from './types-CVeKIk7A.js';
|
|
3
|
+
export { A as AuthorizationToken, g as DataStreamHeader, h as Draft14BaseMessage, i as Draft14ClientSetup, j as Draft14Fetch, k as Draft14FetchCancel, l as Draft14FetchError, m as Draft14FetchOk, n as Draft14GoAway, o as Draft14MaxRequestId, p as Draft14Params, q as Draft14Publish, r as Draft14PublishDone, s as Draft14PublishError, t as Draft14PublishNamespace, u as Draft14PublishNamespaceCancel, v as Draft14PublishNamespaceDone, w as Draft14PublishNamespaceError, x as Draft14PublishNamespaceOk, y as Draft14PublishOk, z as Draft14RequestsBlocked, B as Draft14ServerSetup, C as Draft14Subscribe, E as Draft14SubscribeError, G as Draft14SubscribeNamespace, H as Draft14SubscribeNamespaceError, I as Draft14SubscribeNamespaceOk, J as Draft14SubscribeOk, K as Draft14SubscribeUpdate, L as Draft14TrackStatus, M as Draft14TrackStatusError, N as Draft14TrackStatusOk, P as Draft14Unsubscribe, Q as Draft14UnsubscribeNamespace, R as FetchObjectPayload, T as FetchType, U as FetchTypeValue, V as FilterType, W as FilterTypeValue, X as GroupOrder, Y as GroupOrderValue, Z as Location, _ as UnknownParam } from './types-CVeKIk7A.js';
|
|
4
4
|
export { createDraft14SessionState } from './draft14-session.js';
|
|
5
5
|
import { g as SessionPhase, j as SubscriptionState, b as AnnounceState, f as PublishState, c as FetchState, V as ValidationResult, T as TransitionResult } from './session-types-C0l_-Ups.js';
|
|
6
6
|
export { F as FetchPhase, P as ProtocolViolation, d as ProtocolViolationCode, e as PublishPhase, a as SessionState, h as SideEffect, i as SubscriptionPhase } from './session-types-C0l_-Ups.js';
|