react-native-email-imap-smtp 0.3.8 → 0.3.9

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "react-native-email-imap-smtp",
3
- "version": "0.3.8",
3
+ "version": "0.3.9",
4
4
  "description": "The best of imap and smtp client of react native",
5
5
  "main": "./lib/module/index.js",
6
6
  "types": "./lib/typescript/src/index.d.ts",
package/server/bin.mjs CHANGED
@@ -43,12 +43,9 @@ startEmailProxy({ port, silent, detach: !foreground }).then((handle) => {
43
43
  }
44
44
  });
45
45
 
46
- // 默认模式:保持进程存活(后台由 shell 的 & 处理)
47
- // Windows 上 process.exit(0) 会连带杀掉 detached 子进程,所以不再主动退出
46
+ // 默认(分离模式):启动完成后父进程立即退出,代理在后台独立运行
48
47
  if (!foreground) {
49
- // 保持事件循环活跃(阻止进程退出,等待 stdin 关闭或 SIGTERM)
50
- process.stdin.resume();
51
- return;
48
+ process.exit(0);
52
49
  }
53
50
 
54
51
  // 前台模式:保持进程存活,等待退出信号
package/server/proxy.mjs CHANGED
@@ -73,7 +73,7 @@ export async function startEmailProxy(options = {}) {
73
73
 
74
74
  const proc = spawn('node', [entryFile], {
75
75
  cwd: serverDir,
76
- stdio: ['ignore', silent ? 'ignore' : 'inherit', 'pipe'],
76
+ stdio: ['ignore', silent || detach ? 'ignore' : 'inherit', 'pipe'],
77
77
  env: { ...process.env, PROXY_PORT: String(port) },
78
78
  shell: false,
79
79
  detached: detach,