@moqtap/codec 0.7.0 → 0.8.1
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-5XZKO2U5.js → chunk-2XH6PHXR.js} +62 -51
- package/dist/{chunk-APTV6F72.js → chunk-3YAR3I3S.js} +67 -51
- package/dist/{chunk-Y4FRXYX6.cjs → chunk-7ENEWAMZ.cjs} +52 -58
- package/dist/{chunk-MD2OA7SE.js → chunk-BV6MITLO.js} +15 -8
- package/dist/{chunk-B56AG5HU.cjs → chunk-EVCPBFSR.cjs} +6 -4
- package/dist/{chunk-KNLPX3YA.js → chunk-H6DTAIWM.js} +6 -4
- package/dist/{chunk-J3ASFPCX.cjs → chunk-IADVBKEJ.cjs} +15 -8
- package/dist/{chunk-I55J3KXD.js → chunk-NH4L6NIY.js} +48 -33
- package/dist/{chunk-EQAYMCXO.cjs → chunk-PU2KV7VP.cjs} +48 -33
- package/dist/{chunk-HEO2JG6C.js → chunk-TMXRYOBS.js} +100 -92
- package/dist/{chunk-IEJULBKB.cjs → chunk-UA5XFP4O.cjs} +100 -92
- package/dist/{chunk-KTVN4P6J.cjs → chunk-UZO5Z2XT.cjs} +62 -51
- package/dist/{chunk-MH7537FB.cjs → chunk-VWXUT5R2.cjs} +67 -51
- package/dist/{chunk-DORX55MO.js → chunk-XQGEOFGE.js} +52 -58
- package/dist/{codec-B1snaM9L.d.cts → codec-N3g1lxQQ.d.cts} +1 -1
- package/dist/{codec-D49OofBr.d.ts → codec-v6Vloc7H.d.ts} +1 -1
- package/dist/draft12.cjs +2 -2
- package/dist/draft12.js +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/draft15.cjs +2 -2
- package/dist/draft15.js +1 -1
- package/dist/draft16.cjs +2 -2
- package/dist/draft16.js +1 -1
- package/dist/draft17.cjs +2 -2
- package/dist/draft17.js +1 -1
- package/dist/draft18.cjs +2 -2
- package/dist/draft18.js +1 -1
- package/dist/draft19.cjs +2 -2
- package/dist/draft19.js +1 -1
- package/dist/index.cjs +68 -16
- package/dist/index.d.cts +73 -3
- package/dist/index.d.ts +73 -3
- package/dist/index.js +60 -8
- package/dist/session.d.cts +1 -1
- package/dist/session.d.ts +1 -1
- package/dist/{types-DjmrHp_s.d.cts → types-HI_bbXka.d.cts} +29 -23
- package/dist/{types-DjmrHp_s.d.ts → types-HI_bbXka.d.ts} +29 -23
- package/package.json +2 -2
- package/src/core/accessors.ts +120 -0
- package/src/drafts/draft12/data-streams.ts +13 -4
- package/src/drafts/draft14/codec.ts +52 -58
- package/src/drafts/draft14/types.ts +31 -25
- package/src/drafts/draft15/data-streams.ts +30 -16
- package/src/drafts/draft16/codec.ts +116 -93
- package/src/drafts/draft17/codec.ts +72 -35
- package/src/drafts/draft18/codec.ts +89 -53
- package/src/drafts/draft19/codec.ts +94 -53
- package/src/index.ts +8 -0
|
@@ -1173,6 +1173,38 @@ function decodeRangeFilter(reader, hasProperty) {
|
|
|
1173
1173
|
}
|
|
1174
1174
|
return property_type !== void 0 ? { set_id, property_type, ranges } : { set_id, ranges };
|
|
1175
1175
|
}
|
|
1176
|
+
var PARAMETER_SCOPE = /* @__PURE__ */ new Map([
|
|
1177
|
+
[0x02n, /* @__PURE__ */ new Set(["request_ok", "subscribe", "request_update", "subscribe_tracks"])],
|
|
1178
|
+
[
|
|
1179
|
+
0x03n,
|
|
1180
|
+
/* @__PURE__ */ new Set([
|
|
1181
|
+
"publish",
|
|
1182
|
+
"subscribe",
|
|
1183
|
+
"request_update",
|
|
1184
|
+
"subscribe_namespace",
|
|
1185
|
+
"subscribe_tracks",
|
|
1186
|
+
"publish_namespace",
|
|
1187
|
+
"track_status",
|
|
1188
|
+
"fetch"
|
|
1189
|
+
])
|
|
1190
|
+
],
|
|
1191
|
+
[0x04n, /* @__PURE__ */ new Set(["subscribe", "subscribe_tracks"])],
|
|
1192
|
+
[0x06n, /* @__PURE__ */ new Set(["request_ok", "subscribe", "request_update", "subscribe_tracks"])],
|
|
1193
|
+
[0x08n, /* @__PURE__ */ new Set(["subscribe_ok", "publish", "request_ok"])],
|
|
1194
|
+
[0x09n, /* @__PURE__ */ new Set(["subscribe_ok", "publish", "request_ok"])],
|
|
1195
|
+
[0x0an, /* @__PURE__ */ new Set(["fetch"])],
|
|
1196
|
+
[0x10n, /* @__PURE__ */ new Set(["subscribe", "request_update", "publish", "request_ok", "subscribe_tracks"])],
|
|
1197
|
+
[0x20n, /* @__PURE__ */ new Set(["subscribe", "fetch", "request_update", "request_ok", "subscribe_tracks"])],
|
|
1198
|
+
[0x21n, /* @__PURE__ */ new Set(["subscribe", "request_ok", "request_update", "subscribe_tracks"])],
|
|
1199
|
+
[0x22n, /* @__PURE__ */ new Set(["subscribe", "subscribe_tracks", "fetch"])],
|
|
1200
|
+
[0x25n, /* @__PURE__ */ new Set(["fetch", "subscribe", "subscribe_tracks", "request_ok", "request_update"])],
|
|
1201
|
+
[0x26n, /* @__PURE__ */ new Set(["fetch", "subscribe", "subscribe_tracks", "request_ok", "request_update"])],
|
|
1202
|
+
[0x27n, /* @__PURE__ */ new Set(["fetch", "subscribe", "subscribe_tracks", "request_ok", "request_update"])],
|
|
1203
|
+
[0x28n, /* @__PURE__ */ new Set(["fetch", "subscribe", "subscribe_tracks", "request_ok", "request_update"])],
|
|
1204
|
+
[0x29n, /* @__PURE__ */ new Set(["subscribe_tracks", "request_update"])],
|
|
1205
|
+
[0x32n, /* @__PURE__ */ new Set(["request_ok", "subscribe", "request_update", "subscribe_tracks"])],
|
|
1206
|
+
[0x34n, /* @__PURE__ */ new Set(["request_update"])]
|
|
1207
|
+
]);
|
|
1176
1208
|
function encodeParams(params, writer) {
|
|
1177
1209
|
const entries = [];
|
|
1178
1210
|
if (params.object_delivery_timeout !== void 0) {
|
|
@@ -1214,13 +1246,12 @@ function encodeParams(params, writer) {
|
|
|
1214
1246
|
if (params.largest_object !== void 0) {
|
|
1215
1247
|
entries.push({
|
|
1216
1248
|
type: PARAM_LARGEST_OBJECT,
|
|
1249
|
+
// A Location is "Two consecutive varints (Group, Object)", which is a
|
|
1250
|
+
// different value encoding from "Length-prefixed". Nothing states the
|
|
1251
|
+
// length, so nothing writes one.
|
|
1217
1252
|
encode: (w) => {
|
|
1218
|
-
|
|
1219
|
-
|
|
1220
|
-
tmpW.writeVarInt(params.largest_object.object);
|
|
1221
|
-
const raw = tmpW.finish();
|
|
1222
|
-
w.writeVarInt(BigInt(raw.byteLength));
|
|
1223
|
-
w.writeBytes(raw);
|
|
1253
|
+
w.writeVarInt(params.largest_object.group);
|
|
1254
|
+
w.writeVarInt(params.largest_object.object);
|
|
1224
1255
|
}
|
|
1225
1256
|
});
|
|
1226
1257
|
}
|
|
@@ -1307,12 +1338,11 @@ function encodeParams(params, writer) {
|
|
|
1307
1338
|
if (params.track_namespace_prefix !== void 0) {
|
|
1308
1339
|
entries.push({
|
|
1309
1340
|
type: PARAM_TRACK_NAMESPACE_PREFIX,
|
|
1341
|
+
// The parameter "uses the Track Namespace encoding", which is a tuple
|
|
1342
|
+
// that states its own field count. That is not the Length-prefixed
|
|
1343
|
+
// encoding, so there is no byte length ahead of it.
|
|
1310
1344
|
encode: (w) => {
|
|
1311
|
-
|
|
1312
|
-
encodeNamespaceTuple(params.track_namespace_prefix, tmpW);
|
|
1313
|
-
const raw = tmpW.finish();
|
|
1314
|
-
w.writeVarInt(BigInt(raw.byteLength));
|
|
1315
|
-
w.writeBytes(raw);
|
|
1345
|
+
encodeNamespaceTuple(params.track_namespace_prefix, w);
|
|
1316
1346
|
}
|
|
1317
1347
|
});
|
|
1318
1348
|
}
|
|
@@ -1337,15 +1367,22 @@ function encodeParams(params, writer) {
|
|
|
1337
1367
|
prevType = entry.type;
|
|
1338
1368
|
}
|
|
1339
1369
|
}
|
|
1340
|
-
function decodeParams(reader) {
|
|
1370
|
+
function decodeParams(reader, messageType) {
|
|
1341
1371
|
const count = Number(reader.readVarInt());
|
|
1342
1372
|
const result = {};
|
|
1343
|
-
const unknown = [];
|
|
1344
1373
|
let prevType = 0n;
|
|
1345
1374
|
for (let i = 0; i < count; i++) {
|
|
1346
1375
|
const delta = reader.readVarInt();
|
|
1347
1376
|
const paramType = prevType + delta;
|
|
1348
1377
|
prevType = paramType;
|
|
1378
|
+
const scope = PARAMETER_SCOPE.get(paramType);
|
|
1379
|
+
if (scope !== void 0 && !scope.has(messageType)) {
|
|
1380
|
+
throw new (0, _chunk4XLYCT5Qcjs.DecodeError)(
|
|
1381
|
+
"CONSTRAINT_VIOLATION",
|
|
1382
|
+
`Message Parameter 0x${paramType.toString(16)} may not appear in ${messageType}`,
|
|
1383
|
+
reader.offset
|
|
1384
|
+
);
|
|
1385
|
+
}
|
|
1349
1386
|
if (paramType === PARAM_OBJECT_DELIVERY_TIMEOUT) {
|
|
1350
1387
|
result.object_delivery_timeout = reader.readVarInt();
|
|
1351
1388
|
} else if (paramType === PARAM_AUTHORIZATION_TOKEN) {
|
|
@@ -1359,12 +1396,8 @@ function decodeParams(reader) {
|
|
|
1359
1396
|
} else if (paramType === PARAM_EXPIRES) {
|
|
1360
1397
|
result.expires = reader.readVarInt();
|
|
1361
1398
|
} else if (paramType === PARAM_LARGEST_OBJECT) {
|
|
1362
|
-
const length = Number(reader.readVarInt());
|
|
1363
|
-
const startOff = reader.offset;
|
|
1364
1399
|
const group = reader.readVarInt();
|
|
1365
1400
|
const object = reader.readVarInt();
|
|
1366
|
-
const consumed = reader.offset - startOff;
|
|
1367
|
-
if (consumed < length) reader.readBytes(length - consumed);
|
|
1368
1401
|
result.largest_object = { group, object };
|
|
1369
1402
|
} else if (paramType === PARAM_FILL_TIMEOUT) {
|
|
1370
1403
|
result.fill_timeout = reader.readVarInt();
|
|
@@ -1402,32 +1435,15 @@ function decodeParams(reader) {
|
|
|
1402
1435
|
} else if (paramType === PARAM_NEW_GROUP_REQUEST) {
|
|
1403
1436
|
result.new_group_request = reader.readVarInt();
|
|
1404
1437
|
} else if (paramType === PARAM_TRACK_NAMESPACE_PREFIX) {
|
|
1405
|
-
|
|
1406
|
-
const bytes = reader.readBytes(length);
|
|
1407
|
-
result.track_namespace_prefix = decodeNamespaceTuple(new (0, _chunk4XLYCT5Qcjs.MoqtBufferReader)(bytes));
|
|
1438
|
+
result.track_namespace_prefix = decodeNamespaceTuple(reader);
|
|
1408
1439
|
} else {
|
|
1409
|
-
|
|
1410
|
-
|
|
1411
|
-
|
|
1412
|
-
|
|
1413
|
-
|
|
1414
|
-
unknown.push({
|
|
1415
|
-
id: `0x${paramType.toString(16)}`,
|
|
1416
|
-
length: raw.byteLength,
|
|
1417
|
-
raw_hex: _chunk4XLYCT5Qcjs.bytesToHex.call(void 0, raw)
|
|
1418
|
-
});
|
|
1419
|
-
} else {
|
|
1420
|
-
const length = Number(reader.readVarInt());
|
|
1421
|
-
const bytes = reader.readBytes(length);
|
|
1422
|
-
unknown.push({
|
|
1423
|
-
id: `0x${paramType.toString(16)}`,
|
|
1424
|
-
length,
|
|
1425
|
-
raw_hex: _chunk4XLYCT5Qcjs.bytesToHex.call(void 0, bytes)
|
|
1426
|
-
});
|
|
1427
|
-
}
|
|
1440
|
+
throw new (0, _chunk4XLYCT5Qcjs.DecodeError)(
|
|
1441
|
+
"INVALID_PARAMETER",
|
|
1442
|
+
`Unknown Message Parameter type 0x${paramType.toString(16)}`,
|
|
1443
|
+
reader.offset
|
|
1444
|
+
);
|
|
1428
1445
|
}
|
|
1429
1446
|
}
|
|
1430
|
-
if (unknown.length > 0) result.unknown = unknown;
|
|
1431
1447
|
return result;
|
|
1432
1448
|
}
|
|
1433
1449
|
var TPROP_OBJECT_DELIVERY_TIMEOUT = 0x02n;
|
|
@@ -1686,7 +1702,7 @@ function decodeSubscribePayload(r) {
|
|
|
1686
1702
|
const request_id = r.readVarInt();
|
|
1687
1703
|
const track_namespace = r.readTuple();
|
|
1688
1704
|
const track_name = r.readString();
|
|
1689
|
-
const parameters = decodeParams(r);
|
|
1705
|
+
const parameters = decodeParams(r, "subscribe");
|
|
1690
1706
|
return {
|
|
1691
1707
|
type: "subscribe",
|
|
1692
1708
|
request_id,
|
|
@@ -1697,13 +1713,13 @@ function decodeSubscribePayload(r) {
|
|
|
1697
1713
|
}
|
|
1698
1714
|
function decodeSubscribeOkPayload(r, payloadEnd) {
|
|
1699
1715
|
const track_alias = r.readVarInt();
|
|
1700
|
-
const parameters = decodeParams(r);
|
|
1716
|
+
const parameters = decodeParams(r, "subscribe_ok");
|
|
1701
1717
|
const track_properties = decodeTrackProperties(r, payloadEnd);
|
|
1702
1718
|
return { type: "subscribe_ok", track_alias, parameters, track_properties };
|
|
1703
1719
|
}
|
|
1704
1720
|
function decodeRequestUpdatePayload(r) {
|
|
1705
1721
|
const request_id = r.readVarInt();
|
|
1706
|
-
const parameters = decodeParams(r);
|
|
1722
|
+
const parameters = decodeParams(r, "request_update");
|
|
1707
1723
|
return {
|
|
1708
1724
|
type: "request_update",
|
|
1709
1725
|
request_id,
|
|
@@ -1715,7 +1731,7 @@ function decodePublishPayload(r, payloadEnd) {
|
|
|
1715
1731
|
const track_namespace = r.readTuple();
|
|
1716
1732
|
const track_name = r.readString();
|
|
1717
1733
|
const track_alias = r.readVarInt();
|
|
1718
|
-
const parameters = decodeParams(r);
|
|
1734
|
+
const parameters = decodeParams(r, "publish");
|
|
1719
1735
|
const track_properties = decodeTrackProperties(r, payloadEnd);
|
|
1720
1736
|
return {
|
|
1721
1737
|
type: "publish",
|
|
@@ -1736,7 +1752,7 @@ function decodePublishDonePayload(r) {
|
|
|
1736
1752
|
function decodePublishNamespacePayload(r) {
|
|
1737
1753
|
const request_id = r.readVarInt();
|
|
1738
1754
|
const track_namespace = r.readTuple();
|
|
1739
|
-
const parameters = decodeParams(r);
|
|
1755
|
+
const parameters = decodeParams(r, "publish_namespace");
|
|
1740
1756
|
return {
|
|
1741
1757
|
type: "publish_namespace",
|
|
1742
1758
|
request_id,
|
|
@@ -1755,7 +1771,7 @@ function decodeNamespaceDonePayload(r) {
|
|
|
1755
1771
|
function decodeSubscribeNamespacePayload(r) {
|
|
1756
1772
|
const request_id = r.readVarInt();
|
|
1757
1773
|
const namespace_prefix = r.readTuple();
|
|
1758
|
-
const parameters = decodeParams(r);
|
|
1774
|
+
const parameters = decodeParams(r, "subscribe_namespace");
|
|
1759
1775
|
return {
|
|
1760
1776
|
type: "subscribe_namespace",
|
|
1761
1777
|
request_id,
|
|
@@ -1766,7 +1782,7 @@ function decodeSubscribeNamespacePayload(r) {
|
|
|
1766
1782
|
function decodeSubscribeTracksPayload(r) {
|
|
1767
1783
|
const request_id = r.readVarInt();
|
|
1768
1784
|
const namespace_prefix = r.readTuple();
|
|
1769
|
-
const parameters = decodeParams(r);
|
|
1785
|
+
const parameters = decodeParams(r, "subscribe_tracks");
|
|
1770
1786
|
return {
|
|
1771
1787
|
type: "subscribe_tracks",
|
|
1772
1788
|
request_id,
|
|
@@ -1808,7 +1824,7 @@ function decodeFetchPayload(r) {
|
|
|
1808
1824
|
const joining_start = r.readVarInt();
|
|
1809
1825
|
joining = { joining_request_id, joining_start };
|
|
1810
1826
|
}
|
|
1811
|
-
const parameters = decodeParams(r);
|
|
1827
|
+
const parameters = decodeParams(r, "fetch");
|
|
1812
1828
|
return {
|
|
1813
1829
|
type: "fetch",
|
|
1814
1830
|
request_id,
|
|
@@ -1822,7 +1838,7 @@ function decodeFetchOkPayload(r, payloadEnd) {
|
|
|
1822
1838
|
const end_of_track = r.readUint8();
|
|
1823
1839
|
const end_group = r.readVarInt();
|
|
1824
1840
|
const end_object = r.readVarInt();
|
|
1825
|
-
const parameters = decodeParams(r);
|
|
1841
|
+
const parameters = decodeParams(r, "fetch_ok");
|
|
1826
1842
|
const track_properties = decodeTrackProperties(r, payloadEnd);
|
|
1827
1843
|
return {
|
|
1828
1844
|
type: "fetch_ok",
|
|
@@ -1837,7 +1853,7 @@ function decodeTrackStatusPayload(r) {
|
|
|
1837
1853
|
const request_id = r.readVarInt();
|
|
1838
1854
|
const track_namespace = r.readTuple();
|
|
1839
1855
|
const track_name = r.readString();
|
|
1840
|
-
const parameters = decodeParams(r);
|
|
1856
|
+
const parameters = decodeParams(r, "track_status");
|
|
1841
1857
|
return {
|
|
1842
1858
|
type: "track_status",
|
|
1843
1859
|
request_id,
|
|
@@ -1847,7 +1863,7 @@ function decodeTrackStatusPayload(r) {
|
|
|
1847
1863
|
};
|
|
1848
1864
|
}
|
|
1849
1865
|
function decodeRequestOkPayload(r, payloadEnd) {
|
|
1850
|
-
const parameters = decodeParams(r);
|
|
1866
|
+
const parameters = decodeParams(r, "request_ok");
|
|
1851
1867
|
const track_properties = decodeTrackProperties(r, payloadEnd);
|
|
1852
1868
|
return { type: "request_ok", parameters, track_properties };
|
|
1853
1869
|
}
|
|
@@ -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) {
|
|
@@ -1121,7 +1121,6 @@ function encodePublishNamespacePayload(msg, w) {
|
|
|
1121
1121
|
}
|
|
1122
1122
|
function encodePublishNamespaceOkPayload(msg, w) {
|
|
1123
1123
|
w.writeVarInt(msg.request_id);
|
|
1124
|
-
encodeMessageParams(msg.parameters, w);
|
|
1125
1124
|
}
|
|
1126
1125
|
function encodePublishNamespaceErrorPayload(msg, w) {
|
|
1127
1126
|
w.writeVarInt(msg.request_id);
|
|
@@ -1143,7 +1142,6 @@ function encodeSubscribeNamespacePayload(msg, w) {
|
|
|
1143
1142
|
}
|
|
1144
1143
|
function encodeSubscribeNamespaceOkPayload(msg, w) {
|
|
1145
1144
|
w.writeVarInt(msg.request_id);
|
|
1146
|
-
encodeMessageParams(msg.parameters, w);
|
|
1147
1145
|
}
|
|
1148
1146
|
function encodeSubscribeNamespaceErrorPayload(msg, w) {
|
|
1149
1147
|
w.writeVarInt(msg.request_id);
|
|
@@ -1155,26 +1153,26 @@ function encodeUnsubscribeNamespacePayload(msg, w) {
|
|
|
1155
1153
|
}
|
|
1156
1154
|
function encodeFetchPayload(msg, w) {
|
|
1157
1155
|
w.writeVarInt(msg.request_id);
|
|
1158
|
-
w.writeUint8(
|
|
1159
|
-
w.writeUint8(
|
|
1156
|
+
w.writeUint8(msg.subscriber_priority);
|
|
1157
|
+
w.writeUint8(msg.group_order);
|
|
1160
1158
|
w.writeVarInt(msg.fetch_type);
|
|
1161
1159
|
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);
|
|
1160
|
+
if (ft === FetchType.Standalone && msg.standalone) {
|
|
1161
|
+
w.writeTuple(msg.standalone.track_namespace);
|
|
1162
|
+
w.writeString(msg.standalone.track_name);
|
|
1163
|
+
w.writeVarInt(msg.standalone.start_group);
|
|
1164
|
+
w.writeVarInt(msg.standalone.start_object);
|
|
1165
|
+
w.writeVarInt(msg.standalone.end_group);
|
|
1166
|
+
w.writeVarInt(msg.standalone.end_object);
|
|
1167
|
+
} else if (msg.joining) {
|
|
1168
|
+
w.writeVarInt(msg.joining.joining_request_id);
|
|
1169
|
+
w.writeVarInt(msg.joining.joining_start);
|
|
1172
1170
|
}
|
|
1173
1171
|
encodeMessageParams(msg.parameters, w);
|
|
1174
1172
|
}
|
|
1175
1173
|
function encodeFetchOkPayload(msg, w) {
|
|
1176
1174
|
w.writeVarInt(msg.request_id);
|
|
1177
|
-
w.writeUint8(
|
|
1175
|
+
w.writeUint8(msg.group_order);
|
|
1178
1176
|
w.writeVarInt(msg.end_of_track);
|
|
1179
1177
|
w.writeVarInt(msg.end_location.group);
|
|
1180
1178
|
w.writeVarInt(msg.end_location.object);
|
|
@@ -1192,8 +1190,8 @@ function encodeTrackStatusPayload(msg, w) {
|
|
|
1192
1190
|
w.writeVarInt(msg.request_id);
|
|
1193
1191
|
w.writeTuple(msg.track_namespace);
|
|
1194
1192
|
w.writeString(msg.track_name);
|
|
1195
|
-
w.writeUint8(
|
|
1196
|
-
w.writeUint8(
|
|
1193
|
+
w.writeUint8(msg.subscriber_priority);
|
|
1194
|
+
w.writeUint8(msg.group_order);
|
|
1197
1195
|
w.writeVarInt(msg.forward);
|
|
1198
1196
|
w.writeVarInt(msg.filter_type);
|
|
1199
1197
|
const ft = msg.filter_type;
|
|
@@ -1207,7 +1205,7 @@ function encodeTrackStatusOkPayload(msg, w) {
|
|
|
1207
1205
|
w.writeVarInt(msg.request_id);
|
|
1208
1206
|
w.writeVarInt(msg.track_alias);
|
|
1209
1207
|
w.writeVarInt(msg.expires);
|
|
1210
|
-
w.writeUint8(
|
|
1208
|
+
w.writeUint8(msg.group_order);
|
|
1211
1209
|
w.writeVarInt(msg.content_exists);
|
|
1212
1210
|
if (msg.content_exists === 1n) {
|
|
1213
1211
|
w.writeVarInt(msg.largest_location.group);
|
|
@@ -1254,8 +1252,8 @@ function decodeSubscribePayload(r) {
|
|
|
1254
1252
|
const request_id = r.readVarInt();
|
|
1255
1253
|
const track_namespace = r.readTuple();
|
|
1256
1254
|
const track_name = r.readString();
|
|
1257
|
-
const subscriber_priority =
|
|
1258
|
-
const group_order =
|
|
1255
|
+
const subscriber_priority = r.readUint8();
|
|
1256
|
+
const group_order = r.readUint8();
|
|
1259
1257
|
const forward = r.readVarInt();
|
|
1260
1258
|
const filter_type = r.readVarInt();
|
|
1261
1259
|
if (filter_type < FilterType.NextGroupStart || filter_type > FilterType.AbsoluteRange) {
|
|
@@ -1292,7 +1290,7 @@ function decodeSubscribeOkPayload(r) {
|
|
|
1292
1290
|
const request_id = r.readVarInt();
|
|
1293
1291
|
const track_alias = r.readVarInt();
|
|
1294
1292
|
const expires = r.readVarInt();
|
|
1295
|
-
const group_order =
|
|
1293
|
+
const group_order = r.readUint8();
|
|
1296
1294
|
const content_exists = r.readVarInt();
|
|
1297
1295
|
let largest_location;
|
|
1298
1296
|
if (content_exists === 1n) {
|
|
@@ -1319,7 +1317,7 @@ function decodeSubscribeUpdatePayload(r) {
|
|
|
1319
1317
|
const start_group = r.readVarInt();
|
|
1320
1318
|
const start_object = r.readVarInt();
|
|
1321
1319
|
const end_group = r.readVarInt();
|
|
1322
|
-
const subscriber_priority =
|
|
1320
|
+
const subscriber_priority = r.readUint8();
|
|
1323
1321
|
const forward = r.readVarInt();
|
|
1324
1322
|
const parameters = decodeMessageParams(r);
|
|
1325
1323
|
return {
|
|
@@ -1349,7 +1347,7 @@ function decodePublishPayload(r) {
|
|
|
1349
1347
|
const track_namespace = r.readTuple();
|
|
1350
1348
|
const track_name = r.readString();
|
|
1351
1349
|
const track_alias = r.readVarInt();
|
|
1352
|
-
const group_order =
|
|
1350
|
+
const group_order = r.readUint8();
|
|
1353
1351
|
const content_exists = r.readVarInt();
|
|
1354
1352
|
let largest_location;
|
|
1355
1353
|
if (content_exists === 1n) {
|
|
@@ -1376,8 +1374,8 @@ function decodePublishPayload(r) {
|
|
|
1376
1374
|
function decodePublishOkPayload(r) {
|
|
1377
1375
|
const request_id = r.readVarInt();
|
|
1378
1376
|
const forward = r.readVarInt();
|
|
1379
|
-
const subscriber_priority =
|
|
1380
|
-
const group_order =
|
|
1377
|
+
const subscriber_priority = r.readUint8();
|
|
1378
|
+
const group_order = r.readUint8();
|
|
1381
1379
|
const filter_type = r.readVarInt();
|
|
1382
1380
|
let start_group;
|
|
1383
1381
|
let start_object;
|
|
@@ -1431,8 +1429,7 @@ function decodePublishNamespacePayload(r) {
|
|
|
1431
1429
|
}
|
|
1432
1430
|
function decodePublishNamespaceOkPayload(r) {
|
|
1433
1431
|
const request_id = r.readVarInt();
|
|
1434
|
-
|
|
1435
|
-
return { type: "publish_namespace_ok", request_id, parameters };
|
|
1432
|
+
return { type: "publish_namespace_ok", request_id };
|
|
1436
1433
|
}
|
|
1437
1434
|
function decodePublishNamespaceErrorPayload(r) {
|
|
1438
1435
|
const request_id = r.readVarInt();
|
|
@@ -1473,8 +1470,7 @@ function decodeSubscribeNamespacePayload(r) {
|
|
|
1473
1470
|
}
|
|
1474
1471
|
function decodeSubscribeNamespaceOkPayload(r) {
|
|
1475
1472
|
const request_id = r.readVarInt();
|
|
1476
|
-
|
|
1477
|
-
return { type: "subscribe_namespace_ok", request_id, parameters };
|
|
1473
|
+
return { type: "subscribe_namespace_ok", request_id };
|
|
1478
1474
|
}
|
|
1479
1475
|
function decodeSubscribeNamespaceErrorPayload(r) {
|
|
1480
1476
|
const request_id = r.readVarInt();
|
|
@@ -1493,19 +1489,21 @@ function decodeUnsubscribeNamespacePayload(r) {
|
|
|
1493
1489
|
}
|
|
1494
1490
|
function decodeFetchPayload(r) {
|
|
1495
1491
|
const request_id = r.readVarInt();
|
|
1496
|
-
const subscriber_priority =
|
|
1497
|
-
const group_order =
|
|
1492
|
+
const subscriber_priority = r.readUint8();
|
|
1493
|
+
const group_order = r.readUint8();
|
|
1498
1494
|
const fetch_type = r.readVarInt();
|
|
1499
1495
|
if (fetch_type < FetchType.Standalone || fetch_type > FetchType.AbsoluteJoining) {
|
|
1500
1496
|
throw new DecodeError("CONSTRAINT_VIOLATION", `Invalid fetch_type: ${fetch_type}`, r.offset);
|
|
1501
1497
|
}
|
|
1502
1498
|
if (fetch_type === FetchType.Standalone) {
|
|
1503
|
-
const
|
|
1504
|
-
|
|
1505
|
-
|
|
1506
|
-
|
|
1507
|
-
|
|
1508
|
-
|
|
1499
|
+
const standalone = {
|
|
1500
|
+
track_namespace: r.readTuple(),
|
|
1501
|
+
track_name: r.readString(),
|
|
1502
|
+
start_group: r.readVarInt(),
|
|
1503
|
+
start_object: r.readVarInt(),
|
|
1504
|
+
end_group: r.readVarInt(),
|
|
1505
|
+
end_object: r.readVarInt()
|
|
1506
|
+
};
|
|
1509
1507
|
const parameters = decodeMessageParams(r);
|
|
1510
1508
|
return {
|
|
1511
1509
|
type: "fetch",
|
|
@@ -1513,17 +1511,14 @@ function decodeFetchPayload(r) {
|
|
|
1513
1511
|
subscriber_priority,
|
|
1514
1512
|
group_order,
|
|
1515
1513
|
fetch_type,
|
|
1516
|
-
|
|
1517
|
-
track_name,
|
|
1518
|
-
start_group,
|
|
1519
|
-
start_object,
|
|
1520
|
-
end_group,
|
|
1521
|
-
end_object,
|
|
1514
|
+
standalone,
|
|
1522
1515
|
parameters
|
|
1523
1516
|
};
|
|
1524
1517
|
} else {
|
|
1525
|
-
const
|
|
1526
|
-
|
|
1518
|
+
const joining = {
|
|
1519
|
+
joining_request_id: r.readVarInt(),
|
|
1520
|
+
joining_start: r.readVarInt()
|
|
1521
|
+
};
|
|
1527
1522
|
const parameters = decodeMessageParams(r);
|
|
1528
1523
|
return {
|
|
1529
1524
|
type: "fetch",
|
|
@@ -1531,15 +1526,14 @@ function decodeFetchPayload(r) {
|
|
|
1531
1526
|
subscriber_priority,
|
|
1532
1527
|
group_order,
|
|
1533
1528
|
fetch_type,
|
|
1534
|
-
|
|
1535
|
-
joining_start,
|
|
1529
|
+
joining,
|
|
1536
1530
|
parameters
|
|
1537
1531
|
};
|
|
1538
1532
|
}
|
|
1539
1533
|
}
|
|
1540
1534
|
function decodeFetchOkPayload(r) {
|
|
1541
1535
|
const request_id = r.readVarInt();
|
|
1542
|
-
const group_order =
|
|
1536
|
+
const group_order = r.readUint8();
|
|
1543
1537
|
const end_of_track = r.readVarInt();
|
|
1544
1538
|
const end_location = {
|
|
1545
1539
|
group: r.readVarInt(),
|
|
@@ -1569,8 +1563,8 @@ function decodeTrackStatusPayload(r) {
|
|
|
1569
1563
|
const request_id = r.readVarInt();
|
|
1570
1564
|
const track_namespace = r.readTuple();
|
|
1571
1565
|
const track_name = r.readString();
|
|
1572
|
-
const subscriber_priority =
|
|
1573
|
-
const group_order =
|
|
1566
|
+
const subscriber_priority = r.readUint8();
|
|
1567
|
+
const group_order = r.readUint8();
|
|
1574
1568
|
const forward = r.readVarInt();
|
|
1575
1569
|
const filter_type = r.readVarInt();
|
|
1576
1570
|
let start_group;
|
|
@@ -1599,7 +1593,7 @@ function decodeTrackStatusOkPayload(r) {
|
|
|
1599
1593
|
const request_id = r.readVarInt();
|
|
1600
1594
|
const track_alias = r.readVarInt();
|
|
1601
1595
|
const expires = r.readVarInt();
|
|
1602
|
-
const group_order =
|
|
1596
|
+
const group_order = r.readUint8();
|
|
1603
1597
|
const content_exists = r.readVarInt();
|
|
1604
1598
|
let largest_location;
|
|
1605
1599
|
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-HI_bbXka.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-HI_bbXka.js';
|
|
3
3
|
|
|
4
4
|
/**
|
|
5
5
|
* Encode a draft-14 control message with type(varint) + length(uint16 BE) + payload.
|
package/dist/draft12.cjs
CHANGED
|
@@ -46,7 +46,7 @@
|
|
|
46
46
|
|
|
47
47
|
|
|
48
48
|
|
|
49
|
-
var
|
|
49
|
+
var _chunkEVCPBFSRcjs = require('./chunk-EVCPBFSR.cjs');
|
|
50
50
|
|
|
51
51
|
|
|
52
52
|
|
|
@@ -118,4 +118,4 @@ var DRAFT_VERSION = 0xff00000cn;
|
|
|
118
118
|
|
|
119
119
|
|
|
120
120
|
|
|
121
|
-
exports.BIDIRECTIONAL_MESSAGES = _chunkH5NSL4MOcjs.BIDIRECTIONAL_MESSAGES; exports.CLIENT_ONLY_MESSAGES = _chunkH5NSL4MOcjs.CLIENT_ONLY_MESSAGES; exports.CONTROL_MESSAGES = _chunkH5NSL4MOcjs.CONTROL_MESSAGES; exports.DRAFT_VERSION = DRAFT_VERSION; exports.Draft12SessionFSM = _chunkH5NSL4MOcjs.Draft12SessionFSM; exports.MESSAGE_ID_MAP =
|
|
121
|
+
exports.BIDIRECTIONAL_MESSAGES = _chunkH5NSL4MOcjs.BIDIRECTIONAL_MESSAGES; exports.CLIENT_ONLY_MESSAGES = _chunkH5NSL4MOcjs.CLIENT_ONLY_MESSAGES; exports.CONTROL_MESSAGES = _chunkH5NSL4MOcjs.CONTROL_MESSAGES; exports.DRAFT_VERSION = DRAFT_VERSION; exports.Draft12SessionFSM = _chunkH5NSL4MOcjs.Draft12SessionFSM; exports.MESSAGE_ID_MAP = _chunkEVCPBFSRcjs.MESSAGE_ID_MAP; exports.MESSAGE_TYPE_MAP = _chunkEVCPBFSRcjs.MESSAGE_TYPE_MAP; exports.MSG_ANNOUNCE = _chunkEVCPBFSRcjs.MSG_ANNOUNCE; exports.MSG_ANNOUNCE_CANCEL = _chunkEVCPBFSRcjs.MSG_ANNOUNCE_CANCEL; exports.MSG_ANNOUNCE_ERROR = _chunkEVCPBFSRcjs.MSG_ANNOUNCE_ERROR; exports.MSG_ANNOUNCE_OK = _chunkEVCPBFSRcjs.MSG_ANNOUNCE_OK; exports.MSG_CLIENT_SETUP = _chunkEVCPBFSRcjs.MSG_CLIENT_SETUP; exports.MSG_FETCH = _chunkEVCPBFSRcjs.MSG_FETCH; exports.MSG_FETCH_CANCEL = _chunkEVCPBFSRcjs.MSG_FETCH_CANCEL; exports.MSG_FETCH_ERROR = _chunkEVCPBFSRcjs.MSG_FETCH_ERROR; exports.MSG_FETCH_OK = _chunkEVCPBFSRcjs.MSG_FETCH_OK; exports.MSG_GOAWAY = _chunkEVCPBFSRcjs.MSG_GOAWAY; exports.MSG_MAX_REQUEST_ID = _chunkEVCPBFSRcjs.MSG_MAX_REQUEST_ID; exports.MSG_PUBLISH = _chunkEVCPBFSRcjs.MSG_PUBLISH; exports.MSG_PUBLISH_ERROR = _chunkEVCPBFSRcjs.MSG_PUBLISH_ERROR; exports.MSG_PUBLISH_OK = _chunkEVCPBFSRcjs.MSG_PUBLISH_OK; exports.MSG_REQUESTS_BLOCKED = _chunkEVCPBFSRcjs.MSG_REQUESTS_BLOCKED; exports.MSG_SERVER_SETUP = _chunkEVCPBFSRcjs.MSG_SERVER_SETUP; exports.MSG_SUBSCRIBE = _chunkEVCPBFSRcjs.MSG_SUBSCRIBE; exports.MSG_SUBSCRIBE_ANNOUNCES = _chunkEVCPBFSRcjs.MSG_SUBSCRIBE_ANNOUNCES; exports.MSG_SUBSCRIBE_ANNOUNCES_ERROR = _chunkEVCPBFSRcjs.MSG_SUBSCRIBE_ANNOUNCES_ERROR; exports.MSG_SUBSCRIBE_ANNOUNCES_OK = _chunkEVCPBFSRcjs.MSG_SUBSCRIBE_ANNOUNCES_OK; exports.MSG_SUBSCRIBE_DONE = _chunkEVCPBFSRcjs.MSG_SUBSCRIBE_DONE; exports.MSG_SUBSCRIBE_ERROR = _chunkEVCPBFSRcjs.MSG_SUBSCRIBE_ERROR; exports.MSG_SUBSCRIBE_OK = _chunkEVCPBFSRcjs.MSG_SUBSCRIBE_OK; exports.MSG_SUBSCRIBE_UPDATE = _chunkEVCPBFSRcjs.MSG_SUBSCRIBE_UPDATE; exports.MSG_TRACK_STATUS = _chunkEVCPBFSRcjs.MSG_TRACK_STATUS; exports.MSG_TRACK_STATUS_REQUEST = _chunkEVCPBFSRcjs.MSG_TRACK_STATUS_REQUEST; exports.MSG_UNANNOUNCE = _chunkEVCPBFSRcjs.MSG_UNANNOUNCE; exports.MSG_UNSUBSCRIBE = _chunkEVCPBFSRcjs.MSG_UNSUBSCRIBE; exports.MSG_UNSUBSCRIBE_ANNOUNCES = _chunkEVCPBFSRcjs.MSG_UNSUBSCRIBE_ANNOUNCES; exports.PARAM_AUTHORIZATION_TOKEN = _chunkEVCPBFSRcjs.PARAM_AUTHORIZATION_TOKEN; exports.PARAM_DELIVERY_TIMEOUT = _chunkEVCPBFSRcjs.PARAM_DELIVERY_TIMEOUT; exports.SERVER_ONLY_MESSAGES = _chunkH5NSL4MOcjs.SERVER_ONLY_MESSAGES; exports.SETUP_PARAM_MAX_REQUEST_ID = _chunkEVCPBFSRcjs.SETUP_PARAM_MAX_REQUEST_ID; exports.SETUP_PARAM_PATH = _chunkEVCPBFSRcjs.SETUP_PARAM_PATH; exports.VARINT_FRAMED_MESSAGES = _chunkEVCPBFSRcjs.VARINT_FRAMED_MESSAGES; exports.createDraft12Codec = _chunkEVCPBFSRcjs.createDraft12Codec; exports.createDraft12SessionState = _chunkH5NSL4MOcjs.createDraft12SessionState; exports.createStreamDecoder = _chunkEVCPBFSRcjs.createStreamDecoder; exports.decodeDataStream = _chunkEVCPBFSRcjs.decodeDataStream; exports.decodeDatagram = _chunkEVCPBFSRcjs.decodeDatagram; exports.decodeFetchStream = _chunkEVCPBFSRcjs.decodeFetchStream; exports.decodeMessage = _chunkEVCPBFSRcjs.decodeMessage; exports.decodeSubgroupStream = _chunkEVCPBFSRcjs.decodeSubgroupStream; exports.encodeDatagram = _chunkEVCPBFSRcjs.encodeDatagram; exports.encodeFetchStream = _chunkEVCPBFSRcjs.encodeFetchStream; exports.encodeMessage = _chunkEVCPBFSRcjs.encodeMessage; exports.encodeSubgroupStream = _chunkEVCPBFSRcjs.encodeSubgroupStream; exports.getLegalIncoming = _chunkH5NSL4MOcjs.getLegalIncoming; exports.getLegalOutgoing = _chunkH5NSL4MOcjs.getLegalOutgoing;
|
package/dist/draft12.js
CHANGED
|
@@ -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-HI_bbXka.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-HI_bbXka.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 _chunk7ENEWAMZcjs = require('./chunk-7ENEWAMZ.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 = _chunk7ENEWAMZcjs.FetchType; exports.FilterType = _chunk7ENEWAMZcjs.FilterType; exports.GroupOrder = _chunk7ENEWAMZcjs.GroupOrder; exports.MESSAGE_ID_MAP = _chunk7ENEWAMZcjs.MESSAGE_ID_MAP; exports.MESSAGE_TYPE_MAP = _chunk7ENEWAMZcjs.MESSAGE_TYPE_MAP; exports.MSG_CLIENT_SETUP = _chunk7ENEWAMZcjs.MSG_CLIENT_SETUP; exports.MSG_FETCH = _chunk7ENEWAMZcjs.MSG_FETCH; exports.MSG_FETCH_CANCEL = _chunk7ENEWAMZcjs.MSG_FETCH_CANCEL; exports.MSG_FETCH_ERROR = _chunk7ENEWAMZcjs.MSG_FETCH_ERROR; exports.MSG_FETCH_OK = _chunk7ENEWAMZcjs.MSG_FETCH_OK; exports.MSG_GOAWAY = _chunk7ENEWAMZcjs.MSG_GOAWAY; exports.MSG_MAX_REQUEST_ID = _chunk7ENEWAMZcjs.MSG_MAX_REQUEST_ID; exports.MSG_PUBLISH = _chunk7ENEWAMZcjs.MSG_PUBLISH; exports.MSG_PUBLISH_DONE = _chunk7ENEWAMZcjs.MSG_PUBLISH_DONE; exports.MSG_PUBLISH_ERROR = _chunk7ENEWAMZcjs.MSG_PUBLISH_ERROR; exports.MSG_PUBLISH_NAMESPACE = _chunk7ENEWAMZcjs.MSG_PUBLISH_NAMESPACE; exports.MSG_PUBLISH_NAMESPACE_CANCEL = _chunk7ENEWAMZcjs.MSG_PUBLISH_NAMESPACE_CANCEL; exports.MSG_PUBLISH_NAMESPACE_DONE = _chunk7ENEWAMZcjs.MSG_PUBLISH_NAMESPACE_DONE; exports.MSG_PUBLISH_NAMESPACE_ERROR = _chunk7ENEWAMZcjs.MSG_PUBLISH_NAMESPACE_ERROR; exports.MSG_PUBLISH_NAMESPACE_OK = _chunk7ENEWAMZcjs.MSG_PUBLISH_NAMESPACE_OK; exports.MSG_PUBLISH_OK = _chunk7ENEWAMZcjs.MSG_PUBLISH_OK; exports.MSG_REQUESTS_BLOCKED = _chunk7ENEWAMZcjs.MSG_REQUESTS_BLOCKED; exports.MSG_SERVER_SETUP = _chunk7ENEWAMZcjs.MSG_SERVER_SETUP; exports.MSG_SUBSCRIBE = _chunk7ENEWAMZcjs.MSG_SUBSCRIBE; exports.MSG_SUBSCRIBE_ERROR = _chunk7ENEWAMZcjs.MSG_SUBSCRIBE_ERROR; exports.MSG_SUBSCRIBE_NAMESPACE = _chunk7ENEWAMZcjs.MSG_SUBSCRIBE_NAMESPACE; exports.MSG_SUBSCRIBE_NAMESPACE_ERROR = _chunk7ENEWAMZcjs.MSG_SUBSCRIBE_NAMESPACE_ERROR; exports.MSG_SUBSCRIBE_NAMESPACE_OK = _chunk7ENEWAMZcjs.MSG_SUBSCRIBE_NAMESPACE_OK; exports.MSG_SUBSCRIBE_OK = _chunk7ENEWAMZcjs.MSG_SUBSCRIBE_OK; exports.MSG_SUBSCRIBE_UPDATE = _chunk7ENEWAMZcjs.MSG_SUBSCRIBE_UPDATE; exports.MSG_TRACK_STATUS = _chunk7ENEWAMZcjs.MSG_TRACK_STATUS; exports.MSG_TRACK_STATUS_ERROR = _chunk7ENEWAMZcjs.MSG_TRACK_STATUS_ERROR; exports.MSG_TRACK_STATUS_OK = _chunk7ENEWAMZcjs.MSG_TRACK_STATUS_OK; exports.MSG_UNSUBSCRIBE = _chunk7ENEWAMZcjs.MSG_UNSUBSCRIBE; exports.MSG_UNSUBSCRIBE_NAMESPACE = _chunk7ENEWAMZcjs.MSG_UNSUBSCRIBE_NAMESPACE; exports.PARAM_MAX_REQUEST_ID = _chunk7ENEWAMZcjs.PARAM_MAX_REQUEST_ID; exports.PARAM_MOQT_IMPLEMENTATION = _chunk7ENEWAMZcjs.PARAM_MOQT_IMPLEMENTATION; exports.PARAM_PATH = _chunk7ENEWAMZcjs.PARAM_PATH; exports.PARAM_ROLE = _chunk7ENEWAMZcjs.PARAM_ROLE; exports.SERVER_ONLY_MESSAGES = _chunkE65QKRSNcjs.SERVER_ONLY_MESSAGES; exports.createDataStreamDecoder = _chunk7ENEWAMZcjs.createDataStreamDecoder; exports.createDraft14Codec = _chunk7ENEWAMZcjs.createDraft14Codec; exports.createDraft14SessionState = _chunkE65QKRSNcjs.createDraft14SessionState; exports.createFetchStreamDecoder = _chunk7ENEWAMZcjs.createFetchStreamDecoder; exports.createStreamDecoder = _chunk7ENEWAMZcjs.createStreamDecoder; exports.createSubgroupStreamDecoder = _chunk7ENEWAMZcjs.createSubgroupStreamDecoder; exports.decodeDataStream = _chunk7ENEWAMZcjs.decodeDataStream; exports.decodeDatagram = _chunk7ENEWAMZcjs.decodeDatagram; exports.decodeFetchStream = _chunk7ENEWAMZcjs.decodeFetchStream; exports.decodeMessage = _chunk7ENEWAMZcjs.decodeMessage; exports.decodeSubgroupStream = _chunk7ENEWAMZcjs.decodeSubgroupStream; exports.encodeDatagram = _chunk7ENEWAMZcjs.encodeDatagram; exports.encodeFetchStream = _chunk7ENEWAMZcjs.encodeFetchStream; exports.encodeMessage = _chunk7ENEWAMZcjs.encodeMessage; exports.encodeSubgroupStream = _chunk7ENEWAMZcjs.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-N3g1lxQQ.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-HI_bbXka.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-HI_bbXka.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';
|