@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,207 +0,0 @@
|
|
|
1
|
-
# libmime
|
|
2
|
-
|
|
3
|
-
`libmime` provides useful MIME related functions. For Quoted-Printable and Base64 encoding and decoding see [libqp](https://github.com/andris9/libqp) and [libbase64](https://github.com/andris9/libabase64).
|
|
4
|
-
|
|
5
|
-
## Installation
|
|
6
|
-
|
|
7
|
-
### [npm](https://www.npmjs.org/):
|
|
8
|
-
|
|
9
|
-
npm install libmime
|
|
10
|
-
|
|
11
|
-
## Usage
|
|
12
|
-
|
|
13
|
-
var libmime = require('libmime');
|
|
14
|
-
|
|
15
|
-
## Methods
|
|
16
|
-
|
|
17
|
-
### Encoded Words
|
|
18
|
-
|
|
19
|
-
#### #encodeWord
|
|
20
|
-
|
|
21
|
-
Encodes a string into mime [encoded word](http://en.wikipedia.org/wiki/MIME#Encoded-Word) format.
|
|
22
|
-
|
|
23
|
-
libmime.encodeWord(str [, mimeWordEncoding[, maxLength]]) → String
|
|
24
|
-
|
|
25
|
-
* **str** - String or Buffer to be encoded
|
|
26
|
-
* **mimeWordEncoding** - Encoding for the mime word, either Q or B (default is 'Q')
|
|
27
|
-
* **maxLength** - If set, split mime words into several chunks if needed
|
|
28
|
-
|
|
29
|
-
**Example**
|
|
30
|
-
|
|
31
|
-
libmime.encodeWord('See on õhin test', 'Q');
|
|
32
|
-
|
|
33
|
-
Becomes with UTF-8 and Quoted-printable encoding
|
|
34
|
-
|
|
35
|
-
=?UTF-8?Q?See_on_=C3=B5hin_test?=
|
|
36
|
-
|
|
37
|
-
#### #encodeWords
|
|
38
|
-
|
|
39
|
-
Encodes non ascii sequences in a string to mime words.
|
|
40
|
-
|
|
41
|
-
libmime.encodeWords(str[, mimeWordEncoding[, maxLength]) → String
|
|
42
|
-
|
|
43
|
-
* **str** - String or Buffer to be encoded
|
|
44
|
-
* **mimeWordEncoding** - Encoding for the mime word, either Q or B (default is 'Q')
|
|
45
|
-
* **maxLength** - If set, split mime words into several chunks if needed
|
|
46
|
-
|
|
47
|
-
#### #decodeWords
|
|
48
|
-
|
|
49
|
-
Decodes a string that might include one or several mime words. If no mime words are found from the string, the original string is returned
|
|
50
|
-
|
|
51
|
-
libmime.decodeWords(str) → String
|
|
52
|
-
|
|
53
|
-
* **str** - String to be decoded
|
|
54
|
-
|
|
55
|
-
### Folding
|
|
56
|
-
|
|
57
|
-
#### #foldLines
|
|
58
|
-
|
|
59
|
-
Folds a long line according to the [RFC 5322](http://tools.ietf.org/html/rfc5322#section-2.1.1). Mostly needed for folding header lines.
|
|
60
|
-
|
|
61
|
-
libmime.foldLines(str [, lineLength[, afterSpace]]) → String
|
|
62
|
-
|
|
63
|
-
* **str** - String to be folded
|
|
64
|
-
* **lineLength** - Maximum length of a line (defaults to 76)
|
|
65
|
-
* **afterSpace** - If true, leave a space in the end of a line
|
|
66
|
-
|
|
67
|
-
**Example**
|
|
68
|
-
|
|
69
|
-
libmime.foldLines('Content-Type: multipart/alternative; boundary="----zzzz----"')
|
|
70
|
-
|
|
71
|
-
results in
|
|
72
|
-
|
|
73
|
-
Content-Type: multipart/alternative;
|
|
74
|
-
boundary="----zzzz----"
|
|
75
|
-
|
|
76
|
-
#### #encodeFlowed
|
|
77
|
-
|
|
78
|
-
Adds soft line breaks to content marked with `format=flowed` options to ensure that no line in the message is never longer than lineLength.
|
|
79
|
-
|
|
80
|
-
libmime.encodeFlowed(str [, lineLength]) → String
|
|
81
|
-
|
|
82
|
-
* **str** Plaintext string that requires wrapping
|
|
83
|
-
* **lineLength** (defaults to 76) Maximum length of a line
|
|
84
|
-
|
|
85
|
-
#### #decodeFlowed
|
|
86
|
-
|
|
87
|
-
Unwraps a plaintext string in format=flowed wrapping.
|
|
88
|
-
|
|
89
|
-
libmime.decodeFlowed(str [, delSp]) → String
|
|
90
|
-
|
|
91
|
-
* **str** Plaintext string with format=flowed to decode
|
|
92
|
-
* **delSp** If true, delete leading spaces (delsp=yes)
|
|
93
|
-
|
|
94
|
-
### Headers
|
|
95
|
-
|
|
96
|
-
#### #decodeHeader
|
|
97
|
-
|
|
98
|
-
Unfolds a header line and splits it to key and value pair. The return value is in the form of `{key: 'subject', value: 'test'}`. The value is not mime word decoded, you need to do your own decoding based on the rules for the specific header key.
|
|
99
|
-
|
|
100
|
-
libmime.decodeHeader(headerLine) → Object
|
|
101
|
-
|
|
102
|
-
* **headerLine** - Single header line, might include linebreaks as well if folded
|
|
103
|
-
|
|
104
|
-
#### #decodeHeaders
|
|
105
|
-
|
|
106
|
-
Parses a block of header lines. Does not decode mime words as every header might have its own rules (eg. formatted email addresses and such).
|
|
107
|
-
|
|
108
|
-
Return value is an object of headers, where header keys are object keys and values are arrays.
|
|
109
|
-
|
|
110
|
-
libmime.decodeHeaders(headers) → Object
|
|
111
|
-
|
|
112
|
-
* **headers** - Headers string
|
|
113
|
-
|
|
114
|
-
#### #parseHeaderValue
|
|
115
|
-
|
|
116
|
-
Parses a header value with `key=value` arguments into a structured object. Useful when dealing with
|
|
117
|
-
`content-type` and such. Continuation encoded params are joined into mime encoded words.
|
|
118
|
-
|
|
119
|
-
parseHeaderValue(valueString) → Object
|
|
120
|
-
|
|
121
|
-
* **valueString** - a header value without the key
|
|
122
|
-
|
|
123
|
-
**Example**
|
|
124
|
-
|
|
125
|
-
```javascript
|
|
126
|
-
parseHeaderValue('content-type: text/plain; CHARSET="UTF-8"');
|
|
127
|
-
```
|
|
128
|
-
|
|
129
|
-
Outputs
|
|
130
|
-
|
|
131
|
-
```json
|
|
132
|
-
{
|
|
133
|
-
"value": "text/plain",
|
|
134
|
-
"params": {
|
|
135
|
-
"charset": "UTF-8"
|
|
136
|
-
}
|
|
137
|
-
}
|
|
138
|
-
```
|
|
139
|
-
|
|
140
|
-
#### #buildHeaderValue
|
|
141
|
-
|
|
142
|
-
Joins structured header value together as 'value; param1=value1; param2=value2'
|
|
143
|
-
|
|
144
|
-
buildHeaderValue(structuredHeader) → String
|
|
145
|
-
|
|
146
|
-
* **structuredHeader** - a header value formatted with `parseHeaderValue`
|
|
147
|
-
|
|
148
|
-
`filename` argument is encoded with continuation encoding if needed
|
|
149
|
-
|
|
150
|
-
#### #buildHeaderParam
|
|
151
|
-
|
|
152
|
-
Encodes and splits a header param value according to [RFC2231](https://tools.ietf.org/html/rfc2231#section-3) Parameter Value Continuations.
|
|
153
|
-
|
|
154
|
-
libmime.buildHeaderParam(key, str, maxLength) → Array
|
|
155
|
-
|
|
156
|
-
* **key** - Parameter key (eg. `filename`)
|
|
157
|
-
* **str** - String or an Buffer value to encode
|
|
158
|
-
* **maxLength** - Maximum length of the encoded string part (not line length). Defaults to 50
|
|
159
|
-
|
|
160
|
-
The method returns an array of encoded parts with the following structure: `[{key:'...', value: '...'}]`
|
|
161
|
-
|
|
162
|
-
**Example**
|
|
163
|
-
|
|
164
|
-
```
|
|
165
|
-
libmime.buildHeaderParam('filename', 'filename õäöü.txt', 20);
|
|
166
|
-
→
|
|
167
|
-
[ { key: 'filename*0*', value: 'utf-8\'\'filename%20' },
|
|
168
|
-
{ key: 'filename*1*', value: '%C3%B5%C3%A4%C3%B6' },
|
|
169
|
-
{ key: 'filename*2*', value: '%C3%BC.txt' } ]
|
|
170
|
-
```
|
|
171
|
-
|
|
172
|
-
This can be combined into a properly formatted header:
|
|
173
|
-
|
|
174
|
-
```
|
|
175
|
-
Content-disposition: attachment; filename*0*=utf-8''filename%20
|
|
176
|
-
filename*1*=%C3%B5%C3%A4%C3%B6; filename*2*=%C3%BC.txt
|
|
177
|
-
```
|
|
178
|
-
|
|
179
|
-
### MIME Types
|
|
180
|
-
|
|
181
|
-
#### #detectExtension
|
|
182
|
-
|
|
183
|
-
Returns file extension for a content type string. If no suitable extensions are found, 'bin' is used as the default extension.
|
|
184
|
-
|
|
185
|
-
libmime.detectExtension(mimeType) → String
|
|
186
|
-
|
|
187
|
-
* **mimeType** - Content type to be checked for
|
|
188
|
-
|
|
189
|
-
**Example**
|
|
190
|
-
|
|
191
|
-
libmime.detectExtension('image/jpeg') // returns 'jpeg'
|
|
192
|
-
|
|
193
|
-
#### #detectMimeType
|
|
194
|
-
|
|
195
|
-
Returns content type for a file extension. If no suitable content types are found, 'application/octet-stream' is used as the default content type
|
|
196
|
-
|
|
197
|
-
libmime.detectMimeType(extension) → String
|
|
198
|
-
|
|
199
|
-
* **extension** Extension (or filename) to be checked for
|
|
200
|
-
|
|
201
|
-
**Example**
|
|
202
|
-
|
|
203
|
-
libmime.detectExtension('logo.jpg') // returns 'image/jpeg'
|
|
204
|
-
|
|
205
|
-
## License
|
|
206
|
-
|
|
207
|
-
**MIT**
|
|
@@ -1,117 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
const iconv = require('iconv-lite');
|
|
4
|
-
const encodingJapanese = require('encoding-japanese');
|
|
5
|
-
const charsets = require('./charsets');
|
|
6
|
-
|
|
7
|
-
/**
|
|
8
|
-
* Character set encoding and decoding functions
|
|
9
|
-
*/
|
|
10
|
-
const charset = (module.exports = {
|
|
11
|
-
/**
|
|
12
|
-
* Encodes an unicode string into an Buffer object as UTF-8
|
|
13
|
-
*
|
|
14
|
-
* We force UTF-8 here, no strange encodings allowed.
|
|
15
|
-
*
|
|
16
|
-
* @param {String} str String to be encoded
|
|
17
|
-
* @return {Buffer} UTF-8 encoded typed array
|
|
18
|
-
*/
|
|
19
|
-
encode(str) {
|
|
20
|
-
return Buffer.from(str, 'utf-8');
|
|
21
|
-
},
|
|
22
|
-
|
|
23
|
-
/**
|
|
24
|
-
* Decodes a string from Buffer to an unicode string using specified encoding
|
|
25
|
-
* NB! Throws if unknown charset is used
|
|
26
|
-
*
|
|
27
|
-
* @param {Buffer} buf Binary data to be decoded
|
|
28
|
-
* @param {String} [fromCharset='UTF-8'] Binary data is decoded into string using this charset
|
|
29
|
-
* @return {String} Decded string
|
|
30
|
-
*/
|
|
31
|
-
decode(buf, fromCharset) {
|
|
32
|
-
fromCharset = charset.normalizeCharset(fromCharset || 'UTF-8');
|
|
33
|
-
|
|
34
|
-
if (/^(us-)?ascii|utf-8|7bit$/i.test(fromCharset)) {
|
|
35
|
-
return buf.toString('utf-8');
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
try {
|
|
39
|
-
if (/^jis|^iso-?2022-?jp|^EUCJP/i.test(fromCharset)) {
|
|
40
|
-
if (typeof buf === 'string') {
|
|
41
|
-
buf = Buffer.from(buf);
|
|
42
|
-
}
|
|
43
|
-
try {
|
|
44
|
-
let output = encodingJapanese.convert(buf, {
|
|
45
|
-
to: 'UNICODE',
|
|
46
|
-
from: fromCharset,
|
|
47
|
-
type: 'string'
|
|
48
|
-
});
|
|
49
|
-
if (typeof output === 'string') {
|
|
50
|
-
output = Buffer.from(output);
|
|
51
|
-
}
|
|
52
|
-
return output;
|
|
53
|
-
} catch (err) {
|
|
54
|
-
// ignore, defaults to iconv-lite on error
|
|
55
|
-
}
|
|
56
|
-
}
|
|
57
|
-
|
|
58
|
-
return iconv.decode(buf, fromCharset);
|
|
59
|
-
} catch (err) {
|
|
60
|
-
// enforce utf-8, data loss might occur
|
|
61
|
-
return buf.toString();
|
|
62
|
-
}
|
|
63
|
-
},
|
|
64
|
-
|
|
65
|
-
/**
|
|
66
|
-
* Convert a string from specific encoding to UTF-8 Buffer
|
|
67
|
-
*
|
|
68
|
-
* @param {String|Buffer} str String to be encoded
|
|
69
|
-
* @param {String} [fromCharset='UTF-8'] Source encoding for the string
|
|
70
|
-
* @return {Buffer} UTF-8 encoded typed array
|
|
71
|
-
*/
|
|
72
|
-
convert(data, fromCharset) {
|
|
73
|
-
fromCharset = charset.normalizeCharset(fromCharset || 'UTF-8');
|
|
74
|
-
|
|
75
|
-
let bufString;
|
|
76
|
-
|
|
77
|
-
if (typeof data !== 'string') {
|
|
78
|
-
if (/^(us-)?ascii|utf-8|7bit$/i.test(fromCharset)) {
|
|
79
|
-
return data;
|
|
80
|
-
}
|
|
81
|
-
|
|
82
|
-
bufString = charset.decode(data, fromCharset);
|
|
83
|
-
return charset.encode(bufString);
|
|
84
|
-
}
|
|
85
|
-
return charset.encode(data);
|
|
86
|
-
},
|
|
87
|
-
|
|
88
|
-
/**
|
|
89
|
-
* Converts well known invalid character set names to proper names.
|
|
90
|
-
* eg. win-1257 will be converted to WINDOWS-1257
|
|
91
|
-
*
|
|
92
|
-
* @param {String} charset Charset name to convert
|
|
93
|
-
* @return {String} Canoninicalized charset name
|
|
94
|
-
*/
|
|
95
|
-
normalizeCharset(charset) {
|
|
96
|
-
charset = charset.toLowerCase().trim();
|
|
97
|
-
|
|
98
|
-
// first pass
|
|
99
|
-
if (charsets.hasOwnProperty(charset) && charsets[charset]) {
|
|
100
|
-
return charsets[charset];
|
|
101
|
-
}
|
|
102
|
-
|
|
103
|
-
charset = charset
|
|
104
|
-
.replace(/^utf[-_]?(\d+)/, 'utf-$1')
|
|
105
|
-
.replace(/^(?:us[-_]?)ascii/, 'windows-1252')
|
|
106
|
-
.replace(/^win(?:dows)?[-_]?(\d+)/, 'windows-$1')
|
|
107
|
-
.replace(/^(?:latin|iso[-_]?8859)?[-_]?(\d+)/, 'iso-8859-$1')
|
|
108
|
-
.replace(/^l[-_]?(\d+)/, 'iso-8859-$1');
|
|
109
|
-
|
|
110
|
-
// updated pass
|
|
111
|
-
if (charsets.hasOwnProperty(charset) && charsets[charset]) {
|
|
112
|
-
return charsets[charset];
|
|
113
|
-
}
|
|
114
|
-
|
|
115
|
-
return charset.toUpperCase();
|
|
116
|
-
}
|
|
117
|
-
});
|
|
@@ -1,212 +0,0 @@
|
|
|
1
|
-
/* eslint quote-props: 0*/
|
|
2
|
-
|
|
3
|
-
'use strict';
|
|
4
|
-
|
|
5
|
-
module.exports = {
|
|
6
|
-
'866': 'IBM866',
|
|
7
|
-
'unicode-1-1-utf-8': 'UTF-8',
|
|
8
|
-
'utf-8': 'UTF-8',
|
|
9
|
-
utf8: 'UTF-8',
|
|
10
|
-
cp866: 'IBM866',
|
|
11
|
-
csibm866: 'IBM866',
|
|
12
|
-
ibm866: 'IBM866',
|
|
13
|
-
csisolatin2: 'ISO-8859-2',
|
|
14
|
-
'iso-8859-2': 'ISO-8859-2',
|
|
15
|
-
'iso-ir-101': 'ISO-8859-2',
|
|
16
|
-
'iso8859-2': 'ISO-8859-2',
|
|
17
|
-
iso88592: 'ISO-8859-2',
|
|
18
|
-
'iso_8859-2': 'ISO-8859-2',
|
|
19
|
-
'iso_8859-2:1987': 'ISO-8859-2',
|
|
20
|
-
l2: 'ISO-8859-2',
|
|
21
|
-
latin2: 'ISO-8859-2',
|
|
22
|
-
csisolatin3: 'ISO-8859-3',
|
|
23
|
-
'iso-8859-3': 'ISO-8859-3',
|
|
24
|
-
'iso-ir-109': 'ISO-8859-3',
|
|
25
|
-
'iso8859-3': 'ISO-8859-3',
|
|
26
|
-
iso88593: 'ISO-8859-3',
|
|
27
|
-
'iso_8859-3': 'ISO-8859-3',
|
|
28
|
-
'iso_8859-3:1988': 'ISO-8859-3',
|
|
29
|
-
l3: 'ISO-8859-3',
|
|
30
|
-
latin3: 'ISO-8859-3',
|
|
31
|
-
csisolatin4: 'ISO-8859-4',
|
|
32
|
-
'iso-8859-4': 'ISO-8859-4',
|
|
33
|
-
'iso-ir-110': 'ISO-8859-4',
|
|
34
|
-
'iso8859-4': 'ISO-8859-4',
|
|
35
|
-
iso88594: 'ISO-8859-4',
|
|
36
|
-
'iso_8859-4': 'ISO-8859-4',
|
|
37
|
-
'iso_8859-4:1988': 'ISO-8859-4',
|
|
38
|
-
l4: 'ISO-8859-4',
|
|
39
|
-
latin4: 'ISO-8859-4',
|
|
40
|
-
csisolatincyrillic: 'ISO-8859-5',
|
|
41
|
-
cyrillic: 'ISO-8859-5',
|
|
42
|
-
'iso-8859-5': 'ISO-8859-5',
|
|
43
|
-
'iso-ir-144': 'ISO-8859-5',
|
|
44
|
-
'iso8859-5': 'ISO-8859-5',
|
|
45
|
-
iso88595: 'ISO-8859-5',
|
|
46
|
-
'iso_8859-5': 'ISO-8859-5',
|
|
47
|
-
'iso_8859-5:1988': 'ISO-8859-5',
|
|
48
|
-
arabic: 'ISO-8859-6',
|
|
49
|
-
'asmo-708': 'ISO-8859-6',
|
|
50
|
-
csiso88596e: 'ISO-8859-6',
|
|
51
|
-
csiso88596i: 'ISO-8859-6',
|
|
52
|
-
csisolatinarabic: 'ISO-8859-6',
|
|
53
|
-
'ecma-114': 'ISO-8859-6',
|
|
54
|
-
'iso-8859-6': 'ISO-8859-6',
|
|
55
|
-
'iso-8859-6-e': 'ISO-8859-6',
|
|
56
|
-
'iso-8859-6-i': 'ISO-8859-6',
|
|
57
|
-
'iso-ir-127': 'ISO-8859-6',
|
|
58
|
-
'iso8859-6': 'ISO-8859-6',
|
|
59
|
-
iso88596: 'ISO-8859-6',
|
|
60
|
-
'iso_8859-6': 'ISO-8859-6',
|
|
61
|
-
'iso_8859-6:1987': 'ISO-8859-6',
|
|
62
|
-
csisolatingreek: 'ISO-8859-7',
|
|
63
|
-
'ecma-118': 'ISO-8859-7',
|
|
64
|
-
elot_928: 'ISO-8859-7',
|
|
65
|
-
greek: 'ISO-8859-7',
|
|
66
|
-
greek8: 'ISO-8859-7',
|
|
67
|
-
'iso-8859-7': 'ISO-8859-7',
|
|
68
|
-
'iso-ir-126': 'ISO-8859-7',
|
|
69
|
-
'iso8859-7': 'ISO-8859-7',
|
|
70
|
-
iso88597: 'ISO-8859-7',
|
|
71
|
-
'iso_8859-7': 'ISO-8859-7',
|
|
72
|
-
'iso_8859-7:1987': 'ISO-8859-7',
|
|
73
|
-
sun_eu_greek: 'ISO-8859-7',
|
|
74
|
-
csiso88598e: 'ISO-8859-8',
|
|
75
|
-
csisolatinhebrew: 'ISO-8859-8',
|
|
76
|
-
hebrew: 'ISO-8859-8',
|
|
77
|
-
'iso-8859-8': 'ISO-8859-8',
|
|
78
|
-
'iso-8859-8-e': 'ISO-8859-8',
|
|
79
|
-
'iso-8859-8-i': 'ISO-8859-8',
|
|
80
|
-
'iso-ir-138': 'ISO-8859-8',
|
|
81
|
-
'iso8859-8': 'ISO-8859-8',
|
|
82
|
-
iso88598: 'ISO-8859-8',
|
|
83
|
-
'iso_8859-8': 'ISO-8859-8',
|
|
84
|
-
'iso_8859-8:1988': 'ISO-8859-8',
|
|
85
|
-
visual: 'ISO-8859-8',
|
|
86
|
-
csisolatin6: 'ISO-8859-10',
|
|
87
|
-
'iso-8859-10': 'ISO-8859-10',
|
|
88
|
-
'iso-ir-157': 'ISO-8859-10',
|
|
89
|
-
'iso8859-10': 'ISO-8859-10',
|
|
90
|
-
iso885910: 'ISO-8859-10',
|
|
91
|
-
l6: 'ISO-8859-10',
|
|
92
|
-
latin6: 'ISO-8859-10',
|
|
93
|
-
'iso-8859-13': 'ISO-8859-13',
|
|
94
|
-
'iso8859-13': 'ISO-8859-13',
|
|
95
|
-
iso885913: 'ISO-8859-13',
|
|
96
|
-
'iso-8859-14': 'ISO-8859-14',
|
|
97
|
-
'iso8859-14': 'ISO-8859-14',
|
|
98
|
-
iso885914: 'ISO-8859-14',
|
|
99
|
-
csisolatin9: 'ISO-8859-15',
|
|
100
|
-
'iso-8859-15': 'ISO-8859-15',
|
|
101
|
-
'iso8859-15': 'ISO-8859-15',
|
|
102
|
-
iso885915: 'ISO-8859-15',
|
|
103
|
-
'iso_8859-15': 'ISO-8859-15',
|
|
104
|
-
l9: 'ISO-8859-15',
|
|
105
|
-
'iso-8859-16': 'ISO-8859-16',
|
|
106
|
-
cskoi8r: 'KOI8-R',
|
|
107
|
-
koi: 'KOI8-R',
|
|
108
|
-
koi8: 'KOI8-R',
|
|
109
|
-
'koi8-r': 'KOI8-R',
|
|
110
|
-
koi8_r: 'KOI8-R',
|
|
111
|
-
'koi8-ru': 'KOI8-U',
|
|
112
|
-
'koi8-u': 'KOI8-U',
|
|
113
|
-
csmacintosh: 'macintosh',
|
|
114
|
-
mac: 'macintosh',
|
|
115
|
-
macintosh: 'macintosh',
|
|
116
|
-
'x-mac-roman': 'macintosh',
|
|
117
|
-
'dos-874': 'windows-874',
|
|
118
|
-
'iso-8859-11': 'windows-874',
|
|
119
|
-
'iso8859-11': 'windows-874',
|
|
120
|
-
iso885911: 'windows-874',
|
|
121
|
-
'tis-620': 'windows-874',
|
|
122
|
-
'windows-874': 'windows-874',
|
|
123
|
-
cp1250: 'windows-1250',
|
|
124
|
-
'windows-1250': 'windows-1250',
|
|
125
|
-
'x-cp1250': 'windows-1250',
|
|
126
|
-
cp1251: 'windows-1251',
|
|
127
|
-
'windows-1251': 'windows-1251',
|
|
128
|
-
'x-cp1251': 'windows-1251',
|
|
129
|
-
'ansi_x3.4-1968': 'windows-1252',
|
|
130
|
-
ascii: 'windows-1252',
|
|
131
|
-
cp1252: 'windows-1252',
|
|
132
|
-
cp819: 'windows-1252',
|
|
133
|
-
csisolatin1: 'windows-1252',
|
|
134
|
-
ibm819: 'windows-1252',
|
|
135
|
-
'iso-8859-1': 'windows-1252',
|
|
136
|
-
'iso-ir-100': 'windows-1252',
|
|
137
|
-
'iso8859-1': 'windows-1252',
|
|
138
|
-
iso88591: 'windows-1252',
|
|
139
|
-
'iso_8859-1': 'windows-1252',
|
|
140
|
-
'iso_8859-1:1987': 'windows-1252',
|
|
141
|
-
l1: 'windows-1252',
|
|
142
|
-
latin1: 'windows-1252',
|
|
143
|
-
'us-ascii': 'windows-1252',
|
|
144
|
-
'windows-1252': 'windows-1252',
|
|
145
|
-
'x-cp1252': 'windows-1252',
|
|
146
|
-
cp1253: 'windows-1253',
|
|
147
|
-
'windows-1253': 'windows-1253',
|
|
148
|
-
'x-cp1253': 'windows-1253',
|
|
149
|
-
cp1254: 'windows-1254',
|
|
150
|
-
csisolatin5: 'windows-1254',
|
|
151
|
-
'iso-8859-9': 'windows-1254',
|
|
152
|
-
'iso-ir-148': 'windows-1254',
|
|
153
|
-
'iso8859-9': 'windows-1254',
|
|
154
|
-
iso88599: 'windows-1254',
|
|
155
|
-
'iso_8859-9': 'windows-1254',
|
|
156
|
-
'iso_8859-9:1989': 'windows-1254',
|
|
157
|
-
l5: 'windows-1254',
|
|
158
|
-
latin5: 'windows-1254',
|
|
159
|
-
'windows-1254': 'windows-1254',
|
|
160
|
-
'x-cp1254': 'windows-1254',
|
|
161
|
-
cp1255: 'windows-1255',
|
|
162
|
-
'windows-1255': 'windows-1255',
|
|
163
|
-
'x-cp1255': 'windows-1255',
|
|
164
|
-
cp1256: 'windows-1256',
|
|
165
|
-
'windows-1256': 'windows-1256',
|
|
166
|
-
'x-cp1256': 'windows-1256',
|
|
167
|
-
cp1257: 'windows-1257',
|
|
168
|
-
'windows-1257': 'windows-1257',
|
|
169
|
-
'x-cp1257': 'windows-1257',
|
|
170
|
-
cp1258: 'windows-1258',
|
|
171
|
-
'windows-1258': 'windows-1258',
|
|
172
|
-
'x-cp1258': 'windows-1258',
|
|
173
|
-
chinese: 'GBK',
|
|
174
|
-
csgb2312: 'GBK',
|
|
175
|
-
csiso58gb231280: 'GBK',
|
|
176
|
-
gb2312: 'GBK',
|
|
177
|
-
gb_2312: 'GBK',
|
|
178
|
-
'gb_2312-80': 'GBK',
|
|
179
|
-
gbk: 'GBK',
|
|
180
|
-
'iso-ir-58': 'GBK',
|
|
181
|
-
'x-gbk': 'GBK',
|
|
182
|
-
gb18030: 'gb18030',
|
|
183
|
-
big5: 'Big5',
|
|
184
|
-
'big5-hkscs': 'Big5',
|
|
185
|
-
'cn-big5': 'Big5',
|
|
186
|
-
csbig5: 'Big5',
|
|
187
|
-
'x-x-big5': 'Big5',
|
|
188
|
-
cseucpkdfmtjapanese: 'EUC-JP',
|
|
189
|
-
'euc-jp': 'EUC-JP',
|
|
190
|
-
'x-euc-jp': 'EUC-JP',
|
|
191
|
-
csshiftjis: 'Shift_JIS',
|
|
192
|
-
ms932: 'Shift_JIS',
|
|
193
|
-
ms_kanji: 'Shift_JIS',
|
|
194
|
-
'shift-jis': 'Shift_JIS',
|
|
195
|
-
shift_jis: 'Shift_JIS',
|
|
196
|
-
sjis: 'Shift_JIS',
|
|
197
|
-
'windows-31j': 'Shift_JIS',
|
|
198
|
-
'x-sjis': 'Shift_JIS',
|
|
199
|
-
cseuckr: 'EUC-KR',
|
|
200
|
-
csksc56011987: 'EUC-KR',
|
|
201
|
-
'euc-kr': 'EUC-KR',
|
|
202
|
-
'iso-ir-149': 'EUC-KR',
|
|
203
|
-
korean: 'EUC-KR',
|
|
204
|
-
'ks_c_5601-1987': 'EUC-KR',
|
|
205
|
-
'ks_c_5601-1989': 'EUC-KR',
|
|
206
|
-
ksc5601: 'EUC-KR',
|
|
207
|
-
ksc_5601: 'EUC-KR',
|
|
208
|
-
'windows-949': 'EUC-KR',
|
|
209
|
-
'utf-16be': 'UTF-16BE',
|
|
210
|
-
'utf-16': 'UTF-16LE',
|
|
211
|
-
'utf-16le': 'UTF-16LE'
|
|
212
|
-
};
|