tinybase 4.3.11 → 4.3.12
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/lib/cjs/persisters/persister-partykit-client.cjs +1 -1
- package/lib/cjs/persisters/persister-partykit-client.cjs.gz +0 -0
- package/lib/cjs/persisters/persister-partykit-server.cjs +1 -1
- package/lib/cjs/persisters/persister-partykit-server.cjs.gz +0 -0
- package/lib/cjs-es6/persisters/persister-partykit-client.cjs +1 -1
- package/lib/cjs-es6/persisters/persister-partykit-client.cjs.gz +0 -0
- package/lib/cjs-es6/persisters/persister-partykit-server.cjs +1 -1
- package/lib/cjs-es6/persisters/persister-partykit-server.cjs.gz +0 -0
- package/lib/debug/persisters/persister-partykit-client.js +29 -19
- package/lib/debug/persisters/persister-partykit-server.js +155 -64
- package/lib/es6/persisters/persister-partykit-client.js +1 -1
- package/lib/es6/persisters/persister-partykit-client.js.gz +0 -0
- package/lib/es6/persisters/persister-partykit-server.js +1 -1
- package/lib/es6/persisters/persister-partykit-server.js.gz +0 -0
- package/lib/persisters/persister-partykit-client.js +1 -1
- package/lib/persisters/persister-partykit-client.js.gz +0 -0
- package/lib/persisters/persister-partykit-server.js +1 -1
- package/lib/persisters/persister-partykit-server.js.gz +0 -0
- package/lib/types/persisters/persister-indexed-db.d.ts +4 -5
- package/lib/types/persisters/persister-partykit-client.d.ts +18 -7
- package/lib/types/persisters/persister-partykit-server.d.ts +335 -7
- package/lib/types/tools.d.ts +4 -6
- package/lib/types/ui-react.d.ts +4 -4
- package/lib/types/with-schemas/persisters/persister-indexed-db.d.ts +4 -5
- package/lib/types/with-schemas/persisters/persister-partykit-client.d.ts +18 -7
- package/lib/types/with-schemas/persisters/persister-partykit-server.d.ts +359 -7
- package/lib/types/with-schemas/tools.d.ts +4 -6
- package/lib/types/with-schemas/ui-react.d.ts +4 -4
- package/lib/umd/persisters/persister-partykit-client.js +1 -1
- package/lib/umd/persisters/persister-partykit-client.js.gz +0 -0
- package/lib/umd/persisters/persister-partykit-server.js +1 -1
- package/lib/umd/persisters/persister-partykit-server.js.gz +0 -0
- package/lib/umd-es6/persisters/persister-partykit-client.js +1 -1
- package/lib/umd-es6/persisters/persister-partykit-client.js.gz +0 -0
- package/lib/umd-es6/persisters/persister-partykit-server.js +1 -1
- package/lib/umd-es6/persisters/persister-partykit-server.js.gz +0 -0
- package/package.json +8 -8
- package/readme.md +2 -2
|
@@ -18,7 +18,9 @@
|
|
|
18
18
|
* @since 4.3.0
|
|
19
19
|
*/
|
|
20
20
|
|
|
21
|
+
import {Cell, NoTablesSchema, NoValuesSchema, Value} from '../store';
|
|
21
22
|
import {Connection, Party, Request, Server} from 'partykit/server';
|
|
23
|
+
import {Id} from '../common';
|
|
22
24
|
|
|
23
25
|
/**
|
|
24
26
|
* The TinyBasePartyKitServerConfig type describes the configuration of a
|
|
@@ -38,13 +40,13 @@ import {Connection, Party, Request, Server} from 'partykit/server';
|
|
|
38
40
|
* 'tinybase_' in case you are worried about colliding with other data stored
|
|
39
41
|
* in the room.
|
|
40
42
|
*
|
|
41
|
-
* ```js
|
|
42
|
-
*
|
|
43
|
+
* ```js
|
|
44
|
+
* class MyServer extends TinyBasePartyKitServer {
|
|
43
45
|
* readonly config: TinyBasePartyKitServerConfig = {
|
|
44
46
|
* storePath: '/my_tinybase',
|
|
45
47
|
* storagePrefix: 'tinybase_',
|
|
46
48
|
* };
|
|
47
|
-
* }
|
|
49
|
+
* }
|
|
48
50
|
* ```
|
|
49
51
|
* @category Configuration
|
|
50
52
|
* @since v4.3.9
|
|
@@ -56,6 +58,14 @@ export type TinyBasePartyKitServerConfig = {
|
|
|
56
58
|
* on the client. Both default to '/store'.
|
|
57
59
|
*/
|
|
58
60
|
storePath?: string;
|
|
61
|
+
/**
|
|
62
|
+
* The prefix at the beginning of the web socket messages between the client
|
|
63
|
+
* and the server when synchronizing the Store. Use this to make sure they do
|
|
64
|
+
* not collide with any other message syntax that your room is using. This
|
|
65
|
+
* must match the messagePrefix property of the PartyKitPersisterConfig object
|
|
66
|
+
* used on the client. Both default to an empty string.
|
|
67
|
+
*/
|
|
68
|
+
messagePrefix?: string;
|
|
59
69
|
/**
|
|
60
70
|
* The prefix used before all the keys in the server's durable storage. Use
|
|
61
71
|
* this in case you are worried about the Store data colliding with other data
|
|
@@ -98,7 +108,7 @@ export type TinyBasePartyKitServerConfig = {
|
|
|
98
108
|
* ```js
|
|
99
109
|
* // This is your PartyKit server entry point.
|
|
100
110
|
*
|
|
101
|
-
*
|
|
111
|
+
* class MyServer extends TinyBasePartyKitServer {
|
|
102
112
|
* constructor(party) {
|
|
103
113
|
* super(party);
|
|
104
114
|
* // custom constructor code
|
|
@@ -124,6 +134,8 @@ export type TinyBasePartyKitServerConfig = {
|
|
|
124
134
|
* See the [PartyKit server API
|
|
125
135
|
* documentation](https://docs.partykit.io/reference/partyserver-api/) for
|
|
126
136
|
* more details.
|
|
137
|
+
* @category Creation
|
|
138
|
+
* @since v4.3.0
|
|
127
139
|
*/
|
|
128
140
|
export class TinyBasePartyKitServer implements Server {
|
|
129
141
|
constructor(party: Party);
|
|
@@ -132,6 +144,8 @@ export class TinyBasePartyKitServer implements Server {
|
|
|
132
144
|
* object of the TinyBasePartyKitServerConfig type.
|
|
133
145
|
*
|
|
134
146
|
* See the documentation for that type for more details.
|
|
147
|
+
* @category Configuration
|
|
148
|
+
* @since v4.3.9
|
|
135
149
|
*/
|
|
136
150
|
readonly config: TinyBasePartyKitServerConfig;
|
|
137
151
|
/**
|
|
@@ -143,7 +157,7 @@ export class TinyBasePartyKitServer implements Server {
|
|
|
143
157
|
* synchronization stays supported:
|
|
144
158
|
*
|
|
145
159
|
* ```js
|
|
146
|
-
*
|
|
160
|
+
* class MyServer extends TinyBasePartyKitServer {
|
|
147
161
|
* async onRequest(request) {
|
|
148
162
|
* // custom onRequest code, else:
|
|
149
163
|
* return await super.onRequest(request);
|
|
@@ -154,6 +168,8 @@ export class TinyBasePartyKitServer implements Server {
|
|
|
154
168
|
* See the [PartyKit server API
|
|
155
169
|
* documentation](https://docs.partykit.io/reference/partyserver-api/) for
|
|
156
170
|
* more details.
|
|
171
|
+
* @category Connection
|
|
172
|
+
* @since v4.3.0
|
|
157
173
|
*/
|
|
158
174
|
onRequest(request: Request): Promise<Response>;
|
|
159
175
|
/**
|
|
@@ -165,7 +181,7 @@ export class TinyBasePartyKitServer implements Server {
|
|
|
165
181
|
* synchronization stays supported:
|
|
166
182
|
*
|
|
167
183
|
* ```js
|
|
168
|
-
*
|
|
184
|
+
* class MyServer extends TinyBasePartyKitServer {
|
|
169
185
|
* async onMessage(message, client) {
|
|
170
186
|
* await super.onMessage(message, client);
|
|
171
187
|
* // custom onMessage code
|
|
@@ -176,6 +192,342 @@ export class TinyBasePartyKitServer implements Server {
|
|
|
176
192
|
* See the [PartyKit server API
|
|
177
193
|
* documentation](https://docs.partykit.io/reference/partyserver-api/) for
|
|
178
194
|
* more details.
|
|
195
|
+
* @category Connection
|
|
196
|
+
* @since v4.3.0
|
|
197
|
+
*/
|
|
198
|
+
onMessage(message: string, client: Connection): Promise<void>;
|
|
199
|
+
/**
|
|
200
|
+
* The canSetTable method lets you allow or disallow any changes to a Table
|
|
201
|
+
* stored on the server, as sent from a client.
|
|
202
|
+
*
|
|
203
|
+
* This is one of the functions use to sanitize the data that is being sent
|
|
204
|
+
* from a client. Perhaps you might want to make sure the server-stored data
|
|
205
|
+
* adheres to a particular schema, or you might want to make certain data
|
|
206
|
+
* read-only. Remember that you cannot trust the client to only send data that
|
|
207
|
+
* the server considers valid or safe.
|
|
208
|
+
*
|
|
209
|
+
* This method is passed the Table Id that the client is trying to change. The
|
|
210
|
+
* `initialSave` parameter distinguishes between the first bulk save of the
|
|
211
|
+
* Store to the PartyKit room over HTTP (`true`), and subsequent incremental
|
|
212
|
+
* updates over a web sockets (`false`).
|
|
213
|
+
*
|
|
214
|
+
* The final `requestOrConnection` parameter will either be the HTTP(S)
|
|
215
|
+
* request or the web socket connection, in those two cases respectively. You
|
|
216
|
+
* can, for instance, use this to distinguish between different users.
|
|
217
|
+
*
|
|
218
|
+
* Return `false` from this method to disallow changes to this Table on the
|
|
219
|
+
* server, or `true` to allow them (subject to subsequent canSetRow method,
|
|
220
|
+
* canDelRow method, canSetCell method, and canSetCell method checks). The
|
|
221
|
+
* default implementation returns `true` to allow all changes.
|
|
222
|
+
* @example
|
|
223
|
+
* The following implementation will strip out any attempts by the client to
|
|
224
|
+
* update any 'user' tabular data after the initial save:
|
|
225
|
+
*
|
|
226
|
+
* ```js
|
|
227
|
+
* class MyServer extends TinyBasePartyKitServer {
|
|
228
|
+
* canSetTable(tableId, initialSave) {
|
|
229
|
+
* return initialSave || tableId != 'user';
|
|
230
|
+
* }
|
|
231
|
+
* }
|
|
232
|
+
* ```
|
|
233
|
+
* @category Sanitization
|
|
234
|
+
* @since v4.3.12
|
|
235
|
+
*/
|
|
236
|
+
canSetTable(
|
|
237
|
+
tableId: Id,
|
|
238
|
+
initialSave: boolean,
|
|
239
|
+
requestOrConnection: Request | Connection,
|
|
240
|
+
): boolean;
|
|
241
|
+
/**
|
|
242
|
+
* The canDelTable method lets you allow or disallow deletions of a Table
|
|
243
|
+
* stored on the server, as sent from a client.
|
|
244
|
+
*
|
|
245
|
+
* This is one of the functions use to sanitize the data that is being sent
|
|
246
|
+
* from a client. Perhaps you might want to make sure the server-stored data
|
|
247
|
+
* adheres to a particular schema, or you might want to make certain data
|
|
248
|
+
* read-only. Remember that you cannot trust the client to only send data that
|
|
249
|
+
* the server considers valid or safe.
|
|
250
|
+
*
|
|
251
|
+
* This method is passed the Table Id that the client is trying to delete. The
|
|
252
|
+
* `connection` parameter will be the web socket connection of that client.
|
|
253
|
+
* You can, for instance, use this to distinguish between different users.
|
|
254
|
+
*
|
|
255
|
+
* Return `false` from this method to disallow this Table from being deleted
|
|
256
|
+
* on the server, or `true` to allow it. The default implementation returns
|
|
257
|
+
* `true` to allow deletion.
|
|
258
|
+
* @example
|
|
259
|
+
* The following implementation will strip out any attempts by the client to
|
|
260
|
+
* delete the 'user' Table:
|
|
261
|
+
*
|
|
262
|
+
* ```js
|
|
263
|
+
* class MyServer extends TinyBasePartyKitServer {
|
|
264
|
+
* canDelTable(tableId) {
|
|
265
|
+
* return tableId != 'user';
|
|
266
|
+
* }
|
|
267
|
+
* }
|
|
268
|
+
* ```
|
|
269
|
+
* @category Sanitization
|
|
270
|
+
* @since v4.3.12
|
|
271
|
+
*/
|
|
272
|
+
canDelTable(tableId: Id, connection: Connection): boolean;
|
|
273
|
+
/**
|
|
274
|
+
* The canSetRow method lets you allow or disallow any changes to a Row stored
|
|
275
|
+
* on the server, as sent from a client.
|
|
276
|
+
*
|
|
277
|
+
* This is one of the functions use to sanitize the data that is being sent
|
|
278
|
+
* from a client. Perhaps you might want to make sure the server-stored data
|
|
279
|
+
* adheres to a particular schema, or you might want to make certain data
|
|
280
|
+
* read-only. Remember that you cannot trust the client to only send data that
|
|
281
|
+
* the server considers valid or safe.
|
|
282
|
+
*
|
|
283
|
+
* This method is passed the Table Id and Row Id that the client is trying to
|
|
284
|
+
* change. The `initialSave` parameter distinguishes between the first bulk
|
|
285
|
+
* save of the Store to the PartyKit room over HTTP (`true`), and subsequent
|
|
286
|
+
* incremental updates over a web sockets (`false`).
|
|
287
|
+
*
|
|
288
|
+
* The final `requestOrConnection` parameter will either be the HTTP(S)
|
|
289
|
+
* request or the web socket connection, in those two cases respectively. You
|
|
290
|
+
* can, for instance, use this to distinguish between different users.
|
|
291
|
+
*
|
|
292
|
+
* Return `false` from this method to disallow changes to this Row on the
|
|
293
|
+
* server, or `true` to allow them (subject to subsequent canSetCell method
|
|
294
|
+
* and canSetCell method checks). The default implementation returns `true` to
|
|
295
|
+
* allow all changes.
|
|
296
|
+
* @example
|
|
297
|
+
* The following implementation will strip out any attempts by the client to
|
|
298
|
+
* update the 'me' Row of the 'user' Table after the initial save:
|
|
299
|
+
*
|
|
300
|
+
* ```js
|
|
301
|
+
* class MyServer extends TinyBasePartyKitServer {
|
|
302
|
+
* canSetRow(tableId, rowId, initialSave) {
|
|
303
|
+
* return initialSave || tableId != 'user' || rowId != 'me';
|
|
304
|
+
* }
|
|
305
|
+
* }
|
|
306
|
+
* ```
|
|
307
|
+
* @category Sanitization
|
|
308
|
+
* @since v4.3.12
|
|
309
|
+
*/
|
|
310
|
+
canSetRow(
|
|
311
|
+
tableId: Id,
|
|
312
|
+
rowId: Id,
|
|
313
|
+
initialSave: boolean,
|
|
314
|
+
requestOrConnection: Request | Connection,
|
|
315
|
+
): boolean;
|
|
316
|
+
/**
|
|
317
|
+
* The canDelRow method lets you allow or disallow deletions of a Row stored
|
|
318
|
+
* on the server, as sent from a client.
|
|
319
|
+
*
|
|
320
|
+
* This is one of the functions use to sanitize the data that is being sent
|
|
321
|
+
* from a client. Perhaps you might want to make sure the server-stored data
|
|
322
|
+
* adheres to a particular schema, or you might want to make certain data
|
|
323
|
+
* read-only. Remember that you cannot trust the client to only send data that
|
|
324
|
+
* the server considers valid or safe.
|
|
325
|
+
*
|
|
326
|
+
* This method is passed the Table Id and Row Id that the client is trying to
|
|
327
|
+
* delete. The `connection` parameter will be the web socket connection of
|
|
328
|
+
* that client. You can, for instance, use this to distinguish between
|
|
329
|
+
* different users.
|
|
330
|
+
*
|
|
331
|
+
* Return `false` from this method to disallow this Row from being deleted
|
|
332
|
+
* on the server, or `true` to allow it. The default implementation returns
|
|
333
|
+
* `true` to allow deletion.
|
|
334
|
+
* @example
|
|
335
|
+
* The following implementation will strip out any attempts by the client to
|
|
336
|
+
* delete the 'me' Row of the 'user' Table:
|
|
337
|
+
*
|
|
338
|
+
* ```js
|
|
339
|
+
* class MyServer extends TinyBasePartyKitServer {
|
|
340
|
+
* canDelRow(tableId, rowId) {
|
|
341
|
+
* return tableId != 'user' || rowId != 'me';
|
|
342
|
+
* }
|
|
343
|
+
* }
|
|
344
|
+
* ```
|
|
345
|
+
* @category Sanitization
|
|
346
|
+
* @since v4.3.12
|
|
347
|
+
*/
|
|
348
|
+
canDelRow(tableId: Id, rowId: Id, connection: Connection): boolean;
|
|
349
|
+
/**
|
|
350
|
+
* The canSetCell method lets you allow or disallow any changes to a Cell
|
|
351
|
+
* stored on the server, as sent from a client.
|
|
352
|
+
*
|
|
353
|
+
* This has schema-based typing. The following is a simplified representation:
|
|
354
|
+
*
|
|
355
|
+
* ```ts override
|
|
356
|
+
* canSetCell(
|
|
357
|
+
* tableId: Id,
|
|
358
|
+
* rowId: Id,
|
|
359
|
+
* cellId: Id,
|
|
360
|
+
* cell: Cell,
|
|
361
|
+
* initialSave: boolean,
|
|
362
|
+
* requestOrConnection: Request | Connection,
|
|
363
|
+
* ): boolean;
|
|
364
|
+
* ```
|
|
365
|
+
*
|
|
366
|
+
* This is one of the functions use to sanitize the data that is being sent
|
|
367
|
+
* from a client. Perhaps you might want to make sure the server-stored data
|
|
368
|
+
* adheres to a particular schema, or you might want to make certain data
|
|
369
|
+
* read-only. Remember that you cannot trust the client to only send data that
|
|
370
|
+
* the server considers valid or safe.
|
|
371
|
+
*
|
|
372
|
+
* This method is passed the Table Id, Row Id, and Cell Id that the client is
|
|
373
|
+
* trying to change - as well as the Cell value itself. The `initialSave`
|
|
374
|
+
* parameter distinguishes between the first bulk save of the Store to the
|
|
375
|
+
* PartyKit room over HTTP (`true`), and subsequent incremental updates over a
|
|
376
|
+
* web sockets (`false`).
|
|
377
|
+
*
|
|
378
|
+
* The final `requestOrConnection` parameter will either be the HTTP(S)
|
|
379
|
+
* request or the web socket connection, in those two cases respectively. You
|
|
380
|
+
* can, for instance, use this to distinguish between different users.
|
|
381
|
+
*
|
|
382
|
+
* Return `false` from this method to disallow changes to this Cell on the
|
|
383
|
+
* server, or `true` to allow them. The default implementation returns `true`
|
|
384
|
+
* to allow all changes.
|
|
385
|
+
* @example
|
|
386
|
+
* The following implementation will strip out any attempts by the client to
|
|
387
|
+
* update the 'name' Cell of the 'me' Row of the 'user' Table after the
|
|
388
|
+
* initial save:
|
|
389
|
+
*
|
|
390
|
+
* ```js
|
|
391
|
+
* class MyServer extends TinyBasePartyKitServer {
|
|
392
|
+
* canSetCell(tableId, rowId, cellId, cell, initialSave) {
|
|
393
|
+
* return (
|
|
394
|
+
* initialSave || tableId != 'user' || rowId != 'me' || cellId != 'name'
|
|
395
|
+
* );
|
|
396
|
+
* }
|
|
397
|
+
* }
|
|
398
|
+
* ```
|
|
399
|
+
* @category Sanitization
|
|
400
|
+
* @since v4.3.12
|
|
401
|
+
*/
|
|
402
|
+
canSetCell(
|
|
403
|
+
tableId: Id,
|
|
404
|
+
rowId: Id,
|
|
405
|
+
cellId: Id,
|
|
406
|
+
cell: Cell<NoTablesSchema, Id, Id>,
|
|
407
|
+
initialSave: boolean,
|
|
408
|
+
requestOrConnection: Request | Connection,
|
|
409
|
+
): boolean;
|
|
410
|
+
/**
|
|
411
|
+
* The canDelCell method lets you allow or disallow deletions of a Cell stored
|
|
412
|
+
* on the server, as sent from a client.
|
|
413
|
+
*
|
|
414
|
+
* This is one of the functions use to sanitize the data that is being sent
|
|
415
|
+
* from a client. Perhaps you might want to make sure the server-stored data
|
|
416
|
+
* adheres to a particular schema, or you might want to make certain data
|
|
417
|
+
* read-only. Remember that you cannot trust the client to only send data that
|
|
418
|
+
* the server considers valid or safe.
|
|
419
|
+
*
|
|
420
|
+
* This method is passed the Table Id, Row Id, and Cell Id that the client is
|
|
421
|
+
* trying to delete. The `connection` parameter will be the web socket
|
|
422
|
+
* connection of that client. You can, for instance, use this to distinguish
|
|
423
|
+
* between different users.
|
|
424
|
+
*
|
|
425
|
+
* Return `false` from this method to disallow this Cell from being deleted on
|
|
426
|
+
* the server, or `true` to allow it. The default implementation returns
|
|
427
|
+
* `true` to allow deletion.
|
|
428
|
+
* @example
|
|
429
|
+
* The following implementation will strip out any attempts by the client to
|
|
430
|
+
* delete the 'name' Cell of the 'me' Row of the 'user' Table:
|
|
431
|
+
*
|
|
432
|
+
* ```js
|
|
433
|
+
* class MyServer extends TinyBasePartyKitServer {
|
|
434
|
+
* canDelCell(tableId, rowId, cellId) {
|
|
435
|
+
* return tableId != 'user' || rowId != 'me' || cellId != 'name';
|
|
436
|
+
* }
|
|
437
|
+
* }
|
|
438
|
+
* ```
|
|
439
|
+
* @category Sanitization
|
|
440
|
+
* @since v4.3.12
|
|
441
|
+
*/
|
|
442
|
+
canDelCell(
|
|
443
|
+
tableId: Id,
|
|
444
|
+
rowId: Id,
|
|
445
|
+
cellId: Id,
|
|
446
|
+
connection: Connection,
|
|
447
|
+
): boolean;
|
|
448
|
+
/**
|
|
449
|
+
* The canSetValue method lets you allow or disallow any changes to a Value
|
|
450
|
+
* stored on the server, as sent from a client.
|
|
451
|
+
*
|
|
452
|
+
* This has schema-based typing. The following is a simplified representation:
|
|
453
|
+
*
|
|
454
|
+
* ```ts override
|
|
455
|
+
* canSetValue(
|
|
456
|
+
* valueId: Id,
|
|
457
|
+
* value: Value,
|
|
458
|
+
* initialSave: boolean,
|
|
459
|
+
* requestOrConnection: Request | Connection,
|
|
460
|
+
* ): boolean;
|
|
461
|
+
* ```
|
|
462
|
+
*
|
|
463
|
+
* This is one of the functions use to sanitize the data that is being sent
|
|
464
|
+
* from a client. Perhaps you might want to make sure the server-stored data
|
|
465
|
+
* adheres to a particular schema, or you might want to make certain data
|
|
466
|
+
* read-only. Remember that you cannot trust the client to only send data that
|
|
467
|
+
* the server considers valid or safe.
|
|
468
|
+
*
|
|
469
|
+
* This method is passed the Value Id that the client is trying to change - as
|
|
470
|
+
* well as the Value itself. The `initialSave` parameter distinguishes between
|
|
471
|
+
* the first bulk save of the Store to the PartyKit room over HTTP (`true`),
|
|
472
|
+
* and subsequent incremental updates over a web sockets (`false`).
|
|
473
|
+
*
|
|
474
|
+
* The final `requestOrConnection` parameter will either be the HTTP(S)
|
|
475
|
+
* request or the web socket connection, in those two cases respectively. You
|
|
476
|
+
* can, for instance, use this to distinguish between different users.
|
|
477
|
+
*
|
|
478
|
+
* Return `false` from this method to disallow changes to this Value on the
|
|
479
|
+
* server, or `true` to allow them. The default implementation returns `true`
|
|
480
|
+
* to allow all changes.
|
|
481
|
+
* @example
|
|
482
|
+
* The following implementation will strip out any attempts by the client to
|
|
483
|
+
* update the 'userId' Value after the initial save:
|
|
484
|
+
*
|
|
485
|
+
* ```js
|
|
486
|
+
* class MyServer extends TinyBasePartyKitServer {
|
|
487
|
+
* canSetValue(valueId, value, initialSave) {
|
|
488
|
+
* return initialSave || userId != 'userId';
|
|
489
|
+
* }
|
|
490
|
+
* }
|
|
491
|
+
* ```
|
|
492
|
+
* @category Sanitization
|
|
493
|
+
* @since v4.3.12
|
|
494
|
+
*/
|
|
495
|
+
canSetValue(
|
|
496
|
+
valueId: Id,
|
|
497
|
+
value: Value<NoValuesSchema, Id>,
|
|
498
|
+
initialSave: boolean,
|
|
499
|
+
requestOrConnection: Request | Connection,
|
|
500
|
+
): boolean;
|
|
501
|
+
/**
|
|
502
|
+
* The canDelValue method lets you allow or disallow deletions of a Value
|
|
503
|
+
* stored on the server, as sent from a client.
|
|
504
|
+
*
|
|
505
|
+
* This is one of the functions use to sanitize the data that is being sent
|
|
506
|
+
* from a client. Perhaps you might want to make sure the server-stored data
|
|
507
|
+
* adheres to a particular schema, or you might want to make certain data
|
|
508
|
+
* read-only. Remember that you cannot trust the client to only send data that
|
|
509
|
+
* the server considers valid or safe.
|
|
510
|
+
*
|
|
511
|
+
* This method is passed the Value Id that the client is trying to delete. The
|
|
512
|
+
* `connection` parameter will be the web socket connection of that client.
|
|
513
|
+
* You can, for instance, use this to distinguish between different users.
|
|
514
|
+
*
|
|
515
|
+
* Return `false` from this method to disallow this Value from being deleted
|
|
516
|
+
* on the server, or `true` to allow it. The default implementation returns
|
|
517
|
+
* `true` to allow deletion.
|
|
518
|
+
* @example
|
|
519
|
+
* The following implementation will strip out any attempts by the client to
|
|
520
|
+
* delete the 'userId' Value:
|
|
521
|
+
*
|
|
522
|
+
* ```js
|
|
523
|
+
* class MyServer extends TinyBasePartyKitServer {
|
|
524
|
+
* canDelValue(valueId) {
|
|
525
|
+
* return valueId != 'userId';
|
|
526
|
+
* }
|
|
527
|
+
* }
|
|
528
|
+
* ```
|
|
529
|
+
* @category Sanitization
|
|
530
|
+
* @since v4.3.12
|
|
179
531
|
*/
|
|
180
|
-
|
|
532
|
+
canDelValue(valueId: Id, connection: Connection): boolean;
|
|
181
533
|
}
|
|
@@ -412,9 +412,8 @@ export interface Tools<in out Schemas extends OptionalSchemas> {
|
|
|
412
412
|
* },
|
|
413
413
|
* });
|
|
414
414
|
* const tools = createTools(store);
|
|
415
|
-
* const [dTs, ts, uiReactDTs, uiReactTsx] =
|
|
416
|
-
* store
|
|
417
|
-
* ).getPrettyStoreApi('shop');
|
|
415
|
+
* const [dTs, ts, uiReactDTs, uiReactTsx] =
|
|
416
|
+
* await createTools(store).getPrettyStoreApi('shop');
|
|
418
417
|
*
|
|
419
418
|
* const dTsLines = dTs.split('\n');
|
|
420
419
|
* console.log(dTsLines[17]);
|
|
@@ -433,9 +432,8 @@ export interface Tools<in out Schemas extends OptionalSchemas> {
|
|
|
433
432
|
* felix: {price: 4},
|
|
434
433
|
* });
|
|
435
434
|
* const tools = createTools(store);
|
|
436
|
-
* const [dTs, ts, uiReactDTs, uiReactTsx] =
|
|
437
|
-
* store
|
|
438
|
-
* ).getPrettyStoreApi('shop');
|
|
435
|
+
* const [dTs, ts, uiReactDTs, uiReactTsx] =
|
|
436
|
+
* await createTools(store).getPrettyStoreApi('shop');
|
|
439
437
|
*
|
|
440
438
|
* const dTsLines = dTs.split('\n');
|
|
441
439
|
* console.log(dTsLines[17]);
|
|
@@ -4393,8 +4393,8 @@ export type WithSchemas<Schemas extends OptionalSchemas> = {
|
|
|
4393
4393
|
* </Provider>
|
|
4394
4394
|
* );
|
|
4395
4395
|
* const Pane = () => {
|
|
4396
|
-
* useWillFinishTransactionListener(
|
|
4397
|
-
*
|
|
4396
|
+
* useWillFinishTransactionListener(() =>
|
|
4397
|
+
* console.log('Will finish transaction'),
|
|
4398
4398
|
* );
|
|
4399
4399
|
* return <span>App</span>;
|
|
4400
4400
|
* };
|
|
@@ -4462,8 +4462,8 @@ export type WithSchemas<Schemas extends OptionalSchemas> = {
|
|
|
4462
4462
|
* </Provider>
|
|
4463
4463
|
* );
|
|
4464
4464
|
* const Pane = () => {
|
|
4465
|
-
* useDidFinishTransactionListener(
|
|
4466
|
-
*
|
|
4465
|
+
* useDidFinishTransactionListener(() =>
|
|
4466
|
+
* console.log('Did finish transaction'),
|
|
4467
4467
|
* );
|
|
4468
4468
|
* return <span>App</span>;
|
|
4469
4469
|
* };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
var t,e;t=this,e=function(t){"use strict";const e=t=>typeof t,a=
|
|
1
|
+
var t,e;t=this,e=function(t){"use strict";const e=t=>typeof t,a="",s=e(a),o=(t,e)=>t instanceof e,n=t=>null==t,r=(t,e,a)=>n(t)?a?.():e(t),i=t=>e(t)==s,c=t=>t.length,d=Object,y=d.keys,u=d.freeze,f=t=>(t=>o(t,d)&&t.constructor==d)(t)&&0==(t=>c(y(t)))(t),h=t=>JSON.stringify(t,((t,e)=>o(e,Map)?d.fromEntries([...e]):e)),l=JSON.parse,p="/store",v=t=>new Map(t),w=(t,e)=>t?.get(e),g=(t,e,a)=>{return n(a)?(s=t,o=e,s?.delete(o),t):t?.set(e,a);var s,o},m=(t,e,a)=>{var s,o;return s=t,o=e,s?.has(o)||g(t,e,a()),w(t,e)},P=v(),S=v(),A="message";t.createPartyKitPersister=(t,e,s,o)=>{const{host:d,room:y}=e.partySocketOptions,{storeProtocol:v="https",storePath:L=p,messagePrefix:C=a}={...i(s)?{storeProtocol:s}:s},T=v+"://"+d+"/parties/"+(e.name??"main")+"/"+y+L,b=async t=>await(await fetch(T,{...t?{method:"PUT",body:h(t)}:{},mode:"cors",cache:"no-store"})).json();return((t,e,a,s,o,i,c=[])=>{let d,y,h,l=0,p=0;m(P,c,(()=>0)),m(S,c,(()=>[]));const v=async t=>(2!=l&&(l=1,await A.schedule((async()=>{await t(),l=0}))),A),A={load:async(a,s)=>await v((async()=>{try{t.setContent(await e())}catch{t.setContent([a,s])}})),startAutoLoad:async(a={},o={})=>(A.stopAutoLoad(),await A.load(a,o),p=1,h=s((async(a,s)=>{if(s){const e=s();await v((async()=>t.setTransactionChanges(e)))}else await v((async()=>{try{t.setContent(a?.()??await e())}catch(t){i?.(t)}}))})),A),stopAutoLoad:()=>(p&&(o(h),h=void 0,p=0),A),save:async e=>(1!=l&&(l=2,await A.schedule((async()=>{try{await a(t.getContent,e)}catch(t){i?.(t)}l=0}))),A),startAutoSave:async()=>(await A.stopAutoSave().save(),d=t.addDidFinishTransactionListener(((t,e)=>{const[a,s]=e();f(a)&&f(s)||A.save((()=>[a,s]))})),A),stopAutoSave:()=>(r(d,t.delListener),A),schedule:async(...t)=>(((t,...e)=>{t.push(...e)})(w(S,c),...t),await(async()=>{if(!w(P,c)){for(g(P,c,1);!n((t=w(S,c),y=t.shift()));)try{await y()}catch(t){i?.(t)}g(P,c,0)}var t})(),A),getStore:()=>t,destroy:()=>A.stopAutoLoad().stopAutoSave(),getStats:()=>({})};return u(A)})(t,(async()=>await b()),(async(t,a)=>{var s,o;a?e.send((s=C,o=a(),s+"s"+(i(o)?o:h(o)))):await b(t())}),(t=>{const a=e=>r(((t,e,a)=>{const s=c(t);return((t,e)=>t.startsWith(e))(e,t)?[e[s],l((o=e,n=s+1,o.slice(n,void 0)))]:void 0;var o,n})(C,e.data),(([e,a])=>{"s"==e&&t(void 0,(()=>a))}));return e.addEventListener(A,a),a}),(t=>{e.removeEventListener(A,t)}),o)}},"object"==typeof exports&&"undefined"!=typeof module?e(exports):"function"==typeof define&&define.amd?define(["exports"],e):e((t="undefined"!=typeof globalThis?globalThis:t||self).TinyBasePersisterPartyKitClient={});
|
|
Binary file
|
|
@@ -1 +1 @@
|
|
|
1
|
-
var t
|
|
1
|
+
var e,t;e=this,t=function(e){"use strict";const t=e=>typeof e,a="",s=t(a),n="t",r=(e,t)=>e.startsWith(t),i=Promise,o=e=>null==e,c=(e,t,a)=>o(e)?a?.():t(e),l=(e,t,a)=>e.slice(t,a),u=e=>e.length,f=(e,t)=>e.map(t),h=(e,...t)=>e.push(...t),y=Object,p=(e=[])=>y.fromEntries(e),g=(e,t)=>f(y.entries(e),(([e,a])=>t(a,e))),d=(e,t,a)=>(((e,t)=>!o(((e,t)=>c(e,(e=>e[t])))(e,t)))(e,t)||(e[t]=a()),e[t]),w=e=>JSON.stringify(e,((e,t)=>t instanceof Map?y.fromEntries([...t]):t)),S=JSON.parse,P=(e,a,n)=>e+a+(t(n)==s?n:w(n)),b=(e,t,a)=>{const s=u(e);return r(t,e)?[t[s],(a?S:String)(l(t,s+1))]:void 0},m=(e,t)=>((e,t)=>e?.forEach(t))(e,((e,a)=>t(a,e))),T="hasStore",v=p(f(["Origin","Methods","Headers"],(e=>["Access-Control-Allow-"+e,"*"]))),x=async e=>await e.party.storage.get((e.config.storagePrefix??a)+T),D=async(e,t,s,c)=>{const l=e.party.storage,f=e.config.storagePrefix??a,y=[l.put(f+T,1)],p=[];g(t[0],((t,a)=>o(t)?!s&&e.canDelTable(a,c)&&((e,...t)=>e.unshift(...t))(p,R(f,n,a)):e.canSetTable(a,s,c)&&g(t,((t,r)=>o(t)?!s&&e.canDelRow(a,r,c)&&h(p,R(f,n,a,r)):e.canSetRow(a,r,s,c)&&g(t,((t,i)=>o(t)?!s&&e.canDelCell(a,r,i,c)&&h(y,l.delete(R(f,n,a,r,i))):e.canSetCell(a,r,i,t,s,c)&&h(y,l.put(R(f,n,a,r,i),t)))))))),g(t[1],((t,a)=>o(t)?!s&&e.canDelValue(a,c)&&h(y,l.delete(f+"v"+a)):e.canSetValue(a,t,s,c)&&h(y,l.put(f+"v"+a,t)))),0!=u(p)&&m(await l.list(),(e=>p.every((t=>!r(e,t)||h(y,l.delete(e))&&0)))),await(async e=>i.all(e))(y)},R=(e,t,...a)=>P(e,t,l(w(a),1,-1)),C=async(e,t,a=null)=>new Response(a,{status:t,headers:e.config.responseHeaders??v});e.TinyBasePartyKitServer=class{constructor(e){this.party=e,this.config={}}async onRequest(e){const t=this.config.storePath??"/store";if(new URL(e.url).pathname.endsWith(t)){const t=await x(this),s=await e.text();return"PUT"==e.method?t?C(this,205):(await D(this,S(s),!0,e),C(this,201)):C(this,200,t?w(await(async e=>{const t={},s={},r=e.config.storagePrefix??a;return m(await e.party.storage.list(),((e,a)=>c(b(r,e),(([e,r])=>{if(e==n){const[e,s,n]=S("["+r+"]");d(d(t,e,p),s,p)[n]=a}else"v"==e&&(s[r]=a)})))),[t,s]})(this)):a)}return C(this,404)}async onMessage(e,t){const s=this.config.messagePrefix??a;await c(b(s,e,1),(async([e,a])=>{"s"==e&&await x(this)&&(await D(this,a,!1,t),this.party.broadcast(P(s,"s",a)))}))}canSetTable(e,t,a){return!0}canDelTable(e,t){return!0}canSetRow(e,t,a,s){return!0}canDelRow(e,t,a){return!0}canSetCell(e,t,a,s,n,r){return!0}canDelCell(e,t,a,s){return!0}canSetValue(e,t,a,s){return!0}canDelValue(e,t){return!0}}},"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).TinyBasePersisterPartyKitServer={});
|
|
Binary file
|
|
@@ -1 +1 @@
|
|
|
1
|
-
var e,t;e=this,t=function(e){"use strict";const t=e=>typeof e,n=
|
|
1
|
+
var e,t;e=this,t=function(e){"use strict";const t=e=>typeof e,n="",o=t(n),r=(e,t)=>e instanceof t,l=e=>null==e,i=(e,t,n)=>l(e)?null==n?void 0:n():t(e),s=e=>t(e)==o,u=e=>e.length,a=Object,d=a.keys,c=a.freeze,v=e=>(e=>r(e,a)&&e.constructor==a)(e)&&0==(e=>u(d(e)))(e),y=e=>JSON.stringify(e,((e,t)=>r(t,Map)?a.fromEntries([...t]):t)),f=JSON.parse,p="/store",h=e=>new Map(e),m=(e,t)=>null==e?void 0:e.get(t),P=(e,t,n)=>{return l(n)?(r=t,null==(o=e)||o.delete(r),e):null==e?void 0:e.set(t,n);var o,r},b=(e,t,n)=>{var o,r,l;return r=t,null!=(l=null==(o=e)?void 0:o.has(r))&&l||P(e,t,n()),m(e,t)};var g=(e,t,n)=>new Promise(((o,r)=>{var l=e=>{try{s(n.next(e))}catch(e){r(e)}},i=e=>{try{s(n.throw(e))}catch(e){r(e)}},s=e=>e.done?o(e.value):Promise.resolve(e.value).then(l,i);s((n=n.apply(e,t)).next())}));const O=h(),S=h();var j=Object.defineProperty,w=Object.defineProperties,x=Object.getOwnPropertyDescriptors,A=Object.getOwnPropertySymbols,L=Object.prototype.hasOwnProperty,C=Object.prototype.propertyIsEnumerable,T=(e,t,n)=>t in e?j(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,E=(e,t)=>{for(var n in t||(t={}))L.call(t,n)&&T(e,n,t[n]);if(A)for(var n of A(t))C.call(t,n)&&T(e,n,t[n]);return e},k=(e,t,n)=>new Promise(((o,r)=>{var l=e=>{try{s(n.next(e))}catch(e){r(e)}},i=e=>{try{s(n.throw(e))}catch(e){r(e)}},s=e=>e.done?o(e.value):Promise.resolve(e.value).then(l,i);s((n=n.apply(e,t)).next())}));const D="message";e.createPartyKitPersister=(e,t,o,r)=>{var a;const{host:d,room:h}=t.partySocketOptions,{storeProtocol:j="https",storePath:A=p,messagePrefix:L=n}=E({},s(o)?{storeProtocol:o}:o),C=j+"://"+d+"/parties/"+(null!=(a=t.name)?a:"main")+"/"+h+A,T=e=>k(void 0,null,(function*(){return yield(yield fetch(C,(t=E({},e?{method:"PUT",body:y(e)}:{}),n={mode:"cors",cache:"no-store"},w(t,x(n))))).json();var t,n}));return((e,t,n,o,r,s,u=[])=>{let a,d,y,f=0,p=0;b(O,u,(()=>0)),b(S,u,(()=>[]));const h=e=>g(void 0,null,(function*(){return 2!=f&&(f=1,yield j.schedule((()=>g(void 0,null,(function*(){yield e(),f=0}))))),j})),j={load:(n,o)=>g(void 0,null,(function*(){return yield h((()=>g(void 0,null,(function*(){try{e.setContent(yield t())}catch(t){e.setContent([n,o])}}))))})),startAutoLoad:(...n)=>g(void 0,[...n],(function*(n={},r={}){return j.stopAutoLoad(),yield j.load(n,r),p=1,y=o(((n,o)=>g(void 0,null,(function*(){if(o){const t=o();yield h((()=>g(void 0,null,(function*(){return e.setTransactionChanges(t)}))))}else yield h((()=>g(void 0,null,(function*(){var o;try{e.setContent(null!=(o=null==n?void 0:n())?o:yield t())}catch(e){null==s||s(e)}}))))})))),j})),stopAutoLoad:()=>(p&&(r(y),y=void 0,p=0),j),save:t=>g(void 0,null,(function*(){return 1!=f&&(f=2,yield j.schedule((()=>g(void 0,null,(function*(){try{yield n(e.getContent,t)}catch(e){null==s||s(e)}f=0}))))),j})),startAutoSave:()=>g(void 0,null,(function*(){return yield j.stopAutoSave().save(),a=e.addDidFinishTransactionListener(((e,t)=>{const[n,o]=t();v(n)&&v(o)||j.save((()=>[n,o]))})),j})),stopAutoSave:()=>(i(a,e.delListener),j),schedule:(...e)=>g(void 0,null,(function*(){return((e,...t)=>{e.push(...t)})(m(S,u),...e),yield g(void 0,null,(function*(){if(!m(O,u)){for(P(O,u,1);!l((e=m(S,u),d=e.shift()));)try{yield d()}catch(e){null==s||s(e)}P(O,u,0)}var e})),j})),getStore:()=>e,destroy:()=>j.stopAutoLoad().stopAutoSave(),getStats:()=>({})};return c(j)})(e,(()=>k(void 0,null,(function*(){return yield T()}))),((e,n)=>k(void 0,null,(function*(){var o,r;n?t.send((o=L,r=n(),o+"s"+(s(r)?r:y(r)))):yield T(e())}))),(e=>{const n=t=>i(((e,t,n)=>{const o=u(e);return((e,t)=>e.startsWith(t))(t,e)?[t[o],f((r=t,l=o+1,r.slice(l,void 0)))]:void 0;var r,l})(L,t.data),(([t,n])=>{"s"==t&&e(void 0,(()=>n))}));return t.addEventListener(D,n),n}),(e=>{t.removeEventListener(D,e)}),r)}},"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).TinyBasePersisterPartyKitClient={});
|
|
Binary file
|
|
@@ -1 +1 @@
|
|
|
1
|
-
var e,t;e=this,t=function(e){"use strict";const t=e=>typeof e,
|
|
1
|
+
var e,t;e=this,t=function(e){"use strict";const t=e=>typeof e,n="",r=t(n),l="t",i=(e,t)=>e.startsWith(t),s=Promise,o=e=>null==e,a=(e,t,n)=>o(e)?null==n?void 0:n():t(e),u=(e,t,n)=>e.slice(t,n),c=e=>e.length,d=(e,t)=>e.map(t),f=(e,...t)=>e.push(...t),h=Object,y=(e=[])=>h.fromEntries(e),v=(e,t)=>d(h.entries(e),(([e,n])=>t(n,e))),p=(e,t,n)=>(((e,t)=>!o(((e,t)=>a(e,(e=>e[t])))(e,t)))(e,t)||(e[t]=n()),e[t]),g=e=>JSON.stringify(e,((e,t)=>t instanceof Map?h.fromEntries([...t]):t)),P=JSON.parse,S=(e,n,l)=>e+n+(t(l)==r?l:g(l)),m=(e,t,n)=>{const r=c(e);return i(t,e)?[t[r],(n?P:String)(u(t,r+1))]:void 0},x=(e,t)=>((e,t)=>null==e?void 0:e.forEach(t))(e,((e,n)=>t(n,e)));var w=(e,t,n)=>new Promise(((r,l)=>{var i=e=>{try{o(n.next(e))}catch(e){l(e)}},s=e=>{try{o(n.throw(e))}catch(e){l(e)}},o=e=>e.done?r(e.value):Promise.resolve(e.value).then(i,s);o((n=n.apply(e,t)).next())}));const b="hasStore",T=y(d(["Origin","Methods","Headers"],(e=>["Access-Control-Allow-"+e,"*"]))),D=e=>w(void 0,null,(function*(){var t;return yield e.party.storage.get((null!=(t=e.config.storagePrefix)?t:n)+b)})),R=(e,t,r,a)=>w(void 0,null,(function*(){var u;const d=e.party.storage,h=null!=(u=e.config.storagePrefix)?u:n,y=[d.put(h+b,1)],p=[];v(t[0],((t,n)=>o(t)?!r&&e.canDelTable(n,a)&&((e,...t)=>e.unshift(...t))(p,C(h,l,n)):e.canSetTable(n,r,a)&&v(t,((t,i)=>o(t)?!r&&e.canDelRow(n,i,a)&&f(p,C(h,l,n,i)):e.canSetRow(n,i,r,a)&&v(t,((t,s)=>o(t)?!r&&e.canDelCell(n,i,s,a)&&f(y,d.delete(C(h,l,n,i,s))):e.canSetCell(n,i,s,t,r,a)&&f(y,d.put(C(h,l,n,i,s),t)))))))),v(t[1],((t,n)=>o(t)?!r&&e.canDelValue(n,a)&&f(y,d.delete(h+"v"+n)):e.canSetValue(n,t,r,a)&&f(y,d.put(h+"v"+n,t)))),0!=c(p)&&x(yield d.list(),(e=>p.every((t=>!i(e,t)||f(y,d.delete(e))&&0)))),yield(e=>{return t=function*(){return s.all(e)},new Promise(((e,n)=>{var r=e=>{try{i(t.next(e))}catch(e){n(e)}},l=e=>{try{i(t.throw(e))}catch(e){n(e)}},i=t=>t.done?e(t.value):Promise.resolve(t.value).then(r,l);i((t=t.apply(void 0,null)).next())}));var t})(y)})),C=(e,t,...n)=>S(e,t,u(g(n),1,-1)),O=(e,t,n=null)=>w(void 0,null,(function*(){var r;return new Response(n,{status:t,headers:null!=(r=e.config.responseHeaders)?r:T})}));e.TinyBasePartyKitServer=class{constructor(e){this.party=e,this.config={}}onRequest(e){return w(this,null,(function*(){var t;const r=null!=(t=this.config.storePath)?t:"/store";if(new URL(e.url).pathname.endsWith(r)){const t=yield D(this),r=yield e.text();return"PUT"==e.method?t?O(this,205):(yield R(this,P(r),!0,e),O(this,201)):O(this,200,t?g(yield(i=this,w(void 0,null,(function*(){var e;const t={},r={},s=null!=(e=i.config.storagePrefix)?e:n;return x(yield i.party.storage.list(),((e,n)=>a(m(s,e),(([e,i])=>{if(e==l){const[e,r,l]=P("["+i+"]");p(p(t,e,y),r,y)[l]=n}else"v"==e&&(r[i]=n)})))),[t,r]})))):n)}var i;return O(this,404)}))}onMessage(e,t){return w(this,null,(function*(){var r;const l=null!=(r=this.config.messagePrefix)?r:n;yield a(m(l,e,1),(e=>w(this,[e],(function*([e,n]){"s"==e&&(yield D(this))&&(yield R(this,n,!1,t),this.party.broadcast(S(l,"s",n)))}))))}))}canSetTable(e,t,n){return!0}canDelTable(e,t){return!0}canSetRow(e,t,n,r){return!0}canDelRow(e,t,n){return!0}canSetCell(e,t,n,r,l,i){return!0}canDelCell(e,t,n,r){return!0}canSetValue(e,t,n,r){return!0}canDelValue(e,t){return!0}}},"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).TinyBasePersisterPartyKitServer={});
|
|
Binary file
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "tinybase",
|
|
3
|
-
"version": "4.3.
|
|
3
|
+
"version": "4.3.12",
|
|
4
4
|
"author": "jamesgpearce",
|
|
5
5
|
"repository": "github:tinyplex/tinybase",
|
|
6
6
|
"license": "MIT",
|
|
@@ -228,14 +228,14 @@
|
|
|
228
228
|
"@types/jest": "^29.5.5",
|
|
229
229
|
"@types/jest-environment-puppeteer": "^5.0.4",
|
|
230
230
|
"@types/less": "^3.0.4",
|
|
231
|
-
"@types/node": "^20.8.
|
|
231
|
+
"@types/node": "^20.8.2",
|
|
232
232
|
"@types/puppeteer": "^5.4.7",
|
|
233
|
-
"@types/react": "^18.2.
|
|
234
|
-
"@types/react-dom": "^18.2.
|
|
233
|
+
"@types/react": "^18.2.25",
|
|
234
|
+
"@types/react-dom": "^18.2.10",
|
|
235
235
|
"@types/react-test-renderer": "^18.0.3",
|
|
236
236
|
"@types/tmp": "^0.2.4",
|
|
237
|
-
"@typescript-eslint/eslint-plugin": "^6.7.
|
|
238
|
-
"@typescript-eslint/parser": "^6.7.
|
|
237
|
+
"@typescript-eslint/eslint-plugin": "^6.7.4",
|
|
238
|
+
"@typescript-eslint/parser": "^6.7.4",
|
|
239
239
|
"@vlcn.io/crsqlite-wasm": "^0.15.2",
|
|
240
240
|
"asciichart": "^1.5.25",
|
|
241
241
|
"automerge-repo": "^0.1.0",
|
|
@@ -265,7 +265,7 @@
|
|
|
265
265
|
"jest-fetch-mock": "^3.0.3",
|
|
266
266
|
"jest-puppeteer": "^9.0.1",
|
|
267
267
|
"less": "^4.2.0",
|
|
268
|
-
"partykit": "^0.0.
|
|
268
|
+
"partykit": "^0.0.27",
|
|
269
269
|
"partysocket": "^0.0.8",
|
|
270
270
|
"prettier": "^3.0.3",
|
|
271
271
|
"puppeteer": "21.1.1",
|
|
@@ -289,7 +289,7 @@
|
|
|
289
289
|
"@sqlite.org/sqlite-wasm": "^3.43.1-build1",
|
|
290
290
|
"@vlcn.io/crsqlite-wasm": "^0.15.2",
|
|
291
291
|
"automerge-repo": "^0.1.0",
|
|
292
|
-
"partykit": "^0.0.
|
|
292
|
+
"partykit": "^0.0.27",
|
|
293
293
|
"partysocket": "^0.0.8",
|
|
294
294
|
"prettier": "^3.0.3",
|
|
295
295
|
"react": "^18.2.0",
|