@moqtap/codec 0.4.1 → 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-XHDPQHYR.cjs → chunk-2SGE5GMU.cjs} +31 -0
- package/dist/{chunk-BLEFTWEB.js → chunk-76774UFF.js} +31 -0
- package/dist/{chunk-GCBFHZW6.js → chunk-TKBYPIN7.js} +26 -1
- package/dist/{chunk-4BDEU3D4.cjs → chunk-WPFBK7UX.cjs} +26 -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/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.cjs +2 -2
- package/dist/draft14.js +1 -1
- package/dist/index.cjs +4 -4
- package/dist/index.d.cts +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/index.js +2 -2
- package/dist/session.d.cts +1 -1
- package/dist/session.d.ts +1 -1
- 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 +31 -0
|
@@ -801,6 +801,7 @@ function encodeSetupParams(params, writer) {
|
|
|
801
801
|
if (params.role !== void 0) count++;
|
|
802
802
|
if (params.path !== void 0) count++;
|
|
803
803
|
if (params.max_request_id !== void 0) count++;
|
|
804
|
+
if (params.authorization_token !== void 0) count++;
|
|
804
805
|
if (params.authority !== void 0) count++;
|
|
805
806
|
if (params.max_auth_token_cache_size !== void 0) count++;
|
|
806
807
|
if (params.moqt_implementation !== void 0) count++;
|
|
@@ -820,6 +821,24 @@ function encodeSetupParams(params, writer) {
|
|
|
820
821
|
writer.writeVarInt(PARAM_MAX_REQUEST_ID);
|
|
821
822
|
writer.writeVarInt(params.max_request_id);
|
|
822
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
|
+
}
|
|
823
842
|
if (params.max_auth_token_cache_size !== void 0) {
|
|
824
843
|
writer.writeVarInt(PARAM_MAX_AUTH_TOKEN_CACHE_SIZE);
|
|
825
844
|
writer.writeVarInt(params.max_auth_token_cache_size);
|
|
@@ -875,6 +894,18 @@ function decodeSetupParams(reader) {
|
|
|
875
894
|
const bytes = reader.readBytes(length);
|
|
876
895
|
if (paramType === PARAM_PATH) {
|
|
877
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;
|
|
878
909
|
} else if (paramType === PARAM_AUTHORITY) {
|
|
879
910
|
result.authority = textDecoder.decode(bytes);
|
|
880
911
|
} else if (paramType === PARAM_MOQT_IMPLEMENTATION) {
|
|
@@ -801,6 +801,7 @@ function encodeSetupParams(params, writer) {
|
|
|
801
801
|
if (params.role !== void 0) count++;
|
|
802
802
|
if (params.path !== void 0) count++;
|
|
803
803
|
if (params.max_request_id !== void 0) count++;
|
|
804
|
+
if (params.authorization_token !== void 0) count++;
|
|
804
805
|
if (params.authority !== void 0) count++;
|
|
805
806
|
if (params.max_auth_token_cache_size !== void 0) count++;
|
|
806
807
|
if (params.moqt_implementation !== void 0) count++;
|
|
@@ -820,6 +821,24 @@ function encodeSetupParams(params, writer) {
|
|
|
820
821
|
writer.writeVarInt(PARAM_MAX_REQUEST_ID);
|
|
821
822
|
writer.writeVarInt(params.max_request_id);
|
|
822
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
|
+
}
|
|
823
842
|
if (params.max_auth_token_cache_size !== void 0) {
|
|
824
843
|
writer.writeVarInt(PARAM_MAX_AUTH_TOKEN_CACHE_SIZE);
|
|
825
844
|
writer.writeVarInt(params.max_auth_token_cache_size);
|
|
@@ -875,6 +894,18 @@ function decodeSetupParams(reader) {
|
|
|
875
894
|
const bytes = reader.readBytes(length);
|
|
876
895
|
if (paramType === PARAM_PATH) {
|
|
877
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;
|
|
878
909
|
} else if (paramType === PARAM_AUTHORITY) {
|
|
879
910
|
result.authority = textDecoder.decode(bytes);
|
|
880
911
|
} else if (paramType === PARAM_MOQT_IMPLEMENTATION) {
|
|
@@ -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 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,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
package/dist/draft14.cjs
CHANGED
|
@@ -52,7 +52,7 @@
|
|
|
52
52
|
|
|
53
53
|
|
|
54
54
|
|
|
55
|
-
var
|
|
55
|
+
var _chunk2SGE5GMUcjs = require('./chunk-2SGE5GMU.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 = _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.js
CHANGED
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,7 +5,7 @@ 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
10
|
import { D as Draft14Codec } from './codec-BO5Go0Lm.cjs';
|
|
11
11
|
import { D as Draft15Codec } from './codec-BB0U8MF2.cjs';
|
|
@@ -16,7 +16,7 @@ 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
21
|
import './types--FGt0sAp.cjs';
|
|
22
22
|
import './types-DuxfOYiO.cjs';
|
package/dist/index.d.ts
CHANGED
|
@@ -5,7 +5,7 @@ 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
10
|
import { D as Draft14Codec } from './codec-iMEwV1UO.js';
|
|
11
11
|
import { D as Draft15Codec } from './codec-BHHfBTnV.js';
|
|
@@ -16,7 +16,7 @@ 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
21
|
import './types--FGt0sAp.js';
|
|
22
22
|
import './types-DuxfOYiO.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,7 +6,7 @@ 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
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';
|
package/dist/session.d.ts
CHANGED
|
@@ -6,7 +6,7 @@ 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
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';
|
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,
|
|
@@ -78,6 +78,7 @@ function encodeSetupParams(params: Draft14Params, writer: BufferWriter): void {
|
|
|
78
78
|
if (params.role !== undefined) count++
|
|
79
79
|
if (params.path !== undefined) count++
|
|
80
80
|
if (params.max_request_id !== undefined) count++
|
|
81
|
+
if (params.authorization_token !== undefined) count++
|
|
81
82
|
if (params.authority !== undefined) count++
|
|
82
83
|
if (params.max_auth_token_cache_size !== undefined) count++
|
|
83
84
|
if (params.moqt_implementation !== undefined) count++
|
|
@@ -99,6 +100,24 @@ function encodeSetupParams(params: Draft14Params, writer: BufferWriter): void {
|
|
|
99
100
|
writer.writeVarInt(PARAM_MAX_REQUEST_ID)
|
|
100
101
|
writer.writeVarInt(params.max_request_id)
|
|
101
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
|
+
}
|
|
102
121
|
if (params.max_auth_token_cache_size !== undefined) {
|
|
103
122
|
writer.writeVarInt(PARAM_MAX_AUTH_TOKEN_CACHE_SIZE)
|
|
104
123
|
writer.writeVarInt(params.max_auth_token_cache_size)
|
|
@@ -157,6 +176,18 @@ function decodeSetupParams(reader: BufferReader): Draft14Params {
|
|
|
157
176
|
const bytes = reader.readBytes(length)
|
|
158
177
|
if (paramType === PARAM_PATH) {
|
|
159
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
|
|
160
191
|
} else if (paramType === PARAM_AUTHORITY) {
|
|
161
192
|
result.authority = textDecoder.decode(bytes)
|
|
162
193
|
} else if (paramType === PARAM_MOQT_IMPLEMENTATION) {
|