baseguard 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.eslintrc.json +25 -0
- package/.prettierrc +8 -0
- package/README.md +94 -0
- package/bin/base.js +494 -0
- package/dist/ai/fix-manager.d.ts +67 -0
- package/dist/ai/fix-manager.d.ts.map +1 -0
- package/dist/ai/fix-manager.js +326 -0
- package/dist/ai/fix-manager.js.map +1 -0
- package/dist/ai/gemini-analyzer.d.ts +116 -0
- package/dist/ai/gemini-analyzer.d.ts.map +1 -0
- package/dist/ai/gemini-analyzer.js +572 -0
- package/dist/ai/gemini-analyzer.js.map +1 -0
- package/dist/ai/index.d.ts +4 -0
- package/dist/ai/index.d.ts.map +1 -0
- package/dist/ai/index.js +5 -0
- package/dist/ai/index.js.map +1 -0
- package/dist/ai/jules-implementer.d.ts +115 -0
- package/dist/ai/jules-implementer.d.ts.map +1 -0
- package/dist/ai/jules-implementer.js +387 -0
- package/dist/ai/jules-implementer.js.map +1 -0
- package/dist/commands/automation.d.ts +5 -0
- package/dist/commands/automation.d.ts.map +1 -0
- package/dist/commands/automation.js +305 -0
- package/dist/commands/automation.js.map +1 -0
- package/dist/commands/check.d.ts +9 -0
- package/dist/commands/check.d.ts.map +1 -0
- package/dist/commands/check.js +113 -0
- package/dist/commands/check.js.map +1 -0
- package/dist/commands/config.d.ts +11 -0
- package/dist/commands/config.d.ts.map +1 -0
- package/dist/commands/config.js +324 -0
- package/dist/commands/config.js.map +1 -0
- package/dist/commands/fix.d.ts +9 -0
- package/dist/commands/fix.d.ts.map +1 -0
- package/dist/commands/fix.js +207 -0
- package/dist/commands/fix.js.map +1 -0
- package/dist/commands/index.d.ts +6 -0
- package/dist/commands/index.d.ts.map +1 -0
- package/dist/commands/index.js +7 -0
- package/dist/commands/index.js.map +1 -0
- package/dist/commands/init.d.ts +9 -0
- package/dist/commands/init.d.ts.map +1 -0
- package/dist/commands/init.js +125 -0
- package/dist/commands/init.js.map +1 -0
- package/dist/core/api-key-manager.d.ts +83 -0
- package/dist/core/api-key-manager.d.ts.map +1 -0
- package/dist/core/api-key-manager.js +244 -0
- package/dist/core/api-key-manager.js.map +1 -0
- package/dist/core/baseguard.d.ts +46 -0
- package/dist/core/baseguard.d.ts.map +1 -0
- package/dist/core/baseguard.js +132 -0
- package/dist/core/baseguard.js.map +1 -0
- package/dist/core/baseline-checker.d.ts +63 -0
- package/dist/core/baseline-checker.d.ts.map +1 -0
- package/dist/core/baseline-checker.js +502 -0
- package/dist/core/baseline-checker.js.map +1 -0
- package/dist/core/cache-manager.d.ts +88 -0
- package/dist/core/cache-manager.d.ts.map +1 -0
- package/dist/core/cache-manager.js +213 -0
- package/dist/core/cache-manager.js.map +1 -0
- package/dist/core/configuration.d.ts +140 -0
- package/dist/core/configuration.d.ts.map +1 -0
- package/dist/core/configuration.js +474 -0
- package/dist/core/configuration.js.map +1 -0
- package/dist/core/directory-filter.d.ts +90 -0
- package/dist/core/directory-filter.d.ts.map +1 -0
- package/dist/core/directory-filter.js +319 -0
- package/dist/core/directory-filter.js.map +1 -0
- package/dist/core/error-handler.d.ts +110 -0
- package/dist/core/error-handler.d.ts.map +1 -0
- package/dist/core/error-handler.js +392 -0
- package/dist/core/error-handler.js.map +1 -0
- package/dist/core/file-processor.d.ts +80 -0
- package/dist/core/file-processor.d.ts.map +1 -0
- package/dist/core/file-processor.js +259 -0
- package/dist/core/file-processor.js.map +1 -0
- package/dist/core/gitignore-manager.d.ts +44 -0
- package/dist/core/gitignore-manager.d.ts.map +1 -0
- package/dist/core/gitignore-manager.js +147 -0
- package/dist/core/gitignore-manager.js.map +1 -0
- package/dist/core/index.d.ts +13 -0
- package/dist/core/index.d.ts.map +1 -0
- package/dist/core/index.js +13 -0
- package/dist/core/index.js.map +1 -0
- package/dist/core/lazy-loader.d.ts +68 -0
- package/dist/core/lazy-loader.d.ts.map +1 -0
- package/dist/core/lazy-loader.js +260 -0
- package/dist/core/lazy-loader.js.map +1 -0
- package/dist/core/memory-manager.d.ts +1 -0
- package/dist/core/memory-manager.d.ts.map +1 -0
- package/dist/core/memory-manager.js +2 -0
- package/dist/core/memory-manager.js.map +1 -0
- package/dist/core/startup-optimizer.d.ts +45 -0
- package/dist/core/startup-optimizer.d.ts.map +1 -0
- package/dist/core/startup-optimizer.js +140 -0
- package/dist/core/startup-optimizer.js.map +1 -0
- package/dist/git/automation-engine.d.ts +58 -0
- package/dist/git/automation-engine.d.ts.map +1 -0
- package/dist/git/automation-engine.js +318 -0
- package/dist/git/automation-engine.js.map +1 -0
- package/dist/git/github-manager.d.ts +71 -0
- package/dist/git/github-manager.d.ts.map +1 -0
- package/dist/git/github-manager.js +226 -0
- package/dist/git/github-manager.js.map +1 -0
- package/dist/git/hook-manager.d.ts +43 -0
- package/dist/git/hook-manager.d.ts.map +1 -0
- package/dist/git/hook-manager.js +191 -0
- package/dist/git/hook-manager.js.map +1 -0
- package/dist/git/index.d.ts +4 -0
- package/dist/git/index.d.ts.map +1 -0
- package/dist/git/index.js +5 -0
- package/dist/git/index.js.map +1 -0
- package/dist/index.d.ts +8 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +9 -0
- package/dist/index.js.map +1 -0
- package/dist/parsers/feature-validator.d.ts +60 -0
- package/dist/parsers/feature-validator.d.ts.map +1 -0
- package/dist/parsers/feature-validator.js +483 -0
- package/dist/parsers/feature-validator.js.map +1 -0
- package/dist/parsers/index.d.ts +8 -0
- package/dist/parsers/index.d.ts.map +1 -0
- package/dist/parsers/index.js +9 -0
- package/dist/parsers/index.js.map +1 -0
- package/dist/parsers/parser-manager.d.ts +103 -0
- package/dist/parsers/parser-manager.d.ts.map +1 -0
- package/dist/parsers/parser-manager.js +321 -0
- package/dist/parsers/parser-manager.js.map +1 -0
- package/dist/parsers/parser.d.ts +23 -0
- package/dist/parsers/parser.d.ts.map +1 -0
- package/dist/parsers/parser.js +6 -0
- package/dist/parsers/parser.js.map +1 -0
- package/dist/parsers/react-parser.d.ts +22 -0
- package/dist/parsers/react-parser.d.ts.map +1 -0
- package/dist/parsers/react-parser.js +307 -0
- package/dist/parsers/react-parser.js.map +1 -0
- package/dist/parsers/svelte-parser.d.ts +33 -0
- package/dist/parsers/svelte-parser.d.ts.map +1 -0
- package/dist/parsers/svelte-parser.js +408 -0
- package/dist/parsers/svelte-parser.js.map +1 -0
- package/dist/parsers/vanilla-parser.d.ts +31 -0
- package/dist/parsers/vanilla-parser.d.ts.map +1 -0
- package/dist/parsers/vanilla-parser.js +590 -0
- package/dist/parsers/vanilla-parser.js.map +1 -0
- package/dist/parsers/vue-parser.d.ts +9 -0
- package/dist/parsers/vue-parser.d.ts.map +1 -0
- package/dist/parsers/vue-parser.js +16 -0
- package/dist/parsers/vue-parser.js.map +1 -0
- package/dist/terminal-header.d.ts +12 -0
- package/dist/terminal-header.js +45 -0
- package/dist/types/index.d.ts +83 -0
- package/dist/types/index.d.ts.map +1 -0
- package/dist/types/index.js +5 -0
- package/dist/types/index.js.map +1 -0
- package/dist/ui/components.d.ts +133 -0
- package/dist/ui/components.d.ts.map +1 -0
- package/dist/ui/components.js +482 -0
- package/dist/ui/components.js.map +1 -0
- package/dist/ui/help.d.ts +11 -0
- package/dist/ui/help.d.ts.map +1 -0
- package/dist/ui/help.js +161 -0
- package/dist/ui/help.js.map +1 -0
- package/dist/ui/index.d.ts +5 -0
- package/dist/ui/index.d.ts.map +1 -0
- package/dist/ui/index.js +5 -0
- package/dist/ui/index.js.map +1 -0
- package/dist/ui/prompts.d.ts +63 -0
- package/dist/ui/prompts.d.ts.map +1 -0
- package/dist/ui/prompts.js +611 -0
- package/dist/ui/prompts.js.map +1 -0
- package/dist/ui/terminal-header.d.ts +13 -0
- package/dist/ui/terminal-header.d.ts.map +1 -0
- package/dist/ui/terminal-header.js +46 -0
- package/dist/ui/terminal-header.js.map +1 -0
- package/package.json +80 -0
- package/src/ai/__tests__/gemini-analyzer.test.ts +181 -0
- package/src/ai/fix-manager.ts +362 -0
- package/src/ai/gemini-analyzer.ts +671 -0
- package/src/ai/index.ts +4 -0
- package/src/ai/jules-implementer.ts +459 -0
- package/src/commands/automation.ts +344 -0
- package/src/commands/check.ts +299 -0
- package/src/commands/config.ts +365 -0
- package/src/commands/fix.ts +234 -0
- package/src/commands/index.ts +6 -0
- package/src/commands/init.ts +142 -0
- package/src/commands/status.ts +0 -0
- package/src/core/api-key-manager.ts +298 -0
- package/src/core/baseguard.ts +742 -0
- package/src/core/baseline-checker.ts +563 -0
- package/src/core/cache-manager.ts +270 -0
- package/src/core/configuration-recovery.ts +676 -0
- package/src/core/configuration.ts +559 -0
- package/src/core/debug-logger.ts +590 -0
- package/src/core/directory-filter.ts +421 -0
- package/src/core/error-handler.ts +517 -0
- package/src/core/file-processor.ts +331 -0
- package/src/core/gitignore-manager.ts +169 -0
- package/src/core/graceful-degradation-manager.ts +596 -0
- package/src/core/index.ts +13 -0
- package/src/core/lazy-loader.ts +307 -0
- package/src/core/logger.ts +0 -0
- package/src/core/memory-manager.ts +294 -0
- package/src/core/startup-optimizer.ts +173 -0
- package/src/core/system-error-handler.ts +746 -0
- package/src/git/automation-engine.ts +361 -0
- package/src/git/github-manager.ts +260 -0
- package/src/git/hook-manager.ts +210 -0
- package/src/git/index.ts +4 -0
- package/src/index.ts +8 -0
- package/src/parsers/feature-validator.ts +559 -0
- package/src/parsers/index.ts +8 -0
- package/src/parsers/parser-manager.ts +419 -0
- package/src/parsers/parser.ts +26 -0
- package/src/parsers/react-parser-optimized.ts +161 -0
- package/src/parsers/react-parser.ts +359 -0
- package/src/parsers/svelte-parser.ts +506 -0
- package/src/parsers/vanilla-parser.ts +682 -0
- package/src/parsers/vue-parser.ts +472 -0
- package/src/types/index.ts +92 -0
- package/src/ui/components.ts +567 -0
- package/src/ui/help.ts +193 -0
- package/src/ui/index.ts +4 -0
- package/src/ui/prompts.ts +688 -0
- package/src/ui/terminal-header.ts +59 -0
- package/test-config-commands.js +56 -0
- package/test-header-simple.js +33 -0
- package/test-terminal-header.js +12 -0
- package/test-ui.js +29 -0
- package/tests/e2e/baseguard.e2e.test.ts +516 -0
- package/tests/e2e/cross-platform.e2e.test.ts +420 -0
- package/tests/e2e/git-integration.e2e.test.ts +487 -0
- package/tests/fixtures/react-project/package.json +14 -0
- package/tests/fixtures/react-project/src/App.css +76 -0
- package/tests/fixtures/react-project/src/App.tsx +77 -0
- package/tests/fixtures/svelte-project/package.json +11 -0
- package/tests/fixtures/svelte-project/src/App.svelte +369 -0
- package/tests/fixtures/vanilla-project/index.html +76 -0
- package/tests/fixtures/vanilla-project/script.js +331 -0
- package/tests/fixtures/vanilla-project/styles.css +359 -0
- package/tests/fixtures/vue-project/package.json +12 -0
- package/tests/fixtures/vue-project/src/App.vue +216 -0
- package/tsconfig.json +36 -0
- package/vitest.config.ts +10 -0
package/src/ui/help.ts
ADDED
|
@@ -0,0 +1,193 @@
|
|
|
1
|
+
import chalk from 'chalk';
|
|
2
|
+
import { readFileSync } from 'fs';
|
|
3
|
+
import { join, dirname } from 'path';
|
|
4
|
+
import { fileURLToPath } from 'url';
|
|
5
|
+
import { showTerminalHeader } from './terminal-header.js';
|
|
6
|
+
|
|
7
|
+
const __filename = fileURLToPath(import.meta.url);
|
|
8
|
+
const __dirname = dirname(__filename);
|
|
9
|
+
|
|
10
|
+
/**
|
|
11
|
+
* Show version information and system details
|
|
12
|
+
*/
|
|
13
|
+
export async function showVersionInfo(options: { checkUpdates?: boolean } = {}): Promise<void> {
|
|
14
|
+
try {
|
|
15
|
+
// Read package.json for version info
|
|
16
|
+
const packagePath = join(__dirname, '../../package.json');
|
|
17
|
+
const packageJson = JSON.parse(readFileSync(packagePath, 'utf-8'));
|
|
18
|
+
|
|
19
|
+
console.log(chalk.cyan('🛡️ BaseGuard Version Information\n'));
|
|
20
|
+
|
|
21
|
+
// BaseGuard version
|
|
22
|
+
console.log(chalk.white('BaseGuard:'));
|
|
23
|
+
console.log(` Version: ${chalk.green(packageJson.version)}`);
|
|
24
|
+
console.log(` License: ${packageJson.license}`);
|
|
25
|
+
console.log(` Homepage: ${chalk.blue('https://github.com/baseguard/baseguard')}`);
|
|
26
|
+
|
|
27
|
+
// System information
|
|
28
|
+
console.log(chalk.white('\nSystem:'));
|
|
29
|
+
console.log(` Node.js: ${chalk.green(process.version)}`);
|
|
30
|
+
console.log(` Platform: ${process.platform} ${process.arch}`);
|
|
31
|
+
console.log(` OS: ${process.platform === 'win32' ? 'Windows' : process.platform === 'darwin' ? 'macOS' : 'Linux'}`);
|
|
32
|
+
|
|
33
|
+
// Dependencies
|
|
34
|
+
console.log(chalk.white('\nKey Dependencies:'));
|
|
35
|
+
const deps = packageJson.dependencies;
|
|
36
|
+
console.log(` web-features: ${chalk.green(deps['web-features'])}`);
|
|
37
|
+
console.log(` commander: ${chalk.green(deps.commander)}`);
|
|
38
|
+
console.log(` chalk: ${chalk.green(deps.chalk)}`);
|
|
39
|
+
|
|
40
|
+
// Engine requirements
|
|
41
|
+
console.log(chalk.white('\nRequirements:'));
|
|
42
|
+
console.log(` Node.js: ${chalk.green(packageJson.engines.node)}`);
|
|
43
|
+
|
|
44
|
+
// Check for updates if requested
|
|
45
|
+
if (options.checkUpdates) {
|
|
46
|
+
console.log(chalk.white('\nChecking for updates...'));
|
|
47
|
+
try {
|
|
48
|
+
const { default: fetch } = await import('node-fetch');
|
|
49
|
+
const response = await fetch('https://registry.npmjs.org/baseguard/latest');
|
|
50
|
+
const data = await response.json() as any;
|
|
51
|
+
const latestVersion = data.version;
|
|
52
|
+
|
|
53
|
+
if (latestVersion !== packageJson.version) {
|
|
54
|
+
console.log(chalk.yellow(` 📦 Update available: ${chalk.green(latestVersion)} (current: ${packageJson.version})`));
|
|
55
|
+
console.log(chalk.yellow(` Run: ${chalk.white('npm update -g baseguard')}`));
|
|
56
|
+
} else {
|
|
57
|
+
console.log(chalk.green(' ✅ You have the latest version'));
|
|
58
|
+
}
|
|
59
|
+
} catch (error) {
|
|
60
|
+
console.log(chalk.red(' ❌ Unable to check for updates (network error)'));
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
// Installation info
|
|
65
|
+
console.log(chalk.white('\nInstallation:'));
|
|
66
|
+
console.log(` Global: ${chalk.white('npm install -g baseguard')}`);
|
|
67
|
+
console.log(` Local: ${chalk.white('npm install --save-dev baseguard')}`);
|
|
68
|
+
|
|
69
|
+
// Support links
|
|
70
|
+
console.log(chalk.white('\nSupport:'));
|
|
71
|
+
console.log(` Documentation: ${chalk.blue('https://github.com/baseguard/baseguard#readme')}`);
|
|
72
|
+
console.log(` Issues: ${chalk.blue('https://github.com/baseguard/baseguard/issues')}`);
|
|
73
|
+
console.log(` Discussions: ${chalk.blue('https://github.com/baseguard/baseguard/discussions')}`);
|
|
74
|
+
|
|
75
|
+
} catch (error) {
|
|
76
|
+
console.error(chalk.red('❌ Error reading version information:'), error instanceof Error ? error.message : 'Unknown error');
|
|
77
|
+
process.exit(1);
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
/**
|
|
82
|
+
* Show comprehensive help information
|
|
83
|
+
*/
|
|
84
|
+
export function showGlobalHelp(): void {
|
|
85
|
+
showTerminalHeader();
|
|
86
|
+
|
|
87
|
+
console.log(chalk.cyan('🛡️ BaseGuard - Never ship incompatible code again\n'));
|
|
88
|
+
|
|
89
|
+
console.log(chalk.white('DESCRIPTION:'));
|
|
90
|
+
console.log(' BaseGuard is an intelligent browser compatibility enforcement tool that prevents');
|
|
91
|
+
console.log(' incompatible code from reaching production. It combines Baseline detection using');
|
|
92
|
+
console.log(' the web-features package, Gemini AI analysis, and Jules autonomous fixing.\n');
|
|
93
|
+
|
|
94
|
+
console.log(chalk.white('USAGE:'));
|
|
95
|
+
console.log(` ${chalk.cyan('base')} ${chalk.white('<command>')} ${chalk.gray('[options]')}\n`);
|
|
96
|
+
|
|
97
|
+
console.log(chalk.white('CORE COMMANDS:'));
|
|
98
|
+
console.log(` ${chalk.cyan('init')} Initialize BaseGuard in your project`);
|
|
99
|
+
console.log(` ${chalk.cyan('check')} Scan for browser compatibility violations`);
|
|
100
|
+
console.log(` ${chalk.cyan('fix')} Fix violations with AI assistance`);
|
|
101
|
+
console.log(` ${chalk.cyan('config')} Manage configuration and settings`);
|
|
102
|
+
console.log(` ${chalk.cyan('automation')} Manage git hooks and automation\n`);
|
|
103
|
+
|
|
104
|
+
console.log(chalk.white('QUICK COMMANDS:'));
|
|
105
|
+
console.log(` ${chalk.cyan('add')} ${chalk.white('<target>')} Add browser target (e.g., "chrome 100")`);
|
|
106
|
+
console.log(` ${chalk.cyan('remove')} ${chalk.white('<target>')} Remove browser target`);
|
|
107
|
+
console.log(` ${chalk.cyan('list')} Show configuration summary\n`);
|
|
108
|
+
|
|
109
|
+
console.log(chalk.white('UTILITY COMMANDS:'));
|
|
110
|
+
console.log(` ${chalk.cyan('version')} Show version and system information`);
|
|
111
|
+
console.log(` ${chalk.cyan('help')} ${chalk.white('[command]')} Show help for specific command\n`);
|
|
112
|
+
|
|
113
|
+
console.log(chalk.white('GETTING STARTED:'));
|
|
114
|
+
console.log(` 1. ${chalk.white('base init')} Set up BaseGuard in your project`);
|
|
115
|
+
console.log(` 2. ${chalk.white('base config set-keys')} Configure API keys for AI features`);
|
|
116
|
+
console.log(` 3. ${chalk.white('base automation enable')} Enable git hooks for automation`);
|
|
117
|
+
console.log(` 4. ${chalk.white('base check')} Check for compatibility issues\n`);
|
|
118
|
+
|
|
119
|
+
console.log(chalk.white('COMMON WORKFLOWS:'));
|
|
120
|
+
console.log(chalk.yellow(' Basic Compatibility Checking:'));
|
|
121
|
+
console.log(` ${chalk.dim('$')} base init`);
|
|
122
|
+
console.log(` ${chalk.dim('$')} base check`);
|
|
123
|
+
console.log(` ${chalk.dim('$')} base add "chrome 100" ${chalk.gray('# Add specific browser support')}`);
|
|
124
|
+
|
|
125
|
+
console.log(chalk.yellow('\n AI-Powered Fixing:'));
|
|
126
|
+
console.log(` ${chalk.dim('$')} base config set-keys ${chalk.gray('# Configure Gemini & Jules API keys')}`);
|
|
127
|
+
console.log(` ${chalk.dim('$')} base fix ${chalk.gray('# Analyze and fix violations')}`);
|
|
128
|
+
|
|
129
|
+
console.log(chalk.yellow('\n Automated Git Integration:'));
|
|
130
|
+
console.log(` ${chalk.dim('$')} base automation enable ${chalk.gray('# Install git hooks')}`);
|
|
131
|
+
console.log(` ${chalk.dim('$')} git commit ${chalk.gray('# Automatic checking on commit')}`);
|
|
132
|
+
|
|
133
|
+
console.log(chalk.white('\nBROWSER TARGETS:'));
|
|
134
|
+
console.log(` ${chalk.cyan('Presets:')} baseline-widely, baseline-newly, last-2-years, custom`);
|
|
135
|
+
console.log(` ${chalk.cyan('Format:')} "browser version" (e.g., "chrome 100", "safari baseline")`);
|
|
136
|
+
console.log(` ${chalk.cyan('Examples:')} "chrome 100", "safari 15", "firefox baseline"\n`);
|
|
137
|
+
|
|
138
|
+
console.log(chalk.white('AI SERVICES:'));
|
|
139
|
+
console.log(` ${chalk.cyan('Gemini:')} AI analysis of compatibility issues`);
|
|
140
|
+
console.log(` Get API key: ${chalk.blue('https://aistudio.google.com')}`);
|
|
141
|
+
console.log(` ${chalk.cyan('Jules:')} Autonomous code fixing with GitHub integration`);
|
|
142
|
+
console.log(` Get API key: ${chalk.blue('https://jules.google.com')}\n`);
|
|
143
|
+
|
|
144
|
+
console.log(chalk.white('SUPPORTED FILES:'));
|
|
145
|
+
console.log(' • JavaScript/TypeScript: .js, .jsx, .ts, .tsx');
|
|
146
|
+
console.log(' • Framework files: .vue, .svelte');
|
|
147
|
+
console.log(' • Stylesheets: .css');
|
|
148
|
+
console.log(' • Markup: .html\n');
|
|
149
|
+
|
|
150
|
+
console.log(chalk.white('FEATURES DETECTED:'));
|
|
151
|
+
console.log(' • CSS properties, selectors, and at-rules');
|
|
152
|
+
console.log(' • JavaScript APIs and ECMAScript features');
|
|
153
|
+
console.log(' • HTML elements and attributes');
|
|
154
|
+
console.log(' • Web platform APIs (Canvas, WebGL, WebRTC, WebAssembly, etc.)');
|
|
155
|
+
console.log(' • Framework-aware extraction (React, Vue, Svelte)\n');
|
|
156
|
+
|
|
157
|
+
console.log(chalk.white('CONFIGURATION:'));
|
|
158
|
+
console.log(` ${chalk.cyan('File:')} .baseguardrc.json (automatically created)`);
|
|
159
|
+
console.log(` ${chalk.cyan('Security:')} Automatically added to .gitignore`);
|
|
160
|
+
console.log(` ${chalk.cyan('Validation:')} Built-in configuration validation\n`);
|
|
161
|
+
|
|
162
|
+
console.log(chalk.white('EXAMPLES:'));
|
|
163
|
+
console.log(chalk.gray(' # Quick setup and check'));
|
|
164
|
+
console.log(` ${chalk.dim('$')} base init --preset baseline-widely`);
|
|
165
|
+
console.log(` ${chalk.dim('$')} base check --strict`);
|
|
166
|
+
|
|
167
|
+
console.log(chalk.gray('\n # Configure specific browser support'));
|
|
168
|
+
console.log(` ${chalk.dim('$')} base add "chrome 100"`);
|
|
169
|
+
console.log(` ${chalk.dim('$')} base add "safari baseline"`);
|
|
170
|
+
console.log(` ${chalk.dim('$')} base check --files "src/**/*.ts"`);
|
|
171
|
+
|
|
172
|
+
console.log(chalk.gray('\n # Set up AI-powered fixing'));
|
|
173
|
+
console.log(` ${chalk.dim('$')} base config set-keys`);
|
|
174
|
+
console.log(` ${chalk.dim('$')} base fix --analyze-only`);
|
|
175
|
+
console.log(` ${chalk.dim('$')} base fix --auto`);
|
|
176
|
+
|
|
177
|
+
console.log(chalk.gray('\n # Enable automation'));
|
|
178
|
+
console.log(` ${chalk.dim('$')} base automation enable --trigger pre-commit`);
|
|
179
|
+
console.log(` ${chalk.dim('$')} base automation status`);
|
|
180
|
+
|
|
181
|
+
console.log(chalk.white('\nGLOBAL OPTIONS:'));
|
|
182
|
+
console.log(` ${chalk.cyan('--help, -h')} Show help information`);
|
|
183
|
+
console.log(` ${chalk.cyan('--version, -V')} Show version number\n`);
|
|
184
|
+
|
|
185
|
+
console.log(chalk.white('DOCUMENTATION:'));
|
|
186
|
+
console.log(` ${chalk.blue('https://github.com/baseguard/baseguard#readme')}\n`);
|
|
187
|
+
|
|
188
|
+
console.log(chalk.white('SUPPORT:'));
|
|
189
|
+
console.log(` Issues: ${chalk.blue('https://github.com/baseguard/baseguard/issues')}`);
|
|
190
|
+
console.log(` Discussions: ${chalk.blue('https://github.com/baseguard/baseguard/discussions')}\n`);
|
|
191
|
+
|
|
192
|
+
console.log(chalk.gray('For command-specific help, run: base help <command>'));
|
|
193
|
+
}
|
package/src/ui/index.ts
ADDED