jazz-tools 0.8.34 → 0.8.36
Sign up to get free protection for your applications and to get access to all the features.
- package/CHANGELOG.md +19 -0
- package/dist/native/coValues/coMap.js +1 -1
- package/dist/native/coValues/coMap.js.map +1 -1
- package/dist/native/coValues/group.js +8 -0
- package/dist/native/coValues/group.js.map +1 -1
- package/dist/native/coValues/interfaces.js +9 -1
- package/dist/native/coValues/interfaces.js.map +1 -1
- package/dist/web/coValues/coMap.js +1 -1
- package/dist/web/coValues/coMap.js.map +1 -1
- package/dist/web/coValues/group.js +8 -0
- package/dist/web/coValues/group.js.map +1 -1
- package/dist/web/coValues/interfaces.js +9 -1
- package/dist/web/coValues/interfaces.js.map +1 -1
- package/package.json +2 -2
- package/src/coValues/coMap.ts +1 -1
- package/src/coValues/group.ts +10 -0
- package/src/coValues/interfaces.ts +10 -1
- package/src/tests/groupsAndAccounts.test.ts +143 -0
- package/src/tests/subscribe.test.ts +69 -68
- package/src/tests/utils.ts +68 -0
package/CHANGELOG.md
CHANGED
@@ -1,5 +1,24 @@
|
|
1
1
|
# jazz-tools
|
2
2
|
|
3
|
+
## 0.8.36
|
4
|
+
|
5
|
+
### Patch Changes
|
6
|
+
|
7
|
+
- 441fe27: Optimise large record-like CoMaps for access of latest value
|
8
|
+
- Updated dependencies [441fe27]
|
9
|
+
- cojson@0.8.36
|
10
|
+
|
11
|
+
## 0.8.35
|
12
|
+
|
13
|
+
### Patch Changes
|
14
|
+
|
15
|
+
- 8b87117: Implement Group Inheritance
|
16
|
+
- Updated dependencies [3f15a23]
|
17
|
+
- Updated dependencies [46f2ab8]
|
18
|
+
- Updated dependencies [8b87117]
|
19
|
+
- Updated dependencies [a6b6ccf]
|
20
|
+
- cojson@0.8.35
|
21
|
+
|
3
22
|
## 0.8.34
|
4
23
|
|
5
24
|
### Patch Changes
|
@@ -495,7 +495,7 @@ const CoMapProxyHandler = {
|
|
495
495
|
else {
|
496
496
|
const descriptor = (target._schema[key] ||
|
497
497
|
target._schema[ItemsSym]);
|
498
|
-
if (descriptor || key in target._raw.
|
498
|
+
if (descriptor || key in target._raw.latest) {
|
499
499
|
return {
|
500
500
|
enumerable: true,
|
501
501
|
configurable: true,
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"coMap.js","sourceRoot":"","sources":["../../../src/coValues/coMap.ts"],"names":[],"mappings":";AAAA,OAAO,EAOL,eAAe,GAChB,MAAM,QAAQ,CAAC;AAehB,OAAO,EACL,OAAO,EACP,WAAW,EACX,QAAQ,EACR,GAAG,EACH,UAAU,EACV,mBAAmB,EACnB,OAAO,EACP,YAAY,EACZ,WAAW,EACX,QAAQ,EACR,kBAAkB,EAClB,0BAA0B,EAC1B,mBAAmB,GACpB,MAAM,gBAAgB,CAAC;AAiBxB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;MAgCM;AACN,MAAM,OAAO,KAAM,SAAQ,WAAW;IAgBpC,gBAAgB;IAChB,IAAI,OAAO;QACT,OAAQ,IAAI,CAAC,WAA4B,CAAC,OAEf,CAAC;IAC9B,CAAC;IAED;;;;;;;;;;;;;;;QAeI;IACJ,IAAI,KAAK;QAGP,OAAO,QAAQ,CACb,CAAC,GAAG,EAAE,EAAE,CAAC,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,GAAa,CAA2B,EAC/D,GAAG,EAAE;YACH,MAAM,IAAI,GAAG,IAAI,CAAC,IAAI,CAAC,IAAI,EAAE,CAAC,MAAM,CAAC,CAAC,GAAG,EAAE,EAAE;gBAC3C,MAAM,MAAM,GACV,IAAI,CAAC,OAAO,CAAC,GAAgC,CAAC;oBAC7C,IAAI,CAAC,OAAO,CAAC,QAAQ,CAAwB,CAAC;gBACjD,OAAO,MAAM,IAAI,MAAM,KAAK,MAAM,IAAI,YAAY,CAAC,MAAM,CAAC,CAAC;YAC7D,CAAC,CAAmB,CAAC;YAErB,OAAO,IAAI,CAAC;QACd,CAAC,EACD,IAAI,CAAC,SAAS,EACd,CAAC,GAAG,EAAE,EAAE,CACN,CAAC,IAAI,CAAC,OA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oBACL,UAAU,EAAE,IAAI;oBAChB,YAAY,EAAE,IAAI;oBAClB,QAAQ,EAAE,IAAI;iBACf,CAAC;YACJ,CAAC;QACH,CAAC;IACH,CAAC;IACD,GAAG,CAAC,MAAM,EAAE,GAAG;QACb,MAAM,UAAU,GAAG,CAAC,MAAM,CAAC,OAAO,EAAE,CAAC,GAA6B,CAAC;YACjE,MAAM,CAAC,OAAO,EAAE,CAAC,QAAQ,CAAC,CAAW,CAAC;QAExC,IAAI,MAAM,CAAC,IAAI,IAAI,OAAO,GAAG,KAAK,QAAQ,IAAI,UAAU,EAAE,CAAC;YACzD,OAAO,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,GAAG,CAAC,KAAK,SAAS,CAAC;QAC5C,CAAC;aAAM,CAAC;YACN,OAAO,OAAO,CAAC,GAAG,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;QAClC,CAAC;IACH,CAAC;IACD,cAAc,CAAC,MAAM,EAAE,GAAG;QACxB,MAAM,UAAU,GAAG,CAAC,MAAM,CAAC,OAAO,CAAC,GAA6B,CAAC;YAC/D,MAAM,CAAC,OAAO,CAAC,QAAQ,CAAC,CAAW,CAAC;QACtC,IAAI,OAAO,GAAG,KAAK,QAAQ,IAAI,UAAU,EAAE,CAAC;YAC1C,MAAM,CAAC,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC;YACxB,OAAO,IAAI,CAAC;QACd,CAAC;aAAM,CAAC;YACN,OAAO,OAAO,CAAC,cAAc,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;QAC7C,CAAC;IACH,CAAC;CACF,CAAC"}
|
@@ -60,6 +60,10 @@ export class Group extends CoValueBase {
|
|
60
60
|
this._raw.addMember(member === "everyone" ? member : member._raw, role);
|
61
61
|
return this;
|
62
62
|
}
|
63
|
+
removeMember(member) {
|
64
|
+
this._raw.removeMember(member === "everyone" ? member : member._raw);
|
65
|
+
return this;
|
66
|
+
}
|
63
67
|
get members() {
|
64
68
|
return this._raw
|
65
69
|
.keys()
|
@@ -82,6 +86,10 @@ export class Group extends CoValueBase {
|
|
82
86
|
};
|
83
87
|
});
|
84
88
|
}
|
89
|
+
extend(parent) {
|
90
|
+
this._raw.extend(parent._raw);
|
91
|
+
return this;
|
92
|
+
}
|
85
93
|
/** @category Subscription & Loading */
|
86
94
|
static load(id, as, depth) {
|
87
95
|
return loadCoValue(this, id, as, depth);
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"group.js","sourceRoot":"","sources":["../../../src/coValues/group.ts"],"names":[],"mappings":";AAUA,OAAO,EACL,OAAO,EACP,2BAA2B,EAC3B,KAAK,EACL,WAAW,EACX,UAAU,EACV,GAAG,EACH,EAAE,EACF,mBAAmB,EACnB,mBAAmB,EACnB,WAAW,EACX,kBAAkB,EAClB,0BAA0B,GAC3B,MAAM,gBAAgB,CAAC;AAExB,uCAAuC;AACvC,MAAM,OAAO,OAAQ,SAAQ,KAAK;IAAlC;;QACE,SAAI,GAAG,EAAE,CAAC,MAAM,CAAC;IACnB,CAAC;CAAA;AAED,uCAAuC;AACvC,MAAM,OAAO,KAAM,SAAQ,WAAW;IAUpC,IAAI,OAAO;QAKT,OAAQ,IAAI,CAAC,WAA4B,CAAC,OAAO,CAAC;IACpD,CAAC;IAoBD,IAAI,KAAK;QAIP,MAAM,SAAS,GAAG,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,SAAS,CAE5B,CAAC;QACd,MAAM,MAAM,GAAG,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,MAAM,CAEtB,CAAC;QACd,OAAO;YACL,OAAO,EACL,SAAS;gBACR,IAAI,GAAG,CACN,SAAS,EACT,IAAI,CAAC,SAAS,EACd,IAAI,CAAC,OAAO,CAAC,OAAmD,CAIxD;YACZ,IAAI,EACF,MAAM;gBACL,IAAI,GAAG,CACN,MAAM,EACN,IAAI,CAAC,SAAS,EACd,IAAI,CAAC,OAAO,CAAC,IAA6C,CAEO;SACtE,CAAC;IACJ,CAAC;IAED,8DA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AM,CAAC,IAAI,CAET,EAAS,EACT,EAAW,EACX,KAA0B;QAE1B,OAAO,WAAW,CAAC,IAAI,EAAE,EAAE,EAAE,EAAE,EAAE,KAAK,CAAC,CAAC;IAC1C,CAAC;IAED,uCAAuC;IACvC,MAAM,CAAC,SAAS,CAEd,EAAS,EACT,EAAW,EACX,KAA0B,EAC1B,QAAiD;QAEjD,OAAO,kBAAkB,CAAW,IAAI,EAAE,EAAE,EAAE,EAAE,EAAE,KAAK,EAAE,QAAQ,CAAC,CAAC;IACrE,CAAC;IAED,uCAAuC;IACvC,YAAY,CAEV,KAA0B;QAE1B,OAAO,mBAAmB,CAAC,IAAI,EAAE,KAAK,CAAC,CAAC;IAC1C,CAAC;IAED,uCAAuC;IACvC,SAAS,CAEP,KAA0B,EAC1B,QAAiD;QAEjD,OAAO,0BAA0B,CAAC,IAAI,EAAE,KAAK,EAAE,QAAQ,CAAC,CAAC;IAC3D,CAAC;CACF;;AA3LC;IACE,GAAK,SAAS,CAAC,KAAK,GAAG,OAAO,CAAC;AACjC,CAAC,GAAA,CAAA;AAYD;IACE,GAAK,OAAO,GAAG;QACb,OAAO,EAAE,MAAuB;QAChC,IAAI,EAAE,MAAuB;QAC7B,CAAC,UAAU,CAAC,EAAE;YACZ,GAAG,EAAE,GAAG,EAAE,CAAC,OAAO;YAClB,QAAQ,EAAE,KAAK;SACc;QAC/B,8DAA8D;KACxD,CAAC;IACT,MAAM,CAAC,cAAc,CAAC,GAAK,SAAS,EAAE,SAAS,EAAE;QAC/C,GAAG,EAAE,GAAG,EAAE,CAAC,GAAK,OAAO;KACxB,CAAC,CAAC;AACL,CAAC,GAAA,CAAA"}
|
@@ -108,12 +108,20 @@ export function subscribeToCoValue(cls, id, as, depth, listener, onUnavailable)
|
|
108
108
|
}
|
109
109
|
export function createCoValueObservable() {
|
110
110
|
let currentValue = undefined;
|
111
|
+
let subscriberCount = 0;
|
111
112
|
function subscribe(cls, id, as, depth, listener, onUnavailable) {
|
113
|
+
subscriberCount++;
|
112
114
|
const unsubscribe = subscribeToCoValue(cls, id, as, depth, (value) => {
|
113
115
|
currentValue = value;
|
114
116
|
listener();
|
115
117
|
}, onUnavailable);
|
116
|
-
return
|
118
|
+
return () => {
|
119
|
+
unsubscribe();
|
120
|
+
subscriberCount--;
|
121
|
+
if (subscriberCount === 0) {
|
122
|
+
currentValue = undefined;
|
123
|
+
}
|
124
|
+
};
|
117
125
|
}
|
118
126
|
const observable = {
|
119
127
|
getCurrentValue: () => currentValue,
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"interfaces.js","sourceRoot":"","sources":["../../../src/coValues/interfaces.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,UAAU,EAAE,MAAM,QAAQ,CAAC;AAEpC,OAAO,EACL,OAAO,EACP,kBAAkB,EAClB,KAAK,EACL,GAAG,EACH,iBAAiB,EACjB,OAAO,EACP,mBAAmB,GACpB,MAAM,gBAAgB,CAAC;AACxB,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAChD,OAAO,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AAmCjD,8DAA8D;AAC9D,MAAM,UAAU,SAAS,CAAC,KAAU;IAClC,OAAO,KAAK,IAAI,KAAK,CAAC,KAAK,KAAK,SAAS,CAAC;AAC5C,CAAC;AAED,MAAM,UAAU,cAAc;AAC5B,8DAA8D;AAC9D,KAAU;IAEV,OAAO,OAAO,KAAK,KAAK,UAAU,IAAI,KAAK,CAAC,OAAO,KAAK,SAAS,CAAC;AACpE,CAAC;AAkBD,gBAAgB;AAChB,MAAM,OAAO,WAAW;IAOtB,IAAI,MAAM;QACR,MAAM,KAAK,GACT,IAAI,CAAC,IAAI,CAAC,KAAK,YAAY,UAAU;YACnC,CAAC,CAAC,OAAO,CAAC,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC;YAClC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC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496
|
const descriptor = (target._schema[key] ||
|
497
497
|
target._schema[ItemsSym]);
|
498
|
-
if (descriptor || key in target._raw.
|
498
|
+
if (descriptor || key in target._raw.latest) {
|
499
499
|
return {
|
500
500
|
enumerable: true,
|
501
501
|
configurable: true,
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"coMap.js","sourceRoot":"","sources":["../../../src/coValues/coMap.ts"],"names":[],"mappings":";AAAA,OAAO,EAOL,eAAe,GAChB,MAAM,QAAQ,CAAC;AAehB,OAAO,EACL,OAAO,EACP,WAAW,EACX,QAAQ,EACR,GAAG,EACH,UAAU,EACV,mBAAmB,EACnB,OAAO,EACP,YAAY,EACZ,WAAW,EACX,QAAQ,EACR,kBAAkB,EAClB,0BAA0B,EAC1B,mBAAmB,GACpB,MAAM,gBAAgB,CAAC;AAiBxB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;MAgCM;AACN,MAAM,OAAO,KAAM,SAAQ,WAAW;IAgBpC,gBAAgB;IAChB,IAAI,OAAO;QACT,OAAQ,IAAI,CAAC,WAA4B,CAAC,OAEf,CAAC;IAC9B,CAAC;IAED;;;;;;;;;;;;;;;QAeI;IACJ,IAAI,KAAK;QAGP,OAAO,QAAQ,CACb,CAAC,GAAG,EAAE,EAAE,CAAC,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,GAAa,CAA2B,EAC/D,GAAG,EAAE;YACH,MAAM,IAAI,GAAG,IAAI,CAAC,IAAI,CAAC,IAAI,EAAE,CAAC,MAAM,CAAC,CAAC,GAAG,EAAE,EAAE;gBAC3C,MAAM,MAAM,GACV,IAAI,CAAC,OAAO,CAAC,GAAgC,CAAC;oBAC7C,IAAI,CAAC,OAAO,CAAC,QAAQ,CAAwB,CAAC;gBACjD,OAAO,MAAM,IAAI,MAAM,KAAK,MAAM,IAAI,YAAY,CAAC,MAAM,CAAC,CAAC;YAC7D,CAAC,CAAmB,CAAC;YAErB,OAAO,IAAI,CAAC;QACd,CAAC,EACD,IAAI,CA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,IAAI,MAAM,CAAC,IAAI,CAAC,MAAM,EAAE,CAAC;gBAC5C,OAAO;oBACL,UAAU,EAAE,IAAI;oBAChB,YAAY,EAAE,IAAI;oBAClB,QAAQ,EAAE,IAAI;iBACf,CAAC;YACJ,CAAC;QACH,CAAC;IACH,CAAC;IACD,GAAG,CAAC,MAAM,EAAE,GAAG;QACb,MAAM,UAAU,GAAG,CAAC,MAAM,CAAC,OAAO,EAAE,CAAC,GAA6B,CAAC;YACjE,MAAM,CAAC,OAAO,EAAE,CAAC,QAAQ,CAAC,CAAW,CAAC;QAExC,IAAI,MAAM,CAAC,IAAI,IAAI,OAAO,GAAG,KAAK,QAAQ,IAAI,UAAU,EAAE,CAAC;YACzD,OAAO,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,GAAG,CAAC,KAAK,SAAS,CAAC;QAC5C,CAAC;aAAM,CAAC;YACN,OAAO,OAAO,CAAC,GAAG,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;QAClC,CAAC;IACH,CAAC;IACD,cAAc,CAAC,MAAM,EAAE,GAAG;QACxB,MAAM,UAAU,GAAG,CAAC,MAAM,CAAC,OAAO,CAAC,GAA6B,CAAC;YAC/D,MAAM,CAAC,OAAO,CAAC,QAAQ,CAAC,CAAW,CAAC;QACtC,IAAI,OAAO,GAAG,KAAK,QAAQ,IAAI,UAAU,EAAE,CAAC;YAC1C,MAAM,CAAC,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC;YACxB,OAAO,IAAI,CAAC;QACd,CAAC;aAAM,CAAC;YACN,OAAO,OAAO,CAAC,cAAc,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;QAC7C,CAAC;IACH,CAAC;CACF,CAAC"}
|
@@ -60,6 +60,10 @@ export class Group extends CoValueBase {
|
|
60
60
|
this._raw.addMember(member === "everyone" ? member : member._raw, role);
|
61
61
|
return this;
|
62
62
|
}
|
63
|
+
removeMember(member) {
|
64
|
+
this._raw.removeMember(member === "everyone" ? member : member._raw);
|
65
|
+
return this;
|
66
|
+
}
|
63
67
|
get members() {
|
64
68
|
return this._raw
|
65
69
|
.keys()
|
@@ -82,6 +86,10 @@ export class Group extends CoValueBase {
|
|
82
86
|
};
|
83
87
|
});
|
84
88
|
}
|
89
|
+
extend(parent) {
|
90
|
+
this._raw.extend(parent._raw);
|
91
|
+
return this;
|
92
|
+
}
|
85
93
|
/** @category Subscription & Loading */
|
86
94
|
static load(id, as, depth) {
|
87
95
|
return loadCoValue(this, id, as, depth);
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"group.js","sourceRoot":"","sources":["../../../src/coValues/group.ts"],"names":[],"mappings":";AAUA,OAAO,EACL,OAAO,EACP,2BAA2B,EAC3B,KAAK,EACL,WAAW,EACX,UAAU,EACV,GAAG,EACH,EAAE,EACF,mBAAmB,EACnB,mBAAmB,EACnB,WAAW,EACX,kBAAkB,EAClB,0BAA0B,GAC3B,MAAM,gBAAgB,CAAC;AAExB,uCAAuC;AACvC,MAAM,OAAO,OAAQ,SAAQ,KAAK;IAAlC;;QACE,SAAI,GAAG,EAAE,CAAC,MAAM,CAAC;IACnB,CAAC;CAAA;AAED,uCAAuC;AACvC,MAAM,OAAO,KAAM,SAAQ,WAAW;IAUpC,IAAI,OAAO;QAKT,OAAQ,IAAI,CAAC,WAA4B,CAAC,OAAO,CAAC;IACpD,CAAC;IAoBD,IAAI,KAAK;QAIP,MAAM,SAAS,GAAG,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,SAAS,CAE5B,CAAC;QACd,MAAM,MAAM,GAAG,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,MAAM,CAEtB,CAAC;QACd,OAAO;YACL,OAAO,EACL,SAAS;gBACR,IAAI,GAAG,CACN,SAAS,EACT,IAAI,CAAC,SAAS,EACd,IAAI,CAAC,OAAO,CAAC,OAAmD,CAIxD;YACZ,IAAI,EACF,MAAM;gBACL,IAAI,GAAG,CACN,MAAM,EACN,IAAI,CAAC,SAAS,EACd,IAAI,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CAAC;QAC9B,OAAO,IAAI,CAAC;IACd,CAAC;IAED,uCAAuC;IACvC,MAAM,CAAC,IAAI,CAET,EAAS,EACT,EAAW,EACX,KAA0B;QAE1B,OAAO,WAAW,CAAC,IAAI,EAAE,EAAE,EAAE,EAAE,EAAE,KAAK,CAAC,CAAC;IAC1C,CAAC;IAED,uCAAuC;IACvC,MAAM,CAAC,SAAS,CAEd,EAAS,EACT,EAAW,EACX,KAA0B,EAC1B,QAAiD;QAEjD,OAAO,kBAAkB,CAAW,IAAI,EAAE,EAAE,EAAE,EAAE,EAAE,KAAK,EAAE,QAAQ,CAAC,CAAC;IACrE,CAAC;IAED,uCAAuC;IACvC,YAAY,CAEV,KAA0B;QAE1B,OAAO,mBAAmB,CAAC,IAAI,EAAE,KAAK,CAAC,CAAC;IAC1C,CAAC;IAED,uCAAuC;IACvC,SAAS,CAEP,KAA0B,EAC1B,QAAiD;QAEjD,OAAO,0BAA0B,CAAC,IAAI,EAAE,KAAK,EAAE,QAAQ,CAAC,CAAC;IAC3D,CAAC;CACF;;AA3LC;IACE,GAAK,SAAS,CAAC,KAAK,GAAG,OAAO,CAAC;AACjC,CAAC,GAAA,CAAA;AAYD;IACE,GAAK,OAAO,GAAG;QACb,OAAO,EAAE,MAAuB;QAChC,IAAI,EAAE,MAAuB;QAC7B,CAAC,UAAU,CAAC,EAAE;YACZ,GAAG,EAAE,GAAG,EAAE,CAAC,OAAO;YAClB,QAAQ,EAAE,KAAK;SACc;QAC/B,8DAA8D;KACxD,CAAC;IACT,MAAM,CAAC,cAAc,CAAC,GAAK,SAAS,EAAE,SAAS,EAAE;QAC/C,GAAG,EAAE,GAAG,EAAE,CAAC,GAAK,OAAO;KACxB,CAAC,CAAC;AACL,CAAC,GAAA,CAAA"}
|
@@ -108,12 +108,20 @@ export function subscribeToCoValue(cls, id, as, depth, listener, onUnavailable)
|
|
108
108
|
}
|
109
109
|
export function createCoValueObservable() {
|
110
110
|
let currentValue = undefined;
|
111
|
+
let subscriberCount = 0;
|
111
112
|
function subscribe(cls, id, as, depth, listener, onUnavailable) {
|
113
|
+
subscriberCount++;
|
112
114
|
const unsubscribe = subscribeToCoValue(cls, id, as, depth, (value) => {
|
113
115
|
currentValue = value;
|
114
116
|
listener();
|
115
117
|
}, onUnavailable);
|
116
|
-
return
|
118
|
+
return () => {
|
119
|
+
unsubscribe();
|
120
|
+
subscriberCount--;
|
121
|
+
if (subscriberCount === 0) {
|
122
|
+
currentValue = undefined;
|
123
|
+
}
|
124
|
+
};
|
117
125
|
}
|
118
126
|
const observable = {
|
119
127
|
getCurrentValue: () => currentValue,
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"interfaces.js","sourceRoot":"","sources":["../../../src/coValues/interfaces.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,UAAU,EAAE,MAAM,QAAQ,CAAC;AAEpC,OAAO,EACL,OAAO,EACP,kBAAkB,EAClB,KAAK,EACL,GAAG,EACH,iBAAiB,EACjB,OAAO,EACP,mBAAmB,GACpB,MAAM,gBAAgB,CAAC;AACxB,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAChD,OAAO,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AAmCjD,8DAA8D;AAC9D,MAAM,UAAU,SAAS,CAAC,KAAU;IAClC,OAAO,KAAK,IAAI,KAAK,CAAC,KAAK,KAAK,SAAS,CAAC;AAC5C,CAAC;AAED,MAAM,UAAU,cAAc;AAC5B,8DAA8D;AAC9D,KAAU;IAEV,OAAO,OAAO,KAAK,KAAK,UAAU,IAAI,KAAK,CAAC,OAAO,KAAK,SAAS,CAAC;AACpE,CAAC;AAkBD,gBAAgB;AAChB,MAAM,OAAO,WAAW;IAOtB,IAAI,MAAM;QACR,MAAM,KAAK,GACT,IAAI,CAAC,IAAI,CAAC,KAAK,YAAY,UAAU;YACnC,CAAC,CAAC,OAAO,CAAC,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC;YAClC,CAAC,C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C"}
|
package/package.json
CHANGED
package/src/coValues/coMap.ts
CHANGED
@@ -703,7 +703,7 @@ const CoMapProxyHandler: ProxyHandler<CoMap> = {
|
|
703
703
|
} else {
|
704
704
|
const descriptor = (target._schema[key as keyof CoMap["_schema"]] ||
|
705
705
|
target._schema[ItemsSym]) as Schema;
|
706
|
-
if (descriptor || key in target._raw.
|
706
|
+
if (descriptor || key in target._raw.latest) {
|
707
707
|
return {
|
708
708
|
enumerable: true,
|
709
709
|
configurable: true,
|
package/src/coValues/group.ts
CHANGED
@@ -142,6 +142,11 @@ export class Group extends CoValueBase implements CoValue {
|
|
142
142
|
return this;
|
143
143
|
}
|
144
144
|
|
145
|
+
removeMember(member: Everyone | Account) {
|
146
|
+
this._raw.removeMember(member === "everyone" ? member : member._raw);
|
147
|
+
return this;
|
148
|
+
}
|
149
|
+
|
145
150
|
get members() {
|
146
151
|
return this._raw
|
147
152
|
.keys()
|
@@ -172,6 +177,11 @@ export class Group extends CoValueBase implements CoValue {
|
|
172
177
|
});
|
173
178
|
}
|
174
179
|
|
180
|
+
extend(parent: Group) {
|
181
|
+
this._raw.extend(parent._raw);
|
182
|
+
return this;
|
183
|
+
}
|
184
|
+
|
175
185
|
/** @category Subscription & Loading */
|
176
186
|
static load<G extends Group, Depth>(
|
177
187
|
this: CoValueClass<G>,
|
@@ -228,6 +228,7 @@ export function subscribeToCoValue<V extends CoValue, Depth>(
|
|
228
228
|
|
229
229
|
export function createCoValueObservable<V extends CoValue, Depth>() {
|
230
230
|
let currentValue: DeeplyLoaded<V, Depth> | undefined = undefined;
|
231
|
+
let subscriberCount = 0;
|
231
232
|
|
232
233
|
function subscribe(
|
233
234
|
cls: CoValueClass<V>,
|
@@ -237,6 +238,8 @@ export function createCoValueObservable<V extends CoValue, Depth>() {
|
|
237
238
|
listener: () => void,
|
238
239
|
onUnavailable?: () => void,
|
239
240
|
) {
|
241
|
+
subscriberCount++;
|
242
|
+
|
240
243
|
const unsubscribe = subscribeToCoValue(
|
241
244
|
cls,
|
242
245
|
id,
|
@@ -249,7 +252,13 @@ export function createCoValueObservable<V extends CoValue, Depth>() {
|
|
249
252
|
onUnavailable,
|
250
253
|
);
|
251
254
|
|
252
|
-
return
|
255
|
+
return () => {
|
256
|
+
unsubscribe();
|
257
|
+
subscriberCount--;
|
258
|
+
if (subscriberCount === 0) {
|
259
|
+
currentValue = undefined;
|
260
|
+
}
|
261
|
+
};
|
253
262
|
}
|
254
263
|
|
255
264
|
const observable = {
|
@@ -1,5 +1,7 @@
|
|
1
|
+
import { RawGroup } from "cojson";
|
1
2
|
import { describe, expect, test } from "vitest";
|
2
3
|
import { Account, CoMap, Group, WasmCrypto, co } from "../index.web.js";
|
4
|
+
import { waitFor } from "./utils.js";
|
3
5
|
|
4
6
|
const Crypto = await WasmCrypto.create();
|
5
7
|
|
@@ -85,3 +87,144 @@ describe("Custom accounts and groups", async () => {
|
|
85
87
|
expect(map._owner.castAs(CustomGroup).nMembers).toBe(2);
|
86
88
|
});
|
87
89
|
});
|
90
|
+
|
91
|
+
describe("Group inheritance", () => {
|
92
|
+
class TestMap extends CoMap {
|
93
|
+
title = co.string;
|
94
|
+
}
|
95
|
+
|
96
|
+
test("Group inheritance", async () => {
|
97
|
+
const me = await Account.create({
|
98
|
+
creationProps: { name: "Hermes Puggington" },
|
99
|
+
crypto: Crypto,
|
100
|
+
});
|
101
|
+
|
102
|
+
const parentGroup = Group.create({ owner: me });
|
103
|
+
const group = Group.create({ owner: me });
|
104
|
+
|
105
|
+
group.extend(parentGroup);
|
106
|
+
|
107
|
+
const reader = await Account.createAs(me, {
|
108
|
+
creationProps: { name: "Reader" },
|
109
|
+
});
|
110
|
+
|
111
|
+
parentGroup.addMember(reader, "reader");
|
112
|
+
|
113
|
+
const mapInChild = TestMap.create({ title: "In Child" }, { owner: group });
|
114
|
+
|
115
|
+
const mapAsReader = await TestMap.load(mapInChild.id, reader, {});
|
116
|
+
expect(mapAsReader?.title).toBe("In Child");
|
117
|
+
|
118
|
+
parentGroup.removeMember(reader);
|
119
|
+
|
120
|
+
mapInChild.title = "In Child (updated)";
|
121
|
+
|
122
|
+
const mapAsReaderAfterUpdate = await TestMap.load(
|
123
|
+
mapInChild.id,
|
124
|
+
reader,
|
125
|
+
{},
|
126
|
+
);
|
127
|
+
expect(mapAsReaderAfterUpdate?.title).toBe("In Child");
|
128
|
+
});
|
129
|
+
|
130
|
+
test("Group inheritance with grand-children", async () => {
|
131
|
+
const me = await Account.create({
|
132
|
+
creationProps: { name: "Hermes Puggington" },
|
133
|
+
crypto: Crypto,
|
134
|
+
});
|
135
|
+
|
136
|
+
const grandParentGroup = Group.create({ owner: me });
|
137
|
+
const parentGroup = Group.create({ owner: me });
|
138
|
+
const group = Group.create({ owner: me });
|
139
|
+
|
140
|
+
group.extend(parentGroup);
|
141
|
+
parentGroup.extend(grandParentGroup);
|
142
|
+
|
143
|
+
const reader = await Account.createAs(me, {
|
144
|
+
creationProps: { name: "Reader" },
|
145
|
+
});
|
146
|
+
|
147
|
+
grandParentGroup.addMember(reader, "reader");
|
148
|
+
|
149
|
+
const mapInGrandChild = TestMap.create(
|
150
|
+
{ title: "In Grand Child" },
|
151
|
+
{ owner: group },
|
152
|
+
);
|
153
|
+
|
154
|
+
const mapAsReader = await TestMap.load(mapInGrandChild.id, reader, {});
|
155
|
+
expect(mapAsReader?.title).toBe("In Grand Child");
|
156
|
+
|
157
|
+
grandParentGroup.removeMember(reader);
|
158
|
+
|
159
|
+
mapInGrandChild.title = "In Grand Child (updated)";
|
160
|
+
|
161
|
+
const mapAsReaderAfterUpdate = await TestMap.load(
|
162
|
+
mapInGrandChild.id,
|
163
|
+
reader,
|
164
|
+
{},
|
165
|
+
);
|
166
|
+
expect(mapAsReaderAfterUpdate?.title).toBe("In Grand Child");
|
167
|
+
});
|
168
|
+
|
169
|
+
test("Group inheritance should fail if the current account doesn't have admin role in both groups", async () => {
|
170
|
+
const me = await Account.create({
|
171
|
+
creationProps: { name: "Hermes Puggington" },
|
172
|
+
crypto: Crypto,
|
173
|
+
});
|
174
|
+
|
175
|
+
const other = await Account.createAs(me, {
|
176
|
+
creationProps: { name: "Another user" },
|
177
|
+
});
|
178
|
+
|
179
|
+
const parentGroup = Group.create({ owner: me });
|
180
|
+
parentGroup.addMember(other, "writer");
|
181
|
+
const group = Group.create({ owner: me });
|
182
|
+
group.addMember(other, "admin");
|
183
|
+
|
184
|
+
const parentGroupOnTheOtherSide = await Group.load(
|
185
|
+
parentGroup.id,
|
186
|
+
other,
|
187
|
+
{},
|
188
|
+
);
|
189
|
+
const groupOnTheOtherSide = await Group.load(group.id, other, {});
|
190
|
+
|
191
|
+
if (!groupOnTheOtherSide || !parentGroupOnTheOtherSide) {
|
192
|
+
throw new Error("CoValue not available");
|
193
|
+
}
|
194
|
+
|
195
|
+
expect(() => groupOnTheOtherSide.extend(parentGroupOnTheOtherSide)).toThrow(
|
196
|
+
"To extend a group, the current account must have admin role in both groups",
|
197
|
+
);
|
198
|
+
});
|
199
|
+
|
200
|
+
test("Group inheritance should work if the current account has admin role in both groups", async () => {
|
201
|
+
const me = await Account.create({
|
202
|
+
creationProps: { name: "Hermes Puggington" },
|
203
|
+
crypto: Crypto,
|
204
|
+
});
|
205
|
+
|
206
|
+
const other = await Account.createAs(me, {
|
207
|
+
creationProps: { name: "Another user" },
|
208
|
+
});
|
209
|
+
|
210
|
+
const parentGroup = Group.create({ owner: me });
|
211
|
+
parentGroup.addMember(other, "admin");
|
212
|
+
const group = Group.create({ owner: me });
|
213
|
+
group.addMember(other, "admin");
|
214
|
+
|
215
|
+
const parentGroupOnTheOtherSide = await Group.load(
|
216
|
+
parentGroup.id,
|
217
|
+
other,
|
218
|
+
{},
|
219
|
+
);
|
220
|
+
const groupOnTheOtherSide = await Group.load(group.id, other, {});
|
221
|
+
|
222
|
+
if (!groupOnTheOtherSide || !parentGroupOnTheOtherSide) {
|
223
|
+
throw new Error("CoValue not available");
|
224
|
+
}
|
225
|
+
|
226
|
+
expect(() =>
|
227
|
+
groupOnTheOtherSide.extend(parentGroupOnTheOtherSide),
|
228
|
+
).not.toThrow();
|
229
|
+
});
|
230
|
+
});
|
@@ -1,23 +1,13 @@
|
|
1
|
-
const Crypto = await WasmCrypto.create();
|
2
|
-
import { connectedPeers } from "cojson/src/streamUtils.js";
|
3
1
|
import { describe, expect, it, onTestFinished, vi } from "vitest";
|
2
|
+
import { Account, CoFeed, CoList, CoMap, co } from "../index.web.js";
|
4
3
|
import {
|
5
|
-
|
6
|
-
CoFeed,
|
7
|
-
CoList,
|
8
|
-
CoMap,
|
9
|
-
WasmCrypto,
|
10
|
-
co,
|
11
|
-
createJazzContext,
|
12
|
-
fixedCredentialsAuth,
|
13
|
-
isControlledAccount,
|
14
|
-
} from "../index.web.js";
|
15
|
-
import {
|
4
|
+
type DepthsIn,
|
16
5
|
FileStream,
|
17
6
|
Group,
|
18
|
-
|
7
|
+
createCoValueObservable,
|
19
8
|
subscribeToCoValue,
|
20
9
|
} from "../internal.js";
|
10
|
+
import { setupAccount, waitFor } from "./utils.js";
|
21
11
|
|
22
12
|
class ChatRoom extends CoMap {
|
23
13
|
messages = co.ref(MessagesList);
|
@@ -33,34 +23,6 @@ class Message extends CoMap {
|
|
33
23
|
class MessagesList extends CoList.Of(co.ref(Message)) {}
|
34
24
|
class ReactionsStream extends CoFeed.Of(co.string) {}
|
35
25
|
|
36
|
-
async function setupAccount() {
|
37
|
-
const me = await Account.create({
|
38
|
-
creationProps: { name: "Hermes Puggington" },
|
39
|
-
crypto: Crypto,
|
40
|
-
});
|
41
|
-
|
42
|
-
const [initialAsPeer, secondPeer] = connectedPeers("initial", "second", {
|
43
|
-
peer1role: "server",
|
44
|
-
peer2role: "client",
|
45
|
-
});
|
46
|
-
|
47
|
-
if (!isControlledAccount(me)) {
|
48
|
-
throw "me is not a controlled account";
|
49
|
-
}
|
50
|
-
me._raw.core.node.syncManager.addPeer(secondPeer);
|
51
|
-
const { account: meOnSecondPeer } = await createJazzContext({
|
52
|
-
auth: fixedCredentialsAuth({
|
53
|
-
accountID: me.id,
|
54
|
-
secret: me._raw.agentSecret,
|
55
|
-
}),
|
56
|
-
sessionProvider: randomSessionProvider,
|
57
|
-
peersToLoadFrom: [initialAsPeer],
|
58
|
-
crypto: Crypto,
|
59
|
-
});
|
60
|
-
|
61
|
-
return { me, meOnSecondPeer };
|
62
|
-
}
|
63
|
-
|
64
26
|
function createChatRoom(me: Account | Group, name: string) {
|
65
27
|
return ChatRoom.create(
|
66
28
|
{ messages: MessagesList.create([], { owner: me }), name },
|
@@ -332,30 +294,69 @@ describe("subscribeToCoValue", () => {
|
|
332
294
|
});
|
333
295
|
});
|
334
296
|
|
335
|
-
|
336
|
-
|
337
|
-
|
338
|
-
|
339
|
-
|
340
|
-
|
341
|
-
|
342
|
-
|
343
|
-
|
344
|
-
|
345
|
-
|
346
|
-
|
347
|
-
|
348
|
-
const { ok, error } = checkPassed();
|
349
|
-
|
350
|
-
if (ok !== false) {
|
351
|
-
clearInterval(interval);
|
352
|
-
resolve();
|
353
|
-
}
|
354
|
-
|
355
|
-
if (++retries > 10) {
|
356
|
-
clearInterval(interval);
|
357
|
-
reject(error);
|
358
|
-
}
|
359
|
-
}, 100);
|
297
|
+
describe("createCoValueObservable", () => {
|
298
|
+
class TestMap extends CoMap {
|
299
|
+
color = co.string;
|
300
|
+
}
|
301
|
+
|
302
|
+
function createTestMap(me: Account | Group) {
|
303
|
+
return TestMap.create({ color: "red" }, { owner: me });
|
304
|
+
}
|
305
|
+
|
306
|
+
it("should return undefined when there are no subscribers", async () => {
|
307
|
+
const observable = createCoValueObservable();
|
308
|
+
|
309
|
+
expect(observable.getCurrentValue()).toBeUndefined();
|
360
310
|
});
|
361
|
-
|
311
|
+
|
312
|
+
it("should update currentValue when subscribed", async () => {
|
313
|
+
const { me, meOnSecondPeer } = await setupAccount();
|
314
|
+
const testMap = createTestMap(me);
|
315
|
+
const observable = createCoValueObservable<TestMap, DepthsIn<TestMap>>();
|
316
|
+
const mockListener = vi.fn();
|
317
|
+
|
318
|
+
const unsubscribe = observable.subscribe(
|
319
|
+
TestMap,
|
320
|
+
testMap.id,
|
321
|
+
meOnSecondPeer,
|
322
|
+
{},
|
323
|
+
() => {
|
324
|
+
mockListener();
|
325
|
+
},
|
326
|
+
);
|
327
|
+
|
328
|
+
testMap.color = "blue";
|
329
|
+
|
330
|
+
await waitFor(() => mockListener.mock.calls.length > 0);
|
331
|
+
|
332
|
+
expect(observable.getCurrentValue()).toMatchObject({
|
333
|
+
id: testMap.id,
|
334
|
+
color: "blue",
|
335
|
+
});
|
336
|
+
|
337
|
+
unsubscribe();
|
338
|
+
});
|
339
|
+
|
340
|
+
it("should reset to undefined after unsubscribe", async () => {
|
341
|
+
const { me, meOnSecondPeer } = await setupAccount();
|
342
|
+
const testMap = createTestMap(me);
|
343
|
+
const observable = createCoValueObservable<TestMap, DepthsIn<TestMap>>();
|
344
|
+
const mockListener = vi.fn();
|
345
|
+
|
346
|
+
const unsubscribe = observable.subscribe(
|
347
|
+
TestMap,
|
348
|
+
testMap.id,
|
349
|
+
meOnSecondPeer,
|
350
|
+
{},
|
351
|
+
() => {
|
352
|
+
mockListener();
|
353
|
+
},
|
354
|
+
);
|
355
|
+
|
356
|
+
await waitFor(() => mockListener.mock.calls.length > 0);
|
357
|
+
expect(observable.getCurrentValue()).toBeDefined();
|
358
|
+
|
359
|
+
unsubscribe();
|
360
|
+
expect(observable.getCurrentValue()).toBeUndefined();
|
361
|
+
});
|
362
|
+
});
|
@@ -0,0 +1,68 @@
|
|
1
|
+
import { isControlledAccount } from "../coValues/account";
|
2
|
+
|
3
|
+
import { connectedPeers } from "cojson/src/streamUtils.js";
|
4
|
+
import {
|
5
|
+
Account,
|
6
|
+
WasmCrypto,
|
7
|
+
createJazzContext,
|
8
|
+
fixedCredentialsAuth,
|
9
|
+
randomSessionProvider,
|
10
|
+
} from "../index.web";
|
11
|
+
|
12
|
+
const Crypto = await WasmCrypto.create();
|
13
|
+
|
14
|
+
export async function setupAccount() {
|
15
|
+
const me = await Account.create({
|
16
|
+
creationProps: { name: "Hermes Puggington" },
|
17
|
+
crypto: Crypto,
|
18
|
+
});
|
19
|
+
|
20
|
+
const [initialAsPeer, secondPeer] = connectedPeers("initial", "second", {
|
21
|
+
peer1role: "server",
|
22
|
+
peer2role: "client",
|
23
|
+
});
|
24
|
+
|
25
|
+
if (!isControlledAccount(me)) {
|
26
|
+
throw "me is not a controlled account";
|
27
|
+
}
|
28
|
+
me._raw.core.node.syncManager.addPeer(secondPeer);
|
29
|
+
const { account: meOnSecondPeer } = await createJazzContext({
|
30
|
+
auth: fixedCredentialsAuth({
|
31
|
+
accountID: me.id,
|
32
|
+
secret: me._raw.agentSecret,
|
33
|
+
}),
|
34
|
+
sessionProvider: randomSessionProvider,
|
35
|
+
peersToLoadFrom: [initialAsPeer],
|
36
|
+
crypto: Crypto,
|
37
|
+
});
|
38
|
+
|
39
|
+
return { me, meOnSecondPeer };
|
40
|
+
}
|
41
|
+
|
42
|
+
export function waitFor(callback: () => boolean | void) {
|
43
|
+
return new Promise<void>((resolve, reject) => {
|
44
|
+
const checkPassed = () => {
|
45
|
+
try {
|
46
|
+
return { ok: callback(), error: null };
|
47
|
+
} catch (error) {
|
48
|
+
return { ok: false, error };
|
49
|
+
}
|
50
|
+
};
|
51
|
+
|
52
|
+
let retries = 0;
|
53
|
+
|
54
|
+
const interval = setInterval(() => {
|
55
|
+
const { ok, error } = checkPassed();
|
56
|
+
|
57
|
+
if (ok !== false) {
|
58
|
+
clearInterval(interval);
|
59
|
+
resolve();
|
60
|
+
}
|
61
|
+
|
62
|
+
if (++retries > 10) {
|
63
|
+
clearInterval(interval);
|
64
|
+
reject(error);
|
65
|
+
}
|
66
|
+
}, 100);
|
67
|
+
});
|
68
|
+
}
|