baseguard 1.0.2 ā 1.0.4
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/.baseguardrc.example.json +63 -63
- package/.eslintrc.json +24 -24
- package/.prettierrc +7 -7
- package/CHANGELOG.md +195 -195
- package/DEPLOYMENT.md +624 -624
- package/DEPLOYMENT_CHECKLIST.md +239 -239
- package/DEPLOYMENT_SUMMARY_v1.0.2.md +202 -202
- package/QUICK_START.md +134 -134
- package/README.md +488 -488
- package/RELEASE_NOTES_v1.0.2.md +434 -434
- package/bin/base.js +628 -613
- package/dist/ai/fix-manager.d.ts.map +1 -1
- package/dist/ai/fix-manager.js +1 -1
- package/dist/ai/fix-manager.js.map +1 -1
- package/dist/ai/gemini-analyzer.d.ts.map +1 -1
- package/dist/ai/gemini-analyzer.js +29 -35
- package/dist/ai/gemini-analyzer.js.map +1 -1
- package/dist/ai/gemini-code-fixer.d.ts.map +1 -1
- package/dist/ai/gemini-code-fixer.js +58 -58
- package/dist/ai/gemini-code-fixer.js.map +1 -1
- package/dist/ai/jules-implementer.d.ts +3 -0
- package/dist/ai/jules-implementer.d.ts.map +1 -1
- package/dist/ai/jules-implementer.js +63 -32
- package/dist/ai/jules-implementer.js.map +1 -1
- package/dist/ai/unified-code-fixer.js.map +1 -1
- package/dist/commands/check.d.ts.map +1 -1
- package/dist/commands/check.js +1 -1
- package/dist/commands/check.js.map +1 -1
- package/dist/commands/config.js +2 -1
- package/dist/commands/config.js.map +1 -1
- package/dist/commands/fix.d.ts.map +1 -1
- package/dist/commands/fix.js +44 -15
- package/dist/commands/fix.js.map +1 -1
- package/dist/core/api-key-manager.js +2 -2
- package/dist/core/api-key-manager.js.map +1 -1
- package/dist/core/baseguard.d.ts +1 -0
- package/dist/core/baseguard.d.ts.map +1 -1
- package/dist/core/baseguard.js +13 -10
- package/dist/core/baseguard.js.map +1 -1
- package/dist/core/baseline-checker.d.ts.map +1 -1
- package/dist/core/baseline-checker.js +2 -1
- package/dist/core/baseline-checker.js.map +1 -1
- package/dist/core/configuration-recovery.d.ts.map +1 -1
- package/dist/core/configuration-recovery.js +1 -1
- package/dist/core/configuration-recovery.js.map +1 -1
- package/dist/core/debug-logger.d.ts.map +1 -1
- package/dist/core/debug-logger.js +1 -1
- package/dist/core/debug-logger.js.map +1 -1
- package/dist/core/error-handler.d.ts.map +1 -1
- package/dist/core/error-handler.js +2 -1
- package/dist/core/error-handler.js.map +1 -1
- package/dist/core/gitignore-manager.js +5 -5
- package/dist/core/graceful-degradation-manager.d.ts.map +1 -1
- package/dist/core/graceful-degradation-manager.js +16 -16
- package/dist/core/graceful-degradation-manager.js.map +1 -1
- package/dist/core/lazy-loader.d.ts.map +1 -1
- package/dist/core/lazy-loader.js +9 -2
- package/dist/core/lazy-loader.js.map +1 -1
- package/dist/core/memory-manager.d.ts +0 -3
- package/dist/core/memory-manager.d.ts.map +1 -1
- package/dist/core/memory-manager.js.map +1 -1
- package/dist/core/parser-worker.d.ts +2 -0
- package/dist/core/parser-worker.d.ts.map +1 -0
- package/dist/core/parser-worker.js +19 -0
- package/dist/core/parser-worker.js.map +1 -0
- package/dist/core/startup-optimizer.d.ts +2 -0
- package/dist/core/startup-optimizer.d.ts.map +1 -1
- package/dist/core/startup-optimizer.js +19 -12
- package/dist/core/startup-optimizer.js.map +1 -1
- package/dist/core/system-error-handler.d.ts.map +1 -1
- package/dist/core/system-error-handler.js +18 -11
- package/dist/core/system-error-handler.js.map +1 -1
- package/dist/git/automation-engine.d.ts.map +1 -1
- package/dist/git/automation-engine.js +5 -4
- package/dist/git/automation-engine.js.map +1 -1
- package/dist/git/github-manager.d.ts.map +1 -1
- package/dist/git/github-manager.js.map +1 -1
- package/dist/git/hook-manager.js +5 -5
- package/dist/git/hook-manager.js.map +1 -1
- package/dist/parsers/parser-manager.d.ts.map +1 -1
- package/dist/parsers/parser-manager.js +1 -1
- package/dist/parsers/parser-manager.js.map +1 -1
- package/dist/parsers/svelte-parser.js +1 -1
- package/dist/parsers/svelte-parser.js.map +1 -1
- package/dist/parsers/vanilla-parser.d.ts.map +1 -1
- package/dist/parsers/vanilla-parser.js.map +1 -1
- package/dist/parsers/vue-parser.d.ts.map +1 -1
- package/dist/parsers/vue-parser.js.map +1 -1
- package/dist/ui/components.d.ts +1 -1
- package/dist/ui/components.d.ts.map +1 -1
- package/dist/ui/components.js +11 -11
- package/dist/ui/components.js.map +1 -1
- package/dist/ui/terminal-header.js +14 -14
- package/package.json +105 -105
- package/src/ai/__tests__/gemini-analyzer.test.ts +180 -180
- package/src/ai/agentkit-orchestrator.ts +533 -533
- package/src/ai/fix-manager.ts +362 -362
- package/src/ai/gemini-analyzer.ts +665 -671
- package/src/ai/gemini-code-fixer.ts +539 -540
- package/src/ai/index.ts +3 -3
- package/src/ai/jules-implementer.ts +504 -460
- package/src/ai/unified-code-fixer.ts +347 -347
- package/src/commands/automation.ts +343 -343
- package/src/commands/check.ts +298 -299
- package/src/commands/config.ts +584 -583
- package/src/commands/fix.ts +264 -238
- package/src/commands/index.ts +6 -6
- package/src/commands/init.ts +155 -155
- package/src/commands/status.ts +306 -306
- package/src/core/api-key-manager.ts +298 -298
- package/src/core/baseguard.ts +757 -756
- package/src/core/baseline-checker.ts +564 -563
- package/src/core/cache-manager.ts +271 -271
- package/src/core/configuration-recovery.ts +672 -673
- package/src/core/configuration.ts +595 -595
- package/src/core/debug-logger.ts +590 -590
- package/src/core/directory-filter.ts +420 -420
- package/src/core/error-handler.ts +518 -517
- package/src/core/file-processor.ts +337 -337
- package/src/core/gitignore-manager.ts +168 -168
- package/src/core/graceful-degradation-manager.ts +596 -596
- package/src/core/index.ts +16 -16
- package/src/core/lazy-loader.ts +317 -307
- package/src/core/memory-manager.ts +290 -295
- package/src/core/parser-worker.ts +33 -0
- package/src/core/startup-optimizer.ts +246 -243
- package/src/core/system-error-handler.ts +755 -750
- package/src/git/automation-engine.ts +361 -361
- package/src/git/github-manager.ts +190 -192
- package/src/git/hook-manager.ts +210 -210
- package/src/git/index.ts +3 -3
- package/src/index.ts +7 -7
- package/src/parsers/feature-validator.ts +558 -558
- package/src/parsers/index.ts +7 -7
- package/src/parsers/parser-manager.ts +418 -419
- package/src/parsers/parser.ts +25 -25
- package/src/parsers/react-parser-optimized.ts +160 -160
- package/src/parsers/react-parser.ts +358 -358
- package/src/parsers/svelte-parser.ts +510 -510
- package/src/parsers/vanilla-parser.ts +685 -686
- package/src/parsers/vue-parser.ts +476 -478
- package/src/types/index.ts +95 -95
- package/src/ui/components.ts +567 -567
- package/src/ui/help.ts +192 -192
- package/src/ui/index.ts +3 -3
- package/src/ui/prompts.ts +680 -680
- package/src/ui/terminal-header.ts +58 -58
- package/test-build.js +40 -40
- package/test-config-commands.js +55 -55
- package/test-header-simple.js +32 -32
- package/test-terminal-header.js +11 -11
- package/test-ui.js +28 -28
- package/tests/e2e/baseguard.e2e.test.ts +515 -515
- package/tests/e2e/cross-platform.e2e.test.ts +419 -419
- package/tests/e2e/git-integration.e2e.test.ts +486 -486
- package/tests/fixtures/react-project/package.json +13 -13
- package/tests/fixtures/react-project/src/App.css +75 -75
- package/tests/fixtures/react-project/src/App.tsx +76 -76
- package/tests/fixtures/svelte-project/package.json +10 -10
- package/tests/fixtures/svelte-project/src/App.svelte +368 -368
- package/tests/fixtures/vanilla-project/index.html +75 -75
- package/tests/fixtures/vanilla-project/script.js +330 -330
- package/tests/fixtures/vanilla-project/styles.css +358 -358
- package/tests/fixtures/vue-project/package.json +11 -11
- package/tests/fixtures/vue-project/src/App.vue +215 -215
- package/tsconfig.json +34 -34
- package/vitest.config.ts +11 -11
- package/dist/terminal-header.d.ts +0 -12
- package/dist/terminal-header.js +0 -45
|
@@ -1,59 +1,59 @@
|
|
|
1
|
-
import chalk from 'chalk';
|
|
2
|
-
|
|
3
|
-
/**
|
|
4
|
-
* Display beautiful Baseguard terminal header with ASCII art and tagline
|
|
5
|
-
*/
|
|
6
|
-
export function showTerminalHeader(): void {
|
|
7
|
-
console.clear();
|
|
8
|
-
|
|
9
|
-
// Well-spaced ASCII art for "Baseguard" - monochrome for good contrast
|
|
10
|
-
const logo = `
|
|
11
|
-
āāāāāāā āāāāāā āāāāāāāā āāāāāāāā āāāāāāā āāā āāā āāāāāā āāāāāāā āāāāāāā
|
|
12
|
-
āāāāāāāā āāāāāāāā āāāāāāāā āāāāāāāā āāāāāāāā āāā āāā āāāāāāāā āāāāāāāā āāāāāāāā
|
|
13
|
-
āāāāāāāā āāāāāāāā āāāāāāāā āāāāāā āāā āāāā āāā āāā āāāāāāāā āāāāāāāā āāā āāā
|
|
14
|
-
āāāāāāāā āāāāāāāā āāāāāāāā āāāāāā āāā āāā āāā āāā āāāāāāāā āāāāāāāā āāā āāā
|
|
15
|
-
āāāāāāāā āāā āāā āāāāāāāā āāāāāāāā āāāāāāāāā āāāāāāāāā āāā āāā āāā āāā āāāāāāāā
|
|
16
|
-
āāāāāāā āāā āāā āāāāāāāā āāāāāāāā āāāāāāā āāāāāāā āāā āāā āāā āāā āāāāāāā
|
|
17
|
-
`;
|
|
18
|
-
|
|
19
|
-
// Use a single color that contrasts well with both light and dark terminals
|
|
20
|
-
console.log(chalk.bold.white(logo));
|
|
21
|
-
|
|
22
|
-
// Tagline with styling
|
|
23
|
-
console.log(
|
|
24
|
-
chalk.bold.white(' Ship Modern Code') +
|
|
25
|
-
chalk.dim(' āØ\n')
|
|
26
|
-
);
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
/**
|
|
30
|
-
* Display compact header for command output
|
|
31
|
-
*/
|
|
32
|
-
export function showCompactHeader(): void {
|
|
33
|
-
console.log(
|
|
34
|
-
chalk.bold.white('š”ļø Baseguard') +
|
|
35
|
-
chalk.dim(' - Ship Modern Code āØ\n')
|
|
36
|
-
);
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
/**
|
|
40
|
-
* Simple fallback header without external dependencies
|
|
41
|
-
*/
|
|
42
|
-
export function showSimpleHeader(): void {
|
|
43
|
-
console.clear();
|
|
44
|
-
|
|
45
|
-
const logo = `
|
|
46
|
-
āāāāāāā āāāāāā āāāāāāāā āāāāāāāā āāāāāāā āāā āāā āāāāāā āāāāāāā āāāāāāā
|
|
47
|
-
āāāāāāāā āāāāāāāā āāāāāāāā āāāāāāāā āāāāāāāā āāā āāā āāāāāāāā āāāāāāāā āāāāāāāā
|
|
48
|
-
āāāāāāāā āāāāāāāā āāāāāāāā āāāāāā āāā āāāā āāā āāā āāāāāāāā āāāāāāāā āāā āāā
|
|
49
|
-
āāāāāāāā āāāāāāāā āāāāāāāā āāāāāā āāā āāā āāā āāā āāāāāāāā āāāāāāāā āāā āāā
|
|
50
|
-
āāāāāāāā āāā āāā āāāāāāāā āāāāāāāā āāāāāāāāā āāāāāāāāā āāā āāā āāā āāā āāāāāāāā
|
|
51
|
-
āāāāāāā āāā āāā āāāāāāāā āāāāāāāā āāāāāāā āāāāāāā āāā āāā āāā āāā āāāāāāā
|
|
52
|
-
`;
|
|
53
|
-
|
|
54
|
-
console.log(chalk.bold.white(logo));
|
|
55
|
-
console.log(
|
|
56
|
-
chalk.bold.white(' Ship Modern Code') +
|
|
57
|
-
chalk.dim(' āØ\n')
|
|
58
|
-
);
|
|
1
|
+
import chalk from 'chalk';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Display beautiful Baseguard terminal header with ASCII art and tagline
|
|
5
|
+
*/
|
|
6
|
+
export function showTerminalHeader(): void {
|
|
7
|
+
console.clear();
|
|
8
|
+
|
|
9
|
+
// Well-spaced ASCII art for "Baseguard" - monochrome for good contrast
|
|
10
|
+
const logo = `
|
|
11
|
+
āāāāāāā āāāāāā āāāāāāāā āāāāāāāā āāāāāāā āāā āāā āāāāāā āāāāāāā āāāāāāā
|
|
12
|
+
āāāāāāāā āāāāāāāā āāāāāāāā āāāāāāāā āāāāāāāā āāā āāā āāāāāāāā āāāāāāāā āāāāāāāā
|
|
13
|
+
āāāāāāāā āāāāāāāā āāāāāāāā āāāāāā āāā āāāā āāā āāā āāāāāāāā āāāāāāāā āāā āāā
|
|
14
|
+
āāāāāāāā āāāāāāāā āāāāāāāā āāāāāā āāā āāā āāā āāā āāāāāāāā āāāāāāāā āāā āāā
|
|
15
|
+
āāāāāāāā āāā āāā āāāāāāāā āāāāāāāā āāāāāāāāā āāāāāāāāā āāā āāā āāā āāā āāāāāāāā
|
|
16
|
+
āāāāāāā āāā āāā āāāāāāāā āāāāāāāā āāāāāāā āāāāāāā āāā āāā āāā āāā āāāāāāā
|
|
17
|
+
`;
|
|
18
|
+
|
|
19
|
+
// Use a single color that contrasts well with both light and dark terminals
|
|
20
|
+
console.log(chalk.bold.white(logo));
|
|
21
|
+
|
|
22
|
+
// Tagline with styling
|
|
23
|
+
console.log(
|
|
24
|
+
chalk.bold.white(' Ship Modern Code') +
|
|
25
|
+
chalk.dim(' āØ\n')
|
|
26
|
+
);
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
/**
|
|
30
|
+
* Display compact header for command output
|
|
31
|
+
*/
|
|
32
|
+
export function showCompactHeader(): void {
|
|
33
|
+
console.log(
|
|
34
|
+
chalk.bold.white('š”ļø Baseguard') +
|
|
35
|
+
chalk.dim(' - Ship Modern Code āØ\n')
|
|
36
|
+
);
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
/**
|
|
40
|
+
* Simple fallback header without external dependencies
|
|
41
|
+
*/
|
|
42
|
+
export function showSimpleHeader(): void {
|
|
43
|
+
console.clear();
|
|
44
|
+
|
|
45
|
+
const logo = `
|
|
46
|
+
āāāāāāā āāāāāā āāāāāāāā āāāāāāāā āāāāāāā āāā āāā āāāāāā āāāāāāā āāāāāāā
|
|
47
|
+
āāāāāāāā āāāāāāāā āāāāāāāā āāāāāāāā āāāāāāāā āāā āāā āāāāāāāā āāāāāāāā āāāāāāāā
|
|
48
|
+
āāāāāāāā āāāāāāāā āāāāāāāā āāāāāā āāā āāāā āāā āāā āāāāāāāā āāāāāāāā āāā āāā
|
|
49
|
+
āāāāāāāā āāāāāāāā āāāāāāāā āāāāāā āāā āāā āāā āāā āāāāāāāā āāāāāāāā āāā āāā
|
|
50
|
+
āāāāāāāā āāā āāā āāāāāāāā āāāāāāāā āāāāāāāāā āāāāāāāāā āāā āāā āāā āāā āāāāāāāā
|
|
51
|
+
āāāāāāā āāā āāā āāāāāāāā āāāāāāāā āāāāāāā āāāāāāā āāā āāā āāā āāā āāāāāāā
|
|
52
|
+
`;
|
|
53
|
+
|
|
54
|
+
console.log(chalk.bold.white(logo));
|
|
55
|
+
console.log(
|
|
56
|
+
chalk.bold.white(' Ship Modern Code') +
|
|
57
|
+
chalk.dim(' āØ\n')
|
|
58
|
+
);
|
|
59
59
|
}
|
package/test-build.js
CHANGED
|
@@ -1,41 +1,41 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
|
|
3
|
-
/**
|
|
4
|
-
* Simple build verification script
|
|
5
|
-
* Tests that BaseGuard can be imported and basic functionality works
|
|
6
|
-
*/
|
|
7
|
-
|
|
8
|
-
import { execSync } from 'child_process';
|
|
9
|
-
|
|
10
|
-
console.log('š”ļø Testing BaseGuard Build...\n');
|
|
11
|
-
|
|
12
|
-
try {
|
|
13
|
-
// Test basic imports
|
|
14
|
-
console.log('ā Testing imports...');
|
|
15
|
-
|
|
16
|
-
console.log('ā Testing CLI help...');
|
|
17
|
-
const helpOutput = execSync('node bin/base.js --help', { encoding: 'utf8' });
|
|
18
|
-
|
|
19
|
-
if (helpOutput.includes('BaseGuard')) {
|
|
20
|
-
console.log('ā
CLI help working');
|
|
21
|
-
} else {
|
|
22
|
-
throw new Error('CLI help not working properly');
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
console.log('ā Testing version...');
|
|
26
|
-
const versionOutput = execSync('node bin/base.js --version', { encoding: 'utf8' });
|
|
27
|
-
|
|
28
|
-
if (versionOutput.includes('1.0.2')) {
|
|
29
|
-
console.log('ā
Version check working');
|
|
30
|
-
} else {
|
|
31
|
-
throw new Error('Version not correct');
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
console.log('\nš Build verification successful!');
|
|
35
|
-
console.log('š¦ BaseGuard v1.0.2 is ready for deployment');
|
|
36
|
-
|
|
37
|
-
} catch (error) {
|
|
38
|
-
console.error('\nā Build verification failed:');
|
|
39
|
-
console.error(error.message);
|
|
40
|
-
process.exit(1);
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Simple build verification script
|
|
5
|
+
* Tests that BaseGuard can be imported and basic functionality works
|
|
6
|
+
*/
|
|
7
|
+
|
|
8
|
+
import { execSync } from 'child_process';
|
|
9
|
+
|
|
10
|
+
console.log('š”ļø Testing BaseGuard Build...\n');
|
|
11
|
+
|
|
12
|
+
try {
|
|
13
|
+
// Test basic imports
|
|
14
|
+
console.log('ā Testing imports...');
|
|
15
|
+
|
|
16
|
+
console.log('ā Testing CLI help...');
|
|
17
|
+
const helpOutput = execSync('node bin/base.js --help', { encoding: 'utf8' });
|
|
18
|
+
|
|
19
|
+
if (helpOutput.includes('BaseGuard')) {
|
|
20
|
+
console.log('ā
CLI help working');
|
|
21
|
+
} else {
|
|
22
|
+
throw new Error('CLI help not working properly');
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
console.log('ā Testing version...');
|
|
26
|
+
const versionOutput = execSync('node bin/base.js --version', { encoding: 'utf8' });
|
|
27
|
+
|
|
28
|
+
if (versionOutput.includes('1.0.2')) {
|
|
29
|
+
console.log('ā
Version check working');
|
|
30
|
+
} else {
|
|
31
|
+
throw new Error('Version not correct');
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
console.log('\nš Build verification successful!');
|
|
35
|
+
console.log('š¦ BaseGuard v1.0.2 is ready for deployment');
|
|
36
|
+
|
|
37
|
+
} catch (error) {
|
|
38
|
+
console.error('\nā Build verification failed:');
|
|
39
|
+
console.error(error.message);
|
|
40
|
+
process.exit(1);
|
|
41
41
|
}
|
package/test-config-commands.js
CHANGED
|
@@ -1,56 +1,56 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
|
|
3
|
-
// Test the config and automation commands functionality
|
|
4
|
-
import chalk from 'chalk';
|
|
5
|
-
|
|
6
|
-
console.log(chalk.cyan('š§Ŗ Testing Baseguard Config and Automation Commands\n'));
|
|
7
|
-
|
|
8
|
-
// Test 1: Check if the configuration manager can be imported
|
|
9
|
-
try {
|
|
10
|
-
console.log(chalk.blue('Test 1: Configuration Manager Import'));
|
|
11
|
-
const { ConfigurationManager } = await import('./src/core/configuration.js');
|
|
12
|
-
console.log(chalk.green('ā
ConfigurationManager imported successfully'));
|
|
13
|
-
|
|
14
|
-
// Test creating default config
|
|
15
|
-
const defaultConfig = ConfigurationManager.createDefault();
|
|
16
|
-
console.log(chalk.green('ā
Default configuration created'));
|
|
17
|
-
console.log(chalk.dim(` - Version: ${defaultConfig.version}`));
|
|
18
|
-
console.log(chalk.dim(` - Targets: ${defaultConfig.targets.length} browser(s)`));
|
|
19
|
-
console.log(chalk.dim(` - Automation: ${defaultConfig.automation.enabled ? 'enabled' : 'disabled'}`));
|
|
20
|
-
|
|
21
|
-
} catch (error) {
|
|
22
|
-
console.log(chalk.red('ā Configuration Manager test failed:'), error.message);
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
console.log();
|
|
26
|
-
|
|
27
|
-
// Test 2: Check if UI components can be imported
|
|
28
|
-
try {
|
|
29
|
-
console.log(chalk.blue('Test 2: UI Components Import'));
|
|
30
|
-
const { UIComponents } = await import('./src/ui/components.js');
|
|
31
|
-
console.log(chalk.green('ā
UIComponents imported successfully'));
|
|
32
|
-
|
|
33
|
-
// Test showing a simple message
|
|
34
|
-
UIComponents.showSuccessBox('Test message from UIComponents');
|
|
35
|
-
|
|
36
|
-
} catch (error) {
|
|
37
|
-
console.log(chalk.red('ā UI Components test failed:'), error.message);
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
console.log();
|
|
41
|
-
|
|
42
|
-
// Test 3: Check if terminal header works
|
|
43
|
-
try {
|
|
44
|
-
console.log(chalk.blue('Test 3: Terminal Header'));
|
|
45
|
-
const { showTerminalHeader } = await import('./src/ui/terminal-header.js');
|
|
46
|
-
console.log(chalk.green('ā
Terminal header imported successfully'));
|
|
47
|
-
|
|
48
|
-
console.log(chalk.dim('Showing terminal header...'));
|
|
49
|
-
showTerminalHeader();
|
|
50
|
-
|
|
51
|
-
} catch (error) {
|
|
52
|
-
console.log(chalk.red('ā Terminal header test failed:'), error.message);
|
|
53
|
-
}
|
|
54
|
-
|
|
55
|
-
console.log(chalk.cyan('\nš Config and Automation Commands Test Complete!'));
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
|
|
3
|
+
// Test the config and automation commands functionality
|
|
4
|
+
import chalk from 'chalk';
|
|
5
|
+
|
|
6
|
+
console.log(chalk.cyan('š§Ŗ Testing Baseguard Config and Automation Commands\n'));
|
|
7
|
+
|
|
8
|
+
// Test 1: Check if the configuration manager can be imported
|
|
9
|
+
try {
|
|
10
|
+
console.log(chalk.blue('Test 1: Configuration Manager Import'));
|
|
11
|
+
const { ConfigurationManager } = await import('./src/core/configuration.js');
|
|
12
|
+
console.log(chalk.green('ā
ConfigurationManager imported successfully'));
|
|
13
|
+
|
|
14
|
+
// Test creating default config
|
|
15
|
+
const defaultConfig = ConfigurationManager.createDefault();
|
|
16
|
+
console.log(chalk.green('ā
Default configuration created'));
|
|
17
|
+
console.log(chalk.dim(` - Version: ${defaultConfig.version}`));
|
|
18
|
+
console.log(chalk.dim(` - Targets: ${defaultConfig.targets.length} browser(s)`));
|
|
19
|
+
console.log(chalk.dim(` - Automation: ${defaultConfig.automation.enabled ? 'enabled' : 'disabled'}`));
|
|
20
|
+
|
|
21
|
+
} catch (error) {
|
|
22
|
+
console.log(chalk.red('ā Configuration Manager test failed:'), error.message);
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
console.log();
|
|
26
|
+
|
|
27
|
+
// Test 2: Check if UI components can be imported
|
|
28
|
+
try {
|
|
29
|
+
console.log(chalk.blue('Test 2: UI Components Import'));
|
|
30
|
+
const { UIComponents } = await import('./src/ui/components.js');
|
|
31
|
+
console.log(chalk.green('ā
UIComponents imported successfully'));
|
|
32
|
+
|
|
33
|
+
// Test showing a simple message
|
|
34
|
+
UIComponents.showSuccessBox('Test message from UIComponents');
|
|
35
|
+
|
|
36
|
+
} catch (error) {
|
|
37
|
+
console.log(chalk.red('ā UI Components test failed:'), error.message);
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
console.log();
|
|
41
|
+
|
|
42
|
+
// Test 3: Check if terminal header works
|
|
43
|
+
try {
|
|
44
|
+
console.log(chalk.blue('Test 3: Terminal Header'));
|
|
45
|
+
const { showTerminalHeader } = await import('./src/ui/terminal-header.js');
|
|
46
|
+
console.log(chalk.green('ā
Terminal header imported successfully'));
|
|
47
|
+
|
|
48
|
+
console.log(chalk.dim('Showing terminal header...'));
|
|
49
|
+
showTerminalHeader();
|
|
50
|
+
|
|
51
|
+
} catch (error) {
|
|
52
|
+
console.log(chalk.red('ā Terminal header test failed:'), error.message);
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
console.log(chalk.cyan('\nš Config and Automation Commands Test Complete!'));
|
|
56
56
|
console.log(chalk.dim('The implemented functionality is ready for use.\n'));
|
package/test-header-simple.js
CHANGED
|
@@ -1,33 +1,33 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
|
|
3
|
-
import chalk from 'chalk';
|
|
4
|
-
|
|
5
|
-
// Simple terminal header test
|
|
6
|
-
function showTerminalHeader() {
|
|
7
|
-
console.clear();
|
|
8
|
-
|
|
9
|
-
// Well-spaced ASCII art for "Baseguard" - monochrome for good contrast
|
|
10
|
-
const logo = `
|
|
11
|
-
āāāāāāā āāāāāā āāāāāāāā āāāāāāāā āāāāāāā āāā āāā āāāāāā āāāāāāā āāāāāāā
|
|
12
|
-
āāāāāāāā āāāāāāāā āāāāāāāā āāāāāāāā āāāāāāāā āāā āāā āāāāāāāā āāāāāāāā āāāāāāāā
|
|
13
|
-
āāāāāāāā āāāāāāāā āāāāāāāā āāāāāā āāā āāāā āāā āāā āāāāāāāā āāāāāāāā āāā āāā
|
|
14
|
-
āāāāāāāā āāāāāāāā āāāāāāāā āāāāāā āāā āāā āāā āāā āāāāāāāā āāāāāāāā āāā āāā
|
|
15
|
-
āāāāāāāā āāā āāā āāāāāāāā āāāāāāāā āāāāāāāāā āāāāāāāāā āāā āāā āāā āāā āāāāāāāā
|
|
16
|
-
āāāāāāā āāā āāā āāāāāāāā āāāāāāāā āāāāāāā āāāāāāā āāā āāā āāā āāā āāāāāāā
|
|
17
|
-
`;
|
|
18
|
-
|
|
19
|
-
// Use monochrome styling for good contrast
|
|
20
|
-
console.log(chalk.bold.white(logo));
|
|
21
|
-
|
|
22
|
-
// Tagline with styling
|
|
23
|
-
console.log(
|
|
24
|
-
chalk.bold.white(' Ship Modern Code') +
|
|
25
|
-
chalk.dim(' āØ\n')
|
|
26
|
-
);
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
// Test the header
|
|
30
|
-
showTerminalHeader();
|
|
31
|
-
|
|
32
|
-
console.log(chalk.cyan('š”ļø Baseguard Terminal Header Test Complete!'));
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
|
|
3
|
+
import chalk from 'chalk';
|
|
4
|
+
|
|
5
|
+
// Simple terminal header test
|
|
6
|
+
function showTerminalHeader() {
|
|
7
|
+
console.clear();
|
|
8
|
+
|
|
9
|
+
// Well-spaced ASCII art for "Baseguard" - monochrome for good contrast
|
|
10
|
+
const logo = `
|
|
11
|
+
āāāāāāā āāāāāā āāāāāāāā āāāāāāāā āāāāāāā āāā āāā āāāāāā āāāāāāā āāāāāāā
|
|
12
|
+
āāāāāāāā āāāāāāāā āāāāāāāā āāāāāāāā āāāāāāāā āāā āāā āāāāāāāā āāāāāāāā āāāāāāāā
|
|
13
|
+
āāāāāāāā āāāāāāāā āāāāāāāā āāāāāā āāā āāāā āāā āāā āāāāāāāā āāāāāāāā āāā āāā
|
|
14
|
+
āāāāāāāā āāāāāāāā āāāāāāāā āāāāāā āāā āāā āāā āāā āāāāāāāā āāāāāāāā āāā āāā
|
|
15
|
+
āāāāāāāā āāā āāā āāāāāāāā āāāāāāāā āāāāāāāāā āāāāāāāāā āāā āāā āāā āāā āāāāāāāā
|
|
16
|
+
āāāāāāā āāā āāā āāāāāāāā āāāāāāāā āāāāāāā āāāāāāā āāā āāā āāā āāā āāāāāāā
|
|
17
|
+
`;
|
|
18
|
+
|
|
19
|
+
// Use monochrome styling for good contrast
|
|
20
|
+
console.log(chalk.bold.white(logo));
|
|
21
|
+
|
|
22
|
+
// Tagline with styling
|
|
23
|
+
console.log(
|
|
24
|
+
chalk.bold.white(' Ship Modern Code') +
|
|
25
|
+
chalk.dim(' āØ\n')
|
|
26
|
+
);
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
// Test the header
|
|
30
|
+
showTerminalHeader();
|
|
31
|
+
|
|
32
|
+
console.log(chalk.cyan('š”ļø Baseguard Terminal Header Test Complete!'));
|
|
33
33
|
console.log(chalk.dim('This beautiful header will be shown when running Baseguard commands.\n'));
|
package/test-terminal-header.js
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
|
|
3
|
-
// Test the terminal header
|
|
4
|
-
import { showTerminalHeader, showCompactHeader } from './dist/ui/terminal-header.js';
|
|
5
|
-
|
|
6
|
-
console.log('Testing full terminal header:');
|
|
7
|
-
showTerminalHeader();
|
|
8
|
-
|
|
9
|
-
setTimeout(() => {
|
|
10
|
-
console.log('\n\nTesting compact header:');
|
|
11
|
-
showCompactHeader();
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
|
|
3
|
+
// Test the terminal header
|
|
4
|
+
import { showTerminalHeader, showCompactHeader } from './dist/ui/terminal-header.js';
|
|
5
|
+
|
|
6
|
+
console.log('Testing full terminal header:');
|
|
7
|
+
showTerminalHeader();
|
|
8
|
+
|
|
9
|
+
setTimeout(() => {
|
|
10
|
+
console.log('\n\nTesting compact header:');
|
|
11
|
+
showCompactHeader();
|
|
12
12
|
}, 2000);
|
package/test-ui.js
CHANGED
|
@@ -1,29 +1,29 @@
|
|
|
1
|
-
// Simple test to verify UI components work
|
|
2
|
-
import { UIComponents, Colors } from './dist/ui/index.js';
|
|
3
|
-
|
|
4
|
-
// Test the UI components
|
|
5
|
-
console.log('Testing BaseGuard UI Components...\n');
|
|
6
|
-
|
|
7
|
-
// Test header
|
|
8
|
-
UIComponents.showHeader();
|
|
9
|
-
|
|
10
|
-
// Test status messages
|
|
11
|
-
UIComponents.showStatus('success', 'UI components loaded successfully');
|
|
12
|
-
UIComponents.showStatus('info', 'Testing various UI elements');
|
|
13
|
-
|
|
14
|
-
// Test section header
|
|
15
|
-
UIComponents.showSectionHeader('Test Results');
|
|
16
|
-
|
|
17
|
-
// Test list
|
|
18
|
-
UIComponents.showList([
|
|
19
|
-
'Colorful output ā',
|
|
20
|
-
'Spinner components ā',
|
|
21
|
-
'Interactive prompts ā',
|
|
22
|
-
'Violation display ā'
|
|
23
|
-
]);
|
|
24
|
-
|
|
25
|
-
// Test boxes
|
|
26
|
-
UIComponents.showSuccessBox('All UI components are working!');
|
|
27
|
-
UIComponents.showInfoBox('Task 6 implementation complete');
|
|
28
|
-
|
|
1
|
+
// Simple test to verify UI components work
|
|
2
|
+
import { UIComponents, Colors } from './dist/ui/index.js';
|
|
3
|
+
|
|
4
|
+
// Test the UI components
|
|
5
|
+
console.log('Testing BaseGuard UI Components...\n');
|
|
6
|
+
|
|
7
|
+
// Test header
|
|
8
|
+
UIComponents.showHeader();
|
|
9
|
+
|
|
10
|
+
// Test status messages
|
|
11
|
+
UIComponents.showStatus('success', 'UI components loaded successfully');
|
|
12
|
+
UIComponents.showStatus('info', 'Testing various UI elements');
|
|
13
|
+
|
|
14
|
+
// Test section header
|
|
15
|
+
UIComponents.showSectionHeader('Test Results');
|
|
16
|
+
|
|
17
|
+
// Test list
|
|
18
|
+
UIComponents.showList([
|
|
19
|
+
'Colorful output ā',
|
|
20
|
+
'Spinner components ā',
|
|
21
|
+
'Interactive prompts ā',
|
|
22
|
+
'Violation display ā'
|
|
23
|
+
]);
|
|
24
|
+
|
|
25
|
+
// Test boxes
|
|
26
|
+
UIComponents.showSuccessBox('All UI components are working!');
|
|
27
|
+
UIComponents.showInfoBox('Task 6 implementation complete');
|
|
28
|
+
|
|
29
29
|
console.log('\n' + Colors.primary('š Beautiful CLI interface ready!'));
|