@tamyla/clodo-framework 3.1.21 → 3.1.23

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.
Files changed (150) hide show
  1. package/CHANGELOG.md +17 -0
  2. package/README.md +283 -1
  3. package/dist/{bin → cli}/clodo-service.js +47 -15
  4. package/dist/cli/commands/assess.js +183 -0
  5. package/dist/{bin → cli}/commands/create.js +5 -5
  6. package/dist/{bin → cli}/commands/deploy.js +122 -90
  7. package/dist/{bin → cli}/commands/diagnose.js +5 -5
  8. package/dist/cli/commands/helpers/deployment-ui.js +138 -0
  9. package/dist/cli/commands/helpers/deployment-verification.js +250 -0
  10. package/dist/cli/commands/helpers/error-recovery.js +80 -0
  11. package/dist/cli/commands/helpers/resource-detection.js +113 -0
  12. package/dist/{bin → cli}/commands/helpers.js +0 -28
  13. package/dist/cli/commands/init-config.js +57 -0
  14. package/dist/{bin → cli}/commands/update.js +5 -5
  15. package/dist/{bin → cli}/commands/validate.js +5 -5
  16. package/dist/cli/security-cli.js +118 -0
  17. package/dist/config/FeatureManager.js +6 -0
  18. package/dist/config/clodo-create.example.json +26 -0
  19. package/dist/config/clodo-deploy.example.json +41 -0
  20. package/dist/config/clodo-update.example.json +46 -0
  21. package/dist/config/clodo-validate.example.json +41 -0
  22. package/dist/config/customers/template/development.env.template +37 -0
  23. package/dist/config/customers/template/production.env.template +39 -0
  24. package/dist/config/customers/template/staging.env.template +37 -0
  25. package/dist/config/customers.js +28 -26
  26. package/dist/config/domain-examples/README.md +464 -0
  27. package/dist/config/domain-examples/environment-mapped.json +168 -0
  28. package/dist/config/domain-examples/multi-domain.json +144 -0
  29. package/dist/config/domain-examples/single-domain.json +50 -0
  30. package/dist/config/examples +12 -0
  31. package/dist/config/features.js +61 -0
  32. package/dist/config/staging-deployment.json +60 -0
  33. package/dist/config/validation-config.json +347 -0
  34. package/dist/deployment/wrangler-deployer.js +1 -1
  35. package/dist/{bin → lib}/deployment/modules/DeploymentOrchestrator.js +2 -2
  36. package/dist/{bin → lib}/deployment/modules/EnvironmentManager.js +2 -2
  37. package/dist/lib/deployment/orchestration/EnterpriseOrchestrator.js +21 -0
  38. package/dist/lib/shared/cache/configuration-cache.js +82 -0
  39. package/dist/{bin → lib}/shared/cloudflare/domain-discovery.js +1 -1
  40. package/dist/{bin → lib}/shared/cloudflare/domain-manager.js +1 -1
  41. package/dist/{bin → lib}/shared/cloudflare/index.js +1 -1
  42. package/dist/{bin → lib}/shared/cloudflare/ops.js +10 -8
  43. package/dist/{bin → lib}/shared/config/ConfigurationManager.js +23 -1
  44. package/dist/{bin → lib}/shared/config/command-config-manager.js +19 -3
  45. package/dist/{bin → lib}/shared/config/index.js +1 -1
  46. package/dist/{bin → lib}/shared/deployment/credential-collector.js +30 -7
  47. package/dist/lib/shared/deployment/index.js +10 -0
  48. package/dist/lib/shared/deployment/rollback-manager.js +7 -0
  49. package/dist/lib/shared/deployment/utilities/d1-error-recovery.js +177 -0
  50. package/dist/{bin → lib}/shared/deployment/validator.js +40 -10
  51. package/dist/lib/shared/deployment/workflows/deployment-summary.js +214 -0
  52. package/dist/lib/shared/deployment/workflows/interactive-confirmation.js +188 -0
  53. package/dist/lib/shared/deployment/workflows/interactive-database-workflow.js +234 -0
  54. package/dist/lib/shared/deployment/workflows/interactive-domain-info-gatherer.js +240 -0
  55. package/dist/lib/shared/deployment/workflows/interactive-secret-workflow.js +228 -0
  56. package/dist/lib/shared/deployment/workflows/interactive-testing-workflow.js +235 -0
  57. package/dist/lib/shared/deployment/workflows/interactive-validation.js +218 -0
  58. package/dist/lib/shared/error-handling/error-classifier.js +46 -0
  59. package/dist/{bin → lib}/shared/monitoring/health-checker.js +129 -1
  60. package/dist/{bin → lib}/shared/monitoring/memory-manager.js +17 -6
  61. package/dist/{bin → lib}/shared/routing/domain-router.js +1 -1
  62. package/dist/lib/shared/utils/deployment-validator.js +97 -0
  63. package/dist/{bin → lib}/shared/utils/formatters.js +10 -0
  64. package/dist/{bin → lib}/shared/utils/index.js +13 -1
  65. package/dist/{bin → lib}/shared/utils/interactive-prompts.js +34 -18
  66. package/dist/{bin → lib}/shared/utils/progress-manager.js +2 -2
  67. package/dist/lib/shared/utils/progress-spinner.js +53 -0
  68. package/dist/lib/shared/utils/sensitive-redactor.js +91 -0
  69. package/dist/{bin → lib}/shared/validation/ValidationRegistry.js +1 -1
  70. package/dist/migration/MigrationAdapters.js +50 -4
  71. package/dist/orchestration/cross-domain-coordinator.js +5 -5
  72. package/dist/orchestration/multi-domain-orchestrator.js +63 -22
  73. package/dist/security/index.js +2 -2
  74. package/dist/security/patterns/insecure-patterns.js +1 -1
  75. package/dist/service-management/ConfirmationEngine.js +1 -1
  76. package/dist/service-management/ErrorTracker.js +1 -1
  77. package/dist/service-management/InputCollector.js +1 -1
  78. package/dist/service-management/ServiceCreator.js +11 -255
  79. package/dist/service-management/ServiceOrchestrator.js +0 -2
  80. package/dist/service-management/generators/testing/UnitTestsGenerator.js +4 -4
  81. package/dist/service-management/index.js +1 -1
  82. package/dist/utils/cloudflare/ops.js +1 -1
  83. package/dist/utils/constants.js +102 -0
  84. package/dist/utils/deployment/wrangler-config-manager.js +215 -48
  85. package/dist/utils/file-manager.js +1 -1
  86. package/dist/utils/formatters.js +1 -1
  87. package/dist/utils/framework-config.js +2 -2
  88. package/dist/utils/interactive-prompts.js +10 -59
  89. package/dist/utils/logger.js +1 -1
  90. package/dist/version/VersionDetector.js +99 -9
  91. package/dist/worker/integration.js +1 -1
  92. package/package.json +10 -10
  93. package/dist/bin/clodo-service-old.js +0 -868
  94. package/dist/bin/clodo-service-test.js +0 -10
  95. package/dist/bin/commands/assess.js +0 -91
  96. package/dist/bin/database/enterprise-db-manager.js +0 -457
  97. package/dist/bin/deployment/enterprise-deploy.js +0 -877
  98. package/dist/bin/deployment/master-deploy.js +0 -1376
  99. package/dist/bin/deployment/modular-enterprise-deploy.js +0 -466
  100. package/dist/bin/deployment/orchestration/EnterpriseOrchestrator.js +0 -401
  101. package/dist/bin/deployment/test-interactive-utils.js +0 -66
  102. package/dist/bin/portfolio/portfolio-manager.js +0 -487
  103. package/dist/bin/security/security-cli.js +0 -108
  104. package/dist/bin/service-management/create-service.js +0 -122
  105. package/dist/bin/service-management/init-service.js +0 -79
  106. package/dist/bin/shared/deployment/index.js +0 -10
  107. package/dist/bin/shared/deployment/rollback-manager.js +0 -523
  108. package/dist/deployment/orchestration/EnterpriseOrchestrator.js +0 -401
  109. package/dist/service-management/ServiceInitializer.js +0 -453
  110. /package/dist/{bin → lib}/database/deployment-db-manager.js +0 -0
  111. /package/dist/{bin → lib}/database/wrangler-d1-manager.js +0 -0
  112. /package/dist/{bin → lib}/deployment/modules/DeploymentConfiguration.js +0 -0
  113. /package/dist/{bin → lib}/deployment/modules/MonitoringIntegration.js +0 -0
  114. /package/dist/{bin → lib}/deployment/modules/ValidationManager.js +0 -0
  115. /package/dist/{bin → lib}/deployment/orchestration/BaseDeploymentOrchestrator.js +0 -0
  116. /package/dist/{bin → lib}/deployment/orchestration/PortfolioOrchestrator.js +0 -0
  117. /package/dist/{bin → lib}/deployment/orchestration/SingleServiceOrchestrator.js +0 -0
  118. /package/dist/{bin → lib}/deployment/orchestration/UnifiedDeploymentOrchestrator.js +0 -0
  119. /package/dist/{bin → lib}/shared/config/cache.js +0 -0
  120. /package/dist/{bin → lib}/shared/config/cloudflare-service-validator.js +0 -0
  121. /package/dist/{bin → lib}/shared/config/manager.js +0 -0
  122. /package/dist/{bin → lib}/shared/config/manifest-loader.js +0 -0
  123. /package/dist/{bin → lib}/shared/database/connection-manager.js +0 -0
  124. /package/dist/{bin → lib}/shared/database/index.js +0 -0
  125. /package/dist/{bin → lib}/shared/database/orchestrator.js +0 -0
  126. /package/dist/{bin → lib}/shared/deployment/auditor.js +0 -0
  127. /package/dist/{bin → lib}/shared/index.js +0 -0
  128. /package/dist/{bin → lib}/shared/logging/Logger.js +0 -0
  129. /package/dist/{bin → lib}/shared/monitoring/index.js +0 -0
  130. /package/dist/{bin → lib}/shared/monitoring/production-monitor.js +0 -0
  131. /package/dist/{bin → lib}/shared/production-tester/api-tester.js +0 -0
  132. /package/dist/{bin → lib}/shared/production-tester/auth-tester.js +0 -0
  133. /package/dist/{bin → lib}/shared/production-tester/core.js +0 -0
  134. /package/dist/{bin → lib}/shared/production-tester/database-tester.js +0 -0
  135. /package/dist/{bin → lib}/shared/production-tester/index.js +0 -0
  136. /package/dist/{bin → lib}/shared/production-tester/load-tester.js +0 -0
  137. /package/dist/{bin → lib}/shared/production-tester/performance-tester.js +0 -0
  138. /package/dist/{bin → lib}/shared/security/api-token-manager.js +0 -0
  139. /package/dist/{bin → lib}/shared/security/index.js +0 -0
  140. /package/dist/{bin → lib}/shared/security/secret-generator.js +0 -0
  141. /package/dist/{bin → lib}/shared/security/secure-token-manager.js +0 -0
  142. /package/dist/{bin → lib}/shared/utils/ErrorHandler.js +0 -0
  143. /package/dist/{bin → lib}/shared/utils/cli-options.js +0 -0
  144. /package/dist/{bin → lib}/shared/utils/config-loader.js +0 -0
  145. /package/dist/{bin → lib}/shared/utils/error-recovery.js +0 -0
  146. /package/dist/{bin → lib}/shared/utils/file-manager.js +0 -0
  147. /package/dist/{bin → lib}/shared/utils/graceful-shutdown-manager.js +0 -0
  148. /package/dist/{bin → lib}/shared/utils/interactive-utils.js +0 -0
  149. /package/dist/{bin → lib}/shared/utils/output-formatter.js +0 -0
  150. /package/dist/{bin → lib}/shared/utils/rate-limiter.js +0 -0
@@ -1,401 +0,0 @@
1
- /**
2
- * Enterprise Orchestrator
3
- *
4
- * Handles orchestration for enterprise deployments.
5
- * Includes advanced features like high availability, disaster recovery, and compliance.
6
- *
7
- * Phase Implementation:
8
- * 1. Initialize - Setup enterprise environment
9
- * 2. Validate - Comprehensive validation with compliance checks
10
- * 3. Prepare - Prepare enterprise resources
11
- * 4. Deploy - Deploy with advanced features
12
- * 5. Verify - Comprehensive verification
13
- * 6. Monitor - Enterprise-grade monitoring
14
- */
15
-
16
- import { BaseDeploymentOrchestrator } from './BaseDeploymentOrchestrator.js';
17
- export class EnterpriseOrchestrator extends BaseDeploymentOrchestrator {
18
- /**
19
- * Constructor for enterprise orchestrator
20
- * @param {Object} options - Configuration options
21
- * @param {string} options.deploymentId - Unique deployment identifier
22
- * @param {Object} options.config - Enterprise configuration
23
- * @param {string} options.config.domain - Primary domain
24
- * @param {string} options.config.environment - Deployment environment
25
- * @param {string} options.config.complianceLevel - Compliance requirement (e.g., 'sox', 'hipaa', 'pci')
26
- * @param {boolean} options.config.enableDisasterRecovery - Enable DR setup
27
- * @param {boolean} options.config.enableHighAvailability - Enable HA setup
28
- * @param {Object} options.auditor - Deployment auditor (optional)
29
- */
30
- constructor(options = {}) {
31
- super(options);
32
- this.orchestratorType = 'enterprise';
33
- this.enterpriseConfig = options.config || {};
34
- this.complianceLevel = this.enterpriseConfig.complianceLevel || 'standard';
35
- this.enableDR = this.enterpriseConfig.enableDisasterRecovery !== false;
36
- this.enableHA = this.enterpriseConfig.enableHighAvailability !== false;
37
- this.securityChecks = [];
38
- this.complianceChecks = [];
39
- }
40
-
41
- /**
42
- * Initialization Phase
43
- * Setup enterprise environment with advanced capabilities
44
- */
45
- async onInitialize() {
46
- console.log(' 🏛️ Initializing enterprise deployment environment');
47
- const initialization = {
48
- timestamp: new Date().toISOString(),
49
- domain: this.enterpriseConfig.domain || 'enterprise',
50
- environment: this.enterpriseConfig.environment || 'production',
51
- complianceLevel: this.complianceLevel,
52
- features: ['enterprise', 'high-availability', 'disaster-recovery', 'compliance-tracking', 'advanced-monitoring', 'multi-region'],
53
- capabilities: {
54
- highAvailability: this.enableHA,
55
- disasterRecovery: this.enableDR,
56
- autoScaling: true,
57
- multiRegion: true,
58
- complianceMonitoring: true,
59
- auditLogging: true,
60
- encryptionAtRest: true,
61
- encryptionInTransit: true
62
- }
63
- };
64
- console.log(` ✅ Domain: ${initialization.domain}`);
65
- console.log(` ✅ Environment: ${initialization.environment}`);
66
- console.log(` ✅ Compliance level: ${initialization.complianceLevel}`);
67
- console.log(` ✅ High availability: ${initialization.capabilities.highAvailability ? 'enabled' : 'disabled'}`);
68
- console.log(` ✅ Disaster recovery: ${initialization.capabilities.disasterRecovery ? 'enabled' : 'disabled'}`);
69
- return {
70
- status: 'initialized',
71
- orchestratorType: this.orchestratorType,
72
- ...initialization
73
- };
74
- }
75
-
76
- /**
77
- * Validation Phase
78
- * Comprehensive validation including compliance and security checks
79
- */
80
- async onValidation() {
81
- console.log(' 🔒 Performing comprehensive enterprise validation');
82
-
83
- // Security checks
84
- this.securityChecks = [{
85
- name: 'authentication',
86
- passed: true,
87
- severity: 'critical'
88
- }, {
89
- name: 'authorization',
90
- passed: true,
91
- severity: 'critical'
92
- }, {
93
- name: 'encryption',
94
- passed: true,
95
- severity: 'critical'
96
- }, {
97
- name: 'tls-certificate',
98
- passed: true,
99
- severity: 'critical'
100
- }, {
101
- name: 'api-security',
102
- passed: true,
103
- severity: 'high'
104
- }];
105
-
106
- // Compliance checks based on level
107
- this.complianceChecks = [];
108
- if (this.complianceLevel === 'sox') {
109
- this.complianceChecks.push({
110
- name: 'financial-controls',
111
- passed: true
112
- }, {
113
- name: 'audit-trail',
114
- passed: true
115
- }, {
116
- name: 'change-management',
117
- passed: true
118
- });
119
- } else if (this.complianceLevel === 'hipaa') {
120
- this.complianceChecks.push({
121
- name: 'phi-protection',
122
- passed: true
123
- }, {
124
- name: 'access-controls',
125
- passed: true
126
- }, {
127
- name: 'audit-logging',
128
- passed: true
129
- });
130
- } else if (this.complianceLevel === 'pci') {
131
- this.complianceChecks.push({
132
- name: 'payment-data-security',
133
- passed: true
134
- }, {
135
- name: 'network-segmentation',
136
- passed: true
137
- }, {
138
- name: 'pci-scanning',
139
- passed: true
140
- });
141
- }
142
- const validation = {
143
- status: 'validated',
144
- securityChecks: this.securityChecks,
145
- complianceChecks: this.complianceChecks,
146
- allChecksPassed: true
147
- };
148
- console.log(` ✅ Security checks: ${this.securityChecks.filter(c => c.passed).length}/${this.securityChecks.length} passed`);
149
- console.log(` ✅ Compliance checks: ${this.complianceChecks.filter(c => c.passed).length}/${this.complianceChecks.length} passed`);
150
- console.log(` ✅ Overall validation: passed`);
151
- return validation;
152
- }
153
-
154
- /**
155
- * Preparation Phase
156
- * Prepare enterprise resources with redundancy
157
- */
158
- async onPrepare() {
159
- console.log(' 📦 Preparing enterprise resources');
160
- const resources = {
161
- primary: {
162
- worker: {
163
- status: 'prepared',
164
- region: 'us-east-1'
165
- },
166
- database: {
167
- status: 'prepared',
168
- replication: true
169
- },
170
- cache: {
171
- status: 'prepared',
172
- redundancy: 'active-active'
173
- },
174
- secrets: {
175
- status: 'prepared',
176
- rotation: true
177
- }
178
- },
179
- secondary: this.enableHA ? {
180
- worker: {
181
- status: 'prepared',
182
- region: 'us-west-2'
183
- },
184
- database: {
185
- status: 'prepared',
186
- replication: true
187
- },
188
- cache: {
189
- status: 'prepared',
190
- redundancy: 'active-active'
191
- }
192
- } : null,
193
- drSite: this.enableDR ? {
194
- location: 'eu-west-1',
195
- status: 'prepared',
196
- rpoMinutes: 15,
197
- rtoMinutes: 30
198
- } : null,
199
- security: {
200
- encryption: {
201
- status: 'configured',
202
- algorithm: 'AES-256'
203
- },
204
- waf: {
205
- status: 'enabled',
206
- rules: 150
207
- },
208
- ddosProtection: {
209
- status: 'enabled',
210
- threshold: '1 Tbps'
211
- }
212
- }
213
- };
214
- console.log(` ✅ Primary region: us-east-1`);
215
- if (this.enableHA) console.log(` ✅ Secondary region: us-west-2`);
216
- if (this.enableDR) console.log(` ✅ DR site: eu-west-1 (RPO: 15min, RTO: 30min)`);
217
- console.log(` ✅ Encryption: AES-256`);
218
- console.log(` ✅ WAF: 150 rules`);
219
- console.log(` ✅ DDoS protection: enabled`);
220
- return {
221
- status: 'prepared',
222
- resources,
223
- readyForDeployment: true,
224
- redundancy: this.enableHA,
225
- disasterRecovery: this.enableDR
226
- };
227
- }
228
-
229
- /**
230
- * Deployment Phase
231
- * Deploy with enterprise features
232
- */
233
- async onDeploy() {
234
- console.log(' 🚀 Deploying with enterprise features');
235
- const deployment = {
236
- status: 'deployed',
237
- timestamp: new Date().toISOString(),
238
- primaryDeployment: {
239
- region: 'us-east-1',
240
- version: '1.0.0',
241
- status: 'active',
242
- instances: 5,
243
- loadBalancer: 'configured'
244
- },
245
- secondaryDeployment: this.enableHA ? {
246
- region: 'us-west-2',
247
- version: '1.0.0',
248
- status: 'active',
249
- instances: 5,
250
- loadBalancer: 'configured'
251
- } : null,
252
- globalLoadBalancer: this.enableHA ? {
253
- status: 'configured',
254
- routingPolicy: 'geo-based',
255
- healthCheck: 'enabled'
256
- } : null,
257
- drDeployment: this.enableDR ? {
258
- region: 'eu-west-1',
259
- status: 'standby',
260
- version: '1.0.0',
261
- automatedRecovery: true
262
- } : null
263
- };
264
- console.log(` ✅ Primary deployment: active (5 instances)`);
265
- if (this.enableHA) console.log(` ✅ Secondary deployment: active (5 instances)`);
266
- if (this.enableDR) console.log(` ✅ DR deployment: standby (auto-recovery enabled)`);
267
- console.log(` ✅ Version: 1.0.0`);
268
- return deployment;
269
- }
270
-
271
- /**
272
- * Verification Phase
273
- * Comprehensive verification
274
- */
275
- async onVerify() {
276
- console.log(' ✔️ Performing comprehensive enterprise verification');
277
- const verification = {
278
- status: 'verified',
279
- primaryHealth: {
280
- status: 'healthy',
281
- endpoints: 5,
282
- responseTime: '95ms',
283
- errorRate: '0%',
284
- uptime: '99.99%'
285
- },
286
- secondaryHealth: this.enableHA ? {
287
- status: 'healthy',
288
- endpoints: 5,
289
- responseTime: '100ms',
290
- errorRate: '0%',
291
- uptime: '99.99%'
292
- } : null,
293
- drVerification: this.enableDR ? {
294
- status: 'verified',
295
- failoverTime: '28s',
296
- dataIntegrity: 'confirmed',
297
- recoveryTested: true
298
- } : null,
299
- globalHealth: this.enableHA ? {
300
- status: 'healthy',
301
- activeRegions: 2,
302
- failover: 'tested'
303
- } : null,
304
- securityVerification: {
305
- encryptionStatus: 'verified',
306
- certificateStatus: 'valid',
307
- tlsVersion: '1.3'
308
- }
309
- };
310
- console.log(` ✅ Primary: healthy (99.99% uptime)`);
311
- if (this.enableHA) console.log(` ✅ Secondary: healthy (99.99% uptime)`);
312
- if (this.enableDR) console.log(` ✅ DR verified (failover time: 28s)`);
313
- console.log(` ✅ Security: verified`);
314
- return verification;
315
- }
316
-
317
- /**
318
- * Monitoring Phase
319
- * Enterprise-grade monitoring setup
320
- */
321
- async onMonitor() {
322
- console.log(' 📊 Setting up enterprise monitoring');
323
- const monitoring = {
324
- status: 'monitoring_enabled',
325
- monitoringTiers: {
326
- tier1: {
327
- name: 'Critical Alerts',
328
- targets: ['availability', 'security', 'compliance'],
329
- escalation: 'immediate'
330
- },
331
- tier2: {
332
- name: 'High Priority',
333
- targets: ['performance', 'errors', 'resources'],
334
- escalation: '5 minutes'
335
- },
336
- tier3: {
337
- name: 'Standard Monitoring',
338
- targets: ['usage', 'trends', 'capacity'],
339
- escalation: '15 minutes'
340
- }
341
- },
342
- dashboards: ['enterprise-overview', 'multi-region-status', 'security-compliance', 'performance-metrics', 'cost-analysis', 'capacity-planning'],
343
- alertChannels: ['pagerduty', 'email', 'sms', 'slack'],
344
- features: {
345
- anomalyDetection: true,
346
- predictiveScaling: true,
347
- costOptimization: true,
348
- complianceReporting: true,
349
- auditTrail: true,
350
- threatDetection: true
351
- },
352
- sla: {
353
- availability: '99.99%',
354
- supportLevel: '24/7',
355
- responseTime: '15 minutes'
356
- }
357
- };
358
- console.log(` ✅ Monitoring tiers: 3 levels configured`);
359
- console.log(` ✅ Dashboards: ${monitoring.dashboards.length}`);
360
- console.log(` ✅ Alert channels: ${monitoring.alertChannels.join(', ')}`);
361
- console.log(` ✅ SLA: ${monitoring.sla.availability}`);
362
- return monitoring;
363
- }
364
-
365
- /**
366
- * Get orchestrator metadata
367
- * @returns {Object} Metadata about this orchestrator
368
- */
369
- getMetadata() {
370
- return {
371
- type: this.orchestratorType,
372
- name: 'EnterpriseOrchestrator',
373
- deploymentType: 'enterprise',
374
- complianceLevel: this.complianceLevel,
375
- capabilities: ['enterprise', 'multi-region', 'high-availability', 'disaster-recovery', 'compliance-tracking', 'advanced-monitoring', 'auto-scaling', 'cost-optimization'],
376
- maxInstances: 1000,
377
- maxPhases: 6,
378
- averageDeploymentTime: '10-20 minutes',
379
- specialFeatures: ['multi-region-deployment', 'active-active-setup', 'automated-failover', 'compliance-automation', 'security-scanning', 'audit-logging', 'cost-tracking', 'anomaly-detection'],
380
- sla: {
381
- availability: '99.99%',
382
- responseTime: '< 100ms',
383
- supportLevel: '24/7'
384
- }
385
- };
386
- }
387
-
388
- /**
389
- * Get compliance status
390
- * @returns {Object} Compliance status and checks
391
- */
392
- getComplianceStatus() {
393
- return {
394
- complianceLevel: this.complianceLevel,
395
- securityChecks: this.securityChecks,
396
- complianceChecks: this.complianceChecks,
397
- allChecksPassed: [...this.securityChecks, ...this.complianceChecks].every(check => check.passed)
398
- };
399
- }
400
- }
401
- export default EnterpriseOrchestrator;
@@ -1,66 +0,0 @@
1
- #!/usr/bin/env node
2
-
3
- /**
4
- * Test Enhanced Interactive Utils
5
- * Quick test to verify the enhanced interactive base improvements
6
- */
7
- import { askUser, askYesNo, askChoice, DeploymentInteractiveUtils, startProgress, closePrompts } from '../shared/utils/interactive-utils.js';
8
- async function testEnhancedInteractiveUtils() {
9
- console.log('🧪 Testing Enhanced Interactive Utils v2.0.0');
10
- console.log('============================================');
11
- try {
12
- // Test progress tracking
13
- const progressTracker = startProgress(5, 'Starting Interactive Tests');
14
-
15
- // Test enhanced yes/no with colors
16
- progressTracker.nextStep('Testing Enhanced Yes/No Prompts');
17
- const continueTest = await askYesNo('Continue with interactive utils test?', 'y');
18
- if (!continueTest) {
19
- console.log('Test cancelled by user');
20
- return;
21
- }
22
-
23
- // Test deployment interactive utilities
24
- progressTracker.nextStep('Testing Deployment-Specific Utilities');
25
- const deployUtils = new DeploymentInteractiveUtils({
26
- enableColors: true,
27
- enableProgress: true,
28
- validateInputs: true
29
- });
30
-
31
- // Test deployment mode selection
32
- progressTracker.nextStep('Testing Deployment Mode Selection');
33
- console.log('\n🎯 Testing Enhanced Deployment Mode Selection:');
34
- const deploymentMode = await deployUtils.askDeploymentMode(0);
35
- console.log(`Selected mode: ${deploymentMode}`);
36
-
37
- // Test domain validation
38
- progressTracker.nextStep('Testing Domain Validation');
39
- console.log('\n🌐 Testing Domain Validation:');
40
- const testDomain = await deployUtils.askDomain('Enter a test domain (e.g., "testcorp")');
41
- console.log(`Valid domain entered: ${testDomain}`);
42
-
43
- // Test environment selection with warnings
44
- progressTracker.nextStep('Testing Environment Selection');
45
- console.log('\n🌍 Testing Environment Selection with Warnings:');
46
- const environment = await deployUtils.askEnvironment(2); // Default to development
47
- console.log(`Selected environment: ${environment}`);
48
- console.log('\n🎉 Enhanced Interactive Utils Test Completed Successfully!');
49
- console.log('Features tested:');
50
- console.log(' ✅ Progress tracking with visual progress bars');
51
- console.log(' ✅ Enhanced prompts with color formatting');
52
- console.log(' ✅ Input validation with retry logic');
53
- console.log(' ✅ Deployment-specific utilities');
54
- console.log(' ✅ Environment warnings and confirmations');
55
- } catch (error) {
56
- console.error(`❌ Test failed: ${error.message}`);
57
- } finally {
58
- closePrompts();
59
- }
60
- }
61
-
62
- // Run the test
63
- if (process.argv[1] && import.meta.url.includes(process.argv[1].replace(/\\\\/g, '/'))) {
64
- testEnhancedInteractiveUtils().catch(console.error);
65
- }
66
- export { testEnhancedInteractiveUtils };