@pluv/platform-pluv 2.2.1 → 2.2.2

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.
@@ -1,18 +1,18 @@
1
1
 
2
- > @pluv/platform-pluv@2.2.1 build /home/runner/work/pluv/pluv/packages/platform-pluv
2
+ > @pluv/platform-pluv@2.2.2 build /home/runner/work/pluv/pluv/packages/platform-pluv
3
3
  > tsup src/index.ts --format esm,cjs --dts
4
4
 
5
5
  CLI Building entry: src/index.ts
6
6
  CLI Using tsconfig: tsconfig.json
7
- CLI tsup v8.4.0
7
+ CLI tsup v8.5.0
8
8
  CLI Target: es6
9
9
  ESM Build start
10
10
  CJS Build start
11
- ESM dist/index.mjs 12.42 KB
12
- ESM ⚡️ Build success in 107ms
13
11
  CJS dist/index.js 14.25 KB
14
- CJS ⚡️ Build success in 108ms
12
+ CJS ⚡️ Build success in 96ms
13
+ ESM dist/index.mjs 12.42 KB
14
+ ESM ⚡️ Build success in 99ms
15
15
  DTS Build start
16
- DTS ⚡️ Build success in 6238ms
16
+ DTS ⚡️ Build success in 5981ms
17
17
  DTS dist/index.d.mts 3.65 KB
18
18
  DTS dist/index.d.ts 3.65 KB
package/CHANGELOG.md CHANGED
@@ -1,22 +1,30 @@
1
1
  # @pluv/platform-pluv
2
2
 
3
+ ## 2.2.2
4
+
5
+ ### Patch Changes
6
+
7
+ - @pluv/crdt@2.2.2
8
+ - @pluv/io@2.2.2
9
+ - @pluv/types@2.2.2
10
+
3
11
  ## 2.2.1
4
12
 
5
13
  ### Patch Changes
6
14
 
7
15
  - 6563957: Fix `createToken` throwing a TypeError.
8
- - @pluv/crdt@2.2.1
9
- - @pluv/io@2.2.1
10
- - @pluv/types@2.2.1
16
+ - @pluv/crdt@2.2.1
17
+ - @pluv/io@2.2.1
18
+ - @pluv/types@2.2.1
11
19
 
12
20
  ## 2.2.0
13
21
 
14
22
  ### Patch Changes
15
23
 
16
24
  - Updated dependencies [cb660cd]
17
- - @pluv/io@2.2.0
18
- - @pluv/crdt@2.2.0
19
- - @pluv/types@2.2.0
25
+ - @pluv/io@2.2.0
26
+ - @pluv/crdt@2.2.0
27
+ - @pluv/types@2.2.0
20
28
 
21
29
  ## 2.1.0
22
30
 
@@ -47,9 +55,9 @@
47
55
  ### Patch Changes
48
56
 
49
57
  - Updated dependencies [047a1d8]
50
- - @pluv/types@2.0.0
51
- - @pluv/crdt@2.0.0
52
- - @pluv/io@2.0.0
58
+ - @pluv/types@2.0.0
59
+ - @pluv/crdt@2.0.0
60
+ - @pluv/io@2.0.0
53
61
 
54
62
  ## 1.0.2
55
63
 
@@ -64,9 +72,9 @@
64
72
  ### Patch Changes
65
73
 
66
74
  - Updated dependencies [c583be9]
67
- - @pluv/io@1.0.1
68
- - @pluv/crdt@1.0.1
69
- - @pluv/types@1.0.1
75
+ - @pluv/io@1.0.1
76
+ - @pluv/crdt@1.0.1
77
+ - @pluv/types@1.0.1
70
78
 
71
79
  ## 1.0.0
72
80
 
@@ -74,16 +82,16 @@
74
82
 
75
83
  - af94706: pluv.io is now stable and production ready!
76
84
 
77
- 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.
85
+ 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.
78
86
 
79
- Checkout the [full documentation here](https://pluv.io/docs/introduction) to get started today!
87
+ Checkout the [full documentation here](https://pluv.io/docs/introduction) to get started today!
80
88
 
81
89
  ### Patch Changes
82
90
 
83
91
  - Updated dependencies [af94706]
84
- - @pluv/crdt@1.0.0
85
- - @pluv/io@1.0.0
86
- - @pluv/types@1.0.0
92
+ - @pluv/crdt@1.0.0
93
+ - @pluv/io@1.0.0
94
+ - @pluv/types@1.0.0
87
95
 
88
96
  ## 0.44.2
89
97
 
@@ -117,9 +125,9 @@
117
125
  - Updated dependencies [0063e80]
118
126
  - Updated dependencies [244a973]
119
127
  - Updated dependencies [4b0fbb3]
120
- - @pluv/io@0.43.0
121
- - @pluv/crdt@0.43.0
122
- - @pluv/types@0.43.0
128
+ - @pluv/io@0.43.0
129
+ - @pluv/crdt@0.43.0
130
+ - @pluv/types@0.43.0
123
131
 
124
132
  ## 0.42.0
125
133
 
@@ -127,18 +135,18 @@
127
135
 
128
136
  - def08bc: Fix default endpoint for `createToken`.
129
137
  - Updated dependencies [cf1529a]
130
- - @pluv/io@0.42.0
131
- - @pluv/crdt@0.42.0
132
- - @pluv/types@0.42.0
138
+ - @pluv/io@0.42.0
139
+ - @pluv/crdt@0.42.0
140
+ - @pluv/types@0.42.0
133
141
 
134
142
  ## 0.41.7
135
143
 
136
144
  ### Patch Changes
137
145
 
138
146
  - c698c24: Update hidden endpoints parameter to be provided as a function.
139
- - @pluv/crdt@0.41.7
140
- - @pluv/io@0.41.7
141
- - @pluv/types@0.41.7
147
+ - @pluv/crdt@0.41.7
148
+ - @pluv/io@0.41.7
149
+ - @pluv/types@0.41.7
142
150
 
143
151
  ## 0.41.6
144
152
 
@@ -161,18 +169,18 @@
161
169
  ### Patch Changes
162
170
 
163
171
  - 8857e8e: Added the ability to use functions to return public keys, secret keys and webhook secrets for `@pluv/platform-pluv`.
164
- - @pluv/crdt@0.41.4
165
- - @pluv/io@0.41.4
166
- - @pluv/types@0.41.4
172
+ - @pluv/crdt@0.41.4
173
+ - @pluv/io@0.41.4
174
+ - @pluv/types@0.41.4
167
175
 
168
176
  ## 0.41.3
169
177
 
170
178
  ### Patch Changes
171
179
 
172
180
  - Updated dependencies [49051c0]
173
- - @pluv/io@0.41.3
174
- - @pluv/crdt@0.41.3
175
- - @pluv/types@0.41.3
181
+ - @pluv/io@0.41.3
182
+ - @pluv/crdt@0.41.3
183
+ - @pluv/types@0.41.3
176
184
 
177
185
  ## 0.41.2
178
186
 
@@ -201,9 +209,9 @@
201
209
  - Updated dependencies [555b88d]
202
210
  - Updated dependencies [a663c65]
203
211
  - Updated dependencies [555b88d]
204
- - @pluv/io@0.41.0
205
- - @pluv/crdt@0.41.0
206
- - @pluv/types@0.41.0
212
+ - @pluv/io@0.41.0
213
+ - @pluv/crdt@0.41.0
214
+ - @pluv/types@0.41.0
207
215
 
208
216
  ## 0.40.2
209
217
 
@@ -243,9 +251,9 @@
243
251
 
244
252
  - Updated dependencies [fe6e239]
245
253
  - Updated dependencies [737d508]
246
- - @pluv/io@0.39.0
247
- - @pluv/crdt@0.39.0
248
- - @pluv/types@0.39.0
254
+ - @pluv/io@0.39.0
255
+ - @pluv/crdt@0.39.0
256
+ - @pluv/types@0.39.0
249
257
 
250
258
  ## 0.38.14
251
259
 
@@ -260,9 +268,9 @@
260
268
  ### Patch Changes
261
269
 
262
270
  - Updated dependencies [809afd3]
263
- - @pluv/io@0.38.13
264
- - @pluv/crdt@0.38.13
265
- - @pluv/types@0.38.13
271
+ - @pluv/io@0.38.13
272
+ - @pluv/crdt@0.38.13
273
+ - @pluv/types@0.38.13
266
274
 
267
275
  ## 0.38.12
268
276
 
@@ -293,72 +301,72 @@
293
301
  ### Patch Changes
294
302
 
295
303
  - 9b3af07: Updated internal event handlers to return more meaningful status codes and room identifiers.
296
- - @pluv/crdt@0.38.9
297
- - @pluv/io@0.38.9
298
- - @pluv/types@0.38.9
304
+ - @pluv/crdt@0.38.9
305
+ - @pluv/io@0.38.9
306
+ - @pluv/types@0.38.9
299
307
 
300
308
  ## 0.38.8
301
309
 
302
310
  ### Patch Changes
303
311
 
304
312
  - a39343b: Fix the `onUserDisconnected` event triggering when `onUserConnected` event triggers.
305
- - @pluv/crdt@0.38.8
306
- - @pluv/io@0.38.8
307
- - @pluv/types@0.38.8
313
+ - @pluv/crdt@0.38.8
314
+ - @pluv/io@0.38.8
315
+ - @pluv/types@0.38.8
308
316
 
309
317
  ## 0.38.7
310
318
 
311
319
  ### Patch Changes
312
320
 
313
321
  - 05c6f1a: Fix `TypeError` on event handler invocations once again.
314
- - @pluv/crdt@0.38.7
315
- - @pluv/io@0.38.7
316
- - @pluv/types@0.38.7
322
+ - @pluv/crdt@0.38.7
323
+ - @pluv/io@0.38.7
324
+ - @pluv/types@0.38.7
317
325
 
318
326
  ## 0.38.6
319
327
 
320
328
  ### Patch Changes
321
329
 
322
330
  - 07fbeef: Fix `TypeError` on event handler invocations.
323
- - @pluv/crdt@0.38.6
324
- - @pluv/io@0.38.6
325
- - @pluv/types@0.38.6
331
+ - @pluv/crdt@0.38.6
332
+ - @pluv/io@0.38.6
333
+ - @pluv/types@0.38.6
326
334
 
327
335
  ## 0.38.5
328
336
 
329
337
  ### Patch Changes
330
338
 
331
339
  - 77df696: Fixed platform event contexts being undefined.
332
- - @pluv/crdt@0.38.5
333
- - @pluv/io@0.38.5
334
- - @pluv/types@0.38.5
340
+ - @pluv/crdt@0.38.5
341
+ - @pluv/io@0.38.5
342
+ - @pluv/types@0.38.5
335
343
 
336
344
  ## 0.38.4
337
345
 
338
346
  ### Patch Changes
339
347
 
340
348
  - 15399b7: Fix webhook signature validation.
341
- - @pluv/crdt@0.38.4
342
- - @pluv/io@0.38.4
343
- - @pluv/types@0.38.4
349
+ - @pluv/crdt@0.38.4
350
+ - @pluv/io@0.38.4
351
+ - @pluv/types@0.38.4
344
352
 
345
353
  ## 0.38.3
346
354
 
347
355
  ### Patch Changes
348
356
 
349
357
  - Updated dependencies [8346273]
350
- - @pluv/io@0.38.3
351
- - @pluv/crdt@0.38.3
352
- - @pluv/types@0.38.3
358
+ - @pluv/io@0.38.3
359
+ - @pluv/crdt@0.38.3
360
+ - @pluv/types@0.38.3
353
361
 
354
362
  ## 0.38.2
355
363
 
356
364
  ### Patch Changes
357
365
 
358
366
  - Updated dependencies [039cd64]
359
- - @pluv/io@0.38.2
360
- - @pluv/crdt@0.38.2
361
- - @pluv/types@0.38.2
367
+ - @pluv/io@0.38.2
368
+ - @pluv/crdt@0.38.2
369
+ - @pluv/types@0.38.2
362
370
 
363
371
  ## 0.38.1
364
372
 
@@ -373,36 +381,36 @@
373
381
  ### Patch Changes
374
382
 
375
383
  - Updated dependencies [f4ceca3]
376
- - @pluv/types@0.38.0
377
- - @pluv/io@0.38.0
378
- - @pluv/crdt@0.38.0
384
+ - @pluv/types@0.38.0
385
+ - @pluv/io@0.38.0
386
+ - @pluv/crdt@0.38.0
379
387
 
380
388
  ## 0.37.7
381
389
 
382
390
  ### Patch Changes
383
391
 
384
392
  - c874f25: Fixed webhook signature verification.
385
- - @pluv/crdt@0.37.7
386
- - @pluv/io@0.37.7
387
- - @pluv/types@0.37.7
393
+ - @pluv/crdt@0.37.7
394
+ - @pluv/io@0.37.7
395
+ - @pluv/types@0.37.7
388
396
 
389
397
  ## 0.37.6
390
398
 
391
399
  ### Patch Changes
392
400
 
393
401
  - Updated dependencies [3a874f1]
394
- - @pluv/io@0.37.6
395
- - @pluv/crdt@0.37.6
396
- - @pluv/types@0.37.6
402
+ - @pluv/io@0.37.6
403
+ - @pluv/crdt@0.37.6
404
+ - @pluv/types@0.37.6
397
405
 
398
406
  ## 0.37.5
399
407
 
400
408
  ### Patch Changes
401
409
 
402
410
  - Updated dependencies [9a9ecee]
403
- - @pluv/io@0.37.5
404
- - @pluv/crdt@0.37.5
405
- - @pluv/types@0.37.5
411
+ - @pluv/io@0.37.5
412
+ - @pluv/crdt@0.37.5
413
+ - @pluv/types@0.37.5
406
414
 
407
415
  ## 0.37.4
408
416
 
@@ -442,51 +450,51 @@
442
450
 
443
451
  - 5165be0: **BREAKING**
444
452
 
445
- Updated the `platformPluv` function to return an entire `createIO` input object. Now `createIO` must be called with `platformPluv`'s return value as an input.
453
+ Updated the `platformPluv` function to return an entire `createIO` input object. Now `createIO` must be called with `platformPluv`'s return value as an input.
446
454
 
447
- ```ts
448
- // Before
455
+ ```ts
456
+ // Before
449
457
 
450
- import { createIO } from "@pluv/io";
451
- import { platformPluv } from "@pluv/platform-pluv";
458
+ import { createIO } from "@pluv/io";
459
+ import { platformPluv } from "@pluv/platform-pluv";
452
460
 
453
- export const io = createIO({
454
- authorize: {
455
- // ...
456
- },
457
- context: {
458
- // ...
459
- },
460
- platform: platformPluv({
461
- // ...
462
- }),
463
- // ...
464
- });
461
+ export const io = createIO({
462
+ authorize: {
463
+ // ...
464
+ },
465
+ context: {
466
+ // ...
467
+ },
468
+ platform: platformPluv({
469
+ // ...
470
+ }),
471
+ // ...
472
+ });
465
473
 
466
- // After
474
+ // After
467
475
 
468
- import { createIO } from "@pluv/io";
469
- import { platformPluv } from "@pluv/platform-pluv";
476
+ import { createIO } from "@pluv/io";
477
+ import { platformPluv } from "@pluv/platform-pluv";
470
478
 
471
- export const io = createIO(
472
- platformPluv({
473
- authorize: {
474
- // ...
475
- },
476
- context: {
477
- // ...
478
- },
479
- }),
480
- );
481
- ```
479
+ export const io = createIO(
480
+ platformPluv({
481
+ authorize: {
482
+ // ...
483
+ },
484
+ context: {
485
+ // ...
486
+ },
487
+ }),
488
+ );
489
+ ```
482
490
 
483
491
  ### Patch Changes
484
492
 
485
493
  - 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).
486
494
  - Updated dependencies [9b74abb]
487
- - @pluv/io@0.37.0
488
- - @pluv/crdt@0.37.0
489
- - @pluv/types@0.37.0
495
+ - @pluv/io@0.37.0
496
+ - @pluv/crdt@0.37.0
497
+ - @pluv/types@0.37.0
490
498
 
491
499
  ## 0.36.0
492
500
 
@@ -501,9 +509,9 @@
501
509
  ### Patch Changes
502
510
 
503
511
  - Updated dependencies [5d3a56f]
504
- - @pluv/io@0.35.4
505
- - @pluv/crdt@0.35.4
506
- - @pluv/types@0.35.4
512
+ - @pluv/io@0.35.4
513
+ - @pluv/crdt@0.35.4
514
+ - @pluv/types@0.35.4
507
515
 
508
516
  ## 0.35.3
509
517
 
@@ -519,9 +527,9 @@
519
527
 
520
528
  - 47ab053: Remove unused check for `authorize.required` for `@pluv/platform-pluv`.
521
529
  - Updated dependencies [81cb692]
522
- - @pluv/types@0.35.2
523
- - @pluv/io@0.35.2
524
- - @pluv/crdt@0.35.2
530
+ - @pluv/types@0.35.2
531
+ - @pluv/io@0.35.2
532
+ - @pluv/crdt@0.35.2
525
533
 
526
534
  ## 0.35.1
527
535
 
@@ -536,18 +544,18 @@
536
544
  ### Patch Changes
537
545
 
538
546
  - Updated dependencies [c9073ad]
539
- - @pluv/io@0.35.0
540
- - @pluv/crdt@0.35.0
541
- - @pluv/types@0.35.0
547
+ - @pluv/io@0.35.0
548
+ - @pluv/crdt@0.35.0
549
+ - @pluv/types@0.35.0
542
550
 
543
551
  ## 0.34.1
544
552
 
545
553
  ### Patch Changes
546
554
 
547
555
  - Updated dependencies [d639427]
548
- - @pluv/io@0.34.1
549
- - @pluv/crdt@0.34.1
550
- - @pluv/types@0.34.1
556
+ - @pluv/io@0.34.1
557
+ - @pluv/crdt@0.34.1
558
+ - @pluv/types@0.34.1
551
559
 
552
560
  ## 0.34.0
553
561
 
@@ -555,66 +563,66 @@
555
563
 
556
564
  - 70af3b2: **BREAKING**: The API has been updated to now be called as function `platformPluv` into `createIO` from `@pluv/io`.
557
565
 
558
- ```ts
559
- // Before
566
+ ```ts
567
+ // Before
560
568
 
561
- import { createIO } from "@pluv/platform-pluv";
569
+ import { createIO } from "@pluv/platform-pluv";
562
570
 
563
- export const io = createIO({
564
- authorize: {
565
- user: z.object({
566
- id: z.string(),
567
- }),
568
- },
569
- basePath: "/api/pluv",
570
- publicKey: "pk_...",
571
- secretKey: "sk_...",
572
- webhookSecret: "whsec_...",
573
- });
571
+ export const io = createIO({
572
+ authorize: {
573
+ user: z.object({
574
+ id: z.string(),
575
+ }),
576
+ },
577
+ basePath: "/api/pluv",
578
+ publicKey: "pk_...",
579
+ secretKey: "sk_...",
580
+ webhookSecret: "whsec_...",
581
+ });
574
582
 
575
- export const GET = pluv.handler;
583
+ export const GET = pluv.handler;
576
584
 
577
- // After
585
+ // After
578
586
 
579
- import { createIO } from "@pluv/io";
580
- import { platformPluv } from "@pluv/platform-pluv";
587
+ import { createIO } from "@pluv/io";
588
+ import { platformPluv } from "@pluv/platform-pluv";
581
589
 
582
- export const io = createIO({
583
- authorize: {
584
- user: z.object({
585
- id: z.string(),
586
- }),
587
- },
588
- platform: platformPluv({
589
- basePath: "/api/pluv",
590
- publicKey: "pk_...",
591
- secretKey: "sk_...",
592
- webhookSecret: "whsec_...",
593
- }),
594
- });
590
+ export const io = createIO({
591
+ authorize: {
592
+ user: z.object({
593
+ id: z.string(),
594
+ }),
595
+ },
596
+ platform: platformPluv({
597
+ basePath: "/api/pluv",
598
+ publicKey: "pk_...",
599
+ secretKey: "sk_...",
600
+ webhookSecret: "whsec_...",
601
+ }),
602
+ });
595
603
 
596
- export const ioServer = io.server();
604
+ export const ioServer = io.server();
597
605
 
598
- // Example: If you're on Next.js
599
- export const GET = ioServer.fetch;
600
- ```
606
+ // Example: If you're on Next.js
607
+ export const GET = ioServer.fetch;
608
+ ```
601
609
 
602
610
  ### Patch Changes
603
611
 
604
612
  - Updated dependencies [0c920ea]
605
613
  - Updated dependencies [70af3b2]
606
- - @pluv/io@0.34.0
607
- - @pluv/crdt@0.34.0
608
- - @pluv/types@0.34.0
614
+ - @pluv/io@0.34.0
615
+ - @pluv/crdt@0.34.0
616
+ - @pluv/types@0.34.0
609
617
 
610
618
  ## 0.33.0
611
619
 
612
620
  ### Patch Changes
613
621
 
614
622
  - f14b3be: Updated webhooks path to base path.
615
- - @pluv/crdt@0.33.0
616
- - @pluv/io@0.33.0
617
- - @pluv/types@0.33.0
623
+ - @pluv/crdt@0.33.0
624
+ - @pluv/io@0.33.0
625
+ - @pluv/types@0.33.0
618
626
 
619
627
  ## 0.32.9
620
628
 
@@ -629,18 +637,18 @@
629
637
  ### Patch Changes
630
638
 
631
639
  - Updated dependencies [e659f8a]
632
- - @pluv/io@0.32.8
633
- - @pluv/crdt@0.32.8
634
- - @pluv/types@0.32.8
640
+ - @pluv/io@0.32.8
641
+ - @pluv/crdt@0.32.8
642
+ - @pluv/types@0.32.8
635
643
 
636
644
  ## 0.32.7
637
645
 
638
646
  ### Patch Changes
639
647
 
640
648
  - a9a1f7b: Export event schemas.
641
- - @pluv/crdt@0.32.7
642
- - @pluv/io@0.32.7
643
- - @pluv/types@0.32.7
649
+ - @pluv/crdt@0.32.7
650
+ - @pluv/io@0.32.7
651
+ - @pluv/types@0.32.7
644
652
 
645
653
  ## 0.32.6
646
654
 
@@ -649,55 +657,55 @@
649
657
  - 25292d4: Fix event payload types to only contain serializable fields.
650
658
  - c0956e7: Add `onUserConnected` and `onUserDisconnected` events on `PluvServer`.
651
659
 
652
- ```ts
653
- import { createIO } from "@pluv/io";
660
+ ```ts
661
+ import { createIO } from "@pluv/io";
654
662
 
655
- const io = createIO({
656
- /* ... */
657
- });
663
+ const io = createIO({
664
+ /* ... */
665
+ });
658
666
 
659
- const ioServer = io.server({
660
- // ...
661
- onUserConnected: (event) => {
662
- // ...
663
- },
664
- onUserDisconnected: (event) => {
665
- // ...
666
- },
667
- });
668
- ```
667
+ const ioServer = io.server({
668
+ // ...
669
+ onUserConnected: (event) => {
670
+ // ...
671
+ },
672
+ onUserDisconnected: (event) => {
673
+ // ...
674
+ },
675
+ });
676
+ ```
669
677
 
670
678
  - fc83a44: Enable `onUserConnected` and `onUserDisconnected` event listeners.
671
679
  - be1488f: Validate webhook signatures via webhook secrets.
672
680
 
673
- ```ts
674
- import { createIO } from "@pluv/platform-pluv";
675
-
676
- const io = createIO({
677
- // ...
678
- // If you provide a webhookSecret
679
- webhookSecret: "whsec_...",
680
-
681
- // The following properties will be made available to configure
682
- getInitialStorage: (event) => {
683
- /* ... */
684
- },
685
- onRoomDeleted: (event) => {
686
- /* ... */
687
- },
688
- onUserConnected: (event) => {
689
- /* ... */
690
- },
691
- onUserDisconnected: (event) => {
692
- /* ... */
693
- },
694
- });
695
- ```
681
+ ```ts
682
+ import { createIO } from "@pluv/platform-pluv";
683
+
684
+ const io = createIO({
685
+ // ...
686
+ // If you provide a webhookSecret
687
+ webhookSecret: "whsec_...",
688
+
689
+ // The following properties will be made available to configure
690
+ getInitialStorage: (event) => {
691
+ /* ... */
692
+ },
693
+ onRoomDeleted: (event) => {
694
+ /* ... */
695
+ },
696
+ onUserConnected: (event) => {
697
+ /* ... */
698
+ },
699
+ onUserDisconnected: (event) => {
700
+ /* ... */
701
+ },
702
+ });
703
+ ```
696
704
 
697
705
  - Updated dependencies [c0956e7]
698
- - @pluv/io@0.32.6
699
- - @pluv/crdt@0.32.6
700
- - @pluv/types@0.32.6
706
+ - @pluv/io@0.32.6
707
+ - @pluv/crdt@0.32.6
708
+ - @pluv/types@0.32.6
701
709
 
702
710
  ## 0.32.5
703
711
 
@@ -722,36 +730,36 @@
722
730
  - cce989d: Added properties for internal use only.
723
731
  - 5a3114f: Fixed thrown error when calling `createToken`.
724
732
  - Updated dependencies [bb21274]
725
- - @pluv/io@0.32.3
726
- - @pluv/crdt@0.32.3
727
- - @pluv/types@0.32.3
733
+ - @pluv/io@0.32.3
734
+ - @pluv/crdt@0.32.3
735
+ - @pluv/types@0.32.3
728
736
 
729
737
  ## 0.32.2
730
738
 
731
739
  ### Patch Changes
732
740
 
733
741
  - Updated dependencies [890d45b]
734
- - @pluv/io@0.32.2
735
- - @pluv/crdt@0.32.2
736
- - @pluv/types@0.32.2
742
+ - @pluv/io@0.32.2
743
+ - @pluv/crdt@0.32.2
744
+ - @pluv/types@0.32.2
737
745
 
738
746
  ## 0.32.1
739
747
 
740
748
  ### Patch Changes
741
749
 
742
750
  - 7ae3df3: Update endpoint to generate authorization tokens.
743
- - @pluv/crdt@0.32.1
744
- - @pluv/io@0.32.1
745
- - @pluv/types@0.32.1
751
+ - @pluv/crdt@0.32.1
752
+ - @pluv/io@0.32.1
753
+ - @pluv/types@0.32.1
746
754
 
747
755
  ## 0.32.0
748
756
 
749
757
  ### Patch Changes
750
758
 
751
759
  - Updated dependencies [cde5305]
752
- - @pluv/io@0.32.0
753
- - @pluv/crdt@0.32.0
754
- - @pluv/types@0.32.0
760
+ - @pluv/io@0.32.0
761
+ - @pluv/crdt@0.32.0
762
+ - @pluv/types@0.32.0
755
763
 
756
764
  ## 0.31.0
757
765
 
@@ -759,86 +767,86 @@
759
767
 
760
768
  - b3c31d7: **BREAKING**
761
769
 
762
- Fixed platform context types. This will require additional properties when registering a websocket and creating authorization tokens. See example below:
763
-
764
- ```ts
765
- // @pluv/platform-node example
766
-
767
- import { platformNode } from "@pluv/platform-node";
768
- import { createIO } from "@pluv/io";
769
- import type { IncomingMessage } from "node:http";
770
- import { z } from "zod";
771
-
772
- const io = createIO({
773
- // If using a function authorize parameter, `req` is now available as a param
774
- authorize: ({ req }) => ({
775
- required: true,
776
- secret: "MY-CUSTOM-SECRET",
777
- user: z.object({
778
- id: z.string(),
779
- }),
780
- }),
781
- platformNode(),
782
- });
783
-
784
- // Before
785
- io.createToken({
786
- room: "my-custom-room",
787
- user: { id: "abc123" },
788
- });
789
-
790
- // After
791
- io.createToken({
792
- room: "my-custom-room",
793
- user: { id: "abc123" },
794
-
795
- // Previously not required, but now required
796
- req: req as IncomingMessage,
797
- });
798
- ```
799
-
800
- ```ts
801
- // @pluv/platform-cloudflare example
802
-
803
- import { platformCloudflare } from "@pluv/platform-cloudflare";
804
- import { createIO } from "@pluv/io";
805
- import { z } from "zod";
806
-
807
- const io = createIO({
808
- // If using a function authorize parameter, `env` and `request` are now available as params
809
- authorize: ({ env, request }) => ({
810
- required: true,
811
- secret: "MY-CUSTOM-SECRET",
812
- user: z.object({
813
- id: z.string(),
814
- }),
815
- }),
816
- platformCloudflare(),
817
- });
818
-
819
- // Before
820
- io.createToken({
821
- room: "my-custom-room",
822
- user: { id: "abc123" },
823
- });
824
-
825
- // After
826
- io.createToken({
827
- room: "my-custom-room",
828
- user: { id: "abc123" },
829
-
830
- // Previously not required, but now required
831
- env: env as Env,
832
- request: request as Request,
833
- });
834
- ```
770
+ Fixed platform context types. This will require additional properties when registering a websocket and creating authorization tokens. See example below:
771
+
772
+ ```ts
773
+ // @pluv/platform-node example
774
+
775
+ import { platformNode } from "@pluv/platform-node";
776
+ import { createIO } from "@pluv/io";
777
+ import type { IncomingMessage } from "node:http";
778
+ import { z } from "zod";
779
+
780
+ const io = createIO({
781
+ // If using a function authorize parameter, `req` is now available as a param
782
+ authorize: ({ req }) => ({
783
+ required: true,
784
+ secret: "MY-CUSTOM-SECRET",
785
+ user: z.object({
786
+ id: z.string(),
787
+ }),
788
+ }),
789
+ platformNode(),
790
+ });
791
+
792
+ // Before
793
+ io.createToken({
794
+ room: "my-custom-room",
795
+ user: { id: "abc123" },
796
+ });
797
+
798
+ // After
799
+ io.createToken({
800
+ room: "my-custom-room",
801
+ user: { id: "abc123" },
802
+
803
+ // Previously not required, but now required
804
+ req: req as IncomingMessage,
805
+ });
806
+ ```
807
+
808
+ ```ts
809
+ // @pluv/platform-cloudflare example
810
+
811
+ import { platformCloudflare } from "@pluv/platform-cloudflare";
812
+ import { createIO } from "@pluv/io";
813
+ import { z } from "zod";
814
+
815
+ const io = createIO({
816
+ // If using a function authorize parameter, `env` and `request` are now available as params
817
+ authorize: ({ env, request }) => ({
818
+ required: true,
819
+ secret: "MY-CUSTOM-SECRET",
820
+ user: z.object({
821
+ id: z.string(),
822
+ }),
823
+ }),
824
+ platformCloudflare(),
825
+ });
826
+
827
+ // Before
828
+ io.createToken({
829
+ room: "my-custom-room",
830
+ user: { id: "abc123" },
831
+ });
832
+
833
+ // After
834
+ io.createToken({
835
+ room: "my-custom-room",
836
+ user: { id: "abc123" },
837
+
838
+ // Previously not required, but now required
839
+ env: env as Env,
840
+ request: request as Request,
841
+ });
842
+ ```
835
843
 
836
844
  ### Patch Changes
837
845
 
838
846
  - Updated dependencies [b3c31d7]
839
- - @pluv/io@0.31.0
840
- - @pluv/crdt@0.31.0
841
- - @pluv/types@0.31.0
847
+ - @pluv/io@0.31.0
848
+ - @pluv/crdt@0.31.0
849
+ - @pluv/types@0.31.0
842
850
 
843
851
  ## 0.30.2
844
852
 
@@ -854,9 +862,9 @@
854
862
 
855
863
  - 47784d5: Add missing `publicKey` param to `createIO`.
856
864
  - Updated dependencies [b9c3633]
857
- - @pluv/io@0.30.1
858
- - @pluv/crdt@0.30.1
859
- - @pluv/types@0.30.1
865
+ - @pluv/io@0.30.1
866
+ - @pluv/crdt@0.30.1
867
+ - @pluv/types@0.30.1
860
868
 
861
869
  ## 0.30.0
862
870
 
@@ -867,6 +875,6 @@
867
875
  ### Patch Changes
868
876
 
869
877
  - Updated dependencies [7246a9e]
870
- - @pluv/io@0.30.0
871
- - @pluv/crdt@0.30.0
872
- - @pluv/types@0.30.0
878
+ - @pluv/io@0.30.0
879
+ - @pluv/crdt@0.30.0
880
+ - @pluv/types@0.30.0
package/dist/index.js CHANGED
@@ -152,7 +152,7 @@ var getCrypto = () => {
152
152
  };
153
153
 
154
154
  // src/shared/createHmac.ts
155
- var createHmac = (params) => __async(void 0, null, function* () {
155
+ var createHmac = (params) => __async(null, null, function* () {
156
156
  const { payload, secret } = params;
157
157
  if (!payload || !secret) throw new Error("Secret and payload are required to sign payload");
158
158
  const encoder = new TextEncoder();
@@ -200,7 +200,7 @@ var timingSafeEqual = (a, b) => {
200
200
  };
201
201
 
202
202
  // src/shared/verifyWebhook.ts
203
- var verifyWebhook = (params) => __async(void 0, null, function* () {
203
+ var verifyWebhook = (params) => __async(null, null, function* () {
204
204
  const { payload, secret, signature } = params;
205
205
  if (!secret || !payload || !signature) {
206
206
  throw new Error("Secret, payload and signature are required to verify payload");
package/dist/index.mjs CHANGED
@@ -116,13 +116,13 @@ var getCrypto = () => {
116
116
  return crypto;
117
117
  }
118
118
  if (typeof __require === "function") {
119
- return __require("node:crypto").webcrypto;
119
+ return __require("crypto").webcrypto;
120
120
  }
121
121
  throw new Error("Missing crypto module");
122
122
  };
123
123
 
124
124
  // src/shared/createHmac.ts
125
- var createHmac = (params) => __async(void 0, null, function* () {
125
+ var createHmac = (params) => __async(null, null, function* () {
126
126
  const { payload, secret } = params;
127
127
  if (!payload || !secret) throw new Error("Secret and payload are required to sign payload");
128
128
  const encoder = new TextEncoder();
@@ -170,7 +170,7 @@ var timingSafeEqual = (a, b) => {
170
170
  };
171
171
 
172
172
  // src/shared/verifyWebhook.ts
173
- var verifyWebhook = (params) => __async(void 0, null, function* () {
173
+ var verifyWebhook = (params) => __async(null, null, function* () {
174
174
  const { payload, secret, signature } = params;
175
175
  if (!secret || !payload || !signature) {
176
176
  throw new Error("Secret, payload and signature are required to verify payload");
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pluv/platform-pluv",
3
- "version": "2.2.1",
3
+ "version": "2.2.2",
4
4
  "description": "@pluv/io adapter for pluv.io",
5
5
  "author": "leedavidcs",
6
6
  "license": "MIT",
@@ -19,18 +19,18 @@
19
19
  "dependencies": {
20
20
  "@types/node": "^22.15.18",
21
21
  "fast-json-stable-stringify": "^2.1.0",
22
- "hono": "^4.7.9",
22
+ "hono": "^4.7.10",
23
23
  "zod": "^3.24.4",
24
- "@pluv/crdt": "^2.2.1",
25
- "@pluv/io": "^2.2.1",
26
- "@pluv/types": "^2.2.1"
24
+ "@pluv/crdt": "^2.2.2",
25
+ "@pluv/io": "^2.2.2",
26
+ "@pluv/types": "^2.2.2"
27
27
  },
28
28
  "devDependencies": {
29
- "eslint": "^9.26.0",
30
- "tsup": "^8.4.0",
29
+ "eslint": "^9.27.0",
30
+ "tsup": "^8.5.0",
31
31
  "typescript": "^5.8.3",
32
- "eslint-config-pluv": "^2.2.1",
33
- "@pluv/tsconfig": "^2.2.1"
32
+ "@pluv/tsconfig": "^2.2.2",
33
+ "eslint-config-pluv": "^2.2.2"
34
34
  },
35
35
  "scripts": {
36
36
  "build": "tsup src/index.ts --format esm,cjs --dts",