@aiready/cli 0.9.47 → 0.10.2

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.
Files changed (55) hide show
  1. package/.turbo/turbo-build.log +8 -8
  2. package/.turbo/turbo-test.log +6 -7
  3. package/dist/{chunk-6FOVC2OE.mjs → chunk-EQ2HQSTJ.mjs} +83 -61
  4. package/dist/{chunk-MEXEG3IJ.mjs → chunk-VUCNUYI7.mjs} +90 -62
  5. package/dist/cli.js +105 -75
  6. package/dist/cli.mjs +30 -25
  7. package/dist/index.js +86 -61
  8. package/dist/index.mjs +1 -1
  9. package/package.json +12 -12
  10. package/src/.aiready/aiready-report-20260305-153847.json +8015 -0
  11. package/src/.aiready/aiready-report-20260305-154121.json +8015 -0
  12. package/src/.aiready/aiready-report-20260305-160026.json +8015 -0
  13. package/src/.aiready/aiready-report-20260305-160752.json +8015 -0
  14. package/src/.aiready/aiready-report-20260305-163858.json +8015 -0
  15. package/src/.aiready/aiready-report-20260305-171001.json +8317 -0
  16. package/src/.aiready/aiready-report-20260305-201337.json +8317 -0
  17. package/src/__tests__/cli.test.ts +6 -6
  18. package/src/commands/scan.ts +27 -22
  19. package/src/commands/visualize.ts +3 -3
  20. package/src/index.ts +109 -90
  21. package/dist/__tests__/cli.test.d.ts +0 -2
  22. package/dist/__tests__/cli.test.d.ts.map +0 -1
  23. package/dist/__tests__/cli.test.js +0 -52
  24. package/dist/__tests__/cli.test.js.map +0 -1
  25. package/dist/agent-grounding-DAOSU4MF.mjs +0 -7
  26. package/dist/chunk-2LXCBVPN.mjs +0 -109
  27. package/dist/chunk-3SG2GLFJ.mjs +0 -118
  28. package/dist/chunk-5GZDRZ3T.mjs +0 -126
  29. package/dist/chunk-DEZVFBPS.mjs +0 -111
  30. package/dist/chunk-G6SDH7ZS.mjs +0 -126
  31. package/dist/chunk-HLBKROD3.mjs +0 -237
  32. package/dist/chunk-JQG7ZATX.mjs +0 -211
  33. package/dist/chunk-LLJMKNBI.mjs +0 -243
  34. package/dist/chunk-M7O2MEM5.mjs +0 -211
  35. package/dist/chunk-N4SLON5K.mjs +0 -152
  36. package/dist/chunk-OVELUOM6.mjs +0 -112
  37. package/dist/chunk-P3XAXCTK.mjs +0 -110
  38. package/dist/chunk-PDOONNSK.mjs +0 -228
  39. package/dist/chunk-QXQP6BMO.mjs +0 -109
  40. package/dist/chunk-RBWLQRKR.mjs +0 -39
  41. package/dist/chunk-XAF2EW5H.mjs +0 -46
  42. package/dist/chunk-Y6FXYEAI.mjs +0 -10
  43. package/dist/chunk-YIS6WTY5.mjs +0 -35
  44. package/dist/cli.d.mts +0 -1
  45. package/dist/cli.d.ts +0 -3
  46. package/dist/cli.d.ts.map +0 -1
  47. package/dist/cli.js.map +0 -1
  48. package/dist/deps-health-UWVYJ7FZ.mjs +0 -47
  49. package/dist/doc-drift-G7MGAZAE.mjs +0 -47
  50. package/dist/hallucination-risk-XU6E7IGN.mjs +0 -7
  51. package/dist/index.d.mts +0 -33
  52. package/dist/index.d.ts +0 -32
  53. package/dist/index.d.ts.map +0 -1
  54. package/dist/index.js.map +0 -1
  55. package/dist/testability-VDZJZ4MF.mjs +0 -7
package/dist/cli.js CHANGED
@@ -87,8 +87,11 @@ async function analyzeUnified(options) {
87
87
  if (options.progressCallback) {
88
88
  options.progressCallback({ tool: "patterns", data: patternResult });
89
89
  }
90
- result.patterns = sortBySeverity(patternResult.results);
91
- result.duplicates = patternResult.duplicates;
90
+ result.patternDetect = {
91
+ results: sortBySeverity(patternResult.results),
92
+ summary: patternResult.summary || {},
93
+ duplicates: patternResult.duplicates || []
94
+ };
92
95
  result.summary.totalIssues += patternResult.results.reduce(
93
96
  (sum, file) => sum + file.issues.length,
94
97
  0
@@ -99,13 +102,18 @@ async function analyzeUnified(options) {
99
102
  if (options.progressCallback) {
100
103
  options.progressCallback({ tool: "context", data: contextResults });
101
104
  }
102
- result.context = contextResults.sort((a, b) => {
105
+ const sorted = contextResults.sort((a, b) => {
103
106
  const severityDiff = (severityOrder[b.severity] || 0) - (severityOrder[a.severity] || 0);
104
107
  if (severityDiff !== 0) return severityDiff;
105
108
  if (a.tokenCost !== b.tokenCost) return b.tokenCost - a.tokenCost;
106
109
  return b.fragmentationScore - a.fragmentationScore;
107
110
  });
108
- result.summary.totalIssues += result.context?.length || 0;
111
+ const { generateSummary: genContextSummary } = await import("@aiready/context-analyzer");
112
+ result.contextAnalyzer = {
113
+ results: sorted,
114
+ summary: genContextSummary(sorted)
115
+ };
116
+ result.summary.totalIssues += sorted.length;
109
117
  }
110
118
  if (tools.includes("consistency")) {
111
119
  const consistencyOptions = {
@@ -118,10 +126,10 @@ async function analyzeUnified(options) {
118
126
  if (options.progressCallback) {
119
127
  options.progressCallback({ tool: "consistency", data: report });
120
128
  }
121
- if (report.results) {
122
- report.results = sortBySeverity(report.results);
123
- }
124
- result.consistency = report;
129
+ result.consistency = {
130
+ results: report.results ? sortBySeverity(report.results) : [],
131
+ summary: report.summary
132
+ };
125
133
  result.summary.totalIssues += report.summary.totalIssues;
126
134
  }
127
135
  if (tools.includes("doc-drift")) {
@@ -135,7 +143,10 @@ async function analyzeUnified(options) {
135
143
  if (options.progressCallback) {
136
144
  options.progressCallback({ tool: "doc-drift", data: report });
137
145
  }
138
- result.docDrift = report;
146
+ result.docDrift = {
147
+ results: report.results || [],
148
+ summary: report.summary || {}
149
+ };
139
150
  result.summary.totalIssues += report.issues?.length || 0;
140
151
  }
141
152
  if (tools.includes("deps-health")) {
@@ -149,10 +160,13 @@ async function analyzeUnified(options) {
149
160
  if (options.progressCallback) {
150
161
  options.progressCallback({ tool: "deps-health", data: report });
151
162
  }
152
- result.deps = report;
163
+ result.dependencyHealth = {
164
+ results: report.results || [],
165
+ summary: report.summary || {}
166
+ };
153
167
  result.summary.totalIssues += report.issues?.length || 0;
154
168
  }
155
- if (tools.includes("aiSignalClarity")) {
169
+ if (tools.includes("ai-signal-clarity")) {
156
170
  const { analyzeAiSignalClarity } = await import("@aiready/ai-signal-clarity");
157
171
  const report = await analyzeAiSignalClarity({
158
172
  rootDir: options.rootDir,
@@ -161,15 +175,19 @@ async function analyzeUnified(options) {
161
175
  onProgress: options.onProgress
162
176
  });
163
177
  if (options.progressCallback) {
164
- options.progressCallback({ tool: "aiSignalClarity", data: report });
178
+ options.progressCallback({ tool: "ai-signal-clarity", data: report });
165
179
  }
166
- result.aiSignalClarity = report;
180
+ result.aiSignalClarity = {
181
+ ...report,
182
+ results: report.results || [],
183
+ summary: report.summary || {}
184
+ };
167
185
  result.summary.totalIssues += report.results?.reduce(
168
186
  (sum, r) => sum + (r.issues?.length || 0),
169
187
  0
170
188
  ) || 0;
171
189
  }
172
- if (tools.includes("grounding")) {
190
+ if (tools.includes("agent-grounding")) {
173
191
  const { analyzeAgentGrounding } = await import("@aiready/agent-grounding");
174
192
  const report = await analyzeAgentGrounding({
175
193
  rootDir: options.rootDir,
@@ -178,9 +196,13 @@ async function analyzeUnified(options) {
178
196
  onProgress: options.onProgress
179
197
  });
180
198
  if (options.progressCallback) {
181
- options.progressCallback({ tool: "grounding", data: report });
199
+ options.progressCallback({ tool: "agent-grounding", data: report });
182
200
  }
183
- result.grounding = report;
201
+ result.agentGrounding = {
202
+ ...report,
203
+ results: report.results || [],
204
+ summary: report.summary || {}
205
+ };
184
206
  result.summary.totalIssues += report.issues?.length || 0;
185
207
  }
186
208
  if (tools.includes("testability")) {
@@ -194,10 +216,14 @@ async function analyzeUnified(options) {
194
216
  if (options.progressCallback) {
195
217
  options.progressCallback({ tool: "testability", data: report });
196
218
  }
197
- result.testability = report;
219
+ result.testability = {
220
+ ...report,
221
+ results: report.results || [],
222
+ summary: report.summary || {}
223
+ };
198
224
  result.summary.totalIssues += report.issues?.length || 0;
199
225
  }
200
- if (tools.includes("changeAmplification")) {
226
+ if (tools.includes("change-amplification")) {
201
227
  const { analyzeChangeAmplification } = await import("@aiready/change-amplification");
202
228
  const report = await analyzeChangeAmplification({
203
229
  rootDir: options.rootDir,
@@ -206,9 +232,12 @@ async function analyzeUnified(options) {
206
232
  onProgress: options.onProgress
207
233
  });
208
234
  if (options.progressCallback) {
209
- options.progressCallback({ tool: "changeAmplification", data: report });
235
+ options.progressCallback({ tool: "change-amplification", data: report });
210
236
  }
211
- result.changeAmplification = report;
237
+ result.changeAmplification = {
238
+ results: report.results || [],
239
+ summary: report.summary || {}
240
+ };
212
241
  result.summary.totalIssues += report.summary?.totalIssues || 0;
213
242
  }
214
243
  result.summary.executionTime = Date.now() - startTime;
@@ -216,14 +245,14 @@ async function analyzeUnified(options) {
216
245
  }
217
246
  async function scoreUnified(results, options) {
218
247
  const toolScores = /* @__PURE__ */ new Map();
219
- if (results.duplicates) {
248
+ if (results.patternDetect) {
220
249
  const { calculatePatternScore } = await import("@aiready/pattern-detect");
221
250
  try {
222
251
  const patternScore = calculatePatternScore(
223
- results.duplicates,
224
- results.patterns?.length || 0
252
+ results.patternDetect.duplicates,
253
+ results.patternDetect.results?.length || 0
225
254
  );
226
- const wastedTokens = results.duplicates.reduce(
255
+ const wastedTokens = results.patternDetect.duplicates.reduce(
227
256
  (sum, d) => sum + (d.tokenCost || 0),
228
257
  0
229
258
  );
@@ -241,10 +270,10 @@ async function scoreUnified(results, options) {
241
270
  void err;
242
271
  }
243
272
  }
244
- if (results.context) {
245
- const { generateSummary: genContextSummary, calculateContextScore } = await import("@aiready/context-analyzer");
273
+ if (results.contextAnalyzer) {
274
+ const { calculateContextScore } = await import("@aiready/context-analyzer");
246
275
  try {
247
- const ctxSummary = genContextSummary(results.context);
276
+ const ctxSummary = results.contextAnalyzer.summary;
248
277
  const contextScore = calculateContextScore(ctxSummary);
249
278
  contextScore.tokenBudget = (0, import_core.calculateTokenBudget)({
250
279
  totalContextTokens: ctxSummary.totalTokens,
@@ -279,10 +308,10 @@ async function scoreUnified(results, options) {
279
308
  void err;
280
309
  }
281
310
  }
282
- if (results.grounding) {
311
+ if (results.agentGrounding) {
283
312
  const { calculateGroundingScore } = await import("@aiready/agent-grounding");
284
313
  try {
285
- const agScore = calculateGroundingScore(results.grounding);
314
+ const agScore = calculateGroundingScore(results.agentGrounding);
286
315
  toolScores.set("agent-grounding", agScore);
287
316
  } catch (err) {
288
317
  void err;
@@ -300,10 +329,10 @@ async function scoreUnified(results, options) {
300
329
  if (results.docDrift) {
301
330
  toolScores.set("doc-drift", {
302
331
  toolName: "doc-drift",
303
- score: results.docDrift.summary.score,
304
- rawMetrics: results.docDrift.rawData,
332
+ score: results.docDrift.summary.score || results.docDrift.summary.totalScore || 0,
333
+ rawMetrics: results.docDrift.summary,
305
334
  factors: [],
306
- recommendations: (results.docDrift.recommendations || []).map(
335
+ recommendations: (results.docDrift.summary.recommendations || []).map(
307
336
  (action) => ({
308
337
  action,
309
338
  estimatedImpact: 5,
@@ -312,34 +341,30 @@ async function scoreUnified(results, options) {
312
341
  )
313
342
  });
314
343
  }
315
- if (results.deps) {
344
+ if (results.dependencyHealth) {
316
345
  toolScores.set("dependency-health", {
317
346
  toolName: "dependency-health",
318
- score: results.deps.summary.score,
319
- rawMetrics: results.deps.rawData,
347
+ score: results.dependencyHealth.summary.score || 0,
348
+ rawMetrics: results.dependencyHealth.summary,
320
349
  factors: [],
321
- recommendations: (results.deps.recommendations || []).map(
322
- (action) => ({
323
- action,
324
- estimatedImpact: 5,
325
- priority: "medium"
326
- })
327
- )
350
+ recommendations: (results.dependencyHealth.summary.recommendations || []).map((action) => ({
351
+ action,
352
+ estimatedImpact: 5,
353
+ priority: "medium"
354
+ }))
328
355
  });
329
356
  }
330
357
  if (results.changeAmplification) {
331
358
  toolScores.set("change-amplification", {
332
359
  toolName: "change-amplification",
333
- score: results.changeAmplification.summary.score,
334
- rawMetrics: results.changeAmplification.rawData,
360
+ score: results.changeAmplification.summary.score || 0,
361
+ rawMetrics: results.changeAmplification.summary,
335
362
  factors: [],
336
- recommendations: (results.changeAmplification.recommendations || []).map(
337
- (action) => ({
338
- action,
339
- estimatedImpact: 5,
340
- priority: "medium"
341
- })
342
- )
363
+ recommendations: (results.changeAmplification.summary.recommendations || []).map((action) => ({
364
+ action,
365
+ estimatedImpact: 5,
366
+ priority: "medium"
367
+ }))
343
368
  });
344
369
  }
345
370
  if (toolScores.size === 0) {
@@ -596,12 +621,12 @@ async function scanAction(directory, options) {
596
621
  "patterns",
597
622
  "context",
598
623
  "consistency",
599
- "aiSignalClarity",
600
- "grounding",
624
+ "ai-signal-clarity",
625
+ "agent-grounding",
601
626
  "testability",
602
627
  "doc-drift",
603
628
  "deps-health",
604
- "changeAmplification"
629
+ "change-amplification"
605
630
  ],
606
631
  include: void 0,
607
632
  exclude: void 0,
@@ -619,7 +644,11 @@ async function scanAction(directory, options) {
619
644
  if (options.profile) {
620
645
  switch (options.profile.toLowerCase()) {
621
646
  case "agentic":
622
- profileTools = ["aiSignalClarity", "grounding", "testability"];
647
+ profileTools = [
648
+ "ai-signal-clarity",
649
+ "agent-grounding",
650
+ "testability"
651
+ ];
623
652
  break;
624
653
  case "cost":
625
654
  profileTools = ["patterns", "context"];
@@ -628,7 +657,7 @@ async function scanAction(directory, options) {
628
657
  profileTools = ["consistency", "testability"];
629
658
  break;
630
659
  case "onboarding":
631
- profileTools = ["context", "consistency", "grounding"];
660
+ profileTools = ["context", "consistency", "agent-grounding"];
632
661
  break;
633
662
  default:
634
663
  console.log(
@@ -941,21 +970,22 @@ async function scanAction(directory, options) {
941
970
  console.log(
942
971
  ` Total issues (all tools): ${import_chalk3.default.bold(String(results.summary.totalIssues || 0))}`
943
972
  );
944
- if (results.duplicates)
973
+ if (results.patternDetect) {
945
974
  console.log(
946
- ` Duplicate patterns found: ${import_chalk3.default.bold(String(results.duplicates.length || 0))}`
975
+ ` Duplicate patterns found: ${import_chalk3.default.bold(String(results.patternDetect.duplicates?.length || 0))}`
947
976
  );
948
- if (results.patterns)
949
977
  console.log(
950
- ` Pattern files with issues: ${import_chalk3.default.bold(String(results.patterns.length || 0))}`
978
+ ` Pattern files with issues: ${import_chalk3.default.bold(String(results.patternDetect.results.length || 0))}`
951
979
  );
952
- if (results.context)
980
+ }
981
+ if (results.contextAnalyzer)
953
982
  console.log(
954
- ` Context issues: ${import_chalk3.default.bold(String(results.context.length || 0))}`
983
+ ` Context issues: ${import_chalk3.default.bold(String(results.contextAnalyzer.results.length || 0))}`
984
+ );
985
+ if (results.consistency)
986
+ console.log(
987
+ ` Consistency issues: ${import_chalk3.default.bold(String(results.consistency.summary?.totalIssues || 0))}`
955
988
  );
956
- console.log(
957
- ` Consistency issues: ${import_chalk3.default.bold(String(results.consistency?.summary?.totalIssues || 0))}`
958
- );
959
989
  if (results.changeAmplification)
960
990
  console.log(
961
991
  ` Change amplification: ${import_chalk3.default.bold(String(results.changeAmplification.summary?.score || 0))}/100`
@@ -1177,8 +1207,8 @@ async function scanAction(directory, options) {
1177
1207
  `::notice::AI Readiness Score: ${scoringResult.overall}/100 (threshold: ${threshold})`
1178
1208
  );
1179
1209
  }
1180
- if (results.patterns) {
1181
- const criticalPatterns = results.patterns.flatMap(
1210
+ if (results.patternDetect) {
1211
+ const criticalPatterns = results.patternDetect.results.flatMap(
1182
1212
  (p) => p.issues.filter((i) => i.severity === "critical")
1183
1213
  );
1184
1214
  criticalPatterns.slice(0, 10).forEach((issue) => {
@@ -1199,21 +1229,21 @@ async function scanAction(directory, options) {
1199
1229
  const minSeverity = severityLevels[failOnLevel] || 4;
1200
1230
  let criticalCount = 0;
1201
1231
  let majorCount = 0;
1202
- if (results.patterns) {
1203
- results.patterns.forEach((p) => {
1232
+ if (results.patternDetect) {
1233
+ results.patternDetect.results.forEach((p) => {
1204
1234
  p.issues.forEach((i) => {
1205
1235
  if (i.severity === "critical") criticalCount++;
1206
1236
  if (i.severity === "major") majorCount++;
1207
1237
  });
1208
1238
  });
1209
1239
  }
1210
- if (results.context) {
1211
- results.context.forEach((c) => {
1240
+ if (results.contextAnalyzer) {
1241
+ results.contextAnalyzer.results.forEach((c) => {
1212
1242
  if (c.severity === "critical") criticalCount++;
1213
1243
  if (c.severity === "major") majorCount++;
1214
1244
  });
1215
1245
  }
1216
- if (results.consistency?.results) {
1246
+ if (results.consistency) {
1217
1247
  results.consistency.results.forEach((r) => {
1218
1248
  r.issues?.forEach((i) => {
1219
1249
  if (i.severity === "critical") criticalCount++;
@@ -1865,11 +1895,11 @@ Or specify a custom report:
1865
1895
  let devServerStarted = false;
1866
1896
  if (useDevMode) {
1867
1897
  try {
1868
- const monorepoWebDir = (0, import_path7.resolve)(dirPath, "packages/visualizer");
1898
+ const localWebDir = (0, import_path7.resolve)(dirPath, "packages/visualizer");
1869
1899
  let webDir = "";
1870
1900
  let visualizerAvailable = false;
1871
- if ((0, import_fs5.existsSync)(monorepoWebDir)) {
1872
- webDir = monorepoWebDir;
1901
+ if ((0, import_fs5.existsSync)(localWebDir)) {
1902
+ webDir = localWebDir;
1873
1903
  visualizerAvailable = true;
1874
1904
  } else {
1875
1905
  const nodemodulesLocations = [
package/dist/cli.mjs CHANGED
@@ -3,7 +3,7 @@ import {
3
3
  __require,
4
4
  analyzeUnified,
5
5
  scoreUnified
6
- } from "./chunk-6FOVC2OE.mjs";
6
+ } from "./chunk-VUCNUYI7.mjs";
7
7
 
8
8
  // src/cli.ts
9
9
  import { Command } from "commander";
@@ -268,12 +268,12 @@ async function scanAction(directory, options) {
268
268
  "patterns",
269
269
  "context",
270
270
  "consistency",
271
- "aiSignalClarity",
272
- "grounding",
271
+ "ai-signal-clarity",
272
+ "agent-grounding",
273
273
  "testability",
274
274
  "doc-drift",
275
275
  "deps-health",
276
- "changeAmplification"
276
+ "change-amplification"
277
277
  ],
278
278
  include: void 0,
279
279
  exclude: void 0,
@@ -291,7 +291,11 @@ async function scanAction(directory, options) {
291
291
  if (options.profile) {
292
292
  switch (options.profile.toLowerCase()) {
293
293
  case "agentic":
294
- profileTools = ["aiSignalClarity", "grounding", "testability"];
294
+ profileTools = [
295
+ "ai-signal-clarity",
296
+ "agent-grounding",
297
+ "testability"
298
+ ];
295
299
  break;
296
300
  case "cost":
297
301
  profileTools = ["patterns", "context"];
@@ -300,7 +304,7 @@ async function scanAction(directory, options) {
300
304
  profileTools = ["consistency", "testability"];
301
305
  break;
302
306
  case "onboarding":
303
- profileTools = ["context", "consistency", "grounding"];
307
+ profileTools = ["context", "consistency", "agent-grounding"];
304
308
  break;
305
309
  default:
306
310
  console.log(
@@ -613,21 +617,22 @@ async function scanAction(directory, options) {
613
617
  console.log(
614
618
  ` Total issues (all tools): ${chalk3.bold(String(results.summary.totalIssues || 0))}`
615
619
  );
616
- if (results.duplicates)
620
+ if (results.patternDetect) {
617
621
  console.log(
618
- ` Duplicate patterns found: ${chalk3.bold(String(results.duplicates.length || 0))}`
622
+ ` Duplicate patterns found: ${chalk3.bold(String(results.patternDetect.duplicates?.length || 0))}`
619
623
  );
620
- if (results.patterns)
621
624
  console.log(
622
- ` Pattern files with issues: ${chalk3.bold(String(results.patterns.length || 0))}`
625
+ ` Pattern files with issues: ${chalk3.bold(String(results.patternDetect.results.length || 0))}`
623
626
  );
624
- if (results.context)
627
+ }
628
+ if (results.contextAnalyzer)
625
629
  console.log(
626
- ` Context issues: ${chalk3.bold(String(results.context.length || 0))}`
630
+ ` Context issues: ${chalk3.bold(String(results.contextAnalyzer.results.length || 0))}`
631
+ );
632
+ if (results.consistency)
633
+ console.log(
634
+ ` Consistency issues: ${chalk3.bold(String(results.consistency.summary?.totalIssues || 0))}`
627
635
  );
628
- console.log(
629
- ` Consistency issues: ${chalk3.bold(String(results.consistency?.summary?.totalIssues || 0))}`
630
- );
631
636
  if (results.changeAmplification)
632
637
  console.log(
633
638
  ` Change amplification: ${chalk3.bold(String(results.changeAmplification.summary?.score || 0))}/100`
@@ -849,8 +854,8 @@ async function scanAction(directory, options) {
849
854
  `::notice::AI Readiness Score: ${scoringResult.overall}/100 (threshold: ${threshold})`
850
855
  );
851
856
  }
852
- if (results.patterns) {
853
- const criticalPatterns = results.patterns.flatMap(
857
+ if (results.patternDetect) {
858
+ const criticalPatterns = results.patternDetect.results.flatMap(
854
859
  (p) => p.issues.filter((i) => i.severity === "critical")
855
860
  );
856
861
  criticalPatterns.slice(0, 10).forEach((issue) => {
@@ -871,21 +876,21 @@ async function scanAction(directory, options) {
871
876
  const minSeverity = severityLevels[failOnLevel] || 4;
872
877
  let criticalCount = 0;
873
878
  let majorCount = 0;
874
- if (results.patterns) {
875
- results.patterns.forEach((p) => {
879
+ if (results.patternDetect) {
880
+ results.patternDetect.results.forEach((p) => {
876
881
  p.issues.forEach((i) => {
877
882
  if (i.severity === "critical") criticalCount++;
878
883
  if (i.severity === "major") majorCount++;
879
884
  });
880
885
  });
881
886
  }
882
- if (results.context) {
883
- results.context.forEach((c) => {
887
+ if (results.contextAnalyzer) {
888
+ results.contextAnalyzer.results.forEach((c) => {
884
889
  if (c.severity === "critical") criticalCount++;
885
890
  if (c.severity === "major") majorCount++;
886
891
  });
887
892
  }
888
- if (results.consistency?.results) {
893
+ if (results.consistency) {
889
894
  results.consistency.results.forEach((r) => {
890
895
  r.issues?.forEach((i) => {
891
896
  if (i.severity === "critical") criticalCount++;
@@ -1558,11 +1563,11 @@ Or specify a custom report:
1558
1563
  let devServerStarted = false;
1559
1564
  if (useDevMode) {
1560
1565
  try {
1561
- const monorepoWebDir = resolvePath7(dirPath, "packages/visualizer");
1566
+ const localWebDir = resolvePath7(dirPath, "packages/visualizer");
1562
1567
  let webDir = "";
1563
1568
  let visualizerAvailable = false;
1564
- if (existsSync2(monorepoWebDir)) {
1565
- webDir = monorepoWebDir;
1569
+ if (existsSync2(localWebDir)) {
1570
+ webDir = localWebDir;
1566
1571
  visualizerAvailable = true;
1567
1572
  } else {
1568
1573
  const nodemodulesLocations = [