react-native-email-imap-smtp 0.3.14 → 0.3.16

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/package.json +3 -2
  2. package/server/bin.mjs +9 -5
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "react-native-email-imap-smtp",
3
- "version": "0.3.14",
3
+ "version": "0.3.16",
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",
@@ -9,7 +9,7 @@
9
9
  },
10
10
  "exports": {
11
11
  ".": {
12
- "react-native-email-imap-smtp-source": "./sr/index.tsx",
12
+ "react-native-email-imap-smtp-source": "./src/index.tsx",
13
13
  "types": "./lib/typescript/src/index.d.ts",
14
14
  "default": "./lib/module/index.js"
15
15
  },
@@ -51,6 +51,7 @@
51
51
  "example": "yarn workspace react-native-email-imap-smtp-example",
52
52
  "clean": "del-cli android/build example/android/build example/android/app/build example/ios/build lib windows-standalone-test/build",
53
53
  "prepare": "bob build",
54
+ "postprepare": "node scripts/fix-types.mjs",
54
55
  "nitrogen": "nitrogen",
55
56
  "windows:init": "npx react-native init-windows --template cpp-lib --overwrite",
56
57
  "build:windows": "cd windows-standalone-test && cmake -B build && cmake --build build --config Debug",
package/server/bin.mjs CHANGED
@@ -57,11 +57,15 @@ if (openWindow && !foreground) {
57
57
  const termPid = process.ppid;
58
58
 
59
59
  if (process.platform === 'win32') {
60
- // 拆成独立参数传给 spawn,避免 Node.js 自动加外层引号导致 start 误解析
61
- spawn('cmd', [
62
- '/c', 'start', `"Email Proxy :${port}"`, 'cmd', '/c',
63
- `set PROXY_WATCH_PPID=${termPid}&& "${nodeExe}" "${scriptPath}" --foreground --port ${port}`
64
- ], { stdio: 'ignore', detached: true, windowsHide: false }).unref();
60
+ // shell: true 交给 cmd.exe 处理,start 创建新窗口并显示日志
61
+ // 路径带引号由 cmd.exe 自己解析,无嵌套引号问题
62
+ spawn(
63
+ `start "" "${nodeExe}" "${scriptPath}" --foreground --port ${port}`,
64
+ [],
65
+ { shell: true, stdio: 'ignore', detached: true, windowsHide: false,
66
+ env: { ...process.env, PROXY_WATCH_PPID: String(termPid) }
67
+ }
68
+ ).unref();
65
69
  } else {
66
70
  spawn('open', ['-a', 'Terminal', scriptPath, '--args', '--foreground', `--port=${port}`], {
67
71
  stdio: 'ignore', detached: true,