@imferno/node 3.0.2-beta.f424a0b → 3.0.2-beta.f5a3d3f
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 +50 -20
- package/codes.d.ts +200 -64
- package/codes.js +200 -64
- package/index.d.ts +122 -54
- package/package.json +27 -8
- package/types.d.ts +1341 -0
package/codes.js
CHANGED
|
@@ -3,12 +3,22 @@ const codes = {
|
|
|
3
3
|
ST429_9_2014: {
|
|
4
4
|
VolindexMissing: "ST429-9:2014:7/VolindexMissing",
|
|
5
5
|
MalformedXml: "ST429-9:2014:7/MalformedXml",
|
|
6
|
+
PathNotRelative: "ST429-9:2014:A.2/PathNotRelative",
|
|
7
|
+
PathCharacters: "ST429-9:2014:A.2/PathCharacters",
|
|
8
|
+
PathTooLong: "ST429-9:2014:A.2/PathTooLong",
|
|
9
|
+
PathTooManySegments: "ST429-9:2014:A.2/PathTooManySegments",
|
|
10
|
+
PathDuplicate: "ST429-9:2014:A.2/PathDuplicate",
|
|
11
|
+
AssetMapFileName: "ST429-9:2014:A.4/AssetMapFileName",
|
|
6
12
|
},
|
|
7
13
|
ST377_1_2011: {
|
|
8
14
|
NotMxf: "ST377-1:2011:5/NotMxf",
|
|
9
15
|
ParseError: "ST377-1:2011:5/ParseError",
|
|
10
16
|
NoEssenceContainers: "ST377-1:2011:11/NoEssenceContainers",
|
|
11
17
|
OP1a: "ST377-1:2011:7/OP1a",
|
|
18
|
+
NonHeaderFirstPartition: "ST377-1:2011:6.4/NonHeaderFirstPartition",
|
|
19
|
+
HeaderPartitionOpen: "ST377-1:2011:8.3.3/HeaderPartitionOpen",
|
|
20
|
+
MissingHeaderMetadata: "ST377-1:2011:8.3.3/MissingHeaderMetadata",
|
|
21
|
+
StructuralComponentDurationMissing: "ST377-1:2011:B.8/StructuralComponentDurationMissing",
|
|
12
22
|
},
|
|
13
23
|
ST2067_2_2020: {
|
|
14
24
|
AssetMap: "ST2067-2:2020:7/AssetMap",
|
|
@@ -19,9 +29,13 @@ const codes = {
|
|
|
19
29
|
FileNotFound: "ST2067-2:2020:8.3/FileNotFound",
|
|
20
30
|
ChecksumMismatch: "ST2067-2:2020:8.3/ChecksumMismatch",
|
|
21
31
|
UnresolvedUuid: "ST2067-2:2020:7/UnresolvedUuid",
|
|
32
|
+
TrackFileNotInPackage: "ST2067-2:2020:7.1/TrackFileNotInPackage",
|
|
22
33
|
DuplicateUuid: "ST2067-2:2020:7/DuplicateUuid",
|
|
23
34
|
IoError: "IMF:General/IoError",
|
|
24
35
|
EssenceDescriptorList: "ST2067-2:2020:6.4.2/EssenceDescriptorList",
|
|
36
|
+
PklUnknownNamespace: "ST2067-2:2020:9/PklUnknownNamespace",
|
|
37
|
+
AssetMapHasNoPackingList: "ST429-9:2014:6.3/AssetMapHasNoPackingList",
|
|
38
|
+
PklIdNotInAssetMap: "ST429-9:2014:6.3/PklIdNotInAssetMap",
|
|
25
39
|
},
|
|
26
40
|
ST2067_2_2013_Core: {
|
|
27
41
|
ResourceListEmpty: "ST2067-2:2013:XSD/ResourceList-Empty",
|
|
@@ -44,7 +58,6 @@ const codes = {
|
|
|
44
58
|
UniqueResourceId: "ST2067-2:2013:6.1/UniqueResourceId",
|
|
45
59
|
IntrinsicDuration: "ST2067-2:2013:6.10/IntrinsicDuration",
|
|
46
60
|
EntryPoint: "ST2067-2:2013:6.10/EntryPoint",
|
|
47
|
-
SourceDuration: "ST2067-2:2013:6.10/SourceDuration",
|
|
48
61
|
ResourceDuration: "ST2067-2:2013:6.10/ResourceDuration",
|
|
49
62
|
RepeatCount: "ST2067-2:2013:6.10/RepeatCount",
|
|
50
63
|
TrackFileId: "ST2067-2:2013:6.10/TrackFileId",
|
|
@@ -59,9 +72,10 @@ const codes = {
|
|
|
59
72
|
SoundfieldGroup: "ST2067-2:2013:ST377-4/SoundfieldGroup",
|
|
60
73
|
MCATagSymbol: "ST2067-2:2013:ST377-4/MCATagSymbol",
|
|
61
74
|
SoundfieldChannelCount: "ST2067-2:2013:ST377-4/SoundfieldChannelCount",
|
|
62
|
-
DigitalSignature: "ST2067-2:2013:
|
|
75
|
+
DigitalSignature: "ST2067-2:2013:6.9/DigitalSignature",
|
|
63
76
|
DanglingEssenceDescriptor: "ST2067-2:2013:6.4.2/DanglingEssenceDescriptor",
|
|
64
77
|
EssenceDescriptorList: "ST2067-2:2013:6.4.2/EssenceDescriptorList",
|
|
78
|
+
CplIdAssetMapMismatch: "ST2067-2:2013:7.2/CplIdAssetMapMismatch",
|
|
65
79
|
},
|
|
66
80
|
ST2067_2_2016_Core: {
|
|
67
81
|
ResourceListEmpty: "ST2067-2:2016:XSD/ResourceList-Empty",
|
|
@@ -84,7 +98,6 @@ const codes = {
|
|
|
84
98
|
UniqueResourceId: "ST2067-2:2016:6.1/UniqueResourceId",
|
|
85
99
|
IntrinsicDuration: "ST2067-2:2016:6.10/IntrinsicDuration",
|
|
86
100
|
EntryPoint: "ST2067-2:2016:6.10/EntryPoint",
|
|
87
|
-
SourceDuration: "ST2067-2:2016:6.10/SourceDuration",
|
|
88
101
|
ResourceDuration: "ST2067-2:2016:6.10/ResourceDuration",
|
|
89
102
|
RepeatCount: "ST2067-2:2016:6.10/RepeatCount",
|
|
90
103
|
TrackFileId: "ST2067-2:2016:6.10/TrackFileId",
|
|
@@ -99,9 +112,10 @@ const codes = {
|
|
|
99
112
|
SoundfieldGroup: "ST2067-2:2016:ST377-4/SoundfieldGroup",
|
|
100
113
|
MCATagSymbol: "ST2067-2:2016:ST377-4/MCATagSymbol",
|
|
101
114
|
SoundfieldChannelCount: "ST2067-2:2016:ST377-4/SoundfieldChannelCount",
|
|
102
|
-
DigitalSignature: "ST2067-2:2016:
|
|
115
|
+
DigitalSignature: "ST2067-2:2016:6.9/DigitalSignature",
|
|
103
116
|
DanglingEssenceDescriptor: "ST2067-2:2016:6.4.2/DanglingEssenceDescriptor",
|
|
104
117
|
EssenceDescriptorList: "ST2067-2:2016:6.4.2/EssenceDescriptorList",
|
|
118
|
+
CplIdAssetMapMismatch: "ST2067-2:2016:7.3.1/CplIdAssetMapMismatch",
|
|
105
119
|
},
|
|
106
120
|
ST2067_2_2020_Core: {
|
|
107
121
|
ResourceListEmpty: "ST2067-2:2020:XSD/ResourceList-Empty",
|
|
@@ -124,7 +138,6 @@ const codes = {
|
|
|
124
138
|
UniqueResourceId: "ST2067-2:2020:6.1/UniqueResourceId",
|
|
125
139
|
IntrinsicDuration: "ST2067-2:2020:6.10/IntrinsicDuration",
|
|
126
140
|
EntryPoint: "ST2067-2:2020:6.10/EntryPoint",
|
|
127
|
-
SourceDuration: "ST2067-2:2020:6.10/SourceDuration",
|
|
128
141
|
ResourceDuration: "ST2067-2:2020:6.10/ResourceDuration",
|
|
129
142
|
RepeatCount: "ST2067-2:2020:6.10/RepeatCount",
|
|
130
143
|
TrackFileId: "ST2067-2:2020:6.10/TrackFileId",
|
|
@@ -139,9 +152,10 @@ const codes = {
|
|
|
139
152
|
SoundfieldGroup: "ST2067-2:2020:ST377-4/SoundfieldGroup",
|
|
140
153
|
MCATagSymbol: "ST2067-2:2020:ST377-4/MCATagSymbol",
|
|
141
154
|
SoundfieldChannelCount: "ST2067-2:2020:ST377-4/SoundfieldChannelCount",
|
|
142
|
-
DigitalSignature: "ST2067-2:2020:
|
|
155
|
+
DigitalSignature: "ST2067-2:2020:6.9/DigitalSignature",
|
|
143
156
|
DanglingEssenceDescriptor: "ST2067-2:2020:6.4.2/DanglingEssenceDescriptor",
|
|
144
157
|
EssenceDescriptorList: "ST2067-2:2020:6.4.2/EssenceDescriptorList",
|
|
158
|
+
CplIdAssetMapMismatch: "ST2067-2:2020:7.3.1/CplIdAssetMapMismatch",
|
|
145
159
|
},
|
|
146
160
|
ST2067_3_2013: {
|
|
147
161
|
ContentKindUnknown: "ST2067-3:2013:5.5.1.2/ContentKindUnknown",
|
|
@@ -175,22 +189,6 @@ const codes = {
|
|
|
175
189
|
ContentVersionIdDuplicate: "ST2067-3:2016:6.1.9/ContentVersionIdDuplicate",
|
|
176
190
|
SegmentDurationIntegerEditUnits: "ST2067-3:2016:7.3/SegmentDurationIntegerEditUnits",
|
|
177
191
|
},
|
|
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
192
|
ST2067_9_2018: {
|
|
195
193
|
MalformedXml: "ST2067-9:2018:6.1/MalformedXml",
|
|
196
194
|
SidecarAssetReferencedByVirtualTrack: "ST2067-9:2018:5/SidecarAssetReferencedByVirtualTrack",
|
|
@@ -201,15 +199,90 @@ const codes = {
|
|
|
201
199
|
CplNotFound: "ST2067-9:2018:7.3.1.1/CplNotFound",
|
|
202
200
|
DuplicateCplId: "ST2067-9:2018:7.3.1.1/DuplicateCplId",
|
|
203
201
|
},
|
|
202
|
+
ST2067_21_2014: {
|
|
203
|
+
ColorSystem: "ST2067-21:2014:6.1/ColorSystem",
|
|
204
|
+
BlackRefLevel: "ST2067-21:2014:6.1.4/BlackRefLevel",
|
|
205
|
+
WhiteRefLevel: "ST2067-21:2014:6.1.4/WhiteRefLevel",
|
|
206
|
+
ColorRange: "ST2067-21:2014:6.1.4/ColorRange",
|
|
207
|
+
ApplicationIdentification: "ST2067-21:2014:7/ApplicationIdentification",
|
|
208
|
+
AppIdMismatch: "ST2067-21:2014:7/AppIdMismatch",
|
|
209
|
+
},
|
|
210
|
+
ST2067_21_2016: {
|
|
211
|
+
ColorSystem: "ST2067-21:2016:6.1/ColorSystem",
|
|
212
|
+
ComponentRefValues: "ST2067-21:2016:6.2/ComponentRefValues",
|
|
213
|
+
BlackRefLevel: "ST2067-21:2016:6.3/BlackRefLevel",
|
|
214
|
+
WhiteRefLevel: "ST2067-21:2016:6.3/WhiteRefLevel",
|
|
215
|
+
ColorRange: "ST2067-21:2016:6.3/ColorRange",
|
|
216
|
+
ApplicationIdentification: "ST2067-21:2016:7.1/ApplicationIdentification",
|
|
217
|
+
AppIdMismatch: "ST2067-21:2016:7.1/AppIdMismatch",
|
|
218
|
+
MaxCLLMaxFALL: "ST2067-21:2016:7.2/MaxCLLMaxFALL",
|
|
219
|
+
},
|
|
204
220
|
ST2067_21_2020: {
|
|
221
|
+
FrameRate: "ST2067-21:2020:5.2/FrameRate",
|
|
222
|
+
Resolution: "ST2067-21:2020:5.2/Resolution",
|
|
223
|
+
ColorSystem: "ST2067-21:2020:6.2/ColorSystem",
|
|
224
|
+
RequiredStoredWidth: "ST2067-21:2020:6.2/Required-StoredWidth",
|
|
225
|
+
RequiredStoredHeight: "ST2067-21:2020:6.2/Required-StoredHeight",
|
|
226
|
+
RequiredSampleRate: "ST2067-21:2020:6.2/Required-SampleRate",
|
|
227
|
+
RequiredFrameLayout: "ST2067-21:2020:6.2/Required-FrameLayout",
|
|
228
|
+
RequiredColorPrimaries: "ST2067-21:2020:6.2/Required-ColorPrimaries",
|
|
229
|
+
RequiredTransferCharacteristic: "ST2067-21:2020:6.2/Required-TransferCharacteristic",
|
|
230
|
+
RequiredPictureCompression: "ST2067-21:2020:6.2/Required-PictureCompression",
|
|
231
|
+
RequiredComponentDepth: "ST2067-21:2020:6.2/Required-ComponentDepth",
|
|
232
|
+
AlphaTransparency: "ST2067-21:2020:6.2.1/AlphaTransparency",
|
|
233
|
+
CodingEquationsMissing: "ST2067-21:2020:6.2.1/CodingEquationsMissing",
|
|
234
|
+
ColorPrimariesMissing: "ST2067-21:2020:6.2.1/ColorPrimariesMissing",
|
|
235
|
+
FieldDominance: "ST2067-21:2020:6.2.1/FieldDominance",
|
|
236
|
+
FrameLayout: "ST2067-21:2020:6.2.1/FrameLayout",
|
|
237
|
+
FrameLayoutInterlaced: "ST2067-21:2020:6.2.1/FrameLayoutInterlaced",
|
|
238
|
+
ImageAlignmentOffset: "ST2067-21:2020:6.2.1/ImageAlignmentOffset",
|
|
239
|
+
ImageEndOffset: "ST2067-21:2020:6.2.1/ImageEndOffset",
|
|
240
|
+
ImageStartOffset: "ST2067-21:2020:6.2.1/ImageStartOffset",
|
|
241
|
+
SampledHeight: "ST2067-21:2020:6.2.1/SampledHeight",
|
|
242
|
+
SampledWidth: "ST2067-21:2020:6.2.1/SampledWidth",
|
|
243
|
+
SampledXOffset: "ST2067-21:2020:6.2.1/SampledXOffset",
|
|
244
|
+
SampledYOffset: "ST2067-21:2020:6.2.1/SampledYOffset",
|
|
245
|
+
StoredF2Offset: "ST2067-21:2020:6.2.1/StoredF2Offset",
|
|
246
|
+
TransferCharacteristicMissing: "ST2067-21:2020:6.2.1/TransferCharacteristicMissing",
|
|
247
|
+
TransferCharacteristicUnknown: "ST2067-21:2020:6.2.2/TransferCharacteristicUnknown",
|
|
248
|
+
CodingEquationsUnknown: "ST2067-21:2020:6.2.3/CodingEquationsUnknown",
|
|
249
|
+
ColorPrimariesUnknown: "ST2067-21:2020:6.2.4/ColorPrimariesUnknown",
|
|
250
|
+
J2KRequired: "ST2067-21:2020:6.2.5/J2KRequired",
|
|
251
|
+
AlphaMaxRef: "ST2067-21:2020:6.3/AlphaMaxRef",
|
|
252
|
+
AlphaMinRef: "ST2067-21:2020:6.3/AlphaMinRef",
|
|
253
|
+
ComponentMaxRef: "ST2067-21:2020:6.3/ComponentMaxRef",
|
|
254
|
+
ComponentMinRef: "ST2067-21:2020:6.3/ComponentMinRef",
|
|
255
|
+
Palette: "ST2067-21:2020:6.3/Palette",
|
|
256
|
+
PaletteLayout: "ST2067-21:2020:6.3/PaletteLayout",
|
|
257
|
+
ScanningDirection: "ST2067-21:2020:6.3/ScanningDirection",
|
|
258
|
+
ComponentRefValues: "ST2067-21:2020:6.3.2/ComponentRefValues",
|
|
259
|
+
AlphaSampleDepth: "ST2067-21:2020:6.4/AlphaSampleDepth",
|
|
260
|
+
ColorSiting: "ST2067-21:2020:6.4/ColorSiting",
|
|
261
|
+
ComponentDepth: "ST2067-21:2020:6.4/ComponentDepth",
|
|
262
|
+
HorizontalSubsampling: "ST2067-21:2020:6.4/HorizontalSubsampling",
|
|
263
|
+
PaddingBits: "ST2067-21:2020:6.4/PaddingBits",
|
|
264
|
+
ReversedByteOrder: "ST2067-21:2020:6.4/ReversedByteOrder",
|
|
265
|
+
VerticalSubsampling: "ST2067-21:2020:6.4/VerticalSubsampling",
|
|
266
|
+
BlackRefLevel: "ST2067-21:2020:6.4.3/BlackRefLevel",
|
|
267
|
+
ColorRange: "ST2067-21:2020:6.4.3/ColorRange",
|
|
268
|
+
WhiteRefLevel: "ST2067-21:2020:6.4.3/WhiteRefLevel",
|
|
269
|
+
CodingStyle: "ST2067-21:2020:6.5.2/CodingStyle",
|
|
270
|
+
J2CLayout: "ST2067-21:2020:6.5.2/J2CLayout",
|
|
271
|
+
JPEG2000SubDescriptor: "ST2067-21:2020:6.5.2/JPEG2000SubDescriptor",
|
|
272
|
+
J2KHTNotAllowed: "ST2067-21:2020:6.2.5/J2K-HT-Not-Allowed",
|
|
273
|
+
J2K4KResolution: "ST2067-21:2020:6.2.5/J2K-4K-Resolution",
|
|
274
|
+
J2K2KResolution: "ST2067-21:2020:6.2.5/J2K-2K-Resolution",
|
|
275
|
+
J2KBCPResolution: "ST2067-21:2020:6.2.5/J2K-BCP-Resolution",
|
|
276
|
+
J2KProfileNotAllowed: "ST2067-21:2020:6.2.5/J2K-Profile-Not-Allowed",
|
|
277
|
+
ApplicationIdentification: "ST2067-21:2020:7.1/ApplicationIdentification",
|
|
278
|
+
HomogeneousImageEssence: "ST2067-21:2020:7.2/HomogeneousImageEssence",
|
|
205
279
|
AppIdMismatch: "ST2067-21:2020:7.1/AppIdMismatch",
|
|
280
|
+
SegmentDurationMultiple: "ST2067-21:2020:7.4/SegmentDurationMultiple",
|
|
281
|
+
MaxCLLMaxFALL: "ST2067-21:2020:7.5/MaxCLLMaxFALL",
|
|
206
282
|
},
|
|
207
283
|
ST2067_21_2023: {
|
|
208
284
|
FrameRate: "ST2067-21:2023:5.2/FrameRate",
|
|
209
285
|
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
286
|
ColorSystem: "ST2067-21:2023:6.2/ColorSystem",
|
|
214
287
|
RequiredStoredWidth: "ST2067-21:2023:6.2/Required-StoredWidth",
|
|
215
288
|
RequiredStoredHeight: "ST2067-21:2023:6.2/Required-StoredHeight",
|
|
@@ -219,8 +292,6 @@ const codes = {
|
|
|
219
292
|
RequiredTransferCharacteristic: "ST2067-21:2023:6.2/Required-TransferCharacteristic",
|
|
220
293
|
RequiredPictureCompression: "ST2067-21:2023:6.2/Required-PictureCompression",
|
|
221
294
|
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
295
|
AlphaTransparency: "ST2067-21:2023:6.2.1/AlphaTransparency",
|
|
225
296
|
CodingEquationsMissing: "ST2067-21:2023:6.2.1/CodingEquationsMissing",
|
|
226
297
|
ColorPrimariesMissing: "ST2067-21:2023:6.2.1/ColorPrimariesMissing",
|
|
@@ -258,80 +329,144 @@ const codes = {
|
|
|
258
329
|
BlackRefLevel: "ST2067-21:2023:6.4.3/BlackRefLevel",
|
|
259
330
|
ColorRange: "ST2067-21:2023:6.4.3/ColorRange",
|
|
260
331
|
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
332
|
CodingStyle: "ST2067-21:2023:6.5.2/CodingStyle",
|
|
264
333
|
J2CLayout: "ST2067-21:2023:6.5.2/J2CLayout",
|
|
265
334
|
J2KExtendedCapabilities: "ST2067-21:2023:6.5.2/J2KExtendedCapabilities",
|
|
266
335
|
JPEG2000SubDescriptor: "ST2067-21:2023:6.5.2/JPEG2000SubDescriptor",
|
|
267
|
-
J2KHTNotAllowed: "ST2067-21:2023:6.2.5/J2K-HT-Not-Allowed",
|
|
268
336
|
J2K4KResolution: "ST2067-21:2023:6.2.5/J2K-4K-Resolution",
|
|
269
337
|
J2K2KResolution: "ST2067-21:2023:6.2.5/J2K-2K-Resolution",
|
|
270
338
|
J2KBCPResolution: "ST2067-21:2023:6.2.5/J2K-BCP-Resolution",
|
|
339
|
+
J2KProfileNotAllowed: "ST2067-21:2023:6.2.5/J2K-Profile-Not-Allowed",
|
|
271
340
|
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
341
|
HomogeneousImageEssence: "ST2067-21:2023:7.2/HomogeneousImageEssence",
|
|
275
342
|
AppIdMismatch: "ST2067-21:2023:7.1/AppIdMismatch",
|
|
276
343
|
SegmentDurationMultiple: "ST2067-21:2023:7.4/SegmentDurationMultiple",
|
|
277
344
|
MaxCLLMaxFALL: "ST2067-21:2023:7.5/MaxCLLMaxFALL",
|
|
278
345
|
},
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
346
|
+
ST2067_21_2026: {
|
|
347
|
+
FrameRate: "ST2067-21:2026:6.2.1/FrameRate",
|
|
348
|
+
Resolution: "ST2067-21:2026:6.2.1/Resolution",
|
|
349
|
+
ColorSystem: "ST2067-21:2026:7.2/ColorSystem",
|
|
350
|
+
RequiredStoredWidth: "ST2067-21:2026:7.2.1.1/Required-StoredWidth",
|
|
351
|
+
RequiredStoredHeight: "ST2067-21:2026:7.2.1.1/Required-StoredHeight",
|
|
352
|
+
RequiredSampleRate: "ST2067-21:2026:7.2.1.1/Required-SampleRate",
|
|
353
|
+
RequiredFrameLayout: "ST2067-21:2026:7.2.1.1/Required-FrameLayout",
|
|
354
|
+
RequiredColorPrimaries: "ST2067-21:2026:7.2.1.1/Required-ColorPrimaries",
|
|
355
|
+
RequiredTransferCharacteristic: "ST2067-21:2026:7.2.1.1/Required-TransferCharacteristic",
|
|
356
|
+
RequiredPictureCompression: "ST2067-21:2026:7.2.1.1/Required-PictureCompression",
|
|
357
|
+
RequiredComponentDepth: "ST2067-21:2026:7.4.1/Required-ComponentDepth",
|
|
358
|
+
CodingEquationsMissing: "ST2067-21:2026:7.2.1.1/CodingEquationsMissing",
|
|
359
|
+
ColorPrimariesMissing: "ST2067-21:2026:7.2.1.1/ColorPrimariesMissing",
|
|
360
|
+
FieldDominance: "ST2067-21:2026:7.2.1.1/FieldDominance",
|
|
361
|
+
FrameLayout: "ST2067-21:2026:7.2.1.4/FrameLayout",
|
|
362
|
+
FrameLayoutInterlaced: "ST2067-21:2026:6.2.1/FrameLayoutInterlaced",
|
|
363
|
+
ImageAlignmentOffset: "ST2067-21:2026:7.2.1.1/ImageAlignmentOffset",
|
|
364
|
+
ImageEndOffset: "ST2067-21:2026:7.2.1.1/ImageEndOffset",
|
|
365
|
+
ImageStartOffset: "ST2067-21:2026:7.2.1.1/ImageStartOffset",
|
|
366
|
+
SampledHeight: "ST2067-21:2026:7.2.1.1/SampledHeight",
|
|
367
|
+
SampledWidth: "ST2067-21:2026:7.2.1.1/SampledWidth",
|
|
368
|
+
SampledXOffset: "ST2067-21:2026:7.2.1.1/SampledXOffset",
|
|
369
|
+
SampledYOffset: "ST2067-21:2026:7.2.1.1/SampledYOffset",
|
|
370
|
+
StoredF2Offset: "ST2067-21:2026:7.2.1.1/StoredF2Offset",
|
|
371
|
+
TransferCharacteristicMissing: "ST2067-21:2026:7.2.1.1/TransferCharacteristicMissing",
|
|
372
|
+
TransferCharacteristicUnknown: "ST2067-21:2026:7.2.2/TransferCharacteristicUnknown",
|
|
373
|
+
CodingEquationsUnknown: "ST2067-21:2026:7.2.3/CodingEquationsUnknown",
|
|
374
|
+
ColorPrimariesUnknown: "ST2067-21:2026:7.2.4/ColorPrimariesUnknown",
|
|
375
|
+
J2KRequired: "ST2067-21:2026:7.2.5/J2KRequired",
|
|
376
|
+
AlphaMaxRef: "ST2067-21:2026:7.3.1/AlphaMaxRef",
|
|
377
|
+
AlphaMinRef: "ST2067-21:2026:7.3.1/AlphaMinRef",
|
|
378
|
+
ComponentMaxRef: "ST2067-21:2026:7.3.1/ComponentMaxRef",
|
|
379
|
+
ComponentMinRef: "ST2067-21:2026:7.3.1/ComponentMinRef",
|
|
380
|
+
Palette: "ST2067-21:2026:7.3.1/Palette",
|
|
381
|
+
PaletteLayout: "ST2067-21:2026:7.3.1/PaletteLayout",
|
|
382
|
+
ScanningDirection: "ST2067-21:2026:7.3.1/ScanningDirection",
|
|
383
|
+
ComponentRefValues: "ST2067-21:2026:7.3.2/ComponentRefValues",
|
|
384
|
+
AlphaSampleDepth: "ST2067-21:2026:7.4.1/AlphaSampleDepth",
|
|
385
|
+
ColorSiting: "ST2067-21:2026:7.4.1/ColorSiting",
|
|
386
|
+
ComponentDepth: "ST2067-21:2026:7.4.1/ComponentDepth",
|
|
387
|
+
HorizontalSubsampling: "ST2067-21:2026:7.4.2/HorizontalSubsampling",
|
|
388
|
+
PaddingBits: "ST2067-21:2026:7.4.1/PaddingBits",
|
|
389
|
+
ReversedByteOrder: "ST2067-21:2026:7.4.1/ReversedByteOrder",
|
|
390
|
+
VerticalSubsampling: "ST2067-21:2026:7.4.1/VerticalSubsampling",
|
|
391
|
+
BlackRefLevel: "ST2067-21:2026:7.4.3/BlackRefLevel",
|
|
392
|
+
ColorRange: "ST2067-21:2026:7.4.3/ColorRange",
|
|
393
|
+
WhiteRefLevel: "ST2067-21:2026:7.4.3/WhiteRefLevel",
|
|
394
|
+
CodingStyle: "ST2067-21:2026:7.5.1/CodingStyle",
|
|
395
|
+
J2CLayout: "ST2067-21:2026:7.5.2/J2CLayout",
|
|
396
|
+
J2KExtendedCapabilities: "ST2067-21:2026:7.5.1/J2KExtendedCapabilities",
|
|
397
|
+
JPEG2000SubDescriptor: "ST2067-21:2026:7.5.1/JPEG2000SubDescriptor",
|
|
398
|
+
HTIRVParameterBMax: "ST2067-21:2026:H/HT-IRV-ParameterB-Max",
|
|
399
|
+
HTIRVParameterBRecommended: "ST2067-21:2026:H/HT-IRV-ParameterB-Recommended",
|
|
400
|
+
J2K4KResolution: "ST2067-21:2026:7.2.5/J2K-4K-Resolution",
|
|
401
|
+
J2K2KResolution: "ST2067-21:2026:7.2.5/J2K-2K-Resolution",
|
|
402
|
+
J2KBCPResolution: "ST2067-21:2026:7.2.5/J2K-BCP-Resolution",
|
|
403
|
+
J2K8KResolution: "ST2067-21:2026:7.2.5/J2K-8K-Resolution",
|
|
404
|
+
ApplicationIdentification: "ST2067-21:2026:8.1/ApplicationIdentification",
|
|
405
|
+
AppIdMismatch: "ST2067-21:2026:8.1/AppIdMismatch",
|
|
406
|
+
HomogeneousImageEssence: "ST2067-21:2026:8.2/HomogeneousImageEssence",
|
|
407
|
+
SegmentDurationMultiple: "ST2067-21:2026:8.3.2/SegmentDurationMultiple",
|
|
408
|
+
MaxCLLMaxFALL: "ST2067-21:2026:8.3.3/MaxCLLMaxFALL",
|
|
282
409
|
},
|
|
283
410
|
ST2067_201_2019: {
|
|
284
411
|
CodecForbidden: "ST2067-201:2019:5.9/CodecForbidden",
|
|
285
|
-
|
|
412
|
+
ElectrospatialFormulationInvalid: "ST2067-201:2019:5.9/ElectrospatialFormulationInvalid",
|
|
286
413
|
QuantizationBitsMissing: "ST2067-201:2019:5.9/QuantizationBitsMissing",
|
|
287
414
|
QuantizationBitsInvalid: "ST2067-201:2019:5.9/QuantizationBitsInvalid",
|
|
288
|
-
ContainerFormatMissing: "ST2067-201:2019:5.
|
|
289
|
-
EssenceContainerInvalid: "ST2067-201:2019:5.
|
|
415
|
+
ContainerFormatMissing: "ST2067-201:2019:5.9/ContainerFormatMissing",
|
|
416
|
+
EssenceContainerInvalid: "ST2067-201:2019:5.9/EssenceContainerInvalid",
|
|
290
417
|
AudioSamplingRateMissing: "ST2067-201:2019:5.9/AudioSamplingRateMissing",
|
|
291
418
|
AudioSamplingRateInvalid: "ST2067-201:2019:5.9/AudioSamplingRateInvalid",
|
|
292
419
|
SoundCompressionMissing: "ST2067-201:2019:5.9/SoundCompressionMissing",
|
|
293
420
|
SoundCompressionInvalid: "ST2067-201:2019:5.9/SoundCompressionInvalid",
|
|
294
421
|
ChannelCountNotZero: "ST2067-201:2019:5.9/ChannelCountNotZero",
|
|
295
|
-
SubDescriptorMissing: "ST2067-201:2019:5.
|
|
296
|
-
MCATagSymbolMissing: "ST2067-201:2019:5.
|
|
297
|
-
MCATagSymbolInvalid: "ST2067-201:2019:5.
|
|
298
|
-
MCATagNameMissing: "ST2067-201:2019:5.
|
|
299
|
-
MCATagNameInvalid: "ST2067-201:2019:5.
|
|
300
|
-
MCALabelDictionaryIDMissing: "ST2067-201:2019:5.
|
|
301
|
-
MCALabelDictionaryIDInvalid: "ST2067-201:2019:5.
|
|
302
|
-
MainAudioMissing: "ST2067-201:2019:6.2/MainAudioMissing",
|
|
422
|
+
SubDescriptorMissing: "ST2067-201:2019:5.10.2/SubDescriptorMissing",
|
|
423
|
+
MCATagSymbolMissing: "ST2067-201:2019:5.10.4/MCATagSymbolMissing",
|
|
424
|
+
MCATagSymbolInvalid: "ST2067-201:2019:5.10.4/MCATagSymbolInvalid",
|
|
425
|
+
MCATagNameMissing: "ST2067-201:2019:5.10.3/MCATagNameMissing",
|
|
426
|
+
MCATagNameInvalid: "ST2067-201:2019:5.10.4/MCATagNameInvalid",
|
|
427
|
+
MCALabelDictionaryIDMissing: "ST2067-201:2019:5.10.4/MCALabelDictionaryIDMissing",
|
|
428
|
+
MCALabelDictionaryIDInvalid: "ST2067-201:2019:5.10.4/MCALabelDictionaryIDInvalid",
|
|
303
429
|
IABSequenceNoResources: "ST2067-201:2019:6.2/IABSequenceNoResources",
|
|
304
430
|
IABSequenceSourceEncodingInvalid: "ST2067-201:2019:6.2/IABSequenceSourceEncodingInvalid",
|
|
431
|
+
ForbiddenMCASubDescriptor: "ST2067-201:2019:5.10.2/ForbiddenMCASubDescriptor",
|
|
432
|
+
SubDescriptorDuplicate: "ST2067-201:2019:5.10.2/SubDescriptorDuplicate",
|
|
433
|
+
MCAChannelIDForbidden: "ST2067-201:2019:C.2/MCAChannelIDForbidden",
|
|
434
|
+
EditRateNotIntegerMultiple: "ST2067-201:2019:6.2/EditRateNotIntegerMultiple",
|
|
305
435
|
},
|
|
306
436
|
ST2067_201_2021: {
|
|
307
437
|
CodecForbidden: "ST2067-201:2021:5.9/CodecForbidden",
|
|
308
|
-
|
|
438
|
+
ElectrospatialFormulationInvalid: "ST2067-201:2021:5.9/ElectrospatialFormulationInvalid",
|
|
309
439
|
QuantizationBitsMissing: "ST2067-201:2021:5.9/QuantizationBitsMissing",
|
|
310
440
|
QuantizationBitsInvalid: "ST2067-201:2021:5.9/QuantizationBitsInvalid",
|
|
311
|
-
ContainerFormatMissing: "ST2067-201:2021:5.
|
|
312
|
-
EssenceContainerInvalid: "ST2067-201:2021:5.
|
|
441
|
+
ContainerFormatMissing: "ST2067-201:2021:5.9/ContainerFormatMissing",
|
|
442
|
+
EssenceContainerInvalid: "ST2067-201:2021:5.9/EssenceContainerInvalid",
|
|
313
443
|
AudioSamplingRateMissing: "ST2067-201:2021:5.9/AudioSamplingRateMissing",
|
|
314
444
|
AudioSamplingRateInvalid: "ST2067-201:2021:5.9/AudioSamplingRateInvalid",
|
|
315
445
|
SoundCompressionMissing: "ST2067-201:2021:5.9/SoundCompressionMissing",
|
|
316
446
|
SoundCompressionInvalid: "ST2067-201:2021:5.9/SoundCompressionInvalid",
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
MCALabelDictionaryIDInvalid: "ST2067-201:2021:5.9/MCALabelDictionaryIDInvalid",
|
|
325
|
-
MainAudioMissing: "ST2067-201:2021:6.2/MainAudioMissing",
|
|
447
|
+
SubDescriptorMissing: "ST2067-201:2021:5.10.2/SubDescriptorMissing",
|
|
448
|
+
MCATagSymbolMissing: "ST2067-201:2021:5.10.4/MCATagSymbolMissing",
|
|
449
|
+
MCATagSymbolInvalid: "ST2067-201:2021:5.10.4/MCATagSymbolInvalid",
|
|
450
|
+
MCATagNameMissing: "ST2067-201:2021:5.10.3/MCATagNameMissing",
|
|
451
|
+
MCATagNameInvalid: "ST2067-201:2021:5.10.4/MCATagNameInvalid",
|
|
452
|
+
MCALabelDictionaryIDMissing: "ST2067-201:2021:5.10.4/MCALabelDictionaryIDMissing",
|
|
453
|
+
MCALabelDictionaryIDInvalid: "ST2067-201:2021:5.10.4/MCALabelDictionaryIDInvalid",
|
|
326
454
|
IABSequenceNoResources: "ST2067-201:2021:6.2/IABSequenceNoResources",
|
|
327
455
|
IABSequenceSourceEncodingInvalid: "ST2067-201:2021:6.2/IABSequenceSourceEncodingInvalid",
|
|
456
|
+
ForbiddenMCASubDescriptor: "ST2067-201:2021:5.10.2/ForbiddenMCASubDescriptor",
|
|
457
|
+
SubDescriptorDuplicate: "ST2067-201:2021:5.10.2/SubDescriptorDuplicate",
|
|
458
|
+
MCAChannelIDForbidden: "ST2067-201:2021:C.2/MCAChannelIDForbidden",
|
|
459
|
+
EditRateNotIntegerMultiple: "ST2067-201:2021:6.2/EditRateNotIntegerMultiple",
|
|
328
460
|
},
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
461
|
+
ST2067_202_2023: {
|
|
462
|
+
NamespaceUriMissing: "ST2067-202:2023:9.2/NamespaceUriMissing",
|
|
463
|
+
ISXDSequenceNoResources: "ST2067-202:2023:6/ISXDSequenceNoResources",
|
|
464
|
+
ISXDSequenceSourceEncodingInvalid: "ST2067-202:2023:6/ISXDSequenceSourceEncodingInvalid",
|
|
465
|
+
NamespaceUriMismatch: "ST2067-202:2023:6/NamespaceUriMismatch",
|
|
466
|
+
EditRateMismatch: "ST2067-202:2023:6/EditRateMismatch",
|
|
467
|
+
ISXDVirtualTrackMissing: "ST2067-202:2023:6/ISXDVirtualTrackMissing",
|
|
468
|
+
DataEssenceCodingMissing: "ST2067-202:2023:9.3/DataEssenceCodingMissing",
|
|
469
|
+
DataEssenceCodingInvalid: "ST2067-202:2023:9.3/DataEssenceCodingInvalid",
|
|
335
470
|
},
|
|
336
471
|
Imferno: {
|
|
337
472
|
UnreferencedAsset: "IMFERNO:Package/UnreferencedAsset",
|
|
@@ -343,6 +478,7 @@ const codes = {
|
|
|
343
478
|
ReadDirError: "IMFERNO:Package/ReadDirError",
|
|
344
479
|
DirEntryError: "IMFERNO:Package/DirEntryError",
|
|
345
480
|
PathTraversal: "IMFERNO:Package/PathTraversal",
|
|
481
|
+
ApplicationProfileNotValidated: "IMFERNO:Package/ApplicationProfileNotValidated",
|
|
346
482
|
}
|
|
347
483
|
};
|
|
348
484
|
module.exports = { codes };
|
package/index.d.ts
CHANGED
|
@@ -1,102 +1,170 @@
|
|
|
1
|
-
/* auto-generated by NAPI-RS */
|
|
1
|
+
/* auto-generated by NAPI-RS (`napi build`) — edit src/lib.rs or dts-header.d.ts instead */
|
|
2
2
|
/* eslint-disable */
|
|
3
3
|
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
4
|
+
import type {
|
|
5
|
+
Category,
|
|
6
|
+
ImfReport,
|
|
7
|
+
Imferno,
|
|
8
|
+
ValidateOptions,
|
|
9
|
+
ValidationResult,
|
|
10
|
+
} from "./types";
|
|
11
|
+
|
|
12
|
+
export * from "./types";
|
|
13
|
+
export { codes } from "./codes";
|
|
14
|
+
|
|
15
|
+
/** Options for validating a package on disk (`validatePath`, `buildReportFromPath`). */
|
|
16
|
+
export interface PathValidateOptions extends ValidateOptions {
|
|
17
|
+
/** Skip file-manifest (size/presence) and MXF header checks. Default: `false`. */
|
|
18
|
+
skipDiskChecks?: boolean;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
/** Explicit S3 credentials for `s3://` URIs. Omit to use the default AWS credential chain. */
|
|
22
|
+
export interface S3Credentials {
|
|
23
|
+
accessKeyId: string;
|
|
24
|
+
secretAccessKey: string;
|
|
25
|
+
sessionToken?: string;
|
|
26
|
+
region?: string;
|
|
27
|
+
endpoint?: string;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
/** Options for `validateUri` / `buildReportFromUri`. */
|
|
31
|
+
export interface UriValidateOptions extends PathValidateOptions {
|
|
32
|
+
/** Ignored for filesystem URIs. */
|
|
33
|
+
credentials?: S3Credentials | null;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
/** Which rule catalogue a code belongs to. */
|
|
37
|
+
export type RuleSpec =
|
|
38
|
+
| "core"
|
|
39
|
+
| "cpl"
|
|
40
|
+
| "app2e"
|
|
41
|
+
| "volindex"
|
|
42
|
+
| "mxf"
|
|
43
|
+
| "scm"
|
|
44
|
+
| "isxd"
|
|
45
|
+
| "iab"
|
|
46
|
+
| "imferno";
|
|
47
|
+
|
|
48
|
+
/** One entry of the `listRules()` catalogue. */
|
|
49
|
+
export interface RuleInfo {
|
|
50
|
+
/** Normalised rule code, usable as a `rules` key. */
|
|
51
|
+
code: string;
|
|
52
|
+
spec: RuleSpec;
|
|
53
|
+
description: string;
|
|
54
|
+
defaultSeverity: "info" | "warning" | "error" | "critical";
|
|
55
|
+
category: Extract<Category, string>;
|
|
56
|
+
/** Present when this edition's code set is identical to an earlier edition's (that edition's prefix). */
|
|
57
|
+
sameAsPreviousEdition?: string;
|
|
58
|
+
}
|
|
8
59
|
|
|
9
60
|
/**
|
|
10
|
-
* Validate an IMF package from in-memory XML strings
|
|
61
|
+
* Validate an IMF package from in-memory XML strings, returning the legacy
|
|
62
|
+
* `ImfReport` summary. Prefer `validate` for new code.
|
|
63
|
+
*
|
|
64
|
+
* Disk checks are always skipped (there is no package on disk).
|
|
11
65
|
*
|
|
12
66
|
* @param files - A map of filename to XML content (e.g. `{ "ASSETMAP.xml": "..." }`)
|
|
13
|
-
* @param options - Optional validation options (`coreSpec`, `app2eSpec`, `rules`,
|
|
14
|
-
* @returns An `ImfReport`
|
|
67
|
+
* @param options - Optional validation options (`coreSpec`, `app2eSpec`, `rules`, `aggregateRepeats`)
|
|
68
|
+
* @returns An `ImfReport` with `package`, `cpls`, and `validation` fields.
|
|
69
|
+
* @throws If the package cannot be parsed or the options are invalid.
|
|
15
70
|
*/
|
|
16
|
-
export declare function buildReport(files: Record<string, string>, options?:
|
|
71
|
+
export declare function buildReport(files: Record<string, string>, options?: ValidateOptions | undefined | null): ImfReport
|
|
17
72
|
|
|
18
73
|
/**
|
|
19
|
-
* Validate an IMF package directory on disk
|
|
74
|
+
* Validate an IMF package directory on disk, returning the legacy
|
|
75
|
+
* `ImfReport` summary. Prefer `validatePath` for new code.
|
|
20
76
|
*
|
|
21
77
|
* @param path - Path to the IMP directory
|
|
22
|
-
* @param options - Optional validation options (`coreSpec`, `app2eSpec`, `skipDiskChecks`, `rules`,
|
|
23
|
-
* @returns An `ImfReport`
|
|
78
|
+
* @param options - Optional validation options (`coreSpec`, `app2eSpec`, `skipDiskChecks`, `rules`, `aggregateRepeats`)
|
|
79
|
+
* @returns An `ImfReport` with `package`, `cpls`, and `validation` fields.
|
|
80
|
+
* @throws If the directory cannot be read, the package cannot be parsed, or the options are invalid.
|
|
24
81
|
*/
|
|
25
|
-
export declare function buildReportFromPath(path: string, options?:
|
|
82
|
+
export declare function buildReportFromPath(path: string, options?: PathValidateOptions | undefined | null): ImfReport
|
|
26
83
|
|
|
27
84
|
/**
|
|
28
|
-
*
|
|
85
|
+
* Build the legacy `ImfReport` summary from a URI. Accepts the same URI forms
|
|
86
|
+
* as `validateUri`; prefer `validateUri` for new code.
|
|
29
87
|
*
|
|
30
|
-
* @param
|
|
31
|
-
* @
|
|
88
|
+
* @param uri - Path or URI to the IMP
|
|
89
|
+
* @param options - Optional validation options
|
|
90
|
+
* @returns An `ImfReport` with `package`, `cpls`, and `validation` fields.
|
|
91
|
+
* @throws If the URI cannot be read, the package cannot be parsed, or the options are invalid.
|
|
32
92
|
*/
|
|
33
|
-
export declare function
|
|
93
|
+
export declare function buildReportFromUri(uri: string, options?: UriValidateOptions | undefined | null): ImfReport
|
|
34
94
|
|
|
35
95
|
/**
|
|
36
|
-
*
|
|
96
|
+
* Pretty-print a validation result as a human-readable string.
|
|
37
97
|
*
|
|
38
|
-
*
|
|
39
|
-
*
|
|
98
|
+
* @param report - The object returned by `validate*`, or (legacy) by `buildReport*`
|
|
99
|
+
* @returns A formatted plain-text report.
|
|
100
|
+
* @throws If `report` is neither a `ValidationResult` nor an `ImfReport`.
|
|
101
|
+
*/
|
|
102
|
+
export declare function formatReport(report: ValidationResult | ImfReport): string
|
|
103
|
+
|
|
104
|
+
/** Returns the imferno library version string. */
|
|
105
|
+
export declare function getVersion(): string
|
|
106
|
+
|
|
107
|
+
/**
|
|
108
|
+
* Returns the engine's full catalogue of validation rule codes, one entry per
|
|
109
|
+
* per-spec enum variant. Useful for building settings UIs that render a
|
|
110
|
+
* configurable severity dropdown per rule. The shape is stable JSON, so
|
|
111
|
+
* downstream callers can store severity overrides keyed by `code`.
|
|
112
|
+
*/
|
|
113
|
+
export declare function listRules(): RuleInfo[]
|
|
114
|
+
|
|
115
|
+
/**
|
|
116
|
+
* Parse an IMF package from in-memory XML strings, returning the full parsed
|
|
117
|
+
* package without validating it.
|
|
40
118
|
*
|
|
41
119
|
* @param files - A map of filename to XML content (e.g. `{ "ASSETMAP.xml": "..." }`)
|
|
42
|
-
* @returns The full parsed Imferno package
|
|
120
|
+
* @returns The full parsed `Imferno` package.
|
|
121
|
+
* @throws If the package cannot be parsed.
|
|
43
122
|
*/
|
|
44
|
-
export declare function parsePackage(files: Record<string, string>):
|
|
123
|
+
export declare function parsePackage(files: Record<string, string>): Imferno
|
|
45
124
|
|
|
46
125
|
/**
|
|
47
|
-
* Parse an IMF package directory on disk, returning the full parsed package
|
|
48
|
-
*
|
|
49
|
-
* Unlike `buildReportFromPath` which returns a validation summary, this returns the
|
|
50
|
-
* complete `Imferno` struct with all essence descriptors, locales, content versions, etc.
|
|
126
|
+
* Parse an IMF package directory on disk, returning the full parsed package
|
|
127
|
+
* without validating it.
|
|
51
128
|
*
|
|
52
129
|
* @param path - Path to the IMP directory
|
|
53
|
-
* @returns The full parsed Imferno package
|
|
130
|
+
* @returns The full parsed `Imferno` package.
|
|
131
|
+
* @throws If the directory cannot be read or the package cannot be parsed.
|
|
54
132
|
*/
|
|
55
|
-
export declare function parsePackageFromPath(path: string):
|
|
133
|
+
export declare function parsePackageFromPath(path: string): Imferno
|
|
56
134
|
|
|
57
135
|
/**
|
|
58
|
-
* Parse and validate an IMF package from in-memory XML strings.
|
|
136
|
+
* Parse and validate an IMF package from in-memory XML strings. This is the
|
|
137
|
+
* recommended entry point.
|
|
59
138
|
*
|
|
60
|
-
*
|
|
61
|
-
*
|
|
139
|
+
* Parse failures are reported as findings in `validation`, not thrown.
|
|
140
|
+
* Disk checks are always skipped (there is no package on disk).
|
|
62
141
|
*
|
|
63
142
|
* @param files - A map of filename to XML content
|
|
64
143
|
* @param options - Optional validation options
|
|
65
|
-
* @returns `{ package, validation }` — full
|
|
144
|
+
* @returns `{ package, validation }` — the full parsed package and all findings.
|
|
145
|
+
* @throws Only if the options are invalid.
|
|
66
146
|
*/
|
|
67
|
-
export declare function validate(files: Record<string, string>, options?:
|
|
147
|
+
export declare function validate(files: Record<string, string>, options?: ValidateOptions | undefined | null): ValidationResult
|
|
68
148
|
|
|
69
149
|
/**
|
|
70
150
|
* Parse and validate an IMF package directory on disk.
|
|
71
151
|
*
|
|
72
152
|
* @param path - Path to the IMP directory
|
|
73
153
|
* @param options - Optional validation options
|
|
74
|
-
* @returns `{ package, validation }` — full
|
|
154
|
+
* @returns `{ package, validation }` — the full parsed package and all findings.
|
|
155
|
+
* @throws If the directory cannot be read or the options are invalid.
|
|
75
156
|
*/
|
|
76
|
-
export declare function validatePath(path: string, options?:
|
|
157
|
+
export declare function validatePath(path: string, options?: PathValidateOptions | undefined | null): ValidationResult
|
|
77
158
|
|
|
78
159
|
/**
|
|
79
160
|
* Parse and validate an IMF package from a URI.
|
|
80
161
|
*
|
|
81
|
-
* Accepts `file://` URIs, bare filesystem paths, and (when
|
|
82
|
-
*
|
|
83
|
-
* on npm include `aws-s3` enabled.
|
|
84
|
-
*
|
|
85
|
-
* @param uri - Path or URI to the IMP
|
|
86
|
-
* @param options - Optional validation options
|
|
87
|
-
* @returns `{ package, validation }` — full Imferno struct + ValidationReport
|
|
88
|
-
*/
|
|
89
|
-
export declare function validateUri(uri: string, options?: any | undefined | null): any
|
|
90
|
-
|
|
91
|
-
/**
|
|
92
|
-
* Build an ImfReport summary from a URI.
|
|
93
|
-
*
|
|
94
|
-
* Accepts the same URI forms as `validateUri`. Prefer `validateUri` for new
|
|
95
|
-
* code — `buildReportFromUri` is kept for parity with `buildReport` /
|
|
96
|
-
* `buildReportFromPath`.
|
|
162
|
+
* Accepts `file://` URIs, bare filesystem paths, and (when built with the
|
|
163
|
+
* `aws-s3` feature, as the prebuilt npm binaries are) `s3://bucket/prefix/`.
|
|
97
164
|
*
|
|
98
165
|
* @param uri - Path or URI to the IMP
|
|
99
|
-
* @param options - Optional validation options
|
|
100
|
-
* @returns
|
|
166
|
+
* @param options - Optional validation options (plus `credentials` for S3)
|
|
167
|
+
* @returns `{ package, validation }` — the full parsed package and all findings.
|
|
168
|
+
* @throws If the URI cannot be read or the options are invalid.
|
|
101
169
|
*/
|
|
102
|
-
export declare function
|
|
170
|
+
export declare function validateUri(uri: string, options?: UriValidateOptions | undefined | null): ValidationResult
|