@holochain/client 0.11.1 → 0.11.2
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 +8 -12
- package/lib/api/admin/types.js +5 -0
- package/lib/api/admin/types.js.map +1 -1
- package/lib/api/admin/websocket.d.ts +0 -3
- package/lib/api/admin/websocket.js +0 -6
- package/lib/api/admin/websocket.js.map +1 -1
- package/lib/api/zome-call-signing.d.ts +1 -1
- package/lib/environments/launcher.d.ts +1 -0
- package/lib/environments/launcher.js +3 -4
- package/lib/environments/launcher.js.map +1 -1
- package/package.json +2 -2
package/lib/api/admin/types.d.ts
CHANGED
|
@@ -9,12 +9,6 @@ export declare type AttachAppInterfaceRequest = {
|
|
|
9
9
|
export declare type AttachAppInterfaceResponse = {
|
|
10
10
|
port: number;
|
|
11
11
|
};
|
|
12
|
-
export declare type ActivateAppRequest = EnableAppRequest;
|
|
13
|
-
export declare type ActivateAppResponse = EnableAppResponse;
|
|
14
|
-
export declare type DeactivateAppRequest = {
|
|
15
|
-
installed_app_id: InstalledAppId;
|
|
16
|
-
};
|
|
17
|
-
export declare type DeactivateAppResponse = null;
|
|
18
12
|
export declare type EnableAppRequest = {
|
|
19
13
|
installed_app_id: InstalledAppId;
|
|
20
14
|
};
|
|
@@ -64,12 +58,17 @@ export interface Cell {
|
|
|
64
58
|
name: string;
|
|
65
59
|
enabled: boolean;
|
|
66
60
|
}
|
|
61
|
+
export declare const CELL_TYPE: {
|
|
62
|
+
readonly PROVISIONED: "Provisioned";
|
|
63
|
+
readonly CLONED: "Cloned";
|
|
64
|
+
readonly STEM: "Stem";
|
|
65
|
+
};
|
|
67
66
|
export declare type CellInfo = {
|
|
68
|
-
|
|
67
|
+
[CELL_TYPE.PROVISIONED]: Cell;
|
|
69
68
|
} | {
|
|
70
|
-
|
|
69
|
+
[CELL_TYPE.CLONED]: Cell;
|
|
71
70
|
} | {
|
|
72
|
-
|
|
71
|
+
[CELL_TYPE.STEM]: StemCell;
|
|
73
72
|
};
|
|
74
73
|
export declare type AppInfo = {
|
|
75
74
|
installed_app_id: InstalledAppId;
|
|
@@ -233,8 +232,6 @@ export interface GrantZomeCallCapabilityRequest {
|
|
|
233
232
|
export declare type GrantZomeCallCapabilityResponse = void;
|
|
234
233
|
export interface AdminApi {
|
|
235
234
|
attachAppInterface: Requester<AttachAppInterfaceRequest, AttachAppInterfaceResponse>;
|
|
236
|
-
activateApp: Requester<ActivateAppRequest, ActivateAppResponse>;
|
|
237
|
-
deactivateApp: Requester<DeactivateAppRequest, DeactivateAppResponse>;
|
|
238
235
|
enableApp: Requester<EnableAppRequest, EnableAppResponse>;
|
|
239
236
|
disableApp: Requester<DisableAppRequest, DisableAppResponse>;
|
|
240
237
|
startApp: Requester<StartAppRequest, StartAppResponse>;
|
|
@@ -247,7 +244,6 @@ export interface AdminApi {
|
|
|
247
244
|
installApp: Requester<InstallAppRequest, InstallAppResponse>;
|
|
248
245
|
listDnas: Requester<ListDnasRequest, ListDnasResponse>;
|
|
249
246
|
listCellIds: Requester<ListCellIdsRequest, ListCellIdsResponse>;
|
|
250
|
-
listActiveApps: Requester<ListActiveAppsRequest, ListActiveAppsResponse>;
|
|
251
247
|
listApps: Requester<ListAppsRequest, ListAppsResponse>;
|
|
252
248
|
listAppInterfaces: Requester<ListAppInterfacesRequest, ListAppInterfacesResponse>;
|
|
253
249
|
agentInfo: Requester<AgentInfoRequest, AgentInfoResponse>;
|
package/lib/api/admin/types.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../src/api/admin/types.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../src/api/admin/types.ts"],"names":[],"mappings":"AAwEA,MAAM,CAAC,MAAM,SAAS,GAAG;IACvB,WAAW,EAAE,aAAa;IAC1B,MAAM,EAAE,QAAQ;IAChB,IAAI,EAAE,MAAM;CACJ,CAAC;AAsKX,MAAM,CAAN,IAAY,eAMX;AAND,WAAY,eAAe;IACzB,sCAAmB,CAAA;IACnB,wCAAqB,CAAA;IACrB,sCAAmB,CAAA;IACnB,sCAAmB,CAAA;IACnB,oCAAiB,CAAA;AACnB,CAAC,EANW,eAAe,KAAf,eAAe,QAM1B"}
|
|
@@ -24,8 +24,6 @@ export declare class AdminWebsocket implements Api.AdminApi {
|
|
|
24
24
|
static connect(url: string, defaultTimeout?: number): Promise<AdminWebsocket>;
|
|
25
25
|
_requester: <ReqO, ReqI, ResI, ResO>(tag: string, transformer?: Transformer<ReqO, ReqI, ResI, ResO> | undefined) => (req: ReqO, timeout?: number | undefined) => Promise<ResO>;
|
|
26
26
|
attachAppInterface: Requester<Api.AttachAppInterfaceRequest, Api.AttachAppInterfaceResponse>;
|
|
27
|
-
activateApp: Requester<Api.ActivateAppRequest, Api.ActivateAppResponse>;
|
|
28
|
-
deactivateApp: Requester<Api.DeactivateAppRequest, Api.DeactivateAppResponse>;
|
|
29
27
|
enableApp: Requester<Api.EnableAppRequest, Api.EnableAppResponse>;
|
|
30
28
|
disableApp: Requester<Api.DisableAppRequest, Api.DisableAppResponse>;
|
|
31
29
|
startApp: Requester<Api.StartAppRequest, Api.StartAppResponse>;
|
|
@@ -38,7 +36,6 @@ export declare class AdminWebsocket implements Api.AdminApi {
|
|
|
38
36
|
installApp: Requester<Api.InstallAppRequest, Api.InstallAppResponse>;
|
|
39
37
|
listDnas: Requester<Api.ListDnasRequest, Api.ListDnasResponse>;
|
|
40
38
|
listCellIds: Requester<Api.ListCellIdsRequest, Api.ListCellIdsResponse>;
|
|
41
|
-
listActiveApps: Requester<Api.ListActiveAppsRequest, Api.ListActiveAppsResponse>;
|
|
42
39
|
listApps: Requester<Api.ListAppsRequest, Api.ListAppsResponse>;
|
|
43
40
|
listAppInterfaces: Requester<Api.ListAppInterfacesRequest, Api.ListAppInterfacesResponse>;
|
|
44
41
|
agentInfo: Requester<Api.AgentInfoRequest, Api.AgentInfoResponse>;
|
|
@@ -40,10 +40,6 @@ export class AdminWebsocket {
|
|
|
40
40
|
// the specific request/response types come from the Interface
|
|
41
41
|
// which this class implements
|
|
42
42
|
attachAppInterface = this._requester("attach_app_interface");
|
|
43
|
-
// Deprecated
|
|
44
|
-
activateApp = this._requester("activate_app");
|
|
45
|
-
// Deprecated
|
|
46
|
-
deactivateApp = this._requester("deactivate_app");
|
|
47
43
|
enableApp = this._requester("enable_app");
|
|
48
44
|
disableApp = this._requester("disable_app");
|
|
49
45
|
startApp = this._requester("start_app");
|
|
@@ -56,8 +52,6 @@ export class AdminWebsocket {
|
|
|
56
52
|
installApp = this._requester("install_app");
|
|
57
53
|
listDnas = this._requester("list_dnas");
|
|
58
54
|
listCellIds = this._requester("list_cell_ids");
|
|
59
|
-
// Deprecated
|
|
60
|
-
listActiveApps = this._requester("list_active_apps");
|
|
61
55
|
listApps = this._requester("list_apps", listAppsTransform);
|
|
62
56
|
listAppInterfaces = this._requester("list_app_interfaces");
|
|
63
57
|
agentInfo = this._requester("agent_info");
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"websocket.js","sourceRoot":"","sources":["../../../src/api/admin/websocket.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAEH,OAAO,KAAK,GAAG,MAAM,YAAY,CAAC;AAClC,OAAO,EAAE,QAAQ,EAAE,MAAM,cAAc,CAAC;AACxC,OAAO,EAAE,UAAU,EAAE,cAAc,EAAE,eAAe,EAAE,MAAM,cAAc,CAAC;AAC3E,OAAO,EAAe,oBAAoB,EAAa,MAAM,cAAc,CAAC;AAC5E,OAAO,EAAE,sBAAsB,EAAE,MAAM,gCAAgC,CAAC;AAExE,MAAM,OAAO,cAAc;IACzB,MAAM,CAAW;IACjB,cAAc,CAAS;IAEvB,YAAY,MAAgB,EAAE,cAAuB;QACnD,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;QACrB,IAAI,CAAC,cAAc;YACjB,cAAc,KAAK,SAAS,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K,EAAE,CAAC,GAAG,EAAE,EAAE,CAAC,GAAG;IACnB,MAAM,EAAE,CAAC,GAAW,EAAyB,EAAE;QAC7C,OAAO,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;IACzB,CAAC;CACF,CAAC;AAEF,SAAS,qBAAqB,CAAC,aAAkC;IAC/D,QAAQ,aAAa,EAAE;QACrB,KAAK,GAAG,CAAC,eAAe,CAAC,OAAO;YAC9B,OAAO;gBACL,OAAO,EAAE,IAAI;aACd,CAAC;QACJ,KAAK,GAAG,CAAC,eAAe,CAAC,OAAO;YAC9B,OAAO;gBACL,OAAO,EAAE,IAAI;aACd,CAAC;QACJ,KAAK,GAAG,CAAC,eAAe,CAAC,MAAM;YAC7B,OAAO;gBACL,MAAM,EAAE,IAAI;aACb,CAAC;QACJ,KAAK,GAAG,CAAC,eAAe,CAAC,QAAQ;YAC/B,OAAO;gBACL,QAAQ,EAAE,IAAI;aACf,CAAC;QACJ,KAAK,GAAG,CAAC,eAAe,CAAC,OAAO;YAC9B,OAAO;gBACL,OAAO,EAAE,IAAI;aACd,CAAC;KACL;AACH,CAAC"}
|
|
@@ -11,7 +11,7 @@ import { AdminWebsocket } from "./admin/websocket.js";
|
|
|
11
11
|
* @param cellId - The cell id to create the capability grant for.
|
|
12
12
|
* @param functions - Zomes and functions to authorize the signing key for.
|
|
13
13
|
*/
|
|
14
|
-
export declare const authorizeNewSigningKeyPair: (adminWs: AdminWebsocket, cellId: CellId, functions: [
|
|
14
|
+
export declare const authorizeNewSigningKeyPair: (adminWs: AdminWebsocket, cellId: CellId, functions: [ZomeName, FunctionName][]) => Promise<void>;
|
|
15
15
|
/**
|
|
16
16
|
* Get properties for signing a zome call to a cell.
|
|
17
17
|
*
|
|
@@ -4,5 +4,6 @@ export interface LauncherEnvironment {
|
|
|
4
4
|
ADMIN_INTERFACE_PORT: number;
|
|
5
5
|
INSTALLED_APP_ID: InstalledAppId;
|
|
6
6
|
}
|
|
7
|
+
export declare const __HC_LAUNCHER_ENV__ = "__HC_LAUNCHER_ENV__";
|
|
7
8
|
export declare const isLauncher: boolean;
|
|
8
9
|
export declare const getLauncherEnvironment: () => LauncherEnvironment | undefined;
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
export const
|
|
2
|
-
export const
|
|
3
|
-
|
|
4
|
-
: undefined;
|
|
1
|
+
export const __HC_LAUNCHER_ENV__ = "__HC_LAUNCHER_ENV__";
|
|
2
|
+
export const isLauncher = typeof window === "object" && __HC_LAUNCHER_ENV__ in window;
|
|
3
|
+
export const getLauncherEnvironment = () => isLauncher ? window.__HC_LAUNCHER_ENV__ : undefined;
|
|
5
4
|
//# sourceMappingURL=launcher.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"launcher.js","sourceRoot":"","sources":["../../src/environments/launcher.ts"],"names":[],"mappings":"AAQA,MAAM,CAAC,MAAM,UAAU,GACrB,OAAO,MAAM,KAAK,QAAQ,IAAI,
|
|
1
|
+
{"version":3,"file":"launcher.js","sourceRoot":"","sources":["../../src/environments/launcher.ts"],"names":[],"mappings":"AAQA,MAAM,CAAC,MAAM,mBAAmB,GAAG,qBAAqB,CAAC;AAEzD,MAAM,CAAC,MAAM,UAAU,GACrB,OAAO,MAAM,KAAK,QAAQ,IAAI,mBAAmB,IAAI,MAAM,CAAC;AAE9D,MAAM,CAAC,MAAM,sBAAsB,GAAG,GAAoC,EAAE,CAC1E,UAAU,CAAC,CAAC,CAAC,MAAM,CAAC,mBAAmB,CAAC,CAAC,CAAC,SAAS,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@holochain/client",
|
|
3
|
-
"version": "0.11.
|
|
3
|
+
"version": "0.11.2",
|
|
4
4
|
"description": "A JavaScript client for the Holochain Conductor API",
|
|
5
5
|
"author": "Holochain Foundation <info@holochain.org> (http://holochain.org)",
|
|
6
6
|
"license": "CAL-1.0",
|
|
@@ -39,7 +39,7 @@
|
|
|
39
39
|
"build": "rimraf ./lib && tsc -p tsconfig.build.json"
|
|
40
40
|
},
|
|
41
41
|
"dependencies": {
|
|
42
|
-
"@holochain/serialization": "^0.1.0-beta-rc.
|
|
42
|
+
"@holochain/serialization": "^0.1.0-beta-rc.1",
|
|
43
43
|
"@msgpack/msgpack": "^2.7.2",
|
|
44
44
|
"@tauri-apps/api": "^1.2.0",
|
|
45
45
|
"emittery": "^1.0.1",
|