@imferno/wasm 3.0.2-fix-napi-typescript-types.043fc9b → 3.0.2-fix-working-group-resolutions.9aee1e2
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/codes.d.ts +10 -0
- package/codes.js +10 -0
- package/imferno_wasm.d.ts +5 -0
- package/imferno_wasm_bg.wasm +0 -0
- package/index.d.ts +43 -33
- package/package.json +1 -4
- package/types.d.ts +0 -1333
package/codes.d.ts
CHANGED
|
@@ -3,6 +3,11 @@ export declare const codes: {
|
|
|
3
3
|
readonly ST429_9_2014: {
|
|
4
4
|
readonly VolindexMissing: "ST429-9:2014:7/VolindexMissing";
|
|
5
5
|
readonly MalformedXml: "ST429-9:2014:7/MalformedXml";
|
|
6
|
+
readonly PathNotRelative: "ST429-9:2014:A.2/PathNotRelative";
|
|
7
|
+
readonly PathCharacters: "ST429-9:2014:A.2/PathCharacters";
|
|
8
|
+
readonly PathTooLong: "ST429-9:2014:A.2/PathTooLong";
|
|
9
|
+
readonly PathTooManySegments: "ST429-9:2014:A.2/PathTooManySegments";
|
|
10
|
+
readonly PathDuplicate: "ST429-9:2014:A.2/PathDuplicate";
|
|
6
11
|
};
|
|
7
12
|
readonly ST377_1_2011: {
|
|
8
13
|
readonly NotMxf: "ST377-1:2011:5/NotMxf";
|
|
@@ -12,6 +17,7 @@ export declare const codes: {
|
|
|
12
17
|
readonly NonHeaderFirstPartition: "ST377-1:2011:6.4/NonHeaderFirstPartition";
|
|
13
18
|
readonly HeaderPartitionOpen: "ST377-1:2011:8.3.3/HeaderPartitionOpen";
|
|
14
19
|
readonly MissingHeaderMetadata: "ST377-1:2011:8.3.3/MissingHeaderMetadata";
|
|
20
|
+
readonly StructuralComponentDurationMissing: "ST377-1:2011:B.8/StructuralComponentDurationMissing";
|
|
15
21
|
};
|
|
16
22
|
readonly ST2067_2_2020: {
|
|
17
23
|
readonly AssetMap: "ST2067-2:2020:7/AssetMap";
|
|
@@ -22,6 +28,7 @@ export declare const codes: {
|
|
|
22
28
|
readonly FileNotFound: "ST2067-2:2020:8.3/FileNotFound";
|
|
23
29
|
readonly ChecksumMismatch: "ST2067-2:2020:8.3/ChecksumMismatch";
|
|
24
30
|
readonly UnresolvedUuid: "ST2067-2:2020:7/UnresolvedUuid";
|
|
31
|
+
readonly TrackFileNotInPackage: "ST2067-2:2020:7.1/TrackFileNotInPackage";
|
|
25
32
|
readonly DuplicateUuid: "ST2067-2:2020:7/DuplicateUuid";
|
|
26
33
|
readonly IoError: "IMF:General/IoError";
|
|
27
34
|
readonly EssenceDescriptorList: "ST2067-2:2020:6.4.2/EssenceDescriptorList";
|
|
@@ -387,6 +394,8 @@ export declare const codes: {
|
|
|
387
394
|
readonly J2CLayout: "ST2067-21:2026:7.5.2/J2CLayout";
|
|
388
395
|
readonly J2KExtendedCapabilities: "ST2067-21:2026:7.5.1/J2KExtendedCapabilities";
|
|
389
396
|
readonly JPEG2000SubDescriptor: "ST2067-21:2026:7.5.1/JPEG2000SubDescriptor";
|
|
397
|
+
readonly HTIRVParameterBMax: "ST2067-21:2026:H/HT-IRV-ParameterB-Max";
|
|
398
|
+
readonly HTIRVParameterBRecommended: "ST2067-21:2026:H/HT-IRV-ParameterB-Recommended";
|
|
390
399
|
readonly J2K4KResolution: "ST2067-21:2026:7.2.5/J2K-4K-Resolution";
|
|
391
400
|
readonly J2K2KResolution: "ST2067-21:2026:7.2.5/J2K-2K-Resolution";
|
|
392
401
|
readonly J2KBCPResolution: "ST2067-21:2026:7.2.5/J2K-BCP-Resolution";
|
|
@@ -468,5 +477,6 @@ export declare const codes: {
|
|
|
468
477
|
readonly ReadDirError: "IMFERNO:Package/ReadDirError";
|
|
469
478
|
readonly DirEntryError: "IMFERNO:Package/DirEntryError";
|
|
470
479
|
readonly PathTraversal: "IMFERNO:Package/PathTraversal";
|
|
480
|
+
readonly ApplicationProfileNotValidated: "IMFERNO:Package/ApplicationProfileNotValidated";
|
|
471
481
|
}
|
|
472
482
|
};
|
package/codes.js
CHANGED
|
@@ -3,6 +3,11 @@ export 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",
|
|
6
11
|
},
|
|
7
12
|
ST377_1_2011: {
|
|
8
13
|
NotMxf: "ST377-1:2011:5/NotMxf",
|
|
@@ -12,6 +17,7 @@ export const codes = {
|
|
|
12
17
|
NonHeaderFirstPartition: "ST377-1:2011:6.4/NonHeaderFirstPartition",
|
|
13
18
|
HeaderPartitionOpen: "ST377-1:2011:8.3.3/HeaderPartitionOpen",
|
|
14
19
|
MissingHeaderMetadata: "ST377-1:2011:8.3.3/MissingHeaderMetadata",
|
|
20
|
+
StructuralComponentDurationMissing: "ST377-1:2011:B.8/StructuralComponentDurationMissing",
|
|
15
21
|
},
|
|
16
22
|
ST2067_2_2020: {
|
|
17
23
|
AssetMap: "ST2067-2:2020:7/AssetMap",
|
|
@@ -22,6 +28,7 @@ export const codes = {
|
|
|
22
28
|
FileNotFound: "ST2067-2:2020:8.3/FileNotFound",
|
|
23
29
|
ChecksumMismatch: "ST2067-2:2020:8.3/ChecksumMismatch",
|
|
24
30
|
UnresolvedUuid: "ST2067-2:2020:7/UnresolvedUuid",
|
|
31
|
+
TrackFileNotInPackage: "ST2067-2:2020:7.1/TrackFileNotInPackage",
|
|
25
32
|
DuplicateUuid: "ST2067-2:2020:7/DuplicateUuid",
|
|
26
33
|
IoError: "IMF:General/IoError",
|
|
27
34
|
EssenceDescriptorList: "ST2067-2:2020:6.4.2/EssenceDescriptorList",
|
|
@@ -387,6 +394,8 @@ export const codes = {
|
|
|
387
394
|
J2CLayout: "ST2067-21:2026:7.5.2/J2CLayout",
|
|
388
395
|
J2KExtendedCapabilities: "ST2067-21:2026:7.5.1/J2KExtendedCapabilities",
|
|
389
396
|
JPEG2000SubDescriptor: "ST2067-21:2026:7.5.1/JPEG2000SubDescriptor",
|
|
397
|
+
HTIRVParameterBMax: "ST2067-21:2026:H/HT-IRV-ParameterB-Max",
|
|
398
|
+
HTIRVParameterBRecommended: "ST2067-21:2026:H/HT-IRV-ParameterB-Recommended",
|
|
390
399
|
J2K4KResolution: "ST2067-21:2026:7.2.5/J2K-4K-Resolution",
|
|
391
400
|
J2K2KResolution: "ST2067-21:2026:7.2.5/J2K-2K-Resolution",
|
|
392
401
|
J2KBCPResolution: "ST2067-21:2026:7.2.5/J2K-BCP-Resolution",
|
|
@@ -468,5 +477,6 @@ export const codes = {
|
|
|
468
477
|
ReadDirError: "IMFERNO:Package/ReadDirError",
|
|
469
478
|
DirEntryError: "IMFERNO:Package/DirEntryError",
|
|
470
479
|
PathTraversal: "IMFERNO:Package/PathTraversal",
|
|
480
|
+
ApplicationProfileNotValidated: "IMFERNO:Package/ApplicationProfileNotValidated",
|
|
471
481
|
}
|
|
472
482
|
};
|
package/imferno_wasm.d.ts
CHANGED
|
@@ -237,6 +237,10 @@ export interface J2CLayout {
|
|
|
237
237
|
RGBAComponent?: RGBALayoutComponent[];
|
|
238
238
|
}
|
|
239
239
|
|
|
240
|
+
export interface J2KCcapi {
|
|
241
|
+
UInt16?: number[];
|
|
242
|
+
}
|
|
243
|
+
|
|
240
244
|
export interface J2KComponentSizing {
|
|
241
245
|
Ssiz?: number | null;
|
|
242
246
|
XRSiz?: number | null;
|
|
@@ -245,6 +249,7 @@ export interface J2KComponentSizing {
|
|
|
245
249
|
|
|
246
250
|
export interface J2KExtendedCapabilities {
|
|
247
251
|
Pcap?: number | null;
|
|
252
|
+
Ccapi?: J2KCcapi | null;
|
|
248
253
|
}
|
|
249
254
|
|
|
250
255
|
export interface JPEG2000SubDescriptor {
|
package/imferno_wasm_bg.wasm
CHANGED
|
Binary file
|
package/index.d.ts
CHANGED
|
@@ -1,49 +1,59 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Auto-initializing
|
|
2
|
+
* Auto-initializing IMF Parser TypeScript Definitions
|
|
3
3
|
*
|
|
4
|
-
*
|
|
5
|
-
* return Promises. Value types (`ValidationResult`, `Imferno`, `ImfReport`,
|
|
6
|
-
* `ValidateOptions`, ...) live in ./types.d.ts, generated from the Rust types
|
|
7
|
-
* by `cargo xtask generate-types-ts` and shared verbatim with @imferno/node.
|
|
4
|
+
* All functions automatically handle WASM initialization.
|
|
8
5
|
*/
|
|
9
6
|
|
|
10
|
-
|
|
7
|
+
/** Parse ASSETMAP.xml content */
|
|
8
|
+
export function parseAssetmapTyped(xmlContent: string): Promise<any>;
|
|
11
9
|
|
|
12
|
-
|
|
10
|
+
/** Parse CPL XML content */
|
|
11
|
+
export function parseCplTyped(xmlContent: string): Promise<any>;
|
|
13
12
|
|
|
14
|
-
/**
|
|
15
|
-
|
|
16
|
-
*
|
|
17
|
-
* Parse failures are reported as findings in `validation`, not thrown.
|
|
18
|
-
* @param files Object mapping filenames to XML string content
|
|
19
|
-
* @param options Optional validation options (spec selection, rules)
|
|
20
|
-
* @returns `{ package, validation }` — the full parsed package and all findings.
|
|
21
|
-
*/
|
|
22
|
-
export function validate(
|
|
23
|
-
files: Record<string, string>,
|
|
24
|
-
options?: ValidateOptions | null,
|
|
25
|
-
): Promise<ValidationResult>;
|
|
13
|
+
/** Parse PKL XML content */
|
|
14
|
+
export function parsePklTyped(xmlContent: string): Promise<any>;
|
|
26
15
|
|
|
27
|
-
/**
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
16
|
+
/** Parse VOLINDEX.xml content */
|
|
17
|
+
export function parseVolindexTyped(xmlContent: string): Promise<any>;
|
|
18
|
+
|
|
19
|
+
/** Options for the validate function */
|
|
20
|
+
export interface ValidateOptions {
|
|
21
|
+
/** Core constraints spec version: "auto" | "v2013" | "v2016" | "v2020" */
|
|
22
|
+
coreSpec?: "auto" | "v2013" | "v2016" | "v2020";
|
|
23
|
+
/** Application profile version: "auto" | "none" | "v2014" | "v2016" | "v2020" | "v2023" | "v2026" */
|
|
24
|
+
app2eSpec?: "auto" | "none" | "v2014" | "v2016" | "v2020" | "v2023" | "v2026";
|
|
25
|
+
/** ESLint-style rules configuration */
|
|
26
|
+
rules?: Record<string, string>;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
/** Result returned by the validate function */
|
|
30
|
+
export interface ValidateResult {
|
|
31
|
+
/** Validation report with issues, compliance status, and profile */
|
|
32
|
+
report: any;
|
|
33
|
+
/** Parsed Composition Playlists */
|
|
34
|
+
cpls: any[];
|
|
35
|
+
/** Parsed AssetMap (null if parsing failed) */
|
|
36
|
+
assetMap: any | null;
|
|
37
|
+
/** Parsed Packing Lists */
|
|
38
|
+
packingLists: any[];
|
|
39
|
+
/** Parsed Volume Index (null if parsing failed) */
|
|
40
|
+
volumeIndex: any | null;
|
|
41
|
+
/** Assets in the AssetMap with no CPL or SCM reference */
|
|
42
|
+
unreferencedAssets: { id: string; path: string }[];
|
|
43
|
+
/** Sidecar assets declared in SCMs */
|
|
44
|
+
declaredSidecars: { id: string; cplIds: string[] }[];
|
|
45
|
+
}
|
|
33
46
|
|
|
34
47
|
/**
|
|
35
|
-
*
|
|
48
|
+
* Validate a full IMF package and return both validation report and parsed data.
|
|
36
49
|
* @param files Object mapping filenames to XML string content
|
|
37
50
|
* @param options Optional validation options (spec selection, rules)
|
|
38
|
-
* @returns
|
|
51
|
+
* @returns Validation report + parsed package data
|
|
39
52
|
*/
|
|
40
|
-
export function
|
|
53
|
+
export function validate(
|
|
41
54
|
files: Record<string, string>,
|
|
42
|
-
options?: ValidateOptions
|
|
43
|
-
): Promise<
|
|
44
|
-
|
|
45
|
-
/** Pretty-print an `ImfReport` as a human-readable string. */
|
|
46
|
-
export function formatReport(report: ImfReport): Promise<string>;
|
|
55
|
+
options?: ValidateOptions,
|
|
56
|
+
): Promise<ValidateResult>;
|
|
47
57
|
|
|
48
58
|
/** Get the library version */
|
|
49
59
|
export function getVersion(): Promise<string>;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@imferno/wasm",
|
|
3
|
-
"version": "3.0.2-fix-
|
|
3
|
+
"version": "3.0.2-fix-working-group-resolutions.9aee1e2",
|
|
4
4
|
"description": "Fast, type-safe SMPTE ST 2067 IMF parser for JavaScript and TypeScript",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"types": "index.d.ts",
|
|
@@ -14,7 +14,6 @@
|
|
|
14
14
|
"codes.d.ts",
|
|
15
15
|
"index.js",
|
|
16
16
|
"index.d.ts",
|
|
17
|
-
"types.d.ts",
|
|
18
17
|
"README.md",
|
|
19
18
|
"LICENSE"
|
|
20
19
|
],
|
|
@@ -59,8 +58,6 @@
|
|
|
59
58
|
},
|
|
60
59
|
"devDependencies": {
|
|
61
60
|
"ajv": "^8.18.0",
|
|
62
|
-
"ts-json-schema-generator": "2.9.0",
|
|
63
|
-
"typescript": "^5.9.3",
|
|
64
61
|
"vitest": "^4.0.18"
|
|
65
62
|
}
|
|
66
63
|
}
|