Skip to content

Commit

Permalink
refactor(core): move process endpoints to plugins-workspace (#6905)
Browse files Browse the repository at this point in the history
  • Loading branch information
lucasfernog authored May 9, 2023
1 parent c417115 commit 60cf9ed
Show file tree
Hide file tree
Showing 7 changed files with 10 additions and 132 deletions.
6 changes: 6 additions & 0 deletions .changes/move-process.md
Original file line number Diff line number Diff line change
@@ -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
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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.

0 comments on commit 60cf9ed

Please sign in to comment.