@fluojs/runtime 1.1.8 → 2.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
@@ -108,6 +108,12 @@ const app = await fluoFactory.create(AppModule, {
108
108
  });
109
109
  ```
110
110
 
111
+ ### Framework-managed response와 handler-owned response
112
+
113
+ 일반 request path는 framework-managed 방식입니다. Handler가 값을 반환하면 interceptor가 그 값을 변환할 수 있고, runtime response writer가 최종 결과를 commit합니다. `@fluojs/serialization`의 `SerializerInterceptor`가 반환 DTO에 적용되는 경로도 이 경로입니다.
114
+
115
+ 고급 handler는 `RequestContext.response.send(...)`, `redirect(...)`, 또는 수동 streaming helper를 호출해 response ownership을 직접 가질 수 있습니다. Response가 commit되면 `SerializerInterceptor`는 등록된 경우 serialization을 우회하고 `next.handle()`에서 받은 값을 그대로 반환합니다. 이 동작이 chain 결과를 고정하지는 않으므로 다른 interceptor는 chain 결과를 계속 변환할 수 있습니다. 이와 별개로 dispatcher는 commit된 response를 확인하고 두 번째 success-response write를 건너뛰므로 최종 interceptor-chain 결과를 쓰지 않습니다. 따라서 직접 응답을 쓰는 코드는 commit 전에 안전한 최종 payload를 만들어야 하며 serializer가 이후에 형태를 바꿀 수 없습니다.
116
+
111
117
  ### 모듈 구성
112
118
 
113
119
  fluo는 엄격한 모듈 그래프를 사용합니다. 모듈은 다른 모듈에서 사용할 프로바이더를 `export`를 통해 명시적으로 공개해야 합니다.
@@ -136,6 +142,7 @@ class UsersModule {}
136
142
  - `ApplicationContext.get()`과 `Application.get()`은 bootstrap 시점에 알려진 직접 root singleton class/factory provider 조회만 memoize하며, alias, request, transient, 종료 이후, multi-provider, `container.override()` 해석 의미는 그대로 유지합니다.
137
143
  - `multi: true` provider token은 context cache에 memoize되지 않습니다. 각 `get()` 호출은 DI로 위임되어 컨테이너가 새로운 contribution 배열을 조립하며, 각 contribution 자체는 해당 provider scope에 따라 재사용됩니다.
138
144
  - `duplicateProviderPolicy`가 `warn` 또는 `ignore`일 때 context cache 적격성과 lifecycle hook 실행은 bootstrap이 선택한 effective winning provider를 기준으로 결정됩니다. stale losing provider는 cache entry나 lifecycle hook을 만들지 않습니다.
145
+ - 모듈 그래프 컴파일은 cache key 생성이나 visibility 순회 전에 runtime provider와 `@Module(...)` provider 선언을 DI의 canonical normalization으로 검증합니다. 따라서 잘못된 `inject` 값, dependency wrapper/token, scope는 순회 단계 고유 오류를 노출하지 않고 `InvalidProviderError`로 실패합니다.
139
146
  - 애플리케이션 또는 컨텍스트 bootstrap이 런타임 리소스나 lifecycle instance 생성 이후 실패하면 fluo는 readiness를 초기화하고, 등록된 runtime cleanup callback을 실행하며, 그 시점까지 해석된 instance의 shutdown hook을 `bootstrap-failed`로 호출하고, 컨테이너를 dispose하고, cleanup 실패를 로그로 남긴 뒤 원래 bootstrap error를 다시 던집니다.
140
147
  - `Application.listen()`과 microservice `listen()`은 shutdown과 직렬화됩니다. 겹치는 startup 호출은 같은 in-flight startup을 공유하고, shutdown은 진행 중인 startup이 끝날 때까지 기다리며, shutdown과 경합한 startup은 close 시작 이후 shell을 다시 `ready`로 전이할 수 없습니다.
141
148
  - 종료 시그널 등록 실패는 사용자가 관찰할 수 있습니다. `runNodeApplication(...)`, `bootstrapNodeApplication(...)`, adapter 소유 runtime helper는 이미 시작된 애플리케이션을 `bootstrap-failed`로 닫고, close 실패가 있으면 별도로 로그로 남기며, 원래 registration error로 reject합니다.
@@ -144,8 +151,10 @@ class UsersModule {}
144
151
  - `FluoFactory.createMicroservice()`는 cleanup이 실패해도 원래 bootstrap/runtime 해석 오류를 보존하고 cleanup 실패는 별도로 로그로 남깁니다.
145
152
  - Bootstrap은 독립적인 singleton lifecycle provider를 병렬로 해석한 뒤 lifecycle hook은 결정적인 provider 순서대로 실행합니다.
146
153
  - 멀티파트 파싱은 누적 바디 크기가 설정된 `multipart.maxTotalSize`를 넘으면 즉시 거부되며, 런타임 어댑터는 별도 재정의가 없으면 이 한도를 `maxBodySize`와 동일하게 맞춥니다.
154
+ - `@fluojs/runtime/web` 멀티파트 파싱은 Node.js `Buffer` global 없이 Web 표준 `TextEncoder`와 `Uint8Array` primitive만 사용합니다. 업로드 파일의 `buffer` 값은 `Uint8Array`이며, Node 전용 consumer는 애플리케이션 경계에서 `Buffer.from(file.buffer)`로 명시적으로 변환할 수 있습니다.
147
155
  - `createNodeHttpAdapter(...)`, `bootstrapNodeApplication(...)`, `runNodeApplication(...)`는 `maxBodySize`를 0 이상의 정수 바이트 수로만 받으며, 값이 잘못되면 어댑터 생성/부트스트랩 단계에서 즉시 실패합니다.
148
156
  - 응답 스트림 백프레셔 헬퍼는 `drain`, `close`, `error` 중 어느 경우에도 `waitForDrain()`을 완료시켜 끊어진 연결에서 스트리밍 작성기가 멈추지 않도록 합니다.
157
+ - HTTP response writing은 단일 owner를 가집니다. Framework-managed handler 결과는 runtime이 commit하기 전에 interceptor가 변환할 수 있습니다. Handler나 response helper가 `RequestContext.response`를 commit한 뒤에는 dispatcher가 두 번째 success-response write를 건너뜁니다. `SerializerInterceptor`는 serialization을 우회하고 `next.handle()`에서 받은 값을 그대로 반환하지만, 다른 interceptor는 chain 결과를 계속 변환할 수 있습니다.
149
158
  - 런타임 health 모듈은 bootstrap이 ready로 표시하기 전까지 `/ready`를 HTTP 503과 `starting`으로 보고하며, 애플리케이션/컨텍스트 종료가 시작되는 즉시, 종료 시도가 실패하더라도 다시 `starting`으로 내려갑니다.
150
159
  - 런타임 health module readiness check는 현재 `RequestContext`를 받으므로, public integration이 internal runtime token을 import하지 않고도 runtime-exposed status provider를 해석할 수 있습니다.
151
160
  - 시그널 기반 종료 헬퍼는 bounded drain semantics를 유지하면서 timeout/실패 상황을 로그와 `process.exitCode`로 보고하지만, 최종 프로세스 종료 소유권은 주변 호스트 런타임에 남겨 둡니다.
@@ -155,6 +164,7 @@ class UsersModule {}
155
164
  - 플랫폼 component snapshot은 런타임 소유 계약 payload입니다. 각 component는 `readiness`, `health`, dependency id, telemetry tag, diagnostic issue, 그리고 `ownership.ownsResources` / `ownership.externallyManaged`를 통해 리소스 소유권을 보고합니다. Runtime은 shell snapshot에서 이 ownership flag를 보존하므로 adapter와 package integration이 fluo가 종료해야 하는 리소스와 host가 소유한 외부 관리 리소스를 구분할 수 있습니다.
156
165
  - 모듈 그래프 컴파일 결과 캐시는 `moduleGraphCache: true`를 통한 opt-in입니다. 캐시 항목은 root module identity, runtime provider, validation token, module replacement pair, core metadata version, compile algorithm version으로 식별되며, 성공한 컴파일만 저장하고 호출자 mutation이 이후 bootstrap을 오염시키지 않도록 격리된 그래프 복사본을 반환합니다.
157
166
  - `moduleReplacements`는 `bootstrapModule(...)` / `BootstrapModuleOptions`의 저수준 testing seam입니다. 원래 logical module identity를 보존하면서 replacement module metadata로 컴파일하고, replacement cycle은 일반 module graph validation 경로에서 거부하며, source module metadata를 mutate하지 않습니다.
167
+ - `raceWithAbort(fn, signal)`은 `fn`이 settle된 후 항상 abort listener를 제거합니다. `fn`이 promise를 반환하기 전에 동기적으로 throw하는 경우도 포함합니다. 동기 throw는 settled rejection으로 변환되어 cleanup-dependent `finally` flow가 여전히 실행되고, 반복된 실패 작업에서 listener가 leak되지 않습니다.
158
168
 
159
169
  ## 공개 API 개요
160
170
 
@@ -163,8 +173,9 @@ class UsersModule {}
163
173
  - `Application`: `ApplicationContext`를 확장하며 `listen()`, `dispatch()`, `state`를 포함합니다.
164
174
  - `ApplicationContext`: `get<T>(token)`, `close()` 기능을 제공하며 `container`, `modules`, bootstrap diagnostics에 접근할 수 있습니다.
165
175
  - `LifecycleHooks`: `OnModuleInit`, `OnApplicationBootstrap`, `OnModuleDestroy`, `OnApplicationShutdown`를 묶는 편의 union 타입입니다.
166
- - `HealthModule.forRoot(options)`: bootstrap 및 shutdown 라이프사이클 전이에 맞춰 readiness marker를 관리하는 런타임 소유 `/health`, `/ready` 모듈 파사드입니다.
176
+ - `HealthModule.forRoot(options)`: bootstrap 및 shutdown 라이프사이클 전이에 맞춰 readiness marker를 관리하는 런타임 소유 `/health`, `/ready` 모듈 파사드입니다. `RuntimeHealthModule`을 반환하므로 first-party runtime-aware package가 internal runtime seam을 import하지 않고 `ReadinessCheck` function을 등록할 수 있습니다.
167
177
  - `createHealthModule(options)`: 같은 런타임 health module 계약을 위한 deprecated compatibility helper입니다. 애플리케이션-facing module import에서는 `HealthModule.forRoot(...)`를 우선 사용하세요.
178
+ - `RuntimeHealthModule`: `HealthModule.forRoot(...)`가 반환하는 module class contract이며 `addReadinessCheck(...)`, `markReady()`, `markStarting()`을 포함합니다.
168
179
  - `ReadinessCheck`: runtime health module이 사용하는 function type입니다. Check는 `/ready` request context를 받고 boolean 또는 promise를 반환합니다.
169
180
  - `defineModule(cls, metadata)`: 프로그래밍 방식의 모듈 정의 헬퍼입니다.
170
181
  - `bootstrapApplication(options)`: 저수준 비동기 부트스트랩 함수입니다.
@@ -172,6 +183,7 @@ class UsersModule {}
172
183
  - `createBootstrapTimingDiagnostics(...)`, `createRuntimeDiagnosticsGraph(...)`: CLI/support tooling을 위한 runtime 소유 diagnostics snapshot helper입니다. 이 helper들은 기계 읽기 가능한 데이터를 생산하며, Studio가 viewer parsing, graph presentation, Mermaid rendering을 소유합니다.
173
184
  - `PlatformShell`, `PlatformComponent`, `PlatformShellSnapshot`, `PlatformSnapshot`, `PlatformDiagnosticIssue` 및 관련 platform report 타입: runtime-aware package가 사용하는 공개 lifecycle diagnostics 및 resource-ownership 계약입니다. `RuntimePlatformShell`은 component가 제공한 ownership을 보존하고, consumer가 internal runtime token을 import하지 않아도 validation/readiness/health diagnostics를 내보냅니다.
174
185
  - `createRequestAbortContext(...)`, `trackActiveRequestTransaction(...)`, `untrackActiveRequestTransaction(...)`: runtime-aware integration이 사용하는 request abort 및 active transaction helper입니다.
186
+ - `UploadedFile`: 메모리 내 `buffer` payload를 Web 표준 `Uint8Array`로 제공하는 runtime-neutral 멀티파트 파일 descriptor입니다.
175
187
 
176
188
  ## 플랫폼 전용 서브경로
177
189
 
@@ -233,6 +245,7 @@ const jsonLogger = createJsonApplicationLogger();
233
245
  - [@fluojs/core](../core): 핵심 데코레이터 및 메타데이터 시스템.
234
246
  - [@fluojs/di](../di): 의존성 주입(DI) 컨테이너 구현체.
235
247
  - [@fluojs/http](../http): HTTP 라우팅, 컨트롤러 및 디스패처.
248
+ - [@fluojs/serialization](../serialization): Framework-managed 상태로 아직 commit되지 않은 HTTP handler 결과를 decorator metadata에 따라 shaping합니다.
236
249
  - [@fluojs/platform-nodejs](../platform-nodejs): 공식 Node.js HTTP 어댑터.
237
250
  - [@fluojs/studio](../studio): 런타임이 생산한 snapshot과 diagnostic issue를 위한 viewer, filtering, rendering helper.
238
251
 
package/README.md CHANGED
@@ -108,6 +108,12 @@ const app = await fluoFactory.create(AppModule, {
108
108
  });
109
109
  ```
110
110
 
111
+ ### Framework-Managed and Handler-Owned Responses
112
+
113
+ The normal request path is framework-managed: a handler returns a value, interceptors may transform it, and the runtime response writer commits it. This is the path where `@fluojs/serialization` can apply `SerializerInterceptor` to a returned DTO.
114
+
115
+ Advanced handlers can instead take response ownership by calling `RequestContext.response.send(...)`, `redirect(...)`, or a manual streaming helper. Once that response is committed, `SerializerInterceptor`, when present, bypasses serialization and returns the value it received from `next.handle()` unchanged. This does not freeze the chain result: other interceptors may still transform it. Independently, the dispatcher sees the committed response and skips a second success-response write, so it does not write the final interceptor-chain result. Direct response code must therefore produce the final safe payload before committing; a serializer cannot reshape it afterward.
116
+
111
117
  ### Module Composition
112
118
 
113
119
  fluo uses a strict module graph. Modules must explicitly `export` providers to make them available to `importing` modules.
@@ -136,6 +142,7 @@ class UsersModule {}
136
142
  - `ApplicationContext.get()` and `Application.get()` memoize only direct root singleton class/factory provider lookups known at bootstrap, while preserving alias, request, transient, post-close, multi-provider, and `container.override()` resolution semantics.
137
143
  - `multi: true` provider tokens are not context-cache memoized: each `get()` call delegates to DI so the container can assemble a fresh contribution array while still reusing each contribution according to its own provider scope.
138
144
  - When `duplicateProviderPolicy` is `warn` or `ignore`, context-cache eligibility and lifecycle hook execution are based on the effective winning provider selected by bootstrap; stale losing providers do not seed cache entries or lifecycle hooks.
145
+ - Module graph compilation validates runtime and `@Module(...)` provider declarations through DI's canonical normalization before cache-key generation or visibility traversal. Malformed `inject` values, dependency wrappers/tokens, and scopes therefore fail with `InvalidProviderError` instead of leaking traversal-specific errors.
139
146
  - If application or context bootstrap fails after runtime resources or lifecycle instances have been created, fluo resets readiness, runs registered runtime cleanup callbacks, invokes shutdown hooks for instances resolved so far with `bootstrap-failed`, disposes the container, logs cleanup failures, and rethrows the original bootstrap error.
140
147
  - `Application.listen()` and microservice `listen()` are serialized with shutdown: overlapping startup calls share the same in-flight startup, shutdown waits for in-flight startup to settle, and a startup that races with shutdown cannot transition the shell back to `ready` after close begins.
141
148
  - Shutdown signal registration failures are user-observable: `runNodeApplication(...)`, `bootstrapNodeApplication(...)`, and adapter-owned runtime helpers close the already-started application with `bootstrap-failed`, log any close failure separately, and reject with the original registration error.
@@ -144,8 +151,10 @@ class UsersModule {}
144
151
  - `FluoFactory.createMicroservice()` preserves the original bootstrap/runtime-resolution error when cleanup fails and logs cleanup failures separately.
145
152
  - Bootstrap resolves independent singleton lifecycle providers concurrently, then runs lifecycle hooks in deterministic provider order.
146
153
  - Multipart parsing rejects payloads when the cumulative body size exceeds the configured `multipart.maxTotalSize`; runtime adapters default that limit to `maxBodySize` unless you override it.
154
+ - `@fluojs/runtime/web` multipart parsing uses Web-standard `TextEncoder` and `Uint8Array` primitives without requiring the Node.js `Buffer` global. Uploaded file `buffer` values are `Uint8Array`; Node-only consumers can convert them explicitly with `Buffer.from(file.buffer)` at their application boundary.
147
155
  - `createNodeHttpAdapter(...)`, `bootstrapNodeApplication(...)`, and `runNodeApplication(...)` accept `maxBodySize` only as a non-negative integer byte count and fail fast during adapter creation/bootstrap when the value is invalid.
148
156
  - Response stream backpressure helpers settle `waitForDrain()` on `drain`, `close`, or `error` so streaming writers do not hang on dead connections.
157
+ - HTTP response writing is single-owner: framework-managed handler results may be transformed by interceptors before the runtime commits them. Once a handler or response helper commits `RequestContext.response`, the dispatcher skips a second success-response write. `SerializerInterceptor` bypasses serialization and returns the value it received from `next.handle()` unchanged, while other interceptors may still transform the chain result.
149
158
  - Runtime health modules report `/ready` as `starting` with HTTP 503 until bootstrap marks them ready, and they return to `starting` as soon as application/context shutdown begins, including failed shutdown attempts.
150
159
  - Runtime health module readiness checks receive the current `RequestContext`, allowing public integrations to resolve runtime-exposed status providers without importing internal runtime tokens.
151
160
  - Signal-driven shutdown helpers preserve bounded drain semantics, log timeout/failure conditions, and set `process.exitCode` when shutdown does not finish cleanly, but they leave final process termination ownership to the surrounding host runtime.
@@ -155,6 +164,7 @@ class UsersModule {}
155
164
  - Platform component snapshots are runtime-owned contract payloads: each component reports `readiness`, `health`, dependency ids, telemetry tags, diagnostic issues, and resource ownership through `ownership.ownsResources` / `ownership.externallyManaged`. Runtime preserves those ownership flags in shell snapshots so adapters and package integrations can distinguish resources fluo must stop from externally managed resources the host owns.
156
165
  - Module graph compile-result caching is opt-in through `moduleGraphCache: true`; it keys entries by root module identity, runtime providers, validation tokens, module replacement pairs, core metadata versions, and the compile algorithm version, caches only successful compilations, and returns isolated graph copies so caller mutations cannot poison later bootstraps.
157
166
  - `moduleReplacements` is a low-level testing seam on `bootstrapModule(...)` / `BootstrapModuleOptions`. It compiles replacement module metadata while preserving the original logical module identity, rejects replacement cycles through the normal module graph validation path, and does not mutate source module metadata.
167
+ - `raceWithAbort(fn, signal)` always removes its abort listener once `fn` settles, including when `fn` throws synchronously before returning a promise. The synchronous throw is converted into a settled rejection so the cleanup-dependent `finally` flow still runs and the listener is not leaked across repeated failed operations.
158
168
 
159
169
  ## Public API Overview
160
170
 
@@ -163,8 +173,9 @@ class UsersModule {}
163
173
  - `Application`: Extends `ApplicationContext` with `listen()`, `dispatch()`, and `state`.
164
174
  - `ApplicationContext`: Provides `get<T>(token)`, `close()`, and access to `container`, `modules`, and bootstrap diagnostics.
165
175
  - `LifecycleHooks`: Convenience union covering `OnModuleInit`, `OnApplicationBootstrap`, `OnModuleDestroy`, and `OnApplicationShutdown`.
166
- - `HealthModule.forRoot(options)`: Runtime-owned `/health` and `/ready` module facade whose readiness marker follows bootstrap and shutdown lifecycle transitions.
176
+ - `HealthModule.forRoot(options)`: Runtime-owned `/health` and `/ready` module facade whose readiness marker follows bootstrap and shutdown lifecycle transitions. It returns a `RuntimeHealthModule` so first-party runtime-aware packages can register `ReadinessCheck` functions without importing internal runtime seams.
167
177
  - `createHealthModule(options)`: Deprecated compatibility helper for the same runtime health module contract; prefer `HealthModule.forRoot(...)` in application-facing module imports.
178
+ - `RuntimeHealthModule`: Module class contract returned by `HealthModule.forRoot(...)`, including `addReadinessCheck(...)`, `markReady()`, and `markStarting()`.
168
179
  - `ReadinessCheck`: Function type used by runtime health modules. Checks receive the `/ready` request context and return a boolean or promise.
169
180
  - `defineModule(cls, metadata)`: Programmatic module definition helper.
170
181
  - `bootstrapApplication(options)`: Lower-level async bootstrap function.
@@ -172,6 +183,7 @@ class UsersModule {}
172
183
  - `createBootstrapTimingDiagnostics(...)`, `createRuntimeDiagnosticsGraph(...)`: Runtime-owned diagnostics snapshot helpers for CLI/support tooling. They produce machine-readable data; Studio owns viewer parsing, graph presentation, and Mermaid rendering.
173
184
  - `PlatformShell`, `PlatformComponent`, `PlatformShellSnapshot`, `PlatformSnapshot`, `PlatformDiagnosticIssue`, and related platform report types: Public lifecycle diagnostics and resource-ownership contracts used by runtime-aware packages. `RuntimePlatformShell` preserves component-provided ownership and emits validation/readiness/health diagnostics without requiring consumers to import internal runtime tokens.
174
185
  - `createRequestAbortContext(...)`, `trackActiveRequestTransaction(...)`, `untrackActiveRequestTransaction(...)`: Request abort and active transaction helpers used by runtime-aware integrations.
186
+ - `UploadedFile`: Runtime-neutral multipart file descriptor whose in-memory `buffer` payload is a Web-standard `Uint8Array`.
175
187
 
176
188
  ## Platform-Specific Subpaths
177
189
 
@@ -233,6 +245,7 @@ Lower-level Node compression internals stay behind the `@fluojs/runtime/internal
233
245
  - [@fluojs/core](../core): Core decorators and metadata system.
234
246
  - [@fluojs/di](../di): Dependency injection container implementation.
235
247
  - [@fluojs/http](../http): HTTP routing, controllers, and dispatcher.
248
+ - [@fluojs/serialization](../serialization): Decorator-aware shaping for framework-managed, uncommitted HTTP handler results.
236
249
  - [@fluojs/platform-nodejs](../platform-nodejs): Official Node.js HTTP adapter.
237
250
  - [@fluojs/studio](../studio): Viewer, filtering, and rendering helpers for runtime-produced snapshots and diagnostic issues.
238
251
 
package/dist/abort.d.ts CHANGED
@@ -3,10 +3,15 @@
3
3
  * Rejects immediately if the signal is already aborted, or rejects as soon
4
4
  * as the signal fires while `fn` is still pending.
5
5
  *
6
+ * The abort listener is always removed once `fn` settles, including when
7
+ * `fn` throws synchronously before returning a promise. The synchronous
8
+ * throw is converted into a settled rejection so the cleanup-dependent
9
+ * `finally` flow still runs.
10
+ *
6
11
  * @param fn Async operation to execute while observing the abort signal.
7
12
  * @param signal Abort signal that can cancel the in-flight operation.
8
13
  * @returns The resolved value from `fn` when no abort happens first.
9
- * @throws {Error} An `AbortError` when the signal is already aborted or aborts before `fn` settles.
14
+ * @throws {Error} An `AbortError` when the signal is already aborted or aborts before `fn` settles. Re-throws the original error when `fn` throws synchronously.
10
15
  */
11
16
  export declare function raceWithAbort<T>(fn: () => Promise<T>, signal: AbortSignal): Promise<T>;
12
17
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"abort.d.ts","sourceRoot":"","sources":["../src/abort.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AACH,wBAAsB,aAAa,CAAC,CAAC,EAAE,EAAE,EAAE,MAAM,OAAO,CAAC,CAAC,CAAC,EAAE,MAAM,EAAE,WAAW,GAAG,OAAO,CAAC,CAAC,CAAC,CAgB5F;AAED;;;;;GAKG;AACH,wBAAgB,gBAAgB,CAAC,MAAM,EAAE,OAAO,GAAG,KAAK,CAKvD"}
1
+ {"version":3,"file":"abort.d.ts","sourceRoot":"","sources":["../src/abort.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AACH,wBAAsB,aAAa,CAAC,CAAC,EAAE,EAAE,EAAE,MAAM,OAAO,CAAC,CAAC,CAAC,EAAE,MAAM,EAAE,WAAW,GAAG,OAAO,CAAC,CAAC,CAAC,CA2B5F;AAED;;;;;GAKG;AACH,wBAAgB,gBAAgB,CAAC,MAAM,EAAE,OAAO,GAAG,KAAK,CAKvD"}
package/dist/abort.js CHANGED
@@ -3,10 +3,15 @@
3
3
  * Rejects immediately if the signal is already aborted, or rejects as soon
4
4
  * as the signal fires while `fn` is still pending.
5
5
  *
6
+ * The abort listener is always removed once `fn` settles, including when
7
+ * `fn` throws synchronously before returning a promise. The synchronous
8
+ * throw is converted into a settled rejection so the cleanup-dependent
9
+ * `finally` flow still runs.
10
+ *
6
11
  * @param fn Async operation to execute while observing the abort signal.
7
12
  * @param signal Abort signal that can cancel the in-flight operation.
8
13
  * @returns The resolved value from `fn` when no abort happens first.
9
- * @throws {Error} An `AbortError` when the signal is already aborted or aborts before `fn` settles.
14
+ * @throws {Error} An `AbortError` when the signal is already aborted or aborts before `fn` settles. Re-throws the original error when `fn` throws synchronously.
10
15
  */
11
16
  export async function raceWithAbort(fn, signal) {
12
17
  if (signal.aborted) {
@@ -19,7 +24,18 @@ export async function raceWithAbort(fn, signal) {
19
24
  signal.addEventListener('abort', onAbort, {
20
25
  once: true
21
26
  });
22
- Promise.resolve(fn()).then(resolve, reject).finally(() => {
27
+
28
+ // Convert `fn()` invocation into a settled promise so a synchronous
29
+ // throw still flows through the `finally` cleanup that removes the
30
+ // abort listener. `Promise.resolve()` only wraps an already-produced
31
+ // value; it does not catch a throw emitted while `fn()` is invoked.
32
+ let fnResultPromise;
33
+ try {
34
+ fnResultPromise = Promise.resolve(fn());
35
+ } catch (syncError) {
36
+ fnResultPromise = Promise.reject(syncError);
37
+ }
38
+ fnResultPromise.then(resolve, reject).finally(() => {
23
39
  signal.removeEventListener('abort', onAbort);
24
40
  });
25
41
  });
@@ -1 +1 @@
1
- {"version":3,"file":"bootstrap.d.ts","sourceRoot":"","sources":["../src/bootstrap.ts"],"names":[],"mappings":"AA2BA,OAAO,KAAK,EACV,kBAAkB,EAClB,WAAW,EAEX,uBAAuB,EAGvB,2BAA2B,EAC3B,sBAAsB,EACtB,eAAe,EAGf,wBAAwB,EACxB,+BAA+B,EAC/B,yBAAyB,EAEzB,gBAAgB,EAChB,UAAU,EAMX,MAAM,YAAY,CAAC;AA6dpB;;;;;;GAMG;AACH,wBAAgB,YAAY,CAAC,CAAC,SAAS,UAAU,EAAE,UAAU,EAAE,CAAC,EAAE,UAAU,EAAE,gBAAgB,GAAG,CAAC,CAIjG;AAED;;;;;;;;GAQG;AACH,wBAAgB,eAAe,CAAC,UAAU,EAAE,UAAU,EAAE,OAAO,GAAE,sBAA2B,GAAG,eAAe,CA+B7G;AAo0BD;;;;;;;GAOG;AACH,wBAAsB,oBAAoB,CAAC,OAAO,EAAE,2BAA2B,GAAG,OAAO,CAAC,WAAW,CAAC,CAiJrG;AAED;;GAEG;AACH,qBAAa,WAAW;IACtB;;;;;;;OAOG;WACU,MAAM,CAAC,UAAU,EAAE,UAAU,EAAE,OAAO,GAAE,wBAA6B,GAAG,OAAO,CAAC,WAAW,CAAC;IAOzG;;;;;;;OAOG;WACU,wBAAwB,CACnC,UAAU,EAAE,UAAU,EACtB,OAAO,GAAE,+BAAoC,GAC5C,OAAO,CAAC,kBAAkB,CAAC;IAwH9B;;;;;;;;OAQG;WACU,kBAAkB,CAC7B,UAAU,EAAE,UAAU,EACtB,OAAO,GAAE,yBAA8B,GACtC,OAAO,CAAC,uBAAuB,CAAC;CA+BpC;AAED;;;;;;;;;GASG;AACH,eAAO,MAAM,WAAW,oBAAc,CAAC"}
1
+ {"version":3,"file":"bootstrap.d.ts","sourceRoot":"","sources":["../src/bootstrap.ts"],"names":[],"mappings":"AA2BA,OAAO,KAAK,EACV,kBAAkB,EAClB,WAAW,EAEX,uBAAuB,EAGvB,2BAA2B,EAC3B,sBAAsB,EACtB,eAAe,EAGf,wBAAwB,EACxB,+BAA+B,EAC/B,yBAAyB,EAEzB,gBAAgB,EAChB,UAAU,EAMX,MAAM,YAAY,CAAC;AA6dpB;;;;;;GAMG;AACH,wBAAgB,YAAY,CAAC,CAAC,SAAS,UAAU,EAAE,UAAU,EAAE,CAAC,EAAE,UAAU,EAAE,gBAAgB,GAAG,CAAC,CAIjG;AAED;;;;;;;;GAQG;AACH,wBAAgB,eAAe,CAAC,UAAU,EAAE,UAAU,EAAE,OAAO,GAAE,sBAA2B,GAAG,eAAe,CA+B7G;AA20BD;;;;;;;GAOG;AACH,wBAAsB,oBAAoB,CAAC,OAAO,EAAE,2BAA2B,GAAG,OAAO,CAAC,WAAW,CAAC,CAiJrG;AAED;;GAEG;AACH,qBAAa,WAAW;IACtB;;;;;;;OAOG;WACU,MAAM,CAAC,UAAU,EAAE,UAAU,EAAE,OAAO,GAAE,wBAA6B,GAAG,OAAO,CAAC,WAAW,CAAC;IAOzG;;;;;;;OAOG;WACU,wBAAwB,CACnC,UAAU,EAAE,UAAU,EACtB,OAAO,GAAE,+BAAoC,GAC5C,OAAO,CAAC,kBAAkB,CAAC;IAwH9B;;;;;;;;OAQG;WACU,kBAAkB,CAC7B,UAAU,EAAE,UAAU,EACtB,OAAO,GAAE,yBAA8B,GACtC,OAAO,CAAC,uBAAuB,CAAC;CA+BpC;AAED;;;;;;;;;GASG;AACH,eAAO,MAAM,WAAW,oBAAc,CAAC"}
package/dist/bootstrap.js CHANGED
@@ -863,9 +863,10 @@ async function runShutdownHooks(instances, signal) {
863
863
  }
864
864
  }
865
865
  function createHandlerSources(modules) {
866
+ const globalModules = modules.filter(compiledModule => compiledModule.definition.global);
866
867
  return modules.flatMap(compiledModule => (compiledModule.definition.controllers ?? []).map(controllerToken => ({
867
868
  controllerToken,
868
- moduleMiddleware: compiledModule.definition.middleware ?? [],
869
+ moduleMiddleware: [...globalModules.filter(globalModule => globalModule !== compiledModule).flatMap(globalModule => globalModule.definition.middleware ?? []), ...(compiledModule.definition.middleware ?? [])],
869
870
  moduleType: compiledModule.type
870
871
  })));
871
872
  }
@@ -29,6 +29,16 @@ export interface HealthModuleOptions {
29
29
  * Defines the readiness check type.
30
30
  */
31
31
  export type ReadinessCheck = (ctx: import('@fluojs/http').RequestContext) => boolean | Promise<boolean>;
32
+ /** Runtime-owned health module class returned by `HealthModule.forRoot(...)`. */
33
+ export interface RuntimeHealthModule extends ModuleType {
34
+ readonly name: string;
35
+ /** Register an additional readiness predicate for the module-owned `/ready` route. */
36
+ addReadinessCheck(fn: ReadinessCheck): void;
37
+ /** Mark the module-owned `/ready` route as ready after bootstrap completes. */
38
+ markReady(): void;
39
+ /** Mark the module-owned `/ready` route as starting before or during shutdown. */
40
+ markStarting(): void;
41
+ }
32
42
  /**
33
43
  * Runtime health module facade for application module imports.
34
44
  */
@@ -39,7 +49,7 @@ export declare class HealthModule {
39
49
  * @param options Runtime health endpoint options.
40
50
  * @returns A module class that can be imported into an application module.
41
51
  */
42
- static forRoot(options?: HealthModuleOptions): ModuleType;
52
+ static forRoot(options?: HealthModuleOptions): RuntimeHealthModule;
43
53
  }
44
54
  /**
45
55
  * Creates a runtime-owned `/health` and `/ready` module.
@@ -48,5 +58,5 @@ export declare class HealthModule {
48
58
  * @param options Runtime health endpoint options.
49
59
  * @returns A module class that can be imported into an application module.
50
60
  */
51
- export declare function createHealthModule(options?: HealthModuleOptions): ModuleType;
61
+ export declare function createHealthModule(options?: HealthModuleOptions): RuntimeHealthModule;
52
62
  //# sourceMappingURL=health.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"health.d.ts","sourceRoot":"","sources":["../../src/health/health.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AAE9C;;GAEG;AACH,MAAM,WAAW,YAAY;IAC3B,MAAM,EAAE,IAAI,GAAG,aAAa,CAAC;CAC9B;AA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,EAAE,CAAC,GAAG,EAAE,OAAO,cAAc,EAAE,cAAc,KACrD,YAAY,GACZ,mBAAmB,GACnB,OAAO,CAAC,YAAY,GAAG,mBAAmB,CAAC,CAAC;IAChD,IAAI,CAAC,EAAE,MAAM,CAAC;CACf;AAED;;GAEG;AACH,MAAM,MAAM,cAAc,GAAG,CAAC,GAAG,EAAE,OAAO,cAAc,EAAE,cAAc,KAAK,OAAO,GAAG,OAAO,CAAC,OAAO,CAAC,CAAC;AAExG,iFAAiF;AACjF,MAAM,WAAW,mBAAoB,SAAQ,UAAU;IACrD,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,sFAAsF;IACtF,iBAAiB,CAAC,EAAE,EAAE,cAAc,GAAG,IAAI,CAAC;IAC5C,+EAA+E;IAC/E,SAAS,IAAI,IAAI,CAAC;IAClB,kFAAkF;IAClF,YAAY,IAAI,IAAI,CAAC;CACtB;AAkFD;;GAEG;AACH,qBAAa,YAAY;IACvB;;;;;OAKG;IACH,MAAM,CAAC,OAAO,CAAC,OAAO,GAAE,mBAAwB,GAAG,mBAAmB;CAGvE;AAED;;;;;;GAMG;AACH,wBAAgB,kBAAkB,CAAC,OAAO,GAAE,mBAAwB,GAAG,mBAAmB,CAEzF"}
@@ -26,6 +26,8 @@ import { defineModule } from '../bootstrap.js';
26
26
  * Defines the readiness check type.
27
27
  */
28
28
 
29
+ /** Runtime-owned health module class returned by `HealthModule.forRoot(...)`. */
30
+
29
31
  function createRuntimeHealthModule(options = {}) {
30
32
  let _initProto, _initClass;
31
33
  const basePath = options.path ?? '';
@@ -1,5 +1,5 @@
1
1
  import type { Token } from '@fluojs/core';
2
- import type { Provider } from '@fluojs/di';
2
+ import { type Provider } from '@fluojs/di/internal';
3
3
  import type { BootstrapModuleOptions, CompiledModule, ModuleType } from './types.js';
4
4
  /**
5
5
  * Returns the public token represented by a provider declaration.
@@ -1 +1 @@
1
- {"version":3,"file":"module-graph.d.ts","sourceRoot":"","sources":["../src/module-graph.ts"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B,yBAAyB,CAAC,UAAU,EAAE,UAAU,EAAE,OAAO,GAAE,sBAA2B,GAAG,MAAM,CAc9G;AAiRD;;;;;GAKG;AACH,wBAAgB,qBAAqB,CAAC,SAAS,GAAE,QAAQ,EAAO,GAAG,GAAG,CAAC,KAAK,CAAC,CAE5E;AAiXD;;;;;;GAMG;AACH,wBAAgB,kBAAkB,CAAC,UAAU,EAAE,UAAU,EAAE,OAAO,GAAE,sBAA2B,GAAG,cAAc,EAAE,CA6BjH"}
@@ -1,3 +1,4 @@
1
+ import { validateProviderInputs } from '@fluojs/di/internal';
1
2
  import { getRuntimeClassDiMetadata, getRuntimeClassDiMetadataVersion, getOwnRuntimeClassDiMetadata, getRuntimeModuleMetadata, getRuntimeModuleMetadataVersion } from './internal/core-metadata.js';
2
3
  import { ModuleGraphError, ModuleInjectionMetadataError, ModuleVisibilityError } from './errors.js';
3
4
  /**
@@ -103,7 +104,7 @@ function describeModuleReplacementsForCacheKey(moduleReplacements) {
103
104
  * @returns Process-local key that changes when metadata or runtime validation inputs change.
104
105
  */
105
106
  export function createModuleGraphCacheKey(rootModule, options = {}) {
106
- const runtimeProviders = (options.providers ?? []).map(describeProviderForCacheKey).join('|');
107
+ const runtimeProviders = validateProviderInputs(options.providers ?? []).map(describeProviderForCacheKey).join('|');
107
108
  const validationTokens = (options.validationTokens ?? []).map(describeTokenForCacheKey).join('|');
108
109
  const moduleReplacements = describeModuleReplacementsForCacheKey(options.moduleReplacements);
109
110
  return [`root:${describeTokenForCacheKey(rootModule)}`, `module:${getRuntimeModuleMetadataVersion()}`, `class-di:${getRuntimeClassDiMetadataVersion()}`, `algorithm:${MODULE_GRAPH_COMPILE_ALGORITHM_VERSION}`, `runtime:${runtimeProviders}`, `validation:${validationTokens}`, `replacements:${moduleReplacements}`].join(';');
@@ -385,7 +386,7 @@ function normalizeModuleDefinition(rawDefinition) {
385
386
  return {
386
387
  global: rawDefinition.global ?? false,
387
388
  imports: rawDefinition.imports ?? [],
388
- providers: rawDefinition.providers ?? [],
389
+ providers: validateProviderInputs(rawDefinition.providers ?? []),
389
390
  controllers: rawDefinition.controllers ?? [],
390
391
  exports: rawDefinition.exports ?? [],
391
392
  middleware: rawDefinition.middleware ?? []
@@ -559,7 +560,7 @@ export function compileModuleGraph(rootModule, options = {}) {
559
560
  }
560
561
  }
561
562
  const ordered = [];
562
- const runtimeProviders = options.providers ?? [];
563
+ const runtimeProviders = validateProviderInputs(options.providers ?? []);
563
564
  const runtimeProviderTokens = mergeRuntimeTokenSets(runtimeProviders, options.validationTokens ?? []);
564
565
  const moduleReplacements = options.moduleReplacements ?? EMPTY_MODULE_REPLACEMENTS;
565
566
  compileModule(rootModule, runtimeProviderTokens, moduleReplacements, new Map(), new Set(), ordered);
@@ -5,7 +5,7 @@ export interface UploadedFile {
5
5
  fieldname: string;
6
6
  originalname: string;
7
7
  mimetype: string;
8
- buffer: Buffer;
8
+ buffer: Uint8Array;
9
9
  size: number;
10
10
  }
11
11
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"multipart.d.ts","sourceRoot":"","sources":["../src/multipart.ts"],"names":[],"mappings":"AAEA;;GAEG;AACH,MAAM,WAAW,YAAY;IAC3B,SAAS,EAAE,MAAM,CAAC;IAClB,YAAY,EAAE,MAAM,CAAC;IACrB,QAAQ,EAAE,MAAM,CAAC;IACjB,MAAM,EAAE,MAAM,CAAC;IACf,IAAI,EAAE,MAAM,CAAC;CACd;AAED;;GAEG;AACH,MAAM,WAAW,gBAAgB;IAC/B,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,YAAY,CAAC,EAAE,MAAM,CAAC;CACvB;AAED;;GAEG;AACH,MAAM,WAAW,eAAe;IAC9B,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,EAAE,CAAC,CAAC;IAC1C,KAAK,EAAE,YAAY,EAAE,CAAC;CACvB;AAED;;GAEG;AACH,MAAM,WAAW,oBAAoB;I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AAC,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,EAAE,GAAG,SAAS,CAAC,CAAC,CAAC;IAC3E,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,CAAC,MAAM,CAAC,aAAa,CAAC,CAAC,IAAI,aAAa,CAAC,UAAU,CAAC,CAAC;CACtD;AAQD;;;;;;;GAOG;AACH,wBAAsB,cAAc,CAClC,OAAO,EAAE,OAAO,GAAG,oBAAoB,EACvC,OAAO,GAAE,gBAAqB,GAC7B,OAAO,CAAC,eAAe,CAAC,CA8C1B"}
package/dist/multipart.js CHANGED
@@ -20,6 +20,7 @@ const DEFAULT_MAX_FILE_SIZE = 10 * 1024 * 1024;
20
20
  const DEFAULT_MAX_FILES = 10;
21
21
  const DEFAULT_MAX_TOTAL_SIZE = 10 * 1024 * 1024;
22
22
  const MULTIPART_BODY_LIMIT_MESSAGE = 'Multipart body exceeds the maximum size of';
23
+ const TEXT_ENCODER = new TextEncoder();
23
24
 
24
25
  /**
25
26
  * Parses a multipart request into string fields and in-memory uploaded files.
@@ -39,7 +40,7 @@ export async function parseMultipart(request, options = {}) {
39
40
  let totalSize = 0;
40
41
  for (const [fieldname, value] of formData.entries()) {
41
42
  if (typeof value === 'string') {
42
- totalSize += Buffer.byteLength(value, 'utf8');
43
+ totalSize += TEXT_ENCODER.encode(value).byteLength;
43
44
  if (totalSize > maxTotalSize) {
44
45
  throw new PayloadTooLargeException(`${MULTIPART_BODY_LIMIT_MESSAGE} ${String(maxTotalSize)} bytes.`);
45
46
  }
@@ -57,7 +58,7 @@ export async function parseMultipart(request, options = {}) {
57
58
  throw new PayloadTooLargeException(`File "${fieldname}" exceeds the maximum size of ${String(maxFileSize)} bytes.`);
58
59
  }
59
60
  files.push({
60
- buffer: Buffer.from(await value.arrayBuffer()),
61
+ buffer: new Uint8Array(await value.arrayBuffer()),
61
62
  fieldname,
62
63
  mimetype: value.type,
63
64
  originalname: value.name,
@@ -73,7 +73,10 @@ export function createDeferredFrameworkRequest(request, signal, multipartOptions
73
73
  maxTotalSize: multipartOptions?.maxTotalSize ?? maxBodySize
74
74
  });
75
75
  frameworkRequest.body = result.fields;
76
- frameworkRequest.files = result.files;
76
+ frameworkRequest.files = result.files.map(file => ({
77
+ ...file,
78
+ buffer: Buffer.from(file.buffer)
79
+ }));
77
80
  return;
78
81
  }
79
82
  if (!hasNodeRequestBody(request)) {
@@ -1,17 +1,11 @@
1
1
  import { createServer as createHttpServer } from 'node:http';
2
2
  import { createServer as createHttpsServer, type ServerOptions as HttpsServerOptions } from 'node:https';
3
3
  import { type CorsOptions, type Dispatcher, type HttpApplicationAdapter, type MiddlewareLike, type SecurityHeadersOptions } from '@fluojs/http';
4
- import type { MultipartOptions, UploadedFile } from '../multipart.js';
4
+ import type { MultipartOptions } from '../multipart.js';
5
5
  import type { Application, ApplicationLogger, CreateApplicationOptions, ModuleType } from '../types.js';
6
6
  import { compressNodeResponse, createNodeResponseCompression } from './internal-node-compression.js';
7
7
  import { cloneHeaderValue, cloneRequestHeaders, createDeferredFrameworkRequestShell, createMemoizedAsyncValue, createMemoizedValue, createRequestSignal, normalizePrimaryContentType, parseCookieHeader, parseQueryParamsFromSearch, readPrimaryHeaderValue, resolveAbsoluteRequestUrl, resolveRequestIdFromHeaders, snapshotSimpleQueryRecord, splitRawRequestUrl } from './internal-node-request.js';
8
8
  import { createNodeShutdownSignalRegistration, defaultNodeShutdownSignals, registerShutdownSignals } from './internal-node-shutdown.js';
9
- declare module '@fluojs/http' {
10
- interface FrameworkRequest {
11
- files?: UploadedFile[];
12
- rawBody?: Uint8Array;
13
- }
14
- }
15
9
  /**
16
10
  * Describes the node http adapter options contract.
17
11
  */
@@ -1 +1 @@
1
- {"version":3,"file":"internal-node.d.ts","sourceRoot":"","sources":["../../src/node/internal-node.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,IAAI,gBAAgB,EAA6C,MAAM,WAAW,CAAC;AACxG,OA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AED;;;;;;GAMG;AACH,wBAAsB,kBAAkB,CACtC,UAAU,EAAE,UAAU,EACtB,OAAO,EAAE,yBAAyB,GACjC,OAAO,CAAC,WAAW,CAAC,CAStB;AAED,OAAO,EACL,gBAAgB,EAChB,mBAAmB,EACnB,oBAAoB,EACpB,mCAAmC,EACnC,wBAAwB,EACxB,mBAAmB,EACnB,6BAA6B,EAC7B,oCAAoC,EACpC,mBAAmB,EACnB,0BAA0B,EAC1B,2BAA2B,EAC3B,iBAAiB,EACjB,0BAA0B,EAC1B,sBAAsB,EACtB,uBAAuB,EACvB,yBAAyB,EACzB,2BAA2B,EAC3B,yBAAyB,EACzB,kBAAkB,GACnB,CAAC"}
1
+ {"version":3,"file":"internal-node.d.ts","sourceRoot":"","sources":["../../src/node/internal-node.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,IAAI,gBAAgB,EAA6C,MAAM,WAAW,CAAC;AACxG,OAAO,EAAE,YAAY,IAAI,iBAAiB,EAAE,KAAK,aAAa,IAAI,kBAAkB,EAAE,MAAM,YAAY,CAAC;AAGzG,OAAO,EACL,KAAK,WAAW,EAEhB,KAAK,UAAU,EACf,KAAK,sBAAsB,EAC3B,KAAK,cAAc,EACnB,KAAK,sBAAsB,EAC5B,MAAM,cAAc,CAAC;AAUtB,OAAO,KAAK,EAAE,gBAAgB,EAAgB,MAAM,iBAAiB,CAAC;AACtE,OAAO,KAAK,EAAE,WAAW,EAAE,iBAAiB,EAAE,wBAAwB,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AACxG,OAAO,EACL,oBAAoB,EACpB,6BAA6B,EAC9B,MAAM,gCAAgC,CAAC;AACxC,OAAO,EACL,gBAAgB,EAChB,mBAAmB,EAEnB,mCAAmC,EACnC,wBAAwB,EACxB,mBAAmB,EACnB,mBAAmB,EAGnB,2BAA2B,EAC3B,iBAAiB,EACjB,0BAA0B,EAC1B,sBAAsB,EACtB,yBAAyB,EACzB,2BAA2B,EAC3B,yBAAyB,EACzB,k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rB,eAAe,IAAI,gBAAgB;IAI7B,MAAM,CAAC,UAAU,EAAE,UAAU,GAAG,OAAO,CAAC,IAAI,CAAC;IAU7C,KAAK,IAAI,OAAO,CAAC,IAAI,CAAC;YAad,aAAa;CAY5B;AAiDD;;;;;;;GAOG;AACH,wBAAgB,qBAAqB,CAAC,OAAO,GAAE,sBAA2B,EAAE,WAAW,UAAQ,EAAE,gBAAgB,CAAC,EAAE,gBAAgB,GAAG,sBAAsB,CAa5J;AAED;;;;;;GAMG;AACH,wBAAsB,wBAAwB,CAC5C,UAAU,EAAE,UAAU,EACtB,OAAO,EAAE,+BAA+B,GACvC,OAAO,CAAC,WAAW,CAAC,CAStB;AAED;;;;;;GAMG;AACH,wBAAsB,kBAAkB,CACtC,UAAU,EAAE,UAAU,EACtB,OAAO,EAAE,yBAAyB,GACjC,OAAO,CAAC,WAAW,CAAC,CAStB;AAED,OAAO,EACL,gBAAgB,EAChB,mBAAmB,EACnB,oBAAoB,EACpB,mCAAmC,EACnC,wBAAwB,EACxB,mBAAmB,EACnB,6BAA6B,EAC7B,oCAAoC,EACpC,mBAAmB,EACnB,0BAA0B,EAC1B,2BAA2B,EAC3B,iBAAiB,EACjB,0BAA0B,EAC1B,sBAAsB,EACtB,uBAAuB,EACvB,yBAAyB,EACzB,2BAA2B,EAC3B,yBAAyB,EACzB,kBAAkB,GACnB,CAAC"}
package/dist/web.d.ts CHANGED
@@ -1,12 +1,6 @@
1
1
  import { type Dispatcher, type FrameworkRequest, type FrameworkResponse } from '@fluojs/http';
2
- import { type MultipartOptions, type UploadedFile } from './multipart.js';
2
+ import { type MultipartOptions } from './multipart.js';
3
3
  import { type RequestResponseFactory } from './adapters/request-response-factory.js';
4
- declare module '@fluojs/http' {
5
- interface FrameworkRequest {
6
- files?: UploadedFile[];
7
- rawBody?: Uint8Array;
8
- }
9
- }
10
4
  /**
11
5
  * Configures Web request parsing, multipart handling, and raw body preservation.
12
6
  */
package/dist/web.d.ts.map CHANGED
@@ -1 +1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,IAAI,QAAQ,CAAC;CACxB;AAED,OAAO,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAC;AAgNhD;;;;;GAKG;AACH,wBAAgB,+BAA+B,CAC7C,OAAO,GAAE,sCAA2C,GACnD,sBAAsB,CAAC,OAAO,EAAE,WAAW,GAAG,SAAS,EAAE,oBAAoB,CAAC,CA+BhF;AAED;;;;;GAKG;AACH,wBAAsB,kBAAkB,CAAC,EACvC,UAAU,EACV,yBAAiG,EACjG,OAAO,EACP,OAAO,EACP,GAAG,OAAO,EACX,EAAE,yBAAyB,GAAG,OAAO,CAAC,QAAQ,CAAC,CAU/C;AAED;;;;;;;;;GASG;AACH,wBAAsB,yBAAyB,CAC7C,OAAO,EAAE,OAAO,EAChB,MAAM,EAAE,WAAW,EACnB,gBAAgB,CAAC,EAAE,gBAAgB,EACnC,WAAW,SAAwB,EACnC,eAAe,UAAQ,GACtB,OAAO,CAAC,gBAAgB,CAAC,CAW3B"}
package/package.json CHANGED
@@ -9,7 +9,7 @@
9
9
  "module-graph",
10
10
  "orchestration"
11
11
  ],
12
- "version": "1.1.8",
12
+ "version": "2.0.1",
13
13
  "private": false,
14
14
  "license": "MIT",
15
15
  "repository": {
@@ -67,14 +67,14 @@
67
67
  "dist"
68
68
  ],
69
69
  "dependencies": {
70
- "@fluojs/config": "^1.0.3",
71
- "@fluojs/core": "^1.0.3",
72
- "@fluojs/di": "^1.1.0",
73
- "@fluojs/http": "^1.1.2"
70
+ "@fluojs/config": "^1.0.4",
71
+ "@fluojs/core": "^1.1.0",
72
+ "@fluojs/di": "^2.0.0",
73
+ "@fluojs/http": "^2.0.1"
74
74
  },
75
75
  "devDependencies": {
76
76
  "vitest": "^3.2.4",
77
- "@fluojs/serialization": "^1.0.4"
77
+ "@fluojs/serialization": "^1.0.5"
78
78
  },
79
79
  "scripts": {
80
80
  "prebuild": "node ../../tooling/scripts/clean-dist.mjs",