react-native-email-imap-smtp 0.3.27 → 0.3.29

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,225 +1,225 @@
1
- {
2
- "name": "react-native-email-imap-smtp",
3
- "version": "0.3.27",
4
- "description": "The best of imap and smtp client of react native",
5
- "main": "./lib/module/index.js",
6
- "types": "./lib/typescript/src/index.d.ts",
7
- "bin": {
8
- "email-imap-proxy": "./server/bin.mjs"
9
- },
10
- "exports": {
11
- ".": {
12
- "react-native-email-imap-smtp-source": "./src/index.tsx",
13
- "types": "./lib/typescript/src/index.d.ts",
14
- "default": "./lib/module/index.js"
15
- },
16
- "./server/proxy": {
17
- "import": "./server/proxy.mjs",
18
- "default": "./server/proxy.mjs"
19
- },
20
- "./server/bin": {
21
- "import": "./server/bin.mjs",
22
- "default": "./server/bin.mjs"
23
- },
24
- "./package.json": "./package.json"
25
- },
26
- "files": [
27
- "src",
28
- "lib",
29
- "server",
30
- "android",
31
- "ios",
32
- "windows",
33
- "cpp",
34
- "nitrogen",
35
- "nitro.json",
36
- "*.podspec",
37
- "react-native.config.js",
38
- "!ios/build",
39
- "!android/build",
40
- "!android/gradle",
41
- "!android/gradlew",
42
- "!android/gradlew.bat",
43
- "!android/local.properties",
44
- "!**/__tests__",
45
- "!**/__fixtures__",
46
- "!**/__mocks__",
47
- "!**/.*",
48
- "!windows-standalone-test"
49
- ],
50
- "scripts": {
51
- "example": "yarn workspace react-native-email-imap-smtp-example",
52
- "clean": "del-cli android/build example/android/build example/android/app/build example/ios/build lib windows-standalone-test/build",
53
- "prepare": "bob build && node scripts/fix-types.js",
54
- "nitrogen": "nitrogen",
55
- "windows:init": "npx react-native init-windows --template cpp-lib --overwrite",
56
- "build:windows": "cd windows-standalone-test && cmake -B build && cmake --build build --config Debug",
57
- "build:windows:release": "cd windows-standalone-test && cmake -B build && cmake --build build --config Release",
58
- "test:windows": "cd windows-standalone-test && cmake -B build && cmake --build build --config Debug && .\\build\\Debug\\EmailTest.exe",
59
- "server": "cd server && npm start",
60
- "server:dev": "cd server && npm run dev",
61
- "server:install": "cd server && npm install",
62
- "typecheck": "tsc",
63
- "lint": "eslint \"**/*.{js,ts,tsx}\"",
64
- "fix": "eslint --fix \"**/*.{js,ts,tsx}\"",
65
- "test": "jest",
66
- "release": "release-it --only-version",
67
- "web": "vite",
68
- "build:web": "vite build",
69
- "mumu": "node scripts/start-mumu.js",
70
- "mumu:1": "node scripts/start-mumu.js --instance 1",
71
- "mumu:no-start": "node scripts/start-mumu.js --no-start"
72
- },
73
- "keywords": [
74
- "react-native",
75
- "ios",
76
- "android"
77
- ],
78
- "repository": {
79
- "type": "git",
80
- "url": "git+https://gitee.com/dongfangshuo001/react-native-email-imap-smtp.git"
81
- },
82
- "author": "东方朔 <dengyangyong999@163.com> (https://gitee.com/dongfangshuo001)",
83
- "license": "MIT",
84
- "bugs": {
85
- "url": "https://gitee.com/dongfangshuo001/react-native-email-imap-smtp.git/issues"
86
- },
87
- "homepage": "https://gitee.com/dongfangshuo001/react-native-email-imap-smtp.git#readme",
88
- "publishConfig": {
89
- "registry": "https://registry.npmjs.org/"
90
- },
91
- "devDependencies": {
92
- "@commitlint/config-conventional": "^21.0.2",
93
- "@eslint/compat": "^2.1.0",
94
- "@eslint/eslintrc": "^3.3.5",
95
- "@eslint/js": "^10.0.1",
96
- "@jest/globals": "^29.7.0",
97
- "@react-native/babel-preset": "0.85.0",
98
- "@react-native/eslint-config": "0.85.0",
99
- "@react-native/jest-preset": "0.85.0",
100
- "@release-it/conventional-changelog": "^11.0.1",
101
- "@types/react": "^19.2.0",
102
- "commitlint": "^21.0.2",
103
- "del-cli": "^7.0.0",
104
- "eslint": "^9.39.4",
105
- "eslint-config-prettier": "^10.1.8",
106
- "eslint-plugin-ft-flow": "^3.0.11",
107
- "eslint-plugin-prettier": "^5.5.6",
108
- "jest": "^29.7.0",
109
- "lefthook": "^2.1.9",
110
- "nitrogen": "^0.36.1",
111
- "prettier": "^3.8.3",
112
- "react": "19.2.3",
113
- "react-native": "0.85.0",
114
- "react-native-builder-bob": "^0.43.0",
115
- "react-native-nitro-modules": "^0.36.1",
116
- "react-native-web": "~0.21.2",
117
- "react-native-windows": "0.84.0",
118
- "release-it": "^20.2.0",
119
- "turbo": "^2.9.16",
120
- "typescript": "^6.0.3"
121
- },
122
- "peerDependencies": {
123
- "react": "*",
124
- "react-native": "*",
125
- "react-native-nitro-modules": "^0.36.1",
126
- "react-native-windows": "0.84.0"
127
- },
128
- "workspaces": [
129
- "example"
130
- ],
131
- "packageManager": "yarn@4.11.0",
132
- "react-native-builder-bob": {
133
- "source": "src",
134
- "output": "lib",
135
- "targets": [
136
- [
137
- "custom",
138
- {
139
- "script": "nitrogen",
140
- "clean": "nitrogen/"
141
- }
142
- ],
143
- [
144
- "module"
145
- ],
146
- [
147
- "typescript",
148
- {
149
- "project": "tsconfig.build.json"
150
- }
151
- ]
152
- ]
153
- },
154
- "prettier": {
155
- "quoteProps": "consistent",
156
- "singleQuote": true,
157
- "tabWidth": 2,
158
- "trailingComma": "es5",
159
- "useTabs": false
160
- },
161
- "jest": {
162
- "preset": "@react-native/jest-preset",
163
- "testEnvironmentOptions": {
164
- "customExportConditions": [
165
- "require",
166
- "react-native",
167
- "<%- project.sourceCondition -%>"
168
- ]
169
- },
170
- "modulePathIgnorePatterns": [
171
- "<rootDir>/example/node_modules",
172
- "<rootDir>/lib/"
173
- ]
174
- },
175
- "commitlint": {
176
- "extends": [
177
- "@commitlint/config-conventional"
178
- ]
179
- },
180
- "release-it": {
181
- "git": {
182
- "commitMessage": "chore: release ${version}",
183
- "tagName": "v${version}"
184
- },
185
- "npm": {
186
- "publish": true
187
- },
188
- "github": {
189
- "release": true
190
- },
191
- "plugins": {
192
- "@release-it/conventional-changelog": {
193
- "preset": {
194
- "name": "angular"
195
- }
196
- }
197
- }
198
- },
199
- "create-react-native-library": {
200
- "type": "nitro-module",
201
- "languages": "kotlin-swift",
202
- "tools": [
203
- "eslint",
204
- "jest",
205
- "lefthook",
206
- "release-it",
207
- "vite"
208
- ],
209
- "version": "0.63.0"
210
- },
211
- "codegenConfig": {
212
- "windows": {
213
- "namespace": "ReactNativeEmailImapSmtpCodegen",
214
- "outputDirectory": "windows/ReactNativeEmailImapSmtp/codegen",
215
- "separateDataTypes": true
216
- }
217
- },
218
- "react-native-windows": {
219
- "init-windows": {
220
- "name": "ReactNativeEmailImapSmtp",
221
- "namespace": "ReactNativeEmailImapSmtp",
222
- "template": "cpp-lib"
223
- }
224
- }
225
- }
1
+ {
2
+ "name": "react-native-email-imap-smtp",
3
+ "version": "0.3.29",
4
+ "description": "The best of imap and smtp client of react native",
5
+ "main": "./lib/module/index.js",
6
+ "types": "./lib/typescript/src/index.d.ts",
7
+ "bin": {
8
+ "email-imap-proxy": "./server/bin.mjs"
9
+ },
10
+ "exports": {
11
+ ".": {
12
+ "react-native-email-imap-smtp-source": "./src/index.tsx",
13
+ "types": "./lib/typescript/src/index.d.ts",
14
+ "default": "./lib/module/index.js"
15
+ },
16
+ "./server/proxy": {
17
+ "import": "./server/proxy.mjs",
18
+ "default": "./server/proxy.mjs"
19
+ },
20
+ "./server/bin": {
21
+ "import": "./server/bin.mjs",
22
+ "default": "./server/bin.mjs"
23
+ },
24
+ "./package.json": "./package.json"
25
+ },
26
+ "files": [
27
+ "src",
28
+ "lib",
29
+ "server",
30
+ "android",
31
+ "ios",
32
+ "windows",
33
+ "cpp",
34
+ "nitrogen",
35
+ "nitro.json",
36
+ "*.podspec",
37
+ "react-native.config.js",
38
+ "!ios/build",
39
+ "!android/build",
40
+ "!android/gradle",
41
+ "!android/gradlew",
42
+ "!android/gradlew.bat",
43
+ "!android/local.properties",
44
+ "!**/__tests__",
45
+ "!**/__fixtures__",
46
+ "!**/__mocks__",
47
+ "!**/.*",
48
+ "!windows-standalone-test"
49
+ ],
50
+ "scripts": {
51
+ "example": "yarn workspace react-native-email-imap-smtp-example",
52
+ "clean": "del-cli android/build example/android/build example/android/app/build example/ios/build lib windows-standalone-test/build",
53
+ "prepare": "bob build && node scripts/fix-types.js",
54
+ "nitrogen": "nitrogen",
55
+ "windows:init": "npx react-native init-windows --template cpp-lib --overwrite",
56
+ "build:windows": "cd windows-standalone-test && cmake -B build && cmake --build build --config Debug",
57
+ "build:windows:release": "cd windows-standalone-test && cmake -B build && cmake --build build --config Release",
58
+ "test:windows": "cd windows-standalone-test && cmake -B build && cmake --build build --config Debug && .\\build\\Debug\\EmailTest.exe",
59
+ "server": "cd server && npm start",
60
+ "server:dev": "cd server && npm run dev",
61
+ "server:install": "cd server && npm install",
62
+ "typecheck": "tsc",
63
+ "lint": "eslint \"**/*.{js,ts,tsx}\"",
64
+ "fix": "eslint --fix \"**/*.{js,ts,tsx}\"",
65
+ "test": "jest",
66
+ "release": "release-it --only-version",
67
+ "web": "vite",
68
+ "build:web": "vite build",
69
+ "mumu": "node scripts/start-mumu.js",
70
+ "mumu:1": "node scripts/start-mumu.js --instance 1",
71
+ "mumu:no-start": "node scripts/start-mumu.js --no-start"
72
+ },
73
+ "keywords": [
74
+ "react-native",
75
+ "ios",
76
+ "android"
77
+ ],
78
+ "repository": {
79
+ "type": "git",
80
+ "url": "git+https://gitee.com/dongfangshuo001/react-native-email-imap-smtp.git"
81
+ },
82
+ "author": "东方朔 <dengyangyong999@163.com> (https://gitee.com/dongfangshuo001)",
83
+ "license": "MIT",
84
+ "bugs": {
85
+ "url": "https://gitee.com/dongfangshuo001/react-native-email-imap-smtp.git/issues"
86
+ },
87
+ "homepage": "https://gitee.com/dongfangshuo001/react-native-email-imap-smtp.git#readme",
88
+ "publishConfig": {
89
+ "registry": "https://registry.npmjs.org/"
90
+ },
91
+ "devDependencies": {
92
+ "@commitlint/config-conventional": "^21.0.2",
93
+ "@eslint/compat": "^2.1.0",
94
+ "@eslint/eslintrc": "^3.3.5",
95
+ "@eslint/js": "^10.0.1",
96
+ "@jest/globals": "^29.7.0",
97
+ "@react-native/babel-preset": "0.85.0",
98
+ "@react-native/eslint-config": "0.85.0",
99
+ "@react-native/jest-preset": "0.85.0",
100
+ "@release-it/conventional-changelog": "^11.0.1",
101
+ "@types/react": "^19.2.0",
102
+ "commitlint": "^21.0.2",
103
+ "del-cli": "^7.0.0",
104
+ "eslint": "^9.39.4",
105
+ "eslint-config-prettier": "^10.1.8",
106
+ "eslint-plugin-ft-flow": "^3.0.11",
107
+ "eslint-plugin-prettier": "^5.5.6",
108
+ "jest": "^29.7.0",
109
+ "lefthook": "^2.1.9",
110
+ "nitrogen": "^0.36.1",
111
+ "prettier": "^3.8.3",
112
+ "react": "19.2.3",
113
+ "react-native": "0.85.0",
114
+ "react-native-builder-bob": "^0.43.0",
115
+ "react-native-nitro-modules": "^0.36.1",
116
+ "react-native-web": "~0.21.2",
117
+ "react-native-windows": "0.84.0",
118
+ "release-it": "^20.2.0",
119
+ "turbo": "^2.9.16",
120
+ "typescript": "^6.0.3"
121
+ },
122
+ "peerDependencies": {
123
+ "react": "*",
124
+ "react-native": "*",
125
+ "react-native-nitro-modules": "^0.36.1",
126
+ "react-native-windows": "0.84.0"
127
+ },
128
+ "workspaces": [
129
+ "example"
130
+ ],
131
+ "packageManager": "yarn@4.11.0",
132
+ "react-native-builder-bob": {
133
+ "source": "src",
134
+ "output": "lib",
135
+ "targets": [
136
+ [
137
+ "custom",
138
+ {
139
+ "script": "nitrogen",
140
+ "clean": "nitrogen/"
141
+ }
142
+ ],
143
+ [
144
+ "module"
145
+ ],
146
+ [
147
+ "typescript",
148
+ {
149
+ "project": "tsconfig.build.json"
150
+ }
151
+ ]
152
+ ]
153
+ },
154
+ "prettier": {
155
+ "quoteProps": "consistent",
156
+ "singleQuote": true,
157
+ "tabWidth": 2,
158
+ "trailingComma": "es5",
159
+ "useTabs": false
160
+ },
161
+ "jest": {
162
+ "preset": "@react-native/jest-preset",
163
+ "testEnvironmentOptions": {
164
+ "customExportConditions": [
165
+ "require",
166
+ "react-native",
167
+ "<%- project.sourceCondition -%>"
168
+ ]
169
+ },
170
+ "modulePathIgnorePatterns": [
171
+ "<rootDir>/example/node_modules",
172
+ "<rootDir>/lib/"
173
+ ]
174
+ },
175
+ "commitlint": {
176
+ "extends": [
177
+ "@commitlint/config-conventional"
178
+ ]
179
+ },
180
+ "release-it": {
181
+ "git": {
182
+ "commitMessage": "chore: release ${version}",
183
+ "tagName": "v${version}"
184
+ },
185
+ "npm": {
186
+ "publish": true
187
+ },
188
+ "github": {
189
+ "release": true
190
+ },
191
+ "plugins": {
192
+ "@release-it/conventional-changelog": {
193
+ "preset": {
194
+ "name": "angular"
195
+ }
196
+ }
197
+ }
198
+ },
199
+ "create-react-native-library": {
200
+ "type": "nitro-module",
201
+ "languages": "kotlin-swift",
202
+ "tools": [
203
+ "eslint",
204
+ "jest",
205
+ "lefthook",
206
+ "release-it",
207
+ "vite"
208
+ ],
209
+ "version": "0.63.0"
210
+ },
211
+ "codegenConfig": {
212
+ "windows": {
213
+ "namespace": "ReactNativeEmailImapSmtpCodegen",
214
+ "outputDirectory": "windows/ReactNativeEmailImapSmtp/codegen",
215
+ "separateDataTypes": true
216
+ }
217
+ },
218
+ "react-native-windows": {
219
+ "init-windows": {
220
+ "name": "ReactNativeEmailImapSmtp",
221
+ "namespace": "ReactNativeEmailImapSmtp",
222
+ "template": "cpp-lib"
223
+ }
224
+ }
225
+ }
@@ -1 +1 @@
1
- {"version":3,"file":"imapHandler.d.ts","sourceRoot":"","sources":["../src/imapHandler.ts"],"names":[],"mappings":"AAoJA,wBAAsB,OAAO,CAAC,MAAM,EAAE,GAAG,GAAG,OAAO,CAAC,GAAG,CAAC,CA8CvD;AAID,wBAAsB,UAAU,CAAC,SAAS,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAWjE;AAID,wBAAsB,aAAa,CAAC,SAAS,EAAE,MAAM,GAAG,OAAO,CAAC,GAAG,EAAE,CAAC,CAUrE;AAID,wBAAsB,aAAa,CACjC,SAAS,EAAE,MAAM,EACjB,OAAO,EAAE,M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,MAAM,GACb,OAAO,CAAC,GAAG,GAAG,IAAI,CAAC,CA4CrB;AAED,wBAAsB,mBAAmB,CACvC,SAAS,EAAE,MAAM,EACjB,GAAG,EAAE,MAAM,GACV,OAAO,CAAC,GAAG,EAAE,CAAC,CAoIhB;AAMD,wBAAgB,SAAS,CACvB,SAAS,EAAE,MAAM,EACjB,QAAQ,EAAE,CAAC,YAAY,EAAE,GAAG,KAAK,IAAI,GACpC,IAAI,CAEN;AAED,wBAAgB,QAAQ,CAAC,SAAS,EAAE,MAAM,GAAG,IAAI,CAEhD;AAID,wBAAsB,QAAQ,CAAC,SAAS,EAAE,MAAM,EAAE,IAAI,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,GAAG,CAAC,CAmB7E;AAID,wBAAsB,aAAa,CACjC,SAAS,EAAE,MAAM,EACjB,OAAO,EAAE,MAAM,EACf,WAAW,EAAE,MAAM,EACnB,KAAK,EAAE,MAAM,EAAE,GAAG,IAAI,GACrB,OAAO,CAAC,GAAG,CAAC,CA2Bd;AAID,wBAAgB,gBAAgB,IAAI,MAAM,EAAE,CAE3C"}
@@ -776,26 +776,46 @@ async function fetchAllAttachments(sessionId, uid) {
776
776
  try {
777
777
  const att = await fetchAttachment(sessionId, uid, partId);
778
778
  if (att) {
779
- // 完整性校验:实际解码字节数应与 bodyStructure 的 size 一致。
780
- // ⚠️ size 常是「编码后字节数」(base64+CRLF),需用 lineCount 反推解码大小。
781
- // 兼容两种服务器约定(直接报解码大小 / 报编码大小),匹配任一即视为完整。
779
+ // 完整性校验(仅告警,不阻断):
780
+ // 目的:帮助排查下载异常,但绝不因校验失败丢弃附件——
781
+ // 下载完整性已由 imapflow download() 机制保证(持续 fetch 到短块、
782
+ // 出错抛异常 → fetchAttachment 返回 null)。
783
+ // ⚠️ bodyStructure 的 size 是「传输编码后」字节数,且 163 等服务器
784
+ // 会把 base64 按 ~76 字符/行 + CRLF 输出(size 含换行),反推存在
785
+ // 固有误差;因此这里只做提示,不阻断返回,避免附件被误杀。
786
+ // 告警会同时:① 打印到代理终端 ② 附加到附件对象(integrityWarning),
787
+ // 由客户端(index.tsx 公共层)转发到应用控制台/原生调试输出。
782
788
  const expected = partSizes[partId];
783
789
  const actual = Buffer.from(att.data, 'base64').length;
784
790
  if (expected !== undefined) {
785
- const candidates = [expected];
786
791
  const isBase64 = String(partEncodings[partId] ?? '')
787
792
  .toLowerCase()
788
793
  .includes('base64');
789
- const lineCount = partLineCounts[partId] ?? 0;
790
- if (isBase64 && lineCount > 0) {
791
- // 编码后大小 = 无换行 base64 长度 + 每行 CRLF(2字节)
792
- // 解码大小 ≈ (size - 2*lineCount) * 3/4
793
- candidates.push(Math.floor(((expected - 2 * lineCount) * 3) / 4));
794
+ const lineCount = partLineCounts[partId];
795
+ const hasLineCount = typeof lineCount === 'number' && lineCount > 0;
796
+ if (isBase64 && hasLineCount) {
797
+ // 文本附件:有 lineCount,可精确反推
798
+ // - expected:服务器直接报「解码大小」
799
+ // - (expected - 2*lineCount)*3/4:编码后带每行 CRLF 换行
800
+ const candidates = [
801
+ expected,
802
+ Math.floor(((expected - 2 * lineCount) * 3) / 4),
803
+ ];
804
+ const matched = candidates.some((c) => Math.abs(actual - c) <= 4);
805
+ if (!matched) {
806
+ const msg = `附件大小与服务器声明不符: ${att.filename} 实际 ${actual}B vs 期望 ${candidates.join('/')}B`;
807
+ console.warn(`[fetchAllAttachments] size-mismatch: ${msg}, KEPT`);
808
+ att.integrityWarning = msg;
809
+ }
794
810
  }
795
- const matched = candidates.some((c) => Math.abs(actual - c) <= 4);
796
- if (!matched) {
797
- console.log(`[fetchAllAttachments] truncated: part ${partId} ${actual} bytes vs expected ${candidates.join('|')}, skipped`);
798
- continue;
811
+ else if (isBase64) {
812
+ // 二进制附件(docx/pdf/png 等,无 lineCount):size 语义不可靠,
813
+ // 只对「严重异常」(实际 < 期望 50%)告警,同样不阻断。
814
+ if (actual < expected * 0.5) {
815
+ const msg = `附件疑似截断: ${att.filename} 实际 ${actual}B vs 期望 ${expected}B (<50%)`;
816
+ console.warn(`[fetchAllAttachments] size-mismatch: ${msg}, KEPT`);
817
+ att.integrityWarning = msg;
818
+ }
799
819
  }
800
820
  }
801
821
  results.push(att);