@zintrust/core 0.1.19 → 0.1.21
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 +3 -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 +66 -13
- 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/boot/bootstrap.js +2 -0
- 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 +324 -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 +229 -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 +76 -26
- 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/ModelGenerator.js +1 -1
- 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 +28 -7
- 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 +14 -28
- package/src/config/broadcast.d.ts.map +1 -1
- package/src/config/broadcast.js +69 -35
- package/src/config/cache.d.ts +13 -45
- package/src/config/cache.d.ts.map +1 -1
- package/src/config/cache.js +69 -25
- package/src/config/cloudflare.d.ts +1 -1
- package/src/config/cloudflare.d.ts.map +1 -1
- package/src/config/database.d.ts +22 -64
- package/src/config/database.d.ts.map +1 -1
- package/src/config/database.js +191 -37
- package/src/config/env.d.ts +12 -0
- package/src/config/env.d.ts.map +1 -1
- package/src/config/env.js +14 -0
- package/src/config/index.d.ts +33 -137
- package/src/config/index.d.ts.map +1 -1
- package/src/config/logging/KvLogger.js +1 -1
- package/src/config/logging/SlackLogger.js +2 -2
- package/src/config/mail.d.ts +19 -55
- package/src/config/mail.d.ts.map +1 -1
- package/src/config/mail.js +63 -21
- package/src/config/middleware.d.ts +44 -1
- package/src/config/middleware.d.ts.map +1 -1
- package/src/config/middleware.js +157 -5
- package/src/config/notification.d.ts +14 -27
- package/src/config/notification.d.ts.map +1 -1
- package/src/config/notification.js +82 -36
- package/src/config/queue.d.ts +21 -51
- package/src/config/queue.d.ts.map +1 -1
- package/src/config/queue.js +72 -27
- package/src/config/security.d.ts +1 -1
- package/src/config/security.js +1 -1
- package/src/config/storage.d.ts +27 -34
- package/src/config/storage.d.ts.map +1 -1
- package/src/config/storage.js +97 -56
- package/src/config/type.d.ts +13 -2
- 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 +156 -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 +73 -12
- package/src/index.d.ts.map +1 -1
- package/src/index.js +60 -5
- package/src/microservices/PostgresAdapter.d.ts.map +1 -1
- package/src/microservices/PostgresAdapter.js +0 -1
- 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 +339 -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 +5 -2
- package/src/orm/Database.d.ts.map +1 -1
- package/src/orm/Database.js +219 -63
- package/src/orm/DatabaseAdapter.d.ts +14 -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/DatabaseRuntimeRegistration.d.ts.map +1 -1
- package/src/orm/DatabaseRuntimeRegistration.js +12 -0
- 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 +406 -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 +59 -3
- 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 +7 -6
- package/src/performance/Optimizer.d.ts.map +1 -1
- package/src/performance/Optimizer.js +170 -55
- 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 +27 -0
- package/src/routing/doc.d.ts.map +1 -0
- package/src/routing/doc.js +110 -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 +27 -0
- package/src/routing/publicRoot.d.ts.map +1 -0
- package/src/routing/publicRoot.js +110 -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/StartupConfigFileRegistry.d.ts +20 -0
- package/src/runtime/StartupConfigFileRegistry.d.ts.map +1 -0
- package/src/runtime/StartupConfigFileRegistry.js +44 -0
- 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/runtime/useFileLoader.d.ts +26 -0
- package/src/runtime/useFileLoader.d.ts.map +1 -0
- package/src/runtime/useFileLoader.js +188 -0
- package/src/scripts/TemplateImportsCheck.js +40 -0
- package/src/scripts/TemplateSync.js +90 -24
- 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/security/XssProtection.d.ts.map +1 -1
- package/src/security/XssProtection.js +62 -14
- 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 +29 -126
- package/src/templates/project/basic/config/cache.ts.tpl +12 -70
- 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 +66 -123
- 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/logging/HttpLogger.ts.tpl +7 -114
- package/src/templates/project/basic/config/mail.ts.tpl +9 -62
- 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 +13 -114
- package/src/templates/project/basic/config/queue.ts.tpl +9 -40
- 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 +57 -137
- package/src/templates/project/basic/config/type.ts.tpl +32 -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/src/index.ts.tpl +3 -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/config/logging/KvLogger.ts.tpl +0 -181
- package/src/templates/project/basic/config/logging/SlackLogger.ts.tpl +0 -156
- package/src/templates/project/basic/database/migrations/index.ts.tpl +0 -2
|
@@ -0,0 +1,110 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Documentation Routes
|
|
3
|
+
* Serves static files from /doc/* paths with relaxed CSP headers.
|
|
4
|
+
*/
|
|
5
|
+
import { HTTP_HEADERS } from '../config/constants.js';
|
|
6
|
+
import { ErrorFactory } from '../exceptions/ZintrustError.js';
|
|
7
|
+
import * as fs from '../node-singletons/fs.js';
|
|
8
|
+
import * as path from '../node-singletons/path.js';
|
|
9
|
+
import { MIME_TYPES_MAP, resolveSafePath, tryDecodeURIComponent } from './common.js';
|
|
10
|
+
import { ErrorRouting } from './error.js';
|
|
11
|
+
import { getPublicRootAsync } from './publicRoot.js';
|
|
12
|
+
import { Router } from './Router.js';
|
|
13
|
+
export { MIME_TYPES_MAP } from './common.js';
|
|
14
|
+
/**
|
|
15
|
+
* Find the package root directory
|
|
16
|
+
*/
|
|
17
|
+
// Backward-compatible re-exports
|
|
18
|
+
export { findPackageRoot, findPackageRootAsync, getFrameworkPublicRoots, getFrameworkPublicRootsAsync, getPublicRoot, getPublicRootAsync, } from './publicRoot.js';
|
|
19
|
+
const mapStaticPathAsync = async (urlPath) => {
|
|
20
|
+
const publicRoot = await getPublicRootAsync();
|
|
21
|
+
const normalize = (p) => (p.startsWith('/') ? p.slice(1) : p);
|
|
22
|
+
if (urlPath === '/doc' || urlPath === '/doc/')
|
|
23
|
+
return publicRoot;
|
|
24
|
+
if (urlPath.startsWith('/doc/')) {
|
|
25
|
+
const rawRelative = urlPath.slice('/doc/'.length);
|
|
26
|
+
const normalizedRelative = tryDecodeURIComponent(rawRelative).replaceAll('\\', '/');
|
|
27
|
+
return resolveSafePath(publicRoot, normalize(normalizedRelative));
|
|
28
|
+
}
|
|
29
|
+
const normalized = tryDecodeURIComponent(urlPath).replaceAll('\\', '/');
|
|
30
|
+
return resolveSafePath(publicRoot, normalize(normalized));
|
|
31
|
+
};
|
|
32
|
+
/**
|
|
33
|
+
* Set relaxed CSP headers for docs (allows external assets like Tailwind CDN, Google Fonts)
|
|
34
|
+
*/
|
|
35
|
+
export const setDocumentationCSPHeaders = (response) => {
|
|
36
|
+
response.setHeader(HTTP_HEADERS.CONTENT_SECURITY_POLICY, "default-src 'self'; " +
|
|
37
|
+
"script-src 'self' 'unsafe-inline' 'unsafe-eval' https://cdn.tailwindcss.com; " +
|
|
38
|
+
"script-src-elem 'self' 'unsafe-inline' https://cdn.tailwindcss.com; " +
|
|
39
|
+
"style-src 'self' 'unsafe-inline' https://fonts.googleapis.com; " +
|
|
40
|
+
"style-src-elem 'self' 'unsafe-inline' https://fonts.googleapis.com; " +
|
|
41
|
+
"img-src 'self' data: https:; " +
|
|
42
|
+
"font-src 'self' data: https://fonts.gstatic.com;");
|
|
43
|
+
};
|
|
44
|
+
/**
|
|
45
|
+
* Serve a documentation static file (async)
|
|
46
|
+
*/
|
|
47
|
+
export const serveDocumentationFileAsync = async (urlPath, response) => {
|
|
48
|
+
let filePath = await mapStaticPathAsync(urlPath);
|
|
49
|
+
if (filePath === undefined) {
|
|
50
|
+
return false;
|
|
51
|
+
}
|
|
52
|
+
try {
|
|
53
|
+
try {
|
|
54
|
+
const stats = await fs.fsPromises.stat(filePath);
|
|
55
|
+
if (stats.isDirectory()) {
|
|
56
|
+
filePath = path.join(filePath, 'index.html');
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
catch {
|
|
60
|
+
// ignore
|
|
61
|
+
}
|
|
62
|
+
const exists = async (p) => {
|
|
63
|
+
try {
|
|
64
|
+
await fs.fsPromises.access(p);
|
|
65
|
+
return true;
|
|
66
|
+
}
|
|
67
|
+
catch {
|
|
68
|
+
return false;
|
|
69
|
+
}
|
|
70
|
+
};
|
|
71
|
+
if (!(await exists(filePath)) && !path.extname(filePath)) {
|
|
72
|
+
const htmlPath = `${filePath}.html`;
|
|
73
|
+
if (await exists(htmlPath)) {
|
|
74
|
+
filePath = htmlPath;
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
if (await exists(filePath)) {
|
|
78
|
+
const ext = path.extname(filePath).toLowerCase();
|
|
79
|
+
const contentType = MIME_TYPES_MAP[ext] || 'application/octet-stream';
|
|
80
|
+
const content = await fs.fsPromises.readFile(filePath);
|
|
81
|
+
response.setStatus(200);
|
|
82
|
+
response.setHeader('Content-Type', contentType);
|
|
83
|
+
response.send(content);
|
|
84
|
+
return true;
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
catch (error) {
|
|
88
|
+
ErrorFactory.createTryCatchError(`Error serving documentation file ${filePath}`, error);
|
|
89
|
+
}
|
|
90
|
+
return false;
|
|
91
|
+
};
|
|
92
|
+
const handleDocRequest = async (req, res) => {
|
|
93
|
+
setDocumentationCSPHeaders(res);
|
|
94
|
+
const urlPath = req.getPath();
|
|
95
|
+
if (await serveDocumentationFileAsync(urlPath, res))
|
|
96
|
+
return;
|
|
97
|
+
ErrorRouting.handleNotFound(req, res);
|
|
98
|
+
};
|
|
99
|
+
export const registerDocRoutes = (router) => {
|
|
100
|
+
// Root docs entrypoints.
|
|
101
|
+
Router.get(router, '/doc', handleDocRequest);
|
|
102
|
+
Router.get(router, '/doc/', handleDocRequest);
|
|
103
|
+
// Greedy path match for nested assets like /doc/assets/app.js
|
|
104
|
+
Router.get(router, '/doc/:path*', handleDocRequest);
|
|
105
|
+
};
|
|
106
|
+
export default {
|
|
107
|
+
registerDocRoutes,
|
|
108
|
+
setDocumentationCSPHeaders,
|
|
109
|
+
serveDocumentationFileAsync,
|
|
110
|
+
};
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Error Routing
|
|
3
|
+
* Centralizes 404/500 handling and HTML error page rendering.
|
|
4
|
+
*/
|
|
5
|
+
import type { IRequest } from '../http/Request';
|
|
6
|
+
import type { IResponse } from '../http/Response';
|
|
7
|
+
import type * as http from '../node-singletons/http';
|
|
8
|
+
import type { IRouter } from './Router';
|
|
9
|
+
/**
|
|
10
|
+
* Debug routes to always render 404/500 responses.
|
|
11
|
+
*/
|
|
12
|
+
export declare const registerErrorRoutes: (router: IRouter) => void;
|
|
13
|
+
export declare const ErrorRouting: Readonly<{
|
|
14
|
+
getPublicRoot: () => string;
|
|
15
|
+
registerErrorRoutes: (router: IRouter) => void;
|
|
16
|
+
handleNotFound: (request: IRequest, response: IResponse, requestId?: string) => void;
|
|
17
|
+
handleInternalServerErrorWithWrappers: (request: IRequest, response: IResponse, error: unknown, requestId?: string) => void;
|
|
18
|
+
handleInternalServerErrorRaw: (res: http.ServerResponse) => void;
|
|
19
|
+
}>;
|
|
20
|
+
export default ErrorRouting;
|
|
21
|
+
//# sourceMappingURL=error.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"error.d.ts","sourceRoot":"","sources":["../../../src/routing/error.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAOH,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AAC9C,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAChD,OAAO,KAAK,KAAK,IAAI,MAAM,uBAAuB,CAAC;AAEnD,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,iBAAiB,CAAC;AAwJ/C;;GAEG;AACH,eAAO,MAAM,mBAAmB,GAAI,QAAQ,OAAO,KAAG,IAGrD,CAAC;AAEF,eAAO,MAAM,YAAY;;kCALmB,OAAO,KAAG,IAAI;8BAlGzB,QAAQ,YAAY,SAAS,cAAc,MAAM,KAAG,IAAI;qDAiB9E,QAAQ,YACP,SAAS,SACZ,OAAO,cACF,MAAM,KACjB,IAAI;wCA0DoC,IAAI,CAAC,cAAc,KAAG,IAAI;EA8BnE,CAAC;AAEH,eAAe,YAAY,CAAC"}
|
|
@@ -0,0 +1,126 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Error Routing
|
|
3
|
+
* Centralizes 404/500 handling and HTML error page rendering.
|
|
4
|
+
*/
|
|
5
|
+
import { appConfig } from '../config/app.js';
|
|
6
|
+
import { HTTP_HEADERS, MIME_TYPES } from '../config/constants.js';
|
|
7
|
+
import { ErrorFactory } from '../exceptions/ZintrustError.js';
|
|
8
|
+
import { ErrorPageRenderer } from '../http/error-pages/ErrorPageRenderer.js';
|
|
9
|
+
import { ErrorResponse } from '../http/ErrorResponse.js';
|
|
10
|
+
import { getPublicRoot } from './publicRoot.js';
|
|
11
|
+
import { Router } from './Router.js';
|
|
12
|
+
const redactHeaders = (headers) => {
|
|
13
|
+
const redacted = new Set(['authorization', 'cookie', 'set-cookie', 'x-api-key']);
|
|
14
|
+
const out = {};
|
|
15
|
+
for (const [key, value] of Object.entries(headers)) {
|
|
16
|
+
if (redacted.has(key.toLowerCase())) {
|
|
17
|
+
out[key] = '[redacted]';
|
|
18
|
+
continue;
|
|
19
|
+
}
|
|
20
|
+
out[key] = value;
|
|
21
|
+
}
|
|
22
|
+
return out;
|
|
23
|
+
};
|
|
24
|
+
const safeJsonStringify = (value) => {
|
|
25
|
+
try {
|
|
26
|
+
return JSON.stringify(value, null, 2) ?? '';
|
|
27
|
+
}
|
|
28
|
+
catch {
|
|
29
|
+
return '';
|
|
30
|
+
}
|
|
31
|
+
};
|
|
32
|
+
const trySendHtmlErrorPage = (request, response, input) => {
|
|
33
|
+
if (!ErrorPageRenderer.shouldSendHtml(request))
|
|
34
|
+
return false;
|
|
35
|
+
const publicRoot = getPublicRoot();
|
|
36
|
+
const html = ErrorPageRenderer.renderHtml(publicRoot, {
|
|
37
|
+
statusCode: input.statusCode,
|
|
38
|
+
errorName: input.errorName,
|
|
39
|
+
errorMessage: input.errorMessage,
|
|
40
|
+
requestPath: request.getPath(),
|
|
41
|
+
stackPretty: input.stackPretty,
|
|
42
|
+
stackRaw: input.stackRaw,
|
|
43
|
+
requestPretty: input.requestPretty,
|
|
44
|
+
requestRaw: input.requestRaw,
|
|
45
|
+
});
|
|
46
|
+
if (html === undefined)
|
|
47
|
+
return false;
|
|
48
|
+
response.html(html);
|
|
49
|
+
return true;
|
|
50
|
+
};
|
|
51
|
+
const handleNotFound = (request, response, requestId) => {
|
|
52
|
+
response.setStatus(404);
|
|
53
|
+
if (trySendHtmlErrorPage(request, response, {
|
|
54
|
+
statusCode: 404,
|
|
55
|
+
errorName: 'Not Found',
|
|
56
|
+
errorMessage: 'The page you requested could not be found.',
|
|
57
|
+
})) {
|
|
58
|
+
return;
|
|
59
|
+
}
|
|
60
|
+
response.json(ErrorResponse.notFound('Route', requestId));
|
|
61
|
+
};
|
|
62
|
+
const handleInternalServerErrorWithWrappers = (request, response, error, requestId) => {
|
|
63
|
+
response.setStatus(500);
|
|
64
|
+
const isDev = appConfig.isDevelopment();
|
|
65
|
+
const err = error instanceof Error ? error : ErrorFactory.createGeneralError('Unknown error', error);
|
|
66
|
+
const errorName = isDev ? err.name || 'Error' : 'Internal Server Error';
|
|
67
|
+
const errorMessage = isDev
|
|
68
|
+
? err.message || 'An error has occurred'
|
|
69
|
+
: 'Something went wrong while handling your request.';
|
|
70
|
+
const requestObj = isDev
|
|
71
|
+
? {
|
|
72
|
+
method: request.getMethod(),
|
|
73
|
+
path: request.getPath(),
|
|
74
|
+
query: request.getQuery(),
|
|
75
|
+
headers: redactHeaders(request.getHeaders()),
|
|
76
|
+
}
|
|
77
|
+
: undefined;
|
|
78
|
+
const requestPretty = requestObj === undefined
|
|
79
|
+
? undefined
|
|
80
|
+
: `Request\n\nMethod: ${requestObj.method}\nPath: ${requestObj.path}\n\nHeaders:\n${safeJsonStringify(requestObj.headers)}\n\nQuery:\n${safeJsonStringify(requestObj.query)}`;
|
|
81
|
+
const requestRaw = requestObj === undefined ? undefined : safeJsonStringify(requestObj);
|
|
82
|
+
const stackPretty = isDev ? (err.stack ?? '') : undefined;
|
|
83
|
+
const stackRaw = isDev
|
|
84
|
+
? safeJsonStringify({ name: err.name, message: err.message, stack: err.stack })
|
|
85
|
+
: undefined;
|
|
86
|
+
if (trySendHtmlErrorPage(request, response, {
|
|
87
|
+
statusCode: 500,
|
|
88
|
+
errorName,
|
|
89
|
+
errorMessage,
|
|
90
|
+
stackPretty,
|
|
91
|
+
stackRaw,
|
|
92
|
+
requestPretty,
|
|
93
|
+
requestRaw,
|
|
94
|
+
})) {
|
|
95
|
+
return;
|
|
96
|
+
}
|
|
97
|
+
response.json(ErrorResponse.internalServerError('Internal server error', requestId, isDev ? err.stack : undefined));
|
|
98
|
+
};
|
|
99
|
+
const handleInternalServerErrorRaw = (res) => {
|
|
100
|
+
res.writeHead(500, { [HTTP_HEADERS.CONTENT_TYPE]: MIME_TYPES.JSON });
|
|
101
|
+
res.end(JSON.stringify(ErrorResponse.internalServerError('Internal server error')));
|
|
102
|
+
};
|
|
103
|
+
const handleForced404 = (req, res) => {
|
|
104
|
+
handleNotFound(req, res);
|
|
105
|
+
};
|
|
106
|
+
const handleForced500 = (req, res) => {
|
|
107
|
+
const forced = ErrorFactory.createGeneralError('Forced 500 route', {
|
|
108
|
+
route: '/500',
|
|
109
|
+
});
|
|
110
|
+
handleInternalServerErrorWithWrappers(req, res, forced);
|
|
111
|
+
};
|
|
112
|
+
/**
|
|
113
|
+
* Debug routes to always render 404/500 responses.
|
|
114
|
+
*/
|
|
115
|
+
export const registerErrorRoutes = (router) => {
|
|
116
|
+
Router.get(router, '/404', handleForced404);
|
|
117
|
+
Router.get(router, '/500', handleForced500);
|
|
118
|
+
};
|
|
119
|
+
export const ErrorRouting = Object.freeze({
|
|
120
|
+
getPublicRoot,
|
|
121
|
+
registerErrorRoutes,
|
|
122
|
+
handleNotFound,
|
|
123
|
+
handleInternalServerErrorWithWrappers,
|
|
124
|
+
handleInternalServerErrorRaw,
|
|
125
|
+
});
|
|
126
|
+
export default ErrorRouting;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Error Pages Static Assets
|
|
3
|
+
* Serves /error-pages/* assets (CSS/JS/SVG/etc) used by HTML error templates.
|
|
4
|
+
*/
|
|
5
|
+
import type { IResponse } from '../http/Response';
|
|
6
|
+
import type { IRouter } from './Router';
|
|
7
|
+
export declare const serveErrorPagesFile: (urlPath: string, response: IResponse) => boolean;
|
|
8
|
+
export declare const registerErrorPagesRoutes: (router: IRouter) => void;
|
|
9
|
+
declare const _default: {
|
|
10
|
+
registerErrorPagesRoutes: (router: IRouter) => void;
|
|
11
|
+
serveErrorPagesFile: (urlPath: string, response: IResponse) => boolean;
|
|
12
|
+
};
|
|
13
|
+
export default _default;
|
|
14
|
+
//# sourceMappingURL=errorPages.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"errorPages.d.ts","sourceRoot":"","sources":["../../../src/routing/errorPages.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAKH,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAKhD,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,iBAAiB,CAAC;AAiC/C,eAAO,MAAM,mBAAmB,GAAI,SAAS,MAAM,EAAE,UAAU,SAAS,KAAG,OAsD1E,CAAC;AAeF,eAAO,MAAM,wBAAwB,GAAI,QAAQ,OAAO,KAAG,IAO1D,CAAC;;uCAP+C,OAAO,KAAG,IAAI;mCArElB,MAAM,YAAY,SAAS,KAAG,OAAO;;AA8ElF,wBAAiE"}
|
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Error Pages Static Assets
|
|
3
|
+
* Serves /error-pages/* assets (CSS/JS/SVG/etc) used by HTML error templates.
|
|
4
|
+
*/
|
|
5
|
+
import { HTTP_HEADERS, MIME_TYPES } from '../config/constants.js';
|
|
6
|
+
import { ErrorFactory } from '../exceptions/ZintrustError.js';
|
|
7
|
+
import * as fs from '../node-singletons/fs.js';
|
|
8
|
+
import * as path from '../node-singletons/path.js';
|
|
9
|
+
import { MIME_TYPES_MAP, resolveSafePath, tryDecodeURIComponent } from './common.js';
|
|
10
|
+
import { getPublicRoot } from './publicRoot.js';
|
|
11
|
+
import { Router } from './Router.js';
|
|
12
|
+
const servePublicRootFile = (relativePath, response, contentType) => {
|
|
13
|
+
const publicRoot = getPublicRoot();
|
|
14
|
+
const filePath = path.join(publicRoot, relativePath);
|
|
15
|
+
try {
|
|
16
|
+
if (!fs.existsSync(filePath) || fs.statSync(filePath).isDirectory()) {
|
|
17
|
+
response.setStatus(404);
|
|
18
|
+
response.setHeader(HTTP_HEADERS.CONTENT_TYPE, MIME_TYPES.TEXT);
|
|
19
|
+
response.send('Not Found');
|
|
20
|
+
return;
|
|
21
|
+
}
|
|
22
|
+
const content = fs.readFileSync(filePath);
|
|
23
|
+
response.setStatus(200);
|
|
24
|
+
response.setHeader(HTTP_HEADERS.CONTENT_TYPE, contentType);
|
|
25
|
+
response.send(content);
|
|
26
|
+
return;
|
|
27
|
+
}
|
|
28
|
+
catch (error) {
|
|
29
|
+
ErrorFactory.createTryCatchError(`Error serving public file ${filePath}`, error);
|
|
30
|
+
response.setStatus(500);
|
|
31
|
+
response.setHeader(HTTP_HEADERS.CONTENT_TYPE, MIME_TYPES.TEXT);
|
|
32
|
+
response.send('Internal Server Error');
|
|
33
|
+
return;
|
|
34
|
+
}
|
|
35
|
+
};
|
|
36
|
+
export const serveErrorPagesFile = (urlPath, response) => {
|
|
37
|
+
if (urlPath === '/error-pages' || urlPath === '/error-pages/') {
|
|
38
|
+
response.setStatus(404);
|
|
39
|
+
response.setHeader(HTTP_HEADERS.CONTENT_TYPE, MIME_TYPES.TEXT);
|
|
40
|
+
response.send('Not Found');
|
|
41
|
+
return true;
|
|
42
|
+
}
|
|
43
|
+
if (!urlPath.startsWith('/error-pages/'))
|
|
44
|
+
return false;
|
|
45
|
+
const publicRoot = getPublicRoot();
|
|
46
|
+
const baseDir = path.join(publicRoot, 'error-pages');
|
|
47
|
+
const rawRelative = urlPath.slice('/error-pages/'.length);
|
|
48
|
+
const normalizedRelative = tryDecodeURIComponent(rawRelative).replaceAll('\\', '/');
|
|
49
|
+
const filePath = resolveSafePath(baseDir, normalizedRelative);
|
|
50
|
+
if (filePath === undefined) {
|
|
51
|
+
response.setStatus(404);
|
|
52
|
+
response.setHeader(HTTP_HEADERS.CONTENT_TYPE, MIME_TYPES.TEXT);
|
|
53
|
+
response.send('Not Found');
|
|
54
|
+
return true;
|
|
55
|
+
}
|
|
56
|
+
try {
|
|
57
|
+
if (fs.existsSync(filePath) && fs.statSync(filePath).isDirectory()) {
|
|
58
|
+
response.setStatus(404);
|
|
59
|
+
response.setHeader(HTTP_HEADERS.CONTENT_TYPE, MIME_TYPES.TEXT);
|
|
60
|
+
response.send('Not Found');
|
|
61
|
+
return true;
|
|
62
|
+
}
|
|
63
|
+
if (!fs.existsSync(filePath)) {
|
|
64
|
+
response.setStatus(404);
|
|
65
|
+
response.setHeader(HTTP_HEADERS.CONTENT_TYPE, MIME_TYPES.TEXT);
|
|
66
|
+
response.send('Not Found');
|
|
67
|
+
return true;
|
|
68
|
+
}
|
|
69
|
+
const ext = path.extname(filePath).toLowerCase();
|
|
70
|
+
const contentType = MIME_TYPES_MAP[ext] || 'application/octet-stream';
|
|
71
|
+
const content = fs.readFileSync(filePath);
|
|
72
|
+
response.setStatus(200);
|
|
73
|
+
response.setHeader(HTTP_HEADERS.CONTENT_TYPE, contentType);
|
|
74
|
+
response.send(content);
|
|
75
|
+
return true;
|
|
76
|
+
}
|
|
77
|
+
catch (error) {
|
|
78
|
+
ErrorFactory.createTryCatchError(`Error serving error-pages file ${filePath}`, error);
|
|
79
|
+
response.setStatus(500);
|
|
80
|
+
response.setHeader(HTTP_HEADERS.CONTENT_TYPE, MIME_TYPES.TEXT);
|
|
81
|
+
response.send('Internal Server Error');
|
|
82
|
+
return true;
|
|
83
|
+
}
|
|
84
|
+
};
|
|
85
|
+
const handleErrorPagesRequest = (req, res) => {
|
|
86
|
+
const urlPath = req.getPath();
|
|
87
|
+
if (serveErrorPagesFile(urlPath, res))
|
|
88
|
+
return;
|
|
89
|
+
res.setStatus(404);
|
|
90
|
+
res.setHeader(HTTP_HEADERS.CONTENT_TYPE, MIME_TYPES.TEXT);
|
|
91
|
+
res.send('Not Found');
|
|
92
|
+
};
|
|
93
|
+
const handleZintrustSvgRequest = (_req, res) => {
|
|
94
|
+
servePublicRootFile('zintrust.svg', res, MIME_TYPES.SVG);
|
|
95
|
+
};
|
|
96
|
+
export const registerErrorPagesRoutes = (router) => {
|
|
97
|
+
Router.get(router, '/error-pages', handleErrorPagesRequest);
|
|
98
|
+
Router.get(router, '/error-pages/', handleErrorPagesRequest);
|
|
99
|
+
Router.get(router, '/error-pages/:path*', handleErrorPagesRequest);
|
|
100
|
+
// Used by the HTML error templates (logo in footer).
|
|
101
|
+
Router.get(router, '/zintrust.svg', handleZintrustSvgRequest);
|
|
102
|
+
};
|
|
103
|
+
export default { registerErrorPagesRoutes, serveErrorPagesFile };
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Public Root Resolution
|
|
3
|
+
* Determines where framework/app static assets live (public/ or dist/public).
|
|
4
|
+
*/
|
|
5
|
+
/**
|
|
6
|
+
* Find the package root directory.
|
|
7
|
+
*/
|
|
8
|
+
export declare const findPackageRoot: (startDir: string) => string;
|
|
9
|
+
/**
|
|
10
|
+
* Find the package root directory (async).
|
|
11
|
+
*/
|
|
12
|
+
export declare const findPackageRootAsync: (startDir: string) => Promise<string>;
|
|
13
|
+
/**
|
|
14
|
+
* Framework public roots (dist/public preferred).
|
|
15
|
+
*/
|
|
16
|
+
export declare const getFrameworkPublicRoots: () => string[];
|
|
17
|
+
export declare const getFrameworkPublicRootsAsync: () => Promise<string[]>;
|
|
18
|
+
/**
|
|
19
|
+
* Resolve the effective public root.
|
|
20
|
+
* Prefers app-local `public/` when present; otherwise falls back to framework public roots.
|
|
21
|
+
*/
|
|
22
|
+
export declare const getPublicRoot: () => string;
|
|
23
|
+
/**
|
|
24
|
+
* Resolve the effective public root (async).
|
|
25
|
+
*/
|
|
26
|
+
export declare const getPublicRootAsync: () => Promise<string>;
|
|
27
|
+
//# sourceMappingURL=publicRoot.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"publicRoot.d.ts","sourceRoot":"","sources":["../../../src/routing/publicRoot.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAMH;;GAEG;AACH,eAAO,MAAM,eAAe,GAAI,UAAU,MAAM,KAAG,MAalD,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,oBAAoB,GAAU,UAAU,MAAM,KAAG,OAAO,CAAC,MAAM,CAkB3E,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,uBAAuB,QAAO,MAAM,EAIhD,CAAC;AAEF,eAAO,MAAM,4BAA4B,QAAa,OAAO,CAAC,MAAM,EAAE,CAIrE,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,aAAa,QAAO,MAgBhC,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,kBAAkB,QAAa,OAAO,CAAC,MAAM,CA+BzD,CAAC"}
|
|
@@ -0,0 +1,110 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Public Root Resolution
|
|
3
|
+
* Determines where framework/app static assets live (public/ or dist/public).
|
|
4
|
+
*/
|
|
5
|
+
import { esmDirname } from '../common/index.js';
|
|
6
|
+
import * as fs from '../node-singletons/fs.js';
|
|
7
|
+
import * as path from '../node-singletons/path.js';
|
|
8
|
+
/**
|
|
9
|
+
* Find the package root directory.
|
|
10
|
+
*/
|
|
11
|
+
export const findPackageRoot = (startDir) => {
|
|
12
|
+
let current = startDir;
|
|
13
|
+
for (let i = 0; i < 10; i++) {
|
|
14
|
+
try {
|
|
15
|
+
if (fs.existsSync(path.join(current, 'package.json')))
|
|
16
|
+
return current;
|
|
17
|
+
}
|
|
18
|
+
catch {
|
|
19
|
+
// ignore access errors
|
|
20
|
+
}
|
|
21
|
+
const parent = path.dirname(current);
|
|
22
|
+
if (parent === current)
|
|
23
|
+
break;
|
|
24
|
+
current = parent;
|
|
25
|
+
}
|
|
26
|
+
return startDir;
|
|
27
|
+
};
|
|
28
|
+
/**
|
|
29
|
+
* Find the package root directory (async).
|
|
30
|
+
*/
|
|
31
|
+
export const findPackageRootAsync = async (startDir) => {
|
|
32
|
+
const findUp = async (current, depth) => {
|
|
33
|
+
if (depth >= 10)
|
|
34
|
+
return startDir;
|
|
35
|
+
try {
|
|
36
|
+
await fs.fsPromises.access(path.join(current, 'package.json'));
|
|
37
|
+
return current;
|
|
38
|
+
}
|
|
39
|
+
catch {
|
|
40
|
+
// ignore
|
|
41
|
+
}
|
|
42
|
+
const parent = path.dirname(current);
|
|
43
|
+
if (parent === current)
|
|
44
|
+
return startDir;
|
|
45
|
+
return findUp(parent, depth + 1);
|
|
46
|
+
};
|
|
47
|
+
return findUp(startDir, 0);
|
|
48
|
+
};
|
|
49
|
+
/**
|
|
50
|
+
* Framework public roots (dist/public preferred).
|
|
51
|
+
*/
|
|
52
|
+
export const getFrameworkPublicRoots = () => {
|
|
53
|
+
const thisDir = esmDirname(import.meta.url);
|
|
54
|
+
const packageRoot = findPackageRoot(thisDir);
|
|
55
|
+
return [path.join(packageRoot, 'dist/public'), path.join(packageRoot, 'public')];
|
|
56
|
+
};
|
|
57
|
+
export const getFrameworkPublicRootsAsync = async () => {
|
|
58
|
+
const thisDir = esmDirname(import.meta.url);
|
|
59
|
+
const packageRoot = await findPackageRootAsync(thisDir);
|
|
60
|
+
return [path.join(packageRoot, 'dist/public'), path.join(packageRoot, 'public')];
|
|
61
|
+
};
|
|
62
|
+
/**
|
|
63
|
+
* Resolve the effective public root.
|
|
64
|
+
* Prefers app-local `public/` when present; otherwise falls back to framework public roots.
|
|
65
|
+
*/
|
|
66
|
+
export const getPublicRoot = () => {
|
|
67
|
+
const appRoots = [path.join(process.cwd(), 'public')];
|
|
68
|
+
const candidates = [...appRoots, ...getFrameworkPublicRoots()];
|
|
69
|
+
// Prefer a root that contains an index.html (common for docs + dev portal).
|
|
70
|
+
const hasIndex = (root) => fs.existsSync(path.join(root, 'index.html'));
|
|
71
|
+
for (const candidate of candidates) {
|
|
72
|
+
if (fs.existsSync(candidate) && hasIndex(candidate))
|
|
73
|
+
return candidate;
|
|
74
|
+
}
|
|
75
|
+
for (const candidate of candidates) {
|
|
76
|
+
if (fs.existsSync(candidate))
|
|
77
|
+
return candidate;
|
|
78
|
+
}
|
|
79
|
+
return candidates[0];
|
|
80
|
+
};
|
|
81
|
+
/**
|
|
82
|
+
* Resolve the effective public root (async).
|
|
83
|
+
*/
|
|
84
|
+
export const getPublicRootAsync = async () => {
|
|
85
|
+
const appRoots = [path.join(process.cwd(), 'public')];
|
|
86
|
+
const fwRoots = await getFrameworkPublicRootsAsync();
|
|
87
|
+
const candidates = [...appRoots, ...fwRoots];
|
|
88
|
+
const exists = async (p) => {
|
|
89
|
+
try {
|
|
90
|
+
await fs.fsPromises.access(p);
|
|
91
|
+
return true;
|
|
92
|
+
}
|
|
93
|
+
catch {
|
|
94
|
+
return false;
|
|
95
|
+
}
|
|
96
|
+
};
|
|
97
|
+
const hasIndex = async (root) => exists(path.join(root, 'index.html'));
|
|
98
|
+
const checks = await Promise.all(candidates.map(async (candidate) => {
|
|
99
|
+
const rootExists = await exists(candidate);
|
|
100
|
+
const indexExists = rootExists ? await hasIndex(candidate) : false;
|
|
101
|
+
return { candidate, rootExists, indexExists };
|
|
102
|
+
}));
|
|
103
|
+
const withIndex = checks.find((c) => c.indexExists);
|
|
104
|
+
if (withIndex)
|
|
105
|
+
return withIndex.candidate;
|
|
106
|
+
const firstExisting = checks.find((c) => c.rootExists);
|
|
107
|
+
if (firstExisting)
|
|
108
|
+
return firstExisting.candidate;
|
|
109
|
+
return candidates[0];
|
|
110
|
+
};
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
type ImportResult = {
|
|
2
|
+
ok: true;
|
|
3
|
+
loadedPath: string;
|
|
4
|
+
} | {
|
|
5
|
+
ok: false;
|
|
6
|
+
loadedPath?: string;
|
|
7
|
+
reason: 'not-found' | 'import-failed';
|
|
8
|
+
errorMessage?: string;
|
|
9
|
+
};
|
|
10
|
+
export declare const PluginAutoImports: Readonly<{
|
|
11
|
+
/**
|
|
12
|
+
* Best-effort import of a project's `src/zintrust.plugins.ts` file.
|
|
13
|
+
*
|
|
14
|
+
* This file is generated/maintained by `zin plugin install` and contains
|
|
15
|
+
* side-effect imports (e.g. `@zintrust/db-mysql/register`) which register
|
|
16
|
+
* adapters/drivers into core registries.
|
|
17
|
+
*/
|
|
18
|
+
tryImportProjectAutoImports(): Promise<ImportResult>;
|
|
19
|
+
}>;
|
|
20
|
+
export {};
|
|
21
|
+
//# sourceMappingURL=PluginAutoImports.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"PluginAutoImports.d.ts","sourceRoot":"","sources":["../../../src/runtime/PluginAutoImports.ts"],"names":[],"mappings":"AAMA,KAAK,YAAY,GACb;IAAE,EAAE,EAAE,IAAI,CAAC;IAAC,UAAU,EAAE,MAAM,CAAA;CAAE,GAChC;IACE,EAAE,EAAE,KAAK,CAAC;IACV,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,MAAM,EAAE,WAAW,GAAG,eAAe,CAAC;IACtC,YAAY,CAAC,EAAE,MAAM,CAAC;CACvB,CAAC;AAmBN,eAAO,MAAM,iBAAiB;IAC5B;;;;;;OAMG;mCACkC,OAAO,CAAC,YAAY,CAAC;EAgC1D,CAAC"}
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
import { pathToFileURL } from '../node-singletons/url.js';
|
|
2
|
+
import { Logger } from '../config/logger.js';
|
|
3
|
+
import { ErrorFactory } from '../exceptions/ZintrustError.js';
|
|
4
|
+
import { existsSync } from '../node-singletons/fs.js';
|
|
5
|
+
import * as path from '../node-singletons/path.js';
|
|
6
|
+
const resolveProjectRoot = () => {
|
|
7
|
+
const fromEnv = process.env['ZINTRUST_PROJECT_ROOT'];
|
|
8
|
+
if (typeof fromEnv === 'string' && fromEnv.trim().length > 0)
|
|
9
|
+
return fromEnv.trim();
|
|
10
|
+
return process.cwd();
|
|
11
|
+
};
|
|
12
|
+
const getCandidates = (projectRoot) => {
|
|
13
|
+
return [
|
|
14
|
+
// Dev (tsx)
|
|
15
|
+
path.join(projectRoot, 'src', 'zintrust.plugins.ts'),
|
|
16
|
+
// Production build output (most common)
|
|
17
|
+
path.join(projectRoot, 'dist', 'src', 'zintrust.plugins.js'),
|
|
18
|
+
// Fallback (in case someone transpiles without /dist)
|
|
19
|
+
path.join(projectRoot, 'src', 'zintrust.plugins.js'),
|
|
20
|
+
];
|
|
21
|
+
};
|
|
22
|
+
export const PluginAutoImports = Object.freeze({
|
|
23
|
+
/**
|
|
24
|
+
* Best-effort import of a project's `src/zintrust.plugins.ts` file.
|
|
25
|
+
*
|
|
26
|
+
* This file is generated/maintained by `zin plugin install` and contains
|
|
27
|
+
* side-effect imports (e.g. `@zintrust/db-mysql/register`) which register
|
|
28
|
+
* adapters/drivers into core registries.
|
|
29
|
+
*/
|
|
30
|
+
async tryImportProjectAutoImports() {
|
|
31
|
+
const projectRoot = resolveProjectRoot();
|
|
32
|
+
const candidates = getCandidates(projectRoot);
|
|
33
|
+
for (const candidate of candidates) {
|
|
34
|
+
if (!existsSync(candidate))
|
|
35
|
+
continue;
|
|
36
|
+
try {
|
|
37
|
+
const url = pathToFileURL(candidate).href;
|
|
38
|
+
// eslint-disable-next-line no-await-in-loop
|
|
39
|
+
await import(url);
|
|
40
|
+
return { ok: true, loadedPath: candidate };
|
|
41
|
+
}
|
|
42
|
+
catch (error) {
|
|
43
|
+
const errorMessage = error instanceof Error ? error.message : String(error);
|
|
44
|
+
Logger.warn('[plugins] Failed to import plugin auto-imports', {
|
|
45
|
+
candidate,
|
|
46
|
+
errorMessage,
|
|
47
|
+
});
|
|
48
|
+
// Keep error creation for consistent structure (but do not throw).
|
|
49
|
+
ErrorFactory.createTryCatchError('Failed to import project plugin auto-imports', {
|
|
50
|
+
candidate,
|
|
51
|
+
error,
|
|
52
|
+
});
|
|
53
|
+
return { ok: false, loadedPath: candidate, reason: 'import-failed', errorMessage };
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
Logger.debug('[plugins] No plugin auto-imports file found', { projectRoot, candidates });
|
|
57
|
+
return { ok: false, reason: 'not-found' };
|
|
58
|
+
},
|
|
59
|
+
});
|
|
@@ -1,8 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
* Plugin Manager
|
|
3
|
-
* Handles installation and removal of framework plugins.
|
|
4
|
-
*/
|
|
5
|
-
import { PluginDefinition } from './PluginRegistry';
|
|
1
|
+
import type { PluginDefinition } from './PluginRegistry';
|
|
6
2
|
export declare const PluginManager: Readonly<{
|
|
7
3
|
/**
|
|
8
4
|
* List all available plugins
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PluginManager.d.ts","sourceRoot":"","sources":["../../../src/runtime/PluginManager.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"PluginManager.d.ts","sourceRoot":"","sources":["../../../src/runtime/PluginManager.ts"],"names":[],"mappings":"AAcA,OAAO,KAAK,EAAE,gBAAgB,EAAC,MAAM,yBAAyB,CAAC;AA0R/D,eAAO,MAAM,aAAa;IACxB;;OAEG;YACK,MAAM,CAAC,MAAM,EAAE,gBAAgB,CAAC;IAIxC;;OAEG;yBACkB,MAAM,GAAG,MAAM,GAAG,IAAI;IAW3C;;OAEG;0BACyB,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC;IA0DrD;;OAEG;sBACqB,MAAM,YAAY;QAAE,cAAc,CAAC,EAAE,MAAM,CAAA;KAAE,GAAG,OAAO,CAAC,IAAI,CAAC;IA8BrF;;;;OAIG;wBACuB,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;EA2ChD,CAAC"}
|