forked from rojo-rbx/rojo
Fold imfs::new back into imfs
This commit is contained in:
@@ -9,7 +9,7 @@ use failure::Fail;
|
|||||||
use rbx_dom_weak::RbxInstanceProperties;
|
use rbx_dom_weak::RbxInstanceProperties;
|
||||||
|
|
||||||
use crate::{
|
use crate::{
|
||||||
imfs::new::{FsError, Imfs, RealFetcher, WatchMode},
|
imfs::{FsError, Imfs, RealFetcher, WatchMode},
|
||||||
snapshot::{apply_patch_set, compute_patch_set, InstancePropertiesWithMeta, RojoTree},
|
snapshot::{apply_patch_set, compute_patch_set, InstancePropertiesWithMeta, RojoTree},
|
||||||
snapshot_middleware::snapshot_from_imfs,
|
snapshot_middleware::snapshot_from_imfs,
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ use failure::Fail;
|
|||||||
use rbx_dom_weak::RbxInstanceProperties;
|
use rbx_dom_weak::RbxInstanceProperties;
|
||||||
|
|
||||||
use crate::{
|
use crate::{
|
||||||
imfs::new::{Imfs, RealFetcher, WatchMode},
|
imfs::{Imfs, RealFetcher, WatchMode},
|
||||||
project::{Project, ProjectLoadError},
|
project::{Project, ProjectLoadError},
|
||||||
serve_session::ServeSession,
|
serve_session::ServeSession,
|
||||||
snapshot::{apply_patch_set, compute_patch_set, InstancePropertiesWithMeta, RojoTree},
|
snapshot::{apply_patch_set, compute_patch_set, InstancePropertiesWithMeta, RojoTree},
|
||||||
|
|||||||
@@ -6,7 +6,7 @@ use reqwest::header::{ACCEPT, CONTENT_TYPE, COOKIE, USER_AGENT};
|
|||||||
|
|
||||||
use crate::{
|
use crate::{
|
||||||
auth_cookie::get_auth_cookie,
|
auth_cookie::get_auth_cookie,
|
||||||
imfs::new::{Imfs, RealFetcher, WatchMode},
|
imfs::{Imfs, RealFetcher, WatchMode},
|
||||||
snapshot::{apply_patch_set, compute_patch_set, InstancePropertiesWithMeta, RojoTree},
|
snapshot::{apply_patch_set, compute_patch_set, InstancePropertiesWithMeta, RojoTree},
|
||||||
snapshot_middleware::snapshot_from_imfs,
|
snapshot_middleware::snapshot_from_imfs,
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -6,12 +6,8 @@ mod real_fetcher;
|
|||||||
mod snapshot;
|
mod snapshot;
|
||||||
|
|
||||||
pub use error::*;
|
pub use error::*;
|
||||||
|
pub use fetcher::*;
|
||||||
pub mod new {
|
pub use imfs::*;
|
||||||
pub use super::error::*;
|
pub use noop_fetcher::*;
|
||||||
pub use super::fetcher::*;
|
pub use real_fetcher::*;
|
||||||
pub use super::imfs::*;
|
pub use snapshot::*;
|
||||||
pub use super::noop_fetcher::*;
|
|
||||||
pub use super::real_fetcher::*;
|
|
||||||
pub use super::snapshot::*;
|
|
||||||
}
|
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ use std::{
|
|||||||
};
|
};
|
||||||
|
|
||||||
use crate::{
|
use crate::{
|
||||||
imfs::new::{Imfs, ImfsFetcher},
|
imfs::{Imfs, ImfsFetcher},
|
||||||
message_queue::MessageQueue,
|
message_queue::MessageQueue,
|
||||||
project::Project,
|
project::Project,
|
||||||
session_id::SessionId,
|
session_id::SessionId,
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ use rbx_dom_weak::{RbxId, RbxTree, RbxValue};
|
|||||||
use serde::Serialize;
|
use serde::Serialize;
|
||||||
|
|
||||||
use crate::{
|
use crate::{
|
||||||
imfs::new::{Imfs, ImfsEntry, ImfsFetcher},
|
imfs::{Imfs, ImfsEntry, ImfsFetcher},
|
||||||
snapshot::InstanceSnapshot,
|
snapshot::InstanceSnapshot,
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -136,7 +136,7 @@ fn convert_localization_csv(contents: &[u8]) -> String {
|
|||||||
mod test {
|
mod test {
|
||||||
use super::*;
|
use super::*;
|
||||||
|
|
||||||
use crate::imfs::new::{ImfsSnapshot, NoopFetcher};
|
use crate::imfs::{ImfsSnapshot, NoopFetcher};
|
||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
fn csv_from_imfs() {
|
fn csv_from_imfs() {
|
||||||
|
|||||||
@@ -3,7 +3,7 @@ use std::{borrow::Cow, collections::HashMap};
|
|||||||
use rbx_dom_weak::{RbxId, RbxTree};
|
use rbx_dom_weak::{RbxId, RbxTree};
|
||||||
|
|
||||||
use crate::{
|
use crate::{
|
||||||
imfs::new::{DirectorySnapshot, Imfs, ImfsEntry, ImfsFetcher, ImfsSnapshot},
|
imfs::{DirectorySnapshot, Imfs, ImfsEntry, ImfsFetcher, ImfsSnapshot},
|
||||||
snapshot::InstanceSnapshot,
|
snapshot::InstanceSnapshot,
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -78,7 +78,7 @@ mod test {
|
|||||||
|
|
||||||
use maplit::hashmap;
|
use maplit::hashmap;
|
||||||
|
|
||||||
use crate::imfs::new::NoopFetcher;
|
use crate::imfs::NoopFetcher;
|
||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
fn empty_folder() {
|
fn empty_folder() {
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ use rbx_reflection::try_resolve_value;
|
|||||||
use serde::Deserialize;
|
use serde::Deserialize;
|
||||||
|
|
||||||
use crate::{
|
use crate::{
|
||||||
imfs::new::{Imfs, ImfsEntry, ImfsFetcher},
|
imfs::{Imfs, ImfsEntry, ImfsFetcher},
|
||||||
snapshot::InstanceSnapshot,
|
snapshot::InstanceSnapshot,
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -136,7 +136,7 @@ mod test {
|
|||||||
use maplit::hashmap;
|
use maplit::hashmap;
|
||||||
use rbx_dom_weak::RbxValue;
|
use rbx_dom_weak::RbxValue;
|
||||||
|
|
||||||
use crate::imfs::new::{ImfsSnapshot, NoopFetcher};
|
use crate::imfs::{ImfsSnapshot, NoopFetcher};
|
||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
fn model_from_imfs() {
|
fn model_from_imfs() {
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ use maplit::hashmap;
|
|||||||
use rbx_dom_weak::{RbxId, RbxTree, RbxValue};
|
use rbx_dom_weak::{RbxId, RbxTree, RbxValue};
|
||||||
|
|
||||||
use crate::{
|
use crate::{
|
||||||
imfs::new::{FsResultExt, Imfs, ImfsEntry, ImfsFetcher},
|
imfs::{FsResultExt, Imfs, ImfsEntry, ImfsFetcher},
|
||||||
snapshot::InstanceSnapshot,
|
snapshot::InstanceSnapshot,
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -141,7 +141,7 @@ mod test {
|
|||||||
|
|
||||||
use maplit::hashmap;
|
use maplit::hashmap;
|
||||||
|
|
||||||
use crate::imfs::new::{ImfsSnapshot, NoopFetcher};
|
use crate::imfs::{ImfsSnapshot, NoopFetcher};
|
||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
fn module_from_imfs() {
|
fn module_from_imfs() {
|
||||||
|
|||||||
@@ -3,10 +3,7 @@ use std::path::{Path, PathBuf};
|
|||||||
use rbx_dom_weak::{RbxId, RbxTree};
|
use rbx_dom_weak::{RbxId, RbxTree};
|
||||||
|
|
||||||
use crate::{
|
use crate::{
|
||||||
imfs::{
|
imfs::{FsResult, Imfs, ImfsEntry, ImfsFetcher, ImfsSnapshot},
|
||||||
new::{Imfs, ImfsEntry, ImfsFetcher, ImfsSnapshot},
|
|
||||||
FsResult,
|
|
||||||
},
|
|
||||||
snapshot::InstanceSnapshot,
|
snapshot::InstanceSnapshot,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -28,7 +28,7 @@ use self::{
|
|||||||
rbxmx::SnapshotRbxmx,
|
rbxmx::SnapshotRbxmx,
|
||||||
txt::SnapshotTxt,
|
txt::SnapshotTxt,
|
||||||
};
|
};
|
||||||
use crate::imfs::new::{Imfs, ImfsEntry, ImfsFetcher};
|
use crate::imfs::{Imfs, ImfsEntry, ImfsFetcher};
|
||||||
|
|
||||||
macro_rules! middlewares {
|
macro_rules! middlewares {
|
||||||
( $($middleware: ident,)* ) => {
|
( $($middleware: ident,)* ) => {
|
||||||
|
|||||||
@@ -4,10 +4,7 @@ use rbx_dom_weak::{RbxId, RbxTree};
|
|||||||
use rbx_reflection::try_resolve_value;
|
use rbx_reflection::try_resolve_value;
|
||||||
|
|
||||||
use crate::{
|
use crate::{
|
||||||
imfs::{
|
imfs::{FsErrorKind, Imfs, ImfsEntry, ImfsFetcher},
|
||||||
new::{Imfs, ImfsEntry, ImfsFetcher},
|
|
||||||
FsErrorKind,
|
|
||||||
},
|
|
||||||
project::{Project, ProjectNode},
|
project::{Project, ProjectNode},
|
||||||
snapshot::{InstanceMetadata, InstanceSnapshot},
|
snapshot::{InstanceMetadata, InstanceSnapshot},
|
||||||
};
|
};
|
||||||
@@ -146,7 +143,7 @@ mod test {
|
|||||||
use maplit::hashmap;
|
use maplit::hashmap;
|
||||||
use rbx_dom_weak::RbxValue;
|
use rbx_dom_weak::RbxValue;
|
||||||
|
|
||||||
use crate::imfs::new::{ImfsSnapshot, NoopFetcher};
|
use crate::imfs::{ImfsSnapshot, NoopFetcher};
|
||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
fn project_from_folder() {
|
fn project_from_folder() {
|
||||||
|
|||||||
@@ -3,7 +3,7 @@ use std::{borrow::Cow, collections::HashMap};
|
|||||||
use rbx_dom_weak::{RbxId, RbxInstanceProperties, RbxTree};
|
use rbx_dom_weak::{RbxId, RbxInstanceProperties, RbxTree};
|
||||||
|
|
||||||
use crate::{
|
use crate::{
|
||||||
imfs::new::{Imfs, ImfsEntry, ImfsFetcher},
|
imfs::{Imfs, ImfsEntry, ImfsFetcher},
|
||||||
snapshot::InstanceSnapshot,
|
snapshot::InstanceSnapshot,
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -66,7 +66,7 @@ impl SnapshotMiddleware for SnapshotRbxm {
|
|||||||
mod test {
|
mod test {
|
||||||
use super::*;
|
use super::*;
|
||||||
|
|
||||||
use crate::imfs::new::{ImfsSnapshot, NoopFetcher};
|
use crate::imfs::{ImfsSnapshot, NoopFetcher};
|
||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
fn model_from_imfs() {
|
fn model_from_imfs() {
|
||||||
|
|||||||
@@ -3,7 +3,7 @@ use std::borrow::Cow;
|
|||||||
use rbx_dom_weak::{RbxId, RbxTree};
|
use rbx_dom_weak::{RbxId, RbxTree};
|
||||||
|
|
||||||
use crate::{
|
use crate::{
|
||||||
imfs::new::{Imfs, ImfsEntry, ImfsFetcher},
|
imfs::{Imfs, ImfsEntry, ImfsFetcher},
|
||||||
snapshot::InstanceSnapshot,
|
snapshot::InstanceSnapshot,
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -64,7 +64,7 @@ mod test {
|
|||||||
|
|
||||||
use std::collections::HashMap;
|
use std::collections::HashMap;
|
||||||
|
|
||||||
use crate::imfs::new::{ImfsSnapshot, NoopFetcher};
|
use crate::imfs::{ImfsSnapshot, NoopFetcher};
|
||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
fn model_from_imfs() {
|
fn model_from_imfs() {
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ use maplit::hashmap;
|
|||||||
use rbx_dom_weak::{RbxId, RbxTree, RbxValue};
|
use rbx_dom_weak::{RbxId, RbxTree, RbxValue};
|
||||||
|
|
||||||
use crate::{
|
use crate::{
|
||||||
imfs::new::{FileSnapshot, Imfs, ImfsEntry, ImfsFetcher, ImfsSnapshot},
|
imfs::{FileSnapshot, Imfs, ImfsEntry, ImfsFetcher, ImfsSnapshot},
|
||||||
snapshot::InstanceSnapshot,
|
snapshot::InstanceSnapshot,
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -94,7 +94,7 @@ mod test {
|
|||||||
use maplit::hashmap;
|
use maplit::hashmap;
|
||||||
use rbx_dom_weak::RbxInstanceProperties;
|
use rbx_dom_weak::RbxInstanceProperties;
|
||||||
|
|
||||||
use crate::imfs::new::NoopFetcher;
|
use crate::imfs::NoopFetcher;
|
||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
fn instance_from_imfs() {
|
fn instance_from_imfs() {
|
||||||
|
|||||||
@@ -9,7 +9,7 @@ use hyper::{service::Service, Body, Method, Request, StatusCode};
|
|||||||
use rbx_dom_weak::RbxId;
|
use rbx_dom_weak::RbxId;
|
||||||
|
|
||||||
use crate::{
|
use crate::{
|
||||||
imfs::new::ImfsFetcher,
|
imfs::ImfsFetcher,
|
||||||
serve_session::ServeSession,
|
serve_session::ServeSession,
|
||||||
web::{
|
web::{
|
||||||
interface::{
|
interface::{
|
||||||
|
|||||||
@@ -12,7 +12,7 @@ use futures::{
|
|||||||
use hyper::{service::Service, Body, Request, Response, Server};
|
use hyper::{service::Service, Body, Request, Response, Server};
|
||||||
use log::trace;
|
use log::trace;
|
||||||
|
|
||||||
use crate::{imfs::new::ImfsFetcher, serve_session::ServeSession};
|
use crate::{imfs::ImfsFetcher, serve_session::ServeSession};
|
||||||
|
|
||||||
use self::{api::ApiService, ui::UiService};
|
use self::{api::ApiService, ui::UiService};
|
||||||
|
|
||||||
|
|||||||
@@ -7,7 +7,7 @@ use hyper::{header, service::Service, Body, Method, Request, Response, StatusCod
|
|||||||
use ritz::html;
|
use ritz::html;
|
||||||
|
|
||||||
use crate::{
|
use crate::{
|
||||||
imfs::new::ImfsFetcher,
|
imfs::ImfsFetcher,
|
||||||
serve_session::ServeSession,
|
serve_session::ServeSession,
|
||||||
web::{
|
web::{
|
||||||
interface::{ErrorResponse, SERVER_VERSION},
|
interface::{ErrorResponse, SERVER_VERSION},
|
||||||
|
|||||||
Reference in New Issue
Block a user