Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor(core): move process endpoints to plugins-workspace #6905

Merged
merged 1 commit into from May 9, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
6 changes: 6 additions & 0 deletions .changes/move-process.md
@@ -0,0 +1,6 @@
---
"api": patch
"tauri": patch
---

Moved the `process` feature to its own plugin in the plugins-workspace repository.
4 changes: 2 additions & 2 deletions core/tauri/scripts/bundle.global.js

Large diffs are not rendered by default.

11 changes: 0 additions & 11 deletions core/tauri/src/endpoints.rs
Expand Up @@ -13,8 +13,6 @@ use serde_json::Value as JsonValue;
use std::sync::Arc;

mod event;
#[cfg(process_any)]
mod process;
mod window;

/// The context passed to the invoke handler.
Expand Down Expand Up @@ -51,8 +49,6 @@ impl<T: Serialize> From<T> for InvokeResponse {
#[derive(Deserialize)]
#[serde(tag = "module", content = "message")]
enum Module {
#[cfg(process_any)]
Process(process::Cmd),
Window(Box<window::Cmd>),
Event(event::Cmd),
}
Expand All @@ -71,13 +67,6 @@ impl Module {
package_info,
};
match self {
#[cfg(process_any)]
Self::Process(cmd) => resolver.respond_async(async move {
cmd
.run(context)
.and_then(|r| r.json)
.map_err(InvokeError::from_anyhow)
}),
Self::Window(cmd) => resolver.respond_async(async move {
cmd
.run(context)
Expand Down
58 changes: 0 additions & 58 deletions core/tauri/src/endpoints/process.rs

This file was deleted.

2 changes: 1 addition & 1 deletion tooling/api/docs/js-api.json

Large diffs are not rendered by default.

3 changes: 1 addition & 2 deletions tooling/api/src/index.ts
Expand Up @@ -15,12 +15,11 @@

import * as event from './event'
import * as path from './path'
import * as process from './process'
import * as tauri from './tauri'
import * as updater from './updater'
import * as window from './window'

/** @ignore */
const invoke = tauri.invoke

export { invoke, event, path, process, tauri, updater, window }
export { invoke, event, path, tauri, updater, window }
58 changes: 0 additions & 58 deletions tooling/api/src/process.ts

This file was deleted.