brass-runtime 1.16.1 → 1.18.0
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/README.md +40 -8
- package/dist/agent/cli/main.cjs +31 -32
- package/dist/agent/cli/main.js +3 -4
- package/dist/agent/cli/main.mjs +3 -4
- package/dist/agent/index.cjs +4 -5
- package/dist/agent/index.d.ts +1 -1
- package/dist/agent/index.js +3 -4
- package/dist/agent/index.mjs +3 -4
- package/dist/{chunk-GYM3LLGS.mjs → chunk-2QNREG6K.mjs} +188 -5
- package/dist/{chunk-4ROBZFL6.cjs → chunk-2SLT3X6G.cjs} +6 -8
- package/dist/{chunk-KZJQ723N.cjs → chunk-3PFZGP23.cjs} +13 -15
- package/dist/{chunk-AVNQLJ5V.js → chunk-3PHU7FWS.js} +528 -23
- package/dist/{chunk-CIZFIMK5.js → chunk-4YQHPIWJ.js} +60 -11
- package/dist/chunk-5XADBMSU.cjs +33 -0
- package/dist/{chunk-DNFJLJMW.mjs → chunk-6MLAZPBL.mjs} +48 -24
- package/dist/chunk-7TKI527D.cjs +123 -0
- package/dist/{chunk-AGR5B2BC.cjs → chunk-7TXQJFZX.cjs} +564 -12
- package/dist/{chunk-RKGKFN2A.js → chunk-AADFFVYS.js} +1 -1
- package/dist/{chunk-52PPNNI4.cjs → chunk-AJMKZXRB.cjs} +2 -2
- package/dist/{chunk-3AYM6WPJ.js → chunk-BG5RNEA2.js} +20 -299
- package/dist/{chunk-2HQTDLHF.mjs → chunk-ELLF55ER.mjs} +555 -3
- package/dist/{chunk-EOC4UHBS.mjs → chunk-G5JTCFMI.mjs} +2 -2
- package/dist/chunk-H5GYX7RZ.js +6126 -0
- package/dist/{chunk-C3MDXTRZ.js → chunk-HCJ4S3YB.js} +48 -24
- package/dist/{chunk-6IXXWIUM.js → chunk-IBRHSH5H.js} +555 -3
- package/dist/{chunk-Q2I37RP3.cjs → chunk-IFRBVMWJ.cjs} +44 -323
- package/dist/{chunk-52OB2ROS.js → chunk-ITG6I7ZS.js} +2 -4
- package/dist/chunk-ITZQ526U.mjs +33 -0
- package/dist/{chunk-7JIJOVCT.js → chunk-JH4GI3DW.js} +2 -4
- package/dist/{chunk-76YMRMH2.cjs → chunk-KHACHFBQ.cjs} +583 -78
- package/dist/{chunk-MT3OWDPC.mjs → chunk-KRYP6CAE.mjs} +60 -11
- package/dist/chunk-KTGDLBLD.mjs +123 -0
- package/dist/{chunk-ENKODRU3.cjs → chunk-LXBU5E77.cjs} +143 -94
- package/dist/{chunk-PD4EJTQC.cjs → chunk-N6QNSTWD.cjs} +5 -5
- package/dist/{chunk-HLWLMW2F.mjs → chunk-OI4ESUMC.mjs} +9 -11
- package/dist/{chunk-EJ6BPYVR.mjs → chunk-OT2TESZU.mjs} +1 -1
- package/dist/{chunk-BABBZK4Y.js → chunk-PSEU65ND.js} +9 -11
- package/dist/{chunk-DNFO2EIZ.mjs → chunk-QCOLAHU3.mjs} +528 -23
- package/dist/{chunk-KH4SYAOS.mjs → chunk-QZ6QFJNM.mjs} +20 -299
- package/dist/{chunk-MBEJI5HF.mjs → chunk-R6WDSZA6.mjs} +2 -4
- package/dist/{chunk-FHQGHPMO.mjs → chunk-RREBJX2S.mjs} +2 -4
- package/dist/{chunk-5QC7LRZ3.js → chunk-S4HHFUYP.js} +2 -2
- package/dist/{chunk-GLE2WY7Z.cjs → chunk-SSQJKDN3.cjs} +194 -11
- package/dist/{chunk-CZIVE6NT.cjs → chunk-UUMKZJRJ.cjs} +48 -24
- package/dist/chunk-VIFA4DPN.cjs +6126 -0
- package/dist/chunk-W6WR37HN.js +33 -0
- package/dist/{chunk-FH2X7BVP.js → chunk-XSAHV5HQ.js} +188 -5
- package/dist/chunk-YM3EDNYD.js +123 -0
- package/dist/{chunk-VN44DYYT.cjs → chunk-YTX2JYYP.cjs} +18 -20
- package/dist/chunk-Z3PSSXP3.mjs +6126 -0
- package/dist/core/index.cjs +31 -9
- package/dist/core/index.d.ts +19 -152
- package/dist/core/index.js +80 -58
- package/dist/core/index.mjs +80 -58
- package/dist/defaultClient-DhpCQW9m.d.ts +1623 -0
- package/dist/{effect-DIUHZ9IN.d.ts → effect-CtUDl5M5.d.ts} +1 -1
- package/dist/http/index.cjs +202 -59
- package/dist/http/index.d.ts +55 -819
- package/dist/http/index.js +216 -73
- package/dist/http/index.mjs +216 -73
- package/dist/http/testing.cjs +31 -10
- package/dist/http/testing.d.ts +16 -5
- package/dist/http/testing.js +29 -8
- package/dist/http/testing.mjs +29 -8
- package/dist/index.cjs +110 -88
- package/dist/index.d.ts +9 -8
- package/dist/index.js +81 -59
- package/dist/index.mjs +81 -59
- package/dist/{schedule-CK3Ml_7p.d.ts → layer-BalPI6cN.d.ts} +176 -2
- package/dist/observability/index.cjs +22 -7
- package/dist/observability/index.d.ts +32 -8
- package/dist/observability/index.js +21 -6
- package/dist/observability/index.mjs +21 -6
- package/dist/perf/cli.cjs +26 -28
- package/dist/perf/cli.js +11 -13
- package/dist/perf/cli.mjs +11 -13
- package/dist/perf/index.cjs +13 -15
- package/dist/perf/index.js +11 -13
- package/dist/perf/index.mjs +11 -13
- package/dist/schema/index.cjs +2 -2
- package/dist/schema/index.js +1 -1
- package/dist/schema/index.mjs +1 -1
- package/dist/{server-GJPg8ZSG.d.ts → server-C1zVmqE6.d.ts} +16 -5
- package/dist/{stream-B4oK9JFP.d.ts → stream-Bb4FTejt.d.ts} +1 -1
- package/dist/{tracer-Hwt1cl7h.d.ts → tracer-DzfuE6um.d.ts} +2 -2
- package/dist/{tracing-DqbTKGcf.d.ts → tracing-BABA5arE.d.ts} +1 -1
- package/docs/README.md +4 -0
- package/docs/ai/PUBLIC_API.md +31 -7
- package/docs/articles/brass-runtime-http-observability.md +467 -0
- package/docs/framework-integrations.md +38 -0
- package/docs/frameworks/angular.md +204 -0
- package/docs/frameworks/express.md +183 -0
- package/docs/frameworks/fastify.md +173 -0
- package/docs/frameworks/nestjs.md +335 -0
- package/docs/frameworks/nextjs.md +202 -0
- package/docs/frameworks/react.md +183 -0
- package/docs/frameworks/vanilla.md +280 -0
- package/docs/guides/layers.md +130 -0
- package/docs/http-recipes.md +31 -1
- package/docs/http.md +50 -1
- package/docs/nestjs.md +6 -0
- package/docs/observability-framework-examples.md +12 -0
- package/docs/observability.md +239 -0
- package/docs/performance-profiler.md +6 -2
- package/docs/recipes/layers.md +46 -2
- package/docs/recipes/testing.md +25 -0
- package/package.json +4 -1
- package/dist/chunk-3LOYJFRR.cjs +0 -300
- package/dist/chunk-3Y2RIUMM.js +0 -300
- package/dist/chunk-5EC274J5.cjs +0 -2874
- package/dist/chunk-5VRJNBLZ.mjs +0 -2874
- package/dist/chunk-62AZW6UT.cjs +0 -313
- package/dist/chunk-74ZTY6CP.js +0 -2871
- package/dist/chunk-7CMJS3QE.mjs +0 -2871
- package/dist/chunk-A2OM6NEH.mjs +0 -194
- package/dist/chunk-B33ICAKP.js +0 -313
- package/dist/chunk-JF5WGYJJ.cjs +0 -194
- package/dist/chunk-KN32XNTH.mjs +0 -313
- package/dist/chunk-KQLYONSE.cjs +0 -2871
- package/dist/chunk-L2SYFEBS.js +0 -194
- package/dist/chunk-MIIYDLGM.js +0 -2874
- package/dist/chunk-PWC3RBQE.mjs +0 -300
- package/dist/client-CZHU674n.d.ts +0 -820
package/dist/core/index.mjs
CHANGED
|
@@ -1,7 +1,4 @@
|
|
|
1
1
|
import {
|
|
2
|
-
Layer,
|
|
3
|
-
LayerContext,
|
|
4
|
-
MissingLayerServiceError,
|
|
5
2
|
RuntimeRegistry,
|
|
6
3
|
Supervisor,
|
|
7
4
|
TestClock,
|
|
@@ -10,72 +7,40 @@ import {
|
|
|
10
7
|
assertFails,
|
|
11
8
|
assertFailsWith,
|
|
12
9
|
assertSucceeds,
|
|
13
|
-
buildLayer,
|
|
14
10
|
catchTag,
|
|
15
11
|
catchTags,
|
|
16
|
-
compose,
|
|
17
12
|
consoleJsonLogger,
|
|
18
13
|
defaultTracer,
|
|
19
|
-
|
|
20
|
-
defineService,
|
|
14
|
+
defineConfigLayer,
|
|
21
15
|
delayedEffect,
|
|
22
16
|
derivedRef,
|
|
23
17
|
dumpAllFibers,
|
|
24
18
|
flakyEffect,
|
|
25
|
-
formatLayerError,
|
|
26
|
-
getService,
|
|
27
19
|
gracefulShutdown,
|
|
28
20
|
joinSupervised,
|
|
29
|
-
layer,
|
|
30
|
-
layerEffect,
|
|
31
|
-
layerFail,
|
|
32
|
-
layerFrom,
|
|
33
|
-
layerFromContext,
|
|
34
|
-
layerSucceed,
|
|
35
|
-
layerValue,
|
|
36
21
|
linkAbortController,
|
|
37
22
|
makeCancelToken,
|
|
38
|
-
|
|
23
|
+
makeConfigLayer,
|
|
39
24
|
makeRef,
|
|
40
25
|
makeRuntime,
|
|
41
26
|
makeSemaphore,
|
|
42
|
-
makeServiceTag,
|
|
43
27
|
makeSupervisor,
|
|
44
28
|
makeTestRuntime,
|
|
45
29
|
makeTracer,
|
|
46
30
|
makeWorkerPool,
|
|
47
31
|
mapError as mapError2,
|
|
48
|
-
mapLayer,
|
|
49
|
-
merge,
|
|
50
32
|
neverEffect,
|
|
51
33
|
orElse,
|
|
52
|
-
provide,
|
|
53
|
-
provideContext,
|
|
54
|
-
provideLayer,
|
|
55
|
-
provideLayerContext,
|
|
56
34
|
registerShutdownHooks,
|
|
57
35
|
runEffect,
|
|
58
36
|
runExit,
|
|
59
37
|
runPromise,
|
|
60
|
-
serviceTag,
|
|
61
38
|
supervise,
|
|
62
39
|
tagError
|
|
63
|
-
} from "../chunk-
|
|
40
|
+
} from "../chunk-QZ6QFJNM.mjs";
|
|
64
41
|
import {
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
ensuring,
|
|
68
|
-
makeCircuitBreaker,
|
|
69
|
-
makeResource,
|
|
70
|
-
managed,
|
|
71
|
-
managedAll,
|
|
72
|
-
resource,
|
|
73
|
-
resourceAll,
|
|
74
|
-
resourceFromManaged,
|
|
75
|
-
resourceSucceed,
|
|
76
|
-
useManaged,
|
|
77
|
-
useResource
|
|
78
|
-
} from "../chunk-KN32XNTH.mjs";
|
|
42
|
+
makeCircuitBreaker
|
|
43
|
+
} from "../chunk-KTGDLBLD.mjs";
|
|
79
44
|
import {
|
|
80
45
|
fiberRefSnapshot,
|
|
81
46
|
getFiberRef,
|
|
@@ -88,32 +53,83 @@ import {
|
|
|
88
53
|
unsafeGetFiberRef,
|
|
89
54
|
unsafeSetFiberRef,
|
|
90
55
|
updateFiberRef
|
|
91
|
-
} from "../chunk-
|
|
56
|
+
} from "../chunk-G5JTCFMI.mjs";
|
|
92
57
|
import {
|
|
58
|
+
RuntimeService,
|
|
59
|
+
makeRuntimeLayer
|
|
60
|
+
} from "../chunk-ITZQ526U.mjs";
|
|
61
|
+
import {
|
|
62
|
+
EventBus,
|
|
63
|
+
InMemoryTracer,
|
|
64
|
+
makeMetrics,
|
|
65
|
+
makeRuntimeEventRecord,
|
|
66
|
+
runtimeEventRecordContext,
|
|
67
|
+
runtimeHooksToEventHandler
|
|
68
|
+
} from "../chunk-OT2TESZU.mjs";
|
|
69
|
+
import {
|
|
70
|
+
Layer,
|
|
71
|
+
LayerContext,
|
|
72
|
+
MissingLayerServiceError,
|
|
73
|
+
Resource,
|
|
93
74
|
Schedule,
|
|
94
75
|
andThen,
|
|
76
|
+
bracket,
|
|
77
|
+
buildLayer,
|
|
78
|
+
compose,
|
|
79
|
+
composeAll,
|
|
95
80
|
contramap,
|
|
81
|
+
defineLayer,
|
|
82
|
+
defineService,
|
|
96
83
|
elapsed,
|
|
84
|
+
ensuring,
|
|
97
85
|
exponential,
|
|
98
86
|
fibonacci,
|
|
99
87
|
fixed,
|
|
100
88
|
forever,
|
|
89
|
+
formatLayerError,
|
|
90
|
+
getService,
|
|
91
|
+
getServices,
|
|
101
92
|
intersect,
|
|
102
93
|
jitter,
|
|
103
94
|
jittered,
|
|
104
95
|
jitteredSchedule,
|
|
96
|
+
layer,
|
|
97
|
+
layerEffect,
|
|
98
|
+
layerFail,
|
|
99
|
+
layerFrom,
|
|
100
|
+
layerFromContext,
|
|
101
|
+
layerSucceed,
|
|
102
|
+
layerValue,
|
|
105
103
|
linear,
|
|
104
|
+
makeLayerScope,
|
|
105
|
+
makeResource,
|
|
106
106
|
makeScheduleDriver,
|
|
107
|
+
makeServiceTag,
|
|
108
|
+
makeTestLayer,
|
|
109
|
+
makeTestLayers,
|
|
110
|
+
managed,
|
|
111
|
+
managedAll,
|
|
107
112
|
map as map2,
|
|
113
|
+
mapLayer,
|
|
108
114
|
maxDelay,
|
|
109
115
|
maxElapsed,
|
|
116
|
+
merge,
|
|
117
|
+
mergeAll,
|
|
110
118
|
named,
|
|
111
119
|
never,
|
|
112
120
|
once,
|
|
113
121
|
poll,
|
|
122
|
+
provide,
|
|
123
|
+
provideContext,
|
|
124
|
+
provideLayer,
|
|
125
|
+
provideLayerContext,
|
|
114
126
|
recurs,
|
|
115
127
|
repeat,
|
|
116
128
|
repeatWithSchedule,
|
|
129
|
+
resource,
|
|
130
|
+
resourceAll,
|
|
131
|
+
resourceFromManaged,
|
|
132
|
+
resourceSucceed,
|
|
117
133
|
retry,
|
|
118
134
|
retry2,
|
|
119
135
|
retryN,
|
|
@@ -121,6 +137,7 @@ import {
|
|
|
121
137
|
retryWithSchedule,
|
|
122
138
|
runSchedule,
|
|
123
139
|
scheduleDriver,
|
|
140
|
+
serviceTag,
|
|
124
141
|
sleep,
|
|
125
142
|
spaced,
|
|
126
143
|
take,
|
|
@@ -130,27 +147,19 @@ import {
|
|
|
130
147
|
untilInput,
|
|
131
148
|
untilOutput,
|
|
132
149
|
upTo,
|
|
150
|
+
useManaged,
|
|
151
|
+
useResource,
|
|
152
|
+
useService,
|
|
153
|
+
useServices,
|
|
133
154
|
whileInput,
|
|
134
155
|
whileOutput,
|
|
135
156
|
windowed
|
|
136
|
-
} from "../chunk-
|
|
137
|
-
import {
|
|
138
|
-
Scope,
|
|
139
|
-
withScope,
|
|
140
|
-
withScopeAsync
|
|
141
|
-
} from "../chunk-A2OM6NEH.mjs";
|
|
142
|
-
import {
|
|
143
|
-
EventBus,
|
|
144
|
-
InMemoryTracer,
|
|
145
|
-
makeMetrics,
|
|
146
|
-
makeRuntimeEventRecord,
|
|
147
|
-
runtimeEventRecordContext,
|
|
148
|
-
runtimeHooksToEventHandler
|
|
149
|
-
} from "../chunk-EJ6BPYVR.mjs";
|
|
157
|
+
} from "../chunk-ELLF55ER.mjs";
|
|
150
158
|
import {
|
|
151
159
|
NoopHooks,
|
|
152
160
|
Runtime,
|
|
153
161
|
RuntimeFiber,
|
|
162
|
+
Scope,
|
|
154
163
|
abortablePromiseStats,
|
|
155
164
|
ctxExtend,
|
|
156
165
|
ctxToObject,
|
|
@@ -169,8 +178,10 @@ import {
|
|
|
169
178
|
unsafeGetCurrentRuntime,
|
|
170
179
|
unsafeRunAsync,
|
|
171
180
|
unsafeRunFoldWithEnv,
|
|
172
|
-
withCurrentFiber
|
|
173
|
-
|
|
181
|
+
withCurrentFiber,
|
|
182
|
+
withScope,
|
|
183
|
+
withScopeAsync
|
|
184
|
+
} from "../chunk-2QNREG6K.mjs";
|
|
174
185
|
import {
|
|
175
186
|
Async,
|
|
176
187
|
Cause,
|
|
@@ -209,7 +220,7 @@ import {
|
|
|
209
220
|
unit,
|
|
210
221
|
withAsyncPromise
|
|
211
222
|
} from "../chunk-36I3M4UC.mjs";
|
|
212
|
-
import "../chunk-
|
|
223
|
+
import "../chunk-6MLAZPBL.mjs";
|
|
213
224
|
import "../chunk-Y6FXYEAI.mjs";
|
|
214
225
|
export {
|
|
215
226
|
Async,
|
|
@@ -225,6 +236,7 @@ export {
|
|
|
225
236
|
Runtime,
|
|
226
237
|
RuntimeFiber,
|
|
227
238
|
RuntimeRegistry,
|
|
239
|
+
RuntimeService,
|
|
228
240
|
Schedule,
|
|
229
241
|
Scope,
|
|
230
242
|
Supervisor,
|
|
@@ -253,12 +265,14 @@ export {
|
|
|
253
265
|
catchAll,
|
|
254
266
|
catchTag,
|
|
255
267
|
catchTags,
|
|
268
|
+
composeAll,
|
|
256
269
|
compose as composeLayer,
|
|
257
270
|
consoleJsonLogger,
|
|
258
271
|
contramap as contramapSchedule,
|
|
259
272
|
ctxExtend,
|
|
260
273
|
ctxToObject,
|
|
261
274
|
defaultTracer,
|
|
275
|
+
defineConfigLayer,
|
|
262
276
|
defineLayer,
|
|
263
277
|
defineService,
|
|
264
278
|
delayedEffect,
|
|
@@ -284,6 +298,7 @@ export {
|
|
|
284
298
|
getCurrentFiber,
|
|
285
299
|
getFiberRef,
|
|
286
300
|
getService,
|
|
301
|
+
getServices,
|
|
287
302
|
gracefulShutdown,
|
|
288
303
|
interruptible,
|
|
289
304
|
intersect,
|
|
@@ -306,6 +321,7 @@ export {
|
|
|
306
321
|
locallyFiberRefWith,
|
|
307
322
|
makeCancelToken,
|
|
308
323
|
makeCircuitBreaker,
|
|
324
|
+
makeConfigLayer,
|
|
309
325
|
makeFiberRef,
|
|
310
326
|
makeLayerScope,
|
|
311
327
|
makeMetrics,
|
|
@@ -313,11 +329,14 @@ export {
|
|
|
313
329
|
makeResource,
|
|
314
330
|
makeRuntime,
|
|
315
331
|
makeRuntimeEventRecord,
|
|
332
|
+
makeRuntimeLayer,
|
|
316
333
|
makeRuntimeRecorder,
|
|
317
334
|
makeScheduleDriver,
|
|
318
335
|
makeSemaphore,
|
|
319
336
|
makeServiceTag,
|
|
320
337
|
makeSupervisor,
|
|
338
|
+
makeTestLayer,
|
|
339
|
+
makeTestLayers,
|
|
321
340
|
makeTestRuntime,
|
|
322
341
|
makeTracer,
|
|
323
342
|
makeWorkerPool,
|
|
@@ -332,6 +351,7 @@ export {
|
|
|
332
351
|
mapTryAsync,
|
|
333
352
|
maxDelay,
|
|
334
353
|
maxElapsed,
|
|
354
|
+
mergeAll,
|
|
335
355
|
merge as mergeLayer,
|
|
336
356
|
modifyFiberRef,
|
|
337
357
|
named as namedSchedule,
|
|
@@ -400,6 +420,8 @@ export {
|
|
|
400
420
|
updateFiberRef,
|
|
401
421
|
useManaged,
|
|
402
422
|
useResource,
|
|
423
|
+
useService,
|
|
424
|
+
useServices,
|
|
403
425
|
whileInput,
|
|
404
426
|
whileOutput,
|
|
405
427
|
windowed,
|