@aiready/core 0.23.2 → 0.23.3
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/dist/__tests__/parser-factory.test.d.ts +1 -1
- package/dist/__tests__/parser-factory.test.js +62 -50
- package/dist/__tests__/python-parser.test.d.ts +1 -1
- package/dist/__tests__/python-parser.test.js +111 -109
- package/dist/__tests__/scoring.test.d.ts +1 -1
- package/dist/__tests__/scoring.test.js +193 -176
- package/dist/chunk-3YI4IS3D.mjs +191 -173
- package/dist/chunk-5HIXDC3X.mjs +273 -251
- package/dist/chunk-5V3L53AE.mjs +805 -0
- package/dist/chunk-CKVKHN3G.mjs +228 -211
- package/dist/chunk-COHIBX3Q.mjs +213 -195
- package/dist/chunk-CWRCDSKZ.mjs +91 -82
- package/dist/chunk-D3D3NCRR.mjs +147 -129
- package/dist/chunk-HCFYP7UD.mjs +805 -0
- package/dist/chunk-HFLFBA6F.mjs +79 -72
- package/dist/chunk-HKSARRCD.mjs +66 -58
- package/dist/chunk-JJ5JL5FX.mjs +91 -82
- package/dist/chunk-KDSTXVLQ.mjs +724 -0
- package/dist/chunk-KI7XORTN.mjs +91 -82
- package/dist/chunk-LTMHFNFK.mjs +690 -0
- package/dist/chunk-LTNXTXRI.mjs +228 -211
- package/dist/chunk-M22BXHBR.mjs +805 -0
- package/dist/chunk-MH3A3LX6.mjs +200 -182
- package/dist/chunk-NGHT7JOG.mjs +697 -0
- package/dist/chunk-OQ6IGDXG.mjs +147 -129
- package/dist/chunk-QAFB3HXQ.mjs +181 -165
- package/dist/chunk-QQBKXHLU.mjs +678 -0
- package/dist/chunk-RDHYGES7.mjs +678 -0
- package/dist/chunk-SWTDBVYJ.mjs +228 -213
- package/dist/chunk-UIWL5JQB.mjs +79 -72
- package/dist/chunk-UQGI67WR.mjs +79 -72
- package/dist/chunk-UTZOO4XO.mjs +147 -131
- package/dist/chunk-X4F46I5L.mjs +213 -195
- package/dist/chunk-XKK7YHPX.mjs +204 -186
- package/dist/chunk-YCA4FTEK.mjs +190 -172
- package/dist/chunk-ZSZRRTJM.mjs +719 -0
- package/dist/client-BgmiMoil.d.mts +1344 -0
- package/dist/client-BgmiMoil.d.ts +1344 -0
- package/dist/client-BxGrPuuN.d.mts +1191 -0
- package/dist/client-BxGrPuuN.d.ts +1191 -0
- package/dist/client-D-cn9ydj.d.mts +1136 -0
- package/dist/client-D-cn9ydj.d.ts +1136 -0
- package/dist/client-D9seCH4K.d.mts +1334 -0
- package/dist/client-D9seCH4K.d.ts +1334 -0
- package/dist/client-DIXIh7rw.d.mts +1193 -0
- package/dist/client-DIXIh7rw.d.ts +1193 -0
- package/dist/client-DVHXWOHw.d.mts +1245 -0
- package/dist/client-DVHXWOHw.d.ts +1245 -0
- package/dist/client.d.mts +2 -1098
- package/dist/client.d.ts +2 -1098
- package/dist/client.js +23 -43
- package/dist/client.mjs +3 -25
- package/dist/index.d.mts +325 -103
- package/dist/index.d.ts +325 -103
- package/dist/index.js +307 -324
- package/dist/index.mjs +283 -306
- package/dist/parsers/parser-factory.d.ts +45 -45
- package/dist/parsers/parser-factory.js +86 -84
- package/dist/parsers/python-parser.d.ts +33 -28
- package/dist/parsers/python-parser.js +224 -222
- package/dist/parsers/typescript-parser.d.ts +15 -10
- package/dist/parsers/typescript-parser.js +223 -197
- package/dist/scoring.d.ts +59 -49
- package/dist/scoring.js +129 -127
- package/dist/types/language.d.ts +104 -93
- package/dist/types/language.js +23 -23
- package/dist/types.d.ts +105 -87
- package/dist/types.js +1 -1
- package/dist/utils/ast-parser.d.ts +42 -33
- package/dist/utils/ast-parser.js +159 -162
- package/dist/utils/cli-helpers.d.ts +27 -10
- package/dist/utils/cli-helpers.js +45 -43
- package/dist/utils/config.d.ts +8 -3
- package/dist/utils/config.js +67 -69
- package/dist/utils/file-scanner.d.ts +1 -1
- package/dist/utils/file-scanner.js +80 -76
- package/dist/utils/metrics.d.ts +1 -1
- package/dist/utils/metrics.js +2 -2
- package/package.json +1 -1
package/dist/client.js
CHANGED
|
@@ -20,24 +20,16 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
|
|
|
20
20
|
// src/client.ts
|
|
21
21
|
var client_exports = {};
|
|
22
22
|
__export(client_exports, {
|
|
23
|
-
AnalysisResultSchema: () => AnalysisResultSchema,
|
|
24
23
|
AnalysisStatus: () => AnalysisStatus,
|
|
25
|
-
AnalysisStatusSchema: () => AnalysisStatusSchema,
|
|
26
24
|
COMMON_FINE_TUNING_OPTIONS: () => COMMON_FINE_TUNING_OPTIONS,
|
|
27
25
|
CONTEXT_TIER_THRESHOLDS: () => CONTEXT_TIER_THRESHOLDS,
|
|
28
26
|
DEFAULT_TOOL_WEIGHTS: () => DEFAULT_TOOL_WEIGHTS,
|
|
29
27
|
FRIENDLY_TOOL_NAMES: () => FRIENDLY_TOOL_NAMES,
|
|
30
28
|
GLOBAL_INFRA_OPTIONS: () => GLOBAL_INFRA_OPTIONS,
|
|
31
29
|
GLOBAL_SCAN_OPTIONS: () => GLOBAL_SCAN_OPTIONS,
|
|
32
|
-
IssueSchema: () => IssueSchema,
|
|
33
30
|
IssueType: () => IssueType,
|
|
34
|
-
IssueTypeSchema: () => IssueTypeSchema,
|
|
35
31
|
LANGUAGE_EXTENSIONS: () => LANGUAGE_EXTENSIONS,
|
|
36
32
|
Language: () => Language,
|
|
37
|
-
LocationSchema: () => LocationSchema,
|
|
38
|
-
MetricsSchema: () => MetricsSchema,
|
|
39
|
-
ModelTier: () => ModelTier,
|
|
40
|
-
ModelTierSchema: () => ModelTierSchema,
|
|
41
33
|
ParseError: () => ParseError,
|
|
42
34
|
ReadinessRating: () => ReadinessRating,
|
|
43
35
|
RecommendationPriority: () => RecommendationPriority,
|
|
@@ -45,12 +37,8 @@ __export(client_exports, {
|
|
|
45
37
|
SIZE_ADJUSTED_THRESHOLDS: () => SIZE_ADJUSTED_THRESHOLDS,
|
|
46
38
|
ScoringProfile: () => ScoringProfile,
|
|
47
39
|
Severity: () => Severity,
|
|
48
|
-
SeveritySchema: () => SeveritySchema,
|
|
49
|
-
SpokeOutputSchema: () => SpokeOutputSchema,
|
|
50
|
-
SpokeSummarySchema: () => SpokeSummarySchema,
|
|
51
40
|
TOOL_NAME_MAP: () => TOOL_NAME_MAP,
|
|
52
41
|
ToolName: () => ToolName,
|
|
53
|
-
ToolNameSchema: () => ToolNameSchema,
|
|
54
42
|
UnifiedReportSchema: () => UnifiedReportSchema,
|
|
55
43
|
calculateOverallScore: () => calculateOverallScore,
|
|
56
44
|
formatScore: () => formatScore,
|
|
@@ -59,6 +47,7 @@ __export(client_exports, {
|
|
|
59
47
|
getProjectSizeTier: () => getProjectSizeTier,
|
|
60
48
|
getRating: () => getRating,
|
|
61
49
|
getRatingDisplay: () => getRatingDisplay,
|
|
50
|
+
getRatingSlug: () => getRatingSlug,
|
|
62
51
|
getRatingWithContext: () => getRatingWithContext,
|
|
63
52
|
getRecommendedThreshold: () => getRecommendedThreshold,
|
|
64
53
|
getToolWeight: () => getToolWeight,
|
|
@@ -231,33 +220,28 @@ var UnifiedReportSchema = import_zod.z.object({
|
|
|
231
220
|
// src/types.ts
|
|
232
221
|
var GLOBAL_INFRA_OPTIONS = [
|
|
233
222
|
"rootDir",
|
|
234
|
-
// Essential for every tool
|
|
235
223
|
"include",
|
|
236
224
|
"exclude",
|
|
237
|
-
"onProgress",
|
|
238
|
-
"progressCallback",
|
|
239
|
-
"includeTests",
|
|
240
|
-
"useSmartDefaults",
|
|
241
|
-
"streamResults",
|
|
242
|
-
"batchSize",
|
|
243
|
-
"costConfig",
|
|
244
225
|
"tools",
|
|
245
|
-
"
|
|
226
|
+
"scoring"
|
|
227
|
+
];
|
|
228
|
+
var GLOBAL_SCAN_OPTIONS = [
|
|
229
|
+
"rootDir",
|
|
230
|
+
"include",
|
|
231
|
+
"exclude",
|
|
232
|
+
"config",
|
|
233
|
+
"threshold",
|
|
234
|
+
"output",
|
|
235
|
+
"format",
|
|
236
|
+
"parallel",
|
|
237
|
+
"showBreakdown"
|
|
246
238
|
];
|
|
247
239
|
var COMMON_FINE_TUNING_OPTIONS = [
|
|
248
240
|
"maxDepth",
|
|
249
241
|
"minSimilarity",
|
|
250
|
-
"
|
|
251
|
-
"
|
|
252
|
-
// AI Signal Clarity options
|
|
253
|
-
"checkMagicLiterals",
|
|
254
|
-
"checkBooleanTraps",
|
|
255
|
-
"checkAmbiguousNames",
|
|
256
|
-
"checkUndocumentedExports",
|
|
257
|
-
"checkImplicitSideEffects",
|
|
258
|
-
"checkDeepCallbacks"
|
|
242
|
+
"threshold",
|
|
243
|
+
"showBreakdown"
|
|
259
244
|
];
|
|
260
|
-
var GLOBAL_SCAN_OPTIONS = [...GLOBAL_INFRA_OPTIONS];
|
|
261
245
|
|
|
262
246
|
// src/types/language.ts
|
|
263
247
|
var Language = /* @__PURE__ */ ((Language2) => {
|
|
@@ -490,6 +474,13 @@ function getRating(score) {
|
|
|
490
474
|
if (score >= 40) return "Needs Work" /* NeedsWork */;
|
|
491
475
|
return "Critical" /* Critical */;
|
|
492
476
|
}
|
|
477
|
+
function getRatingSlug(score) {
|
|
478
|
+
if (score >= 90) return "excellent";
|
|
479
|
+
if (score >= 75) return "good";
|
|
480
|
+
if (score >= 60) return "fair";
|
|
481
|
+
if (score >= 40) return "needs-work";
|
|
482
|
+
return "critical";
|
|
483
|
+
}
|
|
493
484
|
function getRatingWithContext(score, fileCount, modelTier = "standard") {
|
|
494
485
|
const threshold = getRecommendedThreshold(fileCount, modelTier);
|
|
495
486
|
const normalized = score - threshold + 70;
|
|
@@ -716,24 +707,16 @@ function generateHTML(graph) {
|
|
|
716
707
|
}
|
|
717
708
|
// Annotate the CommonJS export names for ESM import in node:
|
|
718
709
|
0 && (module.exports = {
|
|
719
|
-
AnalysisResultSchema,
|
|
720
710
|
AnalysisStatus,
|
|
721
|
-
AnalysisStatusSchema,
|
|
722
711
|
COMMON_FINE_TUNING_OPTIONS,
|
|
723
712
|
CONTEXT_TIER_THRESHOLDS,
|
|
724
713
|
DEFAULT_TOOL_WEIGHTS,
|
|
725
714
|
FRIENDLY_TOOL_NAMES,
|
|
726
715
|
GLOBAL_INFRA_OPTIONS,
|
|
727
716
|
GLOBAL_SCAN_OPTIONS,
|
|
728
|
-
IssueSchema,
|
|
729
717
|
IssueType,
|
|
730
|
-
IssueTypeSchema,
|
|
731
718
|
LANGUAGE_EXTENSIONS,
|
|
732
719
|
Language,
|
|
733
|
-
LocationSchema,
|
|
734
|
-
MetricsSchema,
|
|
735
|
-
ModelTier,
|
|
736
|
-
ModelTierSchema,
|
|
737
720
|
ParseError,
|
|
738
721
|
ReadinessRating,
|
|
739
722
|
RecommendationPriority,
|
|
@@ -741,12 +724,8 @@ function generateHTML(graph) {
|
|
|
741
724
|
SIZE_ADJUSTED_THRESHOLDS,
|
|
742
725
|
ScoringProfile,
|
|
743
726
|
Severity,
|
|
744
|
-
SeveritySchema,
|
|
745
|
-
SpokeOutputSchema,
|
|
746
|
-
SpokeSummarySchema,
|
|
747
727
|
TOOL_NAME_MAP,
|
|
748
728
|
ToolName,
|
|
749
|
-
ToolNameSchema,
|
|
750
729
|
UnifiedReportSchema,
|
|
751
730
|
calculateOverallScore,
|
|
752
731
|
formatScore,
|
|
@@ -755,6 +734,7 @@ function generateHTML(graph) {
|
|
|
755
734
|
getProjectSizeTier,
|
|
756
735
|
getRating,
|
|
757
736
|
getRatingDisplay,
|
|
737
|
+
getRatingSlug,
|
|
758
738
|
getRatingWithContext,
|
|
759
739
|
getRecommendedThreshold,
|
|
760
740
|
getToolWeight,
|
package/dist/client.mjs
CHANGED
|
@@ -1,22 +1,14 @@
|
|
|
1
1
|
import {
|
|
2
|
-
AnalysisResultSchema,
|
|
3
2
|
AnalysisStatus,
|
|
4
|
-
AnalysisStatusSchema,
|
|
5
3
|
COMMON_FINE_TUNING_OPTIONS,
|
|
6
4
|
CONTEXT_TIER_THRESHOLDS,
|
|
7
5
|
DEFAULT_TOOL_WEIGHTS,
|
|
8
6
|
FRIENDLY_TOOL_NAMES,
|
|
9
7
|
GLOBAL_INFRA_OPTIONS,
|
|
10
8
|
GLOBAL_SCAN_OPTIONS,
|
|
11
|
-
IssueSchema,
|
|
12
9
|
IssueType,
|
|
13
|
-
IssueTypeSchema,
|
|
14
10
|
LANGUAGE_EXTENSIONS,
|
|
15
11
|
Language,
|
|
16
|
-
LocationSchema,
|
|
17
|
-
MetricsSchema,
|
|
18
|
-
ModelTier,
|
|
19
|
-
ModelTierSchema,
|
|
20
12
|
ParseError,
|
|
21
13
|
ReadinessRating,
|
|
22
14
|
RecommendationPriority,
|
|
@@ -24,12 +16,8 @@ import {
|
|
|
24
16
|
SIZE_ADJUSTED_THRESHOLDS,
|
|
25
17
|
ScoringProfile,
|
|
26
18
|
Severity,
|
|
27
|
-
SeveritySchema,
|
|
28
|
-
SpokeOutputSchema,
|
|
29
|
-
SpokeSummarySchema,
|
|
30
19
|
TOOL_NAME_MAP,
|
|
31
20
|
ToolName,
|
|
32
|
-
ToolNameSchema,
|
|
33
21
|
UnifiedReportSchema,
|
|
34
22
|
calculateOverallScore,
|
|
35
23
|
formatScore,
|
|
@@ -38,31 +26,24 @@ import {
|
|
|
38
26
|
getProjectSizeTier,
|
|
39
27
|
getRating,
|
|
40
28
|
getRatingDisplay,
|
|
29
|
+
getRatingSlug,
|
|
41
30
|
getRatingWithContext,
|
|
42
31
|
getRecommendedThreshold,
|
|
43
32
|
getToolWeight,
|
|
44
33
|
normalizeToolName,
|
|
45
34
|
parseWeightString
|
|
46
|
-
} from "./chunk-
|
|
35
|
+
} from "./chunk-NGHT7JOG.mjs";
|
|
47
36
|
export {
|
|
48
|
-
AnalysisResultSchema,
|
|
49
37
|
AnalysisStatus,
|
|
50
|
-
AnalysisStatusSchema,
|
|
51
38
|
COMMON_FINE_TUNING_OPTIONS,
|
|
52
39
|
CONTEXT_TIER_THRESHOLDS,
|
|
53
40
|
DEFAULT_TOOL_WEIGHTS,
|
|
54
41
|
FRIENDLY_TOOL_NAMES,
|
|
55
42
|
GLOBAL_INFRA_OPTIONS,
|
|
56
43
|
GLOBAL_SCAN_OPTIONS,
|
|
57
|
-
IssueSchema,
|
|
58
44
|
IssueType,
|
|
59
|
-
IssueTypeSchema,
|
|
60
45
|
LANGUAGE_EXTENSIONS,
|
|
61
46
|
Language,
|
|
62
|
-
LocationSchema,
|
|
63
|
-
MetricsSchema,
|
|
64
|
-
ModelTier,
|
|
65
|
-
ModelTierSchema,
|
|
66
47
|
ParseError,
|
|
67
48
|
ReadinessRating,
|
|
68
49
|
RecommendationPriority,
|
|
@@ -70,12 +51,8 @@ export {
|
|
|
70
51
|
SIZE_ADJUSTED_THRESHOLDS,
|
|
71
52
|
ScoringProfile,
|
|
72
53
|
Severity,
|
|
73
|
-
SeveritySchema,
|
|
74
|
-
SpokeOutputSchema,
|
|
75
|
-
SpokeSummarySchema,
|
|
76
54
|
TOOL_NAME_MAP,
|
|
77
55
|
ToolName,
|
|
78
|
-
ToolNameSchema,
|
|
79
56
|
UnifiedReportSchema,
|
|
80
57
|
calculateOverallScore,
|
|
81
58
|
formatScore,
|
|
@@ -84,6 +61,7 @@ export {
|
|
|
84
61
|
getProjectSizeTier,
|
|
85
62
|
getRating,
|
|
86
63
|
getRatingDisplay,
|
|
64
|
+
getRatingSlug,
|
|
87
65
|
getRatingWithContext,
|
|
88
66
|
getRecommendedThreshold,
|
|
89
67
|
getToolWeight,
|