mirror of
https://github.com/tauri-apps/plugins-workspace.git
synced 2026-05-07 12:26:41 +02:00
feat: update to tauri beta.24 (#1537)
* feat: update to tauri beta.24 * remove .tauri * pnpm build
This commit is contained in:
committed by
GitHub
parent
9973f8ee83
commit
22a17980ff
@@ -23,7 +23,7 @@ type ChildId = u32;
|
||||
#[derive(Debug, Clone, Serialize)]
|
||||
#[serde(tag = "event", content = "payload")]
|
||||
#[non_exhaustive]
|
||||
enum JSCommandEvent {
|
||||
pub enum JSCommandEvent {
|
||||
/// Stderr bytes until a newline (\n) or carriage return (\r) is found.
|
||||
Stderr(Buffer),
|
||||
/// Stdout bytes until a newline (\n) or carriage return (\r) is found.
|
||||
@@ -233,7 +233,7 @@ pub fn spawn<R: Runtime>(
|
||||
shell: State<'_, Shell<R>>,
|
||||
program: String,
|
||||
args: ExecuteArgs,
|
||||
on_event: Channel,
|
||||
on_event: Channel<JSCommandEvent>,
|
||||
options: CommandOptions,
|
||||
command_scope: CommandScope<crate::scope::ScopeAllowedCommand>,
|
||||
global_scope: GlobalScope<crate::scope::ScopeAllowedCommand>,
|
||||
@@ -254,14 +254,14 @@ pub fn spawn<R: Runtime>(
|
||||
};
|
||||
let js_event = JSCommandEvent::new(event, encoding);
|
||||
|
||||
if on_event.send(&js_event).is_err() {
|
||||
if on_event.send(js_event.clone()).is_err() {
|
||||
fn send<'a>(
|
||||
on_event: &'a Channel,
|
||||
on_event: &'a Channel<JSCommandEvent>,
|
||||
js_event: &'a JSCommandEvent,
|
||||
) -> Pin<Box<dyn Future<Output = ()> + Send + 'a>> {
|
||||
Box::pin(async move {
|
||||
tokio::time::sleep(std::time::Duration::from_millis(15)).await;
|
||||
if on_event.send(js_event).is_err() {
|
||||
if on_event.send(js_event.clone()).is_err() {
|
||||
send(on_event, js_event).await;
|
||||
}
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user