@mavogel/awscdk-rootmail 0.0.218 → 0.0.220
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 +4 -4
- package/lib/rootmail.js +1 -1
- package/lib/ses-receive.js +1 -1
- package/node_modules/cdk-nag/.jsii +2 -2
- package/node_modules/cdk-nag/lib/ignore-suppression-conditions.js +5 -5
- package/node_modules/cdk-nag/lib/nag-logger.js +2 -2
- package/node_modules/cdk-nag/lib/nag-pack.js +1 -1
- package/node_modules/cdk-nag/lib/nag-rules.js +1 -1
- package/node_modules/cdk-nag/lib/nag-suppressions.js +1 -1
- package/node_modules/cdk-nag/lib/packs/aws-solutions.js +1 -1
- package/node_modules/cdk-nag/lib/packs/hipaa-security.js +1 -1
- package/node_modules/cdk-nag/lib/packs/nist-800-53-r4.js +1 -1
- package/node_modules/cdk-nag/lib/packs/nist-800-53-r5.js +1 -1
- package/node_modules/cdk-nag/lib/packs/pci-dss-321.js +1 -1
- package/node_modules/cdk-nag/package.json +1 -1
- package/node_modules/encoding-japanese/README.md +65 -13
- package/node_modules/encoding-japanese/encoding.js +7 -2
- package/node_modules/encoding-japanese/encoding.min.js +2 -2
- package/node_modules/encoding-japanese/package.json +2 -2
- package/node_modules/encoding-japanese/src/encoding-convert.js +5 -0
- package/node_modules/libbase64/.prettierrc.js +4 -1
- package/node_modules/libbase64/lib/libbase64.js +2 -1
- package/node_modules/libbase64/package.json +9 -8
- package/node_modules/libmime/CHANGELOG.md +7 -0
- package/node_modules/libmime/package.json +5 -5
- package/node_modules/libqp/CHANGELOG.md +15 -0
- package/node_modules/libqp/lib/libqp.js +13 -21
- package/node_modules/libqp/package.json +7 -6
- package/node_modules/libqp/test/libqp-test.js +161 -0
- package/node_modules/mailparser/CHANGELOG.md +7 -0
- package/node_modules/mailparser/package.json +8 -8
- package/node_modules/mailsplit/LICENSE.MIT +6 -1
- package/node_modules/mailsplit/README.md +2 -0
- package/node_modules/mailsplit/lib/headers.js +5 -1
- package/node_modules/mailsplit/package.json +10 -9
- package/node_modules/nodemailer/.ncurc.js +4 -1
- package/node_modules/nodemailer/CHANGELOG.md +25 -0
- package/node_modules/nodemailer/lib/addressparser/index.js +22 -8
- package/node_modules/nodemailer/lib/mime-funcs/mime-types.js +2 -0
- package/node_modules/nodemailer/lib/nodemailer.js +13 -6
- package/node_modules/nodemailer/lib/smtp-connection/index.js +9 -0
- package/node_modules/nodemailer/lib/well-known/services.json +14 -3
- package/node_modules/nodemailer/package.json +5 -5
- package/node_modules/tlds/index.json +0 -3
- package/node_modules/tlds/package.json +1 -1
- package/package.json +4 -4
- package/node_modules/libmime/node_modules/libbase64/.eslintrc +0 -11
- package/node_modules/libmime/node_modules/libbase64/.prettierrc.js +0 -8
- package/node_modules/libmime/node_modules/libbase64/LICENSE +0 -19
- package/node_modules/libmime/node_modules/libbase64/README.md +0 -113
- package/node_modules/libmime/node_modules/libbase64/lib/libbase64.js +0 -253
- package/node_modules/libmime/node_modules/libbase64/package.json +0 -35
- package/node_modules/libmime/node_modules/libqp/.eslintrc +0 -15
- package/node_modules/libmime/node_modules/libqp/.prettierrc.js +0 -8
- package/node_modules/libmime/node_modules/libqp/CHANGELOG.md +0 -8
- package/node_modules/libmime/node_modules/libqp/LICENSE +0 -19
- package/node_modules/libmime/node_modules/libqp/README.md +0 -119
- package/node_modules/libmime/node_modules/libqp/lib/libqp.js +0 -320
- package/node_modules/libmime/node_modules/libqp/package.json +0 -28
- package/node_modules/libmime/node_modules/libqp/test/libqp-test.js +0 -41
- package/node_modules/mailsplit/node_modules/encoding-japanese/LICENSE +0 -21
- package/node_modules/mailsplit/node_modules/encoding-japanese/README.md +0 -542
- package/node_modules/mailsplit/node_modules/encoding-japanese/encoding.js +0 -6077
- package/node_modules/mailsplit/node_modules/encoding-japanese/encoding.min.js +0 -8
- package/node_modules/mailsplit/node_modules/encoding-japanese/encoding.min.js.map +0 -1
- package/node_modules/mailsplit/node_modules/encoding-japanese/package.json +0 -70
- package/node_modules/mailsplit/node_modules/encoding-japanese/src/banner.js +0 -6
- package/node_modules/mailsplit/node_modules/encoding-japanese/src/config.js +0 -139
- package/node_modules/mailsplit/node_modules/encoding-japanese/src/encoding-convert.js +0 -1676
- package/node_modules/mailsplit/node_modules/encoding-japanese/src/encoding-detect.js +0 -502
- package/node_modules/mailsplit/node_modules/encoding-japanese/src/encoding-table.js +0 -4
- package/node_modules/mailsplit/node_modules/encoding-japanese/src/index.js +0 -593
- package/node_modules/mailsplit/node_modules/encoding-japanese/src/jis-to-utf8-table.js +0 -5
- package/node_modules/mailsplit/node_modules/encoding-japanese/src/jisx0212-to-utf8-table.js +0 -5
- package/node_modules/mailsplit/node_modules/encoding-japanese/src/kana-case-table.js +0 -41
- package/node_modules/mailsplit/node_modules/encoding-japanese/src/utf8-to-jis-table.js +0 -1493
- package/node_modules/mailsplit/node_modules/encoding-japanese/src/utf8-to-jisx0212-table.js +0 -1224
- package/node_modules/mailsplit/node_modules/encoding-japanese/src/util.js +0 -361
- package/node_modules/mailsplit/node_modules/libmime/.eslintrc +0 -7
- package/node_modules/mailsplit/node_modules/libmime/.gitattributes +0 -1
- package/node_modules/mailsplit/node_modules/libmime/.github/FUNDING.yml +0 -4
- package/node_modules/mailsplit/node_modules/libmime/.github/workflows/test.yml +0 -21
- package/node_modules/mailsplit/node_modules/libmime/.prettierrc.js +0 -8
- package/node_modules/mailsplit/node_modules/libmime/CHANGELOG.md +0 -110
- package/node_modules/mailsplit/node_modules/libmime/LICENSE +0 -19
- package/node_modules/mailsplit/node_modules/libmime/README.md +0 -207
- package/node_modules/mailsplit/node_modules/libmime/lib/charset.js +0 -117
- package/node_modules/mailsplit/node_modules/libmime/lib/charsets.js +0 -212
- package/node_modules/mailsplit/node_modules/libmime/lib/libmime.js +0 -903
- package/node_modules/mailsplit/node_modules/libmime/lib/mimetypes.js +0 -2049
- package/node_modules/mailsplit/node_modules/libmime/package.json +0 -37
- /package/node_modules/{libmime/node_modules/libbase64 → libbase64}/.github/FUNDING.yml +0 -0
- /package/node_modules/{libmime/node_modules/libbase64 → libbase64}/.github/workflows/release.yaml +0 -0
- /package/node_modules/{libmime/node_modules/libbase64 → libbase64}/.github/workflows/test.yml +0 -0
- /package/node_modules/{libmime/node_modules/libbase64 → libbase64}/.ncurc.js +0 -0
- /package/node_modules/{libmime/node_modules/libbase64 → libbase64}/CHANGELOG.md +0 -0
- /package/node_modules/{libmime/node_modules/libqp → libqp}/.github/FUNDING.yml +0 -0
- /package/node_modules/{libmime/node_modules/libqp → libqp}/.github/workflows/release.yaml +0 -0
- /package/node_modules/{libmime/node_modules/libqp → libqp}/.github/workflows/test.yml +0 -0
|
@@ -1,361 +0,0 @@
|
|
|
1
|
-
var config = require('./config');
|
|
2
|
-
var fromCharCode = String.fromCharCode;
|
|
3
|
-
var slice = Array.prototype.slice;
|
|
4
|
-
var toString = Object.prototype.toString;
|
|
5
|
-
var hasOwnProperty = Object.prototype.hasOwnProperty;
|
|
6
|
-
var nativeIsArray = Array.isArray;
|
|
7
|
-
var nativeObjectKeys = Object.keys;
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
function isObject(x) {
|
|
11
|
-
var type = typeof x;
|
|
12
|
-
return type === 'function' || type === 'object' && !!x;
|
|
13
|
-
}
|
|
14
|
-
exports.isObject = isObject;
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
function isArray(x) {
|
|
18
|
-
return nativeIsArray ? nativeIsArray(x) : toString.call(x) === '[object Array]';
|
|
19
|
-
}
|
|
20
|
-
exports.isArray = isArray;
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
function isString(x) {
|
|
24
|
-
return typeof x === 'string' || toString.call(x) === '[object String]';
|
|
25
|
-
}
|
|
26
|
-
exports.isString = isString;
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
function objectKeys(object) {
|
|
30
|
-
if (nativeObjectKeys) {
|
|
31
|
-
return nativeObjectKeys(object);
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
var keys = [];
|
|
35
|
-
for (var key in object) {
|
|
36
|
-
if (hasOwnProperty.call(object, key)) {
|
|
37
|
-
keys[keys.length] = key;
|
|
38
|
-
}
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
return keys;
|
|
42
|
-
}
|
|
43
|
-
exports.objectKeys = objectKeys;
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
function createBuffer(bits, size) {
|
|
47
|
-
if (config.HAS_TYPED) {
|
|
48
|
-
switch (bits) {
|
|
49
|
-
case 8: return new Uint8Array(size);
|
|
50
|
-
case 16: return new Uint16Array(size);
|
|
51
|
-
}
|
|
52
|
-
}
|
|
53
|
-
return new Array(size);
|
|
54
|
-
}
|
|
55
|
-
exports.createBuffer = createBuffer;
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
function stringToBuffer(string) {
|
|
59
|
-
var length = string.length;
|
|
60
|
-
var buffer = createBuffer(16, length);
|
|
61
|
-
|
|
62
|
-
for (var i = 0; i < length; i++) {
|
|
63
|
-
buffer[i] = string.charCodeAt(i);
|
|
64
|
-
}
|
|
65
|
-
|
|
66
|
-
return buffer;
|
|
67
|
-
}
|
|
68
|
-
exports.stringToBuffer = stringToBuffer;
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
function codeToString_fast(code) {
|
|
72
|
-
if (config.CAN_CHARCODE_APPLY && config.CAN_CHARCODE_APPLY_TYPED) {
|
|
73
|
-
var len = code && code.length;
|
|
74
|
-
if (len < config.APPLY_BUFFER_SIZE && config.APPLY_BUFFER_SIZE_OK) {
|
|
75
|
-
return fromCharCode.apply(null, code);
|
|
76
|
-
}
|
|
77
|
-
|
|
78
|
-
if (config.APPLY_BUFFER_SIZE_OK === null) {
|
|
79
|
-
try {
|
|
80
|
-
var s = fromCharCode.apply(null, code);
|
|
81
|
-
if (len > config.APPLY_BUFFER_SIZE) {
|
|
82
|
-
config.APPLY_BUFFER_SIZE_OK = true;
|
|
83
|
-
}
|
|
84
|
-
return s;
|
|
85
|
-
} catch (e) {
|
|
86
|
-
// Ignore the RangeError "arguments too large"
|
|
87
|
-
config.APPLY_BUFFER_SIZE_OK = false;
|
|
88
|
-
}
|
|
89
|
-
}
|
|
90
|
-
}
|
|
91
|
-
|
|
92
|
-
return codeToString_chunked(code);
|
|
93
|
-
}
|
|
94
|
-
exports.codeToString_fast = codeToString_fast;
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
function codeToString_chunked(code) {
|
|
98
|
-
var string = '';
|
|
99
|
-
var length = code && code.length;
|
|
100
|
-
var i = 0;
|
|
101
|
-
var sub;
|
|
102
|
-
|
|
103
|
-
while (i < length) {
|
|
104
|
-
if (code.subarray) {
|
|
105
|
-
sub = code.subarray(i, i + config.APPLY_BUFFER_SIZE);
|
|
106
|
-
} else {
|
|
107
|
-
sub = code.slice(i, i + config.APPLY_BUFFER_SIZE);
|
|
108
|
-
}
|
|
109
|
-
i += config.APPLY_BUFFER_SIZE;
|
|
110
|
-
|
|
111
|
-
if (config.APPLY_BUFFER_SIZE_OK) {
|
|
112
|
-
string += fromCharCode.apply(null, sub);
|
|
113
|
-
continue;
|
|
114
|
-
}
|
|
115
|
-
|
|
116
|
-
if (config.APPLY_BUFFER_SIZE_OK === null) {
|
|
117
|
-
try {
|
|
118
|
-
string += fromCharCode.apply(null, sub);
|
|
119
|
-
if (sub.length > config.APPLY_BUFFER_SIZE) {
|
|
120
|
-
config.APPLY_BUFFER_SIZE_OK = true;
|
|
121
|
-
}
|
|
122
|
-
continue;
|
|
123
|
-
} catch (e) {
|
|
124
|
-
config.APPLY_BUFFER_SIZE_OK = false;
|
|
125
|
-
}
|
|
126
|
-
}
|
|
127
|
-
|
|
128
|
-
return codeToString_slow(code);
|
|
129
|
-
}
|
|
130
|
-
|
|
131
|
-
return string;
|
|
132
|
-
}
|
|
133
|
-
exports.codeToString_chunked = codeToString_chunked;
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
function codeToString_slow(code) {
|
|
137
|
-
var string = '';
|
|
138
|
-
var length = code && code.length;
|
|
139
|
-
|
|
140
|
-
for (var i = 0; i < length; i++) {
|
|
141
|
-
string += fromCharCode(code[i]);
|
|
142
|
-
}
|
|
143
|
-
|
|
144
|
-
return string;
|
|
145
|
-
}
|
|
146
|
-
exports.codeToString_slow = codeToString_slow;
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
function stringToCode(string) {
|
|
150
|
-
var code = [];
|
|
151
|
-
var len = string && string.length;
|
|
152
|
-
|
|
153
|
-
for (var i = 0; i < len; i++) {
|
|
154
|
-
code[i] = string.charCodeAt(i);
|
|
155
|
-
}
|
|
156
|
-
|
|
157
|
-
return code;
|
|
158
|
-
}
|
|
159
|
-
exports.stringToCode = stringToCode;
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
function codeToBuffer(code) {
|
|
163
|
-
if (config.HAS_TYPED) {
|
|
164
|
-
// Unicode code point (charCodeAt range) values have a range of 0-0xFFFF, so use Uint16Array
|
|
165
|
-
return new Uint16Array(code);
|
|
166
|
-
}
|
|
167
|
-
|
|
168
|
-
if (isArray(code)) {
|
|
169
|
-
return code;
|
|
170
|
-
}
|
|
171
|
-
|
|
172
|
-
var length = code && code.length;
|
|
173
|
-
var buffer = [];
|
|
174
|
-
|
|
175
|
-
for (var i = 0; i < length; i++) {
|
|
176
|
-
buffer[i] = code[i];
|
|
177
|
-
}
|
|
178
|
-
|
|
179
|
-
return buffer;
|
|
180
|
-
}
|
|
181
|
-
exports.codeToBuffer = codeToBuffer;
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
function bufferToCode(buffer) {
|
|
185
|
-
if (isArray(buffer)) {
|
|
186
|
-
return buffer;
|
|
187
|
-
}
|
|
188
|
-
|
|
189
|
-
return slice.call(buffer);
|
|
190
|
-
}
|
|
191
|
-
exports.bufferToCode = bufferToCode;
|
|
192
|
-
|
|
193
|
-
/**
|
|
194
|
-
* Canonicalize the passed encoding name to the internal encoding name
|
|
195
|
-
*/
|
|
196
|
-
function canonicalizeEncodingName(target) {
|
|
197
|
-
var name = '';
|
|
198
|
-
var expect = ('' + target).toUpperCase().replace(/[^A-Z0-9]+/g, '');
|
|
199
|
-
var aliasNames = objectKeys(config.EncodingAliases);
|
|
200
|
-
var len = aliasNames.length;
|
|
201
|
-
var hit = 0;
|
|
202
|
-
var encoding, encodingLen, j;
|
|
203
|
-
|
|
204
|
-
for (var i = 0; i < len; i++) {
|
|
205
|
-
encoding = aliasNames[i];
|
|
206
|
-
if (encoding === expect) {
|
|
207
|
-
name = encoding;
|
|
208
|
-
break;
|
|
209
|
-
}
|
|
210
|
-
|
|
211
|
-
encodingLen = encoding.length;
|
|
212
|
-
for (j = hit; j < encodingLen; j++) {
|
|
213
|
-
if (encoding.slice(0, j) === expect.slice(0, j) ||
|
|
214
|
-
encoding.slice(-j) === expect.slice(-j)) {
|
|
215
|
-
name = encoding;
|
|
216
|
-
hit = j;
|
|
217
|
-
}
|
|
218
|
-
}
|
|
219
|
-
}
|
|
220
|
-
|
|
221
|
-
if (hasOwnProperty.call(config.EncodingAliases, name)) {
|
|
222
|
-
return config.EncodingAliases[name];
|
|
223
|
-
}
|
|
224
|
-
|
|
225
|
-
return name;
|
|
226
|
-
}
|
|
227
|
-
exports.canonicalizeEncodingName = canonicalizeEncodingName;
|
|
228
|
-
|
|
229
|
-
// Base64
|
|
230
|
-
/* Copyright (C) 1999 Masanao Izumo <iz@onicos.co.jp>
|
|
231
|
-
* Version: 1.0
|
|
232
|
-
* LastModified: Dec 25 1999
|
|
233
|
-
* This library is free. You can redistribute it and/or modify it.
|
|
234
|
-
*/
|
|
235
|
-
// -- Masanao Izumo Copyright 1999 "free"
|
|
236
|
-
// Added binary array support for the Encoding.js
|
|
237
|
-
|
|
238
|
-
var base64EncodeChars = [
|
|
239
|
-
65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77,
|
|
240
|
-
78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90,
|
|
241
|
-
97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109,
|
|
242
|
-
110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122,
|
|
243
|
-
48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 43, 47
|
|
244
|
-
];
|
|
245
|
-
|
|
246
|
-
var base64DecodeChars = [
|
|
247
|
-
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
|
|
248
|
-
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
|
|
249
|
-
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 62, -1, -1, -1, 63,
|
|
250
|
-
52, 53, 54, 55, 56, 57, 58, 59, 60, 61, -1, -1, -1, -1, -1, -1,
|
|
251
|
-
-1, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14,
|
|
252
|
-
15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, -1, -1, -1, -1, -1,
|
|
253
|
-
-1, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40,
|
|
254
|
-
41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, -1, -1, -1, -1, -1
|
|
255
|
-
];
|
|
256
|
-
|
|
257
|
-
var base64EncodePadding = '='.charCodeAt(0);
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
function base64encode(data) {
|
|
261
|
-
var out, i, len;
|
|
262
|
-
var c1, c2, c3;
|
|
263
|
-
|
|
264
|
-
len = data && data.length;
|
|
265
|
-
i = 0;
|
|
266
|
-
out = [];
|
|
267
|
-
|
|
268
|
-
while (i < len) {
|
|
269
|
-
c1 = data[i++];
|
|
270
|
-
if (i == len) {
|
|
271
|
-
out[out.length] = base64EncodeChars[c1 >> 2];
|
|
272
|
-
out[out.length] = base64EncodeChars[(c1 & 0x3) << 4];
|
|
273
|
-
out[out.length] = base64EncodePadding;
|
|
274
|
-
out[out.length] = base64EncodePadding;
|
|
275
|
-
break;
|
|
276
|
-
}
|
|
277
|
-
|
|
278
|
-
c2 = data[i++];
|
|
279
|
-
if (i == len) {
|
|
280
|
-
out[out.length] = base64EncodeChars[c1 >> 2];
|
|
281
|
-
out[out.length] = base64EncodeChars[((c1 & 0x3) << 4) | ((c2 & 0xF0) >> 4)];
|
|
282
|
-
out[out.length] = base64EncodeChars[(c2 & 0xF) << 2];
|
|
283
|
-
out[out.length] = base64EncodePadding;
|
|
284
|
-
break;
|
|
285
|
-
}
|
|
286
|
-
|
|
287
|
-
c3 = data[i++];
|
|
288
|
-
out[out.length] = base64EncodeChars[c1 >> 2];
|
|
289
|
-
out[out.length] = base64EncodeChars[((c1 & 0x3) << 4) | ((c2 & 0xF0) >> 4)];
|
|
290
|
-
out[out.length] = base64EncodeChars[((c2 & 0xF) << 2) | ((c3 & 0xC0) >> 6)];
|
|
291
|
-
out[out.length] = base64EncodeChars[c3 & 0x3F];
|
|
292
|
-
}
|
|
293
|
-
|
|
294
|
-
return codeToString_fast(out);
|
|
295
|
-
}
|
|
296
|
-
exports.base64encode = base64encode;
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
function base64decode(str) {
|
|
300
|
-
var c1, c2, c3, c4;
|
|
301
|
-
var i, len, out;
|
|
302
|
-
|
|
303
|
-
len = str && str.length;
|
|
304
|
-
i = 0;
|
|
305
|
-
out = [];
|
|
306
|
-
|
|
307
|
-
while (i < len) {
|
|
308
|
-
/* c1 */
|
|
309
|
-
do {
|
|
310
|
-
c1 = base64DecodeChars[str.charCodeAt(i++) & 0xFF];
|
|
311
|
-
} while (i < len && c1 == -1);
|
|
312
|
-
|
|
313
|
-
if (c1 == -1) {
|
|
314
|
-
break;
|
|
315
|
-
}
|
|
316
|
-
|
|
317
|
-
/* c2 */
|
|
318
|
-
do {
|
|
319
|
-
c2 = base64DecodeChars[str.charCodeAt(i++) & 0xFF];
|
|
320
|
-
} while (i < len && c2 == -1);
|
|
321
|
-
|
|
322
|
-
if (c2 == -1) {
|
|
323
|
-
break;
|
|
324
|
-
}
|
|
325
|
-
|
|
326
|
-
out[out.length] = (c1 << 2) | ((c2 & 0x30) >> 4);
|
|
327
|
-
|
|
328
|
-
/* c3 */
|
|
329
|
-
do {
|
|
330
|
-
c3 = str.charCodeAt(i++) & 0xFF;
|
|
331
|
-
if (c3 == 61) {
|
|
332
|
-
return out;
|
|
333
|
-
}
|
|
334
|
-
c3 = base64DecodeChars[c3];
|
|
335
|
-
} while (i < len && c3 == -1);
|
|
336
|
-
|
|
337
|
-
if (c3 == -1) {
|
|
338
|
-
break;
|
|
339
|
-
}
|
|
340
|
-
|
|
341
|
-
out[out.length] = ((c2 & 0xF) << 4) | ((c3 & 0x3C) >> 2);
|
|
342
|
-
|
|
343
|
-
/* c4 */
|
|
344
|
-
do {
|
|
345
|
-
c4 = str.charCodeAt(i++) & 0xFF;
|
|
346
|
-
if (c4 == 61) {
|
|
347
|
-
return out;
|
|
348
|
-
}
|
|
349
|
-
c4 = base64DecodeChars[c4];
|
|
350
|
-
} while (i < len && c4 == -1);
|
|
351
|
-
|
|
352
|
-
if (c4 == -1) {
|
|
353
|
-
break;
|
|
354
|
-
}
|
|
355
|
-
|
|
356
|
-
out[out.length] = ((c3 & 0x03) << 6) | c4;
|
|
357
|
-
}
|
|
358
|
-
|
|
359
|
-
return out;
|
|
360
|
-
}
|
|
361
|
-
exports.base64decode = base64decode;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
*.js text eol=lf
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
name: Run tests
|
|
2
|
-
|
|
3
|
-
on:
|
|
4
|
-
push:
|
|
5
|
-
pull_request:
|
|
6
|
-
|
|
7
|
-
jobs:
|
|
8
|
-
test:
|
|
9
|
-
strategy:
|
|
10
|
-
matrix:
|
|
11
|
-
node: [12.x, 14.x, 16.x, 18.x]
|
|
12
|
-
os: [ubuntu-latest, macos-latest, windows-latest]
|
|
13
|
-
runs-on: ${{ matrix.os }}
|
|
14
|
-
steps:
|
|
15
|
-
- uses: actions/checkout@v2
|
|
16
|
-
- name: Use Node.js ${{ matrix.node }}
|
|
17
|
-
uses: actions/setup-node@v1
|
|
18
|
-
with:
|
|
19
|
-
node-version: ${{ matrix.node }}
|
|
20
|
-
- run: npm install
|
|
21
|
-
- run: npm test
|
|
@@ -1,110 +0,0 @@
|
|
|
1
|
-
# Changelog
|
|
2
|
-
|
|
3
|
-
## v5.2.0 2022-12-08
|
|
4
|
-
|
|
5
|
-
- Bumped libqp to get rid of `new Buffer` warnings
|
|
6
|
-
|
|
7
|
-
## v5.1.0 2022-04-28
|
|
8
|
-
|
|
9
|
-
- Bumped deps
|
|
10
|
-
- Removed Travis config
|
|
11
|
-
- Added Github actions file to run tests
|
|
12
|
-
|
|
13
|
-
## v5.0.0 2020-07-22
|
|
14
|
-
|
|
15
|
-
- Removed optional node-iconv support
|
|
16
|
-
- Bumped dependencies
|
|
17
|
-
- Updated Travis test matrix, dropped Node 8
|
|
18
|
-
|
|
19
|
-
## v4.2.1 2019-10-28
|
|
20
|
-
|
|
21
|
-
- Replace jconv with more recent encoding-japanese
|
|
22
|
-
|
|
23
|
-
## v4.2.0 2019-10-28
|
|
24
|
-
|
|
25
|
-
- Use jconv module to parse ISO-2022-JP by default
|
|
26
|
-
|
|
27
|
-
## v4.1.4 2019-10-28
|
|
28
|
-
|
|
29
|
-
- decodeWords should also decode empty content part [WeiAnAn](9bbcfd2)
|
|
30
|
-
- fix decode base64 ending with = [WeiAnAn](6e656e2)
|
|
31
|
-
|
|
32
|
-
## v4.1.0 2019-05-01
|
|
33
|
-
|
|
34
|
-
- Experimental support for node-iconv
|
|
35
|
-
|
|
36
|
-
## v4.0.1 2018-07-24
|
|
37
|
-
|
|
38
|
-
- Maintenance release. Bumped deps
|
|
39
|
-
|
|
40
|
-
## v4.0.0 2018-06-11
|
|
41
|
-
|
|
42
|
-
- Refactored decoding of mime encoded words and parameter continuation strings
|
|
43
|
-
|
|
44
|
-
## v3.0.0 2016-12-08
|
|
45
|
-
|
|
46
|
-
- Updated encoded-word generation. Previously a minimal value was encoded, so it was possible to have multiple encoded words in a string separated by non encoded-words. This was an issue with some webmail clients that stripped out the non-encoded parts between encoded-words so the updated method uses wide match by encoding from the first word with unicode characters to the last word. "a =?b?= c =?d?= e" -> "a =?bcd?= e"
|
|
47
|
-
|
|
48
|
-
## v2.1.3 2016-12-08
|
|
49
|
-
|
|
50
|
-
- Revert dot as a special symbol
|
|
51
|
-
|
|
52
|
-
## v2.1.2 2016-11-21
|
|
53
|
-
|
|
54
|
-
- Quote special symbols as defined in RFC (surajwy)
|
|
55
|
-
|
|
56
|
-
## v2.1.1 2016-11-15
|
|
57
|
-
|
|
58
|
-
- Fixed issue with special symbols in attachment filenames
|
|
59
|
-
|
|
60
|
-
## v2.1.0 2016-07-24
|
|
61
|
-
|
|
62
|
-
- Changed handling of base64 encoded mime words where multiple words are joined together if possible. This fixes issues with multi byte characters getting split into different mime words (against the RFC but occurs)
|
|
63
|
-
|
|
64
|
-
## v2.0.3 2016-02-29
|
|
65
|
-
|
|
66
|
-
- Fixed an issue with rfc2231 filenames
|
|
67
|
-
|
|
68
|
-
## v2.0.2 2016-02-11
|
|
69
|
-
|
|
70
|
-
- Fixed an issue with base64 mime words encoding
|
|
71
|
-
|
|
72
|
-
## v2.0.1 2016-02-11
|
|
73
|
-
|
|
74
|
-
- Fix base64 mime-word encoding. Final string length was calculated invalidly
|
|
75
|
-
|
|
76
|
-
## v2.0.0 2016-01-04
|
|
77
|
-
|
|
78
|
-
- Replaced jshint with eslint
|
|
79
|
-
- Refactored file structure
|
|
80
|
-
|
|
81
|
-
## v1.2.1 2015-10-05
|
|
82
|
-
|
|
83
|
-
Added support for emojis in header params (eg. filenames)
|
|
84
|
-
|
|
85
|
-
## v1.2.0 2015-10-05
|
|
86
|
-
|
|
87
|
-
Added support for emojis in header params (eg. filenames)
|
|
88
|
-
|
|
89
|
-
## v1.1.0 2015-09-24
|
|
90
|
-
|
|
91
|
-
Updated encoded word encoding with quoted printable, should be more like required in https://tools.ietf.org/html/rfc2047#section-5
|
|
92
|
-
|
|
93
|
-
## v1.0.0 2015-04-15
|
|
94
|
-
|
|
95
|
-
Changed versioning scheme to use 1.x instead of 0.x versions. Bumped dependency versions, no actual code changes.
|
|
96
|
-
|
|
97
|
-
## v0.1.7 2015-01-19
|
|
98
|
-
|
|
99
|
-
Updated unicode filename handling – only revert to parameter continuation if the value actually includes
|
|
100
|
-
non-ascii characters or is too long. Previously filenames were encoded if they included anything
|
|
101
|
-
besides letters, numbers, dot or space.
|
|
102
|
-
|
|
103
|
-
## v0.1.6 2014-10-25
|
|
104
|
-
|
|
105
|
-
Fixed an issue with `encodeWords` where a trailing space was invalidly included in a word if the word
|
|
106
|
-
ended with an non-ascii character.
|
|
107
|
-
|
|
108
|
-
## v0.1.5 2014-09-12
|
|
109
|
-
|
|
110
|
-
Do not use quotes for continuation encoded filename parts. Fixes an issue with Gmail where the Gmail webmail keeps the charset as part of the filename.
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
Copyright (c) 2014-2016 Andris Reinman
|
|
2
|
-
|
|
3
|
-
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
4
|
-
of this software and associated documentation files (the "Software"), to deal
|
|
5
|
-
in the Software without restriction, including without limitation the rights
|
|
6
|
-
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
7
|
-
copies of the Software, and to permit persons to whom the Software is
|
|
8
|
-
furnished to do so, subject to the following conditions:
|
|
9
|
-
|
|
10
|
-
The above copyright notice and this permission notice shall be included in
|
|
11
|
-
all copies or substantial portions of the Software.
|
|
12
|
-
|
|
13
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
14
|
-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
15
|
-
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
16
|
-
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
17
|
-
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
18
|
-
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
19
|
-
THE SOFTWARE.
|