Compare commits

...

867 Commits

Author SHA1 Message Date
c552fdc52e Add --dangerously-force-json flag for syncback
Adds a CLI flag that forces syncback to use JSON representations
instead of binary .rbxm files. Instances with children become
directories with init.meta.json; leaf instances become .model.json.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-13 17:41:42 +01:00
Ken Loeffler
02b41133f8 Use post for ref patch and serialize (#1192) 2026-01-19 22:44:42 +00:00
Micah
d08780fc14 Ensure that pruned Instances aren't treated as existing in syncback (#1179)
Closes #1178.
2025-11-29 21:21:48 -08:00
Micah
b89cc7f398 Release memofs v0.3.1 (#1175) 2025-11-27 12:32:57 -08:00
Micah
42568b9709 Release Rojo v7.7.0-rc.1 (#1174) 2025-11-27 12:10:57 -08:00
boatbomber
87f58e0a55 Use WebSocket instead of Long Polling (#1142) 2025-11-26 19:57:01 -08:00
Micah
a61a1bef55 Roundtrip schemas in syncback (#1173) 2025-11-26 16:11:39 -08:00
Micah
a99e877b7c Actually skip .gitignore if --skip-git is passed to init (#1172) 2025-11-26 13:59:12 -08:00
Ken Loeffler
93e9c51204 Fix rojo plugin install by adding Vfs::exists (#1169) 2025-11-21 07:04:34 -08:00
Ken Loeffler
015b5bda14 Set crate and plugin versions to 7.7.0-prealpha (#1170) 2025-11-21 07:02:09 -08:00
Micah
2b47861a4f Properly support EnumItem variants in hashing and variant_eq (#1165) 2025-11-19 19:18:14 -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
071b6e7e23 Improved string diff viewer (#994) 2025-11-18 20:26:44 -08:00
quaywinn
31ec216a95 Remove pairs() and ipairs() (#1150) 2025-11-18 18:49:52 -08:00
Micah
ea70d89291 Support .jsonc extension for all JSON files (#1159) 2025-11-18 18:47:43 -08:00
quaywinn
03410ced6d Use buffer for ClassIcon EditableImages (#1149) 2025-11-07 13:07:19 -08:00
Micah
825726c883 Release 7.6.1 (#1151) 2025-11-06 18:49:05 -08:00
boatbomber
54e63d88d4 Slightly improve initial sync hangs (#1140) 2025-11-06 00:06:42 -08:00
boatbomber
4018c97cb6 Make CHANGELOG.md use consistent style (#1146) 2025-10-28 19:26:48 -07: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
Sebastian Stachowicz
aabe6d11b2 Update default gitignores to include sourcemap (#1145) 2025-10-28 17:28:55 -07:00
boatbomber
181cc37744 Improve sync fallback robustness (#1135) 2025-10-20 20:13:47 -07:00
boatbomber
cd78f5c02c Fix postcommit callbacks being skipped (#1132) 2025-10-14 12:13:59 -07:00
Micah
441c469966 Release Rojo v7.6.0 (#1125) 2025-10-10 19:17:55 -07:00
Micah
f3c423d77d Fix the various lints (#1124) 2025-10-10 13:00:56 -07:00
Micah
beb497878b Add flag for skipping git initialization to init command (#1122) 2025-10-07 17:12:22 -07:00
Micah
6ea95d487c Refactor init command (#1117) 2025-09-30 14:38:38 -07:00
Micah
80a381dbb1 Use SerializationService as a fallback for when patch application fails (#1030) 2025-09-21 15:09:20 -07:00
KAS
59e36491a5 Fix a grammar error and a typo (#1113) 2025-09-16 11:00:34 -07:00
Micah
c1326ba06e Add Arm64 builds to CI/Releases + build on ubuntu 22.04 (#1098) 2025-08-30 14:10:59 -07:00
Micah
e2633126ee Change Foreman to Rokit in CONTRIBUTING.md (#1110) 2025-08-30 13:42:52 -07:00
Micah
5f33435f3c Move to using Rokit, update tools, and don't install unnecessary tools (#1109) 2025-08-29 18:45:15 -07:00
boatbomber
54e0ff230b Improvements to sync reminder UX (#1096) 2025-08-28 17:15:34 -07:00
wad
4e9e6233ff fix: apply gameId and placeId only after initial sync (#1104) 2025-08-15 18:12:36 -07:00
Micah
0056849b51 Put Rojo version in crash message (#1101) 2025-08-13 15:46:08 -07:00
ffrostfall
2ddb21ec5f Add option for emitting absolute paths to rojo sourcemap (#1092)
Co-authored-by: Micah <micah@uplift.games>
2025-08-04 11:33:35 -07:00
Micah
a4eb65ca3f Add YAML middleware that behaves like TOML and JSON (#1093) 2025-08-02 20:58:13 -07:00
Sebastian Stachowicz
3002d250a1 Fix Table diff colors (#1084) 2025-07-31 19:36:03 -07:00
Micah
9598553e5d Normalize paths in sourcemap generation (#1085) 2025-07-31 09:19:57 -07:00
Sebastian Stachowicz
7f68d9887b Fixed nil -> nil props showing up as failing in patch visualizer (plugin) (#1081) 2025-07-25 15:27:11 -07:00
Micah
e092a7301f Change background color of web UI to gray (#1080) 2025-07-25 15:04:42 -07:00
Cameron Campbell
6dfdfbe514 Cache Rust Dependencies in release.yml. (#1079) 2025-07-22 16:13:23 -07:00
morosanu
7860f2717f Fix auto connect for play mode (#1066) 2025-07-22 15:12:16 -07:00
boatbomber
60f19df9a0 Show update indicator on version header (#1069) 2025-06-21 02:53:45 +00:00
boatbomber
951f0cda0b Show the plugin version on the Error page (#1068) 2025-06-20 18:28:04 -07:00
Micah
227042d6b1 Add current maintainers to author field of Cargo.toml files (#1053) 2025-05-21 20:55:39 -07:00
Micah
b2c4f550ee Release v7.5.1 (#1035) 2025-04-25 13:56:01 -07:00
Ken Loeffler
4ddbefa88f Change release build linux version to ubuntu-latest (#1034) 2025-04-25 20:04:43 +01:00
Ken Loeffler
d935115591 Release 7.5.0 (#1033) 2025-04-25 19:46:16 +01:00
Cameron Campbell
bd2ea42732 Fixes issues with refs in the plugin. (#1005) 2025-04-18 08:44:11 -07:00
Micah
3bac38ee34 Re-add the hack to write NeedsPivotMigration as false for models (#1027) 2025-04-16 15:03:09 -07:00
Micah
a7a4f6d8f2 Update rbx-dom-lua database to latest version (#1029) 2025-04-13 07:42:41 -07:00
Micah
80b6facbd3 Add missing CHANGELOG entry for 7.4.4 (#1025) 2025-04-07 16:22:08 -07:00
Parritz
7dee898400 Add place ID blacklist config (#1021) 2025-04-03 08:37:40 -07:00
Micah
4c4b2dbe17 Add legacy and runContext script sync rule middlewares (#909) 2025-04-02 12:47:27 -07:00
Sasial
73ed5ae697 Add Support for Plugin Scripts (#1008) 2025-04-02 11:37:49 -07:00
Micah
833320de64 Update rbx-dom (#1023) 2025-04-02 11:32:27 -07:00
boatbomber
0d6ff8ef8a Improve notification layout (#997) 2025-01-13 16:06:49 -08:00
Jack T
55a207a275 Fix clippy lint warnings (#1004) 2025-01-13 10:07:53 -08:00
Jack T
f33d1f1cc4 Ignore .git directory when building VfsSnapshot in build script (#1002) 2025-01-01 01:38:34 -08:00
boatbomber
19ca2b12fc Add locked tooltip (#998)
Adds the ability to define descriptive tooltips for settings when they
are locked.


![image](https://github.com/user-attachments/assets/5d5778c8-911b-4358-b4e6-f0389270ad76)


Makes some minor improvements to tooltip layout logic as well.
2024-12-28 15:03:11 -08:00
boatbomber
b7d3394464 Plugin dev ux improvements (#992)
Co-authored-by: kennethloeffler <kenloef@gmail.com>
2024-11-10 15:53:58 -08:00
boatbomber
8c33100d7a Use FontFace and consistent text sizing (#988) 2024-11-09 12:05:57 +00:00
Kenneth Loeffler
80c406f196 Fix returning NoProjectFound for any project load error (#985)
In #917, we accidentally changed ServeSession::new's project loading
logic so that it always returns `ServeSession::ProjectNotFound` if the
load fails for any reason. This PR fixes this so that it returns the
right error when there is an error loading the project, and moves the
`NoProjectFound` error to `project::Error`, since I think it makes more
sense there.
2024-11-08 08:40:32 +00:00
Kenneth Loeffler
bc2c76e5e2 Use 7.5.0-prealpha for master branch version, not 7.4.4
<p dir="auto">in <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="2636858743" data-permission-text="Title is private" data-url="https://github.com/rojo-rbx/rojo/issues/989" data-hovercard-type="pull_request" data-hovercard-url="/rojo-rbx/rojo/pull/989/hovercard" href="https://github.com/rojo-rbx/rojo/pull/989">#989</a>, we changed Rojo's version number on the master branch to 7.4.4. This is a little odd, because 7.4.4 is already released, is diverged from the master branch, and we are not working towards 7.4.4 on the master branch. If we're going to spend time on this, I think we should use a more appropriate version number.</p>
<p dir="auto">This PR changes the version number to 7.5.0-prealpha, since Rojo's master branch is currently undergoing development towards 7.5.0. We will most likely <strong>not</strong> be making a release of this version - the only intent is better clarity for those running Rojo's latest master.</p>
2024-11-06 15:59:03 +00:00
boatbomber
4a7bddbc09 Update version in master branch (#989) 2024-11-05 18:10:24 -08:00
boatbomber
e316fdbaef Make sync reminder more detailed (#987) 2024-11-05 22:47:07 +00:00
Micah
34106f470f Remove maplit dependency and stop using a macro for hashmaps (#982) 2024-10-31 11:56:54 -07:00
Micah
d9ab0e7de8 Support $schema in JSON structures (#974) 2024-10-24 10:55:51 -07:00
Micah
5ca1573e2e Correct mistake in build command docs (#977) 2024-10-18 14:08:58 -07:00
Micah
c9ce996626 Update workflow and tooling versions (#910) 2024-09-03 15:36:36 -07:00
Kenneth Loeffler
73097075d4 Update rbx-dom dependencies (#965) 2024-08-22 20:03:06 +01:00
Micah
5e1cab2e75 Actually include attribute-defined properties in patch computation (#944) 2024-08-19 15:41:02 -07:00
Micah
30f439caec Add 7.4.3 to changelog (#960)
After 7.4.3 released, I forgot to update the changelog on master. This
fixes that.
2024-08-15 16:42:11 +00:00
boatbomber
4b5db4e5a9 Check for compatible updates in plugin (#832) 2024-08-05 11:34:29 -07:00
Barış
3fa1d6b09c Set linguist language of lua files to luau (#956) 2024-08-02 10:03:57 -07:00
Micah
6051a5f1f1 Update Changelog to include 7.4.2 (#951) 2024-07-23 14:39:04 -07:00
Kenneth Loeffler
5f7dd45361 Sleep between file copies and serve for macOS serve tests (#945) 2024-07-20 09:52:05 -07:00
Micah
3ca975d81d Correct issue with default.project.json files with no name being named default after change (#917)
Co-authored-by: Kenneth Loeffler <kenloef@gmail.com>
2024-07-15 09:24:51 -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
dependabot[bot]
a7b45ee859 Bump h2 from 0.3.24 to 0.3.26 (#921) 2024-05-30 12:45:38 -07:00
boatbomber
62f4a1f3c2 Use history recording and don't do anything permanent (#915) 2024-05-30 12:28:58 -07:00
boatbomber
3d4e387d35 Redesign settings UI in plugin (#886) 2024-05-13 10:36:03 -07:00
Micah
2c46640105 Allow openScriptsExternally option to be changed during sync (#911) 2024-05-08 12:34:00 -07:00
dependabot[bot]
41443d3989 Bump rustls from 0.21.10 to 0.21.11 (#905) 2024-04-19 20:03:55 +00:00
Kenneth Loeffler
4b3470d30b Fix removing trailing newlines by using str::replace in memofs (#903) 2024-04-17 11:55:23 -07:00
Kenneth Loeffler
ce71a3df4d Release workflow maintenance (#902) 2024-04-17 11:55:08 -07:00
Kenneth Loeffler
7232721b87 Use dtolnay/rust-toolchain and upgrade to checkout v4 in CI workflow (#900)
This PR performs some routine maintenance on our CI workflow:

* Replaces `actions-rs/toolchain` with `dtolnay/rust-toolchain`. The
actions at `actions-rs` are no longer maintained, and they use
deprecated GitHub Actions APIs. dtolnay's action does not support the
`override` option, but we didn't actually need to use it anyway.
* Upgrades `actions/checkout` to v4, because v3 causes some warnings
since it uses Node.js 16, which is deprecated.
2024-04-09 14:55:42 -07:00
boatbomber
b2f133e6f1 Patch visualizer redesign (#883) 2024-04-02 00:04:58 -07:00
Kenneth Loeffler
87920964d7 Release memofs 0.3.0, bump Rojo dependency (#894) 2024-03-25 10:48:27 -07:00
Barış
c7a4f892e3 Add never option to Confirmation (#893) 2024-03-14 19:41:21 +00:00
EgoMoose
8f9e307930 Trim plugin version string (#890)
Duplicate of https://github.com/rojo-rbx/rojo/pull/889, but based on
master as per request.

This PR is a very small change that fixes the string pattern that reads
the rojo version from `Version.txt`. Currently this reads an extra
new-line character which makes reading the version text in the plugin
difficult.

It seems the rust side of things already trims the string when
comparing, but the lua side does not.
2024-03-13 09:50:41 -07:00
Micah
856d43ce69 Update Cargo dependencies (#887) 2024-03-04 15:20:58 -08:00
boatbomber
26181a5a1f Use GuiState instead of manual calculation for tooltips (#884) 2024-02-29 14:50:06 -08:00
boatbomber
edf87bf9a3 Build tree ancestry correctly (#882) 2024-02-29 14:27:46 -08:00
Kenneth Loeffler
5f51538e0b Update master's changelog in preparation for 7.4.1 release (#873)
This PR edits the changelog on master to reflect 7.4.1's release
2024-02-21 01:46:01 +00:00
Micah
48bb760739 Make the name field in projects optional (#870)
Closes #858.

If a project is named `default.project.json`, it acts as an `init` file
and gains the name of the folder it's inside of. If it is named
something other than `default.project.json`, it gains the name of the
file with `.project.json` trimmed off. So e.g. `foo.project.json`
becomes `foo`.
2024-02-20 17:25:57 -08:00
Micah
42121a9fc9 Allow building Rojo with profile-with-tracy feature (#862) 2024-02-20 14:56:55 -08:00
Filip Tibell
02d79a4749 Migrate to using Rustls (#861) 2024-02-20 14:56:31 -08:00
Kenneth Loeffler
ddb26c73bd rbx_dom_lua rojo-rbx/rbx-dom@6ccd30f (custom pivot get/set) (#868) 2024-02-20 12:08:55 -08:00
boatbomber
8ff064fe28 Add benchmarking, perf gains, and better settings UI (#850) 2024-02-12 15:58:35 -08:00
Kenneth Loeffler
cf25eb0833 Normalize line endings to LF in Lua middleware (#854) 2024-02-12 14:58:03 -08:00
boatbomber
5c4260f3ac Catch failed http requests that didn't error so we can handle them correctly (#847) 2024-02-01 21:29:36 +00:00
Kenneth Loeffler
7abf19804c Ignore any unreadable property in Reconciler:diff (#848) 2024-02-01 21:05:44 +00:00
boatbomber
df707d5bef Lint plugin src (#846) 2024-01-31 21:08:07 -08:00
boatbomber
f3b0b0027e Catch more sync failures (#845)
- Catch removal failures
- Catch name change failures
- Don't remove IDs for instances if they weren't actually destroyed
2024-01-31 17:07:01 -08:00
boatbomber
106a01223e Show failed additions and removals in visualizer (#844) 2024-01-31 14:45:28 -08:00
boatbomber
506a60d0be Play Solo & Test Server auto connect (#840)
When enabled, the `baseurl` of the session is written to
`workspace:SetAttribute("__Rojo_ConnectionUrl")` so that the test server
can connect to that session automatically.

This works for Play Solo and Local Test Server. It is marked
experimental for now (and disabled by default) since connecting during a
playtest session is... not polished. Rojo may overwrite things and cause
headaches. Further work can be done later.
2024-01-30 12:51:45 -08:00
boatbomber
4018607b77 Visualize table changes (#834)
Implements a pop out diff view for table properties like Attributes and
Tags
2024-01-22 12:26:41 -08:00
boatbomber
1cc720ad34 Use Studio theming (#838)
Updates our Theme provider to use Studio colors. A few components look
ever so slightly different now, but more in line with Studio.
2024-01-22 11:22:21 -08:00
Micah
73828af715 Add a new syncRules field project files to allow users to specify middleware to use for files (#813) 2024-01-19 22:18:17 -08:00
Micah
c0a96e3811 Release v7.4.0 (#837) 2024-01-16 12:12:40 -08:00
Micah
9d0d76f0a5 Ensure plugin and Cargo version match exact at compile-time (#836) 2024-01-16 14:09:10 -06:00
Micah
c7173ac832 Don't serialize emitLegacyScripts if it's None (#835) 2024-01-16 10:09:16 -08:00
boatbomber
b12ce47e7e Don't remind to sync if the lock is claimed (#833)
If the sync lock is claimed in Team Create, the user cannot sync.
Therefore, a sync reminder notification is unhelpful as it is calling to
an invalid action.
2024-01-12 12:35:29 -08:00
Barış
269272983b Changed file extensions of init command from lua to luau (#831) 2024-01-05 16:00:49 -08:00
Kenneth Loeffler
6adc5eb9fb Conserve CI minutes via cache, skip macOS+Windows MSRV builds (#827)
Windows and macOS runners consume GitHub Actions minutes at [2x and 10x
the rate of Linux runners,
respectively](https://docs.github.com/en/billing/managing-billing-for-github-actions/about-billing-for-github-actions#minute-multipliers).
This is a bit concerning now that there are two Windows jobs and two
macOS jobs, introduced in #825.

This PR aims to reduce the cost by:
* Adding [rust-cache](https://github.com/Swatinem/rust-cache/) to reduce
the amount of time spent. I'm aware there were some concerns raised
about CI caches in general in #496 - are they still a blocker?
* Removing the unnecessary Windows and macOS MSRV build jobs. If an MSRV
build fails on one platform due to usage of new language features, then
it will fail on all of them.

@Kampfkarren may have to change this repository's required status checks
before this PR can be merged
2024-01-02 15:49:24 -08:00
boatbomber
fd8bc8ae3f Improve visualization for arrays (#829) 2024-01-02 17:32:37 +00:00
Kenneth Loeffler
3369b0d429 Downgrade to Notify 4, use FSEvents, use minimal recursive watches (#830) 2024-01-02 09:26:06 -08:00
Kenneth Loeffler
097d39e8ce Fix move_folders_of_stuff (#826)
This is a fairly important test verifying whether the action of moving a
folder into a watched folder is correctly detected and processed. It was
disabled in
b43b45be8f.
The fact that it failed indicates a possible bug in change processing,
so in this PR, I'll re-enable the test, investigate why it fails, and
fix it.
2023-12-31 12:02:54 -08:00
Kenneth Loeffler
11fa08e6d6 Run CI workflow on Windows and macOS (#825)
This PR adds macOS and Windows jobs to the CI workflow. This allows us
to see when changes break functionality on any supported platform, which
is particularly important for changes that involve the file system or
file watcher.
2023-12-29 17:46:58 -08:00
Kenneth Loeffler
96987af71d Fix broken serve tests on macOS (#824)
Right now, serve tests will fail when Rojo is built with the FSEvent
backend. The cause is essentially due to the fact that `/var` (where
temporary directories for serve tests are located) on macOS is actually
a symlink to `/private/var`. Paths coming from FSEvent always have
symlinks expanded, but Rojo never expands symlinks. So, Rojo's paths
during these tests look like `/var/*` while the FSEvent paths look like
`/private/var/*`. When Rojo's change processor receives these events, it
considers them outside the project and does not apply any changes,
causing serve tests to time out.

To work around this, we can call `Path::canonicalize` before passing the
project path to `rojo serve` during serve tests. Rojo does need to
better support symlinks (which would also solve the problem), but I
think that can be left for another day because it's larger in scope and
I mostly just want working tests before addressing #609.
2023-12-28 23:17:00 +00:00
Vee
23327cb3ef Fix preloading assets in plugin (#819)
`gatherAssetUrlsRecursive` now returns asset URLs deeper than one layer.
2023-12-04 16:02:25 +00:00
Jack T
b43b45be8f Upgrade to Notify 6 (#816) 2023-11-23 16:16:43 -08:00
Micah
41994ec82e Release v7.4.0-rc3 (#811) 2023-10-25 17:01:06 -07:00
Micah
cd14ea7c62 Remove unnecessary borrows (#810) 2023-10-25 17:59:02 -05:00
Kenneth Loeffler
9f13bca6b8 rbx_dom_lua rojo-rbx/rbx-dom@440f3723 (attribute validation) (#809)
Brings over some changes to rbx_dom_lua to validate attribute names
before calling `Instance:SetAttribute`. This should prevent Rojo from
falling over when it attempts to sync an attribute with an invalid name.
2023-10-25 14:21:58 -07:00
Kenneth Loeffler
f4252c3e97 Update changelog in preparation for 7.4.0-rc3 (#808)
Summarizes recent changes since 7.4.0-rc2 in the changelog
2023-10-23 22:54:48 +00:00
Kenneth Loeffler
6598867d3d Bump rbx_binary to 0.7.3 (#807)
Bumps rbx_binary's version to 0.7.3 to bring in the missing
`SecurityCapabilities` serialization fallback default
2023-10-23 22:43:00 +00:00
dependabot[bot]
f39e040a0d Bump rustix from 0.38.15 to 0.38.20 (#806) 2023-10-23 22:38:28 +00:00
Kenneth Loeffler
a3d140269b Demote unapplied patch warnings to debug logs (#805)
These warnings always appear for properties like `Capabilities`,
`SourceAssetId`, etc. and tend to scare users who are syncing models.
This information is now surfaced in the patch visualizer, so I think
these warnings can be demoted to debug logs.
2023-10-23 11:47:50 -07:00
Kenneth Loeffler
feac29ea40 Fix PatchTree incorrect changeList entries on decode failure (#804) 2023-10-22 16:58:12 -07:00
Kenneth Loeffler
834c8cdbca rbx_dom_lua rojo-rbx/rbx-dom@0e10232b (SecurityCapabilities) (#803)
Closes #802.
2023-10-22 16:57:59 -07:00
Kenneth Loeffler
d441fbdf91 Bump rbx_dom_lua rojo-rbx/rbx-dom@e7a5b91c (ScriptEditorService) (#801) 2023-10-17 14:15:47 -07:00
Filip Tibell
e897f524dc Skip sourcemap generation when unaffected by changes in watch mode (#800) 2023-10-13 08:38:21 -07:00
Micah
1caf9446d8 Rojo 7.4.0-rc2 (#798) 2023-10-04 05:36:57 +00:00
Micah
bfd2c885db Properly handle build metadata in semver parsing in plugin (#797) 2023-10-04 05:23:18 +00:00
Kampfkarren
f467fa4e59 7.4.0-rc.1 [release] 2023-10-03 21:07:06 -07:00
Micah
41fca4a2bb Set version to Rojo 7.4.0-rc1 (#796)
Due to the rewrite of the plugin's core sync loop and the change for the
Notify backend on MacOS, along with all the other changes in 7.4.0, it
makes sense for us to use a release candidate before actually cutting a
proper `7.4.0` release.
2023-10-04 00:04:21 -04:00
Micah
d38f955144 Update rbx_dom dependencies (#795)
In preparation for a new release, rbx_dom needs to be updated.
2023-10-03 16:32:22 -07:00
Micah
010e50a25d Add check to ensure plugin version matches cargo version (#794)
This modifies Rojo's build script to throw a fit if we're building a
plugin with a semver incompatible version. In the process, it moves the
version of the plugin to a file named `Version.txt` that's parsed at
runtime. This should be minimally invasive but it's technically worse
for performance than the hardcoded table and string we had before.

This feels better than a CI check or just manually verifying because it
makes it physically impossible for us to forget since Rojo won't build
with it being wrong.
2023-10-03 10:29:47 -04:00
Micah
eab7c607cd Don't include package author in CLI help (#793)
LPG is at the moment listed by name and email in the `help` for Rojo. We
should probably remove that before cutting a new release.
2023-10-03 10:22:47 -04:00
Kenneth Loeffler
3cafbf7f1a Use PollWatcher in memofs StdBackend on macOS (#783) 2023-09-26 15:41:33 -07:00
Kenneth Loeffler
d7277b5a5b Clean up changelog in preparation for Rojo 7.4.0 (#788)
This PR aims to clean up the changelog in preparation for 7.4.0. We
should focus on making changes clear to users with examples, removing
any entries that they won't care about, and consolidating tightly
related changes

---------

Co-authored-by: boatbomber <zack@boatbomber.com>
Co-authored-by: Micah <48431591+nezuo@users.noreply.github.com>
2023-09-25 16:13:01 -07:00
Sasial
bb8dd1402d Add RunContext support for script outputs (#765)
Resolves #667

This PR:

- Introduces a new field in the project file: `scriptType` which has the
default value of `Class` (in parity with previous versions), but can
also be `RunContext`.
- This is then passed to `InstanceContext` from the `Project` struct.
- This then changes the RunContext in the lua `snapshot_middleware`

---------

Co-authored-by: Micah <dekkonot@rocketmail.com>
2023-09-23 13:28:09 -07:00
Barış
539cd0d418 Create .git-blame-ignore-revs & Add Stylua pr (#787)
adds stylua pr to ignore so it doesn't show on git blame history
2023-09-19 05:56:39 +00:00
boatbomber
0f8e1625d5 Stylua formatting (#785)
Uses Stylua to format all existing Lua files, and adds a CI check in
`lint` to pin this improvement. Excludes formatting dependencies, of
course.
2023-09-18 15:39:46 -07:00
boatbomber
840e9bedb2 Use GUIDs for ephemeral PluginWidgets (#784)
Because Roact will destroy and recreate a plugin widget if it unmounts
and remounts, Studio will complain about making a new widget with the
same ID as the old one.

The simplest solution is to just use GUIDs so we never have to worry
about this again. The ID is used internally for storing the widget's
dock state and other internal details, so we don't want *all* our
widgets to use GUIDs, only the ephemeral popup ones.
2023-09-18 21:44:14 +00:00
Micah
e11ad476fc Use conflicts_with for build flags (#779) 2023-09-11 13:32:43 -07:00
boatbomber
c43726bc75 Confirmation behaviors (#774) 2023-08-20 12:37:40 -07:00
Kenneth Loeffler
c9ab933a23 Update rbx_dom_lua to rojo-rbx/rbx-dom@7b03132 (#775)
Fixes a problem where the MaterialColors Lua encoder would return nothing
2023-08-16 16:47:04 -07:00
Micah
066a0b1668 Allow Terrain to be included in projects without a classname (#771)
Services, `StarterPlayerScripts`, and `StarterCharacterScripts` are
currently special-cased to allow them to be specified in project files
without a classname. This does the same to `Terrain` since it's a
singleton in the same style as those.
2023-08-15 05:41:49 -07:00
Micah
aa68fe412e Add ambiguous value support for MaterialColors (#770)
The last release of rbx_dom had support for `Terrain.MaterialColors`.
This allows it to be specified directly instead of only via the
fully-qualified syntax.
2023-08-14 15:41:15 -07:00
Micah
d748ea7e40 Update rbx_dom dependencies (#768) 2023-08-09 21:54:47 -07:00
boatbomber
a7a282078f Update Highlighter submodule from 0.8.1 to 0.8.2 (#767)
Highlighter had an edge case with changed events racing, which has been
resolved in the 0.8.2 patch.
2023-08-09 06:40:35 +00:00
boatbomber
2fad3b588a Fix theme (#763) 2023-08-03 00:47:03 +00:00
utrain
4cb5d4a9c5 Update Theme to use Color3.fromHex (#761) 2023-08-01 09:36:29 -07:00
Micah
5b22ef192e Don't override initial state for source diff view (#760) 2023-08-01 09:33:06 -07:00
boatbomber
34024d8524 Fix PatchTree performance issues (#755)
When building the tree, I've implemented a few improvements:

- We no longer traverse the full ancestry for every leaf node- we exit
early when we find a node that already exists
- We no longer search the entire tree to see if a node id exists before
creating one with that id, we just check if is in the map
2023-07-31 22:26:16 -07:00
boatbomber
ecc31dea15 View rich diffs for Source property changes (#748) 2023-07-26 23:50:29 -07: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
Micah
f6fc5599c0 Add plugin template (#738)
Adds a new plugin template to the `init` command: `rojo init --kind
plugin`.
2023-07-23 17:12:48 -07:00
Micah
89b6666436 Support ambiguous syntax for Font properties (#731) 2023-07-20 21:30:18 -07:00
Micah
94d45a2262 Remove references to LPG's patreon (#744)
Given that LPG is not maintaining Rojo or its related projects, it does
not make sense for us to suggest his patreon. This PR removes them.
2023-07-20 07:57:02 -07:00
Micah
dc17a185ca Add plugin build flag (#735)
Resolves #715.
2023-07-17 19:15:40 -07:00
boatbomber
4915477823 Expose reconciler hooks on servesession (#741) 2023-07-17 04:03:06 +00:00
boatbomber
8662d2227c Improve Rojo sync reliability (#739)
Uses non-recursive main loop and avoids hanging promises
2023-07-16 14:59:30 -07:00
dependabot[bot]
dd01a9bef3 Bump openssl from 0.10.51 to 0.10.55 (#737) 2023-07-14 14:04:11 -07:00
Shae
6e320b1fd5 Add support for TOML files (#633)
TOML maps well to Lua, is easier to read and write than JSON, and is
commonly used by Roblox tools.

Use cases:
* Put game, plugin, or library config in a toml file
* Sync in toml files generated by tools
* Sync in config files for tools so that the game can double-check that
the config file has been followed. (e.g. check that packages match
versions specified in wally.toml)
2023-07-14 20:36:50 +00:00
boatbomber
6e40993199 Rework patch visualizer with many fixes and improvements (#726)
- Reconciler now has precommit and postcommit hooks for patch applying
  - This is used to compute a patch tree snapshot precommit and update the
tree metadata postcommit
- PatchVisualizer can now display Removes that happened during sync
  - It was previously missing because the removed objects no longer
existed so it couldn't get any info on them (This is resolved because
the info is gotten in precommit, before the instance was removed)
- PatchVisualizer now shows Old and New values instead of just Incoming
during sync
  - (Still displays Current and Incoming during confirmation)
  - This is much more useful, since you now see what the changes were and
not just which things were changed
- PatchVisualizer displays clarifying message when initial sync has no
changes instead of just showing a blank box
- Objects in the tree UI no longer get stuck expanded when the next
patch has the same instance but different info on it
- Objects in the tree UI correctly become selectable after their
instance is added and unclickable when removed during sync
2023-07-13 20:09:19 -07:00
boatbomber
9d48af2b50 Better settings control (#725)
- Lock some settings during sync
- Make experimental features more clearly labelled
2023-07-12 13:00:07 -07:00
boatbomber
28d48a76e3 Fix tooltips crashing on thread cancellation edge cases (#727) 2023-07-12 10:01:21 -07:00
utrain
80eb14f9da Removed InstanceSnapshot snapshot_id's redudant Ref. (#730)
Ref now is an optional inside, so it's redundant to have an option
wrapping an option. The only snapshots that were changed were any that
had a Ref within (from none to zeroed). Some also had some newlines
added in the end.
2023-07-12 10:00:09 -07:00
boatbomber
623fa06d52 Improve tooltip behavior (#723) 2023-07-08 21:41:47 -07:00
boatbomber
7154113c13 Add buttons on connected page (#722) 2023-07-08 21:23:25 -07:00
boatbomber
0a932ff880 Show failed to apply in visualizer (#717)
Objects with failed changes will highlight, and the specific failed
changes in their list will highlight as well.
2023-07-08 19:31:26 -07:00
boatbomber
7ef4a1ff12 Select Instances from diff tree (#709) 2023-07-08 18:45:25 -07:00
Barış
ccc52b69d2 (fix) Move changelog job to it's own workflow (#720)
- moved the job to its own workflow file
- changed the label to `skip changelog`
2023-07-09 01:30:59 +00:00
Barış
8139fdc738 (feat) Add Changelog Check Action (#719) 2023-07-09 00:44:28 +00:00
boatbomber
a4fd53d516 Update changelog to include #713 2023-07-08 15:54:19 -07:00
boatbomber
27357110b5 Handle strings and instances in patch removes for visualizer (#713)
When an object is deleted in a patch, it is either represented with an
ID or an Instance. On initial sync, removals are instances since the map
does not contain those instances. Later removals of managed objects use
an ID. The patch visualizer only handled instances, so this fixes that.

Closes #710.
2023-07-08 14:37:42 -07:00
boatbomber
fde78738b6 Improve sync info (#692)
- Fixed an edge case where disconnecting and then reconnecting would
retain outdated info
- Fixed an issue where new patches wouldn't immediately update the
change info text
- Removed extraneous changes count info, as it was not useful and could
be checked in the visualizer anyway
- Added warning info for when some changes fail to apply
- Updates timestamp of last sync even if patch was empty, to have a more
accurate signal on Rojo's uptime
2023-07-05 21:38:11 +00:00
boatbomber
ce530e795a Fix Rojo breaking when users undo/redo in Studio (#708) 2023-07-05 14:09:11 -07:00
boatbomber
658d211779 Sync reminder notification & notification actions (#689)
Implements and closes #652.

---------

Co-authored-by: Chris Chang <51393127+chriscerie@users.noreply.github.com>
Co-authored-by: Micah <git@dekkonot.com>
2023-07-04 20:09:41 +00:00
boatbomber
66c1cd0d93 Add protection against syncing non place projects (#691)
Closes #113.

Does what it says on the tin. When you try to sync a non-place project,
it gives a clear message instead of crashing.
2023-06-30 13:44:42 -07:00
boatbomber
55ac231cec Skip confirming patches that only contain a datamodel name change (#688)
Closes #672.

Skips the user confirmation if the patch contains only a datamodel name
change.

I decided to build generic PatchSet utility functions in case we need to
use similar logic in the future, in addition to maintaining clear
division of duties. The app code shouldn't be too dependent upon patch
internal structure when we can avoid it.

---------

Co-authored-by: Kenneth Loeffler <kenloef@gmail.com>
2023-06-30 11:21:36 -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
Kenneth Loeffler
8646b2dfce Fix snapshot middleware clippy lints (#686)
The seventh in a series of PRs that aim to get CI passing
2023-06-30 11:06:12 -07:00
Kenneth Loeffler
a2f68c2e3c Fix snapshot clippy lints (#685)
The sixth in a series of PRs that aim to get CI passing
2023-06-30 11:05:55 -07:00
Kenneth Loeffler
5b1a090c5e Fix serve session clippy lints (#684)
The fifth in a series of PRs that aim to get CI passing
2023-06-30 11:05:30 -07:00
Kenneth Loeffler
e9efa238b0 Fix project clippy lints (#683)
The fourth in a series of PRs that aim to get CI passing
2023-06-30 11:04:56 -07:00
Kenneth Loeffler
0dabd8a1f6 Fix memofs clippy lints (#682)
The third in a series of PRs that aim to get CI passing
2023-06-30 11:04:04 -07:00
Kenneth Loeffler
b7a1f82f56 Fix cli clippy lints (#681)
The second in a series of PRs that aim to get CI passing
2023-06-30 11:03:37 -07:00
Kenneth Loeffler
2507e096b7 Fix change processor clippy lints (#680)
Bear with me here...

The first in a series of PRs that aim to get CI passing
2023-06-30 11:03:09 -07:00
boatbomber
b303b0a99c Add PRs 674 and 675 to changelog (#693)
Forgot to update changelog in those PRs, this remedies that
2023-06-30 11:02:14 -07:00
Filip Tibell
342fb57d14 Fix compilation target in release workflow (#701)
Fixes macOS aarch64 builds not actually outputting x86 binaries by
specifying the `--target` flag during compilation in the release
workflow. These are the same changes as [this PR in
Aftman](https://github.com/LPGhatguy/aftman/pull/34), which had the same
issue, and uses the same workflow.
2023-06-30 10:53:19 -07:00
Boegie19
a9ca77e27f Change gitmodules from ssh to https (#696)
Why if you want to use ssh you need todo more setup aka add a ssh key
into github while with https you don't have to do the extra work aka
makes rojo easier to contribute to.
2023-06-16 11:41:30 -07:00
boatbomber
6542304340 Fix the diff visualizer of connected sessions (#674)
Clicking on the "X changes X ago" message opens up a handy diff
visualizer to see what those changes were. However, it had quite a few
issues that needed fixing.

- Disconnecting a session with it expanded caused an error as it tried
to read the serveSession that no longer exists during the page fade
transition. (#671)
- Resolved by converting to stateful component and holding the
serveSession during the lifetime to ensure it can render the last known
changes during the fade transition
- Leaving it open while new changes are synced did not update the
visualizer
- The patch data was piggybacking on an existing binding, which meant
that new patches did not trigger rerender.
    - Resolved by converting to state
    - Also made some improvements to that old binding
- Moved from app to connected page for better organization and
separation of duties
      - No more useless updates causing rerenders with no real change
- Scroll window child component wouldn't actually display the updated
visuals
    - Resolved by making major improvements to VirtualScroller
      - Made more robust against edge case states
      - Made smarter about knowing when it needs to refresh

As you can see in this slow motion GIF, it works now.

![slowedDemo](https://github.com/rojo-rbx/rojo/assets/40185666/c9fc8489-72a9-47be-ae45-9c420e1535d4)
2023-06-03 22:46:16 -07:00
boatbomber
6b0f7f94b6 Fix disconnected session activity (#675)
When a session is disconnected, the apiContext long-polling for messages
continues until resolved/rejected. This means that even after a session
is disconnected, a message can be received and handled.

This leads to bad behavior, as the session was already cleaned up and
the message cannot be handled correctly. The instance map was cleaned up
upon disconnect, so it will warn about unapplied changes to unknown
instances. (Like #512)

It's very easy to repro:
Connect a session, disconnect it, then save a change.


https://github.com/rojo-rbx/rojo/assets/40185666/846a7269-7043-4727-9f9c-b3ac55a18a3a

-----------

This PR fixes that neatly by tracking all active requests in a map, and
cancelling their promises when we disconnect.
2023-06-01 08:18:04 -07:00
Kenneth Loeffler
d87c76a23e Switch plugin packages back to git submodules (#678)
Alright, so I hate to be the one to do this, but #584 broke crates.io
publishing and also caused librojo to be unusable. I see that there was
some discussion on Discord shortly after the problem was realized, but
there was no action taken.

I think keeping librojo and publishing working far, far outweigh any
convenience added by Wally.

I've kept the same `Packages` naming convention to keep the diff
minimal.
2023-05-26 10:26:21 -07:00
Filip Tibell
305423b856 Sourcemap performance improvements (#668)
This PR brings two performance improvements to the `rojo sourcemap`
command:

- Use `rayon` with a small threadpool to parallelize sourcemap
generation while still keeping startup cost very low
- Remove conversions to owned strings and use lifetimes tied to the dom
instead, which mostly improves performance with the
`--include-non-scripts` flag enabled

From my personal testing on an M1 mac this decreases the sourcemap
generation time of our games by 2x or more, from ~20ms to ~8ms on one
project and ~30ms to ~15ms on another. Generation is pretty fast to
begin with but since sourcemaps are heavily used in interactive tools
(like luau-lsp) a difference of a couple frames can be great for ux.
2023-05-06 01:01:15 -07:00
Miizzuu
4b62190aff Fix wrong version of Rojo displaying in studio. (#669) 2023-05-06 01:00:45 -07:00
Lucien Greathouse
e17771a6a5 Release v7.3.0 2023-04-22 16:07:39 -04:00
Lucien Greathouse
bac30ae78b Update MSRV to try to fix CI workflow 2023-04-22 15:58:14 -04:00
Lucien Greathouse
c0219922b2 Update dependencies 2023-04-22 15:44:49 -04:00
boatbomber
b5ed952d5c Add visual diffs to syncing (#603)
* Add user confirmation to initial sync

* Use "Accept" instead of "Confirm"

* Draw tree alphabetically for determinism

* Add diff table dropdown

* Add diff table to newly added objects

* Unblock keybind workflow

* Only show reject button when two way is enabled

* Try to patch back to the files when changes are rejected

* Improve text spacing of the prop diff table

* Skip user confirmation of perfect syncs

* Give instances names for debugging UI

* Optimize tree building

* Efficiency: dynamic virtual scrolling & lazy rendering

* Simplify virtual scroller logic and avoid wasteful rerenders

* Remove debug print

* Consistent naming

* Move new patch applied callback into accept

* Pcall archivable

* Keybinds open popup diff window

* Theme rows in diff

* Remove relic of prototype

* Color value visuals and better component name

* changeBatcher is not needed when no sync is active

* Simplify popup roact entrypoint

* Alphabetical prop lists and refactor

* Add a stroke to color blot for contrast

* Make color blots animate transparency with the rest of the page

* StyLua formatting on newly added files

* Remove wasteful table

* Fix diffing custom properties

* Display tables more meaningfully

* Allow children in the button components

* Create a rough tooltip component

* Add tooltips to buttons

* Use provider+trigger schema to avoid tooltip ZIndex issues

* Add triangle point to tooltip

* Tooltip underneath instead of covering

* Cancel hovers when unmounting

* Allow multiple canvases from one provider

* Display above or below depending on available space

* Move patch equality to PatchSet.isEqual

* Use Container

* Remove old submodules

* Reduce false positives in diff

* Add debug log

* Fuzzy equals CFrame in diffs to avoid floating point in

* Fix decodeValue usage

* Support the .changedName patches

* Fix content overlapping border

* Fix tooltip tail alignment

* Fix tooltip text fit

* Whoops, fix it properly

* Move PatchVisualizer to Components

* Provide Connected info with full patch data

* Avoid implicit nil return

* Add patch visualizer to connected page

* Make Current column invisible when visualizing applied patches

* Avoid floating point diffs in a numbers and vectors
2023-04-01 23:17:23 -04:00
ok-nick
7994bc4909 Update setup-aftman (#648) 2022-11-18 03:32:13 -05:00
boatbomber
b88d34c639 Add tooltips to buttons (#637)
* Add tooltips

* Fix whitespace

* Avoid overloaded word canvas

* Clean render function

* Switch folder to fragment
2022-10-07 19:31:14 -04:00
fox
96cb1ee3fd Support explicitly specifying http or https protocol in plugin (#642)
* Support explicitly specifying http or https protocol in plugin

* Fix incorrect format string

Port is not a number
2022-09-30 17:59:09 -04:00
boatbomber
003abe86bb Save host and port by placeId (#613)
* Save host and port by placeId

* Bump to 5 months before clearing

* Fix indentation
2022-09-22 23:03:09 -04:00
Lucien Greathouse
6ec411a618 Add Patreon badge to README 2022-08-20 23:44:10 -04:00
Qualadore
c7c0903804 Reduce minimum plugin size (#606)
* Reduce minimum plugin size

* Resize to 300x120

Co-authored-by: Qualadore <me@qualadore.com>
2022-08-20 22:40:52 -04:00
boatbomber
cdc972a5ce Migrate DevSettings to PluginSettings for much better config flow (#572)
* Add the devsetting config options into settings

* Create dropdown component and add setting controls

* Static dropdwon width and spin arrow

* Improve dropdown option contrast and border

* Forgot to make the settings page respect the static spacing, oops

* Smaller arrow

* Vert padding

* Reset option for settings

* Hide reset button when on default

* Respect the logLevel setting

* Portal settings out to external typechecking module

* Implement new configs using the new singleton Settings

* Remove DevSettings

* Update test runner to use new settings

* More helpful test failure output

* Support non-plugin environment

* Migrate dropdown to new packages system

* Clean up components a tad
2022-08-20 22:39:34 -04:00
Boegie19
17de912608 fix_vfs_double_update (#616) 2022-08-20 22:33:19 -04:00
Boegie19
9876508887 added attributes to AdjacentMetadata (#624)
* added attributes to AdjacentMetadata

* ran fmt
2022-08-20 22:32:58 -04:00
Lucien Greathouse
72d62220e8 Fix referring to open source maintainer as a chicken 2022-08-20 22:22:11 -04:00
Lucien Greathouse
46ad337fa5 Switch all workflows to Aftman 2022-08-20 22:20:51 -04:00
Boegie19
7a3ba7721f fix release action with aftman (#627)
* fix release action with aftman

* Fixes using bash not powershell

* removed comment
2022-08-20 22:15:01 -04:00
Lucien Greathouse
e0198e626b Build Linux release on Ubuntu 20.04, use fixed artifact names 2022-08-20 21:34:41 -04:00
boatbomber
142705f386 Fix security permission error (#619) 2022-08-10 15:57:24 -04:00
boatbomber
4cb49c7825 Add sync locking for Team Create (#590)
* Add sync locking

* Steal lock from users who left without releasing

* Do not remove lock as unknown instance

* Don't delete non Archivable instance
2022-08-08 04:08:55 -04:00
Barocena
05adb82dda Renamed Common to Shared (#611) 2022-08-08 03:59:52 -04:00
boatbomber
faf7671799 Make error messages copyable (#614)
* Make error copyable

* Allow partial copying or double click full copy
2022-08-08 03:58:32 -04:00
Lucien Greathouse
d64db329dd Fix release workflow to use Wally 2022-08-08 00:28:52 -04:00
Lucien Greathouse
e34d2339ad Vendor OpenSSL via native-tls-vendored reqwest feature 2022-08-08 00:15:05 -04:00
Max
d196c5091c Simplify usage of attributes. (#574)
* Support implicit values for primitive attributes

This commit adds support for strings, numbers, and booleans to be implicitly typed in attribute maps, reducing the redundancy of needing to specify their types.

I also quietly adjusted one of the tests to use a more stable class/property pair. Since SourceAssetId is locked to Roblox, it could potentially disappear at any time.

* Apply formatting.

* Address feedback

* Backwards compatible format usage.

* Axe UnresolvedValueMap in favor of $attributes

Attributes can be defined directly on instances, with support for unambiguous types.

* Adjust test.

* to_string() -> into()

* Made attribute test more concise.

* small cleanup

* Update src/resolution.rs

* Update src/resolution.rs

* Update src/resolution.rs

* Update src/resolution.rs

Co-authored-by: Lucien Greathouse <me@lpghatguy.com>
2022-08-03 20:07:06 -04:00
Lucien Greathouse
3e83f92532 Update MSRV to 1.58.1 for format string capturing 2022-08-03 19:39:36 -04:00
James Onnen
41d7aaf323 Add uipadding to notifications (#589) 2022-08-03 19:01:07 -04:00
boatbomber
e110f3726a Real-time status about sync details (#569)
* Rough prototype of patch info display

* Remove extra newline

* Switch to binding

* Update slower for older timestamps

* Batch patches within a second of each other

* Fix indentation

* Less wasteful refresh hz

* More apt variable name

Co-authored-by: Lucien Greathouse <me@lpghatguy.com>
2022-08-03 18:58:28 -04:00
Boegie19
eb5c897ac0 fix relevant_paths not being set for init.csv (#599)
* fix relevant_paths not being set for init.csv

* fix failing tests

Co-authored-by: Lucien Greathouse <me@lpghatguy.com>
2022-08-03 18:38:08 -04:00
boatbomber
e864cf0c7d Switch git submodules to Wally packages (#584)
* Switch git submodules to Wally packages

* Update build snapshot

* Add wally to foreman and use latest versions

* Install packages in CI runners

* Fix indents

* Install packages in the correct directory

* Install packages in correct dir of release action too

* Remove submodules from ci checkout

* Remove submodules from release checkout

* Update selene with latest fix

* Fix whitespace

Co-authored-by: Lucien Greathouse <me@lpghatguy.com>
2022-08-03 18:36:58 -04:00
Lucien Greathouse
565c12405e Skip empty AppliedPatchSets for sending changes. 2022-08-03 17:19:23 -04:00
JohnnyMorganz
2a6a8b42a6 Add --watch to sourcemap generation (#602)
* Implement watch argument

* Add forget call

* Clippy fixes

* Update changelog
2022-08-01 04:07:07 -04:00
Boegie19
5cb4cc0d1d feature init csv (#594)
* init csv feature + test

* fmt fixes
2022-07-29 21:45:19 -04:00
boatbomber
62eb4f026f Fix errors after session already ended (#587) 2022-07-23 12:24:16 -04:00
wackbyte
411d1a89c1 Really default to the current directory in 'rojo fmt-project' (#581)
Co-authored-by: Lucien Greathouse <me@lpghatguy.com>
2022-07-18 19:47:30 -04:00
boatbomber
6ae0bf366a Use singleton settings outside the Roact tree (#576)
* Use singleton settings outside the Roact tree

* Cleanup listener on unmount

* Refactor setting page components

* Fix willUnmount being added to the wrong table

* Remove bindings in favor of state
2022-07-18 19:36:38 -04:00
wackbyte
178cdc9dfa Update benches so they compile (#582) 2022-07-17 18:50:12 -04:00
wackbyte
5bf1f86886 Fix link to v7.2.1 in the changelog (#578) 2022-07-11 00:44:47 -04:00
Lucien Greathouse
e482aba030 Release v7.2.1 2022-07-08 20:22:16 -04:00
Samuel P
535e4d42bb Change Notification sound to generic sound (#566)
* Change Notification sound to generic sound

The notification sound causes the game to summon an error due to no experience permissions with no way to grant permission. This is due to the new audio policy update.

* Update Notification sound
2022-07-02 19:33:24 -04:00
boatbomber
54398d4c4b Add setting to toggle sound effects (#568)
* Use soundPlayer object with setting

* Style changes
2022-07-02 05:12:58 -04:00
Lucien Greathouse
0987b44e23 Release v7.2.0 2022-06-29 20:34:06 -04:00
Lucien Greathouse
58098e96d4 Update Changelog 2022-06-29 20:15:24 -04:00
Max
f649c180cf Disambiguate camelCase and PascalCase in *.meta.json and *.model.json (#563)
* Disambiguate camelCase and PascalCase.

*.meta.json forces camelCase while *.model.json forces PascalCase. This commit reinforces camelCase as the preference for both, but allows for PascalCase in both as well.

* Made requested changes, breaking due to serde bug.

* Make work with existing Serde stuff

* Work around MSRV

Co-authored-by: Lucien Greathouse <me@lpghatguy.com>
2022-06-29 20:14:35 -04:00
Lucien Greathouse
966478b131 Update Changelog 2022-06-29 19:07:19 -04:00
boatbomber
ca0759a011 Add notification popups (#540)
* Add notifications prototype

* Add timeout

* Improve function name

* Faster timeouts and fully clickable

* Update remove padding from old X button

* Only auto-dismiss when viewport is open

* Start auto dismiss once viewed

* Avoid redundantly displaying widget text as notifs

* Add sound effect

* Add setting for notifications

* Remove duplicate PluginSettings.StudioProvider

* Use short pop sound effect

* Fix broken audio, thanks Roblox

* Use e instead of createElement
2022-06-29 19:06:13 -04:00
Lucien Greathouse
f1cdf2fe79 Update CHANGELOG 2022-06-29 19:05:04 -04:00
Watermelon
04fa5e2719 Added address reference to CLI output (#556)
* Added address reference to CLI output

* Stored loopback check address as a variable

* Changed other loopback references to the new variable

* Fixed mistake on address_string variable

* Merge write calls

Co-authored-by: Lucien Greathouse <me@lpghatguy.com>
2022-06-29 19:04:28 -04:00
Lucien Greathouse
eccb95690c Live sync Attributes (#553)
* Add test project for tags

* Update rbx_dom_lua and add attributes project

* Add Attributes shorthand; not working

* Update dependencies

* Update rbx_reflection_database

* Update rbx_types and commit attributes snapshot
2022-06-29 18:53:34 -04: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
8ea41480b7 Bump MSRV (#564)
* Bump MSRV

* Fix updated snapshot
2022-06-29 18:41:37 -04:00
Lucien Greathouse
0d1bc0d7fe Update dependencies 2022-06-29 18:00:50 -04:00
JohnnyMorganz
f9b7774286 Change linux release runner to use ubuntu-18.04 (#561)
ubuntu-latest uses Ubuntu 20.04, this causes issues with glibc as older versions of ubuntu/other distros use an older version.

This is fixed by building the release binary on `ubuntu-18.04`, which uses a version of glibc more widely available.

Ref: https://github.com/JohnnyMorganz/StyLua/pull/444
https://github.com/JohnnyMorganz/StyLua/pull/445
2022-06-26 15:22:16 -04:00
Michael Schmatz
2e672badf2 Update rbx_binary to 0.6.5 (#558) 2022-06-22 04:46:34 -04:00
Lucien Greathouse
cd5d6fd15c Add test project for tags 2022-06-12 05:05:17 -04:00
Micah
cf76982cfa Update selene (#550)
* Update selene

* Update foreman.toml

Co-authored-by: Sasial <44125644+sasial-dev@users.noreply.github.com>

Co-authored-by: Sasial <44125644+sasial-dev@users.noreply.github.com>
Co-authored-by: Lucien Greathouse <me@lpghatguy.com>
2022-06-12 03:41:49 -04:00
Micah
2624ea7d2a Remove .luacheckrc (#551) 2022-06-12 02:57:40 -04:00
Lucien Greathouse
2e7c4b6dff Update Changelog 2022-06-10 02:15:07 -04:00
Lucien Greathouse
e5dbee1073 Defer application of init.meta.json until after init Lua files. (#549)
Fixes #546.
2022-06-09 21:42:37 -04:00
Lucien Greathouse
c06463b61d Update CHANGELOG 2022-06-05 17:48:17 -04:00
Lucien Greathouse
10341e3776 Major Performance Improvements (#548)
* Use WeakDom::into_raw for faster snapshot generation from models

* Make compute_patch_set take snapshots by value

* Stop deferring property application in apply_patch_set

* Use InstanceBuilder::empty to avoid extra name allocations

* Git dependencies, skip dropping ServeSession

* Use std::mem::forget instead of ManuallyDrop

* Switch to latest rbx-dom crates.io dependencies

* Update other dependencies
2022-06-05 17:47:31 -04:00
Lucien Greathouse
824cdc5dcd Annotate snapshot_rbxm for profiling 2022-05-27 18:13:07 -04:00
Lucien Greathouse
7aa7a35aa5 Add profiling info and optional profiling with Tracy 2022-05-27 03:08:54 -04:00
Lucien Greathouse
79b57b3359 Move memofs and rojo-insta-ext into crates folder 2022-05-26 04:23:44 -04:00
Lucien Greathouse
c7aeffe586 Switch from structopt to clap 2022-05-26 04:19:51 -04:00
Lucien Greathouse
79c02f2457 Delete old bin folder and update foreman.toml 2022-05-26 04:13:50 -04:00
Lucien Greathouse
b9ed68fa9e Release v7.1.1 2022-05-26 02:53:20 -04:00
Lucien Greathouse
6c6d6c9c8d Add .github/FUNDING.yml 2022-05-26 02:28:57 -04:00
Lucien Greathouse
e169d7be68 New release workflow (#547)
* Port release workflow from Aftman to test

* Checkout submodules in plugin build step

* ...and build with submodules for other builds too

* Fix ci.yml; we use master branch still

* CI with submodules too
2022-05-25 22:26:22 -04:00
Lucien Greathouse
192fd7d4dd New and improved CI pipeline 2022-05-25 18:53:08 -04:00
Lucien Greathouse
1f1193e857 Remove unused lazy_static 2022-05-25 18:48:57 -04:00
boatbomber
0a412ade88 Remove duplicate PluginSettings.StudioProvider (#545) 2022-05-25 18:48:10 -04:00
Filip Tibell
3cef2fe9aa Fix sourcemap command not stripping paths correctly (#544)
* Fix sourcemap command not stripping paths correctly

* Use ServeSession to get the proper root dir to strip for sourcemap
2022-05-23 15:19:30 -04:00
Lucien Greathouse
18e53f06fe Remove unused dependencies and dead code warnings 2022-05-22 19:20:41 -04:00
Lucien Greathouse
eaac539087 Update to reqwest 0.11.10 2022-05-22 19:16:43 -04:00
Lucien Greathouse
57005c4fd5 Update uuid and winreg 2022-05-22 19:13:11 -04:00
Lucien Greathouse
ea58999a2a Update to pretty_assertions 1.2.1 2022-05-22 19:12:33 -04:00
Lucien Greathouse
a5a69fd9fc Release v7.1.0 2022-05-22 18:53:45 -04:00
boatbomber
f1d0f1c1c9 Bugfix: PluginAction spam causing errors (#541)
* Use session's state instead of existence to determine action

* Retain host/port text

* Use bindings instead of text/ref tunneling

Co-authored-by: Lucien Greathouse <me@lpghatguy.com>
2022-05-22 18:47:11 -04:00
boatbomber
83492d7495 PluginActions for connecting/disconnecting a session (#537)
* Create plugin action component

* Add plugin action for session start/end

* Add output for connection status change

* Move host & port refs to App level so keybind can access them

* Use passed function directly

* Improve the action text clarity

* Add actions for single action

* Add to changelog

* Explicitly return nil

Co-authored-by: Lucien Greathouse <me@lpghatguy.com>

* Change log level to info

* Refactor startSession to contain the logic

* Formatting

Co-authored-by: Lucien Greathouse <me@lpghatguy.com>
2022-05-02 17:49:31 -04:00
boatbomber
10abc2254a Add changing toolbar icon to indicate state (#538)
* Add changing toolbar icon

* Return to default icon after closing error

* Update changelog

* Add assets

* Improved link icon

* Upload new icons

Co-authored-by: Lucien Greathouse <me@lpghatguy.com>
2022-05-02 17:28:18 -04:00
Lucien Greathouse
5d5536a95e Update CHANGELOG 2022-04-19 18:45:09 -04:00
James Onnen
fe81e55925 Add support for optional paths (#472)
* Add PathNode with optional fields to project. This allows a path to be defined either as `"$path": "src"` or `"$path": { "optional": "src" }`

* Make $path truly optional

* Prevent rojo from erroring if no project node is resolved

* Use match instead of if-statement

* Add end-to-end tests (credit to MobiusCraftFlip for initial scenario)

* Pass option with ref inside instead of reference to option

* Empty commit to restart GitHub Actions

* Simplify build test

* Minimize serve test: it fails

* Simplify serve test even more

* Ignore failing serve test

Co-authored-by: Lucien Greathouse <me@lpghatguy.com>
2022-04-19 18:43:47 -04:00
Micah
654690d73e Add testez std (#535) 2022-04-19 17:45:55 -04:00
Filip Tibell
256aba4bc1 Implement sourcemap CLI command (#530)
* Initial implementation of sourcemap CLI command

* Update src/cli/sourcemap.rs

Co-authored-by: JohnnyMorganz <johnnymorganz@outlook.com>

* Update src/cli/sourcemap.rs

Co-authored-by: JohnnyMorganz <johnnymorganz@outlook.com>

* Tidy up sourcemap command

* Update CHANGELOG

Co-authored-by: JohnnyMorganz <johnnymorganz@outlook.com>
Co-authored-by: Lucien Greathouse <me@lpghatguy.com>
2022-04-19 17:45:29 -04:00
Ashton Miller
49f8845105 Add ability to specify address in default.project.json (#507)
* Allow for setting the default port in project json

set as
```json
"serveAddress": "0.0.0.0"
```

* Update CHANGELOG.md

* cargo fmt

Co-authored-by: Lucien Greathouse <me@lpghatguy.com>
2022-04-19 16:54:03 -04:00
Ashton Miller
12370846b4 Support the new Open Cloud API (#504)
* Add support for the new Open Cloud API

* Cleanup Open Cloud variables

* Avoid cloning buffer for do_upload_open_cloud

* Satisfy cargo fmt

* Actually correct cargo fmt

Apparently my earlier fix did not fix everything.

* Update CHANGELOG.md

* Update CHANGELOG.md

Forgot to add the link to issue #486 in the previous commit :/

* Cleanup & improve code for open cloud api

* Commit to force GH Actions to run (?)

Co-authored-by: Lucien Greathouse <me@lpghatguy.com>
2022-04-19 16:02:40 -04:00
Lucien Greathouse
07637dfe96 Release v7.0.0 2021-12-10 19:37:39 -05:00
Lucien Greathouse
f389a4a1db Update rbx_dom_lua 2021-11-26 17:31:12 -05:00
Lucien Greathouse
af077c796c Update dependencies 2021-11-26 17:28:13 -05:00
Lucien Greathouse
1c319f2fa8 Promote weldconstraint test project to a build test 2021-11-26 16:36:55 -05:00
Lucien Greathouse
e8afa03f7b Fix most test output (but not termcolor) 2021-11-22 13:59:12 -05:00
Lucien Greathouse
9b22545842 Add tests for current file naming with regards to project name field 2021-11-22 13:22:16 -05:00
Lucien Greathouse
adc733d25c Update changelog 2021-11-20 18:14:17 -05:00
Lucien Greathouse
6896257647 Bump MSRV to 1.55.0 2021-11-20 18:07:24 -05:00
Lucien Greathouse
1d9845a6cb Update dependencies 2021-11-20 18:06:41 -05:00
Blake Mealey
8461339e9a Add note for git submodules (#495) 2021-11-20 17:53:22 -05:00
Umbreon
9904d94e4c Remember sync connection settings. (#500) 2021-11-20 17:51:38 -05:00
Lucien Greathouse
da25c80d0b Add support for CFrame shorthand. Fixes #430. 2021-11-20 17:50:40 -05:00
Lucien Greathouse
5fa63733fd Factor out property filtering code to simplify web server 2021-11-20 17:38:36 -05:00
Lucien Greathouse
8b54bf0ba1 Improve error when file is not found 2021-11-20 17:15:58 -05:00
Lucien Greathouse
173dc12cb3 Improve warning and debug output in plugin 2021-11-20 17:05:45 -05:00
Umbreon
e136529ff0 Add a check to getProperty for unknown properties. (#493) 2021-10-28 01:09:20 -04:00
Lucien Greathouse
75542dacb3 Release Rojo 7.0.0-rc.3 2021-10-19 17:12:28 -04:00
Lucien Greathouse
07abfbde43 Release Rojo 7.0.0-rc.2 2021-10-19 17:07:14 -04:00
Kenneth Loeffler
96112fe118 Add ambiguous value resolution StringArray -> Tags (#484)
* Add ambiguous value resolution StringArray -> Tags

* Remove funny autocompleted reference
2021-10-19 16:46:31 -04:00
Kenneth Loeffler
9d0b313261 Add ChangeBatcher to plugin for two-way sync (#478)
* Implement ChangeBatcher

* Use ChangeBatcher for two-way sync

* Pause updates during patch application

* I can English good

* Break after encountering a nil Parent change

This prevents __flush from erroring out when an instance's Parent is
changed to nil and it has other property changes in the same batch.

* Update rbx_dom_lua

* Don't connect changed listeners in a running game

 #468 made me realize how bad of an idea this is in general...

* Update TestEZ and fix sibling Ref reification test

* Add ChangeBatcher tests

* Test instance unpausing by breaking functionality out to __cycle

* Break up the module a bit and improve tests

* Shuffle requires around and edit comment

* Break out more stuff, rename createChangePatch -> createPatchSet

* Make ChangeBatcher responsible for unpausing all paused instances

This somewhat improves the situation (of course, it would preferrable
to not have to hack around this problem with Source at all). It also
sets us up nicely if we come across any other properties that do
anything similar.

* Remove old reference to pausedBatchInstances

* Use RenderStepped instead of Heartbeat and trash multi-frame pauses

I probably should have done this in the first place...

ChangeBatcher still needs to unpause instances, but we don't need to
hold pauses for any longer than one cycle.

* Remove useless branch

* if not next(x) -> if next(x) == nil

* Add InstanceMap:unpauseAllInstances, use it in ChangeBatcher

* Move IsRunning check to InstanceMap:__maybeFireInstanceChanged
2021-10-18 18:18:51 -04:00
Wiktor Rudnicki
277ddfa9be Themes colors modification (#482)
* Modified colors of themes

Colors match Roblox Studio theme.

* Change cases of colors

Colors' hexes have correct cases now.
2021-10-15 13:27:47 -04:00
Lucien Greathouse
5d88bdb256 Upgrade dependencies in lockfile 2021-10-15 13:24:40 -04:00
Lucien Greathouse
8d29b43155 Upgrade dependencies 2021-10-11 17:40:14 -04:00
Lucien Greathouse
cc071a6415 Move entrypoint from src/bin.rs to src/main.rs 2021-09-14 20:42:38 -04:00
Lucien Greathouse
8954def25c Move responsibility for extracting names from paths lower 2021-08-24 17:59:53 -04:00
Lucien Greathouse
d484098781 Get rid of confusing 'SnapshotInstanceResult' type alias 2021-08-24 17:15:47 -04:00
Lucien Greathouse
9f06cbf3a0 Update contributing guide 2021-08-23 16:11:56 -04:00
Lucien Greathouse
af4a3ca0af Update memofs to 0.2.0 2021-08-23 16:00:51 -04:00
Lucien Greathouse
43715143e4 Release v7.0.0-rc.1 2021-08-23 15:50:28 -04:00
Lucien Greathouse
16aa354d36 Update dependencies and fix Lua ref tests 2021-08-23 15:48:17 -04:00
Lucien Greathouse
c739025453 Update changelog 2021-08-23 15:23:19 -04:00
James Onnen
f0526d17de Support long file paths on Windows (past 256 limit) (#464)
* Support long file paths on Windows (past 256 limit)

This issue can occur when using symlinks deep in rojo such that very long paths can occur, among other scenarios.

Note while the original fix comes from here:
	https://gal.hagever.com/posts/windows-long-paths-in-rust/

The manifest had to be modified from this source:
	https://stackoverflow.com/questions/59816045/windows-10-1903-longpathaware-not-working

* Move manifests, tidy code a little

Co-authored-by: Lucien Greathouse <me@lpghatguy.com>
2021-08-23 15:21:01 -04:00
Ayuka
6cc2e919c0 Update nil Ref check and property decode warning to new Rojo protocol (#466)
* Skip empty Refs in new Rojo protocol

* Update warning message for new Rojo protocol
2021-08-09 14:14:59 -04:00
Kenneth Loeffler
e1f9eaefa9 Fix Ref reification (#462)
* Update ApiValue type to use new value format

* Use new value format for Ref reification
2021-08-05 03:03:13 -04: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
4aa5814a0a Update dependencies 2021-07-27 14:06:23 -04:00
Lucien Greathouse
5bca244062 Add test project for #458 2021-07-27 12:42:47 -04:00
Lucien Greathouse
7cf57714a4 Use new Cargo config.toml convention 2021-07-12 13:19:36 -04:00
Lucien Greathouse
92e6f862ad Update plugin to use new property format 2021-07-02 16:12:12 -04:00
Lucien Greathouse
2377f41036 Update to latest rbx-dom 2.0 dependencies, including Lua 2021-07-02 16:04:43 -04:00
Lucien Greathouse
26a08f4d9f Update Changelog 2021-06-29 01:26:29 -04:00
Lucien Greathouse
672d207961 Update to stable rbx-dom libraries 2021-06-29 01:20:09 -04:00
Lucien Greathouse
a3d8e50f26 Fix changelog bullets being in the wrong section 2021-06-18 16:47:52 -04:00
Lucien Greathouse
d3abca46a8 Fix deprecation warning by writing better code 2021-06-14 12:50:54 -04:00
Lucien Greathouse
17fdd18c55 Code docs 2021-06-11 22:19:50 -04:00
Lucien Greathouse
e482d038c6 Tests for value resolution, better errors, no more Color3uint8 2021-06-11 22:04:04 -04:00
Lucien Greathouse
d0482a004e Modernize upload command 2021-06-08 21:53:56 -04:00
Lucien Greathouse
561a3e3256 Modernize serve subcommand 2021-06-08 17:05:55 -04:00
Lucien Greathouse
158dac5e1c Move subcommand branching into Options struct 2021-06-08 16:53:03 -04:00
Lucien Greathouse
1413f8c0b6 Tidy up build command further 2021-06-08 16:50:21 -04:00
Lucien Greathouse
ffb2aa332a Modernize build subcommand 2021-06-08 16:48:20 -04:00
Lucien Greathouse
45e8208e9c Improve CLI help text 2021-06-08 15:37:59 -04:00
Lucien Greathouse
7f230a8bf4 Modernize the plugin subcommand 2021-05-21 13:09:07 -04:00
Lucien Greathouse
afe26b8c16 Modernize the doc subcommand 2021-05-21 12:45:07 -04:00
Lucien Greathouse
d153f62b8a Modernize the init subcommand 2021-05-20 17:34:45 -04:00
Lucien Greathouse
5c80cd6e50 Skip serializing place_id and game_id if null 2021-05-20 15:46:40 -04:00
Lucien Greathouse
df1aced95d Add fmt-project subcommand 2021-05-20 15:41:08 -04:00
Lucien Greathouse
5a0a8f5077 Release v7.0.0-alpha.4 2021-05-14 16:37:49 -04:00
Lucien Greathouse
1c281539e0 Update rbx_dom_lua, using subfolder now 2021-05-14 16:36:32 -04:00
Lucien Greathouse
ef41d14f50 Update changelog 2021-05-14 16:29:05 -04:00
Lucien Greathouse
aa29397732 Update changelog 2021-05-14 16:18:54 -04:00
Mixu78
ca8865a3ce Do not validate .model.json files with no content/whitespace only (#420)
* Ignore empty/whitespace-only model.json files

* Ignore no return value from model.json files during snapshot

* Use str::from_utf8 instead of String::from_utf8

* Revert "Ignore no return value from model.json files during snapshot"

This reverts commit 0aef16e30a.

* Add test for empty .model.json files

* Change empty .model.json check method

Co-authored-by: Lucien Greathouse <me@lpghatguy.com>

* Format code with cargo fmt

* Use raw string instead

Co-authored-by: Lucien Greathouse <me@lpghatguy.com>
2021-05-14 16:16:05 -04:00
Lucien Greathouse
7599ef6626 Improve error messages 2021-05-14 15:58:18 -04:00
Lucien Greathouse
43e71f9242 Upgrade Rojo to 6.1.0 (lol) 2021-05-14 15:09:19 -04:00
Lucien Greathouse
aac9b25efe Update dependencies 2021-05-14 15:08:48 -04:00
Lucien Greathouse
532d170585 Fix 'Open Scripts Externally' crashing studio.
Closes #369.
2021-04-23 16:59:59 -04:00
Lucien Greathouse
3dcb14013b Update changelog 2021-04-23 15:45:10 -04:00
Lucien Greathouse
a4c782cd35 Mark two-way sync as experimental in UI 2021-04-23 15:41:17 -04:00
Mixu78
0779baa0ac Block usage of "Name" or "Parent" in $properties (#413)
* Ignore usage of "Name" or "Parent" in $properties

* Use match instead of array

* Add changelog entry

Co-authored-by: Lucien Greathouse <me@lpghatguy.com>
2021-04-23 15:11:17 -04:00
Lucien Greathouse
0849fab644 Commit snapshots from project file change 2021-04-23 14:34:41 -04:00
Mixu78
d85bca2e7e Reword top level model error message (#412) 2021-04-16 12:39:30 -04:00
Lucien Greathouse
c7ab6c435c Add gameId and placeId project properties 2021-04-15 14:27:35 -04:00
Lucien Greathouse
98db3b4f08 Release 7.0.0-alpha.3 2021-04-09 18:06:54 -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
2c27691e57 Update dependencies 2021-03-08 22:01:38 -05:00
Lucien Greathouse
934506bdfd Update to latest rbx_binary 2021-03-04 15:11:44 -07:00
Lucien Greathouse
f313fa4ae1 Update dependencies 2021-03-04 12:55:49 -07:00
Lucien Greathouse
78755b6130 Release v7.0.0-alpha.2 2021-02-19 21:47:49 -05:00
Lucien Greathouse
8bf59e5cbb Release v7.0.0-alpha.1 2021-02-19 00:29:59 -05:00
Lucien Greathouse
8f71d13714 Remove unused CFrame constructor alias 2021-02-19 00:03:08 -05:00
Lucien Greathouse
f4a790eb50 Change rojo upload to upload binary files 2021-02-18 23:48:22 -05:00
Lucien Greathouse
0d951c8ad1 Update to latest rbx_dom_lua 2021-02-18 23:41:14 -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
b84aab0960 Release v6.0.2 2021-02-09 11:45:58 -05:00
Lucien Greathouse
0e89b91c38 Implement CSRF challenge support in upload 2021-02-09 11:36:59 -05:00
Lucien Greathouse
7888a704e1 Release 6.0.1 2021-01-22 13:47:39 -07:00
Lucien Greathouse
804fd3de8e Remove Requester header to handle API change 2021-01-22 13:41:55 -07:00
Lucien Greathouse
4992c36f08 Delete ErrorDisplay, use anyhow instead! 2021-01-18 14:54:12 -07:00
Lucien Greathouse
27af0c841b Release 6.0.0 2021-01-16 18:35:27 -07:00
Lucien Greathouse
cc4f4df4f9 Support changing ClassName in Reconciler.diff 2021-01-16 18:26:30 -07:00
Lucien Greathouse
5989ab3b85 Add project to test that plugin skips unwritable properties 2021-01-16 15:34:59 -07:00
Lucien Greathouse
040b9c1452 Delete accidentally committed test bash script 2021-01-14 11:55:24 -07:00
Lucien Greathouse
bb7bd2e27e plugin: Update reflection database 2021-01-13 23:31:57 -07:00
tacheometry
02dbd4ba75 fix hyphen (#378)
This uses an em dash instead of double lines (--)
2021-01-06 13:49:05 -07:00
Lucien Greathouse
3b149cc875 Drop SnapshotError in favor of anyhow::Error 2020-12-18 12:16:05 -08:00
Lucien Greathouse
f3745c68d2 Turn rbxm/rbxmx errors into error variants 2020-12-18 11:39:41 -08:00
Lucien Greathouse
eddbe7d0cf Release 6.0.0-rc.4 2020-12-14 14:15:09 -08:00
Lucien Greathouse
faf86d006a Remove outdated warning from Rojo 0.5.0 alpha 14 2020-12-14 13:16:34 -08:00
Lucien Greathouse
71e4dfeb14 Change logo to be brand color on dark theme 2020-12-14 12:59:53 -08:00
Lucien Greathouse
da8ed6ddf9 Update Changelog 2020-12-14 11:22:43 -08:00
Lucien Greathouse
503e687c55 Fix repository link 2020-12-14 11:20:28 -08:00
Lucien Greathouse
dd667cce0b Add images from plugin rewrite 2020-12-14 11:20:07 -08:00
Lucien Greathouse
f911009752 Remove clibrojo, as it's broken 2020-12-14 11:13:44 -08:00
Reselim
cae4c46669 New UI (#367)
* Add Flipper

* Remove old UI

* Add boilerplate UI

* Change plugin version

* Merge upstream

* Bunch of new UI changes

Too lazy to list them all in individual commits

* Touch ripple for buttons and a few other things

* Make the close button on the PluginGui work

* Set button state to guiEnabled

* Implement Connecting, NotConnected; add Header; don't update plugin button on render

* Replace mapLerpColor with mapLerp

* Update blendAlpha to be 0 without any values

* Add ActionFillTransparency to Theme.Button

* Suffix all Theme entries

* Update Flipper

* Add disconnect button

* Remove cancel button

* Add settings page

* Add scrollbar and dark theme support to settings

* Include settings in startSession

* Set context default value to nil

I always thought this was the name, lol...

* Add Error page

* Fix preloadAssets

* Fix preloadAssets import

* Update checkbox colors a little

* Add setting descriptions

* Fix scrolling frame in settings panel

* Remove .vscode

* Rename Throbber to Spinner

* Update merge

* Move Spinner images to assets

* Change casing of directories

* Remove old directories

* Add comments to getDerivedStateFromProps

* Account for offset in host TextBox size

* Turn width variables into constants

* Attempt to fix the comments

* Add a missing comma in Settings

* Remove a double space

* Remove Dummy object

* Move most of the Studio logic out of render

* Don't truncate port input

* Replace merge with Dictionary.merge

* Replace "Got it!" with "Okay"

* Add projectName to setStatus call

* Add Flipper to build.rs
2020-12-14 11:07:39 -08:00
Lucien Greathouse
a937fc38db Update Changelog 2020-12-14 10:22:45 -08:00
Lucien Greathouse
ff43ffce07 Update to insta 1.3.0 2020-12-14 10:22:40 -08:00
Lucien Greathouse
5bb3dc258a Add projectName to serve output 2020-12-14 10:17:52 -08:00
Lucien Greathouse
98238e4516 Fix longstanding message_queue warning 2020-12-14 10:12:51 -08:00
Lucien Greathouse
23b8308282 Fix lockfile not being updated for 6.0.0-rc.3 2020-11-19 11:50:06 -08:00
Lucien Greathouse
a1f7cdc2b6 Release 6.0.0-rc.3 2020-11-19 11:47:07 -08:00
Lucien Greathouse
dcb30351c5 Fix null referent handling 2020-11-19 11:44:53 -08:00
Lucien Greathouse
1c0dc60071 Update CHANGELOG 2020-11-19 11:31:46 -08:00
Lucien Greathouse
0401c3ac0e Mark HttpEnabled as not scriptable as well 2020-11-19 11:20:30 -08:00
Lucien Greathouse
3b800d1cd7 Patch ReflectionDatabase to turn off SourceAssetId 2020-11-19 11:06:03 -08:00
Lucien Greathouse
35efb464e5 Fix incorrect tag in CHANGELOG 2020-11-19 10:33:09 -08:00
Lucien Greathouse
19a955a327 Release memofs 0.1.3 2020-11-19 10:26:37 -08:00
Lucien Greathouse
836b18e68a Release 6.0.0-rc.2 2020-11-19 10:25:25 -08:00
Lucien Greathouse
046dc0d598 plugin: Fix grammar in comments a bit :) 2020-11-16 11:49:30 -08:00
Lucien Greathouse
039d92ce78 plugin: Support ClassName changes in applyPatch 2020-11-16 11:44:56 -08:00
Lucien Greathouse
2136da15d6 plugin: Ensure InstanceMap deletes existing entries before inserting 2020-11-16 11:44:39 -08:00
Lucien Greathouse
e5041d80ef plugin: Fix warning in applyPatch.lua 2020-11-11 17:11:34 -08:00
Lucien Greathouse
f66860bdfe Break apart plugin reconciler (#332)
* Start splitting apart reconciler, with tests

* Reify children in reify

* Baseline hydrate implementation

* Remove debug print

* Scaffold out diff implementation, just supporting name changes

* invariant -> error in decodeValue

* Flesh out diff and add getProperty

* Clear out top-level reconciler interface, start updating code that touches it

* Address review feedback

* Add (experimental) Selene configuration

* Add emptiness checks to PatchSet, remove unimplement invert method

* Improve descendant destruction behavior in InstanceMap

* Track instanceId on all reify errors

* Base implementation of applyPatch, returning partial patches on failure

* Change reify to accept InstanceMap and insert instances into it

* Start testing applyPatch for removals

* Add test for applyPatch adding instances successfully and not

* Add , which is just error with formatting

* Correctly use new diff and applyPatch APIs

* Improve applyPatch logging and fix field name typo

* Better debug output when reify fails

* Print out unapplied patch in debug mode

* Don't write properties if their values are not different.

This was exposed trying to sync the Rojo plugin, which
has a gigantic ModuleScript in it with the reflection
database. This workaround was present in some form in
many versions of Rojo, and I guess we still need it.

This time, I actually documented why it's here so that
I don't forget for the umpteenth time...

* Add placeholder test that needs to happen still

* Introduce easier plugin testing, write applyPatch properties test

* Delete legacy get/setCanonicalProperty files

* Fix trying to remove numbers instead of instances

* Change applyPatch to return partial patches instead of binary success

* Work towards being able to decode and apply refs

* Add helpers for PatchSet assertions

* Apply refs in reify, test all cases

* Improve diagnostics when patches fail to apply

* Stop logging when destroying untracked instances, it's ok

* Remove read before setting property in applyPatch

* Fix diff thinking all properties are changed
2020-11-11 16:30:23 -08:00
Lucien Greathouse
50f0a2bd2e Update CLI dependencies 2020-10-29 10:36:20 -07:00
Lucien Greathouse
7cd9bd383e Update to latest reflection database 2020-10-29 10:35:55 -07:00
Lucien Greathouse
45a20a1633 Remove outdated notices 2020-09-09 17:39:24 -07:00
Lucien Greathouse
ec5b3f80ef Fix theme component error regression 2020-07-03 12:21:49 -07:00
Lucien Greathouse
3b257ea87a Update repo references after Roblox move 2020-06-23 11:55:46 -07:00
Lucien Greathouse
6b82cead9c Move from rojo-rbx org to Roblox org 2020-06-22 14:14:42 -07:00
cliffchapmanrbx
79ae4c52cd Enable CLA bot (#333) 2020-06-22 14:11:53 -07:00
Lucien Greathouse
a4616cda7d Fix test place's CharacterAutoLoads value 2020-06-20 22:16:35 -07:00
Lucien Greathouse
95648361be Recreate test place, just running in Studio 2020-06-20 21:51:26 -07:00
Lucien Greathouse
0c41e9c10b Depend on latest Rojo release from Rojo 2020-06-20 21:50:25 -07:00
Lucien Greathouse
61c7ef3cb0 plugin: lazily access settings() to help with testing 2020-06-20 21:50:14 -07:00
Lucien Greathouse
65898125d0 Update changelog 2020-06-17 23:14:24 -07:00
Lucien Greathouse
da05078ff3 Load project file from VFS instead of through fs.
Fixes #320.

Previously, the root project file was loaded via methods on Project
(which do not know about the VFS) instead of through the VFS like
all other disk access.

This meant that Rojo was unable to build its own plugin because
there is no project file on the real disk, only in the VFS.
2020-06-17 23:13:29 -07:00
Lucien Greathouse
badb5c3636 Stop redundantly adding ignore paths when starting ServeSession 2020-06-17 22:54:35 -07:00
Lucien Greathouse
9453588ab1 Load built-in plugin from absolute path to make errors more apparent 2020-06-17 22:54:13 -07:00
Lucien Greathouse
4cbb3874a4 Use anyhow error reporting instead of custom 2020-06-17 14:56:09 -07:00
Lucien Greathouse
940aff7ef4 Enable globIgnorePaths by default 2020-06-17 14:42:46 -07:00
Lucien Greathouse
a3edb93273 Update Changelog 2020-06-17 14:38:39 -07:00
Lucien Greathouse
782b054b1a Pass build watch argument into Vfs 2020-06-17 14:11:48 -07:00
Lucien Greathouse
fc27b2911e Allow turning off file watching in memofs.
Also preemptively bumping version to 0.1.3 so I don't forget on next release
2020-06-17 14:06:44 -07:00
Lucien Greathouse
486b067567 Flatten snapshot middleware to be much simpler (#324)
* First take at flattening middleware for simpler code and better perf

* Undo debug prints

* Fix using wrong path in snapshot_from_vfs

* Disable some broken tests

* Re-enable (mistakenly?) disabled CSV test

* Fix some tests

* Update project file tests

* Fix benchmark
2020-06-17 13:47:09 -07:00
Lucien Greathouse
bdd1afea57 Run CI on master and PRs to master only 2020-05-20 15:30:44 -07:00
Lucien Greathouse
5ccd02939b Replace rojo-test with regular tests folder again (#323)
* Replace rojo-test with regular tests folder again

* Bump MSRV to 1.43.1
2020-05-20 15:30:05 -07:00
Lucien Greathouse
ca5b8ab309 Restore improperly tested dependency on rojo from rojo-test 2020-05-20 11:56:34 -07:00
Lucien Greathouse
9481fdd38d Add missing Cargo.lock change 2020-05-02 21:47:36 -07:00
Lucien Greathouse
56bf6d282b Stop building Rojo in rojo-test, since it doesn't work as intended 2020-05-02 21:39:13 -07:00
Lucien Greathouse
5364c9c1bc Fix Lua string escaping.
Closes #314.
2020-04-16 12:00:02 -07:00
Lucien Greathouse
a4d4beeb97 Update default place template 2020-03-30 11:34:41 -07:00
Lucien Greathouse
30a01381be Fix malformed CSV files causing crashes; fixes #310 2020-03-30 11:12:20 -07:00
Lucien Greathouse
def99a9e4d Update release job to fix 6.0.0 release 2020-03-29 17:09:52 -07:00
Lucien Greathouse
1214fc8b0d Release 6.0.0-rc.1
This change also includes some minor packaging changes in order to make Cargo happy.
2020-03-29 16:58:37 -07:00
Lucien Greathouse
5a5b1268d3 Update changelog 2020-03-29 16:03:58 -07:00
jeparlefrancais
6a1fffd1ce Infer class name (#210)
* infer service names

* Update project code and add support for StarterPlayer

* Store parent_class in InstigatingSource

* Update snapshots

Co-authored-by: Lucien Greathouse <me@lpghatguy.com>
2020-03-29 16:03:15 -07:00
Lucien Greathouse
571ef3060a Update Changelog 2020-03-29 13:46:27 -07:00
jeparlefrancais
3cf82e112f Install plugin from CLI (#304)
* add install command

* cargo fmt

* filter spec files

* Update src/cli/plugin.rs

Co-Authored-By: Lucien Greathouse <me@lpghatguy.com>

* Update src/cli/plugin.rs

Co-Authored-By: Lucien Greathouse <me@lpghatguy.com>

* fix comments

* encode plugin with rbx_binary

* update build script

* refactor pathbuf error into io error

* fix rojo typo

* remove snafu

* Update `snapshot_from_fs_path`

* Print `rerun-if-changed` even for directories, in order to run the
  build.rs script when files are added.

* Switch `filter_map` loop to a regular for loop. I like the FP-style
  iterator stuff in Rust, but I think Result handling is easier in a
  normal loop. Also, I don't believe the result of read_dir implements
  `ExactSizedIterator`, so some of the wins of map+collect aren't there.

* Replace Result::unwrap with ? in build.rs

* Simplify error handling code in runtime

* Checkout with submodules

Co-authored-by: Lucien Greathouse <me@lpghatguy.com>
2020-03-29 13:41:54 -07:00
Lucien Greathouse
9b459c20d6 Fix GHA only running on pushes to master 2020-03-29 13:17:06 -07:00
Lucien Greathouse
5c85cd27c3 Fix default place project.
Closes #311.
2020-03-29 12:21:55 -07:00
Lucien Greathouse
4bf73c7a8a Implement support for turning .json files into Lua modules (#308)
* Stub implementation

* Flesh out feature and add tests. Other snapshots currently failing.

* Blacklist .meta.json in JSON handler

* Write to correct property (Source) instead of Value

* Update changelog
2020-03-28 00:36:01 -07:00
Lucien Greathouse
62e51b7535 Upgrade to latest rbx-dom 2020-03-27 23:58:31 -07:00
Lucien Greathouse
729a7f0053 Turn panics into errors in ServeSession 2020-03-26 12:16:55 -07:00
Lucien Greathouse
03c297190d Make ServeSession::new fallible 2020-03-26 12:07:44 -07:00
Lucien Greathouse
9c790eddd7 Tidy up ServeSession now that trait bounds are gone 2020-03-26 12:06:16 -07:00
Lucien Greathouse
8ebe7e332b Update Changelog 2020-03-25 17:02:32 -07:00
Lucien Greathouse
f43777e37e Require a Rojo project again (#307) 2020-03-25 17:01:28 -07:00
Lucien Greathouse
691a8fcdeb Upgrade lockfile using latest rustc 2020-03-25 16:15:21 -07:00
Lucien Greathouse
69c0e8d70e Fix warnings 2020-03-21 17:49:56 -07:00
Lucien Greathouse
330c92c9a8 Refactor ChangeProcessor loop to get rid of panics 2020-03-21 17:47:25 -07:00
Lucien Greathouse
cf0ff60d31 plugin: Add simple signal implementation for future work 2020-03-18 23:31:22 -07:00
Lucien Greathouse
9e9cf5dd1f plugin: Add support for pausing updates tracked by InstanceMap 2020-03-18 23:27:30 -07:00
Lucien Greathouse
5768d8e4a4 plugin: Miscellaneous cleanup 2020-03-18 23:15:03 -07:00
Lucien Greathouse
3b433e53be Memofs v0.1.1 2020-03-18 18:35:44 -07:00
Lucien Greathouse
28ddf40344 memofs: Update fs-err and use it more 2020-03-18 18:06:58 -07:00
Lucien Greathouse
c1286db9c1 Update Changelog 2020-03-18 16:26:41 -07:00
Lucien Greathouse
f13940262e Update CHANGELOG 2020-03-18 12:03:50 -07:00
Lucien Greathouse
9f0a6101b8 Add configurable color options 2020-03-18 12:03:07 -07:00
Lucien Greathouse
0b0fe01a7c Tidy up root repository files 2020-03-18 11:40:12 -07:00
Lucien Greathouse
85e098d5c8 Update README 2020-03-18 11:36:50 -07:00
Lucien Greathouse
e8d1faf4e2 Update changelog 2020-03-18 10:43:42 -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
1601e6d26e Update changelog 2020-03-17 23:20:40 -07:00
Lucien Greathouse
0e4f6dea2b plugin: Add setting for opening scripts externally 2020-03-17 23:20:05 -07:00
Lucien Greathouse
a2356773dc Add checkbox and fill out settings panel 2020-03-17 23:14:32 -07:00
Lucien Greathouse
4a4da4737d Fix plugin settings persistent 2020-03-17 23:03:59 -07:00
Lucien Greathouse
2cefd1bf2e plugin: Add PluginSettings context item, render it in settings screen 2020-03-17 23:03:01 -07:00
Lucien Greathouse
c5ce15fe34 plugin: Add dummy settings panel 2020-03-17 22:38:53 -07:00
Lucien Greathouse
76dea568c9 Update changelog 2020-03-17 22:30:00 -07:00
Lucien Greathouse
8e81140eff Increase verbosity of logging 2020-03-17 22:29:23 -07:00
Lucien Greathouse
d58e1f0792 Add logging when running rojo build 2020-03-17 22:28:38 -07:00
Lucien Greathouse
830c242751 plugin: Stop using codename in dev mode 2020-03-17 22:25:04 -07:00
Lucien Greathouse
91d45afd0f Add plugin feature 'UnstableOpenScriptsExternally' 2020-03-17 18:13:52 -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
aa4039a2e7 bye snafu 2020-03-16 23:37:00 -07:00
Lucien Greathouse
c065ded440 Tidy up SnapshotError a lot 2020-03-16 21:35:46 -07:00
Lucien Greathouse
f69096dadb Use thiserror and anyhow for command-level error types 2020-03-16 21:13:38 -07:00
Lucien Greathouse
363f95ba14 memofs: Use fs_err instead of std::fs when possible 2020-03-16 20:35:58 -07:00
Lucien Greathouse
dcc15e8911 Refactor upload to use ServeSession and drop common_setup 2020-03-16 20:20:12 -07:00
Lucien Greathouse
bd13047b58 Release 0.6.0-alpha.3 2020-03-13 23:50:54 -07:00
Lucien Greathouse
1a83789c01 Update Changelog 2020-03-13 20:50:03 -07:00
Lucien Greathouse
1cbe272e19 Fix malformed meta files causing panics.
Fixes #280.
2020-03-13 20:38:06 -07:00
Lucien Greathouse
6de74b41b3 Update snapshot error type and handle serde_json errors in JSON models 2020-03-13 20:31:31 -07:00
Lucien Greathouse
b0fc9ee507 Rename 'src/common' in default place template to 'src/shared' 2020-03-13 20:25:50 -07:00
Lucien Greathouse
a95ffe1d31 Add snapshot error handling to ChangeProcessor 2020-03-13 20:24:14 -07:00
Lucien Greathouse
4119a510f5 Fix broken error source tracking 2020-03-13 20:12:42 -07:00
Lucien Greathouse
cfa7f03815 Add help link to default model project 2020-03-13 20:11:08 -07:00
Lucien Greathouse
9b4c89820d Fix extra Git output in rojo init and update place template 2020-03-13 20:10:31 -07:00
Lucien Greathouse
fe874720aa Upgrade rojo init to create README.md and create Git repo 2020-03-13 20:00:48 -07:00
Lucien Greathouse
f7c0f33eb5 Add brand new rojo init command 2020-03-13 19:33:43 -07:00
Lucien Greathouse
c1bf9d9dfc Update duplicate env_logger dep 2020-03-12 19:39:27 -07:00
Lucien Greathouse
255bf439d3 Add 'rojo doc' command 2020-03-12 16:02:19 -07:00
Lucien Greathouse
2a31937b81 Use CARGO_PKG_REPOSITORY instead of hard-coded URL 2020-03-12 15:48:30 -07:00
Lucien Greathouse
eb8964e1d1 Improve panic messaging and process behavior.
- Replaced main() to use custom panic hook
- Updated log formatting
- Switched to panic=abort, since we don't need to unwind now.
- Process will now abort if any thread panics.
2020-03-12 15:42:56 -07:00
Lucien Greathouse
fe0ca280a1 Update disabled CSV middleware test 2020-03-10 23:52:55 -07:00
Lucien Greathouse
e8e3b7b985 plugin: Fix dark theme when resized to be wide 2020-03-10 20:34:12 -07:00
Lucien Greathouse
c437507442 Update changelogs 2020-03-10 18:15:06 -07:00
Lucien Greathouse
ca151b434e Update memofs dependency 2020-03-10 18:13:34 -07:00
Lucien Greathouse
10ba74c21e memofs: Add description 2020-03-10 18:11:39 -07:00
Lucien Greathouse
6191b6371d Update using cargo-readme 2020-03-10 18:09:04 -07:00
Lucien Greathouse
5be4175ac3 Rename vfs -> memofs across the codebase 2020-03-10 18:05:31 -07:00
Lucien Greathouse
f61f3671a6 Choose 'memofs' as the vfs name 2020-03-10 17:57:57 -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
a884f693ae Update changelog 2020-03-08 18:34:11 -07:00
Lucien Greathouse
3107b1b21b Dynamic theming. Closes #241.
Upgrades to Roact master and introduces dynamic theme switching.

We branch on the theme name in order to try to use Rojo's brand
colors instead of Studio's. I kind of winged it with these colors
and we might want to choose slightly nicer dark theme colors
in the future.

I also took the opportunity to reorganize the color naming scheme
since it didn't really work for dark theme.
2020-03-08 18:32:42 -07:00
Lucien Greathouse
04529de7b3 Update Changelog 2020-03-08 17:48:50 -07:00
Lucien Greathouse
199a39208c Implement 'rojo build --watch' (#284)
* Refactor build command to reproduce model more easily

* Spawn ServeSession for building
2020-03-08 17:48:14 -07:00
Lucien Greathouse
0187da5f24 Release 0.6.0-alpha.2 2020-03-06 13:56:21 -08:00
Lucien Greathouse
2e1c37ffff Update dependencies 2020-03-06 13:54:04 -08:00
Lucien Greathouse
4b0189dd55 Upgrade to Insta 0.13.1 2020-03-06 13:52:23 -08:00
Lucien Greathouse
d4a39674de Fix 'rojo upload' behavior 2020-03-06 13:23:49 -08:00
Lucien Greathouse
07c6fd3711 Update docs repo link 2020-03-04 15:00:10 -08:00
Lucien Greathouse
cf5b72aa9a Docs have moved to https://github.com/rojo-rbx/rojo.space 2020-02-27 22:57:06 -08:00
Lucien Greathouse
cdfbebd637 Update changelog for 0.5.4 release 2020-02-27 10:29:41 -08:00
Lucien Greathouse
e86e3316a9 Update changelog to include 0.5.x versions 2020-02-26 17:56:33 -08:00
Lucien Greathouse
bb2dcbaea0 vfs: Flesh out MemoryBackend 2020-02-21 23:52:11 -08:00
Lucien Greathouse
fefc7a69cd vfs: Expand documentation 2020-02-21 23:34:56 -08:00
Lucien Greathouse
1b24cd36e0 vfs: Snapshots, roughly 2020-02-19 23:58:09 -08:00
Lucien Greathouse
6322c1f46d vfs: Add stub MemoryBackend 2020-02-19 23:35:45 -08:00
Lucien Greathouse
00a29bb6be Unwatch paths when they're reported as removed 2020-02-19 23:34:57 -08:00
Lucien Greathouse
3a029caf2b Bump MSRV to 1.40.0 2020-02-19 23:22:51 -08:00
Lucien Greathouse
57263905e7 Add IoResultExt, fix mutability and Send-ness 2020-02-19 10:11:43 -08:00
Lucien Greathouse
4f46012c11 Complete an unfinished 2020-02-19 09:49:18 -08:00
Lucien Greathouse
7ea9a1e3e8 Expose metadata, remove_file, and remove_dir_all 2020-02-19 09:43:39 -08:00
Lucien Greathouse
c7510e12c4 Removal API 2020-02-19 09:39:49 -08:00
Lucien Greathouse
89b5d9294c Event receiving/committing infrastructure 2020-02-19 09:36:38 -08:00
Lucien Greathouse
339e1060b7 Clean up Vfs methods that defer to VfsLock 2020-02-19 09:17:21 -08:00
Lucien Greathouse
52e1dbd846 Flesh out crate 2020-02-18 23:16:56 -08:00
Lucien Greathouse
b4963f4ff7 Watching 2020-02-18 22:42:31 -08:00
Lucien Greathouse
838e8f6bde VFS crate 2020-02-18 22:30:12 -08:00
Lucien Greathouse
8f21514855 two-way-sync: Add super special case script syncing 2020-02-18 18:19:08 -08:00
Lucien Greathouse
44041f33e3 Start trying to sync parenting-to-nil (deleting) 2020-02-14 18:29:43 -08:00
Lucien Greathouse
5d9bc4473c two-way-sync: Track Parent property for value objects 2020-02-14 18:25:54 -08:00
Lucien Greathouse
a3e0d42e86 two-way-sync: Handle deleting non-project node files.
This is the tiniest step towards this feature and not even
very useful, but an important proof of concept.
2020-02-14 18:24:03 -08: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
ff47f79c62 Fix serverVersion in snapshots failing tests 2020-02-14 17:57:01 -08:00
Lucien Greathouse
f46a391873 Build releases on tag push instead of release creation 2020-01-22 10:20:37 -08:00
Lucien Greathouse
99b8ada42b Release v0.6.0-alpha.1 2020-01-22 10:09:07 -08:00
Lucien Greathouse
f2227aa7cb Use static OpenSSL for macOS binaries, too 2020-01-22 09:58:30 -08:00
Lucien Greathouse
a9f6c20113 Support Linux release binaries 2020-01-22 09:55:21 -08:00
Lucien Greathouse
e261e7a2c7 Implement glob ignores (#272)
* Add Glob wrapper type with better serialization

* Introduce PathIgnoreRule struct

* Implement equality for Glob type

* Add PathIgnoreRule to InstanceContext

* Implement glob ignores in directory middleware

* Fix up filters

* Use Iterator::all instead of loop

* Add project-level configuration for glob ignores

* Add test project for glob ignores

* Wire up project file and snapshots to make glob ignores work

* Better codepaths for adding ignore rules with empty iterators

* Add test for globs inherited from parent projects

* Add test details, support glob ignores in nested projects

* Add feature flag for globs

* Switch to use ExactSizeIterator instead of size_hint

* Remove glob visitor
2020-01-08 17:58:37 -08:00
Lucien Greathouse
ae811aafd0 Make ChangeProcessor abort gracefully on RecvError 2020-01-05 23:46:12 -08:00
Lucien Greathouse
cc593b465d Delete unused plugin place project 2020-01-04 21:31:36 -08:00
Lucien Greathouse
f81e8339e3 Add 'homepage' and 'documentation' links to Cargo.toml 2019-12-20 16:52:56 -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
26e2e81188 Refactor ChangeProcessor to be easier to follow 2019-12-19 17:41:35 -08:00
Lucien Greathouse
46d7bba87d Add .rbxl.lock and .rbxlx.lock files to gitignore 2019-12-19 14:46:34 -08:00
Lucien Greathouse
57d5610a58 plugin: Improve HTTP error messages by using response body 2019-12-19 14:41:57 -08:00
Lucien Greathouse
1968e1fdb7 Fix bad formatting string in plugin HTTP module 2019-12-19 14:40:29 -08:00
Lucien Greathouse
f2584cf807 Fix live sync.
The refactor to use StructOpt instead of plain Clap had some absolute
vs relative path issues that slipped through. This commit adds getters
to each StructOpt struct that exposes an explicitly absolute version
of each path value.
2019-12-18 17:52:16 -08:00
Lucien Greathouse
dd592d1d6d Break pathing everywhere (fix coming soon), fix verbosity argument 2019-12-18 17:44:47 -08:00
Lucien Greathouse
cfff08cdfd Add plugin half of script-only, existing-instance-only, two way sync 2019-12-18 17:39:04 -08:00
Lucien Greathouse
e83437c193 Add debug formatter for instances 2019-12-18 17:38:31 -08:00
Lucien Greathouse
1d900a6a3c Update benchmarks to use new CLI API 2019-12-18 15:56:24 -08:00
Lucien Greathouse
859c7bea8a Update most dependencies 2019-12-18 15:52:47 -08:00
Lucien Greathouse
1b9e90e786 Port from Failure to Snafu (#281)
* Failure -> Snafu for build command

* Port skeletal remains of init to snafu

* failure -> snafu for serve

* failure -> snafu for upload, remove impl_from macro

* failure -> custom error in vfs

* Bye bye, failure

* Fix Rust 1.36 build regression
2019-12-18 15:44:46 -08:00
Lucien Greathouse
41396367ac Tell Cargo to use Rojo's README.md 2019-12-17 13:59:59 -08:00
Lucien Greathouse
16c9a23d55 Shuffle around Rojo's public API 2019-12-17 13:58:46 -08:00
Lucien Greathouse
ce338a2a72 Remove impl_from macro from public API 2019-12-17 13:40:52 -08:00
Lucien Greathouse
1f7f2b22e7 Rewrite Project, remove SourceProject (#274)
* Rewrite project file to have relative paths and drop SourceProject

* Redo project error types

* Tidy up and document Project type

* Strip out init command
2019-12-12 14:45:15 -08:00
Lucien Greathouse
47c7f63d75 Switch everything to StructOpt (#277)
* Add types for Rojo's subcommands

* Flesh out CLI types

* Port everything to structopt instead of clap
2019-12-12 14:30:47 -08:00
Lucien Greathouse
8b1e85fbb4 Upgrade dependencies 2019-12-11 18:05:44 -08:00
Lucien Greathouse
ff4e9fb027 Stop overriding default-members in CI 2019-12-10 17:13:37 -08:00
Lucien Greathouse
d15ef40988 Upgrade dependencies correctly this time 2019-12-10 17:02:08 -08:00
Lucien Greathouse
eadfb18f74 Update rbx_xml and rbx_reflection 2019-12-10 13:39:55 -08:00
Lucien Greathouse
4b89bb087a Attach context to instances produced by middleware (#273) 2019-12-04 11:38:28 -08:00
Lucien Greathouse
f0a602b48b Revert "Remove some PartialEq derives"
This reverts commit fe10da9a6c.
2019-12-03 16:47:19 -08:00
Lucien Greathouse
fe10da9a6c Remove some PartialEq derives 2019-12-03 16:34:46 -08:00
Lucien Greathouse
948303aac8 Remove InstanceSnapshotContext in favor of InstanceContext (#271)
* Drop plugin context on the floor

* Remove redirect from old context to new context

* Pass InstanceContext via & instead of &mut reference

* Re-use context value in ChangeProcessor from metadata
2019-12-03 16:11:51 -08:00
Lucien Greathouse
12df80da56 Introduce InstanceContext (#270)
* Add instance context with dummy field

* Remove stub field
2019-12-03 15:30:20 -08:00
Lucien Greathouse
a48c238ed7 Add InstanceMetadata builder (#269)
* Add InstanceMetadata builder, with context field for globbing

* Revert snapshot changes

* Port snapshot functions to InstanceMetadata builder-ish pattern

* Remove IgnoreGlob struct

* Elide lifetime
2019-12-03 14:49:40 -08:00
Lucien Greathouse
da6c7b4d7a Fix Insta snapshot files having their line endings truncated when edited 2019-11-25 18:10:39 -08:00
Lucien Greathouse
15cbbacc2f Refcount entries in snapshot context, moving towards sharing 2019-11-25 15:11:58 -08:00
Lucien Greathouse
c3f6a17bae Add builder-ish methods to InstanceSnapshot to make middleware code more readable 2019-11-19 14:02:57 -08:00
Lucien Greathouse
0fbeb70865 Remove erroneous comment in SnapshotJsonModel 2019-11-19 13:53:48 -08:00
Lucien Greathouse
02f98a4053 Remove lifetime from SnapshotInstanceResult 2019-11-19 13:06:31 -08:00
Lucien Greathouse
d2e2a13479 Start stripping out lifetimes in InstanceSnapshot 2019-11-19 13:05:18 -08:00
Lucien Greathouse
f32cb592e2 Remove ownership stuff from InstanceSnapshot 2019-11-19 13:02:35 -08:00
Lucien Greathouse
72342f3118 Trim vestigial middleware method 2019-11-19 12:55:55 -08:00
Lucien Greathouse
246fd5f6c4 Add init scripts as relevant paths to all directories.
This doesn't feel ideal. Though it's true that all directories are influenced by
any init scripts they have, the directory middleware shouldn't need to know
about Lua.

I don't really want to go back into working on the middleware chain since it
mostly feels like busywork when there are other things to build on in Rojo.

also all of this feels really complicated
2019-11-18 18:28:36 -08:00
Lucien Greathouse
715022def5 Make init files copy metadata from folder.
Fixes #267.
2019-11-18 18:16:37 -08:00
Lucien Greathouse
78b2bafde1 Add test for #267. 2019-11-18 18:11:33 -08:00
Lucien Greathouse
2d7ebac8e6 Enable test for removing files 2019-11-18 18:08:18 -08:00
Lucien Greathouse
bcffd2eb99 Add support for removing files, handled in ChangeProcessor 2019-11-18 18:08:12 -08:00
Lucien Greathouse
459bf62fab Add missing contents for disabled remove_file test 2019-11-18 16:52:19 -08:00
Lucien Greathouse
bdaa671823 Plugin: Pipe InstanceMap around, improve debug output, fix session ID bug 2019-11-18 16:30:57 -08:00
Lucien Greathouse
463bf9b116 Make errors scrollable when too long 2019-11-18 15:57:22 -08:00
Lucien Greathouse
0c7a94c062 Update more code to new formatting machinery 2019-11-18 15:18:06 -08:00
Lucien Greathouse
af866f0665 Fix request timeout in long polling causing error to bubble to console 2019-11-15 15:54:58 -08:00
Lucien Greathouse
2493c70241 Fix log special case for empty tables 2019-11-15 15:43:42 -08:00
Lucien Greathouse
3c3359999c Fix hydration patch incorrectly comparing properties 2019-11-15 15:42:11 -08:00
Lucien Greathouse
2467004dc2 Update HTTP logs 2019-11-15 15:40:03 -08:00
Lucien Greathouse
3a9f438390 Integrate fmt into log 2019-11-15 15:39:15 -08:00
Lucien Greathouse
3126de2c37 Build out real formatting machinery 2019-11-15 15:00:54 -08:00
Lucien Greathouse
b7d026b98e Partial implementation of better formatting machinery 2019-11-14 18:43:51 -08:00
Lucien Greathouse
3f8b178f88 Add support for computing property and name changes in hydration patch computation 2019-11-14 18:18:38 -08:00
Lucien Greathouse
6184f4ce4f Improve debug output for initialization of ServeSession 2019-11-14 18:18:24 -08:00
Lucien Greathouse
fa736697a9 Introduce early Lua formatting library inspired by Rust 2019-11-14 18:18:07 -08:00
Lucien Greathouse
2c88c700ca Work around plugins loading too early by searching for DevSettings via ChildAdded 2019-11-14 18:16:48 -08:00
Lucien Greathouse
0b2e9ce1ad Improve InstanceMap tracking of ValueBase instances 2019-11-14 18:16:17 -08:00
Lucien Greathouse
ccafdf250e Add counterpart to setCanonicalProperty for reading 2019-11-14 18:15:53 -08:00
Lucien Greathouse
57b28faa74 Update ApiSubcribeMessage signature 2019-11-14 18:15:33 -08:00
Lucien Greathouse
d0d7c58af1 Start tracking property changes in plugin 2019-11-13 18:34:48 -08:00
Lucien Greathouse
339fc979f5 Add disabled test for removing file that currently hangs 2019-11-11 18:03:31 -08:00
Lucien Greathouse
47614c3102 Update names in subscribe portion of sync protocol 2019-11-11 17:52:09 -08:00
Lucien Greathouse
94e1501329 Stop having clibrojo as a default project, update docs 2019-11-07 18:24:16 -08:00
Lucien Greathouse
dfb015acc2 Add Rojo C API experiment 2019-11-07 18:20:55 -08:00
Lucien Greathouse
f1daafbf9e Fix ordering not being preserved in Vfs 2019-11-03 00:00:50 -07:00
Lucien Greathouse
432e10c205 Scrap old project load tests 2019-11-02 23:47:03 -07:00
Lucien Greathouse
62b626a931 Remove Project::load_from_str in favor of from_slice 2019-11-02 23:43:24 -07:00
Lucien Greathouse
9a2893c6bc Remove warnings for upgrading from 0.4.x 2019-11-02 23:41:32 -07:00
Lucien Greathouse
3a538f98ed Tightened project discovery behavior 2019-11-02 23:36:28 -07:00
Lucien Greathouse
7c71708de7 Drop support for roblox-project.json 2019-11-02 23:16:01 -07:00
Lucien Greathouse
b64d97e808 Force PathMap to have deterministic ordering by using BTreeSet instead of HashSet 2019-10-21 16:25:34 -07:00
Lucien Greathouse
428a19789d Enable 'move folder of stuff' test 2019-10-21 16:00:43 -07:00
Lucien Greathouse
7cc4055d94 Upgrade to Insta master to get bugfix.
Map sorting in Insta was previously not recursive.
As of this PR, it is!
https://github.com/mitsuhiko/insta/pull/80

Since it hasn't made it into a release yet, but is
important for Rojo to have snapshot determinism,
we're moving temporarily to depend on Insta via Git.
2019-10-21 15:29:33 -07:00
Lucien Greathouse
114c93fa46 Fix non-portable path serialization in ProjectNode.
This was failing snapshot tests on the Linux CI machines,
since I committed snapshots with backslashes.

I think the old path serializer was still the wrong approach,
this one is sort of a middleground but I'm still not super
happy with it.
2019-10-18 19:40:47 -07:00
Lucien Greathouse
07801a0283 Add support for updating instances defined in project nodes 2019-10-18 18:06:40 -07:00
Lucien Greathouse
30c8ea583b Remove special path serialization for ProjectNode 2019-10-18 18:06:25 -07: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
Lucien Greathouse
44c94da2d8 Fix clippy warnings 2019-10-17 18:22:53 -07:00
Lucien Greathouse
ec614e1912 Remove last unused warning. Closes #245. 2019-10-17 17:48:30 -07:00
Lucien Greathouse
559b509a03 Upgrade to latest rbx-dom 2019-10-17 17:37:49 -07:00
Lucien Greathouse
e2e9209655 rojo-test: Add disabled test for moving big folder of stuff 2019-10-17 16:03:21 -07:00
Lucien Greathouse
e55b72f73f rojo-test: Move settings closer to where settings are applied 2019-10-17 16:01:03 -07:00
Lucien Greathouse
85e30cc968 Write tests and ensure adding instances works 2019-10-17 13:46:59 -07:00
Lucien Greathouse
51dcfbab75 Fix rustfmt on benches 2019-10-16 19:32:10 -07:00
Lucien Greathouse
7c0aa45057 Add support for adding new instances, very pedantically 2019-10-16 18:28:38 -07:00
Lucien Greathouse
a5fdc2a9cc Add logging, fix flipped condition on child add 2019-10-16 18:28:11 -07:00
Lucien Greathouse
64fd2f9cf8 Add disabled test for adding a folder, currently failing 2019-10-16 17:54:10 -07:00
Lucien Greathouse
a77495c562 Add names to serve test snapshots 2019-10-16 17:41:21 -07:00
Lucien Greathouse
3880708e1d Improve serve snapshot test ergonomics 2019-10-16 17:36:13 -07:00
Lucien Greathouse
cc68d57f11 Remove insta dependency for rojo-insta-ext 2019-10-16 17:03:21 -07:00
Lucien Greathouse
56f5a61362 Add test for folder of scripts being mutated 2019-10-16 16:55:55 -07:00
Lucien Greathouse
40540c3637 Improve serve test, add single txt file test 2019-10-16 16:21:33 -07:00
Lucien Greathouse
82678235ab VFS Improvements (#259)
This PR refactors all of the methods on `Vfs` from accepting `&mut self` to
accepting `&self` and keeping data wrapped in a mutex. This builds on previous
changes to make reference count file contents and cleans up the last places
where we're returning borrowed data out of the VFS interface.

Once this change lands, there are two possible directions we can go that I see:
* Conservative: Refactor all remaining `&mut Vfs` handles to `&Vfs`
* Interesting: Embrace ref counting by changing `Vfs` methods to accept `self:
  Arc<Self>`, which makes the `VfsEntry` API no longer need an explicit `Vfs`
  argument for its operations.

* Change VfsFetcher to be immutable with internal locking
* Refactor Vfs::would_be_resident
* Refactor Vfs::read_if_not_exists
* Refactor Vfs::raise_file_removed
* Refactor Vfs::raise_file_changed
* Add Vfs::get_internal as bits of Vfs::get
* Switch Vfs to use internal locking
* Migrate all Vfs methods from &mut self to &self
* Make VfsEntry access Vfs immutably
* Remove outer VFS locking (#260)
* Refactor all snapshot middleware to accept &Vfs instead of &mut Vfs
* Remove outer VFS Mutex across the board
2019-10-16 15:45:23 -07:00
Lucien Greathouse
5123d21290 Rename Vfs::inner to Vfs::data, use Self more 2019-10-14 16:46:15 -07:00
Lucien Greathouse
b0dcf515f0 Refactor plugins, port message dropping bugfix from 0.5.1 2019-10-14 14:05:25 -07:00
Lucien Greathouse
9aafccc946 Update CHANGELOG 2019-10-14 13:46:02 -07:00
Lucien Greathouse
ccf98d7283 Move and tidy up small place benchmark 2019-10-14 11:38:16 -07:00
Lucien Greathouse
1b35c98be5 Add build tests for init.meta.json 2019-10-12 23:54:39 -07:00
Lucien Greathouse
db23c3d35a Mark init.meta.json as relevant path for directories 2019-10-12 23:46:49 -07:00
Lucien Greathouse
1c6c1298d5 Add init.meta.json support, untested 2019-10-12 23:45:38 -07:00
Lucien Greathouse
b9ebed14a5 Add documentation for AdjacentMetadata 2019-10-12 23:31:33 -07:00
Lucien Greathouse
7077f0f1f3 Load user plugins on startup instead of lazily at snapshot time 2019-10-12 23:27:12 -07:00
Lucien Greathouse
d1887c6cd3 Merge branch 'vfs-arc' 2019-10-12 15:29:54 -07:00
Lucien Greathouse
9278c81611 Merge branch 'master' into vfs-arc 2019-10-12 15:28:33 -07:00
Lucien Greathouse
dec9ec32df Add small place benchmark 2019-10-12 15:24:57 -07:00
Lucien Greathouse
1967f738a8 Make all file contents be Arc<Vec<u8>> instead of &[u8] 2019-10-12 14:17:52 -07:00
Lucien Greathouse
1031600c63 Batch rename: imfs -> vfs 2019-10-12 13:58:00 -07:00
Lucien Greathouse
24c697bea7 Port commands to use common setup code
Initialization logic needed for serve, build, and upload is now
much more clear than it was when these functions were written.

This commit refactors all of them to use a new common_setup
module for all of their initialization that's the same.
2019-10-11 18:35:10 -07:00
Lucien Greathouse
83665018d4 Compute snapshot context from project in build 2019-10-11 18:25:12 -07:00
Lucien Greathouse
b093626a21 User plugin foundations for 0.6.0 (#257)
Starts work on #55.

This is similar to the previous work in #125. It's gated behind a new Cargo
feature, `user-plugins`. This time, the config gate is much smaller. The
`plugins` member of projects is still accessible when plugins aren't enabled,
but is always empty. Additionally, user plugins are only enabled if there's a
Lua state present in the snapshot context when the `SnapshotUserPlugins`
snapshot middleware runs. This not ever the case currently.

This code has very little possibility of rotting while we focus on other work,
since it'll be guaranteed to still compile and can be tested in isolation
without the feature being turned on.
2019-10-11 15:45:02 -07:00
Lucien Greathouse
f3dc78b7cd Make InstanceSnapshotContext mutable through whole middleware pipeline 2019-10-10 14:07:10 -07:00
Lucien Greathouse
f0cd4333c3 Thread InstanceSnapshotContext through all SnapshotMiddleware 2019-10-10 11:44:33 -07:00
Lucien Greathouse
6d38a785ed Make SnapshotMiddleware::from_instance have a default impl 2019-10-10 10:44:46 -07:00
Lucien Greathouse
e46f9fd94f Simplify snapshot code using match_file_name utility 2019-10-09 18:27:52 -07:00
Lucien Greathouse
6b620ddcef Add utility for working with file names, port JSON model to use it 2019-10-09 18:22:58 -07:00
Lucien Greathouse
e5684ad947 Add error for malformed project files 2019-10-09 18:15:07 -07:00
Lucien Greathouse
dfabc07044 More consistent handling of non-Unicode file names (should be rare) 2019-10-09 17:15:34 -07:00
Lucien Greathouse
dca88e8272 Port Project snapshot to use with_not_found 2019-10-09 15:30:03 -07:00
Lucien Greathouse
9f947ae2c5 Improve bad Unicode error handling in txt, CSV, and directory handling 2019-10-09 12:55:24 -07:00
Lucien Greathouse
28156bcaf2 Switch SnapshotMiddleware over to SnapshotError 2019-10-09 12:42:08 -07:00
Lucien Greathouse
a14aacbcf9 Improve SnapshotError in preparation for moving middleware to it 2019-10-09 12:39:36 -07:00
boyned//Kampfkarren
321e026e43 Fix failing snapshot (#256) 2019-10-09 12:29:33 -07:00
Lucien Greathouse
30351f7b9d Add support for .meta.json files associated with .txt files 2019-10-08 17:44:23 -07:00
Lucien Greathouse
2393a1a114 Add support for .meta.json files affecting .csv LocalizationTables 2019-10-08 16:48:49 -07:00
Lucien Greathouse
479476561e Fix errors in 'Sync Details' page 2019-10-08 16:16:06 -07:00
Lucien Greathouse
a02f485040 Add end-to-end build test for Script.Disabled via .meta.json 2019-10-08 16:05:15 -07:00
Lucien Greathouse
2957e8ad73 Make Lua snapshot middleware test sort maps 2019-10-08 16:03:15 -07:00
Lucien Greathouse
f83abe15cb Add test for ensuring that scripts can be disabled with .meta.json files 2019-10-08 15:46:51 -07:00
Lucien Greathouse
709cba45ce Remove className from adjacent meta files, which is not supported in 0.5.x 2019-10-08 15:44:47 -07:00
Lucien Greathouse
8a9a72fd50 Refactor .meta.json into AdjacentMetadata type more strongly 2019-10-08 15:42:44 -07:00
Lucien Greathouse
13cb0a27a0 Make .meta.json changes cause scripts to be updated 2019-10-08 15:30:16 -07:00
Lucien Greathouse
fa817e3cdd Add baseline support for adjacent meta files for scripts 2019-10-08 14:14:44 -07:00
Lucien Greathouse
3bd8549f41 Add ServeSession test for project with folder 2019-10-08 13:57:40 -07:00
Lucien Greathouse
4e47655b17 Refactor MessageQueue API to return a oneshot receiver 2019-10-08 13:49:41 -07:00
Lucien Greathouse
18533d5944 Improve ServeSession test using async and Tokio 2019-10-08 13:26:21 -07:00
Lucien Greathouse
c5839c94ca Add test-only MessageQueue::subscribe_any.
This makes writing tests that do async things easier.
2019-10-08 13:25:34 -07:00
Lucien Greathouse
ffc146ff9b Add ServeSession test for changing text file 2019-10-07 18:23:39 -07:00
Lucien Greathouse
7b82e3d641 Add TestFetcher for mocking more filesystem operations than NoopFetcher 2019-10-07 18:22:29 -07:00
Lucien Greathouse
ab6cedb659 Move some serve code into serve_session.rs, start writing serve session tests 2019-10-07 16:24:36 -07:00
Lucien Greathouse
e60be94be0 Move patch apply test utility into tree_view module 2019-10-07 16:21:25 -07:00
Lucien Greathouse
f830b024d5 Add ImfsSnapshot::empty_dir() for debugging the Imfs 2019-10-07 16:20:04 -07:00
Lucien Greathouse
98519da7d9 Reintroduce instigating paths for snapshot middleware 2019-10-04 18:36:04 -07:00
Lucien Greathouse
cb3211cf46 Mark project node as instigating source for instances from project 2019-10-04 18:10:45 -07:00
Lucien Greathouse
c051153a1f Mark project file as instigating source for top-level instances 2019-10-04 18:05:27 -07:00
Lucien Greathouse
956d7e0918 Fix warning in JSON model snapshot test 2019-10-04 17:52:05 -07:00
Lucien Greathouse
530a7aa834 Rename 'contributing paths' to 'relevant paths' 2019-10-04 17:36:26 -07:00
Lucien Greathouse
052ca52cc3 Move instigating source out of contributing paths (#253)
* Refactor contributing_paths into contributing_sources, deleting project node sources

* Instead of changing contributing_paths, add instigating_source

* Remove InstanceMetadata::project_node

* Stop pushing project path to front of contributing_paths since it doesn't matter now

* Remove accidental UI change for path display
2019-10-04 17:34:05 -07:00
Lucien Greathouse
2025b8a494 Fix patch I missed project_node change 2019-10-04 15:49:12 -07:00
Lucien Greathouse
238233ca81 Stop serializing project_node if it's None 2019-10-04 15:12:34 -07:00
Lucien Greathouse
938c8259c3 Include project node in debug UI 2019-10-04 14:29:02 -07:00
Lucien Greathouse
35df5f25c7 Show metadata in web interface, take one 2019-10-04 14:14:45 -07:00
Lucien Greathouse
cd84fb9fc1 Bring forward 0.5.1 release notes 2019-10-04 13:19:14 -07:00
Lucien Greathouse
8bcf12e317 Update dependencies 2019-10-04 13:18:42 -07:00
Lucien Greathouse
10ed353e0a Add TODO for JSON model metadata 2019-10-03 18:30:10 -07:00
Lucien Greathouse
72d88200e4 Snapshot tests for JSON models 2019-10-03 18:28:58 -07:00
Lucien Greathouse
6ef832b3a9 Improve documentation for SnapshotProject 2019-10-03 18:25:06 -07:00
Lucien Greathouse
17d91563d5 Port project file tests to use insta 2019-10-03 18:22:20 -07:00
Lucien Greathouse
fb65693627 Propagate metadata in project files correctly 2019-10-03 18:12:52 -07:00
Lucien Greathouse
079fc738ad plugin: Properly handle removals in patches 2019-10-03 18:12:36 -07:00
Lucien Greathouse
ae0f3b0b02 Assign contributing paths in simple cases for snapshots 2019-10-03 17:34:33 -07:00
Lucien Greathouse
b2c515f2e6 plugin: Prevent HTTP timeout cascading after session stop 2019-10-03 17:28:34 -07:00
Lucien Greathouse
6f1469a551 plugin: Implement patch application, which makes live sync work 2019-10-03 17:13:29 -07:00
Lucien Greathouse
1d441b86d2 plugin: Fix type bindings for instance Parent 2019-10-03 17:13:17 -07:00
Lucien Greathouse
b72e6e54e6 plugin: Add debugging function for InstanceMap state 2019-10-03 17:12:43 -07:00
Lucien Greathouse
1ee679395d Add 'invariant' function for debugging 2019-10-03 17:12:08 -07:00
Lucien Greathouse
cf62ee5ccb plugin: Add Id and ParentId to ApiInstance type definitions 2019-10-03 15:54:49 -07:00
Lucien Greathouse
995685adfe Expose instance ID and parent ID in web API 2019-10-03 15:54:11 -07:00
Lucien Greathouse
f0eb955628 Expose parent from RojoTree instances 2019-10-03 15:53:50 -07:00
Lucien Greathouse
923f661428 Start rewriting plugin on top of new sync protocol 2019-10-02 18:41:52 -07:00
Lucien Greathouse
b562d11994 plugin: Remove Logging alias and update imports 2019-10-02 11:10:34 -07:00
Lucien Greathouse
3554112f31 plugin: Add test that loads all modules 2019-10-02 11:07:22 -07:00
Lucien Greathouse
7cada2608f plugin: Refactor HTTP and ApiContext foundations 2019-10-02 11:04:40 -07:00
Lucien Greathouse
21d4acebc3 Move .luacheckrc for better editor detection 2019-10-02 10:42:10 -07:00
Lucien Greathouse
73bbaaf0af Add script for installing release plugin 2019-10-01 18:42:25 -07:00
Lucien Greathouse
40105515d2 plugin: Unify test running code 2019-10-01 18:41:33 -07:00
Lucien Greathouse
79f09deecb Add strong type checking to plugin API client 2019-10-01 18:37:35 -07:00
Lucien Greathouse
c4a7f8675f Fix log level in plugin dev mode 2019-10-01 18:37:25 -07:00
Lucien Greathouse
f9a5fee364 Reorganize and clean up plugin 2019-10-01 18:23:29 -07:00
Lucien Greathouse
bdd9c58cae Update all CI scripts and mark as executable 2019-10-01 18:07:32 -07:00
Lucien Greathouse
09368e87cf Further update contributing guide on tools 2019-10-01 17:54:53 -07:00
Lucien Greathouse
46858c45b8 Add note about tools for contributing 2019-10-01 17:52:36 -07:00
Lucien Greathouse
fe1a96f850 Improve plugin test running, reducing project duplication 2019-10-01 17:44:24 -07:00
Lucien Greathouse
581449d992 Port more code over to use strict 2019-10-01 17:13:43 -07:00
Lucien Greathouse
15e848d4bf Add new scripts and machinery to make working on plugin easier 2019-10-01 17:13:28 -07:00
Lucien Greathouse
0dbbf44ab2 plugin: Add API interface for strongly typing responses 2019-10-01 16:55:45 -07:00
Lucien Greathouse
c62a5d15ad Add script to build plugin as changes occur 2019-10-01 16:55:15 -07:00
Lucien Greathouse
53bd02a890 Add script to quickly install plugin into LocalAppData 2019-10-01 16:52:20 -07:00
Lucien Greathouse
099aa26ef8 Rough pass on transforming applied patches into API responses 2019-10-01 14:45:24 -07:00
Lucien Greathouse
2598ea3577 Add contributing paths to SnapshotLua, switch to Insta tests 2019-10-01 14:09:05 -07:00
Lucien Greathouse
7be5b36494 Fix unreachable pattern warning 2019-10-01 14:07:50 -07:00
Lucien Greathouse
3dff4d1061 Generate and apply patches, routing them through message queue 2019-10-01 13:59:10 -07:00
Lucien Greathouse
5b7037550d Start ChangeProcessor pumping work 2019-10-01 13:48:16 -07:00
Lucien Greathouse
b94f21402c Expose RojoTree::get_metadata publicly 2019-10-01 13:47:25 -07:00
Lucien Greathouse
9f5875d4bb imfs: move debugging messages outside of converter thread 2019-10-01 13:47:14 -07:00
Lucien Greathouse
694b6101ca New Imfs event type 2019-10-01 11:29:09 -07:00
Lucien Greathouse
1737da9c1f Move ImfsEvent into its own module 2019-10-01 10:44:35 -07:00
Lucien Greathouse
bcf4fea598 Add RojoTree::get_ids_at_path 2019-10-01 10:37:06 -07:00
Lucien Greathouse
90e41f3ce9 Fix bounds on MultiMap::get 2019-10-01 10:36:20 -07:00
Lucien Greathouse
5f5fb51eae Make up terminology for 'instigating path' in instance metadata 2019-10-01 10:32:05 -07:00
Lucien Greathouse
95f06d56d8 Port SnapshotDir tests to use insta snapshots 2019-09-30 18:33:46 -07:00
Lucien Greathouse
1c6788ea45 Migrate from source_path to contributing_paths 2019-09-30 18:12:19 -07:00
Lucien Greathouse
457a8a5cf8 Fix warning in serve_test 2019-09-30 17:37:16 -07:00
Lucien Greathouse
282caf10a5 Expand patch_apply tests 2019-09-30 17:36:37 -07:00
Lucien Greathouse
b2fc6c165b Improve patch application test 2019-09-30 17:22:54 -07:00
Lucien Greathouse
0a1fa9588f Test for AppliedPatchSet result 2019-09-30 17:13:56 -07:00
Lucien Greathouse
5f5bfadf2b Add compute_patch tests for adding/removing children 2019-09-30 17:04:45 -07:00
Lucien Greathouse
b512e707a5 First round of snapshot tests for patch_compute 2019-09-30 17:00:12 -07:00
Lucien Greathouse
3678ddfa36 Break redaction stuff out into separate crate 2019-09-30 16:27:31 -07:00
Lucien Greathouse
ab8aa89f2a Add real networked message type 2019-09-29 20:16:54 -07:00
Lucien Greathouse
fd22482f06 Goodbye Travis 2019-09-27 15:09:35 -07:00
Lucien Greathouse
e741f7b557 Actually generate AppliedPatchSet objects (#250)
* Start actually computing AppliedPatchSet values

* Improve patch_apply documentation and flesh out applied patch code

* Add file link notes

* Stub out where tests for snapshot subsystem will go

* Create baseline tests

* Fix build failure by silencing Clippy
2019-09-27 15:07:11 -07:00
Lucien Greathouse
a70b7ee150 Add GitHub Actions badge 2019-09-27 15:03:57 -07:00
Lucien Greathouse
87227c96ed Document snapshot pipeline 2019-09-26 14:28:04 -07:00
Lucien Greathouse
91d12aeb4f Break out expandable section into a component thing 2019-09-25 17:29:47 -07:00
Lucien Greathouse
b3f132201b Better expandables for the instance debugger 2019-09-25 14:47:07 -07:00
Lucien Greathouse
24b9f552eb Improve imfs debugging page 2019-09-25 11:05:56 -07:00
Lucien Greathouse
b4a8dec68c Track watched paths in ImfsFetcher, exposed via ImfsDebug interface 2019-09-25 10:45:14 -07:00
Lucien Greathouse
c140823bea Move Imfs snapshotting into ImfsDebug 2019-09-24 18:14:48 -07:00
Lucien Greathouse
f166cc93cd Remove unused MessageQueue method 2019-09-24 18:08:32 -07:00
Lucien Greathouse
125c9767f1 Fix warnings around ChangeProcessor 2019-09-24 18:07:33 -07:00
Lucien Greathouse
7b7c978db6 Fix warning and make 'rojo serve' output to stdout 2019-09-24 18:06:31 -07:00
Lucien Greathouse
26fc097672 Add visualizer for IMFS state 2019-09-24 18:04:25 -07:00
Lucien Greathouse
0f2e2406e8 imfs: Correctly mark children_enumerated when calling get_children 2019-09-24 17:58:46 -07:00
Lucien Greathouse
061a096600 Add PathMap::orphans for traversing the map's roots 2019-09-24 17:55:39 -07:00
Lucien Greathouse
07fe963bed Don't include CSS in live asset mode 2019-09-24 17:53:39 -07:00
Lucien Greathouse
7a1eda98ca Implement instance tree visualization 2019-09-24 16:46:19 -07:00
Lucien Greathouse
e8a5e44319 Add abstraction for files to make iteration on UI easier 2019-09-24 14:00:48 -07:00
Lucien Greathouse
486319407a Refactor web UI to be more readable 2019-09-24 11:29:13 -07:00
Lucien Greathouse
4f3d917c9b Add support for snapshotting rbxlx files 2019-09-23 18:13:38 -07:00
Lucien Greathouse
e2761965d5 Add support for serving non-project files directly 2019-09-23 18:00:54 -07:00
Lucien Greathouse
171ab196c8 Update changelog 2019-09-23 17:54:49 -07:00
Lucien Greathouse
5630cea9a0 Improve command line and web interface 2019-09-23 17:54:04 -07:00
Lucien Greathouse
5a4189a770 Move ChangeReceiver main block into its own function 2019-09-23 16:13:19 -07:00
Lucien Greathouse
2440d9fc48 Create ChangeProcessor for routing events from imfs to tree to message queue 2019-09-23 16:09:58 -07:00
Lucien Greathouse
bd33aebc3d Turn messages into stub SubscribeMessage struct 2019-09-23 10:53:11 -07:00
boyned//Kampfkarren
a46d467b75 Fix broken link to sync details (#248) 2019-09-22 17:37:00 -07:00
Lucien Greathouse
8c6981da0d Fix guide to point to release versions instead of alphas 2019-09-20 11:08:01 -07:00
Lucien Greathouse
500a9f647f Fix snapshot test with new version number 2019-09-19 15:26:31 -07:00
Lucien Greathouse
71968fca0d Fold imfs::new back into imfs 2019-09-19 15:25:07 -07:00
Lucien Greathouse
fc6f84897f Update docs link to rojo.space 2019-09-19 14:02:02 -07:00
Lucien Greathouse
b31ad4b1f8 Update version to 0.6.0-dev 2019-09-19 13:58:53 -07:00
Lucien Greathouse
aababf37a8 Catch more HTTP API errors 2019-09-19 13:50:42 -07:00
Lucien Greathouse
44a42a177a Change API errors to be JSON 2019-09-19 13:20:58 -07:00
Lucien Greathouse
e773a92e53 Connect message queue to frontend API 2019-09-19 13:12:21 -07:00
Lucien Greathouse
196d27b959 Allow IMFS testing features to be unused 2019-09-19 11:13:27 -07:00
Lucien Greathouse
ec8861e983 Apply patch sets by value in preparation for AppliedPatchSet 2019-09-19 11:10:25 -07:00
Lucien Greathouse
9b601eb9fe Tidy up patch structs, add AppliedPatchSet 2019-09-19 10:56:10 -07:00
Lucien Greathouse
c80d9cbf01 Add default-members to make 'cargo t' work better 2019-09-19 10:46:09 -07:00
Lucien Greathouse
717c15256f Update GH workflows, bump minimum Rust to 1.36.0 2019-09-17 18:31:02 -07:00
Lucien Greathouse
13dafc2091 Bump minimum Rust in GitHub actions to 1.36.0 2019-09-17 17:31:00 -07:00
Lucien Greathouse
cfc3bcfa41 Switch to single quotes for GitHub action workflow 2019-09-17 16:51:40 -07:00
Lucien Greathouse
2e052e97c5 Experimental GitHub Action 2019-09-17 16:48:51 -07:00
Lucien Greathouse
5d48d05287 Update Changelog 2019-09-13 17:31:53 -07:00
Lucien Greathouse
e34ba844c5 Improve diagnostics for failed instance creation 2019-09-13 17:16:16 -07:00
Lucien Greathouse
1d84d3e440 Wrap RojoTree in Mutex 2019-09-13 12:57:37 -07:00
Lucien Greathouse
7a7e9087e6 Expose imfs from ServeSession 2019-09-13 12:57:22 -07:00
Lucien Greathouse
8481caa67c Add Imfs to ServeSession, threading through generic ImfsFetcher 2019-09-13 12:52:15 -07:00
Lucien Greathouse
651e63a0fb Tidy up docs links in readme 2019-09-11 11:37:58 -07:00
Lucien Greathouse
88e462c4e5 Add help page to direct people to Discord, GitHub, and Twitter 2019-09-11 11:34:52 -07:00
Lucien Greathouse
8ef797d1a4 Start writing real serve tests 2019-09-10 18:04:05 -07:00
Lucien Greathouse
877fd1af35 Make /api/subscribe hang forever instead of returning no messages 2019-09-10 16:42:14 -07:00
Lucien Greathouse
fc01eecdcb Use real Rojo metadata for live sync 2019-09-10 15:59:36 -07:00
Lucien Greathouse
e6ba6203bb Expose tree in API, with hacks to make initial sync-in work sort of 2019-09-10 15:39:50 -07:00
Lucien Greathouse
6a786f18e6 Update plugin protocl version, fix error in error 2019-09-10 15:37:21 -07:00
Lucien Greathouse
57d46287d7 Glue message queue onto ServeSession, simplify some HTTP 2019-09-09 18:32:44 -07:00
Lucien Greathouse
bb6ab74c19 Clean up warnings, add RojoTree into ServeSession 2019-09-09 15:17:03 -07:00
Lucien Greathouse
3e759b3e8e Finish off bulk of metadata tracking in snapshot system 2019-09-09 15:04:57 -07:00
Lucien Greathouse
47ee8d54a8 Clean up some of the instance wrapper APIs 2019-09-09 13:59:36 -07:00
Lucien Greathouse
824b984a64 First pass converting snapshot code over to RojoTree from RbxTree 2019-09-09 13:50:39 -07:00
Lucien Greathouse
618185a52d Start using multimap correctly for path tracking in RojoTree 2019-09-09 11:50:58 -07:00
Lucien Greathouse
8dbc6ab7d3 Start MapSet work 2019-09-06 17:05:01 -07:00
Lucien Greathouse
5eb6754b7c Implement metadata, replacing source field and laying foundations 2019-09-06 14:21:47 -07:00
Lucien Greathouse
a914a92cea Add SnapshotSource property 2019-09-05 11:27:16 -07:00
Lucien Greathouse
439a1a758e Upgrade all snapshots to insta 0.11.0 format 2019-09-03 18:15:53 -07:00
Lucien Greathouse
9383240627 Move rojo-test snapshots into partitioned folders 2019-09-03 18:11:28 -07:00
Lucien Greathouse
ea765eb929 Add serve snapshot test for empty project 2019-09-03 17:56:23 -07:00
Lucien Greathouse
d5c816f24d Document and expose public members for Rojo API 2019-09-03 14:20:12 -07:00
Lucien Greathouse
cf5f20bbb5 Upgrade depdendencies, removing need for opt-level in debug 2019-09-03 14:09:35 -07:00
Lucien Greathouse
27839dfd21 Shuffle web_interface into web::interface 2019-09-03 14:00:31 -07:00
Lucien Greathouse
27517e1aee Rename web::interface to web::ui 2019-09-03 13:58:44 -07:00
Lucien Greathouse
a31bfbefa7 Start extracting web interface from implementation 2019-09-03 13:57:28 -07:00
Lucien Greathouse
f1729163cf Add foundations for 'rojo serve' tests 2019-09-03 13:48:27 -07:00
Lucien Greathouse
6747d97d60 Factor out test utilities in preparation for serve tests 2019-09-03 10:25:48 -07:00
Lucien Greathouse
2fb2342fd4 Fix Lua snapshot code to work with children.
It's also way easier to read now
2019-08-29 17:13:36 -07:00
Lucien Greathouse
0f530b7e80 Add deep-nesting test for folders in folders 2019-08-29 16:38:41 -07:00
Lucien Greathouse
78e3cf4ffb Fix rojo-test tests not running on CI 2019-08-29 16:38:04 -07:00
Lucien Greathouse
4e512b7023 Revert to using Reqwest, reimplement upload command 2019-08-29 16:31:42 -07:00
Lucien Greathouse
ee3fed97e0 Fix parsing of auth cookie data 2019-08-29 16:31:32 -07:00
Jaguar
b45d4f6401 Correct capitalization/typos (#240)
* Fix typo

* Correct capitalization

* Correct capitalization
2019-08-28 21:29:48 -07:00
Lucien Greathouse
d4c28de2c4 Update changelog 2019-08-28 14:34:14 -07:00
Lucien Greathouse
b7d613ace6 Correct bug report repository link 2019-08-28 13:55:12 -07:00
Lucien Greathouse
68dbb31272 Add verbosity level argument 2019-08-28 13:34:20 -07:00
Lucien Greathouse
8fe1fa48b8 Let Rojo pull auth cookie from registry on Windows 2019-08-28 13:21:30 -07:00
Lucien Greathouse
e5575b782c Hide project module, moving towards Rojo API 2019-08-28 12:20:20 -07:00
Lucien Greathouse
ea112dd93d Mark security cookie as optional 2019-08-28 12:09:12 -07:00
Lucien Greathouse
056fc5e087 Remove old 'scratch project' test script, clean up .gitignore 2019-08-27 18:23:05 -07:00
Lucien Greathouse
cacb02b7c8 Fix incorrect license in Cargo.toml 2019-08-27 18:12:15 -07:00
Lucien Greathouse
c0b6ec8ccb Clean up more old plugin gunk 2019-08-27 18:10:15 -07:00
Lucien Greathouse
f4c8f0a3d8 Mark bin/run-plugin-tests.sh as executable 2019-08-27 18:05:17 -07:00
Lucien Greathouse
81407ffe3c Goodbye Lemur and other cruft, hello run-in-roblox-based testing 2019-08-27 18:04:58 -07:00
Lucien Greathouse
6f7dbe99fe Move Rojo server into root of the repository 2019-08-27 16:56:52 -07:00
Lucien Greathouse
ec9afba029 Remove unfinished plugin scaffolding 2019-08-27 16:44:40 -07:00
Lucien Greathouse
6164c5d78d Update dependencies 2019-08-27 16:30:35 -07:00
Lucien Greathouse
94dbcd5c06 Remove unused dependencies, reqwest and rlua (for now) 2019-08-27 16:30:10 -07:00
Lucien Greathouse
4d0dee7ee8 Fix or_fun clippy lint 2019-08-27 16:23:58 -07:00
Lucien Greathouse
49e10698b1 Mark bin/run-tests.sh as executable 2019-08-27 16:06:30 -07:00
Lucien Greathouse
8e1536b59b Restructure Travis config to fail fast 2019-08-27 15:42:55 -07:00
Lucien Greathouse
aed160994a Fix rustfmt error 2019-08-27 15:42:20 -07:00
Lucien Greathouse
b2b3173420 Fix editorconfig to stop fighting rustfmt 2019-08-27 15:42:07 -07:00
Lucien Greathouse
f465af964a Make Travis test rustfmt and clippy 2019-08-27 15:27:25 -07:00
Lucien Greathouse
5a7d6a673a Fix bug caught by clippy 2019-08-27 15:26:51 -07:00
Lucien Greathouse
7fb9aa2115 rustfmt the codebase 2019-08-27 15:10:34 -07:00
Lucien Greathouse
fea303ac8b Major Subsystem Rewrite (Reconciler Mk5) (#217) 2019-08-27 15:00:37 -07:00
Lucien Greathouse
8e8291a0bd Add more stern warning about docs from master branch 2019-08-27 14:52:40 -07:00
Lucien Greathouse
4dc175fcd2 Update docs home for 0.5.x 2019-08-27 14:38:51 -07:00
889 changed files with 180772 additions and 12235 deletions

2
.dir-locals.el Normal file
View File

@@ -0,0 +1,2 @@
((nil . ((eglot-luau-rojo-project-path . "plugin.project.json")
(eglot-luau-rojo-sourcemap-enabled . 't))))

View File

@@ -3,16 +3,27 @@ root = true
[*]
end_of_line = lf
charset = utf-8
insert_final_newline = false
trim_trailing_whitespace = true
insert_final_newline = false
[*.{json,js,css}]
indent_style = space
indent_size = 2
[*.{md,rs}]
[*.md]
indent_style = space
indent_size = 4
[*.{rs,toml}]
indent_style = space
indent_size = 4
insert_final_newline = true
[*.snap]
insert_final_newline = true
[*.lua]
indent_style = tab
[*.luau]
indent_style = tab

2
.git-blame-ignore-revs Normal file
View File

@@ -0,0 +1,2 @@
# stylua formatting
0f8e1625d572a5fe0f7b5c08653ff92cc837d346

1
.gitattributes vendored Normal file
View File

@@ -0,0 +1 @@
*.lua linguist-language=Luau

23
.github/workflows/changelog.yml vendored Normal file
View File

@@ -0,0 +1,23 @@
name: Changelog Check
on:
pull_request:
types: [assigned, opened, synchronize, reopened, labeled, unlabeled]
branches:
- master
jobs:
build:
name: Check Actions
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Changelog check
uses: Zomzog/changelog-checker@v1.3.0
with:
fileName: CHANGELOG.md
noChangelogLabel: skip changelog
checkNotification: Simple
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

133
.github/workflows/ci.yml vendored Normal file
View File

@@ -0,0 +1,133 @@
name: CI
on:
push:
branches:
- master
pull_request:
branches:
- master
jobs:
build:
name: Build and Test
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-22.04, windows-latest, macos-latest, windows-11-arm, ubuntu-22.04-arm]
steps:
- uses: actions/checkout@v4
with:
submodules: true
- name: Install Rust
uses: dtolnay/rust-toolchain@stable
- name: Restore Rust Cache
uses: actions/cache/restore@v4
with:
path: |
~/.cargo/registry
~/.cargo/git
target
key: ${{ matrix.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
- name: Build
run: cargo build --locked --verbose
- name: Test
run: cargo test --locked --verbose
- name: Save Rust Cache
uses: actions/cache/save@v4
with:
path: |
~/.cargo/registry
~/.cargo/git
target
key: ${{ matrix.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
msrv:
name: Check MSRV
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
submodules: true
- name: Install Rust
uses: dtolnay/rust-toolchain@1.88.0
- name: Restore Rust Cache
uses: actions/cache/restore@v4
with:
path: |
~/.cargo/registry
~/.cargo/git
target
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
- name: Build
run: cargo build --locked --verbose
- name: Save Rust Cache
uses: actions/cache/save@v4
with:
path: |
~/.cargo/registry
~/.cargo/git
target
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
lint:
name: Rustfmt, Clippy, Stylua, & Selene
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
submodules: true
- name: Install Rust
uses: dtolnay/rust-toolchain@stable
with:
components: rustfmt, clippy
- name: Restore Rust Cache
uses: actions/cache/restore@v4
with:
path: |
~/.cargo/registry
~/.cargo/git
target
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
- name: Setup Rokit
uses: CompeyDev/setup-rokit@v0.1.2
with:
version: 'v1.1.0'
- name: Stylua
run: stylua --check plugin/src
- name: Selene
run: selene plugin/src
- name: Rustfmt
run: cargo fmt -- --check
- name: Clippy
run: cargo clippy
- name: Save Rust Cache
uses: actions/cache/save@v4
with:
path: |
~/.cargo/registry
~/.cargo/git
target
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}

150
.github/workflows/release.yml vendored Normal file
View File

@@ -0,0 +1,150 @@
name: Release
on:
push:
tags: ["v*"]
jobs:
create-release:
name: Create Release
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Create Release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
gh release create ${{ github.ref_name }} --draft --verify-tag --title ${{ github.ref_name }}
build-plugin:
needs: ["create-release"]
name: Build Roblox Studio Plugin
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
submodules: true
- name: Setup Rokit
uses: CompeyDev/setup-rokit@v0.1.2
with:
version: 'v1.1.0'
- name: Build Plugin
run: rojo build plugin.project.json --output Rojo.rbxm
- name: Upload Plugin to Release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
gh release upload ${{ github.ref_name }} Rojo.rbxm
- name: Upload Plugin to Artifacts
uses: actions/upload-artifact@v4
with:
name: Rojo.rbxm
path: Rojo.rbxm
build:
needs: ["create-release"]
strategy:
fail-fast: false
matrix:
# https://doc.rust-lang.org/rustc/platform-support.html
include:
- host: linux
os: ubuntu-22.04
target: x86_64-unknown-linux-gnu
label: linux-x86_64
- host: linux
os: ubuntu-22.04-arm
target: aarch64-unknown-linux-gnu
label: linux-aarch64
- host: windows
os: windows-latest
target: x86_64-pc-windows-msvc
label: windows-x86_64
- host: windows
os: windows-11-arm
target: aarch64-pc-windows-msvc
label: windows-aarch64
- host: macos
os: macos-latest
target: x86_64-apple-darwin
label: macos-x86_64
- host: macos
os: macos-latest
target: aarch64-apple-darwin
label: macos-aarch64
name: Build (${{ matrix.target }})
runs-on: ${{ matrix.os }}
env:
BIN: rojo
steps:
- uses: actions/checkout@v4
with:
submodules: true
- name: Install Rust
uses: dtolnay/rust-toolchain@stable
with:
targets: ${{ matrix.target }}
- name: Restore Rust Cache
uses: actions/cache/restore@v4
with:
path: |
~/.cargo/registry
~/.cargo/git
target
key: ${{ matrix.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
- name: Build Release
run: cargo build --release --locked --verbose --target ${{ matrix.target }}
- name: Save Rust Cache
uses: actions/cache/save@v4
with:
path: |
~/.cargo/registry
~/.cargo/git
target
key: ${{ matrix.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
- name: Generate Artifact Name
shell: bash
env:
TAG_NAME: ${{ github.ref_name }}
run: |
echo "ARTIFACT_NAME=$BIN-${TAG_NAME#v}-${{ matrix.label }}.zip" >> "$GITHUB_ENV"
- name: Create Archive and Upload to Release
shell: bash
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
mkdir staging
if [ "${{ matrix.host }}" = "windows" ]; then
cp "target/${{ matrix.target }}/release/$BIN.exe" staging/
cd staging
7z a ../$ARTIFACT_NAME *
else
cp "target/${{ matrix.target }}/release/$BIN" staging/
cd staging
zip ../$ARTIFACT_NAME *
fi
gh release upload ${{ github.ref_name }} ../$ARTIFACT_NAME
- name: Upload Archive to Artifacts
uses: actions/upload-artifact@v4
with:
path: ${{ env.ARTIFACT_NAME }}
name: ${{ env.ARTIFACT_NAME }}

24
.gitignore vendored
View File

@@ -1,9 +1,25 @@
# Rust output directory
/target
/scratch-project
/server/failed-snapshots/
**/*.rs.bk
# Headers for clibrojo
/include
# Roblox model and place files in the root, used for debugging
/*.rbxm
/*.rbxmx
/*.rbxl
/*.rbxlx
**/*.snap.new
# Sourcemap for the Rojo plugin (for better intellisense)
/sourcemap.json
# Roblox Studio holds 'lock' files on places
*.rbxl.lock
*.rbxlx.lock
# Snapshot files from the 'insta' Rust crate
**/*.snap.new
# Macos file system junk
._*
.DS_STORE

34
.gitmodules vendored
View File

@@ -1,18 +1,18 @@
[submodule "plugin/modules/roact"]
path = plugin/modules/roact
url = https://github.com/Roblox/roact.git
[submodule "plugin/modules/testez"]
path = plugin/modules/testez
url = https://github.com/Roblox/testez.git
[submodule "plugin/modules/lemur"]
path = plugin/modules/lemur
url = https://github.com/LPGhatguy/lemur.git
[submodule "plugin/modules/promise"]
path = plugin/modules/promise
url = https://github.com/LPGhatguy/roblox-lua-promise.git
[submodule "plugin/modules/t"]
path = plugin/modules/t
[submodule "plugin/Packages/Roact"]
path = plugin/Packages/Roact
url = https://github.com/roblox/roact.git
[submodule "plugin/Packages/Flipper"]
path = plugin/Packages/Flipper
url = https://github.com/reselim/flipper.git
[submodule "plugin/Packages/Promise"]
path = plugin/Packages/Promise
url = https://github.com/evaera/roblox-lua-promise.git
[submodule "plugin/Packages/t"]
path = plugin/Packages/t
url = https://github.com/osyrisrblx/t.git
[submodule "plugin/modules/rbx-dom"]
path = plugin/modules/rbx-dom
url = http://github.com/rojo-rbx/rbx-dom
[submodule "plugin/Packages/TestEZ"]
path = plugin/Packages/TestEZ
url = https://github.com/roblox/testez.git
[submodule "plugin/Packages/Highlighter"]
path = plugin/Packages/Highlighter
url = https://github.com/boatbomber/highlighter.git

View File

@@ -1,44 +0,0 @@
matrix:
include:
# Lua tests are currently disabled because of holes in Lemur that are pretty
# tedious to fix. It should be fixed by either adding missing features to
# Lemur or by migrating to a CI system based on real Roblox instead.
# - language: python
# env:
# - LUA="lua=5.1"
# before_install:
# - pip install hererocks
# - hererocks lua_install -r^ --$LUA
# - export PATH=$PATH:$PWD/lua_install/bin
# install:
# - luarocks install luafilesystem
# - luarocks install busted
# - luarocks install luacov
# - luarocks install luacov-coveralls
# - luarocks install luacheck
# script:
# - cd plugin
# - luacheck src
# - lua -lluacov spec.lua
# after_success:
# - cd plugin
# - luacov-coveralls -e $TRAVIS_BUILD_DIR/lua_install
- language: rust
rust: 1.34.0
cache: cargo
script:
- cargo test --verbose
- language: rust
rust: stable
cache: cargo
script:
- cargo test --verbose

8
.vscode/extensions.json vendored Normal file
View File

@@ -0,0 +1,8 @@
{
"recommendations": [
"JohnnyMorganz.luau-lsp",
"JohnnyMorganz.stylua",
"Kampfkarren.selene-vscode",
"rust-lang.rust-analyzer"
]
}

4
.vscode/settings.json vendored Normal file
View File

@@ -0,0 +1,4 @@
{
"luau-lsp.sourcemap.rojoProjectFile": "plugin.project.json",
"luau-lsp.sourcemap.autogenerate": true
}

File diff suppressed because it is too large Load Diff

View File

@@ -1,5 +1,5 @@
# Contributing to the Rojo Project
Rojo is a big project and can always use more help! This guide covers all repositories underneath the [rojo-rbx organization on GitHub](https://github.com/rojo-rbx).
Rojo is a big project and can always use more help!
Some of the repositories covered are:
@@ -11,10 +11,33 @@ Some of the repositories covered are:
## Code
Code contributions are welcome for features and bugs that have been reported in the project's bug tracker. We want to make sure that no one wastes their time, so be sure to talk with maintainers about what changes would be accepted before doing any work!
You'll want these tools to work on Rojo:
* Latest stable Rust compiler
* Latest stable [Rojo](https://github.com/rojo-rbx/rojo)
* [Rokit](https://github.com/rojo-rbx/rokit)
* [Luau Language Server](https://github.com/JohnnyMorganz/luau-lsp) (Only needed if working on the Studio plugin.)
When working on the Studio plugin, we recommend using this command to automatically rebuild the plugin when you save a change:
*(Make sure you've enabled the Studio setting to reload plugins on file change!)*
```bash
bash scripts/watch-build-plugin.sh
```
You can also run the plugin's unit tests with the following:
*(Make sure you have `run-in-roblox` installed first!)*
```bash
bash scripts/unit-test-plugin.sh
```
## Documentation
Documentation impacts way more people than the individual lines of code we write.
If you find any problems in documentation, including typos, bad grammar, misleading phrasing, or missing content, feel free to file issues and pull requests to fix them.
If you find any problems in the documentation, including typos, bad grammar, misleading phrasing, or missing content, feel free to file issues and pull requests to fix them.
## Bug Reports and Feature Requests
Most of the tools around Rojo try to be clear when an issue is a bug. Even if they aren't, sometimes things don't work quite right.
@@ -23,23 +46,26 @@ Sometimes there's something that Rojo doesn't do that it probably should.
Please file issues and we'll try to help figure out what the best way forward is.
## Local Development Gotchas
If your build fails with "Error: failed to open file `D:\code\rojo\plugin\modules\roact\src`" you need to update your Git submodules.
Run the command and try building again: `git submodule update --init --recursive`.
## Pushing a Rojo Release
The Rojo release process is pretty manual right now. If you need to do it, here's how:
1. Bump server version in [`server/Cargo.toml`](server/Cargo.toml)
1. Bump server version in [`Cargo.toml`](Cargo.toml)
2. Bump plugin version in [`plugin/src/Config.lua`](plugin/src/Config.lua)
3. Run `cargo test` to update `Cargo.lock` and double-check tests
3. Run `cargo test` to update `Cargo.lock` and run tests
4. Update [`CHANGELOG.md`](CHANGELOG.md)
5. Commit!
* `git add . && git commit -m "Release vX.Y.Z"`
6. Tag the commit with the version from `Cargo.toml` prepended with a v, like `v0.4.13`
7. Build Windows release build of CLI
* `cargo build --release`
6. Tag the commit
* `git tag vX.Y.Z`
7. Publish the CLI
* `cargo publish`
8. Build and upload the plugin
* `rojo build plugin -o Rojo.rbxm`
* Upload `Rojo.rbxm` to Roblox.com, keep it for later
8. Publish the Plugin
* `cargo run -- upload plugin --asset_id 6415005344`
9. Push commits and tags
* `git push && git push --tags`
10. Copy GitHub release content from previous release

3920
Cargo.lock generated

File diff suppressed because it is too large Load Diff

View File

@@ -1,8 +1,130 @@
[workspace]
members = [
"server",
"rojo-test",
[package]
name = "rojo"
version = "7.7.0-rc.1"
rust-version = "1.88"
authors = [
"Lucien Greathouse <me@lpghatguy.com>",
"Micah Reid <git@dekkonot.com>",
"Ken Loeffler <kenloef@gmail.com>",
]
description = "Enables professional-grade development tools for Roblox developers"
license = "MPL-2.0"
homepage = "https://rojo.space"
documentation = "https://rojo.space/docs"
repository = "https://github.com/rojo-rbx/rojo"
readme = "README.md"
edition = "2021"
build = "build.rs"
exclude = ["/test-projects/**"]
[profile.dev]
opt-level = 1
panic = "abort"
[profile.release]
panic = "abort"
[features]
default = []
# Enable this feature to live-reload assets from the web UI.
dev_live_assets = []
# Run Rojo with this feature to open a Tracy session.
# Currently uses protocol v63, last supported in Tracy 0.9.1.
profile-with-tracy = ["profiling/profile-with-tracy"]
[workspace]
members = ["crates/*"]
[lib]
name = "librojo"
path = "src/lib.rs"
[[bench]]
name = "build"
harness = false
[dependencies]
memofs = { version = "0.3.1", path = "crates/memofs" }
# These dependencies can be uncommented when working on rbx-dom simultaneously
# rbx_binary = { path = "../rbx-dom/rbx_binary", features = [
# "unstable_text_format",
# ] }
# rbx_dom_weak = { path = "../rbx-dom/rbx_dom_weak" }
# rbx_reflection = { path = "../rbx-dom/rbx_reflection" }
# rbx_reflection_database = { path = "../rbx-dom/rbx_reflection_database" }
# rbx_xml = { path = "../rbx-dom/rbx_xml" }
rbx_binary = { version = "2.0.1", features = ["unstable_text_format"] }
rbx_dom_weak = "4.1.0"
rbx_reflection = "6.1.0"
rbx_reflection_database = "2.0.2"
rbx_xml = "2.0.1"
anyhow = "1.0.80"
backtrace = "0.3.69"
bincode = "1.3.3"
crossbeam-channel = "0.5.12"
csv = "1.3.0"
env_logger = "0.9.3"
fs-err = "2.11.0"
futures = "0.3.30"
globset = "0.4.14"
humantime = "2.1.0"
hyper = { version = "0.14.28", features = ["server", "tcp", "http1"] }
hyper-tungstenite = "0.11.0"
jod-thread = "0.1.2"
log = "0.4.21"
num_cpus = "1.16.0"
opener = "0.5.2"
rayon = "1.9.0"
reqwest = { version = "0.11.24", default-features = false, features = [
"blocking",
"json",
"rustls-tls",
] }
ritz = "0.1.0"
roblox_install = "1.0.0"
serde = { version = "1.0.197", features = ["derive", "rc"] }
serde_json = "1.0.145"
jsonc-parser = { version = "0.27.0", features = ["serde"] }
strum = { version = "0.27", features = ["derive"] }
toml = "0.5.11"
termcolor = "1.4.1"
thiserror = "1.0.57"
tokio = { version = "1.36.0", features = ["rt", "rt-multi-thread", "macros"] }
uuid = { version = "1.7.0", features = ["v4", "serde"] }
clap = { version = "3.2.25", features = ["derive"] }
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"
[build-dependencies]
memofs = { version = "0.3.0", path = "crates/memofs" }
embed-resource = "1.8.0"
anyhow = "1.0.80"
bincode = "1.3.3"
fs-err = "2.11.0"
maplit = "1.0.2"
semver = "1.0.22"
[dev-dependencies]
rojo-insta-ext = { path = "crates/rojo-insta-ext" }
criterion = "0.3.6"
insta = { version = "1.36.1", features = ["redactions", "yaml"] }
paste = "1.0.14"
pretty_assertions = "1.4.0"
serde_yaml = "0.8.26"
tempfile = "3.10.1"
walkdir = "2.5.0"

View File

@@ -1,24 +1,13 @@
<div align="center">
<a href="https://rojo.space">
<img src="assets/logo-512.png" alt="Rojo" height="217" />
</a>
<a href="https://rojo.space"><img src="assets/brand_images/logo-512.png" alt="Rojo" height="217" /></a>
</div>
<div>&nbsp;</div>
<div align="center">
<a href="https://travis-ci.org/rojo-rbx/rojo">
<img src="https://api.travis-ci.org/rojo-rbx/rojo.svg?branch=master" alt="Travis-CI Build Status" />
</a>
<a href="https://crates.io/crates/rojo">
<img src="https://img.shields.io/crates/v/rojo.svg?label=version" alt="Latest server version" />
</a>
<a href="https://rojo.space/docs/0.4.x">
<img src="https://img.shields.io/badge/docs-0.4.x-brightgreen.svg" alt="Rojo 0.4.x Documentation" />
</a>
<a href="https://rojo.space/docs/0.5.x">
<img src="https://img.shields.io/badge/docs-0.5.x-brightgreen.svg" alt="Rojo 0.5.x Documentation" />
</a>
<a href="https://github.com/rojo-rbx/rojo/actions"><img src="https://github.com/rojo-rbx/rojo/workflows/CI/badge.svg" alt="Actions status" /></a>
<a href="https://crates.io/crates/rojo"><img src="https://img.shields.io/crates/v/rojo.svg?label=latest%20release" alt="Latest server version" /></a>
<a href="https://rojo.space/docs"><img src="https://img.shields.io/badge/docs-website-brightgreen.svg" alt="Rojo Documentation" /></a>
</div>
<hr />
@@ -37,22 +26,21 @@ Rojo enables:
* Streaming `rbxmx` and `rbxm` models into your game in real time
* Packaging and deploying your project to Roblox.com from the command line
Soon, Rojo will be able to:
In the future, Rojo will be able to:
* Automatically convert your existing game to work with Rojo
* Sync instances from Roblox Studio to the filesystem
* Automatically manage your assets on Roblox.com, like images and sounds
* Automatically convert your existing game to work with Rojo
* Import custom instances like MoonScript code
## [Documentation](https://rojo.space/docs/latest)
If you find any mistakes, feel free to make changes in the [docs](https://github.com/rojo-rbx/rojo/tree/master/docs) folder of this repository and submit a pull request!
## [Documentation](https://rojo.space/docs)
Documentation is hosted in the [rojo.space repository](https://github.com/rojo-rbx/rojo.space).
## Contributing
Check out our [contribution guide](CONTRIBUTING.md) for detailed instructions for helping work on Rojo!
Pull requests are welcome!
Rojo supports Rust 1.34.0 and newer. The minimum supported version of Rust is based on the latest versions of the dependencies that Rojo has.
Rojo supports Rust 1.88 and newer. The minimum supported version of Rust is based on the latest versions of the dependencies that Rojo has.
## License
Rojo is available under the terms of the Mozilla Public License, Version 2.0. See [LICENSE.txt](LICENSE.txt) for details.
Rojo is available under the terms of the Mozilla Public License, Version 2.0. See [LICENSE.txt](LICENSE.txt) for details.

BIN
assets/NotificationPop.mp3 Normal file

Binary file not shown.

Binary file not shown.

After

Width:  |  Height:  |  Size: 975 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

View File

Before

Width:  |  Height:  |  Size: 33 KiB

After

Width:  |  Height:  |  Size: 33 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 269 B

View File

@@ -0,0 +1,15 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<svg width="100%" height="100%" viewBox="0 0 16 16" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xml:space="preserve" xmlns:serif="http://www.serif.com/" style="fill-rule:evenodd;clip-rule:evenodd;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:1.5;">
<g transform="matrix(1,0,0,1,-54,-1)">
<g id="Artboard3" transform="matrix(1.77778,0,0,1.45455,-42,-0.454545)">
<rect x="54" y="1" width="9" height="11" style="fill:none;"/>
<g transform="matrix(3.375,0,0,4.125,-3654,-2753.12)">
<path d="M1099,670L1101,668" style="fill:none;stroke:white;stroke-width:0.5px;"/>
<g transform="matrix(-1,0,0,1,2200,0)">
<path d="M1099,670L1101,668" style="fill:none;stroke:white;stroke-width:0.5px;"/>
</g>
</g>
</g>
</g>
</svg>

After

Width:  |  Height:  |  Size: 1.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 249 B

View File

@@ -0,0 +1,12 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<svg width="100%" height="100%" viewBox="0 0 16 16" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xml:space="preserve" xmlns:serif="http://www.serif.com/" style="fill-rule:evenodd;clip-rule:evenodd;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:1.5;">
<g transform="matrix(1,0,0,1,-32,0)">
<g id="Artboard2" transform="matrix(0.8,0,0,0.941176,6.4,0)">
<rect x="32" y="0" width="20" height="17" style="fill:none;"/>
<g transform="matrix(5,0,0,4.25,-5470.5,-2371.5)">
<path d="M1101,560L1102,561L1104,559" style="fill:none;stroke:white;stroke-width:0.75px;"/>
</g>
</g>
</g>
</svg>

After

Width:  |  Height:  |  Size: 870 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

BIN
assets/images/circle-16.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 196 B

BIN
assets/images/circle-32.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 317 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.3 KiB

BIN
assets/images/circle-64.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 613 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.0 KiB

View File

@@ -0,0 +1,21 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<svg width="100%" height="100%" viewBox="0 0 60 27" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xml:space="preserve" xmlns:serif="http://www.serif.com/" style="fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2;">
<g id="Artboard1" transform="matrix(0.952381,0,0,0.710526,-228.571,-156.316)">
<rect x="240" y="220" width="63" height="38" style="fill:none;"/>
<g transform="matrix(0.0789166,0,0,0.105779,211.848,170.749)">
<g transform="matrix(340.635,0,0,340.635,376,753)">
<path d="M0.302,-0.836L0.306,-0.836L0.302,-0.829L0.302,-0.814C0.333,-0.82 0.349,-0.828 0.349,-0.836L0.371,-0.833C0.408,-0.835 0.441,-0.836 0.472,-0.836L0.476,-0.836C0.524,-0.836 0.58,-0.81 0.646,-0.757C0.66,-0.734 0.668,-0.714 0.672,-0.695L0.672,-0.659C0.664,-0.609 0.65,-0.571 0.632,-0.546C0.621,-0.537 0.597,-0.507 0.56,-0.456L0.556,-0.456L0.556,-0.463L0.566,-0.478L0.56,-0.478C0.474,-0.405 0.378,-0.349 0.27,-0.311C0.243,-0.304 0.216,-0.3 0.19,-0.3C0.224,-0.26 0.287,-0.207 0.378,-0.141C0.387,-0.136 0.445,-0.099 0.552,-0.028C0.641,0.027 0.747,0.087 0.871,0.153L0.871,0.157L0.856,0.157C0.832,0.148 0.82,0.141 0.82,0.138L0.813,0.142L0.806,0.142C0.803,0.142 0.802,0.141 0.802,0.138C0.793,0.14 0.786,0.149 0.78,0.164C0.795,0.168 0.802,0.173 0.802,0.178C0.796,0.183 0.792,0.186 0.788,0.186L0.77,0.182L0.77,0.186C0.77,0.19 0.773,0.193 0.78,0.193L0.78,0.204L0.777,0.204C0.772,0.204 0.717,0.172 0.614,0.109C0.541,0.072 0.451,0.015 0.346,-0.061C0.311,-0.077 0.247,-0.124 0.153,-0.202L0.143,-0.202C0.129,-0.181 0.111,-0.129 0.088,-0.046C0.083,-0.027 0.059,0.001 0.016,0.037L0.008,0.037L0.001,0.026L0.001,0.022C0.001,0.017 0.005,0.006 0.012,-0.01L0.012,-0.014L0.008,-0.014C0.008,-0.007 -0.007,0.004 -0.035,0.019L-0.039,0.019L-0.039,0.012C0.046,-0.24 0.105,-0.404 0.139,-0.481C0.197,-0.614 0.226,-0.69 0.226,-0.709C0.213,-0.709 0.184,-0.693 0.139,-0.659L0.132,-0.659L0.135,-0.666L0.135,-0.673C0.122,-0.673 0.092,-0.652 0.045,-0.608L0.041,-0.608L0.041,-0.612L0.088,-0.666L0.096,-0.677L0.096,-0.681L0.088,-0.681L0.045,-0.645C0.04,-0.645 0.038,-0.647 0.038,-0.651C0.083,-0.701 0.138,-0.744 0.204,-0.778C0.265,-0.794 0.295,-0.812 0.295,-0.833L0.302,-0.836ZM0.632,-0.735L0.632,-0.731C0.632,-0.727 0.635,-0.724 0.639,-0.724L0.639,-0.728C0.639,-0.732 0.637,-0.735 0.632,-0.735ZM0.208,-0.387L0.211,-0.387C0.255,-0.396 0.277,-0.403 0.277,-0.409C0.274,-0.414 0.273,-0.417 0.273,-0.42C0.365,-0.451 0.427,-0.482 0.458,-0.514C0.461,-0.514 0.48,-0.534 0.516,-0.576L0.52,-0.576L0.52,-0.572C0.515,-0.564 0.512,-0.558 0.512,-0.554L0.516,-0.554C0.547,-0.578 0.563,-0.604 0.563,-0.633L0.563,-0.655C0.556,-0.655 0.552,-0.658 0.552,-0.663C0.564,-0.665 0.57,-0.671 0.57,-0.681C0.57,-0.693 0.546,-0.705 0.498,-0.717C0.459,-0.727 0.417,-0.731 0.371,-0.731C0.348,-0.731 0.325,-0.689 0.302,-0.604C0.292,-0.594 0.261,-0.522 0.208,-0.387ZM0.251,-0.695L0.251,-0.691C0.255,-0.691 0.258,-0.695 0.262,-0.702L0.262,-0.706C0.259,-0.706 0.255,-0.702 0.251,-0.695ZM0.255,-0.626L0.259,-0.626C0.266,-0.629 0.27,-0.636 0.27,-0.648C0.266,-0.648 0.261,-0.641 0.255,-0.626ZM0.596,-0.612L0.596,-0.604C0.599,-0.604 0.603,-0.608 0.606,-0.615L0.606,-0.619L0.603,-0.619C0.598,-0.618 0.596,-0.616 0.596,-0.612ZM0.204,-0.369L0.204,-0.365L0.211,-0.365C0.216,-0.368 0.22,-0.369 0.222,-0.369L0.222,-0.365C0.281,-0.376 0.316,-0.388 0.328,-0.401L0.324,-0.401C0.271,-0.389 0.231,-0.378 0.204,-0.369ZM0.19,-0.333L0.193,-0.333L0.259,-0.347L0.255,-0.354C0.212,-0.349 0.19,-0.341 0.19,-0.333ZM0.334,-0.108L0.334,-0.101C0.372,-0.072 0.395,-0.057 0.403,-0.057C0.394,-0.064 0.389,-0.07 0.389,-0.075L0.334,-0.108ZM0.44,-0.028C0.442,-0.019 0.449,-0.014 0.461,-0.014L0.465,-0.014L0.465,-0.018C0.459,-0.018 0.452,-0.021 0.443,-0.028L0.44,-0.028ZM0.675,0.102C0.694,0.119 0.723,0.136 0.762,0.153L0.766,0.146C0.736,0.128 0.708,0.113 0.683,0.102L0.675,0.102ZM0.875,0.16L0.886,0.16C0.89,0.161 0.893,0.163 0.893,0.167C0.888,0.167 0.886,0.171 0.886,0.178L0.878,0.178L0.882,0.171L0.882,0.167L0.875,0.167L0.875,0.16Z" style="fill:white;fill-rule:nonzero;"/>
</g>
<g transform="matrix(340.635,0,0,340.635,588.398,753)">
<path d="M0.631,-0.705C0.646,-0.705 0.661,-0.696 0.673,-0.678L0.646,-0.678C0.62,-0.678 0.587,-0.67 0.546,-0.653L0.546,-0.65L0.549,-0.65C0.607,-0.654 0.649,-0.656 0.677,-0.656L0.683,-0.656L0.683,-0.65L0.67,-0.65C0.668,-0.65 0.667,-0.651 0.667,-0.653L0.503,-0.629C0.503,-0.627 0.493,-0.624 0.473,-0.62L0.473,-0.614L0.519,-0.623L0.521,-0.623L0.521,-0.617C0.386,-0.581 0.318,-0.555 0.318,-0.538C0.252,-0.483 0.204,-0.431 0.175,-0.383C0.131,-0.304 0.108,-0.243 0.108,-0.201C0.108,-0.157 0.131,-0.125 0.175,-0.104C0.183,-0.102 0.19,-0.101 0.196,-0.101C0.286,-0.136 0.353,-0.196 0.397,-0.28C0.409,-0.318 0.419,-0.363 0.427,-0.417L0.434,-0.417L0.427,-0.359C0.433,-0.359 0.439,-0.374 0.443,-0.404C0.441,-0.412 0.439,-0.42 0.439,-0.429L0.439,-0.438L0.446,-0.438C0.448,-0.407 0.449,-0.386 0.449,-0.374C0.449,-0.358 0.444,-0.331 0.434,-0.292C0.445,-0.302 0.458,-0.335 0.473,-0.392C0.48,-0.447 0.486,-0.474 0.491,-0.474C0.491,-0.472 0.492,-0.471 0.494,-0.471C0.492,-0.469 0.49,-0.457 0.488,-0.435L0.488,-0.432L0.491,-0.432C0.499,-0.454 0.504,-0.48 0.506,-0.508C0.502,-0.516 0.5,-0.522 0.5,-0.526L0.506,-0.529C0.512,-0.529 0.518,-0.513 0.525,-0.48C0.525,-0.4 0.491,-0.297 0.424,-0.17C0.372,-0.093 0.305,-0.042 0.224,-0.019C0.188,-0.006 0.154,-0 0.121,-0C0.04,-0.022 -0.001,-0.083 -0.001,-0.183C-0.001,-0.296 0.045,-0.398 0.136,-0.489C0.165,-0.522 0.227,-0.568 0.321,-0.629C0.425,-0.68 0.529,-0.705 0.631,-0.705ZM0.482,-0.656L0.482,-0.653C0.499,-0.653 0.508,-0.652 0.509,-0.65C0.526,-0.659 0.536,-0.663 0.54,-0.663L0.54,-0.668L0.482,-0.656ZM0.099,-0.417C0.144,-0.458 0.179,-0.494 0.206,-0.523C0.23,-0.538 0.242,-0.55 0.242,-0.559C0.201,-0.535 0.156,-0.493 0.108,-0.432C0.102,-0.427 0.099,-0.422 0.099,-0.417ZM0.105,-0.261C0.108,-0.261 0.118,-0.284 0.136,-0.328C0.158,-0.378 0.203,-0.439 0.272,-0.511L0.272,-0.514C0.204,-0.463 0.167,-0.422 0.16,-0.392C0.142,-0.371 0.124,-0.328 0.105,-0.261ZM0.069,-0.334L0.069,-0.332L0.072,-0.332C0.116,-0.393 0.139,-0.429 0.139,-0.438C0.11,-0.413 0.086,-0.378 0.069,-0.334ZM0.467,-0.31L0.467,-0.307L0.47,-0.307C0.492,-0.371 0.503,-0.413 0.503,-0.432C0.49,-0.409 0.478,-0.369 0.467,-0.31ZM0.087,-0.404L0.087,-0.401C0.091,-0.401 0.093,-0.403 0.093,-0.407L0.093,-0.41C0.089,-0.41 0.087,-0.408 0.087,-0.404ZM0.063,-0.368C0.032,-0.297 0.017,-0.245 0.017,-0.213C0.021,-0.148 0.028,-0.107 0.039,-0.088L0.042,-0.088L0.042,-0.094C0.035,-0.107 0.032,-0.129 0.032,-0.158C0.032,-0.191 0.035,-0.227 0.042,-0.268L0.039,-0.273C0.045,-0.3 0.054,-0.331 0.066,-0.365L0.066,-0.368L0.063,-0.368ZM0.096,-0.24L0.096,-0.237C0.1,-0.237 0.103,-0.239 0.103,-0.243L0.103,-0.246C0.098,-0.245 0.096,-0.243 0.096,-0.24ZM0.397,-0.222L0.397,-0.219L0.4,-0.219C0.408,-0.232 0.412,-0.241 0.412,-0.243C0.407,-0.242 0.402,-0.235 0.397,-0.222ZM0.066,-0.24C0.06,-0.222 0.055,-0.202 0.051,-0.179C0.055,-0.138 0.061,-0.108 0.069,-0.088L0.072,-0.088L0.072,-0.094C0.066,-0.121 0.063,-0.139 0.063,-0.146L0.066,-0.152C0.064,-0.155 0.063,-0.16 0.063,-0.164C0.063,-0.169 0.064,-0.173 0.066,-0.176C0.064,-0.18 0.063,-0.183 0.063,-0.186C0.067,-0.218 0.069,-0.235 0.069,-0.237L0.069,-0.24L0.066,-0.24ZM0.294,-0.125L0.294,-0.122C0.3,-0.122 0.322,-0.143 0.357,-0.186L0.357,-0.188L0.354,-0.188C0.314,-0.151 0.294,-0.129 0.294,-0.125ZM0.379,-0.149C0.379,-0.146 0.36,-0.126 0.321,-0.088L0.324,-0.088C0.351,-0.112 0.37,-0.132 0.382,-0.146L0.385,-0.146L0.385,-0.149L0.379,-0.149ZM0.09,-0.104L0.09,-0.101C0.094,-0.08 0.104,-0.07 0.121,-0.07L0.13,-0.07L0.13,-0.073L0.09,-0.104ZM0.151,-0.055L0.188,-0.055L0.203,-0.058L0.203,-0.061L0.157,-0.061C0.153,-0.06 0.151,-0.058 0.151,-0.055ZM0.096,-0.058L0.096,-0.055C0.104,-0.045 0.113,-0.04 0.124,-0.04L0.13,-0.04L0.13,-0.042C0.127,-0.042 0.116,-0.048 0.096,-0.058Z" style="fill:white;fill-rule:nonzero;"/>
</g>
<g transform="matrix(340.635,0,0,340.635,758.882,753)">
<path d="M0.208,-0.7L0.223,-0.7C0.227,-0.7 0.229,-0.697 0.229,-0.691C0.294,-0.687 0.328,-0.684 0.331,-0.682C0.333,-0.682 0.333,-0.683 0.333,-0.685C0.364,-0.683 0.387,-0.682 0.401,-0.682L0.462,-0.682C0.466,-0.682 0.468,-0.684 0.468,-0.688L0.45,-0.688L0.45,-0.694L0.49,-0.694L0.49,-0.688L0.475,-0.688L0.475,-0.682L0.557,-0.682C0.564,-0.682 0.573,-0.681 0.584,-0.679C0.603,-0.681 0.612,-0.685 0.612,-0.691L0.658,-0.691C0.678,-0.691 0.688,-0.692 0.689,-0.694C0.706,-0.692 0.72,-0.691 0.731,-0.691L0.903,-0.691L0.921,-0.688L0.928,-0.691C1.035,-0.686 1.096,-0.681 1.111,-0.676L1.13,-0.682L1.13,-0.676L1.068,-0.667L1.068,-0.664C1.075,-0.664 1.078,-0.661 1.078,-0.657C1.078,-0.654 1.075,-0.651 1.068,-0.648C1.064,-0.65 1.061,-0.651 1.059,-0.651C1.059,-0.647 1.055,-0.645 1.047,-0.645L1.047,-0.642C1.048,-0.638 1.05,-0.636 1.053,-0.636L1.059,-0.636C1.072,-0.636 1.087,-0.635 1.105,-0.633C1.113,-0.635 1.12,-0.636 1.126,-0.636C1.139,-0.625 1.145,-0.619 1.145,-0.618C1.138,-0.613 1.132,-0.611 1.126,-0.611L1.099,-0.611C1.088,-0.611 1.079,-0.608 1.071,-0.602L1.029,-0.602C1.024,-0.602 1.02,-0.603 1.017,-0.605L1.01,-0.602C0.993,-0.604 0.98,-0.605 0.971,-0.605C0.962,-0.605 0.958,-0.604 0.958,-0.602L0.928,-0.605L0.695,-0.605C0.69,-0.605 0.686,-0.604 0.683,-0.602C0.679,-0.604 0.675,-0.605 0.67,-0.605L0.563,-0.605C0.555,-0.605 0.547,-0.604 0.539,-0.602C0.531,-0.604 0.523,-0.605 0.514,-0.605L0.453,-0.605C0.429,-0.578 0.401,-0.525 0.37,-0.446C0.37,-0.439 0.334,-0.358 0.263,-0.201L0.177,-0.021C0.185,-0.001 0.189,0.011 0.189,0.013C0.186,0.013 0.177,0.001 0.162,-0.023L0.156,-0.023L0.153,-0.008C0.159,-0.001 0.162,0.006 0.162,0.013L0.162,0.017L0.15,0.007L0.128,0.007C0.128,-0.005 0.108,-0.045 0.067,-0.112C0.012,-0.235 -0.028,-0.332 -0.052,-0.403L-0.052,-0.412C-0.048,-0.412 -0.046,-0.409 -0.046,-0.403L-0.043,-0.403C-0.039,-0.403 -0.037,-0.405 -0.037,-0.409L-0.046,-0.443L-0.046,-0.446L-0.04,-0.446L0.034,-0.293L0.037,-0.293L0.037,-0.296C0.008,-0.37 -0.006,-0.41 -0.006,-0.416L-0.006,-0.421C0.009,-0.398 0.037,-0.343 0.076,-0.256C0.118,-0.177 0.142,-0.135 0.147,-0.13C0.212,-0.285 0.285,-0.442 0.364,-0.602C0.36,-0.602 0.358,-0.604 0.358,-0.608L0.352,-0.605L0.333,-0.605C0.332,-0.605 0.331,-0.606 0.331,-0.608C0.327,-0.606 0.324,-0.605 0.321,-0.605L0.315,-0.608C0.313,-0.608 0.312,-0.607 0.312,-0.605L0.291,-0.608L0.263,-0.608C0.263,-0.615 0.261,-0.618 0.257,-0.618L0.254,-0.618C0.247,-0.618 0.215,-0.621 0.159,-0.626L0.159,-0.63L0.162,-0.636L0.156,-0.636L0.156,-0.639C0.156,-0.641 0.163,-0.646 0.177,-0.654L0.184,-0.654L0.189,-0.651C0.189,-0.653 0.191,-0.659 0.193,-0.669C0.188,-0.671 0.178,-0.674 0.162,-0.676L0.162,-0.682L0.184,-0.682C0.191,-0.682 0.199,-0.688 0.208,-0.7ZM0.291,-0.697L0.352,-0.697C0.356,-0.697 0.358,-0.694 0.358,-0.691L0.291,-0.691L0.291,-0.697ZM0.41,-0.694L0.419,-0.694L0.419,-0.688L0.41,-0.688L0.41,-0.694ZM0.505,-0.694L0.533,-0.694L0.533,-0.688L0.505,-0.688L0.505,-0.694ZM0.603,-0.694L0.603,-0.691C0.603,-0.687 0.601,-0.685 0.597,-0.685L0.563,-0.685L0.563,-0.691L0.588,-0.691L0.603,-0.694ZM0.202,-0.667L0.202,-0.664L0.239,-0.664L0.239,-0.667L0.202,-0.667ZM0.269,-0.339L0.266,-0.327L0.266,-0.324L0.269,-0.324L0.272,-0.336L0.272,-0.339L0.269,-0.339ZM0.257,-0.308C0.237,-0.266 0.211,-0.205 0.177,-0.125C0.195,-0.147 0.223,-0.207 0.26,-0.305L0.26,-0.308L0.257,-0.308Z" style="fill:white;fill-rule:nonzero;"/>
</g>
<g transform="matrix(340.635,0,0,340.635,891.444,753)">
<path d="M0.631,-0.705C0.646,-0.705 0.661,-0.696 0.673,-0.678L0.646,-0.678C0.62,-0.678 0.587,-0.67 0.546,-0.653L0.546,-0.65L0.549,-0.65C0.607,-0.654 0.649,-0.656 0.677,-0.656L0.683,-0.656L0.683,-0.65L0.67,-0.65C0.668,-0.65 0.667,-0.651 0.667,-0.653L0.503,-0.629C0.503,-0.627 0.493,-0.624 0.473,-0.62L0.473,-0.614L0.519,-0.623L0.521,-0.623L0.521,-0.617C0.386,-0.581 0.318,-0.555 0.318,-0.538C0.252,-0.483 0.204,-0.431 0.175,-0.383C0.131,-0.304 0.108,-0.243 0.108,-0.201C0.108,-0.157 0.131,-0.125 0.175,-0.104C0.183,-0.102 0.19,-0.101 0.196,-0.101C0.286,-0.136 0.353,-0.196 0.397,-0.28C0.409,-0.318 0.419,-0.363 0.427,-0.417L0.434,-0.417L0.427,-0.359C0.433,-0.359 0.439,-0.374 0.443,-0.404C0.441,-0.412 0.439,-0.42 0.439,-0.429L0.439,-0.438L0.446,-0.438C0.448,-0.407 0.449,-0.386 0.449,-0.374C0.449,-0.358 0.444,-0.331 0.434,-0.292C0.445,-0.302 0.458,-0.335 0.473,-0.392C0.48,-0.447 0.486,-0.474 0.491,-0.474C0.491,-0.472 0.492,-0.471 0.494,-0.471C0.492,-0.469 0.49,-0.457 0.488,-0.435L0.488,-0.432L0.491,-0.432C0.499,-0.454 0.504,-0.48 0.506,-0.508C0.502,-0.516 0.5,-0.522 0.5,-0.526L0.506,-0.529C0.512,-0.529 0.518,-0.513 0.525,-0.48C0.525,-0.4 0.491,-0.297 0.424,-0.17C0.372,-0.093 0.305,-0.042 0.224,-0.019C0.188,-0.006 0.154,-0 0.121,-0C0.04,-0.022 -0.001,-0.083 -0.001,-0.183C-0.001,-0.296 0.045,-0.398 0.136,-0.489C0.165,-0.522 0.227,-0.568 0.321,-0.629C0.425,-0.68 0.529,-0.705 0.631,-0.705ZM0.482,-0.656L0.482,-0.653C0.499,-0.653 0.508,-0.652 0.509,-0.65C0.526,-0.659 0.536,-0.663 0.54,-0.663L0.54,-0.668L0.482,-0.656ZM0.099,-0.417C0.144,-0.458 0.179,-0.494 0.206,-0.523C0.23,-0.538 0.242,-0.55 0.242,-0.559C0.201,-0.535 0.156,-0.493 0.108,-0.432C0.102,-0.427 0.099,-0.422 0.099,-0.417ZM0.105,-0.261C0.108,-0.261 0.118,-0.284 0.136,-0.328C0.158,-0.378 0.203,-0.439 0.272,-0.511L0.272,-0.514C0.204,-0.463 0.167,-0.422 0.16,-0.392C0.142,-0.371 0.124,-0.328 0.105,-0.261ZM0.069,-0.334L0.069,-0.332L0.072,-0.332C0.116,-0.393 0.139,-0.429 0.139,-0.438C0.11,-0.413 0.086,-0.378 0.069,-0.334ZM0.467,-0.31L0.467,-0.307L0.47,-0.307C0.492,-0.371 0.503,-0.413 0.503,-0.432C0.49,-0.409 0.478,-0.369 0.467,-0.31ZM0.087,-0.404L0.087,-0.401C0.091,-0.401 0.093,-0.403 0.093,-0.407L0.093,-0.41C0.089,-0.41 0.087,-0.408 0.087,-0.404ZM0.063,-0.368C0.032,-0.297 0.017,-0.245 0.017,-0.213C0.021,-0.148 0.028,-0.107 0.039,-0.088L0.042,-0.088L0.042,-0.094C0.035,-0.107 0.032,-0.129 0.032,-0.158C0.032,-0.191 0.035,-0.227 0.042,-0.268L0.039,-0.273C0.045,-0.3 0.054,-0.331 0.066,-0.365L0.066,-0.368L0.063,-0.368ZM0.096,-0.24L0.096,-0.237C0.1,-0.237 0.103,-0.239 0.103,-0.243L0.103,-0.246C0.098,-0.245 0.096,-0.243 0.096,-0.24ZM0.397,-0.222L0.397,-0.219L0.4,-0.219C0.408,-0.232 0.412,-0.241 0.412,-0.243C0.407,-0.242 0.402,-0.235 0.397,-0.222ZM0.066,-0.24C0.06,-0.222 0.055,-0.202 0.051,-0.179C0.055,-0.138 0.061,-0.108 0.069,-0.088L0.072,-0.088L0.072,-0.094C0.066,-0.121 0.063,-0.139 0.063,-0.146L0.066,-0.152C0.064,-0.155 0.063,-0.16 0.063,-0.164C0.063,-0.169 0.064,-0.173 0.066,-0.176C0.064,-0.18 0.063,-0.183 0.063,-0.186C0.067,-0.218 0.069,-0.235 0.069,-0.237L0.069,-0.24L0.066,-0.24ZM0.294,-0.125L0.294,-0.122C0.3,-0.122 0.322,-0.143 0.357,-0.186L0.357,-0.188L0.354,-0.188C0.314,-0.151 0.294,-0.129 0.294,-0.125ZM0.379,-0.149C0.379,-0.146 0.36,-0.126 0.321,-0.088L0.324,-0.088C0.351,-0.112 0.37,-0.132 0.382,-0.146L0.385,-0.146L0.385,-0.149L0.379,-0.149ZM0.09,-0.104L0.09,-0.101C0.094,-0.08 0.104,-0.07 0.121,-0.07L0.13,-0.07L0.13,-0.073L0.09,-0.104ZM0.151,-0.055L0.188,-0.055L0.203,-0.058L0.203,-0.061L0.157,-0.061C0.153,-0.06 0.151,-0.058 0.151,-0.055ZM0.096,-0.058L0.096,-0.055C0.104,-0.045 0.113,-0.04 0.124,-0.04L0.13,-0.04L0.13,-0.042C0.127,-0.042 0.116,-0.048 0.096,-0.058Z" style="fill:white;fill-rule:nonzero;"/>
</g>
</g>
</g>
</svg>

After

Width:  |  Height:  |  Size: 15 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 229 B

View File

@@ -0,0 +1,5 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<svg width="100%" height="100%" viewBox="0 0 24 24" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xml:space="preserve" xmlns:serif="http://www.serif.com/" style="fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2;">
<path d="M20,11L20,13L8,13L13.5,18.5L12.08,19.92L4.16,12L12.08,4.08L13.5,5.5L8,11L20,11Z" style="fill:white;fill-rule:nonzero;"/>
</svg>

After

Width:  |  Height:  |  Size: 584 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 295 B

View File

@@ -0,0 +1,15 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<svg width="100%" height="100%" viewBox="0 0 24 24" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xml:space="preserve" xmlns:serif="http://www.serif.com/" style="fill-rule:evenodd;clip-rule:evenodd;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:1.5;">
<g id="Artboard1" transform="matrix(0.0666667,0,0,0.097561,-31,-18.6341)">
<rect x="465" y="191" width="360" height="246" style="fill:none;"/>
<g transform="matrix(134.328,0,0,102.5,-74228.5,-15214.7)">
<g transform="matrix(1.11667,0,0,1,-57.3333,0)">
<path d="M551,152L550,151" style="fill:none;stroke:white;stroke-width:0.3px;"/>
</g>
<g transform="matrix(1.11667,0,0,1,-57.3333,0)">
<path d="M550,152L551,151" style="fill:none;stroke:white;stroke-width:0.3px;"/>
</g>
</g>
</g>
</svg>

After

Width:  |  Height:  |  Size: 1.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 183 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 273 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 933 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 241 B

View File

Before

Width:  |  Height:  |  Size: 175 B

After

Width:  |  Height:  |  Size: 175 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 228 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 315 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 105 B

View File

@@ -0,0 +1,17 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<svg width="100%" height="100%" viewBox="0 0 9 7" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xml:space="preserve" xmlns:serif="http://www.serif.com/" style="fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2;">
<g transform="matrix(1,0,0,1,0,-10)">
<g id="Bottom" transform="matrix(0.243243,0,0,0.179487,-59.1081,-30.2051)">
<rect x="243" y="224" width="37" height="39" style="fill:none;"/>
<clipPath id="_clip1">
<rect x="243" y="224" width="37" height="39"/>
</clipPath>
<g clip-path="url(#_clip1)">
<g transform="matrix(-4.11111,6.82303e-16,-3.59619e-16,-3.97959,280,259.816)">
<path d="M7,5.5C7,3.568 5.88,2 4.5,2C3.12,2 2,3.568 2,5.5L2,9L7,9L7,5.5Z" style="fill:white;"/>
</g>
</g>
</g>
</g>
</svg>

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 75 B

View File

@@ -0,0 +1,12 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<svg width="100%" height="100%" viewBox="0 0 9 1" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xml:space="preserve" xmlns:serif="http://www.serif.com/" style="fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2;">
<g transform="matrix(1,0,0,1,0,-8)">
<g id="Middle" transform="matrix(1,0,0,0.111111,0,7.11111)">
<rect x="0" y="8" width="9" height="9" style="fill:none;"/>
<g transform="matrix(1,0,0,9,0,-64)">
<rect x="2" y="8" width="5" height="1" style="fill:white;"/>
</g>
</g>
</g>
</svg>

After

Width:  |  Height:  |  Size: 796 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 132 B

View File

@@ -0,0 +1,10 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<svg width="100%" height="100%" viewBox="0 0 9 7" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xml:space="preserve" xmlns:serif="http://www.serif.com/" style="fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2;">
<g id="Top" transform="matrix(0.243243,0,0,0.179487,-59.1081,-40.2051)">
<rect x="243" y="224" width="37" height="39" style="fill:none;"/>
<g transform="matrix(4.11111,0,0,3.97959,243,227.184)">
<path d="M7,5.5C7,3.568 5.88,2 4.5,2C3.12,2 2,3.568 2,5.5L2,9L7,9L7,5.5Z" style="fill:white;"/>
</g>
</g>
</svg>

After

Width:  |  Height:  |  Size: 793 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 684 B

View File

@@ -0,0 +1,8 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<svg width="100%" height="100%" viewBox="0 0 24 24" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xml:space="preserve" xmlns:serif="http://www.serif.com/" style="fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2;">
<g id="Artboard1" transform="matrix(0.5,0,0,0.5,0,0)">
<rect x="0" y="0" width="48" height="48" style="fill:none;"/>
<path d="M24,0C37.246,0 48,10.754 48,24C48,37.246 37.246,48 24,48C10.754,48 0,37.246 0,24C0,10.754 10.754,0 24,0ZM24,8.4C32.61,8.4 39.6,15.39 39.6,24C39.6,32.61 32.61,39.6 24,39.6C15.39,39.6 8.4,32.61 8.4,24C8.4,15.39 15.39,8.4 24,8.4Z" style="fill:white;"/>
</g>
</svg>

After

Width:  |  Height:  |  Size: 855 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 340 B

View File

@@ -0,0 +1,8 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<svg width="100%" height="100%" viewBox="0 0 24 24" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xml:space="preserve" xmlns:serif="http://www.serif.com/" style="fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2;">
<g id="Artboard1" transform="matrix(0.5,0,0,0.5,0,0)">
<rect x="0" y="0" width="48" height="48" style="fill:none;"/>
<path d="M48,24C48,10.745 37.255,0 24,0L24,8.4C32.616,8.4 39.6,15.384 39.6,24L48,24Z" style="fill:white;"/>
</g>
</svg>

After

Width:  |  Height:  |  Size: 704 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 574 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 607 B

185
assets/index.css Normal file
View File

@@ -0,0 +1,185 @@
* {
margin: 0;
padding: 0;
border: none;
text-decoration: inherit;
color: inherit;
font: inherit;
box-sizing: inherit;
line-height: inherit;
}
html {
box-sizing: border-box;
font-family: sans-serif;
font-size: 18px;
text-decoration: none;
line-height: 1.4;
}
body {
background-color: #e7e7e7
}
img {
max-width:100%;
max-height:100%;
height: auto;
}
.path-list > li {
margin-left: 1.2em;
font-family: monospace;
}
.root {
display: flex;
flex-direction: column;
margin: 0.5rem auto;
width: 100%;
max-width: 50rem;
background-color: #efefef;
border: 1px solid #666;
border-radius: 4px;
}
.header {
flex: 0 0;
display: flex;
flex-wrap: wrap;
align-items: center;
border-bottom: 1px solid #666;
}
.main {
padding: 1rem;
}
.main-logo {
flex: 0 0 10rem;
margin: 1rem;
}
.stats {
flex: 0 0 20rem;
margin: 1rem;
}
.stat {
display: block;
}
.stat-name {
display: inline;
font-weight: bold;
}
.main-section:not(:last-of-type) {
margin-bottom: 1rem;
}
.section-title {
font-size: 1.8rem;
}
.button-list {
flex: 0 0;
display: flex;
flex-wrap: wrap;
justify-content: space-around;
margin: -1rem;
}
.button {
display: inline-block;
border: 1px solid #666;
padding: 0.3em 1em;
margin: 1rem;
}
.instance {
margin-bottom: 0.5rem;
}
.instance-title {
font-size: 1.2rem;
padding: 0.5rem;
}
.expandable-section {
margin: 0.25rem 0.5rem;
}
.expandable-items {
padding: 0.5rem 1rem;
}
.expandable-input {
display: none;
}
.expandable-label > label {
cursor: pointer;
display: flex;
align-items: center;
align-content: center;
}
.expandable-input ~ .expandable-label .expandable-visualizer {
font-family: monospace;
display: inline-flex;
align-items: center;
align-content: center;
text-align: center;
width: 1rem;
height: 1rem;
font-size: 2rem;
margin: 0 0.5rem;
transition: transform 100ms ease-in-out;
transform-origin: 60% 60%;
}
.expandable-visualizer::before {
content: "";
font-weight: bold;
}
.expandable-input:checked ~ .expandable-label {
border-bottom: 1px solid #bbb;
}
.expandable-input:checked ~ .expandable-label .expandable-visualizer {
transform: rotate(90deg);
}
.expandable-input:not(:checked) ~ .expandable-items {
display: none;
}
.vfs-entry {
}
.vfs-entry-name {
position: relative;
font-family: monospace;
}
.vfs-entry-children .vfs-entry-name::before {
content: "";
width: 0.6em;
height: 1px;
background-color: #999;
position: absolute;
top: 50%;
left: -0.8em;
}
.vfs-entry-note {
font-style: italic;
}
.vfs-entry-children {
padding-left: 0.8em;
margin-left: 0.2em;
border-left: 1px solid #999;
}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 13 KiB

View File

@@ -1,41 +0,0 @@
<TextureAtlas imagePath="sheet.png">
<SubTexture name="grey_arrowDownGrey.png" x="78" y="498" width="15" height="10"/>
<SubTexture name="grey_arrowDownWhite.png" x="123" y="496" width="15" height="10"/>
<SubTexture name="grey_arrowUpGrey.png" x="108" y="498" width="15" height="10"/>
<SubTexture name="grey_arrowUpWhite.png" x="93" y="498" width="15" height="10"/>
<SubTexture name="grey_box.png" x="147" y="433" width="38" height="36"/>
<SubTexture name="grey_boxCheckmark.png" x="147" y="469" width="38" height="36"/>
<SubTexture name="grey_boxCross.png" x="185" y="433" width="38" height="36"/>
<SubTexture name="grey_boxTick.png" x="190" y="198" width="36" height="36"/>
<SubTexture name="grey_button00.png" x="0" y="143" width="190" height="45"/>
<SubTexture name="grey_button01.png" x="0" y="188" width="190" height="49"/>
<SubTexture name="grey_button02.png" x="0" y="98" width="190" height="45"/>
<SubTexture name="grey_button03.png" x="0" y="331" width="190" height="49"/>
<SubTexture name="grey_button04.png" x="0" y="286" width="190" height="45"/>
<SubTexture name="grey_button05.png" x="0" y="0" width="195" height="49"/>
<SubTexture name="grey_button06.png" x="0" y="49" width="191" height="49"/>
<SubTexture name="grey_button07.png" x="195" y="0" width="49" height="49"/>
<SubTexture name="grey_button08.png" x="240" y="49" width="49" height="49"/>
<SubTexture name="grey_button09.png" x="98" y="433" width="49" height="45"/>
<SubTexture name="grey_button10.png" x="191" y="49" width="49" height="49"/>
<SubTexture name="grey_button11.png" x="0" y="433" width="49" height="45"/>
<SubTexture name="grey_button12.png" x="244" y="0" width="49" height="49"/>
<SubTexture name="grey_button13.png" x="49" y="433" width="49" height="45"/>
<SubTexture name="grey_button14.png" x="0" y="384" width="190" height="49"/>
<SubTexture name="grey_button15.png" x="0" y="237" width="190" height="49"/>
<SubTexture name="grey_checkmarkGrey.png" x="99" y="478" width="21" height="20"/>
<SubTexture name="grey_checkmarkWhite.png" x="78" y="478" width="21" height="20"/>
<SubTexture name="grey_circle.png" x="185" y="469" width="36" height="36"/>
<SubTexture name="grey_crossGrey.png" x="120" y="478" width="18" height="18"/>
<SubTexture name="grey_crossWhite.png" x="190" y="318" width="18" height="18"/>
<SubTexture name="grey_panel.png" x="190" y="98" width="100" height="100"/>
<SubTexture name="grey_sliderDown.png" x="190" y="234" width="28" height="42"/>
<SubTexture name="grey_sliderEnd.png" x="138" y="478" width="8" height="10"/>
<SubTexture name="grey_sliderHorizontal.png" x="0" y="380" width="190" height="4"/>
<SubTexture name="grey_sliderLeft.png" x="0" y="478" width="39" height="31"/>
<SubTexture name="grey_sliderRight.png" x="39" y="478" width="39" height="31"/>
<SubTexture name="grey_sliderUp.png" x="190" y="276" width="28" height="42"/>
<SubTexture name="grey_sliderVertical.png" x="208" y="318" width="4" height="100"/>
<SubTexture name="grey_tickGrey.png" x="190" y="336" width="17" height="17"/>
<SubTexture name="grey_tickWhite.png" x="190" y="353" width="17" height="17"/>
</TextureAtlas>

View File

@@ -0,0 +1,11 @@
# {project_name}
Generated by [Rojo](https://github.com/rojo-rbx/rojo) {rojo_version}.
## Getting Started
To build this library, use:
```bash
rojo build -o "{project_name}.rbxmx"
```
For more help, check out [the Rojo documentation](https://rojo.space/docs).

View File

@@ -0,0 +1,6 @@
{
"name": "{project_name}",
"tree": {
"$path": "src"
}
}

View File

@@ -0,0 +1,5 @@
# Roblox Studio lock files
/*.rbxlx.lock
/*.rbxl.lock
sourcemap.json

View File

@@ -0,0 +1,5 @@
return {
hello = function()
print("Hello world, from {project_name}!")
end,
}

View File

@@ -0,0 +1,17 @@
# {project_name}
Generated by [Rojo](https://github.com/rojo-rbx/rojo) {rojo_version}.
## Getting Started
To build the place from scratch, use:
```bash
rojo build -o "{project_name}.rbxlx"
```
Next, open `{project_name}.rbxlx` in Roblox Studio and start the Rojo server:
```bash
rojo serve
```
For more help, check out [the Rojo documentation](https://rojo.space/docs).

View File

@@ -1,41 +1,29 @@
{
"name": "[placeholder]",
"name": "{project_name}",
"tree": {
"$className": "DataModel",
"HttpService": {
"$className": "HttpService",
"$properties": {
"HttpEnabled": true
}
},
"Lighting": {
"$className": "Lighting",
"$properties": {
"Ambient": [
0,
0,
0
],
"Brightness": 2,
"GlobalShadows": true,
"Outlines": false,
"Technology": "Voxel"
}
},
"ReplicatedStorage": {
"$className": "ReplicatedStorage",
"Source": {
"$path": "src"
"Shared": {
"$path": "src/shared"
}
},
"SoundService": {
"$className": "SoundService",
"$properties": {
"RespectFilteringEnabled": true
"ServerScriptService": {
"Server": {
"$path": "src/server"
}
},
"StarterPlayer": {
"StarterPlayerScripts": {
"Client": {
"$path": "src/client"
}
}
},
"Workspace": {
"$className": "Workspace",
"$properties": {
"FilteringEnabled": true
},
@@ -61,6 +49,24 @@
]
}
}
},
"Lighting": {
"$properties": {
"Ambient": [
0,
0,
0
],
"Brightness": 2,
"GlobalShadows": true,
"Outlines": false,
"Technology": "Voxel"
}
},
"SoundService": {
"$properties": {
"RespectFilteringEnabled": true
}
}
}
}

View File

@@ -0,0 +1,8 @@
# Project place file
/{project_name}.rbxlx
# Roblox Studio lock files
/*.rbxlx.lock
/*.rbxl.lock
sourcemap.json

View File

@@ -0,0 +1 @@
print("Hello world, from client!")

View File

@@ -0,0 +1 @@
print("Hello world, from server!")

View File

@@ -0,0 +1,3 @@
return function()
print("Hello, world!")
end

View File

@@ -0,0 +1,17 @@
# {project_name}
Generated by [Rojo](https://github.com/rojo-rbx/rojo) {rojo_version}.
## Getting Started
To build this plugin to your local plugins folder, use:
```bash
rojo build -p "{project_name}.rbxm"
```
You can include the `watch` flag to re-build it on save:
```bash
rojo build -p "{project_name}.rbxm" --watch
```
For more help, check out [the Rojo documentation](https://rojo.space/docs).

View File

@@ -0,0 +1,6 @@
{
"name": "{project_name}",
"tree": {
"$path": "src"
}
}

View File

@@ -0,0 +1,5 @@
# Plugin model files
/{project_name}.rbxmx
/{project_name}.rbxm
sourcemap.json

View File

@@ -0,0 +1 @@
print("Hello world, from plugin!")

BIN
assets/test-folder.rbxm Normal file

Binary file not shown.

44
benches/build.rs Normal file
View File

@@ -0,0 +1,44 @@
use std::path::Path;
use criterion::{criterion_group, criterion_main, BatchSize, Criterion};
use tempfile::{tempdir, TempDir};
use librojo::cli::BuildCommand;
pub fn benchmark_small_place(c: &mut Criterion) {
bench_build_place(c, "Small Place", "test-projects/benchmark_small_place")
}
criterion_group!(benches, benchmark_small_place);
criterion_main!(benches);
fn bench_build_place(c: &mut Criterion, name: &str, path: &str) {
let mut group = c.benchmark_group(name);
// 'rojo build' generally takes a fair bit of time to execute.
group.sample_size(10);
group.bench_function("build", |b| {
b.iter_batched(
|| place_setup(path),
|(_dir, options)| options.run().unwrap(),
BatchSize::SmallInput,
)
});
group.finish();
}
fn place_setup<P: AsRef<Path>>(input_path: P) -> (TempDir, BuildCommand) {
let dir = tempdir().unwrap();
let input = input_path.as_ref().to_path_buf();
let output = Some(dir.path().join("output.rbxlx"));
let options = BuildCommand {
project: input,
watch: false,
plugin: None,
output,
};
(dir, options)
}

View File

@@ -1,21 +0,0 @@
#!/bin/sh
# Copies a project from 'test-projects' into a folder that can be messed with
# without accidentally checking the results into version control.
set -e
if [ ! -d "test-projects/$1" ]
then
echo "Pick a project that exists!"
exit 1
fi
if [ -d "scratch-project/$1" ]
then
rm -rf "scratch-project/$1"
fi
mkdir -p scratch-project
cp -r "test-projects/$1" scratch-project
cargo run -- serve "scratch-project/$1"

87
build.rs Normal file
View File

@@ -0,0 +1,87 @@
use std::{
env, io,
path::{Path, PathBuf},
};
use fs_err as fs;
use fs_err::File;
use maplit::hashmap;
use memofs::VfsSnapshot;
use semver::Version;
fn snapshot_from_fs_path(path: &Path) -> io::Result<VfsSnapshot> {
println!("cargo:rerun-if-changed={}", path.display());
if path.is_dir() {
let mut children = Vec::new();
for entry in fs::read_dir(path)? {
let entry = entry?;
let file_name = entry.file_name().to_str().unwrap().to_owned();
if file_name.starts_with(".git") {
continue;
}
// We can skip any TestEZ test files since they aren't necessary for
// the plugin to run.
if file_name.ends_with(".spec.lua") || file_name.ends_with(".spec.luau") {
continue;
}
let child_snapshot = snapshot_from_fs_path(&entry.path())?;
children.push((file_name, child_snapshot));
}
Ok(VfsSnapshot::dir(children))
} else {
let content = fs::read_to_string(path)?;
Ok(VfsSnapshot::file(content))
}
}
fn main() -> Result<(), anyhow::Error> {
let out_dir = env::var_os("OUT_DIR").unwrap();
let root_dir = PathBuf::from(env::var_os("CARGO_MANIFEST_DIR").unwrap());
let plugin_dir = root_dir.join("plugin");
let templates_dir = root_dir.join("assets").join("project-templates");
let our_version = Version::parse(env::var_os("CARGO_PKG_VERSION").unwrap().to_str().unwrap())?;
let plugin_version =
Version::parse(fs::read_to_string(plugin_dir.join("Version.txt"))?.trim())?;
assert_eq!(
our_version, plugin_version,
"plugin version does not match Cargo version"
);
let template_snapshot = snapshot_from_fs_path(&templates_dir)?;
let plugin_snapshot = VfsSnapshot::dir(hashmap! {
"default.project.json" => snapshot_from_fs_path(&root_dir.join("plugin.project.json"))?,
"plugin" => VfsSnapshot::dir(hashmap! {
"fmt" => snapshot_from_fs_path(&plugin_dir.join("fmt"))?,
"http" => snapshot_from_fs_path(&plugin_dir.join("http"))?,
"log" => snapshot_from_fs_path(&plugin_dir.join("log"))?,
"rbx_dom_lua" => snapshot_from_fs_path(&plugin_dir.join("rbx_dom_lua"))?,
"src" => snapshot_from_fs_path(&plugin_dir.join("src"))?,
"Packages" => snapshot_from_fs_path(&plugin_dir.join("Packages"))?,
"Version.txt" => snapshot_from_fs_path(&plugin_dir.join("Version.txt"))?,
}),
});
let template_file = File::create(Path::new(&out_dir).join("templates.bincode"))?;
let plugin_file = File::create(Path::new(&out_dir).join("plugin.bincode"))?;
bincode::serialize_into(plugin_file, &plugin_snapshot)?;
bincode::serialize_into(template_file, &template_snapshot)?;
println!("cargo:rerun-if-changed=build/windows/rojo-manifest.rc");
println!("cargo:rerun-if-changed=build/windows/rojo.manifest");
embed_resource::compile("build/windows/rojo-manifest.rc");
Ok(())
}

View File

@@ -0,0 +1,2 @@
#define RT_MANIFEST 24
1 RT_MANIFEST "rojo.manifest"

View File

@@ -0,0 +1,8 @@
<?xml version='1.0' encoding='utf-8' standalone='yes'?>
<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0">
<application xmlns="urn:schemas-microsoft-com:asm.v3">
<windowsSettings xmlns:ws2="http://schemas.microsoft.com/SMI/2016/WindowsSettings">
<ws2:longPathAware>true</ws2:longPathAware>
</windowsSettings>
</application>
</assembly>

View File

@@ -0,0 +1,32 @@
# memofs Changelog
## Unreleased Changes
## 0.3.1 (2025-11-27)
* Added `Vfs::exists`. [#1169]
* Added `create_dir` and `create_dir_all` to allow creating directories. [#937]
[#1169]: https://github.com/rojo-rbx/rojo/pull/1169
[#937]: https://github.com/rojo-rbx/rojo/pull/937
## 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]
[#830]: https://github.com/rojo-rbx/rojo/pull/830
[#854]: https://github.com/rojo-rbx/rojo/pull/854
## 0.2.0 (2021-08-23)
* Updated to `crossbeam-channel` 0.5.1.
## 0.1.3 (2020-11-19)
* Added `set_watch_enabled` to `Vfs` and `VfsLock` to allow turning off file watching.
## 0.1.2 (2020-03-29)
* `VfsSnapshot` now implements Serde's `Serialize` and `Deserialize` traits.
## 0.1.1 (2020-03-18)
* Improved error messages using the [fs-err](https://crates.io/crates/fs-err) crate.
## 0.1.0 (2020-03-10)
* Initial release

21
crates/memofs/Cargo.toml Normal file
View File

@@ -0,0 +1,21 @@
[package]
name = "memofs"
description = "Virtual filesystem with configurable backends."
version = "0.3.1"
authors = [
"Lucien Greathouse <me@lpghatguy.com>",
"Micah Reid <git@dekkonot.com>",
"Ken Loeffler <kenloef@gmail.com>",
]
edition = "2018"
readme = "README.md"
license = "MIT"
homepage = "https://github.com/rojo-rbx/rojo/tree/master/memofs"
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
[dependencies]
crossbeam-channel = "0.5.12"
fs-err = "2.11.0"
notify = "4.0.17"
serde = { version = "1.0.197", features = ["derive"] }

View File

@@ -0,0 +1,7 @@
Copyright 2020 The Rojo Developers
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

22
crates/memofs/README.md Normal file
View File

@@ -0,0 +1,22 @@
# memofs
[![Crates.io](https://img.shields.io/crates/v/memofs.svg)](https://crates.io/crates/memofs)
Implementation of a virtual filesystem with a configurable backend and file
watching.
memofs is currently an unstable minimum viable library. Its primary consumer is
[Rojo](https://github.com/rojo-rbx/rojo), a build system for Roblox.
### Current Features
* API similar to `std::fs`
* Configurable backends
* `StdBackend`, which uses `std::fs` and the `notify` crate
* `NoopBackend`, which always throws errors
* `InMemoryFs`, a simple in-memory filesystem useful for testing
### Future Features
* Hash-based hierarchical memoization keys (hence the name)
* Configurable caching (write-through, write-around, write-back)
## License
memofs is available under the terms of the MIT license. See [LICENSE.txt](LICENSE.txt) or <https://opensource.org/licenses/MIT> for more details.

7
crates/memofs/README.tpl Normal file
View File

@@ -0,0 +1,7 @@
# {{crate}}
[![Crates.io](https://img.shields.io/crates/v/memofs.svg)](https://crates.io/crates/memofs)
{{readme}}
## License
memofs is available under the terms of the MIT license. See [LICENSE.txt](LICENSE.txt) or <https://opensource.org/licenses/MIT> for more details.

View File

@@ -0,0 +1,269 @@
use std::collections::{BTreeSet, HashMap, VecDeque};
use std::io;
use std::path::{Path, PathBuf};
use std::sync::{Arc, Mutex};
use crossbeam_channel::{Receiver, Sender};
use crate::{DirEntry, Metadata, ReadDir, VfsBackend, VfsEvent, VfsSnapshot};
/// In-memory filesystem that can be used as a VFS backend.
///
/// Internally reference counted to enable giving a copy to
/// [`Vfs`](struct.Vfs.html) and keeping the original to mutate the filesystem's
/// state with.
#[derive(Debug, Clone)]
pub struct InMemoryFs {
inner: Arc<Mutex<InMemoryFsInner>>,
}
impl InMemoryFs {
/// Create a new empty `InMemoryFs`.
pub fn new() -> Self {
Self {
inner: Arc::new(Mutex::new(InMemoryFsInner::new())),
}
}
/// Load a [`VfsSnapshot`](enum.VfsSnapshot.html) into a subtree of the
/// in-memory filesystem.
///
/// This function will return an error if the operations required to apply
/// the snapshot result in errors, like trying to create a file inside a
/// file.
pub fn load_snapshot<P: Into<PathBuf>>(
&mut self,
path: P,
snapshot: VfsSnapshot,
) -> io::Result<()> {
let mut inner = self.inner.lock().unwrap();
inner.load_snapshot(path.into(), snapshot)
}
/// Raises a filesystem change event.
///
/// If this `InMemoryFs` is being used as the backend of a
/// [`Vfs`](struct.Vfs.html), then any listeners be notified of this event.
pub fn raise_event(&mut self, event: VfsEvent) {
let inner = self.inner.lock().unwrap();
inner.event_sender.send(event).unwrap();
}
}
impl Default for InMemoryFs {
fn default() -> Self {
Self::new()
}
}
#[derive(Debug)]
struct InMemoryFsInner {
entries: HashMap<PathBuf, Entry>,
orphans: BTreeSet<PathBuf>,
event_receiver: Receiver<VfsEvent>,
event_sender: Sender<VfsEvent>,
}
impl InMemoryFsInner {
fn new() -> Self {
let (event_sender, event_receiver) = crossbeam_channel::unbounded();
Self {
entries: HashMap::new(),
orphans: BTreeSet::new(),
event_receiver,
event_sender,
}
}
fn load_snapshot(&mut self, path: PathBuf, snapshot: VfsSnapshot) -> io::Result<()> {
if let Some(parent_path) = path.parent() {
if let Some(parent_entry) = self.entries.get_mut(parent_path) {
if let Entry::Dir { children } = parent_entry {
children.insert(path.clone());
} else {
return must_be_dir(parent_path);
}
} else {
self.orphans.insert(path.clone());
}
} else {
self.orphans.insert(path.clone());
}
match snapshot {
VfsSnapshot::File { contents } => {
self.entries.insert(path, Entry::File { contents });
}
VfsSnapshot::Dir { children } => {
self.entries.insert(
path.clone(),
Entry::Dir {
children: BTreeSet::new(),
},
);
for (child_name, child) in children {
let full_path = path.join(child_name);
self.load_snapshot(full_path, child)?;
}
}
}
Ok(())
}
fn remove(&mut self, root_path: PathBuf) {
self.orphans.remove(&root_path);
let mut to_remove = VecDeque::new();
to_remove.push_back(root_path);
while let Some(path) = to_remove.pop_front() {
if let Some(Entry::Dir { children }) = self.entries.remove(&path) {
to_remove.extend(children);
}
}
}
}
#[derive(Debug)]
enum Entry {
File { contents: Vec<u8> },
Dir { children: BTreeSet<PathBuf> },
}
impl VfsBackend for InMemoryFs {
fn read(&mut self, path: &Path) -> io::Result<Vec<u8>> {
let inner = self.inner.lock().unwrap();
match inner.entries.get(path) {
Some(Entry::File { contents }) => Ok(contents.clone()),
Some(Entry::Dir { .. }) => must_be_file(path),
None => not_found(path),
}
}
fn write(&mut self, path: &Path, data: &[u8]) -> io::Result<()> {
let mut inner = self.inner.lock().unwrap();
inner.load_snapshot(
path.to_path_buf(),
VfsSnapshot::File {
contents: data.to_owned(),
},
)
}
fn exists(&mut self, path: &Path) -> io::Result<bool> {
let inner = self.inner.lock().unwrap();
Ok(inner.entries.contains_key(path))
}
fn read_dir(&mut self, path: &Path) -> io::Result<ReadDir> {
let inner = self.inner.lock().unwrap();
match inner.entries.get(path) {
Some(Entry::Dir { children }) => {
let iter = children
.clone()
.into_iter()
.map(|path| Ok(DirEntry { path }));
Ok(ReadDir {
inner: Box::new(iter),
})
}
Some(Entry::File { .. }) => must_be_dir(path),
None => not_found(path),
}
}
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();
match inner.entries.get(path) {
Some(Entry::File { .. }) => {
inner.remove(path.to_owned());
Ok(())
}
Some(Entry::Dir { .. }) => must_be_file(path),
None => not_found(path),
}
}
fn remove_dir_all(&mut self, path: &Path) -> io::Result<()> {
let mut inner = self.inner.lock().unwrap();
match inner.entries.get(path) {
Some(Entry::Dir { .. }) => {
inner.remove(path.to_owned());
Ok(())
}
Some(Entry::File { .. }) => must_be_dir(path),
None => not_found(path),
}
}
fn metadata(&mut self, path: &Path) -> io::Result<Metadata> {
let inner = self.inner.lock().unwrap();
match inner.entries.get(path) {
Some(Entry::File { .. }) => Ok(Metadata { is_file: true }),
Some(Entry::Dir { .. }) => Ok(Metadata { is_file: false }),
None => not_found(path),
}
}
fn event_receiver(&self) -> crossbeam_channel::Receiver<VfsEvent> {
let inner = self.inner.lock().unwrap();
inner.event_receiver.clone()
}
fn watch(&mut self, _path: &Path) -> io::Result<()> {
Ok(())
}
fn unwatch(&mut self, _path: &Path) -> io::Result<()> {
Ok(())
}
}
fn must_be_file<T>(path: &Path) -> io::Result<T> {
Err(io::Error::other(format!(
"path {} was a directory, but must be a file",
path.display()
)))
}
fn must_be_dir<T>(path: &Path) -> io::Result<T> {
Err(io::Error::other(format!(
"path {} was a file, but must be a directory",
path.display()
)))
}
fn not_found<T>(path: &Path) -> io::Result<T> {
Err(io::Error::new(
io::ErrorKind::NotFound,
format!("path {} not found", path.display()),
))
}

574
crates/memofs/src/lib.rs Normal file
View File

@@ -0,0 +1,574 @@
/*!
Implementation of a virtual filesystem with a configurable backend and file
watching.
memofs is currently an unstable minimum viable library. Its primary consumer is
[Rojo](https://github.com/rojo-rbx/rojo), a build system for Roblox.
## Current Features
* API similar to `std::fs`
* Configurable backends
* `StdBackend`, which uses `std::fs` and the `notify` crate
* `NoopBackend`, which always throws errors
* `InMemoryFs`, a simple in-memory filesystem useful for testing
## Future Features
* Hash-based hierarchical memoization keys (hence the name)
* Configurable caching (write-through, write-around, write-back)
*/
mod in_memory_fs;
mod noop_backend;
mod snapshot;
mod std_backend;
use std::path::{Path, PathBuf};
use std::sync::{Arc, Mutex, MutexGuard};
use std::{io, str};
pub use in_memory_fs::InMemoryFs;
pub use noop_backend::NoopBackend;
pub use snapshot::VfsSnapshot;
pub use std_backend::StdBackend;
mod sealed {
use super::*;
/// Sealing trait for VfsBackend.
pub trait Sealed {}
impl Sealed for NoopBackend {}
impl Sealed for StdBackend {}
impl Sealed for InMemoryFs {}
}
/// Trait that transforms `io::Result<T>` into `io::Result<Option<T>>`.
///
/// `Ok(None)` takes the place of IO errors whose `io::ErrorKind` is `NotFound`.
pub trait IoResultExt<T> {
fn with_not_found(self) -> io::Result<Option<T>>;
}
impl<T> IoResultExt<T> for io::Result<T> {
fn with_not_found(self) -> io::Result<Option<T>> {
match self {
Ok(v) => Ok(Some(v)),
Err(err) => {
if err.kind() == io::ErrorKind::NotFound {
Ok(None)
} else {
Err(err)
}
}
}
}
}
/// Backend that can be used to create a `Vfs`.
///
/// This trait is sealed and cannot not be implemented outside this crate.
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 exists(&mut self, path: &Path) -> io::Result<bool>;
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<()>;
fn event_receiver(&self) -> crossbeam_channel::Receiver<VfsEvent>;
fn watch(&mut self, path: &Path) -> io::Result<()>;
fn unwatch(&mut self, path: &Path) -> io::Result<()>;
}
/// Vfs equivalent to [`std::fs::DirEntry`][std::fs::DirEntry].
///
/// [std::fs::DirEntry]: https://doc.rust-lang.org/stable/std/fs/struct.DirEntry.html
pub struct DirEntry {
pub(crate) path: PathBuf,
}
impl DirEntry {
pub fn path(&self) -> &Path {
&self.path
}
}
/// Vfs equivalent to [`std::fs::ReadDir`][std::fs::ReadDir].
///
/// [std::fs::ReadDir]: https://doc.rust-lang.org/stable/std/fs/struct.ReadDir.html
pub struct ReadDir {
pub(crate) inner: Box<dyn Iterator<Item = io::Result<DirEntry>>>,
}
impl Iterator for ReadDir {
type Item = io::Result<DirEntry>;
fn next(&mut self) -> Option<Self::Item> {
self.inner.next()
}
}
/// Vfs equivalent to [`std::fs::Metadata`][std::fs::Metadata].
///
/// [std::fs::Metadata]: https://doc.rust-lang.org/stable/std/fs/struct.Metadata.html
#[derive(Debug)]
pub struct Metadata {
pub(crate) is_file: bool,
}
impl Metadata {
pub fn is_file(&self) -> bool {
self.is_file
}
pub fn is_dir(&self) -> bool {
!self.is_file
}
}
/// Represents an event that a filesystem can raise that might need to be
/// handled.
#[derive(Debug)]
#[non_exhaustive]
pub enum VfsEvent {
Create(PathBuf),
Write(PathBuf),
Remove(PathBuf),
}
/// Contains implementation details of the Vfs, wrapped by `Vfs` and `VfsLock`,
/// the public interfaces to this type.
struct VfsInner {
backend: Box<dyn VfsBackend>,
watch_enabled: bool,
}
impl VfsInner {
fn read<P: AsRef<Path>>(&mut self, path: P) -> io::Result<Arc<Vec<u8>>> {
let path = path.as_ref();
let contents = self.backend.read(path)?;
if self.watch_enabled {
self.backend.watch(path)?;
}
Ok(Arc::new(contents))
}
fn read_to_string<P: AsRef<Path>>(&mut self, path: P) -> io::Result<Arc<String>> {
let path = path.as_ref();
let contents = self.backend.read(path)?;
if self.watch_enabled {
self.backend.watch(path)?;
}
let contents_str = str::from_utf8(&contents).map_err(|_| {
io::Error::new(
io::ErrorKind::InvalidData,
format!("File was not valid UTF-8: {}", path.display()),
)
})?;
Ok(Arc::new(contents_str.into()))
}
fn exists<P: AsRef<Path>>(&mut self, path: P) -> io::Result<bool> {
let path = path.as_ref();
self.backend.exists(path)
}
fn write<P: AsRef<Path>, C: AsRef<[u8]>>(&mut self, path: P, contents: C) -> io::Result<()> {
let path = path.as_ref();
let contents = contents.as_ref();
self.backend.write(path, contents)
}
fn read_dir<P: AsRef<Path>>(&mut self, path: P) -> io::Result<ReadDir> {
let path = path.as_ref();
let dir = self.backend.read_dir(path)?;
if self.watch_enabled {
self.backend.watch(path)?;
}
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);
self.backend.remove_file(path)
}
fn remove_dir_all<P: AsRef<Path>>(&mut self, path: P) -> io::Result<()> {
let path = path.as_ref();
let _ = self.backend.unwatch(path);
self.backend.remove_dir_all(path)
}
fn metadata<P: AsRef<Path>>(&mut self, path: P) -> io::Result<Metadata> {
let path = path.as_ref();
self.backend.metadata(path)
}
fn event_receiver(&self) -> crossbeam_channel::Receiver<VfsEvent> {
self.backend.event_receiver()
}
fn commit_event(&mut self, event: &VfsEvent) -> io::Result<()> {
if let VfsEvent::Remove(path) = event {
let _ = self.backend.unwatch(path);
}
Ok(())
}
}
/// A virtual filesystem with a configurable backend.
///
/// All operations on the Vfs take a lock on an internal backend. For performing
/// large batches of operations, it might be more performant to call `lock()`
/// and use [`VfsLock`](struct.VfsLock.html) instead.
pub struct Vfs {
inner: Mutex<VfsInner>,
}
impl Vfs {
/// Creates a new `Vfs` with the default backend, `StdBackend`.
pub fn new_default() -> Self {
Self::new(StdBackend::new())
}
/// Creates a new `Vfs` with the given backend.
pub fn new<B: VfsBackend>(backend: B) -> Self {
let lock = VfsInner {
backend: Box::new(backend),
watch_enabled: true,
};
Self {
inner: Mutex::new(lock),
}
}
/// Manually lock the Vfs, useful for large batches of operations.
pub fn lock(&self) -> VfsLock<'_> {
VfsLock {
inner: self.inner.lock().unwrap(),
}
}
/// Turns automatic file watching on or off. Enabled by default.
///
/// Turning off file watching may be useful for single-use cases, especially
/// on platforms like macOS where registering file watches has significant
/// performance cost.
pub fn set_watch_enabled(&self, enabled: bool) {
let mut inner = self.inner.lock().unwrap();
inner.watch_enabled = enabled;
}
/// Read a file from the VFS, or the underlying backend if it isn't
/// resident.
///
/// Roughly equivalent to [`std::fs::read`][std::fs::read].
///
/// [std::fs::read]: https://doc.rust-lang.org/stable/std/fs/fn.read.html
#[inline]
pub fn read<P: AsRef<Path>>(&self, path: P) -> io::Result<Arc<Vec<u8>>> {
let path = path.as_ref();
self.inner.lock().unwrap().read(path)
}
/// Read a file from the VFS (or from the underlying backend if it isn't
/// resident) into a string.
///
/// Roughly equivalent to [`std::fs::read_to_string`][std::fs::read_to_string].
///
/// [std::fs::read_to_string]: https://doc.rust-lang.org/stable/std/fs/fn.read_to_string.html
#[inline]
pub fn read_to_string<P: AsRef<Path>>(&self, path: P) -> io::Result<Arc<String>> {
let path = path.as_ref();
self.inner.lock().unwrap().read_to_string(path)
}
/// Read a file from the VFS (or the underlying backend if it isn't
/// resident) into a string, and normalize its line endings to LF.
///
/// Roughly equivalent to [`std::fs::read_to_string`][std::fs::read_to_string], but also performs
/// line ending normalization.
///
/// [std::fs::read_to_string]: https://doc.rust-lang.org/stable/std/fs/fn.read_to_string.html
#[inline]
pub fn read_to_string_lf_normalized<P: AsRef<Path>>(&self, path: P) -> io::Result<Arc<String>> {
let path = path.as_ref();
let contents = self.inner.lock().unwrap().read_to_string(path)?;
Ok(contents.replace("\r\n", "\n").into())
}
/// Write a file to the VFS and the underlying backend.
///
/// Roughly equivalent to [`std::fs::write`][std::fs::write].
///
/// [std::fs::write]: https://doc.rust-lang.org/stable/std/fs/fn.write.html
#[inline]
pub fn write<P: AsRef<Path>, C: AsRef<[u8]>>(&self, path: P, contents: C) -> io::Result<()> {
let path = path.as_ref();
let contents = contents.as_ref();
self.inner.lock().unwrap().write(path, contents)
}
/// Read all of the children of a directory.
///
/// Roughly equivalent to [`std::fs::read_dir`][std::fs::read_dir].
///
/// [std::fs::read_dir]: https://doc.rust-lang.org/stable/std/fs/fn.read_dir.html
#[inline]
pub fn read_dir<P: AsRef<Path>>(&self, path: P) -> io::Result<ReadDir> {
let path = path.as_ref();
self.inner.lock().unwrap().read_dir(path)
}
/// Return whether the given path exists.
///
/// Roughly equivalent to [`std::fs::exists`][std::fs::exists].
///
/// [std::fs::exists]: https://doc.rust-lang.org/stable/std/fs/fn.exists.html
#[inline]
pub fn exists<P: AsRef<Path>>(&self, path: P) -> io::Result<bool> {
let path = path.as_ref();
self.inner.lock().unwrap().exists(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].
///
/// [std::fs::remove_file]: https://doc.rust-lang.org/stable/std/fs/fn.remove_file.html
#[inline]
pub fn remove_file<P: AsRef<Path>>(&self, path: P) -> io::Result<()> {
let path = path.as_ref();
self.inner.lock().unwrap().remove_file(path)
}
/// Remove a directory and all of its descendants.
///
/// Roughly equivalent to [`std::fs::remove_dir_all`][std::fs::remove_dir_all].
///
/// [std::fs::remove_dir_all]: https://doc.rust-lang.org/stable/std/fs/fn.remove_dir_all.html
#[inline]
pub fn remove_dir_all<P: AsRef<Path>>(&self, path: P) -> io::Result<()> {
let path = path.as_ref();
self.inner.lock().unwrap().remove_dir_all(path)
}
/// Query metadata about the given path.
///
/// Roughly equivalent to [`std::fs::metadata`][std::fs::metadata].
///
/// [std::fs::metadata]: https://doc.rust-lang.org/stable/std/fs/fn.metadata.html
#[inline]
pub fn metadata<P: AsRef<Path>>(&self, path: P) -> io::Result<Metadata> {
let path = path.as_ref();
self.inner.lock().unwrap().metadata(path)
}
/// Retrieve a handle to the event receiver for this `Vfs`.
#[inline]
pub fn event_receiver(&self) -> crossbeam_channel::Receiver<VfsEvent> {
self.inner.lock().unwrap().event_receiver()
}
/// Commit an event to this `Vfs`.
#[inline]
pub fn commit_event(&self, event: &VfsEvent) -> io::Result<()> {
self.inner.lock().unwrap().commit_event(event)
}
}
/// A locked handle to a [`Vfs`](struct.Vfs.html), created by `Vfs::lock`.
///
/// Implements roughly the same API as [`Vfs`](struct.Vfs.html).
pub struct VfsLock<'a> {
inner: MutexGuard<'a, VfsInner>,
}
impl VfsLock<'_> {
/// Turns automatic file watching on or off. Enabled by default.
///
/// Turning off file watching may be useful for single-use cases, especially
/// on platforms like macOS where registering file watches has significant
/// performance cost.
pub fn set_watch_enabled(&mut self, enabled: bool) {
self.inner.watch_enabled = enabled;
}
/// Read a file from the VFS, or the underlying backend if it isn't
/// resident.
///
/// Roughly equivalent to [`std::fs::read`][std::fs::read].
///
/// [std::fs::read]: https://doc.rust-lang.org/stable/std/fs/fn.read.html
#[inline]
pub fn read<P: AsRef<Path>>(&mut self, path: P) -> io::Result<Arc<Vec<u8>>> {
let path = path.as_ref();
self.inner.read(path)
}
/// Write a file to the VFS and the underlying backend.
///
/// Roughly equivalent to [`std::fs::write`][std::fs::write].
///
/// [std::fs::write]: https://doc.rust-lang.org/stable/std/fs/fn.write.html
#[inline]
pub fn write<P: AsRef<Path>, C: AsRef<[u8]>>(
&mut self,
path: P,
contents: C,
) -> io::Result<()> {
let path = path.as_ref();
let contents = contents.as_ref();
self.inner.write(path, contents)
}
/// Read all of the children of a directory.
///
/// Roughly equivalent to [`std::fs::read_dir`][std::fs::read_dir].
///
/// [std::fs::read_dir]: https://doc.rust-lang.org/stable/std/fs/fn.read_dir.html
#[inline]
pub fn read_dir<P: AsRef<Path>>(&mut self, path: P) -> io::Result<ReadDir> {
let path = path.as_ref();
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].
///
/// [std::fs::remove_file]: https://doc.rust-lang.org/stable/std/fs/fn.remove_file.html
#[inline]
pub fn remove_file<P: AsRef<Path>>(&mut self, path: P) -> io::Result<()> {
let path = path.as_ref();
self.inner.remove_file(path)
}
/// Remove a directory and all of its descendants.
///
/// Roughly equivalent to [`std::fs::remove_dir_all`][std::fs::remove_dir_all].
///
/// [std::fs::remove_dir_all]: https://doc.rust-lang.org/stable/std/fs/fn.remove_dir_all.html
#[inline]
pub fn remove_dir_all<P: AsRef<Path>>(&mut self, path: P) -> io::Result<()> {
let path = path.as_ref();
self.inner.remove_dir_all(path)
}
/// Query metadata about the given path.
///
/// Roughly equivalent to [`std::fs::metadata`][std::fs::metadata].
///
/// [std::fs::metadata]: https://doc.rust-lang.org/stable/std/fs/fn.metadata.html
#[inline]
pub fn metadata<P: AsRef<Path>>(&mut self, path: P) -> io::Result<Metadata> {
let path = path.as_ref();
self.inner.metadata(path)
}
/// Retrieve a handle to the event receiver for this `Vfs`.
#[inline]
pub fn event_receiver(&self) -> crossbeam_channel::Receiver<VfsEvent> {
self.inner.event_receiver()
}
/// Commit an event to this `Vfs`.
#[inline]
pub fn commit_event(&mut self, event: &VfsEvent) -> io::Result<()> {
self.inner.commit_event(event)
}
}
#[cfg(test)]
mod test {
use crate::{InMemoryFs, Vfs, VfsSnapshot};
/// https://github.com/rojo-rbx/rojo/issues/899
#[test]
fn read_to_string_lf_normalized_keeps_trailing_newline() {
let mut imfs = InMemoryFs::new();
imfs.load_snapshot("test", VfsSnapshot::file("bar\r\nfoo\r\n\r\n"))
.unwrap();
let vfs = Vfs::new(imfs);
assert_eq!(
vfs.read_to_string_lf_normalized("test").unwrap().as_str(),
"bar\nfoo\n\n"
);
}
}

View File

@@ -0,0 +1,70 @@
use std::io;
use std::path::Path;
use crate::{Metadata, ReadDir, VfsBackend, VfsEvent};
/// `VfsBackend` that returns an error on every operation.
#[non_exhaustive]
pub struct NoopBackend;
impl NoopBackend {
pub fn new() -> Self {
Self
}
}
impl VfsBackend for NoopBackend {
fn read(&mut self, _path: &Path) -> io::Result<Vec<u8>> {
Err(io::Error::other("NoopBackend doesn't do anything"))
}
fn write(&mut self, _path: &Path, _data: &[u8]) -> io::Result<()> {
Err(io::Error::other("NoopBackend doesn't do anything"))
}
fn exists(&mut self, _path: &Path) -> io::Result<bool> {
Err(io::Error::other("NoopBackend doesn't do anything"))
}
fn read_dir(&mut self, _path: &Path) -> io::Result<ReadDir> {
Err(io::Error::other("NoopBackend doesn't do anything"))
}
fn create_dir(&mut self, _path: &Path) -> io::Result<()> {
Err(io::Error::other("NoopBackend doesn't do anything"))
}
fn create_dir_all(&mut self, _path: &Path) -> io::Result<()> {
Err(io::Error::other("NoopBackend doesn't do anything"))
}
fn remove_file(&mut self, _path: &Path) -> io::Result<()> {
Err(io::Error::other("NoopBackend doesn't do anything"))
}
fn remove_dir_all(&mut self, _path: &Path) -> io::Result<()> {
Err(io::Error::other("NoopBackend doesn't do anything"))
}
fn metadata(&mut self, _path: &Path) -> io::Result<Metadata> {
Err(io::Error::other("NoopBackend doesn't do anything"))
}
fn event_receiver(&self) -> crossbeam_channel::Receiver<VfsEvent> {
crossbeam_channel::never()
}
fn watch(&mut self, _path: &Path) -> io::Result<()> {
Err(io::Error::other("NoopBackend doesn't do anything"))
}
fn unwatch(&mut self, _path: &Path) -> io::Result<()> {
Err(io::Error::other("NoopBackend doesn't do anything"))
}
}
impl Default for NoopBackend {
fn default() -> Self {
Self::new()
}
}

View File

@@ -0,0 +1,45 @@
use serde::{Deserialize, Serialize};
use std::collections::BTreeMap;
/// A slice of a tree of files. Can be loaded into an
/// [`InMemoryFs`](struct.InMemoryFs.html).
#[derive(Debug, Serialize, Deserialize)]
#[non_exhaustive]
pub enum VfsSnapshot {
File {
contents: Vec<u8>,
},
Dir {
children: BTreeMap<String, VfsSnapshot>,
},
}
impl VfsSnapshot {
pub fn file<C: Into<Vec<u8>>>(contents: C) -> Self {
Self::File {
contents: contents.into(),
}
}
pub fn dir<K: Into<String>, I: IntoIterator<Item = (K, VfsSnapshot)>>(children: I) -> Self {
Self::Dir {
children: children
.into_iter()
.map(|(key, value)| (key.into(), value))
.collect(),
}
}
pub fn empty_file() -> Self {
Self::File {
contents: Vec::new(),
}
}
pub fn empty_dir() -> Self {
Self::Dir {
children: BTreeMap::new(),
}
}
}

View File

@@ -0,0 +1,138 @@
use std::path::{Path, PathBuf};
use std::sync::mpsc;
use std::thread;
use std::time::Duration;
use std::{collections::HashSet, io};
use crossbeam_channel::Receiver;
use notify::{watcher, DebouncedEvent, RecommendedWatcher, RecursiveMode, Watcher};
use crate::{DirEntry, Metadata, ReadDir, VfsBackend, VfsEvent};
/// `VfsBackend` that uses `std::fs` and the `notify` crate.
pub struct StdBackend {
watcher: RecommendedWatcher,
watcher_receiver: Receiver<VfsEvent>,
watches: HashSet<PathBuf>,
}
impl StdBackend {
pub fn new() -> StdBackend {
let (notify_tx, notify_rx) = mpsc::channel();
let watcher = watcher(notify_tx, Duration::from_millis(50)).unwrap();
let (tx, rx) = crossbeam_channel::unbounded();
thread::spawn(move || {
for event in notify_rx {
match event {
DebouncedEvent::Create(path) => {
tx.send(VfsEvent::Create(path))?;
}
DebouncedEvent::Write(path) => {
tx.send(VfsEvent::Write(path))?;
}
DebouncedEvent::Remove(path) => {
tx.send(VfsEvent::Remove(path))?;
}
DebouncedEvent::Rename(from, to) => {
tx.send(VfsEvent::Remove(from))?;
tx.send(VfsEvent::Create(to))?;
}
_ => {}
}
}
Result::<(), crossbeam_channel::SendError<VfsEvent>>::Ok(())
});
Self {
watcher,
watcher_receiver: rx,
watches: HashSet::new(),
}
}
}
impl VfsBackend for StdBackend {
fn read(&mut self, path: &Path) -> io::Result<Vec<u8>> {
fs_err::read(path)
}
fn write(&mut self, path: &Path, data: &[u8]) -> io::Result<()> {
fs_err::write(path, data)
}
fn exists(&mut self, path: &Path) -> io::Result<bool> {
std::fs::exists(path)
}
fn read_dir(&mut self, path: &Path) -> io::Result<ReadDir> {
let entries: Result<Vec<_>, _> = fs_err::read_dir(path)?.collect();
let mut entries = entries?;
entries.sort_by_cached_key(|entry| entry.file_name());
let inner = entries
.into_iter()
.map(|entry| Ok(DirEntry { path: entry.path() }));
Ok(ReadDir {
inner: Box::new(inner),
})
}
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)
}
fn remove_dir_all(&mut self, path: &Path) -> io::Result<()> {
fs_err::remove_dir_all(path)
}
fn metadata(&mut self, path: &Path) -> io::Result<Metadata> {
let inner = fs_err::metadata(path)?;
Ok(Metadata {
is_file: inner.is_file(),
})
}
fn event_receiver(&self) -> crossbeam_channel::Receiver<VfsEvent> {
self.watcher_receiver.clone()
}
fn watch(&mut self, path: &Path) -> io::Result<()> {
if self.watches.contains(path)
|| path
.ancestors()
.any(|ancestor| self.watches.contains(ancestor))
{
Ok(())
} else {
self.watches.insert(path.to_path_buf());
self.watcher
.watch(path, RecursiveMode::Recursive)
.map_err(io::Error::other)
}
}
fn unwatch(&mut self, path: &Path) -> io::Result<()> {
self.watches.remove(path);
self.watcher.unwatch(path).map_err(io::Error::other)
}
}
impl Default for StdBackend {
fn default() -> Self {
Self::new()
}
}

View File

@@ -0,0 +1,10 @@
[package]
name = "rojo-insta-ext"
version = "0.1.0"
authors = ["Lucien Greathouse <me@lpghatguy.com>"]
edition = "2018"
publish = false
[dependencies]
serde = "1.0.197"
serde_yaml = "0.8.26"

View File

@@ -0,0 +1,2 @@
# Rojo Insta Extensions
This crate has add-ons intended for use with Insta that are useful for snapshot tests.

View File

@@ -0,0 +1,3 @@
mod redaction_map;
pub use redaction_map::*;

View File

@@ -0,0 +1,85 @@
use std::collections::HashMap;
use serde::Serialize;
/// Enables redacting any value that serializes as a string.
///
/// Used for transforming Rojo instance IDs into something deterministic.
#[derive(Default)]
pub struct RedactionMap {
ids: HashMap<String, usize>,
last_id: usize,
}
impl RedactionMap {
pub fn get_redacted_value(&self, id: impl ToString) -> Option<String> {
let id = id.to_string();
if self.ids.contains_key(&id) {
Some(id)
} else {
None
}
}
/// Returns the numeric ID that was assigned to the provided value,
/// if one exists.
pub fn get_id_for_value(&self, value: impl ToString) -> Option<usize> {
self.ids.get(&value.to_string()).cloned()
}
pub fn intern(&mut self, id: impl ToString) {
let last_id = &mut self.last_id;
self.ids.entry(id.to_string()).or_insert_with(|| {
*last_id += 1;
*last_id
});
}
pub fn intern_iter<S: ToString>(&mut self, ids: impl Iterator<Item = S>) {
for id in ids {
self.intern(id.to_string());
}
}
pub fn redacted_yaml(&self, value: impl Serialize) -> serde_yaml::Value {
let mut encoded = serde_yaml::to_value(value).expect("Couldn't encode value as YAML");
self.redact(&mut encoded);
encoded
}
pub fn redact(&self, yaml_value: &mut serde_yaml::Value) {
use serde_yaml::{Mapping, Value};
match yaml_value {
Value::String(value) => {
if let Some(redacted) = self.ids.get(value) {
*yaml_value = Value::String(format!("id-{}", *redacted));
}
}
Value::Sequence(sequence) => {
for value in sequence {
self.redact(value);
}
}
Value::Mapping(mapping) => {
// We can't mutate the keys of a map in-place, so we take
// ownership of the map and rebuild it.
let owned_map = std::mem::replace(mapping, Mapping::new());
let mut new_map = Mapping::with_capacity(owned_map.len());
for (mut key, mut value) in owned_map {
self.redact(&mut key);
self.redact(&mut value);
new_map.insert(key, value);
}
*mapping = new_map;
}
_ => {}
}
}
}

View File

@@ -1,13 +0,0 @@
.md-typeset__table {
width: 100%;
}
.feature-image img {
border: 1px solid rgba(0, 0, 0, 0.2);
box-shadow: 1px 1px 4px rgba(0, 0, 0, 0.2);
}
.codehilite {
border: 1px solid rgba(0, 0, 0, 0.2);
box-shadow: 1px 1px 4px rgba(0, 0, 0, 0.2);
}

View File

@@ -1,11 +0,0 @@
**This page is under construction!**
## Summary
* Tools to port existing games are in progress!
* [rbxlx-to-rojo](https://github.com/rojo-rbx/rbxlx-to-rojo)
* `rojo export` ([issue #208](https://github.com/rojo-rbx/rojo/issues/208))
* Can port as much or as little of your game as you like
* Rojo can manage just a slice of your game!
* Some Roblox idioms aren't very well supported
* Redundant copies of scripts don't work well with files
* Having only a couple places with scripts simplifies your project dramatically!

View File

@@ -1,46 +0,0 @@
This is this installation guide for Rojo **0.5.x**.
[TOC]
## Overview
Rojo has two components:
* The command line interface (CLI)
* The Roblox Studio plugin
!!! info
It's important that your installed version of the plugin and CLI are compatible.
The plugin will show errors in the Roblox Studio output window if there is a version mismatch.
## Visual Studio Code Extension
If you use Visual Studio Code, you can install [the Rojo VS Code extension](https://marketplace.visualstudio.com/items?itemName=evaera.vscode-rojo), which will install both halves of Rojo for you. It even has a nifty UI to sync files and start/stop the Rojo server!
## Installing the CLI
### Installing from GitHub
If you're on Windows, there are pre-built binaries available from Rojo's [GitHub Releases page](https://github.com/LPGhatguy/rojo/releases).
The Rojo CLI must be run from the command line, like Terminal.app on MacOS or `cmd.exe` on Windows. It's recommended that you put the Rojo CLI executable on your `PATH` to make this easier.
### Installing from Cargo
If you have Rust installed, the easiest way to get Rojo is with Cargo!
To install the latest 0.5.0 alpha, use:
```sh
cargo install rojo --version 0.5.0-alpha.13
```
## Installing the Plugin
### Installing from GitHub
The Rojo Roblox Studio plugin is available from Rojo's [GitHub Releases page](https://github.com/LPGhatguy/rojo/releases).
Download the attached `rbxm` file and put it into your Roblox Studio plugins folder. You can find that folder by pressing **Plugins Folder** from your Plugins toolbar in Roblox Studio:
!['Plugins Folder' button in Roblox Studio](../images/plugins-folder-in-studio.png)
{: align="center" }
### Installing from Roblox.com
Visit [Rojo's Roblox.com Plugin page](https://www.roblox.com/library/1997686364/Rojo-0-5-0-alpha-3) in Roblox Studio and press **Install**.

View File

@@ -1,63 +0,0 @@
Rojo underwent a large refactor during most of 2018 to enable a bunch of new features and lay groundwork for lots more in 2019. As such, Rojo **0.5.x** projects are not compatible with Rojo **0.4.x** projects.
[TOC]
## Supporting Both 0.4.x and 0.5.x
Rojo 0.5.x uses a different name for its project format. While 0.4.x used `rojo.json`, 0.5.x uses `default.project.json`, which allows them to coexist.
If you aren't sure about upgrading or want to upgrade gradually, it's possible to keep both files in the same project without causing problems.
## Upgrading Your Project File
Project files in 0.5.x are more explicit and flexible than they were in 0.4.x. Project files can now describe models and plugins in addition to places.
This new project file format also guards against two of the biggest pitfalls when writing a config file:
* Using a service as a partition target directly, which often wiped away extra instances
* Defining two partitions that overlapped, which made Rojo act unpredictably
The biggest change is that the `partitions` field has been replaced with a new field, `tree`, that describes the entire hierarchy of your project from the top-down.
A project for 0.4.x that syncs from the `src` directory into `ReplicatedStorage.Source` would look like this:
```json
{
"name": "Rojo 0.4.x Example",
"partitions": {
"path": "src",
"target": "ReplicatedStorage.Source"
}
}
```
In 0.5.x, the project format is more explicit:
```json
{
"name": "Rojo 0.5.x Example",
"tree": {
"$className": "DataModel",
"ReplicatedStorage": {
"$className": "ReplicatedStorage",
"Source": {
"$path": "src"
}
}
}
}
```
For each object in the tree, we define *metadata* and *children*.
Metadata begins with a dollar sign (`$`), like `$className`. This is so that children and metadata can coexist without creating too many nested layers.
All other values are considered children, where the key is the instance's name, and the value is an object, repeating the process.
## Migrating Unknown Files
If you used Rojo to sync in files as `StringValue` objects, you'll need to make sure those files end with the `txt` extension to preserve this in Rojo 0.5.x.
Unknown files are now ignored in Rojo instead of being converted to `StringValue` objects.
## Migrating `init.model.json` files
In Rojo 0.4.x, it's possible to create a file named `init.model.json` that lets you describe a model that becomes the container for all of the other files in the folder, just like `init.lua`.
In Rojo 0.5.x, this feature has been replaced with `init.meta.json` files. See [Sync Details](../reference/sync-details) for more information about these new files.

View File

@@ -1,90 +0,0 @@
[TOC]
## Creating the Rojo Project
To use Rojo to build a game, you'll need to create a new project file, which tells Rojo how to turn your files into a Roblox place.
First, create a new folder to contain the files for your game and open up a new terminal inside of it, like cmd.exe or Bash.
It's convenient to make the folder from the command line:
```sh
mkdir my-new-project
cd my-new-project
```
Inside the folder, initialize a new Rojo project:
```sh
rojo init
```
Rojo will make a small project file in your directory, named `default.project.json`. It matches the "Baseplate" template from Roblox Studio, except that it'll take any files you put in a folder called `src` and put it into `ReplicatedStorage.Source`.
Speaking of files, make sure to create a directory named `src` in this folder, or Rojo will be upset about missing files!
```sh
mkdir src
```
Let's also add a Lua file, `hello.lua` to the `src` folder, so that we can make this project our own.
```sh
echo 'return "Hello, Rojo!"' > src/hello.lua
```
## Building Your Place
Now that we have a project, one thing we can do is build a Roblox place file for our project. This is a great way to get started with a project quickly with no fuss.
All we have to do is call `rojo build`:
```sh
rojo build -o MyNewProject.rbxlx
```
If you open `MyNewProject.rbxlx` in Roblox Studio now, you should see a `Folder` named "Source" containing a `ModuleScript` under `ReplicatedStorage`.
!!! info
To generate a binary place file instead, use `rbxl`. Note that support for binary model/place files (`rbxm` and `rbxl`) is very limited in Rojo presently.
## Live-Syncing into Studio
Building a place file is great for starting to work on a game, but for active iteration, you'll want something faster.
In Roblox Studio, make sure the Rojo plugin is installed. If you need it, check out [the installation guide](../installation) to learn how to install it.
To expose your project to the plugin, you'll need to start a new **live sync session** from the command line:
```sh
rojo serve
```
You should see output like this in your terminal:
```sh
$ rojo serve
Rojo server listening on port 34872
```
Switch into Roblox Studio and press the **Connect** button on the Rojo plugin toolbar. A dialog should appear:
![Rojo plugin connection dialog](../images/connection-dialog.png)
{: class="feature-image" align="center" }
If the port number doesn't match the output from the command line, change it, and then press **Connect**.
If all went well, you should now be able to change files in the `src` directory and watch them sync into Roblox Studio in real time!
## Uploading Your Place
Aimed at teams that want serious levels of automation, Rojo can upload places to Roblox.com automatically.
You'll need an existing game on Roblox.com as well as the `.ROBLOSECURITY` cookie of an account that has write access to that game.
!!! warning
It's recommended that you set up a Roblox account dedicated to deploying your game instead of your personal account in case your security cookie is compromised.
Generating and publishing your game is as simple as:
```sh
rojo upload --asset_id [PLACE ID] --cookie "[SECURITY COOKIE]"
```
An example project is available on GitHub that deploys to Roblox.com from GitHub and Travis-CI automatically: [https://github.com/LPGhatguy/roads](https://github.com/LPGhatguy/roads)

Binary file not shown.

Before

Width:  |  Height:  |  Size: 13 KiB

Some files were not shown because too many files have changed in this diff Show More