@file-viewer/renderer-email 3.1.1 → 3.2.0
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/README.en.md +3 -36
- package/README.md +3 -36
- package/dist/email.d.ts +7 -0
- package/dist/email.js +216 -105
- package/dist/emailHtml.d.ts +3 -0
- package/dist/emailHtml.js +191 -0
- package/dist/msg.d.ts +60 -0
- package/dist/msg.js +229 -0
- package/dist/msgCfb.d.ts +4 -0
- package/dist/msgCfb.js +171 -0
- package/dist/msgEncoding.d.ts +2 -0
- package/dist/msgEncoding.js +52 -0
- package/dist/msgMessages.d.ts +5 -0
- package/dist/msgMessages.js +32 -0
- package/dist/msgRtf.d.ts +7 -0
- package/dist/msgRtf.js +234 -0
- package/package.json +29 -19
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
export const msgCodepageLabel = (codepage) => {
|
|
2
|
+
if (codepage && codepage >= 28591 && codepage <= 28606)
|
|
3
|
+
return `iso-8859-${codepage - 28590}`;
|
|
4
|
+
if (codepage && codepage >= 1250 && codepage <= 1258)
|
|
5
|
+
return `windows-${codepage}`;
|
|
6
|
+
return {
|
|
7
|
+
866: 'ibm866', 10000: 'macintosh', 10007: 'x-mac-cyrillic', 38598: 'iso-8859-8-i',
|
|
8
|
+
50221: 'iso-2022-jp', 50222: 'iso-2022-jp',
|
|
9
|
+
65001: 'utf-8', 1200: 'utf-16le', 1201: 'utf-16be', 20127: 'windows-1252',
|
|
10
|
+
932: 'shift_jis', 936: 'gbk', 949: 'euc-kr', 950: 'big5', 54936: 'gb18030',
|
|
11
|
+
28591: 'windows-1252', 28592: 'iso-8859-2', 28605: 'iso-8859-15',
|
|
12
|
+
20866: 'koi8-r', 21866: 'koi8-u', 874: 'windows-874', 50220: 'iso-2022-jp',
|
|
13
|
+
51932: 'euc-jp', 51949: 'euc-kr',
|
|
14
|
+
}[codepage || 0];
|
|
15
|
+
};
|
|
16
|
+
export function decodeEmailHtmlBytes(value, internetCodepage, messageCodepage) {
|
|
17
|
+
var _a;
|
|
18
|
+
if (typeof value === 'string') {
|
|
19
|
+
if (value.length > 32 * 1024 * 1024)
|
|
20
|
+
throw new Error('MSG HTML size limit exceeded.');
|
|
21
|
+
return value.replace(/\0+$/, '');
|
|
22
|
+
}
|
|
23
|
+
const bytes = value instanceof ArrayBuffer ? new Uint8Array(value) : value;
|
|
24
|
+
if (!(bytes instanceof Uint8Array) || bytes.length > 32 * 1024 * 1024)
|
|
25
|
+
throw new Error('Invalid or oversized MSG HTML body.');
|
|
26
|
+
let label;
|
|
27
|
+
if (bytes[0] === 0xff && bytes[1] === 0xfe)
|
|
28
|
+
label = 'utf-16le';
|
|
29
|
+
else if (bytes[0] === 0xfe && bytes[1] === 0xff)
|
|
30
|
+
label = 'utf-16be';
|
|
31
|
+
else if (bytes[0] === 0x3c && bytes[1] === 0 && bytes[3] === 0)
|
|
32
|
+
label = 'utf-16le';
|
|
33
|
+
else if (bytes[0] === 0 && bytes[1] === 0x3c && bytes[2] === 0)
|
|
34
|
+
label = 'utf-16be';
|
|
35
|
+
else if (bytes[0] === 0xef && bytes[1] === 0xbb && bytes[2] === 0xbf)
|
|
36
|
+
label = 'utf-8';
|
|
37
|
+
const prefix = new TextDecoder('windows-1252').decode(bytes.subarray(0, 4096));
|
|
38
|
+
const declared = (_a = /<meta\b[^>]*\bcharset\s*=\s*["']?\s*([a-z0-9._-]+)/i.exec(prefix)) === null || _a === void 0 ? void 0 : _a[1];
|
|
39
|
+
const candidates = [label, msgCodepageLabel(internetCodepage), declared, msgCodepageLabel(messageCodepage)].filter((item) => !!item);
|
|
40
|
+
for (const candidate of candidates) {
|
|
41
|
+
try {
|
|
42
|
+
return new TextDecoder(candidate).decode(bytes).replace(/\0+$/, '');
|
|
43
|
+
}
|
|
44
|
+
catch { }
|
|
45
|
+
}
|
|
46
|
+
try {
|
|
47
|
+
return new TextDecoder('utf-8', { fatal: true }).decode(bytes).replace(/\0+$/, '');
|
|
48
|
+
}
|
|
49
|
+
catch {
|
|
50
|
+
return new TextDecoder('windows-1252').decode(bytes).replace(/\0+$/, '');
|
|
51
|
+
}
|
|
52
|
+
}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { type FileViewerI18nInput } from '@file-viewer/core';
|
|
2
|
+
export type MsgNotice = 'email.msg.rtfUnavailable' | 'email.msg.inlineUnavailable' | 'email.msg.noBody' | 'email.msg.protected';
|
|
3
|
+
type Labels = Record<MsgNotice | 'bcc' | 'sender' | 'close', string>;
|
|
4
|
+
export declare const getMsgLabels: (options?: FileViewerI18nInput) => Labels;
|
|
5
|
+
export {};
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { resolveFileViewerLocale } from '@file-viewer/core';
|
|
2
|
+
const messages = {
|
|
3
|
+
'en-US': {
|
|
4
|
+
bcc: 'Bcc', sender: 'Sender', close: 'Close attachment preview',
|
|
5
|
+
'email.msg.rtfUnavailable': 'Rich-text rendering is unavailable. The readable plain-text body is shown when available. Install the RTF capability to render RTF-only messages.',
|
|
6
|
+
'email.msg.inlineUnavailable': 'An inline image could not be displayed. The original attachment remains available.',
|
|
7
|
+
'email.msg.noBody': 'This Outlook item has no readable email body. Its metadata and embedded attachments are shown.',
|
|
8
|
+
'email.msg.protected': 'This message is protected or signed. Decryption and signature verification are not performed by this viewer.',
|
|
9
|
+
},
|
|
10
|
+
'zh-CN': {
|
|
11
|
+
bcc: '密送', sender: '代发人', close: '关闭附件预览',
|
|
12
|
+
'email.msg.rtfUnavailable': '富文本正文暂不可渲染,已尽可能显示纯文本正文。仅含 RTF 的邮件需要安装 RTF 预览能力。',
|
|
13
|
+
'email.msg.inlineUnavailable': '部分内嵌图片无法显示,原始附件仍保留。',
|
|
14
|
+
'email.msg.noBody': '此 Outlook 项目不含可读邮件正文,已展示元数据及内嵌附件。',
|
|
15
|
+
'email.msg.protected': '此邮件包含加密或签名内容,本预览器不进行解密或签名验证。',
|
|
16
|
+
},
|
|
17
|
+
'ja-JP': {
|
|
18
|
+
bcc: 'Bcc', sender: '送信者', close: '添付ファイルのプレビューを閉じる',
|
|
19
|
+
'email.msg.rtfUnavailable': 'リッチテキストを表示できません。可能な場合はプレーンテキストを表示します。RTF 形式の本文には RTF プレビュー機能が必要です。',
|
|
20
|
+
'email.msg.inlineUnavailable': '一部の埋め込み画像を表示できません。元の添付ファイルは保持されています。',
|
|
21
|
+
'email.msg.noBody': 'この Outlook アイテムには表示可能なメール本文がありません。メタデータと添付ファイルを表示します。',
|
|
22
|
+
'email.msg.protected': 'このメールには保護または署名が含まれます。復号と署名検証は行いません。',
|
|
23
|
+
},
|
|
24
|
+
'de-DE': {
|
|
25
|
+
bcc: 'Bcc', sender: 'Absender', close: 'Anhangvorschau schließen',
|
|
26
|
+
'email.msg.rtfUnavailable': 'Die Rich-Text-Darstellung ist nicht verfügbar. Wenn möglich, wird Klartext angezeigt. Für RTF-Nachrichten ist die RTF-Vorschaufunktion erforderlich.',
|
|
27
|
+
'email.msg.inlineUnavailable': 'Ein eingebettetes Bild konnte nicht angezeigt werden. Der Originalanhang bleibt verfügbar.',
|
|
28
|
+
'email.msg.noBody': 'Dieses Outlook-Element enthält keinen lesbaren Nachrichtentext. Metadaten und eingebettete Anhänge werden angezeigt.',
|
|
29
|
+
'email.msg.protected': 'Diese Nachricht ist geschützt oder signiert. Entschlüsselung und Signaturprüfung werden nicht durchgeführt.',
|
|
30
|
+
},
|
|
31
|
+
};
|
|
32
|
+
export const getMsgLabels = (options) => messages[resolveFileViewerLocale(options)];
|
package/dist/msgRtf.d.ts
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
export declare const MAX_MSG_RTF_BYTES: number;
|
|
2
|
+
export declare function rtfCrc32(bytes: Uint8Array): number;
|
|
3
|
+
export declare function decompressMsgRtf(input: Uint8Array): Uint8Array;
|
|
4
|
+
export declare function extractMsgRtf(bytes: Uint8Array, codepage?: number): {
|
|
5
|
+
text: string;
|
|
6
|
+
html?: string;
|
|
7
|
+
};
|
package/dist/msgRtf.js
ADDED
|
@@ -0,0 +1,234 @@
|
|
|
1
|
+
import { msgCodepageLabel } from './msgEncoding.js';
|
|
2
|
+
export const MAX_MSG_RTF_BYTES = 32 * 1024 * 1024;
|
|
3
|
+
const SEED = '{\\rtf1\\ansi\\mac\\deff0\\deftab720{\\fonttbl;}{\\f0\\fnil \\froman \\fswiss \\fmodern \\fscript \\fdecor MS Sans SerifSymbolArialTimes New RomanCourier{\\colortbl\\red0\\green0\\blue0\r\n\\par \\pard\\plain\\f0\\fs20\\b\\i\\u\\tab\\tx';
|
|
4
|
+
export function rtfCrc32(bytes) {
|
|
5
|
+
let crc = 0;
|
|
6
|
+
for (const byte of bytes) {
|
|
7
|
+
crc ^= byte;
|
|
8
|
+
for (let bit = 0; bit < 8; bit++)
|
|
9
|
+
crc = (crc >>> 1) ^ ((crc & 1) ? 0xedb88320 : 0);
|
|
10
|
+
}
|
|
11
|
+
return crc >>> 0;
|
|
12
|
+
}
|
|
13
|
+
export function decompressMsgRtf(input) {
|
|
14
|
+
const fail = (reason) => { throw new Error(`Invalid Outlook RTF: ${reason}`); };
|
|
15
|
+
if (input.byteLength < 16 || input.byteLength > MAX_MSG_RTF_BYTES + 16)
|
|
16
|
+
fail('compressed size limit');
|
|
17
|
+
const view = new DataView(input.buffer, input.byteOffset, input.byteLength);
|
|
18
|
+
const compressedSize = view.getUint32(0, true);
|
|
19
|
+
const rawSize = view.getUint32(4, true);
|
|
20
|
+
const magic = view.getUint32(8, true);
|
|
21
|
+
if (compressedSize + 4 !== input.length || rawSize > MAX_MSG_RTF_BYTES)
|
|
22
|
+
fail('size mismatch or expansion limit');
|
|
23
|
+
const payload = input.subarray(16);
|
|
24
|
+
if (magic === 0x414c454d) {
|
|
25
|
+
if (payload.length !== rawSize)
|
|
26
|
+
fail('truncated uncompressed body');
|
|
27
|
+
return payload.slice();
|
|
28
|
+
}
|
|
29
|
+
if (magic !== 0x75465a4c)
|
|
30
|
+
fail('unknown compression type');
|
|
31
|
+
if (rtfCrc32(payload) !== view.getUint32(12, true))
|
|
32
|
+
fail('CRC mismatch');
|
|
33
|
+
const dictionary = new Uint8Array(4096);
|
|
34
|
+
const initialized = new Uint8Array(4096);
|
|
35
|
+
dictionary.set(new TextEncoder().encode(SEED));
|
|
36
|
+
initialized.fill(1, 0, SEED.length);
|
|
37
|
+
const output = new Uint8Array(rawSize);
|
|
38
|
+
let write = SEED.length;
|
|
39
|
+
let position = 0;
|
|
40
|
+
let cursor = 0;
|
|
41
|
+
let terminated = false;
|
|
42
|
+
const put = (value) => {
|
|
43
|
+
if (position >= rawSize)
|
|
44
|
+
fail('decompressed size mismatch');
|
|
45
|
+
output[position++] = value;
|
|
46
|
+
dictionary[write] = value;
|
|
47
|
+
initialized[write] = 1;
|
|
48
|
+
write = (write + 1) & 4095;
|
|
49
|
+
};
|
|
50
|
+
while (cursor < payload.length && !terminated) {
|
|
51
|
+
const flags = payload[cursor++];
|
|
52
|
+
for (let bit = 0; bit < 8 && !terminated; bit++) {
|
|
53
|
+
if (flags & (1 << bit)) {
|
|
54
|
+
if (cursor + 2 > payload.length)
|
|
55
|
+
fail('truncated reference');
|
|
56
|
+
const first = payload[cursor++];
|
|
57
|
+
const second = payload[cursor++];
|
|
58
|
+
let reference = (first << 4) | (second >>> 4);
|
|
59
|
+
if (reference === write) {
|
|
60
|
+
terminated = true;
|
|
61
|
+
break;
|
|
62
|
+
}
|
|
63
|
+
const length = (second & 15) + 2;
|
|
64
|
+
for (let index = 0; index < length; index++) {
|
|
65
|
+
if (!initialized[reference])
|
|
66
|
+
fail('uninitialized dictionary reference');
|
|
67
|
+
put(dictionary[reference]);
|
|
68
|
+
reference = (reference + 1) & 4095;
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
else {
|
|
72
|
+
if (cursor >= payload.length)
|
|
73
|
+
fail('truncated literal');
|
|
74
|
+
put(payload[cursor++]);
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
if (!terminated || position !== rawSize)
|
|
79
|
+
fail('missing terminator or incomplete body');
|
|
80
|
+
return output;
|
|
81
|
+
}
|
|
82
|
+
const SKIPPED = new Set([
|
|
83
|
+
'fonttbl', 'colortbl', 'stylesheet', 'info', 'pict', 'object', 'objdata',
|
|
84
|
+
'header', 'headerl', 'headerr', 'footer', 'footerl', 'footerr', 'filetbl',
|
|
85
|
+
'listtable', 'listoverridetable', 'listtext', 'pntext', 'fldinst',
|
|
86
|
+
'datastore', 'themedata', 'colorschememapping', 'xmlnstbl', 'generator',
|
|
87
|
+
]);
|
|
88
|
+
export function extractMsgRtf(bytes, codepage) {
|
|
89
|
+
if (bytes.length > MAX_MSG_RTF_BYTES)
|
|
90
|
+
throw new Error('Outlook RTF exceeds the body limit.');
|
|
91
|
+
let source = '';
|
|
92
|
+
for (let offset = 0; offset < bytes.length; offset += 8192)
|
|
93
|
+
source += String.fromCharCode(...bytes.subarray(offset, offset + 8192));
|
|
94
|
+
if (!/^\{\\rtf[1-9]/.test(source))
|
|
95
|
+
throw new Error('Invalid Outlook RTF document.');
|
|
96
|
+
let state = { skip: false, htmlTag: false, htmlRtf: false, uc: 1, encoding: msgCodepageLabel(codepage) || 'windows-1252', starred: false };
|
|
97
|
+
const stack = [];
|
|
98
|
+
const text = [];
|
|
99
|
+
const html = [];
|
|
100
|
+
const pending = [];
|
|
101
|
+
let fallback = 0;
|
|
102
|
+
let fromHtml = false;
|
|
103
|
+
const emit = (value) => {
|
|
104
|
+
if (state.skip)
|
|
105
|
+
return;
|
|
106
|
+
if (!state.htmlTag)
|
|
107
|
+
text.push(value);
|
|
108
|
+
if (!state.htmlRtf)
|
|
109
|
+
html.push(value);
|
|
110
|
+
};
|
|
111
|
+
const flush = () => {
|
|
112
|
+
if (!pending.length)
|
|
113
|
+
return;
|
|
114
|
+
emit(new TextDecoder(state.encoding).decode(new Uint8Array(pending)));
|
|
115
|
+
pending.length = 0;
|
|
116
|
+
};
|
|
117
|
+
const byte = (value) => {
|
|
118
|
+
if (fallback > 0) {
|
|
119
|
+
fallback--;
|
|
120
|
+
return;
|
|
121
|
+
}
|
|
122
|
+
pending.push(value);
|
|
123
|
+
};
|
|
124
|
+
let rootClosed = false;
|
|
125
|
+
for (let cursor = 0; cursor < source.length;) {
|
|
126
|
+
const char = source[cursor++];
|
|
127
|
+
if (rootClosed) {
|
|
128
|
+
if (!/[\s\0]/.test(char))
|
|
129
|
+
throw new Error('Unexpected content after Outlook RTF document.');
|
|
130
|
+
continue;
|
|
131
|
+
}
|
|
132
|
+
if (char === '{') {
|
|
133
|
+
flush();
|
|
134
|
+
if (stack.length >= 128)
|
|
135
|
+
throw new Error('Outlook RTF nesting limit exceeded.');
|
|
136
|
+
stack.push({ ...state });
|
|
137
|
+
state = { ...state, starred: false };
|
|
138
|
+
fallback = 0;
|
|
139
|
+
continue;
|
|
140
|
+
}
|
|
141
|
+
if (char === '}') {
|
|
142
|
+
flush();
|
|
143
|
+
if (!stack.length)
|
|
144
|
+
throw new Error('Unbalanced Outlook RTF document.');
|
|
145
|
+
state = stack.pop();
|
|
146
|
+
fallback = 0;
|
|
147
|
+
rootClosed = stack.length === 0;
|
|
148
|
+
continue;
|
|
149
|
+
}
|
|
150
|
+
if (char === '\r' || char === '\n')
|
|
151
|
+
continue;
|
|
152
|
+
if (char !== '\\') {
|
|
153
|
+
byte(char.charCodeAt(0));
|
|
154
|
+
continue;
|
|
155
|
+
}
|
|
156
|
+
const control = source[cursor++];
|
|
157
|
+
if (control === '\\' || control === '{' || control === '}') {
|
|
158
|
+
byte(control.charCodeAt(0));
|
|
159
|
+
continue;
|
|
160
|
+
}
|
|
161
|
+
if (control === "'") {
|
|
162
|
+
const hex = source.slice(cursor, cursor + 2);
|
|
163
|
+
if (!/^[0-9a-f]{2}$/i.test(hex))
|
|
164
|
+
throw new Error('Invalid Outlook RTF hex escape.');
|
|
165
|
+
byte(Number.parseInt(hex, 16));
|
|
166
|
+
cursor += 2;
|
|
167
|
+
continue;
|
|
168
|
+
}
|
|
169
|
+
flush();
|
|
170
|
+
if (control === '*') {
|
|
171
|
+
state.starred = true;
|
|
172
|
+
continue;
|
|
173
|
+
}
|
|
174
|
+
if (control === '~' || control === '_' || control === '-') {
|
|
175
|
+
if (fallback)
|
|
176
|
+
fallback--;
|
|
177
|
+
else
|
|
178
|
+
emit(control === '~' ? '\u00a0' : control === '_' ? '\u2011' : '\u00ad');
|
|
179
|
+
continue;
|
|
180
|
+
}
|
|
181
|
+
if (!control || !/[a-z]/i.test(control))
|
|
182
|
+
continue;
|
|
183
|
+
let word = control;
|
|
184
|
+
while (cursor < source.length && /[a-z]/i.test(source[cursor]))
|
|
185
|
+
word += source[cursor++];
|
|
186
|
+
const start = cursor;
|
|
187
|
+
if (source[cursor] === '-')
|
|
188
|
+
cursor++;
|
|
189
|
+
while (cursor < source.length && /[0-9]/.test(source[cursor]))
|
|
190
|
+
cursor++;
|
|
191
|
+
const raw = source.slice(start, cursor);
|
|
192
|
+
const value = raw && raw !== '-' ? Number(raw) : undefined;
|
|
193
|
+
if (source[cursor] === ' ')
|
|
194
|
+
cursor++;
|
|
195
|
+
if (state.starred) {
|
|
196
|
+
if (word !== 'htmltag' && word !== 'mhtmltag')
|
|
197
|
+
state.skip = true;
|
|
198
|
+
state.starred = false;
|
|
199
|
+
}
|
|
200
|
+
if (SKIPPED.has(word))
|
|
201
|
+
state.skip = true;
|
|
202
|
+
if (word === 'htmltag' || word === 'mhtmltag')
|
|
203
|
+
state.htmlTag = true;
|
|
204
|
+
if (word === 'htmlrtf')
|
|
205
|
+
state.htmlRtf = value !== 0;
|
|
206
|
+
if (word === 'fromhtml' && value === 1)
|
|
207
|
+
fromHtml = true;
|
|
208
|
+
if (word === 'ansicpg' && value !== undefined) {
|
|
209
|
+
state.encoding = msgCodepageLabel(value) || state.encoding;
|
|
210
|
+
}
|
|
211
|
+
if (word === 'uc' && value !== undefined)
|
|
212
|
+
state.uc = Math.max(0, Math.min(16, value));
|
|
213
|
+
if (word === 'u' && value !== undefined) {
|
|
214
|
+
emit(String.fromCharCode(value & 0xffff));
|
|
215
|
+
fallback = state.uc;
|
|
216
|
+
}
|
|
217
|
+
if (word === 'bin') {
|
|
218
|
+
if (value === undefined || !Number.isSafeInteger(value) || value < 0 || cursor + value > source.length)
|
|
219
|
+
throw new Error('Invalid Outlook RTF binary block.');
|
|
220
|
+
cursor += value;
|
|
221
|
+
}
|
|
222
|
+
const special = { par: '\n', line: '\n', tab: '\t', cell: '\t', row: '\n', emdash: '\u2014', endash: '\u2013', bullet: '\u2022', lquote: '\u2018', rquote: '\u2019', ldblquote: '\u201c', rdblquote: '\u201d' }[word];
|
|
223
|
+
if (special) {
|
|
224
|
+
if (fallback)
|
|
225
|
+
fallback--;
|
|
226
|
+
else
|
|
227
|
+
emit(special);
|
|
228
|
+
}
|
|
229
|
+
}
|
|
230
|
+
flush();
|
|
231
|
+
if (stack.length || !rootClosed)
|
|
232
|
+
throw new Error('Truncated Outlook RTF document.');
|
|
233
|
+
return { text: text.join('').trim(), html: fromHtml ? html.join('').trim() : undefined };
|
|
234
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@file-viewer/renderer-email",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.2.0",
|
|
4
4
|
"private": false,
|
|
5
5
|
"type": "module",
|
|
6
6
|
"description": "Standalone email renderer plugin for File Viewer with EML, MSG, MBOX, attachments, and nested previews.",
|
|
@@ -26,8 +26,7 @@
|
|
|
26
26
|
},
|
|
27
27
|
"repository": {
|
|
28
28
|
"type": "git",
|
|
29
|
-
"url": "git+https://github.com/flyfish-dev/file-viewer.git"
|
|
30
|
-
"directory": "packages/renderers/email"
|
|
29
|
+
"url": "git+https://github.com/flyfish-dev/file-viewer.git"
|
|
31
30
|
},
|
|
32
31
|
"homepage": "https://doc.file-viewer.app/guide/on-demand-renderers",
|
|
33
32
|
"bugs": {
|
|
@@ -49,28 +48,39 @@
|
|
|
49
48
|
"./package.json": "./package.json"
|
|
50
49
|
},
|
|
51
50
|
"files": [
|
|
52
|
-
"dist",
|
|
51
|
+
"dist/email.d.ts",
|
|
52
|
+
"dist/email.js",
|
|
53
|
+
"dist/emailHtml.d.ts",
|
|
54
|
+
"dist/emailHtml.js",
|
|
55
|
+
"dist/index.d.ts",
|
|
56
|
+
"dist/index.js",
|
|
57
|
+
"dist/msg.d.ts",
|
|
58
|
+
"dist/msg.js",
|
|
59
|
+
"dist/msgCfb.d.ts",
|
|
60
|
+
"dist/msgCfb.js",
|
|
61
|
+
"dist/msgEncoding.d.ts",
|
|
62
|
+
"dist/msgEncoding.js",
|
|
63
|
+
"dist/msgMessages.d.ts",
|
|
64
|
+
"dist/msgMessages.js",
|
|
65
|
+
"dist/msgRtf.d.ts",
|
|
66
|
+
"dist/msgRtf.js",
|
|
53
67
|
"file-viewer.capability.json",
|
|
54
|
-
"
|
|
68
|
+
"LICENSE",
|
|
55
69
|
"README.en.md",
|
|
56
|
-
"
|
|
70
|
+
"README.md"
|
|
57
71
|
],
|
|
58
72
|
"dependencies": {
|
|
59
|
-
"@file-viewer/core": "3.
|
|
73
|
+
"@file-viewer/core": "3.2.0",
|
|
60
74
|
"@kenjiuno/msgreader": "^1.28.0",
|
|
61
75
|
"buffer": "^6.0.3",
|
|
62
|
-
"postal-mime": "^
|
|
63
|
-
},
|
|
64
|
-
"devDependencies": {
|
|
65
|
-
"typescript": "^6.0.3"
|
|
76
|
+
"postal-mime": "^4.0.5"
|
|
66
77
|
},
|
|
67
78
|
"fileViewer": {
|
|
68
|
-
"capabilityManifest": "./file-viewer.capability.json"
|
|
79
|
+
"capabilityManifest": "./file-viewer.capability.json",
|
|
80
|
+
"distribution": {
|
|
81
|
+
"schemaVersion": 1,
|
|
82
|
+
"mode": "runtime-only"
|
|
83
|
+
}
|
|
69
84
|
},
|
|
70
|
-
"license": "Apache-2.0"
|
|
71
|
-
|
|
72
|
-
"build": "tsc -b tsconfig.json",
|
|
73
|
-
"type-check": "tsc -b tsconfig.json",
|
|
74
|
-
"verify:github-232": "pnpm --filter @file-viewer/core build && pnpm build && node scripts/verify-github-232.mjs"
|
|
75
|
-
}
|
|
76
|
-
}
|
|
85
|
+
"license": "Apache-2.0"
|
|
86
|
+
}
|