aeo-linter 0.1.2 → 0.1.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/dist/index.d.ts CHANGED
@@ -1,4 +1,4 @@
1
1
  /**
2
- * @fileoverview CLI principal para aeo-linter
2
+ * @fileoverview Main CLI entrypoint for aeo-linter
3
3
  */
4
4
  export declare function runCli(): Promise<void>;
package/dist/index.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @fileoverview CLI principal para aeo-linter
2
+ * @fileoverview Main CLI entrypoint for aeo-linter
3
3
  */
4
4
  import { Command } from 'commander';
5
5
  import fs from 'node:fs/promises';
@@ -9,16 +9,16 @@ export async function runCli() {
9
9
  const program = new Command();
10
10
  program
11
11
  .name('aeo-linter')
12
- .description('Answer Engine Optimization (AEO/GEO) Linter - Arquitectura Google Lighthouse')
13
- .version('0.1.0')
14
- .argument('<url>', 'URL de la página web a auditar')
15
- .option('-j, --json', 'Muestra el resultado completo en formato JSON')
16
- .option('--html', 'Genera un reporte visual interactivo en formato HTML')
17
- .option('-o, --output <file>', 'Ruta de archivo para guardar el reporte (.html o .json)')
18
- .option('-c, --categories <categories>', 'Lista separada por comas de categorías a auditar')
12
+ .description('Answer Engine Optimization (AEO/GEO) Linter - Google Lighthouse Architecture')
13
+ .version('0.1.2')
14
+ .argument('<url>', 'Target webpage URL to audit')
15
+ .option('-j, --json', 'Output full report in JSON format')
16
+ .option('--html', 'Generate an interactive visual HTML report dashboard')
17
+ .option('-o, --output <file>', 'File path to save the report (.html or .json)')
18
+ .option('-c, --categories <categories>', 'Comma-separated list of categories to audit')
19
19
  .action(async (url, options) => {
20
20
  try {
21
- // Validar formato de URL
21
+ // Validate URL format
22
22
  let validUrl;
23
23
  try {
24
24
  if (!url.startsWith('http://') && !url.startsWith('https://')) {
@@ -30,10 +30,10 @@ export async function runCli() {
30
30
  new URL(validUrl);
31
31
  }
32
32
  catch {
33
- console.error(`\x1b[31mError: URL inválida '${url}'\x1b[0m`);
33
+ console.error(`\x1b[31mError: Invalid URL '${url}'\x1b[0m`);
34
34
  process.exit(1);
35
35
  }
36
- // Filtrar categorías si se especificaron
36
+ // Filter categories if specified
37
37
  let customConfig = defaultConfig;
38
38
  if (options.categories) {
39
39
  const selected = options.categories.split(',').map((c) => c.trim().toLowerCase());
@@ -44,7 +44,7 @@ export async function runCli() {
44
44
  }
45
45
  }
46
46
  if (Object.keys(filteredCategories).length === 0) {
47
- console.error(`\x1b[31mError: Ninguna categoría válida seleccionada. Disponibles: ${Object.keys(defaultConfig.categories).join(', ')}\x1b[0m`);
47
+ console.error(`\x1b[31mError: No valid categories selected. Available: ${Object.keys(defaultConfig.categories).join(', ')}\x1b[0m`);
48
48
  process.exit(1);
49
49
  }
50
50
  customConfig = {
@@ -54,7 +54,7 @@ export async function runCli() {
54
54
  }
55
55
  const isQuiet = Boolean(options.json && !options.output);
56
56
  if (!isQuiet) {
57
- console.log(`\x1b[36m⚡ Iniciando auditoría AEO para:\x1b[0m ${validUrl}`);
57
+ console.log(`\x1b[36m⚡ Starting AEO audit for:\x1b[0m ${validUrl}`);
58
58
  }
59
59
  const report = await Runner.run(validUrl, {
60
60
  config: customConfig,
@@ -64,7 +64,7 @@ export async function runCli() {
64
64
  }
65
65
  },
66
66
  });
67
- // Generar salida
67
+ // Generate output
68
68
  if (options.output) {
69
69
  const outPath = path.resolve(process.cwd(), options.output);
70
70
  let content = '';
@@ -75,13 +75,13 @@ export async function runCli() {
75
75
  content = HtmlReporter.generate(report);
76
76
  }
77
77
  await fs.writeFile(outPath, content, 'utf-8');
78
- console.log(`\n\x1b[32m✔ Reporte guardado con éxito en:\x1b[0m ${outPath}`);
78
+ console.log(`\n\x1b[32m✔ Report successfully saved to:\x1b[0m ${outPath}`);
79
79
  }
80
80
  else if (options.html) {
81
81
  const defaultHtmlPath = path.resolve(process.cwd(), `aeo-report-${Date.now()}.html`);
82
82
  const content = HtmlReporter.generate(report);
83
83
  await fs.writeFile(defaultHtmlPath, content, 'utf-8');
84
- console.log(`\n\x1b[32m✔ Reporte HTML interactivo generado en:\x1b[0m ${defaultHtmlPath}`);
84
+ console.log(`\n\x1b[32m✔ Interactive HTML report generated at:\x1b[0m ${defaultHtmlPath}`);
85
85
  }
86
86
  else if (options.json) {
87
87
  console.log(JSON.stringify(report, null, 2));
@@ -91,7 +91,7 @@ export async function runCli() {
91
91
  }
92
92
  }
93
93
  catch (err) {
94
- console.error(`\x1b[31mError durante la auditoría AEO:\x1b[0m`, err instanceof Error ? err.message : err);
94
+ console.error(`\x1b[31mError during AEO audit:\x1b[0m`, err instanceof Error ? err.message : err);
95
95
  process.exit(1);
96
96
  }
97
97
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "aeo-linter",
3
- "version": "0.1.2",
3
+ "version": "0.1.4",
4
4
  "description": "Command-line interface for Answer Engine Optimization (AEO/GEO) Linter",
5
5
  "bin": {
6
6
  "aeo-linter": "./bin/aeo-linter.js"
@@ -31,7 +31,7 @@
31
31
  "author": "DrowLink",
32
32
  "license": "MIT",
33
33
  "dependencies": {
34
- "@drowlink/aeo-linter-core": "^0.1.1",
34
+ "@drowlink/aeo-linter-core": "^0.1.4",
35
35
  "commander": "^12.0.0"
36
36
  },
37
37
  "devDependencies": {