monarch-code-graph 0.4.1 → 0.4.2

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.
Files changed (2) hide show
  1. package/dist/cli.js +8 -1
  2. package/package.json +1 -1
package/dist/cli.js CHANGED
@@ -967,6 +967,9 @@ var init_dist2 = __esm({
967
967
 
968
968
  // src/cli.ts
969
969
  import { Command } from "commander";
970
+ import { readFileSync } from "fs";
971
+ import { fileURLToPath } from "url";
972
+ import { dirname, join } from "path";
970
973
 
971
974
  // src/commands/analyze.ts
972
975
  init_dist2();
@@ -2619,8 +2622,12 @@ function detectExpandType(artifact, name) {
2619
2622
  }
2620
2623
 
2621
2624
  // src/cli.ts
2625
+ var __filename = fileURLToPath(import.meta.url);
2626
+ var __dirname2 = dirname(__filename);
2627
+ var packageJsonPath = join(__dirname2, "..", "package.json");
2628
+ var packageJson = JSON.parse(readFileSync(packageJsonPath, "utf-8"));
2622
2629
  var program = new Command();
2623
- program.name("monarch").description("Monarch - Static codebase flow mapping and visualization").version("0.1.0").addHelpCommand(false);
2630
+ program.name("monarch").description("Monarch - Static codebase flow mapping and visualization").version(packageJson.version).addHelpCommand(false);
2624
2631
  program.command("init").description("Initialize a new Monarch project in the current directory").option("-f, --force", "Overwrite existing configuration", false).action(initCommand);
2625
2632
  program.command("analyze").alias("a").description("Analyze a codebase and generate flow artifact").argument("[path]", "Path to the codebase", ".").option("-o, --output <path>", "Output artifact path", "monarch-graph.json").option("-e, --exporter <name>", "Exporter to use (mock, codeql-ts)", "mock").option("-w, --watch", "Watch for changes and re-analyze", false).action(analyzeCommand2);
2626
2633
  program.command("diff").alias("d").description("Compare two graph artifacts and show changes").argument("<baseline>", "Path to baseline artifact").argument("<current>", "Path to current artifact").option("-f, --format <type>", "Output format (text, json, markdown)", "text").option("--exit-on-changes", "Exit with code 1 if changes detected", false).option("--only <type>", "Show only specific changes (functions, modules, edges)").action(diffCommand2);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "monarch-code-graph",
3
- "version": "0.4.1",
3
+ "version": "0.4.2",
4
4
  "description": "CLI tool for Monarch - Static codebase flow mapping and visualization",
5
5
  "type": "module",
6
6
  "bin": {