@retropak/schema 1.0.0-draft → 1.0.0-draft3

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/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-draft3",
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",
@@ -12,15 +13,21 @@
12
13
  "schemas",
13
14
  "locales"
14
15
  ],
16
+ "scripts": {
17
+ "build": "echo 'Schema package has no build step'",
18
+ "validate": "node --input-type=module -e \"import Ajv from 'ajv'; const ajv = new Ajv(); const schema = await import('./schemas/v1/retropak.schema.json', { assert: { type: 'json' } }); const valid = ajv.compile(schema.default); console.log('Schema is valid:', valid.schema.$id);\""
19
+ },
15
20
  "keywords": [
16
21
  "retropak",
17
- "schema"
22
+ "schema",
23
+ "json-schema"
18
24
  ],
19
25
  "author": "piers@retropak.org",
20
26
  "license": "CC0-1.0",
21
27
  "repository": {
22
28
  "type": "git",
23
- "url": "git+https://github.com/piersroberts/retropak.git"
29
+ "url": "git+https://github.com/piersroberts/retropak.git",
30
+ "directory": "packages/schema"
24
31
  },
25
32
  "bugs": {
26
33
  "url": "https://github.com/piersroberts/retropak/issues"
@@ -482,6 +482,7 @@
482
482
  "properties": {
483
483
  "file": {
484
484
  "type": "string",
485
+ "minLength": 1,
485
486
  "description": "Path to the configuration file."
486
487
  },
487
488
  "target": {
@@ -503,6 +504,7 @@
503
504
  "properties": {
504
505
  "file": {
505
506
  "type": "string",
507
+ "minLength": 1,
506
508
  "description": "Path to the image file."
507
509
  },
508
510
  "alt": {
@@ -520,6 +522,7 @@
520
522
  "properties": {
521
523
  "name": {
522
524
  "type": "string",
525
+ "minLength": 1,
523
526
  "description": "Person's name."
524
527
  },
525
528
  "roles": {
@@ -544,6 +547,7 @@
544
547
  },
545
548
  "file": {
546
549
  "type": "string",
550
+ "minLength": 1,
547
551
  "description": "Path to the audio file."
548
552
  },
549
553
  "background": {
@@ -562,6 +566,7 @@
562
566
  "properties": {
563
567
  "file": {
564
568
  "type": "string",
569
+ "minLength": 1,
565
570
  "description": "Path to the physical media image file."
566
571
  },
567
572
  "alt": {
@@ -591,6 +596,7 @@
591
596
  },
592
597
  "filename": {
593
598
  "type": "string",
599
+ "minLength": 1,
594
600
  "description": "Relative path to the media file within the archive."
595
601
  },
596
602
  "label": {
@@ -723,6 +729,7 @@
723
729
  "properties": {
724
730
  "title": {
725
731
  "type": "string",
732
+ "minLength": 1,
726
733
  "description": "The primary display name of the title."
727
734
  },
728
735
  "alternativeTitles": {