@zintrust/core 0.1.19 → 0.1.20
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 +10 -10
- package/bin/zintrust-main.d.ts.map +1 -1
- package/bin/zintrust-main.js +9 -0
- package/package.json +2 -2
- package/public/error-pages/404.html +145 -0
- package/public/error-pages/500.html +266 -0
- package/public/error-pages/error.css +628 -0
- package/public/error-pages/error.js +428 -0
- package/public/zintrust.svg +30 -0
- package/routes/api.d.ts.map +1 -1
- package/routes/api.js +41 -17
- package/routes/metrics.d.ts +9 -0
- package/routes/metrics.d.ts.map +1 -0
- package/routes/metrics.js +20 -0
- package/routes/openapi.d.ts +9 -0
- package/routes/openapi.d.ts.map +1 -0
- package/routes/openapi.js +76 -0
- package/src/boot/Application.d.ts +2 -2
- package/src/boot/Application.d.ts.map +1 -1
- package/src/boot/Application.js +18 -3
- package/src/boot/Server.d.ts +3 -2
- package/src/boot/Server.d.ts.map +1 -1
- package/src/boot/Server.js +39 -165
- package/src/cache/Cache.d.ts +1 -1
- package/src/cache/Cache.d.ts.map +1 -1
- package/src/cache/CacheDriver.d.ts +4 -0
- package/src/cache/CacheDriver.d.ts.map +1 -1
- package/src/cache/drivers/KVDriver.d.ts +1 -1
- package/src/cache/drivers/KVDriver.d.ts.map +1 -1
- package/src/cache/drivers/MemoryDriver.d.ts +1 -1
- package/src/cache/drivers/MemoryDriver.d.ts.map +1 -1
- package/src/cache/drivers/MemoryDriver.js +16 -0
- package/src/cache/drivers/MongoDriver.d.ts +1 -1
- package/src/cache/drivers/MongoDriver.d.ts.map +1 -1
- package/src/cache/drivers/RedisDriver.d.ts +1 -1
- package/src/cache/drivers/RedisDriver.d.ts.map +1 -1
- package/src/cli/CLI.d.ts.map +1 -1
- package/src/cli/CLI.js +10 -4
- package/src/cli/commands/AddCommand.d.ts +2 -2
- package/src/cli/commands/AddCommand.d.ts.map +1 -1
- package/src/cli/commands/AddCommand.js +135 -58
- package/src/cli/commands/ConfigCommand.d.ts +1 -1
- package/src/cli/commands/ConfigCommand.d.ts.map +1 -1
- package/src/cli/commands/CreateCommand.d.ts +15 -0
- package/src/cli/commands/CreateCommand.d.ts.map +1 -0
- package/src/cli/commands/CreateCommand.js +143 -0
- package/src/cli/commands/D1MigrateCommand.d.ts +1 -1
- package/src/cli/commands/D1MigrateCommand.d.ts.map +1 -1
- package/src/cli/commands/D1MigrateCommand.js +16 -20
- package/src/cli/commands/DbSeedCommand.d.ts +9 -0
- package/src/cli/commands/DbSeedCommand.d.ts.map +1 -0
- package/src/cli/commands/DbSeedCommand.js +171 -0
- package/src/cli/commands/DebugCommand.d.ts +1 -1
- package/src/cli/commands/DebugCommand.d.ts.map +1 -1
- package/src/cli/commands/FixCommand.d.ts +1 -1
- package/src/cli/commands/FixCommand.d.ts.map +1 -1
- package/src/cli/commands/JwtDevCommand.d.ts +8 -0
- package/src/cli/commands/JwtDevCommand.d.ts.map +1 -0
- package/src/cli/commands/JwtDevCommand.js +114 -0
- package/src/cli/commands/KeyGenerateCommand.d.ts +1 -1
- package/src/cli/commands/KeyGenerateCommand.d.ts.map +1 -1
- package/src/cli/commands/LogsCommand.d.ts +2 -2
- package/src/cli/commands/LogsCommand.d.ts.map +1 -1
- package/src/cli/commands/LogsCommand.js +36 -2
- package/src/cli/commands/MakeMailTemplateCommand.d.ts +1 -1
- package/src/cli/commands/MakeMailTemplateCommand.d.ts.map +1 -1
- package/src/cli/commands/MakeNotificationTemplateCommand.d.ts +1 -1
- package/src/cli/commands/MakeNotificationTemplateCommand.d.ts.map +1 -1
- package/src/cli/commands/MigrateCommand.d.ts +1 -1
- package/src/cli/commands/MigrateCommand.d.ts.map +1 -1
- package/src/cli/commands/MigrateCommand.js +291 -35
- package/src/cli/commands/NewCommand.d.ts +1 -1
- package/src/cli/commands/NewCommand.d.ts.map +1 -1
- package/src/cli/commands/NewCommand.js +12 -4
- package/src/cli/commands/PluginCommand.d.ts +1 -1
- package/src/cli/commands/PluginCommand.d.ts.map +1 -1
- package/src/cli/commands/PrepareCommand.d.ts +1 -1
- package/src/cli/commands/PrepareCommand.d.ts.map +1 -1
- package/src/cli/commands/QACommand.d.ts +2 -2
- package/src/cli/commands/QACommand.d.ts.map +1 -1
- package/src/cli/commands/RoutesCommand.d.ts +10 -0
- package/src/cli/commands/RoutesCommand.d.ts.map +1 -0
- package/src/cli/commands/RoutesCommand.js +242 -0
- package/src/cli/commands/SimulateCommand.d.ts +1 -1
- package/src/cli/commands/SimulateCommand.d.ts.map +1 -1
- package/src/cli/commands/index.d.ts +3 -0
- package/src/cli/commands/index.d.ts.map +1 -1
- package/src/cli/commands/index.js +3 -0
- package/src/cli/config/ConfigManager.d.ts +1 -1
- package/src/cli/config/ConfigManager.d.ts.map +1 -1
- package/src/cli/config/ConfigValidator.d.ts +1 -1
- package/src/cli/config/ConfigValidator.d.ts.map +1 -1
- package/src/cli/config/ConfigValidator.js +1 -1
- package/src/cli/d1/D1SqlMigrations.d.ts +20 -0
- package/src/cli/d1/D1SqlMigrations.d.ts.map +1 -0
- package/src/cli/d1/D1SqlMigrations.js +224 -0
- package/src/cli/d1/WranglerConfig.d.ts +4 -0
- package/src/cli/d1/WranglerConfig.d.ts.map +1 -0
- package/src/cli/d1/WranglerConfig.js +122 -0
- package/src/cli/d1/WranglerD1.d.ts +11 -0
- package/src/cli/d1/WranglerD1.d.ts.map +1 -0
- package/src/cli/d1/WranglerD1.js +16 -0
- package/src/cli/scaffolding/ControllerGenerator.d.ts.map +1 -1
- package/src/cli/scaffolding/ControllerGenerator.js +72 -22
- package/src/cli/scaffolding/FactoryGenerator.d.ts.map +1 -1
- package/src/cli/scaffolding/FactoryGenerator.js +3 -1
- package/src/cli/scaffolding/GovernanceScaffolder.d.ts +23 -0
- package/src/cli/scaffolding/GovernanceScaffolder.d.ts.map +1 -0
- package/src/cli/scaffolding/GovernanceScaffolder.js +327 -0
- package/src/cli/scaffolding/MigrationGenerator.d.ts +10 -0
- package/src/cli/scaffolding/MigrationGenerator.d.ts.map +1 -1
- package/src/cli/scaffolding/MigrationGenerator.js +137 -51
- package/src/cli/scaffolding/ProjectScaffolder.d.ts.map +1 -1
- package/src/cli/scaffolding/ProjectScaffolder.js +36 -4
- package/src/cli/scaffolding/RouteGenerator.d.ts.map +1 -1
- package/src/cli/scaffolding/RouteGenerator.js +79 -43
- package/src/cli/scaffolding/SeederGenerator.d.ts +5 -0
- package/src/cli/scaffolding/SeederGenerator.d.ts.map +1 -1
- package/src/cli/scaffolding/SeederGenerator.js +63 -15
- package/src/cli/scaffolding/ServiceScaffolder.d.ts.map +1 -1
- package/src/cli/scaffolding/ServiceScaffolder.js +24 -3
- package/src/cli/scaffolding/index.d.ts +2 -0
- package/src/cli/scaffolding/index.d.ts.map +1 -1
- package/src/cli/scaffolding/index.js +1 -0
- package/src/common/index.d.ts +8 -0
- package/src/common/index.d.ts.map +1 -1
- package/src/common/index.js +28 -0
- package/src/common/utility.d.ts +38 -0
- package/src/common/utility.d.ts.map +1 -0
- package/src/common/utility.js +101 -0
- package/src/config/FileLogWriter.d.ts +2 -1
- package/src/config/FileLogWriter.d.ts.map +1 -1
- package/src/config/FileLogWriter.js +83 -2
- package/src/config/app.d.ts.map +1 -1
- package/src/config/app.js +3 -1
- package/src/config/broadcast.d.ts +1 -1
- package/src/config/broadcast.d.ts.map +1 -1
- package/src/config/cache.d.ts +1 -1
- package/src/config/cache.d.ts.map +1 -1
- package/src/config/cloudflare.d.ts +1 -1
- package/src/config/cloudflare.d.ts.map +1 -1
- package/src/config/database.d.ts +1 -1
- package/src/config/database.d.ts.map +1 -1
- package/src/config/database.js +92 -6
- package/src/config/env.d.ts +6 -0
- package/src/config/env.d.ts.map +1 -1
- package/src/config/env.js +7 -0
- package/src/config/index.d.ts +1 -1
- package/src/config/logging/KvLogger.js +1 -1
- package/src/config/logging/SlackLogger.js +2 -2
- package/src/config/middleware.d.ts +20 -1
- package/src/config/middleware.d.ts.map +1 -1
- package/src/config/middleware.js +135 -3
- package/src/config/security.d.ts +1 -1
- package/src/config/security.js +1 -1
- package/src/config/type.d.ts +1 -1
- package/src/config/type.d.ts.map +1 -1
- package/src/events/EventDispatcher.d.ts.map +1 -1
- package/src/events/EventDispatcher.js +6 -4
- package/src/exceptions/ZintrustError.d.ts +7 -0
- package/src/exceptions/ZintrustError.d.ts.map +1 -1
- package/src/exceptions/ZintrustError.js +56 -0
- package/src/features/Auth.d.ts +1 -1
- package/src/features/Auth.d.ts.map +1 -1
- package/src/features/Auth.js +3 -3
- package/src/features/Queue.js +1 -1
- package/src/functions/cloudflare.d.ts.map +1 -1
- package/src/functions/cloudflare.js +3 -14
- package/src/functions/deno.d.ts.map +1 -1
- package/src/functions/deno.js +3 -14
- package/src/functions/lambda.d.ts.map +1 -1
- package/src/functions/lambda.js +3 -14
- package/src/health/StartupHealthChecks.js +1 -1
- package/src/http/Controller.d.ts +2 -2
- package/src/http/Controller.d.ts.map +1 -1
- package/src/http/FileUpload.d.ts +68 -0
- package/src/http/FileUpload.d.ts.map +1 -0
- package/src/http/FileUpload.js +120 -0
- package/src/http/Kernel.d.ts +5 -5
- package/src/http/Kernel.d.ts.map +1 -1
- package/src/http/Kernel.js +139 -23
- package/src/http/Request.d.ts +20 -1
- package/src/http/Request.d.ts.map +1 -1
- package/src/http/Request.js +23 -0
- package/src/http/RequestContext.d.ts +6 -0
- package/src/http/RequestContext.d.ts.map +1 -1
- package/src/http/RequestContext.js +77 -1
- package/src/http/Response.d.ts +1 -1
- package/src/http/Response.d.ts.map +1 -1
- package/src/http/ValidationHelper.d.ts +78 -0
- package/src/http/ValidationHelper.d.ts.map +1 -0
- package/src/http/ValidationHelper.js +121 -0
- package/src/http/error-pages/ErrorPageRenderer.d.ts +17 -0
- package/src/http/error-pages/ErrorPageRenderer.d.ts.map +1 -0
- package/src/http/error-pages/ErrorPageRenderer.js +88 -0
- package/src/http/middleware/BodyParsingMiddleware.d.ts +12 -0
- package/src/http/middleware/BodyParsingMiddleware.d.ts.map +1 -0
- package/src/http/middleware/BodyParsingMiddleware.js +251 -0
- package/src/http/middleware/FileUploadMiddleware.d.ts +12 -0
- package/src/http/middleware/FileUploadMiddleware.d.ts.map +1 -0
- package/src/http/middleware/FileUploadMiddleware.js +74 -0
- package/src/http/parsers/BodyParsers.d.ts +32 -0
- package/src/http/parsers/BodyParsers.d.ts.map +1 -0
- package/src/http/parsers/BodyParsers.js +159 -0
- package/src/http/parsers/MultipartParser.d.ts +33 -0
- package/src/http/parsers/MultipartParser.d.ts.map +1 -0
- package/src/http/parsers/MultipartParser.js +129 -0
- package/src/http/parsers/MultipartParserRegistry.d.ts +34 -0
- package/src/http/parsers/MultipartParserRegistry.d.ts.map +1 -0
- package/src/http/parsers/MultipartParserRegistry.js +20 -0
- package/src/http/validated.d.ts +12 -0
- package/src/http/validated.d.ts.map +1 -0
- package/src/http/validated.js +41 -0
- package/src/index.d.ts +64 -7
- package/src/index.d.ts.map +1 -1
- package/src/index.js +59 -5
- package/src/microservices/RequestTracingMiddleware.d.ts +2 -2
- package/src/microservices/RequestTracingMiddleware.d.ts.map +1 -1
- package/src/microservices/RequestTracingMiddleware.js +3 -0
- package/src/microservices/ServiceAuthMiddleware.d.ts +2 -2
- package/src/microservices/ServiceAuthMiddleware.d.ts.map +1 -1
- package/src/middleware/AuthMiddleware.d.ts +10 -0
- package/src/middleware/AuthMiddleware.d.ts.map +1 -0
- package/src/middleware/AuthMiddleware.js +16 -0
- package/src/middleware/CsrfMiddleware.d.ts +11 -1
- package/src/middleware/CsrfMiddleware.d.ts.map +1 -1
- package/src/middleware/CsrfMiddleware.js +33 -0
- package/src/middleware/JwtAuthMiddleware.d.ts +11 -0
- package/src/middleware/JwtAuthMiddleware.d.ts.map +1 -0
- package/src/middleware/JwtAuthMiddleware.js +73 -0
- package/src/middleware/LoggingMiddleware.d.ts.map +1 -1
- package/src/middleware/LoggingMiddleware.js +8 -3
- package/src/middleware/MiddlewareStack.d.ts +2 -2
- package/src/middleware/MiddlewareStack.d.ts.map +1 -1
- package/src/middleware/RateLimiter.d.ts +2 -2
- package/src/middleware/RateLimiter.d.ts.map +1 -1
- package/src/middleware/SanitizeBodyMiddleware.d.ts +12 -0
- package/src/middleware/SanitizeBodyMiddleware.d.ts.map +1 -0
- package/src/middleware/SanitizeBodyMiddleware.js +31 -0
- package/src/middleware/SecurityMiddleware.d.ts +1 -1
- package/src/middleware/SecurityMiddleware.d.ts.map +1 -1
- package/src/middleware/SessionMiddleware.d.ts +1 -1
- package/src/middleware/SessionMiddleware.d.ts.map +1 -1
- package/src/middleware/ValidationMiddleware.d.ts +25 -0
- package/src/middleware/ValidationMiddleware.d.ts.map +1 -0
- package/src/middleware/ValidationMiddleware.js +251 -0
- package/src/migrations/MigrationDiscovery.d.ts +5 -0
- package/src/migrations/MigrationDiscovery.d.ts.map +1 -0
- package/src/migrations/MigrationDiscovery.js +16 -0
- package/src/migrations/MigrationLoader.d.ts +5 -0
- package/src/migrations/MigrationLoader.d.ts.map +1 -0
- package/src/migrations/MigrationLoader.js +43 -0
- package/src/migrations/MigrationLock.d.ts +4 -0
- package/src/migrations/MigrationLock.d.ts.map +1 -0
- package/src/migrations/MigrationLock.js +33 -0
- package/src/migrations/Migrator.d.ts +23 -0
- package/src/migrations/Migrator.d.ts.map +1 -0
- package/src/migrations/Migrator.js +4 -0
- package/src/migrations/MigratorFactory.d.ts +25 -0
- package/src/migrations/MigratorFactory.d.ts.map +1 -0
- package/src/migrations/MigratorFactory.js +323 -0
- package/src/migrations/schema/Blueprint.d.ts +5 -0
- package/src/migrations/schema/Blueprint.d.ts.map +1 -0
- package/src/migrations/schema/Blueprint.js +189 -0
- package/src/migrations/schema/Schema.d.ts +8 -0
- package/src/migrations/schema/Schema.d.ts.map +1 -0
- package/src/migrations/schema/Schema.js +141 -0
- package/src/migrations/schema/SchemaCompiler.d.ts +20 -0
- package/src/migrations/schema/SchemaCompiler.d.ts.map +1 -0
- package/src/migrations/schema/SchemaCompiler.js +262 -0
- package/src/migrations/schema/index.d.ts +5 -0
- package/src/migrations/schema/index.d.ts.map +1 -0
- package/src/migrations/schema/index.js +3 -0
- package/src/migrations/schema/types.d.ts +86 -0
- package/src/migrations/schema/types.d.ts.map +1 -0
- package/src/migrations/schema/types.js +1 -0
- package/src/migrations/types.d.ts +45 -0
- package/src/migrations/types.d.ts.map +1 -0
- package/src/migrations/types.js +1 -0
- package/src/node-singletons/crypto.d.ts +1 -1
- package/src/node-singletons/crypto.d.ts.map +1 -1
- package/src/node-singletons/crypto.js +1 -1
- package/src/node-singletons/fs.d.ts +2 -2
- package/src/node-singletons/fs.d.ts.map +1 -1
- package/src/node-singletons/fs.js +1 -1
- package/src/node-singletons/util.d.ts +6 -0
- package/src/node-singletons/util.d.ts.map +1 -0
- package/src/node-singletons/util.js +5 -0
- package/src/node.d.ts +3 -1
- package/src/node.d.ts.map +1 -1
- package/src/node.js +6 -2
- package/src/observability/OpenTelemetry.d.ts +62 -0
- package/src/observability/OpenTelemetry.d.ts.map +1 -0
- package/src/observability/OpenTelemetry.js +167 -0
- package/src/observability/PrometheusMetrics.d.ts +25 -0
- package/src/observability/PrometheusMetrics.d.ts.map +1 -0
- package/src/observability/PrometheusMetrics.js +114 -0
- package/src/openapi/OpenApiGenerator.d.ts +68 -0
- package/src/openapi/OpenApiGenerator.d.ts.map +1 -0
- package/src/openapi/OpenApiGenerator.js +287 -0
- package/src/orm/Database.d.ts +4 -2
- package/src/orm/Database.d.ts.map +1 -1
- package/src/orm/Database.js +142 -29
- package/src/orm/DatabaseAdapter.d.ts +13 -0
- package/src/orm/DatabaseAdapter.d.ts.map +1 -1
- package/src/orm/DatabaseAdapterRegistry.d.ts.map +1 -1
- package/src/orm/DatabaseAdapterRegistry.js +3 -1
- package/src/orm/Model.d.ts +30 -2
- package/src/orm/Model.d.ts.map +1 -1
- package/src/orm/Model.js +255 -62
- package/src/orm/QueryBuilder.d.ts +22 -1
- package/src/orm/QueryBuilder.d.ts.map +1 -1
- package/src/orm/QueryBuilder.js +405 -99
- package/src/orm/Relationships.d.ts +7 -1
- package/src/orm/Relationships.d.ts.map +1 -1
- package/src/orm/Relationships.js +18 -0
- package/src/orm/SchemaCompiler.d.ts +9 -0
- package/src/orm/SchemaCompiler.d.ts.map +1 -0
- package/src/orm/SchemaCompiler.js +145 -0
- package/src/orm/adapters/D1Adapter.d.ts +1 -1
- package/src/orm/adapters/D1Adapter.d.ts.map +1 -1
- package/src/orm/adapters/MySQLAdapter.d.ts +1 -1
- package/src/orm/adapters/MySQLAdapter.d.ts.map +1 -1
- package/src/orm/adapters/MySQLAdapter.js +88 -69
- package/src/orm/adapters/PostgreSQLAdapter.d.ts +1 -1
- package/src/orm/adapters/PostgreSQLAdapter.d.ts.map +1 -1
- package/src/orm/adapters/PostgreSQLAdapter.js +88 -69
- package/src/orm/adapters/SQLServerAdapter.d.ts +1 -1
- package/src/orm/adapters/SQLServerAdapter.d.ts.map +1 -1
- package/src/orm/adapters/SQLiteAdapter.d.ts +1 -1
- package/src/orm/adapters/SQLiteAdapter.d.ts.map +1 -1
- package/src/orm/adapters/SQLiteAdapter.js +58 -2
- package/src/orm/maintenance/SqliteMaintenance.d.ts +5 -0
- package/src/orm/maintenance/SqliteMaintenance.d.ts.map +1 -0
- package/src/orm/maintenance/SqliteMaintenance.js +14 -0
- package/src/orm/migrations/MigrationStore.d.ts +38 -0
- package/src/orm/migrations/MigrationStore.d.ts.map +1 -0
- package/src/orm/migrations/MigrationStore.js +157 -0
- package/src/performance/CodeGenerationBenchmark.d.ts.map +1 -1
- package/src/performance/Optimizer.d.ts +1 -0
- package/src/performance/Optimizer.d.ts.map +1 -1
- package/src/performance/Optimizer.js +37 -3
- package/src/profiling/MemoryProfiler.d.ts +1 -1
- package/src/profiling/MemoryProfiler.d.ts.map +1 -1
- package/src/profiling/N1Detector.d.ts +1 -1
- package/src/profiling/N1Detector.d.ts.map +1 -1
- package/src/profiling/QueryLogger.d.ts +1 -1
- package/src/profiling/QueryLogger.d.ts.map +1 -1
- package/src/profiling/RequestProfiler.d.ts +3 -3
- package/src/profiling/RequestProfiler.d.ts.map +1 -1
- package/src/routes/metrics.d.ts +2 -0
- package/src/routes/metrics.d.ts.map +1 -0
- package/src/routes/metrics.js +1 -0
- package/src/routing/CoreRoutes.d.ts +12 -0
- package/src/routing/CoreRoutes.d.ts.map +1 -0
- package/src/routing/CoreRoutes.js +151 -0
- package/src/routing/RouteRegistry.d.ts +39 -0
- package/src/routing/RouteRegistry.d.ts.map +1 -0
- package/src/routing/RouteRegistry.js +44 -0
- package/src/routing/Router.d.ts +26 -9
- package/src/routing/Router.d.ts.map +1 -1
- package/src/routing/Router.js +79 -35
- package/src/routing/common.d.ts +15 -0
- package/src/routing/common.d.ts.map +1 -0
- package/src/routing/common.js +47 -0
- package/src/routing/doc.d.ts +28 -0
- package/src/routing/doc.d.ts.map +1 -0
- package/src/routing/doc.js +95 -0
- package/src/routing/error.d.ts +21 -0
- package/src/routing/error.d.ts.map +1 -0
- package/src/routing/error.js +126 -0
- package/src/routing/errorPages.d.ts +14 -0
- package/src/routing/errorPages.d.ts.map +1 -0
- package/src/routing/errorPages.js +103 -0
- package/src/routing/publicRoot.d.ts +18 -0
- package/src/routing/publicRoot.d.ts.map +1 -0
- package/src/routing/publicRoot.js +49 -0
- package/src/runtime/PluginAutoImports.d.ts +21 -0
- package/src/runtime/PluginAutoImports.d.ts.map +1 -0
- package/src/runtime/PluginAutoImports.js +59 -0
- package/src/runtime/PluginManager.d.ts +1 -5
- package/src/runtime/PluginManager.d.ts.map +1 -1
- package/src/runtime/PluginManager.js +25 -18
- package/src/runtime/RuntimeDetector.d.ts +1 -1
- package/src/runtime/RuntimeDetector.d.ts.map +1 -1
- package/src/runtime/adapters/CloudflareAdapter.d.ts +1 -1
- package/src/runtime/adapters/CloudflareAdapter.d.ts.map +1 -1
- package/src/runtime/adapters/CloudflareAdapter.js +1 -1
- package/src/runtime/adapters/DenoAdapter.d.ts +1 -1
- package/src/runtime/adapters/DenoAdapter.d.ts.map +1 -1
- package/src/runtime/adapters/DenoAdapter.js +1 -1
- package/src/runtime/adapters/LambdaAdapter.d.ts +1 -1
- package/src/runtime/adapters/LambdaAdapter.d.ts.map +1 -1
- package/src/runtime/adapters/LambdaAdapter.js +1 -1
- package/src/runtime/adapters/NodeServerAdapter.d.ts +1 -1
- package/src/runtime/adapters/NodeServerAdapter.d.ts.map +1 -1
- package/src/runtime/getKernel.d.ts +9 -0
- package/src/runtime/getKernel.d.ts.map +1 -0
- package/src/runtime/getKernel.js +27 -0
- package/src/scripts/TemplateImportsCheck.js +40 -0
- package/src/scripts/TemplateSync.js +86 -20
- package/src/security/Encryptor.d.ts.map +1 -1
- package/src/security/Encryptor.js +64 -7
- package/src/security/JwtManager.d.ts +1 -0
- package/src/security/JwtManager.d.ts.map +1 -1
- package/src/security/JwtManager.js +33 -0
- package/src/security/Sanitizer.d.ts +76 -0
- package/src/security/Sanitizer.d.ts.map +1 -0
- package/src/security/Sanitizer.js +412 -0
- package/src/security/TokenRevocation.d.ts +7 -0
- package/src/security/TokenRevocation.d.ts.map +1 -0
- package/src/security/TokenRevocation.js +57 -0
- package/src/seeders/SeederDiscovery.d.ts +5 -0
- package/src/seeders/SeederDiscovery.d.ts.map +1 -0
- package/src/seeders/SeederDiscovery.js +21 -0
- package/src/seeders/SeederLoader.d.ts +5 -0
- package/src/seeders/SeederLoader.d.ts.map +1 -0
- package/src/seeders/SeederLoader.js +60 -0
- package/src/seeders/types.d.ts +18 -0
- package/src/seeders/types.d.ts.map +1 -0
- package/src/seeders/types.js +1 -0
- package/src/session/SessionManager.js +1 -1
- package/src/templates/adapters/MySQLAdapter.ts.tpl +109 -85
- package/src/templates/adapters/PostgreSQLAdapter.ts.tpl +129 -88
- package/src/templates/adapters/SQLServerAdapter.ts.tpl +5 -9
- package/src/templates/adapters/SQLiteAdapter.ts.tpl +78 -11
- package/src/templates/features/Queue.ts.tpl +3 -2
- package/src/templates/project/basic/app/Controllers/AuthController.ts.tpl +217 -0
- package/src/templates/project/basic/app/Controllers/UserController.ts.tpl +1 -12
- package/src/templates/project/basic/app/Types/controller.ts.tpl +46 -0
- package/src/templates/project/basic/config/FileLogWriter.ts.tpl +5 -236
- package/src/templates/project/basic/config/SecretsManager.ts.tpl +10 -447
- package/src/templates/project/basic/config/StartupConfigValidator.ts.tpl +9 -268
- package/src/templates/project/basic/config/app.ts.tpl +13 -153
- package/src/templates/project/basic/config/broadcast.ts.tpl +15 -128
- package/src/templates/project/basic/config/cache.ts.tpl +15 -91
- package/src/templates/project/basic/config/cloudflare.ts.tpl +4 -39
- package/src/templates/project/basic/config/constants.ts.tpl +9 -65
- package/src/templates/project/basic/config/database.ts.tpl +29 -122
- package/src/templates/project/basic/config/env.ts.tpl +5 -169
- package/src/templates/project/basic/config/features.ts.tpl +6 -54
- package/src/templates/project/basic/config/index.ts.tpl +8 -23
- package/src/templates/project/basic/config/mail.ts.tpl +15 -114
- package/src/templates/project/basic/config/microservices.ts.tpl +11 -97
- package/src/templates/project/basic/config/middleware.ts.tpl +25 -43
- package/src/templates/project/basic/config/notification.ts.tpl +14 -126
- package/src/templates/project/basic/config/queue.ts.tpl +16 -79
- package/src/templates/project/basic/config/security.ts.tpl +11 -163
- package/src/templates/project/basic/config/startup.ts.tpl +10 -21
- package/src/templates/project/basic/config/storage.ts.tpl +15 -132
- package/src/templates/project/basic/config/type.ts.tpl +33 -451
- package/src/templates/project/basic/database/factories/UserFactory.ts.tpl +80 -0
- package/src/templates/project/basic/database/migrations/create_tasks_table.ts.tpl +28 -0
- package/src/templates/project/basic/database/migrations/create_users_table.ts.tpl +29 -0
- package/src/templates/project/basic/database/seeders/DatabaseSeeder.ts.tpl +19 -0
- package/src/templates/project/basic/database/seeders/UserSeeder.ts.tpl +18 -0
- package/src/templates/project/basic/database/seeders/index.ts.tpl +2 -0
- package/src/templates/project/basic/routes/api.ts.tpl +71 -33
- package/src/templates/project/basic/routes/metrics.ts.tpl +22 -0
- package/src/templates/project/basic/tsconfig.json.tpl +12 -11
- package/src/testing/TestEnvironment.d.ts +40 -0
- package/src/testing/TestEnvironment.d.ts.map +1 -0
- package/src/testing/TestEnvironment.js +141 -0
- package/src/testing/TestHttp.d.ts +29 -0
- package/src/testing/TestHttp.d.ts.map +1 -0
- package/src/testing/TestHttp.js +96 -0
- package/src/testing/index.d.ts +5 -0
- package/src/testing/index.d.ts.map +1 -0
- package/src/testing/index.js +2 -0
- package/src/time/DateTime.d.ts +181 -0
- package/src/time/DateTime.d.ts.map +1 -0
- package/src/time/DateTime.js +300 -0
- package/src/time/index.d.ts +7 -0
- package/src/time/index.d.ts.map +1 -0
- package/src/time/index.js +5 -0
- package/src/tools/http/Http.d.ts.map +1 -1
- package/src/tools/http/Http.js +4 -0
- package/src/tools/mail/drivers/Smtp.js +1 -1
- package/src/tools/queue/drivers/InMemory.d.ts +1 -1
- package/src/tools/queue/drivers/InMemory.d.ts.map +1 -1
- package/src/tools/queue/drivers/InMemory.js +1 -1
- package/src/tools/queue/drivers/Redis.d.ts +1 -1
- package/src/tools/queue/drivers/Redis.d.ts.map +1 -1
- package/src/tools/queue/drivers/Redis.js +1 -1
- package/src/validation/ValidationError.d.ts.map +1 -1
- package/src/validation/ValidationError.js +4 -2
- package/src/validation/Validator.d.ts +49 -16
- package/src/validation/Validator.d.ts.map +1 -1
- package/src/validation/Validator.js +307 -5
- package/src/common/uuid.d.ts +0 -3
- package/src/common/uuid.d.ts.map +0 -1
- package/src/common/uuid.js +0 -30
- package/src/templates/project/basic/.env.example.tpl +0 -74
- package/src/templates/project/basic/.env.tpl +0 -166
- package/src/templates/project/basic/database/migrations/index.ts.tpl +0 -2
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Body Parsers - Content-Type specific parsing
|
|
3
|
+
* Handles form-data, plain text, CSV, and other non-JSON formats
|
|
4
|
+
*/
|
|
5
|
+
interface BodyParserResult {
|
|
6
|
+
ok: boolean;
|
|
7
|
+
data?: Record<string, unknown> | string | unknown[];
|
|
8
|
+
error?: string;
|
|
9
|
+
}
|
|
10
|
+
interface IBodyParser {
|
|
11
|
+
canParse(contentType: string): boolean;
|
|
12
|
+
parse(body: string | Buffer): BodyParserResult;
|
|
13
|
+
}
|
|
14
|
+
export declare const BodyParsers: Readonly<{
|
|
15
|
+
FormDataParser: IBodyParser;
|
|
16
|
+
TextParser: IBodyParser;
|
|
17
|
+
CSVParser: IBodyParser;
|
|
18
|
+
/**
|
|
19
|
+
* Get all registered parsers
|
|
20
|
+
*/
|
|
21
|
+
getAll(): IBodyParser[];
|
|
22
|
+
/**
|
|
23
|
+
* Find parser for content-type
|
|
24
|
+
*/
|
|
25
|
+
findParser(contentType: string): IBodyParser | undefined;
|
|
26
|
+
/**
|
|
27
|
+
* Parse body based on content-type
|
|
28
|
+
*/
|
|
29
|
+
parse(contentType: string, body: string | Buffer): BodyParserResult;
|
|
30
|
+
}>;
|
|
31
|
+
export default BodyParsers;
|
|
32
|
+
//# sourceMappingURL=BodyParsers.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"BodyParsers.d.ts","sourceRoot":"","sources":["../../../../src/http/parsers/BodyParsers.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,UAAU,gBAAgB;IACxB,EAAE,EAAE,OAAO,CAAC;IACZ,IAAI,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,MAAM,GAAG,OAAO,EAAE,CAAC;IACpD,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAED,UAAU,WAAW;IACnB,QAAQ,CAAC,WAAW,EAAE,MAAM,GAAG,OAAO,CAAC;IACvC,KAAK,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,GAAG,gBAAgB,CAAC;CAChD;AA6ID,eAAO,MAAM,WAAW;;;;IAKtB;;OAEG;cACO,WAAW,EAAE;IAIvB;;OAEG;4BACqB,MAAM,GAAG,WAAW,GAAG,SAAS;IAIxD;;OAEG;uBACgB,MAAM,QAAQ,MAAM,GAAG,MAAM,GAAG,gBAAgB;EAQnE,CAAC;AAEH,eAAe,WAAW,CAAC"}
|
|
@@ -0,0 +1,159 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Body Parsers - Content-Type specific parsing
|
|
3
|
+
* Handles form-data, plain text, CSV, and other non-JSON formats
|
|
4
|
+
*/
|
|
5
|
+
/**
|
|
6
|
+
* URL-encoded form data parser
|
|
7
|
+
* Content-Type: application/x-www-form-urlencoded
|
|
8
|
+
*/
|
|
9
|
+
const FormDataParser = {
|
|
10
|
+
canParse: (contentType) => contentType.includes('application/x-www-form-urlencoded'),
|
|
11
|
+
parse: (body) => {
|
|
12
|
+
try {
|
|
13
|
+
const text = typeof body === 'string' ? body : body.toString('utf-8');
|
|
14
|
+
if (!text.trim())
|
|
15
|
+
return { ok: true, data: {} };
|
|
16
|
+
const params = new URLSearchParams(text);
|
|
17
|
+
const result = {};
|
|
18
|
+
for (const [key, value] of params.entries()) {
|
|
19
|
+
if (Object.prototype.hasOwnProperty.call(result, key)) {
|
|
20
|
+
// Handle multiple values with same key
|
|
21
|
+
const existing = result[key];
|
|
22
|
+
if (Array.isArray(existing)) {
|
|
23
|
+
existing.push(value);
|
|
24
|
+
}
|
|
25
|
+
else {
|
|
26
|
+
result[key] = [existing, value];
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
else {
|
|
30
|
+
result[key] = value;
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
return { ok: true, data: result };
|
|
34
|
+
}
|
|
35
|
+
catch (error) {
|
|
36
|
+
const errorMsg = error instanceof Error ? error.message : 'Unknown error';
|
|
37
|
+
return { ok: false, error: `Failed to parse form data: ${errorMsg}` };
|
|
38
|
+
}
|
|
39
|
+
},
|
|
40
|
+
};
|
|
41
|
+
/**
|
|
42
|
+
* Plain text parser
|
|
43
|
+
* Content-Type: text/plain
|
|
44
|
+
*/
|
|
45
|
+
const TextParser = {
|
|
46
|
+
canParse: (contentType) => contentType.includes('text/plain'),
|
|
47
|
+
parse: (body) => {
|
|
48
|
+
try {
|
|
49
|
+
const text = typeof body === 'string' ? body : body.toString('utf-8');
|
|
50
|
+
return { ok: true, data: text };
|
|
51
|
+
}
|
|
52
|
+
catch (error) {
|
|
53
|
+
const errorMsg = error instanceof Error ? error.message : 'Unknown error';
|
|
54
|
+
return { ok: false, error: `Failed to parse text: ${errorMsg}` };
|
|
55
|
+
}
|
|
56
|
+
},
|
|
57
|
+
};
|
|
58
|
+
/**
|
|
59
|
+
* CSV parser implementation helper
|
|
60
|
+
*/
|
|
61
|
+
const parseCSVLine = (line) => {
|
|
62
|
+
const result = [];
|
|
63
|
+
let current = '';
|
|
64
|
+
let inQuotes = false;
|
|
65
|
+
let i = 0;
|
|
66
|
+
while (i < line.length) {
|
|
67
|
+
const char = line[i];
|
|
68
|
+
if (char === '"') {
|
|
69
|
+
if (inQuotes && line[i + 1] === '"') {
|
|
70
|
+
current += '"';
|
|
71
|
+
i += 2;
|
|
72
|
+
continue;
|
|
73
|
+
}
|
|
74
|
+
else {
|
|
75
|
+
inQuotes = !inQuotes;
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
else if (char === ',' && !inQuotes) {
|
|
79
|
+
result.push(current.trim());
|
|
80
|
+
current = '';
|
|
81
|
+
}
|
|
82
|
+
else {
|
|
83
|
+
current += char;
|
|
84
|
+
}
|
|
85
|
+
i++;
|
|
86
|
+
}
|
|
87
|
+
result.push(current.trim());
|
|
88
|
+
return result;
|
|
89
|
+
};
|
|
90
|
+
/**
|
|
91
|
+
* CSV parser
|
|
92
|
+
* Content-Type: text/csv
|
|
93
|
+
*/
|
|
94
|
+
const CSVParser = {
|
|
95
|
+
canParse: (contentType) => contentType.includes('text/csv'),
|
|
96
|
+
parse: (body) => {
|
|
97
|
+
try {
|
|
98
|
+
const text = typeof body === 'string' ? body : body.toString('utf-8');
|
|
99
|
+
if (text.length === 0)
|
|
100
|
+
return { ok: true, data: [] };
|
|
101
|
+
// Stream-like processing: iterate lines without creating an array of all lines
|
|
102
|
+
const rows = [];
|
|
103
|
+
let headers;
|
|
104
|
+
let cursor = 0;
|
|
105
|
+
while (cursor < text.length) {
|
|
106
|
+
let lineEnd = text.indexOf('\n', cursor);
|
|
107
|
+
if (lineEnd === -1)
|
|
108
|
+
lineEnd = text.length;
|
|
109
|
+
const line = text.slice(cursor, lineEnd).trim();
|
|
110
|
+
cursor = lineEnd + 1;
|
|
111
|
+
if (line.length === 0)
|
|
112
|
+
continue;
|
|
113
|
+
const values = parseCSVLine(line);
|
|
114
|
+
if (!headers) {
|
|
115
|
+
headers = values;
|
|
116
|
+
continue;
|
|
117
|
+
}
|
|
118
|
+
const row = {};
|
|
119
|
+
for (let j = 0; j < headers.length; j++) {
|
|
120
|
+
row[headers[j]] = values[j] ?? '';
|
|
121
|
+
}
|
|
122
|
+
rows.push(row);
|
|
123
|
+
}
|
|
124
|
+
return { ok: true, data: rows };
|
|
125
|
+
}
|
|
126
|
+
catch (error) {
|
|
127
|
+
const errorMsg = error instanceof Error ? error.message : 'Unknown error';
|
|
128
|
+
return { ok: false, error: `Failed to parse CSV: ${errorMsg}` };
|
|
129
|
+
}
|
|
130
|
+
},
|
|
131
|
+
};
|
|
132
|
+
export const BodyParsers = Object.freeze({
|
|
133
|
+
FormDataParser,
|
|
134
|
+
TextParser,
|
|
135
|
+
CSVParser,
|
|
136
|
+
/**
|
|
137
|
+
* Get all registered parsers
|
|
138
|
+
*/
|
|
139
|
+
getAll() {
|
|
140
|
+
return [this.FormDataParser, this.TextParser, this.CSVParser];
|
|
141
|
+
},
|
|
142
|
+
/**
|
|
143
|
+
* Find parser for content-type
|
|
144
|
+
*/
|
|
145
|
+
findParser(contentType) {
|
|
146
|
+
return this.getAll().find((parser) => parser.canParse(contentType));
|
|
147
|
+
},
|
|
148
|
+
/**
|
|
149
|
+
* Parse body based on content-type
|
|
150
|
+
*/
|
|
151
|
+
parse(contentType, body) {
|
|
152
|
+
const parser = this.findParser(contentType);
|
|
153
|
+
if (parser === undefined) {
|
|
154
|
+
return { ok: false, error: `No parser found for content-type: ${contentType}` };
|
|
155
|
+
}
|
|
156
|
+
return parser.parse(body);
|
|
157
|
+
},
|
|
158
|
+
});
|
|
159
|
+
export default BodyParsers;
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Multipart Form-Data Parser
|
|
3
|
+
* Parses multipart/form-data requests for file uploads and form fields
|
|
4
|
+
*/
|
|
5
|
+
import type { UploadedFile } from '../FileUpload';
|
|
6
|
+
interface ParsedMultipartData {
|
|
7
|
+
fields: Record<string, string | string[]>;
|
|
8
|
+
files: Record<string, UploadedFile[]>;
|
|
9
|
+
}
|
|
10
|
+
/**
|
|
11
|
+
* Parse multipart/form-data body
|
|
12
|
+
* Note: This is a simplified parser. For production use a proper multipart library
|
|
13
|
+
*/
|
|
14
|
+
export declare const parseMultipartFormData: (body: Buffer | string, boundary: string) => ParsedMultipartData;
|
|
15
|
+
/**
|
|
16
|
+
* Parse multipart/form-data from request
|
|
17
|
+
*/
|
|
18
|
+
export declare const MultipartParser: Readonly<{
|
|
19
|
+
/**
|
|
20
|
+
* Check if content-type is multipart/form-data
|
|
21
|
+
*/
|
|
22
|
+
isMultipart(contentType: string): boolean;
|
|
23
|
+
/**
|
|
24
|
+
* Get boundary from content-type header
|
|
25
|
+
*/
|
|
26
|
+
getBoundary(contentType: string): string | undefined;
|
|
27
|
+
/**
|
|
28
|
+
* Parse multipart body
|
|
29
|
+
*/
|
|
30
|
+
parse(body: Buffer | string, boundary: string): ParsedMultipartData;
|
|
31
|
+
}>;
|
|
32
|
+
export default MultipartParser;
|
|
33
|
+
//# sourceMappingURL=MultipartParser.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"MultipartParser.d.ts","sourceRoot":"","sources":["../../../../src/http/parsers/MultipartParser.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC;AAErD,UAAU,mBAAmB;IAC3B,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,EAAE,CAAC,CAAC;IAC1C,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,YAAY,EAAE,CAAC,CAAC;CACvC;AAqGD;;;GAGG;AACH,eAAO,MAAM,sBAAsB,GACjC,MAAM,MAAM,GAAG,MAAM,EACrB,UAAU,MAAM,KACf,mBAaF,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,eAAe;IAC1B;;OAEG;6BACsB,MAAM,GAAG,OAAO;IAIzC;;OAEG;6BACsB,MAAM,GAAG,MAAM,GAAG,SAAS;IAIpD;;OAEG;gBACS,MAAM,GAAG,MAAM,YAAY,MAAM,GAAG,mBAAmB;EAGnE,CAAC;AAEH,eAAe,eAAe,CAAC"}
|
|
@@ -0,0 +1,129 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Multipart Form-Data Parser
|
|
3
|
+
* Parses multipart/form-data requests for file uploads and form fields
|
|
4
|
+
*/
|
|
5
|
+
/**
|
|
6
|
+
* Simple multipart boundary extractor
|
|
7
|
+
*/
|
|
8
|
+
const getBoundary = (contentType) => {
|
|
9
|
+
const match = /boundary=([^;\s]+)/.exec(contentType);
|
|
10
|
+
if (match?.[1] === undefined)
|
|
11
|
+
return undefined;
|
|
12
|
+
return match[1].replaceAll('"', '');
|
|
13
|
+
};
|
|
14
|
+
/**
|
|
15
|
+
* Extract parts from multipart body by boundary
|
|
16
|
+
*/
|
|
17
|
+
const extractParts = (bodyBuffer, boundary) => {
|
|
18
|
+
const parts = [];
|
|
19
|
+
if (!boundary)
|
|
20
|
+
return parts;
|
|
21
|
+
const boundaryBuffer = Buffer.from(`--${boundary}`);
|
|
22
|
+
let currentPos = 0;
|
|
23
|
+
while (currentPos < bodyBuffer.length) {
|
|
24
|
+
const boundaryPos = bodyBuffer.indexOf(boundaryBuffer, currentPos);
|
|
25
|
+
if (boundaryPos === -1)
|
|
26
|
+
break;
|
|
27
|
+
const start = currentPos + (currentPos === 0 ? 0 : 2); // Skip CRLF before boundary
|
|
28
|
+
const end = boundaryPos;
|
|
29
|
+
if (start < end) {
|
|
30
|
+
parts.push(bodyBuffer.subarray(start, end));
|
|
31
|
+
}
|
|
32
|
+
currentPos = boundaryPos + boundaryBuffer.length;
|
|
33
|
+
}
|
|
34
|
+
return parts;
|
|
35
|
+
};
|
|
36
|
+
/**
|
|
37
|
+
* Parse a single multipart part
|
|
38
|
+
*/
|
|
39
|
+
const parsePart = (part, result) => {
|
|
40
|
+
if (part.length === 0)
|
|
41
|
+
return;
|
|
42
|
+
// Find headers/body separator (double CRLF or double LF)
|
|
43
|
+
const headerEndIdx = part.indexOf(Buffer.from('\r\n\r\n'));
|
|
44
|
+
const headerEndIdx2 = part.indexOf(Buffer.from('\n\n'));
|
|
45
|
+
const headerEnd = headerEndIdx >= 0 ? headerEndIdx : headerEndIdx2;
|
|
46
|
+
if (headerEnd === -1)
|
|
47
|
+
return;
|
|
48
|
+
const headerSection = part.subarray(0, headerEnd).toString('utf-8');
|
|
49
|
+
const bodyStart = headerEnd + (headerEndIdx >= 0 ? 4 : 2);
|
|
50
|
+
// OPTIMIZATION: Do not convert body to string yet, as it might be a binary file
|
|
51
|
+
// Parse headers
|
|
52
|
+
const contentDispositionMatch = /Content-Disposition: form-data; name="([^"]+)"(?:; filename="([^"]*)")?/i.exec(headerSection);
|
|
53
|
+
if (!contentDispositionMatch)
|
|
54
|
+
return;
|
|
55
|
+
const fieldName = contentDispositionMatch[1] ?? '';
|
|
56
|
+
const fileName = contentDispositionMatch[2];
|
|
57
|
+
// Check if it's a file upload
|
|
58
|
+
if (fileName !== undefined && fileName !== null) {
|
|
59
|
+
const contentTypeMatch = /Content-Type: ([^\r\n]+)/i.exec(headerSection);
|
|
60
|
+
const mimeType = contentTypeMatch?.[1] ?? 'application/octet-stream';
|
|
61
|
+
// CRITICAL: Use buffer subarray directly for zero-copy and to prevent binary corruption via trim()
|
|
62
|
+
const buffer = part.subarray(bodyStart);
|
|
63
|
+
const file = {
|
|
64
|
+
fieldName,
|
|
65
|
+
originalName: fileName,
|
|
66
|
+
mimeType,
|
|
67
|
+
buffer,
|
|
68
|
+
size: buffer.length,
|
|
69
|
+
};
|
|
70
|
+
result.files[fieldName] ??= [];
|
|
71
|
+
const files = result.files[fieldName];
|
|
72
|
+
if (files !== undefined) {
|
|
73
|
+
files.push(file);
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
else {
|
|
77
|
+
// Regular form field - safe to convert to string and trim
|
|
78
|
+
const partBody = part.subarray(bodyStart).toString('utf-8').trim();
|
|
79
|
+
const fieldValue = result.fields[fieldName];
|
|
80
|
+
if (fieldValue === undefined) {
|
|
81
|
+
result.fields[fieldName] = partBody;
|
|
82
|
+
}
|
|
83
|
+
else if (Array.isArray(fieldValue)) {
|
|
84
|
+
fieldValue.push(partBody);
|
|
85
|
+
}
|
|
86
|
+
else {
|
|
87
|
+
result.fields[fieldName] = [fieldValue, partBody];
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
};
|
|
91
|
+
/**
|
|
92
|
+
* Parse multipart/form-data body
|
|
93
|
+
* Note: This is a simplified parser. For production use a proper multipart library
|
|
94
|
+
*/
|
|
95
|
+
export const parseMultipartFormData = (body, boundary) => {
|
|
96
|
+
const result = { fields: {}, files: {} };
|
|
97
|
+
if (!boundary)
|
|
98
|
+
return result;
|
|
99
|
+
const bodyBuffer = typeof body === 'string' ? Buffer.from(body) : body;
|
|
100
|
+
const parts = extractParts(bodyBuffer, boundary);
|
|
101
|
+
for (const part of parts) {
|
|
102
|
+
parsePart(part, result);
|
|
103
|
+
}
|
|
104
|
+
return result;
|
|
105
|
+
};
|
|
106
|
+
/**
|
|
107
|
+
* Parse multipart/form-data from request
|
|
108
|
+
*/
|
|
109
|
+
export const MultipartParser = Object.freeze({
|
|
110
|
+
/**
|
|
111
|
+
* Check if content-type is multipart/form-data
|
|
112
|
+
*/
|
|
113
|
+
isMultipart(contentType) {
|
|
114
|
+
return contentType.includes('multipart/form-data');
|
|
115
|
+
},
|
|
116
|
+
/**
|
|
117
|
+
* Get boundary from content-type header
|
|
118
|
+
*/
|
|
119
|
+
getBoundary(contentType) {
|
|
120
|
+
return getBoundary(contentType);
|
|
121
|
+
},
|
|
122
|
+
/**
|
|
123
|
+
* Parse multipart body
|
|
124
|
+
*/
|
|
125
|
+
parse(body, boundary) {
|
|
126
|
+
return parseMultipartFormData(body, boundary);
|
|
127
|
+
},
|
|
128
|
+
});
|
|
129
|
+
export default MultipartParser;
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import type { UploadedFile } from '../FileUpload';
|
|
2
|
+
import type { IncomingMessage } from '../../node-singletons/http';
|
|
3
|
+
export type MultipartFieldValue = string | string[];
|
|
4
|
+
export type ParsedMultipartData = {
|
|
5
|
+
fields: Record<string, MultipartFieldValue>;
|
|
6
|
+
files: Record<string, UploadedFile[]>;
|
|
7
|
+
};
|
|
8
|
+
export type MultipartParseInput = {
|
|
9
|
+
req: IncomingMessage;
|
|
10
|
+
contentType: string;
|
|
11
|
+
/**
|
|
12
|
+
* Limits are enforced by the parser implementation.
|
|
13
|
+
* Core provides defaults via env vars, but the parser may choose stricter behavior.
|
|
14
|
+
*/
|
|
15
|
+
limits: {
|
|
16
|
+
maxFileSizeBytes: number;
|
|
17
|
+
maxFiles: number;
|
|
18
|
+
maxFields: number;
|
|
19
|
+
maxFieldSizeBytes: number;
|
|
20
|
+
};
|
|
21
|
+
};
|
|
22
|
+
export type MultipartParserProvider = (input: MultipartParseInput) => Promise<ParsedMultipartData>;
|
|
23
|
+
declare function register(next: MultipartParserProvider): void;
|
|
24
|
+
declare function get(): MultipartParserProvider | null;
|
|
25
|
+
declare function has(): boolean;
|
|
26
|
+
declare function clear(): void;
|
|
27
|
+
export declare const MultipartParserRegistry: Readonly<{
|
|
28
|
+
register: typeof register;
|
|
29
|
+
get: typeof get;
|
|
30
|
+
has: typeof has;
|
|
31
|
+
clear: typeof clear;
|
|
32
|
+
}>;
|
|
33
|
+
export default MultipartParserRegistry;
|
|
34
|
+
//# sourceMappingURL=MultipartParserRegistry.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"MultipartParserRegistry.d.ts","sourceRoot":"","sources":["../../../../src/http/parsers/MultipartParserRegistry.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC;AACrD,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAC;AAE7D,MAAM,MAAM,mBAAmB,GAAG,MAAM,GAAG,MAAM,EAAE,CAAC;AAEpD,MAAM,MAAM,mBAAmB,GAAG;IAChC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,mBAAmB,CAAC,CAAC;IAC5C,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,YAAY,EAAE,CAAC,CAAC;CACvC,CAAC;AAEF,MAAM,MAAM,mBAAmB,GAAG;IAChC,GAAG,EAAE,eAAe,CAAC;IACrB,WAAW,EAAE,MAAM,CAAC;IAEpB;;;OAGG;IACH,MAAM,EAAE;QACN,gBAAgB,EAAE,MAAM,CAAC;QACzB,QAAQ,EAAE,MAAM,CAAC;QACjB,SAAS,EAAE,MAAM,CAAC;QAClB,iBAAiB,EAAE,MAAM,CAAC;KAC3B,CAAC;CACH,CAAC;AAEF,MAAM,MAAM,uBAAuB,GAAG,CAAC,KAAK,EAAE,mBAAmB,KAAK,OAAO,CAAC,mBAAmB,CAAC,CAAC;AAInG,iBAAS,QAAQ,CAAC,IAAI,EAAE,uBAAuB,GAAG,IAAI,CAErD;AAED,iBAAS,GAAG,IAAI,uBAAuB,GAAG,IAAI,CAE7C;AAED,iBAAS,GAAG,IAAI,OAAO,CAEtB;AAED,iBAAS,KAAK,IAAI,IAAI,CAErB;AAED,eAAO,MAAM,uBAAuB;;;;;EAKlC,CAAC;AAEH,eAAe,uBAAuB,CAAC"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
let provider = null;
|
|
2
|
+
function register(next) {
|
|
3
|
+
provider = next;
|
|
4
|
+
}
|
|
5
|
+
function get() {
|
|
6
|
+
return provider;
|
|
7
|
+
}
|
|
8
|
+
function has() {
|
|
9
|
+
return provider !== null;
|
|
10
|
+
}
|
|
11
|
+
function clear() {
|
|
12
|
+
provider = null;
|
|
13
|
+
}
|
|
14
|
+
export const MultipartParserRegistry = Object.freeze({
|
|
15
|
+
register,
|
|
16
|
+
get,
|
|
17
|
+
has,
|
|
18
|
+
clear,
|
|
19
|
+
});
|
|
20
|
+
export default MultipartParserRegistry;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type { IRequest } from './Request';
|
|
2
|
+
export declare const validatedBody: <TBody = Record<string, unknown>>(req: IRequest) => TBody | undefined;
|
|
3
|
+
export declare const validatedQuery: <TQuery = Record<string, unknown>>(req: IRequest) => TQuery | undefined;
|
|
4
|
+
export declare const validatedParams: <TParams = Record<string, unknown>>(req: IRequest) => TParams | undefined;
|
|
5
|
+
export declare const validatedHeaders: <THeaders = Record<string, unknown>>(req: IRequest) => THeaders | undefined;
|
|
6
|
+
export declare const Validated: Readonly<{
|
|
7
|
+
body: <TBody = Record<string, unknown>>(req: IRequest) => TBody | undefined;
|
|
8
|
+
query: <TQuery = Record<string, unknown>>(req: IRequest) => TQuery | undefined;
|
|
9
|
+
params: <TParams = Record<string, unknown>>(req: IRequest) => TParams | undefined;
|
|
10
|
+
headers: <THeaders = Record<string, unknown>>(req: IRequest) => THeaders | undefined;
|
|
11
|
+
}>;
|
|
12
|
+
//# sourceMappingURL=validated.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"validated.d.ts","sourceRoot":"","sources":["../../../src/http/validated.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AAa9C,eAAO,MAAM,aAAa,GAAI,KAAK,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAC3D,KAAK,QAAQ,KACZ,KAAK,GAAG,SAKV,CAAC;AAEF,eAAO,MAAM,cAAc,GAAI,MAAM,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAC7D,KAAK,QAAQ,KACZ,MAAM,GAAG,SAKX,CAAC;AAEF,eAAO,MAAM,eAAe,GAAI,OAAO,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAC/D,KAAK,QAAQ,KACZ,OAAO,GAAG,SAKZ,CAAC;AAEF,eAAO,MAAM,gBAAgB,GAAI,QAAQ,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EACjE,KAAK,QAAQ,KACZ,QAAQ,GAAG,SAKb,CAAC;AAEF,eAAO,MAAM,SAAS;WApCQ,KAAK,iCAC5B,QAAQ,KACZ,KAAK,GAAG,SAAS;YAOW,MAAM,iCAC9B,QAAQ,KACZ,MAAM,GAAG,SAAS;aAOW,OAAO,iCAChC,QAAQ,KACZ,OAAO,GAAG,SAAS;cAOW,QAAQ,iCAClC,QAAQ,KACZ,QAAQ,GAAG,SAAS;EAYrB,CAAC"}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
const getValidated = (req) => {
|
|
2
|
+
return req.validated;
|
|
3
|
+
};
|
|
4
|
+
export const validatedBody = (req) => {
|
|
5
|
+
const validated = getValidated(req);
|
|
6
|
+
if (validated === undefined)
|
|
7
|
+
return undefined;
|
|
8
|
+
if (validated.body === undefined)
|
|
9
|
+
return undefined;
|
|
10
|
+
return validated.body;
|
|
11
|
+
};
|
|
12
|
+
export const validatedQuery = (req) => {
|
|
13
|
+
const validated = getValidated(req);
|
|
14
|
+
if (validated === undefined)
|
|
15
|
+
return undefined;
|
|
16
|
+
if (validated.query === undefined)
|
|
17
|
+
return undefined;
|
|
18
|
+
return validated.query;
|
|
19
|
+
};
|
|
20
|
+
export const validatedParams = (req) => {
|
|
21
|
+
const validated = getValidated(req);
|
|
22
|
+
if (validated === undefined)
|
|
23
|
+
return undefined;
|
|
24
|
+
if (validated.params === undefined)
|
|
25
|
+
return undefined;
|
|
26
|
+
return validated.params;
|
|
27
|
+
};
|
|
28
|
+
export const validatedHeaders = (req) => {
|
|
29
|
+
const validated = getValidated(req);
|
|
30
|
+
if (validated === undefined)
|
|
31
|
+
return undefined;
|
|
32
|
+
if (validated.headers === undefined)
|
|
33
|
+
return undefined;
|
|
34
|
+
return validated.headers;
|
|
35
|
+
};
|
|
36
|
+
export const Validated = Object.freeze({
|
|
37
|
+
body: validatedBody,
|
|
38
|
+
query: validatedQuery,
|
|
39
|
+
params: validatedParams,
|
|
40
|
+
headers: validatedHeaders,
|
|
41
|
+
});
|
package/src/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
*
|
|
2
|
+
* ZinTrust Framework - Production-Grade TypeScript Backend
|
|
3
3
|
* Built for performance, type safety, and exceptional developer experience
|
|
4
4
|
*/
|
|
5
5
|
declare const ZintrustApplication: Readonly<{
|
|
@@ -53,11 +53,21 @@ declare const ZintrustSignedRequest: Readonly<{
|
|
|
53
53
|
export { Server } from './boot/Server';
|
|
54
54
|
export { ServiceContainer } from './container/ServiceContainer';
|
|
55
55
|
export { Controller } from './http/Controller';
|
|
56
|
+
export { FileUpload } from './http/FileUpload';
|
|
57
|
+
export type { FileUploadOptions, IFileUploadHandler, UploadedFile } from './http/FileUpload';
|
|
56
58
|
export { Kernel } from './http/Kernel';
|
|
59
|
+
export { bodyParsingMiddleware } from './http/middleware/BodyParsingMiddleware';
|
|
60
|
+
export { fileUploadMiddleware } from './http/middleware/FileUploadMiddleware';
|
|
61
|
+
export { BodyParsers } from './http/parsers/BodyParsers';
|
|
62
|
+
export { MultipartParser } from './http/parsers/MultipartParser';
|
|
63
|
+
export { MultipartParserRegistry } from './http/parsers/MultipartParserRegistry';
|
|
64
|
+
export type { MultipartFieldValue, MultipartParseInput, MultipartParserProvider, ParsedMultipartData, } from './http/parsers/MultipartParserRegistry';
|
|
57
65
|
export { Request } from './http/Request';
|
|
58
|
-
export type { IRequest } from './http/Request';
|
|
66
|
+
export type { IRequest, ValidatedRequest } from './http/Request';
|
|
67
|
+
export { RequestContext } from './http/RequestContext';
|
|
59
68
|
export { Response } from './http/Response';
|
|
60
69
|
export type { IResponse } from './http/Response';
|
|
70
|
+
export { getValidatedBody, getValidatedHeaders, getValidatedParams, getValidatedQuery, hasValidatedBody, requireValidatedBody, ValidationHelper, } from './http/ValidationHelper';
|
|
61
71
|
export { CsrfMiddleware } from './middleware/CsrfMiddleware';
|
|
62
72
|
export { ErrorHandlerMiddleware } from './middleware/ErrorHandlerMiddleware';
|
|
63
73
|
export { LoggingMiddleware } from './middleware/LoggingMiddleware';
|
|
@@ -66,32 +76,47 @@ export type { Middleware } from './middleware/MiddlewareStack';
|
|
|
66
76
|
export { RateLimiter } from './middleware/RateLimiter';
|
|
67
77
|
export { SecurityMiddleware } from './middleware/SecurityMiddleware';
|
|
68
78
|
export { SessionMiddleware } from './middleware/SessionMiddleware';
|
|
79
|
+
export { ValidationMiddleware } from './middleware/ValidationMiddleware';
|
|
69
80
|
export { MySQLAdapter } from './orm/adapters/MySQLAdapter';
|
|
70
81
|
export { PostgreSQLAdapter } from './orm/adapters/PostgreSQLAdapter';
|
|
71
82
|
export { SQLiteAdapter } from './orm/adapters/SQLiteAdapter';
|
|
72
83
|
export { SQLServerAdapter } from './orm/adapters/SQLServerAdapter';
|
|
73
|
-
export { Database, resetDatabase, useDatabase } from './orm/Database';
|
|
84
|
+
export { Database, resetDatabase, useDatabase, useEnsureDbConnected } from './orm/Database';
|
|
85
|
+
export type { IDatabase } from './orm/Database';
|
|
74
86
|
export { Model } from './orm/Model';
|
|
75
87
|
export type { IModel, ModelConfig, ModelStatic } from './orm/Model';
|
|
76
88
|
export { QueryBuilder } from './orm/QueryBuilder';
|
|
89
|
+
export type { InsertResult, IQueryBuilder } from './orm/QueryBuilder';
|
|
77
90
|
export type { IRelationship } from './orm/Relationships';
|
|
78
91
|
export { ZintrustApplication as Application };
|
|
92
|
+
export { DateTime } from './time/DateTime';
|
|
93
|
+
export type { IDateTime } from './time/DateTime';
|
|
94
|
+
export { Schema as MigrationSchema, type Blueprint } from './migrations/schema';
|
|
95
|
+
export { OpenApiGenerator } from './openapi/OpenApiGenerator';
|
|
96
|
+
export type { OpenApiGeneratorOptions } from './openapi/OpenApiGenerator';
|
|
79
97
|
export { DatabaseAdapterRegistry } from './orm/DatabaseAdapterRegistry';
|
|
80
98
|
export { Router } from './routing/Router';
|
|
81
99
|
export type { IRouter } from './routing/Router';
|
|
100
|
+
export { normalizeRouteMeta, RouteRegistry } from './routing/RouteRegistry';
|
|
101
|
+
export type { RouteMeta, RouteMetaInput, RouteRegistration } from './routing/RouteRegistry';
|
|
102
|
+
export { generateSecureJobId, generateUuid, getString, Utilities, type UtilitiesType, } from './common/utility';
|
|
82
103
|
export { delay, ensureDirSafe } from './common/index';
|
|
83
|
-
export { generateSecureJobId, generateUuid } from './common/uuid';
|
|
84
104
|
export { ZintrustAwsSigV4 as AwsSigV4 };
|
|
85
105
|
export { collect, Collection } from './collections/index';
|
|
86
106
|
export type { ICollection, PrimitiveKey } from './collections/index';
|
|
87
107
|
export { HttpClient } from './tools/http/Http';
|
|
88
108
|
export type { IHttpRequest, IHttpResponse } from './tools/http/Http';
|
|
89
|
-
export type { DatabaseConfig, ID1Database } from './orm/DatabaseAdapter';
|
|
109
|
+
export type { DatabaseConfig, ID1Database, IDatabaseAdapter, QueryResult, } from './orm/DatabaseAdapter';
|
|
90
110
|
export { MemoryProfiler } from './profiling/MemoryProfiler';
|
|
91
111
|
export { N1Detector } from './profiling/N1Detector';
|
|
92
112
|
export { QueryLogger } from './profiling/QueryLogger';
|
|
93
113
|
export { RequestProfiler } from './profiling/RequestProfiler';
|
|
94
114
|
export type { MemoryDelta, MemorySnapshot, N1Pattern, ProfileReport, QueryLogEntry, } from './profiling/types';
|
|
115
|
+
export { GenerationCache, LazyLoader, Memoize, ParallelGenerator, PerformanceOptimizer, runAll, runBatch, } from './performance/Optimizer';
|
|
116
|
+
export type { IGenerationCache, ILazyLoader, IPerformanceOptimizer } from './performance/Optimizer';
|
|
117
|
+
export { OpenTelemetry } from './observability/OpenTelemetry';
|
|
118
|
+
export { PrometheusMetrics } from './observability/PrometheusMetrics';
|
|
119
|
+
export type { ObserveDbQueryInput, ObserveHttpRequestInput, } from './observability/PrometheusMetrics';
|
|
95
120
|
export { ValidationError } from './validation/ValidationError';
|
|
96
121
|
export type { FieldError } from './validation/ValidationError';
|
|
97
122
|
export { Schema, Validator } from './validation/Validator';
|
|
@@ -105,6 +130,8 @@ export { JwtManager } from './security/JwtManager';
|
|
|
105
130
|
export type { IJwtManager, JwtAlgorithm, JwtManagerType, JwtOptions, JwtPayload, } from './security/JwtManager';
|
|
106
131
|
export { PasswordResetTokenBroker } from './security/PasswordResetTokenBroker';
|
|
107
132
|
export type { IPasswordResetTokenBroker, IPasswordResetTokenStore, PasswordResetTokenBrokerOptions, PasswordResetTokenBrokerType, PasswordResetTokenRecord, } from './security/PasswordResetTokenBroker';
|
|
133
|
+
export { createSanitizer, Sanitizer, type SanitizerType } from './security/Sanitizer';
|
|
134
|
+
export { TokenRevocation } from './security/TokenRevocation';
|
|
108
135
|
export { Xss } from './security/Xss';
|
|
109
136
|
export { XssProtection } from './security/XssProtection';
|
|
110
137
|
export { ZintrustSignedRequest as SignedRequest };
|
|
@@ -120,6 +147,8 @@ export { appConfig } from './config/app';
|
|
|
120
147
|
export type { AppConfig } from './config/app';
|
|
121
148
|
export { cacheConfig } from './config/cache';
|
|
122
149
|
export type { CacheConfig } from './config/cache';
|
|
150
|
+
export { Cache, cache } from './cache/Cache';
|
|
151
|
+
export type { CacheDriver } from './cache/CacheDriver';
|
|
123
152
|
export { registerCachesFromRuntimeConfig } from './cache/CacheRuntimeRegistration';
|
|
124
153
|
export { CacheDriverRegistry } from './cache/CacheDriverRegistry';
|
|
125
154
|
export { databaseConfig } from './config/database';
|
|
@@ -127,7 +156,16 @@ export type { DatabaseConfig as DatabaseRuntimeConfig } from './config/database'
|
|
|
127
156
|
export { registerDatabasesFromRuntimeConfig } from './orm/DatabaseRuntimeRegistration';
|
|
128
157
|
export { microservicesConfig } from './config/microservices';
|
|
129
158
|
export type { MicroservicesConfig } from './config/microservices';
|
|
130
|
-
export {
|
|
159
|
+
export { MicroserviceBootstrap } from './microservices/MicroserviceBootstrap';
|
|
160
|
+
export type { IMicroserviceBootstrap, ServiceConfig } from './microservices/MicroserviceBootstrap';
|
|
161
|
+
export { MicroserviceManager } from './microservices/MicroserviceManager';
|
|
162
|
+
export type { IMicroserviceManager, MicroserviceConfig } from './microservices/MicroserviceManager';
|
|
163
|
+
export { RequestTracingMiddleware } from './microservices/RequestTracingMiddleware';
|
|
164
|
+
export { ServiceAuthMiddleware } from './microservices/ServiceAuthMiddleware';
|
|
165
|
+
export { HealthCheckHandler, ServiceHealthMonitor } from './microservices/ServiceHealthMonitor';
|
|
166
|
+
export type { AggregatedHealthStatus, HealthCheckResult, IServiceHealthMonitor, } from './microservices/ServiceHealthMonitor';
|
|
167
|
+
export { middlewareConfig, MiddlewareKeys } from './config/middleware';
|
|
168
|
+
export type { MiddlewareKey } from './config/middleware';
|
|
131
169
|
export type { MiddlewareConfigType } from './config/type';
|
|
132
170
|
export { queueConfig } from './config/queue';
|
|
133
171
|
export type { QueueConfig } from './config/queue';
|
|
@@ -143,7 +181,8 @@ export type { StartupConfig } from './config/startup';
|
|
|
143
181
|
export { Constants, DEFAULTS, ENV_KEYS, HTTP_HEADERS, MIME_TYPES } from './config/constants';
|
|
144
182
|
export { FeatureFlags } from './config/features';
|
|
145
183
|
export { Cloudflare } from './config/cloudflare';
|
|
146
|
-
export { SecretsManager } from './config/SecretsManager';
|
|
184
|
+
export { getDatabaseCredentials, getJwtSecrets, SECRETS, SecretsManager, } from './config/SecretsManager';
|
|
185
|
+
export type { DatabaseCredentials, JwtSecrets } from './config/SecretsManager';
|
|
147
186
|
export type { MailDriverConfig, MailDriverName, WorkersEnv } from './config/type';
|
|
148
187
|
export { StartupConfigValidator } from './config/StartupConfigValidator';
|
|
149
188
|
export { Mail } from './tools/mail/Mail';
|
|
@@ -181,4 +220,22 @@ export { GcsDriver } from './tools/storage/drivers/Gcs';
|
|
|
181
220
|
export type { GcsConfig } from './tools/storage/drivers/Gcs';
|
|
182
221
|
export { RedisQueue } from './tools/queue/drivers/Redis';
|
|
183
222
|
export { Queue } from './tools/queue/Queue';
|
|
223
|
+
export { SeederLoader } from './seeders/SeederLoader';
|
|
224
|
+
export type { LoadedSeeder, SeederHandler } from './seeders/types';
|
|
225
|
+
export { default as logCleanup } from './schedules/log-cleanup';
|
|
226
|
+
export * as NodeSingletons from './node-singletons/index';
|
|
227
|
+
export { Auth } from './features/Auth';
|
|
228
|
+
export { MicroserviceGenerator } from './microservices/MicroserviceGenerator';
|
|
229
|
+
export type { GenerateServiceOptions, IMicroserviceGenerator, } from './microservices/MicroserviceGenerator';
|
|
230
|
+
export { BaseCommand } from './cli/BaseCommand';
|
|
231
|
+
export type { CommandOptions } from './cli/BaseCommand';
|
|
232
|
+
export { CLI } from './cli/CLI';
|
|
233
|
+
export { ErrorHandler, EXIT_CODES } from './cli/ErrorHandler';
|
|
234
|
+
export { getKernel } from './runtime/getKernel';
|
|
235
|
+
export { RuntimeDetector } from './runtime/RuntimeDetector';
|
|
236
|
+
export { PluginManager } from './runtime/PluginManager';
|
|
237
|
+
export { PluginRegistry } from './runtime/PluginRegistry';
|
|
238
|
+
export { nowIso } from './common/utility';
|
|
239
|
+
export type { SanitizerError } from './exceptions/ZintrustError';
|
|
240
|
+
export { randomBytes } from './node-singletons/crypto';
|
|
184
241
|
//# sourceMappingURL=index.d.ts.map
|