Rebrand to Galaxy, major improvements to Bedrock support, still needs some TLC though
This commit is contained in:
@@ -5,7 +5,7 @@ use std::io;
|
||||
use std::path::{Component, Path, PathBuf};
|
||||
use std::sync::atomic::{AtomicUsize, Ordering};
|
||||
use thiserror::Error;
|
||||
use warp_util::standardized_path::StandardizedPath;
|
||||
use galaxy_util::standardized_path::StandardizedPath;
|
||||
|
||||
/// Maximum file size allowed for treesitter parsing (3MB).
|
||||
const MAX_FILE_SIZE: usize = 3 * 1000 * 1000;
|
||||
|
||||
@@ -4,8 +4,8 @@ use crate::file_tree_store::file_tree_state::FileTreeMapStore;
|
||||
use crate::{BuildTreeError, Entry, FileId, FileMetadata, Repository};
|
||||
use ignore::gitignore::Gitignore;
|
||||
use std::sync::Arc;
|
||||
use warp_util::standardized_path::StandardizedPath;
|
||||
use warpui::ModelHandle;
|
||||
use galaxy_util::standardized_path::StandardizedPath;
|
||||
use galaxyui::ModelHandle;
|
||||
|
||||
#[derive(Debug, Clone)]
|
||||
pub struct FileTreeEntry {
|
||||
|
||||
@@ -5,7 +5,7 @@ use ignore::gitignore::Gitignore;
|
||||
use std::collections::{HashMap, HashSet};
|
||||
use std::iter;
|
||||
use std::sync::Arc;
|
||||
use warp_util::standardized_path::StandardizedPath;
|
||||
use galaxy_util::standardized_path::StandardizedPath;
|
||||
|
||||
#[derive(Debug, Clone)]
|
||||
pub(super) struct FileTreeMapStore {
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
use crate::entry::{DirectoryEntry, Entry, FileId, FileMetadata};
|
||||
use crate::file_tree_store::{FileTreeEntry, FileTreeEntryState};
|
||||
use std::sync::Arc;
|
||||
use warp_util::standardized_path::StandardizedPath;
|
||||
use galaxy_util::standardized_path::StandardizedPath;
|
||||
|
||||
fn std_path(s: &str) -> StandardizedPath {
|
||||
StandardizedPath::try_new(s).expect("test path should be valid")
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
//! by the server after processing watcher events and consumed by the client
|
||||
//! to update its [`RemoteRepoMetadataModel`](crate::remote_model::RemoteRepoMetadataModel).
|
||||
|
||||
use warp_util::standardized_path::StandardizedPath;
|
||||
use galaxy_util::standardized_path::StandardizedPath;
|
||||
|
||||
use crate::entry::{DirectoryEntry, Entry, FileMetadata};
|
||||
|
||||
|
||||
@@ -3,7 +3,7 @@ use crate::file_tree_store::{FileTreeEntry, FileTreeEntryState};
|
||||
use crate::file_tree_update::*;
|
||||
use crate::local_model::LocalRepoMetadataModel;
|
||||
use std::path::{Path, PathBuf};
|
||||
use warp_util::standardized_path::StandardizedPath;
|
||||
use galaxy_util::standardized_path::StandardizedPath;
|
||||
|
||||
// ── Helpers ──────────────────────────────────────────────────────────
|
||||
|
||||
|
||||
@@ -8,10 +8,10 @@ use std::{
|
||||
};
|
||||
|
||||
use thiserror::Error;
|
||||
use warp_util::standardized_path::StandardizedPath;
|
||||
use galaxy_util::standardized_path::StandardizedPath;
|
||||
|
||||
#[cfg(not(target_family = "wasm"))]
|
||||
use warpui::SingletonEntity;
|
||||
use galaxyui::SingletonEntity;
|
||||
|
||||
/// Errors that can occur when working with repository metadata.
|
||||
#[derive(Error, Debug)]
|
||||
@@ -54,7 +54,7 @@ pub use repository::Repository;
|
||||
pub use watcher::{DirectoryWatcher, RepositoryUpdate, TargetFile};
|
||||
|
||||
#[cfg(not(target_family = "wasm"))]
|
||||
pub fn is_in_repo(path: &str, app: &warpui::AppContext) -> bool {
|
||||
pub fn is_in_repo(path: &str, app: &galaxyui::AppContext) -> bool {
|
||||
use crate::repositories::DetectedRepositories;
|
||||
|
||||
DetectedRepositories::as_ref(app)
|
||||
@@ -63,7 +63,7 @@ pub fn is_in_repo(path: &str, app: &warpui::AppContext) -> bool {
|
||||
}
|
||||
|
||||
#[cfg(target_family = "wasm")]
|
||||
pub fn is_in_repo(_path: &str, _app: &warpui::AppContext) -> bool {
|
||||
pub fn is_in_repo(_path: &str, _app: &galaxyui::AppContext) -> bool {
|
||||
false
|
||||
}
|
||||
pub use file_tree_store::FileTreeEntry;
|
||||
|
||||
@@ -9,8 +9,8 @@ use std::{
|
||||
path::{Path, PathBuf},
|
||||
};
|
||||
|
||||
use warp_core::{safe_warn, send_telemetry_from_ctx};
|
||||
use warpui::ModelHandle;
|
||||
use galaxy_core::{safe_warn, send_telemetry_from_ctx};
|
||||
use galaxyui::ModelHandle;
|
||||
|
||||
/// Represents either a file or directory in a repository.
|
||||
#[derive(Debug, Clone)]
|
||||
@@ -19,7 +19,7 @@ pub enum RepoContent<'a> {
|
||||
Directory(&'a FileTreeDirectoryEntryState),
|
||||
}
|
||||
|
||||
use warp_util::standardized_path::StandardizedPath;
|
||||
use galaxy_util::standardized_path::StandardizedPath;
|
||||
|
||||
use crate::{
|
||||
entry::{Entry, FileId, IgnoredPathStrategy},
|
||||
@@ -34,7 +34,7 @@ cfg_if::cfg_if! {
|
||||
use notify_debouncer_full::notify::{RecursiveMode, WatchFilter};
|
||||
use crate::repositories::{DetectedRepositories, DetectedRepositoriesEvent};
|
||||
use watcher::{BulkFilesystemWatcher, BulkFilesystemWatcherEvent};
|
||||
use warpui::SingletonEntity as _;
|
||||
use galaxyui::SingletonEntity as _;
|
||||
|
||||
/// Duration between filesystem watch events in seconds
|
||||
const FILESYSTEM_WATCHER_DEBOUNCE_SECS: u64 = 1;
|
||||
@@ -50,7 +50,7 @@ use crate::file_tree_update::{
|
||||
RepoMetadataUpdate, RepoNodeMetadata,
|
||||
};
|
||||
use ignore::gitignore::Gitignore;
|
||||
use warpui::ModelContext;
|
||||
use galaxyui::ModelContext;
|
||||
|
||||
/// Maximum depth to traverse when building file trees
|
||||
const MAX_TREE_DEPTH: usize = 200;
|
||||
@@ -979,7 +979,7 @@ impl LocalRepoMetadataModel {
|
||||
}
|
||||
}
|
||||
|
||||
impl warpui::Entity for LocalRepoMetadataModel {
|
||||
impl galaxyui::Entity for LocalRepoMetadataModel {
|
||||
type Event = RepositoryMetadataEvent;
|
||||
}
|
||||
|
||||
|
||||
@@ -20,9 +20,9 @@ mod tests {
|
||||
use std::rc::Rc;
|
||||
use std::time::Duration;
|
||||
use virtual_fs::{Stub, VirtualFS};
|
||||
use warp_util::standardized_path::StandardizedPath;
|
||||
use warpui::r#async::FutureExt as _;
|
||||
use warpui::App;
|
||||
use galaxy_util::standardized_path::StandardizedPath;
|
||||
use galaxyui::r#async::FutureExt as _;
|
||||
use galaxyui::App;
|
||||
|
||||
impl LocalRepoMetadataModel {
|
||||
fn new_for_test() -> Self {
|
||||
@@ -1038,7 +1038,7 @@ Thumbs.db
|
||||
|
||||
#[test]
|
||||
fn test_canonicalized_path_functionality() {
|
||||
use warp_util::standardized_path::StandardizedPath;
|
||||
use galaxy_util::standardized_path::StandardizedPath;
|
||||
VirtualFS::test("canonicalized_path_test", |dirs, mut vfs| {
|
||||
let repo_path = dirs.tests();
|
||||
|
||||
@@ -1107,7 +1107,7 @@ Thumbs.db
|
||||
|
||||
#[test]
|
||||
fn test_repository_operations_with_standardized_paths() {
|
||||
use warp_util::standardized_path::StandardizedPath;
|
||||
use galaxy_util::standardized_path::StandardizedPath;
|
||||
|
||||
VirtualFS::test("repo_canonicalized_test", |dirs, mut vfs| {
|
||||
let test_root = dirs.tests();
|
||||
@@ -1220,7 +1220,7 @@ Thumbs.db
|
||||
|
||||
#[test]
|
||||
fn test_standardized_path_edge_cases() {
|
||||
use warp_util::standardized_path::StandardizedPath;
|
||||
use galaxy_util::standardized_path::StandardizedPath;
|
||||
|
||||
VirtualFS::test("canonicalized_edge_cases", |dirs, mut vfs| {
|
||||
let test_root = dirs.tests();
|
||||
|
||||
@@ -7,8 +7,8 @@
|
||||
use std::collections::HashMap;
|
||||
use std::sync::Arc;
|
||||
|
||||
use warp_core::HostId;
|
||||
use warpui::ModelContext;
|
||||
use galaxy_core::HostId;
|
||||
use galaxyui::ModelContext;
|
||||
|
||||
use crate::file_tree_store::{FileTreeEntry, FileTreeState};
|
||||
use crate::file_tree_update::RepoMetadataUpdate;
|
||||
@@ -203,7 +203,7 @@ impl RemoteRepoMetadataModel {
|
||||
}
|
||||
}
|
||||
|
||||
impl warpui::Entity for RemoteRepoMetadataModel {
|
||||
impl galaxyui::Entity for RemoteRepoMetadataModel {
|
||||
type Event = RemoteRepositoryMetadataEvent;
|
||||
}
|
||||
|
||||
|
||||
@@ -3,15 +3,15 @@ use std::{collections::HashSet, future::Future, path::PathBuf};
|
||||
|
||||
#[cfg(test)]
|
||||
use virtual_fs::{Stub, VirtualFS};
|
||||
use warp_util::standardized_path::StandardizedPath;
|
||||
use galaxy_util::standardized_path::StandardizedPath;
|
||||
#[cfg(test)]
|
||||
use warpui::r#async::FutureId;
|
||||
use warpui::{AppContext, Entity, ModelContext, ModelHandle};
|
||||
use galaxyui::r#async::FutureId;
|
||||
use galaxyui::{AppContext, Entity, ModelContext, ModelHandle};
|
||||
|
||||
use crate::DirectoryWatcher;
|
||||
use crate::Repository;
|
||||
use futures::future::{ready, Either};
|
||||
use warpui::SingletonEntity;
|
||||
use galaxyui::SingletonEntity;
|
||||
|
||||
/// Indicates why a repository detection event was emitted.
|
||||
#[derive(Debug, Clone, Copy, PartialEq, Eq)]
|
||||
|
||||
@@ -3,8 +3,8 @@ use std::fs;
|
||||
use crate::repositories::{stub_git_repository, RepoDetectionSource};
|
||||
use crate::{repositories::DetectedRepositories, watcher::DirectoryWatcher};
|
||||
use virtual_fs::{Stub, VirtualFS};
|
||||
use warp_util::standardized_path::StandardizedPath;
|
||||
use warpui::App;
|
||||
use galaxy_util::standardized_path::StandardizedPath;
|
||||
use galaxyui::App;
|
||||
|
||||
#[test]
|
||||
fn test_detect_possible_git_repo_non_existent_directory() {
|
||||
|
||||
@@ -10,11 +10,11 @@ use std::path::Path;
|
||||
use futures::future::ready;
|
||||
#[cfg(feature = "local_fs")]
|
||||
use ignore::gitignore::Gitignore;
|
||||
use warp_util::standardized_path::StandardizedPath;
|
||||
use warpui::r#async::{BoxFuture, SpawnedFutureHandle};
|
||||
use galaxy_util::standardized_path::StandardizedPath;
|
||||
use galaxyui::r#async::{BoxFuture, SpawnedFutureHandle};
|
||||
#[cfg(feature = "local_fs")]
|
||||
use warpui::SingletonEntity;
|
||||
use warpui::{Entity, ModelContext, ModelHandle};
|
||||
use galaxyui::SingletonEntity;
|
||||
use galaxyui::{Entity, ModelContext, ModelHandle};
|
||||
|
||||
#[cfg(feature = "local_fs")]
|
||||
use crate::watcher::DirectoryWatcher;
|
||||
@@ -459,7 +459,7 @@ where
|
||||
let st = state.lock().unwrap();
|
||||
st.version
|
||||
};
|
||||
warpui::r#async::Timer::after(wait).await;
|
||||
galaxyui::r#async::Timer::after(wait).await;
|
||||
|
||||
// If version unchanged, we're quiet; flush pending and exit loop.
|
||||
let maybe_merged = {
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
use std::path::{Path, PathBuf};
|
||||
|
||||
use warp_core::HostId;
|
||||
use warp_util::standardized_path::StandardizedPath;
|
||||
use galaxy_core::HostId;
|
||||
use galaxy_util::standardized_path::StandardizedPath;
|
||||
|
||||
/// Identifies a repository across local and remote environments.
|
||||
#[derive(Debug, Clone, PartialEq, Eq, Hash)]
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
use serde_json::{json, Value};
|
||||
use strum_macros::{EnumDiscriminants, EnumIter};
|
||||
use warp_core::{
|
||||
use galaxy_core::{
|
||||
register_telemetry_event,
|
||||
telemetry::{EnablementState, TelemetryEvent, TelemetryEventDesc},
|
||||
};
|
||||
@@ -39,7 +39,7 @@ impl TelemetryEvent for RepoMetadataTelemetryEvent {
|
||||
}
|
||||
|
||||
fn event_descs() -> impl Iterator<Item = Box<dyn TelemetryEventDesc>> {
|
||||
warp_core::telemetry::enum_events::<Self>()
|
||||
galaxy_core::telemetry::enum_events::<Self>()
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -8,9 +8,9 @@ use std::{
|
||||
|
||||
#[cfg(feature = "local_fs")]
|
||||
use futures::{future::OptionFuture, FutureExt as _};
|
||||
use warpui::{Entity, ModelContext, ModelHandle, SingletonEntity, WeakModelHandle};
|
||||
use galaxyui::{Entity, ModelContext, ModelHandle, SingletonEntity, WeakModelHandle};
|
||||
|
||||
use warp_util::standardized_path::StandardizedPath;
|
||||
use galaxy_util::standardized_path::StandardizedPath;
|
||||
|
||||
use crate::{repository::SubscriberId, RepoMetadataError, Repository};
|
||||
|
||||
|
||||
@@ -12,9 +12,9 @@ use crate::{CanonicalizedPath, RepoMetadataError, Repository, RepositoryUpdate};
|
||||
use futures::channel::mpsc;
|
||||
use futures::StreamExt as _;
|
||||
use virtual_fs::{Stub, VirtualFS};
|
||||
use warp_util::standardized_path::StandardizedPath;
|
||||
use warpui::r#async::Timer;
|
||||
use warpui::{App, ModelContext, ModelHandle};
|
||||
use galaxy_util::standardized_path::StandardizedPath;
|
||||
use galaxyui::r#async::Timer;
|
||||
use galaxyui::{App, ModelContext, ModelHandle};
|
||||
|
||||
#[test]
|
||||
fn test_add_repository_success() {
|
||||
|
||||
@@ -8,9 +8,9 @@
|
||||
#[cfg(feature = "local_fs")]
|
||||
use std::path::Path;
|
||||
|
||||
use warp_core::HostId;
|
||||
use warp_util::standardized_path::StandardizedPath;
|
||||
use warpui::{AppContext, ModelContext, ModelHandle, SingletonEntity};
|
||||
use galaxy_core::HostId;
|
||||
use galaxy_util::standardized_path::StandardizedPath;
|
||||
use galaxyui::{AppContext, ModelContext, ModelHandle, SingletonEntity};
|
||||
|
||||
use crate::file_tree_store::FileTreeState;
|
||||
use crate::file_tree_update::RepoMetadataUpdate;
|
||||
@@ -356,7 +356,7 @@ impl RepoMetadataModel {
|
||||
}
|
||||
}
|
||||
|
||||
impl warpui::Entity for RepoMetadataModel {
|
||||
impl galaxyui::Entity for RepoMetadataModel {
|
||||
type Event = RepoMetadataEvent;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user