@ayoxx/kundex 2.0.0 → 2.0.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/bin/kundex.mjs +8 -4
  2. package/package.json +1 -1
package/bin/kundex.mjs CHANGED
@@ -1,17 +1,21 @@
1
1
  #!/usr/bin/env node
2
- // Thin launcher: re-execs node with tsx's ESM loader registered via --import,
3
- // so we can run the TypeScript source directly without a separate build
4
- // step, then hands off to the real entrypoint.
2
+ // Thin launcher: re-executes node with tsx's ESM loader registered via --import,
3
+ // so we can run the TypeScript source directly without a separate build step.
5
4
  import { spawnSync } from "node:child_process";
6
5
  import { fileURLToPath } from "node:url";
7
6
  import path from "node:path";
7
+ import { createRequire } from "node:module";
8
8
 
9
9
  const here = path.dirname(fileURLToPath(import.meta.url));
10
10
  const entry = path.join(here, "..", "src", "index.ts");
11
11
 
12
+ // Resolve tsx from the package's own dependencies, not from cwd
13
+ const require = createRequire(import.meta.url);
14
+ const tsxPath = require.resolve("tsx/esm");
15
+
12
16
  const result = spawnSync(
13
17
  process.execPath,
14
- ["--import", "tsx/esm", entry, ...process.argv.slice(2)],
18
+ ["--import", tsxPath, entry, ...process.argv.slice(2)],
15
19
  { stdio: "inherit" },
16
20
  );
17
21
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ayoxx/kundex",
3
- "version": "2.0.0",
3
+ "version": "2.0.1",
4
4
  "description": "Kundex — a terminal-based AI coding agent CLI and SDK, powered by Mistral and Heavstal AI.",
5
5
  "type": "module",
6
6
  "bin": {