@veloxts/core 0.3.2 → 0.3.4

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/dist/app.d.ts CHANGED
@@ -4,6 +4,7 @@
4
4
  * @module app
5
5
  */
6
6
  import { type FastifyInstance } from 'fastify';
7
+ import { type Container } from './di/index.js';
7
8
  import type { PluginOptions, VeloxPlugin } from './plugin.js';
8
9
  import type { ShutdownHandler } from './types.js';
9
10
  import type { FrozenVeloxAppConfig, VeloxAppConfig } from './utils/config.js';
@@ -18,7 +19,7 @@ import type { FrozenVeloxAppConfig, VeloxAppConfig } from './utils/config.js';
18
19
  *
19
20
  * @example
20
21
  * ```typescript
21
- * const app = await createVeloxApp({
22
+ * const app = await veloxApp({
22
23
  * port: 3210,
23
24
  * logger: true
24
25
  * });
@@ -31,6 +32,7 @@ export declare class VeloxApp {
31
32
  private readonly _server;
32
33
  private readonly _config;
33
34
  private readonly _lifecycle;
35
+ private readonly _container;
34
36
  private _isRunning;
35
37
  private _address;
36
38
  /**
@@ -62,6 +64,36 @@ export declare class VeloxApp {
62
64
  * Application configuration (readonly, frozen)
63
65
  */
64
66
  get config(): FrozenVeloxAppConfig;
67
+ /**
68
+ * DI container for the application
69
+ *
70
+ * Provides access to the dependency injection container.
71
+ * Use this to register services and resolve dependencies.
72
+ *
73
+ * @example
74
+ * ```typescript
75
+ * import { Injectable, createStringToken } from '@veloxts/core';
76
+ *
77
+ * const DATABASE = createStringToken<DatabaseClient>('DATABASE');
78
+ *
79
+ * @Injectable()
80
+ * class UserService {
81
+ * constructor(@Inject(DATABASE) private db: DatabaseClient) {}
82
+ * }
83
+ *
84
+ * // Register services
85
+ * app.container.register({
86
+ * provide: DATABASE,
87
+ * useFactory: () => createDatabaseClient()
88
+ * });
89
+ *
90
+ * app.container.register({
91
+ * provide: UserService,
92
+ * useClass: UserService
93
+ * });
94
+ * ```
95
+ */
96
+ get container(): Container;
65
97
  /**
66
98
  * Check if server is currently running
67
99
  */
@@ -111,11 +143,20 @@ export declare class VeloxApp {
111
143
  *
112
144
  * @example
113
145
  * ```typescript
114
- * await app.use(databasePlugin, {
146
+ * await app.register(databasePlugin, {
115
147
  * connectionString: 'postgresql://...'
116
148
  * });
117
149
  * ```
118
150
  */
151
+ register<Options extends PluginOptions>(plugin: VeloxPlugin<Options>, options?: Options): Promise<void>;
152
+ /**
153
+ * Registers a plugin with the application
154
+ *
155
+ * @deprecated Use `register()` instead. This alias will be removed in v0.9.
156
+ * @template Options - Type of options the plugin accepts
157
+ * @param plugin - Plugin to register
158
+ * @param options - Options to pass to the plugin
159
+ */
119
160
  use<Options extends PluginOptions>(plugin: VeloxPlugin<Options>, options?: Options): Promise<void>;
120
161
  /**
121
162
  * Registers routes with the application
@@ -177,21 +218,29 @@ export declare class VeloxApp {
177
218
  */
178
219
  stop(): Promise<void>;
179
220
  /**
180
- * Adds a shutdown handler
221
+ * Adds a handler to run before shutdown
181
222
  *
182
223
  * Shutdown handlers are called when the server stops, either via `stop()`
183
- * or when receiving SIGINT/SIGTERM signals
224
+ * or when receiving SIGINT/SIGTERM signals. Use this to clean up resources
225
+ * like database connections, file handles, etc.
184
226
  *
185
- * @param handler - Async function to call during shutdown
227
+ * @param handler - Async function to call before shutdown
186
228
  *
187
229
  * @example
188
230
  * ```typescript
189
- * app.onShutdown(async () => {
231
+ * app.beforeShutdown(async () => {
190
232
  * await database.disconnect();
191
233
  * console.log('Database connection closed');
192
234
  * });
193
235
  * ```
194
236
  */
237
+ beforeShutdown(handler: ShutdownHandler): void;
238
+ /**
239
+ * Adds a shutdown handler
240
+ *
241
+ * @deprecated Use `beforeShutdown()` instead. This alias will be removed in v0.9.
242
+ * @param handler - Async function to call during shutdown
243
+ */
195
244
  onShutdown(handler: ShutdownHandler): void;
196
245
  }
197
246
  /**
@@ -205,7 +254,7 @@ export declare class VeloxApp {
205
254
  *
206
255
  * @example
207
256
  * ```typescript
208
- * const app = await createVeloxApp({
257
+ * const app = await veloxApp({
209
258
  * port: 3210,
210
259
  * host: '0.0.0.0',
211
260
  * logger: true
@@ -215,14 +264,14 @@ export declare class VeloxApp {
215
264
  * @example
216
265
  * ```typescript
217
266
  * // With default configuration
218
- * const app = await createVeloxApp();
267
+ * const app = await veloxApp();
219
268
  * await app.start(); // Listens on port 3210
220
269
  * ```
221
270
  *
222
271
  * @example
223
272
  * ```typescript
224
273
  * // With custom Fastify options
225
- * const app = await createVeloxApp({
274
+ * const app = await veloxApp({
226
275
  * port: 4000,
227
276
  * fastify: {
228
277
  * requestTimeout: 30000,
@@ -231,5 +280,13 @@ export declare class VeloxApp {
231
280
  * });
232
281
  * ```
233
282
  */
234
- export declare function createVeloxApp(config?: VeloxAppConfig): Promise<VeloxApp>;
283
+ export declare function veloxApp(config?: VeloxAppConfig): Promise<VeloxApp>;
284
+ /**
285
+ * Creates a new VeloxTS application instance
286
+ *
287
+ * @deprecated Use `veloxApp()` instead. This alias will be removed in v0.9.
288
+ * @param config - Application configuration
289
+ * @returns Promise resolving to VeloxApp instance
290
+ */
291
+ export declare const createVeloxApp: typeof veloxApp;
235
292
  //# sourceMappingURL=app.d.ts.map
package/dist/app.d.ts.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"app.d.ts","sourceRoot":"","sources":["../src/app.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAgB,EAAE,KAAK,eAAe,EAA6B,MAAM,SAAS,CAAC;AAKnF,OAAO,KAAK,EAAE,aAAa,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAE9D,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,YAAY,CAAC;AAClD,OAAO,KAAK,EAAE,oBAAoB,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AAI9E;;;;;;;;;;;;;;;;;;;GAmBG;AACH,qBAAa,QAAQ;IACnB,OAAO,CAAC,QAAQ,CAAC,OAAO,CAAkB;IAC1C,OAAO,CAAC,QAAQ,CAAC,OAAO,CAAuB;IAC/C,OAAO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G;IACG,QAAQ,CAAC,OAAO,SAAS,aAAa,EAC1C,MAAM,EAAE,WAAW,CAAC,OAAO,CAAC,EAC5B,OAAO,CAAC,EAAE,OAAO,GAChB,OAAO,CAAC,IAAI,CAAC;IAuBhB;;;;;;;OAOG;IACG,GAAG,CAAC,OAAO,SAAS,aAAa,EACrC,MAAM,EAAE,WAAW,CAAC,OAAO,CAAC,EAC5B,OAAO,CAAC,EAAE,OAAO,GAChB,OAAO,CAAC,IAAI,CAAC;IAIhB;;;;;;;;;;;;;;;;;;;;;;;;;;;;OA4BG;IACH,MAAM,CAAC,SAAS,EAAE,CAAC,MAAM,EAAE,eAAe,KAAK,IAAI,GAAG,IAAI;IAK1D;;;;;;;;;;OAUG;IACG,KAAK,IAAI,OAAO,CAAC,IAAI,CAAC;IA4B5B;;;;;;;;;;;;;;;OAeG;IACG,IAAI,IAAI,OAAO,CAAC,IAAI,CAAC;IA4B3B;;;;;;;;;;;;;;;;OAgBG;IACH,cAAc,CAAC,OAAO,EAAE,eAAe,GAAG,IAAI;IAI9C;;;;;OAKG;IACH,UAAU,CAAC,OAAO,EAAE,eAAe,GAAG,IAAI;CAG3C;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAoCG;AACH,wBAAsB,QAAQ,CAAC,MAAM,GAAE,cAAmB,GAAG,OAAO,CAAC,QAAQ,CAAC,CAI7E;AAED;;;;;;GAMG;AACH,eAAO,MAAM,cAAc,iBAAW,CAAC"}
package/dist/app.js CHANGED
@@ -6,6 +6,7 @@
6
6
  import fastify from 'fastify';
7
7
  import fp from 'fastify-plugin';
8
8
  import { createContext } from './context.js';
9
+ import { container } from './di/index.js';
9
10
  import { isVeloxError, VeloxError } from './errors.js';
10
11
  import { validatePluginMetadata } from './plugin.js';
11
12
  import { mergeConfig, validateConfig } from './utils/config.js';
@@ -21,7 +22,7 @@ import { LifecycleManager } from './utils/lifecycle.js';
21
22
  *
22
23
  * @example
23
24
  * ```typescript
24
- * const app = await createVeloxApp({
25
+ * const app = await veloxApp({
25
26
  * port: 3210,
26
27
  * logger: true
27
28
  * });
@@ -34,6 +35,7 @@ export class VeloxApp {
34
35
  _server;
35
36
  _config;
36
37
  _lifecycle;
38
+ _container;
37
39
  _isRunning = false;
38
40
  _address = null;
39
41
  /**
@@ -55,6 +57,10 @@ export class VeloxApp {
55
57
  this._server = fastify(fastifyOptions);
56
58
  // Initialize lifecycle manager
57
59
  this._lifecycle = new LifecycleManager();
60
+ // Use global container by default
61
+ this._container = container;
62
+ // Attach container to Fastify for request-scoped services
63
+ this._container.attachToFastify(this._server);
58
64
  // Set up context decorator
59
65
  this._setupContext();
60
66
  // Set up error handling
@@ -88,6 +94,38 @@ export class VeloxApp {
88
94
  get config() {
89
95
  return this._config;
90
96
  }
97
+ /**
98
+ * DI container for the application
99
+ *
100
+ * Provides access to the dependency injection container.
101
+ * Use this to register services and resolve dependencies.
102
+ *
103
+ * @example
104
+ * ```typescript
105
+ * import { Injectable, createStringToken } from '@veloxts/core';
106
+ *
107
+ * const DATABASE = createStringToken<DatabaseClient>('DATABASE');
108
+ *
109
+ * @Injectable()
110
+ * class UserService {
111
+ * constructor(@Inject(DATABASE) private db: DatabaseClient) {}
112
+ * }
113
+ *
114
+ * // Register services
115
+ * app.container.register({
116
+ * provide: DATABASE,
117
+ * useFactory: () => createDatabaseClient()
118
+ * });
119
+ *
120
+ * app.container.register({
121
+ * provide: UserService,
122
+ * useClass: UserService
123
+ * });
124
+ * ```
125
+ */
126
+ get container() {
127
+ return this._container;
128
+ }
91
129
  /**
92
130
  * Check if server is currently running
93
131
  */
@@ -194,12 +232,12 @@ export class VeloxApp {
194
232
  *
195
233
  * @example
196
234
  * ```typescript
197
- * await app.use(databasePlugin, {
235
+ * await app.register(databasePlugin, {
198
236
  * connectionString: 'postgresql://...'
199
237
  * });
200
238
  * ```
201
239
  */
202
- async use(plugin, options) {
240
+ async register(plugin, options) {
203
241
  // Validate plugin metadata
204
242
  validatePluginMetadata(plugin);
205
243
  // Wrap plugin with fastify-plugin for proper encapsulation
@@ -216,6 +254,17 @@ export class VeloxApp {
216
254
  throw new VeloxError(`Failed to register plugin "${plugin.name}": ${error instanceof Error ? error.message : String(error)}`, 500, 'PLUGIN_REGISTRATION_ERROR');
217
255
  }
218
256
  }
257
+ /**
258
+ * Registers a plugin with the application
259
+ *
260
+ * @deprecated Use `register()` instead. This alias will be removed in v0.9.
261
+ * @template Options - Type of options the plugin accepts
262
+ * @param plugin - Plugin to register
263
+ * @param options - Options to pass to the plugin
264
+ */
265
+ async use(plugin, options) {
266
+ return this.register(plugin, options);
267
+ }
219
268
  /**
220
269
  * Registers routes with the application
221
270
  *
@@ -316,24 +365,34 @@ export class VeloxApp {
316
365
  }
317
366
  }
318
367
  /**
319
- * Adds a shutdown handler
368
+ * Adds a handler to run before shutdown
320
369
  *
321
370
  * Shutdown handlers are called when the server stops, either via `stop()`
322
- * or when receiving SIGINT/SIGTERM signals
371
+ * or when receiving SIGINT/SIGTERM signals. Use this to clean up resources
372
+ * like database connections, file handles, etc.
323
373
  *
324
- * @param handler - Async function to call during shutdown
374
+ * @param handler - Async function to call before shutdown
325
375
  *
326
376
  * @example
327
377
  * ```typescript
328
- * app.onShutdown(async () => {
378
+ * app.beforeShutdown(async () => {
329
379
  * await database.disconnect();
330
380
  * console.log('Database connection closed');
331
381
  * });
332
382
  * ```
333
383
  */
334
- onShutdown(handler) {
384
+ beforeShutdown(handler) {
335
385
  this._lifecycle.addShutdownHandler(handler);
336
386
  }
387
+ /**
388
+ * Adds a shutdown handler
389
+ *
390
+ * @deprecated Use `beforeShutdown()` instead. This alias will be removed in v0.9.
391
+ * @param handler - Async function to call during shutdown
392
+ */
393
+ onShutdown(handler) {
394
+ this.beforeShutdown(handler);
395
+ }
337
396
  }
338
397
  /**
339
398
  * Creates a new VeloxTS application instance
@@ -346,7 +405,7 @@ export class VeloxApp {
346
405
  *
347
406
  * @example
348
407
  * ```typescript
349
- * const app = await createVeloxApp({
408
+ * const app = await veloxApp({
350
409
  * port: 3210,
351
410
  * host: '0.0.0.0',
352
411
  * logger: true
@@ -356,14 +415,14 @@ export class VeloxApp {
356
415
  * @example
357
416
  * ```typescript
358
417
  * // With default configuration
359
- * const app = await createVeloxApp();
418
+ * const app = await veloxApp();
360
419
  * await app.start(); // Listens on port 3210
361
420
  * ```
362
421
  *
363
422
  * @example
364
423
  * ```typescript
365
424
  * // With custom Fastify options
366
- * const app = await createVeloxApp({
425
+ * const app = await veloxApp({
367
426
  * port: 4000,
368
427
  * fastify: {
369
428
  * requestTimeout: 30000,
@@ -372,9 +431,17 @@ export class VeloxApp {
372
431
  * });
373
432
  * ```
374
433
  */
375
- export async function createVeloxApp(config = {}) {
434
+ export async function veloxApp(config = {}) {
376
435
  const app = new VeloxApp(config);
377
436
  await app.initialize();
378
437
  return app;
379
438
  }
439
+ /**
440
+ * Creates a new VeloxTS application instance
441
+ *
442
+ * @deprecated Use `veloxApp()` instead. This alias will be removed in v0.9.
443
+ * @param config - Application configuration
444
+ * @returns Promise resolving to VeloxApp instance
445
+ */
446
+ export const createVeloxApp = veloxApp;
380
447
  //# sourceMappingURL=app.js.map
package/dist/app.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"app.js","sourceRoot":"","sources":["../src/app.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,OAA4D,MAAM,SAAS,CAAC;AACnF,OAAO,EAAE,MAAM,gBAAgB,CAAC;AAEhC,OAAO,EAAoB,aAAa,EAAE,MAAM,cAAc,CAAC;AAC/D,OAAO,EAAE,YAAY,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AAEvD,OAAO,EAAE,sBAAsB,EAAE,MAAM,aAAa,CAAC;AAGrD,OAAO,EAAE,WAAW,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AAChE,OAAO,EAAE,gBAAgB,EAAE,MAAM,sBAAsB,CAAC;AAExD;;;;;;;;;;;;;;;;;;;GAmBG;AACH,MAAM,OAAO,QAAQ;I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