@mavogel/awscdk-rootmail 0.1.5 → 0.1.6
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/.jsii +3 -3
- package/lib/rootmail.js +1 -1
- package/lib/ses-receive.js +1 -1
- package/node_modules/@aws-sdk/client-cloudwatch-logs/dist-cjs/index.js +1 -1
- package/node_modules/@aws-sdk/client-cloudwatch-logs/package.json +1 -1
- package/node_modules/@aws-sdk/client-route-53/dist-cjs/index.js +1 -1
- package/node_modules/@aws-sdk/client-route-53/package.json +1 -1
- package/node_modules/@aws-sdk/client-s3/dist-cjs/index.js +1 -1
- package/node_modules/@aws-sdk/client-s3/package.json +2 -2
- package/node_modules/@aws-sdk/client-ses/dist-cjs/index.js +1 -1
- package/node_modules/@aws-sdk/client-ses/package.json +1 -1
- package/node_modules/@aws-sdk/client-ssm/dist-cjs/index.js +1 -1
- package/node_modules/@aws-sdk/client-ssm/package.json +1 -1
- package/node_modules/@zone-eu/mailsplit/package.json +3 -3
- package/node_modules/encoding-japanese/LICENSE +25 -1
- package/node_modules/encoding-japanese/README.md +86 -51
- package/node_modules/encoding-japanese/encoding.js +107 -78
- package/node_modules/encoding-japanese/encoding.min.js +2 -2
- package/node_modules/encoding-japanese/index.d.ts +102 -0
- package/node_modules/encoding-japanese/package.json +26 -17
- package/node_modules/encoding-japanese/src/encoding-convert.js +67 -58
- package/node_modules/encoding-japanese/src/encoding-table.js +1 -0
- package/node_modules/encoding-japanese/src/index.js +1 -1
- package/node_modules/encoding-japanese/src/kana-case-table.js +1 -1
- package/node_modules/encoding-japanese/src/utf8-to-jis-alias-table.js +14 -0
- package/node_modules/encoding-japanese/src/utf8-to-jis-table.js +6 -5
- package/node_modules/encoding-japanese/src/utf8-to-jisx0212-table.js +7 -5
- package/node_modules/libmime/CHANGELOG.md +7 -0
- package/node_modules/libmime/package.json +2 -2
- package/node_modules/mailparser/.release-please-manifest.json +1 -1
- package/node_modules/mailparser/CHANGELOG.md +14 -0
- package/node_modules/mailparser/package.json +5 -5
- package/node_modules/nodemailer/CHANGELOG.md +9 -0
- package/node_modules/nodemailer/dist/cjs/dkim/message-parser.js +12 -5
- package/node_modules/nodemailer/dist/cjs/mail-composer/index.js +3 -1
- package/node_modules/nodemailer/dist/cjs/mailer/mail-message.js +2 -1
- package/node_modules/nodemailer/dist/cjs/package-info.d.ts +1 -1
- package/node_modules/nodemailer/dist/cjs/package-info.js +1 -1
- package/node_modules/nodemailer/dist/cjs/smtp-connection/index.d.ts +3 -0
- package/node_modules/nodemailer/dist/cjs/smtp-connection/index.js +62 -18
- package/node_modules/nodemailer/dist/esm/dkim/message-parser.js +12 -5
- package/node_modules/nodemailer/dist/esm/mail-composer/index.js +3 -1
- package/node_modules/nodemailer/dist/esm/mailer/mail-message.js +2 -1
- package/node_modules/nodemailer/dist/esm/package-info.d.ts +1 -1
- package/node_modules/nodemailer/dist/esm/package-info.js +1 -1
- package/node_modules/nodemailer/dist/esm/smtp-connection/index.d.ts +3 -0
- package/node_modules/nodemailer/dist/esm/smtp-connection/index.js +62 -18
- package/node_modules/nodemailer/package.json +1 -1
- package/package.json +1 -1
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
// TypeScript declarations originally from DefinitelyTyped
|
|
2
|
+
// Upstream package: @types/encoding-japanese 2.2.1
|
|
3
|
+
// Thanks to the DefinitelyTyped contributors
|
|
4
|
+
// Licensed under the MIT License. See the LICENSE file
|
|
5
|
+
|
|
6
|
+
export as namespace Encoding;
|
|
7
|
+
|
|
8
|
+
export type Encoding =
|
|
9
|
+
| "UTF32"
|
|
10
|
+
| "UTF16"
|
|
11
|
+
| "UTF16BE"
|
|
12
|
+
| "UTF16LE"
|
|
13
|
+
| "BINARY"
|
|
14
|
+
| "ASCII"
|
|
15
|
+
| "JIS"
|
|
16
|
+
| "UTF8"
|
|
17
|
+
| "EUCJP"
|
|
18
|
+
| "SJIS"
|
|
19
|
+
| "UNICODE"
|
|
20
|
+
| "AUTO";
|
|
21
|
+
type IntArrayType =
|
|
22
|
+
| readonly number[]
|
|
23
|
+
| Uint8Array
|
|
24
|
+
| Uint16Array
|
|
25
|
+
| Uint32Array
|
|
26
|
+
| Int8Array
|
|
27
|
+
| Int16Array
|
|
28
|
+
| Int32Array;
|
|
29
|
+
type EncodingDetection = Encoding | false;
|
|
30
|
+
|
|
31
|
+
export type ConvertOptions =
|
|
32
|
+
| ConvertStringOptions
|
|
33
|
+
| ConvertArrayBufferOptions
|
|
34
|
+
| ConvertArrayOptions
|
|
35
|
+
| ConvertUnknownOptions;
|
|
36
|
+
|
|
37
|
+
export interface ConvertStringOptions {
|
|
38
|
+
to: Encoding;
|
|
39
|
+
from?: Encoding | undefined;
|
|
40
|
+
type: "string";
|
|
41
|
+
fallback?: "html-entity" | "html-entity-hex" | "ignore" | "error";
|
|
42
|
+
bom?: boolean | string | undefined;
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
export interface ConvertArrayBufferOptions {
|
|
46
|
+
to: Encoding;
|
|
47
|
+
from?: Encoding | undefined;
|
|
48
|
+
type: "arraybuffer";
|
|
49
|
+
fallback?: "html-entity" | "html-entity-hex" | "ignore" | "error";
|
|
50
|
+
bom?: boolean | string | undefined;
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
export interface ConvertArrayOptions {
|
|
54
|
+
to: Encoding;
|
|
55
|
+
from?: Encoding | undefined;
|
|
56
|
+
type: "array";
|
|
57
|
+
fallback?: "html-entity" | "html-entity-hex" | "ignore" | "error";
|
|
58
|
+
bom?: boolean | string | undefined;
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
export interface ConvertUnknownOptions {
|
|
62
|
+
to: Encoding;
|
|
63
|
+
from?: Encoding | undefined;
|
|
64
|
+
fallback?: "html-entity" | "html-entity-hex" | "ignore" | "error";
|
|
65
|
+
bom?: boolean | string | undefined;
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
export function detect(data: IntArrayType | string, encodings?: Encoding | Encoding[]): EncodingDetection;
|
|
69
|
+
export function convert(data: IntArrayType, to: Encoding, from?: Encoding): number[];
|
|
70
|
+
export function convert(data: string, to: Encoding, from?: Encoding): string;
|
|
71
|
+
export function convert(data: IntArrayType | string, options: ConvertStringOptions): string;
|
|
72
|
+
export function convert(data: IntArrayType | string, options: ConvertArrayBufferOptions): Uint16Array;
|
|
73
|
+
export function convert(data: IntArrayType | string, options: ConvertArrayOptions): number[];
|
|
74
|
+
export function convert(data: string, options: ConvertUnknownOptions): string;
|
|
75
|
+
export function convert(data: IntArrayType, options: ConvertUnknownOptions): number[];
|
|
76
|
+
export function urlEncode(data: IntArrayType): string;
|
|
77
|
+
export function urlDecode(data: string): number[];
|
|
78
|
+
export function base64Encode(data: IntArrayType): string;
|
|
79
|
+
export function base64Decode(data: string): number[];
|
|
80
|
+
export function codeToString(data: IntArrayType): string;
|
|
81
|
+
export function stringToCode(data: string): number[];
|
|
82
|
+
export function toHankakuCase(data: readonly number[]): number[];
|
|
83
|
+
export function toHankakuCase(data: string): string;
|
|
84
|
+
export function toZenkakuCase(data: readonly number[]): number[];
|
|
85
|
+
export function toZenkakuCase(data: string): string;
|
|
86
|
+
export function toHiraganaCase(data: readonly number[]): number[];
|
|
87
|
+
export function toHiraganaCase(data: string): string;
|
|
88
|
+
export function toKatakanaCase(data: readonly number[]): number[];
|
|
89
|
+
export function toKatakanaCase(data: string): string;
|
|
90
|
+
export function toHankanaCase(data: readonly number[]): number[];
|
|
91
|
+
export function toHankanaCase(data: string): string;
|
|
92
|
+
export function toZenkanaCase(data: readonly number[]): number[];
|
|
93
|
+
export function toZenkanaCase(data: string): string;
|
|
94
|
+
export function toHankakuSpace(data: readonly number[]): number[];
|
|
95
|
+
export function toHankakuSpace(data: string): string;
|
|
96
|
+
export function toZenkakuSpace(data: readonly number[]): number[];
|
|
97
|
+
export function toZenkakuSpace(data: string): string;
|
|
98
|
+
|
|
99
|
+
export const version: string;
|
|
100
|
+
export const orders: string[];
|
|
101
|
+
|
|
102
|
+
export {};
|
|
@@ -1,18 +1,22 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "encoding-japanese",
|
|
3
|
-
"version": "2.
|
|
4
|
-
"description": "Convert and detect character
|
|
3
|
+
"version": "2.4.0",
|
|
4
|
+
"description": "Convert and detect character encodings in JavaScript",
|
|
5
5
|
"main": "src/index.js",
|
|
6
|
+
"types": "index.d.ts",
|
|
6
7
|
"files": [
|
|
7
8
|
"encoding.js",
|
|
8
9
|
"encoding.min.js",
|
|
10
|
+
"index.d.ts",
|
|
9
11
|
"src/*"
|
|
10
12
|
],
|
|
11
13
|
"scripts": {
|
|
12
14
|
"build": "npm run compile && npm run minify",
|
|
13
15
|
"compile": "browserify src/index.js -o encoding.js -s Encoding -p [ bannerify --file src/banner.js ] --no-bundle-external --bare",
|
|
14
16
|
"minify": "uglifyjs encoding.js -o encoding.min.js --comments -c -m -b ascii_only=true,beautify=false",
|
|
15
|
-
"
|
|
17
|
+
"lint": "eslint .",
|
|
18
|
+
"test": "npm run build && npm run test:types && mocha tests/test",
|
|
19
|
+
"test:types": "tsc --project tsconfig.types.json",
|
|
16
20
|
"watch": "watchify src/index.js -o encoding.js -s Encoding -p [ bannerify --file src/banner.js ] --no-bundle-external --bare --poll=300 -v"
|
|
17
21
|
},
|
|
18
22
|
"engines": {
|
|
@@ -29,33 +33,38 @@
|
|
|
29
33
|
},
|
|
30
34
|
"homepage": "https://github.com/polygonplanet/encoding.js",
|
|
31
35
|
"keywords": [
|
|
32
|
-
"
|
|
36
|
+
"encoding",
|
|
33
37
|
"charset",
|
|
34
38
|
"convert",
|
|
35
39
|
"detect",
|
|
36
|
-
"encoding",
|
|
37
|
-
"euc-jp",
|
|
38
|
-
"eucjp",
|
|
39
|
-
"iconv",
|
|
40
|
-
"iso-2022-jp",
|
|
41
40
|
"japanese",
|
|
41
|
+
"iconv",
|
|
42
|
+
"shift-jis",
|
|
43
|
+
"cp932",
|
|
44
|
+
"euc-jp",
|
|
42
45
|
"jis",
|
|
43
|
-
"
|
|
44
|
-
"sjis",
|
|
46
|
+
"utf-8",
|
|
45
47
|
"unicode",
|
|
46
|
-
"urldecode",
|
|
47
|
-
"urlencode",
|
|
48
48
|
"utf-16",
|
|
49
|
-
"
|
|
50
|
-
"
|
|
49
|
+
"base64",
|
|
50
|
+
"urlencode",
|
|
51
|
+
"urldecode",
|
|
52
|
+
"utf8",
|
|
53
|
+
"shift_jis",
|
|
54
|
+
"sjis",
|
|
55
|
+
"eucjp"
|
|
51
56
|
],
|
|
52
|
-
"dependencies": {},
|
|
53
57
|
"devDependencies": {
|
|
58
|
+
"@eslint/js": "^10.0.1",
|
|
59
|
+
"@stylistic/eslint-plugin": "^5.10.0",
|
|
60
|
+
"@types/node": "^26.5.0",
|
|
54
61
|
"bannerify": "^1.0.1",
|
|
55
62
|
"browserify": "^17.0.1",
|
|
56
|
-
"eslint": "^
|
|
63
|
+
"eslint": "^10.9.1",
|
|
64
|
+
"globals": "^17.12.0",
|
|
57
65
|
"mocha": "^11.8.0",
|
|
58
66
|
"package-json-versionify": "^1.0.4",
|
|
67
|
+
"typescript": "^7.0.2",
|
|
59
68
|
"uglify-js": "^3.19.3",
|
|
60
69
|
"watchify": "^4.0.0"
|
|
61
70
|
},
|
|
@@ -154,6 +154,17 @@ function SJISToJIS(data) {
|
|
|
154
154
|
}
|
|
155
155
|
results[results.length] = b1 - 0x80 & 0xFF;
|
|
156
156
|
} else if (b1 >= 0x80) {
|
|
157
|
+
b2 = data[++i];
|
|
158
|
+
if (b2 === 0x7F) {
|
|
159
|
+
if (index !== 0) {
|
|
160
|
+
index = 0;
|
|
161
|
+
results[results.length] = esc[0];
|
|
162
|
+
results[results.length] = esc[1];
|
|
163
|
+
results[results.length] = esc[2];
|
|
164
|
+
}
|
|
165
|
+
results[results.length] = config.FALLBACK_CHARACTER;
|
|
166
|
+
continue;
|
|
167
|
+
}
|
|
157
168
|
if (index !== 1) {
|
|
158
169
|
index = 1;
|
|
159
170
|
results[results.length] = esc[3];
|
|
@@ -161,7 +172,6 @@ function SJISToJIS(data) {
|
|
|
161
172
|
results[results.length] = esc[5];
|
|
162
173
|
}
|
|
163
174
|
|
|
164
|
-
b2 = data[++i];
|
|
165
175
|
if (sjisExt.hasCP932DuplicateCode(b1)) {
|
|
166
176
|
// Remap CP932 duplicate codes and IBM extended characters
|
|
167
177
|
remapped = sjisExt.remapCP932DuplicateCode(b1, b2);
|
|
@@ -228,6 +238,10 @@ function SJISToEUCJP(data) {
|
|
|
228
238
|
results[results.length] = b1;
|
|
229
239
|
} else if (b1 >= 0x81) {
|
|
230
240
|
b2 = data[++i];
|
|
241
|
+
if (b2 === 0x7F) {
|
|
242
|
+
results[results.length] = config.FALLBACK_CHARACTER;
|
|
243
|
+
continue;
|
|
244
|
+
}
|
|
231
245
|
if (sjisExt.hasCP932DuplicateCode(b1)) {
|
|
232
246
|
// Remap CP932 duplicate codes and IBM extended characters
|
|
233
247
|
remapped = sjisExt.remapCP932DuplicateCode(b1, b2);
|
|
@@ -409,6 +423,10 @@ function SJISToUTF8(data) {
|
|
|
409
423
|
results[results.length] = u3 & 0xFF;
|
|
410
424
|
} else if (b >= 0x80) {
|
|
411
425
|
b2 = data[++i];
|
|
426
|
+
if (b2 === 0x7F) {
|
|
427
|
+
results[results.length] = config.FALLBACK_CHARACTER;
|
|
428
|
+
continue;
|
|
429
|
+
}
|
|
412
430
|
if (sjisExt.hasCP932DuplicateCode(b)) {
|
|
413
431
|
// Remap CP932 duplicate codes and IBM extended characters
|
|
414
432
|
remapped = sjisExt.remapCP932DuplicateCode(b, b2);
|
|
@@ -642,7 +660,8 @@ function UTF8ToSJIS(data, options) {
|
|
|
642
660
|
(data[++i] & 0xFF);
|
|
643
661
|
}
|
|
644
662
|
|
|
645
|
-
jis = EncodingTable.UTF8_TO_JIS_TABLE[utf8]
|
|
663
|
+
jis = EncodingTable.UTF8_TO_JIS_TABLE[utf8] ||
|
|
664
|
+
EncodingTable.UTF8_TO_JIS_ALIAS_TABLE[utf8];
|
|
646
665
|
if (jis == null) {
|
|
647
666
|
if (fallbackOption) {
|
|
648
667
|
handleFallback(results, bytes, fallbackOption);
|
|
@@ -653,10 +672,6 @@ function UTF8ToSJIS(data, options) {
|
|
|
653
672
|
if (jis < 0xFF) {
|
|
654
673
|
results[results.length] = jis + 0x80;
|
|
655
674
|
} else {
|
|
656
|
-
if (jis > 0x10000) {
|
|
657
|
-
jis -= 0x10000;
|
|
658
|
-
}
|
|
659
|
-
|
|
660
675
|
b1 = jis >> 8;
|
|
661
676
|
b2 = jis & 0xFF;
|
|
662
677
|
if (b1 & 0x01) {
|
|
@@ -701,7 +716,7 @@ function UTF8ToEUCJP(data, options) {
|
|
|
701
716
|
var results = [];
|
|
702
717
|
var i = 0;
|
|
703
718
|
var len = data && data.length;
|
|
704
|
-
var b, bytes, utf8, jis;
|
|
719
|
+
var b, bytes, utf8, jis, isJISX0212;
|
|
705
720
|
var fallbackOption = options && options.fallback;
|
|
706
721
|
|
|
707
722
|
for (; i < len; i++) {
|
|
@@ -726,32 +741,28 @@ function UTF8ToEUCJP(data, options) {
|
|
|
726
741
|
(data[++i] & 0xFF);
|
|
727
742
|
}
|
|
728
743
|
|
|
729
|
-
jis = EncodingTable.UTF8_TO_JIS_TABLE[utf8];
|
|
730
744
|
// JIS X 0212 chars duplicated into JIS X 0208 unassigned rows: use the JIS X 0212 form.
|
|
731
|
-
|
|
732
|
-
|
|
745
|
+
jis = EncodingTable.UTF8_TO_JISX0212_TABLE[utf8];
|
|
746
|
+
isJISX0212 = jis != null;
|
|
747
|
+
|
|
748
|
+
if (jis == null) {
|
|
749
|
+
jis = EncodingTable.UTF8_TO_JIS_TABLE[utf8] ||
|
|
750
|
+
EncodingTable.UTF8_TO_JIS_ALIAS_TABLE[utf8];
|
|
733
751
|
}
|
|
734
752
|
if (jis == null) {
|
|
735
|
-
|
|
736
|
-
|
|
737
|
-
if (fallbackOption) {
|
|
738
|
-
handleFallback(results, bytes, fallbackOption);
|
|
739
|
-
} else {
|
|
740
|
-
results[results.length] = config.FALLBACK_CHARACTER;
|
|
741
|
-
}
|
|
753
|
+
if (fallbackOption) {
|
|
754
|
+
handleFallback(results, bytes, fallbackOption);
|
|
742
755
|
} else {
|
|
743
|
-
results[results.length] =
|
|
744
|
-
results[results.length] = (jis >> 8) - 0x80 & 0xFF;
|
|
745
|
-
results[results.length] = (jis & 0xFF) - 0x80 & 0xFF;
|
|
756
|
+
results[results.length] = config.FALLBACK_CHARACTER;
|
|
746
757
|
}
|
|
747
758
|
} else {
|
|
748
|
-
if (jis > 0x10000) {
|
|
749
|
-
jis -= 0x10000;
|
|
750
|
-
}
|
|
751
759
|
if (jis < 0xFF) {
|
|
752
760
|
results[results.length] = 0x8E;
|
|
753
761
|
results[results.length] = jis - 0x80 & 0xFF;
|
|
754
762
|
} else {
|
|
763
|
+
if (isJISX0212) {
|
|
764
|
+
results[results.length] = 0x8F;
|
|
765
|
+
}
|
|
755
766
|
results[results.length] = (jis >> 8) - 0x80 & 0xFF;
|
|
756
767
|
results[results.length] = (jis & 0xFF) - 0x80 & 0xFF;
|
|
757
768
|
}
|
|
@@ -773,7 +784,7 @@ function UTF8ToJIS(data, options) {
|
|
|
773
784
|
var index = 0;
|
|
774
785
|
var len = data && data.length;
|
|
775
786
|
var i = 0;
|
|
776
|
-
var b, bytes, utf8, jis;
|
|
787
|
+
var b, bytes, utf8, jis, isJISX0212;
|
|
777
788
|
var fallbackOption = options && options.fallback;
|
|
778
789
|
|
|
779
790
|
var esc = [
|
|
@@ -813,42 +824,29 @@ function UTF8ToJIS(data, options) {
|
|
|
813
824
|
(data[++i] & 0xFF);
|
|
814
825
|
}
|
|
815
826
|
|
|
816
|
-
jis = EncodingTable.UTF8_TO_JIS_TABLE[utf8];
|
|
817
827
|
// JIS X 0212 chars duplicated into JIS X 0208 unassigned rows: use the JIS X 0212 form.
|
|
818
|
-
|
|
819
|
-
|
|
828
|
+
jis = EncodingTable.UTF8_TO_JISX0212_TABLE[utf8];
|
|
829
|
+
isJISX0212 = jis != null;
|
|
830
|
+
|
|
831
|
+
if (jis == null) {
|
|
832
|
+
jis = EncodingTable.UTF8_TO_JIS_TABLE[utf8] ||
|
|
833
|
+
EncodingTable.UTF8_TO_JIS_ALIAS_TABLE[utf8];
|
|
820
834
|
}
|
|
835
|
+
|
|
821
836
|
if (jis == null) {
|
|
822
|
-
|
|
823
|
-
|
|
824
|
-
|
|
825
|
-
|
|
826
|
-
|
|
827
|
-
|
|
828
|
-
results[results.length] = esc[2];
|
|
829
|
-
}
|
|
837
|
+
if (index !== 0) {
|
|
838
|
+
index = 0;
|
|
839
|
+
results[results.length] = esc[0];
|
|
840
|
+
results[results.length] = esc[1];
|
|
841
|
+
results[results.length] = esc[2];
|
|
842
|
+
}
|
|
830
843
|
|
|
831
|
-
|
|
832
|
-
|
|
833
|
-
} else {
|
|
834
|
-
results[results.length] = config.FALLBACK_CHARACTER;
|
|
835
|
-
}
|
|
844
|
+
if (fallbackOption) {
|
|
845
|
+
handleFallback(results, bytes, fallbackOption);
|
|
836
846
|
} else {
|
|
837
|
-
|
|
838
|
-
if (index !== 3) {
|
|
839
|
-
index = 3;
|
|
840
|
-
results[results.length] = esc[9];
|
|
841
|
-
results[results.length] = esc[10];
|
|
842
|
-
results[results.length] = esc[11];
|
|
843
|
-
results[results.length] = esc[12];
|
|
844
|
-
}
|
|
845
|
-
results[results.length] = jis >> 8 & 0xFF;
|
|
846
|
-
results[results.length] = jis & 0xFF;
|
|
847
|
+
results[results.length] = config.FALLBACK_CHARACTER;
|
|
847
848
|
}
|
|
848
849
|
} else {
|
|
849
|
-
if (jis > 0x10000) {
|
|
850
|
-
jis -= 0x10000;
|
|
851
|
-
}
|
|
852
850
|
if (jis < 0xFF) {
|
|
853
851
|
// Halfwidth Katakana
|
|
854
852
|
if (index !== 2) {
|
|
@@ -859,7 +857,17 @@ function UTF8ToJIS(data, options) {
|
|
|
859
857
|
}
|
|
860
858
|
results[results.length] = jis & 0xFF;
|
|
861
859
|
} else {
|
|
862
|
-
if (
|
|
860
|
+
if (isJISX0212) {
|
|
861
|
+
// JIS X 0212:1990
|
|
862
|
+
if (index !== 3) {
|
|
863
|
+
index = 3;
|
|
864
|
+
results[results.length] = esc[9];
|
|
865
|
+
results[results.length] = esc[10];
|
|
866
|
+
results[results.length] = esc[11];
|
|
867
|
+
results[results.length] = esc[12];
|
|
868
|
+
}
|
|
869
|
+
} else if (index !== 1) {
|
|
870
|
+
// JIS X 0208
|
|
863
871
|
index = 1;
|
|
864
872
|
results[results.length] = esc[3];
|
|
865
873
|
results[results.length] = esc[4];
|
|
@@ -933,8 +941,9 @@ function UTF8ToUNICODE(data, options) {
|
|
|
933
941
|
var i = 0;
|
|
934
942
|
var len = data && data.length;
|
|
935
943
|
var n, c, c2, c3, c4, code;
|
|
936
|
-
// For internal
|
|
937
|
-
|
|
944
|
+
// For internal use only
|
|
945
|
+
// Returns raw Unicode code points without splitting into surrogate pairs
|
|
946
|
+
var asCodePoint = options && options.asCodePoint;
|
|
938
947
|
|
|
939
948
|
while (i < len) {
|
|
940
949
|
c = data[i++];
|
|
@@ -970,7 +979,7 @@ function UTF8ToUNICODE(data, options) {
|
|
|
970
979
|
(c4 & 0x3F);
|
|
971
980
|
}
|
|
972
981
|
|
|
973
|
-
if (code <= 0xFFFF ||
|
|
982
|
+
if (code <= 0xFFFF || asCodePoint) {
|
|
974
983
|
results[results.length] = code;
|
|
975
984
|
} else {
|
|
976
985
|
// Split in surrogate halves
|
|
@@ -1685,7 +1694,7 @@ function handleFallback(results, bytes, fallbackOption) {
|
|
|
1685
1694
|
switch (fallbackOption) {
|
|
1686
1695
|
case 'html-entity':
|
|
1687
1696
|
case 'html-entity-hex':
|
|
1688
|
-
var unicode = UTF8ToUNICODE(bytes, {
|
|
1697
|
+
var unicode = UTF8ToUNICODE(bytes, { asCodePoint: true })[0];
|
|
1689
1698
|
if (unicode) {
|
|
1690
1699
|
results[results.length] = 0x26; // &
|
|
1691
1700
|
results[results.length] = 0x23; // #
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
exports.UTF8_TO_JIS_TABLE = require('./utf8-to-jis-table');
|
|
2
|
+
exports.UTF8_TO_JIS_ALIAS_TABLE = require('./utf8-to-jis-alias-table');
|
|
2
3
|
exports.UTF8_TO_JISX0212_TABLE = require('./utf8-to-jisx0212-table');
|
|
3
4
|
exports.JIS_TO_UTF8_TABLE = require('./jis-to-utf8-table');
|
|
4
5
|
exports.JISX0212_TO_UTF8_TABLE = require('./jisx0212-to-utf8-table');
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Encoding conversion table for UTF-8 to JIS (encode only)
|
|
3
|
+
*
|
|
4
|
+
* Accepts Unicode characters that differ between CP932 and JIS X 0208 mappings
|
|
5
|
+
* (e.g., WAVE DASH vs. FULLWIDTH TILDE).
|
|
6
|
+
*
|
|
7
|
+
* { UTF-8 : JIS }
|
|
8
|
+
*/
|
|
9
|
+
module.exports = {
|
|
10
|
+
0xE28892: 0x215D, // − U+2212 MINUS SIGN same cell as - U+FF0D (0xEFBC8D) -> SJIS 0x817C
|
|
11
|
+
0xE3809C: 0x2141, // 〜 U+301C WAVE DASH same cell as ~ U+FF5E (0xEFBD9E) -> SJIS 0x8160
|
|
12
|
+
0xC2A2: 0x2171, // ¢ U+00A2 CENT SIGN same cell as ¢ U+FFE0 (0xEFBFA0) -> SJIS 0x8191
|
|
13
|
+
0xC2A3: 0x2172 // £ U+00A3 POUND SIGN same cell as £ U+FFE1 (0xEFBFA1) -> SJIS 0x8192
|
|
14
|
+
};
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
/* eslint-disable indent,key-spacing */
|
|
1
|
+
/* eslint-disable @stylistic/indent, @stylistic/key-spacing */
|
|
2
2
|
/**
|
|
3
3
|
* Encoding conversion table for UTF-8 to JIS
|
|
4
|
+
* { UTF-8 : JIS }
|
|
4
5
|
*/
|
|
5
6
|
module.exports = {
|
|
6
7
|
0xEFBDA1:0x21,0xEFBDA2:0x22,0xEFBDA3:0x23,0xEFBDA4:0x24,0xEFBDA5:0x25,
|
|
@@ -1486,8 +1487,8 @@ module.exports = {
|
|
|
1486
1487
|
0xE285B5:0x7C76,0xE285B6:0x7C77,0xE285B7:0x7C78,0xE285B8:0x7C79,0xE285B9:0x7C7A,
|
|
1487
1488
|
0xEFBFA4:0x7C7C,0xEFBC87:0x7C7D,0xEFBC82:0x7C7E,
|
|
1488
1489
|
|
|
1489
|
-
//
|
|
1490
|
-
|
|
1491
|
-
|
|
1492
|
-
|
|
1490
|
+
// Remaps Unicode characters that differ between CP932 and JIS X 0208 mappings
|
|
1491
|
+
// (encode and decode) See also `utf8-to-jis-alias-table.js`
|
|
1492
|
+
0xE288A5:0x2142, // ∥ U+2225 PARALLEL TO same cell as ‖ U+2016 (0xE28096) -> SJIS 0x8161
|
|
1493
|
+
0xEFBFA2:0x224C // ¬ U+FFE2 FULLWIDTH NOT SIGN same cell as ¬ U+00AC (0xC2AC) -> SJIS 0x81CA
|
|
1493
1494
|
};
|
|
@@ -1,6 +1,11 @@
|
|
|
1
|
-
/* eslint-disable indent
|
|
1
|
+
/* eslint-disable @stylistic/indent,@stylistic/key-spacing */
|
|
2
2
|
/**
|
|
3
3
|
* Encoding conversion table for UTF-8 to JIS X 0212:1990 (Hojo-Kanji)
|
|
4
|
+
*
|
|
5
|
+
* Character mappings based on:
|
|
6
|
+
* https://www.unicode.org/Public/MAPPINGS/OBSOLETE/EASTASIA/JIS/JIS0212.TXT
|
|
7
|
+
* Keys have been converted to UTF-8
|
|
8
|
+
* { UTF-8 : JIS }
|
|
4
9
|
*/
|
|
5
10
|
module.exports = {
|
|
6
11
|
0xCB98:0x222F,0xCB87:0x2230,0xC2B8:0x2231,0xCB99:0x2232,0xCB9D:0x2233,
|
|
@@ -1217,8 +1222,5 @@ module.exports = {
|
|
|
1217
1222
|
0xE9BDB1:0x6D53,0xE9BDB3:0x6D54,0xE9BDB5:0x6D55,0xE9BDBA:0x6D56,0xE9BDBD:0x6D57,
|
|
1218
1223
|
0xE9BE8F:0x6D58,0xE9BE90:0x6D59,0xE9BE91:0x6D5A,0xE9BE92:0x6D5B,0xE9BE94:0x6D5C,
|
|
1219
1224
|
0xE9BE96:0x6D5D,0xE9BE97:0x6D5E,0xE9BE9E:0x6D5F,0xE9BEA1:0x6D60,0xE9BEA2:0x6D61,
|
|
1220
|
-
0xE9BEA3:0x6D62,0xE9BEA5:0x6D63
|
|
1221
|
-
|
|
1222
|
-
//FIXME: mojibake
|
|
1223
|
-
0xE3809C:0x2141
|
|
1225
|
+
0xE9BEA3:0x6D62,0xE9BEA5:0x6D63
|
|
1224
1226
|
};
|
|
@@ -1,5 +1,12 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## [5.4.4](https://github.com/nodemailer/libmime/compare/v5.4.3...v5.4.4) (2026-09-15)
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
### Bug Fixes
|
|
7
|
+
|
|
8
|
+
* **deps:** update encoding-japanese to 2.4.0 ([047a9d6](https://github.com/nodemailer/libmime/commit/047a9d6403775575305cb5d9807c95d2c5587607))
|
|
9
|
+
|
|
3
10
|
## [5.4.3](https://github.com/nodemailer/libmime/compare/v5.4.2...v5.4.3) (2026-08-31)
|
|
4
11
|
|
|
5
12
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "libmime",
|
|
3
3
|
"description": "Encode and decode quoted printable and base64 strings",
|
|
4
|
-
"version": "5.4.
|
|
4
|
+
"version": "5.4.4",
|
|
5
5
|
"main": "lib/libmime.js",
|
|
6
6
|
"files": [
|
|
7
7
|
"lib",
|
|
@@ -24,7 +24,7 @@
|
|
|
24
24
|
"update": "rm -rf node_modules package-lock.json && ncu -u && npm install"
|
|
25
25
|
},
|
|
26
26
|
"dependencies": {
|
|
27
|
-
"encoding-japanese": "2.
|
|
27
|
+
"encoding-japanese": "2.4.0",
|
|
28
28
|
"iconv-lite": "0.7.3",
|
|
29
29
|
"libbase64": "1.3.0",
|
|
30
30
|
"libqp": "2.1.1"
|
|
@@ -1,5 +1,19 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## [3.9.28](https://github.com/nodemailer/mailparser/compare/v3.9.27...v3.9.28) (2026-09-15)
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
### Bug Fixes
|
|
7
|
+
|
|
8
|
+
* **deps:** update libmime to 5.4.4 and mailsplit to 5.4.17 ([8da897f](https://github.com/nodemailer/mailparser/commit/8da897ffb961f6967f57851131ee37600842afca))
|
|
9
|
+
|
|
10
|
+
## [3.9.27](https://github.com/nodemailer/mailparser/compare/v3.9.26...v3.9.27) (2026-09-15)
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
### Bug Fixes
|
|
14
|
+
|
|
15
|
+
* **deps:** update nodemailer to 10.0.10, encoding-japanese to 2.4.0 ([842904f](https://github.com/nodemailer/mailparser/commit/842904f1df3e2b1b1f07ad108575806efbcc55b5))
|
|
16
|
+
|
|
3
17
|
## [3.9.26](https://github.com/nodemailer/mailparser/compare/v3.9.25...v3.9.26) (2026-09-12)
|
|
4
18
|
|
|
5
19
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "mailparser",
|
|
3
|
-
"version": "3.9.
|
|
3
|
+
"version": "3.9.28",
|
|
4
4
|
"description": "Parse e-mails",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"scripts": {
|
|
@@ -18,14 +18,14 @@
|
|
|
18
18
|
],
|
|
19
19
|
"license": "MIT",
|
|
20
20
|
"dependencies": {
|
|
21
|
-
"encoding-japanese": "2.
|
|
21
|
+
"encoding-japanese": "2.4.0",
|
|
22
22
|
"he": "1.2.0",
|
|
23
23
|
"html-to-text": "10.0.1",
|
|
24
24
|
"iconv-lite": "0.7.3",
|
|
25
|
-
"libmime": "5.4.
|
|
25
|
+
"libmime": "5.4.4",
|
|
26
26
|
"linkify-it": "5.0.2",
|
|
27
|
-
"@zone-eu/mailsplit": "5.4.
|
|
28
|
-
"nodemailer": "10.0.
|
|
27
|
+
"@zone-eu/mailsplit": "5.4.17",
|
|
28
|
+
"nodemailer": "10.0.10",
|
|
29
29
|
"punycode.js": "2.3.1",
|
|
30
30
|
"tlds": "1.261.0"
|
|
31
31
|
},
|
|
@@ -1,5 +1,14 @@
|
|
|
1
1
|
# CHANGELOG
|
|
2
2
|
|
|
3
|
+
## [10.0.10](https://github.com/nodemailer/nodemailer/compare/v10.0.9...v10.0.10) (2026-09-14)
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
### Bug Fixes
|
|
7
|
+
|
|
8
|
+
* derive the attachment filename from the basename of a Windows path ([c7cc7ce](https://github.com/nodemailer/nodemailer/commit/c7cc7ce41a3602441747476a2a2c4a8ff466a83e))
|
|
9
|
+
* **dkim:** unfold folded header lines in linear time ([28a5909](https://github.com/nodemailer/nodemailer/commit/28a5909cec27646cb001dc7e97a8f5d26c973078))
|
|
10
|
+
* **smtp-connection:** reassemble multiline replies in linear time ([f2d82fa](https://github.com/nodemailer/nodemailer/commit/f2d82fa84d47015a7bbb4253da61eeb778c658b1))
|
|
11
|
+
|
|
3
12
|
## [10.0.9](https://github.com/nodemailer/nodemailer/compare/v10.0.8...v10.0.9) (2026-09-12)
|
|
4
13
|
|
|
5
14
|
|
|
@@ -126,11 +126,18 @@ class MessageParser extends node_stream_1.Transform {
|
|
|
126
126
|
// signature covers exactly the bytes the receiving side canonicalizes
|
|
127
127
|
// Only SP and HTAB fold a line, and only they are trimmed from the field name, the
|
|
128
128
|
// same whitespace the relaxed canonicalization in sign.ts works with
|
|
129
|
-
const
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
129
|
+
const rawLines = (this.rawHeaders || Buffer.alloc(0)).toString('binary').split(/\r?\n/);
|
|
130
|
+
// Unfold in a single forward pass and only ever test a freshly split line for the
|
|
131
|
+
// continuation prefix. Testing an already merged line instead would rescan a string
|
|
132
|
+
// that grows with every continuation line, so a header folded into many continuation
|
|
133
|
+
// lines (a large recipient list, for example) would take quadratic time to unfold
|
|
134
|
+
const lines = [];
|
|
135
|
+
for (const rawLine of rawLines) {
|
|
136
|
+
if (lines.length && /^[ \t]/.test(rawLine)) {
|
|
137
|
+
lines[lines.length - 1] += '\n' + rawLine;
|
|
138
|
+
}
|
|
139
|
+
else {
|
|
140
|
+
lines.push(rawLine);
|
|
134
141
|
}
|
|
135
142
|
}
|
|
136
143
|
return lines
|
|
@@ -151,8 +151,10 @@ class MailComposer {
|
|
|
151
151
|
data.filename = attachment.filename;
|
|
152
152
|
}
|
|
153
153
|
else if (!isMessageNode && attachment.filename !== false) {
|
|
154
|
+
// a backslash separates as well, so a Windows path does not put the sender's directories in the headers
|
|
154
155
|
data.filename =
|
|
155
|
-
(attachment.path || attachment.href || '').split(
|
|
156
|
+
(attachment.path || attachment.href || '').split(/[/\\]/).pop().split('?').shift() ||
|
|
157
|
+
'attachment-' + (i + 1);
|
|
156
158
|
if (data.filename.indexOf('.') < 0) {
|
|
157
159
|
data.filename += '.' + mimeFuncs.detectExtension(data.contentType);
|
|
158
160
|
}
|
|
@@ -107,8 +107,9 @@ class MailMessage {
|
|
|
107
107
|
if (this.data.attachments && this.data.attachments.length) {
|
|
108
108
|
this.data.attachments.forEach((attachment, i) => {
|
|
109
109
|
if (!attachment.filename) {
|
|
110
|
+
// a backslash separates as well, so a Windows path does not put the sender's directories in the headers
|
|
110
111
|
attachment.filename =
|
|
111
|
-
(attachment.path || attachment.href || '').split(
|
|
112
|
+
(attachment.path || attachment.href || '').split(/[/\\]/).pop().split('?').shift() ||
|
|
112
113
|
'attachment-' + (i + 1);
|
|
113
114
|
if (attachment.filename.indexOf('.') < 0) {
|
|
114
115
|
attachment.filename += '.' + mimeFuncs.detectExtension(attachment.contentType);
|