@aiready/cli 0.12.11 → 0.12.14

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/index.js CHANGED
@@ -57,16 +57,30 @@ var TOOL_PACKAGE_MAP = {
57
57
  "deps-health": "@aiready/deps",
58
58
  "change-amp": "@aiready/change-amplification"
59
59
  };
60
- function sanitizeToolConfig(config) {
61
- if (!config || typeof config !== "object") return config;
62
- const sanitized = { ...config };
63
- import_core.GLOBAL_INFRA_OPTIONS.forEach((key) => {
64
- if (key !== "rootDir") {
65
- delete sanitized[key];
60
+ function sanitizeConfigRecursive(obj) {
61
+ if (!obj || typeof obj !== "object" || Array.isArray(obj)) return obj;
62
+ const sanitized = {};
63
+ const infraToStrip = [
64
+ "rootDir",
65
+ "onProgress",
66
+ "progressCallback",
67
+ "streamResults",
68
+ "batchSize",
69
+ "useSmartDefaults"
70
+ ];
71
+ for (const [key, value] of Object.entries(obj)) {
72
+ if (infraToStrip.includes(key)) continue;
73
+ if (typeof value === "object" && value !== null && !Array.isArray(value)) {
74
+ sanitized[key] = sanitizeConfigRecursive(value);
75
+ } else {
76
+ sanitized[key] = value;
66
77
  }
67
- });
78
+ }
68
79
  return sanitized;
69
80
  }
81
+ function sanitizeToolConfig(config) {
82
+ return sanitizeConfigRecursive(config);
83
+ }
70
84
  async function analyzeUnified(options) {
71
85
  const startTime = Date.now();
72
86
  const requestedTools = options.tools || [
@@ -118,22 +132,24 @@ async function analyzeUnified(options) {
118
132
  continue;
119
133
  }
120
134
  try {
121
- const sanitizedConfig = { ...options };
122
- delete sanitizedConfig.onProgress;
123
- delete sanitizedConfig.progressCallback;
135
+ const sanitizedOptions = { ...options };
136
+ delete sanitizedOptions.onProgress;
137
+ delete sanitizedOptions.progressCallback;
124
138
  const toolOptions = {
125
139
  rootDir: options.rootDir
126
140
  // Always include rootDir
127
141
  };
128
142
  [...import_core.GLOBAL_INFRA_OPTIONS, ...import_core.COMMON_FINE_TUNING_OPTIONS].forEach(
129
143
  (key) => {
130
- if (key in options && key !== "toolConfigs") {
144
+ if (key in options && key !== "toolConfigs" && key !== "tools") {
131
145
  toolOptions[key] = options[key];
132
146
  }
133
147
  }
134
148
  );
135
149
  if (options.toolConfigs?.[provider.id]) {
136
150
  Object.assign(toolOptions, options.toolConfigs[provider.id]);
151
+ } else if (options.tools && !Array.isArray(options.tools) && typeof options.tools === "object" && options.tools[provider.id]) {
152
+ Object.assign(toolOptions, options.tools[provider.id]);
137
153
  } else if (options[provider.id]) {
138
154
  Object.assign(toolOptions, options[provider.id]);
139
155
  }
@@ -194,10 +210,15 @@ async function analyzeUnified(options) {
194
210
  console.error(`\u274C Error running tool '${provider.id}':`, err);
195
211
  }
196
212
  }
197
- result.summary.config = {
198
- ...options,
199
- toolConfigs: result.summary.toolConfigs
200
- };
213
+ result.summary.config = sanitizeConfigRecursive({
214
+ scan: {
215
+ tools: requestedTools,
216
+ include: options.include,
217
+ exclude: options.exclude
218
+ },
219
+ // Use 'tools' for tool-specific configurations to match AIReadyConfig
220
+ tools: result.summary.toolConfigs
221
+ });
201
222
  result.summary.executionTime = Date.now() - startTime;
202
223
  return result;
203
224
  }
package/dist/index.mjs CHANGED
@@ -2,7 +2,7 @@ import {
2
2
  analyzeUnified,
3
3
  generateUnifiedSummary,
4
4
  scoreUnified
5
- } from "./chunk-OOQTTRPG.mjs";
5
+ } from "./chunk-2QOU5KKW.mjs";
6
6
  export {
7
7
  analyzeUnified,
8
8
  generateUnifiedSummary,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aiready/cli",
3
- "version": "0.12.11",
3
+ "version": "0.12.14",
4
4
  "description": "Unified CLI for AIReady analysis tools",
5
5
  "main": "./dist/index.js",
6
6
  "module": "./dist/index.mjs",
@@ -11,17 +11,17 @@
11
11
  "dependencies": {
12
12
  "chalk": "^5.3.0",
13
13
  "commander": "^14.0.0",
14
- "@aiready/agent-grounding": "0.11.11",
15
- "@aiready/context-analyzer": "0.19.11",
16
- "@aiready/core": "0.21.11",
17
- "@aiready/deps": "0.11.11",
18
- "@aiready/change-amplification": "0.11.11",
19
- "@aiready/doc-drift": "0.11.11",
20
- "@aiready/ai-signal-clarity": "0.11.11",
21
- "@aiready/pattern-detect": "0.14.11",
22
- "@aiready/visualizer": "0.4.11",
23
- "@aiready/testability": "0.4.11",
24
- "@aiready/consistency": "0.18.11"
14
+ "@aiready/agent-grounding": "0.11.13",
15
+ "@aiready/consistency": "0.18.13",
16
+ "@aiready/context-analyzer": "0.19.13",
17
+ "@aiready/deps": "0.11.13",
18
+ "@aiready/core": "0.21.13",
19
+ "@aiready/doc-drift": "0.11.13",
20
+ "@aiready/ai-signal-clarity": "0.11.13",
21
+ "@aiready/visualizer": "0.4.13",
22
+ "@aiready/change-amplification": "0.11.13",
23
+ "@aiready/pattern-detect": "0.14.13",
24
+ "@aiready/testability": "0.4.13"
25
25
  },
26
26
  "devDependencies": {
27
27
  "@types/node": "^24.0.0",