*Update dist

This commit is contained in:
Derrick Hammer 2022-11-27 18:23:08 -05:00
parent cafa333041
commit da4bda03ee
Signed by: pcfreak30
GPG Key ID: C997C339BE476FF2
3 changed files with 12 additions and 3 deletions

2
dist/index.d.ts vendored
View File

@ -1,5 +1,7 @@
/// <reference types="node" />
import ProtomuxRPC from "protomux-rpc";
export default class RPC extends ProtomuxRPC {
constructor(stream: any, options?: {});
request(method: any, value?: Buffer | Uint8Array | string, options?: {}): Promise<any>;
}
//# sourceMappingURL=index.d.ts.map

2
dist/index.d.ts.map vendored
View File

@ -1 +1 @@
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AACA,OAAO,WAAW,MAAM,cAAc,CAAA;AAOtC,MAAM,CAAC,OAAO,OAAO,GAAI,SAAQ,WAAW;gBAC5B,MAAM,EAAE,GAAG,EAAE,OAAO,KAAK;CASxC"}
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AACA,OAAO,WAAW,MAAM,cAAc,CAAC;AAOvC,MAAM,CAAC,OAAO,OAAO,GAAI,SAAQ,WAAW;gBAC9B,MAAM,EAAE,GAAG,EAAE,OAAO,KAAK;IAW/B,OAAO,CACX,MAAM,EAAE,GAAG,EACX,KAAK,GAAE,MAAM,GAAG,UAAU,GAAG,MAAqB,EAClD,OAAO,KAAK;CAQf"}

11
dist/index.js vendored
View File

@ -9,9 +9,16 @@ export default class RPC extends ProtomuxRPC {
options = {
...{
id: ID,
valueEncoding: c.json
}, ...options
valueEncoding: c.json,
},
...options,
};
super(stream, options);
}
async request(method, value = b4a.from(""), options = {}) {
if (!b4a.isBuffer(value)) {
value = b4a.from(value);
}
return super.request(method, value, options);
}
}