@aiready/cli 0.12.23 ā 0.13.1
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/.turbo/turbo-build.log +8 -8
- package/.turbo/turbo-test.log +17 -17
- package/CONTRIBUTING.md +1 -1
- package/README.md +7 -1
- package/dist/cli.js +10 -1
- package/dist/cli.mjs +12 -2
- package/docs/SPOKE_GUIDE.md +184 -0
- package/package.json +12 -12
- package/src/.aiready/aiready-report-20260310-153526.json +34441 -0
- package/src/.aiready/aiready-report-20260310-155555.json +34441 -0
- package/src/.aiready/aiready-report-20260310-162403.json +34441 -0
- package/src/.aiready/aiready-report-20260310-183821.json +34448 -0
- package/src/.aiready/aiready-report-20260311-010454.json +34448 -0
- package/src/.aiready/aiready-report-20260311-193858.json +34448 -0
- package/src/commands/__tests__/scan.test.ts +4 -0
- package/src/commands/scan.ts +12 -2
|
@@ -128,6 +128,10 @@ describe('Scan CLI Action', () => {
|
|
|
128
128
|
expect(consoleSpy).toHaveBeenCalledWith(
|
|
129
129
|
expect.stringContaining('PR BLOCKED')
|
|
130
130
|
);
|
|
131
|
+
// Verify annotations are emitted
|
|
132
|
+
expect(consoleSpy).toHaveBeenCalledWith(
|
|
133
|
+
expect.stringContaining('Emitting GitHub Action annotations')
|
|
134
|
+
);
|
|
131
135
|
exitSpy.mockRestore();
|
|
132
136
|
});
|
|
133
137
|
|
package/src/commands/scan.ts
CHANGED
|
@@ -23,6 +23,7 @@ import {
|
|
|
23
23
|
IssueType,
|
|
24
24
|
ToolName,
|
|
25
25
|
ToolRegistry,
|
|
26
|
+
emitIssuesAsAnnotations,
|
|
26
27
|
} from '@aiready/core';
|
|
27
28
|
import { analyzeUnified, scoreUnified, type ScoringResult } from '../index';
|
|
28
29
|
import {
|
|
@@ -402,12 +403,21 @@ export async function scanAction(directory: string, options: ScanOptions) {
|
|
|
402
403
|
let shouldFail = false;
|
|
403
404
|
let failReason = '';
|
|
404
405
|
|
|
406
|
+
// Emit annotations for all issues found
|
|
407
|
+
const report = mapToUnifiedReport(results, scoringResult);
|
|
408
|
+
if (report.results && report.results.length > 0) {
|
|
409
|
+
console.log(
|
|
410
|
+
chalk.cyan(
|
|
411
|
+
`\nš Emitting GitHub Action annotations for ${report.results.length} issues...`
|
|
412
|
+
)
|
|
413
|
+
);
|
|
414
|
+
emitIssuesAsAnnotations(report.results);
|
|
415
|
+
}
|
|
416
|
+
|
|
405
417
|
if (threshold && scoringResult.overall < threshold) {
|
|
406
418
|
shouldFail = true;
|
|
407
419
|
failReason = `Score ${scoringResult.overall} < threshold ${threshold}`;
|
|
408
420
|
}
|
|
409
|
-
|
|
410
|
-
const report = mapToUnifiedReport(results, scoringResult);
|
|
411
421
|
if (failOnLevel !== 'none') {
|
|
412
422
|
if (failOnLevel === 'critical' && report.summary.criticalIssues > 0) {
|
|
413
423
|
shouldFail = true;
|