periderm-cli 0.1.55 → 0.1.56
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/scanner/seo-checks.js +20 -0
- package/package.json +5 -5
- package/scripts/postinstall.js +0 -36
|
@@ -66,6 +66,26 @@ export async function runSeoChecks(root, files) {
|
|
|
66
66
|
aiPrompt: `In ${names}, add og:image and twitter:card meta tags pointing at a 1200×630 social preview image in /public.`,
|
|
67
67
|
});
|
|
68
68
|
}
|
|
69
|
+
// ── missing critical OG tags on landing pages ──────────────────────────
|
|
70
|
+
const checkTags = ["og:url", "og:logo", "og:title", "og:description"];
|
|
71
|
+
for (const tag of checkTags) {
|
|
72
|
+
const hasTag = (content) => new RegExp(`(?:${tag}|property:\\s*["']${tag}["'])`, "i").test(content)
|
|
73
|
+
|| (/socialMeta|social-meta/.test(content) && !!socialMetaSource && new RegExp(tag, "i").test(socialMetaSource));
|
|
74
|
+
const missingRoutes = marketingRoutes.filter((r) => !hasTag(r.content));
|
|
75
|
+
if (missingRoutes.length > 0) {
|
|
76
|
+
out.push({
|
|
77
|
+
id: `missing-${tag.replace(':', '-')}`,
|
|
78
|
+
category: "SEO & Discoverability",
|
|
79
|
+
severity: "medium",
|
|
80
|
+
file: missingRoutes[0].rel,
|
|
81
|
+
line: 1,
|
|
82
|
+
message: `Landing page(s) missing ${tag}.`,
|
|
83
|
+
why: `The ${tag} tag is critical for proper previews and branding when shared on platforms like LinkedIn, Slack, and Twitter.`,
|
|
84
|
+
fix: `Add <meta property="${tag}" content="..." /> or configure it in your framework's metadata object.`,
|
|
85
|
+
aiPrompt: `In ${missingRoutes.slice(0, 3).map(r => r.rel).join(", ")}, add the missing ${tag} meta tag to the page head or metadata object.`,
|
|
86
|
+
});
|
|
87
|
+
}
|
|
88
|
+
}
|
|
69
89
|
// ── sitemap ───────────────────────────────────────────────────────────
|
|
70
90
|
const hasSitemap = (await exists(path.join(root, "public/sitemap.xml")))
|
|
71
91
|
|| relFiles.some((f) => /sitemap\.(?:xml|ts|tsx|js)$/i.test(f));
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "periderm-cli",
|
|
3
|
-
"version": "0.1.
|
|
4
|
-
"description": "Periderm CLI:
|
|
3
|
+
"version": "0.1.56",
|
|
4
|
+
"description": "Periderm CLI: A pre-launch checklist to catch user-losing bugs, legal liabilities, revenue leaks, runaway cloud bills and so many more before you ship.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"preferGlobal": true,
|
|
7
7
|
"bin": {
|
|
@@ -16,8 +16,8 @@
|
|
|
16
16
|
"cli",
|
|
17
17
|
"code-quality",
|
|
18
18
|
"pre-launch",
|
|
19
|
-
"
|
|
20
|
-
"
|
|
19
|
+
"reliability",
|
|
20
|
+
"auditing",
|
|
21
21
|
"javascript",
|
|
22
22
|
"typescript",
|
|
23
23
|
"jsx",
|
|
@@ -38,7 +38,7 @@
|
|
|
38
38
|
"homepage": "https://periderm-cli.vercel.app",
|
|
39
39
|
"repository": {
|
|
40
40
|
"type": "git",
|
|
41
|
-
"url": "https://periderm-cli.vercel.app/
|
|
41
|
+
"url": "https://periderm-cli.vercel.app/",
|
|
42
42
|
"directory": "packages/cli"
|
|
43
43
|
},
|
|
44
44
|
"bugs": {
|
package/scripts/postinstall.js
DELETED
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
import fs from "node:fs";
|
|
2
|
-
import path from "node:path";
|
|
3
|
-
import os from "node:os";
|
|
4
|
-
|
|
5
|
-
// If this is running inside the curl install.sh script, skip cleanup!
|
|
6
|
-
// We want curl installations to KEEP their ~/.periderm/bin folders.
|
|
7
|
-
if (process.env.PERIDERM_CURL_INSTALL === "1") {
|
|
8
|
-
process.exit(0);
|
|
9
|
-
}
|
|
10
|
-
|
|
11
|
-
// Find actual home directory, even if running via sudo npm install -g
|
|
12
|
-
const isRoot = process.getuid && process.getuid() === 0;
|
|
13
|
-
const sudoUser = process.env.SUDO_USER;
|
|
14
|
-
|
|
15
|
-
let homeDir = os.homedir();
|
|
16
|
-
if (isRoot && sudoUser) {
|
|
17
|
-
// Basic fallback for Linux/macOS sudo users
|
|
18
|
-
if (fs.existsSync(`/home/${sudoUser}`)) {
|
|
19
|
-
homeDir = `/home/${sudoUser}`;
|
|
20
|
-
} else if (fs.existsSync(`/Users/${sudoUser}`)) {
|
|
21
|
-
homeDir = `/Users/${sudoUser}`;
|
|
22
|
-
}
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
const peridermDir = path.join(homeDir, ".periderm");
|
|
26
|
-
const binDir = path.join(peridermDir, "bin");
|
|
27
|
-
const nodeModulesDir = path.join(peridermDir, "node_modules");
|
|
28
|
-
|
|
29
|
-
try {
|
|
30
|
-
// If the user installs globally via NPM, delete the legacy curl folders
|
|
31
|
-
// so that ~/.periderm/bin/periderm doesn't shadow /usr/local/bin/periderm.
|
|
32
|
-
fs.rmSync(binDir, { recursive: true, force: true });
|
|
33
|
-
fs.rmSync(nodeModulesDir, { recursive: true, force: true });
|
|
34
|
-
} catch (e) {
|
|
35
|
-
// Silent fail
|
|
36
|
-
}
|