@cloudcreate/adsense-check 1.4.2 → 1.4.3
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.
|
@@ -2027,7 +2027,7 @@ async function check(options) {
|
|
|
2027
2027
|
if (seenInDiscovery.has(norm)) continue;
|
|
2028
2028
|
seenInDiscovery.add(norm);
|
|
2029
2029
|
const pt = classifyPage(child);
|
|
2030
|
-
if (pt === "listing"
|
|
2030
|
+
if (pt === "listing") {
|
|
2031
2031
|
if (current.depth < MAX_DISCOVERY_DEPTH) {
|
|
2032
2032
|
}
|
|
2033
2033
|
} else {
|
|
@@ -2039,7 +2039,7 @@ async function check(options) {
|
|
|
2039
2039
|
const norm = smUrl.replace(/\/+$/, "");
|
|
2040
2040
|
if (!crawledUrls.has(norm) && !discoveredContent.has(norm)) {
|
|
2041
2041
|
const pt = classifyPage(smUrl);
|
|
2042
|
-
if (pt !== "listing"
|
|
2042
|
+
if (pt !== "listing") {
|
|
2043
2043
|
discoveredContent.add(smUrl);
|
|
2044
2044
|
}
|
|
2045
2045
|
}
|
|
@@ -2058,7 +2058,7 @@ async function check(options) {
|
|
|
2058
2058
|
const deeperChildren = discoverChildLinks(link, crawledPage.links, origin, CHILDREN_PER_LISTING);
|
|
2059
2059
|
for (const dc of deeperChildren) {
|
|
2060
2060
|
const dnorm = dc.replace(/\/+$/, "");
|
|
2061
|
-
if (!crawledUrls.has(dnorm) && !discoveredContent.has(dnorm) && classifyPage(dc) !== "listing"
|
|
2061
|
+
if (!crawledUrls.has(dnorm) && !discoveredContent.has(dnorm) && classifyPage(dc) !== "listing") {
|
|
2062
2062
|
if (i + discoveredContent.size < maxContent * 2) {
|
|
2063
2063
|
discoveredContent.add(dc);
|
|
2064
2064
|
}
|
package/dist/cli.js
CHANGED
|
@@ -10,7 +10,7 @@ import {
|
|
|
10
10
|
getSupportedLangs,
|
|
11
11
|
isValidLang,
|
|
12
12
|
t
|
|
13
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-J7FFLBB5.js";
|
|
14
14
|
|
|
15
15
|
// src/cli.ts
|
|
16
16
|
import "dotenv/config";
|
|
@@ -200,7 +200,9 @@ function renderPage(lines, page, lang) {
|
|
|
200
200
|
const scoreColor = page.score >= 80 ? chalk.green : page.score >= 50 ? chalk.yellow : chalk.red;
|
|
201
201
|
const typeIcon = PAGE_TYPE_ICONS[page.pageType] || chalk.gray("?");
|
|
202
202
|
const aiComposite = page.ai?.valueScore != null && page.ai?.originalityScore != null && page.ai?.relevanceScore != null && page.ai?.complianceScore != null ? Math.round(Math.pow(page.ai.valueScore * page.ai.originalityScore * page.ai.relevanceScore * page.ai.complianceScore, 0.25) * 10) : null;
|
|
203
|
-
const
|
|
203
|
+
const aiColor = aiComposite >= 70 ? chalk.green : aiComposite >= 40 ? chalk.yellow : chalk.red;
|
|
204
|
+
const aiScoreText = aiColor(`AI ${aiComposite}/100`);
|
|
205
|
+
const scoreLabels = aiComposite != null ? `${t("reporter.mechanical_label", lang)}: ${scoreColor(page.score + "/100")} | ${t("reporter.advanced_label", lang)}: ${aiScoreText}` : `${t("reporter.mechanical_label", lang)}: ${scoreColor(page.score + "/100")}`;
|
|
204
206
|
lines.push(` ${ICONS[page.contentStatus]} ${typeIcon} ${chalk.bold(path)} ${scoreLabels}`);
|
|
205
207
|
lines.push(chalk.gray(` ${page.title}`));
|
|
206
208
|
lines.push(` ${t("report.content_label", lang)} ${ratioColor(page.contentRatio + "%")} (${page.contentChars}/${page.totalChars})`);
|
|
@@ -267,6 +269,9 @@ function renderMarkdownReport(report) {
|
|
|
267
269
|
for (const item of cat.items) {
|
|
268
270
|
lines.push(` - ${MD_ICONS[item.status]} ${item.name}: ${item.message}`);
|
|
269
271
|
if (item.detail) lines.push(` - ${item.detail}`);
|
|
272
|
+
if (item.detailList) {
|
|
273
|
+
for (const d of item.detailList) lines.push(` - ${d}`);
|
|
274
|
+
}
|
|
270
275
|
}
|
|
271
276
|
}
|
|
272
277
|
lines.push("");
|
package/dist/index.js
CHANGED