*Update dist
This commit is contained in:
parent
fbaf4314f3
commit
51eabd809d
|
@ -1,7 +1,7 @@
|
||||||
import { Client, factory } from "@lumeweb/libkernel-universal";
|
import { Client, factory } from "@lumeweb/libkernel-universal";
|
||||||
import { MODULE } from "@lumeweb/kernel-swarm-client";
|
import { MODULE } from "@lumeweb/kernel-swarm-client";
|
||||||
import defer from "p-defer";
|
import defer from "p-defer";
|
||||||
import b4a from "b4a";
|
import { Buffer } from "buffer";
|
||||||
export default class Protomux {
|
export default class Protomux {
|
||||||
isProtomux = true;
|
isProtomux = true;
|
||||||
constructor(stream) {
|
constructor(stream) {
|
||||||
|
@ -137,13 +137,13 @@ class Message extends Client {
|
||||||
if (data.args) {
|
if (data.args) {
|
||||||
data.args = data.args.filter((arg) => {
|
data.args = data.args.filter((arg) => {
|
||||||
if (arg instanceof Uint8Array) {
|
if (arg instanceof Uint8Array) {
|
||||||
return b4a.from(arg);
|
return Buffer.from(arg);
|
||||||
}
|
}
|
||||||
return arg;
|
return arg;
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
if (data?.args && data?.args[0]?.buffer instanceof Uint8Array) {
|
if (data?.args && data?.args[0]?.buffer instanceof Uint8Array) {
|
||||||
data.args[0].buffer = b4a.from(data.args[0].buffer);
|
data.args[0].buffer = Buffer.from(data.args[0].buffer);
|
||||||
}
|
}
|
||||||
switch (data.action) {
|
switch (data.action) {
|
||||||
case "encode":
|
case "encode":
|
||||||
|
|
Loading…
Reference in New Issue