baseguard 1.0.5 → 1.0.6

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 (80) hide show
  1. package/dist/ai/gemini-analyzer.d.ts.map +1 -1
  2. package/dist/ai/gemini-analyzer.js +1 -1
  3. package/dist/ai/gemini-analyzer.js.map +1 -1
  4. package/dist/ai/gemini-code-fixer.d.ts.map +1 -1
  5. package/dist/ai/gemini-code-fixer.js +2 -7
  6. package/dist/ai/gemini-code-fixer.js.map +1 -1
  7. package/dist/ai/jules-implementer.d.ts +8 -0
  8. package/dist/ai/jules-implementer.d.ts.map +1 -1
  9. package/dist/ai/jules-implementer.js +115 -17
  10. package/dist/ai/jules-implementer.js.map +1 -1
  11. package/package.json +1 -1
  12. package/src/ai/__tests__/gemini-analyzer.test.ts +0 -181
  13. package/src/ai/agentkit-orchestrator.ts +0 -534
  14. package/src/ai/fix-manager.ts +0 -362
  15. package/src/ai/gemini-analyzer.ts +0 -665
  16. package/src/ai/gemini-code-fixer.ts +0 -539
  17. package/src/ai/index.ts +0 -4
  18. package/src/ai/jules-implementer.ts +0 -504
  19. package/src/ai/unified-code-fixer.ts +0 -347
  20. package/src/commands/automation.ts +0 -344
  21. package/src/commands/check.ts +0 -298
  22. package/src/commands/config.ts +0 -584
  23. package/src/commands/fix.ts +0 -269
  24. package/src/commands/index.ts +0 -7
  25. package/src/commands/init.ts +0 -156
  26. package/src/commands/status.ts +0 -307
  27. package/src/core/api-key-manager.ts +0 -298
  28. package/src/core/baseguard.ts +0 -757
  29. package/src/core/baseline-checker.ts +0 -566
  30. package/src/core/cache-manager.ts +0 -272
  31. package/src/core/configuration-recovery.ts +0 -672
  32. package/src/core/configuration.ts +0 -596
  33. package/src/core/debug-logger.ts +0 -590
  34. package/src/core/directory-filter.ts +0 -421
  35. package/src/core/error-handler.ts +0 -518
  36. package/src/core/file-processor.ts +0 -338
  37. package/src/core/gitignore-manager.ts +0 -169
  38. package/src/core/graceful-degradation-manager.ts +0 -596
  39. package/src/core/index.ts +0 -17
  40. package/src/core/lazy-loader.ts +0 -317
  41. package/src/core/logger.ts +0 -0
  42. package/src/core/memory-manager.ts +0 -290
  43. package/src/core/parser-worker.ts +0 -33
  44. package/src/core/startup-optimizer.ts +0 -246
  45. package/src/core/system-error-handler.ts +0 -755
  46. package/src/git/automation-engine.ts +0 -361
  47. package/src/git/github-manager.ts +0 -190
  48. package/src/git/hook-manager.ts +0 -210
  49. package/src/git/index.ts +0 -4
  50. package/src/index.ts +0 -8
  51. package/src/parsers/feature-validator.ts +0 -559
  52. package/src/parsers/index.ts +0 -8
  53. package/src/parsers/parser-manager.ts +0 -418
  54. package/src/parsers/parser.ts +0 -26
  55. package/src/parsers/react-parser-optimized.ts +0 -161
  56. package/src/parsers/react-parser.ts +0 -359
  57. package/src/parsers/svelte-parser.ts +0 -510
  58. package/src/parsers/vanilla-parser.ts +0 -685
  59. package/src/parsers/vue-parser.ts +0 -476
  60. package/src/types/index.ts +0 -96
  61. package/src/ui/components.ts +0 -567
  62. package/src/ui/help.ts +0 -193
  63. package/src/ui/index.ts +0 -4
  64. package/src/ui/prompts.ts +0 -681
  65. package/src/ui/terminal-header.ts +0 -59
  66. package/tests/e2e/baseguard.e2e.test.ts +0 -516
  67. package/tests/e2e/cross-platform.e2e.test.ts +0 -420
  68. package/tests/e2e/git-integration.e2e.test.ts +0 -487
  69. package/tests/fixtures/react-project/package.json +0 -14
  70. package/tests/fixtures/react-project/src/App.css +0 -76
  71. package/tests/fixtures/react-project/src/App.tsx +0 -77
  72. package/tests/fixtures/svelte-project/package.json +0 -11
  73. package/tests/fixtures/svelte-project/src/App.svelte +0 -369
  74. package/tests/fixtures/vanilla-project/index.html +0 -76
  75. package/tests/fixtures/vanilla-project/script.js +0 -331
  76. package/tests/fixtures/vanilla-project/styles.css +0 -359
  77. package/tests/fixtures/vue-project/package.json +0 -12
  78. package/tests/fixtures/vue-project/src/App.vue +0 -216
  79. package/tmp-smoke/.baseguard/backups/config-2026-02-19T12-04-11-067Z-auto.json +0 -30
  80. package/tmp-smoke/src/bad.css +0 -3
@@ -1,596 +0,0 @@
1
- import chalk from 'chalk';
2
- import { promises as fs } from 'fs';
3
- import { createHash } from 'crypto';
4
- import path from 'path';
5
- import type { Violation, Analysis, Fix } from '../types/index.js';
6
- import { ErrorType } from './error-handler.js';
7
- import { UIComponents } from '../ui/components.js';
8
-
9
- export interface DegradationMode {
10
- name: string;
11
- description: string;
12
- capabilities: {
13
- baselineChecking: boolean;
14
- aiAnalysis: boolean;
15
- autoFix: boolean;
16
- caching: boolean;
17
- offlineMode: boolean;
18
- };
19
- limitations: string[];
20
- }
21
-
22
- export interface FallbackOptions {
23
- useCache: boolean;
24
- skipAI: boolean;
25
- basicAnalysis: boolean;
26
- offlineMode: boolean;
27
- continueOnError: boolean;
28
- }
29
-
30
- /**
31
- * Manages graceful degradation when services are unavailable
32
- */
33
- export class GracefulDegradationManager {
34
- private static currentMode: DegradationMode | null = null;
35
- private static fallbackOptions: FallbackOptions = {
36
- useCache: true,
37
- skipAI: false,
38
- basicAnalysis: true,
39
- offlineMode: false,
40
- continueOnError: true
41
- };
42
- private static serviceStatus = new Map<string, { available: boolean; lastCheck: number; error?: string }>();
43
- private static cacheDir = path.join(process.cwd(), '.baseguard', 'cache');
44
-
45
- /**
46
- * Available degradation modes
47
- */
48
- private static readonly DEGRADATION_MODES: Record<string, DegradationMode> = {
49
- full: {
50
- name: 'Full Functionality',
51
- description: 'All features available including AI analysis and fixing',
52
- capabilities: {
53
- baselineChecking: true,
54
- aiAnalysis: true,
55
- autoFix: true,
56
- caching: true,
57
- offlineMode: false
58
- },
59
- limitations: []
60
- },
61
-
62
- aiLimited: {
63
- name: 'AI Limited',
64
- description: 'Basic compatibility checking with limited AI features',
65
- capabilities: {
66
- baselineChecking: true,
67
- aiAnalysis: false,
68
- autoFix: false,
69
- caching: true,
70
- offlineMode: false
71
- },
72
- limitations: [
73
- 'AI analysis unavailable',
74
- 'Automatic fixing disabled',
75
- 'Using cached analysis when available'
76
- ]
77
- },
78
-
79
- offline: {
80
- name: 'Offline Mode',
81
- description: 'Baseline checking only using local data',
82
- capabilities: {
83
- baselineChecking: true,
84
- aiAnalysis: false,
85
- autoFix: false,
86
- caching: true,
87
- offlineMode: true
88
- },
89
- limitations: [
90
- 'No network-dependent features',
91
- 'AI services unavailable',
92
- 'Using local web-features data only',
93
- 'Cached results when available'
94
- ]
95
- },
96
-
97
- minimal: {
98
- name: 'Minimal Mode',
99
- description: 'Basic error detection with minimal features',
100
- capabilities: {
101
- baselineChecking: true,
102
- aiAnalysis: false,
103
- autoFix: false,
104
- caching: false,
105
- offlineMode: true
106
- },
107
- limitations: [
108
- 'No AI features',
109
- 'No caching',
110
- 'Basic compatibility checking only',
111
- 'Manual review required for all issues'
112
- ]
113
- }
114
- };
115
-
116
- /**
117
- * Initialize degradation manager
118
- */
119
- static async initialize(): Promise<void> {
120
- // Ensure cache directory exists
121
- await fs.mkdir(this.cacheDir, { recursive: true });
122
-
123
- // Set initial mode based on environment
124
- if (process.env.BASEGUARD_OFFLINE === 'true') {
125
- await this.setDegradationMode('offline');
126
- } else {
127
- await this.setDegradationMode('full');
128
- }
129
-
130
- // Check service availability
131
- await this.checkServiceAvailability();
132
- }
133
-
134
- /**
135
- * Set degradation mode
136
- */
137
- static async setDegradationMode(modeName: string): Promise<void> {
138
- const mode = this.DEGRADATION_MODES[modeName];
139
- if (!mode) {
140
- throw new Error(`Unknown degradation mode: ${modeName}`);
141
- }
142
-
143
- this.currentMode = mode;
144
-
145
- // Update environment variables based on mode
146
- if (mode.capabilities.offlineMode) {
147
- process.env.BASEGUARD_OFFLINE = 'true';
148
- }
149
-
150
- // Update fallback options
151
- this.fallbackOptions = {
152
- useCache: mode.capabilities.caching,
153
- skipAI: !mode.capabilities.aiAnalysis,
154
- basicAnalysis: true,
155
- offlineMode: mode.capabilities.offlineMode,
156
- continueOnError: true
157
- };
158
-
159
- console.log(chalk.cyan(`šŸ”„ Switched to ${mode.name}: ${mode.description}`));
160
-
161
- if (mode.limitations.length > 0) {
162
- console.log(chalk.yellow('āš ļø Limitations in this mode:'));
163
- mode.limitations.forEach(limitation => {
164
- console.log(chalk.yellow(` • ${limitation}`));
165
- });
166
- }
167
- }
168
-
169
- /**
170
- * Check availability of external services
171
- */
172
- static async checkServiceAvailability(): Promise<void> {
173
- const services = ['gemini', 'jules', 'network'];
174
-
175
- for (const service of services) {
176
- try {
177
- const available = await this.testServiceAvailability(service);
178
- this.serviceStatus.set(service, {
179
- available,
180
- lastCheck: Date.now(),
181
- error: available ? undefined : 'Service unavailable'
182
- });
183
- } catch (error) {
184
- this.serviceStatus.set(service, {
185
- available: false,
186
- lastCheck: Date.now(),
187
- error: error instanceof Error ? error.message : 'Unknown error'
188
- });
189
- }
190
- }
191
-
192
- // Auto-adjust degradation mode based on service availability
193
- await this.autoAdjustDegradationMode();
194
- }
195
-
196
- /**
197
- * Test individual service availability
198
- */
199
- private static async testServiceAvailability(service: string): Promise<boolean> {
200
- switch (service) {
201
- case 'network':
202
- try {
203
- // Simple network connectivity test
204
- const response = await fetch('https://www.google.com', {
205
- method: 'HEAD',
206
- signal: AbortSignal.timeout(5000)
207
- });
208
- return response.ok;
209
- } catch (error) {
210
- return false;
211
- }
212
-
213
- case 'gemini':
214
- // This would be implemented with actual Gemini API test
215
- return this.serviceStatus.get('network')?.available ?? false;
216
-
217
- case 'jules':
218
- // This would be implemented with actual Jules API test
219
- return this.serviceStatus.get('network')?.available ?? false;
220
-
221
- default:
222
- return false;
223
- }
224
- }
225
-
226
- /**
227
- * Auto-adjust degradation mode based on service availability
228
- */
229
- private static async autoAdjustDegradationMode(): Promise<void> {
230
- const networkAvailable = this.serviceStatus.get('network')?.available ?? false;
231
- const geminiAvailable = this.serviceStatus.get('gemini')?.available ?? false;
232
- const julesAvailable = this.serviceStatus.get('jules')?.available ?? false;
233
-
234
- if (!networkAvailable) {
235
- await this.setDegradationMode('offline');
236
- } else if (!geminiAvailable && !julesAvailable) {
237
- await this.setDegradationMode('aiLimited');
238
- } else if (!geminiAvailable || !julesAvailable) {
239
- await this.setDegradationMode('aiLimited');
240
- } else if (this.currentMode?.name !== 'Full Functionality') {
241
- await this.setDegradationMode('full');
242
- }
243
- }
244
-
245
- /**
246
- * Handle service failure and adjust accordingly
247
- */
248
- static async handleServiceFailure(service: string, errorType: ErrorType): Promise<void> {
249
- console.log(chalk.yellow(`āš ļø Service failure detected: ${service} (${errorType})`));
250
-
251
- // Update service status
252
- this.serviceStatus.set(service, {
253
- available: false,
254
- lastCheck: Date.now(),
255
- error: `Service failed: ${errorType}`
256
- });
257
-
258
- // Provide specific guidance based on error type
259
- switch (errorType) {
260
- case ErrorType.NETWORK:
261
- console.log(chalk.cyan('šŸ”Œ Switching to offline mode due to network issues'));
262
- await this.setDegradationMode('offline');
263
- break;
264
-
265
- case ErrorType.AUTHENTICATION:
266
- console.log(chalk.yellow('šŸ”‘ API authentication failed - disabling AI features'));
267
- await this.setDegradationMode('aiLimited');
268
- UIComponents.showWarningBox('Run "base config" to update your API keys');
269
- break;
270
-
271
- case ErrorType.RATE_LIMIT:
272
- console.log(chalk.yellow('🚦 Rate limit reached - using cached responses'));
273
- this.fallbackOptions.useCache = true;
274
- this.fallbackOptions.skipAI = true;
275
- break;
276
-
277
- case ErrorType.QUOTA_EXCEEDED:
278
- console.log(chalk.yellow('šŸ“Š API quota exceeded - switching to basic mode'));
279
- await this.setDegradationMode('aiLimited');
280
- break;
281
-
282
- default:
283
- console.log(chalk.yellow('šŸ”„ Service error - enabling fallback mode'));
284
- await this.setDegradationMode('aiLimited');
285
- break;
286
- }
287
-
288
- // Show available alternatives
289
- this.showFallbackOptions();
290
- }
291
-
292
- /**
293
- * Show available fallback options to user
294
- */
295
- private static showFallbackOptions(): void {
296
- const mode = this.currentMode;
297
- if (!mode) return;
298
-
299
- console.log(chalk.cyan('\nšŸ”„ Available features in current mode:'));
300
-
301
- if (mode.capabilities.baselineChecking) {
302
- console.log(chalk.green(' āœ… Baseline compatibility checking'));
303
- }
304
-
305
- if (mode.capabilities.caching) {
306
- console.log(chalk.green(' āœ… Cached analysis results'));
307
- }
308
-
309
- if (!mode.capabilities.aiAnalysis) {
310
- console.log(chalk.yellow(' āš ļø AI analysis disabled - manual review required'));
311
- }
312
-
313
- if (!mode.capabilities.autoFix) {
314
- console.log(chalk.yellow(' āš ļø Auto-fixing disabled - manual fixes required'));
315
- }
316
-
317
- console.log(chalk.cyan('\nšŸ’” Suggestions:'));
318
- console.log(chalk.cyan(' • Review violations manually using browser compatibility tables'));
319
- console.log(chalk.cyan(' • Use progressive enhancement techniques'));
320
- console.log(chalk.cyan(' • Test across your target browsers'));
321
-
322
- if (!mode.capabilities.offlineMode) {
323
- console.log(chalk.cyan(' • Try again when network/services are restored'));
324
- }
325
- }
326
-
327
- /**
328
- * Create fallback analysis when AI is unavailable
329
- */
330
- static createFallbackAnalysis(violation: Violation, reason: string = 'AI services unavailable'): Analysis {
331
- return {
332
- violation,
333
- userImpact: `Users on ${violation.browser} ${violation.required} may experience compatibility issues with ${violation.feature}`,
334
- marketShare: this.estimateMarketShare(violation.browser, violation.required),
335
- fixStrategy: this.getDefaultFixStrategy(violation.feature),
336
- bestPractices: [
337
- 'Use @supports for CSS feature detection',
338
- 'Implement feature detection for JavaScript APIs',
339
- 'Provide fallback implementations',
340
- 'Test across target browsers'
341
- ],
342
- sources: [],
343
- plainEnglish: `${reason}. This feature (${violation.feature}) may not be supported in ${violation.browser} ${violation.required}. Consider using progressive enhancement techniques and providing fallbacks for better compatibility.`,
344
- confidence: 0.3
345
- };
346
- }
347
-
348
- /**
349
- * Estimate market share for fallback analysis
350
- */
351
- private static estimateMarketShare(browser: string, version: string): number {
352
- const estimates: Record<string, number> = {
353
- 'chrome': 0.65,
354
- 'firefox': 0.08,
355
- 'safari': 0.18,
356
- 'edge': 0.05,
357
- 'opera': 0.02,
358
- 'samsung': 0.02
359
- };
360
-
361
- const baseShare = estimates[browser.toLowerCase()] || 0.05;
362
-
363
- // Reduce estimate for older versions
364
- if (version !== 'baseline' && version !== 'baseline-newly') {
365
- const versionNum = parseInt(version, 10);
366
- if (!isNaN(versionNum)) {
367
- const currentYear = new Date().getFullYear();
368
- const estimatedYear = 2008 + (versionNum / 10);
369
- const yearsDiff = currentYear - estimatedYear;
370
-
371
- if (yearsDiff > 2) {
372
- return baseShare * 0.1;
373
- } else if (yearsDiff > 1) {
374
- return baseShare * 0.3;
375
- }
376
- }
377
- }
378
-
379
- return baseShare;
380
- }
381
-
382
- /**
383
- * Get default fix strategy based on feature type
384
- */
385
- private static getDefaultFixStrategy(feature: string): string {
386
- const lowerFeature = feature.toLowerCase();
387
-
388
- if (lowerFeature.includes('css') || lowerFeature.includes('grid') || lowerFeature.includes('flex')) {
389
- return 'progressive enhancement with @supports';
390
- } else if (lowerFeature.includes('api') || lowerFeature.includes('js')) {
391
- return 'feature detection with polyfills';
392
- } else if (lowerFeature.includes('element') || lowerFeature.includes('html')) {
393
- return 'graceful degradation';
394
- }
395
-
396
- return 'progressive enhancement';
397
- }
398
-
399
- /**
400
- * Try to load cached analysis
401
- */
402
- static async loadCachedAnalysis(violation: Violation): Promise<Analysis | null> {
403
- if (!this.fallbackOptions.useCache) {
404
- return null;
405
- }
406
-
407
- try {
408
- const cacheKey = this.generateCacheKey(violation);
409
- const cacheFile = path.join(this.cacheDir, `analysis-${cacheKey}.json`);
410
-
411
- const content = await fs.readFile(cacheFile, 'utf-8');
412
- const cached = JSON.parse(content);
413
-
414
- // Check if cache is still valid (24 hours)
415
- const cacheAge = Date.now() - cached.timestamp;
416
- if (cacheAge < 24 * 60 * 60 * 1000) {
417
- console.log(chalk.dim(`šŸ“¦ Using cached analysis for ${violation.feature}`));
418
- return cached.analysis;
419
- }
420
- } catch (error) {
421
- // Cache miss or error - return null
422
- }
423
-
424
- return null;
425
- }
426
-
427
- /**
428
- * Save analysis to cache
429
- */
430
- static async saveAnalysisToCache(analysis: Analysis): Promise<void> {
431
- if (!this.fallbackOptions.useCache) {
432
- return;
433
- }
434
-
435
- try {
436
- const cacheKey = this.generateCacheKey(analysis.violation);
437
- const cacheFile = path.join(this.cacheDir, `analysis-${cacheKey}.json`);
438
-
439
- const cacheData = {
440
- timestamp: Date.now(),
441
- analysis
442
- };
443
-
444
- await fs.writeFile(cacheFile, JSON.stringify(cacheData, null, 2));
445
- } catch (error) {
446
- // Ignore cache write errors
447
- console.warn(chalk.dim(`Warning: Could not save analysis to cache: ${error instanceof Error ? error.message : 'Unknown error'}`));
448
- }
449
- }
450
-
451
- /**
452
- * Generate cache key for violation
453
- */
454
- private static generateCacheKey(violation: Violation): string {
455
- const keyData = `${violation.feature}:${violation.browser}:${violation.required}:${violation.baselineStatus}`;
456
- return createHash('md5').update(keyData).digest('hex');
457
- }
458
-
459
- /**
460
- * Create basic fix suggestion when auto-fix is unavailable
461
- */
462
- static createBasicFixSuggestion(violation: Violation, analysis: Analysis): Fix {
463
- const basicPatch = this.generateBasicPatch(violation);
464
-
465
- return {
466
- violation,
467
- analysis,
468
- patch: basicPatch,
469
- explanation: `Manual fix required for ${violation.feature} compatibility:\n\n` +
470
- `1. Review the code at ${violation.file}:${violation.line}\n` +
471
- `2. Implement ${analysis.fixStrategy}\n` +
472
- `3. Test in ${violation.browser} ${violation.required}\n` +
473
- `4. Consider using: ${analysis.bestPractices.join(', ')}`,
474
- filePath: violation.file,
475
- preview: `Manual review required:\n- Feature: ${violation.feature}\n- Location: ${violation.file}:${violation.line}\n- Strategy: ${analysis.fixStrategy}`,
476
- confidence: 0.5,
477
- testable: false
478
- };
479
- }
480
-
481
- /**
482
- * Generate basic patch template
483
- */
484
- private static generateBasicPatch(violation: Violation): string {
485
- return `# Manual fix required for ${violation.feature}
486
- # File: ${violation.file}
487
- # Line: ${violation.line}
488
- #
489
- # Current code:
490
- # ${violation.context}
491
- #
492
- # Suggested approach:
493
- # 1. Add feature detection or @supports rule
494
- # 2. Provide fallback for ${violation.browser} ${violation.required}
495
- # 3. Test across target browsers
496
- #
497
- # Example patterns:
498
- # CSS: @supports (${violation.feature}: value) { /* modern code */ }
499
- # JS: if ('${violation.feature}' in window) { /* modern code */ }
500
- `;
501
- }
502
-
503
- /**
504
- * Get current degradation mode
505
- */
506
- static getCurrentMode(): DegradationMode | null {
507
- return this.currentMode;
508
- }
509
-
510
- /**
511
- * Get service status
512
- */
513
- static getServiceStatus(): Map<string, { available: boolean; lastCheck: number; error?: string }> {
514
- return new Map(this.serviceStatus);
515
- }
516
-
517
- /**
518
- * Get fallback options
519
- */
520
- static getFallbackOptions(): FallbackOptions {
521
- return { ...this.fallbackOptions };
522
- }
523
-
524
- /**
525
- * Force refresh service status
526
- */
527
- static async refreshServiceStatus(): Promise<void> {
528
- console.log(chalk.cyan('šŸ”„ Checking service availability...'));
529
- await this.checkServiceAvailability();
530
-
531
- const status = this.getServiceStatus();
532
- console.log(chalk.cyan('\nšŸ“Š Service Status:'));
533
-
534
- for (const [service, info] of status) {
535
- const statusIcon = info.available ? 'āœ…' : 'āŒ';
536
- const statusText = info.available ? 'Available' : 'Unavailable';
537
- console.log(chalk.cyan(` ${statusIcon} ${service}: ${statusText}`));
538
-
539
- if (!info.available && info.error) {
540
- console.log(chalk.dim(` Error: ${info.error}`));
541
- }
542
- }
543
- }
544
-
545
- /**
546
- * Clean up old cache files
547
- */
548
- static async cleanupCache(): Promise<void> {
549
- try {
550
- const files = await fs.readdir(this.cacheDir);
551
- const now = Date.now();
552
- const maxAge = 7 * 24 * 60 * 60 * 1000; // 7 days
553
-
554
- for (const file of files) {
555
- const filePath = path.join(this.cacheDir, file);
556
- const stats = await fs.stat(filePath);
557
-
558
- if (now - stats.mtime.getTime() > maxAge) {
559
- await fs.unlink(filePath);
560
- }
561
- }
562
- } catch (error) {
563
- // Ignore cleanup errors
564
- }
565
- }
566
-
567
- /**
568
- * Show degradation status to user
569
- */
570
- static showStatus(): void {
571
- const mode = this.currentMode;
572
- if (!mode) {
573
- console.log(chalk.red('āŒ Degradation manager not initialized'));
574
- return;
575
- }
576
-
577
- UIComponents.showInfoBox(`Current Mode: ${mode.name}`);
578
- console.log(chalk.dim(mode.description));
579
-
580
- if (mode.limitations.length > 0) {
581
- console.log(chalk.yellow('\nāš ļø Current limitations:'));
582
- mode.limitations.forEach(limitation => {
583
- console.log(chalk.yellow(` • ${limitation}`));
584
- });
585
- }
586
-
587
- const status = this.getServiceStatus();
588
- console.log(chalk.cyan('\nšŸ“Š Service Status:'));
589
-
590
- for (const [service, info] of status) {
591
- const statusIcon = info.available ? 'āœ…' : 'āŒ';
592
- const age = Math.round((Date.now() - info.lastCheck) / 1000);
593
- console.log(chalk.cyan(` ${statusIcon} ${service} (checked ${age}s ago)`));
594
- }
595
- }
596
- }
package/src/core/index.ts DELETED
@@ -1,17 +0,0 @@
1
- // Core engine exports
2
- export * from './baseguard.js';
3
- export * from './baseline-checker.js';
4
- export { ConfigurationManager, BROWSER_TARGET_PRESETS } from './configuration.js';
5
- export type { PresetName } from './configuration.js';
6
- export { ApiKeyManager } from './api-key-manager.js';
7
- export { GitignoreManager } from './gitignore-manager.js';
8
- export { CacheManager, LRUCache } from './cache-manager.js';
9
- export { FileProcessor } from './file-processor.js';
10
- export { DirectoryFilter } from './directory-filter.js';
11
- export { LazyLoader } from './lazy-loader.js';
12
- export { MemoryManager } from './memory-manager.js';
13
- export { StartupOptimizer } from './startup-optimizer.js';
14
- export { SystemErrorHandler } from './system-error-handler.js';
15
- export { GracefulDegradationManager } from './graceful-degradation-manager.js';
16
- export { ConfigurationRecovery } from './configuration-recovery.js';
17
- export { logger, DebugLogger } from './debug-logger.js';