great-cto 2.2.0 → 2.3.0
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/index.mjs +5 -2
- package/package.json +1 -1
package/index.mjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
// Entry point: loads the compiled dist/main.js.
|
|
3
3
|
// For local dev, run: `npm run build` first, then `node index.mjs`.
|
|
4
|
-
import { fileURLToPath } from "node:url";
|
|
4
|
+
import { fileURLToPath, pathToFileURL } from "node:url";
|
|
5
5
|
import { dirname, join } from "node:path";
|
|
6
6
|
import { existsSync } from "node:fs";
|
|
7
7
|
|
|
@@ -14,4 +14,7 @@ if (!existsSync(compiled)) {
|
|
|
14
14
|
process.exit(1);
|
|
15
15
|
}
|
|
16
16
|
|
|
17
|
-
|
|
17
|
+
// Convert path to file:// URL — required by Node's ESM loader on Windows
|
|
18
|
+
// (absolute paths like "D:\\..." are not accepted as bare strings).
|
|
19
|
+
// Works equivalently on macOS / Linux.
|
|
20
|
+
await import(pathToFileURL(compiled).href);
|
package/package.json
CHANGED