@imferno/wasm 1.1.0 → 2.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -23,6 +23,7 @@ import {
23
23
  parsePklTyped,
24
24
  parseVolindexTyped,
25
25
  validate,
26
+ codes,
26
27
  getVersion,
27
28
  } from '@imferno/wasm';
28
29
 
@@ -43,14 +44,21 @@ console.log(result.report.warnings);
43
44
  console.log(result.cpls);
44
45
  console.log(result.unreferencedAssets);
45
46
 
46
- // Validate with spec selection and custom rules
47
+ // Validate with custom rules (typed codes give autocomplete + typo protection)
47
48
  const result2 = await validate(
48
49
  {
49
50
  'ASSETMAP.xml': assetmapXml,
50
51
  'PKL_abc.xml': pklXml,
51
52
  'CPL_def.xml': cplXml,
52
53
  },
53
- { coreSpec: 'v2020', app2eSpec: 'v2023' },
54
+ {
55
+ coreSpec: 'v2020',
56
+ app2eSpec: 'v2023',
57
+ rules: {
58
+ [codes.ST2067_2_2020.FileNotFound]: 'critical',
59
+ [codes.ST2067_2_2020.ChecksumMismatch]: 'off',
60
+ },
61
+ },
54
62
  );
55
63
  ```
56
64
 
@@ -58,13 +66,14 @@ WASM initialization is handled automatically on first call.
58
66
 
59
67
  ## API
60
68
 
61
- | Function | Description |
62
- |----------|-------------|
69
+ | Export | Description |
70
+ |--------|-------------|
63
71
  | `validate(files, options?)` | Validate a full IMF package, returns report + parsed data |
64
72
  | `parseCplTyped(xml)` | Parse CPL XML |
65
73
  | `parseAssetmapTyped(xml)` | Parse ASSETMAP.xml |
66
74
  | `parsePklTyped(xml)` | Parse PKL XML |
67
75
  | `parseVolindexTyped(xml)` | Parse VOLINDEX.xml |
76
+ | `codes` | Typed validation code constants for use in `rules` config |
68
77
  | `getVersion()` | Get library version |
69
78
 
70
79
  ### Spec selection values
package/codes.d.ts ADDED
@@ -0,0 +1,340 @@
1
+ // Auto-generated by `cargo xtask generate-codes-ts` — do not edit.
2
+ export declare const codes: {
3
+ readonly ST429_9_2014: {
4
+ readonly VolindexMissing: "ST429-9:2014:7/VolindexMissing";
5
+ readonly MalformedXml: "ST429-9:2014:7/MalformedXml";
6
+ };
7
+ readonly ST377_1_2011: {
8
+ readonly NotMxf: "ST377-1:2011:5/NotMxf";
9
+ readonly ParseError: "ST377-1:2011:5/ParseError";
10
+ readonly NoEssenceContainers: "ST377-1:2011:11/NoEssenceContainers";
11
+ readonly OP1a: "ST377-1:2011:7/OP1a";
12
+ };
13
+ readonly ST2067_2_2020: {
14
+ readonly AssetMap: "ST2067-2:2020:7/AssetMap";
15
+ readonly AssetMapMalformedXml: "ST2067-2:2020:7/MalformedXml";
16
+ readonly PklMalformedXml: "ST2067-2:2020:9/MalformedXml";
17
+ readonly NoCpls: "ST2067-2:2020:7/NoCpls";
18
+ readonly SizeMismatch: "ST2067-2:2020:8.3/SizeMismatch";
19
+ readonly FileNotFound: "ST2067-2:2020:8.3/FileNotFound";
20
+ readonly ChecksumMismatch: "ST2067-2:2020:8.3/ChecksumMismatch";
21
+ readonly UnresolvedUuid: "ST2067-2:2020:7/UnresolvedUuid";
22
+ readonly DuplicateUuid: "ST2067-2:2020:7/DuplicateUuid";
23
+ readonly IoError: "IMF:General/IoError";
24
+ readonly EssenceDescriptorList: "ST2067-2:2020:6.4.2/EssenceDescriptorList";
25
+ };
26
+ readonly ST2067_2_2013_Core: {
27
+ readonly ResourceListEmpty: "ST2067-2:2013:XSD/ResourceList-Empty";
28
+ readonly ContentTitle: "ST2067-2:2013:XSD/ContentTitle";
29
+ readonly TotalRunningTimeFormat: "ST2067-2:2013:XSD/TotalRunningTime-Format";
30
+ readonly SegmentList: "ST2067-2:2013:XSD/SegmentList";
31
+ readonly Segment: "ST2067-2:2013:XSD/Segment";
32
+ readonly EditRate: "ST2067-2:2013:XSD-88/EditRate";
33
+ readonly IssueDate: "ST2067-2:2013:XSD-66/IssueDate";
34
+ readonly IssueDateFormat: "ST2067-2:2013:XSD-66/IssueDate-Format";
35
+ readonly CompositionTimecodeDropFrame: "ST2067-2:2013:XSD-121-127/CompositionTimecode-DropFrame";
36
+ readonly CompositionTimecodeRate: "ST2067-2:2013:XSD-121-127/CompositionTimecode-Rate";
37
+ readonly CompositionTimecodeStartAddress: "ST2067-2:2013:XSD-121-127/CompositionTimecode-StartAddress";
38
+ readonly CompositionTimecodeRateZero: "ST2067-2:2013:XSD-121-127/CompositionTimecode-Rate-Zero";
39
+ readonly CompositionTimecodeStartAddressFormat: "ST2067-2:2013:XSD-121-127/CompositionTimecode-StartAddress-Format";
40
+ readonly CompositionTimecodeRateMismatch: "ST2067-2:2013:XSD-121-127/CompositionTimecode-RateMismatch";
41
+ readonly LocaleListNonEmpty: "ST2067-2:2013:XSD/LocaleList-NonEmpty";
42
+ readonly UniqueSegmentId: "ST2067-2:2013:6.1/UniqueSegmentId";
43
+ readonly UniqueEssenceDescriptorId: "ST2067-2:2013:6.1/UniqueEssenceDescriptorId";
44
+ readonly UniqueResourceId: "ST2067-2:2013:6.1/UniqueResourceId";
45
+ readonly IntrinsicDuration: "ST2067-2:2013:6.10/IntrinsicDuration";
46
+ readonly EntryPoint: "ST2067-2:2013:6.10/EntryPoint";
47
+ readonly SourceDuration: "ST2067-2:2013:6.10/SourceDuration";
48
+ readonly ResourceDuration: "ST2067-2:2013:6.10/ResourceDuration";
49
+ readonly RepeatCount: "ST2067-2:2013:6.10/RepeatCount";
50
+ readonly TrackFileId: "ST2067-2:2013:6.10/TrackFileId";
51
+ readonly VirtualTrackContinuity: "ST2067-2:2013:6.9/VirtualTrackContinuity";
52
+ readonly VirtualTrackEditRate: "ST2067-2:2013:6.9.3/VirtualTrackEditRate";
53
+ readonly TimedTextSampleRate: "ST2067-2:2013:10/TimedText-SampleRate";
54
+ readonly TimedTextEmptyLanguageTag: "ST2067-2:2013:10/TimedText-EmptyLanguageTag";
55
+ readonly TimedTextMalformedLanguageTag: "ST2067-2:2013:10/TimedText-MalformedLanguageTag";
56
+ readonly AudioSampleRate: "ST2067-2:2013:ST377-4/AudioSampleRate";
57
+ readonly ChannelCount: "ST2067-2:2013:ST377-4/ChannelCount";
58
+ readonly MCASubDescriptors: "ST2067-2:2013:ST377-4/MCASubDescriptors";
59
+ readonly SoundfieldGroup: "ST2067-2:2013:ST377-4/SoundfieldGroup";
60
+ readonly MCATagSymbol: "ST2067-2:2013:ST377-4/MCATagSymbol";
61
+ readonly SoundfieldChannelCount: "ST2067-2:2013:ST377-4/SoundfieldChannelCount";
62
+ readonly DigitalSignature: "ST2067-2:2013:8/DigitalSignature";
63
+ readonly DanglingEssenceDescriptor: "ST2067-2:2013:6.4.2/DanglingEssenceDescriptor";
64
+ readonly EssenceDescriptorList: "ST2067-2:2013:6.4.2/EssenceDescriptorList";
65
+ };
66
+ readonly ST2067_2_2016_Core: {
67
+ readonly ResourceListEmpty: "ST2067-2:2016:XSD/ResourceList-Empty";
68
+ readonly ContentTitle: "ST2067-2:2016:XSD/ContentTitle";
69
+ readonly TotalRunningTimeFormat: "ST2067-2:2016:XSD/TotalRunningTime-Format";
70
+ readonly SegmentList: "ST2067-2:2016:XSD/SegmentList";
71
+ readonly Segment: "ST2067-2:2016:XSD/Segment";
72
+ readonly EditRate: "ST2067-2:2016:XSD-88/EditRate";
73
+ readonly IssueDate: "ST2067-2:2016:XSD-66/IssueDate";
74
+ readonly IssueDateFormat: "ST2067-2:2016:XSD-66/IssueDate-Format";
75
+ readonly CompositionTimecodeDropFrame: "ST2067-2:2016:XSD-121-127/CompositionTimecode-DropFrame";
76
+ readonly CompositionTimecodeRate: "ST2067-2:2016:XSD-121-127/CompositionTimecode-Rate";
77
+ readonly CompositionTimecodeStartAddress: "ST2067-2:2016:XSD-121-127/CompositionTimecode-StartAddress";
78
+ readonly CompositionTimecodeRateZero: "ST2067-2:2016:XSD-121-127/CompositionTimecode-Rate-Zero";
79
+ readonly CompositionTimecodeStartAddressFormat: "ST2067-2:2016:XSD-121-127/CompositionTimecode-StartAddress-Format";
80
+ readonly CompositionTimecodeRateMismatch: "ST2067-2:2016:XSD-121-127/CompositionTimecode-RateMismatch";
81
+ readonly LocaleListNonEmpty: "ST2067-2:2016:XSD/LocaleList-NonEmpty";
82
+ readonly UniqueSegmentId: "ST2067-2:2016:6.1/UniqueSegmentId";
83
+ readonly UniqueEssenceDescriptorId: "ST2067-2:2016:6.1/UniqueEssenceDescriptorId";
84
+ readonly UniqueResourceId: "ST2067-2:2016:6.1/UniqueResourceId";
85
+ readonly IntrinsicDuration: "ST2067-2:2016:6.10/IntrinsicDuration";
86
+ readonly EntryPoint: "ST2067-2:2016:6.10/EntryPoint";
87
+ readonly SourceDuration: "ST2067-2:2016:6.10/SourceDuration";
88
+ readonly ResourceDuration: "ST2067-2:2016:6.10/ResourceDuration";
89
+ readonly RepeatCount: "ST2067-2:2016:6.10/RepeatCount";
90
+ readonly TrackFileId: "ST2067-2:2016:6.10/TrackFileId";
91
+ readonly VirtualTrackContinuity: "ST2067-2:2016:6.9/VirtualTrackContinuity";
92
+ readonly VirtualTrackEditRate: "ST2067-2:2016:6.9.3/VirtualTrackEditRate";
93
+ readonly TimedTextSampleRate: "ST2067-2:2016:10/TimedText-SampleRate";
94
+ readonly TimedTextEmptyLanguageTag: "ST2067-2:2016:10/TimedText-EmptyLanguageTag";
95
+ readonly TimedTextMalformedLanguageTag: "ST2067-2:2016:10/TimedText-MalformedLanguageTag";
96
+ readonly AudioSampleRate: "ST2067-2:2016:ST377-4/AudioSampleRate";
97
+ readonly ChannelCount: "ST2067-2:2016:ST377-4/ChannelCount";
98
+ readonly MCASubDescriptors: "ST2067-2:2016:ST377-4/MCASubDescriptors";
99
+ readonly SoundfieldGroup: "ST2067-2:2016:ST377-4/SoundfieldGroup";
100
+ readonly MCATagSymbol: "ST2067-2:2016:ST377-4/MCATagSymbol";
101
+ readonly SoundfieldChannelCount: "ST2067-2:2016:ST377-4/SoundfieldChannelCount";
102
+ readonly DigitalSignature: "ST2067-2:2016:8/DigitalSignature";
103
+ readonly DanglingEssenceDescriptor: "ST2067-2:2016:6.4.2/DanglingEssenceDescriptor";
104
+ readonly EssenceDescriptorList: "ST2067-2:2016:6.4.2/EssenceDescriptorList";
105
+ };
106
+ readonly ST2067_2_2020_Core: {
107
+ readonly ResourceListEmpty: "ST2067-2:2020:XSD/ResourceList-Empty";
108
+ readonly ContentTitle: "ST2067-2:2020:XSD/ContentTitle";
109
+ readonly TotalRunningTimeFormat: "ST2067-2:2020:XSD/TotalRunningTime-Format";
110
+ readonly SegmentList: "ST2067-2:2020:XSD/SegmentList";
111
+ readonly Segment: "ST2067-2:2020:XSD/Segment";
112
+ readonly EditRate: "ST2067-2:2020:XSD-88/EditRate";
113
+ readonly IssueDate: "ST2067-2:2020:XSD-66/IssueDate";
114
+ readonly IssueDateFormat: "ST2067-2:2020:XSD-66/IssueDate-Format";
115
+ readonly CompositionTimecodeDropFrame: "ST2067-2:2020:XSD-121-127/CompositionTimecode-DropFrame";
116
+ readonly CompositionTimecodeRate: "ST2067-2:2020:XSD-121-127/CompositionTimecode-Rate";
117
+ readonly CompositionTimecodeStartAddress: "ST2067-2:2020:XSD-121-127/CompositionTimecode-StartAddress";
118
+ readonly CompositionTimecodeRateZero: "ST2067-2:2020:XSD-121-127/CompositionTimecode-Rate-Zero";
119
+ readonly CompositionTimecodeStartAddressFormat: "ST2067-2:2020:XSD-121-127/CompositionTimecode-StartAddress-Format";
120
+ readonly CompositionTimecodeRateMismatch: "ST2067-2:2020:XSD-121-127/CompositionTimecode-RateMismatch";
121
+ readonly LocaleListNonEmpty: "ST2067-2:2020:XSD/LocaleList-NonEmpty";
122
+ readonly UniqueSegmentId: "ST2067-2:2020:6.1/UniqueSegmentId";
123
+ readonly UniqueEssenceDescriptorId: "ST2067-2:2020:6.1/UniqueEssenceDescriptorId";
124
+ readonly UniqueResourceId: "ST2067-2:2020:6.1/UniqueResourceId";
125
+ readonly IntrinsicDuration: "ST2067-2:2020:6.10/IntrinsicDuration";
126
+ readonly EntryPoint: "ST2067-2:2020:6.10/EntryPoint";
127
+ readonly SourceDuration: "ST2067-2:2020:6.10/SourceDuration";
128
+ readonly ResourceDuration: "ST2067-2:2020:6.10/ResourceDuration";
129
+ readonly RepeatCount: "ST2067-2:2020:6.10/RepeatCount";
130
+ readonly TrackFileId: "ST2067-2:2020:6.10/TrackFileId";
131
+ readonly VirtualTrackContinuity: "ST2067-2:2020:6.9/VirtualTrackContinuity";
132
+ readonly VirtualTrackEditRate: "ST2067-2:2020:6.9.3/VirtualTrackEditRate";
133
+ readonly TimedTextSampleRate: "ST2067-2:2020:10/TimedText-SampleRate";
134
+ readonly TimedTextEmptyLanguageTag: "ST2067-2:2020:10/TimedText-EmptyLanguageTag";
135
+ readonly TimedTextMalformedLanguageTag: "ST2067-2:2020:10/TimedText-MalformedLanguageTag";
136
+ readonly AudioSampleRate: "ST2067-2:2020:ST377-4/AudioSampleRate";
137
+ readonly ChannelCount: "ST2067-2:2020:ST377-4/ChannelCount";
138
+ readonly MCASubDescriptors: "ST2067-2:2020:ST377-4/MCASubDescriptors";
139
+ readonly SoundfieldGroup: "ST2067-2:2020:ST377-4/SoundfieldGroup";
140
+ readonly MCATagSymbol: "ST2067-2:2020:ST377-4/MCATagSymbol";
141
+ readonly SoundfieldChannelCount: "ST2067-2:2020:ST377-4/SoundfieldChannelCount";
142
+ readonly DigitalSignature: "ST2067-2:2020:8/DigitalSignature";
143
+ readonly DanglingEssenceDescriptor: "ST2067-2:2020:6.4.2/DanglingEssenceDescriptor";
144
+ readonly EssenceDescriptorList: "ST2067-2:2020:6.4.2/EssenceDescriptorList";
145
+ };
146
+ readonly ST2067_3_2013: {
147
+ readonly ContentKindUnknown: "ST2067-3:2013:5.5.1.2/ContentKindUnknown";
148
+ readonly SourceEncodingNoEssenceDescriptorList: "ST2067-3:2013:6.4.2/SourceEncodingNoEssenceDescriptorList";
149
+ readonly SourceEncodingUnresolved: "ST2067-3:2013:6.4.2/SourceEncodingUnresolved";
150
+ readonly EssenceDescriptorListEmpty: "ST2067-3:2013:6.4.2/EssenceDescriptorListEmpty";
151
+ readonly ContentVersionListEmpty: "ST2067-3:2013:6.11/ContentVersionListEmpty";
152
+ readonly ContentVersionIdInvalid: "ST2067-3:2013:6.11/ContentVersionIdInvalid";
153
+ readonly ContentVersionLabelTextMissing: "ST2067-3:2013:6.11/ContentVersionLabelTextMissing";
154
+ readonly LocaleLanguageTagInvalid: "ST2067-3:2013:6.12/LocaleLanguageTagInvalid";
155
+ readonly TrackIdNotUnique: "ST2067-3:2013:7.3/TrackIdNotUnique";
156
+ readonly MarkerOffsetOutOfRange: "ST2067-3:2013:7.4/MarkerOffsetOutOfRange";
157
+ readonly MarkerLabelUnknown: "ST2067-3:2013:7.4/MarkerLabelUnknown";
158
+ readonly SegmentDuration: "ST2067-3:2013:7.2.2/SegmentDuration";
159
+ readonly ContentVersionIdDuplicate: "ST2067-3:2013:6.1.9/ContentVersionIdDuplicate";
160
+ readonly SegmentDurationIntegerEditUnits: "ST2067-3:2013:7.3/SegmentDurationIntegerEditUnits";
161
+ };
162
+ readonly ST2067_3_2016: {
163
+ readonly ContentKindUnknown: "ST2067-3:2016:5.5.1.2/ContentKindUnknown";
164
+ readonly SourceEncodingNoEssenceDescriptorList: "ST2067-3:2016:6.4.2/SourceEncodingNoEssenceDescriptorList";
165
+ readonly SourceEncodingUnresolved: "ST2067-3:2016:6.4.2/SourceEncodingUnresolved";
166
+ readonly EssenceDescriptorListEmpty: "ST2067-3:2016:6.4.2/EssenceDescriptorListEmpty";
167
+ readonly ContentVersionListEmpty: "ST2067-3:2016:6.11/ContentVersionListEmpty";
168
+ readonly ContentVersionIdInvalid: "ST2067-3:2016:6.11/ContentVersionIdInvalid";
169
+ readonly ContentVersionLabelTextMissing: "ST2067-3:2016:6.11/ContentVersionLabelTextMissing";
170
+ readonly LocaleLanguageTagInvalid: "ST2067-3:2016:6.12/LocaleLanguageTagInvalid";
171
+ readonly TrackIdNotUnique: "ST2067-3:2016:7.3/TrackIdNotUnique";
172
+ readonly MarkerOffsetOutOfRange: "ST2067-3:2016:7.4/MarkerOffsetOutOfRange";
173
+ readonly MarkerLabelUnknown: "ST2067-3:2016:7.4/MarkerLabelUnknown";
174
+ readonly SegmentDuration: "ST2067-3:2016:7.2.2/SegmentDuration";
175
+ readonly ContentVersionIdDuplicate: "ST2067-3:2016:6.1.9/ContentVersionIdDuplicate";
176
+ readonly SegmentDurationIntegerEditUnits: "ST2067-3:2016:7.3/SegmentDurationIntegerEditUnits";
177
+ };
178
+ readonly ST2067_3_2020: {
179
+ readonly ContentKindUnknown: "ST2067-3:2020:5.5.1.2/ContentKindUnknown";
180
+ readonly SourceEncodingNoEssenceDescriptorList: "ST2067-3:2020:6.4.2/SourceEncodingNoEssenceDescriptorList";
181
+ readonly SourceEncodingUnresolved: "ST2067-3:2020:6.4.2/SourceEncodingUnresolved";
182
+ readonly EssenceDescriptorListEmpty: "ST2067-3:2020:6.4.2/EssenceDescriptorListEmpty";
183
+ readonly ContentVersionListEmpty: "ST2067-3:2020:6.11/ContentVersionListEmpty";
184
+ readonly ContentVersionIdInvalid: "ST2067-3:2020:6.11/ContentVersionIdInvalid";
185
+ readonly ContentVersionLabelTextMissing: "ST2067-3:2020:6.11/ContentVersionLabelTextMissing";
186
+ readonly LocaleLanguageTagInvalid: "ST2067-3:2020:6.12/LocaleLanguageTagInvalid";
187
+ readonly TrackIdNotUnique: "ST2067-3:2020:7.3/TrackIdNotUnique";
188
+ readonly MarkerOffsetOutOfRange: "ST2067-3:2020:7.4/MarkerOffsetOutOfRange";
189
+ readonly MarkerLabelUnknown: "ST2067-3:2020:7.4/MarkerLabelUnknown";
190
+ readonly SegmentDuration: "ST2067-3:2020:7.2.2/SegmentDuration";
191
+ readonly ContentVersionIdDuplicate: "ST2067-3:2020:6.1.9/ContentVersionIdDuplicate";
192
+ readonly SegmentDurationIntegerEditUnits: "ST2067-3:2020:7.3/SegmentDurationIntegerEditUnits";
193
+ };
194
+ readonly ST2067_9_2018: {
195
+ readonly MalformedXml: "ST2067-9:2018:6.1/MalformedXml";
196
+ readonly SidecarAssetReferencedByVirtualTrack: "ST2067-9:2018:5/SidecarAssetReferencedByVirtualTrack";
197
+ readonly DuplicateAssetId: "ST2067-9:2018:7.2.3/DuplicateAssetId";
198
+ readonly SignerWithoutSignature: "ST2067-9:2018:7.2.4/SignerWithoutSignature";
199
+ readonly SignatureWithoutSigner: "ST2067-9:2018:7.2.5/SignatureWithoutSigner";
200
+ readonly SidecarAssetNotFound: "ST2067-9:2018:7.3.1/SidecarAssetNotFound";
201
+ readonly CplNotFound: "ST2067-9:2018:7.3.1.1/CplNotFound";
202
+ readonly DuplicateCplId: "ST2067-9:2018:7.3.1.1/DuplicateCplId";
203
+ };
204
+ readonly ST2067_21_2020: {
205
+ readonly AppIdMismatch: "ST2067-21:2020:7.1/AppIdMismatch";
206
+ };
207
+ readonly ST2067_21_2023: {
208
+ readonly FrameRate: "ST2067-21:2023:5.2/FrameRate";
209
+ readonly Resolution: "ST2067-21:2023:5.2/Resolution";
210
+ readonly EmptyLanguageTag: "ST2067-21:2023:5.3/EmptyLanguageTag";
211
+ readonly MalformedLanguageTag: "ST2067-21:2023:5.3/MalformedLanguageTag";
212
+ readonly RegionCode: "ST2067-21:2023:5.3/RegionCode";
213
+ readonly ColorSystem: "ST2067-21:2023:6.2/ColorSystem";
214
+ readonly RequiredStoredWidth: "ST2067-21:2023:6.2/Required-StoredWidth";
215
+ readonly RequiredStoredHeight: "ST2067-21:2023:6.2/Required-StoredHeight";
216
+ readonly RequiredSampleRate: "ST2067-21:2023:6.2/Required-SampleRate";
217
+ readonly RequiredFrameLayout: "ST2067-21:2023:6.2/Required-FrameLayout";
218
+ readonly RequiredColorPrimaries: "ST2067-21:2023:6.2/Required-ColorPrimaries";
219
+ readonly RequiredTransferCharacteristic: "ST2067-21:2023:6.2/Required-TransferCharacteristic";
220
+ readonly RequiredPictureCompression: "ST2067-21:2023:6.2/Required-PictureCompression";
221
+ readonly RequiredComponentDepth: "ST2067-21:2023:6.2/Required-ComponentDepth";
222
+ readonly RequiredChannelCount: "ST2067-21:2023:6.5/Required-ChannelCount";
223
+ readonly RequiredQuantizationBits: "ST2067-21:2023:6.5/Required-QuantizationBits";
224
+ readonly AlphaTransparency: "ST2067-21:2023:6.2.1/AlphaTransparency";
225
+ readonly "6.2.1CodingEquations": "ST2067-21:2023:6.2.1/CodingEquations";
226
+ readonly "6.2.1ColorPrimaries": "ST2067-21:2023:6.2.1/ColorPrimaries";
227
+ readonly FieldDominance: "ST2067-21:2023:6.2.1/FieldDominance";
228
+ readonly FrameLayout: "ST2067-21:2023:6.2.1/FrameLayout";
229
+ readonly FrameLayoutInterlaced: "ST2067-21:2023:6.2.1/FrameLayoutInterlaced";
230
+ readonly ImageAlignmentOffset: "ST2067-21:2023:6.2.1/ImageAlignmentOffset";
231
+ readonly ImageEndOffset: "ST2067-21:2023:6.2.1/ImageEndOffset";
232
+ readonly ImageStartOffset: "ST2067-21:2023:6.2.1/ImageStartOffset";
233
+ readonly SampledHeight: "ST2067-21:2023:6.2.1/SampledHeight";
234
+ readonly SampledWidth: "ST2067-21:2023:6.2.1/SampledWidth";
235
+ readonly SampledXOffset: "ST2067-21:2023:6.2.1/SampledXOffset";
236
+ readonly SampledYOffset: "ST2067-21:2023:6.2.1/SampledYOffset";
237
+ readonly StoredF2Offset: "ST2067-21:2023:6.2.1/StoredF2Offset";
238
+ readonly "6.2.1TransferCharacteristic": "ST2067-21:2023:6.2.1/TransferCharacteristic";
239
+ readonly "6.2.2TransferCharacteristic": "ST2067-21:2023:6.2.2/TransferCharacteristic";
240
+ readonly "6.2.3CodingEquations": "ST2067-21:2023:6.2.3/CodingEquations";
241
+ readonly "6.2.4ColorPrimaries": "ST2067-21:2023:6.2.4/ColorPrimaries";
242
+ readonly J2KRequired: "ST2067-21:2023:6.2.5/J2KRequired";
243
+ readonly AlphaMaxRef: "ST2067-21:2023:6.3/AlphaMaxRef";
244
+ readonly AlphaMinRef: "ST2067-21:2023:6.3/AlphaMinRef";
245
+ readonly ComponentMaxRef: "ST2067-21:2023:6.3/ComponentMaxRef";
246
+ readonly ComponentMinRef: "ST2067-21:2023:6.3/ComponentMinRef";
247
+ readonly Palette: "ST2067-21:2023:6.3/Palette";
248
+ readonly PaletteLayout: "ST2067-21:2023:6.3/PaletteLayout";
249
+ readonly ScanningDirection: "ST2067-21:2023:6.3/ScanningDirection";
250
+ readonly ComponentRefValues: "ST2067-21:2023:6.3.2/ComponentRefValues";
251
+ readonly AlphaSampleDepth: "ST2067-21:2023:6.4/AlphaSampleDepth";
252
+ readonly ColorSiting: "ST2067-21:2023:6.4/ColorSiting";
253
+ readonly ComponentDepth: "ST2067-21:2023:6.4/ComponentDepth";
254
+ readonly HorizontalSubsampling: "ST2067-21:2023:6.4/HorizontalSubsampling";
255
+ readonly PaddingBits: "ST2067-21:2023:6.4/PaddingBits";
256
+ readonly ReversedByteOrder: "ST2067-21:2023:6.4/ReversedByteOrder";
257
+ readonly VerticalSubsampling: "ST2067-21:2023:6.4/VerticalSubsampling";
258
+ readonly BlackRefLevel: "ST2067-21:2023:6.4.3/BlackRefLevel";
259
+ readonly ColorRange: "ST2067-21:2023:6.4.3/ColorRange";
260
+ readonly WhiteRefLevel: "ST2067-21:2023:6.4.3/WhiteRefLevel";
261
+ readonly AudioSampleRate: "ST2067-21:2023:6.5/AudioSampleRate";
262
+ readonly QuantizationBits: "ST2067-21:2023:6.5/QuantizationBits";
263
+ readonly CodingStyle: "ST2067-21:2023:6.5.2/CodingStyle";
264
+ readonly J2CLayout: "ST2067-21:2023:6.5.2/J2CLayout";
265
+ readonly J2KExtendedCapabilities: "ST2067-21:2023:6.5.2/J2KExtendedCapabilities";
266
+ readonly JPEG2000SubDescriptor: "ST2067-21:2023:6.5.2/JPEG2000SubDescriptor";
267
+ readonly J2KHTNotAllowed: "ST2067-21:2023:6.2.5/J2K-HT-Not-Allowed";
268
+ readonly J2K4KResolution: "ST2067-21:2023:6.2.5/J2K-4K-Resolution";
269
+ readonly J2K2KResolution: "ST2067-21:2023:6.2.5/J2K-2K-Resolution";
270
+ readonly J2KBCPResolution: "ST2067-21:2023:6.2.5/J2K-BCP-Resolution";
271
+ readonly ApplicationIdentification: "ST2067-21:2023:7.1/ApplicationIdentification";
272
+ readonly ContentMaturityRatingAgency: "ST2067-21:2023:7.1/ContentMaturityRating-Agency";
273
+ readonly ContentMaturityRatingAgencyURI: "ST2067-21:2023:7.1/ContentMaturityRating-Agency-URI";
274
+ readonly HomogeneousImageEssence: "ST2067-21:2023:7.2/HomogeneousImageEssence";
275
+ readonly AppIdMismatch: "ST2067-21:2023:7.1/AppIdMismatch";
276
+ readonly SegmentDurationMultiple: "ST2067-21:2023:7.4/SegmentDurationMultiple";
277
+ readonly MaxCLLMaxFALL: "ST2067-21:2023:7.5/MaxCLLMaxFALL";
278
+ };
279
+ readonly ST2067_21_2025: {
280
+ readonly FNTimedText: "ST2067-21:2025:5.6/FNTimedText";
281
+ readonly HICTimedText: "ST2067-21:2025:5.6/HICTimedText";
282
+ };
283
+ readonly ST2067_201_2019: {
284
+ readonly CodecForbidden: "ST2067-201:2019:5.9/CodecForbidden";
285
+ readonly ElectrospatialFormulationForbidden: "ST2067-201:2019:5.9/ElectrospatialFormulationForbidden";
286
+ readonly QuantizationBitsMissing: "ST2067-201:2019:5.9/QuantizationBitsMissing";
287
+ readonly QuantizationBitsInvalid: "ST2067-201:2019:5.9/QuantizationBitsInvalid";
288
+ readonly ContainerFormatMissing: "ST2067-201:2019:5.3/ContainerFormatMissing";
289
+ readonly EssenceContainerInvalid: "ST2067-201:2019:5.3/EssenceContainerInvalid";
290
+ readonly AudioSamplingRateMissing: "ST2067-201:2019:5.9/AudioSamplingRateMissing";
291
+ readonly AudioSamplingRateInvalid: "ST2067-201:2019:5.9/AudioSamplingRateInvalid";
292
+ readonly SoundCompressionMissing: "ST2067-201:2019:5.9/SoundCompressionMissing";
293
+ readonly SoundCompressionInvalid: "ST2067-201:2019:5.9/SoundCompressionInvalid";
294
+ readonly ChannelCountNotZero: "ST2067-201:2019:5.9/ChannelCountNotZero";
295
+ readonly SubDescriptorMissing: "ST2067-201:2019:5.9/SubDescriptorMissing";
296
+ readonly MCATagSymbolMissing: "ST2067-201:2019:5.9/MCATagSymbolMissing";
297
+ readonly MCATagSymbolInvalid: "ST2067-201:2019:5.9/MCATagSymbolInvalid";
298
+ readonly MCATagNameMissing: "ST2067-201:2019:5.9/MCATagNameMissing";
299
+ readonly MCATagNameInvalid: "ST2067-201:2019:5.9/MCATagNameInvalid";
300
+ readonly MCALabelDictionaryIDMissing: "ST2067-201:2019:5.9/MCALabelDictionaryIDMissing";
301
+ readonly MCALabelDictionaryIDInvalid: "ST2067-201:2019:5.9/MCALabelDictionaryIDInvalid";
302
+ readonly MainAudioMissing: "ST2067-201:2019:6.2/MainAudioMissing";
303
+ readonly IABSequenceNoResources: "ST2067-201:2019:6.2/IABSequenceNoResources";
304
+ readonly IABSequenceSourceEncodingInvalid: "ST2067-201:2019:6.2/IABSequenceSourceEncodingInvalid";
305
+ };
306
+ readonly ST2067_201_2021: {
307
+ readonly CodecForbidden: "ST2067-201:2021:5.9/CodecForbidden";
308
+ readonly ElectrospatialFormulationForbidden: "ST2067-201:2021:5.9/ElectrospatialFormulationForbidden";
309
+ readonly QuantizationBitsMissing: "ST2067-201:2021:5.9/QuantizationBitsMissing";
310
+ readonly QuantizationBitsInvalid: "ST2067-201:2021:5.9/QuantizationBitsInvalid";
311
+ readonly ContainerFormatMissing: "ST2067-201:2021:5.3/ContainerFormatMissing";
312
+ readonly EssenceContainerInvalid: "ST2067-201:2021:5.3/EssenceContainerInvalid";
313
+ readonly AudioSamplingRateMissing: "ST2067-201:2021:5.9/AudioSamplingRateMissing";
314
+ readonly AudioSamplingRateInvalid: "ST2067-201:2021:5.9/AudioSamplingRateInvalid";
315
+ readonly SoundCompressionMissing: "ST2067-201:2021:5.9/SoundCompressionMissing";
316
+ readonly SoundCompressionInvalid: "ST2067-201:2021:5.9/SoundCompressionInvalid";
317
+ readonly ChannelCountNotZero: "ST2067-201:2021:5.9/ChannelCountNotZero";
318
+ readonly SubDescriptorMissing: "ST2067-201:2021:5.9/SubDescriptorMissing";
319
+ readonly MCATagSymbolMissing: "ST2067-201:2021:5.9/MCATagSymbolMissing";
320
+ readonly MCATagSymbolInvalid: "ST2067-201:2021:5.9/MCATagSymbolInvalid";
321
+ readonly MCATagNameMissing: "ST2067-201:2021:5.9/MCATagNameMissing";
322
+ readonly MCATagNameInvalid: "ST2067-201:2021:5.9/MCATagNameInvalid";
323
+ readonly MCALabelDictionaryIDMissing: "ST2067-201:2021:5.9/MCALabelDictionaryIDMissing";
324
+ readonly MCALabelDictionaryIDInvalid: "ST2067-201:2021:5.9/MCALabelDictionaryIDInvalid";
325
+ readonly MainAudioMissing: "ST2067-201:2021:6.2/MainAudioMissing";
326
+ readonly IABSequenceNoResources: "ST2067-201:2021:6.2/IABSequenceNoResources";
327
+ readonly IABSequenceSourceEncodingInvalid: "ST2067-201:2021:6.2/IABSequenceSourceEncodingInvalid";
328
+ };
329
+ readonly ST2067_202_2022: {
330
+ readonly SubDescriptorMissing: "ST2067-202:2022:5/SubDescriptorMissing";
331
+ readonly NamespaceUriMissing: "ST2067-202:2022:5/NamespaceUriMissing";
332
+ readonly ISXDSequenceNoResources: "ST2067-202:2022:6/ISXDSequenceNoResources";
333
+ readonly ISXDSequenceSourceEncodingInvalid: "ST2067-202:2022:6/ISXDSequenceSourceEncodingInvalid";
334
+ readonly NamespaceUriMismatch: "ST2067-202:2022:6/NamespaceUriMismatch";
335
+ };
336
+ readonly Imferno: {
337
+ readonly UnreferencedAsset: "IMFERNO:Package/UnreferencedAsset";
338
+ readonly UnlistedEssence: "IMFERNO:Package/UnlistedEssence";
339
+ }
340
+ };
package/codes.js ADDED
@@ -0,0 +1,340 @@
1
+ // Auto-generated by `cargo xtask generate-codes-ts` — do not edit.
2
+ export const codes = {
3
+ ST429_9_2014: {
4
+ VolindexMissing: "ST429-9:2014:7/VolindexMissing",
5
+ MalformedXml: "ST429-9:2014:7/MalformedXml",
6
+ },
7
+ ST377_1_2011: {
8
+ NotMxf: "ST377-1:2011:5/NotMxf",
9
+ ParseError: "ST377-1:2011:5/ParseError",
10
+ NoEssenceContainers: "ST377-1:2011:11/NoEssenceContainers",
11
+ OP1a: "ST377-1:2011:7/OP1a",
12
+ },
13
+ ST2067_2_2020: {
14
+ AssetMap: "ST2067-2:2020:7/AssetMap",
15
+ AssetMapMalformedXml: "ST2067-2:2020:7/MalformedXml",
16
+ PklMalformedXml: "ST2067-2:2020:9/MalformedXml",
17
+ NoCpls: "ST2067-2:2020:7/NoCpls",
18
+ SizeMismatch: "ST2067-2:2020:8.3/SizeMismatch",
19
+ FileNotFound: "ST2067-2:2020:8.3/FileNotFound",
20
+ ChecksumMismatch: "ST2067-2:2020:8.3/ChecksumMismatch",
21
+ UnresolvedUuid: "ST2067-2:2020:7/UnresolvedUuid",
22
+ DuplicateUuid: "ST2067-2:2020:7/DuplicateUuid",
23
+ IoError: "IMF:General/IoError",
24
+ EssenceDescriptorList: "ST2067-2:2020:6.4.2/EssenceDescriptorList",
25
+ },
26
+ ST2067_2_2013_Core: {
27
+ ResourceListEmpty: "ST2067-2:2013:XSD/ResourceList-Empty",
28
+ ContentTitle: "ST2067-2:2013:XSD/ContentTitle",
29
+ TotalRunningTimeFormat: "ST2067-2:2013:XSD/TotalRunningTime-Format",
30
+ SegmentList: "ST2067-2:2013:XSD/SegmentList",
31
+ Segment: "ST2067-2:2013:XSD/Segment",
32
+ EditRate: "ST2067-2:2013:XSD-88/EditRate",
33
+ IssueDate: "ST2067-2:2013:XSD-66/IssueDate",
34
+ IssueDateFormat: "ST2067-2:2013:XSD-66/IssueDate-Format",
35
+ CompositionTimecodeDropFrame: "ST2067-2:2013:XSD-121-127/CompositionTimecode-DropFrame",
36
+ CompositionTimecodeRate: "ST2067-2:2013:XSD-121-127/CompositionTimecode-Rate",
37
+ CompositionTimecodeStartAddress: "ST2067-2:2013:XSD-121-127/CompositionTimecode-StartAddress",
38
+ CompositionTimecodeRateZero: "ST2067-2:2013:XSD-121-127/CompositionTimecode-Rate-Zero",
39
+ CompositionTimecodeStartAddressFormat: "ST2067-2:2013:XSD-121-127/CompositionTimecode-StartAddress-Format",
40
+ CompositionTimecodeRateMismatch: "ST2067-2:2013:XSD-121-127/CompositionTimecode-RateMismatch",
41
+ LocaleListNonEmpty: "ST2067-2:2013:XSD/LocaleList-NonEmpty",
42
+ UniqueSegmentId: "ST2067-2:2013:6.1/UniqueSegmentId",
43
+ UniqueEssenceDescriptorId: "ST2067-2:2013:6.1/UniqueEssenceDescriptorId",
44
+ UniqueResourceId: "ST2067-2:2013:6.1/UniqueResourceId",
45
+ IntrinsicDuration: "ST2067-2:2013:6.10/IntrinsicDuration",
46
+ EntryPoint: "ST2067-2:2013:6.10/EntryPoint",
47
+ SourceDuration: "ST2067-2:2013:6.10/SourceDuration",
48
+ ResourceDuration: "ST2067-2:2013:6.10/ResourceDuration",
49
+ RepeatCount: "ST2067-2:2013:6.10/RepeatCount",
50
+ TrackFileId: "ST2067-2:2013:6.10/TrackFileId",
51
+ VirtualTrackContinuity: "ST2067-2:2013:6.9/VirtualTrackContinuity",
52
+ VirtualTrackEditRate: "ST2067-2:2013:6.9.3/VirtualTrackEditRate",
53
+ TimedTextSampleRate: "ST2067-2:2013:10/TimedText-SampleRate",
54
+ TimedTextEmptyLanguageTag: "ST2067-2:2013:10/TimedText-EmptyLanguageTag",
55
+ TimedTextMalformedLanguageTag: "ST2067-2:2013:10/TimedText-MalformedLanguageTag",
56
+ AudioSampleRate: "ST2067-2:2013:ST377-4/AudioSampleRate",
57
+ ChannelCount: "ST2067-2:2013:ST377-4/ChannelCount",
58
+ MCASubDescriptors: "ST2067-2:2013:ST377-4/MCASubDescriptors",
59
+ SoundfieldGroup: "ST2067-2:2013:ST377-4/SoundfieldGroup",
60
+ MCATagSymbol: "ST2067-2:2013:ST377-4/MCATagSymbol",
61
+ SoundfieldChannelCount: "ST2067-2:2013:ST377-4/SoundfieldChannelCount",
62
+ DigitalSignature: "ST2067-2:2013:8/DigitalSignature",
63
+ DanglingEssenceDescriptor: "ST2067-2:2013:6.4.2/DanglingEssenceDescriptor",
64
+ EssenceDescriptorList: "ST2067-2:2013:6.4.2/EssenceDescriptorList",
65
+ },
66
+ ST2067_2_2016_Core: {
67
+ ResourceListEmpty: "ST2067-2:2016:XSD/ResourceList-Empty",
68
+ ContentTitle: "ST2067-2:2016:XSD/ContentTitle",
69
+ TotalRunningTimeFormat: "ST2067-2:2016:XSD/TotalRunningTime-Format",
70
+ SegmentList: "ST2067-2:2016:XSD/SegmentList",
71
+ Segment: "ST2067-2:2016:XSD/Segment",
72
+ EditRate: "ST2067-2:2016:XSD-88/EditRate",
73
+ IssueDate: "ST2067-2:2016:XSD-66/IssueDate",
74
+ IssueDateFormat: "ST2067-2:2016:XSD-66/IssueDate-Format",
75
+ CompositionTimecodeDropFrame: "ST2067-2:2016:XSD-121-127/CompositionTimecode-DropFrame",
76
+ CompositionTimecodeRate: "ST2067-2:2016:XSD-121-127/CompositionTimecode-Rate",
77
+ CompositionTimecodeStartAddress: "ST2067-2:2016:XSD-121-127/CompositionTimecode-StartAddress",
78
+ CompositionTimecodeRateZero: "ST2067-2:2016:XSD-121-127/CompositionTimecode-Rate-Zero",
79
+ CompositionTimecodeStartAddressFormat: "ST2067-2:2016:XSD-121-127/CompositionTimecode-StartAddress-Format",
80
+ CompositionTimecodeRateMismatch: "ST2067-2:2016:XSD-121-127/CompositionTimecode-RateMismatch",
81
+ LocaleListNonEmpty: "ST2067-2:2016:XSD/LocaleList-NonEmpty",
82
+ UniqueSegmentId: "ST2067-2:2016:6.1/UniqueSegmentId",
83
+ UniqueEssenceDescriptorId: "ST2067-2:2016:6.1/UniqueEssenceDescriptorId",
84
+ UniqueResourceId: "ST2067-2:2016:6.1/UniqueResourceId",
85
+ IntrinsicDuration: "ST2067-2:2016:6.10/IntrinsicDuration",
86
+ EntryPoint: "ST2067-2:2016:6.10/EntryPoint",
87
+ SourceDuration: "ST2067-2:2016:6.10/SourceDuration",
88
+ ResourceDuration: "ST2067-2:2016:6.10/ResourceDuration",
89
+ RepeatCount: "ST2067-2:2016:6.10/RepeatCount",
90
+ TrackFileId: "ST2067-2:2016:6.10/TrackFileId",
91
+ VirtualTrackContinuity: "ST2067-2:2016:6.9/VirtualTrackContinuity",
92
+ VirtualTrackEditRate: "ST2067-2:2016:6.9.3/VirtualTrackEditRate",
93
+ TimedTextSampleRate: "ST2067-2:2016:10/TimedText-SampleRate",
94
+ TimedTextEmptyLanguageTag: "ST2067-2:2016:10/TimedText-EmptyLanguageTag",
95
+ TimedTextMalformedLanguageTag: "ST2067-2:2016:10/TimedText-MalformedLanguageTag",
96
+ AudioSampleRate: "ST2067-2:2016:ST377-4/AudioSampleRate",
97
+ ChannelCount: "ST2067-2:2016:ST377-4/ChannelCount",
98
+ MCASubDescriptors: "ST2067-2:2016:ST377-4/MCASubDescriptors",
99
+ SoundfieldGroup: "ST2067-2:2016:ST377-4/SoundfieldGroup",
100
+ MCATagSymbol: "ST2067-2:2016:ST377-4/MCATagSymbol",
101
+ SoundfieldChannelCount: "ST2067-2:2016:ST377-4/SoundfieldChannelCount",
102
+ DigitalSignature: "ST2067-2:2016:8/DigitalSignature",
103
+ DanglingEssenceDescriptor: "ST2067-2:2016:6.4.2/DanglingEssenceDescriptor",
104
+ EssenceDescriptorList: "ST2067-2:2016:6.4.2/EssenceDescriptorList",
105
+ },
106
+ ST2067_2_2020_Core: {
107
+ ResourceListEmpty: "ST2067-2:2020:XSD/ResourceList-Empty",
108
+ ContentTitle: "ST2067-2:2020:XSD/ContentTitle",
109
+ TotalRunningTimeFormat: "ST2067-2:2020:XSD/TotalRunningTime-Format",
110
+ SegmentList: "ST2067-2:2020:XSD/SegmentList",
111
+ Segment: "ST2067-2:2020:XSD/Segment",
112
+ EditRate: "ST2067-2:2020:XSD-88/EditRate",
113
+ IssueDate: "ST2067-2:2020:XSD-66/IssueDate",
114
+ IssueDateFormat: "ST2067-2:2020:XSD-66/IssueDate-Format",
115
+ CompositionTimecodeDropFrame: "ST2067-2:2020:XSD-121-127/CompositionTimecode-DropFrame",
116
+ CompositionTimecodeRate: "ST2067-2:2020:XSD-121-127/CompositionTimecode-Rate",
117
+ CompositionTimecodeStartAddress: "ST2067-2:2020:XSD-121-127/CompositionTimecode-StartAddress",
118
+ CompositionTimecodeRateZero: "ST2067-2:2020:XSD-121-127/CompositionTimecode-Rate-Zero",
119
+ CompositionTimecodeStartAddressFormat: "ST2067-2:2020:XSD-121-127/CompositionTimecode-StartAddress-Format",
120
+ CompositionTimecodeRateMismatch: "ST2067-2:2020:XSD-121-127/CompositionTimecode-RateMismatch",
121
+ LocaleListNonEmpty: "ST2067-2:2020:XSD/LocaleList-NonEmpty",
122
+ UniqueSegmentId: "ST2067-2:2020:6.1/UniqueSegmentId",
123
+ UniqueEssenceDescriptorId: "ST2067-2:2020:6.1/UniqueEssenceDescriptorId",
124
+ UniqueResourceId: "ST2067-2:2020:6.1/UniqueResourceId",
125
+ IntrinsicDuration: "ST2067-2:2020:6.10/IntrinsicDuration",
126
+ EntryPoint: "ST2067-2:2020:6.10/EntryPoint",
127
+ SourceDuration: "ST2067-2:2020:6.10/SourceDuration",
128
+ ResourceDuration: "ST2067-2:2020:6.10/ResourceDuration",
129
+ RepeatCount: "ST2067-2:2020:6.10/RepeatCount",
130
+ TrackFileId: "ST2067-2:2020:6.10/TrackFileId",
131
+ VirtualTrackContinuity: "ST2067-2:2020:6.9/VirtualTrackContinuity",
132
+ VirtualTrackEditRate: "ST2067-2:2020:6.9.3/VirtualTrackEditRate",
133
+ TimedTextSampleRate: "ST2067-2:2020:10/TimedText-SampleRate",
134
+ TimedTextEmptyLanguageTag: "ST2067-2:2020:10/TimedText-EmptyLanguageTag",
135
+ TimedTextMalformedLanguageTag: "ST2067-2:2020:10/TimedText-MalformedLanguageTag",
136
+ AudioSampleRate: "ST2067-2:2020:ST377-4/AudioSampleRate",
137
+ ChannelCount: "ST2067-2:2020:ST377-4/ChannelCount",
138
+ MCASubDescriptors: "ST2067-2:2020:ST377-4/MCASubDescriptors",
139
+ SoundfieldGroup: "ST2067-2:2020:ST377-4/SoundfieldGroup",
140
+ MCATagSymbol: "ST2067-2:2020:ST377-4/MCATagSymbol",
141
+ SoundfieldChannelCount: "ST2067-2:2020:ST377-4/SoundfieldChannelCount",
142
+ DigitalSignature: "ST2067-2:2020:8/DigitalSignature",
143
+ DanglingEssenceDescriptor: "ST2067-2:2020:6.4.2/DanglingEssenceDescriptor",
144
+ EssenceDescriptorList: "ST2067-2:2020:6.4.2/EssenceDescriptorList",
145
+ },
146
+ ST2067_3_2013: {
147
+ ContentKindUnknown: "ST2067-3:2013:5.5.1.2/ContentKindUnknown",
148
+ SourceEncodingNoEssenceDescriptorList: "ST2067-3:2013:6.4.2/SourceEncodingNoEssenceDescriptorList",
149
+ SourceEncodingUnresolved: "ST2067-3:2013:6.4.2/SourceEncodingUnresolved",
150
+ EssenceDescriptorListEmpty: "ST2067-3:2013:6.4.2/EssenceDescriptorListEmpty",
151
+ ContentVersionListEmpty: "ST2067-3:2013:6.11/ContentVersionListEmpty",
152
+ ContentVersionIdInvalid: "ST2067-3:2013:6.11/ContentVersionIdInvalid",
153
+ ContentVersionLabelTextMissing: "ST2067-3:2013:6.11/ContentVersionLabelTextMissing",
154
+ LocaleLanguageTagInvalid: "ST2067-3:2013:6.12/LocaleLanguageTagInvalid",
155
+ TrackIdNotUnique: "ST2067-3:2013:7.3/TrackIdNotUnique",
156
+ MarkerOffsetOutOfRange: "ST2067-3:2013:7.4/MarkerOffsetOutOfRange",
157
+ MarkerLabelUnknown: "ST2067-3:2013:7.4/MarkerLabelUnknown",
158
+ SegmentDuration: "ST2067-3:2013:7.2.2/SegmentDuration",
159
+ ContentVersionIdDuplicate: "ST2067-3:2013:6.1.9/ContentVersionIdDuplicate",
160
+ SegmentDurationIntegerEditUnits: "ST2067-3:2013:7.3/SegmentDurationIntegerEditUnits",
161
+ },
162
+ ST2067_3_2016: {
163
+ ContentKindUnknown: "ST2067-3:2016:5.5.1.2/ContentKindUnknown",
164
+ SourceEncodingNoEssenceDescriptorList: "ST2067-3:2016:6.4.2/SourceEncodingNoEssenceDescriptorList",
165
+ SourceEncodingUnresolved: "ST2067-3:2016:6.4.2/SourceEncodingUnresolved",
166
+ EssenceDescriptorListEmpty: "ST2067-3:2016:6.4.2/EssenceDescriptorListEmpty",
167
+ ContentVersionListEmpty: "ST2067-3:2016:6.11/ContentVersionListEmpty",
168
+ ContentVersionIdInvalid: "ST2067-3:2016:6.11/ContentVersionIdInvalid",
169
+ ContentVersionLabelTextMissing: "ST2067-3:2016:6.11/ContentVersionLabelTextMissing",
170
+ LocaleLanguageTagInvalid: "ST2067-3:2016:6.12/LocaleLanguageTagInvalid",
171
+ TrackIdNotUnique: "ST2067-3:2016:7.3/TrackIdNotUnique",
172
+ MarkerOffsetOutOfRange: "ST2067-3:2016:7.4/MarkerOffsetOutOfRange",
173
+ MarkerLabelUnknown: "ST2067-3:2016:7.4/MarkerLabelUnknown",
174
+ SegmentDuration: "ST2067-3:2016:7.2.2/SegmentDuration",
175
+ ContentVersionIdDuplicate: "ST2067-3:2016:6.1.9/ContentVersionIdDuplicate",
176
+ SegmentDurationIntegerEditUnits: "ST2067-3:2016:7.3/SegmentDurationIntegerEditUnits",
177
+ },
178
+ ST2067_3_2020: {
179
+ ContentKindUnknown: "ST2067-3:2020:5.5.1.2/ContentKindUnknown",
180
+ SourceEncodingNoEssenceDescriptorList: "ST2067-3:2020:6.4.2/SourceEncodingNoEssenceDescriptorList",
181
+ SourceEncodingUnresolved: "ST2067-3:2020:6.4.2/SourceEncodingUnresolved",
182
+ EssenceDescriptorListEmpty: "ST2067-3:2020:6.4.2/EssenceDescriptorListEmpty",
183
+ ContentVersionListEmpty: "ST2067-3:2020:6.11/ContentVersionListEmpty",
184
+ ContentVersionIdInvalid: "ST2067-3:2020:6.11/ContentVersionIdInvalid",
185
+ ContentVersionLabelTextMissing: "ST2067-3:2020:6.11/ContentVersionLabelTextMissing",
186
+ LocaleLanguageTagInvalid: "ST2067-3:2020:6.12/LocaleLanguageTagInvalid",
187
+ TrackIdNotUnique: "ST2067-3:2020:7.3/TrackIdNotUnique",
188
+ MarkerOffsetOutOfRange: "ST2067-3:2020:7.4/MarkerOffsetOutOfRange",
189
+ MarkerLabelUnknown: "ST2067-3:2020:7.4/MarkerLabelUnknown",
190
+ SegmentDuration: "ST2067-3:2020:7.2.2/SegmentDuration",
191
+ ContentVersionIdDuplicate: "ST2067-3:2020:6.1.9/ContentVersionIdDuplicate",
192
+ SegmentDurationIntegerEditUnits: "ST2067-3:2020:7.3/SegmentDurationIntegerEditUnits",
193
+ },
194
+ ST2067_9_2018: {
195
+ MalformedXml: "ST2067-9:2018:6.1/MalformedXml",
196
+ SidecarAssetReferencedByVirtualTrack: "ST2067-9:2018:5/SidecarAssetReferencedByVirtualTrack",
197
+ DuplicateAssetId: "ST2067-9:2018:7.2.3/DuplicateAssetId",
198
+ SignerWithoutSignature: "ST2067-9:2018:7.2.4/SignerWithoutSignature",
199
+ SignatureWithoutSigner: "ST2067-9:2018:7.2.5/SignatureWithoutSigner",
200
+ SidecarAssetNotFound: "ST2067-9:2018:7.3.1/SidecarAssetNotFound",
201
+ CplNotFound: "ST2067-9:2018:7.3.1.1/CplNotFound",
202
+ DuplicateCplId: "ST2067-9:2018:7.3.1.1/DuplicateCplId",
203
+ },
204
+ ST2067_21_2020: {
205
+ AppIdMismatch: "ST2067-21:2020:7.1/AppIdMismatch",
206
+ },
207
+ ST2067_21_2023: {
208
+ FrameRate: "ST2067-21:2023:5.2/FrameRate",
209
+ Resolution: "ST2067-21:2023:5.2/Resolution",
210
+ EmptyLanguageTag: "ST2067-21:2023:5.3/EmptyLanguageTag",
211
+ MalformedLanguageTag: "ST2067-21:2023:5.3/MalformedLanguageTag",
212
+ RegionCode: "ST2067-21:2023:5.3/RegionCode",
213
+ ColorSystem: "ST2067-21:2023:6.2/ColorSystem",
214
+ RequiredStoredWidth: "ST2067-21:2023:6.2/Required-StoredWidth",
215
+ RequiredStoredHeight: "ST2067-21:2023:6.2/Required-StoredHeight",
216
+ RequiredSampleRate: "ST2067-21:2023:6.2/Required-SampleRate",
217
+ RequiredFrameLayout: "ST2067-21:2023:6.2/Required-FrameLayout",
218
+ RequiredColorPrimaries: "ST2067-21:2023:6.2/Required-ColorPrimaries",
219
+ RequiredTransferCharacteristic: "ST2067-21:2023:6.2/Required-TransferCharacteristic",
220
+ RequiredPictureCompression: "ST2067-21:2023:6.2/Required-PictureCompression",
221
+ RequiredComponentDepth: "ST2067-21:2023:6.2/Required-ComponentDepth",
222
+ RequiredChannelCount: "ST2067-21:2023:6.5/Required-ChannelCount",
223
+ RequiredQuantizationBits: "ST2067-21:2023:6.5/Required-QuantizationBits",
224
+ AlphaTransparency: "ST2067-21:2023:6.2.1/AlphaTransparency",
225
+ "6.2.1CodingEquations": "ST2067-21:2023:6.2.1/CodingEquations",
226
+ "6.2.1ColorPrimaries": "ST2067-21:2023:6.2.1/ColorPrimaries",
227
+ FieldDominance: "ST2067-21:2023:6.2.1/FieldDominance",
228
+ FrameLayout: "ST2067-21:2023:6.2.1/FrameLayout",
229
+ FrameLayoutInterlaced: "ST2067-21:2023:6.2.1/FrameLayoutInterlaced",
230
+ ImageAlignmentOffset: "ST2067-21:2023:6.2.1/ImageAlignmentOffset",
231
+ ImageEndOffset: "ST2067-21:2023:6.2.1/ImageEndOffset",
232
+ ImageStartOffset: "ST2067-21:2023:6.2.1/ImageStartOffset",
233
+ SampledHeight: "ST2067-21:2023:6.2.1/SampledHeight",
234
+ SampledWidth: "ST2067-21:2023:6.2.1/SampledWidth",
235
+ SampledXOffset: "ST2067-21:2023:6.2.1/SampledXOffset",
236
+ SampledYOffset: "ST2067-21:2023:6.2.1/SampledYOffset",
237
+ StoredF2Offset: "ST2067-21:2023:6.2.1/StoredF2Offset",
238
+ "6.2.1TransferCharacteristic": "ST2067-21:2023:6.2.1/TransferCharacteristic",
239
+ "6.2.2TransferCharacteristic": "ST2067-21:2023:6.2.2/TransferCharacteristic",
240
+ "6.2.3CodingEquations": "ST2067-21:2023:6.2.3/CodingEquations",
241
+ "6.2.4ColorPrimaries": "ST2067-21:2023:6.2.4/ColorPrimaries",
242
+ J2KRequired: "ST2067-21:2023:6.2.5/J2KRequired",
243
+ AlphaMaxRef: "ST2067-21:2023:6.3/AlphaMaxRef",
244
+ AlphaMinRef: "ST2067-21:2023:6.3/AlphaMinRef",
245
+ ComponentMaxRef: "ST2067-21:2023:6.3/ComponentMaxRef",
246
+ ComponentMinRef: "ST2067-21:2023:6.3/ComponentMinRef",
247
+ Palette: "ST2067-21:2023:6.3/Palette",
248
+ PaletteLayout: "ST2067-21:2023:6.3/PaletteLayout",
249
+ ScanningDirection: "ST2067-21:2023:6.3/ScanningDirection",
250
+ ComponentRefValues: "ST2067-21:2023:6.3.2/ComponentRefValues",
251
+ AlphaSampleDepth: "ST2067-21:2023:6.4/AlphaSampleDepth",
252
+ ColorSiting: "ST2067-21:2023:6.4/ColorSiting",
253
+ ComponentDepth: "ST2067-21:2023:6.4/ComponentDepth",
254
+ HorizontalSubsampling: "ST2067-21:2023:6.4/HorizontalSubsampling",
255
+ PaddingBits: "ST2067-21:2023:6.4/PaddingBits",
256
+ ReversedByteOrder: "ST2067-21:2023:6.4/ReversedByteOrder",
257
+ VerticalSubsampling: "ST2067-21:2023:6.4/VerticalSubsampling",
258
+ BlackRefLevel: "ST2067-21:2023:6.4.3/BlackRefLevel",
259
+ ColorRange: "ST2067-21:2023:6.4.3/ColorRange",
260
+ WhiteRefLevel: "ST2067-21:2023:6.4.3/WhiteRefLevel",
261
+ AudioSampleRate: "ST2067-21:2023:6.5/AudioSampleRate",
262
+ QuantizationBits: "ST2067-21:2023:6.5/QuantizationBits",
263
+ CodingStyle: "ST2067-21:2023:6.5.2/CodingStyle",
264
+ J2CLayout: "ST2067-21:2023:6.5.2/J2CLayout",
265
+ J2KExtendedCapabilities: "ST2067-21:2023:6.5.2/J2KExtendedCapabilities",
266
+ JPEG2000SubDescriptor: "ST2067-21:2023:6.5.2/JPEG2000SubDescriptor",
267
+ J2KHTNotAllowed: "ST2067-21:2023:6.2.5/J2K-HT-Not-Allowed",
268
+ J2K4KResolution: "ST2067-21:2023:6.2.5/J2K-4K-Resolution",
269
+ J2K2KResolution: "ST2067-21:2023:6.2.5/J2K-2K-Resolution",
270
+ J2KBCPResolution: "ST2067-21:2023:6.2.5/J2K-BCP-Resolution",
271
+ ApplicationIdentification: "ST2067-21:2023:7.1/ApplicationIdentification",
272
+ ContentMaturityRatingAgency: "ST2067-21:2023:7.1/ContentMaturityRating-Agency",
273
+ ContentMaturityRatingAgencyURI: "ST2067-21:2023:7.1/ContentMaturityRating-Agency-URI",
274
+ HomogeneousImageEssence: "ST2067-21:2023:7.2/HomogeneousImageEssence",
275
+ AppIdMismatch: "ST2067-21:2023:7.1/AppIdMismatch",
276
+ SegmentDurationMultiple: "ST2067-21:2023:7.4/SegmentDurationMultiple",
277
+ MaxCLLMaxFALL: "ST2067-21:2023:7.5/MaxCLLMaxFALL",
278
+ },
279
+ ST2067_21_2025: {
280
+ FNTimedText: "ST2067-21:2025:5.6/FNTimedText",
281
+ HICTimedText: "ST2067-21:2025:5.6/HICTimedText",
282
+ },
283
+ ST2067_201_2019: {
284
+ CodecForbidden: "ST2067-201:2019:5.9/CodecForbidden",
285
+ ElectrospatialFormulationForbidden: "ST2067-201:2019:5.9/ElectrospatialFormulationForbidden",
286
+ QuantizationBitsMissing: "ST2067-201:2019:5.9/QuantizationBitsMissing",
287
+ QuantizationBitsInvalid: "ST2067-201:2019:5.9/QuantizationBitsInvalid",
288
+ ContainerFormatMissing: "ST2067-201:2019:5.3/ContainerFormatMissing",
289
+ EssenceContainerInvalid: "ST2067-201:2019:5.3/EssenceContainerInvalid",
290
+ AudioSamplingRateMissing: "ST2067-201:2019:5.9/AudioSamplingRateMissing",
291
+ AudioSamplingRateInvalid: "ST2067-201:2019:5.9/AudioSamplingRateInvalid",
292
+ SoundCompressionMissing: "ST2067-201:2019:5.9/SoundCompressionMissing",
293
+ SoundCompressionInvalid: "ST2067-201:2019:5.9/SoundCompressionInvalid",
294
+ ChannelCountNotZero: "ST2067-201:2019:5.9/ChannelCountNotZero",
295
+ SubDescriptorMissing: "ST2067-201:2019:5.9/SubDescriptorMissing",
296
+ MCATagSymbolMissing: "ST2067-201:2019:5.9/MCATagSymbolMissing",
297
+ MCATagSymbolInvalid: "ST2067-201:2019:5.9/MCATagSymbolInvalid",
298
+ MCATagNameMissing: "ST2067-201:2019:5.9/MCATagNameMissing",
299
+ MCATagNameInvalid: "ST2067-201:2019:5.9/MCATagNameInvalid",
300
+ MCALabelDictionaryIDMissing: "ST2067-201:2019:5.9/MCALabelDictionaryIDMissing",
301
+ MCALabelDictionaryIDInvalid: "ST2067-201:2019:5.9/MCALabelDictionaryIDInvalid",
302
+ MainAudioMissing: "ST2067-201:2019:6.2/MainAudioMissing",
303
+ IABSequenceNoResources: "ST2067-201:2019:6.2/IABSequenceNoResources",
304
+ IABSequenceSourceEncodingInvalid: "ST2067-201:2019:6.2/IABSequenceSourceEncodingInvalid",
305
+ },
306
+ ST2067_201_2021: {
307
+ CodecForbidden: "ST2067-201:2021:5.9/CodecForbidden",
308
+ ElectrospatialFormulationForbidden: "ST2067-201:2021:5.9/ElectrospatialFormulationForbidden",
309
+ QuantizationBitsMissing: "ST2067-201:2021:5.9/QuantizationBitsMissing",
310
+ QuantizationBitsInvalid: "ST2067-201:2021:5.9/QuantizationBitsInvalid",
311
+ ContainerFormatMissing: "ST2067-201:2021:5.3/ContainerFormatMissing",
312
+ EssenceContainerInvalid: "ST2067-201:2021:5.3/EssenceContainerInvalid",
313
+ AudioSamplingRateMissing: "ST2067-201:2021:5.9/AudioSamplingRateMissing",
314
+ AudioSamplingRateInvalid: "ST2067-201:2021:5.9/AudioSamplingRateInvalid",
315
+ SoundCompressionMissing: "ST2067-201:2021:5.9/SoundCompressionMissing",
316
+ SoundCompressionInvalid: "ST2067-201:2021:5.9/SoundCompressionInvalid",
317
+ ChannelCountNotZero: "ST2067-201:2021:5.9/ChannelCountNotZero",
318
+ SubDescriptorMissing: "ST2067-201:2021:5.9/SubDescriptorMissing",
319
+ MCATagSymbolMissing: "ST2067-201:2021:5.9/MCATagSymbolMissing",
320
+ MCATagSymbolInvalid: "ST2067-201:2021:5.9/MCATagSymbolInvalid",
321
+ MCATagNameMissing: "ST2067-201:2021:5.9/MCATagNameMissing",
322
+ MCATagNameInvalid: "ST2067-201:2021:5.9/MCATagNameInvalid",
323
+ MCALabelDictionaryIDMissing: "ST2067-201:2021:5.9/MCALabelDictionaryIDMissing",
324
+ MCALabelDictionaryIDInvalid: "ST2067-201:2021:5.9/MCALabelDictionaryIDInvalid",
325
+ MainAudioMissing: "ST2067-201:2021:6.2/MainAudioMissing",
326
+ IABSequenceNoResources: "ST2067-201:2021:6.2/IABSequenceNoResources",
327
+ IABSequenceSourceEncodingInvalid: "ST2067-201:2021:6.2/IABSequenceSourceEncodingInvalid",
328
+ },
329
+ ST2067_202_2022: {
330
+ SubDescriptorMissing: "ST2067-202:2022:5/SubDescriptorMissing",
331
+ NamespaceUriMissing: "ST2067-202:2022:5/NamespaceUriMissing",
332
+ ISXDSequenceNoResources: "ST2067-202:2022:6/ISXDSequenceNoResources",
333
+ ISXDSequenceSourceEncodingInvalid: "ST2067-202:2022:6/ISXDSequenceSourceEncodingInvalid",
334
+ NamespaceUriMismatch: "ST2067-202:2022:6/NamespaceUriMismatch",
335
+ },
336
+ Imferno: {
337
+ UnreferencedAsset: "IMFERNO:Package/UnreferencedAsset",
338
+ UnlistedEssence: "IMFERNO:Package/UnlistedEssence",
339
+ }
340
+ };
package/imferno_wasm.d.ts CHANGED
@@ -472,70 +472,54 @@ export type VideoCodec = "Jpeg2000" | "Jpeg2000Imf2k" | "Jpeg2000Imf4k" | "Jpeg2
472
472
 
473
473
 
474
474
  /**
475
- * Get library version
476
- */
477
- export function getVersion(): string;
478
-
479
- /**
480
- * Initialize the WASM module
481
- */
482
- export function init(): void;
483
-
484
- /**
485
- * Parse ASSETMAP.xml and return a typed AssetMap object
486
- */
487
- export function parseAssetmapTyped(xmlContent: string): any;
488
-
489
- /**
490
- * Parse CPL XML and return a typed CompositionPlaylist object
475
+ * Build a structured report from an IMF package.
476
+ *
477
+ * Pass all XML files as a plain JS object where each key is the filename
478
+ * and each value is the file's text content.
479
+ *
480
+ * Returns an `ImfReport` containing package metadata, CPL analysis, and
481
+ * validation results. This is the same JSON that the CLI `export` command produces.
482
+ *
483
+ * Options (all optional):
484
+ * - `coreSpec`: `"auto"` | `"v2013"` | `"v2016"` | `"v2020"`
485
+ * - `app2eSpec`: `"auto"` | `"none"` | `"v2020"` | `"v2021"` | `"v2023"`
486
+ * - `rules`: ESLint-style rules configuration object
491
487
  */
492
- export function parseCplTyped(xmlContent: string): CompositionPlaylist;
488
+ export function buildReport(files: any, options: any): any;
493
489
 
494
490
  /**
495
- * Parse PKL XML and return a typed PackingList object
491
+ * Format a previously built `ImfReport` as a human-readable string.
492
+ *
493
+ * Pass the object returned by `buildReport()` (or any valid `ImfReport` JSON).
494
+ * Returns the same output as `imferno report` on the CLI.
496
495
  */
497
- export function parsePklTyped(xmlContent: string): any;
496
+ export function formatReport(report: any): string;
498
497
 
499
498
  /**
500
- * Parse VOLINDEX.xml and return a typed VolumeIndex object
499
+ * Get library version
501
500
  */
502
- export function parseVolindexTyped(xmlContent: string): VolumeIndex;
501
+ export function getVersion(): string;
503
502
 
504
503
  /**
505
- * Validate a full IMF package and return both the validation report and parsed data.
506
- *
507
- * Pass all XML files from the package as a plain JS object where each key is
508
- * the filename and each value is the file's text content. ASSETMAP.xml is
509
- * required; VOLINDEX.xml, PKL files, and CPL files are resolved automatically
510
- * from the AssetMap.
511
- *
512
- * Options (all optional):
513
- * - `coreSpec`: `"auto"` | `"v2013"` | `"v2016"` | `"v2020"` — core constraints version
514
- * - `app2eSpec`: `"auto"` | `"none"` | `"v2020"` | `"v2021"` | `"v2023"` — app profile version
515
- * - `rules`: ESLint-style rules configuration object
516
- *
517
- * Returns `{ report, cpls, assetMap, packingLists, volumeIndex, unreferencedAssets, declaredSidecars }`
504
+ * Initialize the WASM module
518
505
  */
519
- export function validate(files: any, options: any): any;
506
+ export function init(): void;
520
507
 
521
508
  export type InitInput = RequestInfo | URL | Response | BufferSource | WebAssembly.Module;
522
509
 
523
510
  export interface InitOutput {
524
511
  readonly memory: WebAssembly.Memory;
512
+ readonly buildReport: (a: any, b: any) => [number, number, number];
513
+ readonly formatReport: (a: any) => [number, number, number, number];
525
514
  readonly getVersion: () => [number, number];
526
515
  readonly init: () => void;
527
- readonly parseAssetmapTyped: (a: number, b: number) => [number, number, number];
528
- readonly parseCplTyped: (a: number, b: number) => [number, number, number];
529
- readonly parsePklTyped: (a: number, b: number) => [number, number, number];
530
- readonly parseVolindexTyped: (a: number, b: number) => [number, number, number];
531
- readonly validate: (a: any, b: any) => [number, number, number];
532
516
  readonly __wbindgen_malloc: (a: number, b: number) => number;
533
517
  readonly __wbindgen_realloc: (a: number, b: number, c: number, d: number) => number;
534
518
  readonly __wbindgen_exn_store: (a: number) => void;
535
519
  readonly __externref_table_alloc: () => number;
536
520
  readonly __wbindgen_externrefs: WebAssembly.Table;
537
- readonly __wbindgen_free: (a: number, b: number, c: number) => void;
538
521
  readonly __externref_table_dealloc: (a: number) => void;
522
+ readonly __wbindgen_free: (a: number, b: number, c: number) => void;
539
523
  readonly __wbindgen_start: () => void;
540
524
  }
541
525
 
package/imferno_wasm.js CHANGED
@@ -1,5 +1,57 @@
1
1
  /* @ts-self-types="./imferno_wasm.d.ts" */
2
2
 
3
+ /**
4
+ * Build a structured report from an IMF package.
5
+ *
6
+ * Pass all XML files as a plain JS object where each key is the filename
7
+ * and each value is the file's text content.
8
+ *
9
+ * Returns an `ImfReport` containing package metadata, CPL analysis, and
10
+ * validation results. This is the same JSON that the CLI `export` command produces.
11
+ *
12
+ * Options (all optional):
13
+ * - `coreSpec`: `"auto"` | `"v2013"` | `"v2016"` | `"v2020"`
14
+ * - `app2eSpec`: `"auto"` | `"none"` | `"v2020"` | `"v2021"` | `"v2023"`
15
+ * - `rules`: ESLint-style rules configuration object
16
+ * @param {any} files
17
+ * @param {any} options
18
+ * @returns {any}
19
+ */
20
+ export function buildReport(files, options) {
21
+ const ret = wasm.buildReport(files, options);
22
+ if (ret[2]) {
23
+ throw takeFromExternrefTable0(ret[1]);
24
+ }
25
+ return takeFromExternrefTable0(ret[0]);
26
+ }
27
+
28
+ /**
29
+ * Format a previously built `ImfReport` as a human-readable string.
30
+ *
31
+ * Pass the object returned by `buildReport()` (or any valid `ImfReport` JSON).
32
+ * Returns the same output as `imferno report` on the CLI.
33
+ * @param {any} report
34
+ * @returns {string}
35
+ */
36
+ export function formatReport(report) {
37
+ let deferred2_0;
38
+ let deferred2_1;
39
+ try {
40
+ const ret = wasm.formatReport(report);
41
+ var ptr1 = ret[0];
42
+ var len1 = ret[1];
43
+ if (ret[3]) {
44
+ ptr1 = 0; len1 = 0;
45
+ throw takeFromExternrefTable0(ret[2]);
46
+ }
47
+ deferred2_0 = ptr1;
48
+ deferred2_1 = len1;
49
+ return getStringFromWasm0(ptr1, len1);
50
+ } finally {
51
+ wasm.__wbindgen_free(deferred2_0, deferred2_1, 1);
52
+ }
53
+ }
54
+
3
55
  /**
4
56
  * Get library version
5
57
  * @returns {string}
@@ -24,92 +76,6 @@ export function init() {
24
76
  wasm.init();
25
77
  }
26
78
 
27
- /**
28
- * Parse ASSETMAP.xml and return a typed AssetMap object
29
- * @param {string} xmlContent
30
- * @returns {any}
31
- */
32
- export function parseAssetmapTyped(xmlContent) {
33
- const ptr0 = passStringToWasm0(xmlContent, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
34
- const len0 = WASM_VECTOR_LEN;
35
- const ret = wasm.parseAssetmapTyped(ptr0, len0);
36
- if (ret[2]) {
37
- throw takeFromExternrefTable0(ret[1]);
38
- }
39
- return takeFromExternrefTable0(ret[0]);
40
- }
41
-
42
- /**
43
- * Parse CPL XML and return a typed CompositionPlaylist object
44
- * @param {string} xmlContent
45
- * @returns {CompositionPlaylist}
46
- */
47
- export function parseCplTyped(xmlContent) {
48
- const ptr0 = passStringToWasm0(xmlContent, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
49
- const len0 = WASM_VECTOR_LEN;
50
- const ret = wasm.parseCplTyped(ptr0, len0);
51
- if (ret[2]) {
52
- throw takeFromExternrefTable0(ret[1]);
53
- }
54
- return takeFromExternrefTable0(ret[0]);
55
- }
56
-
57
- /**
58
- * Parse PKL XML and return a typed PackingList object
59
- * @param {string} xmlContent
60
- * @returns {any}
61
- */
62
- export function parsePklTyped(xmlContent) {
63
- const ptr0 = passStringToWasm0(xmlContent, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
64
- const len0 = WASM_VECTOR_LEN;
65
- const ret = wasm.parsePklTyped(ptr0, len0);
66
- if (ret[2]) {
67
- throw takeFromExternrefTable0(ret[1]);
68
- }
69
- return takeFromExternrefTable0(ret[0]);
70
- }
71
-
72
- /**
73
- * Parse VOLINDEX.xml and return a typed VolumeIndex object
74
- * @param {string} xmlContent
75
- * @returns {VolumeIndex}
76
- */
77
- export function parseVolindexTyped(xmlContent) {
78
- const ptr0 = passStringToWasm0(xmlContent, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
79
- const len0 = WASM_VECTOR_LEN;
80
- const ret = wasm.parseVolindexTyped(ptr0, len0);
81
- if (ret[2]) {
82
- throw takeFromExternrefTable0(ret[1]);
83
- }
84
- return takeFromExternrefTable0(ret[0]);
85
- }
86
-
87
- /**
88
- * Validate a full IMF package and return both the validation report and parsed data.
89
- *
90
- * Pass all XML files from the package as a plain JS object where each key is
91
- * the filename and each value is the file's text content. ASSETMAP.xml is
92
- * required; VOLINDEX.xml, PKL files, and CPL files are resolved automatically
93
- * from the AssetMap.
94
- *
95
- * Options (all optional):
96
- * - `coreSpec`: `"auto"` | `"v2013"` | `"v2016"` | `"v2020"` — core constraints version
97
- * - `app2eSpec`: `"auto"` | `"none"` | `"v2020"` | `"v2021"` | `"v2023"` — app profile version
98
- * - `rules`: ESLint-style rules configuration object
99
- *
100
- * Returns `{ report, cpls, assetMap, packingLists, volumeIndex, unreferencedAssets, declaredSidecars }`
101
- * @param {any} files
102
- * @param {any} options
103
- * @returns {any}
104
- */
105
- export function validate(files, options) {
106
- const ret = wasm.validate(files, options);
107
- if (ret[2]) {
108
- throw takeFromExternrefTable0(ret[1]);
109
- }
110
- return takeFromExternrefTable0(ret[0]);
111
- }
112
-
113
79
  function __wbg_get_imports() {
114
80
  const import0 = {
115
81
  __proto__: null,
@@ -117,6 +83,10 @@ function __wbg_get_imports() {
117
83
  const ret = Error(getStringFromWasm0(arg0, arg1));
118
84
  return ret;
119
85
  },
86
+ __wbg_Number_a5a435bd7bbec835: function(arg0) {
87
+ const ret = Number(arg0);
88
+ return ret;
89
+ },
120
90
  __wbg_String_8564e559799eccda: function(arg0, arg1) {
121
91
  const ret = String(arg1);
122
92
  const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
@@ -224,6 +194,10 @@ function __wbg_get_imports() {
224
194
  const ret = arg0[arg1 >>> 0];
225
195
  return ret;
226
196
  },
197
+ __wbg_get_with_ref_key_6412cf3094599694: function(arg0, arg1) {
198
+ const ret = arg0[arg1];
199
+ return ret;
200
+ },
227
201
  __wbg_instanceof_ArrayBuffer_101e2bf31071a9f6: function(arg0) {
228
202
  let result;
229
203
  try {
@@ -274,7 +248,7 @@ function __wbg_get_imports() {
274
248
  const ret = arg0.length;
275
249
  return ret;
276
250
  },
277
- __wbg_log_f9966a5536153c86: function(arg0, arg1) {
251
+ __wbg_log_3a9854467c45b73c: function(arg0, arg1) {
278
252
  console.log(getStringFromWasm0(arg0, arg1));
279
253
  },
280
254
  __wbg_new_0_1dcafdf5e786e876: function() {
@@ -305,18 +279,6 @@ function __wbg_get_imports() {
305
279
  const ret = arg0.next;
306
280
  return ret;
307
281
  },
308
- __wbg_parse_d8e59ac01c35b18b: function(arg0, arg1) {
309
- let deferred0_0;
310
- let deferred0_1;
311
- try {
312
- deferred0_0 = arg0;
313
- deferred0_1 = arg1;
314
- const ret = JSON.parse(getStringFromWasm0(arg0, arg1));
315
- return ret;
316
- } finally {
317
- wasm.__wbindgen_free(deferred0_0, deferred0_1, 1);
318
- }
319
- },
320
282
  __wbg_prototypesetcall_d62e5099504357e6: function(arg0, arg1, arg2) {
321
283
  Uint8Array.prototype.set.call(getArrayU8FromWasm0(arg0, arg1), arg2);
322
284
  },
Binary file
@@ -1,18 +1,15 @@
1
1
  /* tslint:disable */
2
2
  /* eslint-disable */
3
3
  export const memory: WebAssembly.Memory;
4
+ export const buildReport: (a: any, b: any) => [number, number, number];
5
+ export const formatReport: (a: any) => [number, number, number, number];
4
6
  export const getVersion: () => [number, number];
5
7
  export const init: () => void;
6
- export const parseAssetmapTyped: (a: number, b: number) => [number, number, number];
7
- export const parseCplTyped: (a: number, b: number) => [number, number, number];
8
- export const parsePklTyped: (a: number, b: number) => [number, number, number];
9
- export const parseVolindexTyped: (a: number, b: number) => [number, number, number];
10
- export const validate: (a: any, b: any) => [number, number, number];
11
8
  export const __wbindgen_malloc: (a: number, b: number) => number;
12
9
  export const __wbindgen_realloc: (a: number, b: number, c: number, d: number) => number;
13
10
  export const __wbindgen_exn_store: (a: number) => void;
14
11
  export const __externref_table_alloc: () => number;
15
12
  export const __wbindgen_externrefs: WebAssembly.Table;
16
- export const __wbindgen_free: (a: number, b: number, c: number) => void;
17
13
  export const __externref_table_dealloc: (a: number) => void;
14
+ export const __wbindgen_free: (a: number, b: number, c: number) => void;
18
15
  export const __wbindgen_start: () => void;
package/index.d.ts CHANGED
@@ -61,5 +61,8 @@ export function getVersion(): Promise<string>;
61
61
  /** Manual WASM initialization (for advanced use) */
62
62
  export function init(wasmBuffer?: ArrayBuffer): Promise<void>;
63
63
 
64
+ /** Typed validation code constants for use in rules config */
65
+ export { codes } from './codes.js';
66
+
64
67
  /** Raw WASM bindings (for advanced use) */
65
68
  export declare const wasm: typeof import('./imferno_wasm.js');
package/index.js CHANGED
@@ -30,31 +30,16 @@ function ensureInit() {
30
30
  return initPromise;
31
31
  }
32
32
 
33
- // Parsing
34
- export async function parseAssetmapTyped(xmlContent) {
33
+ // Build a structured report from an IMF package
34
+ export async function buildReport(files, options) {
35
35
  await ensureInit();
36
- return wasm.parseAssetmapTyped(xmlContent);
36
+ return wasm.buildReport(files, options);
37
37
  }
38
38
 
39
- export async function parseCplTyped(xmlContent) {
39
+ // Format an ImfReport as a human-readable string
40
+ export async function formatReport(report) {
40
41
  await ensureInit();
41
- return wasm.parseCplTyped(xmlContent);
42
- }
43
-
44
- export async function parsePklTyped(xmlContent) {
45
- await ensureInit();
46
- return wasm.parsePklTyped(xmlContent);
47
- }
48
-
49
- export async function parseVolindexTyped(xmlContent) {
50
- await ensureInit();
51
- return wasm.parseVolindexTyped(xmlContent);
52
- }
53
-
54
- // Validation — the unified function
55
- export async function validate(files, options) {
56
- await ensureInit();
57
- return wasm.validate(files, options);
42
+ return wasm.formatReport(report);
58
43
  }
59
44
 
60
45
  // Utility
@@ -63,6 +48,9 @@ export async function getVersion() {
63
48
  return wasm.getVersion();
64
49
  }
65
50
 
51
+ // Typed validation codes
52
+ export { codes } from './codes.js';
53
+
66
54
  // For users who want manual control
67
55
  export { wasmInit as init };
68
56
  export { wasm };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@imferno/wasm",
3
- "version": "1.1.0",
3
+ "version": "2.0.0",
4
4
  "description": "Fast, type-safe SMPTE ST 2067 IMF parser for JavaScript and TypeScript",
5
5
  "main": "index.js",
6
6
  "types": "index.d.ts",
@@ -10,6 +10,8 @@
10
10
  "imferno_wasm.d.ts",
11
11
  "imferno_wasm_bg.wasm",
12
12
  "imferno_wasm_bg.wasm.d.ts",
13
+ "codes.js",
14
+ "codes.d.ts",
13
15
  "index.js",
14
16
  "index.d.ts",
15
17
  "README.md",