postal-mime 1.0.15 → 1.0.16

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.
Files changed (2) hide show
  1. package/package.json +6 -6
  2. package/postal-mime.d.ts +34 -36
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "postal-mime",
3
- "version": "1.0.15",
3
+ "version": "1.0.16",
4
4
  "description": "Email parser for browser environments",
5
5
  "main": "dist/postal-mime.js",
6
6
  "types": "postal-mime.d.ts",
@@ -18,12 +18,12 @@
18
18
  "author": "Andris Reinman",
19
19
  "license": "AGPL-3.0-or-later",
20
20
  "devDependencies": {
21
- "cross-blob": "2.0.0",
22
- "eslint": "8.15.0",
21
+ "cross-blob": "3.0.2",
22
+ "eslint": "8.36.0",
23
23
  "eslint-cli": "1.1.1",
24
- "iframe-resizer": "4.3.2",
25
- "webpack": "5.72.1",
26
- "webpack-cli": "4.9.2",
24
+ "iframe-resizer": "4.3.6",
25
+ "webpack": "5.76.1",
26
+ "webpack-cli": "5.0.1",
27
27
  "cross-env": "7.0.3"
28
28
  }
29
29
  }
package/postal-mime.d.ts CHANGED
@@ -1,45 +1,43 @@
1
- declare namespace postalMime {
2
- type RawEmail = string | ArrayBuffer | Blob | Buffer;
1
+ export type RawEmail = string | ArrayBuffer | Blob | Buffer;
3
2
 
4
- type Header = Record<string, string>;
3
+ export type Header = Record<string, string>;
5
4
 
6
- type Address = {
7
- address: string;
8
- name: string;
9
- };
5
+ export type Address = {
6
+ address: string;
7
+ name: string;
8
+ };
10
9
 
11
- type Attachment = {
12
- filename: string;
13
- mimeType: string;
14
- disposition: 'attachment' | 'inline' | null;
15
- related?: boolean;
16
- contentId?: string;
17
- content: string;
18
- };
10
+ export type Attachment = {
11
+ filename: string;
12
+ mimeType: string;
13
+ disposition: "attachment" | "inline" | null;
14
+ related?: boolean;
15
+ contentId?: string;
16
+ content: string;
17
+ };
19
18
 
20
- type Email = {
21
- headers: Header[];
22
- from: Address;
23
- sender?: Address;
24
- replyTo?: Address[];
25
- deliveredTo?: string;
26
- returnPath?: string;
27
- to: Address[];
28
- cc?: Address[];
29
- bcc?: Address[];
30
- subject?: string;
31
- messageId: string;
32
- inReplyTo?: string;
33
- references?: string;
34
- date?: string;
35
- html?: string;
36
- text?: string;
37
- attachments: Attachment[];
38
- };
39
- }
19
+ export type Email = {
20
+ headers: Header[];
21
+ from: Address;
22
+ sender?: Address;
23
+ replyTo?: Address[];
24
+ deliveredTo?: string;
25
+ returnPath?: string;
26
+ to: Address[];
27
+ cc?: Address[];
28
+ bcc?: Address[];
29
+ subject?: string;
30
+ messageId: string;
31
+ inReplyTo?: string;
32
+ references?: string;
33
+ date?: string;
34
+ html?: string;
35
+ text?: string;
36
+ attachments: Attachment[];
37
+ };
40
38
 
41
39
  declare class PostalMime {
42
- parse(email: postalMime.RawEmail): Promise<postalMime.Email>;
40
+ parse(email: RawEmail): Promise<Email>;
43
41
  }
44
42
 
45
43
  export default PostalMime;