@todoforai/cli 0.1.55 → 0.1.56

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.
@@ -2,9 +2,11 @@
2
2
  // Dev (linked repo) under bun: run src directly so there is no stale-build step.
3
3
  // Node (and the published package, which ships only dist/) runs the bundle;
4
4
  // the @shared/* file: deps are bundled in.
5
+ // import() takes the URL, not a path: on Windows fileURLToPath gives `C:\...`,
6
+ // which the ESM loader rejects (ERR_UNSUPPORTED_ESM_URL_SCHEME, protocol 'c:').
5
7
  import { existsSync } from "node:fs";
6
8
  import { fileURLToPath } from "node:url";
7
9
 
8
- const src = fileURLToPath(new URL("../src/index.ts", import.meta.url));
9
- const dist = fileURLToPath(new URL("../dist/todoforai-cli.js", import.meta.url));
10
- await import(existsSync(src) && typeof Bun !== "undefined" ? src : dist);
10
+ const src = new URL("../src/index.ts", import.meta.url);
11
+ const dist = new URL("../dist/todoforai-cli.js", import.meta.url);
12
+ await import((existsSync(fileURLToPath(src)) && typeof Bun !== "undefined" ? src : dist).href);