@imferno/node 2.3.0 → 2.3.1-beta.1c7e1ff
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 +19 -37
- package/package.json +7 -7
package/README.md
CHANGED
|
@@ -27,7 +27,7 @@ import { buildReportFromPath } from "@imferno/node";
|
|
|
27
27
|
|
|
28
28
|
const report = buildReportFromPath("./my-imp");
|
|
29
29
|
|
|
30
|
-
console.log("Compliant:", report.validation.
|
|
30
|
+
console.log("Compliant:", report.validation.is_compliant);
|
|
31
31
|
console.log("Errors:", report.validation.errors.length);
|
|
32
32
|
console.log("Warnings:", report.validation.warnings.length);
|
|
33
33
|
console.log("CPLs:", report.package.cplCount);
|
|
@@ -101,9 +101,16 @@ console.log(getVersion()); // e.g. "2.0.0"
|
|
|
101
101
|
|
|
102
102
|
| Function | Description |
|
|
103
103
|
|----------|-------------|
|
|
104
|
-
| `
|
|
105
|
-
| `
|
|
106
|
-
| `
|
|
104
|
+
| `validate(files, options?)` | Validate from in-memory XML strings (returns `ValidationResult`) |
|
|
105
|
+
| `validatePath(path, options?)` | Validate a package directory on disk (returns `ValidationResult`) |
|
|
106
|
+
| `validateUri(uri, options?)` | Validate via URI: `file://`, bare path, or `s3://` (returns `ValidationResult`) |
|
|
107
|
+
| `parsePackage(files)` | Parse without validation (returns full `Imferno` struct) |
|
|
108
|
+
| `parsePackageFromPath(path)` | Parse from disk without validation |
|
|
109
|
+
| `buildReport(files, options?)` | Legacy: validate from strings (returns `ImfReport`) |
|
|
110
|
+
| `buildReportFromPath(path, options?)` | Legacy: validate from disk (returns `ImfReport`) |
|
|
111
|
+
| `buildReportFromUri(uri, options?)` | Legacy: validate via URI (returns `ImfReport`) |
|
|
112
|
+
| `formatReport(report)` | Pretty-print a report as a human-readable string |
|
|
113
|
+
| `listRules()` | Get the full catalogue of validation rule codes |
|
|
107
114
|
| `getVersion()` | Get the library version |
|
|
108
115
|
|
|
109
116
|
### Options
|
|
@@ -115,52 +122,27 @@ console.log(getVersion()); // e.g. "2.0.0"
|
|
|
115
122
|
| `skipDiskChecks` | `boolean` | Skip file manifest and MXF checks (`buildReportFromPath` only) |
|
|
116
123
|
| `rules` | `Record<string, "error" \| "warn" \| "info" \| "off">` | ESLint-style per-rule severity overrides |
|
|
117
124
|
|
|
118
|
-
|
|
125
|
+
### Return types
|
|
119
126
|
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
The returned object has this top-level structure (all keys are camelCase):
|
|
127
|
+
`validate()` / `validatePath()` / `validateUri()` return a `ValidationResult`:
|
|
123
128
|
|
|
124
129
|
```json
|
|
125
130
|
{
|
|
126
|
-
"package": {
|
|
127
|
-
"assetMapId": "...",
|
|
128
|
-
"volumeIndex": 1,
|
|
129
|
-
"assetCount": 12,
|
|
130
|
-
"cplCount": 1,
|
|
131
|
-
"pklCount": 1,
|
|
132
|
-
"issueDate": "2024-01-15T12:00:00Z",
|
|
133
|
-
"issuer": "...",
|
|
134
|
-
"creator": "...",
|
|
135
|
-
"scmCount": 0,
|
|
136
|
-
"sidecarCount": 0,
|
|
137
|
-
"unreferencedAssets": []
|
|
138
|
-
},
|
|
139
|
-
"cpls": [
|
|
140
|
-
{
|
|
141
|
-
"id": "urn:uuid:...",
|
|
142
|
-
"title": "My Composition",
|
|
143
|
-
"applicationProfile": "App2E_2021",
|
|
144
|
-
"editRate": "24000/1001",
|
|
145
|
-
"segmentCount": 1,
|
|
146
|
-
"isSupplemental": false,
|
|
147
|
-
"sequences": [],
|
|
148
|
-
"markers": []
|
|
149
|
-
}
|
|
150
|
-
],
|
|
131
|
+
"package": { /* full parsed Imferno struct */ },
|
|
151
132
|
"validation": {
|
|
152
|
-
"
|
|
153
|
-
"
|
|
133
|
+
"is_compliant": true,
|
|
134
|
+
"is_playable": true,
|
|
154
135
|
"profile": "SMPTE",
|
|
155
136
|
"critical": [],
|
|
156
137
|
"errors": [],
|
|
157
138
|
"warnings": [],
|
|
158
|
-
"info": []
|
|
159
|
-
"timestamp": "2024-01-15T12:00:00Z"
|
|
139
|
+
"info": []
|
|
160
140
|
}
|
|
161
141
|
}
|
|
162
142
|
```
|
|
163
143
|
|
|
144
|
+
`buildReport()` / `buildReportFromPath()` / `buildReportFromUri()` return a legacy `ImfReport` summary. For new code, prefer the `validate*` functions.
|
|
145
|
+
|
|
164
146
|
## License
|
|
165
147
|
|
|
166
148
|
MIT
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@imferno/node",
|
|
3
|
-
"version": "2.3.
|
|
3
|
+
"version": "2.3.1-beta.1c7e1ff",
|
|
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",
|
|
@@ -39,12 +39,12 @@
|
|
|
39
39
|
"LICENSE"
|
|
40
40
|
],
|
|
41
41
|
"optionalDependencies": {
|
|
42
|
-
"@imferno/node-darwin-arm64": "2.3.
|
|
43
|
-
"@imferno/node-darwin-x64": "2.3.
|
|
44
|
-
"@imferno/node-linux-x64-gnu": "2.3.
|
|
45
|
-
"@imferno/node-linux-arm64-gnu": "2.3.
|
|
46
|
-
"@imferno/node-win32-x64-msvc": "2.3.
|
|
47
|
-
"@imferno/node-win32-arm64-msvc": "2.3.
|
|
42
|
+
"@imferno/node-darwin-arm64": "2.3.1-beta.1c7e1ff",
|
|
43
|
+
"@imferno/node-darwin-x64": "2.3.1-beta.1c7e1ff",
|
|
44
|
+
"@imferno/node-linux-x64-gnu": "2.3.1-beta.1c7e1ff",
|
|
45
|
+
"@imferno/node-linux-arm64-gnu": "2.3.1-beta.1c7e1ff",
|
|
46
|
+
"@imferno/node-win32-x64-msvc": "2.3.1-beta.1c7e1ff",
|
|
47
|
+
"@imferno/node-win32-arm64-msvc": "2.3.1-beta.1c7e1ff"
|
|
48
48
|
},
|
|
49
49
|
"publishConfig": {
|
|
50
50
|
"access": "public"
|