@imferno/wasm 3.0.2-fix-rule-logic-from-spec-audit.cf4b1ec → 3.0.2-fix-napi-typescript-types.043fc9b
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/imferno_wasm_bg.wasm +0 -0
- package/index.d.ts +33 -43
- package/package.json +4 -1
- package/types.d.ts +1333 -0
package/imferno_wasm_bg.wasm
CHANGED
|
Binary file
|
package/index.d.ts
CHANGED
|
@@ -1,59 +1,49 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Auto-initializing
|
|
2
|
+
* Auto-initializing imferno WASM bindings.
|
|
3
3
|
*
|
|
4
|
-
*
|
|
4
|
+
* Every function initialises the WASM module on first use, so all of them
|
|
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.
|
|
5
8
|
*/
|
|
6
9
|
|
|
7
|
-
|
|
8
|
-
export function parseAssetmapTyped(xmlContent: string): Promise<any>;
|
|
10
|
+
import type { ImfReport, Imferno, ValidateOptions, ValidationResult } from './types.js';
|
|
9
11
|
|
|
10
|
-
|
|
11
|
-
export function parseCplTyped(xmlContent: string): Promise<any>;
|
|
12
|
+
export * from './types.js';
|
|
12
13
|
|
|
13
|
-
/**
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
/** ESLint-style rules configuration */
|
|
26
|
-
rules?: Record<string, string>;
|
|
27
|
-
}
|
|
14
|
+
/**
|
|
15
|
+
* Parse and validate an IMF package. This is the recommended entry point.
|
|
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>;
|
|
28
26
|
|
|
29
|
-
/**
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
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
|
-
}
|
|
27
|
+
/**
|
|
28
|
+
* Parse an IMF package without validating it.
|
|
29
|
+
* @param files Object mapping filenames to XML string content
|
|
30
|
+
* @returns The full parsed package. Rejects if the package cannot be parsed.
|
|
31
|
+
*/
|
|
32
|
+
export function parsePackage(files: Record<string, string>): Promise<Imferno>;
|
|
46
33
|
|
|
47
34
|
/**
|
|
48
|
-
*
|
|
35
|
+
* Legacy: validate and return the lossy `ImfReport` summary. Prefer `validate`.
|
|
49
36
|
* @param files Object mapping filenames to XML string content
|
|
50
37
|
* @param options Optional validation options (spec selection, rules)
|
|
51
|
-
* @returns
|
|
38
|
+
* @returns Rejects if the package cannot be parsed.
|
|
52
39
|
*/
|
|
53
|
-
export function
|
|
40
|
+
export function buildReport(
|
|
54
41
|
files: Record<string, string>,
|
|
55
|
-
options?: ValidateOptions,
|
|
56
|
-
): Promise<
|
|
42
|
+
options?: ValidateOptions | null,
|
|
43
|
+
): Promise<ImfReport>;
|
|
44
|
+
|
|
45
|
+
/** Pretty-print an `ImfReport` as a human-readable string. */
|
|
46
|
+
export function formatReport(report: ImfReport): Promise<string>;
|
|
57
47
|
|
|
58
48
|
/** Get the library version */
|
|
59
49
|
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-napi-typescript-types.043fc9b",
|
|
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,6 +14,7 @@
|
|
|
14
14
|
"codes.d.ts",
|
|
15
15
|
"index.js",
|
|
16
16
|
"index.d.ts",
|
|
17
|
+
"types.d.ts",
|
|
17
18
|
"README.md",
|
|
18
19
|
"LICENSE"
|
|
19
20
|
],
|
|
@@ -58,6 +59,8 @@
|
|
|
58
59
|
},
|
|
59
60
|
"devDependencies": {
|
|
60
61
|
"ajv": "^8.18.0",
|
|
62
|
+
"ts-json-schema-generator": "2.9.0",
|
|
63
|
+
"typescript": "^5.9.3",
|
|
61
64
|
"vitest": "^4.0.18"
|
|
62
65
|
}
|
|
63
66
|
}
|