@holochain/client 0.15.0 → 0.15.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/lib/api/admin/types.d.ts
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
/// <reference types="node" />
|
|
2
1
|
import { Action, DhtOp, Entry, ZomeCallCapGrant } from "../../hdk/index.js";
|
|
3
2
|
import { ActionHash, AgentPubKey, CellId, DnaHash, DnaProperties, Duration, HoloHash, HoloHashB64, InstalledAppId, KitsuneAgent, KitsuneSpace, RoleName, Signature, Timestamp, WasmHash } from "../../types.js";
|
|
4
3
|
import { Requester } from "../common.js";
|
|
@@ -127,7 +126,7 @@ export type AppInfo = {
|
|
|
127
126
|
/**
|
|
128
127
|
* @public
|
|
129
128
|
*/
|
|
130
|
-
export type MembraneProof =
|
|
129
|
+
export type MembraneProof = Uint8Array;
|
|
131
130
|
/**
|
|
132
131
|
* @public
|
|
133
132
|
*/
|
|
@@ -163,7 +162,7 @@ export type DumpStateResponse = any;
|
|
|
163
162
|
*/
|
|
164
163
|
export type DumpFullStateRequest = {
|
|
165
164
|
cell_id: CellId;
|
|
166
|
-
dht_ops_cursor
|
|
165
|
+
dht_ops_cursor?: number;
|
|
167
166
|
};
|
|
168
167
|
/**
|
|
169
168
|
* @public
|
package/lib/api/app/websocket.js
CHANGED
|
@@ -19,6 +19,14 @@ export class AppWebsocket extends Emittery {
|
|
|
19
19
|
overrideInstalledAppId;
|
|
20
20
|
constructor(client, defaultTimeout, overrideInstalledAppId) {
|
|
21
21
|
super();
|
|
22
|
+
// Ensure all super methods are bound to this instance because Emittery relies on `this` being the instance.
|
|
23
|
+
// Please retain until the upstream is fixed https://github.com/sindresorhus/emittery/issues/86.
|
|
24
|
+
Object.getOwnPropertyNames(Emittery.prototype).forEach((name) => {
|
|
25
|
+
const to_bind = this[name];
|
|
26
|
+
if (typeof to_bind === 'function') {
|
|
27
|
+
this[name] = to_bind.bind(this);
|
|
28
|
+
}
|
|
29
|
+
});
|
|
22
30
|
this.client = client;
|
|
23
31
|
this.defaultTimeout =
|
|
24
32
|
defaultTimeout === undefined ? DEFAULT_TIMEOUT : defaultTimeout;
|
|
@@ -19,6 +19,14 @@ export class AppAgentWebsocket {
|
|
|
19
19
|
constructor(appWebsocket, installedAppId, myPubKey) {
|
|
20
20
|
this.appWebsocket = appWebsocket;
|
|
21
21
|
this.emitter = new Emittery();
|
|
22
|
+
// Ensure all super methods are bound to this instance because Emittery relies on `this` being the instance.
|
|
23
|
+
// Please retain until the upstream is fixed https://github.com/sindresorhus/emittery/issues/86.
|
|
24
|
+
Object.getOwnPropertyNames(Emittery.prototype).forEach((name) => {
|
|
25
|
+
const to_bind = this.emitter[name];
|
|
26
|
+
if (typeof to_bind === 'function') {
|
|
27
|
+
this.emitter[name] = to_bind.bind(this.emitter);
|
|
28
|
+
}
|
|
29
|
+
});
|
|
22
30
|
const env = getLauncherEnvironment();
|
|
23
31
|
this.installedAppId = env?.INSTALLED_APP_ID || installedAppId;
|
|
24
32
|
this.myPubKey = myPubKey;
|
package/lib/api/client.d.ts
CHANGED
|
@@ -13,8 +13,7 @@ export declare class WsClient extends Emittery {
|
|
|
13
13
|
socket: IsoWebSocket;
|
|
14
14
|
url: URL | undefined;
|
|
15
15
|
private pendingRequests;
|
|
16
|
-
index
|
|
17
|
-
private connectRetries;
|
|
16
|
+
private index;
|
|
18
17
|
constructor(socket: IsoWebSocket, url: URL);
|
|
19
18
|
private setupSocket;
|
|
20
19
|
/**
|
package/lib/api/client.js
CHANGED
|
@@ -15,14 +15,12 @@ export class WsClient extends Emittery {
|
|
|
15
15
|
url;
|
|
16
16
|
pendingRequests;
|
|
17
17
|
index;
|
|
18
|
-
connectRetries;
|
|
19
18
|
constructor(socket, url) {
|
|
20
19
|
super();
|
|
21
20
|
this.socket = socket;
|
|
22
21
|
this.url = url;
|
|
23
22
|
this.pendingRequests = {};
|
|
24
23
|
this.index = 0;
|
|
25
|
-
this.connectRetries = 0;
|
|
26
24
|
this.setupSocket();
|
|
27
25
|
}
|
|
28
26
|
setupSocket() {
|
package/lib/api/index.d.ts
CHANGED
|
@@ -3,5 +3,5 @@ export * from "./admin/index.js";
|
|
|
3
3
|
export * from "./app-agent/index.js";
|
|
4
4
|
export * from "./app/index.js";
|
|
5
5
|
export { IsoWebSocket, WsClient } from "./client.js";
|
|
6
|
-
export { CloneId, Requester, Transformer } from "./common.js";
|
|
6
|
+
export { CloneId, Requester, Transformer, getBaseRoleNameFromCloneId, isCloneId, } from "./common.js";
|
|
7
7
|
export * from "./zome-call-signing.js";
|
package/lib/api/index.js
CHANGED
|
@@ -3,5 +3,5 @@ export * from "./admin/index.js";
|
|
|
3
3
|
export * from "./app-agent/index.js";
|
|
4
4
|
export * from "./app/index.js";
|
|
5
5
|
export { IsoWebSocket, WsClient } from "./client.js";
|
|
6
|
-
export { CloneId } from "./common.js";
|
|
6
|
+
export { CloneId, getBaseRoleNameFromCloneId, isCloneId, } from "./common.js";
|
|
7
7
|
export * from "./zome-call-signing.js";
|
package/package.json
CHANGED