aeo-ready 1.7.5 → 1.7.7
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/package.json +1 -1
- package/src/recommendations.js +42 -0
package/package.json
CHANGED
package/src/recommendations.js
CHANGED
|
@@ -273,6 +273,48 @@ function generateAgentPrompt(result, recs) {
|
|
|
273
273
|
return lines.join("\n");
|
|
274
274
|
}
|
|
275
275
|
|
|
276
|
+
function printPromptForTerminal(result, recs) {
|
|
277
|
+
let currentTier = null;
|
|
278
|
+
let num = 1;
|
|
279
|
+
|
|
280
|
+
console.log("");
|
|
281
|
+
for (const rec of recs) {
|
|
282
|
+
const tier = tierLabel(rec.priority);
|
|
283
|
+
if (tier !== currentTier) {
|
|
284
|
+
currentTier = tier;
|
|
285
|
+
const color =
|
|
286
|
+
rec.priority >= 3
|
|
287
|
+
? chalk.red
|
|
288
|
+
: rec.priority >= 2
|
|
289
|
+
? chalk.yellow
|
|
290
|
+
: chalk.dim;
|
|
291
|
+
if (num > 1) console.log("");
|
|
292
|
+
console.log(
|
|
293
|
+
` ${color.bold(tier)} ${chalk.dim(`(${tierDescription(rec.priority)})`)}`,
|
|
294
|
+
);
|
|
295
|
+
console.log("");
|
|
296
|
+
}
|
|
297
|
+
const benchmarkList = rec.benchmarks
|
|
298
|
+
.map((b) => BENCHMARK_NAMES[b])
|
|
299
|
+
.join(" · ");
|
|
300
|
+
console.log(` ${chalk.white.bold(`${num}.`)} ${rec.label}`);
|
|
301
|
+
if (rec.detail) {
|
|
302
|
+
console.log(` ${chalk.dim(rec.detail)}`);
|
|
303
|
+
}
|
|
304
|
+
console.log(` ${chalk.dim(benchmarkList)}`);
|
|
305
|
+
num++;
|
|
306
|
+
}
|
|
307
|
+
|
|
308
|
+
console.log("");
|
|
309
|
+
console.log(chalk.dim(" ─".repeat(25)));
|
|
310
|
+
console.log("");
|
|
311
|
+
console.log(
|
|
312
|
+
` ${chalk.dim("Not every recommendation may apply — review and prioritize for your site.")}`,
|
|
313
|
+
);
|
|
314
|
+
console.log(` ${chalk.dim(`Re-scan: npx aeo-ready scan ${result.url}`)}`);
|
|
315
|
+
console.log("");
|
|
316
|
+
}
|
|
317
|
+
|
|
276
318
|
function copyToClipboard(text) {
|
|
277
319
|
try {
|
|
278
320
|
execSync("pbcopy", { input: text, stdio: ["pipe", "pipe", "pipe"] });
|