@cloudcreate/adsense-check 1.3.1 → 1.4.1

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/cli.js CHANGED
@@ -10,7 +10,7 @@ import {
10
10
  getSupportedLangs,
11
11
  isValidLang,
12
12
  t
13
- } from "./chunk-LMW7JCER.js";
13
+ } from "./chunk-KYGG7TZX.js";
14
14
 
15
15
  // src/cli.ts
16
16
  import "dotenv/config";
@@ -63,12 +63,12 @@ function renderTerminalReport(report) {
63
63
  chalk.gray(` Site type: ${typeLabel}${confidenceLabel}`)
64
64
  ];
65
65
  if (report.siteTopic) {
66
- lines.push(chalk.gray(` Topic: ${report.siteTopic.topic} \u2014 ${report.siteTopic.description}`));
66
+ lines.push(chalk.gray(` ${t("reporter.topic", lang)}: ${report.siteTopic.topic} \u2014 ${report.siteTopic.description}`));
67
67
  }
68
68
  if (report.samplingInfo) {
69
69
  const s = report.samplingInfo;
70
70
  const confColor = s.confidence === "high" ? chalk.green : s.confidence === "medium" ? chalk.yellow : chalk.red;
71
- lines.push(chalk.gray(` Pages: ${s.totalDiscovered} total, ${s.recentCount} recent (6mo), ${s.sampledCount} sampled (${s.samplePct}%) ${confColor(s.confidence + " confidence")}`));
71
+ lines.push(chalk.gray(` ${t("reporter.pages_label", lang)}: ${s.totalDiscovered} total, ${s.recentCount} recent (6mo), ${s.sampledCount} sampled (${s.samplePct}%) ${confColor(t("reporter.confidence", lang, { confidence: s.confidence }))}`));
72
72
  }
73
73
  if (report.siteType === "unsupported") {
74
74
  lines.push("");
@@ -110,15 +110,16 @@ function renderTerminalReport(report) {
110
110
  lines.push(chalk.gray(` \u2502`));
111
111
  const hardContrib = Math.round(report.hardStatus === "ready" ? 100 * 0.4 : report.hardCategories.flatMap((c) => c.items).filter((i) => i.status === "pass").length / Math.max(1, report.hardCategories.flatMap((c) => c.items).length) * 100 * 0.4);
112
112
  const softContrib = Math.round(report.softScore * 0.6);
113
- lines.push(chalk.gray(` \u2502 Hard ${Math.round(hardContrib)}% \xD7 0.4 + Soft ${report.softScore}% \xD7 0.6 - Penalty ${report.warningPenalty} = ${report.compositeScore}`));
113
+ lines.push(chalk.gray(` \u2502 ${t("reporter.formula_label", lang, { hardPct: Math.round(hardContrib), softPct: report.softScore, penalty: report.warningPenalty, total: report.compositeScore })}`));
114
114
  if (report.siteAiScore > 0) {
115
- lines.push(chalk.gray(` \u2502 AI Value Score: ${report.siteAiScore}/100 (geometric mean \xD7 page-type weights)`));
115
+ lines.push(chalk.gray(` \u2502 ${t("reporter.ai_value_label", lang)}: ${report.siteAiScore}/100 (${t("reporter.ai_value_note", lang)})`));
116
116
  }
117
117
  if (report.aiDimensionAverages) {
118
118
  const d = report.aiDimensionAverages;
119
119
  const dimColor = (v) => v >= 8 ? chalk.green : v >= 5 ? chalk.yellow : chalk.red;
120
+ const dimLabel = (key, v) => `${t(`reporter.dim_${key}`, lang)} ${v}`;
120
121
  lines.push(
121
- chalk.gray(` \u2502 AI Dimensions: `) + `${dimColor(d.value)("Value " + d.value)} ${dimColor(d.originality)("Originality " + d.originality)} ${dimColor(d.relevance)("Relevance " + d.relevance)} ${dimColor(d.compliance)("Compliance " + d.compliance)} ` + chalk.gray("(avg /10)")
122
+ chalk.gray(` \u2502 ${t("reporter.ai_dimensions", lang)}: `) + `${dimColor(d.value)(dimLabel("value", d.value))} ${dimColor(d.originality)(dimLabel("originality", d.originality))} ${dimColor(d.relevance)(dimLabel("relevance", d.relevance))} ${dimColor(d.compliance)(dimLabel("compliance", d.compliance))} ` + chalk.gray(`(${t("reporter.avg_per_10", lang)})`)
122
123
  );
123
124
  }
124
125
  lines.push(chalk.gray(` \u2514\u2500`));
@@ -144,8 +145,12 @@ function renderTerminalReport(report) {
144
145
  lines.push(chalk.bold(` ${t("report.page_details", lang)}`));
145
146
  lines.push(chalk.gray(` (${t("report.pages", lang, { count: report.pages.length })})`));
146
147
  lines.push("");
147
- const problems = report.pages.filter((p) => p.contentStatus !== "pass" || p.issues.length > 0 || p.ai && p.ai.status !== "pass");
148
- const ok = report.pages.filter((p) => p.contentStatus === "pass" && p.issues.length === 0 && (!p.ai || p.ai.status === "pass"));
148
+ const problems = report.pages.filter(
149
+ (p) => p.pageType !== "required" && p.pageType !== "utility" && (p.contentStatus !== "pass" || p.issues.length > 0 || p.ai && p.ai.status !== "pass")
150
+ );
151
+ const ok = report.pages.filter(
152
+ (p) => p.pageType === "required" || p.pageType === "utility" || p.contentStatus === "pass" && p.issues.length === 0 && (!p.ai || p.ai.status === "pass")
153
+ );
149
154
  for (const p of problems) renderPage(lines, p, lang);
150
155
  if (ok.length > 0) lines.push(chalk.gray(` ${t("report.pages_ok", lang, { count: ok.length })}`));
151
156
  lines.push("");
@@ -172,6 +177,9 @@ var PAGE_TYPE_ICONS = {
172
177
  homepage: chalk.cyan("*"),
173
178
  content: chalk.green("A"),
174
179
  game_detail: chalk.blue("G"),
180
+ video_detail: chalk.cyan("V"),
181
+ reference_detail: chalk.magenta("R"),
182
+ reference_listing: chalk.magenta("r"),
175
183
  required: chalk.yellow("!"),
176
184
  listing: chalk.gray("L"),
177
185
  utility: chalk.gray("#"),
@@ -188,7 +196,9 @@ function renderPage(lines, page, lang) {
188
196
  const ratioColor = page.contentRatio >= 50 ? chalk.green : page.contentRatio >= 30 ? chalk.yellow : chalk.red;
189
197
  const scoreColor = page.score >= 80 ? chalk.green : page.score >= 50 ? chalk.yellow : chalk.red;
190
198
  const typeIcon = PAGE_TYPE_ICONS[page.pageType] || chalk.gray("?");
191
- lines.push(` ${ICONS[page.contentStatus]} ${typeIcon} ${chalk.bold(path)} ${scoreColor(page.score + "/100")}`);
199
+ 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")}`;
201
+ lines.push(` ${ICONS[page.contentStatus]} ${typeIcon} ${chalk.bold(path)} ${scoreLabels}`);
192
202
  lines.push(chalk.gray(` ${page.title}`));
193
203
  lines.push(` ${t("report.content_label", lang)} ${ratioColor(page.contentRatio + "%")} (${page.contentChars}/${page.totalChars})`);
194
204
  for (const issue of page.issues) lines.push(chalk.yellow(` ! ${issue}`));
@@ -215,28 +225,28 @@ function renderMarkdownReport(report) {
215
225
  const lang = report.lang;
216
226
  const typeKey = `detector.type.${report.siteType}`;
217
227
  const typeLabel = t(typeKey, lang);
218
- lines.push(`# AdSense \u5BA1\u6838\u62A5\u544A`);
228
+ lines.push(`# ${t("md.report_title", lang)}`);
219
229
  lines.push("");
220
- lines.push(`| \u9879\u76EE | \u503C |`);
230
+ lines.push(`| ${t("md.table.project", lang)} | ${t("md.table.value", lang)} |`);
221
231
  lines.push(`|------|-----|`);
222
- lines.push(`| URL | ${report.url} |`);
223
- lines.push(`| \u65F6\u95F4 | ${report.timestamp} |`);
224
- lines.push(`| \u7AD9\u70B9\u7C7B\u578B | ${typeLabel} (${report.siteTypeConfidence}) |`);
232
+ lines.push(`| ${t("md.table.url", lang)} | ${report.url} |`);
233
+ lines.push(`| ${t("md.table.time", lang)} | ${report.timestamp} |`);
234
+ lines.push(`| ${t("md.table.site_type", lang)} | ${typeLabel} (${report.siteTypeConfidence}) |`);
225
235
  if (report.siteTopic) {
226
- lines.push(`| \u4E3B\u9898 | ${report.siteTopic.topic} |`);
227
- lines.push(`| \u63CF\u8FF0 | ${report.siteTopic.description} |`);
236
+ lines.push(`| ${t("md.table.topic", lang)} | ${report.siteTopic.topic} |`);
237
+ lines.push(`| ${t("md.table.description", lang)} | ${report.siteTopic.description} |`);
228
238
  }
229
239
  if (report.samplingInfo) {
230
240
  const s = report.samplingInfo;
231
- lines.push(`| \u62BD\u6837 | ${s.totalDiscovered} total, ${s.recentCount} recent (6mo), ${s.sampledCount} sampled (${s.samplePct}%, ${s.confidence}) |`);
241
+ lines.push(`| ${t("md.table.sampling", lang)} | ${s.totalDiscovered} ${t("md.table.total", lang)}, ${s.recentCount} ${t("md.table.recent", lang)}, ${s.sampledCount} ${t("md.table.sampled", lang)} (${s.samplePct}%, ${s.confidence} ${t("md.table.confidence", lang)}) |`);
232
242
  }
233
243
  lines.push("");
234
- lines.push(`## \u7EFC\u5408\u8BC4\u5206: ${report.compositeScore}/100`);
244
+ lines.push(`## ${t("md.composite_score_title", lang)}: ${report.compositeScore}/100`);
235
245
  lines.push("");
236
246
  const hardFailCount = report.hardCategories.flatMap((c) => c.items).filter((i) => i.status === "fail").length;
237
247
  const hardWarnCount = report.hardCategories.flatMap((c) => c.items).filter((i) => i.status === "warn").length;
238
248
  const hardLabel = report.hardStatus === "ready" ? "\u2705 PASS" : report.hardStatus === "warn" ? "\u26A0\uFE0F WARN" : "\u274C FAIL";
239
- lines.push(`### \u786C\u6027\u8981\u6C42 ${hardLabel}`);
249
+ lines.push(`### ${t("md.hard_requirements", lang)} ${hardLabel}`);
240
250
  lines.push("");
241
251
  for (const cat of report.hardCategories) {
242
252
  for (const item of cat.items) {
@@ -245,7 +255,7 @@ function renderMarkdownReport(report) {
245
255
  }
246
256
  }
247
257
  lines.push("");
248
- lines.push(`### \u67D4\u6027\u8BC4\u5206 ${report.softScore}/100`);
258
+ lines.push(`### ${t("md.soft_scoring", lang)} ${report.softScore}/100`);
249
259
  lines.push("");
250
260
  for (const cat of report.softCategories) {
251
261
  const isAiCat = cat.name.includes("AI") || cat.name.includes("ai");
@@ -259,32 +269,37 @@ function renderMarkdownReport(report) {
259
269
  lines.push("");
260
270
  if (report.aiDimensionAverages) {
261
271
  const d = report.aiDimensionAverages;
262
- lines.push(`### AI \u4EF7\u503C\u5206\u6790`);
272
+ lines.push(`### ${t("md.ai_value_title", lang)}`);
263
273
  lines.push("");
264
- lines.push(`| \u7EF4\u5EA6 | \u5747\u5206 |`);
274
+ lines.push(`| ${t("md.table.dimension", lang)} | ${t("md.table.avg_score", lang)} |`);
265
275
  lines.push(`|------|------|`);
266
- lines.push(`| Value\uFF08\u4EF7\u503C\uFF09 | ${d.value}/10 |`);
267
- lines.push(`| Originality\uFF08\u539F\u521B\uFF09 | ${d.originality}/10 |`);
268
- lines.push(`| Relevance\uFF08\u76F8\u5173\uFF09 | ${d.relevance}/10 |`);
269
- lines.push(`| Compliance\uFF08\u5408\u89C4\uFF09 | ${d.compliance}/10 |`);
276
+ lines.push(`| ${t("md.dim_value", lang)} | ${d.value}/10 |`);
277
+ lines.push(`| ${t("md.dim_originality", lang)} | ${d.originality}/10 |`);
278
+ lines.push(`| ${t("md.dim_relevance", lang)} | ${d.relevance}/10 |`);
279
+ lines.push(`| ${t("md.dim_compliance", lang)} | ${d.compliance}/10 |`);
270
280
  lines.push("");
271
- lines.push(`**\u7AD9\u70B9 AI \u8BC4\u5206**: ${report.siteAiScore}/100\uFF08\u51E0\u4F55\u5747\u503C \xD7 \u9875\u9762\u7C7B\u578B\u52A0\u6743\uFF09`);
281
+ lines.push(`**${t("md.site_ai_score", lang)}**: ${report.siteAiScore}/100\uFF08${t("md.geometric_weighted", lang)}\uFF09`);
272
282
  lines.push("");
273
283
  }
274
284
  const hardContrib = Math.round(report.hardStatus === "ready" ? 100 * 0.4 : report.hardCategories.flatMap((c) => c.items).filter((i) => i.status === "pass").length / Math.max(1, report.hardCategories.flatMap((c) => c.items).length) * 100 * 0.4);
275
285
  lines.push(`> Hard ${Math.round(hardContrib)}% \xD7 0.4 + Soft ${report.softScore}% \xD7 0.6 - Penalty ${report.warningPenalty} = ${report.compositeScore}`);
276
286
  lines.push("");
277
287
  if (report.pages.length > 0) {
278
- lines.push(`### \u9010\u9875\u8BE6\u60C5 (${report.pages.length} pages)`);
288
+ lines.push(`### ${t("md.page_details", lang)} (${t("md.pages_count", lang, { count: report.pages.length })})`);
279
289
  lines.push("");
280
- const problems = report.pages.filter((p) => p.contentStatus !== "pass" || p.issues.length > 0 || p.ai && p.ai.status !== "pass");
281
- const ok = report.pages.filter((p) => p.contentStatus === "pass" && p.issues.length === 0 && (!p.ai || p.ai.status === "pass"));
282
- lines.push(`| \u72B6\u6001 | \u7C7B\u578B | \u8DEF\u5F84 | \u8BC4\u5206 | \u6B63\u6587\u6BD4 | V | O | R | C | \u6807\u9898 |`);
283
- lines.push(`|------|------|------|------|--------|---|---|---|---|------|`);
290
+ const problems = report.pages.filter(
291
+ (p) => p.pageType !== "required" && p.pageType !== "utility" && (p.contentStatus !== "pass" || p.issues.length > 0 || p.ai && p.ai.status !== "pass")
292
+ );
293
+ const ok = report.pages.filter(
294
+ (p) => p.pageType === "required" || p.pageType === "utility" || p.contentStatus === "pass" && p.issues.length === 0 && (!p.ai || p.ai.status === "pass")
295
+ );
296
+ lines.push(`| ${t("md.table.status", lang)} | ${t("md.table.type", lang)} | ${t("md.table.path", lang)} | ${t("md.table.score", lang)} | ${t("md.table.content_ratio", lang)} | V | O | R | C | ${t("md.table.ai_composite", lang)} | ${t("md.table.title", lang)} |`);
297
+ lines.push(`|------|------|------|------|--------|---|---|---|---|--------|------|`);
284
298
  for (const p of [...problems, ...ok]) {
285
299
  const path = (() => {
286
300
  try {
287
- return new URL(p.url).pathname;
301
+ const u = new URL(p.url);
302
+ return u.pathname + u.search;
288
303
  } catch {
289
304
  return p.url;
290
305
  }
@@ -295,35 +310,39 @@ function renderMarkdownReport(report) {
295
310
  const o = ai?.originalityScore != null ? ai.originalityScore : "-";
296
311
  const r = ai?.relevanceScore != null ? ai.relevanceScore : "-";
297
312
  const c = ai?.complianceScore != null ? ai.complianceScore : "-";
298
- lines.push(`| ${status} | ${p.pageType} | \`${path}\` | ${p.score}/100 | ${p.contentRatio}% | ${v} | ${o} | ${r} | ${c} | ${p.title} |`);
313
+ const aiComposite = ai?.valueScore != null && ai?.originalityScore != null && ai?.relevanceScore != null && ai?.complianceScore != null ? Math.round(Math.pow(ai.valueScore * ai.originalityScore * ai.relevanceScore * ai.complianceScore, 0.25) * 10) : "-";
314
+ lines.push(`| ${status} | ${p.pageType} | [\`${path}\`](${p.url}) | ${p.score}/100 | ${p.contentRatio}% | ${v} | ${o} | ${r} | ${c} | ${aiComposite} | ${p.title} |`);
299
315
  }
300
316
  lines.push("");
301
317
  const detailPages = problems.filter((p) => p.issues.length > 0 || p.ai && p.ai.status !== "pass");
302
318
  if (detailPages.length > 0) {
303
- lines.push(`#### \u95EE\u9898\u9875\u9762\u8BE6\u60C5`);
319
+ lines.push(`#### ${t("md.problem_pages", lang)}`);
304
320
  lines.push("");
305
321
  for (const p of detailPages) {
306
322
  const path = (() => {
307
323
  try {
308
- return new URL(p.url).pathname;
324
+ const u = new URL(p.url);
325
+ return u.pathname + u.search;
309
326
  } catch {
310
327
  return p.url;
311
328
  }
312
329
  })();
313
- lines.push(`**${path}** (mechanical: ${p.score}/100)`);
330
+ const aiComposite = p.ai?.valueScore != null && p.ai?.originalityScore != null && p.ai?.relevanceScore != null && p.ai?.complianceScore != null ? Math.round(Math.pow(p.ai.valueScore * p.ai.originalityScore * p.ai.relevanceScore * p.ai.complianceScore, 0.25) * 10) : null;
331
+ const scoreLabels = aiComposite != null ? `${t("reporter.mechanical_label", lang)}: ${p.score}/100 | ${t("reporter.advanced_label", lang)}: ${aiComposite}/100` : `${t("reporter.mechanical_label", lang)}: ${p.score}/100`;
332
+ lines.push(`**[${path}](${p.url})** (${scoreLabels})`);
314
333
  lines.push("");
315
334
  for (const issue of p.issues) lines.push(`- \u26A0\uFE0F ${issue}`);
316
335
  if (p.ai) {
317
336
  const ai = p.ai;
318
- lines.push(`- AI \u72B6\u6001: ${MD_ICONS[ai.status]} ${ai.status}`);
337
+ lines.push(`- ${t("md.ai_status", lang)}: ${MD_ICONS[ai.status]} ${ai.status}`);
319
338
  if (ai.valueScore != null) {
320
- lines.push(`- \u56DB\u7EF4\u8BC4\u5206: **Value ${ai.valueScore}** | **Originality ${ai.originalityScore}** | **Relevance ${ai.relevanceScore}** | **Compliance ${ai.complianceScore}**`);
339
+ lines.push(`- ${t("md.four_dimensions", lang)}: **${t("md.dim_value", lang)} ${ai.valueScore}** | **${t("md.dim_originality", lang)} ${ai.originalityScore}** | **${t("md.dim_relevance", lang)} ${ai.relevanceScore}** | **${t("md.dim_compliance", lang)} ${ai.complianceScore}**`);
321
340
  const geoMean = Math.round(Math.pow((ai.valueScore ?? 5) * (ai.originalityScore ?? 5) * (ai.relevanceScore ?? 5) * (ai.complianceScore ?? 5), 0.25) * 10);
322
- lines.push(`- AI \u7EFC\u5408\u5206: ${geoMean}/100\uFF08\u51E0\u4F55\u5747\u503C\uFF09`);
341
+ lines.push(`- ${t("md.ai_composite_score", lang)}: ${geoMean}/100\uFF08${t("md.geometric_mean", lang)}\uFF09`);
323
342
  }
324
- lines.push(`- \u8BC4\u4F30: ${ai.assessment}`);
343
+ lines.push(`- ${t("md.assessment", lang)}: ${ai.assessment}`);
325
344
  if (ai.suggestions.length > 0) {
326
- lines.push(`- \u6539\u8FDB\u5EFA\u8BAE:`);
345
+ lines.push(`- ${t("md.suggestions", lang)}:`);
327
346
  for (const s of ai.suggestions.slice(0, 3)) lines.push(` - ${s}`);
328
347
  }
329
348
  }
@@ -332,13 +351,13 @@ function renderMarkdownReport(report) {
332
351
  }
333
352
  }
334
353
  if (report.hardStatus === "fail") {
335
- lines.push(`**\u274C NOT READY** \u2014 ${hardFailCount} \u9879\u5931\u8D25\u9700\u8981\u4FEE\u590D`);
354
+ lines.push(t("md.summary.not_ready", lang, { count: hardFailCount }));
336
355
  } else if (report.hardStatus === "warn") {
337
- lines.push(`**\u26A0\uFE0F NEEDS FIXES** \u2014 ${hardWarnCount} \u9879\u8B66\u544A\u5F85\u4FEE\u590D`);
356
+ lines.push(t("md.summary.needs_fixes", lang, { count: hardWarnCount }));
338
357
  } else if (report.warned > 0) {
339
- lines.push(`**\u26A0\uFE0F MOSTLY READY** \u2014 \u4FEE\u590D ${report.warned} \u9879\u8B66\u544A\u540E\u53EF\u63D0\u4EA4`);
358
+ lines.push(t("md.summary.mostly_ready", lang, { count: report.warned }));
340
359
  } else {
341
- lines.push(`**\u2705 READY** \u2014 \u53EF\u4EE5\u63D0\u4EA4 AdSense \u5BA1\u6838`);
360
+ lines.push(t("md.summary.ready", lang));
342
361
  }
343
362
  lines.push("");
344
363
  return lines.join("\n");
@@ -358,7 +377,7 @@ function getDomain(url) {
358
377
  }
359
378
  }
360
379
  var program = new Command();
361
- program.name("adsense-check").description("Check if a website meets Google AdSense review requirements").version("1.0.0").argument("<url>", "Website URL to check").option("-j, --json", "Output JSON to stdout").option("-n, --max-crawl <number>", "Total page crawl limit (Phase 1 + 2)", "50").option("-m, --page-limit <number>", "Max structural pages to crawl (Phase 1)", "50").option("-c, --content-limit <number>", "Max content pages to crawl (Phase 2)", "20").option("--sample-min <number>", "Min content pages to sample", "20").option("--sample-ratio <ratio>", "Content page sampling ratio (0-1)", "0.2").option("--ai", "Enable AI content quality analysis", false).option("-t, --timeout <ms>", "Page load timeout", "30000").option("--api-key <key>", "AI API key").option("-o, --output <dir>", "Report output directory", "tmp").option("--no-save", "Skip auto-saving report").option("-l, --lang <lang>", `Output language (${getSupportedLangs().join("|")})`, "en").option("--type <type>", "Force site type (content|tool|game), skip auto-detection").option("--detect-only", "Only detect site type/topic, skip full check").option("--page <url>", "Analyze a single page value (AI four-dimension scoring)").action(async (url, opts) => {
380
+ program.name("adsense-check").description("Check if a website meets Google AdSense review requirements").version("1.0.0").argument("<url>", "Website URL to check").option("-j, --json", "Output JSON to stdout").option("-n, --max-crawl <number>", "Total page crawl limit (Phase 1 + 2)", "50").option("-m, --page-limit <number>", "Max structural pages to crawl (Phase 1)", "50").option("-c, --content-limit <number>", "Max content pages to crawl (Phase 2)", "20").option("--sample-min <number>", "Min content pages to sample", "20").option("--sample-ratio <ratio>", "Content page sampling ratio (0-1)", "0.2").option("--ai", "Enable AI content quality analysis", false).option("-t, --timeout <ms>", "Page load timeout", "30000").option("--api-key <key>", "AI API key").option("-o, --output <dir>", "Report output directory", "tmp").option("--no-save", "Skip auto-saving report").option("-l, --lang <lang>", `Output language (${getSupportedLangs().join("|")})`, "en").option("--type <type>", "Force site type (content|tool|game|video|reference), skip auto-detection").option("--detect-only", "Only detect site type/topic, skip full check").option("--page <url>", "Analyze a single page value (AI four-dimension scoring)").action(async (url, opts) => {
362
381
  try {
363
382
  new URL(url);
364
383
  } catch {
package/dist/index.d.ts CHANGED
@@ -1,7 +1,7 @@
1
1
  type CheckStatus = 'pass' | 'warn' | 'fail' | 'skip';
2
2
  type Lang = string;
3
- type SiteType = 'content' | 'tool' | 'game' | 'unsupported';
4
- type PageType = 'homepage' | 'content' | 'game_detail' | 'required' | 'listing' | 'utility' | 'unknown';
3
+ type SiteType = 'content' | 'tool' | 'game' | 'video' | 'reference' | 'unsupported';
4
+ type PageType = 'homepage' | 'content' | 'game_detail' | 'video_detail' | 'reference_detail' | 'reference_listing' | 'required' | 'listing' | 'utility' | 'unknown';
5
5
  interface CheckItem {
6
6
  name: string;
7
7
  status: CheckStatus;
package/dist/index.js CHANGED
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  check
3
- } from "./chunk-LMW7JCER.js";
3
+ } from "./chunk-KYGG7TZX.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.3.1",
3
+ "version": "1.4.1",
4
4
  "description": "Check if a website meets Google AdSense review requirements",
5
5
  "homepage": "https://cloudcreate.ai",
6
6
  "repository": {