brass-runtime 1.19.1 → 1.20.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/CHANGELOG.md +68 -0
- package/dist/{chunk-EZ76UNHP.cjs → chunk-62IBGQOU.cjs} +6 -6
- package/dist/{chunk-U42YF6B2.js → chunk-6LF3M4JC.js} +2 -2
- package/dist/{chunk-ID2WOCBA.mjs → chunk-6NXQL3IC.mjs} +642 -46
- package/dist/{chunk-67256TKF.cjs → chunk-BDTBIYAM.cjs} +13 -13
- package/dist/{chunk-22HYIE56.mjs → chunk-D53GY2SZ.mjs} +2 -2
- package/dist/{chunk-LXNU3MRV.cjs → chunk-LA2PAO7J.cjs} +738 -142
- package/dist/{chunk-AITYRQX2.mjs → chunk-OS4F5HZE.mjs} +1 -1
- package/dist/{chunk-IHXF6NQG.js → chunk-POH2WZBI.js} +642 -46
- package/dist/{chunk-XJSWDU2S.js → chunk-VXZIP3IU.js} +1 -1
- package/dist/{defaultClient-hyVSNzSJ.d.ts → defaultClient-DLOa3gdw.d.ts} +101 -3
- package/dist/http/index.cjs +69 -33
- package/dist/http/index.d.ts +67 -4
- package/dist/http/index.js +37 -1
- package/dist/http/index.mjs +37 -1
- package/dist/http/testing.cjs +4 -4
- package/dist/http/testing.d.ts +1 -1
- package/dist/http/testing.js +1 -1
- package/dist/http/testing.mjs +1 -1
- package/dist/observability/index.cjs +3 -3
- package/dist/observability/index.d.ts +3 -3
- package/dist/observability/index.js +2 -2
- package/dist/observability/index.mjs +2 -2
- package/dist/perf/cli.cjs +18 -18
- package/dist/perf/cli.js +3 -3
- package/dist/perf/cli.mjs +3 -3
- package/dist/perf/index.cjs +5 -5
- package/dist/perf/index.js +3 -3
- package/dist/perf/index.mjs +3 -3
- package/dist/{server-BKKuzAW9.d.ts → server-BGXOabjo.d.ts} +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,73 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 1.19.0 - Bare-Metal HTTP Mode
|
|
4
|
+
|
|
5
|
+
### Features
|
|
6
|
+
|
|
7
|
+
- Added `makeBareMetalHttp` factory: a zero-overhead HTTP client that bypasses
|
|
8
|
+
all middleware layers (retry, dedup, cache, batch, priority, compression,
|
|
9
|
+
adaptive limiter, prewarm) and delegates directly to the wire transport.
|
|
10
|
+
Preserves typed errors, cancellation, pool/adaptive-limiter, and stats.
|
|
11
|
+
- Added `makeBareMetalHttpStream` factory: streaming counterpart with the same
|
|
12
|
+
zero-overhead guarantees. Pool leases are released on headers received.
|
|
13
|
+
- Added `preset: "bareMetal"` to `makeDefaultHttpClient` for easy opt-in via
|
|
14
|
+
the standard preset system. DX helpers (get, post, getJson, postJson, getText)
|
|
15
|
+
work identically. Lifecycle config keys are ignored with a construction-time
|
|
16
|
+
warning. User middleware is still applied.
|
|
17
|
+
- Bare-metal clients expose `.with(mw)` escape hatch for composing observability
|
|
18
|
+
without pulling in the full lifecycle stack.
|
|
19
|
+
- Exported `runDirectTransport`, `runPoolTransport`, and related wire-level
|
|
20
|
+
helpers from `src/http/client.ts` for advanced custom client composition.
|
|
21
|
+
|
|
22
|
+
### Usage
|
|
23
|
+
|
|
24
|
+
```typescript
|
|
25
|
+
import { makeBareMetalHttp, makeDefaultHttpClient } from "brass-runtime/http";
|
|
26
|
+
|
|
27
|
+
// Standalone factory
|
|
28
|
+
const client = makeBareMetalHttp({ baseUrl: "https://api.internal" });
|
|
29
|
+
|
|
30
|
+
// Via preset
|
|
31
|
+
const defaultClient = makeDefaultHttpClient({ preset: "bareMetal" });
|
|
32
|
+
|
|
33
|
+
// With custom transport (e.g., Axios adapter)
|
|
34
|
+
const axiosClient = makeBareMetalHttp({ transport: myAxiosTransport });
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
## 1.18.3 - HTTP Pool/Timeout Fast Path
|
|
38
|
+
|
|
39
|
+
### Performance
|
|
40
|
+
|
|
41
|
+
- Connected the non-streaming HTTP wire client to the existing `runPoolTransport`
|
|
42
|
+
fast path whenever a request uses `pool`, `adaptiveLimiter`, or `timeoutMs`.
|
|
43
|
+
The uncontended pool path now uses synchronous `tryAcquireSync` before falling
|
|
44
|
+
back to queued async acquire, avoiding the generic `fromPromiseAbortable`
|
|
45
|
+
wrapper and extra promise/microtask boundaries on hot BFF/proxy paths.
|
|
46
|
+
- Improved local HTTP overhead benchmark results for the proxy effect transport
|
|
47
|
+
path with 30k calls, 5k warmup, concurrency 32:
|
|
48
|
+
- `default-proxy-effect-timeout`: p99 `1.915ms` -> `1.559ms`,
|
|
49
|
+
throughput `70.9k/s` -> `101.5k/s`.
|
|
50
|
+
- `default-proxy-effect-pool`: p99 `1.564ms` -> `1.276ms`,
|
|
51
|
+
throughput `79.2k/s` -> `115.7k/s`.
|
|
52
|
+
- `default-proxy-effect-timeout-pool`: p99 `2.014ms` -> `1.209ms`,
|
|
53
|
+
throughput `70.2k/s` -> `103.1k/s`.
|
|
54
|
+
|
|
55
|
+
### Fixed
|
|
56
|
+
|
|
57
|
+
- Preserved real host-request cancellation on the pool/timeout fast path by
|
|
58
|
+
passing transports a request-scoped `AbortController` signal. Promise
|
|
59
|
+
transports such as Axios can now observe aborts on cancellation and timeout
|
|
60
|
+
while still benefiting from the pool fast path.
|
|
61
|
+
- Added regression coverage ensuring uncontended pool transports run during
|
|
62
|
+
effect registration and that cancellation aborts the signal passed to the
|
|
63
|
+
transport.
|
|
64
|
+
|
|
65
|
+
### Validation
|
|
66
|
+
|
|
67
|
+
- `npm run test:types`
|
|
68
|
+
- `npm test -- src/http/__tests__`
|
|
69
|
+
- `BRASS_HTTP_OVERHEAD_CALLS=30000 BRASS_HTTP_OVERHEAD_WARMUP_CALLS=5000 BRASS_HTTP_OVERHEAD_CONCURRENCY=32 BRASS_HTTP_OVERHEAD_VARIANTS=default-proxy-effect-transport,default-proxy-effect-timeout,default-proxy-effect-pool,default-proxy-effect-timeout-pool npm run benchmark:http:overhead`
|
|
70
|
+
|
|
3
71
|
## 1.18.2 - Release Metadata Alignment
|
|
4
72
|
|
|
5
73
|
### Fixed
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
var _chunkJQCQWO47cjs = require('./chunk-JQCQWO47.cjs');
|
|
5
5
|
|
|
6
6
|
|
|
7
|
-
var
|
|
7
|
+
var _chunkBDTBIYAMcjs = require('./chunk-BDTBIYAM.cjs');
|
|
8
8
|
|
|
9
9
|
|
|
10
10
|
var _chunkZJC3JZIEcjs = require('./chunk-ZJC3JZIE.cjs');
|
|
@@ -14,7 +14,7 @@ var _chunkVXNWVAIGcjs = require('./chunk-VXNWVAIG.cjs');
|
|
|
14
14
|
|
|
15
15
|
|
|
16
16
|
|
|
17
|
-
var
|
|
17
|
+
var _chunkLA2PAO7Jcjs = require('./chunk-LA2PAO7J.cjs');
|
|
18
18
|
|
|
19
19
|
|
|
20
20
|
|
|
@@ -862,24 +862,24 @@ function baseHttpConfig(baseUrl, scenario) {
|
|
|
862
862
|
};
|
|
863
863
|
}
|
|
864
864
|
function makeWireClient(baseUrl, scenario) {
|
|
865
|
-
return
|
|
865
|
+
return _chunkLA2PAO7Jcjs.makeHttp.call(void 0, baseHttpConfig(baseUrl, scenario));
|
|
866
866
|
}
|
|
867
867
|
function makeMinimalClient(baseUrl, scenario) {
|
|
868
|
-
return
|
|
868
|
+
return _chunkLA2PAO7Jcjs.makeDefaultHttpClient.call(void 0, {
|
|
869
869
|
preset: "minimal",
|
|
870
870
|
compression: false,
|
|
871
871
|
...baseHttpConfig(baseUrl, scenario)
|
|
872
872
|
});
|
|
873
873
|
}
|
|
874
874
|
function makeDefaultClient(baseUrl, scenario, preset, disableAdaptiveLimiter, observability) {
|
|
875
|
-
return
|
|
875
|
+
return _chunkLA2PAO7Jcjs.makeDefaultHttpClient.call(void 0, {
|
|
876
876
|
preset,
|
|
877
877
|
compression: false,
|
|
878
878
|
...baseHttpConfig(baseUrl, scenario),
|
|
879
879
|
...disableAdaptiveLimiter ? { adaptiveLimiter: false } : {},
|
|
880
880
|
...observability ? {
|
|
881
881
|
middleware: [
|
|
882
|
-
|
|
882
|
+
_chunkBDTBIYAMcjs.withHttpObservability.call(void 0, {
|
|
883
883
|
metrics: observability.metrics,
|
|
884
884
|
logs: false,
|
|
885
885
|
spans: {},
|
|
@@ -4,7 +4,7 @@ import {
|
|
|
4
4
|
} from "./chunk-RZQK32C6.js";
|
|
5
5
|
import {
|
|
6
6
|
withHttpObservability
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-VXZIP3IU.js";
|
|
8
8
|
import {
|
|
9
9
|
makeObservability
|
|
10
10
|
} from "./chunk-TAPB4NN5.js";
|
|
@@ -14,7 +14,7 @@ import {
|
|
|
14
14
|
import {
|
|
15
15
|
makeDefaultHttpClient,
|
|
16
16
|
makeHttp
|
|
17
|
-
} from "./chunk-
|
|
17
|
+
} from "./chunk-POH2WZBI.js";
|
|
18
18
|
import {
|
|
19
19
|
Runtime,
|
|
20
20
|
Scheduler
|