@ddd-qc/cell-proxy 0.27.4 → 0.28.0
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/dist/AppProxy.d.ts +9 -45
- package/dist/AppProxy.d.ts.map +1 -0
- package/dist/AppProxy.js +26 -94
- package/dist/AppProxy.js.map +1 -1
- package/dist/CellProxy.d.ts +1 -37
- package/dist/CellProxy.d.ts.map +1 -0
- package/dist/CellProxy.js +9 -78
- package/dist/CellProxy.js.map +1 -1
- package/dist/ConductorAppProxy.d.ts +2 -19
- package/dist/ConductorAppProxy.d.ts.map +1 -0
- package/dist/ConductorAppProxy.js +16 -42
- package/dist/ConductorAppProxy.js.map +1 -1
- package/dist/ExternalAppProxy.d.ts +1 -5
- package/dist/ExternalAppProxy.d.ts.map +1 -0
- package/dist/ExternalAppProxy.js +1 -8
- package/dist/ExternalAppProxy.js.map +1 -1
- package/dist/ZomeProxy.d.ts +4 -15
- package/dist/ZomeProxy.d.ts.map +1 -0
- package/dist/ZomeProxy.js +0 -17
- package/dist/ZomeProxy.js.map +1 -1
- package/dist/cell.d.ts +1 -11
- package/dist/cell.d.ts.map +1 -0
- package/dist/cell.js +0 -14
- package/dist/cell.js.map +1 -1
- package/dist/datum-map.d.ts +2 -6
- package/dist/datum-map.d.ts.map +1 -0
- package/dist/datum-map.js +0 -12
- package/dist/datum-map.js.map +1 -1
- package/dist/hash.d.ts +2 -21
- package/dist/hash.d.ts.map +1 -0
- package/dist/hash.js +19 -51
- package/dist/hash.js.map +1 -1
- package/dist/hcl.d.ts +2 -15
- package/dist/hcl.d.ts.map +1 -0
- package/dist/hcl.js +1 -14
- package/dist/hcl.js.map +1 -1
- package/dist/holochain-id-map.d.ts +2 -1
- package/dist/holochain-id-map.d.ts.map +1 -0
- package/dist/holochain-id-map.js +0 -17
- package/dist/holochain-id-map.js.map +1 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/mixins.d.ts +2 -13
- package/dist/mixins.d.ts.map +1 -0
- package/dist/mixins.js +1 -13
- package/dist/mixins.js.map +1 -1
- package/dist/pretty.d.ts +1 -4
- package/dist/pretty.d.ts.map +1 -0
- package/dist/pretty.js +0 -4
- package/dist/pretty.js.map +1 -1
- package/dist/types.d.ts +1 -11
- package/dist/types.d.ts.map +1 -0
- package/dist/types.js +2 -11
- package/dist/types.js.map +1 -1
- package/dist/utils.d.ts +3 -10
- package/dist/utils.d.ts.map +1 -0
- package/dist/utils.js +11 -11
- package/dist/utils.js.map +1 -1
- package/dist/zomeSignals.integrity.d.ts +1 -0
- package/dist/zomeSignals.integrity.d.ts.map +1 -0
- package/dist/zomeSignals.integrity.js +1 -1
- package/dist/zomeSignals.integrity.js.map +1 -1
- package/dist/zomeSignals.types.d.ts +1 -5
- package/dist/zomeSignals.types.d.ts.map +1 -0
- package/dist/zomeSignals.types.js +0 -4
- package/dist/zomeSignals.types.js.map +1 -1
- package/package.json +4 -4
package/dist/pretty.d.ts
CHANGED
|
@@ -3,7 +3,6 @@ import { AppInfo } from "@holochain/client";
|
|
|
3
3
|
import { BaseRoleName, CellsForRole } from "./types";
|
|
4
4
|
import { StateChange } from "./zomeSignals.types";
|
|
5
5
|
export declare function prettyDuration(date: Date): string;
|
|
6
|
-
/** */
|
|
7
6
|
export declare function prettyDate(date: Date): string;
|
|
8
7
|
export declare function prettySignalLogs(signalLogs: SignalLog[]): {
|
|
9
8
|
timestamp: string;
|
|
@@ -12,9 +11,7 @@ export declare function prettySignalLogs(signalLogs: SignalLog[]): {
|
|
|
12
11
|
type: string;
|
|
13
12
|
payload: import("./zomeSignals.types").ZomeSignal;
|
|
14
13
|
}[];
|
|
15
|
-
/** */
|
|
16
14
|
export declare function printAppInfo(appInfo: AppInfo): string;
|
|
17
|
-
/** */
|
|
18
15
|
export declare function printCellsForRole(baseRoleName: BaseRoleName, cells: CellsForRole): string;
|
|
19
|
-
/** */
|
|
20
16
|
export declare function prettyState(state: StateChange): string;
|
|
17
|
+
//# sourceMappingURL=pretty.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"pretty.d.ts","sourceRoot":"","sources":["../src/pretty.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,SAAS,EAAC,MAAM,YAAY,CAAC;AACrC,OAAO,EAAC,OAAO,EAAW,MAAM,mBAAmB,CAAC;AACpD,OAAO,EAAC,YAAY,EAAE,YAAY,EAAC,MAAM,SAAS,CAAC;AAGnD,OAAO,EAAC,WAAW,EAAkB,MAAM,qBAAqB,CAAC;AAKjE,wBAAgB,cAAc,CAAC,IAAI,EAAE,IAAI,GAAG,MAAM,CAEjD;AAGD,wBAAgB,UAAU,CAAC,IAAI,EAAE,IAAI,GAAG,MAAM,CAM7C;AAGD,wBAAgB,gBAAgB,CAAC,UAAU,EAAE,SAAS,EAAE;;;;;;IAIvD;AAID,wBAAgB,YAAY,CAAC,OAAO,EAAE,OAAO,GAAG,MAAM,CAsBrD;AAID,wBAAgB,iBAAiB,CAAC,YAAY,EAAE,YAAY,EAAE,KAAK,EAAE,YAAY,GAAG,MAAM,CAQzF;AAKD,wBAAgB,WAAW,CAAC,KAAK,EAAE,WAAW,GAAG,MAAM,CAWtD"}
|
package/dist/pretty.js
CHANGED
|
@@ -6,7 +6,6 @@ const zeroPad = (num, places) => String(num).padStart(places, '0');
|
|
|
6
6
|
export function prettyDuration(date) {
|
|
7
7
|
return date.getSeconds() + "." + zeroPad(date.getMilliseconds(), 3);
|
|
8
8
|
}
|
|
9
|
-
/** */
|
|
10
9
|
export function prettyDate(date) {
|
|
11
10
|
return ""
|
|
12
11
|
+ zeroPad(date.getHours(), 2)
|
|
@@ -19,7 +18,6 @@ export function prettySignalLogs(signalLogs) {
|
|
|
19
18
|
return { timestamp: prettyDate(new Date(log.ts)), dnaHash: log.cellAddr.dnaId.short, zome: log.zomeName, type: log.type, payload: log.zomeSignal };
|
|
20
19
|
});
|
|
21
20
|
}
|
|
22
|
-
/** */
|
|
23
21
|
export function printAppInfo(appInfo) {
|
|
24
22
|
let print = `Happ "${appInfo.installed_app_id}" info: (status: ${JSON.stringify(appInfo.status)})`;
|
|
25
23
|
for (const [roleName, cellInfos] of Object.entries(appInfo.cell_info)) {
|
|
@@ -43,7 +41,6 @@ export function printAppInfo(appInfo) {
|
|
|
43
41
|
}
|
|
44
42
|
return print;
|
|
45
43
|
}
|
|
46
|
-
/** */
|
|
47
44
|
export function printCellsForRole(baseRoleName, cells) {
|
|
48
45
|
let print = `CellsForRole "${baseRoleName}": (${enc64(cells.provisioned.cell_id[1])})\n`;
|
|
49
46
|
print += ` - Provisioned: ${cells.provisioned.name} | ${enc64(cells.provisioned.cell_id[0])}\n`;
|
|
@@ -53,7 +50,6 @@ export function printCellsForRole(baseRoleName, cells) {
|
|
|
53
50
|
}
|
|
54
51
|
return print;
|
|
55
52
|
}
|
|
56
|
-
/** */
|
|
57
53
|
export function prettyState(state) {
|
|
58
54
|
if (StateChangeType.Create in state) {
|
|
59
55
|
return state.Create ? "Create NEW" : "Create";
|
package/dist/pretty.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"pretty.js","sourceRoot":"","sources":["../src/pretty.ts"],"names":[],"mappings":"AACA,OAAO,EAAU,QAAQ,EAAC,MAAM,mBAAmB,CAAC;AAEpD,OAAO,EAAC,QAAQ,EAAC,MAAM,QAAQ,CAAC;AAChC,OAAO,EAAC,KAAK,EAAC,MAAM,QAAQ,CAAC;AAC7B,OAAO,EAAc,eAAe,EAAC,MAAM,qBAAqB,CAAC;AAGjE,MAAM,OAAO,GAAG,CAAC,GAAW,EAAE,MAAc,EAAE,EAAE,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,QAAQ,CAAC,MAAM,EAAE,GAAG,CAAC,CAAA;AAElF,MAAM,UAAU,cAAc,CAAC,IAAU;IACvC,OAAO,IAAI,CAAC,UAAU,EAAE,GAAG,GAAG,GAAG,OAAO,CAAC,IAAI,CAAC,eAAe,EAAE,E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AA,CAAC,CAAC,YAAY,CAAC,CAAC,CAAC,QAAQ,CAAC;IAC/C,CAAC;IACD,IAAI,eAAe,CAAC,MAAM,IAAI,KAAK,EAAE,CAAC;QACpC,OAAO,KAAK,CAAC,MAAM,CAAA,CAAC,CAAC,YAAY,CAAC,CAAC,CAAC,QAAQ,CAAC;IAC/C,CAAC;IACD,MAAM,KAAK,CAAC,0BAA0B,CAAC,CAAC;AAC1C,CAAC","sourcesContent":["import {SignalLog} from \"./AppProxy\";\r\nimport {AppInfo, CellType} from \"@holochain/client\";\r\nimport {BaseRoleName, CellsForRole} from \"./types\";\r\nimport {intoStem} from \"./cell\";\r\nimport {enc64} from \"./hash\";\r\nimport {StateChange, StateChangeType} from \"./zomeSignals.types\";\r\n\r\n\r\nconst zeroPad = (num: number, places: number) => String(num).padStart(places, '0')\r\n\r\nexport function prettyDuration(date: Date): string {\r\n return date.getSeconds() + \".\" + zeroPad(date.getMilliseconds(), 3)\r\n}\r\n\r\n/** */\r\nexport function prettyDate(date: Date): string {\r\n return \"\"\r\n + zeroPad(date.getHours(), 2)\r\n + \":\" + zeroPad(date.getMinutes(), 2)\r\n + \":\" + zeroPad(date.getSeconds(), 2)\r\n + \".\" + zeroPad(date.getMilliseconds(), 3);\r\n}\r\n\r\n\r\nexport function prettySignalLogs(signalLogs: SignalLog[]) {\r\n return signalLogs.map((log) => {\r\n return {timestamp: prettyDate(new Date(log.ts)), dnaHash: log.cellAddr.dnaId.short, zome: log.zomeName, type: log.type, payload: log.zomeSignal};\r\n })\r\n}\r\n\r\n\r\n/** */\r\nexport function printAppInfo(appInfo: AppInfo): string {\r\n let print = `Happ \"${appInfo.installed_app_id}\" info: (status: ${JSON.stringify(appInfo.status)})`;\r\n for (const [roleName, cellInfos] of Object.entries(appInfo.cell_info)) {\r\n for (const cellInfo of Object.values(cellInfos)) {\r\n if (CellType.Stem in cellInfo) {\r\n const stem = intoStem(cellInfo)!;\r\n print += `\\n - ${roleName}.${stem.name? stem.name : \"unnamed\"}: ${enc64(stem.dna)} (stem)`;\r\n continue;\r\n }\r\n if (CellType.Provisioned in cellInfo) {\r\n const cell = cellInfo.provisioned;\r\n print += `\\n - ${roleName}: ${cell.name} | ${enc64(cell.cell_id[0])}`;\r\n continue;\r\n }\r\n if (CellType.Cloned in cellInfo) {\r\n const cell = cellInfo.cloned;\r\n print += `\\n - ${roleName}.${cell.clone_id}: ${cell.name} | ${enc64(cell.cell_id[0])}`;\r\n continue;\r\n }\r\n }\r\n }\r\n return print;\r\n}\r\n\r\n\r\n/** */\r\nexport function printCellsForRole(baseRoleName: BaseRoleName, cells: CellsForRole): string {\r\n let print = `CellsForRole \"${baseRoleName}\": (${enc64(cells.provisioned.cell_id[1])})\\n`;\r\n print += ` - Provisioned: ${cells.provisioned.name} | ${enc64(cells.provisioned.cell_id[0])}\\n`;\r\n print += ` - Clones : ${Object.values(cells.clones).length}\\n`;\r\n for (const [cloneId, clone] of Object.entries(cells.clones)) {\r\n print += ` - (${clone.enabled? \"enabled\" : \"disabled\"})${cloneId}: ${clone.name} | ${enc64(clone.cell_id[0])}\\n`;\r\n }\r\n return print;\r\n}\r\n\r\n\r\n\r\n/** */\r\nexport function prettyState(state: StateChange): string {\r\n if (StateChangeType.Create in state) {\r\n return state.Create? \"Create NEW\" : \"Create\";\r\n }\r\n if (StateChangeType.Update in state) {\r\n return state.Update? \"Update NEW\" : \"Update\";\r\n }\r\n if (StateChangeType.Delete in state) {\r\n return state.Delete? \"Delete NEW\" : \"Delete\";\r\n }\r\n throw Error(\"Unknown stateChange type\");\r\n}\r\n"]}
|
package/dist/types.d.ts
CHANGED
|
@@ -3,7 +3,6 @@ import { Dictionary } from "./utils";
|
|
|
3
3
|
import { AgentId, DnaId } from "./hash";
|
|
4
4
|
import { SystemSignalProtocol } from "./zomeSignals.types";
|
|
5
5
|
export type AnyCell = ProvisionedCell | ClonedCell;
|
|
6
|
-
/** Signal types */
|
|
7
6
|
export declare enum SignalType {
|
|
8
7
|
Unknown = "Unknown",
|
|
9
8
|
Empty = "Empty",
|
|
@@ -12,7 +11,6 @@ export declare enum SignalType {
|
|
|
12
11
|
export type SystemPulse = {
|
|
13
12
|
System: SystemSignalProtocol;
|
|
14
13
|
};
|
|
15
|
-
/** ---- */
|
|
16
14
|
export type BaseRoleName = string;
|
|
17
15
|
export type CloneIndex = number;
|
|
18
16
|
export type ZomeIndex = number;
|
|
@@ -50,23 +48,15 @@ export type DnaInfo = {
|
|
|
50
48
|
properties: Uint8Array;
|
|
51
49
|
zome_names: ZomeName[];
|
|
52
50
|
};
|
|
53
|
-
/** */
|
|
54
51
|
export type CellsForRole = {
|
|
55
52
|
provisioned: ProvisionedCell;
|
|
56
|
-
/** CloneId -> Cell */
|
|
57
53
|
clones: Dictionary<ClonedCell>;
|
|
58
54
|
};
|
|
59
|
-
/** BaseRoleName -> RoleCells */
|
|
60
55
|
export type RoleCellsMap = Dictionary<CellsForRole>;
|
|
61
|
-
/** */
|
|
62
56
|
export declare function flattenCells(cells: CellsForRole): CellAddress[];
|
|
63
|
-
/** -- CloneId -- */
|
|
64
57
|
export type CloneId = RoleName;
|
|
65
|
-
/** type for string "<baseRoleName>.<cloneIndex>" */
|
|
66
58
|
export declare function createCloneName(baseRoleName: BaseRoleName, cloneIndex: CloneIndex): string;
|
|
67
|
-
/** */
|
|
68
59
|
export declare function destructureCloneId(cloneId: CloneId): [BaseRoleName, CloneIndex] | undefined;
|
|
69
|
-
/** -- CellAddress -- */
|
|
70
60
|
export type CellIdStr = string;
|
|
71
61
|
export declare class CellAddress {
|
|
72
62
|
readonly dnaId: DnaId;
|
|
@@ -76,6 +66,6 @@ export declare class CellAddress {
|
|
|
76
66
|
intoId(): CellId;
|
|
77
67
|
toString(): string;
|
|
78
68
|
get str(): CellIdStr;
|
|
79
|
-
/** */
|
|
80
69
|
equals(other: CellAddress): boolean;
|
|
81
70
|
}
|
|
71
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":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AM,CAAC,KAAK,EAAE,WAAW,GAAG,OAAO;CAGpC"}
|
package/dist/types.js
CHANGED
|
@@ -1,28 +1,21 @@
|
|
|
1
|
-
import { HoloHash, } from "@holochain/client";
|
|
2
1
|
import { AgentId, DnaId } from "./hash";
|
|
3
|
-
/** Signal types */
|
|
4
2
|
export var SignalType;
|
|
5
3
|
(function (SignalType) {
|
|
6
4
|
SignalType["Unknown"] = "Unknown";
|
|
7
5
|
SignalType["Empty"] = "Empty";
|
|
8
6
|
SignalType["Zome"] = "Zome";
|
|
9
7
|
})(SignalType || (SignalType = {}));
|
|
10
|
-
/** */
|
|
11
8
|
export function flattenCells(cells) {
|
|
12
|
-
let res = Object.entries(cells.clones).map(([
|
|
9
|
+
let res = Object.entries(cells.clones).map(([_cloneId, clone]) => CellAddress.from(clone.cell_id));
|
|
13
10
|
res.push(CellAddress.from(cells.provisioned.cell_id));
|
|
14
11
|
return res;
|
|
15
12
|
}
|
|
16
|
-
/** type for string "<baseRoleName>.<cloneIndex>" */
|
|
17
13
|
export function createCloneName(baseRoleName, cloneIndex) {
|
|
18
|
-
//if (!cloneIndex) return baseRoleName as CloneName;
|
|
19
14
|
return "" + baseRoleName + "." + cloneIndex;
|
|
20
15
|
}
|
|
21
|
-
/** */
|
|
22
16
|
export function destructureCloneId(cloneId) {
|
|
23
17
|
const subs = cloneId.split(".");
|
|
24
18
|
if (subs.length != 2) {
|
|
25
|
-
//throw Error(`Bad RoleInstance id format: "${id}"`);
|
|
26
19
|
return undefined;
|
|
27
20
|
}
|
|
28
21
|
return [subs[0], Number(subs[1])];
|
|
@@ -44,14 +37,12 @@ export class CellAddress {
|
|
|
44
37
|
return new CellAddress(new DnaId(id_or_str[0]), new AgentId(id_or_str[1]));
|
|
45
38
|
}
|
|
46
39
|
intoId() {
|
|
47
|
-
return [
|
|
40
|
+
return [this.dnaId.hash, this.agentId.hash];
|
|
48
41
|
}
|
|
49
|
-
// Don't autoconvert to string as this can lead to confusions. Have convert to string be explicit
|
|
50
42
|
toString() { throw Error("Implicit conversion of HolochainId to string"); }
|
|
51
43
|
get str() {
|
|
52
44
|
return "" + this.dnaId.b64 + CELL_ID_SEPARATOR + this.agentId.b64;
|
|
53
45
|
}
|
|
54
|
-
/** */
|
|
55
46
|
equals(other) {
|
|
56
47
|
return this.str == other.str;
|
|
57
48
|
}
|
package/dist/types.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.js","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAKA,OAAO,EAAC,OAAO,EAAE,KAAK,EAAC,MAAM,QAAQ,CAAC;AAQtC,MAAM,CAAN,IAAY,UAIX;AAJD,WAAY,UAAU;IACpB,iCAAmB,CAAA;IACnB,6BAAe,CAAA;IACf,2BAAa,CAAA;AACf,CAAC,EAJW,UAAU,KAAV,UAAU,QAIrB;AAyDD,MAAM,UAAU,YAAY,CAAC,KAAmB;IAC9C,IAAI,GAAG,GAAkB,MAAM,CAAC,OAAO,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,QAAQ,EAAE,KAAK,CAAC,EAAE,EAAE,CAAC,WAAW,CAAC,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC;IAClH,GAAG,CAAC,IAAI,CAAC,WAAW,CAAC,IAAI,CAAC,KAAK,CAAC,WAAW,CAAC,OAAO,CAAC,CAAC,CAAC;IACtD,OAAO,GAAG,CAAC;AACb,CAAC;AAOD,MAAM,UAAU,eAAe,CAAC,YAA0B,EAAE,UAAsB;IAEhF,OAAO,EAAE,GAAG,YAAY,GAAG,GAAG,GAAG,UAAU,CAAC;AAC9C,CAAC;AAGD,MAAM,UAAU,kBAAkB,CAAC,OAAgB;IACjD,MAAM,IAAI,GAAG,OAAO,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;IAChC,IAAI,IAA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AAC,OAAO,CAAC,GAAG,CAAC;IACpE,CAAC;IAGD,MAAM,CAAC,KAAkB;QACvB,OAAO,IAAI,CAAC,GAAG,IAAI,KAAK,CAAC,GAAG,CAAC;IAC/B,CAAC;CACF","sourcesContent":["import {\n CellId,\n RoleName, ClonedCell, ProvisionedCell, ZomeName, FunctionName,\n} from \"@holochain/client\";\nimport {Dictionary} from \"./utils\";\nimport {AgentId, DnaId} from \"./hash\";\nimport {SystemSignalProtocol} from \"./zomeSignals.types\";\n\n\nexport type AnyCell = ProvisionedCell | ClonedCell;\n\n/** Signal types */\n\nexport enum SignalType {\n Unknown = \"Unknown\",\n Empty = \"Empty\",\n Zome = \"Zome\",\n}\n\nexport type SystemPulse = {System: SystemSignalProtocol}\n\n\n/** ---- */\n\nexport type BaseRoleName = string;\nexport type CloneIndex = number;\n\nexport type ZomeIndex = number;\n\nexport type EntryDef = {\n id: { App: string } | { CapClaim: null } | { CapGrant: null },\n visibility: \"Public\" | \"Private\",\n requiredValidations: number,\n cacheAtAgentActivity: boolean,\n}\n\nexport type EntryDefsCallbackResult = {Defs: EntryDef[]}\n\nexport type ScopedZomeTypes = [ZomeIndex, number[]][];\n\nexport type ScopedZomeTypesSet = {\n entries: ScopedZomeTypes, // EntryDefIndex\n links: ScopedZomeTypes, // LinkType\n};\n\nexport type ZomeInfo = {\n name: ZomeName,\n id: ZomeIndex,\n properties: Uint8Array,\n entry_defs: EntryDef[],\n extern_fns: FunctionName[],\n zome_types: ScopedZomeTypesSet,\n}\n\n\nexport type DnaInfo = {\n name: string,\n id: DnaId,\n properties: Uint8Array,\n zome_names: ZomeName[],\n}\n\n/** */\nexport type CellsForRole = {\n //baseRoleName: BaseRoleName,\n provisioned: ProvisionedCell,\n /** CloneId -> Cell */\n clones: Dictionary<ClonedCell>,\n}\n\n/** BaseRoleName -> RoleCells */\nexport type RoleCellsMap = Dictionary<CellsForRole>;\n\n/** */\nexport function flattenCells(cells: CellsForRole): CellAddress[] {\n let res: CellAddress[] = Object.entries(cells.clones).map(([_cloneId, clone]) => CellAddress.from(clone.cell_id));\n res.push(CellAddress.from(cells.provisioned.cell_id));\n return res;\n}\n\n\n/** -- CloneId -- */\n\nexport type CloneId = RoleName;\n/** type for string \"<baseRoleName>.<cloneIndex>\" */\nexport function createCloneName(baseRoleName: BaseRoleName, cloneIndex: CloneIndex): string {\n //if (!cloneIndex) return baseRoleName as CloneName;\n return \"\" + baseRoleName + \".\" + cloneIndex;\n}\n\n/** */\nexport function destructureCloneId(cloneId: CloneId): [BaseRoleName, CloneIndex] | undefined {\n const subs = cloneId.split(\".\");\n if (subs.length != 2) {\n //throw Error(`Bad RoleInstance id format: \"${id}\"`);\n return undefined;\n }\n return [subs[0] as BaseRoleName, Number(subs[1]) as CloneIndex];\n}\n\n\n/** -- CellAddress -- */\n\nexport type CellIdStr = string;\n\nconst CELL_ID_SEPARATOR = \"||\"\n\n\nexport class CellAddress {\n constructor(public readonly dnaId: DnaId, public readonly agentId: AgentId) {}\n\n static from(id_or_str: CellId | CellIdStr): CellAddress {\n if (typeof id_or_str == 'string') {\n const subs = id_or_str.split(CELL_ID_SEPARATOR);\n if (subs.length != 2) {\n throw Error(\"CellAddress.from() failed. Bad input string format\");\n }\n return new CellAddress(new DnaId(subs[0]!), new AgentId(subs[1]!));\n }\n return new CellAddress(new DnaId(id_or_str[0]), new AgentId(id_or_str[1]));\n }\n\n intoId(): CellId {\n //return [new HoloHash(this.dnaId.hash), new HoloHash(this.agentId.hash)]\n return [this.dnaId.hash, this.agentId.hash];\n }\n\n // Don't autoconvert to string as this can lead to confusions. Have convert to string be explicit\n toString(): string {throw Error(\"Implicit conversion of HolochainId to string\")}\n\n\n get str(): CellIdStr {\n return \"\" + this.dnaId.b64 + CELL_ID_SEPARATOR + this.agentId.b64;\n }\n\n /** */\n equals(other: CellAddress): boolean {\n return this.str == other.str;\n }\n}\n\n\n"]}
|
package/dist/utils.d.ts
CHANGED
|
@@ -1,19 +1,12 @@
|
|
|
1
1
|
export declare type Dictionary<T> = {
|
|
2
2
|
[key: string]: T;
|
|
3
3
|
};
|
|
4
|
-
/** */
|
|
5
4
|
export declare function assertIsDefined<T>(value: T | undefined): asserts value is T;
|
|
6
|
-
/** */
|
|
7
5
|
export declare function assertAllDefined(...args: any[]): void;
|
|
8
|
-
/** */
|
|
9
6
|
export declare function areArraysEqual(first: Uint8Array, second: Uint8Array): boolean;
|
|
10
|
-
/** */
|
|
11
7
|
export declare const delay: (ms: number) => Promise<unknown>;
|
|
12
|
-
|
|
13
|
-
export declare const
|
|
14
|
-
/** convert snake case to pascal case */
|
|
15
|
-
export declare const pascal: (str: any) => any;
|
|
16
|
-
/** enumType = enum or Object.values(enum) */
|
|
8
|
+
export declare const snake: (str: string) => string;
|
|
9
|
+
export declare const pascal: (str: string) => string;
|
|
17
10
|
export declare function getVariantByIndex(enumType: Object | string[], index: number): string;
|
|
18
|
-
/** enumType = enum or Object.values(enum) */
|
|
19
11
|
export declare function getIndexByVariant(enumType: Object | string[], value: string): number;
|
|
12
|
+
//# sourceMappingURL=utils.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../src/utils.ts"],"names":[],"mappings":"AAEA,MAAM,CAAC,OAAO,MAAM,UAAU,CAAC,CAAC,IAAI;IAClC,CAAC,GAAG,EAAE,MAAM,GAAG,CAAC,CAAC;CAClB,CAAC;AAIF,wBAAgB,eAAe,CAAC,CAAC,EAAE,KAAK,EAAE,CAAC,GAAG,SAAS,GAAG,OAAO,CAAC,KAAK,IAAI,CAAC,CAI3E;AAID,wBAAgB,gBAAgB,CAAC,GAAG,IAAI,EAAE,GAAG,EAAE,GAAG,IAAI,CAMrD;AAID,wBAAgB,cAAc,CAAC,KAAK,EAAE,UAAU,EAAE,MAAM,EAAE,UAAU,WAEnE;AAID,eAAO,MAAM,KAAK,OAAQ,MAAM,qBAAwC,CAAA;AAGxE,eAAO,MAAM,KAAK,QAAS,MAAM,WAGhC,CAAA;AAID,eAAO,MAAM,MAAM,QAAS,MAAM,WAGjC,CAAA;AAID,wBAAgB,iBAAiB,CAAC,QAAQ,EAAE,MAAM,GAAG,MAAM,EAAE,EAAE,KAAK,EAAE,MAAM,GAAG,MAAM,CAWpF;AAID,wBAAgB,iBAAiB,CAAC,QAAQ,EAAE,MAAM,GAAG,MAAM,EAAE,EAAE,KAAK,EAAE,MAAM,GAAG,MAAM,CAWpF"}
|
package/dist/utils.js
CHANGED
|
@@ -1,10 +1,8 @@
|
|
|
1
|
-
/** */
|
|
2
1
|
export function assertIsDefined(value) {
|
|
3
2
|
if (value === undefined) {
|
|
4
3
|
throw new Error('Value is undefined');
|
|
5
4
|
}
|
|
6
5
|
}
|
|
7
|
-
/** */
|
|
8
6
|
export function assertAllDefined(...args) {
|
|
9
7
|
for (const arg of args) {
|
|
10
8
|
if (arg === undefined) {
|
|
@@ -12,17 +10,20 @@ export function assertAllDefined(...args) {
|
|
|
12
10
|
}
|
|
13
11
|
}
|
|
14
12
|
}
|
|
15
|
-
/** */
|
|
16
13
|
export function areArraysEqual(first, second) {
|
|
17
14
|
return first.length === second.length && first.every((value, index) => value === second[index]);
|
|
18
15
|
}
|
|
19
|
-
/** */
|
|
20
16
|
export const delay = (ms) => new Promise(r => setTimeout(r, ms));
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
17
|
+
export const snake = (str) => {
|
|
18
|
+
if (!str)
|
|
19
|
+
return "";
|
|
20
|
+
return str[0].toLowerCase() + str.slice(1, str.length).replace(/[A-Z]/g, letter => `_${letter.toLowerCase()}`);
|
|
21
|
+
};
|
|
22
|
+
export const pascal = (str) => {
|
|
23
|
+
if (!str)
|
|
24
|
+
return "";
|
|
25
|
+
return str[0].toUpperCase() + str.slice(1, str.length).replace(/_([a-z])/g, letter => `${letter[1].toUpperCase()}`);
|
|
26
|
+
};
|
|
26
27
|
export function getVariantByIndex(enumType, index) {
|
|
27
28
|
let keys = enumType;
|
|
28
29
|
if (!Array.isArray(enumType)) {
|
|
@@ -34,11 +35,10 @@ export function getVariantByIndex(enumType, index) {
|
|
|
34
35
|
}
|
|
35
36
|
throw Error("Out of bounds index");
|
|
36
37
|
}
|
|
37
|
-
/** enumType = enum or Object.values(enum) */
|
|
38
38
|
export function getIndexByVariant(enumType, value) {
|
|
39
39
|
let variants = enumType;
|
|
40
40
|
if (!Array.isArray(enumType)) {
|
|
41
|
-
variants = Object.keys(enumType).filter(key => isNaN(Number(key)));
|
|
41
|
+
variants = Object.keys(enumType).filter(key => isNaN(Number(key)));
|
|
42
42
|
}
|
|
43
43
|
for (let i = 0; i < variants.length; i++) {
|
|
44
44
|
if (variants[i] === value) {
|
package/dist/utils.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"utils.js","sourceRoot":"","sources":["../src/utils.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"utils.js","sourceRoot":"","sources":["../src/utils.ts"],"names":[],"mappings":"AAQA,MAAM,UAAU,eAAe,CAAI,KAAoB;IACrD,IAAI,KAAK,KAAK,SAAS,EAAE,CAAC;QACxB,MAAM,IAAI,KAAK,CAAC,oBAAoB,CAAC,CAAC;IACxC,CAAC;AACH,CAAC;AAID,MAAM,UAAU,gBAAgB,CAAC,GAAG,IAAW;IAC7C,KAAK,MAAM,GAAG,IAAI,IAAI,EAAE,CAAC;QACvB,IAAI,GAAG,KAAK,SAAS,EAAE,CAAC;YACtB,MAAM,IAAI,KAAK,CAAC,qCAAqC,CAAC,CAAC;QACzD,CAAC;IACH,CAAC;AACH,CAAC;AAID,MAAM,UAAU,cAAc,CAAC,KAAiB,EAAE,MAAkB;IAClE,OAAO,KAAK,CAAC,MAAM,KAAK,MAAM,CAAC,MAAM,IAAI,KAAK,CAAC,KAAK,CAAC,CAAC,KAAK,EAAE,KAAK,EAAE,EAAE,CAAC,KAAK,KAAK,MAAM,CAAC,KAAK,CAAC,CAAC,CAAA;AACjG,CAAC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AAC;QAExB,OAAO,QAAQ,CAAC,GAAG,CAAC,CAAC;IACvB,CAAC;IACD,MAAM,KAAK,CAAC,qBAAqB,CAAC,CAAC;AACrC,CAAC;AAID,MAAM,UAAU,iBAAiB,CAAC,QAA2B,EAAE,KAAa;IAC1E,IAAI,QAAQ,GAAG,QAAoB,CAAC;IACpC,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,QAAQ,CAAC,EAAE,CAAC;QAC7B,QAAQ,GAAG,MAAM,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC,MAAM,CAAC,GAAG,CAAC,EAAE,CAAC,KAAK,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;IACrE,CAAC;IACD,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,QAAQ,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE,CAAC;QACzC,IAAI,QAAQ,CAAC,CAAC,CAAC,KAAK,KAAK,EAAE,CAAC;YAC1B,OAAO,CAAC,CAAC;QACX,CAAC;IACH,CAAC;IACD,MAAM,KAAK,CAAC,iBAAiB,CAAC,CAAC;AACjC,CAAC","sourcesContent":["\n\nexport declare type Dictionary<T> = {\n [key: string]: T;\n};\n\n\n/** */\nexport function assertIsDefined<T>(value: T | undefined): asserts value is T {\n if (value === undefined) {\n throw new Error('Value is undefined');\n }\n}\n\n\n/** */\nexport function assertAllDefined(...args: any[]): void {\n for (const arg of args) {\n if (arg === undefined) {\n throw new Error('One or more arguments are undefined');\n }\n }\n}\n\n\n/** */\nexport function areArraysEqual(first: Uint8Array, second: Uint8Array) {\n return first.length === second.length && first.every((value, index) => value === second[index])\n}\n\n\n/** */\nexport const delay = (ms: number) => new Promise(r => setTimeout(r, ms))\n\n/** convert Pascal case to snake case */\nexport const snake = (str: string) => {\n if (!str) return \"\";\n return str[0]!.toLowerCase() + str.slice(1, str.length).replace(/[A-Z]/g, letter => `_${letter.toLowerCase()}`);\n}\n\n\n/** convert snake case to pascal case */\nexport const pascal = (str: string) => {\n if (!str) return \"\";\n return str[0]!.toUpperCase() + str.slice(1, str.length).replace(/_([a-z])/g, letter => `${letter[1]!.toUpperCase()}`);\n}\n\n\n/** enumType = enum or Object.values(enum) */\nexport function getVariantByIndex(enumType: Object | string[], index: number): string {\n let keys = enumType as string[];\n if (!Array.isArray(enumType)) {\n keys = Object.keys(enumType);\n }\n if (index >= 0 && index < keys.length) {\n const key = keys[index];\n // @ts-ignore\n return enumType[key];\n }\n throw Error(\"Out of bounds index\");\n}\n\n\n/** enumType = enum or Object.values(enum) */\nexport function getIndexByVariant(enumType: Object | string[], value: string): number {\n let variants = enumType as string[];\n if (!Array.isArray(enumType)) {\n variants = Object.keys(enumType).filter(key => isNaN(Number(key))); // Filter out numeric keys if present\n }\n for (let i = 0; i < variants.length; i++) {\n if (variants[i] === value) {\n return i;\n }\n }\n throw Error(\"Unknown variant\");\n}\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
//# sourceMappingURL=zomeSignals.integrity.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"zomeSignals.integrity.d.ts","sourceRoot":"","sources":["../src/zomeSignals.integrity.ts"],"names":[],"mappings":""}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
|
|
1
|
+
"use strict";
|
|
2
2
|
//# sourceMappingURL=zomeSignals.integrity.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"zomeSignals.integrity.js","sourceRoot":"","sources":["../src/zomeSignals.integrity.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"zomeSignals.integrity.js","sourceRoot":"","sources":["../src/zomeSignals.integrity.ts"],"names":[],"mappings":"","sourcesContent":["/* This file is generated by zits. Do not edit manually */\n\n"]}
|
|
@@ -6,7 +6,6 @@ export interface CastTipInput {
|
|
|
6
6
|
tip: TipProtocol;
|
|
7
7
|
peers: AgentArray[];
|
|
8
8
|
}
|
|
9
|
-
/** Bool: True if state change just happened (real-time) */
|
|
10
9
|
export declare enum StateChangeType {
|
|
11
10
|
Create = "Create",
|
|
12
11
|
Update = "Update",
|
|
@@ -35,12 +34,10 @@ export interface EntryPulse {
|
|
|
35
34
|
def: AppEntryDef;
|
|
36
35
|
bytes: Uint8Array;
|
|
37
36
|
}
|
|
38
|
-
/** */
|
|
39
37
|
export interface ZomeSignal {
|
|
40
38
|
from: AgentArray;
|
|
41
39
|
pulses: ZomeSignalProtocol[];
|
|
42
40
|
}
|
|
43
|
-
/** */
|
|
44
41
|
export declare enum ZomeSignalProtocolType {
|
|
45
42
|
System = "System",
|
|
46
43
|
Entry = "Entry",
|
|
@@ -60,7 +57,6 @@ export type ZomeSignalProtocolVariantTip = {
|
|
|
60
57
|
Tip: TipProtocol;
|
|
61
58
|
};
|
|
62
59
|
export type ZomeSignalProtocol = ZomeSignalProtocolVariantSystem | ZomeSignalProtocolVariantEntry | ZomeSignalProtocolVariantLink | ZomeSignalProtocolVariantTip;
|
|
63
|
-
/** Protocol for notifying the ViewModel (UI) of system level events */
|
|
64
60
|
export type SystemSignalProtocolVariantPostCommitNewStart = {
|
|
65
61
|
type: "PostCommitNewStart";
|
|
66
62
|
app_entry_type: string;
|
|
@@ -91,7 +87,6 @@ export type SystemSignalProtocolVariantSelfCallEnd = {
|
|
|
91
87
|
succeeded: boolean;
|
|
92
88
|
};
|
|
93
89
|
export type SystemSignalProtocol = SystemSignalProtocolVariantPostCommitNewStart | SystemSignalProtocolVariantPostCommitNewEnd | SystemSignalProtocolVariantPostCommitDeleteStart | SystemSignalProtocolVariantPostCommitDeleteEnd | SystemSignalProtocolVariantSelfCallStart | SystemSignalProtocolVariantSelfCallEnd;
|
|
94
|
-
/** Used by UI ONLY. That's why we use B64 here. */
|
|
95
90
|
export declare enum TipProtocolType {
|
|
96
91
|
Ping = "Ping",
|
|
97
92
|
Pong = "Pong",
|
|
@@ -116,3 +111,4 @@ export type TipProtocolVariantApp = {
|
|
|
116
111
|
};
|
|
117
112
|
export type TipProtocol = TipProtocolVariantPing | TipProtocolVariantPong | TipProtocolVariantEntry | TipProtocolVariantLink | TipProtocolVariantApp;
|
|
118
113
|
export {};
|
|
114
|
+
//# sourceMappingURL=zomeSignals.types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"zomeSignals.types.d.ts","sourceRoot":"","sources":["../src/zomeSignals.types.ts"],"names":[],"mappings":"AAGA,OAAO,EAE8N,SAAS,EAqB7N,WAAW,EAOuC,IAAI,EAItE,MAAM,mBAAmB,CAAC;AAK3B,KAAK,UAAU,GAAG,UAAU,CAAC;AAM7B,KAAK,UAAU,GAAG,UAAU,CAAC;AAE7B,KAAK,WAAW,GAAG,UAAU,CAAC;AAwB9B,MAAM,WAAW,YAAY;IAC3B,GAAG,EAAE,WAAW,CAAA;IAChB,KAAK,EAAE,UAAU,EAAE,CAAA;CACpB;AAGD,oBAAY,eAAe;IAC1B,MAAM,WAAW;IACjB,MAAM,WAAW;IACjB,MAAM,WAAW;CACjB;AACD,MAAM,MAAM,wBAAwB,GAAG;IAAC,MAAM,EAAE,OAAO,CAAA;CAAC,CAAA;AACxD,MAAM,MAAM,wBAAwB,GAAG;IAAC,MAAM,EAAE,OAAO,CAAA;CAAC,CAAA;AACxD,MAAM,MAAM,wBAAwB,GAAG;IAAC,MAAM,EAAE,OAAO,CAAA;CAAC,CAAA;AACxD,MAAM,MAAM,WAAW,GACpB,wBAAwB,GAAG,wBAAwB,GAAG,wBAAwB,CAAC;AAElF,MAAM,WAAW,SAAS;IACxB,IAAI,EAAE,IAAI,CAAA;IACV,KAAK,EAAE,WAAW,CAAA;CACnB;AAED,MAAM,WAAW,UAAU;IACzB,EAAE,EAAE,WAAW,CAAA;IACf,KAAK,EAAE,WAAW,CAAA;IAClB,EAAE,EAAE,SAAS,CAAA;IACb,MAAM,EAAE,UAAU,CAAA;IAClB,EAAE,EAAE,UAAU,CAAA;IACd,GAAG,EAAE,WAAW,CAAA;IAChB,KAAK,EAAE,UA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A;AACD,MAAM,MAAM,sCAAsC,GAAG;IACnD,IAAI,EAAE,aAAa,CAAA;IACnB,SAAS,EAAE,MAAM,CAAA;IACjB,OAAO,EAAE,MAAM,CAAA;IACf,SAAS,EAAE,OAAO,CAAA;CACnB,CAAA;AACD,MAAM,MAAM,oBAAoB,GAC5B,6CAA6C,GAC7C,2CAA2C,GAC3C,gDAAgD,GAChD,8CAA8C,GAC9C,wCAAwC,GACxC,sCAAsC,CAAC;AAG3C,oBAAY,eAAe;IAC1B,IAAI,SAAS;IACb,IAAI,SAAS;IACb,KAAK,UAAU;IACf,IAAI,SAAS;IACb,GAAG,QAAQ;CACX;AACD,MAAM,MAAM,sBAAsB,GAAG;IAAC,IAAI,EAAE,UAAU,CAAA;CAAC,CAAA;AACvD,MAAM,MAAM,sBAAsB,GAAG;IAAC,IAAI,EAAE,UAAU,CAAA;CAAC,CAAA;AACvD,MAAM,MAAM,uBAAuB,GAAG;IAAC,KAAK,EAAE,UAAU,CAAA;CAAC,CAAA;AACzD,MAAM,MAAM,sBAAsB,GAAG;IAAC,IAAI,EAAE,SAAS,CAAA;CAAC,CAAA;AACtD,MAAM,MAAM,qBAAqB,GAAG;IAAC,GAAG,EAAE,UAAU,CAAA;CAAC,CAAA;AACrD,MAAM,MAAM,WAAW,GACpB,sBAAsB,GAAG,sBAAsB,GAAG,uBAAuB,GAAG,sBAAsB,GAAG,qBAAqB,CAAC"}
|
|
@@ -1,12 +1,9 @@
|
|
|
1
|
-
/* This file is generated by zits. Do not edit manually */
|
|
2
|
-
/** Bool: True if state change just happened (real-time) */
|
|
3
1
|
export var StateChangeType;
|
|
4
2
|
(function (StateChangeType) {
|
|
5
3
|
StateChangeType["Create"] = "Create";
|
|
6
4
|
StateChangeType["Update"] = "Update";
|
|
7
5
|
StateChangeType["Delete"] = "Delete";
|
|
8
6
|
})(StateChangeType || (StateChangeType = {}));
|
|
9
|
-
/** */
|
|
10
7
|
export var ZomeSignalProtocolType;
|
|
11
8
|
(function (ZomeSignalProtocolType) {
|
|
12
9
|
ZomeSignalProtocolType["System"] = "System";
|
|
@@ -14,7 +11,6 @@ export var ZomeSignalProtocolType;
|
|
|
14
11
|
ZomeSignalProtocolType["Link"] = "Link";
|
|
15
12
|
ZomeSignalProtocolType["Tip"] = "Tip";
|
|
16
13
|
})(ZomeSignalProtocolType || (ZomeSignalProtocolType = {}));
|
|
17
|
-
/** Used by UI ONLY. That's why we use B64 here. */
|
|
18
14
|
export var TipProtocolType;
|
|
19
15
|
(function (TipProtocolType) {
|
|
20
16
|
TipProtocolType["Ping"] = "Ping";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"zomeSignals.types.js","sourceRoot":"","sources":["../src/zomeSignals.types.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"zomeSignals.types.js","sourceRoot":"","sources":["../src/zomeSignals.types.ts"],"names":[],"mappings":"AAgFA,MAAM,CAAN,IAAY,eAIX;AAJD,WAAY,eAAe;IAC1B,oCAAiB,CAAA;IACjB,oCAAiB,CAAA;IACjB,oCAAiB,CAAA;AAClB,CAAC,EAJW,eAAe,KAAf,eAAe,QAI1B;AA6BD,MAAM,CAAN,IAAY,sBAKX;AALD,WAAY,sBAAsB;IACjC,2CAAiB,CAAA;IACjB,yCAAe,CAAA;IACf,uCAAa,CAAA;IACb,qCAAW,CAAA;AACZ,CAAC,EALW,sBAAsB,KAAtB,sBAAsB,QAKjC;AA+CD,MAAM,CAAN,IAAY,eAMX;AAND,WAAY,eAAe;IAC1B,gCAAa,CAAA;IACb,gCAAa,CAAA;IACb,kCAAe,CAAA;IACf,gCAAa,CAAA;IACb,8BAAW,CAAA;AACZ,CAAC,EANW,eAAe,KAAf,eAAe,QAM1B","sourcesContent":["/* This file is generated by zits. Do not edit manually */\n\n// @ts-ignore\nimport {\n// @ts-ignore\nWebsocketConnectionOptions, KitsuneAgent, KitsuneSpace, HoloHashB64, AgentPubKeyB64, DnaHashB64, WasmHashB64, EntryHashB64, ActionHashB64, AnyDhtHashB64, InstalledAppId, Signature, CellId, DnaProperties, RoleName, InstalledCell, Timestamp, Duration, HoloHashed, NetworkInfo, FetchPoolInfo,\n/** hdk/action.ts */\n// @ts-ignore\nSignedActionHashed, RegisterAgentActivity, ActionHashed, ActionType, Action, NewEntryAction, Dna, AgentValidationPkg, InitZomesComplete, CreateLink, DeleteLink, OpenChain, CloseChain, Update, Delete, Create,\n/** hdk/capabilities.ts */\n// @ts-ignore\nCapSecret, CapClaim, GrantedFunctionsType, GrantedFunctions, ZomeCallCapGrant, CapAccessType, CapAccess, CapGrant,\n///** hdk/countersigning.ts */\n//CounterSigningSessionData,\n//PreflightRequest,\n//CounterSigningSessionTimes,\n//ActionBase,\n//CounterSigningAgents,\n//PreflightBytes,\n//Role,\n//CountersigningAgentState,\n/** hdk/dht-ops.ts */\n// @ts-ignore\nDhtOpType, DhtOp, getDhtOpType, getDhtOpAction, getDhtOpEntry, getDhtOpSignature,\n/** hdk/entry.ts */\n// @ts-ignore\nEntryVisibility, AppEntryDef, EntryType, EntryContent, Entry,\n/** hdk/record.ts */\n// @ts-ignore\nRecord as HcRecord, RecordEntry as HcRecordEntry,\n/** hdk/link.ts */\n//AnyLinkableHash,\n// @ts-ignore\nZomeIndex, LinkType, LinkTag, RateWeight, RateBucketId, RateUnits, Link,\n/** api/admin/types.ts */\n// @ts-ignore\nInstalledAppInfoStatus, DeactivationReason, DisabledAppReason, StemCell, ProvisionedCell, ClonedCell, CellType, CellInfo, AppInfo, MembraneProof, FunctionName, ZomeName, ZomeDefinition, IntegrityZome, CoordinatorZome, DnaDefinition, ResourceBytes, ResourceMap, CellProvisioningStrategy, CellProvisioning, DnaVersionSpec, DnaVersionFlexible, AppRoleDnaManifest, AppRoleManifest, AppManifest, AppBundle, AppBundleSource, NetworkSeed, ZomeLocation,\n} from '@holochain/client';\n\n\n/// Simple Hashes\n// @ts-ignore\ntype AgentArray = Uint8Array;\n// @ts-ignore\ntype DnaArray = Uint8Array;\n// @ts-ignore\ntype WasmArray = Uint8Array;\n// @ts-ignore\ntype EntryArray = Uint8Array;\n// @ts-ignore\ntype ActionArray = Uint8Array;\n// @ts-ignore\ntype AnyDhtArray = Uint8Array;\n// @ts-ignore\ntype AnyLinkableArray = Uint8Array;\n// @ts-ignore\ntype ExternalArray = Uint8Array;\n\n// @ts-ignore\nimport {\n/** Common */\n// @ts-ignore\nDhtOpHashB64, DhtOpHash,\n/** DnaFile */\n// @ts-ignore\nDnaFile, DnaDef, Zomes, WasmCode,\n/** entry-details */\n// @ts-ignore\nEntryDetails, RecordDetails, Details, DetailsType, EntryDhtStatus,\n/** Validation */\n// @ts-ignore\nValidationStatus, ValidationReceipt,\n} from '@holochain-open-dev/core-types';\n\nexport interface CastTipInput {\n tip: TipProtocol\n peers: AgentArray[]\n}\n\n/** Bool: True if state change just happened (real-time) */\nexport enum StateChangeType {\n\tCreate = 'Create',\n\tUpdate = 'Update',\n\tDelete = 'Delete',\n}\nexport type StateChangeVariantCreate = {Create: boolean}\nexport type StateChangeVariantUpdate = {Update: boolean}\nexport type StateChangeVariantDelete = {Delete: boolean}\nexport type StateChange = \n | StateChangeVariantCreate | StateChangeVariantUpdate | StateChangeVariantDelete;\n\nexport interface LinkPulse {\n link: Link\n state: StateChange\n}\n\nexport interface EntryPulse {\n ah: ActionArray\n state: StateChange\n ts: Timestamp\n author: AgentArray\n eh: EntryArray\n def: AppEntryDef\n bytes: Uint8Array\n}\n\n/** */\nexport interface ZomeSignal {\n from: AgentArray\n pulses: ZomeSignalProtocol[]\n}\n\n/** */\nexport enum ZomeSignalProtocolType {\n\tSystem = 'System',\n\tEntry = 'Entry',\n\tLink = 'Link',\n\tTip = 'Tip',\n}\nexport type ZomeSignalProtocolVariantSystem = {System: SystemSignalProtocol}\nexport type ZomeSignalProtocolVariantEntry = {Entry: EntryPulse}\nexport type ZomeSignalProtocolVariantLink = {Link: LinkPulse}\nexport type ZomeSignalProtocolVariantTip = {Tip: TipProtocol}\nexport type ZomeSignalProtocol = \n | ZomeSignalProtocolVariantSystem | ZomeSignalProtocolVariantEntry | ZomeSignalProtocolVariantLink | ZomeSignalProtocolVariantTip;\n\n/** Protocol for notifying the ViewModel (UI) of system level events */\nexport type SystemSignalProtocolVariantPostCommitNewStart = {\n type: \"PostCommitNewStart\"\n app_entry_type: string\n}\nexport type SystemSignalProtocolVariantPostCommitNewEnd = {\n type: \"PostCommitNewEnd\"\n app_entry_type: string\n succeeded: boolean\n}\nexport type SystemSignalProtocolVariantPostCommitDeleteStart = {\n type: \"PostCommitDeleteStart\"\n app_entry_type: string\n}\nexport type SystemSignalProtocolVariantPostCommitDeleteEnd = {\n type: \"PostCommitDeleteEnd\"\n app_entry_type: string\n succeeded: boolean\n}\nexport type SystemSignalProtocolVariantSelfCallStart = {\n type: \"SelfCallStart\"\n zome_name: string\n fn_name: string\n}\nexport type SystemSignalProtocolVariantSelfCallEnd = {\n type: \"SelfCallEnd\"\n zome_name: string\n fn_name: string\n succeeded: boolean\n}\nexport type SystemSignalProtocol =\n | SystemSignalProtocolVariantPostCommitNewStart\n | SystemSignalProtocolVariantPostCommitNewEnd\n | SystemSignalProtocolVariantPostCommitDeleteStart\n | SystemSignalProtocolVariantPostCommitDeleteEnd\n | SystemSignalProtocolVariantSelfCallStart\n | SystemSignalProtocolVariantSelfCallEnd;\n\n/** Used by UI ONLY. That's why we use B64 here. */\nexport enum TipProtocolType {\n\tPing = 'Ping',\n\tPong = 'Pong',\n\tEntry = 'Entry',\n\tLink = 'Link',\n\tApp = 'App',\n}\nexport type TipProtocolVariantPing = {Ping: AgentArray}\nexport type TipProtocolVariantPong = {Pong: AgentArray}\nexport type TipProtocolVariantEntry = {Entry: EntryPulse}\nexport type TipProtocolVariantLink = {Link: LinkPulse}\nexport type TipProtocolVariantApp = {App: Uint8Array}\nexport type TipProtocol = \n | TipProtocolVariantPing | TipProtocolVariantPong | TipProtocolVariantEntry | TipProtocolVariantLink | TipProtocolVariantApp;\n"]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ddd-qc/cell-proxy",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.28.0",
|
|
4
4
|
"description": "Proxy classes and helpers for managing a Holochain AppWebsocket",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"module": "dist/index.js",
|
|
@@ -24,11 +24,11 @@
|
|
|
24
24
|
},
|
|
25
25
|
"homepage": "https://github.com/ddd-mtl/lit-happ#readme",
|
|
26
26
|
"devDependencies": {
|
|
27
|
-
"tslib": "^2.
|
|
28
|
-
"typescript": "~5.
|
|
27
|
+
"tslib": "^2.6.3",
|
|
28
|
+
"typescript": "~5.5.4"
|
|
29
29
|
},
|
|
30
30
|
"dependencies": {
|
|
31
|
-
"@holochain/client": "
|
|
31
|
+
"@holochain/client": "=0.18.0-dev.4",
|
|
32
32
|
"@bitgo/blake2b": "^3.2.4",
|
|
33
33
|
"js-base64": "^3.7.5",
|
|
34
34
|
"@msgpack/msgpack": "^2.7.2",
|