@imferno/schema 3.0.2-beta.5af77ef → 3.0.2-beta.5e31333
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 +177 -8
- package/schemas/imferno-package.json +3391 -0
- package/schemas/rules-config.json +1 -1
- package/schemas/validation-report.json +177 -8
- package/schemas/validation-result.json +4097 -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
|
@@ -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,135 @@
|
|
|
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-8 — Packing List.",
|
|
576
|
+
"type": "string",
|
|
577
|
+
"enum": [
|
|
578
|
+
"ST429-8"
|
|
579
|
+
]
|
|
580
|
+
},
|
|
581
|
+
{
|
|
582
|
+
"description": "SMPTE ST 429-9 — Asset Mapping and File Segmentation.",
|
|
583
|
+
"type": "string",
|
|
584
|
+
"enum": [
|
|
585
|
+
"ST429-9"
|
|
586
|
+
]
|
|
587
|
+
},
|
|
588
|
+
{
|
|
589
|
+
"description": "SMPTE ST 2067-2 — IMF Core Constraints.",
|
|
590
|
+
"type": "string",
|
|
591
|
+
"enum": [
|
|
592
|
+
"ST2067-2"
|
|
593
|
+
]
|
|
594
|
+
},
|
|
595
|
+
{
|
|
596
|
+
"description": "SMPTE ST 2067-3 — IMF Composition Playlist.",
|
|
597
|
+
"type": "string",
|
|
598
|
+
"enum": [
|
|
599
|
+
"ST2067-3"
|
|
600
|
+
]
|
|
601
|
+
},
|
|
602
|
+
{
|
|
603
|
+
"description": "SMPTE ST 2067-5 — IMF Essence Component.",
|
|
604
|
+
"type": "string",
|
|
605
|
+
"enum": [
|
|
606
|
+
"ST2067-5"
|
|
607
|
+
]
|
|
608
|
+
},
|
|
609
|
+
{
|
|
610
|
+
"description": "SMPTE ST 2067-9 — IMF Sidecar Composition Map.",
|
|
611
|
+
"type": "string",
|
|
612
|
+
"enum": [
|
|
613
|
+
"ST2067-9"
|
|
614
|
+
]
|
|
615
|
+
},
|
|
616
|
+
{
|
|
617
|
+
"description": "SMPTE ST 2067-21 — IMF Application #2E.",
|
|
618
|
+
"type": "string",
|
|
619
|
+
"enum": [
|
|
620
|
+
"ST2067-21"
|
|
621
|
+
]
|
|
622
|
+
},
|
|
623
|
+
{
|
|
624
|
+
"description": "SMPTE ST 2067-201 — IMF IAB Level 0 Plug-in.",
|
|
625
|
+
"type": "string",
|
|
626
|
+
"enum": [
|
|
627
|
+
"ST2067-201"
|
|
628
|
+
]
|
|
629
|
+
},
|
|
630
|
+
{
|
|
631
|
+
"description": "SMPTE ST 2067-202 — IMF ISXD Plug-in.",
|
|
632
|
+
"type": "string",
|
|
633
|
+
"enum": [
|
|
634
|
+
"ST2067-202"
|
|
635
|
+
]
|
|
636
|
+
},
|
|
637
|
+
{
|
|
638
|
+
"description": "The XML Schema layer: findings of the runtime XSD validator against the vendored schema of a document's namespace.",
|
|
639
|
+
"type": "string",
|
|
640
|
+
"enum": [
|
|
641
|
+
"XSD"
|
|
642
|
+
]
|
|
643
|
+
},
|
|
644
|
+
{
|
|
645
|
+
"description": "imferno's own checks (parse failures, package scanning) that no single SMPTE clause defines.",
|
|
646
|
+
"type": "string",
|
|
647
|
+
"enum": [
|
|
648
|
+
"IMFERNO"
|
|
649
|
+
]
|
|
650
|
+
}
|
|
651
|
+
]
|
|
652
|
+
},
|
|
653
|
+
"Strength": {
|
|
654
|
+
"description": "Normative strength of a rule in an edition's text.",
|
|
655
|
+
"oneOf": [
|
|
656
|
+
{
|
|
657
|
+
"description": "A requirement (\"shall\").",
|
|
658
|
+
"type": "string",
|
|
659
|
+
"enum": [
|
|
660
|
+
"shall"
|
|
661
|
+
]
|
|
662
|
+
},
|
|
663
|
+
{
|
|
664
|
+
"description": "A recommendation (\"should\").",
|
|
665
|
+
"type": "string",
|
|
666
|
+
"enum": [
|
|
667
|
+
"should"
|
|
668
|
+
]
|
|
669
|
+
},
|
|
670
|
+
{
|
|
671
|
+
"description": "A permission or an observation (\"may\").",
|
|
672
|
+
"type": "string",
|
|
673
|
+
"enum": [
|
|
674
|
+
"may"
|
|
675
|
+
]
|
|
676
|
+
},
|
|
677
|
+
{
|
|
678
|
+
"description": "Deprecated in this edition.",
|
|
679
|
+
"type": "string",
|
|
680
|
+
"enum": [
|
|
681
|
+
"deprecated"
|
|
682
|
+
]
|
|
683
|
+
}
|
|
684
|
+
]
|
|
685
|
+
},
|
|
550
686
|
"UnreferencedAsset": {
|
|
551
687
|
"type": "object",
|
|
552
688
|
"required": [
|
|
@@ -563,19 +699,25 @@
|
|
|
563
699
|
}
|
|
564
700
|
},
|
|
565
701
|
"ValidationIssue": {
|
|
566
|
-
"description": "A single validation
|
|
702
|
+
"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
703
|
"type": "object",
|
|
568
704
|
"required": [
|
|
569
705
|
"category",
|
|
706
|
+
"clause",
|
|
570
707
|
"code",
|
|
571
708
|
"context",
|
|
709
|
+
"edition",
|
|
572
710
|
"location",
|
|
573
711
|
"message",
|
|
574
|
-
"
|
|
712
|
+
"rule",
|
|
713
|
+
"severity",
|
|
714
|
+
"source",
|
|
715
|
+
"spec",
|
|
716
|
+
"strength"
|
|
575
717
|
],
|
|
576
718
|
"properties": {
|
|
577
719
|
"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
|
|
720
|
+
"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
721
|
"type": "array",
|
|
580
722
|
"items": {
|
|
581
723
|
"$ref": "#/definitions/Location"
|
|
@@ -589,8 +731,12 @@
|
|
|
589
731
|
}
|
|
590
732
|
]
|
|
591
733
|
},
|
|
734
|
+
"clause": {
|
|
735
|
+
"description": "Clause of that edition the rule comes from (empty for pseudo-specs without clauses).",
|
|
736
|
+
"type": "string"
|
|
737
|
+
},
|
|
592
738
|
"code": {
|
|
593
|
-
"description": "
|
|
739
|
+
"description": "Display code: `SPEC:EDITION:CLAUSE/Name`, with the edition actually applied (e.g. `ST2067-3:2016:7.2/SegmentDuration`).",
|
|
594
740
|
"type": "string"
|
|
595
741
|
},
|
|
596
742
|
"context": {
|
|
@@ -600,6 +746,10 @@
|
|
|
600
746
|
"type": "string"
|
|
601
747
|
}
|
|
602
748
|
},
|
|
749
|
+
"edition": {
|
|
750
|
+
"description": "Edition of the spec that was applied (`\"2016\"`; empty for single-edition pseudo-specs).",
|
|
751
|
+
"type": "string"
|
|
752
|
+
},
|
|
603
753
|
"location": {
|
|
604
754
|
"description": "Location where issue was found",
|
|
605
755
|
"allOf": [
|
|
@@ -612,8 +762,12 @@
|
|
|
612
762
|
"description": "Human-readable message",
|
|
613
763
|
"type": "string"
|
|
614
764
|
},
|
|
765
|
+
"rule": {
|
|
766
|
+
"description": "Stable, edition-free rule id (`ST2067-3/SegmentDuration`).",
|
|
767
|
+
"type": "string"
|
|
768
|
+
},
|
|
615
769
|
"severity": {
|
|
616
|
-
"description": "Severity level",
|
|
770
|
+
"description": "Severity level (the table default, possibly remapped by a rules config).",
|
|
617
771
|
"allOf": [
|
|
618
772
|
{
|
|
619
773
|
"$ref": "#/definitions/Severity"
|
|
@@ -621,14 +775,29 @@
|
|
|
621
775
|
]
|
|
622
776
|
},
|
|
623
777
|
"source": {
|
|
624
|
-
"description": "Authority that emitted this issue (XSD layer, prose rule, engine internal)
|
|
625
|
-
"default": "EngineInternal",
|
|
778
|
+
"description": "Authority that emitted this issue (XSD layer, prose rule, engine internal), derived from the rule's spec.",
|
|
626
779
|
"allOf": [
|
|
627
780
|
{
|
|
628
781
|
"$ref": "#/definitions/IssueSource"
|
|
629
782
|
}
|
|
630
783
|
]
|
|
631
784
|
},
|
|
785
|
+
"spec": {
|
|
786
|
+
"description": "Spec the rule belongs to.",
|
|
787
|
+
"allOf": [
|
|
788
|
+
{
|
|
789
|
+
"$ref": "#/definitions/Spec"
|
|
790
|
+
}
|
|
791
|
+
]
|
|
792
|
+
},
|
|
793
|
+
"strength": {
|
|
794
|
+
"description": "Normative strength of the rule in that edition.",
|
|
795
|
+
"allOf": [
|
|
796
|
+
{
|
|
797
|
+
"$ref": "#/definitions/Strength"
|
|
798
|
+
}
|
|
799
|
+
]
|
|
800
|
+
},
|
|
632
801
|
"suggestion": {
|
|
633
802
|
"description": "Suggestion for how to fix",
|
|
634
803
|
"type": [
|