@cloudcreate/adsense-check 1.4.1 → 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" || pt === "unknown") {
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" && pt !== "unknown") {
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" && classifyPage(dc) !== "unknown") {
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
  }
@@ -2126,7 +2126,7 @@ async function check(options) {
2126
2126
  pageAnalyses = aiResult.pageAnalyses;
2127
2127
  const aiItems = [];
2128
2128
  if (aiResult.suggestions.length > 0) {
2129
- aiItems.push({ name: t("item.ai.suggestions", lang), status: "warn", message: t("ai.suggestion_count", lang, { count: aiResult.suggestions.length }), detail: aiResult.suggestions.join("; ") });
2129
+ aiItems.push({ name: t("item.ai.suggestions", lang), status: "warn", message: t("ai.suggestion_count", lang, { count: aiResult.suggestions.length }), detailList: aiResult.suggestions });
2130
2130
  }
2131
2131
  allCategories.push({ name: t("group.ai_value", lang), items: aiItems, group: "soft" });
2132
2132
  let suspiciousPages = pageAnalyses.filter((a) => {
package/dist/cli.js CHANGED
@@ -10,7 +10,7 @@ import {
10
10
  getSupportedLangs,
11
11
  isValidLang,
12
12
  t
13
- } from "./chunk-KYGG7TZX.js";
13
+ } from "./chunk-J7FFLBB5.js";
14
14
 
15
15
  // src/cli.ts
16
16
  import "dotenv/config";
@@ -138,6 +138,9 @@ function renderTerminalReport(report) {
138
138
  for (const item of cat.items) {
139
139
  lines.push(` ${ICONS[item.status]} [${LABELS[item.status]}] ${item.message}`);
140
140
  if (item.detail) lines.push(chalk.gray(` ${item.detail}`));
141
+ if (item.detailList) {
142
+ for (const d of item.detailList) lines.push(chalk.gray(` \u2022 ${d}`));
143
+ }
141
144
  }
142
145
  lines.push("");
143
146
  }
@@ -197,7 +200,9 @@ function renderPage(lines, page, lang) {
197
200
  const scoreColor = page.score >= 80 ? chalk.green : page.score >= 50 ? chalk.yellow : chalk.red;
198
201
  const typeIcon = PAGE_TYPE_ICONS[page.pageType] || chalk.gray("?");
199
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;
200
- const scoreLabels = aiComposite != null ? `${t("reporter.mechanical_label", lang)}: ${scoreColor(page.score + "/100")} | ${t("reporter.advanced_label", lang)}: ${aiComposite >= 70 ? chalk.green : aiComposite >= 40 ? chalk.yellow : chalk.red}(AI ${aiComposite}/100)` : `${t("reporter.mechanical_label", lang)}: ${scoreColor(page.score + "/100")}`;
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")}`;
201
206
  lines.push(` ${ICONS[page.contentStatus]} ${typeIcon} ${chalk.bold(path)} ${scoreLabels}`);
202
207
  lines.push(chalk.gray(` ${page.title}`));
203
208
  lines.push(` ${t("report.content_label", lang)} ${ratioColor(page.contentRatio + "%")} (${page.contentChars}/${page.totalChars})`);
@@ -264,6 +269,9 @@ function renderMarkdownReport(report) {
264
269
  for (const item of cat.items) {
265
270
  lines.push(` - ${MD_ICONS[item.status]} ${item.name}: ${item.message}`);
266
271
  if (item.detail) lines.push(` - ${item.detail}`);
272
+ if (item.detailList) {
273
+ for (const d of item.detailList) lines.push(` - ${d}`);
274
+ }
267
275
  }
268
276
  }
269
277
  lines.push("");
package/dist/index.d.ts CHANGED
@@ -7,6 +7,7 @@ interface CheckItem {
7
7
  status: CheckStatus;
8
8
  message: string;
9
9
  detail?: string;
10
+ detailList?: string[];
10
11
  }
11
12
  type CheckGroup = 'hard' | 'soft';
12
13
  interface CheckCategory {
package/dist/index.js CHANGED
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  check
3
- } from "./chunk-KYGG7TZX.js";
3
+ } from "./chunk-J7FFLBB5.js";
4
4
  export {
5
5
  check
6
6
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cloudcreate/adsense-check",
3
- "version": "1.4.1",
3
+ "version": "1.4.3",
4
4
  "description": "Check if a website meets Google AdSense review requirements",
5
5
  "homepage": "https://cloudcreate.ai",
6
6
  "repository": {