@bobfrankston/mailx 1.0.5 → 1.0.7

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/mailx.js +2 -8
  2. package/package.json +1 -1
package/bin/mailx.js CHANGED
@@ -9,12 +9,9 @@
9
9
  * mailx --external Bind to all interfaces (default: localhost only)
10
10
  */
11
11
 
12
- import { fileURLToPath } from "node:url";
13
- import path from "node:path";
14
12
  import net from "node:net";
15
13
 
16
14
  const PORT = 9333;
17
- const __dirname = path.dirname(fileURLToPath(import.meta.url));
18
15
  const args = process.argv.slice(2);
19
16
 
20
17
  function isPortInUse(port) {
@@ -48,17 +45,14 @@ async function main() {
48
45
  return;
49
46
  }
50
47
 
51
- // Start server in-process (unified mode)
52
48
  console.log(`Starting mailx on port ${PORT}...`);
53
49
 
54
- // Pass --external to server if requested
55
50
  if (args.includes("--external")) process.argv.push("--external");
56
51
 
57
- // Import and start the server directly — no subprocess
58
- await import(path.join(__dirname, "..", "packages", "mailx-server", "index.js"));
52
+ // Import server directly — relative path, in-process
53
+ await import("../packages/mailx-server/index.js");
59
54
 
60
55
  if (!noBrowser) {
61
- // Wait a moment for server to be ready
62
56
  for (let i = 0; i < 30; i++) {
63
57
  await new Promise(r => setTimeout(r, 200));
64
58
  if (await isPortInUse(PORT)) break;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bobfrankston/mailx",
3
- "version": "1.0.5",
3
+ "version": "1.0.7",
4
4
  "description": "Local-first email client with IMAP sync and standalone native app",
5
5
  "type": "module",
6
6
  "main": "bin/mailx.js",