periderm-cli 0.1.26 → 0.1.27

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
File without changes
@@ -40,16 +40,29 @@ export async function runRepoChecks(root, _files) {
40
40
  }
41
41
  // .env.example
42
42
  if (!(await has(".env.example"))) {
43
- out.push({
44
- id: "missing-env-example",
45
- category: "Deployment & Testing Readiness",
46
- severity: "medium",
47
- file: ".env.example", line: 1,
48
- message: ".env.example is missing.",
49
- why: "Anyone cloning the repo has to guess which env vars are required.",
50
- fix: "Create a .env.example listing every env var with a placeholder value (no secrets).",
51
- aiPrompt: "Scan the codebase for process.env.* and import.meta.env.* reads and produce a .env.example file listing every variable found with placeholder values.",
52
- });
43
+ let usesEnvVars = false;
44
+ for (const abs of _files) {
45
+ const rel = path.relative(root, abs);
46
+ if (!/\.(tsx|jsx|ts|js|mjs|cjs|svelte|vue|astro)$/.test(rel))
47
+ continue;
48
+ const chunk = await readMaybe(abs);
49
+ if (chunk && /(process\.env|import\.meta\.env)/.test(chunk)) {
50
+ usesEnvVars = true;
51
+ break;
52
+ }
53
+ }
54
+ if (usesEnvVars) {
55
+ out.push({
56
+ id: "missing-env-example",
57
+ category: "Deployment & Testing Readiness",
58
+ severity: "medium",
59
+ file: ".env.example", line: 1,
60
+ message: ".env.example is missing.",
61
+ why: "Anyone cloning the repo has to guess which env vars are required.",
62
+ fix: "Create a .env.example listing every env var with a placeholder value (no secrets).",
63
+ aiPrompt: "Scan the codebase for process.env.* and import.meta.env.* reads and produce a .env.example file listing every variable found with placeholder values.",
64
+ });
65
+ }
53
66
  }
54
67
  // public dir favicon
55
68
  const pkgRaw = await readMaybe(path.join(root, "package.json"));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "periderm-cli",
3
- "version": "0.1.26",
3
+ "version": "0.1.27",
4
4
  "description": "A pre-launch checklist for your codebase. Scan JS, TS, JSX, and TSX projects before you ship.",
5
5
  "type": "module",
6
6
  "bin": {
@@ -36,6 +36,12 @@
36
36
  },
37
37
  "author": "Periderm",
38
38
  "license": "MIT",
39
+ "scripts": {
40
+ "build": "tsc -p tsconfig.json && chmod +x dist/bin.js",
41
+ "postpublish": "cd ../../ && tsx --env-file=.env scripts/broadcast-update.ts",
42
+ "dev": "tsx src/index.ts",
43
+ "start": "node dist/index.js"
44
+ },
39
45
  "dependencies": {
40
46
  "@babel/parser": "^7.25.0",
41
47
  "@babel/traverse": "^7.25.0",
@@ -54,10 +60,5 @@
54
60
  },
55
61
  "engines": {
56
62
  "node": ">=18"
57
- },
58
- "scripts": {
59
- "build": "tsc -p tsconfig.json && chmod +x dist/bin.js",
60
- "dev": "tsx src/index.ts",
61
- "start": "node dist/index.js"
62
63
  }
63
- }
64
+ }