@zintrust/core 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bin/z.d.ts +7 -0
- package/bin/z.d.ts.map +1 -0
- package/bin/z.js +6 -0
- package/bin/zin.d.ts +7 -0
- package/bin/zin.d.ts.map +1 -0
- package/bin/zin.js +6 -0
- package/bin/zintrust-microservices.d.ts +7 -0
- package/bin/zintrust-microservices.d.ts.map +1 -0
- package/bin/zintrust-microservices.js +165 -0
- package/bin/zintrust.d.ts +9 -0
- package/bin/zintrust.d.ts.map +1 -0
- package/bin/zintrust.js +51 -0
- package/bin/zt.d.ts +7 -0
- package/bin/zt.d.ts.map +1 -0
- package/bin/zt.js +6 -0
- package/package.json +80 -0
- package/src/boot/Application.d.ts +31 -0
- package/src/boot/Application.d.ts.map +1 -0
- package/src/boot/Application.js +159 -0
- package/src/boot/Server.d.ts +23 -0
- package/src/boot/Server.d.ts.map +1 -0
- package/src/boot/Server.js +236 -0
- package/src/boot/bootstrap.d.ts +7 -0
- package/src/boot/bootstrap.d.ts.map +1 -0
- package/src/boot/bootstrap.js +64 -0
- package/src/builder/BundleOptimizer.d.ts +42 -0
- package/src/builder/BundleOptimizer.d.ts.map +1 -0
- package/src/builder/BundleOptimizer.js +356 -0
- package/src/cache/Cache.d.ts +26 -0
- package/src/cache/Cache.d.ts.map +1 -0
- package/src/cache/Cache.js +89 -0
- package/src/cache/CacheDriver.d.ts +28 -0
- package/src/cache/CacheDriver.d.ts.map +1 -0
- package/src/cache/CacheDriver.js +6 -0
- package/src/cache/drivers/KVDriver.d.ts +12 -0
- package/src/cache/drivers/KVDriver.d.ts.map +1 -0
- package/src/cache/drivers/KVDriver.js +54 -0
- package/src/cache/drivers/MemoryDriver.d.ts +12 -0
- package/src/cache/drivers/MemoryDriver.d.ts.map +1 -0
- package/src/cache/drivers/MemoryDriver.js +50 -0
- package/src/cache/drivers/MongoDriver.d.ts +17 -0
- package/src/cache/drivers/MongoDriver.d.ts.map +1 -0
- package/src/cache/drivers/MongoDriver.js +80 -0
- package/src/cache/drivers/RedisDriver.d.ts +12 -0
- package/src/cache/drivers/RedisDriver.d.ts.map +1 -0
- package/src/cache/drivers/RedisDriver.js +79 -0
- package/src/cli/BaseCommand.d.ts +39 -0
- package/src/cli/BaseCommand.d.ts.map +1 -0
- package/src/cli/BaseCommand.js +58 -0
- package/src/cli/CLI.d.ts +21 -0
- package/src/cli/CLI.d.ts.map +1 -0
- package/src/cli/CLI.js +203 -0
- package/src/cli/ErrorHandler.d.ts +23 -0
- package/src/cli/ErrorHandler.d.ts.map +1 -0
- package/src/cli/ErrorHandler.js +95 -0
- package/src/cli/PromptHelper.d.ts +47 -0
- package/src/cli/PromptHelper.d.ts.map +1 -0
- package/src/cli/PromptHelper.js +155 -0
- package/src/cli/commands/AddCommand.d.ts +15 -0
- package/src/cli/commands/AddCommand.d.ts.map +1 -0
- package/src/cli/commands/AddCommand.js +817 -0
- package/src/cli/commands/ConfigCommand.d.ts +15 -0
- package/src/cli/commands/ConfigCommand.d.ts.map +1 -0
- package/src/cli/commands/ConfigCommand.js +273 -0
- package/src/cli/commands/D1MigrateCommand.d.ts +15 -0
- package/src/cli/commands/D1MigrateCommand.d.ts.map +1 -0
- package/src/cli/commands/D1MigrateCommand.js +73 -0
- package/src/cli/commands/DebugCommand.d.ts +15 -0
- package/src/cli/commands/DebugCommand.d.ts.map +1 -0
- package/src/cli/commands/DebugCommand.js +52 -0
- package/src/cli/commands/FixCommand.d.ts +15 -0
- package/src/cli/commands/FixCommand.d.ts.map +1 -0
- package/src/cli/commands/FixCommand.js +80 -0
- package/src/cli/commands/KeyGenerateCommand.d.ts +9 -0
- package/src/cli/commands/KeyGenerateCommand.d.ts.map +1 -0
- package/src/cli/commands/KeyGenerateCommand.js +76 -0
- package/src/cli/commands/LogsCommand.d.ts +19 -0
- package/src/cli/commands/LogsCommand.d.ts.map +1 -0
- package/src/cli/commands/LogsCommand.js +185 -0
- package/src/cli/commands/MigrateCommand.d.ts +15 -0
- package/src/cli/commands/MigrateCommand.d.ts.map +1 -0
- package/src/cli/commands/MigrateCommand.js +56 -0
- package/src/cli/commands/NewCommand.d.ts +32 -0
- package/src/cli/commands/NewCommand.d.ts.map +1 -0
- package/src/cli/commands/NewCommand.js +280 -0
- package/src/cli/commands/PluginCommand.d.ts +9 -0
- package/src/cli/commands/PluginCommand.d.ts.map +1 -0
- package/src/cli/commands/PluginCommand.js +94 -0
- package/src/cli/commands/PrepareCommand.d.ts +8 -0
- package/src/cli/commands/PrepareCommand.d.ts.map +1 -0
- package/src/cli/commands/PrepareCommand.js +51 -0
- package/src/cli/commands/QACommand.d.ts +33 -0
- package/src/cli/commands/QACommand.d.ts.map +1 -0
- package/src/cli/commands/QACommand.js +490 -0
- package/src/cli/commands/SimulateCommand.d.ts +12 -0
- package/src/cli/commands/SimulateCommand.d.ts.map +1 -0
- package/src/cli/commands/SimulateCommand.js +79 -0
- package/src/cli/commands/StartCommand.d.ts +5 -0
- package/src/cli/commands/StartCommand.d.ts.map +1 -0
- package/src/cli/commands/StartCommand.js +227 -0
- package/src/cli/commands/index.d.ts +11 -0
- package/src/cli/commands/index.d.ts.map +1 -0
- package/src/cli/commands/index.js +10 -0
- package/src/cli/config/ConfigManager.d.ts +42 -0
- package/src/cli/config/ConfigManager.d.ts.map +1 -0
- package/src/cli/config/ConfigManager.js +175 -0
- package/src/cli/config/ConfigSchema.d.ts +195 -0
- package/src/cli/config/ConfigSchema.d.ts.map +1 -0
- package/src/cli/config/ConfigSchema.js +171 -0
- package/src/cli/config/ConfigValidator.d.ts +41 -0
- package/src/cli/config/ConfigValidator.d.ts.map +1 -0
- package/src/cli/config/ConfigValidator.js +200 -0
- package/src/cli/config/index.d.ts +8 -0
- package/src/cli/config/index.d.ts.map +1 -0
- package/src/cli/config/index.js +7 -0
- package/src/cli/debug/Dashboard.d.ts +34 -0
- package/src/cli/debug/Dashboard.d.ts.map +1 -0
- package/src/cli/debug/Dashboard.js +152 -0
- package/src/cli/index.d.ts +14 -0
- package/src/cli/index.d.ts.map +1 -0
- package/src/cli/index.js +14 -0
- package/src/cli/logger/Logger.d.ts +43 -0
- package/src/cli/logger/Logger.d.ts.map +1 -0
- package/src/cli/logger/Logger.js +137 -0
- package/src/cli/scaffolding/ControllerGenerator.d.ts +44 -0
- package/src/cli/scaffolding/ControllerGenerator.d.ts.map +1 -0
- package/src/cli/scaffolding/ControllerGenerator.js +540 -0
- package/src/cli/scaffolding/FactoryGenerator.d.ts +47 -0
- package/src/cli/scaffolding/FactoryGenerator.d.ts.map +1 -0
- package/src/cli/scaffolding/FactoryGenerator.js +356 -0
- package/src/cli/scaffolding/FeatureScaffolder.d.ts +40 -0
- package/src/cli/scaffolding/FeatureScaffolder.d.ts.map +1 -0
- package/src/cli/scaffolding/FeatureScaffolder.js +747 -0
- package/src/cli/scaffolding/FileGenerator.d.ts +31 -0
- package/src/cli/scaffolding/FileGenerator.d.ts.map +1 -0
- package/src/cli/scaffolding/FileGenerator.js +222 -0
- package/src/cli/scaffolding/MigrationGenerator.d.ts +35 -0
- package/src/cli/scaffolding/MigrationGenerator.d.ts.map +1 -0
- package/src/cli/scaffolding/MigrationGenerator.js +257 -0
- package/src/cli/scaffolding/ModelGenerator.d.ts +81 -0
- package/src/cli/scaffolding/ModelGenerator.d.ts.map +1 -0
- package/src/cli/scaffolding/ModelGenerator.js +249 -0
- package/src/cli/scaffolding/ProjectScaffolder.d.ts +66 -0
- package/src/cli/scaffolding/ProjectScaffolder.d.ts.map +1 -0
- package/src/cli/scaffolding/ProjectScaffolder.js +439 -0
- package/src/cli/scaffolding/RequestFactoryGenerator.d.ts +50 -0
- package/src/cli/scaffolding/RequestFactoryGenerator.d.ts.map +1 -0
- package/src/cli/scaffolding/RequestFactoryGenerator.js +465 -0
- package/src/cli/scaffolding/ResponseFactoryGenerator.d.ts +43 -0
- package/src/cli/scaffolding/ResponseFactoryGenerator.d.ts.map +1 -0
- package/src/cli/scaffolding/ResponseFactoryGenerator.js +321 -0
- package/src/cli/scaffolding/RouteGenerator.d.ts +66 -0
- package/src/cli/scaffolding/RouteGenerator.d.ts.map +1 -0
- package/src/cli/scaffolding/RouteGenerator.js +306 -0
- package/src/cli/scaffolding/SeederGenerator.d.ts +47 -0
- package/src/cli/scaffolding/SeederGenerator.d.ts.map +1 -0
- package/src/cli/scaffolding/SeederGenerator.js +286 -0
- package/src/cli/scaffolding/ServiceIntegrationTestGenerator.d.ts +40 -0
- package/src/cli/scaffolding/ServiceIntegrationTestGenerator.d.ts.map +1 -0
- package/src/cli/scaffolding/ServiceIntegrationTestGenerator.js +267 -0
- package/src/cli/scaffolding/ServiceRequestFactoryGenerator.d.ts +45 -0
- package/src/cli/scaffolding/ServiceRequestFactoryGenerator.d.ts.map +1 -0
- package/src/cli/scaffolding/ServiceRequestFactoryGenerator.js +397 -0
- package/src/cli/scaffolding/ServiceScaffolder.d.ts +45 -0
- package/src/cli/scaffolding/ServiceScaffolder.d.ts.map +1 -0
- package/src/cli/scaffolding/ServiceScaffolder.js +367 -0
- package/src/cli/scaffolding/TemplateEngine.d.ts +35 -0
- package/src/cli/scaffolding/TemplateEngine.d.ts.map +1 -0
- package/src/cli/scaffolding/TemplateEngine.js +379 -0
- package/src/cli/scaffolding/WorkflowGenerator.d.ts +31 -0
- package/src/cli/scaffolding/WorkflowGenerator.d.ts.map +1 -0
- package/src/cli/scaffolding/WorkflowGenerator.js +193 -0
- package/src/cli/scaffolding/index.d.ts +34 -0
- package/src/cli/scaffolding/index.d.ts.map +1 -0
- package/src/cli/scaffolding/index.js +18 -0
- package/src/cli/utils/DistPackager.d.ts +8 -0
- package/src/cli/utils/DistPackager.d.ts.map +1 -0
- package/src/cli/utils/DistPackager.js +94 -0
- package/src/cli/utils/EnvFileLoader.d.ts +21 -0
- package/src/cli/utils/EnvFileLoader.d.ts.map +1 -0
- package/src/cli/utils/EnvFileLoader.js +166 -0
- package/src/cli/utils/spawn.d.ts +11 -0
- package/src/cli/utils/spawn.d.ts.map +1 -0
- package/src/cli/utils/spawn.js +81 -0
- package/src/common/index.d.ts +87 -0
- package/src/common/index.d.ts.map +1 -0
- package/src/common/index.js +207 -0
- package/src/config/SecretsManager.d.ts +122 -0
- package/src/config/SecretsManager.d.ts.map +1 -0
- package/src/config/SecretsManager.js +328 -0
- package/src/config/app.d.ts +56 -0
- package/src/config/app.d.ts.map +1 -0
- package/src/config/app.js +77 -0
- package/src/config/cache.d.ts +76 -0
- package/src/config/cache.d.ts.map +1 -0
- package/src/config/cache.js +62 -0
- package/src/config/constants.d.ts +108 -0
- package/src/config/constants.d.ts.map +1 -0
- package/src/config/constants.js +64 -0
- package/src/config/database.d.ts +122 -0
- package/src/config/database.d.ts.map +1 -0
- package/src/config/database.js +89 -0
- package/src/config/env.d.ts +56 -0
- package/src/config/env.d.ts.map +1 -0
- package/src/config/env.js +133 -0
- package/src/config/features.d.ts +27 -0
- package/src/config/features.d.ts.map +1 -0
- package/src/config/features.js +49 -0
- package/src/config/index.d.ts +554 -0
- package/src/config/index.d.ts.map +1 -0
- package/src/config/index.js +31 -0
- package/src/config/logger.d.ts +17 -0
- package/src/config/logger.d.ts.map +1 -0
- package/src/config/logger.js +77 -0
- package/src/config/microservices.d.ts +88 -0
- package/src/config/microservices.d.ts.map +1 -0
- package/src/config/microservices.js +90 -0
- package/src/config/queue.d.ts +107 -0
- package/src/config/queue.d.ts.map +1 -0
- package/src/config/queue.js +74 -0
- package/src/config/security.d.ts +108 -0
- package/src/config/security.d.ts.map +1 -0
- package/src/config/security.js +134 -0
- package/src/config/storage.d.ts +105 -0
- package/src/config/storage.d.ts.map +1 -0
- package/src/config/storage.js +79 -0
- package/src/container/ServiceContainer.d.ts +25 -0
- package/src/container/ServiceContainer.d.ts.map +1 -0
- package/src/container/ServiceContainer.js +75 -0
- package/src/database/migrations/index.d.ts +2 -0
- package/src/database/migrations/index.d.ts.map +1 -0
- package/src/database/migrations/index.js +1 -0
- package/src/exceptions/ZintrustError.d.ts +88 -0
- package/src/exceptions/ZintrustError.d.ts.map +1 -0
- package/src/exceptions/ZintrustError.js +110 -0
- package/src/features/Auth.d.ts +20 -0
- package/src/features/Auth.d.ts.map +1 -0
- package/src/features/Auth.js +32 -0
- package/src/features/Queue.d.ts +21 -0
- package/src/features/Queue.d.ts.map +1 -0
- package/src/features/Queue.js +59 -0
- package/src/functions/cloudflare.d.ts +5 -0
- package/src/functions/cloudflare.d.ts.map +1 -0
- package/src/functions/cloudflare.js +34 -0
- package/src/functions/deno.d.ts +3 -0
- package/src/functions/deno.d.ts.map +1 -0
- package/src/functions/deno.js +31 -0
- package/src/functions/lambda.d.ts +2 -0
- package/src/functions/lambda.d.ts.map +1 -0
- package/src/functions/lambda.js +32 -0
- package/src/http/Controller.d.ts +20 -0
- package/src/http/Controller.d.ts.map +1 -0
- package/src/http/Controller.js +46 -0
- package/src/http/Kernel.d.ts +24 -0
- package/src/http/Kernel.d.ts.map +1 -0
- package/src/http/Kernel.js +72 -0
- package/src/http/Request.d.ts +36 -0
- package/src/http/Request.d.ts.map +1 -0
- package/src/http/Request.js +142 -0
- package/src/http/Response.d.ts +32 -0
- package/src/http/Response.d.ts.map +1 -0
- package/src/http/Response.js +70 -0
- package/src/index.d.ts +43 -0
- package/src/index.d.ts.map +1 -0
- package/src/index.js +37 -0
- package/src/microservices/MicroserviceBootstrap.d.ts +75 -0
- package/src/microservices/MicroserviceBootstrap.d.ts.map +1 -0
- package/src/microservices/MicroserviceBootstrap.js +285 -0
- package/src/microservices/MicroserviceGenerator.d.ts +27 -0
- package/src/microservices/MicroserviceGenerator.d.ts.map +1 -0
- package/src/microservices/MicroserviceGenerator.js +436 -0
- package/src/microservices/MicroserviceManager.d.ts +68 -0
- package/src/microservices/MicroserviceManager.d.ts.map +1 -0
- package/src/microservices/MicroserviceManager.js +266 -0
- package/src/microservices/PostgresAdapter.d.ts +90 -0
- package/src/microservices/PostgresAdapter.d.ts.map +1 -0
- package/src/microservices/PostgresAdapter.js +286 -0
- package/src/microservices/RequestTracingMiddleware.d.ts +41 -0
- package/src/microservices/RequestTracingMiddleware.d.ts.map +1 -0
- package/src/microservices/RequestTracingMiddleware.js +122 -0
- package/src/microservices/ServiceAuthMiddleware.d.ts +58 -0
- package/src/microservices/ServiceAuthMiddleware.d.ts.map +1 -0
- package/src/microservices/ServiceAuthMiddleware.js +240 -0
- package/src/microservices/ServiceBundler.d.ts +45 -0
- package/src/microservices/ServiceBundler.d.ts.map +1 -0
- package/src/microservices/ServiceBundler.js +297 -0
- package/src/microservices/ServiceHealthMonitor.d.ts +96 -0
- package/src/microservices/ServiceHealthMonitor.d.ts.map +1 -0
- package/src/microservices/ServiceHealthMonitor.js +379 -0
- package/src/middleware/CsrfMiddleware.d.ts +19 -0
- package/src/middleware/CsrfMiddleware.d.ts.map +1 -0
- package/src/middleware/CsrfMiddleware.js +121 -0
- package/src/middleware/MiddlewareStack.d.ts +27 -0
- package/src/middleware/MiddlewareStack.d.ts.map +1 -0
- package/src/middleware/MiddlewareStack.js +43 -0
- package/src/middleware/RateLimiter.d.ts +22 -0
- package/src/middleware/RateLimiter.d.ts.map +1 -0
- package/src/middleware/RateLimiter.js +72 -0
- package/src/middleware/SecurityMiddleware.d.ts +33 -0
- package/src/middleware/SecurityMiddleware.d.ts.map +1 -0
- package/src/middleware/SecurityMiddleware.js +106 -0
- package/src/middleware/index.d.ts +9 -0
- package/src/middleware/index.d.ts.map +1 -0
- package/src/middleware/index.js +8 -0
- package/src/node-singletons/child-process.d.ts +7 -0
- package/src/node-singletons/child-process.d.ts.map +1 -0
- package/src/node-singletons/child-process.js +6 -0
- package/src/node-singletons/crypto.d.ts +7 -0
- package/src/node-singletons/crypto.d.ts.map +1 -0
- package/src/node-singletons/crypto.js +6 -0
- package/src/node-singletons/events.d.ts +7 -0
- package/src/node-singletons/events.d.ts.map +1 -0
- package/src/node-singletons/events.js +6 -0
- package/src/node-singletons/fs.d.ts +12 -0
- package/src/node-singletons/fs.d.ts.map +1 -0
- package/src/node-singletons/fs.js +14 -0
- package/src/node-singletons/http.d.ts +8 -0
- package/src/node-singletons/http.d.ts.map +1 -0
- package/src/node-singletons/http.js +6 -0
- package/src/node-singletons/index.d.ts +30 -0
- package/src/node-singletons/index.d.ts.map +1 -0
- package/src/node-singletons/index.js +31 -0
- package/src/node-singletons/os.d.ts +9 -0
- package/src/node-singletons/os.d.ts.map +1 -0
- package/src/node-singletons/os.js +9 -0
- package/src/node-singletons/path.d.ts +7 -0
- package/src/node-singletons/path.d.ts.map +1 -0
- package/src/node-singletons/path.js +6 -0
- package/src/node-singletons/perf-hooks.d.ts +7 -0
- package/src/node-singletons/perf-hooks.d.ts.map +1 -0
- package/src/node-singletons/perf-hooks.js +6 -0
- package/src/node-singletons/readline.d.ts +10 -0
- package/src/node-singletons/readline.d.ts.map +1 -0
- package/src/node-singletons/readline.js +9 -0
- package/src/node-singletons/url.d.ts +7 -0
- package/src/node-singletons/url.d.ts.map +1 -0
- package/src/node-singletons/url.js +6 -0
- package/src/orm/ConnectionManager.d.ts +118 -0
- package/src/orm/ConnectionManager.d.ts.map +1 -0
- package/src/orm/ConnectionManager.js +401 -0
- package/src/orm/Database.d.ts +31 -0
- package/src/orm/Database.d.ts.map +1 -0
- package/src/orm/Database.js +163 -0
- package/src/orm/DatabaseAdapter.d.ts +96 -0
- package/src/orm/DatabaseAdapter.d.ts.map +1 -0
- package/src/orm/DatabaseAdapter.js +40 -0
- package/src/orm/Model.d.ts +91 -0
- package/src/orm/Model.d.ts.map +1 -0
- package/src/orm/Model.js +206 -0
- package/src/orm/QueryBuilder.d.ts +52 -0
- package/src/orm/QueryBuilder.d.ts.map +1 -0
- package/src/orm/QueryBuilder.js +134 -0
- package/src/orm/Relationships.d.ts +53 -0
- package/src/orm/Relationships.d.ts.map +1 -0
- package/src/orm/Relationships.js +98 -0
- package/src/orm/Schema.d.ts +123 -0
- package/src/orm/Schema.d.ts.map +1 -0
- package/src/orm/Schema.js +169 -0
- package/src/orm/adapters/D1Adapter.d.ts +15 -0
- package/src/orm/adapters/D1Adapter.d.ts.map +1 -0
- package/src/orm/adapters/D1Adapter.js +125 -0
- package/src/orm/adapters/MySQLAdapter.d.ts +16 -0
- package/src/orm/adapters/MySQLAdapter.d.ts.map +1 -0
- package/src/orm/adapters/MySQLAdapter.js +87 -0
- package/src/orm/adapters/PostgreSQLAdapter.d.ts +16 -0
- package/src/orm/adapters/PostgreSQLAdapter.d.ts.map +1 -0
- package/src/orm/adapters/PostgreSQLAdapter.js +87 -0
- package/src/orm/adapters/SQLServerAdapter.d.ts +16 -0
- package/src/orm/adapters/SQLServerAdapter.d.ts.map +1 -0
- package/src/orm/adapters/SQLServerAdapter.js +81 -0
- package/src/orm/adapters/SQLiteAdapter.d.ts +11 -0
- package/src/orm/adapters/SQLiteAdapter.d.ts.map +1 -0
- package/src/orm/adapters/SQLiteAdapter.js +131 -0
- package/src/performance/Benchmark.d.ts +87 -0
- package/src/performance/Benchmark.d.ts.map +1 -0
- package/src/performance/Benchmark.js +304 -0
- package/src/performance/CodeGenerationBenchmark.d.ts +23 -0
- package/src/performance/CodeGenerationBenchmark.d.ts.map +1 -0
- package/src/performance/CodeGenerationBenchmark.js +249 -0
- package/src/performance/Optimizer.d.ts +99 -0
- package/src/performance/Optimizer.d.ts.map +1 -0
- package/src/performance/Optimizer.js +396 -0
- package/src/performance/establish-baseline.d.ts +9 -0
- package/src/performance/establish-baseline.d.ts.map +1 -0
- package/src/performance/establish-baseline.js +55 -0
- package/src/profiling/MemoryProfiler.d.ts +32 -0
- package/src/profiling/MemoryProfiler.d.ts.map +1 -0
- package/src/profiling/MemoryProfiler.js +84 -0
- package/src/profiling/N1Detector.d.ts +16 -0
- package/src/profiling/N1Detector.d.ts.map +1 -0
- package/src/profiling/N1Detector.js +120 -0
- package/src/profiling/QueryLogger.d.ts +107 -0
- package/src/profiling/QueryLogger.d.ts.map +1 -0
- package/src/profiling/QueryLogger.js +148 -0
- package/src/profiling/RequestProfiler.d.ts +30 -0
- package/src/profiling/RequestProfiler.d.ts.map +1 -0
- package/src/profiling/RequestProfiler.js +94 -0
- package/src/profiling/types.d.ts +77 -0
- package/src/profiling/types.d.ts.map +1 -0
- package/src/profiling/types.js +5 -0
- package/src/routing/Router.d.ts +52 -0
- package/src/routing/Router.d.ts.map +1 -0
- package/src/routing/Router.js +191 -0
- package/src/runtime/PluginManager.d.ts +30 -0
- package/src/runtime/PluginManager.d.ts.map +1 -0
- package/src/runtime/PluginManager.js +197 -0
- package/src/runtime/PluginRegistry.d.ts +22 -0
- package/src/runtime/PluginRegistry.d.ts.map +1 -0
- package/src/runtime/PluginRegistry.js +93 -0
- package/src/runtime/RuntimeAdapter.d.ts +126 -0
- package/src/runtime/RuntimeAdapter.d.ts.map +1 -0
- package/src/runtime/RuntimeAdapter.js +127 -0
- package/src/runtime/RuntimeDetector.d.ts +15 -0
- package/src/runtime/RuntimeDetector.d.ts.map +1 -0
- package/src/runtime/RuntimeDetector.js +219 -0
- package/src/runtime/adapters/CloudflareAdapter.d.ts +43 -0
- package/src/runtime/adapters/CloudflareAdapter.d.ts.map +1 -0
- package/src/runtime/adapters/CloudflareAdapter.js +175 -0
- package/src/runtime/adapters/DenoAdapter.d.ts +30 -0
- package/src/runtime/adapters/DenoAdapter.d.ts.map +1 -0
- package/src/runtime/adapters/DenoAdapter.js +191 -0
- package/src/runtime/adapters/FargateAdapter.d.ts +40 -0
- package/src/runtime/adapters/FargateAdapter.d.ts.map +1 -0
- package/src/runtime/adapters/FargateAdapter.js +156 -0
- package/src/runtime/adapters/LambdaAdapter.d.ts +13 -0
- package/src/runtime/adapters/LambdaAdapter.d.ts.map +1 -0
- package/src/runtime/adapters/LambdaAdapter.js +302 -0
- package/src/runtime/adapters/NodeServerAdapter.d.ts +16 -0
- package/src/runtime/adapters/NodeServerAdapter.d.ts.map +1 -0
- package/src/runtime/adapters/NodeServerAdapter.js +199 -0
- package/src/scripts/TemplateSync.d.ts +7 -0
- package/src/scripts/TemplateSync.d.ts.map +1 -0
- package/src/scripts/TemplateSync.js +234 -0
- package/src/security/CsrfTokenManager.d.ts +28 -0
- package/src/security/CsrfTokenManager.d.ts.map +1 -0
- package/src/security/CsrfTokenManager.js +78 -0
- package/src/security/Encryptor.d.ts +15 -0
- package/src/security/Encryptor.d.ts.map +1 -0
- package/src/security/Encryptor.js +142 -0
- package/src/security/JwtManager.d.ts +41 -0
- package/src/security/JwtManager.d.ts.map +1 -0
- package/src/security/JwtManager.js +229 -0
- package/src/security/UrlValidator.d.ts +21 -0
- package/src/security/UrlValidator.d.ts.map +1 -0
- package/src/security/UrlValidator.js +42 -0
- package/src/security/XssProtection.d.ts +24 -0
- package/src/security/XssProtection.d.ts.map +1 -0
- package/src/security/XssProtection.js +133 -0
- package/src/templates/TemplateRegistry.d.ts +40 -0
- package/src/templates/TemplateRegistry.d.ts.map +1 -0
- package/src/templates/TemplateRegistry.js +78 -0
- package/src/templates/TemplateRegistry.ts +91 -0
- package/src/templates/adapters/MySQLAdapter.ts.tpl +97 -0
- package/src/templates/adapters/PostgreSQLAdapter.ts.tpl +101 -0
- package/src/templates/adapters/SQLServerAdapter.ts.tpl +95 -0
- package/src/templates/adapters/SQLiteAdapter.ts.tpl +189 -0
- package/src/templates/features/Auth.ts.tpl +40 -0
- package/src/templates/features/Queue.ts.tpl +75 -0
- package/src/templates/project/basic/.env.example.tpl +26 -0
- package/src/templates/project/basic/.env.tpl +164 -0
- package/src/templates/project/basic/README.md.tpl +13 -0
- package/src/templates/project/basic/app/Controllers/UserController.ts.tpl +155 -0
- package/src/templates/project/basic/app/Middleware/ProfilerMiddleware.ts.tpl +55 -0
- package/src/templates/project/basic/app/Middleware/index.ts.tpl +304 -0
- package/src/templates/project/basic/app/Models/Post.ts.tpl +30 -0
- package/src/templates/project/basic/app/Models/User.ts.tpl +53 -0
- package/src/templates/project/basic/config/SecretsManager.ts.tpl +453 -0
- package/src/templates/project/basic/config/app.ts.tpl +97 -0
- package/src/templates/project/basic/config/cache.ts.tpl +117 -0
- package/src/templates/project/basic/config/constants.ts.tpl +70 -0
- package/src/templates/project/basic/config/database.ts.tpl +152 -0
- package/src/templates/project/basic/config/env.ts.tpl +148 -0
- package/src/templates/project/basic/config/features.ts.tpl +57 -0
- package/src/templates/project/basic/config/index.ts.tpl +36 -0
- package/src/templates/project/basic/config/logger.ts.tpl +95 -0
- package/src/templates/project/basic/config/microservices.ts.tpl +104 -0
- package/src/templates/project/basic/config/queue.ts.tpl +134 -0
- package/src/templates/project/basic/config/security.ts.tpl +149 -0
- package/src/templates/project/basic/config/storage.ts.tpl +136 -0
- package/src/templates/project/basic/database/factories/.gitkeep.tpl +0 -0
- package/src/templates/project/basic/database/migrations/.gitkeep.tpl +0 -0
- package/src/templates/project/basic/database/migrations/index.ts.tpl +2 -0
- package/src/templates/project/basic/database/seeders/.gitkeep.tpl +0 -0
- package/src/templates/project/basic/package.json.tpl +22 -0
- package/src/templates/project/basic/routes/api.ts.tpl +135 -0
- package/src/templates/project/basic/src/index.ts.tpl +49 -0
- package/src/templates/project/basic/template.json +17 -0
- package/src/templates/project/basic/tsconfig.json.tpl +20 -0
- package/src/validation/ValidationError.d.ts +42 -0
- package/src/validation/ValidationError.d.ts.map +1 -0
- package/src/validation/ValidationError.js +53 -0
- package/src/validation/Validator.d.ts +60 -0
- package/src/validation/Validator.d.ts.map +1 -0
- package/src/validation/Validator.js +190 -0
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { Application } from '../boot/Application';
|
|
2
|
+
import { Logger } from '../config/logger';
|
|
3
|
+
import { Kernel } from '../http/Kernel';
|
|
4
|
+
import { CloudflareAdapter } from '../runtime/adapters/CloudflareAdapter';
|
|
5
|
+
let kernel = null;
|
|
6
|
+
async function initializeKernel() {
|
|
7
|
+
if (kernel) {
|
|
8
|
+
return kernel;
|
|
9
|
+
}
|
|
10
|
+
const app = Application.create();
|
|
11
|
+
await app.boot();
|
|
12
|
+
kernel = Kernel.create(app.getRouter(), app.getContainer());
|
|
13
|
+
return kernel;
|
|
14
|
+
}
|
|
15
|
+
export default {
|
|
16
|
+
async fetch(request, _env, _ctx) {
|
|
17
|
+
try {
|
|
18
|
+
// Make bindings available to framework code in Workers
|
|
19
|
+
globalThis.env = _env;
|
|
20
|
+
const app = await initializeKernel();
|
|
21
|
+
const adapter = CloudflareAdapter.create({
|
|
22
|
+
handler: async (req, res) => {
|
|
23
|
+
await app.handle(req, res);
|
|
24
|
+
},
|
|
25
|
+
});
|
|
26
|
+
const platformResponse = await adapter.handle(request);
|
|
27
|
+
return adapter.formatResponse(platformResponse);
|
|
28
|
+
}
|
|
29
|
+
catch (error) {
|
|
30
|
+
Logger.error('Cloudflare handler error:', error);
|
|
31
|
+
return new Response('Internal Server Error', { status: 500 });
|
|
32
|
+
}
|
|
33
|
+
},
|
|
34
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"deno.d.ts","sourceRoot":"","sources":["../../../src/functions/deno.ts"],"names":[],"mappings":"AAqBA,QAAA,MAAM,IAAI,GAAU,SAAS,OAAO,KAAG,OAAO,CAAC,QAAQ,CAgBtD,CAAC;AAEF,eAAe,IAAI,CAAC"}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { Application } from '../boot/Application';
|
|
2
|
+
import { Logger } from '../config/logger';
|
|
3
|
+
import { Kernel } from '../http/Kernel';
|
|
4
|
+
import { DenoAdapter } from '../runtime/adapters/DenoAdapter';
|
|
5
|
+
let kernel = null;
|
|
6
|
+
async function initializeKernel() {
|
|
7
|
+
if (kernel) {
|
|
8
|
+
return kernel;
|
|
9
|
+
}
|
|
10
|
+
const app = Application.create();
|
|
11
|
+
await app.boot();
|
|
12
|
+
kernel = Kernel.create(app.getRouter(), app.getContainer());
|
|
13
|
+
return kernel;
|
|
14
|
+
}
|
|
15
|
+
const deno = async (request) => {
|
|
16
|
+
try {
|
|
17
|
+
const app = await initializeKernel();
|
|
18
|
+
const adapter = DenoAdapter.create({
|
|
19
|
+
handler: async (req, res) => {
|
|
20
|
+
await app.handle(req, res);
|
|
21
|
+
},
|
|
22
|
+
});
|
|
23
|
+
const platformResponse = await adapter.handle(request);
|
|
24
|
+
return adapter.formatResponse(platformResponse);
|
|
25
|
+
}
|
|
26
|
+
catch (error) {
|
|
27
|
+
Logger.error('Deno handler error:', error);
|
|
28
|
+
return new Response('Internal Server Error', { status: 500 });
|
|
29
|
+
}
|
|
30
|
+
};
|
|
31
|
+
export default deno;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"lambda.d.ts","sourceRoot":"","sources":["../../../src/functions/lambda.ts"],"names":[],"mappings":"AAqBA,eAAO,MAAM,OAAO,GAAU,OAAO,OAAO,EAAE,SAAS,OAAO,KAAG,OAAO,CAAC,OAAO,CAkB/E,CAAC"}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { Application } from '../boot/Application';
|
|
2
|
+
import { Logger } from '../config/logger';
|
|
3
|
+
import { Kernel } from '../http/Kernel';
|
|
4
|
+
import { LambdaAdapter } from '../runtime/adapters/LambdaAdapter';
|
|
5
|
+
let kernel = null;
|
|
6
|
+
async function initializeKernel() {
|
|
7
|
+
if (kernel !== null) {
|
|
8
|
+
return kernel;
|
|
9
|
+
}
|
|
10
|
+
const app = Application.create();
|
|
11
|
+
await app.boot();
|
|
12
|
+
kernel = Kernel.create(app.getRouter(), app.getContainer());
|
|
13
|
+
return kernel;
|
|
14
|
+
}
|
|
15
|
+
export const handler = async (event, context) => {
|
|
16
|
+
try {
|
|
17
|
+
const app = await initializeKernel();
|
|
18
|
+
const adapter = LambdaAdapter.create({
|
|
19
|
+
handler: async (req, res) => {
|
|
20
|
+
await app.handle(req, res);
|
|
21
|
+
},
|
|
22
|
+
});
|
|
23
|
+
return await adapter.handle(event, context);
|
|
24
|
+
}
|
|
25
|
+
catch (error) {
|
|
26
|
+
Logger.error('Lambda handler error:', error);
|
|
27
|
+
return {
|
|
28
|
+
statusCode: 500,
|
|
29
|
+
body: JSON.stringify({ message: 'Internal Server Error' }),
|
|
30
|
+
};
|
|
31
|
+
}
|
|
32
|
+
};
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Base Controller
|
|
3
|
+
* All controllers extend this class
|
|
4
|
+
*/
|
|
5
|
+
import { IRequest } from './Request';
|
|
6
|
+
import { IResponse } from './Response';
|
|
7
|
+
export interface IController {
|
|
8
|
+
json(res: IResponse, data: unknown, statusCode?: number): void;
|
|
9
|
+
error(res: IResponse, message: string, statusCode?: number): void;
|
|
10
|
+
redirect(res: IResponse, url: string, statusCode?: number): void;
|
|
11
|
+
param(req: IRequest, name: string): string | undefined;
|
|
12
|
+
query(req: IRequest, name: string): string | string[] | undefined;
|
|
13
|
+
body(req: IRequest): unknown;
|
|
14
|
+
}
|
|
15
|
+
/**
|
|
16
|
+
* Base Controller
|
|
17
|
+
* Sealed namespace for immutability
|
|
18
|
+
*/
|
|
19
|
+
export declare const Controller: IController;
|
|
20
|
+
//# sourceMappingURL=Controller.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Controller.d.ts","sourceRoot":"","sources":["../../../src/http/Controller.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AACzC,OAAO,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAE3C,MAAM,WAAW,WAAW;IAC1B,IAAI,CAAC,GAAG,EAAE,SAAS,EAAE,IAAI,EAAE,OAAO,EAAE,UAAU,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC/D,KAAK,CAAC,GAAG,EAAE,SAAS,EAAE,OAAO,EAAE,MAAM,EAAE,UAAU,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAClE,QAAQ,CAAC,GAAG,EAAE,SAAS,EAAE,GAAG,EAAE,MAAM,EAAE,UAAU,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACjE,KAAK,CAAC,GAAG,EAAE,QAAQ,EAAE,IAAI,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS,CAAC;IACvD,KAAK,CAAC,GAAG,EAAE,QAAQ,EAAE,IAAI,EAAE,MAAM,GAAG,MAAM,GAAG,MAAM,EAAE,GAAG,SAAS,CAAC;IAClE,IAAI,CAAC,GAAG,EAAE,QAAQ,GAAG,OAAO,CAAC;CAC9B;AAED;;;GAGG;AACH,eAAO,MAAM,UAAU,EAAE,WA0CvB,CAAC"}
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Base Controller
|
|
3
|
+
* All controllers extend this class
|
|
4
|
+
*/
|
|
5
|
+
/**
|
|
6
|
+
* Base Controller
|
|
7
|
+
* Sealed namespace for immutability
|
|
8
|
+
*/
|
|
9
|
+
export const Controller = Object.freeze({
|
|
10
|
+
/**
|
|
11
|
+
* Send JSON response
|
|
12
|
+
*/
|
|
13
|
+
json(res, data, statusCode = 200) {
|
|
14
|
+
res.setStatus(statusCode).json(data);
|
|
15
|
+
},
|
|
16
|
+
/**
|
|
17
|
+
* Send error response
|
|
18
|
+
*/
|
|
19
|
+
error(res, message, statusCode = 400) {
|
|
20
|
+
res.setStatus(statusCode).json({ error: message });
|
|
21
|
+
},
|
|
22
|
+
/**
|
|
23
|
+
* Redirect response
|
|
24
|
+
*/
|
|
25
|
+
redirect(res, url, statusCode = 302) {
|
|
26
|
+
res.redirect(url, statusCode);
|
|
27
|
+
},
|
|
28
|
+
/**
|
|
29
|
+
* Get route parameter
|
|
30
|
+
*/
|
|
31
|
+
param(req, name) {
|
|
32
|
+
return req.getParam(name);
|
|
33
|
+
},
|
|
34
|
+
/**
|
|
35
|
+
* Get query parameter
|
|
36
|
+
*/
|
|
37
|
+
query(req, name) {
|
|
38
|
+
return req.getQueryParam(name);
|
|
39
|
+
},
|
|
40
|
+
/**
|
|
41
|
+
* Get request body
|
|
42
|
+
*/
|
|
43
|
+
body(req) {
|
|
44
|
+
return req.getBody();
|
|
45
|
+
},
|
|
46
|
+
});
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* HTTP Kernel - Request handling and middleware pipeline
|
|
3
|
+
*/
|
|
4
|
+
import { IServiceContainer } from '../container/ServiceContainer';
|
|
5
|
+
import { IRequest } from './Request';
|
|
6
|
+
import { IResponse } from './Response';
|
|
7
|
+
import { IMiddlewareStack, Middleware } from '../middleware/MiddlewareStack';
|
|
8
|
+
import type { IncomingMessage, ServerResponse } from '../node-singletons/http';
|
|
9
|
+
import { IRouter } from '../routing/Router';
|
|
10
|
+
export interface IKernel {
|
|
11
|
+
handle(req: IncomingMessage, res: ServerResponse): Promise<void>;
|
|
12
|
+
handleRequest(req: IRequest, res: IResponse): Promise<void>;
|
|
13
|
+
terminate(req: IRequest, res: IResponse): void;
|
|
14
|
+
registerGlobalMiddleware(...middleware: Middleware[]): void;
|
|
15
|
+
registerRouteMiddleware(name: string, middleware: Middleware): void;
|
|
16
|
+
getRouter(): IRouter;
|
|
17
|
+
getContainer(): IServiceContainer;
|
|
18
|
+
getMiddlewareStack(): IMiddlewareStack;
|
|
19
|
+
}
|
|
20
|
+
export declare const Kernel: Readonly<{
|
|
21
|
+
create: (router: IRouter, container: IServiceContainer) => IKernel;
|
|
22
|
+
}>;
|
|
23
|
+
export default Kernel;
|
|
24
|
+
//# sourceMappingURL=Kernel.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Kernel.d.ts","sourceRoot":"","sources":["../../../src/http/Kernel.ts"],"names":[],"mappings":"AAAA;;GAEG;AAGH,OAAO,EAAE,iBAAiB,EAAE,MAAM,6BAA6B,CAAC;AAChE,OAAO,EAAE,QAAQ,EAAW,MAAM,eAAe,CAAC;AAClD,OAAO,EAAE,SAAS,EAAY,MAAM,gBAAgB,CAAC;AACrD,OAAO,EAAE,gBAAgB,EAAE,UAAU,EAAmB,MAAM,6BAA6B,CAAC;AAC5F,OAAO,KAAK,EAAE,eAAe,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAC;AAC7E,OAAO,EAAE,OAAO,EAAU,MAAM,iBAAiB,CAAC;AAElD,MAAM,WAAW,OAAO;IACtB,MAAM,CAAC,GAAG,EAAE,eAAe,EAAE,GAAG,EAAE,cAAc,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IACjE,aAAa,CAAC,GAAG,EAAE,QAAQ,EAAE,GAAG,EAAE,SAAS,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IAC5D,SAAS,CAAC,GAAG,EAAE,QAAQ,EAAE,GAAG,EAAE,SAAS,GAAG,IAAI,CAAC;IAC/C,wBAAwB,CAAC,GAAG,UAAU,EAAE,UAAU,EAAE,GAAG,IAAI,CAAC;IAC5D,uBAAuB,CAAC,IAAI,EAAE,MAAM,EAAE,UAAU,EAAE,UAAU,GAAG,IAAI,CAAC;IACpE,SAAS,IAAI,OAAO,CAAC;IACrB,YAAY,IAAI,iBAAiB,CAAC;IAClC,kBAAkB,IAAI,gBAAgB,CAAC;CACxC;AAqED,eAAO,MAAM,MAAM;qBAzDK,OAAO,aAAa,iBAAiB,KAAG,OAAO;EA2DrE,CAAC;AAEH,eAAe,MAAM,CAAC"}
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* HTTP Kernel - Request handling and middleware pipeline
|
|
3
|
+
*/
|
|
4
|
+
import { Logger } from '../config/logger';
|
|
5
|
+
import { Request } from './Request';
|
|
6
|
+
import { Response } from './Response';
|
|
7
|
+
import { MiddlewareStack } from '../middleware/MiddlewareStack';
|
|
8
|
+
import { Router } from '../routing/Router';
|
|
9
|
+
/**
|
|
10
|
+
* Terminate request lifecycle
|
|
11
|
+
*/
|
|
12
|
+
function terminate(_req, _res) {
|
|
13
|
+
// Cleanup, logging, etc.
|
|
14
|
+
}
|
|
15
|
+
/**
|
|
16
|
+
* HTTP Kernel Factory
|
|
17
|
+
*/
|
|
18
|
+
const create = (router, container) => {
|
|
19
|
+
const globalMiddleware = [];
|
|
20
|
+
const routeMiddleware = {};
|
|
21
|
+
const middlewareStack = MiddlewareStack.create();
|
|
22
|
+
/**
|
|
23
|
+
* Handle incoming HTTP request (Node.js entry point)
|
|
24
|
+
*/
|
|
25
|
+
const handle = async (nodeReq, nodeRes) => {
|
|
26
|
+
const req = Request.create(nodeReq);
|
|
27
|
+
const res = Response.create(nodeRes);
|
|
28
|
+
await handleRequest(req, res);
|
|
29
|
+
};
|
|
30
|
+
/**
|
|
31
|
+
* Handle wrapped request/response
|
|
32
|
+
*/
|
|
33
|
+
const handleRequest = async (req, res) => {
|
|
34
|
+
try {
|
|
35
|
+
Logger.info(`[${req.getMethod()}] ${req.getPath()}`);
|
|
36
|
+
// Match route
|
|
37
|
+
const route = Router.match(router, req.getMethod(), req.getPath());
|
|
38
|
+
if (!route) {
|
|
39
|
+
res.setStatus(404).json({ error: 'Not Found' });
|
|
40
|
+
return;
|
|
41
|
+
}
|
|
42
|
+
req.setParams(route.params);
|
|
43
|
+
// Execute middleware and handler
|
|
44
|
+
await route.handler(req, res);
|
|
45
|
+
}
|
|
46
|
+
catch (error) {
|
|
47
|
+
Logger.error('Kernel error:', error);
|
|
48
|
+
res.setStatus(500).json({ error: 'Internal Server Error' });
|
|
49
|
+
}
|
|
50
|
+
finally {
|
|
51
|
+
terminate(req, res);
|
|
52
|
+
}
|
|
53
|
+
};
|
|
54
|
+
return {
|
|
55
|
+
handle,
|
|
56
|
+
handleRequest,
|
|
57
|
+
terminate,
|
|
58
|
+
registerGlobalMiddleware(...middleware) {
|
|
59
|
+
globalMiddleware.push(...middleware);
|
|
60
|
+
},
|
|
61
|
+
registerRouteMiddleware(name, middleware) {
|
|
62
|
+
routeMiddleware[name] = middleware;
|
|
63
|
+
},
|
|
64
|
+
getRouter: () => router,
|
|
65
|
+
getContainer: () => container,
|
|
66
|
+
getMiddlewareStack: () => middlewareStack,
|
|
67
|
+
};
|
|
68
|
+
};
|
|
69
|
+
export const Kernel = Object.freeze({
|
|
70
|
+
create,
|
|
71
|
+
});
|
|
72
|
+
export default Kernel;
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Request - HTTP Request wrapper
|
|
3
|
+
* Wraps Node.js IncomingMessage with additional utilities
|
|
4
|
+
*/
|
|
5
|
+
import * as http from '../node-singletons/http';
|
|
6
|
+
type HeadParam = string | string[] | undefined;
|
|
7
|
+
type JwtPayload = import('/opt/homebrew/var/www/Sites/zintrust/src/index').JwtPayload;
|
|
8
|
+
export interface IRequest {
|
|
9
|
+
sessionId: HeadParam;
|
|
10
|
+
user: JwtPayload | undefined;
|
|
11
|
+
params: Record<string, string>;
|
|
12
|
+
body: Record<string, unknown>;
|
|
13
|
+
getMethod(): string;
|
|
14
|
+
getPath(): string;
|
|
15
|
+
getHeaders(): http.IncomingHttpHeaders;
|
|
16
|
+
readonly headers: http.IncomingHttpHeaders;
|
|
17
|
+
getHeader(name: string): HeadParam;
|
|
18
|
+
getParams(): Record<string, string>;
|
|
19
|
+
getParam(key: string): string | undefined;
|
|
20
|
+
setParams(params: Record<string, string>): void;
|
|
21
|
+
getQuery(): Record<string, string | string[]>;
|
|
22
|
+
getQueryParam(key: string): HeadParam;
|
|
23
|
+
setBody(body: unknown): void;
|
|
24
|
+
getBody(): unknown;
|
|
25
|
+
isJson(): boolean;
|
|
26
|
+
getRaw(): http.IncomingMessage;
|
|
27
|
+
context: Record<string, unknown>;
|
|
28
|
+
}
|
|
29
|
+
export declare const Request: Readonly<{
|
|
30
|
+
/**
|
|
31
|
+
* Create a new request instance
|
|
32
|
+
*/
|
|
33
|
+
create(req: http.IncomingMessage): IRequest;
|
|
34
|
+
}>;
|
|
35
|
+
export default Request;
|
|
36
|
+
//# sourceMappingURL=Request.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Request.d.ts","sourceRoot":"","sources":["../../../src/http/Request.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,IAAI,MAAM,uBAAuB,CAAC;AAE9C,KAAK,SAAS,GAAG,MAAM,GAAG,MAAM,EAAE,GAAG,SAAS,CAAC;AAC/C,KAAK,UAAU,GAAG,OAAO,gDAAgD,EAAE,UAAU,CAAC;AAEtF,MAAM,WAAW,QAAQ;IACvB,SAAS,EAAE,SAAS,CAAC;IACrB,IAAI,EAAE,UAAU,GAAG,SAAS,CAAC;IAC7B,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAC/B,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IAC9B,SAAS,IAAI,MAAM,CAAC;IACpB,OAAO,IAAI,MAAM,CAAC;IAClB,UAAU,IAAI,IAAI,CAAC,mBAAmB,CAAC;IACvC,QAAQ,CAAC,OAAO,EAAE,IAAI,CAAC,mBAAmB,CAAC;IAC3C,SAAS,CAAC,IAAI,EAAE,MAAM,GAAG,SAAS,CAAC;IACnC,SAAS,IAAI,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IACpC,QAAQ,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS,CAAC;IAC1C,SAAS,CAAC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,GAAG,IAAI,CAAC;IAChD,QAAQ,IAAI,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,EAAE,CAAC,CAAC;IAC9C,aAAa,CAAC,GAAG,EAAE,MAAM,GAAG,SAAS,CAAC;IACtC,OAAO,CAAC,IAAI,EAAE,OAAO,GAAG,IAAI,CAAC;IAC7B,OAAO,IAAI,OAAO,CAAC;IACnB,MAAM,IAAI,OAAO,CAAC;IAClB,MAAM,IAAI,IAAI,CAAC,eAAe,CAAC;IAC/B,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;CAClC;AAkKD,eAAO,MAAM,OAAO;IAClB;;OAEG;gBACS,IAAI,CAAC,eAAe,GAAG,QAAQ;EAO3C,CAAC;AAEH,eAAe,OAAO,CAAC"}
|
|
@@ -0,0 +1,142 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Request - HTTP Request wrapper
|
|
3
|
+
* Wraps Node.js IncomingMessage with additional utilities
|
|
4
|
+
*/
|
|
5
|
+
/**
|
|
6
|
+
* Request - HTTP Request wrapper
|
|
7
|
+
* Refactored to Functional Object pattern
|
|
8
|
+
*/
|
|
9
|
+
/**
|
|
10
|
+
* Parse query string from URL
|
|
11
|
+
*/
|
|
12
|
+
const parseQuery = (urlStr) => {
|
|
13
|
+
const query = {};
|
|
14
|
+
const url = new URL(urlStr, 'http://localhost');
|
|
15
|
+
url.searchParams.forEach((value, key) => {
|
|
16
|
+
const existing = query[key];
|
|
17
|
+
if (existing === undefined) {
|
|
18
|
+
query[key] = value;
|
|
19
|
+
}
|
|
20
|
+
else if (Array.isArray(existing)) {
|
|
21
|
+
existing.push(value);
|
|
22
|
+
}
|
|
23
|
+
else {
|
|
24
|
+
query[key] = [existing, value];
|
|
25
|
+
}
|
|
26
|
+
});
|
|
27
|
+
return query;
|
|
28
|
+
};
|
|
29
|
+
const isPlainObject = (value) => {
|
|
30
|
+
return typeof value === 'object' && value !== null && !Array.isArray(value);
|
|
31
|
+
};
|
|
32
|
+
const toBodyRecord = (value) => {
|
|
33
|
+
return isPlainObject(value) ? value : {};
|
|
34
|
+
};
|
|
35
|
+
const createRequestState = (req) => {
|
|
36
|
+
return {
|
|
37
|
+
sessionId: req.headers['x-session-id'],
|
|
38
|
+
user: undefined,
|
|
39
|
+
params: {},
|
|
40
|
+
body: null,
|
|
41
|
+
bodyRecord: {},
|
|
42
|
+
};
|
|
43
|
+
};
|
|
44
|
+
const setBodyState = (state, newBody) => {
|
|
45
|
+
state.body = newBody;
|
|
46
|
+
state.bodyRecord = toBodyRecord(newBody);
|
|
47
|
+
};
|
|
48
|
+
const createRequestProperties = (state, context) => {
|
|
49
|
+
return {
|
|
50
|
+
get sessionId() {
|
|
51
|
+
return state.sessionId;
|
|
52
|
+
},
|
|
53
|
+
set sessionId(newSessionId) {
|
|
54
|
+
state.sessionId = newSessionId;
|
|
55
|
+
},
|
|
56
|
+
get user() {
|
|
57
|
+
return state.user;
|
|
58
|
+
},
|
|
59
|
+
set user(newUser) {
|
|
60
|
+
state.user = newUser;
|
|
61
|
+
},
|
|
62
|
+
context,
|
|
63
|
+
get params() {
|
|
64
|
+
return state.params;
|
|
65
|
+
},
|
|
66
|
+
set params(newParams) {
|
|
67
|
+
state.params = newParams;
|
|
68
|
+
},
|
|
69
|
+
get body() {
|
|
70
|
+
return state.bodyRecord;
|
|
71
|
+
},
|
|
72
|
+
set body(newBody) {
|
|
73
|
+
setBodyState(state, newBody);
|
|
74
|
+
},
|
|
75
|
+
};
|
|
76
|
+
};
|
|
77
|
+
const createRequestMethods = (req, query, state) => {
|
|
78
|
+
return {
|
|
79
|
+
getMethod() {
|
|
80
|
+
return req.method ?? 'GET';
|
|
81
|
+
},
|
|
82
|
+
getPath() {
|
|
83
|
+
const url = req.url;
|
|
84
|
+
return url === undefined ? '/' : url.split('?')[0];
|
|
85
|
+
},
|
|
86
|
+
getHeaders() {
|
|
87
|
+
return req.headers;
|
|
88
|
+
},
|
|
89
|
+
get headers() {
|
|
90
|
+
return req.headers;
|
|
91
|
+
},
|
|
92
|
+
getHeader(name) {
|
|
93
|
+
return req.headers[name.toLowerCase()];
|
|
94
|
+
},
|
|
95
|
+
getParams() {
|
|
96
|
+
return state.params;
|
|
97
|
+
},
|
|
98
|
+
getParam(key) {
|
|
99
|
+
return state.params[key];
|
|
100
|
+
},
|
|
101
|
+
setParams(newParams) {
|
|
102
|
+
state.params = newParams;
|
|
103
|
+
},
|
|
104
|
+
getQuery() {
|
|
105
|
+
return query;
|
|
106
|
+
},
|
|
107
|
+
getQueryParam(key) {
|
|
108
|
+
return query[key];
|
|
109
|
+
},
|
|
110
|
+
setBody(newBody) {
|
|
111
|
+
setBodyState(state, newBody);
|
|
112
|
+
},
|
|
113
|
+
getBody() {
|
|
114
|
+
return state.body;
|
|
115
|
+
},
|
|
116
|
+
isJson() {
|
|
117
|
+
const contentType = this.getHeader('content-type');
|
|
118
|
+
return typeof contentType === 'string' && contentType.includes('application/json');
|
|
119
|
+
},
|
|
120
|
+
getRaw() {
|
|
121
|
+
return req;
|
|
122
|
+
},
|
|
123
|
+
};
|
|
124
|
+
};
|
|
125
|
+
const createRequestApi = (req, query, context, state) => {
|
|
126
|
+
return {
|
|
127
|
+
...createRequestProperties(state, context),
|
|
128
|
+
...createRequestMethods(req, query, state),
|
|
129
|
+
};
|
|
130
|
+
};
|
|
131
|
+
export const Request = Object.freeze({
|
|
132
|
+
/**
|
|
133
|
+
* Create a new request instance
|
|
134
|
+
*/
|
|
135
|
+
create(req) {
|
|
136
|
+
const query = parseQuery(req.url ?? '/');
|
|
137
|
+
const context = {};
|
|
138
|
+
const state = createRequestState(req);
|
|
139
|
+
return createRequestApi(req, query, context, state);
|
|
140
|
+
},
|
|
141
|
+
});
|
|
142
|
+
export default Request;
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Response - HTTP Response wrapper
|
|
3
|
+
* Wraps Node.js ServerResponse with additional utilities
|
|
4
|
+
*/
|
|
5
|
+
import * as http from '../node-singletons/http';
|
|
6
|
+
export interface IResponse {
|
|
7
|
+
status(code: number): IResponse;
|
|
8
|
+
setStatus(code: number): IResponse;
|
|
9
|
+
getStatus(): number;
|
|
10
|
+
readonly statusCode: number;
|
|
11
|
+
setHeader(name: string, value: string): IResponse;
|
|
12
|
+
getHeader(name: string): string | undefined;
|
|
13
|
+
json(data: unknown): void;
|
|
14
|
+
text(text: string): void;
|
|
15
|
+
html(html: string): void;
|
|
16
|
+
send(data: string | Buffer): void;
|
|
17
|
+
redirect(url: string, statusCode?: number): void;
|
|
18
|
+
getRaw(): http.ServerResponse;
|
|
19
|
+
locals: Record<string, unknown>;
|
|
20
|
+
}
|
|
21
|
+
/**
|
|
22
|
+
* Response - HTTP Response wrapper
|
|
23
|
+
* Refactored to Functional Object pattern
|
|
24
|
+
*/
|
|
25
|
+
export declare const Response: Readonly<{
|
|
26
|
+
/**
|
|
27
|
+
* Create a new response instance
|
|
28
|
+
*/
|
|
29
|
+
create(res: http.ServerResponse): IResponse;
|
|
30
|
+
}>;
|
|
31
|
+
export default Response;
|
|
32
|
+
//# sourceMappingURL=Response.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Response.d.ts","sourceRoot":"","sources":["../../../src/http/Response.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAGH,OAAO,KAAK,IAAI,MAAM,uBAAuB,CAAC;AAE9C,MAAM,WAAW,SAAS;IACxB,MAAM,CAAC,IAAI,EAAE,MAAM,GAAG,SAAS,CAAC;IAChC,SAAS,CAAC,IAAI,EAAE,MAAM,GAAG,SAAS,CAAC;IACnC,SAAS,IAAI,MAAM,CAAC;IACpB,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAC;IAC5B,SAAS,CAAC,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,SAAS,CAAC;IAClD,SAAS,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS,CAAC;IAC5C,IAAI,CAAC,IAAI,EAAE,OAAO,GAAG,IAAI,CAAC;IAC1B,IAAI,CAAC,IAAI,EAAE,MAAM,GAAG,IAAI,CAAC;IACzB,IAAI,CAAC,IAAI,EAAE,MAAM,GAAG,IAAI,CAAC;IACzB,IAAI,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CAAC;IAClC,QAAQ,CAAC,GAAG,EAAE,MAAM,EAAE,UAAU,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACjD,MAAM,IAAI,IAAI,CAAC,cAAc,CAAC;IAC9B,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;CACjC;AAED;;;GAGG;AACH,eAAO,MAAM,QAAQ;IACnB;;OAEG;gBACS,IAAI,CAAC,cAAc,GAAG,SAAS;EA0D3C,CAAC;AAEH,eAAe,QAAQ,CAAC"}
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Response - HTTP Response wrapper
|
|
3
|
+
* Wraps Node.js ServerResponse with additional utilities
|
|
4
|
+
*/
|
|
5
|
+
import { HTTP_HEADERS, MIME_TYPES } from '../config/constants';
|
|
6
|
+
/**
|
|
7
|
+
* Response - HTTP Response wrapper
|
|
8
|
+
* Refactored to Functional Object pattern
|
|
9
|
+
*/
|
|
10
|
+
export const Response = Object.freeze({
|
|
11
|
+
/**
|
|
12
|
+
* Create a new response instance
|
|
13
|
+
*/
|
|
14
|
+
create(res) {
|
|
15
|
+
let statusCodeValue = 200;
|
|
16
|
+
const headers = {};
|
|
17
|
+
const locals = {};
|
|
18
|
+
const response = {
|
|
19
|
+
locals,
|
|
20
|
+
status(code) {
|
|
21
|
+
return this.setStatus(code);
|
|
22
|
+
},
|
|
23
|
+
setStatus(code) {
|
|
24
|
+
statusCodeValue = code;
|
|
25
|
+
res.statusCode = code;
|
|
26
|
+
return this;
|
|
27
|
+
},
|
|
28
|
+
getStatus() {
|
|
29
|
+
return statusCodeValue;
|
|
30
|
+
},
|
|
31
|
+
get statusCode() {
|
|
32
|
+
return statusCodeValue;
|
|
33
|
+
},
|
|
34
|
+
setHeader(name, value) {
|
|
35
|
+
headers[name] = value;
|
|
36
|
+
res.setHeader(name, value);
|
|
37
|
+
return this;
|
|
38
|
+
},
|
|
39
|
+
getHeader(name) {
|
|
40
|
+
return headers[name];
|
|
41
|
+
},
|
|
42
|
+
json(data) {
|
|
43
|
+
this.setHeader(HTTP_HEADERS.CONTENT_TYPE, MIME_TYPES.JSON);
|
|
44
|
+
res.end(JSON.stringify(data));
|
|
45
|
+
},
|
|
46
|
+
text(text) {
|
|
47
|
+
this.setHeader(HTTP_HEADERS.CONTENT_TYPE, MIME_TYPES.TEXT);
|
|
48
|
+
res.end(text);
|
|
49
|
+
},
|
|
50
|
+
html(html) {
|
|
51
|
+
this.setHeader(HTTP_HEADERS.CONTENT_TYPE, MIME_TYPES.HTML);
|
|
52
|
+
res.end(html);
|
|
53
|
+
},
|
|
54
|
+
send(data) {
|
|
55
|
+
res.end(data);
|
|
56
|
+
},
|
|
57
|
+
redirect(url, statusCode = 302) {
|
|
58
|
+
this.setStatus(statusCode);
|
|
59
|
+
this.setHeader('Location', url);
|
|
60
|
+
res.end();
|
|
61
|
+
},
|
|
62
|
+
getRaw() {
|
|
63
|
+
return res;
|
|
64
|
+
},
|
|
65
|
+
};
|
|
66
|
+
response.setHeader(HTTP_HEADERS.CONTENT_TYPE, MIME_TYPES.JSON);
|
|
67
|
+
return response;
|
|
68
|
+
},
|
|
69
|
+
});
|
|
70
|
+
export default Response;
|
package/src/index.d.ts
ADDED
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Zintrust Framework - Production-Grade TypeScript Backend
|
|
3
|
+
* Built for performance, type safety, and exceptional developer experience
|
|
4
|
+
*/
|
|
5
|
+
export { Application } from './boot/Application';
|
|
6
|
+
export { Server } from './boot/Server';
|
|
7
|
+
export { ServiceContainer } from './container/ServiceContainer';
|
|
8
|
+
export { Controller } from './http/Controller';
|
|
9
|
+
export { Kernel } from './http/Kernel';
|
|
10
|
+
export { Request } from './http/Request';
|
|
11
|
+
export type { IRequest } from './http/Request';
|
|
12
|
+
export { Response } from './http/Response';
|
|
13
|
+
export type { IResponse } from './http/Response';
|
|
14
|
+
export { MiddlewareStack } from './middleware/MiddlewareStack';
|
|
15
|
+
export type { Middleware } from './middleware/MiddlewareStack';
|
|
16
|
+
export { MySQLAdapter } from './orm/adapters/MySQLAdapter';
|
|
17
|
+
export { PostgreSQLAdapter } from './orm/adapters/PostgreSQLAdapter';
|
|
18
|
+
export { SQLiteAdapter } from './orm/adapters/SQLiteAdapter';
|
|
19
|
+
export { SQLServerAdapter } from './orm/adapters/SQLServerAdapter';
|
|
20
|
+
export { Database, resetDatabase, useDatabase } from './orm/Database';
|
|
21
|
+
export { Model } from './orm/Model';
|
|
22
|
+
export type { IModel, ModelConfig, ModelStatic } from './orm/Model';
|
|
23
|
+
export { QueryBuilder } from './orm/QueryBuilder';
|
|
24
|
+
export type { IRelationship } from './orm/Relationships';
|
|
25
|
+
export { Router } from './routing/Router';
|
|
26
|
+
export type { IRouter } from './routing/Router';
|
|
27
|
+
export { MemoryProfiler } from './profiling/MemoryProfiler';
|
|
28
|
+
export { N1Detector } from './profiling/N1Detector';
|
|
29
|
+
export { QueryLogger } from './profiling/QueryLogger';
|
|
30
|
+
export { RequestProfiler } from './profiling/RequestProfiler';
|
|
31
|
+
export type { MemoryDelta, MemorySnapshot, N1Pattern, ProfileReport, QueryLogEntry, } from './profiling/types';
|
|
32
|
+
export { ValidationError } from './validation/ValidationError';
|
|
33
|
+
export type { FieldError } from './validation/ValidationError';
|
|
34
|
+
export { Schema, Validator } from './validation/Validator';
|
|
35
|
+
export { CsrfTokenManager } from './security/CsrfTokenManager';
|
|
36
|
+
export type { CsrfTokenData } from './security/CsrfTokenManager';
|
|
37
|
+
export { Encryptor } from './security/Encryptor';
|
|
38
|
+
export { JwtManager } from './security/JwtManager';
|
|
39
|
+
export type { JwtOptions, JwtPayload } from './security/JwtManager';
|
|
40
|
+
export { XssProtection } from './security/XssProtection';
|
|
41
|
+
export { ErrorFactory } from './exceptions/ZintrustError';
|
|
42
|
+
export declare const version = "0.1.0";
|
|
43
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAChD,OAAO,EAAE,MAAM,EAAE,MAAM,cAAc,CAAC;AACtC,OAAO,EAAE,gBAAgB,EAAE,MAAM,6BAA6B,CAAC;AAC/D,OAAO,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAC9C,OAAO,EAAE,MAAM,EAAE,MAAM,cAAc,CAAC;AACtC,OAAO,EAAE,OAAO,EAAE,MAAM,eAAe,CAAC;AACxC,YAAY,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AAC9C,OAAO,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAC;AAC1C,YAAY,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAChD,OAAO,EAAE,eAAe,EAAE,MAAM,6BAA6B,CAAC;AAC9D,YAAY,EAAE,UAAU,EAAE,MAAM,6BAA6B,CAAC;AAC9D,OAAO,EAAE,YAAY,EAAE,MAAM,4BAA4B,CAAC;AAC1D,OAAO,EAAE,iBAAiB,EAAE,MAAM,iCAAiC,CAAC;AACpE,OAAO,EAAE,aAAa,EAAE,MAAM,6BAA6B,CAAC;AAC5D,OAAO,EAAE,gBAAgB,EAAE,MAAM,gCAAgC,CAAC;AAClE,OAAO,EAAE,QAAQ,EAAE,aAAa,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AACrE,OAAO,EAAE,KAAK,EAAE,MAAM,YAAY,CAAC;AACnC,YAAY,EAAE,MAAM,EAAE,WAAW,EAAE,WAAW,EAAE,MAAM,YAAY,CAAC;AACnE,OAAO,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AACjD,YAAY,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AACxD,OAAO,EAAE,MAAM,EAAE,MAAM,iBAAiB,CAAC;AACzC,YAAY,EAAE,OAAO,EAAE,MAAM,iBAAiB,CAAC;AAG/C,OAAO,EAAE,cAAc,EAAE,MAAM,2BAA2B,CAAC;AAC3D,OAAO,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAC;AACnD,OAAO,EAAE,WAAW,EAAE,MAAM,wBAAwB,CAAC;AACrD,OAAO,EAAE,eAAe,EAAE,MAAM,4BAA4B,CAAC;AAC7D,YAAY,EACV,WAAW,EACX,cAAc,EACd,SAAS,EACT,aAAa,EACb,aAAa,GACd,MAAM,kBAAkB,CAAC;AAG1B,OAAO,EAAE,eAAe,EAAE,MAAM,6BAA6B,CAAC;AAC9D,YAAY,EAAE,UAAU,EAAE,MAAM,6BAA6B,CAAC;AAC9D,OAAO,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,uBAAuB,CAAC;AAG1D,OAAO,EAAE,gBAAgB,EAAE,MAAM,4BAA4B,CAAC;AAC9D,YAAY,EAAE,aAAa,EAAE,MAAM,4BAA4B,CAAC;AAChE,OAAO,EAAE,SAAS,EAAE,MAAM,qBAAqB,CAAC;AAChD,OAAO,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAClD,YAAY,EAAE,UAAU,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AACnE,OAAO,EAAE,aAAa,EAAE,MAAM,yBAAyB,CAAC;AAGxD,OAAO,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAC;AAGzD,eAAO,MAAM,OAAO,UAAU,CAAC"}
|
package/src/index.js
ADDED
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Zintrust Framework - Production-Grade TypeScript Backend
|
|
3
|
+
* Built for performance, type safety, and exceptional developer experience
|
|
4
|
+
*/
|
|
5
|
+
export { Application } from './boot/Application';
|
|
6
|
+
export { Server } from './boot/Server';
|
|
7
|
+
export { ServiceContainer } from './container/ServiceContainer';
|
|
8
|
+
export { Controller } from './http/Controller';
|
|
9
|
+
export { Kernel } from './http/Kernel';
|
|
10
|
+
export { Request } from './http/Request';
|
|
11
|
+
export { Response } from './http/Response';
|
|
12
|
+
export { MiddlewareStack } from './middleware/MiddlewareStack';
|
|
13
|
+
export { MySQLAdapter } from './orm/adapters/MySQLAdapter';
|
|
14
|
+
export { PostgreSQLAdapter } from './orm/adapters/PostgreSQLAdapter';
|
|
15
|
+
export { SQLiteAdapter } from './orm/adapters/SQLiteAdapter';
|
|
16
|
+
export { SQLServerAdapter } from './orm/adapters/SQLServerAdapter';
|
|
17
|
+
export { Database, resetDatabase, useDatabase } from './orm/Database';
|
|
18
|
+
export { Model } from './orm/Model';
|
|
19
|
+
export { QueryBuilder } from './orm/QueryBuilder';
|
|
20
|
+
export { Router } from './routing/Router';
|
|
21
|
+
// Profiling
|
|
22
|
+
export { MemoryProfiler } from './profiling/MemoryProfiler';
|
|
23
|
+
export { N1Detector } from './profiling/N1Detector';
|
|
24
|
+
export { QueryLogger } from './profiling/QueryLogger';
|
|
25
|
+
export { RequestProfiler } from './profiling/RequestProfiler';
|
|
26
|
+
// Validation
|
|
27
|
+
export { ValidationError } from './validation/ValidationError';
|
|
28
|
+
export { Schema, Validator } from './validation/Validator';
|
|
29
|
+
// Security
|
|
30
|
+
export { CsrfTokenManager } from './security/CsrfTokenManager';
|
|
31
|
+
export { Encryptor } from './security/Encryptor';
|
|
32
|
+
export { JwtManager } from './security/JwtManager';
|
|
33
|
+
export { XssProtection } from './security/XssProtection';
|
|
34
|
+
// Exceptions
|
|
35
|
+
export { ErrorFactory } from './exceptions/ZintrustError';
|
|
36
|
+
// Version
|
|
37
|
+
export const version = '0.1.0';
|