mirror of
https://github.com/rojo-rbx/rojo.git
synced 2026-04-20 12:45:05 +00:00
Implement Syncback to support converting Roblox files to a Rojo project (#937)
This is a very large commit. Consider checking the linked PR for more information.
This commit is contained in:
37
CHANGELOG.md
37
CHANGELOG.md
@@ -31,9 +31,46 @@ Making a new release? Simply add the new header with the version and date undern
|
||||
|
||||
## Unreleased
|
||||
|
||||
* A new command `rojo syncback` has been added. It can be used as `rojo syncback [path to project] --input [path to file]`. ([#937])
|
||||
This command takes a Roblox file and pulls Instances out of it and places them in the correct position in the provided project.
|
||||
Syncback is primarily controlled by the project file. Any Instances who are either referenced in the project file or a descendant
|
||||
of one that is will be placed in an appropriate location.
|
||||
|
||||
In addition, a new field has been added to project files, `syncbackRules` to control how it behaves:
|
||||
|
||||
```json
|
||||
{
|
||||
"syncbackRules": {
|
||||
"ignoreTrees": [
|
||||
"ServerStorage/ImportantSecrets",
|
||||
],
|
||||
"ignorePaths": [
|
||||
"src/ServerStorage/Secrets/*"
|
||||
],
|
||||
"ignoreProperties": {
|
||||
"BasePart": ["Color"]
|
||||
},
|
||||
"syncCurrentCamera": false,
|
||||
"syncUnscriptable": true,
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
A brief explanation of each field:
|
||||
|
||||
- `ignoreTrees` is a list of paths in the **roblox file** that should be ignored
|
||||
- `ignorePaths` is a list of paths in the **file system** that should be ignored
|
||||
- `ignoreProperties` is a list of properties that won't be synced back
|
||||
- `syncCurrentCamera` is a toggle for whether to sync back the Workspace's CurrentCamera. Defaults to `false`.
|
||||
- `syncUnscriptable` is a toggle for whether to sync back properties that cannot be set by the Roblox Studio plugin. Defaults to `true`.
|
||||
|
||||
If you are used to the `UpliftGames` version of this feature, there are a few notable differences:
|
||||
- `syncUnscriptable` defaults to `true` instead of `false`
|
||||
- `ignoreTrees` doesn't require the root of the project's name in it.
|
||||
* Fixed bugs and improved performance & UX for the script diff viewer ([#994])
|
||||
* Added support for `.jsonc` files for all JSON-related files (e.g. `.project.jsonc` and `.meta.jsonc`) to accompany JSONC support ([#1159])
|
||||
|
||||
[#937]: https://github.com/rojo-rbx/rojo/pull/937
|
||||
[#994]: https://github.com/rojo-rbx/rojo/pull/994
|
||||
[#1159]: https://github.com/rojo-rbx/rojo/pull/1159
|
||||
|
||||
|
||||
32
Cargo.lock
generated
32
Cargo.lock
generated
@@ -546,6 +546,15 @@ dependencies = [
|
||||
"windows-sys 0.52.0",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "float-cmp"
|
||||
version = "0.9.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "98de4bbd547a563b716d8dfa9aad1cb19bfab00f4fa09a6a4ed21dbcf44ce9c4"
|
||||
dependencies = [
|
||||
"num-traits",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "fnv"
|
||||
version = "1.0.7"
|
||||
@@ -765,7 +774,7 @@ dependencies = [
|
||||
"futures-sink",
|
||||
"futures-util",
|
||||
"http",
|
||||
"indexmap 2.2.5",
|
||||
"indexmap 2.10.0",
|
||||
"slab",
|
||||
"tokio",
|
||||
"tokio-util",
|
||||
@@ -784,12 +793,6 @@ version = "0.12.3"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "8a9ee70c43aaf417c914396645a0fa852624801b24ebb7ae78fe8272889ac888"
|
||||
|
||||
[[package]]
|
||||
name = "hashbrown"
|
||||
version = "0.14.3"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "290f1a1d9242c78d09ce40a5e87e7554ee637af1351968159f4952f028f75604"
|
||||
|
||||
[[package]]
|
||||
name = "hashbrown"
|
||||
version = "0.15.4"
|
||||
@@ -935,12 +938,13 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "indexmap"
|
||||
version = "2.2.5"
|
||||
version = "2.10.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "7b0b929d511467233429c45a44ac1dcaa21ba0f5ba11e4879e6ed28ddb4f9df4"
|
||||
checksum = "fe4cd85333e22411419a0bcae1297d25e58c9443848b11dc6a86fefe8c78a661"
|
||||
dependencies = [
|
||||
"equivalent",
|
||||
"hashbrown 0.14.3",
|
||||
"hashbrown 0.15.4",
|
||||
"serde",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
@@ -1635,6 +1639,7 @@ dependencies = [
|
||||
"rbx_dom_weak",
|
||||
"rbx_reflection",
|
||||
"rbx_reflection_database",
|
||||
"serde",
|
||||
"thiserror",
|
||||
"zstd",
|
||||
]
|
||||
@@ -1898,6 +1903,7 @@ dependencies = [
|
||||
"anyhow",
|
||||
"backtrace",
|
||||
"bincode",
|
||||
"blake3",
|
||||
"clap 3.2.25",
|
||||
"criterion",
|
||||
"crossbeam-channel",
|
||||
@@ -1905,11 +1911,13 @@ dependencies = [
|
||||
"data-encoding",
|
||||
"embed-resource",
|
||||
"env_logger",
|
||||
"float-cmp",
|
||||
"fs-err",
|
||||
"futures",
|
||||
"globset",
|
||||
"humantime",
|
||||
"hyper",
|
||||
"indexmap 2.10.0",
|
||||
"insta",
|
||||
"jod-thread",
|
||||
"jsonc-parser",
|
||||
@@ -2962,9 +2970,9 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "yaml-rust2"
|
||||
version = "0.10.3"
|
||||
version = "0.10.4"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "4ce2a4ff45552406d02501cea6c18d8a7e50228e7736a872951fe2fe75c91be7"
|
||||
checksum = "2462ea039c445496d8793d052e13787f2b90e750b833afee748e601c17621ed9"
|
||||
dependencies = [
|
||||
"arraydeque",
|
||||
"encoding_rs",
|
||||
|
||||
@@ -55,7 +55,7 @@ memofs = { version = "0.3.0", path = "crates/memofs" }
|
||||
# rbx_reflection_database = { path = "../rbx-dom/rbx_reflection_database" }
|
||||
# rbx_xml = { path = "../rbx-dom/rbx_xml" }
|
||||
|
||||
rbx_binary = "2.0.0"
|
||||
rbx_binary = { version = "2.0.0", features = ["unstable_text_format"] }
|
||||
rbx_dom_weak = "4.0.0"
|
||||
rbx_reflection = "6.0.0"
|
||||
rbx_reflection_database = "2.0.1"
|
||||
@@ -97,6 +97,10 @@ profiling = "1.0.15"
|
||||
yaml-rust2 = "0.10.3"
|
||||
data-encoding = "2.8.0"
|
||||
|
||||
blake3 = "1.5.0"
|
||||
float-cmp = "0.9.0"
|
||||
indexmap = { version = "2.10.0", features = ["serde"] }
|
||||
|
||||
[target.'cfg(windows)'.dependencies]
|
||||
winreg = "0.10.1"
|
||||
|
||||
|
||||
@@ -5,6 +5,7 @@
|
||||
## 0.3.0 (2024-03-15)
|
||||
* Changed `StdBackend` file watching component to use minimal recursive watches. [#830]
|
||||
* Added `Vfs::read_to_string` and `Vfs::read_to_string_lf_normalized` [#854]
|
||||
* Added `create_dir` and `create_dir_all` to allow creating directories.
|
||||
|
||||
[#830]: https://github.com/rojo-rbx/rojo/pull/830
|
||||
[#854]: https://github.com/rojo-rbx/rojo/pull/854
|
||||
|
||||
@@ -176,6 +176,21 @@ impl VfsBackend for InMemoryFs {
|
||||
}
|
||||
}
|
||||
|
||||
fn create_dir(&mut self, path: &Path) -> io::Result<()> {
|
||||
let mut inner = self.inner.lock().unwrap();
|
||||
inner.load_snapshot(path.to_path_buf(), VfsSnapshot::empty_dir())
|
||||
}
|
||||
|
||||
fn create_dir_all(&mut self, path: &Path) -> io::Result<()> {
|
||||
let mut inner = self.inner.lock().unwrap();
|
||||
let mut path_buf = path.to_path_buf();
|
||||
while let Some(parent) = path_buf.parent() {
|
||||
inner.load_snapshot(parent.to_path_buf(), VfsSnapshot::empty_dir())?;
|
||||
path_buf.pop();
|
||||
}
|
||||
inner.load_snapshot(path.to_path_buf(), VfsSnapshot::empty_dir())
|
||||
}
|
||||
|
||||
fn remove_file(&mut self, path: &Path) -> io::Result<()> {
|
||||
let mut inner = self.inner.lock().unwrap();
|
||||
|
||||
|
||||
@@ -71,6 +71,8 @@ pub trait VfsBackend: sealed::Sealed + Send + 'static {
|
||||
fn read(&mut self, path: &Path) -> io::Result<Vec<u8>>;
|
||||
fn write(&mut self, path: &Path, data: &[u8]) -> io::Result<()>;
|
||||
fn read_dir(&mut self, path: &Path) -> io::Result<ReadDir>;
|
||||
fn create_dir(&mut self, path: &Path) -> io::Result<()>;
|
||||
fn create_dir_all(&mut self, path: &Path) -> io::Result<()>;
|
||||
fn metadata(&mut self, path: &Path) -> io::Result<Metadata>;
|
||||
fn remove_file(&mut self, path: &Path) -> io::Result<()>;
|
||||
fn remove_dir_all(&mut self, path: &Path) -> io::Result<()>;
|
||||
@@ -190,6 +192,16 @@ impl VfsInner {
|
||||
Ok(dir)
|
||||
}
|
||||
|
||||
fn create_dir<P: AsRef<Path>>(&mut self, path: P) -> io::Result<()> {
|
||||
let path = path.as_ref();
|
||||
self.backend.create_dir(path)
|
||||
}
|
||||
|
||||
fn create_dir_all<P: AsRef<Path>>(&mut self, path: P) -> io::Result<()> {
|
||||
let path = path.as_ref();
|
||||
self.backend.create_dir_all(path)
|
||||
}
|
||||
|
||||
fn remove_file<P: AsRef<Path>>(&mut self, path: P) -> io::Result<()> {
|
||||
let path = path.as_ref();
|
||||
let _ = self.backend.unwatch(path);
|
||||
@@ -326,6 +338,31 @@ impl Vfs {
|
||||
self.inner.lock().unwrap().read_dir(path)
|
||||
}
|
||||
|
||||
/// Creates a directory at the provided location.
|
||||
///
|
||||
/// Roughly equivalent to [`std::fs::create_dir`][std::fs::create_dir].
|
||||
/// Similiar to that function, this function will fail if the parent of the
|
||||
/// path does not exist.
|
||||
///
|
||||
/// [std::fs::create_dir]: https://doc.rust-lang.org/stable/std/fs/fn.create_dir.html
|
||||
#[inline]
|
||||
pub fn create_dir<P: AsRef<Path>>(&self, path: P) -> io::Result<()> {
|
||||
let path = path.as_ref();
|
||||
self.inner.lock().unwrap().create_dir(path)
|
||||
}
|
||||
|
||||
/// Creates a directory at the provided location, recursively creating
|
||||
/// all parent components if they are missing.
|
||||
///
|
||||
/// Roughly equivalent to [`std::fs::create_dir_all`][std::fs::create_dir_all].
|
||||
///
|
||||
/// [std::fs::create_dir_all]: https://doc.rust-lang.org/stable/std/fs/fn.create_dir_all.html
|
||||
#[inline]
|
||||
pub fn create_dir_all<P: AsRef<Path>>(&self, path: P) -> io::Result<()> {
|
||||
let path = path.as_ref();
|
||||
self.inner.lock().unwrap().create_dir_all(path)
|
||||
}
|
||||
|
||||
/// Remove a file.
|
||||
///
|
||||
/// Roughly equivalent to [`std::fs::remove_file`][std::fs::remove_file].
|
||||
@@ -428,6 +465,31 @@ impl VfsLock<'_> {
|
||||
self.inner.read_dir(path)
|
||||
}
|
||||
|
||||
/// Creates a directory at the provided location.
|
||||
///
|
||||
/// Roughly equivalent to [`std::fs::create_dir`][std::fs::create_dir].
|
||||
/// Similiar to that function, this function will fail if the parent of the
|
||||
/// path does not exist.
|
||||
///
|
||||
/// [std::fs::create_dir]: https://doc.rust-lang.org/stable/std/fs/fn.create_dir.html
|
||||
#[inline]
|
||||
pub fn create_dir<P: AsRef<Path>>(&mut self, path: P) -> io::Result<()> {
|
||||
let path = path.as_ref();
|
||||
self.inner.create_dir(path)
|
||||
}
|
||||
|
||||
/// Creates a directory at the provided location, recursively creating
|
||||
/// all parent components if they are missing.
|
||||
///
|
||||
/// Roughly equivalent to [`std::fs::create_dir_all`][std::fs::create_dir_all].
|
||||
///
|
||||
/// [std::fs::create_dir_all]: https://doc.rust-lang.org/stable/std/fs/fn.create_dir_all.html
|
||||
#[inline]
|
||||
pub fn create_dir_all<P: AsRef<Path>>(&mut self, path: P) -> io::Result<()> {
|
||||
let path = path.as_ref();
|
||||
self.inner.create_dir_all(path)
|
||||
}
|
||||
|
||||
/// Remove a file.
|
||||
///
|
||||
/// Roughly equivalent to [`std::fs::remove_file`][std::fs::remove_file].
|
||||
|
||||
@@ -26,6 +26,20 @@ impl VfsBackend for NoopBackend {
|
||||
Err(io::Error::other("NoopBackend doesn't do anything"))
|
||||
}
|
||||
|
||||
fn create_dir(&mut self, _path: &Path) -> io::Result<()> {
|
||||
Err(io::Error::new(
|
||||
io::ErrorKind::Other,
|
||||
"NoopBackend doesn't do anything",
|
||||
))
|
||||
}
|
||||
|
||||
fn create_dir_all(&mut self, _path: &Path) -> io::Result<()> {
|
||||
Err(io::Error::new(
|
||||
io::ErrorKind::Other,
|
||||
"NoopBackend doesn't do anything",
|
||||
))
|
||||
}
|
||||
|
||||
fn remove_file(&mut self, _path: &Path) -> io::Result<()> {
|
||||
Err(io::Error::other("NoopBackend doesn't do anything"))
|
||||
}
|
||||
|
||||
@@ -78,6 +78,14 @@ impl VfsBackend for StdBackend {
|
||||
})
|
||||
}
|
||||
|
||||
fn create_dir(&mut self, path: &Path) -> io::Result<()> {
|
||||
fs_err::create_dir(path)
|
||||
}
|
||||
|
||||
fn create_dir_all(&mut self, path: &Path) -> io::Result<()> {
|
||||
fs_err::create_dir_all(path)
|
||||
}
|
||||
|
||||
fn remove_file(&mut self, path: &Path) -> io::Result<()> {
|
||||
fs_err::remove_file(path)
|
||||
}
|
||||
|
||||
@@ -0,0 +1,6 @@
|
||||
---
|
||||
source: tests/rojo_test/syncback_util.rs
|
||||
expression: "String::from_utf8_lossy(&output.stdout)"
|
||||
---
|
||||
Writing OnlyOneCopy/child_of_one.luau
|
||||
Writing ReplicatedStorage/child_replicated_storage.luau
|
||||
@@ -0,0 +1,7 @@
|
||||
---
|
||||
source: tests/rojo_test/syncback_util.rs
|
||||
expression: "String::from_utf8_lossy(&output.stdout)"
|
||||
---
|
||||
Writing src/csv.csv
|
||||
Writing src/csv_init/init.csv
|
||||
Writing src/csv_init
|
||||
@@ -0,0 +1,5 @@
|
||||
---
|
||||
source: tests/rojo_test/syncback_util.rs
|
||||
expression: "String::from_utf8_lossy(&output.stdout)"
|
||||
---
|
||||
Writing container.model.json
|
||||
@@ -0,0 +1,7 @@
|
||||
---
|
||||
source: tests/rojo_test/syncback_util.rs
|
||||
expression: "String::from_utf8_lossy(&output.stdout)"
|
||||
---
|
||||
Writing src/int_value.model.json
|
||||
Writing src/subfolder/string_value.txt
|
||||
Writing src/subfolder
|
||||
@@ -0,0 +1,6 @@
|
||||
---
|
||||
source: tests/rojo_test/syncback_util.rs
|
||||
expression: "String::from_utf8_lossy(&output.stdout)"
|
||||
---
|
||||
Writing src/non-init.luau
|
||||
Writing src/init-file
|
||||
@@ -0,0 +1,73 @@
|
||||
---
|
||||
source: tests/rojo_test/syncback_util.rs
|
||||
expression: src/Message.rbxm
|
||||
---
|
||||
num_types: 1
|
||||
num_instances: 1
|
||||
chunks:
|
||||
- Inst:
|
||||
type_id: 0
|
||||
type_name: Message
|
||||
object_format: 0
|
||||
referents:
|
||||
- 0
|
||||
- Prop:
|
||||
type_id: 0
|
||||
prop_name: AttributesSerialize
|
||||
prop_type: String
|
||||
values:
|
||||
- ""
|
||||
- Prop:
|
||||
type_id: 0
|
||||
prop_name: Capabilities
|
||||
prop_type: SecurityCapabilities
|
||||
values:
|
||||
- 0
|
||||
- Prop:
|
||||
type_id: 0
|
||||
prop_name: HistoryId
|
||||
prop_type: UniqueId
|
||||
values:
|
||||
- "00000000000000000000000000000000"
|
||||
- Prop:
|
||||
type_id: 0
|
||||
prop_name: Name
|
||||
prop_type: String
|
||||
values:
|
||||
- Message
|
||||
- Prop:
|
||||
type_id: 0
|
||||
prop_name: DefinesCapabilities
|
||||
prop_type: Bool
|
||||
values:
|
||||
- false
|
||||
- Prop:
|
||||
type_id: 0
|
||||
prop_name: SourceAssetId
|
||||
prop_type: Int64
|
||||
values:
|
||||
- -1
|
||||
- Prop:
|
||||
type_id: 0
|
||||
prop_name: Tags
|
||||
prop_type: String
|
||||
values:
|
||||
- ""
|
||||
- Prop:
|
||||
type_id: 0
|
||||
prop_name: Text
|
||||
prop_type: String
|
||||
values:
|
||||
- This message should be written to the disk.
|
||||
- Prop:
|
||||
type_id: 0
|
||||
prop_name: UniqueId
|
||||
prop_type: UniqueId
|
||||
values:
|
||||
- 2030b7775c30713f085b9d4800005a8b
|
||||
- Prnt:
|
||||
version: 0
|
||||
links:
|
||||
- - 0
|
||||
- -1
|
||||
- End
|
||||
@@ -0,0 +1,5 @@
|
||||
---
|
||||
source: tests/rojo_test/syncback_util.rs
|
||||
expression: "String::from_utf8_lossy(&output.stdout)"
|
||||
---
|
||||
Writing src/Message.rbxm
|
||||
@@ -0,0 +1,6 @@
|
||||
---
|
||||
source: tests/rojo_test/syncback_util.rs
|
||||
expression: "String::from_utf8_lossy(&output.stdout)"
|
||||
---
|
||||
Writing src/IncludeMe/.gitkeep
|
||||
Writing src/IncludeMe
|
||||
@@ -0,0 +1,5 @@
|
||||
---
|
||||
source: tests/rojo_test/syncback_util.rs
|
||||
expression: "String::from_utf8_lossy(&output.stdout)"
|
||||
---
|
||||
|
||||
@@ -0,0 +1,8 @@
|
||||
---
|
||||
source: tests/rojo_test/syncback_util.rs
|
||||
expression: "String::from_utf8_lossy(&output.stdout)"
|
||||
---
|
||||
Writing src/dir_with_meta/init.meta.json
|
||||
Writing src/model_json.model.json
|
||||
Writing src/project_json.project.json
|
||||
Writing src/dir_with_meta
|
||||
@@ -0,0 +1,6 @@
|
||||
---
|
||||
source: tests/rojo_test/syncback_util.rs
|
||||
expression: "String::from_utf8_lossy(&output.stdout)"
|
||||
---
|
||||
Writing nested.project.json
|
||||
Writing string_value.txt
|
||||
@@ -0,0 +1,6 @@
|
||||
---
|
||||
source: tests/rojo_test/syncback_util.rs
|
||||
expression: "String::from_utf8_lossy(&output.stdout)"
|
||||
---
|
||||
Writing src/modules/ClientModule.luau
|
||||
Writing src/modules/ServerModule.luau
|
||||
@@ -0,0 +1,6 @@
|
||||
---
|
||||
source: tests/rojo_test/syncback_util.rs
|
||||
expression: "String::from_utf8_lossy(&output.stdout)"
|
||||
---
|
||||
Writing src/init.luau
|
||||
Writing src
|
||||
@@ -0,0 +1,6 @@
|
||||
---
|
||||
source: tests/rojo_test/syncback_util.rs
|
||||
expression: "String::from_utf8_lossy(&output.stdout)"
|
||||
---
|
||||
Writing attribute_mismatch.luau
|
||||
Writing property_mismatch.project.json
|
||||
@@ -0,0 +1,73 @@
|
||||
---
|
||||
source: tests/rojo_test/syncback_util.rs
|
||||
expression: src/ChildWithDuplicates.rbxm
|
||||
---
|
||||
num_types: 1
|
||||
num_instances: 3
|
||||
chunks:
|
||||
- Inst:
|
||||
type_id: 0
|
||||
type_name: Folder
|
||||
object_format: 0
|
||||
referents:
|
||||
- 0
|
||||
- 1
|
||||
- 2
|
||||
- Prop:
|
||||
type_id: 0
|
||||
prop_name: AttributesSerialize
|
||||
prop_type: String
|
||||
values:
|
||||
- ""
|
||||
- ""
|
||||
- ""
|
||||
- Prop:
|
||||
type_id: 0
|
||||
prop_name: Capabilities
|
||||
prop_type: SecurityCapabilities
|
||||
values:
|
||||
- 0
|
||||
- 0
|
||||
- 0
|
||||
- Prop:
|
||||
type_id: 0
|
||||
prop_name: Name
|
||||
prop_type: String
|
||||
values:
|
||||
- DuplicateChild
|
||||
- DuplicateChild
|
||||
- ChildWithDuplicates
|
||||
- Prop:
|
||||
type_id: 0
|
||||
prop_name: DefinesCapabilities
|
||||
prop_type: Bool
|
||||
values:
|
||||
- false
|
||||
- false
|
||||
- false
|
||||
- Prop:
|
||||
type_id: 0
|
||||
prop_name: SourceAssetId
|
||||
prop_type: Int64
|
||||
values:
|
||||
- -1
|
||||
- -1
|
||||
- -1
|
||||
- Prop:
|
||||
type_id: 0
|
||||
prop_name: Tags
|
||||
prop_type: String
|
||||
values:
|
||||
- ""
|
||||
- ""
|
||||
- ""
|
||||
- Prnt:
|
||||
version: 0
|
||||
links:
|
||||
- - 0
|
||||
- 2
|
||||
- - 1
|
||||
- 2
|
||||
- - 2
|
||||
- -1
|
||||
- End
|
||||
@@ -0,0 +1,9 @@
|
||||
---
|
||||
source: tests/rojo_test/syncback_util.rs
|
||||
expression: "String::from_utf8_lossy(&output.stdout)"
|
||||
---
|
||||
Writing src/ChildWithDuplicates.rbxm
|
||||
Writing src/ChildWithoutDuplicates/Child/.gitkeep
|
||||
Writing src/ChildWithoutDuplicates
|
||||
Writing src/ChildWithoutDuplicates/Child
|
||||
Removing src/ChildWithDuplicates
|
||||
@@ -0,0 +1,6 @@
|
||||
---
|
||||
source: tests/rojo_test/syncback_util.rs
|
||||
expression: "String::from_utf8_lossy(&output.stdout)"
|
||||
---
|
||||
Writing src/pointer.model.json
|
||||
Writing src/target.model.json
|
||||
@@ -0,0 +1,7 @@
|
||||
---
|
||||
source: tests/rojo_test/syncback_util.rs
|
||||
expression: "String::from_utf8_lossy(&output.stdout)"
|
||||
---
|
||||
Writing src/pointer.model.json
|
||||
Writing src/target.meta.json
|
||||
Writing src/target.txt
|
||||
@@ -0,0 +1,6 @@
|
||||
---
|
||||
source: tests/rojo_test/syncback_util.rs
|
||||
expression: "String::from_utf8_lossy(&output.stdout)"
|
||||
---
|
||||
Writing src/Pointer_2.model.json
|
||||
Writing src/Target_2.model.json
|
||||
@@ -0,0 +1,5 @@
|
||||
---
|
||||
source: tests/rojo_test/syncback_util.rs
|
||||
expression: "String::from_utf8_lossy(&output.stdout)"
|
||||
---
|
||||
|
||||
@@ -0,0 +1,55 @@
|
||||
---
|
||||
source: tests/rojo_test/syncback_util.rs
|
||||
expression: src/rbxm.rbxm
|
||||
---
|
||||
num_types: 1
|
||||
num_instances: 1
|
||||
chunks:
|
||||
- Inst:
|
||||
type_id: 0
|
||||
type_name: Folder
|
||||
object_format: 0
|
||||
referents:
|
||||
- 0
|
||||
- Prop:
|
||||
type_id: 0
|
||||
prop_name: AttributesSerialize
|
||||
prop_type: String
|
||||
values:
|
||||
- ""
|
||||
- Prop:
|
||||
type_id: 0
|
||||
prop_name: Capabilities
|
||||
prop_type: SecurityCapabilities
|
||||
values:
|
||||
- 0
|
||||
- Prop:
|
||||
type_id: 0
|
||||
prop_name: Name
|
||||
prop_type: String
|
||||
values:
|
||||
- rbxm
|
||||
- Prop:
|
||||
type_id: 0
|
||||
prop_name: DefinesCapabilities
|
||||
prop_type: Bool
|
||||
values:
|
||||
- false
|
||||
- Prop:
|
||||
type_id: 0
|
||||
prop_name: SourceAssetId
|
||||
prop_type: Int64
|
||||
values:
|
||||
- -1
|
||||
- Prop:
|
||||
type_id: 0
|
||||
prop_name: Tags
|
||||
prop_type: String
|
||||
values:
|
||||
- rbxmx
|
||||
- Prnt:
|
||||
version: 0
|
||||
links:
|
||||
- - 0
|
||||
- -1
|
||||
- End
|
||||
@@ -0,0 +1,8 @@
|
||||
---
|
||||
source: tests/rojo_test/syncback_util.rs
|
||||
expression: "String::from_utf8_lossy(&output.stdout)"
|
||||
---
|
||||
Writing default.project.json
|
||||
Writing src/model_json.model.json
|
||||
Writing src/rbxm.rbxm
|
||||
Writing src/rbxmx.rbxmx
|
||||
@@ -0,0 +1,6 @@
|
||||
---
|
||||
source: tests/rojo_test/syncback_util.rs
|
||||
expression: "String::from_utf8_lossy(&output.stdout)"
|
||||
---
|
||||
Writing default.project.json
|
||||
Writing string_value.txt
|
||||
@@ -0,0 +1,6 @@
|
||||
---
|
||||
source: tests/rojo_test/syncback_util.rs
|
||||
expression: "String::from_utf8_lossy(&output.stdout)"
|
||||
---
|
||||
Writing src/module.modulescript
|
||||
Writing src/text.text
|
||||
@@ -0,0 +1,5 @@
|
||||
---
|
||||
source: tests/rojo_test/syncback_util.rs
|
||||
expression: "String::from_utf8_lossy(&output.stdout)"
|
||||
---
|
||||
Writing default.project.json
|
||||
@@ -0,0 +1,5 @@
|
||||
---
|
||||
source: tests/tests/syncback.rs
|
||||
expression: OnlyOneCopy/child_of_one.luau
|
||||
---
|
||||
-- this should be in OnlyOneCopy/child_of_one
|
||||
@@ -0,0 +1,5 @@
|
||||
---
|
||||
source: tests/tests/syncback.rs
|
||||
expression: ReplicatedStorage/child_replicated_storage.luau
|
||||
---
|
||||
-- -- this should be in child_replicated_storage
|
||||
@@ -0,0 +1,6 @@
|
||||
---
|
||||
source: tests/tests/syncback.rs
|
||||
expression: src/csv.csv
|
||||
---
|
||||
Key,Source,Context,Example,es
|
||||
Ack,Ack!,,An exclamation of despair,¡Ay!
|
||||
@@ -0,0 +1,6 @@
|
||||
---
|
||||
source: tests/tests/syncback.rs
|
||||
expression: src/csv_init/init.csv
|
||||
---
|
||||
Key,Source,Context,Example,en
|
||||
Rojo,Rojo,,Rojo is a really cool program,Red
|
||||
@@ -0,0 +1,25 @@
|
||||
---
|
||||
source: tests/tests/syncback.rs
|
||||
expression: container.model.json
|
||||
---
|
||||
{
|
||||
"className": "Folder",
|
||||
"children": [
|
||||
{
|
||||
"name": "value_1",
|
||||
"className": "ObjectValue",
|
||||
"attributes": {
|
||||
"Rojo_Id": "value_1",
|
||||
"Rojo_Target_Value": "value_1"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "value_2",
|
||||
"className": "ObjectValue",
|
||||
"attributes": {
|
||||
"Rojo_Id": "72bc28150ada2e6206442ee300004084",
|
||||
"Rojo_Target_Value": "72bc28150ada2e6206442ee300004084"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,10 @@
|
||||
---
|
||||
source: tests/tests/syncback.rs
|
||||
expression: src/int_value.model.json
|
||||
---
|
||||
{
|
||||
"className": "IntValue",
|
||||
"properties": {
|
||||
"Value": 1337.0
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,5 @@
|
||||
---
|
||||
source: tests/tests/syncback.rs
|
||||
expression: src/subfolder/string_value.txt
|
||||
---
|
||||
This memorial dedicated to Club Penguin.
|
||||
@@ -0,0 +1,5 @@
|
||||
---
|
||||
source: tests/tests/syncback.rs
|
||||
expression: src/init-file/init.luau
|
||||
---
|
||||
-- This file SHOULD NOT be updated
|
||||
@@ -0,0 +1,6 @@
|
||||
---
|
||||
source: tests/tests/syncback.rs
|
||||
expression: src/non-init.luau
|
||||
---
|
||||
-- This module SHOULD be updated
|
||||
-- This text is new.
|
||||
@@ -0,0 +1,12 @@
|
||||
---
|
||||
source: tests/tests/syncback.rs
|
||||
expression: src/dir_with_meta/init.meta.json
|
||||
---
|
||||
{
|
||||
"properties": {
|
||||
"Tags": [
|
||||
"This tag on dir_with_meta"
|
||||
]
|
||||
},
|
||||
"className": "Configuration"
|
||||
}
|
||||
@@ -0,0 +1,10 @@
|
||||
---
|
||||
source: tests/tests/syncback.rs
|
||||
expression: src/model_json.model.json
|
||||
---
|
||||
{
|
||||
"className": "StringValue",
|
||||
"properties": {
|
||||
"Value": "This text is model_json"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,17 @@
|
||||
---
|
||||
source: tests/tests/syncback.rs
|
||||
expression: src/project_json.project.json
|
||||
---
|
||||
{
|
||||
"name": "project_json",
|
||||
"tree": {
|
||||
"$className": "Color3Value",
|
||||
"$properties": {
|
||||
"Value": [
|
||||
1337.0,
|
||||
-1337.0,
|
||||
1337.0
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,19 @@
|
||||
---
|
||||
source: tests/tests/syncback.rs
|
||||
expression: nested.project.json
|
||||
---
|
||||
{
|
||||
"name": "Nested",
|
||||
"tree": {
|
||||
"$className": "Configuration",
|
||||
"BoolValue": {
|
||||
"$className": "BoolValue",
|
||||
"$properties": {
|
||||
"Value": true
|
||||
}
|
||||
},
|
||||
"StringValue": {
|
||||
"$path": "string_value.txt"
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,5 @@
|
||||
---
|
||||
source: tests/tests/syncback.rs
|
||||
expression: string_value.txt
|
||||
---
|
||||
Nested project string value :-)
|
||||
@@ -0,0 +1,5 @@
|
||||
---
|
||||
source: tests/tests/syncback.rs
|
||||
expression: src/modules/ClientModule.luau
|
||||
---
|
||||
-- Client module
|
||||
@@ -0,0 +1,5 @@
|
||||
---
|
||||
source: tests/tests/syncback.rs
|
||||
expression: src/modules/ServerModule.luau
|
||||
---
|
||||
-- Server module
|
||||
@@ -0,0 +1,5 @@
|
||||
---
|
||||
source: tests/tests/syncback.rs
|
||||
expression: src/init.luau
|
||||
---
|
||||
-- Project init script
|
||||
@@ -0,0 +1,5 @@
|
||||
---
|
||||
source: tests/tests/syncback.rs
|
||||
expression: attribute_mismatch.luau
|
||||
---
|
||||
-- This script is a part of project_reserialize
|
||||
@@ -0,0 +1,15 @@
|
||||
---
|
||||
source: tests/tests/syncback.rs
|
||||
expression: property_mismatch.project.json
|
||||
---
|
||||
{
|
||||
"name": "property_mismatch",
|
||||
"tree": {
|
||||
"$className": "BrickColorValue",
|
||||
"$properties": {
|
||||
"Value": {
|
||||
"BrickColor": 345
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,10 @@
|
||||
---
|
||||
source: tests/tests/syncback.rs
|
||||
expression: src/pointer.model.json
|
||||
---
|
||||
{
|
||||
"className": "ObjectValue",
|
||||
"attributes": {
|
||||
"Rojo_Target_Value": "test referent id"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,10 @@
|
||||
---
|
||||
source: tests/tests/syncback.rs
|
||||
expression: src/target.model.json
|
||||
---
|
||||
{
|
||||
"className": "Folder",
|
||||
"attributes": {
|
||||
"Rojo_Id": "test referent id"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,10 @@
|
||||
---
|
||||
source: tests/tests/syncback.rs
|
||||
expression: src/pointer.model.json
|
||||
---
|
||||
{
|
||||
"className": "ObjectValue",
|
||||
"attributes": {
|
||||
"Rojo_Target_Value": "62e89c49e4f800c20629c71b00003fc0"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
---
|
||||
source: tests/tests/syncback.rs
|
||||
expression: src/target.meta.json
|
||||
---
|
||||
{
|
||||
"attributes": {
|
||||
"Rojo_Id": "62e89c49e4f800c20629c71b00003fc0"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,5 @@
|
||||
---
|
||||
source: tests/tests/syncback.rs
|
||||
expression: src/target.txt
|
||||
---
|
||||
This is a target.
|
||||
@@ -0,0 +1,11 @@
|
||||
---
|
||||
source: tests/tests/syncback.rs
|
||||
assertion_line: 28
|
||||
expression: src/Pointer_2.model.json
|
||||
---
|
||||
{
|
||||
"className": "ObjectValue",
|
||||
"attributes": {
|
||||
"Rojo_Target_Value": "0bd3e9e11879191708a2bc4a00000c20"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
---
|
||||
source: tests/tests/syncback.rs
|
||||
assertion_line: 28
|
||||
expression: src/Target_2.model.json
|
||||
---
|
||||
{
|
||||
"className": "Folder",
|
||||
"attributes": {
|
||||
"Rojo_Id": "0bd3e9e11879191708a2bc4a00000c20"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
---
|
||||
source: tests/tests/syncback.rs
|
||||
expression: default.project.json
|
||||
---
|
||||
{
|
||||
"name": "respect_old_middleware",
|
||||
"tree": {
|
||||
"project_node": {
|
||||
"$className": "BoolValue",
|
||||
"$properties": {
|
||||
"Value": true
|
||||
}
|
||||
},
|
||||
"$path": "src"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,10 @@
|
||||
---
|
||||
source: tests/tests/syncback.rs
|
||||
expression: src/model_json.model.json
|
||||
---
|
||||
{
|
||||
"className": "StringValue",
|
||||
"properties": {
|
||||
"Value": "This should be a .model.json file"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
---
|
||||
source: tests/tests/syncback.rs
|
||||
expression: src/rbxmx.rbxmx
|
||||
---
|
||||
<roblox version="4">
|
||||
<Item class="Folder" referent="0">
|
||||
<Properties>
|
||||
<string name="Name">rbxmx</string>
|
||||
<BinaryString name="AttributesSerialize"></BinaryString>
|
||||
<SecurityCapabilities name="Capabilities">0</SecurityCapabilities>
|
||||
<bool name="DefinesCapabilities">false</bool>
|
||||
<int64 name="SourceAssetId">-1</int64>
|
||||
<BinaryString name="Tags">cmJ4bXg=</BinaryString>
|
||||
</Properties>
|
||||
</Item>
|
||||
</roblox>
|
||||
@@ -0,0 +1,22 @@
|
||||
---
|
||||
source: tests/tests/syncback.rs
|
||||
expression: default.project.json
|
||||
---
|
||||
{
|
||||
"name": "string_value_project",
|
||||
"tree": {
|
||||
"$className": "Folder",
|
||||
"inside_project_file": {
|
||||
"$className": "StringValue",
|
||||
"$properties": {
|
||||
"Value": "imgettingverytiredofwritingthesetests2"
|
||||
}
|
||||
},
|
||||
"on_file_system": {
|
||||
"$attributes": {
|
||||
"imgettingverytiredofwritingthesetests": "person299 was ahead of his time"
|
||||
},
|
||||
"$path": "string_value.txt"
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,6 @@
|
||||
---
|
||||
source: tests/tests/syncback.rs
|
||||
expression: src/module.modulescript
|
||||
---
|
||||
-- This should be a in the file 'module.modulescript'. It should be updated to have a second line.
|
||||
-- This is the second line in 'module.modulescript'.
|
||||
@@ -0,0 +1,6 @@
|
||||
---
|
||||
source: tests/tests/syncback.rs
|
||||
expression: src/text.text
|
||||
---
|
||||
-- This should be a in the file 'text.text'. It should be updated to have a second line.
|
||||
-- This is the second line in 'text.text'.
|
||||
@@ -0,0 +1,18 @@
|
||||
---
|
||||
source: tests/tests/syncback.rs
|
||||
expression: default.project.json
|
||||
---
|
||||
{
|
||||
"name": "unscriptable_properties",
|
||||
"tree": {
|
||||
"$className": "BinaryStringValue",
|
||||
"$properties": {
|
||||
"Value": {
|
||||
"BinaryString": "Rojo/is/cool"
|
||||
}
|
||||
}
|
||||
},
|
||||
"syncbackRules": {
|
||||
"syncUnscriptable": true
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,12 @@
|
||||
{
|
||||
"name": "child_but_not",
|
||||
"tree": {
|
||||
"$className": "DataModel",
|
||||
"ReplicatedStorage": {
|
||||
"$path": "ReplicatedStorage",
|
||||
"OnlyOneCopy": {
|
||||
"$path": "OnlyOneCopy"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
BIN
rojo-test/syncback-tests/child_but_not/input.rbxl
Normal file
BIN
rojo-test/syncback-tests/child_but_not/input.rbxl
Normal file
Binary file not shown.
@@ -0,0 +1,6 @@
|
||||
{
|
||||
"name": "csv",
|
||||
"tree": {
|
||||
"$path": "src"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,2 @@
|
||||
Key,Source,Context,Example,en
|
||||
,,,,
|
||||
|
BIN
rojo-test/syncback-tests/csv/input.rbxm
Normal file
BIN
rojo-test/syncback-tests/csv/input.rbxm
Normal file
Binary file not shown.
@@ -0,0 +1,13 @@
|
||||
{
|
||||
"className": "Folder",
|
||||
"children": [
|
||||
{
|
||||
"name": "value_1",
|
||||
"className": "ObjectValue"
|
||||
},
|
||||
{
|
||||
"name": "value_2",
|
||||
"className": "ObjectValue"
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
{
|
||||
"name": "duplicate_rojo_id",
|
||||
"tree": {
|
||||
"$className": "DataModel",
|
||||
"ReplicatedStorage": {
|
||||
"container": {
|
||||
"$path": "container.model.json"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
BIN
rojo-test/syncback-tests/duplicate_rojo_id/input.rbxl
Normal file
BIN
rojo-test/syncback-tests/duplicate_rojo_id/input.rbxl
Normal file
Binary file not shown.
@@ -0,0 +1,11 @@
|
||||
{
|
||||
"name": "ignore_paths_adding",
|
||||
"tree": {
|
||||
"$path": "src"
|
||||
},
|
||||
"syncbackRules": {
|
||||
"ignorePaths": [
|
||||
"src/*.rbxm"
|
||||
]
|
||||
}
|
||||
}
|
||||
BIN
rojo-test/syncback-tests/ignore_paths_adding/input.rbxm
Normal file
BIN
rojo-test/syncback-tests/ignore_paths_adding/input.rbxm
Normal file
Binary file not shown.
@@ -0,0 +1,11 @@
|
||||
{
|
||||
"name": "ignore_paths_init",
|
||||
"tree": {
|
||||
"$path": "src"
|
||||
},
|
||||
"syncbackRules": {
|
||||
"ignorePaths": [
|
||||
"**/init-file/*.luau"
|
||||
]
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1 @@
|
||||
-- This file SHOULD NOT be updated
|
||||
@@ -0,0 +1 @@
|
||||
-- This module SHOULD be updated
|
||||
BIN
rojo-test/syncback-tests/ignore_paths_init/input.rbxm
Normal file
BIN
rojo-test/syncback-tests/ignore_paths_init/input.rbxm
Normal file
Binary file not shown.
@@ -0,0 +1,14 @@
|
||||
{
|
||||
"name": "ignore_paths_removing",
|
||||
"tree": {
|
||||
"$className": "DataModel",
|
||||
"ReplicatedStorage": {
|
||||
"$path": "src"
|
||||
}
|
||||
},
|
||||
"syncbackRules": {
|
||||
"ignorePaths": [
|
||||
"*.luau"
|
||||
]
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1 @@
|
||||
-- This script is not in the input place file.
|
||||
BIN
rojo-test/syncback-tests/ignore_paths_removing/input.rbxl
Normal file
BIN
rojo-test/syncback-tests/ignore_paths_removing/input.rbxl
Normal file
Binary file not shown.
@@ -0,0 +1,14 @@
|
||||
{
|
||||
"name": "ignore_trees_adding",
|
||||
"tree": {
|
||||
"$className": "DataModel",
|
||||
"ReplicatedStorage": {
|
||||
"$path": "src"
|
||||
}
|
||||
},
|
||||
"syncbackRules": {
|
||||
"ignoreTrees": [
|
||||
"ReplicatedStorage/IgnoreMe"
|
||||
]
|
||||
}
|
||||
}
|
||||
BIN
rojo-test/syncback-tests/ignore_trees_adding/input.rbxl
Normal file
BIN
rojo-test/syncback-tests/ignore_trees_adding/input.rbxl
Normal file
Binary file not shown.
@@ -0,0 +1,14 @@
|
||||
{
|
||||
"name": "ignore_trees_removing",
|
||||
"tree": {
|
||||
"$className": "DataModel",
|
||||
"ReplicatedStorage": {
|
||||
"$path": "src"
|
||||
}
|
||||
},
|
||||
"syncbackRules": {
|
||||
"ignoreTrees": [
|
||||
"ReplicatedStorage/KeepMe"
|
||||
]
|
||||
}
|
||||
}
|
||||
BIN
rojo-test/syncback-tests/ignore_trees_removing/input.rbxl
Normal file
BIN
rojo-test/syncback-tests/ignore_trees_removing/input.rbxl
Normal file
Binary file not shown.
@@ -0,0 +1,6 @@
|
||||
{
|
||||
"name": "json_middleware",
|
||||
"tree": {
|
||||
"$path": "src"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,3 @@
|
||||
{
|
||||
"className": "Configuration"
|
||||
}
|
||||
@@ -0,0 +1,3 @@
|
||||
{
|
||||
"className": "StringValue"
|
||||
}
|
||||
@@ -0,0 +1,6 @@
|
||||
{
|
||||
"name": "project_json",
|
||||
"tree": {
|
||||
"$className": "Color3Value"
|
||||
}
|
||||
}
|
||||
BIN
rojo-test/syncback-tests/json_middlewares/input.rbxm
Normal file
BIN
rojo-test/syncback-tests/json_middlewares/input.rbxm
Normal file
Binary file not shown.
@@ -0,0 +1,11 @@
|
||||
{
|
||||
"name": "nested_projects",
|
||||
"tree": {
|
||||
"$className": "DataModel",
|
||||
"ReplicatedStorage": {
|
||||
"Nested": {
|
||||
"$path": "nested.project.json"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,15 @@
|
||||
{
|
||||
"name": "Nested",
|
||||
"tree": {
|
||||
"$className": "Configuration",
|
||||
"BoolValue": {
|
||||
"$className": "BoolValue",
|
||||
"$properties": {
|
||||
"Value": true
|
||||
}
|
||||
},
|
||||
"StringValue": {
|
||||
"$path": "string_value.txt"
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1 @@
|
||||
effective cover predict pawn south
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user