diff options
Diffstat (limited to 'crates/shirabe/src/plugin')
| -rw-r--r-- | crates/shirabe/src/plugin/php_plugin_proxy.rs | 14 | ||||
| -rw-r--r-- | crates/shirabe/src/plugin/plugin_manager.rs | 18 |
2 files changed, 15 insertions, 17 deletions
diff --git a/crates/shirabe/src/plugin/php_plugin_proxy.rs b/crates/shirabe/src/plugin/php_plugin_proxy.rs index 9a93ef72..967faa1b 100644 --- a/crates/shirabe/src/plugin/php_plugin_proxy.rs +++ b/crates/shirabe/src/plugin/php_plugin_proxy.rs @@ -190,9 +190,7 @@ fn operation_stub_class(operation: &AnyOperation) -> &'static str { } /// Registers a package and returns its wire descriptor. -pub(crate) fn package_handle_value( - package: &std::rc::Rc<std::cell::RefCell<AnyPackage>>, -) -> PluginValue { +fn package_handle_value(package: &std::rc::Rc<std::cell::RefCell<AnyPackage>>) -> PluginValue { let class = package_stub_class(package); let rhandle = register_entity(RustEntity::Package(package.clone())); rust_handle_value(rhandle, class) @@ -2442,11 +2440,11 @@ pub(crate) fn repository_handle_value( /// `composer-installer` package names. Every call is forwarded as a `CallPhpMethod` RPC. #[derive(Debug)] pub struct PhpInstallerProxy { - pub(crate) handle: PhpObjHandle, + handle: PhpObjHandle, } impl PhpInstallerProxy { - pub(crate) fn new(handle: PhpObjHandle) -> Self { + fn new(handle: PhpObjHandle) -> Self { Self { handle } } @@ -2674,7 +2672,7 @@ fn forget_php_installer_proxy(phandle: u64) { /// `Composer\Plugin\Capability\Capability` marker). #[derive(Debug)] pub struct PhpCapabilityProxy { - pub(crate) handle: PhpObjHandle, + handle: PhpObjHandle, } impl PhpCapabilityProxy { @@ -2831,7 +2829,7 @@ impl RustCommandMetadata { /// `Application::register_worker_console_commands` as worker-hosted commands are registered, /// booted in the worker the first time one of them actually runs. #[derive(Debug)] -pub(crate) struct PhpConsoleApplicationContext { +struct PhpConsoleApplicationContext { composer: Option<ComposerHandle>, io: std::rc::Rc<std::cell::RefCell<dyn IOInterface>>, initial_working_directory: Option<String>, @@ -2995,7 +2993,7 @@ pub struct PhpCommandProxy { } impl PhpCommandProxy { - pub(crate) fn new(handle: PhpObjHandle) -> anyhow::Result<Self> { + fn new(handle: PhpObjHandle) -> anyhow::Result<Self> { let proxy_command = match Self::call_metadata_getter(&handle, "isProxyCommand")? { PluginValue::Bool(proxy_command) => proxy_command, other => return Err(Self::unsupported_shape(&handle, "isProxyCommand", &other)), diff --git a/crates/shirabe/src/plugin/plugin_manager.rs b/crates/shirabe/src/plugin/plugin_manager.rs index 9f569af7..b02a702d 100644 --- a/crates/shirabe/src/plugin/plugin_manager.rs +++ b/crates/shirabe/src/plugin/plugin_manager.rs @@ -36,15 +36,15 @@ use shirabe_semver::constraint::SimpleConstraint; #[derive(Debug)] pub struct PluginManager { - pub(crate) composer: ComposerWeakHandle, - pub(crate) io: std::rc::Rc<std::cell::RefCell<dyn IOInterface>>, - pub(crate) global_composer: Option<PartialComposerHandle>, - pub(crate) version_parser: VersionParser, - pub(crate) disable_plugins: DisablePlugins, + composer: ComposerWeakHandle, + io: std::rc::Rc<std::cell::RefCell<dyn IOInterface>>, + global_composer: Option<PartialComposerHandle>, + version_parser: VersionParser, + disable_plugins: DisablePlugins, // PHP stores the same plugin instance in both $plugins and $registeredPlugins (reference // semantics); shared handles preserve the identity comparisons that relies on. - pub(crate) plugins: Vec<std::rc::Rc<std::cell::RefCell<dyn PluginInterface>>>, - pub(crate) registered_plugins: IndexMap<String, Vec<PluginOrInstaller>>, + plugins: Vec<std::rc::Rc<std::cell::RefCell<dyn PluginInterface>>>, + registered_plugins: IndexMap<String, Vec<PluginOrInstaller>>, allow_plugin_rules: Option<IndexMap<String, bool>>, allow_global_plugin_rules: Option<IndexMap<String, bool>>, running_in_global_dir: bool, @@ -696,7 +696,7 @@ impl PluginManager { } /// Returns the version of the internal composer-plugin-api package. - pub(crate) fn get_plugin_api_version(&self) -> String { + fn get_plugin_api_version(&self) -> String { match &self.plugin_api_version_override { Some(version) => version.clone(), None => plugin_interface::PLUGIN_API_VERSION.to_string(), @@ -996,7 +996,7 @@ impl PluginManager { .get_install_path(package) } - pub(crate) fn get_capability_implementation_class_name( + fn get_capability_implementation_class_name( &self, plugin: &dyn PluginInterface, capability: &str, |
