pairai 0.1.0 → 0.1.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.js +7 -2
  2. package/package.json +1 -1
package/bin.js CHANGED
@@ -1,12 +1,17 @@
1
1
  #!/usr/bin/env node
2
2
  import { spawnSync } from "node:child_process";
3
- import { fileURLToPath } from "node:url";
3
+ import { fileURLToPath, pathToFileURL } from "node:url";
4
4
  import { dirname, join } from "node:path";
5
+ import { createRequire } from "node:module";
5
6
 
6
7
  const __dirname = dirname(fileURLToPath(import.meta.url));
8
+ const require = createRequire(import.meta.url);
9
+
10
+ // Resolve tsx from this package's node_modules as a file:// URL
11
+ const tsxPath = pathToFileURL(require.resolve("tsx")).href;
7
12
  const script = join(__dirname, "pairai-channel.ts");
8
13
 
9
- const result = spawnSync(process.execPath, ["--import", "tsx", script, ...process.argv.slice(2)], {
14
+ const result = spawnSync(process.execPath, ["--import", tsxPath, script, ...process.argv.slice(2)], {
10
15
  stdio: "inherit",
11
16
  env: process.env,
12
17
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pairai",
3
- "version": "0.1.0",
3
+ "version": "0.1.1",
4
4
  "description": "Connect AI agents to collaborate via the pairai hub — channel server for Claude Code",
5
5
  "type": "module",
6
6
  "license": "MIT",