@fluojs/runtime 1.0.0-beta.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/LICENSE +21 -0
- package/README.ko.md +182 -0
- package/README.md +182 -0
- package/dist/abort.d.ts +19 -0
- package/dist/abort.d.ts.map +1 -0
- package/dist/abort.js +39 -0
- package/dist/adapters/internal-http-adapter.d.ts +2 -0
- package/dist/adapters/internal-http-adapter.d.ts.map +1 -0
- package/dist/adapters/internal-http-adapter.js +1 -0
- package/dist/adapters/internal-request-response-factory.d.ts +2 -0
- package/dist/adapters/internal-request-response-factory.d.ts.map +1 -0
- package/dist/adapters/internal-request-response-factory.js +1 -0
- package/dist/adapters/request-response-factory.d.ts +17 -0
- package/dist/adapters/request-response-factory.d.ts.map +1 -0
- package/dist/adapters/request-response-factory.js +27 -0
- package/dist/bootstrap.d.ts +73 -0
- package/dist/bootstrap.d.ts.map +1 -0
- package/dist/bootstrap.js +870 -0
- package/dist/errors.d.ts +39 -0
- package/dist/errors.d.ts.map +1 -0
- package/dist/errors.js +88 -0
- package/dist/health/diagnostics.d.ts +56 -0
- package/dist/health/diagnostics.d.ts.map +1 -0
- package/dist/health/diagnostics.js +155 -0
- package/dist/health/health.d.ts +18 -0
- package/dist/health/health.d.ts.map +1 -0
- package/dist/health/health.js +82 -0
- package/dist/http-adapter-shared.d.ts +88 -0
- package/dist/http-adapter-shared.d.ts.map +1 -0
- package/dist/http-adapter-shared.js +199 -0
- package/dist/index.d.ts +11 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +8 -0
- package/dist/internal-http-adapter.d.ts +2 -0
- package/dist/internal-http-adapter.d.ts.map +1 -0
- package/dist/internal-http-adapter.js +1 -0
- package/dist/internal-node.d.ts +2 -0
- package/dist/internal-node.d.ts.map +1 -0
- package/dist/internal-node.js +1 -0
- package/dist/internal-request-response-factory.d.ts +2 -0
- package/dist/internal-request-response-factory.d.ts.map +1 -0
- package/dist/internal-request-response-factory.js +1 -0
- package/dist/internal.d.ts +2 -0
- package/dist/internal.d.ts.map +1 -0
- package/dist/internal.js +1 -0
- package/dist/logging/json-logger.d.ts +3 -0
- package/dist/logging/json-logger.d.ts.map +1 -0
- package/dist/logging/json-logger.js +39 -0
- package/dist/logging/logger.d.ts +3 -0
- package/dist/logging/logger.d.ts.map +1 -0
- package/dist/logging/logger.js +36 -0
- package/dist/module-graph.d.ts +26 -0
- package/dist/module-graph.d.ts.map +1 -0
- package/dist/module-graph.js +248 -0
- package/dist/multipart.d.ts +45 -0
- package/dist/multipart.d.ts.map +1 -0
- package/dist/multipart.js +195 -0
- package/dist/node/internal-node-compression.d.ts +7 -0
- package/dist/node/internal-node-compression.d.ts.map +1 -0
- package/dist/node/internal-node-compression.js +68 -0
- package/dist/node/internal-node-request.d.ts +34 -0
- package/dist/node/internal-node-request.d.ts.map +1 -0
- package/dist/node/internal-node-request.js +195 -0
- package/dist/node/internal-node-response.d.ts +8 -0
- package/dist/node/internal-node-response.d.ts.map +1 -0
- package/dist/node/internal-node-response.js +166 -0
- package/dist/node/internal-node-shutdown.d.ts +34 -0
- package/dist/node/internal-node-shutdown.d.ts.map +1 -0
- package/dist/node/internal-node-shutdown.js +83 -0
- package/dist/node/internal-node.d.ts +80 -0
- package/dist/node/internal-node.d.ts.map +1 -0
- package/dist/node/internal-node.js +209 -0
- package/dist/node/node-compression.d.ts +2 -0
- package/dist/node/node-compression.d.ts.map +1 -0
- package/dist/node/node-compression.js +1 -0
- package/dist/node/node-request.d.ts +2 -0
- package/dist/node/node-request.d.ts.map +1 -0
- package/dist/node/node-request.js +1 -0
- package/dist/node/node-response.d.ts +2 -0
- package/dist/node/node-response.d.ts.map +1 -0
- package/dist/node/node-response.js +1 -0
- package/dist/node/node-shutdown.d.ts +2 -0
- package/dist/node/node-shutdown.d.ts.map +1 -0
- package/dist/node/node-shutdown.js +1 -0
- package/dist/node/node.d.ts +2 -0
- package/dist/node/node.d.ts.map +1 -0
- package/dist/node/node.js +1 -0
- package/dist/node.d.ts +5 -0
- package/dist/node.d.ts.map +1 -0
- package/dist/node.js +3 -0
- package/dist/platform-contract.d.ts +140 -0
- package/dist/platform-contract.d.ts.map +1 -0
- package/dist/platform-contract.js +1 -0
- package/dist/platform-shell.d.ts +45 -0
- package/dist/platform-shell.d.ts.map +1 -0
- package/dist/platform-shell.js +368 -0
- package/dist/request-transaction.d.ts +17 -0
- package/dist/request-transaction.d.ts.map +1 -0
- package/dist/request-transaction.js +39 -0
- package/dist/tokens.d.ts +27 -0
- package/dist/tokens.d.ts.map +1 -0
- package/dist/tokens.js +24 -0
- package/dist/types.d.ts +161 -0
- package/dist/types.d.ts.map +1 -0
- package/dist/types.js +1 -0
- package/dist/web.d.ts +58 -0
- package/dist/web.d.ts.map +1 -0
- package/dist/web.js +431 -0
- package/package.json +86 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 fluo contributors
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.ko.md
ADDED
|
@@ -0,0 +1,182 @@
|
|
|
1
|
+
# @fluojs/runtime
|
|
2
|
+
|
|
3
|
+
<p><a href="./README.md"><kbd>English</kbd></a> <strong><kbd>한국어</kbd></strong></p>
|
|
4
|
+
|
|
5
|
+
모듈 그래프를 컴파일하고 DI와 HTTP를 실행 가능한 애플리케이션 셸로 연결하는 어셈블리 레이어입니다.
|
|
6
|
+
|
|
7
|
+
## 목차
|
|
8
|
+
|
|
9
|
+
- [설치](#설치)
|
|
10
|
+
- [사용 시점](#사용-시점)
|
|
11
|
+
- [퀵 스타트](#퀵-스타트)
|
|
12
|
+
- [주요 패턴](#주요-패턴)
|
|
13
|
+
- [동작 계약](#동작-계약)
|
|
14
|
+
- [공개 API 개요](#공개-api-개요)
|
|
15
|
+
- [관련 패키지](#관련-패키지)
|
|
16
|
+
- [예제 소스](#예제-소스)
|
|
17
|
+
|
|
18
|
+
## 설치
|
|
19
|
+
|
|
20
|
+
```bash
|
|
21
|
+
npm install @fluojs/runtime
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
## 사용 시점
|
|
25
|
+
|
|
26
|
+
다음과 같은 경우에 이 패키지를 사용합니다:
|
|
27
|
+
- **fluo 애플리케이션 부트스트랩**: 모듈을 실행 중인 HTTP 서버나 마이크로서비스로 변환할 때.
|
|
28
|
+
- **DI 및 라이프사이클 오케스트레이션**: 모듈 그래프 컴파일, 프로바이더 연결 및 애플리케이션 훅(`onModuleInit`, `onApplicationBootstrap`)을 관리할 때.
|
|
29
|
+
- **독립형 컨텍스트 생성**: HTTP 서버는 필요 없지만 DI가 필요한 CLI 태스크, 마이그레이션 또는 워커를 실행할 때.
|
|
30
|
+
- **진단 및 검사**: 기계 읽기 가능한 형태나 Mermaid 기반의 모듈 그래프 토폴로지를 내보낼 때.
|
|
31
|
+
|
|
32
|
+
## 퀵 스타트
|
|
33
|
+
|
|
34
|
+
### 최소 HTTP 애플리케이션
|
|
35
|
+
|
|
36
|
+
`fluoFactory`는 애플리케이션 생성을 위한 주요 진입점입니다.
|
|
37
|
+
|
|
38
|
+
```typescript
|
|
39
|
+
import { Module } from '@fluojs/core';
|
|
40
|
+
import { Controller, Get } from '@fluojs/http';
|
|
41
|
+
import { fluoFactory } from '@fluojs/runtime';
|
|
42
|
+
import { createNodejsAdapter } from '@fluojs/platform-nodejs';
|
|
43
|
+
|
|
44
|
+
@Controller('/')
|
|
45
|
+
class AppController {
|
|
46
|
+
@Get()
|
|
47
|
+
index() {
|
|
48
|
+
return { hello: 'world' };
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
@Module({
|
|
53
|
+
controllers: [AppController],
|
|
54
|
+
})
|
|
55
|
+
class AppModule {}
|
|
56
|
+
|
|
57
|
+
// 애플리케이션 생성 및 시작
|
|
58
|
+
const app = await fluoFactory.create(AppModule, {
|
|
59
|
+
adapter: createNodejsAdapter({ port: 3000 }),
|
|
60
|
+
});
|
|
61
|
+
|
|
62
|
+
await app.listen();
|
|
63
|
+
```
|
|
64
|
+
|
|
65
|
+
## 주요 패턴
|
|
66
|
+
|
|
67
|
+
### 애플리케이션 컨텍스트 (HTTP 제외)
|
|
68
|
+
|
|
69
|
+
백그라운드 워커나 스크립트의 경우, `createApplicationContext`를 사용하여 HTTP 설정을 건너뛸 수 있습니다.
|
|
70
|
+
|
|
71
|
+
```typescript
|
|
72
|
+
import { fluoFactory } from '@fluojs/runtime';
|
|
73
|
+
|
|
74
|
+
const context = await fluoFactory.createApplicationContext(AppModule);
|
|
75
|
+
|
|
76
|
+
// 컨테이너에서 직접 서비스 해석
|
|
77
|
+
const userService = await context.get(UserService);
|
|
78
|
+
await userService.doWork();
|
|
79
|
+
|
|
80
|
+
await context.close();
|
|
81
|
+
```
|
|
82
|
+
|
|
83
|
+
### 전역 예외 필터
|
|
84
|
+
|
|
85
|
+
부트스트랩 시 필터를 등록하여 횡단 관심사 에러를 처리합니다.
|
|
86
|
+
|
|
87
|
+
```typescript
|
|
88
|
+
import { fluoFactory, type ExceptionFilterHandler } from '@fluojs/runtime';
|
|
89
|
+
|
|
90
|
+
class GlobalErrorFilter implements ExceptionFilterHandler {
|
|
91
|
+
async catch(error, { response }) {
|
|
92
|
+
console.error('에러 발생:', error);
|
|
93
|
+
response.setStatus(500);
|
|
94
|
+
void response.send({ error: 'Internal Server Error' });
|
|
95
|
+
return true; // 처리됨으로 표시
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
const app = await fluoFactory.create(AppModule, {
|
|
100
|
+
adapter: createNodejsAdapter({ port: 3000 }),
|
|
101
|
+
filters: [new GlobalErrorFilter()],
|
|
102
|
+
});
|
|
103
|
+
```
|
|
104
|
+
|
|
105
|
+
### 모듈 구성
|
|
106
|
+
|
|
107
|
+
fluo는 엄격한 모듈 그래프를 사용합니다. 모듈은 다른 모듈에서 사용할 프로바이더를 `export`를 통해 명시적으로 공개해야 합니다.
|
|
108
|
+
|
|
109
|
+
```typescript
|
|
110
|
+
@Module({
|
|
111
|
+
providers: [DatabaseService],
|
|
112
|
+
exports: [DatabaseService], // 외부에서 사용 가능하도록 설정
|
|
113
|
+
})
|
|
114
|
+
class DatabaseModule {}
|
|
115
|
+
|
|
116
|
+
@Module({
|
|
117
|
+
imports: [DatabaseModule],
|
|
118
|
+
providers: [UsersService], // 이제 DatabaseService를 주입받을 수 있음
|
|
119
|
+
})
|
|
120
|
+
class UsersModule {}
|
|
121
|
+
```
|
|
122
|
+
|
|
123
|
+
## 동작 계약
|
|
124
|
+
|
|
125
|
+
- 요청 바디 파싱은 Web 표준 요청과 Node 기반 요청 모두에서 바이트가 스트리밍되는 동안 `maxBodySize`를 강제합니다.
|
|
126
|
+
- 멀티파트 파싱은 누적 바디 크기가 설정된 `multipart.maxTotalSize`를 넘으면 즉시 거부되며, 런타임 어댑터는 별도 재정의가 없으면 이 한도를 `maxBodySize`와 동일하게 맞춥니다.
|
|
127
|
+
- 응답 스트림 백프레셔 헬퍼는 `drain`, `close`, `error` 중 어느 경우에도 `waitForDrain()`을 완료시켜 끊어진 연결에서 스트리밍 작성기가 멈추지 않도록 합니다.
|
|
128
|
+
- 시그널 기반 종료 헬퍼는 bounded drain semantics를 유지하면서 timeout/실패 상황을 로그와 `process.exitCode`로 보고하지만, 최종 프로세스 종료 소유권은 주변 호스트 런타임에 남겨 둡니다.
|
|
129
|
+
|
|
130
|
+
## 공개 API 개요
|
|
131
|
+
|
|
132
|
+
- `fluoFactory`: 패키지 예제에서 사용하는 런타임 부트스트랩 파사드의 lower-camel-case 별칭입니다.
|
|
133
|
+
- `FluoFactory`: 호환성과 명시적 static 접근을 위해 유지되는 클래스 기반 런타임 부트스트랩 파사드입니다.
|
|
134
|
+
- `Application`: `ApplicationContext`를 확장하며 `listen()`, `dispatch()`, `state`를 포함합니다.
|
|
135
|
+
- `ApplicationContext`: `get<T>(token)`, `close()` 기능을 제공하며 `container`와 `modules`에 접근할 수 있습니다.
|
|
136
|
+
- `LifecycleHooks`: `OnModuleInit`, `OnApplicationBootstrap`, `OnModuleDestroy`, `OnApplicationShutdown`를 묶는 편의 union 타입입니다.
|
|
137
|
+
- `defineModule(cls, metadata)`: 프로그래밍 방식의 모듈 정의 헬퍼입니다.
|
|
138
|
+
- `bootstrapApplication(options)`: 저수준 비동기 부트스트랩 함수입니다.
|
|
139
|
+
|
|
140
|
+
## 플랫폼 전용 서브경로
|
|
141
|
+
|
|
142
|
+
| 서브경로 | 용도 |
|
|
143
|
+
| :--- | :--- |
|
|
144
|
+
| `@fluojs/runtime/node` | 로거 팩토리, Node 어댑터/부트스트랩 헬퍼, 종료 시그널 등록을 위한 지원되는 Node.js 전용 진입점입니다. |
|
|
145
|
+
| `@fluojs/runtime/web` | Bun, Deno, Cloudflare Workers를 위한 공유 웹 표준 요청/응답 유틸리티. |
|
|
146
|
+
| `@fluojs/runtime/internal` | 저수준 오케스트레이션 헬퍼 및 HTTP 어댑터 기본 로직. |
|
|
147
|
+
| `@fluojs/runtime/internal-node` | 어댑터/패키지 호환 계층이 사용하는 Node 전용 내부 seam이며, 애플리케이션 코드에서는 `@fluojs/runtime/node`를 우선 사용하세요. |
|
|
148
|
+
|
|
149
|
+
### Node 전용 서브경로 (`@fluojs/runtime/node`)
|
|
150
|
+
|
|
151
|
+
로거 팩토리와 지원되는 기타 Node 전용 헬퍼는 범용 루트 진입점에 포함되지 않습니다. `./node` 서브경로에서 가져오세요:
|
|
152
|
+
|
|
153
|
+
```typescript
|
|
154
|
+
import {
|
|
155
|
+
bootstrapNodeApplication,
|
|
156
|
+
createConsoleApplicationLogger,
|
|
157
|
+
createJsonApplicationLogger,
|
|
158
|
+
createNodeHttpAdapter,
|
|
159
|
+
runNodeApplication,
|
|
160
|
+
} from '@fluojs/runtime/node';
|
|
161
|
+
```
|
|
162
|
+
|
|
163
|
+
- `createConsoleApplicationLogger()`: `process.stdout`/`process.stderr`를 사용하는 컬러 콘솔 로거.
|
|
164
|
+
- `createJsonApplicationLogger()`: `process.stdout`/`process.stderr`를 사용하는 구조화된 JSON 로거.
|
|
165
|
+
- `createNodeHttpAdapter()`: 어댑터 우선 런타임 구성을 위한 raw Node `http`/`https` 어댑터 팩토리.
|
|
166
|
+
- `bootstrapNodeApplication()` / `runNodeApplication()`: 호환 패키지와 직접 Node 런타임 흐름에서 사용하는 Node 전용 부트스트랩 헬퍼.
|
|
167
|
+
- `createNodeShutdownSignalRegistration()`, `defaultNodeShutdownSignals()`, `registerShutdownSignals()`: 호스트가 명시적으로 시그널 wiring을 제어할 때 쓰는 종료 등록 헬퍼.
|
|
168
|
+
|
|
169
|
+
더 저수준의 Node compression internals는 공개 `@fluojs/runtime/node` 계약이 아니라 `@fluojs/runtime/internal-node` seam 뒤에 둡니다.
|
|
170
|
+
|
|
171
|
+
## 관련 패키지
|
|
172
|
+
|
|
173
|
+
- [@fluojs/core](../core): 핵심 데코레이터 및 메타데이터 시스템.
|
|
174
|
+
- [@fluojs/di](../di): 의존성 주입(DI) 컨테이너 구현체.
|
|
175
|
+
- [@fluojs/http](../http): HTTP 라우팅, 컨트롤러 및 디스패처.
|
|
176
|
+
- [@fluojs/platform-nodejs](../platform-nodejs): 공식 Node.js HTTP 어댑터.
|
|
177
|
+
|
|
178
|
+
## 예제 소스
|
|
179
|
+
|
|
180
|
+
- [examples/minimal](../../examples/minimal): 최소한의 부트스트랩 예제.
|
|
181
|
+
- [examples/realworld-api](../../examples/realworld-api): 복잡한 모듈 연결이 포함된 전체 애플리케이션 예제.
|
|
182
|
+
- [packages/runtime/src/bootstrap.test.ts](./src/bootstrap.test.ts): 부트스트랩 단계별 동작 테스트.
|
package/README.md
ADDED
|
@@ -0,0 +1,182 @@
|
|
|
1
|
+
# @fluojs/runtime
|
|
2
|
+
|
|
3
|
+
<p><strong><kbd>English</kbd></strong> <a href="./README.ko.md"><kbd>한국어</kbd></a></p>
|
|
4
|
+
|
|
5
|
+
The assembly layer that compiles a module graph and wires DI and HTTP into a runnable application shell.
|
|
6
|
+
|
|
7
|
+
## Table of Contents
|
|
8
|
+
|
|
9
|
+
- [Installation](#installation)
|
|
10
|
+
- [When to Use](#when-to-use)
|
|
11
|
+
- [Quick Start](#quick-start)
|
|
12
|
+
- [Common Patterns](#common-patterns)
|
|
13
|
+
- [Behavioral Contracts](#behavioral-contracts)
|
|
14
|
+
- [Public API Overview](#public-api-overview)
|
|
15
|
+
- [Related Packages](#related-packages)
|
|
16
|
+
- [Example Sources](#example-sources)
|
|
17
|
+
|
|
18
|
+
## Installation
|
|
19
|
+
|
|
20
|
+
```bash
|
|
21
|
+
npm install @fluojs/runtime
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
## When to Use
|
|
25
|
+
|
|
26
|
+
Use this package when you need to:
|
|
27
|
+
- **Bootstrap a fluo application**: Convert your modules into a running HTTP server or microservice.
|
|
28
|
+
- **Orchestrate DI and Lifecycle**: Manage module-graph compilation, provider wiring, and application hooks (`onModuleInit`, `onApplicationBootstrap`).
|
|
29
|
+
- **Create Standalone Contexts**: Run CLI tasks, migrations, or workers that need DI but not an HTTP server.
|
|
30
|
+
- **Diagnostic Inspection**: Export machine-readable or Mermaid-based module graph topology.
|
|
31
|
+
|
|
32
|
+
## Quick Start
|
|
33
|
+
|
|
34
|
+
### Minimal HTTP Application
|
|
35
|
+
|
|
36
|
+
The `fluoFactory` is the primary entrypoint for creating applications.
|
|
37
|
+
|
|
38
|
+
```typescript
|
|
39
|
+
import { Module } from '@fluojs/core';
|
|
40
|
+
import { Controller, Get } from '@fluojs/http';
|
|
41
|
+
import { fluoFactory } from '@fluojs/runtime';
|
|
42
|
+
import { createNodejsAdapter } from '@fluojs/platform-nodejs';
|
|
43
|
+
|
|
44
|
+
@Controller('/')
|
|
45
|
+
class AppController {
|
|
46
|
+
@Get()
|
|
47
|
+
index() {
|
|
48
|
+
return { hello: 'world' };
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
@Module({
|
|
53
|
+
controllers: [AppController],
|
|
54
|
+
})
|
|
55
|
+
class AppModule {}
|
|
56
|
+
|
|
57
|
+
// Create and start the application
|
|
58
|
+
const app = await fluoFactory.create(AppModule, {
|
|
59
|
+
adapter: createNodejsAdapter({ port: 3000 }),
|
|
60
|
+
});
|
|
61
|
+
|
|
62
|
+
await app.listen();
|
|
63
|
+
```
|
|
64
|
+
|
|
65
|
+
## Common Patterns
|
|
66
|
+
|
|
67
|
+
### Application Context (No HTTP)
|
|
68
|
+
|
|
69
|
+
For background workers or scripts, use `createApplicationContext` to skip HTTP setup.
|
|
70
|
+
|
|
71
|
+
```typescript
|
|
72
|
+
import { fluoFactory } from '@fluojs/runtime';
|
|
73
|
+
|
|
74
|
+
const context = await fluoFactory.createApplicationContext(AppModule);
|
|
75
|
+
|
|
76
|
+
// Resolve a service directly from the container
|
|
77
|
+
const userService = await context.get(UserService);
|
|
78
|
+
await userService.doWork();
|
|
79
|
+
|
|
80
|
+
await context.close();
|
|
81
|
+
```
|
|
82
|
+
|
|
83
|
+
### Global Exception Filters
|
|
84
|
+
|
|
85
|
+
Handle cross-cutting errors by registering filters during bootstrap.
|
|
86
|
+
|
|
87
|
+
```typescript
|
|
88
|
+
import { fluoFactory, type ExceptionFilterHandler } from '@fluojs/runtime';
|
|
89
|
+
|
|
90
|
+
class GlobalErrorFilter implements ExceptionFilterHandler {
|
|
91
|
+
async catch(error, { response }) {
|
|
92
|
+
console.error('Caught error:', error);
|
|
93
|
+
response.setStatus(500);
|
|
94
|
+
void response.send({ error: 'Internal Server Error' });
|
|
95
|
+
return true; // Mark as handled
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
const app = await fluoFactory.create(AppModule, {
|
|
100
|
+
adapter: createNodejsAdapter({ port: 3000 }),
|
|
101
|
+
filters: [new GlobalErrorFilter()],
|
|
102
|
+
});
|
|
103
|
+
```
|
|
104
|
+
|
|
105
|
+
### Module Composition
|
|
106
|
+
|
|
107
|
+
fluo uses a strict module graph. Modules must explicitly `export` providers to make them available to `importing` modules.
|
|
108
|
+
|
|
109
|
+
```typescript
|
|
110
|
+
@Module({
|
|
111
|
+
providers: [DatabaseService],
|
|
112
|
+
exports: [DatabaseService], // Make it available outside
|
|
113
|
+
})
|
|
114
|
+
class DatabaseModule {}
|
|
115
|
+
|
|
116
|
+
@Module({
|
|
117
|
+
imports: [DatabaseModule],
|
|
118
|
+
providers: [UsersService], // Can now inject DatabaseService
|
|
119
|
+
})
|
|
120
|
+
class UsersModule {}
|
|
121
|
+
```
|
|
122
|
+
|
|
123
|
+
## Behavioral Contracts
|
|
124
|
+
|
|
125
|
+
- Request body parsing enforces `maxBodySize` while bytes are still streaming for both Web-standard and Node-backed requests.
|
|
126
|
+
- 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.
|
|
127
|
+
- Response stream backpressure helpers settle `waitForDrain()` on `drain`, `close`, or `error` so streaming writers do not hang on dead connections.
|
|
128
|
+
- 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.
|
|
129
|
+
|
|
130
|
+
## Public API Overview
|
|
131
|
+
|
|
132
|
+
- `fluoFactory`: Lower-camel-case alias for the runtime bootstrap facade used in the package examples.
|
|
133
|
+
- `FluoFactory`: Class-based runtime bootstrap facade retained for compatibility and explicit static access.
|
|
134
|
+
- `Application`: Extends `ApplicationContext` with `listen()`, `dispatch()`, and `state`.
|
|
135
|
+
- `ApplicationContext`: Provides `get<T>(token)`, `close()`, and access to `container` and `modules`.
|
|
136
|
+
- `LifecycleHooks`: Convenience union covering `OnModuleInit`, `OnApplicationBootstrap`, `OnModuleDestroy`, and `OnApplicationShutdown`.
|
|
137
|
+
- `defineModule(cls, metadata)`: Programmatic module definition helper.
|
|
138
|
+
- `bootstrapApplication(options)`: Lower-level async bootstrap function.
|
|
139
|
+
|
|
140
|
+
## Platform-Specific Subpaths
|
|
141
|
+
|
|
142
|
+
| Subpath | Purpose |
|
|
143
|
+
| :--- | :--- |
|
|
144
|
+
| `@fluojs/runtime/node` | Supported Node.js entrypoint for logger factories, Node adapter/bootstrap helpers, and shutdown signal registration. |
|
|
145
|
+
| `@fluojs/runtime/web` | Shared Web-standard request/response utilities for Bun, Deno, and Cloudflare Workers. |
|
|
146
|
+
| `@fluojs/runtime/internal` | Low-level orchestration helpers and HTTP adapter base logic. |
|
|
147
|
+
| `@fluojs/runtime/internal-node` | Node-only internal seam used by adapter/package compatibility layers; prefer `@fluojs/runtime/node` in application code. |
|
|
148
|
+
|
|
149
|
+
### Node-Specific Subpath (`@fluojs/runtime/node`)
|
|
150
|
+
|
|
151
|
+
Logger factories and other supported Node-only helpers are **not** on the universal root entrypoint. Import them from the `./node` subpath:
|
|
152
|
+
|
|
153
|
+
```typescript
|
|
154
|
+
import {
|
|
155
|
+
bootstrapNodeApplication,
|
|
156
|
+
createConsoleApplicationLogger,
|
|
157
|
+
createJsonApplicationLogger,
|
|
158
|
+
createNodeHttpAdapter,
|
|
159
|
+
runNodeApplication,
|
|
160
|
+
} from '@fluojs/runtime/node';
|
|
161
|
+
```
|
|
162
|
+
|
|
163
|
+
- `createConsoleApplicationLogger()`: Colorized console logger using `process.stdout`/`process.stderr`.
|
|
164
|
+
- `createJsonApplicationLogger()`: Structured JSON logger using `process.stdout`/`process.stderr`.
|
|
165
|
+
- `createNodeHttpAdapter()`: Raw Node `http`/`https` adapter factory for adapter-first runtime setup.
|
|
166
|
+
- `bootstrapNodeApplication()` / `runNodeApplication()`: Node-specific bootstrap helpers used by compatibility packages and direct Node runtime flows.
|
|
167
|
+
- `createNodeShutdownSignalRegistration()`, `defaultNodeShutdownSignals()`, `registerShutdownSignals()`: Shutdown registration helpers for hosts that need explicit signal wiring.
|
|
168
|
+
|
|
169
|
+
Lower-level Node compression internals stay behind the `@fluojs/runtime/internal-node` seam rather than the public `@fluojs/runtime/node` contract.
|
|
170
|
+
|
|
171
|
+
## Related Packages
|
|
172
|
+
|
|
173
|
+
- [@fluojs/core](../core): Core decorators and metadata system.
|
|
174
|
+
- [@fluojs/di](../di): Dependency injection container implementation.
|
|
175
|
+
- [@fluojs/http](../http): HTTP routing, controllers, and dispatcher.
|
|
176
|
+
- [@fluojs/platform-nodejs](../platform-nodejs): Official Node.js HTTP adapter.
|
|
177
|
+
|
|
178
|
+
## Example Sources
|
|
179
|
+
|
|
180
|
+
- [examples/minimal](../../examples/minimal): Smallest possible bootstrap.
|
|
181
|
+
- [examples/realworld-api](../../examples/realworld-api): Full application with complex module wiring.
|
|
182
|
+
- [packages/runtime/src/bootstrap.test.ts](./src/bootstrap.test.ts): Behavioral tests for bootstrap phases.
|
package/dist/abort.d.ts
ADDED
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Races a promise-returning function against an AbortSignal.
|
|
3
|
+
* Rejects immediately if the signal is already aborted, or rejects as soon
|
|
4
|
+
* as the signal fires while `fn` is still pending.
|
|
5
|
+
*
|
|
6
|
+
* @param fn Async operation to execute while observing the abort signal.
|
|
7
|
+
* @param signal Abort signal that can cancel the in-flight operation.
|
|
8
|
+
* @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.
|
|
10
|
+
*/
|
|
11
|
+
export declare function raceWithAbort<T>(fn: () => Promise<T>, signal: AbortSignal): Promise<T>;
|
|
12
|
+
/**
|
|
13
|
+
* Normalises an abort reason into an `Error` with `name = 'AbortError'`.
|
|
14
|
+
*
|
|
15
|
+
* @param reason Abort reason attached to the triggering `AbortSignal`.
|
|
16
|
+
* @returns A normalized `Error` instance with `name` set to `AbortError`.
|
|
17
|
+
*/
|
|
18
|
+
export declare function createAbortError(reason: unknown): Error;
|
|
19
|
+
//# sourceMappingURL=abort.d.ts.map
|
|
@@ -0,0 +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"}
|
package/dist/abort.js
ADDED
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Races a promise-returning function against an AbortSignal.
|
|
3
|
+
* Rejects immediately if the signal is already aborted, or rejects as soon
|
|
4
|
+
* as the signal fires while `fn` is still pending.
|
|
5
|
+
*
|
|
6
|
+
* @param fn Async operation to execute while observing the abort signal.
|
|
7
|
+
* @param signal Abort signal that can cancel the in-flight operation.
|
|
8
|
+
* @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.
|
|
10
|
+
*/
|
|
11
|
+
export async function raceWithAbort(fn, signal) {
|
|
12
|
+
if (signal.aborted) {
|
|
13
|
+
throw createAbortError(signal.reason);
|
|
14
|
+
}
|
|
15
|
+
return await new Promise((resolve, reject) => {
|
|
16
|
+
const onAbort = () => {
|
|
17
|
+
reject(createAbortError(signal.reason));
|
|
18
|
+
};
|
|
19
|
+
signal.addEventListener('abort', onAbort, {
|
|
20
|
+
once: true
|
|
21
|
+
});
|
|
22
|
+
Promise.resolve(fn()).then(resolve, reject).finally(() => {
|
|
23
|
+
signal.removeEventListener('abort', onAbort);
|
|
24
|
+
});
|
|
25
|
+
});
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
/**
|
|
29
|
+
* Normalises an abort reason into an `Error` with `name = 'AbortError'`.
|
|
30
|
+
*
|
|
31
|
+
* @param reason Abort reason attached to the triggering `AbortSignal`.
|
|
32
|
+
* @returns A normalized `Error` instance with `name` set to `AbortError`.
|
|
33
|
+
*/
|
|
34
|
+
export function createAbortError(reason) {
|
|
35
|
+
const message = reason instanceof Error ? reason.message : 'Request aborted before response commit.';
|
|
36
|
+
const error = new Error(message);
|
|
37
|
+
error.name = 'AbortError';
|
|
38
|
+
return error;
|
|
39
|
+
}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
export { bootstrapHttpAdapterApplication, createHttpAdapterMiddleware, formatHttpAdapterListenMessage, runHttpAdapterApplication, type BootstrapHttpAdapterApplicationOptions, type HttpAdapterCorsInput, type HttpAdapterListenTarget, type HttpAdapterMiddlewareOptions, type HttpAdapterShutdownRegistration, type RunHttpAdapterApplicationOptions, } from '../http-adapter-shared.js';
|
|
2
|
+
//# sourceMappingURL=internal-http-adapter.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"internal-http-adapter.d.ts","sourceRoot":"","sources":["../../src/adapters/internal-http-adapter.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,+BAA+B,EAC/B,2BAA2B,EAC3B,8BAA8B,EAC9B,yBAAyB,EACzB,KAAK,sCAAsC,EAC3C,KAAK,oBAAoB,EACzB,KAAK,uBAAuB,EAC5B,KAAK,4BAA4B,EACjC,KAAK,+BAA+B,EACpC,KAAK,gCAAgC,GACtC,MAAM,2BAA2B,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { bootstrapHttpAdapterApplication, createHttpAdapterMiddleware, formatHttpAdapterListenMessage, runHttpAdapterApplication } from '../http-adapter-shared.js';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"internal-request-response-factory.d.ts","sourceRoot":"","sources":["../../src/adapters/internal-request-response-factory.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,kCAAkC,EAClC,KAAK,yCAAyC,EAC9C,KAAK,sBAAsB,GAC5B,MAAM,+BAA+B,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { dispatchWithRequestResponseFactory } from './request-response-factory.js';
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import type { Dispatcher, FrameworkRequest, FrameworkResponse } from '@fluojs/http';
|
|
2
|
+
export interface RequestResponseFactory<RawRequest, RawResponse, Response extends FrameworkResponse = FrameworkResponse> {
|
|
3
|
+
createRequest(rawRequest: RawRequest, signal: AbortSignal): Promise<FrameworkRequest>;
|
|
4
|
+
createRequestSignal(rawResponse: RawResponse): AbortSignal;
|
|
5
|
+
createResponse(rawResponse: RawResponse, rawRequest: RawRequest): Response;
|
|
6
|
+
resolveRequestId(rawRequest: RawRequest): string | undefined;
|
|
7
|
+
writeErrorResponse(error: unknown, response: Response, requestId?: string): Promise<void>;
|
|
8
|
+
}
|
|
9
|
+
export interface DispatchWithRequestResponseFactoryOptions<RawRequest, RawResponse, Response extends FrameworkResponse = FrameworkResponse> {
|
|
10
|
+
dispatcher?: Dispatcher;
|
|
11
|
+
dispatcherNotReadyMessage: string;
|
|
12
|
+
factory: RequestResponseFactory<RawRequest, RawResponse, Response>;
|
|
13
|
+
rawRequest: RawRequest;
|
|
14
|
+
rawResponse: RawResponse;
|
|
15
|
+
}
|
|
16
|
+
export declare function dispatchWithRequestResponseFactory<RawRequest, RawResponse, Response extends FrameworkResponse = FrameworkResponse>({ dispatcher, dispatcherNotReadyMessage, factory, rawRequest, rawResponse, }: DispatchWithRequestResponseFactoryOptions<RawRequest, RawResponse, Response>): Promise<Response>;
|
|
17
|
+
//# sourceMappingURL=request-response-factory.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"request-response-factory.d.ts","sourceRoot":"","sources":["../../src/adapters/request-response-factory.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,gBAAgB,EAAE,iBAAiB,EAAE,MAAM,cAAc,CAAC;AAEpF,MAAM,WAAW,sBAAsB,CACrC,UAAU,EACV,WAAW,EACX,QAAQ,SAAS,iBAAiB,GAAG,iBAAiB;IAEtD,aAAa,CAAC,UAAU,EAAE,UAAU,EAAE,MAAM,EAAE,WAAW,GAAG,OAAO,CAAC,gBAAgB,CAAC,CAAC;IACtF,mBAAmB,CAAC,WAAW,EAAE,WAAW,GAAG,WAAW,CAAC;IAC3D,cAAc,CAAC,WAAW,EAAE,WAAW,EAAE,UAAU,EAAE,UAAU,GAAG,QAAQ,CAAC;IAC3E,gBAAgB,CAAC,UAAU,EAAE,UAAU,GAAG,MAAM,GAAG,SAAS,CAAC;IAC7D,kBAAkB,CAAC,KAAK,EAAE,OAAO,EAAE,QAAQ,EAAE,QAAQ,EAAE,SAAS,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;CAC3F;AAED,MAAM,WAAW,yCAAyC,CACxD,UAAU,EACV,WAAW,EACX,QAAQ,SAAS,iBAAiB,GAAG,iBAAiB;IAEtD,UAAU,CAAC,EAAE,UAAU,CAAC;IACxB,yBAAyB,EAAE,MAAM,CAAC;IAClC,OAAO,EAAE,sBAAsB,CAAC,UAAU,EAAE,WAAW,EAAE,QAAQ,CAAC,CAAC;IACnE,UAAU,EAAE,UAAU,CAAC;IACvB,WAAW,EAAE,WAAW,CAAC;CAC1B;AAED,wBAAsB,kCAAkC,CACtD,UAAU,EACV,WAAW,EACX,QAAQ,SAAS,iBAAiB,GAAG,iBAAiB,EACtD,EACA,UAAU,EACV,yBAAyB,EACzB,OAAO,EACP,UAAU,EACV,WAAW,GACZ,EAAE,yCAAyC,CAAC,UAAU,EAAE,WAAW,EAAE,QAAQ,CAAC,GAAG,OAAO,CAAC,QAAQ,CAAC,CA0BlG"}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
export async function dispatchWithRequestResponseFactory({
|
|
2
|
+
dispatcher,
|
|
3
|
+
dispatcherNotReadyMessage,
|
|
4
|
+
factory,
|
|
5
|
+
rawRequest,
|
|
6
|
+
rawResponse
|
|
7
|
+
}) {
|
|
8
|
+
const frameworkResponse = factory.createResponse(rawResponse, rawRequest);
|
|
9
|
+
const signal = factory.createRequestSignal(rawResponse);
|
|
10
|
+
try {
|
|
11
|
+
const frameworkRequest = await factory.createRequest(rawRequest, signal);
|
|
12
|
+
if (!dispatcher) {
|
|
13
|
+
throw new Error(dispatcherNotReadyMessage);
|
|
14
|
+
}
|
|
15
|
+
await dispatcher.dispatch(frameworkRequest, frameworkResponse);
|
|
16
|
+
if (!frameworkResponse.committed) {
|
|
17
|
+
await frameworkResponse.send(undefined);
|
|
18
|
+
}
|
|
19
|
+
return frameworkResponse;
|
|
20
|
+
} catch (error) {
|
|
21
|
+
if (signal.aborted || frameworkResponse.committed) {
|
|
22
|
+
return frameworkResponse;
|
|
23
|
+
}
|
|
24
|
+
await factory.writeErrorResponse(error, frameworkResponse, factory.resolveRequestId(rawRequest));
|
|
25
|
+
return frameworkResponse;
|
|
26
|
+
}
|
|
27
|
+
}
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
import type { ApplicationContext, Application, MicroserviceApplication, BootstrapApplicationOptions, BootstrapModuleOptions, BootstrapResult, CreateApplicationOptions, CreateApplicationContextOptions, CreateMicroserviceOptions, ModuleDefinition, ModuleType } from './types.js';
|
|
2
|
+
/**
|
|
3
|
+
* Associates module metadata with a module type.
|
|
4
|
+
*
|
|
5
|
+
* @param moduleType Module class that should receive runtime module metadata.
|
|
6
|
+
* @param definition Module definition contract (`imports`, `providers`, `controllers`, `exports`, etc.).
|
|
7
|
+
* @returns The same `moduleType` reference for fluent helper composition.
|
|
8
|
+
*/
|
|
9
|
+
export declare function defineModule<T extends ModuleType>(moduleType: T, definition: ModuleDefinition): T;
|
|
10
|
+
/**
|
|
11
|
+
* Bootstraps the module graph and returns the root container baseline.
|
|
12
|
+
*
|
|
13
|
+
* @param rootModule Root module type used as the module-graph entrypoint.
|
|
14
|
+
* @param options Bootstrap-module options such as runtime providers and duplicate-provider policy.
|
|
15
|
+
* @returns The compiled module graph and initialized DI container baseline.
|
|
16
|
+
* @throws {DuplicateProviderError} When duplicate module provider tokens are detected and policy is `throw`.
|
|
17
|
+
* @throws {Error} When module-graph compilation or provider registration fails.
|
|
18
|
+
*/
|
|
19
|
+
export declare function bootstrapModule(rootModule: ModuleType, options?: BootstrapModuleOptions): BootstrapResult;
|
|
20
|
+
/**
|
|
21
|
+
* Creates the runtime application shell by composing bootstrap-level providers,
|
|
22
|
+
* module bootstrap, and lifecycle hook execution.
|
|
23
|
+
*
|
|
24
|
+
* @param options Runtime bootstrap contract including root module, adapter, and global runtime hooks.
|
|
25
|
+
* @returns A fully bootstrapped `Application` shell ready for `ready()`/`listen()`.
|
|
26
|
+
* @throws {Error} Propagates module-graph, lifecycle, or runtime initialization failures.
|
|
27
|
+
*/
|
|
28
|
+
export declare function bootstrapApplication(options: BootstrapApplicationOptions): Promise<Application>;
|
|
29
|
+
/**
|
|
30
|
+
* Canonical runtime bootstrap facade for HTTP, context-only, and microservice startup.
|
|
31
|
+
*/
|
|
32
|
+
export declare class FluoFactory {
|
|
33
|
+
/**
|
|
34
|
+
* Creates a full HTTP-capable application from the root module.
|
|
35
|
+
*
|
|
36
|
+
* @param rootModule Root module type used as the application composition entrypoint.
|
|
37
|
+
* @param options Optional HTTP-runtime bootstrap options.
|
|
38
|
+
* @returns A bootstrapped HTTP-capable `Application`.
|
|
39
|
+
* @throws {Error} Propagates bootstrap failures from `bootstrapApplication(...)`.
|
|
40
|
+
*/
|
|
41
|
+
static create(rootModule: ModuleType, options?: CreateApplicationOptions): Promise<Application>;
|
|
42
|
+
/**
|
|
43
|
+
* Creates an application context without attaching an HTTP runtime.
|
|
44
|
+
*
|
|
45
|
+
* @param rootModule Root module type used as the context composition entrypoint.
|
|
46
|
+
* @param options Optional context bootstrap options.
|
|
47
|
+
* @returns A bootstrapped `ApplicationContext` that exposes DI and lifecycle control.
|
|
48
|
+
* @throws {Error} Propagates module-graph, lifecycle, and context bootstrap failures.
|
|
49
|
+
*/
|
|
50
|
+
static createApplicationContext(rootModule: ModuleType, options?: CreateApplicationContextOptions): Promise<ApplicationContext>;
|
|
51
|
+
/**
|
|
52
|
+
* Creates a microservice application from the configured runtime token.
|
|
53
|
+
*
|
|
54
|
+
* @param rootModule Root module type used as the microservice composition entrypoint.
|
|
55
|
+
* @param options Optional microservice bootstrap options, including `microserviceToken` overrides.
|
|
56
|
+
* @returns A bootstrapped `MicroserviceApplication` wrapper around the resolved runtime transport.
|
|
57
|
+
* @throws {InvariantError} When the resolved runtime token does not implement `listen()`.
|
|
58
|
+
* @throws {Error} Propagates application-context bootstrap or runtime-resolution failures.
|
|
59
|
+
*/
|
|
60
|
+
static createMicroservice(rootModule: ModuleType, options?: CreateMicroserviceOptions): Promise<MicroserviceApplication>;
|
|
61
|
+
}
|
|
62
|
+
/**
|
|
63
|
+
* Lower-camel-case compatibility alias that matches the documented runtime entrypoint.
|
|
64
|
+
*
|
|
65
|
+
* @example
|
|
66
|
+
* ```ts
|
|
67
|
+
* import { fluoFactory } from '@fluojs/runtime';
|
|
68
|
+
*
|
|
69
|
+
* const app = await fluoFactory.create(AppModule);
|
|
70
|
+
* ```
|
|
71
|
+
*/
|
|
72
|
+
export declare const fluoFactory: typeof FluoFactory;
|
|
73
|
+
//# sourceMappingURL=bootstrap.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"bootstrap.d.ts","sourceRoot":"","sources":["../src/bootstrap.ts"],"names":[],"mappings":"AAoBA,OAAO,KAAK,EACV,kBAAkB,EAClB,WAAW,EAEX,uBAAuB,EAGvB,2BAA2B,EAC3B,sBAAsB,EACtB,eAAe,EAEf,wBAAwB,EACxB,+BAA+B,EAC/B,yBAAyB,EAEzB,gBAAgB,EAChB,UAAU,EAKX,MAAM,YAAY,CAAC;AAoTpB;;;;;;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,CA0B7G;AAkgBD;;;;;;;GAOG;AACH,wBAAsB,oBAAoB,CAAC,OAAO,EAAE,2BAA2B,GAAG,OAAO,CAAC,WAAW,CAAC,CA8GrG;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;IA6F9B;;;;;;;;OAQG;WACU,kBAAkB,CAC7B,UAAU,EAAE,UAAU,EACtB,OAAO,GAAE,yBAA8B,GACtC,OAAO,CAAC,uBAAuB,CAAC;CAuBpC;AAED;;;;;;;;;GASG;AACH,eAAO,MAAM,WAAW,oBAAc,CAAC"}
|