@zintrust/core 0.1.1 → 0.1.3
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 +3 -3
- package/bin/zintrust.d.ts.map +1 -1
- package/bin/zintrust.js +18 -1
- package/package.json +15 -1
- package/src/boot/Application.d.ts.map +1 -1
- package/src/boot/Application.js +46 -3
- package/src/boot/Server.d.ts.map +1 -1
- package/src/boot/Server.js +3 -4
- package/src/boot/bootstrap.js +77 -6
- package/src/builder/BundleOptimizer.d.ts.map +1 -1
- package/src/builder/BundleOptimizer.js +6 -4
- package/src/cache/drivers/KVDriver.d.ts.map +1 -1
- package/src/cache/drivers/KVDriver.js +6 -6
- package/src/cache/drivers/RedisDriver.js +1 -1
- package/src/cli/BaseCommand.d.ts +2 -2
- package/src/cli/BaseCommand.d.ts.map +1 -1
- package/src/cli/BaseCommand.js +2 -1
- package/src/cli/CLI.d.ts.map +1 -1
- package/src/cli/CLI.js +11 -4
- package/src/cli/commands/AddCommand.js +1 -1
- package/src/cli/commands/ConfigCommand.d.ts.map +1 -1
- package/src/cli/commands/ConfigCommand.js +34 -4
- package/src/cli/commands/D1MigrateCommand.d.ts +4 -0
- package/src/cli/commands/D1MigrateCommand.d.ts.map +1 -1
- package/src/cli/commands/D1MigrateCommand.js +4 -3
- package/src/cli/commands/FixCommand.d.ts.map +1 -1
- package/src/cli/commands/FixCommand.js +3 -16
- package/src/cli/commands/LogsCleanupCommand.d.ts +6 -0
- package/src/cli/commands/LogsCleanupCommand.d.ts.map +1 -0
- package/src/cli/commands/LogsCleanupCommand.js +20 -0
- package/src/cli/commands/LogsCommand.d.ts.map +1 -1
- package/src/cli/commands/LogsCommand.js +1 -1
- package/src/cli/commands/MakeMailTemplateCommand.d.ts +10 -0
- package/src/cli/commands/MakeMailTemplateCommand.d.ts.map +1 -0
- package/src/cli/commands/MakeMailTemplateCommand.js +74 -0
- package/src/cli/commands/MakeNotificationTemplateCommand.d.ts +10 -0
- package/src/cli/commands/MakeNotificationTemplateCommand.d.ts.map +1 -0
- package/src/cli/commands/MakeNotificationTemplateCommand.js +113 -0
- package/src/cli/commands/NewCommand.d.ts +4 -0
- package/src/cli/commands/NewCommand.d.ts.map +1 -1
- package/src/cli/commands/NewCommand.js +33 -20
- package/src/cli/commands/PluginCommand.d.ts.map +1 -1
- package/src/cli/commands/PluginCommand.js +8 -4
- package/src/cli/commands/PrepareCommand.d.ts.map +1 -1
- package/src/cli/commands/PrepareCommand.js +1 -1
- package/src/cli/commands/QACommand.d.ts.map +1 -1
- package/src/cli/commands/QACommand.js +11 -20
- package/src/cli/commands/SecretsCommand.d.ts +16 -0
- package/src/cli/commands/SecretsCommand.d.ts.map +1 -0
- package/src/cli/commands/SecretsCommand.js +91 -0
- package/src/cli/commands/StartCommand.d.ts.map +1 -1
- package/src/cli/commands/StartCommand.js +2 -2
- package/src/cli/commands/TemplatesCommand.d.ts +3 -0
- package/src/cli/commands/TemplatesCommand.d.ts.map +1 -0
- package/src/cli/commands/TemplatesCommand.js +65 -0
- package/src/cli/commands/index.d.ts +5 -0
- package/src/cli/commands/index.d.ts.map +1 -1
- package/src/cli/commands/index.js +5 -0
- package/src/cli/config/ConfigManager.js +1 -1
- package/src/cli/index.d.ts +2 -1
- package/src/cli/index.d.ts.map +1 -1
- package/src/cli/index.js +2 -1
- package/src/cli/scaffolding/ControllerGenerator.js +1 -1
- package/src/cli/scaffolding/FeatureScaffolder.js +4 -4
- package/src/cli/scaffolding/FileGenerator.js +1 -1
- package/src/cli/scaffolding/ModelGenerator.js +1 -1
- package/src/cli/scaffolding/ProjectScaffolder.d.ts.map +1 -1
- package/src/cli/scaffolding/ProjectScaffolder.js +61 -11
- package/src/cli/scaffolding/ResponseFactoryGenerator.d.ts.map +1 -1
- package/src/cli/scaffolding/ResponseFactoryGenerator.js +3 -2
- package/src/cli/scaffolding/RouteGenerator.js +1 -1
- package/src/cli/scaffolding/ServiceIntegrationTestGenerator.js +1 -1
- package/src/cli/scaffolding/ServiceScaffolder.js +2 -2
- package/src/cli/scaffolding/TemplateGenerator.d.ts +40 -0
- package/src/cli/scaffolding/TemplateGenerator.d.ts.map +1 -0
- package/src/cli/scaffolding/TemplateGenerator.js +172 -0
- package/src/cli/scaffolding/index.d.ts +1 -0
- package/src/cli/scaffolding/index.d.ts.map +1 -1
- package/src/cli/scaffolding/index.js +1 -0
- package/src/cli/utils/spawn.js +1 -1
- package/src/common/AwsSigV4.d.ts +41 -0
- package/src/common/AwsSigV4.d.ts.map +1 -0
- package/src/common/AwsSigV4.js +69 -0
- package/src/common/index.d.ts +39 -0
- package/src/common/index.d.ts.map +1 -1
- package/src/common/index.js +101 -8
- package/src/common/uuid.d.ts +3 -0
- package/src/common/uuid.d.ts.map +1 -0
- package/src/common/uuid.js +30 -0
- package/src/config/FileLogWriter.d.ts +22 -0
- package/src/config/FileLogWriter.d.ts.map +1 -0
- package/src/config/FileLogWriter.js +192 -0
- package/src/config/SecretsManager.d.ts.map +1 -1
- package/src/config/SecretsManager.js +37 -11
- package/src/config/StartupConfigValidator.d.ts +15 -0
- package/src/config/StartupConfigValidator.d.ts.map +1 -0
- package/src/config/StartupConfigValidator.js +86 -0
- package/src/config/app.d.ts +2 -1
- package/src/config/app.d.ts.map +1 -1
- package/src/config/app.js +65 -15
- package/src/config/broadcast.d.ts +47 -0
- package/src/config/broadcast.d.ts.map +1 -0
- package/src/config/broadcast.js +54 -0
- package/src/config/cache.d.ts +13 -17
- package/src/config/cache.d.ts.map +1 -1
- package/src/config/cache.js +9 -11
- package/src/config/cloudflare.d.ts +26 -0
- package/src/config/cloudflare.d.ts.map +1 -0
- package/src/config/cloudflare.js +38 -0
- package/src/config/env.d.ts +6 -0
- package/src/config/env.d.ts.map +1 -1
- package/src/config/env.js +6 -0
- package/src/config/index.d.ts +52 -28
- package/src/config/index.d.ts.map +1 -1
- package/src/config/index.js +3 -0
- package/src/config/logger.d.ts +2 -0
- package/src/config/logger.d.ts.map +1 -1
- package/src/config/logger.js +270 -11
- package/src/config/logging/HttpLogger.d.ts +23 -0
- package/src/config/logging/HttpLogger.d.ts.map +1 -0
- package/src/config/logging/HttpLogger.js +93 -0
- package/src/config/logging/KvLogger.d.ts +22 -0
- package/src/config/logging/KvLogger.d.ts.map +1 -0
- package/src/config/logging/KvLogger.js +143 -0
- package/src/config/logging/SlackLogger.d.ts +23 -0
- package/src/config/logging/SlackLogger.d.ts.map +1 -0
- package/src/config/logging/SlackLogger.js +119 -0
- package/src/config/mail.d.ts +81 -0
- package/src/config/mail.d.ts.map +1 -0
- package/src/config/mail.js +73 -0
- package/src/config/middleware.d.ts +8 -0
- package/src/config/middleware.d.ts.map +1 -0
- package/src/config/middleware.js +18 -0
- package/src/config/notification.d.ts +62 -0
- package/src/config/notification.d.ts.map +1 -0
- package/src/config/notification.js +43 -0
- package/src/config/security.d.ts.map +1 -1
- package/src/config/security.js +2 -2
- package/src/config/startup.d.ts +23 -0
- package/src/config/startup.d.ts.map +1 -0
- package/src/config/startup.js +15 -0
- package/src/config/storage.d.ts +21 -35
- package/src/config/storage.d.ts.map +1 -1
- package/src/config/storage.js +57 -37
- package/src/database/migrations/index.d.ts +1 -1
- package/src/database/migrations/index.d.ts.map +1 -1
- package/src/database/migrations/index.js +2 -1
- package/src/features/Queue.js +1 -25
- package/src/health/RuntimeHealthProbes.d.ts +13 -0
- package/src/health/RuntimeHealthProbes.d.ts.map +1 -0
- package/src/health/RuntimeHealthProbes.js +62 -0
- package/src/health/StartupHealthChecks.d.ts +26 -0
- package/src/health/StartupHealthChecks.d.ts.map +1 -0
- package/src/health/StartupHealthChecks.js +124 -0
- package/src/http/ErrorResponse.d.ts +28 -0
- package/src/http/ErrorResponse.d.ts.map +1 -0
- package/src/http/ErrorResponse.js +42 -0
- package/src/http/Kernel.d.ts +5 -0
- package/src/http/Kernel.d.ts.map +1 -1
- package/src/http/Kernel.js +96 -30
- package/src/http/RequestContext.d.ts +20 -0
- package/src/http/RequestContext.d.ts.map +1 -0
- package/src/http/RequestContext.js +77 -0
- package/src/index.d.ts +9 -1
- package/src/index.d.ts.map +1 -1
- package/src/index.js +8 -2
- package/src/microservices/MicroserviceManager.d.ts.map +1 -1
- package/src/microservices/MicroserviceManager.js +9 -6
- package/src/microservices/PostgresAdapter.d.ts.map +1 -1
- package/src/microservices/PostgresAdapter.js +3 -1
- package/src/microservices/ServiceBundler.d.ts.map +1 -1
- package/src/microservices/ServiceBundler.js +6 -4
- package/src/microservices/ServiceHealthMonitor.js +2 -2
- package/src/middleware/CsrfMiddleware.d.ts.map +1 -1
- package/src/middleware/CsrfMiddleware.js +2 -19
- package/src/middleware/ErrorHandlerMiddleware.d.ts +6 -0
- package/src/middleware/ErrorHandlerMiddleware.d.ts.map +1 -0
- package/src/middleware/ErrorHandlerMiddleware.js +33 -0
- package/src/middleware/LoggingMiddleware.d.ts +9 -0
- package/src/middleware/LoggingMiddleware.d.ts.map +1 -0
- package/src/middleware/LoggingMiddleware.js +36 -0
- package/src/middleware/index.d.ts +2 -0
- package/src/middleware/index.d.ts.map +1 -1
- package/src/middleware/index.js +2 -0
- package/src/node-singletons/async_hooks.d.ts +9 -0
- package/src/node-singletons/async_hooks.d.ts.map +1 -0
- package/src/node-singletons/async_hooks.js +8 -0
- 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 +2 -2
- package/src/node-singletons/http.d.ts +1 -1
- package/src/node-singletons/http.d.ts.map +1 -1
- package/src/node-singletons/http.js +1 -1
- package/src/node-singletons/index.d.ts +4 -0
- package/src/node-singletons/index.d.ts.map +1 -1
- package/src/node-singletons/index.js +4 -0
- package/src/node-singletons/net.d.ts +9 -0
- package/src/node-singletons/net.d.ts.map +1 -0
- package/src/node-singletons/net.js +8 -0
- package/src/node-singletons/os.d.ts +3 -3
- package/src/node-singletons/os.d.ts.map +1 -1
- package/src/node-singletons/os.js +3 -4
- package/src/node-singletons/path.d.ts +3 -1
- package/src/node-singletons/path.d.ts.map +1 -1
- package/src/node-singletons/path.js +3 -1
- package/src/node-singletons/perf-hooks.d.ts +3 -1
- package/src/node-singletons/perf-hooks.d.ts.map +1 -1
- package/src/node-singletons/perf-hooks.js +3 -1
- package/src/node-singletons/process.d.ts +23 -0
- package/src/node-singletons/process.d.ts.map +1 -0
- package/src/node-singletons/process.js +8 -0
- package/src/node-singletons/readline.d.ts +3 -3
- package/src/node-singletons/readline.d.ts.map +1 -1
- package/src/node-singletons/readline.js +3 -4
- package/src/node-singletons/tls.d.ts +9 -0
- package/src/node-singletons/tls.d.ts.map +1 -0
- package/src/node-singletons/tls.js +8 -0
- package/src/node-singletons/url.d.ts +3 -1
- package/src/node-singletons/url.d.ts.map +1 -1
- package/src/node-singletons/url.js +3 -1
- package/src/orm/ConnectionManager.d.ts +6 -1
- package/src/orm/ConnectionManager.d.ts.map +1 -1
- package/src/orm/ConnectionManager.js +14 -0
- package/src/orm/DatabaseAdapter.d.ts +6 -0
- package/src/orm/DatabaseAdapter.d.ts.map +1 -1
- package/src/orm/QueryBuilder.d.ts +8 -1
- package/src/orm/QueryBuilder.d.ts.map +1 -1
- package/src/orm/QueryBuilder.js +188 -28
- package/src/orm/adapters/D1Adapter.d.ts.map +1 -1
- package/src/orm/adapters/D1Adapter.js +18 -12
- package/src/orm/adapters/MySQLAdapter.d.ts.map +1 -1
- package/src/orm/adapters/MySQLAdapter.js +4 -0
- package/src/orm/adapters/PostgreSQLAdapter.d.ts.map +1 -1
- package/src/orm/adapters/PostgreSQLAdapter.js +4 -0
- package/src/orm/adapters/SQLServerAdapter.d.ts.map +1 -1
- package/src/orm/adapters/SQLServerAdapter.js +4 -0
- package/src/orm/adapters/SQLiteAdapter.d.ts.map +1 -1
- package/src/orm/adapters/SQLiteAdapter.js +4 -0
- package/src/performance/CodeGenerationBenchmark.js +3 -3
- package/src/performance/Optimizer.d.ts +1 -1
- package/src/performance/Optimizer.d.ts.map +1 -1
- package/src/performance/Optimizer.js +150 -75
- package/src/performance/establish-baseline.js +3 -3
- package/src/runtime/PluginManager.d.ts +3 -1
- package/src/runtime/PluginManager.d.ts.map +1 -1
- package/src/runtime/PluginManager.js +124 -28
- package/src/runtime/RuntimeDetector.d.ts.map +1 -1
- package/src/runtime/RuntimeDetector.js +47 -6
- package/src/runtime/adapters/CloudflareAdapter.js +2 -2
- package/src/runtime/adapters/FargateAdapter.d.ts.map +1 -1
- package/src/runtime/adapters/FargateAdapter.js +2 -1
- package/src/runtime/adapters/LambdaAdapter.d.ts.map +1 -1
- package/src/runtime/adapters/LambdaAdapter.js +4 -2
- package/src/runtime/adapters/NodeServerAdapter.d.ts.map +1 -1
- package/src/runtime/adapters/NodeServerAdapter.js +2 -1
- package/src/scheduler/ScheduleRunner.d.ts +18 -0
- package/src/scheduler/ScheduleRunner.d.ts.map +1 -0
- package/src/scheduler/ScheduleRunner.js +155 -0
- package/src/scheduler/index.d.ts +3 -0
- package/src/scheduler/index.d.ts.map +1 -0
- package/src/scheduler/index.js +1 -0
- package/src/scheduler/types.d.ts +16 -0
- package/src/scheduler/types.d.ts.map +1 -0
- package/src/scheduler/types.js +4 -0
- package/src/schedules/index.d.ts +2 -0
- package/src/schedules/index.d.ts.map +1 -0
- package/src/schedules/index.js +1 -0
- package/src/schedules/log-cleanup.d.ts +4 -0
- package/src/schedules/log-cleanup.d.ts.map +1 -0
- package/src/schedules/log-cleanup.js +18 -0
- package/src/scripts/GenerateEnvArtifacts.d.ts +13 -0
- package/src/scripts/GenerateEnvArtifacts.d.ts.map +1 -0
- package/src/scripts/GenerateEnvArtifacts.js +171 -0
- package/src/scripts/TemplateSync.js +109 -70
- package/src/security/CsrfTokenManager.js +1 -1
- package/src/security/Encryptor.js +1 -1
- package/src/security/Hash.d.ts +14 -0
- package/src/security/Hash.d.ts.map +1 -0
- package/src/security/Hash.js +81 -0
- package/src/security/StartupSecretValidation.d.ts +20 -0
- package/src/security/StartupSecretValidation.d.ts.map +1 -0
- package/src/security/StartupSecretValidation.js +61 -0
- package/src/security/UrlValidator.d.ts +0 -1
- package/src/security/UrlValidator.d.ts.map +1 -1
- package/src/security/UrlValidator.js +1 -2
- package/src/security/Xss.d.ts +14 -0
- package/src/security/Xss.d.ts.map +1 -0
- package/src/security/Xss.js +57 -0
- package/src/security/XssProtection.d.ts.map +1 -1
- package/src/security/XssProtection.js +155 -17
- package/src/templates/adapters/MySQLAdapter.ts.tpl +5 -0
- package/src/templates/adapters/PostgreSQLAdapter.ts.tpl +5 -0
- package/src/templates/adapters/SQLServerAdapter.ts.tpl +5 -0
- package/src/templates/adapters/SQLiteAdapter.ts.tpl +5 -0
- package/src/templates/features/Queue.ts.tpl +1 -29
- package/src/templates/project/basic/.env.example.tpl +48 -0
- package/src/templates/project/basic/.env.tpl +89 -94
- package/src/templates/project/basic/app/Toolkit/Broadcast/sendBroadcast.ts.tpl +7 -0
- package/src/templates/project/basic/app/Toolkit/Mail/sendWelcomeEmail.ts.tpl +30 -0
- package/src/templates/project/basic/app/Toolkit/Notification/sendSlackNotification.ts.tpl +10 -0
- package/src/templates/project/basic/app/Toolkit/Notification/sendSms.ts.tpl +13 -0
- package/src/templates/project/basic/config/FileLogWriter.ts.tpl +240 -0
- package/src/templates/project/basic/config/SecretsManager.ts.tpl +44 -21
- package/src/templates/project/basic/config/StartupConfigValidator.ts.tpl +151 -0
- package/src/templates/project/basic/config/app.ts.tpl +84 -15
- package/src/templates/project/basic/config/broadcast.ts.tpl +97 -0
- package/src/templates/project/basic/config/cache.ts.tpl +19 -23
- package/src/templates/project/basic/config/cloudflare.ts.tpl +57 -0
- package/src/templates/project/basic/config/env.ts.tpl +7 -1
- package/src/templates/project/basic/config/index.ts.tpl +3 -0
- package/src/templates/project/basic/config/logger.ts.tpl +301 -11
- package/src/templates/project/basic/config/logging/HttpLogger.ts.tpl +121 -0
- package/src/templates/project/basic/config/logging/KvLogger.ts.tpl +181 -0
- package/src/templates/project/basic/config/logging/SlackLogger.ts.tpl +156 -0
- package/src/templates/project/basic/config/mail.ts.tpl +141 -0
- package/src/templates/project/basic/config/middleware.ts.tpl +27 -0
- package/src/templates/project/basic/config/notification.ts.tpl +86 -0
- package/src/templates/project/basic/config/security.ts.tpl +4 -5
- package/src/templates/project/basic/config/startup.ts.tpl +27 -0
- package/src/templates/project/basic/config/storage.ts.tpl +77 -42
- package/src/templates/project/basic/database/migrations/index.ts.tpl +1 -1
- package/src/templates/project/basic/package.json.tpl +1 -1
- package/src/templates/project/basic/routes/api.ts.tpl +11 -37
- package/src/templates/project/basic/routes/broadcast.ts.tpl +32 -0
- package/src/templates/project/basic/routes/health.ts.tpl +134 -0
- package/src/templates/project/basic/routes/storage.ts.tpl +42 -0
- package/src/templates/project/basic/src/index.ts.tpl +38 -11
- package/src/templates/project/basic/template.json +3 -0
- package/src/toolkit/Secrets/EnvFile.d.ts +15 -0
- package/src/toolkit/Secrets/EnvFile.d.ts.map +1 -0
- package/src/toolkit/Secrets/EnvFile.js +63 -0
- package/src/toolkit/Secrets/Manifest.d.ts +24 -0
- package/src/toolkit/Secrets/Manifest.d.ts.map +1 -0
- package/src/toolkit/Secrets/Manifest.js +71 -0
- package/src/toolkit/Secrets/index.d.ts +42 -0
- package/src/toolkit/Secrets/index.d.ts.map +1 -0
- package/src/toolkit/Secrets/index.js +119 -0
- package/src/toolkit/Secrets/providers/AwsSecretsManager.d.ts +14 -0
- package/src/toolkit/Secrets/providers/AwsSecretsManager.d.ts.map +1 -0
- package/src/toolkit/Secrets/providers/AwsSecretsManager.js +131 -0
- package/src/toolkit/Secrets/providers/CloudflareKv.d.ts +9 -0
- package/src/toolkit/Secrets/providers/CloudflareKv.d.ts.map +1 -0
- package/src/toolkit/Secrets/providers/CloudflareKv.js +73 -0
- package/src/tools/broadcast/Broadcast.d.ts +7 -0
- package/src/tools/broadcast/Broadcast.d.ts.map +1 -0
- package/src/tools/broadcast/Broadcast.js +37 -0
- package/src/tools/broadcast/drivers/BaseDriver.d.ts +5 -0
- package/src/tools/broadcast/drivers/BaseDriver.d.ts.map +1 -0
- package/src/tools/broadcast/drivers/BaseDriver.js +8 -0
- package/src/tools/broadcast/drivers/InMemory.d.ts +18 -0
- package/src/tools/broadcast/drivers/InMemory.d.ts.map +1 -0
- package/src/tools/broadcast/drivers/InMemory.js +16 -0
- package/src/tools/broadcast/drivers/Pusher.d.ts +8 -0
- package/src/tools/broadcast/drivers/Pusher.d.ts.map +1 -0
- package/src/tools/broadcast/drivers/Pusher.js +75 -0
- package/src/tools/broadcast/drivers/Redis.d.ts +19 -0
- package/src/tools/broadcast/drivers/Redis.d.ts.map +1 -0
- package/src/tools/broadcast/drivers/Redis.js +73 -0
- package/src/tools/broadcast/drivers/RedisHttps.d.ts +14 -0
- package/src/tools/broadcast/drivers/RedisHttps.d.ts.map +1 -0
- package/src/tools/broadcast/drivers/RedisHttps.js +50 -0
- package/src/tools/broadcast/index.d.ts +7 -0
- package/src/tools/broadcast/index.d.ts.map +1 -0
- package/src/tools/broadcast/index.js +6 -0
- package/src/tools/http/Http.d.ts +49 -0
- package/src/tools/http/Http.d.ts.map +1 -0
- package/src/tools/http/Http.js +169 -0
- package/src/tools/http/HttpResponse.d.ts +32 -0
- package/src/tools/http/HttpResponse.d.ts.map +1 -0
- package/src/tools/http/HttpResponse.js +80 -0
- package/src/tools/http/index.d.ts +15 -0
- package/src/tools/http/index.d.ts.map +1 -0
- package/src/tools/http/index.js +9 -0
- package/src/tools/mail/Mail.d.ts +22 -0
- package/src/tools/mail/Mail.d.ts.map +1 -0
- package/src/tools/mail/Mail.js +105 -0
- package/src/tools/mail/attachments.d.ts +23 -0
- package/src/tools/mail/attachments.d.ts.map +1 -0
- package/src/tools/mail/attachments.js +26 -0
- package/src/tools/mail/drivers/BaseDriver.d.ts +5 -0
- package/src/tools/mail/drivers/BaseDriver.d.ts.map +1 -0
- package/src/tools/mail/drivers/BaseDriver.js +8 -0
- package/src/tools/mail/drivers/Mailgun.d.ts +31 -0
- package/src/tools/mail/drivers/Mailgun.d.ts.map +1 -0
- package/src/tools/mail/drivers/Mailgun.js +81 -0
- package/src/tools/mail/drivers/SendGrid.d.ts +29 -0
- package/src/tools/mail/drivers/SendGrid.d.ts.map +1 -0
- package/src/tools/mail/drivers/SendGrid.js +57 -0
- package/src/tools/mail/drivers/Ses.d.ts +24 -0
- package/src/tools/mail/drivers/Ses.d.ts.map +1 -0
- package/src/tools/mail/drivers/Ses.js +116 -0
- package/src/tools/mail/drivers/Smtp.d.ts +38 -0
- package/src/tools/mail/drivers/Smtp.d.ts.map +1 -0
- package/src/tools/mail/drivers/Smtp.js +327 -0
- package/src/tools/mail/templates/index.d.ts +27 -0
- package/src/tools/mail/templates/index.d.ts.map +1 -0
- package/src/tools/mail/templates/index.js +35 -0
- package/src/tools/mail/templates/markdown/index.d.ts +17 -0
- package/src/tools/mail/templates/markdown/index.d.ts.map +1 -0
- package/src/tools/mail/templates/markdown/index.js +49 -0
- package/src/tools/mail/templates/markdown/registry.d.ts +15 -0
- package/src/tools/mail/templates/markdown/registry.d.ts.map +1 -0
- package/src/tools/mail/templates/markdown/registry.js +34 -0
- package/src/tools/mail/templates/markdown/validator.d.ts +16 -0
- package/src/tools/mail/templates/markdown/validator.d.ts.map +1 -0
- package/src/tools/mail/templates/markdown/validator.js +24 -0
- package/src/tools/mail/testing.d.ts +41 -0
- package/src/tools/mail/testing.d.ts.map +1 -0
- package/src/tools/mail/testing.js +34 -0
- package/src/tools/notification/Driver.d.ts +11 -0
- package/src/tools/notification/Driver.d.ts.map +1 -0
- package/src/tools/notification/Driver.js +1 -0
- package/src/tools/notification/Notification.d.ts +11 -0
- package/src/tools/notification/Notification.d.ts.map +1 -0
- package/src/tools/notification/Notification.js +11 -0
- package/src/tools/notification/Registry.d.ts +10 -0
- package/src/tools/notification/Registry.d.ts.map +1 -0
- package/src/tools/notification/Registry.js +22 -0
- package/src/tools/notification/Service.d.ts +6 -0
- package/src/tools/notification/Service.d.ts.map +1 -0
- package/src/tools/notification/Service.js +18 -0
- package/src/tools/notification/config.d.ts +5 -0
- package/src/tools/notification/config.d.ts.map +1 -0
- package/src/tools/notification/config.js +5 -0
- package/src/tools/notification/drivers/BaseDriver.d.ts +5 -0
- package/src/tools/notification/drivers/BaseDriver.d.ts.map +1 -0
- package/src/tools/notification/drivers/BaseDriver.js +8 -0
- package/src/tools/notification/drivers/Console.d.ts +7 -0
- package/src/tools/notification/drivers/Console.d.ts.map +1 -0
- package/src/tools/notification/drivers/Console.js +13 -0
- package/src/tools/notification/drivers/Slack.d.ts +16 -0
- package/src/tools/notification/drivers/Slack.d.ts.map +1 -0
- package/src/tools/notification/drivers/Slack.js +24 -0
- package/src/tools/notification/drivers/Termii.d.ts +10 -0
- package/src/tools/notification/drivers/Termii.d.ts.map +1 -0
- package/src/tools/notification/drivers/Termii.js +47 -0
- package/src/tools/notification/drivers/Twilio.d.ts +21 -0
- package/src/tools/notification/drivers/Twilio.d.ts.map +1 -0
- package/src/tools/notification/drivers/Twilio.js +48 -0
- package/src/tools/notification/templates/markdown/index.d.ts +15 -0
- package/src/tools/notification/templates/markdown/index.d.ts.map +1 -0
- package/src/tools/notification/templates/markdown/index.js +38 -0
- package/src/tools/notification/templates/markdown/registry.d.ts +15 -0
- package/src/tools/notification/templates/markdown/registry.d.ts.map +1 -0
- package/src/tools/notification/templates/markdown/registry.js +36 -0
- package/src/tools/notification/testing.d.ts +19 -0
- package/src/tools/notification/testing.d.ts.map +1 -0
- package/src/tools/notification/testing.js +35 -0
- package/src/tools/notification/testingHelpers.d.ts +12 -0
- package/src/tools/notification/testingHelpers.d.ts.map +1 -0
- package/src/tools/notification/testingHelpers.js +32 -0
- package/src/tools/queue/Queue.d.ts +23 -0
- package/src/tools/queue/Queue.d.ts.map +1 -0
- package/src/tools/queue/Queue.js +38 -0
- package/src/tools/queue/drivers/InMemory.d.ts +10 -0
- package/src/tools/queue/drivers/InMemory.d.ts.map +1 -0
- package/src/tools/queue/drivers/InMemory.js +55 -0
- package/src/tools/queue/drivers/Redis.d.ts +10 -0
- package/src/tools/queue/drivers/Redis.d.ts.map +1 -0
- package/src/tools/queue/drivers/Redis.js +91 -0
- package/src/tools/storage/LocalSignedUrl.d.ts +12 -0
- package/src/tools/storage/LocalSignedUrl.d.ts.map +1 -0
- package/src/tools/storage/LocalSignedUrl.js +108 -0
- package/src/tools/storage/drivers/Gcs.d.ts +20 -0
- package/src/tools/storage/drivers/Gcs.d.ts.map +1 -0
- package/src/tools/storage/drivers/Gcs.js +152 -0
- package/src/tools/storage/drivers/Local.d.ts +18 -0
- package/src/tools/storage/drivers/Local.d.ts.map +1 -0
- package/src/tools/storage/drivers/Local.js +89 -0
- package/src/tools/storage/drivers/R2.d.ts +20 -0
- package/src/tools/storage/drivers/R2.d.ts.map +1 -0
- package/src/tools/storage/drivers/R2.js +73 -0
- package/src/tools/storage/drivers/S3.d.ts +26 -0
- package/src/tools/storage/drivers/S3.d.ts.map +1 -0
- package/src/tools/storage/drivers/S3.js +258 -0
- package/src/tools/storage/index.d.ts +24 -0
- package/src/tools/storage/index.d.ts.map +1 -0
- package/src/tools/storage/index.js +111 -0
- package/src/tools/storage/testing.d.ts +23 -0
- package/src/tools/storage/testing.d.ts.map +1 -0
- package/src/tools/storage/testing.js +52 -0
- package/src/tools/templates/MarkdownRenderer.d.ts +14 -0
- package/src/tools/templates/MarkdownRenderer.d.ts.map +1 -0
- package/src/tools/templates/MarkdownRenderer.js +300 -0
- package/src/tools/templates/index.d.ts +5 -0
- package/src/tools/templates/index.d.ts.map +1 -0
- package/src/tools/templates/index.js +4 -0
|
@@ -2,12 +2,13 @@
|
|
|
2
2
|
* D1 Migrate Command
|
|
3
3
|
* Run Cloudflare D1 migrations using Wrangler
|
|
4
4
|
*/
|
|
5
|
-
import { resolveNpmPath } from '../../common';
|
|
6
|
-
import { ErrorFactory } from '../../exceptions/ZintrustError';
|
|
7
5
|
import { BaseCommand } from '../BaseCommand';
|
|
6
|
+
import { resolveNpmPath } from '../../common/index';
|
|
8
7
|
import { appConfig } from '../../config/app';
|
|
9
8
|
import { Logger } from '../../config/logger';
|
|
9
|
+
import { ErrorFactory } from '../../exceptions/ZintrustError';
|
|
10
10
|
import { execFileSync } from '../../node-singletons/child-process';
|
|
11
|
+
// eslint-disable-next-line @typescript-eslint/require-await
|
|
11
12
|
const runWrangler = async (cmd, args) => {
|
|
12
13
|
const npmPath = resolveNpmPath();
|
|
13
14
|
cmd.debug(`Executing: npm exec --yes -- wrangler ${args.join(' ')}`);
|
|
@@ -16,7 +17,7 @@ const runWrangler = async (cmd, args) => {
|
|
|
16
17
|
encoding: 'utf8',
|
|
17
18
|
env: appConfig.getSafeEnv(),
|
|
18
19
|
});
|
|
19
|
-
return
|
|
20
|
+
return result;
|
|
20
21
|
};
|
|
21
22
|
const executeD1Migrate = async (cmd, options) => {
|
|
22
23
|
const isLocal = options['local'] === true || options['remote'] !== true;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FixCommand.d.ts","sourceRoot":"","sources":["../../../../src/cli/commands/FixCommand.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAGH,OAAO,EAA+B,YAAY,EAAE,MAAM,kBAAkB,CAAC;
|
|
1
|
+
{"version":3,"file":"FixCommand.d.ts","sourceRoot":"","sources":["../../../../src/cli/commands/FixCommand.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAGH,OAAO,EAA+B,YAAY,EAAE,MAAM,kBAAkB,CAAC;AAmD7E;;GAEG;AACH,eAAO,MAAM,UAAU;IACrB;;OAEG;cACO,YAAY;EAkBtB,CAAC"}
|
|
@@ -4,21 +4,9 @@
|
|
|
4
4
|
*/
|
|
5
5
|
import { appConfig } from '../../config';
|
|
6
6
|
import { BaseCommand } from '../BaseCommand';
|
|
7
|
+
import { resolveNpmPath } from '../../common/index';
|
|
7
8
|
import { ErrorFactory } from '../../exceptions/ZintrustError';
|
|
8
9
|
import { execFileSync } from '../../node-singletons/child-process';
|
|
9
|
-
import fs from '../../node-singletons/fs';
|
|
10
|
-
import * as path from '../../node-singletons/path';
|
|
11
|
-
const resolveNpmPath = () => {
|
|
12
|
-
const nodeBinDir = path.dirname(process.execPath);
|
|
13
|
-
const candidates = process.platform === 'win32'
|
|
14
|
-
? [path.join(nodeBinDir, 'npm.cmd'), path.join(nodeBinDir, 'npm.exe')]
|
|
15
|
-
: [path.join(nodeBinDir, 'npm')];
|
|
16
|
-
for (const candidate of candidates) {
|
|
17
|
-
if (fs.existsSync(candidate))
|
|
18
|
-
return candidate;
|
|
19
|
-
}
|
|
20
|
-
throw ErrorFactory.createCliError('Unable to locate npm executable. Ensure Node.js (with npm) is installed in the standard location.');
|
|
21
|
-
};
|
|
22
10
|
const runNpmScript = (cmd, args) => {
|
|
23
11
|
const npmPath = resolveNpmPath();
|
|
24
12
|
cmd.debug(`Executing: npm run ${args.join(' ')}`);
|
|
@@ -28,7 +16,7 @@ const runNpmScript = (cmd, args) => {
|
|
|
28
16
|
env: appConfig.getSafeEnv(),
|
|
29
17
|
});
|
|
30
18
|
};
|
|
31
|
-
const executeFix =
|
|
19
|
+
const executeFix = (cmd, options) => {
|
|
32
20
|
cmd.info('Starting automated code fixes...');
|
|
33
21
|
try {
|
|
34
22
|
const isDryRun = options['dryRun'] === true;
|
|
@@ -54,7 +42,6 @@ const executeFix = async (cmd, options) => {
|
|
|
54
42
|
ErrorFactory.createCliError('Fix command failed', error);
|
|
55
43
|
cmd.warn('Some fixes could not be applied automatically.');
|
|
56
44
|
}
|
|
57
|
-
return Promise.resolve();
|
|
58
45
|
};
|
|
59
46
|
/**
|
|
60
47
|
* Fix Command Factory
|
|
@@ -71,7 +58,7 @@ export const FixCommand = Object.freeze({
|
|
|
71
58
|
name: 'fix',
|
|
72
59
|
description: 'Run automated code fixes',
|
|
73
60
|
addOptions,
|
|
74
|
-
execute:
|
|
61
|
+
execute: (options) => executeFix(cmd, options),
|
|
75
62
|
});
|
|
76
63
|
cmd.resolveNpmPath = () => resolveNpmPath();
|
|
77
64
|
cmd.getSafeEnv = () => appConfig.getSafeEnv();
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"LogsCleanupCommand.d.ts","sourceRoot":"","sources":["../../../../src/cli/commands/LogsCleanupCommand.ts"],"names":[],"mappings":"AAAA,OAAO,EAAe,KAAK,YAAY,EAAE,MAAM,kBAAkB,CAAC;AAGlE,eAAO,MAAM,kBAAkB;cACnB,YAAY;EAiBtB,CAAC;AAEH,eAAe,kBAAkB,CAAC"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { BaseCommand } from '../BaseCommand';
|
|
2
|
+
import { cleanLogsOnce } from '../../config/logger';
|
|
3
|
+
export const LogsCleanupCommand = Object.freeze({
|
|
4
|
+
create() {
|
|
5
|
+
// Create the command first, then assign the execute implementation so we can
|
|
6
|
+
// safely reference the instance (`cmd`) from inside the handler.
|
|
7
|
+
const cmd = BaseCommand.create({
|
|
8
|
+
name: 'logs:cleanup',
|
|
9
|
+
description: 'Run a one-off log cleanup based on configured retention',
|
|
10
|
+
execute: async () => { },
|
|
11
|
+
});
|
|
12
|
+
cmd.execute = async (_options) => {
|
|
13
|
+
cmd.info('Running log cleanup...');
|
|
14
|
+
const deleted = await cleanLogsOnce();
|
|
15
|
+
cmd.info(`Deleted ${deleted.length} log files`);
|
|
16
|
+
};
|
|
17
|
+
return cmd;
|
|
18
|
+
},
|
|
19
|
+
});
|
|
20
|
+
export default LogsCleanupCommand;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"LogsCommand.d.ts","sourceRoot":"","sources":["../../../../src/cli/commands/LogsCommand.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAA+B,YAAY,EAAE,MAAM,kBAAkB,CAAC;
|
|
1
|
+
{"version":3,"file":"LogsCommand.d.ts","sourceRoot":"","sources":["../../../../src/cli/commands/LogsCommand.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAA+B,YAAY,EAAE,MAAM,kBAAkB,CAAC;AAO7E,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AA2KpC,eAAO,MAAM,WAAW;IACtB;;OAEG;cACO,YAAY;IAwBtB;;;OAGG;sBACe,OAAO,GAAG,IAAI;EAchC,CAAC;AAEH,eAAe,WAAW,CAAC"}
|
|
@@ -7,8 +7,8 @@ import { Logger as FileLogger } from '../logger/Logger';
|
|
|
7
7
|
import { Logger } from '../../config/logger';
|
|
8
8
|
import { ErrorFactory } from '../../exceptions/ZintrustError';
|
|
9
9
|
import fs from '../../node-singletons/fs';
|
|
10
|
+
import * as path from '../../node-singletons/path';
|
|
10
11
|
import chalk from 'chalk';
|
|
11
|
-
import * as path from 'node:path';
|
|
12
12
|
const normalizeLogsOptions = (options) => {
|
|
13
13
|
const level = typeof options['level'] === 'string' ? options['level'] : 'info';
|
|
14
14
|
const clear = options['clear'] === true;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* make:mail-template
|
|
3
|
+
* Scaffolds a mail markdown template into the project.
|
|
4
|
+
*/
|
|
5
|
+
import { IBaseCommand } from '../BaseCommand';
|
|
6
|
+
export declare const MakeMailTemplateCommand: Readonly<{
|
|
7
|
+
create(): IBaseCommand;
|
|
8
|
+
}>;
|
|
9
|
+
export default MakeMailTemplateCommand;
|
|
10
|
+
//# sourceMappingURL=MakeMailTemplateCommand.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"MakeMailTemplateCommand.d.ts","sourceRoot":"","sources":["../../../../src/cli/commands/MakeMailTemplateCommand.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAA+B,YAAY,EAAE,MAAM,kBAAkB,CAAC;AAgC7E,eAAO,MAAM,uBAAuB;cACxB,YAAY;EA4EtB,CAAC;AAEH,eAAe,uBAAuB,CAAC"}
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* make:mail-template
|
|
3
|
+
* Scaffolds a mail markdown template into the project.
|
|
4
|
+
*/
|
|
5
|
+
import { BaseCommand } from '../BaseCommand';
|
|
6
|
+
import { ErrorHandler } from '../ErrorHandler';
|
|
7
|
+
import { PromptHelper } from '../PromptHelper';
|
|
8
|
+
import { FileGenerator } from '../scaffolding/FileGenerator';
|
|
9
|
+
import { TemplateGenerator } from '../scaffolding/TemplateGenerator';
|
|
10
|
+
import { ErrorFactory } from '../../exceptions/ZintrustError';
|
|
11
|
+
import * as path from '../../node-singletons/path';
|
|
12
|
+
const addOptions = (command) => {
|
|
13
|
+
command.argument('[name]', 'Template name (alphanumeric + hyphens only)');
|
|
14
|
+
command.option('--category <category>', 'auth|transactional|notifications');
|
|
15
|
+
command.option('--vars <csv>', 'Comma-separated variables (e.g., name,confirmLink,expiryMinutes)');
|
|
16
|
+
command.option('--overwrite', 'Overwrite existing file');
|
|
17
|
+
command.option('--no-interactive', 'Disable prompts (requires args/options)');
|
|
18
|
+
};
|
|
19
|
+
const defaultCopyright = () => process.env['TEMPLATE_COPYRIGHT'] ?? '© 2025 Zintrust Framework. All rights reserved.';
|
|
20
|
+
export const MakeMailTemplateCommand = Object.freeze({
|
|
21
|
+
create() {
|
|
22
|
+
return BaseCommand.create({
|
|
23
|
+
name: 'make:mail-template',
|
|
24
|
+
description: 'Scaffold a mail markdown template into src/mail/markdown',
|
|
25
|
+
addOptions,
|
|
26
|
+
execute: async (options) => {
|
|
27
|
+
const interactive = options.noInteractive !== true;
|
|
28
|
+
const argName = options.args?.[0];
|
|
29
|
+
const name = argName ??
|
|
30
|
+
(interactive ? await PromptHelper.textInput('Template name:', 'welcome', true) : '');
|
|
31
|
+
if (name.trim() === '') {
|
|
32
|
+
throw ErrorFactory.createValidationError('Template name required');
|
|
33
|
+
}
|
|
34
|
+
const categoryInput = options.category ??
|
|
35
|
+
(interactive
|
|
36
|
+
? await PromptHelper.chooseFrom('Category:', ['auth', 'transactional', 'notifications'], 'auth', true)
|
|
37
|
+
: 'auth');
|
|
38
|
+
const category = categoryInput;
|
|
39
|
+
const varsCsv = options.vars ??
|
|
40
|
+
(interactive
|
|
41
|
+
? await PromptHelper.textInput('Variables (comma-separated):', 'name,confirmLink,expiryMinutes', true)
|
|
42
|
+
: '');
|
|
43
|
+
const variables = TemplateGenerator.parseVariablesCsv(varsCsv);
|
|
44
|
+
TemplateGenerator.ensureDirectories(process.cwd());
|
|
45
|
+
// If file exists and overwrite not specified, ask.
|
|
46
|
+
const desired = {
|
|
47
|
+
name,
|
|
48
|
+
category,
|
|
49
|
+
variables,
|
|
50
|
+
copyright: defaultCopyright(),
|
|
51
|
+
projectRoot: process.cwd(),
|
|
52
|
+
overwrite: options.overwrite === true,
|
|
53
|
+
};
|
|
54
|
+
if (options.overwrite !== true && interactive) {
|
|
55
|
+
const relPath = path.join('src', 'mail', 'markdown', category, `${name}.md`);
|
|
56
|
+
const fullPath = path.join(process.cwd(), relPath);
|
|
57
|
+
if (FileGenerator.fileExists(fullPath)) {
|
|
58
|
+
const confirm = await PromptHelper.confirm('File exists. Overwrite?', false, true);
|
|
59
|
+
if (confirm) {
|
|
60
|
+
desired.overwrite = true;
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
const result = TemplateGenerator.scaffoldMailMarkdownTemplate(desired);
|
|
65
|
+
if (result.success) {
|
|
66
|
+
ErrorHandler.success(result.message);
|
|
67
|
+
return;
|
|
68
|
+
}
|
|
69
|
+
ErrorHandler.warn(result.message);
|
|
70
|
+
},
|
|
71
|
+
});
|
|
72
|
+
},
|
|
73
|
+
});
|
|
74
|
+
export default MakeMailTemplateCommand;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* make:notification-template
|
|
3
|
+
* Scaffolds a notification markdown template into the project.
|
|
4
|
+
*/
|
|
5
|
+
import { IBaseCommand } from '../BaseCommand';
|
|
6
|
+
export declare const MakeNotificationTemplateCommand: Readonly<{
|
|
7
|
+
create(): IBaseCommand;
|
|
8
|
+
}>;
|
|
9
|
+
export default MakeNotificationTemplateCommand;
|
|
10
|
+
//# sourceMappingURL=MakeNotificationTemplateCommand.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"MakeNotificationTemplateCommand.d.ts","sourceRoot":"","sources":["../../../../src/cli/commands/MakeNotificationTemplateCommand.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAA+B,YAAY,EAAE,MAAM,kBAAkB,CAAC;AAoH7E,eAAO,MAAM,+BAA+B;cAChC,YAAY;EAqCtB,CAAC;AAEH,eAAe,+BAA+B,CAAC"}
|
|
@@ -0,0 +1,113 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* make:notification-template
|
|
3
|
+
* Scaffolds a notification markdown template into the project.
|
|
4
|
+
*/
|
|
5
|
+
import { BaseCommand } from '../BaseCommand';
|
|
6
|
+
import { ErrorHandler } from '../ErrorHandler';
|
|
7
|
+
import { PromptHelper } from '../PromptHelper';
|
|
8
|
+
import { FileGenerator } from '../scaffolding/FileGenerator';
|
|
9
|
+
import { TemplateGenerator } from '../scaffolding/TemplateGenerator';
|
|
10
|
+
import { ErrorFactory } from '../../exceptions/ZintrustError';
|
|
11
|
+
import * as path from '../../node-singletons/path';
|
|
12
|
+
import inquirer from 'inquirer';
|
|
13
|
+
const addOptions = (command) => {
|
|
14
|
+
command.argument('[name]', 'Template name (alphanumeric + hyphens only)');
|
|
15
|
+
command.option('--channels <csv>', 'Comma-separated channels: mail,sms,slack,discord');
|
|
16
|
+
command.option('--vars <csv>', 'Comma-separated variables');
|
|
17
|
+
command.option('--sms-variant <mode>', 'short|none', 'none');
|
|
18
|
+
command.option('--overwrite', 'Overwrite existing file');
|
|
19
|
+
command.option('--no-interactive', 'Disable prompts (requires args/options)');
|
|
20
|
+
};
|
|
21
|
+
const defaultCopyright = () => process.env['TEMPLATE_COPYRIGHT'] ?? '© 2025 Zintrust Framework. All rights reserved.';
|
|
22
|
+
const parseChannelsCsv = (csv) => {
|
|
23
|
+
if (csv === undefined || csv.trim() === '')
|
|
24
|
+
return [];
|
|
25
|
+
const parts = csv
|
|
26
|
+
.split(',')
|
|
27
|
+
.map((p) => p.trim())
|
|
28
|
+
.filter((p) => p !== '');
|
|
29
|
+
const out = [];
|
|
30
|
+
for (const p of parts) {
|
|
31
|
+
const lower = p.toLowerCase();
|
|
32
|
+
if (lower === 'mail' || lower === 'sms' || lower === 'slack' || lower === 'discord') {
|
|
33
|
+
if (!out.includes(lower))
|
|
34
|
+
out.push(lower);
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
return out;
|
|
38
|
+
};
|
|
39
|
+
const resolveName = async (options, interactive) => {
|
|
40
|
+
const argName = options.args?.[0];
|
|
41
|
+
const name = argName ??
|
|
42
|
+
(interactive ? await PromptHelper.textInput('Template name:', 'security-alert', true) : '');
|
|
43
|
+
if (name.trim() === '') {
|
|
44
|
+
throw ErrorFactory.createValidationError('Template name required');
|
|
45
|
+
}
|
|
46
|
+
return name;
|
|
47
|
+
};
|
|
48
|
+
const resolveChannels = async (options, interactive) => {
|
|
49
|
+
let channels = parseChannelsCsv(options.channels);
|
|
50
|
+
if (channels.length > 0)
|
|
51
|
+
return channels;
|
|
52
|
+
if (!interactive)
|
|
53
|
+
return [];
|
|
54
|
+
const answer = await inquirer.prompt([
|
|
55
|
+
{
|
|
56
|
+
type: 'checkbox',
|
|
57
|
+
name: 'channels',
|
|
58
|
+
message: 'Channels:',
|
|
59
|
+
choices: ['mail', 'sms', 'slack', 'discord'],
|
|
60
|
+
default: ['mail'],
|
|
61
|
+
},
|
|
62
|
+
]);
|
|
63
|
+
channels = answer.channels ?? ['mail'];
|
|
64
|
+
return channels;
|
|
65
|
+
};
|
|
66
|
+
const resolveVariables = async (options, interactive) => {
|
|
67
|
+
const varsCsv = options.vars ??
|
|
68
|
+
(interactive
|
|
69
|
+
? await PromptHelper.textInput('Variables (comma-separated):', 'ipAddress,location,deviceName,reviewLink', true)
|
|
70
|
+
: '');
|
|
71
|
+
return TemplateGenerator.parseVariablesCsv(varsCsv);
|
|
72
|
+
};
|
|
73
|
+
const maybeEnableOverwrite = async (interactive, overwriteFlag, relPath) => {
|
|
74
|
+
if (!interactive || overwriteFlag)
|
|
75
|
+
return overwriteFlag;
|
|
76
|
+
const fullPath = path.join(process.cwd(), relPath);
|
|
77
|
+
if (!FileGenerator.fileExists(fullPath))
|
|
78
|
+
return false;
|
|
79
|
+
return PromptHelper.confirm('File exists. Overwrite?', false, true);
|
|
80
|
+
};
|
|
81
|
+
export const MakeNotificationTemplateCommand = Object.freeze({
|
|
82
|
+
create() {
|
|
83
|
+
return BaseCommand.create({
|
|
84
|
+
name: 'make:notification-template',
|
|
85
|
+
description: 'Scaffold a notification markdown template into src/notification/markdown',
|
|
86
|
+
addOptions,
|
|
87
|
+
execute: async (options) => {
|
|
88
|
+
const interactive = options.noInteractive !== true;
|
|
89
|
+
const name = await resolveName(options, interactive);
|
|
90
|
+
const channels = await resolveChannels(options, interactive);
|
|
91
|
+
const variables = await resolveVariables(options, interactive);
|
|
92
|
+
const smsVariant = (options.smsVariant ?? 'none');
|
|
93
|
+
TemplateGenerator.ensureDirectories(process.cwd());
|
|
94
|
+
const relPath = path.join('src', 'notification', 'markdown', `${name}.md`);
|
|
95
|
+
const overwrite = await maybeEnableOverwrite(interactive, options.overwrite === true, relPath);
|
|
96
|
+
const result = TemplateGenerator.scaffoldNotificationMarkdownTemplate({
|
|
97
|
+
name,
|
|
98
|
+
channels,
|
|
99
|
+
variables,
|
|
100
|
+
smsVariant,
|
|
101
|
+
copyright: defaultCopyright(),
|
|
102
|
+
projectRoot: process.cwd(),
|
|
103
|
+
overwrite,
|
|
104
|
+
});
|
|
105
|
+
if (result.success)
|
|
106
|
+
ErrorHandler.success(result.message);
|
|
107
|
+
else
|
|
108
|
+
ErrorHandler.warn(result.message);
|
|
109
|
+
},
|
|
110
|
+
});
|
|
111
|
+
},
|
|
112
|
+
});
|
|
113
|
+
export default MakeNotificationTemplateCommand;
|
|
@@ -1,3 +1,7 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* New Command - Project scaffolding CLI command
|
|
3
|
+
* Handles creation of new Zintrust projects
|
|
4
|
+
*/
|
|
1
5
|
import { CommandOptions, IBaseCommand } from '../BaseCommand';
|
|
2
6
|
type TemplateType = 'basic' | 'api' | 'microservice';
|
|
3
7
|
type DatabaseType = 'sqlite' | 'mysql' | 'postgresql' | 'mongodb';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"NewCommand.d.ts","sourceRoot":"","sources":["../../../../src/cli/commands/NewCommand.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"NewCommand.d.ts","sourceRoot":"","sources":["../../../../src/cli/commands/NewCommand.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,OAAO,EAAe,cAAc,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC;AAY7E,KAAK,YAAY,GAAG,OAAO,GAAG,KAAK,GAAG,cAAc,CAAC;AACrD,KAAK,YAAY,GAAG,QAAQ,GAAG,OAAO,GAAG,YAAY,GAAG,SAAS,CAAC;AAYlE,UAAU,sBAAsB;IAC9B,QAAQ,EAAE,YAAY,CAAC;IACvB,QAAQ,EAAE,YAAY,CAAC;IACvB,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,EAAE,MAAM,CAAC;IACf,WAAW,EAAE,MAAM,CAAC;CACrB;AAED,KAAK,gBAAgB,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;AAiMhD,UAAU,WAAY,SAAQ,YAAY;IACxC,eAAe,CAAC,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,cAAc,GAAG,OAAO,CAAC,sBAAsB,CAAC,CAAC;IACxF,gBAAgB,CAAC,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,cAAc,GAAG,OAAO,CAAC,sBAAsB,CAAC,CAAC;IACzF,YAAY,CAAC,IAAI,EAAE,MAAM,EAAE,QAAQ,EAAE,sBAAsB,GAAG,gBAAgB,EAAE,CAAC;IACjF,UAAU,IAAI,MAAM,CAAC,UAAU,CAAC;IAChC,YAAY,IAAI,MAAM,CAAC;IACvB,cAAc,CACZ,IAAI,EAAE,MAAM,EACZ,MAAM,EAAE,sBAAsB,EAC9B,SAAS,CAAC,EAAE,OAAO,GAClB,OAAO,CAAC,OAAO,CAAC,CAAC;IACpB,aAAa,CAAC,IAAI,EAAE,MAAM,GAAG,IAAI,CAAC;CACnC;AAwID;;;GAGG;AACH,eAAO,MAAM,UAAU;IACrB;;OAEG;cACO,WAAW;EAGrB,CAAC"}
|
|
@@ -2,22 +2,16 @@
|
|
|
2
2
|
* New Command - Project scaffolding CLI command
|
|
3
3
|
* Handles creation of new Zintrust projects
|
|
4
4
|
*/
|
|
5
|
-
import { resolveNpmPath } from '../../common';
|
|
6
5
|
import { BaseCommand } from '../BaseCommand';
|
|
7
6
|
import { PromptHelper } from '../PromptHelper';
|
|
8
7
|
import { ProjectScaffolder } from '../scaffolding/ProjectScaffolder';
|
|
8
|
+
import { SpawnUtil } from '../utils/spawn';
|
|
9
|
+
import { extractErrorMessage, resolvePackageManager } from '../../common/index';
|
|
9
10
|
import { appConfig } from '../../config/app';
|
|
10
11
|
import { ErrorFactory } from '../../exceptions/ZintrustError';
|
|
11
12
|
import { execFileSync } from '../../node-singletons/child-process';
|
|
12
13
|
import * as path from '../../node-singletons/path';
|
|
13
14
|
import chalk from 'chalk';
|
|
14
|
-
const errorToMessage = (error) => {
|
|
15
|
-
if (error instanceof Error)
|
|
16
|
-
return error.message;
|
|
17
|
-
if (typeof error === 'string')
|
|
18
|
-
return error;
|
|
19
|
-
return 'Unknown error';
|
|
20
|
-
};
|
|
21
15
|
const getGitBinary = () => 'git';
|
|
22
16
|
const checkGitInstalled = () => {
|
|
23
17
|
try {
|
|
@@ -156,20 +150,27 @@ const isFailureResult = (result) => {
|
|
|
156
150
|
const maybe = result;
|
|
157
151
|
return maybe.success === false;
|
|
158
152
|
};
|
|
159
|
-
const installDependencies = (projectPath, log) => {
|
|
153
|
+
const installDependencies = async (projectPath, log, packageManager, force = false) => {
|
|
154
|
+
// Respect CI by default — avoid network installs in CI unless explicitly allowed
|
|
155
|
+
const isCi = Boolean(process.env['CI']);
|
|
156
|
+
const allowAuto = process.env['ZINTRUST_ALLOW_AUTO_INSTALL'] === '1' || force;
|
|
157
|
+
if (isCi && !allowAuto) {
|
|
158
|
+
log.info('Skipping automatic dependency installation in CI environment.');
|
|
159
|
+
return;
|
|
160
|
+
}
|
|
160
161
|
log.info('📦 Installing dependencies (this may take a minute)...');
|
|
162
|
+
const pm = packageManager ?? resolvePackageManager();
|
|
163
|
+
const args = ['install'];
|
|
161
164
|
try {
|
|
162
|
-
const
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
env: appConfig.getSafeEnv(),
|
|
167
|
-
});
|
|
165
|
+
const exitCode = await SpawnUtil.spawnAndWait({ command: pm, args, cwd: projectPath });
|
|
166
|
+
if (exitCode !== 0) {
|
|
167
|
+
throw ErrorFactory.createCliError(`'${pm} install' failed with exit code ${exitCode}`);
|
|
168
|
+
}
|
|
168
169
|
log.info('✅ Dependencies installed successfully');
|
|
169
170
|
}
|
|
170
171
|
catch (error) {
|
|
171
172
|
ErrorFactory.createCliError('Dependency installation failed', error);
|
|
172
|
-
log.warn(
|
|
173
|
+
log.warn(`Please run "${pm} install" manually in the project directory`);
|
|
173
174
|
}
|
|
174
175
|
};
|
|
175
176
|
const addOptions = (command) => {
|
|
@@ -183,6 +184,8 @@ const addOptions = (command) => {
|
|
|
183
184
|
command.option('--no-interactive', 'Disable interactive mode');
|
|
184
185
|
command.option('--no-git', 'Skip git initialization');
|
|
185
186
|
command.option('--no-install', 'Skip dependency installation');
|
|
187
|
+
command.option('--install', 'Force dependency installation (useful to override CI defaults)');
|
|
188
|
+
command.option('--package-manager <manager>', 'Package manager to use (npm, yarn, pnpm)');
|
|
186
189
|
command.option('--force', 'Overwrite existing directory');
|
|
187
190
|
command.option('--overwrite', 'Overwrite existing directory');
|
|
188
191
|
};
|
|
@@ -204,22 +207,31 @@ const executeNewCommand = async (options, command) => {
|
|
|
204
207
|
}
|
|
205
208
|
if (options['install'] !== false) {
|
|
206
209
|
const projectPath = path.resolve(process.cwd(), projectName);
|
|
207
|
-
|
|
210
|
+
const pm = options['packageManager'] ??
|
|
211
|
+
options['package-manager'];
|
|
212
|
+
const force = options['install'] === true;
|
|
213
|
+
await installDependencies(projectPath, command, pm, force);
|
|
208
214
|
}
|
|
209
215
|
command.success(`\n✨ Project ${projectName} created successfully!`);
|
|
210
216
|
command.info(`\nNext steps:\n cd ${projectName}\n npm run dev\n`);
|
|
211
217
|
}
|
|
212
218
|
catch (error) {
|
|
213
|
-
throw ErrorFactory.createCliError(`Project creation failed: ${
|
|
219
|
+
throw ErrorFactory.createCliError(`Project creation failed: ${extractErrorMessage(error)}`, error);
|
|
214
220
|
}
|
|
215
221
|
};
|
|
216
222
|
const createNewCommandInstance = () => {
|
|
223
|
+
// BaseCommand.getCommand() closes over the execute callback passed at creation time.
|
|
224
|
+
// NewCommand needs its final implementation (which depends on the constructed instance),
|
|
225
|
+
// so we use a mutable indirection.
|
|
226
|
+
let executeImpl = async () => {
|
|
227
|
+
// replaced below with NewCommand-aware execute implementation
|
|
228
|
+
};
|
|
217
229
|
const base = BaseCommand.create({
|
|
218
230
|
name: 'new',
|
|
219
231
|
description: 'Create a new Zintrust project',
|
|
220
232
|
addOptions,
|
|
221
|
-
execute: async (
|
|
222
|
-
|
|
233
|
+
execute: async (options) => {
|
|
234
|
+
await executeImpl(options);
|
|
223
235
|
},
|
|
224
236
|
});
|
|
225
237
|
const commandInstance = {
|
|
@@ -266,6 +278,7 @@ const createNewCommandInstance = () => {
|
|
|
266
278
|
await executeNewCommand(options, commandInstance);
|
|
267
279
|
},
|
|
268
280
|
};
|
|
281
|
+
executeImpl = commandInstance.execute;
|
|
269
282
|
return commandInstance;
|
|
270
283
|
};
|
|
271
284
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PluginCommand.d.ts","sourceRoot":"","sources":["../../../../src/cli/commands/PluginCommand.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAA+B,YAAY,EAAE,MAAM,kBAAkB,CAAC;AAK7E,eAAO,MAAM,aAAa;cACd,YAAY;
|
|
1
|
+
{"version":3,"file":"PluginCommand.d.ts","sourceRoot":"","sources":["../../../../src/cli/commands/PluginCommand.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAA+B,YAAY,EAAE,MAAM,kBAAkB,CAAC;AAK7E,eAAO,MAAM,aAAa;cACd,YAAY;EAuDtB,CAAC"}
|
|
@@ -27,8 +27,9 @@ export const PluginCommand = Object.freeze({
|
|
|
27
27
|
.command('install <pluginId>')
|
|
28
28
|
.alias('i')
|
|
29
29
|
.description('Install a plugin')
|
|
30
|
-
.
|
|
31
|
-
|
|
30
|
+
.option('--package-manager <pm>', 'Specify package manager to use (npm|yarn|pnpm)')
|
|
31
|
+
.action(async (pluginId, options) => {
|
|
32
|
+
await installPlugin(pluginId, options);
|
|
32
33
|
});
|
|
33
34
|
command
|
|
34
35
|
.command('uninstall <pluginId>')
|
|
@@ -74,9 +75,12 @@ async function listPlugins() {
|
|
|
74
75
|
Logger.info(` ${id.padEnd(20)} ${status.padEnd(15)} ${plugin.description} ${aliases}`);
|
|
75
76
|
}
|
|
76
77
|
}
|
|
77
|
-
async function installPlugin(pluginId) {
|
|
78
|
+
async function installPlugin(pluginId, options) {
|
|
78
79
|
try {
|
|
79
|
-
|
|
80
|
+
const pm = typeof options?.['packageManager'] === 'string'
|
|
81
|
+
? String(options?.['packageManager'])
|
|
82
|
+
: undefined;
|
|
83
|
+
await PluginManager.install(pluginId, { packageManager: pm });
|
|
80
84
|
}
|
|
81
85
|
catch (error) {
|
|
82
86
|
Logger.error(`Failed to install plugin ${pluginId}`, error);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PrepareCommand.d.ts","sourceRoot":"","sources":["../../../../src/cli/commands/PrepareCommand.ts"],"names":[],"mappings":"AAAA;;;;GAIG;
|
|
1
|
+
{"version":3,"file":"PrepareCommand.d.ts","sourceRoot":"","sources":["../../../../src/cli/commands/PrepareCommand.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC;AAehD,eAAO,MAAM,cAAc,EA2CtB,YAAY,CAAC"}
|
|
@@ -3,9 +3,9 @@
|
|
|
3
3
|
* Makes the local dist/ folder installable via `file:/.../dist`.
|
|
4
4
|
* Usage: zintrust prepare
|
|
5
5
|
*/
|
|
6
|
-
import { resolveNpmPath } from '../../common';
|
|
7
6
|
import { DistPackager } from '../utils/DistPackager';
|
|
8
7
|
import { SpawnUtil } from '../utils/spawn';
|
|
8
|
+
import { resolveNpmPath } from '../../common/index';
|
|
9
9
|
import { Logger } from '../../config/logger';
|
|
10
10
|
import { ErrorFactory } from '../../exceptions/ZintrustError';
|
|
11
11
|
import * as path from '../../node-singletons/path';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"QACommand.d.ts","sourceRoot":"","sources":["../../../../src/cli/commands/QACommand.ts"],"names":[],"mappings":"AAAA;;;GAGG;
|
|
1
|
+
{"version":3,"file":"QACommand.d.ts","sourceRoot":"","sources":["../../../../src/cli/commands/QACommand.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAe,cAAc,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC;AAO7E,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAEpC;;GAEG;AACH,UAAU,QAAQ;IAChB,MAAM,EAAE,SAAS,GAAG,QAAQ,GAAG,QAAQ,GAAG,SAAS,CAAC;IACpD,MAAM,EAAE,MAAM,CAAC;CAChB;AAED,UAAU,SAAS;IACjB,IAAI,EAAE,QAAQ,CAAC;IACf,SAAS,EAAE,QAAQ,CAAC;IACpB,KAAK,EAAE,QAAQ,CAAC;IAChB,KAAK,EAAE,QAAQ,CAAC;CACjB;AAiaD,UAAU,UAAW,SAAQ,YAAY;IACvC,UAAU,CAAC,OAAO,EAAE,OAAO,GAAG,IAAI,CAAC;IACnC,OAAO,CAAC,MAAM,EAAE,QAAQ,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IACzC,YAAY,CAAC,MAAM,EAAE,QAAQ,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IAC9C,QAAQ,CAAC,MAAM,EAAE,QAAQ,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IAC1C,QAAQ,CAAC,MAAM,EAAE,QAAQ,EAAE,OAAO,EAAE,cAAc,GAAG,IAAI,CAAC;IAC1D,cAAc,CAAC,OAAO,EAAE,SAAS,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;CACnD;AAgFD;;GAEG;AACH,eAAO,MAAM,SAAS,QAAO,UAe5B,CAAC"}
|
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
* QA Command - Unified Quality Assurance
|
|
3
3
|
* Runs linting, type-checking, tests, and SonarQube
|
|
4
4
|
*/
|
|
5
|
-
import { resolveNpmPath } from '../../common';
|
|
6
5
|
import { BaseCommand } from '../BaseCommand';
|
|
6
|
+
import { extractErrorMessageStrict, resolveNpmPath } from '../../common/index';
|
|
7
7
|
import { Logger } from '../../config/logger';
|
|
8
8
|
import { ErrorFactory } from '../../exceptions/ZintrustError';
|
|
9
9
|
import { execFileSync } from '../../node-singletons/child-process';
|
|
@@ -225,11 +225,6 @@ const createResults = () => ({
|
|
|
225
225
|
tests: createEmptyResult(),
|
|
226
226
|
sonar: createEmptyResult(),
|
|
227
227
|
});
|
|
228
|
-
const errorToMessage = (error) => {
|
|
229
|
-
if (error instanceof Error)
|
|
230
|
-
return error.message;
|
|
231
|
-
return 'Unknown error';
|
|
232
|
-
};
|
|
233
228
|
const runNpmScript = (name, script, result) => {
|
|
234
229
|
try {
|
|
235
230
|
Logger.info(`Running npm run ${script}...`);
|
|
@@ -241,7 +236,7 @@ const runNpmScript = (name, script, result) => {
|
|
|
241
236
|
}
|
|
242
237
|
catch (error) {
|
|
243
238
|
result.status = 'failed';
|
|
244
|
-
result.output =
|
|
239
|
+
result.output = extractErrorMessageStrict(error);
|
|
245
240
|
ErrorFactory.createTryCatchError(`${name} failed`, error);
|
|
246
241
|
Logger.warn(`${name} failed`);
|
|
247
242
|
return false;
|
|
@@ -419,9 +414,9 @@ const generateReport = async (results) => {
|
|
|
419
414
|
const reportPath = 'coverage/qa-report.html';
|
|
420
415
|
const reportCssPath = 'coverage/qa-report.css';
|
|
421
416
|
try {
|
|
422
|
-
const
|
|
423
|
-
await
|
|
424
|
-
await
|
|
417
|
+
const { fsPromises } = await import('../../node-singletons/fs');
|
|
418
|
+
await fsPromises.writeFile(reportPath, htmlContent);
|
|
419
|
+
await fsPromises.writeFile(reportCssPath, QA_REPORT_CSS);
|
|
425
420
|
Logger.info(`QA report generated: ${reportPath}`);
|
|
426
421
|
}
|
|
427
422
|
catch (error) {
|
|
@@ -470,20 +465,16 @@ const executeQA = async (qa, options) => {
|
|
|
470
465
|
* QA Command Factory - Create a new QA command instance
|
|
471
466
|
*/
|
|
472
467
|
export const QACommand = () => {
|
|
473
|
-
const
|
|
468
|
+
const qa = BaseCommand.create({
|
|
474
469
|
name: 'qa',
|
|
475
470
|
description: 'Run full Quality Assurance suite',
|
|
476
471
|
addOptions,
|
|
477
472
|
execute: async (options) => executeQA(qa, options),
|
|
478
473
|
});
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
runTests,
|
|
485
|
-
runSonar,
|
|
486
|
-
generateReport,
|
|
487
|
-
};
|
|
474
|
+
qa.runLint = runLint;
|
|
475
|
+
qa.runTypeCheck = runTypeCheck;
|
|
476
|
+
qa.runTests = runTests;
|
|
477
|
+
qa.runSonar = runSonar;
|
|
478
|
+
qa.generateReport = generateReport;
|
|
488
479
|
return qa;
|
|
489
480
|
};
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Secrets Command
|
|
3
|
+
*
|
|
4
|
+
* CLI-first secrets sync using the core internal toolkit.
|
|
5
|
+
*
|
|
6
|
+
* Usage:
|
|
7
|
+
* zin secrets pull --provider aws|cloudflare [--manifest secrets.manifest.json] [--out .env.pull] [--dry-run]
|
|
8
|
+
* zin secrets push --provider aws|cloudflare [--manifest secrets.manifest.json] [--in .env] [--dry-run]
|
|
9
|
+
* zin secrets doctor --provider aws|cloudflare
|
|
10
|
+
*/
|
|
11
|
+
import { type IBaseCommand } from '../BaseCommand';
|
|
12
|
+
export declare const SecretsCommand: Readonly<{
|
|
13
|
+
create(): IBaseCommand;
|
|
14
|
+
}>;
|
|
15
|
+
export default SecretsCommand;
|
|
16
|
+
//# sourceMappingURL=SecretsCommand.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SecretsCommand.d.ts","sourceRoot":"","sources":["../../../../src/cli/commands/SecretsCommand.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,OAAO,EAAoC,KAAK,YAAY,EAAE,MAAM,kBAAkB,CAAC;AAsHvF,eAAO,MAAM,cAAc;cACf,YAAY;EAWtB,CAAC;AAEH,eAAe,cAAc,CAAC"}
|