@pluv/platform-pluv 0.0.0-experimental-20250527040415

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/CHANGELOG.md ADDED
@@ -0,0 +1,934 @@
1
+ # @pluv/platform-pluv
2
+
3
+ ## 0.0.0-experimental-20250527040415
4
+
5
+ ### Patch Changes
6
+
7
+ - 724b228: Fixed validating the platform config when using the `PluvServer` in fetch mode.
8
+ - Updated dependencies [724b228]
9
+ - @pluv/io@0.0.0-experimental-20250527040415
10
+ - @pluv/crdt@0.0.0-experimental-20250527040415
11
+ - @pluv/types@0.0.0-experimental-20250527040415
12
+
13
+ ## 2.2.7
14
+
15
+ ### Patch Changes
16
+
17
+ - Updated dependencies [ec2717b]
18
+ - @pluv/io@2.2.7
19
+ - @pluv/crdt@2.2.7
20
+ - @pluv/types@2.2.7
21
+
22
+ ## 2.2.6
23
+
24
+ ### Patch Changes
25
+
26
+ - d5837ce: Fixed the context in `platformPluv` being declared immediately, instead of when the event listeners ran (causing errors in Cloudflare Workers).
27
+ - @pluv/crdt@2.2.6
28
+ - @pluv/io@2.2.6
29
+ - @pluv/types@2.2.6
30
+
31
+ ## 2.2.5
32
+
33
+ ### Patch Changes
34
+
35
+ - @pluv/crdt@2.2.5
36
+ - @pluv/io@2.2.5
37
+ - @pluv/types@2.2.5
38
+
39
+ ## 2.2.4
40
+
41
+ ### Patch Changes
42
+
43
+ - 113ec6c: Updated internal logging.
44
+ - @pluv/crdt@2.2.4
45
+ - @pluv/io@2.2.4
46
+ - @pluv/types@2.2.4
47
+
48
+ ## 2.2.3
49
+
50
+ ### Patch Changes
51
+
52
+ - feeae21: Added debug logging.
53
+ - @pluv/crdt@2.2.3
54
+ - @pluv/io@2.2.3
55
+ - @pluv/types@2.2.3
56
+
57
+ ## 2.2.2
58
+
59
+ ### Patch Changes
60
+
61
+ - @pluv/crdt@2.2.2
62
+ - @pluv/io@2.2.2
63
+ - @pluv/types@2.2.2
64
+
65
+ ## 2.2.1
66
+
67
+ ### Patch Changes
68
+
69
+ - 6563957: Fix `createToken` throwing a TypeError.
70
+ - @pluv/crdt@2.2.1
71
+ - @pluv/io@2.2.1
72
+ - @pluv/types@2.2.1
73
+
74
+ ## 2.2.0
75
+
76
+ ### Patch Changes
77
+
78
+ - Updated dependencies [cb660cd]
79
+ - @pluv/io@2.2.0
80
+ - @pluv/crdt@2.2.0
81
+ - @pluv/types@2.2.0
82
+
83
+ ## 2.1.0
84
+
85
+ ### Patch Changes
86
+
87
+ - @pluv/crdt@2.1.0
88
+ - @pluv/io@2.1.0
89
+ - @pluv/types@2.1.0
90
+
91
+ ## 2.0.2
92
+
93
+ ### Patch Changes
94
+
95
+ - @pluv/crdt@2.0.2
96
+ - @pluv/io@2.0.2
97
+ - @pluv/types@2.0.2
98
+
99
+ ## 2.0.1
100
+
101
+ ### Patch Changes
102
+
103
+ - @pluv/crdt@2.0.1
104
+ - @pluv/io@2.0.1
105
+ - @pluv/types@2.0.1
106
+
107
+ ## 2.0.0
108
+
109
+ ### Patch Changes
110
+
111
+ - Updated dependencies [047a1d8]
112
+ - @pluv/types@2.0.0
113
+ - @pluv/crdt@2.0.0
114
+ - @pluv/io@2.0.0
115
+
116
+ ## 1.0.2
117
+
118
+ ### Patch Changes
119
+
120
+ - @pluv/crdt@1.0.2
121
+ - @pluv/io@1.0.2
122
+ - @pluv/types@1.0.2
123
+
124
+ ## 1.0.1
125
+
126
+ ### Patch Changes
127
+
128
+ - Updated dependencies [c583be9]
129
+ - @pluv/io@1.0.1
130
+ - @pluv/crdt@1.0.1
131
+ - @pluv/types@1.0.1
132
+
133
+ ## 1.0.0
134
+
135
+ ### Major Changes
136
+
137
+ - af94706: pluv.io is now stable and production ready!
138
+
139
+ With this v1 release, pluv.io will now follow [semantic versioning](https://semver.org/) with more comprehensive release notes for future changes to the library.
140
+
141
+ Checkout the [full documentation here](https://pluv.io/docs/introduction) to get started today!
142
+
143
+ ### Patch Changes
144
+
145
+ - Updated dependencies [af94706]
146
+ - @pluv/crdt@1.0.0
147
+ - @pluv/io@1.0.0
148
+ - @pluv/types@1.0.0
149
+
150
+ ## 0.44.2
151
+
152
+ ### Patch Changes
153
+
154
+ - @pluv/crdt@0.44.2
155
+ - @pluv/io@0.44.2
156
+ - @pluv/types@0.44.2
157
+
158
+ ## 0.44.1
159
+
160
+ ### Patch Changes
161
+
162
+ - @pluv/crdt@0.44.1
163
+ - @pluv/io@0.44.1
164
+ - @pluv/types@0.44.1
165
+
166
+ ## 0.44.0
167
+
168
+ ### Patch Changes
169
+
170
+ - @pluv/crdt@0.44.0
171
+ - @pluv/io@0.44.0
172
+ - @pluv/types@0.44.0
173
+
174
+ ## 0.43.0
175
+
176
+ ### Patch Changes
177
+
178
+ - Updated dependencies [e60a677]
179
+ - Updated dependencies [0063e80]
180
+ - Updated dependencies [244a973]
181
+ - Updated dependencies [4b0fbb3]
182
+ - @pluv/io@0.43.0
183
+ - @pluv/crdt@0.43.0
184
+ - @pluv/types@0.43.0
185
+
186
+ ## 0.42.0
187
+
188
+ ### Patch Changes
189
+
190
+ - def08bc: Fix default endpoint for `createToken`.
191
+ - Updated dependencies [cf1529a]
192
+ - @pluv/io@0.42.0
193
+ - @pluv/crdt@0.42.0
194
+ - @pluv/types@0.42.0
195
+
196
+ ## 0.41.7
197
+
198
+ ### Patch Changes
199
+
200
+ - c698c24: Update hidden endpoints parameter to be provided as a function.
201
+ - @pluv/crdt@0.41.7
202
+ - @pluv/io@0.41.7
203
+ - @pluv/types@0.41.7
204
+
205
+ ## 0.41.6
206
+
207
+ ### Patch Changes
208
+
209
+ - @pluv/crdt@0.41.6
210
+ - @pluv/io@0.41.6
211
+ - @pluv/types@0.41.6
212
+
213
+ ## 0.41.5
214
+
215
+ ### Patch Changes
216
+
217
+ - @pluv/crdt@0.41.5
218
+ - @pluv/io@0.41.5
219
+ - @pluv/types@0.41.5
220
+
221
+ ## 0.41.4
222
+
223
+ ### Patch Changes
224
+
225
+ - 8857e8e: Added the ability to use functions to return public keys, secret keys and webhook secrets for `@pluv/platform-pluv`.
226
+ - @pluv/crdt@0.41.4
227
+ - @pluv/io@0.41.4
228
+ - @pluv/types@0.41.4
229
+
230
+ ## 0.41.3
231
+
232
+ ### Patch Changes
233
+
234
+ - Updated dependencies [49051c0]
235
+ - @pluv/io@0.41.3
236
+ - @pluv/crdt@0.41.3
237
+ - @pluv/types@0.41.3
238
+
239
+ ## 0.41.2
240
+
241
+ ### Patch Changes
242
+
243
+ - @pluv/crdt@0.41.2
244
+ - @pluv/io@0.41.2
245
+ - @pluv/types@0.41.2
246
+
247
+ ## 0.41.1
248
+
249
+ ### Patch Changes
250
+
251
+ - @pluv/crdt@0.41.1
252
+ - @pluv/io@0.41.1
253
+ - @pluv/types@0.41.1
254
+
255
+ ## 0.41.0
256
+
257
+ ### Patch Changes
258
+
259
+ - Updated dependencies [73adf21]
260
+ - Updated dependencies [f02a430]
261
+ - Updated dependencies [0b908b3]
262
+ - Updated dependencies [6422f3b]
263
+ - Updated dependencies [555b88d]
264
+ - Updated dependencies [a663c65]
265
+ - Updated dependencies [555b88d]
266
+ - @pluv/io@0.41.0
267
+ - @pluv/crdt@0.41.0
268
+ - @pluv/types@0.41.0
269
+
270
+ ## 0.40.2
271
+
272
+ ### Patch Changes
273
+
274
+ - @pluv/crdt@0.40.2
275
+ - @pluv/io@0.40.2
276
+ - @pluv/types@0.40.2
277
+
278
+ ## 0.40.1
279
+
280
+ ### Patch Changes
281
+
282
+ - @pluv/crdt@0.40.1
283
+ - @pluv/io@0.40.1
284
+ - @pluv/types@0.40.1
285
+
286
+ ## 0.40.0
287
+
288
+ ### Patch Changes
289
+
290
+ - @pluv/crdt@0.40.0
291
+ - @pluv/io@0.40.0
292
+ - @pluv/types@0.40.0
293
+
294
+ ## 0.39.1
295
+
296
+ ### Patch Changes
297
+
298
+ - @pluv/crdt@0.39.1
299
+ - @pluv/io@0.39.1
300
+ - @pluv/types@0.39.1
301
+
302
+ ## 0.39.0
303
+
304
+ ### Patch Changes
305
+
306
+ - Updated dependencies [fe6e239]
307
+ - Updated dependencies [737d508]
308
+ - @pluv/io@0.39.0
309
+ - @pluv/crdt@0.39.0
310
+ - @pluv/types@0.39.0
311
+
312
+ ## 0.38.14
313
+
314
+ ### Patch Changes
315
+
316
+ - @pluv/crdt@0.38.14
317
+ - @pluv/io@0.38.14
318
+ - @pluv/types@0.38.14
319
+
320
+ ## 0.38.13
321
+
322
+ ### Patch Changes
323
+
324
+ - Updated dependencies [809afd3]
325
+ - @pluv/io@0.38.13
326
+ - @pluv/crdt@0.38.13
327
+ - @pluv/types@0.38.13
328
+
329
+ ## 0.38.12
330
+
331
+ ### Patch Changes
332
+
333
+ - @pluv/crdt@0.38.12
334
+ - @pluv/io@0.38.12
335
+ - @pluv/types@0.38.12
336
+
337
+ ## 0.38.11
338
+
339
+ ### Patch Changes
340
+
341
+ - @pluv/crdt@0.38.11
342
+ - @pluv/io@0.38.11
343
+ - @pluv/types@0.38.11
344
+
345
+ ## 0.38.10
346
+
347
+ ### Patch Changes
348
+
349
+ - @pluv/crdt@0.38.10
350
+ - @pluv/io@0.38.10
351
+ - @pluv/types@0.38.10
352
+
353
+ ## 0.38.9
354
+
355
+ ### Patch Changes
356
+
357
+ - 9b3af07: Updated internal event handlers to return more meaningful status codes and room identifiers.
358
+ - @pluv/crdt@0.38.9
359
+ - @pluv/io@0.38.9
360
+ - @pluv/types@0.38.9
361
+
362
+ ## 0.38.8
363
+
364
+ ### Patch Changes
365
+
366
+ - a39343b: Fix the `onUserDisconnected` event triggering when `onUserConnected` event triggers.
367
+ - @pluv/crdt@0.38.8
368
+ - @pluv/io@0.38.8
369
+ - @pluv/types@0.38.8
370
+
371
+ ## 0.38.7
372
+
373
+ ### Patch Changes
374
+
375
+ - 05c6f1a: Fix `TypeError` on event handler invocations once again.
376
+ - @pluv/crdt@0.38.7
377
+ - @pluv/io@0.38.7
378
+ - @pluv/types@0.38.7
379
+
380
+ ## 0.38.6
381
+
382
+ ### Patch Changes
383
+
384
+ - 07fbeef: Fix `TypeError` on event handler invocations.
385
+ - @pluv/crdt@0.38.6
386
+ - @pluv/io@0.38.6
387
+ - @pluv/types@0.38.6
388
+
389
+ ## 0.38.5
390
+
391
+ ### Patch Changes
392
+
393
+ - 77df696: Fixed platform event contexts being undefined.
394
+ - @pluv/crdt@0.38.5
395
+ - @pluv/io@0.38.5
396
+ - @pluv/types@0.38.5
397
+
398
+ ## 0.38.4
399
+
400
+ ### Patch Changes
401
+
402
+ - 15399b7: Fix webhook signature validation.
403
+ - @pluv/crdt@0.38.4
404
+ - @pluv/io@0.38.4
405
+ - @pluv/types@0.38.4
406
+
407
+ ## 0.38.3
408
+
409
+ ### Patch Changes
410
+
411
+ - Updated dependencies [8346273]
412
+ - @pluv/io@0.38.3
413
+ - @pluv/crdt@0.38.3
414
+ - @pluv/types@0.38.3
415
+
416
+ ## 0.38.2
417
+
418
+ ### Patch Changes
419
+
420
+ - Updated dependencies [039cd64]
421
+ - @pluv/io@0.38.2
422
+ - @pluv/crdt@0.38.2
423
+ - @pluv/types@0.38.2
424
+
425
+ ## 0.38.1
426
+
427
+ ### Patch Changes
428
+
429
+ - @pluv/crdt@0.38.1
430
+ - @pluv/io@0.38.1
431
+ - @pluv/types@0.38.1
432
+
433
+ ## 0.38.0
434
+
435
+ ### Patch Changes
436
+
437
+ - Updated dependencies [f4ceca3]
438
+ - @pluv/types@0.38.0
439
+ - @pluv/io@0.38.0
440
+ - @pluv/crdt@0.38.0
441
+
442
+ ## 0.37.7
443
+
444
+ ### Patch Changes
445
+
446
+ - c874f25: Fixed webhook signature verification.
447
+ - @pluv/crdt@0.37.7
448
+ - @pluv/io@0.37.7
449
+ - @pluv/types@0.37.7
450
+
451
+ ## 0.37.6
452
+
453
+ ### Patch Changes
454
+
455
+ - Updated dependencies [3a874f1]
456
+ - @pluv/io@0.37.6
457
+ - @pluv/crdt@0.37.6
458
+ - @pluv/types@0.37.6
459
+
460
+ ## 0.37.5
461
+
462
+ ### Patch Changes
463
+
464
+ - Updated dependencies [9a9ecee]
465
+ - @pluv/io@0.37.5
466
+ - @pluv/crdt@0.37.5
467
+ - @pluv/types@0.37.5
468
+
469
+ ## 0.37.4
470
+
471
+ ### Patch Changes
472
+
473
+ - @pluv/crdt@0.37.4
474
+ - @pluv/io@0.37.4
475
+ - @pluv/types@0.37.4
476
+
477
+ ## 0.37.3
478
+
479
+ ### Patch Changes
480
+
481
+ - @pluv/crdt@0.37.3
482
+ - @pluv/io@0.37.3
483
+ - @pluv/types@0.37.3
484
+
485
+ ## 0.37.2
486
+
487
+ ### Patch Changes
488
+
489
+ - @pluv/crdt@0.37.2
490
+ - @pluv/io@0.37.2
491
+ - @pluv/types@0.37.2
492
+
493
+ ## 0.37.1
494
+
495
+ ### Patch Changes
496
+
497
+ - @pluv/crdt@0.37.1
498
+ - @pluv/io@0.37.1
499
+ - @pluv/types@0.37.1
500
+
501
+ ## 0.37.0
502
+
503
+ ### Minor Changes
504
+
505
+ - 5165be0: **BREAKING**
506
+
507
+ Updated the `platformPluv` function to return an entire `createIO` input object. Now `createIO` must be called with `platformPluv`'s return value as an input.
508
+
509
+ ```ts
510
+ // Before
511
+
512
+ import { createIO } from "@pluv/io";
513
+ import { platformPluv } from "@pluv/platform-pluv";
514
+
515
+ export const io = createIO({
516
+ authorize: {
517
+ // ...
518
+ },
519
+ context: {
520
+ // ...
521
+ },
522
+ platform: platformPluv({
523
+ // ...
524
+ }),
525
+ // ...
526
+ });
527
+
528
+ // After
529
+
530
+ import { createIO } from "@pluv/io";
531
+ import { platformPluv } from "@pluv/platform-pluv";
532
+
533
+ export const io = createIO(
534
+ platformPluv({
535
+ authorize: {
536
+ // ...
537
+ },
538
+ context: {
539
+ // ...
540
+ },
541
+ }),
542
+ );
543
+ ```
544
+
545
+ ### Patch Changes
546
+
547
+ - 9b74abb: Improved type inference when calling `PluvIO.server` to not include options that are always undefined (i.e. are not allowed by the specified platform).
548
+ - Updated dependencies [9b74abb]
549
+ - @pluv/io@0.37.0
550
+ - @pluv/crdt@0.37.0
551
+ - @pluv/types@0.37.0
552
+
553
+ ## 0.36.0
554
+
555
+ ### Patch Changes
556
+
557
+ - @pluv/crdt@0.36.0
558
+ - @pluv/io@0.36.0
559
+ - @pluv/types@0.36.0
560
+
561
+ ## 0.35.4
562
+
563
+ ### Patch Changes
564
+
565
+ - Updated dependencies [5d3a56f]
566
+ - @pluv/io@0.35.4
567
+ - @pluv/crdt@0.35.4
568
+ - @pluv/types@0.35.4
569
+
570
+ ## 0.35.3
571
+
572
+ ### Patch Changes
573
+
574
+ - @pluv/crdt@0.35.3
575
+ - @pluv/io@0.35.3
576
+ - @pluv/types@0.35.3
577
+
578
+ ## 0.35.2
579
+
580
+ ### Patch Changes
581
+
582
+ - 47ab053: Remove unused check for `authorize.required` for `@pluv/platform-pluv`.
583
+ - Updated dependencies [81cb692]
584
+ - @pluv/types@0.35.2
585
+ - @pluv/io@0.35.2
586
+ - @pluv/crdt@0.35.2
587
+
588
+ ## 0.35.1
589
+
590
+ ### Patch Changes
591
+
592
+ - @pluv/crdt@0.35.1
593
+ - @pluv/io@0.35.1
594
+ - @pluv/types@0.35.1
595
+
596
+ ## 0.35.0
597
+
598
+ ### Patch Changes
599
+
600
+ - Updated dependencies [c9073ad]
601
+ - @pluv/io@0.35.0
602
+ - @pluv/crdt@0.35.0
603
+ - @pluv/types@0.35.0
604
+
605
+ ## 0.34.1
606
+
607
+ ### Patch Changes
608
+
609
+ - Updated dependencies [d639427]
610
+ - @pluv/io@0.34.1
611
+ - @pluv/crdt@0.34.1
612
+ - @pluv/types@0.34.1
613
+
614
+ ## 0.34.0
615
+
616
+ ### Minor Changes
617
+
618
+ - 70af3b2: **BREAKING**: The API has been updated to now be called as function `platformPluv` into `createIO` from `@pluv/io`.
619
+
620
+ ```ts
621
+ // Before
622
+
623
+ import { createIO } from "@pluv/platform-pluv";
624
+
625
+ export const io = createIO({
626
+ authorize: {
627
+ user: z.object({
628
+ id: z.string(),
629
+ }),
630
+ },
631
+ basePath: "/api/pluv",
632
+ publicKey: "pk_...",
633
+ secretKey: "sk_...",
634
+ webhookSecret: "whsec_...",
635
+ });
636
+
637
+ export const GET = pluv.handler;
638
+
639
+ // After
640
+
641
+ import { createIO } from "@pluv/io";
642
+ import { platformPluv } from "@pluv/platform-pluv";
643
+
644
+ export const io = createIO({
645
+ authorize: {
646
+ user: z.object({
647
+ id: z.string(),
648
+ }),
649
+ },
650
+ platform: platformPluv({
651
+ basePath: "/api/pluv",
652
+ publicKey: "pk_...",
653
+ secretKey: "sk_...",
654
+ webhookSecret: "whsec_...",
655
+ }),
656
+ });
657
+
658
+ export const ioServer = io.server();
659
+
660
+ // Example: If you're on Next.js
661
+ export const GET = ioServer.fetch;
662
+ ```
663
+
664
+ ### Patch Changes
665
+
666
+ - Updated dependencies [0c920ea]
667
+ - Updated dependencies [70af3b2]
668
+ - @pluv/io@0.34.0
669
+ - @pluv/crdt@0.34.0
670
+ - @pluv/types@0.34.0
671
+
672
+ ## 0.33.0
673
+
674
+ ### Patch Changes
675
+
676
+ - f14b3be: Updated webhooks path to base path.
677
+ - @pluv/crdt@0.33.0
678
+ - @pluv/io@0.33.0
679
+ - @pluv/types@0.33.0
680
+
681
+ ## 0.32.9
682
+
683
+ ### Patch Changes
684
+
685
+ - @pluv/crdt@0.32.9
686
+ - @pluv/io@0.32.9
687
+ - @pluv/types@0.32.9
688
+
689
+ ## 0.32.8
690
+
691
+ ### Patch Changes
692
+
693
+ - Updated dependencies [e659f8a]
694
+ - @pluv/io@0.32.8
695
+ - @pluv/crdt@0.32.8
696
+ - @pluv/types@0.32.8
697
+
698
+ ## 0.32.7
699
+
700
+ ### Patch Changes
701
+
702
+ - a9a1f7b: Export event schemas.
703
+ - @pluv/crdt@0.32.7
704
+ - @pluv/io@0.32.7
705
+ - @pluv/types@0.32.7
706
+
707
+ ## 0.32.6
708
+
709
+ ### Patch Changes
710
+
711
+ - 25292d4: Fix event payload types to only contain serializable fields.
712
+ - c0956e7: Add `onUserConnected` and `onUserDisconnected` events on `PluvServer`.
713
+
714
+ ```ts
715
+ import { createIO } from "@pluv/io";
716
+
717
+ const io = createIO({
718
+ /* ... */
719
+ });
720
+
721
+ const ioServer = io.server({
722
+ // ...
723
+ onUserConnected: (event) => {
724
+ // ...
725
+ },
726
+ onUserDisconnected: (event) => {
727
+ // ...
728
+ },
729
+ });
730
+ ```
731
+
732
+ - fc83a44: Enable `onUserConnected` and `onUserDisconnected` event listeners.
733
+ - be1488f: Validate webhook signatures via webhook secrets.
734
+
735
+ ```ts
736
+ import { createIO } from "@pluv/platform-pluv";
737
+
738
+ const io = createIO({
739
+ // ...
740
+ // If you provide a webhookSecret
741
+ webhookSecret: "whsec_...",
742
+
743
+ // The following properties will be made available to configure
744
+ getInitialStorage: (event) => {
745
+ /* ... */
746
+ },
747
+ onRoomDeleted: (event) => {
748
+ /* ... */
749
+ },
750
+ onUserConnected: (event) => {
751
+ /* ... */
752
+ },
753
+ onUserDisconnected: (event) => {
754
+ /* ... */
755
+ },
756
+ });
757
+ ```
758
+
759
+ - Updated dependencies [c0956e7]
760
+ - @pluv/io@0.32.6
761
+ - @pluv/crdt@0.32.6
762
+ - @pluv/types@0.32.6
763
+
764
+ ## 0.32.5
765
+
766
+ ### Patch Changes
767
+
768
+ - @pluv/crdt@0.32.5
769
+ - @pluv/io@0.32.5
770
+ - @pluv/types@0.32.5
771
+
772
+ ## 0.32.4
773
+
774
+ ### Patch Changes
775
+
776
+ - @pluv/crdt@0.32.4
777
+ - @pluv/io@0.32.4
778
+ - @pluv/types@0.32.4
779
+
780
+ ## 0.32.3
781
+
782
+ ### Patch Changes
783
+
784
+ - cce989d: Added properties for internal use only.
785
+ - 5a3114f: Fixed thrown error when calling `createToken`.
786
+ - Updated dependencies [bb21274]
787
+ - @pluv/io@0.32.3
788
+ - @pluv/crdt@0.32.3
789
+ - @pluv/types@0.32.3
790
+
791
+ ## 0.32.2
792
+
793
+ ### Patch Changes
794
+
795
+ - Updated dependencies [890d45b]
796
+ - @pluv/io@0.32.2
797
+ - @pluv/crdt@0.32.2
798
+ - @pluv/types@0.32.2
799
+
800
+ ## 0.32.1
801
+
802
+ ### Patch Changes
803
+
804
+ - 7ae3df3: Update endpoint to generate authorization tokens.
805
+ - @pluv/crdt@0.32.1
806
+ - @pluv/io@0.32.1
807
+ - @pluv/types@0.32.1
808
+
809
+ ## 0.32.0
810
+
811
+ ### Patch Changes
812
+
813
+ - Updated dependencies [cde5305]
814
+ - @pluv/io@0.32.0
815
+ - @pluv/crdt@0.32.0
816
+ - @pluv/types@0.32.0
817
+
818
+ ## 0.31.0
819
+
820
+ ### Minor Changes
821
+
822
+ - b3c31d7: **BREAKING**
823
+
824
+ Fixed platform context types. This will require additional properties when registering a websocket and creating authorization tokens. See example below:
825
+
826
+ ```ts
827
+ // @pluv/platform-node example
828
+
829
+ import { platformNode } from "@pluv/platform-node";
830
+ import { createIO } from "@pluv/io";
831
+ import type { IncomingMessage } from "node:http";
832
+ import { z } from "zod";
833
+
834
+ const io = createIO({
835
+ // If using a function authorize parameter, `req` is now available as a param
836
+ authorize: ({ req }) => ({
837
+ required: true,
838
+ secret: "MY-CUSTOM-SECRET",
839
+ user: z.object({
840
+ id: z.string(),
841
+ }),
842
+ }),
843
+ platformNode(),
844
+ });
845
+
846
+ // Before
847
+ io.createToken({
848
+ room: "my-custom-room",
849
+ user: { id: "abc123" },
850
+ });
851
+
852
+ // After
853
+ io.createToken({
854
+ room: "my-custom-room",
855
+ user: { id: "abc123" },
856
+
857
+ // Previously not required, but now required
858
+ req: req as IncomingMessage,
859
+ });
860
+ ```
861
+
862
+ ```ts
863
+ // @pluv/platform-cloudflare example
864
+
865
+ import { platformCloudflare } from "@pluv/platform-cloudflare";
866
+ import { createIO } from "@pluv/io";
867
+ import { z } from "zod";
868
+
869
+ const io = createIO({
870
+ // If using a function authorize parameter, `env` and `request` are now available as params
871
+ authorize: ({ env, request }) => ({
872
+ required: true,
873
+ secret: "MY-CUSTOM-SECRET",
874
+ user: z.object({
875
+ id: z.string(),
876
+ }),
877
+ }),
878
+ platformCloudflare(),
879
+ });
880
+
881
+ // Before
882
+ io.createToken({
883
+ room: "my-custom-room",
884
+ user: { id: "abc123" },
885
+ });
886
+
887
+ // After
888
+ io.createToken({
889
+ room: "my-custom-room",
890
+ user: { id: "abc123" },
891
+
892
+ // Previously not required, but now required
893
+ env: env as Env,
894
+ request: request as Request,
895
+ });
896
+ ```
897
+
898
+ ### Patch Changes
899
+
900
+ - Updated dependencies [b3c31d7]
901
+ - @pluv/io@0.31.0
902
+ - @pluv/crdt@0.31.0
903
+ - @pluv/types@0.31.0
904
+
905
+ ## 0.30.2
906
+
907
+ ### Patch Changes
908
+
909
+ - @pluv/crdt@0.30.2
910
+ - @pluv/io@0.30.2
911
+ - @pluv/types@0.30.2
912
+
913
+ ## 0.30.1
914
+
915
+ ### Patch Changes
916
+
917
+ - 47784d5: Add missing `publicKey` param to `createIO`.
918
+ - Updated dependencies [b9c3633]
919
+ - @pluv/io@0.30.1
920
+ - @pluv/crdt@0.30.1
921
+ - @pluv/types@0.30.1
922
+
923
+ ## 0.30.0
924
+
925
+ ### Minor Changes
926
+
927
+ - fa496a2: Add new package `@pluv/platform-pluv`.
928
+
929
+ ### Patch Changes
930
+
931
+ - Updated dependencies [7246a9e]
932
+ - @pluv/io@0.30.0
933
+ - @pluv/crdt@0.30.0
934
+ - @pluv/types@0.30.0