@cloudcreate/adsense-check 1.3.0 → 1.3.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/{chunk-PGQWYP7I.js → chunk-LMW7JCER.js} +9 -1
- package/dist/cli.js +23 -8
- package/dist/index.d.ts +4 -0
- package/dist/index.js +1 -1
- package/package.json +1 -1
|
@@ -1425,7 +1425,15 @@ function buildPageDetails(pages, aiAnalyses, siteType) {
|
|
|
1425
1425
|
const { score } = scorePage(pageType, contentChars, contentRatio, issues, siteType, aiStatus);
|
|
1426
1426
|
const detail = { url: page.url, title: page.title, pageType, totalChars, contentChars, contentRatio, contentStatus, issues, score };
|
|
1427
1427
|
if (relevance) detail.relevance = relevance;
|
|
1428
|
-
if (ai) detail.ai = {
|
|
1428
|
+
if (ai) detail.ai = {
|
|
1429
|
+
status: ai.status,
|
|
1430
|
+
valueScore: ai.valueScore,
|
|
1431
|
+
originalityScore: ai.originalityScore,
|
|
1432
|
+
relevanceScore: ai.relevanceScore,
|
|
1433
|
+
complianceScore: ai.complianceScore,
|
|
1434
|
+
assessment: ai.assessment,
|
|
1435
|
+
suggestions: ai.suggestions
|
|
1436
|
+
};
|
|
1429
1437
|
return detail;
|
|
1430
1438
|
});
|
|
1431
1439
|
}
|
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-LMW7JCER.js";
|
|
14
14
|
|
|
15
15
|
// src/cli.ts
|
|
16
16
|
import "dotenv/config";
|
|
@@ -279,8 +279,8 @@ function renderMarkdownReport(report) {
|
|
|
279
279
|
lines.push("");
|
|
280
280
|
const problems = report.pages.filter((p) => p.contentStatus !== "pass" || p.issues.length > 0 || p.ai && p.ai.status !== "pass");
|
|
281
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 | \u6807\u9898 |`);
|
|
283
|
-
lines.push(
|
|
282
|
+
lines.push(`| \u72B6\u6001 | \u7C7B\u578B | \u8DEF\u5F84 | \u8BC4\u5206 | \u6B63\u6587\u6BD4 | V | O | R | C | \u6807\u9898 |`);
|
|
283
|
+
lines.push(`|------|------|------|------|--------|---|---|---|---|------|`);
|
|
284
284
|
for (const p of [...problems, ...ok]) {
|
|
285
285
|
const path = (() => {
|
|
286
286
|
try {
|
|
@@ -290,8 +290,12 @@ function renderMarkdownReport(report) {
|
|
|
290
290
|
}
|
|
291
291
|
})();
|
|
292
292
|
const status = MD_ICONS[p.contentStatus];
|
|
293
|
-
const
|
|
294
|
-
|
|
293
|
+
const ai = p.ai;
|
|
294
|
+
const v = ai?.valueScore != null ? ai.valueScore : "-";
|
|
295
|
+
const o = ai?.originalityScore != null ? ai.originalityScore : "-";
|
|
296
|
+
const r = ai?.relevanceScore != null ? ai.relevanceScore : "-";
|
|
297
|
+
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} |`);
|
|
295
299
|
}
|
|
296
300
|
lines.push("");
|
|
297
301
|
const detailPages = problems.filter((p) => p.issues.length > 0 || p.ai && p.ai.status !== "pass");
|
|
@@ -306,11 +310,22 @@ function renderMarkdownReport(report) {
|
|
|
306
310
|
return p.url;
|
|
307
311
|
}
|
|
308
312
|
})();
|
|
309
|
-
lines.push(`**${path}** (${p.score}/100)`);
|
|
313
|
+
lines.push(`**${path}** (mechanical: ${p.score}/100)`);
|
|
314
|
+
lines.push("");
|
|
310
315
|
for (const issue of p.issues) lines.push(`- \u26A0\uFE0F ${issue}`);
|
|
311
316
|
if (p.ai) {
|
|
312
|
-
|
|
313
|
-
|
|
317
|
+
const ai = p.ai;
|
|
318
|
+
lines.push(`- AI \u72B6\u6001: ${MD_ICONS[ai.status]} ${ai.status}`);
|
|
319
|
+
if (ai.valueScore != null) {
|
|
320
|
+
lines.push(`- \u56DB\u7EF4\u8BC4\u5206: **Value ${ai.valueScore}** | **Originality ${ai.originalityScore}** | **Relevance ${ai.relevanceScore}** | **Compliance ${ai.complianceScore}**`);
|
|
321
|
+
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`);
|
|
323
|
+
}
|
|
324
|
+
lines.push(`- \u8BC4\u4F30: ${ai.assessment}`);
|
|
325
|
+
if (ai.suggestions.length > 0) {
|
|
326
|
+
lines.push(`- \u6539\u8FDB\u5EFA\u8BAE:`);
|
|
327
|
+
for (const s of ai.suggestions.slice(0, 3)) lines.push(` - ${s}`);
|
|
328
|
+
}
|
|
314
329
|
}
|
|
315
330
|
lines.push("");
|
|
316
331
|
}
|
package/dist/index.d.ts
CHANGED
|
@@ -27,6 +27,10 @@ interface PageDetail {
|
|
|
27
27
|
relevance?: 'relevant' | 'tangential' | 'off-topic';
|
|
28
28
|
ai?: {
|
|
29
29
|
status: CheckStatus;
|
|
30
|
+
valueScore?: number;
|
|
31
|
+
originalityScore?: number;
|
|
32
|
+
relevanceScore?: number;
|
|
33
|
+
complianceScore?: number;
|
|
30
34
|
assessment: string;
|
|
31
35
|
suggestions: string[];
|
|
32
36
|
};
|
package/dist/index.js
CHANGED