depwire-cli 0.2.0 → 0.2.1

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/index.js +7 -2
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -15,8 +15,9 @@ import {
15
15
 
16
16
  // src/index.ts
17
17
  import { Command } from "commander";
18
- import { resolve } from "path";
18
+ import { resolve, dirname, join } from "path";
19
19
  import { writeFileSync, readFileSync, existsSync } from "fs";
20
+ import { fileURLToPath } from "url";
20
21
 
21
22
  // src/graph/serializer.ts
22
23
  import { DirectedGraph } from "graphology";
@@ -85,8 +86,12 @@ function importFromJSON(json) {
85
86
  }
86
87
 
87
88
  // src/index.ts
89
+ var __filename = fileURLToPath(import.meta.url);
90
+ var __dirname = dirname(__filename);
91
+ var packageJsonPath = join(__dirname, "../package.json");
92
+ var packageJson = JSON.parse(readFileSync(packageJsonPath, "utf-8"));
88
93
  var program = new Command();
89
- program.name("depwire").description("Code cross-reference graph builder for TypeScript projects").version("0.1.0");
94
+ program.name("depwire").description("Code cross-reference graph builder for TypeScript projects").version(packageJson.version);
90
95
  program.command("parse").description("Parse a TypeScript project and build dependency graph").argument("<directory>", "Project directory to parse").option("-o, --output <path>", "Output JSON file path", "depwire-output.json").option("--pretty", "Pretty-print JSON output").option("--stats", "Print summary statistics").option("--exclude <patterns...>", 'Glob patterns to exclude (e.g., "**/*.test.*" "dist/**")').option("--verbose", "Show detailed parsing progress").action(async (directory, options) => {
91
96
  const startTime = Date.now();
92
97
  try {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "depwire-cli",
3
- "version": "0.2.0",
3
+ "version": "0.2.1",
4
4
  "description": "Code cross-reference visualization and AI context engine for TypeScript. Analyzes codebases to show dependencies, enables AI tools with MCP, and renders beautiful arc diagrams.",
5
5
  "type": "module",
6
6
  "bin": {