@fudrouter/fsrouter 0.6.40 → 0.6.41

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/cli.cjs +5 -3
  2. package/package.json +1 -1
package/bin/cli.cjs CHANGED
@@ -2,6 +2,7 @@
2
2
 
3
3
  const { spawn, exec, execSync } = require("child_process");
4
4
  const path = require("path");
5
+ const { pathToFileURL } = require("node:url");
5
6
  const fs = require("fs");
6
7
  const https = require("https");
7
8
  const os = require("os");
@@ -508,13 +509,14 @@ function startServer(latestVersion) {
508
509
  function spawnServer() {
509
510
  serverStartTime = Date.now();
510
511
  crashLog = [];
511
- // Resolve tsx loader path (works cross-platform; bare --import tsx fails on Windows)
512
+ // Resolve tsx loader path (works cross-platform; bare --import tsx fails on Windows,
513
+ // absolute paths need file:// URL on Windows ESM loader)
512
514
  let tsxImport;
513
515
  try {
514
- tsxImport = require.resolve("tsx/esm");
516
+ tsxImport = pathToFileURL(require.resolve("tsx/esm")).href;
515
517
  } catch (_) {
516
518
  try {
517
- tsxImport = require.resolve("tsx");
519
+ tsxImport = pathToFileURL(require.resolve("tsx")).href;
518
520
  } catch (_) {
519
521
  tsxImport = "tsx";
520
522
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fudrouter/fsrouter",
3
- "version": "0.6.40",
3
+ "version": "0.6.41",
4
4
  "private": false,
5
5
  "type": "module",
6
6
  "description": "9Router v2 \u2014 Express Backend (API, SSE, DB, Auth, MITM)",