git.iko.soy/rowtype-yoga/purescript-tauri
on main help sign in
25 lines 818 B history raw
1import { invoke } from "@tauri-apps/api/core";
3const streamHeader = "x-tauri-bundled-process-stream";
5export const runImpl = options => () => invoke("plugin:bundled-process|run", options);
7export const spawnImpl = options => () =>
8 invoke("plugin:bundled-process|spawn", options);
10export const writeImpl = stream => buffer => () =>
11 invoke("plugin:bundled-process|write", buffer, {
12 headers: { [streamHeader]: stream }
13 });
15export const finishImpl = stream => () =>
16 invoke("plugin:bundled-process|finish", { stream });
18export const cancelImpl = stream => () =>
19 invoke("plugin:bundled-process|cancel", { stream });
21export const stdoutImpl = text => () =>
22 invoke("plugin:bundled-process|stdout", { text });
24export const stderrImpl = text => () =>
25 invoke("plugin:bundled-process|stderr", { text });