@zintrust/core 0.1.18 → 0.1.20
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +16 -10
- package/bin/zintrust-main.d.ts.map +1 -1
- package/bin/zintrust-main.js +9 -0
- package/package.json +11 -2
- package/public/error-pages/404.html +145 -0
- package/public/error-pages/500.html +266 -0
- package/public/error-pages/error.css +628 -0
- package/public/error-pages/error.js +428 -0
- package/public/index.html +1 -1
- package/public/zintrust.svg +30 -0
- package/routes/api.d.ts +7 -0
- package/routes/api.d.ts.map +1 -0
- package/routes/api.js +115 -0
- package/routes/broadcast.d.ts +9 -0
- package/routes/broadcast.d.ts.map +1 -0
- package/routes/broadcast.js +27 -0
- package/routes/health.d.ts +7 -0
- package/routes/health.d.ts.map +1 -0
- package/routes/health.js +127 -0
- package/routes/metrics.d.ts +9 -0
- package/routes/metrics.d.ts.map +1 -0
- package/routes/metrics.js +20 -0
- package/routes/openapi.d.ts +9 -0
- package/routes/openapi.d.ts.map +1 -0
- package/routes/openapi.js +76 -0
- package/routes/storage.d.ts +4 -0
- package/routes/storage.d.ts.map +1 -0
- package/routes/storage.js +35 -0
- package/src/boot/Application.d.ts +2 -2
- package/src/boot/Application.d.ts.map +1 -1
- package/src/boot/Application.js +18 -3
- package/src/boot/Server.d.ts +3 -2
- package/src/boot/Server.d.ts.map +1 -1
- package/src/boot/Server.js +39 -165
- package/src/boot/bootstrap.js +1 -1
- package/src/cache/Cache.d.ts +1 -1
- package/src/cache/Cache.d.ts.map +1 -1
- package/src/cache/CacheDriver.d.ts +4 -0
- package/src/cache/CacheDriver.d.ts.map +1 -1
- package/src/cache/drivers/KVDriver.d.ts +1 -1
- package/src/cache/drivers/KVDriver.d.ts.map +1 -1
- package/src/cache/drivers/MemoryDriver.d.ts +1 -1
- package/src/cache/drivers/MemoryDriver.d.ts.map +1 -1
- package/src/cache/drivers/MemoryDriver.js +16 -0
- package/src/cache/drivers/MongoDriver.d.ts +1 -1
- package/src/cache/drivers/MongoDriver.d.ts.map +1 -1
- package/src/cache/drivers/RedisDriver.d.ts +1 -1
- package/src/cache/drivers/RedisDriver.d.ts.map +1 -1
- package/src/cli/CLI.d.ts.map +1 -1
- package/src/cli/CLI.js +12 -4
- package/src/cli/PromptHelper.d.ts.map +1 -1
- package/src/cli/PromptHelper.js +4 -3
- package/src/cli/commands/AddCommand.d.ts +2 -2
- package/src/cli/commands/AddCommand.d.ts.map +1 -1
- package/src/cli/commands/AddCommand.js +135 -58
- package/src/cli/commands/ConfigCommand.d.ts +1 -1
- package/src/cli/commands/ConfigCommand.d.ts.map +1 -1
- package/src/cli/commands/CreateCommand.d.ts +15 -0
- package/src/cli/commands/CreateCommand.d.ts.map +1 -0
- package/src/cli/commands/CreateCommand.js +143 -0
- package/src/cli/commands/D1MigrateCommand.d.ts +1 -1
- package/src/cli/commands/D1MigrateCommand.d.ts.map +1 -1
- package/src/cli/commands/D1MigrateCommand.js +16 -20
- package/src/cli/commands/DbSeedCommand.d.ts +9 -0
- package/src/cli/commands/DbSeedCommand.d.ts.map +1 -0
- package/src/cli/commands/DbSeedCommand.js +171 -0
- package/src/cli/commands/DebugCommand.d.ts +1 -1
- package/src/cli/commands/DebugCommand.d.ts.map +1 -1
- package/src/cli/commands/FixCommand.d.ts +1 -1
- package/src/cli/commands/FixCommand.d.ts.map +1 -1
- package/src/cli/commands/JwtDevCommand.d.ts +8 -0
- package/src/cli/commands/JwtDevCommand.d.ts.map +1 -0
- package/src/cli/commands/JwtDevCommand.js +114 -0
- package/src/cli/commands/KeyGenerateCommand.d.ts +1 -1
- package/src/cli/commands/KeyGenerateCommand.d.ts.map +1 -1
- package/src/cli/commands/LogsCommand.d.ts +2 -2
- package/src/cli/commands/LogsCommand.d.ts.map +1 -1
- package/src/cli/commands/LogsCommand.js +36 -2
- package/src/cli/commands/MakeMailTemplateCommand.d.ts +1 -1
- package/src/cli/commands/MakeMailTemplateCommand.d.ts.map +1 -1
- package/src/cli/commands/MakeNotificationTemplateCommand.d.ts +1 -1
- package/src/cli/commands/MakeNotificationTemplateCommand.d.ts.map +1 -1
- package/src/cli/commands/MigrateCommand.d.ts +1 -1
- package/src/cli/commands/MigrateCommand.d.ts.map +1 -1
- package/src/cli/commands/MigrateCommand.js +291 -35
- package/src/cli/commands/NewCommand.d.ts +2 -2
- package/src/cli/commands/NewCommand.d.ts.map +1 -1
- package/src/cli/commands/NewCommand.js +38 -13
- package/src/cli/commands/PluginCommand.d.ts +1 -1
- package/src/cli/commands/PluginCommand.d.ts.map +1 -1
- package/src/cli/commands/PrepareCommand.d.ts +1 -1
- package/src/cli/commands/PrepareCommand.d.ts.map +1 -1
- package/src/cli/commands/QACommand.d.ts +2 -2
- package/src/cli/commands/QACommand.d.ts.map +1 -1
- package/src/cli/commands/RoutesCommand.d.ts +10 -0
- package/src/cli/commands/RoutesCommand.d.ts.map +1 -0
- package/src/cli/commands/RoutesCommand.js +242 -0
- package/src/cli/commands/SimulateCommand.d.ts +1 -1
- package/src/cli/commands/SimulateCommand.d.ts.map +1 -1
- package/src/cli/commands/SimulateCommand.js +1 -1
- package/src/cli/commands/StartCommand.d.ts.map +1 -1
- package/src/cli/commands/StartCommand.js +90 -3
- package/src/cli/commands/UpgradeCommand.d.ts +16 -0
- package/src/cli/commands/UpgradeCommand.d.ts.map +1 -0
- package/src/cli/commands/UpgradeCommand.js +107 -0
- package/src/cli/commands/index.d.ts +3 -0
- package/src/cli/commands/index.d.ts.map +1 -1
- package/src/cli/commands/index.js +3 -0
- package/src/cli/commands/runner/index.d.ts +3 -0
- package/src/cli/commands/runner/index.d.ts.map +1 -0
- package/src/cli/commands/runner/index.js +139 -0
- package/src/cli/config/ConfigManager.d.ts +1 -1
- package/src/cli/config/ConfigManager.d.ts.map +1 -1
- package/src/cli/config/ConfigValidator.d.ts +1 -1
- package/src/cli/config/ConfigValidator.d.ts.map +1 -1
- package/src/cli/config/ConfigValidator.js +1 -1
- package/src/cli/d1/D1SqlMigrations.d.ts +20 -0
- package/src/cli/d1/D1SqlMigrations.d.ts.map +1 -0
- package/src/cli/d1/D1SqlMigrations.js +224 -0
- package/src/cli/d1/WranglerConfig.d.ts +4 -0
- package/src/cli/d1/WranglerConfig.d.ts.map +1 -0
- package/src/cli/d1/WranglerConfig.js +122 -0
- package/src/cli/d1/WranglerD1.d.ts +11 -0
- package/src/cli/d1/WranglerD1.d.ts.map +1 -0
- package/src/cli/d1/WranglerD1.js +16 -0
- package/src/cli/env/EnvFileBackfill.d.ts +10 -0
- package/src/cli/env/EnvFileBackfill.d.ts.map +1 -0
- package/src/cli/env/EnvFileBackfill.js +64 -0
- package/src/cli/scaffolding/ControllerGenerator.d.ts.map +1 -1
- package/src/cli/scaffolding/ControllerGenerator.js +72 -22
- package/src/cli/scaffolding/FactoryGenerator.d.ts.map +1 -1
- package/src/cli/scaffolding/FactoryGenerator.js +3 -1
- package/src/cli/scaffolding/GovernanceScaffolder.d.ts +23 -0
- package/src/cli/scaffolding/GovernanceScaffolder.d.ts.map +1 -0
- package/src/cli/scaffolding/GovernanceScaffolder.js +327 -0
- package/src/cli/scaffolding/MigrationGenerator.d.ts +10 -0
- package/src/cli/scaffolding/MigrationGenerator.d.ts.map +1 -1
- package/src/cli/scaffolding/MigrationGenerator.js +137 -51
- package/src/cli/scaffolding/ProjectScaffolder.d.ts.map +1 -1
- package/src/cli/scaffolding/ProjectScaffolder.js +54 -59
- package/src/cli/scaffolding/RouteGenerator.d.ts.map +1 -1
- package/src/cli/scaffolding/RouteGenerator.js +79 -43
- package/src/cli/scaffolding/SeederGenerator.d.ts +5 -0
- package/src/cli/scaffolding/SeederGenerator.d.ts.map +1 -1
- package/src/cli/scaffolding/SeederGenerator.js +63 -15
- package/src/cli/scaffolding/ServiceScaffolder.d.ts.map +1 -1
- package/src/cli/scaffolding/ServiceScaffolder.js +24 -3
- package/src/cli/scaffolding/index.d.ts +2 -0
- package/src/cli/scaffolding/index.d.ts.map +1 -1
- package/src/cli/scaffolding/index.js +1 -0
- package/src/cli/utils/DistPackager.d.ts.map +1 -1
- package/src/cli/utils/DistPackager.js +8 -0
- package/src/common/index.d.ts +8 -0
- package/src/common/index.d.ts.map +1 -1
- package/src/common/index.js +28 -0
- package/src/common/utility.d.ts +38 -0
- package/src/common/utility.d.ts.map +1 -0
- package/src/common/utility.js +101 -0
- package/src/config/FileLogWriter.d.ts +2 -1
- package/src/config/FileLogWriter.d.ts.map +1 -1
- package/src/config/FileLogWriter.js +83 -2
- package/src/config/app.d.ts.map +1 -1
- package/src/config/app.js +3 -1
- package/src/config/broadcast.d.ts +1 -1
- package/src/config/broadcast.d.ts.map +1 -1
- package/src/config/broadcast.js +1 -1
- package/src/config/cache.d.ts +1 -1
- package/src/config/cache.d.ts.map +1 -1
- package/src/config/cloudflare.d.ts +1 -1
- package/src/config/cloudflare.d.ts.map +1 -1
- package/src/config/database.d.ts +7 -1
- package/src/config/database.d.ts.map +1 -1
- package/src/config/database.js +99 -7
- package/src/config/env.d.ts +6 -0
- package/src/config/env.d.ts.map +1 -1
- package/src/config/env.js +7 -0
- package/src/config/index.d.ts +8 -2
- package/src/config/index.d.ts.map +1 -1
- package/src/config/logging/KvLogger.js +1 -1
- package/src/config/logging/SlackLogger.js +2 -2
- package/src/config/middleware.d.ts +22 -2
- package/src/config/middleware.d.ts.map +1 -1
- package/src/config/middleware.js +179 -11
- package/src/config/notification.js +1 -1
- package/src/config/security.d.ts +1 -1
- package/src/config/security.js +1 -1
- package/src/config/storage.js +1 -1
- package/src/config/type.d.ts +8 -2
- package/src/config/type.d.ts.map +1 -1
- package/src/events/EventDispatcher.d.ts.map +1 -1
- package/src/events/EventDispatcher.js +6 -4
- package/src/exceptions/ZintrustError.d.ts +7 -0
- package/src/exceptions/ZintrustError.d.ts.map +1 -1
- package/src/exceptions/ZintrustError.js +56 -0
- package/src/features/Auth.d.ts +1 -1
- package/src/features/Auth.d.ts.map +1 -1
- package/src/features/Auth.js +3 -3
- package/src/features/Queue.js +1 -1
- package/src/functions/cloudflare.d.ts.map +1 -1
- package/src/functions/cloudflare.js +3 -14
- package/src/functions/deno.d.ts.map +1 -1
- package/src/functions/deno.js +3 -14
- package/src/functions/lambda.d.ts.map +1 -1
- package/src/functions/lambda.js +3 -14
- package/src/health/StartupHealthChecks.js +1 -1
- package/src/http/Controller.d.ts +2 -2
- package/src/http/Controller.d.ts.map +1 -1
- package/src/http/FileUpload.d.ts +68 -0
- package/src/http/FileUpload.d.ts.map +1 -0
- package/src/http/FileUpload.js +120 -0
- package/src/http/Kernel.d.ts +5 -5
- package/src/http/Kernel.d.ts.map +1 -1
- package/src/http/Kernel.js +139 -23
- package/src/http/Request.d.ts +20 -1
- package/src/http/Request.d.ts.map +1 -1
- package/src/http/Request.js +23 -0
- package/src/http/RequestContext.d.ts +6 -0
- package/src/http/RequestContext.d.ts.map +1 -1
- package/src/http/RequestContext.js +77 -1
- package/src/http/Response.d.ts +1 -1
- package/src/http/Response.d.ts.map +1 -1
- package/src/http/ValidationHelper.d.ts +78 -0
- package/src/http/ValidationHelper.d.ts.map +1 -0
- package/src/http/ValidationHelper.js +121 -0
- package/src/http/error-pages/ErrorPageRenderer.d.ts +17 -0
- package/src/http/error-pages/ErrorPageRenderer.d.ts.map +1 -0
- package/src/http/error-pages/ErrorPageRenderer.js +88 -0
- package/src/http/middleware/BodyParsingMiddleware.d.ts +12 -0
- package/src/http/middleware/BodyParsingMiddleware.d.ts.map +1 -0
- package/src/http/middleware/BodyParsingMiddleware.js +251 -0
- package/src/http/middleware/FileUploadMiddleware.d.ts +12 -0
- package/src/http/middleware/FileUploadMiddleware.d.ts.map +1 -0
- package/src/http/middleware/FileUploadMiddleware.js +74 -0
- package/src/http/parsers/BodyParsers.d.ts +32 -0
- package/src/http/parsers/BodyParsers.d.ts.map +1 -0
- package/src/http/parsers/BodyParsers.js +159 -0
- package/src/http/parsers/MultipartParser.d.ts +33 -0
- package/src/http/parsers/MultipartParser.d.ts.map +1 -0
- package/src/http/parsers/MultipartParser.js +129 -0
- package/src/http/parsers/MultipartParserRegistry.d.ts +34 -0
- package/src/http/parsers/MultipartParserRegistry.d.ts.map +1 -0
- package/src/http/parsers/MultipartParserRegistry.js +20 -0
- package/src/http/validated.d.ts +12 -0
- package/src/http/validated.d.ts.map +1 -0
- package/src/http/validated.js +41 -0
- package/src/index.d.ts +65 -7
- package/src/index.d.ts.map +1 -1
- package/src/index.js +59 -5
- package/src/microservices/RequestTracingMiddleware.d.ts +2 -2
- package/src/microservices/RequestTracingMiddleware.d.ts.map +1 -1
- package/src/microservices/RequestTracingMiddleware.js +3 -0
- package/src/microservices/ServiceAuthMiddleware.d.ts +2 -2
- package/src/microservices/ServiceAuthMiddleware.d.ts.map +1 -1
- package/src/middleware/AuthMiddleware.d.ts +10 -0
- package/src/middleware/AuthMiddleware.d.ts.map +1 -0
- package/src/middleware/AuthMiddleware.js +16 -0
- package/src/middleware/CsrfMiddleware.d.ts +11 -1
- package/src/middleware/CsrfMiddleware.d.ts.map +1 -1
- package/src/middleware/CsrfMiddleware.js +33 -0
- package/src/middleware/JwtAuthMiddleware.d.ts +11 -0
- package/src/middleware/JwtAuthMiddleware.d.ts.map +1 -0
- package/src/middleware/JwtAuthMiddleware.js +73 -0
- package/src/middleware/LoggingMiddleware.d.ts.map +1 -1
- package/src/middleware/LoggingMiddleware.js +8 -3
- package/src/middleware/MiddlewareStack.d.ts +2 -2
- package/src/middleware/MiddlewareStack.d.ts.map +1 -1
- package/src/middleware/RateLimiter.d.ts +2 -2
- package/src/middleware/RateLimiter.d.ts.map +1 -1
- package/src/middleware/RateLimiter.js +26 -1
- package/src/middleware/SanitizeBodyMiddleware.d.ts +12 -0
- package/src/middleware/SanitizeBodyMiddleware.d.ts.map +1 -0
- package/src/middleware/SanitizeBodyMiddleware.js +31 -0
- package/src/middleware/SecurityMiddleware.d.ts +1 -1
- package/src/middleware/SecurityMiddleware.d.ts.map +1 -1
- package/src/middleware/SessionMiddleware.d.ts +1 -1
- package/src/middleware/SessionMiddleware.d.ts.map +1 -1
- package/src/middleware/ValidationMiddleware.d.ts +25 -0
- package/src/middleware/ValidationMiddleware.d.ts.map +1 -0
- package/src/middleware/ValidationMiddleware.js +251 -0
- package/src/migrations/MigrationDiscovery.d.ts +5 -0
- package/src/migrations/MigrationDiscovery.d.ts.map +1 -0
- package/src/migrations/MigrationDiscovery.js +16 -0
- package/src/migrations/MigrationLoader.d.ts +5 -0
- package/src/migrations/MigrationLoader.d.ts.map +1 -0
- package/src/migrations/MigrationLoader.js +43 -0
- package/src/migrations/MigrationLock.d.ts +4 -0
- package/src/migrations/MigrationLock.d.ts.map +1 -0
- package/src/migrations/MigrationLock.js +33 -0
- package/src/migrations/Migrator.d.ts +23 -0
- package/src/migrations/Migrator.d.ts.map +1 -0
- package/src/migrations/Migrator.js +4 -0
- package/src/migrations/MigratorFactory.d.ts +25 -0
- package/src/migrations/MigratorFactory.d.ts.map +1 -0
- package/src/migrations/MigratorFactory.js +323 -0
- package/src/migrations/schema/Blueprint.d.ts +5 -0
- package/src/migrations/schema/Blueprint.d.ts.map +1 -0
- package/src/migrations/schema/Blueprint.js +189 -0
- package/src/migrations/schema/Schema.d.ts +8 -0
- package/src/migrations/schema/Schema.d.ts.map +1 -0
- package/src/migrations/schema/Schema.js +141 -0
- package/src/migrations/schema/SchemaCompiler.d.ts +20 -0
- package/src/migrations/schema/SchemaCompiler.d.ts.map +1 -0
- package/src/migrations/schema/SchemaCompiler.js +262 -0
- package/src/migrations/schema/index.d.ts +5 -0
- package/src/migrations/schema/index.d.ts.map +1 -0
- package/src/migrations/schema/index.js +3 -0
- package/src/migrations/schema/types.d.ts +86 -0
- package/src/migrations/schema/types.d.ts.map +1 -0
- package/src/migrations/schema/types.js +1 -0
- package/src/migrations/types.d.ts +45 -0
- package/src/migrations/types.d.ts.map +1 -0
- package/src/migrations/types.js +1 -0
- package/src/node-singletons/crypto.d.ts +1 -1
- package/src/node-singletons/crypto.d.ts.map +1 -1
- package/src/node-singletons/crypto.js +1 -1
- package/src/node-singletons/fs.d.ts +2 -2
- package/src/node-singletons/fs.d.ts.map +1 -1
- package/src/node-singletons/fs.js +1 -1
- package/src/node-singletons/util.d.ts +6 -0
- package/src/node-singletons/util.d.ts.map +1 -0
- package/src/node-singletons/util.js +5 -0
- package/src/node.d.ts +2 -0
- package/src/node.d.ts.map +1 -1
- package/src/node.js +7 -0
- package/src/observability/OpenTelemetry.d.ts +62 -0
- package/src/observability/OpenTelemetry.d.ts.map +1 -0
- package/src/observability/OpenTelemetry.js +167 -0
- package/src/observability/PrometheusMetrics.d.ts +25 -0
- package/src/observability/PrometheusMetrics.d.ts.map +1 -0
- package/src/observability/PrometheusMetrics.js +114 -0
- package/src/openapi/OpenApiGenerator.d.ts +68 -0
- package/src/openapi/OpenApiGenerator.d.ts.map +1 -0
- package/src/openapi/OpenApiGenerator.js +287 -0
- package/src/orm/Database.d.ts +4 -2
- package/src/orm/Database.d.ts.map +1 -1
- package/src/orm/Database.js +142 -29
- package/src/orm/DatabaseAdapter.d.ts +13 -0
- package/src/orm/DatabaseAdapter.d.ts.map +1 -1
- package/src/orm/DatabaseAdapterRegistry.d.ts.map +1 -1
- package/src/orm/DatabaseAdapterRegistry.js +3 -1
- package/src/orm/DatabaseRuntimeRegistration.d.ts.map +1 -1
- package/src/orm/DatabaseRuntimeRegistration.js +4 -0
- package/src/orm/Model.d.ts +30 -2
- package/src/orm/Model.d.ts.map +1 -1
- package/src/orm/Model.js +255 -62
- package/src/orm/QueryBuilder.d.ts +22 -1
- package/src/orm/QueryBuilder.d.ts.map +1 -1
- package/src/orm/QueryBuilder.js +405 -95
- package/src/orm/Relationships.d.ts +7 -1
- package/src/orm/Relationships.d.ts.map +1 -1
- package/src/orm/Relationships.js +18 -0
- package/src/orm/SchemaCompiler.d.ts +9 -0
- package/src/orm/SchemaCompiler.d.ts.map +1 -0
- package/src/orm/SchemaCompiler.js +145 -0
- package/src/orm/adapters/D1Adapter.d.ts +1 -1
- package/src/orm/adapters/D1Adapter.d.ts.map +1 -1
- package/src/orm/adapters/MySQLAdapter.d.ts +1 -1
- package/src/orm/adapters/MySQLAdapter.d.ts.map +1 -1
- package/src/orm/adapters/MySQLAdapter.js +88 -69
- package/src/orm/adapters/PostgreSQLAdapter.d.ts +1 -1
- package/src/orm/adapters/PostgreSQLAdapter.d.ts.map +1 -1
- package/src/orm/adapters/PostgreSQLAdapter.js +88 -69
- package/src/orm/adapters/SQLServerAdapter.d.ts +1 -1
- package/src/orm/adapters/SQLServerAdapter.d.ts.map +1 -1
- package/src/orm/adapters/SQLiteAdapter.d.ts +1 -1
- package/src/orm/adapters/SQLiteAdapter.d.ts.map +1 -1
- package/src/orm/adapters/SQLiteAdapter.js +63 -3
- package/src/orm/maintenance/SqliteMaintenance.d.ts +5 -0
- package/src/orm/maintenance/SqliteMaintenance.d.ts.map +1 -0
- package/src/orm/maintenance/SqliteMaintenance.js +14 -0
- package/src/orm/migrations/MigrationStore.d.ts +38 -0
- package/src/orm/migrations/MigrationStore.d.ts.map +1 -0
- package/src/orm/migrations/MigrationStore.js +157 -0
- package/src/performance/CodeGenerationBenchmark.d.ts.map +1 -1
- package/src/performance/Optimizer.d.ts +1 -0
- package/src/performance/Optimizer.d.ts.map +1 -1
- package/src/performance/Optimizer.js +37 -3
- package/src/profiling/MemoryProfiler.d.ts +1 -1
- package/src/profiling/MemoryProfiler.d.ts.map +1 -1
- package/src/profiling/N1Detector.d.ts +1 -1
- package/src/profiling/N1Detector.d.ts.map +1 -1
- package/src/profiling/QueryLogger.d.ts +1 -1
- package/src/profiling/QueryLogger.d.ts.map +1 -1
- package/src/profiling/RequestProfiler.d.ts +3 -3
- package/src/profiling/RequestProfiler.d.ts.map +1 -1
- package/src/routes/api.d.ts +2 -0
- package/src/routes/api.d.ts.map +1 -0
- package/src/routes/api.js +1 -0
- package/src/routes/broadcast.d.ts +2 -0
- package/src/routes/broadcast.d.ts.map +1 -0
- package/src/routes/broadcast.js +1 -0
- package/src/routes/health.d.ts +2 -0
- package/src/routes/health.d.ts.map +1 -0
- package/src/routes/health.js +1 -0
- package/src/routes/metrics.d.ts +2 -0
- package/src/routes/metrics.d.ts.map +1 -0
- package/src/routes/metrics.js +1 -0
- package/src/routes/storage.d.ts +2 -0
- package/src/routes/storage.d.ts.map +1 -0
- package/src/routes/storage.js +1 -0
- package/src/routing/CoreRoutes.d.ts +12 -0
- package/src/routing/CoreRoutes.d.ts.map +1 -0
- package/src/routing/CoreRoutes.js +151 -0
- package/src/routing/RouteRegistry.d.ts +39 -0
- package/src/routing/RouteRegistry.d.ts.map +1 -0
- package/src/routing/RouteRegistry.js +44 -0
- package/src/routing/Router.d.ts +26 -9
- package/src/routing/Router.d.ts.map +1 -1
- package/src/routing/Router.js +79 -35
- package/src/routing/common.d.ts +15 -0
- package/src/routing/common.d.ts.map +1 -0
- package/src/routing/common.js +47 -0
- package/src/routing/doc.d.ts +28 -0
- package/src/routing/doc.d.ts.map +1 -0
- package/src/routing/doc.js +95 -0
- package/src/routing/error.d.ts +21 -0
- package/src/routing/error.d.ts.map +1 -0
- package/src/routing/error.js +126 -0
- package/src/routing/errorPages.d.ts +14 -0
- package/src/routing/errorPages.d.ts.map +1 -0
- package/src/routing/errorPages.js +103 -0
- package/src/routing/publicRoot.d.ts +18 -0
- package/src/routing/publicRoot.d.ts.map +1 -0
- package/src/routing/publicRoot.js +49 -0
- package/src/runtime/PluginAutoImports.d.ts +21 -0
- package/src/runtime/PluginAutoImports.d.ts.map +1 -0
- package/src/runtime/PluginAutoImports.js +59 -0
- package/src/runtime/PluginManager.d.ts +1 -5
- package/src/runtime/PluginManager.d.ts.map +1 -1
- package/src/runtime/PluginManager.js +25 -18
- package/src/runtime/RuntimeAdapter.d.ts.map +1 -1
- package/src/runtime/RuntimeAdapter.js +20 -1
- package/src/runtime/RuntimeDetector.d.ts +1 -1
- package/src/runtime/RuntimeDetector.d.ts.map +1 -1
- package/src/runtime/adapters/CloudflareAdapter.d.ts +1 -1
- package/src/runtime/adapters/CloudflareAdapter.d.ts.map +1 -1
- package/src/runtime/adapters/CloudflareAdapter.js +1 -1
- package/src/runtime/adapters/DenoAdapter.d.ts +1 -1
- package/src/runtime/adapters/DenoAdapter.d.ts.map +1 -1
- package/src/runtime/adapters/DenoAdapter.js +3 -3
- package/src/runtime/adapters/LambdaAdapter.d.ts +1 -1
- package/src/runtime/adapters/LambdaAdapter.d.ts.map +1 -1
- package/src/runtime/adapters/LambdaAdapter.js +1 -1
- package/src/runtime/adapters/NodeServerAdapter.d.ts +1 -1
- package/src/runtime/adapters/NodeServerAdapter.d.ts.map +1 -1
- package/src/runtime/getKernel.d.ts +9 -0
- package/src/runtime/getKernel.d.ts.map +1 -0
- package/src/runtime/getKernel.js +27 -0
- package/src/scripts/TemplateImportsCheck.js +47 -7
- package/src/scripts/TemplateSync.js +92 -20
- package/src/security/Encryptor.d.ts.map +1 -1
- package/src/security/Encryptor.js +64 -7
- package/src/security/JwtManager.d.ts +1 -0
- package/src/security/JwtManager.d.ts.map +1 -1
- package/src/security/JwtManager.js +33 -0
- package/src/security/Sanitizer.d.ts +76 -0
- package/src/security/Sanitizer.d.ts.map +1 -0
- package/src/security/Sanitizer.js +412 -0
- package/src/security/TokenRevocation.d.ts +7 -0
- package/src/security/TokenRevocation.d.ts.map +1 -0
- package/src/security/TokenRevocation.js +57 -0
- package/src/seeders/SeederDiscovery.d.ts +5 -0
- package/src/seeders/SeederDiscovery.d.ts.map +1 -0
- package/src/seeders/SeederDiscovery.js +21 -0
- package/src/seeders/SeederLoader.d.ts +5 -0
- package/src/seeders/SeederLoader.d.ts.map +1 -0
- package/src/seeders/SeederLoader.js +60 -0
- package/src/seeders/types.d.ts +18 -0
- package/src/seeders/types.d.ts.map +1 -0
- package/src/seeders/types.js +1 -0
- package/src/session/SessionManager.js +1 -1
- package/src/start.d.ts +21 -0
- package/src/start.d.ts.map +1 -0
- package/src/start.js +60 -0
- package/src/templates/adapters/MySQLAdapter.ts.tpl +109 -85
- package/src/templates/adapters/PostgreSQLAdapter.ts.tpl +129 -88
- package/src/templates/adapters/SQLServerAdapter.ts.tpl +5 -9
- package/src/templates/adapters/SQLiteAdapter.ts.tpl +78 -11
- package/src/templates/features/Queue.ts.tpl +2 -2
- package/src/templates/project/basic/app/Controllers/AuthController.ts.tpl +217 -0
- package/src/templates/project/basic/app/Controllers/UserController.ts.tpl +3 -16
- package/src/templates/project/basic/app/Middleware/ProfilerMiddleware.ts.tpl +1 -3
- package/src/templates/project/basic/app/Middleware/index.ts.tpl +3 -8
- package/src/templates/project/basic/app/Models/Post.ts.tpl +2 -3
- package/src/templates/project/basic/app/Models/User.ts.tpl +1 -1
- package/src/templates/project/basic/app/Types/controller.ts.tpl +46 -0
- package/src/templates/project/basic/config/FileLogWriter.ts.tpl +5 -236
- package/src/templates/project/basic/config/SecretsManager.ts.tpl +13 -450
- package/src/templates/project/basic/config/StartupConfigValidator.ts.tpl +9 -268
- package/src/templates/project/basic/config/app.ts.tpl +13 -153
- package/src/templates/project/basic/config/broadcast.ts.tpl +15 -129
- package/src/templates/project/basic/config/cache.ts.tpl +15 -92
- package/src/templates/project/basic/config/cloudflare.ts.tpl +4 -39
- package/src/templates/project/basic/config/constants.ts.tpl +9 -65
- package/src/templates/project/basic/config/database.ts.tpl +29 -116
- package/src/templates/project/basic/config/env.ts.tpl +5 -169
- package/src/templates/project/basic/config/features.ts.tpl +6 -54
- package/src/templates/project/basic/config/index.ts.tpl +27 -24
- package/src/templates/project/basic/config/logger.ts.tpl +5 -381
- package/src/templates/project/basic/config/logging/HttpLogger.ts.tpl +1 -1
- package/src/templates/project/basic/config/logging/KvLogger.ts.tpl +2 -2
- package/src/templates/project/basic/config/logging/SlackLogger.ts.tpl +1 -1
- package/src/templates/project/basic/config/mail.ts.tpl +15 -115
- package/src/templates/project/basic/config/microservices.ts.tpl +11 -97
- package/src/templates/project/basic/config/middleware.ts.tpl +27 -18
- package/src/templates/project/basic/config/notification.ts.tpl +14 -127
- package/src/templates/project/basic/config/queue.ts.tpl +16 -79
- package/src/templates/project/basic/config/security.ts.tpl +11 -163
- package/src/templates/project/basic/config/startup.ts.tpl +10 -21
- package/src/templates/project/basic/config/storage.ts.tpl +15 -133
- package/src/templates/project/basic/config/type.ts.tpl +33 -441
- package/src/templates/project/basic/database/factories/UserFactory.ts.tpl +80 -0
- package/src/templates/project/basic/database/migrations/create_tasks_table.ts.tpl +28 -0
- package/src/templates/project/basic/database/migrations/create_users_table.ts.tpl +29 -0
- package/src/templates/project/basic/database/seeders/DatabaseSeeder.ts.tpl +19 -0
- package/src/templates/project/basic/database/seeders/UserSeeder.ts.tpl +18 -0
- package/src/templates/project/basic/database/seeders/index.ts.tpl +2 -0
- package/src/templates/project/basic/package.json.tpl +1 -1
- package/src/templates/project/basic/routes/api.ts.tpl +74 -36
- package/src/templates/project/basic/routes/health.ts.tpl +1 -6
- package/src/templates/project/basic/routes/metrics.ts.tpl +22 -0
- package/src/templates/project/basic/src/index.ts.tpl +7 -80
- package/src/templates/project/basic/tsconfig.json.tpl +12 -13
- package/src/testing/TestEnvironment.d.ts +40 -0
- package/src/testing/TestEnvironment.d.ts.map +1 -0
- package/src/testing/TestEnvironment.js +141 -0
- package/src/testing/TestHttp.d.ts +29 -0
- package/src/testing/TestHttp.d.ts.map +1 -0
- package/src/testing/TestHttp.js +96 -0
- package/src/testing/index.d.ts +5 -0
- package/src/testing/index.d.ts.map +1 -0
- package/src/testing/index.js +2 -0
- package/src/time/DateTime.d.ts +181 -0
- package/src/time/DateTime.d.ts.map +1 -0
- package/src/time/DateTime.js +300 -0
- package/src/time/index.d.ts +7 -0
- package/src/time/index.d.ts.map +1 -0
- package/src/time/index.js +5 -0
- package/src/tools/http/Http.d.ts.map +1 -1
- package/src/tools/http/Http.js +4 -0
- package/src/tools/mail/drivers/Smtp.js +1 -1
- package/src/tools/queue/drivers/InMemory.d.ts +1 -1
- package/src/tools/queue/drivers/InMemory.d.ts.map +1 -1
- package/src/tools/queue/drivers/InMemory.js +1 -1
- package/src/tools/queue/drivers/Redis.d.ts +1 -1
- package/src/tools/queue/drivers/Redis.d.ts.map +1 -1
- package/src/tools/queue/drivers/Redis.js +1 -1
- package/src/validation/ValidationError.d.ts.map +1 -1
- package/src/validation/ValidationError.js +4 -2
- package/src/validation/Validator.d.ts +49 -16
- package/src/validation/Validator.d.ts.map +1 -1
- package/src/validation/Validator.js +307 -5
- package/src/common/uuid.d.ts +0 -3
- package/src/common/uuid.d.ts.map +0 -1
- package/src/common/uuid.js +0 -30
- package/src/templates/project/basic/.env.example.tpl +0 -74
- package/src/templates/project/basic/.env.tpl +0 -166
- package/src/templates/project/basic/database/migrations/index.ts.tpl +0 -2
|
@@ -0,0 +1,242 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Routes Command
|
|
3
|
+
* Lists all registered routes in a table.
|
|
4
|
+
*/
|
|
5
|
+
import { BaseCommand } from '../BaseCommand.js';
|
|
6
|
+
import { Env } from '../../config/env.js';
|
|
7
|
+
import { ErrorFactory } from '../../exceptions/ZintrustError.js';
|
|
8
|
+
import { registerRoutes } from '../../../routes/api.js';
|
|
9
|
+
import { Router } from '../../routing/Router.js';
|
|
10
|
+
const parseGroupBy = (value) => {
|
|
11
|
+
const raw = typeof value === 'string' ? value.trim().toLowerCase() : '';
|
|
12
|
+
if (raw === '' || raw === 'group')
|
|
13
|
+
return 'group';
|
|
14
|
+
if (raw === 'service')
|
|
15
|
+
return 'service';
|
|
16
|
+
if (raw === 'none')
|
|
17
|
+
return 'none';
|
|
18
|
+
throw ErrorFactory.createCliError(`Invalid --group-by '${String(value)}'. Expected: group | service | none.`);
|
|
19
|
+
};
|
|
20
|
+
const parseMethodFilter = (value) => {
|
|
21
|
+
const raw = typeof value === 'string' ? value.trim() : '';
|
|
22
|
+
if (raw === '')
|
|
23
|
+
return null;
|
|
24
|
+
const items = raw
|
|
25
|
+
.split(',')
|
|
26
|
+
.map((s) => s.trim().toUpperCase())
|
|
27
|
+
.filter((s) => s.length > 0);
|
|
28
|
+
return items.length === 0 ? null : new Set(items);
|
|
29
|
+
};
|
|
30
|
+
const normalizeHandlerName = (handler) => {
|
|
31
|
+
const name = typeof handler === 'function' &&
|
|
32
|
+
typeof handler.name === 'string'
|
|
33
|
+
? handler.name
|
|
34
|
+
: '';
|
|
35
|
+
if (name.trim() === '')
|
|
36
|
+
return '<anonymous>';
|
|
37
|
+
return name.startsWith('bound ') ? name.slice('bound '.length) : name;
|
|
38
|
+
};
|
|
39
|
+
const normalizePath = (path) => (typeof path === 'string' ? path : '');
|
|
40
|
+
const normalizePathForUrl = (path) => {
|
|
41
|
+
const raw = path.trim();
|
|
42
|
+
if (raw === '')
|
|
43
|
+
return '/';
|
|
44
|
+
const withLeadingSlash = raw.startsWith('/') ? raw : `/${raw}`;
|
|
45
|
+
// Avoid accidental double slashes when Router.group prefixes with '/api/v1' and child route starts with '/'
|
|
46
|
+
return withLeadingSlash.replaceAll(/\/+/g, '/');
|
|
47
|
+
};
|
|
48
|
+
const getBaseOrigin = () => {
|
|
49
|
+
const baseUrlRaw = Env.get('BASE_URL', Env.BASE_URL ?? '').trim();
|
|
50
|
+
const port = Env.getInt('PORT', typeof Env.PORT === 'number' && Number.isFinite(Env.PORT) ? Env.PORT : 0);
|
|
51
|
+
// Treat empty or path-only values as "unset" (avoid weird results like ":3000")
|
|
52
|
+
if (baseUrlRaw === '' || baseUrlRaw === '/' || baseUrlRaw.startsWith('/'))
|
|
53
|
+
return '';
|
|
54
|
+
const withScheme = baseUrlRaw.includes('://') ? baseUrlRaw : `http://${baseUrlRaw}`;
|
|
55
|
+
try {
|
|
56
|
+
const url = new URL(withScheme);
|
|
57
|
+
if (url.port === '' && port > 0) {
|
|
58
|
+
url.port = String(port);
|
|
59
|
+
}
|
|
60
|
+
return url.origin;
|
|
61
|
+
}
|
|
62
|
+
catch {
|
|
63
|
+
// Fallback: best-effort string join
|
|
64
|
+
const noTrailingSlash = baseUrlRaw.endsWith('/') ? baseUrlRaw.slice(0, -1) : baseUrlRaw;
|
|
65
|
+
if (noTrailingSlash === '')
|
|
66
|
+
return '';
|
|
67
|
+
return port > 0 && !noTrailingSlash.includes(':')
|
|
68
|
+
? `${noTrailingSlash}:${port}`
|
|
69
|
+
: noTrailingSlash;
|
|
70
|
+
}
|
|
71
|
+
};
|
|
72
|
+
const buildFullUrl = (origin, path) => {
|
|
73
|
+
if (origin.trim() === '')
|
|
74
|
+
return path;
|
|
75
|
+
const cleanOrigin = origin.endsWith('/') ? origin.slice(0, -1) : origin;
|
|
76
|
+
const cleanPath = normalizePathForUrl(path);
|
|
77
|
+
return `${cleanOrigin}${cleanPath}`;
|
|
78
|
+
};
|
|
79
|
+
const deriveGroup = (path) => {
|
|
80
|
+
if (path === '/' || path.trim() === '')
|
|
81
|
+
return '/';
|
|
82
|
+
const parts = path.split('/').filter(Boolean);
|
|
83
|
+
if (parts.length === 0)
|
|
84
|
+
return '/';
|
|
85
|
+
// Prefer deeper groups for common API patterns
|
|
86
|
+
if (parts[0] === 'api' && parts[1] !== undefined)
|
|
87
|
+
return `/api/${parts[1]}`;
|
|
88
|
+
return `/${parts[0]}`;
|
|
89
|
+
};
|
|
90
|
+
const deriveService = (path) => {
|
|
91
|
+
if (path === '/' || path.trim() === '')
|
|
92
|
+
return '/';
|
|
93
|
+
const parts = path.split('/').filter(Boolean);
|
|
94
|
+
if (parts.length === 0)
|
|
95
|
+
return '/';
|
|
96
|
+
// For /api/v1/<service>/... group by <service>
|
|
97
|
+
if (parts[0] === 'api' && parts[1] !== undefined) {
|
|
98
|
+
const service = parts[2] ?? parts[1];
|
|
99
|
+
return service === '' ? `/api/${parts[1]}` : service;
|
|
100
|
+
}
|
|
101
|
+
return parts[0];
|
|
102
|
+
};
|
|
103
|
+
const partitionMiddleware = (names) => {
|
|
104
|
+
const validations = [];
|
|
105
|
+
const middleware = [];
|
|
106
|
+
for (const name of names) {
|
|
107
|
+
if (name.toLowerCase().startsWith('validate')) {
|
|
108
|
+
validations.push(name);
|
|
109
|
+
}
|
|
110
|
+
else {
|
|
111
|
+
middleware.push(name);
|
|
112
|
+
}
|
|
113
|
+
}
|
|
114
|
+
return { middleware, validations };
|
|
115
|
+
};
|
|
116
|
+
const unique = (items) => Array.from(new Set(items));
|
|
117
|
+
const truncate = (value, max) => {
|
|
118
|
+
if (value.length <= max)
|
|
119
|
+
return value;
|
|
120
|
+
if (max <= 1)
|
|
121
|
+
return value.slice(0, max);
|
|
122
|
+
return `${value.slice(0, Math.max(0, max - 1))}…`;
|
|
123
|
+
};
|
|
124
|
+
const pad = (value, width) => value.padEnd(width);
|
|
125
|
+
const renderTable = (rows) => {
|
|
126
|
+
/* eslint-disable no-console */
|
|
127
|
+
const columns = [
|
|
128
|
+
{ key: 'url', title: 'URL', max: 64 },
|
|
129
|
+
{ key: 'group', title: 'Group', max: 18 },
|
|
130
|
+
{ key: 'method', title: 'Method', max: 6 },
|
|
131
|
+
{ key: 'path', title: 'Path', max: 42 },
|
|
132
|
+
{ key: 'middleware', title: 'Middleware', max: 28 },
|
|
133
|
+
{ key: 'validations', title: 'Validation', max: 24 },
|
|
134
|
+
{ key: 'handler', title: 'Handler', max: 28 },
|
|
135
|
+
];
|
|
136
|
+
const widths = Object.fromEntries(columns.map((c) => {
|
|
137
|
+
const contentMax = Math.max(c.title.length, ...rows.map((r) => truncate(String(r[c.key] ?? ''), c.max).length));
|
|
138
|
+
return [c.key, Math.min(c.max, Math.max(4, contentMax))];
|
|
139
|
+
}));
|
|
140
|
+
const border = `┌${columns.map((c) => '─'.repeat(widths[c.key] + 2)).join('┬')}┐`;
|
|
141
|
+
const mid = `├${columns.map((c) => '─'.repeat(widths[c.key] + 2)).join('┼')}┤`;
|
|
142
|
+
const bottom = `└${columns.map((c) => '─'.repeat(widths[c.key] + 2)).join('┴')}┘`;
|
|
143
|
+
const header = `│${columns
|
|
144
|
+
.map((c) => ` ${pad(truncate(c.title, widths[c.key]), widths[c.key])} `)
|
|
145
|
+
.join('│')}│`;
|
|
146
|
+
console.log(border);
|
|
147
|
+
console.log(header);
|
|
148
|
+
console.log(mid);
|
|
149
|
+
for (const row of rows) {
|
|
150
|
+
const line = `│${columns
|
|
151
|
+
.map((c) => {
|
|
152
|
+
const cell = truncate(String(row[c.key] ?? ''), widths[c.key]);
|
|
153
|
+
return ` ${pad(cell, widths[c.key])} `;
|
|
154
|
+
})
|
|
155
|
+
.join('│')}│`;
|
|
156
|
+
console.log(line);
|
|
157
|
+
}
|
|
158
|
+
console.log(bottom);
|
|
159
|
+
/* eslint-enable no-console */
|
|
160
|
+
};
|
|
161
|
+
const buildRows = (options) => {
|
|
162
|
+
const groupBy = parseGroupBy(options.groupBy);
|
|
163
|
+
const filterText = typeof options.filter === 'string' ? options.filter.trim().toLowerCase() : '';
|
|
164
|
+
const methodFilter = parseMethodFilter(options.method);
|
|
165
|
+
const baseOrigin = getBaseOrigin();
|
|
166
|
+
const router = Router.createRouter();
|
|
167
|
+
registerRoutes(router);
|
|
168
|
+
const routes = Router.getRoutes(router);
|
|
169
|
+
const rows = routes.map((route) => {
|
|
170
|
+
const path = normalizePath(route.path);
|
|
171
|
+
let group = '';
|
|
172
|
+
if (groupBy === 'service') {
|
|
173
|
+
group = deriveService(path);
|
|
174
|
+
}
|
|
175
|
+
else if (groupBy === 'group') {
|
|
176
|
+
group = deriveGroup(path);
|
|
177
|
+
}
|
|
178
|
+
const mwNames = Array.isArray(route.middleware)
|
|
179
|
+
? route.middleware.filter((m) => typeof m === 'string')
|
|
180
|
+
: [];
|
|
181
|
+
const mw = partitionMiddleware(unique(mwNames));
|
|
182
|
+
return {
|
|
183
|
+
url: buildFullUrl(baseOrigin, path),
|
|
184
|
+
group,
|
|
185
|
+
method: String(route.method ?? '').toUpperCase(),
|
|
186
|
+
path,
|
|
187
|
+
middleware: mw.middleware.join(', '),
|
|
188
|
+
validations: mw.validations.join(', '),
|
|
189
|
+
handler: normalizeHandlerName(route.handler),
|
|
190
|
+
};
|
|
191
|
+
});
|
|
192
|
+
const filtered = rows.filter((r) => {
|
|
193
|
+
if (methodFilter?.has(r.method) === false)
|
|
194
|
+
return false;
|
|
195
|
+
if (filterText === '')
|
|
196
|
+
return true;
|
|
197
|
+
const haystack = `${r.url} ${r.group} ${r.method} ${r.path} ${r.middleware} ${r.validations} ${r.handler}`
|
|
198
|
+
.toLowerCase()
|
|
199
|
+
.trim();
|
|
200
|
+
return haystack.includes(filterText);
|
|
201
|
+
});
|
|
202
|
+
// Keep stable ordering
|
|
203
|
+
filtered.sort((a, b) => {
|
|
204
|
+
if (a.group !== b.group)
|
|
205
|
+
return a.group.localeCompare(b.group);
|
|
206
|
+
if (a.path !== b.path)
|
|
207
|
+
return a.path.localeCompare(b.path);
|
|
208
|
+
return a.method.localeCompare(b.method);
|
|
209
|
+
});
|
|
210
|
+
return filtered;
|
|
211
|
+
};
|
|
212
|
+
const addOptions = (command) => {
|
|
213
|
+
command
|
|
214
|
+
.option('--group-by <mode>', 'group | service | none', 'group')
|
|
215
|
+
.option('--filter <text>', 'Filter by substring (path/middleware/handler/etc)')
|
|
216
|
+
.option('--method <methods>', 'Comma list of methods to include (e.g. GET,POST)')
|
|
217
|
+
.option('--json', 'Output machine-readable JSON instead of a table');
|
|
218
|
+
};
|
|
219
|
+
const execute = (cmd, options) => {
|
|
220
|
+
const rows = buildRows(options);
|
|
221
|
+
if (options.json === true) {
|
|
222
|
+
/* eslint-disable no-console */
|
|
223
|
+
console.log(JSON.stringify({ count: rows.length, routes: rows }, null, 2));
|
|
224
|
+
/* eslint-enable no-console */
|
|
225
|
+
return;
|
|
226
|
+
}
|
|
227
|
+
cmd.info(`Found ${rows.length} routes`);
|
|
228
|
+
renderTable(rows);
|
|
229
|
+
};
|
|
230
|
+
export const RoutesCommand = Object.freeze({
|
|
231
|
+
create() {
|
|
232
|
+
const cmd = BaseCommand.create({
|
|
233
|
+
name: 'routes',
|
|
234
|
+
aliases: ['route:list'],
|
|
235
|
+
description: 'List all routes (grouped by router group or service) with middleware and handler info',
|
|
236
|
+
addOptions,
|
|
237
|
+
execute: (options) => execute(cmd, options),
|
|
238
|
+
});
|
|
239
|
+
return cmd;
|
|
240
|
+
},
|
|
241
|
+
});
|
|
242
|
+
export default RoutesCommand;
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* IMPORTANT: this uses the same ProjectScaffolder as `zin new`.
|
|
5
5
|
* Usage: zin -sim my-blog
|
|
6
6
|
*/
|
|
7
|
-
import { IBaseCommand } from '../BaseCommand';
|
|
7
|
+
import type { IBaseCommand } from '../BaseCommand';
|
|
8
8
|
/**
|
|
9
9
|
* SimulateCommand - Generate simulated apps for testing
|
|
10
10
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SimulateCommand.d.ts","sourceRoot":"","sources":["../../../../src/cli/commands/SimulateCommand.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC;AA+
|
|
1
|
+
{"version":3,"file":"SimulateCommand.d.ts","sourceRoot":"","sources":["../../../../src/cli/commands/SimulateCommand.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC;AA+BrD;;GAEG;AACH,eAAO,MAAM,eAAe,EAuDvB,YAAY,CAAC"}
|
|
@@ -67,7 +67,7 @@ export const SimulateCommand = {
|
|
|
67
67
|
Logger.info(`\n${chalk.bold('Next steps:')}`);
|
|
68
68
|
Logger.info(` cd ${path.relative(process.cwd(), appPath)}`);
|
|
69
69
|
Logger.info(' npm install');
|
|
70
|
-
Logger.info('
|
|
70
|
+
Logger.info(' zin start');
|
|
71
71
|
}
|
|
72
72
|
catch (error) {
|
|
73
73
|
Logger.error('Failed to create simulated app', error);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"StartCommand.d.ts","sourceRoot":"","sources":["../../../../src/cli/commands/StartCommand.ts"],"names":[],"mappings":"AAAA,OAAO,EAAoC,KAAK,YAAY,EAAE,MAAM,kBAAkB,CAAC;
|
|
1
|
+
{"version":3,"file":"StartCommand.d.ts","sourceRoot":"","sources":["../../../../src/cli/commands/StartCommand.ts"],"names":[],"mappings":"AAAA,OAAO,EAAoC,KAAK,YAAY,EAAE,MAAM,kBAAkB,CAAC;AAyZvF,eAAO,MAAM,YAAY;cACb,YAAY;EAyBtB,CAAC"}
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import { BaseCommand } from '../BaseCommand.js';
|
|
2
|
+
import { DENO_RUNNER_SOURCE, LAMBDA_RUNNER_SOURCE } from '../commands/runner/index.js';
|
|
2
3
|
import { EnvFileLoader } from '../utils/EnvFileLoader.js';
|
|
3
4
|
import { SpawnUtil } from '../utils/spawn.js';
|
|
4
5
|
import { resolveNpmPath } from '../../common/index.js';
|
|
5
6
|
import { ErrorFactory } from '../../exceptions/ZintrustError.js';
|
|
6
|
-
import { existsSync, readFileSync } from '../../node-singletons/fs.js';
|
|
7
|
+
import { existsSync, mkdirSync, readFileSync, writeFileSync } from '../../node-singletons/fs.js';
|
|
7
8
|
import * as path from '../../node-singletons/path.js';
|
|
8
9
|
const isValidModeInput = (value) => value === 'development' ||
|
|
9
10
|
value === 'dev' ||
|
|
@@ -59,6 +60,22 @@ const resolveRuntime = (options) => {
|
|
|
59
60
|
const raw = typeof options.runtime === 'string' ? options.runtime.trim() : '';
|
|
60
61
|
return raw === '' ? undefined : raw;
|
|
61
62
|
};
|
|
63
|
+
const resolveStartVariant = (options) => {
|
|
64
|
+
const wantWrangler = options.wrangler === true || options.wg === true;
|
|
65
|
+
const wantDeno = options.deno === true;
|
|
66
|
+
const wantLambda = options.lambda === true;
|
|
67
|
+
const enabled = [wantWrangler, wantDeno, wantLambda].filter(Boolean).length;
|
|
68
|
+
if (enabled > 1) {
|
|
69
|
+
throw ErrorFactory.createCliError('Error: Choose only one of --wrangler/--wg, --deno, or --lambda.');
|
|
70
|
+
}
|
|
71
|
+
if (wantWrangler)
|
|
72
|
+
return 'wrangler';
|
|
73
|
+
if (wantDeno)
|
|
74
|
+
return 'deno';
|
|
75
|
+
if (wantLambda)
|
|
76
|
+
return 'lambda';
|
|
77
|
+
return 'node';
|
|
78
|
+
};
|
|
62
79
|
const hasFlag = (flag) => process.argv.includes(flag);
|
|
63
80
|
const resolveWatchPreference = (options, mode) => {
|
|
64
81
|
const hasWatch = hasFlag('--watch');
|
|
@@ -104,6 +121,10 @@ const findWranglerConfig = (cwd) => {
|
|
|
104
121
|
return undefined;
|
|
105
122
|
};
|
|
106
123
|
const resolveWranglerEntry = (cwd) => {
|
|
124
|
+
const indexEntry = path.join(cwd, 'src/index.ts');
|
|
125
|
+
if (existsSync(indexEntry))
|
|
126
|
+
return 'src/index.ts';
|
|
127
|
+
// Legacy fallback
|
|
107
128
|
const entry = path.join(cwd, 'src/functions/cloudflare.ts');
|
|
108
129
|
return existsSync(entry) ? 'src/functions/cloudflare.ts' : undefined;
|
|
109
130
|
};
|
|
@@ -167,6 +188,55 @@ const executeWranglerStart = async (cmd, cwd, port, runtime) => {
|
|
|
167
188
|
const exitCode = await SpawnUtil.spawnAndWait({ command: 'wrangler', args: wranglerArgs });
|
|
168
189
|
process.exit(exitCode);
|
|
169
190
|
};
|
|
191
|
+
const ensureTmpRunnerFile = (cwd, filename, content) => {
|
|
192
|
+
const tmpDir = path.join(cwd, 'tmp');
|
|
193
|
+
try {
|
|
194
|
+
mkdirSync(tmpDir, { recursive: true });
|
|
195
|
+
}
|
|
196
|
+
catch (error) {
|
|
197
|
+
throw ErrorFactory.createTryCatchError('Failed to create tmp directory', error);
|
|
198
|
+
}
|
|
199
|
+
const fullPath = path.join(tmpDir, filename);
|
|
200
|
+
try {
|
|
201
|
+
writeFileSync(fullPath, content, 'utf-8');
|
|
202
|
+
}
|
|
203
|
+
catch (error) {
|
|
204
|
+
throw ErrorFactory.createTryCatchError('Failed to write start runner', error);
|
|
205
|
+
}
|
|
206
|
+
return fullPath;
|
|
207
|
+
};
|
|
208
|
+
const executeDenoStart = async (cmd, cwd, mode, watchEnabled, _port, runtime) => {
|
|
209
|
+
if (runtime !== undefined) {
|
|
210
|
+
throw ErrorFactory.createCliError('Error: --runtime cannot be used with --deno.');
|
|
211
|
+
}
|
|
212
|
+
if (mode === 'testing') {
|
|
213
|
+
throw ErrorFactory.createCliError('Error: Cannot start server in testing mode. Use development or production.');
|
|
214
|
+
}
|
|
215
|
+
const denoRunner = ensureTmpRunnerFile(cwd, 'zin-start-deno.ts', DENO_RUNNER_SOURCE);
|
|
216
|
+
const args = [];
|
|
217
|
+
if (mode === 'development' && watchEnabled)
|
|
218
|
+
args.push('watch');
|
|
219
|
+
args.push(denoRunner);
|
|
220
|
+
cmd.info('Starting in Deno adapter mode...');
|
|
221
|
+
const exitCode = await SpawnUtil.spawnAndWait({ command: 'tsx', args });
|
|
222
|
+
process.exit(exitCode);
|
|
223
|
+
};
|
|
224
|
+
const executeLambdaStart = async (cmd, cwd, mode, watchEnabled, _port, runtime) => {
|
|
225
|
+
if (runtime !== undefined) {
|
|
226
|
+
throw ErrorFactory.createCliError('Error: --runtime cannot be used with --lambda.');
|
|
227
|
+
}
|
|
228
|
+
if (mode === 'testing') {
|
|
229
|
+
throw ErrorFactory.createCliError('Error: Cannot start server in testing mode. Use development or production.');
|
|
230
|
+
}
|
|
231
|
+
const lambdaRunner = ensureTmpRunnerFile(cwd, 'zin-start-lambda.ts', LAMBDA_RUNNER_SOURCE);
|
|
232
|
+
const args = [];
|
|
233
|
+
if (mode === 'development' && watchEnabled)
|
|
234
|
+
args.push('watch');
|
|
235
|
+
args.push(lambdaRunner);
|
|
236
|
+
cmd.info('Starting in Lambda adapter mode...');
|
|
237
|
+
const exitCode = await SpawnUtil.spawnAndWait({ command: 'tsx', args });
|
|
238
|
+
process.exit(exitCode);
|
|
239
|
+
};
|
|
170
240
|
const executeNodeStart = async (cmd, cwd, mode, watchEnabled) => {
|
|
171
241
|
if (mode === 'testing') {
|
|
172
242
|
throw ErrorFactory.createCliError('Error: Cannot start server in testing mode. Use --force to override (not supported).');
|
|
@@ -196,12 +266,26 @@ const executeStart = async (options, cmd) => {
|
|
|
196
266
|
const mode = resolveMode(options);
|
|
197
267
|
const port = resolvePort(options);
|
|
198
268
|
const runtime = resolveRuntime(options);
|
|
199
|
-
|
|
200
|
-
|
|
269
|
+
const variant = resolveStartVariant(options);
|
|
270
|
+
let effectiveRuntime = runtime;
|
|
271
|
+
if (variant === 'deno')
|
|
272
|
+
effectiveRuntime = 'deno';
|
|
273
|
+
if (variant === 'lambda')
|
|
274
|
+
effectiveRuntime = 'lambda';
|
|
275
|
+
EnvFileLoader.applyCliOverrides({ nodeEnv: mode, port, runtime: effectiveRuntime });
|
|
276
|
+
if (variant === 'wrangler') {
|
|
201
277
|
await executeWranglerStart(cmd, cwd, port, runtime);
|
|
202
278
|
return;
|
|
203
279
|
}
|
|
204
280
|
const watchEnabled = resolveWatchPreference(options, mode);
|
|
281
|
+
if (variant === 'deno') {
|
|
282
|
+
await executeDenoStart(cmd, cwd, mode, watchEnabled, port, runtime);
|
|
283
|
+
return;
|
|
284
|
+
}
|
|
285
|
+
if (variant === 'lambda') {
|
|
286
|
+
await executeLambdaStart(cmd, cwd, mode, watchEnabled, port, runtime);
|
|
287
|
+
return;
|
|
288
|
+
}
|
|
205
289
|
await executeNodeStart(cmd, cwd, mode, watchEnabled);
|
|
206
290
|
};
|
|
207
291
|
export const StartCommand = Object.freeze({
|
|
@@ -210,6 +294,9 @@ export const StartCommand = Object.freeze({
|
|
|
210
294
|
command.alias('s');
|
|
211
295
|
command
|
|
212
296
|
.option('-w, --wrangler', 'Start with Wrangler dev mode (Cloudflare Workers)')
|
|
297
|
+
.option('--wg', 'Alias for --wrangler')
|
|
298
|
+
.option('--deno', 'Start a local server using the Deno runtime adapter')
|
|
299
|
+
.option('--lambda', 'Start a local server using the AWS Lambda runtime adapter')
|
|
213
300
|
.option('--watch', 'Force watch mode (Node only)')
|
|
214
301
|
.option('--no-watch', 'Disable watch mode (Node only)')
|
|
215
302
|
.option('--mode <development|production|testing>', 'Override app mode')
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Upgrade Command
|
|
3
|
+
*
|
|
4
|
+
* Goal: help existing Zintrust projects adopt new safe defaults without forcing
|
|
5
|
+
* a full re-scaffold.
|
|
6
|
+
*
|
|
7
|
+
* Current scope (minimal/safe):
|
|
8
|
+
* - Backfill required .env defaults (HOST, PORT, LOG_LEVEL) when missing or blank.
|
|
9
|
+
* - Never overwrite a non-empty user value.
|
|
10
|
+
*/
|
|
11
|
+
import { type IBaseCommand } from '../BaseCommand';
|
|
12
|
+
export declare const UpgradeCommand: Readonly<{
|
|
13
|
+
create(): IBaseCommand;
|
|
14
|
+
}>;
|
|
15
|
+
export default UpgradeCommand;
|
|
16
|
+
//# sourceMappingURL=UpgradeCommand.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"UpgradeCommand.d.ts","sourceRoot":"","sources":["../../../../src/cli/commands/UpgradeCommand.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,OAAO,EAAoC,KAAK,YAAY,EAAE,MAAM,kBAAkB,CAAC;AAoFvF,eAAO,MAAM,cAAc;cACf,YAAY;EA6BtB,CAAC;AAEH,eAAe,cAAc,CAAC"}
|
|
@@ -0,0 +1,107 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Upgrade Command
|
|
3
|
+
*
|
|
4
|
+
* Goal: help existing Zintrust projects adopt new safe defaults without forcing
|
|
5
|
+
* a full re-scaffold.
|
|
6
|
+
*
|
|
7
|
+
* Current scope (minimal/safe):
|
|
8
|
+
* - Backfill required .env defaults (HOST, PORT, LOG_LEVEL) when missing or blank.
|
|
9
|
+
* - Never overwrite a non-empty user value.
|
|
10
|
+
*/
|
|
11
|
+
import { BaseCommand } from '../BaseCommand.js';
|
|
12
|
+
import { ErrorHandler } from '../ErrorHandler.js';
|
|
13
|
+
import { EnvFileBackfill } from '../env/EnvFileBackfill.js';
|
|
14
|
+
import { mkdirSync, readFileSync, unlinkSync, writeFileSync } from '../../node-singletons/fs.js';
|
|
15
|
+
import * as path from '../../node-singletons/path.js';
|
|
16
|
+
const ensureEnvFileExists = (envPath) => {
|
|
17
|
+
const dir = path.dirname(envPath);
|
|
18
|
+
mkdirSync(dir, { recursive: true });
|
|
19
|
+
try {
|
|
20
|
+
readFileSync(envPath, 'utf8');
|
|
21
|
+
}
|
|
22
|
+
catch {
|
|
23
|
+
writeFileSync(envPath, '\n', 'utf8');
|
|
24
|
+
}
|
|
25
|
+
};
|
|
26
|
+
const resolveCwd = (cwd) => {
|
|
27
|
+
if (typeof cwd === 'string' && cwd.trim() !== '')
|
|
28
|
+
return cwd;
|
|
29
|
+
return process.cwd();
|
|
30
|
+
};
|
|
31
|
+
const getEnvDefaults = () => Object.freeze({
|
|
32
|
+
HOST: 'localhost',
|
|
33
|
+
PORT: '7777',
|
|
34
|
+
LOG_LEVEL: 'debug',
|
|
35
|
+
});
|
|
36
|
+
const envFileExists = (envPath) => {
|
|
37
|
+
try {
|
|
38
|
+
readFileSync(envPath, 'utf8');
|
|
39
|
+
return true;
|
|
40
|
+
}
|
|
41
|
+
catch {
|
|
42
|
+
return false;
|
|
43
|
+
}
|
|
44
|
+
};
|
|
45
|
+
const formatBackfillSummary = (result) => {
|
|
46
|
+
const filled = result.filledKeys.join(', ') || '(none)';
|
|
47
|
+
const appended = result.appendedKeys.join(', ') || '(none)';
|
|
48
|
+
return `filled=${filled}; appended=${appended}`;
|
|
49
|
+
};
|
|
50
|
+
const runDryRun = (envPath, defaults) => {
|
|
51
|
+
const exists = envFileExists(envPath);
|
|
52
|
+
if (exists === false) {
|
|
53
|
+
ErrorHandler.info(`[dry-run] Would create ${envPath}`);
|
|
54
|
+
return;
|
|
55
|
+
}
|
|
56
|
+
const raw = readFileSync(envPath, 'utf8');
|
|
57
|
+
const tmpPath = `${envPath}.zin-upgrade.tmp`;
|
|
58
|
+
writeFileSync(tmpPath, raw, 'utf8');
|
|
59
|
+
try {
|
|
60
|
+
const result = EnvFileBackfill.backfillEnvDefaults(tmpPath, defaults);
|
|
61
|
+
if (result.changed === false) {
|
|
62
|
+
ErrorHandler.success('No changes needed.');
|
|
63
|
+
return;
|
|
64
|
+
}
|
|
65
|
+
ErrorHandler.info(`[dry-run] Would backfill .env: ${formatBackfillSummary(result)}`);
|
|
66
|
+
}
|
|
67
|
+
finally {
|
|
68
|
+
try {
|
|
69
|
+
unlinkSync(tmpPath);
|
|
70
|
+
}
|
|
71
|
+
catch {
|
|
72
|
+
// ignore
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
};
|
|
76
|
+
const runUpgrade = (envPath, defaults) => {
|
|
77
|
+
ensureEnvFileExists(envPath);
|
|
78
|
+
return EnvFileBackfill.backfillEnvDefaults(envPath, defaults);
|
|
79
|
+
};
|
|
80
|
+
export const UpgradeCommand = Object.freeze({
|
|
81
|
+
create() {
|
|
82
|
+
return BaseCommand.create({
|
|
83
|
+
name: 'upgrade',
|
|
84
|
+
description: 'Upgrade an existing Zintrust project in-place (safe, non-destructive)',
|
|
85
|
+
addOptions: (command) => {
|
|
86
|
+
command.option('--cwd <path>', 'Project directory (default: current working directory)');
|
|
87
|
+
command.option('--dry-run', 'Print planned changes without writing files');
|
|
88
|
+
},
|
|
89
|
+
execute: (options) => {
|
|
90
|
+
const cwd = resolveCwd(options.cwd);
|
|
91
|
+
const envPath = path.resolve(cwd, '.env');
|
|
92
|
+
const defaults = getEnvDefaults();
|
|
93
|
+
if (options.dryRun === true) {
|
|
94
|
+
runDryRun(envPath, defaults);
|
|
95
|
+
return;
|
|
96
|
+
}
|
|
97
|
+
const result = runUpgrade(envPath, defaults);
|
|
98
|
+
if (result.changed === false) {
|
|
99
|
+
ErrorHandler.success('No changes needed.');
|
|
100
|
+
return;
|
|
101
|
+
}
|
|
102
|
+
ErrorHandler.success(`Upgraded .env: ${formatBackfillSummary(result)}`);
|
|
103
|
+
},
|
|
104
|
+
});
|
|
105
|
+
},
|
|
106
|
+
});
|
|
107
|
+
export default UpgradeCommand;
|
|
@@ -4,7 +4,9 @@
|
|
|
4
4
|
export { AddCommand } from '../commands/AddCommand';
|
|
5
5
|
export { BroadcastWorkCommand } from '../commands/BroadcastWorkCommand';
|
|
6
6
|
export { ConfigCommand } from '../commands/ConfigCommand';
|
|
7
|
+
export { AddMigrationCommand, CreateCommand, CreateMigrationCommand, } from '../commands/CreateCommand';
|
|
7
8
|
export { DebugCommand } from '../commands/DebugCommand';
|
|
9
|
+
export { JwtDevCommand } from '../commands/JwtDevCommand';
|
|
8
10
|
export { LogsCleanupCommand } from '../commands/LogsCleanupCommand';
|
|
9
11
|
export { MakeMailTemplateCommand } from '../commands/MakeMailTemplateCommand';
|
|
10
12
|
export { MakeNotificationTemplateCommand } from '../commands/MakeNotificationTemplateCommand';
|
|
@@ -13,6 +15,7 @@ export { NewCommand } from '../commands/NewCommand';
|
|
|
13
15
|
export { NotificationWorkCommand } from '../commands/NotificationWorkCommand';
|
|
14
16
|
export { PrepareCommand } from '../commands/PrepareCommand';
|
|
15
17
|
export { QueueCommand } from '../commands/QueueCommand';
|
|
18
|
+
export { RoutesCommand } from '../commands/RoutesCommand';
|
|
16
19
|
export { SecretsCommand } from '../commands/SecretsCommand';
|
|
17
20
|
export { StartCommand } from '../commands/StartCommand';
|
|
18
21
|
export { TemplatesCommand } from '../commands/TemplatesCommand';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/cli/commands/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,UAAU,EAAE,MAAM,0BAA0B,CAAC;AACtD,OAAO,EAAE,oBAAoB,EAAE,MAAM,oCAAoC,CAAC;AAC1E,OAAO,EAAE,aAAa,EAAE,MAAM,6BAA6B,CAAC;AAC5D,OAAO,EAAE,YAAY,EAAE,MAAM,4BAA4B,CAAC;AAC1D,OAAO,EAAE,kBAAkB,EAAE,MAAM,kCAAkC,CAAC;AACtE,OAAO,EAAE,uBAAuB,EAAE,MAAM,uCAAuC,CAAC;AAChF,OAAO,EAAE,+BAA+B,EAAE,MAAM,+CAA+C,CAAC;AAChG,OAAO,EAAE,cAAc,EAAE,MAAM,8BAA8B,CAAC;AAC9D,OAAO,EAAE,UAAU,EAAE,MAAM,0BAA0B,CAAC;AACtD,OAAO,EAAE,uBAAuB,EAAE,MAAM,uCAAuC,CAAC;AAChF,OAAO,EAAE,cAAc,EAAE,MAAM,8BAA8B,CAAC;AAC9D,OAAO,EAAE,YAAY,EAAE,MAAM,4BAA4B,CAAC;AAC1D,OAAO,EAAE,cAAc,EAAE,MAAM,8BAA8B,CAAC;AAC9D,OAAO,EAAE,YAAY,EAAE,MAAM,4BAA4B,CAAC;AAC1D,OAAO,EAAE,gBAAgB,EAAE,MAAM,gCAAgC,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/cli/commands/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,UAAU,EAAE,MAAM,0BAA0B,CAAC;AACtD,OAAO,EAAE,oBAAoB,EAAE,MAAM,oCAAoC,CAAC;AAC1E,OAAO,EAAE,aAAa,EAAE,MAAM,6BAA6B,CAAC;AAC5D,OAAO,EACL,mBAAmB,EACnB,aAAa,EACb,sBAAsB,GACvB,MAAM,6BAA6B,CAAC;AACrC,OAAO,EAAE,YAAY,EAAE,MAAM,4BAA4B,CAAC;AAC1D,OAAO,EAAE,aAAa,EAAE,MAAM,6BAA6B,CAAC;AAC5D,OAAO,EAAE,kBAAkB,EAAE,MAAM,kCAAkC,CAAC;AACtE,OAAO,EAAE,uBAAuB,EAAE,MAAM,uCAAuC,CAAC;AAChF,OAAO,EAAE,+BAA+B,EAAE,MAAM,+CAA+C,CAAC;AAChG,OAAO,EAAE,cAAc,EAAE,MAAM,8BAA8B,CAAC;AAC9D,OAAO,EAAE,UAAU,EAAE,MAAM,0BAA0B,CAAC;AACtD,OAAO,EAAE,uBAAuB,EAAE,MAAM,uCAAuC,CAAC;AAChF,OAAO,EAAE,cAAc,EAAE,MAAM,8BAA8B,CAAC;AAC9D,OAAO,EAAE,YAAY,EAAE,MAAM,4BAA4B,CAAC;AAC1D,OAAO,EAAE,aAAa,EAAE,MAAM,6BAA6B,CAAC;AAC5D,OAAO,EAAE,cAAc,EAAE,MAAM,8BAA8B,CAAC;AAC9D,OAAO,EAAE,YAAY,EAAE,MAAM,4BAA4B,CAAC;AAC1D,OAAO,EAAE,gBAAgB,EAAE,MAAM,gCAAgC,CAAC"}
|
|
@@ -4,7 +4,9 @@
|
|
|
4
4
|
export { AddCommand } from '../commands/AddCommand.js';
|
|
5
5
|
export { BroadcastWorkCommand } from '../commands/BroadcastWorkCommand.js';
|
|
6
6
|
export { ConfigCommand } from '../commands/ConfigCommand.js';
|
|
7
|
+
export { AddMigrationCommand, CreateCommand, CreateMigrationCommand, } from '../commands/CreateCommand.js';
|
|
7
8
|
export { DebugCommand } from '../commands/DebugCommand.js';
|
|
9
|
+
export { JwtDevCommand } from '../commands/JwtDevCommand.js';
|
|
8
10
|
export { LogsCleanupCommand } from '../commands/LogsCleanupCommand.js';
|
|
9
11
|
export { MakeMailTemplateCommand } from '../commands/MakeMailTemplateCommand.js';
|
|
10
12
|
export { MakeNotificationTemplateCommand } from '../commands/MakeNotificationTemplateCommand.js';
|
|
@@ -13,6 +15,7 @@ export { NewCommand } from '../commands/NewCommand.js';
|
|
|
13
15
|
export { NotificationWorkCommand } from '../commands/NotificationWorkCommand.js';
|
|
14
16
|
export { PrepareCommand } from '../commands/PrepareCommand.js';
|
|
15
17
|
export { QueueCommand } from '../commands/QueueCommand.js';
|
|
18
|
+
export { RoutesCommand } from '../commands/RoutesCommand.js';
|
|
16
19
|
export { SecretsCommand } from '../commands/SecretsCommand.js';
|
|
17
20
|
export { StartCommand } from '../commands/StartCommand.js';
|
|
18
21
|
export { TemplatesCommand } from '../commands/TemplatesCommand.js';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/cli/commands/runner/index.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,kBAAkB,QAwDnB,CAAC;AAEb,eAAO,MAAM,oBAAoB,QAiFrB,CAAC"}
|