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 +1 -1
- package/server/bin.mjs +2 -5
- package/server/proxy.mjs +1 -1
package/package.json
CHANGED
package/server/bin.mjs
CHANGED
|
@@ -43,12 +43,9 @@ startEmailProxy({ port, silent, detach: !foreground }).then((handle) => {
|
|
|
43
43
|
}
|
|
44
44
|
});
|
|
45
45
|
|
|
46
|
-
//
|
|
47
|
-
// Windows 上 process.exit(0) 会连带杀掉 detached 子进程,所以不再主动退出
|
|
46
|
+
// 默认(分离模式):启动完成后父进程立即退出,代理在后台独立运行
|
|
48
47
|
if (!foreground) {
|
|
49
|
-
|
|
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,
|