chore(api): tauri can serialize array buffers from rc.7 (#1694)

* chore(api): tauri can serialize array buffers from rc.7

* fmt

* fix audit

* update lockfile
This commit is contained in:
Lucas Fernandes Nogueira
2024-08-28 17:58:56 -03:00
committed by GitHub
parent 0c040bcc9a
commit d0482502e9
9 changed files with 36 additions and 39 deletions
+2 -3
View File
@@ -319,11 +319,10 @@ class Child {
*
* @since 2.0.0
*/
async write(data: IOPayload): Promise<void> {
async write(data: IOPayload | number[]): Promise<void> {
await invoke("plugin:shell|stdin_write", {
pid: this.pid,
// correctly serialize Uint8Arrays
buffer: typeof data === "string" ? data : Array.from(data),
buffer: data,
});
}