diff --git a/docs/src/reference/package.md b/docs/src/reference/package.md index d9ce76f950..ffc4ae723d 100644 --- a/docs/src/reference/package.md +++ b/docs/src/reference/package.md @@ -84,13 +84,14 @@ Note that `ValueType`s are not themselves values, but rather types of values. Fo The `package` section contains metadata about the package itself, such as its name and version. -| Property | Type | Description | -| ------------- | --------------------- | --------------------------------------------------------------------------------------------- | -| `id` | `SnakeCaseIdentifier` | _Required_. The package's snake-cased ID. | -| `name` | `String` | _Optional_. A human-readable name for the package. | -| `description` | `String` | _Optional_. A human-readable description of the package. | -| `version` | `String` | _Optional_. The package's version, in `(major, minor, patch)` format. Semantically versioned. | -| `content` | `PackageContent` | A description of the content of this Package. See below. | +| Property | Type | Description | +| ------------- | --------------------- | ------------------------------------------------------------------------------------------------- | +| `id` | `SnakeCaseIdentifier` | _Required_. The package's snake-cased ID. | +| `name` | `String` | _Optional_. A human-readable name for the package. | +| `description` | `String` | _Optional_. A human-readable description of the package. | +| `version` | `String` | _Optional_. The package's version, in `(major, minor, patch)` format. Semantically versioned. | +| `content` | `PackageContent` | _Required_. A description of the content of this Package. See below. | +| `public` | `Bool` | _Optional_. Indicates if this package will be publicly available when deployed. Defaults to true. | #### `PackageContent` diff --git a/shared_crates/package/src/manifest.rs b/shared_crates/package/src/manifest.rs index 489d9b46d8..231d08f214 100644 --- a/shared_crates/package/src/manifest.rs +++ b/shared_crates/package/src/manifest.rs @@ -64,6 +64,8 @@ pub struct Package { #[serde(default)] pub authors: Vec, pub content: PackageContent, + #[serde(default = "return_true")] + pub public: bool, #[serde(default)] pub includes: Vec, } @@ -194,6 +196,7 @@ mod tests { name = "Test" version = "0.0.1" content = { type = "Playable" } + public = false "#; assert_eq!( @@ -233,6 +236,7 @@ mod tests { name = "Tic Tac Toe" version = "0.0.1" content = { type = "Playable" } + public = false [components] cell = { type = "i32", name = "Cell", description = "The ID of the cell this player is in", attributes = ["store"] } @@ -292,6 +296,7 @@ mod tests { name = "Tic Tac Toe" version = "0.0.1" content = { type = "Playable" } + public = false [build.rust] feature-multibuild = ["client"] @@ -326,6 +331,7 @@ mod tests { name = "My Package" version = "0.0.1" content = { type = "Playable" } + public = false [components] "core::transform::rotation" = { type = "quat", name = "Rotation", description = "" } @@ -467,6 +473,7 @@ mod tests { name = "Tic Tac Toe" version = "0.0.1" content = { type = "Playable" } + public = false [enums.CellState] description = "The current cell state" @@ -511,6 +518,7 @@ mod tests { name = "Test" version = "0.0.1" content = { type = "Playable" } + public = false [components] test = { type = "I32", name = "Test", description = "Test" } @@ -587,6 +595,7 @@ mod tests { name = "dependencies" version = "0.0.1" content = { type = "Playable" } + public = false [dependencies] deps_assets = { path = "deps/assets" }