@moqtap/codec 0.11.0 → 0.12.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (132) hide show
  1. package/CHANGELOG.md +28 -0
  2. package/README.md +3 -2
  3. package/dist/{auth-redaction-DsdLq4Qs.d.cts → auth-redaction-B9JJOlIY.d.cts} +0 -2
  4. package/dist/{auth-redaction-DsdLq4Qs.d.ts → auth-redaction-B9JJOlIY.d.ts} +0 -2
  5. package/dist/chunk-OBATJBNL.cjs +868 -0
  6. package/dist/chunk-T2TCLZZV.js +2304 -0
  7. package/dist/chunk-WB65UG7G.cjs +2304 -0
  8. package/dist/chunk-XPCBPACE.js +868 -0
  9. package/dist/{codec-c0YEwwWn.d.ts → codec-B-oUU-cp.d.ts} +2 -2
  10. package/dist/{codec-DHzKAUCa.d.cts → codec-B3RpCI9k.d.cts} +2 -2
  11. package/dist/{codec-Clu_skx8.d.cts → codec-B5pcOS3m.d.cts} +2 -2
  12. package/dist/{codec-DxtgPxJS.d.ts → codec-BLjxwK2f.d.ts} +2 -2
  13. package/dist/{codec-BkheTXO7.d.ts → codec-BV3CL_3m.d.ts} +2 -2
  14. package/dist/{codec-Bb6GKTrv.d.ts → codec-BYCDWgED.d.ts} +2 -2
  15. package/dist/{codec-ejDu-va6.d.ts → codec-Bwqq7ZQT.d.ts} +2 -2
  16. package/dist/{codec-76xzrLTL.d.cts → codec-BzWxOFby.d.cts} +2 -2
  17. package/dist/{codec-CM5yd6n3.d.ts → codec-C-nJhNNl.d.ts} +2 -2
  18. package/dist/{codec-BgpfHoAd.d.cts → codec-C11VEPbQ.d.cts} +2 -2
  19. package/dist/codec-C9U0Vzy9.d.cts +68 -0
  20. package/dist/{codec-yYKGOipj.d.ts → codec-CCx22jnd.d.ts} +2 -2
  21. package/dist/{codec-mVYqkIUF.d.ts → codec-CP3zkfTv.d.ts} +2 -2
  22. package/dist/{codec-qSbO5nOa.d.ts → codec-CRmOLDpt.d.ts} +2 -2
  23. package/dist/{codec-CpOpemR8.d.cts → codec-CUu56DDU.d.cts} +2 -2
  24. package/dist/codec-Cb8mUre3.d.ts +68 -0
  25. package/dist/{codec-DELe00w_.d.cts → codec-CemqAQdR.d.cts} +2 -2
  26. package/dist/{codec-8p40WdLg.d.ts → codec-CxMvsVMS.d.ts} +2 -2
  27. package/dist/{codec-zfzg9uiy.d.cts → codec-DIgMVTi4.d.cts} +2 -2
  28. package/dist/{codec-DdVBtvx7.d.ts → codec-DYzozF68.d.ts} +2 -2
  29. package/dist/{codec-kaBUzdpV.d.ts → codec-D_O9zxax.d.ts} +2 -2
  30. package/dist/{codec-XLrnreeu.d.cts → codec-Ddc-QxV6.d.cts} +2 -2
  31. package/dist/{codec-C5s1eBJX.d.cts → codec-DoojMl2z.d.cts} +2 -2
  32. package/dist/{codec-DlxGuYMv.d.ts → codec-DqdjiOQF.d.ts} +2 -2
  33. package/dist/{codec-Cshdl9Tt.d.cts → codec-Dstemwrq.d.cts} +2 -2
  34. package/dist/{codec-BN2Bu0KI.d.ts → codec-Dt6nuejp.d.ts} +2 -2
  35. package/dist/{codec-BwVDkokh.d.cts → codec-DuYhd8fP.d.cts} +2 -2
  36. package/dist/{codec-I8u2pfS4.d.cts → codec-DwNOFgPU.d.cts} +2 -2
  37. package/dist/{codec-GAY4lybi.d.cts → codec-l01BpNhF.d.cts} +2 -2
  38. package/dist/{codec-Cb8HC3XV.d.cts → codec-psN2vB6I.d.cts} +2 -2
  39. package/dist/draft07-session.d.cts +3 -3
  40. package/dist/draft07-session.d.ts +3 -3
  41. package/dist/draft07.d.cts +4 -4
  42. package/dist/draft07.d.ts +4 -4
  43. package/dist/draft08-session.d.cts +3 -3
  44. package/dist/draft08-session.d.ts +3 -3
  45. package/dist/draft08.d.cts +5 -5
  46. package/dist/draft08.d.ts +5 -5
  47. package/dist/draft09-session.d.cts +3 -3
  48. package/dist/draft09-session.d.ts +3 -3
  49. package/dist/draft09.d.cts +5 -5
  50. package/dist/draft09.d.ts +5 -5
  51. package/dist/draft10-session.d.cts +3 -3
  52. package/dist/draft10-session.d.ts +3 -3
  53. package/dist/draft10.d.cts +5 -5
  54. package/dist/draft10.d.ts +5 -5
  55. package/dist/draft11-session.d.cts +3 -3
  56. package/dist/draft11-session.d.ts +3 -3
  57. package/dist/draft11.d.cts +5 -5
  58. package/dist/draft11.d.ts +5 -5
  59. package/dist/draft12-session.d.cts +3 -3
  60. package/dist/draft12-session.d.ts +3 -3
  61. package/dist/draft12.d.cts +5 -5
  62. package/dist/draft12.d.ts +5 -5
  63. package/dist/draft13-session.d.cts +3 -3
  64. package/dist/draft13-session.d.ts +3 -3
  65. package/dist/draft13.d.cts +5 -5
  66. package/dist/draft13.d.ts +5 -5
  67. package/dist/draft14-session.d.cts +3 -3
  68. package/dist/draft14-session.d.ts +3 -3
  69. package/dist/draft14.d.cts +5 -5
  70. package/dist/draft14.d.ts +5 -5
  71. package/dist/draft15-session.d.cts +3 -3
  72. package/dist/draft15-session.d.ts +3 -3
  73. package/dist/draft15.d.cts +5 -5
  74. package/dist/draft15.d.ts +5 -5
  75. package/dist/draft16-session.d.cts +3 -3
  76. package/dist/draft16-session.d.ts +3 -3
  77. package/dist/draft16.d.cts +5 -5
  78. package/dist/draft16.d.ts +5 -5
  79. package/dist/draft17-session.d.cts +3 -3
  80. package/dist/draft17-session.d.ts +3 -3
  81. package/dist/draft17.d.cts +4 -4
  82. package/dist/draft17.d.ts +4 -4
  83. package/dist/draft18-session.d.cts +3 -3
  84. package/dist/draft18-session.d.ts +3 -3
  85. package/dist/draft18.d.cts +4 -4
  86. package/dist/draft18.d.ts +4 -4
  87. package/dist/draft19-session.d.cts +3 -3
  88. package/dist/draft19-session.d.ts +3 -3
  89. package/dist/draft19.d.cts +4 -4
  90. package/dist/draft19.d.ts +4 -4
  91. package/dist/draft20-session.d.cts +3 -3
  92. package/dist/draft20-session.d.ts +3 -3
  93. package/dist/draft20.d.cts +4 -4
  94. package/dist/draft20.d.ts +4 -4
  95. package/dist/draft21-session.cjs +8 -0
  96. package/dist/draft21-session.d.cts +195 -0
  97. package/dist/draft21-session.d.ts +195 -0
  98. package/dist/draft21-session.js +8 -0
  99. package/dist/draft21.cjs +222 -0
  100. package/dist/draft21.d.cts +176 -0
  101. package/dist/draft21.d.ts +176 -0
  102. package/dist/draft21.js +222 -0
  103. package/dist/index.cjs +7 -1
  104. package/dist/index.d.cts +23 -18
  105. package/dist/index.d.ts +23 -18
  106. package/dist/index.js +7 -1
  107. package/dist/{session-types-Dn7b3RZM.d.ts → session-types-Cxx7W8zZ.d.ts} +1 -1
  108. package/dist/{session-types-B9idsih-.d.cts → session-types-DZkI_qFG.d.cts} +1 -1
  109. package/dist/session.cjs +5 -1
  110. package/dist/session.d.cts +5 -3
  111. package/dist/session.d.ts +5 -3
  112. package/dist/session.js +5 -1
  113. package/dist/{types-DG5_iKuv.d.cts → types-2NisMA8_.d.cts} +1 -1
  114. package/dist/{types-DG5_iKuv.d.ts → types-2NisMA8_.d.ts} +1 -1
  115. package/dist/types-DDwidj2d.d.cts +371 -0
  116. package/dist/types-DDwidj2d.d.ts +371 -0
  117. package/package.json +14 -2
  118. package/src/core/auth-redaction.ts +0 -2
  119. package/src/core/types.ts +1 -0
  120. package/src/drafts/draft19/codec.ts +1 -1
  121. package/src/drafts/draft20/codec.ts +1 -1
  122. package/src/drafts/draft21/codec.ts +1816 -0
  123. package/src/drafts/draft21/data-streams.ts +1338 -0
  124. package/src/drafts/draft21/error-codes.ts +135 -0
  125. package/src/drafts/draft21/index.ts +168 -0
  126. package/src/drafts/draft21/messages.ts +68 -0
  127. package/src/drafts/draft21/rules.ts +107 -0
  128. package/src/drafts/draft21/session-fsm.ts +1063 -0
  129. package/src/drafts/draft21/session.ts +21 -0
  130. package/src/drafts/draft21/types.ts +473 -0
  131. package/src/index.ts +9 -1
  132. package/src/session.ts +4 -0
@@ -0,0 +1,222 @@
1
+ import {
2
+ MESSAGE_ID_MAP,
3
+ MESSAGE_TYPE_MAP,
4
+ MSG_FETCH,
5
+ MSG_FETCH_OK,
6
+ MSG_GOAWAY,
7
+ MSG_NAMESPACE,
8
+ MSG_NAMESPACE_DONE,
9
+ MSG_PUBLISH,
10
+ MSG_PUBLISH_DONE,
11
+ MSG_PUBLISH_NAMESPACE,
12
+ MSG_PUBLISH_OK,
13
+ MSG_PUBLISH_SKIPPED,
14
+ MSG_PUBLISH_STATE_NOTIFY,
15
+ MSG_REQUEST_ERROR,
16
+ MSG_REQUEST_OK,
17
+ MSG_REQUEST_UPDATE,
18
+ MSG_SETUP,
19
+ MSG_SUBSCRIBE,
20
+ MSG_SUBSCRIBE_NAMESPACE,
21
+ MSG_SUBSCRIBE_OK,
22
+ MSG_SUBSCRIBE_TRACKS,
23
+ MSG_TRACK_STATUS,
24
+ SETUP_OPT_AUTHORITY,
25
+ SETUP_OPT_AUTHORIZATION_TOKEN,
26
+ SETUP_OPT_MAX_AUTH_TOKEN_CACHE_SIZE,
27
+ SETUP_OPT_MAX_FILTER_RANGES,
28
+ SETUP_OPT_MAX_REQUEST_UPDATES,
29
+ SETUP_OPT_MOQT_IMPLEMENTATION,
30
+ SETUP_OPT_PATH,
31
+ UNKNOWN_STREAM_COUNT,
32
+ createDataStreamDecoder,
33
+ createDraft21Codec,
34
+ createFetchStreamDecoder,
35
+ createStreamDecoder,
36
+ createSubgroupStreamDecoder,
37
+ decodeDataStream,
38
+ decodeDatagram,
39
+ decodeFetchStream,
40
+ decodeMessage,
41
+ decodeSubgroupStream,
42
+ encodeDatagram,
43
+ encodeFetchStream,
44
+ encodeMessage,
45
+ encodeSubgroupStream,
46
+ redactAuthTokens
47
+ } from "./chunk-T2TCLZZV.js";
48
+ import {
49
+ BIDIRECTIONAL_MESSAGES,
50
+ CLIENT_ONLY_MESSAGES,
51
+ CONTROL_MESSAGES,
52
+ Draft21SessionFSM,
53
+ REQUEST_STREAM_OPENERS,
54
+ SERVER_ONLY_MESSAGES,
55
+ createDraft21SessionState,
56
+ getLegalIncoming,
57
+ getLegalOutgoing
58
+ } from "./chunk-XPCBPACE.js";
59
+ import {
60
+ REDACTION_FILL
61
+ } from "./chunk-YRZQVNZO.js";
62
+
63
+ // src/drafts/draft21/error-codes.ts
64
+ var SessionTerminationCode = {
65
+ NoError: 0x0n,
66
+ InternalError: 0x1n,
67
+ Unauthorized: 0x2n,
68
+ ProtocolViolation: 0x3n,
69
+ InvalidRequestId: 0x4n,
70
+ DuplicateTrackAlias: 0x5n,
71
+ KeyValueFormattingError: 0x6n,
72
+ InvalidPath: 0x8n,
73
+ MalformedPath: 0x9n,
74
+ GoawayTimeout: 0x10n,
75
+ ControlMessageTimeout: 0x11n,
76
+ DataStreamTimeout: 0x12n,
77
+ AuthTokenCacheOverflow: 0x13n,
78
+ DuplicateAuthTokenAlias: 0x14n,
79
+ // 0x15 VERSION_NEGOTIATION_FAILED — REMOVED in draft-20. Version negotiation
80
+ // moved to ALPN / WT-Available-Protocols in draft-15, so there is no longer a
81
+ // SETUP-time negotiation that can fail. See RETIRED_SESSION_TERMINATION_CODES.
82
+ MalformedAuthToken: 0x16n,
83
+ UnknownAuthTokenAlias: 0x17n,
84
+ ExpiredAuthToken: 0x18n,
85
+ InvalidAuthority: 0x19n,
86
+ MalformedAuthority: 0x1an,
87
+ TooManyRequestUpdates: 0x1bn
88
+ };
89
+ var RequestErrorCode = {
90
+ InternalError: 0x0n,
91
+ Unauthorized: 0x1n,
92
+ Timeout: 0x2n,
93
+ NotSupported: 0x3n,
94
+ MalformedAuthToken: 0x4n,
95
+ ExpiredAuthToken: 0x5n,
96
+ GoingAway: 0x6n,
97
+ ExcessiveLoad: 0x9n,
98
+ DoesNotExist: 0x10n,
99
+ InvalidRange: 0x11n,
100
+ MalformedTrack: 0x12n,
101
+ Uninterested: 0x20n,
102
+ PrefixOverlap: 0x30n,
103
+ NamespaceTooLarge: 0x31n,
104
+ // 0x32 INVALID_JOINING_REQUEST_ID — REMOVED in draft-20 along with the whole
105
+ // joining-fetch mechanism (draft-19 Section 10.12.2). A draft-21 FETCH names
106
+ // its own track inline and never references another request, so there is no
107
+ // joining Request ID left to be invalid. See RETIRED_REQUEST_ERROR_CODES.
108
+ UnsupportedExtension: 0x33n,
109
+ Redirect: 0x34n,
110
+ ConflictingFilters: 0x35n,
111
+ InvalidFilter: 0x36n
112
+ };
113
+ var PublishDoneCode = {
114
+ InternalError: 0x0n,
115
+ Unauthorized: 0x1n,
116
+ TrackEnded: 0x2n,
117
+ // 0x3 SUBSCRIPTION_ENDED — REMOVED in draft-20. The behaviour went with it:
118
+ // Section 3.3.1 now says "A publisher does not end a subscription solely
119
+ // because the Largest Object advances past the end of the current Location
120
+ // Filter", which is the only thing this code used to report.
121
+ // See RETIRED_PUBLISH_DONE_CODES.
122
+ GoingAway: 0x4n,
123
+ TooFarBehind: 0x5n,
124
+ Expired: 0x6n,
125
+ UpdateFailed: 0x8n,
126
+ ExcessiveLoad: 0x9n,
127
+ MalformedTrack: 0x12n
128
+ };
129
+ var DataStreamResetCode = {
130
+ InternalError: 0x0n,
131
+ Cancelled: 0x1n,
132
+ DeliveryTimeout: 0x2n,
133
+ SessionClosed: 0x3n,
134
+ GoingAway: 0x4n,
135
+ TooFarBehind: 0x5n,
136
+ UnknownObjectStatus: 0x6n,
137
+ ExpiredAuthToken: 0x7n,
138
+ ExcessiveLoad: 0x9n,
139
+ MalformedTrack: 0x12n
140
+ };
141
+ var RETIRED_SESSION_TERMINATION_CODES = /* @__PURE__ */ new Set([
142
+ 0x15n
143
+ // VERSION_NEGOTIATION_FAILED (draft-19 Section 3.5)
144
+ ]);
145
+ var RETIRED_REQUEST_ERROR_CODES = /* @__PURE__ */ new Set([
146
+ 0x32n
147
+ // INVALID_JOINING_REQUEST_ID (draft-19 Section 10.6.2)
148
+ ]);
149
+ var RETIRED_PUBLISH_DONE_CODES = /* @__PURE__ */ new Set([
150
+ 0x3n
151
+ // SUBSCRIPTION_ENDED (draft-19 Section 10.11)
152
+ ]);
153
+
154
+ // src/drafts/draft21/index.ts
155
+ var PROTOCOL_STRING = "moqt-21";
156
+ var DRAFT_VERSION = 0xff000015n;
157
+ export {
158
+ BIDIRECTIONAL_MESSAGES,
159
+ CLIENT_ONLY_MESSAGES,
160
+ CONTROL_MESSAGES,
161
+ DRAFT_VERSION,
162
+ DataStreamResetCode,
163
+ Draft21SessionFSM,
164
+ MESSAGE_ID_MAP,
165
+ MESSAGE_TYPE_MAP,
166
+ MSG_FETCH,
167
+ MSG_FETCH_OK,
168
+ MSG_GOAWAY,
169
+ MSG_NAMESPACE,
170
+ MSG_NAMESPACE_DONE,
171
+ MSG_PUBLISH,
172
+ MSG_PUBLISH_DONE,
173
+ MSG_PUBLISH_NAMESPACE,
174
+ MSG_PUBLISH_OK,
175
+ MSG_PUBLISH_SKIPPED,
176
+ MSG_PUBLISH_STATE_NOTIFY,
177
+ MSG_REQUEST_ERROR,
178
+ MSG_REQUEST_OK,
179
+ MSG_REQUEST_UPDATE,
180
+ MSG_SETUP,
181
+ MSG_SUBSCRIBE,
182
+ MSG_SUBSCRIBE_NAMESPACE,
183
+ MSG_SUBSCRIBE_OK,
184
+ MSG_SUBSCRIBE_TRACKS,
185
+ MSG_TRACK_STATUS,
186
+ PROTOCOL_STRING,
187
+ PublishDoneCode,
188
+ REDACTION_FILL,
189
+ REQUEST_STREAM_OPENERS,
190
+ RETIRED_PUBLISH_DONE_CODES,
191
+ RETIRED_REQUEST_ERROR_CODES,
192
+ RETIRED_SESSION_TERMINATION_CODES,
193
+ RequestErrorCode,
194
+ SERVER_ONLY_MESSAGES,
195
+ SETUP_OPT_AUTHORITY,
196
+ SETUP_OPT_AUTHORIZATION_TOKEN,
197
+ SETUP_OPT_MAX_AUTH_TOKEN_CACHE_SIZE,
198
+ SETUP_OPT_MAX_FILTER_RANGES,
199
+ SETUP_OPT_MAX_REQUEST_UPDATES,
200
+ SETUP_OPT_MOQT_IMPLEMENTATION,
201
+ SETUP_OPT_PATH,
202
+ SessionTerminationCode,
203
+ UNKNOWN_STREAM_COUNT,
204
+ createDataStreamDecoder,
205
+ createDraft21Codec,
206
+ createDraft21SessionState,
207
+ createFetchStreamDecoder,
208
+ createStreamDecoder,
209
+ createSubgroupStreamDecoder,
210
+ decodeDataStream,
211
+ decodeDatagram,
212
+ decodeFetchStream,
213
+ decodeMessage,
214
+ decodeSubgroupStream,
215
+ encodeDatagram,
216
+ encodeFetchStream,
217
+ encodeMessage,
218
+ encodeSubgroupStream,
219
+ getLegalIncoming,
220
+ getLegalOutgoing,
221
+ redactAuthTokens
222
+ };
package/dist/index.cjs CHANGED
@@ -9,6 +9,9 @@ var _chunk5JGZCKJOcjs = require('./chunk-5JGZCKJO.cjs');
9
9
  var _chunkBNIUVOCJcjs = require('./chunk-BNIUVOCJ.cjs');
10
10
 
11
11
 
12
+ var _chunkWB65UG7Gcjs = require('./chunk-WB65UG7G.cjs');
13
+
14
+
12
15
  var _chunkHM7BLRVPcjs = require('./chunk-HM7BLRVP.cjs');
13
16
 
14
17
 
@@ -107,7 +110,8 @@ var DRAFT_VERSIONS = {
107
110
  "17": 0xff000011n,
108
111
  "18": 0xff000012n,
109
112
  "19": 0xff000013n,
110
- "20": 0xff000014n
113
+ "20": 0xff000014n,
114
+ "21": 0xff000015n
111
115
  };
112
116
  function createCodec(options) {
113
117
  const draft = DRAFT_VERSIONS[options.draft];
@@ -146,6 +150,8 @@ Supported draft values: ${Object.keys(DRAFT_VERSIONS).join(", ")}`
146
150
  return _chunk5JGZCKJOcjs.createDraft19Codec.call(void 0, );
147
151
  case "20":
148
152
  return _chunkBNIUVOCJcjs.createDraft20Codec.call(void 0, );
153
+ case "21":
154
+ return _chunkWB65UG7Gcjs.createDraft21Codec.call(void 0, );
149
155
  default:
150
156
  throw new Error(`Unsupported draft: ${draft}`);
151
157
  }
package/dist/index.d.cts CHANGED
@@ -1,20 +1,21 @@
1
- import { C as CodecOptions } from './types-DG5_iKuv.cjs';
2
- export { B as BaseCodec, D as DecodeError, a as DecodeErrorCode, b as DecodeResult, c as Draft } from './types-DG5_iKuv.cjs';
3
- import { D as Draft07Codec } from './codec-Clu_skx8.cjs';
4
- import { D as Draft08Codec } from './codec-CpOpemR8.cjs';
5
- import { D as Draft09Codec } from './codec-Cshdl9Tt.cjs';
6
- import { D as Draft10Codec } from './codec-I8u2pfS4.cjs';
7
- import { D as Draft11Codec } from './codec-BgpfHoAd.cjs';
8
- import { D as Draft12Codec } from './codec-GAY4lybi.cjs';
9
- import { D as Draft13Codec } from './codec-DHzKAUCa.cjs';
10
- import { D as Draft14Codec } from './codec-zfzg9uiy.cjs';
11
- import { D as Draft15Codec } from './codec-XLrnreeu.cjs';
12
- import { D as Draft16Codec } from './codec-Cb8HC3XV.cjs';
13
- import { D as Draft17Codec } from './codec-BwVDkokh.cjs';
14
- import { D as Draft18Codec } from './codec-DELe00w_.cjs';
15
- import { D as Draft19Codec } from './codec-C5s1eBJX.cjs';
16
- import { D as Draft20Codec } from './codec-76xzrLTL.cjs';
17
- import './auth-redaction-DsdLq4Qs.cjs';
1
+ import { C as CodecOptions } from './types-2NisMA8_.cjs';
2
+ export { B as BaseCodec, D as DecodeError, a as DecodeErrorCode, b as DecodeResult, c as Draft } from './types-2NisMA8_.cjs';
3
+ import { D as Draft07Codec } from './codec-B5pcOS3m.cjs';
4
+ import { D as Draft08Codec } from './codec-CUu56DDU.cjs';
5
+ import { D as Draft09Codec } from './codec-Dstemwrq.cjs';
6
+ import { D as Draft10Codec } from './codec-DwNOFgPU.cjs';
7
+ import { D as Draft11Codec } from './codec-C11VEPbQ.cjs';
8
+ import { D as Draft12Codec } from './codec-l01BpNhF.cjs';
9
+ import { D as Draft13Codec } from './codec-B3RpCI9k.cjs';
10
+ import { D as Draft14Codec } from './codec-DIgMVTi4.cjs';
11
+ import { D as Draft15Codec } from './codec-Ddc-QxV6.cjs';
12
+ import { D as Draft16Codec } from './codec-psN2vB6I.cjs';
13
+ import { D as Draft17Codec } from './codec-DuYhd8fP.cjs';
14
+ import { D as Draft18Codec } from './codec-CemqAQdR.cjs';
15
+ import { D as Draft19Codec } from './codec-DoojMl2z.cjs';
16
+ import { D as Draft20Codec } from './codec-BzWxOFby.cjs';
17
+ import { D as Draft21Codec } from './codec-C9U0Vzy9.cjs';
18
+ import './auth-redaction-B9JJOlIY.cjs';
18
19
  import './types-Dl4IaAHR.cjs';
19
20
  import './types-jV1yDDBA.cjs';
20
21
  import './types-B3g5G9KP.cjs';
@@ -29,6 +30,7 @@ import './types-DAnalt5K.cjs';
29
30
  import './types-DxXNP32l.cjs';
30
31
  import './types-Btp416jt.cjs';
31
32
  import './types-CwN7AEoL.cjs';
33
+ import './types-DDwidj2d.cjs';
32
34
 
33
35
  /**
34
36
  * Draft-agnostic readers for decoded control messages.
@@ -169,12 +171,15 @@ declare function createCodec(options: CodecOptions & {
169
171
  declare function createCodec(options: CodecOptions & {
170
172
  draft: '20';
171
173
  }): Draft20Codec;
174
+ declare function createCodec(options: CodecOptions & {
175
+ draft: '21';
176
+ }): Draft21Codec;
172
177
  /**
173
178
  * Create a codec for the specified draft version.
174
179
  *
175
180
  * A draft must always be specified — there is no default while the
176
181
  * MoQT specification is still in draft stage.
177
182
  */
178
- declare function createCodec(options: CodecOptions): Draft07Codec | Draft08Codec | Draft09Codec | Draft10Codec | Draft11Codec | Draft12Codec | Draft13Codec | Draft14Codec | Draft15Codec | Draft16Codec | Draft17Codec | Draft18Codec | Draft19Codec | Draft20Codec;
183
+ declare function createCodec(options: CodecOptions): Draft07Codec | Draft08Codec | Draft09Codec | Draft10Codec | Draft11Codec | Draft12Codec | Draft13Codec | Draft14Codec | Draft15Codec | Draft16Codec | Draft17Codec | Draft18Codec | Draft19Codec | Draft20Codec | Draft21Codec;
179
184
 
180
185
  export { type AnyMessage, CodecOptions, DRAFT_VERSIONS, type TrackIdentity, createCodec, joiningRequestIdOf, requestIdOf, trackAliasOf, trackOf };
package/dist/index.d.ts CHANGED
@@ -1,20 +1,21 @@
1
- import { C as CodecOptions } from './types-DG5_iKuv.js';
2
- export { B as BaseCodec, D as DecodeError, a as DecodeErrorCode, b as DecodeResult, c as Draft } from './types-DG5_iKuv.js';
3
- import { D as Draft07Codec } from './codec-CM5yd6n3.js';
4
- import { D as Draft08Codec } from './codec-BN2Bu0KI.js';
5
- import { D as Draft09Codec } from './codec-DxtgPxJS.js';
6
- import { D as Draft10Codec } from './codec-DdVBtvx7.js';
7
- import { D as Draft11Codec } from './codec-BkheTXO7.js';
8
- import { D as Draft12Codec } from './codec-8p40WdLg.js';
9
- import { D as Draft13Codec } from './codec-c0YEwwWn.js';
10
- import { D as Draft14Codec } from './codec-yYKGOipj.js';
11
- import { D as Draft15Codec } from './codec-qSbO5nOa.js';
12
- import { D as Draft16Codec } from './codec-kaBUzdpV.js';
13
- import { D as Draft17Codec } from './codec-Bb6GKTrv.js';
14
- import { D as Draft18Codec } from './codec-ejDu-va6.js';
15
- import { D as Draft19Codec } from './codec-DlxGuYMv.js';
16
- import { D as Draft20Codec } from './codec-mVYqkIUF.js';
17
- import './auth-redaction-DsdLq4Qs.js';
1
+ import { C as CodecOptions } from './types-2NisMA8_.js';
2
+ export { B as BaseCodec, D as DecodeError, a as DecodeErrorCode, b as DecodeResult, c as Draft } from './types-2NisMA8_.js';
3
+ import { D as Draft07Codec } from './codec-C-nJhNNl.js';
4
+ import { D as Draft08Codec } from './codec-Dt6nuejp.js';
5
+ import { D as Draft09Codec } from './codec-BLjxwK2f.js';
6
+ import { D as Draft10Codec } from './codec-DYzozF68.js';
7
+ import { D as Draft11Codec } from './codec-BV3CL_3m.js';
8
+ import { D as Draft12Codec } from './codec-CxMvsVMS.js';
9
+ import { D as Draft13Codec } from './codec-B-oUU-cp.js';
10
+ import { D as Draft14Codec } from './codec-CCx22jnd.js';
11
+ import { D as Draft15Codec } from './codec-CRmOLDpt.js';
12
+ import { D as Draft16Codec } from './codec-D_O9zxax.js';
13
+ import { D as Draft17Codec } from './codec-BYCDWgED.js';
14
+ import { D as Draft18Codec } from './codec-Bwqq7ZQT.js';
15
+ import { D as Draft19Codec } from './codec-DqdjiOQF.js';
16
+ import { D as Draft20Codec } from './codec-CP3zkfTv.js';
17
+ import { D as Draft21Codec } from './codec-Cb8mUre3.js';
18
+ import './auth-redaction-B9JJOlIY.js';
18
19
  import './types-Dl4IaAHR.js';
19
20
  import './types-jV1yDDBA.js';
20
21
  import './types-B3g5G9KP.js';
@@ -29,6 +30,7 @@ import './types-DAnalt5K.js';
29
30
  import './types-DxXNP32l.js';
30
31
  import './types-Btp416jt.js';
31
32
  import './types-CwN7AEoL.js';
33
+ import './types-DDwidj2d.js';
32
34
 
33
35
  /**
34
36
  * Draft-agnostic readers for decoded control messages.
@@ -169,12 +171,15 @@ declare function createCodec(options: CodecOptions & {
169
171
  declare function createCodec(options: CodecOptions & {
170
172
  draft: '20';
171
173
  }): Draft20Codec;
174
+ declare function createCodec(options: CodecOptions & {
175
+ draft: '21';
176
+ }): Draft21Codec;
172
177
  /**
173
178
  * Create a codec for the specified draft version.
174
179
  *
175
180
  * A draft must always be specified — there is no default while the
176
181
  * MoQT specification is still in draft stage.
177
182
  */
178
- declare function createCodec(options: CodecOptions): Draft07Codec | Draft08Codec | Draft09Codec | Draft10Codec | Draft11Codec | Draft12Codec | Draft13Codec | Draft14Codec | Draft15Codec | Draft16Codec | Draft17Codec | Draft18Codec | Draft19Codec | Draft20Codec;
183
+ declare function createCodec(options: CodecOptions): Draft07Codec | Draft08Codec | Draft09Codec | Draft10Codec | Draft11Codec | Draft12Codec | Draft13Codec | Draft14Codec | Draft15Codec | Draft16Codec | Draft17Codec | Draft18Codec | Draft19Codec | Draft20Codec | Draft21Codec;
179
184
 
180
185
  export { type AnyMessage, CodecOptions, DRAFT_VERSIONS, type TrackIdentity, createCodec, joiningRequestIdOf, requestIdOf, trackAliasOf, trackOf };
package/dist/index.js CHANGED
@@ -7,6 +7,9 @@ import {
7
7
  import {
8
8
  createDraft20Codec
9
9
  } from "./chunk-PJK2ZS3I.js";
10
+ import {
11
+ createDraft21Codec
12
+ } from "./chunk-T2TCLZZV.js";
10
13
  import {
11
14
  createDraft14Codec
12
15
  } from "./chunk-WCRLAKDW.js";
@@ -107,7 +110,8 @@ var DRAFT_VERSIONS = {
107
110
  "17": 0xff000011n,
108
111
  "18": 0xff000012n,
109
112
  "19": 0xff000013n,
110
- "20": 0xff000014n
113
+ "20": 0xff000014n,
114
+ "21": 0xff000015n
111
115
  };
112
116
  function createCodec(options) {
113
117
  const draft = DRAFT_VERSIONS[options.draft];
@@ -146,6 +150,8 @@ Supported draft values: ${Object.keys(DRAFT_VERSIONS).join(", ")}`
146
150
  return createDraft19Codec();
147
151
  case "20":
148
152
  return createDraft20Codec();
153
+ case "21":
154
+ return createDraft21Codec();
149
155
  default:
150
156
  throw new Error(`Unsupported draft: ${draft}`);
151
157
  }
@@ -1,4 +1,4 @@
1
- import { c as Draft } from './types-DG5_iKuv.js';
1
+ import { c as Draft } from './types-2NisMA8_.js';
2
2
 
3
3
  type SessionPhase = 'idle' | 'setup' | 'ready' | 'draining' | 'closed' | 'error';
4
4
  type SubscriptionPhase = 'pending' | 'active' | 'error' | 'done';
@@ -1,4 +1,4 @@
1
- import { c as Draft } from './types-DG5_iKuv.cjs';
1
+ import { c as Draft } from './types-2NisMA8_.cjs';
2
2
 
3
3
  type SessionPhase = 'idle' | 'setup' | 'ready' | 'draining' | 'closed' | 'error';
4
4
  type SubscriptionPhase = 'pending' | 'active' | 'error' | 'done';
package/dist/session.cjs CHANGED
@@ -9,6 +9,9 @@ var _chunkCQ65LKPQcjs = require('./chunk-CQ65LKPQ.cjs');
9
9
  var _chunkBMJMY6FXcjs = require('./chunk-BMJMY6FX.cjs');
10
10
 
11
11
 
12
+ var _chunkOBATJBNLcjs = require('./chunk-OBATJBNL.cjs');
13
+
14
+
12
15
  var _chunkE65QKRSNcjs = require('./chunk-E65QKRSN.cjs');
13
16
 
14
17
 
@@ -59,7 +62,8 @@ function createSessionState(options) {
59
62
  "17": _chunkYTPZZI2Mcjs.createDraft17SessionState,
60
63
  "18": _chunkA655PHFXcjs.createDraft18SessionState,
61
64
  "19": _chunkCQ65LKPQcjs.createDraft19SessionState,
62
- "20": _chunkBMJMY6FXcjs.createDraft20SessionState
65
+ "20": _chunkBMJMY6FXcjs.createDraft20SessionState,
66
+ "21": _chunkOBATJBNLcjs.createDraft21SessionState
63
67
  };
64
68
  const factory = factories[draft];
65
69
  if (!factory) {
@@ -1,6 +1,6 @@
1
- import { S as SessionStateOptions, a as SessionState } from './session-types-B9idsih-.cjs';
2
- export { A as AnnouncePhase, b as AnnounceState, 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-B9idsih-.cjs';
3
- import { c as Draft } from './types-DG5_iKuv.cjs';
1
+ import { S as SessionStateOptions, a as SessionState } from './session-types-DZkI_qFG.cjs';
2
+ export { A as AnnouncePhase, b as AnnounceState, 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-DZkI_qFG.cjs';
3
+ import { c as Draft } from './types-2NisMA8_.cjs';
4
4
  import { D as Draft07Message, a as Draft07MessageType } from './types-Dl4IaAHR.cjs';
5
5
  import { D as Draft08Message, a as Draft08MessageType } from './types-jV1yDDBA.cjs';
6
6
  import { D as Draft09Message, a as Draft09MessageType } from './types-B3g5G9KP.cjs';
@@ -15,6 +15,7 @@ import { D as Draft17Message, a as Draft17MessageType } from './types-DAnalt5K.c
15
15
  import { D as Draft18Message, a as Draft18MessageType } from './types-DxXNP32l.cjs';
16
16
  import { D as Draft19Message, a as Draft19MessageType } from './types-Btp416jt.cjs';
17
17
  import { D as Draft20Message, a as Draft20MessageType } from './types-CwN7AEoL.cjs';
18
+ import { D as Draft21Message, a as Draft21MessageType } from './types-DDwidj2d.cjs';
18
19
 
19
20
  /**
20
21
  * @moqtap/codec/session — MoQT session state machine
@@ -39,6 +40,7 @@ type DraftSessionStateMap = {
39
40
  '18': SessionState<Draft18Message, Draft18MessageType>;
40
41
  '19': SessionState<Draft19Message, Draft19MessageType>;
41
42
  '20': SessionState<Draft20Message, Draft20MessageType>;
43
+ '21': SessionState<Draft21Message, Draft21MessageType>;
42
44
  };
43
45
  /**
44
46
  * Create a session state machine for the given draft version.
package/dist/session.d.ts CHANGED
@@ -1,6 +1,6 @@
1
- import { S as SessionStateOptions, a as SessionState } from './session-types-Dn7b3RZM.js';
2
- export { A as AnnouncePhase, b as AnnounceState, 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-Dn7b3RZM.js';
3
- import { c as Draft } from './types-DG5_iKuv.js';
1
+ import { S as SessionStateOptions, a as SessionState } from './session-types-Cxx7W8zZ.js';
2
+ export { A as AnnouncePhase, b as AnnounceState, 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-Cxx7W8zZ.js';
3
+ import { c as Draft } from './types-2NisMA8_.js';
4
4
  import { D as Draft07Message, a as Draft07MessageType } from './types-Dl4IaAHR.js';
5
5
  import { D as Draft08Message, a as Draft08MessageType } from './types-jV1yDDBA.js';
6
6
  import { D as Draft09Message, a as Draft09MessageType } from './types-B3g5G9KP.js';
@@ -15,6 +15,7 @@ import { D as Draft17Message, a as Draft17MessageType } from './types-DAnalt5K.j
15
15
  import { D as Draft18Message, a as Draft18MessageType } from './types-DxXNP32l.js';
16
16
  import { D as Draft19Message, a as Draft19MessageType } from './types-Btp416jt.js';
17
17
  import { D as Draft20Message, a as Draft20MessageType } from './types-CwN7AEoL.js';
18
+ import { D as Draft21Message, a as Draft21MessageType } from './types-DDwidj2d.js';
18
19
 
19
20
  /**
20
21
  * @moqtap/codec/session — MoQT session state machine
@@ -39,6 +40,7 @@ type DraftSessionStateMap = {
39
40
  '18': SessionState<Draft18Message, Draft18MessageType>;
40
41
  '19': SessionState<Draft19Message, Draft19MessageType>;
41
42
  '20': SessionState<Draft20Message, Draft20MessageType>;
43
+ '21': SessionState<Draft21Message, Draft21MessageType>;
42
44
  };
43
45
  /**
44
46
  * Create a session state machine for the given draft version.
package/dist/session.js CHANGED
@@ -7,6 +7,9 @@ import {
7
7
  import {
8
8
  createDraft20SessionState
9
9
  } from "./chunk-WX5PU7HF.js";
10
+ import {
11
+ createDraft21SessionState
12
+ } from "./chunk-XPCBPACE.js";
10
13
  import {
11
14
  createDraft14SessionState
12
15
  } from "./chunk-MZ7HUCGJ.js";
@@ -59,7 +62,8 @@ function createSessionState(options) {
59
62
  "17": createDraft17SessionState,
60
63
  "18": createDraft18SessionState,
61
64
  "19": createDraft19SessionState,
62
- "20": createDraft20SessionState
65
+ "20": createDraft20SessionState,
66
+ "21": createDraft21SessionState
63
67
  };
64
68
  const factory = factories[draft];
65
69
  if (!factory) {
@@ -1,4 +1,4 @@
1
- type Draft = '07' | '08' | '09' | '10' | '11' | '12' | '13' | '14' | '15' | '16' | '17' | '18' | '19' | '20';
1
+ type Draft = '07' | '08' | '09' | '10' | '11' | '12' | '13' | '14' | '15' | '16' | '17' | '18' | '19' | '20' | '21';
2
2
  interface BaseCodec<M> {
3
3
  readonly draft: Draft;
4
4
  encodeMessage(message: M): Uint8Array;
@@ -1,4 +1,4 @@
1
- type Draft = '07' | '08' | '09' | '10' | '11' | '12' | '13' | '14' | '15' | '16' | '17' | '18' | '19' | '20';
1
+ type Draft = '07' | '08' | '09' | '10' | '11' | '12' | '13' | '14' | '15' | '16' | '17' | '18' | '19' | '20' | '21';
2
2
  interface BaseCodec<M> {
3
3
  readonly draft: Draft;
4
4
  encodeMessage(message: M): Uint8Array;