brass-runtime 1.17.0 → 1.18.1
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 +36 -3
- 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-7X3K5RMS.js → chunk-22HZQG5F.js} +9 -11
- package/dist/{chunk-GLE2WY7Z.cjs → chunk-2JHJ4YHS.cjs} +417 -124
- package/dist/{chunk-Q2I37RP3.cjs → chunk-2OW6IFY2.cjs} +44 -323
- package/dist/{chunk-7ZPEZ57L.cjs → chunk-5LC7V2OZ.cjs} +18 -20
- package/dist/{chunk-AGR5B2BC.cjs → chunk-5RZ7YITF.cjs} +564 -12
- package/dist/{chunk-DNFJLJMW.mjs → chunk-6MLAZPBL.mjs} +48 -24
- package/dist/{chunk-EJ6BPYVR.mjs → chunk-6V2AWT4R.mjs} +1 -1
- package/dist/{chunk-3AYM6WPJ.js → chunk-7DU7IQHK.js} +20 -299
- package/dist/{chunk-SK7UZRNI.mjs → chunk-7GBJYOX7.mjs} +528 -23
- package/dist/chunk-7TKI527D.cjs +123 -0
- package/dist/{chunk-52OB2ROS.js → chunk-7VQLEN37.js} +2 -4
- package/dist/{chunk-KH4SYAOS.mjs → chunk-B5FKOLTB.mjs} +20 -299
- package/dist/{chunk-FHQGHPMO.mjs → chunk-BC6Q6BCO.mjs} +2 -4
- package/dist/{chunk-4P2HHGAX.mjs → chunk-COOW7BJX.mjs} +32 -11
- package/dist/{chunk-2HQTDLHF.mjs → chunk-EEN5OTCR.mjs} +555 -3
- package/dist/{chunk-KZJQ723N.cjs → chunk-EICAJDNX.cjs} +13 -15
- package/dist/chunk-ELIECDYN.cjs +33 -0
- package/dist/{chunk-GYM3LLGS.mjs → chunk-H626ZTDZ.mjs} +399 -106
- package/dist/{chunk-C3MDXTRZ.js → chunk-HCJ4S3YB.js} +48 -24
- package/dist/{chunk-7JIJOVCT.js → chunk-IPSMXUWA.js} +2 -4
- package/dist/{chunk-4ROBZFL6.cjs → chunk-J6DUHITE.cjs} +6 -8
- package/dist/{chunk-6RY2FFN4.mjs → chunk-JWIEMBE6.mjs} +9 -11
- package/dist/{chunk-PD4EJTQC.cjs → chunk-KNTJ7FQB.cjs} +5 -5
- package/dist/chunk-KTGDLBLD.mjs +123 -0
- package/dist/chunk-LSYQ3C2M.js +33 -0
- package/dist/{chunk-RKGKFN2A.js → chunk-OW5VHAOE.js} +1 -1
- package/dist/{chunk-EOC4UHBS.mjs → chunk-RBHNOKH4.mjs} +2 -2
- package/dist/{chunk-6IXXWIUM.js → chunk-S4HXADU4.js} +555 -3
- package/dist/{chunk-FH2X7BVP.js → chunk-TTSPIU3U.js} +399 -106
- package/dist/{chunk-5QC7LRZ3.js → chunk-UAKAF32U.js} +2 -2
- package/dist/{chunk-CZIVE6NT.cjs → chunk-UUMKZJRJ.cjs} +48 -24
- package/dist/{chunk-MBEJI5HF.mjs → chunk-WCBNXPN6.mjs} +2 -4
- package/dist/{chunk-52PPNNI4.cjs → chunk-WGE2FEZE.cjs} +2 -2
- package/dist/{chunk-WBGRHGBP.cjs → chunk-WI7GZF3B.cjs} +114 -93
- package/dist/chunk-WUDHOZIH.js +6234 -0
- package/dist/{chunk-F6XWZQY4.cjs → chunk-WVSZOPGQ.cjs} +583 -78
- package/dist/chunk-XPIMJQYS.cjs +6234 -0
- package/dist/{chunk-VWIPB6I5.js → chunk-YGR2IN4R.js} +528 -23
- package/dist/chunk-YM3EDNYD.js +123 -0
- package/dist/chunk-YWLLH27R.mjs +33 -0
- package/dist/{chunk-BKK77SBA.js → chunk-YZ5LQ32F.js} +32 -11
- package/dist/chunk-Z3ZZMQUZ.mjs +6234 -0
- package/dist/core/index.cjs +37 -9
- package/dist/core/index.d.ts +19 -152
- package/dist/core/index.js +86 -58
- package/dist/core/index.mjs +86 -58
- package/dist/defaultClient-Cid0JoUR.d.ts +1648 -0
- package/dist/{effect-DIUHZ9IN.d.ts → effect-DnGUuhw6.d.ts} +22 -1
- package/dist/http/index.cjs +206 -59
- package/dist/http/index.d.ts +55 -819
- package/dist/http/index.js +220 -73
- package/dist/http/index.mjs +220 -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 +116 -88
- package/dist/index.d.ts +9 -8
- package/dist/index.js +87 -59
- package/dist/index.mjs +87 -59
- package/dist/{schedule-CK3Ml_7p.d.ts → layer-D2LFcBVx.d.ts} +176 -2
- package/dist/observability/index.cjs +20 -7
- package/dist/observability/index.d.ts +32 -8
- package/dist/observability/index.js +19 -6
- package/dist/observability/index.mjs +19 -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-D6JZ15_e.d.ts → server-Bf1zNYZk.d.ts} +5 -5
- package/dist/{stream-B4oK9JFP.d.ts → stream-I7bkvF7a.d.ts} +1 -1
- package/dist/{tracer-Hwt1cl7h.d.ts → tracer-DF83nLn6.d.ts} +2 -2
- package/dist/{tracing-DqbTKGcf.d.ts → tracing-CWV4gT0u.d.ts} +1 -1
- package/docs/README.md +2 -0
- package/docs/ai/PUBLIC_API.md +28 -7
- package/docs/articles/brass-runtime-http-observability.md +467 -0
- package/docs/frameworks/angular.md +51 -0
- package/docs/frameworks/express.md +58 -0
- package/docs/frameworks/fastify.md +49 -0
- package/docs/frameworks/nestjs.md +53 -0
- package/docs/frameworks/nextjs.md +55 -0
- package/docs/frameworks/react.md +44 -0
- package/docs/frameworks/vanilla.md +56 -0
- package/docs/guides/layers.md +130 -0
- package/docs/http-recipes.md +31 -1
- package/docs/http.md +50 -1
- package/docs/observability.md +132 -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 +6 -2
- 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
|
@@ -759,6 +759,7 @@ declare class Runtime<R> {
|
|
|
759
759
|
capabilities(): RuntimeCapabilities;
|
|
760
760
|
shutdown(): Promise<void> | void;
|
|
761
761
|
unsafeRunAsync<E, A>(effect: Async<R, E, A>, cb: (exit: Exit<E, A>) => void): void;
|
|
762
|
+
private static exitToError;
|
|
762
763
|
toPromise<E, A>(effect: Async<R, E, A>): Promise<A>;
|
|
763
764
|
private tryRunNativeTopLevel;
|
|
764
765
|
unsafeRun<E, A>(effect: Async<R, E, A>): void;
|
|
@@ -785,6 +786,16 @@ type AbortablePromiseFinish = {
|
|
|
785
786
|
readonly durationMs: number;
|
|
786
787
|
readonly error?: unknown;
|
|
787
788
|
};
|
|
789
|
+
/**
|
|
790
|
+
* Duck-typed timer wheel interface for use in AbortablePromiseOptions.
|
|
791
|
+
* Avoids importing from `src/http/timerWheel.ts` to prevent circular dependencies.
|
|
792
|
+
* Any object with a compatible `schedule` method can be used.
|
|
793
|
+
*/
|
|
794
|
+
interface AbortablePromiseTimerWheel {
|
|
795
|
+
schedule(timeoutMs: number, cb: () => void): {
|
|
796
|
+
cancel(): void;
|
|
797
|
+
};
|
|
798
|
+
}
|
|
788
799
|
type AbortablePromiseOptions = {
|
|
789
800
|
/** Logical label used by diagnostics. Keep it low-cardinality: e.g. `http:GET:https://api.foo.com`. */
|
|
790
801
|
readonly label?: string;
|
|
@@ -794,6 +805,8 @@ type AbortablePromiseOptions = {
|
|
|
794
805
|
readonly timeoutReason?: () => unknown;
|
|
795
806
|
readonly onStart?: (label: string) => void;
|
|
796
807
|
readonly onFinish?: (finish: AbortablePromiseFinish) => void;
|
|
808
|
+
/** Optional timer wheel for efficient timeout scheduling. When provided, uses wheel.schedule() instead of setTimeout. */
|
|
809
|
+
readonly timerWheel?: AbortablePromiseTimerWheel;
|
|
797
810
|
};
|
|
798
811
|
type AbortablePromiseLabelStats = {
|
|
799
812
|
readonly label: string;
|
|
@@ -815,6 +828,14 @@ type AbortablePromiseStats = {
|
|
|
815
828
|
readonly lateSettlements: number;
|
|
816
829
|
readonly byLabel: AbortablePromiseLabelStats[];
|
|
817
830
|
};
|
|
831
|
+
/**
|
|
832
|
+
* Enable or disable per-label tracking for abortable promise diagnostics.
|
|
833
|
+
* When disabled (default), only global integer counters are incremented on the hot path,
|
|
834
|
+
* avoiding Map allocations entirely. Returns the previous enabled state.
|
|
835
|
+
*/
|
|
836
|
+
declare function setAbortablePromisePerLabelTracking(enabled: boolean): boolean;
|
|
837
|
+
declare const recordAbortablePromiseStart: (label: string) => void;
|
|
838
|
+
declare const recordAbortablePromiseFinish: (label: string, outcome: AbortablePromiseOutcome) => void;
|
|
818
839
|
declare function abortablePromiseStats(): AbortablePromiseStats;
|
|
819
840
|
declare function resetAbortablePromiseStats(): void;
|
|
820
841
|
/**
|
|
@@ -1159,4 +1180,4 @@ declare function uninterruptibleMask<R, E, A>(body: (restore: RestoreInterruptib
|
|
|
1159
1180
|
declare function orElseOptional<R, E, A, R2, A2>(fa: ZIO<R, Option<E>, A>, that: () => ZIO<R2, Option<E>, A2>): ZIO<R & R2, Option<E>, A | A2>;
|
|
1160
1181
|
declare const end: <E>() => ZIO<unknown, Option<E>, never>;
|
|
1161
1182
|
|
|
1162
|
-
export { type
|
|
1183
|
+
export { type FiberContext as $, Async as A, type Baggage as B, type AsyncRegisterRef as C, type AsyncWithPromise as D, Exit as E, type FiberEngine as F, type RingLike as G, type CancelToken as H, type Canceler as I, type JSONValue as J, Cause as K, type CausePrettyOptions as L, type ContextNode as M, type NodeId as N, type Option as O, type CustomHostAction as P, type DbHostAction as Q, type RuntimeHooks as R, Scope as S, type TraceContext as T, type DecodeRef as U, DefaultHostExecutor as V, type WasmEngineRuntime as W, type EngineKind as X, type EngineSelection as Y, type ZIO as Z, type EngineSelectionMode as _, type RuntimeOptions as a, ctxToObject as a$, type FiberEngineKind as a0, type FiberInfo as a1, type FiberReadyQueue as a2, type FiberReadyQueueOptions as a3, type FiberReadyQueueStats as a4, type FiberRunState as a5, type FlatMapRef as a6, type FoldFailureRef as a7, type FoldSuccessRef as a8, type HostAction as a9, type SchedulerEngine as aA, type SchedulerLaneMode as aB, type SchedulerOptions as aC, type SchedulerStats as aD, type SchedulerStatsData as aE, type ScopeId as aF, type ScopeInfo as aG, type Some as aH, type SyncRef as aI, type Task as aJ, WasmFiberEngine as aK, type WasmFiberEngineOptions as aL, abortablePromiseStats as aM, acquireRelease as aN, asyncEffect as aO, asyncCatchAll as aP, asyncFail as aQ, asyncFlatMap as aR, asyncFold as aS, asyncInterruptible as aT, asyncMap as aU, asyncMapError as aV, asyncSucceed as aW, asyncSync as aX, asyncTotal as aY, catchAll as aZ, ctxExtend as a_, type HostActionKind as aa, type HostActionResult as ab, type HostExecutionContext as ac, type HostExecutor as ad, HostRegistry as ae, type HostRegistryStats as af, type HttpHostAction as ag, type Interrupted as ah, type InterruptibilityMode as ai, type Joiner as aj, type LaneStatsData as ak, type None as al, NoopHooks as am, ProgramBuilder as an, type ProgramPatch as ao, PushStatus as ap, type QueueHostAction as aq, type ReadyQueueScheduleKind as ar, type RestoreInterruptibility as as, RingBuffer as at, type RingBufferEngine as au, type RingBufferStatsData as av, type RuntimeCapabilities as aw, type RuntimeEngineMode as ax, type ScheduleResult as ay, Scheduler as az, Runtime as b, emptyContext as b0, end as b1, engineStats as b2, fail as b3, flatMap as b4, fork as b5, formatCause as b6, fromPromiseAbortable as b7, getBenchmarkBudget as b8, getCurrentFiber as b9, setBenchmarkBudget as bA, some as bB, succeed as bC, sync as bD, toPromise as bE, toPromiseByCaller as bF, uninterruptible as bG, uninterruptibleMask as bH, unit as bI, unsafeGetCurrentRuntime as bJ, unsafeRunAsync as bK, unsafeRunFoldWithEnv as bL, withAsyncPromise as bM, withCurrentFiber as bN, withScope as bO, withScopeAsync as bP, globalScheduler as ba, inferCallerLaneFromStack as bb, interruptible as bc, isCause as bd, laneTag as be, linkAbortController as bf, makeBoundedRingBuffer as bg, makeCancelToken as bh, makeFiberReadyQueue as bi, makeRuntimeEventRecord as bj, map as bk, mapAsync as bl, mapError as bm, mapTryAsync as bn, none as bo, orElseOptional as bp, prettyCause as bq, recordAbortablePromiseFinish as br, recordAbortablePromiseStart as bs, resetAbortablePromiseStats as bt, runtimeCapabilities as bu, runtimeEventRecordContext as bv, runtimeForCaller as bw, sanitizeLaneKey as bx, selectedEngineStats as by, setAbortablePromisePerLabelTracking as bz, type RingBufferOptions as c, type RuntimeEvent as d, type RuntimeEmitContext as e, type RuntimeEventRecord as f, type RuntimeSpanLink as g, RuntimeRegistry as h, RuntimeFiber as i, type FiberEngineStats as j, type Fiber as k, type FiberId as l, type FiberStatus as m, type WasmBridge as n, type OpcodeProgram as o, type FiberId$1 as p, type EngineEvent as q, type RefId as r, type OpcodeNode as s, type EngineStats as t, type AbortablePromiseFinish as u, type AbortablePromiseLabelStats as v, type AbortablePromiseOptions as w, type AbortablePromiseOutcome as x, type AbortablePromiseStats as y, type AbortablePromiseTimerWheel as z };
|