@kentwynn/kgraph 0.1.1 → 0.1.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/index.js +15 -2
  2. package/package.json +2 -2
package/dist/cli/index.js CHANGED
@@ -1,4 +1,6 @@
1
1
  #!/usr/bin/env node
2
+ import { realpathSync } from "node:fs";
3
+ import { fileURLToPath } from "node:url";
2
4
  import { Command } from "commander";
3
5
  import { registerInitCommand } from "./commands/init.js";
4
6
  import { registerScanCommand } from "./commands/scan.js";
@@ -10,7 +12,7 @@ export function createProgram() {
10
12
  program
11
13
  .name("kgraph")
12
14
  .description("Persistent repo intelligence for AI coding assistants")
13
- .version("0.1.0");
15
+ .version("0.1.1");
14
16
  registerInitCommand(program);
15
17
  registerScanCommand(program);
16
18
  registerUpdateCommand(program);
@@ -18,6 +20,17 @@ export function createProgram() {
18
20
  registerIntegrateCommand(program);
19
21
  return program;
20
22
  }
21
- if (import.meta.url === `file://${process.argv[1]}`) {
23
+ if (isCliEntrypoint()) {
22
24
  await createProgram().parseAsync(process.argv);
23
25
  }
26
+ function isCliEntrypoint() {
27
+ if (!process.argv[1]) {
28
+ return false;
29
+ }
30
+ try {
31
+ return realpathSync(fileURLToPath(import.meta.url)) === realpathSync(process.argv[1]);
32
+ }
33
+ catch {
34
+ return import.meta.url === `file://${process.argv[1]}`;
35
+ }
36
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kentwynn/kgraph",
3
- "version": "0.1.1",
3
+ "version": "0.1.2",
4
4
  "description": "Persistent repo intelligence for AI coding assistants.",
5
5
  "type": "module",
6
6
  "bin": {
@@ -40,12 +40,12 @@
40
40
  "dependencies": {
41
41
  "commander": "^12.1.0",
42
42
  "fast-glob": "^3.3.2",
43
+ "typescript": "^5.9.3",
43
44
  "yaml": "^2.5.1"
44
45
  },
45
46
  "devDependencies": {
46
47
  "@types/node": "^20.17.10",
47
48
  "tsx": "^4.19.2",
48
- "typescript": "^5.7.2",
49
49
  "vitest": "^2.1.8"
50
50
  },
51
51
  "engines": {