Skip to main content

pacenotes_server/
store.rs

1//! The data root: package zips on disk, the generated manifest that lists
2//! them, and the message of the day.
3//!
4//! ```text
5//! data/rbr/packages/public/codriver/polish/male/Kamil.zip
6//!      ^game        ^dir   ^------------ name -----^
7//! data/motd/<lang>.txt
8//! data/manifest.json
9//! ```
10
11mod derived_version;
12mod file_hash;
13mod game_schema;
14mod generate;
15mod generated;
16mod manifest_file;
17mod manifest_store;
18mod motd;
19mod publish_guards;
20mod requires_check;
21mod sidecar;
22mod sidecar_migration;
23
24#[cfg(test)]
25mod fixture_tree;
26
27pub use derived_version::{derived_version, is_chosen_version, DERIVED_VERSION_PREFIX};
28pub use file_hash::{sha256_bytes, sha256_file};
29pub use game_schema::{parse_schema, BUNDLED_SCHEMAS};
30pub use generate::{generate, generate_with};
31pub use generated::Generated;
32pub use manifest_file::{read_manifest, write_manifest};
33pub use manifest_store::{zip_file, ManifestStore};
34pub use motd::{valid_lang, MOTD_DIR, MOTD_FALLBACK_LANG};
35pub use publish_guards::{metadata_losses, unpublished_games};
36pub use sidecar_migration::{migrate_to_sidecars, Migration};
37
38/// The folder under each game that `manifest gen` scans; anything else in a game folder is ignored.
39pub const PACKAGES_DIR: &str = "packages";
40
41pub const MANIFEST_FILE: &str = "manifest.json";
42
43/// Installers' conflict reports, beside the games but not one.
44pub const REPORTS_DIR: &str = "reports";
45
46/// Folders the server keeps beside the games, which `manifest gen` must not
47/// publish or warn about as games.
48pub const RESERVED_TOP_LEVEL: [&str; 2] = [MOTD_DIR, REPORTS_DIR];