@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,236 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Server - HTTP Server implementation
|
|
3
|
+
* Uses Node.js built-in HTTP server with no external dependencies
|
|
4
|
+
*/
|
|
5
|
+
import { appConfig } from '../config/app';
|
|
6
|
+
import { HTTP_HEADERS, MIME_TYPES } from '../config/constants';
|
|
7
|
+
import { Logger } from '../config/logger';
|
|
8
|
+
import { ErrorFactory } from '../exceptions/ZintrustError';
|
|
9
|
+
import { Request } from '../http/Request';
|
|
10
|
+
import { Response } from '../http/Response';
|
|
11
|
+
import * as fs from '../node-singletons/fs';
|
|
12
|
+
import * as http from '../node-singletons/http';
|
|
13
|
+
import * as path from '../node-singletons/path';
|
|
14
|
+
import { fileURLToPath } from '../node-singletons/url';
|
|
15
|
+
import { Router } from '../routing/Router';
|
|
16
|
+
const MIME_TYPES_MAP = {
|
|
17
|
+
'.html': MIME_TYPES.HTML,
|
|
18
|
+
'.js': MIME_TYPES.JS,
|
|
19
|
+
'.css': MIME_TYPES.CSS,
|
|
20
|
+
'.json': MIME_TYPES.JSON,
|
|
21
|
+
'.png': MIME_TYPES.PNG,
|
|
22
|
+
'.jpg': MIME_TYPES.JPG,
|
|
23
|
+
'.gif': MIME_TYPES.GIF,
|
|
24
|
+
'.svg': MIME_TYPES.SVG,
|
|
25
|
+
'.wav': MIME_TYPES.WAV,
|
|
26
|
+
'.mp4': MIME_TYPES.MP4,
|
|
27
|
+
'.woff': MIME_TYPES.WOFF,
|
|
28
|
+
'.ttf': MIME_TYPES.TTF,
|
|
29
|
+
'.eot': MIME_TYPES.EOT,
|
|
30
|
+
'.otf': MIME_TYPES.OTF,
|
|
31
|
+
'.wasm': MIME_TYPES.WASM,
|
|
32
|
+
};
|
|
33
|
+
const findPackageRoot = (startDir) => {
|
|
34
|
+
let current = startDir;
|
|
35
|
+
for (let i = 0; i < 10; i++) {
|
|
36
|
+
if (fs.existsSync(path.join(current, 'package.json')))
|
|
37
|
+
return current;
|
|
38
|
+
const parent = path.dirname(current);
|
|
39
|
+
if (parent === current)
|
|
40
|
+
break;
|
|
41
|
+
current = parent;
|
|
42
|
+
}
|
|
43
|
+
return startDir;
|
|
44
|
+
};
|
|
45
|
+
const getFrameworkPublicRoots = () => {
|
|
46
|
+
const thisFile = fileURLToPath(import.meta.url);
|
|
47
|
+
const thisDir = path.dirname(thisFile);
|
|
48
|
+
const packageRoot = findPackageRoot(thisDir);
|
|
49
|
+
return [
|
|
50
|
+
path.join(packageRoot, 'dist/public'),
|
|
51
|
+
path.join(packageRoot, 'docs-website/public'),
|
|
52
|
+
path.join(packageRoot, 'public'), // Fallback for shipped package
|
|
53
|
+
];
|
|
54
|
+
};
|
|
55
|
+
const getDocsPublicRoot = () => {
|
|
56
|
+
const isProduction = process.env.NODE_ENV === 'production';
|
|
57
|
+
// First try app-local roots (developer app override), then fall back to framework-shipped assets.
|
|
58
|
+
const appRoots = isProduction
|
|
59
|
+
? [path.join(process.cwd(), 'public')]
|
|
60
|
+
: [path.join(process.cwd(), 'docs-website/public')];
|
|
61
|
+
const candidates = [...appRoots, ...getFrameworkPublicRoots()];
|
|
62
|
+
for (const candidate of candidates) {
|
|
63
|
+
if (fs.existsSync(candidate))
|
|
64
|
+
return candidate;
|
|
65
|
+
}
|
|
66
|
+
return appRoots[0];
|
|
67
|
+
};
|
|
68
|
+
const stripLeadingSlashes = (value) => value.replace(/^\/+/, '');
|
|
69
|
+
/**
|
|
70
|
+
* Map URL path to physical file path
|
|
71
|
+
*/
|
|
72
|
+
const mapStaticPath = (urlPath) => {
|
|
73
|
+
const publicRoot = getDocsPublicRoot();
|
|
74
|
+
if (urlPath.startsWith('/doc')) {
|
|
75
|
+
const rest = stripLeadingSlashes(urlPath.slice('/doc'.length));
|
|
76
|
+
const docPath = path.join(publicRoot, 'doc');
|
|
77
|
+
// If a 'doc' folder exists inside publicRoot, use it.
|
|
78
|
+
// Otherwise, assume publicRoot contains the docs directly.
|
|
79
|
+
if (fs.existsSync(docPath)) {
|
|
80
|
+
return rest === '' ? docPath : path.join(docPath, rest);
|
|
81
|
+
}
|
|
82
|
+
return rest === '' ? publicRoot : path.join(publicRoot, rest);
|
|
83
|
+
}
|
|
84
|
+
return '';
|
|
85
|
+
};
|
|
86
|
+
/**
|
|
87
|
+
* Send static file to response
|
|
88
|
+
*/
|
|
89
|
+
const sendStaticFile = (filePath, response) => {
|
|
90
|
+
const ext = path.extname(filePath).toLowerCase();
|
|
91
|
+
const contentType = MIME_TYPES_MAP[ext] || 'application/octet-stream';
|
|
92
|
+
const content = fs.readFileSync(filePath);
|
|
93
|
+
response.setStatus(200);
|
|
94
|
+
response.setHeader('Content-Type', contentType);
|
|
95
|
+
response.send(content);
|
|
96
|
+
};
|
|
97
|
+
/**
|
|
98
|
+
* Serve static files from docs-website
|
|
99
|
+
*/
|
|
100
|
+
// eslint-disable-next-line @typescript-eslint/require-await
|
|
101
|
+
const serveStatic = async (request, response) => {
|
|
102
|
+
const urlPath = request.getPath();
|
|
103
|
+
// Canonicalize docs base path (VitePress expects trailing slash for correct relative resolution)
|
|
104
|
+
if (urlPath === '/doc') {
|
|
105
|
+
response.setStatus(302);
|
|
106
|
+
response.setHeader('Location', '/doc/');
|
|
107
|
+
response.send('');
|
|
108
|
+
return true;
|
|
109
|
+
}
|
|
110
|
+
let filePath = mapStaticPath(urlPath);
|
|
111
|
+
if (!filePath)
|
|
112
|
+
return false;
|
|
113
|
+
try {
|
|
114
|
+
// If it's a directory, look for index.html
|
|
115
|
+
if (fs.existsSync(filePath) && fs.statSync(filePath).isDirectory()) {
|
|
116
|
+
filePath = path.join(filePath, 'index.html');
|
|
117
|
+
}
|
|
118
|
+
// Handle clean URLs (try adding .html)
|
|
119
|
+
if (!fs.existsSync(filePath) && !path.extname(filePath)) {
|
|
120
|
+
const htmlPath = `${filePath}.html`;
|
|
121
|
+
if (fs.existsSync(htmlPath)) {
|
|
122
|
+
filePath = htmlPath;
|
|
123
|
+
}
|
|
124
|
+
}
|
|
125
|
+
if (fs.existsSync(filePath)) {
|
|
126
|
+
sendStaticFile(filePath, response);
|
|
127
|
+
return true;
|
|
128
|
+
}
|
|
129
|
+
}
|
|
130
|
+
catch (error) {
|
|
131
|
+
ErrorFactory.createTryCatchError(`Error serving static file ${filePath}`, error);
|
|
132
|
+
}
|
|
133
|
+
return false;
|
|
134
|
+
};
|
|
135
|
+
/**
|
|
136
|
+
* Set security headers on response
|
|
137
|
+
*/
|
|
138
|
+
const getContentSecurityPolicyForPath = (requestPath) => {
|
|
139
|
+
// Default CSP for the API/framework.
|
|
140
|
+
const baseCsp = "default-src 'self'; " +
|
|
141
|
+
"script-src 'self' 'unsafe-inline'; " +
|
|
142
|
+
"style-src 'self' 'unsafe-inline'; " +
|
|
143
|
+
"img-src 'self' data:; " +
|
|
144
|
+
"font-src 'self';";
|
|
145
|
+
// Docs pages intentionally load external assets (Tailwind CDN + Google Fonts).
|
|
146
|
+
// Keep this relaxation scoped to the docs base path.
|
|
147
|
+
if (!requestPath.startsWith('/doc'))
|
|
148
|
+
return baseCsp;
|
|
149
|
+
return ("default-src 'self'; " +
|
|
150
|
+
"script-src 'self' 'unsafe-inline' 'unsafe-eval'; " +
|
|
151
|
+
"script-src-elem 'self' 'unsafe-inline'; " +
|
|
152
|
+
"style-src 'self' 'unsafe-inline' https://fonts.googleapis.com; " +
|
|
153
|
+
"style-src-elem 'self' 'unsafe-inline' https://fonts.googleapis.com; " +
|
|
154
|
+
"img-src 'self' data: https:; " +
|
|
155
|
+
"font-src 'self' data: https://fonts.gstatic.com;");
|
|
156
|
+
};
|
|
157
|
+
const setSecurityHeaders = (res, requestPath) => {
|
|
158
|
+
res.setHeader(HTTP_HEADERS.X_POWERED_BY, 'ZinTrust');
|
|
159
|
+
res.setHeader(HTTP_HEADERS.X_CONTENT_TYPE_OPTIONS, 'nosniff');
|
|
160
|
+
res.setHeader(HTTP_HEADERS.X_FRAME_OPTIONS, 'DENY');
|
|
161
|
+
res.setHeader(HTTP_HEADERS.X_XSS_PROTECTION, '1; mode=block');
|
|
162
|
+
res.setHeader(HTTP_HEADERS.REFERRER_POLICY, 'strict-origin-when-cross-origin');
|
|
163
|
+
res.setHeader(HTTP_HEADERS.CONTENT_SECURITY_POLICY, getContentSecurityPolicyForPath(requestPath));
|
|
164
|
+
};
|
|
165
|
+
/**
|
|
166
|
+
* Handle incoming HTTP requests
|
|
167
|
+
*/
|
|
168
|
+
const handleRequest = async (app, req, res) => {
|
|
169
|
+
try {
|
|
170
|
+
// Use the raw URL so docs assets (/doc/assets/...) get the correct CSP.
|
|
171
|
+
const requestPath = typeof req?.url === 'string' ? req.url : '/';
|
|
172
|
+
setSecurityHeaders(res, requestPath);
|
|
173
|
+
if (!req) {
|
|
174
|
+
throw ErrorFactory.createConnectionError('Request object is missing');
|
|
175
|
+
}
|
|
176
|
+
const request = Request.create(req);
|
|
177
|
+
const response = Response.create(res);
|
|
178
|
+
// Route the request
|
|
179
|
+
const router = app.getRouter();
|
|
180
|
+
const route = Router.match(router, request.getMethod(), request.getPath());
|
|
181
|
+
if (route === null) {
|
|
182
|
+
// Try serving static files from docs-website
|
|
183
|
+
if (await serveStatic(request, response)) {
|
|
184
|
+
return;
|
|
185
|
+
}
|
|
186
|
+
// 404 Not Found
|
|
187
|
+
response.setStatus(404).json({ message: 'Not Found' });
|
|
188
|
+
}
|
|
189
|
+
else {
|
|
190
|
+
// Handler found, execute route handler
|
|
191
|
+
request.setParams(route.params);
|
|
192
|
+
await route.handler(request, response);
|
|
193
|
+
}
|
|
194
|
+
}
|
|
195
|
+
catch (error) {
|
|
196
|
+
ErrorFactory.createTryCatchError('Server error:', error);
|
|
197
|
+
res.writeHead(500, { [HTTP_HEADERS.CONTENT_TYPE]: MIME_TYPES.JSON });
|
|
198
|
+
res.end(JSON.stringify({ message: 'Internal Server Error' }));
|
|
199
|
+
}
|
|
200
|
+
};
|
|
201
|
+
/**
|
|
202
|
+
* Server - HTTP Server implementation
|
|
203
|
+
* Refactored to Functional Object pattern
|
|
204
|
+
*/
|
|
205
|
+
export const Server = Object.freeze({
|
|
206
|
+
/**
|
|
207
|
+
* Create a new server instance
|
|
208
|
+
*/
|
|
209
|
+
create(app, port, host) {
|
|
210
|
+
const serverPort = port ?? appConfig.port;
|
|
211
|
+
const serverHost = host ?? appConfig.host;
|
|
212
|
+
const httpServer = http.createServer(async (req, res) => handleRequest(app, req, res));
|
|
213
|
+
return {
|
|
214
|
+
async listen() {
|
|
215
|
+
return new Promise((resolve) => {
|
|
216
|
+
httpServer.listen(serverPort, serverHost, () => {
|
|
217
|
+
Logger.info(`Zintrust server running at http://${serverHost}:${serverPort}`);
|
|
218
|
+
resolve();
|
|
219
|
+
});
|
|
220
|
+
});
|
|
221
|
+
},
|
|
222
|
+
async close() {
|
|
223
|
+
return new Promise((resolve) => {
|
|
224
|
+
httpServer.close(() => {
|
|
225
|
+
Logger.info('Zintrust server stopped');
|
|
226
|
+
resolve();
|
|
227
|
+
});
|
|
228
|
+
});
|
|
229
|
+
},
|
|
230
|
+
getHttpServer() {
|
|
231
|
+
return httpServer;
|
|
232
|
+
},
|
|
233
|
+
};
|
|
234
|
+
},
|
|
235
|
+
});
|
|
236
|
+
export default Server;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"bootstrap.d.ts","sourceRoot":"","sources":["../../../src/boot/bootstrap.ts"],"names":[],"mappings":"AAAA;;;;GAIG"}
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Application Bootstrap
|
|
3
|
+
* Entry point for running the Zintrust server
|
|
4
|
+
* Sealed namespace for immutability
|
|
5
|
+
*/
|
|
6
|
+
import { Application } from './Application';
|
|
7
|
+
import { Server } from './Server';
|
|
8
|
+
import { Env } from '../config/env';
|
|
9
|
+
import { Logger } from '../config/logger';
|
|
10
|
+
import { ErrorFactory } from '../exceptions/ZintrustError';
|
|
11
|
+
/**
|
|
12
|
+
* Bootstrap implementation
|
|
13
|
+
*/
|
|
14
|
+
const BootstrapFunctions = Object.freeze({
|
|
15
|
+
/**
|
|
16
|
+
* Bootstrap and start the server
|
|
17
|
+
*/
|
|
18
|
+
async start() {
|
|
19
|
+
try {
|
|
20
|
+
// Create application instance
|
|
21
|
+
const app = Application.create();
|
|
22
|
+
// Boot application
|
|
23
|
+
await app.boot();
|
|
24
|
+
// Get port and host from environment
|
|
25
|
+
const port = Env.getInt('PORT', 3000);
|
|
26
|
+
const host = Env.get('HOST', 'localhost');
|
|
27
|
+
// Create and start server
|
|
28
|
+
const server = Server.create(app, port, host);
|
|
29
|
+
// Start listening
|
|
30
|
+
await server.listen();
|
|
31
|
+
Logger.info(`Server running at http://${host}:${port}`);
|
|
32
|
+
}
|
|
33
|
+
catch (error) {
|
|
34
|
+
Logger.error('Failed to bootstrap application:', error);
|
|
35
|
+
ErrorFactory.createTryCatchError('Failed to bootstrap application:', error);
|
|
36
|
+
process.exit(1);
|
|
37
|
+
}
|
|
38
|
+
},
|
|
39
|
+
/**
|
|
40
|
+
* Handle graceful shutdown
|
|
41
|
+
*/
|
|
42
|
+
setupShutdownHandler() {
|
|
43
|
+
process.on('SIGTERM', () => {
|
|
44
|
+
Logger.info('SIGTERM received, shutting down gracefully...');
|
|
45
|
+
process.exit(0);
|
|
46
|
+
});
|
|
47
|
+
process.on('SIGINT', () => {
|
|
48
|
+
Logger.info('SIGINT received, shutting down gracefully...');
|
|
49
|
+
process.exit(0);
|
|
50
|
+
});
|
|
51
|
+
},
|
|
52
|
+
});
|
|
53
|
+
// Run bootstrap
|
|
54
|
+
await BootstrapFunctions.start().catch((error) => {
|
|
55
|
+
try {
|
|
56
|
+
Logger.error('Failed to bootstrap application:', error);
|
|
57
|
+
}
|
|
58
|
+
catch {
|
|
59
|
+
// best-effort logging
|
|
60
|
+
}
|
|
61
|
+
process.exit(1);
|
|
62
|
+
});
|
|
63
|
+
// Handle graceful shutdown
|
|
64
|
+
BootstrapFunctions.setupShutdownHandler();
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Bundle Optimizer for Zintrust Framework
|
|
3
|
+
* Reduces deployment package size by:
|
|
4
|
+
* - Tree-shaking unused ORM adapters
|
|
5
|
+
* - Minifying compiled JavaScript
|
|
6
|
+
* - Removing dev dependencies
|
|
7
|
+
* - Inlining configuration
|
|
8
|
+
*/
|
|
9
|
+
export interface OptimizationOptions {
|
|
10
|
+
platform: 'lambda' | 'cloudflare' | 'deno' | 'fargate';
|
|
11
|
+
targetSize?: number;
|
|
12
|
+
analyzeOnly?: boolean;
|
|
13
|
+
verbose?: boolean;
|
|
14
|
+
}
|
|
15
|
+
export interface BundleAnalysis {
|
|
16
|
+
platform: string;
|
|
17
|
+
totalSize: number;
|
|
18
|
+
files: Array<{
|
|
19
|
+
path: string;
|
|
20
|
+
size: number;
|
|
21
|
+
percentage: number;
|
|
22
|
+
}>;
|
|
23
|
+
recommendations: string[];
|
|
24
|
+
}
|
|
25
|
+
export interface IBundleOptimizer {
|
|
26
|
+
optimize(): Promise<BundleAnalysis>;
|
|
27
|
+
}
|
|
28
|
+
/**
|
|
29
|
+
* Bundle optimizer - reduces deployed package size
|
|
30
|
+
* Sealed namespace for immutability
|
|
31
|
+
*/
|
|
32
|
+
export declare const BundleOptimizer: Readonly<{
|
|
33
|
+
/**
|
|
34
|
+
* Create a new bundle optimizer instance
|
|
35
|
+
*/
|
|
36
|
+
create(options: OptimizationOptions): IBundleOptimizer;
|
|
37
|
+
}>;
|
|
38
|
+
/**
|
|
39
|
+
* CLI command for bundle optimization
|
|
40
|
+
*/
|
|
41
|
+
export declare function runOptimizer(): Promise<void>;
|
|
42
|
+
//# sourceMappingURL=BundleOptimizer.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"BundleOptimizer.d.ts","sourceRoot":"","sources":["../../../src/builder/BundleOptimizer.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAMH,MAAM,WAAW,mBAAmB;IAClC,QAAQ,EAAE,QAAQ,GAAG,YAAY,GAAG,MAAM,GAAG,SAAS,CAAC;IACvD,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB;AAED,MAAM,WAAW,cAAc;IAC7B,QAAQ,EAAE,MAAM,CAAC;IACjB,SAAS,EAAE,MAAM,CAAC;IAClB,KAAK,EAAE,KAAK,CAAC;QACX,IAAI,EAAE,MAAM,CAAC;QACb,IAAI,EAAE,MAAM,CAAC;QACb,UAAU,EAAE,MAAM,CAAC;KACpB,CAAC,CAAC;IACH,eAAe,EAAE,MAAM,EAAE,CAAC;CAC3B;AAED,MAAM,WAAW,gBAAgB;IAC/B,QAAQ,IAAI,OAAO,CAAC,cAAc,CAAC,CAAC;CACrC;AAED;;;GAGG;AACH,eAAO,MAAM,eAAe;IAC1B;;OAEG;oBACa,mBAAmB,GAAG,gBAAgB;EA0CtD,CAAC;AAkXH;;GAEG;AACH,wBAAsB,YAAY,IAAI,OAAO,CAAC,IAAI,CAAC,CAclD"}
|