@imferno/node 3.0.2-fix-review-cli-settings.b024e0d → 3.0.2-fix-review-app2e-image.6d21d8d

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 CHANGED
@@ -35,19 +35,6 @@ 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
38
  ### Validate from a URI (filesystem or S3)
52
39
 
53
40
  ```js
@@ -59,8 +46,6 @@ const result2 = validateUri("file:///abs/path/to/my-imp");
59
46
 
60
47
  // S3 — prebuilt npm binaries include S3 support; uses the default AWS
61
48
  // credential chain (env vars, profile, or EC2/ECS/EKS IMDS)
62
- // Only the XML is read from S3: presence, size and hash checks do not run,
63
- // and the result says so (IMFERNO:Package/DiskChecksNotRun).
64
49
  const result3 = validateUri("s3://my-bucket/path/to/imp/");
65
50
 
66
51
  // Same options object as validatePath
@@ -142,18 +127,13 @@ console.log(getVersion()); // e.g. "2.0.0"
142
127
  | `app2eSpec` | `"auto" \| "none" \| "v2014" \| "v2016" \| "v2020" \| "v2023" \| "v2026"` | Application spec version |
143
128
  | `rules` | `Record<string, "off" \| "info" \| "warn" \| "error" \| "critical">` | ESLint-style per-rule severity overrides |
144
129
  | `aggregateRepeats` | `boolean` | Collapse repeated identical findings into one issue with `additional_instances` |
145
- | `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) |
146
- | `skipHashes` | `boolean` | Skip hashing the assets; existence and size are still checked (path / URI functions only). Hashes are verified by default, like the CLI |
130
+ | `skipDiskChecks` | `boolean` | Skip file manifest and MXF checks (path / URI functions only; in-memory input never touches disk) |
147
131
  | `credentials` | `S3Credentials \| null` | Explicit S3 credentials (URI functions only) |
148
132
 
149
- An option the function does not accept, or a value of the wrong type, throws
150
- (`null` and `undefined` mean not set, for every key).
151
-
152
133
  ### TypeScript
153
134
 
154
135
  The package ships precise declarations, generated from the Rust types (no
155
- `any`). Every function is synchronous, except the `…Async` variants, which
156
- return a Promise. All value types are exported from the
136
+ `any`). Every function is synchronous. All value types are exported from the
157
137
  main entry:
158
138
 
159
139
  ```ts
package/codes.d.ts CHANGED
@@ -195,6 +195,11 @@ export declare const codes: {
195
195
  readonly HtIrvParameterBMax: "ST2067-21/HtIrvParameterBMax";
196
196
  readonly HtIrvParameterBRecommended: "ST2067-21/HtIrvParameterBRecommended";
197
197
  readonly J2K8KResolution: "ST2067-21/J2K8KResolution";
198
+ readonly RefLevelMissing: "ST2067-21/RefLevelMissing";
199
+ readonly DisplayF2Offset: "ST2067-21/DisplayF2Offset";
200
+ readonly J2CLayoutValue: "ST2067-21/J2CLayoutValue";
201
+ readonly PictureEssenceCoding: "ST2067-21/PictureEssenceCoding";
202
+ readonly HtCodestreamConstraints: "ST2067-21/HtCodestreamConstraints";
198
203
  };
199
204
  readonly ST2067_201: {
200
205
  readonly CodecForbidden: "ST2067-201/CodecForbidden";
@@ -248,7 +253,6 @@ export declare const codes: {
248
253
  readonly EditionPinned: "IMFERNO/EditionPinned";
249
254
  readonly PinNotApplied: "IMFERNO/PinNotApplied";
250
255
  readonly DeliveryNotChecked: "IMFERNO/DeliveryNotChecked";
251
- readonly DiskChecksNotRun: "IMFERNO/DiskChecksNotRun";
252
256
  readonly OpenFailed: "IMFERNO/OpenFailed";
253
257
  readonly PartitionPackParseFailed: "IMFERNO/PartitionPackParseFailed";
254
258
  readonly RegXmlConversionFailed: "IMFERNO/RegXmlConversionFailed";
package/codes.js CHANGED
@@ -195,6 +195,11 @@ const codes = {
195
195
  HtIrvParameterBMax: "ST2067-21/HtIrvParameterBMax",
196
196
  HtIrvParameterBRecommended: "ST2067-21/HtIrvParameterBRecommended",
197
197
  J2K8KResolution: "ST2067-21/J2K8KResolution",
198
+ RefLevelMissing: "ST2067-21/RefLevelMissing",
199
+ DisplayF2Offset: "ST2067-21/DisplayF2Offset",
200
+ J2CLayoutValue: "ST2067-21/J2CLayoutValue",
201
+ PictureEssenceCoding: "ST2067-21/PictureEssenceCoding",
202
+ HtCodestreamConstraints: "ST2067-21/HtCodestreamConstraints",
198
203
  },
199
204
  ST2067_201: {
200
205
  CodecForbidden: "ST2067-201/CodecForbidden",
@@ -248,7 +253,6 @@ const codes = {
248
253
  EditionPinned: "IMFERNO/EditionPinned",
249
254
  PinNotApplied: "IMFERNO/PinNotApplied",
250
255
  DeliveryNotChecked: "IMFERNO/DeliveryNotChecked",
251
- DiskChecksNotRun: "IMFERNO/DiskChecksNotRun",
252
256
  OpenFailed: "IMFERNO/OpenFailed",
253
257
  PartitionPackParseFailed: "IMFERNO/PartitionPackParseFailed",
254
258
  RegXmlConversionFailed: "IMFERNO/RegXmlConversionFailed",
package/index.d.ts CHANGED
@@ -13,18 +13,10 @@ 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` and their `…Async` variants). */
16
+ /** Options for validating a package on disk (`validatePath`, `buildReportFromPath`). */
17
17
  export interface PathValidateOptions extends ValidateOptions {
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
- */
18
+ /** Skip file-manifest (size/presence) and MXF header checks. Default: `false`. */
22
19
  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;
28
20
  }
29
21
 
30
22
  /** Explicit S3 credentials for `s3://` URIs. Omit to use the default AWS credential chain. */
@@ -36,12 +28,7 @@ export interface S3Credentials {
36
28
  endpoint?: string;
37
29
  }
38
30
 
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
- */
31
+ /** Options for `validateUri` / `buildReportFromUri`. */
45
32
  export interface UriValidateOptions extends PathValidateOptions {
46
33
  /** Ignored for filesystem URIs. */
47
34
  credentials?: S3Credentials | null;
@@ -71,26 +58,13 @@ export declare function buildReport(files: Record<string, string>, options?: Val
71
58
  * Validate an IMF package directory on disk, returning the legacy
72
59
  * `ImfReport` summary. Prefer `validatePath` for new code.
73
60
  *
74
- * Hashes the assets in parallel and blocks until done; see
75
- * `buildReportFromPathAsync`.
76
- *
77
61
  * @param path - Path to the IMP directory
78
- * @param options - Optional validation options (`coreSpec`, `cplSpec`, `iabSpec`, `app2eSpec`, `skipDiskChecks`, `skipHashes`, `rules`, `aggregateRepeats`)
62
+ * @param options - Optional validation options (`coreSpec`, `cplSpec`, `iabSpec`, `app2eSpec`, `skipDiskChecks`, `rules`, `aggregateRepeats`)
79
63
  * @returns An `ImfReport` with `package`, `cpls`, and `validation` fields.
80
64
  * @throws If the directory cannot be read, the package cannot be parsed, or the options are invalid.
81
65
  */
82
66
  export declare function buildReportFromPath(path: string, options?: PathValidateOptions | undefined | null): ImfReport
83
67
 
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
-
94
68
  /**
95
69
  * Build the legacy `ImfReport` summary from a URI. Accepts the same URI forms
96
70
  * as `validateUri`; prefer `validateUri` for new code.
@@ -102,15 +76,6 @@ export declare function buildReportFromPathAsync(path: string, options?: PathVal
102
76
  */
103
77
  export declare function buildReportFromUri(uri: string, options?: UriValidateOptions | undefined | null): ImfReport
104
78
 
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
-
114
79
  /**
115
80
  * Pretty-print a validation result as a human-readable string.
116
81
  *
@@ -174,44 +139,25 @@ export declare function toSarif(report: ValidationResult | ValidationReport): Sa
174
139
  * @param files - A map of filename to XML content
175
140
  * @param options - Optional validation options
176
141
  * @returns `{ package, validation }` — the full parsed package and all findings.
177
- * @throws Only if the options are invalid (wrong type, unknown key).
142
+ * @throws Only if the options are invalid.
178
143
  */
179
144
  export declare function validate(files: Record<string, string>, options?: ValidateOptions | undefined | null): ValidationResult
180
145
 
181
146
  /**
182
147
  * Parse and validate an IMF package directory on disk.
183
148
  *
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
- *
189
149
  * @param path - Path to the IMP directory
190
150
  * @param options - Optional validation options
191
151
  * @returns `{ package, validation }` — the full parsed package and all findings.
192
- * @throws If the directory cannot be read or the options are invalid
193
- * (wrong type, unknown key).
152
+ * @throws If the directory cannot be read or the options are invalid.
194
153
  */
195
154
  export declare function validatePath(path: string, options?: PathValidateOptions | undefined | null): ValidationResult
196
155
 
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
-
207
156
  /**
208
157
  * Parse and validate an IMF package from a URI.
209
158
  *
210
159
  * Accepts `file://` URIs, bare filesystem paths, and (when built with the
211
160
  * `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.
215
161
  *
216
162
  * @param uri - Path or URI to the IMP
217
163
  * @param options - Optional validation options (plus `credentials` for S3)
@@ -219,14 +165,3 @@ export declare function validatePathAsync(path: string, options?: PathValidateOp
219
165
  * @throws If the URI cannot be read or the options are invalid.
220
166
  */
221
167
  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,16 +49,12 @@ export const {
49
49
  buildReport,
50
50
  buildReportFromPath,
51
51
  buildReportFromUri,
52
- buildReportFromPathAsync,
53
- buildReportFromUriAsync,
54
52
  formatReport,
55
53
  parsePackage,
56
54
  parsePackageFromPath,
57
55
  validate,
58
56
  validatePath,
59
57
  validateUri,
60
- validatePathAsync,
61
- validateUriAsync,
62
58
  listRules,
63
59
  toSarif,
64
60
  } = nativeModule;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@imferno/node",
3
- "version": "3.0.2-fix-review-cli-settings.b024e0d",
3
+ "version": "3.0.2-fix-review-app2e-image.6d21d8d",
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-fix-review-cli-settings.b024e0d",
49
- "@imferno/node-darwin-x64": "3.0.2-fix-review-cli-settings.b024e0d",
50
- "@imferno/node-linux-x64-gnu": "3.0.2-fix-review-cli-settings.b024e0d",
51
- "@imferno/node-linux-arm64-gnu": "3.0.2-fix-review-cli-settings.b024e0d",
52
- "@imferno/node-win32-x64-msvc": "3.0.2-fix-review-cli-settings.b024e0d",
53
- "@imferno/node-win32-arm64-msvc": "3.0.2-fix-review-cli-settings.b024e0d"
48
+ "@imferno/node-darwin-arm64": "3.0.2-fix-review-app2e-image.6d21d8d",
49
+ "@imferno/node-darwin-x64": "3.0.2-fix-review-app2e-image.6d21d8d",
50
+ "@imferno/node-linux-x64-gnu": "3.0.2-fix-review-app2e-image.6d21d8d",
51
+ "@imferno/node-linux-arm64-gnu": "3.0.2-fix-review-app2e-image.6d21d8d",
52
+ "@imferno/node-win32-x64-msvc": "3.0.2-fix-review-app2e-image.6d21d8d",
53
+ "@imferno/node-win32-arm64-msvc": "3.0.2-fix-review-app2e-image.6d21d8d"
54
54
  },
55
55
  "publishConfig": {
56
56
  "access": "public"
package/types.d.ts CHANGED
@@ -6,18 +6,6 @@
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
- };
21
9
  /**
22
10
  * A SMPTE IMF UUID, serialised as a bare UUID string (e.g. "0eb3d1b9-b77b-4d3f-bbe5-7c69b15dca85")
23
11
  */
@@ -132,6 +120,7 @@ export type VideoCodec =
132
120
  | "Jpeg2000Imf8k"
133
121
  | "Jpeg2000Broadcast"
134
122
  | "Jpeg2000Ht"
123
+ | "Jpeg2000HtNode"
135
124
  | "Vc5"
136
125
  | "Mpeg2"
137
126
  | "H264"
@@ -218,6 +207,18 @@ export type MimeType =
218
207
  * Mirrors ESLint's `"off"` / `"warn"` / `"error"` vocabulary, extended with the two IMF severity levels.
219
208
  */
220
209
  export type RuleSeverity = "off" | "info" | "warn" | "error" | "critical";
210
+ export type RuleValidationReason =
211
+ | {
212
+ kind: "unknown_source";
213
+ variant: string;
214
+ }
215
+ | {
216
+ kind: "matches_nothing";
217
+ }
218
+ | {
219
+ hint: string;
220
+ kind: "unsupported_pattern";
221
+ };
221
222
 
222
223
  /**
223
224
  * @deprecated
@@ -228,10 +229,6 @@ export type RuleSeverity = "off" | "info" | "warn" | "error" | "critical";
228
229
  export interface ImfReport {
229
230
  cpls: CplReport[];
230
231
  package: PackageSummary;
231
- /**
232
- * Keys of the `rules` option that select no rule (typos, unknown editions); they were ignored. Absent when every key matched.
233
- */
234
- ruleWarnings?: RuleValidationWarning[];
235
232
  validation: ValidationReport;
236
233
  }
237
234
  export interface CplReport {
@@ -322,18 +319,6 @@ export interface UnreferencedAsset {
322
319
  id: string;
323
320
  path: string;
324
321
  }
325
- /**
326
- * A diagnostic about a `RulesConfig` key that the engine couldn't match.
327
- *
328
- * Produced by `RulesConfig::validate`. Operators can use these at config-load time to catch typos before any validation work runs.
329
- */
330
- export interface RuleValidationWarning {
331
- /**
332
- * The configured key that triggered the warning.
333
- */
334
- key: string;
335
- reason: RuleValidationReason;
336
- }
337
322
  /**
338
323
  * Comprehensive validation report
339
324
  */
@@ -1460,6 +1445,18 @@ export interface ValidationResult {
1460
1445
  rule_warnings?: RuleValidationWarning[];
1461
1446
  validation: ValidationReport;
1462
1447
  }
1448
+ /**
1449
+ * A diagnostic about a `RulesConfig` key that the engine couldn't match.
1450
+ *
1451
+ * Produced by `RulesConfig::validate`. Operators can use these at config-load time to catch typos before any validation work runs.
1452
+ */
1453
+ export interface RuleValidationWarning {
1454
+ /**
1455
+ * The configured key that triggered the warning.
1456
+ */
1457
+ key: string;
1458
+ reason: RuleValidationReason;
1459
+ }
1463
1460
 
1464
1461
  /**
1465
1462
  * Core constraints (ST 2067-2) edition to validate against. `"auto"` detects