@fluojs/platform-fastify 1.0.0 → 1.0.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.ko.md CHANGED
@@ -11,6 +11,7 @@ fluo 런타임을 위한 Fastify 기반 HTTP 어댑터 패키지입니다.
11
11
  - [빠른 시작](#빠른-시작)
12
12
  - [주요 패턴](#주요-패턴)
13
13
  - [성능](#성능)
14
+ - [적합성 커버리지](#적합성-커버리지)
14
15
  - [공개 API 개요](#공개-api-개요)
15
16
  - [트러블슈팅](#트러블슈팅)
16
17
  - [관련 패키지](#관련-패키지)
@@ -147,6 +148,12 @@ fluo의 Fastify 어댑터는 높은 동시성 시나리오에서 raw Node.js 어
147
148
 
148
149
  *표준 `/health` 엔드포인트에서 `wrk`를 사용하여 측정되었습니다.*
149
150
 
151
+ ## 적합성 커버리지
152
+
153
+ `packages/platform-fastify/src/adapter.test.ts`는 문서화된 Fastify 어댑터 계약을 위한 package-local regression target입니다. 이 파일은 공유 `createHttpAdapterPortabilityHarness(...)` 검사를 실행하여 malformed cookie 보존, JSON/text raw-body capture, byte-exact raw-body capture, multipart raw-body 제외, multipart total-size 기본값, SSE framing, response stream drain settlement, host 및 HTTPS startup logging, shutdown signal listener cleanup을 확인합니다.
154
+
155
+ 같은 파일은 Fastify 전용 native route registration과 wildcard fallback, duplicate shape route fallback, middleware/guard/interceptor/observer ordering, CORS ownership, global prefix behavior, malformed cookie preservation, response serialization parity, raw-body pre-parsing behavior, multipart limit handling도 함께 다룹니다. startup, routing, adapter portability behavior를 변경할 때는 README 예제 포인터를 이 테스트 파일 및 custom adapter book chapter와 맞추어 유지하세요.
156
+
150
157
  ## 공개 API 개요
151
158
 
152
159
  - `createFastifyAdapter(options)`: Fastify 어댑터를 위한 권장 팩토리입니다.
package/README.md CHANGED
@@ -11,6 +11,7 @@ Fastify-backed HTTP adapter for the fluo runtime.
11
11
  - [Quick Start](#quick-start)
12
12
  - [Common Patterns](#common-patterns)
13
13
  - [Performance](#performance)
14
+ - [Conformance Coverage](#conformance-coverage)
14
15
  - [Public API Overview](#public-api-overview)
15
16
  - [Troubleshooting](#troubleshooting)
16
17
  - [Related Packages](#related-packages)
@@ -147,6 +148,12 @@ fluo's Fastify adapter significantly outperforms the raw Node.js adapter in high
147
148
 
148
149
  *Measured using `wrk` on a standard `/health` endpoint.*
149
150
 
151
+ ## Conformance Coverage
152
+
153
+ `packages/platform-fastify/src/adapter.test.ts` is the package-local regression target for the documented Fastify adapter contract. It runs the shared `createHttpAdapterPortabilityHarness(...)` checks for malformed cookie preservation, JSON/text raw-body capture, byte-exact raw-body capture, multipart raw-body exclusion, multipart total-size defaults, SSE framing, response stream drain settlement, host and HTTPS startup logging, and shutdown signal listener cleanup.
154
+
155
+ The same file also covers Fastify-specific native route registration with wildcard fallback, duplicate shape route fallback, middleware/guard/interceptor/observer ordering, CORS ownership, global prefix behavior, malformed cookie preservation, response serialization parity, raw-body pre-parsing behavior, and multipart limit handling. Keep README example pointers aligned with that test file and the custom adapter book chapter when changing startup, routing, or adapter portability behavior.
156
+
150
157
  ## Public API Overview
151
158
 
152
159
  - `createFastifyAdapter(options)`: Recommended factory for the Fastify adapter.
package/dist/adapter.js CHANGED
@@ -778,6 +778,7 @@ function captureRawBodyPreParsingHook(request, _reply, payload, done) {
778
778
  transform(chunk, _encoding, callback) {
779
779
  const bufferChunk = Buffer.isBuffer(chunk) ? chunk : chunk instanceof Uint8Array ? Buffer.from(chunk) : Buffer.from(String(chunk), 'utf8');
780
780
  chunks.push(bufferChunk);
781
+ capture.receivedEncodedLength += bufferChunk.byteLength;
781
782
  callback(null, chunk);
782
783
  },
783
784
  flush(callback) {
@@ -787,6 +788,7 @@ function captureRawBodyPreParsingHook(request, _reply, payload, done) {
787
788
  callback();
788
789
  }
789
790
  });
791
+ capture.receivedEncodedLength = 0;
790
792
  payload.on('error', error => {
791
793
  capture.destroy(error);
792
794
  });
package/package.json CHANGED
@@ -8,7 +8,7 @@
8
8
  "platform",
9
9
  "server"
10
10
  ],
11
- "version": "1.0.0",
11
+ "version": "1.0.1",
12
12
  "private": false,
13
13
  "license": "MIT",
14
14
  "repository": {
@@ -39,11 +39,12 @@
39
39
  "fastify": "^5.8.5",
40
40
  "fastify-raw-body": "^5.0.0",
41
41
  "@fluojs/http": "^1.0.0",
42
- "@fluojs/runtime": "^1.0.0"
42
+ "@fluojs/runtime": "^1.0.1"
43
43
  },
44
44
  "devDependencies": {
45
45
  "vitest": "^3.2.4",
46
- "@fluojs/di": "^1.0.0"
46
+ "@fluojs/di": "^1.0.1",
47
+ "@fluojs/testing": "^1.0.1"
47
48
  },
48
49
  "scripts": {
49
50
  "prebuild": "node ../../tooling/scripts/clean-dist.mjs",