@dangao/bun-server 1.7.1 → 1.8.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/README.md +129 -21
- package/dist/di/decorators.d.ts +37 -0
- package/dist/di/decorators.d.ts.map +1 -1
- package/dist/di/index.d.ts +1 -1
- package/dist/di/index.d.ts.map +1 -1
- package/dist/di/module-registry.d.ts +17 -0
- package/dist/di/module-registry.d.ts.map +1 -1
- package/dist/events/decorators.d.ts +52 -0
- package/dist/events/decorators.d.ts.map +1 -0
- package/dist/events/event-module.d.ts +97 -0
- package/dist/events/event-module.d.ts.map +1 -0
- package/dist/events/index.d.ts +5 -0
- package/dist/events/index.d.ts.map +1 -0
- package/dist/events/service.d.ts +76 -0
- package/dist/events/service.d.ts.map +1 -0
- package/dist/events/types.d.ts +184 -0
- package/dist/events/types.d.ts.map +1 -0
- package/dist/index.d.ts +5 -3
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1511 -11
- package/dist/security/filter.d.ts +23 -0
- package/dist/security/filter.d.ts.map +1 -1
- package/dist/security/guards/builtin/auth-guard.d.ts +44 -0
- package/dist/security/guards/builtin/auth-guard.d.ts.map +1 -0
- package/dist/security/guards/builtin/index.d.ts +3 -0
- package/dist/security/guards/builtin/index.d.ts.map +1 -0
- package/dist/security/guards/builtin/roles-guard.d.ts +66 -0
- package/dist/security/guards/builtin/roles-guard.d.ts.map +1 -0
- package/dist/security/guards/decorators.d.ts +50 -0
- package/dist/security/guards/decorators.d.ts.map +1 -0
- package/dist/security/guards/execution-context.d.ts +56 -0
- package/dist/security/guards/execution-context.d.ts.map +1 -0
- package/dist/security/guards/guard-registry.d.ts +67 -0
- package/dist/security/guards/guard-registry.d.ts.map +1 -0
- package/dist/security/guards/index.d.ts +7 -0
- package/dist/security/guards/index.d.ts.map +1 -0
- package/dist/security/guards/reflector.d.ts +57 -0
- package/dist/security/guards/reflector.d.ts.map +1 -0
- package/dist/security/guards/types.d.ts +126 -0
- package/dist/security/guards/types.d.ts.map +1 -0
- package/dist/security/index.d.ts +1 -0
- package/dist/security/index.d.ts.map +1 -1
- package/dist/security/security-module.d.ts +20 -0
- package/dist/security/security-module.d.ts.map +1 -1
- package/dist/validation/class-validator.d.ts +108 -0
- package/dist/validation/class-validator.d.ts.map +1 -0
- package/dist/validation/custom-validator.d.ts +130 -0
- package/dist/validation/custom-validator.d.ts.map +1 -0
- package/dist/validation/errors.d.ts +22 -2
- package/dist/validation/errors.d.ts.map +1 -1
- package/dist/validation/index.d.ts +7 -1
- package/dist/validation/index.d.ts.map +1 -1
- package/dist/validation/rules/array.d.ts +33 -0
- package/dist/validation/rules/array.d.ts.map +1 -0
- package/dist/validation/rules/common.d.ts +90 -0
- package/dist/validation/rules/common.d.ts.map +1 -0
- package/dist/validation/rules/conditional.d.ts +30 -0
- package/dist/validation/rules/conditional.d.ts.map +1 -0
- package/dist/validation/rules/index.d.ts +5 -0
- package/dist/validation/rules/index.d.ts.map +1 -0
- package/dist/validation/rules/object.d.ts +30 -0
- package/dist/validation/rules/object.d.ts.map +1 -0
- package/dist/validation/types.d.ts +52 -1
- package/dist/validation/types.d.ts.map +1 -1
- package/docs/events.md +494 -0
- package/docs/guards.md +376 -0
- package/docs/guide.md +309 -1
- package/docs/request-lifecycle.md +444 -0
- package/docs/validation.md +407 -0
- package/docs/zh/events.md +494 -0
- package/docs/zh/guards.md +376 -0
- package/docs/zh/guide.md +309 -1
- package/docs/zh/request-lifecycle.md +444 -0
- package/docs/zh/validation.md +407 -0
- package/package.json +1 -1
- package/src/di/decorators.ts +46 -0
- package/src/di/index.ts +10 -1
- package/src/di/module-registry.ts +39 -0
- package/src/events/decorators.ts +103 -0
- package/src/events/event-module.ts +272 -0
- package/src/events/index.ts +32 -0
- package/src/events/service.ts +352 -0
- package/src/events/types.ts +223 -0
- package/src/index.ts +133 -1
- package/src/security/filter.ts +88 -8
- package/src/security/guards/builtin/auth-guard.ts +68 -0
- package/src/security/guards/builtin/index.ts +3 -0
- package/src/security/guards/builtin/roles-guard.ts +165 -0
- package/src/security/guards/decorators.ts +124 -0
- package/src/security/guards/execution-context.ts +152 -0
- package/src/security/guards/guard-registry.ts +164 -0
- package/src/security/guards/index.ts +7 -0
- package/src/security/guards/reflector.ts +99 -0
- package/src/security/guards/types.ts +144 -0
- package/src/security/index.ts +1 -0
- package/src/security/security-module.ts +72 -2
- package/src/validation/class-validator.ts +322 -0
- package/src/validation/custom-validator.ts +289 -0
- package/src/validation/errors.ts +50 -2
- package/src/validation/index.ts +103 -1
- package/src/validation/rules/array.ts +118 -0
- package/src/validation/rules/common.ts +286 -0
- package/src/validation/rules/conditional.ts +52 -0
- package/src/validation/rules/index.ts +51 -0
- package/src/validation/rules/object.ts +86 -0
- package/src/validation/types.ts +61 -1
- package/tests/di/global-module.test.ts +487 -0
- package/tests/events/event-decorators.test.ts +173 -0
- package/tests/events/event-emitter.test.ts +373 -0
- package/tests/events/event-module.test.ts +373 -0
- package/tests/security/guards/guards-integration.test.ts +371 -0
- package/tests/security/guards/guards.test.ts +775 -0
- package/tests/security/security-module.test.ts +2 -2
- package/tests/validation/class-validator.test.ts +349 -0
- package/tests/validation/custom-validator.test.ts +335 -0
- package/tests/validation/rules.test.ts +543 -0
package/README.md
CHANGED
|
@@ -49,16 +49,117 @@
|
|
|
49
49
|
|
|
50
50
|
## Architecture
|
|
51
51
|
|
|
52
|
+
### Request Lifecycle
|
|
53
|
+
|
|
54
|
+
The following diagram shows the complete request processing flow:
|
|
55
|
+
|
|
56
|
+
```
|
|
57
|
+
HTTP Request
|
|
58
|
+
↓
|
|
59
|
+
┌─────────────────────────────────────┐
|
|
60
|
+
│ Middleware Pipeline │ ← Global → Module → Controller → Method
|
|
61
|
+
│ (Logger, CORS, RateLimit, etc.) │
|
|
62
|
+
└─────────────────────────────────────┘
|
|
63
|
+
↓
|
|
64
|
+
┌─────────────────────────────────────┐
|
|
65
|
+
│ Security Filter │ ← Authentication / Authorization
|
|
66
|
+
│ (JWT, OAuth2, Role Check) │
|
|
67
|
+
└─────────────────────────────────────┘
|
|
68
|
+
↓
|
|
69
|
+
┌─────────────────────────────────────┐
|
|
70
|
+
│ Router Matching │ ← Path, Method, Params
|
|
71
|
+
│ (Static → Dynamic → Wildcard) │
|
|
72
|
+
└─────────────────────────────────────┘
|
|
73
|
+
↓
|
|
74
|
+
┌─────────────────────────────────────┐
|
|
75
|
+
│ Interceptors (Pre) │ ← Global → Controller → Method
|
|
76
|
+
│ (Cache, Log, Transform) │
|
|
77
|
+
└─────────────────────────────────────┘
|
|
78
|
+
↓
|
|
79
|
+
┌─────────────────────────────────────┐
|
|
80
|
+
│ Parameter Binding │ ← @Body, @Query, @Param, @Header
|
|
81
|
+
│ + Validation │ ← @Validate, IsString, IsEmail...
|
|
82
|
+
└─────────────────────────────────────┘
|
|
83
|
+
↓
|
|
84
|
+
┌─────────────────────────────────────┐
|
|
85
|
+
│ Controller Method │ ← Business Logic Execution
|
|
86
|
+
│ (with DI injected services) │
|
|
87
|
+
└─────────────────────────────────────┘
|
|
88
|
+
↓
|
|
89
|
+
┌─────────────────────────────────────┐
|
|
90
|
+
│ Interceptors (Post) │ ← Method → Controller → Global
|
|
91
|
+
│ (Response Transform) │
|
|
92
|
+
└─────────────────────────────────────┘
|
|
93
|
+
↓
|
|
94
|
+
┌─────────────────────────────────────┐
|
|
95
|
+
│ Exception Filter │ ← Exception Handling
|
|
96
|
+
│ (HttpException, ValidationError) │
|
|
97
|
+
└─────────────────────────────────────┘
|
|
98
|
+
↓
|
|
99
|
+
HTTP Response
|
|
100
|
+
```
|
|
101
|
+
|
|
102
|
+
**Execution Order**: Middleware → Security → Router → Interceptors(Pre) →
|
|
103
|
+
Validation → Handler → Interceptors(Post) → Exception Filter
|
|
104
|
+
|
|
105
|
+
### Module System
|
|
106
|
+
|
|
107
|
+
```
|
|
108
|
+
Application
|
|
109
|
+
│
|
|
110
|
+
├── ModuleRegistry
|
|
111
|
+
│ │
|
|
112
|
+
│ ├── ConfigModule (Configuration)
|
|
113
|
+
│ ├── LoggerModule (Logging)
|
|
114
|
+
│ ├── SecurityModule (Authentication)
|
|
115
|
+
│ │ └── auth/ (JWT, OAuth2)
|
|
116
|
+
│ ├── SwaggerModule (API Docs)
|
|
117
|
+
│ ├── CacheModule (Caching)
|
|
118
|
+
│ ├── DatabaseModule (Database)
|
|
119
|
+
│ │ └── ORM (Entity, Repository, Transaction)
|
|
120
|
+
│ ├── QueueModule (Job Queue)
|
|
121
|
+
│ ├── SessionModule (Session)
|
|
122
|
+
│ ├── MetricsModule (Metrics)
|
|
123
|
+
│ ├── HealthModule (Health Check)
|
|
124
|
+
│ └── Microservice/
|
|
125
|
+
│ ├── ConfigCenterModule
|
|
126
|
+
│ ├── ServiceRegistryModule
|
|
127
|
+
│ ├── ServiceClient
|
|
128
|
+
│ ├── Governance (Circuit Breaker/Rate Limit/Retry)
|
|
129
|
+
│ └── Tracing
|
|
130
|
+
│
|
|
131
|
+
├── ControllerRegistry
|
|
132
|
+
│ └── All module controllers
|
|
133
|
+
│
|
|
134
|
+
├── WebSocketGatewayRegistry
|
|
135
|
+
│ └── WebSocket gateways
|
|
136
|
+
│
|
|
137
|
+
└── InterceptorRegistry
|
|
138
|
+
└── Interceptor registry
|
|
139
|
+
```
|
|
140
|
+
|
|
141
|
+
### DI Container
|
|
142
|
+
|
|
52
143
|
```
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
144
|
+
Container
|
|
145
|
+
│
|
|
146
|
+
├── providers (Map<token, ProviderConfig>)
|
|
147
|
+
│ ├── Singleton (shared globally)
|
|
148
|
+
│ ├── Transient (new instance per resolve)
|
|
149
|
+
│ └── Scoped (per-request instance)
|
|
150
|
+
│
|
|
151
|
+
├── singletons (singleton instance cache)
|
|
152
|
+
│
|
|
153
|
+
├── scopedInstances (WeakMap, request-level cache)
|
|
154
|
+
│
|
|
155
|
+
├── dependencyPlans (dependency resolution plan cache)
|
|
156
|
+
│
|
|
157
|
+
└── postProcessors (instance post-processors)
|
|
60
158
|
```
|
|
61
159
|
|
|
160
|
+
For detailed lifecycle documentation, see
|
|
161
|
+
[Request Lifecycle](./docs/request-lifecycle.md).
|
|
162
|
+
|
|
62
163
|
## Getting Started
|
|
63
164
|
|
|
64
165
|
### Requirements
|
|
@@ -78,7 +179,10 @@ Application (Controllers / Modules / DI)
|
|
|
78
179
|
}
|
|
79
180
|
```
|
|
80
181
|
|
|
81
|
-
Without these, dependency injection will fail (injected services will be
|
|
182
|
+
Without these, dependency injection will fail (injected services will be
|
|
183
|
+
`undefined`). See
|
|
184
|
+
[Troubleshooting Guide](./docs/troubleshooting.md#-critical-injected-dependencies-are-undefined)
|
|
185
|
+
for details.
|
|
82
186
|
|
|
83
187
|
### Install
|
|
84
188
|
|
|
@@ -117,14 +221,14 @@ app.listen();
|
|
|
117
221
|
### Useful scripts
|
|
118
222
|
|
|
119
223
|
```bash
|
|
120
|
-
bun --cwd=packages
|
|
121
|
-
bun --cwd=packages
|
|
122
|
-
bun --cwd=packages
|
|
123
|
-
bun --cwd=packages
|
|
224
|
+
bun --cwd=packages/bun-server test
|
|
225
|
+
bun --cwd=packages/bun-server run bench
|
|
226
|
+
bun --cwd=packages/bun-server run bench:router
|
|
227
|
+
bun --cwd=packages/bun-server run bench:di
|
|
124
228
|
```
|
|
125
229
|
|
|
126
230
|
> Running `bun test` from the repo root fails because Bun only scans the current
|
|
127
|
-
> workspace. Use the commands above or `cd packages
|
|
231
|
+
> workspace. Use the commands above or `cd packages/bun-server` first.
|
|
128
232
|
|
|
129
233
|
### Advanced Example: Interface + Symbol + Module
|
|
130
234
|
|
|
@@ -258,7 +362,8 @@ Examples are organized by difficulty and feature category:
|
|
|
258
362
|
- `02-basic-routing.ts` - HTTP methods and route parameters
|
|
259
363
|
- `03-dependency-injection.ts` - DI basics with services
|
|
260
364
|
|
|
261
|
-
- **[Core Features](./examples/01-core-features/)** - Deep dive into framework
|
|
365
|
+
- **[Core Features](./examples/01-core-features/)** - Deep dive into framework
|
|
366
|
+
mechanics
|
|
262
367
|
- `basic-app.ts` - DI + Logger + Swagger + Config integration
|
|
263
368
|
- `multi-module-app.ts` - Module dependencies and organization
|
|
264
369
|
- `context-scope-app.ts` - Request scoping and ContextService
|
|
@@ -283,7 +388,8 @@ Examples are organized by difficulty and feature category:
|
|
|
283
388
|
|
|
284
389
|
### 🔑 Symbol + Interface Pattern
|
|
285
390
|
|
|
286
|
-
This framework features a unique **Symbol + Interface co-naming pattern** that
|
|
391
|
+
This framework features a unique **Symbol + Interface co-naming pattern** that
|
|
392
|
+
solves TypeScript's type erasure problem:
|
|
287
393
|
|
|
288
394
|
```typescript
|
|
289
395
|
// 1. Define interface and Symbol with same name
|
|
@@ -312,16 +418,18 @@ constructor(private readonly userService: UserService) {}
|
|
|
312
418
|
|
|
313
419
|
**Key**: Import as `import { UserService }` (not `import type { UserService }`).
|
|
314
420
|
|
|
315
|
-
See [Symbol + Interface Pattern Guide](./docs/symbol-interface-pattern.md) for
|
|
421
|
+
See [Symbol + Interface Pattern Guide](./docs/symbol-interface-pattern.md) for
|
|
422
|
+
details.
|
|
316
423
|
|
|
317
424
|
### 🔌 Extensions
|
|
318
425
|
|
|
319
|
-
- `packages
|
|
426
|
+
- `packages/bun-server/src/extensions/`: Official extensions (e.g.
|
|
320
427
|
`LoggerExtension`) for plugging in external capabilities.
|
|
321
428
|
|
|
322
429
|
### 📖 Complete Example Index
|
|
323
430
|
|
|
324
|
-
See [examples/README.md](./examples/README.md) for the complete catalog with
|
|
431
|
+
See [examples/README.md](./examples/README.md) for the complete catalog with
|
|
432
|
+
learning paths, difficulty ratings, and usage scenarios.
|
|
325
433
|
|
|
326
434
|
## Benchmark Suite
|
|
327
435
|
|
|
@@ -347,14 +455,14 @@ Or use `bun run bench*` scripts for convenience.
|
|
|
347
455
|
- **English** (default): `docs/api.md`, `docs/guide.md`,
|
|
348
456
|
`docs/best-practices.md`, `docs/migration.md`, `docs/extensions.md`,
|
|
349
457
|
`docs/deployment.md`, `docs/performance.md`, `docs/troubleshooting.md`,
|
|
350
|
-
`docs/error-handling.md`.
|
|
458
|
+
`docs/error-handling.md`, `docs/request-lifecycle.md`.
|
|
351
459
|
- **Chinese**: mirrored under `docs/zh/`. If something is missing, please fall
|
|
352
460
|
back to the English source.
|
|
353
461
|
|
|
354
462
|
## Roadmap
|
|
355
463
|
|
|
356
|
-
Detailed milestones and history are tracked in
|
|
357
|
-
|
|
464
|
+
Detailed milestones and history are tracked in the [`.roadmap/`](./.roadmap/)
|
|
465
|
+
directory.
|
|
358
466
|
|
|
359
467
|
## AI-Assisted Development
|
|
360
468
|
|
package/dist/di/decorators.d.ts
CHANGED
|
@@ -1,6 +1,10 @@
|
|
|
1
1
|
import "reflect-metadata";
|
|
2
2
|
import { type DependencyMetadata, Lifecycle } from "./types";
|
|
3
3
|
import type { Constructor } from "@/core/types";
|
|
4
|
+
/**
|
|
5
|
+
* 全局模块元数据键
|
|
6
|
+
*/
|
|
7
|
+
export declare const GLOBAL_MODULE_METADATA_KEY: unique symbol;
|
|
4
8
|
/**
|
|
5
9
|
* Injectable 装饰器
|
|
6
10
|
* 标记类为可注入的
|
|
@@ -40,4 +44,37 @@ export declare function getLifecycle(target: Constructor<unknown>): Lifecycle |
|
|
|
40
44
|
* @returns 类型引用
|
|
41
45
|
*/
|
|
42
46
|
export declare function getTypeReference(constructor: Constructor<unknown>, parameterIndex: number): Constructor<unknown> | undefined;
|
|
47
|
+
/**
|
|
48
|
+
* Global 装饰器
|
|
49
|
+
* 标记模块为全局模块,其导出的提供者可在任何模块中使用,无需显式导入
|
|
50
|
+
*
|
|
51
|
+
* @example
|
|
52
|
+
* ```typescript
|
|
53
|
+
* @Global()
|
|
54
|
+
* @Module({
|
|
55
|
+
* providers: [ConfigService],
|
|
56
|
+
* exports: [ConfigService],
|
|
57
|
+
* })
|
|
58
|
+
* class GlobalConfigModule {}
|
|
59
|
+
*
|
|
60
|
+
* // 其他模块无需导入 GlobalConfigModule 即可使用 ConfigService
|
|
61
|
+
* @Module({
|
|
62
|
+
* controllers: [UserController],
|
|
63
|
+
* providers: [UserService],
|
|
64
|
+
* })
|
|
65
|
+
* class UserModule {}
|
|
66
|
+
*
|
|
67
|
+
* @Injectable()
|
|
68
|
+
* class UserService {
|
|
69
|
+
* constructor(private readonly config: ConfigService) {}
|
|
70
|
+
* }
|
|
71
|
+
* ```
|
|
72
|
+
*/
|
|
73
|
+
export declare function Global(): ClassDecorator;
|
|
74
|
+
/**
|
|
75
|
+
* 检查模块是否为全局模块
|
|
76
|
+
* @param target - 目标模块类
|
|
77
|
+
* @returns 是否为全局模块
|
|
78
|
+
*/
|
|
79
|
+
export declare function isGlobalModule(target: Constructor<unknown>): boolean;
|
|
43
80
|
//# sourceMappingURL=decorators.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"decorators.d.ts","sourceRoot":"","sources":["../../src/di/decorators.ts"],"names":[],"mappings":"AAAA,OAAO,kBAAkB,CAAC;AAC1B,OAAO,EAAE,KAAK,kBAAkB,EAAE,SAAS,EAAE,MAAM,SAAS,CAAC;AAE7D,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;
|
|
1
|
+
{"version":3,"file":"decorators.d.ts","sourceRoot":"","sources":["../../src/di/decorators.ts"],"names":[],"mappings":"AAAA,OAAO,kBAAkB,CAAC;AAC1B,OAAO,EAAE,KAAK,kBAAkB,EAAE,SAAS,EAAE,MAAM,SAAS,CAAC;AAE7D,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AAQhD;;GAEG;AACH,eAAO,MAAM,0BAA0B,eAA6C,CAAC;AAUrF;;;;GAIG;AACH,wBAAgB,UAAU,CACxB,MAAM,CAAC,EAAE;IAAE,SAAS,CAAC,EAAE,SAAS,CAAA;CAAE,GACjC,CAAC,MAAM,EAAE,WAAW,CAAC,OAAO,CAAC,KAAK,IAAI,CASxC;AAED;;;;GAIG;AACH,wBAAgB,MAAM,CACpB,KAAK,CAAC,EAAE,WAAW,CAAC,OAAO,CAAC,GAAG,MAAM,GAAG,MAAM,GAC7C,kBAAkB,CAoGpB;AAED;;;;GAIG;AACH,wBAAgB,qBAAqB,CAAC,MAAM,EAAE,OAAO,GAAG,kBAAkB,EAAE,CAuC3E;AAED;;;;GAIG;AACH,wBAAgB,YAAY,CAAC,MAAM,EAAE,WAAW,CAAC,OAAO,CAAC,GAAG,OAAO,CAElE;AAED;;;;GAIG;AACH,wBAAgB,YAAY,CAC1B,MAAM,EAAE,WAAW,CAAC,OAAO,CAAC,GAC3B,SAAS,GAAG,SAAS,CAEvB;AAED;;;;;GAKG;AACH,wBAAgB,gBAAgB,CAC9B,WAAW,EAAE,WAAW,CAAC,OAAO,CAAC,EACjC,cAAc,EAAE,MAAM,GACrB,WAAW,CAAC,OAAO,CAAC,GAAG,SAAS,CAMlC;AAED;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AACH,wBAAgB,MAAM,IAAI,cAAc,CAIvC;AAED;;;;GAIG;AACH,wBAAgB,cAAc,CAAC,MAAM,EAAE,WAAW,CAAC,OAAO,CAAC,GAAG,OAAO,CAEpE"}
|
package/dist/di/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
export { Container } from './container';
|
|
2
|
-
export { Injectable, Inject, getDependencyMetadata, isInjectable, getLifecycle } from './decorators';
|
|
2
|
+
export { Injectable, Inject, getDependencyMetadata, isInjectable, getLifecycle, Global, isGlobalModule, GLOBAL_MODULE_METADATA_KEY, } from './decorators';
|
|
3
3
|
export { Lifecycle, INSTANCE_POST_PROCESSOR_TOKEN, type ProviderConfig, type DependencyMetadata, type InstancePostProcessor, } from './types';
|
|
4
4
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/di/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/di/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AACxC,OAAO,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/di/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AACxC,OAAO,EACL,UAAU,EACV,MAAM,EACN,qBAAqB,EACrB,YAAY,EACZ,YAAY,EACZ,MAAM,EACN,cAAc,EACd,0BAA0B,GAC3B,MAAM,cAAc,CAAC;AACtB,OAAO,EACL,SAAS,EACT,6BAA6B,EAC7B,KAAK,cAAc,EACnB,KAAK,kBAAkB,EACvB,KAAK,qBAAqB,GAC3B,MAAM,SAAS,CAAC"}
|
|
@@ -10,18 +10,35 @@ interface ModuleRef {
|
|
|
10
10
|
attachedParents: Set<Container>;
|
|
11
11
|
extensions: ApplicationExtension[];
|
|
12
12
|
middlewares: Middleware[];
|
|
13
|
+
/**
|
|
14
|
+
* 是否为全局模块
|
|
15
|
+
*/
|
|
16
|
+
isGlobal: boolean;
|
|
13
17
|
}
|
|
14
18
|
export declare class ModuleRegistry {
|
|
15
19
|
private static instance;
|
|
16
20
|
private readonly moduleRefs;
|
|
17
21
|
private readonly processing;
|
|
18
22
|
private rootContainer?;
|
|
23
|
+
/**
|
|
24
|
+
* 存储全局模块列表,用于在其他模块注册时自动附加全局 exports
|
|
25
|
+
*/
|
|
26
|
+
private readonly globalModules;
|
|
19
27
|
static getInstance(): ModuleRegistry;
|
|
20
28
|
register(moduleClass: ModuleClass, parentContainer: Container): ModuleRef;
|
|
21
29
|
getModuleRef(moduleClass: ModuleClass): ModuleRef | undefined;
|
|
22
30
|
clear(): void;
|
|
31
|
+
/**
|
|
32
|
+
* 获取所有全局模块
|
|
33
|
+
*/
|
|
34
|
+
getGlobalModules(): ModuleClass[];
|
|
23
35
|
private processModule;
|
|
24
36
|
private getOrCreateModuleRef;
|
|
37
|
+
/**
|
|
38
|
+
* 将全局模块的 exports 注册到根容器
|
|
39
|
+
* 这样所有模块都可以访问全局模块导出的提供者
|
|
40
|
+
*/
|
|
41
|
+
private registerGlobalExports;
|
|
25
42
|
private registerProviders;
|
|
26
43
|
private registerControllers;
|
|
27
44
|
private attachModuleToParent;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"module-registry.d.ts","sourceRoot":"","sources":["../../src/di/module-registry.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAExC,OAAO,EAAE,iBAAiB,EAAE,KAAK,WAAW,EAA2C,MAAM,UAAU,CAAC;
|
|
1
|
+
{"version":3,"file":"module-registry.d.ts","sourceRoot":"","sources":["../../src/di/module-registry.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAExC,OAAO,EAAE,iBAAiB,EAAE,KAAK,WAAW,EAA2C,MAAM,UAAU,CAAC;AAGxG,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,qBAAqB,CAAC;AAChE,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAEhD,UAAU,SAAS;IACjB,WAAW,EAAE,WAAW,CAAC;IACzB,QAAQ,EAAE,UAAU,CAAC,OAAO,iBAAiB,CAAC,CAAC;IAC/C,SAAS,EAAE,SAAS,CAAC;IACrB,qBAAqB,EAAE,OAAO,CAAC;IAC/B,eAAe,EAAE,GAAG,CAAC,SAAS,CAAC,CAAC;IAChC,UAAU,EAAE,oBAAoB,EAAE,CAAC;IACnC,WAAW,EAAE,UAAU,EAAE,CAAC;IAC1B;;OAEG;IACH,QAAQ,EAAE,OAAO,CAAC;CACnB;AAED,qBAAa,cAAc;IACzB,OAAO,CAAC,MAAM,CAAC,QAAQ,CAAiB;IACxC,OAAO,CAAC,QAAQ,CAAC,UAAU,CAAqC;IAChE,OAAO,CAAC,QAAQ,CAAC,UAAU,CAA0B;IACrD,OAAO,CAAC,aAAa,CAAC,CAAY;IAClC;;OAEG;IACH,OAAO,CAAC,QAAQ,CAAC,aAAa,CAA0B;WAE1C,WAAW,IAAI,cAAc;IAOpC,QAAQ,CAAC,WAAW,EAAE,WAAW,EAAE,eAAe,EAAE,SAAS,GAAG,SAAS;IAOzE,YAAY,CAAC,WAAW,EAAE,WAAW,GAAG,SAAS,GAAG,SAAS;IAI7D,KAAK,IAAI,IAAI;IAOpB;;OAEG;IACI,gBAAgB,IAAI,WAAW,EAAE;IAIxC,OAAO,CAAC,aAAa;IAcrB,OAAO,CAAC,oBAAoB;IAkC5B;;;OAGG;IACH,OAAO,CAAC,qBAAqB;IAS7B,OAAO,CAAC,iBAAiB;IAgCzB,OAAO,CAAC,mBAAmB;IAW3B,OAAO,CAAC,oBAAoB;IAkB5B;;OAEG;IACI,mBAAmB,CAAC,WAAW,EAAE,WAAW,GAAG,oBAAoB,EAAE;IAQ5E;;OAEG;IACI,oBAAoB,CAAC,WAAW,EAAE,WAAW,GAAG,UAAU,EAAE;IAQnE,OAAO,CAAC,cAAc;CAgBvB"}
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import 'reflect-metadata';
|
|
2
|
+
import { type OnEventMethodMetadata } from './types';
|
|
3
|
+
/**
|
|
4
|
+
* OnEvent 装饰器选项
|
|
5
|
+
*/
|
|
6
|
+
export interface OnEventOptions {
|
|
7
|
+
/**
|
|
8
|
+
* 是否异步处理
|
|
9
|
+
* @default false
|
|
10
|
+
*/
|
|
11
|
+
async?: boolean;
|
|
12
|
+
/**
|
|
13
|
+
* 监听器优先级(数值越大优先级越高)
|
|
14
|
+
* @default 0
|
|
15
|
+
*/
|
|
16
|
+
priority?: number;
|
|
17
|
+
}
|
|
18
|
+
/**
|
|
19
|
+
* 事件监听器装饰器
|
|
20
|
+
* 用于标记方法为事件监听器
|
|
21
|
+
*
|
|
22
|
+
* @param event - 事件名称或标识符
|
|
23
|
+
* @param options - 监听选项
|
|
24
|
+
*
|
|
25
|
+
* @example
|
|
26
|
+
* ```typescript
|
|
27
|
+
* @Injectable()
|
|
28
|
+
* class NotificationService {
|
|
29
|
+
* @OnEvent('user.created')
|
|
30
|
+
* handleUserCreated(payload: UserCreatedEvent) {
|
|
31
|
+
* console.log('User created:', payload.userId);
|
|
32
|
+
* }
|
|
33
|
+
*
|
|
34
|
+
* @OnEvent(USER_DELETED, { async: true, priority: 10 })
|
|
35
|
+
* async handleUserDeleted(payload: UserDeletedEvent) {
|
|
36
|
+
* await this.cleanup(payload.userId);
|
|
37
|
+
* }
|
|
38
|
+
* }
|
|
39
|
+
* ```
|
|
40
|
+
*/
|
|
41
|
+
export declare function OnEvent(event: string | symbol, options?: OnEventOptions): MethodDecorator;
|
|
42
|
+
/**
|
|
43
|
+
* 获取类的事件监听器元数据
|
|
44
|
+
* @param target - 目标类
|
|
45
|
+
*/
|
|
46
|
+
export declare function getOnEventMetadata(target: Function): OnEventMethodMetadata[] | undefined;
|
|
47
|
+
/**
|
|
48
|
+
* 检查类是否为事件监听器类
|
|
49
|
+
* @param target - 目标类
|
|
50
|
+
*/
|
|
51
|
+
export declare function isEventListenerClass(target: Function): boolean;
|
|
52
|
+
//# sourceMappingURL=decorators.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"decorators.d.ts","sourceRoot":"","sources":["../../src/events/decorators.ts"],"names":[],"mappings":"AAAA,OAAO,kBAAkB,CAAC;AAC1B,OAAO,EAGL,KAAK,qBAAqB,EAC3B,MAAM,SAAS,CAAC;AAEjB;;GAEG;AACH,MAAM,WAAW,cAAc;IAC7B;;;OAGG;IACH,KAAK,CAAC,EAAE,OAAO,CAAC;IAEhB;;;OAGG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB;AAED;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,wBAAgB,OAAO,CACrB,KAAK,EAAE,MAAM,GAAG,MAAM,EACtB,OAAO,GAAE,cAAmB,GAC3B,eAAe,CAgCjB;AAED;;;GAGG;AACH,wBAAgB,kBAAkB,CAChC,MAAM,EAAE,QAAQ,GACf,qBAAqB,EAAE,GAAG,SAAS,CAErC;AAED;;;GAGG;AACH,wBAAgB,oBAAoB,CAAC,MAAM,EAAE,QAAQ,GAAG,OAAO,CAI9D"}
|
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
import 'reflect-metadata';
|
|
2
|
+
import type { Container } from '../di/container';
|
|
3
|
+
import { type EventModuleOptions, type EventEmitter } from './types';
|
|
4
|
+
/**
|
|
5
|
+
* 事件监听器扫描器
|
|
6
|
+
* 负责扫描和注册带有 @OnEvent() 装饰器的方法
|
|
7
|
+
*/
|
|
8
|
+
export declare class EventListenerScanner {
|
|
9
|
+
private readonly eventEmitter;
|
|
10
|
+
private readonly container;
|
|
11
|
+
/**
|
|
12
|
+
* 构造函数
|
|
13
|
+
* @param eventEmitter - 事件发射器服务
|
|
14
|
+
* @param container - DI 容器
|
|
15
|
+
*/
|
|
16
|
+
constructor(eventEmitter: EventEmitter, container: Container);
|
|
17
|
+
/**
|
|
18
|
+
* 扫描并注册监听器类
|
|
19
|
+
* @param listenerClasses - 监听器类数组
|
|
20
|
+
*/
|
|
21
|
+
scanAndRegister(listenerClasses: Function[]): void;
|
|
22
|
+
/**
|
|
23
|
+
* 注册单个监听器类
|
|
24
|
+
* @param listenerClass - 监听器类
|
|
25
|
+
*/
|
|
26
|
+
registerListenerClass(listenerClass: Function): void;
|
|
27
|
+
}
|
|
28
|
+
/**
|
|
29
|
+
* 事件监听器扫描器 Token
|
|
30
|
+
*/
|
|
31
|
+
export declare const EVENT_LISTENER_SCANNER_TOKEN: unique symbol;
|
|
32
|
+
export declare class EventModule {
|
|
33
|
+
/**
|
|
34
|
+
* 已注册的监听器类(用于模块初始化后扫描)
|
|
35
|
+
*/
|
|
36
|
+
private static listenerClasses;
|
|
37
|
+
/**
|
|
38
|
+
* 创建事件模块
|
|
39
|
+
* @param options - 模块配置
|
|
40
|
+
*
|
|
41
|
+
* @example
|
|
42
|
+
* ```typescript
|
|
43
|
+
* @Module({
|
|
44
|
+
* imports: [
|
|
45
|
+
* EventModule.forRoot({
|
|
46
|
+
* wildcard: true,
|
|
47
|
+
* maxListeners: 20,
|
|
48
|
+
* }),
|
|
49
|
+
* ],
|
|
50
|
+
* providers: [NotificationService, AnalyticsService],
|
|
51
|
+
* })
|
|
52
|
+
* class AppModule {}
|
|
53
|
+
* ```
|
|
54
|
+
*/
|
|
55
|
+
static forRoot(options?: EventModuleOptions): typeof EventModule;
|
|
56
|
+
/**
|
|
57
|
+
* 注册监听器类
|
|
58
|
+
* 用于在模块配置后手动注册监听器类
|
|
59
|
+
*
|
|
60
|
+
* @param listenerClasses - 监听器类数组
|
|
61
|
+
*
|
|
62
|
+
* @example
|
|
63
|
+
* ```typescript
|
|
64
|
+
* EventModule.registerListeners([NotificationService, AnalyticsService]);
|
|
65
|
+
* ```
|
|
66
|
+
*/
|
|
67
|
+
static registerListeners(listenerClasses: Function[]): void;
|
|
68
|
+
/**
|
|
69
|
+
* 初始化事件监听器扫描
|
|
70
|
+
* 在应用启动时调用,扫描并注册所有监听器
|
|
71
|
+
*
|
|
72
|
+
* @param listenerContainer - 用于解析监听器服务的 DI 容器(通常是应用模块的容器)
|
|
73
|
+
* @param additionalListeners - 额外的监听器类
|
|
74
|
+
*
|
|
75
|
+
* @example
|
|
76
|
+
* ```typescript
|
|
77
|
+
* // 在 registerModule 之后调用
|
|
78
|
+
* app.registerModule(RootModule);
|
|
79
|
+
*
|
|
80
|
+
* // 方式1:传入监听器所在模块的容器(推荐)
|
|
81
|
+
* const moduleRef = ModuleRegistry.getInstance().getModuleRef(RootModule);
|
|
82
|
+
* EventModule.initializeListeners(moduleRef?.container, [NotificationService]);
|
|
83
|
+
*
|
|
84
|
+
* // 方式2:如果监听器在 EventModule 的 providers 中注册,可以不传容器
|
|
85
|
+
* EventModule.initializeListeners(undefined, [NotificationService]);
|
|
86
|
+
* ```
|
|
87
|
+
*/
|
|
88
|
+
static initializeListeners(listenerContainer?: Container, additionalListeners?: Function[]): void;
|
|
89
|
+
/**
|
|
90
|
+
* 获取事件发射器服务(静态方法)
|
|
91
|
+
* 用于在模块配置后获取事件发射器
|
|
92
|
+
*
|
|
93
|
+
* @param container - DI 容器(可选,如果不提供则从 EventModule 自身的容器获取)
|
|
94
|
+
*/
|
|
95
|
+
static getEventEmitter(container?: Container): EventEmitter | undefined;
|
|
96
|
+
}
|
|
97
|
+
//# sourceMappingURL=event-module.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"event-module.d.ts","sourceRoot":"","sources":["../../src/events/event-module.ts"],"names":[],"mappings":"AAAA,OAAO,kBAAkB,CAAC;AAE1B,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAKjD,OAAO,EAGL,KAAK,kBAAkB,EACvB,KAAK,YAAY,EAClB,MAAM,SAAS,CAAC;AAEjB;;;GAGG;AACH,qBAAa,oBAAoB;IAO7B,OAAO,CAAC,QAAQ,CAAC,YAAY;IAC7B,OAAO,CAAC,QAAQ,CAAC,SAAS;IAP5B;;;;OAIG;gBAEgB,YAAY,EAAE,YAAY,EAC1B,SAAS,EAAE,SAAS;IAGvC;;;OAGG;IACI,eAAe,CAAC,eAAe,EAAE,QAAQ,EAAE,GAAG,IAAI;IAMzD;;;OAGG;IACI,qBAAqB,CAAC,aAAa,EAAE,QAAQ,GAAG,IAAI;CA2C5D;AAED;;GAEG;AACH,eAAO,MAAM,4BAA4B,eAExC,CAAC;AAEF,qBAGa,WAAW;IACtB;;OAEG;IACH,OAAO,CAAC,MAAM,CAAC,eAAe,CAAkB;IAEhD;;;;;;;;;;;;;;;;;OAiBG;WACW,OAAO,CAAC,OAAO,GAAE,kBAAuB,GAAG,OAAO,WAAW;IAsC3E;;;;;;;;;;OAUG;WACW,iBAAiB,CAAC,eAAe,EAAE,QAAQ,EAAE,GAAG,IAAI;IAIlE;;;;;;;;;;;;;;;;;;;OAmBG;WACW,mBAAmB,CAC/B,iBAAiB,CAAC,EAAE,SAAS,EAC7B,mBAAmB,GAAE,QAAQ,EAAO,GACnC,IAAI;IA2CP;;;;;OAKG;WACW,eAAe,CAAC,SAAS,CAAC,EAAE,SAAS,GAAG,YAAY,GAAG,SAAS;CAwB/E"}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
export { EVENT_EMITTER_TOKEN, EVENT_OPTIONS_TOKEN, ON_EVENT_METADATA_KEY, EVENT_LISTENER_CLASS_METADATA_KEY, type EventEmitter, type EventListener, type EventMetadata, type EventModuleOptions, type ListenerOptions, type OnEventMethodMetadata, type RegisteredListener, } from './types';
|
|
2
|
+
export { EventEmitterService } from './service';
|
|
3
|
+
export { OnEvent, getOnEventMetadata, isEventListenerClass, type OnEventOptions, } from './decorators';
|
|
4
|
+
export { EventModule, EventListenerScanner, EVENT_LISTENER_SCANNER_TOKEN, } from './event-module';
|
|
5
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/events/index.ts"],"names":[],"mappings":"AACA,OAAO,EACL,mBAAmB,EACnB,mBAAmB,EACnB,qBAAqB,EACrB,iCAAiC,EACjC,KAAK,YAAY,EACjB,KAAK,aAAa,EAClB,KAAK,aAAa,EAClB,KAAK,kBAAkB,EACvB,KAAK,eAAe,EACpB,KAAK,qBAAqB,EAC1B,KAAK,kBAAkB,GACxB,MAAM,SAAS,CAAC;AAGjB,OAAO,EAAE,mBAAmB,EAAE,MAAM,WAAW,CAAC;AAGhD,OAAO,EACL,OAAO,EACP,kBAAkB,EAClB,oBAAoB,EACpB,KAAK,cAAc,GACpB,MAAM,cAAc,CAAC;AAGtB,OAAO,EACL,WAAW,EACX,oBAAoB,EACpB,4BAA4B,GAC7B,MAAM,gBAAgB,CAAC"}
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
import type { EventEmitter, EventListener, EventModuleOptions, ListenerOptions } from './types';
|
|
2
|
+
/**
|
|
3
|
+
* 事件发射器服务实现
|
|
4
|
+
*/
|
|
5
|
+
export declare class EventEmitterService implements EventEmitter {
|
|
6
|
+
/**
|
|
7
|
+
* 事件监听器映射
|
|
8
|
+
*/
|
|
9
|
+
private listeners;
|
|
10
|
+
/**
|
|
11
|
+
* 模块选项
|
|
12
|
+
*/
|
|
13
|
+
private options;
|
|
14
|
+
/**
|
|
15
|
+
* 构造函数
|
|
16
|
+
* @param options - 模块选项
|
|
17
|
+
*/
|
|
18
|
+
constructor(options?: EventModuleOptions);
|
|
19
|
+
/**
|
|
20
|
+
* 发布事件(同步触发所有监听器,不等待异步监听器完成)
|
|
21
|
+
*/
|
|
22
|
+
emit<T>(event: string | symbol, payload: T): void;
|
|
23
|
+
/**
|
|
24
|
+
* 异步发布事件(等待所有监听器完成)
|
|
25
|
+
*/
|
|
26
|
+
emitAsync<T>(event: string | symbol, payload: T): Promise<void>;
|
|
27
|
+
/**
|
|
28
|
+
* 订阅事件
|
|
29
|
+
*/
|
|
30
|
+
on<T>(event: string | symbol, listener: EventListener<T>, options?: ListenerOptions): () => void;
|
|
31
|
+
/**
|
|
32
|
+
* 一次性订阅
|
|
33
|
+
*/
|
|
34
|
+
once<T>(event: string | symbol, listener: EventListener<T>, options?: ListenerOptions): () => void;
|
|
35
|
+
/**
|
|
36
|
+
* 取消订阅
|
|
37
|
+
*/
|
|
38
|
+
off<T>(event: string | symbol, listener: EventListener<T>): void;
|
|
39
|
+
/**
|
|
40
|
+
* 移除所有监听器
|
|
41
|
+
*/
|
|
42
|
+
removeAllListeners(event?: string | symbol): void;
|
|
43
|
+
/**
|
|
44
|
+
* 获取指定事件的监听器数量
|
|
45
|
+
*/
|
|
46
|
+
listenerCount(event: string | symbol): number;
|
|
47
|
+
/**
|
|
48
|
+
* 获取所有已注册的事件名称
|
|
49
|
+
*/
|
|
50
|
+
eventNames(): (string | symbol)[];
|
|
51
|
+
/**
|
|
52
|
+
* 添加监听器
|
|
53
|
+
*/
|
|
54
|
+
private addListener;
|
|
55
|
+
/**
|
|
56
|
+
* 解析事件名称(添加全局前缀)
|
|
57
|
+
*/
|
|
58
|
+
private resolveEventName;
|
|
59
|
+
/**
|
|
60
|
+
* 获取匹配的监听器(支持通配符)
|
|
61
|
+
*/
|
|
62
|
+
private getMatchedListeners;
|
|
63
|
+
/**
|
|
64
|
+
* 匹配通配符模式
|
|
65
|
+
*/
|
|
66
|
+
private matchWildcard;
|
|
67
|
+
/**
|
|
68
|
+
* 按优先级排序监听器
|
|
69
|
+
*/
|
|
70
|
+
private sortListenersByPriority;
|
|
71
|
+
/**
|
|
72
|
+
* 处理错误
|
|
73
|
+
*/
|
|
74
|
+
private handleError;
|
|
75
|
+
}
|
|
76
|
+
//# sourceMappingURL=service.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"service.d.ts","sourceRoot":"","sources":["../../src/events/service.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,YAAY,EACZ,aAAa,EACb,kBAAkB,EAClB,eAAe,EAEhB,MAAM,SAAS,CAAC;AAEjB;;GAEG;AACH,qBAAa,mBAAoB,YAAW,YAAY;IACtD;;OAEG;IACH,OAAO,CAAC,SAAS,CAAyD;IAE1E;;OAEG;IACH,OAAO,CAAC,OAAO,CAAqB;IAEpC;;;OAGG;gBACgB,OAAO,GAAE,kBAAuB;IASnD;;OAEG;IACI,IAAI,CAAC,CAAC,EAAE,KAAK,EAAE,MAAM,GAAG,MAAM,EAAE,OAAO,EAAE,CAAC,GAAG,IAAI;IA+BxD;;OAEG;IACU,SAAS,CAAC,CAAC,EAAE,KAAK,EAAE,MAAM,GAAG,MAAM,EAAE,OAAO,EAAE,CAAC,GAAG,OAAO,CAAC,IAAI,CAAC;IA4C5E;;OAEG;IACI,EAAE,CAAC,CAAC,EACT,KAAK,EAAE,MAAM,GAAG,MAAM,EACtB,QAAQ,EAAE,aAAa,CAAC,CAAC,CAAC,EAC1B,OAAO,GAAE,eAAoB,GAC5B,MAAM,IAAI;IAKb;;OAEG;IACI,IAAI,CAAC,CAAC,EACX,KAAK,EAAE,MAAM,GAAG,MAAM,EACtB,QAAQ,EAAE,aAAa,CAAC,CAAC,CAAC,EAC1B,OAAO,GAAE,eAAoB,GAC5B,MAAM,IAAI;IAKb;;OAEG;IACI,GAAG,CAAC,CAAC,EAAE,KAAK,EAAE,MAAM,GAAG,MAAM,EAAE,QAAQ,EAAE,aAAa,CAAC,CAAC,CAAC,GAAG,IAAI;IAmBvE;;OAEG;IACI,kBAAkB,CAAC,KAAK,CAAC,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI;IASxD;;OAEG;IACI,aAAa,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,GAAG,MAAM;IAMpD;;OAEG;IACI,UAAU,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC,EAAE;IAIxC;;OAEG;IACH,OAAO,CAAC,WAAW;IAuCnB;;OAEG;IACH,OAAO,CAAC,gBAAgB;IAYxB;;OAEG;IACH,OAAO,CAAC,mBAAmB;IA4B3B;;OAEG;IACH,OAAO,CAAC,aAAa;IA4CrB;;OAEG;IACH,OAAO,CAAC,uBAAuB;IAM/B;;OAEG;IACH,OAAO,CAAC,WAAW;CAcpB"}
|