@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.
- package/.turbo/turbo-build.log +6 -6
- package/CHANGELOG.md +313 -305
- package/dist/index.js +2 -2
- package/dist/index.mjs +3 -3
- package/package.json +9 -9
package/.turbo/turbo-build.log
CHANGED
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
|
|
2
|
-
> @pluv/platform-pluv@2.2.
|
|
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
|
[34mCLI[39m Building entry: src/index.ts
|
|
6
6
|
[34mCLI[39m Using tsconfig: tsconfig.json
|
|
7
|
-
[34mCLI[39m tsup v8.
|
|
7
|
+
[34mCLI[39m tsup v8.5.0
|
|
8
8
|
[34mCLI[39m Target: es6
|
|
9
9
|
[34mESM[39m Build start
|
|
10
10
|
[34mCJS[39m Build start
|
|
11
|
-
[32mESM[39m [1mdist/index.mjs [22m[32m12.42 KB[39m
|
|
12
|
-
[32mESM[39m ⚡️ Build success in 107ms
|
|
13
11
|
[32mCJS[39m [1mdist/index.js [22m[32m14.25 KB[39m
|
|
14
|
-
[32mCJS[39m ⚡️ Build success in
|
|
12
|
+
[32mCJS[39m ⚡️ Build success in 96ms
|
|
13
|
+
[32mESM[39m [1mdist/index.mjs [22m[32m12.42 KB[39m
|
|
14
|
+
[32mESM[39m ⚡️ Build success in 99ms
|
|
15
15
|
[34mDTS[39m Build start
|
|
16
|
-
[32mDTS[39m ⚡️ Build success in
|
|
16
|
+
[32mDTS[39m ⚡️ Build success in 5981ms
|
|
17
17
|
[32mDTS[39m [1mdist/index.d.mts [22m[32m3.65 KB[39m
|
|
18
18
|
[32mDTS[39m [1mdist/index.d.ts [22m[32m3.65 KB[39m
|
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
|
-
|
|
9
|
-
|
|
10
|
-
|
|
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
|
-
|
|
18
|
-
|
|
19
|
-
|
|
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
|
-
|
|
51
|
-
|
|
52
|
-
|
|
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
|
-
|
|
68
|
-
|
|
69
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
85
|
-
|
|
86
|
-
|
|
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
|
-
|
|
121
|
-
|
|
122
|
-
|
|
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
|
-
|
|
131
|
-
|
|
132
|
-
|
|
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
|
-
|
|
140
|
-
|
|
141
|
-
|
|
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
|
-
|
|
165
|
-
|
|
166
|
-
|
|
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
|
-
|
|
174
|
-
|
|
175
|
-
|
|
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
|
-
|
|
205
|
-
|
|
206
|
-
|
|
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
|
-
|
|
247
|
-
|
|
248
|
-
|
|
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
|
-
|
|
264
|
-
|
|
265
|
-
|
|
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
|
-
|
|
297
|
-
|
|
298
|
-
|
|
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
|
-
|
|
306
|
-
|
|
307
|
-
|
|
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
|
-
|
|
315
|
-
|
|
316
|
-
|
|
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
|
-
|
|
324
|
-
|
|
325
|
-
|
|
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
|
-
|
|
333
|
-
|
|
334
|
-
|
|
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
|
-
|
|
342
|
-
|
|
343
|
-
|
|
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
|
-
|
|
351
|
-
|
|
352
|
-
|
|
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
|
-
|
|
360
|
-
|
|
361
|
-
|
|
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
|
-
|
|
377
|
-
|
|
378
|
-
|
|
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
|
-
|
|
386
|
-
|
|
387
|
-
|
|
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
|
-
|
|
395
|
-
|
|
396
|
-
|
|
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
|
-
|
|
404
|
-
|
|
405
|
-
|
|
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
|
-
|
|
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
|
-
|
|
448
|
-
|
|
455
|
+
```ts
|
|
456
|
+
// Before
|
|
449
457
|
|
|
450
|
-
|
|
451
|
-
|
|
458
|
+
import { createIO } from "@pluv/io";
|
|
459
|
+
import { platformPluv } from "@pluv/platform-pluv";
|
|
452
460
|
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
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
|
-
|
|
474
|
+
// After
|
|
467
475
|
|
|
468
|
-
|
|
469
|
-
|
|
476
|
+
import { createIO } from "@pluv/io";
|
|
477
|
+
import { platformPluv } from "@pluv/platform-pluv";
|
|
470
478
|
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
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
|
-
|
|
488
|
-
|
|
489
|
-
|
|
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
|
-
|
|
505
|
-
|
|
506
|
-
|
|
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
|
-
|
|
523
|
-
|
|
524
|
-
|
|
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
|
-
|
|
540
|
-
|
|
541
|
-
|
|
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
|
-
|
|
549
|
-
|
|
550
|
-
|
|
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
|
-
|
|
559
|
-
|
|
566
|
+
```ts
|
|
567
|
+
// Before
|
|
560
568
|
|
|
561
|
-
|
|
569
|
+
import { createIO } from "@pluv/platform-pluv";
|
|
562
570
|
|
|
563
|
-
|
|
564
|
-
|
|
565
|
-
|
|
566
|
-
|
|
567
|
-
|
|
568
|
-
|
|
569
|
-
|
|
570
|
-
|
|
571
|
-
|
|
572
|
-
|
|
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
|
-
|
|
583
|
+
export const GET = pluv.handler;
|
|
576
584
|
|
|
577
|
-
|
|
585
|
+
// After
|
|
578
586
|
|
|
579
|
-
|
|
580
|
-
|
|
587
|
+
import { createIO } from "@pluv/io";
|
|
588
|
+
import { platformPluv } from "@pluv/platform-pluv";
|
|
581
589
|
|
|
582
|
-
|
|
583
|
-
|
|
584
|
-
|
|
585
|
-
|
|
586
|
-
|
|
587
|
-
|
|
588
|
-
|
|
589
|
-
|
|
590
|
-
|
|
591
|
-
|
|
592
|
-
|
|
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
|
-
|
|
604
|
+
export const ioServer = io.server();
|
|
597
605
|
|
|
598
|
-
|
|
599
|
-
|
|
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
|
-
|
|
607
|
-
|
|
608
|
-
|
|
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
|
-
|
|
616
|
-
|
|
617
|
-
|
|
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
|
-
|
|
633
|
-
|
|
634
|
-
|
|
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
|
-
|
|
642
|
-
|
|
643
|
-
|
|
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
|
-
|
|
653
|
-
|
|
660
|
+
```ts
|
|
661
|
+
import { createIO } from "@pluv/io";
|
|
654
662
|
|
|
655
|
-
|
|
656
|
-
|
|
657
|
-
|
|
663
|
+
const io = createIO({
|
|
664
|
+
/* ... */
|
|
665
|
+
});
|
|
658
666
|
|
|
659
|
-
|
|
660
|
-
|
|
661
|
-
|
|
662
|
-
|
|
663
|
-
|
|
664
|
-
|
|
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
|
-
|
|
674
|
-
|
|
675
|
-
|
|
676
|
-
|
|
677
|
-
|
|
678
|
-
|
|
679
|
-
|
|
680
|
-
|
|
681
|
-
|
|
682
|
-
|
|
683
|
-
|
|
684
|
-
|
|
685
|
-
|
|
686
|
-
|
|
687
|
-
|
|
688
|
-
|
|
689
|
-
|
|
690
|
-
|
|
691
|
-
|
|
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
|
-
|
|
699
|
-
|
|
700
|
-
|
|
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
|
-
|
|
726
|
-
|
|
727
|
-
|
|
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
|
-
|
|
735
|
-
|
|
736
|
-
|
|
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
|
-
|
|
744
|
-
|
|
745
|
-
|
|
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
|
-
|
|
753
|
-
|
|
754
|
-
|
|
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
|
-
|
|
763
|
-
|
|
764
|
-
|
|
765
|
-
|
|
766
|
-
|
|
767
|
-
|
|
768
|
-
|
|
769
|
-
|
|
770
|
-
|
|
771
|
-
|
|
772
|
-
|
|
773
|
-
|
|
774
|
-
|
|
775
|
-
|
|
776
|
-
|
|
777
|
-
|
|
778
|
-
|
|
779
|
-
|
|
780
|
-
|
|
781
|
-
|
|
782
|
-
|
|
783
|
-
|
|
784
|
-
|
|
785
|
-
|
|
786
|
-
|
|
787
|
-
|
|
788
|
-
|
|
789
|
-
|
|
790
|
-
|
|
791
|
-
|
|
792
|
-
|
|
793
|
-
|
|
794
|
-
|
|
795
|
-
|
|
796
|
-
|
|
797
|
-
|
|
798
|
-
|
|
799
|
-
|
|
800
|
-
|
|
801
|
-
|
|
802
|
-
|
|
803
|
-
|
|
804
|
-
|
|
805
|
-
|
|
806
|
-
|
|
807
|
-
|
|
808
|
-
|
|
809
|
-
|
|
810
|
-
|
|
811
|
-
|
|
812
|
-
|
|
813
|
-
|
|
814
|
-
|
|
815
|
-
|
|
816
|
-
|
|
817
|
-
|
|
818
|
-
|
|
819
|
-
|
|
820
|
-
|
|
821
|
-
|
|
822
|
-
|
|
823
|
-
|
|
824
|
-
|
|
825
|
-
|
|
826
|
-
|
|
827
|
-
|
|
828
|
-
|
|
829
|
-
|
|
830
|
-
|
|
831
|
-
|
|
832
|
-
|
|
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
|
-
|
|
840
|
-
|
|
841
|
-
|
|
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
|
-
|
|
858
|
-
|
|
859
|
-
|
|
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
|
-
|
|
871
|
-
|
|
872
|
-
|
|
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(
|
|
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(
|
|
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("
|
|
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(
|
|
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(
|
|
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.
|
|
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.
|
|
22
|
+
"hono": "^4.7.10",
|
|
23
23
|
"zod": "^3.24.4",
|
|
24
|
-
"@pluv/crdt": "^2.2.
|
|
25
|
-
"@pluv/io": "^2.2.
|
|
26
|
-
"@pluv/types": "^2.2.
|
|
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.
|
|
30
|
-
"tsup": "^8.
|
|
29
|
+
"eslint": "^9.27.0",
|
|
30
|
+
"tsup": "^8.5.0",
|
|
31
31
|
"typescript": "^5.8.3",
|
|
32
|
-
"
|
|
33
|
-
"
|
|
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",
|