@retropak/schema 1.0.0-draft → 1.0.0-draft10

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
@@ -1,39 +1,24 @@
1
- # Retropak
1
+ # @retropak/schema
2
2
 
3
- > A modern container format for retro software preservation
3
+ JSON Schema definition for Retropak manifests.
4
4
 
5
- Retropak (`.rpk`) is an open standard for distributing retro software with everything in one place: ROMs, artwork, soundtracks, manuals, and metadata.
5
+ ## Installation
6
6
 
7
- ## Quick Links
7
+ ```bash
8
+ npm install @retropak/schema
9
+ ```
8
10
 
9
- - **[Read the Specification](docs/specification.md)**: Complete technical specification
10
- - **[Visit the Website](https://retropak.org)**: Documentation and guides
11
- - **[View the Schema](docs/schemas/v1/retropak.schema.json)**: JSON Schema for validation
12
- - **[Contributing](CONTRIBUTING.md)**: How to build and contribute to the docs
11
+ ## Usage
13
12
 
14
- ## What is Retropak?
13
+ ```javascript
14
+ import schema from '@retropak/schema/schema' assert { type: 'json' };
15
+ import locales from '@retropak/schema/locales/en' assert { type: 'json' };
16
+ ```
15
17
 
16
- A `.rpk` file is a ZIP archive containing:
18
+ ## Development
17
19
 
18
- - **Software**: ROMs, disc images, executables
19
- - **Metadata**: Title, platform, genre, developer, release date
20
- - **Artwork**: Box art, screenshots, logos
21
- - **Documentation**: Manuals, maps, guides
22
- - **Audio**: Soundtracks and music
23
- - **Configuration**: Emulator settings
24
-
25
- Everything needed to preserve and present retro software in one self-contained package.
26
-
27
- ## Features
28
-
29
- - **92 supported platforms**: From Atari 2600 to Xbox Series X
30
- - **Rich metadata**: Genre, players, features, ratings, credits
31
- - **Multi-disc support**: CD swapping, boot disks, compilations
32
- - **ROM verification**: MD5/SHA1/CRC32 checksums for database/DAT file validation
33
- - **Cryptographic signing**: GPG and SSH signatures for authenticity
34
- - **Accessibility**: Alt text support for all images
35
- - **Preservation-focused**: Version tracking, dump status, source attribution
20
+ This package is part of the Retropak monorepo.
36
21
 
37
22
  ## License
38
23
 
39
- This specification is released under [CC0 1.0](https://creativecommons.org/publicdomain/zero/1.0/). Use it however you like.
24
+ CC0-1.0
package/locales/en.json CHANGED
@@ -226,13 +226,18 @@
226
226
  "coverdisk": "Coverdisk",
227
227
  "demo": "Demo",
228
228
  "educational": "Educational",
229
+ "enhanced": "Enhanced Edition",
229
230
  "firmware": "Firmware",
230
231
  "freeware": "Freeware",
231
232
  "game": "Game",
232
233
  "homebrew": "Homebrew",
233
234
  "multimedia": "Multimedia",
235
+ "port": "Port",
234
236
  "promotional": "Promotional",
235
237
  "prototype": "Prototype",
238
+ "remake": "Remake",
239
+ "remaster": "Remaster",
240
+ "rerelease": "Re-release",
236
241
  "scene_demo": "Scene Demo",
237
242
  "shareware": "Shareware",
238
243
  "unlicensed": "Unlicensed",
@@ -341,6 +346,28 @@
341
346
  "unknown": "Unknown",
342
347
  "unlicensed": "Unlicensed"
343
348
  },
349
+ "license": {
350
+ "commercial": "Commercial",
351
+ "freeware": "Freeware",
352
+ "shareware": "Shareware",
353
+ "public_domain": "Public Domain",
354
+ "open_source": "Open Source",
355
+ "gpl": "GNU GPL",
356
+ "gpl2": "GNU GPL v2",
357
+ "gpl3": "GNU GPL v3",
358
+ "lgpl": "GNU LGPL",
359
+ "mit": "MIT License",
360
+ "bsd": "BSD License",
361
+ "apache": "Apache License",
362
+ "creative_commons": "Creative Commons",
363
+ "cc_by": "Creative Commons BY",
364
+ "cc_by_sa": "Creative Commons BY-SA",
365
+ "cc_by_nc": "Creative Commons BY-NC",
366
+ "cc_by_nc_sa": "Creative Commons BY-NC-SA",
367
+ "cc0": "Creative Commons CC0",
368
+ "proprietary": "Proprietary",
369
+ "unknown": "Unknown"
370
+ },
344
371
  "esrb": {
345
372
  "ec": "Early Childhood",
346
373
  "e": "Everyone",
package/package.json CHANGED
@@ -1,8 +1,9 @@
1
1
  {
2
2
  "name": "@retropak/schema",
3
- "version": "1.0.0-draft",
3
+ "version": "1.0.0-draft10",
4
4
  "description": "Metadata specification for Retropak software containers",
5
5
  "type": "module",
6
+ "main": "./schemas/v1/retropak.schema.json",
6
7
  "exports": {
7
8
  "./schema": "./schemas/v1/retropak.schema.json",
8
9
  "./locales/en": "./locales/en.json",
@@ -14,13 +15,15 @@
14
15
  ],
15
16
  "keywords": [
16
17
  "retropak",
17
- "schema"
18
+ "schema",
19
+ "json-schema"
18
20
  ],
19
21
  "author": "piers@retropak.org",
20
22
  "license": "CC0-1.0",
21
23
  "repository": {
22
24
  "type": "git",
23
- "url": "git+https://github.com/piersroberts/retropak.git"
25
+ "url": "git+https://github.com/piersroberts/retropak.git",
26
+ "directory": "packages/schema"
24
27
  },
25
28
  "bugs": {
26
29
  "url": "https://github.com/piersroberts/retropak/issues"
@@ -243,13 +243,18 @@
243
243
  "coverdisk",
244
244
  "demo",
245
245
  "educational",
246
+ "enhanced",
246
247
  "firmware",
247
248
  "freeware",
248
249
  "game",
249
250
  "homebrew",
250
251
  "multimedia",
252
+ "port",
251
253
  "promotional",
252
254
  "prototype",
255
+ "remake",
256
+ "remaster",
257
+ "rerelease",
253
258
  "scene_demo",
254
259
  "shareware",
255
260
  "unlicensed",
@@ -375,9 +380,36 @@
375
380
  "unlicensed"
376
381
  ]
377
382
  },
383
+ "license": {
384
+ "type": "string",
385
+ "description": "Software license type.",
386
+ "enum": [
387
+ "commercial",
388
+ "freeware",
389
+ "shareware",
390
+ "public_domain",
391
+ "open_source",
392
+ "gpl",
393
+ "gpl2",
394
+ "gpl3",
395
+ "lgpl",
396
+ "mit",
397
+ "bsd",
398
+ "apache",
399
+ "creative_commons",
400
+ "cc_by",
401
+ "cc_by_sa",
402
+ "cc_by_nc",
403
+ "cc_by_nc_sa",
404
+ "cc0",
405
+ "proprietary",
406
+ "unknown"
407
+ ]
408
+ },
378
409
  "ageRating": {
379
410
  "type": "object",
380
411
  "description": "Age/content ratings from various rating boards.",
412
+ "additionalProperties": false,
381
413
  "properties": {
382
414
  "nsfw": {
383
415
  "type": "boolean",
@@ -476,12 +508,14 @@
476
508
  "configFile": {
477
509
  "type": "object",
478
510
  "description": "An external configuration file for emulator or platform-specific settings.",
511
+ "additionalProperties": false,
479
512
  "required": [
480
513
  "file"
481
514
  ],
482
515
  "properties": {
483
516
  "file": {
484
517
  "type": "string",
518
+ "minLength": 1,
485
519
  "description": "Path to the configuration file."
486
520
  },
487
521
  "target": {
@@ -497,12 +531,14 @@
497
531
  "image": {
498
532
  "type": "object",
499
533
  "description": "An image file with optional alt text for accessibility.",
534
+ "additionalProperties": false,
500
535
  "required": [
501
536
  "file"
502
537
  ],
503
538
  "properties": {
504
539
  "file": {
505
540
  "type": "string",
541
+ "minLength": 1,
506
542
  "description": "Path to the image file."
507
543
  },
508
544
  "alt": {
@@ -514,12 +550,14 @@
514
550
  "creditEntry": {
515
551
  "type": "object",
516
552
  "description": "A person credited for work on the title.",
553
+ "additionalProperties": false,
517
554
  "required": [
518
555
  "name"
519
556
  ],
520
557
  "properties": {
521
558
  "name": {
522
559
  "type": "string",
560
+ "minLength": 1,
523
561
  "description": "Person's name."
524
562
  },
525
563
  "roles": {
@@ -528,12 +566,20 @@
528
566
  "items": {
529
567
  "type": "string"
530
568
  }
569
+ },
570
+ "characters": {
571
+ "type": "array",
572
+ "description": "Character names portrayed by this person (for voice actors, motion capture actors, etc.).",
573
+ "items": {
574
+ "type": "string"
575
+ }
531
576
  }
532
577
  }
533
578
  },
534
579
  "musicTrack": {
535
580
  "type": "object",
536
581
  "description": "A soundtrack or audio file from the title.",
582
+ "additionalProperties": false,
537
583
  "required": [
538
584
  "file"
539
585
  ],
@@ -544,6 +590,7 @@
544
590
  },
545
591
  "file": {
546
592
  "type": "string",
593
+ "minLength": 1,
547
594
  "description": "Path to the audio file."
548
595
  },
549
596
  "background": {
@@ -556,22 +603,20 @@
556
603
  "physicalMediaImage": {
557
604
  "type": "object",
558
605
  "description": "An image of physical media (cartridge, disc, tape, etc.).",
606
+ "additionalProperties": false,
559
607
  "required": [
560
608
  "file"
561
609
  ],
562
610
  "properties": {
563
611
  "file": {
564
612
  "type": "string",
613
+ "minLength": 1,
565
614
  "description": "Path to the physical media image file."
566
615
  },
567
616
  "alt": {
568
617
  "type": "string",
569
618
  "description": "Alternative text describing the image for accessibility."
570
619
  },
571
- "mediaId": {
572
- "type": "string",
573
- "description": "References the 'id' field of a media item, if specific to one disc/cart."
574
- },
575
620
  "type": {
576
621
  "$ref": "#/$defs/mediaType"
577
622
  }
@@ -580,17 +625,15 @@
580
625
  "mediaItem": {
581
626
  "type": "object",
582
627
  "description": "A media file (ROM, disc image, tape, etc.).",
628
+ "additionalProperties": false,
583
629
  "required": [
584
630
  "filename",
585
631
  "type"
586
632
  ],
587
633
  "properties": {
588
- "id": {
589
- "type": "string",
590
- "description": "Unique identifier for this media item, used for referencing in other fields."
591
- },
592
634
  "filename": {
593
635
  "type": "string",
636
+ "minLength": 1,
594
637
  "description": "Relative path to the media file within the archive."
595
638
  },
596
639
  "label": {
@@ -622,6 +665,11 @@
622
665
  "pattern": "^[a-fA-F0-9]{40}$",
623
666
  "description": "SHA-1 checksum of the media file for verification."
624
667
  },
668
+ "sha256": {
669
+ "type": "string",
670
+ "pattern": "^[a-fA-F0-9]{64}$",
671
+ "description": "SHA-256 checksum of the media file for verification."
672
+ },
625
673
  "crc32": {
626
674
  "type": "string",
627
675
  "pattern": "^[a-fA-F0-9]{8}$",
@@ -642,13 +690,17 @@
642
690
  "type": "string",
643
691
  "description": "Source database or group that verified the dump (e.g. 'No-Intro', 'Redump', 'TOSEC')."
644
692
  },
645
- "serial": {
693
+ "productCode": {
646
694
  "type": "string",
647
- "description": "Official product serial/catalog number from the original media."
695
+ "description": "Official product code or catalog number from the original media (e.g. 'SLUS-00594', 'MK-1491', 'DOL-GALE-USA')."
648
696
  },
649
697
  "notes": {
650
698
  "type": "string",
651
699
  "description": "Additional notes about this specific media file (e.g. distribution method, requirements, known issues)."
700
+ },
701
+ "labelImage": {
702
+ "$ref": "#/$defs/image",
703
+ "description": "Image of the media label (e.g. disc label, cartridge label, cassette label)."
652
704
  }
653
705
  }
654
706
  },
@@ -659,6 +711,7 @@
659
711
  "players": {
660
712
  "type": "object",
661
713
  "description": "Multiplayer capabilities.",
714
+ "additionalProperties": false,
662
715
  "properties": {
663
716
  "min": {
664
717
  "type": "integer",
@@ -678,6 +731,7 @@
678
731
  "features": {
679
732
  "type": "object",
680
733
  "description": "Input devices, peripherals, and capabilities.",
734
+ "additionalProperties": false,
681
735
  "properties": {
682
736
  "required": {
683
737
  "type": "array",
@@ -697,6 +751,7 @@
697
751
  }
698
752
  },
699
753
  "type": "object",
754
+ "additionalProperties": false,
700
755
  "required": [
701
756
  "schemaVersion",
702
757
  "info",
@@ -716,6 +771,7 @@
716
771
  "info": {
717
772
  "type": "object",
718
773
  "description": "Title metadata and information.",
774
+ "additionalProperties": false,
719
775
  "required": [
720
776
  "title",
721
777
  "platform"
@@ -723,6 +779,7 @@
723
779
  "properties": {
724
780
  "title": {
725
781
  "type": "string",
782
+ "minLength": 1,
726
783
  "description": "The primary display name of the title."
727
784
  },
728
785
  "alternativeTitles": {
@@ -804,6 +861,7 @@
804
861
  "externalIds": {
805
862
  "type": "object",
806
863
  "description": "Identifiers from external databases for cross-referencing.",
864
+ "additionalProperties": false,
807
865
  "properties": {
808
866
  "igdb": {
809
867
  "type": "integer",
@@ -834,6 +892,30 @@
834
892
  "rating": {
835
893
  "$ref": "#/$defs/ageRating"
836
894
  },
895
+ "license": {
896
+ "$ref": "#/$defs/license",
897
+ "description": "The software license (e.g., 'freeware', 'shareware', 'commercial', 'gpl', 'mit')."
898
+ },
899
+ "ean": {
900
+ "type": "string",
901
+ "pattern": "^[0-9]{13}$",
902
+ "description": "European Article Number (EAN-13) barcode from product packaging. Also covers JAN (Japanese Article Number)."
903
+ },
904
+ "upc": {
905
+ "type": "string",
906
+ "pattern": "^[0-9]{12}$",
907
+ "description": "Universal Product Code (UPC-A) barcode from product packaging."
908
+ },
909
+ "isbn": {
910
+ "type": "string",
911
+ "pattern": "^(97[89][0-9]{10}|[0-9]{9}[0-9X])$",
912
+ "description": "International Standard Book Number (ISBN-10 or ISBN-13) if applicable."
913
+ },
914
+ "issn": {
915
+ "type": "string",
916
+ "pattern": "^[0-9]{4}-[0-9]{3}[0-9X]$",
917
+ "description": "International Standard Serial Number (ISSN) for magazine coverdisks."
918
+ },
837
919
  "notes": {
838
920
  "type": "string",
839
921
  "description": "Additional notes, warnings, or information (e.g. access codes, compatibility notes, copy protection details)."
@@ -851,6 +933,7 @@
851
933
  "assets": {
852
934
  "type": "object",
853
935
  "description": "Artwork, documentation, and other supplementary files.",
936
+ "additionalProperties": false,
854
937
  "properties": {
855
938
  "boxFront": {
856
939
  "$ref": "#/$defs/image",