@vibecheckai/cli 3.3.0 → 3.4.0

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.
@@ -13,6 +13,44 @@ const t = require("@babel/types");
13
13
  const { routeMatches } = require("./claims");
14
14
  const { matcherCoversPath } = require("./auth-truth");
15
15
 
16
+ /* ============================================================================
17
+ * STANDARD IGNORE PATTERNS
18
+ * Used by all analyzers to exclude non-production code
19
+ * ========================================================================== */
20
+ const STANDARD_IGNORE_PATTERNS = [
21
+ // Core excludes
22
+ "**/node_modules/**",
23
+ "**/.next/**",
24
+ "**/dist/**",
25
+ "**/build/**",
26
+ "**/*.d.ts",
27
+ "**/*.d.ts.map",
28
+ // Test files
29
+ "**/__tests__/**",
30
+ "**/tests/**",
31
+ "**/*.test.ts",
32
+ "**/*.test.tsx",
33
+ "**/*.test.js",
34
+ "**/*.spec.ts",
35
+ "**/*.spec.tsx",
36
+ "**/*.spec.js",
37
+ "**/fixtures/**",
38
+ // Internal tooling
39
+ "**/mcp-server/**",
40
+ "**/bin/**",
41
+ "**/packages/cli/**",
42
+ // Examples and templates
43
+ "**/examples/**",
44
+ "**/templates/**",
45
+ "**/docs/**",
46
+ // Cache and generated
47
+ "**/.guardrail/**",
48
+ "**/.cursor/**",
49
+ "**/.vibecheck/**",
50
+ "**/coverage/**",
51
+ "**/_archive/**",
52
+ ];
53
+
16
54
  /* ============================================================================
17
55
  * WORLD-CLASS INFRA HELPERS
18
56
  * - file caching (speed + consistent evidence)
@@ -914,7 +952,7 @@ function findFakeSuccess(repoRoot) {
914
952
  const files = fg.sync(["**/*.{ts,tsx,js,jsx}"], {
915
953
  cwd: repoRoot,
916
954
  absolute: true,
917
- ignore: ["**/node_modules/**", "**/.next/**", "**/dist/**", "**/build/**"],
955
+ ignore: STANDARD_IGNORE_PATTERNS,
918
956
  });
919
957
 
920
958
  for (const fileAbs of files) {
@@ -1205,7 +1243,7 @@ function findOwnerModeBypass(repoRoot) {
1205
1243
  const files = fg.sync(["**/*.{ts,tsx,js,jsx}"], {
1206
1244
  cwd: repoRoot,
1207
1245
  absolute: true,
1208
- ignore: ["**/node_modules/**", "**/.next/**", "**/dist/**", "**/build/**"],
1246
+ ignore: STANDARD_IGNORE_PATTERNS,
1209
1247
  });
1210
1248
 
1211
1249
  const patterns = [
@@ -1250,17 +1288,7 @@ function findMockData(repoRoot) {
1250
1288
  const files = fg.sync(["**/*.{ts,tsx,js,jsx}"], {
1251
1289
  cwd: repoRoot,
1252
1290
  absolute: true,
1253
- ignore: [
1254
- "**/node_modules/**",
1255
- "**/.next/**",
1256
- "**/dist/**",
1257
- "**/build/**",
1258
- "**/*.test.*",
1259
- "**/*.spec.*",
1260
- "**/tests/**",
1261
- "**/test/**",
1262
- "**/__tests__/**",
1263
- ],
1291
+ ignore: STANDARD_IGNORE_PATTERNS,
1264
1292
  });
1265
1293
 
1266
1294
  for (const fileAbs of files) {
@@ -1311,13 +1339,7 @@ function findTodoFixme(repoRoot) {
1311
1339
  const files = fg.sync(["**/*.{ts,tsx,js,jsx}"], {
1312
1340
  cwd: repoRoot,
1313
1341
  absolute: true,
1314
- ignore: [
1315
- "**/node_modules/**",
1316
- "**/.next/**",
1317
- "**/dist/**",
1318
- "**/build/**",
1319
- "**/*.d.ts",
1320
- ],
1342
+ ignore: STANDARD_IGNORE_PATTERNS,
1321
1343
  });
1322
1344
 
1323
1345
  for (const fileAbs of files) {
@@ -1384,13 +1406,7 @@ function findConsoleLogs(repoRoot) {
1384
1406
  const files = fg.sync(["**/*.{ts,tsx,js,jsx}"], {
1385
1407
  cwd: repoRoot,
1386
1408
  absolute: true,
1387
- ignore: [
1388
- "**/node_modules/**",
1389
- "**/.next/**",
1390
- "**/dist/**",
1391
- "**/build/**",
1392
- "**/*.d.ts",
1393
- ],
1409
+ ignore: STANDARD_IGNORE_PATTERNS,
1394
1410
  });
1395
1411
 
1396
1412
  for (const fileAbs of files) {
@@ -1436,16 +1452,7 @@ function findHardcodedSecrets(repoRoot) {
1436
1452
  const files = fg.sync(["**/*.{ts,tsx,js,jsx,json}"], {
1437
1453
  cwd: repoRoot,
1438
1454
  absolute: true,
1439
- ignore: [
1440
- "**/node_modules/**",
1441
- "**/.next/**",
1442
- "**/dist/**",
1443
- "**/build/**",
1444
- "**/package*.json",
1445
- "**/*.test.*",
1446
- "**/tests/**",
1447
- "**/*.d.ts",
1448
- ],
1455
+ ignore: [...STANDARD_IGNORE_PATTERNS, "**/package*.json"],
1449
1456
  });
1450
1457
 
1451
1458
  for (const fileAbs of files) {
@@ -1502,13 +1509,7 @@ function findDeadCode(repoRoot) {
1502
1509
  const files = fg.sync(["**/*.{ts,tsx,js,jsx}"], {
1503
1510
  cwd: repoRoot,
1504
1511
  absolute: true,
1505
- ignore: [
1506
- "**/node_modules/**",
1507
- "**/.next/**",
1508
- "**/dist/**",
1509
- "**/build/**",
1510
- "**/*.d.ts",
1511
- ],
1512
+ ignore: STANDARD_IGNORE_PATTERNS,
1512
1513
  });
1513
1514
 
1514
1515
  for (const fileAbs of files) {
@@ -1554,13 +1555,7 @@ function findDeprecatedApis(repoRoot) {
1554
1555
  const files = fg.sync(["**/*.{ts,tsx,js,jsx}"], {
1555
1556
  cwd: repoRoot,
1556
1557
  absolute: true,
1557
- ignore: [
1558
- "**/node_modules/**",
1559
- "**/.next/**",
1560
- "**/dist/**",
1561
- "**/build/**",
1562
- "**/*.d.ts",
1563
- ],
1558
+ ignore: STANDARD_IGNORE_PATTERNS,
1564
1559
  });
1565
1560
 
1566
1561
  for (const fileAbs of files) {
@@ -1606,13 +1601,7 @@ function findEmptyCatch(repoRoot) {
1606
1601
  const files = fg.sync(["**/*.{ts,tsx,js,jsx}"], {
1607
1602
  cwd: repoRoot,
1608
1603
  absolute: true,
1609
- ignore: [
1610
- "**/node_modules/**",
1611
- "**/.next/**",
1612
- "**/dist/**",
1613
- "**/build/**",
1614
- "**/*.d.ts",
1615
- ],
1604
+ ignore: STANDARD_IGNORE_PATTERNS,
1616
1605
  });
1617
1606
 
1618
1607
  for (const fileAbs of files) {
@@ -1658,13 +1647,7 @@ function findUnsafeRegex(repoRoot) {
1658
1647
  const files = fg.sync(["**/*.{ts,tsx,js,jsx}"], {
1659
1648
  cwd: repoRoot,
1660
1649
  absolute: true,
1661
- ignore: [
1662
- "**/node_modules/**",
1663
- "**/.next/**",
1664
- "**/dist/**",
1665
- "**/build/**",
1666
- "**/*.d.ts",
1667
- ],
1650
+ ignore: STANDARD_IGNORE_PATTERNS,
1668
1651
  });
1669
1652
 
1670
1653
  for (const fileAbs of files) {
@@ -1712,13 +1695,7 @@ function findSecurityVulnerabilities(repoRoot) {
1712
1695
  const files = fg.sync(["**/*.{ts,tsx,js,jsx}"], {
1713
1696
  cwd: repoRoot,
1714
1697
  absolute: true,
1715
- ignore: [
1716
- "**/node_modules/**",
1717
- "**/.next/**",
1718
- "**/dist/**",
1719
- "**/build/**",
1720
- "**/*.d.ts",
1721
- ],
1698
+ ignore: STANDARD_IGNORE_PATTERNS,
1722
1699
  });
1723
1700
 
1724
1701
  for (const fileAbs of files) {
@@ -1762,13 +1739,7 @@ function findPerformanceIssues(repoRoot) {
1762
1739
  const files = fg.sync(["**/*.{ts,tsx,js,jsx}"], {
1763
1740
  cwd: repoRoot,
1764
1741
  absolute: true,
1765
- ignore: [
1766
- "**/node_modules/**",
1767
- "**/.next/**",
1768
- "**/dist/**",
1769
- "**/build/**",
1770
- "**/*.d.ts",
1771
- ],
1742
+ ignore: STANDARD_IGNORE_PATTERNS,
1772
1743
  });
1773
1744
 
1774
1745
  for (const fileAbs of files) {
@@ -1813,13 +1784,7 @@ function findCodeQualityIssues(repoRoot) {
1813
1784
  const files = fg.sync(["**/*.{ts,tsx,js,jsx}"], {
1814
1785
  cwd: repoRoot,
1815
1786
  absolute: true,
1816
- ignore: [
1817
- "**/node_modules/**",
1818
- "**/.next/**",
1819
- "**/dist/**",
1820
- "**/build/**",
1821
- "**/*.d.ts",
1822
- ],
1787
+ ignore: STANDARD_IGNORE_PATTERNS,
1823
1788
  });
1824
1789
 
1825
1790
  for (const fileAbs of files) {
@@ -1865,16 +1830,7 @@ function findCrossFileIssues(repoRoot) {
1865
1830
  const files = fg.sync(["**/*.{ts,tsx,js,jsx}"], {
1866
1831
  cwd: repoRoot,
1867
1832
  absolute: true,
1868
- ignore: [
1869
- "**/node_modules/**",
1870
- "**/.next/**",
1871
- "**/dist/**",
1872
- "**/build/**",
1873
- "**/*.d.ts",
1874
- "**/*.test.*",
1875
- "**/*.spec.*",
1876
- "**/tests/**",
1877
- ],
1833
+ ignore: STANDARD_IGNORE_PATTERNS,
1878
1834
  });
1879
1835
 
1880
1836
  const engineFindings = analyzeCrossFile(files, repoRoot);
@@ -1909,13 +1865,7 @@ function findTypeSafetyIssues(repoRoot) {
1909
1865
  const files = fg.sync(["**/*.{ts,tsx,js,jsx}"], {
1910
1866
  cwd: repoRoot,
1911
1867
  absolute: true,
1912
- ignore: [
1913
- "**/node_modules/**",
1914
- "**/.next/**",
1915
- "**/dist/**",
1916
- "**/build/**",
1917
- "**/*.d.ts",
1918
- ],
1868
+ ignore: STANDARD_IGNORE_PATTERNS,
1919
1869
  });
1920
1870
 
1921
1871
  for (const fileAbs of files) {
@@ -1959,16 +1909,7 @@ function findAccessibilityIssues(repoRoot) {
1959
1909
  const files = fg.sync(["**/*.{tsx,jsx}"], {
1960
1910
  cwd: repoRoot,
1961
1911
  absolute: true,
1962
- ignore: [
1963
- "**/node_modules/**",
1964
- "**/.next/**",
1965
- "**/dist/**",
1966
- "**/build/**",
1967
- "**/*.d.ts",
1968
- "**/*.test.*",
1969
- "**/*.spec.*",
1970
- "**/tests/**",
1971
- ],
1912
+ ignore: STANDARD_IGNORE_PATTERNS,
1972
1913
  });
1973
1914
 
1974
1915
  for (const fileAbs of files) {
@@ -2012,16 +1953,7 @@ function findAPIConsistencyIssues(repoRoot) {
2012
1953
  const files = fg.sync(["**/*.{ts,tsx,js,jsx}"], {
2013
1954
  cwd: repoRoot,
2014
1955
  absolute: true,
2015
- ignore: [
2016
- "**/node_modules/**",
2017
- "**/.next/**",
2018
- "**/dist/**",
2019
- "**/build/**",
2020
- "**/*.d.ts",
2021
- "**/*.test.*",
2022
- "**/*.spec.*",
2023
- "**/tests/**",
2024
- ],
1956
+ ignore: STANDARD_IGNORE_PATTERNS,
2025
1957
  });
2026
1958
 
2027
1959
  for (const fileAbs of files) {