@worknice/utils 0.3.20-rc.2 → 0.4.0-rc.1
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.
|
@@ -0,0 +1,167 @@
|
|
|
1
|
+
const KNOWN_MIME_TYPES = {
|
|
2
|
+
"application/msword": {
|
|
3
|
+
extension: "doc",
|
|
4
|
+
name: "Word"
|
|
5
|
+
},
|
|
6
|
+
"application/pdf": {
|
|
7
|
+
extension: "pdf",
|
|
8
|
+
name: "PDF"
|
|
9
|
+
},
|
|
10
|
+
"application/rtf": {
|
|
11
|
+
extension: "rtf",
|
|
12
|
+
name: "RTF"
|
|
13
|
+
},
|
|
14
|
+
"application/vnd.apple.keynote": {
|
|
15
|
+
extension: "key",
|
|
16
|
+
name: "Keynote"
|
|
17
|
+
},
|
|
18
|
+
"application/vnd.apple.numbers": {
|
|
19
|
+
extension: "numbers",
|
|
20
|
+
name: "Numbers"
|
|
21
|
+
},
|
|
22
|
+
"application/vnd.apple.pages": {
|
|
23
|
+
extension: "pages",
|
|
24
|
+
name: "Pages"
|
|
25
|
+
},
|
|
26
|
+
"application/vnd.ms-excel": {
|
|
27
|
+
extension: "xls",
|
|
28
|
+
name: "Excel spreadsheet"
|
|
29
|
+
},
|
|
30
|
+
"application/vnd.ms-outlook": {
|
|
31
|
+
extension: "msg",
|
|
32
|
+
name: "Outlook message"
|
|
33
|
+
},
|
|
34
|
+
"application/vnd.ms-powerpoint.presentation.macroEnabled.12": {
|
|
35
|
+
extension: "pptm",
|
|
36
|
+
name: "PowerPoint presentation"
|
|
37
|
+
},
|
|
38
|
+
"application/vnd.ms-powerpoint": {
|
|
39
|
+
extension: "ppt",
|
|
40
|
+
name: "PowerPoint presentation"
|
|
41
|
+
},
|
|
42
|
+
"application/vnd.oasis.opendocument.presentation": {
|
|
43
|
+
extension: "odp",
|
|
44
|
+
name: "OpenDocument presentation"
|
|
45
|
+
},
|
|
46
|
+
"application/vnd.oasis.opendocument.spreadsheet": {
|
|
47
|
+
extension: "ods",
|
|
48
|
+
name: "OpenDocument spreadsheet"
|
|
49
|
+
},
|
|
50
|
+
"application/vnd.oasis.opendocument.text-master": {
|
|
51
|
+
extension: "odm",
|
|
52
|
+
name: "OpenDocument master"
|
|
53
|
+
},
|
|
54
|
+
"application/vnd.oasis.opendocument.text-template": {
|
|
55
|
+
extension: "ott",
|
|
56
|
+
name: "OpenDocument template"
|
|
57
|
+
},
|
|
58
|
+
"application/vnd.oasis.opendocument.text": {
|
|
59
|
+
extension: "odt",
|
|
60
|
+
name: "OpenDocument"
|
|
61
|
+
},
|
|
62
|
+
"application/vnd.openxmlformats-officedocument.presentationml.presentation": {
|
|
63
|
+
extension: "pptx",
|
|
64
|
+
name: "PowerPoint presentation"
|
|
65
|
+
},
|
|
66
|
+
"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet": {
|
|
67
|
+
extension: "xlsx",
|
|
68
|
+
name: "Excel spreadsheet"
|
|
69
|
+
},
|
|
70
|
+
"application/vnd.openxmlformats-officedocument.wordprocessingml.document": {
|
|
71
|
+
extension: "docx",
|
|
72
|
+
name: "Word"
|
|
73
|
+
},
|
|
74
|
+
"application/x-7z-compressed": {
|
|
75
|
+
extension: "7z",
|
|
76
|
+
name: "7Z"
|
|
77
|
+
},
|
|
78
|
+
"application/x-iwork-keynote-sffkey": {
|
|
79
|
+
extension: "key",
|
|
80
|
+
name: "Keynote"
|
|
81
|
+
},
|
|
82
|
+
"application/x-iwork-numbers-sffnumbers": {
|
|
83
|
+
extension: "numbers",
|
|
84
|
+
name: "Numbers"
|
|
85
|
+
},
|
|
86
|
+
"application/x-iwork-pages-sffpages": {
|
|
87
|
+
extension: "pages",
|
|
88
|
+
name: "Pages"
|
|
89
|
+
},
|
|
90
|
+
"application/x-rar-compressed": {
|
|
91
|
+
extension: "rar",
|
|
92
|
+
name: "RAR"
|
|
93
|
+
},
|
|
94
|
+
"application/x-tar": {
|
|
95
|
+
extension: "tar",
|
|
96
|
+
name: "TAR"
|
|
97
|
+
},
|
|
98
|
+
"application/x-zip-compressed": {
|
|
99
|
+
extension: "zip",
|
|
100
|
+
name: "ZIP"
|
|
101
|
+
},
|
|
102
|
+
"application/x-zip": {
|
|
103
|
+
extension: "zip",
|
|
104
|
+
name: "ZIP"
|
|
105
|
+
},
|
|
106
|
+
"application/zip": {
|
|
107
|
+
extension: "zip",
|
|
108
|
+
name: "ZIP"
|
|
109
|
+
},
|
|
110
|
+
"image/avif": {
|
|
111
|
+
extension: "avif",
|
|
112
|
+
name: "AVIF"
|
|
113
|
+
},
|
|
114
|
+
"image/bmp": {
|
|
115
|
+
extension: "bmp",
|
|
116
|
+
name: "BMP"
|
|
117
|
+
},
|
|
118
|
+
"image/gif": {
|
|
119
|
+
extension: "gif",
|
|
120
|
+
name: "GIF"
|
|
121
|
+
},
|
|
122
|
+
"image/heic": {
|
|
123
|
+
extension: "heic",
|
|
124
|
+
name: "HEIC"
|
|
125
|
+
},
|
|
126
|
+
"image/jpeg": {
|
|
127
|
+
extension: "jpg",
|
|
128
|
+
name: "JPEG"
|
|
129
|
+
},
|
|
130
|
+
"image/png": {
|
|
131
|
+
extension: "png",
|
|
132
|
+
name: "PNG"
|
|
133
|
+
},
|
|
134
|
+
"image/tiff": {
|
|
135
|
+
extension: "tiff",
|
|
136
|
+
name: "TIFF"
|
|
137
|
+
},
|
|
138
|
+
"image/webp": {
|
|
139
|
+
extension: "webp",
|
|
140
|
+
name: "WEBP"
|
|
141
|
+
},
|
|
142
|
+
"message/rfc822": {
|
|
143
|
+
extension: "eml",
|
|
144
|
+
name: "Email"
|
|
145
|
+
},
|
|
146
|
+
"text/csv": {
|
|
147
|
+
extension: "csv",
|
|
148
|
+
name: "CSV"
|
|
149
|
+
},
|
|
150
|
+
"text/markdown": {
|
|
151
|
+
extension: "md",
|
|
152
|
+
name: "Markdown"
|
|
153
|
+
},
|
|
154
|
+
"text/plain": {
|
|
155
|
+
extension: "txt",
|
|
156
|
+
name: "Plain text"
|
|
157
|
+
},
|
|
158
|
+
"text/tab-separated-values": {
|
|
159
|
+
extension: "tsv",
|
|
160
|
+
name: "TSV"
|
|
161
|
+
}
|
|
162
|
+
};
|
|
163
|
+
var KNOWN_MIME_TYPES_default = KNOWN_MIME_TYPES;
|
|
164
|
+
export {
|
|
165
|
+
KNOWN_MIME_TYPES_default as default
|
|
166
|
+
};
|
|
167
|
+
//# sourceMappingURL=KNOWN_MIME_TYPES.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/KNOWN_MIME_TYPES.ts"],"sourcesContent":["const KNOWN_MIME_TYPES: Record<string, { extension: string; name: string }> = {\n \"application/msword\": {\n extension: \"doc\",\n name: \"Word\",\n },\n \"application/pdf\": {\n extension: \"pdf\",\n name: \"PDF\",\n },\n \"application/rtf\": {\n extension: \"rtf\",\n name: \"RTF\",\n },\n \"application/vnd.apple.keynote\": {\n extension: \"key\",\n name: \"Keynote\",\n },\n \"application/vnd.apple.numbers\": {\n extension: \"numbers\",\n name: \"Numbers\",\n },\n \"application/vnd.apple.pages\": {\n extension: \"pages\",\n name: \"Pages\",\n },\n \"application/vnd.ms-excel\": {\n extension: \"xls\",\n name: \"Excel spreadsheet\",\n },\n \"application/vnd.ms-outlook\": {\n extension: \"msg\",\n name: \"Outlook message\",\n },\n \"application/vnd.ms-powerpoint.presentation.macroEnabled.12\": {\n extension: \"pptm\",\n name: \"PowerPoint presentation\",\n },\n \"application/vnd.ms-powerpoint\": {\n extension: \"ppt\",\n name: \"PowerPoint presentation\",\n },\n \"application/vnd.oasis.opendocument.presentation\": {\n extension: \"odp\",\n name: \"OpenDocument presentation\",\n },\n \"application/vnd.oasis.opendocument.spreadsheet\": {\n extension: \"ods\",\n name: \"OpenDocument spreadsheet\",\n },\n \"application/vnd.oasis.opendocument.text-master\": {\n extension: \"odm\",\n name: \"OpenDocument master\",\n },\n \"application/vnd.oasis.opendocument.text-template\": {\n extension: \"ott\",\n name: \"OpenDocument template\",\n },\n \"application/vnd.oasis.opendocument.text\": {\n extension: \"odt\",\n name: \"OpenDocument\",\n },\n \"application/vnd.openxmlformats-officedocument.presentationml.presentation\": {\n extension: \"pptx\",\n name: \"PowerPoint presentation\",\n },\n \"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet\": {\n extension: \"xlsx\",\n name: \"Excel spreadsheet\",\n },\n \"application/vnd.openxmlformats-officedocument.wordprocessingml.document\": {\n extension: \"docx\",\n name: \"Word\",\n },\n \"application/x-7z-compressed\": {\n extension: \"7z\",\n name: \"7Z\",\n },\n \"application/x-iwork-keynote-sffkey\": {\n extension: \"key\",\n name: \"Keynote\",\n },\n \"application/x-iwork-numbers-sffnumbers\": {\n extension: \"numbers\",\n name: \"Numbers\",\n },\n \"application/x-iwork-pages-sffpages\": {\n extension: \"pages\",\n name: \"Pages\",\n },\n \"application/x-rar-compressed\": {\n extension: \"rar\",\n name: \"RAR\",\n },\n \"application/x-tar\": {\n extension: \"tar\",\n name: \"TAR\",\n },\n \"application/x-zip-compressed\": {\n extension: \"zip\",\n name: \"ZIP\",\n },\n \"application/x-zip\": {\n extension: \"zip\",\n name: \"ZIP\",\n },\n \"application/zip\": {\n extension: \"zip\",\n name: \"ZIP\",\n },\n \"image/avif\": {\n extension: \"avif\",\n name: \"AVIF\",\n },\n \"image/bmp\": {\n extension: \"bmp\",\n name: \"BMP\",\n },\n \"image/gif\": {\n extension: \"gif\",\n name: \"GIF\",\n },\n \"image/heic\": {\n extension: \"heic\",\n name: \"HEIC\",\n },\n \"image/jpeg\": {\n extension: \"jpg\",\n name: \"JPEG\",\n },\n \"image/png\": {\n extension: \"png\",\n name: \"PNG\",\n },\n \"image/tiff\": {\n extension: \"tiff\",\n name: \"TIFF\",\n },\n \"image/webp\": {\n extension: \"webp\",\n name: \"WEBP\",\n },\n \"message/rfc822\": {\n extension: \"eml\",\n name: \"Email\",\n },\n \"text/csv\": {\n extension: \"csv\",\n name: \"CSV\",\n },\n \"text/markdown\": {\n extension: \"md\",\n name: \"Markdown\",\n },\n \"text/plain\": {\n extension: \"txt\",\n name: \"Plain text\",\n },\n \"text/tab-separated-values\": {\n extension: \"tsv\",\n name: \"TSV\",\n },\n};\n\nexport default KNOWN_MIME_TYPES;\n"],"mappings":"AAAA,MAAM,mBAAwE;AAAA,EAC5E,sBAAsB;AAAA,IACpB,WAAW;AAAA,IACX,MAAM;AAAA,EACR;AAAA,EACA,mBAAmB;AAAA,IACjB,WAAW;AAAA,IACX,MAAM;AAAA,EACR;AAAA,EACA,mBAAmB;AAAA,IACjB,WAAW;AAAA,IACX,MAAM;AAAA,EACR;AAAA,EACA,iCAAiC;AAAA,IAC/B,WAAW;AAAA,IACX,MAAM;AAAA,EACR;AAAA,EACA,iCAAiC;AAAA,IAC/B,WAAW;AAAA,IACX,MAAM;AAAA,EACR;AAAA,EACA,+BAA+B;AAAA,IAC7B,WAAW;AAAA,IACX,MAAM;AAAA,EACR;AAAA,EACA,4BAA4B;AAAA,IAC1B,WAAW;AAAA,IACX,MAAM;AAAA,EACR;AAAA,EACA,8BAA8B;AAAA,IAC5B,WAAW;AAAA,IACX,MAAM;AAAA,EACR;AAAA,EACA,8DAA8D;AAAA,IAC5D,WAAW;AAAA,IACX,MAAM;AAAA,EACR;AAAA,EACA,iCAAiC;AAAA,IAC/B,WAAW;AAAA,IACX,MAAM;AAAA,EACR;AAAA,EACA,mDAAmD;AAAA,IACjD,WAAW;AAAA,IACX,MAAM;AAAA,EACR;AAAA,EACA,kDAAkD;AAAA,IAChD,WAAW;AAAA,IACX,MAAM;AAAA,EACR;AAAA,EACA,kDAAkD;AAAA,IAChD,WAAW;AAAA,IACX,MAAM;AAAA,EACR;AAAA,EACA,oDAAoD;AAAA,IAClD,WAAW;AAAA,IACX,MAAM;AAAA,EACR;AAAA,EACA,2CAA2C;AAAA,IACzC,WAAW;AAAA,IACX,MAAM;AAAA,EACR;AAAA,EACA,6EAA6E;AAAA,IAC3E,WAAW;AAAA,IACX,MAAM;AAAA,EACR;AAAA,EACA,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