mail-parser-wasm 0.2.1 → 0.2.2
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/mail_parser_wasm.d.ts +4 -4
- package/mail_parser_wasm_bg.js +32 -32
- package/mail_parser_wasm_bg.wasm +0 -0
- package/package.json +1 -1
package/mail_parser_wasm.d.ts
CHANGED
|
@@ -6,8 +6,8 @@ export class AttachmentResult {
|
|
|
6
6
|
free(): void;
|
|
7
7
|
readonly content_id: string;
|
|
8
8
|
readonly content_type: string;
|
|
9
|
-
readonly filename: string;
|
|
10
9
|
readonly content: Uint8Array;
|
|
10
|
+
readonly filename: string;
|
|
11
11
|
}
|
|
12
12
|
export class MessageHeader {
|
|
13
13
|
private constructor();
|
|
@@ -18,10 +18,10 @@ export class MessageHeader {
|
|
|
18
18
|
export class MessageResult {
|
|
19
19
|
private constructor();
|
|
20
20
|
free(): void;
|
|
21
|
+
readonly attachments: AttachmentResult[];
|
|
22
|
+
readonly text: string;
|
|
21
23
|
readonly sender: string;
|
|
24
|
+
readonly headers: MessageHeader[];
|
|
22
25
|
readonly subject: string;
|
|
23
|
-
readonly headers: (MessageHeader)[];
|
|
24
26
|
readonly body_html: string;
|
|
25
|
-
readonly text: string;
|
|
26
|
-
readonly attachments: (AttachmentResult)[];
|
|
27
27
|
}
|
package/mail_parser_wasm_bg.js
CHANGED
|
@@ -24,11 +24,6 @@ function getStringFromWasm0(ptr, len) {
|
|
|
24
24
|
return cachedTextDecoder.decode(getUint8ArrayMemory0().subarray(ptr, ptr + len));
|
|
25
25
|
}
|
|
26
26
|
|
|
27
|
-
function getArrayU8FromWasm0(ptr, len) {
|
|
28
|
-
ptr = ptr >>> 0;
|
|
29
|
-
return getUint8ArrayMemory0().subarray(ptr / 1, ptr / 1 + len);
|
|
30
|
-
}
|
|
31
|
-
|
|
32
27
|
let cachedDataViewMemory0 = null;
|
|
33
28
|
|
|
34
29
|
function getDataViewMemory0() {
|
|
@@ -49,6 +44,11 @@ function getArrayJsValueFromWasm0(ptr, len) {
|
|
|
49
44
|
return result;
|
|
50
45
|
}
|
|
51
46
|
|
|
47
|
+
function getArrayU8FromWasm0(ptr, len) {
|
|
48
|
+
ptr = ptr >>> 0;
|
|
49
|
+
return getUint8ArrayMemory0().subarray(ptr / 1, ptr / 1 + len);
|
|
50
|
+
}
|
|
51
|
+
|
|
52
52
|
let WASM_VECTOR_LEN = 0;
|
|
53
53
|
|
|
54
54
|
const lTextEncoder = typeof TextEncoder === 'undefined' ? (0, module.require)('util').TextEncoder : TextEncoder;
|
|
@@ -172,6 +172,15 @@ export class AttachmentResult {
|
|
|
172
172
|
wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
|
|
173
173
|
}
|
|
174
174
|
}
|
|
175
|
+
/**
|
|
176
|
+
* @returns {Uint8Array}
|
|
177
|
+
*/
|
|
178
|
+
get content() {
|
|
179
|
+
const ret = wasm.attachmentresult_content(this.__wbg_ptr);
|
|
180
|
+
var v1 = getArrayU8FromWasm0(ret[0], ret[1]).slice();
|
|
181
|
+
wasm.__wbindgen_free(ret[0], ret[1] * 1, 1);
|
|
182
|
+
return v1;
|
|
183
|
+
}
|
|
175
184
|
/**
|
|
176
185
|
* @returns {string}
|
|
177
186
|
*/
|
|
@@ -187,15 +196,6 @@ export class AttachmentResult {
|
|
|
187
196
|
wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
|
|
188
197
|
}
|
|
189
198
|
}
|
|
190
|
-
/**
|
|
191
|
-
* @returns {Uint8Array}
|
|
192
|
-
*/
|
|
193
|
-
get content() {
|
|
194
|
-
const ret = wasm.attachmentresult_content(this.__wbg_ptr);
|
|
195
|
-
var v1 = getArrayU8FromWasm0(ret[0], ret[1]).slice();
|
|
196
|
-
wasm.__wbindgen_free(ret[0], ret[1] * 1, 1);
|
|
197
|
-
return v1;
|
|
198
|
-
}
|
|
199
199
|
}
|
|
200
200
|
|
|
201
201
|
const MessageHeaderFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
@@ -280,14 +280,23 @@ export class MessageResult {
|
|
|
280
280
|
const ptr = this.__destroy_into_raw();
|
|
281
281
|
wasm.__wbg_messageresult_free(ptr, 0);
|
|
282
282
|
}
|
|
283
|
+
/**
|
|
284
|
+
* @returns {AttachmentResult[]}
|
|
285
|
+
*/
|
|
286
|
+
get attachments() {
|
|
287
|
+
const ret = wasm.messageresult_attachments(this.__wbg_ptr);
|
|
288
|
+
var v1 = getArrayJsValueFromWasm0(ret[0], ret[1]).slice();
|
|
289
|
+
wasm.__wbindgen_free(ret[0], ret[1] * 4, 4);
|
|
290
|
+
return v1;
|
|
291
|
+
}
|
|
283
292
|
/**
|
|
284
293
|
* @returns {string}
|
|
285
294
|
*/
|
|
286
|
-
get
|
|
295
|
+
get text() {
|
|
287
296
|
let deferred1_0;
|
|
288
297
|
let deferred1_1;
|
|
289
298
|
try {
|
|
290
|
-
const ret = wasm.
|
|
299
|
+
const ret = wasm.messageresult_text(this.__wbg_ptr);
|
|
291
300
|
deferred1_0 = ret[0];
|
|
292
301
|
deferred1_1 = ret[1];
|
|
293
302
|
return getStringFromWasm0(ret[0], ret[1]);
|
|
@@ -298,11 +307,11 @@ export class MessageResult {
|
|
|
298
307
|
/**
|
|
299
308
|
* @returns {string}
|
|
300
309
|
*/
|
|
301
|
-
get
|
|
310
|
+
get sender() {
|
|
302
311
|
let deferred1_0;
|
|
303
312
|
let deferred1_1;
|
|
304
313
|
try {
|
|
305
|
-
const ret = wasm.
|
|
314
|
+
const ret = wasm.messageresult_sender(this.__wbg_ptr);
|
|
306
315
|
deferred1_0 = ret[0];
|
|
307
316
|
deferred1_1 = ret[1];
|
|
308
317
|
return getStringFromWasm0(ret[0], ret[1]);
|
|
@@ -311,7 +320,7 @@ export class MessageResult {
|
|
|
311
320
|
}
|
|
312
321
|
}
|
|
313
322
|
/**
|
|
314
|
-
* @returns {
|
|
323
|
+
* @returns {MessageHeader[]}
|
|
315
324
|
*/
|
|
316
325
|
get headers() {
|
|
317
326
|
const ret = wasm.messageresult_headers(this.__wbg_ptr);
|
|
@@ -322,11 +331,11 @@ export class MessageResult {
|
|
|
322
331
|
/**
|
|
323
332
|
* @returns {string}
|
|
324
333
|
*/
|
|
325
|
-
get
|
|
334
|
+
get subject() {
|
|
326
335
|
let deferred1_0;
|
|
327
336
|
let deferred1_1;
|
|
328
337
|
try {
|
|
329
|
-
const ret = wasm.
|
|
338
|
+
const ret = wasm.messageresult_subject(this.__wbg_ptr);
|
|
330
339
|
deferred1_0 = ret[0];
|
|
331
340
|
deferred1_1 = ret[1];
|
|
332
341
|
return getStringFromWasm0(ret[0], ret[1]);
|
|
@@ -337,11 +346,11 @@ export class MessageResult {
|
|
|
337
346
|
/**
|
|
338
347
|
* @returns {string}
|
|
339
348
|
*/
|
|
340
|
-
get
|
|
349
|
+
get body_html() {
|
|
341
350
|
let deferred1_0;
|
|
342
351
|
let deferred1_1;
|
|
343
352
|
try {
|
|
344
|
-
const ret = wasm.
|
|
353
|
+
const ret = wasm.messageresult_body_html(this.__wbg_ptr);
|
|
345
354
|
deferred1_0 = ret[0];
|
|
346
355
|
deferred1_1 = ret[1];
|
|
347
356
|
return getStringFromWasm0(ret[0], ret[1]);
|
|
@@ -349,15 +358,6 @@ export class MessageResult {
|
|
|
349
358
|
wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
|
|
350
359
|
}
|
|
351
360
|
}
|
|
352
|
-
/**
|
|
353
|
-
* @returns {(AttachmentResult)[]}
|
|
354
|
-
*/
|
|
355
|
-
get attachments() {
|
|
356
|
-
const ret = wasm.messageresult_attachments(this.__wbg_ptr);
|
|
357
|
-
var v1 = getArrayJsValueFromWasm0(ret[0], ret[1]).slice();
|
|
358
|
-
wasm.__wbindgen_free(ret[0], ret[1] * 4, 4);
|
|
359
|
-
return v1;
|
|
360
|
-
}
|
|
361
361
|
}
|
|
362
362
|
|
|
363
363
|
export function __wbg_attachmentresult_new(arg0) {
|
package/mail_parser_wasm_bg.wasm
CHANGED
|
Binary file
|