@imferno/node 3.0.2-fix-napi-typescript-types.043fc9b → 3.0.2-fix-working-group-resolutions.c9f13d5
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 +15 -45
- package/codes.d.ts +10 -0
- package/codes.js +10 -0
- package/index.d.ts +54 -122
- package/package.json +8 -22
- package/types.d.ts +0 -1333
package/README.md
CHANGED
|
@@ -22,17 +22,15 @@ Prebuilt binaries are provided for:
|
|
|
22
22
|
|
|
23
23
|
### Validate a package on disk
|
|
24
24
|
|
|
25
|
-
```
|
|
26
|
-
import {
|
|
25
|
+
```js
|
|
26
|
+
import { buildReportFromPath } from "@imferno/node";
|
|
27
27
|
|
|
28
|
-
const
|
|
28
|
+
const report = buildReportFromPath("./my-imp");
|
|
29
29
|
|
|
30
|
-
console.log("Compliant:", validation.is_compliant);
|
|
31
|
-
console.log("Errors:", validation.errors.length);
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
}
|
|
35
|
-
console.log("CPLs:", Object.keys(pkg.compositionPlaylists).length);
|
|
30
|
+
console.log("Compliant:", report.validation.is_compliant);
|
|
31
|
+
console.log("Errors:", report.validation.errors.length);
|
|
32
|
+
console.log("Warnings:", report.validation.warnings.length);
|
|
33
|
+
console.log("CPLs:", report.package.cplCount);
|
|
36
34
|
```
|
|
37
35
|
|
|
38
36
|
### Validate from a URI (filesystem or S3)
|
|
@@ -56,10 +54,10 @@ const report = buildReportFromUri("s3://my-bucket/path/to/imp/", {
|
|
|
56
54
|
|
|
57
55
|
### Validate with options
|
|
58
56
|
|
|
59
|
-
```
|
|
60
|
-
import {
|
|
57
|
+
```js
|
|
58
|
+
import { buildReportFromPath } from "@imferno/node";
|
|
61
59
|
|
|
62
|
-
const
|
|
60
|
+
const report = buildReportFromPath("./my-imp", {
|
|
63
61
|
coreSpec: "v2020",
|
|
64
62
|
app2eSpec: "v2023",
|
|
65
63
|
skipDiskChecks: true,
|
|
@@ -67,16 +65,15 @@ const options: PathValidateOptions = {
|
|
|
67
65
|
"ST2067-21:2023:7.1/AppIdMismatch": "error",
|
|
68
66
|
"IMFERNO:Package/UnreferencedAsset": "off",
|
|
69
67
|
},
|
|
70
|
-
};
|
|
71
|
-
const result = validatePath("./my-imp", options);
|
|
68
|
+
});
|
|
72
69
|
```
|
|
73
70
|
|
|
74
71
|
### Validate from in-memory strings
|
|
75
72
|
|
|
76
73
|
```js
|
|
77
|
-
import {
|
|
74
|
+
import { buildReport } from "@imferno/node";
|
|
78
75
|
|
|
79
|
-
const
|
|
76
|
+
const report = buildReport({
|
|
80
77
|
"ASSETMAP.xml": assetmapXml,
|
|
81
78
|
"PKL_abc.xml": pklXml,
|
|
82
79
|
"CPL_def.xml": cplXml,
|
|
@@ -122,34 +119,8 @@ console.log(getVersion()); // e.g. "2.0.0"
|
|
|
122
119
|
|--------|------|-------------|
|
|
123
120
|
| `coreSpec` | `"auto" \| "v2013" \| "v2016" \| "v2020"` | Core constraints spec version |
|
|
124
121
|
| `app2eSpec` | `"auto" \| "none" \| "v2014" \| "v2016" \| "v2020" \| "v2023" \| "v2026"` | Application spec version |
|
|
125
|
-
| `
|
|
126
|
-
| `
|
|
127
|
-
| `skipDiskChecks` | `boolean` | Skip file manifest and MXF checks (path / URI functions only; in-memory input never touches disk) |
|
|
128
|
-
| `credentials` | `S3Credentials \| null` | Explicit S3 credentials (URI functions only) |
|
|
129
|
-
|
|
130
|
-
### TypeScript
|
|
131
|
-
|
|
132
|
-
The package ships precise declarations, generated from the Rust types (no
|
|
133
|
-
`any`). Every function is synchronous. All value types are exported from the
|
|
134
|
-
main entry:
|
|
135
|
-
|
|
136
|
-
```ts
|
|
137
|
-
import type {
|
|
138
|
-
ValidationResult, // validate*, { package, validation }
|
|
139
|
-
Imferno, // parsePackage*, the full parsed package
|
|
140
|
-
ImfReport, // buildReport* (legacy)
|
|
141
|
-
ValidationIssue, // severity, category, code, message, location, ...
|
|
142
|
-
ValidateOptions, // coreSpec, app2eSpec, rules, aggregateRepeats
|
|
143
|
-
PathValidateOptions,
|
|
144
|
-
UriValidateOptions,
|
|
145
|
-
RuleInfo, // listRules() entries
|
|
146
|
-
} from "@imferno/node";
|
|
147
|
-
```
|
|
148
|
-
|
|
149
|
-
Field casing follows the serialised output: the validation report uses
|
|
150
|
-
snake_case (`is_compliant`, `cpl_id`), the parsed package uses camelCase at the
|
|
151
|
-
top level (`compositionPlaylists`) and the SMPTE element names inside CPLs
|
|
152
|
-
(`ContentTitle`, `SegmentList`).
|
|
122
|
+
| `skipDiskChecks` | `boolean` | Skip file manifest and MXF checks (`buildReportFromPath` only) |
|
|
123
|
+
| `rules` | `Record<string, "error" \| "warn" \| "info" \| "off">` | ESLint-style per-rule severity overrides |
|
|
153
124
|
|
|
154
125
|
### Return types
|
|
155
126
|
|
|
@@ -162,7 +133,6 @@ top level (`compositionPlaylists`) and the SMPTE element names inside CPLs
|
|
|
162
133
|
"is_compliant": true,
|
|
163
134
|
"is_playable": true,
|
|
164
135
|
"profile": "SMPTE",
|
|
165
|
-
"timestamp": "2026-01-01T12:00:00.000000+00:00",
|
|
166
136
|
"critical": [],
|
|
167
137
|
"errors": [],
|
|
168
138
|
"warnings": [],
|
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 @@ 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 @@ 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 @@ 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 @@ 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,6 +477,7 @@ 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
|
};
|
|
473
483
|
module.exports = { codes };
|
package/index.d.ts
CHANGED
|
@@ -1,170 +1,102 @@
|
|
|
1
|
-
/* auto-generated by NAPI-RS
|
|
1
|
+
/* auto-generated by NAPI-RS */
|
|
2
2
|
/* eslint-disable */
|
|
3
3
|
|
|
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
|
-
}
|
|
59
|
-
|
|
60
4
|
/**
|
|
61
|
-
*
|
|
62
|
-
* `ImfReport` summary. Prefer `validate` for new code.
|
|
63
|
-
*
|
|
64
|
-
* Disk checks are always skipped (there is no package on disk).
|
|
65
|
-
*
|
|
66
|
-
* @param files - A map of filename to XML content (e.g. `{ "ASSETMAP.xml": "..." }`)
|
|
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.
|
|
5
|
+
* Returns the imferno library version string.
|
|
70
6
|
*/
|
|
71
|
-
export declare function
|
|
7
|
+
export declare function getVersion(): string
|
|
72
8
|
|
|
73
9
|
/**
|
|
74
|
-
* Validate an IMF package
|
|
75
|
-
* `ImfReport` summary. Prefer `validatePath` for new code.
|
|
10
|
+
* Validate an IMF package from in-memory XML strings.
|
|
76
11
|
*
|
|
77
|
-
* @param
|
|
78
|
-
* @param options - Optional validation options (`coreSpec`, `app2eSpec`, `
|
|
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.
|
|
12
|
+
* @param files - A map of filename to XML content (e.g. `{ "ASSETMAP.xml": "..." }`)
|
|
13
|
+
* @param options - Optional validation options (`coreSpec`, `app2eSpec`, `rules`, etc.)
|
|
14
|
+
* @returns An `ImfReport` object with `package`, `cpls`, and `validation` fields.
|
|
81
15
|
*/
|
|
82
|
-
export declare function
|
|
16
|
+
export declare function buildReport(files: Record<string, string>, options?: any | undefined | null): any
|
|
83
17
|
|
|
84
18
|
/**
|
|
85
|
-
*
|
|
86
|
-
* as `validateUri`; prefer `validateUri` for new code.
|
|
19
|
+
* Validate an IMF package directory on disk.
|
|
87
20
|
*
|
|
88
|
-
* @param
|
|
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.
|
|
21
|
+
* @param path - Path to the IMP directory
|
|
22
|
+
* @param options - Optional validation options (`coreSpec`, `app2eSpec`, `skipDiskChecks`, `rules`, etc.)
|
|
23
|
+
* @returns An `ImfReport` object with `package`, `cpls`, and `validation` fields.
|
|
92
24
|
*/
|
|
93
|
-
export declare function
|
|
25
|
+
export declare function buildReportFromPath(path: string, options?: any | undefined | null): any
|
|
94
26
|
|
|
95
27
|
/**
|
|
96
28
|
* Pretty-print an `ImfReport` as a human-readable string.
|
|
97
29
|
*
|
|
98
|
-
* @param report - A
|
|
99
|
-
* @returns A formatted plain-text report.
|
|
100
|
-
* @throws If `report` is not a valid `ImfReport`.
|
|
30
|
+
* @param report - A previously returned `ImfReport` object
|
|
31
|
+
* @returns A formatted plain-text report string.
|
|
101
32
|
*/
|
|
102
|
-
export declare function formatReport(report:
|
|
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[]
|
|
33
|
+
export declare function formatReport(report: any): string
|
|
114
34
|
|
|
115
35
|
/**
|
|
116
|
-
* Parse an IMF package from in-memory XML strings, returning the full parsed
|
|
117
|
-
*
|
|
36
|
+
* Parse an IMF package from in-memory XML strings, returning the full parsed package.
|
|
37
|
+
*
|
|
38
|
+
* Unlike `buildReport` which returns a validation summary, this returns the
|
|
39
|
+
* complete `Imferno` struct with all essence descriptors, locales, content versions, etc.
|
|
118
40
|
*
|
|
119
41
|
* @param files - A map of filename to XML content (e.g. `{ "ASSETMAP.xml": "..." }`)
|
|
120
|
-
* @returns The full parsed
|
|
121
|
-
* @throws If the package cannot be parsed.
|
|
42
|
+
* @returns The full parsed Imferno package object.
|
|
122
43
|
*/
|
|
123
|
-
export declare function parsePackage(files: Record<string, string>):
|
|
44
|
+
export declare function parsePackage(files: Record<string, string>): any
|
|
124
45
|
|
|
125
46
|
/**
|
|
126
|
-
* Parse an IMF package directory on disk, returning the full parsed package
|
|
127
|
-
*
|
|
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.
|
|
128
51
|
*
|
|
129
52
|
* @param path - Path to the IMP directory
|
|
130
|
-
* @returns The full parsed
|
|
131
|
-
* @throws If the directory cannot be read or the package cannot be parsed.
|
|
53
|
+
* @returns The full parsed Imferno package object.
|
|
132
54
|
*/
|
|
133
|
-
export declare function parsePackageFromPath(path: string):
|
|
55
|
+
export declare function parsePackageFromPath(path: string): any
|
|
134
56
|
|
|
135
57
|
/**
|
|
136
|
-
* Parse and validate an IMF package from in-memory XML strings.
|
|
137
|
-
* recommended entry point.
|
|
58
|
+
* Parse and validate an IMF package from in-memory XML strings.
|
|
138
59
|
*
|
|
139
|
-
*
|
|
140
|
-
*
|
|
60
|
+
* This is the recommended entry point. Returns the full parsed package
|
|
61
|
+
* plus all validation findings.
|
|
141
62
|
*
|
|
142
63
|
* @param files - A map of filename to XML content
|
|
143
64
|
* @param options - Optional validation options
|
|
144
|
-
* @returns `{ package, validation }` —
|
|
145
|
-
* @throws Only if the options are invalid.
|
|
65
|
+
* @returns `{ package, validation }` — full Imferno struct + ValidationReport
|
|
146
66
|
*/
|
|
147
|
-
export declare function validate(files: Record<string, string>, options?:
|
|
67
|
+
export declare function validate(files: Record<string, string>, options?: any | undefined | null): any
|
|
148
68
|
|
|
149
69
|
/**
|
|
150
70
|
* Parse and validate an IMF package directory on disk.
|
|
151
71
|
*
|
|
152
72
|
* @param path - Path to the IMP directory
|
|
153
73
|
* @param options - Optional validation options
|
|
154
|
-
* @returns `{ package, validation }` —
|
|
155
|
-
* @throws If the directory cannot be read or the options are invalid.
|
|
74
|
+
* @returns `{ package, validation }` — full Imferno struct + ValidationReport
|
|
156
75
|
*/
|
|
157
|
-
export declare function validatePath(path: string, options?:
|
|
76
|
+
export declare function validatePath(path: string, options?: any | undefined | null): any
|
|
158
77
|
|
|
159
78
|
/**
|
|
160
79
|
* Parse and validate an IMF package from a URI.
|
|
161
80
|
*
|
|
162
|
-
* Accepts `file://` URIs, bare filesystem paths, and (when
|
|
163
|
-
* `aws-s3` feature
|
|
81
|
+
* Accepts `file://` URIs, bare filesystem paths, and (when the binary is built
|
|
82
|
+
* with the `aws-s3` feature) `s3://bucket/prefix/` URIs. The prebuilt binaries
|
|
83
|
+
* on npm include `aws-s3` enabled.
|
|
164
84
|
*
|
|
165
85
|
* @param uri - Path or URI to the IMP
|
|
166
|
-
* @param options - Optional validation options
|
|
167
|
-
* @returns `{ package, validation }` —
|
|
168
|
-
|
|
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`.
|
|
97
|
+
*
|
|
98
|
+
* @param uri - Path or URI to the IMP
|
|
99
|
+
* @param options - Optional validation options
|
|
100
|
+
* @returns An `ImfReport` object with `package`, `cpls`, and `validation` fields.
|
|
169
101
|
*/
|
|
170
|
-
export declare function
|
|
102
|
+
export declare function buildReportFromUri(uri: string, options?: any | undefined | null): any
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@imferno/node",
|
|
3
|
-
"version": "3.0.2-fix-
|
|
3
|
+
"version": "3.0.2-fix-working-group-resolutions.c9f13d5",
|
|
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",
|
|
@@ -26,31 +26,25 @@
|
|
|
26
26
|
"aarch64-unknown-linux-gnu",
|
|
27
27
|
"x86_64-pc-windows-msvc",
|
|
28
28
|
"aarch64-pc-windows-msvc"
|
|
29
|
-
]
|
|
30
|
-
"dtsHeaderFile": "dts-header.d.ts"
|
|
29
|
+
]
|
|
31
30
|
},
|
|
32
31
|
"files": [
|
|
33
32
|
"index.js",
|
|
34
33
|
"index.mjs",
|
|
35
34
|
"index.d.ts",
|
|
36
|
-
"types.d.ts",
|
|
37
35
|
"codes.js",
|
|
38
36
|
"codes.mjs",
|
|
39
37
|
"codes.d.ts",
|
|
40
38
|
"README.md",
|
|
41
39
|
"LICENSE"
|
|
42
40
|
],
|
|
43
|
-
"scripts": {
|
|
44
|
-
"build": "napi build --release",
|
|
45
|
-
"test": "vitest run"
|
|
46
|
-
},
|
|
47
41
|
"optionalDependencies": {
|
|
48
|
-
"@imferno/node-darwin-arm64": "3.0.2-fix-
|
|
49
|
-
"@imferno/node-darwin-x64": "3.0.2-fix-
|
|
50
|
-
"@imferno/node-linux-x64-gnu": "3.0.2-fix-
|
|
51
|
-
"@imferno/node-linux-arm64-gnu": "3.0.2-fix-
|
|
52
|
-
"@imferno/node-win32-x64-msvc": "3.0.2-fix-
|
|
53
|
-
"@imferno/node-win32-arm64-msvc": "3.0.2-fix-
|
|
42
|
+
"@imferno/node-darwin-arm64": "3.0.2-fix-working-group-resolutions.c9f13d5",
|
|
43
|
+
"@imferno/node-darwin-x64": "3.0.2-fix-working-group-resolutions.c9f13d5",
|
|
44
|
+
"@imferno/node-linux-x64-gnu": "3.0.2-fix-working-group-resolutions.c9f13d5",
|
|
45
|
+
"@imferno/node-linux-arm64-gnu": "3.0.2-fix-working-group-resolutions.c9f13d5",
|
|
46
|
+
"@imferno/node-win32-x64-msvc": "3.0.2-fix-working-group-resolutions.c9f13d5",
|
|
47
|
+
"@imferno/node-win32-arm64-msvc": "3.0.2-fix-working-group-resolutions.c9f13d5"
|
|
54
48
|
},
|
|
55
49
|
"publishConfig": {
|
|
56
50
|
"access": "public"
|
|
@@ -66,13 +60,5 @@
|
|
|
66
60
|
},
|
|
67
61
|
"engines": {
|
|
68
62
|
"node": ">=16.0.0"
|
|
69
|
-
},
|
|
70
|
-
"devDependencies": {
|
|
71
|
-
"@napi-rs/cli": "3.10.12",
|
|
72
|
-
"ajv": "^8.20.0",
|
|
73
|
-
"json-schema-to-typescript": "16.0.0",
|
|
74
|
-
"ts-json-schema-generator": "2.9.0",
|
|
75
|
-
"typescript": "^5.9.3",
|
|
76
|
-
"vitest": "^4.0.18"
|
|
77
63
|
}
|
|
78
64
|
}
|