call-me-cloud-mcp 1.0.2 → 1.0.3
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.
- package/bin/run.js +4 -2
- package/package.json +1 -1
package/bin/run.js
CHANGED
|
@@ -3,12 +3,14 @@
|
|
|
3
3
|
import { spawn } from 'node:child_process';
|
|
4
4
|
import { dirname, join } from 'node:path';
|
|
5
5
|
import { fileURLToPath } from 'node:url';
|
|
6
|
+
import { createRequire } from 'node:module';
|
|
6
7
|
|
|
7
8
|
const __dirname = dirname(fileURLToPath(import.meta.url));
|
|
8
9
|
const indexPath = join(__dirname, '..', 'index.ts');
|
|
9
10
|
|
|
10
|
-
//
|
|
11
|
-
const
|
|
11
|
+
// Use createRequire to properly resolve tsx from wherever npm installed it
|
|
12
|
+
const require = createRequire(import.meta.url);
|
|
13
|
+
const tsxLoaderPath = require.resolve('tsx/esm');
|
|
12
14
|
|
|
13
15
|
// Spawn node with tsx loader using --import flag (Node 20.6+/18.19+ compatible)
|
|
14
16
|
const child = spawn(
|