Compare commits

..

No commits in common. "v0.0.2-develop.2" and "v0.0.2-develop.1" have entirely different histories.

4 changed files with 3 additions and 15 deletions

View File

@ -1,3 +1 @@
## [0.0.2-develop.2](https://git.lumeweb.com/LumeWeb/rpc/compare/v0.0.2-develop.1...v0.0.2-develop.2) (2023-07-04)
## [0.0.2-develop.1](https://git.lumeweb.com/LumeWeb/rpc/compare/v0.0.1...v0.0.2-develop.1) (2023-07-01) ## [0.0.2-develop.1](https://git.lumeweb.com/LumeWeb/rpc/compare/v0.0.1...v0.0.2-develop.1) (2023-07-01)

4
npm-shrinkwrap.json generated
View File

@ -1,12 +1,12 @@
{ {
"name": "@lumeweb/rpc", "name": "@lumeweb/rpc",
"version": "0.0.2-develop.2", "version": "0.0.2-develop.1",
"lockfileVersion": 3, "lockfileVersion": 3,
"requires": true, "requires": true,
"packages": { "packages": {
"": { "": {
"name": "@lumeweb/rpc", "name": "@lumeweb/rpc",
"version": "0.0.2-develop.2", "version": "0.0.2-develop.1",
"dependencies": { "dependencies": {
"compact-encoding": "2.12.0", "compact-encoding": "2.12.0",
"protomux-rpc": "1.4.0" "protomux-rpc": "1.4.0"

View File

@ -1,7 +1,7 @@
{ {
"name": "@lumeweb/rpc", "name": "@lumeweb/rpc",
"type": "module", "type": "module",
"version": "0.0.2-develop.2", "version": "0.0.2-develop.1",
"main": "lib/index.js", "main": "lib/index.js",
"repository": { "repository": {
"type": "git", "type": "git",

View File

@ -6,8 +6,6 @@ import b4a from "b4a";
const ID = b4a.from("lumeweb"); const ID = b4a.from("lumeweb");
export default class RPC extends ProtomuxRPC { export default class RPC extends ProtomuxRPC {
private _ready: Promise<void>;
constructor(stream: any, options = {}) { constructor(stream: any, options = {}) {
options = { options = {
...{ ...{
@ -17,17 +15,9 @@ export default class RPC extends ProtomuxRPC {
...options, ...options,
}; };
super(stream, options); super(stream, options);
this._ready = new Promise((resolve) => {
// @ts-ignore
this.on("open", resolve);
});
} }
async request(method: any, value: any | string = "", options = {}) { async request(method: any, value: any | string = "", options = {}) {
return super.request(method, value, options); return super.request(method, value, options);
} }
get ready(): Promise<void> {
return this._ready;
}
} }