@navios/core 1.0.0 → 1.1.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/CHANGELOG.md +44 -0
- package/lib/{index-C0Sg16Eb.d.cts → index-3LcTrbxz.d.mts} +491 -52
- package/lib/index-3LcTrbxz.d.mts.map +1 -0
- package/lib/{index-DySQ6Dpd.d.mts → index-B14SekVb.d.cts} +491 -52
- package/lib/index-B14SekVb.d.cts.map +1 -0
- package/lib/index.cjs +18 -3
- package/lib/index.d.cts +2 -2
- package/lib/index.d.mts +2 -2
- package/lib/index.mjs +4 -4
- package/lib/legacy-compat/index.cjs +3 -3
- package/lib/legacy-compat/index.d.cts +1 -1
- package/lib/legacy-compat/index.d.mts +1 -1
- package/lib/legacy-compat/index.mjs +2 -2
- package/lib/{navios.factory-CO5MB_OK.cjs → navios.factory-CUrO_p6K.cjs} +461 -48
- package/lib/navios.factory-CUrO_p6K.cjs.map +1 -0
- package/lib/{navios.factory-D6Y94P9B.mjs → navios.factory-DjUOOVVL.mjs} +372 -49
- package/lib/navios.factory-DjUOOVVL.mjs.map +1 -0
- package/lib/testing/index.cjs +2 -2
- package/lib/testing/index.d.cts +1 -1
- package/lib/testing/index.d.mts +1 -1
- package/lib/testing/index.mjs +2 -2
- package/lib/{tokens-CWw9kyeD.cjs → tokens-BEuBMGGX.cjs} +18 -21
- package/lib/tokens-BEuBMGGX.cjs.map +1 -0
- package/lib/{tokens-4J9sredA.mjs → tokens-COyNGV1I.mjs} +17 -20
- package/lib/tokens-COyNGV1I.mjs.map +1 -0
- package/lib/{use-guards.decorator-BecoQSmE.mjs → use-guards.decorator-DLmRl2CV.mjs} +14 -17
- package/lib/use-guards.decorator-DLmRl2CV.mjs.map +1 -0
- package/lib/{use-guards.decorator-C4ml9XaT.cjs → use-guards.decorator-DhumFTk3.cjs} +15 -18
- package/lib/use-guards.decorator-DhumFTk3.cjs.map +1 -0
- package/package.json +2 -2
- package/src/interfaces/index.mts +3 -0
- package/src/interfaces/plugin-context.mts +104 -0
- package/src/interfaces/plugin-stage.mts +62 -0
- package/src/interfaces/plugin.interface.mts +42 -62
- package/src/interfaces/staged-plugin.interface.mts +209 -0
- package/src/metadata/controller.metadata.mts +29 -22
- package/src/metadata/module.metadata.mts +33 -25
- package/src/navios.application.mts +247 -53
- package/src/services/module-loader.service.mts +11 -8
- package/src/utils/define-plugin.mts +251 -0
- package/src/utils/index.mts +1 -0
- package/lib/index-C0Sg16Eb.d.cts.map +0 -1
- package/lib/index-DySQ6Dpd.d.mts.map +0 -1
- package/lib/navios.factory-CO5MB_OK.cjs.map +0 -1
- package/lib/navios.factory-D6Y94P9B.mjs.map +0 -1
- package/lib/tokens-4J9sredA.mjs.map +0 -1
- package/lib/tokens-CWw9kyeD.cjs.map +0 -1
- package/lib/use-guards.decorator-BecoQSmE.mjs.map +0 -1
- package/lib/use-guards.decorator-C4ml9XaT.cjs.map +0 -1
|
@@ -365,6 +365,10 @@ declare function getEndpointMetadata<Config = any>(target: Function, context: Cl
|
|
|
365
365
|
//#region src/metadata/controller.metadata.d.mts
|
|
366
366
|
declare const ControllerMetadataKey: unique symbol;
|
|
367
367
|
interface ControllerMetadata {
|
|
368
|
+
/**
|
|
369
|
+
* The name of the controller class.
|
|
370
|
+
*/
|
|
371
|
+
name: string;
|
|
368
372
|
endpoints: Set<HandlerMetadata>;
|
|
369
373
|
guards: Set<ClassTypeWithInstance<CanActivate> | InjectionToken<CanActivate, undefined>>;
|
|
370
374
|
customAttributes: Map<string | symbol, any>;
|
|
@@ -376,6 +380,10 @@ declare function hasControllerMetadata(target: ClassType): boolean;
|
|
|
376
380
|
//#region src/metadata/module.metadata.d.mts
|
|
377
381
|
declare const ModuleMetadataKey: unique symbol;
|
|
378
382
|
interface ModuleMetadata {
|
|
383
|
+
/**
|
|
384
|
+
* The name of the module class.
|
|
385
|
+
*/
|
|
386
|
+
name: string;
|
|
379
387
|
controllers: Set<ClassType>;
|
|
380
388
|
imports: Set<ClassType>;
|
|
381
389
|
guards: Set<ClassTypeWithInstance<CanActivate> | InjectionToken<CanActivate, undefined>>;
|
|
@@ -1307,6 +1315,50 @@ interface NaviosModule {
|
|
|
1307
1315
|
onModuleInit?: () => Promise<void> | void;
|
|
1308
1316
|
}
|
|
1309
1317
|
//#endregion
|
|
1318
|
+
//#region src/interfaces/plugin-stage.d.mts
|
|
1319
|
+
/**
|
|
1320
|
+
* Base stage names (without pre:/post: prefix)
|
|
1321
|
+
*/
|
|
1322
|
+
declare const PluginStageBase: {
|
|
1323
|
+
readonly MODULES_TRAVERSE: "modules-traverse";
|
|
1324
|
+
readonly ADAPTER_RESOLVE: "adapter-resolve";
|
|
1325
|
+
readonly ADAPTER_SETUP: "adapter-setup";
|
|
1326
|
+
readonly MODULES_INIT: "modules-init";
|
|
1327
|
+
readonly READY: "ready";
|
|
1328
|
+
};
|
|
1329
|
+
type PluginStageBase = (typeof PluginStageBase)[keyof typeof PluginStageBase];
|
|
1330
|
+
/**
|
|
1331
|
+
* Full stage names with pre:/post: prefix
|
|
1332
|
+
*/
|
|
1333
|
+
type PluginStage = `pre:${PluginStageBase}` | `post:${PluginStageBase}`;
|
|
1334
|
+
/**
|
|
1335
|
+
* Helper to create pre stage name from base
|
|
1336
|
+
*/
|
|
1337
|
+
declare const preStage: <T extends PluginStageBase>(base: T) => `pre:${T}`;
|
|
1338
|
+
/**
|
|
1339
|
+
* Helper to create post stage name from base
|
|
1340
|
+
*/
|
|
1341
|
+
declare const postStage: <T extends PluginStageBase>(base: T) => `post:${T}`;
|
|
1342
|
+
/**
|
|
1343
|
+
* All stages as constants for direct access
|
|
1344
|
+
*/
|
|
1345
|
+
declare const PluginStages: {
|
|
1346
|
+
readonly PRE_MODULES_TRAVERSE: "pre:modules-traverse";
|
|
1347
|
+
readonly POST_MODULES_TRAVERSE: "post:modules-traverse";
|
|
1348
|
+
readonly PRE_ADAPTER_RESOLVE: "pre:adapter-resolve";
|
|
1349
|
+
readonly POST_ADAPTER_RESOLVE: "post:adapter-resolve";
|
|
1350
|
+
readonly PRE_ADAPTER_SETUP: "pre:adapter-setup";
|
|
1351
|
+
readonly POST_ADAPTER_SETUP: "post:adapter-setup";
|
|
1352
|
+
readonly PRE_MODULES_INIT: "pre:modules-init";
|
|
1353
|
+
readonly POST_MODULES_INIT: "post:modules-init";
|
|
1354
|
+
readonly PRE_READY: "pre:ready";
|
|
1355
|
+
readonly POST_READY: "post:ready";
|
|
1356
|
+
};
|
|
1357
|
+
/**
|
|
1358
|
+
* All stages in execution order
|
|
1359
|
+
*/
|
|
1360
|
+
declare const PLUGIN_STAGES_ORDER: readonly PluginStage[];
|
|
1361
|
+
//#endregion
|
|
1310
1362
|
//#region src/services/module-loader.service.d.mts
|
|
1311
1363
|
/**
|
|
1312
1364
|
* Extension definition for dynamically adding to the module tree.
|
|
@@ -1368,53 +1420,225 @@ declare class ModuleLoaderService {
|
|
|
1368
1420
|
dispose(): void;
|
|
1369
1421
|
}
|
|
1370
1422
|
//#endregion
|
|
1371
|
-
//#region src/interfaces/plugin.
|
|
1423
|
+
//#region src/interfaces/plugin-context.d.mts
|
|
1424
|
+
/**
|
|
1425
|
+
* Container-only context available at early stages.
|
|
1426
|
+
* Available at: pre:modules-traverse
|
|
1427
|
+
*/
|
|
1428
|
+
interface ContainerOnlyContext {
|
|
1429
|
+
/**
|
|
1430
|
+
* The dependency injection container.
|
|
1431
|
+
*/
|
|
1432
|
+
container: Container;
|
|
1433
|
+
}
|
|
1434
|
+
/**
|
|
1435
|
+
* Context with modules loaded.
|
|
1436
|
+
* Available at: post:modules-traverse, pre:adapter-resolve
|
|
1437
|
+
*/
|
|
1438
|
+
interface ModulesLoadedContext extends ContainerOnlyContext {
|
|
1439
|
+
/**
|
|
1440
|
+
* All loaded modules with their metadata.
|
|
1441
|
+
* Keys are module class names, values are their metadata.
|
|
1442
|
+
*/
|
|
1443
|
+
modules: Map<string, ModuleMetadata>;
|
|
1444
|
+
/**
|
|
1445
|
+
* Module loader service for extending the module tree.
|
|
1446
|
+
* Use `moduleLoader.extendModules()` to add controllers dynamically.
|
|
1447
|
+
*/
|
|
1448
|
+
moduleLoader: ModuleLoaderService;
|
|
1449
|
+
}
|
|
1450
|
+
/**
|
|
1451
|
+
* Full context with adapter available.
|
|
1452
|
+
* Available at: post:adapter-resolve and all later stages
|
|
1453
|
+
*
|
|
1454
|
+
* @typeParam TAdapter - The adapter type, defaults to AbstractAdapterInterface
|
|
1455
|
+
*/
|
|
1456
|
+
interface FullPluginContext<TAdapter extends AbstractAdapterInterface = AbstractAdapterInterface> extends ModulesLoadedContext {
|
|
1457
|
+
/**
|
|
1458
|
+
* The current adapter instance.
|
|
1459
|
+
* Use type guards or cast to adapter-specific types for HTTP methods.
|
|
1460
|
+
*/
|
|
1461
|
+
adapter: TAdapter;
|
|
1462
|
+
}
|
|
1463
|
+
/**
|
|
1464
|
+
* Maps each plugin stage to its available context type.
|
|
1465
|
+
*
|
|
1466
|
+
* @typeParam TAdapter - The adapter type for stages that have adapter access
|
|
1467
|
+
*/
|
|
1468
|
+
interface PluginStageContextMap<TAdapter extends AbstractAdapterInterface = AbstractAdapterInterface> {
|
|
1469
|
+
'pre:modules-traverse': ContainerOnlyContext;
|
|
1470
|
+
'post:modules-traverse': ModulesLoadedContext;
|
|
1471
|
+
'pre:adapter-resolve': ModulesLoadedContext;
|
|
1472
|
+
'post:adapter-resolve': FullPluginContext<TAdapter>;
|
|
1473
|
+
'pre:adapter-setup': FullPluginContext<TAdapter>;
|
|
1474
|
+
'post:adapter-setup': FullPluginContext<TAdapter>;
|
|
1475
|
+
'pre:modules-init': FullPluginContext<TAdapter>;
|
|
1476
|
+
'post:modules-init': FullPluginContext<TAdapter>;
|
|
1477
|
+
'pre:ready': FullPluginContext<TAdapter>;
|
|
1478
|
+
'post:ready': FullPluginContext<TAdapter>;
|
|
1479
|
+
}
|
|
1480
|
+
/**
|
|
1481
|
+
* Helper type to get the context type for a specific stage.
|
|
1482
|
+
*
|
|
1483
|
+
* @typeParam S - The plugin stage
|
|
1484
|
+
* @typeParam TAdapter - The adapter type for stages that have adapter access
|
|
1485
|
+
*
|
|
1486
|
+
* @example
|
|
1487
|
+
* ```typescript
|
|
1488
|
+
* type MyContext = ContextForStage<'pre:adapter-resolve'>
|
|
1489
|
+
* // MyContext is ModulesLoadedContext (no adapter)
|
|
1490
|
+
*
|
|
1491
|
+
* type FullContext = ContextForStage<'post:modules-init', BunApplicationService>
|
|
1492
|
+
* // FullContext has typed adapter
|
|
1493
|
+
* ```
|
|
1494
|
+
*/
|
|
1495
|
+
type ContextForStage<S extends PluginStage, TAdapter extends AbstractAdapterInterface = AbstractAdapterInterface> = PluginStageContextMap<TAdapter>[S];
|
|
1372
1496
|
/**
|
|
1373
1497
|
* Context provided to plugins during registration.
|
|
1374
1498
|
*
|
|
1375
|
-
*
|
|
1376
|
-
*
|
|
1499
|
+
* @deprecated Use stage-specific context types (ContainerOnlyContext,
|
|
1500
|
+
* ModulesLoadedContext, FullPluginContext) for better type safety.
|
|
1501
|
+
* This is an alias for FullPluginContext for backward compatibility.
|
|
1377
1502
|
*
|
|
1378
1503
|
* @typeParam TAdapter - The adapter type, defaults to AbstractAdapterInterface
|
|
1504
|
+
*/
|
|
1505
|
+
type PluginContext<TAdapter extends AbstractAdapterInterface = AbstractAdapterInterface> = FullPluginContext<TAdapter>;
|
|
1506
|
+
//#endregion
|
|
1507
|
+
//#region src/interfaces/staged-plugin.interface.d.mts
|
|
1508
|
+
/**
|
|
1509
|
+
* Base interface for staged plugins that target a specific lifecycle stage.
|
|
1510
|
+
*
|
|
1511
|
+
* @typeParam S - The target stage (e.g., 'pre:adapter-resolve')
|
|
1512
|
+
* @typeParam TOptions - Plugin options type
|
|
1513
|
+
* @typeParam TAdapter - Adapter type (only relevant for post-adapter stages)
|
|
1379
1514
|
*
|
|
1380
1515
|
* @example
|
|
1381
1516
|
* ```typescript
|
|
1382
|
-
*
|
|
1383
|
-
*
|
|
1384
|
-
*
|
|
1385
|
-
*
|
|
1386
|
-
*
|
|
1387
|
-
*
|
|
1388
|
-
* // Adapter-specific plugin with typed adapter
|
|
1389
|
-
* async register(context: PluginContext<BunApplicationService>) {
|
|
1390
|
-
* const server = context.adapter.getServer() // Typed as Bun.Server
|
|
1391
|
-
* // ...
|
|
1517
|
+
* const myPlugin: StagedPlugin<'pre:adapter-resolve', MyOptions> = {
|
|
1518
|
+
* name: 'my-plugin',
|
|
1519
|
+
* stage: 'pre:adapter-resolve',
|
|
1520
|
+
* register: (context, options) => {
|
|
1521
|
+
* // context is typed as ModulesLoadedContext
|
|
1522
|
+
* },
|
|
1392
1523
|
* }
|
|
1393
1524
|
* ```
|
|
1394
1525
|
*/
|
|
1395
|
-
interface
|
|
1526
|
+
interface StagedPlugin<S extends PluginStage, TOptions = unknown, TAdapter extends AbstractAdapterInterface = AbstractAdapterInterface> {
|
|
1396
1527
|
/**
|
|
1397
|
-
*
|
|
1398
|
-
* Keys are module class names, values are their metadata.
|
|
1528
|
+
* Plugin name for identification and logging.
|
|
1399
1529
|
*/
|
|
1400
|
-
|
|
1530
|
+
readonly name: string;
|
|
1401
1531
|
/**
|
|
1402
|
-
* The
|
|
1403
|
-
* Use type guards or cast to adapter-specific types for HTTP methods.
|
|
1532
|
+
* The lifecycle stage this plugin targets.
|
|
1404
1533
|
*/
|
|
1405
|
-
|
|
1534
|
+
readonly stage: S;
|
|
1406
1535
|
/**
|
|
1407
|
-
*
|
|
1536
|
+
* Called at the specified stage during application initialization.
|
|
1537
|
+
*
|
|
1538
|
+
* @param context - Stage-appropriate context
|
|
1539
|
+
* @param options - Plugin-specific configuration options
|
|
1408
1540
|
*/
|
|
1409
|
-
|
|
1541
|
+
register(context: ContextForStage<S, TAdapter>, options: TOptions): Promise<void> | void;
|
|
1542
|
+
}
|
|
1543
|
+
/**
|
|
1544
|
+
* Plugin that runs before module tree traversal.
|
|
1545
|
+
* Context: container only
|
|
1546
|
+
*/
|
|
1547
|
+
interface PreModulesTraversePlugin<TOptions = unknown> extends StagedPlugin<'pre:modules-traverse', TOptions, never> {
|
|
1548
|
+
register(context: ContainerOnlyContext, options: TOptions): Promise<void> | void;
|
|
1549
|
+
}
|
|
1550
|
+
/**
|
|
1551
|
+
* Plugin that runs after module tree traversal.
|
|
1552
|
+
* Context: container + modules + moduleLoader
|
|
1553
|
+
*/
|
|
1554
|
+
interface PostModulesTraversePlugin<TOptions = unknown> extends StagedPlugin<'post:modules-traverse', TOptions, never> {
|
|
1555
|
+
register(context: ModulesLoadedContext, options: TOptions): Promise<void> | void;
|
|
1556
|
+
}
|
|
1557
|
+
/**
|
|
1558
|
+
* Plugin that runs before adapter is resolved from container.
|
|
1559
|
+
* Context: container + modules + moduleLoader (NO adapter yet!)
|
|
1560
|
+
*
|
|
1561
|
+
* Use this stage to modify registry/bindings before adapter instantiation.
|
|
1562
|
+
*/
|
|
1563
|
+
interface PreAdapterResolvePlugin<TOptions = unknown> extends StagedPlugin<'pre:adapter-resolve', TOptions, never> {
|
|
1564
|
+
register(context: ModulesLoadedContext, options: TOptions): Promise<void> | void;
|
|
1565
|
+
}
|
|
1566
|
+
/**
|
|
1567
|
+
* Plugin that runs after adapter is resolved.
|
|
1568
|
+
* Context: full (container + modules + moduleLoader + adapter)
|
|
1569
|
+
*/
|
|
1570
|
+
interface PostAdapterResolvePlugin<TOptions = unknown, TAdapter extends AbstractAdapterInterface = AbstractAdapterInterface> extends StagedPlugin<'post:adapter-resolve', TOptions, TAdapter> {
|
|
1571
|
+
register(context: FullPluginContext<TAdapter>, options: TOptions): Promise<void> | void;
|
|
1572
|
+
}
|
|
1573
|
+
/**
|
|
1574
|
+
* Plugin that runs before adapter setup.
|
|
1575
|
+
* Context: full
|
|
1576
|
+
*/
|
|
1577
|
+
interface PreAdapterSetupPlugin<TOptions = unknown, TAdapter extends AbstractAdapterInterface = AbstractAdapterInterface> extends StagedPlugin<'pre:adapter-setup', TOptions, TAdapter> {
|
|
1578
|
+
register(context: FullPluginContext<TAdapter>, options: TOptions): Promise<void> | void;
|
|
1579
|
+
}
|
|
1580
|
+
/**
|
|
1581
|
+
* Plugin that runs after adapter setup.
|
|
1582
|
+
* Context: full
|
|
1583
|
+
*/
|
|
1584
|
+
interface PostAdapterSetupPlugin<TOptions = unknown, TAdapter extends AbstractAdapterInterface = AbstractAdapterInterface> extends StagedPlugin<'post:adapter-setup', TOptions, TAdapter> {
|
|
1585
|
+
register(context: FullPluginContext<TAdapter>, options: TOptions): Promise<void> | void;
|
|
1586
|
+
}
|
|
1587
|
+
/**
|
|
1588
|
+
* Plugin that runs before modules init (route registration).
|
|
1589
|
+
* Context: full
|
|
1590
|
+
*/
|
|
1591
|
+
interface PreModulesInitPlugin<TOptions = unknown, TAdapter extends AbstractAdapterInterface = AbstractAdapterInterface> extends StagedPlugin<'pre:modules-init', TOptions, TAdapter> {
|
|
1592
|
+
register(context: FullPluginContext<TAdapter>, options: TOptions): Promise<void> | void;
|
|
1593
|
+
}
|
|
1594
|
+
/**
|
|
1595
|
+
* Plugin that runs after modules init (route registration).
|
|
1596
|
+
* Context: full
|
|
1597
|
+
*
|
|
1598
|
+
* This is the default stage for legacy NaviosPlugin implementations.
|
|
1599
|
+
*/
|
|
1600
|
+
interface PostModulesInitPlugin<TOptions = unknown, TAdapter extends AbstractAdapterInterface = AbstractAdapterInterface> extends StagedPlugin<'post:modules-init', TOptions, TAdapter> {
|
|
1601
|
+
register(context: FullPluginContext<TAdapter>, options: TOptions): Promise<void> | void;
|
|
1602
|
+
}
|
|
1603
|
+
/**
|
|
1604
|
+
* Plugin that runs before adapter signals ready.
|
|
1605
|
+
* Context: full
|
|
1606
|
+
*/
|
|
1607
|
+
interface PreReadyPlugin<TOptions = unknown, TAdapter extends AbstractAdapterInterface = AbstractAdapterInterface> extends StagedPlugin<'pre:ready', TOptions, TAdapter> {
|
|
1608
|
+
register(context: FullPluginContext<TAdapter>, options: TOptions): Promise<void> | void;
|
|
1609
|
+
}
|
|
1610
|
+
/**
|
|
1611
|
+
* Plugin that runs after adapter signals ready.
|
|
1612
|
+
* Context: full - this is the final stage, app is fully initialized
|
|
1613
|
+
*/
|
|
1614
|
+
interface PostReadyPlugin<TOptions = unknown, TAdapter extends AbstractAdapterInterface = AbstractAdapterInterface> extends StagedPlugin<'post:ready', TOptions, TAdapter> {
|
|
1615
|
+
register(context: FullPluginContext<TAdapter>, options: TOptions): Promise<void> | void;
|
|
1616
|
+
}
|
|
1617
|
+
/**
|
|
1618
|
+
* Plugin definition for staged plugins.
|
|
1619
|
+
*
|
|
1620
|
+
* @typeParam S - The target stage
|
|
1621
|
+
* @typeParam TOptions - Plugin options type
|
|
1622
|
+
* @typeParam TAdapter - Adapter type
|
|
1623
|
+
*/
|
|
1624
|
+
interface StagedPluginDefinition<S extends PluginStage = PluginStage, TOptions = unknown, TAdapter extends AbstractAdapterInterface = AbstractAdapterInterface> {
|
|
1410
1625
|
/**
|
|
1411
|
-
*
|
|
1412
|
-
* Use `moduleLoader.extendModules()` to add controllers dynamically.
|
|
1626
|
+
* The staged plugin instance.
|
|
1413
1627
|
*/
|
|
1414
|
-
|
|
1628
|
+
plugin: StagedPlugin<S, TOptions, TAdapter>;
|
|
1629
|
+
/**
|
|
1630
|
+
* Options to pass to the plugin's register function.
|
|
1631
|
+
*/
|
|
1632
|
+
options: TOptions;
|
|
1415
1633
|
}
|
|
1634
|
+
//#endregion
|
|
1635
|
+
//#region src/interfaces/plugin.interface.d.mts
|
|
1416
1636
|
/**
|
|
1417
|
-
* Base interface for Navios plugins.
|
|
1637
|
+
* Base interface for Navios plugins (legacy).
|
|
1638
|
+
*
|
|
1639
|
+
* @deprecated Use staged plugins with explicit stage property instead.
|
|
1640
|
+
* This interface maps to the `post:modules-init` stage.
|
|
1641
|
+
* See `StagedPlugin` for the new pattern.
|
|
1418
1642
|
*
|
|
1419
1643
|
* Plugins are registered using `app.usePlugin()` and are initialized
|
|
1420
1644
|
* after all modules are loaded but before the server starts listening.
|
|
@@ -1424,7 +1648,7 @@ interface PluginContext<TAdapter extends AbstractAdapterInterface = AbstractAdap
|
|
|
1424
1648
|
*
|
|
1425
1649
|
* @example
|
|
1426
1650
|
* ```typescript
|
|
1427
|
-
* //
|
|
1651
|
+
* // Legacy pattern (still works, maps to post:modules-init)
|
|
1428
1652
|
* const myPlugin: NaviosPlugin<{ enabled: boolean }> = {
|
|
1429
1653
|
* name: 'my-plugin',
|
|
1430
1654
|
* register: async (context, options) => {
|
|
@@ -1434,13 +1658,15 @@ interface PluginContext<TAdapter extends AbstractAdapterInterface = AbstractAdap
|
|
|
1434
1658
|
* },
|
|
1435
1659
|
* }
|
|
1436
1660
|
*
|
|
1437
|
-
* //
|
|
1438
|
-
*
|
|
1439
|
-
*
|
|
1440
|
-
*
|
|
1441
|
-
*
|
|
1661
|
+
* // New pattern (recommended)
|
|
1662
|
+
* import { definePostModulesInitPlugin } from '@navios/core'
|
|
1663
|
+
*
|
|
1664
|
+
* export const defineMyPlugin = definePostModulesInitPlugin()({
|
|
1665
|
+
* name: 'my-plugin',
|
|
1666
|
+
* register: async (context, options: { enabled: boolean }) => {
|
|
1667
|
+
* // ...
|
|
1442
1668
|
* },
|
|
1443
|
-
* }
|
|
1669
|
+
* })
|
|
1444
1670
|
* ```
|
|
1445
1671
|
*/
|
|
1446
1672
|
interface NaviosPlugin<TOptions = unknown, TAdapter extends AbstractAdapterInterface = AbstractAdapterInterface> {
|
|
@@ -1453,25 +1679,36 @@ interface NaviosPlugin<TOptions = unknown, TAdapter extends AbstractAdapterInter
|
|
|
1453
1679
|
*
|
|
1454
1680
|
* @param context - The plugin context with access to modules and adapter
|
|
1455
1681
|
* @param options - Plugin-specific configuration options
|
|
1682
|
+
* @deprecated Use staged plugins with explicit stage property
|
|
1456
1683
|
*/
|
|
1457
1684
|
register(context: PluginContext<TAdapter>, options: TOptions): Promise<void> | void;
|
|
1458
1685
|
}
|
|
1459
1686
|
/**
|
|
1460
1687
|
* Plugin definition combining a plugin with its options.
|
|
1461
1688
|
*
|
|
1462
|
-
*
|
|
1689
|
+
* @deprecated Use `StagedPluginDefinition` for new plugins.
|
|
1690
|
+
* This type is kept for backward compatibility with legacy plugins.
|
|
1463
1691
|
*
|
|
1464
1692
|
* @typeParam TOptions - The type of options the plugin accepts
|
|
1465
1693
|
* @typeParam TAdapter - The adapter type the plugin requires
|
|
1466
1694
|
*
|
|
1467
1695
|
* @example
|
|
1468
1696
|
* ```typescript
|
|
1697
|
+
* // Legacy pattern
|
|
1469
1698
|
* function defineMyPlugin(options: MyPluginOptions): PluginDefinition<MyPluginOptions> {
|
|
1470
1699
|
* return {
|
|
1471
1700
|
* plugin: myPlugin,
|
|
1472
1701
|
* options,
|
|
1473
1702
|
* }
|
|
1474
1703
|
* }
|
|
1704
|
+
*
|
|
1705
|
+
* // New pattern (recommended)
|
|
1706
|
+
* import { definePostModulesInitPlugin } from '@navios/core'
|
|
1707
|
+
*
|
|
1708
|
+
* export const defineMyPlugin = definePostModulesInitPlugin()({
|
|
1709
|
+
* name: 'my-plugin',
|
|
1710
|
+
* register: (context, options: MyPluginOptions) => { ... },
|
|
1711
|
+
* })
|
|
1475
1712
|
* ```
|
|
1476
1713
|
*/
|
|
1477
1714
|
interface PluginDefinition<TOptions = unknown, TAdapter extends AbstractAdapterInterface = AbstractAdapterInterface> {
|
|
@@ -1484,6 +1721,11 @@ interface PluginDefinition<TOptions = unknown, TAdapter extends AbstractAdapterI
|
|
|
1484
1721
|
*/
|
|
1485
1722
|
options: TOptions;
|
|
1486
1723
|
}
|
|
1724
|
+
/**
|
|
1725
|
+
* Union of legacy and staged plugin definitions.
|
|
1726
|
+
* Used internally by `usePlugin()` to accept both patterns.
|
|
1727
|
+
*/
|
|
1728
|
+
type AnyPluginDefinition<TOptions = unknown, TAdapter extends AbstractAdapterInterface = AbstractAdapterInterface> = PluginDefinition<TOptions, TAdapter> | StagedPluginDefinition<PluginStage, TOptions, TAdapter>;
|
|
1487
1729
|
//#endregion
|
|
1488
1730
|
//#region src/decorators/header.decorator.d.mts
|
|
1489
1731
|
/**
|
|
@@ -2456,7 +2698,16 @@ declare class NaviosApplication<Environment extends AdapterEnvironment = Default
|
|
|
2456
2698
|
protected container: Container;
|
|
2457
2699
|
private appModule;
|
|
2458
2700
|
private options;
|
|
2701
|
+
/**
|
|
2702
|
+
* Plugin storage organized by stage for efficient execution.
|
|
2703
|
+
* Each stage has a Set of plugin definitions.
|
|
2704
|
+
*/
|
|
2459
2705
|
private plugins;
|
|
2706
|
+
/**
|
|
2707
|
+
* Queue of adapter configuration methods to apply after adapter resolution.
|
|
2708
|
+
* Allows calling methods like enableCors() before init().
|
|
2709
|
+
*/
|
|
2710
|
+
private pendingAdapterCalls;
|
|
2460
2711
|
/**
|
|
2461
2712
|
* Indicates whether the application has been initialized.
|
|
2462
2713
|
* Set to `true` after `init()` completes successfully.
|
|
@@ -2466,6 +2717,9 @@ declare class NaviosApplication<Environment extends AdapterEnvironment = Default
|
|
|
2466
2717
|
* Sets up the application with the provided module and options.
|
|
2467
2718
|
* This is called automatically by NaviosFactory.create().
|
|
2468
2719
|
*
|
|
2720
|
+
* Note: Adapter resolution has been moved to init() to allow
|
|
2721
|
+
* plugins to modify the container/registry before adapter instantiation.
|
|
2722
|
+
*
|
|
2469
2723
|
* @param appModule - The root application module
|
|
2470
2724
|
* @param options - Application configuration options
|
|
2471
2725
|
* @internal
|
|
@@ -2485,33 +2739,47 @@ declare class NaviosApplication<Environment extends AdapterEnvironment = Default
|
|
|
2485
2739
|
*/
|
|
2486
2740
|
getAdapter(): Environment['adapter'];
|
|
2487
2741
|
/**
|
|
2488
|
-
* Registers
|
|
2742
|
+
* Registers one or more plugins for initialization during the application lifecycle.
|
|
2489
2743
|
*
|
|
2490
|
-
* Plugins
|
|
2491
|
-
*
|
|
2744
|
+
* Plugins can target specific stages or use the legacy interface (defaults to post:modules-init).
|
|
2745
|
+
* Plugins are executed in stage order, and within a stage in registration order.
|
|
2492
2746
|
*
|
|
2493
|
-
* @param
|
|
2747
|
+
* @param definitions - Single plugin definition or array of definitions
|
|
2494
2748
|
* @returns this for method chaining
|
|
2495
2749
|
*
|
|
2496
2750
|
* @example
|
|
2497
2751
|
* ```typescript
|
|
2498
|
-
*
|
|
2752
|
+
* // Single plugin (legacy or staged)
|
|
2753
|
+
* app.usePlugin(defineOpenApiPlugin({ info: { title: 'My API', version: '1.0.0' } }))
|
|
2499
2754
|
*
|
|
2500
|
-
*
|
|
2501
|
-
*
|
|
2502
|
-
* })
|
|
2755
|
+
* // Multiple plugins in one call
|
|
2756
|
+
* app.usePlugin([
|
|
2757
|
+
* defineOtelPlugin({ serviceName: 'my-service' }),
|
|
2758
|
+
* defineOpenApiPlugin({ info: { title: 'My API', version: '1.0.0' } }),
|
|
2759
|
+
* ])
|
|
2760
|
+
*
|
|
2761
|
+
* // Staged plugin with explicit stage
|
|
2762
|
+
* app.usePlugin(definePreAdapterResolvePlugin({
|
|
2763
|
+
* name: 'early-setup',
|
|
2764
|
+
* register: (ctx) => { ... },
|
|
2765
|
+
* })({}))
|
|
2503
2766
|
* ```
|
|
2504
2767
|
*/
|
|
2505
|
-
usePlugin<TOptions, TAdapter extends AbstractAdapterInterface>(
|
|
2768
|
+
usePlugin<TOptions, TAdapter extends AbstractAdapterInterface>(definitions: AnyPluginDefinition<TOptions, TAdapter> | AnyPluginDefinition<TOptions, TAdapter>[]): this;
|
|
2769
|
+
/**
|
|
2770
|
+
* Resolves the stage for a plugin definition.
|
|
2771
|
+
* Staged plugins use their explicit stage, legacy plugins default to post:modules-init.
|
|
2772
|
+
*/
|
|
2773
|
+
private resolvePluginStage;
|
|
2506
2774
|
/**
|
|
2507
2775
|
* Initializes the application.
|
|
2508
2776
|
*
|
|
2509
|
-
* This method:
|
|
2510
|
-
* -
|
|
2511
|
-
* -
|
|
2512
|
-
* -
|
|
2513
|
-
* -
|
|
2514
|
-
*
|
|
2777
|
+
* This method executes the following lifecycle stages:
|
|
2778
|
+
* 1. pre:modules-traverse → Load modules → post:modules-traverse
|
|
2779
|
+
* 2. pre:adapter-resolve → Resolve adapter → post:adapter-resolve
|
|
2780
|
+
* 3. pre:adapter-setup → Setup adapter → post:adapter-setup
|
|
2781
|
+
* 4. pre:modules-init → Initialize modules → post:modules-init
|
|
2782
|
+
* 5. pre:ready → Ready signal → post:ready
|
|
2515
2783
|
*
|
|
2516
2784
|
* Must be called before `listen()`.
|
|
2517
2785
|
*
|
|
@@ -2527,8 +2795,32 @@ declare class NaviosApplication<Environment extends AdapterEnvironment = Default
|
|
|
2527
2795
|
* ```
|
|
2528
2796
|
*/
|
|
2529
2797
|
init(): Promise<void>;
|
|
2798
|
+
/**
|
|
2799
|
+
* Wraps an operation with pre/post plugin stage execution.
|
|
2800
|
+
*
|
|
2801
|
+
* @param baseName - The base stage name (e.g., 'modules-traverse')
|
|
2802
|
+
* @param operation - The operation to execute between pre/post stages
|
|
2803
|
+
*/
|
|
2804
|
+
private wrapStage;
|
|
2805
|
+
/**
|
|
2806
|
+
* Executes all plugins registered for a specific stage.
|
|
2807
|
+
*
|
|
2808
|
+
* @param stage - The lifecycle stage to execute plugins for
|
|
2809
|
+
*/
|
|
2810
|
+
private executePluginStage;
|
|
2811
|
+
/**
|
|
2812
|
+
* Builds the appropriate context object for a given stage.
|
|
2813
|
+
*
|
|
2814
|
+
* @param stage - The lifecycle stage
|
|
2815
|
+
* @returns Context object with stage-appropriate properties
|
|
2816
|
+
*/
|
|
2817
|
+
private buildContextForStage;
|
|
2530
2818
|
private initModules;
|
|
2531
|
-
|
|
2819
|
+
/**
|
|
2820
|
+
* Applies any pending adapter configuration calls that were queued
|
|
2821
|
+
* before the adapter was resolved.
|
|
2822
|
+
*/
|
|
2823
|
+
private applyPendingAdapterCalls;
|
|
2532
2824
|
/**
|
|
2533
2825
|
* Gets a service instance from the dependency injection container.
|
|
2534
2826
|
*
|
|
@@ -3061,6 +3353,153 @@ declare function adapterSupports<TAdapter extends AbstractAdapterInterface, TMet
|
|
|
3061
3353
|
*/
|
|
3062
3354
|
declare function assertAdapterSupports<TAdapter extends AbstractAdapterInterface, TMethod extends string>(adapter: TAdapter | null, method: TMethod): asserts adapter is TAdapter & Record<TMethod, (...args: unknown[]) => unknown>;
|
|
3063
3355
|
//#endregion
|
|
3356
|
+
//#region src/utils/define-plugin.d.mts
|
|
3357
|
+
interface PluginConfig<TContext, TOptions> {
|
|
3358
|
+
name: string;
|
|
3359
|
+
register: (context: TContext, options: TOptions) => Promise<void> | void;
|
|
3360
|
+
}
|
|
3361
|
+
/**
|
|
3362
|
+
* Define a plugin that runs before modules are traversed.
|
|
3363
|
+
*
|
|
3364
|
+
* Context: container only
|
|
3365
|
+
*
|
|
3366
|
+
* Use this stage for early DI setup before any modules are loaded.
|
|
3367
|
+
*
|
|
3368
|
+
* @example
|
|
3369
|
+
* ```typescript
|
|
3370
|
+
* export const defineEarlySetupPlugin = definePreModulesTraversePlugin({
|
|
3371
|
+
* name: 'early-setup',
|
|
3372
|
+
* register: (context, options: { key: string }) => {
|
|
3373
|
+
* context.container.addInstance(SomeToken, options.key)
|
|
3374
|
+
* },
|
|
3375
|
+
* })
|
|
3376
|
+
*
|
|
3377
|
+
* // Usage
|
|
3378
|
+
* app.usePlugin(defineEarlySetupPlugin({ key: 'value' }))
|
|
3379
|
+
* ```
|
|
3380
|
+
*/
|
|
3381
|
+
declare const definePreModulesTraversePlugin: <TOptions, TAdapter extends AbstractAdapterInterface = AbstractAdapterInterface>(config: PluginConfig<ContainerOnlyContext, TOptions>) => (options: TOptions) => StagedPluginDefinition<"pre:modules-traverse", TOptions, TAdapter>;
|
|
3382
|
+
/**
|
|
3383
|
+
* Define a plugin that runs after modules are traversed.
|
|
3384
|
+
*
|
|
3385
|
+
* Context: container + modules + moduleLoader
|
|
3386
|
+
*
|
|
3387
|
+
* Use this stage to inspect loaded modules or extend the module tree.
|
|
3388
|
+
*
|
|
3389
|
+
* @example
|
|
3390
|
+
* ```typescript
|
|
3391
|
+
* export const defineModuleInspectorPlugin = definePostModulesTraversePlugin({
|
|
3392
|
+
* name: 'module-inspector',
|
|
3393
|
+
* register: (context, options) => {
|
|
3394
|
+
* console.log('Loaded modules:', context.modules.size)
|
|
3395
|
+
* },
|
|
3396
|
+
* })
|
|
3397
|
+
* ```
|
|
3398
|
+
*/
|
|
3399
|
+
declare const definePostModulesTraversePlugin: <TOptions, TAdapter extends AbstractAdapterInterface = AbstractAdapterInterface>(config: PluginConfig<ModulesLoadedContext, TOptions>) => (options: TOptions) => StagedPluginDefinition<"post:modules-traverse", TOptions, TAdapter>;
|
|
3400
|
+
/**
|
|
3401
|
+
* Define a plugin that runs before adapter is resolved from container.
|
|
3402
|
+
*
|
|
3403
|
+
* Context: container + modules + moduleLoader (NO adapter yet!)
|
|
3404
|
+
*
|
|
3405
|
+
* Use this stage to modify registry/bindings before adapter instantiation.
|
|
3406
|
+
* This is ideal for instrumentation, service wrapping, or changing DI bindings.
|
|
3407
|
+
*
|
|
3408
|
+
* @example
|
|
3409
|
+
* ```typescript
|
|
3410
|
+
* export const defineOtelPlugin = definePreAdapterResolvePlugin({
|
|
3411
|
+
* name: 'otel',
|
|
3412
|
+
* register: (context, options: OtelOptions) => {
|
|
3413
|
+
* const registry = context.container.getRegistry()
|
|
3414
|
+
* // Modify registry before adapter is created
|
|
3415
|
+
* },
|
|
3416
|
+
* })
|
|
3417
|
+
*
|
|
3418
|
+
* // Usage
|
|
3419
|
+
* app.usePlugin(defineOtelPlugin({ serviceName: 'my-app' }))
|
|
3420
|
+
* ```
|
|
3421
|
+
*/
|
|
3422
|
+
declare const definePreAdapterResolvePlugin: <TOptions, TAdapter extends AbstractAdapterInterface = AbstractAdapterInterface>(config: PluginConfig<ModulesLoadedContext, TOptions>) => (options: TOptions) => StagedPluginDefinition<"pre:adapter-resolve", TOptions, TAdapter>;
|
|
3423
|
+
/**
|
|
3424
|
+
* Define a plugin that runs after adapter is resolved.
|
|
3425
|
+
*
|
|
3426
|
+
* Context: full (container + modules + moduleLoader + adapter)
|
|
3427
|
+
*
|
|
3428
|
+
* @example
|
|
3429
|
+
* ```typescript
|
|
3430
|
+
* export const defineAdapterConfigPlugin = definePostAdapterResolvePlugin<
|
|
3431
|
+
* { prefix: string },
|
|
3432
|
+
* BunApplicationServiceInterface
|
|
3433
|
+
* >()({
|
|
3434
|
+
* name: 'adapter-config',
|
|
3435
|
+
* register: (context, options) => {
|
|
3436
|
+
* context.adapter.setGlobalPrefix(options.prefix)
|
|
3437
|
+
* },
|
|
3438
|
+
* })
|
|
3439
|
+
* ```
|
|
3440
|
+
*/
|
|
3441
|
+
declare function definePostAdapterResolvePlugin<TAdapter extends AbstractAdapterInterface = AbstractAdapterInterface>(): <TOptions, TAdapter_1 extends AbstractAdapterInterface = AbstractAdapterInterface>(config: PluginConfig<FullPluginContext<TAdapter>, TOptions>) => (options: TOptions) => StagedPluginDefinition<"post:adapter-resolve", TOptions, TAdapter_1>;
|
|
3442
|
+
/**
|
|
3443
|
+
* Define a plugin that runs before adapter setup.
|
|
3444
|
+
*
|
|
3445
|
+
* Context: full
|
|
3446
|
+
*/
|
|
3447
|
+
declare function definePreAdapterSetupPlugin<TAdapter extends AbstractAdapterInterface = AbstractAdapterInterface>(): <TOptions, TAdapter_1 extends AbstractAdapterInterface = AbstractAdapterInterface>(config: PluginConfig<FullPluginContext<TAdapter>, TOptions>) => (options: TOptions) => StagedPluginDefinition<"pre:adapter-setup", TOptions, TAdapter_1>;
|
|
3448
|
+
/**
|
|
3449
|
+
* Define a plugin that runs after adapter setup.
|
|
3450
|
+
*
|
|
3451
|
+
* Context: full
|
|
3452
|
+
*/
|
|
3453
|
+
declare function definePostAdapterSetupPlugin<TAdapter extends AbstractAdapterInterface = AbstractAdapterInterface>(): <TOptions, TAdapter_1 extends AbstractAdapterInterface = AbstractAdapterInterface>(config: PluginConfig<FullPluginContext<TAdapter>, TOptions>) => (options: TOptions) => StagedPluginDefinition<"post:adapter-setup", TOptions, TAdapter_1>;
|
|
3454
|
+
/**
|
|
3455
|
+
* Define a plugin that runs before modules init (route registration).
|
|
3456
|
+
*
|
|
3457
|
+
* Context: full
|
|
3458
|
+
*/
|
|
3459
|
+
declare function definePreModulesInitPlugin<TAdapter extends AbstractAdapterInterface = AbstractAdapterInterface>(): <TOptions, TAdapter_1 extends AbstractAdapterInterface = AbstractAdapterInterface>(config: PluginConfig<FullPluginContext<TAdapter>, TOptions>) => (options: TOptions) => StagedPluginDefinition<"pre:modules-init", TOptions, TAdapter_1>;
|
|
3460
|
+
/**
|
|
3461
|
+
* Define a plugin that runs after modules init (route registration).
|
|
3462
|
+
*
|
|
3463
|
+
* Context: full
|
|
3464
|
+
*
|
|
3465
|
+
* This is the default stage for legacy NaviosPlugin implementations.
|
|
3466
|
+
*
|
|
3467
|
+
* @example
|
|
3468
|
+
* ```typescript
|
|
3469
|
+
* export const defineOpenApiPlugin = definePostModulesInitPlugin<
|
|
3470
|
+
* BunApplicationServiceInterface
|
|
3471
|
+
* >()({
|
|
3472
|
+
* name: 'openapi',
|
|
3473
|
+
* register: async (context, options: OpenApiOptions) => {
|
|
3474
|
+
* // Routes are registered, can generate OpenAPI docs
|
|
3475
|
+
* },
|
|
3476
|
+
* })
|
|
3477
|
+
* ```
|
|
3478
|
+
*/
|
|
3479
|
+
declare function definePostModulesInitPlugin<TAdapter extends AbstractAdapterInterface = AbstractAdapterInterface>(): <TOptions, TAdapter_1 extends AbstractAdapterInterface = AbstractAdapterInterface>(config: PluginConfig<FullPluginContext<TAdapter>, TOptions>) => (options: TOptions) => StagedPluginDefinition<"post:modules-init", TOptions, TAdapter_1>;
|
|
3480
|
+
/**
|
|
3481
|
+
* Define a plugin that runs before adapter signals ready.
|
|
3482
|
+
*
|
|
3483
|
+
* Context: full
|
|
3484
|
+
*/
|
|
3485
|
+
declare function definePreReadyPlugin<TAdapter extends AbstractAdapterInterface = AbstractAdapterInterface>(): <TOptions, TAdapter_1 extends AbstractAdapterInterface = AbstractAdapterInterface>(config: PluginConfig<FullPluginContext<TAdapter>, TOptions>) => (options: TOptions) => StagedPluginDefinition<"pre:ready", TOptions, TAdapter_1>;
|
|
3486
|
+
/**
|
|
3487
|
+
* Define a plugin that runs after adapter signals ready.
|
|
3488
|
+
*
|
|
3489
|
+
* Context: full - this is the final stage, app is fully initialized
|
|
3490
|
+
*
|
|
3491
|
+
* @example
|
|
3492
|
+
* ```typescript
|
|
3493
|
+
* export const defineStartupLogPlugin = definePostReadyPlugin()({
|
|
3494
|
+
* name: 'startup-log',
|
|
3495
|
+
* register: (context) => {
|
|
3496
|
+
* console.log('Application fully initialized!')
|
|
3497
|
+
* },
|
|
3498
|
+
* })
|
|
3499
|
+
* ```
|
|
3500
|
+
*/
|
|
3501
|
+
declare function definePostReadyPlugin<TAdapter extends AbstractAdapterInterface = AbstractAdapterInterface>(): <TOptions, TAdapter_1 extends AbstractAdapterInterface = AbstractAdapterInterface>(config: PluginConfig<FullPluginContext<TAdapter>, TOptions>) => (options: TOptions) => StagedPluginDefinition<"post:ready", TOptions, TAdapter_1>;
|
|
3502
|
+
//#endregion
|
|
3064
3503
|
//#region src/attribute.factory.d.mts
|
|
3065
3504
|
/**
|
|
3066
3505
|
* Type for a class attribute decorator without a value.
|
|
@@ -3361,5 +3800,5 @@ declare class NaviosFactory {
|
|
|
3361
3800
|
private static registerLoggerConfiguration;
|
|
3362
3801
|
}
|
|
3363
3802
|
//#endregion
|
|
3364
|
-
export {
|
|
3365
|
-
//# sourceMappingURL=index-
|
|
3803
|
+
export { InternalServerErrorResponderToken as $, ModuleMetadata as $n, PluginStageBase as $t, MultipartAdapterToken as A, isPlainObject as An, PathValue as Ar, PluginDefinition as At, GuardRunnerService as B, LogLevel as Bn, PreReadyPlugin as Bt, adapterSupports as C, addLeadingSlash as Cn, ConfigServiceOptions as Cr, MultipartResult as Ct, Request as D, isNil as Dn, Path as Dr, Header as Dt, StreamAdapterToken as E, isFunction as En, ConfigServiceInterface as Er, HttpCode as Et, AdapterToken as F, stripEndSlash as Fn, PostReadyPlugin as Ft, ArgumentGetter as G, DefaultAdapterEnvironment as Gn, FullPluginContext as Gt, AbstractHandlerAdapterService as H, yellow as Hn, StagedPluginDefinition as Ht, generateRequestId as I, isLogLevelEnabled as In, PreAdapterResolvePlugin as It, InstanceResolverService as J, AbstractAdapterInterface as Jn, PluginStageContextMap as Jt, HandlerContext as K, HttpAdapterEnvironment as Kn, ModulesLoadedContext as Kt, getRequestId as L, isLogLevel as Ln, PreAdapterSetupPlugin as Lt, ExecutionContext as M, isSymbol as Mn, envString as Mr, PostAdapterSetupPlugin as Mt, ExecutionContextInjectionToken as N, isUndefined as Nn, PostModulesInitPlugin as Nt, Reply as O, isNumber as On, PathImpl as Or, AnyPluginDefinition as Ot, EndpointAdapterToken as P, normalizePath as Pn, PostModulesTraversePlugin as Pt, ForbiddenResponderToken as Q, hasManagedMetadata as Qn, PluginStage as Qt, runWithRequestId as R, filterLogLevels as Rn, PreModulesInitPlugin as Rt, definePreReadyPlugin as S, LoggerService as Sn, ConfigService as Sr, MultipartParams as St, XmlStreamAdapterToken as T, isEmpty as Tn, ConfigServiceToken as Tr, ModuleOptions as Tt, AbstractHandlerResult as U, AbstractHttpAdapterInterface as Un, ContainerOnlyContext as Ut, AbstractDynamicHandler as V, clc as Vn, StagedPlugin as Vt, AbstractStaticHandler as W, AdapterEnvironment as Wn, ContextForStage as Wt, NaviosApplication as X, NaviosManagedMetadataKey as Xn, ModuleLoaderService as Xt, MultiInstanceResolution as Y, ManagedMetadata as Yn, ModuleExtension as Yt, NaviosApplicationOptions as Z, getManagedMetadata as Zn, PLUGIN_STAGES_ORDER as Zt, definePostReadyPlugin as _, LoggerOutput as _n, Controller as _r, HttpException as _t, RequestFactory as a, OmitIndexSignature as an, ControllerMetadata as ar, ForbiddenResponderService as at, definePreModulesInitPlugin as b, ConsoleLogger as bn, EnvConfigProvider as br, StreamParams as bt, EndpointAdapterFactory as c, AbstractHttpHandlerAdapterInterface as cn, getControllerMetadata as cr, ErrorResponse as ct, ClassAttribute as d, FormatArgumentsFn$1 as dn, HandlerMetadata as dr, ConflictException as dt, PluginStages as en, ModuleMetadataKey as er, NotFoundResponderToken as et, ClassSchemaAttribute as f, HandlerResult as fn, getAllEndpointMetadata as fr, UnauthorizedException as ft, definePostModulesTraversePlugin as g, LoggerOptions as gn, EndpointResult as gr, BadRequestException as gt, definePostModulesInitPlugin as h, Logger as hn, EndpointParams as hr, ForbiddenException as ht, ReplyFactory as i, HttpHeader as in, hasModuleMetadata as ir, InternalServerErrorResponderService as it, HttpAdapterToken as j, isString as jn, envInt as jr, PostAdapterResolvePlugin as jt, NaviosOptionsToken as k, isObject as kn, PathImpl2 as kr, NaviosPlugin as kt, AdapterFactory as l, ArgumentGetterFn as ln, hasControllerMetadata as lr, ProblemDetails as lt, definePostAdapterSetupPlugin as m, AbstractHttpCorsOptions as mn, Endpoint as mr, InternalServerErrorException as mt, XmlStreamAdapterFactory as n, preStage as nn, getModuleCustomEntry as nr, ValidationErrorResponderService as nt, MultipartAdapterFactory as o, CanActivate as on, ControllerMetadataKey as or, ErrorResponseProducerService as ot, definePostAdapterResolvePlugin as p, StaticHandler as pn, getEndpointMetadata as pr, NotFoundException as pt, InstanceResolution as q, AbstractExecutionContext as qn, PluginContext as qt, StreamAdapterFactory as r, NaviosModule as rn, getModuleMetadata as rr, NotFoundResponderService as rt, HttpAdapterFactory as s, AbstractHttpListenOptions as sn, extractControllerMetadata as sr, ErrorResponder as st, NaviosFactory as t, postStage as tn, extractModuleMetadata as tr, ValidationErrorResponderToken as tt, AttributeFactory as u, DynamicHandler as un, EndpointMetadataKey as ur, FrameworkError as ut, definePreAdapterResolvePlugin as v, loggerOptionsSchema as vn, ControllerOptions as vr, UseGuards as vt, assertAdapterSupports as w, isConstructor as wn, ConfigServiceOptionsSchema as wr, Module as wt, definePreModulesTraversePlugin as x, ConsoleLoggerOptions as xn, provideConfig as xr, Multipart as xt, definePreAdapterSetupPlugin as y, LoggerInstance as yn, ConfigProviderOptions as yr, Stream as yt, setRequestIdEnabled as z, LOG_LEVELS as zn, PreModulesTraversePlugin as zt };
|
|
3804
|
+
//# sourceMappingURL=index-3LcTrbxz.d.mts.map
|