@aiready/change-amplification 0.9.5 â 0.11.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.
- package/.turbo/turbo-build.log +8 -92
- package/.turbo/turbo-lint.log +1 -1
- package/.turbo/turbo-test.log +3 -3
- package/dist/index.d.mts +8 -4
- package/dist/index.d.ts +8 -4
- package/dist/index.js +46 -0
- package/dist/index.mjs +48 -0
- package/package.json +6 -6
- package/src/index.ts +7 -0
- package/src/provider.ts +58 -0
- package/src/types.ts +1 -1
package/.turbo/turbo-build.log
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
|
|
2
2
|
|
|
3
|
-
> @aiready/change-amplification@0.
|
|
3
|
+
> @aiready/change-amplification@0.10.0 build /Users/pengcao/projects/aiready/packages/change-amplification
|
|
4
4
|
> tsup src/index.ts src/cli.ts --format cjs,esm --dts
|
|
5
5
|
|
|
6
6
|
[34mCLI[39m Building entry: src/cli.ts, src/index.ts
|
|
@@ -9,100 +9,16 @@
|
|
|
9
9
|
[34mCLI[39m Target: es2020
|
|
10
10
|
[34mCJS[39m Build start
|
|
11
11
|
[34mESM[39m Build start
|
|
12
|
-
|
|
13
|
-
[43m[30m WARN [39m[49m [33mâ² [43;33m[[43;30mWARNING[43;33m][0m [1mThe condition "types" here will never be used as it comes after both "import" and "require"[0m [package.json] [90m9:38:41 pm[39m
|
|
14
|
-
|
|
15
|
-
package.json:33:6:
|
|
16
|
-
[37m 33 â [32m"types"[37m: "./dist/index.d.ts"
|
|
17
|
-
âµ [32m~~~~~~~[0m
|
|
18
|
-
|
|
19
|
-
The "import" condition comes earlier and will be used for all "import" statements:
|
|
20
|
-
|
|
21
|
-
package.json:31:6:
|
|
22
|
-
[37m 31 â [32m"import"[37m: "./dist/index.mjs",
|
|
23
|
-
âµ [32m~~~~~~~~[0m
|
|
24
|
-
|
|
25
|
-
The "require" condition comes earlier and will be used for all "require" calls:
|
|
26
|
-
|
|
27
|
-
package.json:32:6:
|
|
28
|
-
[37m 32 â [32m"require"[37m: "./dist/index.js",
|
|
29
|
-
âµ [32m~~~~~~~~~[0m
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
[43m[30m WARN [39m[49m [33mâ² [43;33m[[43;30mWARNING[43;33m][0m [1mThe condition "types" here will never be used as it comes after both "import" and "require"[0m [package.json] [90m9:38:41 pm[39m
|
|
35
|
-
|
|
36
|
-
package.json:38:6:
|
|
37
|
-
[37m 38 â [32m"types"[37m: "./dist/cli.d.ts"
|
|
38
|
-
âµ [32m~~~~~~~[0m
|
|
39
|
-
|
|
40
|
-
The "import" condition comes earlier and will be used for all "import" statements:
|
|
41
|
-
|
|
42
|
-
package.json:36:6:
|
|
43
|
-
[37m 36 â [32m"import"[37m: "./dist/cli.mjs",
|
|
44
|
-
âµ [32m~~~~~~~~[0m
|
|
45
|
-
|
|
46
|
-
The "require" condition comes earlier and will be used for all "require" calls:
|
|
47
|
-
|
|
48
|
-
package.json:37:6:
|
|
49
|
-
[37m 37 â [32m"require"[37m: "./dist/cli.js",
|
|
50
|
-
âµ [32m~~~~~~~~~[0m
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
[43m[30m WARN [39m[49m [33mâ² [43;33m[[43;30mWARNING[43;33m][0m [1mThe condition "types" here will never be used as it comes after both "import" and "require"[0m [package.json] [90m9:38:41 pm[39m
|
|
56
|
-
|
|
57
|
-
package.json:33:6:
|
|
58
|
-
[37m 33 â [32m"types"[37m: "./dist/index.d.ts"
|
|
59
|
-
âµ [32m~~~~~~~[0m
|
|
60
|
-
|
|
61
|
-
The "import" condition comes earlier and will be used for all "import" statements:
|
|
62
|
-
|
|
63
|
-
package.json:31:6:
|
|
64
|
-
[37m 31 â [32m"import"[37m: "./dist/index.mjs",
|
|
65
|
-
âµ [32m~~~~~~~~[0m
|
|
66
|
-
|
|
67
|
-
The "require" condition comes earlier and will be used for all "require" calls:
|
|
68
|
-
|
|
69
|
-
package.json:32:6:
|
|
70
|
-
[37m 32 â [32m"require"[37m: "./dist/index.js",
|
|
71
|
-
âµ [32m~~~~~~~~~[0m
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
[43m[30m WARN [39m[49m [33mâ² [43;33m[[43;30mWARNING[43;33m][0m [1mThe condition "types" here will never be used as it comes after both "import" and "require"[0m [package.json] [90m9:38:41 pm[39m
|
|
77
|
-
|
|
78
|
-
package.json:38:6:
|
|
79
|
-
[37m 38 â [32m"types"[37m: "./dist/cli.d.ts"
|
|
80
|
-
âµ [32m~~~~~~~[0m
|
|
81
|
-
|
|
82
|
-
The "import" condition comes earlier and will be used for all "import" statements:
|
|
83
|
-
|
|
84
|
-
package.json:36:6:
|
|
85
|
-
[37m 36 â [32m"import"[37m: "./dist/cli.mjs",
|
|
86
|
-
âµ [32m~~~~~~~~[0m
|
|
87
|
-
|
|
88
|
-
The "require" condition comes earlier and will be used for all "require" calls:
|
|
89
|
-
|
|
90
|
-
package.json:37:6:
|
|
91
|
-
[37m 37 â [32m"require"[37m: "./dist/cli.js",
|
|
92
|
-
âµ [32m~~~~~~~~~[0m
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
[32mESM[39m [1mdist/index.mjs [22m[32m110.00 B[39m
|
|
12
|
+
[32mESM[39m [1mdist/index.mjs [22m[32m1.25 KB[39m
|
|
97
13
|
[32mESM[39m [1mdist/cli.mjs [22m[32m2.78 KB[39m
|
|
98
14
|
[32mESM[39m [1mdist/chunk-GLHIV53G.mjs [22m[32m3.79 KB[39m
|
|
99
|
-
[32mESM[39m âĦï¸ Build success in
|
|
100
|
-
[32mCJS[39m [1mdist/index.js [22m[
|
|
15
|
+
[32mESM[39m âĦï¸ Build success in 134ms
|
|
16
|
+
[32mCJS[39m [1mdist/index.js [22m[32m6.37 KB[39m
|
|
101
17
|
[32mCJS[39m [1mdist/cli.js [22m[32m7.98 KB[39m
|
|
102
|
-
[32mCJS[39m âĦï¸ Build success in
|
|
18
|
+
[32mCJS[39m âĦï¸ Build success in 134ms
|
|
103
19
|
DTS Build start
|
|
104
|
-
DTS âĦï¸ Build success in
|
|
20
|
+
DTS âĦï¸ Build success in 2088ms
|
|
105
21
|
DTS dist/cli.d.ts 152.00 B
|
|
106
|
-
DTS dist/index.d.ts
|
|
22
|
+
DTS dist/index.d.ts 1.05 KB
|
|
107
23
|
DTS dist/cli.d.mts 152.00 B
|
|
108
|
-
DTS dist/index.d.mts
|
|
24
|
+
DTS dist/index.d.mts 1.05 KB
|
package/.turbo/turbo-lint.log
CHANGED
package/.turbo/turbo-test.log
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
|
|
2
2
|
|
|
3
|
-
> @aiready/change-amplification@0.
|
|
3
|
+
> @aiready/change-amplification@0.10.0 test /Users/pengcao/projects/aiready/packages/change-amplification
|
|
4
4
|
> vitest run
|
|
5
5
|
|
|
6
6
|
[?25l
|
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
|
|
11
11
|
[2m Test Files [22m [1m[32m1 passed[39m[22m[90m (1)[39m
|
|
12
12
|
[2m Tests [22m [1m[32m1 passed[39m[22m[90m (1)[39m
|
|
13
|
-
[2m Start at [22m
|
|
14
|
-
[2m Duration [22m
|
|
13
|
+
[2m Start at [22m 09:33:02
|
|
14
|
+
[2m Duration [22m 221ms[2m (transform 39ms, setup 0ms, import 54ms, tests 2ms, environment 0ms)[22m
|
|
15
15
|
|
|
16
16
|
[?25h
|
package/dist/index.d.mts
CHANGED
|
@@ -1,7 +1,11 @@
|
|
|
1
|
-
import { Issue, IssueType, ScanOptions, AnalysisResult } from '@aiready/core';
|
|
1
|
+
import { ToolProvider, Issue, IssueType, ScanOptions, AnalysisResult } from '@aiready/core';
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
|
|
3
|
+
/**
|
|
4
|
+
* Change Amplification Tool Provider
|
|
5
|
+
*/
|
|
6
|
+
declare const ChangeAmplificationProvider: ToolProvider;
|
|
7
|
+
|
|
8
|
+
type ChangeAmplificationOptions = ScanOptions;
|
|
5
9
|
interface ChangeAmplificationIssue extends Issue {
|
|
6
10
|
type: IssueType.ChangeAmplification;
|
|
7
11
|
}
|
|
@@ -23,4 +27,4 @@ interface ChangeAmplificationReport {
|
|
|
23
27
|
|
|
24
28
|
declare function analyzeChangeAmplification(options: ChangeAmplificationOptions): Promise<ChangeAmplificationReport>;
|
|
25
29
|
|
|
26
|
-
export { type ChangeAmplificationIssue, type ChangeAmplificationOptions, type ChangeAmplificationReport, type FileChangeAmplificationResult, analyzeChangeAmplification };
|
|
30
|
+
export { type ChangeAmplificationIssue, type ChangeAmplificationOptions, ChangeAmplificationProvider, type ChangeAmplificationReport, type FileChangeAmplificationResult, analyzeChangeAmplification };
|
package/dist/index.d.ts
CHANGED
|
@@ -1,7 +1,11 @@
|
|
|
1
|
-
import { Issue, IssueType, ScanOptions, AnalysisResult } from '@aiready/core';
|
|
1
|
+
import { ToolProvider, Issue, IssueType, ScanOptions, AnalysisResult } from '@aiready/core';
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
|
|
3
|
+
/**
|
|
4
|
+
* Change Amplification Tool Provider
|
|
5
|
+
*/
|
|
6
|
+
declare const ChangeAmplificationProvider: ToolProvider;
|
|
7
|
+
|
|
8
|
+
type ChangeAmplificationOptions = ScanOptions;
|
|
5
9
|
interface ChangeAmplificationIssue extends Issue {
|
|
6
10
|
type: IssueType.ChangeAmplification;
|
|
7
11
|
}
|
|
@@ -23,4 +27,4 @@ interface ChangeAmplificationReport {
|
|
|
23
27
|
|
|
24
28
|
declare function analyzeChangeAmplification(options: ChangeAmplificationOptions): Promise<ChangeAmplificationReport>;
|
|
25
29
|
|
|
26
|
-
export { type ChangeAmplificationIssue, type ChangeAmplificationOptions, type ChangeAmplificationReport, type FileChangeAmplificationResult, analyzeChangeAmplification };
|
|
30
|
+
export { type ChangeAmplificationIssue, type ChangeAmplificationOptions, ChangeAmplificationProvider, type ChangeAmplificationReport, type FileChangeAmplificationResult, analyzeChangeAmplification };
|
package/dist/index.js
CHANGED
|
@@ -30,9 +30,14 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
|
|
|
30
30
|
// src/index.ts
|
|
31
31
|
var index_exports = {};
|
|
32
32
|
__export(index_exports, {
|
|
33
|
+
ChangeAmplificationProvider: () => ChangeAmplificationProvider,
|
|
33
34
|
analyzeChangeAmplification: () => analyzeChangeAmplification
|
|
34
35
|
});
|
|
35
36
|
module.exports = __toCommonJS(index_exports);
|
|
37
|
+
var import_core3 = require("@aiready/core");
|
|
38
|
+
|
|
39
|
+
// src/provider.ts
|
|
40
|
+
var import_core2 = require("@aiready/core");
|
|
36
41
|
|
|
37
42
|
// src/analyzer.ts
|
|
38
43
|
var fs = __toESM(require("fs"));
|
|
@@ -136,7 +141,48 @@ async function analyzeChangeAmplification(options) {
|
|
|
136
141
|
results
|
|
137
142
|
};
|
|
138
143
|
}
|
|
144
|
+
|
|
145
|
+
// src/provider.ts
|
|
146
|
+
var ChangeAmplificationProvider = {
|
|
147
|
+
id: import_core2.ToolName.ChangeAmplification,
|
|
148
|
+
alias: ["change-amp", "change-amplification", "coupling"],
|
|
149
|
+
async analyze(options) {
|
|
150
|
+
const report = await analyzeChangeAmplification(
|
|
151
|
+
options
|
|
152
|
+
);
|
|
153
|
+
return import_core2.SpokeOutputSchema.parse({
|
|
154
|
+
results: report.results,
|
|
155
|
+
summary: report.summary,
|
|
156
|
+
metadata: {
|
|
157
|
+
toolName: import_core2.ToolName.ChangeAmplification,
|
|
158
|
+
version: "0.9.5",
|
|
159
|
+
timestamp: (/* @__PURE__ */ new Date()).toISOString()
|
|
160
|
+
}
|
|
161
|
+
});
|
|
162
|
+
},
|
|
163
|
+
score(output, options) {
|
|
164
|
+
const summary = output.summary;
|
|
165
|
+
return {
|
|
166
|
+
toolName: import_core2.ToolName.ChangeAmplification,
|
|
167
|
+
score: summary.score || 0,
|
|
168
|
+
rawMetrics: summary,
|
|
169
|
+
factors: [],
|
|
170
|
+
recommendations: (summary.recommendations || []).map(
|
|
171
|
+
(action) => ({
|
|
172
|
+
action,
|
|
173
|
+
estimatedImpact: 5,
|
|
174
|
+
priority: "medium"
|
|
175
|
+
})
|
|
176
|
+
)
|
|
177
|
+
};
|
|
178
|
+
},
|
|
179
|
+
defaultWeight: 8
|
|
180
|
+
};
|
|
181
|
+
|
|
182
|
+
// src/index.ts
|
|
183
|
+
import_core3.ToolRegistry.register(ChangeAmplificationProvider);
|
|
139
184
|
// Annotate the CommonJS export names for ESM import in node:
|
|
140
185
|
0 && (module.exports = {
|
|
186
|
+
ChangeAmplificationProvider,
|
|
141
187
|
analyzeChangeAmplification
|
|
142
188
|
});
|
package/dist/index.mjs
CHANGED
|
@@ -1,6 +1,54 @@
|
|
|
1
1
|
import {
|
|
2
2
|
analyzeChangeAmplification
|
|
3
3
|
} from "./chunk-GLHIV53G.mjs";
|
|
4
|
+
|
|
5
|
+
// src/index.ts
|
|
6
|
+
import { ToolRegistry } from "@aiready/core";
|
|
7
|
+
|
|
8
|
+
// src/provider.ts
|
|
9
|
+
import {
|
|
10
|
+
ToolName,
|
|
11
|
+
SpokeOutputSchema
|
|
12
|
+
} from "@aiready/core";
|
|
13
|
+
var ChangeAmplificationProvider = {
|
|
14
|
+
id: ToolName.ChangeAmplification,
|
|
15
|
+
alias: ["change-amp", "change-amplification", "coupling"],
|
|
16
|
+
async analyze(options) {
|
|
17
|
+
const report = await analyzeChangeAmplification(
|
|
18
|
+
options
|
|
19
|
+
);
|
|
20
|
+
return SpokeOutputSchema.parse({
|
|
21
|
+
results: report.results,
|
|
22
|
+
summary: report.summary,
|
|
23
|
+
metadata: {
|
|
24
|
+
toolName: ToolName.ChangeAmplification,
|
|
25
|
+
version: "0.9.5",
|
|
26
|
+
timestamp: (/* @__PURE__ */ new Date()).toISOString()
|
|
27
|
+
}
|
|
28
|
+
});
|
|
29
|
+
},
|
|
30
|
+
score(output, options) {
|
|
31
|
+
const summary = output.summary;
|
|
32
|
+
return {
|
|
33
|
+
toolName: ToolName.ChangeAmplification,
|
|
34
|
+
score: summary.score || 0,
|
|
35
|
+
rawMetrics: summary,
|
|
36
|
+
factors: [],
|
|
37
|
+
recommendations: (summary.recommendations || []).map(
|
|
38
|
+
(action) => ({
|
|
39
|
+
action,
|
|
40
|
+
estimatedImpact: 5,
|
|
41
|
+
priority: "medium"
|
|
42
|
+
})
|
|
43
|
+
)
|
|
44
|
+
};
|
|
45
|
+
},
|
|
46
|
+
defaultWeight: 8
|
|
47
|
+
};
|
|
48
|
+
|
|
49
|
+
// src/index.ts
|
|
50
|
+
ToolRegistry.register(ChangeAmplificationProvider);
|
|
4
51
|
export {
|
|
52
|
+
ChangeAmplificationProvider,
|
|
5
53
|
analyzeChangeAmplification
|
|
6
54
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aiready/change-amplification",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.11.0",
|
|
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.
|
|
13
|
+
"@aiready/core": "0.21.0"
|
|
14
14
|
},
|
|
15
15
|
"devDependencies": {
|
|
16
16
|
"@types/node": "^24.0.0",
|
|
@@ -21,14 +21,14 @@
|
|
|
21
21
|
},
|
|
22
22
|
"exports": {
|
|
23
23
|
".": {
|
|
24
|
+
"types": "./dist/index.d.ts",
|
|
24
25
|
"import": "./dist/index.mjs",
|
|
25
|
-
"require": "./dist/index.js"
|
|
26
|
-
"types": "./dist/index.d.ts"
|
|
26
|
+
"require": "./dist/index.js"
|
|
27
27
|
},
|
|
28
28
|
"./cli": {
|
|
29
|
+
"types": "./dist/cli.d.ts",
|
|
29
30
|
"import": "./dist/cli.mjs",
|
|
30
|
-
"require": "./dist/cli.js"
|
|
31
|
-
"types": "./dist/cli.d.ts"
|
|
31
|
+
"require": "./dist/cli.js"
|
|
32
32
|
},
|
|
33
33
|
"./dist/cli.js": {
|
|
34
34
|
"require": "./dist/cli.js",
|
package/src/index.ts
CHANGED
|
@@ -1,4 +1,11 @@
|
|
|
1
|
+
import { ToolRegistry } from '@aiready/core';
|
|
2
|
+
import { ChangeAmplificationProvider } from './provider';
|
|
3
|
+
|
|
4
|
+
// Register with global registry
|
|
5
|
+
ToolRegistry.register(ChangeAmplificationProvider);
|
|
6
|
+
|
|
1
7
|
export { analyzeChangeAmplification } from './analyzer';
|
|
8
|
+
export { ChangeAmplificationProvider };
|
|
2
9
|
export type {
|
|
3
10
|
ChangeAmplificationOptions,
|
|
4
11
|
ChangeAmplificationReport,
|
package/src/provider.ts
ADDED
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
import {
|
|
2
|
+
ToolProvider,
|
|
3
|
+
ToolName,
|
|
4
|
+
SpokeOutput,
|
|
5
|
+
ScanOptions,
|
|
6
|
+
ToolScoringOutput,
|
|
7
|
+
AnalysisResult,
|
|
8
|
+
SpokeOutputSchema,
|
|
9
|
+
} from '@aiready/core';
|
|
10
|
+
import { analyzeChangeAmplification } from './analyzer';
|
|
11
|
+
import {
|
|
12
|
+
ChangeAmplificationOptions,
|
|
13
|
+
FileChangeAmplificationResult,
|
|
14
|
+
} from './types';
|
|
15
|
+
|
|
16
|
+
/**
|
|
17
|
+
* Change Amplification Tool Provider
|
|
18
|
+
*/
|
|
19
|
+
export const ChangeAmplificationProvider: ToolProvider = {
|
|
20
|
+
id: ToolName.ChangeAmplification,
|
|
21
|
+
alias: ['change-amp', 'change-amplification', 'coupling'],
|
|
22
|
+
|
|
23
|
+
async analyze(options: ScanOptions): Promise<SpokeOutput> {
|
|
24
|
+
const report = await analyzeChangeAmplification(
|
|
25
|
+
options as ChangeAmplificationOptions
|
|
26
|
+
);
|
|
27
|
+
|
|
28
|
+
return SpokeOutputSchema.parse({
|
|
29
|
+
results: report.results as AnalysisResult[],
|
|
30
|
+
summary: report.summary,
|
|
31
|
+
metadata: {
|
|
32
|
+
toolName: ToolName.ChangeAmplification,
|
|
33
|
+
version: '0.9.5',
|
|
34
|
+
timestamp: new Date().toISOString(),
|
|
35
|
+
},
|
|
36
|
+
});
|
|
37
|
+
},
|
|
38
|
+
|
|
39
|
+
score(output: SpokeOutput, options: ScanOptions): ToolScoringOutput {
|
|
40
|
+
const summary = output.summary as any;
|
|
41
|
+
|
|
42
|
+
return {
|
|
43
|
+
toolName: ToolName.ChangeAmplification,
|
|
44
|
+
score: summary.score || 0,
|
|
45
|
+
rawMetrics: summary,
|
|
46
|
+
factors: [],
|
|
47
|
+
recommendations: (summary.recommendations || []).map(
|
|
48
|
+
(action: string) => ({
|
|
49
|
+
action,
|
|
50
|
+
estimatedImpact: 5,
|
|
51
|
+
priority: 'medium',
|
|
52
|
+
})
|
|
53
|
+
),
|
|
54
|
+
};
|
|
55
|
+
},
|
|
56
|
+
|
|
57
|
+
defaultWeight: 8,
|
|
58
|
+
};
|
package/src/types.ts
CHANGED
|
@@ -5,7 +5,7 @@ import type {
|
|
|
5
5
|
IssueType,
|
|
6
6
|
} from '@aiready/core';
|
|
7
7
|
|
|
8
|
-
export
|
|
8
|
+
export type ChangeAmplificationOptions = ScanOptions;
|
|
9
9
|
|
|
10
10
|
export interface ChangeAmplificationIssue extends Issue {
|
|
11
11
|
type: IssueType.ChangeAmplification;
|