jazz-tools 0.8.44 → 0.8.45
Sign up to get free protection for your applications and to get access to all the features.
- package/.turbo/turbo-build.log +16 -10
- package/CHANGELOG.md +12 -0
- package/dist/chunk-5WLKIDKU.js +2844 -0
- package/dist/chunk-5WLKIDKU.js.map +1 -0
- package/dist/index.native.js +63 -0
- package/dist/index.native.js.map +1 -0
- package/dist/index.web.js +61 -0
- package/dist/index.web.js.map +1 -0
- package/package.json +9 -12
- package/src/coValues/account.ts +21 -9
- package/src/coValues/coFeed.ts +4 -3
- package/src/coValues/coList.ts +8 -5
- package/src/coValues/coMap.ts +6 -3
- package/src/coValues/deepLoading.ts +6 -12
- package/src/coValues/extensions/imageDef.ts +3 -1
- package/src/coValues/group.ts +8 -11
- package/src/coValues/inbox.ts +377 -0
- package/src/coValues/interfaces.ts +9 -6
- package/src/coValues/profile.ts +11 -0
- package/src/coValues/registeredSchemas.ts +12 -0
- package/src/exports.ts +21 -15
- package/src/implementation/anonymousJazzAgent.ts +6 -0
- package/src/implementation/createContext.ts +6 -7
- package/src/implementation/refs.ts +1 -1
- package/src/implementation/subscriptionScope.ts +1 -1
- package/src/index.native.ts +0 -1
- package/src/internal.ts +1 -9
- package/src/tests/account.test.ts +2 -2
- package/src/tests/coFeed.test.ts +0 -9
- package/src/tests/coMap.test.ts +2 -2
- package/src/tests/groupsAndAccounts.test.ts +1 -1
- package/src/tests/inbox.test.ts +256 -0
- package/src/tests/schemaUnion.test.ts +1 -1
- package/src/tests/utils.ts +14 -0
- package/tsup.config.ts +13 -0
- package/dist/native/coValues/account.js +0 -221
- package/dist/native/coValues/account.js.map +0 -1
- package/dist/native/coValues/coFeed.js +0 -571
- package/dist/native/coValues/coFeed.js.map +0 -1
- package/dist/native/coValues/coList.js +0 -404
- package/dist/native/coValues/coList.js.map +0 -1
- package/dist/native/coValues/coMap.js +0 -537
- package/dist/native/coValues/coMap.js.map +0 -1
- package/dist/native/coValues/deepLoading.js +0 -63
- package/dist/native/coValues/deepLoading.js.map +0 -1
- package/dist/native/coValues/extensions/imageDef.js +0 -42
- package/dist/native/coValues/extensions/imageDef.js.map +0 -1
- package/dist/native/coValues/group.js +0 -136
- package/dist/native/coValues/group.js.map +0 -1
- package/dist/native/coValues/interfaces.js +0 -135
- package/dist/native/coValues/interfaces.js.map +0 -1
- package/dist/native/coValues/schemaUnion.js +0 -89
- package/dist/native/coValues/schemaUnion.js.map +0 -1
- package/dist/native/exports.js +0 -5
- package/dist/native/exports.js.map +0 -1
- package/dist/native/implementation/createContext.js +0 -157
- package/dist/native/implementation/createContext.js.map +0 -1
- package/dist/native/implementation/devtoolsFormatters.js +0 -95
- package/dist/native/implementation/devtoolsFormatters.js.map +0 -1
- package/dist/native/implementation/errors.js +0 -2
- package/dist/native/implementation/errors.js.map +0 -1
- package/dist/native/implementation/inspect.js +0 -2
- package/dist/native/implementation/inspect.js.map +0 -1
- package/dist/native/implementation/refs.js +0 -115
- package/dist/native/implementation/refs.js.map +0 -1
- package/dist/native/implementation/schema.js +0 -96
- package/dist/native/implementation/schema.js.map +0 -1
- package/dist/native/implementation/subscriptionScope.js +0 -91
- package/dist/native/implementation/subscriptionScope.js.map +0 -1
- package/dist/native/implementation/symbols.js +0 -4
- package/dist/native/implementation/symbols.js.map +0 -1
- package/dist/native/index.native.js +0 -3
- package/dist/native/index.native.js.map +0 -1
- package/dist/native/internal.js +0 -18
- package/dist/native/internal.js.map +0 -1
- package/dist/native/lib/cache.js +0 -13
- package/dist/native/lib/cache.js.map +0 -1
- package/dist/native/lib/cache.test.js +0 -52
- package/dist/native/lib/cache.test.js.map +0 -1
- package/dist/web/coValues/account.js +0 -221
- package/dist/web/coValues/account.js.map +0 -1
- package/dist/web/coValues/coFeed.js +0 -571
- package/dist/web/coValues/coFeed.js.map +0 -1
- package/dist/web/coValues/coList.js +0 -404
- package/dist/web/coValues/coList.js.map +0 -1
- package/dist/web/coValues/coMap.js +0 -537
- package/dist/web/coValues/coMap.js.map +0 -1
- package/dist/web/coValues/deepLoading.js +0 -63
- package/dist/web/coValues/deepLoading.js.map +0 -1
- package/dist/web/coValues/extensions/imageDef.js +0 -42
- package/dist/web/coValues/extensions/imageDef.js.map +0 -1
- package/dist/web/coValues/group.js +0 -136
- package/dist/web/coValues/group.js.map +0 -1
- package/dist/web/coValues/interfaces.js +0 -135
- package/dist/web/coValues/interfaces.js.map +0 -1
- package/dist/web/coValues/schemaUnion.js +0 -89
- package/dist/web/coValues/schemaUnion.js.map +0 -1
- package/dist/web/exports.js +0 -5
- package/dist/web/exports.js.map +0 -1
- package/dist/web/implementation/createContext.js +0 -157
- package/dist/web/implementation/createContext.js.map +0 -1
- package/dist/web/implementation/devtoolsFormatters.js +0 -95
- package/dist/web/implementation/devtoolsFormatters.js.map +0 -1
- package/dist/web/implementation/errors.js +0 -2
- package/dist/web/implementation/errors.js.map +0 -1
- package/dist/web/implementation/inspect.js +0 -2
- package/dist/web/implementation/inspect.js.map +0 -1
- package/dist/web/implementation/refs.js +0 -115
- package/dist/web/implementation/refs.js.map +0 -1
- package/dist/web/implementation/schema.js +0 -96
- package/dist/web/implementation/schema.js.map +0 -1
- package/dist/web/implementation/subscriptionScope.js +0 -91
- package/dist/web/implementation/subscriptionScope.js.map +0 -1
- package/dist/web/implementation/symbols.js +0 -4
- package/dist/web/implementation/symbols.js.map +0 -1
- package/dist/web/index.web.js +0 -3
- package/dist/web/index.web.js.map +0 -1
- package/dist/web/internal.js +0 -18
- package/dist/web/internal.js.map +0 -1
- package/dist/web/lib/cache.js +0 -13
- package/dist/web/lib/cache.js.map +0 -1
- package/dist/web/lib/cache.test.js +0 -52
- package/dist/web/lib/cache.test.js.map +0 -1
@@ -1,221 +0,0 @@
|
|
1
|
-
var _a;
|
2
|
-
import { LocalNode, RawAccount, cojsonInternals, } from "cojson";
|
3
|
-
import { AnonymousJazzAgent, CoMap, CoValueBase, Group, MembersSym, Profile, Ref, SchemaInit, ensureCoValueLoaded, inspect, loadCoValue, subscribeToCoValue, subscribeToExistingCoValue, subscriptionsScopes, } from "../internal.js";
|
4
|
-
import { coValuesCache } from "../lib/cache.js";
|
5
|
-
/** @category Identity & Permissions */
|
6
|
-
export class Account extends CoValueBase {
|
7
|
-
get _schema() {
|
8
|
-
return this.constructor._schema;
|
9
|
-
}
|
10
|
-
get _owner() {
|
11
|
-
return this;
|
12
|
-
}
|
13
|
-
get _loadedAs() {
|
14
|
-
if (this.isMe)
|
15
|
-
return this;
|
16
|
-
const rawAccount = this._raw.core.node.account;
|
17
|
-
if (rawAccount instanceof RawAccount) {
|
18
|
-
return coValuesCache.get(rawAccount, () => _a.fromRaw(rawAccount));
|
19
|
-
}
|
20
|
-
return new AnonymousJazzAgent(this._raw.core.node);
|
21
|
-
}
|
22
|
-
get _refs() {
|
23
|
-
const profileID = this._raw.get("profile");
|
24
|
-
const rootID = this._raw.get("root");
|
25
|
-
return {
|
26
|
-
profile: profileID &&
|
27
|
-
new Ref(profileID, this._loadedAs, this._schema.profile),
|
28
|
-
root: rootID &&
|
29
|
-
new Ref(rootID, this._loadedAs, this._schema.root),
|
30
|
-
};
|
31
|
-
}
|
32
|
-
constructor(options) {
|
33
|
-
super();
|
34
|
-
if (!("fromRaw" in options)) {
|
35
|
-
throw new Error("Can only construct account from raw or with .create()");
|
36
|
-
}
|
37
|
-
this.isMe = options.fromRaw.id == options.fromRaw.core.node.account.id;
|
38
|
-
Object.defineProperties(this, {
|
39
|
-
id: {
|
40
|
-
value: options.fromRaw.id,
|
41
|
-
enumerable: false,
|
42
|
-
},
|
43
|
-
_raw: { value: options.fromRaw, enumerable: false },
|
44
|
-
_type: { value: "Account", enumerable: false },
|
45
|
-
});
|
46
|
-
if (this.isMe) {
|
47
|
-
this.sessionID = options.fromRaw.core.node.currentSessionID;
|
48
|
-
}
|
49
|
-
return new Proxy(this, AccountAndGroupProxyHandler);
|
50
|
-
}
|
51
|
-
myRole() {
|
52
|
-
if (this.isMe) {
|
53
|
-
return "admin";
|
54
|
-
}
|
55
|
-
}
|
56
|
-
async acceptInvite(valueID, inviteSecret, coValueClass) {
|
57
|
-
if (!this.isMe) {
|
58
|
-
throw new Error("Only a controlled account can accept invites");
|
59
|
-
}
|
60
|
-
await this._raw.acceptInvite(valueID, inviteSecret);
|
61
|
-
return loadCoValue(coValueClass, valueID, this, []);
|
62
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
63
|
-
}
|
64
|
-
/** @private */
|
65
|
-
static async create(options) {
|
66
|
-
const { node } = await LocalNode.withNewlyCreatedAccount({
|
67
|
-
...options,
|
68
|
-
migration: async (rawAccount, _node, creationProps) => {
|
69
|
-
const account = new this({
|
70
|
-
fromRaw: rawAccount,
|
71
|
-
});
|
72
|
-
await account.migrate?.(creationProps);
|
73
|
-
},
|
74
|
-
});
|
75
|
-
return this.fromNode(node);
|
76
|
-
}
|
77
|
-
static async createAs(as, options) {
|
78
|
-
// TODO: is there a cleaner way to do this?
|
79
|
-
const connectedPeers = cojsonInternals.connectedPeers("creatingAccount", "createdAccount", { peer1role: "server", peer2role: "client" });
|
80
|
-
as._raw.core.node.syncManager.addPeer(connectedPeers[1]);
|
81
|
-
return this.create({
|
82
|
-
creationProps: options.creationProps,
|
83
|
-
crypto: as._raw.core.node.crypto,
|
84
|
-
peersToLoadFrom: [connectedPeers[0]],
|
85
|
-
});
|
86
|
-
}
|
87
|
-
static fromNode(node) {
|
88
|
-
return new this({
|
89
|
-
fromRaw: node.account,
|
90
|
-
});
|
91
|
-
}
|
92
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
93
|
-
toJSON() {
|
94
|
-
return {
|
95
|
-
id: this.id,
|
96
|
-
_type: this._type,
|
97
|
-
};
|
98
|
-
}
|
99
|
-
[inspect]() {
|
100
|
-
return this.toJSON();
|
101
|
-
}
|
102
|
-
migrate(creationProps) {
|
103
|
-
if (creationProps) {
|
104
|
-
const profileGroup = Group.create({ owner: this });
|
105
|
-
profileGroup.addMember("everyone", "reader");
|
106
|
-
this.profile = Profile.create({ name: creationProps.name }, { owner: profileGroup });
|
107
|
-
}
|
108
|
-
}
|
109
|
-
/** @category Subscription & Loading */
|
110
|
-
static load(id, as, depth) {
|
111
|
-
return loadCoValue(this, id, as, depth);
|
112
|
-
}
|
113
|
-
/** @category Subscription & Loading */
|
114
|
-
static subscribe(id, as, depth, listener) {
|
115
|
-
return subscribeToCoValue(this, id, as, depth, listener);
|
116
|
-
}
|
117
|
-
/** @category Subscription & Loading */
|
118
|
-
ensureLoaded(depth) {
|
119
|
-
return ensureCoValueLoaded(this, depth);
|
120
|
-
}
|
121
|
-
/** @category Subscription & Loading */
|
122
|
-
subscribe(depth, listener) {
|
123
|
-
return subscribeToExistingCoValue(this, depth, listener);
|
124
|
-
}
|
125
|
-
/**
|
126
|
-
* Wait for the `Account` to be uploaded to the other peers.
|
127
|
-
*
|
128
|
-
* @category Subscription & Loading
|
129
|
-
*/
|
130
|
-
waitForSync(options) {
|
131
|
-
return this._raw.core.waitForSync(options);
|
132
|
-
}
|
133
|
-
/**
|
134
|
-
* Wait for all the available `CoValues` to be uploaded to the other peers.
|
135
|
-
*
|
136
|
-
* @category Subscription & Loading
|
137
|
-
*/
|
138
|
-
waitForAllCoValuesSync(options) {
|
139
|
-
return this._raw.core.node.syncManager.waitForAllCoValuesSync(options?.timeout);
|
140
|
-
}
|
141
|
-
}
|
142
|
-
_a = Account;
|
143
|
-
(() => {
|
144
|
-
_a._schema = {
|
145
|
-
profile: {
|
146
|
-
ref: () => Profile,
|
147
|
-
optional: false,
|
148
|
-
},
|
149
|
-
root: {
|
150
|
-
ref: () => CoMap,
|
151
|
-
optional: true,
|
152
|
-
},
|
153
|
-
};
|
154
|
-
})();
|
155
|
-
export const AccountAndGroupProxyHandler = {
|
156
|
-
get(target, key, receiver) {
|
157
|
-
if (key === "profile") {
|
158
|
-
const ref = target._refs.profile;
|
159
|
-
return ref
|
160
|
-
? ref.accessFrom(receiver, "profile")
|
161
|
-
: // eslint-disable-next-line @typescript-eslint/no-explicit-any
|
162
|
-
undefined;
|
163
|
-
}
|
164
|
-
else if (key === "root") {
|
165
|
-
const ref = target._refs.root;
|
166
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
167
|
-
return ref ? ref.accessFrom(receiver, "root") : undefined;
|
168
|
-
}
|
169
|
-
else {
|
170
|
-
return Reflect.get(target, key, receiver);
|
171
|
-
}
|
172
|
-
},
|
173
|
-
set(target, key, value, receiver) {
|
174
|
-
if ((key === "profile" || key === "root" || key === MembersSym) &&
|
175
|
-
typeof value === "object" &&
|
176
|
-
SchemaInit in value) {
|
177
|
-
target.constructor._schema ||= {};
|
178
|
-
target.constructor._schema[key] = value[SchemaInit];
|
179
|
-
return true;
|
180
|
-
}
|
181
|
-
else if (key === "profile") {
|
182
|
-
if (value) {
|
183
|
-
target._raw.set("profile", value.id, "trusting");
|
184
|
-
}
|
185
|
-
subscriptionsScopes
|
186
|
-
.get(receiver)
|
187
|
-
?.onRefAccessedOrSet(target.id, value.id);
|
188
|
-
return true;
|
189
|
-
}
|
190
|
-
else if (key === "root") {
|
191
|
-
if (value) {
|
192
|
-
target._raw.set("root", value.id);
|
193
|
-
}
|
194
|
-
subscriptionsScopes
|
195
|
-
.get(receiver)
|
196
|
-
?.onRefAccessedOrSet(target.id, value.id);
|
197
|
-
return true;
|
198
|
-
}
|
199
|
-
else {
|
200
|
-
return Reflect.set(target, key, value, receiver);
|
201
|
-
}
|
202
|
-
},
|
203
|
-
defineProperty(target, key, descriptor) {
|
204
|
-
if ((key === "profile" || key === "root" || key === MembersSym) &&
|
205
|
-
typeof descriptor.value === "object" &&
|
206
|
-
SchemaInit in descriptor.value) {
|
207
|
-
target.constructor._schema ||= {};
|
208
|
-
target.constructor._schema[key] =
|
209
|
-
descriptor.value[SchemaInit];
|
210
|
-
return true;
|
211
|
-
}
|
212
|
-
else {
|
213
|
-
return Reflect.defineProperty(target, key, descriptor);
|
214
|
-
}
|
215
|
-
},
|
216
|
-
};
|
217
|
-
/** @category Identity & Permissions */
|
218
|
-
export function isControlledAccount(account) {
|
219
|
-
return account.isMe;
|
220
|
-
}
|
221
|
-
//# sourceMappingURL=account.js.map
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"account.js","sourceRoot":"","sources":["../../../src/coValues/account.ts"],"names":[],"mappings":";AAAA,OAAO,EAKL,SAAS,EAET,UAAU,EAKV,eAAe,GAChB,MAAM,QAAQ,CAAC;AAChB,OAAO,EACL,kBAAkB,EAClB,KAAK,EAEL,WAAW,EAIX,KAAK,EAEL,UAAU,EACV,OAAO,EACP,GAAG,EAIH,UAAU,EACV,mBAAmB,EACnB,OAAO,EACP,WAAW,EACX,kBAAkB,EAClB,0BAA0B,EAC1B,mBAAmB,GACpB,MAAM,gBAAgB,CAAC;AACxB,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAEhD,uCAAuC;AACvC,MAAM,OAAO,OAAQ,SAAQ,WAAW;IAOtC,IAAI,OAAO;QAIT,OAAQ,IAAI,CAAC,WAA8B,CAAC,OAAO,CAAC;IACtD,CAAC;IAcD,IAAI,MAAM;QACR,OAAO,IAAe,CAAC;IACzB,CAAC;IACD,IAAI,SAAS;QACX,IAAI,IAAI,CAAC,IAAI;YAAE,OAAO,IAAI,CAAC;QAE3B,MAAM,UAAU,GAAG,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC;QAE/C,IAAI,UAAU,YAAY,UAAU,EAAE,CAAC;YACrC,OAAO,aAAa,CAAC,GAAG,CAAC,UAAU,EAAE,GAAG,EAAE,CAAC,EAAO,CAAC,OAAO,CAAC,UAAU,CAAC,CAAC,CAAC;QAC1E,CAAC;QAED,OAAO,IAAI,kBAAkB,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IACrD,CAAC;IAKD,IAAI,KAAK;QAIP,MAAM,SAAS,GAAG,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,SAAS,CAE5B,CAAC;QACd,MAAM,MAAM,GAAG,IAAI,CAAC,IAAI,CA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