Skip to content

Commit 60cf9ed

Browse files
authored
refactor(core): move process endpoints to plugins-workspace (#6905)
1 parent c417115 commit 60cf9ed

File tree

7 files changed

+10
-132
lines changed

7 files changed

+10
-132
lines changed

.changes/move-process.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
---
2+
"api": patch
3+
"tauri": patch
4+
---
5+
6+
Moved the `process` feature to its own plugin in the plugins-workspace repository.

core/tauri/scripts/bundle.global.js

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

core/tauri/src/endpoints.rs

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,6 @@ use serde_json::Value as JsonValue;
1313
use std::sync::Arc;
1414

1515
mod event;
16-
#[cfg(process_any)]
17-
mod process;
1816
mod window;
1917

2018
/// The context passed to the invoke handler.
@@ -51,8 +49,6 @@ impl<T: Serialize> From<T> for InvokeResponse {
5149
#[derive(Deserialize)]
5250
#[serde(tag = "module", content = "message")]
5351
enum Module {
54-
#[cfg(process_any)]
55-
Process(process::Cmd),
5652
Window(Box<window::Cmd>),
5753
Event(event::Cmd),
5854
}
@@ -71,13 +67,6 @@ impl Module {
7167
package_info,
7268
};
7369
match self {
74-
#[cfg(process_any)]
75-
Self::Process(cmd) => resolver.respond_async(async move {
76-
cmd
77-
.run(context)
78-
.and_then(|r| r.json)
79-
.map_err(InvokeError::from_anyhow)
80-
}),
8170
Self::Window(cmd) => resolver.respond_async(async move {
8271
cmd
8372
.run(context)

core/tauri/src/endpoints/process.rs

Lines changed: 0 additions & 58 deletions
This file was deleted.

tooling/api/docs/js-api.json

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

tooling/api/src/index.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,12 +15,11 @@
1515

1616
import * as event from './event'
1717
import * as path from './path'
18-
import * as process from './process'
1918
import * as tauri from './tauri'
2019
import * as updater from './updater'
2120
import * as window from './window'
2221

2322
/** @ignore */
2423
const invoke = tauri.invoke
2524

26-
export { invoke, event, path, process, tauri, updater, window }
25+
export { invoke, event, path, tauri, updater, window }

tooling/api/src/process.ts

Lines changed: 0 additions & 58 deletions
This file was deleted.

0 commit comments

Comments
 (0)