mirror of
https://github.com/rojo-rbx/rojo.git
synced 2026-04-23 06:05:24 +00:00
Roundtrip schemas in syncback (#1173)
This commit is contained in:
@@ -66,6 +66,10 @@ pub struct InstanceMetadata {
|
||||
/// The Middleware that was used to create this Instance. Should generally
|
||||
/// not be `None` except if the snapshotting process is not completed.
|
||||
pub middleware: Option<Middleware>,
|
||||
|
||||
/// A schema provided via a JSON file, if one exists. Will be `None` for
|
||||
/// all non-JSON middleware.
|
||||
pub schema: Option<String>,
|
||||
}
|
||||
|
||||
impl InstanceMetadata {
|
||||
@@ -77,6 +81,7 @@ impl InstanceMetadata {
|
||||
context: InstanceContext::default(),
|
||||
specified_id: None,
|
||||
middleware: None,
|
||||
schema: None,
|
||||
}
|
||||
}
|
||||
|
||||
@@ -121,6 +126,10 @@ impl InstanceMetadata {
|
||||
..self
|
||||
}
|
||||
}
|
||||
|
||||
pub fn schema(self, schema: Option<String>) -> Self {
|
||||
Self { schema, ..self }
|
||||
}
|
||||
}
|
||||
|
||||
impl Default for InstanceMetadata {
|
||||
|
||||
@@ -15,5 +15,5 @@ metadata:
|
||||
emit_legacy_scripts: true
|
||||
specified_id: ~
|
||||
middleware: ~
|
||||
schema: ~
|
||||
children: []
|
||||
|
||||
|
||||
@@ -13,5 +13,5 @@ metadata:
|
||||
emit_legacy_scripts: true
|
||||
specified_id: ~
|
||||
middleware: ~
|
||||
schema: ~
|
||||
children: []
|
||||
|
||||
|
||||
@@ -15,5 +15,5 @@ metadata:
|
||||
emit_legacy_scripts: true
|
||||
specified_id: ~
|
||||
middleware: ~
|
||||
schema: ~
|
||||
children: []
|
||||
|
||||
|
||||
@@ -13,5 +13,5 @@ metadata:
|
||||
emit_legacy_scripts: true
|
||||
specified_id: ~
|
||||
middleware: ~
|
||||
schema: ~
|
||||
children: []
|
||||
|
||||
|
||||
@@ -14,9 +14,9 @@ added_instances:
|
||||
emit_legacy_scripts: true
|
||||
specified_id: ~
|
||||
middleware: ~
|
||||
schema: ~
|
||||
name: New
|
||||
class_name: Folder
|
||||
properties: {}
|
||||
children: []
|
||||
updated_instances: []
|
||||
|
||||
|
||||
Reference in New Issue
Block a user