@aiready/change-amplification 0.14.6 → 0.14.8
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 +24 -23
- package/.turbo/turbo-format-check.log +7 -0
- package/.turbo/turbo-lint.log +5 -4
- package/.turbo/turbo-test.log +24 -22
- package/.turbo/turbo-type-check.log +5 -0
- package/dist/cli.d.mts +7 -1
- package/dist/cli.d.ts +7 -1
- package/dist/index.d.mts +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/index.mjs +4 -1
- package/package.json +5 -3
- package/src/analyzer.ts +1 -1
- package/src/cli.ts +17 -5
- package/src/scoring.ts +6 -2
package/.turbo/turbo-build.log
CHANGED
|
@@ -1,23 +1,24 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
>
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
DTS
|
|
20
|
-
DTS
|
|
21
|
-
DTS dist/
|
|
22
|
-
DTS dist/
|
|
23
|
-
DTS dist/
|
|
1
|
+
|
|
2
|
+
|
|
3
|
+
> @aiready/change-amplification@0.14.8 build /Users/pengcao/projects/aiready/packages/change-amplification
|
|
4
|
+
> tsup src/index.ts src/cli.ts --format cjs,esm --dts
|
|
5
|
+
|
|
6
|
+
[34mCLI[39m Building entry: src/cli.ts, src/index.ts
|
|
7
|
+
[34mCLI[39m Using tsconfig: tsconfig.json
|
|
8
|
+
[34mCLI[39m tsup v8.5.1
|
|
9
|
+
[34mCLI[39m Target: es2020
|
|
10
|
+
[34mCJS[39m Build start
|
|
11
|
+
[34mESM[39m Build start
|
|
12
|
+
[32mESM[39m [1mdist/cli.mjs [22m[32m2.41 KB[39m
|
|
13
|
+
[32mESM[39m [1mdist/index.mjs [22m[32m1.53 KB[39m
|
|
14
|
+
[32mESM[39m [1mdist/chunk-SPXGOPNW.mjs [22m[32m4.83 KB[39m
|
|
15
|
+
[32mESM[39m ⚡️ Build success in 65ms
|
|
16
|
+
[32mCJS[39m [1mdist/cli.js [22m[32m8.51 KB[39m
|
|
17
|
+
[32mCJS[39m [1mdist/index.js [22m[32m7.74 KB[39m
|
|
18
|
+
[32mCJS[39m ⚡️ Build success in 66ms
|
|
19
|
+
DTS Build start
|
|
20
|
+
DTS ⚡️ Build success in 1855ms
|
|
21
|
+
DTS dist/cli.d.ts 266.00 B
|
|
22
|
+
DTS dist/index.d.ts 1.15 KB
|
|
23
|
+
DTS dist/cli.d.mts 266.00 B
|
|
24
|
+
DTS dist/index.d.mts 1.15 KB
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
|
|
2
|
+
|
|
3
|
+
> @aiready/change-amplification@0.14.8 format-check /Users/pengcao/projects/aiready/packages/change-amplification
|
|
4
|
+
> prettier --check . --ignore-path ../../.prettierignore
|
|
5
|
+
|
|
6
|
+
Checking formatting...
|
|
7
|
+
package.json[2K[1GREADME.md[2K[1Gsrc/__tests__/analyzer.test.ts[2K[1Gsrc/__tests__/cli.test.ts[2K[1Gsrc/__tests__/dummy.test.ts[2K[1Gsrc/__tests__/provider.test.ts[2K[1Gsrc/__tests__/scoring.test.ts[2K[1Gsrc/analyzer.ts[2K[1Gsrc/cli.ts[2K[1Gsrc/index.ts[2K[1Gsrc/provider.ts[2K[1Gsrc/scoring.ts[2K[1Gsrc/types.ts[2K[1Gtsconfig.json[2K[1GAll matched files use Prettier code style!
|
package/.turbo/turbo-lint.log
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
>
|
|
4
|
-
|
|
1
|
+
|
|
2
|
+
|
|
3
|
+
> @aiready/change-amplification@0.14.8 lint /Users/pengcao/projects/aiready/packages/change-amplification
|
|
4
|
+
> eslint src --ext .ts
|
|
5
|
+
|
package/.turbo/turbo-test.log
CHANGED
|
@@ -1,22 +1,24 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
>
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
[
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
[32m✓[39m src/__tests__/
|
|
10
|
-
[32m✓[39m src/__tests__/
|
|
11
|
-
[32m✓[39m src/__tests__/
|
|
12
|
-
[90mstdout[2m | src/__tests__/analyzer.test.ts[2m > [22m[2manalyzeChangeAmplification reproduction[2m > [22m[2mshould see how it gets to 0
|
|
13
|
-
[22m[39mResulting score for highly coupled: [33m27[39m
|
|
14
|
-
Rating: explosive
|
|
15
|
-
|
|
16
|
-
[32m✓[39m src/__tests__/analyzer.test.ts [2m([22m[2m2 tests[22m[2m)[22m[32m
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
[2m
|
|
20
|
-
[2m
|
|
21
|
-
[2m
|
|
22
|
-
|
|
1
|
+
|
|
2
|
+
|
|
3
|
+
> @aiready/change-amplification@0.14.7 test /Users/pengcao/projects/aiready/packages/change-amplification
|
|
4
|
+
> vitest run
|
|
5
|
+
|
|
6
|
+
[?25l
|
|
7
|
+
[1m[46m RUN [49m[22m [36mv4.0.18 [39m[90m/Users/pengcao/projects/aiready/packages/change-amplification[39m
|
|
8
|
+
|
|
9
|
+
[32m✓[39m src/__tests__/dummy.test.ts [2m([22m[2m1 test[22m[2m)[22m[32m 12[2mms[22m[39m
|
|
10
|
+
[32m✓[39m src/__tests__/cli.test.ts [2m([22m[2m2 tests[22m[2m)[22m[32m 10[2mms[22m[39m
|
|
11
|
+
[32m✓[39m src/__tests__/scoring.test.ts [2m([22m[2m2 tests[22m[2m)[22m[32m 9[2mms[22m[39m
|
|
12
|
+
[90mstdout[2m | src/__tests__/analyzer.test.ts[2m > [22m[2manalyzeChangeAmplification reproduction[2m > [22m[2mshould see how it gets to 0
|
|
13
|
+
[22m[39mResulting score for highly coupled: [33m27[39m
|
|
14
|
+
Rating: explosive
|
|
15
|
+
|
|
16
|
+
[32m✓[39m src/__tests__/analyzer.test.ts [2m([22m[2m2 tests[22m[2m)[22m[32m 3[2mms[22m[39m
|
|
17
|
+
[32m✓[39m src/__tests__/provider.test.ts [2m([22m[2m2 tests[22m[2m)[22m[32m 7[2mms[22m[39m
|
|
18
|
+
|
|
19
|
+
[2m Test Files [22m [1m[32m5 passed[39m[22m[90m (5)[39m
|
|
20
|
+
[2m Tests [22m [1m[32m9 passed[39m[22m[90m (9)[39m
|
|
21
|
+
[2m Start at [22m 00:08:32
|
|
22
|
+
[2m Duration [22m 3.04s[2m (transform 3.50s, setup 0ms, import 11.31s, tests 41ms, environment 0ms)[22m
|
|
23
|
+
|
|
24
|
+
[?25h
|
package/dist/cli.d.mts
CHANGED
|
@@ -1,4 +1,10 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
declare const changeAmplificationAction: (directory: string, options:
|
|
2
|
+
declare const changeAmplificationAction: (directory: string, options: {
|
|
3
|
+
include?: string;
|
|
4
|
+
exclude?: string;
|
|
5
|
+
output?: string;
|
|
6
|
+
outputFile?: string;
|
|
7
|
+
[key: string]: any;
|
|
8
|
+
}) => Promise<void>;
|
|
3
9
|
|
|
4
10
|
export { changeAmplificationAction };
|
package/dist/cli.d.ts
CHANGED
|
@@ -1,4 +1,10 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
declare const changeAmplificationAction: (directory: string, options:
|
|
2
|
+
declare const changeAmplificationAction: (directory: string, options: {
|
|
3
|
+
include?: string;
|
|
4
|
+
exclude?: string;
|
|
5
|
+
output?: string;
|
|
6
|
+
outputFile?: string;
|
|
7
|
+
[key: string]: any;
|
|
8
|
+
}) => Promise<void>;
|
|
3
9
|
|
|
4
10
|
export { changeAmplificationAction };
|
package/dist/index.d.mts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as _aiready_core from '@aiready/core';
|
|
2
|
-
import { Issue, IssueType, ScanOptions, SpokeOutput, AnalysisResult } from '@aiready/core';
|
|
2
|
+
import { Issue, IssueType, ScanOptions, SpokeOutput, AnalysisResult, ToolScoringOutput } from '@aiready/core';
|
|
3
3
|
|
|
4
4
|
/**
|
|
5
5
|
* Change Amplification Tool Provider
|
|
@@ -22,6 +22,6 @@ declare function analyzeChangeAmplification(options: ChangeAmplificationOptions)
|
|
|
22
22
|
/**
|
|
23
23
|
* Convert change amplification report into a standardized ToolScoringOutput.
|
|
24
24
|
*/
|
|
25
|
-
declare function calculateChangeAmplificationScore(report: ChangeAmplificationReport):
|
|
25
|
+
declare function calculateChangeAmplificationScore(report: ChangeAmplificationReport): ToolScoringOutput;
|
|
26
26
|
|
|
27
27
|
export { type ChangeAmplificationIssue, type ChangeAmplificationOptions, ChangeAmplificationProvider, type ChangeAmplificationReport, type FileChangeAmplificationResult, analyzeChangeAmplification, calculateChangeAmplificationScore };
|
package/dist/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as _aiready_core from '@aiready/core';
|
|
2
|
-
import { Issue, IssueType, ScanOptions, SpokeOutput, AnalysisResult } from '@aiready/core';
|
|
2
|
+
import { Issue, IssueType, ScanOptions, SpokeOutput, AnalysisResult, ToolScoringOutput } from '@aiready/core';
|
|
3
3
|
|
|
4
4
|
/**
|
|
5
5
|
* Change Amplification Tool Provider
|
|
@@ -22,6 +22,6 @@ declare function analyzeChangeAmplification(options: ChangeAmplificationOptions)
|
|
|
22
22
|
/**
|
|
23
23
|
* Convert change amplification report into a standardized ToolScoringOutput.
|
|
24
24
|
*/
|
|
25
|
-
declare function calculateChangeAmplificationScore(report: ChangeAmplificationReport):
|
|
25
|
+
declare function calculateChangeAmplificationScore(report: ChangeAmplificationReport): ToolScoringOutput;
|
|
26
26
|
|
|
27
27
|
export { type ChangeAmplificationIssue, type ChangeAmplificationOptions, ChangeAmplificationProvider, type ChangeAmplificationReport, type FileChangeAmplificationResult, analyzeChangeAmplification, calculateChangeAmplificationScore };
|
package/dist/index.mjs
CHANGED
|
@@ -34,7 +34,10 @@ var ChangeAmplificationProvider = createProvider({
|
|
|
34
34
|
});
|
|
35
35
|
|
|
36
36
|
// src/scoring.ts
|
|
37
|
-
import {
|
|
37
|
+
import {
|
|
38
|
+
ToolName as ToolName2,
|
|
39
|
+
buildStandardToolScore
|
|
40
|
+
} from "@aiready/core";
|
|
38
41
|
function calculateChangeAmplificationScore(report) {
|
|
39
42
|
const { summary } = report;
|
|
40
43
|
return buildStandardToolScore({
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aiready/change-amplification",
|
|
3
|
-
"version": "0.14.
|
|
3
|
+
"version": "0.14.8",
|
|
4
4
|
"description": "AI-Readiness: Change Amplification Detection",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"module": "dist/index.mjs",
|
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
"commander": "^14.0.0",
|
|
11
11
|
"glob": "^13.0.0",
|
|
12
12
|
"chalk": "^5.3.0",
|
|
13
|
-
"@aiready/core": "0.24.
|
|
13
|
+
"@aiready/core": "0.24.8"
|
|
14
14
|
},
|
|
15
15
|
"devDependencies": {
|
|
16
16
|
"@types/node": "^24.0.0",
|
|
@@ -40,6 +40,8 @@
|
|
|
40
40
|
"dev": "tsup src/index.ts src/cli.ts --format cjs,esm --watch",
|
|
41
41
|
"test": "vitest run",
|
|
42
42
|
"test:watch": "vitest",
|
|
43
|
-
"lint": "eslint src --ext .ts"
|
|
43
|
+
"lint": "eslint src --ext .ts",
|
|
44
|
+
"type-check": "tsc --noEmit",
|
|
45
|
+
"format-check": "prettier --check . --ignore-path ../../.prettierignore"
|
|
44
46
|
}
|
|
45
47
|
}
|
package/src/analyzer.ts
CHANGED
|
@@ -125,7 +125,7 @@ export async function analyzeChangeAmplification(
|
|
|
125
125
|
const results: FileChangeAmplificationResult[] = [];
|
|
126
126
|
|
|
127
127
|
// Helper for severity mapping
|
|
128
|
-
const getLevel = (s:
|
|
128
|
+
const getLevel = (s: Severity | string): number => {
|
|
129
129
|
if (s === Severity.Critical || s === 'critical') return 4;
|
|
130
130
|
if (s === Severity.Major || s === 'major') return 3;
|
|
131
131
|
if (s === Severity.Minor || s === 'minor') return 2;
|
package/src/cli.ts
CHANGED
|
@@ -4,12 +4,23 @@ import chalk from 'chalk';
|
|
|
4
4
|
import * as path from 'path';
|
|
5
5
|
import * as fs from 'fs';
|
|
6
6
|
import { analyzeChangeAmplification } from './analyzer';
|
|
7
|
-
import type {
|
|
7
|
+
import type {
|
|
8
|
+
ChangeAmplificationOptions,
|
|
9
|
+
ChangeAmplificationReport,
|
|
10
|
+
FileChangeAmplificationResult,
|
|
11
|
+
ChangeAmplificationIssue,
|
|
12
|
+
} from './types';
|
|
8
13
|
import { displayStandardConsoleReport } from '@aiready/core';
|
|
9
14
|
|
|
10
15
|
export const changeAmplificationAction = async (
|
|
11
16
|
directory: string,
|
|
12
|
-
options:
|
|
17
|
+
options: {
|
|
18
|
+
include?: string;
|
|
19
|
+
exclude?: string;
|
|
20
|
+
output?: string;
|
|
21
|
+
outputFile?: string;
|
|
22
|
+
[key: string]: any;
|
|
23
|
+
}
|
|
13
24
|
) => {
|
|
14
25
|
try {
|
|
15
26
|
const resolvedDir = path.resolve(process.cwd(), directory);
|
|
@@ -19,7 +30,8 @@ export const changeAmplificationAction = async (
|
|
|
19
30
|
exclude: options.exclude ? options.exclude.split(',') : undefined,
|
|
20
31
|
};
|
|
21
32
|
|
|
22
|
-
const report =
|
|
33
|
+
const report: ChangeAmplificationReport =
|
|
34
|
+
await analyzeChangeAmplification(finalOptions);
|
|
23
35
|
|
|
24
36
|
if (options.output === 'json') {
|
|
25
37
|
const outputPath =
|
|
@@ -40,8 +52,8 @@ export const changeAmplificationAction = async (
|
|
|
40
52
|
{ name: 'Major Issues', value: (report.summary.majorIssues ?? 0) * 5 },
|
|
41
53
|
],
|
|
42
54
|
|
|
43
|
-
issues: report.results.flatMap((r:
|
|
44
|
-
r.issues.map((i:
|
|
55
|
+
issues: report.results.flatMap((r: FileChangeAmplificationResult) =>
|
|
56
|
+
r.issues.map((i: ChangeAmplificationIssue) => ({
|
|
45
57
|
...i,
|
|
46
58
|
message: `[${r.fileName}] ${i.message}`,
|
|
47
59
|
}))
|
package/src/scoring.ts
CHANGED
|
@@ -1,4 +1,8 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import {
|
|
2
|
+
ToolName,
|
|
3
|
+
buildStandardToolScore,
|
|
4
|
+
type ToolScoringOutput,
|
|
5
|
+
} from '@aiready/core';
|
|
2
6
|
import type { ChangeAmplificationReport } from './types';
|
|
3
7
|
|
|
4
8
|
/**
|
|
@@ -6,7 +10,7 @@ import type { ChangeAmplificationReport } from './types';
|
|
|
6
10
|
*/
|
|
7
11
|
export function calculateChangeAmplificationScore(
|
|
8
12
|
report: ChangeAmplificationReport
|
|
9
|
-
):
|
|
13
|
+
): ToolScoringOutput {
|
|
10
14
|
const { summary } = report;
|
|
11
15
|
|
|
12
16
|
return buildStandardToolScore({
|