Commit graph

139 commits

Author SHA1 Message Date
Joe
dccd3a691a Enhance property encoding and class descriptor retrieval in rbx_dom_lua
- Introduced a new function, `findClassDescriptor`, to retrieve class properties and metadata, including inherited properties, from the database.
- Updated `encodeInstance` to include encoding for Tags alongside Attributes, ensuring comprehensive property serialization.
- Improved property filtering logic to skip non-serializable properties and those matching default values, aligning with syncback behavior.
- Enhanced comments for clarity on property handling and encoding processes.
2026-01-30 13:18:20 -06:00
Joe
439eb3f5f8 Enhance syncback logic for removed instances in ApiService
- Implemented functionality to delete files from the filesystem when instances are removed in Studio but exist in Rojo, ensuring proper synchronization.
- Added error handling for cases where the instance's filesystem path may not exist due to parent directory deletions.
- Introduced a new method, `syncback_removed_instance`, to encapsulate the logic for handling the removal of instances and their associated metadata files.
- Updated tests to verify the correct behavior of the new removal logic.
2026-01-30 12:52:36 -06:00
Joe
18a74c8e4d Enhance script handling and UI consistency
- Added support for encoding the RunContext property in the Script class to determine file suffixes (.server.luau, .client.luau, .plugin.luau, .legacy.luau).
- Updated the Confirming.lua file to improve UI consistency in the confirmation message display.
- Modified snapshot middleware and syncback logic to accommodate new file extensions and ensure proper handling of plugin scripts.
- Refactored tests to align with the new naming conventions for script suffixes and improved path uniqueness checks.
2026-01-30 10:31:36 -06:00
Joe
9b412d28ae Add support for filtering hidden services in syncback
- Introduced a new configuration option `ignore_hidden_services` in `SyncbackRules` to allow filtering of internal services during syncback.
- Added a constant `VISIBLE_SERVICES` to define which services are considered visible and should be included when the filtering option is enabled.
- Implemented the `strip_hidden_services` function to remove non-visible services from the syncback process.
- Updated the syncback loop to apply the filtering logic based on the new configuration option.
- Enhanced path uniqueness checks by pre-computing duplicate sibling information for improved performance in the syncback process.
2026-01-30 10:15:21 -06:00
Joe
84f76d48fc Add project configuration and test files in JSON5 format
- Introduced new configuration files for testing, including `default.project.json5`, `client_in_folder`, and others.
- Updated existing project files to use JSON5 format, ensuring consistency across configurations.
- Added new Lua scripts and model files to support various test cases.
- Adjusted snapshot files to align with the new project structure and properties.
2026-01-30 09:16:46 -06:00
Joe
779e3de0ae Update project configuration and snapshot files
- Changed the default project file from `plugin.project.json` to `plugin.project.json5` in `build.rs`.
- Added new project configuration files in JSON5 format for various test cases, including `default.project.json5`, `client_in_folder`, `csv_bug_145`, and others.
- Updated snapshot files to reflect changes in instance structure and properties, ensuring consistency with the new project configurations.
- Removed unnecessary script and module instances from snapshot files to streamline the testing process.
2026-01-30 08:32:42 -06:00
Joe
d3cc11659a RunContext refactor + sync updates 2026-01-30 08:12:04 -06:00
Joe
c7cddb72c2 Update syncback feature to handle instance pulling from Studio
- Updated the `ServeSession` to implement logic for pulling instances that exist in Studio but not in Rojo's filesystem, creating appropriate files during sync confirmation.
- Introduced a new `encodeInstance` function to serialize Studio instances for transmission, supporting all instance types.
- Modified the `PatchTree` to allow explicit user selection for push/pull/skip actions, enhancing user control during sync operations.
- Added tests for the new encoding functionality and updated existing tests to ensure proper behavior with the new syncback logic.
2026-01-30 07:18:10 -06:00
Joe
bda2af3dfb Use msgpack for API 2026-01-27 07:13:02 -06:00
Joe
b30aa8280d Implement sync source-only mode in ServeSession and ChangeBatcher
- Added support for a new sync mode in ServeSession that filters property changes to only include the Source property when the server indicates it is in source-only mode.
- Updated ChangeBatcher to handle the new syncSourceOnly parameter, ensuring that only relevant property changes are processed based on the server's capabilities.
- Enhanced API response to include sync_source_only flag, indicating the server's sync capabilities.
- Adjusted related functions to accommodate the new sync logic, improving data synchronization efficiency.
2026-01-24 05:24:08 -06:00
Joe
9692c843e7 Refactor JSON serialization for WebSocket responses
- Switched to using the compact JSON5 encoder for improved transport efficiency while preserving NaN/Infinity values in WebSocket subscription responses.
- Updated comments for clarity on the changes made to the serialization process.
2026-01-23 06:43:59 -06:00
Joe
2b716351c1 Refactor JSON handling and improve code clarity
- Updated error messages in Http.jsonDecode for better context.
- Enhanced serialization error handling in CompactJson5Serializer.
- Reformatted struct definitions in tests for improved readability.
- Adjusted assertions in tests for better clarity and consistency.
- Refactored project file name checks for improved readability.
2026-01-22 22:22:03 -06:00
Joe
fdd1d145cf json5 work 2026-01-22 22:19:00 -06:00
Joe
2dfcac4ef7 Refactor code for improved readability by consolidating multi-line statements into single lines across various modules, including JSON serialization, snapshot middleware, and file name validation. 2026-01-20 20:48:52 -06:00
Joe
d1ea2feed7 Update dependencies in Cargo.lock and Cargo.toml; adjust rbx-dom paths and versions for improved compatibility and functionality. 2026-01-20 20:15:35 -06:00
CoderJoey
c36421626d
Merge branch 'rojo-rbx:master' into master 2026-01-20 20:10:14 -06:00
Ken Loeffler
02b41133f8
Use post for ref patch and serialize (#1192) 2026-01-19 22:44:42 +00:00
Joe
88beb1d8d7 scriptsOnly mode 2025-12-20 20:44:35 -06:00
boatbomber
87f58e0a55
Use WebSocket instead of Long Polling (#1142) 2025-11-26 19:57:01 -08:00
Micah
9b5a07191b
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.
2025-11-19 09:21:33 -08:00
boatbomber
d0b029f995
Add JSONC Support for Project, Meta, and Model JSON files (#1144)
Replaces `serde_json` parsing with `jsonc-parser` throughout the
codebase, enabling support for **comments** and **trailing commas** in
all JSON files including `.project.json`, `.model.json`, and
`.meta.json` files.
MSRV bumps from `1.83.0` to `1.88.0` in order to
use the jsonc_parser dependency.
2025-10-28 17:29:57 -07:00
Micah
80a381dbb1
Use SerializationService as a fallback for when patch application fails (#1030) 2025-09-21 15:09:20 -07:00
Parritz
7dee898400
Add place ID blacklist config (#1021) 2025-04-03 08:37:40 -07:00
Micah
833320de64
Update rbx-dom (#1023) 2025-04-02 11:32:27 -07:00
Jack T
55a207a275
Fix clippy lint warnings (#1004) 2025-01-13 10:07:53 -08:00
Micah
34106f470f
Remove maplit dependency and stop using a macro for hashmaps (#982) 2024-10-31 11:56:54 -07:00
Micah
7e2bab921a
Support setting referent properties via attributes (#843)
Co-authored-by: Kenneth Loeffler <kenloef@gmail.com>
2024-06-20 23:48:52 +01:00
boatbomber
3d4e387d35
Redesign settings UI in plugin (#886) 2024-05-13 10:36:03 -07:00
Micah
cd14ea7c62
Remove unnecessary borrows (#810) 2023-10-25 17:59:02 -05:00
utrain
d0e48d9bdc
Add some logging/error-handling for opener errors! (#745)
After seeing an issue with the opener not opening, it was strange to see
that there was no logging or error handling! This PR aims to solve that.
2023-07-26 15:10:02 -07:00
Kenneth Loeffler
67674d53a2
Fix remaining clippy lints (#687)
The eighth (and final) in a series of PRs that aim to get CI passing
2023-06-30 11:06:43 -07:00
Samuel P
acf7456371
Accept .luau files (#552)
* accept .luau files

* Accept .luau in snapshot creation

* Update versioning and snapshots.

* fix versioning

* Run rustfmt

* Reduce repetition in extension detection

* Tidy build script change

Co-authored-by: Lucien Greathouse <me@lpghatguy.com>
2022-06-29 18:53:10 -04:00
Lucien Greathouse
5fa63733fd Factor out property filtering code to simplify web server 2021-11-20 17:38:36 -05:00
Lucien Greathouse
5d62bf9b60
Upgrade to Tokio 1.x, futures 0.3, Hyper 0.14, etc (#459)
* Upgrade dependencies, oneshot channel ref

* New service style?

* Fix warning

* A server is running again

* Working server with async blocks

* UI working again

* Finish upgrade

* Bump MSRV to 1.46.0 for if/match in const fn

* Update the README as part of this
2021-07-28 12:29:46 -04:00
Lucien Greathouse
17fdd18c55 Code docs 2021-06-11 22:19:50 -04:00
Lucien Greathouse
c7ab6c435c Add gameId and placeId project properties 2021-04-15 14:27:35 -04:00
MSAA
0e7ba839ed
change server bind address (#403)
* web/mod.rs - change server bind address

127.0.0.1 is a loopback interface, and only works on the same host
0.0.0.0 will allow connections from other hosts

ideally, this should be a console arg - but it's a quick fix

* implement --address option, revert default bind address to 127.0.0.1

* revert silly autoformatting

* ok, actually using rustfmt now

* More precise --address flag description

* Use SocketAddr where available, take advantage of const-ness

* Display 'localhost' if address is loopback

* Update Changelog

Co-authored-by: Lucien Greathouse <me@lpghatguy.com>
2021-03-18 22:41:31 -04:00
Lucien Greathouse
78755b6130 Release v7.0.0-alpha.2 2021-02-19 21:47:49 -05:00
Lucien Greathouse
59ef5f05ea
Upgrade to rbx_dom_weak 2.0 (#377)
* Mostly mechanical port bits

* Almost there

* It builds again!

* Turn on all the code again

* Tests compiling but not passing

* Stub work for value resolution

* Implement resolution minus enums and derived properties

* Implement property descriptor resolution

* Update referent snapshots

* Update unions test project

Using a place file instead of a model yields better
error messages in Roblox Studio.

* Add easy shortcut to testing with local rbx-dom

* Update rbx-dom

* Add enum resolution

* Update init.meta.json to use UnresolvedValue

* Expand value resolution support, add test

* Filter SharedString values from web API

* Add 'property' builder method to InstanceSnapshot

* Change InstanceSnapshot/InstanceBuilder boundary

* Fix remove_file crash

* rustfmt

* Update to latest rbx_dom_lua

* Update dependencies, including rbx_dom_weak

* Update to latest rbx-dom

* Update dependencies

* Update rbx-dom, fixing more bugs

* Remove experimental warning on binary place builds

* Remove unused imports
2021-02-18 20:56:09 -05:00
Lucien Greathouse
5bb3dc258a Add projectName to serve output 2020-12-14 10:17:52 -08:00
Lucien Greathouse
f43777e37e
Require a Rojo project again (#307) 2020-03-25 17:01:28 -07:00
Lucien Greathouse
2a46df1110 Expose two-way sync.
- Convert plugin DevSettings flag to settings panel feature
- Remove server feature, always enable write API
2020-03-18 10:39:40 -07:00
Lucien Greathouse
102c77b23e Implement /api/open/{id} to open a script by ID in your default editor 2020-03-17 17:50:54 -07:00
Lucien Greathouse
477e0ada32
VFS in external crate (#297)
* vroom

* Port dir middleware

* Filter rules

* Directory metadata

* Project support

* Enable Lua support

* StringValue support

* CSV

* rbxm, rbxmx, and rbxlx

* JSON models

* Clean up some warnings

* Strip out PathMap

* Unwatch paths when they're reported as removed

* Fix 'rojo upload' behavior

* Upgrade to Insta 0.13.1

* Update dependencies

* Release 0.6.0-alpha.2

* Fix bad merge

* Replace MemoryBackend with InMemoryFs

* Sledgehammer tests into passing for now

* Txt middleware

* Update easy snapshot tests

* Lua tests

* Project middleware tests

* Try to fix test failures by sorting

* Port first set of serve session tests

* Add InMemoryFs::raise_event

* Finish porting serve session tests

* Remove UI code for introspecting VFS for now

* VFS docs
2020-03-10 17:38:49 -07:00
Lucien Greathouse
4a9c1d0d1b two-way sync: allow changedProperties to be null to avoid array/object issues 2020-02-14 18:15:18 -08:00
Lucien Greathouse
cdc5513726 Rename dev-live-assets feature to dev_live_assets 2019-12-20 14:26:08 -08:00
Lucien Greathouse
a398338c02
Two way sync V0 (#282)
* Unfinished two-way sync API

* In-memory two-way sync complete

* Move PatchSet application into ChangeProcessor thread, where it can be synchronous

* Stop InstanceMap's signals when a ServeSession terminates

* Apply patch in ChangeProcessor

* Feature flag

* Fix error in ChangeProcessor due to wrong drop order
2019-12-20 14:24:28 -08:00
Lucien Greathouse
47614c3102 Update names in subscribe portion of sync protocol 2019-11-11 17:52:09 -08:00
Lucien Greathouse
d54a5f647e Improve tree explorer UI 2019-10-18 16:49:03 -07:00
Lucien Greathouse
457ed05174 Fix missed references to IMFS in CSS instead of VFS 2019-10-18 15:37:38 -07:00