@imferno/schema 3.0.2-feat-docs-sample-imp-browser.7a73aeb → 3.0.2-feat-rule-model-per-edition.a92877c
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 +2 -0
- package/index.d.ts +6 -0
- package/index.js +4 -0
- package/package.json +1 -1
- package/schemas/composition-playlist.json +34 -0
- package/schemas/imf-report.json +163 -8
- package/schemas/imferno-package.json +3391 -0
- package/schemas/rules-config.json +1 -1
- package/schemas/validation-report.json +163 -8
- package/schemas/validation-result.json +3997 -0
package/README.md
CHANGED
|
@@ -29,6 +29,8 @@ if (validate(data)) {
|
|
|
29
29
|
|
|
30
30
|
| Export | Description |
|
|
31
31
|
|--------|-------------|
|
|
32
|
+
| `validationResult` | `{ package, validation }` as returned by `validate()` in `@imferno/node` |
|
|
33
|
+
| `imfernoPackage` | Full parsed package as returned by `parsePackage()` in `@imferno/node` |
|
|
32
34
|
| `imfReport` | Full IMF package report (metadata + validation + CPL analysis) |
|
|
33
35
|
| `validationReport` | Validation issues and diagnostics |
|
|
34
36
|
| `compositionPlaylist` | SMPTE ST 2067-3 Composition Playlist |
|
package/index.d.ts
CHANGED
|
@@ -1,6 +1,10 @@
|
|
|
1
1
|
/** A JSON Schema object (Draft 7). */
|
|
2
2
|
type JsonSchema = Record<string, unknown>;
|
|
3
3
|
|
|
4
|
+
/** `{ package, validation }` as returned by `validate()` in @imferno/node. */
|
|
5
|
+
export declare const validationResult: JsonSchema;
|
|
6
|
+
/** The full parsed package (`Imferno`) as returned by `parsePackage()` in @imferno/node. */
|
|
7
|
+
export declare const imfernoPackage: JsonSchema;
|
|
4
8
|
export declare const imfReport: JsonSchema;
|
|
5
9
|
export declare const validationReport: JsonSchema;
|
|
6
10
|
export declare const compositionPlaylist: JsonSchema;
|
|
@@ -10,6 +14,8 @@ export declare const volumeIndex: JsonSchema;
|
|
|
10
14
|
export declare const rulesConfig: JsonSchema;
|
|
11
15
|
|
|
12
16
|
export declare const schemas: {
|
|
17
|
+
validationResult: JsonSchema;
|
|
18
|
+
imfernoPackage: JsonSchema;
|
|
13
19
|
imfReport: JsonSchema;
|
|
14
20
|
validationReport: JsonSchema;
|
|
15
21
|
compositionPlaylist: JsonSchema;
|
package/index.js
CHANGED
|
@@ -9,6 +9,8 @@ function loadSchema(name) {
|
|
|
9
9
|
return JSON.parse(readFileSync(join(schemasDir, `${name}.json`), "utf-8"));
|
|
10
10
|
}
|
|
11
11
|
|
|
12
|
+
export const validationResult = loadSchema("validation-result");
|
|
13
|
+
export const imfernoPackage = loadSchema("imferno-package");
|
|
12
14
|
export const imfReport = loadSchema("imf-report");
|
|
13
15
|
export const validationReport = loadSchema("validation-report");
|
|
14
16
|
export const compositionPlaylist = loadSchema("composition-playlist");
|
|
@@ -18,6 +20,8 @@ export const volumeIndex = loadSchema("volume-index");
|
|
|
18
20
|
export const rulesConfig = loadSchema("rules-config");
|
|
19
21
|
|
|
20
22
|
export const schemas = {
|
|
23
|
+
validationResult,
|
|
24
|
+
imfernoPackage,
|
|
21
25
|
imfReport,
|
|
22
26
|
validationReport,
|
|
23
27
|
compositionPlaylist,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@imferno/schema",
|
|
3
|
-
"version": "3.0.2-feat-
|
|
3
|
+
"version": "3.0.2-feat-rule-model-per-edition.a92877c",
|
|
4
4
|
"description": "JSON Schema definitions for SMPTE ST 2067 IMF types — validates imferno export output",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"types": "index.d.ts",
|
|
@@ -1353,6 +1353,21 @@
|
|
|
1353
1353
|
}
|
|
1354
1354
|
}
|
|
1355
1355
|
},
|
|
1356
|
+
"J2KCcapi": {
|
|
1357
|
+
"description": "`Ccapi` array of `J2KExtendedCapabilities`.",
|
|
1358
|
+
"type": "object",
|
|
1359
|
+
"properties": {
|
|
1360
|
+
"UInt16": {
|
|
1361
|
+
"default": [],
|
|
1362
|
+
"type": "array",
|
|
1363
|
+
"items": {
|
|
1364
|
+
"type": "integer",
|
|
1365
|
+
"format": "uint16",
|
|
1366
|
+
"minimum": 0.0
|
|
1367
|
+
}
|
|
1368
|
+
}
|
|
1369
|
+
}
|
|
1370
|
+
},
|
|
1356
1371
|
"J2KComponentSizing": {
|
|
1357
1372
|
"description": "Individual J2K component sizing",
|
|
1358
1373
|
"type": "object",
|
|
@@ -1393,6 +1408,18 @@
|
|
|
1393
1408
|
"description": "J2K Extended Capabilities (ISO/IEC 15444-15)",
|
|
1394
1409
|
"type": "object",
|
|
1395
1410
|
"properties": {
|
|
1411
|
+
"Ccapi": {
|
|
1412
|
+
"description": "Codestream capabilities (Ccap^i), one UInt16 per Pcap bit set, in increasing order of i (ISO/IEC 15444-1 CAP marker).",
|
|
1413
|
+
"default": null,
|
|
1414
|
+
"anyOf": [
|
|
1415
|
+
{
|
|
1416
|
+
"$ref": "#/definitions/J2KCcapi"
|
|
1417
|
+
},
|
|
1418
|
+
{
|
|
1419
|
+
"type": "null"
|
|
1420
|
+
}
|
|
1421
|
+
]
|
|
1422
|
+
},
|
|
1396
1423
|
"Pcap": {
|
|
1397
1424
|
"description": "Profile capabilities (Pcap)",
|
|
1398
1425
|
"default": null,
|
|
@@ -2600,6 +2627,13 @@
|
|
|
2600
2627
|
"Jpeg2000Imf4k"
|
|
2601
2628
|
]
|
|
2602
2629
|
},
|
|
2630
|
+
{
|
|
2631
|
+
"description": "JPEG 2000 — IMF 8K profiles (byte [14]=0x04 Single Tile Lossy, 0x07 Single/Multi-Tile Reversible), at the Mainlevel/Sublevel combinations ST 2067-21:2026 §6.5.2 Table 5 lists. Only the 2026 edition of ST 2067-21 permits them.",
|
|
2632
|
+
"type": "string",
|
|
2633
|
+
"enum": [
|
|
2634
|
+
"Jpeg2000Imf8k"
|
|
2635
|
+
]
|
|
2636
|
+
},
|
|
2603
2637
|
{
|
|
2604
2638
|
"description": "JPEG 2000 — Broadcast Contribution profile (ST 422 §A.1, byte [14]=0x01, sub-levels 0x11–0x17). Supports stored widths ≤ 3840 per ST 2067-21.",
|
|
2605
2639
|
"type": "string",
|
package/schemas/imf-report.json
CHANGED
|
@@ -335,7 +335,7 @@
|
|
|
335
335
|
"format": "uuid"
|
|
336
336
|
},
|
|
337
337
|
"IssueSource": {
|
|
338
|
-
"description": "Which authority produced a validation finding.\n\nEncodes the \"prose vs XSD\" provenance distinction that SMPTE ST 2067-3 §5.1 calls out (\"the prose document takes precedence on conflict\"), so callers can filter, group, or apply per-source severity overrides without inspecting the code string.\n\
|
|
338
|
+
"description": "Which authority produced a validation finding.\n\nEncodes the \"prose vs XSD\" provenance distinction that SMPTE ST 2067-3 §5.1 calls out (\"the prose document takes precedence on conflict\"), so callers can filter, group, or apply per-source severity overrides without inspecting the code string.\n\nDerived from the rule's spec ([`Spec::source`]): `XSD` rules are `XsdLayer`, `IMFERNO` rules `EngineInternal`, SMPTE specs `ProseRule`.",
|
|
339
339
|
"oneOf": [
|
|
340
340
|
{
|
|
341
341
|
"description": "Came from the runtime XSD validator (uppsala). Schema-layer: the structural subset of the spec that the XSD DSL can express.",
|
|
@@ -428,6 +428,13 @@
|
|
|
428
428
|
"format": "uint",
|
|
429
429
|
"minimum": 0.0
|
|
430
430
|
},
|
|
431
|
+
"segment_id": {
|
|
432
|
+
"description": "Segment Id (`urn:uuid:…`) if applicable",
|
|
433
|
+
"type": [
|
|
434
|
+
"string",
|
|
435
|
+
"null"
|
|
436
|
+
]
|
|
437
|
+
},
|
|
431
438
|
"sequence_id": {
|
|
432
439
|
"description": "Sequence UUID if applicable",
|
|
433
440
|
"type": [
|
|
@@ -547,6 +554,121 @@
|
|
|
547
554
|
}
|
|
548
555
|
]
|
|
549
556
|
},
|
|
557
|
+
"Spec": {
|
|
558
|
+
"description": "A document whose rules imferno checks.",
|
|
559
|
+
"oneOf": [
|
|
560
|
+
{
|
|
561
|
+
"description": "SMPTE ST 377-1 — MXF File Format.",
|
|
562
|
+
"type": "string",
|
|
563
|
+
"enum": [
|
|
564
|
+
"ST377-1"
|
|
565
|
+
]
|
|
566
|
+
},
|
|
567
|
+
{
|
|
568
|
+
"description": "SMPTE ST 377-4 — MXF Multichannel Audio Labeling.",
|
|
569
|
+
"type": "string",
|
|
570
|
+
"enum": [
|
|
571
|
+
"ST377-4"
|
|
572
|
+
]
|
|
573
|
+
},
|
|
574
|
+
{
|
|
575
|
+
"description": "SMPTE ST 429-9 — Asset Mapping and File Segmentation.",
|
|
576
|
+
"type": "string",
|
|
577
|
+
"enum": [
|
|
578
|
+
"ST429-9"
|
|
579
|
+
]
|
|
580
|
+
},
|
|
581
|
+
{
|
|
582
|
+
"description": "SMPTE ST 2067-2 — IMF Core Constraints.",
|
|
583
|
+
"type": "string",
|
|
584
|
+
"enum": [
|
|
585
|
+
"ST2067-2"
|
|
586
|
+
]
|
|
587
|
+
},
|
|
588
|
+
{
|
|
589
|
+
"description": "SMPTE ST 2067-3 — IMF Composition Playlist.",
|
|
590
|
+
"type": "string",
|
|
591
|
+
"enum": [
|
|
592
|
+
"ST2067-3"
|
|
593
|
+
]
|
|
594
|
+
},
|
|
595
|
+
{
|
|
596
|
+
"description": "SMPTE ST 2067-9 — IMF Sidecar Composition Map.",
|
|
597
|
+
"type": "string",
|
|
598
|
+
"enum": [
|
|
599
|
+
"ST2067-9"
|
|
600
|
+
]
|
|
601
|
+
},
|
|
602
|
+
{
|
|
603
|
+
"description": "SMPTE ST 2067-21 — IMF Application #2E.",
|
|
604
|
+
"type": "string",
|
|
605
|
+
"enum": [
|
|
606
|
+
"ST2067-21"
|
|
607
|
+
]
|
|
608
|
+
},
|
|
609
|
+
{
|
|
610
|
+
"description": "SMPTE ST 2067-201 — IMF IAB Level 0 Plug-in.",
|
|
611
|
+
"type": "string",
|
|
612
|
+
"enum": [
|
|
613
|
+
"ST2067-201"
|
|
614
|
+
]
|
|
615
|
+
},
|
|
616
|
+
{
|
|
617
|
+
"description": "SMPTE ST 2067-202 — IMF ISXD Plug-in.",
|
|
618
|
+
"type": "string",
|
|
619
|
+
"enum": [
|
|
620
|
+
"ST2067-202"
|
|
621
|
+
]
|
|
622
|
+
},
|
|
623
|
+
{
|
|
624
|
+
"description": "The XML Schema layer: findings of the runtime XSD validator against the vendored schema of a document's namespace.",
|
|
625
|
+
"type": "string",
|
|
626
|
+
"enum": [
|
|
627
|
+
"XSD"
|
|
628
|
+
]
|
|
629
|
+
},
|
|
630
|
+
{
|
|
631
|
+
"description": "imferno's own checks (parse failures, package scanning) that no single SMPTE clause defines.",
|
|
632
|
+
"type": "string",
|
|
633
|
+
"enum": [
|
|
634
|
+
"IMFERNO"
|
|
635
|
+
]
|
|
636
|
+
}
|
|
637
|
+
]
|
|
638
|
+
},
|
|
639
|
+
"Strength": {
|
|
640
|
+
"description": "Normative strength of a rule in an edition's text.",
|
|
641
|
+
"oneOf": [
|
|
642
|
+
{
|
|
643
|
+
"description": "A requirement (\"shall\").",
|
|
644
|
+
"type": "string",
|
|
645
|
+
"enum": [
|
|
646
|
+
"shall"
|
|
647
|
+
]
|
|
648
|
+
},
|
|
649
|
+
{
|
|
650
|
+
"description": "A recommendation (\"should\").",
|
|
651
|
+
"type": "string",
|
|
652
|
+
"enum": [
|
|
653
|
+
"should"
|
|
654
|
+
]
|
|
655
|
+
},
|
|
656
|
+
{
|
|
657
|
+
"description": "A permission or an observation (\"may\").",
|
|
658
|
+
"type": "string",
|
|
659
|
+
"enum": [
|
|
660
|
+
"may"
|
|
661
|
+
]
|
|
662
|
+
},
|
|
663
|
+
{
|
|
664
|
+
"description": "Deprecated in this edition.",
|
|
665
|
+
"type": "string",
|
|
666
|
+
"enum": [
|
|
667
|
+
"deprecated"
|
|
668
|
+
]
|
|
669
|
+
}
|
|
670
|
+
]
|
|
671
|
+
},
|
|
550
672
|
"UnreferencedAsset": {
|
|
551
673
|
"type": "object",
|
|
552
674
|
"required": [
|
|
@@ -563,19 +685,25 @@
|
|
|
563
685
|
}
|
|
564
686
|
},
|
|
565
687
|
"ValidationIssue": {
|
|
566
|
-
"description": "A single validation
|
|
688
|
+
"description": "A single validation finding.\n\nCreated only through [`ValidationIssue::from_rule`]: severity, category, clause and display code all come from the rule table row of the edition that was applied.",
|
|
567
689
|
"type": "object",
|
|
568
690
|
"required": [
|
|
569
691
|
"category",
|
|
692
|
+
"clause",
|
|
570
693
|
"code",
|
|
571
694
|
"context",
|
|
695
|
+
"edition",
|
|
572
696
|
"location",
|
|
573
697
|
"message",
|
|
574
|
-
"
|
|
698
|
+
"rule",
|
|
699
|
+
"severity",
|
|
700
|
+
"source",
|
|
701
|
+
"spec",
|
|
702
|
+
"strength"
|
|
575
703
|
],
|
|
576
704
|
"properties": {
|
|
577
705
|
"additional_instances": {
|
|
578
|
-
"description": "Other `Location`s when this issue represents an aggregation of multiple identical-code occurrences (see [`ValidationReport::aggregate`]). Empty for fresh, un-aggregated issues. Skipped during serialisation when empty
|
|
706
|
+
"description": "Other `Location`s when this issue represents an aggregation of multiple identical-code occurrences (see [`ValidationReport::aggregate`]). Empty for fresh, un-aggregated issues. Skipped during serialisation when empty.",
|
|
579
707
|
"type": "array",
|
|
580
708
|
"items": {
|
|
581
709
|
"$ref": "#/definitions/Location"
|
|
@@ -589,8 +717,12 @@
|
|
|
589
717
|
}
|
|
590
718
|
]
|
|
591
719
|
},
|
|
720
|
+
"clause": {
|
|
721
|
+
"description": "Clause of that edition the rule comes from (empty for pseudo-specs without clauses).",
|
|
722
|
+
"type": "string"
|
|
723
|
+
},
|
|
592
724
|
"code": {
|
|
593
|
-
"description": "
|
|
725
|
+
"description": "Display code: `SPEC:EDITION:CLAUSE/Name`, with the edition actually applied (e.g. `ST2067-3:2016:7.2.2/SegmentDuration`).",
|
|
594
726
|
"type": "string"
|
|
595
727
|
},
|
|
596
728
|
"context": {
|
|
@@ -600,6 +732,10 @@
|
|
|
600
732
|
"type": "string"
|
|
601
733
|
}
|
|
602
734
|
},
|
|
735
|
+
"edition": {
|
|
736
|
+
"description": "Edition of the spec that was applied (`\"2016\"`; empty for single-edition pseudo-specs).",
|
|
737
|
+
"type": "string"
|
|
738
|
+
},
|
|
603
739
|
"location": {
|
|
604
740
|
"description": "Location where issue was found",
|
|
605
741
|
"allOf": [
|
|
@@ -612,8 +748,12 @@
|
|
|
612
748
|
"description": "Human-readable message",
|
|
613
749
|
"type": "string"
|
|
614
750
|
},
|
|
751
|
+
"rule": {
|
|
752
|
+
"description": "Stable, edition-free rule id (`ST2067-3/SegmentDuration`).",
|
|
753
|
+
"type": "string"
|
|
754
|
+
},
|
|
615
755
|
"severity": {
|
|
616
|
-
"description": "Severity level",
|
|
756
|
+
"description": "Severity level (the table default, possibly remapped by a rules config).",
|
|
617
757
|
"allOf": [
|
|
618
758
|
{
|
|
619
759
|
"$ref": "#/definitions/Severity"
|
|
@@ -621,14 +761,29 @@
|
|
|
621
761
|
]
|
|
622
762
|
},
|
|
623
763
|
"source": {
|
|
624
|
-
"description": "Authority that emitted this issue (XSD layer, prose rule, engine internal)
|
|
625
|
-
"default": "EngineInternal",
|
|
764
|
+
"description": "Authority that emitted this issue (XSD layer, prose rule, engine internal), derived from the rule's spec.",
|
|
626
765
|
"allOf": [
|
|
627
766
|
{
|
|
628
767
|
"$ref": "#/definitions/IssueSource"
|
|
629
768
|
}
|
|
630
769
|
]
|
|
631
770
|
},
|
|
771
|
+
"spec": {
|
|
772
|
+
"description": "Spec the rule belongs to.",
|
|
773
|
+
"allOf": [
|
|
774
|
+
{
|
|
775
|
+
"$ref": "#/definitions/Spec"
|
|
776
|
+
}
|
|
777
|
+
]
|
|
778
|
+
},
|
|
779
|
+
"strength": {
|
|
780
|
+
"description": "Normative strength of the rule in that edition.",
|
|
781
|
+
"allOf": [
|
|
782
|
+
{
|
|
783
|
+
"$ref": "#/definitions/Strength"
|
|
784
|
+
}
|
|
785
|
+
]
|
|
786
|
+
},
|
|
632
787
|
"suggestion": {
|
|
633
788
|
"description": "Suggestion for how to fix",
|
|
634
789
|
"type": [
|