@cloudcreate/adsense-check 1.2.0 → 1.2.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/README.md CHANGED
@@ -83,8 +83,29 @@ Checks are divided into **Hard Requirements** (pass/fail) and **Soft Scoring** (
83
83
  Composite = Hard Pass Rate × 0.4 + Soft Score × 0.6 - Warning Penalty
84
84
  ```
85
85
 
86
- - **Hard**: Site scale, required pages, structure, performance baseline, policy compliance
87
- - **Soft**: Content quality, user experience, AI analysis, content relevance
86
+ - **Hard**: Site scale, required pages, structure, performance baseline, policy compliance (including AI compliance)
87
+ - **Soft**: AI value analysis (45%), content quality (35%), user experience (10%), page quality (10%)
88
+
89
+ ### AI Value Scoring
90
+
91
+ Each page is scored on four dimensions (0-10) by AI:
92
+
93
+ | Dimension | Description |
94
+ |-----------|-------------|
95
+ | **Value** | Does the page provide real, substantive information? |
96
+ | **Originality** | Is the content original (not scraped/AI-generated/copied)? |
97
+ | **Relevance** | How relevant is the page to the site's topic? |
98
+ | **Compliance** | Does the content comply with AdSense policies? |
99
+
100
+ Page score = geometric mean of all four dimensions. This means any weak dimension drags down the overall score significantly.
101
+
102
+ Site score = page-type weighted average across all analyzed pages (homepage and content pages have highest weight).
103
+
104
+ ### Single-Page Analysis
105
+
106
+ ```bash
107
+ adsense-check <site> --page <url> --ai
108
+ ```
88
109
 
89
110
  ## Options
90
111
 
@@ -97,6 +118,7 @@ Composite = Hard Pass Rate × 0.4 + Soft Score × 0.6 - Warning Penalty
97
118
  --sample-min <n> Min content pages to sample (default: 20)
98
119
  --sample-ratio <ratio> Content page sampling ratio 0-1 (default: 0.2)
99
120
  --ai Enable AI content quality analysis
121
+ --page <url> Analyze single page value (four-dimension scoring)
100
122
  -t, --timeout <ms> Page load timeout (default: 30000)
101
123
  --api-key <key> AI API key
102
124
  -o, --output <dir> Report output dir (default: tmp)
@@ -886,11 +886,11 @@ function scorePage(pageType, contentChars, contentRatio, issues, siteType, aiSta
886
886
  return { score, checks };
887
887
  }
888
888
  var AI_PAGE_TYPE_WEIGHTS = {
889
+ homepage: 1.5,
889
890
  content: 1,
890
891
  game_detail: 1,
891
892
  unknown: 0.5,
892
- homepage: 0.3,
893
- listing: 0.3,
893
+ listing: 0.1,
894
894
  required: 0.2,
895
895
  utility: 0.1
896
896
  };
@@ -1703,6 +1703,12 @@ async function check(options) {
1703
1703
  const allItems = allCategories.flatMap((c) => c.items);
1704
1704
  const pageScoresForComposite = pageDetails.map((p) => ({ pageType: p.pageType, score: p.score }));
1705
1705
  const { compositeScore, categoryScores, hardStatus, softScore, warningRatio, warningPenalty, siteAiScore } = computeCompositeScore(pageScoresForComposite, hardCategories, softCategories, pageAnalyses);
1706
+ const aiDimensionAverages = pageAnalyses.length > 0 ? {
1707
+ value: Math.round(pageAnalyses.reduce((s, a) => s + (a.valueScore ?? 5), 0) / pageAnalyses.length * 10) / 10,
1708
+ originality: Math.round(pageAnalyses.reduce((s, a) => s + (a.originalityScore ?? 5), 0) / pageAnalyses.length * 10) / 10,
1709
+ relevance: Math.round(pageAnalyses.reduce((s, a) => s + (a.relevanceScore ?? 5), 0) / pageAnalyses.length * 10) / 10,
1710
+ compliance: Math.round(pageAnalyses.reduce((s, a) => s + (a.complianceScore ?? 5), 0) / pageAnalyses.length * 10) / 10
1711
+ } : void 0;
1706
1712
  return {
1707
1713
  url,
1708
1714
  timestamp: (/* @__PURE__ */ new Date()).toISOString(),
@@ -1727,7 +1733,8 @@ async function check(options) {
1727
1733
  softScore,
1728
1734
  warningRatio,
1729
1735
  warningPenalty,
1730
- siteAiScore
1736
+ siteAiScore,
1737
+ aiDimensionAverages
1731
1738
  };
1732
1739
  } finally {
1733
1740
  await browser.close();
package/dist/cli.js CHANGED
@@ -10,7 +10,7 @@ import {
10
10
  getSupportedLangs,
11
11
  isValidLang,
12
12
  t
13
- } from "./chunk-SES7MRFF.js";
13
+ } from "./chunk-PGQWYP7I.js";
14
14
 
15
15
  // src/cli.ts
16
16
  import "dotenv/config";
@@ -114,6 +114,13 @@ function renderTerminalReport(report) {
114
114
  if (report.siteAiScore > 0) {
115
115
  lines.push(chalk.gray(` \u2502 AI Value Score: ${report.siteAiScore}/100 (geometric mean \xD7 page-type weights)`));
116
116
  }
117
+ if (report.aiDimensionAverages) {
118
+ const d = report.aiDimensionAverages;
119
+ const dimColor = (v) => v >= 8 ? chalk.green : v >= 5 ? chalk.yellow : chalk.red;
120
+ 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
+ );
123
+ }
117
124
  lines.push(chalk.gray(` \u2514\u2500`));
118
125
  lines.push("");
119
126
  if (report.categoryScores.length > 0) {
package/dist/index.d.ts CHANGED
@@ -74,6 +74,12 @@ interface CheckReport {
74
74
  warningRatio: number;
75
75
  warningPenalty: number;
76
76
  siteAiScore: number;
77
+ aiDimensionAverages?: {
78
+ value: number;
79
+ originality: number;
80
+ relevance: number;
81
+ compliance: number;
82
+ };
77
83
  }
78
84
  interface CheckOptions {
79
85
  url: string;
package/dist/index.js CHANGED
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  check
3
- } from "./chunk-SES7MRFF.js";
3
+ } from "./chunk-PGQWYP7I.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.2.0",
3
+ "version": "1.2.1",
4
4
  "description": "Check if a website meets Google AdSense review requirements",
5
5
  "homepage": "https://cloudcreate.ai",
6
6
  "repository": {