periderm-cli 0.1.36 → 0.1.37
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/index.js
CHANGED
|
@@ -9,8 +9,8 @@ Given a project summary, decide:
|
|
|
9
9
|
- notes: one sentence explaining your reasoning
|
|
10
10
|
|
|
11
11
|
Rules:
|
|
12
|
-
-
|
|
13
|
-
-
|
|
12
|
+
- A project is an 'admin-only' internal tool EVEN IF it has public auth/login pages. Only classify as 'monorepo' if it contains a full public-facing marketing site or consumer product alongside the dashboard.
|
|
13
|
+
- If 'admin-only' or 'internal-tool', skip Legal & Compliance, SEO & Discoverability, and Accessibility globally.
|
|
14
14
|
- Mobile-only (Flutter/RN/Swift, no web marketing) → mobile-app, skip SEO.
|
|
15
15
|
- Never skip Security, Runtime Stability, or Runaway Cloud Costs unless library with no runtime.`;
|
|
16
16
|
const TRIAGE_PROMPT = `You triage scan findings for false positives. Return ONLY valid JSON:
|
|
@@ -19,15 +19,17 @@ const INTERNAL_PATH_RE = [
|
|
|
19
19
|
/(?:^|[/\\])middleware\.(?:ts|js)/,
|
|
20
20
|
];
|
|
21
21
|
const CONSUMER_PATH_RE = [
|
|
22
|
-
/(?:^|[/\\])routes[/\\]index\.(tsx|jsx)
|
|
23
|
-
/(?:^|[/\\])
|
|
24
|
-
/(?:^|[/\\])
|
|
25
|
-
/(?:^|[/\\])app
|
|
22
|
+
/(?:^|[/\\])routes[/\\](?:index|__root|\+page)\.(tsx|jsx|svelte|vue)$/i,
|
|
23
|
+
/(?:^|[/\\])pages[/\\]index\.(tsx|jsx|vue|astro)$/i,
|
|
24
|
+
/(?:^|[/\\])app[/\\](?:page|layout|app\.component)\.(tsx|jsx|ts|js)$/i,
|
|
25
|
+
/(?:^|[/\\])(?:App|app)\.(svelte|vue)$/i,
|
|
26
|
+
/(?:^|[/\\])lib[/\\](?:main|screens[/\\]home)\.dart$/i,
|
|
27
|
+
/(?:^|[/\\])(?:ContentView|ViewController)\.swift$/i,
|
|
26
28
|
/(?:^|[/\\])landing/i,
|
|
27
29
|
/(?:^|[/\\])marketing/i,
|
|
28
|
-
/(?:^|[/\\])routes[/\\]docs
|
|
29
|
-
/(?:^|[/\\])routes[/\\]privacy
|
|
30
|
-
/(?:^|[/\\])routes[/\\]terms
|
|
30
|
+
/(?:^|[/\\])(?:routes|pages|app)[/\\]docs\./i,
|
|
31
|
+
/(?:^|[/\\])(?:routes|pages|app)[/\\]privacy\./i,
|
|
32
|
+
/(?:^|[/\\])(?:routes|pages|app)[/\\]terms\./i,
|
|
31
33
|
];
|
|
32
34
|
const INTERNAL_ONLY_SKIP = new Set([
|
|
33
35
|
"Legal & Compliance",
|
|
@@ -132,7 +134,7 @@ export async function detectProjectContext(root, files) {
|
|
|
132
134
|
stacks.push("swift-ios");
|
|
133
135
|
reasoning.push("Detected Swift/iOS.");
|
|
134
136
|
}
|
|
135
|
-
if (pkgRaw && /react|vite|next|tanstack|svelte|vue
|
|
137
|
+
if (pkgRaw && /react|vite|next|tanstack|svelte|vue|angular|astro|nuxt|remix|gatsby/i.test(pkgRaw)) {
|
|
136
138
|
stacks.push("web-js");
|
|
137
139
|
reasoning.push("Detected web JavaScript/TypeScript stack.");
|
|
138
140
|
}
|
|
@@ -101,7 +101,21 @@ export async function runRepoChecks(root, _files, ctx) {
|
|
|
101
101
|
});
|
|
102
102
|
}
|
|
103
103
|
}
|
|
104
|
-
|
|
104
|
+
}
|
|
105
|
+
if (!skipLegalGlobally) {
|
|
106
|
+
if (ctx?.profile === "mobile-app") {
|
|
107
|
+
out.push({
|
|
108
|
+
id: "mobile-legal-reminder",
|
|
109
|
+
category: "Legal & Compliance",
|
|
110
|
+
severity: "medium",
|
|
111
|
+
file: "App Stores", line: 1,
|
|
112
|
+
message: "Verify Privacy Policy URL is configured in App Store / Google Play.",
|
|
113
|
+
why: "Mobile apps must link to external legal policies in the app stores. Code scanners cannot verify external links.",
|
|
114
|
+
fix: "Ensure your App Store Connect and Google Play Console entries have valid, accessible URLs to your privacy policy and terms.",
|
|
115
|
+
aiPrompt: "Remind me to update my App Store / Google Play developer console with the Privacy Policy link.",
|
|
116
|
+
});
|
|
117
|
+
}
|
|
118
|
+
else {
|
|
105
119
|
const legalFilePaths = _files.filter(f => {
|
|
106
120
|
const rel = path.relative(root, f);
|
|
107
121
|
return /terms|privacy|cookie|policy|legal|compliance|eula|tos/i.test(rel);
|
package/package.json
CHANGED