@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,191 @@
|
|
|
1
|
+
export const createRouter = () => ({
|
|
2
|
+
routes: [],
|
|
3
|
+
prefix: '',
|
|
4
|
+
routeIndex: new Map(),
|
|
5
|
+
});
|
|
6
|
+
/**
|
|
7
|
+
* Router - HTTP Routing Engine
|
|
8
|
+
* Matches incoming requests to route handlers
|
|
9
|
+
*/
|
|
10
|
+
/**
|
|
11
|
+
* Convert a path pattern to a regex
|
|
12
|
+
* Example: /users/:id/posts/:postId -> /users/([^/]+)/posts/([^/]+)
|
|
13
|
+
*/
|
|
14
|
+
const pathToRegex = (path) => {
|
|
15
|
+
const paramNames = [];
|
|
16
|
+
let regexPath = path.replaceAll(/:([a-zA-Z_]\w*)/g, (_, paramName) => {
|
|
17
|
+
paramNames.push(paramName);
|
|
18
|
+
return '([^/]+)';
|
|
19
|
+
});
|
|
20
|
+
regexPath = `^${regexPath}$`;
|
|
21
|
+
const pattern = new RegExp(regexPath);
|
|
22
|
+
return { pattern, paramNames };
|
|
23
|
+
};
|
|
24
|
+
/**
|
|
25
|
+
* Register a route
|
|
26
|
+
*/
|
|
27
|
+
const registerRoute = (router, method, path, handler) => {
|
|
28
|
+
const { pattern, paramNames } = pathToRegex(path);
|
|
29
|
+
const route = {
|
|
30
|
+
method,
|
|
31
|
+
path,
|
|
32
|
+
pattern,
|
|
33
|
+
handler,
|
|
34
|
+
paramNames,
|
|
35
|
+
};
|
|
36
|
+
router.routes.push(route);
|
|
37
|
+
// Index by method for faster lookup
|
|
38
|
+
if (!router.routeIndex.has(method)) {
|
|
39
|
+
router.routeIndex.set(method, []);
|
|
40
|
+
}
|
|
41
|
+
router.routeIndex.get(method)?.push(route);
|
|
42
|
+
};
|
|
43
|
+
/**
|
|
44
|
+
* Extract parameters from a matching route
|
|
45
|
+
*/
|
|
46
|
+
const getRouteMatch = (route, path) => {
|
|
47
|
+
const match = route.pattern.exec(path);
|
|
48
|
+
if (!match)
|
|
49
|
+
return null;
|
|
50
|
+
const params = {};
|
|
51
|
+
route.paramNames.forEach((paramName, index) => {
|
|
52
|
+
params[paramName] = match[index + 1];
|
|
53
|
+
});
|
|
54
|
+
return {
|
|
55
|
+
handler: route.handler,
|
|
56
|
+
params,
|
|
57
|
+
};
|
|
58
|
+
};
|
|
59
|
+
/**
|
|
60
|
+
* Fallback linear search for manually added routes
|
|
61
|
+
*/
|
|
62
|
+
const findInFallback = (router, method, path) => {
|
|
63
|
+
for (const route of router.routes) {
|
|
64
|
+
// Skip if already checked via index
|
|
65
|
+
if (router.routeIndex !== undefined) {
|
|
66
|
+
const methodRoutes = router.routeIndex.get(route.method);
|
|
67
|
+
if (methodRoutes?.includes(route) ?? false)
|
|
68
|
+
continue;
|
|
69
|
+
}
|
|
70
|
+
if (route.method !== method && route.method !== '*')
|
|
71
|
+
continue;
|
|
72
|
+
const match = getRouteMatch(route, path);
|
|
73
|
+
if (match)
|
|
74
|
+
return match;
|
|
75
|
+
}
|
|
76
|
+
return null;
|
|
77
|
+
};
|
|
78
|
+
/**
|
|
79
|
+
* Match a request to a route
|
|
80
|
+
*/
|
|
81
|
+
const matchRoute = (router, method, path) => {
|
|
82
|
+
// Try fast lookup first
|
|
83
|
+
if (router.routeIndex !== undefined) {
|
|
84
|
+
const candidates = [
|
|
85
|
+
...(router.routeIndex.get(method) ?? []),
|
|
86
|
+
...(router.routeIndex.get('*') ?? []),
|
|
87
|
+
];
|
|
88
|
+
for (const route of candidates) {
|
|
89
|
+
const match = getRouteMatch(route, path);
|
|
90
|
+
if (match)
|
|
91
|
+
return match;
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
// Fallback to linear search for manually added routes or if index is missing
|
|
95
|
+
return findInFallback(router, method, path);
|
|
96
|
+
};
|
|
97
|
+
const stripTrailingSlashes = (value) => {
|
|
98
|
+
let end = value.length;
|
|
99
|
+
while (end > 0 && value.codePointAt(end - 1) === 47) {
|
|
100
|
+
end--;
|
|
101
|
+
}
|
|
102
|
+
return value.slice(0, end);
|
|
103
|
+
};
|
|
104
|
+
const normalizePrefix = (prefix) => {
|
|
105
|
+
const trimmed = prefix.trim();
|
|
106
|
+
if (trimmed === '' || trimmed === '/')
|
|
107
|
+
return '';
|
|
108
|
+
const withoutTrailing = stripTrailingSlashes(trimmed);
|
|
109
|
+
return withoutTrailing.startsWith('/') ? withoutTrailing : `/${withoutTrailing}`;
|
|
110
|
+
};
|
|
111
|
+
const normalizePath = (path) => {
|
|
112
|
+
const trimmed = path.trim();
|
|
113
|
+
if (trimmed === '')
|
|
114
|
+
return '/';
|
|
115
|
+
return trimmed.startsWith('/') ? trimmed : `/${trimmed}`;
|
|
116
|
+
};
|
|
117
|
+
const joinPaths = (prefix, path) => {
|
|
118
|
+
const pfx = normalizePrefix(prefix);
|
|
119
|
+
const pth = normalizePath(path);
|
|
120
|
+
if (pfx === '')
|
|
121
|
+
return pth;
|
|
122
|
+
if (pth === '/')
|
|
123
|
+
return pfx || '/';
|
|
124
|
+
return `${pfx}${pth}`;
|
|
125
|
+
};
|
|
126
|
+
const scopeRouter = (router, prefix) => ({
|
|
127
|
+
routes: router.routes,
|
|
128
|
+
prefix: joinPaths(router.prefix, prefix),
|
|
129
|
+
routeIndex: router.routeIndex,
|
|
130
|
+
});
|
|
131
|
+
const group = (router, prefix, callback) => {
|
|
132
|
+
callback(scopeRouter(router, prefix));
|
|
133
|
+
};
|
|
134
|
+
const resource = (router, path, controller) => {
|
|
135
|
+
const base = joinPaths(router.prefix, path);
|
|
136
|
+
const withId = `${base.endsWith('/') ? base.slice(0, -1) : base}/:id`;
|
|
137
|
+
if (controller.index)
|
|
138
|
+
registerRoute(router, 'GET', base, controller.index);
|
|
139
|
+
if (controller.store)
|
|
140
|
+
registerRoute(router, 'POST', base, controller.store);
|
|
141
|
+
if (controller.show)
|
|
142
|
+
registerRoute(router, 'GET', withId, controller.show);
|
|
143
|
+
if (controller.update) {
|
|
144
|
+
registerRoute(router, 'PUT', withId, controller.update);
|
|
145
|
+
registerRoute(router, 'PATCH', withId, controller.update);
|
|
146
|
+
}
|
|
147
|
+
if (controller.destroy)
|
|
148
|
+
registerRoute(router, 'DELETE', withId, controller.destroy);
|
|
149
|
+
};
|
|
150
|
+
const get = (router, path, handler) => {
|
|
151
|
+
registerRoute(router, 'GET', joinPaths(router.prefix, path), handler);
|
|
152
|
+
};
|
|
153
|
+
const post = (router, path, handler) => {
|
|
154
|
+
registerRoute(router, 'POST', joinPaths(router.prefix, path), handler);
|
|
155
|
+
};
|
|
156
|
+
const put = (router, path, handler) => {
|
|
157
|
+
registerRoute(router, 'PUT', joinPaths(router.prefix, path), handler);
|
|
158
|
+
};
|
|
159
|
+
const patch = (router, path, handler) => {
|
|
160
|
+
registerRoute(router, 'PATCH', joinPaths(router.prefix, path), handler);
|
|
161
|
+
};
|
|
162
|
+
const del = (router, path, handler) => {
|
|
163
|
+
registerRoute(router, 'DELETE', joinPaths(router.prefix, path), handler);
|
|
164
|
+
};
|
|
165
|
+
const any = (router, path, handler) => {
|
|
166
|
+
const fullPath = joinPaths(router.prefix, path);
|
|
167
|
+
['GET', 'POST', 'PUT', 'PATCH', 'DELETE'].forEach((method) => {
|
|
168
|
+
registerRoute(router, method, fullPath, handler);
|
|
169
|
+
});
|
|
170
|
+
};
|
|
171
|
+
const match = (router, method, path) => matchRoute(router, method, path);
|
|
172
|
+
const getRoutes = (router) => router.routes;
|
|
173
|
+
/**
|
|
174
|
+
* Router - Sealed namespace for HTTP routing
|
|
175
|
+
* All operations grouped in frozen namespace to prevent mutation
|
|
176
|
+
*/
|
|
177
|
+
export const Router = Object.freeze({
|
|
178
|
+
createRouter,
|
|
179
|
+
scopeRouter,
|
|
180
|
+
group,
|
|
181
|
+
resource,
|
|
182
|
+
get,
|
|
183
|
+
post,
|
|
184
|
+
put,
|
|
185
|
+
patch,
|
|
186
|
+
del,
|
|
187
|
+
any,
|
|
188
|
+
match,
|
|
189
|
+
getRoutes,
|
|
190
|
+
});
|
|
191
|
+
export default Router;
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Plugin Manager
|
|
3
|
+
* Handles installation and removal of framework plugins.
|
|
4
|
+
*/
|
|
5
|
+
import { PluginDefinition } from './PluginRegistry';
|
|
6
|
+
export declare const PluginManager: Readonly<{
|
|
7
|
+
/**
|
|
8
|
+
* List all available plugins
|
|
9
|
+
*/
|
|
10
|
+
list(): Record<string, PluginDefinition>;
|
|
11
|
+
/**
|
|
12
|
+
* Resolve a plugin ID from an alias or full ID
|
|
13
|
+
*/
|
|
14
|
+
resolveId(idOrAlias: string): string | null;
|
|
15
|
+
/**
|
|
16
|
+
* Check if a plugin is currently installed
|
|
17
|
+
*/
|
|
18
|
+
isInstalled(pluginId: string): Promise<boolean>;
|
|
19
|
+
/**
|
|
20
|
+
* Install a plugin
|
|
21
|
+
*/
|
|
22
|
+
install(pluginId: string): Promise<void>;
|
|
23
|
+
/**
|
|
24
|
+
* Uninstall a plugin
|
|
25
|
+
* Note: This does NOT uninstall dependencies to avoid breaking other things,
|
|
26
|
+
* but it does revert the code to the "stub" state if possible, or delete the file.
|
|
27
|
+
*/
|
|
28
|
+
uninstall(pluginId: string): Promise<void>;
|
|
29
|
+
}>;
|
|
30
|
+
//# sourceMappingURL=PluginManager.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"PluginManager.d.ts","sourceRoot":"","sources":["../../../src/runtime/PluginManager.ts"],"names":[],"mappings":"AAEA;;;GAGG;AAQH,OAAO,EAAE,gBAAgB,EAAkB,MAAM,yBAAyB,CAAC;AAwG3E,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;IAoCrD;;OAEG;sBACqB,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IAkB9C;;;;OAIG;wBACuB,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;EA2ChD,CAAC"}
|
|
@@ -0,0 +1,197 @@
|
|
|
1
|
+
/* eslint-disable @typescript-eslint/require-await */
|
|
2
|
+
/* eslint-disable no-await-in-loop */
|
|
3
|
+
/**
|
|
4
|
+
* Plugin Manager
|
|
5
|
+
* Handles installation and removal of framework plugins.
|
|
6
|
+
*/
|
|
7
|
+
import { Logger } from '../config/logger';
|
|
8
|
+
import { ErrorFactory } from '../exceptions/ZintrustError';
|
|
9
|
+
import { execSync } from '../node-singletons/child-process';
|
|
10
|
+
import { fsPromises as fs } from '../node-singletons/fs';
|
|
11
|
+
import * as path from '../node-singletons/path';
|
|
12
|
+
import { fileURLToPath } from '../node-singletons/url';
|
|
13
|
+
import { PluginRegistry } from './PluginRegistry';
|
|
14
|
+
const __dirname = path.dirname(fileURLToPath(import.meta.url));
|
|
15
|
+
const PROJECT_ROOT = path.resolve(__dirname, '../../');
|
|
16
|
+
function isStringRecord(value) {
|
|
17
|
+
if (typeof value !== 'object' || value === null)
|
|
18
|
+
return false;
|
|
19
|
+
for (const v of Object.values(value)) {
|
|
20
|
+
if (typeof v !== 'string')
|
|
21
|
+
return false;
|
|
22
|
+
}
|
|
23
|
+
return true;
|
|
24
|
+
}
|
|
25
|
+
function parsePackageJsonDeps(text) {
|
|
26
|
+
const parsed = JSON.parse(text);
|
|
27
|
+
if (typeof parsed !== 'object' || parsed === null)
|
|
28
|
+
return {};
|
|
29
|
+
const obj = parsed;
|
|
30
|
+
const dependencies = isStringRecord(obj['dependencies']) ? obj['dependencies'] : undefined;
|
|
31
|
+
const devDependencies = isStringRecord(obj['devDependencies'])
|
|
32
|
+
? obj['devDependencies']
|
|
33
|
+
: undefined;
|
|
34
|
+
return { dependencies, devDependencies };
|
|
35
|
+
}
|
|
36
|
+
function getPluginOrThrow(pluginId) {
|
|
37
|
+
const resolvedId = PluginManager.resolveId(pluginId);
|
|
38
|
+
if (resolvedId === null) {
|
|
39
|
+
throw ErrorFactory.createNotFoundError(`Plugin ${pluginId} not found`, { pluginId });
|
|
40
|
+
}
|
|
41
|
+
return { resolvedId, plugin: PluginRegistry[resolvedId] };
|
|
42
|
+
}
|
|
43
|
+
function npmInstall(packages, options) {
|
|
44
|
+
if (packages.length === 0)
|
|
45
|
+
return;
|
|
46
|
+
Logger.info(`Installing ${options.label}: ${packages.join(', ')}...`);
|
|
47
|
+
const devFlag = options.dev ? '-D ' : '';
|
|
48
|
+
try {
|
|
49
|
+
const cmd = `npm install ${devFlag}${packages.join(' ')}`; // NOSONAR
|
|
50
|
+
execSync(cmd, {
|
|
51
|
+
stdio: 'inherit',
|
|
52
|
+
cwd: PROJECT_ROOT,
|
|
53
|
+
});
|
|
54
|
+
}
|
|
55
|
+
catch (error) {
|
|
56
|
+
ErrorFactory.createCliError(`Failed to install ${options.label}`, { error });
|
|
57
|
+
throw error;
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
async function copyPluginTemplates(plugin) {
|
|
61
|
+
for (const template of plugin.templates) {
|
|
62
|
+
const sourcePath = path.join(PROJECT_ROOT, 'src/templates', template.source);
|
|
63
|
+
const destPath = path.join(PROJECT_ROOT, template.destination);
|
|
64
|
+
Logger.info(`Copying ${template.source} to ${template.destination}...`);
|
|
65
|
+
try {
|
|
66
|
+
// Ensure destination directory exists
|
|
67
|
+
await fs.mkdir(path.dirname(destPath), { recursive: true });
|
|
68
|
+
// Read and write file
|
|
69
|
+
const content = await fs.readFile(sourcePath, 'utf-8');
|
|
70
|
+
await fs.writeFile(destPath, content, 'utf-8');
|
|
71
|
+
}
|
|
72
|
+
catch (error) {
|
|
73
|
+
ErrorFactory.createCliError(`Failed to copy template ${template.source}`, { error });
|
|
74
|
+
throw error;
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
function runPostInstall(plugin) {
|
|
79
|
+
if (!plugin.postInstall)
|
|
80
|
+
return;
|
|
81
|
+
if (plugin.postInstall.command !== undefined) {
|
|
82
|
+
Logger.info(`Running post-install command: ${plugin.postInstall.command}...`);
|
|
83
|
+
try {
|
|
84
|
+
execSync(plugin.postInstall.command, {
|
|
85
|
+
stdio: 'inherit',
|
|
86
|
+
cwd: PROJECT_ROOT,
|
|
87
|
+
});
|
|
88
|
+
}
|
|
89
|
+
catch (error) {
|
|
90
|
+
ErrorFactory.createCliError('Post-install command failed', { error });
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
if (plugin.postInstall.message !== undefined && plugin.postInstall.message.length > 0) {
|
|
94
|
+
Logger.info('----------------------------------------');
|
|
95
|
+
Logger.info(plugin.postInstall.message);
|
|
96
|
+
Logger.info('----------------------------------------');
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
export const PluginManager = Object.freeze({
|
|
100
|
+
/**
|
|
101
|
+
* List all available plugins
|
|
102
|
+
*/
|
|
103
|
+
list() {
|
|
104
|
+
return PluginRegistry;
|
|
105
|
+
},
|
|
106
|
+
/**
|
|
107
|
+
* Resolve a plugin ID from an alias or full ID
|
|
108
|
+
*/
|
|
109
|
+
resolveId(idOrAlias) {
|
|
110
|
+
if (PluginRegistry[idOrAlias] !== undefined)
|
|
111
|
+
return idOrAlias;
|
|
112
|
+
for (const [id, plugin] of Object.entries(PluginRegistry)) {
|
|
113
|
+
if (plugin.aliases.includes(idOrAlias)) {
|
|
114
|
+
return id;
|
|
115
|
+
}
|
|
116
|
+
}
|
|
117
|
+
return null;
|
|
118
|
+
},
|
|
119
|
+
/**
|
|
120
|
+
* Check if a plugin is currently installed
|
|
121
|
+
*/
|
|
122
|
+
async isInstalled(pluginId) {
|
|
123
|
+
const resolvedId = PluginManager.resolveId(pluginId);
|
|
124
|
+
if (resolvedId === null) {
|
|
125
|
+
throw ErrorFactory.createNotFoundError(`Plugin ${pluginId} not found`, { pluginId });
|
|
126
|
+
}
|
|
127
|
+
const plugin = PluginRegistry[resolvedId];
|
|
128
|
+
// Check if the main template file exists in the destination
|
|
129
|
+
// We assume if the first template exists, the plugin is "installed"
|
|
130
|
+
if (plugin.templates.length > 0) {
|
|
131
|
+
const destPath = path.join(PROJECT_ROOT, plugin.templates[0].destination);
|
|
132
|
+
try {
|
|
133
|
+
await fs.access(destPath);
|
|
134
|
+
// Also check if dependencies are in package.json
|
|
135
|
+
const packageJsonPath = path.join(PROJECT_ROOT, 'package.json');
|
|
136
|
+
const packageJsonText = await fs.readFile(packageJsonPath, 'utf-8');
|
|
137
|
+
const packageJson = parsePackageJsonDeps(packageJsonText);
|
|
138
|
+
const hasDeps = plugin.dependencies.every((dep) => packageJson.dependencies?.[dep] ?? packageJson.devDependencies?.[dep] ?? '');
|
|
139
|
+
return hasDeps;
|
|
140
|
+
}
|
|
141
|
+
catch {
|
|
142
|
+
ErrorFactory.createCliError(`Plugin ${plugin.name} not installed (missing files or dependencies)`);
|
|
143
|
+
return false;
|
|
144
|
+
}
|
|
145
|
+
}
|
|
146
|
+
return false;
|
|
147
|
+
},
|
|
148
|
+
/**
|
|
149
|
+
* Install a plugin
|
|
150
|
+
*/
|
|
151
|
+
async install(pluginId) {
|
|
152
|
+
const { plugin } = getPluginOrThrow(pluginId);
|
|
153
|
+
Logger.info(`Installing plugin: ${plugin.name}...`);
|
|
154
|
+
// 1. Install dependencies
|
|
155
|
+
npmInstall(plugin.dependencies, { dev: false, label: 'dependencies' });
|
|
156
|
+
npmInstall(plugin.devDependencies, { dev: true, label: 'dev dependencies' });
|
|
157
|
+
// 2. Copy templates
|
|
158
|
+
await copyPluginTemplates(plugin);
|
|
159
|
+
// 3. Post-Install
|
|
160
|
+
runPostInstall(plugin);
|
|
161
|
+
Logger.info(`✓ Plugin ${plugin.name} installed successfully`);
|
|
162
|
+
},
|
|
163
|
+
/**
|
|
164
|
+
* Uninstall a plugin
|
|
165
|
+
* Note: This does NOT uninstall dependencies to avoid breaking other things,
|
|
166
|
+
* but it does revert the code to the "stub" state if possible, or delete the file.
|
|
167
|
+
*/
|
|
168
|
+
async uninstall(pluginId) {
|
|
169
|
+
const resolvedId = PluginManager.resolveId(pluginId);
|
|
170
|
+
if (resolvedId === null) {
|
|
171
|
+
throw ErrorFactory.createNotFoundError(`Plugin ${pluginId} not found`, { pluginId });
|
|
172
|
+
}
|
|
173
|
+
const plugin = PluginRegistry[resolvedId];
|
|
174
|
+
Logger.info(`Uninstalling plugin: ${plugin.name}...`);
|
|
175
|
+
// Revert templates to stubs
|
|
176
|
+
// For now, we'll just delete the file if it's an adapter,
|
|
177
|
+
// BUT wait - we need the stubs to exist for the framework to compile if they are referenced.
|
|
178
|
+
// However, in the "Template" architecture, the stubs ARE the default state.
|
|
179
|
+
// So "uninstalling" might mean "restoring the stub".
|
|
180
|
+
// Since we don't have a "stub repository" easily accessible here without reading from git or a backup,
|
|
181
|
+
// and the user might have modified the file, "uninstall" is tricky.
|
|
182
|
+
// Strategy:
|
|
183
|
+
// 1. Warn the user that this will delete the file.
|
|
184
|
+
// 2. If it's a core adapter, we should probably restore a basic stub.
|
|
185
|
+
// For this iteration, we will just warn and delete, assuming the user knows what they are doing.
|
|
186
|
+
// OR, better: We can have a "stubs" folder in templates too?
|
|
187
|
+
// Actually, the "stubs" are what is currently in the codebase.
|
|
188
|
+
// When we "install", we overwrite the stub.
|
|
189
|
+
// When we "uninstall", we should ideally restore the stub.
|
|
190
|
+
// Let's check if we have a stub backup. If not, maybe we just leave the file but warn?
|
|
191
|
+
// Or maybe we don't support "uninstall" fully yet, just "install".
|
|
192
|
+
Logger.warn('Uninstalling plugins is not fully automated yet. You may need to manually revert file changes.');
|
|
193
|
+
// We can at least try to remove the dependencies if they are not used elsewhere?
|
|
194
|
+
// Too risky.
|
|
195
|
+
Logger.info(`✓ Plugin ${plugin.name} uninstalled (files preserved, please revert manually if needed)`);
|
|
196
|
+
},
|
|
197
|
+
});
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Plugin Registry
|
|
3
|
+
* Defines available plugins, their dependencies, and template paths.
|
|
4
|
+
*/
|
|
5
|
+
export interface PluginDefinition {
|
|
6
|
+
name: string;
|
|
7
|
+
description: string;
|
|
8
|
+
type: 'database-adapter' | 'feature';
|
|
9
|
+
aliases: string[];
|
|
10
|
+
dependencies: string[];
|
|
11
|
+
devDependencies: string[];
|
|
12
|
+
templates: {
|
|
13
|
+
source: string;
|
|
14
|
+
destination: string;
|
|
15
|
+
}[];
|
|
16
|
+
postInstall?: {
|
|
17
|
+
message?: string;
|
|
18
|
+
command?: string;
|
|
19
|
+
};
|
|
20
|
+
}
|
|
21
|
+
export declare const PluginRegistry: Record<string, PluginDefinition>;
|
|
22
|
+
//# sourceMappingURL=PluginRegistry.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"PluginRegistry.d.ts","sourceRoot":"","sources":["../../../src/runtime/PluginRegistry.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,MAAM,WAAW,gBAAgB;IAC/B,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,EAAE,MAAM,CAAC;IACpB,IAAI,EAAE,kBAAkB,GAAG,SAAS,CAAC;IACrC,OAAO,EAAE,MAAM,EAAE,CAAC;IAClB,YAAY,EAAE,MAAM,EAAE,CAAC;IACvB,eAAe,EAAE,MAAM,EAAE,CAAC;IAC1B,SAAS,EAAE;QACT,MAAM,EAAE,MAAM,CAAC;QACf,WAAW,EAAE,MAAM,CAAC;KACrB,EAAE,CAAC;IACJ,WAAW,CAAC,EAAE;QACZ,OAAO,CAAC,EAAE,MAAM,CAAC;QACjB,OAAO,CAAC,EAAE,MAAM,CAAC;KAClB,CAAC;CACH;AAED,eAAO,MAAM,cAAc,EAAE,MAAM,CAAC,MAAM,EAAE,gBAAgB,CAwF3D,CAAC"}
|
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Plugin Registry
|
|
3
|
+
* Defines available plugins, their dependencies, and template paths.
|
|
4
|
+
*/
|
|
5
|
+
export const PluginRegistry = {
|
|
6
|
+
'feature:auth': {
|
|
7
|
+
name: 'Authentication Feature',
|
|
8
|
+
description: 'JWT and Bcrypt based authentication helper',
|
|
9
|
+
type: 'feature',
|
|
10
|
+
aliases: ['f:auth', 'auth'],
|
|
11
|
+
dependencies: ['jsonwebtoken', 'bcrypt'],
|
|
12
|
+
devDependencies: ['@types/jsonwebtoken', '@types/bcrypt'],
|
|
13
|
+
templates: [
|
|
14
|
+
{
|
|
15
|
+
source: 'features/Auth.ts.tpl',
|
|
16
|
+
destination: 'src/features/Auth.ts',
|
|
17
|
+
},
|
|
18
|
+
],
|
|
19
|
+
postInstall: {
|
|
20
|
+
message: 'Authentication installed! Please add JWT_SECRET to your .env file.',
|
|
21
|
+
},
|
|
22
|
+
},
|
|
23
|
+
'feature:queue': {
|
|
24
|
+
name: 'Queue Feature',
|
|
25
|
+
description: 'Simple job queue interface (In-Memory default)',
|
|
26
|
+
type: 'feature',
|
|
27
|
+
aliases: ['f:queue', 'queue'],
|
|
28
|
+
dependencies: [],
|
|
29
|
+
devDependencies: [],
|
|
30
|
+
templates: [
|
|
31
|
+
{
|
|
32
|
+
source: 'features/Queue.ts.tpl',
|
|
33
|
+
destination: 'src/features/Queue.ts',
|
|
34
|
+
},
|
|
35
|
+
],
|
|
36
|
+
},
|
|
37
|
+
'adapter:postgres': {
|
|
38
|
+
name: 'PostgreSQL Adapter',
|
|
39
|
+
description: 'Production-ready PostgreSQL database adapter using pg',
|
|
40
|
+
type: 'database-adapter',
|
|
41
|
+
aliases: ['a:postgres', 'pg'],
|
|
42
|
+
dependencies: ['pg'],
|
|
43
|
+
devDependencies: ['@types/pg'],
|
|
44
|
+
templates: [
|
|
45
|
+
{
|
|
46
|
+
source: 'adapters/PostgreSQLAdapter.ts.tpl',
|
|
47
|
+
destination: 'src/orm/adapters/PostgreSQLAdapter.ts',
|
|
48
|
+
},
|
|
49
|
+
],
|
|
50
|
+
},
|
|
51
|
+
'adapter:mysql': {
|
|
52
|
+
name: 'MySQL Adapter',
|
|
53
|
+
description: 'Production-ready MySQL database adapter using mysql2',
|
|
54
|
+
type: 'database-adapter',
|
|
55
|
+
aliases: ['a:mysql', 'mysql'],
|
|
56
|
+
dependencies: ['mysql2'],
|
|
57
|
+
devDependencies: [],
|
|
58
|
+
templates: [
|
|
59
|
+
{
|
|
60
|
+
source: 'adapters/MySQLAdapter.ts.tpl',
|
|
61
|
+
destination: 'src/orm/adapters/MySQLAdapter.ts',
|
|
62
|
+
},
|
|
63
|
+
],
|
|
64
|
+
},
|
|
65
|
+
'adapter:mssql': {
|
|
66
|
+
name: 'SQL Server Adapter',
|
|
67
|
+
description: 'Production-ready SQL Server database adapter using mssql',
|
|
68
|
+
type: 'database-adapter',
|
|
69
|
+
aliases: ['a:mssql', 'mssql'],
|
|
70
|
+
dependencies: ['mssql'],
|
|
71
|
+
devDependencies: [],
|
|
72
|
+
templates: [
|
|
73
|
+
{
|
|
74
|
+
source: 'adapters/SQLServerAdapter.ts.tpl',
|
|
75
|
+
destination: 'src/orm/adapters/SQLServerAdapter.ts',
|
|
76
|
+
},
|
|
77
|
+
],
|
|
78
|
+
},
|
|
79
|
+
'adapter:sqlite': {
|
|
80
|
+
name: 'SQLite Adapter',
|
|
81
|
+
description: 'Production-ready SQLite database adapter using better-sqlite3',
|
|
82
|
+
type: 'database-adapter',
|
|
83
|
+
aliases: ['a:sqlite', 'sqlite'],
|
|
84
|
+
dependencies: ['better-sqlite3'],
|
|
85
|
+
devDependencies: ['@types/better-sqlite3'],
|
|
86
|
+
templates: [
|
|
87
|
+
{
|
|
88
|
+
source: 'adapters/SQLiteAdapter.ts.tpl',
|
|
89
|
+
destination: 'src/orm/adapters/SQLiteAdapter.ts',
|
|
90
|
+
},
|
|
91
|
+
],
|
|
92
|
+
},
|
|
93
|
+
};
|
|
@@ -0,0 +1,126 @@
|
|
|
1
|
+
import type { IncomingMessage, ServerResponse } from '../node-singletons/http';
|
|
2
|
+
type Tbody = string | Buffer | null;
|
|
3
|
+
/**
|
|
4
|
+
* Request body type for handlers
|
|
5
|
+
*/
|
|
6
|
+
export type IRequestBody = Buffer;
|
|
7
|
+
/**
|
|
8
|
+
* HTTP request/response for serverless and edge platforms
|
|
9
|
+
*/
|
|
10
|
+
export interface PlatformRequest {
|
|
11
|
+
method: string;
|
|
12
|
+
path: string;
|
|
13
|
+
headers: Record<string, string | string[]>;
|
|
14
|
+
body?: Tbody;
|
|
15
|
+
query?: Record<string, string | string[]>;
|
|
16
|
+
remoteAddr?: string;
|
|
17
|
+
}
|
|
18
|
+
export interface PlatformResponse {
|
|
19
|
+
statusCode: number;
|
|
20
|
+
headers: Record<string, string | string[]>;
|
|
21
|
+
body?: Tbody;
|
|
22
|
+
isBase64Encoded?: boolean;
|
|
23
|
+
}
|
|
24
|
+
/**
|
|
25
|
+
* RuntimeAdapter interface for platform-agnostic HTTP handling
|
|
26
|
+
* Allows single codebase deployment to Lambda, Fargate, Cloudflare, Deno
|
|
27
|
+
*/
|
|
28
|
+
export interface RuntimeAdapter {
|
|
29
|
+
/**
|
|
30
|
+
* Platform identifier
|
|
31
|
+
*/
|
|
32
|
+
platform: 'nodejs' | 'lambda' | 'fargate' | 'cloudflare' | 'deno';
|
|
33
|
+
/**
|
|
34
|
+
* Handle platform-specific request event
|
|
35
|
+
* Convert to standard HTTP format, process, and normalize response
|
|
36
|
+
*/
|
|
37
|
+
handle(event: unknown, context?: unknown): Promise<PlatformResponse>;
|
|
38
|
+
/**
|
|
39
|
+
* Convert platform event to standard PlatformRequest
|
|
40
|
+
*/
|
|
41
|
+
parseRequest(event: unknown): PlatformRequest;
|
|
42
|
+
/**
|
|
43
|
+
* Convert Zintrust response to platform-specific format
|
|
44
|
+
*/
|
|
45
|
+
formatResponse(response: PlatformResponse): unknown;
|
|
46
|
+
/**
|
|
47
|
+
* Get platform-specific logger for debugging
|
|
48
|
+
*/
|
|
49
|
+
getLogger(): {
|
|
50
|
+
debug(msg: string, data?: unknown): void;
|
|
51
|
+
info(msg: string, data?: unknown): void;
|
|
52
|
+
warn(msg: string, data?: unknown): void;
|
|
53
|
+
error(msg: string, err?: Error): void;
|
|
54
|
+
};
|
|
55
|
+
/**
|
|
56
|
+
* Check if platform supports persistent connections
|
|
57
|
+
*/
|
|
58
|
+
supportsPersistentConnections(): boolean;
|
|
59
|
+
/**
|
|
60
|
+
* Get environment configuration object
|
|
61
|
+
*/
|
|
62
|
+
getEnvironment(): {
|
|
63
|
+
nodeEnv: string;
|
|
64
|
+
runtime: string;
|
|
65
|
+
dbConnection: string;
|
|
66
|
+
dbHost?: string;
|
|
67
|
+
dbPort?: number;
|
|
68
|
+
[key: string]: unknown;
|
|
69
|
+
};
|
|
70
|
+
}
|
|
71
|
+
/**
|
|
72
|
+
* Request handler that processes HTTP requests through Zintrust framework
|
|
73
|
+
*/
|
|
74
|
+
export type ZintrustHandler = (req: IncomingMessage, res: ServerResponse, body: Tbody) => Promise<void>;
|
|
75
|
+
/**
|
|
76
|
+
* Adapter configuration options
|
|
77
|
+
*/
|
|
78
|
+
export interface AdapterConfig {
|
|
79
|
+
handler: ZintrustHandler;
|
|
80
|
+
logger?: {
|
|
81
|
+
debug(msg: string, data?: unknown): void;
|
|
82
|
+
info(msg: string, data?: unknown): void;
|
|
83
|
+
warn(msg: string, data?: unknown): void;
|
|
84
|
+
error(msg: string, err?: Error): void;
|
|
85
|
+
};
|
|
86
|
+
timeout?: number;
|
|
87
|
+
maxBodySize?: number;
|
|
88
|
+
}
|
|
89
|
+
/**
|
|
90
|
+
* Response wrapper for normalizing HTTP responses across platforms
|
|
91
|
+
*/
|
|
92
|
+
export interface IHttpResponse {
|
|
93
|
+
statusCode: number;
|
|
94
|
+
headers: Record<string, string | string[]>;
|
|
95
|
+
body: Tbody;
|
|
96
|
+
isBase64Encoded: boolean;
|
|
97
|
+
setStatus(code: number): IHttpResponse;
|
|
98
|
+
setHeader(key: string, value: string | string[]): IHttpResponse;
|
|
99
|
+
setHeaders(headers: Record<string, string | string[]>): IHttpResponse;
|
|
100
|
+
setBody(body: Tbody, isBase64?: boolean): IHttpResponse;
|
|
101
|
+
setJSON(data: unknown): IHttpResponse;
|
|
102
|
+
toResponse(): PlatformResponse;
|
|
103
|
+
}
|
|
104
|
+
export declare const HttpResponse: Readonly<{
|
|
105
|
+
create(): IHttpResponse;
|
|
106
|
+
}>;
|
|
107
|
+
/**
|
|
108
|
+
* Error response helper
|
|
109
|
+
*/
|
|
110
|
+
export declare const ErrorResponse: Readonly<{
|
|
111
|
+
create(statusCode: number, message: string, details?: unknown): IHttpResponse;
|
|
112
|
+
}>;
|
|
113
|
+
/**
|
|
114
|
+
* Create mock Node.js request/response objects for platform compatibility
|
|
115
|
+
*/
|
|
116
|
+
export declare function createMockHttpObjects(request: PlatformRequest): {
|
|
117
|
+
req: Record<string, unknown>;
|
|
118
|
+
res: Record<string, unknown>;
|
|
119
|
+
responseData: {
|
|
120
|
+
statusCode: number;
|
|
121
|
+
headers: Record<string, string | string[]>;
|
|
122
|
+
body: Tbody;
|
|
123
|
+
};
|
|
124
|
+
};
|
|
125
|
+
export {};
|
|
126
|
+
//# sourceMappingURL=RuntimeAdapter.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"RuntimeAdapter.d.ts","sourceRoot":"","sources":["../../../src/runtime/RuntimeAdapter.ts"],"names":[],"mappings":"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"}
|