jazz-tools 0.7.0-alpha.27 → 0.7.0-alpha.28
Sign up to get free protection for your applications and to get access to all the features.
- package/.turbo/turbo-build.log +39 -36
- package/CHANGELOG.md +8 -0
- package/dist/coValues/account.js +15 -8
- package/dist/coValues/account.js.map +1 -1
- package/dist/coValues/group.js +26 -1
- package/dist/coValues/group.js.map +1 -1
- package/dist/implementation/schema.js +5 -3
- package/dist/implementation/schema.js.map +1 -1
- package/dist/implementation/symbols.js +5 -0
- package/dist/implementation/symbols.js.map +1 -0
- package/dist/internal.js +1 -0
- package/dist/internal.js.map +1 -1
- package/dist/tests/coList.test.js +2 -2
- package/dist/tests/coList.test.js.map +1 -1
- package/dist/tests/coMap.test.js +15 -16
- package/dist/tests/coMap.test.js.map +1 -1
- package/dist/tests/coStream.test.js +4 -4
- package/dist/tests/coStream.test.js.map +1 -1
- package/dist/tests/groupsAndAccounts.test.js +70 -0
- package/dist/tests/groupsAndAccounts.test.js.map +1 -0
- package/package.json +2 -2
- package/src/coValues/account.ts +21 -10
- package/src/coValues/group.ts +62 -16
- package/src/implementation/schema.ts +5 -9
- package/src/implementation/symbols.ts +12 -0
- package/src/internal.ts +1 -0
- package/src/tests/coList.test.ts +2 -2
- package/src/tests/coMap.test.ts +24 -19
- package/src/tests/coStream.test.ts +4 -4
- package/src/tests/groupsAndAccounts.test.ts +77 -0
@@ -13,7 +13,7 @@ beforeEach(async () => {
|
|
13
13
|
});
|
14
14
|
describe("Simple CoStream operations", async () => {
|
15
15
|
const me = await Account.create({
|
16
|
-
name: "Hermes Puggington",
|
16
|
+
creationProps: { name: "Hermes Puggington" },
|
17
17
|
});
|
18
18
|
class TestStream extends CoStream.Of(co.string) {
|
19
19
|
}
|
@@ -45,7 +45,7 @@ describe("CoStream resolution", async () => {
|
|
45
45
|
}
|
46
46
|
const initNodeAndStream = async () => {
|
47
47
|
const me = await Account.create({
|
48
|
-
name: "Hermes Puggington",
|
48
|
+
creationProps: { name: "Hermes Puggington" },
|
49
49
|
});
|
50
50
|
const stream = new TestStream([
|
51
51
|
new NestedStream([new TwiceNestedStream(["milk"], { owner: me })], { owner: me }),
|
@@ -144,7 +144,7 @@ describe("CoStream resolution", async () => {
|
|
144
144
|
});
|
145
145
|
describe("Simple BinaryCoStream operations", async () => {
|
146
146
|
const me = await Account.create({
|
147
|
-
name: "Hermes Puggington",
|
147
|
+
creationProps: { name: "Hermes Puggington" },
|
148
148
|
});
|
149
149
|
const stream = new BinaryCoStream(undefined, { owner: me });
|
150
150
|
test("Construction", () => {
|
@@ -167,7 +167,7 @@ describe("Simple BinaryCoStream operations", async () => {
|
|
167
167
|
describe("BinaryCoStream loading & Subscription", async () => {
|
168
168
|
const initNodeAndStream = async () => {
|
169
169
|
const me = await Account.create({
|
170
|
-
name: "Hermes Puggington",
|
170
|
+
creationProps: { name: "Hermes Puggington" },
|
171
171
|
});
|
172
172
|
const stream = new BinaryCoStream(undefined, { owner: me });
|
173
173
|
stream.start({ mimeType: "text/plain" });
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"coStream.test.js","sourceRoot":"","sources":["../../src/tests/coStream.test.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,QAAQ,EAAE,IAAI,EAAE,UAAU,EAAE,MAAM,QAAQ,CAAC;AAE5D,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AACxC,OAAO,EAAE,cAAc,EAAE,MAAM,2BAA2B,CAAC;AAC3D,OAAO,EAAE,kBAAkB,EAAE,MAAM,2BAA2B,CAAC;AAC/D,OAAO,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,QAAQ,CAAC;AACvC,OAAO,EAAE,cAAc,EAAM,OAAO,EAAE,SAAS,EAAE,QAAQ,EAAE,EAAE,EAAE,MAAM,IAAI,CAAC;AAG1E,IAAI,CAAC,CAAC,QAAQ,IAAI,UAAU,CAAC,EAAE,CAAC;IAC5B,8DAA8D;IAC7D,UAAkB,CAAC,MAAM,GAAG,SAAS,CAAC;AAC3C,CAAC;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C,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,CAAC;oBACzB,IAAI,UAAU,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,CAAC;iBAC5B;gBACD,cAAc,EAAE,SAAS;gBACzB,QAAQ,EAAE,IAAI;aACjB,CAAC,CAAC;QACP,CAAC,CAAC,CACL,CAAC;IACN,CAAC,CAAC,CAAC;AACP,CAAC,CAAC,CAAC"}
|
@@ -0,0 +1,70 @@
|
|
1
|
+
import { expect, describe, test, beforeEach } from "vitest";
|
2
|
+
import { webcrypto } from "node:crypto";
|
3
|
+
import { Account, jazzReady, CoMap, co, Group } from "..";
|
4
|
+
if (!("crypto" in globalThis)) {
|
5
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
6
|
+
globalThis.crypto = webcrypto;
|
7
|
+
}
|
8
|
+
beforeEach(async () => {
|
9
|
+
await jazzReady;
|
10
|
+
});
|
11
|
+
describe("Custom accounts and groups", async () => {
|
12
|
+
var _a;
|
13
|
+
class CustomProfile extends CoMap {
|
14
|
+
constructor() {
|
15
|
+
super(...arguments);
|
16
|
+
this.name = co.string;
|
17
|
+
this.color = co.string;
|
18
|
+
}
|
19
|
+
}
|
20
|
+
class CustomAccount extends Account {
|
21
|
+
constructor() {
|
22
|
+
super(...arguments);
|
23
|
+
this.profile = co.ref(CustomProfile);
|
24
|
+
this.root = co.ref(CoMap);
|
25
|
+
}
|
26
|
+
migrate(creationProps) {
|
27
|
+
if (creationProps) {
|
28
|
+
const profileGroup = new Group({ owner: this });
|
29
|
+
profileGroup.addMember("everyone", "reader");
|
30
|
+
this.profile = new CustomProfile({ name: creationProps.name, color: "blue" }, { owner: this });
|
31
|
+
}
|
32
|
+
}
|
33
|
+
}
|
34
|
+
class CustomGroup extends Group {
|
35
|
+
constructor() {
|
36
|
+
super(...arguments);
|
37
|
+
this.profile = co.null;
|
38
|
+
this.root = co.null;
|
39
|
+
this[_a] = co.ref(CustomAccount);
|
40
|
+
}
|
41
|
+
}
|
42
|
+
_a = co.members;
|
43
|
+
test("Custom account and group", async () => {
|
44
|
+
const me = await CustomAccount.create({
|
45
|
+
creationProps: { name: "Hermes Puggington" },
|
46
|
+
});
|
47
|
+
expect(me.profile).toBeDefined();
|
48
|
+
expect(me.profile?.name).toBe("Hermes Puggington");
|
49
|
+
expect(me.profile?.color).toBe("blue");
|
50
|
+
const group = new CustomGroup({ owner: me });
|
51
|
+
group.addMember("everyone", "reader");
|
52
|
+
expect(group.members).toMatchObject([
|
53
|
+
{ id: me.id, role: "admin" },
|
54
|
+
{ id: "everyone", role: "reader" },
|
55
|
+
]);
|
56
|
+
await new Promise((resolve) => {
|
57
|
+
group.subscribe((update) => {
|
58
|
+
const myProfile = update.members.find((member) => {
|
59
|
+
return member.id === me.id && member.account?.profile;
|
60
|
+
});
|
61
|
+
if (myProfile) {
|
62
|
+
expect(myProfile.account?.profile?.name).toBe("Hermes Puggington");
|
63
|
+
expect(myProfile.account?.profile?.color).toBe("blue");
|
64
|
+
resolve();
|
65
|
+
}
|
66
|
+
});
|
67
|
+
});
|
68
|
+
});
|
69
|
+
});
|
70
|
+
//# sourceMappingURL=groupsAndAccounts.test.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"groupsAndAccounts.test.js","sourceRoot":"","sources":["../../src/tests/groupsAndAccounts.test.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,QAAQ,EAAE,IAAI,EAAE,UAAU,EAAE,MAAM,QAAQ,CAAC;AAE5D,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AACxC,OAAO,EAAE,OAAO,EAAE,SAAS,EAAE,KAAK,EAAE,EAAE,EAAE,KAAK,EAAE,MAAM,IAAI,CAAC;AAE1D,IAAI,CAAC,CAAC,QAAQ,IAAI,UAAU,CAAC,EAAE,CAAC;IAC5B,8DAA8D;IAC7D,UAAkB,CAAC,MAAM,GAAG,SAAS,CAAC;AAC3C,CAAC;AAED,UAAU,CAAC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CAAC,CAAC,CAAC;IACP,CAAC,CAAC,CAAC;AACP,CAAC,CAAC,CAAC"}
|
package/package.json
CHANGED
@@ -5,12 +5,12 @@
|
|
5
5
|
"types": "src/index.ts",
|
6
6
|
"type": "module",
|
7
7
|
"license": "MIT",
|
8
|
-
"version": "0.7.0-alpha.
|
8
|
+
"version": "0.7.0-alpha.28",
|
9
9
|
"dependencies": {
|
10
10
|
"@effect/schema": "^0.66.6",
|
11
11
|
"fast-check": "^3.17.2",
|
12
12
|
"effect": "^3.0",
|
13
|
-
"cojson": "0.7.0-alpha.
|
13
|
+
"cojson": "0.7.0-alpha.28"
|
14
14
|
},
|
15
15
|
"devDependencies": {
|
16
16
|
"typescript": "^5.3.3",
|
package/src/coValues/account.ts
CHANGED
@@ -16,14 +16,15 @@ import type {
|
|
16
16
|
CoValue,
|
17
17
|
CoValueClass,
|
18
18
|
Schema,
|
19
|
-
Group,
|
20
19
|
ID,
|
21
20
|
RefEncoded,
|
22
21
|
SubclassedConstructor,
|
23
22
|
UnavailableError,
|
24
23
|
} from "../internal.js";
|
25
24
|
import {
|
25
|
+
Group,
|
26
26
|
CoValueBase,
|
27
|
+
MembersSym,
|
27
28
|
Profile,
|
28
29
|
Ref,
|
29
30
|
SchemaInit,
|
@@ -182,19 +183,19 @@ export class Account<
|
|
182
183
|
static async create<A extends Account>(
|
183
184
|
this: SubclassedConstructor<A> & typeof Account,
|
184
185
|
options: {
|
185
|
-
name: string;
|
186
|
+
creationProps: { name: string };
|
186
187
|
initialAgentSecret?: AgentSecret;
|
187
188
|
peersToLoadFrom?: Peer[];
|
188
189
|
}
|
189
190
|
): Promise<A & Me> {
|
190
191
|
const { node } = await LocalNode.withNewlyCreatedAccount({
|
191
192
|
...options,
|
192
|
-
migration: async (rawAccount) => {
|
193
|
+
migration: async (rawAccount, _node, creationProps) => {
|
193
194
|
const account = new this(undefined, {
|
194
195
|
fromRaw: rawAccount,
|
195
196
|
}) as A & Me;
|
196
197
|
|
197
|
-
await account.migrate?.();
|
198
|
+
await account.migrate?.(creationProps);
|
198
199
|
},
|
199
200
|
});
|
200
201
|
|
@@ -215,12 +216,12 @@ export class Account<
|
|
215
216
|
accountSecret: options.accountSecret,
|
216
217
|
sessionID: options.sessionID,
|
217
218
|
peersToLoadFrom: options.peersToLoadFrom,
|
218
|
-
migration: async (rawAccount) => {
|
219
|
+
migration: async (rawAccount, _node, creationProps) => {
|
219
220
|
const account = new this(undefined, {
|
220
221
|
fromRaw: rawAccount,
|
221
222
|
}) as A & Me;
|
222
223
|
|
223
|
-
await account.migrate?.();
|
224
|
+
await account.migrate?.(creationProps);
|
224
225
|
},
|
225
226
|
});
|
226
227
|
|
@@ -247,7 +248,16 @@ export class Account<
|
|
247
248
|
return this.toJSON();
|
248
249
|
}
|
249
250
|
|
250
|
-
migrate:
|
251
|
+
migrate(creationProps?: { name: string }): void | Promise<void> {
|
252
|
+
if (creationProps) {
|
253
|
+
const profileGroup = new Group({ owner: this });
|
254
|
+
profileGroup.addMember("everyone", "reader");
|
255
|
+
this.profile = new Profile(
|
256
|
+
{ name: creationProps.name },
|
257
|
+
{ owner: profileGroup }
|
258
|
+
);
|
259
|
+
}
|
260
|
+
}
|
251
261
|
}
|
252
262
|
|
253
263
|
export const AccountAndGroupProxyHandler: ProxyHandler<Account | Group> = {
|
@@ -264,7 +274,7 @@ export const AccountAndGroupProxyHandler: ProxyHandler<Account | Group> = {
|
|
264
274
|
},
|
265
275
|
set(target, key, value, receiver) {
|
266
276
|
if (
|
267
|
-
(key === "profile" || key === "root") &&
|
277
|
+
(key === "profile" || key === "root" || key === MembersSym) &&
|
268
278
|
typeof value === "object" &&
|
269
279
|
SchemaInit in value
|
270
280
|
) {
|
@@ -276,7 +286,8 @@ export const AccountAndGroupProxyHandler: ProxyHandler<Account | Group> = {
|
|
276
286
|
if (value) {
|
277
287
|
target._raw.set(
|
278
288
|
"profile",
|
279
|
-
value.id as unknown as CoID<RawCoMap
|
289
|
+
value.id as unknown as CoID<RawCoMap>,
|
290
|
+
"trusting"
|
280
291
|
);
|
281
292
|
}
|
282
293
|
subscriptionsScopes.get(receiver)?.onRefAccessedOrSet(value.id);
|
@@ -293,7 +304,7 @@ export const AccountAndGroupProxyHandler: ProxyHandler<Account | Group> = {
|
|
293
304
|
},
|
294
305
|
defineProperty(target, key, descriptor) {
|
295
306
|
if (
|
296
|
-
(key === "profile" || key === "root") &&
|
307
|
+
(key === "profile" || key === "root" || key === MembersSym) &&
|
297
308
|
typeof descriptor.value === "object" &&
|
298
309
|
SchemaInit in descriptor.value
|
299
310
|
) {
|
package/src/coValues/group.ts
CHANGED
@@ -1,5 +1,11 @@
|
|
1
|
-
import type { Everyone, RawGroup, Role } from "cojson";
|
2
|
-
import type {
|
1
|
+
import type { AccountID, Everyone, RawGroup, Role } from "cojson";
|
2
|
+
import type {
|
3
|
+
CoValue,
|
4
|
+
ID,
|
5
|
+
JsonEncoded,
|
6
|
+
RefEncoded,
|
7
|
+
Schema,
|
8
|
+
} from "../internal.js";
|
3
9
|
import {
|
4
10
|
Account,
|
5
11
|
CoMap,
|
@@ -8,16 +14,32 @@ import {
|
|
8
14
|
co,
|
9
15
|
isControlledAccount,
|
10
16
|
AccountAndGroupProxyHandler,
|
17
|
+
MembersSym,
|
11
18
|
} from "../internal.js";
|
12
19
|
|
13
20
|
export class Profile extends CoMap<{ name: co<string> }> {
|
14
21
|
name = co.string;
|
15
22
|
}
|
16
23
|
|
24
|
+
type GroupSchema<Def extends Group> = {
|
25
|
+
profile: NonNullable<Def["profile"]> extends CoValue
|
26
|
+
? RefEncoded<NonNullable<Def["profile"]>>
|
27
|
+
: JsonEncoded;
|
28
|
+
root: NonNullable<Def["root"]> extends CoValue
|
29
|
+
? RefEncoded<NonNullable<Def["root"]>>
|
30
|
+
: JsonEncoded;
|
31
|
+
[MembersSym]: RefEncoded<NonNullable<Def[MembersSym]>>;
|
32
|
+
};
|
33
|
+
|
17
34
|
export class Group<
|
18
|
-
Def extends {
|
35
|
+
Def extends {
|
19
36
|
profile: Profile | null;
|
20
37
|
root: CoMap | null;
|
38
|
+
[MembersSym]: Account | null;
|
39
|
+
} = {
|
40
|
+
profile: Profile | null;
|
41
|
+
root: CoMap | null;
|
42
|
+
[MembersSym]: Account | null;
|
21
43
|
},
|
22
44
|
>
|
23
45
|
extends CoValueBase
|
@@ -31,31 +53,23 @@ export class Group<
|
|
31
53
|
declare _raw: RawGroup;
|
32
54
|
|
33
55
|
static _schema: any;
|
34
|
-
get _schema(): {
|
35
|
-
profile: Def["profile"] extends CoValue
|
36
|
-
? RefEncoded<Def["profile"]>
|
37
|
-
: JsonEncoded;
|
38
|
-
root: Def["root"] extends CoValue
|
39
|
-
? RefEncoded<Def["root"]>
|
40
|
-
: JsonEncoded;
|
41
|
-
} {
|
56
|
+
get _schema(): GroupSchema<this> {
|
42
57
|
return (this.constructor as typeof Group)._schema;
|
43
58
|
}
|
44
59
|
static {
|
45
60
|
this._schema = {
|
46
61
|
profile: "json" satisfies Schema,
|
47
62
|
root: "json" satisfies Schema,
|
63
|
+
[MembersSym]: () => Account satisfies Schema,
|
48
64
|
} as any;
|
49
65
|
Object.defineProperty(this.prototype, "_schema", {
|
50
66
|
get: () => this._schema,
|
51
67
|
});
|
52
68
|
}
|
53
69
|
|
54
|
-
profile
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
root!: Def["root"] extends CoMap ? Def["root"] | null : undefined;
|
70
|
+
declare profile: Def["profile"] | null;
|
71
|
+
declare root: Def["root"] | null;
|
72
|
+
declare [MembersSym]: Def[MembersSym] | null;
|
59
73
|
|
60
74
|
get _refs(): {
|
61
75
|
profile: Def["profile"] extends Profile ? Ref<Def["profile"]> : never;
|
@@ -136,4 +150,36 @@ export class Group<
|
|
136
150
|
addMember(member: Everyone | Account, role: Role) {
|
137
151
|
this._raw.addMember(member === "everyone" ? member : member._raw, role);
|
138
152
|
}
|
153
|
+
|
154
|
+
get members() {
|
155
|
+
return this._raw
|
156
|
+
.keys()
|
157
|
+
.filter((key) => {
|
158
|
+
return key === "everyone" || key.startsWith("co_");
|
159
|
+
})
|
160
|
+
.map((id) => {
|
161
|
+
const role = this._raw.get(id as Everyone | AccountID);
|
162
|
+
const accountID =
|
163
|
+
id === "everyone"
|
164
|
+
? undefined
|
165
|
+
: (id as unknown as ID<Account>);
|
166
|
+
const ref =
|
167
|
+
accountID &&
|
168
|
+
new Ref<NonNullable<this[MembersSym]>>(
|
169
|
+
accountID,
|
170
|
+
this._loadedAs,
|
171
|
+
this._schema[MembersSym]
|
172
|
+
);
|
173
|
+
const accessRef = () => ref?.accessFrom(this);
|
174
|
+
|
175
|
+
return {
|
176
|
+
id: id as unknown as Everyone | ID<this[MembersSym]>,
|
177
|
+
role,
|
178
|
+
ref,
|
179
|
+
get account() {
|
180
|
+
return accessRef();
|
181
|
+
},
|
182
|
+
};
|
183
|
+
});
|
184
|
+
}
|
139
185
|
}
|
@@ -10,15 +10,6 @@ export type IfCo<C, R> = C extends infer _A | infer B
|
|
10
10
|
: never
|
11
11
|
: never;
|
12
12
|
|
13
|
-
export const SchemaInit = Symbol.for("SchemaInit");
|
14
|
-
export type SchemaInit = typeof SchemaInit;
|
15
|
-
|
16
|
-
export const InitValues = Symbol.for("InitValues");
|
17
|
-
export type InitValues = typeof InitValues;
|
18
|
-
|
19
|
-
export const ItemsSym = Symbol.for("items");
|
20
|
-
export type ItemsSym = typeof ItemsSym;
|
21
|
-
|
22
13
|
export const co = {
|
23
14
|
string: {
|
24
15
|
[SchemaInit]: "json" satisfies Schema,
|
@@ -29,6 +20,9 @@ export const co = {
|
|
29
20
|
boolean: {
|
30
21
|
[SchemaInit]: "json" satisfies Schema,
|
31
22
|
} as unknown as co<boolean>,
|
23
|
+
null: {
|
24
|
+
[SchemaInit]: "json" satisfies Schema,
|
25
|
+
} as unknown as co<null>,
|
32
26
|
literal: <T extends string | number | boolean>(_lit: T): co<T> => {
|
33
27
|
return { [SchemaInit]: "json" satisfies Schema } as any;
|
34
28
|
},
|
@@ -44,6 +38,7 @@ export const co = {
|
|
44
38
|
return { [SchemaInit]: arg satisfies Schema } as any;
|
45
39
|
},
|
46
40
|
items: ItemsSym as ItemsSym,
|
41
|
+
members: MembersSym as MembersSym,
|
47
42
|
};
|
48
43
|
|
49
44
|
export type JsonEncoded = "json";
|
@@ -89,6 +84,7 @@ export type EffectSchemaWithInputAndOutput<A, I = A> = EffectSchema<
|
|
89
84
|
export type Encoder<V> = EffectSchemaWithInputAndOutput<V, JsonValue>;
|
90
85
|
|
91
86
|
import { Date } from "@effect/schema/Schema";
|
87
|
+
import { SchemaInit, ItemsSym, MembersSym } from "./symbols.js";
|
92
88
|
|
93
89
|
export const Encoders = {
|
94
90
|
Date,
|
@@ -0,0 +1,12 @@
|
|
1
|
+
|
2
|
+
export const SchemaInit = Symbol.for("SchemaInit");
|
3
|
+
export type SchemaInit = typeof SchemaInit;
|
4
|
+
|
5
|
+
export const InitValues = Symbol.for("InitValues");
|
6
|
+
export type InitValues = typeof InitValues;
|
7
|
+
|
8
|
+
export const ItemsSym = Symbol.for("items");
|
9
|
+
export type ItemsSym = typeof ItemsSym;
|
10
|
+
|
11
|
+
export const MembersSym = Symbol.for("members");
|
12
|
+
export type MembersSym = typeof MembersSym;
|
package/src/internal.ts
CHANGED
package/src/tests/coList.test.ts
CHANGED
@@ -17,7 +17,7 @@ beforeEach(async () => {
|
|
17
17
|
|
18
18
|
describe("Simple CoList operations", async () => {
|
19
19
|
const me = await Account.create({
|
20
|
-
name: "Hermes Puggington",
|
20
|
+
creationProps: { name: "Hermes Puggington" },
|
21
21
|
});
|
22
22
|
|
23
23
|
class TestList extends CoList.Of(co.string) {}
|
@@ -126,7 +126,7 @@ describe("CoList resolution", async () => {
|
|
126
126
|
|
127
127
|
const initNodeAndList = async () => {
|
128
128
|
const me = await Account.create({
|
129
|
-
name: "Hermes Puggington",
|
129
|
+
creationProps: { name: "Hermes Puggington" },
|
130
130
|
});
|
131
131
|
|
132
132
|
const list = new TestList(
|
package/src/tests/coMap.test.ts
CHANGED
@@ -17,7 +17,7 @@ beforeEach(async () => {
|
|
17
17
|
|
18
18
|
describe("Simple CoMap operations", async () => {
|
19
19
|
const me = await Account.create({
|
20
|
-
name: "Hermes Puggington",
|
20
|
+
creationProps: { name: "Hermes Puggington" },
|
21
21
|
});
|
22
22
|
|
23
23
|
class TestMap extends CoMap<TestMap> {
|
@@ -50,11 +50,7 @@ describe("Simple CoMap operations", async () => {
|
|
50
50
|
expect(map._height).toEqual(10);
|
51
51
|
expect(map.birthday).toEqual(birthday);
|
52
52
|
expect(map._raw.get("birthday")).toEqual(birthday.toISOString());
|
53
|
-
expect(Object.keys(map)).toEqual([
|
54
|
-
"color",
|
55
|
-
"_height",
|
56
|
-
"birthday",
|
57
|
-
]);
|
53
|
+
expect(Object.keys(map)).toEqual(["color", "_height", "birthday"]);
|
58
54
|
});
|
59
55
|
|
60
56
|
describe("Mutation", () => {
|
@@ -202,7 +198,7 @@ describe("CoMap resolution", async () => {
|
|
202
198
|
|
203
199
|
const initNodeAndMap = async () => {
|
204
200
|
const me = await Account.create({
|
205
|
-
name: "Hermes Puggington",
|
201
|
+
creationProps: { name: "Hermes Puggington" },
|
206
202
|
});
|
207
203
|
|
208
204
|
const map = new TestMap(
|
@@ -394,7 +390,7 @@ describe("CoMap resolution", async () => {
|
|
394
390
|
|
395
391
|
test("Construction with optional", async () => {
|
396
392
|
const me = await Account.create({
|
397
|
-
name: "Hermes Puggington",
|
393
|
+
creationProps: { name: "Hermes Puggington" },
|
398
394
|
});
|
399
395
|
|
400
396
|
const mapWithout = new TestMapWithOptionalRef(
|
@@ -437,7 +433,7 @@ describe("CoMap resolution", async () => {
|
|
437
433
|
|
438
434
|
test("Construction with index signature", async () => {
|
439
435
|
const me = await Account.create({
|
440
|
-
name: "Hermes Puggington",
|
436
|
+
creationProps: { name: "Hermes Puggington" },
|
441
437
|
});
|
442
438
|
|
443
439
|
const record = new TestRecord(
|
@@ -454,18 +450,18 @@ describe("CoMap resolution", async () => {
|
|
454
450
|
expect(record._raw.get("other")).toEqual(3);
|
455
451
|
expect(Object.keys(record)).toEqual(["height", "other"]);
|
456
452
|
expect(record.toJSON()).toMatchObject({
|
457
|
-
|
458
|
-
|
459
|
-
|
460
|
-
|
461
|
-
|
453
|
+
_type: "CoMap",
|
454
|
+
height: 5,
|
455
|
+
id: expect.any(String),
|
456
|
+
other: 3,
|
457
|
+
});
|
462
458
|
});
|
463
459
|
|
464
460
|
class TestRecord2 extends CoMap.Record(co.number) {}
|
465
461
|
|
466
462
|
test("Construction with index signature (shorthand)", async () => {
|
467
463
|
const me = await Account.create({
|
468
|
-
name: "Hermes Puggington",
|
464
|
+
creationProps: { name: "Hermes Puggington" },
|
469
465
|
});
|
470
466
|
|
471
467
|
const record = new TestRecord2(
|
@@ -487,13 +483,19 @@ describe("CoMap resolution", async () => {
|
|
487
483
|
|
488
484
|
test("Construction with index signature ref", async () => {
|
489
485
|
const me = await Account.create({
|
490
|
-
name: "Hermes Puggington",
|
486
|
+
creationProps: { name: "Hermes Puggington" },
|
491
487
|
});
|
492
488
|
|
493
489
|
const record = new TestRecordRef(
|
494
490
|
{
|
495
|
-
firstNested: new TwiceNestedMap(
|
496
|
-
|
491
|
+
firstNested: new TwiceNestedMap(
|
492
|
+
{ taste: "sour" },
|
493
|
+
{ owner: me }
|
494
|
+
),
|
495
|
+
secondNested: new TwiceNestedMap(
|
496
|
+
{ taste: "sweet" },
|
497
|
+
{ owner: me }
|
498
|
+
),
|
497
499
|
},
|
498
500
|
{ owner: me }
|
499
501
|
);
|
@@ -503,6 +505,9 @@ describe("CoMap resolution", async () => {
|
|
503
505
|
expect(record.secondNested?.taste).toEqual("sweet");
|
504
506
|
expect(record.secondNested?.id).toBeDefined();
|
505
507
|
expect(Object.keys(record)).toEqual(["firstNested", "secondNested"]);
|
506
|
-
expect(Object.keys(record._refs)).toEqual([
|
508
|
+
expect(Object.keys(record._refs)).toEqual([
|
509
|
+
"firstNested",
|
510
|
+
"secondNested",
|
511
|
+
]);
|
507
512
|
});
|
508
513
|
});
|
@@ -18,7 +18,7 @@ beforeEach(async () => {
|
|
18
18
|
|
19
19
|
describe("Simple CoStream operations", async () => {
|
20
20
|
const me = await Account.create({
|
21
|
-
name: "Hermes Puggington",
|
21
|
+
creationProps: { name: "Hermes Puggington" },
|
22
22
|
});
|
23
23
|
|
24
24
|
class TestStream extends CoStream.Of(co.string) {}
|
@@ -56,7 +56,7 @@ describe("CoStream resolution", async () => {
|
|
56
56
|
|
57
57
|
const initNodeAndStream = async () => {
|
58
58
|
const me = await Account.create({
|
59
|
-
name: "Hermes Puggington",
|
59
|
+
creationProps: { name: "Hermes Puggington" },
|
60
60
|
});
|
61
61
|
|
62
62
|
const stream = new TestStream(
|
@@ -257,7 +257,7 @@ describe("CoStream resolution", async () => {
|
|
257
257
|
|
258
258
|
describe("Simple BinaryCoStream operations", async () => {
|
259
259
|
const me = await Account.create({
|
260
|
-
name: "Hermes Puggington",
|
260
|
+
creationProps: { name: "Hermes Puggington" },
|
261
261
|
});
|
262
262
|
|
263
263
|
const stream = new BinaryCoStream(undefined, { owner: me });
|
@@ -285,7 +285,7 @@ describe("Simple BinaryCoStream operations", async () => {
|
|
285
285
|
describe("BinaryCoStream loading & Subscription", async () => {
|
286
286
|
const initNodeAndStream = async () => {
|
287
287
|
const me = await Account.create({
|
288
|
-
name: "Hermes Puggington",
|
288
|
+
creationProps: { name: "Hermes Puggington" },
|
289
289
|
});
|
290
290
|
|
291
291
|
const stream = new BinaryCoStream(undefined, { owner: me });
|