jazz-tools 0.8.2 → 0.8.5

Sign up to get free protection for your applications and to get access to all the features.
Files changed (117) hide show
  1. package/.turbo/turbo-build.log +11 -3
  2. package/CHANGELOG.md +17 -0
  3. package/dist/native/coValues/account.js.map +1 -0
  4. package/dist/native/coValues/coList.js.map +1 -0
  5. package/dist/native/coValues/coMap.js.map +1 -0
  6. package/dist/{coValues → native/coValues}/coStream.js +1 -0
  7. package/dist/native/coValues/coStream.js.map +1 -0
  8. package/dist/native/coValues/deepLoading.js.map +1 -0
  9. package/dist/native/coValues/extensions/imageDef.js.map +1 -0
  10. package/dist/native/coValues/group.js.map +1 -0
  11. package/dist/native/coValues/interfaces.js.map +1 -0
  12. package/dist/{implementation → native/implementation}/createContext.js +8 -1
  13. package/dist/native/implementation/createContext.js.map +1 -0
  14. package/dist/native/implementation/devtoolsFormatters.js.map +1 -0
  15. package/dist/{implementation → native/implementation}/errors.js.map +1 -1
  16. package/dist/native/implementation/inspect.js.map +1 -0
  17. package/dist/native/implementation/refs.js.map +1 -0
  18. package/dist/{implementation → native/implementation}/schema.js +14 -9
  19. package/dist/native/implementation/schema.js.map +1 -0
  20. package/dist/native/implementation/subscriptionScope.js.map +1 -0
  21. package/dist/native/implementation/symbols.js.map +1 -0
  22. package/dist/native/index.native.js +12 -0
  23. package/dist/native/index.native.js.map +1 -0
  24. package/dist/native/internal.js.map +1 -0
  25. package/dist/web/coValues/account.js +208 -0
  26. package/dist/web/coValues/account.js.map +1 -0
  27. package/dist/web/coValues/coList.js +395 -0
  28. package/dist/web/coValues/coList.js.map +1 -0
  29. package/dist/web/coValues/coMap.js +501 -0
  30. package/dist/web/coValues/coMap.js.map +1 -0
  31. package/dist/web/coValues/coStream.js +413 -0
  32. package/dist/web/coValues/coStream.js.map +1 -0
  33. package/dist/web/coValues/deepLoading.js +60 -0
  34. package/dist/web/coValues/deepLoading.js.map +1 -0
  35. package/dist/web/coValues/extensions/imageDef.js +37 -0
  36. package/dist/web/coValues/extensions/imageDef.js.map +1 -0
  37. package/dist/web/coValues/group.js +120 -0
  38. package/dist/web/coValues/group.js.map +1 -0
  39. package/dist/web/coValues/interfaces.js +109 -0
  40. package/dist/web/coValues/interfaces.js.map +1 -0
  41. package/dist/web/implementation/createContext.js +151 -0
  42. package/dist/web/implementation/createContext.js.map +1 -0
  43. package/dist/web/implementation/devtoolsFormatters.js +115 -0
  44. package/dist/web/implementation/devtoolsFormatters.js.map +1 -0
  45. package/dist/web/implementation/errors.js +2 -0
  46. package/dist/web/implementation/errors.js.map +1 -0
  47. package/dist/web/implementation/inspect.js +2 -0
  48. package/dist/web/implementation/inspect.js.map +1 -0
  49. package/dist/web/implementation/refs.js +127 -0
  50. package/dist/web/implementation/refs.js.map +1 -0
  51. package/dist/web/implementation/schema.js +96 -0
  52. package/dist/web/implementation/schema.js.map +1 -0
  53. package/dist/web/implementation/subscriptionScope.js +97 -0
  54. package/dist/web/implementation/subscriptionScope.js.map +1 -0
  55. package/dist/web/implementation/symbols.js +4 -0
  56. package/dist/web/implementation/symbols.js.map +1 -0
  57. package/dist/{index.js → web/index.web.js} +3 -3
  58. package/dist/{index.js.map → web/index.web.js.map} +1 -1
  59. package/dist/web/internal.js +17 -0
  60. package/dist/web/internal.js.map +1 -0
  61. package/package.json +25 -7
  62. package/src/coValues/account.ts +4 -1
  63. package/src/coValues/coStream.ts +26 -4
  64. package/src/coValues/group.ts +4 -1
  65. package/src/implementation/createContext.ts +12 -10
  66. package/src/implementation/schema.ts +21 -13
  67. package/src/{index.ts → index.native.ts} +2 -3
  68. package/src/index.web.ts +36 -0
  69. package/src/tests/coList.test.ts +2 -2
  70. package/src/tests/coMap.test.ts +12 -10
  71. package/src/tests/coStream.test.ts +2 -2
  72. package/src/tests/deepLoading.test.ts +2 -2
  73. package/src/tests/groupsAndAccounts.test.ts +1 -1
  74. package/src/tests/schema.test.ts +205 -0
  75. package/tsconfig.json +5 -4
  76. package/tsconfig.native.json +11 -0
  77. package/tsconfig.web.json +11 -0
  78. package/dist/coValues/account.js.map +0 -1
  79. package/dist/coValues/coList.js.map +0 -1
  80. package/dist/coValues/coMap.js.map +0 -1
  81. package/dist/coValues/coStream.js.map +0 -1
  82. package/dist/coValues/deepLoading.js.map +0 -1
  83. package/dist/coValues/extensions/imageDef.js.map +0 -1
  84. package/dist/coValues/group.js.map +0 -1
  85. package/dist/coValues/interfaces.js.map +0 -1
  86. package/dist/implementation/createContext.js.map +0 -1
  87. package/dist/implementation/devtoolsFormatters.js.map +0 -1
  88. package/dist/implementation/inspect.js.map +0 -1
  89. package/dist/implementation/refs.js.map +0 -1
  90. package/dist/implementation/schema.js.map +0 -1
  91. package/dist/implementation/subscriptionScope.js.map +0 -1
  92. package/dist/implementation/symbols.js.map +0 -1
  93. package/dist/internal.js.map +0 -1
  94. package/dist/tests/coList.test.js +0 -221
  95. package/dist/tests/coList.test.js.map +0 -1
  96. package/dist/tests/coMap.test.js +0 -615
  97. package/dist/tests/coMap.test.js.map +0 -1
  98. package/dist/tests/coStream.test.js +0 -324
  99. package/dist/tests/coStream.test.js.map +0 -1
  100. package/dist/tests/deepLoading.test.js +0 -175
  101. package/dist/tests/deepLoading.test.js.map +0 -1
  102. package/dist/tests/groupsAndAccounts.test.js +0 -69
  103. package/dist/tests/groupsAndAccounts.test.js.map +0 -1
  104. /package/dist/{coValues → native/coValues}/account.js +0 -0
  105. /package/dist/{coValues → native/coValues}/coList.js +0 -0
  106. /package/dist/{coValues → native/coValues}/coMap.js +0 -0
  107. /package/dist/{coValues → native/coValues}/deepLoading.js +0 -0
  108. /package/dist/{coValues → native/coValues}/extensions/imageDef.js +0 -0
  109. /package/dist/{coValues → native/coValues}/group.js +0 -0
  110. /package/dist/{coValues → native/coValues}/interfaces.js +0 -0
  111. /package/dist/{implementation → native/implementation}/devtoolsFormatters.js +0 -0
  112. /package/dist/{implementation → native/implementation}/errors.js +0 -0
  113. /package/dist/{implementation → native/implementation}/inspect.js +0 -0
  114. /package/dist/{implementation → native/implementation}/refs.js +0 -0
  115. /package/dist/{implementation → native/implementation}/subscriptionScope.js +0 -0
  116. /package/dist/{implementation → native/implementation}/symbols.js +0 -0
  117. /package/dist/{internal.js → native/internal.js} +0 -0
@@ -1,221 +0,0 @@
1
- import { expect, describe, test } from "vitest";
2
- import { connectedPeers } from "cojson/src/streamUtils.js";
3
- import { Account, CoList, WasmCrypto, co, cojsonInternals, createJazzContext, isControlledAccount, fixedCredentialsAuth, } from "../index.js";
4
- import { randomSessionProvider } from "../internal.js";
5
- const Crypto = await WasmCrypto.create();
6
- describe("Simple CoList operations", async () => {
7
- const me = await Account.create({
8
- creationProps: { name: "Hermes Puggington" },
9
- crypto: Crypto,
10
- });
11
- class TestList extends CoList.Of(co.string) {
12
- }
13
- const list = TestList.create(["bread", "butter", "onion"], { owner: me });
14
- test("Construction", () => {
15
- expect(list[0]).toBe("bread");
16
- expect(list[1]).toBe("butter");
17
- expect(list[2]).toBe("onion");
18
- expect(list._raw.asArray()).toEqual(["bread", "butter", "onion"]);
19
- expect(list.length).toBe(3);
20
- expect(list.map((item) => item.toUpperCase())).toEqual([
21
- "BREAD",
22
- "BUTTER",
23
- "ONION",
24
- ]);
25
- });
26
- describe("Mutation", () => {
27
- test("assignment", () => {
28
- const list = TestList.create(["bread", "butter", "onion"], {
29
- owner: me,
30
- });
31
- list[1] = "margarine";
32
- expect(list._raw.asArray()).toEqual([
33
- "bread",
34
- "margarine",
35
- "onion",
36
- ]);
37
- expect(list[1]).toBe("margarine");
38
- });
39
- test("push", () => {
40
- const list = TestList.create(["bread", "butter", "onion"], {
41
- owner: me,
42
- });
43
- list.push("cheese");
44
- expect(list[3]).toBe("cheese");
45
- expect(list._raw.asArray()).toEqual([
46
- "bread",
47
- "butter",
48
- "onion",
49
- "cheese",
50
- ]);
51
- });
52
- test("unshift", () => {
53
- const list = TestList.create(["bread", "butter", "onion"], {
54
- owner: me,
55
- });
56
- list.unshift("lettuce");
57
- expect(list[0]).toBe("lettuce");
58
- expect(list._raw.asArray()).toEqual([
59
- "lettuce",
60
- "bread",
61
- "butter",
62
- "onion",
63
- ]);
64
- });
65
- test("pop", () => {
66
- const list = TestList.create(["bread", "butter", "onion"], {
67
- owner: me,
68
- });
69
- expect(list.pop()).toBe("onion");
70
- expect(list.length).toBe(2);
71
- expect(list._raw.asArray()).toEqual(["bread", "butter"]);
72
- });
73
- test("shift", () => {
74
- const list = TestList.create(["bread", "butter", "onion"], {
75
- owner: me,
76
- });
77
- expect(list.shift()).toBe("bread");
78
- expect(list.length).toBe(2);
79
- expect(list._raw.asArray()).toEqual(["butter", "onion"]);
80
- });
81
- test("splice", () => {
82
- const list = TestList.create(["bread", "butter", "onion"], {
83
- owner: me,
84
- });
85
- list.splice(1, 1, "salt", "pepper");
86
- expect(list.length).toBe(4);
87
- expect(list._raw.asArray()).toEqual([
88
- "bread",
89
- "salt",
90
- "pepper",
91
- "onion",
92
- ]);
93
- });
94
- });
95
- });
96
- describe("CoList resolution", async () => {
97
- class TwiceNestedList extends CoList.Of(co.string) {
98
- joined() {
99
- return this.join(",");
100
- }
101
- }
102
- class NestedList extends CoList.Of(co.ref(TwiceNestedList)) {
103
- }
104
- class TestList extends CoList.Of(co.ref(NestedList)) {
105
- }
106
- const initNodeAndList = async () => {
107
- const me = await Account.create({
108
- creationProps: { name: "Hermes Puggington" },
109
- crypto: Crypto,
110
- });
111
- const list = TestList.create([
112
- NestedList.create([TwiceNestedList.create(["a", "b"], { owner: me })], { owner: me }),
113
- NestedList.create([TwiceNestedList.create(["c", "d"], { owner: me })], { owner: me }),
114
- ], { owner: me });
115
- return { me, list };
116
- };
117
- test("Construction", async () => {
118
- const { list } = await initNodeAndList();
119
- expect(list[0]?.[0]?.[0]).toBe("a");
120
- expect(list[0]?.[0]?.joined()).toBe("a,b");
121
- expect(list[0]?.[0]?.id).toBeDefined();
122
- expect(list[1]?.[0]?.[0]).toBe("c");
123
- });
124
- test("Loading and availability", async () => {
125
- const { me, list } = await initNodeAndList();
126
- const [initialAsPeer, secondPeer] = connectedPeers("initial", "second", {
127
- peer1role: "server",
128
- peer2role: "client",
129
- });
130
- if (!isControlledAccount(me)) {
131
- throw "me is not a controlled account";
132
- }
133
- me._raw.core.node.syncManager.addPeer(secondPeer);
134
- const { account: meOnSecondPeer } = await createJazzContext({
135
- auth: fixedCredentialsAuth({
136
- accountID: me.id,
137
- secret: me._raw.agentSecret,
138
- }),
139
- sessionProvider: randomSessionProvider,
140
- peersToLoadFrom: [initialAsPeer],
141
- crypto: Crypto,
142
- });
143
- const loadedList = await TestList.load(list.id, meOnSecondPeer, []);
144
- expect(loadedList?.[0]).toBe(null);
145
- expect(loadedList?._refs[0]?.id).toEqual(list[0].id);
146
- const loadedNestedList = await NestedList.load(list[0].id, meOnSecondPeer, []);
147
- expect(loadedList?.[0]).toBeDefined();
148
- expect(loadedList?.[0]?.[0]).toBe(null);
149
- expect(loadedList?.[0]?._refs[0]?.id).toEqual(list[0][0].id);
150
- // TODO: this should be ref equal
151
- // expect(loadedList?._refs[0]?.value).toEqual(loadedNestedList);
152
- expect(loadedList?._refs[0]?.value?.toJSON()).toEqual(loadedNestedList?.toJSON());
153
- const loadedTwiceNestedList = await TwiceNestedList.load(list[0][0].id, meOnSecondPeer, []);
154
- expect(loadedList?.[0]?.[0]).toBeDefined();
155
- expect(loadedList?.[0]?.[0]?.[0]).toBe("a");
156
- expect(loadedList?.[0]?.[0]?.joined()).toBe("a,b");
157
- expect(loadedList?.[0]?._refs[0]?.id).toEqual(list[0]?.[0]?.id);
158
- // TODO: this should be ref equal
159
- // expect(loadedList?.[0]?._refs[0]?.value).toEqual(loadedTwiceNestedList);
160
- expect(loadedList?.[0]?._refs[0]?.value?.toJSON()).toEqual(loadedTwiceNestedList?.toJSON());
161
- const otherNestedList = NestedList.create([TwiceNestedList.create(["e", "f"], { owner: meOnSecondPeer })], { owner: meOnSecondPeer });
162
- loadedList[0] = otherNestedList;
163
- // TODO: this should be ref equal
164
- // expect(loadedList?.[0]).toEqual(otherNestedList);
165
- expect(loadedList?._refs[0]?.value?.toJSON()).toEqual(otherNestedList.toJSON());
166
- expect(loadedList?._refs[0]?.id).toEqual(otherNestedList.id);
167
- });
168
- test("Subscription & auto-resolution", async () => {
169
- const { me, list } = await initNodeAndList();
170
- const [initialAsPeer, secondPeer] = connectedPeers("initial", "second", {
171
- peer1role: "server",
172
- peer2role: "client",
173
- });
174
- if (!isControlledAccount(me)) {
175
- throw "me is not a controlled account";
176
- }
177
- me._raw.core.node.syncManager.addPeer(secondPeer);
178
- const { account: meOnSecondPeer } = await createJazzContext({
179
- auth: fixedCredentialsAuth({
180
- accountID: me.id,
181
- secret: me._raw.agentSecret,
182
- }),
183
- sessionProvider: randomSessionProvider,
184
- peersToLoadFrom: [initialAsPeer],
185
- crypto: Crypto,
186
- });
187
- const queue = new cojsonInternals.Channel();
188
- TestList.subscribe(list.id, meOnSecondPeer, [], (subscribedList) => {
189
- console.log("subscribedList?.[0]?.[0]?.[0]", subscribedList?.[0]?.[0]?.[0]);
190
- void queue.push(subscribedList);
191
- });
192
- const update1 = (await queue.next()).value;
193
- expect(update1?.[0]).toBe(null);
194
- const update2 = (await queue.next()).value;
195
- expect(update2?.[0]).toBeDefined();
196
- expect(update2?.[0]?.[0]).toBe(null);
197
- const update3 = (await queue.next()).value;
198
- expect(update3?.[0]?.[0]).toBeDefined();
199
- expect(update3?.[0]?.[0]?.[0]).toBe("a");
200
- expect(update3?.[0]?.[0]?.joined()).toBe("a,b");
201
- update3[0][0][0] = "x";
202
- const update4 = (await queue.next()).value;
203
- expect(update4?.[0]?.[0]?.[0]).toBe("x");
204
- // When assigning a new nested value, we get an update
205
- const newTwiceNestedList = TwiceNestedList.create(["y", "z"], {
206
- owner: meOnSecondPeer,
207
- });
208
- const newNestedList = NestedList.create([newTwiceNestedList], {
209
- owner: meOnSecondPeer,
210
- });
211
- update4[0] = newNestedList;
212
- const update5 = (await queue.next()).value;
213
- expect(update5?.[0]?.[0]?.[0]).toBe("y");
214
- expect(update5?.[0]?.[0]?.joined()).toBe("y,z");
215
- // we get updates when the new nested value changes
216
- newTwiceNestedList[0] = "w";
217
- const update6 = (await queue.next()).value;
218
- expect(update6?.[0]?.[0]?.[0]).toBe("w");
219
- });
220
- });
221
- //# sourceMappingURL=coList.test.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"coList.test.js","sourceRoot":"","sources":["../../src/tests/coList.test.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,QAAQ,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAC;AAChD,OAAO,EAAE,cAAc,EAAE,MAAM,2BAA2B,CAAC;AAC3D,OAAO,EACH,OAAO,EACP,MAAM,EACN,UAAU,EACV,EAAE,EACF,eAAe,EACf,iBAAiB,EACjB,mBAAmB,EACnB,oBAAoB,GACvB,MAAM,aAAa,CAAC;AACrB,OAAO,EAAE,qBAAqB,EAAE,MAAM,gBAAgB,CAAC;AAEvD,MAAM,MAAM,GAAG,MAAM,UAAU,CAAC,MAAM,EAAE,CAAC;AAEzC,QAAQ,CAAC,0BAA0B,EAAE,KAAK,IAAI,EAAE;IAC5C,MAAM,EAAE,GAAG,MAAM,OAAO,CAAC,MAAM,CAAC;QAC5B,aAAa,EAAE,EAAE,IAAI,EAAE,mBAAmB,EAAE;QAC5C,MAAM,EAAE,MAAM;KACjB,CAAC,CAAC;IAEH,MAAM,QAAS,SAAQ,MAAM,CAAC,EAAE,CAAC,EAAE,CAAC,MAAM,CAAC;KAAG;IAE9C,MAAM,IAAI,GAAG,QAAQ,CAAC,MAAM,CAAC,CAAC,OAAO,EAAE,QAAQ,EAAE,OAAO,CAAC,EAAE,EAAE,KAAK,EAAE,EAAE,EAAE,CAAC,CAAC;IAE1E,IAAI,CAAC,cAAc,EAAE,GAAG,EAAE;QACtB,MAAM,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;QAC9B,MAAM,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,QAAQ,C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