mirror of
https://github.com/rojo-rbx/rojo.git
synced 2026-04-25 15:16:07 +00:00
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>
This commit is contained in:
@@ -1,8 +1,12 @@
|
|||||||
# Rojo Changelog
|
# Rojo Changelog
|
||||||
|
|
||||||
## Unreleased Changes
|
## Unreleased Changes
|
||||||
|
* Added support for specifying an address to be used by default in the .project.json file ([#447])
|
||||||
* Added support for the new Open Cloud API when uploading. ([#486])
|
* Added support for the new Open Cloud API when uploading. ([#486])
|
||||||
|
|
||||||
|
[#447]: https://github.com/rojo-rbx/rojo/issues/447
|
||||||
|
[#486]: https://github.com/rojo-rbx/rojo/issues/486
|
||||||
|
|
||||||
## [7.0.0] - December 10, 2021
|
## [7.0.0] - December 10, 2021
|
||||||
* Fixed Rojo's interactions with properties enabled by FFlags that are not yet enabled. ([#493])
|
* Fixed Rojo's interactions with properties enabled by FFlags that are not yet enabled. ([#493])
|
||||||
* Improved output in Roblox Studio plugin when bad property data is encountered.
|
* Improved output in Roblox Studio plugin when bad property data is encountered.
|
||||||
@@ -10,7 +14,6 @@
|
|||||||
* Connection settings are now remembered when reconnecting in Roblox Studio. ([#500])
|
* Connection settings are now remembered when reconnecting in Roblox Studio. ([#500])
|
||||||
* Updated reflection database to Roblox v503.
|
* Updated reflection database to Roblox v503.
|
||||||
|
|
||||||
[#486]: https://github.com/rojo-rbx/rojo/issues/486
|
|
||||||
[#430]: https://github.com/rojo-rbx/rojo/issues/430
|
[#430]: https://github.com/rojo-rbx/rojo/issues/430
|
||||||
[#493]: https://github.com/rojo-rbx/rojo/pull/493
|
[#493]: https://github.com/rojo-rbx/rojo/pull/493
|
||||||
[#500]: https://github.com/rojo-rbx/rojo/pull/500
|
[#500]: https://github.com/rojo-rbx/rojo/pull/500
|
||||||
|
|||||||
@@ -41,7 +41,10 @@ impl ServeCommand {
|
|||||||
|
|
||||||
let session = Arc::new(ServeSession::new(vfs, &project_path)?);
|
let session = Arc::new(ServeSession::new(vfs, &project_path)?);
|
||||||
|
|
||||||
let ip = self.address.unwrap_or(DEFAULT_BIND_ADDRESS.into());
|
let ip = self
|
||||||
|
.address
|
||||||
|
.or_else(|| session.serve_address())
|
||||||
|
.unwrap_or(DEFAULT_BIND_ADDRESS.into());
|
||||||
|
|
||||||
let port = self
|
let port = self
|
||||||
.port
|
.port
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
use std::{
|
use std::{
|
||||||
collections::{BTreeMap, HashMap, HashSet},
|
collections::{BTreeMap, HashMap, HashSet},
|
||||||
fs, io,
|
fs, io,
|
||||||
|
net::IpAddr,
|
||||||
path::{Path, PathBuf},
|
path::{Path, PathBuf},
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -67,6 +68,11 @@ pub struct Project {
|
|||||||
#[serde(skip_serializing_if = "Option::is_none")]
|
#[serde(skip_serializing_if = "Option::is_none")]
|
||||||
pub game_id: Option<u64>,
|
pub game_id: Option<u64>,
|
||||||
|
|
||||||
|
/// If specified, this address will be used in place of the default address
|
||||||
|
/// As long as --address is unprovided.
|
||||||
|
#[serde(skip_serializing_if = "Option::is_none")]
|
||||||
|
pub serve_address: Option<IpAddr>,
|
||||||
|
|
||||||
/// A list of globs, relative to the folder the project file is in, that
|
/// A list of globs, relative to the folder the project file is in, that
|
||||||
/// match files that should be excluded if Rojo encounters them.
|
/// match files that should be excluded if Rojo encounters them.
|
||||||
#[serde(default, skip_serializing_if = "Vec::is_empty")]
|
#[serde(default, skip_serializing_if = "Vec::is_empty")]
|
||||||
|
|||||||
@@ -2,6 +2,7 @@ use std::{
|
|||||||
borrow::Cow,
|
borrow::Cow,
|
||||||
collections::HashSet,
|
collections::HashSet,
|
||||||
io,
|
io,
|
||||||
|
net::IpAddr,
|
||||||
path::{Path, PathBuf},
|
path::{Path, PathBuf},
|
||||||
sync::{Arc, Mutex, MutexGuard},
|
sync::{Arc, Mutex, MutexGuard},
|
||||||
time::Instant,
|
time::Instant,
|
||||||
@@ -212,6 +213,10 @@ impl ServeSession {
|
|||||||
pub fn serve_place_ids(&self) -> Option<&HashSet<u64>> {
|
pub fn serve_place_ids(&self) -> Option<&HashSet<u64>> {
|
||||||
self.root_project.serve_place_ids.as_ref()
|
self.root_project.serve_place_ids.as_ref()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
pub fn serve_address(&self) -> Option<IpAddr> {
|
||||||
|
self.root_project.serve_address
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug, Error)]
|
#[derive(Debug, Error)]
|
||||||
|
|||||||
Reference in New Issue
Block a user