@moqtap/codec 0.4.0 → 0.4.2
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/dist/{chunk-XNWYLVGU.cjs → chunk-2SGE5GMU.cjs} +43 -1
- package/dist/{chunk-U3ZVLT5L.js → chunk-76774UFF.js} +42 -0
- package/dist/{chunk-GCBFHZW6.js → chunk-TKBYPIN7.js} +26 -1
- package/dist/{chunk-4BDEU3D4.cjs → chunk-WPFBK7UX.cjs} +26 -1
- package/dist/{codec-Ck7ZwFF1.d.cts → codec-BO5Go0Lm.d.cts} +1 -1
- package/dist/{codec-COy4uuPO.d.cts → codec-CpBWhz9f.d.cts} +1 -1
- package/dist/{codec-J7ekOSMc.d.ts → codec-D8REY9TB.d.ts} +1 -1
- package/dist/{codec-25u4_1HS.d.ts → codec-iMEwV1UO.d.ts} +1 -1
- package/dist/draft12-session.d.cts +1 -1
- package/dist/draft12-session.d.ts +1 -1
- package/dist/draft12.cjs +2 -2
- package/dist/draft12.d.cts +3 -3
- package/dist/draft12.d.ts +3 -3
- 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 +4 -2
- package/dist/draft14.d.cts +5 -4
- package/dist/draft14.d.ts +5 -4
- package/dist/draft14.js +3 -1
- package/dist/index.cjs +4 -4
- package/dist/index.d.cts +4 -4
- package/dist/index.d.ts +4 -4
- package/dist/index.js +2 -2
- package/dist/session.d.cts +2 -2
- package/dist/session.d.ts +2 -2
- package/dist/{types-DEaypVsD.d.cts → types--FGt0sAp.d.cts} +1 -0
- package/dist/{types-DEaypVsD.d.ts → types--FGt0sAp.d.ts} +1 -0
- package/dist/{types-C2qKTRR_.d.cts → types-DuyE0ygT.d.cts} +1 -0
- package/dist/{types-C2qKTRR_.d.ts → types-DuyE0ygT.d.ts} +1 -0
- package/package.json +1 -1
- package/src/drafts/draft12/codec.ts +26 -1
- package/src/drafts/draft12/types.ts +1 -0
- package/src/drafts/draft14/codec.ts +41 -0
- package/src/drafts/draft14/index.ts +1 -0
- package/src/drafts/draft14/messages.ts +1 -0
- package/src/drafts/draft14/types.ts +1 -0
|
@@ -40,6 +40,7 @@ var MSG_SERVER_SETUP = 0x21n;
|
|
|
40
40
|
var PARAM_ROLE = 0x00n;
|
|
41
41
|
var PARAM_PATH = 0x01n;
|
|
42
42
|
var PARAM_MAX_REQUEST_ID = 0x02n;
|
|
43
|
+
var PARAM_MOQT_IMPLEMENTATION = 0x07n;
|
|
43
44
|
var MESSAGE_TYPE_MAP = /* @__PURE__ */ new Map([
|
|
44
45
|
[MSG_CLIENT_SETUP, "client_setup"],
|
|
45
46
|
[MSG_SERVER_SETUP, "server_setup"],
|
|
@@ -800,8 +801,10 @@ function encodeSetupParams(params, writer) {
|
|
|
800
801
|
if (params.role !== void 0) count++;
|
|
801
802
|
if (params.path !== void 0) count++;
|
|
802
803
|
if (params.max_request_id !== void 0) count++;
|
|
804
|
+
if (params.authorization_token !== void 0) count++;
|
|
803
805
|
if (params.authority !== void 0) count++;
|
|
804
806
|
if (params.max_auth_token_cache_size !== void 0) count++;
|
|
807
|
+
if (params.moqt_implementation !== void 0) count++;
|
|
805
808
|
if (params.unknown) count += params.unknown.length;
|
|
806
809
|
writer.writeVarInt(count);
|
|
807
810
|
if (params.role !== void 0) {
|
|
@@ -818,6 +821,24 @@ function encodeSetupParams(params, writer) {
|
|
|
818
821
|
writer.writeVarInt(PARAM_MAX_REQUEST_ID);
|
|
819
822
|
writer.writeVarInt(params.max_request_id);
|
|
820
823
|
}
|
|
824
|
+
if (params.authorization_token !== void 0) {
|
|
825
|
+
writer.writeVarInt(PARAM_AUTHORIZATION_TOKEN);
|
|
826
|
+
const tok = params.authorization_token;
|
|
827
|
+
const tmpWriter = new (0, _chunkJL3NEW3Ocjs.BufferWriter)(64);
|
|
828
|
+
tmpWriter.writeVarInt(tok.alias_type);
|
|
829
|
+
if (tok.token_type !== void 0) {
|
|
830
|
+
tmpWriter.writeVarInt(tok.token_type);
|
|
831
|
+
}
|
|
832
|
+
if (tok.token_value !== void 0) {
|
|
833
|
+
tmpWriter.writeBytes(_chunkJL3NEW3Ocjs.hexToBytes.call(void 0, tok.token_value));
|
|
834
|
+
}
|
|
835
|
+
if (tok.token_alias !== void 0) {
|
|
836
|
+
tmpWriter.writeVarInt(tok.token_alias);
|
|
837
|
+
}
|
|
838
|
+
const tokenBytes = tmpWriter.finish();
|
|
839
|
+
writer.writeVarInt(tokenBytes.byteLength);
|
|
840
|
+
writer.writeBytes(tokenBytes);
|
|
841
|
+
}
|
|
821
842
|
if (params.max_auth_token_cache_size !== void 0) {
|
|
822
843
|
writer.writeVarInt(PARAM_MAX_AUTH_TOKEN_CACHE_SIZE);
|
|
823
844
|
writer.writeVarInt(params.max_auth_token_cache_size);
|
|
@@ -828,6 +849,12 @@ function encodeSetupParams(params, writer) {
|
|
|
828
849
|
writer.writeVarInt(encoded.byteLength);
|
|
829
850
|
writer.writeBytes(encoded);
|
|
830
851
|
}
|
|
852
|
+
if (params.moqt_implementation !== void 0) {
|
|
853
|
+
writer.writeVarInt(PARAM_MOQT_IMPLEMENTATION);
|
|
854
|
+
const encoded = textEncoder.encode(params.moqt_implementation);
|
|
855
|
+
writer.writeVarInt(encoded.byteLength);
|
|
856
|
+
writer.writeBytes(encoded);
|
|
857
|
+
}
|
|
831
858
|
if (params.unknown) {
|
|
832
859
|
for (const u of params.unknown) {
|
|
833
860
|
const id = BigInt(u.id);
|
|
@@ -867,8 +894,22 @@ function decodeSetupParams(reader) {
|
|
|
867
894
|
const bytes = reader.readBytes(length);
|
|
868
895
|
if (paramType === PARAM_PATH) {
|
|
869
896
|
result.path = textDecoder.decode(bytes);
|
|
897
|
+
} else if (paramType === PARAM_AUTHORIZATION_TOKEN) {
|
|
898
|
+
const tokenReader = new (0, _chunkJL3NEW3Ocjs.BufferReader)(bytes);
|
|
899
|
+
const alias_type = tokenReader.readVarInt();
|
|
900
|
+
const tok = { alias_type };
|
|
901
|
+
if (tokenReader.remaining > 0) {
|
|
902
|
+
tok.token_type = tokenReader.readVarInt();
|
|
903
|
+
if (tokenReader.remaining > 0) {
|
|
904
|
+
const tokenValue = tokenReader.readBytesView(tokenReader.remaining);
|
|
905
|
+
tok.token_value = _chunkJL3NEW3Ocjs.bytesToHex.call(void 0, tokenValue);
|
|
906
|
+
}
|
|
907
|
+
}
|
|
908
|
+
result.authorization_token = tok;
|
|
870
909
|
} else if (paramType === PARAM_AUTHORITY) {
|
|
871
910
|
result.authority = textDecoder.decode(bytes);
|
|
911
|
+
} else if (paramType === PARAM_MOQT_IMPLEMENTATION) {
|
|
912
|
+
result.moqt_implementation = textDecoder.decode(bytes);
|
|
872
913
|
} else {
|
|
873
914
|
unknown.push({
|
|
874
915
|
id: `0x${paramType.toString(16)}`,
|
|
@@ -1851,4 +1892,5 @@ function createDraft14Codec() {
|
|
|
1851
1892
|
|
|
1852
1893
|
|
|
1853
1894
|
|
|
1854
|
-
|
|
1895
|
+
|
|
1896
|
+
exports.MSG_SUBSCRIBE_UPDATE = MSG_SUBSCRIBE_UPDATE; exports.MSG_SUBSCRIBE = MSG_SUBSCRIBE; exports.MSG_SUBSCRIBE_OK = MSG_SUBSCRIBE_OK; exports.MSG_SUBSCRIBE_ERROR = MSG_SUBSCRIBE_ERROR; exports.MSG_PUBLISH_NAMESPACE = MSG_PUBLISH_NAMESPACE; exports.MSG_PUBLISH_NAMESPACE_OK = MSG_PUBLISH_NAMESPACE_OK; exports.MSG_PUBLISH_NAMESPACE_ERROR = MSG_PUBLISH_NAMESPACE_ERROR; exports.MSG_PUBLISH_NAMESPACE_DONE = MSG_PUBLISH_NAMESPACE_DONE; exports.MSG_UNSUBSCRIBE = MSG_UNSUBSCRIBE; exports.MSG_PUBLISH_DONE = MSG_PUBLISH_DONE; exports.MSG_PUBLISH_NAMESPACE_CANCEL = MSG_PUBLISH_NAMESPACE_CANCEL; exports.MSG_TRACK_STATUS = MSG_TRACK_STATUS; exports.MSG_TRACK_STATUS_OK = MSG_TRACK_STATUS_OK; exports.MSG_TRACK_STATUS_ERROR = MSG_TRACK_STATUS_ERROR; exports.MSG_GOAWAY = MSG_GOAWAY; exports.MSG_SUBSCRIBE_NAMESPACE = MSG_SUBSCRIBE_NAMESPACE; exports.MSG_SUBSCRIBE_NAMESPACE_OK = MSG_SUBSCRIBE_NAMESPACE_OK; exports.MSG_SUBSCRIBE_NAMESPACE_ERROR = MSG_SUBSCRIBE_NAMESPACE_ERROR; exports.MSG_UNSUBSCRIBE_NAMESPACE = MSG_UNSUBSCRIBE_NAMESPACE; exports.MSG_MAX_REQUEST_ID = MSG_MAX_REQUEST_ID; exports.MSG_FETCH = MSG_FETCH; exports.MSG_FETCH_CANCEL = MSG_FETCH_CANCEL; exports.MSG_FETCH_OK = MSG_FETCH_OK; exports.MSG_FETCH_ERROR = MSG_FETCH_ERROR; exports.MSG_REQUESTS_BLOCKED = MSG_REQUESTS_BLOCKED; exports.MSG_PUBLISH = MSG_PUBLISH; exports.MSG_PUBLISH_OK = MSG_PUBLISH_OK; exports.MSG_PUBLISH_ERROR = MSG_PUBLISH_ERROR; exports.MSG_CLIENT_SETUP = MSG_CLIENT_SETUP; exports.MSG_SERVER_SETUP = MSG_SERVER_SETUP; exports.PARAM_ROLE = PARAM_ROLE; exports.PARAM_PATH = PARAM_PATH; exports.PARAM_MAX_REQUEST_ID = PARAM_MAX_REQUEST_ID; exports.PARAM_MOQT_IMPLEMENTATION = PARAM_MOQT_IMPLEMENTATION; exports.MESSAGE_TYPE_MAP = MESSAGE_TYPE_MAP; exports.MESSAGE_ID_MAP = MESSAGE_ID_MAP; exports.FilterType = FilterType; exports.GroupOrder = GroupOrder; exports.FetchType = FetchType; exports.encodeSubgroupStream = encodeSubgroupStream; exports.encodeDatagram = encodeDatagram; exports.encodeFetchStream = encodeFetchStream; exports.decodeSubgroupStream = decodeSubgroupStream; exports.decodeDatagram = decodeDatagram; exports.decodeFetchStream = decodeFetchStream; exports.decodeDataStream = decodeDataStream; exports.createSubgroupStreamDecoder = createSubgroupStreamDecoder; exports.createFetchStreamDecoder = createFetchStreamDecoder; exports.createDataStreamDecoder = createDataStreamDecoder; exports.encodeMessage = encodeMessage; exports.decodeMessage = decodeMessage; exports.createStreamDecoder = createStreamDecoder; exports.createDraft14Codec = createDraft14Codec;
|
|
@@ -40,6 +40,7 @@ var MSG_SERVER_SETUP = 0x21n;
|
|
|
40
40
|
var PARAM_ROLE = 0x00n;
|
|
41
41
|
var PARAM_PATH = 0x01n;
|
|
42
42
|
var PARAM_MAX_REQUEST_ID = 0x02n;
|
|
43
|
+
var PARAM_MOQT_IMPLEMENTATION = 0x07n;
|
|
43
44
|
var MESSAGE_TYPE_MAP = /* @__PURE__ */ new Map([
|
|
44
45
|
[MSG_CLIENT_SETUP, "client_setup"],
|
|
45
46
|
[MSG_SERVER_SETUP, "server_setup"],
|
|
@@ -800,8 +801,10 @@ function encodeSetupParams(params, writer) {
|
|
|
800
801
|
if (params.role !== void 0) count++;
|
|
801
802
|
if (params.path !== void 0) count++;
|
|
802
803
|
if (params.max_request_id !== void 0) count++;
|
|
804
|
+
if (params.authorization_token !== void 0) count++;
|
|
803
805
|
if (params.authority !== void 0) count++;
|
|
804
806
|
if (params.max_auth_token_cache_size !== void 0) count++;
|
|
807
|
+
if (params.moqt_implementation !== void 0) count++;
|
|
805
808
|
if (params.unknown) count += params.unknown.length;
|
|
806
809
|
writer.writeVarInt(count);
|
|
807
810
|
if (params.role !== void 0) {
|
|
@@ -818,6 +821,24 @@ function encodeSetupParams(params, writer) {
|
|
|
818
821
|
writer.writeVarInt(PARAM_MAX_REQUEST_ID);
|
|
819
822
|
writer.writeVarInt(params.max_request_id);
|
|
820
823
|
}
|
|
824
|
+
if (params.authorization_token !== void 0) {
|
|
825
|
+
writer.writeVarInt(PARAM_AUTHORIZATION_TOKEN);
|
|
826
|
+
const tok = params.authorization_token;
|
|
827
|
+
const tmpWriter = new BufferWriter(64);
|
|
828
|
+
tmpWriter.writeVarInt(tok.alias_type);
|
|
829
|
+
if (tok.token_type !== void 0) {
|
|
830
|
+
tmpWriter.writeVarInt(tok.token_type);
|
|
831
|
+
}
|
|
832
|
+
if (tok.token_value !== void 0) {
|
|
833
|
+
tmpWriter.writeBytes(hexToBytes(tok.token_value));
|
|
834
|
+
}
|
|
835
|
+
if (tok.token_alias !== void 0) {
|
|
836
|
+
tmpWriter.writeVarInt(tok.token_alias);
|
|
837
|
+
}
|
|
838
|
+
const tokenBytes = tmpWriter.finish();
|
|
839
|
+
writer.writeVarInt(tokenBytes.byteLength);
|
|
840
|
+
writer.writeBytes(tokenBytes);
|
|
841
|
+
}
|
|
821
842
|
if (params.max_auth_token_cache_size !== void 0) {
|
|
822
843
|
writer.writeVarInt(PARAM_MAX_AUTH_TOKEN_CACHE_SIZE);
|
|
823
844
|
writer.writeVarInt(params.max_auth_token_cache_size);
|
|
@@ -828,6 +849,12 @@ function encodeSetupParams(params, writer) {
|
|
|
828
849
|
writer.writeVarInt(encoded.byteLength);
|
|
829
850
|
writer.writeBytes(encoded);
|
|
830
851
|
}
|
|
852
|
+
if (params.moqt_implementation !== void 0) {
|
|
853
|
+
writer.writeVarInt(PARAM_MOQT_IMPLEMENTATION);
|
|
854
|
+
const encoded = textEncoder.encode(params.moqt_implementation);
|
|
855
|
+
writer.writeVarInt(encoded.byteLength);
|
|
856
|
+
writer.writeBytes(encoded);
|
|
857
|
+
}
|
|
831
858
|
if (params.unknown) {
|
|
832
859
|
for (const u of params.unknown) {
|
|
833
860
|
const id = BigInt(u.id);
|
|
@@ -867,8 +894,22 @@ function decodeSetupParams(reader) {
|
|
|
867
894
|
const bytes = reader.readBytes(length);
|
|
868
895
|
if (paramType === PARAM_PATH) {
|
|
869
896
|
result.path = textDecoder.decode(bytes);
|
|
897
|
+
} else if (paramType === PARAM_AUTHORIZATION_TOKEN) {
|
|
898
|
+
const tokenReader = new BufferReader(bytes);
|
|
899
|
+
const alias_type = tokenReader.readVarInt();
|
|
900
|
+
const tok = { alias_type };
|
|
901
|
+
if (tokenReader.remaining > 0) {
|
|
902
|
+
tok.token_type = tokenReader.readVarInt();
|
|
903
|
+
if (tokenReader.remaining > 0) {
|
|
904
|
+
const tokenValue = tokenReader.readBytesView(tokenReader.remaining);
|
|
905
|
+
tok.token_value = bytesToHex(tokenValue);
|
|
906
|
+
}
|
|
907
|
+
}
|
|
908
|
+
result.authorization_token = tok;
|
|
870
909
|
} else if (paramType === PARAM_AUTHORITY) {
|
|
871
910
|
result.authority = textDecoder.decode(bytes);
|
|
911
|
+
} else if (paramType === PARAM_MOQT_IMPLEMENTATION) {
|
|
912
|
+
result.moqt_implementation = textDecoder.decode(bytes);
|
|
872
913
|
} else {
|
|
873
914
|
unknown.push({
|
|
874
915
|
id: `0x${paramType.toString(16)}`,
|
|
@@ -1832,6 +1873,7 @@ export {
|
|
|
1832
1873
|
PARAM_ROLE,
|
|
1833
1874
|
PARAM_PATH,
|
|
1834
1875
|
PARAM_MAX_REQUEST_ID,
|
|
1876
|
+
PARAM_MOQT_IMPLEMENTATION,
|
|
1835
1877
|
MESSAGE_TYPE_MAP,
|
|
1836
1878
|
MESSAGE_ID_MAP,
|
|
1837
1879
|
FilterType,
|
|
@@ -374,6 +374,7 @@ function encodeSetupParams(params, w) {
|
|
|
374
374
|
let count = 0;
|
|
375
375
|
if (params.path !== void 0) count++;
|
|
376
376
|
if (params.max_request_id !== void 0) count++;
|
|
377
|
+
if (params.authorization_token !== void 0) count++;
|
|
377
378
|
if (params.unknown) count += params.unknown.length;
|
|
378
379
|
w.writeVarInt(count);
|
|
379
380
|
if (params.path !== void 0) {
|
|
@@ -386,6 +387,18 @@ function encodeSetupParams(params, w) {
|
|
|
386
387
|
w.writeVarInt(SETUP_PARAM_MAX_REQUEST_ID);
|
|
387
388
|
w.writeVarInt(params.max_request_id);
|
|
388
389
|
}
|
|
390
|
+
if (params.authorization_token !== void 0) {
|
|
391
|
+
w.writeVarInt(PARAM_AUTHORIZATION_TOKEN);
|
|
392
|
+
const at = params.authorization_token;
|
|
393
|
+
const tmpW = new BufferWriter(64);
|
|
394
|
+
tmpW.writeVarInt(at.alias_type);
|
|
395
|
+
tmpW.writeVarInt(at.token_type);
|
|
396
|
+
const tokenBytes = textEncoder.encode(at.token_value);
|
|
397
|
+
tmpW.writeBytes(tokenBytes);
|
|
398
|
+
const raw = tmpW.finish();
|
|
399
|
+
w.writeVarInt(raw.byteLength);
|
|
400
|
+
w.writeBytes(raw);
|
|
401
|
+
}
|
|
389
402
|
if (params.unknown) {
|
|
390
403
|
for (const u of params.unknown) {
|
|
391
404
|
const id = BigInt(u.id);
|
|
@@ -424,10 +437,22 @@ function decodeSetupParams(r) {
|
|
|
424
437
|
}
|
|
425
438
|
} else {
|
|
426
439
|
const length = Number(r.readVarInt());
|
|
427
|
-
const
|
|
440
|
+
const startOff = r.offset;
|
|
428
441
|
if (paramType === SETUP_PARAM_PATH) {
|
|
442
|
+
const bytes = r.readBytes(length);
|
|
429
443
|
result.path = textDecoder.decode(bytes);
|
|
444
|
+
} else if (paramType === PARAM_AUTHORIZATION_TOKEN) {
|
|
445
|
+
const alias_type = r.readVarInt();
|
|
446
|
+
const token_type = r.readVarInt();
|
|
447
|
+
const tokenBytesLen = length - (r.offset - startOff);
|
|
448
|
+
const tokenBytes = r.readBytes(tokenBytesLen);
|
|
449
|
+
result.authorization_token = {
|
|
450
|
+
alias_type,
|
|
451
|
+
token_type,
|
|
452
|
+
token_value: textDecoder.decode(tokenBytes)
|
|
453
|
+
};
|
|
430
454
|
} else {
|
|
455
|
+
const bytes = r.readBytes(length);
|
|
431
456
|
unknown.push({
|
|
432
457
|
id: `0x${paramType.toString(16)}`,
|
|
433
458
|
length,
|
|
@@ -374,6 +374,7 @@ function encodeSetupParams(params, w) {
|
|
|
374
374
|
let count = 0;
|
|
375
375
|
if (params.path !== void 0) count++;
|
|
376
376
|
if (params.max_request_id !== void 0) count++;
|
|
377
|
+
if (params.authorization_token !== void 0) count++;
|
|
377
378
|
if (params.unknown) count += params.unknown.length;
|
|
378
379
|
w.writeVarInt(count);
|
|
379
380
|
if (params.path !== void 0) {
|
|
@@ -386,6 +387,18 @@ function encodeSetupParams(params, w) {
|
|
|
386
387
|
w.writeVarInt(SETUP_PARAM_MAX_REQUEST_ID);
|
|
387
388
|
w.writeVarInt(params.max_request_id);
|
|
388
389
|
}
|
|
390
|
+
if (params.authorization_token !== void 0) {
|
|
391
|
+
w.writeVarInt(PARAM_AUTHORIZATION_TOKEN);
|
|
392
|
+
const at = params.authorization_token;
|
|
393
|
+
const tmpW = new (0, _chunkJL3NEW3Ocjs.BufferWriter)(64);
|
|
394
|
+
tmpW.writeVarInt(at.alias_type);
|
|
395
|
+
tmpW.writeVarInt(at.token_type);
|
|
396
|
+
const tokenBytes = textEncoder.encode(at.token_value);
|
|
397
|
+
tmpW.writeBytes(tokenBytes);
|
|
398
|
+
const raw = tmpW.finish();
|
|
399
|
+
w.writeVarInt(raw.byteLength);
|
|
400
|
+
w.writeBytes(raw);
|
|
401
|
+
}
|
|
389
402
|
if (params.unknown) {
|
|
390
403
|
for (const u of params.unknown) {
|
|
391
404
|
const id = BigInt(u.id);
|
|
@@ -424,10 +437,22 @@ function decodeSetupParams(r) {
|
|
|
424
437
|
}
|
|
425
438
|
} else {
|
|
426
439
|
const length = Number(r.readVarInt());
|
|
427
|
-
const
|
|
440
|
+
const startOff = r.offset;
|
|
428
441
|
if (paramType === SETUP_PARAM_PATH) {
|
|
442
|
+
const bytes = r.readBytes(length);
|
|
429
443
|
result.path = textDecoder.decode(bytes);
|
|
444
|
+
} else if (paramType === PARAM_AUTHORIZATION_TOKEN) {
|
|
445
|
+
const alias_type = r.readVarInt();
|
|
446
|
+
const token_type = r.readVarInt();
|
|
447
|
+
const tokenBytesLen = length - (r.offset - startOff);
|
|
448
|
+
const tokenBytes = r.readBytes(tokenBytesLen);
|
|
449
|
+
result.authorization_token = {
|
|
450
|
+
alias_type,
|
|
451
|
+
token_type,
|
|
452
|
+
token_value: textDecoder.decode(tokenBytes)
|
|
453
|
+
};
|
|
430
454
|
} else {
|
|
455
|
+
const bytes = r.readBytes(length);
|
|
431
456
|
unknown.push({
|
|
432
457
|
id: `0x${paramType.toString(16)}`,
|
|
433
458
|
length,
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { B as BaseCodec, b as DecodeResult } from './types-DuIO7cWK.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--FGt0sAp.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-DuIO7cWK.cjs';
|
|
2
|
-
import { D as Draft12Message, S as SubgroupStream, c as DatagramObject, F as FetchStream, b as Draft12DataStream } from './types-
|
|
2
|
+
import { D as Draft12Message, S as SubgroupStream, c as DatagramObject, F as FetchStream, b as Draft12DataStream } from './types-DuyE0ygT.cjs';
|
|
3
3
|
|
|
4
4
|
/**
|
|
5
5
|
* Encode a draft-12 control message.
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { B as BaseCodec, b as DecodeResult } from './types-DuIO7cWK.js';
|
|
2
|
-
import { D as Draft12Message, S as SubgroupStream, c as DatagramObject, F as FetchStream, b as Draft12DataStream } from './types-
|
|
2
|
+
import { D as Draft12Message, S as SubgroupStream, c as DatagramObject, F as FetchStream, b as Draft12DataStream } from './types-DuyE0ygT.js';
|
|
3
3
|
|
|
4
4
|
/**
|
|
5
5
|
* Encode a draft-12 control message.
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { B as BaseCodec, b as DecodeResult } from './types-DuIO7cWK.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--FGt0sAp.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-C7UONex5.cjs';
|
|
2
2
|
export { A as AnnouncePhase, b as AnnounceState, F as FetchPhase, c as FetchState, P as ProtocolViolation, d as ProtocolViolationCode, g as SessionPhase, h as SideEffect, i as SubscriptionPhase, j as SubscriptionState, T as TransitionResult, V as ValidationResult } from './session-types-C7UONex5.cjs';
|
|
3
|
-
import { D as Draft12Message, a as Draft12MessageType } from './types-
|
|
3
|
+
import { D as Draft12Message, a as Draft12MessageType } from './types-DuyE0ygT.cjs';
|
|
4
4
|
import './types-DuIO7cWK.cjs';
|
|
5
5
|
|
|
6
6
|
declare function createDraft12SessionState(role: SessionStateOptionsRole): SessionState<Draft12Message, Draft12MessageType>;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { k as SessionStateOptionsRole, a as SessionState } from './session-types-X-IYEGoG.js';
|
|
2
2
|
export { A as AnnouncePhase, b as AnnounceState, F as FetchPhase, c as FetchState, P as ProtocolViolation, d as ProtocolViolationCode, g as SessionPhase, h as SideEffect, i as SubscriptionPhase, j as SubscriptionState, T as TransitionResult, V as ValidationResult } from './session-types-X-IYEGoG.js';
|
|
3
|
-
import { D as Draft12Message, a as Draft12MessageType } from './types-
|
|
3
|
+
import { D as Draft12Message, a as Draft12MessageType } from './types-DuyE0ygT.js';
|
|
4
4
|
import './types-DuIO7cWK.js';
|
|
5
5
|
|
|
6
6
|
declare function createDraft12SessionState(role: SessionStateOptionsRole): SessionState<Draft12Message, Draft12MessageType>;
|
package/dist/draft12.cjs
CHANGED
|
@@ -46,7 +46,7 @@
|
|
|
46
46
|
|
|
47
47
|
|
|
48
48
|
|
|
49
|
-
var
|
|
49
|
+
var _chunkWPFBK7UXcjs = require('./chunk-WPFBK7UX.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 = _chunkWPFBK7UXcjs.MESSAGE_ID_MAP; exports.MESSAGE_TYPE_MAP = _chunkWPFBK7UXcjs.MESSAGE_TYPE_MAP; exports.MSG_ANNOUNCE = _chunkWPFBK7UXcjs.MSG_ANNOUNCE; exports.MSG_ANNOUNCE_CANCEL = _chunkWPFBK7UXcjs.MSG_ANNOUNCE_CANCEL; exports.MSG_ANNOUNCE_ERROR = _chunkWPFBK7UXcjs.MSG_ANNOUNCE_ERROR; exports.MSG_ANNOUNCE_OK = _chunkWPFBK7UXcjs.MSG_ANNOUNCE_OK; exports.MSG_CLIENT_SETUP = _chunkWPFBK7UXcjs.MSG_CLIENT_SETUP; exports.MSG_FETCH = _chunkWPFBK7UXcjs.MSG_FETCH; exports.MSG_FETCH_CANCEL = _chunkWPFBK7UXcjs.MSG_FETCH_CANCEL; exports.MSG_FETCH_ERROR = _chunkWPFBK7UXcjs.MSG_FETCH_ERROR; exports.MSG_FETCH_OK = _chunkWPFBK7UXcjs.MSG_FETCH_OK; exports.MSG_GOAWAY = _chunkWPFBK7UXcjs.MSG_GOAWAY; exports.MSG_MAX_REQUEST_ID = _chunkWPFBK7UXcjs.MSG_MAX_REQUEST_ID; exports.MSG_PUBLISH = _chunkWPFBK7UXcjs.MSG_PUBLISH; exports.MSG_PUBLISH_ERROR = _chunkWPFBK7UXcjs.MSG_PUBLISH_ERROR; exports.MSG_PUBLISH_OK = _chunkWPFBK7UXcjs.MSG_PUBLISH_OK; exports.MSG_REQUESTS_BLOCKED = _chunkWPFBK7UXcjs.MSG_REQUESTS_BLOCKED; exports.MSG_SERVER_SETUP = _chunkWPFBK7UXcjs.MSG_SERVER_SETUP; exports.MSG_SUBSCRIBE = _chunkWPFBK7UXcjs.MSG_SUBSCRIBE; exports.MSG_SUBSCRIBE_ANNOUNCES = _chunkWPFBK7UXcjs.MSG_SUBSCRIBE_ANNOUNCES; exports.MSG_SUBSCRIBE_ANNOUNCES_ERROR = _chunkWPFBK7UXcjs.MSG_SUBSCRIBE_ANNOUNCES_ERROR; exports.MSG_SUBSCRIBE_ANNOUNCES_OK = _chunkWPFBK7UXcjs.MSG_SUBSCRIBE_ANNOUNCES_OK; exports.MSG_SUBSCRIBE_DONE = _chunkWPFBK7UXcjs.MSG_SUBSCRIBE_DONE; exports.MSG_SUBSCRIBE_ERROR = _chunkWPFBK7UXcjs.MSG_SUBSCRIBE_ERROR; exports.MSG_SUBSCRIBE_OK = _chunkWPFBK7UXcjs.MSG_SUBSCRIBE_OK; exports.MSG_SUBSCRIBE_UPDATE = _chunkWPFBK7UXcjs.MSG_SUBSCRIBE_UPDATE; exports.MSG_TRACK_STATUS = _chunkWPFBK7UXcjs.MSG_TRACK_STATUS; exports.MSG_TRACK_STATUS_REQUEST = _chunkWPFBK7UXcjs.MSG_TRACK_STATUS_REQUEST; exports.MSG_UNANNOUNCE = _chunkWPFBK7UXcjs.MSG_UNANNOUNCE; exports.MSG_UNSUBSCRIBE = _chunkWPFBK7UXcjs.MSG_UNSUBSCRIBE; exports.MSG_UNSUBSCRIBE_ANNOUNCES = _chunkWPFBK7UXcjs.MSG_UNSUBSCRIBE_ANNOUNCES; exports.PARAM_AUTHORIZATION_TOKEN = _chunkWPFBK7UXcjs.PARAM_AUTHORIZATION_TOKEN; exports.PARAM_DELIVERY_TIMEOUT = _chunkWPFBK7UXcjs.PARAM_DELIVERY_TIMEOUT; exports.SERVER_ONLY_MESSAGES = _chunkH5NSL4MOcjs.SERVER_ONLY_MESSAGES; exports.SETUP_PARAM_MAX_REQUEST_ID = _chunkWPFBK7UXcjs.SETUP_PARAM_MAX_REQUEST_ID; exports.SETUP_PARAM_PATH = _chunkWPFBK7UXcjs.SETUP_PARAM_PATH; exports.VARINT_FRAMED_MESSAGES = _chunkWPFBK7UXcjs.VARINT_FRAMED_MESSAGES; exports.createDraft12Codec = _chunkWPFBK7UXcjs.createDraft12Codec; exports.createDraft12SessionState = _chunkH5NSL4MOcjs.createDraft12SessionState; exports.createStreamDecoder = _chunkWPFBK7UXcjs.createStreamDecoder; exports.decodeDataStream = _chunkWPFBK7UXcjs.decodeDataStream; exports.decodeDatagram = _chunkWPFBK7UXcjs.decodeDatagram; exports.decodeFetchStream = _chunkWPFBK7UXcjs.decodeFetchStream; exports.decodeMessage = _chunkWPFBK7UXcjs.decodeMessage; exports.decodeSubgroupStream = _chunkWPFBK7UXcjs.decodeSubgroupStream; exports.encodeDatagram = _chunkWPFBK7UXcjs.encodeDatagram; exports.encodeFetchStream = _chunkWPFBK7UXcjs.encodeFetchStream; exports.encodeMessage = _chunkWPFBK7UXcjs.encodeMessage; exports.encodeSubgroupStream = _chunkWPFBK7UXcjs.encodeSubgroupStream; exports.getLegalIncoming = _chunkH5NSL4MOcjs.getLegalIncoming; exports.getLegalOutgoing = _chunkH5NSL4MOcjs.getLegalOutgoing;
|
package/dist/draft12.d.cts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
export { D as Draft12Codec, c as createDraft12Codec, a as createStreamDecoder, d as decodeMessage, e as encodeMessage } from './codec-
|
|
2
|
-
import { b as Draft12DataStream, c as DatagramObject, F as FetchStream, S as SubgroupStream, a as Draft12MessageType, D as Draft12Message } from './types-
|
|
3
|
-
export { A as AuthorizationToken, d as DataStreamEvent, e as DataStreamHeader, f as Draft12Announce, g as Draft12AnnounceCancel, h as Draft12AnnounceError, i as Draft12AnnounceOk, j as Draft12BaseMessage, k as Draft12ClientSetup, l as Draft12Fetch, m as Draft12FetchCancel, n as Draft12FetchError, o as Draft12FetchOk, p as Draft12GoAway, q as Draft12MaxRequestId, r as Draft12Params, s as Draft12Publish, t as Draft12PublishError, u as Draft12PublishOk, v as Draft12RequestsBlocked, w as Draft12ServerSetup, x as Draft12SetupParams, y as Draft12Subscribe, z as Draft12SubscribeAnnounces, B as Draft12SubscribeAnnouncesError, C as Draft12SubscribeAnnouncesOk, E as Draft12SubscribeDone, G as Draft12SubscribeError, H as Draft12SubscribeOk, I as Draft12SubscribeUpdate, J as Draft12TrackStatus, K as Draft12TrackStatusRequest, L as Draft12Unannounce, M as Draft12Unsubscribe, N as Draft12UnsubscribeAnnounces, O as FetchObjectPayload, P as FetchStreamHeader, Q as JoiningFetch, R as LargestLocation, T as ObjectPayload, U as StandaloneFetch, V as SubgroupStreamHeader, W as UnknownParam } from './types-
|
|
1
|
+
export { D as Draft12Codec, c as createDraft12Codec, a as createStreamDecoder, d as decodeMessage, e as encodeMessage } from './codec-CpBWhz9f.cjs';
|
|
2
|
+
import { b as Draft12DataStream, c as DatagramObject, F as FetchStream, S as SubgroupStream, a as Draft12MessageType, D as Draft12Message } from './types-DuyE0ygT.cjs';
|
|
3
|
+
export { A as AuthorizationToken, d as DataStreamEvent, e as DataStreamHeader, f as Draft12Announce, g as Draft12AnnounceCancel, h as Draft12AnnounceError, i as Draft12AnnounceOk, j as Draft12BaseMessage, k as Draft12ClientSetup, l as Draft12Fetch, m as Draft12FetchCancel, n as Draft12FetchError, o as Draft12FetchOk, p as Draft12GoAway, q as Draft12MaxRequestId, r as Draft12Params, s as Draft12Publish, t as Draft12PublishError, u as Draft12PublishOk, v as Draft12RequestsBlocked, w as Draft12ServerSetup, x as Draft12SetupParams, y as Draft12Subscribe, z as Draft12SubscribeAnnounces, B as Draft12SubscribeAnnouncesError, C as Draft12SubscribeAnnouncesOk, E as Draft12SubscribeDone, G as Draft12SubscribeError, H as Draft12SubscribeOk, I as Draft12SubscribeUpdate, J as Draft12TrackStatus, K as Draft12TrackStatusRequest, L as Draft12Unannounce, M as Draft12Unsubscribe, N as Draft12UnsubscribeAnnounces, O as FetchObjectPayload, P as FetchStreamHeader, Q as JoiningFetch, R as LargestLocation, T as ObjectPayload, U as StandaloneFetch, V as SubgroupStreamHeader, W as UnknownParam } from './types-DuyE0ygT.cjs';
|
|
4
4
|
export { createDraft12SessionState } from './draft12-session.cjs';
|
|
5
5
|
import { g as SessionPhase, j as SubscriptionState, b as AnnounceState, c as FetchState, V as ValidationResult, T as TransitionResult } from './session-types-C7UONex5.cjs';
|
|
6
6
|
export { A as AnnouncePhase, F as FetchPhase, P as ProtocolViolation, d as ProtocolViolationCode, a as SessionState, h as SideEffect, i as SubscriptionPhase } from './session-types-C7UONex5.cjs';
|
package/dist/draft12.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
export { D as Draft12Codec, c as createDraft12Codec, a as createStreamDecoder, d as decodeMessage, e as encodeMessage } from './codec-
|
|
2
|
-
import { b as Draft12DataStream, c as DatagramObject, F as FetchStream, S as SubgroupStream, a as Draft12MessageType, D as Draft12Message } from './types-
|
|
3
|
-
export { A as AuthorizationToken, d as DataStreamEvent, e as DataStreamHeader, f as Draft12Announce, g as Draft12AnnounceCancel, h as Draft12AnnounceError, i as Draft12AnnounceOk, j as Draft12BaseMessage, k as Draft12ClientSetup, l as Draft12Fetch, m as Draft12FetchCancel, n as Draft12FetchError, o as Draft12FetchOk, p as Draft12GoAway, q as Draft12MaxRequestId, r as Draft12Params, s as Draft12Publish, t as Draft12PublishError, u as Draft12PublishOk, v as Draft12RequestsBlocked, w as Draft12ServerSetup, x as Draft12SetupParams, y as Draft12Subscribe, z as Draft12SubscribeAnnounces, B as Draft12SubscribeAnnouncesError, C as Draft12SubscribeAnnouncesOk, E as Draft12SubscribeDone, G as Draft12SubscribeError, H as Draft12SubscribeOk, I as Draft12SubscribeUpdate, J as Draft12TrackStatus, K as Draft12TrackStatusRequest, L as Draft12Unannounce, M as Draft12Unsubscribe, N as Draft12UnsubscribeAnnounces, O as FetchObjectPayload, P as FetchStreamHeader, Q as JoiningFetch, R as LargestLocation, T as ObjectPayload, U as StandaloneFetch, V as SubgroupStreamHeader, W as UnknownParam } from './types-
|
|
1
|
+
export { D as Draft12Codec, c as createDraft12Codec, a as createStreamDecoder, d as decodeMessage, e as encodeMessage } from './codec-D8REY9TB.js';
|
|
2
|
+
import { b as Draft12DataStream, c as DatagramObject, F as FetchStream, S as SubgroupStream, a as Draft12MessageType, D as Draft12Message } from './types-DuyE0ygT.js';
|
|
3
|
+
export { A as AuthorizationToken, d as DataStreamEvent, e as DataStreamHeader, f as Draft12Announce, g as Draft12AnnounceCancel, h as Draft12AnnounceError, i as Draft12AnnounceOk, j as Draft12BaseMessage, k as Draft12ClientSetup, l as Draft12Fetch, m as Draft12FetchCancel, n as Draft12FetchError, o as Draft12FetchOk, p as Draft12GoAway, q as Draft12MaxRequestId, r as Draft12Params, s as Draft12Publish, t as Draft12PublishError, u as Draft12PublishOk, v as Draft12RequestsBlocked, w as Draft12ServerSetup, x as Draft12SetupParams, y as Draft12Subscribe, z as Draft12SubscribeAnnounces, B as Draft12SubscribeAnnouncesError, C as Draft12SubscribeAnnouncesOk, E as Draft12SubscribeDone, G as Draft12SubscribeError, H as Draft12SubscribeOk, I as Draft12SubscribeUpdate, J as Draft12TrackStatus, K as Draft12TrackStatusRequest, L as Draft12Unannounce, M as Draft12Unsubscribe, N as Draft12UnsubscribeAnnounces, O as FetchObjectPayload, P as FetchStreamHeader, Q as JoiningFetch, R as LargestLocation, T as ObjectPayload, U as StandaloneFetch, V as SubgroupStreamHeader, W as UnknownParam } from './types-DuyE0ygT.js';
|
|
4
4
|
export { createDraft12SessionState } from './draft12-session.js';
|
|
5
5
|
import { g as SessionPhase, j as SubscriptionState, b as AnnounceState, c as FetchState, V as ValidationResult, T as TransitionResult } from './session-types-X-IYEGoG.js';
|
|
6
6
|
export { A as AnnouncePhase, F as FetchPhase, P as ProtocolViolation, d as ProtocolViolationCode, a as SessionState, h as SideEffect, i as SubscriptionPhase } from './session-types-X-IYEGoG.js';
|
package/dist/draft12.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { k as SessionStateOptionsRole, a as SessionState } from './session-types-C7UONex5.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-C7UONex5.cjs';
|
|
3
|
-
import { D as Draft14Message, a as Draft14MessageType } from './types
|
|
3
|
+
import { D as Draft14Message, a as Draft14MessageType } from './types--FGt0sAp.cjs';
|
|
4
4
|
import './types-DuIO7cWK.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-X-IYEGoG.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-X-IYEGoG.js';
|
|
3
|
-
import { D as Draft14Message, a as Draft14MessageType } from './types
|
|
3
|
+
import { D as Draft14Message, a as Draft14MessageType } from './types--FGt0sAp.js';
|
|
4
4
|
import './types-DuIO7cWK.js';
|
|
5
5
|
|
|
6
6
|
declare function createDraft14SessionState(role: SessionStateOptionsRole): SessionState<Draft14Message, Draft14MessageType>;
|
package/dist/draft14.cjs
CHANGED
|
@@ -51,7 +51,8 @@
|
|
|
51
51
|
|
|
52
52
|
|
|
53
53
|
|
|
54
|
-
|
|
54
|
+
|
|
55
|
+
var _chunk2SGE5GMUcjs = require('./chunk-2SGE5GMU.cjs');
|
|
55
56
|
|
|
56
57
|
|
|
57
58
|
|
|
@@ -128,4 +129,5 @@ var DRAFT_VERSION = 0xff00000en;
|
|
|
128
129
|
|
|
129
130
|
|
|
130
131
|
|
|
131
|
-
|
|
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 = _chunk2SGE5GMUcjs.FetchType; exports.FilterType = _chunk2SGE5GMUcjs.FilterType; exports.GroupOrder = _chunk2SGE5GMUcjs.GroupOrder; exports.MESSAGE_ID_MAP = _chunk2SGE5GMUcjs.MESSAGE_ID_MAP; exports.MESSAGE_TYPE_MAP = _chunk2SGE5GMUcjs.MESSAGE_TYPE_MAP; exports.MSG_CLIENT_SETUP = _chunk2SGE5GMUcjs.MSG_CLIENT_SETUP; exports.MSG_FETCH = _chunk2SGE5GMUcjs.MSG_FETCH; exports.MSG_FETCH_CANCEL = _chunk2SGE5GMUcjs.MSG_FETCH_CANCEL; exports.MSG_FETCH_ERROR = _chunk2SGE5GMUcjs.MSG_FETCH_ERROR; exports.MSG_FETCH_OK = _chunk2SGE5GMUcjs.MSG_FETCH_OK; exports.MSG_GOAWAY = _chunk2SGE5GMUcjs.MSG_GOAWAY; exports.MSG_MAX_REQUEST_ID = _chunk2SGE5GMUcjs.MSG_MAX_REQUEST_ID; exports.MSG_PUBLISH = _chunk2SGE5GMUcjs.MSG_PUBLISH; exports.MSG_PUBLISH_DONE = _chunk2SGE5GMUcjs.MSG_PUBLISH_DONE; exports.MSG_PUBLISH_ERROR = _chunk2SGE5GMUcjs.MSG_PUBLISH_ERROR; exports.MSG_PUBLISH_NAMESPACE = _chunk2SGE5GMUcjs.MSG_PUBLISH_NAMESPACE; exports.MSG_PUBLISH_NAMESPACE_CANCEL = _chunk2SGE5GMUcjs.MSG_PUBLISH_NAMESPACE_CANCEL; exports.MSG_PUBLISH_NAMESPACE_DONE = _chunk2SGE5GMUcjs.MSG_PUBLISH_NAMESPACE_DONE; exports.MSG_PUBLISH_NAMESPACE_ERROR = _chunk2SGE5GMUcjs.MSG_PUBLISH_NAMESPACE_ERROR; exports.MSG_PUBLISH_NAMESPACE_OK = _chunk2SGE5GMUcjs.MSG_PUBLISH_NAMESPACE_OK; exports.MSG_PUBLISH_OK = _chunk2SGE5GMUcjs.MSG_PUBLISH_OK; exports.MSG_REQUESTS_BLOCKED = _chunk2SGE5GMUcjs.MSG_REQUESTS_BLOCKED; exports.MSG_SERVER_SETUP = _chunk2SGE5GMUcjs.MSG_SERVER_SETUP; exports.MSG_SUBSCRIBE = _chunk2SGE5GMUcjs.MSG_SUBSCRIBE; exports.MSG_SUBSCRIBE_ERROR = _chunk2SGE5GMUcjs.MSG_SUBSCRIBE_ERROR; exports.MSG_SUBSCRIBE_NAMESPACE = _chunk2SGE5GMUcjs.MSG_SUBSCRIBE_NAMESPACE; exports.MSG_SUBSCRIBE_NAMESPACE_ERROR = _chunk2SGE5GMUcjs.MSG_SUBSCRIBE_NAMESPACE_ERROR; exports.MSG_SUBSCRIBE_NAMESPACE_OK = _chunk2SGE5GMUcjs.MSG_SUBSCRIBE_NAMESPACE_OK; exports.MSG_SUBSCRIBE_OK = _chunk2SGE5GMUcjs.MSG_SUBSCRIBE_OK; exports.MSG_SUBSCRIBE_UPDATE = _chunk2SGE5GMUcjs.MSG_SUBSCRIBE_UPDATE; exports.MSG_TRACK_STATUS = _chunk2SGE5GMUcjs.MSG_TRACK_STATUS; exports.MSG_TRACK_STATUS_ERROR = _chunk2SGE5GMUcjs.MSG_TRACK_STATUS_ERROR; exports.MSG_TRACK_STATUS_OK = _chunk2SGE5GMUcjs.MSG_TRACK_STATUS_OK; exports.MSG_UNSUBSCRIBE = _chunk2SGE5GMUcjs.MSG_UNSUBSCRIBE; exports.MSG_UNSUBSCRIBE_NAMESPACE = _chunk2SGE5GMUcjs.MSG_UNSUBSCRIBE_NAMESPACE; exports.PARAM_MAX_REQUEST_ID = _chunk2SGE5GMUcjs.PARAM_MAX_REQUEST_ID; exports.PARAM_MOQT_IMPLEMENTATION = _chunk2SGE5GMUcjs.PARAM_MOQT_IMPLEMENTATION; exports.PARAM_PATH = _chunk2SGE5GMUcjs.PARAM_PATH; exports.PARAM_ROLE = _chunk2SGE5GMUcjs.PARAM_ROLE; exports.SERVER_ONLY_MESSAGES = _chunkE65QKRSNcjs.SERVER_ONLY_MESSAGES; exports.createDataStreamDecoder = _chunk2SGE5GMUcjs.createDataStreamDecoder; exports.createDraft14Codec = _chunk2SGE5GMUcjs.createDraft14Codec; exports.createDraft14SessionState = _chunkE65QKRSNcjs.createDraft14SessionState; exports.createFetchStreamDecoder = _chunk2SGE5GMUcjs.createFetchStreamDecoder; exports.createStreamDecoder = _chunk2SGE5GMUcjs.createStreamDecoder; exports.createSubgroupStreamDecoder = _chunk2SGE5GMUcjs.createSubgroupStreamDecoder; exports.decodeDataStream = _chunk2SGE5GMUcjs.decodeDataStream; exports.decodeDatagram = _chunk2SGE5GMUcjs.decodeDatagram; exports.decodeFetchStream = _chunk2SGE5GMUcjs.decodeFetchStream; exports.decodeMessage = _chunk2SGE5GMUcjs.decodeMessage; exports.decodeSubgroupStream = _chunk2SGE5GMUcjs.decodeSubgroupStream; exports.encodeDatagram = _chunk2SGE5GMUcjs.encodeDatagram; exports.encodeFetchStream = _chunk2SGE5GMUcjs.encodeFetchStream; exports.encodeMessage = _chunk2SGE5GMUcjs.encodeMessage; exports.encodeSubgroupStream = _chunk2SGE5GMUcjs.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-BO5Go0Lm.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--FGt0sAp.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--FGt0sAp.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-C7UONex5.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-C7UONex5.cjs';
|
|
@@ -93,6 +93,7 @@ declare const MSG_SERVER_SETUP = 33n;
|
|
|
93
93
|
declare const PARAM_ROLE = 0n;
|
|
94
94
|
declare const PARAM_PATH = 1n;
|
|
95
95
|
declare const PARAM_MAX_REQUEST_ID = 2n;
|
|
96
|
+
declare const PARAM_MOQT_IMPLEMENTATION = 7n;
|
|
96
97
|
declare const MESSAGE_TYPE_MAP: ReadonlyMap<bigint, string>;
|
|
97
98
|
declare const MESSAGE_ID_MAP: ReadonlyMap<string, bigint>;
|
|
98
99
|
|
|
@@ -161,4 +162,4 @@ declare class Draft14SessionFSM {
|
|
|
161
162
|
|
|
162
163
|
declare const DRAFT_VERSION = 4278190094n;
|
|
163
164
|
|
|
164
|
-
export { BIDIRECTIONAL_MESSAGES, CLIENT_ONLY_MESSAGES, CONTROL_MESSAGES, DRAFT_VERSION, DataStreamEvent, DatagramObject, Draft14DataStream, Draft14Message, Draft14MessageType, Draft14SessionFSM, FetchState, FetchStream, FetchStreamHeader, MESSAGE_ID_MAP, MESSAGE_TYPE_MAP, MSG_CLIENT_SETUP, MSG_FETCH, MSG_FETCH_CANCEL, MSG_FETCH_ERROR, MSG_FETCH_OK, MSG_GOAWAY, MSG_MAX_REQUEST_ID, MSG_PUBLISH, MSG_PUBLISH_DONE, MSG_PUBLISH_ERROR, MSG_PUBLISH_NAMESPACE, MSG_PUBLISH_NAMESPACE_CANCEL, MSG_PUBLISH_NAMESPACE_DONE, MSG_PUBLISH_NAMESPACE_ERROR, MSG_PUBLISH_NAMESPACE_OK, MSG_PUBLISH_OK, MSG_REQUESTS_BLOCKED, MSG_SERVER_SETUP, MSG_SUBSCRIBE, MSG_SUBSCRIBE_ERROR, MSG_SUBSCRIBE_NAMESPACE, MSG_SUBSCRIBE_NAMESPACE_ERROR, MSG_SUBSCRIBE_NAMESPACE_OK, MSG_SUBSCRIBE_OK, MSG_SUBSCRIBE_UPDATE, MSG_TRACK_STATUS, MSG_TRACK_STATUS_ERROR, MSG_TRACK_STATUS_OK, MSG_UNSUBSCRIBE, MSG_UNSUBSCRIBE_NAMESPACE, ObjectPayload, PARAM_MAX_REQUEST_ID, PARAM_PATH, PARAM_ROLE, PublishState, SERVER_ONLY_MESSAGES, SessionPhase, SubgroupStream, SubgroupStreamHeader, SubscriptionState, TransitionResult, ValidationResult, createDataStreamDecoder, createFetchStreamDecoder, createSubgroupStreamDecoder, decodeDataStream, decodeDatagram, decodeFetchStream, decodeSubgroupStream, encodeDatagram, encodeFetchStream, encodeSubgroupStream, getLegalIncoming, getLegalOutgoing };
|
|
165
|
+
export { BIDIRECTIONAL_MESSAGES, CLIENT_ONLY_MESSAGES, CONTROL_MESSAGES, DRAFT_VERSION, DataStreamEvent, DatagramObject, Draft14DataStream, Draft14Message, Draft14MessageType, Draft14SessionFSM, FetchState, FetchStream, FetchStreamHeader, MESSAGE_ID_MAP, MESSAGE_TYPE_MAP, MSG_CLIENT_SETUP, MSG_FETCH, MSG_FETCH_CANCEL, MSG_FETCH_ERROR, MSG_FETCH_OK, MSG_GOAWAY, MSG_MAX_REQUEST_ID, MSG_PUBLISH, MSG_PUBLISH_DONE, MSG_PUBLISH_ERROR, MSG_PUBLISH_NAMESPACE, MSG_PUBLISH_NAMESPACE_CANCEL, MSG_PUBLISH_NAMESPACE_DONE, MSG_PUBLISH_NAMESPACE_ERROR, MSG_PUBLISH_NAMESPACE_OK, MSG_PUBLISH_OK, MSG_REQUESTS_BLOCKED, MSG_SERVER_SETUP, MSG_SUBSCRIBE, MSG_SUBSCRIBE_ERROR, MSG_SUBSCRIBE_NAMESPACE, MSG_SUBSCRIBE_NAMESPACE_ERROR, MSG_SUBSCRIBE_NAMESPACE_OK, MSG_SUBSCRIBE_OK, MSG_SUBSCRIBE_UPDATE, MSG_TRACK_STATUS, MSG_TRACK_STATUS_ERROR, MSG_TRACK_STATUS_OK, MSG_UNSUBSCRIBE, MSG_UNSUBSCRIBE_NAMESPACE, ObjectPayload, PARAM_MAX_REQUEST_ID, PARAM_MOQT_IMPLEMENTATION, PARAM_PATH, PARAM_ROLE, PublishState, SERVER_ONLY_MESSAGES, SessionPhase, SubgroupStream, SubgroupStreamHeader, SubscriptionState, TransitionResult, ValidationResult, createDataStreamDecoder, createFetchStreamDecoder, createSubgroupStreamDecoder, decodeDataStream, decodeDatagram, decodeFetchStream, decodeSubgroupStream, encodeDatagram, encodeFetchStream, encodeSubgroupStream, getLegalIncoming, getLegalOutgoing };
|
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-iMEwV1UO.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--FGt0sAp.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--FGt0sAp.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-X-IYEGoG.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-X-IYEGoG.js';
|
|
@@ -93,6 +93,7 @@ declare const MSG_SERVER_SETUP = 33n;
|
|
|
93
93
|
declare const PARAM_ROLE = 0n;
|
|
94
94
|
declare const PARAM_PATH = 1n;
|
|
95
95
|
declare const PARAM_MAX_REQUEST_ID = 2n;
|
|
96
|
+
declare const PARAM_MOQT_IMPLEMENTATION = 7n;
|
|
96
97
|
declare const MESSAGE_TYPE_MAP: ReadonlyMap<bigint, string>;
|
|
97
98
|
declare const MESSAGE_ID_MAP: ReadonlyMap<string, bigint>;
|
|
98
99
|
|
|
@@ -161,4 +162,4 @@ declare class Draft14SessionFSM {
|
|
|
161
162
|
|
|
162
163
|
declare const DRAFT_VERSION = 4278190094n;
|
|
163
164
|
|
|
164
|
-
export { BIDIRECTIONAL_MESSAGES, CLIENT_ONLY_MESSAGES, CONTROL_MESSAGES, DRAFT_VERSION, DataStreamEvent, DatagramObject, Draft14DataStream, Draft14Message, Draft14MessageType, Draft14SessionFSM, FetchState, FetchStream, FetchStreamHeader, MESSAGE_ID_MAP, MESSAGE_TYPE_MAP, MSG_CLIENT_SETUP, MSG_FETCH, MSG_FETCH_CANCEL, MSG_FETCH_ERROR, MSG_FETCH_OK, MSG_GOAWAY, MSG_MAX_REQUEST_ID, MSG_PUBLISH, MSG_PUBLISH_DONE, MSG_PUBLISH_ERROR, MSG_PUBLISH_NAMESPACE, MSG_PUBLISH_NAMESPACE_CANCEL, MSG_PUBLISH_NAMESPACE_DONE, MSG_PUBLISH_NAMESPACE_ERROR, MSG_PUBLISH_NAMESPACE_OK, MSG_PUBLISH_OK, MSG_REQUESTS_BLOCKED, MSG_SERVER_SETUP, MSG_SUBSCRIBE, MSG_SUBSCRIBE_ERROR, MSG_SUBSCRIBE_NAMESPACE, MSG_SUBSCRIBE_NAMESPACE_ERROR, MSG_SUBSCRIBE_NAMESPACE_OK, MSG_SUBSCRIBE_OK, MSG_SUBSCRIBE_UPDATE, MSG_TRACK_STATUS, MSG_TRACK_STATUS_ERROR, MSG_TRACK_STATUS_OK, MSG_UNSUBSCRIBE, MSG_UNSUBSCRIBE_NAMESPACE, ObjectPayload, PARAM_MAX_REQUEST_ID, PARAM_PATH, PARAM_ROLE, PublishState, SERVER_ONLY_MESSAGES, SessionPhase, SubgroupStream, SubgroupStreamHeader, SubscriptionState, TransitionResult, ValidationResult, createDataStreamDecoder, createFetchStreamDecoder, createSubgroupStreamDecoder, decodeDataStream, decodeDatagram, decodeFetchStream, decodeSubgroupStream, encodeDatagram, encodeFetchStream, encodeSubgroupStream, getLegalIncoming, getLegalOutgoing };
|
|
165
|
+
export { BIDIRECTIONAL_MESSAGES, CLIENT_ONLY_MESSAGES, CONTROL_MESSAGES, DRAFT_VERSION, DataStreamEvent, DatagramObject, Draft14DataStream, Draft14Message, Draft14MessageType, Draft14SessionFSM, FetchState, FetchStream, FetchStreamHeader, MESSAGE_ID_MAP, MESSAGE_TYPE_MAP, MSG_CLIENT_SETUP, MSG_FETCH, MSG_FETCH_CANCEL, MSG_FETCH_ERROR, MSG_FETCH_OK, MSG_GOAWAY, MSG_MAX_REQUEST_ID, MSG_PUBLISH, MSG_PUBLISH_DONE, MSG_PUBLISH_ERROR, MSG_PUBLISH_NAMESPACE, MSG_PUBLISH_NAMESPACE_CANCEL, MSG_PUBLISH_NAMESPACE_DONE, MSG_PUBLISH_NAMESPACE_ERROR, MSG_PUBLISH_NAMESPACE_OK, MSG_PUBLISH_OK, MSG_REQUESTS_BLOCKED, MSG_SERVER_SETUP, MSG_SUBSCRIBE, MSG_SUBSCRIBE_ERROR, MSG_SUBSCRIBE_NAMESPACE, MSG_SUBSCRIBE_NAMESPACE_ERROR, MSG_SUBSCRIBE_NAMESPACE_OK, MSG_SUBSCRIBE_OK, MSG_SUBSCRIBE_UPDATE, MSG_TRACK_STATUS, MSG_TRACK_STATUS_ERROR, MSG_TRACK_STATUS_OK, MSG_UNSUBSCRIBE, MSG_UNSUBSCRIBE_NAMESPACE, ObjectPayload, PARAM_MAX_REQUEST_ID, PARAM_MOQT_IMPLEMENTATION, PARAM_PATH, PARAM_ROLE, PublishState, SERVER_ONLY_MESSAGES, SessionPhase, SubgroupStream, SubgroupStreamHeader, SubscriptionState, TransitionResult, ValidationResult, createDataStreamDecoder, createFetchStreamDecoder, createSubgroupStreamDecoder, decodeDataStream, decodeDatagram, decodeFetchStream, decodeSubgroupStream, encodeDatagram, encodeFetchStream, encodeSubgroupStream, getLegalIncoming, getLegalOutgoing };
|
package/dist/draft14.js
CHANGED
|
@@ -35,6 +35,7 @@ import {
|
|
|
35
35
|
MSG_UNSUBSCRIBE,
|
|
36
36
|
MSG_UNSUBSCRIBE_NAMESPACE,
|
|
37
37
|
PARAM_MAX_REQUEST_ID,
|
|
38
|
+
PARAM_MOQT_IMPLEMENTATION,
|
|
38
39
|
PARAM_PATH,
|
|
39
40
|
PARAM_ROLE,
|
|
40
41
|
createDataStreamDecoder,
|
|
@@ -51,7 +52,7 @@ import {
|
|
|
51
52
|
encodeFetchStream,
|
|
52
53
|
encodeMessage,
|
|
53
54
|
encodeSubgroupStream
|
|
54
|
-
} from "./chunk-
|
|
55
|
+
} from "./chunk-76774UFF.js";
|
|
55
56
|
import {
|
|
56
57
|
BIDIRECTIONAL_MESSAGES,
|
|
57
58
|
CLIENT_ONLY_MESSAGES,
|
|
@@ -108,6 +109,7 @@ export {
|
|
|
108
109
|
MSG_UNSUBSCRIBE,
|
|
109
110
|
MSG_UNSUBSCRIBE_NAMESPACE,
|
|
110
111
|
PARAM_MAX_REQUEST_ID,
|
|
112
|
+
PARAM_MOQT_IMPLEMENTATION,
|
|
111
113
|
PARAM_PATH,
|
|
112
114
|
PARAM_ROLE,
|
|
113
115
|
SERVER_ONLY_MESSAGES,
|
package/dist/index.cjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var _chunk2SGE5GMUcjs = require('./chunk-2SGE5GMU.cjs');
|
|
4
4
|
|
|
5
5
|
|
|
6
6
|
var _chunkOKG2HT25cjs = require('./chunk-OKG2HT25.cjs');
|
|
@@ -18,7 +18,7 @@ var _chunkPKEOQSSZcjs = require('./chunk-PKEOQSSZ.cjs');
|
|
|
18
18
|
var _chunkSDWRXXOOcjs = require('./chunk-SDWRXXOO.cjs');
|
|
19
19
|
|
|
20
20
|
|
|
21
|
-
var
|
|
21
|
+
var _chunkWPFBK7UXcjs = require('./chunk-WPFBK7UX.cjs');
|
|
22
22
|
|
|
23
23
|
|
|
24
24
|
var _chunk3XKO6PCRcjs = require('./chunk-3XKO6PCR.cjs');
|
|
@@ -69,11 +69,11 @@ Supported draft values: ${Object.keys(DRAFT_VERSIONS).join(", ")}`
|
|
|
69
69
|
case "11":
|
|
70
70
|
return _chunkSDWRXXOOcjs.createDraft11Codec.call(void 0, );
|
|
71
71
|
case "12":
|
|
72
|
-
return
|
|
72
|
+
return _chunkWPFBK7UXcjs.createDraft12Codec.call(void 0, );
|
|
73
73
|
case "13":
|
|
74
74
|
return _chunk3XKO6PCRcjs.createDraft13Codec.call(void 0, );
|
|
75
75
|
case "14":
|
|
76
|
-
return
|
|
76
|
+
return _chunk2SGE5GMUcjs.createDraft14Codec.call(void 0, );
|
|
77
77
|
case "15":
|
|
78
78
|
return _chunkOKG2HT25cjs.createDraft15Codec.call(void 0, );
|
|
79
79
|
case "16":
|
package/dist/index.d.cts
CHANGED
|
@@ -5,9 +5,9 @@ import { D as Draft08Codec } from './codec-R9TJCq-E.cjs';
|
|
|
5
5
|
import { D as Draft09Codec } from './codec-j819z_hL.cjs';
|
|
6
6
|
import { D as Draft10Codec } from './codec-DDUBJGn0.cjs';
|
|
7
7
|
import { D as Draft11Codec } from './codec-w8z2j_uo.cjs';
|
|
8
|
-
import { D as Draft12Codec } from './codec-
|
|
8
|
+
import { D as Draft12Codec } from './codec-CpBWhz9f.cjs';
|
|
9
9
|
import { D as Draft13Codec } from './codec-DoOGjjDq.cjs';
|
|
10
|
-
import { D as Draft14Codec } from './codec-
|
|
10
|
+
import { D as Draft14Codec } from './codec-BO5Go0Lm.cjs';
|
|
11
11
|
import { D as Draft15Codec } from './codec-BB0U8MF2.cjs';
|
|
12
12
|
import { D as Draft16Codec } from './codec-z6_2PSzi.cjs';
|
|
13
13
|
import { D as Draft17Codec } from './codec-BN6jk0Td.cjs';
|
|
@@ -16,9 +16,9 @@ import './types-jV1yDDBA.cjs';
|
|
|
16
16
|
import './types-B3g5G9KP.cjs';
|
|
17
17
|
import './types-0IWbU9Z_.cjs';
|
|
18
18
|
import './types--Q7_DcvP.cjs';
|
|
19
|
-
import './types-
|
|
19
|
+
import './types-DuyE0ygT.cjs';
|
|
20
20
|
import './types-DrQpTW1G.cjs';
|
|
21
|
-
import './types
|
|
21
|
+
import './types--FGt0sAp.cjs';
|
|
22
22
|
import './types-DuxfOYiO.cjs';
|
|
23
23
|
import './types-BFpFNM_m.cjs';
|
|
24
24
|
import './types-Br7fm2mf.cjs';
|
package/dist/index.d.ts
CHANGED
|
@@ -5,9 +5,9 @@ import { D as Draft08Codec } from './codec-wtt6WF1K.js';
|
|
|
5
5
|
import { D as Draft09Codec } from './codec-3Ppy_5Gd.js';
|
|
6
6
|
import { D as Draft10Codec } from './codec-ZwV-Njt6.js';
|
|
7
7
|
import { D as Draft11Codec } from './codec-DNfml-se.js';
|
|
8
|
-
import { D as Draft12Codec } from './codec-
|
|
8
|
+
import { D as Draft12Codec } from './codec-D8REY9TB.js';
|
|
9
9
|
import { D as Draft13Codec } from './codec-BU0gaSZm.js';
|
|
10
|
-
import { D as Draft14Codec } from './codec-
|
|
10
|
+
import { D as Draft14Codec } from './codec-iMEwV1UO.js';
|
|
11
11
|
import { D as Draft15Codec } from './codec-BHHfBTnV.js';
|
|
12
12
|
import { D as Draft16Codec } from './codec-C-Yk2RNa.js';
|
|
13
13
|
import { D as Draft17Codec } from './codec-D2QVSH9D.js';
|
|
@@ -16,9 +16,9 @@ import './types-jV1yDDBA.js';
|
|
|
16
16
|
import './types-B3g5G9KP.js';
|
|
17
17
|
import './types-0IWbU9Z_.js';
|
|
18
18
|
import './types--Q7_DcvP.js';
|
|
19
|
-
import './types-
|
|
19
|
+
import './types-DuyE0ygT.js';
|
|
20
20
|
import './types-DrQpTW1G.js';
|
|
21
|
-
import './types
|
|
21
|
+
import './types--FGt0sAp.js';
|
|
22
22
|
import './types-DuxfOYiO.js';
|
|
23
23
|
import './types-BFpFNM_m.js';
|
|
24
24
|
import './types-Br7fm2mf.js';
|
package/dist/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
createDraft14Codec
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-76774UFF.js";
|
|
4
4
|
import {
|
|
5
5
|
createDraft15Codec
|
|
6
6
|
} from "./chunk-XS77RBY7.js";
|
|
@@ -18,7 +18,7 @@ import {
|
|
|
18
18
|
} from "./chunk-2UTVXWFF.js";
|
|
19
19
|
import {
|
|
20
20
|
createDraft12Codec
|
|
21
|
-
} from "./chunk-
|
|
21
|
+
} from "./chunk-TKBYPIN7.js";
|
|
22
22
|
import {
|
|
23
23
|
createDraft13Codec
|
|
24
24
|
} from "./chunk-4IVZZOY3.js";
|
package/dist/session.d.cts
CHANGED
|
@@ -6,9 +6,9 @@ import { D as Draft08Message, a as Draft08MessageType } from './types-jV1yDDBA.c
|
|
|
6
6
|
import { D as Draft09Message, a as Draft09MessageType } from './types-B3g5G9KP.cjs';
|
|
7
7
|
import { D as Draft10Message, a as Draft10MessageType } from './types-0IWbU9Z_.cjs';
|
|
8
8
|
import { D as Draft11Message, a as Draft11MessageType } from './types--Q7_DcvP.cjs';
|
|
9
|
-
import { D as Draft12Message, a as Draft12MessageType } from './types-
|
|
9
|
+
import { D as Draft12Message, a as Draft12MessageType } from './types-DuyE0ygT.cjs';
|
|
10
10
|
import { D as Draft13Message, a as Draft13MessageType } from './types-DrQpTW1G.cjs';
|
|
11
|
-
import { D as Draft14Message, a as Draft14MessageType } from './types
|
|
11
|
+
import { D as Draft14Message, a as Draft14MessageType } from './types--FGt0sAp.cjs';
|
|
12
12
|
import { D as Draft15Message, a as Draft15MessageType } from './types-DuxfOYiO.cjs';
|
|
13
13
|
import { D as Draft16Message, a as Draft16MessageType } from './types-BFpFNM_m.cjs';
|
|
14
14
|
import { D as Draft17Message, a as Draft17MessageType } from './types-Br7fm2mf.cjs';
|
package/dist/session.d.ts
CHANGED
|
@@ -6,9 +6,9 @@ import { D as Draft08Message, a as Draft08MessageType } from './types-jV1yDDBA.j
|
|
|
6
6
|
import { D as Draft09Message, a as Draft09MessageType } from './types-B3g5G9KP.js';
|
|
7
7
|
import { D as Draft10Message, a as Draft10MessageType } from './types-0IWbU9Z_.js';
|
|
8
8
|
import { D as Draft11Message, a as Draft11MessageType } from './types--Q7_DcvP.js';
|
|
9
|
-
import { D as Draft12Message, a as Draft12MessageType } from './types-
|
|
9
|
+
import { D as Draft12Message, a as Draft12MessageType } from './types-DuyE0ygT.js';
|
|
10
10
|
import { D as Draft13Message, a as Draft13MessageType } from './types-DrQpTW1G.js';
|
|
11
|
-
import { D as Draft14Message, a as Draft14MessageType } from './types
|
|
11
|
+
import { D as Draft14Message, a as Draft14MessageType } from './types--FGt0sAp.js';
|
|
12
12
|
import { D as Draft15Message, a as Draft15MessageType } from './types-DuxfOYiO.js';
|
|
13
13
|
import { D as Draft16Message, a as Draft16MessageType } from './types-BFpFNM_m.js';
|
|
14
14
|
import { D as Draft17Message, a as Draft17MessageType } from './types-Br7fm2mf.js';
|
package/package.json
CHANGED
|
@@ -73,6 +73,7 @@ function encodeSetupParams(params: Draft12SetupParams, w: BufferWriter): void {
|
|
|
73
73
|
let count = 0
|
|
74
74
|
if (params.path !== undefined) count++
|
|
75
75
|
if (params.max_request_id !== undefined) count++
|
|
76
|
+
if (params.authorization_token !== undefined) count++
|
|
76
77
|
if (params.unknown) count += params.unknown.length
|
|
77
78
|
|
|
78
79
|
w.writeVarInt(count)
|
|
@@ -87,6 +88,18 @@ function encodeSetupParams(params: Draft12SetupParams, w: BufferWriter): void {
|
|
|
87
88
|
w.writeVarInt(SETUP_PARAM_MAX_REQUEST_ID)
|
|
88
89
|
w.writeVarInt(params.max_request_id)
|
|
89
90
|
}
|
|
91
|
+
if (params.authorization_token !== undefined) {
|
|
92
|
+
w.writeVarInt(PARAM_AUTHORIZATION_TOKEN)
|
|
93
|
+
const at = params.authorization_token
|
|
94
|
+
const tmpW = new BufferWriter(64)
|
|
95
|
+
tmpW.writeVarInt(at.alias_type)
|
|
96
|
+
tmpW.writeVarInt(at.token_type)
|
|
97
|
+
const tokenBytes = textEncoder.encode(at.token_value)
|
|
98
|
+
tmpW.writeBytes(tokenBytes)
|
|
99
|
+
const raw = tmpW.finish()
|
|
100
|
+
w.writeVarInt(raw.byteLength)
|
|
101
|
+
w.writeBytes(raw)
|
|
102
|
+
}
|
|
90
103
|
if (params.unknown) {
|
|
91
104
|
for (const u of params.unknown) {
|
|
92
105
|
const id = BigInt(u.id)
|
|
@@ -127,10 +140,22 @@ function decodeSetupParams(r: BufferReader): Draft12SetupParams {
|
|
|
127
140
|
}
|
|
128
141
|
} else {
|
|
129
142
|
const length = Number(r.readVarInt())
|
|
130
|
-
const
|
|
143
|
+
const startOff = r.offset
|
|
131
144
|
if (paramType === SETUP_PARAM_PATH) {
|
|
145
|
+
const bytes = r.readBytes(length)
|
|
132
146
|
result.path = textDecoder.decode(bytes)
|
|
147
|
+
} else if (paramType === PARAM_AUTHORIZATION_TOKEN) {
|
|
148
|
+
const alias_type = r.readVarInt()
|
|
149
|
+
const token_type = r.readVarInt()
|
|
150
|
+
const tokenBytesLen = length - (r.offset - startOff)
|
|
151
|
+
const tokenBytes = r.readBytes(tokenBytesLen)
|
|
152
|
+
result.authorization_token = {
|
|
153
|
+
alias_type,
|
|
154
|
+
token_type,
|
|
155
|
+
token_value: textDecoder.decode(tokenBytes),
|
|
156
|
+
}
|
|
133
157
|
} else {
|
|
158
|
+
const bytes = r.readBytes(length)
|
|
134
159
|
unknown.push({
|
|
135
160
|
id: `0x${paramType.toString(16)}`,
|
|
136
161
|
length,
|
|
@@ -36,6 +36,7 @@ import {
|
|
|
36
36
|
MSG_UNSUBSCRIBE,
|
|
37
37
|
MSG_UNSUBSCRIBE_NAMESPACE,
|
|
38
38
|
PARAM_MAX_REQUEST_ID,
|
|
39
|
+
PARAM_MOQT_IMPLEMENTATION,
|
|
39
40
|
PARAM_PATH,
|
|
40
41
|
PARAM_ROLE,
|
|
41
42
|
} from './messages.js'
|
|
@@ -77,8 +78,10 @@ function encodeSetupParams(params: Draft14Params, writer: BufferWriter): void {
|
|
|
77
78
|
if (params.role !== undefined) count++
|
|
78
79
|
if (params.path !== undefined) count++
|
|
79
80
|
if (params.max_request_id !== undefined) count++
|
|
81
|
+
if (params.authorization_token !== undefined) count++
|
|
80
82
|
if (params.authority !== undefined) count++
|
|
81
83
|
if (params.max_auth_token_cache_size !== undefined) count++
|
|
84
|
+
if (params.moqt_implementation !== undefined) count++
|
|
82
85
|
if (params.unknown) count += params.unknown.length
|
|
83
86
|
|
|
84
87
|
writer.writeVarInt(count)
|
|
@@ -97,6 +100,24 @@ function encodeSetupParams(params: Draft14Params, writer: BufferWriter): void {
|
|
|
97
100
|
writer.writeVarInt(PARAM_MAX_REQUEST_ID)
|
|
98
101
|
writer.writeVarInt(params.max_request_id)
|
|
99
102
|
}
|
|
103
|
+
if (params.authorization_token !== undefined) {
|
|
104
|
+
writer.writeVarInt(PARAM_AUTHORIZATION_TOKEN)
|
|
105
|
+
const tok = params.authorization_token
|
|
106
|
+
const tmpWriter = new BufferWriter(64)
|
|
107
|
+
tmpWriter.writeVarInt(tok.alias_type)
|
|
108
|
+
if (tok.token_type !== undefined) {
|
|
109
|
+
tmpWriter.writeVarInt(tok.token_type)
|
|
110
|
+
}
|
|
111
|
+
if (tok.token_value !== undefined) {
|
|
112
|
+
tmpWriter.writeBytes(hexToBytes(tok.token_value))
|
|
113
|
+
}
|
|
114
|
+
if (tok.token_alias !== undefined) {
|
|
115
|
+
tmpWriter.writeVarInt(tok.token_alias)
|
|
116
|
+
}
|
|
117
|
+
const tokenBytes = tmpWriter.finish()
|
|
118
|
+
writer.writeVarInt(tokenBytes.byteLength)
|
|
119
|
+
writer.writeBytes(tokenBytes)
|
|
120
|
+
}
|
|
100
121
|
if (params.max_auth_token_cache_size !== undefined) {
|
|
101
122
|
writer.writeVarInt(PARAM_MAX_AUTH_TOKEN_CACHE_SIZE)
|
|
102
123
|
writer.writeVarInt(params.max_auth_token_cache_size)
|
|
@@ -107,6 +128,12 @@ function encodeSetupParams(params: Draft14Params, writer: BufferWriter): void {
|
|
|
107
128
|
writer.writeVarInt(encoded.byteLength)
|
|
108
129
|
writer.writeBytes(encoded)
|
|
109
130
|
}
|
|
131
|
+
if (params.moqt_implementation !== undefined) {
|
|
132
|
+
writer.writeVarInt(PARAM_MOQT_IMPLEMENTATION)
|
|
133
|
+
const encoded = textEncoder.encode(params.moqt_implementation)
|
|
134
|
+
writer.writeVarInt(encoded.byteLength)
|
|
135
|
+
writer.writeBytes(encoded)
|
|
136
|
+
}
|
|
110
137
|
if (params.unknown) {
|
|
111
138
|
for (const u of params.unknown) {
|
|
112
139
|
const id = BigInt(u.id)
|
|
@@ -149,8 +176,22 @@ function decodeSetupParams(reader: BufferReader): Draft14Params {
|
|
|
149
176
|
const bytes = reader.readBytes(length)
|
|
150
177
|
if (paramType === PARAM_PATH) {
|
|
151
178
|
result.path = textDecoder.decode(bytes)
|
|
179
|
+
} else if (paramType === PARAM_AUTHORIZATION_TOKEN) {
|
|
180
|
+
const tokenReader = new BufferReader(bytes)
|
|
181
|
+
const alias_type = tokenReader.readVarInt()
|
|
182
|
+
const tok: Record<string, unknown> = { alias_type }
|
|
183
|
+
if (tokenReader.remaining > 0) {
|
|
184
|
+
tok.token_type = tokenReader.readVarInt()
|
|
185
|
+
if (tokenReader.remaining > 0) {
|
|
186
|
+
const tokenValue = tokenReader.readBytesView(tokenReader.remaining)
|
|
187
|
+
tok.token_value = bytesToHex(tokenValue)
|
|
188
|
+
}
|
|
189
|
+
}
|
|
190
|
+
result.authorization_token = tok as unknown as AuthorizationToken
|
|
152
191
|
} else if (paramType === PARAM_AUTHORITY) {
|
|
153
192
|
result.authority = textDecoder.decode(bytes)
|
|
193
|
+
} else if (paramType === PARAM_MOQT_IMPLEMENTATION) {
|
|
194
|
+
result.moqt_implementation = textDecoder.decode(bytes)
|
|
154
195
|
} else {
|
|
155
196
|
unknown.push({
|
|
156
197
|
id: `0x${paramType.toString(16)}`,
|
|
@@ -35,6 +35,7 @@ export const MSG_SERVER_SETUP = 0x21n
|
|
|
35
35
|
export const PARAM_ROLE = 0x00n
|
|
36
36
|
export const PARAM_PATH = 0x01n
|
|
37
37
|
export const PARAM_MAX_REQUEST_ID = 0x02n
|
|
38
|
+
export const PARAM_MOQT_IMPLEMENTATION = 0x07n
|
|
38
39
|
|
|
39
40
|
// Map from wire ID to message type name
|
|
40
41
|
export const MESSAGE_TYPE_MAP: ReadonlyMap<bigint, string> = new Map([
|
|
@@ -44,6 +44,7 @@ export interface Draft14Params {
|
|
|
44
44
|
max_request_id?: bigint
|
|
45
45
|
authority?: string
|
|
46
46
|
max_auth_token_cache_size?: bigint
|
|
47
|
+
moqt_implementation?: string // 0x07 odd, length-prefixed UTF-8
|
|
47
48
|
// Message parameters (SUBSCRIBE, PUBLISH, etc.)
|
|
48
49
|
delivery_timeout?: bigint
|
|
49
50
|
authorization_token?: AuthorizationToken
|