@lerianstudio/sindarian-server 1.0.0-beta.1 → 1.0.0-beta.2
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 +367 -0
- package/dist/constants/index.d.ts +1 -0
- package/dist/constants/index.d.ts.map +1 -1
- package/dist/constants/index.js +1 -0
- package/dist/constants/index.js.map +1 -1
- package/dist/constants/keys.d.ts +4 -0
- package/dist/constants/keys.d.ts.map +1 -1
- package/dist/constants/keys.js +5 -1
- package/dist/constants/keys.js.map +1 -1
- package/dist/constants/scopes.d.ts +6 -0
- package/dist/constants/scopes.d.ts.map +1 -0
- package/dist/constants/scopes.js +10 -0
- package/dist/constants/scopes.js.map +1 -0
- package/dist/context/arguments-host.d.ts +14 -0
- package/dist/context/arguments-host.d.ts.map +1 -0
- package/dist/context/arguments-host.js +28 -0
- package/dist/context/arguments-host.js.map +1 -0
- package/dist/context/execution-context.d.ts +10 -0
- package/dist/context/execution-context.d.ts.map +1 -0
- package/dist/context/execution-context.js +19 -0
- package/dist/context/execution-context.js.map +1 -0
- package/dist/context/http-arguments-host.d.ts +8 -0
- package/dist/context/http-arguments-host.d.ts.map +1 -0
- package/dist/context/http-arguments-host.js +17 -0
- package/dist/context/http-arguments-host.js.map +1 -0
- package/dist/context/index.d.ts +4 -0
- package/dist/context/index.d.ts.map +1 -0
- package/dist/context/index.js +20 -0
- package/dist/context/index.js.map +1 -0
- package/dist/controllers/base-controller.d.ts +0 -2
- package/dist/controllers/base-controller.d.ts.map +1 -1
- package/dist/controllers/base-controller.js +0 -15
- package/dist/controllers/base-controller.js.map +1 -1
- package/dist/controllers/decorators/body-decorator.d.ts +2 -3
- package/dist/controllers/decorators/body-decorator.d.ts.map +1 -1
- package/dist/controllers/decorators/body-decorator.js +31 -13
- package/dist/controllers/decorators/body-decorator.js.map +1 -1
- package/dist/controllers/decorators/controller-decorator.d.ts +0 -4
- package/dist/controllers/decorators/controller-decorator.d.ts.map +1 -1
- package/dist/controllers/decorators/controller-decorator.js +1 -44
- package/dist/controllers/decorators/controller-decorator.js.map +1 -1
- package/dist/dependency-injection/container.js +1 -1
- package/dist/dependency-injection/container.js.map +1 -1
- package/dist/dependency-injection/index.d.ts +2 -1
- package/dist/dependency-injection/index.d.ts.map +1 -1
- package/dist/dependency-injection/index.js +3 -2
- package/dist/dependency-injection/index.js.map +1 -1
- package/dist/dependency-injection/injectable-decorator.d.ts +7 -0
- package/dist/dependency-injection/injectable-decorator.d.ts.map +1 -0
- package/dist/dependency-injection/injectable-decorator.js +21 -0
- package/dist/dependency-injection/injectable-decorator.js.map +1 -0
- package/dist/exceptions/base-exception-filter.d.ts +8 -0
- package/dist/exceptions/base-exception-filter.d.ts.map +1 -0
- package/dist/exceptions/base-exception-filter.js +14 -0
- package/dist/exceptions/base-exception-filter.js.map +1 -0
- package/dist/exceptions/decorators/catch-decorator.d.ts +8 -0
- package/dist/exceptions/decorators/catch-decorator.d.ts.map +1 -0
- package/dist/exceptions/decorators/catch-decorator.js +14 -0
- package/dist/exceptions/decorators/catch-decorator.js.map +1 -0
- package/dist/exceptions/decorators/index.d.ts +3 -0
- package/dist/exceptions/decorators/index.d.ts.map +1 -0
- package/dist/exceptions/decorators/index.js +8 -0
- package/dist/exceptions/decorators/index.js.map +1 -0
- package/dist/exceptions/decorators/use-filters-decorator.d.ts +4 -0
- package/dist/exceptions/decorators/use-filters-decorator.d.ts.map +1 -0
- package/dist/exceptions/decorators/use-filters-decorator.js +16 -0
- package/dist/exceptions/decorators/use-filters-decorator.js.map +1 -0
- package/dist/exceptions/exception-filter.d.ts +6 -0
- package/dist/exceptions/exception-filter.d.ts.map +1 -0
- package/dist/exceptions/exception-filter.js +7 -0
- package/dist/exceptions/exception-filter.js.map +1 -0
- package/dist/exceptions/index.d.ts +3 -0
- package/dist/exceptions/index.d.ts.map +1 -1
- package/dist/exceptions/index.js +3 -0
- package/dist/exceptions/index.js.map +1 -1
- package/dist/index.d.ts +7 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +11 -1
- package/dist/index.js.map +1 -1
- package/dist/interceptor/call-handler.d.ts +4 -0
- package/dist/interceptor/call-handler.d.ts.map +1 -0
- package/dist/interceptor/call-handler.js +3 -0
- package/dist/interceptor/call-handler.js.map +1 -0
- package/dist/interceptor/decorators/index.d.ts +2 -0
- package/dist/interceptor/decorators/index.d.ts.map +1 -0
- package/dist/interceptor/decorators/index.js +6 -0
- package/dist/interceptor/decorators/index.js.map +1 -0
- package/dist/interceptor/decorators/use-interceptor-decorator.d.ts +8 -0
- package/dist/interceptor/decorators/use-interceptor-decorator.d.ts.map +1 -0
- package/dist/interceptor/decorators/use-interceptor-decorator.js +38 -0
- package/dist/interceptor/decorators/use-interceptor-decorator.js.map +1 -0
- package/dist/interceptor/index.d.ts +4 -0
- package/dist/interceptor/index.d.ts.map +1 -0
- package/dist/interceptor/index.js +20 -0
- package/dist/interceptor/index.js.map +1 -0
- package/dist/interceptor/interceptor.d.ts +3 -5
- package/dist/interceptor/interceptor.d.ts.map +1 -1
- package/dist/interceptor/interceptor.js.map +1 -1
- package/dist/logger/console-logger.d.ts +24 -0
- package/dist/logger/console-logger.d.ts.map +1 -0
- package/dist/logger/console-logger.js +78 -0
- package/dist/logger/console-logger.js.map +1 -0
- package/dist/logger/index.d.ts +4 -0
- package/dist/logger/index.d.ts.map +1 -0
- package/dist/logger/index.js +8 -0
- package/dist/logger/index.js.map +1 -0
- package/dist/logger/logger-service.d.ts +34 -0
- package/dist/logger/logger-service.d.ts.map +1 -0
- package/dist/logger/logger-service.js +12 -0
- package/dist/logger/logger-service.js.map +1 -0
- package/dist/logger/logger.d.ts +21 -0
- package/dist/logger/logger.d.ts.map +1 -0
- package/dist/logger/logger.js +86 -0
- package/dist/logger/logger.js.map +1 -0
- package/dist/modules/module-decorator.d.ts +3 -1
- package/dist/modules/module-decorator.d.ts.map +1 -1
- package/dist/modules/module-decorator.js +83 -23
- package/dist/modules/module-decorator.js.map +1 -1
- package/dist/server/server-factory.d.ts +15 -8
- package/dist/server/server-factory.d.ts.map +1 -1
- package/dist/server/server-factory.js +95 -49
- package/dist/server/server-factory.js.map +1 -1
- package/dist/services/filters.d.ts +2 -0
- package/dist/services/filters.d.ts.map +1 -0
- package/dist/services/filters.js +5 -0
- package/dist/services/filters.js.map +1 -0
- package/dist/services/http-service.d.ts +68 -0
- package/dist/services/http-service.d.ts.map +1 -0
- package/dist/services/http-service.js +233 -0
- package/dist/services/http-service.js.map +1 -0
- package/dist/services/interceptor.d.ts +2 -0
- package/dist/services/interceptor.d.ts.map +1 -0
- package/dist/services/interceptor.js +5 -0
- package/dist/services/interceptor.js.map +1 -0
- package/dist/utils/form-data/get-form-data.d.ts +2 -0
- package/dist/utils/form-data/get-form-data.d.ts.map +1 -0
- package/dist/utils/form-data/get-form-data.js +11 -0
- package/dist/utils/form-data/get-form-data.js.map +1 -0
- package/dist/utils/search/create-query-string.d.ts +9 -0
- package/dist/utils/search/create-query-string.d.ts.map +1 -0
- package/dist/utils/search/create-query-string.js +26 -0
- package/dist/utils/search/create-query-string.js.map +1 -0
- package/package.json +2 -5
- package/dist/interceptor/decorators/use-interceptor.d.ts +0 -3
- package/dist/interceptor/decorators/use-interceptor.d.ts.map +0 -1
- package/dist/interceptor/decorators/use-interceptor.js +0 -9
- package/dist/interceptor/decorators/use-interceptor.js.map +0 -1
package/README.md
CHANGED
|
@@ -0,0 +1,367 @@
|
|
|
1
|
+
# Sindarian Server
|
|
2
|
+
|
|
3
|
+
A lightweight, NestJS-inspired framework designed specifically for Next.js applications. Build scalable APIs with familiar decorator-based architecture while leveraging Next.js's serverless capabilities.
|
|
4
|
+
|
|
5
|
+
## ( Features
|
|
6
|
+
|
|
7
|
+
- =� **NestJS-like API** - Familiar decorators and patterns
|
|
8
|
+
- � **Next.js Optimized** - Built for serverless environments
|
|
9
|
+
- =� **Dependency Injection** - Powered by Inversify
|
|
10
|
+
- =� **Decorator-based Routing** - Clean, declarative route definitions
|
|
11
|
+
- =' **Middleware Support** - Interceptors and exception filters
|
|
12
|
+
- =� **TypeScript First** - Full type safety out of the box
|
|
13
|
+
- <� **Lightweight** - Minimal overhead for fast cold starts
|
|
14
|
+
|
|
15
|
+
## =� Quick Start
|
|
16
|
+
|
|
17
|
+
### Installation
|
|
18
|
+
|
|
19
|
+
```bash
|
|
20
|
+
npm install @lerianstudio/sindarian-server reflect-metadata inversify
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
### Basic Setup
|
|
24
|
+
|
|
25
|
+
1. **Create your first controller:**
|
|
26
|
+
|
|
27
|
+
```typescript
|
|
28
|
+
// controllers/user.controller.ts
|
|
29
|
+
import { Controller, Get, Post, Param, Body, BaseController } from '@lerianstudio/sindarian-server'
|
|
30
|
+
|
|
31
|
+
@Controller('/users')
|
|
32
|
+
export class UserController extends BaseController {
|
|
33
|
+
@Get()
|
|
34
|
+
async findAll() {
|
|
35
|
+
return { users: [] }
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
@Get(':id')
|
|
39
|
+
async findOne(@Param('id') id: string) {
|
|
40
|
+
return { id, name: 'John Doe' }
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
@Post()
|
|
44
|
+
async create(@Body() userData: any) {
|
|
45
|
+
return { id: 1, ...userData }
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
2. **Create a service:**
|
|
51
|
+
|
|
52
|
+
```typescript
|
|
53
|
+
// services/user.service.ts
|
|
54
|
+
import { injectable } from 'inversify'
|
|
55
|
+
|
|
56
|
+
@injectable()
|
|
57
|
+
export class UserService {
|
|
58
|
+
async findAll() {
|
|
59
|
+
return [{ id: 1, name: 'John' }]
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
```
|
|
63
|
+
|
|
64
|
+
3. **Set up your module:**
|
|
65
|
+
|
|
66
|
+
```typescript
|
|
67
|
+
// app.module.ts
|
|
68
|
+
import { Module } from '@lerianstudio/sindarian-server'
|
|
69
|
+
import { UserController } from './controllers/user.controller'
|
|
70
|
+
import { UserService } from './services/user.service'
|
|
71
|
+
|
|
72
|
+
@Module({
|
|
73
|
+
controllers: [UserController],
|
|
74
|
+
providers: [UserService]
|
|
75
|
+
})
|
|
76
|
+
export class AppModule {}
|
|
77
|
+
```
|
|
78
|
+
|
|
79
|
+
4. **Create the application:**
|
|
80
|
+
|
|
81
|
+
```typescript
|
|
82
|
+
// app.ts
|
|
83
|
+
import 'reflect-metadata'
|
|
84
|
+
import { ServerFactory } from '@lerianstudio/sindarian-server'
|
|
85
|
+
import { AppModule } from './app.module'
|
|
86
|
+
|
|
87
|
+
export const app = ServerFactory.create(AppModule)
|
|
88
|
+
|
|
89
|
+
// Optional: Configure global settings
|
|
90
|
+
app.setGlobalPrefix('/api/v1')
|
|
91
|
+
```
|
|
92
|
+
|
|
93
|
+
5. **Set up Next.js API routes:**
|
|
94
|
+
|
|
95
|
+
```typescript
|
|
96
|
+
// pages/api/[...slug].ts (Pages Router)
|
|
97
|
+
// or app/api/[...slug]/route.ts (App Router)
|
|
98
|
+
import { app } from './app'
|
|
99
|
+
import { NextRequest } from 'next/server'
|
|
100
|
+
|
|
101
|
+
export async function GET(request: NextRequest, context: any) {
|
|
102
|
+
return app.handler(request, context)
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
export async function POST(request: NextRequest, context: any) {
|
|
106
|
+
return app.handler(request, context)
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
export async function PUT(request: NextRequest, context: any) {
|
|
110
|
+
return app.handler(request, context)
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
export async function DELETE(request: NextRequest, context: any) {
|
|
114
|
+
return app.handler(request, context)
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
export async function PATCH(request: NextRequest, context: any) {
|
|
118
|
+
return app.handler(request, context)
|
|
119
|
+
}
|
|
120
|
+
```
|
|
121
|
+
|
|
122
|
+
## =� Core Concepts
|
|
123
|
+
|
|
124
|
+
### Controllers
|
|
125
|
+
|
|
126
|
+
Controllers handle incoming requests and return responses:
|
|
127
|
+
|
|
128
|
+
```typescript
|
|
129
|
+
@Controller('/posts')
|
|
130
|
+
export class PostController extends BaseController {
|
|
131
|
+
constructor(
|
|
132
|
+
@inject(PostService) private postService: PostService
|
|
133
|
+
) {
|
|
134
|
+
super()
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
@Get()
|
|
138
|
+
async findAll(@Query() query: any) {
|
|
139
|
+
return this.postService.findAll(query)
|
|
140
|
+
}
|
|
141
|
+
|
|
142
|
+
@Get(':id')
|
|
143
|
+
async findOne(@Param('id') id: string) {
|
|
144
|
+
return this.postService.findById(id)
|
|
145
|
+
}
|
|
146
|
+
|
|
147
|
+
@Post()
|
|
148
|
+
async create(@Body() createPostDto: any) {
|
|
149
|
+
return this.postService.create(createPostDto)
|
|
150
|
+
}
|
|
151
|
+
|
|
152
|
+
@Put(':id')
|
|
153
|
+
async update(@Param('id') id: string, @Body() updatePostDto: any) {
|
|
154
|
+
return this.postService.update(id, updatePostDto)
|
|
155
|
+
}
|
|
156
|
+
|
|
157
|
+
@Delete(':id')
|
|
158
|
+
async remove(@Param('id') id: string) {
|
|
159
|
+
return this.postService.remove(id)
|
|
160
|
+
}
|
|
161
|
+
}
|
|
162
|
+
```
|
|
163
|
+
|
|
164
|
+
### Dependency Injection
|
|
165
|
+
|
|
166
|
+
Use Inversify's powerful DI system:
|
|
167
|
+
|
|
168
|
+
```typescript
|
|
169
|
+
@injectable()
|
|
170
|
+
export class PostService {
|
|
171
|
+
constructor(
|
|
172
|
+
@inject(DatabaseService) private db: DatabaseService,
|
|
173
|
+
@inject(LoggerService) private logger: LoggerService
|
|
174
|
+
) {}
|
|
175
|
+
|
|
176
|
+
async findAll() {
|
|
177
|
+
this.logger.log('Fetching all posts')
|
|
178
|
+
return this.db.posts.findMany()
|
|
179
|
+
}
|
|
180
|
+
}
|
|
181
|
+
```
|
|
182
|
+
|
|
183
|
+
### Modules
|
|
184
|
+
|
|
185
|
+
Organize your application with modules:
|
|
186
|
+
|
|
187
|
+
```typescript
|
|
188
|
+
@Module({
|
|
189
|
+
imports: [DatabaseModule], // Import other modules
|
|
190
|
+
controllers: [PostController],
|
|
191
|
+
providers: [
|
|
192
|
+
PostService,
|
|
193
|
+
{
|
|
194
|
+
provide: 'CONFIG',
|
|
195
|
+
useValue: { apiKey: process.env.API_KEY }
|
|
196
|
+
},
|
|
197
|
+
{
|
|
198
|
+
provide: CacheService,
|
|
199
|
+
useFactory: () => new CacheService({ ttl: 3600 })
|
|
200
|
+
}
|
|
201
|
+
]
|
|
202
|
+
})
|
|
203
|
+
export class PostModule {}
|
|
204
|
+
```
|
|
205
|
+
|
|
206
|
+
### Exception Handling
|
|
207
|
+
|
|
208
|
+
Create custom exception filters:
|
|
209
|
+
|
|
210
|
+
```typescript
|
|
211
|
+
@Catch(ValidationError)
|
|
212
|
+
export class ValidationFilter implements ExceptionFilter {
|
|
213
|
+
async catch(exception: ValidationError, host: ArgumentsHost) {
|
|
214
|
+
return NextResponse.json(
|
|
215
|
+
{
|
|
216
|
+
message: 'Validation failed',
|
|
217
|
+
errors: exception.errors
|
|
218
|
+
},
|
|
219
|
+
{ status: 400 }
|
|
220
|
+
)
|
|
221
|
+
}
|
|
222
|
+
}
|
|
223
|
+
|
|
224
|
+
// Apply globally
|
|
225
|
+
app.useGlobalFilters(new ValidationFilter())
|
|
226
|
+
|
|
227
|
+
// Or on specific controllers
|
|
228
|
+
@Controller('/users')
|
|
229
|
+
@UseFilters(ValidationFilter)
|
|
230
|
+
export class UserController extends BaseController {}
|
|
231
|
+
```
|
|
232
|
+
|
|
233
|
+
### Interceptors
|
|
234
|
+
|
|
235
|
+
Add cross-cutting concerns with interceptors:
|
|
236
|
+
|
|
237
|
+
```typescript
|
|
238
|
+
export class LoggingInterceptor implements Interceptor {
|
|
239
|
+
async intercept(context: ExecutionContext, next: CallHandler) {
|
|
240
|
+
const start = Date.now()
|
|
241
|
+
const result = await next.handle()
|
|
242
|
+
const duration = Date.now() - start
|
|
243
|
+
|
|
244
|
+
console.log(`${context.getClass().name}.${context.getHandler().name} - ${duration}ms`)
|
|
245
|
+
return result
|
|
246
|
+
}
|
|
247
|
+
}
|
|
248
|
+
|
|
249
|
+
// Apply globally
|
|
250
|
+
app.useGlobalInterceptors(new LoggingInterceptor())
|
|
251
|
+
|
|
252
|
+
// Or on specific controllers
|
|
253
|
+
@Controller('/users')
|
|
254
|
+
@UseInterceptors(LoggingInterceptor)
|
|
255
|
+
export class UserController extends BaseController {}
|
|
256
|
+
```
|
|
257
|
+
|
|
258
|
+
## <� Parameter Decorators
|
|
259
|
+
|
|
260
|
+
Extract data from requests with decorators:
|
|
261
|
+
|
|
262
|
+
```typescript
|
|
263
|
+
@Controller('/users')
|
|
264
|
+
export class UserController extends BaseController {
|
|
265
|
+
@Get(':id/posts')
|
|
266
|
+
async getUserPosts(
|
|
267
|
+
@Param('id') userId: string,
|
|
268
|
+
@Query('page') page: number,
|
|
269
|
+
@Query('limit') limit: number,
|
|
270
|
+
@Request() req: NextRequest
|
|
271
|
+
) {
|
|
272
|
+
return this.userService.getPosts(userId, { page, limit })
|
|
273
|
+
}
|
|
274
|
+
|
|
275
|
+
@Post()
|
|
276
|
+
async createUser(
|
|
277
|
+
@Body() userData: CreateUserDto,
|
|
278
|
+
@Request() req: NextRequest
|
|
279
|
+
) {
|
|
280
|
+
return this.userService.create(userData)
|
|
281
|
+
}
|
|
282
|
+
}
|
|
283
|
+
```
|
|
284
|
+
|
|
285
|
+
## =' Advanced Configuration
|
|
286
|
+
|
|
287
|
+
### Custom Providers
|
|
288
|
+
|
|
289
|
+
```typescript
|
|
290
|
+
@Module({
|
|
291
|
+
providers: [
|
|
292
|
+
// Class provider
|
|
293
|
+
UserService,
|
|
294
|
+
|
|
295
|
+
// Value provider
|
|
296
|
+
{
|
|
297
|
+
provide: 'DATABASE_URL',
|
|
298
|
+
useValue: process.env.DATABASE_URL
|
|
299
|
+
},
|
|
300
|
+
|
|
301
|
+
// Factory provider
|
|
302
|
+
{
|
|
303
|
+
provide: DatabaseService,
|
|
304
|
+
useFactory: (context: ResolutionContext) => {
|
|
305
|
+
const url = context.container.get('DATABASE_URL')
|
|
306
|
+
return new DatabaseService(url)
|
|
307
|
+
}
|
|
308
|
+
},
|
|
309
|
+
|
|
310
|
+
// Class-to-class provider
|
|
311
|
+
{
|
|
312
|
+
provide: 'IUserRepository',
|
|
313
|
+
useClass: PostgresUserRepository
|
|
314
|
+
}
|
|
315
|
+
]
|
|
316
|
+
})
|
|
317
|
+
export class AppModule {}
|
|
318
|
+
```
|
|
319
|
+
|
|
320
|
+
### Request Injection
|
|
321
|
+
|
|
322
|
+
Access the current request anywhere in your application:
|
|
323
|
+
|
|
324
|
+
```typescript
|
|
325
|
+
@injectable()
|
|
326
|
+
export class AuthService {
|
|
327
|
+
constructor(@inject(REQUEST) private request: NextRequest) {}
|
|
328
|
+
|
|
329
|
+
getCurrentUser() {
|
|
330
|
+
const token = this.request.headers.get('authorization')
|
|
331
|
+
// Decode token and return user
|
|
332
|
+
}
|
|
333
|
+
}
|
|
334
|
+
```
|
|
335
|
+
|
|
336
|
+
## =� Documentation
|
|
337
|
+
|
|
338
|
+
- **[Technical Guide](./TECHNICAL.md)** - Deep dive into the framework's architecture and implementation details
|
|
339
|
+
- **[API Reference](./docs/api.md)** - Complete API documentation
|
|
340
|
+
- **[Examples](./examples/)** - Working examples and use cases
|
|
341
|
+
|
|
342
|
+
## > Contributing
|
|
343
|
+
|
|
344
|
+
Contributions are welcome! Please read our [Contributing Guide](./CONTRIBUTING.md) for details on our code of conduct and the process for submitting pull requests.
|
|
345
|
+
|
|
346
|
+
## =� License
|
|
347
|
+
|
|
348
|
+
This project is licensed under the ISC License - see the [LICENSE](./LICENSE) file for details.
|
|
349
|
+
|
|
350
|
+
## =O Acknowledgments
|
|
351
|
+
|
|
352
|
+
- Inspired by [NestJS](https://nestjs.com/) - A progressive Node.js framework
|
|
353
|
+
- Built on [Inversify](https://inversify.io/) - A powerful IoC container for TypeScript
|
|
354
|
+
- Designed for [Next.js](https://nextjs.org/) - The React framework for production
|
|
355
|
+
|
|
356
|
+
## =� What's Next?
|
|
357
|
+
|
|
358
|
+
- [ ] Validation pipes with Zod integration
|
|
359
|
+
- [ ] Built-in authentication guards
|
|
360
|
+
- [ ] WebSocket support
|
|
361
|
+
- [ ] GraphQL integration
|
|
362
|
+
- [ ] CLI tools for scaffolding
|
|
363
|
+
- [ ] More built-in interceptors and filters
|
|
364
|
+
|
|
365
|
+
---
|
|
366
|
+
|
|
367
|
+
**Sindarian Server** - Building the future of Next.js APIs, one decorator at a time. =�
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/constants/index.ts"],"names":[],"mappings":"AAAA,cAAc,eAAe,CAAA;AAC7B,cAAc,gBAAgB,CAAA"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/constants/index.ts"],"names":[],"mappings":"AAAA,cAAc,eAAe,CAAA;AAC7B,cAAc,gBAAgB,CAAA;AAC9B,cAAc,UAAU,CAAA"}
|
package/dist/constants/index.js
CHANGED
|
@@ -16,4 +16,5 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
17
|
__exportStar(require("./http-status"), exports);
|
|
18
18
|
__exportStar(require("./http-methods"), exports);
|
|
19
|
+
__exportStar(require("./scopes"), exports);
|
|
19
20
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/constants/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,gDAA6B;AAC7B,iDAA8B"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/constants/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,gDAA6B;AAC7B,iDAA8B;AAC9B,2CAAwB"}
|
package/dist/constants/keys.d.ts
CHANGED
|
@@ -1,5 +1,9 @@
|
|
|
1
|
+
export declare const INJECTABLE_KEY: unique symbol;
|
|
1
2
|
export declare const MODULE_KEY: unique symbol;
|
|
2
3
|
export declare const CONTROLLER_KEY: unique symbol;
|
|
4
|
+
export declare const CATCH_KEY: unique symbol;
|
|
5
|
+
export declare const FILTER_KEY: unique symbol;
|
|
6
|
+
export declare const INTERCEPTOR_KEY: unique symbol;
|
|
3
7
|
export declare const ROUTE_KEY: unique symbol;
|
|
4
8
|
export declare const GET_KEY: unique symbol;
|
|
5
9
|
export declare const POST_KEY: unique symbol;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"keys.d.ts","sourceRoot":"","sources":["../../src/constants/keys.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,UAAU,eAAmB,CAAA;AAC1C,eAAO,MAAM,cAAc,eAAuB,CAAA;
|
|
1
|
+
{"version":3,"file":"keys.d.ts","sourceRoot":"","sources":["../../src/constants/keys.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,cAAc,eAAuB,CAAA;AAElD,eAAO,MAAM,UAAU,eAAmB,CAAA;AAC1C,eAAO,MAAM,cAAc,eAAuB,CAAA;AAClD,eAAO,MAAM,SAAS,eAAkB,CAAA;AACxC,eAAO,MAAM,UAAU,eAAmB,CAAA;AAC1C,eAAO,MAAM,eAAe,eAAwB,CAAA;AAEpD,eAAO,MAAM,SAAS,eAAkB,CAAA;AACxC,eAAO,MAAM,OAAO,eAAgB,CAAA;AACpC,eAAO,MAAM,QAAQ,eAAiB,CAAA;AACtC,eAAO,MAAM,OAAO,eAAgB,CAAA;AACpC,eAAO,MAAM,SAAS,eAAkB,CAAA;AACxC,eAAO,MAAM,UAAU,eAAmB,CAAA;AAE1C,eAAO,MAAM,QAAQ,eAAiB,CAAA;AACtC,eAAO,MAAM,WAAW,eAAoB,CAAA;AAC5C,eAAO,MAAM,SAAS,eAAkB,CAAA;AACxC,eAAO,MAAM,SAAS,eAAkB,CAAA;AAExC,eAAO,MAAM,gBAAgB,gBAAgB,CAAA;AAC7C,eAAO,MAAM,eAAe,eAAe,CAAA;AAC3C,eAAO,MAAM,kBAAkB,kBAAkB,CAAA;AACjD,eAAO,MAAM,oBAAoB,oBAAoB,CAAA"}
|
package/dist/constants/keys.js
CHANGED
|
@@ -1,8 +1,12 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.CONTROLLERS_PROPERTY = exports.PROVIDERS_PROPERTY = exports.MODULE_PROPERTY = exports.IMPORTS_PROPERTY = exports.QUERY_KEY = exports.PARAM_KEY = exports.REQUEST_KEY = exports.BODY_KEY = exports.DELETE_KEY = exports.PATCH_KEY = exports.PUT_KEY = exports.POST_KEY = exports.GET_KEY = exports.ROUTE_KEY = exports.CONTROLLER_KEY = exports.MODULE_KEY = void 0;
|
|
3
|
+
exports.CONTROLLERS_PROPERTY = exports.PROVIDERS_PROPERTY = exports.MODULE_PROPERTY = exports.IMPORTS_PROPERTY = exports.QUERY_KEY = exports.PARAM_KEY = exports.REQUEST_KEY = exports.BODY_KEY = exports.DELETE_KEY = exports.PATCH_KEY = exports.PUT_KEY = exports.POST_KEY = exports.GET_KEY = exports.ROUTE_KEY = exports.INTERCEPTOR_KEY = exports.FILTER_KEY = exports.CATCH_KEY = exports.CONTROLLER_KEY = exports.MODULE_KEY = exports.INJECTABLE_KEY = void 0;
|
|
4
|
+
exports.INJECTABLE_KEY = Symbol('injectable');
|
|
4
5
|
exports.MODULE_KEY = Symbol('module');
|
|
5
6
|
exports.CONTROLLER_KEY = Symbol('controller');
|
|
7
|
+
exports.CATCH_KEY = Symbol('catch');
|
|
8
|
+
exports.FILTER_KEY = Symbol('filter');
|
|
9
|
+
exports.INTERCEPTOR_KEY = Symbol('interceptor');
|
|
6
10
|
exports.ROUTE_KEY = Symbol('route');
|
|
7
11
|
exports.GET_KEY = Symbol('get');
|
|
8
12
|
exports.POST_KEY = Symbol('post');
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"keys.js","sourceRoot":"","sources":["../../src/constants/keys.ts"],"names":[],"mappings":";;;AAAa,QAAA,UAAU,GAAG,MAAM,CAAC,QAAQ,CAAC,CAAA;AAC7B,QAAA,cAAc,GAAG,MAAM,CAAC,YAAY,CAAC,CAAA;
|
|
1
|
+
{"version":3,"file":"keys.js","sourceRoot":"","sources":["../../src/constants/keys.ts"],"names":[],"mappings":";;;AAAa,QAAA,cAAc,GAAG,MAAM,CAAC,YAAY,CAAC,CAAA;AAErC,QAAA,UAAU,GAAG,MAAM,CAAC,QAAQ,CAAC,CAAA;AAC7B,QAAA,cAAc,GAAG,MAAM,CAAC,YAAY,CAAC,CAAA;AACrC,QAAA,SAAS,GAAG,MAAM,CAAC,OAAO,CAAC,CAAA;AAC3B,QAAA,UAAU,GAAG,MAAM,CAAC,QAAQ,CAAC,CAAA;AAC7B,QAAA,eAAe,GAAG,MAAM,CAAC,aAAa,CAAC,CAAA;AAEvC,QAAA,SAAS,GAAG,MAAM,CAAC,OAAO,CAAC,CAAA;AAC3B,QAAA,OAAO,GAAG,MAAM,CAAC,KAAK,CAAC,CAAA;AACvB,QAAA,QAAQ,GAAG,MAAM,CAAC,MAAM,CAAC,CAAA;AACzB,QAAA,OAAO,GAAG,MAAM,CAAC,KAAK,CAAC,CAAA;AACvB,QAAA,SAAS,GAAG,MAAM,CAAC,OAAO,CAAC,CAAA;AAC3B,QAAA,UAAU,GAAG,MAAM,CAAC,QAAQ,CAAC,CAAA;AAE7B,QAAA,QAAQ,GAAG,MAAM,CAAC,MAAM,CAAC,CAAA;AACzB,QAAA,WAAW,GAAG,MAAM,CAAC,SAAS,CAAC,CAAA;AAC/B,QAAA,SAAS,GAAG,MAAM,CAAC,OAAO,CAAC,CAAA;AAC3B,QAAA,SAAS,GAAG,MAAM,CAAC,OAAO,CAAC,CAAA;AAE3B,QAAA,gBAAgB,GAAG,aAAa,CAAA;AAChC,QAAA,eAAe,GAAG,YAAY,CAAA;AAC9B,QAAA,kBAAkB,GAAG,eAAe,CAAA;AACpC,QAAA,oBAAoB,GAAG,iBAAiB,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"scopes.d.ts","sourceRoot":"","sources":["../../src/constants/scopes.ts"],"names":[],"mappings":"AAAA,oBAAY,KAAK;IACf,OAAO,cAAc;IACrB,SAAS,cAAc;IACvB,OAAO,YAAY;CACpB"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.Scope = void 0;
|
|
4
|
+
var Scope;
|
|
5
|
+
(function (Scope) {
|
|
6
|
+
Scope["DEFAULT"] = "singleton";
|
|
7
|
+
Scope["TRANSIENT"] = "transient";
|
|
8
|
+
Scope["REQUEST"] = "request";
|
|
9
|
+
})(Scope || (exports.Scope = Scope = {}));
|
|
10
|
+
//# sourceMappingURL=scopes.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"scopes.js","sourceRoot":"","sources":["../../src/constants/scopes.ts"],"names":[],"mappings":";;;AAAA,IAAY,KAIX;AAJD,WAAY,KAAK;IACf,8BAAqB,CAAA;IACrB,gCAAuB,CAAA;IACvB,4BAAmB,CAAA;AACrB,CAAC,EAJW,KAAK,qBAAL,KAAK,QAIhB"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { HttpArgumentsHost } from './http-arguments-host';
|
|
2
|
+
type ArgumentsType = 'http';
|
|
3
|
+
export declare class ArgumentsHost {
|
|
4
|
+
private readonly type;
|
|
5
|
+
private args;
|
|
6
|
+
private context;
|
|
7
|
+
constructor(args: any[], type?: string);
|
|
8
|
+
getType(): ArgumentsType;
|
|
9
|
+
getArgs(): any[];
|
|
10
|
+
getArgsByIndex(index: number): any;
|
|
11
|
+
switchToHttp(): HttpArgumentsHost;
|
|
12
|
+
}
|
|
13
|
+
export {};
|
|
14
|
+
//# sourceMappingURL=arguments-host.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"arguments-host.d.ts","sourceRoot":"","sources":["../../src/context/arguments-host.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,iBAAiB,EAAE,MAAM,uBAAuB,CAAA;AAEzD,KAAK,aAAa,GAAG,MAAM,CAAA;AAE3B,qBAAa,aAAa;IACxB,OAAO,CAAC,QAAQ,CAAC,IAAI,CAAe;IACpC,OAAO,CAAC,IAAI,CAAO;IACnB,OAAO,CAAC,OAAO,CAA0C;gBAE7C,IAAI,EAAE,GAAG,EAAE,EAAE,IAAI,SAAS;IAQtC,OAAO,IAAI,aAAa;IAIxB,OAAO;IAIP,cAAc,CAAC,KAAK,EAAE,MAAM;IAI5B,YAAY,IAAI,iBAAiB;CAGlC"}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ArgumentsHost = void 0;
|
|
4
|
+
const server_1 = require("next/server");
|
|
5
|
+
const http_arguments_host_1 = require("./http-arguments-host");
|
|
6
|
+
class ArgumentsHost {
|
|
7
|
+
constructor(args, type = 'http') {
|
|
8
|
+
this.args = args;
|
|
9
|
+
this.type = type;
|
|
10
|
+
this.context = {
|
|
11
|
+
http: new http_arguments_host_1.HttpArgumentsHost(args[0], server_1.NextResponse)
|
|
12
|
+
};
|
|
13
|
+
}
|
|
14
|
+
getType() {
|
|
15
|
+
return this.type;
|
|
16
|
+
}
|
|
17
|
+
getArgs() {
|
|
18
|
+
return this.args;
|
|
19
|
+
}
|
|
20
|
+
getArgsByIndex(index) {
|
|
21
|
+
return this.args[index];
|
|
22
|
+
}
|
|
23
|
+
switchToHttp() {
|
|
24
|
+
return this.context.http;
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
exports.ArgumentsHost = ArgumentsHost;
|
|
28
|
+
//# sourceMappingURL=arguments-host.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"arguments-host.js","sourceRoot":"","sources":["../../src/context/arguments-host.ts"],"names":[],"mappings":";;;AAAA,wCAA0C;AAC1C,+DAAyD;AAIzD,MAAa,aAAa;IAKxB,YAAY,IAAW,EAAE,IAAI,GAAG,MAAM;QACpC,IAAI,CAAC,IAAI,GAAG,IAAI,CAAA;QAChB,IAAI,CAAC,IAAI,GAAG,IAAqB,CAAA;QACjC,IAAI,CAAC,OAAO,GAAG;YACb,IAAI,EAAE,IAAI,uCAAiB,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,qBAAY,CAAC;SACnD,CAAA;IACH,CAAC;IAED,OAAO;QACL,OAAO,IAAI,CAAC,IAAI,CAAA;IAClB,CAAC;IAED,OAAO;QACL,OAAO,IAAI,CAAC,IAAI,CAAA;IAClB,CAAC;IAED,cAAc,CAAC,KAAa;QAC1B,OAAO,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,CAAA;IACzB,CAAC;IAED,YAAY;QACV,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAA;IAC1B,CAAC;CACF;AA5BD,sCA4BC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { Class } from '../types/class';
|
|
2
|
+
import { ArgumentsHost } from './arguments-host';
|
|
3
|
+
export declare class ExecutionContext extends ArgumentsHost {
|
|
4
|
+
private classType;
|
|
5
|
+
private handler;
|
|
6
|
+
constructor(classType: Class, handler: Function, args: any[], type?: string);
|
|
7
|
+
getClass<T>(): Class<T>;
|
|
8
|
+
getHandler(): Function;
|
|
9
|
+
}
|
|
10
|
+
//# sourceMappingURL=execution-context.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"execution-context.d.ts","sourceRoot":"","sources":["../../src/context/execution-context.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,eAAe,CAAA;AACrC,OAAO,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAA;AAEhD,qBAAa,gBAAiB,SAAQ,aAAa;IACjD,OAAO,CAAC,SAAS,CAAO;IACxB,OAAO,CAAC,OAAO,CAAU;gBAEb,SAAS,EAAE,KAAK,EAAE,OAAO,EAAE,QAAQ,EAAE,IAAI,EAAE,GAAG,EAAE,EAAE,IAAI,SAAS;IAM3E,QAAQ,CAAC,CAAC,KAAK,KAAK,CAAC,CAAC,CAAC;IAIvB,UAAU,IAAI,QAAQ;CAGvB"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ExecutionContext = void 0;
|
|
4
|
+
const arguments_host_1 = require("./arguments-host");
|
|
5
|
+
class ExecutionContext extends arguments_host_1.ArgumentsHost {
|
|
6
|
+
constructor(classType, handler, args, type = 'http') {
|
|
7
|
+
super(args, type);
|
|
8
|
+
this.classType = classType;
|
|
9
|
+
this.handler = handler;
|
|
10
|
+
}
|
|
11
|
+
getClass() {
|
|
12
|
+
return this.classType;
|
|
13
|
+
}
|
|
14
|
+
getHandler() {
|
|
15
|
+
return this.handler;
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
exports.ExecutionContext = ExecutionContext;
|
|
19
|
+
//# sourceMappingURL=execution-context.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"execution-context.js","sourceRoot":"","sources":["../../src/context/execution-context.ts"],"names":[],"mappings":";;;AACA,qDAAgD;AAEhD,MAAa,gBAAiB,SAAQ,8BAAa;IAIjD,YAAY,SAAgB,EAAE,OAAiB,EAAE,IAAW,EAAE,IAAI,GAAG,MAAM;QACzE,KAAK,CAAC,IAAI,EAAE,IAAI,CAAC,CAAA;QACjB,IAAI,CAAC,SAAS,GAAG,SAAS,CAAA;QAC1B,IAAI,CAAC,OAAO,GAAG,OAAO,CAAA;IACxB,CAAC;IAED,QAAQ;QACN,OAAO,IAAI,CAAC,SAAqB,CAAA;IACnC,CAAC;IAED,UAAU;QACR,OAAO,IAAI,CAAC,OAAO,CAAA;IACrB,CAAC;CACF;AAjBD,4CAiBC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"http-arguments-host.d.ts","sourceRoot":"","sources":["../../src/context/http-arguments-host.ts"],"names":[],"mappings":"AAAA,qBAAa,iBAAiB;IAC5B,OAAO,CAAC,OAAO,CAAK;IAEpB,OAAO,CAAC,QAAQ,CAAK;gBAET,OAAO,EAAE,GAAG,EAAE,QAAQ,EAAE,GAAG;IAKvC,UAAU,CAAC,CAAC,GAAG,OAAO,KAAK,CAAC;IAI5B,WAAW,CAAC,CAAC,GAAG,QAAQ,KAAK,CAAC;CAG/B"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.HttpArgumentsHost = void 0;
|
|
4
|
+
class HttpArgumentsHost {
|
|
5
|
+
constructor(request, response) {
|
|
6
|
+
this.request = request;
|
|
7
|
+
this.response = response;
|
|
8
|
+
}
|
|
9
|
+
getRequest() {
|
|
10
|
+
return this.request;
|
|
11
|
+
}
|
|
12
|
+
getResponse() {
|
|
13
|
+
return this.response;
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
exports.HttpArgumentsHost = HttpArgumentsHost;
|
|
17
|
+
//# sourceMappingURL=http-arguments-host.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"http-arguments-host.js","sourceRoot":"","sources":["../../src/context/http-arguments-host.ts"],"names":[],"mappings":";;;AAAA,MAAa,iBAAiB;IAK5B,YAAY,OAAY,EAAE,QAAa;QACrC,IAAI,CAAC,OAAO,GAAG,OAAO,CAAA;QACtB,IAAI,CAAC,QAAQ,GAAG,QAAQ,CAAA;IAC1B,CAAC;IAED,UAAU;QACR,OAAO,IAAI,CAAC,OAAY,CAAA;IAC1B,CAAC;IAED,WAAW;QACT,OAAO,IAAI,CAAC,QAAa,CAAA;IAC3B,CAAC;CACF;AAjBD,8CAiBC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/context/index.ts"],"names":[],"mappings":"AAAA,cAAc,kBAAkB,CAAA;AAChC,cAAc,uBAAuB,CAAA;AACrC,cAAc,qBAAqB,CAAA"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./arguments-host"), exports);
|
|
18
|
+
__exportStar(require("./http-arguments-host"), exports);
|
|
19
|
+
__exportStar(require("./execution-context"), exports);
|
|
20
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/context/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,mDAAgC;AAChC,wDAAqC;AACrC,sDAAmC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"base-controller.d.ts","sourceRoot":"","sources":["../../src/controllers/base-controller.ts"],"names":[],"mappings":"AAAA,
|
|
1
|
+
{"version":3,"file":"base-controller.d.ts","sourceRoot":"","sources":["../../src/controllers/base-controller.ts"],"names":[],"mappings":"AAAA,8BAAsB,cAAc;CAAG"}
|
|
@@ -1,22 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
|
-
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
|
-
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5
|
-
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
6
|
-
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
|
-
};
|
|
8
|
-
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
9
|
-
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
10
|
-
};
|
|
11
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
3
|
exports.BaseController = void 0;
|
|
13
|
-
const lib_logs_1 = require("@lerianstudio/lib-logs");
|
|
14
|
-
const inversify_1 = require("inversify");
|
|
15
4
|
class BaseController {
|
|
16
5
|
}
|
|
17
6
|
exports.BaseController = BaseController;
|
|
18
|
-
__decorate([
|
|
19
|
-
(0, inversify_1.inject)(lib_logs_1.LoggerAggregator),
|
|
20
|
-
__metadata("design:type", lib_logs_1.LoggerAggregator)
|
|
21
|
-
], BaseController.prototype, "logger", void 0);
|
|
22
7
|
//# sourceMappingURL=base-controller.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"base-controller.js","sourceRoot":"","sources":["../../src/controllers/base-controller.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"base-controller.js","sourceRoot":"","sources":["../../src/controllers/base-controller.ts"],"names":[],"mappings":";;;AAAA,MAAsB,cAAc;CAAG;AAAvC,wCAAuC"}
|