mirror of
https://github.com/rojo-rbx/rojo.git
synced 2026-10-23 05:51:39 +00:00
Implement auto-download feature for syncback command
- Enhanced the `syncback` command to automatically download Roblox place files from the asset delivery API, allowing for zero-argument usage. - Updated `Cargo.toml` to include compression features for `reqwest` and moved `tempfile` to dependencies. - Introduced a new `download` argument in `SyncbackCommand` to specify place IDs for downloading. - Implemented logic to resolve input file paths, prioritizing downloads when necessary. - Added sourcemap generation after successful syncback and refreshed the git index if in a repository. - Updated tests to validate the new download functionality and sourcemap creation.
This commit is contained in:
parent
8fe908740f
commit
2b2ada219e
32 changed files with 1180 additions and 125 deletions
|
|
@ -1,6 +1,7 @@
|
|||
---
|
||||
source: tests/rojo_test/syncback_util.rs
|
||||
expression: "String::from_utf8_lossy(&output.stdout)"
|
||||
expression: normalized_stdout
|
||||
---
|
||||
Writing OnlyOneCopy/child_of_one.luau
|
||||
Writing ReplicatedStorage/child_replicated_storage.luau
|
||||
Created sourcemap at <TEMP>/child_but_not\sourcemap.json
|
||||
|
|
|
|||
|
|
@ -1,7 +1,8 @@
|
|||
---
|
||||
source: tests/rojo_test/syncback_util.rs
|
||||
expression: "String::from_utf8_lossy(&output.stdout)"
|
||||
expression: normalized_stdout
|
||||
---
|
||||
Writing src/csv.csv
|
||||
Writing src/csv_init/init.csv
|
||||
Writing src/csv_init
|
||||
Created sourcemap at <TEMP>/csv\sourcemap.json
|
||||
|
|
|
|||
|
|
@ -1,5 +1,6 @@
|
|||
---
|
||||
source: tests/rojo_test/syncback_util.rs
|
||||
expression: "String::from_utf8_lossy(&output.stdout)"
|
||||
expression: normalized_stdout
|
||||
---
|
||||
Writing container.model.json5
|
||||
Created sourcemap at <TEMP>/duplicate_rojo_id\sourcemap.json
|
||||
|
|
|
|||
|
|
@ -1,8 +1,9 @@
|
|||
---
|
||||
source: tests/rojo_test/syncback_util.rs
|
||||
expression: "String::from_utf8_lossy(&output.stdout)"
|
||||
expression: normalized_stdout
|
||||
---
|
||||
Writing src/ignored_part.model.json5
|
||||
Writing src/int_value.model.json5
|
||||
Writing src/subfolder/string_value.txt
|
||||
Writing src/subfolder
|
||||
Created sourcemap at <TEMP>/ignore_paths_adding\sourcemap.json
|
||||
|
|
|
|||
|
|
@ -1,6 +1,7 @@
|
|||
---
|
||||
source: tests/rojo_test/syncback_util.rs
|
||||
expression: "String::from_utf8_lossy(&output.stdout)"
|
||||
expression: normalized_stdout
|
||||
---
|
||||
Writing src/non-init.luau
|
||||
Writing src/init-file
|
||||
Created sourcemap at <TEMP>/ignore_paths_init\sourcemap.json
|
||||
|
|
|
|||
|
|
@ -1,5 +1,6 @@
|
|||
---
|
||||
source: tests/rojo_test/syncback_util.rs
|
||||
expression: "String::from_utf8_lossy(&output.stdout)"
|
||||
expression: normalized_stdout
|
||||
---
|
||||
Writing src/Message.model.json5
|
||||
Created sourcemap at <TEMP>/ignore_paths_removing\sourcemap.json
|
||||
|
|
|
|||
|
|
@ -1,6 +1,7 @@
|
|||
---
|
||||
source: tests/rojo_test/syncback_util.rs
|
||||
expression: "String::from_utf8_lossy(&output.stdout)"
|
||||
expression: normalized_stdout
|
||||
---
|
||||
Writing src/IncludeMe/.gitkeep
|
||||
Writing src/IncludeMe
|
||||
Created sourcemap at <TEMP>/ignore_trees_adding\sourcemap.json
|
||||
|
|
|
|||
|
|
@ -3,3 +3,4 @@ source: tests/rojo_test/syncback_util.rs
|
|||
expression: normalized_stdout
|
||||
---
|
||||
Removing src
|
||||
Created sourcemap at <TEMP>/ignore_trees_removing\sourcemap.json
|
||||
|
|
|
|||
|
|
@ -1,8 +1,9 @@
|
|||
---
|
||||
source: tests/rojo_test/syncback_util.rs
|
||||
expression: "String::from_utf8_lossy(&output.stdout)"
|
||||
expression: normalized_stdout
|
||||
---
|
||||
Writing src/dir_with_meta/init.meta.json5
|
||||
Writing src/model_json.model.json5
|
||||
Writing src/project_json.project.json5
|
||||
Writing src/dir_with_meta
|
||||
Created sourcemap at <TEMP>/json_middlewares\sourcemap.json
|
||||
|
|
|
|||
|
|
@ -1,6 +1,7 @@
|
|||
---
|
||||
source: tests/rojo_test/syncback_util.rs
|
||||
expression: "String::from_utf8_lossy(&output.stdout)"
|
||||
expression: normalized_stdout
|
||||
---
|
||||
Writing nested.project.json5
|
||||
Writing string_value.txt
|
||||
Created sourcemap at <TEMP>/nested_projects\sourcemap.json
|
||||
|
|
|
|||
|
|
@ -6,3 +6,4 @@ Writing src/modules/ClientModule.luau
|
|||
Writing src/modules/ServerModule.luau
|
||||
Removing client-only.project.json5
|
||||
Removing server-only.project.json5
|
||||
Created sourcemap at <TEMP>/nested_projects_weird\sourcemap.json
|
||||
|
|
|
|||
|
|
@ -1,6 +1,7 @@
|
|||
---
|
||||
source: tests/rojo_test/syncback_util.rs
|
||||
expression: "String::from_utf8_lossy(&output.stdout)"
|
||||
expression: normalized_stdout
|
||||
---
|
||||
Writing src/init.luau
|
||||
Writing src
|
||||
Created sourcemap at <TEMP>/project_init\sourcemap.json
|
||||
|
|
|
|||
|
|
@ -1,6 +1,7 @@
|
|||
---
|
||||
source: tests/rojo_test/syncback_util.rs
|
||||
expression: "String::from_utf8_lossy(&output.stdout)"
|
||||
expression: normalized_stdout
|
||||
---
|
||||
Writing attribute_mismatch.luau
|
||||
Writing property_mismatch.project.json5
|
||||
Created sourcemap at <TEMP>/project_reserialize\sourcemap.json
|
||||
|
|
|
|||
|
|
@ -1,8 +1,9 @@
|
|||
---
|
||||
source: tests/rojo_test/syncback_util.rs
|
||||
expression: "String::from_utf8_lossy(&output.stdout)"
|
||||
expression: normalized_stdout
|
||||
---
|
||||
Writing src/ChildWithoutDuplicates/Child/.gitkeep
|
||||
Writing src/ChildWithDuplicates
|
||||
Writing src/ChildWithoutDuplicates
|
||||
Writing src/ChildWithoutDuplicates/Child
|
||||
Created sourcemap at <TEMP>/rbxm_fallback\sourcemap.json
|
||||
|
|
|
|||
|
|
@ -1,6 +1,7 @@
|
|||
---
|
||||
source: tests/rojo_test/syncback_util.rs
|
||||
expression: "String::from_utf8_lossy(&output.stdout)"
|
||||
expression: normalized_stdout
|
||||
---
|
||||
Writing src/pointer.model.json5
|
||||
Writing src/target.model.json5
|
||||
Created sourcemap at <TEMP>/ref_properties\sourcemap.json
|
||||
|
|
|
|||
|
|
@ -1,6 +1,7 @@
|
|||
---
|
||||
source: tests/rojo_test/syncback_util.rs
|
||||
expression: "String::from_utf8_lossy(&output.stdout)"
|
||||
expression: normalized_stdout
|
||||
---
|
||||
Writing src/pointer.model.json5
|
||||
Writing src/target.txt
|
||||
Created sourcemap at <TEMP>/ref_properties_blank\sourcemap.json
|
||||
|
|
|
|||
|
|
@ -1,8 +1,9 @@
|
|||
---
|
||||
source: tests/rojo_test/syncback_util.rs
|
||||
expression: "String::from_utf8_lossy(&output.stdout)"
|
||||
expression: normalized_stdout
|
||||
---
|
||||
Writing src/Pointer_1.model.json5
|
||||
Writing src/Pointer_2.model.json5
|
||||
Writing src/Target_1.model.json5
|
||||
Writing src/Target_2.model.json5
|
||||
Created sourcemap at <TEMP>/ref_properties_conflict\sourcemap.json
|
||||
|
|
|
|||
|
|
@ -7,3 +7,4 @@ Writing src/Pointer_2.model.json5
|
|||
Writing src/Target/init.meta.json5
|
||||
Writing src/Target
|
||||
Removing src/Target.model.json5
|
||||
Created sourcemap at <TEMP>/ref_properties_duplicate\sourcemap.json
|
||||
|
|
|
|||
|
|
@ -1,7 +1,8 @@
|
|||
---
|
||||
source: tests/rojo_test/syncback_util.rs
|
||||
expression: "String::from_utf8_lossy(&output.stdout)"
|
||||
expression: normalized_stdout
|
||||
---
|
||||
Writing src/Pointer1.model.json5
|
||||
Writing src/Pointer2.model.json5
|
||||
Writing src/Pointer3.model.json5
|
||||
Created sourcemap at <TEMP>/ref_properties_pruned\sourcemap.json
|
||||
|
|
|
|||
|
|
@ -1,8 +1,9 @@
|
|||
---
|
||||
source: tests/rojo_test/syncback_util.rs
|
||||
expression: "String::from_utf8_lossy(&output.stdout)"
|
||||
expression: normalized_stdout
|
||||
---
|
||||
Writing default.project.json5
|
||||
Writing src/model_json.model.json5
|
||||
Writing src/rbxm.rbxm
|
||||
Writing src/rbxmx.rbxmx
|
||||
Created sourcemap at <TEMP>/respect_old_middleware\sourcemap.json
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
---
|
||||
source: tests/rojo_test/syncback_util.rs
|
||||
expression: "String::from_utf8_lossy(&output.stdout)"
|
||||
expression: normalized_stdout
|
||||
---
|
||||
Writing default.project.json5
|
||||
Writing src/adjacent.luau
|
||||
|
|
@ -8,3 +8,4 @@ Writing src/adjacent.meta.json5
|
|||
Writing src/init/init.meta.json5
|
||||
Writing src/model.model.json5
|
||||
Writing src/init
|
||||
Created sourcemap at <TEMP>/schema_roundtrip\sourcemap.json
|
||||
|
|
|
|||
|
|
@ -1,6 +1,7 @@
|
|||
---
|
||||
source: tests/rojo_test/syncback_util.rs
|
||||
expression: "String::from_utf8_lossy(&output.stdout)"
|
||||
expression: normalized_stdout
|
||||
---
|
||||
Writing default.project.json5
|
||||
Writing string_value.txt
|
||||
Created sourcemap at <TEMP>/string_value_project\sourcemap.json
|
||||
|
|
|
|||
|
|
@ -1,6 +1,7 @@
|
|||
---
|
||||
source: tests/rojo_test/syncback_util.rs
|
||||
expression: "String::from_utf8_lossy(&output.stdout)"
|
||||
expression: normalized_stdout
|
||||
---
|
||||
Writing src/module.modulescript
|
||||
Writing src/text.text
|
||||
Created sourcemap at <TEMP>/sync_rules\sourcemap.json
|
||||
|
|
|
|||
|
|
@ -1,5 +1,6 @@
|
|||
---
|
||||
source: tests/rojo_test/syncback_util.rs
|
||||
expression: "String::from_utf8_lossy(&output.stdout)"
|
||||
expression: normalized_stdout
|
||||
---
|
||||
Writing default.project.json5
|
||||
Created sourcemap at <TEMP>/unscriptable_properties\sourcemap.json
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue