@trpc/server 11.0.0-rc.591 → 11.0.0-rc.593
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/dist/bundle-analysis.json +107 -91
- package/dist/observable/behaviorSubject.d.ts +15 -0
- package/dist/observable/behaviorSubject.d.ts.map +1 -0
- package/dist/observable/behaviorSubject.js +40 -0
- package/dist/observable/behaviorSubject.mjs +38 -0
- package/dist/observable/index.d.ts +3 -3
- package/dist/observable/index.d.ts.map +1 -1
- package/dist/observable/index.js +4 -0
- package/dist/observable/index.mjs +2 -1
- package/dist/observable/operators.d.ts +2 -0
- package/dist/observable/operators.d.ts.map +1 -1
- package/dist/observable/operators.js +35 -0
- package/dist/observable/operators.mjs +34 -1
- package/dist/unstable-core-do-not-import/http/resolveResponse.d.ts.map +1 -1
- package/dist/unstable-core-do-not-import/http/resolveResponse.js +143 -77
- package/dist/unstable-core-do-not-import/http/resolveResponse.mjs +145 -79
- package/dist/unstable-core-do-not-import/stream/sse.d.ts +21 -20
- package/dist/unstable-core-do-not-import/stream/sse.d.ts.map +1 -1
- package/dist/unstable-core-do-not-import/stream/sse.js +46 -110
- package/dist/unstable-core-do-not-import/stream/sse.mjs +46 -110
- package/dist/unstable-core-do-not-import/stream/sse.types.d.ts +31 -0
- package/dist/unstable-core-do-not-import/stream/sse.types.d.ts.map +1 -0
- package/dist/unstable-core-do-not-import/stream/utils/asyncIterable.d.ts +1 -1
- package/dist/unstable-core-do-not-import/stream/utils/asyncIterable.d.ts.map +1 -1
- package/dist/unstable-core-do-not-import/types.d.ts +5 -0
- package/dist/unstable-core-do-not-import/types.d.ts.map +1 -1
- package/dist/unstable-core-do-not-import/utils.js +4 -4
- package/dist/unstable-core-do-not-import/utils.mjs +4 -4
- package/dist/unstable-core-do-not-import.d.ts +1 -0
- package/dist/unstable-core-do-not-import.d.ts.map +1 -1
- package/package.json +2 -2
- package/src/observable/behaviorSubject.ts +55 -0
- package/src/observable/index.ts +22 -3
- package/src/observable/operators.ts +47 -0
- package/src/unstable-core-do-not-import/http/resolveResponse.ts +169 -97
- package/src/unstable-core-do-not-import/stream/sse.ts +87 -152
- package/src/unstable-core-do-not-import/stream/sse.types.ts +44 -0
- package/src/unstable-core-do-not-import/stream/utils/asyncIterable.ts +1 -1
- package/src/unstable-core-do-not-import/types.ts +8 -0
- package/src/unstable-core-do-not-import/utils.ts +2 -2
- package/src/unstable-core-do-not-import.ts +1 -0
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
|
-
"bundleSize":
|
|
3
|
-
"bundleOrigSize":
|
|
4
|
-
"bundleReduction": 24.
|
|
2
|
+
"bundleSize": 150109,
|
|
3
|
+
"bundleOrigSize": 198306,
|
|
4
|
+
"bundleReduction": 24.3,
|
|
5
5
|
"modules": [
|
|
6
6
|
{
|
|
7
7
|
"id": "/src/unstable-core-do-not-import/http/resolveResponse.ts",
|
|
8
|
-
"size":
|
|
9
|
-
"origSize":
|
|
8
|
+
"size": 21648,
|
|
9
|
+
"origSize": 19885,
|
|
10
10
|
"renderedExports": [
|
|
11
11
|
"resolveResponse"
|
|
12
12
|
],
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
"dependents": [
|
|
15
15
|
"/src/unstable-core-do-not-import.ts"
|
|
16
16
|
],
|
|
17
|
-
"percent":
|
|
17
|
+
"percent": 14.42,
|
|
18
18
|
"reduction": 0
|
|
19
19
|
},
|
|
20
20
|
{
|
|
@@ -31,7 +31,7 @@
|
|
|
31
31
|
"/src/unstable-core-do-not-import.ts",
|
|
32
32
|
"/src/unstable-core-do-not-import/http/resolveResponse.ts"
|
|
33
33
|
],
|
|
34
|
-
"percent": 11.
|
|
34
|
+
"percent": 11.7,
|
|
35
35
|
"reduction": 4.86
|
|
36
36
|
},
|
|
37
37
|
{
|
|
@@ -47,40 +47,40 @@
|
|
|
47
47
|
"dependents": [
|
|
48
48
|
"/src/adapters/fastify/fastifyTRPCPlugin.ts"
|
|
49
49
|
],
|
|
50
|
-
"percent":
|
|
50
|
+
"percent": 10.85,
|
|
51
51
|
"reduction": 0
|
|
52
52
|
},
|
|
53
53
|
{
|
|
54
|
-
"id": "/src/unstable-core-do-not-import/
|
|
55
|
-
"size":
|
|
56
|
-
"origSize":
|
|
54
|
+
"id": "/src/unstable-core-do-not-import/http/contentType.ts",
|
|
55
|
+
"size": 7688,
|
|
56
|
+
"origSize": 7608,
|
|
57
57
|
"renderedExports": [
|
|
58
|
-
"
|
|
59
|
-
"sseStreamConsumer",
|
|
60
|
-
"sseHeaders"
|
|
58
|
+
"getRequestInfo"
|
|
61
59
|
],
|
|
62
60
|
"removedExports": [],
|
|
63
61
|
"dependents": [
|
|
64
62
|
"/src/unstable-core-do-not-import.ts",
|
|
65
63
|
"/src/unstable-core-do-not-import/http/resolveResponse.ts"
|
|
66
64
|
],
|
|
67
|
-
"percent":
|
|
68
|
-
"reduction":
|
|
65
|
+
"percent": 5.12,
|
|
66
|
+
"reduction": 0
|
|
69
67
|
},
|
|
70
68
|
{
|
|
71
|
-
"id": "/src/unstable-core-do-not-import/
|
|
72
|
-
"size":
|
|
73
|
-
"origSize":
|
|
69
|
+
"id": "/src/unstable-core-do-not-import/stream/sse.ts",
|
|
70
|
+
"size": 6981,
|
|
71
|
+
"origSize": 9374,
|
|
74
72
|
"renderedExports": [
|
|
75
|
-
"
|
|
73
|
+
"sseStreamProducer",
|
|
74
|
+
"sseStreamConsumer",
|
|
75
|
+
"sseHeaders"
|
|
76
76
|
],
|
|
77
77
|
"removedExports": [],
|
|
78
78
|
"dependents": [
|
|
79
79
|
"/src/unstable-core-do-not-import.ts",
|
|
80
80
|
"/src/unstable-core-do-not-import/http/resolveResponse.ts"
|
|
81
81
|
],
|
|
82
|
-
"percent":
|
|
83
|
-
"reduction":
|
|
82
|
+
"percent": 4.65,
|
|
83
|
+
"reduction": 25.53
|
|
84
84
|
},
|
|
85
85
|
{
|
|
86
86
|
"id": "/src/unstable-core-do-not-import/router.ts",
|
|
@@ -97,7 +97,7 @@
|
|
|
97
97
|
"/src/unstable-core-do-not-import.ts",
|
|
98
98
|
"/src/unstable-core-do-not-import/initTRPC.ts"
|
|
99
99
|
],
|
|
100
|
-
"percent": 4.
|
|
100
|
+
"percent": 4.28,
|
|
101
101
|
"reduction": 40.09
|
|
102
102
|
},
|
|
103
103
|
{
|
|
@@ -112,7 +112,7 @@
|
|
|
112
112
|
"/src/unstable-core-do-not-import.ts",
|
|
113
113
|
"/src/unstable-core-do-not-import/initTRPC.ts"
|
|
114
114
|
],
|
|
115
|
-
"percent": 3.
|
|
115
|
+
"percent": 3.86,
|
|
116
116
|
"reduction": 64.74
|
|
117
117
|
},
|
|
118
118
|
{
|
|
@@ -126,7 +126,7 @@
|
|
|
126
126
|
"dependents": [
|
|
127
127
|
"/src/adapters/aws-lambda/index.ts"
|
|
128
128
|
],
|
|
129
|
-
"percent": 3.
|
|
129
|
+
"percent": 3.61,
|
|
130
130
|
"reduction": 11.38
|
|
131
131
|
},
|
|
132
132
|
{
|
|
@@ -143,9 +143,10 @@
|
|
|
143
143
|
"dependents": [
|
|
144
144
|
"/src/observable/index.ts",
|
|
145
145
|
"/src/unstable-core-do-not-import/http/resolveResponse.ts",
|
|
146
|
-
"/src/observable/operators.ts"
|
|
146
|
+
"/src/observable/operators.ts",
|
|
147
|
+
"/src/observable/behaviorSubject.ts"
|
|
147
148
|
],
|
|
148
|
-
"percent":
|
|
149
|
+
"percent": 2.98,
|
|
149
150
|
"reduction": 0
|
|
150
151
|
},
|
|
151
152
|
{
|
|
@@ -160,38 +161,40 @@
|
|
|
160
161
|
"dependents": [
|
|
161
162
|
"/src/adapters/node-http/index.ts"
|
|
162
163
|
],
|
|
163
|
-
"percent":
|
|
164
|
+
"percent": 2.97,
|
|
164
165
|
"reduction": 2.49
|
|
165
166
|
},
|
|
166
167
|
{
|
|
167
|
-
"id": "/src/
|
|
168
|
-
"size":
|
|
169
|
-
"origSize":
|
|
168
|
+
"id": "/src/observable/operators.ts",
|
|
169
|
+
"size": 3910,
|
|
170
|
+
"origSize": 3976,
|
|
170
171
|
"renderedExports": [
|
|
171
|
-
"
|
|
172
|
+
"map",
|
|
173
|
+
"share",
|
|
174
|
+
"tap",
|
|
175
|
+
"distinctUntilChanged",
|
|
176
|
+
"distinctUntilDeepChanged"
|
|
172
177
|
],
|
|
173
178
|
"removedExports": [],
|
|
174
179
|
"dependents": [
|
|
175
|
-
"/src/
|
|
180
|
+
"/src/observable/index.ts"
|
|
176
181
|
],
|
|
177
|
-
"percent": 2.
|
|
178
|
-
"reduction":
|
|
182
|
+
"percent": 2.6,
|
|
183
|
+
"reduction": 1.66
|
|
179
184
|
},
|
|
180
185
|
{
|
|
181
|
-
"id": "/src/
|
|
182
|
-
"size":
|
|
183
|
-
"origSize":
|
|
186
|
+
"id": "/src/adapters/next-app-dir/nextAppDirCaller.ts",
|
|
187
|
+
"size": 3221,
|
|
188
|
+
"origSize": 4160,
|
|
184
189
|
"renderedExports": [
|
|
185
|
-
"
|
|
186
|
-
"share",
|
|
187
|
-
"tap"
|
|
190
|
+
"nextAppDirCaller"
|
|
188
191
|
],
|
|
189
192
|
"removedExports": [],
|
|
190
193
|
"dependents": [
|
|
191
|
-
"/src/
|
|
194
|
+
"/src/adapters/next-app-dir.ts"
|
|
192
195
|
],
|
|
193
|
-
"percent":
|
|
194
|
-
"reduction":
|
|
196
|
+
"percent": 2.15,
|
|
197
|
+
"reduction": 22.57
|
|
195
198
|
},
|
|
196
199
|
{
|
|
197
200
|
"id": "/src/unstable-core-do-not-import/transformer.ts",
|
|
@@ -210,7 +213,7 @@
|
|
|
210
213
|
"/src/unstable-core-do-not-import/initTRPC.ts",
|
|
211
214
|
"/src/unstable-core-do-not-import/router.ts"
|
|
212
215
|
],
|
|
213
|
-
"percent": 1.
|
|
216
|
+
"percent": 1.83,
|
|
214
217
|
"reduction": 45.94
|
|
215
218
|
},
|
|
216
219
|
{
|
|
@@ -224,7 +227,7 @@
|
|
|
224
227
|
"dependents": [
|
|
225
228
|
"/src/unstable-core-do-not-import.ts"
|
|
226
229
|
],
|
|
227
|
-
"percent": 1.
|
|
230
|
+
"percent": 1.8,
|
|
228
231
|
"reduction": 40.98
|
|
229
232
|
},
|
|
230
233
|
{
|
|
@@ -244,13 +247,13 @@
|
|
|
244
247
|
"/src/unstable-core-do-not-import/initTRPC.ts",
|
|
245
248
|
"/src/unstable-core-do-not-import/procedureBuilder.ts"
|
|
246
249
|
],
|
|
247
|
-
"percent": 1.
|
|
250
|
+
"percent": 1.75,
|
|
248
251
|
"reduction": 55.78
|
|
249
252
|
},
|
|
250
253
|
{
|
|
251
254
|
"id": "/src/unstable-core-do-not-import/utils.ts",
|
|
252
|
-
"size":
|
|
253
|
-
"origSize":
|
|
255
|
+
"size": 2460,
|
|
256
|
+
"origSize": 2982,
|
|
254
257
|
"renderedExports": [
|
|
255
258
|
"unsetMarker",
|
|
256
259
|
"mergeWithoutOverrides",
|
|
@@ -282,8 +285,8 @@
|
|
|
282
285
|
"/src/unstable-core-do-not-import/stream/sse.ts",
|
|
283
286
|
"/src/unstable-core-do-not-import/stream/utils/asyncIterable.ts"
|
|
284
287
|
],
|
|
285
|
-
"percent": 1.
|
|
286
|
-
"reduction": 17.
|
|
288
|
+
"percent": 1.64,
|
|
289
|
+
"reduction": 17.51
|
|
287
290
|
},
|
|
288
291
|
{
|
|
289
292
|
"id": "/src/unstable-core-do-not-import/createProxy.ts",
|
|
@@ -298,7 +301,7 @@
|
|
|
298
301
|
"/src/unstable-core-do-not-import.ts",
|
|
299
302
|
"/src/unstable-core-do-not-import/router.ts"
|
|
300
303
|
],
|
|
301
|
-
"percent": 1.
|
|
304
|
+
"percent": 1.55,
|
|
302
305
|
"reduction": 0
|
|
303
306
|
},
|
|
304
307
|
{
|
|
@@ -312,7 +315,7 @@
|
|
|
312
315
|
"dependents": [
|
|
313
316
|
"/src/adapters/fetch/index.ts"
|
|
314
317
|
],
|
|
315
|
-
"percent": 1.
|
|
318
|
+
"percent": 1.5,
|
|
316
319
|
"reduction": 2.17
|
|
317
320
|
},
|
|
318
321
|
{
|
|
@@ -327,7 +330,7 @@
|
|
|
327
330
|
"/src/adapters/node-http/index.ts",
|
|
328
331
|
"/src/adapters/node-http/nodeHTTPRequestHandler.ts"
|
|
329
332
|
],
|
|
330
|
-
"percent": 1.
|
|
333
|
+
"percent": 1.47,
|
|
331
334
|
"reduction": 14.72
|
|
332
335
|
},
|
|
333
336
|
{
|
|
@@ -348,7 +351,7 @@
|
|
|
348
351
|
"/src/unstable-core-do-not-import/http/resolveResponse.ts",
|
|
349
352
|
"/src/unstable-core-do-not-import/error/getErrorShape.ts"
|
|
350
353
|
],
|
|
351
|
-
"percent": 1.
|
|
354
|
+
"percent": 1.39,
|
|
352
355
|
"reduction": 18.54
|
|
353
356
|
},
|
|
354
357
|
{
|
|
@@ -362,7 +365,7 @@
|
|
|
362
365
|
"dependents": [
|
|
363
366
|
"/src/adapters/next-app-dir/nextAppDirCaller.ts"
|
|
364
367
|
],
|
|
365
|
-
"percent": 1.
|
|
368
|
+
"percent": 1.37,
|
|
366
369
|
"reduction": 5.79
|
|
367
370
|
},
|
|
368
371
|
{
|
|
@@ -376,7 +379,7 @@
|
|
|
376
379
|
"dependents": [
|
|
377
380
|
"/src/adapters/fastify/index.ts"
|
|
378
381
|
],
|
|
379
|
-
"percent": 1.
|
|
382
|
+
"percent": 1.19,
|
|
380
383
|
"reduction": 29.88
|
|
381
384
|
},
|
|
382
385
|
{
|
|
@@ -401,7 +404,7 @@
|
|
|
401
404
|
"/src/unstable-core-do-not-import/stream/jsonl.ts",
|
|
402
405
|
"/src/unstable-core-do-not-import/stream/sse.ts"
|
|
403
406
|
],
|
|
404
|
-
"percent": 1.
|
|
407
|
+
"percent": 1.15,
|
|
405
408
|
"reduction": 19.47
|
|
406
409
|
},
|
|
407
410
|
{
|
|
@@ -413,13 +416,13 @@
|
|
|
413
416
|
],
|
|
414
417
|
"removedExports": [],
|
|
415
418
|
"dependents": [],
|
|
416
|
-
"percent": 1.
|
|
419
|
+
"percent": 1.13,
|
|
417
420
|
"reduction": 19.29
|
|
418
421
|
},
|
|
419
422
|
{
|
|
420
423
|
"id": "/src/unstable-core-do-not-import/stream/utils/asyncIterable.ts",
|
|
421
424
|
"size": 1655,
|
|
422
|
-
"origSize":
|
|
425
|
+
"origSize": 1734,
|
|
423
426
|
"renderedExports": [
|
|
424
427
|
"withCancel",
|
|
425
428
|
"takeWithGrace"
|
|
@@ -428,8 +431,8 @@
|
|
|
428
431
|
"dependents": [
|
|
429
432
|
"/src/unstable-core-do-not-import/stream/sse.ts"
|
|
430
433
|
],
|
|
431
|
-
"percent": 1.
|
|
432
|
-
"reduction": 4.
|
|
434
|
+
"percent": 1.1,
|
|
435
|
+
"reduction": 4.56
|
|
433
436
|
},
|
|
434
437
|
{
|
|
435
438
|
"id": "/src/unstable-core-do-not-import/rpc/codes.ts",
|
|
@@ -441,7 +444,7 @@
|
|
|
441
444
|
],
|
|
442
445
|
"removedExports": [],
|
|
443
446
|
"dependents": [],
|
|
444
|
-
"percent": 1.
|
|
447
|
+
"percent": 1.07,
|
|
445
448
|
"reduction": 17.81
|
|
446
449
|
},
|
|
447
450
|
{
|
|
@@ -453,7 +456,7 @@
|
|
|
453
456
|
],
|
|
454
457
|
"removedExports": [],
|
|
455
458
|
"dependents": [],
|
|
456
|
-
"percent": 0.
|
|
459
|
+
"percent": 0.88,
|
|
457
460
|
"reduction": 35.1
|
|
458
461
|
},
|
|
459
462
|
{
|
|
@@ -468,7 +471,7 @@
|
|
|
468
471
|
"/src/unstable-core-do-not-import.ts",
|
|
469
472
|
"/src/unstable-core-do-not-import/procedureBuilder.ts"
|
|
470
473
|
],
|
|
471
|
-
"percent": 0.
|
|
474
|
+
"percent": 0.86,
|
|
472
475
|
"reduction": 55.21
|
|
473
476
|
},
|
|
474
477
|
{
|
|
@@ -483,7 +486,7 @@
|
|
|
483
486
|
"/src/adapters/fastify/index.ts",
|
|
484
487
|
"/src/adapters/fastify/fastifyTRPCPlugin.ts"
|
|
485
488
|
],
|
|
486
|
-
"percent": 0.
|
|
489
|
+
"percent": 0.75,
|
|
487
490
|
"reduction": 47.59
|
|
488
491
|
},
|
|
489
492
|
{
|
|
@@ -499,7 +502,7 @@
|
|
|
499
502
|
"/src/unstable-core-do-not-import.ts",
|
|
500
503
|
"/src/unstable-core-do-not-import/http/contentType.ts"
|
|
501
504
|
],
|
|
502
|
-
"percent": 0.
|
|
505
|
+
"percent": 0.74,
|
|
503
506
|
"reduction": 15.08
|
|
504
507
|
},
|
|
505
508
|
{
|
|
@@ -513,7 +516,7 @@
|
|
|
513
516
|
"dependents": [
|
|
514
517
|
"/src/unstable-core-do-not-import.ts"
|
|
515
518
|
],
|
|
516
|
-
"percent": 0.
|
|
519
|
+
"percent": 0.71,
|
|
517
520
|
"reduction": 0
|
|
518
521
|
},
|
|
519
522
|
{
|
|
@@ -530,9 +533,23 @@
|
|
|
530
533
|
"/src/adapters/next-app-dir/nextAppDirCaller.ts",
|
|
531
534
|
"/src/adapters/next-app-dir/rethrowNextErrors.ts"
|
|
532
535
|
],
|
|
533
|
-
"percent": 0.
|
|
536
|
+
"percent": 0.66,
|
|
534
537
|
"reduction": 13.65
|
|
535
538
|
},
|
|
539
|
+
{
|
|
540
|
+
"id": "/src/observable/behaviorSubject.ts",
|
|
541
|
+
"size": 967,
|
|
542
|
+
"origSize": 1441,
|
|
543
|
+
"renderedExports": [
|
|
544
|
+
"behaviorSubject"
|
|
545
|
+
],
|
|
546
|
+
"removedExports": [],
|
|
547
|
+
"dependents": [
|
|
548
|
+
"/src/observable/index.ts"
|
|
549
|
+
],
|
|
550
|
+
"percent": 0.64,
|
|
551
|
+
"reduction": 32.89
|
|
552
|
+
},
|
|
536
553
|
{
|
|
537
554
|
"id": "/src/unstable-core-do-not-import/stream/utils/withPing.ts",
|
|
538
555
|
"size": 908,
|
|
@@ -545,7 +562,7 @@
|
|
|
545
562
|
"dependents": [
|
|
546
563
|
"/src/unstable-core-do-not-import/stream/sse.ts"
|
|
547
564
|
],
|
|
548
|
-
"percent": 0.
|
|
565
|
+
"percent": 0.6,
|
|
549
566
|
"reduction": 10.89
|
|
550
567
|
},
|
|
551
568
|
{
|
|
@@ -557,7 +574,7 @@
|
|
|
557
574
|
],
|
|
558
575
|
"removedExports": [],
|
|
559
576
|
"dependents": [],
|
|
560
|
-
"percent": 0.
|
|
577
|
+
"percent": 0.57,
|
|
561
578
|
"reduction": 34.73
|
|
562
579
|
},
|
|
563
580
|
{
|
|
@@ -574,7 +591,7 @@
|
|
|
574
591
|
"/src/unstable-core-do-not-import.ts",
|
|
575
592
|
"/src/unstable-core-do-not-import/stream/sse.ts"
|
|
576
593
|
],
|
|
577
|
-
"percent": 0.
|
|
594
|
+
"percent": 0.52,
|
|
578
595
|
"reduction": 44.37
|
|
579
596
|
},
|
|
580
597
|
{
|
|
@@ -602,7 +619,7 @@
|
|
|
602
619
|
"/src/unstable-core-do-not-import/stream/utils/asyncIterable.ts",
|
|
603
620
|
"/src/unstable-core-do-not-import/stream/utils/withPing.ts"
|
|
604
621
|
],
|
|
605
|
-
"percent": 0.
|
|
622
|
+
"percent": 0.5,
|
|
606
623
|
"reduction": 10.56
|
|
607
624
|
},
|
|
608
625
|
{
|
|
@@ -615,7 +632,7 @@
|
|
|
615
632
|
],
|
|
616
633
|
"removedExports": [],
|
|
617
634
|
"dependents": [],
|
|
618
|
-
"percent": 0.
|
|
635
|
+
"percent": 0.5,
|
|
619
636
|
"reduction": 59.78
|
|
620
637
|
},
|
|
621
638
|
{
|
|
@@ -631,7 +648,7 @@
|
|
|
631
648
|
"/src/unstable-core-do-not-import/stream/jsonl.ts",
|
|
632
649
|
"/src/unstable-core-do-not-import/stream/sse.ts"
|
|
633
650
|
],
|
|
634
|
-
"percent": 0.
|
|
651
|
+
"percent": 0.47,
|
|
635
652
|
"reduction": 21.32
|
|
636
653
|
},
|
|
637
654
|
{
|
|
@@ -645,7 +662,7 @@
|
|
|
645
662
|
"dependents": [
|
|
646
663
|
"/src/unstable-core-do-not-import.ts"
|
|
647
664
|
],
|
|
648
|
-
"percent": 0.
|
|
665
|
+
"percent": 0.44,
|
|
649
666
|
"reduction": 0.6
|
|
650
667
|
},
|
|
651
668
|
{
|
|
@@ -703,7 +720,6 @@
|
|
|
703
720
|
"dependents": [
|
|
704
721
|
"/src/unstable-core-do-not-import.ts",
|
|
705
722
|
"/src/unstable-core-do-not-import/stream/jsonl.ts",
|
|
706
|
-
"/src/unstable-core-do-not-import/stream/sse.ts",
|
|
707
723
|
"/src/unstable-core-do-not-import/stream/utils/createReadableStream.ts",
|
|
708
724
|
"/src/unstable-core-do-not-import/stream/utils/promiseTimer.ts"
|
|
709
725
|
],
|
|
@@ -721,7 +737,7 @@
|
|
|
721
737
|
"dependents": [
|
|
722
738
|
"/src/unstable-core-do-not-import.ts"
|
|
723
739
|
],
|
|
724
|
-
"percent": 0.
|
|
740
|
+
"percent": 0.18,
|
|
725
741
|
"reduction": 68.45
|
|
726
742
|
},
|
|
727
743
|
{
|
|
@@ -802,20 +818,10 @@
|
|
|
802
818
|
"percent": 0,
|
|
803
819
|
"reduction": 100
|
|
804
820
|
},
|
|
805
|
-
{
|
|
806
|
-
"id": "/src/shared.ts",
|
|
807
|
-
"size": 0,
|
|
808
|
-
"origSize": 653,
|
|
809
|
-
"renderedExports": [],
|
|
810
|
-
"removedExports": [],
|
|
811
|
-
"dependents": [],
|
|
812
|
-
"percent": 0,
|
|
813
|
-
"reduction": 100
|
|
814
|
-
},
|
|
815
821
|
{
|
|
816
822
|
"id": "/src/unstable-core-do-not-import.ts",
|
|
817
823
|
"size": 0,
|
|
818
|
-
"origSize":
|
|
824
|
+
"origSize": 2370,
|
|
819
825
|
"renderedExports": [],
|
|
820
826
|
"removedExports": [],
|
|
821
827
|
"dependents": [
|
|
@@ -829,6 +835,16 @@
|
|
|
829
835
|
"percent": 0,
|
|
830
836
|
"reduction": 100
|
|
831
837
|
},
|
|
838
|
+
{
|
|
839
|
+
"id": "/src/shared.ts",
|
|
840
|
+
"size": 0,
|
|
841
|
+
"origSize": 653,
|
|
842
|
+
"renderedExports": [],
|
|
843
|
+
"removedExports": [],
|
|
844
|
+
"dependents": [],
|
|
845
|
+
"percent": 0,
|
|
846
|
+
"reduction": 100
|
|
847
|
+
},
|
|
832
848
|
{
|
|
833
849
|
"id": "/src/adapters/next-app-dir.ts",
|
|
834
850
|
"size": 0,
|
|
@@ -842,7 +858,7 @@
|
|
|
842
858
|
{
|
|
843
859
|
"id": "/src/observable/index.ts",
|
|
844
860
|
"size": 0,
|
|
845
|
-
"origSize":
|
|
861
|
+
"origSize": 474,
|
|
846
862
|
"renderedExports": [],
|
|
847
863
|
"removedExports": [],
|
|
848
864
|
"dependents": [
|
|
@@ -887,5 +903,5 @@
|
|
|
887
903
|
"reduction": 100
|
|
888
904
|
}
|
|
889
905
|
],
|
|
890
|
-
"moduleCount":
|
|
906
|
+
"moduleCount": 59
|
|
891
907
|
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import type { Observable } from './types';
|
|
2
|
+
export interface BehaviorSubject<TValue> extends Observable<TValue, never> {
|
|
3
|
+
observable: Observable<TValue, never>;
|
|
4
|
+
next: (value: TValue) => void;
|
|
5
|
+
get: () => TValue;
|
|
6
|
+
}
|
|
7
|
+
export interface ReadonlyBehaviorSubject<TValue> extends Omit<BehaviorSubject<TValue>, 'next'> {
|
|
8
|
+
}
|
|
9
|
+
/**
|
|
10
|
+
* @internal
|
|
11
|
+
* An observable that maintains and provides a "current value" to subscribers
|
|
12
|
+
* @see https://www.learnrxjs.io/learn-rxjs/subjects/behaviorsubject
|
|
13
|
+
*/
|
|
14
|
+
export declare function behaviorSubject<TValue>(initialValue: TValue): BehaviorSubject<TValue>;
|
|
15
|
+
//# sourceMappingURL=behaviorSubject.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"behaviorSubject.d.ts","sourceRoot":"","sources":["../../src/observable/behaviorSubject.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,UAAU,EAAY,MAAM,SAAS,CAAC;AAEpD,MAAM,WAAW,eAAe,CAAC,MAAM,CAAE,SAAQ,UAAU,CAAC,MAAM,EAAE,KAAK,CAAC;IACxE,UAAU,EAAE,UAAU,CAAC,MAAM,EAAE,KAAK,CAAC,CAAC;IACtC,IAAI,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IAC9B,GAAG,EAAE,MAAM,MAAM,CAAC;CACnB;AAED,MAAM,WAAW,uBAAuB,CAAC,MAAM,CAC7C,SAAQ,IAAI,CAAC,eAAe,CAAC,MAAM,CAAC,EAAE,MAAM,CAAC;CAAG;AAElD;;;;GAIG;AACH,wBAAgB,eAAe,CAAC,MAAM,EACpC,YAAY,EAAE,MAAM,GACnB,eAAe,CAAC,MAAM,CAAC,CAmCzB"}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var observable = require('./observable.js');
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* @internal
|
|
7
|
+
* An observable that maintains and provides a "current value" to subscribers
|
|
8
|
+
* @see https://www.learnrxjs.io/learn-rxjs/subjects/behaviorsubject
|
|
9
|
+
*/ function behaviorSubject(initialValue) {
|
|
10
|
+
let value = initialValue;
|
|
11
|
+
const observerList = [];
|
|
12
|
+
const addObserver = (observer)=>{
|
|
13
|
+
if (value !== undefined) {
|
|
14
|
+
observer.next(value);
|
|
15
|
+
}
|
|
16
|
+
observerList.push(observer);
|
|
17
|
+
};
|
|
18
|
+
const removeObserver = (observer)=>{
|
|
19
|
+
observerList.splice(observerList.indexOf(observer), 1);
|
|
20
|
+
};
|
|
21
|
+
const obs = observable.observable((observer)=>{
|
|
22
|
+
addObserver(observer);
|
|
23
|
+
return ()=>{
|
|
24
|
+
removeObserver(observer);
|
|
25
|
+
};
|
|
26
|
+
});
|
|
27
|
+
obs.next = (nextValue)=>{
|
|
28
|
+
if (value === nextValue) {
|
|
29
|
+
return;
|
|
30
|
+
}
|
|
31
|
+
value = nextValue;
|
|
32
|
+
for (const observer of observerList){
|
|
33
|
+
observer.next(nextValue);
|
|
34
|
+
}
|
|
35
|
+
};
|
|
36
|
+
obs.get = ()=>value;
|
|
37
|
+
return obs;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
exports.behaviorSubject = behaviorSubject;
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { observable } from './observable.mjs';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* @internal
|
|
5
|
+
* An observable that maintains and provides a "current value" to subscribers
|
|
6
|
+
* @see https://www.learnrxjs.io/learn-rxjs/subjects/behaviorsubject
|
|
7
|
+
*/ function behaviorSubject(initialValue) {
|
|
8
|
+
let value = initialValue;
|
|
9
|
+
const observerList = [];
|
|
10
|
+
const addObserver = (observer)=>{
|
|
11
|
+
if (value !== undefined) {
|
|
12
|
+
observer.next(value);
|
|
13
|
+
}
|
|
14
|
+
observerList.push(observer);
|
|
15
|
+
};
|
|
16
|
+
const removeObserver = (observer)=>{
|
|
17
|
+
observerList.splice(observerList.indexOf(observer), 1);
|
|
18
|
+
};
|
|
19
|
+
const obs = observable((observer)=>{
|
|
20
|
+
addObserver(observer);
|
|
21
|
+
return ()=>{
|
|
22
|
+
removeObserver(observer);
|
|
23
|
+
};
|
|
24
|
+
});
|
|
25
|
+
obs.next = (nextValue)=>{
|
|
26
|
+
if (value === nextValue) {
|
|
27
|
+
return;
|
|
28
|
+
}
|
|
29
|
+
value = nextValue;
|
|
30
|
+
for (const observer of observerList){
|
|
31
|
+
observer.next(nextValue);
|
|
32
|
+
}
|
|
33
|
+
};
|
|
34
|
+
obs.get = ()=>value;
|
|
35
|
+
return obs;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
export { behaviorSubject };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
export type
|
|
2
|
-
export {
|
|
3
|
-
export { map, share, tap } from './operators';
|
|
1
|
+
export { isObservable, observable, observableToAsyncIterable, observableToPromise, type inferObservableValue, } from './observable';
|
|
2
|
+
export { distinctUntilChanged, distinctUntilDeepChanged, map, share, tap, } from './operators';
|
|
4
3
|
export type { Observable, Observer, TeardownLogic, Unsubscribable, UnsubscribeFn, } from './types';
|
|
4
|
+
export { behaviorSubject, type BehaviorSubject, type ReadonlyBehaviorSubject, } from './behaviorSubject';
|
|
5
5
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/observable/index.ts"],"names":[],"mappings":"AAAA,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/observable/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,YAAY,EACZ,UAAU,EACV,yBAAyB,EACzB,mBAAmB,EACnB,KAAK,oBAAoB,GAC1B,MAAM,cAAc,CAAC;AAEtB,OAAO,EACL,oBAAoB,EACpB,wBAAwB,EACxB,GAAG,EACH,KAAK,EACL,GAAG,GACJ,MAAM,aAAa,CAAC;AAErB,YAAY,EACV,UAAU,EACV,QAAQ,EACR,aAAa,EACb,cAAc,EACd,aAAa,GACd,MAAM,SAAS,CAAC;AAEjB,OAAO,EACL,eAAe,EACf,KAAK,eAAe,EACpB,KAAK,uBAAuB,GAC7B,MAAM,mBAAmB,CAAC"}
|
package/dist/observable/index.js
CHANGED
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
var observable = require('./observable.js');
|
|
4
4
|
var operators = require('./operators.js');
|
|
5
|
+
var behaviorSubject = require('./behaviorSubject.js');
|
|
5
6
|
|
|
6
7
|
|
|
7
8
|
|
|
@@ -9,6 +10,9 @@ exports.isObservable = observable.isObservable;
|
|
|
9
10
|
exports.observable = observable.observable;
|
|
10
11
|
exports.observableToAsyncIterable = observable.observableToAsyncIterable;
|
|
11
12
|
exports.observableToPromise = observable.observableToPromise;
|
|
13
|
+
exports.distinctUntilChanged = operators.distinctUntilChanged;
|
|
14
|
+
exports.distinctUntilDeepChanged = operators.distinctUntilDeepChanged;
|
|
12
15
|
exports.map = operators.map;
|
|
13
16
|
exports.share = operators.share;
|
|
14
17
|
exports.tap = operators.tap;
|
|
18
|
+
exports.behaviorSubject = behaviorSubject.behaviorSubject;
|
|
@@ -1,2 +1,3 @@
|
|
|
1
1
|
export { isObservable, observable, observableToAsyncIterable, observableToPromise } from './observable.mjs';
|
|
2
|
-
export { map, share, tap } from './operators.mjs';
|
|
2
|
+
export { distinctUntilChanged, distinctUntilDeepChanged, map, share, tap } from './operators.mjs';
|
|
3
|
+
export { behaviorSubject } from './behaviorSubject.mjs';
|
|
@@ -4,5 +4,7 @@ interface ShareConfig {
|
|
|
4
4
|
}
|
|
5
5
|
export declare function share<TValue, TError>(_opts?: ShareConfig): MonoTypeOperatorFunction<TValue, TError>;
|
|
6
6
|
export declare function tap<TValue, TError>(observer: Partial<Observer<TValue, TError>>): MonoTypeOperatorFunction<TValue, TError>;
|
|
7
|
+
export declare function distinctUntilChanged<TValue, TError>(compare?: (a: TValue, b: TValue) => boolean): MonoTypeOperatorFunction<TValue, TError>;
|
|
8
|
+
export declare function distinctUntilDeepChanged<TValue, TError>(): MonoTypeOperatorFunction<TValue, TError>;
|
|
7
9
|
export {};
|
|
8
10
|
//# sourceMappingURL=operators.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"operators.d.ts","sourceRoot":"","sources":["../../src/observable/operators.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EACV,wBAAwB,EACxB,QAAQ,EACR,gBAAgB,EAEjB,MAAM,SAAS,CAAC;AAEjB,wBAAgB,GAAG,CAAC,YAAY,EAAE,MAAM,EAAE,WAAW,EACnD,OAAO,EAAE,CAAC,KAAK,EAAE,YAAY,EAAE,KAAK,EAAE,MAAM,KAAK,WAAW,GAC3D,gBAAgB,CAAC,YAAY,EAAE,MAAM,EAAE,WAAW,EAAE,MAAM,CAAC,CAkB7D;AAED,UAAU,WAAW;CAAG;AACxB,wBAAgB,KAAK,CAAC,MAAM,EAAE,MAAM,EAClC,KAAK,CAAC,EAAE,WAAW,GAClB,wBAAwB,CAAC,MAAM,EAAE,MAAM,CAAC,CAyD1C;AAED,wBAAgB,GAAG,CAAC,MAAM,EAAE,MAAM,EAChC,QAAQ,EAAE,OAAO,CAAC,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,GAC1C,wBAAwB,CAAC,MAAM,EAAE,MAAM,CAAC,CAmB1C"}
|
|
1
|
+
{"version":3,"file":"operators.d.ts","sourceRoot":"","sources":["../../src/observable/operators.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EACV,wBAAwB,EACxB,QAAQ,EACR,gBAAgB,EAEjB,MAAM,SAAS,CAAC;AAEjB,wBAAgB,GAAG,CAAC,YAAY,EAAE,MAAM,EAAE,WAAW,EACnD,OAAO,EAAE,CAAC,KAAK,EAAE,YAAY,EAAE,KAAK,EAAE,MAAM,KAAK,WAAW,GAC3D,gBAAgB,CAAC,YAAY,EAAE,MAAM,EAAE,WAAW,EAAE,MAAM,CAAC,CAkB7D;AAED,UAAU,WAAW;CAAG;AACxB,wBAAgB,KAAK,CAAC,MAAM,EAAE,MAAM,EAClC,KAAK,CAAC,EAAE,WAAW,GAClB,wBAAwB,CAAC,MAAM,EAAE,MAAM,CAAC,CAyD1C;AAED,wBAAgB,GAAG,CAAC,MAAM,EAAE,MAAM,EAChC,QAAQ,EAAE,OAAO,CAAC,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,GAC1C,wBAAwB,CAAC,MAAM,EAAE,MAAM,CAAC,CAmB1C;AAGD,wBAAgB,oBAAoB,CAAC,MAAM,EAAE,MAAM,EACjD,OAAO,GAAE,CAAC,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,MAAM,KAAK,OAA2B,GAC7D,wBAAwB,CAAC,MAAM,EAAE,MAAM,CAAC,CAsB1C;AAeD,wBAAgB,wBAAwB,CACtC,MAAM,EACN,MAAM,KACH,wBAAwB,CAAC,MAAM,EAAE,MAAM,CAAC,CAE5C"}
|