depwire-cli 1.0.4 → 1.0.5
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.
|
@@ -11240,7 +11240,8 @@ var SimulationEngine = class {
|
|
|
11240
11240
|
healthScore: afterHealth.score
|
|
11241
11241
|
},
|
|
11242
11242
|
diff,
|
|
11243
|
-
healthDelta
|
|
11243
|
+
healthDelta,
|
|
11244
|
+
simulatedGraphInstance: clone
|
|
11244
11245
|
};
|
|
11245
11246
|
}
|
|
11246
11247
|
// ── Action implementations ─────────────────────────────────────
|
package/dist/index.js
CHANGED
|
@@ -17,7 +17,7 @@ import {
|
|
|
17
17
|
stashChanges,
|
|
18
18
|
updateFileInGraph,
|
|
19
19
|
watchProject
|
|
20
|
-
} from "./chunk-
|
|
20
|
+
} from "./chunk-67KDN6H4.js";
|
|
21
21
|
import {
|
|
22
22
|
SimulationEngine,
|
|
23
23
|
analyzeDeadCode,
|
|
@@ -31,7 +31,7 @@ import {
|
|
|
31
31
|
parseProject,
|
|
32
32
|
scanSecurity,
|
|
33
33
|
searchSymbols
|
|
34
|
-
} from "./chunk-
|
|
34
|
+
} from "./chunk-SPZNB7BS.js";
|
|
35
35
|
|
|
36
36
|
// src/index.ts
|
|
37
37
|
import { Command } from "commander";
|
|
@@ -791,6 +791,16 @@ async function whatif(dir, options) {
|
|
|
791
791
|
try {
|
|
792
792
|
const result = engine.simulate(action);
|
|
793
793
|
printResult(result);
|
|
794
|
+
const currentVizData = prepareVizData(graph, projectRoot);
|
|
795
|
+
const simulatedVizData = result.simulatedGraphInstance ? prepareVizData(result.simulatedGraphInstance, projectRoot) : currentVizData;
|
|
796
|
+
const { simulatedGraphInstance, ...serializableResult } = result;
|
|
797
|
+
await serveWhatIfViz(
|
|
798
|
+
currentVizData,
|
|
799
|
+
simulatedVizData,
|
|
800
|
+
serializableResult,
|
|
801
|
+
action.type,
|
|
802
|
+
action.target
|
|
803
|
+
);
|
|
794
804
|
} catch (err) {
|
|
795
805
|
console.error(chalk.red(`Simulation failed: ${err.message}`));
|
|
796
806
|
process.exit(1);
|
package/dist/mcpb-entry.js
CHANGED
|
@@ -4,11 +4,11 @@ import {
|
|
|
4
4
|
startMcpServer,
|
|
5
5
|
updateFileInGraph,
|
|
6
6
|
watchProject
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-67KDN6H4.js";
|
|
8
8
|
import {
|
|
9
9
|
buildGraph,
|
|
10
10
|
parseProject
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-SPZNB7BS.js";
|
|
12
12
|
|
|
13
13
|
// src/mcpb-entry.ts
|
|
14
14
|
import { resolve } from "path";
|
package/dist/sdk.d.ts
CHANGED
|
@@ -169,6 +169,8 @@ interface SimulationResult {
|
|
|
169
169
|
simulatedGraph: GraphSnapshot;
|
|
170
170
|
diff: GraphDiff;
|
|
171
171
|
healthDelta: HealthDelta;
|
|
172
|
+
/** The cloned graph with the simulation applied — available for viz data generation */
|
|
173
|
+
simulatedGraphInstance?: DirectedGraph;
|
|
172
174
|
}
|
|
173
175
|
interface GraphSnapshot {
|
|
174
176
|
nodeCount: number;
|
package/dist/sdk.js
CHANGED