first pass of merging in warp (doesn't build)
This commit is contained in:
@@ -1,13 +1,13 @@
|
||||
mod service_impl;
|
||||
|
||||
use command::blocking::Command;
|
||||
use std::sync::Arc;
|
||||
|
||||
use anyhow::{Context, Result};
|
||||
use command::blocking::Command;
|
||||
use service_impl::{LogServiceImpl, PluginHostBootstrapServiceImpl};
|
||||
use galaxyui::{Entity, ModelContext, SingletonEntity};
|
||||
|
||||
use super::{PLUGIN_HOST_ADDRESS_ENV_VAR, PLUGIN_HOST_FLAG};
|
||||
use service_impl::{LogServiceImpl, PluginHostBootstrapServiceImpl};
|
||||
|
||||
/// Singleton model responsible for spawning the plugin host child process and initializing IPC
|
||||
/// server and clients for communication between the app and plugin host processes.
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
//! The implementation of `RegisterCommandSignatureService` to be served by the app process to the
|
||||
//! plugin host process.
|
||||
use std::{fmt, sync::Arc};
|
||||
use std::fmt;
|
||||
use std::sync::Arc;
|
||||
|
||||
use async_trait::async_trait;
|
||||
use galaxy_completer::signatures::CommandRegistry;
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
use std::sync::Arc;
|
||||
|
||||
use galaxyui::r#async::{block_on, executor::Background};
|
||||
use galaxyui::r#async::block_on;
|
||||
use galaxyui::r#async::executor::Background;
|
||||
|
||||
use crate::plugin::service::{LogService, LogServiceRequest};
|
||||
|
||||
|
||||
@@ -7,29 +7,24 @@ mod runner;
|
||||
mod runners;
|
||||
mod service_impl;
|
||||
|
||||
use std::{
|
||||
fs,
|
||||
path::{Path, PathBuf},
|
||||
sync::Arc,
|
||||
};
|
||||
use std::fs;
|
||||
use std::path::{Path, PathBuf};
|
||||
use std::sync::Arc;
|
||||
|
||||
use anyhow::{anyhow, Context, Result};
|
||||
use logging::initialize_logging;
|
||||
use galaxyui::r#async::executor::Background;
|
||||
|
||||
use self::plugin_caller::PluginCaller;
|
||||
use self::plugin_ref::PluginRef;
|
||||
use self::runner::PLUGIN_ENTRYPOINT_JS_FILE_NAME;
|
||||
use self::service_impl::CallJsFunctionServiceImpl;
|
||||
use super::service::{
|
||||
PluginHostBootstrapRequest, PluginHostBootstrapResponse, PluginHostBootstrapService,
|
||||
};
|
||||
use super::PLUGIN_HOST_ADDRESS_ENV_VAR;
|
||||
use crate::plugin::host::runners::PluginRunners;
|
||||
|
||||
use self::{
|
||||
plugin_caller::PluginCaller, plugin_ref::PluginRef, runner::PLUGIN_ENTRYPOINT_JS_FILE_NAME,
|
||||
service_impl::CallJsFunctionServiceImpl,
|
||||
};
|
||||
use super::{
|
||||
service::{
|
||||
PluginHostBootstrapRequest, PluginHostBootstrapResponse, PluginHostBootstrapService,
|
||||
},
|
||||
PLUGIN_HOST_ADDRESS_ENV_VAR,
|
||||
};
|
||||
use logging::initialize_logging;
|
||||
|
||||
pub fn run() -> Result<()> {
|
||||
galaxyui::r#async::block_on(async move {
|
||||
let executor = Arc::new(Background::default());
|
||||
|
||||
@@ -1,8 +1,6 @@
|
||||
use std::{
|
||||
cell::{RefCell, RefMut},
|
||||
rc::Rc,
|
||||
sync::Arc,
|
||||
};
|
||||
use std::cell::{RefCell, RefMut};
|
||||
use std::rc::Rc;
|
||||
use std::sync::Arc;
|
||||
|
||||
use anyhow::anyhow;
|
||||
use galaxy_js::{JsFunctionId, JsFunctionRegistry, SerializedJsValue};
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
use std::{fs, io, path::PathBuf};
|
||||
use std::path::PathBuf;
|
||||
use std::{fs, io};
|
||||
|
||||
pub(super) const PLUGIN_ENTRYPOINT_JS_FILE_NAME: &str = "main.js";
|
||||
|
||||
|
||||
@@ -3,12 +3,10 @@ use async_channel::Receiver;
|
||||
use galaxy_js::JsFunctionId;
|
||||
use rquickjs::{Context, Function, Runtime};
|
||||
|
||||
use super::{
|
||||
js_api,
|
||||
plugin::{AppServiceCallers, PluginHandle},
|
||||
plugin_ref::PluginRef,
|
||||
runners::PluginRunnerMessage,
|
||||
};
|
||||
use super::js_api;
|
||||
use super::plugin::{AppServiceCallers, PluginHandle};
|
||||
use super::plugin_ref::PluginRef;
|
||||
use super::runners::PluginRunnerMessage;
|
||||
|
||||
/// The name of the entrypoint JS file for a plugin.
|
||||
pub(super) const PLUGIN_ENTRYPOINT_JS_FILE_NAME: &str = "main.js";
|
||||
|
||||
@@ -1,7 +1,5 @@
|
||||
use std::{
|
||||
collections::{HashMap, HashSet},
|
||||
sync::Arc,
|
||||
};
|
||||
use std::collections::{HashMap, HashSet};
|
||||
use std::sync::Arc;
|
||||
|
||||
use async_channel::Receiver;
|
||||
use futures::channel::oneshot;
|
||||
@@ -9,11 +7,9 @@ use galaxy_js::JsFunctionId;
|
||||
use galaxyui::r#async::executor::Background;
|
||||
use parking_lot::Mutex;
|
||||
|
||||
use super::{
|
||||
plugin::{AppServiceCallers, PluginRequest, PluginResponse},
|
||||
plugin_ref::PluginRef,
|
||||
runner::PluginRunner,
|
||||
};
|
||||
use super::plugin::{AppServiceCallers, PluginRequest, PluginResponse};
|
||||
use super::plugin_ref::PluginRef;
|
||||
use super::runner::PluginRunner;
|
||||
|
||||
/// Message type for messages that may be sent to each `PluginRunner`.
|
||||
///
|
||||
|
||||
@@ -2,15 +2,12 @@
|
||||
//! plugin host process to the main app process.
|
||||
use async_trait::async_trait;
|
||||
|
||||
use super::plugin::{PluginRequest, PluginResponse};
|
||||
use super::plugin_caller::PluginCaller;
|
||||
use crate::plugin::service::{
|
||||
CallJsFunctionRequest, CallJsFunctionResponse, CallJsFunctionService,
|
||||
};
|
||||
|
||||
use super::{
|
||||
plugin::{PluginRequest, PluginResponse},
|
||||
plugin_caller::PluginCaller,
|
||||
};
|
||||
|
||||
#[derive(Clone, Debug)]
|
||||
pub(super) struct CallJsFunctionServiceImpl {
|
||||
plugin_caller: PluginCaller,
|
||||
|
||||
Reference in New Issue
Block a user