@imferno/node 3.0.2-beta.67b6b7d → 3.0.2-beta.73bef25
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 +34 -3
- package/codes.d.ts +190 -0
- package/codes.js +190 -0
- package/index.d.ts +71 -6
- package/index.mjs +4 -0
- package/package.json +7 -7
- package/types.d.ts +112 -35
package/README.md
CHANGED
|
@@ -35,6 +35,26 @@ for (const issue of validation.errors) {
|
|
|
35
35
|
console.log("CPLs:", Object.keys(pkg.compositionPlaylists).length);
|
|
36
36
|
```
|
|
37
37
|
|
|
38
|
+
`validatePath` hashes every asset (several at a time, like the CLI) and
|
|
39
|
+
blocks until done. To keep the event loop running, use the async variant:
|
|
40
|
+
same arguments, same result, on the libuv thread pool.
|
|
41
|
+
|
|
42
|
+
```ts
|
|
43
|
+
import { validatePathAsync } from "@imferno/node";
|
|
44
|
+
|
|
45
|
+
const { validation } = await validatePathAsync("./my-imp");
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
`validateUriAsync`, `buildReportFromPathAsync` and `buildReportFromUriAsync`
|
|
49
|
+
work the same way.
|
|
50
|
+
|
|
51
|
+
Each running `…Async` call holds one libuv worker thread for its whole run
|
|
52
|
+
(the hashing itself runs on imferno's own threads). The pool has 4 workers
|
|
53
|
+
by default and is shared with `fs`, `dns.lookup`, `crypto` and `zlib`, so
|
|
54
|
+
more than a few concurrent validations queue each other and that I/O. To
|
|
55
|
+
run more at once, raise the pool size before Node starts it, e.g.
|
|
56
|
+
`UV_THREADPOOL_SIZE=16 node app.js` (max 1024).
|
|
57
|
+
|
|
38
58
|
### Validate from a URI (filesystem or S3)
|
|
39
59
|
|
|
40
60
|
```js
|
|
@@ -46,6 +66,8 @@ const result2 = validateUri("file:///abs/path/to/my-imp");
|
|
|
46
66
|
|
|
47
67
|
// S3 — prebuilt npm binaries include S3 support; uses the default AWS
|
|
48
68
|
// credential chain (env vars, profile, or EC2/ECS/EKS IMDS)
|
|
69
|
+
// Only the XML is read from S3: presence, size and hash checks do not run,
|
|
70
|
+
// and the result says so (IMFERNO:Package/DiskChecksNotRun).
|
|
49
71
|
const result3 = validateUri("s3://my-bucket/path/to/imp/");
|
|
50
72
|
|
|
51
73
|
// Same options object as validatePath
|
|
@@ -121,17 +143,26 @@ console.log(getVersion()); // e.g. "2.0.0"
|
|
|
121
143
|
|
|
122
144
|
| Option | Type | Description |
|
|
123
145
|
|--------|------|-------------|
|
|
124
|
-
| `coreSpec` | `"auto" \| "v2013" \| "v2016" \| "v2020"` | Core constraints
|
|
146
|
+
| `coreSpec` | `"auto" \| "v2013" \| "v2016" \| "v2020"` | Core constraints (ST 2067-2) edition; a pin also pins the editions it cites (ST 2067-3, ST 2067-201, ST 377-1/-4) |
|
|
147
|
+
| `cplSpec` | `"auto" \| "v2013" \| "v2016" \| "v2020"` | Composition Playlist (ST 2067-3) edition; wins over the one `coreSpec` implies |
|
|
148
|
+
| `iabSpec` | `"auto" \| "v2019" \| "v2021" \| "v2026"` | IAB plug-in (ST 2067-201) edition; wins over the one `coreSpec` implies |
|
|
125
149
|
| `app2eSpec` | `"auto" \| "none" \| "v2014" \| "v2016" \| "v2020" \| "v2023" \| "v2026"` | Application spec version |
|
|
126
150
|
| `rules` | `Record<string, "off" \| "info" \| "warn" \| "error" \| "critical">` | ESLint-style per-rule severity overrides |
|
|
127
151
|
| `aggregateRepeats` | `boolean` | Collapse repeated identical findings into one issue with `additional_instances` |
|
|
128
|
-
| `skipDiskChecks` | `boolean` | Skip
|
|
152
|
+
| `skipDiskChecks` | `boolean` | Skip every disk read: asset existence, size and hash checks and MXF checks (path / URI functions only; in-memory input never touches disk) |
|
|
153
|
+
| `skipHashes` | `boolean` | Skip hashing the assets; existence and size are still checked (path / URI functions only). Hashes are verified by default, like the CLI |
|
|
129
154
|
| `credentials` | `S3Credentials \| null` | Explicit S3 credentials (URI functions only) |
|
|
130
155
|
|
|
156
|
+
An option the function does not accept, or a value of the wrong type, throws.
|
|
157
|
+
`null` and `undefined` mean not set for every option in the table, also one
|
|
158
|
+
the function does not take; an unknown key throws even as `null`, so a typo
|
|
159
|
+
like `{ skipHash: null }` is caught.
|
|
160
|
+
|
|
131
161
|
### TypeScript
|
|
132
162
|
|
|
133
163
|
The package ships precise declarations, generated from the Rust types (no
|
|
134
|
-
`any`). Every function is synchronous
|
|
164
|
+
`any`). Every function is synchronous, except the `…Async` variants, which
|
|
165
|
+
return a Promise. All value types are exported from the
|
|
135
166
|
main entry:
|
|
136
167
|
|
|
137
168
|
```ts
|
package/codes.d.ts
CHANGED
|
@@ -8,14 +8,28 @@ export declare const codes: {
|
|
|
8
8
|
readonly HeaderPartitionOpen: "ST377-1/HeaderPartitionOpen";
|
|
9
9
|
readonly MissingHeaderMetadata: "ST377-1/MissingHeaderMetadata";
|
|
10
10
|
readonly StructuralComponentDurationMissing: "ST377-1/StructuralComponentDurationMissing";
|
|
11
|
+
readonly FileDescriptorEssenceContainerMissing: "ST377-1/FileDescriptorEssenceContainerMissing";
|
|
12
|
+
readonly PrefaceEssenceContainersIncomplete: "ST377-1/PrefaceEssenceContainersIncomplete";
|
|
13
|
+
readonly PartitionEssenceContainersIncomplete: "ST377-1/PartitionEssenceContainersIncomplete";
|
|
14
|
+
readonly OpenPartitionEssenceContainersIncomplete: "ST377-1/OpenPartitionEssenceContainersIncomplete";
|
|
15
|
+
readonly FooterPartitionMissing: "ST377-1/FooterPartitionMissing";
|
|
16
|
+
readonly RunInPresent: "ST377-1/RunInPresent";
|
|
17
|
+
readonly OperationalPatternMarkerBit: "ST377-1/OperationalPatternMarkerBit";
|
|
18
|
+
readonly SequenceDurationMismatch: "ST377-1/SequenceDurationMismatch";
|
|
19
|
+
readonly StaticTrackComponentDuration: "ST377-1/StaticTrackComponentDuration";
|
|
20
|
+
readonly StaticTrackDmComponentDuration: "ST377-1/StaticTrackDmComponentDuration";
|
|
11
21
|
};
|
|
12
22
|
readonly ST377_4: {
|
|
13
23
|
readonly MCALinkIDMissing: "ST377-4/MCALinkIDMissing";
|
|
14
24
|
readonly SoundfieldGroupLinkIDMismatch: "ST377-4/SoundfieldGroupLinkIDMismatch";
|
|
25
|
+
readonly MCALinkIDNotUnique: "ST377-4/MCALinkIDNotUnique";
|
|
26
|
+
readonly MCATagSymbolSyntax: "ST377-4/MCATagSymbolSyntax";
|
|
27
|
+
readonly SoundfieldGroupUnreferenced: "ST377-4/SoundfieldGroupUnreferenced";
|
|
15
28
|
};
|
|
16
29
|
readonly ST429_8: {
|
|
17
30
|
readonly SizeMismatch: "ST429-8/SizeMismatch";
|
|
18
31
|
readonly ChecksumMismatch: "ST429-8/ChecksumMismatch";
|
|
32
|
+
readonly MalformedXml: "ST429-8/MalformedXml";
|
|
19
33
|
};
|
|
20
34
|
readonly ST429_9: {
|
|
21
35
|
readonly AssetListEmpty: "ST429-9/AssetListEmpty";
|
|
@@ -30,10 +44,20 @@ export declare const codes: {
|
|
|
30
44
|
readonly AssetMapHasNoPackingList: "ST429-9/AssetMapHasNoPackingList";
|
|
31
45
|
readonly PklIdNotInAssetMap: "ST429-9/PklIdNotInAssetMap";
|
|
32
46
|
readonly AssetMapMalformedXml: "ST429-9/AssetMapMalformedXml";
|
|
47
|
+
readonly PackingListFlagNotPkl: "ST429-9/PackingListFlagNotPkl";
|
|
48
|
+
readonly VolumeCountNotOne: "ST429-9/VolumeCountNotOne";
|
|
49
|
+
readonly ChunkCountNotOne: "ST429-9/ChunkCountNotOne";
|
|
50
|
+
readonly ChunkVolumeIndexNotOne: "ST429-9/ChunkVolumeIndexNotOne";
|
|
51
|
+
readonly ChunkOffsetNotZero: "ST429-9/ChunkOffsetNotZero";
|
|
52
|
+
readonly ChunkLengthMismatch: "ST429-9/ChunkLengthMismatch";
|
|
53
|
+
readonly SymbolicLink: "ST429-9/SymbolicLink";
|
|
33
54
|
};
|
|
34
55
|
readonly ST2067_2: {
|
|
35
56
|
readonly NotImfCompositionPlaylist: "ST2067-2/NotImfCompositionPlaylist";
|
|
57
|
+
readonly ApplicationIdentificationMissing: "ST2067-2/ApplicationIdentificationMissing";
|
|
58
|
+
readonly ApplicationIdentificationDuplicate: "ST2067-2/ApplicationIdentificationDuplicate";
|
|
36
59
|
readonly PklMalformedXml: "ST2067-2/PklMalformedXml";
|
|
60
|
+
readonly NoPackingList: "ST2067-2/NoPackingList";
|
|
37
61
|
readonly NoCpls: "ST2067-2/NoCpls";
|
|
38
62
|
readonly SizeMismatch: "ST2067-2/SizeMismatch";
|
|
39
63
|
readonly FileNotFound: "ST2067-2/FileNotFound";
|
|
@@ -55,6 +79,8 @@ export declare const codes: {
|
|
|
55
79
|
readonly SoundfieldChannelCount: "ST2067-2/SoundfieldChannelCount";
|
|
56
80
|
readonly DigitalSignature: "ST2067-2/DigitalSignature";
|
|
57
81
|
readonly EssenceDescriptorList: "ST2067-2/EssenceDescriptorList";
|
|
82
|
+
readonly EssenceDescriptorContainerFormatMissing: "ST2067-2/EssenceDescriptorContainerFormatMissing";
|
|
83
|
+
readonly EssenceDescriptorDiffersFromTrackFile: "ST2067-2/EssenceDescriptorDiffersFromTrackFile";
|
|
58
84
|
readonly CplIdAssetMapMismatch: "ST2067-2/CplIdAssetMapMismatch";
|
|
59
85
|
readonly OperationalPatternNotOP1A: "ST2067-2/OperationalPatternNotOP1A";
|
|
60
86
|
readonly SoundDescriptorNotWAVEPCM: "ST2067-2/SoundDescriptorNotWAVEPCM";
|
|
@@ -72,12 +98,34 @@ export declare const codes: {
|
|
|
72
98
|
readonly SoundfieldGroupMissingMCATitleVersion: "ST2067-2/SoundfieldGroupMissingMCATitleVersion";
|
|
73
99
|
readonly SoundfieldGroupMissingMCAAudioContentKind: "ST2067-2/SoundfieldGroupMissingMCAAudioContentKind";
|
|
74
100
|
readonly SoundfieldGroupMissingMCAAudioElementKind: "ST2067-2/SoundfieldGroupMissingMCAAudioElementKind";
|
|
101
|
+
readonly MCATagNameMissing: "ST2067-2/MCATagNameMissing";
|
|
102
|
+
readonly GroupOfSoundfieldGroupsMissingMCATitle: "ST2067-2/GroupOfSoundfieldGroupsMissingMCATitle";
|
|
103
|
+
readonly GroupOfSoundfieldGroupsMissingMCATitleVersion: "ST2067-2/GroupOfSoundfieldGroupsMissingMCATitleVersion";
|
|
104
|
+
readonly GroupOfSoundfieldGroupsMissingMCAAudioContentKind: "ST2067-2/GroupOfSoundfieldGroupsMissingMCAAudioContentKind";
|
|
105
|
+
readonly GroupOfSoundfieldGroupsMissingMCAAudioElementKind: "ST2067-2/GroupOfSoundfieldGroupsMissingMCAAudioElementKind";
|
|
106
|
+
readonly AudioEssenceNotHomogeneous: "ST2067-2/AudioEssenceNotHomogeneous";
|
|
107
|
+
readonly AudioVirtualTrackLabelsDiffer: "ST2067-2/AudioVirtualTrackLabelsDiffer";
|
|
75
108
|
readonly TimedTextUCSEncodingNotUTF8: "ST2067-2/TimedTextUCSEncodingNotUTF8";
|
|
76
109
|
readonly TimedTextNamespaceNotIMSC: "ST2067-2/TimedTextNamespaceNotIMSC";
|
|
77
110
|
readonly TimedTextResourceMIMETypeUnsupported: "ST2067-2/TimedTextResourceMIMETypeUnsupported";
|
|
78
111
|
readonly TimedTextMappingKindNot0x13: "ST2067-2/TimedTextMappingKindNot0x13";
|
|
112
|
+
readonly TimedTextDataEssenceCodingPresent: "ST2067-2/TimedTextDataEssenceCodingPresent";
|
|
113
|
+
readonly TopLevelFilePackageOriginNotZero: "ST2067-2/TopLevelFilePackageOriginNotZero";
|
|
114
|
+
readonly TopLevelFilePackageFiller: "ST2067-2/TopLevelFilePackageFiller";
|
|
79
115
|
readonly MainImageVirtualTrackCount: "ST2067-2/MainImageVirtualTrackCount";
|
|
80
116
|
readonly AudioVirtualTrackMissing: "ST2067-2/AudioVirtualTrackMissing";
|
|
117
|
+
readonly TrackFileMediaType: "ST2067-2/TrackFileMediaType";
|
|
118
|
+
readonly CompositionEditRateMismatch: "ST2067-2/CompositionEditRateMismatch";
|
|
119
|
+
readonly MainImageEditRateMismatch: "ST2067-2/MainImageEditRateMismatch";
|
|
120
|
+
readonly AudioEditRateMismatch: "ST2067-2/AudioEditRateMismatch";
|
|
121
|
+
readonly ContentVersionMissing: "ST2067-2/ContentVersionMissing";
|
|
122
|
+
readonly ReferenceImageEditRateMissing: "ST2067-2/ReferenceImageEditRateMissing";
|
|
123
|
+
readonly ReferenceImageEditRateMismatch: "ST2067-2/ReferenceImageEditRateMismatch";
|
|
124
|
+
readonly AssetIdPackageUidMismatch: "ST2067-2/AssetIdPackageUidMismatch";
|
|
125
|
+
readonly TrackFileIdPackageUidMismatch: "ST2067-2/TrackFileIdPackageUidMismatch";
|
|
126
|
+
readonly PackageUidForm: "ST2067-2/PackageUidForm";
|
|
127
|
+
readonly UuidNotVersion4: "ST2067-2/UuidNotVersion4";
|
|
128
|
+
readonly AssetIdNotType5: "ST2067-2/AssetIdNotType5";
|
|
81
129
|
};
|
|
82
130
|
readonly ST2067_3: {
|
|
83
131
|
readonly ContentTitleEmpty: "ST2067-3/ContentTitleEmpty";
|
|
@@ -103,11 +151,27 @@ export declare const codes: {
|
|
|
103
151
|
readonly ResourceDuration: "ST2067-3/ResourceDuration";
|
|
104
152
|
readonly RepeatCount: "ST2067-3/RepeatCount";
|
|
105
153
|
readonly TrackFileId: "ST2067-3/TrackFileId";
|
|
154
|
+
readonly SourceEncodingMissing: "ST2067-3/SourceEncodingMissing";
|
|
106
155
|
readonly VirtualTrackContinuity: "ST2067-3/VirtualTrackContinuity";
|
|
156
|
+
readonly VirtualTrackSequenceKind: "ST2067-3/VirtualTrackSequenceKind";
|
|
157
|
+
readonly ExtensionSequenceNotSequenceType: "ST2067-3/ExtensionSequenceNotSequenceType";
|
|
158
|
+
readonly ResourceTypeMixed: "ST2067-3/ResourceTypeMixed";
|
|
159
|
+
readonly MarkerSequenceResourceType: "ST2067-3/MarkerSequenceResourceType";
|
|
107
160
|
readonly DanglingEssenceDescriptor: "ST2067-3/DanglingEssenceDescriptor";
|
|
161
|
+
readonly CplMediaType: "ST2067-3/CplMediaType";
|
|
162
|
+
readonly UniqueSequenceId: "ST2067-3/UniqueSequenceId";
|
|
163
|
+
readonly ContentMaturityRatingAgencyDuplicate: "ST2067-3/ContentMaturityRatingAgencyDuplicate";
|
|
164
|
+
readonly LocaleRegionInvalid: "ST2067-3/LocaleRegionInvalid";
|
|
165
|
+
readonly SignerWithoutSignature: "ST2067-3/SignerWithoutSignature";
|
|
166
|
+
readonly SignatureWithoutSigner: "ST2067-3/SignatureWithoutSigner";
|
|
167
|
+
readonly HashAlgorithmMissing: "ST2067-3/HashAlgorithmMissing";
|
|
168
|
+
readonly HashAlgorithmWithoutHash: "ST2067-3/HashAlgorithmWithoutHash";
|
|
169
|
+
readonly ResourceHashMismatch: "ST2067-3/ResourceHashMismatch";
|
|
108
170
|
};
|
|
109
171
|
readonly ST2067_5: {
|
|
110
172
|
readonly OperationalPatternQualifier: "ST2067-5/OperationalPatternQualifier";
|
|
173
|
+
readonly KagSizeNotOne: "ST2067-5/KagSizeNotOne";
|
|
174
|
+
readonly EssenceContainerLabelNotSingle: "ST2067-5/EssenceContainerLabelNotSingle";
|
|
111
175
|
};
|
|
112
176
|
readonly ST2067_9: {
|
|
113
177
|
readonly MalformedXml: "ST2067-9/MalformedXml";
|
|
@@ -119,6 +183,57 @@ export declare const codes: {
|
|
|
119
183
|
readonly CplNotFound: "ST2067-9/CplNotFound";
|
|
120
184
|
readonly DuplicateCplId: "ST2067-9/DuplicateCplId";
|
|
121
185
|
};
|
|
186
|
+
readonly ST2067_20: {
|
|
187
|
+
readonly ApplicationIdentification: "ST2067-20/ApplicationIdentification";
|
|
188
|
+
readonly AppIdMismatch: "ST2067-20/AppIdMismatch";
|
|
189
|
+
readonly ImageCharacteristics: "ST2067-20/ImageCharacteristics";
|
|
190
|
+
readonly TransferCharacteristic: "ST2067-20/TransferCharacteristic";
|
|
191
|
+
readonly CodingEquations: "ST2067-20/CodingEquations";
|
|
192
|
+
readonly ColorPrimaries: "ST2067-20/ColorPrimaries";
|
|
193
|
+
readonly J2KRequired: "ST2067-20/J2KRequired";
|
|
194
|
+
readonly PictureEssenceCoding: "ST2067-20/PictureEssenceCoding";
|
|
195
|
+
readonly FrameLayout: "ST2067-20/FrameLayout";
|
|
196
|
+
readonly StoredF2Offset: "ST2067-20/StoredF2Offset";
|
|
197
|
+
readonly SampledWidth: "ST2067-20/SampledWidth";
|
|
198
|
+
readonly SampledHeight: "ST2067-20/SampledHeight";
|
|
199
|
+
readonly SampledXOffset: "ST2067-20/SampledXOffset";
|
|
200
|
+
readonly SampledYOffset: "ST2067-20/SampledYOffset";
|
|
201
|
+
readonly DisplayF2Offset: "ST2067-20/DisplayF2Offset";
|
|
202
|
+
readonly AlphaTransparency: "ST2067-20/AlphaTransparency";
|
|
203
|
+
readonly ImageAlignmentOffset: "ST2067-20/ImageAlignmentOffset";
|
|
204
|
+
readonly ImageStartOffset: "ST2067-20/ImageStartOffset";
|
|
205
|
+
readonly ImageEndOffset: "ST2067-20/ImageEndOffset";
|
|
206
|
+
readonly FieldDominance: "ST2067-20/FieldDominance";
|
|
207
|
+
readonly TransferCharacteristicMissing: "ST2067-20/TransferCharacteristicMissing";
|
|
208
|
+
readonly ColorPrimariesMissing: "ST2067-20/ColorPrimariesMissing";
|
|
209
|
+
readonly CodingEquationsMissing: "ST2067-20/CodingEquationsMissing";
|
|
210
|
+
readonly RequiredPictureCompression: "ST2067-20/RequiredPictureCompression";
|
|
211
|
+
readonly ComponentMaxRef: "ST2067-20/ComponentMaxRef";
|
|
212
|
+
readonly ComponentMinRef: "ST2067-20/ComponentMinRef";
|
|
213
|
+
readonly AlphaMaxRef: "ST2067-20/AlphaMaxRef";
|
|
214
|
+
readonly AlphaMinRef: "ST2067-20/AlphaMinRef";
|
|
215
|
+
readonly ScanningDirection: "ST2067-20/ScanningDirection";
|
|
216
|
+
readonly Palette: "ST2067-20/Palette";
|
|
217
|
+
readonly PaletteLayout: "ST2067-20/PaletteLayout";
|
|
218
|
+
readonly ComponentRefValues: "ST2067-20/ComponentRefValues";
|
|
219
|
+
readonly ComponentDepth: "ST2067-20/ComponentDepth";
|
|
220
|
+
readonly VerticalSubsampling: "ST2067-20/VerticalSubsampling";
|
|
221
|
+
readonly ColorSiting: "ST2067-20/ColorSiting";
|
|
222
|
+
readonly ReversedByteOrder: "ST2067-20/ReversedByteOrder";
|
|
223
|
+
readonly PaddingBits: "ST2067-20/PaddingBits";
|
|
224
|
+
readonly AlphaSampleDepth: "ST2067-20/AlphaSampleDepth";
|
|
225
|
+
readonly RefLevelMissing: "ST2067-20/RefLevelMissing";
|
|
226
|
+
readonly HorizontalSubsampling: "ST2067-20/HorizontalSubsampling";
|
|
227
|
+
readonly BlackRefLevel: "ST2067-20/BlackRefLevel";
|
|
228
|
+
readonly WhiteRefLevel: "ST2067-20/WhiteRefLevel";
|
|
229
|
+
readonly ColorRange: "ST2067-20/ColorRange";
|
|
230
|
+
readonly Jpeg2000SubDescriptor: "ST2067-20/Jpeg2000SubDescriptor";
|
|
231
|
+
readonly CodingStyle: "ST2067-20/CodingStyle";
|
|
232
|
+
readonly J2CLayout: "ST2067-20/J2CLayout";
|
|
233
|
+
readonly J2CLayoutValue: "ST2067-20/J2CLayoutValue";
|
|
234
|
+
readonly HomogeneousImageEssence: "ST2067-20/HomogeneousImageEssence";
|
|
235
|
+
readonly SegmentDurationMultiple: "ST2067-20/SegmentDurationMultiple";
|
|
236
|
+
};
|
|
122
237
|
readonly ST2067_21: {
|
|
123
238
|
readonly ColorSystem: "ST2067-21/ColorSystem";
|
|
124
239
|
readonly BlackRefLevel: "ST2067-21/BlackRefLevel";
|
|
@@ -185,6 +300,11 @@ export declare const codes: {
|
|
|
185
300
|
readonly HtIrvParameterBMax: "ST2067-21/HtIrvParameterBMax";
|
|
186
301
|
readonly HtIrvParameterBRecommended: "ST2067-21/HtIrvParameterBRecommended";
|
|
187
302
|
readonly J2K8KResolution: "ST2067-21/J2K8KResolution";
|
|
303
|
+
readonly RefLevelMissing: "ST2067-21/RefLevelMissing";
|
|
304
|
+
readonly DisplayF2Offset: "ST2067-21/DisplayF2Offset";
|
|
305
|
+
readonly J2CLayoutValue: "ST2067-21/J2CLayoutValue";
|
|
306
|
+
readonly PictureEssenceCoding: "ST2067-21/PictureEssenceCoding";
|
|
307
|
+
readonly HtCodestreamConstraints: "ST2067-21/HtCodestreamConstraints";
|
|
188
308
|
};
|
|
189
309
|
readonly ST2067_201: {
|
|
190
310
|
readonly CodecForbidden: "ST2067-201/CodecForbidden";
|
|
@@ -211,7 +331,11 @@ export declare const codes: {
|
|
|
211
331
|
readonly SubDescriptorDuplicate: "ST2067-201/SubDescriptorDuplicate";
|
|
212
332
|
readonly MCAChannelIDForbidden: "ST2067-201/MCAChannelIDForbidden";
|
|
213
333
|
readonly EditRateNotIntegerMultiple: "ST2067-201/EditRateNotIntegerMultiple";
|
|
334
|
+
readonly ResourceEditRateNotSampleRate: "ST2067-201/ResourceEditRateNotSampleRate";
|
|
214
335
|
readonly IabChannelSubDescriptorRecommended: "ST2067-201/IabChannelSubDescriptorRecommended";
|
|
336
|
+
readonly ConformsToSpecificationsMissing: "ST2067-201/ConformsToSpecificationsMissing";
|
|
337
|
+
readonly ConformsToSpecificationsInvalid: "ST2067-201/ConformsToSpecificationsInvalid";
|
|
338
|
+
readonly EssenceNotHomogeneous: "ST2067-201/EssenceNotHomogeneous";
|
|
215
339
|
};
|
|
216
340
|
readonly ST2067_202: {
|
|
217
341
|
readonly NamespaceUriMissing: "ST2067-202/NamespaceUriMissing";
|
|
@@ -222,6 +346,64 @@ export declare const codes: {
|
|
|
222
346
|
readonly ISXDVirtualTrackMissing: "ST2067-202/ISXDVirtualTrackMissing";
|
|
223
347
|
readonly DataEssenceCodingMissing: "ST2067-202/DataEssenceCodingMissing";
|
|
224
348
|
readonly DataEssenceCodingInvalid: "ST2067-202/DataEssenceCodingInvalid";
|
|
349
|
+
readonly EssenceContainerInvalid: "ST2067-202/EssenceContainerInvalid";
|
|
350
|
+
};
|
|
351
|
+
readonly ST2067_203: {
|
|
352
|
+
readonly SequenceResourceNotTrackFile: "ST2067-203/SequenceResourceNotTrackFile";
|
|
353
|
+
readonly VirtualTrackParameterSetMissing: "ST2067-203/VirtualTrackParameterSetMissing";
|
|
354
|
+
readonly VirtualTrackParameterSetDuplicate: "ST2067-203/VirtualTrackParameterSetDuplicate";
|
|
355
|
+
readonly VirtualTrackParameterSetIdDuplicate: "ST2067-203/VirtualTrackParameterSetIdDuplicate";
|
|
356
|
+
readonly VirtualTrackParameterSetOrphaned: "ST2067-203/VirtualTrackParameterSetOrphaned";
|
|
357
|
+
readonly VirtualTrackParameterSetInvalid: "ST2067-203/VirtualTrackParameterSetInvalid";
|
|
358
|
+
readonly OperationalModeUnknown: "ST2067-203/OperationalModeUnknown";
|
|
359
|
+
readonly OperationalModeNotRecognized: "ST2067-203/OperationalModeNotRecognized";
|
|
360
|
+
readonly SoundfieldGroupSelectorDuplicate: "ST2067-203/SoundfieldGroupSelectorDuplicate";
|
|
361
|
+
readonly SoundfieldGroupSelectorResourceIdOrphaned: "ST2067-203/SoundfieldGroupSelectorResourceIdOrphaned";
|
|
362
|
+
readonly SoundfieldGroupLinkIdDuplicate: "ST2067-203/SoundfieldGroupLinkIdDuplicate";
|
|
363
|
+
readonly EditRateNotHomogeneous: "ST2067-203/EditRateNotHomogeneous";
|
|
364
|
+
readonly EditRateNotMultipleOfMainImage: "ST2067-203/EditRateNotMultipleOfMainImage";
|
|
365
|
+
readonly TrackFileNotMGA: "ST2067-203/TrackFileNotMGA";
|
|
366
|
+
readonly TrackFileAudioSampleRate: "ST2067-203/TrackFileAudioSampleRate";
|
|
367
|
+
readonly TrackFileQuantizationBits: "ST2067-203/TrackFileQuantizationBits";
|
|
368
|
+
readonly TrackFileSoundCompression: "ST2067-203/TrackFileSoundCompression";
|
|
369
|
+
readonly TrackFileReferenceItemMissing: "ST2067-203/TrackFileReferenceItemMissing";
|
|
370
|
+
readonly TrackFileNotClipWrapped: "ST2067-203/TrackFileNotClipWrapped";
|
|
371
|
+
readonly ContainerConstraintsSubDescriptorMissing: "ST2067-203/ContainerConstraintsSubDescriptorMissing";
|
|
372
|
+
readonly SADMSectionCount: "ST2067-203/SADMSectionCount";
|
|
373
|
+
readonly SADMSectionIdentifier: "ST2067-203/SADMSectionIdentifier";
|
|
374
|
+
readonly SADMSectionNotFirst: "ST2067-203/SADMSectionNotFirst";
|
|
375
|
+
readonly AudioMetadataPackUsed: "ST2067-203/AudioMetadataPackUsed";
|
|
376
|
+
readonly SADMSubDescriptorMismatch: "ST2067-203/SADMSubDescriptorMismatch";
|
|
377
|
+
readonly SADMProfileLevelULBatchMissing: "ST2067-203/SADMProfileLevelULBatchMissing";
|
|
378
|
+
readonly ForbiddenMCASubDescriptor: "ST2067-203/ForbiddenMCASubDescriptor";
|
|
379
|
+
readonly SoundfieldGroupLabelForSupplementalSection: "ST2067-203/SoundfieldGroupLabelForSupplementalSection";
|
|
380
|
+
readonly SoundfieldGroupLabelValue: "ST2067-203/SoundfieldGroupLabelValue";
|
|
381
|
+
readonly MCATagNameMissing: "ST2067-203/MCATagNameMissing";
|
|
382
|
+
readonly MCAChannelIDPresent: "ST2067-203/MCAChannelIDPresent";
|
|
383
|
+
readonly SoundfieldGroupLabelItemMissing: "ST2067-203/SoundfieldGroupLabelItemMissing";
|
|
384
|
+
readonly ResourceEditRateNotTrackFile: "ST2067-203/ResourceEditRateNotTrackFile";
|
|
385
|
+
readonly AudioSampleRateNotHomogeneous: "ST2067-203/AudioSampleRateNotHomogeneous";
|
|
386
|
+
readonly SoundfieldGroupLinkIdNotInTrackFile: "ST2067-203/SoundfieldGroupLinkIdNotInTrackFile";
|
|
387
|
+
readonly OperationalModeALabelItems: "ST2067-203/OperationalModeALabelItems";
|
|
388
|
+
};
|
|
389
|
+
readonly ST2067_204: {
|
|
390
|
+
readonly SequenceResourceNotTrackFile: "ST2067-204/SequenceResourceNotTrackFile";
|
|
391
|
+
readonly VirtualTrackParameterSetMissing: "ST2067-204/VirtualTrackParameterSetMissing";
|
|
392
|
+
readonly VirtualTrackParameterSetDuplicate: "ST2067-204/VirtualTrackParameterSetDuplicate";
|
|
393
|
+
readonly VirtualTrackParameterSetIdDuplicate: "ST2067-204/VirtualTrackParameterSetIdDuplicate";
|
|
394
|
+
readonly VirtualTrackParameterSetOrphaned: "ST2067-204/VirtualTrackParameterSetOrphaned";
|
|
395
|
+
readonly VirtualTrackParameterSetInvalid: "ST2067-204/VirtualTrackParameterSetInvalid";
|
|
396
|
+
readonly OperationalModeUnknown: "ST2067-204/OperationalModeUnknown";
|
|
397
|
+
readonly OperationalModeNotRecognized: "ST2067-204/OperationalModeNotRecognized";
|
|
398
|
+
readonly SoundfieldGroupSelectorDuplicate: "ST2067-204/SoundfieldGroupSelectorDuplicate";
|
|
399
|
+
readonly SoundfieldGroupSelectorResourceIdOrphaned: "ST2067-204/SoundfieldGroupSelectorResourceIdOrphaned";
|
|
400
|
+
readonly SoundfieldGroupLinkIdDuplicate: "ST2067-204/SoundfieldGroupLinkIdDuplicate";
|
|
401
|
+
readonly EditRateNotHomogeneous: "ST2067-204/EditRateNotHomogeneous";
|
|
402
|
+
readonly TrackFileNotWAVEPCM: "ST2067-204/TrackFileNotWAVEPCM";
|
|
403
|
+
readonly TrackFileChannelAssignment: "ST2067-204/TrackFileChannelAssignment";
|
|
404
|
+
readonly ForbiddenMCASubDescriptor: "ST2067-204/ForbiddenMCASubDescriptor";
|
|
405
|
+
readonly ResourceEditRateNotTrackFile: "ST2067-204/ResourceEditRateNotTrackFile";
|
|
406
|
+
readonly AudioSampleRateNotHomogeneous: "ST2067-204/AudioSampleRateNotHomogeneous";
|
|
225
407
|
};
|
|
226
408
|
readonly XSD: {
|
|
227
409
|
readonly ElementMissing: "XSD/ElementMissing";
|
|
@@ -233,13 +415,20 @@ export declare const codes: {
|
|
|
233
415
|
readonly NotValidated: "XSD/NotValidated";
|
|
234
416
|
};
|
|
235
417
|
readonly IMFERNO: {
|
|
418
|
+
readonly ExtensionSequenceNotValidated: "IMFERNO/ExtensionSequenceNotValidated";
|
|
419
|
+
readonly SequenceListUnreadable: "IMFERNO/SequenceListUnreadable";
|
|
420
|
+
readonly TrackFileIdentityNotValidated: "IMFERNO/TrackFileIdentityNotValidated";
|
|
236
421
|
readonly EditionAssumed: "IMFERNO/EditionAssumed";
|
|
237
422
|
readonly EditionConflict: "IMFERNO/EditionConflict";
|
|
423
|
+
readonly EditionPinned: "IMFERNO/EditionPinned";
|
|
424
|
+
readonly PinNotApplied: "IMFERNO/PinNotApplied";
|
|
238
425
|
readonly DeliveryNotChecked: "IMFERNO/DeliveryNotChecked";
|
|
426
|
+
readonly DiskChecksNotRun: "IMFERNO/DiskChecksNotRun";
|
|
239
427
|
readonly OpenFailed: "IMFERNO/OpenFailed";
|
|
240
428
|
readonly PartitionPackParseFailed: "IMFERNO/PartitionPackParseFailed";
|
|
241
429
|
readonly RegXmlConversionFailed: "IMFERNO/RegXmlConversionFailed";
|
|
242
430
|
readonly MxfHeaderUnreadable: "IMFERNO/MxfHeaderUnreadable";
|
|
431
|
+
readonly MxfFooterNotLocated: "IMFERNO/MxfFooterNotLocated";
|
|
243
432
|
readonly EssenceContainersDetected: "IMFERNO/EssenceContainersDetected";
|
|
244
433
|
readonly IoError: "IMFERNO/IoError";
|
|
245
434
|
readonly UnreferencedAsset: "IMFERNO/UnreferencedAsset";
|
|
@@ -247,6 +436,7 @@ export declare const codes: {
|
|
|
247
436
|
readonly ParseError: "IMFERNO/ParseError";
|
|
248
437
|
readonly PklParseError: "IMFERNO/PklParseError";
|
|
249
438
|
readonly XmlAssetParseError: "IMFERNO/XmlAssetParseError";
|
|
439
|
+
readonly CplUnparseable: "IMFERNO/CplUnparseable";
|
|
250
440
|
readonly XmlReadError: "IMFERNO/XmlReadError";
|
|
251
441
|
readonly ReadDirError: "IMFERNO/ReadDirError";
|
|
252
442
|
readonly DirEntryError: "IMFERNO/DirEntryError";
|
package/codes.js
CHANGED
|
@@ -8,14 +8,28 @@ const codes = {
|
|
|
8
8
|
HeaderPartitionOpen: "ST377-1/HeaderPartitionOpen",
|
|
9
9
|
MissingHeaderMetadata: "ST377-1/MissingHeaderMetadata",
|
|
10
10
|
StructuralComponentDurationMissing: "ST377-1/StructuralComponentDurationMissing",
|
|
11
|
+
FileDescriptorEssenceContainerMissing: "ST377-1/FileDescriptorEssenceContainerMissing",
|
|
12
|
+
PrefaceEssenceContainersIncomplete: "ST377-1/PrefaceEssenceContainersIncomplete",
|
|
13
|
+
PartitionEssenceContainersIncomplete: "ST377-1/PartitionEssenceContainersIncomplete",
|
|
14
|
+
OpenPartitionEssenceContainersIncomplete: "ST377-1/OpenPartitionEssenceContainersIncomplete",
|
|
15
|
+
FooterPartitionMissing: "ST377-1/FooterPartitionMissing",
|
|
16
|
+
RunInPresent: "ST377-1/RunInPresent",
|
|
17
|
+
OperationalPatternMarkerBit: "ST377-1/OperationalPatternMarkerBit",
|
|
18
|
+
SequenceDurationMismatch: "ST377-1/SequenceDurationMismatch",
|
|
19
|
+
StaticTrackComponentDuration: "ST377-1/StaticTrackComponentDuration",
|
|
20
|
+
StaticTrackDmComponentDuration: "ST377-1/StaticTrackDmComponentDuration",
|
|
11
21
|
},
|
|
12
22
|
ST377_4: {
|
|
13
23
|
MCALinkIDMissing: "ST377-4/MCALinkIDMissing",
|
|
14
24
|
SoundfieldGroupLinkIDMismatch: "ST377-4/SoundfieldGroupLinkIDMismatch",
|
|
25
|
+
MCALinkIDNotUnique: "ST377-4/MCALinkIDNotUnique",
|
|
26
|
+
MCATagSymbolSyntax: "ST377-4/MCATagSymbolSyntax",
|
|
27
|
+
SoundfieldGroupUnreferenced: "ST377-4/SoundfieldGroupUnreferenced",
|
|
15
28
|
},
|
|
16
29
|
ST429_8: {
|
|
17
30
|
SizeMismatch: "ST429-8/SizeMismatch",
|
|
18
31
|
ChecksumMismatch: "ST429-8/ChecksumMismatch",
|
|
32
|
+
MalformedXml: "ST429-8/MalformedXml",
|
|
19
33
|
},
|
|
20
34
|
ST429_9: {
|
|
21
35
|
AssetListEmpty: "ST429-9/AssetListEmpty",
|
|
@@ -30,10 +44,20 @@ const codes = {
|
|
|
30
44
|
AssetMapHasNoPackingList: "ST429-9/AssetMapHasNoPackingList",
|
|
31
45
|
PklIdNotInAssetMap: "ST429-9/PklIdNotInAssetMap",
|
|
32
46
|
AssetMapMalformedXml: "ST429-9/AssetMapMalformedXml",
|
|
47
|
+
PackingListFlagNotPkl: "ST429-9/PackingListFlagNotPkl",
|
|
48
|
+
VolumeCountNotOne: "ST429-9/VolumeCountNotOne",
|
|
49
|
+
ChunkCountNotOne: "ST429-9/ChunkCountNotOne",
|
|
50
|
+
ChunkVolumeIndexNotOne: "ST429-9/ChunkVolumeIndexNotOne",
|
|
51
|
+
ChunkOffsetNotZero: "ST429-9/ChunkOffsetNotZero",
|
|
52
|
+
ChunkLengthMismatch: "ST429-9/ChunkLengthMismatch",
|
|
53
|
+
SymbolicLink: "ST429-9/SymbolicLink",
|
|
33
54
|
},
|
|
34
55
|
ST2067_2: {
|
|
35
56
|
NotImfCompositionPlaylist: "ST2067-2/NotImfCompositionPlaylist",
|
|
57
|
+
ApplicationIdentificationMissing: "ST2067-2/ApplicationIdentificationMissing",
|
|
58
|
+
ApplicationIdentificationDuplicate: "ST2067-2/ApplicationIdentificationDuplicate",
|
|
36
59
|
PklMalformedXml: "ST2067-2/PklMalformedXml",
|
|
60
|
+
NoPackingList: "ST2067-2/NoPackingList",
|
|
37
61
|
NoCpls: "ST2067-2/NoCpls",
|
|
38
62
|
SizeMismatch: "ST2067-2/SizeMismatch",
|
|
39
63
|
FileNotFound: "ST2067-2/FileNotFound",
|
|
@@ -55,6 +79,8 @@ const codes = {
|
|
|
55
79
|
SoundfieldChannelCount: "ST2067-2/SoundfieldChannelCount",
|
|
56
80
|
DigitalSignature: "ST2067-2/DigitalSignature",
|
|
57
81
|
EssenceDescriptorList: "ST2067-2/EssenceDescriptorList",
|
|
82
|
+
EssenceDescriptorContainerFormatMissing: "ST2067-2/EssenceDescriptorContainerFormatMissing",
|
|
83
|
+
EssenceDescriptorDiffersFromTrackFile: "ST2067-2/EssenceDescriptorDiffersFromTrackFile",
|
|
58
84
|
CplIdAssetMapMismatch: "ST2067-2/CplIdAssetMapMismatch",
|
|
59
85
|
OperationalPatternNotOP1A: "ST2067-2/OperationalPatternNotOP1A",
|
|
60
86
|
SoundDescriptorNotWAVEPCM: "ST2067-2/SoundDescriptorNotWAVEPCM",
|
|
@@ -72,12 +98,34 @@ const codes = {
|
|
|
72
98
|
SoundfieldGroupMissingMCATitleVersion: "ST2067-2/SoundfieldGroupMissingMCATitleVersion",
|
|
73
99
|
SoundfieldGroupMissingMCAAudioContentKind: "ST2067-2/SoundfieldGroupMissingMCAAudioContentKind",
|
|
74
100
|
SoundfieldGroupMissingMCAAudioElementKind: "ST2067-2/SoundfieldGroupMissingMCAAudioElementKind",
|
|
101
|
+
MCATagNameMissing: "ST2067-2/MCATagNameMissing",
|
|
102
|
+
GroupOfSoundfieldGroupsMissingMCATitle: "ST2067-2/GroupOfSoundfieldGroupsMissingMCATitle",
|
|
103
|
+
GroupOfSoundfieldGroupsMissingMCATitleVersion: "ST2067-2/GroupOfSoundfieldGroupsMissingMCATitleVersion",
|
|
104
|
+
GroupOfSoundfieldGroupsMissingMCAAudioContentKind: "ST2067-2/GroupOfSoundfieldGroupsMissingMCAAudioContentKind",
|
|
105
|
+
GroupOfSoundfieldGroupsMissingMCAAudioElementKind: "ST2067-2/GroupOfSoundfieldGroupsMissingMCAAudioElementKind",
|
|
106
|
+
AudioEssenceNotHomogeneous: "ST2067-2/AudioEssenceNotHomogeneous",
|
|
107
|
+
AudioVirtualTrackLabelsDiffer: "ST2067-2/AudioVirtualTrackLabelsDiffer",
|
|
75
108
|
TimedTextUCSEncodingNotUTF8: "ST2067-2/TimedTextUCSEncodingNotUTF8",
|
|
76
109
|
TimedTextNamespaceNotIMSC: "ST2067-2/TimedTextNamespaceNotIMSC",
|
|
77
110
|
TimedTextResourceMIMETypeUnsupported: "ST2067-2/TimedTextResourceMIMETypeUnsupported",
|
|
78
111
|
TimedTextMappingKindNot0x13: "ST2067-2/TimedTextMappingKindNot0x13",
|
|
112
|
+
TimedTextDataEssenceCodingPresent: "ST2067-2/TimedTextDataEssenceCodingPresent",
|
|
113
|
+
TopLevelFilePackageOriginNotZero: "ST2067-2/TopLevelFilePackageOriginNotZero",
|
|
114
|
+
TopLevelFilePackageFiller: "ST2067-2/TopLevelFilePackageFiller",
|
|
79
115
|
MainImageVirtualTrackCount: "ST2067-2/MainImageVirtualTrackCount",
|
|
80
116
|
AudioVirtualTrackMissing: "ST2067-2/AudioVirtualTrackMissing",
|
|
117
|
+
TrackFileMediaType: "ST2067-2/TrackFileMediaType",
|
|
118
|
+
CompositionEditRateMismatch: "ST2067-2/CompositionEditRateMismatch",
|
|
119
|
+
MainImageEditRateMismatch: "ST2067-2/MainImageEditRateMismatch",
|
|
120
|
+
AudioEditRateMismatch: "ST2067-2/AudioEditRateMismatch",
|
|
121
|
+
ContentVersionMissing: "ST2067-2/ContentVersionMissing",
|
|
122
|
+
ReferenceImageEditRateMissing: "ST2067-2/ReferenceImageEditRateMissing",
|
|
123
|
+
ReferenceImageEditRateMismatch: "ST2067-2/ReferenceImageEditRateMismatch",
|
|
124
|
+
AssetIdPackageUidMismatch: "ST2067-2/AssetIdPackageUidMismatch",
|
|
125
|
+
TrackFileIdPackageUidMismatch: "ST2067-2/TrackFileIdPackageUidMismatch",
|
|
126
|
+
PackageUidForm: "ST2067-2/PackageUidForm",
|
|
127
|
+
UuidNotVersion4: "ST2067-2/UuidNotVersion4",
|
|
128
|
+
AssetIdNotType5: "ST2067-2/AssetIdNotType5",
|
|
81
129
|
},
|
|
82
130
|
ST2067_3: {
|
|
83
131
|
ContentTitleEmpty: "ST2067-3/ContentTitleEmpty",
|
|
@@ -103,11 +151,27 @@ const codes = {
|
|
|
103
151
|
ResourceDuration: "ST2067-3/ResourceDuration",
|
|
104
152
|
RepeatCount: "ST2067-3/RepeatCount",
|
|
105
153
|
TrackFileId: "ST2067-3/TrackFileId",
|
|
154
|
+
SourceEncodingMissing: "ST2067-3/SourceEncodingMissing",
|
|
106
155
|
VirtualTrackContinuity: "ST2067-3/VirtualTrackContinuity",
|
|
156
|
+
VirtualTrackSequenceKind: "ST2067-3/VirtualTrackSequenceKind",
|
|
157
|
+
ExtensionSequenceNotSequenceType: "ST2067-3/ExtensionSequenceNotSequenceType",
|
|
158
|
+
ResourceTypeMixed: "ST2067-3/ResourceTypeMixed",
|
|
159
|
+
MarkerSequenceResourceType: "ST2067-3/MarkerSequenceResourceType",
|
|
107
160
|
DanglingEssenceDescriptor: "ST2067-3/DanglingEssenceDescriptor",
|
|
161
|
+
CplMediaType: "ST2067-3/CplMediaType",
|
|
162
|
+
UniqueSequenceId: "ST2067-3/UniqueSequenceId",
|
|
163
|
+
ContentMaturityRatingAgencyDuplicate: "ST2067-3/ContentMaturityRatingAgencyDuplicate",
|
|
164
|
+
LocaleRegionInvalid: "ST2067-3/LocaleRegionInvalid",
|
|
165
|
+
SignerWithoutSignature: "ST2067-3/SignerWithoutSignature",
|
|
166
|
+
SignatureWithoutSigner: "ST2067-3/SignatureWithoutSigner",
|
|
167
|
+
HashAlgorithmMissing: "ST2067-3/HashAlgorithmMissing",
|
|
168
|
+
HashAlgorithmWithoutHash: "ST2067-3/HashAlgorithmWithoutHash",
|
|
169
|
+
ResourceHashMismatch: "ST2067-3/ResourceHashMismatch",
|
|
108
170
|
},
|
|
109
171
|
ST2067_5: {
|
|
110
172
|
OperationalPatternQualifier: "ST2067-5/OperationalPatternQualifier",
|
|
173
|
+
KagSizeNotOne: "ST2067-5/KagSizeNotOne",
|
|
174
|
+
EssenceContainerLabelNotSingle: "ST2067-5/EssenceContainerLabelNotSingle",
|
|
111
175
|
},
|
|
112
176
|
ST2067_9: {
|
|
113
177
|
MalformedXml: "ST2067-9/MalformedXml",
|
|
@@ -119,6 +183,57 @@ const codes = {
|
|
|
119
183
|
CplNotFound: "ST2067-9/CplNotFound",
|
|
120
184
|
DuplicateCplId: "ST2067-9/DuplicateCplId",
|
|
121
185
|
},
|
|
186
|
+
ST2067_20: {
|
|
187
|
+
ApplicationIdentification: "ST2067-20/ApplicationIdentification",
|
|
188
|
+
AppIdMismatch: "ST2067-20/AppIdMismatch",
|
|
189
|
+
ImageCharacteristics: "ST2067-20/ImageCharacteristics",
|
|
190
|
+
TransferCharacteristic: "ST2067-20/TransferCharacteristic",
|
|
191
|
+
CodingEquations: "ST2067-20/CodingEquations",
|
|
192
|
+
ColorPrimaries: "ST2067-20/ColorPrimaries",
|
|
193
|
+
J2KRequired: "ST2067-20/J2KRequired",
|
|
194
|
+
PictureEssenceCoding: "ST2067-20/PictureEssenceCoding",
|
|
195
|
+
FrameLayout: "ST2067-20/FrameLayout",
|
|
196
|
+
StoredF2Offset: "ST2067-20/StoredF2Offset",
|
|
197
|
+
SampledWidth: "ST2067-20/SampledWidth",
|
|
198
|
+
SampledHeight: "ST2067-20/SampledHeight",
|
|
199
|
+
SampledXOffset: "ST2067-20/SampledXOffset",
|
|
200
|
+
SampledYOffset: "ST2067-20/SampledYOffset",
|
|
201
|
+
DisplayF2Offset: "ST2067-20/DisplayF2Offset",
|
|
202
|
+
AlphaTransparency: "ST2067-20/AlphaTransparency",
|
|
203
|
+
ImageAlignmentOffset: "ST2067-20/ImageAlignmentOffset",
|
|
204
|
+
ImageStartOffset: "ST2067-20/ImageStartOffset",
|
|
205
|
+
ImageEndOffset: "ST2067-20/ImageEndOffset",
|
|
206
|
+
FieldDominance: "ST2067-20/FieldDominance",
|
|
207
|
+
TransferCharacteristicMissing: "ST2067-20/TransferCharacteristicMissing",
|
|
208
|
+
ColorPrimariesMissing: "ST2067-20/ColorPrimariesMissing",
|
|
209
|
+
CodingEquationsMissing: "ST2067-20/CodingEquationsMissing",
|
|
210
|
+
RequiredPictureCompression: "ST2067-20/RequiredPictureCompression",
|
|
211
|
+
ComponentMaxRef: "ST2067-20/ComponentMaxRef",
|
|
212
|
+
ComponentMinRef: "ST2067-20/ComponentMinRef",
|
|
213
|
+
AlphaMaxRef: "ST2067-20/AlphaMaxRef",
|
|
214
|
+
AlphaMinRef: "ST2067-20/AlphaMinRef",
|
|
215
|
+
ScanningDirection: "ST2067-20/ScanningDirection",
|
|
216
|
+
Palette: "ST2067-20/Palette",
|
|
217
|
+
PaletteLayout: "ST2067-20/PaletteLayout",
|
|
218
|
+
ComponentRefValues: "ST2067-20/ComponentRefValues",
|
|
219
|
+
ComponentDepth: "ST2067-20/ComponentDepth",
|
|
220
|
+
VerticalSubsampling: "ST2067-20/VerticalSubsampling",
|
|
221
|
+
ColorSiting: "ST2067-20/ColorSiting",
|
|
222
|
+
ReversedByteOrder: "ST2067-20/ReversedByteOrder",
|
|
223
|
+
PaddingBits: "ST2067-20/PaddingBits",
|
|
224
|
+
AlphaSampleDepth: "ST2067-20/AlphaSampleDepth",
|
|
225
|
+
RefLevelMissing: "ST2067-20/RefLevelMissing",
|
|
226
|
+
HorizontalSubsampling: "ST2067-20/HorizontalSubsampling",
|
|
227
|
+
BlackRefLevel: "ST2067-20/BlackRefLevel",
|
|
228
|
+
WhiteRefLevel: "ST2067-20/WhiteRefLevel",
|
|
229
|
+
ColorRange: "ST2067-20/ColorRange",
|
|
230
|
+
Jpeg2000SubDescriptor: "ST2067-20/Jpeg2000SubDescriptor",
|
|
231
|
+
CodingStyle: "ST2067-20/CodingStyle",
|
|
232
|
+
J2CLayout: "ST2067-20/J2CLayout",
|
|
233
|
+
J2CLayoutValue: "ST2067-20/J2CLayoutValue",
|
|
234
|
+
HomogeneousImageEssence: "ST2067-20/HomogeneousImageEssence",
|
|
235
|
+
SegmentDurationMultiple: "ST2067-20/SegmentDurationMultiple",
|
|
236
|
+
},
|
|
122
237
|
ST2067_21: {
|
|
123
238
|
ColorSystem: "ST2067-21/ColorSystem",
|
|
124
239
|
BlackRefLevel: "ST2067-21/BlackRefLevel",
|
|
@@ -185,6 +300,11 @@ const codes = {
|
|
|
185
300
|
HtIrvParameterBMax: "ST2067-21/HtIrvParameterBMax",
|
|
186
301
|
HtIrvParameterBRecommended: "ST2067-21/HtIrvParameterBRecommended",
|
|
187
302
|
J2K8KResolution: "ST2067-21/J2K8KResolution",
|
|
303
|
+
RefLevelMissing: "ST2067-21/RefLevelMissing",
|
|
304
|
+
DisplayF2Offset: "ST2067-21/DisplayF2Offset",
|
|
305
|
+
J2CLayoutValue: "ST2067-21/J2CLayoutValue",
|
|
306
|
+
PictureEssenceCoding: "ST2067-21/PictureEssenceCoding",
|
|
307
|
+
HtCodestreamConstraints: "ST2067-21/HtCodestreamConstraints",
|
|
188
308
|
},
|
|
189
309
|
ST2067_201: {
|
|
190
310
|
CodecForbidden: "ST2067-201/CodecForbidden",
|
|
@@ -211,7 +331,11 @@ const codes = {
|
|
|
211
331
|
SubDescriptorDuplicate: "ST2067-201/SubDescriptorDuplicate",
|
|
212
332
|
MCAChannelIDForbidden: "ST2067-201/MCAChannelIDForbidden",
|
|
213
333
|
EditRateNotIntegerMultiple: "ST2067-201/EditRateNotIntegerMultiple",
|
|
334
|
+
ResourceEditRateNotSampleRate: "ST2067-201/ResourceEditRateNotSampleRate",
|
|
214
335
|
IabChannelSubDescriptorRecommended: "ST2067-201/IabChannelSubDescriptorRecommended",
|
|
336
|
+
ConformsToSpecificationsMissing: "ST2067-201/ConformsToSpecificationsMissing",
|
|
337
|
+
ConformsToSpecificationsInvalid: "ST2067-201/ConformsToSpecificationsInvalid",
|
|
338
|
+
EssenceNotHomogeneous: "ST2067-201/EssenceNotHomogeneous",
|
|
215
339
|
},
|
|
216
340
|
ST2067_202: {
|
|
217
341
|
NamespaceUriMissing: "ST2067-202/NamespaceUriMissing",
|
|
@@ -222,6 +346,64 @@ const codes = {
|
|
|
222
346
|
ISXDVirtualTrackMissing: "ST2067-202/ISXDVirtualTrackMissing",
|
|
223
347
|
DataEssenceCodingMissing: "ST2067-202/DataEssenceCodingMissing",
|
|
224
348
|
DataEssenceCodingInvalid: "ST2067-202/DataEssenceCodingInvalid",
|
|
349
|
+
EssenceContainerInvalid: "ST2067-202/EssenceContainerInvalid",
|
|
350
|
+
},
|
|
351
|
+
ST2067_203: {
|
|
352
|
+
SequenceResourceNotTrackFile: "ST2067-203/SequenceResourceNotTrackFile",
|
|
353
|
+
VirtualTrackParameterSetMissing: "ST2067-203/VirtualTrackParameterSetMissing",
|
|
354
|
+
VirtualTrackParameterSetDuplicate: "ST2067-203/VirtualTrackParameterSetDuplicate",
|
|
355
|
+
VirtualTrackParameterSetIdDuplicate: "ST2067-203/VirtualTrackParameterSetIdDuplicate",
|
|
356
|
+
VirtualTrackParameterSetOrphaned: "ST2067-203/VirtualTrackParameterSetOrphaned",
|
|
357
|
+
VirtualTrackParameterSetInvalid: "ST2067-203/VirtualTrackParameterSetInvalid",
|
|
358
|
+
OperationalModeUnknown: "ST2067-203/OperationalModeUnknown",
|
|
359
|
+
OperationalModeNotRecognized: "ST2067-203/OperationalModeNotRecognized",
|
|
360
|
+
SoundfieldGroupSelectorDuplicate: "ST2067-203/SoundfieldGroupSelectorDuplicate",
|
|
361
|
+
SoundfieldGroupSelectorResourceIdOrphaned: "ST2067-203/SoundfieldGroupSelectorResourceIdOrphaned",
|
|
362
|
+
SoundfieldGroupLinkIdDuplicate: "ST2067-203/SoundfieldGroupLinkIdDuplicate",
|
|
363
|
+
EditRateNotHomogeneous: "ST2067-203/EditRateNotHomogeneous",
|
|
364
|
+
EditRateNotMultipleOfMainImage: "ST2067-203/EditRateNotMultipleOfMainImage",
|
|
365
|
+
TrackFileNotMGA: "ST2067-203/TrackFileNotMGA",
|
|
366
|
+
TrackFileAudioSampleRate: "ST2067-203/TrackFileAudioSampleRate",
|
|
367
|
+
TrackFileQuantizationBits: "ST2067-203/TrackFileQuantizationBits",
|
|
368
|
+
TrackFileSoundCompression: "ST2067-203/TrackFileSoundCompression",
|
|
369
|
+
TrackFileReferenceItemMissing: "ST2067-203/TrackFileReferenceItemMissing",
|
|
370
|
+
TrackFileNotClipWrapped: "ST2067-203/TrackFileNotClipWrapped",
|
|
371
|
+
ContainerConstraintsSubDescriptorMissing: "ST2067-203/ContainerConstraintsSubDescriptorMissing",
|
|
372
|
+
SADMSectionCount: "ST2067-203/SADMSectionCount",
|
|
373
|
+
SADMSectionIdentifier: "ST2067-203/SADMSectionIdentifier",
|
|
374
|
+
SADMSectionNotFirst: "ST2067-203/SADMSectionNotFirst",
|
|
375
|
+
AudioMetadataPackUsed: "ST2067-203/AudioMetadataPackUsed",
|
|
376
|
+
SADMSubDescriptorMismatch: "ST2067-203/SADMSubDescriptorMismatch",
|
|
377
|
+
SADMProfileLevelULBatchMissing: "ST2067-203/SADMProfileLevelULBatchMissing",
|
|
378
|
+
ForbiddenMCASubDescriptor: "ST2067-203/ForbiddenMCASubDescriptor",
|
|
379
|
+
SoundfieldGroupLabelForSupplementalSection: "ST2067-203/SoundfieldGroupLabelForSupplementalSection",
|
|
380
|
+
SoundfieldGroupLabelValue: "ST2067-203/SoundfieldGroupLabelValue",
|
|
381
|
+
MCATagNameMissing: "ST2067-203/MCATagNameMissing",
|
|
382
|
+
MCAChannelIDPresent: "ST2067-203/MCAChannelIDPresent",
|
|
383
|
+
SoundfieldGroupLabelItemMissing: "ST2067-203/SoundfieldGroupLabelItemMissing",
|
|
384
|
+
ResourceEditRateNotTrackFile: "ST2067-203/ResourceEditRateNotTrackFile",
|
|
385
|
+
AudioSampleRateNotHomogeneous: "ST2067-203/AudioSampleRateNotHomogeneous",
|
|
386
|
+
SoundfieldGroupLinkIdNotInTrackFile: "ST2067-203/SoundfieldGroupLinkIdNotInTrackFile",
|
|
387
|
+
OperationalModeALabelItems: "ST2067-203/OperationalModeALabelItems",
|
|
388
|
+
},
|
|
389
|
+
ST2067_204: {
|
|
390
|
+
SequenceResourceNotTrackFile: "ST2067-204/SequenceResourceNotTrackFile",
|
|
391
|
+
VirtualTrackParameterSetMissing: "ST2067-204/VirtualTrackParameterSetMissing",
|
|
392
|
+
VirtualTrackParameterSetDuplicate: "ST2067-204/VirtualTrackParameterSetDuplicate",
|
|
393
|
+
VirtualTrackParameterSetIdDuplicate: "ST2067-204/VirtualTrackParameterSetIdDuplicate",
|
|
394
|
+
VirtualTrackParameterSetOrphaned: "ST2067-204/VirtualTrackParameterSetOrphaned",
|
|
395
|
+
VirtualTrackParameterSetInvalid: "ST2067-204/VirtualTrackParameterSetInvalid",
|
|
396
|
+
OperationalModeUnknown: "ST2067-204/OperationalModeUnknown",
|
|
397
|
+
OperationalModeNotRecognized: "ST2067-204/OperationalModeNotRecognized",
|
|
398
|
+
SoundfieldGroupSelectorDuplicate: "ST2067-204/SoundfieldGroupSelectorDuplicate",
|
|
399
|
+
SoundfieldGroupSelectorResourceIdOrphaned: "ST2067-204/SoundfieldGroupSelectorResourceIdOrphaned",
|
|
400
|
+
SoundfieldGroupLinkIdDuplicate: "ST2067-204/SoundfieldGroupLinkIdDuplicate",
|
|
401
|
+
EditRateNotHomogeneous: "ST2067-204/EditRateNotHomogeneous",
|
|
402
|
+
TrackFileNotWAVEPCM: "ST2067-204/TrackFileNotWAVEPCM",
|
|
403
|
+
TrackFileChannelAssignment: "ST2067-204/TrackFileChannelAssignment",
|
|
404
|
+
ForbiddenMCASubDescriptor: "ST2067-204/ForbiddenMCASubDescriptor",
|
|
405
|
+
ResourceEditRateNotTrackFile: "ST2067-204/ResourceEditRateNotTrackFile",
|
|
406
|
+
AudioSampleRateNotHomogeneous: "ST2067-204/AudioSampleRateNotHomogeneous",
|
|
225
407
|
},
|
|
226
408
|
XSD: {
|
|
227
409
|
ElementMissing: "XSD/ElementMissing",
|
|
@@ -233,13 +415,20 @@ const codes = {
|
|
|
233
415
|
NotValidated: "XSD/NotValidated",
|
|
234
416
|
},
|
|
235
417
|
IMFERNO: {
|
|
418
|
+
ExtensionSequenceNotValidated: "IMFERNO/ExtensionSequenceNotValidated",
|
|
419
|
+
SequenceListUnreadable: "IMFERNO/SequenceListUnreadable",
|
|
420
|
+
TrackFileIdentityNotValidated: "IMFERNO/TrackFileIdentityNotValidated",
|
|
236
421
|
EditionAssumed: "IMFERNO/EditionAssumed",
|
|
237
422
|
EditionConflict: "IMFERNO/EditionConflict",
|
|
423
|
+
EditionPinned: "IMFERNO/EditionPinned",
|
|
424
|
+
PinNotApplied: "IMFERNO/PinNotApplied",
|
|
238
425
|
DeliveryNotChecked: "IMFERNO/DeliveryNotChecked",
|
|
426
|
+
DiskChecksNotRun: "IMFERNO/DiskChecksNotRun",
|
|
239
427
|
OpenFailed: "IMFERNO/OpenFailed",
|
|
240
428
|
PartitionPackParseFailed: "IMFERNO/PartitionPackParseFailed",
|
|
241
429
|
RegXmlConversionFailed: "IMFERNO/RegXmlConversionFailed",
|
|
242
430
|
MxfHeaderUnreadable: "IMFERNO/MxfHeaderUnreadable",
|
|
431
|
+
MxfFooterNotLocated: "IMFERNO/MxfFooterNotLocated",
|
|
243
432
|
EssenceContainersDetected: "IMFERNO/EssenceContainersDetected",
|
|
244
433
|
IoError: "IMFERNO/IoError",
|
|
245
434
|
UnreferencedAsset: "IMFERNO/UnreferencedAsset",
|
|
@@ -247,6 +436,7 @@ const codes = {
|
|
|
247
436
|
ParseError: "IMFERNO/ParseError",
|
|
248
437
|
PklParseError: "IMFERNO/PklParseError",
|
|
249
438
|
XmlAssetParseError: "IMFERNO/XmlAssetParseError",
|
|
439
|
+
CplUnparseable: "IMFERNO/CplUnparseable",
|
|
250
440
|
XmlReadError: "IMFERNO/XmlReadError",
|
|
251
441
|
ReadDirError: "IMFERNO/ReadDirError",
|
|
252
442
|
DirEntryError: "IMFERNO/DirEntryError",
|
package/index.d.ts
CHANGED
|
@@ -13,10 +13,18 @@ import type {
|
|
|
13
13
|
export * from "./types";
|
|
14
14
|
export { codes } from "./codes";
|
|
15
15
|
|
|
16
|
-
/** Options for validating a package on disk (`validatePath`, `buildReportFromPath`). */
|
|
16
|
+
/** Options for validating a package on disk (`validatePath`, `buildReportFromPath` and their `…Async` variants). */
|
|
17
17
|
export interface PathValidateOptions extends ValidateOptions {
|
|
18
|
-
/**
|
|
18
|
+
/**
|
|
19
|
+
* Skip every disk read: asset presence, size and hash checks and MXF
|
|
20
|
+
* header checks (implies `skipHashes`). Only the XML is validated. Default: `false`.
|
|
21
|
+
*/
|
|
19
22
|
skipDiskChecks?: boolean;
|
|
23
|
+
/**
|
|
24
|
+
* Skip hashing the assets against their Packing List `<Hash>`; presence and
|
|
25
|
+
* size are still checked. Hashing reads every asset. Default: `false`.
|
|
26
|
+
*/
|
|
27
|
+
skipHashes?: boolean;
|
|
20
28
|
}
|
|
21
29
|
|
|
22
30
|
/** Explicit S3 credentials for `s3://` URIs. Omit to use the default AWS credential chain. */
|
|
@@ -28,7 +36,12 @@ export interface S3Credentials {
|
|
|
28
36
|
endpoint?: string;
|
|
29
37
|
}
|
|
30
38
|
|
|
31
|
-
/**
|
|
39
|
+
/**
|
|
40
|
+
* Options for `validateUri` / `buildReportFromUri` (and their `…Async` variants).
|
|
41
|
+
* For an `s3://` URI only the XML is read: the disk checks do not run, and the
|
|
42
|
+
* result carries an `IMFERNO:Package/DiskChecksNotRun` notice unless
|
|
43
|
+
* `skipDiskChecks` is set.
|
|
44
|
+
*/
|
|
32
45
|
export interface UriValidateOptions extends PathValidateOptions {
|
|
33
46
|
/** Ignored for filesystem URIs. */
|
|
34
47
|
credentials?: S3Credentials | null;
|
|
@@ -58,13 +71,26 @@ export declare function buildReport(files: Record<string, string>, options?: Val
|
|
|
58
71
|
* Validate an IMF package directory on disk, returning the legacy
|
|
59
72
|
* `ImfReport` summary. Prefer `validatePath` for new code.
|
|
60
73
|
*
|
|
74
|
+
* Hashes the assets in parallel and blocks until done; see
|
|
75
|
+
* `buildReportFromPathAsync`.
|
|
76
|
+
*
|
|
61
77
|
* @param path - Path to the IMP directory
|
|
62
|
-
* @param options - Optional validation options (`coreSpec`, `cplSpec`, `iabSpec`, `app2eSpec`, `skipDiskChecks`, `rules`, `aggregateRepeats`)
|
|
78
|
+
* @param options - Optional validation options (`coreSpec`, `cplSpec`, `iabSpec`, `app2eSpec`, `skipDiskChecks`, `skipHashes`, `rules`, `aggregateRepeats`)
|
|
63
79
|
* @returns An `ImfReport` with `package`, `cpls`, and `validation` fields.
|
|
64
80
|
* @throws If the directory cannot be read, the package cannot be parsed, or the options are invalid.
|
|
65
81
|
*/
|
|
66
82
|
export declare function buildReportFromPath(path: string, options?: PathValidateOptions | undefined | null): ImfReport
|
|
67
83
|
|
|
84
|
+
/**
|
|
85
|
+
* `buildReportFromPath` on the libuv thread pool: the event loop keeps
|
|
86
|
+
* running while the assets are hashed.
|
|
87
|
+
*
|
|
88
|
+
* @param path - Path to the IMP directory
|
|
89
|
+
* @param options - Optional validation options, as for `buildReportFromPath`
|
|
90
|
+
* @returns A Promise of the `ImfReport`; rejects where `buildReportFromPath` throws.
|
|
91
|
+
*/
|
|
92
|
+
export declare function buildReportFromPathAsync(path: string, options?: PathValidateOptions | undefined | null): Promise<ImfReport>
|
|
93
|
+
|
|
68
94
|
/**
|
|
69
95
|
* Build the legacy `ImfReport` summary from a URI. Accepts the same URI forms
|
|
70
96
|
* as `validateUri`; prefer `validateUri` for new code.
|
|
@@ -76,6 +102,15 @@ export declare function buildReportFromPath(path: string, options?: PathValidate
|
|
|
76
102
|
*/
|
|
77
103
|
export declare function buildReportFromUri(uri: string, options?: UriValidateOptions | undefined | null): ImfReport
|
|
78
104
|
|
|
105
|
+
/**
|
|
106
|
+
* `buildReportFromUri` on the libuv thread pool.
|
|
107
|
+
*
|
|
108
|
+
* @param uri - Path or URI to the IMP
|
|
109
|
+
* @param options - Optional validation options, as for `buildReportFromUri`
|
|
110
|
+
* @returns A Promise of the `ImfReport`; rejects where `buildReportFromUri` throws.
|
|
111
|
+
*/
|
|
112
|
+
export declare function buildReportFromUriAsync(uri: string, options?: UriValidateOptions | undefined | null): Promise<ImfReport>
|
|
113
|
+
|
|
79
114
|
/**
|
|
80
115
|
* Pretty-print a validation result as a human-readable string.
|
|
81
116
|
*
|
|
@@ -139,25 +174,44 @@ export declare function toSarif(report: ValidationResult | ValidationReport): Sa
|
|
|
139
174
|
* @param files - A map of filename to XML content
|
|
140
175
|
* @param options - Optional validation options
|
|
141
176
|
* @returns `{ package, validation }` — the full parsed package and all findings.
|
|
142
|
-
* @throws Only if the options are invalid.
|
|
177
|
+
* @throws Only if the options are invalid (wrong type, unknown key).
|
|
143
178
|
*/
|
|
144
179
|
export declare function validate(files: Record<string, string>, options?: ValidateOptions | undefined | null): ValidationResult
|
|
145
180
|
|
|
146
181
|
/**
|
|
147
182
|
* Parse and validate an IMF package directory on disk.
|
|
148
183
|
*
|
|
184
|
+
* Like the CLI, checks every asset's presence and size and hashes it against
|
|
185
|
+
* its Packing List `<Hash>` unless `skipHashes` (or `skipDiskChecks`) is set.
|
|
186
|
+
* Hashing reads every asset (several at a time) and blocks until done; use
|
|
187
|
+
* `validatePathAsync` to keep the event loop running.
|
|
188
|
+
*
|
|
149
189
|
* @param path - Path to the IMP directory
|
|
150
190
|
* @param options - Optional validation options
|
|
151
191
|
* @returns `{ package, validation }` — the full parsed package and all findings.
|
|
152
|
-
* @throws If the directory cannot be read or the options are invalid
|
|
192
|
+
* @throws If the directory cannot be read or the options are invalid
|
|
193
|
+
* (wrong type, unknown key).
|
|
153
194
|
*/
|
|
154
195
|
export declare function validatePath(path: string, options?: PathValidateOptions | undefined | null): ValidationResult
|
|
155
196
|
|
|
197
|
+
/**
|
|
198
|
+
* `validatePath` on the libuv thread pool: the event loop keeps running
|
|
199
|
+
* while the assets are hashed. Same result as `validatePath`.
|
|
200
|
+
*
|
|
201
|
+
* @param path - Path to the IMP directory
|
|
202
|
+
* @param options - Optional validation options, as for `validatePath`
|
|
203
|
+
* @returns A Promise of `{ package, validation }`; rejects where `validatePath` throws.
|
|
204
|
+
*/
|
|
205
|
+
export declare function validatePathAsync(path: string, options?: PathValidateOptions | undefined | null): Promise<ValidationResult>
|
|
206
|
+
|
|
156
207
|
/**
|
|
157
208
|
* Parse and validate an IMF package from a URI.
|
|
158
209
|
*
|
|
159
210
|
* Accepts `file://` URIs, bare filesystem paths, and (when built with the
|
|
160
211
|
* `aws-s3` feature, as the prebuilt npm binaries are) `s3://bucket/prefix/`.
|
|
212
|
+
* Local packages get the disk checks of `validatePath`. An `s3://` package
|
|
213
|
+
* has only its XML read: presence, size and hash checks are not run, and the
|
|
214
|
+
* result says so with an `IMFERNO:Package/DiskChecksNotRun` notice.
|
|
161
215
|
*
|
|
162
216
|
* @param uri - Path or URI to the IMP
|
|
163
217
|
* @param options - Optional validation options (plus `credentials` for S3)
|
|
@@ -165,3 +219,14 @@ export declare function validatePath(path: string, options?: PathValidateOptions
|
|
|
165
219
|
* @throws If the URI cannot be read or the options are invalid.
|
|
166
220
|
*/
|
|
167
221
|
export declare function validateUri(uri: string, options?: UriValidateOptions | undefined | null): ValidationResult
|
|
222
|
+
|
|
223
|
+
/**
|
|
224
|
+
* `validateUri` on the libuv thread pool: the event loop keeps running
|
|
225
|
+
* while the package is read and its assets are hashed. Same result as
|
|
226
|
+
* `validateUri`.
|
|
227
|
+
*
|
|
228
|
+
* @param uri - Path or URI to the IMP
|
|
229
|
+
* @param options - Optional validation options (plus `credentials` for S3)
|
|
230
|
+
* @returns A Promise of `{ package, validation }`; rejects where `validateUri` throws.
|
|
231
|
+
*/
|
|
232
|
+
export declare function validateUriAsync(uri: string, options?: UriValidateOptions | undefined | null): Promise<ValidationResult>
|
package/index.mjs
CHANGED
|
@@ -49,12 +49,16 @@ export const {
|
|
|
49
49
|
buildReport,
|
|
50
50
|
buildReportFromPath,
|
|
51
51
|
buildReportFromUri,
|
|
52
|
+
buildReportFromPathAsync,
|
|
53
|
+
buildReportFromUriAsync,
|
|
52
54
|
formatReport,
|
|
53
55
|
parsePackage,
|
|
54
56
|
parsePackageFromPath,
|
|
55
57
|
validate,
|
|
56
58
|
validatePath,
|
|
57
59
|
validateUri,
|
|
60
|
+
validatePathAsync,
|
|
61
|
+
validateUriAsync,
|
|
58
62
|
listRules,
|
|
59
63
|
toSarif,
|
|
60
64
|
} = nativeModule;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@imferno/node",
|
|
3
|
-
"version": "3.0.2-beta.
|
|
3
|
+
"version": "3.0.2-beta.73bef25",
|
|
4
4
|
"description": "Native Node.js bindings for the imferno SMPTE ST 2067 IMF validator",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"module": "index.mjs",
|
|
@@ -45,12 +45,12 @@
|
|
|
45
45
|
"test": "vitest run"
|
|
46
46
|
},
|
|
47
47
|
"optionalDependencies": {
|
|
48
|
-
"@imferno/node-darwin-arm64": "3.0.2-beta.
|
|
49
|
-
"@imferno/node-darwin-x64": "3.0.2-beta.
|
|
50
|
-
"@imferno/node-linux-x64-gnu": "3.0.2-beta.
|
|
51
|
-
"@imferno/node-linux-arm64-gnu": "3.0.2-beta.
|
|
52
|
-
"@imferno/node-win32-x64-msvc": "3.0.2-beta.
|
|
53
|
-
"@imferno/node-win32-arm64-msvc": "3.0.2-beta.
|
|
48
|
+
"@imferno/node-darwin-arm64": "3.0.2-beta.73bef25",
|
|
49
|
+
"@imferno/node-darwin-x64": "3.0.2-beta.73bef25",
|
|
50
|
+
"@imferno/node-linux-x64-gnu": "3.0.2-beta.73bef25",
|
|
51
|
+
"@imferno/node-linux-arm64-gnu": "3.0.2-beta.73bef25",
|
|
52
|
+
"@imferno/node-win32-x64-msvc": "3.0.2-beta.73bef25",
|
|
53
|
+
"@imferno/node-win32-arm64-msvc": "3.0.2-beta.73bef25"
|
|
54
54
|
},
|
|
55
55
|
"publishConfig": {
|
|
56
56
|
"access": "public"
|
package/types.d.ts
CHANGED
|
@@ -6,6 +6,18 @@
|
|
|
6
6
|
* ship their own copy: the WASM build serialises some CPL fields in camelCase.
|
|
7
7
|
*/
|
|
8
8
|
|
|
9
|
+
export type RuleValidationReason =
|
|
10
|
+
| {
|
|
11
|
+
kind: "unknown_source";
|
|
12
|
+
variant: string;
|
|
13
|
+
}
|
|
14
|
+
| {
|
|
15
|
+
kind: "matches_nothing";
|
|
16
|
+
}
|
|
17
|
+
| {
|
|
18
|
+
hint: string;
|
|
19
|
+
kind: "unsupported_pattern";
|
|
20
|
+
};
|
|
9
21
|
/**
|
|
10
22
|
* A SMPTE IMF UUID, serialised as a bare UUID string (e.g. "0eb3d1b9-b77b-4d3f-bbe5-7c69b15dca85")
|
|
11
23
|
*/
|
|
@@ -54,9 +66,12 @@ export type Spec =
|
|
|
54
66
|
| "ST2067-3"
|
|
55
67
|
| "ST2067-5"
|
|
56
68
|
| "ST2067-9"
|
|
69
|
+
| "ST2067-20"
|
|
57
70
|
| "ST2067-21"
|
|
58
71
|
| "ST2067-201"
|
|
59
72
|
| "ST2067-202"
|
|
73
|
+
| "ST2067-203"
|
|
74
|
+
| "ST2067-204"
|
|
60
75
|
| "XSD"
|
|
61
76
|
| "IMFERNO";
|
|
62
77
|
/**
|
|
@@ -120,6 +135,7 @@ export type VideoCodec =
|
|
|
120
135
|
| "Jpeg2000Imf8k"
|
|
121
136
|
| "Jpeg2000Broadcast"
|
|
122
137
|
| "Jpeg2000Ht"
|
|
138
|
+
| "Jpeg2000HtNode"
|
|
123
139
|
| "Vc5"
|
|
124
140
|
| "Mpeg2"
|
|
125
141
|
| "H264"
|
|
@@ -206,18 +222,6 @@ export type MimeType =
|
|
|
206
222
|
* Mirrors ESLint's `"off"` / `"warn"` / `"error"` vocabulary, extended with the two IMF severity levels.
|
|
207
223
|
*/
|
|
208
224
|
export type RuleSeverity = "off" | "info" | "warn" | "error" | "critical";
|
|
209
|
-
export type RuleValidationReason =
|
|
210
|
-
| {
|
|
211
|
-
kind: "unknown_source";
|
|
212
|
-
variant: string;
|
|
213
|
-
}
|
|
214
|
-
| {
|
|
215
|
-
kind: "matches_nothing";
|
|
216
|
-
}
|
|
217
|
-
| {
|
|
218
|
-
hint: string;
|
|
219
|
-
kind: "unsupported_pattern";
|
|
220
|
-
};
|
|
221
225
|
|
|
222
226
|
/**
|
|
223
227
|
* @deprecated
|
|
@@ -228,6 +232,10 @@ export type RuleValidationReason =
|
|
|
228
232
|
export interface ImfReport {
|
|
229
233
|
cpls: CplReport[];
|
|
230
234
|
package: PackageSummary;
|
|
235
|
+
/**
|
|
236
|
+
* Keys of the `rules` option that select no rule (typos, unknown editions); they were ignored. Absent when every key matched.
|
|
237
|
+
*/
|
|
238
|
+
ruleWarnings?: RuleValidationWarning[];
|
|
231
239
|
validation: ValidationReport;
|
|
232
240
|
}
|
|
233
241
|
export interface CplReport {
|
|
@@ -318,6 +326,18 @@ export interface UnreferencedAsset {
|
|
|
318
326
|
id: string;
|
|
319
327
|
path: string;
|
|
320
328
|
}
|
|
329
|
+
/**
|
|
330
|
+
* A diagnostic about a `RulesConfig` key that the engine couldn't match.
|
|
331
|
+
*
|
|
332
|
+
* Produced by `RulesConfig::validate`. Operators can use these at config-load time to catch typos before any validation work runs.
|
|
333
|
+
*/
|
|
334
|
+
export interface RuleValidationWarning {
|
|
335
|
+
/**
|
|
336
|
+
* The configured key that triggered the warning.
|
|
337
|
+
*/
|
|
338
|
+
key: string;
|
|
339
|
+
reason: RuleValidationReason;
|
|
340
|
+
}
|
|
321
341
|
/**
|
|
322
342
|
* Comprehensive validation report
|
|
323
343
|
*/
|
|
@@ -338,6 +358,10 @@ export interface ValidationReport {
|
|
|
338
358
|
* Whether the package is compliant with base SMPTE standards
|
|
339
359
|
*/
|
|
340
360
|
is_compliant: boolean;
|
|
361
|
+
/**
|
|
362
|
+
* Whether everything in the package was validated. False when a finding says part of it was not (e.g. `IMFERNO:Cpl/ExtensionSequenceNotValidated` for S-ADM audio): then `is_compliant` only covers what was checked. A rule override that switches such a finding `off` moves it to `suppressed` but keeps this false.
|
|
363
|
+
*/
|
|
364
|
+
is_fully_validated: boolean;
|
|
341
365
|
/**
|
|
342
366
|
* Whether the package is playable despite issues
|
|
343
367
|
*/
|
|
@@ -383,13 +407,17 @@ export interface ValidationIssue {
|
|
|
383
407
|
context: {
|
|
384
408
|
[k: string]: string | undefined;
|
|
385
409
|
};
|
|
410
|
+
/**
|
|
411
|
+
* Technical detail behind the message: the values, identifiers, URIs, file paths and clause text a person needs to locate or verify the finding. Shown after the message and the suggestion.
|
|
412
|
+
*/
|
|
413
|
+
detail?: string | null;
|
|
386
414
|
/**
|
|
387
415
|
* Edition of the spec that was applied (`"2016"`; empty for single-edition pseudo-specs).
|
|
388
416
|
*/
|
|
389
417
|
edition: string;
|
|
390
418
|
location: Location;
|
|
391
419
|
/**
|
|
392
|
-
*
|
|
420
|
+
* What is wrong, in one short plain sentence for a person to read.
|
|
393
421
|
*/
|
|
394
422
|
message: string;
|
|
395
423
|
/**
|
|
@@ -401,7 +429,7 @@ export interface ValidationIssue {
|
|
|
401
429
|
spec: Spec;
|
|
402
430
|
strength: Strength;
|
|
403
431
|
/**
|
|
404
|
-
*
|
|
432
|
+
* What to do about it.
|
|
405
433
|
*/
|
|
406
434
|
suggestion?: string | null;
|
|
407
435
|
}
|
|
@@ -539,10 +567,21 @@ export interface ChunkList {
|
|
|
539
567
|
* A single file path entry in a ChunkList.
|
|
540
568
|
*/
|
|
541
569
|
export interface Chunk {
|
|
570
|
+
/**
|
|
571
|
+
* `<Length>` in bytes, when present.
|
|
572
|
+
*/
|
|
573
|
+
length?: number | null;
|
|
574
|
+
/**
|
|
575
|
+
* `<Offset>` in bytes, when present.
|
|
576
|
+
*/
|
|
577
|
+
offset?: number | null;
|
|
542
578
|
/**
|
|
543
579
|
* File path relative to the IMP root directory.
|
|
544
580
|
*/
|
|
545
581
|
path: string;
|
|
582
|
+
/**
|
|
583
|
+
* `<VolumeIndex>`; 1 when absent.
|
|
584
|
+
*/
|
|
546
585
|
volumeIndex: number;
|
|
547
586
|
}
|
|
548
587
|
/**
|
|
@@ -888,9 +927,9 @@ export interface IABEssenceDescriptor {
|
|
|
888
927
|
*/
|
|
889
928
|
ContainerFormat?: string | null;
|
|
890
929
|
/**
|
|
891
|
-
* ST 2067-201 §5.9: ElectrospatialFormulation shall
|
|
930
|
+
* ST 2067-201 §5.9: if present, ElectrospatialFormulation shall be 15 (multi-channel mode default). Kept as written: RegXML writes the enumeration as its register symbol (`ElectroSpatialFormulation_MultiChannelMode`), some writers as the number. See `IABEssenceDescriptor::electrospatial_formulation_value`.
|
|
892
931
|
*/
|
|
893
|
-
ElectrospatialFormulation?:
|
|
932
|
+
ElectrospatialFormulation?: string | null;
|
|
894
933
|
InstanceID?: string | null;
|
|
895
934
|
LinkedTrackID?: number | null;
|
|
896
935
|
/**
|
|
@@ -914,7 +953,7 @@ export interface IABSubDescriptors {
|
|
|
914
953
|
/**
|
|
915
954
|
* Presence-only stub for ST 2067-201:2026 Annex E `IABChannelSubDescriptor`.
|
|
916
955
|
*
|
|
917
|
-
* The 2026 spec defines the full item set in Table E.1 (`IABBedMetaID`, `IABChannelID`, `IABAudioDescription`, `IABAudioDescriptionText`); imferno's CPL parser only needs to count occurrences to fire the `IabChannelSubDescriptorRecommended`
|
|
956
|
+
* The 2026 spec defines the full item set in Table E.1 (`IABBedMetaID`, `IABChannelID`, `IABAudioDescription`, `IABAudioDescriptionText`); imferno's CPL parser only needs to count occurrences to fire the `IabChannelSubDescriptorRecommended` notice, so the inner shape is intentionally permissive — any nested content deserialises into the catch-all map without affecting presence.
|
|
918
957
|
*/
|
|
919
958
|
export interface IABChannelSubDescriptor {
|
|
920
959
|
/**
|
|
@@ -943,6 +982,10 @@ export interface IABSoundfieldLabelSubDescriptor {
|
|
|
943
982
|
* ISXD (Immersive Sound XML Data) essence descriptor — Dolby Atmos sidecar format
|
|
944
983
|
*/
|
|
945
984
|
export interface ISXDDataEssenceDescriptor {
|
|
985
|
+
/**
|
|
986
|
+
* ST 2067-202 §9.1: the Essence Container UL shall be the Frame Wrapped ISXD Container UL (Table 3).
|
|
987
|
+
*/
|
|
988
|
+
ContainerFormat?: string | null;
|
|
946
989
|
DataEssenceCoding?: string | null;
|
|
947
990
|
InstanceID?: string | null;
|
|
948
991
|
LinkedTrackID?: number | null;
|
|
@@ -1068,6 +1111,10 @@ export interface WAVEPCMDescriptor {
|
|
|
1068
1111
|
InstanceID?: string | null;
|
|
1069
1112
|
LinkedTrackID?: number | null;
|
|
1070
1113
|
QuantizationBits?: number | null;
|
|
1114
|
+
/**
|
|
1115
|
+
* ST 2067-2 Annex F (2013, 2016) / Annex E (2020): the edit rate of the image the audio is designed to sync to (§5.3.5 Table 6).
|
|
1116
|
+
*/
|
|
1117
|
+
ReferenceImageEditRate?: EditRate | null;
|
|
1071
1118
|
SampleRate?: EditRate | null;
|
|
1072
1119
|
SubDescriptors?: AudioSubDescriptors | null;
|
|
1073
1120
|
}
|
|
@@ -1089,6 +1136,9 @@ export interface SoundfieldGroupLabelSubDescriptor {
|
|
|
1089
1136
|
*/
|
|
1090
1137
|
RFC5646SpokenLanguage?: LanguageTag | null;
|
|
1091
1138
|
}
|
|
1139
|
+
/**
|
|
1140
|
+
* The CPL's `ExtensionProperties`: ApplicationIdentification (the Application IDs of every ST 2067-2 instance, space-separated), MaxCLL and MaxFALL.
|
|
1141
|
+
*/
|
|
1092
1142
|
export interface ExtensionProperties {
|
|
1093
1143
|
ApplicationIdentification?: string | null;
|
|
1094
1144
|
MaxCLL?: number | null;
|
|
@@ -1137,6 +1187,10 @@ export interface Segment {
|
|
|
1137
1187
|
SequenceList: SequenceList;
|
|
1138
1188
|
}
|
|
1139
1189
|
export interface SequenceList {
|
|
1190
|
+
/**
|
|
1191
|
+
* Sequences whose element imferno does not model (ST 2067-3 §6.9.3 Extension Sequences, e.g. ST 2067-203 `MGASADMSignalSequence` or ST 2067-2 `CommentarySequence`), in document order. Filled by `parse_cpl` from the source XML so their EssenceDescriptor and Track File references resolve; no other rules are applied to them.
|
|
1192
|
+
*/
|
|
1193
|
+
ExtensionSequence?: ExtensionSequence[];
|
|
1140
1194
|
ForcedNarrativeSequence?: ForcedNarrativeSequence[];
|
|
1141
1195
|
HearingImpairedCaptionsSequence?: HearingImpairedCaptionsSequence[];
|
|
1142
1196
|
IABSequence?: IABSequence[];
|
|
@@ -1146,8 +1200,13 @@ export interface SequenceList {
|
|
|
1146
1200
|
MarkerSequence?: MarkerSequence[];
|
|
1147
1201
|
SubtitlesSequence?: SubtitlesSequence[];
|
|
1148
1202
|
}
|
|
1149
|
-
|
|
1203
|
+
/**
|
|
1204
|
+
* A Sequence of a kind imferno does not model (ST 2067-3 §6.9.3 Extension Sequence). Every Sequence derives from SequenceType, so its Id, TrackId and Resources are kept; the element is named by `name` (local name) and `namespace` (namespace URI; null when the element has no namespace).
|
|
1205
|
+
*/
|
|
1206
|
+
export interface ExtensionSequence {
|
|
1150
1207
|
Id: ImfUuid;
|
|
1208
|
+
Name?: string;
|
|
1209
|
+
Namespace?: string | null;
|
|
1151
1210
|
ResourceList: ResourceList;
|
|
1152
1211
|
TrackId: ImfUuid;
|
|
1153
1212
|
}
|
|
@@ -1162,17 +1221,40 @@ export interface Resource {
|
|
|
1162
1221
|
Id: ImfUuid;
|
|
1163
1222
|
IntrinsicDuration: number;
|
|
1164
1223
|
KeyId?: ImfUuid | null;
|
|
1224
|
+
/**
|
|
1225
|
+
* `LeftEye` of a `cc:StereoImageTrackFileResourceType` resource (ST 2067-2:2013, :2016 and :2020). A stereo resource carries its SourceEncoding and TrackFileId per eye, not on the resource itself.
|
|
1226
|
+
*/
|
|
1227
|
+
LeftEye?: StereoEye | null;
|
|
1165
1228
|
Marker?: MarkerInfo[];
|
|
1166
1229
|
RepeatCount?: number | null;
|
|
1230
|
+
/**
|
|
1231
|
+
* `RightEye` of a `cc:StereoImageTrackFileResourceType` resource.
|
|
1232
|
+
*/
|
|
1233
|
+
RightEye?: StereoEye | null;
|
|
1167
1234
|
SourceDuration?: number | null;
|
|
1168
1235
|
SourceEncoding?: ImfUuid | null;
|
|
1169
1236
|
TrackFileId?: ImfUuid | null;
|
|
1170
1237
|
}
|
|
1238
|
+
/**
|
|
1239
|
+
* One eye of a stereo resource: a `cpl:TrackFileResourceType` (ST 2067-2). Only the track file reference fields are kept; the eye's timing fields are checked by the XSD layer.
|
|
1240
|
+
*/
|
|
1241
|
+
export interface StereoEye {
|
|
1242
|
+
Hash?: string | null;
|
|
1243
|
+
Id?: ImfUuid | null;
|
|
1244
|
+
KeyId?: ImfUuid | null;
|
|
1245
|
+
SourceEncoding?: ImfUuid | null;
|
|
1246
|
+
TrackFileId?: ImfUuid | null;
|
|
1247
|
+
}
|
|
1171
1248
|
export interface MarkerInfo {
|
|
1172
1249
|
Annotation?: string | null;
|
|
1173
1250
|
Label: MarkerLabelElement;
|
|
1174
1251
|
Offset: number;
|
|
1175
1252
|
}
|
|
1253
|
+
export interface ForcedNarrativeSequence {
|
|
1254
|
+
Id: ImfUuid;
|
|
1255
|
+
ResourceList: ResourceList;
|
|
1256
|
+
TrackId: ImfUuid;
|
|
1257
|
+
}
|
|
1176
1258
|
export interface HearingImpairedCaptionsSequence {
|
|
1177
1259
|
Id: ImfUuid;
|
|
1178
1260
|
ResourceList: ResourceList;
|
|
@@ -1444,32 +1526,27 @@ export interface ValidationResult {
|
|
|
1444
1526
|
rule_warnings?: RuleValidationWarning[];
|
|
1445
1527
|
validation: ValidationReport;
|
|
1446
1528
|
}
|
|
1529
|
+
|
|
1447
1530
|
/**
|
|
1448
|
-
*
|
|
1449
|
-
*
|
|
1450
|
-
*
|
|
1531
|
+
* Core constraints (ST 2067-2) edition to validate against. `"auto"` detects
|
|
1532
|
+
* it from the package and CPLs. A pinned edition also pins the editions it
|
|
1533
|
+
* cites (ST 2067-3, ST 2067-201 for IAB, ST 377-1/377-4 for MXF), over the
|
|
1534
|
+
* documents' namespaces, unless `cplSpec` / `iabSpec` pin those separately.
|
|
1451
1535
|
*/
|
|
1452
|
-
export interface RuleValidationWarning {
|
|
1453
|
-
/**
|
|
1454
|
-
* The configured key that triggered the warning.
|
|
1455
|
-
*/
|
|
1456
|
-
key: string;
|
|
1457
|
-
reason: RuleValidationReason;
|
|
1458
|
-
}
|
|
1459
|
-
|
|
1460
|
-
/** Core constraints (ST 2067-2) edition to validate against. `"auto"` detects it from the CPL. */
|
|
1461
1536
|
export type CoreSpec = "auto" | "v2013" | "v2016" | "v2020";
|
|
1462
1537
|
|
|
1463
1538
|
/**
|
|
1464
|
-
* Composition Playlist (ST 2067-3) edition to validate against
|
|
1465
|
-
* and :2020 share one namespace;
|
|
1466
|
-
* uses something only one edition
|
|
1539
|
+
* Composition Playlist (ST 2067-3) edition to validate against; wins over the
|
|
1540
|
+
* edition `coreSpec` implies. ST 2067-3:2016 and :2020 share one namespace;
|
|
1541
|
+
* `"auto"` applies the newest unless the CPL uses something only one edition
|
|
1542
|
+
* defines, and reports the choice.
|
|
1467
1543
|
*/
|
|
1468
1544
|
export type CplSpec = "auto" | "v2013" | "v2016" | "v2020";
|
|
1469
1545
|
|
|
1470
1546
|
/**
|
|
1471
|
-
* IAB plug-in (ST 2067-201) edition to validate against
|
|
1472
|
-
* one namespace; `"auto"` applies
|
|
1547
|
+
* IAB plug-in (ST 2067-201) edition to validate against; wins over the edition
|
|
1548
|
+
* `coreSpec` implies. Every edition shares one namespace; `"auto"` applies
|
|
1549
|
+
* the newest and reports the choice.
|
|
1473
1550
|
*/
|
|
1474
1551
|
export type IabSpec = "auto" | "v2019" | "v2021" | "v2026";
|
|
1475
1552
|
|