periderm-cli 0.1.37 → 0.1.38

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.
@@ -119,7 +119,8 @@ export function renderMarkdown(r) {
119
119
  lines.push(`You are reviewing a Periderm CLI scan: Launch Confidence ${r.scores.confidence}/100, Reality ${r.scores.reality}/100, Perceived ${r.scores.perceived}/100 — verdict ${verdictLabel}.`);
120
120
  lines.push(`There are ${r.counts.critical} critical, ${r.counts.high} high, ${r.counts.medium} medium, ${r.counts.low} low findings.`);
121
121
  lines.push(`Fix them in priority order. For each finding, open the listed file, apply the Exact fix, and keep the change minimal.`);
122
- lines.push(`IMPORTANT: Before you begin, read the instructions in \`.periderm/ai-instructions.md\` for the full iterative process on how to run the scanner, verify fixes, and handle any authentication requirements.`);
122
+ const aiInstructionsPath = process.cwd() + "/.periderm/ai-instructions.md";
123
+ lines.push(`IMPORTANT: Before you begin, read the instructions in \`${aiInstructionsPath}\` for the full iterative process on how to run the scanner, verify fixes, and handle any authentication requirements.`);
123
124
  lines.push("```");
124
125
  lines.push("");
125
126
  // Hidden watermark — only visible in raw .md source
@@ -784,7 +784,7 @@ const formInputNoLabel = (source, file) => {
784
784
  severity: "high",
785
785
  file, line: lineOf(source, m.index),
786
786
  message: `<${tag}> has no associated <label> or aria-label.`,
787
- why: "Screen readers announce the field with no name. Users have no idea what to type. Violates WCAG 2.1 SC 1.3.1 & 3.3.2.",
787
+ why: "Screen readers announce the field with no name. Disabled users have no idea what to type. Violates WCAG 2.1 SC 1.3.1 & 3.3.2.",
788
788
  fix: "Either wrap the field in a <label>, add htmlFor={id}, or set aria-label=\"...\" on the field itself.",
789
789
  aiPrompt: `In ${file} near line ${lineOf(source, m.index)}, the <${tag}> is missing a label. Add a <label htmlFor="..."> or aria-label describing what the user should enter.`,
790
790
  }));
@@ -217,7 +217,7 @@ export async function runRepoChecks(root, _files, ctx) {
217
217
  // "is this dep actually imported anywhere?" and "is this class used?".
218
218
  let importHaystack = "";
219
219
  for (const abs of _files) {
220
- if (!/\.(tsx|jsx|ts|js|mjs|cjs|svelte|vue|astro|mdx?)$/.test(abs))
220
+ if (!/\.(tsx|jsx|ts|js|mjs|cjs|svelte|vue|astro|mdx?|css|scss)$/.test(abs))
221
221
  continue;
222
222
  const chunk = await readMaybe(abs);
223
223
  if (chunk)
@@ -283,7 +283,7 @@ export async function runRepoChecks(root, _files, ctx) {
283
283
  continue;
284
284
  // Sub-path imports still start with the package name
285
285
  const escaped = dep.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
286
- const re = new RegExp(`(?:from\\s+["']|require\\(["']|import\\(\\s*["'])${escaped}(?:["']|/)`);
286
+ const re = new RegExp(`(?:from\\s+["']|require\\(["']|import\\(\\s*["']|import\\s+["']|@import\\s+["'])${escaped}(?:["']|/)`);
287
287
  if (!re.test(importHaystack))
288
288
  unused.push(dep);
289
289
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "periderm-cli",
3
- "version": "0.1.37",
3
+ "version": "0.1.38",
4
4
  "description": "Pre-launch scanner for web and mobile codebases. Context-aware checks for JS, TS, Flutter, React Native, and Swift.",
5
5
  "type": "module",
6
6
  "bin": {